@designil/labdsnov 0.0.0-stage → 1.1.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 +150 -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 +149 -0
- package/docs/ComponentTokens.md +191 -0
- package/docs/Contributing.md +104 -0
- package/docs/GettingStarted.md +106 -0
- package/docs/Radius.md +25 -0
- package/docs/Typography.md +38 -0
- package/package.json +88 -4
- package/src/components/Accordion/Accordion.dsds.yaml +195 -0
- package/src/components/Accordion/Accordion.md +102 -0
- package/src/components/Alert/Alert.dsds.yaml +206 -0
- package/src/components/Alert/Alert.md +90 -0
- package/src/components/AlertDialog/AlertDialog.dsds.yaml +243 -0
- package/src/components/AlertDialog/AlertDialog.md +131 -0
- package/src/components/Avatar/Avatar.dsds.yaml +172 -0
- package/src/components/Avatar/Avatar.md +77 -0
- package/src/components/Badge/Badge.dsds.yaml +191 -0
- package/src/components/Badge/Badge.md +124 -0
- package/src/components/Breadcrumb/Breadcrumb.dsds.yaml +162 -0
- package/src/components/Breadcrumb/Breadcrumb.md +110 -0
- package/src/components/Button/Button.dsds.yaml +350 -0
- package/src/components/Button/Button.md +165 -0
- package/src/components/ButtonGroup/ButtonGroup.dsds.yaml +193 -0
- package/src/components/ButtonGroup/ButtonGroup.md +96 -0
- package/src/components/Calendar/Calendar.dsds.yaml +236 -0
- package/src/components/Calendar/Calendar.md +111 -0
- package/src/components/Card/Card.dsds.yaml +199 -0
- package/src/components/Card/Card.md +99 -0
- package/src/components/Chart/Chart.dsds.yaml +216 -0
- package/src/components/Chart/Chart.md +112 -0
- package/src/components/Checkbox/Checkbox.dsds.yaml +215 -0
- package/src/components/Checkbox/Checkbox.md +105 -0
- package/src/components/Collapsible/Collapsible.dsds.yaml +146 -0
- package/src/components/Collapsible/Collapsible.md +86 -0
- package/src/components/Combobox/Combobox.dsds.yaml +241 -0
- package/src/components/Combobox/Combobox.md +143 -0
- package/src/components/DatePicker/DatePicker.dsds.yaml +179 -0
- package/src/components/DatePicker/DatePicker.md +82 -0
- package/src/components/Dialog/Dialog.dsds.yaml +300 -0
- package/src/components/Dialog/Dialog.md +193 -0
- package/src/components/Drawer/Drawer.dsds.yaml +207 -0
- package/src/components/Drawer/Drawer.md +125 -0
- package/src/components/DropdownMenu/DropdownMenu.dsds.yaml +265 -0
- package/src/components/DropdownMenu/DropdownMenu.md +151 -0
- package/src/components/Empty/Empty.dsds.yaml +171 -0
- package/src/components/Empty/Empty.md +90 -0
- package/src/components/Field/Field.dsds.yaml +285 -0
- package/src/components/Field/Field.md +139 -0
- package/src/components/FundCard/FundCard.dsds.yaml +195 -0
- package/src/components/FundCard/FundCard.md +93 -0
- package/src/components/HoverCard/HoverCard.dsds.yaml +157 -0
- package/src/components/HoverCard/HoverCard.md +100 -0
- package/src/components/Input/Input.dsds.yaml +235 -0
- package/src/components/Input/Input.md +115 -0
- package/src/components/InputGroup/InputGroup.dsds.yaml +234 -0
- package/src/components/InputGroup/InputGroup.md +115 -0
- package/src/components/InputOTP/InputOTP.dsds.yaml +184 -0
- package/src/components/InputOTP/InputOTP.md +105 -0
- package/src/components/Kbd/Kbd.dsds.yaml +119 -0
- package/src/components/Kbd/Kbd.md +85 -0
- package/src/components/Label/Label.dsds.yaml +141 -0
- package/src/components/Label/Label.md +75 -0
- package/src/components/NavigationMenu/NavigationMenu.dsds.yaml +196 -0
- package/src/components/NavigationMenu/NavigationMenu.md +128 -0
- package/src/components/Pagination/Pagination.dsds.yaml +172 -0
- package/src/components/Pagination/Pagination.md +115 -0
- package/src/components/Popover/Popover.dsds.yaml +168 -0
- package/src/components/Popover/Popover.md +111 -0
- package/src/components/Progress/Progress.dsds.yaml +169 -0
- package/src/components/Progress/Progress.md +83 -0
- package/src/components/RadioGroup/RadioGroup.dsds.yaml +215 -0
- package/src/components/RadioGroup/RadioGroup.md +123 -0
- package/src/components/ScrollArea/ScrollArea.dsds.yaml +153 -0
- package/src/components/ScrollArea/ScrollArea.md +88 -0
- package/src/components/Select/Select.dsds.yaml +239 -0
- package/src/components/Select/Select.md +170 -0
- package/src/components/Separator/Separator.dsds.yaml +121 -0
- package/src/components/Separator/Separator.md +68 -0
- package/src/components/Skeleton/Skeleton.dsds.yaml +124 -0
- package/src/components/Skeleton/Skeleton.md +68 -0
- package/src/components/Slider/Slider.dsds.yaml +194 -0
- package/src/components/Slider/Slider.md +107 -0
- package/src/components/Spinner/Spinner.dsds.yaml +126 -0
- package/src/components/Spinner/Spinner.md +64 -0
- package/src/components/Switch/Switch.dsds.yaml +198 -0
- package/src/components/Switch/Switch.md +101 -0
- package/src/components/Table/Table.dsds.yaml +195 -0
- package/src/components/Table/Table.md +117 -0
- package/src/components/Tabs/Tabs.dsds.yaml +239 -0
- package/src/components/Tabs/Tabs.md +173 -0
- package/src/components/Textarea/Textarea.dsds.yaml +167 -0
- package/src/components/Textarea/Textarea.md +89 -0
- package/src/components/Toaster/Toaster.dsds.yaml +226 -0
- package/src/components/Toaster/Toaster.md +107 -0
- package/src/components/Toggle/Toggle.dsds.yaml +224 -0
- package/src/components/Toggle/Toggle.md +103 -0
- package/src/components/ToggleGroup/ToggleGroup.dsds.yaml +230 -0
- package/src/components/ToggleGroup/ToggleGroup.md +95 -0
- package/src/components/Tooltip/Tooltip.dsds.yaml +202 -0
- package/src/components/Tooltip/Tooltip.md +104 -0
- package/src/index.dsds.yaml +467 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const mediaVariantClass: {
|
|
3
|
+
readonly default: string;
|
|
4
|
+
readonly icon: string;
|
|
5
|
+
};
|
|
6
|
+
type EmptyMediaVariant = keyof typeof mediaVariantClass;
|
|
7
|
+
/** Empty state: shown where a list or page has nothing yet. Add `border` for a dashed outline. */
|
|
8
|
+
declare function Empty({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
+
declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<"div"> & {
|
|
11
|
+
/** `default`: the image or icon as is. `icon`: icon in a 40px grey square. */
|
|
12
|
+
variant?: EmptyMediaVariant;
|
|
13
|
+
}): React.JSX.Element;
|
|
14
|
+
declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
15
|
+
declare function EmptyDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
16
|
+
/** Holds the next step, e.g. a `Button`. */
|
|
17
|
+
declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
18
|
+
export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, type EmptyMediaVariant, };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { cn as i } from "cn";
|
|
3
|
+
import a from "./Empty.module.css.js";
|
|
4
|
+
const m = {
|
|
5
|
+
default: a.mediaDefault,
|
|
6
|
+
icon: a.mediaIcon
|
|
7
|
+
};
|
|
8
|
+
function c({ className: e, ...t }) {
|
|
9
|
+
return /* @__PURE__ */ n("div", { "data-slot": "empty", className: i(a.root, e), ...t });
|
|
10
|
+
}
|
|
11
|
+
function l({ className: e, ...t }) {
|
|
12
|
+
return /* @__PURE__ */ n(
|
|
13
|
+
"div",
|
|
14
|
+
{
|
|
15
|
+
"data-slot": "empty-header",
|
|
16
|
+
className: i(a.header, e),
|
|
17
|
+
...t
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
function p({
|
|
22
|
+
className: e,
|
|
23
|
+
variant: t = "default",
|
|
24
|
+
...o
|
|
25
|
+
}) {
|
|
26
|
+
return /* @__PURE__ */ n(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
"data-slot": "empty-icon",
|
|
30
|
+
"data-variant": t,
|
|
31
|
+
className: i(a.media, m[t], e),
|
|
32
|
+
...o
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
function u({ className: e, ...t }) {
|
|
37
|
+
return /* @__PURE__ */ n(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
"data-slot": "empty-title",
|
|
41
|
+
className: i(a.title, e),
|
|
42
|
+
...t
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
function y({
|
|
47
|
+
className: e,
|
|
48
|
+
...t
|
|
49
|
+
}) {
|
|
50
|
+
return /* @__PURE__ */ n(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
"data-slot": "empty-description",
|
|
54
|
+
className: i(a.description, e),
|
|
55
|
+
...t
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
function f({ className: e, ...t }) {
|
|
60
|
+
return /* @__PURE__ */ n(
|
|
61
|
+
"div",
|
|
62
|
+
{
|
|
63
|
+
"data-slot": "empty-content",
|
|
64
|
+
className: i(a.content, e),
|
|
65
|
+
...t
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
c as Empty,
|
|
71
|
+
f as EmptyContent,
|
|
72
|
+
y as EmptyDescription,
|
|
73
|
+
l as EmptyHeader,
|
|
74
|
+
p as EmptyMedia,
|
|
75
|
+
u as EmptyTitle
|
|
76
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const o = "labdsnov_root_iKP8T", t = "labdsnov_header_Us17K", e = "labdsnov_media_pM5g8", n = "labdsnov_mediaDefault_UI7w-", a = "labdsnov_mediaIcon_EmKs4", s = "labdsnov_title_U6qwW", d = "labdsnov_description_FNW78", i = "labdsnov_content_m09WS", c = {
|
|
2
|
+
root: o,
|
|
3
|
+
header: t,
|
|
4
|
+
media: e,
|
|
5
|
+
mediaDefault: n,
|
|
6
|
+
mediaIcon: a,
|
|
7
|
+
title: s,
|
|
8
|
+
description: d,
|
|
9
|
+
content: i
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
i as content,
|
|
13
|
+
c as default,
|
|
14
|
+
d as description,
|
|
15
|
+
t as header,
|
|
16
|
+
e as media,
|
|
17
|
+
n as mediaDefault,
|
|
18
|
+
a as mediaIcon,
|
|
19
|
+
o as root,
|
|
20
|
+
s as title
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Empty";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Label } from "../Label";
|
|
3
|
+
declare const orientationClass: {
|
|
4
|
+
readonly vertical: string;
|
|
5
|
+
readonly horizontal: string;
|
|
6
|
+
readonly responsive: string;
|
|
7
|
+
};
|
|
8
|
+
type FieldOrientation = keyof typeof orientationClass;
|
|
9
|
+
declare const legendVariantClass: {
|
|
10
|
+
readonly legend: string;
|
|
11
|
+
readonly label: string;
|
|
12
|
+
};
|
|
13
|
+
type FieldLegendVariant = keyof typeof legendVariantClass;
|
|
14
|
+
/** A `<fieldset>` for related fields, e.g. a checkbox list or a radio group with a `FieldLegend`. */
|
|
15
|
+
declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): React.JSX.Element;
|
|
16
|
+
declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<"legend"> & {
|
|
17
|
+
/** `legend`: 16px heading. `label`: 14px, like a field label. */
|
|
18
|
+
variant?: FieldLegendVariant;
|
|
19
|
+
}): React.JSX.Element;
|
|
20
|
+
/** Stacks fields with consistent spacing. Also the width container for `orientation="responsive"`. */
|
|
21
|
+
declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
22
|
+
type FieldProps = React.ComponentProps<"div"> & {
|
|
23
|
+
/**
|
|
24
|
+
* `vertical`: label above the control. `horizontal`: control beside the label
|
|
25
|
+
* (checkboxes, switches). `responsive`: vertical, horizontal once the
|
|
26
|
+
* `FieldGroup` is 448px wide.
|
|
27
|
+
*/
|
|
28
|
+
orientation?: FieldOrientation;
|
|
29
|
+
};
|
|
30
|
+
/** One form field: label, control, description and error. Set `data-invalid` / `data-disabled` to style the whole field. */
|
|
31
|
+
declare function Field({ className, orientation, ...props }: FieldProps): React.JSX.Element;
|
|
32
|
+
/** Wraps the label and description beside a checkbox, radio or switch. */
|
|
33
|
+
declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
34
|
+
/** `Label` for a field. Wrap a whole `Field` in it to make a selectable card. */
|
|
35
|
+
declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): React.JSX.Element;
|
|
36
|
+
/** A field heading that isn't a `<label>`, e.g. the title inside a choice card. */
|
|
37
|
+
declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
38
|
+
/** Help text under (or beside) the control. Link it with `aria-describedby`. */
|
|
39
|
+
declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
40
|
+
/** Divider between fields, with optional text in the middle (e.g. "หรือ"). */
|
|
41
|
+
declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<"div"> & {
|
|
42
|
+
children?: React.ReactNode;
|
|
43
|
+
}): React.JSX.Element;
|
|
44
|
+
/**
|
|
45
|
+
* Error message, announced to screen readers (`role="alert"`). Pass text as
|
|
46
|
+
* children, or `errors` (e.g. from a form library); renders nothing when empty.
|
|
47
|
+
*/
|
|
48
|
+
declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<"div"> & {
|
|
49
|
+
errors?: Array<{
|
|
50
|
+
message?: string;
|
|
51
|
+
} | undefined>;
|
|
52
|
+
}): React.JSX.Element | null;
|
|
53
|
+
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, type FieldLegendVariant, type FieldOrientation, type FieldProps, };
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
3
|
+
import * as f from "react";
|
|
4
|
+
import { cn as n } from "cn";
|
|
5
|
+
import a from "./Field.module.css.js";
|
|
6
|
+
import { Label as m } from "../Label/Label.js";
|
|
7
|
+
import { Separator as p } from "../Separator/Separator.js";
|
|
8
|
+
const g = {
|
|
9
|
+
vertical: a.vertical,
|
|
10
|
+
horizontal: a.horizontal,
|
|
11
|
+
responsive: a.responsive
|
|
12
|
+
}, N = {
|
|
13
|
+
legend: a.legendLegend,
|
|
14
|
+
label: a.legendLabel
|
|
15
|
+
};
|
|
16
|
+
function C({ className: t, ...e }) {
|
|
17
|
+
return /* @__PURE__ */ l(
|
|
18
|
+
"fieldset",
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "field-set",
|
|
21
|
+
className: n(a.set, t),
|
|
22
|
+
...e
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
function x({
|
|
27
|
+
className: t,
|
|
28
|
+
variant: e = "legend",
|
|
29
|
+
...r
|
|
30
|
+
}) {
|
|
31
|
+
return /* @__PURE__ */ l(
|
|
32
|
+
"legend",
|
|
33
|
+
{
|
|
34
|
+
"data-slot": "field-legend",
|
|
35
|
+
"data-variant": e,
|
|
36
|
+
className: n(a.legend, N[e], t),
|
|
37
|
+
...r
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function S({ className: t, ...e }) {
|
|
42
|
+
return /* @__PURE__ */ l(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
"data-slot": "field-group",
|
|
46
|
+
className: n(a.group, t),
|
|
47
|
+
...e
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
function j({ className: t, orientation: e = "vertical", ...r }) {
|
|
52
|
+
return /* @__PURE__ */ l(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
role: "group",
|
|
56
|
+
"data-slot": "field",
|
|
57
|
+
"data-orientation": e,
|
|
58
|
+
className: n(a.field, g[e], t),
|
|
59
|
+
...r
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
function z({ className: t, ...e }) {
|
|
64
|
+
return /* @__PURE__ */ l(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
"data-slot": "field-content",
|
|
68
|
+
className: n(a.content, t),
|
|
69
|
+
...e
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
function E({
|
|
74
|
+
className: t,
|
|
75
|
+
...e
|
|
76
|
+
}) {
|
|
77
|
+
return /* @__PURE__ */ l(
|
|
78
|
+
m,
|
|
79
|
+
{
|
|
80
|
+
"data-slot": "field-label",
|
|
81
|
+
className: n(a.label, t),
|
|
82
|
+
...e
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
function M({ className: t, ...e }) {
|
|
87
|
+
return /* @__PURE__ */ l(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
"data-slot": "field-label",
|
|
91
|
+
className: n(a.title, t),
|
|
92
|
+
...e
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
function q({ className: t, ...e }) {
|
|
97
|
+
return /* @__PURE__ */ l(
|
|
98
|
+
"p",
|
|
99
|
+
{
|
|
100
|
+
"data-slot": "field-description",
|
|
101
|
+
className: n(a.description, t),
|
|
102
|
+
...e
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
function w({
|
|
107
|
+
children: t,
|
|
108
|
+
className: e,
|
|
109
|
+
...r
|
|
110
|
+
}) {
|
|
111
|
+
return /* @__PURE__ */ u(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
"data-slot": "field-separator",
|
|
115
|
+
"data-content": !!t,
|
|
116
|
+
className: n(a.separator, e),
|
|
117
|
+
...r,
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ l(p, { className: a.separatorLine }),
|
|
120
|
+
t && /* @__PURE__ */ l(
|
|
121
|
+
"span",
|
|
122
|
+
{
|
|
123
|
+
"data-slot": "field-separator-content",
|
|
124
|
+
className: a.separatorContent,
|
|
125
|
+
children: t
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
function y({
|
|
133
|
+
className: t,
|
|
134
|
+
children: e,
|
|
135
|
+
errors: r,
|
|
136
|
+
...d
|
|
137
|
+
}) {
|
|
138
|
+
const o = f.useMemo(() => {
|
|
139
|
+
if (e)
|
|
140
|
+
return e;
|
|
141
|
+
if (!r?.length)
|
|
142
|
+
return null;
|
|
143
|
+
const i = [
|
|
144
|
+
...new Map(r.map((s) => [s?.message, s])).values()
|
|
145
|
+
];
|
|
146
|
+
return i.length === 1 ? i[0]?.message : /* @__PURE__ */ l("ul", { className: a.errorList, children: i.map(
|
|
147
|
+
(s, c) => s?.message && /* @__PURE__ */ l("li", { children: s.message }, c)
|
|
148
|
+
) });
|
|
149
|
+
}, [e, r]);
|
|
150
|
+
return o ? /* @__PURE__ */ l(
|
|
151
|
+
"div",
|
|
152
|
+
{
|
|
153
|
+
role: "alert",
|
|
154
|
+
"data-slot": "field-error",
|
|
155
|
+
className: n(a.error, t),
|
|
156
|
+
...d,
|
|
157
|
+
children: o
|
|
158
|
+
}
|
|
159
|
+
) : null;
|
|
160
|
+
}
|
|
161
|
+
export {
|
|
162
|
+
j as Field,
|
|
163
|
+
z as FieldContent,
|
|
164
|
+
q as FieldDescription,
|
|
165
|
+
y as FieldError,
|
|
166
|
+
S as FieldGroup,
|
|
167
|
+
E as FieldLabel,
|
|
168
|
+
x as FieldLegend,
|
|
169
|
+
w as FieldSeparator,
|
|
170
|
+
C as FieldSet,
|
|
171
|
+
M as FieldTitle
|
|
172
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const e = "labdsnov_set_dKPeh", n = "labdsnov_legend_VlQuG", o = "labdsnov_legendLegend_nwW0Z", s = "labdsnov_legendLabel_Tbnjc", t = "labdsnov_group_93gdd", l = "labdsnov_field_m7I4B", r = "labdsnov_vertical_KJtYL", a = "labdsnov_horizontal_ieL1-", d = "labdsnov_responsive_7cimb", _ = "labdsnov_content_pbXCY", c = "labdsnov_label_LAQio", i = "labdsnov_title_UnEcT", b = "labdsnov_description_yqljW", v = "labdsnov_separator_byPs-", p = "labdsnov_separatorLine_BLZRb", g = "labdsnov_separatorContent_xj-kG", L = "labdsnov_error_m0uol", u = "labdsnov_errorList_sh1er", h = {
|
|
2
|
+
set: e,
|
|
3
|
+
legend: n,
|
|
4
|
+
legendLegend: o,
|
|
5
|
+
legendLabel: s,
|
|
6
|
+
group: t,
|
|
7
|
+
field: l,
|
|
8
|
+
vertical: r,
|
|
9
|
+
horizontal: a,
|
|
10
|
+
responsive: d,
|
|
11
|
+
content: _,
|
|
12
|
+
label: c,
|
|
13
|
+
title: i,
|
|
14
|
+
description: b,
|
|
15
|
+
separator: v,
|
|
16
|
+
separatorLine: p,
|
|
17
|
+
separatorContent: g,
|
|
18
|
+
error: L,
|
|
19
|
+
errorList: u
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
_ as content,
|
|
23
|
+
h as default,
|
|
24
|
+
b as description,
|
|
25
|
+
L as error,
|
|
26
|
+
u as errorList,
|
|
27
|
+
l as field,
|
|
28
|
+
t as group,
|
|
29
|
+
a as horizontal,
|
|
30
|
+
c as label,
|
|
31
|
+
n as legend,
|
|
32
|
+
s as legendLabel,
|
|
33
|
+
o as legendLegend,
|
|
34
|
+
d as responsive,
|
|
35
|
+
v as separator,
|
|
36
|
+
g as separatorContent,
|
|
37
|
+
p as separatorLine,
|
|
38
|
+
e as set,
|
|
39
|
+
i as title,
|
|
40
|
+
r as vertical
|
|
41
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Field";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type FundCardProps = Omit<React.ComponentProps<"article">, "children"> & {
|
|
3
|
+
/** Investment option name, e.g. "สมดุล (Balanced)". */
|
|
4
|
+
name: string;
|
|
5
|
+
/** Fund manager or fund name shown above the option name. */
|
|
6
|
+
manager: string;
|
|
7
|
+
/** Price per unit in AUD, shown with 4 decimal places. */
|
|
8
|
+
unitPrice: number;
|
|
9
|
+
/** Date the unit price applies to. */
|
|
10
|
+
priceDate?: Date;
|
|
11
|
+
/** Square cover image; a placeholder is shown when omitted. */
|
|
12
|
+
image?: {
|
|
13
|
+
src: string;
|
|
14
|
+
alt: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
declare function FundCard({ name, manager, unitPrice, priceDate, image, className, ...props }: FundCardProps): React.JSX.Element;
|
|
18
|
+
export { FundCard, type FundCardProps };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsxs as e, jsx as r, Fragment as l } from "react/jsx-runtime";
|
|
2
|
+
import { PieChartIcon as d } from "@hugeicons/core-free-icons";
|
|
3
|
+
import { HugeiconsIcon as h } from "@hugeicons/react";
|
|
4
|
+
import { cn as u } from "cn";
|
|
5
|
+
import a from "./FundCard.module.css.js";
|
|
6
|
+
const p = new Intl.NumberFormat("th-TH", {
|
|
7
|
+
style: "currency",
|
|
8
|
+
currency: "AUD",
|
|
9
|
+
minimumFractionDigits: 4,
|
|
10
|
+
maximumFractionDigits: 4
|
|
11
|
+
}), f = new Intl.DateTimeFormat("th-TH", {
|
|
12
|
+
day: "numeric",
|
|
13
|
+
month: "short",
|
|
14
|
+
year: "numeric"
|
|
15
|
+
});
|
|
16
|
+
function g(t) {
|
|
17
|
+
const n = (c) => String(c).padStart(2, "0");
|
|
18
|
+
return `${t.getFullYear()}-${n(t.getMonth() + 1)}-${n(t.getDate())}`;
|
|
19
|
+
}
|
|
20
|
+
function I({
|
|
21
|
+
name: t,
|
|
22
|
+
manager: n,
|
|
23
|
+
unitPrice: c,
|
|
24
|
+
priceDate: i,
|
|
25
|
+
image: m,
|
|
26
|
+
className: o,
|
|
27
|
+
...s
|
|
28
|
+
}) {
|
|
29
|
+
return /* @__PURE__ */ e(
|
|
30
|
+
"article",
|
|
31
|
+
{
|
|
32
|
+
"data-slot": "fund-card",
|
|
33
|
+
className: u(a.root, o),
|
|
34
|
+
...s,
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ r("div", { "data-slot": "fund-card-media", className: a.media, children: m ? /* @__PURE__ */ r(
|
|
37
|
+
"img",
|
|
38
|
+
{
|
|
39
|
+
src: m.src,
|
|
40
|
+
alt: m.alt,
|
|
41
|
+
loading: "lazy",
|
|
42
|
+
decoding: "async",
|
|
43
|
+
className: a.image
|
|
44
|
+
}
|
|
45
|
+
) : /* @__PURE__ */ r("div", { className: a.placeholder, children: /* @__PURE__ */ r(h, { icon: d, strokeWidth: 1.5 }) }) }),
|
|
46
|
+
/* @__PURE__ */ e("div", { "data-slot": "fund-card-body", className: a.body, children: [
|
|
47
|
+
/* @__PURE__ */ r("p", { className: a.manager, children: n }),
|
|
48
|
+
/* @__PURE__ */ r("h3", { className: a.name, children: t }),
|
|
49
|
+
/* @__PURE__ */ e("p", { className: a.price, children: [
|
|
50
|
+
/* @__PURE__ */ r("span", { className: a.priceValue, children: p.format(c) }),
|
|
51
|
+
/* @__PURE__ */ e("span", { className: a.priceMeta, children: [
|
|
52
|
+
"ต่อหน่วย",
|
|
53
|
+
i && /* @__PURE__ */ e(l, { children: [
|
|
54
|
+
" · ณ วันที่ ",
|
|
55
|
+
/* @__PURE__ */ r("time", { dateTime: g(i), children: f.format(i) })
|
|
56
|
+
] })
|
|
57
|
+
] })
|
|
58
|
+
] })
|
|
59
|
+
] })
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
export {
|
|
65
|
+
I as FundCard
|
|
66
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const a = "labdsnov_root_kK8X8", e = "labdsnov_media_mSRTg", o = "labdsnov_image_WJtka", n = "labdsnov_placeholder_BxfOs", s = "labdsnov_body_XvStK", c = "labdsnov_manager_rHmTK", l = "labdsnov_name_I8oPF", t = "labdsnov_price_6Xz8l", d = "labdsnov_priceValue_AU45G", r = "labdsnov_priceMeta_BZEkw", _ = {
|
|
2
|
+
root: a,
|
|
3
|
+
media: e,
|
|
4
|
+
image: o,
|
|
5
|
+
placeholder: n,
|
|
6
|
+
body: s,
|
|
7
|
+
manager: c,
|
|
8
|
+
name: l,
|
|
9
|
+
price: t,
|
|
10
|
+
priceValue: d,
|
|
11
|
+
priceMeta: r
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
s as body,
|
|
15
|
+
_ as default,
|
|
16
|
+
o as image,
|
|
17
|
+
c as manager,
|
|
18
|
+
e as media,
|
|
19
|
+
l as name,
|
|
20
|
+
n as placeholder,
|
|
21
|
+
t as price,
|
|
22
|
+
r as priceMeta,
|
|
23
|
+
d as priceValue,
|
|
24
|
+
a as root
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./FundCard";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card";
|
|
2
|
+
/** A preview that opens when a link is hovered or focused, e.g. a fund's summary on its name. */
|
|
3
|
+
declare function HoverCard({ ...props }: PreviewCardPrimitive.Root.Props): import("react").JSX.Element;
|
|
4
|
+
/** The link that opens the card. It renders an `<a>`: give it an `href`. */
|
|
5
|
+
declare function HoverCardTrigger({ ...props }: PreviewCardPrimitive.Trigger.Props): import("react").JSX.Element;
|
|
6
|
+
/** The floating card, below the link by default, 288px wide. */
|
|
7
|
+
declare function HoverCardContent({ className, side, sideOffset, align, alignOffset, ...props }: PreviewCardPrimitive.Popup.Props & Pick<PreviewCardPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): import("react").JSX.Element;
|
|
8
|
+
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { PreviewCard as t } from "@base-ui/react/preview-card";
|
|
3
|
+
import { cn as s } from "cn";
|
|
4
|
+
import e from "./HoverCard.module.css.js";
|
|
5
|
+
function f({ ...r }) {
|
|
6
|
+
return /* @__PURE__ */ o(t.Root, { "data-slot": "hover-card", ...r });
|
|
7
|
+
}
|
|
8
|
+
function u({ ...r }) {
|
|
9
|
+
return /* @__PURE__ */ o(t.Trigger, { "data-slot": "hover-card-trigger", ...r });
|
|
10
|
+
}
|
|
11
|
+
function g({
|
|
12
|
+
className: r,
|
|
13
|
+
side: a = "bottom",
|
|
14
|
+
sideOffset: n = 4,
|
|
15
|
+
align: i = "center",
|
|
16
|
+
alignOffset: c = 4,
|
|
17
|
+
...d
|
|
18
|
+
}) {
|
|
19
|
+
return /* @__PURE__ */ o(t.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ o(
|
|
20
|
+
t.Positioner,
|
|
21
|
+
{
|
|
22
|
+
align: i,
|
|
23
|
+
alignOffset: c,
|
|
24
|
+
side: a,
|
|
25
|
+
sideOffset: n,
|
|
26
|
+
className: e.positioner,
|
|
27
|
+
children: /* @__PURE__ */ o(
|
|
28
|
+
t.Popup,
|
|
29
|
+
{
|
|
30
|
+
"data-slot": "hover-card-content",
|
|
31
|
+
className: s(e.content, r),
|
|
32
|
+
...d
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
) });
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
f as HoverCard,
|
|
40
|
+
g as HoverCardContent,
|
|
41
|
+
u as HoverCardTrigger
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./HoverCard";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const variantClass: {
|
|
3
|
+
readonly filled: string;
|
|
4
|
+
readonly outline: string;
|
|
5
|
+
};
|
|
6
|
+
type InputVariant = keyof typeof variantClass;
|
|
7
|
+
type InputProps = React.ComponentProps<"input"> & {
|
|
8
|
+
/** `filled` (default): tinted, borderless. `outline`: bordered, transparent. */
|
|
9
|
+
variant?: InputVariant;
|
|
10
|
+
};
|
|
11
|
+
declare function Input({ className, type, variant, ...props }: InputProps): React.JSX.Element;
|
|
12
|
+
export { Input, type InputProps, type InputVariant };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Input as l } from "@base-ui/react/input";
|
|
3
|
+
import { cn as s } from "cn";
|
|
4
|
+
import t from "./Input.module.css.js";
|
|
5
|
+
const e = {
|
|
6
|
+
filled: t.variantFilled,
|
|
7
|
+
outline: t.variantOutline
|
|
8
|
+
};
|
|
9
|
+
function d({ className: r, type: a, variant: o = "filled", ...i }) {
|
|
10
|
+
return /* @__PURE__ */ n(
|
|
11
|
+
l,
|
|
12
|
+
{
|
|
13
|
+
type: a,
|
|
14
|
+
"data-slot": "input",
|
|
15
|
+
"data-variant": o,
|
|
16
|
+
className: s(t.root, e[o], r),
|
|
17
|
+
...i
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
d as Input
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Input";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Button } from "../Button";
|
|
3
|
+
import { Input } from "../Input";
|
|
4
|
+
declare const addonAlignClass: {
|
|
5
|
+
readonly "inline-start": string;
|
|
6
|
+
readonly "inline-end": string;
|
|
7
|
+
readonly "block-start": string;
|
|
8
|
+
readonly "block-end": string;
|
|
9
|
+
};
|
|
10
|
+
type InputGroupAddonAlign = keyof typeof addonAlignClass;
|
|
11
|
+
declare const buttonSizeClass: {
|
|
12
|
+
readonly xs: string;
|
|
13
|
+
readonly sm: string;
|
|
14
|
+
readonly "icon-xs": string;
|
|
15
|
+
readonly "icon-sm": string;
|
|
16
|
+
};
|
|
17
|
+
type InputGroupButtonSize = keyof typeof buttonSizeClass;
|
|
18
|
+
/**
|
|
19
|
+
* An input with things attached inside its border: icons, text such as
|
|
20
|
+
* "AU$", or buttons. Looks like Input `filled`; the ring shows when the
|
|
21
|
+
* inner input has focus.
|
|
22
|
+
*/
|
|
23
|
+
declare function InputGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
24
|
+
/** Icon, text or button inside the group. Clicking it (outside a button) focuses the input. */
|
|
25
|
+
declare function InputGroupAddon({ className, align, onClick, ...props }: React.ComponentProps<"div"> & {
|
|
26
|
+
/** `inline-start` / `inline-end`: left / right of the input. `block-start` / `block-end`: a row above / below it. */
|
|
27
|
+
align?: InputGroupAddonAlign;
|
|
28
|
+
}): React.JSX.Element;
|
|
29
|
+
/** Small ghost button for use inside an `InputGroupAddon`. */
|
|
30
|
+
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, "size" | "type"> & {
|
|
31
|
+
size?: InputGroupButtonSize;
|
|
32
|
+
type?: "button" | "submit" | "reset";
|
|
33
|
+
}): React.JSX.Element;
|
|
34
|
+
declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
35
|
+
/** The `Input` inside the group, without its own background, border or ring. */
|
|
36
|
+
declare function InputGroupInput({ className, ...props }: React.ComponentProps<typeof Input>): React.JSX.Element;
|
|
37
|
+
/** The `Textarea` inside the group, without its own background, border or ring. */
|
|
38
|
+
declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<"textarea">): React.JSX.Element;
|
|
39
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, type InputGroupAddonAlign, type InputGroupButtonSize, };
|