@designil/labdsnov 0.0.0-stage → 1.0.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/LICENSE +21 -0
- package/README.md +133 -2
- package/dist/components/Accordion/Accordion.d.ts +8 -0
- package/dist/components/Accordion/Accordion.js +82 -0
- package/dist/components/Accordion/Accordion.module.css.js +23 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Alert/Alert.d.ts +17 -0
- package/dist/components/Alert/Alert.js +58 -0
- package/dist/components/Alert/Alert.module.css.js +17 -0
- package/dist/components/Alert/index.d.ts +1 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts +29 -0
- package/dist/components/AlertDialog/AlertDialog.js +150 -0
- package/dist/components/AlertDialog/AlertDialog.module.css.js +23 -0
- package/dist/components/AlertDialog/index.d.ts +1 -0
- package/dist/components/Avatar/Avatar.d.ts +23 -0
- package/dist/components/Avatar/Avatar.js +84 -0
- package/dist/components/Avatar/Avatar.module.css.js +23 -0
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Badge/Badge.d.ts +17 -0
- package/dist/components/Badge/Badge.js +37 -0
- package/dist/components/Badge/Badge.module.css.js +19 -0
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +15 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +111 -0
- package/dist/components/Breadcrumb/Breadcrumb.module.css.js +19 -0
- package/dist/components/Breadcrumb/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +39 -0
- package/dist/components/Button/Button.js +62 -0
- package/dist/components/Button/Button.module.css.js +37 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +21 -0
- package/dist/components/ButtonGroup/ButtonGroup.js +59 -0
- package/dist/components/ButtonGroup/ButtonGroup.module.css.js +15 -0
- package/dist/components/ButtonGroup/index.d.ts +1 -0
- package/dist/components/Calendar/Calendar.d.ts +17 -0
- package/dist/components/Calendar/Calendar.js +154 -0
- package/dist/components/Calendar/Calendar.module.css.js +67 -0
- package/dist/components/Calendar/index.d.ts +1 -0
- package/dist/components/Card/Card.d.ts +20 -0
- package/dist/components/Card/Card.js +87 -0
- package/dist/components/Card/Card.module.css.js +23 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Chart/Chart.d.ts +59 -0
- package/dist/components/Chart/Chart.js +199 -0
- package/dist/components/Chart/Chart.module.css.js +47 -0
- package/dist/components/Chart/index.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +4 -0
- package/dist/components/Checkbox/Checkbox.js +44 -0
- package/dist/components/Checkbox/Checkbox.module.css.js +13 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/Collapsible/Collapsible.d.ts +8 -0
- package/dist/components/Collapsible/Collapsible.js +28 -0
- package/dist/components/Collapsible/Collapsible.module.css.js +7 -0
- package/dist/components/Collapsible/index.d.ts +1 -0
- package/dist/components/Combobox/Combobox.d.ts +36 -0
- package/dist/components/Combobox/Combobox.js +296 -0
- package/dist/components/Combobox/Combobox.module.css.js +39 -0
- package/dist/components/Combobox/index.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +28 -0
- package/dist/components/DatePicker/DatePicker.js +73 -0
- package/dist/components/DatePicker/DatePicker.module.css.js +9 -0
- package/dist/components/DatePicker/index.d.ts +1 -0
- package/dist/components/Dialog/Dialog.d.ts +27 -0
- package/dist/components/Dialog/Dialog.js +144 -0
- package/dist/components/Dialog/Dialog.module.css.js +29 -0
- package/dist/components/Dialog/index.d.ts +1 -0
- package/dist/components/Drawer/Drawer.d.ts +22 -0
- package/dist/components/Drawer/Drawer.js +166 -0
- package/dist/components/Drawer/Drawer.module.css.js +23 -0
- package/dist/components/Drawer/index.d.ts +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +32 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +245 -0
- package/dist/components/DropdownMenu/DropdownMenu.module.css.js +33 -0
- package/dist/components/DropdownMenu/index.d.ts +1 -0
- package/dist/components/Empty/Empty.d.ts +18 -0
- package/dist/components/Empty/Empty.js +76 -0
- package/dist/components/Empty/Empty.module.css.js +21 -0
- package/dist/components/Empty/index.d.ts +1 -0
- package/dist/components/Field/Field.d.ts +53 -0
- package/dist/components/Field/Field.js +172 -0
- package/dist/components/Field/Field.module.css.js +41 -0
- package/dist/components/Field/index.d.ts +1 -0
- package/dist/components/FundCard/FundCard.d.ts +18 -0
- package/dist/components/FundCard/FundCard.js +66 -0
- package/dist/components/FundCard/FundCard.module.css.js +25 -0
- package/dist/components/FundCard/index.d.ts +1 -0
- package/dist/components/HoverCard/HoverCard.d.ts +8 -0
- package/dist/components/HoverCard/HoverCard.js +42 -0
- package/dist/components/HoverCard/HoverCard.module.css.js +9 -0
- package/dist/components/HoverCard/index.d.ts +1 -0
- package/dist/components/Input/Input.d.ts +12 -0
- package/dist/components/Input/Input.js +23 -0
- package/dist/components/Input/Input.module.css.js +11 -0
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/InputGroup/InputGroup.d.ts +39 -0
- package/dist/components/InputGroup/InputGroup.js +103 -0
- package/dist/components/InputGroup/InputGroup.module.css.js +31 -0
- package/dist/components/InputGroup/index.d.ts +1 -0
- package/dist/components/InputOTP/InputOTP.d.ts +18 -0
- package/dist/components/InputOTP/InputOTP.js +72 -0
- package/dist/components/InputOTP/InputOTP.module.css.js +19 -0
- package/dist/components/InputOTP/index.d.ts +1 -0
- package/dist/components/Kbd/Kbd.d.ts +5 -0
- package/dist/components/Kbd/Kbd.js +20 -0
- package/dist/components/Kbd/Kbd.module.css.js +9 -0
- package/dist/components/Kbd/index.d.ts +1 -0
- package/dist/components/Label/Label.d.ts +7 -0
- package/dist/components/Label/Label.js +17 -0
- package/dist/components/Label/Label.module.css.js +9 -0
- package/dist/components/Label/index.d.ts +1 -0
- package/dist/components/NavigationMenu/NavigationMenu.d.ts +20 -0
- package/dist/components/NavigationMenu/NavigationMenu.js +153 -0
- package/dist/components/NavigationMenu/NavigationMenu.module.css.js +29 -0
- package/dist/components/NavigationMenu/index.d.ts +1 -0
- package/dist/components/Pagination/Pagination.d.ts +29 -0
- package/dist/components/Pagination/Pagination.js +133 -0
- package/dist/components/Pagination/Pagination.module.css.js +19 -0
- package/dist/components/Pagination/index.d.ts +1 -0
- package/dist/components/Popover/Popover.d.ts +10 -0
- package/dist/components/Popover/Popover.js +78 -0
- package/dist/components/Popover/Popover.module.css.js +15 -0
- package/dist/components/Popover/index.d.ts +1 -0
- package/dist/components/Progress/Progress.d.ts +12 -0
- package/dist/components/Progress/Progress.js +74 -0
- package/dist/components/Progress/Progress.module.css.js +15 -0
- package/dist/components/Progress/index.d.ts +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +6 -0
- package/dist/components/RadioGroup/RadioGroup.js +37 -0
- package/dist/components/RadioGroup/RadioGroup.module.css.js +13 -0
- package/dist/components/RadioGroup/index.d.ts +1 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +9 -0
- package/dist/components/ScrollArea/ScrollArea.js +60 -0
- package/dist/components/ScrollArea/ScrollArea.module.css.js +17 -0
- package/dist/components/ScrollArea/index.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +23 -0
- package/dist/components/Select/Select.js +188 -0
- package/dist/components/Select/Select.module.css.js +37 -0
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Separator/Separator.d.ts +4 -0
- package/dist/components/Separator/Separator.js +22 -0
- package/dist/components/Separator/Separator.module.css.js +7 -0
- package/dist/components/Separator/index.d.ts +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +4 -0
- package/dist/components/Skeleton/Skeleton.js +16 -0
- package/dist/components/Skeleton/Skeleton.module.css.js +7 -0
- package/dist/components/Skeleton/index.d.ts +1 -0
- package/dist/components/Slider/Slider.d.ts +13 -0
- package/dist/components/Slider/Slider.js +61 -0
- package/dist/components/Slider/Slider.module.css.js +15 -0
- package/dist/components/Slider/index.d.ts +1 -0
- package/dist/components/Spinner/Spinner.d.ts +6 -0
- package/dist/components/Spinner/Spinner.js +22 -0
- package/dist/components/Spinner/Spinner.module.css.js +7 -0
- package/dist/components/Spinner/index.d.ts +1 -0
- package/dist/components/Switch/Switch.d.ts +13 -0
- package/dist/components/Switch/Switch.js +29 -0
- package/dist/components/Switch/Switch.module.css.js +13 -0
- package/dist/components/Switch/index.d.ts +1 -0
- package/dist/components/Table/Table.d.ts +12 -0
- package/dist/components/Table/Table.js +96 -0
- package/dist/components/Table/Table.module.css.js +23 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Tabs/Tabs.d.ts +16 -0
- package/dist/components/Tabs/Tabs.js +55 -0
- package/dist/components/Tabs/Tabs.module.css.js +17 -0
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/Textarea/Textarea.d.ts +4 -0
- package/dist/components/Textarea/Textarea.js +16 -0
- package/dist/components/Textarea/Textarea.module.css.js +7 -0
- package/dist/components/Textarea/index.d.ts +1 -0
- package/dist/components/Toaster/Toaster.d.ts +8 -0
- package/dist/components/Toaster/Toaster.js +85 -0
- package/dist/components/Toaster/Toaster.module.css.js +11 -0
- package/dist/components/Toaster/index.d.ts +1 -0
- package/dist/components/Toggle/Toggle.d.ts +26 -0
- package/dist/components/Toggle/Toggle.js +35 -0
- package/dist/components/Toggle/Toggle.module.css.js +17 -0
- package/dist/components/Toggle/index.d.ts +1 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +20 -0
- package/dist/components/ToggleGroup/ToggleGroup.js +64 -0
- package/dist/components/ToggleGroup/ToggleGroup.module.css.js +11 -0
- package/dist/components/ToggleGroup/index.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +8 -0
- package/dist/components/Tooltip/Tooltip.js +61 -0
- package/dist/components/Tooltip/Tooltip.module.css.js +11 -0
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +265 -0
- package/dist/styles.css +1 -0
- package/docs/Accessibility.md +129 -0
- package/docs/Colors.md +96 -0
- package/docs/ComponentTokens.md +191 -0
- package/docs/Contributing.md +97 -0
- package/docs/GettingStarted.md +106 -0
- package/docs/Radius.md +25 -0
- package/docs/Typography.md +38 -0
- package/package.json +79 -3
- package/src/components/Accordion/Accordion.md +102 -0
- package/src/components/Alert/Alert.md +90 -0
- package/src/components/AlertDialog/AlertDialog.md +131 -0
- package/src/components/Avatar/Avatar.md +77 -0
- package/src/components/Badge/Badge.md +124 -0
- package/src/components/Breadcrumb/Breadcrumb.md +110 -0
- package/src/components/Button/Button.md +165 -0
- package/src/components/ButtonGroup/ButtonGroup.md +96 -0
- package/src/components/Calendar/Calendar.md +111 -0
- package/src/components/Card/Card.md +99 -0
- package/src/components/Chart/Chart.md +112 -0
- package/src/components/Checkbox/Checkbox.md +105 -0
- package/src/components/Collapsible/Collapsible.md +86 -0
- package/src/components/Combobox/Combobox.md +143 -0
- package/src/components/DatePicker/DatePicker.md +82 -0
- package/src/components/Dialog/Dialog.md +193 -0
- package/src/components/Drawer/Drawer.md +125 -0
- package/src/components/DropdownMenu/DropdownMenu.md +151 -0
- package/src/components/Empty/Empty.md +90 -0
- package/src/components/Field/Field.md +139 -0
- package/src/components/FundCard/FundCard.md +93 -0
- package/src/components/HoverCard/HoverCard.md +100 -0
- package/src/components/Input/Input.md +115 -0
- package/src/components/InputGroup/InputGroup.md +115 -0
- package/src/components/InputOTP/InputOTP.md +105 -0
- package/src/components/Kbd/Kbd.md +85 -0
- package/src/components/Label/Label.md +75 -0
- package/src/components/NavigationMenu/NavigationMenu.md +128 -0
- package/src/components/Pagination/Pagination.md +115 -0
- package/src/components/Popover/Popover.md +111 -0
- package/src/components/Progress/Progress.md +83 -0
- package/src/components/RadioGroup/RadioGroup.md +123 -0
- package/src/components/ScrollArea/ScrollArea.md +88 -0
- package/src/components/Select/Select.md +170 -0
- package/src/components/Separator/Separator.md +68 -0
- package/src/components/Skeleton/Skeleton.md +68 -0
- package/src/components/Slider/Slider.md +107 -0
- package/src/components/Spinner/Spinner.md +64 -0
- package/src/components/Switch/Switch.md +101 -0
- package/src/components/Table/Table.md +117 -0
- package/src/components/Tabs/Tabs.md +173 -0
- package/src/components/Textarea/Textarea.md +89 -0
- package/src/components/Toaster/Toaster.md +107 -0
- package/src/components/Toggle/Toggle.md +103 -0
- package/src/components/ToggleGroup/ToggleGroup.md +95 -0
- package/src/components/Tooltip/Tooltip.md +104 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as c, jsxs as e } from "react/jsx-runtime";
|
|
2
|
+
import { Checkbox as r } from "@base-ui/react/checkbox";
|
|
3
|
+
import { Tick02Icon as a, MinusSignIcon as n } from "@hugeicons/core-free-icons";
|
|
4
|
+
import { HugeiconsIcon as t } from "@hugeicons/react";
|
|
5
|
+
import { cn as m } from "cn";
|
|
6
|
+
import o from "./Checkbox.module.css.js";
|
|
7
|
+
function p({ className: i, ...s }) {
|
|
8
|
+
return /* @__PURE__ */ c(
|
|
9
|
+
r.Root,
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "checkbox",
|
|
12
|
+
className: m(o.root, i),
|
|
13
|
+
...s,
|
|
14
|
+
children: /* @__PURE__ */ e(
|
|
15
|
+
r.Indicator,
|
|
16
|
+
{
|
|
17
|
+
"data-slot": "checkbox-indicator",
|
|
18
|
+
className: o.indicator,
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ c(
|
|
21
|
+
t,
|
|
22
|
+
{
|
|
23
|
+
icon: a,
|
|
24
|
+
strokeWidth: 2.5,
|
|
25
|
+
className: o.check
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ c(
|
|
29
|
+
t,
|
|
30
|
+
{
|
|
31
|
+
icon: n,
|
|
32
|
+
strokeWidth: 2.5,
|
|
33
|
+
className: o.dash
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
p as Checkbox
|
|
44
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const d = "dsadv_root_mY3qk", o = "dsadv_indicator_VIxRX", s = "dsadv_check_4HYWn", c = "dsadv_dash_5Dkdl", t = {
|
|
2
|
+
root: d,
|
|
3
|
+
indicator: o,
|
|
4
|
+
check: s,
|
|
5
|
+
dash: c
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
s as check,
|
|
9
|
+
c as dash,
|
|
10
|
+
t as default,
|
|
11
|
+
o as indicator,
|
|
12
|
+
d as root
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Checkbox";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible";
|
|
2
|
+
/** One section that shows and hides. For several stacked sections, use `Accordion`. */
|
|
3
|
+
declare function Collapsible({ ...props }: CollapsiblePrimitive.Root.Props): import("react").JSX.Element;
|
|
4
|
+
/** The button that opens and closes it. Style it with `render={<Button … />}`. */
|
|
5
|
+
declare function CollapsibleTrigger({ ...props }: CollapsiblePrimitive.Trigger.Props): import("react").JSX.Element;
|
|
6
|
+
/** The content that shows when open. Its height animates. */
|
|
7
|
+
declare function CollapsibleContent({ className, ...props }: CollapsiblePrimitive.Panel.Props): import("react").JSX.Element;
|
|
8
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Collapsible as t } from "@base-ui/react/collapsible";
|
|
3
|
+
import { cn as r } from "cn";
|
|
4
|
+
import a from "./Collapsible.module.css.js";
|
|
5
|
+
function c({ ...l }) {
|
|
6
|
+
return /* @__PURE__ */ o(t.Root, { "data-slot": "collapsible", ...l });
|
|
7
|
+
}
|
|
8
|
+
function m({ ...l }) {
|
|
9
|
+
return /* @__PURE__ */ o(t.Trigger, { "data-slot": "collapsible-trigger", ...l });
|
|
10
|
+
}
|
|
11
|
+
function b({
|
|
12
|
+
className: l,
|
|
13
|
+
...e
|
|
14
|
+
}) {
|
|
15
|
+
return /* @__PURE__ */ o(
|
|
16
|
+
t.Panel,
|
|
17
|
+
{
|
|
18
|
+
"data-slot": "collapsible-content",
|
|
19
|
+
className: r(a.content, l),
|
|
20
|
+
...e
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
c as Collapsible,
|
|
26
|
+
b as CollapsibleContent,
|
|
27
|
+
m as CollapsibleTrigger
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Collapsible";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Combobox as ComboboxPrimitive } from "@base-ui/react/combobox";
|
|
3
|
+
/** Groups the combobox. Pass `items` (the full list); it filters them as the user types. */
|
|
4
|
+
declare const Combobox: typeof ComboboxPrimitive.Root;
|
|
5
|
+
declare function ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props): React.JSX.Element;
|
|
6
|
+
/** Chevron button that opens the list. */
|
|
7
|
+
declare function ComboboxTrigger({ className, children, ...props }: ComboboxPrimitive.Trigger.Props): React.JSX.Element;
|
|
8
|
+
/** "×" button that clears the value. */
|
|
9
|
+
declare function ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props): React.JSX.Element;
|
|
10
|
+
/** The text field the user types in, with the chevron (and optional clear) button inside. */
|
|
11
|
+
declare function ComboboxInput({ className, children, disabled, showTrigger, showClear, ...props }: ComboboxPrimitive.Input.Props & {
|
|
12
|
+
/** Show the chevron button that opens the list. */
|
|
13
|
+
showTrigger?: boolean;
|
|
14
|
+
/** Show a "×" button that clears the value (hides the chevron while a value is set). */
|
|
15
|
+
showClear?: boolean;
|
|
16
|
+
}): React.JSX.Element;
|
|
17
|
+
/** The popup list. With `anchor` (chips), it lines up with the chips box. */
|
|
18
|
+
declare function ComboboxContent({ className, side, sideOffset, align, alignOffset, anchor, ...props }: ComboboxPrimitive.Popup.Props & Pick<ComboboxPrimitive.Positioner.Props, "side" | "align" | "sideOffset" | "alignOffset" | "anchor">): React.JSX.Element;
|
|
19
|
+
declare function ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props): React.JSX.Element;
|
|
20
|
+
declare function ComboboxItem({ className, children, ...props }: ComboboxPrimitive.Item.Props): React.JSX.Element;
|
|
21
|
+
declare function ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props): React.JSX.Element;
|
|
22
|
+
declare function ComboboxLabel({ className, ...props }: ComboboxPrimitive.GroupLabel.Props): React.JSX.Element;
|
|
23
|
+
declare function ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props): React.JSX.Element;
|
|
24
|
+
/** Message shown when nothing matches what the user typed. */
|
|
25
|
+
declare function ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props): React.JSX.Element;
|
|
26
|
+
declare function ComboboxSeparator({ className, ...props }: ComboboxPrimitive.Separator.Props): React.JSX.Element;
|
|
27
|
+
/** Box that holds the chosen values as chips plus a `ComboboxChipsInput` (with `multiple`). */
|
|
28
|
+
declare function ComboboxChips({ className, ...props }: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> & ComboboxPrimitive.Chips.Props): React.JSX.Element;
|
|
29
|
+
declare function ComboboxChip({ className, children, showRemove, ...props }: ComboboxPrimitive.Chip.Props & {
|
|
30
|
+
/** Show the "×" that removes this value. */
|
|
31
|
+
showRemove?: boolean;
|
|
32
|
+
}): React.JSX.Element;
|
|
33
|
+
declare function ComboboxChipsInput({ className, ...props }: ComboboxPrimitive.Input.Props): React.JSX.Element;
|
|
34
|
+
/** Ref for `ComboboxChips`, passed to `ComboboxContent` as `anchor`. */
|
|
35
|
+
declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
|
|
36
|
+
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor, };
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import * as d from "react";
|
|
4
|
+
import { Combobox as n } from "@base-ui/react/combobox";
|
|
5
|
+
import { Cancel01Icon as u, Tick02Icon as h, ArrowDown01Icon as C } from "@hugeicons/core-free-icons";
|
|
6
|
+
import { HugeiconsIcon as l } from "@hugeicons/react";
|
|
7
|
+
import { cn as i } from "cn";
|
|
8
|
+
import e from "./Combobox.module.css.js";
|
|
9
|
+
import { Button as f } from "../Button/Button.js";
|
|
10
|
+
import { InputGroupButton as p, InputGroup as N, InputGroupInput as I, InputGroupAddon as g } from "../InputGroup/InputGroup.js";
|
|
11
|
+
const B = n.Root;
|
|
12
|
+
function T({ ...o }) {
|
|
13
|
+
return /* @__PURE__ */ t(n.Value, { "data-slot": "combobox-value", ...o });
|
|
14
|
+
}
|
|
15
|
+
function G({
|
|
16
|
+
className: o,
|
|
17
|
+
children: r,
|
|
18
|
+
...a
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */ s(
|
|
21
|
+
n.Trigger,
|
|
22
|
+
{
|
|
23
|
+
"data-slot": "combobox-trigger",
|
|
24
|
+
"aria-label": "แสดงตัวเลือก",
|
|
25
|
+
className: i(e.trigger, o),
|
|
26
|
+
...a,
|
|
27
|
+
children: [
|
|
28
|
+
r,
|
|
29
|
+
/* @__PURE__ */ t(
|
|
30
|
+
l,
|
|
31
|
+
{
|
|
32
|
+
icon: C,
|
|
33
|
+
strokeWidth: 2,
|
|
34
|
+
className: e.triggerIcon
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function v({ className: o, ...r }) {
|
|
42
|
+
return /* @__PURE__ */ t(
|
|
43
|
+
n.Clear,
|
|
44
|
+
{
|
|
45
|
+
"data-slot": "combobox-clear",
|
|
46
|
+
"aria-label": "ล้าง",
|
|
47
|
+
render: /* @__PURE__ */ t(p, { variant: "ghost", size: "icon-xs" }),
|
|
48
|
+
className: o,
|
|
49
|
+
...r,
|
|
50
|
+
children: /* @__PURE__ */ t(
|
|
51
|
+
l,
|
|
52
|
+
{
|
|
53
|
+
icon: u,
|
|
54
|
+
strokeWidth: 2,
|
|
55
|
+
className: e.iconNoPointer
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
function j({
|
|
62
|
+
className: o,
|
|
63
|
+
children: r,
|
|
64
|
+
disabled: a = !1,
|
|
65
|
+
showTrigger: c = !0,
|
|
66
|
+
showClear: b = !1,
|
|
67
|
+
...m
|
|
68
|
+
}) {
|
|
69
|
+
return /* @__PURE__ */ s(N, { className: i(e.inputGroup, o), children: [
|
|
70
|
+
/* @__PURE__ */ t(
|
|
71
|
+
n.Input,
|
|
72
|
+
{
|
|
73
|
+
render: /* @__PURE__ */ t(I, { disabled: a }),
|
|
74
|
+
...m
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ s(g, { align: "inline-end", children: [
|
|
78
|
+
c && /* @__PURE__ */ t(
|
|
79
|
+
p,
|
|
80
|
+
{
|
|
81
|
+
size: "icon-xs",
|
|
82
|
+
variant: "ghost",
|
|
83
|
+
render: /* @__PURE__ */ t(G, {}),
|
|
84
|
+
"data-slot": "input-group-button",
|
|
85
|
+
className: e.triggerButton,
|
|
86
|
+
disabled: a
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
b && /* @__PURE__ */ t(v, { disabled: a })
|
|
90
|
+
] }),
|
|
91
|
+
r
|
|
92
|
+
] });
|
|
93
|
+
}
|
|
94
|
+
function w({
|
|
95
|
+
className: o,
|
|
96
|
+
side: r = "bottom",
|
|
97
|
+
sideOffset: a = 6,
|
|
98
|
+
align: c = "start",
|
|
99
|
+
alignOffset: b = 0,
|
|
100
|
+
anchor: m,
|
|
101
|
+
...x
|
|
102
|
+
}) {
|
|
103
|
+
return /* @__PURE__ */ t(n.Portal, { children: /* @__PURE__ */ t(
|
|
104
|
+
n.Positioner,
|
|
105
|
+
{
|
|
106
|
+
side: r,
|
|
107
|
+
sideOffset: a,
|
|
108
|
+
align: c,
|
|
109
|
+
alignOffset: b,
|
|
110
|
+
anchor: m,
|
|
111
|
+
className: e.positioner,
|
|
112
|
+
children: /* @__PURE__ */ t(
|
|
113
|
+
n.Popup,
|
|
114
|
+
{
|
|
115
|
+
"data-slot": "combobox-content",
|
|
116
|
+
"data-chips": !!m,
|
|
117
|
+
className: i(e.content, o),
|
|
118
|
+
...x
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
}
|
|
122
|
+
) });
|
|
123
|
+
}
|
|
124
|
+
function E({ className: o, ...r }) {
|
|
125
|
+
return /* @__PURE__ */ t(
|
|
126
|
+
n.List,
|
|
127
|
+
{
|
|
128
|
+
"data-slot": "combobox-list",
|
|
129
|
+
className: i(e.list, o),
|
|
130
|
+
...r
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
function S({
|
|
135
|
+
className: o,
|
|
136
|
+
children: r,
|
|
137
|
+
...a
|
|
138
|
+
}) {
|
|
139
|
+
return /* @__PURE__ */ s(
|
|
140
|
+
n.Item,
|
|
141
|
+
{
|
|
142
|
+
"data-slot": "combobox-item",
|
|
143
|
+
className: i(e.item, o),
|
|
144
|
+
...a,
|
|
145
|
+
children: [
|
|
146
|
+
r,
|
|
147
|
+
/* @__PURE__ */ t(
|
|
148
|
+
n.ItemIndicator,
|
|
149
|
+
{
|
|
150
|
+
render: /* @__PURE__ */ t("span", { className: e.itemIndicator }),
|
|
151
|
+
children: /* @__PURE__ */ t(
|
|
152
|
+
l,
|
|
153
|
+
{
|
|
154
|
+
icon: h,
|
|
155
|
+
strokeWidth: 2,
|
|
156
|
+
className: e.iconNoPointer
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
function V({ className: o, ...r }) {
|
|
166
|
+
return /* @__PURE__ */ t(
|
|
167
|
+
n.Group,
|
|
168
|
+
{
|
|
169
|
+
"data-slot": "combobox-group",
|
|
170
|
+
className: o,
|
|
171
|
+
...r
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
function D({
|
|
176
|
+
className: o,
|
|
177
|
+
...r
|
|
178
|
+
}) {
|
|
179
|
+
return /* @__PURE__ */ t(
|
|
180
|
+
n.GroupLabel,
|
|
181
|
+
{
|
|
182
|
+
"data-slot": "combobox-label",
|
|
183
|
+
className: i(e.label, o),
|
|
184
|
+
...r
|
|
185
|
+
}
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
function H({ ...o }) {
|
|
189
|
+
return /* @__PURE__ */ t(n.Collection, { "data-slot": "combobox-collection", ...o });
|
|
190
|
+
}
|
|
191
|
+
function $({ className: o, ...r }) {
|
|
192
|
+
return /* @__PURE__ */ t(
|
|
193
|
+
n.Empty,
|
|
194
|
+
{
|
|
195
|
+
"data-slot": "combobox-empty",
|
|
196
|
+
className: i(e.empty, o),
|
|
197
|
+
...r
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
function q({
|
|
202
|
+
className: o,
|
|
203
|
+
...r
|
|
204
|
+
}) {
|
|
205
|
+
return /* @__PURE__ */ t(
|
|
206
|
+
n.Separator,
|
|
207
|
+
{
|
|
208
|
+
"data-slot": "combobox-separator",
|
|
209
|
+
className: i(e.separator, o),
|
|
210
|
+
...r
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
function F({
|
|
215
|
+
className: o,
|
|
216
|
+
...r
|
|
217
|
+
}) {
|
|
218
|
+
return /* @__PURE__ */ t(
|
|
219
|
+
n.Chips,
|
|
220
|
+
{
|
|
221
|
+
"data-slot": "combobox-chips",
|
|
222
|
+
className: i(e.chips, o),
|
|
223
|
+
...r
|
|
224
|
+
}
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
function J({
|
|
228
|
+
className: o,
|
|
229
|
+
children: r,
|
|
230
|
+
showRemove: a = !0,
|
|
231
|
+
...c
|
|
232
|
+
}) {
|
|
233
|
+
return /* @__PURE__ */ s(
|
|
234
|
+
n.Chip,
|
|
235
|
+
{
|
|
236
|
+
"data-slot": "combobox-chip",
|
|
237
|
+
className: i(e.chip, o),
|
|
238
|
+
...c,
|
|
239
|
+
children: [
|
|
240
|
+
r,
|
|
241
|
+
a && /* @__PURE__ */ t(
|
|
242
|
+
n.ChipRemove,
|
|
243
|
+
{
|
|
244
|
+
render: /* @__PURE__ */ t(f, { variant: "ghost", size: "icon-xs" }),
|
|
245
|
+
"aria-label": "นำออก",
|
|
246
|
+
className: e.chipRemove,
|
|
247
|
+
"data-slot": "combobox-chip-remove",
|
|
248
|
+
children: /* @__PURE__ */ t(
|
|
249
|
+
l,
|
|
250
|
+
{
|
|
251
|
+
icon: u,
|
|
252
|
+
strokeWidth: 2,
|
|
253
|
+
className: e.iconNoPointer
|
|
254
|
+
}
|
|
255
|
+
)
|
|
256
|
+
}
|
|
257
|
+
)
|
|
258
|
+
]
|
|
259
|
+
}
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
function K({
|
|
263
|
+
className: o,
|
|
264
|
+
...r
|
|
265
|
+
}) {
|
|
266
|
+
return /* @__PURE__ */ t(
|
|
267
|
+
n.Input,
|
|
268
|
+
{
|
|
269
|
+
"data-slot": "combobox-chip-input",
|
|
270
|
+
className: i(e.chipsInput, o),
|
|
271
|
+
...r
|
|
272
|
+
}
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
function M() {
|
|
276
|
+
return d.useRef(null);
|
|
277
|
+
}
|
|
278
|
+
export {
|
|
279
|
+
B as Combobox,
|
|
280
|
+
J as ComboboxChip,
|
|
281
|
+
F as ComboboxChips,
|
|
282
|
+
K as ComboboxChipsInput,
|
|
283
|
+
v as ComboboxClear,
|
|
284
|
+
H as ComboboxCollection,
|
|
285
|
+
w as ComboboxContent,
|
|
286
|
+
$ as ComboboxEmpty,
|
|
287
|
+
V as ComboboxGroup,
|
|
288
|
+
j as ComboboxInput,
|
|
289
|
+
S as ComboboxItem,
|
|
290
|
+
D as ComboboxLabel,
|
|
291
|
+
E as ComboboxList,
|
|
292
|
+
q as ComboboxSeparator,
|
|
293
|
+
G as ComboboxTrigger,
|
|
294
|
+
T as ComboboxValue,
|
|
295
|
+
M as useComboboxAnchor
|
|
296
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const t = "dsadv_inputGroup_Z9yh0", o = "dsadv_trigger_4osgN", s = "dsadv_triggerIcon_txTn1", i = "dsadv_triggerButton_L3Si-", n = "dsadv_iconNoPointer_0Gquo", c = "dsadv_positioner_cYwA3", e = "dsadv_content_NZhA4", d = "dsadv_list_dh-us", r = "dsadv_item_oLlK9", _ = "dsadv_itemIndicator_ZYdjJ", a = "dsadv_label_KVkZO", p = "dsadv_empty_Ahw5K", v = "dsadv_separator_2AOZ-", g = "dsadv_chips_N-oOh", h = "dsadv_chip_wrT4m", u = "dsadv_chipRemove_CD0kV", l = "dsadv_chipsInput_QTlEU", m = {
|
|
2
|
+
inputGroup: t,
|
|
3
|
+
trigger: o,
|
|
4
|
+
triggerIcon: s,
|
|
5
|
+
triggerButton: i,
|
|
6
|
+
iconNoPointer: n,
|
|
7
|
+
positioner: c,
|
|
8
|
+
content: e,
|
|
9
|
+
list: d,
|
|
10
|
+
item: r,
|
|
11
|
+
itemIndicator: _,
|
|
12
|
+
label: a,
|
|
13
|
+
empty: p,
|
|
14
|
+
separator: v,
|
|
15
|
+
chips: g,
|
|
16
|
+
chip: h,
|
|
17
|
+
chipRemove: u,
|
|
18
|
+
chipsInput: l
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
h as chip,
|
|
22
|
+
u as chipRemove,
|
|
23
|
+
g as chips,
|
|
24
|
+
l as chipsInput,
|
|
25
|
+
e as content,
|
|
26
|
+
m as default,
|
|
27
|
+
p as empty,
|
|
28
|
+
n as iconNoPointer,
|
|
29
|
+
t as inputGroup,
|
|
30
|
+
r as item,
|
|
31
|
+
_ as itemIndicator,
|
|
32
|
+
a as label,
|
|
33
|
+
d as list,
|
|
34
|
+
c as positioner,
|
|
35
|
+
v as separator,
|
|
36
|
+
o as trigger,
|
|
37
|
+
i as triggerButton,
|
|
38
|
+
s as triggerIcon
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Combobox";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type CalendarProps } from "../Calendar";
|
|
3
|
+
type DatePickerProps = {
|
|
4
|
+
/** Selected date (controlled). Use with `onValueChange`. */
|
|
5
|
+
value?: Date;
|
|
6
|
+
/** Selected date at first (uncontrolled). */
|
|
7
|
+
defaultValue?: Date;
|
|
8
|
+
/** Called with the chosen date, or `undefined` when it is cleared. */
|
|
9
|
+
onValueChange?: (date: Date | undefined) => void;
|
|
10
|
+
/** Text shown before a date is chosen. */
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Put on the trigger button, so a `Label htmlFor` can name it. */
|
|
14
|
+
id?: string;
|
|
15
|
+
"aria-invalid"?: boolean;
|
|
16
|
+
"aria-describedby"?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
/** Extra `Calendar` props, e.g. `disabled` days or `captionLayout="dropdown"`. */
|
|
19
|
+
calendarProps?: Omit<Extract<CalendarProps, {
|
|
20
|
+
mode: "single";
|
|
21
|
+
}>, "mode" | "selected" | "onSelect">;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Button that opens a `Calendar` in a `Popover` to pick one date. Shows the
|
|
25
|
+
* date in Thai with the Buddhist year, like FundCard. Closes after a pick.
|
|
26
|
+
*/
|
|
27
|
+
declare function DatePicker({ value, defaultValue, onValueChange, placeholder, disabled, id, className, calendarProps, ...ariaProps }: DatePickerProps): React.JSX.Element;
|
|
28
|
+
export { DatePicker, type DatePickerProps };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import * as i from "react";
|
|
4
|
+
import { Calendar03Icon as C } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon as P } from "@hugeicons/react";
|
|
6
|
+
import { cn as k } from "cn";
|
|
7
|
+
import m from "./DatePicker.module.css.js";
|
|
8
|
+
import { Popover as x, PopoverTrigger as I, PopoverContent as S } from "../Popover/Popover.js";
|
|
9
|
+
import { Button as T } from "../Button/Button.js";
|
|
10
|
+
import { Calendar as j } from "../Calendar/Calendar.js";
|
|
11
|
+
const D = new Intl.DateTimeFormat("th-TH", {
|
|
12
|
+
day: "numeric",
|
|
13
|
+
month: "short",
|
|
14
|
+
year: "numeric"
|
|
15
|
+
});
|
|
16
|
+
function U({
|
|
17
|
+
value: o,
|
|
18
|
+
defaultValue: s,
|
|
19
|
+
onValueChange: c,
|
|
20
|
+
placeholder: l = "เลือกวันที่",
|
|
21
|
+
disabled: d,
|
|
22
|
+
id: p,
|
|
23
|
+
className: f,
|
|
24
|
+
calendarProps: u,
|
|
25
|
+
...h
|
|
26
|
+
}) {
|
|
27
|
+
const [g, v] = i.useState(s), [y, r] = i.useState(!1), t = o !== void 0 ? o : g;
|
|
28
|
+
return /* @__PURE__ */ a(x, { open: y, onOpenChange: r, children: [
|
|
29
|
+
/* @__PURE__ */ a(
|
|
30
|
+
I,
|
|
31
|
+
{
|
|
32
|
+
disabled: d,
|
|
33
|
+
render: /* @__PURE__ */ e(
|
|
34
|
+
T,
|
|
35
|
+
{
|
|
36
|
+
id: p,
|
|
37
|
+
variant: "outline",
|
|
38
|
+
"data-slot": "date-picker",
|
|
39
|
+
"data-empty": !t,
|
|
40
|
+
className: k(m.trigger, f),
|
|
41
|
+
...h
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ e(
|
|
46
|
+
P,
|
|
47
|
+
{
|
|
48
|
+
icon: C,
|
|
49
|
+
strokeWidth: 2,
|
|
50
|
+
"data-icon": "inline-start"
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
t ? D.format(t) : l
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
/* @__PURE__ */ e(S, { align: "start", className: m.content, children: /* @__PURE__ */ e(
|
|
58
|
+
j,
|
|
59
|
+
{
|
|
60
|
+
mode: "single",
|
|
61
|
+
selected: t,
|
|
62
|
+
defaultMonth: t,
|
|
63
|
+
onSelect: (n) => {
|
|
64
|
+
v(n), c?.(n), r(!1);
|
|
65
|
+
},
|
|
66
|
+
...u
|
|
67
|
+
}
|
|
68
|
+
) })
|
|
69
|
+
] });
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
U as DatePicker
|
|
73
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DatePicker";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
3
|
+
declare const sizeClass: {
|
|
4
|
+
readonly sm: string;
|
|
5
|
+
readonly default: string;
|
|
6
|
+
readonly lg: string;
|
|
7
|
+
readonly xl: string;
|
|
8
|
+
};
|
|
9
|
+
type DialogSize = keyof typeof sizeClass;
|
|
10
|
+
declare function Dialog({ ...props }: DialogPrimitive.Root.Props): React.JSX.Element;
|
|
11
|
+
declare function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props): React.JSX.Element;
|
|
12
|
+
declare function DialogPortal({ ...props }: DialogPrimitive.Portal.Props): React.JSX.Element;
|
|
13
|
+
declare function DialogClose({ ...props }: DialogPrimitive.Close.Props): React.JSX.Element;
|
|
14
|
+
declare function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props): React.JSX.Element;
|
|
15
|
+
type DialogContentProps = DialogPrimitive.Popup.Props & {
|
|
16
|
+
/** Maximum width on screens 40rem and wider. */
|
|
17
|
+
size?: DialogSize;
|
|
18
|
+
showCloseButton?: boolean;
|
|
19
|
+
};
|
|
20
|
+
declare function DialogContent({ className, children, size, showCloseButton, ...props }: DialogContentProps): React.JSX.Element;
|
|
21
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
22
|
+
declare function DialogFooter({ className, showCloseButton, children, ...props }: React.ComponentProps<"div"> & {
|
|
23
|
+
showCloseButton?: boolean;
|
|
24
|
+
}): React.JSX.Element;
|
|
25
|
+
declare function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props): React.JSX.Element;
|
|
26
|
+
declare function DialogDescription({ className, ...props }: DialogPrimitive.Description.Props): React.JSX.Element;
|
|
27
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type DialogContentProps, type DialogSize, };
|