@godxjp/ui 9.1.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 (52) 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-56NYZNVY.js → chunk-6HQMUUQW.js} +122 -43
  6. package/dist/{chunk-VN72SWHX.js → chunk-6MCI7W5G.js} +14 -2
  7. package/dist/{chunk-5D42MFB4.js → chunk-FVPCVZL3.js} +71 -2
  8. package/dist/{chunk-KXOAZGPA.js → chunk-G6Q32VHO.js} +2 -2
  9. package/dist/chunk-QWLXN6CT.js +162 -0
  10. package/dist/{chunk-FRU44GA2.js → chunk-XK3M3VRR.js} +16 -2
  11. package/dist/components/admin/index.d.ts +3 -3
  12. package/dist/components/admin/index.js +19 -19
  13. package/dist/components/data-display/card.d.ts +2 -2
  14. package/dist/components/data-display/index.js +2 -2
  15. package/dist/components/data-entry/cascader.js +1 -1
  16. package/dist/components/data-entry/index.d.ts +1 -1
  17. package/dist/components/data-entry/index.js +12 -12
  18. package/dist/components/data-entry/transfer.js +2 -2
  19. package/dist/components/data-entry/tree-select.js +1 -1
  20. package/dist/components/data-entry/upload.js +4 -4
  21. package/dist/components/feedback/alert.js +2 -2
  22. package/dist/components/feedback/dialog.d.ts +20 -1
  23. package/dist/components/feedback/dialog.js +2 -2
  24. package/dist/components/feedback/index.d.ts +9 -17
  25. package/dist/components/feedback/index.js +6 -6
  26. package/dist/components/layout/index.d.ts +25 -10
  27. package/dist/components/layout/index.js +3 -3
  28. package/dist/components/navigation/index.d.ts +5 -5
  29. package/dist/components/navigation/index.js +3 -3
  30. package/dist/components/navigation/pagination.d.ts +20 -2
  31. package/dist/components/navigation/pagination.js +1 -1
  32. package/dist/components/query/index.js +2 -2
  33. package/dist/components/ui/index.d.ts +9 -6
  34. package/dist/components/ui/index.js +18 -17
  35. package/dist/{filter-bar-BycYH10i.d.ts → filter-bar-B5TPUqEO.d.ts} +1 -1
  36. package/dist/index.d.ts +3 -3
  37. package/dist/index.js +26 -26
  38. package/dist/{inline-DCqn4O29.d.ts → inline-CDSVAN54.d.ts} +1 -1
  39. package/dist/{layout.prop-DwJKI6ka.d.ts → layout.prop-JE2TcRyL.d.ts} +8 -2
  40. package/dist/{toggle-group-BulJgKh3.d.ts → password-strength-kQkloEeo.d.ts} +22 -1
  41. package/dist/props/components/index.d.ts +2 -2
  42. package/dist/props/index.d.ts +2 -2
  43. package/dist/styles/data-entry-layout.css +71 -0
  44. package/dist/styles/layout.css +48 -0
  45. package/dist/tooltip-Bf2KjRy8.d.ts +14 -0
  46. package/package.json +2 -1
  47. package/dist/aspect-ratio-DGoYrOry.d.ts +0 -6
  48. package/dist/chunk-FYM3MJSK.js +0 -59
  49. package/dist/{chunk-INSF6K3Y.js → chunk-457KVJTX.js} +1 -1
  50. package/dist/{chunk-ZRRLOOBX.js → chunk-E7HBHUJY.js} +1 -1
  51. package/dist/{chunk-6YK3IJXW.js → chunk-ETLAI3QU.js} +0 -0
  52. package/dist/{chunk-JBHXILI4.js → chunk-S6TBIL7J.js} +1 -1
@@ -5,7 +5,7 @@ import * as date_fns from 'date-fns';
5
5
  import { Locale } from 'date-fns';
6
6
  import { vi } from 'react-day-picker/locale';
7
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
8
- import { a as AppProviderProp, A as AppContextValue } from '../app.prop-DnIXFzLi.js';
8
+ import { a as AppProviderProp, A as AppContextValue } from '../app.prop-UTc4j4nj.js';
9
9
  import { j as formatDate, a as FormatDateOptions } from '../format-date-ByyZoqI5.js';
10
10
  export { F as FormatDateKind, b as FormatDatetimeOptions, d as detectFormatDateKind, f as formatAppDate, c as formatAppDateLong, e as formatAppDateTime, g as formatAppRelative, h as formatAppTime, i as formatCalendarDate, k as formatTimeOfDay, m as isFormatDateValue } from '../format-date-ByyZoqI5.js';
11
11
  export { getDatetimeContext, isValidHhmm, normalizeHhmm, parseDateInput, syncDatetimeContext } from '../lib/datetime/index.js';
@@ -42,6 +42,11 @@ type LocalePickerProp = {
42
42
  /** Controlled value; default reads/writes AppProvider. */
43
43
  value?: ValueProp<AppLocale>;
44
44
  onValueChange?: OnValueChangeProp<AppLocale>;
45
+ /** Override selectable locale list; omit to use APP_LOCALES. */
46
+ options?: readonly {
47
+ value: string;
48
+ label?: string;
49
+ }[];
45
50
  };
46
51
  /** @see TimezonePicker */
47
52
  type TimezonePickerProp = {
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
3
+ import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
4
+
5
+ declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+
7
+ declare const AspectRatio: React.ForwardRefExoticComponent<Omit<AspectRatioPrimitive.AspectRatioProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+
9
+ export { AspectRatio as A, Separator as S };
@@ -5,9 +5,8 @@ import { densityClass, pageContainerVariantClass, Flex } from './chunk-TILFZBTE.
5
5
  import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
6
6
  import { cn } from './chunk-U7N2A7A3.js';
7
7
  import { ChevronRight, ChevronDown, PanelLeftOpen, PanelLeftClose, Search, Bell, SlidersHorizontal } from 'lucide-react';
8
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
9
9
  import * as React from 'react';
10
- import * as SeparatorPrimitive from '@radix-ui/react-separator';
11
10
 
12
11
  function PageContainerInset({ className, children, ...props }) {
13
12
  return /* @__PURE__ */ jsx("div", { className: cn("ui-page-container-inset", className), ...props, children });
@@ -118,33 +117,91 @@ function Breadcrumb({ items, linkComponent: LinkComponent = "a" }) {
118
117
  ] }, item.to ?? index);
119
118
  }) }) });
120
119
  }
121
- function isItemActive(item, activeId) {
122
- if (item.id === activeId) return true;
123
- return (item.children ?? []).some((child) => isItemActive(child, activeId));
120
+ function SidebarHeader({ children, className, ...props }) {
121
+ return /* @__PURE__ */ jsx("div", { className: cn("sb-brand", className), ...props, children });
122
+ }
123
+ function SidebarSection({
124
+ label,
125
+ collapsed = false,
126
+ children,
127
+ className,
128
+ ...props
129
+ }) {
130
+ return /* @__PURE__ */ jsxs("div", { className: cn("sb-section", className), ...props, children: [
131
+ label && !collapsed ? /* @__PURE__ */ jsx("div", { className: "sb-section-label", children: label }) : null,
132
+ /* @__PURE__ */ jsx("div", { className: "sb-nav", children })
133
+ ] });
124
134
  }
125
- function NavLeaf({ item, activeId, onSelect, sub = false }) {
135
+ function SidebarItem({
136
+ item,
137
+ active = false,
138
+ sub = false,
139
+ onActivate,
140
+ renderItem,
141
+ children,
142
+ ...props
143
+ }) {
126
144
  const Icon = item.icon;
127
- const active = item.id === activeId;
128
- return /* @__PURE__ */ jsxs(
145
+ const showBadge = item.badge !== void 0 && item.badge !== "";
146
+ const disabled = item.disabled || props.disabled;
147
+ const content = children ?? (renderItem ? renderItem(item) : void 0);
148
+ return /* @__PURE__ */ jsx(
129
149
  "button",
130
150
  {
131
151
  type: "button",
132
152
  className: cn("sb-nav-item", sub && "sb-nav-item--sub"),
133
153
  "data-active": active ? "true" : void 0,
134
154
  "aria-current": active ? "page" : void 0,
135
- "aria-disabled": item.disabled,
155
+ "aria-disabled": disabled,
156
+ ...props,
136
157
  onClick: () => {
137
- if (!item.disabled) onSelect?.(item.id);
158
+ if (disabled) return;
159
+ onActivate?.(item.id);
138
160
  },
139
- children: [
161
+ children: content ? content : /* @__PURE__ */ jsxs(Fragment, { children: [
140
162
  !sub ? /* @__PURE__ */ jsx("span", { className: "sb-icon", children: /* @__PURE__ */ jsx(Icon, { "aria-hidden": "true" }) }) : null,
141
163
  /* @__PURE__ */ jsx("span", { className: "sb-label", children: item.label }),
142
- item.badge !== void 0 && item.badge !== "" ? /* @__PURE__ */ jsx("span", { className: "sb-badge", children: item.badge }) : null
143
- ]
164
+ showBadge ? /* @__PURE__ */ jsx("span", { className: "sb-badge", children: item.badge }) : null
165
+ ] })
166
+ }
167
+ );
168
+ }
169
+ function isItemActive(item, activeId) {
170
+ if (item.id === activeId) return true;
171
+ return (item.children ?? []).some((child) => isItemActive(child, activeId));
172
+ }
173
+ function NavLeaf({ item, activeId, onSelect, sub = false, renderItem }) {
174
+ const active = item.id === activeId;
175
+ return /* @__PURE__ */ jsx(
176
+ SidebarItem,
177
+ {
178
+ item,
179
+ active,
180
+ onActivate: onSelect,
181
+ sub,
182
+ renderItem
144
183
  }
145
184
  );
146
185
  }
147
- function NavGroup({ item, activeId, onSelect }) {
186
+ function NavLeafsInGroup({
187
+ children,
188
+ activeId,
189
+ onSelect,
190
+ renderItem
191
+ }) {
192
+ return children.map((child) => /* @__PURE__ */ jsx(
193
+ NavLeaf,
194
+ {
195
+ item: child,
196
+ activeId,
197
+ onSelect,
198
+ sub: true,
199
+ renderItem
200
+ },
201
+ child.id
202
+ ));
203
+ }
204
+ function NavGroup({ item, activeId, onSelect, renderItem }) {
148
205
  const Icon = item.icon;
149
206
  const active = isItemActive(item, activeId);
150
207
  const children = item.children ?? [];
@@ -161,7 +218,7 @@ function NavGroup({ item, activeId, onSelect }) {
161
218
  ]
162
219
  }
163
220
  ),
164
- /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("div", { className: "sb-nav-sub", children: children.map((child) => /* @__PURE__ */ jsx(NavLeaf, { item: child, activeId, onSelect, sub: true }, child.id)) }) })
221
+ /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("div", { className: "sb-nav-sub", children: children.length > 0 ? /* @__PURE__ */ jsx(NavLeafsInGroup, { activeId, onSelect, renderItem, children }) : null }) })
165
222
  ] });
166
223
  }
167
224
  function CollapsedRow({ item, activeId, onSelect }) {
@@ -237,10 +294,13 @@ function Sidebar({
237
294
  onProductClick,
238
295
  brand,
239
296
  collapsed = false,
297
+ children,
298
+ renderItem,
240
299
  footer
241
300
  }) {
301
+ const resolvedSections = sections ?? [];
242
302
  return /* @__PURE__ */ jsxs("div", { className: "sb-root", "data-collapsed": collapsed ? "true" : void 0, children: [
243
- brand !== void 0 ? /* @__PURE__ */ jsx("div", { className: "sb-brand", children: brand }) : product ? /* @__PURE__ */ jsxs(
303
+ brand !== void 0 ? /* @__PURE__ */ jsx(SidebarHeader, { children: brand }) : product ? /* @__PURE__ */ jsxs(
244
304
  "button",
245
305
  {
246
306
  type: "button",
@@ -256,20 +316,43 @@ function Sidebar({
256
316
  children: product.name[0]?.toUpperCase() ?? "?"
257
317
  }
258
318
  ),
259
- !collapsed && /* @__PURE__ */ jsxs("span", { className: "sb-product-meta", children: [
319
+ !collapsed ? /* @__PURE__ */ jsxs("span", { className: "sb-product-meta", children: [
260
320
  /* @__PURE__ */ jsx("span", { className: "sb-product-name", children: product.name }),
261
321
  product.role ? /* @__PURE__ */ jsx("span", { className: "sb-product-tenant", children: product.role }) : null
262
- ] }),
263
- !collapsed && /* @__PURE__ */ jsx("span", { className: "sb-product-caret", children: /* @__PURE__ */ jsx(ChevronDown, { "aria-hidden": "true" }) })
322
+ ] }) : null,
323
+ !collapsed ? /* @__PURE__ */ jsx("span", { className: "sb-product-caret", children: /* @__PURE__ */ jsx(ChevronDown, { "aria-hidden": "true" }) }) : null
264
324
  ]
265
325
  }
266
326
  ) : null,
267
- /* @__PURE__ */ jsx("div", { className: "sb-nav-scroll", children: sections.map((section, sectionIndex) => /* @__PURE__ */ jsxs("div", { className: "sb-section", children: [
268
- section.label && !collapsed ? /* @__PURE__ */ jsx("div", { className: "sb-section-label", children: section.label }) : null,
269
- /* @__PURE__ */ jsx("div", { className: "sb-nav", role: "navigation", children: section.items.map(
270
- (item) => collapsed ? /* @__PURE__ */ jsx(CollapsedRow, { item, activeId, onSelect }, item.id) : item.children && item.children.length > 0 ? /* @__PURE__ */ jsx(NavGroup, { item, activeId, onSelect }, item.id) : /* @__PURE__ */ jsx(NavLeaf, { item, activeId, onSelect }, item.id)
271
- ) })
272
- ] }, section.label ?? sectionIndex)) }),
327
+ /* @__PURE__ */ jsx("div", { className: "sb-nav-scroll", children: children ?? resolvedSections.map((section, sectionIndex) => /* @__PURE__ */ jsx(
328
+ SidebarSection,
329
+ {
330
+ label: section.label,
331
+ collapsed,
332
+ children: section.items.map(
333
+ (item) => collapsed ? /* @__PURE__ */ jsx(CollapsedRow, { item, activeId, onSelect }, item.id) : item.children && item.children.length > 0 ? /* @__PURE__ */ jsx(
334
+ NavGroup,
335
+ {
336
+ item,
337
+ activeId,
338
+ onSelect,
339
+ renderItem
340
+ },
341
+ item.id
342
+ ) : /* @__PURE__ */ jsx(
343
+ NavLeaf,
344
+ {
345
+ item,
346
+ activeId,
347
+ onSelect,
348
+ renderItem
349
+ },
350
+ item.id
351
+ )
352
+ )
353
+ },
354
+ section.label ?? sectionIndex
355
+ )) }),
273
356
  footer ? /* @__PURE__ */ jsx("div", { className: "sb-footer", children: footer }) : null
274
357
  ] });
275
358
  }
@@ -278,6 +361,7 @@ function Topbar({
278
361
  project,
279
362
  productMenu,
280
363
  projectMenu,
364
+ projectPlaceholder,
281
365
  onProductOpen,
282
366
  onProjectOpen,
283
367
  onSearchOpen,
@@ -316,10 +400,10 @@ function Topbar({
316
400
  {
317
401
  type: "button",
318
402
  className: `tb-chip ${project ? "" : "tb-chip-empty"}`,
319
- "aria-label": project ? project.name : "Pick project",
403
+ "aria-label": project ? project.name : projectPlaceholder ?? "",
320
404
  onClick: projectMenu ? void 0 : onProjectOpen,
321
405
  children: [
322
- /* @__PURE__ */ jsx("span", { className: "tb-chip-label", children: project ? project.name : "Pick project" }),
406
+ /* @__PURE__ */ jsx("span", { className: "tb-chip-label", children: project ? project.name : projectPlaceholder ?? "\u2014" }),
323
407
  /* @__PURE__ */ jsx("span", { className: "tb-chip-caret", children: /* @__PURE__ */ jsx(ChevronDown, { "aria-hidden": "true" }) })
324
408
  ]
325
409
  }
@@ -402,18 +486,5 @@ function SplitPane({ children, aside, asideWidth = "md" }) {
402
486
  /* @__PURE__ */ jsx("aside", { className: "ui-split-pane-aside", children: aside })
403
487
  ] });
404
488
  }
405
- var Separator = React.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
406
- SeparatorPrimitive.Root,
407
- {
408
- ref,
409
- "data-slot": "separator",
410
- "data-orientation": orientation,
411
- orientation,
412
- decorative,
413
- className: cn("ui-separator", className),
414
- ...props
415
- }
416
- ));
417
- Separator.displayName = SeparatorPrimitive.Root.displayName;
418
489
 
419
- export { AppShell, Breadcrumb, PageContainer, PageInset, ResponsiveGrid, Separator, Sidebar, SplitPane, Stack, Topbar };
490
+ export { AppShell, Breadcrumb, PageContainer, PageInset, ResponsiveGrid, Sidebar, SidebarHeader, SidebarItem, SidebarSection, SplitPane, Stack, Topbar };
@@ -2,8 +2,9 @@ import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '.
2
2
  import { Button } from './chunk-M4PZNAMV.js';
3
3
  import { useTranslation } from './chunk-RLGHEV4A.js';
4
4
  import { cn } from './chunk-U7N2A7A3.js';
5
- import { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react';
6
- import { jsxs, jsx } from 'react/jsx-runtime';
5
+ import * as React from 'react';
6
+ import { MoreHorizontal, ChevronLeft, ChevronRight } from 'lucide-react';
7
+ import { jsx, jsxs } from 'react/jsx-runtime';
7
8
 
8
9
  // src/components/navigation/pagination-utils.ts
9
10
  function buildPageRange(current, totalPages, siblingCount = 1) {
@@ -28,6 +29,80 @@ function buildPageRange(current, totalPages, siblingCount = 1) {
28
29
  if (totalPages > 1) range.push(totalPages);
29
30
  return range;
30
31
  }
32
+ var PaginationContent = React.forwardRef(({ className, ...props }, ref) => {
33
+ return /* @__PURE__ */ jsx("ul", { ref, className: cn("ui-pagination-list", className), role: "list", ...props });
34
+ });
35
+ PaginationContent.displayName = "PaginationContent";
36
+ var PaginationItem = React.forwardRef(
37
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("ui-pagination-item", className), ...props })
38
+ );
39
+ PaginationItem.displayName = "PaginationItem";
40
+ var PaginationLink = React.forwardRef(
41
+ ({ className, isActive, disabled, children, onClick, ...props }, ref) => /* @__PURE__ */ jsx(
42
+ "a",
43
+ {
44
+ ref,
45
+ "data-active": isActive || void 0,
46
+ "aria-current": isActive ? "page" : void 0,
47
+ "aria-disabled": disabled || void 0,
48
+ "data-state": disabled ? "disabled" : void 0,
49
+ className: cn(
50
+ "ui-pagination-link ui-button--compact-icon ui-pagination-page",
51
+ isActive ? "ui-pagination-link-active" : void 0,
52
+ disabled ? "ui-pagination-link-disabled" : void 0,
53
+ className
54
+ ),
55
+ role: "button",
56
+ onClick: (event) => {
57
+ if (disabled) {
58
+ event.preventDefault();
59
+ return;
60
+ }
61
+ onClick?.(event);
62
+ },
63
+ ...props,
64
+ children
65
+ }
66
+ )
67
+ );
68
+ PaginationLink.displayName = "PaginationLink";
69
+ var PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsx(
70
+ "span",
71
+ {
72
+ className: cn("ui-pagination-ellipsis ui-button--compact-icon", className),
73
+ "aria-hidden": "true",
74
+ role: "presentation",
75
+ ...props,
76
+ children: /* @__PURE__ */ jsx(MoreHorizontal, {})
77
+ }
78
+ );
79
+ PaginationEllipsis.displayName = "PaginationEllipsis";
80
+ var PaginationPrevious = React.forwardRef(
81
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
82
+ PaginationLink,
83
+ {
84
+ ref,
85
+ className: cn("ui-pagination-prev", className),
86
+ disabled: props.disabled,
87
+ ...props,
88
+ children
89
+ }
90
+ )
91
+ );
92
+ PaginationPrevious.displayName = "PaginationPrevious";
93
+ var PaginationNext = React.forwardRef(
94
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
95
+ PaginationLink,
96
+ {
97
+ ref,
98
+ className: cn("ui-pagination-next", className),
99
+ disabled: props.disabled,
100
+ ...props,
101
+ children
102
+ }
103
+ )
104
+ );
105
+ PaginationNext.displayName = "PaginationNext";
31
106
  function Pagination({
32
107
  current = 1,
33
108
  total = 0,
@@ -121,51 +196,55 @@ function Pagination({
121
196
  ]
122
197
  }
123
198
  ),
124
- /* @__PURE__ */ jsx(
125
- Button,
126
- {
127
- type: "button",
128
- variant: "outline",
129
- size: "icon",
130
- className: "ui-button--compact-icon",
131
- disabled: Boolean(disabled) || safeCurrent <= 1,
132
- "aria-label": t("navigation.pagination.prev"),
133
- onClick: () => go(safeCurrent - 1),
134
- children: /* @__PURE__ */ jsx(ChevronLeft, { "aria-hidden": "true" })
135
- }
136
- ),
137
- /* @__PURE__ */ jsx("ul", { className: "ui-pagination-list", children: pages.map(
138
- (page, index) => page === "ellipsis" ? /* @__PURE__ */ jsx("li", { className: "ui-pagination-ellipsis ui-button--compact-icon", children: /* @__PURE__ */ jsx(MoreHorizontal, { "aria-hidden": "true" }) }, `e-${index}`) : /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
139
- Button,
199
+ /* @__PURE__ */ jsxs(PaginationContent, { children: [
200
+ /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(
201
+ PaginationPrevious,
140
202
  {
141
- type: "button",
142
- variant: page === safeCurrent ? "default" : "outline",
143
- size: "icon",
144
- className: "ui-button--compact-icon ui-pagination-page",
145
- disabled,
146
- "aria-label": t("navigation.pagination.page", { page }),
147
- "aria-current": page === safeCurrent ? "page" : void 0,
148
- onClick: () => go(page),
149
- children: page
203
+ href: "#",
204
+ "aria-label": t("navigation.pagination.prev"),
205
+ onClick: (event) => {
206
+ event.preventDefault();
207
+ go(safeCurrent - 1);
208
+ },
209
+ className: "ui-button--compact-icon",
210
+ disabled: Boolean(disabled) || safeCurrent <= 1,
211
+ children: /* @__PURE__ */ jsx(ChevronLeft, { "aria-hidden": "true" })
150
212
  }
151
- ) }, page)
152
- ) }),
153
- /* @__PURE__ */ jsx(
154
- Button,
155
- {
156
- type: "button",
157
- variant: "outline",
158
- size: "icon",
159
- className: "ui-button--compact-icon",
160
- disabled: Boolean(disabled) || safeCurrent >= totalPages,
161
- "aria-label": t("navigation.pagination.next"),
162
- onClick: () => go(safeCurrent + 1),
163
- children: /* @__PURE__ */ jsx(ChevronRight, { "aria-hidden": "true" })
164
- }
165
- )
213
+ ) }),
214
+ pages.map(
215
+ (page, index) => page === "ellipsis" ? /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationEllipsis, {}) }, `e-${index}`) : /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(
216
+ PaginationLink,
217
+ {
218
+ isActive: page === safeCurrent,
219
+ "aria-label": t("navigation.pagination.page", { page }),
220
+ onClick: (event) => {
221
+ event.preventDefault();
222
+ if (!disabled) go(page);
223
+ },
224
+ href: "#",
225
+ disabled,
226
+ children: page
227
+ }
228
+ ) }, page)
229
+ ),
230
+ /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(
231
+ PaginationNext,
232
+ {
233
+ href: "#",
234
+ "aria-label": t("navigation.pagination.next"),
235
+ onClick: (event) => {
236
+ event.preventDefault();
237
+ go(safeCurrent + 1);
238
+ },
239
+ className: "ui-button--compact-icon",
240
+ disabled: Boolean(disabled) || safeCurrent >= totalPages,
241
+ children: /* @__PURE__ */ jsx(ChevronRight, { "aria-hidden": "true" })
242
+ }
243
+ ) })
244
+ ] })
166
245
  ]
167
246
  }
168
247
  );
169
248
  }
170
249
 
171
- export { Pagination };
250
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
@@ -65,11 +65,19 @@ function PageHeader({
65
65
  ] })
66
66
  ] });
67
67
  }
68
- function LocalePicker({ className, disabled, id, value, onValueChange }) {
68
+ function LocalePicker({
69
+ className,
70
+ disabled,
71
+ id,
72
+ value,
73
+ onValueChange,
74
+ options: optionsProp
75
+ }) {
69
76
  const ctx = useOptionalAppContext();
70
77
  const { t } = useTranslation();
71
78
  const current = value ?? ctx?.locale;
72
79
  const handleChange = onValueChange ?? ctx?.setLocale;
80
+ const options = optionsProp ?? APP_LOCALES;
73
81
  if (current === void 0 || !handleChange) {
74
82
  throw new Error("LocalePicker requires <AppProvider> or controlled value + onValueChange");
75
83
  }
@@ -86,7 +94,11 @@ function LocalePicker({ className, disabled, id, value, onValueChange }) {
86
94
  ]
87
95
  }
88
96
  ),
89
- /* @__PURE__ */ jsx(SelectContent, { children: APP_LOCALES.map((code) => /* @__PURE__ */ jsx(SelectItem, { value: code, children: t(`locale.${code}`) }, code)) })
97
+ /* @__PURE__ */ jsx(SelectContent, { children: options.map((option) => {
98
+ const code = typeof option === "string" ? option : option.value;
99
+ const label = typeof option === "string" ? t(`locale.${option}`) : option.label ?? t(`locale.${option.value}`);
100
+ return /* @__PURE__ */ jsx(SelectItem, { value: code, children: label }, code);
101
+ }) })
90
102
  ] });
91
103
  }
92
104
  function TimezonePicker({
@@ -1,7 +1,7 @@
1
1
  import { Input } from './chunk-VOHTRR5X.js';
2
2
  import { buttonVariants, Button } from './chunk-M4PZNAMV.js';
3
- import { Label } from './chunk-7PWBC4BY.js';
4
3
  import { useTranslation } from './chunk-RLGHEV4A.js';
4
+ import { Label } from './chunk-7PWBC4BY.js';
5
5
  import { cn } from './chunk-U7N2A7A3.js';
6
6
  import * as React from 'react';
7
7
  import * as DialogPrimitive from '@radix-ui/react-dialog';
@@ -89,6 +89,73 @@ var DialogDescription = React.forwardRef(({ className, ...props }, ref) => {
89
89
  );
90
90
  });
91
91
  DialogDescription.displayName = "DialogDescription";
92
+ var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
93
+ var AlertDialogPortal = AlertDialogPrimitive.Portal;
94
+ var AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
95
+ AlertDialogPrimitive.Overlay,
96
+ {
97
+ ref,
98
+ "data-slot": "dialog-overlay",
99
+ className: cn(
100
+ "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",
101
+ className
102
+ ),
103
+ ...props
104
+ }
105
+ ));
106
+ AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
107
+ var AlertDialogContent = React.forwardRef(({ className, children, showClose, showCloseButton: showCloseButtonProp, ...props }, ref) => {
108
+ const showCloseButton = showCloseButtonProp ?? showClose ?? false;
109
+ return /* @__PURE__ */ jsxs(
110
+ AlertDialogPrimitive.Content,
111
+ {
112
+ ref,
113
+ "data-slot": "dialog-content",
114
+ className: cn(
115
+ "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",
116
+ className
117
+ ),
118
+ ...props,
119
+ children: [
120
+ children,
121
+ showCloseButton ? /* @__PURE__ */ jsx(AlertDialogPrimitive.Cancel, { asChild: true, children: /* @__PURE__ */ jsx(
122
+ "button",
123
+ {
124
+ type: "button",
125
+ className: "ring-offset-background focus:ring-ring transition-opacity focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",
126
+ "aria-label": "Close",
127
+ children: /* @__PURE__ */ jsx(X, { className: "size-4", "aria-hidden": "true" })
128
+ }
129
+ ) }) : null
130
+ ]
131
+ }
132
+ );
133
+ });
134
+ AlertDialogContent.displayName = "AlertDialogContent";
135
+ var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { "data-slot": "dialog-header", className: cn(className), ...props });
136
+ AlertDialogHeader.displayName = "AlertDialogHeader";
137
+ var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { "data-slot": "dialog-footer", className: cn(className), ...props });
138
+ AlertDialogFooter.displayName = "AlertDialogFooter";
139
+ var AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
140
+ AlertDialogPrimitive.Title,
141
+ {
142
+ ref,
143
+ "data-slot": "dialog-title",
144
+ className: cn(className),
145
+ ...props
146
+ }
147
+ ));
148
+ AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
149
+ var AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
150
+ AlertDialogPrimitive.Description,
151
+ {
152
+ ref,
153
+ "data-slot": "dialog-description",
154
+ className: cn(className),
155
+ ...props
156
+ }
157
+ ));
158
+ AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
92
159
  var DialogAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, { ref, className: cn(buttonVariants(), className), ...props }));
93
160
  DialogAction.displayName = "DialogAction";
94
161
  var DialogCancel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
@@ -100,6 +167,8 @@ var DialogCancel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE
100
167
  }
101
168
  ));
102
169
  DialogCancel.displayName = "DialogCancel";
170
+ var AlertDialogAction = DialogAction;
171
+ var AlertDialogCancel = DialogCancel;
103
172
  function AlertDialog({
104
173
  open,
105
174
  onOpenChange,
@@ -198,4 +267,4 @@ var Dialog = Object.assign(DialogRoot, {
198
267
  Cancel: DialogCancel
199
268
  });
200
269
 
201
- export { AlertDialog, Dialog, DialogAction, DialogCancel, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogRoot, DialogTitle, DialogTrigger };
270
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Dialog, DialogAction, DialogCancel, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogRoot, DialogTitle, DialogTrigger };
@@ -1,6 +1,6 @@
1
- import { formatBytes } from './chunk-4R7QL3MW.js';
2
- import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from './chunk-5D42MFB4.js';
3
1
  import { Slider } from './chunk-CRERCLIZ.js';
2
+ import { formatBytes } from './chunk-4R7QL3MW.js';
3
+ import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from './chunk-FVPCVZL3.js';
4
4
  import { Button } from './chunk-M4PZNAMV.js';
5
5
  import { controlIconClass } from './chunk-IBK5D2Q6.js';
6
6
  import { useTranslation } from './chunk-RLGHEV4A.js';