@vkzstudio/muza-ui 1.0.11 → 1.0.13
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/dist/components/Accordion/Accordion.d.ts +57 -4
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/Accordion.js +1 -4
- package/dist/components/Accordion/Accordion.stories.d.ts.map +1 -1
- package/dist/components/Alert/Alert.d.ts +13 -2
- package/dist/components/Alert/Alert.d.ts.map +1 -1
- package/dist/components/Alert/Alert.js +4 -4
- package/dist/components/Alert/Alert.stories.d.ts.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts +12 -1
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar/Avatar.stories.d.ts.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +23 -8
- package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +3 -12
- package/dist/components/Button/Button.d.ts +30 -0
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.stories.d.ts.map +1 -1
- package/dist/components/Calendar/Calendar.d.ts +39 -3
- package/dist/components/Calendar/Calendar.d.ts.map +1 -1
- package/dist/components/Calendar/Calendar.js +1 -1
- package/dist/components/Calendar/utils/formatDate.d.ts +4 -0
- package/dist/components/Calendar/utils/formatDate.d.ts.map +1 -1
- package/dist/components/Calendar/utils/formatDateRange.d.ts +5 -0
- package/dist/components/Calendar/utils/formatDateRange.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +25 -3
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/dist/components/Chip/Chip.d.ts +3 -6
- package/dist/components/Chip/Chip.d.ts.map +1 -1
- package/dist/components/Chip/Chip.js +6 -6
- package/dist/components/Chip/Chip.stories.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.d.ts +40 -1
- package/dist/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.js +1 -1
- package/dist/components/DataTable/DataTable.stories.d.ts.map +1 -1
- package/dist/components/DataTable/index.d.ts +1 -1
- package/dist/components/DataTable/index.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +59 -4
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +7 -7
- package/dist/components/DatePicker/DatePicker.stories.d.ts.map +1 -1
- package/dist/components/DatePicker/index.d.ts +1 -0
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/DatePicker/utils/getDateRange.d.ts +9 -0
- package/dist/components/DatePicker/utils/getDateRange.d.ts.map +1 -1
- package/dist/components/DatePicker/utils/getDateRange.js +28 -15
- package/dist/components/Dialog/Dialog.d.ts +39 -2
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.js +176 -60
- package/dist/components/Dialog/Dialog.stories.d.ts +2 -0
- package/dist/components/Dialog/Dialog.stories.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +73 -11
- package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +2 -8
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +10 -26
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
- package/dist/components/EdgeButton/EdgeButton.d.ts +18 -0
- package/dist/components/EdgeButton/EdgeButton.d.ts.map +1 -1
- package/dist/components/EdgeButton/EdgeButton.js +4 -4
- package/dist/components/EdgeButton/EdgeButton.stories.d.ts.map +1 -1
- package/dist/components/EdgeButton/index.d.ts +1 -1
- package/dist/components/EdgeButton/index.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.d.ts +10 -0
- package/dist/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.js +6 -6
- package/dist/components/EmptyState/EmptyState.stories.d.ts.map +1 -1
- package/dist/components/ExpandableTable/ExpandableTable.d.ts +54 -0
- package/dist/components/ExpandableTable/ExpandableTable.d.ts.map +1 -1
- package/dist/components/ExpandableTable/ExpandableTable.js +2 -2
- package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts +0 -3
- package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts.map +1 -1
- package/dist/components/ExpandableTable/Table.js +1 -1
- package/dist/components/ExpandableTable/index.d.ts +1 -1
- package/dist/components/ExpandableTable/index.d.ts.map +1 -1
- package/dist/components/FileUpload/FileItem.js +1 -1
- package/dist/components/FileUpload/FileUpload.d.ts +51 -0
- package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/components/FileUpload/FileUpload.stories.d.ts.map +1 -1
- package/dist/components/FileUpload/index.d.ts +1 -1
- package/dist/components/FileUpload/index.d.ts.map +1 -1
- package/dist/components/Flex/Flex.d.ts +49 -1
- package/dist/components/Flex/Flex.d.ts.map +1 -1
- package/dist/components/Flex/Flex.stories.d.ts.map +1 -1
- package/dist/components/Flex/index.d.ts +1 -1
- package/dist/components/Flex/index.d.ts.map +1 -1
- package/dist/components/Icons/CustomIcons.d.ts +166 -1
- package/dist/components/Icons/CustomIcons.d.ts.map +1 -1
- package/dist/components/Icons/CustomIcons.js +110 -97
- package/dist/components/InfoCard/InfoCard.d.ts +17 -0
- package/dist/components/InfoCard/InfoCard.d.ts.map +1 -0
- package/dist/components/InfoCard/index.d.ts +2 -0
- package/dist/components/InfoCard/index.d.ts.map +1 -0
- package/dist/components/Input/Input.d.ts +26 -0
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.stories.d.ts.map +1 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts +16 -0
- package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts.map +1 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.stories.d.ts.map +1 -1
- package/dist/components/Lightbox/Lightbox.d.ts +15 -2
- package/dist/components/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/components/Lightbox/Lightbox.js +22 -20
- package/dist/components/Loader/Loader.d.ts +3 -0
- package/dist/components/Loader/Loader.d.ts.map +1 -1
- package/dist/components/Loader/Loader.stories.d.ts.map +1 -1
- package/dist/components/LoginScreen/LoginScreen.d.ts +18 -0
- package/dist/components/LoginScreen/LoginScreen.d.ts.map +1 -1
- package/dist/components/LoginScreen/LoginScreen.stories.d.ts.map +1 -1
- package/dist/components/LoginScreen/LoginScreenItem.d.ts +5 -0
- package/dist/components/LoginScreen/LoginScreenItem.d.ts.map +1 -1
- package/dist/components/LoginScreen/index.d.ts +2 -2
- package/dist/components/LoginScreen/index.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +25 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +8 -8
- package/dist/components/MultiSelect/MultiSelect.stories.d.ts.map +1 -1
- package/dist/components/MuzaUIProvider/MuzaUIProvider.d.ts +26 -1
- package/dist/components/MuzaUIProvider/MuzaUIProvider.d.ts.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.d.ts +5 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.stories.d.ts.map +1 -1
- package/dist/components/PinIndicator/PinIndicator.d.ts +15 -0
- package/dist/components/PinIndicator/PinIndicator.d.ts.map +1 -1
- package/dist/components/PinIndicator/PinIndicator.stories.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts +36 -1
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Popover/Popover.stories.d.ts.map +1 -1
- package/dist/components/Radio/Radio.d.ts +28 -3
- package/dist/components/Radio/Radio.d.ts.map +1 -1
- package/dist/components/Radio/Radio.js +2 -5
- package/dist/components/Radio/Radio.stories.d.ts.map +1 -1
- package/dist/components/Reorderable/Reorderable.d.ts +79 -30
- package/dist/components/Reorderable/Reorderable.d.ts.map +1 -1
- package/dist/components/Reorderable/Reorderable.js +162 -143
- package/dist/components/Reorderable/Reorderable.stories.d.ts +1 -0
- package/dist/components/Reorderable/Reorderable.stories.d.ts.map +1 -1
- package/dist/components/Reorderable/index.d.ts +1 -1
- package/dist/components/Reorderable/index.d.ts.map +1 -1
- package/dist/components/ReorderableTable/ReorderableTable.d.ts +47 -13
- package/dist/components/ReorderableTable/ReorderableTable.d.ts.map +1 -1
- package/dist/components/ReorderableTable/ReorderableTable.js +44 -43
- package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts +1 -0
- package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts.map +1 -1
- package/dist/components/ReorderableTable/index.d.ts +1 -1
- package/dist/components/ReorderableTable/index.d.ts.map +1 -1
- package/dist/components/Searchbar/Searchbar.d.ts +11 -0
- package/dist/components/Searchbar/Searchbar.d.ts.map +1 -1
- package/dist/components/Searchbar/Searchbar.stories.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +35 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.stories.d.ts.map +1 -1
- package/dist/components/SegmentedControl/index.d.ts +1 -1
- package/dist/components/SegmentedControl/index.d.ts.map +1 -1
- package/dist/components/SegmentedIconControl/SegmentedIconControl.d.ts +38 -1
- package/dist/components/SegmentedIconControl/SegmentedIconControl.d.ts.map +1 -1
- package/dist/components/SegmentedIconControl/SegmentedIconControl.stories.d.ts.map +1 -1
- package/dist/components/SegmentedIconControl/index.d.ts +1 -1
- package/dist/components/SegmentedIconControl/index.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +25 -0
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +9 -6
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/Skeleton/Skeleton.stories.d.ts.map +1 -1
- package/dist/components/SliderIndicators/SliderIndicators.d.ts +9 -0
- package/dist/components/SliderIndicators/SliderIndicators.d.ts.map +1 -1
- package/dist/components/SliderIndicators/SliderIndicators.stories.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.d.ts +38 -0
- package/dist/components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.js +5 -5
- package/dist/components/Stepper/Stepper.stories.d.ts.map +1 -1
- package/dist/components/Stepper/index.d.ts +1 -1
- package/dist/components/Stepper/index.d.ts.map +1 -1
- package/dist/components/SwipeButton/SwipeButton.d.ts +39 -0
- package/dist/components/SwipeButton/SwipeButton.d.ts.map +1 -1
- package/dist/components/SwipeButton/SwipeButton.js +1 -1
- package/dist/components/SwipeButton/SwipeButton.stories.d.ts +0 -43
- package/dist/components/SwipeButton/SwipeButton.stories.d.ts.map +1 -1
- package/dist/components/SwipeButton/index.d.ts +1 -1
- package/dist/components/SwipeButton/index.d.ts.map +1 -1
- package/dist/components/Switch/Switch.d.ts +19 -0
- package/dist/components/Switch/Switch.d.ts.map +1 -1
- package/dist/components/Switch/Switch.stories.d.ts.map +1 -1
- package/dist/components/Tag/Tag.d.ts +17 -1
- package/dist/components/Tag/Tag.d.ts.map +1 -1
- package/dist/components/Tag/Tag.js +4 -4
- package/dist/components/Tag/Tag.stories.d.ts.map +1 -1
- package/dist/components/TextEditor/EditorToolbar.js +1 -1
- package/dist/components/TextEditor/LinkBubbleMenu.d.ts +4 -1
- package/dist/components/TextEditor/LinkBubbleMenu.d.ts.map +1 -1
- package/dist/components/TextEditor/LinkBubbleMenu.js +116 -92
- package/dist/components/TextEditor/TextEditor.d.ts +5 -2
- package/dist/components/TextEditor/TextEditor.d.ts.map +1 -1
- package/dist/components/TextEditor/TextEditor.js +129 -121
- package/dist/components/TextEditor/TextEditor.stories.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.d.ts +9 -2
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.stories.d.ts.map +1 -1
- package/dist/components/TimePicker/TimePicker.d.ts +23 -1
- package/dist/components/TimePicker/TimePicker.d.ts.map +1 -1
- package/dist/components/TimePicker/TimePicker.js +1 -4
- package/dist/components/TimePicker/TimePicker.stories.d.ts.map +1 -1
- package/dist/components/Toast/Toast.d.ts +21 -1
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/Toast/Toast.js +7 -7
- package/dist/components/Toast/Toast.stories.d.ts.map +1 -1
- package/dist/components/Toast/ToastContainer.d.ts +12 -1
- package/dist/components/Toast/ToastContainer.d.ts.map +1 -1
- package/dist/components/Toast/index.d.ts +1 -1
- package/dist/components/Toast/index.d.ts.map +1 -1
- package/dist/components/Toggle/Toggle.d.ts +17 -1
- package/dist/components/Toggle/Toggle.d.ts.map +1 -1
- package/dist/components/Toggle/Toggle.js +6 -6
- package/dist/components/Toggle/Toggle.stories.d.ts.map +1 -1
- package/dist/components/Toggle/index.d.ts +1 -1
- package/dist/components/Toggle/index.d.ts.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +52 -4
- package/dist/components/ToggleGroup/ToggleGroup.d.ts.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts.map +1 -1
- package/dist/components/ToggleGroup/index.d.ts +1 -1
- package/dist/components/ToggleGroup/index.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +38 -3
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +5 -7
- package/dist/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/dist/components/Typography/Typography.d.ts +18 -1
- package/dist/components/Typography/Typography.d.ts.map +1 -1
- package/dist/components/Typography/Typography.stories.d.ts.map +1 -1
- package/dist/components/Typography/index.d.ts +1 -1
- package/dist/components/Typography/index.d.ts.map +1 -1
- package/dist/index.js +191 -184
- package/dist/muza-ui.css +1 -1
- package/dist/styles/token-sizes.css +4 -0
- package/llms-full.md +581 -0
- package/llms.txt +36 -0
- package/package.json +4 -3
- package/CLAUDE_CONSUMER.md +0 -238
|
@@ -1,68 +1,184 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as a, jsxs as g, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as b, useState as O, useRef as E, Children as S, isValidElement as C, useCallback as j, cloneElement as B } from "react";
|
|
3
|
+
import * as o from "@radix-ui/react-dialog";
|
|
4
|
+
import { typographyVariants as P } from "../Typography/Typography.js";
|
|
5
|
+
import { useMuzaTranslations as T } from "../../translations/TranslationContext.js";
|
|
6
|
+
import { XClose as V } from "../Icons/CustomIcons.js";
|
|
7
|
+
import { cn as s } from "../../utils/cn.js";
|
|
8
|
+
const Q = o.Root, U = o.Title, Z = o.Description, A = ({
|
|
9
|
+
className: l,
|
|
10
|
+
ariaLabel: r
|
|
11
|
+
}) => /* @__PURE__ */ a(
|
|
12
|
+
o.Close,
|
|
9
13
|
{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
t
|
|
14
|
+
className: s(
|
|
15
|
+
"cursor-pointer transition-opacity focus-visible:focus-default disabled:pointer-events-none",
|
|
16
|
+
l
|
|
14
17
|
),
|
|
15
|
-
|
|
18
|
+
"aria-label": r,
|
|
19
|
+
children: /* @__PURE__ */ a(V, { className: "size-icon-medium" })
|
|
16
20
|
}
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
a
|
|
21
|
+
), I = b(
|
|
22
|
+
({
|
|
23
|
+
className: l,
|
|
24
|
+
icon: r,
|
|
25
|
+
children: i,
|
|
26
|
+
title: c,
|
|
27
|
+
hideCloseButton: n = !1,
|
|
28
|
+
closeAriaLabel: f,
|
|
29
|
+
...u
|
|
30
|
+
}, h) => {
|
|
31
|
+
const y = T(), x = f ?? y.dialog.closeAriaLabel;
|
|
32
|
+
return /* @__PURE__ */ a(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
ref: h,
|
|
36
|
+
className: s(
|
|
37
|
+
"-mx-comp-dialog-p -mt-comp-dialog-p border-b border-stroke-base-primary px-comp-dialog-p py-comp-dialog-p-hor",
|
|
38
|
+
l
|
|
39
|
+
),
|
|
40
|
+
...u,
|
|
41
|
+
children: /* @__PURE__ */ g("div", { className: "flex items-center gap-4xl", children: [
|
|
42
|
+
/* @__PURE__ */ g("div", { className: "flex min-w-0 flex-1 items-center gap-sm", children: [
|
|
43
|
+
r,
|
|
44
|
+
/* @__PURE__ */ a(
|
|
45
|
+
o.Title,
|
|
46
|
+
{
|
|
47
|
+
className: s(
|
|
48
|
+
"text-text-primary min-w-0 flex-1",
|
|
49
|
+
P({
|
|
50
|
+
variant: "title",
|
|
51
|
+
size: "md",
|
|
52
|
+
weight: "medium",
|
|
53
|
+
fixY: !0
|
|
54
|
+
})
|
|
55
|
+
),
|
|
56
|
+
children: c ?? i
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] }),
|
|
60
|
+
!n && /* @__PURE__ */ a(
|
|
61
|
+
A,
|
|
62
|
+
{
|
|
63
|
+
className: "shrink-0",
|
|
64
|
+
ariaLabel: x
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
] })
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
I.displayName = "DialogHeader";
|
|
73
|
+
const M = b(
|
|
74
|
+
({ className: l, children: r, _showBorder: i = !0, ...c }, n) => /* @__PURE__ */ a(
|
|
75
|
+
"div",
|
|
29
76
|
{
|
|
30
|
-
ref:
|
|
31
|
-
className:
|
|
32
|
-
"
|
|
33
|
-
{
|
|
34
|
-
|
|
35
|
-
"max-w-comp-dialog-w-md": o === "medium",
|
|
36
|
-
"max-w-comp-dialog-w-lg": o === "large"
|
|
37
|
-
},
|
|
38
|
-
t
|
|
77
|
+
ref: n,
|
|
78
|
+
className: s(
|
|
79
|
+
"-mx-comp-dialog-p -mb-comp-dialog-p flex items-center justify-end gap-sm px-comp-dialog-p py-comp-dialog-p-hor-sm",
|
|
80
|
+
{ "border-t border-stroke-base-primary": i },
|
|
81
|
+
l
|
|
39
82
|
),
|
|
40
|
-
...
|
|
41
|
-
children:
|
|
42
|
-
l,
|
|
43
|
-
/* @__PURE__ */ i(
|
|
44
|
-
a.Close,
|
|
45
|
-
{
|
|
46
|
-
className: "absolute top-4 right-4 cursor-pointer transition-opacity focus-visible:focus-default disabled:pointer-events-none",
|
|
47
|
-
"aria-label": s,
|
|
48
|
-
children: [
|
|
49
|
-
/* @__PURE__ */ e(f, { className: "size-icon-small" }),
|
|
50
|
-
/* @__PURE__ */ e("span", { className: "sr-only", children: s })
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
)
|
|
54
|
-
]
|
|
83
|
+
...c,
|
|
84
|
+
children: r
|
|
55
85
|
}
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
|
|
86
|
+
)
|
|
87
|
+
);
|
|
88
|
+
M.displayName = "DialogFooter";
|
|
89
|
+
const $ = o.Trigger, W = o.Portal, ee = o.Close, L = b(({ className: l, ...r }, i) => /* @__PURE__ */ a(
|
|
90
|
+
o.Overlay,
|
|
91
|
+
{
|
|
92
|
+
ref: i,
|
|
93
|
+
className: s(
|
|
94
|
+
"px- fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-surface-base-overlay px-layout-p-standard py-comp-dialog-p-hor-overlay data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
|
|
95
|
+
l
|
|
96
|
+
),
|
|
97
|
+
...r
|
|
98
|
+
}
|
|
99
|
+
));
|
|
100
|
+
L.displayName = o.Overlay.displayName;
|
|
101
|
+
const X = b(
|
|
102
|
+
({
|
|
103
|
+
className: l,
|
|
104
|
+
children: r,
|
|
105
|
+
size: i = "medium",
|
|
106
|
+
closeAriaLabel: c,
|
|
107
|
+
...n
|
|
108
|
+
}, f) => {
|
|
109
|
+
const u = T(), h = c ?? u.dialog.closeAriaLabel, [y, x] = O(!1), d = E(null), v = S.toArray(r), w = v.find(
|
|
110
|
+
(e) => {
|
|
111
|
+
var t;
|
|
112
|
+
return C(e) && ((t = e.type) == null ? void 0 : t.displayName) === "DialogHeader";
|
|
113
|
+
}
|
|
114
|
+
), m = v.find(
|
|
115
|
+
(e) => {
|
|
116
|
+
var t;
|
|
117
|
+
return C(e) && ((t = e.type) == null ? void 0 : t.displayName) === "DialogFooter";
|
|
118
|
+
}
|
|
119
|
+
), z = v.filter(
|
|
120
|
+
(e) => e !== w && e !== m
|
|
121
|
+
), D = !!w, p = !!m, H = j((e) => {
|
|
122
|
+
if (d.current && (d.current.disconnect(), d.current = null), !e) return;
|
|
123
|
+
const t = () => {
|
|
124
|
+
const F = e.scrollHeight > e.clientHeight;
|
|
125
|
+
x(F);
|
|
126
|
+
};
|
|
127
|
+
t(), setTimeout(t, 100), setTimeout(t, 250), setTimeout(t, 500);
|
|
128
|
+
const N = new ResizeObserver(t);
|
|
129
|
+
N.observe(e), e.firstElementChild && N.observe(e.firstElementChild), d.current = N;
|
|
130
|
+
}, []), R = p && C(m) ? B(m, { _showBorder: y }) : m;
|
|
131
|
+
return /* @__PURE__ */ a(W, { children: /* @__PURE__ */ a(L, { children: /* @__PURE__ */ a(
|
|
132
|
+
o.Content,
|
|
133
|
+
{
|
|
134
|
+
ref: f,
|
|
135
|
+
className: s(
|
|
136
|
+
"relative flex w-full flex-col rounded-2xl bg-surface-base-secondary p-comp-dialog-p duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
137
|
+
{
|
|
138
|
+
"max-w-comp-dialog-w-sm": i === "small",
|
|
139
|
+
"max-w-comp-dialog-w-md": i === "medium",
|
|
140
|
+
"max-w-comp-dialog-w-lg": i === "large",
|
|
141
|
+
"pt-5xl": !D && !p,
|
|
142
|
+
"max-h-[calc(100vh-var(--spacing-comp-dialog-p-hor-overlay)*2)]": p || D
|
|
143
|
+
},
|
|
144
|
+
l
|
|
145
|
+
),
|
|
146
|
+
...n,
|
|
147
|
+
children: D || p ? /* @__PURE__ */ g(k, { children: [
|
|
148
|
+
w,
|
|
149
|
+
/* @__PURE__ */ a(
|
|
150
|
+
"div",
|
|
151
|
+
{
|
|
152
|
+
ref: H,
|
|
153
|
+
className: "-mr-[calc(var(--spacing-comp-dialog-p)-8px)] min-h-0 flex-1 overflow-y-auto py-comp-dialog-p pr-[calc(var(--spacing-comp-dialog-p)-8px-5px)] [&::-webkit-scrollbar]:w-[5px] [&::-webkit-scrollbar]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-stroke-base-secondary hover:[&::-webkit-scrollbar-thumb]:bg-stroke-base-primary [&::-webkit-scrollbar-track]:bg-transparent",
|
|
154
|
+
children: /* @__PURE__ */ a("div", { children: z })
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
R
|
|
158
|
+
] }) : /* @__PURE__ */ g(k, { children: [
|
|
159
|
+
r,
|
|
160
|
+
/* @__PURE__ */ a(
|
|
161
|
+
A,
|
|
162
|
+
{
|
|
163
|
+
className: "absolute top-4 right-4",
|
|
164
|
+
ariaLabel: h
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
] })
|
|
168
|
+
}
|
|
169
|
+
) }) });
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
X.displayName = o.Content.displayName;
|
|
59
173
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
174
|
+
Q as Dialog,
|
|
175
|
+
ee as DialogClose,
|
|
176
|
+
X as DialogContent,
|
|
177
|
+
Z as DialogDescription,
|
|
178
|
+
M as DialogFooter,
|
|
179
|
+
I as DialogHeader,
|
|
180
|
+
L as DialogOverlay,
|
|
181
|
+
W as DialogPortal,
|
|
182
|
+
U as DialogTitle,
|
|
183
|
+
$ as DialogTrigger
|
|
68
184
|
};
|
|
@@ -13,4 +13,6 @@ export declare const Small: Story;
|
|
|
13
13
|
export declare const Medium: Story;
|
|
14
14
|
export declare const Large: Story;
|
|
15
15
|
export declare const OverflowContent: Story;
|
|
16
|
+
export declare const WithHeaderAndFooter: Story;
|
|
17
|
+
export declare const WithHeaderAndFooterLongContent: Story;
|
|
16
18
|
//# sourceMappingURL=Dialog.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"Dialog.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAI3D,OAAO,EACL,MAAM,EAOP,MAAM,UAAU,CAAA;AAEjB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAiD7B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAA;AAEtC,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IAClC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAoDnB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAkBpB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAkBnB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAkB7B,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KAiDjC,CAAA;AAED,eAAO,MAAM,8BAA8B,EAAE,KAqK5C,CAAA"}
|
|
@@ -1,22 +1,84 @@
|
|
|
1
1
|
import { ButtonProps } from '../Button';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Props for the DropdownMenu root component.
|
|
6
|
+
* Built on [Radix Dropdown Menu](https://www.radix-ui.com/primitives/docs/components/dropdown-menu).
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* <DropdownMenu>
|
|
10
|
+
* <DropdownMenuTrigger asChild><Button>Open</Button></DropdownMenuTrigger>
|
|
11
|
+
* <DropdownMenuContent>
|
|
12
|
+
* <DropdownMenuItem>Action</DropdownMenuItem>
|
|
13
|
+
* </DropdownMenuContent>
|
|
14
|
+
* </DropdownMenu>
|
|
15
|
+
*/
|
|
16
|
+
export interface DropdownMenuProps extends React.ComponentProps<typeof DropdownMenuPrimitive.Root> {
|
|
17
|
+
/** Controlled open state of the dropdown menu. */
|
|
18
|
+
open?: boolean;
|
|
19
|
+
/** Initial open state for uncontrolled usage. @default false */
|
|
20
|
+
defaultOpen?: boolean;
|
|
21
|
+
/** Fires when the dropdown open state changes. Receives the new open value. */
|
|
22
|
+
onOpenChange?: (open: boolean) => void;
|
|
23
|
+
/** Controls modal behavior with backdrop and focus trap. @default true */
|
|
24
|
+
modal?: boolean;
|
|
25
|
+
/** Reading direction for RTL support. */
|
|
26
|
+
dir?: 'ltr' | 'rtl';
|
|
27
|
+
}
|
|
28
|
+
/** Props for DropdownMenuPortal. Renders menu content outside the DOM hierarchy. */
|
|
29
|
+
export type DropdownMenuPortalProps = React.ComponentProps<typeof DropdownMenuPrimitive.Portal>;
|
|
30
|
+
/** Props for DropdownMenuTrigger. Use `asChild` to compose with custom trigger elements. */
|
|
31
|
+
export type DropdownMenuTriggerProps = React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>;
|
|
32
|
+
/**
|
|
33
|
+
* Props for DropdownMenuContent. Container for menu items with auto-scrolling.
|
|
34
|
+
*/
|
|
35
|
+
export interface DropdownMenuContentProps extends React.ComponentProps<typeof DropdownMenuPrimitive.Content> {
|
|
36
|
+
/** Preferred side of the trigger to render against. @default 'bottom' */
|
|
37
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
38
|
+
/** Distance in pixels from the trigger. @default 4 */
|
|
39
|
+
sideOffset?: number;
|
|
40
|
+
/** Preferred alignment against the trigger. @default 'start' */
|
|
41
|
+
align?: 'start' | 'center' | 'end';
|
|
42
|
+
/** Offset in pixels from the aligned edge. */
|
|
43
|
+
alignOffset?: number;
|
|
44
|
+
}
|
|
45
|
+
/** Props for DropdownMenuCheckboxItem. Extends Radix CheckboxItem with IDropdownItem. */
|
|
46
|
+
export type DropdownMenuCheckboxItemProps = React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem> & IDropdownItem;
|
|
47
|
+
/** Props for DropdownMenuRadioGroup. Manages single-selection state via `value` and `onValueChange`. */
|
|
48
|
+
export type DropdownMenuRadioGroupProps = React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>;
|
|
49
|
+
/** Props for DropdownMenuRadioItem. Radio button for single selection within a RadioGroup. */
|
|
50
|
+
export type DropdownMenuRadioItemProps = React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem> & IDropdownItem;
|
|
51
|
+
/** Props for DropdownMenuSeparator. Visual divider between menu sections. */
|
|
52
|
+
export type DropdownMenuSeparatorProps = React.ComponentProps<typeof DropdownMenuPrimitive.Separator>;
|
|
53
|
+
declare const DropdownMenu: ({ ...props }: DropdownMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
declare const DropdownMenuPortal: ({ ...props }: DropdownMenuPortalProps) => import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
declare const DropdownMenuTrigger: ({ ...props }: DropdownMenuTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
declare const DropdownMenuContent: ({ className, sideOffset, align, ...props }: DropdownMenuContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
/** Shared props for dropdown menu item variants (MenuItem, CheckboxItem, RadioItem). */
|
|
8
58
|
export interface IDropdownItem {
|
|
59
|
+
/** Visual style variant. Use `'destructive'` for delete or dangerous actions. @default 'base' */
|
|
9
60
|
variant?: 'base' | 'destructive';
|
|
61
|
+
/** Icon element displayed before the item text. */
|
|
10
62
|
icon?: React.ReactNode;
|
|
63
|
+
/** Highlights the item as currently active/selected with brand color. */
|
|
11
64
|
isActive?: boolean;
|
|
12
65
|
}
|
|
13
|
-
|
|
14
|
-
|
|
66
|
+
/** Props for DropdownMenuItem. Standard clickable item with optional icon. Extends Radix Item with IDropdownItem. */
|
|
67
|
+
export type DropdownMenuItemProps = React.ComponentProps<typeof DropdownMenuPrimitive.Item> & IDropdownItem;
|
|
68
|
+
/**
|
|
69
|
+
* Props for DropdownMenuButtonItem. Menu item rendered as a Button.
|
|
70
|
+
* Pass `buttonProps` to configure the inner Button.
|
|
71
|
+
*/
|
|
72
|
+
export type DropdownMenuButtonItemProps = React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
73
|
+
/** Props forwarded to the inner Button component. @see ButtonProps */
|
|
15
74
|
buttonProps: ButtonProps;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
declare const
|
|
19
|
-
declare const
|
|
20
|
-
declare const
|
|
75
|
+
};
|
|
76
|
+
/** Standard clickable menu item with optional icon and variant styling. */
|
|
77
|
+
declare const DropdownMenuItem: ({ className, variant, children, icon, disabled, isActive, ...props }: DropdownMenuItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
78
|
+
declare const DropdownMenuButtonItem: ({ children, buttonProps, ...props }: DropdownMenuButtonItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
declare const DropdownMenuCheckboxItem: ({ className, children, checked, variant, icon, ...props }: DropdownMenuCheckboxItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
declare const DropdownMenuRadioGroup: ({ value, onValueChange, ...props }: DropdownMenuRadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuRadioItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
82
|
+
declare const DropdownMenuSeparator: ({ className, ...props }: DropdownMenuSeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
83
|
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuButtonItem, };
|
|
22
84
|
//# sourceMappingURL=DropdownMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/DropdownMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAA;AAGtE,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/DropdownMenu.tsx"],"names":[],"mappings":"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"}
|
|
@@ -2,17 +2,11 @@ import { jsx as e, jsxs as p } from "react/jsx-runtime";
|
|
|
2
2
|
import * as l from "react";
|
|
3
3
|
import * as d from "@radix-ui/react-dropdown-menu";
|
|
4
4
|
import { cva as k } from "class-variance-authority";
|
|
5
|
-
import { Typography as b } from "../Typography/Typography.js";
|
|
6
5
|
import { Button as y } from "../Button/Button.js";
|
|
7
6
|
import { cn as i } from "../../utils/cn.js";
|
|
7
|
+
import { Typography as b } from "../Typography/Typography.js";
|
|
8
8
|
import { UnreadOutline as x } from "@solar-icons/react-perf";
|
|
9
|
-
const h = l.createContext(null), N = () => l.useContext(h), T = ({
|
|
10
|
-
...o
|
|
11
|
-
}) => /* @__PURE__ */ e(d.Root, { "data-slot": "dropdown-menu", ...o }), P = ({
|
|
12
|
-
...o
|
|
13
|
-
}) => /* @__PURE__ */ e(d.Portal, { "data-slot": "dropdown-menu-portal", ...o }), G = ({
|
|
14
|
-
...o
|
|
15
|
-
}) => /* @__PURE__ */ e(
|
|
9
|
+
const h = l.createContext(null), N = () => l.useContext(h), T = ({ ...o }) => /* @__PURE__ */ e(d.Root, { "data-slot": "dropdown-menu", ...o }), P = ({ ...o }) => /* @__PURE__ */ e(d.Portal, { "data-slot": "dropdown-menu-portal", ...o }), G = ({ ...o }) => /* @__PURE__ */ e(
|
|
16
10
|
d.Trigger,
|
|
17
11
|
{
|
|
18
12
|
"data-slot": "dropdown-menu-trigger",
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ ...props }:
|
|
4
|
+
component: ({ ...props }: import('./DropdownMenu').DropdownMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
subcomponents: {
|
|
6
|
-
DropdownMenuTrigger: ({ ...props }:
|
|
7
|
-
DropdownMenuContent: ({ className, sideOffset, align, ...props }:
|
|
8
|
-
DropdownMenuItem: ({ className, variant, children, icon, disabled, isActive, ...props }:
|
|
9
|
-
DropdownMenuCheckboxItem: ({ className, children, checked, variant, icon, ...props }:
|
|
10
|
-
DropdownMenuRadioGroup: ({ value, onValueChange, ...props }:
|
|
11
|
-
DropdownMenuRadioItem: import('react').ForwardRefExoticComponent<Omit<import('
|
|
12
|
-
DropdownMenuSeparator: ({ className, ...props }:
|
|
13
|
-
DropdownMenuButtonItem: ({ children, buttonProps, ...props }:
|
|
14
|
-
|
|
15
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
DropdownMenuPortal: ({ ...props }: React.ComponentProps<import('react').FC<import('@radix-ui/react-dropdown-menu').DropdownMenuPortalProps>>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
DropdownMenuTrigger: ({ ...props }: import('./DropdownMenu').DropdownMenuTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
DropdownMenuContent: ({ className, sideOffset, align, ...props }: import('./DropdownMenu').DropdownMenuContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
DropdownMenuItem: ({ className, variant, children, icon, disabled, isActive, ...props }: import('./DropdownMenu').DropdownMenuItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
DropdownMenuCheckboxItem: ({ className, children, checked, variant, icon, ...props }: import('./DropdownMenu').DropdownMenuCheckboxItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
DropdownMenuRadioGroup: ({ value, onValueChange, ...props }: import('./DropdownMenu').DropdownMenuRadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
DropdownMenuRadioItem: import('react').ForwardRefExoticComponent<Omit<import('./DropdownMenu').DropdownMenuRadioItemProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
12
|
+
DropdownMenuSeparator: ({ className, ...props }: import('./DropdownMenu').DropdownMenuSeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
DropdownMenuButtonItem: ({ children, buttonProps, ...props }: import('./DropdownMenu').DropdownMenuButtonItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
DropdownMenuPortal: ({ ...props }: import('./DropdownMenu').DropdownMenuPortalProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
15
|
};
|
|
18
16
|
parameters: {
|
|
19
17
|
layout: string;
|
|
@@ -30,48 +28,34 @@ declare const meta: {
|
|
|
30
28
|
tags: string[];
|
|
31
29
|
argTypes: {
|
|
32
30
|
open: {
|
|
33
|
-
description: string;
|
|
34
31
|
control: "boolean";
|
|
35
32
|
table: {
|
|
36
33
|
category: string;
|
|
37
34
|
};
|
|
38
35
|
};
|
|
39
36
|
defaultOpen: {
|
|
40
|
-
description: string;
|
|
41
37
|
control: "boolean";
|
|
42
38
|
table: {
|
|
43
39
|
category: string;
|
|
44
|
-
defaultValue: {
|
|
45
|
-
summary: string;
|
|
46
|
-
};
|
|
47
40
|
};
|
|
48
41
|
};
|
|
49
42
|
onOpenChange: {
|
|
50
|
-
description: string;
|
|
51
43
|
control: false;
|
|
52
44
|
table: {
|
|
53
45
|
category: string;
|
|
54
46
|
};
|
|
55
47
|
};
|
|
56
48
|
modal: {
|
|
57
|
-
description: string;
|
|
58
49
|
control: "boolean";
|
|
59
50
|
table: {
|
|
60
51
|
category: string;
|
|
61
|
-
defaultValue: {
|
|
62
|
-
summary: string;
|
|
63
|
-
};
|
|
64
52
|
};
|
|
65
53
|
};
|
|
66
54
|
dir: {
|
|
67
|
-
description: string;
|
|
68
55
|
control: "select";
|
|
69
56
|
options: string[];
|
|
70
57
|
table: {
|
|
71
58
|
category: string;
|
|
72
|
-
defaultValue: {
|
|
73
|
-
summary: string;
|
|
74
|
-
};
|
|
75
59
|
};
|
|
76
60
|
};
|
|
77
61
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.stories.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/DropdownMenu.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AA4B3D,QAAA,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"DropdownMenu.stories.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/DropdownMenu.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AA4B3D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0E2B,CAAA;AAErC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAyBrB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KA+BvB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAuB3B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAuB9B,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAwB5B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAgCxB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAiC1B,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KA2C/B,CAAA;AAED,eAAO,MAAM,kCAAkC,EAAE,KA+EhD,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KA4B5B,CAAA"}
|
|
@@ -2,10 +2,28 @@ import { default as React } from 'react';
|
|
|
2
2
|
declare const edgeButtonVariants: (props?: ({
|
|
3
3
|
disabled?: boolean | null | undefined;
|
|
4
4
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
|
+
/**
|
|
6
|
+
* Props for the EdgeButton component.
|
|
7
|
+
*
|
|
8
|
+
* EdgeButton is a fixed-position help button designed for page corners with a distinctive
|
|
9
|
+
* rounded top-left corner design and primary brand styling.
|
|
10
|
+
*/
|
|
5
11
|
export interface EdgeButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
12
|
+
/** Button text content displayed next to the icon. */
|
|
6
13
|
text?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Prevents user interaction and applies disabled styling with reduced opacity.
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
7
18
|
disabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Renders as a span element instead of button (useful for composing with other libraries).
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
8
23
|
asChild?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Leading icon element positioned before the text.
|
|
26
|
+
*/
|
|
9
27
|
icon?: React.ReactNode;
|
|
10
28
|
}
|
|
11
29
|
declare const EdgeButton: React.ForwardRefExoticComponent<EdgeButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EdgeButton.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeButton/EdgeButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,QAAA,MAAM,kBAAkB;;8EAwBvB,CAAA;AAED,MAAM,WAAW,eACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED,QAAA,MAAM,UAAU,2FAuCf,CAAA;AAID,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"EdgeButton.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeButton/EdgeButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,QAAA,MAAM,kBAAkB;;8EAwBvB,CAAA;AAED;;;;;GAKG;AACH,MAAM,WAAW,eACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,sDAAsD;IACtD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED,QAAA,MAAM,UAAU,2FAuCf,CAAA;AAID,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -2,8 +2,8 @@ import { jsxs as m, jsx as c } from "react/jsx-runtime";
|
|
|
2
2
|
import d from "react";
|
|
3
3
|
import { cva as u } from "class-variance-authority";
|
|
4
4
|
import { sharedButtonVariants as o } from "../Button/buttonVariants.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { cn as l } from "../../utils/cn.js";
|
|
6
|
+
import { Typography as f } from "../Typography/Typography.js";
|
|
7
7
|
const z = u(
|
|
8
8
|
[
|
|
9
9
|
"inline-flex items-center justify-center",
|
|
@@ -36,7 +36,7 @@ const z = u(
|
|
|
36
36
|
type: "button",
|
|
37
37
|
onClick: t ? void 0 : e,
|
|
38
38
|
disabled: t,
|
|
39
|
-
className:
|
|
39
|
+
className: l(
|
|
40
40
|
"inline-flex items-center justify-center",
|
|
41
41
|
"h-comp-help-button-h gap-comp-button-gap px-comp-help-button-p",
|
|
42
42
|
"rounded-tl-2xl",
|
|
@@ -50,7 +50,7 @@ const z = u(
|
|
|
50
50
|
children: [
|
|
51
51
|
s,
|
|
52
52
|
/* @__PURE__ */ c(
|
|
53
|
-
|
|
53
|
+
f,
|
|
54
54
|
{
|
|
55
55
|
component: "span",
|
|
56
56
|
size: "base",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EdgeButton.stories.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeButton/EdgeButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAIzC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,
|
|
1
|
+
{"version":3,"file":"EdgeButton.stories.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeButton/EdgeButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAIzC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAkGjC,CAAA;AAED,eAAe,IAAI,CAAA;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAA;AAExC,eAAO,MAAM,OAAO,EAAE,KAYrB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KActB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAqD/B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAmD3B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAexB,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './EdgeButton';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeButton/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/EdgeButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
/** Props for the {@link EmptyState} component. */
|
|
2
3
|
export interface EmptyStateProps {
|
|
4
|
+
/** Renders an icon element above the headline. */
|
|
3
5
|
icon?: React.ReactNode;
|
|
6
|
+
/** Sets the primary headline text. */
|
|
4
7
|
headline?: string;
|
|
8
|
+
/** Sets the supporting body text below the headline. */
|
|
5
9
|
text?: string;
|
|
10
|
+
/** Applies additional CSS classes to the root element. */
|
|
6
11
|
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Controls layout direction of button children.
|
|
14
|
+
* @default 'horizontal'
|
|
15
|
+
*/
|
|
7
16
|
buttonsLayout?: 'horizontal' | 'vertical';
|
|
17
|
+
/** Renders action buttons or other interactive elements below the text. */
|
|
8
18
|
children?: React.ReactNode;
|
|
9
19
|
}
|
|
10
20
|
declare const EmptyState: ({ icon, className, headline, text, children, buttonsLayout, }: EmptyStateProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACzC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B;AAED,QAAA,MAAM,UAAU,GAAI,+DAOjB,eAAe,4CA6CjB,CAAA;AAED,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,kDAAkD;AAClD,MAAM,WAAW,eAAe;IAC9B,kDAAkD;IAClD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACzC,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B;AAED,QAAA,MAAM,UAAU,GAAI,+DAOjB,eAAe,4CA6CjB,CAAA;AAED,OAAO,EAAE,UAAU,EAAE,CAAA"}
|