@pixpilot/shadcn-ui 1.23.0 → 1.24.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 (133) hide show
  1. package/dist/AbsoluteFill.d.cts +2 -2
  2. package/dist/Button.d.cts +2 -2
  3. package/dist/ButtonExtended.d.cts +2 -2
  4. package/dist/ColorPicker/ColorPicker.cjs +4 -1
  5. package/dist/ColorPicker/ColorPicker.js +4 -1
  6. package/dist/ColorPickerBase/ColorPickerBase.cjs +5 -2
  7. package/dist/ColorPickerBase/ColorPickerBase.js +5 -2
  8. package/dist/ColorPickerBase/ColorPickerButton.cjs +6 -2
  9. package/dist/ColorPickerBase/ColorPickerButton.js +6 -2
  10. package/dist/ColorPickerBase/ColorPickerCompactControls.cjs +5 -3
  11. package/dist/ColorPickerBase/ColorPickerCompactControls.js +5 -3
  12. package/dist/ColorPickerBase/ColorPickerControls.cjs +14 -3
  13. package/dist/ColorPickerBase/ColorPickerControls.js +14 -3
  14. package/dist/ColorPickerBase/ColorPickerFormatControls.cjs +3 -2
  15. package/dist/ColorPickerBase/ColorPickerFormatControls.js +3 -2
  16. package/dist/ColorPickerBase/ColorPickerFullControls.cjs +8 -4
  17. package/dist/ColorPickerBase/ColorPickerFullControls.js +8 -4
  18. package/dist/ColorPickerBase/ColorPickerInput.cjs +6 -2
  19. package/dist/ColorPickerBase/ColorPickerInput.js +6 -2
  20. package/dist/ColorPickerBase/ColorPickerRoot.cjs +2 -1
  21. package/dist/ColorPickerBase/ColorPickerRoot.js +2 -1
  22. package/dist/ColorPickerBase/color-palette/ColorPalette.cjs +8 -2
  23. package/dist/ColorPickerBase/color-palette/ColorPalette.js +8 -2
  24. package/dist/ColorPickerBase/color-palette/PaletteSwatch.cjs +2 -1
  25. package/dist/ColorPickerBase/color-palette/PaletteSwatch.d.cts +1 -0
  26. package/dist/ColorPickerBase/color-palette/PaletteSwatch.d.ts +1 -0
  27. package/dist/ColorPickerBase/color-palette/PaletteSwatch.js +2 -1
  28. package/dist/ColorPickerBase/color-picker-context.d.cts +1 -0
  29. package/dist/ColorPickerBase/color-picker-context.d.ts +1 -0
  30. package/dist/ColorPickerBase/types.d.cts +2 -0
  31. package/dist/ColorPickerBase/types.d.ts +2 -0
  32. package/dist/ColorSelect.cjs +4 -1
  33. package/dist/ColorSelect.d.cts +3 -2
  34. package/dist/ColorSelect.d.ts +1 -0
  35. package/dist/ColorSelect.js +4 -1
  36. package/dist/Combobox.cjs +8 -2
  37. package/dist/Combobox.d.cts +1 -0
  38. package/dist/Combobox.d.ts +1 -0
  39. package/dist/Combobox.js +8 -2
  40. package/dist/CommandOptionList.cjs +3 -1
  41. package/dist/CommandOptionList.js +3 -1
  42. package/dist/ContentCard.d.cts +2 -2
  43. package/dist/ContentCard.d.ts +2 -2
  44. package/dist/DatePicker.cjs +2 -1
  45. package/dist/DatePicker.d.cts +3 -2
  46. package/dist/DatePicker.d.ts +3 -2
  47. package/dist/DatePicker.js +2 -1
  48. package/dist/IconToggle.cjs +1 -1
  49. package/dist/IconToggle.js +1 -1
  50. package/dist/Rating.cjs +7 -2
  51. package/dist/Rating.d.cts +5 -4
  52. package/dist/Rating.d.ts +5 -4
  53. package/dist/Rating.js +7 -2
  54. package/dist/Select.cjs +1 -1
  55. package/dist/Select.d.cts +2 -2
  56. package/dist/Select.js +1 -1
  57. package/dist/avatar-upload/AvatarUpload.cjs +5 -2
  58. package/dist/avatar-upload/AvatarUpload.js +5 -2
  59. package/dist/avatar-upload/AvatarUploadComponents.cjs +3 -1
  60. package/dist/avatar-upload/AvatarUploadComponents.js +3 -1
  61. package/dist/avatar-upload/AvatarUploadItem.cjs +4 -1
  62. package/dist/avatar-upload/AvatarUploadItem.js +4 -1
  63. package/dist/confirmation-dialog/ConfirmationDialog.cjs +4 -1
  64. package/dist/confirmation-dialog/ConfirmationDialog.d.cts +1 -0
  65. package/dist/confirmation-dialog/ConfirmationDialog.d.ts +1 -0
  66. package/dist/confirmation-dialog/ConfirmationDialog.js +4 -1
  67. package/dist/dialog/Dialog.d.cts +4 -4
  68. package/dist/dialog/Dialog.d.ts +4 -4
  69. package/dist/file-upload/FileUpload.cjs +3 -1
  70. package/dist/file-upload/FileUpload.d.cts +2 -2
  71. package/dist/file-upload/FileUpload.js +3 -1
  72. package/dist/file-upload/FileUploadItems.cjs +2 -1
  73. package/dist/file-upload/FileUploadItems.js +2 -1
  74. package/dist/file-upload/FileUploadListItem.cjs +3 -1
  75. package/dist/file-upload/FileUploadListItem.js +3 -1
  76. package/dist/file-upload-inline/FileUploadInline.d.cts +2 -2
  77. package/dist/file-upload-inline/FileUploadInline.d.ts +2 -2
  78. package/dist/file-upload-root/FileUploadRoot.cjs +3 -1
  79. package/dist/file-upload-root/FileUploadRoot.d.cts +2 -2
  80. package/dist/file-upload-root/FileUploadRoot.js +3 -1
  81. package/dist/file-upload-root/FileUploadRootItem.cjs +18 -13
  82. package/dist/file-upload-root/FileUploadRootItem.d.cts +1 -0
  83. package/dist/file-upload-root/FileUploadRootItem.d.ts +1 -0
  84. package/dist/file-upload-root/FileUploadRootItem.js +18 -13
  85. package/dist/icon-selector/IconPicker.cjs +7 -1
  86. package/dist/icon-selector/IconPicker.d.cts +1 -0
  87. package/dist/icon-selector/IconPicker.d.ts +1 -0
  88. package/dist/icon-selector/IconPicker.js +7 -1
  89. package/dist/icon-selector/icon-picker-content.cjs +8 -1
  90. package/dist/icon-selector/icon-picker-content.js +8 -1
  91. package/dist/icon-selector/virtualized-icon-grid.cjs +5 -2
  92. package/dist/icon-selector/virtualized-icon-grid.js +5 -2
  93. package/dist/index.cjs +2 -2
  94. package/dist/index.js +2 -2
  95. package/dist/input/Input.d.cts +2 -2
  96. package/dist/input/Input.d.ts +2 -2
  97. package/dist/pagination/Pagination.cjs +28 -6
  98. package/dist/pagination/Pagination.d.cts +1 -0
  99. package/dist/pagination/Pagination.d.ts +1 -0
  100. package/dist/pagination/Pagination.js +28 -6
  101. package/dist/rich-text-editor/ToolbarButton.cjs +1 -1
  102. package/dist/rich-text-editor/ToolbarButton.js +1 -1
  103. package/dist/slider/SliderInput.cjs +1 -1
  104. package/dist/slider/SliderInput.js +1 -1
  105. package/dist/slider/SliderSelect.cjs +1 -1
  106. package/dist/slider/SliderSelect.js +1 -1
  107. package/dist/tags-input/TagsInput.cjs +4 -1
  108. package/dist/tags-input/TagsInput.d.cts +4 -2
  109. package/dist/tags-input/TagsInput.d.ts +4 -2
  110. package/dist/tags-input/TagsInput.js +4 -1
  111. package/dist/tags-input/TagsInputInline.cjs +9 -2
  112. package/dist/tags-input/TagsInputInline.d.cts +4 -2
  113. package/dist/tags-input/TagsInputInline.d.ts +4 -2
  114. package/dist/tags-input/TagsInputInline.js +9 -2
  115. package/dist/theme-toggle/ThemeModeDropdown.cjs +6 -1
  116. package/dist/theme-toggle/ThemeModeDropdown.d.cts +3 -2
  117. package/dist/theme-toggle/ThemeModeDropdown.d.ts +1 -0
  118. package/dist/theme-toggle/ThemeModeDropdown.js +6 -1
  119. package/dist/theme-toggle/ThemeModeSwitchInside.cjs +3 -1
  120. package/dist/theme-toggle/ThemeModeSwitchInside.d.cts +3 -2
  121. package/dist/theme-toggle/ThemeModeSwitchInside.d.ts +1 -0
  122. package/dist/theme-toggle/ThemeModeSwitchInside.js +3 -1
  123. package/dist/theme-toggle/ThemeModeSwitchOutside.cjs +3 -1
  124. package/dist/theme-toggle/ThemeModeSwitchOutside.d.cts +3 -2
  125. package/dist/theme-toggle/ThemeModeSwitchOutside.d.ts +1 -0
  126. package/dist/theme-toggle/ThemeModeSwitchOutside.js +3 -1
  127. package/dist/theme-toggle/ThemeModeToggleButton.cjs +2 -1
  128. package/dist/theme-toggle/ThemeModeToggleButton.d.cts +3 -2
  129. package/dist/theme-toggle/ThemeModeToggleButton.d.ts +1 -0
  130. package/dist/theme-toggle/ThemeModeToggleButton.js +2 -1
  131. package/dist/toast/AlertToast.cjs +2 -1
  132. package/dist/toast/AlertToast.js +2 -1
  133. package/package.json +5 -5
@@ -1,8 +1,8 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ const require_get_id = require('../utils/get-id.cjs');
2
3
  const require_use_controlled = require('../hooks/src/use-controlled.cjs');
3
4
  require('../hooks/src/index.cjs');
4
5
  const require_Input = require('../input/Input.cjs');
5
- const require_get_id = require('../utils/get-id.cjs');
6
6
  const require_Slider = require('./Slider.cjs');
7
7
  require('../index.cjs');
8
8
  let react = require("react");
@@ -1,7 +1,7 @@
1
+ import { getId } from "../utils/get-id.js";
1
2
  import useControlled from "../hooks/src/use-controlled.js";
2
3
  import "../hooks/src/index.js";
3
4
  import { Input } from "../input/Input.js";
4
- import { getId } from "../utils/get-id.js";
5
5
  import { Slider } from "./Slider.js";
6
6
  import { cn } from "../index.js";
7
7
  import React, { createElement } from "react";
@@ -1,7 +1,7 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ const require_get_id = require('../utils/get-id.cjs');
2
3
  const require_use_controlled = require('../hooks/src/use-controlled.cjs');
3
4
  require('../hooks/src/index.cjs');
4
- const require_get_id = require('../utils/get-id.cjs');
5
5
  const require_Select = require('../Select.cjs');
6
6
  const require_Slider = require('./Slider.cjs');
7
7
  let __pixpilot_shadcn = require("@pixpilot/shadcn");
@@ -1,6 +1,6 @@
1
+ import { getId } from "../utils/get-id.js";
1
2
  import useControlled from "../hooks/src/use-controlled.js";
2
3
  import "../hooks/src/index.js";
3
- import { getId } from "../utils/get-id.js";
4
4
  import { Select as Select$1 } from "../Select.js";
5
5
  import { Slider as Slider$1 } from "./Slider.js";
6
6
  import { cn } from "@pixpilot/shadcn";
@@ -30,7 +30,7 @@ const EMPTY_OPTIONS = [];
30
30
  * - Options support with dropdown (like Select)
31
31
  * - freeSolo mode for custom tags (like MUI Autocomplete)
32
32
  */
33
- function TagsInput({ value = EMPTY_ARRAY, onChange, options = EMPTY_OPTIONS, freeSolo = true, placeholder = "Add tags...", emptyText = "No options found.", className, disabled = false, readOnly = false, maxTags, allowDuplicates = false, editable = false, label, delimiter = ",", addOnPaste = true, addOnTab = true, onValidate, addButtonVisibility = "touch" }) {
33
+ function TagsInput({ id, value = EMPTY_ARRAY, onChange, options = EMPTY_OPTIONS, freeSolo = true, placeholder = "Add tags...", emptyText = "No options found.", className, disabled = false, readOnly = false, maxTags, allowDuplicates = false, editable = false, label, delimiter = ",", addOnPaste = true, addOnTab = true, onValidate, addButtonVisibility = "touch" }) {
34
34
  const [open, setOpen] = (0, react.useState)(false);
35
35
  const [searchValue, setSearchValue] = (0, react.useState)("");
36
36
  const [freeInputValue, setFreeInputValue] = (0, react.useState)("");
@@ -134,6 +134,7 @@ function TagsInput({ value = EMPTY_ARRAY, onChange, options = EMPTY_OPTIONS, fre
134
134
  value
135
135
  ]);
136
136
  if (!hasOptions) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_TagsInputInline.TagsInputInline, {
137
+ id,
137
138
  label,
138
139
  className,
139
140
  disabled,
@@ -168,6 +169,7 @@ function TagsInput({ value = EMPTY_ARRAY, onChange, options = EMPTY_OPTIONS, fre
168
169
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
169
170
  className: "w-full",
170
171
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_TagsInputInline.TagsInputInline, {
172
+ id,
171
173
  label,
172
174
  showLabel: false,
173
175
  disabled,
@@ -245,6 +247,7 @@ function TagsInput({ value = EMPTY_ARRAY, onChange, options = EMPTY_OPTIONS, fre
245
247
  value: searchValue,
246
248
  loop: true,
247
249
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_CommandOptionList.CommandOptionList, {
250
+ id,
248
251
  options: filteredOptions,
249
252
  value,
250
253
  onChange: handleSelectOption,
@@ -1,8 +1,9 @@
1
1
  import { CommandOptionListItem } from "../CommandOptionList.cjs";
2
- import * as react_jsx_runtime18 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime15 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/tags-input/TagsInput.d.ts
5
5
  interface TagsInputProps {
6
+ id?: string;
6
7
  value?: Array<string | number>;
7
8
  onChange?: (value: Array<string | number>) => void;
8
9
  options?: CommandOptionListItem[];
@@ -39,6 +40,7 @@ interface TagsInputProps {
39
40
  * - freeSolo mode for custom tags (like MUI Autocomplete)
40
41
  */
41
42
  declare function TagsInput({
43
+ id,
42
44
  value,
43
45
  onChange,
44
46
  options,
@@ -57,6 +59,6 @@ declare function TagsInput({
57
59
  addOnTab,
58
60
  onValidate,
59
61
  addButtonVisibility
60
- }: TagsInputProps): react_jsx_runtime18.JSX.Element;
62
+ }: TagsInputProps): react_jsx_runtime15.JSX.Element;
61
63
  //#endregion
62
64
  export { TagsInput, TagsInputProps };
@@ -1,8 +1,9 @@
1
1
  import { CommandOptionListItem } from "../CommandOptionList.js";
2
- import * as react_jsx_runtime15 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime16 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/tags-input/TagsInput.d.ts
5
5
  interface TagsInputProps {
6
+ id?: string;
6
7
  value?: Array<string | number>;
7
8
  onChange?: (value: Array<string | number>) => void;
8
9
  options?: CommandOptionListItem[];
@@ -39,6 +40,7 @@ interface TagsInputProps {
39
40
  * - freeSolo mode for custom tags (like MUI Autocomplete)
40
41
  */
41
42
  declare function TagsInput({
43
+ id,
42
44
  value,
43
45
  onChange,
44
46
  options,
@@ -57,6 +59,6 @@ declare function TagsInput({
57
59
  addOnTab,
58
60
  onValidate,
59
61
  addButtonVisibility
60
- }: TagsInputProps): react_jsx_runtime15.JSX.Element;
62
+ }: TagsInputProps): react_jsx_runtime16.JSX.Element;
61
63
  //#endregion
62
64
  export { TagsInput, TagsInputProps };
@@ -26,7 +26,7 @@ const EMPTY_OPTIONS = [];
26
26
  * - Options support with dropdown (like Select)
27
27
  * - freeSolo mode for custom tags (like MUI Autocomplete)
28
28
  */
29
- function TagsInput({ value = EMPTY_ARRAY, onChange, options = EMPTY_OPTIONS, freeSolo = true, placeholder = "Add tags...", emptyText = "No options found.", className, disabled = false, readOnly = false, maxTags, allowDuplicates = false, editable = false, label, delimiter = ",", addOnPaste = true, addOnTab = true, onValidate, addButtonVisibility = "touch" }) {
29
+ function TagsInput({ id, value = EMPTY_ARRAY, onChange, options = EMPTY_OPTIONS, freeSolo = true, placeholder = "Add tags...", emptyText = "No options found.", className, disabled = false, readOnly = false, maxTags, allowDuplicates = false, editable = false, label, delimiter = ",", addOnPaste = true, addOnTab = true, onValidate, addButtonVisibility = "touch" }) {
30
30
  const [open, setOpen] = useState(false);
31
31
  const [searchValue, setSearchValue] = useState("");
32
32
  const [freeInputValue, setFreeInputValue] = useState("");
@@ -130,6 +130,7 @@ function TagsInput({ value = EMPTY_ARRAY, onChange, options = EMPTY_OPTIONS, fre
130
130
  value
131
131
  ]);
132
132
  if (!hasOptions) return /* @__PURE__ */ jsx(TagsInputInline, {
133
+ id,
133
134
  label,
134
135
  className,
135
136
  disabled,
@@ -164,6 +165,7 @@ function TagsInput({ value = EMPTY_ARRAY, onChange, options = EMPTY_OPTIONS, fre
164
165
  children: /* @__PURE__ */ jsx("div", {
165
166
  className: "w-full",
166
167
  children: /* @__PURE__ */ jsx(TagsInputInline, {
168
+ id,
167
169
  label,
168
170
  showLabel: false,
169
171
  disabled,
@@ -241,6 +243,7 @@ function TagsInput({ value = EMPTY_ARRAY, onChange, options = EMPTY_OPTIONS, fre
241
243
  value: searchValue,
242
244
  loop: true,
243
245
  children: /* @__PURE__ */ jsx(CommandOptionList, {
246
+ id,
244
247
  options: filteredOptions,
245
248
  value,
246
249
  onChange: handleSelectOption,
@@ -2,6 +2,7 @@
2
2
 
3
3
 
4
4
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
5
+ const require_get_id = require('../utils/get-id.cjs');
5
6
  let __pixpilot_shadcn = require("@pixpilot/shadcn");
6
7
  __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
7
8
  let lucide_react = require("lucide-react");
@@ -12,7 +13,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
12
13
  react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
13
14
 
14
15
  //#region src/tags-input/TagsInputInline.tsx
15
- function TagsInputInline({ label, showLabel = true, className, disabled = false, editable, max, onValueChange, onValidate, readOnly = false, value, delimiter, addOnPaste, addOnTab, items, onListClick, inputRef, inputPlaceholder, inputValue, onInputFocus, onInputChange, onInputKeyDown, onInputMouseDown, addButtonVisibility = "touch", slots, canAddCurrentValue = false, onAddCurrentInput, showClear = false }) {
16
+ function TagsInputInline({ id, label, showLabel = true, className, disabled = false, editable, max, onValueChange, onValidate, readOnly = false, value, delimiter, addOnPaste, addOnTab, items, onListClick, inputRef, inputPlaceholder, inputValue, onInputFocus, onInputChange, onInputKeyDown, onInputMouseDown, addButtonVisibility = "touch", slots, canAddCurrentValue = false, onAddCurrentInput, showClear = false }) {
16
17
  const addButtonVisibilityClassName = (0, react.useMemo)(() => {
17
18
  if (addButtonVisibility === "always") return "inline-flex";
18
19
  if (addButtonVisibility === "touch") return "hidden pointer-coarse:inline-flex";
@@ -45,10 +46,12 @@ function TagsInputInline({ label, showLabel = true, className, disabled = false,
45
46
  items.map((item) => /* @__PURE__ */ (0, react.createElement)(__pixpilot_shadcn.TagsInputInLineItem, {
46
47
  ...slots?.item || {},
47
48
  key: item.key,
49
+ id: require_get_id.getId(id, `item-${item.value}`),
48
50
  value: item.value
49
51
  }, item.label)),
50
52
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TagsInputInLineInput, {
51
53
  ...slots?.input || {},
54
+ id,
52
55
  ref: inputRef,
53
56
  placeholder: inputPlaceholder,
54
57
  value: inputValue,
@@ -59,6 +62,7 @@ function TagsInputInline({ label, showLabel = true, className, disabled = false,
59
62
  }),
60
63
  addButtonVisibility !== "never" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Button, {
61
64
  ...slots?.addButton,
65
+ id: require_get_id.getId(id, "add-button"),
62
66
  type: "button",
63
67
  size: "icon",
64
68
  variant: "ghost",
@@ -72,7 +76,10 @@ function TagsInputInline({ label, showLabel = true, className, disabled = false,
72
76
  }) : null
73
77
  ]
74
78
  }),
75
- showClear ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TagsInputInLineClear, { ...slots?.clear || {} }) : null
79
+ showClear ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TagsInputInLineClear, {
80
+ id: require_get_id.getId(id, "clear-button"),
81
+ ...slots?.clear || {}
82
+ }) : null
76
83
  ]
77
84
  });
78
85
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime19 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime16 from "react/jsx-runtime";
2
2
  import { ChangeEventHandler, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, Ref } from "react";
3
3
 
4
4
  //#region src/tags-input/TagsInputInline.d.ts
@@ -8,6 +8,7 @@ interface TagsInputInlineItem {
8
8
  label: string;
9
9
  }
10
10
  interface TagsInputInlineProps {
11
+ id?: string;
11
12
  label?: string;
12
13
  showLabel?: boolean;
13
14
  className?: string;
@@ -48,6 +49,7 @@ interface TagsInputInlineProps {
48
49
  showClear?: boolean;
49
50
  }
50
51
  declare function TagsInputInline({
52
+ id,
51
53
  label,
52
54
  showLabel,
53
55
  className,
@@ -75,6 +77,6 @@ declare function TagsInputInline({
75
77
  canAddCurrentValue,
76
78
  onAddCurrentInput,
77
79
  showClear
78
- }: TagsInputInlineProps): react_jsx_runtime19.JSX.Element;
80
+ }: TagsInputInlineProps): react_jsx_runtime16.JSX.Element;
79
81
  //#endregion
80
82
  export { TagsInputInline, TagsInputInlineItem, TagsInputInlineProps };
@@ -1,5 +1,5 @@
1
1
  import { ChangeEventHandler, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, Ref } from "react";
2
- import * as react_jsx_runtime14 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime15 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/tags-input/TagsInputInline.d.ts
5
5
  interface TagsInputInlineItem {
@@ -8,6 +8,7 @@ interface TagsInputInlineItem {
8
8
  label: string;
9
9
  }
10
10
  interface TagsInputInlineProps {
11
+ id?: string;
11
12
  label?: string;
12
13
  showLabel?: boolean;
13
14
  className?: string;
@@ -48,6 +49,7 @@ interface TagsInputInlineProps {
48
49
  showClear?: boolean;
49
50
  }
50
51
  declare function TagsInputInline({
52
+ id,
51
53
  label,
52
54
  showLabel,
53
55
  className,
@@ -75,6 +77,6 @@ declare function TagsInputInline({
75
77
  canAddCurrentValue,
76
78
  onAddCurrentInput,
77
79
  showClear
78
- }: TagsInputInlineProps): react_jsx_runtime14.JSX.Element;
80
+ }: TagsInputInlineProps): react_jsx_runtime15.JSX.Element;
79
81
  //#endregion
80
82
  export { TagsInputInline, TagsInputInlineItem, TagsInputInlineProps };
@@ -1,13 +1,14 @@
1
1
  'use client';
2
2
 
3
3
 
4
+ import { getId } from "../utils/get-id.js";
4
5
  import { Button, TagsInputInLineClear, TagsInputInLineInput, TagsInputInLineItem, TagsInputInLineLabel, TagsInputInLineList, TagsInputInLineRoot, cn } from "@pixpilot/shadcn";
5
6
  import { Plus } from "lucide-react";
6
7
  import { createElement, useMemo } from "react";
7
8
  import { jsx, jsxs } from "react/jsx-runtime";
8
9
 
9
10
  //#region src/tags-input/TagsInputInline.tsx
10
- function TagsInputInline({ label, showLabel = true, className, disabled = false, editable, max, onValueChange, onValidate, readOnly = false, value, delimiter, addOnPaste, addOnTab, items, onListClick, inputRef, inputPlaceholder, inputValue, onInputFocus, onInputChange, onInputKeyDown, onInputMouseDown, addButtonVisibility = "touch", slots, canAddCurrentValue = false, onAddCurrentInput, showClear = false }) {
11
+ function TagsInputInline({ id, label, showLabel = true, className, disabled = false, editable, max, onValueChange, onValidate, readOnly = false, value, delimiter, addOnPaste, addOnTab, items, onListClick, inputRef, inputPlaceholder, inputValue, onInputFocus, onInputChange, onInputKeyDown, onInputMouseDown, addButtonVisibility = "touch", slots, canAddCurrentValue = false, onAddCurrentInput, showClear = false }) {
11
12
  const addButtonVisibilityClassName = useMemo(() => {
12
13
  if (addButtonVisibility === "always") return "inline-flex";
13
14
  if (addButtonVisibility === "touch") return "hidden pointer-coarse:inline-flex";
@@ -40,10 +41,12 @@ function TagsInputInline({ label, showLabel = true, className, disabled = false,
40
41
  items.map((item) => /* @__PURE__ */ createElement(TagsInputInLineItem, {
41
42
  ...slots?.item || {},
42
43
  key: item.key,
44
+ id: getId(id, `item-${item.value}`),
43
45
  value: item.value
44
46
  }, item.label)),
45
47
  /* @__PURE__ */ jsx(TagsInputInLineInput, {
46
48
  ...slots?.input || {},
49
+ id,
47
50
  ref: inputRef,
48
51
  placeholder: inputPlaceholder,
49
52
  value: inputValue,
@@ -54,6 +57,7 @@ function TagsInputInline({ label, showLabel = true, className, disabled = false,
54
57
  }),
55
58
  addButtonVisibility !== "never" ? /* @__PURE__ */ jsxs(Button, {
56
59
  ...slots?.addButton,
60
+ id: getId(id, "add-button"),
57
61
  type: "button",
58
62
  size: "icon",
59
63
  variant: "ghost",
@@ -67,7 +71,10 @@ function TagsInputInline({ label, showLabel = true, className, disabled = false,
67
71
  }) : null
68
72
  ]
69
73
  }),
70
- showClear ? /* @__PURE__ */ jsx(TagsInputInLineClear, { ...slots?.clear || {} }) : null
74
+ showClear ? /* @__PURE__ */ jsx(TagsInputInLineClear, {
75
+ id: getId(id, "clear-button"),
76
+ ...slots?.clear || {}
77
+ }) : null
71
78
  ]
72
79
  });
73
80
  }
@@ -2,6 +2,7 @@
2
2
 
3
3
 
4
4
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
5
+ const require_get_id = require('../utils/get-id.cjs');
5
6
  let __pixpilot_shadcn = require("@pixpilot/shadcn");
6
7
  __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
7
8
  let lucide_react = require("lucide-react");
@@ -18,11 +19,12 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
18
19
  * Pure component - requires themeValue and onChange props.
19
20
  */
20
21
  function ThemeModeDropdown(props) {
21
- const { align = "end", className, themeValue, onChange, value, disabled } = props;
22
+ const { id, align = "end", className, themeValue, onChange, value, disabled } = props;
22
23
  const isDark = value === "dark";
23
24
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.DropdownMenu, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.DropdownMenuTrigger, {
24
25
  asChild: true,
25
26
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Button, {
27
+ id,
26
28
  variant: "outline",
27
29
  size: "icon",
28
30
  className: (0, __pixpilot_shadcn.cn)(className),
@@ -40,6 +42,7 @@ function ThemeModeDropdown(props) {
40
42
  align,
41
43
  children: [
42
44
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.DropdownMenuItem, {
45
+ id: require_get_id.getId(id, "option-light"),
43
46
  onClick: () => onChange?.("light"),
44
47
  children: [
45
48
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Sun, { className: "h-4 w-4 mr-2" }),
@@ -51,6 +54,7 @@ function ThemeModeDropdown(props) {
51
54
  ]
52
55
  }),
53
56
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.DropdownMenuItem, {
57
+ id: require_get_id.getId(id, "option-dark"),
54
58
  onClick: () => onChange?.("dark"),
55
59
  children: [
56
60
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Moon, { className: "h-4 w-4 mr-2" }),
@@ -62,6 +66,7 @@ function ThemeModeDropdown(props) {
62
66
  ]
63
67
  }),
64
68
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.DropdownMenuItem, {
69
+ id: require_get_id.getId(id, "option-system"),
65
70
  onClick: () => onChange?.("system"),
66
71
  children: [
67
72
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Monitor, { className: "h-4 w-4 mr-2" }),
@@ -1,7 +1,8 @@
1
- import * as react_jsx_runtime12 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime18 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeDropdown.d.ts
4
4
  interface ThemeModeDropdownProps {
5
+ id?: string;
5
6
  align?: 'start' | 'center' | 'end';
6
7
  className?: string;
7
8
  /** Current theme selection ("light" | "dark" | "system") */
@@ -17,7 +18,7 @@ interface ThemeModeDropdownProps {
17
18
  * Provides Light / Dark / System options.
18
19
  * Pure component - requires themeValue and onChange props.
19
20
  */
20
- declare function ThemeModeDropdown(props: ThemeModeDropdownProps): react_jsx_runtime12.JSX.Element;
21
+ declare function ThemeModeDropdown(props: ThemeModeDropdownProps): react_jsx_runtime18.JSX.Element;
21
22
  declare namespace ThemeModeDropdown {
22
23
  var displayName: string;
23
24
  }
@@ -2,6 +2,7 @@ import * as react_jsx_runtime18 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeDropdown.d.ts
4
4
  interface ThemeModeDropdownProps {
5
+ id?: string;
5
6
  align?: 'start' | 'center' | 'end';
6
7
  className?: string;
7
8
  /** Current theme selection ("light" | "dark" | "system") */
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
 
3
3
 
4
+ import { getId } from "../utils/get-id.js";
4
5
  import { Button, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, cn } from "@pixpilot/shadcn";
5
6
  import { Check, Monitor, Moon, Sun } from "lucide-react";
6
7
  import React from "react";
@@ -13,11 +14,12 @@ import { jsx, jsxs } from "react/jsx-runtime";
13
14
  * Pure component - requires themeValue and onChange props.
14
15
  */
15
16
  function ThemeModeDropdown(props) {
16
- const { align = "end", className, themeValue, onChange, value, disabled } = props;
17
+ const { id, align = "end", className, themeValue, onChange, value, disabled } = props;
17
18
  const isDark = value === "dark";
18
19
  return /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
19
20
  asChild: true,
20
21
  children: /* @__PURE__ */ jsxs(Button, {
22
+ id,
21
23
  variant: "outline",
22
24
  size: "icon",
23
25
  className: cn(className),
@@ -35,6 +37,7 @@ function ThemeModeDropdown(props) {
35
37
  align,
36
38
  children: [
37
39
  /* @__PURE__ */ jsxs(DropdownMenuItem, {
40
+ id: getId(id, "option-light"),
38
41
  onClick: () => onChange?.("light"),
39
42
  children: [
40
43
  /* @__PURE__ */ jsx(Sun, { className: "h-4 w-4 mr-2" }),
@@ -46,6 +49,7 @@ function ThemeModeDropdown(props) {
46
49
  ]
47
50
  }),
48
51
  /* @__PURE__ */ jsxs(DropdownMenuItem, {
52
+ id: getId(id, "option-dark"),
49
53
  onClick: () => onChange?.("dark"),
50
54
  children: [
51
55
  /* @__PURE__ */ jsx(Moon, { className: "h-4 w-4 mr-2" }),
@@ -57,6 +61,7 @@ function ThemeModeDropdown(props) {
57
61
  ]
58
62
  }),
59
63
  /* @__PURE__ */ jsxs(DropdownMenuItem, {
64
+ id: getId(id, "option-system"),
60
65
  onClick: () => onChange?.("system"),
61
66
  children: [
62
67
  /* @__PURE__ */ jsx(Monitor, { className: "h-4 w-4 mr-2" }),
@@ -37,7 +37,7 @@ const SIZE_STYLES = {
37
37
  * Pure component - requires value and onChange props.
38
38
  */
39
39
  function ThemeModeSwitchInside(props) {
40
- const { showIcons = true, size = "md", iconSize: iconSizeProp, className, switchClassName, disabled, ariaLabel = "Toggle theme", value, onChange } = props;
40
+ const { showIcons = true, id, size = "md", iconSize: iconSizeProp, className, switchClassName, disabled, ariaLabel = "Toggle theme", value, onChange } = props;
41
41
  const sizeStyles = SIZE_STYLES[size];
42
42
  const iconSize = iconSizeProp ?? sizeStyles.defaultIconSize ?? DEFAULT_ICON_SIZE;
43
43
  const isDark = value === "dark";
@@ -45,6 +45,7 @@ function ThemeModeSwitchInside(props) {
45
45
  onChange?.(checked ? "dark" : "light");
46
46
  };
47
47
  if (!showIcons) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Switch, {
48
+ id,
48
49
  checked: isDark,
49
50
  onCheckedChange,
50
51
  disabled,
@@ -57,6 +58,7 @@ function ThemeModeSwitchInside(props) {
57
58
  className: (0, __pixpilot_shadcn.cn)(TOGGLE_WRAPPER_CLASS_NAME, sizeStyles.wrapper, disabled && "opacity-50", className),
58
59
  children: [
59
60
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Switch, {
61
+ id,
60
62
  checked: isDark,
61
63
  onCheckedChange,
62
64
  disabled,
@@ -1,8 +1,9 @@
1
- import * as react_jsx_runtime11 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime19 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeSwitchInside.d.ts
4
4
  type ThemeModeSwitchInsideSize = 'sm' | 'md' | 'lg';
5
5
  interface ThemeModeSwitchInsideProps {
6
+ id?: string;
6
7
  /** Whether to render the sun/moon icons at all. */
7
8
  showIcons?: boolean;
8
9
  /** Visual size of the toggle pill. */
@@ -25,7 +26,7 @@ interface ThemeModeSwitchInsideProps {
25
26
  * Icons are embedded within the switch control.
26
27
  * Pure component - requires value and onChange props.
27
28
  */
28
- declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps): react_jsx_runtime11.JSX.Element;
29
+ declare function ThemeModeSwitchInside(props: ThemeModeSwitchInsideProps): react_jsx_runtime19.JSX.Element;
29
30
  declare namespace ThemeModeSwitchInside {
30
31
  var displayName: string;
31
32
  }
@@ -3,6 +3,7 @@ import * as react_jsx_runtime19 from "react/jsx-runtime";
3
3
  //#region src/theme-toggle/ThemeModeSwitchInside.d.ts
4
4
  type ThemeModeSwitchInsideSize = 'sm' | 'md' | 'lg';
5
5
  interface ThemeModeSwitchInsideProps {
6
+ id?: string;
6
7
  /** Whether to render the sun/moon icons at all. */
7
8
  showIcons?: boolean;
8
9
  /** Visual size of the toggle pill. */
@@ -33,7 +33,7 @@ const SIZE_STYLES = {
33
33
  * Pure component - requires value and onChange props.
34
34
  */
35
35
  function ThemeModeSwitchInside(props) {
36
- const { showIcons = true, size = "md", iconSize: iconSizeProp, className, switchClassName, disabled, ariaLabel = "Toggle theme", value, onChange } = props;
36
+ const { showIcons = true, id, size = "md", iconSize: iconSizeProp, className, switchClassName, disabled, ariaLabel = "Toggle theme", value, onChange } = props;
37
37
  const sizeStyles = SIZE_STYLES[size];
38
38
  const iconSize = iconSizeProp ?? sizeStyles.defaultIconSize ?? DEFAULT_ICON_SIZE;
39
39
  const isDark = value === "dark";
@@ -41,6 +41,7 @@ function ThemeModeSwitchInside(props) {
41
41
  onChange?.(checked ? "dark" : "light");
42
42
  };
43
43
  if (!showIcons) return /* @__PURE__ */ jsx(Switch, {
44
+ id,
44
45
  checked: isDark,
45
46
  onCheckedChange,
46
47
  disabled,
@@ -53,6 +54,7 @@ function ThemeModeSwitchInside(props) {
53
54
  className: cn(TOGGLE_WRAPPER_CLASS_NAME, sizeStyles.wrapper, disabled && "opacity-50", className),
54
55
  children: [
55
56
  /* @__PURE__ */ jsx(Switch, {
57
+ id,
56
58
  checked: isDark,
57
59
  onCheckedChange,
58
60
  disabled,
@@ -19,12 +19,13 @@ const DEFAULT_ICON_SIZE = 16;
19
19
  * Pure component - requires value and onChange props.
20
20
  */
21
21
  function ThemeModeSwitchOutside(props) {
22
- const { showIcons = true, iconSize = DEFAULT_ICON_SIZE, className, switchClassName, disabled, ariaLabel = "Toggle theme", value, onChange } = props;
22
+ const { showIcons = true, id, iconSize = DEFAULT_ICON_SIZE, className, switchClassName, disabled, ariaLabel = "Toggle theme", value, onChange } = props;
23
23
  const isDark = value === "dark";
24
24
  const onCheckedChange = (checked) => {
25
25
  onChange?.(checked ? "dark" : "light");
26
26
  };
27
27
  if (!showIcons) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Switch, {
28
+ id,
28
29
  checked: isDark,
29
30
  onCheckedChange,
30
31
  disabled,
@@ -42,6 +43,7 @@ function ThemeModeSwitchOutside(props) {
42
43
  }
43
44
  }),
44
45
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Switch, {
46
+ id,
45
47
  checked: isDark,
46
48
  onCheckedChange,
47
49
  disabled,
@@ -1,7 +1,8 @@
1
- import * as react_jsx_runtime13 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime20 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeSwitchOutside.d.ts
4
4
  interface ThemeModeSwitchOutsideProps {
5
+ id?: string;
5
6
  /** Whether to render the sun/moon icons at all. */
6
7
  showIcons?: boolean;
7
8
  /** Icon size in pixels. */
@@ -22,7 +23,7 @@ interface ThemeModeSwitchOutsideProps {
22
23
  * Icons flank the switch control on either side.
23
24
  * Pure component - requires value and onChange props.
24
25
  */
25
- declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps): react_jsx_runtime13.JSX.Element;
26
+ declare function ThemeModeSwitchOutside(props: ThemeModeSwitchOutsideProps): react_jsx_runtime20.JSX.Element;
26
27
  declare namespace ThemeModeSwitchOutside {
27
28
  var displayName: string;
28
29
  }
@@ -2,6 +2,7 @@ import * as react_jsx_runtime20 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeSwitchOutside.d.ts
4
4
  interface ThemeModeSwitchOutsideProps {
5
+ id?: string;
5
6
  /** Whether to render the sun/moon icons at all. */
6
7
  showIcons?: boolean;
7
8
  /** Icon size in pixels. */
@@ -14,12 +14,13 @@ const DEFAULT_ICON_SIZE = 16;
14
14
  * Pure component - requires value and onChange props.
15
15
  */
16
16
  function ThemeModeSwitchOutside(props) {
17
- const { showIcons = true, iconSize = DEFAULT_ICON_SIZE, className, switchClassName, disabled, ariaLabel = "Toggle theme", value, onChange } = props;
17
+ const { showIcons = true, id, iconSize = DEFAULT_ICON_SIZE, className, switchClassName, disabled, ariaLabel = "Toggle theme", value, onChange } = props;
18
18
  const isDark = value === "dark";
19
19
  const onCheckedChange = (checked) => {
20
20
  onChange?.(checked ? "dark" : "light");
21
21
  };
22
22
  if (!showIcons) return /* @__PURE__ */ jsx(Switch, {
23
+ id,
23
24
  checked: isDark,
24
25
  onCheckedChange,
25
26
  disabled,
@@ -37,6 +38,7 @@ function ThemeModeSwitchOutside(props) {
37
38
  }
38
39
  }),
39
40
  /* @__PURE__ */ jsx(Switch, {
41
+ id,
40
42
  checked: isDark,
41
43
  onCheckedChange,
42
44
  disabled,
@@ -17,7 +17,7 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
17
17
  * Pure component - toggles between light and dark.
18
18
  */
19
19
  function ThemeModeToggleButton(props) {
20
- const { className, value, onChange, disabled } = props;
20
+ const { id, className, value, onChange, disabled } = props;
21
21
  const toggleTheme = react.default.useCallback(() => {
22
22
  if (value === "dark") {
23
23
  onChange?.("light");
@@ -26,6 +26,7 @@ function ThemeModeToggleButton(props) {
26
26
  onChange?.("dark");
27
27
  }, [value, onChange]);
28
28
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Button, {
29
+ id,
29
30
  variant: "secondary",
30
31
  size: "icon",
31
32
  className: (0, __pixpilot_shadcn.cn)("group/toggle size-8", className),
@@ -1,7 +1,8 @@
1
- import * as react_jsx_runtime14 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime17 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeToggleButton.d.ts
4
4
  interface ThemeModeToggleButtonProps {
5
+ id?: string;
5
6
  className?: string;
6
7
  /** The resolved theme value ("light" | "dark") */
7
8
  value?: string;
@@ -13,7 +14,7 @@ interface ThemeModeToggleButtonProps {
13
14
  * Light/Dark toggle button.
14
15
  * Pure component - toggles between light and dark.
15
16
  */
16
- declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps): react_jsx_runtime14.JSX.Element;
17
+ declare function ThemeModeToggleButton(props: ThemeModeToggleButtonProps): react_jsx_runtime17.JSX.Element;
17
18
  declare namespace ThemeModeToggleButton {
18
19
  var displayName: string;
19
20
  }
@@ -2,6 +2,7 @@ import * as react_jsx_runtime17 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/theme-toggle/ThemeModeToggleButton.d.ts
4
4
  interface ThemeModeToggleButtonProps {
5
+ id?: string;
5
6
  className?: string;
6
7
  /** The resolved theme value ("light" | "dark") */
7
8
  value?: string;