@yuno-payments/dashboard-design-system 0.0.170 → 0.0.171
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/atoms/access-denied-alert/access-denied-alert.d.ts +16 -0
- package/dist/components/atoms/accordion/accordion.d.ts +66 -0
- package/dist/components/atoms/alert/alert.d.ts +26 -1
- package/dist/components/atoms/alert/alert.js +9 -8
- package/dist/components/atoms/avatar/avatar-group.d.ts +28 -0
- package/dist/components/atoms/avatar/avatar.d.ts +25 -0
- package/dist/components/atoms/avatar/avatar.js +9 -9
- package/dist/components/atoms/badge/badge.d.ts +30 -2
- package/dist/components/atoms/badge/badge.js +27 -11
- package/dist/components/atoms/button/button.d.ts +44 -0
- package/dist/components/atoms/card/card.d.ts +137 -3
- package/dist/components/atoms/card/card.js +56 -28
- package/dist/components/atoms/checkbox/checkbox.d.ts +38 -2
- package/dist/components/atoms/checkbox/checkbox.js +61 -27
- package/dist/components/atoms/combobox/combobox.d.ts +18 -0
- package/dist/components/atoms/combobox/combobox.js +41 -41
- package/dist/components/atoms/combobox/types.d.ts +90 -1
- package/dist/components/atoms/currency-field/currency-field.d.ts +38 -0
- package/dist/components/atoms/currency-field/currency-field.js +22 -19
- package/dist/components/atoms/date-picker/date-picker.d.ts +15 -0
- package/dist/components/atoms/date-range-picker/date-range-picker.d.ts +15 -0
- package/dist/components/atoms/dots-menu/dots-menu.d.ts +16 -0
- package/dist/components/atoms/dots-menu/dots-menu.js +8 -8
- package/dist/components/atoms/dots-menu/dots-menu.types.d.ts +52 -0
- package/dist/components/atoms/dropdown-menu/dropdown-menu.d.ts +50 -0
- package/dist/components/atoms/field/field.d.ts +55 -0
- package/dist/components/atoms/field/field.js +53 -46
- package/dist/components/atoms/filter/filter-date-range.d.ts +12 -2
- package/dist/components/atoms/filter/filter-date-range.js +203 -168
- package/dist/components/atoms/filter/filter.d.ts +6 -0
- package/dist/components/atoms/filter/filter.js +91 -76
- package/dist/components/atoms/filter/index.d.ts +1 -1
- package/dist/components/atoms/filter-dropdown/filter-dropdown.d.ts +208 -2
- package/dist/components/atoms/filter-dropdown/filter-dropdown.js +214 -160
- package/dist/components/atoms/icon/aida-logo.d.ts +3 -0
- package/dist/components/atoms/icon/aida-logo.js +64 -0
- package/dist/components/atoms/icon/icon-list.d.ts +5 -0
- package/dist/components/atoms/icon/icon-list.js +394 -384
- package/dist/components/atoms/icon/icon.d.ts +29 -0
- package/dist/components/atoms/index.d.ts +3 -2
- package/dist/components/atoms/label/index.d.ts +1 -1
- package/dist/components/atoms/label/label.d.ts +11 -0
- package/dist/components/atoms/label/label.js +28 -0
- package/dist/components/atoms/link/link.d.ts +20 -0
- package/dist/components/atoms/loading/index.d.ts +1 -0
- package/dist/components/atoms/loading/loading.d.ts +39 -0
- package/dist/components/atoms/loading/loading.js +37 -0
- package/dist/components/atoms/multi-select/multi-select.d.ts +1 -1
- package/dist/components/atoms/multi-select/multi-select.js +6 -6
- package/dist/components/atoms/multi-values-field/multi-values-field.d.ts +16 -0
- package/dist/components/atoms/multi-values-field/multi-values-field.js +109 -87
- package/dist/components/atoms/multi-values-field/multi-values-field.types.d.ts +81 -0
- package/dist/components/atoms/otp-field/otp-field.d.ts +32 -0
- package/dist/components/atoms/password-field/password-field.d.ts +23 -0
- package/dist/components/atoms/password-field/password-field.js +1 -1
- package/dist/components/atoms/progress/progress.d.ts +15 -0
- package/dist/components/atoms/protected-field/protected-field.d.ts +10 -0
- package/dist/components/atoms/protected-field/protected-field.types.d.ts +14 -0
- package/dist/components/atoms/radio-group/radio-group-option.js +11 -11
- package/dist/components/atoms/radio-group/radio-group.d.ts +50 -1
- package/dist/components/atoms/radio-group/radio-group.js +13 -12
- package/dist/components/atoms/search-field/search-field.d.ts +14 -0
- package/dist/components/atoms/search-field/search-field.js +17 -17
- package/dist/components/atoms/search-field/search-field.types.d.ts +57 -0
- package/dist/components/atoms/select/index.d.ts +2 -0
- package/dist/components/atoms/select/search-select.d.ts +22 -0
- package/dist/components/atoms/select/search-select.js +201 -0
- package/dist/components/atoms/select/select.d.ts +83 -1
- package/dist/components/atoms/select/select.js +21 -21
- package/dist/components/atoms/separator/separator.d.ts +17 -0
- package/dist/components/atoms/skeleton/index.d.ts +9 -0
- package/dist/components/atoms/switch/switch.d.ts +56 -2
- package/dist/components/atoms/switch/switch.js +64 -32
- package/dist/components/atoms/tabs/index.d.ts +16 -0
- package/dist/components/atoms/textarea/textarea.d.ts +32 -0
- package/dist/components/atoms/textarea/textarea.js +1 -1
- package/dist/components/atoms/time-picker/time-picker.d.ts +73 -2
- package/dist/components/atoms/time-picker/time-picker.js +218 -3
- package/dist/components/atoms/toaster/index.d.ts +15 -0
- package/dist/components/atoms/toggle-group/toggle-group.d.ts +26 -1
- package/dist/components/atoms/toggle-group/toggle-group.js +15 -14
- package/dist/components/atoms/tooltip/tooltip.d.ts +53 -2
- package/dist/components/atoms/typography/typography.d.ts +18 -0
- package/dist/components/molecules/breadcrumb/breadcrumb.d.ts +50 -0
- package/dist/components/molecules/breadcrumb/breadcrumb.js +17 -17
- package/dist/components/molecules/dialog-content/dialog-content.d.ts +16 -0
- package/dist/components/molecules/dialog-footer/dialog-footer.d.ts +20 -0
- package/dist/components/molecules/dialog-header/dialog-header.d.ts +31 -0
- package/dist/components/molecules/empty/empty-icon.js +6 -6
- package/dist/components/molecules/empty/empty.d.ts +16 -1
- package/dist/components/molecules/empty/empty.js +37 -34
- package/dist/components/molecules/highlight-banner/highlight-banner.d.ts +17 -0
- package/dist/components/molecules/pagination/pagination.d.ts +49 -0
- package/dist/components/organisms/data-table/components/cells/data-table-list-cell.d.ts +41 -0
- package/dist/components/organisms/data-table/components/column-header/data-table-column-header-content.js +1 -1
- package/dist/components/organisms/data-table/components/column-header/data-table-column-header-menu.js +18 -18
- package/dist/components/organisms/data-table/components/column-header/data-table-column-header.d.ts +18 -0
- package/dist/components/organisms/data-table/components/column-header/data-table-column-header.js +10 -10
- package/dist/components/organisms/data-table/components/data-table-body.d.ts +18 -0
- package/dist/components/organisms/data-table/components/data-table-header.d.ts +12 -0
- package/dist/components/organisms/data-table/components/data-table-header.js +7 -7
- package/dist/components/organisms/data-table/components/states/data-table-loading.d.ts +24 -0
- package/dist/components/organisms/data-table/components/states/data-table-loading.js +6 -6
- package/dist/components/organisms/data-table/data-table.d.ts +133 -4
- package/dist/components/organisms/data-table/data-table.js +132 -100
- package/dist/components/organisms/data-table/data-table.types.d.ts +35 -26
- package/dist/components/organisms/data-table/hooks/use-data-table-columns.js +57 -41
- package/dist/components/organisms/data-table/hooks/use-data-table-state.d.ts +8 -2
- package/dist/components/organisms/data-table/hooks/use-data-table-state.js +82 -47
- package/dist/components/organisms/data-table/utils/data-table-constants.d.ts +8 -2
- package/dist/components/organisms/data-table/utils/data-table-constants.js +16 -10
- package/dist/components/organisms/data-table/utils/data-table-styles.d.ts +1652 -0
- package/dist/components/organisms/data-table/utils/data-table-styles.js +29 -14
- package/dist/components/organisms/dialog/dialog.d.ts +67 -1
- package/dist/components/organisms/dialog/dialog.js +78 -61
- package/dist/components/organisms/index.d.ts +2 -0
- package/dist/components/organisms/sheet/sheet.d.ts +69 -0
- package/dist/components/organisms/sheet/sheet.js +34 -33
- package/dist/components/organisms/tutorial/index.d.ts +2 -0
- package/dist/components/organisms/tutorial/tutorial.d.ts +16 -0
- package/dist/components/organisms/tutorial/tutorial.js +114 -0
- package/dist/components/organisms/tutorial/tutorial.types.d.ts +15 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/use-body-scroll-lock.d.ts +13 -0
- package/dist/hooks/use-escape-key.d.ts +14 -0
- package/dist/hooks/use-media-query.d.ts +20 -0
- package/dist/hooks/use-media-query.js +21 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +173 -162
- package/dist/lib/notification-alert.d.ts +42 -0
- package/dist/lib/notification-alert.js +75 -0
- package/dist/node_modules/@phosphor-icons/react/dist/csr/File.es.js +8 -0
- package/dist/node_modules/@phosphor-icons/react/dist/csr/Microphone.es.js +8 -0
- package/dist/node_modules/@phosphor-icons/react/dist/csr/Stop.es.js +8 -0
- package/dist/node_modules/@phosphor-icons/react/dist/csr/Table.es.js +8 -0
- package/dist/node_modules/@phosphor-icons/react/dist/defs/File.es.js +30 -0
- package/dist/node_modules/@phosphor-icons/react/dist/defs/Microphone.es.js +36 -0
- package/dist/node_modules/@phosphor-icons/react/dist/defs/Stop.es.js +36 -0
- package/dist/node_modules/@phosphor-icons/react/dist/defs/Table.es.js +30 -0
- package/dist/vendor/shadcn/avatar.js +19 -19
- package/dist/vendor/shadcn/badge.js +15 -15
- package/dist/vendor/shadcn/card.js +7 -7
- package/dist/vendor/shadcn/date-picker.d.ts +2 -2
- package/dist/vendor/shadcn/date-picker.js +1 -1
- package/dist/vendor/shadcn/date-range-picker.d.ts +2 -2
- package/dist/vendor/shadcn/date-range-picker.js +1 -1
- package/dist/vendor/shadcn/dialog.js +2 -2
- package/dist/vendor/shadcn/input-group.js +17 -17
- package/dist/vendor/shadcn/input.js +7 -7
- package/dist/vendor/shadcn/popover.js +1 -1
- package/dist/vendor/shadcn/select.js +2 -2
- package/dist/vendor/shadcn/sonner.d.ts +26 -1
- package/dist/vendor/shadcn/sonner.js +12 -8
- package/dist/vendor/shadcn/table.js +30 -30
- package/dist/vendor/shadcn/textarea.js +9 -9
- package/dist/vendor/shadcn/time-picker.d.ts +1 -2
- package/dist/vendor/shadcn/time-picker.js +17 -23
- package/dist/vendor/shadcn/toggle.js +13 -13
- package/dist/vendor/shadcn/tooltip.js +25 -15
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as r } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cn as
|
|
2
|
+
import { forwardRef as u } from "react";
|
|
3
|
+
import { cn as s } from "../../../lib/utils.js";
|
|
4
4
|
import { cva as l } from "../../../node_modules/class-variance-authority/dist/index.js";
|
|
5
|
-
const
|
|
5
|
+
const p = l("", {
|
|
6
6
|
variants: {
|
|
7
7
|
size: {
|
|
8
8
|
xs: "text-xs",
|
|
@@ -39,32 +39,35 @@ const u = l("", {
|
|
|
39
39
|
defaultVariants: {
|
|
40
40
|
size: "sm"
|
|
41
41
|
}
|
|
42
|
-
}),
|
|
42
|
+
}), g = u(
|
|
43
43
|
({
|
|
44
44
|
value: t,
|
|
45
45
|
currency: e = "USD",
|
|
46
|
-
locales:
|
|
47
|
-
size:
|
|
48
|
-
fontWeight:
|
|
46
|
+
locales: a = "en",
|
|
47
|
+
size: n,
|
|
48
|
+
fontWeight: i = "bold",
|
|
49
49
|
className: m,
|
|
50
|
-
showCurrencyCode:
|
|
51
|
-
|
|
50
|
+
showCurrencyCode: o = !0,
|
|
51
|
+
valueClassName: x,
|
|
52
|
+
codeClassName: c
|
|
53
|
+
}, d) => {
|
|
52
54
|
if (!t && t !== 0) return null;
|
|
53
|
-
const
|
|
55
|
+
const f = new Intl.NumberFormat(a, {
|
|
54
56
|
style: "currency",
|
|
55
57
|
currency: e.length === 3 ? e : "USD",
|
|
56
58
|
currencyDisplay: "narrowSymbol",
|
|
57
59
|
minimumFractionDigits: 0,
|
|
58
60
|
maximumFractionDigits: 20
|
|
59
|
-
}).format(t)
|
|
60
|
-
return /* @__PURE__ */ r.jsxs("div", { ref:
|
|
61
|
-
/* @__PURE__ */ r.jsx("span", { className:
|
|
62
|
-
|
|
61
|
+
}).format(t);
|
|
62
|
+
return /* @__PURE__ */ r.jsxs("div", { ref: d, className: s("flex items-center gap-1", m), children: [
|
|
63
|
+
/* @__PURE__ */ r.jsx("span", { className: s(p({ size: n, fontWeight: i }), x), children: f }),
|
|
64
|
+
o && /* @__PURE__ */ r.jsx(
|
|
63
65
|
"span",
|
|
64
66
|
{
|
|
65
|
-
className:
|
|
66
|
-
b({ size:
|
|
67
|
-
"text-muted-foreground
|
|
67
|
+
className: s(
|
|
68
|
+
b({ size: n }),
|
|
69
|
+
"text-muted-foreground",
|
|
70
|
+
c
|
|
68
71
|
),
|
|
69
72
|
children: e?.toUpperCase()
|
|
70
73
|
}
|
|
@@ -72,7 +75,7 @@ const u = l("", {
|
|
|
72
75
|
] });
|
|
73
76
|
}
|
|
74
77
|
);
|
|
75
|
-
|
|
78
|
+
g.displayName = "CurrencyField";
|
|
76
79
|
export {
|
|
77
|
-
|
|
80
|
+
g as CurrencyField
|
|
78
81
|
};
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import { DatePicker as DatePickerPrimitive, DatePickerProps as DatePickerPrimitiveProps } from '../../../vendor/shadcn/date-picker';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the DatePicker component
|
|
4
|
+
*/
|
|
2
5
|
export type DatePickerProps = DatePickerPrimitiveProps;
|
|
6
|
+
/**
|
|
7
|
+
* Calendar-based date picker for selecting a single date.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <DatePicker
|
|
12
|
+
* value={selectedDate}
|
|
13
|
+
* onChange={(date) => setSelectedDate(date)}
|
|
14
|
+
* placeholder="Pick a date"
|
|
15
|
+
* />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
3
18
|
declare const DatePicker: typeof DatePickerPrimitive;
|
|
4
19
|
export { DatePicker };
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import { DateRangePicker as DateRangePickerPrimitive, DateRangePickerProps as DateRangePickerPrimitiveProps } from '../../../vendor/shadcn/date-range-picker';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the DateRangePicker component
|
|
4
|
+
*/
|
|
2
5
|
export type DateRangePickerProps = DateRangePickerPrimitiveProps;
|
|
6
|
+
/**
|
|
7
|
+
* Calendar-based picker for selecting a date range (start and end dates).
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <DateRangePicker
|
|
12
|
+
* value={{ from: startDate, to: endDate }}
|
|
13
|
+
* onChange={(range) => setDateRange(range)}
|
|
14
|
+
* placeholder="Select date range"
|
|
15
|
+
* />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
3
18
|
declare const DateRangePicker: typeof DateRangePickerPrimitive;
|
|
4
19
|
export { DateRangePicker };
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
import { DotsMenuProps } from './dots-menu.types';
|
|
2
|
+
/**
|
|
3
|
+
* Dropdown menu triggered by a three-dot icon button.
|
|
4
|
+
* Supports action items with icons, permissions, and disabled states.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* <DotsMenu
|
|
9
|
+
* options={{
|
|
10
|
+
* actions: [
|
|
11
|
+
* { key: 'edit', name: 'Edit', icon: 'PencilSimple', handleClick: handleEdit },
|
|
12
|
+
* { key: 'delete', name: 'Delete', icon: 'Trash', allowed: canDelete, handleClick: handleDelete }
|
|
13
|
+
* ]
|
|
14
|
+
* }}
|
|
15
|
+
* />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
2
18
|
export declare const DotsMenu: {
|
|
3
19
|
({ options, icon, className, disabled, marginBottom, }: DotsMenuProps): import("react/jsx-runtime").JSX.Element | null;
|
|
4
20
|
displayName: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import * as h from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { DropdownMenu as x, DropdownMenuTrigger as f, DropdownMenuContent as j, DropdownMenuItem as w } from "../dropdown-menu/dropdown-menu.js";
|
|
5
|
-
import { Button as g } from "../button/button.js";
|
|
3
|
+
import { Button as x } from "../button/button.js";
|
|
6
4
|
import { Icon as c } from "../icon/icon.js";
|
|
5
|
+
import { cn as l } from "../../../lib/utils.js";
|
|
6
|
+
import { DropdownMenu as f, DropdownMenuTrigger as j, DropdownMenuContent as w, DropdownMenuItem as g } from "../dropdown-menu/dropdown-menu.js";
|
|
7
7
|
import { Tooltip as C } from "../tooltip/tooltip.js";
|
|
8
8
|
const k = ({
|
|
9
9
|
allowed: r,
|
|
@@ -24,9 +24,9 @@ const k = ({
|
|
|
24
24
|
if (!r.actions || r.actions.length === 0)
|
|
25
25
|
return null;
|
|
26
26
|
const p = {};
|
|
27
|
-
return i !== void 0 && (p.marginBottom = `${i}px`), /* @__PURE__ */ e.jsx("div", { className: l("inline-flex relative", a), style: p, children: /* @__PURE__ */ e.jsxs(
|
|
28
|
-
/* @__PURE__ */ e.jsx(
|
|
29
|
-
|
|
27
|
+
return i !== void 0 && (p.marginBottom = `${i}px`), /* @__PURE__ */ e.jsx("div", { className: l("inline-flex relative", a), style: p, children: /* @__PURE__ */ e.jsxs(f, { open: o, onOpenChange: d, children: [
|
|
28
|
+
/* @__PURE__ */ e.jsx(j, { asChild: !0, disabled: t, children: /* @__PURE__ */ e.jsx(
|
|
29
|
+
x,
|
|
30
30
|
{
|
|
31
31
|
disabled: t,
|
|
32
32
|
variant: "ghost",
|
|
@@ -50,7 +50,7 @@ const k = ({
|
|
|
50
50
|
}
|
|
51
51
|
) }),
|
|
52
52
|
/* @__PURE__ */ e.jsx(
|
|
53
|
-
|
|
53
|
+
w,
|
|
54
54
|
{
|
|
55
55
|
id: "dots-menu",
|
|
56
56
|
align: "end",
|
|
@@ -60,7 +60,7 @@ const k = ({
|
|
|
60
60
|
{
|
|
61
61
|
allowed: s.allowed ?? !0,
|
|
62
62
|
children: /* @__PURE__ */ e.jsxs(
|
|
63
|
-
|
|
63
|
+
g,
|
|
64
64
|
{
|
|
65
65
|
onClick: () => u(s),
|
|
66
66
|
disabled: !s.allowed,
|
|
@@ -1,20 +1,72 @@
|
|
|
1
1
|
import { IconName } from '../icon';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a single action in the dots menu
|
|
4
|
+
*/
|
|
2
5
|
export interface DotsMenuAction {
|
|
6
|
+
/**
|
|
7
|
+
* Display name for the action
|
|
8
|
+
*/
|
|
3
9
|
name?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Unique identifier for the action
|
|
12
|
+
*/
|
|
4
13
|
key: number | string;
|
|
14
|
+
/**
|
|
15
|
+
* Icon to display for the action
|
|
16
|
+
*/
|
|
5
17
|
icon: IconName;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the action is allowed (shows tooltip if false)
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
6
22
|
allowed?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Callback fired when the action is clicked
|
|
25
|
+
*/
|
|
7
26
|
handleClick?: (options?: unknown) => void;
|
|
8
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Options configuration for the dots menu
|
|
30
|
+
*/
|
|
9
31
|
export interface DotsMenuOptions {
|
|
32
|
+
/**
|
|
33
|
+
* Array of actions to display in the menu
|
|
34
|
+
*/
|
|
10
35
|
actions?: DotsMenuAction[];
|
|
36
|
+
/**
|
|
37
|
+
* Additional data that can be passed to action handlers
|
|
38
|
+
*/
|
|
11
39
|
[key: string]: unknown;
|
|
12
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Props for the DotsMenu component
|
|
43
|
+
*/
|
|
13
44
|
export interface DotsMenuProps {
|
|
45
|
+
/**
|
|
46
|
+
* Configuration object containing actions and data
|
|
47
|
+
*/
|
|
14
48
|
options: DotsMenuOptions;
|
|
49
|
+
/**
|
|
50
|
+
* Whether the menu trigger is disabled
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
15
53
|
disabled?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Custom icon for the menu trigger (null uses default dots)
|
|
56
|
+
* @default null
|
|
57
|
+
*/
|
|
16
58
|
icon?: IconName | null;
|
|
59
|
+
/**
|
|
60
|
+
* Additional CSS classes
|
|
61
|
+
*/
|
|
17
62
|
className?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Whether to remove absolute positioning
|
|
65
|
+
* @default false
|
|
66
|
+
*/
|
|
18
67
|
withoutAbsolute?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Bottom margin in pixels
|
|
70
|
+
*/
|
|
19
71
|
marginBottom?: number;
|
|
20
72
|
}
|
|
@@ -1,20 +1,51 @@
|
|
|
1
1
|
import { DropdownMenu as ShadcnDropdownMenu, DropdownMenuPortal as ShadcnDropdownMenuPortal, DropdownMenuTrigger as ShadcnDropdownMenuTrigger, DropdownMenuContent as ShadcnDropdownMenuContent, DropdownMenuGroup as ShadcnDropdownMenuGroup, DropdownMenuLabel as ShadcnDropdownMenuLabel, DropdownMenuItem as ShadcnDropdownMenuItem, DropdownMenuCheckboxItem as ShadcnDropdownMenuCheckboxItem, DropdownMenuRadioGroup as ShadcnDropdownMenuRadioGroup, DropdownMenuRadioItem as ShadcnDropdownMenuRadioItem, DropdownMenuSeparator as ShadcnDropdownMenuSeparator, DropdownMenuSub as ShadcnDropdownMenuSub, DropdownMenuSubTrigger as ShadcnDropdownMenuSubTrigger, DropdownMenuSubContent as ShadcnDropdownMenuSubContent } from '../../../vendor/shadcn/dropdown-menu';
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Props for the DropdownMenu root component
|
|
5
|
+
*/
|
|
3
6
|
export interface DropdownMenuProps extends React.ComponentPropsWithoutRef<typeof ShadcnDropdownMenu> {
|
|
4
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Props for the DropdownMenuPortal component
|
|
10
|
+
*/
|
|
5
11
|
export interface DropdownMenuPortalProps extends React.ComponentPropsWithoutRef<typeof ShadcnDropdownMenuPortal> {
|
|
6
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Props for the DropdownMenuTrigger component
|
|
15
|
+
*/
|
|
7
16
|
export interface DropdownMenuTriggerProps extends React.ComponentPropsWithoutRef<typeof ShadcnDropdownMenuTrigger> {
|
|
8
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Props for the DropdownMenuContent component
|
|
20
|
+
*/
|
|
9
21
|
export interface DropdownMenuContentProps extends React.ComponentPropsWithoutRef<typeof ShadcnDropdownMenuContent> {
|
|
10
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Props for the DropdownMenuGroup component
|
|
25
|
+
*/
|
|
11
26
|
export interface DropdownMenuGroupProps extends React.ComponentPropsWithoutRef<typeof ShadcnDropdownMenuGroup> {
|
|
12
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Props for the DropdownMenuLabel component
|
|
30
|
+
*/
|
|
13
31
|
export interface DropdownMenuLabelProps extends React.ComponentPropsWithoutRef<typeof ShadcnDropdownMenuLabel> {
|
|
32
|
+
/**
|
|
33
|
+
* Whether to apply inset padding
|
|
34
|
+
*/
|
|
14
35
|
inset?: boolean;
|
|
15
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Props for the DropdownMenuItem component
|
|
39
|
+
*/
|
|
16
40
|
export interface DropdownMenuItemProps extends React.ComponentPropsWithoutRef<typeof ShadcnDropdownMenuItem> {
|
|
41
|
+
/**
|
|
42
|
+
* Whether to apply inset padding
|
|
43
|
+
*/
|
|
17
44
|
inset?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Visual variant of the menu item
|
|
47
|
+
* @default "default"
|
|
48
|
+
*/
|
|
18
49
|
variant?: "default" | "destructive";
|
|
19
50
|
}
|
|
20
51
|
export interface DropdownMenuCheckboxItemProps extends React.ComponentPropsWithoutRef<typeof ShadcnDropdownMenuCheckboxItem> {
|
|
@@ -34,6 +65,25 @@ export interface DropdownMenuSubTriggerProps extends React.ComponentPropsWithout
|
|
|
34
65
|
}
|
|
35
66
|
export interface DropdownMenuSubContentProps extends React.ComponentPropsWithoutRef<typeof ShadcnDropdownMenuSubContent> {
|
|
36
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Dropdown menu component for displaying a list of actions or options.
|
|
70
|
+
* Composed of multiple sub-components for flexible menu structures.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```tsx
|
|
74
|
+
* <DropdownMenu>
|
|
75
|
+
* <DropdownMenuTrigger asChild>
|
|
76
|
+
* <Button>Open Menu</Button>
|
|
77
|
+
* </DropdownMenuTrigger>
|
|
78
|
+
* <DropdownMenuContent>
|
|
79
|
+
* <DropdownMenuItem>Profile</DropdownMenuItem>
|
|
80
|
+
* <DropdownMenuItem>Settings</DropdownMenuItem>
|
|
81
|
+
* <DropdownMenuSeparator />
|
|
82
|
+
* <DropdownMenuItem variant="destructive">Logout</DropdownMenuItem>
|
|
83
|
+
* </DropdownMenuContent>
|
|
84
|
+
* </DropdownMenu>
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
37
87
|
declare const DropdownMenu: {
|
|
38
88
|
({ children, ...props }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
39
89
|
displayName: string;
|
|
@@ -1,18 +1,73 @@
|
|
|
1
1
|
import { ComponentProps, InputHTMLAttributes } from 'react';
|
|
2
2
|
import { ButtonProps } from '../button';
|
|
3
3
|
import { Icon, IconName } from '../icon';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the Field component
|
|
6
|
+
*/
|
|
4
7
|
export interface FieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "className"> {
|
|
8
|
+
/**
|
|
9
|
+
* Label text displayed above the input
|
|
10
|
+
*/
|
|
5
11
|
label?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Helper text displayed below the input
|
|
14
|
+
*/
|
|
6
15
|
description?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Error message displayed below the input (overrides description)
|
|
18
|
+
*/
|
|
7
19
|
error?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Optional button to display next to the input
|
|
22
|
+
*/
|
|
8
23
|
button?: ButtonProps;
|
|
24
|
+
/**
|
|
25
|
+
* Icon to display at the start (left side) of the input
|
|
26
|
+
*/
|
|
9
27
|
startIcon?: IconName;
|
|
28
|
+
/**
|
|
29
|
+
* Additional props to pass to the start icon
|
|
30
|
+
*/
|
|
10
31
|
startIconProps?: ComponentProps<typeof Icon>;
|
|
32
|
+
/**
|
|
33
|
+
* Icon to display at the end (right side) of the input
|
|
34
|
+
*/
|
|
11
35
|
endIcon?: IconName;
|
|
36
|
+
/**
|
|
37
|
+
* Additional props to pass to the end icon
|
|
38
|
+
*/
|
|
12
39
|
endIconProps?: Partial<ComponentProps<typeof Icon>>;
|
|
40
|
+
/**
|
|
41
|
+
* Layout orientation of the label and input
|
|
42
|
+
* @default "vertical"
|
|
43
|
+
*/
|
|
13
44
|
orientation?: "vertical" | "horizontal" | "responsive";
|
|
45
|
+
/**
|
|
46
|
+
* Additional CSS classes for the field container
|
|
47
|
+
*/
|
|
14
48
|
className?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Additional props to pass to the input element
|
|
51
|
+
*/
|
|
15
52
|
inputProps?: InputHTMLAttributes<HTMLInputElement>;
|
|
16
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Form field component with label, description, error handling, and icon support.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```tsx
|
|
59
|
+
* <Field
|
|
60
|
+
* label="Email"
|
|
61
|
+
* placeholder="Enter your email"
|
|
62
|
+
* startIcon="Envelope"
|
|
63
|
+
* description="We'll never share your email"
|
|
64
|
+
* />
|
|
65
|
+
* <Field
|
|
66
|
+
* label="Search"
|
|
67
|
+
* endIcon="MagnifyingGlass"
|
|
68
|
+
* error="Invalid search query"
|
|
69
|
+
* />
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
17
72
|
declare const Field: import('react').ForwardRefExoticComponent<FieldProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
18
73
|
export { Field };
|
|
@@ -1,84 +1,91 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { forwardRef as $, useId as
|
|
3
|
-
import { InputGroup as
|
|
4
|
-
import { cn as
|
|
5
|
-
import {
|
|
2
|
+
import { forwardRef as $, useId as E } from "react";
|
|
3
|
+
import { InputGroup as G, InputGroupAddon as f, InputGroupInput as b } from "../../../vendor/shadcn/input-group.js";
|
|
4
|
+
import { cn as a } from "../../../lib/utils.js";
|
|
5
|
+
import { Button as w } from "../button/button.js";
|
|
6
6
|
import { Icon as j } from "../icon/icon.js";
|
|
7
|
-
import {
|
|
7
|
+
import { Field as y, FieldLabel as z, FieldDescription as B, FieldError as I } from "../../../vendor/shadcn/field.js";
|
|
8
8
|
const R = $(
|
|
9
9
|
({
|
|
10
10
|
className: p,
|
|
11
|
-
orientation:
|
|
12
|
-
label:
|
|
13
|
-
description:
|
|
11
|
+
orientation: N = "vertical",
|
|
12
|
+
label: c,
|
|
13
|
+
description: l,
|
|
14
14
|
error: i,
|
|
15
|
-
id:
|
|
16
|
-
button:
|
|
17
|
-
disabled:
|
|
18
|
-
startIcon:
|
|
19
|
-
startIconProps:
|
|
20
|
-
endIcon:
|
|
21
|
-
endIconProps:
|
|
22
|
-
inputProps:
|
|
15
|
+
id: h,
|
|
16
|
+
button: o,
|
|
17
|
+
disabled: d,
|
|
18
|
+
startIcon: u,
|
|
19
|
+
startIconProps: r,
|
|
20
|
+
endIcon: x,
|
|
21
|
+
endIconProps: m,
|
|
22
|
+
inputProps: t,
|
|
23
23
|
...v
|
|
24
|
-
},
|
|
25
|
-
const
|
|
24
|
+
}, g) => {
|
|
25
|
+
const F = E(), s = h || t?.id || F, n = !!i;
|
|
26
26
|
return /* @__PURE__ */ e.jsxs(
|
|
27
|
-
|
|
27
|
+
y,
|
|
28
28
|
{
|
|
29
|
-
orientation:
|
|
30
|
-
"data-invalid":
|
|
31
|
-
className:
|
|
29
|
+
orientation: N,
|
|
30
|
+
"data-invalid": n,
|
|
31
|
+
className: a("w-full", p),
|
|
32
32
|
children: [
|
|
33
|
-
|
|
33
|
+
c && /* @__PURE__ */ e.jsx(
|
|
34
|
+
z,
|
|
35
|
+
{
|
|
36
|
+
htmlFor: s,
|
|
37
|
+
className: a(d && "text-muted-foreground"),
|
|
38
|
+
children: c
|
|
39
|
+
}
|
|
40
|
+
),
|
|
34
41
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 flex-1", children: [
|
|
35
42
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
36
|
-
/* @__PURE__ */ e.jsxs(
|
|
37
|
-
|
|
43
|
+
/* @__PURE__ */ e.jsxs(G, { className: "flex-1", children: [
|
|
44
|
+
u && /* @__PURE__ */ e.jsx(f, { align: "inline-start", children: /* @__PURE__ */ e.jsx(
|
|
38
45
|
j,
|
|
39
46
|
{
|
|
40
|
-
name:
|
|
47
|
+
name: r?.name || u,
|
|
41
48
|
size: "sm",
|
|
42
|
-
...
|
|
43
|
-
className:
|
|
49
|
+
...r,
|
|
50
|
+
className: a(
|
|
44
51
|
"cursor-default text-muted-foreground",
|
|
45
|
-
|
|
52
|
+
r?.className
|
|
46
53
|
)
|
|
47
54
|
}
|
|
48
55
|
) }),
|
|
49
56
|
/* @__PURE__ */ e.jsx(
|
|
50
|
-
|
|
57
|
+
b,
|
|
51
58
|
{
|
|
52
|
-
ref:
|
|
53
|
-
disabled:
|
|
54
|
-
className:
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
ref: g,
|
|
60
|
+
disabled: d,
|
|
61
|
+
className: a(
|
|
62
|
+
n && "border-destructive focus-visible:border-destructive",
|
|
63
|
+
t?.className
|
|
57
64
|
),
|
|
58
|
-
"aria-invalid":
|
|
59
|
-
"aria-describedby":
|
|
65
|
+
"aria-invalid": n ? !0 : void 0,
|
|
66
|
+
"aria-describedby": l || i ? `${s}-description` : void 0,
|
|
60
67
|
...v,
|
|
61
|
-
...
|
|
68
|
+
...t,
|
|
62
69
|
id: s
|
|
63
70
|
}
|
|
64
71
|
),
|
|
65
|
-
|
|
72
|
+
x && /* @__PURE__ */ e.jsx(f, { align: "inline-end", children: /* @__PURE__ */ e.jsx(
|
|
66
73
|
j,
|
|
67
74
|
{
|
|
68
|
-
name:
|
|
75
|
+
name: m?.name || x,
|
|
69
76
|
size: "sm",
|
|
70
|
-
...
|
|
71
|
-
className:
|
|
77
|
+
...m,
|
|
78
|
+
className: a(
|
|
72
79
|
"cursor-default text-muted-foreground",
|
|
73
|
-
|
|
80
|
+
m?.className
|
|
74
81
|
)
|
|
75
82
|
}
|
|
76
83
|
) })
|
|
77
84
|
] }),
|
|
78
|
-
|
|
85
|
+
o && /* @__PURE__ */ e.jsx(w, { disabled: d, ...o })
|
|
79
86
|
] }),
|
|
80
|
-
|
|
81
|
-
i && /* @__PURE__ */ e.jsx(
|
|
87
|
+
l && !i && /* @__PURE__ */ e.jsx(B, { id: `${s}-description`, children: l }),
|
|
88
|
+
i && /* @__PURE__ */ e.jsx(I, { id: `${s}-description`, children: i })
|
|
82
89
|
] })
|
|
83
90
|
]
|
|
84
91
|
}
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { RadioGroup } from '../../../vendor/shadcn/radio-group';
|
|
3
|
-
|
|
3
|
+
export declare const FilterDateRangeValue: {
|
|
4
|
+
readonly CUSTOM: "CUSTOM";
|
|
5
|
+
readonly TODAY: "TODAY";
|
|
6
|
+
readonly LAST_3_DAYS: "LAST_3_DAYS";
|
|
7
|
+
readonly LAST_7_DAYS: "LAST_7_DAYS";
|
|
8
|
+
readonly LAST_30_DAYS: "LAST_30_DAYS";
|
|
9
|
+
readonly THIS_MONTH: "THIS_MONTH";
|
|
10
|
+
readonly ALL_TIME: "ALL_TIME";
|
|
11
|
+
};
|
|
12
|
+
export type FilterDateRangeValueType = typeof FilterDateRangeValue[keyof typeof FilterDateRangeValue];
|
|
13
|
+
interface FilterDateRangeOptionProps extends ComponentProps<"label"> {
|
|
4
14
|
label: string;
|
|
5
15
|
description?: string;
|
|
6
16
|
value: string;
|
|
7
17
|
}
|
|
8
|
-
declare const FilterDateRangeOption: import('react').ForwardRefExoticComponent<Omit<FilterDateRangeOptionProps, "ref"> & import('react').RefAttributes<
|
|
18
|
+
declare const FilterDateRangeOption: import('react').ForwardRefExoticComponent<Omit<FilterDateRangeOptionProps, "ref"> & import('react').RefAttributes<HTMLLabelElement>>;
|
|
9
19
|
interface FilterDateRangeProps extends ComponentProps<typeof RadioGroup> {
|
|
10
20
|
showCustomFields?: boolean;
|
|
11
21
|
onCustomFieldsChange?: (show: boolean) => void;
|