@cognite/aura 0.1.7 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DESIGN.md +34 -92
- package/README.md +33 -0
- package/dist/colors.css +471 -214
- package/dist/components/index.d.ts +17 -33
- package/dist/components/index.js +315 -281
- package/dist/components/ui/core/accordion/accordion.d.ts +7 -7
- package/dist/components/ui/core/accordion/accordion.js +64 -62
- package/dist/components/ui/core/action-toolbar/action-toolbar.d.ts +41 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar.js +176 -0
- package/dist/components/ui/core/alert/alert.d.ts +23 -12
- package/dist/components/ui/core/alert/alert.js +123 -120
- package/dist/components/ui/core/avatar/avatar.d.ts +12 -8
- package/dist/components/ui/core/avatar/avatar.js +10 -10
- package/dist/components/ui/core/badge/badge.d.ts +11 -8
- package/dist/components/ui/core/badge/badge.js +13 -13
- package/dist/components/ui/core/banner/banner.d.ts +18 -28
- package/dist/components/ui/core/banner/banner.js +6 -6
- package/dist/components/ui/core/breadcrumb/breadcrumb.d.ts +12 -0
- package/dist/components/ui/core/breadcrumb/breadcrumb.js +200 -0
- package/dist/components/ui/core/button/button.d.ts +8 -5
- package/dist/components/ui/core/button/button.js +22 -19
- package/dist/components/ui/core/button-group/button-group.d.ts +7 -6
- package/dist/components/ui/core/card/card.d.ts +18 -14
- package/dist/components/ui/core/card/card.js +131 -87
- package/dist/components/ui/core/chart/chart.d.ts +69 -0
- package/dist/components/ui/core/chart/chart.js +215 -0
- package/dist/components/ui/core/chart/index.d.ts +2 -0
- package/dist/components/ui/core/chart/index.js +8 -0
- package/dist/components/ui/core/checkbox/checkbox.d.ts +17 -0
- package/dist/components/ui/core/checkbox/checkbox.js +133 -0
- package/dist/components/ui/core/{badge/badge.metadata.d.ts → checkbox/checkbox.metadata.d.ts} +1 -1
- package/dist/components/ui/core/checkbox/checkbox.metadata.js +8 -0
- package/dist/components/ui/core/code-block/code-block.d.ts +6 -9
- package/dist/components/ui/core/code-block/code-block.js +52 -48
- package/dist/components/ui/core/collapsible/collapsible.d.ts +5 -3
- package/dist/components/ui/core/combobox/combobox.d.ts +2 -2
- package/dist/components/ui/core/command/command.d.ts +11 -78
- package/dist/components/ui/core/command/command.js +53 -52
- package/dist/components/ui/core/count/count.d.ts +9 -0
- package/dist/components/ui/core/count/count.js +32 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.d.ts +15 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +99 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/index.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.d.ts +25 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.d.ts +4 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +82 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.d.ts +17 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +190 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.d.ts +42 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +161 -0
- package/dist/components/ui/core/date-time-pickers/index.d.ts +6 -0
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.d.ts +7 -0
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +57 -0
- package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.d.ts +13 -0
- package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.js +119 -0
- package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.d.ts +10 -0
- package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.js +93 -0
- package/dist/components/ui/core/date-time-pickers/shared/constants.d.ts +20 -0
- package/dist/components/ui/core/date-time-pickers/shared/constants.js +14 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.d.ts +19 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +99 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.d.ts +12 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +68 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.d.ts +12 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +40 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.d.ts +29 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +63 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.d.ts +8 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +19 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.d.ts +17 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +34 -0
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.d.ts +8 -0
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +7 -0
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.d.ts +13 -0
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +31 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.d.ts +10 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js +52 -0
- package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.d.ts +48 -0
- package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +52 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.d.ts +26 -0
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.d.ts +37 -0
- package/dist/components/ui/core/date-time-pickers/utils/segment-utils.d.ts +34 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.d.ts +43 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +15 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-validation.d.ts +23 -0
- package/dist/components/ui/core/dialog/dialog.d.ts +10 -10
- package/dist/components/ui/core/dialog/dialog.js +12 -3
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +24 -47
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +125 -123
- package/dist/components/ui/core/empty-state/empty-state.context.d.ts +10 -0
- package/dist/components/ui/core/empty-state/empty-state.context.js +8 -0
- package/dist/components/ui/core/empty-state/empty-state.d.ts +18 -0
- package/dist/components/ui/core/empty-state/empty-state.js +139 -0
- package/dist/components/ui/core/helper-text/helper-text.d.ts +7 -5
- package/dist/components/ui/core/hover-card/hover-card.d.ts +5 -7
- package/dist/components/ui/core/hover-card/hover-card.js +26 -25
- package/dist/components/ui/core/inline-citation/inline-citation.d.ts +10 -10
- package/dist/components/ui/core/inline-citation/inline-citation.js +65 -57
- package/dist/components/ui/core/input/input.d.ts +2 -1
- package/dist/components/ui/core/input-group/input-group.d.ts +17 -13
- package/dist/components/ui/core/input-group/input-group.js +35 -36
- package/dist/components/ui/core/kbd/kbd.d.ts +4 -0
- package/dist/components/ui/core/kbd/kbd.js +36 -0
- package/dist/components/ui/core/label/label.d.ts +3 -2
- package/dist/components/ui/core/loader/loader.d.ts +11 -3
- package/dist/components/ui/core/loader/loader.js +106 -107
- package/dist/components/ui/core/message/message.d.ts +18 -17
- package/dist/components/ui/core/message/message.js +15 -13
- package/dist/components/ui/core/pagination/pagination-size-context.d.ts +5 -0
- package/dist/components/ui/core/pagination/pagination-size-context.js +6 -0
- package/dist/components/ui/core/pagination/pagination-teleport.d.ts +11 -0
- package/dist/components/ui/core/pagination/pagination-teleport.js +108 -0
- package/dist/components/ui/core/pagination/pagination-teleport.utils.d.ts +1 -0
- package/dist/components/ui/core/pagination/pagination-teleport.utils.js +7 -0
- package/dist/components/ui/core/pagination/pagination.d.ts +41 -0
- package/dist/components/ui/core/pagination/pagination.js +335 -0
- package/dist/components/ui/core/popover/popover.d.ts +12 -16
- package/dist/components/ui/core/popover/popover.js +52 -51
- package/dist/components/ui/core/progress/progress.d.ts +7 -4
- package/dist/components/ui/core/prompt-input/prompt-input.d.ts +36 -103
- package/dist/components/ui/core/prompt-input/prompt-input.js +193 -180
- package/dist/components/ui/core/radio-group/radio-group.d.ts +20 -0
- package/dist/components/ui/core/radio-group/radio-group.js +113 -0
- package/dist/components/ui/core/reasoning/reasoning.d.ts +5 -5
- package/dist/components/ui/core/reasoning/reasoning.js +1 -1
- package/dist/components/ui/core/scroll-area/scroll-area.d.ts +4 -2
- package/dist/components/ui/core/search/search.d.ts +10 -0
- package/dist/components/ui/core/search/search.js +99 -0
- package/dist/components/ui/core/segmented-control/segmented-control.d.ts +20 -0
- package/dist/components/ui/core/segmented-control/segmented-control.js +172 -0
- package/dist/components/ui/core/select/select.d.ts +13 -13
- package/dist/components/ui/core/select/select.js +13 -10
- package/dist/components/ui/core/separator/separator.d.ts +2 -4
- package/dist/components/ui/core/separator/separator.js +4 -5
- package/dist/components/ui/core/shimmer/shimmer.d.ts +3 -5
- package/dist/components/ui/core/shimmer/shimmer.js +25 -26
- package/dist/components/ui/core/skeleton/skeleton.d.ts +2 -1
- package/dist/components/ui/core/sonner-toast/sonner-toast.d.ts +4 -0
- package/dist/components/ui/core/sonner-toast/sonner-toast.js +48 -0
- package/dist/components/ui/core/sources/sources.d.ts +3 -3
- package/dist/components/ui/core/sources/sources.js +6 -1
- package/dist/components/ui/core/switch/switch.d.ts +11 -0
- package/dist/components/ui/core/{button/button.metadata.d.ts → switch/switch.metadata.d.ts} +1 -1
- package/dist/components/ui/core/tabs/tabs.d.ts +27 -0
- package/dist/components/ui/core/tabs/tabs.js +224 -0
- package/dist/components/ui/core/tabs/tabs.utils.d.ts +2 -0
- package/dist/components/ui/core/tabs/tabs.utils.js +9 -0
- package/dist/components/ui/core/textarea/textarea.d.ts +2 -1
- package/dist/components/ui/core/textarea/textarea.js +20 -18
- package/dist/components/ui/core/tool/tool.d.ts +7 -6
- package/dist/components/ui/core/tool/tool.js +48 -44
- package/dist/components/ui/core/tooltip/tooltip.d.ts +6 -5
- package/dist/components/ui/core/tooltip/tooltip.js +10 -8
- package/dist/components/ui/core/topbar/topbar.d.ts +28 -0
- package/dist/components/ui/core/topbar/topbar.js +190 -0
- package/dist/eslint/index.d.ts +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +298 -273
- package/dist/lib/portal-container-context.d.ts +2 -1
- package/dist/lib/portal-container-context.js +1 -3
- package/dist/lib/utils.d.ts +11 -0
- package/dist/lib/utils.js +40 -29
- package/dist/styles.css +1 -1
- package/dist/styles.source.css +75 -8
- package/package.json +26 -5
- package/dist/components/ui/core/accordion/accordion.metadata.d.ts +0 -2
- package/dist/components/ui/core/accordion/accordion.metadata.js +0 -9
- package/dist/components/ui/core/alert/alert.metadata.d.ts +0 -2
- package/dist/components/ui/core/alert/alert.metadata.js +0 -9
- package/dist/components/ui/core/avatar/avatar.metadata.d.ts +0 -8
- package/dist/components/ui/core/avatar/avatar.metadata.js +0 -9
- package/dist/components/ui/core/badge/badge.metadata.js +0 -8
- package/dist/components/ui/core/banner/banner.metadata.d.ts +0 -2
- package/dist/components/ui/core/banner/banner.metadata.js +0 -9
- package/dist/components/ui/core/button/button.metadata.js +0 -9
- package/dist/components/ui/core/button-group/button-group.metadata.d.ts +0 -2
- package/dist/components/ui/core/button-group/button-group.metadata.js +0 -8
- package/dist/components/ui/core/card/card.metadata.d.ts +0 -8
- package/dist/components/ui/core/card/card.metadata.js +0 -9
- package/dist/components/ui/core/code-block/code-block.metadata.d.ts +0 -2
- package/dist/components/ui/core/code-block/code-block.metadata.js +0 -8
- package/dist/components/ui/core/collapsible/collapsible.metadata.d.ts +0 -2
- package/dist/components/ui/core/collapsible/collapsible.metadata.js +0 -9
- package/dist/components/ui/core/combobox/combobox.metadata.d.ts +0 -2
- package/dist/components/ui/core/command/command.metadata.d.ts +0 -2
- package/dist/components/ui/core/command/command.metadata.js +0 -9
- package/dist/components/ui/core/dialog/dialog.metadata.d.ts +0 -2
- package/dist/components/ui/core/dialog/dialog.metadata.js +0 -9
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.metadata.d.ts +0 -2
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.metadata.js +0 -9
- package/dist/components/ui/core/helper-text/helper-text.metadata.d.ts +0 -2
- package/dist/components/ui/core/helper-text/helper-text.metadata.js +0 -9
- package/dist/components/ui/core/hover-card/hover-card.metadata.d.ts +0 -2
- package/dist/components/ui/core/hover-card/hover-card.metadata.js +0 -8
- package/dist/components/ui/core/inline-citation/inline-citation.metadata.d.ts +0 -2
- package/dist/components/ui/core/inline-citation/inline-citation.metadata.js +0 -8
- package/dist/components/ui/core/input/input.metadata.d.ts +0 -2
- package/dist/components/ui/core/input/input.metadata.js +0 -9
- package/dist/components/ui/core/input-group/input-group.metadata.d.ts +0 -2
- package/dist/components/ui/core/input-group/input-group.metadata.js +0 -9
- package/dist/components/ui/core/label/label.metadata.d.ts +0 -2
- package/dist/components/ui/core/label/label.metadata.js +0 -9
- package/dist/components/ui/core/loader/loader.metadata.d.ts +0 -2
- package/dist/components/ui/core/loader/loader.metadata.js +0 -9
- package/dist/components/ui/core/message/message.metadata.d.ts +0 -2
- package/dist/components/ui/core/popover/popover.metadata.d.ts +0 -2
- package/dist/components/ui/core/popover/popover.metadata.js +0 -9
- package/dist/components/ui/core/progress/progress.metadata.d.ts +0 -2
- package/dist/components/ui/core/progress/progress.metadata.js +0 -9
- package/dist/components/ui/core/prompt-input/prompt-input.metadata.d.ts +0 -2
- package/dist/components/ui/core/prompt-input/prompt-input.metadata.js +0 -9
- package/dist/components/ui/core/reasoning/reasoning.metadata.d.ts +0 -2
- package/dist/components/ui/core/reasoning/reasoning.metadata.js +0 -8
- package/dist/components/ui/core/scroll-area/scroll-area.metadata.d.ts +0 -2
- package/dist/components/ui/core/scroll-area/scroll-area.metadata.js +0 -9
- package/dist/components/ui/core/select/select.metadata.d.ts +0 -2
- package/dist/components/ui/core/select/select.metadata.js +0 -9
- package/dist/components/ui/core/separator/separator.metadata.d.ts +0 -2
- package/dist/components/ui/core/separator/separator.metadata.js +0 -8
- package/dist/components/ui/core/shimmer/shimmer.metadata.d.ts +0 -2
- package/dist/components/ui/core/shimmer/shimmer.metadata.js +0 -9
- package/dist/components/ui/core/skeleton/skeleton.metadata.d.ts +0 -2
- package/dist/components/ui/core/skeleton/skeleton.metadata.js +0 -9
- package/dist/components/ui/core/sources/sources.metadata.d.ts +0 -2
- package/dist/components/ui/core/textarea/textarea.metadata.d.ts +0 -2
- package/dist/components/ui/core/textarea/textarea.metadata.js +0 -9
- package/dist/components/ui/core/tool/tool.metadata.d.ts +0 -2
- package/dist/components/ui/core/tool/tool.metadata.js +0 -8
- package/dist/components/ui/core/tooltip/tooltip.metadata.d.ts +0 -8
- package/dist/components/ui/core/tooltip/tooltip.metadata.js +0 -9
package/dist/lib/utils.d.ts
CHANGED
|
@@ -26,6 +26,17 @@ export declare const focusState: "focus-visible:shadow-focus-ring focus-visible:
|
|
|
26
26
|
export declare const invalidState: "aria-invalid:border-destructive-foreground aria-invalid:shadow-focus-ring-destructive aria-invalid:border-transparent aria-invalid:text-foreground aria-invalid:focus-visible:shadow-focus-ring aria-invalid:focus-visible:bg-background aria-invalid:focus-visible:border-transparent aria-invalid:focus-visible:text-foreground outline-none";
|
|
27
27
|
export declare const disabledState: "disabled:bg-disabled-background disabled:border-transparent disabled:text-disabled-foreground disabled:placeholder:text-disabled-foreground disabled:pointer-events-none disabled:cursor-not-allowed";
|
|
28
28
|
export declare const readOnlyState: "read-only:border-transparent read-only:text-muted-foreground read-only:cursor-default read-only:hover:border-transparent read-only:focus-visible:shadow-none read-only:focus-visible:border-transparent read-only:focus-visible:bg-muted-background [&:read-only:not(:placeholder-shown)]:text-muted-foreground";
|
|
29
|
+
/**
|
|
30
|
+
* Reusable styles for selection-control rows (radio group items, checkbox items, etc.).
|
|
31
|
+
* These provide the shared layout, card variant, label, and description classes
|
|
32
|
+
* without baking in a parent group name (ancestor `group-has-[...]/<name>` selectors
|
|
33
|
+
* must stay inline in each consumer so they reference that component's own `group/<name>`).
|
|
34
|
+
*/
|
|
35
|
+
export declare const selectionItemBase: "grid max-w-150 cursor-pointer grid-cols-[auto_1fr] items-start gap-x-2 gap-y-1 has-[[data-disabled]]:cursor-not-allowed";
|
|
36
|
+
export declare const selectionItemDefault: "min-h-9 py-2";
|
|
37
|
+
export declare const selectionItemCard: string;
|
|
38
|
+
export declare const selectionItemLabel: "col-start-2 text-sm font-medium leading-4.5 tracking-normal text-secondary-foreground dark:text-secondary-foreground";
|
|
39
|
+
export declare const selectionItemDescription: "col-start-2 text-xs font-normal leading-3.5 tracking-tightest text-muted-foreground";
|
|
29
40
|
export declare function slugToPascalCase(slug: string): string;
|
|
30
41
|
/**
|
|
31
42
|
* Safely extracts hostname from a URL string.
|
package/dist/lib/utils.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { clsx as u } from "clsx";
|
|
2
2
|
import { codeToHtml as i } from "shiki";
|
|
3
|
-
import { twMerge as
|
|
3
|
+
import { twMerge as b } from "tailwind-merge";
|
|
4
4
|
import d from "./style-scope.js";
|
|
5
5
|
let s = null, l = !1;
|
|
6
|
-
function
|
|
7
|
-
return
|
|
6
|
+
function f(...e) {
|
|
7
|
+
return b(u(e));
|
|
8
8
|
}
|
|
9
|
-
const w = typeof window < "u" && window.__STORYBOOK_TEST__ === !0,
|
|
9
|
+
const w = typeof window < "u" && window.__STORYBOOK_TEST__ === !0, g = {
|
|
10
10
|
name: "strip-pre-styles",
|
|
11
11
|
pre(e) {
|
|
12
12
|
e.properties.style = void 0;
|
|
@@ -32,37 +32,43 @@ const w = typeof window < "u" && window.__STORYBOOK_TEST__ === !0, b = {
|
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
async function x(e, t, r = !1) {
|
|
35
|
-
const
|
|
36
|
-
|
|
35
|
+
const o = [
|
|
36
|
+
g,
|
|
37
37
|
...r ? [p] : []
|
|
38
38
|
];
|
|
39
39
|
return await Promise.all([
|
|
40
40
|
i(e, {
|
|
41
41
|
lang: t,
|
|
42
42
|
theme: "one-light",
|
|
43
|
-
transformers:
|
|
43
|
+
transformers: o
|
|
44
44
|
}),
|
|
45
45
|
i(e, {
|
|
46
46
|
lang: t,
|
|
47
47
|
theme: "one-dark-pro",
|
|
48
|
-
transformers:
|
|
48
|
+
transformers: o
|
|
49
49
|
})
|
|
50
50
|
]);
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function k(e) {
|
|
53
53
|
const t = e.trim().split(/\s+/);
|
|
54
54
|
if (t.length === 0 || !t[0])
|
|
55
55
|
return "";
|
|
56
56
|
if (t.length === 1)
|
|
57
57
|
return t[0].slice(0, 2).toUpperCase();
|
|
58
|
-
const r = t[0].charAt(0).toUpperCase(),
|
|
59
|
-
return r +
|
|
58
|
+
const r = t[0].charAt(0).toUpperCase(), o = t[t.length - 1].charAt(0).toUpperCase();
|
|
59
|
+
return r + o;
|
|
60
60
|
}
|
|
61
|
-
const
|
|
62
|
-
|
|
61
|
+
const C = "focus-visible:shadow-focus-ring outline-none", S = "focus-visible:shadow-focus-ring-destructive outline-none", I = "border border-transparent rounded-lg bg-muted-background py-2 pl-2 pr-1 text-sm leading-5 tracking-tight text-muted-foreground placeholder:text-muted-foreground", P = "hover:bg-accent-background hover:border hover:border-border-emphasized", T = "[&:not(:placeholder-shown):not(:focus)]:bg-muted-background [&:not(:placeholder-shown)]:text-foreground", O = "focus-visible:shadow-focus-ring focus-visible:bg-background focus-visible:border-transparent focus-visible:text-foreground outline-none", N = "aria-invalid:border-destructive-foreground aria-invalid:shadow-focus-ring-destructive aria-invalid:border-transparent aria-invalid:text-foreground aria-invalid:focus-visible:shadow-focus-ring aria-invalid:focus-visible:bg-background aria-invalid:focus-visible:border-transparent aria-invalid:focus-visible:text-foreground outline-none", U = "disabled:bg-disabled-background disabled:border-transparent disabled:text-disabled-foreground disabled:placeholder:text-disabled-foreground disabled:pointer-events-none disabled:cursor-not-allowed", _ = "read-only:border-transparent read-only:text-muted-foreground read-only:cursor-default read-only:hover:border-transparent read-only:focus-visible:shadow-none read-only:focus-visible:border-transparent read-only:focus-visible:bg-muted-background [&:read-only:not(:placeholder-shown)]:text-muted-foreground", B = "grid max-w-150 cursor-pointer grid-cols-[auto_1fr] items-start gap-x-2 gap-y-1 has-[[data-disabled]]:cursor-not-allowed", E = "min-h-9 py-2", z = f(
|
|
62
|
+
"w-64 rounded-md border border-transparent p-3 bg-card-background",
|
|
63
|
+
"has-[[data-checked]]:bg-active-muted-background",
|
|
64
|
+
"hover:border-border-emphasized hover:bg-accent-background",
|
|
65
|
+
"has-[[data-disabled]]:border-border has-[[data-disabled]]:bg-transparent",
|
|
66
|
+
"has-[[data-disabled]]:hover:border-border has-[[data-disabled]]:hover:bg-transparent"
|
|
67
|
+
), A = "col-start-2 text-sm font-medium leading-4.5 tracking-normal text-secondary-foreground dark:text-secondary-foreground", R = "col-start-2 text-xs font-normal leading-3.5 tracking-tightest text-muted-foreground";
|
|
68
|
+
function j(e) {
|
|
63
69
|
return e.split("-").map((t) => t.charAt(0).toUpperCase() + t.slice(1)).join("");
|
|
64
70
|
}
|
|
65
|
-
function
|
|
71
|
+
function D(e) {
|
|
66
72
|
if (!e) return "unknown";
|
|
67
73
|
try {
|
|
68
74
|
return new URL(e).hostname;
|
|
@@ -70,9 +76,9 @@ function A(e) {
|
|
|
70
76
|
return e;
|
|
71
77
|
}
|
|
72
78
|
}
|
|
73
|
-
const
|
|
74
|
-
const t = !!(e && Object.keys(e).length > 0), r = e?.id ?? d.portalContainer,
|
|
75
|
-
a.id = r, a.className =
|
|
79
|
+
const H = (e) => {
|
|
80
|
+
const t = !!(e && Object.keys(e).length > 0), r = e?.id ?? d.portalContainer, o = e?.className ?? d.styleScope, c = (a) => {
|
|
81
|
+
a.id = r, a.className = o, a.style.position = e?.style?.position ?? "fixed", a.style.zIndex = e?.style?.zIndex ?? "1000", e?.style && Object.assign(a.style, e.style);
|
|
76
82
|
};
|
|
77
83
|
if (s)
|
|
78
84
|
return t && console.warn(
|
|
@@ -83,24 +89,29 @@ const B = (e) => {
|
|
|
83
89
|
t && !l && (console.warn(
|
|
84
90
|
"Custom portal container props can lead to unintended behavior. Use with caution."
|
|
85
91
|
), l = !0);
|
|
86
|
-
let
|
|
87
|
-
return
|
|
92
|
+
let n = document?.getElementById(r);
|
|
93
|
+
return n || (n = document.createElement("div"), document.body.appendChild(n)), c(n), s = n, n;
|
|
88
94
|
};
|
|
89
95
|
export {
|
|
90
|
-
|
|
96
|
+
f as cn,
|
|
91
97
|
U as disabledState,
|
|
92
|
-
|
|
93
|
-
|
|
98
|
+
T as filledState,
|
|
99
|
+
C as focusRing,
|
|
94
100
|
S as focusRingDestructive,
|
|
95
101
|
O as focusState,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
102
|
+
I as formElementBase,
|
|
103
|
+
D as getHostname,
|
|
104
|
+
k as getInitials,
|
|
105
|
+
H as getPortalContainer,
|
|
100
106
|
x as highlightCode,
|
|
101
|
-
|
|
107
|
+
P as hoverState,
|
|
102
108
|
N as invalidState,
|
|
103
109
|
w as isStorybookTestEnv,
|
|
104
|
-
|
|
105
|
-
|
|
110
|
+
_ as readOnlyState,
|
|
111
|
+
B as selectionItemBase,
|
|
112
|
+
z as selectionItemCard,
|
|
113
|
+
E as selectionItemDefault,
|
|
114
|
+
R as selectionItemDescription,
|
|
115
|
+
A as selectionItemLabel,
|
|
116
|
+
j as slugToPascalCase
|
|
106
117
|
};
|