@espressif/dashboard-ui-components 1.14.0 → 1.15.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 (79) hide show
  1. package/.claude/rules/dashboard-ui-consumption.md +34 -0
  2. package/.cursor/rules/dashboard-ui-consumption.mdc +1 -0
  3. package/CHANGELOG.md +88 -1
  4. package/README.md +18 -2
  5. package/dist/common/index.d.ts +3 -3
  6. package/dist/common/my-account-menu/my-account-menu.js +3 -3
  7. package/dist/components/async-multi-select/async-multi-select.js +4 -8
  8. package/dist/components/async-multi-select/index.d.ts +5 -1
  9. package/dist/components/avatar/avatar.js +1 -1
  10. package/dist/components/bottom-sheet/_hooks/use-sheet-drag.js +1 -1
  11. package/dist/components/breadcrumb/index.d.ts +4 -1
  12. package/dist/components/button/button.js +2 -2
  13. package/dist/components/button/flash-button.js +4 -4
  14. package/dist/components/cards/index.d.ts +1 -1
  15. package/dist/components/cards/section-card.js +2 -2
  16. package/dist/components/carousel/carousel.js +8 -4
  17. package/dist/components/carousel/index.d.ts +8 -0
  18. package/dist/components/combobox/index.d.ts +3 -1
  19. package/dist/components/coverflow/coverflow.js +3 -2
  20. package/dist/components/coverflow/index.d.ts +2 -0
  21. package/dist/components/data-table/data-table.js +8 -4
  22. package/dist/components/data-table/index.d.ts +5 -1
  23. package/dist/components/date-range-picker/date-range-picker.js +5 -5
  24. package/dist/components/date-range-picker/index.d.ts +9 -1
  25. package/dist/components/dialog/index.d.ts +3 -1
  26. package/dist/components/facet-filters/active-filters.js +2 -1
  27. package/dist/components/facet-filters/filter-group.js +2 -1
  28. package/dist/components/facet-filters/index.d.ts +4 -0
  29. package/dist/components/file-upload/file-upload.js +2 -2
  30. package/dist/components/file-upload/index.d.ts +2 -0
  31. package/dist/components/horizontal-stepper/horizontal-stepper.js +2 -2
  32. package/dist/components/index.d.ts +5 -5
  33. package/dist/components/key-value-manager/index.d.ts +8 -0
  34. package/dist/components/key-value-manager/key-value-manager-table.js +4 -4
  35. package/dist/components/key-value-manager/key-value-manager.js +5 -1
  36. package/dist/components/key-value-manager/key-value-manager.props.js +5 -1
  37. package/dist/components/list-details/index.d.ts +1 -1
  38. package/dist/components/nav-bar/index.d.ts +19 -2
  39. package/dist/components/nav-bar/nav-bar-mobile-menu.js +4 -3
  40. package/dist/components/nav-bar/nav-bar.js +10 -7
  41. package/dist/components/sheet/index.d.ts +3 -1
  42. package/dist/components/sidebar/index.d.ts +13 -6
  43. package/dist/components/sidebar/sidebar.js +4 -2
  44. package/dist/components/simple-paginated-list/index.d.ts +11 -2
  45. package/dist/components/simple-paginated-list/simple-paginated-list.js +3 -3
  46. package/dist/components/stat-card/index.d.ts +2 -0
  47. package/dist/components/stat-card/stat-card.js +2 -2
  48. package/dist/components/tag/index.d.ts +2 -0
  49. package/dist/components/tag/tag.js +2 -2
  50. package/dist/components/tag-input/index.d.ts +5 -0
  51. package/dist/components/tag-input/tag-input.js +5 -3
  52. package/dist/components/transfer-list/index.d.ts +22 -2
  53. package/dist/components/transfer-list/transfer-list.js +30 -8
  54. package/dist/components/user-type-badge/index.d.ts +2 -0
  55. package/dist/components/user-type-badge/user-type-badge.js +3 -2
  56. package/dist/core/animate-ui/components/radix/dialog.js +2 -2
  57. package/dist/core/animate-ui/components/radix/sheet.js +3 -3
  58. package/dist/core/animate-ui/components/radix/sidebar.js +4 -4
  59. package/dist/core/animate-ui/components/radix/toggle-group.js +4 -4
  60. package/dist/core/animate-ui/primitives/animate/tooltip.js +3 -0
  61. package/dist/core/breadcrumb.js +2 -2
  62. package/dist/core/button/craft-button.js +4 -4
  63. package/dist/core/combobox/combobox.js +2 -2
  64. package/dist/index.d.ts +7 -7
  65. package/dist/layouts/index.d.ts +81 -35
  66. package/dist/layouts/minimal-workspace-layout/minimal-workspace-layout.js +8 -2
  67. package/dist/layouts/shared/account-menu-props.js +3 -2
  68. package/dist/layouts/workspace-layout/account-menu/account-menu.js +19 -8
  69. package/dist/layouts/workspace-layout/breadcrumbs/workspace-breadcrumbs.js +14 -11
  70. package/dist/layouts/workspace-layout/header/header.js +3 -3
  71. package/dist/layouts/workspace-layout/workspace-layout.js +13 -5
  72. package/dist/{my-account-menu.props-C7DK71WC.d.ts → my-account-menu.props-V3kFdvCZ.d.ts} +2 -0
  73. package/dist/{section-card-DqQeQkzU.d.ts → section-card-Bs3sKQtv.d.ts} +6 -1
  74. package/dist/{types-CkXflqg7.d.ts → types-CoZOfz4S.d.ts} +12 -1
  75. package/dist/utils/color.js +10 -1
  76. package/dist/utils/index.d.ts +6 -1
  77. package/dist/utils/variant.js +38 -38
  78. package/package.json +4 -2
  79. package/src/styles/colors.css +23 -2
@@ -133,7 +133,7 @@ var deleteButtonVariantClasses = {
133
133
  gradient: "bg-error/10 text-error hover:bg-error/15 hover:text-error",
134
134
  solid: "bg-error/20 text-error-foreground hover:bg-error/30 hover:text-error-foreground"
135
135
  };
136
- var Tag$1 = React$1.forwardRef(({ name, value, nameTooltip, valueTooltip, showFullName = false, showFullValue = false, size = "default", color = "secondary", variant = "soft", rounded = false, onDelete, className, radius, ...rest }, ref) => {
136
+ var Tag$1 = React$1.forwardRef(({ name, value, nameTooltip, valueTooltip, showFullName = false, showFullValue = false, size = "default", color = "secondary", variant = "soft", rounded = false, onDelete, deleteLabel, className, radius, ...rest }, ref) => {
137
137
  const { partStyle } = useStyleAxes({ radius }, ["radius"]);
138
138
  const fullRound = rounded && radius === void 0;
139
139
  const nameTip = nameTooltip ?? name;
@@ -174,7 +174,7 @@ var Tag$1 = React$1.forwardRef(({ name, value, nameTooltip, valueTooltip, showFu
174
174
  }),
175
175
  onDelete ? /* @__PURE__ */ jsx("button", {
176
176
  type: "button",
177
- "aria-label": `Remove ${removeLabel}`,
177
+ "aria-label": deleteLabel ?? `Remove ${removeLabel}`,
178
178
  style: partStyle,
179
179
  className: cn(buttonVariants({
180
180
  variant: "ghost",
@@ -24,6 +24,11 @@ interface TagInputProps extends Omit<ComponentProps<"input">, "size" | "value" |
24
24
  allowDuplicates?: boolean;
25
25
  /** @default 10 */
26
26
  maxTagDisplayLength?: number;
27
+ /**
28
+ * Accessible name of a tag's remove button, given the tag's full text.
29
+ * Default `` tag => `Remove ${tag}` `` (a `name:value` tag reads `Remove name: value`).
30
+ */
31
+ removeTagLabel?: (tag: string) => string;
27
32
  /**
28
33
  * When true, each tag string is split on the first `:` into `Tag` `name` and `value`.
29
34
  * Use together with a validator that only allows `name:value` shaped tags.
@@ -28,7 +28,7 @@ function parseNameValueTag(tag) {
28
28
  value: tag.slice(i + 1)
29
29
  };
30
30
  }
31
- var TagInput = React$1.forwardRef(({ tags, onTagsChange, label, required, size, rounded, startHelperContent, endHelperContent, hintContent, error, errorContent, validatorRegex, onInvalidTag, allowDuplicates = false, maxTagDisplayLength = 10, nameValueTags = false, className, id, disabled, readOnly, placeholder, onKeyDown, onBlur, radius, border, ...restInputProps }, ref) => {
31
+ var TagInput = React$1.forwardRef(({ tags, onTagsChange, label, required, size, rounded, startHelperContent, endHelperContent, hintContent, error, errorContent, validatorRegex, onInvalidTag, allowDuplicates = false, maxTagDisplayLength = 10, removeTagLabel, nameValueTags = false, className, id, disabled, readOnly, placeholder, onKeyDown, onBlur, radius, border, ...restInputProps }, ref) => {
32
32
  const axes = useStyleAxes({
33
33
  radius,
34
34
  border
@@ -119,13 +119,15 @@ var TagInput = React$1.forwardRef(({ tags, onTagsChange, label, required, size,
119
119
  value: truncateDisplay(parsed.value, maxTagDisplayLength),
120
120
  valueTooltip: parsed.value,
121
121
  size: effectiveSize,
122
- onDelete: disabled || readOnly ? void 0 : () => removeAt(index)
122
+ onDelete: disabled || readOnly ? void 0 : () => removeAt(index),
123
+ deleteLabel: removeTagLabel?.(tag)
123
124
  }, `${tag}-${index}`);
124
125
  return /* @__PURE__ */ jsx(Tag, {
125
126
  value: truncateDisplay(tag, maxTagDisplayLength),
126
127
  valueTooltip: tag,
127
128
  size: effectiveSize,
128
- onDelete: disabled || readOnly ? void 0 : () => removeAt(index)
129
+ onDelete: disabled || readOnly ? void 0 : () => removeAt(index),
130
+ deleteLabel: removeTagLabel?.(tag)
129
131
  }, `${tag}-${index}`);
130
132
  }), /* @__PURE__ */ jsx("input", {
131
133
  ref,
@@ -6,6 +6,24 @@ interface TransferItem {
6
6
  label: string;
7
7
  disabled?: boolean;
8
8
  }
9
+ /**
10
+ * The transfer list's own words, for an app in another language. English by
11
+ * default. The functions receive the panel's title (`sourceTitle` / `targetTitle`).
12
+ */
13
+ interface TransferListLabels {
14
+ /** A panel's checkbox that selects every item. Default `` title => `Select all in ${title}` ``. */
15
+ selectAll?: (title: string) => string;
16
+ /** A panel's search button. Default `` title => `Search ${title}` ``. */
17
+ search?: (title: string) => string;
18
+ /** Placeholder of a panel's search box. Default `` title => `Search ${title.toLowerCase()}...` ``. */
19
+ searchPlaceholder?: (title: string) => string;
20
+ /** The button that closes a panel's search. Default "Cancel search". */
21
+ cancelSearch?: string;
22
+ /** The search box's clear button. Default "Clear search". */
23
+ clearSearch?: string;
24
+ /** The move buttons between the panels. Default `` title => `Move selected to ${title}` ``. */
25
+ moveTo?: (title: string) => string;
26
+ }
9
27
  interface TransferListProps<T> {
10
28
  sourceItems: T[];
11
29
  targetItems: T[];
@@ -29,8 +47,10 @@ interface TransferListProps<T> {
29
47
  isItemDisabled?: (item: T) => boolean;
30
48
  /** Defaults to "Transfer list" */
31
49
  ariaLabel?: string;
50
+ /** The list's other words (search, select all, move), for an app in another language. */
51
+ labels?: TransferListLabels;
32
52
  }
33
53
 
34
- declare function TransferList<T>({ sourceItems, targetItems, getItemId, getItemLabel, onChange, renderItem, searchable, disabled, sourceTitle, targetTitle, className, name, form, isItemDisabled, ariaLabel, maxHeight, }: TransferListProps<T>): React.JSX.Element;
54
+ declare function TransferList<T>({ sourceItems, targetItems, getItemId, getItemLabel, onChange, renderItem, searchable, disabled, sourceTitle, targetTitle, className, name, form, isItemDisabled, ariaLabel, maxHeight, labels: labelsProp, }: TransferListProps<T>): React.JSX.Element;
35
55
 
36
- export { type TransferItem, TransferList, type TransferListProps };
56
+ export { type TransferItem, TransferList, type TransferListLabels, type TransferListProps };
@@ -87,6 +87,24 @@ function filterItemsByQuery(items, query, getLabel) {
87
87
  if (q === "") return items;
88
88
  return items.filter((item) => getLabel(item).toLowerCase().includes(q));
89
89
  }
90
+ var DEFAULT_LABELS = {
91
+ selectAll: (title) => `Select all in ${title}`,
92
+ search: (title) => `Search ${title}`,
93
+ searchPlaceholder: (title) => `Search ${title.toLowerCase()}...`,
94
+ cancelSearch: "Cancel search",
95
+ clearSearch: "Clear search",
96
+ moveTo: (title) => `Move selected to ${title}`
97
+ };
98
+ function resolveLabels(labels) {
99
+ return {
100
+ selectAll: labels?.selectAll ?? DEFAULT_LABELS.selectAll,
101
+ search: labels?.search ?? DEFAULT_LABELS.search,
102
+ searchPlaceholder: labels?.searchPlaceholder ?? DEFAULT_LABELS.searchPlaceholder,
103
+ cancelSearch: labels?.cancelSearch ?? DEFAULT_LABELS.cancelSearch,
104
+ clearSearch: labels?.clearSearch ?? DEFAULT_LABELS.clearSearch,
105
+ moveTo: labels?.moveTo ?? DEFAULT_LABELS.moveTo
106
+ };
107
+ }
90
108
  function TransferListItems({ filteredItems, items, selectedIds, getItemId, getItemLabel, isItemDisabled, renderItem, disabled, rowVariants, onChecked }) {
91
109
  if (filteredItems.length === 0) return /* @__PURE__ */ jsx("p", {
92
110
  className: "px-1 py-2 type-body text-muted-foreground",
@@ -120,7 +138,7 @@ function TransferListItems({ filteredItems, items, selectedIds, getItemId, getIt
120
138
  })
121
139
  });
122
140
  }
123
- function TransferListPanel({ title, titleId, items, selectedIds, onSelectionChange, getItemId, getItemLabel, isItemDisabled, renderItem, searchable, disabled, side, maxHeight }) {
141
+ function TransferListPanel({ labels, title, titleId, items, selectedIds, onSelectionChange, getItemId, getItemLabel, isItemDisabled, renderItem, searchable, disabled, side, maxHeight }) {
124
142
  const [searchQuery, setSearchQuery] = useState("");
125
143
  const [isSearchOpen, setIsSearchOpen] = useState(false);
126
144
  const searchContainerRef = useRef(null);
@@ -187,7 +205,7 @@ function TransferListPanel({ title, titleId, items, selectedIds, onSelectionChan
187
205
  checked: selectAllChecked,
188
206
  disabled: disabled || selectableFilteredIds.length === 0,
189
207
  onCheckedChange: handleSelectAll,
190
- "aria-label": `Select all in ${title}`
208
+ "aria-label": labels.selectAll(title)
191
209
  }), /* @__PURE__ */ jsx("div", {
192
210
  className: "relative min-w-0 flex-1",
193
211
  children: /* @__PURE__ */ jsx(AnimatePresence, {
@@ -213,7 +231,8 @@ function TransferListPanel({ title, titleId, items, selectedIds, onSelectionChan
213
231
  children: /* @__PURE__ */ jsx(SearchBox, {
214
232
  size: "sm",
215
233
  className: "w-full",
216
- placeholder: `Search ${title.toLowerCase()}...`,
234
+ placeholder: labels.searchPlaceholder(title),
235
+ clearLabel: labels.clearSearch,
217
236
  onSearch: setSearchQuery,
218
237
  onClear: () => setSearchQuery(""),
219
238
  onValueChange: setSearchQuery
@@ -245,7 +264,7 @@ function TransferListPanel({ title, titleId, items, selectedIds, onSelectionChan
245
264
  size: "icon",
246
265
  color: "mist",
247
266
  disabled,
248
- "aria-label": `Search ${title}`,
267
+ "aria-label": labels.search(title),
249
268
  onClick: handleOpenSearch,
250
269
  children: /* @__PURE__ */ jsx(Search, { "aria-hidden": true })
251
270
  })
@@ -268,7 +287,7 @@ function TransferListPanel({ title, titleId, items, selectedIds, onSelectionChan
268
287
  variant: "ghost",
269
288
  size: "icon",
270
289
  color: "error",
271
- "aria-label": "Cancel search",
290
+ "aria-label": labels.cancelSearch,
272
291
  onClick: handleCloseSearch,
273
292
  children: /* @__PURE__ */ jsx(X, { "aria-hidden": true })
274
293
  })
@@ -288,7 +307,8 @@ function TransferListPanel({ title, titleId, items, selectedIds, onSelectionChan
288
307
  })
289
308
  });
290
309
  }
291
- function TransferList({ sourceItems, targetItems, getItemId, getItemLabel, onChange, renderItem, searchable = true, disabled = false, sourceTitle, targetTitle, className, name, form, isItemDisabled, ariaLabel = "Transfer list", maxHeight }) {
310
+ function TransferList({ sourceItems, targetItems, getItemId, getItemLabel, onChange, renderItem, searchable = true, disabled = false, sourceTitle, targetTitle, className, name, form, isItemDisabled, ariaLabel = "Transfer list", maxHeight, labels: labelsProp }) {
311
+ const labels = resolveLabels(labelsProp);
292
312
  const resolveId = getItemId ?? ((item) => item.id);
293
313
  const resolveLabel = getItemLabel ?? ((item) => item.label);
294
314
  const resolveDisabled = isItemDisabled ?? ((item) => Boolean(item.disabled));
@@ -344,6 +364,7 @@ function TransferList({ sourceItems, targetItems, getItemId, getItemLabel, onCha
344
364
  value: hiddenFieldValues
345
365
  }),
346
366
  /* @__PURE__ */ jsx(TransferListPanel, {
367
+ labels,
347
368
  title: sourceTitle,
348
369
  titleId: sourceTitleId,
349
370
  items: sourceItems,
@@ -365,7 +386,7 @@ function TransferList({ sourceItems, targetItems, getItemId, getItemLabel, onCha
365
386
  variant: "default",
366
387
  size: "icon",
367
388
  disabled: !canMoveToTarget,
368
- "aria-label": `Move selected to ${targetTitle}`,
389
+ "aria-label": labels.moveTo(targetTitle),
369
390
  onClick: handleMoveToTarget,
370
391
  children: /* @__PURE__ */ jsx(ChevronsRight, {
371
392
  className: "max-md:rotate-90",
@@ -377,7 +398,7 @@ function TransferList({ sourceItems, targetItems, getItemId, getItemLabel, onCha
377
398
  size: "icon",
378
399
  color: "error",
379
400
  disabled: !canMoveToSource,
380
- "aria-label": `Move selected to ${sourceTitle}`,
401
+ "aria-label": labels.moveTo(sourceTitle),
381
402
  onClick: handleMoveToSource,
382
403
  children: /* @__PURE__ */ jsx(ChevronsLeft, {
383
404
  className: "max-md:rotate-90",
@@ -386,6 +407,7 @@ function TransferList({ sourceItems, targetItems, getItemId, getItemLabel, onCha
386
407
  })]
387
408
  }),
388
409
  /* @__PURE__ */ jsx(TransferListPanel, {
410
+ labels,
389
411
  title: targetTitle,
390
412
  titleId: targetTitleId,
391
413
  items: targetItems,
@@ -29,6 +29,8 @@ declare const userTypeBadgeUserTypes: UserType[];
29
29
  interface UserTypeBadgeProps extends HTMLAttributes<HTMLDivElement>, Pick<StyleAxisProps, "radius"> {
30
30
  userType: UserType;
31
31
  size?: Size;
32
+ /** The badge's text, for an app in another language. Default "Admin" / "Super admin". */
33
+ label?: string;
32
34
  }
33
35
 
34
36
  declare const userTypeBadgeSizeVariants: (props?: ({
@@ -14,8 +14,9 @@ var userTypeBadgeSizeVariants = cva("inline-flex type-caption font-medium tracki
14
14
  defaultVariants: { size: "default" }
15
15
  });
16
16
  var userTypeBadgeMetallicClasses = cn("relative isolate overflow-hidden border border-white/20", "shadow-[inset_0_1px_0_rgba(255,255,255,0.30),inset_0_-1px_0_rgba(0,0,0,0.22)]", "before:pointer-events-none before:absolute before:inset-0 before:rounded-[inherit]", "before:bg-[linear-gradient(135deg,rgba(255,255,255,0.24)_0%,rgba(255,255,255,0.04)_36%,rgba(0,0,0,0.16)_72%,rgba(255,255,255,0.12)_100%)]", "after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:border after:border-white/15", "after:bg-[linear-gradient(315deg,rgba(255,255,255,0.24)_0%,rgba(255,255,255,0.04)_36%,rgba(0,0,0,0.16)_72%,rgba(255,255,255,0.12)_100%)]", "after:opacity-0 after:transition-opacity after:duration-[1800ms] after:ease-in-out hover:after:opacity-100");
17
- var UserTypeBadge = React$1.forwardRef(({ userType, size = "default", className, radius, ...props }, ref) => {
18
- const { color, icon: Icon, label } = userTypeBadgeRegistry[userType];
17
+ var UserTypeBadge = React$1.forwardRef(({ userType, size = "default", className, radius, label: labelProp, ...props }, ref) => {
18
+ const { color, icon: Icon, label: defaultLabel } = userTypeBadgeRegistry[userType];
19
+ const label = labelProp ?? defaultLabel;
19
20
  return /* @__PURE__ */ jsx("div", {
20
21
  ref,
21
22
  className: "inline-block",
@@ -20,7 +20,7 @@ function DialogOverlay({ className, ...props }) {
20
20
  ...props
21
21
  });
22
22
  }
23
- function DialogContent({ className, children, showCloseButton = true, closeButtonClassName, radius, elevation, density, style, ...props }) {
23
+ function DialogContent({ className, children, showCloseButton = true, closeButtonClassName, closeLabel = "Close", radius, elevation, density, style, ...props }) {
24
24
  const axes = useStyleAxes({
25
25
  radius,
26
26
  elevation
@@ -41,7 +41,7 @@ function DialogContent({ className, children, showCloseButton = true, closeButto
41
41
  className: cn("ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 z-50 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", closeButtonClassName),
42
42
  children: [/* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
43
43
  className: "sr-only",
44
- children: "Close"
44
+ children: closeLabel
45
45
  })]
46
46
  })]
47
47
  })] });
@@ -35,7 +35,7 @@ function SheetOverlay({ className, ...props }) {
35
35
  function SheetClose(props) {
36
36
  return /* @__PURE__ */ jsx(SheetClose$1, { ...props });
37
37
  }
38
- function SheetContent({ className, children, side = "right", showCloseButton = true, onEscapeKeyDown, onPointerDownOutside, radius, elevation, density, style, ...props }) {
38
+ function SheetContent({ className, children, side = "right", showCloseButton = true, closeLabel = "Close", onEscapeKeyDown, onPointerDownOutside, radius, elevation, density, style, ...props }) {
39
39
  const { partStyle } = useStyleAxes({
40
40
  radius,
41
41
  elevation
@@ -67,7 +67,7 @@ function SheetContent({ className, children, side = "right", showCloseButton = t
67
67
  className: closeClassName,
68
68
  children: [/* @__PURE__ */ jsx(XIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
69
69
  className: "sr-only",
70
- children: "Close"
70
+ children: closeLabel
71
71
  })]
72
72
  })]
73
73
  })
@@ -93,7 +93,7 @@ function SheetContent({ className, children, side = "right", showCloseButton = t
93
93
  className: closeClassName,
94
94
  children: [/* @__PURE__ */ jsx(XIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
95
95
  className: "sr-only",
96
- children: "Close"
96
+ children: closeLabel
97
97
  })]
98
98
  })]
99
99
  })] });
@@ -87,7 +87,7 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
87
87
  type: "spring",
88
88
  stiffness: 350,
89
89
  damping: 35
90
- }, ...props }) {
90
+ }, mobileTitle = "Sidebar", mobileDescription = "Displays the mobile sidebar.", ...props }) {
91
91
  const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
92
92
  if (collapsible === "none") return /* @__PURE__ */ jsx(Highlight, {
93
93
  enabled: animateOnHover,
@@ -116,7 +116,7 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
116
116
  side,
117
117
  children: [/* @__PURE__ */ jsxs(SheetHeader, {
118
118
  className: "sr-only",
119
- children: [/* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }), /* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })]
119
+ children: [/* @__PURE__ */ jsx(SheetTitle, { children: mobileTitle }), /* @__PURE__ */ jsx(SheetDescription, { children: mobileDescription })]
120
120
  }), /* @__PURE__ */ jsx(Highlight, {
121
121
  enabled: animateOnHover,
122
122
  hover: true,
@@ -163,7 +163,7 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
163
163
  })]
164
164
  });
165
165
  }
166
- function SidebarTrigger({ className, onClick, ...props }) {
166
+ function SidebarTrigger({ className, onClick, label = "Toggle Sidebar", ...props }) {
167
167
  const { toggleSidebar } = useSidebar();
168
168
  return /* @__PURE__ */ jsxs(Button, {
169
169
  "data-sidebar": "trigger",
@@ -178,7 +178,7 @@ function SidebarTrigger({ className, onClick, ...props }) {
178
178
  ...props,
179
179
  children: [/* @__PURE__ */ jsx(PanelLeftIcon, {}), /* @__PURE__ */ jsx("span", {
180
180
  className: "sr-only",
181
- children: "Toggle Sidebar"
181
+ children: label
182
182
  })]
183
183
  });
184
184
  }
@@ -76,8 +76,8 @@ var presetSolidFill = {
76
76
  error: "bg-error shadow-sm",
77
77
  info: "bg-info shadow-sm",
78
78
  success: "bg-success shadow-sm",
79
- warning: "bg-warning shadow-sm",
80
- disabled: "bg-disabled shadow-sm",
79
+ warning: "bg-warning-solid shadow-sm",
80
+ disabled: "bg-disabled-solid shadow-sm",
81
81
  gray: "bg-gray shadow-sm",
82
82
  mist: "bg-mist shadow-sm border border-mist-border"
83
83
  };
@@ -99,8 +99,8 @@ var presetMultipleSolidSurface = {
99
99
  error: "data-[state=on]:bg-error",
100
100
  info: "data-[state=on]:bg-info",
101
101
  success: "data-[state=on]:bg-success",
102
- warning: "data-[state=on]:bg-warning",
103
- disabled: "data-[state=on]:bg-disabled",
102
+ warning: "data-[state=on]:bg-warning-solid",
103
+ disabled: "data-[state=on]:bg-disabled-solid",
104
104
  gray: "data-[state=on]:bg-gray",
105
105
  mist: "data-[state=on]:bg-mist data-[state=on]:border-mist-border"
106
106
  };
@@ -73,6 +73,9 @@ function TooltipProvider({ children, id, openDelay = 700, closeDelay = 300, tran
73
73
  window.removeEventListener("resize", hideImmediate, true);
74
74
  };
75
75
  }, [hideImmediate]);
76
+ React$1.useEffect(() => () => {
77
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
78
+ }, []);
76
79
  return /* @__PURE__ */ jsx(GlobalTooltipProvider, {
77
80
  value: {
78
81
  showTooltip,
@@ -47,14 +47,14 @@ var BreadcrumbSeparator = ({ children, className, ...props }) => /* @__PURE__ */
47
47
  children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
48
48
  });
49
49
  BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
50
- var BreadcrumbEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs("span", {
50
+ var BreadcrumbEllipsis = ({ className, moreLabel = "More", ...props }) => /* @__PURE__ */ jsxs("span", {
51
51
  role: "presentation",
52
52
  "aria-hidden": "true",
53
53
  className: cn("flex h-9 w-9 items-center justify-center", className),
54
54
  ...props,
55
55
  children: [/* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
56
56
  className: "sr-only",
57
- children: "More"
57
+ children: moreLabel
58
58
  })]
59
59
  });
60
60
  BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
@@ -12,8 +12,8 @@ var craftButtonBgClasses = {
12
12
  error: "bg-error text-error-foreground",
13
13
  info: "bg-info text-info-foreground",
14
14
  success: "bg-success text-success-foreground",
15
- warning: "bg-warning text-warning-foreground",
16
- disabled: "bg-disabled text-disabled-foreground",
15
+ warning: "bg-warning-solid text-warning-foreground",
16
+ disabled: "bg-disabled-solid text-disabled-foreground",
17
17
  gray: "bg-gray text-gray-foreground",
18
18
  mist: "bg-mist text-mist-foreground"
19
19
  };
@@ -36,8 +36,8 @@ var craftIconColorClasses = {
36
36
  error: "text-error group-hover:bg-error group-hover:text-error-foreground",
37
37
  info: "text-info group-hover:bg-info group-hover:text-info-foreground",
38
38
  success: "text-success group-hover:bg-success group-hover:text-success-foreground",
39
- warning: "text-warning group-hover:bg-warning group-hover:text-warning-foreground",
40
- disabled: "text-disabled group-hover:bg-disabled group-hover:text-disabled-foreground",
39
+ warning: "text-warning group-hover:bg-warning-solid group-hover:text-warning-foreground",
40
+ disabled: "text-disabled group-hover:bg-disabled-solid group-hover:text-disabled-foreground",
41
41
  gray: "text-gray group-hover:bg-gray group-hover:text-gray-foreground",
42
42
  mist: "text-mist-foreground group-hover:bg-mist group-hover:text-mist-foreground"
43
43
  };
@@ -7,7 +7,7 @@ import * as React$1 from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  import { Check, ChevronsUpDown } from "lucide-react";
9
9
  //#region src/core/combobox/combobox.tsx
10
- function AsyncCombobox({ value, onValueChange, options, onSearchChange, isLoading = false, placeholder = "Select...", emptyText = "No results.", searchPlaceholder = "Search...", label, required, disabled, className, clearable = false, hasMore = false, onLoadMore, radius, border }) {
10
+ function AsyncCombobox({ value, onValueChange, options, onSearchChange, isLoading = false, placeholder = "Select...", emptyText = "No results.", searchPlaceholder = "Search...", label, required, disabled, className, clearable = false, hasMore = false, onLoadMore, loadMoreLabel = "Load more", radius, border }) {
11
11
  const axes = useStyleAxes({
12
12
  radius,
13
13
  border
@@ -78,7 +78,7 @@ function AsyncCombobox({ value, onValueChange, options, onSearchChange, isLoadin
78
78
  type: "button",
79
79
  className: "type-label text-primary hover:underline w-full text-center",
80
80
  onClick: () => onLoadMore(),
81
- children: "Load more"
81
+ children: loadMoreLabel
82
82
  })
83
83
  })
84
84
  ] })]
package/dist/index.d.ts CHANGED
@@ -11,11 +11,11 @@ export { List } from './components/list/index.js';
11
11
  export { L as LIST_CLASS_NAMES, a as ListGroup, b as ListItem, c as ListItemSize, d as ListItemVariant, e as ListLinkComponentProps, f as ListProps, g as ListRole } from './list.props-DP_xPTqU.js';
12
12
  export { ListDetails, ListDetailsItem, ListDetailsLabels, ListDetailsMobileNavigation, ListDetailsProps, ListDetailsTitleListPanelColumnWidth } from './components/list-details/index.js';
13
13
  export { Menu, MenuProps } from './components/menu/index.js';
14
- export { NavBar, NavBarMenuItem, NavBarPosition, NavBarProps } from './components/nav-bar/index.js';
14
+ export { NavBar, NavBarLabels, NavBarMenuItem, NavBarPosition, NavBarProps } from './components/nav-bar/index.js';
15
15
  export { Tooltip, TooltipProps } from './components/tooltip/index.js';
16
16
  export { T as TooltipContent, a as TooltipContentProps, b as TooltipProvider, c as TooltipProviderProps, d as TooltipRoot, e as TooltipTrigger, f as TooltipTriggerProps } from './tooltip-C0bYa8a3.js';
17
17
  export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarPrimitive, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar } from './components/sidebar/index.js';
18
- export { S as SidebarEndActionConfig, a as SidebarGroupConfig, b as SidebarItemConfig, c as SidebarLinkComponentProps, d as SidebarNavEntry, e as SidebarProps, f as SidebarTopLevelLinkConfig, i as isSidebarGroup } from './types-CkXflqg7.js';
18
+ export { S as SidebarEndActionConfig, a as SidebarGroupConfig, b as SidebarItemConfig, c as SidebarLabels, d as SidebarLinkComponentProps, e as SidebarNavEntry, f as SidebarProps, g as SidebarTopLevelLinkConfig, i as isSidebarGroup } from './types-CoZOfz4S.js';
19
19
  export { Sheet, SheetClose, SheetCloseProps, SheetContent, SheetContentProps, SheetDescription, SheetDescriptionProps, SheetFooter, SheetFooterProps, SheetHeader, SheetHeaderProps, SheetProps, SheetTitle, SheetTitleProps, SheetTrigger, SheetTriggerProps } from './components/sheet/index.js';
20
20
  export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuCheckboxItemProps, DropdownMenuContent, DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuGroupProps, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuLabelProps, DropdownMenuProps, DropdownMenuRadioGroup, DropdownMenuRadioGroupProps, DropdownMenuRadioItem, DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuSeparatorProps, DropdownMenuShortcut, DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubContentProps, DropdownMenuSubProps, DropdownMenuSubTrigger, DropdownMenuSubTriggerProps, DropdownMenuTrigger, DropdownMenuTriggerProps } from './components/dropdown-menu/index.js';
21
21
  export { ScrollArea, ScrollAreaOrientation, ScrollAreaProps, ScrollBar } from './components/scroll-area/index.js';
@@ -117,7 +117,7 @@ export { StatusBadge, statusBadgeSizeVariants } from './components/status-badge/
117
117
  export { S as StatusBadgeIcon, a as StatusBadgeProps } from './status-badge.props-BVe8CmQZ.js';
118
118
  export { Tag, TagProps } from './components/tag/index.js';
119
119
  export { TagInput, TagInputProps } from './components/tag-input/index.js';
120
- export { TransferItem, TransferList, TransferListProps } from './components/transfer-list/index.js';
120
+ export { TransferItem, TransferList, TransferListLabels, TransferListProps } from './components/transfer-list/index.js';
121
121
  export { Dialog, DialogClose, DialogCloseProps, DialogContent, DialogContentProps, DialogDescription, DialogDescriptionProps, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogProps, DialogTitle, DialogTitleProps, DialogTrigger, DialogTriggerProps } from './components/dialog/index.js';
122
122
  export { Popover, PopoverAnchor, PopoverContent, PopoverGroup, PopoverGroupProps, PopoverProps, PopoverTrigger } from './components/popover/index.js';
123
123
  export { ConfirmationDialog, ConfirmationDialogProps } from './components/confirmation-dialog/index.js';
@@ -132,7 +132,7 @@ export { DynamicList, DynamicListEntry, DynamicListMetaEntry, DynamicListMetaTyp
132
132
  export { KeyValueManager, KeyValueManagerFieldMeta, KeyValueManagerItem, KeyValueManagerLabels, KeyValueManagerProps } from './components/key-value-manager/index.js';
133
133
  export { RequirementList, RequirementListItem, RequirementListProps, RequirementListSize } from './components/requirement-list/index.js';
134
134
  export { SimpleList, SimpleListAvatarSize, SimpleListIconStyle, SimpleListItem, SimpleListItemDirection, SimpleListProps } from './components/simple-list/index.js';
135
- export { SimplePaginatedList, SimplePaginatedListItem, SimplePaginatedListProps, SimplePaginatedListSize } from './components/simple-paginated-list/index.js';
135
+ export { SimplePaginatedList, SimplePaginatedListItem, SimplePaginatedListLabels, SimplePaginatedListProps, SimplePaginatedListSize } from './components/simple-paginated-list/index.js';
136
136
  export { Alert } from './components/alert/index.js';
137
137
  export { A as AlertColor, a as AlertIconAvatarVariant, b as AlertProps, c as AlertSize, d as AlertType, e as AlertVariant } from './alert.props-BuLuWmXA.js';
138
138
  export { Toast, ToastColor, ToastId, ToastInput, ToastOptions, ToastProps, ToastToasterProps, ToastType, ToastVariant, Toaster, toast } from './components/toast/index.js';
@@ -147,7 +147,7 @@ export { CircularProgress, CircularProgressProps } from './components/circular-p
147
147
  export { ProgressBar, ProgressBarProps, ProgressBarSegment } from './components/progress-bar/index.js';
148
148
  export { FullSizeError, FullSizeErrorProps, InlineError, InlineErrorProps } from './components/error-display/index.js';
149
149
  export { AnimatedCard, AnimatedCardProps, AnimatedCardType, BasicDetailsCard, BasicDetailsCardProps, CollapsibleCard, CollapsibleCardProps, NoDataCard, NoDataCardProps, SimpleCard, SimpleCardProps, animatedCardAnimations, animatedCardTypeKeys } from './components/cards/index.js';
150
- export { S as SectionCard, a as SectionCardProps, b as SectionCardSize, c as SectionCardVariant } from './section-card-DqQeQkzU.js';
150
+ export { S as SectionCard, a as SectionCardProps, b as SectionCardSize, c as SectionCardVariant } from './section-card-Bs3sKQtv.js';
151
151
  export { IconTextActionCard } from './components/icon-text-action-card/index.js';
152
152
  export { I as IconTextActionCardActionsPlacement, a as IconTextActionCardProps, b as IconTextActionCardVariant } from './icon-text-action-card.props-BU7yFi2Q.js';
153
153
  export { SimpleClickableCard } from './components/simple-clickable-card/index.js';
@@ -161,8 +161,8 @@ export { ContentContainer, ContentContainerMaxWidth, ContentContainerProps } fro
161
161
  export { PageContainer, PageContainerSkeleton, PageContainerSkeletonProps } from './components/page-container/index.js';
162
162
  export { G as GoBackLinkData, P as PageContainerMaxWidth, a as PageContainerProps } from './page-container.props-JutTvKFq.js';
163
163
  export { AnimatedRainmakerLogo, AnimatedRainmakerLogoProps, AppLogo, CopyrightCard, CopyrightCardProps, FooterCard, MyAccountMenu, PageLoader, ProfileCard, ProfileCardProps } from './common/index.js';
164
- export { A as AppLogoProps, L as LogoAsset, a as LogoAssetConfig, b as LogoVariantSet, M as MyAccountMenuProps } from './my-account-menu.props-C7DK71WC.js';
165
- export { AccountMenu, AccountMenuProps, BreadcrumbItemConfig, EntryLayout, EntryLayoutProps, LanguageOption, MinimalWorkspaceLayout, MinimalWorkspaceLayoutLabels, MinimalWorkspaceLayoutProps, MinimalWorkspaceSidebarConfig, MinimalWorkspaceSidebarState, MinimalWorkspaceSidebarTrigger, MinimalWorkspaceSidebarTriggerProps, WorkspaceFooter, WorkspaceFooterConfig, WorkspaceFooterProps, WorkspaceHeader, WorkspaceHeaderConfig, WorkspaceHeaderProps, WorkspaceLayout, WorkspaceLayoutProps, WorkspaceSidebarConfig } from './layouts/index.js';
164
+ export { A as AppLogoProps, L as LogoAsset, a as LogoAssetConfig, b as LogoVariantSet, M as MyAccountMenuProps } from './my-account-menu.props-V3kFdvCZ.js';
165
+ export { AccountMenu, AccountMenuLabels, AccountMenuProps, BreadcrumbItemConfig, EntryLayout, EntryLayoutProps, LanguageOption, MinimalWorkspaceLayout, MinimalWorkspaceLayoutLabels, MinimalWorkspaceLayoutProps, MinimalWorkspaceSidebarConfig, MinimalWorkspaceSidebarState, MinimalWorkspaceSidebarTrigger, MinimalWorkspaceSidebarTriggerProps, WorkspaceFooter, WorkspaceFooterConfig, WorkspaceFooterProps, WorkspaceHeader, WorkspaceHeaderConfig, WorkspaceHeaderProps, WorkspaceLayout, WorkspaceLayoutLabels, WorkspaceLayoutProps, WorkspaceSidebarConfig } from './layouts/index.js';
166
166
  export { c as cn } from './cn-Cbsgs0XP.js';
167
167
  export { u as useControlledState } from './use-controlled-state-BL9NoHu8.js';
168
168
  export { b as buttonVariants } from './button-BK-DIR_L.js';