@pixpilot/shadcn-ui 0.4.0 → 0.4.1

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 (320) hide show
  1. package/dist/AbsoluteFill.cjs +24 -1
  2. package/dist/AbsoluteFill.d.ts +2 -2
  3. package/dist/AbsoluteFill.js +21 -1
  4. package/dist/Alert.cjs +81 -1
  5. package/dist/Alert.js +77 -1
  6. package/dist/Button.cjs +84 -1
  7. package/dist/Button.d.ts +1 -1
  8. package/dist/Button.js +79 -1
  9. package/dist/CloseButtonAbsolute.cjs +20 -1
  10. package/dist/CloseButtonAbsolute.js +16 -1
  11. package/dist/CloseButtonRounded.cjs +22 -1
  12. package/dist/CloseButtonRounded.js +17 -1
  13. package/dist/Combobox.cjs +53 -1
  14. package/dist/Combobox.js +48 -1
  15. package/dist/CommandOptionList.cjs +29 -1
  16. package/dist/CommandOptionList.js +25 -1
  17. package/dist/ContentCard.cjs +27 -1
  18. package/dist/ContentCard.js +23 -1
  19. package/dist/DatePicker.cjs +38 -1
  20. package/dist/DatePicker.d.ts +2 -2
  21. package/dist/DatePicker.js +33 -1
  22. package/dist/LoadingOverlay.cjs +65 -1
  23. package/dist/LoadingOverlay.js +60 -1
  24. package/dist/Select.cjs +27 -1
  25. package/dist/Select.js +23 -1
  26. package/dist/Slider.cjs +19 -1
  27. package/dist/Slider.js +15 -1
  28. package/dist/ThemeToggle.cjs +98 -1
  29. package/dist/ThemeToggle.js +94 -1
  30. package/dist/_virtual/rolldown_runtime.cjs +44 -1
  31. package/dist/_virtual/rolldown_runtime.js +43 -1
  32. package/dist/confirmation-dialog/ConfirmationDialog.cjs +47 -1
  33. package/dist/confirmation-dialog/ConfirmationDialog.d.cts +1 -0
  34. package/dist/confirmation-dialog/ConfirmationDialog.js +43 -1
  35. package/dist/confirmation-dialog/DialogProvider.cjs +16 -1
  36. package/dist/confirmation-dialog/DialogProvider.js +12 -1
  37. package/dist/confirmation-dialog/confirmation-dialogs.cjs +14 -1
  38. package/dist/confirmation-dialog/confirmation-dialogs.js +12 -1
  39. package/dist/confirmation-dialog/index.cjs +7 -1
  40. package/dist/confirmation-dialog/index.js +6 -1
  41. package/dist/file-upload/FileUpload.cjs +68 -1
  42. package/dist/file-upload/FileUpload.js +63 -1
  43. package/dist/file-upload/FileUploadItems.cjs +36 -1
  44. package/dist/file-upload/FileUploadItems.js +32 -1
  45. package/dist/file-upload/FileUploadListItem.cjs +89 -1
  46. package/dist/file-upload/FileUploadListItem.js +83 -1
  47. package/dist/file-upload/hooks/index.cjs +4 -1
  48. package/dist/file-upload/hooks/index.d.cts +2 -0
  49. package/dist/file-upload/hooks/index.js +3 -1
  50. package/dist/file-upload/hooks/use-file-error.cjs +15 -1
  51. package/dist/file-upload/hooks/use-file-error.js +14 -1
  52. package/dist/file-upload/hooks/use-file-upload-progress-callbacks.cjs +34 -1
  53. package/dist/file-upload/hooks/use-file-upload-progress-callbacks.d.cts +1 -0
  54. package/dist/file-upload/hooks/use-file-upload-progress-callbacks.js +32 -1
  55. package/dist/file-upload/hooks/use-file-upload-store.cjs +77 -1
  56. package/dist/file-upload/hooks/use-file-upload-store.d.cts +2 -0
  57. package/dist/file-upload/hooks/use-file-upload-store.js +75 -1
  58. package/dist/file-upload/index.cjs +6 -1
  59. package/dist/file-upload/index.d.cts +2 -1
  60. package/dist/file-upload/index.js +5 -1
  61. package/dist/file-upload/utils/create-placeholder-file.cjs +12 -1
  62. package/dist/file-upload/utils/create-placeholder-file.js +10 -1
  63. package/dist/file-upload/utils/get-file-key.cjs +9 -1
  64. package/dist/file-upload/utils/get-file-key.d.cts +1 -0
  65. package/dist/file-upload/utils/get-file-key.js +7 -1
  66. package/dist/file-upload/utils/get-file-meta.cjs +24 -1
  67. package/dist/file-upload/utils/get-file-meta.d.cts +1 -0
  68. package/dist/file-upload/utils/get-file-meta.js +21 -1
  69. package/dist/file-upload/utils/index.d.cts +4 -0
  70. package/dist/file-upload/utils/is-file-equal.cjs +10 -1
  71. package/dist/file-upload/utils/is-file-equal.d.cts +1 -0
  72. package/dist/file-upload/utils/is-file-equal.js +8 -1
  73. package/dist/file-upload/utils/merge-file-metadata.cjs +27 -1
  74. package/dist/file-upload/utils/merge-file-metadata.d.cts +1 -0
  75. package/dist/file-upload/utils/merge-file-metadata.js +26 -1
  76. package/dist/file-upload-inline/FileUploadInline.cjs +71 -1
  77. package/dist/file-upload-inline/FileUploadInline.js +66 -1
  78. package/dist/file-upload-inline/FileUploadInlineItem.cjs +96 -1
  79. package/dist/file-upload-inline/FileUploadInlineItem.js +90 -1
  80. package/dist/file-upload-inline/defaults.cjs +12 -1
  81. package/dist/file-upload-inline/defaults.js +10 -1
  82. package/dist/file-upload-inline/index.cjs +2 -1
  83. package/dist/file-upload-inline/index.js +1 -1
  84. package/dist/file-upload-inline/utils.cjs +37 -1
  85. package/dist/file-upload-inline/utils.js +34 -1
  86. package/dist/hooks/index.cjs +2 -1
  87. package/dist/hooks/index.js +1 -1
  88. package/dist/hooks/use-media-query.cjs +9 -1
  89. package/dist/hooks/use-media-query.js +7 -1
  90. package/dist/icon-selector/IconPicker.cjs +93 -1
  91. package/dist/icon-selector/IconPicker.js +88 -1
  92. package/dist/icon-selector/constants.cjs +7 -1
  93. package/dist/icon-selector/constants.js +5 -0
  94. package/dist/icon-selector/icon-picker-container.cjs +35 -1
  95. package/dist/icon-selector/icon-picker-container.js +32 -1
  96. package/dist/icon-selector/icon-picker-content.cjs +146 -1
  97. package/dist/icon-selector/icon-picker-content.js +141 -1
  98. package/dist/icon-selector/index.cjs +2 -1
  99. package/dist/icon-selector/index.js +1 -1
  100. package/dist/icon-selector/use-async-providers.cjs +69 -1
  101. package/dist/icon-selector/use-async-providers.js +67 -1
  102. package/dist/icon-selector/utils/is-valid-provider.cjs +12 -1
  103. package/dist/icon-selector/utils/is-valid-provider.js +10 -1
  104. package/dist/icon-selector/virtualized-icon-grid.cjs +137 -1
  105. package/dist/icon-selector/virtualized-icon-grid.js +132 -1
  106. package/dist/index.cjs +76 -1
  107. package/dist/index.js +37 -1
  108. package/dist/node_modules/.pnpm/@diceui_shared@0.12.0_@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@1_2c51ffe880f01dd537d5b6a13313daf4/node_modules/@diceui/shared/dist/index.cjs +558 -1
  109. package/dist/node_modules/.pnpm/@diceui_shared@0.12.0_@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@1_2c51ffe880f01dd537d5b6a13313daf4/node_modules/@diceui/shared/dist/index.js +555 -1
  110. package/dist/node_modules/.pnpm/@diceui_tags-input@0.7.2_@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__reac_e193dc2ff0d426ed009417f8d89778fd/node_modules/@diceui/tags-input/dist/index.cjs +566 -1
  111. package/dist/node_modules/.pnpm/@diceui_tags-input@0.7.2_@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__reac_e193dc2ff0d426ed009417f8d89778fd/node_modules/@diceui/tags-input/dist/index.js +565 -1
  112. package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +695 -1
  113. package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +679 -1
  114. package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +521 -1
  115. package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +503 -1
  116. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +282 -1
  117. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +266 -1
  118. package/dist/node_modules/.pnpm/@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.esm.cjs +3767 -1
  119. package/dist/node_modules/.pnpm/@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.esm.js +3747 -1
  120. package/dist/node_modules/.pnpm/@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.utils.cjs +426 -1
  121. package/dist/node_modules/.pnpm/@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js +379 -1
  122. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +165 -1
  123. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +175 -1
  124. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +151 -1
  125. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +138 -1
  126. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.cjs +13 -0
  127. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.js +11 -0
  128. package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +33 -0
  129. package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.js +30 -0
  130. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.cjs +92 -0
  131. package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.js +88 -0
  132. package/dist/node_modules/.pnpm/@radix-ui_react-dialog@1.1.15_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react_4f1d9653b0e2175502748f45fd432185/node_modules/@radix-ui/react-dialog/dist/index.cjs +310 -0
  133. package/dist/node_modules/.pnpm/@radix-ui_react-dialog@1.1.15_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react_4f1d9653b0e2175502748f45fd432185/node_modules/@radix-ui/react-dialog/dist/index.js +299 -0
  134. package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@_9ee1db7daf927866cf505b31d40047ad/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +190 -0
  135. package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@_9ee1db7daf927866cf505b31d40047ad/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +187 -0
  136. package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +34 -0
  137. package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.js +32 -0
  138. package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_r_0a31b7f987af9482d13505312e1a1be9/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +203 -0
  139. package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_r_0a31b7f987af9482d13505312e1a1be9/node_modules/@radix-ui/react-focus-scope/dist/index.js +200 -0
  140. package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-id/dist/index.cjs +18 -0
  141. package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-id/dist/index.js +16 -0
  142. package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.9_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_1bb4e0f97f86496802d28a2e74e2a8b9/node_modules/@radix-ui/react-portal/dist/index.cjs +29 -0
  143. package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.9_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_1bb4e0f97f86496802d28a2e74e2a8b9/node_modules/@radix-ui/react-portal/dist/index.js +25 -0
  144. package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.5_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_90f8e5c12233caef3399d5fd66452a13/node_modules/@radix-ui/react-presence/dist/index.cjs +110 -0
  145. package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.5_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_90f8e5c12233caef3399d5fd66452a13/node_modules/@radix-ui/react-presence/dist/index.js +108 -0
  146. package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_a92a69cb1cb39305138539e4fa72f596/node_modules/@radix-ui/react-primitive/dist/index.cjs +52 -0
  147. package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_a92a69cb1cb39305138539e4fa72f596/node_modules/@radix-ui/react-primitive/dist/index.js +47 -0
  148. package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.3_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-slot/dist/index.cjs +92 -0
  149. package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.3_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-slot/dist/index.js +89 -0
  150. package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.4_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-slot/dist/index.cjs +103 -0
  151. package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.4_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-slot/dist/index.js +100 -0
  152. package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +15 -0
  153. package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +13 -0
  154. package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +64 -0
  155. package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +62 -0
  156. package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs +19 -0
  157. package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +17 -0
  158. package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +9 -0
  159. package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +7 -0
  160. package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +108 -0
  161. package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es5/index.cjs +155 -0
  162. package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs +19 -0
  163. package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -0
  164. package/dist/node_modules/.pnpm/detect-node-es@1.1.0/node_modules/detect-node-es/es5/node.cjs +14 -0
  165. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +9 -0
  166. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es5/index.cjs +22 -0
  167. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/component.js +46 -0
  168. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +12 -0
  169. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/index.js +3 -0
  170. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +37 -0
  171. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es5/component.cjs +61 -0
  172. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es5/constants.cjs +23 -0
  173. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es5/index.cjs +57 -0
  174. package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es5/utils.cjs +49 -0
  175. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.js +17 -0
  176. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +163 -0
  177. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/UI.js +64 -0
  178. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +16 -0
  179. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +85 -0
  180. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/medium.js +7 -0
  181. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js +9 -0
  182. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es5/Combination.cjs +29 -0
  183. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es5/SideEffect.cjs +179 -0
  184. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es5/UI.cjs +79 -0
  185. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es5/aggresiveCapture.cjs +27 -0
  186. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es5/handleScroll.cjs +98 -0
  187. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es5/index.cjs +19 -0
  188. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es5/medium.cjs +18 -0
  189. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es5/sidecar.cjs +21 -0
  190. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0/node_modules/react-style-singleton/dist/es2015/component.js +21 -0
  191. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0/node_modules/react-style-singleton/dist/es2015/hook.js +27 -0
  192. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0/node_modules/react-style-singleton/dist/es2015/index.js +3 -0
  193. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0/node_modules/react-style-singleton/dist/es2015/singleton.js +43 -0
  194. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0/node_modules/react-style-singleton/dist/es5/component.cjs +33 -0
  195. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0/node_modules/react-style-singleton/dist/es5/hook.cjs +40 -0
  196. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0/node_modules/react-style-singleton/dist/es5/index.cjs +39 -0
  197. package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0/node_modules/react-style-singleton/dist/es5/singleton.cjs +55 -0
  198. package/dist/node_modules/.pnpm/tabbable@6.3.0/node_modules/tabbable/dist/index.cjs +347 -1
  199. package/dist/node_modules/.pnpm/tabbable@6.3.0/node_modules/tabbable/dist/index.esm.js +268 -1
  200. package/dist/node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.cjs +1895 -0
  201. package/dist/node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.js +1893 -0
  202. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.cjs +557 -0
  203. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +31 -0
  204. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es2015/assignRef.js +22 -0
  205. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +47 -0
  206. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es2015/useRef.js +42 -0
  207. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es5/assignRef.cjs +34 -0
  208. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es5/createRef.cjs +39 -0
  209. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es5/index.cjs +85 -0
  210. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es5/mergeRef.cjs +40 -0
  211. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es5/refToCallback.cjs +59 -0
  212. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es5/transformRef.cjs +34 -0
  213. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es5/useMergeRef.cjs +61 -0
  214. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es5/useRef.cjs +53 -0
  215. package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es5/useTransformRef.cjs +38 -0
  216. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es2015/exports.js +19 -0
  217. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es2015/medium.js +84 -0
  218. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es5/config.cjs +22 -0
  219. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es5/env.cjs +21 -0
  220. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es5/exports.cjs +31 -0
  221. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es5/hoc.cjs +31 -0
  222. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es5/hook.cjs +60 -0
  223. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es5/index.cjs +69 -0
  224. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es5/medium.cjs +101 -0
  225. package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es5/renderProp.cjs +58 -0
  226. package/dist/packages/shadcn/src/components/index.cjs +6 -1
  227. package/dist/packages/shadcn/src/components/index.js +5 -1
  228. package/dist/packages/shadcn/src/components/ui/OrContinueWithSeparator.cjs +6 -1
  229. package/dist/packages/shadcn/src/components/ui/OrContinueWithSeparator.js +3 -1
  230. package/dist/packages/shadcn/src/components/ui/alert-dialog.cjs +10 -1
  231. package/dist/packages/shadcn/src/components/ui/alert-dialog.js +6 -1
  232. package/dist/packages/shadcn/src/components/ui/alert.cjs +44 -1
  233. package/dist/packages/shadcn/src/components/ui/alert.js +38 -1
  234. package/dist/packages/shadcn/src/components/ui/avatar.cjs +5 -1
  235. package/dist/packages/shadcn/src/components/ui/avatar.js +2 -1
  236. package/dist/packages/shadcn/src/components/ui/badge.cjs +20 -1
  237. package/dist/packages/shadcn/src/components/ui/badge.js +16 -1
  238. package/dist/packages/shadcn/src/components/ui/button.cjs +50 -1
  239. package/dist/packages/shadcn/src/components/ui/button.js +45 -1
  240. package/dist/packages/shadcn/src/components/ui/calendar.cjs +8 -1
  241. package/dist/packages/shadcn/src/components/ui/calendar.js +4 -1
  242. package/dist/packages/shadcn/src/components/ui/card.cjs +5 -1
  243. package/dist/packages/shadcn/src/components/ui/card.js +2 -1
  244. package/dist/packages/shadcn/src/components/ui/checkbox.cjs +10 -1
  245. package/dist/packages/shadcn/src/components/ui/checkbox.js +6 -1
  246. package/dist/packages/shadcn/src/components/ui/command.cjs +11 -1
  247. package/dist/packages/shadcn/src/components/ui/command.js +7 -1
  248. package/dist/packages/shadcn/src/components/ui/dialog.cjs +93 -1
  249. package/dist/packages/shadcn/src/components/ui/dialog.js +81 -1
  250. package/dist/packages/shadcn/src/components/ui/dropdown-menu.cjs +7 -1
  251. package/dist/packages/shadcn/src/components/ui/dropdown-menu.js +3 -1
  252. package/dist/packages/shadcn/src/components/ui/file-upload.cjs +49 -1
  253. package/dist/packages/shadcn/src/components/ui/file-upload.js +45 -1
  254. package/dist/packages/shadcn/src/components/ui/form.cjs +12 -1
  255. package/dist/packages/shadcn/src/components/ui/form.js +9 -1
  256. package/dist/packages/shadcn/src/components/ui/index.cjs +30 -1
  257. package/dist/packages/shadcn/src/components/ui/index.js +29 -1
  258. package/dist/packages/shadcn/src/components/ui/input.cjs +5 -1
  259. package/dist/packages/shadcn/src/components/ui/input.js +2 -1
  260. package/dist/packages/shadcn/src/components/ui/label.cjs +5 -1
  261. package/dist/packages/shadcn/src/components/ui/label.js +2 -1
  262. package/dist/packages/shadcn/src/components/ui/pagination.cjs +9 -1
  263. package/dist/packages/shadcn/src/components/ui/pagination.js +4 -1
  264. package/dist/packages/shadcn/src/components/ui/popover.cjs +5 -1
  265. package/dist/packages/shadcn/src/components/ui/popover.js +2 -1
  266. package/dist/packages/shadcn/src/components/ui/radio-group.cjs +7 -1
  267. package/dist/packages/shadcn/src/components/ui/radio-group.js +3 -1
  268. package/dist/packages/shadcn/src/components/ui/select.cjs +10 -1
  269. package/dist/packages/shadcn/src/components/ui/select.js +6 -1
  270. package/dist/packages/shadcn/src/components/ui/separator.cjs +5 -1
  271. package/dist/packages/shadcn/src/components/ui/separator.js +2 -1
  272. package/dist/packages/shadcn/src/components/ui/shadcn-io/tags/index.cjs +26 -1
  273. package/dist/packages/shadcn/src/components/ui/shadcn-io/tags/index.js +22 -1
  274. package/dist/packages/shadcn/src/components/ui/shadcn-io/tags-input-inline/index.cjs +6 -1
  275. package/dist/packages/shadcn/src/components/ui/shadcn-io/tags-input-inline/index.js +3 -1
  276. package/dist/packages/shadcn/src/components/ui/sheet.cjs +7 -1
  277. package/dist/packages/shadcn/src/components/ui/sheet.js +3 -1
  278. package/dist/packages/shadcn/src/components/ui/slider.cjs +5 -1
  279. package/dist/packages/shadcn/src/components/ui/slider.js +2 -1
  280. package/dist/packages/shadcn/src/components/ui/switch.cjs +8 -1
  281. package/dist/packages/shadcn/src/components/ui/switch.js +5 -1
  282. package/dist/packages/shadcn/src/components/ui/tabs.cjs +5 -1
  283. package/dist/packages/shadcn/src/components/ui/tabs.js +2 -1
  284. package/dist/packages/shadcn/src/components/ui/textarea.cjs +5 -1
  285. package/dist/packages/shadcn/src/components/ui/textarea.js +2 -1
  286. package/dist/packages/shadcn/src/components/ui/tooltip.cjs +5 -1
  287. package/dist/packages/shadcn/src/components/ui/tooltip.js +2 -1
  288. package/dist/packages/shadcn/src/lib/utils.cjs +11 -1
  289. package/dist/packages/shadcn/src/lib/utils.js +10 -1
  290. package/dist/pagination/Pagination.cjs +156 -1
  291. package/dist/pagination/Pagination.js +151 -1
  292. package/dist/pagination/index.cjs +2 -1
  293. package/dist/pagination/index.js +1 -1
  294. package/dist/rich-text-editor/RichTextEditor.cjs +132 -1
  295. package/dist/rich-text-editor/RichTextEditor.js +126 -1
  296. package/dist/rich-text-editor/index.cjs +2 -1
  297. package/dist/rich-text-editor/index.js +1 -1
  298. package/dist/rich-text-editor/predefined-toolbar-options.cjs +84 -1
  299. package/dist/rich-text-editor/predefined-toolbar-options.js +81 -1
  300. package/dist/spinner/index.cjs +2 -1
  301. package/dist/spinner/index.js +1 -1
  302. package/dist/spinner/spinner.cjs +73 -6
  303. package/dist/spinner/spinner.js +70 -6
  304. package/dist/spinner/styles.cjs +25 -12
  305. package/dist/spinner/styles.js +23 -12
  306. package/dist/tags-input.cjs +226 -1
  307. package/dist/tags-input.js +222 -1
  308. package/dist/theme-provider/ThemeProvider.cjs +27 -1
  309. package/dist/theme-provider/ThemeProvider.js +23 -1
  310. package/dist/theme-provider/index.cjs +4 -1
  311. package/dist/theme-provider/index.js +4 -1
  312. package/dist/toast/AlertToast.cjs +36 -1
  313. package/dist/toast/AlertToast.js +31 -1
  314. package/dist/toast/index.cjs +2 -1
  315. package/dist/toast/index.js +1 -1
  316. package/dist/toast/toast.cjs +75 -1
  317. package/dist/toast/toast.js +66 -1
  318. package/package.json +3 -3
  319. package/dist/packages/shadcn/src/lib/index.cjs +0 -1
  320. package/dist/packages/shadcn/src/lib/index.js +0 -1
@@ -1 +1,137 @@
1
- "use client";const e=require(`../_virtual/rolldown_runtime.cjs`);let t=require(`react`);t=e.__toESM(t);let n=require(`react/jsx-runtime`);n=e.__toESM(n);let r=require(`@iconify/react`);r=e.__toESM(r);let i=require(`@tanstack/react-virtual`);i=e.__toESM(i);const a=80,o=80,s=480,c=3,l=t.default.memo(({iconName:e,onSelectIcon:t})=>{if(!e)return null;let i=e.split(`:`)[1]??e;return(0,n.jsxs)(`button`,{type:`button`,onClick:()=>t(e),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`,title:e,children:[(0,n.jsx)(r.Icon,{icon:e,width:`24`,height:`24`}),(0,n.jsx)(`span`,{className:`truncate text-xs text-muted-foreground max-w-full`,children:i})]})});l.displayName=`IconCell`;const u=({icons:e,onSelectIcon:r,maxHeight:a=480,columnCount:o,cellSize:s=80})=>{let c=(0,t.useRef)(null),u=(0,t.useRef)(null),[d,f]=(0,t.useState)(0),p=(0,t.useMemo)(()=>o!==void 0&&o>0?o:d===0?3:Math.max(3,Math.floor(d/s)),[d,s,o]);(0,t.useEffect)(()=>{let e=new ResizeObserver(e=>{for(let t of e)f(t.contentRect.width)});return u.current&&e.observe(u.current),()=>{e.disconnect()}},[]);let m=typeof a==`number`?a:480,h=(0,i.useVirtualizer)({count:(0,t.useMemo)(()=>Math.ceil(e.length/p),[e.length,p]),getScrollElement:()=>c.current,estimateSize:()=>80,overscan:10}),g=h.getVirtualItems(),_=h.getTotalSize(),v=(0,t.useCallback)(e=>{r(e)},[r]);return(0,n.jsx)(`div`,{ref:u,style:{height:m,width:`100%`,overflow:`hidden`,position:`relative`,display:`flex`,flexDirection:`column`},children:u.current&&(0,n.jsx)(`div`,{ref:c,style:{height:`100%`,width:`100%`,overflow:`auto`,flex:1},children:(0,n.jsx)(`div`,{style:{height:`${_}px`,width:`100%`,position:`relative`},children:g.map(t=>{let r=t.index*p,i=Math.min(r+p,e.length),a=e.slice(r,i);return(0,n.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`${t.size}px`,transform:`translateY(${t.start}px)`},children:(0,n.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(${p}, 1fr)`,height:`100%`,width:`100%`,gap:`0`},children:a.map(e=>(0,n.jsx)(`div`,{style:{minHeight:`100%`,minWidth:`0`},children:(0,n.jsx)(l,{iconName:e,onSelectIcon:v})},e))})},t.key)})})})})};var d=u;exports.default=d;
1
+ 'use client';
2
+
3
+
4
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
5
+ let react = require("react");
6
+ react = require_rolldown_runtime.__toESM(react);
7
+ let react_jsx_runtime = require("react/jsx-runtime");
8
+ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
9
+ let __iconify_react = require("@iconify/react");
10
+ __iconify_react = require_rolldown_runtime.__toESM(__iconify_react);
11
+ let __tanstack_react_virtual = require("@tanstack/react-virtual");
12
+ __tanstack_react_virtual = require_rolldown_runtime.__toESM(__tanstack_react_virtual);
13
+
14
+ //#region src/icon-selector/virtualized-icon-grid.tsx
15
+ const CELL_SIZE_DEFAULT = 80;
16
+ const ROW_HEIGHT = 80;
17
+ const DEFAULT_HEIGHT = 480;
18
+ const MIN_COLUMNS = 3;
19
+ const IconCell = react.default.memo(({ iconName, onSelectIcon }) => {
20
+ if (!iconName) return null;
21
+ const displayName = iconName.split(":")[1] ?? iconName;
22
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
23
+ type: "button",
24
+ onClick: () => onSelectIcon(iconName),
25
+ 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",
26
+ title: iconName,
27
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__iconify_react.Icon, {
28
+ icon: iconName,
29
+ width: "24",
30
+ height: "24"
31
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
32
+ className: "truncate text-xs text-muted-foreground max-w-full",
33
+ children: displayName
34
+ })]
35
+ });
36
+ });
37
+ IconCell.displayName = "IconCell";
38
+ const VirtualizedIconGrid = ({ icons, onSelectIcon, maxHeight = DEFAULT_HEIGHT, columnCount: providedColumnCount, cellSize = CELL_SIZE_DEFAULT }) => {
39
+ const scrollableRef = (0, react.useRef)(null);
40
+ const containerRef = (0, react.useRef)(null);
41
+ const [containerWidth, setContainerWidth] = (0, react.useState)(0);
42
+ const columnCount = (0, react.useMemo)(() => {
43
+ if (providedColumnCount !== void 0 && providedColumnCount > 0) return providedColumnCount;
44
+ if (containerWidth === 0) return MIN_COLUMNS;
45
+ return Math.max(MIN_COLUMNS, Math.floor(containerWidth / cellSize));
46
+ }, [
47
+ containerWidth,
48
+ cellSize,
49
+ providedColumnCount
50
+ ]);
51
+ (0, react.useEffect)(() => {
52
+ const resizeObserver = new ResizeObserver((entries) => {
53
+ for (const entry of entries) setContainerWidth(entry.contentRect.width);
54
+ });
55
+ if (containerRef.current) resizeObserver.observe(containerRef.current);
56
+ return () => {
57
+ resizeObserver.disconnect();
58
+ };
59
+ }, []);
60
+ const height = typeof maxHeight === "number" ? maxHeight : DEFAULT_HEIGHT;
61
+ const rowVirtualizer = (0, __tanstack_react_virtual.useVirtualizer)({
62
+ count: (0, react.useMemo)(() => Math.ceil(icons.length / columnCount), [icons.length, columnCount]),
63
+ getScrollElement: () => scrollableRef.current,
64
+ estimateSize: () => ROW_HEIGHT,
65
+ overscan: 10
66
+ });
67
+ const virtualRows = rowVirtualizer.getVirtualItems();
68
+ const totalSize = rowVirtualizer.getTotalSize();
69
+ const handleSelectIcon = (0, react.useCallback)((iconName) => {
70
+ onSelectIcon(iconName);
71
+ }, [onSelectIcon]);
72
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
73
+ ref: containerRef,
74
+ style: {
75
+ height,
76
+ width: "100%",
77
+ overflow: "hidden",
78
+ position: "relative",
79
+ display: "flex",
80
+ flexDirection: "column"
81
+ },
82
+ children: containerRef.current && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
83
+ ref: scrollableRef,
84
+ style: {
85
+ height: "100%",
86
+ width: "100%",
87
+ overflow: "auto",
88
+ flex: 1
89
+ },
90
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
91
+ style: {
92
+ height: `${totalSize}px`,
93
+ width: "100%",
94
+ position: "relative"
95
+ },
96
+ children: virtualRows.map((virtualRow) => {
97
+ const startIndex = virtualRow.index * columnCount;
98
+ const endIndex = Math.min(startIndex + columnCount, icons.length);
99
+ const rowIcons = icons.slice(startIndex, endIndex);
100
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
101
+ style: {
102
+ position: "absolute",
103
+ top: 0,
104
+ left: 0,
105
+ width: "100%",
106
+ height: `${virtualRow.size}px`,
107
+ transform: `translateY(${virtualRow.start}px)`
108
+ },
109
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
110
+ style: {
111
+ display: "grid",
112
+ gridTemplateColumns: `repeat(${columnCount}, 1fr)`,
113
+ height: "100%",
114
+ width: "100%",
115
+ gap: "0"
116
+ },
117
+ children: rowIcons.map((iconName) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
118
+ style: {
119
+ minHeight: "100%",
120
+ minWidth: "0"
121
+ },
122
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconCell, {
123
+ iconName,
124
+ onSelectIcon: handleSelectIcon
125
+ })
126
+ }, iconName))
127
+ })
128
+ }, virtualRow.key);
129
+ })
130
+ })
131
+ })
132
+ });
133
+ };
134
+ var virtualized_icon_grid_default = VirtualizedIconGrid;
135
+
136
+ //#endregion
137
+ exports.default = virtualized_icon_grid_default;
@@ -1 +1,132 @@
1
- "use client";import e,{useCallback as t,useEffect as n,useMemo as r,useRef as i,useState as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{Icon as c}from"@iconify/react";import{useVirtualizer as l}from"@tanstack/react-virtual";const u=e.memo(({iconName:e,onSelectIcon:t})=>{if(!e)return null;let n=e.split(`:`)[1]??e;return s(`button`,{type:`button`,onClick:()=>t(e),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`,title:e,children:[o(c,{icon:e,width:`24`,height:`24`}),o(`span`,{className:`truncate text-xs text-muted-foreground max-w-full`,children:n})]})});u.displayName=`IconCell`;var d=({icons:e,onSelectIcon:s,maxHeight:c=480,columnCount:d,cellSize:f=80})=>{let p=i(null),m=i(null),[h,g]=a(0),_=r(()=>d!==void 0&&d>0?d:h===0?3:Math.max(3,Math.floor(h/f)),[h,f,d]);n(()=>{let e=new ResizeObserver(e=>{for(let t of e)g(t.contentRect.width)});return m.current&&e.observe(m.current),()=>{e.disconnect()}},[]);let v=typeof c==`number`?c:480,y=l({count:r(()=>Math.ceil(e.length/_),[e.length,_]),getScrollElement:()=>p.current,estimateSize:()=>80,overscan:10}),b=y.getVirtualItems(),x=y.getTotalSize(),S=t(e=>{s(e)},[s]);return o(`div`,{ref:m,style:{height:v,width:`100%`,overflow:`hidden`,position:`relative`,display:`flex`,flexDirection:`column`},children:m.current&&o(`div`,{ref:p,style:{height:`100%`,width:`100%`,overflow:`auto`,flex:1},children:o(`div`,{style:{height:`${x}px`,width:`100%`,position:`relative`},children:b.map(t=>{let n=t.index*_,r=Math.min(n+_,e.length),i=e.slice(n,r);return o(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`${t.size}px`,transform:`translateY(${t.start}px)`},children:o(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(${_}, 1fr)`,height:`100%`,width:`100%`,gap:`0`},children:i.map(e=>o(`div`,{style:{minHeight:`100%`,minWidth:`0`},children:o(u,{iconName:e,onSelectIcon:S})},e))})},t.key)})})})})};export{d as default};
1
+ 'use client';
2
+
3
+
4
+ import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { Icon } from "@iconify/react";
7
+ import { useVirtualizer } from "@tanstack/react-virtual";
8
+
9
+ //#region src/icon-selector/virtualized-icon-grid.tsx
10
+ const CELL_SIZE_DEFAULT = 80;
11
+ const ROW_HEIGHT = 80;
12
+ const DEFAULT_HEIGHT = 480;
13
+ const MIN_COLUMNS = 3;
14
+ const IconCell = React.memo(({ iconName, onSelectIcon }) => {
15
+ if (!iconName) return null;
16
+ const displayName = iconName.split(":")[1] ?? iconName;
17
+ return /* @__PURE__ */ jsxs("button", {
18
+ type: "button",
19
+ onClick: () => onSelectIcon(iconName),
20
+ 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",
21
+ title: iconName,
22
+ children: [/* @__PURE__ */ jsx(Icon, {
23
+ icon: iconName,
24
+ width: "24",
25
+ height: "24"
26
+ }), /* @__PURE__ */ jsx("span", {
27
+ className: "truncate text-xs text-muted-foreground max-w-full",
28
+ children: displayName
29
+ })]
30
+ });
31
+ });
32
+ IconCell.displayName = "IconCell";
33
+ const VirtualizedIconGrid = ({ icons, onSelectIcon, maxHeight = DEFAULT_HEIGHT, columnCount: providedColumnCount, cellSize = CELL_SIZE_DEFAULT }) => {
34
+ const scrollableRef = useRef(null);
35
+ const containerRef = useRef(null);
36
+ const [containerWidth, setContainerWidth] = useState(0);
37
+ const columnCount = useMemo(() => {
38
+ if (providedColumnCount !== void 0 && providedColumnCount > 0) return providedColumnCount;
39
+ if (containerWidth === 0) return MIN_COLUMNS;
40
+ return Math.max(MIN_COLUMNS, Math.floor(containerWidth / cellSize));
41
+ }, [
42
+ containerWidth,
43
+ cellSize,
44
+ providedColumnCount
45
+ ]);
46
+ useEffect(() => {
47
+ const resizeObserver = new ResizeObserver((entries) => {
48
+ for (const entry of entries) setContainerWidth(entry.contentRect.width);
49
+ });
50
+ if (containerRef.current) resizeObserver.observe(containerRef.current);
51
+ return () => {
52
+ resizeObserver.disconnect();
53
+ };
54
+ }, []);
55
+ const height = typeof maxHeight === "number" ? maxHeight : DEFAULT_HEIGHT;
56
+ const rowVirtualizer = useVirtualizer({
57
+ count: useMemo(() => Math.ceil(icons.length / columnCount), [icons.length, columnCount]),
58
+ getScrollElement: () => scrollableRef.current,
59
+ estimateSize: () => ROW_HEIGHT,
60
+ overscan: 10
61
+ });
62
+ const virtualRows = rowVirtualizer.getVirtualItems();
63
+ const totalSize = rowVirtualizer.getTotalSize();
64
+ const handleSelectIcon = useCallback((iconName) => {
65
+ onSelectIcon(iconName);
66
+ }, [onSelectIcon]);
67
+ return /* @__PURE__ */ jsx("div", {
68
+ ref: containerRef,
69
+ style: {
70
+ height,
71
+ width: "100%",
72
+ overflow: "hidden",
73
+ position: "relative",
74
+ display: "flex",
75
+ flexDirection: "column"
76
+ },
77
+ children: containerRef.current && /* @__PURE__ */ jsx("div", {
78
+ ref: scrollableRef,
79
+ style: {
80
+ height: "100%",
81
+ width: "100%",
82
+ overflow: "auto",
83
+ flex: 1
84
+ },
85
+ children: /* @__PURE__ */ jsx("div", {
86
+ style: {
87
+ height: `${totalSize}px`,
88
+ width: "100%",
89
+ position: "relative"
90
+ },
91
+ children: virtualRows.map((virtualRow) => {
92
+ const startIndex = virtualRow.index * columnCount;
93
+ const endIndex = Math.min(startIndex + columnCount, icons.length);
94
+ const rowIcons = icons.slice(startIndex, endIndex);
95
+ return /* @__PURE__ */ jsx("div", {
96
+ style: {
97
+ position: "absolute",
98
+ top: 0,
99
+ left: 0,
100
+ width: "100%",
101
+ height: `${virtualRow.size}px`,
102
+ transform: `translateY(${virtualRow.start}px)`
103
+ },
104
+ children: /* @__PURE__ */ jsx("div", {
105
+ style: {
106
+ display: "grid",
107
+ gridTemplateColumns: `repeat(${columnCount}, 1fr)`,
108
+ height: "100%",
109
+ width: "100%",
110
+ gap: "0"
111
+ },
112
+ children: rowIcons.map((iconName) => /* @__PURE__ */ jsx("div", {
113
+ style: {
114
+ minHeight: "100%",
115
+ minWidth: "0"
116
+ },
117
+ children: /* @__PURE__ */ jsx(IconCell, {
118
+ iconName,
119
+ onSelectIcon: handleSelectIcon
120
+ })
121
+ }, iconName))
122
+ })
123
+ }, virtualRow.key);
124
+ })
125
+ })
126
+ })
127
+ });
128
+ };
129
+ var virtualized_icon_grid_default = VirtualizedIconGrid;
130
+
131
+ //#endregion
132
+ export { virtualized_icon_grid_default as default };
package/dist/index.cjs CHANGED
@@ -1 +1,76 @@
1
- const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./file-upload/FileUpload.cjs`);require(`./file-upload/index.cjs`);const n=require(`./AbsoluteFill.cjs`),r=require(`./Alert.cjs`),i=require(`./Button.cjs`),a=require(`./CloseButtonRounded.cjs`),o=require(`./CloseButtonAbsolute.cjs`),s=require(`./Combobox.cjs`),c=require(`./confirmation-dialog/confirmation-dialogs.cjs`),l=require(`./confirmation-dialog/DialogProvider.cjs`);require(`./confirmation-dialog/index.cjs`);const u=require(`./ContentCard.cjs`),d=require(`./DatePicker.cjs`),f=require(`./file-upload-inline/FileUploadInline.cjs`);require(`./file-upload-inline/index.cjs`);const p=require(`./hooks/use-media-query.cjs`);require(`./hooks/index.cjs`);const m=require(`./LoadingOverlay.cjs`),h=require(`./icon-selector/IconPicker.cjs`);require(`./icon-selector/index.cjs`);const g=require(`./pagination/Pagination.cjs`);require(`./pagination/index.cjs`);const _=require(`./rich-text-editor/RichTextEditor.cjs`);require(`./rich-text-editor/index.cjs`);const v=require(`./Select.cjs`),y=require(`./Slider.cjs`),b=require(`./spinner/spinner.cjs`);require(`./spinner/index.cjs`);const x=require(`./tags-input.cjs`),S=require(`./theme-provider/ThemeProvider.cjs`);require(`./theme-provider/index.cjs`);const C=require(`./ThemeToggle.cjs`),w=require(`./toast/toast.cjs`);require(`./toast/index.cjs`);let T=require(`@pixpilot/shadcn`);T=e.__toESM(T);let E=require(`next-themes`);E=e.__toESM(E),exports.AbsoluteFill=n.AbsoluteFill,exports.Alert=r.Alert,exports.Button=i.Button,exports.CloseButtonAbsolute=o.CloseButtonAbsolute,exports.CloseButtonRounded=a.CloseButtonRounded,exports.Combobox=s.Combobox,exports.ContentCard=u.ContentCard,exports.DEFAULT_ALERT_DURATION=w.DEFAULT_ALERT_DURATION,exports.DatePicker=d.DatePicker,exports.DialogProvider=l.DialogProvider,exports.FileUpload=t.FileUpload,exports.FileUploadInline=f.FileUploadInline,exports.IconPicker=h.IconPicker,exports.LoadingOverlay=m.LoadingOverlay,exports.Pagination=g.Pagination,exports.RichTextEditor=_.RichTextEditor,exports.Select=v.Select,exports.Slider=y.Slider,exports.Spinner=b.Spinner,exports.TagsInput=x.TagsInput,exports.ThemeProvider=S.ThemeProvider,exports.ThemeToggle=C.ThemeToggle,exports.cn=T.cn,exports.showConfirmDialog=c.showConfirmDialog,exports.toast=w.toast,exports.toastError=w.toastError,exports.toastInfo=w.toastInfo,exports.toastSuccess=w.toastSuccess,exports.toastWarning=w.toastWarning,exports.useMediaQuery=p.useMediaQuery,Object.defineProperty(exports,`useTheme`,{enumerable:!0,get:function(){return E.useTheme}});
1
+ const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
+ const require_FileUpload = require('./file-upload/FileUpload.cjs');
3
+ require('./file-upload/index.cjs');
4
+ const require_AbsoluteFill = require('./AbsoluteFill.cjs');
5
+ const require_Alert = require('./Alert.cjs');
6
+ const require_Button = require('./Button.cjs');
7
+ const require_CloseButtonRounded = require('./CloseButtonRounded.cjs');
8
+ const require_CloseButtonAbsolute = require('./CloseButtonAbsolute.cjs');
9
+ const require_Combobox = require('./Combobox.cjs');
10
+ const require_confirmation_dialogs = require('./confirmation-dialog/confirmation-dialogs.cjs');
11
+ const require_DialogProvider = require('./confirmation-dialog/DialogProvider.cjs');
12
+ require('./confirmation-dialog/index.cjs');
13
+ const require_ContentCard = require('./ContentCard.cjs');
14
+ const require_DatePicker = require('./DatePicker.cjs');
15
+ const require_FileUploadInline = require('./file-upload-inline/FileUploadInline.cjs');
16
+ require('./file-upload-inline/index.cjs');
17
+ const require_use_media_query = require('./hooks/use-media-query.cjs');
18
+ require('./hooks/index.cjs');
19
+ const require_LoadingOverlay = require('./LoadingOverlay.cjs');
20
+ const require_IconPicker = require('./icon-selector/IconPicker.cjs');
21
+ require('./icon-selector/index.cjs');
22
+ const require_Pagination = require('./pagination/Pagination.cjs');
23
+ require('./pagination/index.cjs');
24
+ const require_RichTextEditor = require('./rich-text-editor/RichTextEditor.cjs');
25
+ require('./rich-text-editor/index.cjs');
26
+ const require_Select = require('./Select.cjs');
27
+ const require_Slider = require('./Slider.cjs');
28
+ const require_spinner = require('./spinner/spinner.cjs');
29
+ require('./spinner/index.cjs');
30
+ const require_tags_input = require('./tags-input.cjs');
31
+ const require_ThemeProvider = require('./theme-provider/ThemeProvider.cjs');
32
+ require('./theme-provider/index.cjs');
33
+ const require_ThemeToggle = require('./ThemeToggle.cjs');
34
+ const require_toast = require('./toast/toast.cjs');
35
+ require('./toast/index.cjs');
36
+ let __pixpilot_shadcn = require("@pixpilot/shadcn");
37
+ __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
38
+ let next_themes = require("next-themes");
39
+ next_themes = require_rolldown_runtime.__toESM(next_themes);
40
+
41
+ exports.AbsoluteFill = require_AbsoluteFill.AbsoluteFill;
42
+ exports.Alert = require_Alert.Alert;
43
+ exports.Button = require_Button.Button;
44
+ exports.CloseButtonAbsolute = require_CloseButtonAbsolute.CloseButtonAbsolute;
45
+ exports.CloseButtonRounded = require_CloseButtonRounded.CloseButtonRounded;
46
+ exports.Combobox = require_Combobox.Combobox;
47
+ exports.ContentCard = require_ContentCard.ContentCard;
48
+ exports.DEFAULT_ALERT_DURATION = require_toast.DEFAULT_ALERT_DURATION;
49
+ exports.DatePicker = require_DatePicker.DatePicker;
50
+ exports.DialogProvider = require_DialogProvider.DialogProvider;
51
+ exports.FileUpload = require_FileUpload.FileUpload;
52
+ exports.FileUploadInline = require_FileUploadInline.FileUploadInline;
53
+ exports.IconPicker = require_IconPicker.IconPicker;
54
+ exports.LoadingOverlay = require_LoadingOverlay.LoadingOverlay;
55
+ exports.Pagination = require_Pagination.Pagination;
56
+ exports.RichTextEditor = require_RichTextEditor.RichTextEditor;
57
+ exports.Select = require_Select.Select;
58
+ exports.Slider = require_Slider.Slider;
59
+ exports.Spinner = require_spinner.Spinner;
60
+ exports.TagsInput = require_tags_input.TagsInput;
61
+ exports.ThemeProvider = require_ThemeProvider.ThemeProvider;
62
+ exports.ThemeToggle = require_ThemeToggle.ThemeToggle;
63
+ exports.cn = __pixpilot_shadcn.cn;
64
+ exports.showConfirmDialog = require_confirmation_dialogs.showConfirmDialog;
65
+ exports.toast = require_toast.toast;
66
+ exports.toastError = require_toast.toastError;
67
+ exports.toastInfo = require_toast.toastInfo;
68
+ exports.toastSuccess = require_toast.toastSuccess;
69
+ exports.toastWarning = require_toast.toastWarning;
70
+ exports.useMediaQuery = require_use_media_query.useMediaQuery;
71
+ Object.defineProperty(exports, 'useTheme', {
72
+ enumerable: true,
73
+ get: function () {
74
+ return next_themes.useTheme;
75
+ }
76
+ });
package/dist/index.js CHANGED
@@ -1 +1,37 @@
1
- import{FileUpload as e}from"./file-upload/FileUpload.js";import"./file-upload/index.js";import{AbsoluteFill as t}from"./AbsoluteFill.js";import{Alert as n}from"./Alert.js";import{Button as r}from"./Button.js";import{CloseButtonRounded as i}from"./CloseButtonRounded.js";import{CloseButtonAbsolute as a}from"./CloseButtonAbsolute.js";import{Combobox as o}from"./Combobox.js";import{showConfirmDialog as s}from"./confirmation-dialog/confirmation-dialogs.js";import{DialogProvider as c}from"./confirmation-dialog/DialogProvider.js";import"./confirmation-dialog/index.js";import{ContentCard as l}from"./ContentCard.js";import{DatePicker as u}from"./DatePicker.js";import{FileUploadInline as d}from"./file-upload-inline/FileUploadInline.js";import"./file-upload-inline/index.js";import{useMediaQuery as f}from"./hooks/use-media-query.js";import"./hooks/index.js";import{LoadingOverlay as p}from"./LoadingOverlay.js";import{IconPicker as m}from"./icon-selector/IconPicker.js";import"./icon-selector/index.js";import{Pagination as h}from"./pagination/Pagination.js";import"./pagination/index.js";import{RichTextEditor as g}from"./rich-text-editor/RichTextEditor.js";import"./rich-text-editor/index.js";import{Select as _}from"./Select.js";import{Slider as v}from"./Slider.js";import{Spinner as y}from"./spinner/spinner.js";import"./spinner/index.js";import{TagsInput as b}from"./tags-input.js";import{ThemeProvider as x}from"./theme-provider/ThemeProvider.js";import{useTheme as S}from"./theme-provider/index.js";import{ThemeToggle as C}from"./ThemeToggle.js";import{DEFAULT_ALERT_DURATION as w,toast as T,toastError as E,toastInfo as D,toastSuccess as O,toastWarning as k}from"./toast/toast.js";import"./toast/index.js";import{cn as A}from"@pixpilot/shadcn";export{t as AbsoluteFill,n as Alert,r as Button,a as CloseButtonAbsolute,i as CloseButtonRounded,o as Combobox,l as ContentCard,w as DEFAULT_ALERT_DURATION,u as DatePicker,c as DialogProvider,e as FileUpload,d as FileUploadInline,m as IconPicker,p as LoadingOverlay,h as Pagination,g as RichTextEditor,_ as Select,v as Slider,y as Spinner,b as TagsInput,x as ThemeProvider,C as ThemeToggle,A as cn,s as showConfirmDialog,T as toast,E as toastError,D as toastInfo,O as toastSuccess,k as toastWarning,f as useMediaQuery,S as useTheme};
1
+ import { FileUpload } from "./file-upload/FileUpload.js";
2
+ import "./file-upload/index.js";
3
+ import { AbsoluteFill } from "./AbsoluteFill.js";
4
+ import { Alert } from "./Alert.js";
5
+ import { Button } from "./Button.js";
6
+ import { CloseButtonRounded } from "./CloseButtonRounded.js";
7
+ import { CloseButtonAbsolute } from "./CloseButtonAbsolute.js";
8
+ import { Combobox } from "./Combobox.js";
9
+ import { showConfirmDialog } from "./confirmation-dialog/confirmation-dialogs.js";
10
+ import { DialogProvider } from "./confirmation-dialog/DialogProvider.js";
11
+ import "./confirmation-dialog/index.js";
12
+ import { ContentCard } from "./ContentCard.js";
13
+ import { DatePicker } from "./DatePicker.js";
14
+ import { FileUploadInline } from "./file-upload-inline/FileUploadInline.js";
15
+ import "./file-upload-inline/index.js";
16
+ import { useMediaQuery } from "./hooks/use-media-query.js";
17
+ import "./hooks/index.js";
18
+ import { LoadingOverlay } from "./LoadingOverlay.js";
19
+ import { IconPicker } from "./icon-selector/IconPicker.js";
20
+ import "./icon-selector/index.js";
21
+ import { Pagination } from "./pagination/Pagination.js";
22
+ import "./pagination/index.js";
23
+ import { RichTextEditor } from "./rich-text-editor/RichTextEditor.js";
24
+ import "./rich-text-editor/index.js";
25
+ import { Select } from "./Select.js";
26
+ import { Slider } from "./Slider.js";
27
+ import { Spinner } from "./spinner/spinner.js";
28
+ import "./spinner/index.js";
29
+ import { TagsInput } from "./tags-input.js";
30
+ import { ThemeProvider } from "./theme-provider/ThemeProvider.js";
31
+ import { useTheme } from "./theme-provider/index.js";
32
+ import { ThemeToggle } from "./ThemeToggle.js";
33
+ import { DEFAULT_ALERT_DURATION, toast, toastError, toastInfo, toastSuccess, toastWarning } from "./toast/toast.js";
34
+ import "./toast/index.js";
35
+ import { cn } from "@pixpilot/shadcn";
36
+
37
+ export { AbsoluteFill, Alert, Button, CloseButtonAbsolute, CloseButtonRounded, Combobox, ContentCard, DEFAULT_ALERT_DURATION, DatePicker, DialogProvider, FileUpload, FileUploadInline, IconPicker, LoadingOverlay, Pagination, RichTextEditor, Select, Slider, Spinner, TagsInput, ThemeProvider, ThemeToggle, cn, showConfirmDialog, toast, toastError, toastInfo, toastSuccess, toastWarning, useMediaQuery, useTheme };