Skip to content

Commit a1bcfec

Browse files
authored
Small Holocene updates (#2486)
* Fix Combobox height to match Select * Pass id to PaginatedTable * Add icons * Add maxHeight prop to API PaginatedTable
1 parent 66c8321 commit a1bcfec

File tree

8 files changed

+50
-18
lines changed

8 files changed

+50
-18
lines changed

Diff for: src/lib/holocene/combobox/combobox.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@
519519

520520
<style lang="postcss">
521521
.combobox-wrapper {
522-
@apply surface-primary flex w-full flex-row items-center border border-subtle text-sm dark:focus-within:surface-primary focus-within:border-interactive focus-within:outline-none focus-within:ring-2 focus-within:ring-primary/70;
522+
@apply surface-primary flex h-10 w-full flex-row items-center border border-subtle text-sm dark:focus-within:surface-primary focus-within:border-interactive focus-within:outline-none focus-within:ring-2 focus-within:ring-primary/70;
523523
524524
&.invalid {
525525
@apply border border-danger text-danger focus-within:ring-danger/70;
@@ -539,6 +539,6 @@
539539
}
540540
541541
.combobox-input {
542-
@apply flex h-9 grow bg-transparent text-primary placeholder:text-secondary focus:outline-none;
542+
@apply flex grow bg-transparent text-primary placeholder:text-secondary focus:outline-none;
543543
}
544544
</style>

Diff for: src/lib/holocene/icon/paths.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import chevronLeft from './svg/chevron-left.svelte';
2222
import chevronRight from './svg/chevron-right.svelte';
2323
import chevronSelectorVertical from './svg/chevron-selector-vertical.svelte';
2424
import chevronUp from './svg/chevron-up.svelte';
25+
import circleCheckFilled from './svg/circle-check-filled.svelte';
2526
import clock from './svg/clock.svelte';
2627
import close from './svg/close.svelte';
2728
import cometSolid from './svg/comet-solid.svelte';
@@ -54,7 +55,6 @@ import graph from './svg/graph.svelte';
5455
import hyphen from './svg/hyphen.svelte';
5556
import importIcon from './svg/import.svelte';
5657
import info from './svg/info.svelte';
57-
import invertedCheckmark from './svg/inverted-checkmark.svelte';
5858
import json from './svg/json.svelte';
5959
import keyboard from './svg/keyboard.svelte';
6060
import labs from './svg/labs.svelte';
@@ -107,6 +107,7 @@ import usage from './svg/usage.svelte';
107107
import verticalEllipsis from './svg/vertical-ellipsis.svelte';
108108
import warning from './svg/warning.svelte';
109109
import workflow from './svg/workflow.svelte';
110+
import xmarkFilled from './svg/xmark-filled.svelte';
110111

111112
export const icons = {
112113
activity,
@@ -132,6 +133,7 @@ export const icons = {
132133
'chevron-right': chevronRight,
133134
'chevron-up': chevronUp,
134135
'chevron-selector-vertical': chevronSelectorVertical,
136+
'circle-check-filled': circleCheckFilled,
135137
clock,
136138
close,
137139
'comet-solid': cometSolid,
@@ -164,7 +166,6 @@ export const icons = {
164166
hyphen,
165167
import: importIcon,
166168
info,
167-
'inverted-checkmark': invertedCheckmark,
168169
json,
169170
keyboard,
170171
labs,
@@ -218,6 +219,7 @@ export const icons = {
218219
'vertical-ellipsis': verticalEllipsis,
219220
warning,
220221
workflow,
222+
'xmark-filled': xmarkFilled,
221223
} as const;
222224

223225
export type IconName = keyof typeof icons;

Diff for: src/lib/holocene/icon/svg/circle-check-filled.svelte

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<script lang="ts">
2+
import Svg from '../svg.svelte';
3+
</script>
4+
5+
<Svg {...$$props}>
6+
<g clip-path="url(#clip0_2145_49)">
7+
<path
8+
fill-rule="evenodd"
9+
clip-rule="evenodd"
10+
d="M20.4853 20.4853C18.2348 22.7357 15.1826 24 12 24C8.8174 24 5.76516 22.7357 3.51472 20.4853C1.26428 18.2348 0 15.1826 0 12C0 8.8174 1.26428 5.76516 3.51472 3.51472C5.76516 1.26428 8.8174 0 12 0C15.1826 0 18.2348 1.26428 20.4853 3.51472C22.7357 5.76516 24 8.8174 24 12C24 15.1826 22.7357 18.2348 20.4853 20.4853ZM17.2969 9.79686L18.0938 8.99998L16.5001 7.41092L15.7032 8.20779L10.5001 13.4109L8.29695 11.2078L7.50007 10.4109L5.91101 12L6.70789 12.7969L9.70789 15.7969L10.5048 16.5937L11.3016 15.7969L17.2969 9.79686Z"
11+
fill="currentcolor"
12+
/>
13+
</g>
14+
<defs>
15+
<clipPath id="clip0_2145_49">
16+
<rect width="24" height="24" fill="white" />
17+
</clipPath>
18+
</defs>
19+
</Svg>

Diff for: src/lib/holocene/icon/svg/inverted-checkmark.svelte

-13
This file was deleted.

Diff for: src/lib/holocene/icon/svg/xmark-filled.svelte

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<script lang="ts">
2+
import Svg from '../svg.svelte';
3+
</script>
4+
5+
<Svg {...$$props}>
6+
<path
7+
fill-rule="evenodd"
8+
clip-rule="evenodd"
9+
d="M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24ZM18 7.2L17.4 7.8L13.1965 12L17.3965 16.2L17.9965 16.8L16.8 18L16.2 17.4L12 13.1965L7.8 17.3965L7.2 17.9965L6 16.8L6.6 16.2L10.8035 12L6.60353 7.8L6.00353 7.2L7.2 6L7.8 6.6L12 10.8035L16.2 6.60353L16.8 6.00353L18 7.2Z"
10+
fill="currentcolor"
11+
/>
12+
</Svg>

Diff for: src/lib/holocene/table/paginated-table/api-paginated.svelte

+10-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
2727
type T = $$Generic;
2828
type $$Props = HTMLAttributes<HTMLDivElement> & {
29+
id?: string;
30+
maxHeight?: string;
2931
onError?: (error: Error | unknown) => void | undefined;
3032
onFetch: () => Promise<PaginatedRequest<T>>;
3133
onShiftUp?: (event: KeyboardEvent) => void | undefined;
@@ -43,6 +45,8 @@
4345
pageSizeOptions?: string[];
4446
};
4547
48+
export let id: string = null;
49+
export let maxHeight = '';
4650
export let onError: (error: Error) => void | undefined = undefined;
4751
export let onFetch: () => Promise<PaginatedRequest<T>>;
4852
export let onShiftUp: (event: KeyboardEvent) => void | undefined = undefined;
@@ -169,7 +173,12 @@
169173

170174
<slot name="header" visibleItems={$store.visibleItems} />
171175

172-
<PaginatedTable updating={$store.updating} visibleItems={$store.visibleItems}>
176+
<PaginatedTable
177+
updating={$store.updating}
178+
visibleItems={$store.visibleItems}
179+
{maxHeight}
180+
{id}
181+
>
173182
<slot name="caption" slot="caption" />
174183
<slot name="headers" slot="headers" visibleItems={$store.visibleItems} />
175184

Diff for: src/lib/holocene/table/paginated-table/index.svelte

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
class="paginated-table"
2626
class:table-fixed={fixed}
2727
class:table-auto={!fixed}
28+
{...$$restProps}
2829
>
2930
<slot name="caption" />
3031
<thead class="paginated-table-header">

Diff for: src/lib/holocene/table/paginated-table/paginated.svelte

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
1919
type Item = $$Generic;
2020
21+
export let id: string = null;
2122
export let items: Item[];
2223
export let variant: 'primary' | 'split' = 'primary';
2324
export let updating = false;
@@ -94,6 +95,7 @@
9495
{maxHeight}
9596
visibleItems={$store.items}
9697
{fixed}
98+
{id}
9799
>
98100
<slot name="caption" slot="caption" />
99101
<slot name="headers" slot="headers" visibleItems={$store.items} />

0 commit comments

Comments
 (0)