@godxjp/ui 9.2.0 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -29
- package/dist/app/index.d.ts +1 -1
- package/dist/app/index.js +4 -4
- package/dist/{app.prop-UTc4j4nj.d.ts → app.prop-Cy6dJnU8.d.ts} +18 -40
- package/dist/{checkbox-ChRsR7Nk.d.ts → checkbox-em-oFM5D.d.ts} +1 -1
- package/dist/{chunk-LJLGABFV.js → chunk-2HXZT2WJ.js} +17 -9
- package/dist/{chunk-QLMXEJSY.js → chunk-3Q4A4U2P.js} +24 -1
- package/dist/{chunk-26CPAKUP.js → chunk-44YRPSZ7.js} +1 -2
- package/dist/{chunk-HB2OHB5X.js → chunk-5NCFLCM7.js} +27 -16
- package/dist/{chunk-FXFJF4YA.js → chunk-6CSBMMZS.js} +262 -31
- package/dist/{chunk-E7HBHUJY.js → chunk-6HHSU6RG.js} +8 -6
- package/dist/{chunk-457KVJTX.js → chunk-7Q45MBFW.js} +7 -5
- package/dist/{chunk-O24Z3ULJ.js → chunk-BE6GJGKJ.js} +1 -1
- package/dist/{chunk-FVPCVZL3.js → chunk-BG5RNXTH.js} +1 -1
- package/dist/{chunk-AINW5WYN.js → chunk-COD66MFF.js} +1 -2
- package/dist/{chunk-IOGU3ZWF.js → chunk-DNGJHWJZ.js} +3 -3
- package/dist/{chunk-3TS3G4U3.js → chunk-EE5DKOHX.js} +3 -1
- package/dist/{chunk-G6Q32VHO.js → chunk-EQZP53KI.js} +33 -8
- package/dist/{chunk-BHV2FUOA.js → chunk-EZHHJQWQ.js} +1 -1
- package/dist/{chunk-N3JPLJ3B.js → chunk-GDDCSKCB.js} +12 -5
- package/dist/{chunk-RLGHEV4A.js → chunk-HTG5VHU7.js} +10 -1
- package/dist/{chunk-R2W2FX5Q.js → chunk-I7NQ2LIL.js} +1 -9
- package/dist/{chunk-XQMPK4GM.js → chunk-IHRMOJXD.js} +86 -39
- package/dist/{chunk-TILFZBTE.js → chunk-INIIF7F7.js} +1 -4
- package/dist/{chunk-UIYEAUWA.js → chunk-IY347EQA.js} +2 -2
- package/dist/{chunk-HCM4JAC2.js → chunk-JWGLJXQU.js} +39 -11
- package/dist/{chunk-TO33OY4L.js → chunk-LMKUKCTN.js} +1 -1
- package/dist/chunk-NXVCI6YB.js +453 -0
- package/dist/{chunk-S6TBIL7J.js → chunk-O6DQZYNI.js} +63 -44
- package/dist/{chunk-O2OUNXV4.js → chunk-P5KPCT6R.js} +3 -3
- package/dist/{chunk-6HQMUUQW.js → chunk-PDXFQS7M.js} +14 -30
- package/dist/{chunk-F7PG4OEV.js → chunk-QSGW3ZWK.js} +12 -4
- package/dist/{chunk-25RYBC5T.js → chunk-S2IJKT3D.js} +1 -1
- package/dist/{chunk-OJZ6C2HM.js → chunk-SARQRCKO.js} +54 -48
- package/dist/chunk-T2QO2S65.js +126 -0
- package/dist/{chunk-26WDEDWL.js → chunk-TGNBXS7H.js} +32 -23
- package/dist/{chunk-6J7GRCDA.js → chunk-UNVRNJCB.js} +71 -11
- package/dist/{chunk-6YBYAEXD.js → chunk-VSM44AYE.js} +94 -24
- package/dist/{chunk-QWLXN6CT.js → chunk-VSUYVT2Q.js} +3 -2
- package/dist/{chunk-4R7QL3MW.js → chunk-X2VY4MOW.js} +14 -29
- package/dist/{chunk-ETLAI3QU.js → chunk-Z46J47FY.js} +73 -77
- package/dist/components/admin/index.d.ts +22 -12
- package/dist/components/admin/index.js +23 -24
- package/dist/components/data-display/badge.js +3 -3
- package/dist/components/data-display/card.d.ts +3 -3
- package/dist/components/data-display/card.js +1 -1
- package/dist/components/data-display/carousel.js +3 -1
- package/dist/components/data-display/index.js +54 -32
- package/dist/components/data-entry/calendar.d.ts +1 -1
- package/dist/components/data-entry/calendar.js +1 -1
- package/dist/components/data-entry/cascader.d.ts +1 -1
- package/dist/components/data-entry/cascader.js +5 -5
- package/dist/components/data-entry/checkbox.d.ts +2 -2
- package/dist/components/data-entry/checkbox.js +2 -2
- package/dist/components/data-entry/color-picker.d.ts +1 -1
- package/dist/components/data-entry/color-picker.js +3 -3
- package/dist/components/data-entry/date-picker.d.ts +2 -2
- package/dist/components/data-entry/date-picker.js +4 -4
- package/dist/components/data-entry/date-range-picker.d.ts +2 -2
- package/dist/components/data-entry/date-range-picker.js +4 -4
- package/dist/components/data-entry/index.d.ts +9 -25
- package/dist/components/data-entry/index.js +22 -26
- package/dist/components/data-entry/radio.d.ts +1 -1
- package/dist/components/data-entry/radio.js +2 -2
- package/dist/components/data-entry/select.d.ts +2 -2
- package/dist/components/data-entry/select.js +3 -4
- package/dist/components/data-entry/slider.d.ts +1 -1
- package/dist/components/data-entry/switch.d.ts +2 -2
- package/dist/components/data-entry/switch.js +1 -1
- package/dist/components/data-entry/time-input.js +2 -2
- package/dist/components/data-entry/time-picker.d.ts +3 -1
- package/dist/components/data-entry/time-picker.js +3 -3
- package/dist/components/data-entry/transfer.d.ts +2 -2
- package/dist/components/data-entry/transfer.js +5 -5
- package/dist/components/data-entry/tree-select.d.ts +1 -1
- package/dist/components/data-entry/tree-select.js +5 -5
- package/dist/components/data-entry/upload.d.ts +2 -2
- package/dist/components/data-entry/upload.js +5 -5
- package/dist/components/feedback/alert.js +5 -5
- package/dist/components/feedback/dialog.js +3 -3
- package/dist/components/feedback/index.d.ts +1 -1
- package/dist/components/feedback/index.js +8 -8
- package/dist/components/feedback/sheet.js +1 -1
- package/dist/components/layout/index.d.ts +6 -9
- package/dist/components/layout/index.js +5 -3
- package/dist/components/navigation/dropdown-menu.js +1 -1
- package/dist/components/navigation/index.d.ts +14 -16
- package/dist/components/navigation/index.js +7 -8
- package/dist/components/navigation/pagination.d.ts +11 -8
- package/dist/components/navigation/pagination.js +4 -5
- package/dist/components/navigation/steps.d.ts +3 -3
- package/dist/components/navigation/steps.js +3 -1
- package/dist/components/query/index.d.ts +1 -5
- package/dist/components/query/index.js +6 -8
- package/dist/components/ui/index.d.ts +5 -7
- package/dist/components/ui/index.js +26 -29
- package/dist/{data-entry.prop-CDkOajPj.d.ts → data-entry.prop-BR4vNA1j.d.ts} +7 -35
- package/dist/filter-bar-BxjSJJnQ.d.ts +7 -0
- package/dist/{inline-CDSVAN54.d.ts → flex-D_EXRFSW.d.ts} +2 -8
- package/dist/form/index.js +1 -1
- package/dist/i18n/index.d.ts +82 -10
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +6 -6
- package/dist/index.js +34 -37
- package/dist/lib/datetime/index.js +1 -1
- package/dist/{navigation.prop-8DgElO0c.d.ts → navigation.prop-DMcXkR-J.d.ts} +9 -11
- package/dist/{password-strength-kQkloEeo.d.ts → password-strength-DVRvXEOK.d.ts} +2 -2
- package/dist/props/components/index.d.ts +3 -3
- package/dist/props/index.d.ts +3 -3
- package/dist/props/index.js +1 -1
- package/dist/props/registry.d.ts +84 -39
- package/dist/props/registry.js +1 -1
- package/dist/{search-input-cezAxpgb.d.ts → search-input-DpqDMXcn.d.ts} +2 -4
- package/dist/{skeleton-uWAjSacg.d.ts → skeleton-cj9kh5wo.d.ts} +1 -3
- package/dist/styles/control.css +176 -41
- package/dist/styles/data-display-layout.css +41 -15
- package/dist/styles/feedback-layout.css +44 -12
- package/dist/styles/index.css +45 -1
- package/dist/styles/layout.css +18 -17
- package/dist/styles/navigation-layout.css +3 -1
- package/dist/styles/shell-layout.css +3 -3
- package/dist/styles/table-layout.css +13 -0
- package/dist/tokens/foundation.css +12 -1
- package/dist/tokens/semantic/layout.css +2 -2
- package/package.json +6 -7
- package/scripts/ui-audit.mjs +31 -2
- package/dist/chunk-6MCI7W5G.js +0 -201
- package/dist/chunk-CAEL2ZD2.js +0 -222
- package/dist/chunk-GKXPALFT.js +0 -32
- package/dist/chunk-JKHWLPM5.js +0 -101
- package/dist/chunk-KDBGFJJI.js +0 -220
- package/dist/components/data-entry/autocomplete.d.ts +0 -24
- package/dist/components/data-entry/autocomplete.js +0 -10
- package/dist/components/data-entry/combobox.d.ts +0 -22
- package/dist/components/data-entry/combobox.js +0 -6
- package/dist/filter-bar-B5TPUqEO.d.ts +0 -14
- /package/dist/{chunk-LDSLS6HE.js → chunk-7CFO5FFE.js} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Slider } from './chunk-CRERCLIZ.js';
|
|
2
|
-
import { formatBytes } from './chunk-
|
|
3
|
-
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from './chunk-
|
|
2
|
+
import { formatBytes } from './chunk-X2VY4MOW.js';
|
|
3
|
+
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from './chunk-BG5RNXTH.js';
|
|
4
4
|
import { Button } from './chunk-M4PZNAMV.js';
|
|
5
5
|
import { controlIconClass } from './chunk-IBK5D2Q6.js';
|
|
6
|
-
import { useTranslation } from './chunk-
|
|
6
|
+
import { useTranslation } from './chunk-HTG5VHU7.js';
|
|
7
7
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
8
8
|
import * as React2 from 'react';
|
|
9
9
|
import { Upload as Upload$1, ImagePlus, Camera, Trash2, RotateCcw, X } from 'lucide-react';
|
|
10
|
-
import {
|
|
10
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
11
|
|
|
12
12
|
function UploadCropDialog({ open, onOpenChange, file, onConfirm }) {
|
|
13
13
|
const { t } = useTranslation();
|
|
@@ -49,7 +49,10 @@ function UploadCropDialog({ open, onOpenChange, file, onConfirm }) {
|
|
|
49
49
|
onOpenChange(false);
|
|
50
50
|
};
|
|
51
51
|
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-sm", children: [
|
|
52
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ jsxs(DialogHeader, { children: [
|
|
53
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: t("dataEntry.upload.cropTitle") }),
|
|
54
|
+
/* @__PURE__ */ jsx(DialogDescription, { children: t("dataEntry.upload.cropDescription") })
|
|
55
|
+
] }),
|
|
53
56
|
/* @__PURE__ */ jsxs("div", { className: "ui-stack-sm", children: [
|
|
54
57
|
/* @__PURE__ */ jsx(
|
|
55
58
|
"div",
|
|
@@ -316,18 +319,24 @@ function Upload({
|
|
|
316
319
|
accept,
|
|
317
320
|
multiple: multiple && !isSingleAvatar,
|
|
318
321
|
disabled,
|
|
322
|
+
"aria-label": t("dataEntry.upload.inputLabel"),
|
|
319
323
|
onChange: (e) => {
|
|
320
324
|
pickFiles(e.target.files);
|
|
321
325
|
e.target.value = "";
|
|
322
326
|
}
|
|
323
327
|
}
|
|
324
328
|
);
|
|
329
|
+
const uploadingCount = items.filter((it) => it.status === "uploading").length;
|
|
330
|
+
const doneCount = items.filter((it) => it.status === "done").length;
|
|
331
|
+
const errorCount = items.filter((it) => it.status === "error").length;
|
|
332
|
+
const liveRegion = /* @__PURE__ */ jsx("span", { "aria-live": "polite", className: "sr-only", "data-slot": "upload-status", children: errorCount > 0 ? t("dataEntry.upload.statusFailed", { count: errorCount }) : uploadingCount > 0 ? t("dataEntry.upload.statusUploading", { count: uploadingCount }) : items.length > 0 ? t("dataEntry.upload.statusReady", { count: items.length, done: doneCount }) : "" });
|
|
325
333
|
const openPicker = () => {
|
|
326
334
|
if (!disabled) inputRef.current?.click();
|
|
327
335
|
};
|
|
328
336
|
if (variant === "dropzone") {
|
|
329
337
|
return /* @__PURE__ */ jsxs("div", { className: cn("ui-stack-sm", className), children: [
|
|
330
338
|
hiddenInput,
|
|
339
|
+
liveRegion,
|
|
331
340
|
/* @__PURE__ */ jsxs(
|
|
332
341
|
"div",
|
|
333
342
|
{
|
|
@@ -370,6 +379,7 @@ function Upload({
|
|
|
370
379
|
if (variant === "button") {
|
|
371
380
|
return /* @__PURE__ */ jsxs("div", { className: cn("ui-stack-sm", className), children: [
|
|
372
381
|
hiddenInput,
|
|
382
|
+
liveRegion,
|
|
373
383
|
/* @__PURE__ */ jsxs(Button, { type: "button", variant: "outline", disabled, onClick: openPicker, children: [
|
|
374
384
|
/* @__PURE__ */ jsx(Upload$1, { className: "mr-2 size-4", "aria-hidden": "true" }),
|
|
375
385
|
children ?? t("dataEntry.upload.buttonLabel")
|
|
@@ -381,6 +391,7 @@ function Upload({
|
|
|
381
391
|
const canAdd = maxCount == null || items.length < maxCount;
|
|
382
392
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-wrap gap-3", className), children: [
|
|
383
393
|
hiddenInput,
|
|
394
|
+
liveRegion,
|
|
384
395
|
items.map((item2) => /* @__PURE__ */ jsx(
|
|
385
396
|
UploadPictureCard,
|
|
386
397
|
{
|
|
@@ -413,6 +424,7 @@ function Upload({
|
|
|
413
424
|
const item2 = draft.state.display;
|
|
414
425
|
return /* @__PURE__ */ jsxs("div", { className: cn("ui-stack-sm max-w-xs", className), children: [
|
|
415
426
|
hiddenInput,
|
|
427
|
+
liveRegion,
|
|
416
428
|
item2?.previewUrl && !item2.pendingDelete ? /* @__PURE__ */ jsxs("div", { className: "relative overflow-hidden rounded-md border", children: [
|
|
417
429
|
/* @__PURE__ */ jsx("img", { src: item2.previewUrl, alt: "", className: "max-h-48 w-full object-cover" }),
|
|
418
430
|
item2.status === "uploading" && /* @__PURE__ */ jsx("div", { className: "bg-background/70 absolute inset-0 flex items-center justify-center text-sm", children: t("dataEntry.upload.uploading") }),
|
|
@@ -437,6 +449,7 @@ function Upload({
|
|
|
437
449
|
const showPlaceholder = !item?.previewUrl || item.pendingDelete;
|
|
438
450
|
return /* @__PURE__ */ jsxs("div", { className: cn("ui-stack-sm items-start", className), children: [
|
|
439
451
|
hiddenInput,
|
|
452
|
+
liveRegion,
|
|
440
453
|
/* @__PURE__ */ jsx(
|
|
441
454
|
UploadCropDialog,
|
|
442
455
|
{
|
|
@@ -516,6 +529,7 @@ function UploadDraftActions({
|
|
|
516
529
|
return null;
|
|
517
530
|
}
|
|
518
531
|
function UploadPictureCard({ item, onRemove }) {
|
|
532
|
+
const { t } = useTranslation();
|
|
519
533
|
return /* @__PURE__ */ jsxs("div", { className: "bg-muted relative size-24 overflow-hidden rounded-md border", children: [
|
|
520
534
|
item.previewUrl ? /* @__PURE__ */ jsx("img", { src: item.previewUrl, alt: "", className: "size-full object-cover" }) : /* @__PURE__ */ jsx("div", { className: "text-muted-foreground flex size-full items-center justify-center text-xs", children: "\u2026" }),
|
|
521
535
|
item.status === "uploading" && /* @__PURE__ */ jsx("div", { className: "bg-background/70 absolute inset-0 flex items-center justify-center text-xs", children: "\u2026" }),
|
|
@@ -524,8 +538,8 @@ function UploadPictureCard({ item, onRemove }) {
|
|
|
524
538
|
{
|
|
525
539
|
type: "button",
|
|
526
540
|
onClick: onRemove,
|
|
527
|
-
className: "bg-background/90 hover:bg-destructive hover:text-destructive-foreground absolute
|
|
528
|
-
"aria-label": "
|
|
541
|
+
className: "bg-background/90 hover:bg-destructive hover:text-destructive-foreground absolute end-1 top-1 rounded-full p-0.5 shadow",
|
|
542
|
+
"aria-label": t("dataEntry.upload.removeImage"),
|
|
529
543
|
children: /* @__PURE__ */ jsx(X, { className: "size-3.5", "aria-hidden": "true" })
|
|
530
544
|
}
|
|
531
545
|
)
|
|
@@ -535,6 +549,7 @@ function UploadFileList({
|
|
|
535
549
|
items,
|
|
536
550
|
onRemove
|
|
537
551
|
}) {
|
|
552
|
+
const { t } = useTranslation();
|
|
538
553
|
return /* @__PURE__ */ jsx("ul", { className: "ui-stack-xs", children: items.map((item) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-3 rounded-md border px-3 py-2 text-sm", children: [
|
|
539
554
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
540
555
|
/* @__PURE__ */ jsx("div", { className: "truncate font-medium", children: item.name }),
|
|
@@ -552,7 +567,17 @@ function UploadFileList({
|
|
|
552
567
|
] })
|
|
553
568
|
] })
|
|
554
569
|
] }),
|
|
555
|
-
onRemove && /* @__PURE__ */ jsx(
|
|
570
|
+
onRemove && /* @__PURE__ */ jsx(
|
|
571
|
+
Button,
|
|
572
|
+
{
|
|
573
|
+
type: "button",
|
|
574
|
+
size: "sm",
|
|
575
|
+
variant: "ghost",
|
|
576
|
+
"aria-label": t("dataEntry.upload.removeFile", { name: item.name }),
|
|
577
|
+
onClick: () => onRemove(item.uid),
|
|
578
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-4", "aria-hidden": "true" })
|
|
579
|
+
}
|
|
580
|
+
)
|
|
556
581
|
] }, item.uid)) });
|
|
557
582
|
}
|
|
558
583
|
|
|
@@ -92,7 +92,7 @@ var SheetTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
92
92
|
{
|
|
93
93
|
ref,
|
|
94
94
|
"data-slot": "sheet-title",
|
|
95
|
-
className: cn("text-foreground text-lg font-
|
|
95
|
+
className: cn("text-foreground text-lg font-medium", className),
|
|
96
96
|
...props
|
|
97
97
|
}
|
|
98
98
|
));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Calendar } from './chunk-
|
|
1
|
+
import { Calendar } from './chunk-DNGJHWJZ.js';
|
|
2
2
|
import { Input } from './chunk-VOHTRR5X.js';
|
|
3
3
|
import { Button } from './chunk-M4PZNAMV.js';
|
|
4
4
|
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
5
|
-
import { useTranslation, usePickerLocales } from './chunk-
|
|
6
|
-
import { toIsoDate, parseDateInput } from './chunk-
|
|
5
|
+
import { useTranslation, usePickerLocales } from './chunk-HTG5VHU7.js';
|
|
6
|
+
import { toIsoDate, parseDateInput } from './chunk-6CSBMMZS.js';
|
|
7
7
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { CalendarIcon } from 'lucide-react';
|
|
@@ -11,7 +11,8 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
11
11
|
|
|
12
12
|
var ISO_HINT = "yyyy-mm-dd";
|
|
13
13
|
function DateRangePicker({
|
|
14
|
-
value,
|
|
14
|
+
value: valueProp,
|
|
15
|
+
defaultValue,
|
|
15
16
|
onValueChange,
|
|
16
17
|
placeholder,
|
|
17
18
|
disabled,
|
|
@@ -25,6 +26,9 @@ function DateRangePicker({
|
|
|
25
26
|
const { t } = useTranslation();
|
|
26
27
|
const { dayPickerLocale } = usePickerLocales(localeProp);
|
|
27
28
|
const [open, setOpen] = React.useState(false);
|
|
29
|
+
const isControlled = React.useRef(valueProp !== void 0).current;
|
|
30
|
+
const [internalValue, setInternalValue] = React.useState(defaultValue);
|
|
31
|
+
const value = isControlled ? valueProp : internalValue;
|
|
28
32
|
const [fromText, setFromText] = React.useState(() => toIsoDate(value?.from));
|
|
29
33
|
const [toText, setToText] = React.useState(() => toIsoDate(value?.to));
|
|
30
34
|
React.useEffect(() => {
|
|
@@ -32,7 +36,10 @@ function DateRangePicker({
|
|
|
32
36
|
setToText(toIsoDate(value?.to));
|
|
33
37
|
}, [value?.from, value?.to]);
|
|
34
38
|
const resolvedPlaceholder = placeholder ?? t("dataEntry.dateRangePicker.placeholder") ?? ISO_HINT;
|
|
35
|
-
const emit = (next) =>
|
|
39
|
+
const emit = (next) => {
|
|
40
|
+
if (!isControlled) setInternalValue(next);
|
|
41
|
+
onValueChange?.(next);
|
|
42
|
+
};
|
|
36
43
|
const commitEdge = (edge, raw) => {
|
|
37
44
|
const parsed = raw.trim() === "" ? void 0 : parseDateInput(raw.trim()) ?? void 0;
|
|
38
45
|
const next = { from: value?.from, to: value?.to, [edge]: parsed };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { APP_TIME_FORMATS, isAppDateFormat, isAppTimeFormat, isAppLocale, translate, getDateFnsLocale, syncI18nLocale, syncDatetimeContext, disableLiveRelativeFormatting, enableLiveRelativeFormatting, getDayPickerLocale, APP_REQUEST_HEADER_DATE_FORMAT, APP_REQUEST_HEADER_TIME_FORMAT, resolveDefaultDateFormat } from './chunk-
|
|
1
|
+
import { APP_TIME_FORMATS, isAppDateFormat, isAppTimeFormat, isAppLocale, translate, getDateFnsLocale, syncI18nLocale, syncDatetimeContext, disableLiveRelativeFormatting, enableLiveRelativeFormatting, getDayPickerLocale, APP_REQUEST_HEADER_DATE_FORMAT, APP_REQUEST_HEADER_TIME_FORMAT, resolveDefaultDateFormat } from './chunk-6CSBMMZS.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -211,6 +211,10 @@ function resetIanaTimezoneCacheForTests() {
|
|
|
211
211
|
cachedAllTimezones = null;
|
|
212
212
|
cachedTimezoneSet = null;
|
|
213
213
|
}
|
|
214
|
+
var RTL_LANGUAGE_SUBTAGS = /* @__PURE__ */ new Set(["ar", "he", "fa", "ur", "ps", "sd", "yi", "dv", "ckb"]);
|
|
215
|
+
function localeDirection(locale) {
|
|
216
|
+
return RTL_LANGUAGE_SUBTAGS.has(locale.split("-")[0]?.toLowerCase() ?? "") ? "rtl" : "ltr";
|
|
217
|
+
}
|
|
214
218
|
var AppContext = React.createContext(null);
|
|
215
219
|
function resolveInitialTimeFormat(stored, defaultTimeFormat, locale) {
|
|
216
220
|
if (stored) return stored;
|
|
@@ -354,6 +358,11 @@ function AppProvider({
|
|
|
354
358
|
React.useEffect(() => {
|
|
355
359
|
syncAppRequestHeaders(requestHeaders);
|
|
356
360
|
}, [requestHeaders]);
|
|
361
|
+
React.useEffect(() => {
|
|
362
|
+
if (typeof document !== "undefined") {
|
|
363
|
+
document.documentElement.dir = localeDirection(locale);
|
|
364
|
+
}
|
|
365
|
+
}, [locale]);
|
|
357
366
|
React.useEffect(() => {
|
|
358
367
|
hasMountedRef.current = true;
|
|
359
368
|
enableLiveRelativeFormatting();
|
|
@@ -4,15 +4,7 @@ import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
|
4
4
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
var Switch = React.forwardRef(
|
|
7
|
-
({
|
|
8
|
-
className,
|
|
9
|
-
size = "default",
|
|
10
|
-
name,
|
|
11
|
-
checked,
|
|
12
|
-
defaultChecked = false,
|
|
13
|
-
onCheckedChange,
|
|
14
|
-
...props
|
|
15
|
-
}, ref) => {
|
|
7
|
+
({ className, size = "md", name, checked, defaultChecked = false, onCheckedChange, ...props }, ref) => {
|
|
16
8
|
const [internalChecked, setInternalChecked] = React.useState(defaultChecked);
|
|
17
9
|
const isControlled = checked !== void 0;
|
|
18
10
|
const isChecked = isControlled ? checked : internalChecked;
|
|
@@ -319,22 +319,7 @@ var VOCABULARY_REGISTRY = {
|
|
|
319
319
|
};
|
|
320
320
|
var COMPONENT_PROP_REGISTRY = {
|
|
321
321
|
AppProviderProp: { group: "app", file: "components/app.prop.ts", vocabulary: ["ChildrenProp"] },
|
|
322
|
-
|
|
323
|
-
group: "app",
|
|
324
|
-
file: "components/app.prop.ts",
|
|
325
|
-
vocabulary: ["ValueProp", "OnValueChangeProp", "DisabledProp", "IdProp", "ClassNameProp"]
|
|
326
|
-
},
|
|
327
|
-
TimezonePickerProp: {
|
|
328
|
-
group: "app",
|
|
329
|
-
file: "components/app.prop.ts",
|
|
330
|
-
vocabulary: ["ValueProp", "OnValueChangeProp", "DisabledProp", "IdProp", "ClassNameProp"]
|
|
331
|
-
},
|
|
332
|
-
TimeFormatPickerProp: {
|
|
333
|
-
group: "app",
|
|
334
|
-
file: "components/app.prop.ts",
|
|
335
|
-
vocabulary: ["ValueProp", "OnValueChangeProp", "DisabledProp", "IdProp", "ClassNameProp"]
|
|
336
|
-
},
|
|
337
|
-
DateFormatPickerProp: {
|
|
322
|
+
AppSettingPickerProp: {
|
|
338
323
|
group: "app",
|
|
339
324
|
file: "components/app.prop.ts",
|
|
340
325
|
vocabulary: ["ValueProp", "OnValueChangeProp", "DisabledProp", "IdProp", "ClassNameProp"]
|
|
@@ -480,26 +465,6 @@ var COMPONENT_PROP_REGISTRY = {
|
|
|
480
465
|
file: "components/data-entry.prop.ts",
|
|
481
466
|
vocabulary: ["IdProp", "LabelProp", "DescriptionProp", "ClassNameProp", "ChildrenProp"]
|
|
482
467
|
},
|
|
483
|
-
ChoiceFieldProp: {
|
|
484
|
-
group: "data-entry",
|
|
485
|
-
file: "components/data-entry.prop.ts",
|
|
486
|
-
vocabulary: ["IdProp", "LabelProp", "ClassNameProp"]
|
|
487
|
-
},
|
|
488
|
-
CountryOptionProp: {
|
|
489
|
-
group: "data-entry",
|
|
490
|
-
file: "components/data-entry.prop.ts",
|
|
491
|
-
vocabulary: ["LabelProp", "ValueProp"]
|
|
492
|
-
},
|
|
493
|
-
CountryOptionLabelProp: {
|
|
494
|
-
group: "data-entry",
|
|
495
|
-
file: "components/data-entry.prop.ts",
|
|
496
|
-
vocabulary: ["ClassNameProp"]
|
|
497
|
-
},
|
|
498
|
-
CountrySelectProp: {
|
|
499
|
-
group: "data-entry",
|
|
500
|
-
file: "components/data-entry.prop.ts",
|
|
501
|
-
vocabulary: ["IdProp", "NameProp", "DefaultValueProp", "RequiredProp", "PlaceholderProp"]
|
|
502
|
-
},
|
|
503
468
|
SliderProp: {
|
|
504
469
|
group: "data-entry",
|
|
505
470
|
file: "components/data-entry.prop.ts",
|
|
@@ -817,17 +782,17 @@ var COMPONENT_PROP_REGISTRY = {
|
|
|
817
782
|
PaginationProp: {
|
|
818
783
|
group: "navigation",
|
|
819
784
|
file: "components/navigation.prop.ts",
|
|
820
|
-
vocabulary: ["DisabledProp", "ClassNameProp"]
|
|
785
|
+
vocabulary: ["ValueProp", "OnValueChangeProp", "DisabledProp", "ClassNameProp"]
|
|
821
786
|
},
|
|
822
787
|
StepsProp: {
|
|
823
788
|
group: "navigation",
|
|
824
789
|
file: "components/navigation.prop.ts",
|
|
825
|
-
vocabulary: ["SizeProp", "OnValueChangeProp", "ClassNameProp"]
|
|
790
|
+
vocabulary: ["ValueProp", "DefaultValueProp", "SizeProp", "OnValueChangeProp", "ClassNameProp"]
|
|
826
791
|
},
|
|
827
792
|
StepItemProp: {
|
|
828
793
|
group: "navigation",
|
|
829
794
|
file: "components/navigation.prop.ts",
|
|
830
|
-
vocabulary: ["TitleProp", "DescriptionProp", "IconProp", "DisabledProp"]
|
|
795
|
+
vocabulary: ["TitleProp", "SubtitleProp", "DescriptionProp", "IconProp", "DisabledProp"]
|
|
831
796
|
},
|
|
832
797
|
StepStatusProp: { group: "navigation", file: "components/navigation.prop.ts", vocabulary: [] },
|
|
833
798
|
TabsProp: {
|
|
@@ -869,6 +834,88 @@ var COMPONENT_PROP_REGISTRY = {
|
|
|
869
834
|
group: "form",
|
|
870
835
|
file: "components/form.prop.ts",
|
|
871
836
|
vocabulary: ["ZodSchemaProp"]
|
|
837
|
+
},
|
|
838
|
+
// Component-declared prop types (XProps in src/components/**) — registered here so the
|
|
839
|
+
// prop-vocabulary guard governs them too (their fields are mostly Radix/native passthroughs).
|
|
840
|
+
ToggleProp: {
|
|
841
|
+
group: "data-entry",
|
|
842
|
+
file: "components/ui/toggle.tsx",
|
|
843
|
+
vocabulary: ["SizeProp", "ClassNameProp"]
|
|
844
|
+
},
|
|
845
|
+
RatingProp: {
|
|
846
|
+
group: "data-entry",
|
|
847
|
+
file: "components/ui/rating.tsx",
|
|
848
|
+
vocabulary: ["ValueProp", "OnValueChangeProp", "DisabledProp", "ClassNameProp"]
|
|
849
|
+
},
|
|
850
|
+
TagInputProp: {
|
|
851
|
+
group: "data-entry",
|
|
852
|
+
file: "components/ui/tag-input.tsx",
|
|
853
|
+
vocabulary: ["ValueProp", "OnValueChangeProp", "PlaceholderProp", "IdProp", "ClassNameProp"]
|
|
854
|
+
},
|
|
855
|
+
PasswordInputProp: {
|
|
856
|
+
group: "data-entry",
|
|
857
|
+
file: "components/ui/password-input.tsx",
|
|
858
|
+
vocabulary: ["ClassNameProp"]
|
|
859
|
+
},
|
|
860
|
+
PasswordStrengthProp: {
|
|
861
|
+
group: "data-entry",
|
|
862
|
+
file: "components/data-entry/password-strength.tsx",
|
|
863
|
+
vocabulary: ["ValueProp", "ClassNameProp"]
|
|
864
|
+
},
|
|
865
|
+
ProgressProp: {
|
|
866
|
+
group: "data-display",
|
|
867
|
+
file: "components/data-display/progress.tsx",
|
|
868
|
+
vocabulary: ["ValueProp", "LabelProp", "ClassNameProp"]
|
|
869
|
+
},
|
|
870
|
+
TimelineProp: {
|
|
871
|
+
group: "data-display",
|
|
872
|
+
file: "components/data-display/timeline.tsx",
|
|
873
|
+
vocabulary: ["ClassNameProp"]
|
|
874
|
+
},
|
|
875
|
+
TreeListProp: {
|
|
876
|
+
group: "data-display",
|
|
877
|
+
file: "components/data-display/tree-list.tsx",
|
|
878
|
+
vocabulary: ["ClassNameProp"]
|
|
879
|
+
},
|
|
880
|
+
CardProp: {
|
|
881
|
+
group: "data-display",
|
|
882
|
+
file: "components/data-display/card.tsx",
|
|
883
|
+
vocabulary: ["ToneProp", "ClassNameProp", "ChildrenProp"]
|
|
884
|
+
},
|
|
885
|
+
CardCoverProp: {
|
|
886
|
+
group: "data-display",
|
|
887
|
+
file: "components/data-display/card.tsx",
|
|
888
|
+
vocabulary: ["ClassNameProp", "ChildrenProp"]
|
|
889
|
+
},
|
|
890
|
+
CardHeaderProp: {
|
|
891
|
+
group: "data-display",
|
|
892
|
+
file: "components/data-display/card.tsx",
|
|
893
|
+
vocabulary: ["TitleProp", "DescriptionProp", "ClassNameProp", "ChildrenProp"]
|
|
894
|
+
},
|
|
895
|
+
CardContentProp: {
|
|
896
|
+
group: "data-display",
|
|
897
|
+
file: "components/data-display/card.tsx",
|
|
898
|
+
vocabulary: ["ClassNameProp", "ChildrenProp"]
|
|
899
|
+
},
|
|
900
|
+
CardFooterProp: {
|
|
901
|
+
group: "data-display",
|
|
902
|
+
file: "components/data-display/card.tsx",
|
|
903
|
+
vocabulary: ["ClassNameProp", "ChildrenProp"]
|
|
904
|
+
},
|
|
905
|
+
StatCardProp: {
|
|
906
|
+
group: "data-display",
|
|
907
|
+
file: "components/data-display/card.tsx",
|
|
908
|
+
vocabulary: ["TitleProp", "ToneProp", "ClassNameProp"]
|
|
909
|
+
},
|
|
910
|
+
ResponsiveGridProp: {
|
|
911
|
+
group: "layout",
|
|
912
|
+
file: "components/layout/responsive-grid.tsx",
|
|
913
|
+
vocabulary: ["GapProp", "ClassNameProp", "ChildrenProp"]
|
|
914
|
+
},
|
|
915
|
+
SplitPaneProp: {
|
|
916
|
+
group: "layout",
|
|
917
|
+
file: "components/layout/split-pane.tsx",
|
|
918
|
+
vocabulary: ["ClassNameProp", "ChildrenProp"]
|
|
872
919
|
}
|
|
873
920
|
};
|
|
874
921
|
var PROP_ALIASES_FORBIDDEN = {
|
|
@@ -43,8 +43,5 @@ function Flex({
|
|
|
43
43
|
}
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
|
-
function Inline({ gap = "sm", ...props }) {
|
|
47
|
-
return /* @__PURE__ */ jsx(Flex, { direction: "row", wrap: true, gap, align: "center", ...props });
|
|
48
|
-
}
|
|
49
46
|
|
|
50
|
-
export { Flex,
|
|
47
|
+
export { Flex, densityClass, pageContainerVariantClass };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toneNeutralClass, toneMutedClass, toneInfoClass, toneDestructiveClass, toneWarningClass, toneSuccessClass } from './chunk-IBK5D2Q6.js';
|
|
2
|
-
import { useTranslation } from './chunk-
|
|
2
|
+
import { useTranslation } from './chunk-HTG5VHU7.js';
|
|
3
3
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
5
|
import { XCircle, Pause, CheckCircle2, Circle, Trash2, AlertCircle, Clock, Play } from 'lucide-react';
|
|
@@ -29,7 +29,7 @@ var STATUS_MAP = {
|
|
|
29
29
|
ASSIGNMENT_STATUS_TERMINATED: { tone: "destructive", icon: XCircle }
|
|
30
30
|
};
|
|
31
31
|
var badgeVariants = cva(
|
|
32
|
-
"inline-flex items-center border text-xs font-
|
|
32
|
+
"inline-flex items-center border text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring",
|
|
33
33
|
{
|
|
34
34
|
variants: {
|
|
35
35
|
variant: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useTranslation } from './chunk-HTG5VHU7.js';
|
|
1
2
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
@@ -13,6 +14,7 @@ var useCarousel = () => {
|
|
|
13
14
|
return context;
|
|
14
15
|
};
|
|
15
16
|
var Carousel = React.forwardRef(({ className, opts, plugins, setApi, children, ...props }, ref) => {
|
|
17
|
+
const { t } = useTranslation();
|
|
16
18
|
const [emblaRef, api] = useEmblaCarousel(opts, plugins);
|
|
17
19
|
const [canScrollPrev, setCanScrollPrev] = React.useState(false);
|
|
18
20
|
const [canScrollNext, setCanScrollNext] = React.useState(false);
|
|
@@ -62,21 +64,43 @@ var Carousel = React.forwardRef(({ className, opts, plugins, setApi, children, .
|
|
|
62
64
|
"data-slot": "carousel",
|
|
63
65
|
className: cn("ui-carousel", className),
|
|
64
66
|
"data-orientation": opts?.axis === "y" ? "vertical" : "horizontal",
|
|
67
|
+
role: "region",
|
|
68
|
+
"aria-roledescription": t("dataDisplay.carousel.roleDescription"),
|
|
69
|
+
"aria-label": t("dataDisplay.carousel.ariaLabel"),
|
|
65
70
|
...props,
|
|
66
71
|
children: /* @__PURE__ */ jsx("div", { className: "ui-carousel-viewport", ref: emblaRef, children })
|
|
67
72
|
}
|
|
68
73
|
) });
|
|
69
74
|
});
|
|
70
75
|
Carousel.displayName = "Carousel";
|
|
71
|
-
var CarouselContent = React.forwardRef(({ className, ...props }, ref) =>
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
var CarouselContent = React.forwardRef(({ className, children, ...props }, ref) => {
|
|
77
|
+
const { t } = useTranslation();
|
|
78
|
+
const items = React.Children.toArray(children).filter(React.isValidElement);
|
|
79
|
+
const total = items.length;
|
|
80
|
+
const decorated = React.Children.map(children, (child) => {
|
|
81
|
+
if (!React.isValidElement(child)) return child;
|
|
82
|
+
const index = items.indexOf(child);
|
|
83
|
+
if (index === -1) return child;
|
|
84
|
+
const childProps = child.props;
|
|
85
|
+
if (childProps["aria-label"] != null) return child;
|
|
86
|
+
return React.cloneElement(child, {
|
|
87
|
+
"aria-label": t("dataDisplay.carousel.slideLabel", {
|
|
88
|
+
index: index + 1,
|
|
89
|
+
total
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
return /* @__PURE__ */ jsx(
|
|
94
|
+
"div",
|
|
95
|
+
{
|
|
96
|
+
ref,
|
|
97
|
+
"data-slot": "carousel-content",
|
|
98
|
+
className: cn("ui-carousel-content", className),
|
|
99
|
+
...props,
|
|
100
|
+
children: decorated
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
});
|
|
80
104
|
CarouselContent.displayName = "CarouselContent";
|
|
81
105
|
var CarouselItem = React.forwardRef(
|
|
82
106
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
@@ -84,6 +108,8 @@ var CarouselItem = React.forwardRef(
|
|
|
84
108
|
{
|
|
85
109
|
ref,
|
|
86
110
|
"data-slot": "carousel-item",
|
|
111
|
+
role: "group",
|
|
112
|
+
"aria-roledescription": "slide",
|
|
87
113
|
className: cn("ui-carousel-item", className),
|
|
88
114
|
...props
|
|
89
115
|
}
|
|
@@ -91,6 +117,7 @@ var CarouselItem = React.forwardRef(
|
|
|
91
117
|
);
|
|
92
118
|
CarouselItem.displayName = "CarouselItem";
|
|
93
119
|
var CarouselPrevious = React.forwardRef(({ className, ...props }, ref) => {
|
|
120
|
+
const { t } = useTranslation();
|
|
94
121
|
const { canScrollPrev, scrollPrev } = useCarousel();
|
|
95
122
|
return /* @__PURE__ */ jsxs(
|
|
96
123
|
"button",
|
|
@@ -104,13 +131,14 @@ var CarouselPrevious = React.forwardRef(({ className, ...props }, ref) => {
|
|
|
104
131
|
...props,
|
|
105
132
|
children: [
|
|
106
133
|
/* @__PURE__ */ jsx(ChevronLeft, { className: "ui-carousel-arrow", "aria-hidden": "true" }),
|
|
107
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "
|
|
134
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: t("dataDisplay.carousel.previous") })
|
|
108
135
|
]
|
|
109
136
|
}
|
|
110
137
|
);
|
|
111
138
|
});
|
|
112
139
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
113
140
|
var CarouselNext = React.forwardRef(({ className, ...props }, ref) => {
|
|
141
|
+
const { t } = useTranslation();
|
|
114
142
|
const { canScrollNext, scrollNext } = useCarousel();
|
|
115
143
|
return /* @__PURE__ */ jsxs(
|
|
116
144
|
"button",
|
|
@@ -124,7 +152,7 @@ var CarouselNext = React.forwardRef(({ className, ...props }, ref) => {
|
|
|
124
152
|
...props,
|
|
125
153
|
children: [
|
|
126
154
|
/* @__PURE__ */ jsx(ChevronRight, { className: "ui-carousel-arrow", "aria-hidden": "true" }),
|
|
127
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "
|
|
155
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: t("dataDisplay.carousel.next") })
|
|
128
156
|
]
|
|
129
157
|
}
|
|
130
158
|
);
|
|
@@ -57,7 +57,7 @@ var DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
57
57
|
ref,
|
|
58
58
|
"data-slot": "dropdown-menu-label",
|
|
59
59
|
"data-inset": inset,
|
|
60
|
-
className: cn("px-2 py-1.5 text-sm font-
|
|
60
|
+
className: cn("px-2 py-1.5 text-sm font-medium data-[inset=true]:ps-8", className),
|
|
61
61
|
...props
|
|
62
62
|
}
|
|
63
63
|
));
|