@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,566 @@
1
- "use client";const e=require(`../../../../../../../_virtual/rolldown_runtime.cjs`),t=require(`../../../../../@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`);let n=require(`react`);n=e.__toESM(n);var r=e.__toESM(t.require_dist(),1),i=`TagsInputRoot`,[a,o]=(0,r.createContext)(i),s=n.forwardRef((e,t)=>{let{value:i,defaultValue:o,onValueChange:s,onValidate:c,onInvalid:l,displayValue:u=e=>e.toString(),addOnPaste:d=!1,addOnTab:f=!1,disabled:p=!1,editable:m=!1,loop:h=!1,blurBehavior:g,delimiter:_=`,`,max:v=1/0,readOnly:y=!1,required:b=!1,name:x,children:S,dir:C,id:w,...T}=e,[E=[],D]=(0,r.useControllableState)({prop:i,defaultProp:o,onChange:s}),[O,k]=n.useState(null),[A,j]=n.useState(null),[M,N]=n.useState(!1),P=n.useRef(null),F=n.useRef(null),I=(0,r.useId)(),L=(0,r.useId)(),R=(0,r.useId)(),z=(0,r.useDirection)(C),{getEnabledItems:B}=(0,r.useItemCollection)({ref:P}),{isFormControl:V,onTriggerChange:H}=(0,r.useFormControl)(),U=(0,r.useComposedRefs)(t,P,e=>H(e)),W=n.useCallback((e,t)=>{if(p||y)return!1;if(d&&t?.viaPaste){let t=e.split(_).map(e=>e.trim()).filter(Boolean);if(E.length+t.length>v&&v>0)return l?.(e),!1;let n=[];for(let e of t)E.includes(e)&&l?.(e);n=[...new Set(t.filter(e=>!E.includes(e)))];let r=n.filter(e=>!c||c(e));return r.length===0?!1:(D([...E,...r]),!0)}if(E.length>=v&&v>0)return l?.(e),!1;let n=e.trim();if(c&&!c(n))return N(!0),l?.(n),!1;if(E.some(e=>e===n))return N(!0),l?.(n),!0;let r=n;return D([...E,r]),k(null),j(null),N(!1),!0},[E,v,d,_,D,l,c,p,y]),G=n.useCallback((e,t)=>{if(!(p||y)&&e!==-1){let n=t.trim();if(E.some((t,r)=>r===e?!1:t===n)){N(!0),l?.(n);return}if(c&&!c(n)){N(!0),l?.(n);return}let r=u(n),i=[...E];i[e]=r,D(i),k(e),j(null),N(!1),requestAnimationFrame(()=>F.current?.focus())}},[E,D,u,l,c,p,y]),K=n.useCallback(e=>{if(!(p||y)&&e!==-1){let t=[...E];t.splice(e,1),D(t),k(null),j(null),F.current?.focus()}},[E,D,p,y]),q=n.useCallback(()=>{k(null),j(null),F.current?.focus()},[]),J=n.useCallback(e=>{let t=e.target;if(!(t instanceof HTMLInputElement))return;let n=e.key===`ArrowLeft`&&z===`ltr`||e.key===`ArrowRight`&&z===`rtl`,r=e.key===`ArrowRight`&&z===`ltr`||e.key===`ArrowLeft`&&z===`rtl`;if(t.value&&t.selectionStart!==0){k(null),j(null);return}function i(e,t){if(!P.current)return null;let n=B().map((e,t)=>t);if(n.length===0)return null;if(e===null)return t===`prev`?n[n.length-1]??null:n[0]??null;let r=n.indexOf(e);return t===`next`?r>=n.length-1?h?n[0]??null:null:n[r+1]??null:r<=0?h?n[n.length-1]??null:null:n[r-1]??null}switch(e.key){case`Delete`:case`Backspace`:if(t.selectionStart!==0||t.selectionEnd!==0)break;if(O!==null){let t=i(O,`prev`);K(O),k(t),e.preventDefault()}else e.key===`Backspace`&&E.length>0&&(k(i(null,`prev`)),e.preventDefault());break;case`Enter`:if(O!==null&&m&&!p){j(O),e.preventDefault();return}break;case`ArrowLeft`:case`ArrowRight`:if(t.selectionStart===0&&n&&O===null&&E.length>0)k(i(null,`prev`)),e.preventDefault();else if(O!==null){let a=i(O,n?`prev`:`next`);a===null?r&&(k(null),requestAnimationFrame(()=>t.setSelectionRange(0,0))):(k(a),e.preventDefault())}break;case`Home`:O!==null&&(k(i(null,`next`)),e.preventDefault());break;case`End`:O!==null&&(k(i(null,`prev`)),e.preventDefault());break;case`Escape`:O!==null&&k(null),A!==null&&j(null),requestAnimationFrame(()=>t.setSelectionRange(0,0));break}},[z,A,O,E,K,B,m,p,h]),Y=n.useCallback(e=>P.current?.contains(e)&&!e.hasAttribute(r.DATA_ITEM_ATTR)&&e.tagName!==`INPUT`,[]);return n.createElement(a,{value:E,onValueChange:D,onItemAdd:W,onItemRemove:K,onItemUpdate:G,onInputKeydown:J,highlightedIndex:O,setHighlightedIndex:k,editingIndex:A,setEditingIndex:j,displayValue:u,onItemLeave:q,inputRef:F,isInvalidInput:M,addOnPaste:d,addOnTab:f,disabled:p,editable:m,loop:h,readOnly:y,blurBehavior:g,delimiter:_,max:v,dir:z,id:I,inputId:L,labelId:R},n.createElement(r.Primitive.div,{id:I,"data-disabled":p?``:void 0,"data-invalid":M?``:void 0,"data-readonly":y?``:void 0,dir:z,...T,ref:U,onClick:(0,r.composeEventHandlers)(T.onClick,e=>{let t=e.target;t instanceof HTMLElement&&Y(t)&&document.activeElement!==F.current&&(e.currentTarget.focus(),F.current?.focus())}),onMouseDown:(0,r.composeEventHandlers)(T.onMouseDown,e=>{let t=e.target;t instanceof HTMLElement&&Y(t)&&e.preventDefault()}),onBlur:(0,r.composeEventHandlers)(T.onBlur,e=>{e.relatedTarget!==F.current&&!P.current?.contains(e.relatedTarget)&&requestAnimationFrame(()=>k(null))})},typeof S==`function`?n.createElement(n.Fragment,null,S({value:E})):S,V&&x&&n.createElement(r.VisuallyHiddenInput,{type:`hidden`,control:P.current,name:x,value:E,disabled:p,required:b})))});s.displayName=i;var c=`TagsInputLabel`,l=n.forwardRef((e,t)=>{let i=o(c);return n.createElement(r.Primitive.label,{id:i.labelId,htmlFor:i.inputId,...e,ref:t})});l.displayName=c;var u=`TagsInputItem`,[d,f]=(0,r.createContext)(u),p=n.forwardRef((e,t)=>{let{value:i,disabled:a,...s}=e,c=n.useRef(`touch`),l=o(u),f=(0,r.useId)(),p=`${f}text`,m=l.value.indexOf(i),h=m===l.highlightedIndex,g=m===l.editingIndex,_=a||l.disabled,v=l.displayValue(i),y=n.useCallback(()=>{l.setHighlightedIndex(m),l.inputRef.current?.focus()},[l.setHighlightedIndex,l.inputRef,m]);return n.createElement(d,{id:f,value:i,index:m,isHighlighted:h,isEditing:g,disabled:_,textId:p,displayValue:v},n.createElement(r.Primitive.div,{id:f,"aria-labelledby":p,"aria-current":h,"aria-disabled":_,[r.DATA_ITEM_ATTR]:``,"data-state":h?`active`:`inactive`,"data-highlighted":h?``:void 0,"data-editing":g?``:void 0,"data-editable":l.editable?``:void 0,"data-disabled":_?``:void 0,...s,ref:t,onClick:(0,r.composeEventHandlers)(s.onClick,e=>{e.stopPropagation(),!g&&c.current!==`mouse`&&y()}),onDoubleClick:(0,r.composeEventHandlers)(s.onDoubleClick,()=>{l.editable&&!_&&requestAnimationFrame(()=>l.setEditingIndex(m))}),onPointerUp:(0,r.composeEventHandlers)(s.onPointerUp,()=>{c.current===`mouse`&&y()}),onPointerDown:(0,r.composeEventHandlers)(s.onPointerDown,e=>c.current=e.pointerType),onPointerMove:(0,r.composeEventHandlers)(s.onPointerMove,e=>{c.current=e.pointerType,a?l.onItemLeave():c.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,r.composeEventHandlers)(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&l.onItemLeave()})}))});p.displayName=u;var m=`TagsInputInput`,h=n.forwardRef((e,t)=>{let{autoFocus:i,...a}=e,s=o(m),c=n.useCallback(e=>{s.addOnTab&&l(e)},[s.addOnTab]),l=n.useCallback(e=>{if(e.defaultPrevented)return;let t=e.currentTarget.value;t&&(s.onItemAdd(t)&&(e.currentTarget.value=``,s.setHighlightedIndex(null)),e.preventDefault())},[s.onItemAdd,s.setHighlightedIndex]);return n.useEffect(()=>{if(!i)return;let e=requestAnimationFrame(()=>s.inputRef.current?.focus());return()=>cancelAnimationFrame(e)},[i,s.inputRef]),n.createElement(r.Primitive.input,{type:`text`,id:s.inputId,autoCapitalize:`off`,autoComplete:`off`,autoCorrect:`off`,spellCheck:`false`,autoFocus:i,"aria-labelledby":s.labelId,"aria-readonly":s.readOnly,"data-invalid":s.isInvalidInput?``:void 0,dir:s.dir,disabled:s.disabled,readOnly:s.readOnly,...a,ref:(0,r.composeRefs)(s.inputRef,t),onBlur:(0,r.composeEventHandlers)(a.onBlur,e=>{if(!s.readOnly){if(s.blurBehavior===`add`){let t=e.target.value;t&&s.onItemAdd(t)&&(e.target.value=``)}s.blurBehavior===`clear`&&(e.target.value=``)}}),onChange:(0,r.composeEventHandlers)(a.onChange,e=>{if(s.readOnly)return;let t=e.target;if(t instanceof HTMLInputElement&&s.delimiter===t.value.slice(-1)){let e=t.value.slice(0,-1);t.value=``,e&&(s.onItemAdd(e),s.setHighlightedIndex(null))}}),onKeyDown:(0,r.composeEventHandlers)(a.onKeyDown,e=>{s.readOnly||(e.key===`Enter`&&l(e),e.key===`Tab`&&c(e),s.onInputKeydown(e),e.key.length===1&&s.setHighlightedIndex(null))}),onPaste:(0,r.composeEventHandlers)(a.onPaste,e=>{if(!s.readOnly&&s.addOnPaste){e.preventDefault();let t=e.clipboardData.getData(`text`);s.onItemAdd(t,{viaPaste:!0}),s.setHighlightedIndex(null)}})})});h.displayName=m;var g=`TagsInputItemDelete`,_=n.forwardRef((e,t)=>{let i=o(g),a=f(g),s=a.disabled||i.disabled;return a.isEditing?null:n.createElement(r.Primitive.button,{type:`button`,tabIndex:s?void 0:-1,"aria-labelledby":a.textId,"aria-controls":a.id,"aria-current":a.isHighlighted,"data-state":a.isHighlighted?`active`:`inactive`,"data-disabled":s?``:void 0,...e,ref:t,onClick:(0,r.composeEventHandlers)(e.onClick,()=>{if(s)return;let e=i.value.findIndex(e=>e===a.value);i.onItemRemove(e)})})});_.displayName=g;var v=`TagsInputItemText`,y=n.forwardRef((e,t)=>{let{children:i,...a}=e,s=o(v),c=f(v);return c.isEditing&&s.editable&&!c.disabled?n.createElement(b,null):n.createElement(r.Primitive.span,{id:c.textId,...a,ref:t},i??c.displayValue)});function b(){let e=o(v),t=f(v),[i,a]=n.useState(t.displayValue),s=n.useCallback(()=>{a(t.displayValue),e.setEditingIndex(null)},[e.setEditingIndex,t.displayValue]),c=n.useCallback(e=>{let t=e.target;t.style.width=`0`,t.style.width=`${t.scrollWidth+4}px`,a(e.target.value)},[]),l=n.useCallback(e=>{e.target.select(),e.target.style.width=`0`,e.target.style.width=`${e.target.scrollWidth+4}px`},[]),u=n.useCallback(n=>{if(n.key===`Enter`){let n=e.value.findIndex(e=>e===t.value);e.onItemUpdate(n,i)}else n.key===`Escape`&&(a(t.displayValue),e.setEditingIndex(null),e.setHighlightedIndex(t.index),e.inputRef.current?.focus());n.stopPropagation()},[e.value,e.onItemUpdate,e.setEditingIndex,t.displayValue,e.inputRef.current?.focus,i,t.value,e.setHighlightedIndex,t.index]);return n.createElement(r.Primitive.input,{type:`text`,autoCapitalize:`off`,autoComplete:`off`,autoCorrect:`off`,spellCheck:`false`,autoFocus:!0,"aria-describedby":t.textId,value:i,onChange:c,onKeyDown:u,onFocus:l,onBlur:s,style:{outline:`none`,background:`inherit`,border:`none`,font:`inherit`,color:`inherit`,padding:0,minWidth:`1ch`}})}var x=`TagsInputClear`,S=n.forwardRef((e,t)=>{let{forceMount:i,...a}=e,s=o(x);return n.createElement(r.Presence,{present:i||s.value.length>0},n.createElement(r.Primitive.button,{type:`button`,"aria-disabled":s.disabled,"data-state":s.value.length>0?`visible`:`invisible`,"data-disabled":s.disabled?``:void 0,...a,ref:t,onClick:(0,r.composeEventHandlers)(e.onClick,()=>{s.disabled||(s.onValueChange([]),s.inputRef.current?.focus())})}))});S.displayName=x;
1
+ 'use client';
2
+
3
+
4
+ const require_rolldown_runtime = require('../../../../../../../_virtual/rolldown_runtime.cjs');
5
+ const require_index = require('../../../../../@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');
6
+ let react = require("react");
7
+ react = require_rolldown_runtime.__toESM(react);
8
+
9
+ //#region ../../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
10
+ var import_dist = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_index.require_dist(), 1);
11
+ var ROOT_NAME = "TagsInputRoot";
12
+ var [TagsInputProvider, useTagsInput] = (0, import_dist.createContext)(ROOT_NAME);
13
+ var TagsInputRoot = react.forwardRef((props, ref) => {
14
+ const { value: valueProp, defaultValue, onValueChange, onValidate, onInvalid, displayValue = (value2) => value2.toString(), addOnPaste = false, addOnTab = false, disabled = false, editable = false, loop = false, blurBehavior, delimiter = ",", max = Number.POSITIVE_INFINITY, readOnly = false, required = false, name, children, dir: dirProp, id: idProp,...rootProps } = props;
15
+ const [value = [], setValue] = (0, import_dist.useControllableState)({
16
+ prop: valueProp,
17
+ defaultProp: defaultValue,
18
+ onChange: onValueChange
19
+ });
20
+ const [highlightedIndex, setHighlightedIndex] = react.useState(null);
21
+ const [editingIndex, setEditingIndex] = react.useState(null);
22
+ const [isInvalidInput, setIsInvalidInput] = react.useState(false);
23
+ const collectionRef = react.useRef(null);
24
+ const inputRef = react.useRef(null);
25
+ const id = (0, import_dist.useId)();
26
+ const inputId = (0, import_dist.useId)();
27
+ const labelId = (0, import_dist.useId)();
28
+ const dir = (0, import_dist.useDirection)(dirProp);
29
+ const { getEnabledItems } = (0, import_dist.useItemCollection)({ ref: collectionRef });
30
+ const { isFormControl, onTriggerChange } = (0, import_dist.useFormControl)();
31
+ const composedRef = (0, import_dist.useComposedRefs)(ref, collectionRef, (node) => onTriggerChange(node));
32
+ const onItemAdd = react.useCallback((textValue, options) => {
33
+ if (disabled || readOnly) return false;
34
+ if (addOnPaste && options?.viaPaste) {
35
+ const splitValues = textValue.split(delimiter).map((v) => v.trim()).filter(Boolean);
36
+ if (value.length + splitValues.length > max && max > 0) {
37
+ onInvalid?.(textValue);
38
+ return false;
39
+ }
40
+ let newValues2 = [];
41
+ for (const v of splitValues) if (value.includes(v)) onInvalid?.(v);
42
+ newValues2 = [...new Set(splitValues.filter((v) => !value.includes(v)))];
43
+ const validValues = newValues2.filter((v) => !onValidate || onValidate(v));
44
+ if (validValues.length === 0) return false;
45
+ setValue([...value, ...validValues]);
46
+ return true;
47
+ }
48
+ if (value.length >= max && max > 0) {
49
+ onInvalid?.(textValue);
50
+ return false;
51
+ }
52
+ const trimmedValue = textValue.trim();
53
+ if (onValidate && !onValidate(trimmedValue)) {
54
+ setIsInvalidInput(true);
55
+ onInvalid?.(trimmedValue);
56
+ return false;
57
+ }
58
+ if (value.some((v) => {
59
+ return v === trimmedValue;
60
+ })) {
61
+ setIsInvalidInput(true);
62
+ onInvalid?.(trimmedValue);
63
+ return true;
64
+ }
65
+ const newValue = trimmedValue;
66
+ setValue([...value, newValue]);
67
+ setHighlightedIndex(null);
68
+ setEditingIndex(null);
69
+ setIsInvalidInput(false);
70
+ return true;
71
+ }, [
72
+ value,
73
+ max,
74
+ addOnPaste,
75
+ delimiter,
76
+ setValue,
77
+ onInvalid,
78
+ onValidate,
79
+ disabled,
80
+ readOnly
81
+ ]);
82
+ const onItemUpdate = react.useCallback((index, newTextValue) => {
83
+ if (disabled || readOnly) return;
84
+ if (index !== -1) {
85
+ const trimmedValue = newTextValue.trim();
86
+ if (value.some((v, i) => {
87
+ if (i === index) return false;
88
+ return v === trimmedValue;
89
+ })) {
90
+ setIsInvalidInput(true);
91
+ onInvalid?.(trimmedValue);
92
+ return;
93
+ }
94
+ if (onValidate && !onValidate(trimmedValue)) {
95
+ setIsInvalidInput(true);
96
+ onInvalid?.(trimmedValue);
97
+ return;
98
+ }
99
+ const updatedValue = displayValue(trimmedValue);
100
+ const newValues = [...value];
101
+ newValues[index] = updatedValue;
102
+ setValue(newValues);
103
+ setHighlightedIndex(index);
104
+ setEditingIndex(null);
105
+ setIsInvalidInput(false);
106
+ requestAnimationFrame(() => inputRef.current?.focus());
107
+ }
108
+ }, [
109
+ value,
110
+ setValue,
111
+ displayValue,
112
+ onInvalid,
113
+ onValidate,
114
+ disabled,
115
+ readOnly
116
+ ]);
117
+ const onItemRemove = react.useCallback((index) => {
118
+ if (disabled || readOnly) return;
119
+ if (index !== -1) {
120
+ const newValues = [...value];
121
+ newValues.splice(index, 1);
122
+ setValue(newValues);
123
+ setHighlightedIndex(null);
124
+ setEditingIndex(null);
125
+ inputRef.current?.focus();
126
+ }
127
+ }, [
128
+ value,
129
+ setValue,
130
+ disabled,
131
+ readOnly
132
+ ]);
133
+ const onItemLeave = react.useCallback(() => {
134
+ setHighlightedIndex(null);
135
+ setEditingIndex(null);
136
+ inputRef.current?.focus();
137
+ }, []);
138
+ const onInputKeydown = react.useCallback((event) => {
139
+ const target = event.target;
140
+ if (!(target instanceof HTMLInputElement)) return;
141
+ const isArrowLeft = event.key === "ArrowLeft" && dir === "ltr" || event.key === "ArrowRight" && dir === "rtl";
142
+ const isArrowRight = event.key === "ArrowRight" && dir === "ltr" || event.key === "ArrowLeft" && dir === "rtl";
143
+ if (target.value && target.selectionStart !== 0) {
144
+ setHighlightedIndex(null);
145
+ setEditingIndex(null);
146
+ return;
147
+ }
148
+ function findNextEnabledIndex(currentIndex, direction) {
149
+ if (!collectionRef.current) return null;
150
+ const enabledIndices = getEnabledItems().map((_, index) => index);
151
+ if (enabledIndices.length === 0) return null;
152
+ if (currentIndex === null) return direction === "prev" ? enabledIndices[enabledIndices.length - 1] ?? null : enabledIndices[0] ?? null;
153
+ const currentEnabledIndex = enabledIndices.indexOf(currentIndex);
154
+ if (direction === "next") return currentEnabledIndex >= enabledIndices.length - 1 ? loop ? enabledIndices[0] ?? null : null : enabledIndices[currentEnabledIndex + 1] ?? null;
155
+ return currentEnabledIndex <= 0 ? loop ? enabledIndices[enabledIndices.length - 1] ?? null : null : enabledIndices[currentEnabledIndex - 1] ?? null;
156
+ }
157
+ switch (event.key) {
158
+ case "Delete":
159
+ case "Backspace":
160
+ if (target.selectionStart !== 0 || target.selectionEnd !== 0) break;
161
+ if (highlightedIndex !== null) {
162
+ const newIndex = findNextEnabledIndex(highlightedIndex, "prev");
163
+ onItemRemove(highlightedIndex);
164
+ setHighlightedIndex(newIndex);
165
+ event.preventDefault();
166
+ } else if (event.key === "Backspace" && value.length > 0) {
167
+ setHighlightedIndex(findNextEnabledIndex(null, "prev"));
168
+ event.preventDefault();
169
+ }
170
+ break;
171
+ case "Enter":
172
+ if (highlightedIndex !== null && editable && !disabled) {
173
+ setEditingIndex(highlightedIndex);
174
+ event.preventDefault();
175
+ return;
176
+ }
177
+ break;
178
+ case "ArrowLeft":
179
+ case "ArrowRight":
180
+ if (target.selectionStart === 0 && isArrowLeft && highlightedIndex === null && value.length > 0) {
181
+ setHighlightedIndex(findNextEnabledIndex(null, "prev"));
182
+ event.preventDefault();
183
+ } else if (highlightedIndex !== null) {
184
+ const nextIndex = findNextEnabledIndex(highlightedIndex, isArrowLeft ? "prev" : "next");
185
+ if (nextIndex !== null) {
186
+ setHighlightedIndex(nextIndex);
187
+ event.preventDefault();
188
+ } else if (isArrowRight) {
189
+ setHighlightedIndex(null);
190
+ requestAnimationFrame(() => target.setSelectionRange(0, 0));
191
+ }
192
+ }
193
+ break;
194
+ case "Home":
195
+ if (highlightedIndex !== null) {
196
+ setHighlightedIndex(findNextEnabledIndex(null, "next"));
197
+ event.preventDefault();
198
+ }
199
+ break;
200
+ case "End":
201
+ if (highlightedIndex !== null) {
202
+ setHighlightedIndex(findNextEnabledIndex(null, "prev"));
203
+ event.preventDefault();
204
+ }
205
+ break;
206
+ case "Escape":
207
+ if (highlightedIndex !== null) setHighlightedIndex(null);
208
+ if (editingIndex !== null) setEditingIndex(null);
209
+ requestAnimationFrame(() => target.setSelectionRange(0, 0));
210
+ break;
211
+ }
212
+ }, [
213
+ dir,
214
+ editingIndex,
215
+ highlightedIndex,
216
+ value,
217
+ onItemRemove,
218
+ getEnabledItems,
219
+ editable,
220
+ disabled,
221
+ loop
222
+ ]);
223
+ const getIsClickedInEmptyRoot = react.useCallback((target) => {
224
+ return collectionRef.current?.contains(target) && !target.hasAttribute(import_dist.DATA_ITEM_ATTR) && target.tagName !== "INPUT";
225
+ }, []);
226
+ return /* @__PURE__ */ react.createElement(TagsInputProvider, {
227
+ value,
228
+ onValueChange: setValue,
229
+ onItemAdd,
230
+ onItemRemove,
231
+ onItemUpdate,
232
+ onInputKeydown,
233
+ highlightedIndex,
234
+ setHighlightedIndex,
235
+ editingIndex,
236
+ setEditingIndex,
237
+ displayValue,
238
+ onItemLeave,
239
+ inputRef,
240
+ isInvalidInput,
241
+ addOnPaste,
242
+ addOnTab,
243
+ disabled,
244
+ editable,
245
+ loop,
246
+ readOnly,
247
+ blurBehavior,
248
+ delimiter,
249
+ max,
250
+ dir,
251
+ id,
252
+ inputId,
253
+ labelId
254
+ }, /* @__PURE__ */ react.createElement(import_dist.Primitive.div, {
255
+ id,
256
+ "data-disabled": disabled ? "" : void 0,
257
+ "data-invalid": isInvalidInput ? "" : void 0,
258
+ "data-readonly": readOnly ? "" : void 0,
259
+ dir,
260
+ ...rootProps,
261
+ ref: composedRef,
262
+ onClick: (0, import_dist.composeEventHandlers)(rootProps.onClick, (event) => {
263
+ const target = event.target;
264
+ if (!(target instanceof HTMLElement)) return;
265
+ if (getIsClickedInEmptyRoot(target) && document.activeElement !== inputRef.current) {
266
+ event.currentTarget.focus();
267
+ inputRef.current?.focus();
268
+ }
269
+ }),
270
+ onMouseDown: (0, import_dist.composeEventHandlers)(rootProps.onMouseDown, (event) => {
271
+ const target = event.target;
272
+ if (!(target instanceof HTMLElement)) return;
273
+ if (getIsClickedInEmptyRoot(target)) event.preventDefault();
274
+ }),
275
+ onBlur: (0, import_dist.composeEventHandlers)(rootProps.onBlur, (event) => {
276
+ if (event.relatedTarget !== inputRef.current && !collectionRef.current?.contains(event.relatedTarget)) requestAnimationFrame(() => setHighlightedIndex(null));
277
+ })
278
+ }, typeof children === "function" ? /* @__PURE__ */ react.createElement(react.Fragment, null, children({ value })) : children, isFormControl && name && /* @__PURE__ */ react.createElement(import_dist.VisuallyHiddenInput, {
279
+ type: "hidden",
280
+ control: collectionRef.current,
281
+ name,
282
+ value,
283
+ disabled,
284
+ required
285
+ })));
286
+ });
287
+ TagsInputRoot.displayName = ROOT_NAME;
288
+ var LABEL_NAME = "TagsInputLabel";
289
+ var TagsInputLabel = react.forwardRef((props, ref) => {
290
+ const context = useTagsInput(LABEL_NAME);
291
+ return /* @__PURE__ */ react.createElement(import_dist.Primitive.label, {
292
+ id: context.labelId,
293
+ htmlFor: context.inputId,
294
+ ...props,
295
+ ref
296
+ });
297
+ });
298
+ TagsInputLabel.displayName = LABEL_NAME;
299
+ var ITEM_NAME = "TagsInputItem";
300
+ var [TagsInputItemProvider, useTagsInputItem] = (0, import_dist.createContext)(ITEM_NAME);
301
+ var TagsInputItem = react.forwardRef((props, ref) => {
302
+ const { value, disabled,...itemProps } = props;
303
+ const pointerTypeRef = react.useRef("touch");
304
+ const context = useTagsInput(ITEM_NAME);
305
+ const id = (0, import_dist.useId)();
306
+ const textId = `${id}text`;
307
+ const index = context.value.indexOf(value);
308
+ const isHighlighted = index === context.highlightedIndex;
309
+ const isEditing = index === context.editingIndex;
310
+ const itemDisabled = disabled || context.disabled;
311
+ const displayValue = context.displayValue(value);
312
+ const onItemSelect = react.useCallback(() => {
313
+ context.setHighlightedIndex(index);
314
+ context.inputRef.current?.focus();
315
+ }, [
316
+ context.setHighlightedIndex,
317
+ context.inputRef,
318
+ index
319
+ ]);
320
+ return /* @__PURE__ */ react.createElement(TagsInputItemProvider, {
321
+ id,
322
+ value,
323
+ index,
324
+ isHighlighted,
325
+ isEditing,
326
+ disabled: itemDisabled,
327
+ textId,
328
+ displayValue
329
+ }, /* @__PURE__ */ react.createElement(import_dist.Primitive.div, {
330
+ id,
331
+ "aria-labelledby": textId,
332
+ "aria-current": isHighlighted,
333
+ "aria-disabled": itemDisabled,
334
+ [import_dist.DATA_ITEM_ATTR]: "",
335
+ "data-state": isHighlighted ? "active" : "inactive",
336
+ "data-highlighted": isHighlighted ? "" : void 0,
337
+ "data-editing": isEditing ? "" : void 0,
338
+ "data-editable": context.editable ? "" : void 0,
339
+ "data-disabled": itemDisabled ? "" : void 0,
340
+ ...itemProps,
341
+ ref,
342
+ onClick: (0, import_dist.composeEventHandlers)(itemProps.onClick, (event) => {
343
+ event.stopPropagation();
344
+ if (!isEditing && pointerTypeRef.current !== "mouse") onItemSelect();
345
+ }),
346
+ onDoubleClick: (0, import_dist.composeEventHandlers)(itemProps.onDoubleClick, () => {
347
+ if (context.editable && !itemDisabled) requestAnimationFrame(() => context.setEditingIndex(index));
348
+ }),
349
+ onPointerUp: (0, import_dist.composeEventHandlers)(itemProps.onPointerUp, () => {
350
+ if (pointerTypeRef.current === "mouse") onItemSelect();
351
+ }),
352
+ onPointerDown: (0, import_dist.composeEventHandlers)(itemProps.onPointerDown, (event) => pointerTypeRef.current = event.pointerType),
353
+ onPointerMove: (0, import_dist.composeEventHandlers)(itemProps.onPointerMove, (event) => {
354
+ pointerTypeRef.current = event.pointerType;
355
+ if (disabled) context.onItemLeave();
356
+ else if (pointerTypeRef.current === "mouse") event.currentTarget.focus({ preventScroll: true });
357
+ }),
358
+ onPointerLeave: (0, import_dist.composeEventHandlers)(itemProps.onPointerLeave, (event) => {
359
+ if (event.currentTarget === document.activeElement) context.onItemLeave();
360
+ })
361
+ }));
362
+ });
363
+ TagsInputItem.displayName = ITEM_NAME;
364
+ var INPUT_NAME = "TagsInputInput";
365
+ var TagsInputInput = react.forwardRef((props, ref) => {
366
+ const { autoFocus,...inputProps } = props;
367
+ const context = useTagsInput(INPUT_NAME);
368
+ const onTab = react.useCallback((event) => {
369
+ if (!context.addOnTab) return;
370
+ onCustomKeydown(event);
371
+ }, [context.addOnTab]);
372
+ const onCustomKeydown = react.useCallback((event) => {
373
+ if (event.defaultPrevented) return;
374
+ const value = event.currentTarget.value;
375
+ if (!value) return;
376
+ if (context.onItemAdd(value)) {
377
+ event.currentTarget.value = "";
378
+ context.setHighlightedIndex(null);
379
+ }
380
+ event.preventDefault();
381
+ }, [context.onItemAdd, context.setHighlightedIndex]);
382
+ react.useEffect(() => {
383
+ if (!autoFocus) return;
384
+ const animationFrameId = requestAnimationFrame(() => context.inputRef.current?.focus());
385
+ return () => cancelAnimationFrame(animationFrameId);
386
+ }, [autoFocus, context.inputRef]);
387
+ return /* @__PURE__ */ react.createElement(import_dist.Primitive.input, {
388
+ type: "text",
389
+ id: context.inputId,
390
+ autoCapitalize: "off",
391
+ autoComplete: "off",
392
+ autoCorrect: "off",
393
+ spellCheck: "false",
394
+ autoFocus,
395
+ "aria-labelledby": context.labelId,
396
+ "aria-readonly": context.readOnly,
397
+ "data-invalid": context.isInvalidInput ? "" : void 0,
398
+ dir: context.dir,
399
+ disabled: context.disabled,
400
+ readOnly: context.readOnly,
401
+ ...inputProps,
402
+ ref: (0, import_dist.composeRefs)(context.inputRef, ref),
403
+ onBlur: (0, import_dist.composeEventHandlers)(inputProps.onBlur, (event) => {
404
+ if (context.readOnly) return;
405
+ if (context.blurBehavior === "add") {
406
+ const value = event.target.value;
407
+ if (value) {
408
+ if (context.onItemAdd(value)) event.target.value = "";
409
+ }
410
+ }
411
+ if (context.blurBehavior === "clear") event.target.value = "";
412
+ }),
413
+ onChange: (0, import_dist.composeEventHandlers)(inputProps.onChange, (event) => {
414
+ if (context.readOnly) return;
415
+ const target = event.target;
416
+ if (!(target instanceof HTMLInputElement)) return;
417
+ if (context.delimiter === target.value.slice(-1)) {
418
+ const value = target.value.slice(0, -1);
419
+ target.value = "";
420
+ if (value) {
421
+ context.onItemAdd(value);
422
+ context.setHighlightedIndex(null);
423
+ }
424
+ }
425
+ }),
426
+ onKeyDown: (0, import_dist.composeEventHandlers)(inputProps.onKeyDown, (event) => {
427
+ if (context.readOnly) return;
428
+ if (event.key === "Enter") onCustomKeydown(event);
429
+ if (event.key === "Tab") onTab(event);
430
+ context.onInputKeydown(event);
431
+ if (event.key.length === 1) context.setHighlightedIndex(null);
432
+ }),
433
+ onPaste: (0, import_dist.composeEventHandlers)(inputProps.onPaste, (event) => {
434
+ if (context.readOnly) return;
435
+ if (context.addOnPaste) {
436
+ event.preventDefault();
437
+ const value = event.clipboardData.getData("text");
438
+ context.onItemAdd(value, { viaPaste: true });
439
+ context.setHighlightedIndex(null);
440
+ }
441
+ })
442
+ });
443
+ });
444
+ TagsInputInput.displayName = INPUT_NAME;
445
+ var ITEM_DELETE_NAME = "TagsInputItemDelete";
446
+ var TagsInputItemDelete = react.forwardRef((props, ref) => {
447
+ const context = useTagsInput(ITEM_DELETE_NAME);
448
+ const itemContext = useTagsInputItem(ITEM_DELETE_NAME);
449
+ const disabled = itemContext.disabled || context.disabled;
450
+ if (itemContext.isEditing) return null;
451
+ return /* @__PURE__ */ react.createElement(import_dist.Primitive.button, {
452
+ type: "button",
453
+ tabIndex: disabled ? void 0 : -1,
454
+ "aria-labelledby": itemContext.textId,
455
+ "aria-controls": itemContext.id,
456
+ "aria-current": itemContext.isHighlighted,
457
+ "data-state": itemContext.isHighlighted ? "active" : "inactive",
458
+ "data-disabled": disabled ? "" : void 0,
459
+ ...props,
460
+ ref,
461
+ onClick: (0, import_dist.composeEventHandlers)(props.onClick, () => {
462
+ if (disabled) return;
463
+ const index = context.value.findIndex((i) => i === itemContext.value);
464
+ context.onItemRemove(index);
465
+ })
466
+ });
467
+ });
468
+ TagsInputItemDelete.displayName = ITEM_DELETE_NAME;
469
+ var ITEM_TEXT_NAME = "TagsInputItemText";
470
+ var TagsInputItemText = react.forwardRef((props, ref) => {
471
+ const { children,...itemTextProps } = props;
472
+ const context = useTagsInput(ITEM_TEXT_NAME);
473
+ const itemContext = useTagsInputItem(ITEM_TEXT_NAME);
474
+ if (itemContext.isEditing && context.editable && !itemContext.disabled) return /* @__PURE__ */ react.createElement(TagsInputEditableItemText, null);
475
+ return /* @__PURE__ */ react.createElement(import_dist.Primitive.span, {
476
+ id: itemContext.textId,
477
+ ...itemTextProps,
478
+ ref
479
+ }, children ?? itemContext.displayValue);
480
+ });
481
+ function TagsInputEditableItemText() {
482
+ const context = useTagsInput(ITEM_TEXT_NAME);
483
+ const itemContext = useTagsInputItem(ITEM_TEXT_NAME);
484
+ const [editValue, setEditValue] = react.useState(itemContext.displayValue);
485
+ const onBlur = react.useCallback(() => {
486
+ setEditValue(itemContext.displayValue);
487
+ context.setEditingIndex(null);
488
+ }, [context.setEditingIndex, itemContext.displayValue]);
489
+ const onChange = react.useCallback((event) => {
490
+ const target = event.target;
491
+ target.style.width = "0";
492
+ target.style.width = `${target.scrollWidth + 4}px`;
493
+ setEditValue(event.target.value);
494
+ }, []);
495
+ const onFocus = react.useCallback((event) => {
496
+ event.target.select();
497
+ event.target.style.width = "0";
498
+ event.target.style.width = `${event.target.scrollWidth + 4}px`;
499
+ }, []);
500
+ const onKeyDown = react.useCallback((event) => {
501
+ if (event.key === "Enter") {
502
+ const index = context.value.findIndex((v) => v === itemContext.value);
503
+ context.onItemUpdate(index, editValue);
504
+ } else if (event.key === "Escape") {
505
+ setEditValue(itemContext.displayValue);
506
+ context.setEditingIndex(null);
507
+ context.setHighlightedIndex(itemContext.index);
508
+ context.inputRef.current?.focus();
509
+ }
510
+ event.stopPropagation();
511
+ }, [
512
+ context.value,
513
+ context.onItemUpdate,
514
+ context.setEditingIndex,
515
+ itemContext.displayValue,
516
+ context.inputRef.current?.focus,
517
+ editValue,
518
+ itemContext.value,
519
+ context.setHighlightedIndex,
520
+ itemContext.index
521
+ ]);
522
+ return /* @__PURE__ */ react.createElement(import_dist.Primitive.input, {
523
+ type: "text",
524
+ autoCapitalize: "off",
525
+ autoComplete: "off",
526
+ autoCorrect: "off",
527
+ spellCheck: "false",
528
+ autoFocus: true,
529
+ "aria-describedby": itemContext.textId,
530
+ value: editValue,
531
+ onChange,
532
+ onKeyDown,
533
+ onFocus,
534
+ onBlur,
535
+ style: {
536
+ outline: "none",
537
+ background: "inherit",
538
+ border: "none",
539
+ font: "inherit",
540
+ color: "inherit",
541
+ padding: 0,
542
+ minWidth: "1ch"
543
+ }
544
+ });
545
+ }
546
+ var CLEAR_NAME = "TagsInputClear";
547
+ var TagsInputClear = react.forwardRef((props, ref) => {
548
+ const { forceMount,...clearProps } = props;
549
+ const context = useTagsInput(CLEAR_NAME);
550
+ return /* @__PURE__ */ react.createElement(import_dist.Presence, { present: forceMount || context.value.length > 0 }, /* @__PURE__ */ react.createElement(import_dist.Primitive.button, {
551
+ type: "button",
552
+ "aria-disabled": context.disabled,
553
+ "data-state": context.value.length > 0 ? "visible" : "invisible",
554
+ "data-disabled": context.disabled ? "" : void 0,
555
+ ...clearProps,
556
+ ref,
557
+ onClick: (0, import_dist.composeEventHandlers)(props.onClick, () => {
558
+ if (context.disabled) return;
559
+ context.onValueChange([]);
560
+ context.inputRef.current?.focus();
561
+ })
562
+ }));
563
+ });
564
+ TagsInputClear.displayName = CLEAR_NAME;
565
+
566
+ //#endregion