@godxjp/ui 13.1.0 → 13.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{checkbox-shzpQ_Xo.d.ts → checkbox-DKaBna6z.d.ts} +1 -1
- package/dist/{chunk-55S5N667.js → chunk-33AJDSML.js} +1 -1
- package/dist/{chunk-7MXIPSYM.js → chunk-4GZQHBHV.js} +2 -2
- package/dist/{chunk-X4J55OS5.js → chunk-5NIGHXT5.js} +2 -2
- package/dist/{chunk-AKFR72DQ.js → chunk-74OPJG3N.js} +48 -50
- package/dist/{chunk-M4PZNAMV.js → chunk-E6J7ZTDM.js} +17 -8
- package/dist/{chunk-KQ36FDEE.js → chunk-HBOL5LSC.js} +1 -1
- package/dist/{chunk-XUEDRPWF.js → chunk-IMERLXSC.js} +2 -2
- package/dist/{chunk-2M57K2VW.js → chunk-JW34DXZ3.js} +2 -2
- package/dist/{chunk-7HEFQDN5.js → chunk-LEVFHRHU.js} +2 -2
- package/dist/{chunk-W2NWOWZ3.js → chunk-LF7XRNCF.js} +3 -3
- package/dist/{chunk-MTJHEQ46.js → chunk-MQ5F4T5A.js} +47 -49
- package/dist/{chunk-I2CYVA7B.js → chunk-NXF64JCT.js} +1 -1
- package/dist/{chunk-DWYRIKVD.js → chunk-SVJK3LBZ.js} +2 -2
- package/dist/{chunk-CRERCLIZ.js → chunk-TBJBVEIP.js} +21 -2
- package/dist/{chunk-YVZPAN2W.js → chunk-UVJE3FYT.js} +1 -1
- package/dist/{chunk-IZGLEPGW.js → chunk-XGXI52Z7.js} +21 -4
- package/dist/{chunk-IWAIIBSW.js → chunk-XY2QN4VR.js} +1 -1
- package/dist/{chunk-XTVUYEJD.js → chunk-Z37463ZK.js} +60 -2
- package/dist/{chunk-5KK3KJ6L.js → chunk-ZKUB7DHO.js} +1 -1
- package/dist/components/admin/index.d.ts +9 -9
- package/dist/components/admin/index.js +22 -22
- package/dist/components/data-display/badge.d.ts +8 -5
- package/dist/components/data-display/badge.js +1 -1
- package/dist/components/data-display/card.d.ts +2 -2
- package/dist/components/data-display/index.d.ts +4 -4
- package/dist/components/data-display/index.js +5 -5
- package/dist/components/data-entry/calendar.d.ts +3 -3
- package/dist/components/data-entry/calendar.js +2 -2
- package/dist/components/data-entry/cascader.d.ts +3 -3
- package/dist/components/data-entry/cascader.js +2 -2
- package/dist/components/data-entry/checkbox.d.ts +4 -4
- package/dist/components/data-entry/color-picker.d.ts +3 -3
- package/dist/components/data-entry/date-picker.d.ts +3 -3
- package/dist/components/data-entry/date-picker.js +3 -3
- package/dist/components/data-entry/date-range-picker.d.ts +3 -3
- package/dist/components/data-entry/date-range-picker.js +3 -3
- package/dist/components/data-entry/index.d.ts +5 -5
- package/dist/components/data-entry/index.js +15 -15
- package/dist/components/data-entry/radio.d.ts +3 -3
- package/dist/components/data-entry/select.d.ts +3 -3
- package/dist/components/data-entry/select.js +2 -2
- package/dist/components/data-entry/slider.d.ts +3 -3
- package/dist/components/data-entry/slider.js +1 -1
- package/dist/components/data-entry/switch.d.ts +3 -3
- package/dist/components/data-entry/time-picker.d.ts +3 -3
- package/dist/components/data-entry/time-picker.js +2 -2
- package/dist/components/data-entry/transfer.d.ts +4 -4
- package/dist/components/data-entry/transfer.js +3 -3
- package/dist/components/data-entry/tree-select.d.ts +3 -3
- package/dist/components/data-entry/tree-select.js +2 -2
- package/dist/components/data-entry/upload.d.ts +4 -4
- package/dist/components/data-entry/upload.js +5 -5
- package/dist/components/data-grid/index.js +3 -3
- package/dist/components/feedback/alert.d.ts +3 -3
- package/dist/components/feedback/alert.js +2 -2
- package/dist/components/feedback/dialog.d.ts +2 -2
- package/dist/components/feedback/dialog.js +3 -3
- package/dist/components/feedback/index.d.ts +2 -2
- package/dist/components/feedback/index.js +6 -6
- package/dist/components/feedback/sheet.d.ts +1 -1
- package/dist/components/feedback/sheet.js +1 -1
- package/dist/components/general/button.d.ts +5 -3
- package/dist/components/general/button.js +1 -1
- package/dist/components/general/index.d.ts +34 -3
- package/dist/components/general/index.js +46 -2
- package/dist/components/layout/index.js +2 -2
- package/dist/components/navigation/index.d.ts +4 -4
- package/dist/components/navigation/index.js +4 -4
- package/dist/components/navigation/pagination.d.ts +3 -3
- package/dist/components/navigation/pagination.js +3 -3
- package/dist/components/navigation/steps.d.ts +4 -4
- package/dist/components/query/index.d.ts +3 -3
- package/dist/components/query/index.js +2 -2
- package/dist/components/ui/index.d.ts +7 -7
- package/dist/components/ui/index.js +19 -19
- package/dist/{data-display.prop-BOtnzI17.d.ts → data-display.prop-BCC2zOTq.d.ts} +2 -2
- package/dist/{data-entry.prop-DL7kUcJh.d.ts → data-entry.prop-BGlwRXlJ.d.ts} +2 -2
- package/dist/{data-table-DO-gU4wJ.d.ts → data-table-B6HC3EFK.d.ts} +3 -3
- package/dist/{data.prop-D4uDw_SW.d.ts → data.prop-H9nROsUg.d.ts} +1 -1
- package/dist/{feedback.prop-CtrL24E1.d.ts → feedback.prop-sEx89LTF.d.ts} +1 -1
- package/dist/{filter-bar-tEwfKthz.d.ts → filter-bar-DPMQmIpX.d.ts} +1 -1
- package/dist/general.prop-4ERae5Sj.d.ts +46 -0
- package/dist/index.d.ts +9 -9
- package/dist/index.js +28 -28
- package/dist/interaction.prop-B44hePpl.d.ts +46 -0
- package/dist/{navigation.prop-Cc_Iu87S.d.ts → navigation.prop-DMbjEig7.d.ts} +1 -1
- package/dist/props/components/index.d.ts +8 -8
- package/dist/props/index.d.ts +8 -8
- package/dist/props/index.js +2 -2
- package/dist/props/registry.d.ts +47 -2
- package/dist/props/registry.js +1 -1
- package/dist/props/vocabulary/index.d.ts +2 -2
- package/dist/{query.prop-CyNxaCHe.d.ts → query.prop-cp6fEgOD.d.ts} +1 -1
- package/dist/{search-input-CFUtVWQl.d.ts → search-input-CxGW8_7q.d.ts} +1 -1
- package/dist/styles/badge-layout.css +4 -0
- package/dist/styles/dialog-layout.css +30 -11
- package/dist/styles/index.css +1 -0
- package/dist/styles/text-layout.css +119 -0
- package/package.json +1 -1
- package/dist/general.prop-1GgJkf4b.d.ts +0 -16
- package/dist/interaction.prop-R77MnAMZ.d.ts +0 -31
- package/dist/{chunk-QATON677.js → chunk-DEUHS5A2.js} +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { b as CheckboxGroupProp } from './data-entry.prop-
|
|
4
|
+
import { b as CheckboxGroupProp } from './data-entry.prop-BGlwRXlJ.js';
|
|
5
5
|
|
|
6
6
|
declare function CheckboxGroup({ value: controlledValue, defaultValue, onValueChange, options, orientation, disabled, name, className, children, }: CheckboxGroupProp): react_jsx_runtime.JSX.Element;
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { normalizeTreeOptions, formatPathLabels, getNodeByPath, filterTreeOptions, pathsEqual, pathKey } from './chunk-SMLKNECP.js';
|
|
2
2
|
import { Command, CommandInput } from './chunk-3R3QVJCB.js';
|
|
3
|
-
import { Button } from './chunk-
|
|
3
|
+
import { Button } from './chunk-E6J7ZTDM.js';
|
|
4
4
|
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
5
5
|
import { ScrollArea, ScrollBar } from './chunk-3KPEZ5CF.js';
|
|
6
6
|
import { controlOpenRingClass } from './chunk-B4K4BXEF.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Input } from './chunk-BNXPDUO4.js';
|
|
2
1
|
import { overlayHeaderToneClass } from './chunk-VU4GFGDG.js';
|
|
3
|
-
import {
|
|
2
|
+
import { Input } from './chunk-BNXPDUO4.js';
|
|
3
|
+
import { buttonVariants, Button } from './chunk-E6J7ZTDM.js';
|
|
4
4
|
import { Label } from './chunk-7PWBC4BY.js';
|
|
5
5
|
import { useTranslation } from './chunk-H2TX3OPW.js';
|
|
6
6
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-
|
|
2
|
-
import { Button } from './chunk-
|
|
1
|
+
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-NXF64JCT.js';
|
|
2
|
+
import { Button } from './chunk-E6J7ZTDM.js';
|
|
3
3
|
import { useOptionalAppContext, useTranslation, APP_TIME_FORMAT_OPTIONS, getTimeFormatLabel, resolveTimezonePickerOptions, getTimezoneLabel, APP_LOCALES } from './chunk-H2TX3OPW.js';
|
|
4
4
|
import { APP_DATE_FORMAT_OPTIONS, getDateFormatLabel } from './chunk-JEIUEOTJ.js';
|
|
5
5
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Calendar } from './chunk-
|
|
1
|
+
import { Calendar } from './chunk-HBOL5LSC.js';
|
|
2
2
|
import { Input } from './chunk-BNXPDUO4.js';
|
|
3
|
-
import { Button } from './chunk-
|
|
4
|
-
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
3
|
+
import { Button } from './chunk-E6J7ZTDM.js';
|
|
4
|
+
import { Popover, PopoverAnchor, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
5
5
|
import { useTranslation, usePickerLocales } from './chunk-H2TX3OPW.js';
|
|
6
6
|
import { toIsoDate, parseDateInput } from './chunk-JEIUEOTJ.js';
|
|
7
7
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { CalendarIcon } from 'lucide-react';
|
|
10
|
-
import {
|
|
10
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
11
|
|
|
12
12
|
var ISO_HINT = "yyyy-mm-dd";
|
|
13
13
|
function DateRangePicker({
|
|
@@ -47,7 +47,7 @@ function DateRangePicker({
|
|
|
47
47
|
const next = { from: value?.from, to: value?.to, [edge]: parsed };
|
|
48
48
|
emit(next.from || next.to ? next : void 0);
|
|
49
49
|
};
|
|
50
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-1", className), children: [
|
|
50
|
+
return /* @__PURE__ */ jsx(Popover, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsx(PopoverAnchor, { asChild: true, children: /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-1", className), children: [
|
|
51
51
|
/* @__PURE__ */ jsx(
|
|
52
52
|
Input,
|
|
53
53
|
{
|
|
@@ -114,51 +114,49 @@ function DateRangePicker({
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
] })
|
|
161
|
-
] });
|
|
117
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
118
|
+
Button,
|
|
119
|
+
{
|
|
120
|
+
type: "button",
|
|
121
|
+
variant: "ghost",
|
|
122
|
+
size: "icon",
|
|
123
|
+
disabled,
|
|
124
|
+
tabIndex: -1,
|
|
125
|
+
"aria-label": t("dataEntry.dateRangePicker.openCalendar") ?? "Open calendar",
|
|
126
|
+
className: "text-muted-foreground shrink-0 hover:bg-transparent",
|
|
127
|
+
children: /* @__PURE__ */ jsx(CalendarIcon, { className: "size-4 shrink-0", "aria-hidden": "true" })
|
|
128
|
+
}
|
|
129
|
+
) }),
|
|
130
|
+
/* @__PURE__ */ jsx(
|
|
131
|
+
PopoverContent,
|
|
132
|
+
{
|
|
133
|
+
className: "w-auto p-0",
|
|
134
|
+
align: "start",
|
|
135
|
+
onOpenAutoFocus: (event) => event.preventDefault(),
|
|
136
|
+
children: /* @__PURE__ */ jsx(
|
|
137
|
+
Calendar,
|
|
138
|
+
{
|
|
139
|
+
mode: "range",
|
|
140
|
+
selected: value,
|
|
141
|
+
defaultMonth: value?.from,
|
|
142
|
+
numberOfMonths: 2,
|
|
143
|
+
onSelect: (range) => {
|
|
144
|
+
emit(range);
|
|
145
|
+
setFromText(toIsoDate(range?.from));
|
|
146
|
+
setToText(toIsoDate(range?.to));
|
|
147
|
+
},
|
|
148
|
+
locale: dayPickerLocale,
|
|
149
|
+
disabled: [
|
|
150
|
+
...fromDate ? [{ before: fromDate }] : [],
|
|
151
|
+
...toDate ? [{ after: toDate }] : []
|
|
152
|
+
],
|
|
153
|
+
startMonth: fromDate,
|
|
154
|
+
endMonth: toDate
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
] }) }) });
|
|
162
160
|
}
|
|
163
161
|
|
|
164
162
|
export { DateRangePicker };
|
|
@@ -10,6 +10,7 @@ var buttonVariants = cva("ui-button", {
|
|
|
10
10
|
default: "ui-button--default bg-primary text-primary-foreground hover:bg-primary/90",
|
|
11
11
|
destructive: "ui-button--destructive bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20",
|
|
12
12
|
outline: "ui-button--outline border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",
|
|
13
|
+
dashed: "ui-button--dashed border border-dashed bg-background hover:bg-accent hover:text-accent-foreground",
|
|
13
14
|
secondary: "ui-button--secondary bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
14
15
|
ghost: "ui-button--ghost hover:bg-accent hover:text-accent-foreground",
|
|
15
16
|
link: "ui-button--link text-primary underline-offset-4 hover:underline"
|
|
@@ -17,19 +18,26 @@ var buttonVariants = cva("ui-button", {
|
|
|
17
18
|
size: {
|
|
18
19
|
default: "ui-button--default-size py-2 has-[>svg]:px-3",
|
|
19
20
|
md: "ui-button--default-size py-2 has-[>svg]:px-3",
|
|
20
|
-
xs: "h-[calc(var(--control-height)-0.75rem)] gap-1
|
|
21
|
-
sm: "ui-button--sm gap-1.5
|
|
22
|
-
lg: "ui-button--lg
|
|
21
|
+
xs: "h-[calc(var(--control-height)-0.75rem)] gap-1 px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
22
|
+
sm: "ui-button--sm gap-1.5 has-[>svg]:px-2.5",
|
|
23
|
+
lg: "ui-button--lg has-[>svg]:px-4",
|
|
23
24
|
icon: "ui-button--icon",
|
|
24
|
-
"icon-xs": "size-[calc(var(--control-height)-0.75rem)]
|
|
25
|
+
"icon-xs": "size-[calc(var(--control-height)-0.75rem)] [&_svg:not([class*='size-'])]:size-3",
|
|
25
26
|
"icon-sm": "size-[calc(var(--control-height)-0.5rem)]",
|
|
26
27
|
"icon-lg": "size-[calc(var(--control-height)+0.25rem)]"
|
|
28
|
+
},
|
|
29
|
+
// Single source of corner radius (deterministic — no competing rounded-* utility): default uses
|
|
30
|
+
// the control radius token, pill is fully rounded, sharp is square.
|
|
31
|
+
shape: {
|
|
32
|
+
default: "rounded-md",
|
|
33
|
+
pill: "rounded-[var(--radius-pill)]",
|
|
34
|
+
sharp: "rounded-[var(--radius-sharp)]"
|
|
27
35
|
}
|
|
28
36
|
},
|
|
29
|
-
defaultVariants: { variant: "default", size: "default" }
|
|
37
|
+
defaultVariants: { variant: "default", size: "default", shape: "default" }
|
|
30
38
|
});
|
|
31
39
|
var Button = React.forwardRef(
|
|
32
|
-
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
40
|
+
({ className, variant, size, shape, asChild = false, ...props }, ref) => {
|
|
33
41
|
const Comp = asChild ? Slot : "button";
|
|
34
42
|
return /* @__PURE__ */ jsx(
|
|
35
43
|
Comp,
|
|
@@ -37,13 +45,14 @@ var Button = React.forwardRef(
|
|
|
37
45
|
"data-slot": "button",
|
|
38
46
|
"data-variant": variant ?? "default",
|
|
39
47
|
"data-size": size ?? "default",
|
|
48
|
+
"data-shape": shape ?? "default",
|
|
40
49
|
className: cn(
|
|
41
|
-
"inline-flex shrink-0 items-center justify-center gap-2
|
|
50
|
+
"inline-flex shrink-0 items-center justify-center gap-2 text-sm font-medium whitespace-nowrap transition-all outline-none",
|
|
42
51
|
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
43
52
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
44
53
|
"aria-invalid:border-destructive aria-invalid:ring-destructive/20",
|
|
45
54
|
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
46
|
-
buttonVariants({ variant, size, className })
|
|
55
|
+
buttonVariants({ variant, size, shape, className })
|
|
47
56
|
),
|
|
48
57
|
ref,
|
|
49
58
|
...props
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buttonVariants } from './chunk-
|
|
1
|
+
import { buttonVariants } from './chunk-E6J7ZTDM.js';
|
|
2
2
|
import { controlIconSmClass } from './chunk-B4K4BXEF.js';
|
|
3
3
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
4
4
|
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
|
@@ -101,7 +101,7 @@ var SheetHeader = ({
|
|
|
101
101
|
"data-slot": "sheet-header",
|
|
102
102
|
"data-tone": tone,
|
|
103
103
|
className: cn(
|
|
104
|
-
"
|
|
104
|
+
"-mx-[var(--sheet-pad-x)] -mt-[var(--sheet-pad-y)] flex flex-col gap-1.5 px-[var(--sheet-pad-x)] py-[var(--sheet-pad-y)]",
|
|
105
105
|
overlayHeaderToneClass[tone],
|
|
106
106
|
className
|
|
107
107
|
),
|
|
@@ -146,7 +146,7 @@ var SheetFooter = ({ className, ...props }) => (
|
|
|
146
146
|
{
|
|
147
147
|
"data-slot": "sheet-footer",
|
|
148
148
|
className: cn(
|
|
149
|
-
"
|
|
149
|
+
"-mx-[var(--sheet-pad-x)] mt-auto -mb-[var(--sheet-pad-y)] flex flex-wrap items-center justify-end gap-2 px-[var(--sheet-pad-x)] py-[var(--sheet-pad-y)]",
|
|
150
150
|
className
|
|
151
151
|
),
|
|
152
152
|
...props
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { reactNodeText } from './chunk-SMLKNECP.js';
|
|
2
1
|
import { SearchInput } from './chunk-ZFBIKJSJ.js';
|
|
2
|
+
import { reactNodeText } from './chunk-SMLKNECP.js';
|
|
3
3
|
import { Checkbox } from './chunk-BE6GJGKJ.js';
|
|
4
|
-
import { Button } from './chunk-
|
|
4
|
+
import { Button } from './chunk-E6J7ZTDM.js';
|
|
5
5
|
import { ScrollArea } from './chunk-3KPEZ5CF.js';
|
|
6
6
|
import { useTranslation } from './chunk-H2TX3OPW.js';
|
|
7
7
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-
|
|
2
|
-
import { Button } from './chunk-
|
|
1
|
+
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-NXF64JCT.js';
|
|
2
|
+
import { Button } from './chunk-E6J7ZTDM.js';
|
|
3
3
|
import { useTranslation } from './chunk-H2TX3OPW.js';
|
|
4
4
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
5
5
|
import * as React from 'react';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from './chunk-4GZQHBHV.js';
|
|
2
2
|
import { formatBytes } from './chunk-GDHDJAVB.js';
|
|
3
|
-
import {
|
|
4
|
-
import { Button } from './chunk-
|
|
3
|
+
import { Slider } from './chunk-TBJBVEIP.js';
|
|
4
|
+
import { Button } from './chunk-E6J7ZTDM.js';
|
|
5
5
|
import { controlIconClass } from './chunk-B4K4BXEF.js';
|
|
6
6
|
import { useTranslation } from './chunk-H2TX3OPW.js';
|
|
7
7
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Calendar } from './chunk-
|
|
1
|
+
import { Calendar } from './chunk-HBOL5LSC.js';
|
|
2
2
|
import { Input } from './chunk-BNXPDUO4.js';
|
|
3
|
-
import { Button } from './chunk-
|
|
4
|
-
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
3
|
+
import { Button } from './chunk-E6J7ZTDM.js';
|
|
4
|
+
import { Popover, PopoverAnchor, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
5
5
|
import { useTranslation, usePickerLocales } from './chunk-H2TX3OPW.js';
|
|
6
6
|
import { toIsoDate, parseDateInput } from './chunk-JEIUEOTJ.js';
|
|
7
7
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { CalendarIcon } from 'lucide-react';
|
|
10
|
-
import {
|
|
10
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
11
|
|
|
12
12
|
var ISO_HINT = "yyyy-mm-dd";
|
|
13
13
|
function DatePicker({
|
|
@@ -50,7 +50,7 @@ function DatePicker({
|
|
|
50
50
|
emit(parsed);
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("relative", className), children: [
|
|
53
|
+
return /* @__PURE__ */ jsx(Popover, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsx(PopoverAnchor, { asChild: true, children: /* @__PURE__ */ jsxs("div", { className: cn("relative", className), children: [
|
|
54
54
|
/* @__PURE__ */ jsx(
|
|
55
55
|
Input,
|
|
56
56
|
{
|
|
@@ -86,50 +86,48 @@ function DatePicker({
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
),
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
] })
|
|
132
|
-
] });
|
|
89
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
90
|
+
Button,
|
|
91
|
+
{
|
|
92
|
+
type: "button",
|
|
93
|
+
variant: "ghost",
|
|
94
|
+
size: "icon",
|
|
95
|
+
disabled,
|
|
96
|
+
tabIndex: -1,
|
|
97
|
+
"aria-label": t("dataEntry.datePicker.openCalendar") ?? "Open calendar",
|
|
98
|
+
className: "text-muted-foreground absolute inset-y-0 end-0 h-full px-2 hover:bg-transparent",
|
|
99
|
+
children: /* @__PURE__ */ jsx(CalendarIcon, { className: "size-4 shrink-0", "aria-hidden": "true" })
|
|
100
|
+
}
|
|
101
|
+
) }),
|
|
102
|
+
/* @__PURE__ */ jsx(
|
|
103
|
+
PopoverContent,
|
|
104
|
+
{
|
|
105
|
+
className: "w-auto p-0",
|
|
106
|
+
align: "start",
|
|
107
|
+
onOpenAutoFocus: (event) => event.preventDefault(),
|
|
108
|
+
children: /* @__PURE__ */ jsx(
|
|
109
|
+
Calendar,
|
|
110
|
+
{
|
|
111
|
+
mode: "single",
|
|
112
|
+
selected: value,
|
|
113
|
+
defaultMonth: value,
|
|
114
|
+
onSelect: (date) => {
|
|
115
|
+
emit(date);
|
|
116
|
+
setText(toIsoDate(date));
|
|
117
|
+
setOpen(false);
|
|
118
|
+
},
|
|
119
|
+
locale: dayPickerLocale,
|
|
120
|
+
disabled: [
|
|
121
|
+
...fromDate ? [{ before: fromDate }] : [],
|
|
122
|
+
...toDate ? [{ after: toDate }] : []
|
|
123
|
+
],
|
|
124
|
+
startMonth: fromDate,
|
|
125
|
+
endMonth: toDate
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
] }) }) });
|
|
133
131
|
}
|
|
134
132
|
|
|
135
133
|
export { DatePicker };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Command, CommandList, CommandItem, CommandGroup } from './chunk-3R3QVJCB.js';
|
|
2
2
|
import { Input } from './chunk-BNXPDUO4.js';
|
|
3
|
-
import { Button } from './chunk-
|
|
3
|
+
import { Button } from './chunk-E6J7ZTDM.js';
|
|
4
4
|
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
5
5
|
import { controlTriggerClass, controlOpenRingClass } from './chunk-B4K4BXEF.js';
|
|
6
6
|
import { useTranslation } from './chunk-H2TX3OPW.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EmptyState } from './chunk-YD7V2HGZ.js';
|
|
2
|
-
import { Checkbox } from './chunk-BE6GJGKJ.js';
|
|
3
2
|
import { Flex, densityClass } from './chunk-INIIF7F7.js';
|
|
4
|
-
import {
|
|
3
|
+
import { Checkbox } from './chunk-BE6GJGKJ.js';
|
|
4
|
+
import { Button } from './chunk-E6J7ZTDM.js';
|
|
5
5
|
import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from './chunk-IJ5ALJGA.js';
|
|
6
6
|
import { tableCellPaddingClass, tableRowHeightClass, controlIconSmClass } from './chunk-B4K4BXEF.js';
|
|
7
7
|
import { useTranslation } from './chunk-H2TX3OPW.js';
|
|
@@ -4,11 +4,21 @@ import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
var Slider = React.forwardRef(
|
|
7
|
-
({
|
|
7
|
+
({
|
|
8
|
+
className,
|
|
9
|
+
defaultValue,
|
|
10
|
+
value,
|
|
11
|
+
min = 0,
|
|
12
|
+
max = 100,
|
|
13
|
+
"aria-label": ariaLabel,
|
|
14
|
+
"aria-labelledby": ariaLabelledby,
|
|
15
|
+
...props
|
|
16
|
+
}, ref) => {
|
|
8
17
|
const values = React.useMemo(
|
|
9
18
|
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
10
19
|
[defaultValue, max, min, value]
|
|
11
20
|
);
|
|
21
|
+
const thumbLabel = (index) => ariaLabel != null && values.length > 1 ? `${ariaLabel} ${index + 1}` : ariaLabel;
|
|
12
22
|
return /* @__PURE__ */ jsxs(
|
|
13
23
|
SliderPrimitive.Root,
|
|
14
24
|
{
|
|
@@ -22,7 +32,16 @@ var Slider = React.forwardRef(
|
|
|
22
32
|
...props,
|
|
23
33
|
children: [
|
|
24
34
|
/* @__PURE__ */ jsx(SliderPrimitive.Track, { "data-slot": "slider-track", className: "ui-slider-track", children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { "data-slot": "slider-range", className: "ui-slider-range" }) }),
|
|
25
|
-
values.map((_, index) => /* @__PURE__ */ jsx(
|
|
35
|
+
values.map((_, index) => /* @__PURE__ */ jsx(
|
|
36
|
+
SliderPrimitive.Thumb,
|
|
37
|
+
{
|
|
38
|
+
"data-slot": "slider-thumb",
|
|
39
|
+
className: "ui-slider-thumb",
|
|
40
|
+
"aria-label": thumbLabel(index),
|
|
41
|
+
"aria-labelledby": ariaLabelledby
|
|
42
|
+
},
|
|
43
|
+
index
|
|
44
|
+
))
|
|
26
45
|
]
|
|
27
46
|
}
|
|
28
47
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { humanError } from './chunk-GDHDJAVB.js';
|
|
2
2
|
import { Flex } from './chunk-INIIF7F7.js';
|
|
3
|
-
import { Button } from './chunk-
|
|
3
|
+
import { Button } from './chunk-E6J7ZTDM.js';
|
|
4
4
|
import { useTranslation } from './chunk-H2TX3OPW.js';
|
|
5
5
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
6
6
|
import * as React from 'react';
|
|
@@ -35,10 +35,17 @@ var badgeVariants = cva(
|
|
|
35
35
|
variant: {
|
|
36
36
|
default: "border-transparent bg-primary text-primary-foreground",
|
|
37
37
|
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
38
|
-
outline: "text-foreground"
|
|
38
|
+
outline: "text-foreground",
|
|
39
|
+
dashed: "border-dashed text-foreground"
|
|
40
|
+
},
|
|
41
|
+
// Corner shape — default inherits the badge radius token; pill/sharp override via the tokens.
|
|
42
|
+
shape: {
|
|
43
|
+
default: "",
|
|
44
|
+
pill: "rounded-[var(--radius-pill)]",
|
|
45
|
+
sharp: "rounded-[var(--radius-sharp)]"
|
|
39
46
|
}
|
|
40
47
|
},
|
|
41
|
-
defaultVariants: { variant: "default" }
|
|
48
|
+
defaultVariants: { variant: "default", shape: "default" }
|
|
42
49
|
}
|
|
43
50
|
);
|
|
44
51
|
var badgeToneClass = {
|
|
@@ -50,7 +57,16 @@ var badgeToneClass = {
|
|
|
50
57
|
muted: cn("border-transparent", toneMutedClass),
|
|
51
58
|
neutral: cn("border-transparent", toneNeutralClass)
|
|
52
59
|
};
|
|
53
|
-
function Badge({
|
|
60
|
+
function Badge({
|
|
61
|
+
className,
|
|
62
|
+
variant,
|
|
63
|
+
shape,
|
|
64
|
+
tone,
|
|
65
|
+
icon,
|
|
66
|
+
status,
|
|
67
|
+
children,
|
|
68
|
+
...props
|
|
69
|
+
}) {
|
|
54
70
|
const { t } = useTranslation();
|
|
55
71
|
const statusDef = status ? STATUS_MAP[status] ?? { tone: "neutral", icon: Circle } : null;
|
|
56
72
|
const resolvedTone = tone ?? statusDef?.tone ?? "default";
|
|
@@ -61,8 +77,9 @@ function Badge({ className, variant, tone, icon, status, children, ...props }) {
|
|
|
61
77
|
{
|
|
62
78
|
"data-slot": "badge",
|
|
63
79
|
"data-tone": resolvedTone,
|
|
80
|
+
"data-shape": shape ?? "default",
|
|
64
81
|
className: cn(
|
|
65
|
-
badgeVariants({ variant: variant ?? "default" }),
|
|
82
|
+
badgeVariants({ variant: variant ?? "default", shape: shape ?? "default" }),
|
|
66
83
|
badgeToneClass[resolvedTone],
|
|
67
84
|
className
|
|
68
85
|
),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalizeTreeOptions, collectAllExpandableKeys, filterVisibleTree, flattenVisibleTree, findNodeByValue, reactNodeText, getDescendantValues } from './chunk-SMLKNECP.js';
|
|
2
2
|
import { Command, CommandInput } from './chunk-3R3QVJCB.js';
|
|
3
3
|
import { Checkbox } from './chunk-BE6GJGKJ.js';
|
|
4
|
-
import { Button } from './chunk-
|
|
4
|
+
import { Button } from './chunk-E6J7ZTDM.js';
|
|
5
5
|
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
6
6
|
import { ScrollArea } from './chunk-3KPEZ5CF.js';
|
|
7
7
|
import { controlOpenRingClass } from './chunk-B4K4BXEF.js';
|
|
@@ -204,6 +204,41 @@ var VOCABULARY_REGISTRY = {
|
|
|
204
204
|
category: "interaction",
|
|
205
205
|
description: "Button size preset; includes documented icon-only subset"
|
|
206
206
|
},
|
|
207
|
+
BadgeVariantProp: {
|
|
208
|
+
file: "vocabulary/interaction.prop.ts",
|
|
209
|
+
category: "interaction",
|
|
210
|
+
description: "Badge visual variant (default | secondary | outline | dashed)"
|
|
211
|
+
},
|
|
212
|
+
ShapeProp: {
|
|
213
|
+
file: "vocabulary/interaction.prop.ts",
|
|
214
|
+
category: "interaction",
|
|
215
|
+
description: "Corner shape default | pill | sharp \u2014 shared by Button + Badge (radius tokens)"
|
|
216
|
+
},
|
|
217
|
+
TextSizeProp: {
|
|
218
|
+
file: "vocabulary/interaction.prop.ts",
|
|
219
|
+
category: "interaction",
|
|
220
|
+
description: "Text size \u2014 golden-ratio type-scale steps (2xs\u2026xl), never an arbitrary px"
|
|
221
|
+
},
|
|
222
|
+
TextToneProp: {
|
|
223
|
+
file: "vocabulary/interaction.prop.ts",
|
|
224
|
+
category: "interaction",
|
|
225
|
+
description: "Text colour intent \u2014 semantic foreground tokens"
|
|
226
|
+
},
|
|
227
|
+
FontWeightProp: {
|
|
228
|
+
file: "vocabulary/interaction.prop.ts",
|
|
229
|
+
category: "interaction",
|
|
230
|
+
description: "Font weight regular | medium | semibold (system 2-weight, 400/500)"
|
|
231
|
+
},
|
|
232
|
+
HeadingLevelProp: {
|
|
233
|
+
file: "vocabulary/interaction.prop.ts",
|
|
234
|
+
category: "interaction",
|
|
235
|
+
description: "Heading level 1-4 \u2014 sizes from --heading-h* and the semantic element"
|
|
236
|
+
},
|
|
237
|
+
TextAlignProp: {
|
|
238
|
+
file: "vocabulary/interaction.prop.ts",
|
|
239
|
+
category: "interaction",
|
|
240
|
+
description: "Inline text alignment start | center | end (logical, RTL-safe)"
|
|
241
|
+
},
|
|
207
242
|
SizeProp: {
|
|
208
243
|
file: "vocabulary/interaction.prop.ts",
|
|
209
244
|
category: "interaction",
|
|
@@ -415,7 +450,30 @@ var COMPONENT_PROP_REGISTRY = {
|
|
|
415
450
|
ButtonProp: {
|
|
416
451
|
group: "general",
|
|
417
452
|
file: "components/general.prop.ts",
|
|
418
|
-
vocabulary: [
|
|
453
|
+
vocabulary: [
|
|
454
|
+
"ButtonVariantProp",
|
|
455
|
+
"SizeProp",
|
|
456
|
+
"ShapeProp",
|
|
457
|
+
"AsChildProp",
|
|
458
|
+
"DisabledProp",
|
|
459
|
+
"OnClickProp"
|
|
460
|
+
]
|
|
461
|
+
},
|
|
462
|
+
TextProp: {
|
|
463
|
+
group: "general",
|
|
464
|
+
file: "components/general.prop.ts",
|
|
465
|
+
vocabulary: [
|
|
466
|
+
"TextSizeProp",
|
|
467
|
+
"TextToneProp",
|
|
468
|
+
"FontWeightProp",
|
|
469
|
+
"TextAlignProp",
|
|
470
|
+
"ClassNameProp"
|
|
471
|
+
]
|
|
472
|
+
},
|
|
473
|
+
HeadingProp: {
|
|
474
|
+
group: "general",
|
|
475
|
+
file: "components/general.prop.ts",
|
|
476
|
+
vocabulary: ["HeadingLevelProp", "TextToneProp", "TextAlignProp", "ClassNameProp"]
|
|
419
477
|
},
|
|
420
478
|
InputProp: {
|
|
421
479
|
group: "data-entry",
|
|
@@ -642,7 +700,7 @@ var COMPONENT_PROP_REGISTRY = {
|
|
|
642
700
|
BadgeProp: {
|
|
643
701
|
group: "data-display",
|
|
644
702
|
file: "components/data-display.prop.ts",
|
|
645
|
-
vocabulary: ["ToneProp", "ChildrenProp", "ClassNameProp"]
|
|
703
|
+
vocabulary: ["BadgeVariantProp", "ShapeProp", "ToneProp", "ChildrenProp", "ClassNameProp"]
|
|
646
704
|
},
|
|
647
705
|
DataTableProp: {
|
|
648
706
|
group: "data-display",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Input } from './chunk-BNXPDUO4.js';
|
|
2
|
-
import { Button } from './chunk-
|
|
2
|
+
import { Button } from './chunk-E6J7ZTDM.js';
|
|
3
3
|
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
4
4
|
import { useTranslation, usePickerLocales } from './chunk-H2TX3OPW.js';
|
|
5
5
|
import { normalizeHhmm, isValidHhmm } from './chunk-JEIUEOTJ.js';
|