From a1bcfeceee2e4dca3c48ec54afed7ae38ca290b6 Mon Sep 17 00:00:00 2001 From: Laura Whitaker Date: Wed, 8 Jan 2025 13:14:18 -0700 Subject: [PATCH] Small Holocene updates (#2486) * Fix Combobox height to match Select * Pass id to PaginatedTable * Add icons * Add maxHeight prop to API PaginatedTable --- src/lib/holocene/combobox/combobox.svelte | 4 ++-- src/lib/holocene/icon/paths.ts | 6 ++++-- .../icon/svg/circle-check-filled.svelte | 19 +++++++++++++++++++ .../icon/svg/inverted-checkmark.svelte | 13 ------------- src/lib/holocene/icon/svg/xmark-filled.svelte | 12 ++++++++++++ .../paginated-table/api-paginated.svelte | 11 ++++++++++- .../table/paginated-table/index.svelte | 1 + .../table/paginated-table/paginated.svelte | 2 ++ 8 files changed, 50 insertions(+), 18 deletions(-) create mode 100644 src/lib/holocene/icon/svg/circle-check-filled.svelte delete mode 100644 src/lib/holocene/icon/svg/inverted-checkmark.svelte create mode 100644 src/lib/holocene/icon/svg/xmark-filled.svelte diff --git a/src/lib/holocene/combobox/combobox.svelte b/src/lib/holocene/combobox/combobox.svelte index 5d9e10e1e..804ec7fa9 100644 --- a/src/lib/holocene/combobox/combobox.svelte +++ b/src/lib/holocene/combobox/combobox.svelte @@ -519,7 +519,7 @@ diff --git a/src/lib/holocene/icon/paths.ts b/src/lib/holocene/icon/paths.ts index b4bbbef25..740c1388a 100644 --- a/src/lib/holocene/icon/paths.ts +++ b/src/lib/holocene/icon/paths.ts @@ -22,6 +22,7 @@ import chevronLeft from './svg/chevron-left.svelte'; import chevronRight from './svg/chevron-right.svelte'; import chevronSelectorVertical from './svg/chevron-selector-vertical.svelte'; import chevronUp from './svg/chevron-up.svelte'; +import circleCheckFilled from './svg/circle-check-filled.svelte'; import clock from './svg/clock.svelte'; import close from './svg/close.svelte'; import cometSolid from './svg/comet-solid.svelte'; @@ -54,7 +55,6 @@ import graph from './svg/graph.svelte'; import hyphen from './svg/hyphen.svelte'; import importIcon from './svg/import.svelte'; import info from './svg/info.svelte'; -import invertedCheckmark from './svg/inverted-checkmark.svelte'; import json from './svg/json.svelte'; import keyboard from './svg/keyboard.svelte'; import labs from './svg/labs.svelte'; @@ -107,6 +107,7 @@ import usage from './svg/usage.svelte'; import verticalEllipsis from './svg/vertical-ellipsis.svelte'; import warning from './svg/warning.svelte'; import workflow from './svg/workflow.svelte'; +import xmarkFilled from './svg/xmark-filled.svelte'; export const icons = { activity, @@ -132,6 +133,7 @@ export const icons = { 'chevron-right': chevronRight, 'chevron-up': chevronUp, 'chevron-selector-vertical': chevronSelectorVertical, + 'circle-check-filled': circleCheckFilled, clock, close, 'comet-solid': cometSolid, @@ -164,7 +166,6 @@ export const icons = { hyphen, import: importIcon, info, - 'inverted-checkmark': invertedCheckmark, json, keyboard, labs, @@ -218,6 +219,7 @@ export const icons = { 'vertical-ellipsis': verticalEllipsis, warning, workflow, + 'xmark-filled': xmarkFilled, } as const; export type IconName = keyof typeof icons; diff --git a/src/lib/holocene/icon/svg/circle-check-filled.svelte b/src/lib/holocene/icon/svg/circle-check-filled.svelte new file mode 100644 index 000000000..a7322f8bc --- /dev/null +++ b/src/lib/holocene/icon/svg/circle-check-filled.svelte @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/src/lib/holocene/icon/svg/inverted-checkmark.svelte b/src/lib/holocene/icon/svg/inverted-checkmark.svelte deleted file mode 100644 index b81ef1c17..000000000 --- a/src/lib/holocene/icon/svg/inverted-checkmark.svelte +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/src/lib/holocene/icon/svg/xmark-filled.svelte b/src/lib/holocene/icon/svg/xmark-filled.svelte new file mode 100644 index 000000000..9bf24988d --- /dev/null +++ b/src/lib/holocene/icon/svg/xmark-filled.svelte @@ -0,0 +1,12 @@ + + + + + diff --git a/src/lib/holocene/table/paginated-table/api-paginated.svelte b/src/lib/holocene/table/paginated-table/api-paginated.svelte index f968cc6d4..7bb01aef3 100644 --- a/src/lib/holocene/table/paginated-table/api-paginated.svelte +++ b/src/lib/holocene/table/paginated-table/api-paginated.svelte @@ -26,6 +26,8 @@ type T = $$Generic; type $$Props = HTMLAttributes & { + id?: string; + maxHeight?: string; onError?: (error: Error | unknown) => void | undefined; onFetch: () => Promise>; onShiftUp?: (event: KeyboardEvent) => void | undefined; @@ -43,6 +45,8 @@ pageSizeOptions?: string[]; }; + export let id: string = null; + export let maxHeight = ''; export let onError: (error: Error) => void | undefined = undefined; export let onFetch: () => Promise>; export let onShiftUp: (event: KeyboardEvent) => void | undefined = undefined; @@ -169,7 +173,12 @@ - + diff --git a/src/lib/holocene/table/paginated-table/index.svelte b/src/lib/holocene/table/paginated-table/index.svelte index 926596acc..98e99ffd7 100644 --- a/src/lib/holocene/table/paginated-table/index.svelte +++ b/src/lib/holocene/table/paginated-table/index.svelte @@ -25,6 +25,7 @@ class="paginated-table" class:table-fixed={fixed} class:table-auto={!fixed} + {...$$restProps} > diff --git a/src/lib/holocene/table/paginated-table/paginated.svelte b/src/lib/holocene/table/paginated-table/paginated.svelte index 7ca01fe8c..e9d7cc6c3 100644 --- a/src/lib/holocene/table/paginated-table/paginated.svelte +++ b/src/lib/holocene/table/paginated-table/paginated.svelte @@ -18,6 +18,7 @@ type Item = $$Generic; + export let id: string = null; export let items: Item[]; export let variant: 'primary' | 'split' = 'primary'; export let updating = false; @@ -94,6 +95,7 @@ {maxHeight} visibleItems={$store.items} {fixed} + {id} >