@pixpilot/shadcn-ui 1.23.0 → 1.25.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/Alert.cjs +21 -17
  3. package/dist/Alert.js +21 -17
  4. package/dist/Button.d.cts +2 -2
  5. package/dist/ButtonExtended.d.cts +2 -2
  6. package/dist/ColorPicker/ColorPicker.cjs +4 -1
  7. package/dist/ColorPicker/ColorPicker.js +4 -1
  8. package/dist/ColorPickerBase/ColorPickerBase.cjs +5 -2
  9. package/dist/ColorPickerBase/ColorPickerBase.js +5 -2
  10. package/dist/ColorPickerBase/ColorPickerButton.cjs +6 -2
  11. package/dist/ColorPickerBase/ColorPickerButton.js +6 -2
  12. package/dist/ColorPickerBase/ColorPickerCompactControls.cjs +5 -3
  13. package/dist/ColorPickerBase/ColorPickerCompactControls.js +5 -3
  14. package/dist/ColorPickerBase/ColorPickerControls.cjs +14 -3
  15. package/dist/ColorPickerBase/ColorPickerControls.js +14 -3
  16. package/dist/ColorPickerBase/ColorPickerFormatControls.cjs +3 -2
  17. package/dist/ColorPickerBase/ColorPickerFormatControls.js +3 -2
  18. package/dist/ColorPickerBase/ColorPickerFullControls.cjs +8 -4
  19. package/dist/ColorPickerBase/ColorPickerFullControls.js +8 -4
  20. package/dist/ColorPickerBase/ColorPickerInput.cjs +6 -2
  21. package/dist/ColorPickerBase/ColorPickerInput.js +6 -2
  22. package/dist/ColorPickerBase/ColorPickerRoot.cjs +2 -1
  23. package/dist/ColorPickerBase/ColorPickerRoot.js +2 -1
  24. package/dist/ColorPickerBase/color-palette/ColorPalette.cjs +8 -2
  25. package/dist/ColorPickerBase/color-palette/ColorPalette.js +8 -2
  26. package/dist/ColorPickerBase/color-palette/PaletteSwatch.cjs +2 -1
  27. package/dist/ColorPickerBase/color-palette/PaletteSwatch.d.cts +1 -0
  28. package/dist/ColorPickerBase/color-palette/PaletteSwatch.d.ts +1 -0
  29. package/dist/ColorPickerBase/color-palette/PaletteSwatch.js +2 -1
  30. package/dist/ColorPickerBase/color-picker-context.d.cts +1 -0
  31. package/dist/ColorPickerBase/color-picker-context.d.ts +1 -0
  32. package/dist/ColorPickerBase/types.d.cts +2 -0
  33. package/dist/ColorPickerBase/types.d.ts +2 -0
  34. package/dist/ColorSelect.cjs +4 -1
  35. package/dist/ColorSelect.d.cts +3 -2
  36. package/dist/ColorSelect.d.ts +1 -0
  37. package/dist/ColorSelect.js +4 -1
  38. package/dist/Combobox.cjs +8 -2
  39. package/dist/Combobox.d.cts +1 -0
  40. package/dist/Combobox.d.ts +1 -0
  41. package/dist/Combobox.js +8 -2
  42. package/dist/CommandOptionList.cjs +3 -1
  43. package/dist/CommandOptionList.js +3 -1
  44. package/dist/ContentCard.d.cts +2 -2
  45. package/dist/ContentCard.d.ts +2 -2
  46. package/dist/DatePicker.cjs +2 -1
  47. package/dist/DatePicker.d.cts +3 -2
  48. package/dist/DatePicker.d.ts +3 -2
  49. package/dist/DatePicker.js +2 -1
  50. package/dist/IconToggle.cjs +1 -1
  51. package/dist/IconToggle.js +1 -1
  52. package/dist/Rating.cjs +7 -2
  53. package/dist/Rating.d.cts +4 -3
  54. package/dist/Rating.d.ts +4 -3
  55. package/dist/Rating.js +7 -2
  56. package/dist/Select.cjs +1 -1
  57. package/dist/Select.d.cts +2 -2
  58. package/dist/Select.js +1 -1
  59. package/dist/avatar-upload/AvatarUpload.cjs +5 -2
  60. package/dist/avatar-upload/AvatarUpload.js +5 -2
  61. package/dist/avatar-upload/AvatarUploadComponents.cjs +3 -1
  62. package/dist/avatar-upload/AvatarUploadComponents.js +3 -1
  63. package/dist/avatar-upload/AvatarUploadItem.cjs +4 -1
  64. package/dist/avatar-upload/AvatarUploadItem.js +4 -1
  65. package/dist/confirmation-dialog/ConfirmationDialog.cjs +4 -1
  66. package/dist/confirmation-dialog/ConfirmationDialog.d.cts +1 -0
  67. package/dist/confirmation-dialog/ConfirmationDialog.d.ts +1 -0
  68. package/dist/confirmation-dialog/ConfirmationDialog.js +4 -1
  69. package/dist/dialog/Dialog.d.cts +4 -4
  70. package/dist/file-upload/FileUpload.cjs +3 -1
  71. package/dist/file-upload/FileUpload.d.cts +2 -2
  72. package/dist/file-upload/FileUpload.js +3 -1
  73. package/dist/file-upload/FileUploadItems.cjs +2 -1
  74. package/dist/file-upload/FileUploadItems.js +2 -1
  75. package/dist/file-upload/FileUploadListItem.cjs +3 -1
  76. package/dist/file-upload/FileUploadListItem.js +3 -1
  77. package/dist/file-upload-inline/FileUploadInline.d.cts +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 +2 -0
  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 +3 -2
  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 +3 -2
  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 +3 -2
  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 +3 -2
  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
@@ -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
  const require_use_file_error = require('../file-upload/hooks/use-file-error.cjs');
6
7
  const require_use_file_upload_progress_callbacks = require('../file-upload/hooks/use-file-upload-progress-callbacks.cjs');
7
8
  require('../file-upload/hooks/index.cjs');
@@ -33,8 +34,9 @@ const FileMetaDataDisplay = ({ size, name, children }) => {
33
34
  ]
34
35
  });
35
36
  };
36
- const DeleteIconButton = ({ onClick }) => {
37
+ const DeleteIconButton = ({ id, onClick }) => {
37
38
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Button, {
39
+ id,
38
40
  variant: "ghost",
39
41
  size: "icon",
40
42
  className: "size-7 shrink-0",
@@ -55,7 +57,7 @@ const FileItemInnerWrapper = ({ children }) => {
55
57
  children
56
58
  });
57
59
  };
58
- const FileUploadRootItem = react.default.memo(({ file, name = "", size = 0, type = "", lastModified = 0, disabled = false, onDelete, onFileError, onFileSuccess }) => {
60
+ const FileUploadRootItem = react.default.memo(({ file, name = "", size = 0, type = "", lastModified = 0, disabled = false, onDelete, onFileError, onFileSuccess, id }) => {
59
61
  require_use_file_upload_progress_callbacks.useFileUploadProgressCallbacks(file, {
60
62
  onFileSuccess,
61
63
  onFileError
@@ -76,17 +78,20 @@ const FileUploadRootItem = react.default.memo(({ file, name = "", size = 0, type
76
78
  className: "text-destructive text-xs",
77
79
  children: fileError
78
80
  })
79
- }), !disabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DeleteIconButton, { onClick: (e) => {
80
- e.stopPropagation();
81
- e.preventDefault();
82
- onDelete({
83
- name,
84
- size,
85
- type,
86
- lastModified,
87
- file
88
- });
89
- } })] }), isUploading && fileError == null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.FileUploadItemProgress, {
81
+ }), !disabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DeleteIconButton, {
82
+ id: require_get_id.getId(id, `remove-button-${name}-${lastModified}`),
83
+ onClick: (e) => {
84
+ e.stopPropagation();
85
+ e.preventDefault();
86
+ onDelete({
87
+ name,
88
+ size,
89
+ type,
90
+ lastModified,
91
+ file
92
+ });
93
+ }
94
+ })] }), isUploading && fileError == null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.FileUploadItemProgress, {
90
95
  variant: "linear",
91
96
  className: "h-1 w-full"
92
97
  })] })
@@ -4,6 +4,7 @@ import React from "react";
4
4
 
5
5
  //#region src/file-upload-root/FileUploadRootItem.d.ts
6
6
  interface FileUploadRootItemProps extends Partial<FileMetadata>, FileUploadCallbacks {
7
+ id?: string;
7
8
  file: File;
8
9
  disabled?: boolean;
9
10
  onDelete: (file: FileWithMetadata) => void;
@@ -5,6 +5,7 @@ import React from "react";
5
5
 
6
6
  //#region src/file-upload-root/FileUploadRootItem.d.ts
7
7
  interface FileUploadRootItemProps extends Partial<FileMetadata>, FileUploadCallbacks {
8
+ id?: string;
8
9
  file: File;
9
10
  disabled?: boolean;
10
11
  onDelete: (file: FileWithMetadata) => void;
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
 
3
3
 
4
+ import { getId } from "../utils/get-id.js";
4
5
  import { useFileError } from "../file-upload/hooks/use-file-error.js";
5
6
  import { useFileUploadProgressCallbacks } from "../file-upload/hooks/use-file-upload-progress-callbacks.js";
6
7
  import "../file-upload/hooks/index.js";
@@ -27,8 +28,9 @@ const FileMetaDataDisplay = ({ size, name, children }) => {
27
28
  ]
28
29
  });
29
30
  };
30
- const DeleteIconButton = ({ onClick }) => {
31
+ const DeleteIconButton = ({ id, onClick }) => {
31
32
  return /* @__PURE__ */ jsx(Button, {
33
+ id,
32
34
  variant: "ghost",
33
35
  size: "icon",
34
36
  className: "size-7 shrink-0",
@@ -49,7 +51,7 @@ const FileItemInnerWrapper = ({ children }) => {
49
51
  children
50
52
  });
51
53
  };
52
- const FileUploadRootItem = React.memo(({ file, name = "", size = 0, type = "", lastModified = 0, disabled = false, onDelete, onFileError, onFileSuccess }) => {
54
+ const FileUploadRootItem = React.memo(({ file, name = "", size = 0, type = "", lastModified = 0, disabled = false, onDelete, onFileError, onFileSuccess, id }) => {
53
55
  useFileUploadProgressCallbacks(file, {
54
56
  onFileSuccess,
55
57
  onFileError
@@ -70,17 +72,20 @@ const FileUploadRootItem = React.memo(({ file, name = "", size = 0, type = "", l
70
72
  className: "text-destructive text-xs",
71
73
  children: fileError
72
74
  })
73
- }), !disabled && /* @__PURE__ */ jsx(DeleteIconButton, { onClick: (e) => {
74
- e.stopPropagation();
75
- e.preventDefault();
76
- onDelete({
77
- name,
78
- size,
79
- type,
80
- lastModified,
81
- file
82
- });
83
- } })] }), isUploading && fileError == null && /* @__PURE__ */ jsx(FileUploadItemProgress, {
75
+ }), !disabled && /* @__PURE__ */ jsx(DeleteIconButton, {
76
+ id: getId(id, `remove-button-${name}-${lastModified}`),
77
+ onClick: (e) => {
78
+ e.stopPropagation();
79
+ e.preventDefault();
80
+ onDelete({
81
+ name,
82
+ size,
83
+ type,
84
+ lastModified,
85
+ file
86
+ });
87
+ }
88
+ })] }), isUploading && fileError == null && /* @__PURE__ */ jsx(FileUploadItemProgress, {
84
89
  variant: "linear",
85
90
  className: "h-1 w-full"
86
91
  })] })
@@ -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_Button = require('../Button.cjs');
3
4
  const require_use_media_query = require('../hooks/use-media-query.cjs');
4
5
  require('../hooks/index.cjs');
@@ -18,7 +19,7 @@ __iconify_react = require_rolldown_runtime.__toESM(__iconify_react);
18
19
 
19
20
  //#region src/icon-selector/IconPicker.tsx
20
21
  const ICON_SIZE = "!h-4 !w-4";
21
- const IconPicker = ({ value, onChange, onOpenChange, pickerMode = "dialog", popoverProps, variant = "default", providers: providersProp, showValueText = true, emptyText = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Plus, { className: ICON_SIZE }), showClearButton = true, slots }) => {
22
+ const IconPicker = ({ id, value, onChange, onOpenChange, pickerMode = "dialog", popoverProps, variant = "default", providers: providersProp, showValueText = true, emptyText = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Plus, { className: ICON_SIZE }), showClearButton = true, slots }) => {
22
23
  const [isOpen, setIsOpen] = (0, react.useState)(false);
23
24
  const isMobile = require_use_media_query.useMediaQuery({ maxWidth: 768 });
24
25
  const handleSelectIcon = (0, react.useCallback)((iconName) => {
@@ -46,6 +47,7 @@ const IconPicker = ({ value, onChange, onOpenChange, pickerMode = "dialog", popo
46
47
  };
47
48
  const displayIcon = renderIconDisplay("text-sm");
48
49
  const selectorContent = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icon_picker_content.default, {
50
+ id,
49
51
  providers: providersProp,
50
52
  onChange: handleSelectIcon,
51
53
  onSelect: () => setIsOpen(false)
@@ -66,11 +68,13 @@ const IconPicker = ({ value, onChange, onOpenChange, pickerMode = "dialog", popo
66
68
  selectorContent,
67
69
  popover: popoverProps,
68
70
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Button.Button, {
71
+ id,
69
72
  type: "button",
70
73
  variant: "outline",
71
74
  "aria-label": iconButtonLabel,
72
75
  className: (0, __pixpilot_shadcn.cn)("p-2 min-w-10", slots?.preview?.className),
73
76
  children: [iconButtonContent, shouldShowClearButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Button.Button, {
77
+ id: require_get_id.getId(id, "clear-button"),
74
78
  type: "button",
75
79
  title: "Clear selected icon",
76
80
  className: (0, __pixpilot_shadcn.cn)(`absolute -right-1 -top-1 inline-flex ${ICON_SIZE} items-center justify-center rounded-full !p-1`, "border border-border bg-background text-foreground", "hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", slots?.clearIcon?.className),
@@ -101,6 +105,7 @@ const IconPicker = ({ value, onChange, onOpenChange, pickerMode = "dialog", popo
101
105
  selectorContent,
102
106
  popover: popoverProps,
103
107
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Button.Button, {
108
+ id,
104
109
  type: "button",
105
110
  variant: "outline",
106
111
  className: (0, __pixpilot_shadcn.cn)("whitespace-nowrap", slots?.trigger?.className),
@@ -108,6 +113,7 @@ const IconPicker = ({ value, onChange, onOpenChange, pickerMode = "dialog", popo
108
113
  })
109
114
  }),
110
115
  shouldShowClearButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Button.Button, {
116
+ id: require_get_id.getId(id, "clear-button"),
111
117
  type: "button",
112
118
  variant: "outline",
113
119
  className: (0, __pixpilot_shadcn.cn)("whitespace-nowrap", slots?.clearButton?.className),
@@ -15,6 +15,7 @@ type IconPickerVariant = 'default' | 'icon-button';
15
15
  * Allows users to select an icon from multiple icon providers via a dialog or popover
16
16
  */
17
17
  interface IconPickerProps {
18
+ id?: string;
18
19
  value?: string;
19
20
  onChange?: (value: string) => void;
20
21
  onOpenChange?: (open: boolean) => void;
@@ -15,6 +15,7 @@ type IconPickerVariant = 'default' | 'icon-button';
15
15
  * Allows users to select an icon from multiple icon providers via a dialog or popover
16
16
  */
17
17
  interface IconPickerProps {
18
+ id?: string;
18
19
  value?: string;
19
20
  onChange?: (value: string) => void;
20
21
  onOpenChange?: (open: boolean) => void;
@@ -1,3 +1,4 @@
1
+ import { getId } from "../utils/get-id.js";
1
2
  import { Button as Button$1 } from "../Button.js";
2
3
  import { useMediaQuery } from "../hooks/use-media-query.js";
3
4
  import "../hooks/index.js";
@@ -12,7 +13,7 @@ import { Icon } from "@iconify/react";
12
13
 
13
14
  //#region src/icon-selector/IconPicker.tsx
14
15
  const ICON_SIZE = "!h-4 !w-4";
15
- const IconPicker = ({ value, onChange, onOpenChange, pickerMode = "dialog", popoverProps, variant = "default", providers: providersProp, showValueText = true, emptyText = /* @__PURE__ */ jsx(Plus, { className: ICON_SIZE }), showClearButton = true, slots }) => {
16
+ const IconPicker = ({ id, value, onChange, onOpenChange, pickerMode = "dialog", popoverProps, variant = "default", providers: providersProp, showValueText = true, emptyText = /* @__PURE__ */ jsx(Plus, { className: ICON_SIZE }), showClearButton = true, slots }) => {
16
17
  const [isOpen, setIsOpen] = useState(false);
17
18
  const isMobile = useMediaQuery({ maxWidth: 768 });
18
19
  const handleSelectIcon = useCallback((iconName) => {
@@ -40,6 +41,7 @@ const IconPicker = ({ value, onChange, onOpenChange, pickerMode = "dialog", popo
40
41
  };
41
42
  const displayIcon = renderIconDisplay("text-sm");
42
43
  const selectorContent = /* @__PURE__ */ jsx(icon_picker_content_default, {
44
+ id,
43
45
  providers: providersProp,
44
46
  onChange: handleSelectIcon,
45
47
  onSelect: () => setIsOpen(false)
@@ -59,11 +61,13 @@ const IconPicker = ({ value, onChange, onOpenChange, pickerMode = "dialog", popo
59
61
  selectorContent,
60
62
  popover: popoverProps,
61
63
  children: /* @__PURE__ */ jsxs(Button$1, {
64
+ id,
62
65
  type: "button",
63
66
  variant: "outline",
64
67
  "aria-label": iconButtonLabel,
65
68
  className: cn("p-2 min-w-10", slots?.preview?.className),
66
69
  children: [iconButtonContent, shouldShowClearButton && /* @__PURE__ */ jsx(Button$1, {
70
+ id: getId(id, "clear-button"),
67
71
  type: "button",
68
72
  title: "Clear selected icon",
69
73
  className: cn(`absolute -right-1 -top-1 inline-flex ${ICON_SIZE} items-center justify-center rounded-full !p-1`, "border border-border bg-background text-foreground", "hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", slots?.clearIcon?.className),
@@ -94,6 +98,7 @@ const IconPicker = ({ value, onChange, onOpenChange, pickerMode = "dialog", popo
94
98
  selectorContent,
95
99
  popover: popoverProps,
96
100
  children: /* @__PURE__ */ jsx(Button$1, {
101
+ id,
97
102
  type: "button",
98
103
  variant: "outline",
99
104
  className: cn("whitespace-nowrap", slots?.trigger?.className),
@@ -101,6 +106,7 @@ const IconPicker = ({ value, onChange, onOpenChange, pickerMode = "dialog", popo
101
106
  })
102
107
  }),
103
108
  shouldShowClearButton && /* @__PURE__ */ jsx(Button$1, {
109
+ id: getId(id, "clear-button"),
104
110
  type: "button",
105
111
  variant: "outline",
106
112
  className: cn("whitespace-nowrap", slots?.clearButton?.className),
@@ -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_runtime20 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_runtime20.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,6 +1,6 @@
1
1
  import { InputProps } from "@pixpilot/shadcn";
2
2
  import * as React$1 from "react";
3
- import * as react_jsx_runtime16 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime14 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/input/Input.d.ts
6
6
  type InputProps$1 = InputProps & {
@@ -10,6 +10,6 @@ type InputProps$1 = InputProps & {
10
10
  prefixClassName?: string;
11
11
  suffixClassName?: string;
12
12
  };
13
- declare function Input$1(props: InputProps$1): react_jsx_runtime16.JSX.Element;
13
+ declare function Input$1(props: InputProps$1): react_jsx_runtime14.JSX.Element;
14
14
  //#endregion
15
15
  export { Input$1 as 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
  */