@godxjp/ui 6.2.0 → 6.4.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 (80) hide show
  1. package/dist/app/index.js +4 -4
  2. package/dist/{checkbox-CoHDi3ao.d.ts → checkbox-CNP1MnPn.d.ts} +1 -1
  3. package/dist/{chunk-7JN4JXK6.js → chunk-54LBVZLM.js} +111 -23
  4. package/dist/{chunk-GV2YQLH2.js → chunk-5DRKN2HI.js} +1 -1
  5. package/dist/{chunk-7OTWYSVX.js → chunk-6BJ2X7PA.js} +32 -10
  6. package/dist/{chunk-IGOP3HFF.js → chunk-7W3CHMLL.js} +1 -1
  7. package/dist/{chunk-FRFUSXBH.js → chunk-A3Q5LKWS.js} +1 -1
  8. package/dist/chunk-DV52WNXO.js +8 -0
  9. package/dist/{chunk-2476DOOA.js → chunk-E7CZIMX7.js} +2 -2
  10. package/dist/{chunk-32UNYHGY.js → chunk-EYLUVDHJ.js} +1 -1
  11. package/dist/{chunk-FBGBDFNL.js → chunk-FNZQTYAG.js} +2 -2
  12. package/dist/{chunk-66KBGNJT.js → chunk-GFUO67BB.js} +3 -3
  13. package/dist/chunk-GXBWEOZD.js +106 -0
  14. package/dist/{chunk-2D72MDPB.js → chunk-GXKBK6N2.js} +2 -2
  15. package/dist/{chunk-JVAOKBRC.js → chunk-MIVDO3Z3.js} +2 -2
  16. package/dist/{chunk-ZOBDO3KZ.js → chunk-NKN2OW3G.js} +2 -2
  17. package/dist/{chunk-BXIE57HV.js → chunk-RGSH6FQN.js} +1 -1
  18. package/dist/{chunk-XAFIIWZU.js → chunk-TNIDN4OY.js} +2 -2
  19. package/dist/{chunk-R5QIUFML.js → chunk-UJFXXEM4.js} +59 -30
  20. package/dist/{chunk-GVKKQ6MU.js → chunk-ULKQ3IDG.js} +2 -2
  21. package/dist/chunk-WHRFHVFD.js +123 -0
  22. package/dist/{chunk-JZCFDGIB.js → chunk-WUXFOY6M.js} +2 -2
  23. package/dist/components/admin/index.d.ts +5 -5
  24. package/dist/components/admin/index.js +20 -19
  25. package/dist/components/data-display/index.js +6 -9
  26. package/dist/components/data-entry/autocomplete.d.ts +1 -1
  27. package/dist/components/data-entry/autocomplete.js +3 -3
  28. package/dist/components/data-entry/calendar.d.ts +1 -1
  29. package/dist/components/data-entry/cascader.d.ts +1 -1
  30. package/dist/components/data-entry/cascader.js +4 -4
  31. package/dist/components/data-entry/checkbox.d.ts +2 -2
  32. package/dist/components/data-entry/color-picker.d.ts +1 -1
  33. package/dist/components/data-entry/color-picker.js +4 -4
  34. package/dist/components/data-entry/command.d.ts +5 -5
  35. package/dist/components/data-entry/date-picker.d.ts +8 -2
  36. package/dist/components/data-entry/date-picker.js +4 -3
  37. package/dist/components/data-entry/date-range-picker.d.ts +7 -2
  38. package/dist/components/data-entry/date-range-picker.js +4 -3
  39. package/dist/components/data-entry/index.d.ts +4 -4
  40. package/dist/components/data-entry/index.js +18 -18
  41. package/dist/components/data-entry/radio.d.ts +1 -1
  42. package/dist/components/data-entry/slider.d.ts +1 -1
  43. package/dist/components/data-entry/switch.d.ts +1 -1
  44. package/dist/components/data-entry/time-picker.d.ts +7 -2
  45. package/dist/components/data-entry/time-picker.js +4 -4
  46. package/dist/components/data-entry/transfer.d.ts +2 -2
  47. package/dist/components/data-entry/transfer.js +4 -4
  48. package/dist/components/data-entry/tree-select.d.ts +1 -1
  49. package/dist/components/data-entry/tree-select.js +4 -4
  50. package/dist/components/data-entry/upload.d.ts +2 -2
  51. package/dist/components/data-entry/upload.js +6 -6
  52. package/dist/components/feedback/alert.js +4 -4
  53. package/dist/components/feedback/dialog.js +3 -3
  54. package/dist/components/feedback/index.js +7 -7
  55. package/dist/components/feedback/sheet.d.ts +1 -1
  56. package/dist/components/layout/index.d.ts +3 -3
  57. package/dist/components/layout/index.js +3 -2
  58. package/dist/components/navigation/index.d.ts +2 -2
  59. package/dist/components/navigation/index.js +4 -4
  60. package/dist/components/navigation/pagination.js +3 -3
  61. package/dist/components/query/index.js +5 -5
  62. package/dist/components/ui/index.d.ts +2 -2
  63. package/dist/components/ui/index.js +19 -19
  64. package/dist/{data-entry.prop-CRbHLb39.d.ts → data-entry.prop-I3mgmdGm.d.ts} +6 -0
  65. package/dist/{filter-bar-XpspcQdZ.d.ts → filter-bar-CNEdQB7i.d.ts} +1 -1
  66. package/dist/i18n/index.d.ts +8 -3
  67. package/dist/i18n/index.js +2 -2
  68. package/dist/index.d.ts +5 -5
  69. package/dist/index.js +20 -19
  70. package/dist/{inline-C5u6ptJV.d.ts → inline-BuyFYZah.d.ts} +1 -1
  71. package/dist/{layout.prop-C795F0qg.d.ts → layout.prop-CjlAEWgr.d.ts} +2 -0
  72. package/dist/lib/datetime/index.d.ts +3 -1
  73. package/dist/lib/datetime/index.js +1 -1
  74. package/dist/props/components/index.d.ts +2 -2
  75. package/dist/props/index.d.ts +2 -2
  76. package/dist/{search-input-PzXHa8KZ.d.ts → search-input-JWJMFVqC.d.ts} +1 -1
  77. package/dist/styles/shell-layout.css +75 -0
  78. package/package.json +2 -1
  79. package/dist/chunk-ACNKID6V.js +0 -70
  80. package/dist/chunk-HNH4PJSV.js +0 -66
@@ -339,6 +339,81 @@
339
339
  opacity: 1;
340
340
  }
341
341
 
342
+ /* Collapsed rail flyout — names a leaf item (tooltip) or reveals a group's submenu on
343
+ * hover/focus, since the rail hides labels. Hidden by default; shown only when collapsed. */
344
+ .sb-nav-fly {
345
+ position: relative;
346
+ }
347
+
348
+ .sb-flyout {
349
+ display: none;
350
+ }
351
+
352
+ [data-collapsed="true"] .sb-nav-item {
353
+ position: relative;
354
+ }
355
+
356
+ [data-collapsed="true"] .sb-flyout {
357
+ position: absolute;
358
+ inset-inline-start: 100%;
359
+ top: 0;
360
+ z-index: 50;
361
+ margin-inline-start: var(--space-2);
362
+ min-width: 11rem;
363
+ flex-direction: column;
364
+ gap: 2px;
365
+ padding: var(--space-1);
366
+ border: 1px solid hsl(var(--border));
367
+ border-radius: var(--radius);
368
+ background: hsl(var(--popover, var(--background)));
369
+ color: hsl(var(--popover-foreground, var(--foreground)));
370
+ box-shadow:
371
+ 0 4px 6px -1px hsl(var(--foreground) / 0.1),
372
+ 0 2px 4px -2px hsl(var(--foreground) / 0.1);
373
+ white-space: nowrap;
374
+ font-size: var(--font-size-sm);
375
+ }
376
+
377
+ /* Leaf tooltip — a single label chip, vertically centered on the icon row. */
378
+ [data-collapsed="true"] .sb-nav-item > .sb-flyout:not(.sb-flyout--group) {
379
+ top: 50%;
380
+ flex-direction: row;
381
+ align-items: center;
382
+ min-width: 0;
383
+ transform: translateY(-50%);
384
+ padding: var(--space-1) var(--space-2);
385
+ font-weight: 500;
386
+ }
387
+
388
+ [data-collapsed="true"] .sb-flyout-title {
389
+ padding: var(--space-1) var(--space-2);
390
+ color: hsl(var(--muted-foreground));
391
+ font-size: var(--font-size-xs);
392
+ font-weight: 600;
393
+ }
394
+
395
+ /* Submenu rows inside a collapsed flyout read as normal (full) nav rows, not dotted children. */
396
+ [data-collapsed="true"] .sb-flyout .sb-nav-item--sub {
397
+ height: var(--control-height);
398
+ font-size: var(--font-size-sm);
399
+ }
400
+
401
+ [data-collapsed="true"] .sb-flyout .sb-nav-item--sub::before {
402
+ content: none;
403
+ }
404
+
405
+ [data-collapsed="true"] .sb-flyout .sb-label {
406
+ display: inline;
407
+ }
408
+
409
+ /* Reveal on hover / keyboard focus. */
410
+ [data-collapsed="true"] .sb-nav-item:hover > .sb-flyout,
411
+ [data-collapsed="true"] .sb-nav-item:focus-visible > .sb-flyout,
412
+ [data-collapsed="true"] .sb-nav-fly:hover .sb-flyout,
413
+ [data-collapsed="true"] .sb-nav-fly:focus-within .sb-flyout {
414
+ display: flex;
415
+ }
416
+
342
417
  /* Footer user — circular avatar with live dot + overflow menu, design `.sb-user`. */
343
418
  .sb-user {
344
419
  display: flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@godxjp/ui",
3
- "version": "6.2.0",
3
+ "version": "6.4.0",
4
4
  "type": "module",
5
5
  "description": "@godxjp/ui — shared React UI framework (shadcn + Radix + Tailwind v4).",
6
6
  "files": [
@@ -294,6 +294,7 @@
294
294
  "@testing-library/jest-dom": "^6.9.1",
295
295
  "@testing-library/react": "^16.3.2",
296
296
  "@testing-library/user-event": "^14.6.1",
297
+ "@types/node": "^22.19.19",
297
298
  "@types/react": "^19.2.14",
298
299
  "@types/react-dom": "^19.2.3",
299
300
  "@vitejs/plugin-react": "^6.0.1",
@@ -1,70 +0,0 @@
1
- import { Calendar } from './chunk-IK7I3ABN.js';
2
- import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
3
- import { Button } from './chunk-HJEBRCXL.js';
4
- import { useTranslation, usePickerLocales } from './chunk-32UNYHGY.js';
5
- import { formatDate } from './chunk-7OTWYSVX.js';
6
- import { cn } from './chunk-U7N2A7A3.js';
7
- import * as React from 'react';
8
- import { CalendarIcon } from 'lucide-react';
9
- import { jsxs, jsx } from 'react/jsx-runtime';
10
-
11
- function formatRange(range) {
12
- if (!range?.from) return "";
13
- const fmt = (d) => formatDate(d, { kind: "calendar" });
14
- if (!range.to) return fmt(range.from);
15
- return `${fmt(range.from)} \u2013 ${fmt(range.to)}`;
16
- }
17
- function DateRangePicker({
18
- value,
19
- onChange,
20
- placeholder,
21
- disabled,
22
- className,
23
- id,
24
- locale: localeProp,
25
- fromDate,
26
- toDate
27
- }) {
28
- const { t } = useTranslation();
29
- const { dayPickerLocale } = usePickerLocales(localeProp);
30
- const [open, setOpen] = React.useState(false);
31
- const label = formatRange(value);
32
- const resolvedPlaceholder = placeholder ?? t("dataEntry.dateRangePicker.placeholder");
33
- return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
34
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
35
- Button,
36
- {
37
- id,
38
- type: "button",
39
- variant: "outline",
40
- disabled,
41
- className: cn(
42
- "w-full justify-start text-left font-normal",
43
- !label && "text-muted-foreground",
44
- className
45
- ),
46
- children: [
47
- /* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 size-4 shrink-0", "aria-hidden": "true" }),
48
- label || resolvedPlaceholder
49
- ]
50
- }
51
- ) }),
52
- /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx(
53
- Calendar,
54
- {
55
- mode: "range",
56
- selected: value,
57
- onSelect: onChange,
58
- locale: dayPickerLocale,
59
- disabled: [
60
- ...fromDate ? [{ before: fromDate }] : [],
61
- ...toDate ? [{ after: toDate }] : []
62
- ],
63
- startMonth: fromDate,
64
- endMonth: toDate
65
- }
66
- ) })
67
- ] });
68
- }
69
-
70
- export { DateRangePicker };
@@ -1,66 +0,0 @@
1
- import { Calendar } from './chunk-IK7I3ABN.js';
2
- import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
3
- import { Button } from './chunk-HJEBRCXL.js';
4
- import { useTranslation, usePickerLocales } from './chunk-32UNYHGY.js';
5
- import { formatDate } from './chunk-7OTWYSVX.js';
6
- import { cn } from './chunk-U7N2A7A3.js';
7
- import * as React from 'react';
8
- import { CalendarIcon } from 'lucide-react';
9
- import { jsxs, jsx } from 'react/jsx-runtime';
10
-
11
- function DatePicker({
12
- value,
13
- onChange,
14
- placeholder,
15
- disabled,
16
- className,
17
- id,
18
- locale: localeProp,
19
- fromDate,
20
- toDate
21
- }) {
22
- const { t } = useTranslation();
23
- const { dayPickerLocale } = usePickerLocales(localeProp);
24
- const [open, setOpen] = React.useState(false);
25
- const resolvedPlaceholder = placeholder ?? t("dataEntry.datePicker.placeholder");
26
- return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
27
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
28
- Button,
29
- {
30
- id,
31
- type: "button",
32
- variant: "outline",
33
- disabled,
34
- className: cn(
35
- "w-full justify-start text-left font-normal",
36
- !value && "text-muted-foreground",
37
- className
38
- ),
39
- children: [
40
- /* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 size-4 shrink-0", "aria-hidden": "true" }),
41
- value ? formatDate(value, { kind: "calendar" }) : resolvedPlaceholder
42
- ]
43
- }
44
- ) }),
45
- /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx(
46
- Calendar,
47
- {
48
- mode: "single",
49
- selected: value,
50
- onSelect: (date) => {
51
- onChange?.(date);
52
- setOpen(false);
53
- },
54
- locale: dayPickerLocale,
55
- disabled: [
56
- ...fromDate ? [{ before: fromDate }] : [],
57
- ...toDate ? [{ after: toDate }] : []
58
- ],
59
- startMonth: fromDate,
60
- endMonth: toDate
61
- }
62
- ) })
63
- ] });
64
- }
65
-
66
- export { DatePicker };