@pixpilot/shadcn-ui 1.22.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 (124) hide show
  1. package/dist/ColorPicker/ColorPicker.cjs +4 -1
  2. package/dist/ColorPicker/ColorPicker.js +4 -1
  3. package/dist/ColorPickerBase/ColorPickerBase.cjs +5 -2
  4. package/dist/ColorPickerBase/ColorPickerBase.js +5 -2
  5. package/dist/ColorPickerBase/ColorPickerButton.cjs +6 -2
  6. package/dist/ColorPickerBase/ColorPickerButton.js +6 -2
  7. package/dist/ColorPickerBase/ColorPickerCompactControls.cjs +5 -3
  8. package/dist/ColorPickerBase/ColorPickerCompactControls.js +5 -3
  9. package/dist/ColorPickerBase/ColorPickerControls.cjs +14 -3
  10. package/dist/ColorPickerBase/ColorPickerControls.js +14 -3
  11. package/dist/ColorPickerBase/ColorPickerFormatControls.cjs +3 -2
  12. package/dist/ColorPickerBase/ColorPickerFormatControls.js +3 -2
  13. package/dist/ColorPickerBase/ColorPickerFullControls.cjs +8 -4
  14. package/dist/ColorPickerBase/ColorPickerFullControls.js +8 -4
  15. package/dist/ColorPickerBase/ColorPickerInput.cjs +6 -2
  16. package/dist/ColorPickerBase/ColorPickerInput.js +6 -2
  17. package/dist/ColorPickerBase/ColorPickerRoot.cjs +2 -1
  18. package/dist/ColorPickerBase/ColorPickerRoot.js +2 -1
  19. package/dist/ColorPickerBase/color-palette/ColorPalette.cjs +8 -2
  20. package/dist/ColorPickerBase/color-palette/ColorPalette.js +8 -2
  21. package/dist/ColorPickerBase/color-palette/PaletteSwatch.cjs +2 -1
  22. package/dist/ColorPickerBase/color-palette/PaletteSwatch.d.cts +1 -0
  23. package/dist/ColorPickerBase/color-palette/PaletteSwatch.d.ts +1 -0
  24. package/dist/ColorPickerBase/color-palette/PaletteSwatch.js +2 -1
  25. package/dist/ColorPickerBase/color-picker-context.d.cts +1 -0
  26. package/dist/ColorPickerBase/color-picker-context.d.ts +1 -0
  27. package/dist/ColorPickerBase/types.d.cts +2 -0
  28. package/dist/ColorPickerBase/types.d.ts +2 -0
  29. package/dist/ColorSelect.cjs +4 -1
  30. package/dist/ColorSelect.d.cts +1 -0
  31. package/dist/ColorSelect.d.ts +1 -0
  32. package/dist/ColorSelect.js +4 -1
  33. package/dist/Combobox.cjs +8 -2
  34. package/dist/Combobox.d.cts +1 -0
  35. package/dist/Combobox.d.ts +1 -0
  36. package/dist/Combobox.js +8 -2
  37. package/dist/CommandOptionList.cjs +3 -1
  38. package/dist/CommandOptionList.js +3 -1
  39. package/dist/DatePicker.cjs +2 -1
  40. package/dist/DatePicker.d.cts +1 -0
  41. package/dist/DatePicker.d.ts +1 -0
  42. package/dist/DatePicker.js +2 -1
  43. package/dist/IconToggle.cjs +1 -1
  44. package/dist/IconToggle.js +1 -1
  45. package/dist/Rating.cjs +7 -2
  46. package/dist/Rating.d.cts +1 -0
  47. package/dist/Rating.d.ts +1 -0
  48. package/dist/Rating.js +7 -2
  49. package/dist/Select.cjs +5 -1
  50. package/dist/Select.js +5 -1
  51. package/dist/avatar-upload/AvatarUpload.cjs +5 -2
  52. package/dist/avatar-upload/AvatarUpload.js +5 -2
  53. package/dist/avatar-upload/AvatarUploadComponents.cjs +3 -1
  54. package/dist/avatar-upload/AvatarUploadComponents.js +3 -1
  55. package/dist/avatar-upload/AvatarUploadItem.cjs +4 -1
  56. package/dist/avatar-upload/AvatarUploadItem.js +4 -1
  57. package/dist/confirmation-dialog/ConfirmationDialog.cjs +4 -1
  58. package/dist/confirmation-dialog/ConfirmationDialog.d.cts +1 -0
  59. package/dist/confirmation-dialog/ConfirmationDialog.d.ts +1 -0
  60. package/dist/confirmation-dialog/ConfirmationDialog.js +4 -1
  61. package/dist/dialog/Dialog.d.ts +4 -4
  62. package/dist/file-upload/FileUpload.cjs +3 -1
  63. package/dist/file-upload/FileUpload.d.cts +2 -2
  64. package/dist/file-upload/FileUpload.js +3 -1
  65. package/dist/file-upload/FileUploadItems.cjs +2 -1
  66. package/dist/file-upload/FileUploadItems.js +2 -1
  67. package/dist/file-upload/FileUploadListItem.cjs +3 -1
  68. package/dist/file-upload/FileUploadListItem.js +3 -1
  69. package/dist/file-upload-inline/FileUploadInline.d.cts +2 -2
  70. package/dist/file-upload-inline/FileUploadInline.d.ts +2 -2
  71. package/dist/file-upload-root/FileUploadRoot.cjs +3 -1
  72. package/dist/file-upload-root/FileUploadRoot.js +3 -1
  73. package/dist/file-upload-root/FileUploadRootItem.cjs +18 -13
  74. package/dist/file-upload-root/FileUploadRootItem.d.cts +1 -0
  75. package/dist/file-upload-root/FileUploadRootItem.d.ts +1 -0
  76. package/dist/file-upload-root/FileUploadRootItem.js +18 -13
  77. package/dist/icon-selector/IconPicker.cjs +7 -1
  78. package/dist/icon-selector/IconPicker.d.cts +1 -0
  79. package/dist/icon-selector/IconPicker.d.ts +1 -0
  80. package/dist/icon-selector/IconPicker.js +7 -1
  81. package/dist/icon-selector/icon-picker-content.cjs +8 -1
  82. package/dist/icon-selector/icon-picker-content.js +8 -1
  83. package/dist/icon-selector/virtualized-icon-grid.cjs +5 -2
  84. package/dist/icon-selector/virtualized-icon-grid.js +5 -2
  85. package/dist/index.cjs +2 -2
  86. package/dist/index.js +2 -2
  87. package/dist/input/Input.d.cts +2 -2
  88. package/dist/pagination/Pagination.cjs +28 -6
  89. package/dist/pagination/Pagination.d.cts +1 -0
  90. package/dist/pagination/Pagination.d.ts +1 -0
  91. package/dist/pagination/Pagination.js +28 -6
  92. package/dist/rich-text-editor/ToolbarButton.cjs +1 -1
  93. package/dist/rich-text-editor/ToolbarButton.js +1 -1
  94. package/dist/slider/SliderInput.cjs +1 -1
  95. package/dist/slider/SliderInput.js +1 -1
  96. package/dist/slider/SliderSelect.cjs +1 -1
  97. package/dist/slider/SliderSelect.js +1 -1
  98. package/dist/tags-input/TagsInput.cjs +4 -1
  99. package/dist/tags-input/TagsInput.d.cts +2 -0
  100. package/dist/tags-input/TagsInput.d.ts +4 -2
  101. package/dist/tags-input/TagsInput.js +4 -1
  102. package/dist/tags-input/TagsInputInline.cjs +9 -2
  103. package/dist/tags-input/TagsInputInline.d.cts +4 -2
  104. package/dist/tags-input/TagsInputInline.d.ts +4 -2
  105. package/dist/tags-input/TagsInputInline.js +9 -2
  106. package/dist/theme-toggle/ThemeModeDropdown.cjs +6 -1
  107. package/dist/theme-toggle/ThemeModeDropdown.d.cts +3 -2
  108. package/dist/theme-toggle/ThemeModeDropdown.d.ts +3 -2
  109. package/dist/theme-toggle/ThemeModeDropdown.js +6 -1
  110. package/dist/theme-toggle/ThemeModeSwitchInside.cjs +3 -1
  111. package/dist/theme-toggle/ThemeModeSwitchInside.d.cts +3 -2
  112. package/dist/theme-toggle/ThemeModeSwitchInside.d.ts +3 -2
  113. package/dist/theme-toggle/ThemeModeSwitchInside.js +3 -1
  114. package/dist/theme-toggle/ThemeModeSwitchOutside.cjs +3 -1
  115. package/dist/theme-toggle/ThemeModeSwitchOutside.d.cts +3 -2
  116. package/dist/theme-toggle/ThemeModeSwitchOutside.d.ts +3 -2
  117. package/dist/theme-toggle/ThemeModeSwitchOutside.js +3 -1
  118. package/dist/theme-toggle/ThemeModeToggleButton.cjs +2 -1
  119. package/dist/theme-toggle/ThemeModeToggleButton.d.cts +3 -2
  120. package/dist/theme-toggle/ThemeModeToggleButton.d.ts +3 -2
  121. package/dist/theme-toggle/ThemeModeToggleButton.js +2 -1
  122. package/dist/toast/AlertToast.cjs +2 -1
  123. package/dist/toast/AlertToast.js +2 -1
  124. package/package.json +5 -5
@@ -1,4 +1,5 @@
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_Input = require('../input/Input.cjs');
3
4
  require('../input/index.cjs');
4
5
  const require_LoadingOverlay = require('../LoadingOverlay.cjs');
@@ -19,7 +20,7 @@ function noIconMessage(hasIcons, isSearching) {
19
20
  if (!isSearching) return "No icons provided by the selected provider!";
20
21
  return "No icons found matching your search";
21
22
  }
22
- const IconPickerContent = ({ providers: providersProp, onChange, onSelect, maxHeight = "60vh" }) => {
23
+ const IconPickerContent = ({ id, providers: providersProp, onChange, onSelect, maxHeight = "60vh" }) => {
23
24
  const [searchQuery, setSearchQuery] = (0, react.useState)("");
24
25
  const { providers, isLoading } = require_use_async_providers.useAsyncProviders(providersProp);
25
26
  const providerPrefixes = (0, react.useMemo)(() => providers.map((provider) => provider.prefix), [providers]);
@@ -87,12 +88,14 @@ const IconPickerContent = ({ providers: providersProp, onChange, onSelect, maxHe
87
88
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
88
89
  className: "relative",
89
90
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Input.Input, {
91
+ id: require_get_id.getId(id, "search-input"),
90
92
  placeholder: "Search icons...",
91
93
  value: searchQuery,
92
94
  onChange: (e) => setSearchQuery(e.target.value),
93
95
  autoFocus: true,
94
96
  disabled: isLoading
95
97
  }), searchQuery && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
98
+ id: require_get_id.getId(id, "clear-search-button"),
96
99
  type: "button",
97
100
  onClick: () => setSearchQuery(""),
98
101
  className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",
@@ -106,6 +109,7 @@ const IconPickerContent = ({ providers: providersProp, onChange, onSelect, maxHe
106
109
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TabsList, {
107
110
  className: "w-full",
108
111
  children: providers.map((provider) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TabsTrigger, {
112
+ id: require_get_id.getId(id, `provider-${provider.prefix}`),
109
113
  value: provider.prefix,
110
114
  children: provider.name ?? provider.prefix
111
115
  }, provider.prefix))
@@ -113,6 +117,7 @@ const IconPickerContent = ({ providers: providersProp, onChange, onSelect, maxHe
113
117
  value: provider.prefix,
114
118
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_virtualized_icon_grid.default, {
115
119
  icons: allIconsByProvider[provider.prefix] ?? [],
120
+ id,
116
121
  onSelectIcon: handleSelectIcon,
117
122
  maxHeight
118
123
  })
@@ -131,11 +136,13 @@ const IconPickerContent = ({ providers: providersProp, onChange, onSelect, maxHe
131
136
  }),
132
137
  isSearching && providers.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_virtualized_icon_grid.default, {
133
138
  icons: filteredData,
139
+ id,
134
140
  onSelectIcon: handleSelectIcon,
135
141
  maxHeight
136
142
  }),
137
143
  !isSearching && providers.length === 1 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_virtualized_icon_grid.default, {
138
144
  icons: filteredData,
145
+ id,
139
146
  onSelectIcon: handleSelectIcon,
140
147
  maxHeight
141
148
  })
@@ -1,3 +1,4 @@
1
+ import { getId } from "../utils/get-id.js";
1
2
  import { Input as Input$1 } from "../input/Input.js";
2
3
  import "../input/index.js";
3
4
  import { LoadingOverlay } from "../LoadingOverlay.js";
@@ -14,7 +15,7 @@ function noIconMessage(hasIcons, isSearching) {
14
15
  if (!isSearching) return "No icons provided by the selected provider!";
15
16
  return "No icons found matching your search";
16
17
  }
17
- const IconPickerContent = ({ providers: providersProp, onChange, onSelect, maxHeight = "60vh" }) => {
18
+ const IconPickerContent = ({ id, providers: providersProp, onChange, onSelect, maxHeight = "60vh" }) => {
18
19
  const [searchQuery, setSearchQuery] = useState("");
19
20
  const { providers, isLoading } = useAsyncProviders(providersProp);
20
21
  const providerPrefixes = useMemo(() => providers.map((provider) => provider.prefix), [providers]);
@@ -82,12 +83,14 @@ const IconPickerContent = ({ providers: providersProp, onChange, onSelect, maxHe
82
83
  /* @__PURE__ */ jsxs("div", {
83
84
  className: "relative",
84
85
  children: [/* @__PURE__ */ jsx(Input$1, {
86
+ id: getId(id, "search-input"),
85
87
  placeholder: "Search icons...",
86
88
  value: searchQuery,
87
89
  onChange: (e) => setSearchQuery(e.target.value),
88
90
  autoFocus: true,
89
91
  disabled: isLoading
90
92
  }), searchQuery && /* @__PURE__ */ jsx("button", {
93
+ id: getId(id, "clear-search-button"),
91
94
  type: "button",
92
95
  onClick: () => setSearchQuery(""),
93
96
  className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",
@@ -101,6 +104,7 @@ const IconPickerContent = ({ providers: providersProp, onChange, onSelect, maxHe
101
104
  children: [/* @__PURE__ */ jsx(TabsList, {
102
105
  className: "w-full",
103
106
  children: providers.map((provider) => /* @__PURE__ */ jsx(TabsTrigger, {
107
+ id: getId(id, `provider-${provider.prefix}`),
104
108
  value: provider.prefix,
105
109
  children: provider.name ?? provider.prefix
106
110
  }, provider.prefix))
@@ -108,6 +112,7 @@ const IconPickerContent = ({ providers: providersProp, onChange, onSelect, maxHe
108
112
  value: provider.prefix,
109
113
  children: /* @__PURE__ */ jsx(virtualized_icon_grid_default, {
110
114
  icons: allIconsByProvider[provider.prefix] ?? [],
115
+ id,
111
116
  onSelectIcon: handleSelectIcon,
112
117
  maxHeight
113
118
  })
@@ -126,11 +131,13 @@ const IconPickerContent = ({ providers: providersProp, onChange, onSelect, maxHe
126
131
  }),
127
132
  isSearching && providers.length > 0 && /* @__PURE__ */ jsx(virtualized_icon_grid_default, {
128
133
  icons: filteredData,
134
+ id,
129
135
  onSelectIcon: handleSelectIcon,
130
136
  maxHeight
131
137
  }),
132
138
  !isSearching && providers.length === 1 && /* @__PURE__ */ jsx(virtualized_icon_grid_default, {
133
139
  icons: filteredData,
140
+ id,
134
141
  onSelectIcon: handleSelectIcon,
135
142
  maxHeight
136
143
  })
@@ -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 react = require("react");
6
7
  react = require_rolldown_runtime.__toESM(react);
7
8
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -16,10 +17,11 @@ const CELL_SIZE_DEFAULT = 80;
16
17
  const ROW_HEIGHT = 80;
17
18
  const DEFAULT_HEIGHT = 480;
18
19
  const MIN_COLUMNS = 3;
19
- const IconCell = react.default.memo(({ iconName, onSelectIcon }) => {
20
+ const IconCell = react.default.memo(({ id, iconName, onSelectIcon }) => {
20
21
  if (!iconName) return null;
21
22
  const displayName = iconName.split(":")[1] ?? iconName;
22
23
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
24
+ id: require_get_id.getId(id, `option-${iconName}`),
23
25
  type: "button",
24
26
  onClick: () => onSelectIcon(iconName),
25
27
  className: "w-full h-full flex flex-col items-center justify-center gap-1 rounded-md border border-transparent hover:border-primary hover:bg-accent transition-colors p-1",
@@ -35,7 +37,7 @@ const IconCell = react.default.memo(({ iconName, onSelectIcon }) => {
35
37
  });
36
38
  });
37
39
  IconCell.displayName = "IconCell";
38
- const VirtualizedIconGrid = ({ icons, onSelectIcon, maxHeight = DEFAULT_HEIGHT, columnCount: providedColumnCount, cellSize = CELL_SIZE_DEFAULT }) => {
40
+ const VirtualizedIconGrid = ({ icons, id, onSelectIcon, maxHeight = DEFAULT_HEIGHT, columnCount: providedColumnCount, cellSize = CELL_SIZE_DEFAULT }) => {
39
41
  const scrollableRef = (0, react.useRef)(null);
40
42
  const containerRef = (0, react.useRef)(null);
41
43
  const [containerWidth, setContainerWidth] = (0, react.useState)(0);
@@ -120,6 +122,7 @@ const VirtualizedIconGrid = ({ icons, onSelectIcon, maxHeight = DEFAULT_HEIGHT,
120
122
  minWidth: "0"
121
123
  },
122
124
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconCell, {
125
+ id,
123
126
  iconName,
124
127
  onSelectIcon: handleSelectIcon
125
128
  })
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
 
3
3
 
4
+ import { getId } from "../utils/get-id.js";
4
5
  import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
5
6
  import { jsx, jsxs } from "react/jsx-runtime";
6
7
  import { Icon } from "@iconify/react";
@@ -11,10 +12,11 @@ const CELL_SIZE_DEFAULT = 80;
11
12
  const ROW_HEIGHT = 80;
12
13
  const DEFAULT_HEIGHT = 480;
13
14
  const MIN_COLUMNS = 3;
14
- const IconCell = React.memo(({ iconName, onSelectIcon }) => {
15
+ const IconCell = React.memo(({ id, iconName, onSelectIcon }) => {
15
16
  if (!iconName) return null;
16
17
  const displayName = iconName.split(":")[1] ?? iconName;
17
18
  return /* @__PURE__ */ jsxs("button", {
19
+ id: getId(id, `option-${iconName}`),
18
20
  type: "button",
19
21
  onClick: () => onSelectIcon(iconName),
20
22
  className: "w-full h-full flex flex-col items-center justify-center gap-1 rounded-md border border-transparent hover:border-primary hover:bg-accent transition-colors p-1",
@@ -30,7 +32,7 @@ const IconCell = React.memo(({ iconName, onSelectIcon }) => {
30
32
  });
31
33
  });
32
34
  IconCell.displayName = "IconCell";
33
- const VirtualizedIconGrid = ({ icons, onSelectIcon, maxHeight = DEFAULT_HEIGHT, columnCount: providedColumnCount, cellSize = CELL_SIZE_DEFAULT }) => {
35
+ const VirtualizedIconGrid = ({ icons, id, onSelectIcon, maxHeight = DEFAULT_HEIGHT, columnCount: providedColumnCount, cellSize = CELL_SIZE_DEFAULT }) => {
34
36
  const scrollableRef = useRef(null);
35
37
  const containerRef = useRef(null);
36
38
  const [containerWidth, setContainerWidth] = useState(0);
@@ -115,6 +117,7 @@ const VirtualizedIconGrid = ({ icons, onSelectIcon, maxHeight = DEFAULT_HEIGHT,
115
117
  minWidth: "0"
116
118
  },
117
119
  children: /* @__PURE__ */ jsx(IconCell, {
120
+ id,
118
121
  iconName,
119
122
  onSelectIcon: handleSelectIcon
120
123
  })
package/dist/index.cjs CHANGED
@@ -1,4 +1,6 @@
1
1
  const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
+ const require_get_id = require('./utils/get-id.cjs');
3
+ const require_svg = require('./utils/svg.cjs');
2
4
  const require_FileUpload = require('./file-upload/FileUpload.cjs');
3
5
  require('./file-upload/index.cjs');
4
6
  const require_AbsoluteFill = require('./AbsoluteFill.cjs');
@@ -52,8 +54,6 @@ const require_LoadingOverlay = require('./LoadingOverlay.cjs');
52
54
  const require_IconPicker = require('./icon-selector/IconPicker.cjs');
53
55
  require('./icon-selector/index.cjs');
54
56
  const require_ToggleButton = require('./ToggleButton.cjs');
55
- const require_get_id = require('./utils/get-id.cjs');
56
- const require_svg = require('./utils/svg.cjs');
57
57
  const require_IconToggle = require('./IconToggle.cjs');
58
58
  const require_Layout = require('./layout/Layout.cjs');
59
59
  const require_LayoutFooter = require('./layout/LayoutFooter.cjs');
package/dist/index.js CHANGED
@@ -1,3 +1,5 @@
1
+ import { getId } from "./utils/get-id.js";
2
+ import { isSvgMarkupString, svgMarkupToMaskUrl } from "./utils/svg.js";
1
3
  import { FileUpload } from "./file-upload/FileUpload.js";
2
4
  import "./file-upload/index.js";
3
5
  import { AbsoluteFill } from "./AbsoluteFill.js";
@@ -51,8 +53,6 @@ import { LoadingOverlay } from "./LoadingOverlay.js";
51
53
  import { IconPicker } from "./icon-selector/IconPicker.js";
52
54
  import "./icon-selector/index.js";
53
55
  import { ToggleButton } from "./ToggleButton.js";
54
- import { getId } from "./utils/get-id.js";
55
- import { isSvgMarkupString, svgMarkupToMaskUrl } from "./utils/svg.js";
56
56
  import { IconToggle } from "./IconToggle.js";
57
57
  import { Layout } from "./layout/Layout.js";
58
58
  import { LayoutFooter } from "./layout/LayoutFooter.js";
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime13 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime11 from "react/jsx-runtime";
2
2
  import { InputProps } from "@pixpilot/shadcn";
3
3
  import * as React$1 from "react";
4
4
 
@@ -10,6 +10,6 @@ type InputProps$1 = InputProps & {
10
10
  prefixClassName?: string;
11
11
  suffixClassName?: string;
12
12
  };
13
- declare function Input(props: InputProps$1): react_jsx_runtime13.JSX.Element;
13
+ declare function Input(props: InputProps$1): react_jsx_runtime11.JSX.Element;
14
14
  //#endregion
15
15
  export { Input, InputProps$1 as InputProps };
@@ -1,4 +1,5 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ const require_get_id = require('../utils/get-id.cjs');
2
3
  let __pixpilot_shadcn = require("@pixpilot/shadcn");
3
4
  __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
4
5
  let lucide_react = require("lucide-react");
@@ -40,7 +41,7 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
40
41
  * showPageInfo={true}
41
42
  * />
42
43
  */
43
- const Pagination = ({ page, totalPages, onPageChange, maxVisiblePages = 6, variant = "full", showPageInfo = false, className }) => {
44
+ const Pagination = ({ id, page, totalPages, onPageChange, maxVisiblePages = 6, variant = "full", showPageInfo = false, className }) => {
44
45
  if (totalPages <= 1) return null;
45
46
  const handlePageClick = (newPage) => (e) => {
46
47
  e.preventDefault();
@@ -95,12 +96,16 @@ const Pagination = ({ page, totalPages, onPageChange, maxVisiblePages = 6, varia
95
96
  className,
96
97
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.PaginationContent, { children: [
97
98
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationLink, {
99
+ id: require_get_id.getId(id, "first-page-button"),
98
100
  onClick: handlePageClick(1),
99
101
  "aria-label": "Go to first page",
100
102
  className: "gap-1 px-2",
101
103
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronsLeft, { className: "h-4 w-4" })
102
104
  }) }),
103
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationPrevious, { onClick: handlePageClick(Math.max(1, page - 1)) }) }),
105
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationPrevious, {
106
+ id: require_get_id.getId(id, "previous-page-button"),
107
+ onClick: handlePageClick(Math.max(1, page - 1))
108
+ }) }),
104
109
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
105
110
  className: "flex h-9 items-center justify-center px-4 text-sm font-medium",
106
111
  children: [
@@ -109,8 +114,12 @@ const Pagination = ({ page, totalPages, onPageChange, maxVisiblePages = 6, varia
109
114
  totalPages
110
115
  ]
111
116
  }) }),
112
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationNext, { onClick: handlePageClick(Math.min(totalPages, page + 1)) }) }),
117
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationNext, {
118
+ id: require_get_id.getId(id, "next-page-button"),
119
+ onClick: handlePageClick(Math.min(totalPages, page + 1))
120
+ }) }),
113
121
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationLink, {
122
+ id: require_get_id.getId(id, "last-page-button"),
114
123
  onClick: handlePageClick(totalPages),
115
124
  "aria-label": "Go to last page",
116
125
  className: "gap-1 px-2",
@@ -128,7 +137,13 @@ const Pagination = ({ page, totalPages, onPageChange, maxVisiblePages = 6, varia
128
137
  " of ",
129
138
  totalPages
130
139
  ]
131
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Pagination, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.PaginationContent, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationPrevious, { onClick: handlePageClick(Math.max(1, page - 1)) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationNext, { onClick: handlePageClick(Math.min(totalPages, page + 1)) }) })] }) })]
140
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Pagination, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.PaginationContent, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationPrevious, {
141
+ id,
142
+ onClick: handlePageClick(Math.max(1, page - 1))
143
+ }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationNext, {
144
+ id: require_get_id.getId(id, "next-page-button"),
145
+ onClick: handlePageClick(Math.min(totalPages, page + 1))
146
+ }) })] }) })]
132
147
  });
133
148
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
134
149
  className: `flex items-center justify-center gap-4 ${className ?? ""}`,
@@ -141,13 +156,20 @@ const Pagination = ({ page, totalPages, onPageChange, maxVisiblePages = 6, varia
141
156
  totalPages
142
157
  ]
143
158
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Pagination, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.PaginationContent, { children: [
144
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationPrevious, { onClick: handlePageClick(Math.max(1, page - 1)) }) }),
159
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationPrevious, {
160
+ id: require_get_id.getId(id, "previous-page-button"),
161
+ onClick: handlePageClick(Math.max(1, page - 1))
162
+ }) }),
145
163
  pages.map((p) => typeof p === "string" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationEllipsis, {}) }, p) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationLink, {
164
+ id: p === page ? id : require_get_id.getId(id, `page-${p}`),
146
165
  onClick: handlePageClick(p),
147
166
  isActive: p === page,
148
167
  children: p
149
168
  }) }, p)),
150
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationNext, { onClick: handlePageClick(Math.min(totalPages, page + 1)) }) })
169
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PaginationNext, {
170
+ id: require_get_id.getId(id, "next-page-button"),
171
+ onClick: handlePageClick(Math.min(totalPages, page + 1))
172
+ }) })
151
173
  ] }) })]
152
174
  });
153
175
  };
@@ -2,6 +2,7 @@ import React from "react";
2
2
 
3
3
  //#region src/pagination/Pagination.d.ts
4
4
  interface PaginationProps {
5
+ id?: string;
5
6
  /**
6
7
  * Current page number (1-indexed)
7
8
  */
@@ -2,6 +2,7 @@ import React from "react";
2
2
 
3
3
  //#region src/pagination/Pagination.d.ts
4
4
  interface PaginationProps {
5
+ id?: string;
5
6
  /**
6
7
  * Current page number (1-indexed)
7
8
  */
@@ -1,3 +1,4 @@
1
+ import { getId } from "../utils/get-id.js";
1
2
  import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "@pixpilot/shadcn";
2
3
  import { ChevronsLeft, ChevronsRight } from "lucide-react";
3
4
  import React from "react";
@@ -35,7 +36,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
35
36
  * showPageInfo={true}
36
37
  * />
37
38
  */
38
- const Pagination$1 = ({ page, totalPages, onPageChange, maxVisiblePages = 6, variant = "full", showPageInfo = false, className }) => {
39
+ const Pagination$1 = ({ id, page, totalPages, onPageChange, maxVisiblePages = 6, variant = "full", showPageInfo = false, className }) => {
39
40
  if (totalPages <= 1) return null;
40
41
  const handlePageClick = (newPage) => (e) => {
41
42
  e.preventDefault();
@@ -90,12 +91,16 @@ const Pagination$1 = ({ page, totalPages, onPageChange, maxVisiblePages = 6, var
90
91
  className,
91
92
  children: /* @__PURE__ */ jsxs(PaginationContent, { children: [
92
93
  /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationLink, {
94
+ id: getId(id, "first-page-button"),
93
95
  onClick: handlePageClick(1),
94
96
  "aria-label": "Go to first page",
95
97
  className: "gap-1 px-2",
96
98
  children: /* @__PURE__ */ jsx(ChevronsLeft, { className: "h-4 w-4" })
97
99
  }) }),
98
- /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationPrevious, { onClick: handlePageClick(Math.max(1, page - 1)) }) }),
100
+ /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationPrevious, {
101
+ id: getId(id, "previous-page-button"),
102
+ onClick: handlePageClick(Math.max(1, page - 1))
103
+ }) }),
99
104
  /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsxs("span", {
100
105
  className: "flex h-9 items-center justify-center px-4 text-sm font-medium",
101
106
  children: [
@@ -104,8 +109,12 @@ const Pagination$1 = ({ page, totalPages, onPageChange, maxVisiblePages = 6, var
104
109
  totalPages
105
110
  ]
106
111
  }) }),
107
- /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationNext, { onClick: handlePageClick(Math.min(totalPages, page + 1)) }) }),
112
+ /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationNext, {
113
+ id: getId(id, "next-page-button"),
114
+ onClick: handlePageClick(Math.min(totalPages, page + 1))
115
+ }) }),
108
116
  /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationLink, {
117
+ id: getId(id, "last-page-button"),
109
118
  onClick: handlePageClick(totalPages),
110
119
  "aria-label": "Go to last page",
111
120
  className: "gap-1 px-2",
@@ -123,7 +132,13 @@ const Pagination$1 = ({ page, totalPages, onPageChange, maxVisiblePages = 6, var
123
132
  " of ",
124
133
  totalPages
125
134
  ]
126
- }), /* @__PURE__ */ jsx(Pagination, { children: /* @__PURE__ */ jsxs(PaginationContent, { children: [/* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationPrevious, { onClick: handlePageClick(Math.max(1, page - 1)) }) }), /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationNext, { onClick: handlePageClick(Math.min(totalPages, page + 1)) }) })] }) })]
135
+ }), /* @__PURE__ */ jsx(Pagination, { children: /* @__PURE__ */ jsxs(PaginationContent, { children: [/* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationPrevious, {
136
+ id,
137
+ onClick: handlePageClick(Math.max(1, page - 1))
138
+ }) }), /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationNext, {
139
+ id: getId(id, "next-page-button"),
140
+ onClick: handlePageClick(Math.min(totalPages, page + 1))
141
+ }) })] }) })]
127
142
  });
128
143
  return /* @__PURE__ */ jsxs("div", {
129
144
  className: `flex items-center justify-center gap-4 ${className ?? ""}`,
@@ -136,13 +151,20 @@ const Pagination$1 = ({ page, totalPages, onPageChange, maxVisiblePages = 6, var
136
151
  totalPages
137
152
  ]
138
153
  }), /* @__PURE__ */ jsx(Pagination, { children: /* @__PURE__ */ jsxs(PaginationContent, { children: [
139
- /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationPrevious, { onClick: handlePageClick(Math.max(1, page - 1)) }) }),
154
+ /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationPrevious, {
155
+ id: getId(id, "previous-page-button"),
156
+ onClick: handlePageClick(Math.max(1, page - 1))
157
+ }) }),
140
158
  pages.map((p) => typeof p === "string" ? /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationEllipsis, {}) }, p) : /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationLink, {
159
+ id: p === page ? id : getId(id, `page-${p}`),
141
160
  onClick: handlePageClick(p),
142
161
  isActive: p === page,
143
162
  children: p
144
163
  }) }, p)),
145
- /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationNext, { onClick: handlePageClick(Math.min(totalPages, page + 1)) }) })
164
+ /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationNext, {
165
+ id: getId(id, "next-page-button"),
166
+ onClick: handlePageClick(Math.min(totalPages, page + 1))
167
+ }) })
146
168
  ] }) })]
147
169
  });
148
170
  };
@@ -1,6 +1,6 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
- const require_Button = require('../Button.cjs');
3
2
  const require_svg = require('../utils/svg.cjs');
3
+ const require_Button = require('../Button.cjs');
4
4
  let __pixpilot_shadcn = require("@pixpilot/shadcn");
5
5
  __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
6
6
  let react = require("react");
@@ -1,5 +1,5 @@
1
- import { Button as Button$1 } from "../Button.js";
2
1
  import { isSvgMarkupString, svgMarkupToMaskUrl } from "../utils/svg.js";
2
+ import { Button as Button$1 } from "../Button.js";
3
3
  import { cn } from "@pixpilot/shadcn";
4
4
  import React from "react";
5
5
  import { jsx } from "react/jsx-runtime";
@@ -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,
@@ -3,6 +3,7 @@ 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,
@@ -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
  }