@cognite/aura 0.2.0 → 0.3.1
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 +869 -870
- package/README.md +143 -9
- package/dist/colors.css +30 -0
- package/dist/components/index.d.ts +7 -36
- package/dist/components/index.js +319 -350
- package/dist/components/ui/core/accordion/accordion.d.ts +7 -7
- package/dist/components/ui/core/accordion/accordion.js +49 -47
- 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/badge/badge.d.ts +11 -8
- package/dist/components/ui/core/banner/banner.d.ts +18 -28
- package/dist/components/ui/core/breadcrumb/breadcrumb.d.ts +10 -9
- package/dist/components/ui/core/breadcrumb/breadcrumb.js +98 -88
- 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 +17 -16
- 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 +13 -9
- package/dist/components/ui/core/checkbox/checkbox.js +32 -28
- package/dist/components/ui/core/code-block/code-block.d.ts +6 -9
- package/dist/components/ui/core/code-block/code-block.js +48 -44
- 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 +7 -6
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.d.ts +15 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +84 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/index.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/types.d.ts +18 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +63 -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 +8 -0
- package/dist/components/ui/core/date-time-pickers/index.js +8 -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-single-date-state.d.ts +23 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +32 -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 +23 -22
- package/dist/components/ui/core/inline-citation/inline-citation.d.ts +10 -10
- package/dist/components/ui/core/inline-citation/inline-citation.js +57 -49
- package/dist/components/ui/core/input/input.d.ts +2 -1
- package/dist/components/ui/core/input/input.js +1 -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 +3 -2
- package/dist/components/ui/core/label/label.d.ts +3 -2
- package/dist/components/ui/core/loader/loader.d.ts +2 -2
- package/dist/components/ui/core/message/message.d.ts +18 -17
- package/dist/components/ui/core/message/message.js +387 -99
- 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 +337 -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 +180 -167
- package/dist/components/ui/core/radio-group/radio-group.d.ts +12 -8
- package/dist/components/ui/core/radio-group/radio-group.js +56 -53
- package/dist/components/ui/core/reasoning/reasoning.d.ts +5 -5
- 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 +15 -11
- package/dist/components/ui/core/segmented-control/segmented-control.js +4 -1
- package/dist/components/ui/core/select/select.d.ts +15 -14
- package/dist/components/ui/core/select/select.js +135 -108
- 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 +5 -5
- package/dist/components/ui/core/shimmer/shimmer.js +91 -52
- package/dist/components/ui/core/skeleton/skeleton.d.ts +2 -1
- package/dist/components/ui/core/sonner-toast/sonner-toast.d.ts +2 -1
- 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 +21 -17
- package/dist/components/ui/core/tabs/tabs.js +11 -9
- 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/toggle/toggle.d.ts +15 -0
- package/dist/components/ui/core/toggle/toggle.js +74 -0
- package/dist/components/ui/core/tool/tool.d.ts +7 -6
- package/dist/components/ui/core/tool/tool.js +47 -43
- 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 +11 -13
- package/dist/eslint/index.d.ts +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/lib/portal-container-context.d.ts +2 -1
- package/dist/lib/portal-container-context.js +3 -5
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/utils.js +7 -7
- package/dist/styles.css +1 -1
- package/dist/styles.source.css +12 -1
- package/package.json +217 -14
- 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.d.ts +0 -2
- 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/breadcrumb/breadcrumb.metadata.d.ts +0 -2
- package/dist/components/ui/core/breadcrumb/breadcrumb.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/kbd/kbd.metadata.d.ts +0 -2
- package/dist/components/ui/core/kbd/kbd.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/radio-group/radio-group.metadata.d.ts +0 -2
- package/dist/components/ui/core/radio-group/radio-group.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/sonner-toast/sonner-toast.metadata.d.ts +0 -2
- package/dist/components/ui/core/sonner-toast/sonner-toast.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/index.js +0 -342
|
@@ -1,105 +1,111 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { IconX as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { useControllableState as
|
|
1
|
+
import { jsx as a, jsxs as N } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as k, forwardRef as l, useMemo as C, useContext as g } from "react";
|
|
3
|
+
import { IconX as S, IconInfoCircleFilled as I, IconAlertCircleFilled as V, IconAlertTriangleFilled as z } from "@tabler/icons-react";
|
|
4
|
+
import { cva as v } from "class-variance-authority";
|
|
5
|
+
import { useControllableState as _ } from "../../../../lib/use-controllable-state.js";
|
|
6
6
|
import { cn as s } from "../../../../lib/utils.js";
|
|
7
|
-
import { Button as
|
|
8
|
-
const i =
|
|
7
|
+
import { Button as b } from "../button/button.js";
|
|
8
|
+
const i = k({
|
|
9
9
|
show: !0,
|
|
10
10
|
setShow: () => {
|
|
11
11
|
},
|
|
12
|
-
variant: "default"
|
|
13
|
-
|
|
12
|
+
variant: "default",
|
|
13
|
+
alertStyle: "card"
|
|
14
|
+
}), B = v(
|
|
14
15
|
[
|
|
15
16
|
"[&_svg]:shrink-0",
|
|
16
|
-
"[&_svg:not([class*='size-']):not([class*='w-'])]:w-
|
|
17
|
-
"[&_svg:not([class*='size-']):not([class*='h-'])]:h-
|
|
18
|
-
"[&_svg:not([class*='mt-'])]:mt-0.5"
|
|
17
|
+
"[&_svg:not([class*='size-']):not([class*='w-'])]:w-4",
|
|
18
|
+
"[&_svg:not([class*='size-']):not([class*='h-'])]:h-4"
|
|
19
19
|
].join(" ")
|
|
20
|
-
), D =
|
|
20
|
+
), D = v(
|
|
21
21
|
"relative w-full rounded-md pt-2.5 pr-3 has-[>button[data-slot=alert-close]]:pr-12 pb-2 pl-3 text-sm grid has-[>[data-slot=alert-icon]]:grid-cols-[auto_1fr] grid-cols-[0_1fr] has-[>[data-slot=alert-icon]]:gap-x-2 has-[>[data-slot=alert-icon]]:gap-y-1 items-start",
|
|
22
22
|
{
|
|
23
23
|
variants: {
|
|
24
24
|
variant: {
|
|
25
|
-
default: "bg-neutral-muted-background text-foreground [&>[data-slot=alert-icon]]:text-
|
|
26
|
-
|
|
25
|
+
default: "bg-neutral-muted-background text-foreground [&>[data-slot=alert-icon]]:text-muted-foreground",
|
|
26
|
+
info: "bg-info-muted-background text-foreground [&>[data-slot=alert-icon]]:text-info-foreground",
|
|
27
27
|
warning: "bg-warning-muted-background [&>[data-slot=alert-icon]]:text-warning-foreground",
|
|
28
28
|
error: "bg-destructive-muted-background text-foreground [&>[data-slot=alert-icon]]:text-destructive-foreground"
|
|
29
|
+
},
|
|
30
|
+
alertStyle: {
|
|
31
|
+
card: "pt-3 pr-5 pb-3 pl-3 [&>[data-slot=alert-title]+[data-slot=alert-description]]:mt-2 [&>[data-slot=alert-icon]]:mt-0.5",
|
|
32
|
+
strip: "flex min-h-11 items-center gap-2 py-2 pr-3 pl-3 [&>[data-slot=alert-title]]:hidden"
|
|
29
33
|
}
|
|
30
34
|
},
|
|
31
35
|
defaultVariants: {
|
|
32
|
-
variant: "default"
|
|
36
|
+
variant: "default",
|
|
37
|
+
alertStyle: "card"
|
|
33
38
|
}
|
|
34
39
|
}
|
|
35
40
|
);
|
|
36
|
-
function
|
|
41
|
+
function T(r) {
|
|
37
42
|
const t = { "aria-hidden": !0 };
|
|
38
43
|
switch (r) {
|
|
39
44
|
case "warning":
|
|
40
|
-
return /* @__PURE__ */
|
|
45
|
+
return /* @__PURE__ */ a(z, { ...t });
|
|
41
46
|
case "error":
|
|
42
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ a(V, { ...t });
|
|
43
48
|
default:
|
|
44
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ a(I, { ...t });
|
|
45
50
|
}
|
|
46
51
|
}
|
|
47
|
-
const
|
|
52
|
+
const j = l(
|
|
48
53
|
({
|
|
49
54
|
className: r,
|
|
50
55
|
variant: t = "default",
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
alertStyle: e = "card",
|
|
57
|
+
visible: o,
|
|
58
|
+
defaultVisible: n = !0,
|
|
59
|
+
onClose: d,
|
|
54
60
|
icon: c,
|
|
55
|
-
children:
|
|
56
|
-
...
|
|
57
|
-
},
|
|
58
|
-
const [
|
|
59
|
-
defaultProp:
|
|
60
|
-
prop:
|
|
61
|
-
onChange:
|
|
62
|
-
}),
|
|
63
|
-
|
|
64
|
-
[f, m, d]
|
|
65
|
-
);
|
|
66
|
-
if (!f)
|
|
61
|
+
children: f,
|
|
62
|
+
...m
|
|
63
|
+
}, w) => {
|
|
64
|
+
const [p, x] = _({
|
|
65
|
+
defaultProp: n,
|
|
66
|
+
prop: o,
|
|
67
|
+
onChange: d
|
|
68
|
+
}), u = t === "secondary" ? "info" : t ?? "default", A = C(() => ({ show: p, setShow: x, variant: u, alertStyle: e }), [p, x, u, e]);
|
|
69
|
+
if (!p)
|
|
67
70
|
return null;
|
|
68
|
-
const
|
|
69
|
-
return /* @__PURE__ */
|
|
71
|
+
const h = c !== void 0 ? c : T(u);
|
|
72
|
+
return /* @__PURE__ */ a(i.Provider, { value: A, children: /* @__PURE__ */ N(
|
|
70
73
|
"div",
|
|
71
74
|
{
|
|
72
|
-
ref:
|
|
75
|
+
ref: w,
|
|
73
76
|
"data-slot": "alert",
|
|
74
77
|
role: "alert",
|
|
75
|
-
className: s(
|
|
76
|
-
|
|
78
|
+
className: s(
|
|
79
|
+
D({ variant: u, alertStyle: e }),
|
|
80
|
+
r
|
|
81
|
+
),
|
|
82
|
+
...m,
|
|
77
83
|
children: [
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
84
|
+
h && /* @__PURE__ */ a("span", { "data-slot": "alert-icon", className: B(), children: h }),
|
|
85
|
+
f,
|
|
86
|
+
d && /* @__PURE__ */ a(y, {})
|
|
81
87
|
]
|
|
82
88
|
}
|
|
83
89
|
) });
|
|
84
90
|
}
|
|
85
91
|
);
|
|
86
|
-
|
|
87
|
-
const
|
|
88
|
-
default: "text-
|
|
89
|
-
|
|
90
|
-
warning: "text-
|
|
91
|
-
error: "text-
|
|
92
|
-
}, P =
|
|
93
|
-
({ className: r, ...t },
|
|
94
|
-
const { variant: o } =
|
|
95
|
-
return /* @__PURE__ */
|
|
92
|
+
j.displayName = "Alert";
|
|
93
|
+
const F = {
|
|
94
|
+
default: "text-foreground",
|
|
95
|
+
info: "text-foreground",
|
|
96
|
+
warning: "text-foreground",
|
|
97
|
+
error: "text-foreground"
|
|
98
|
+
}, P = l(
|
|
99
|
+
({ className: r, ...t }, e) => {
|
|
100
|
+
const { variant: o, alertStyle: n } = g(i);
|
|
101
|
+
return /* @__PURE__ */ a(
|
|
96
102
|
"div",
|
|
97
103
|
{
|
|
98
|
-
ref:
|
|
104
|
+
ref: e,
|
|
99
105
|
"data-slot": "alert-title",
|
|
100
106
|
className: s(
|
|
101
|
-
"col-start-2 text-base font-medium leading-5 tracking-
|
|
102
|
-
|
|
107
|
+
n === "strip" ? "text-sm font-medium leading-[18px] tracking-normal" : "col-start-2 text-base font-medium leading-5 tracking-tighter",
|
|
108
|
+
F[o],
|
|
103
109
|
r
|
|
104
110
|
),
|
|
105
111
|
...t
|
|
@@ -108,22 +114,22 @@ const B = {
|
|
|
108
114
|
}
|
|
109
115
|
);
|
|
110
116
|
P.displayName = "AlertTitle";
|
|
111
|
-
const
|
|
112
|
-
default: "text-foreground",
|
|
113
|
-
|
|
114
|
-
warning: "text-foreground",
|
|
115
|
-
error: "text-foreground"
|
|
116
|
-
}, M =
|
|
117
|
-
({ className: r, ...t },
|
|
118
|
-
const { variant: o } =
|
|
119
|
-
return /* @__PURE__ */
|
|
117
|
+
const L = {
|
|
118
|
+
default: "text-secondary-foreground",
|
|
119
|
+
info: "text-secondary-foreground",
|
|
120
|
+
warning: "text-secondary-foreground",
|
|
121
|
+
error: "text-secondary-foreground"
|
|
122
|
+
}, M = l(
|
|
123
|
+
({ className: r, ...t }, e) => {
|
|
124
|
+
const { variant: o, alertStyle: n } = g(i);
|
|
125
|
+
return /* @__PURE__ */ a(
|
|
120
126
|
"div",
|
|
121
127
|
{
|
|
122
|
-
ref:
|
|
128
|
+
ref: e,
|
|
123
129
|
"data-slot": "alert-description",
|
|
124
130
|
className: s(
|
|
125
|
-
"
|
|
126
|
-
|
|
131
|
+
n === "strip" ? "flex-1 min-w-0 pr-4 text-sm font-normal leading-[18px] tracking-tight" : "col-start-2 text-sm font-normal leading-[18px] tracking-tight",
|
|
132
|
+
L[o],
|
|
127
133
|
r
|
|
128
134
|
),
|
|
129
135
|
...t
|
|
@@ -132,73 +138,70 @@ const H = {
|
|
|
132
138
|
}
|
|
133
139
|
);
|
|
134
140
|
M.displayName = "AlertDescription";
|
|
135
|
-
const R =
|
|
136
|
-
({ className: r, ...t },
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
"
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
141
|
+
const R = l(
|
|
142
|
+
({ className: r, ...t }, e) => {
|
|
143
|
+
const { alertStyle: o } = g(i);
|
|
144
|
+
return /* @__PURE__ */ a(
|
|
145
|
+
"div",
|
|
146
|
+
{
|
|
147
|
+
ref: e,
|
|
148
|
+
"data-slot": "alert-actions",
|
|
149
|
+
className: s(
|
|
150
|
+
o === "strip" ? "ml-auto flex shrink-0 items-center gap-3" : "col-start-2 flex flex-wrap items-center gap-3 pt-2",
|
|
151
|
+
r
|
|
152
|
+
),
|
|
153
|
+
...t
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
}
|
|
148
157
|
);
|
|
149
158
|
R.displayName = "AlertActions";
|
|
150
|
-
const X =
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
X.displayName = "AlertButton";
|
|
170
|
-
const b = n(
|
|
171
|
-
({ className: r, onClick: t, ...a }, o) => {
|
|
172
|
-
const { setShow: l } = u(i), c = (g) => {
|
|
173
|
-
l(!1), t?.(g);
|
|
159
|
+
const X = {
|
|
160
|
+
default: "gap-2 rounded-md",
|
|
161
|
+
ghost: "h-auto p-0 hover:bg-transparent"
|
|
162
|
+
}, q = l(({ className: r, variant: t = "default", ...e }, o) => /* @__PURE__ */ a(
|
|
163
|
+
b,
|
|
164
|
+
{
|
|
165
|
+
ref: o,
|
|
166
|
+
"data-slot": "alert-button",
|
|
167
|
+
variant: t === "ghost" ? "ghost" : void 0,
|
|
168
|
+
size: "sm",
|
|
169
|
+
className: s(X[t], r),
|
|
170
|
+
...e
|
|
171
|
+
}
|
|
172
|
+
));
|
|
173
|
+
q.displayName = "AlertButton";
|
|
174
|
+
const y = l(
|
|
175
|
+
({ className: r, onClick: t, ...e }, o) => {
|
|
176
|
+
const { setShow: n, alertStyle: d } = g(i), c = e["aria-label"] ?? "Close alert", f = (m) => {
|
|
177
|
+
n(!1), t?.(m);
|
|
174
178
|
};
|
|
175
|
-
return /* @__PURE__ */
|
|
176
|
-
|
|
179
|
+
return /* @__PURE__ */ a(
|
|
180
|
+
b,
|
|
177
181
|
{
|
|
178
182
|
ref: o,
|
|
179
183
|
"data-slot": "alert-close",
|
|
180
184
|
variant: "ghost",
|
|
181
|
-
size: "
|
|
185
|
+
size: "sm",
|
|
182
186
|
className: s(
|
|
183
|
-
"
|
|
187
|
+
"shrink-0 size-7 rounded-md p-0 text-secondary-foreground hover:bg-transparent hover:text-foreground",
|
|
188
|
+
d === "card" && "absolute right-2 top-2",
|
|
184
189
|
r
|
|
185
190
|
),
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
/* @__PURE__ */ e("span", { className: "sr-only", children: "Close" })
|
|
191
|
-
]
|
|
191
|
+
"aria-label": c,
|
|
192
|
+
onClick: f,
|
|
193
|
+
...e,
|
|
194
|
+
children: /* @__PURE__ */ a(S, { "aria-hidden": "true", className: "size-4" })
|
|
192
195
|
}
|
|
193
196
|
);
|
|
194
197
|
}
|
|
195
198
|
);
|
|
196
|
-
|
|
199
|
+
y.displayName = "AlertClose";
|
|
197
200
|
export {
|
|
198
|
-
|
|
201
|
+
j as Alert,
|
|
199
202
|
R as AlertActions,
|
|
200
|
-
|
|
201
|
-
|
|
203
|
+
q as AlertButton,
|
|
204
|
+
y as AlertClose,
|
|
202
205
|
M as AlertDescription,
|
|
203
206
|
P as AlertTitle
|
|
204
207
|
};
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from 'react';
|
|
2
|
+
import { AvatarFallbackProps, AvatarImageProps, AvatarRootProps } from '@base-ui/react/avatar';
|
|
2
3
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
declare const
|
|
9
|
-
declare const
|
|
4
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
5
|
+
interface AvatarVariantProps {
|
|
6
|
+
variant?: 'default' | 'nordic' | 'aurora' | 'fjord' | 'dusk' | 'orange' | 'sky' | 'overflow' | null;
|
|
7
|
+
sizes?: 'default' | 'xsm' | 'xxsm' | null;
|
|
8
|
+
}
|
|
9
|
+
declare const avatarVariants: (props?: (AvatarVariantProps & ClassProp) | undefined) => string;
|
|
10
|
+
declare const Avatar: ForwardRefExoticComponent<Omit<AvatarRootProps & VariantProps<typeof avatarVariants>, 'ref'> & RefAttributes<HTMLSpanElement>>;
|
|
11
|
+
declare const AvatarImage: ForwardRefExoticComponent<Omit<AvatarImageProps, 'ref'> & RefAttributes<HTMLImageElement>>;
|
|
12
|
+
declare const AvatarFallback: ForwardRefExoticComponent<Omit<AvatarFallbackProps, 'ref'> & RefAttributes<HTMLSpanElement>>;
|
|
13
|
+
declare const AvatarIcon: ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & RefAttributes<HTMLSpanElement>>;
|
|
10
14
|
export { Avatar, AvatarImage, AvatarFallback, AvatarIcon };
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
1
2
|
import { useRender } from '@base-ui/react/use-render';
|
|
2
3
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
5
|
+
interface BadgeVariantProps {
|
|
6
|
+
variant?: 'default' | 'fjord' | 'nordic' | 'aurora' | 'sky' | 'dusk' | 'orange' | 'gray' | 'mountain' | 'secondary' | 'error' | 'warning' | 'success' | 'inProgress' | 'archived' | 'closable' | null;
|
|
7
|
+
size?: 'default' | 'icon' | null;
|
|
8
|
+
outline?: boolean | null;
|
|
9
|
+
background?: boolean | null;
|
|
10
|
+
dot?: boolean | null;
|
|
11
|
+
}
|
|
12
|
+
declare const badgeVariants: (props?: (BadgeVariantProps & ClassProp) | undefined) => string;
|
|
10
13
|
type BadgeProps = useRender.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
11
14
|
urgent?: boolean;
|
|
12
15
|
};
|
|
13
|
-
declare const Badge:
|
|
16
|
+
declare const Badge: ForwardRefExoticComponent<Omit<BadgeProps, 'ref'> & RefAttributes<HTMLSpanElement>>;
|
|
14
17
|
export { Badge, badgeVariants };
|
|
@@ -1,40 +1,30 @@
|
|
|
1
|
-
import { ComponentProps, ComponentType, HTMLAttributes } from 'react';
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, ComponentProps, ComponentType, HTMLAttributes } from 'react';
|
|
2
2
|
import { IconProps } from '@tabler/icons-react';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
5
|
+
import { Badge } from '../badge/badge';
|
|
4
6
|
import { Button } from '../button/button';
|
|
5
|
-
|
|
6
|
-
variant?:
|
|
7
|
-
inset?: boolean | null
|
|
8
|
-
}
|
|
7
|
+
interface BannerVariantProps {
|
|
8
|
+
variant?: 'default' | 'info' | 'destructive' | 'warning' | null;
|
|
9
|
+
inset?: boolean | null;
|
|
10
|
+
}
|
|
11
|
+
declare const bannerVariants: (props?: (BannerVariantProps & ClassProp) | undefined) => string;
|
|
12
|
+
type BannerProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof bannerVariants> & {
|
|
9
13
|
visible?: boolean;
|
|
10
14
|
defaultVisible?: boolean;
|
|
11
15
|
onClose?: () => void;
|
|
12
|
-
}
|
|
16
|
+
};
|
|
17
|
+
declare const Banner: ForwardRefExoticComponent<Omit<BannerProps, 'ref'> & RefAttributes<HTMLDivElement>>;
|
|
13
18
|
type TablerIconComponent = ComponentType<IconProps>;
|
|
14
|
-
declare const BannerIcon:
|
|
19
|
+
declare const BannerIcon: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
15
20
|
icon: TablerIconComponent;
|
|
16
|
-
} &
|
|
21
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
17
22
|
type BannerTitleProps = HTMLAttributes<HTMLParagraphElement>;
|
|
18
|
-
declare const BannerTitle:
|
|
19
|
-
declare const BannerStatus:
|
|
20
|
-
ref?: ((instance: HTMLSpanElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLSpanElement> | null | undefined;
|
|
21
|
-
} & {
|
|
22
|
-
render?: import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>> | import('@base-ui/react').ComponentRenderFn<import('@base-ui/react').HTMLProps, {}> | undefined;
|
|
23
|
-
} & VariantProps<(props?: ({
|
|
24
|
-
variant?: "default" | "secondary" | "gray" | "orange" | "nordic" | "aurora" | "fjord" | "dusk" | "sky" | "warning" | "mountain" | "error" | "success" | "inProgress" | "archived" | "closable" | null | undefined;
|
|
25
|
-
size?: "default" | "icon" | null | undefined;
|
|
26
|
-
outline?: boolean | null | undefined;
|
|
27
|
-
background?: boolean | null | undefined;
|
|
28
|
-
dot?: boolean | null | undefined;
|
|
29
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & {
|
|
30
|
-
urgent?: boolean;
|
|
31
|
-
}, "ref"> & import('react').RefAttributes<HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
23
|
+
declare const BannerTitle: ForwardRefExoticComponent<BannerTitleProps & RefAttributes<HTMLParagraphElement>>;
|
|
24
|
+
declare const BannerStatus: ForwardRefExoticComponent<Omit<ComponentProps<typeof Badge>, 'ref'> & RefAttributes<HTMLSpanElement>>;
|
|
32
25
|
type BannerActionsProps = HTMLAttributes<HTMLDivElement>;
|
|
33
|
-
declare const BannerActions:
|
|
34
|
-
declare const BannerAction:
|
|
35
|
-
variant?: "default" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
36
|
-
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
37
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string>, "ref"> & import('react').RefAttributes<HTMLElement>, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
26
|
+
declare const BannerActions: ForwardRefExoticComponent<BannerActionsProps & RefAttributes<HTMLDivElement>>;
|
|
27
|
+
declare const BannerAction: ForwardRefExoticComponent<Omit<ComponentProps<typeof Button>, 'ref'> & RefAttributes<HTMLElement>>;
|
|
38
28
|
type BannerCloseProps = Omit<ComponentProps<typeof Button>, 'size'>;
|
|
39
|
-
declare const BannerClose:
|
|
29
|
+
declare const BannerClose: ForwardRefExoticComponent<Omit<BannerCloseProps, 'ref'> & RefAttributes<HTMLElement>>;
|
|
40
30
|
export { Banner, BannerIcon, BannerTitle, BannerStatus, BannerActions, BannerAction, BannerClose, };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, ComponentProps } from 'react';
|
|
1
2
|
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
-
declare const Breadcrumb:
|
|
3
|
-
declare const BreadcrumbList:
|
|
4
|
-
declare const BreadcrumbItem:
|
|
5
|
-
declare const BreadcrumbLink:
|
|
6
|
-
declare const BreadcrumbPage:
|
|
7
|
-
declare const BreadcrumbPageButton:
|
|
8
|
-
declare const BreadcrumbEllipsisButton:
|
|
9
|
-
declare const BreadcrumbSeparator:
|
|
10
|
-
declare const BreadcrumbEllipsis:
|
|
3
|
+
declare const Breadcrumb: ForwardRefExoticComponent<ComponentProps<'nav'> & RefAttributes<HTMLElement>>;
|
|
4
|
+
declare const BreadcrumbList: ForwardRefExoticComponent<ComponentProps<'ol'> & RefAttributes<HTMLOListElement>>;
|
|
5
|
+
declare const BreadcrumbItem: ForwardRefExoticComponent<ComponentProps<'li'> & RefAttributes<HTMLLIElement>>;
|
|
6
|
+
declare const BreadcrumbLink: ForwardRefExoticComponent<Omit<useRender.ComponentProps<'a'>, 'ref'> & RefAttributes<HTMLAnchorElement>>;
|
|
7
|
+
declare const BreadcrumbPage: ForwardRefExoticComponent<ComponentProps<'span'> & RefAttributes<HTMLSpanElement>>;
|
|
8
|
+
declare const BreadcrumbPageButton: ForwardRefExoticComponent<ComponentProps<'button'> & RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const BreadcrumbEllipsisButton: ForwardRefExoticComponent<ComponentProps<'button'> & RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
declare const BreadcrumbSeparator: ForwardRefExoticComponent<ComponentProps<'li'> & RefAttributes<HTMLLIElement>>;
|
|
11
|
+
declare const BreadcrumbEllipsis: ForwardRefExoticComponent<ComponentProps<'li'> & RefAttributes<HTMLLIElement>>;
|
|
11
12
|
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbPageButton, BreadcrumbEllipsisButton, BreadcrumbSeparator, BreadcrumbEllipsis, };
|