@godxjp/ui 9.0.0 → 9.2.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.
Files changed (64) hide show
  1. package/dist/app/index.d.ts +1 -1
  2. package/dist/{app.prop-DnIXFzLi.d.ts → app.prop-UTc4j4nj.d.ts} +5 -0
  3. package/dist/aspect-ratio-CZZJd9Km.d.ts +9 -0
  4. package/dist/{chunk-442ULAA6.js → chunk-26WDEDWL.js} +112 -41
  5. package/dist/{chunk-TBXQJCBQ.js → chunk-6HQMUUQW.js} +123 -44
  6. package/dist/{chunk-32ZUUKML.js → chunk-6MCI7W5G.js} +15 -3
  7. package/dist/{chunk-2ACNEQOI.js → chunk-CAEL2ZD2.js} +1 -1
  8. package/dist/{chunk-RSC5K7RP.js → chunk-ETLAI3QU.js} +1 -1
  9. package/dist/chunk-FVPCVZL3.js +270 -0
  10. package/dist/{chunk-Z6HNY2PL.js → chunk-G6Q32VHO.js} +2 -2
  11. package/dist/{chunk-JOLM73YQ.js → chunk-GKXPALFT.js} +1 -1
  12. package/dist/chunk-QWLXN6CT.js +162 -0
  13. package/dist/{chunk-FRU44GA2.js → chunk-XK3M3VRR.js} +16 -2
  14. package/dist/{chunk-6PA2YHRE.js → chunk-XQMPK4GM.js} +0 -15
  15. package/dist/components/admin/index.d.ts +5 -5
  16. package/dist/components/admin/index.js +22 -22
  17. package/dist/components/data-display/card.d.ts +2 -2
  18. package/dist/components/data-display/index.js +2 -2
  19. package/dist/components/data-entry/autocomplete.js +3 -3
  20. package/dist/components/data-entry/cascader.js +1 -1
  21. package/dist/components/data-entry/index.d.ts +1 -1
  22. package/dist/components/data-entry/index.js +13 -13
  23. package/dist/components/data-entry/select.js +3 -3
  24. package/dist/components/data-entry/transfer.js +2 -2
  25. package/dist/components/data-entry/tree-select.js +1 -1
  26. package/dist/components/data-entry/upload.js +4 -4
  27. package/dist/components/feedback/alert.d.ts +2 -2
  28. package/dist/components/feedback/alert.js +2 -2
  29. package/dist/components/feedback/dialog.d.ts +24 -13
  30. package/dist/components/feedback/dialog.js +2 -2
  31. package/dist/components/feedback/index.d.ts +10 -18
  32. package/dist/components/feedback/index.js +6 -6
  33. package/dist/components/layout/index.d.ts +25 -10
  34. package/dist/components/layout/index.js +3 -3
  35. package/dist/components/navigation/index.d.ts +5 -5
  36. package/dist/components/navigation/index.js +6 -6
  37. package/dist/components/navigation/pagination.d.ts +20 -2
  38. package/dist/components/navigation/pagination.js +4 -4
  39. package/dist/components/query/index.js +2 -2
  40. package/dist/components/ui/index.d.ts +10 -7
  41. package/dist/components/ui/index.js +19 -18
  42. package/dist/{feedback.prop-BR5JOpPl.d.ts → feedback.prop-Nc9Aa8SV.d.ts} +1 -3
  43. package/dist/{filter-bar-BycYH10i.d.ts → filter-bar-B5TPUqEO.d.ts} +1 -1
  44. package/dist/index.d.ts +5 -5
  45. package/dist/index.js +27 -27
  46. package/dist/{inline-DCqn4O29.d.ts → inline-CDSVAN54.d.ts} +1 -1
  47. package/dist/{layout.prop-DwJKI6ka.d.ts → layout.prop-JE2TcRyL.d.ts} +8 -2
  48. package/dist/{toggle-group-BulJgKh3.d.ts → password-strength-kQkloEeo.d.ts} +22 -1
  49. package/dist/props/components/index.d.ts +3 -3
  50. package/dist/props/index.d.ts +3 -3
  51. package/dist/props/index.js +1 -1
  52. package/dist/props/registry.d.ts +0 -5
  53. package/dist/props/registry.js +1 -1
  54. package/dist/styles/data-entry-layout.css +71 -0
  55. package/dist/styles/layout.css +48 -0
  56. package/dist/tooltip-Bf2KjRy8.d.ts +14 -0
  57. package/package.json +2 -1
  58. package/dist/aspect-ratio-DGoYrOry.d.ts +0 -6
  59. package/dist/chunk-FYM3MJSK.js +0 -59
  60. package/dist/chunk-P4HFJQID.js +0 -239
  61. package/dist/{chunk-INSF6K3Y.js → chunk-457KVJTX.js} +1 -1
  62. package/dist/{chunk-ZRRLOOBX.js → chunk-E7HBHUJY.js} +1 -1
  63. package/dist/{chunk-GKED65NV.js → chunk-KDBGFJJI.js} +1 -1
  64. package/dist/{chunk-JBHXILI4.js → chunk-S6TBIL7J.js} +1 -1
@@ -1,239 +0,0 @@
1
- import { Input } from './chunk-VOHTRR5X.js';
2
- import { buttonVariants, Button } from './chunk-M4PZNAMV.js';
3
- import { Label } from './chunk-7PWBC4BY.js';
4
- import { useTranslation } from './chunk-RLGHEV4A.js';
5
- import { cn } from './chunk-U7N2A7A3.js';
6
- import * as React from 'react';
7
- import * as DialogPrimitive from '@radix-ui/react-dialog';
8
- import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
9
- import { X } from 'lucide-react';
10
- import { jsx, jsxs } from 'react/jsx-runtime';
11
-
12
- var DialogModeContext = React.createContext("form");
13
- function useDialogMode() {
14
- return React.useContext(DialogModeContext);
15
- }
16
- function DialogRoot({ mode = "form", ...props }) {
17
- if (mode === "confirm") {
18
- return /* @__PURE__ */ jsx(DialogModeContext.Provider, { value: "confirm", children: /* @__PURE__ */ jsx(AlertDialogPrimitive.Root, { "data-slot": "dialog", ...props }) });
19
- }
20
- return /* @__PURE__ */ jsx(DialogModeContext.Provider, { value: "form", children: /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props }) });
21
- }
22
- function DialogTrigger(props) {
23
- const mode = useDialogMode();
24
- if (mode === "confirm") {
25
- return /* @__PURE__ */ jsx(AlertDialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
26
- }
27
- return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
28
- }
29
- function DialogPortal(props) {
30
- return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
31
- }
32
- function DialogClose(props) {
33
- return /* @__PURE__ */ jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
34
- }
35
- var DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
36
- DialogPrimitive.Overlay,
37
- {
38
- ref,
39
- "data-slot": "dialog-overlay",
40
- className: cn(
41
- "ui-dialog-overlay data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
42
- className
43
- ),
44
- ...props
45
- }
46
- ));
47
- DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
48
- var DialogContent = React.forwardRef(({ className, children, showClose, showCloseButton: showCloseButtonProp, ...props }, ref) => {
49
- const mode = useDialogMode();
50
- if (mode === "confirm") {
51
- return /* @__PURE__ */ jsxs(AlertDialogPrimitive.Portal, { children: [
52
- /* @__PURE__ */ jsx(
53
- AlertDialogPrimitive.Overlay,
54
- {
55
- "data-slot": "dialog-overlay",
56
- className: "ui-dialog-overlay data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0"
57
- }
58
- ),
59
- /* @__PURE__ */ jsx(
60
- AlertDialogPrimitive.Content,
61
- {
62
- ref,
63
- "data-slot": "dialog-content",
64
- className: cn(
65
- "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 duration-200 outline-none",
66
- className
67
- ),
68
- ...props,
69
- children
70
- }
71
- )
72
- ] });
73
- }
74
- const showCloseButton = showCloseButtonProp ?? showClose ?? true;
75
- return /* @__PURE__ */ jsxs(DialogPortal, { children: [
76
- /* @__PURE__ */ jsx(DialogOverlay, {}),
77
- /* @__PURE__ */ jsxs(
78
- DialogPrimitive.Content,
79
- {
80
- ref,
81
- "data-slot": "dialog-content",
82
- className: cn(
83
- "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 duration-200 outline-none",
84
- className
85
- ),
86
- ...props,
87
- children: [
88
- children,
89
- showCloseButton ? /* @__PURE__ */ jsxs(
90
- DialogPrimitive.Close,
91
- {
92
- "data-slot": "dialog-close",
93
- className: "ring-offset-background focus:ring-ring transition-opacity focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",
94
- children: [
95
- /* @__PURE__ */ jsx(X, { className: "size-4", "aria-hidden": "true" }),
96
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
97
- ]
98
- }
99
- ) : null
100
- ]
101
- }
102
- )
103
- ] });
104
- });
105
- DialogContent.displayName = "DialogContent";
106
- var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { "data-slot": "dialog-header", className, ...props });
107
- DialogHeader.displayName = "DialogHeader";
108
- var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { "data-slot": "dialog-footer", className, ...props });
109
- DialogFooter.displayName = "DialogFooter";
110
- var DialogTitle = React.forwardRef(({ className, ...props }, ref) => {
111
- const mode = useDialogMode();
112
- const cls = cn(className);
113
- if (mode === "confirm") {
114
- return /* @__PURE__ */ jsx(AlertDialogPrimitive.Title, { ref, "data-slot": "dialog-title", className: cls, ...props });
115
- }
116
- return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ref, "data-slot": "dialog-title", className: cls, ...props });
117
- });
118
- DialogTitle.displayName = "DialogTitle";
119
- var DialogDescription = React.forwardRef(({ className, ...props }, ref) => {
120
- const mode = useDialogMode();
121
- const cls = cn(className);
122
- if (mode === "confirm") {
123
- return /* @__PURE__ */ jsx(
124
- AlertDialogPrimitive.Description,
125
- {
126
- ref,
127
- "data-slot": "dialog-description",
128
- className: cls,
129
- ...props
130
- }
131
- );
132
- }
133
- return /* @__PURE__ */ jsx(
134
- DialogPrimitive.Description,
135
- {
136
- ref,
137
- "data-slot": "dialog-description",
138
- className: cls,
139
- ...props
140
- }
141
- );
142
- });
143
- DialogDescription.displayName = "DialogDescription";
144
- var DialogAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, { ref, className: cn(buttonVariants(), className), ...props }));
145
- DialogAction.displayName = "DialogAction";
146
- var DialogCancel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
147
- AlertDialogPrimitive.Cancel,
148
- {
149
- ref,
150
- className: cn(buttonVariants({ variant: "outline" }), className),
151
- ...props
152
- }
153
- ));
154
- DialogCancel.displayName = "DialogCancel";
155
- function AlertDialog({
156
- open,
157
- onOpenChange,
158
- title,
159
- description,
160
- confirmLabel,
161
- cancelLabel,
162
- variant = "default",
163
- confirmPhrase,
164
- onConfirm,
165
- keepOpenOnConfirm = false,
166
- pending = false
167
- }) {
168
- const { t } = useTranslation();
169
- const [typed, setTyped] = React.useState("");
170
- const inputId = React.useId();
171
- const needsPhrase = confirmPhrase != null && confirmPhrase.length > 0;
172
- const phraseMatches = !needsPhrase || typed === confirmPhrase;
173
- const effectiveVariant = needsPhrase ? "destructive" : variant;
174
- const resolvedConfirm = confirmLabel ?? (needsPhrase ? t("common.delete") : t("common.continue"));
175
- const resolvedCancel = cancelLabel ?? t("common.cancel");
176
- const handleOpenChange = (next) => {
177
- setTyped("");
178
- onOpenChange(next);
179
- };
180
- const handleConfirm = () => {
181
- if (!phraseMatches) return;
182
- void (async () => {
183
- await onConfirm();
184
- if (!keepOpenOnConfirm) onOpenChange(false);
185
- })();
186
- };
187
- return /* @__PURE__ */ jsx(DialogRoot, { mode: "confirm", open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { children: [
188
- /* @__PURE__ */ jsxs(DialogHeader, { children: [
189
- /* @__PURE__ */ jsx(DialogTitle, { children: title }),
190
- description ? /* @__PURE__ */ jsx(DialogDescription, { children: description }) : null
191
- ] }),
192
- needsPhrase && /* @__PURE__ */ jsxs("div", { className: "ui-stack-xs", children: [
193
- /* @__PURE__ */ jsx(Label, { htmlFor: inputId, className: "text-sm", children: t("common.typeToConfirm", { phrase: confirmPhrase }) }),
194
- /* @__PURE__ */ jsx(
195
- Input,
196
- {
197
- id: inputId,
198
- value: typed,
199
- onChange: (e) => {
200
- setTyped(e.target.value);
201
- },
202
- autoComplete: "off",
203
- spellCheck: false,
204
- placeholder: confirmPhrase,
205
- "aria-required": "true"
206
- }
207
- )
208
- ] }),
209
- /* @__PURE__ */ jsxs(DialogFooter, { children: [
210
- /* @__PURE__ */ jsx(DialogCancel, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "ghost", disabled: pending, children: resolvedCancel }) }),
211
- /* @__PURE__ */ jsx(
212
- Button,
213
- {
214
- variant: effectiveVariant === "destructive" ? "destructive" : "default",
215
- onClick: handleConfirm,
216
- disabled: pending || !phraseMatches,
217
- children: pending ? t("common.working") : resolvedConfirm
218
- }
219
- )
220
- ] })
221
- ] }) });
222
- }
223
- var Dialog = Object.assign(DialogRoot, {
224
- Trigger: DialogTrigger,
225
- Portal: DialogPortal,
226
- Overlay: DialogOverlay,
227
- Content: DialogContent,
228
- Header: DialogHeader,
229
- Footer: DialogFooter,
230
- Title: DialogTitle,
231
- Description: DialogDescription,
232
- Close: DialogClose,
233
- Action: DialogAction,
234
- Cancel: DialogCancel,
235
- Confirm: AlertDialog
236
- });
237
- var DialogConfirm = AlertDialog;
238
-
239
- export { AlertDialog, Dialog, DialogAction, DialogCancel, DialogClose, DialogConfirm, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogRoot, DialogTitle, DialogTrigger };
@@ -3,8 +3,8 @@ import { Checkbox } from './chunk-O24Z3ULJ.js';
3
3
  import { Input } from './chunk-VOHTRR5X.js';
4
4
  import { Button } from './chunk-M4PZNAMV.js';
5
5
  import { ScrollArea } from './chunk-3KPEZ5CF.js';
6
- import { Label } from './chunk-7PWBC4BY.js';
7
6
  import { useTranslation } from './chunk-RLGHEV4A.js';
7
+ import { Label } from './chunk-7PWBC4BY.js';
8
8
  import { useDebouncedValue } from './chunk-LFW37FGG.js';
9
9
  import { cn } from './chunk-U7N2A7A3.js';
10
10
  import * as React from 'react';
@@ -1,6 +1,6 @@
1
1
  import { humanError } from './chunk-4R7QL3MW.js';
2
- import { Inline } from './chunk-TILFZBTE.js';
3
2
  import { Button } from './chunk-M4PZNAMV.js';
3
+ import { Inline } from './chunk-TILFZBTE.js';
4
4
  import { useTranslation } from './chunk-RLGHEV4A.js';
5
5
  import { cn } from './chunk-U7N2A7A3.js';
6
6
  import * as React from 'react';
@@ -1,5 +1,5 @@
1
- import { Input } from './chunk-VOHTRR5X.js';
2
1
  import { Command, CommandList, CommandItem, CommandGroup } from './chunk-HTEL5DQI.js';
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
5
  import { useTranslation } from './chunk-RLGHEV4A.js';
@@ -1,5 +1,5 @@
1
- import { Inline, densityClass } from './chunk-TILFZBTE.js';
2
1
  import { Button } from './chunk-M4PZNAMV.js';
2
+ import { Inline, densityClass } from './chunk-TILFZBTE.js';
3
3
  import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from './chunk-4MMIMZMK.js';
4
4
  import { tableCellPaddingClass, tableRowHeightClass, controlIconSmClass } from './chunk-IBK5D2Q6.js';
5
5
  import { useTranslation } from './chunk-RLGHEV4A.js';