@pixpilot/shadcn-ui 0.4.1 → 0.4.3

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 (246) hide show
  1. package/dist/AbsoluteFill.d.ts +2 -2
  2. package/dist/Alert.cjs +10 -8
  3. package/dist/Alert.js +13 -12
  4. package/dist/Button.d.cts +1 -1
  5. package/dist/ContentCard.d.cts +1 -1
  6. package/dist/DatePicker.d.cts +1 -1
  7. package/dist/DatePicker.d.ts +2 -2
  8. package/dist/Select.d.cts +1 -1
  9. package/dist/_virtual/rolldown_runtime.cjs +0 -19
  10. package/dist/confirmation-dialog/ConfirmationDialog.cjs +2 -3
  11. package/dist/confirmation-dialog/ConfirmationDialog.d.cts +0 -1
  12. package/dist/confirmation-dialog/ConfirmationDialog.js +3 -4
  13. package/dist/confirmation-dialog/index.cjs +0 -1
  14. package/dist/file-upload/FileUploadListItem.cjs +1 -2
  15. package/dist/file-upload/FileUploadListItem.js +2 -3
  16. package/dist/file-upload/hooks/index.cjs +0 -1
  17. package/dist/file-upload/hooks/use-file-error.cjs +3 -3
  18. package/dist/file-upload/hooks/use-file-error.js +2 -3
  19. package/dist/file-upload/hooks/use-file-upload-progress-callbacks.cjs +3 -3
  20. package/dist/file-upload/hooks/use-file-upload-progress-callbacks.js +2 -3
  21. package/dist/file-upload/index.cjs +0 -1
  22. package/dist/file-upload/index.d.cts +1 -2
  23. package/dist/file-upload/utils/create-placeholder-file.cjs +0 -1
  24. package/dist/file-upload/utils/get-file-key.cjs +0 -1
  25. package/dist/file-upload/utils/get-file-meta.cjs +0 -1
  26. package/dist/file-upload/utils/is-file-equal.cjs +0 -1
  27. package/dist/file-upload/utils/merge-file-metadata.cjs +0 -1
  28. package/dist/file-upload-inline/FileUploadInlineItem.cjs +1 -3
  29. package/dist/file-upload-inline/FileUploadInlineItem.js +2 -4
  30. package/dist/file-upload-inline/defaults.cjs +0 -1
  31. package/dist/file-upload-inline/index.cjs +0 -1
  32. package/dist/file-upload-inline/utils.cjs +0 -1
  33. package/dist/hooks/index.cjs +0 -1
  34. package/dist/icon-selector/IconPicker.cjs +1 -1
  35. package/dist/icon-selector/IconPicker.d.cts +0 -1
  36. package/dist/icon-selector/IconPicker.d.ts +0 -1
  37. package/dist/icon-selector/IconPicker.js +1 -1
  38. package/dist/icon-selector/constants.cjs +0 -1
  39. package/dist/icon-selector/index.cjs +0 -1
  40. package/dist/icon-selector/index.d.cts +2 -2
  41. package/dist/icon-selector/index.d.ts +2 -2
  42. package/dist/icon-selector/utils/is-valid-provider.cjs +0 -1
  43. package/dist/index.d.cts +2 -2
  44. package/dist/index.d.ts +2 -2
  45. package/dist/pagination/index.cjs +0 -1
  46. package/dist/rich-text-editor/index.cjs +0 -1
  47. package/dist/shadcn/src/lib/index.cjs +1 -0
  48. package/dist/shadcn/src/lib/index.js +1 -0
  49. package/dist/shadcn/src/lib/utils.cjs +13 -0
  50. package/dist/shadcn/src/lib/utils.js +10 -0
  51. package/dist/spinner/index.cjs +0 -1
  52. package/dist/spinner/styles.cjs +0 -1
  53. package/dist/toast/AlertToast.js +2 -2
  54. package/dist/toast/index.cjs +0 -1
  55. package/package.json +4 -4
  56. package/dist/_virtual/rolldown_runtime.js +0 -43
  57. package/dist/file-upload/hooks/index.d.cts +0 -2
  58. package/dist/file-upload/hooks/use-file-upload-progress-callbacks.d.cts +0 -1
  59. package/dist/file-upload/hooks/use-file-upload-store.d.cts +0 -2
  60. package/dist/file-upload/utils/get-file-key.d.cts +0 -1
  61. package/dist/file-upload/utils/get-file-meta.d.cts +0 -1
  62. package/dist/file-upload/utils/index.d.cts +0 -4
  63. package/dist/file-upload/utils/is-file-equal.d.cts +0 -1
  64. package/dist/file-upload/utils/merge-file-metadata.d.cts +0 -1
  65. 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 +0 -558
  66. 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 +0 -555
  67. 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 +0 -566
  68. 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 +0 -565
  69. package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +0 -695
  70. package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -679
  71. package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +0 -521
  72. package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -503
  73. 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 +0 -282
  74. 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 +0 -266
  75. 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 +0 -3767
  76. 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 +0 -3747
  77. 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 +0 -426
  78. 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 +0 -379
  79. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +0 -165
  80. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +0 -175
  81. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -151
  82. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -138
  83. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.cjs +0 -13
  84. package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.js +0 -11
  85. 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 +0 -33
  86. 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 +0 -30
  87. 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 +0 -92
  88. 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 +0 -88
  89. 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 +0 -310
  90. 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 +0 -299
  91. 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 +0 -190
  92. 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 +0 -187
  93. 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 +0 -34
  94. 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 +0 -32
  95. 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 +0 -203
  96. 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 +0 -200
  97. 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 +0 -18
  98. 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 +0 -16
  99. 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 +0 -29
  100. 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 +0 -25
  101. 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 +0 -110
  102. 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 +0 -108
  103. 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 +0 -52
  104. 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 +0 -47
  105. 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 +0 -92
  106. 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 +0 -89
  107. 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 +0 -103
  108. 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 +0 -100
  109. 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 +0 -15
  110. 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 +0 -13
  111. 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 +0 -64
  112. 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 +0 -62
  113. 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 +0 -19
  114. 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 +0 -17
  115. 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 +0 -9
  116. 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 +0 -7
  117. package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +0 -108
  118. package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es5/index.cjs +0 -155
  119. package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs +0 -19
  120. package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +0 -17
  121. package/dist/node_modules/.pnpm/detect-node-es@1.1.0/node_modules/detect-node-es/es5/node.cjs +0 -14
  122. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +0 -9
  123. package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es5/index.cjs +0 -22
  124. 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 +0 -46
  125. 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 +0 -12
  126. 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 +0 -3
  127. 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 +0 -37
  128. 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 +0 -61
  129. 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 +0 -23
  130. 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 +0 -57
  131. 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 +0 -49
  132. 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 +0 -17
  133. 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 +0 -163
  134. 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 +0 -64
  135. 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 +0 -16
  136. 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 +0 -85
  137. 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 +0 -7
  138. 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 +0 -9
  139. 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 +0 -29
  140. 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 +0 -179
  141. 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 +0 -79
  142. 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 +0 -27
  143. 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 +0 -98
  144. 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 +0 -19
  145. 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 +0 -18
  146. 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 +0 -21
  147. 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 +0 -21
  148. 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 +0 -27
  149. 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 +0 -3
  150. 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 +0 -43
  151. 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 +0 -33
  152. 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 +0 -40
  153. 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 +0 -39
  154. 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 +0 -55
  155. package/dist/node_modules/.pnpm/tabbable@6.3.0/node_modules/tabbable/dist/index.cjs +0 -347
  156. package/dist/node_modules/.pnpm/tabbable@6.3.0/node_modules/tabbable/dist/index.esm.js +0 -268
  157. package/dist/node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.cjs +0 -1895
  158. package/dist/node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.js +0 -1893
  159. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.cjs +0 -557
  160. package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +0 -31
  161. 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 +0 -22
  162. 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 +0 -47
  163. 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 +0 -42
  164. 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 +0 -34
  165. 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 +0 -39
  166. 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 +0 -85
  167. 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 +0 -40
  168. 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 +0 -59
  169. 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 +0 -34
  170. 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 +0 -61
  171. 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 +0 -53
  172. 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 +0 -38
  173. 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 +0 -19
  174. 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 +0 -84
  175. 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 +0 -22
  176. 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 +0 -21
  177. 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 +0 -31
  178. 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 +0 -31
  179. 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 +0 -60
  180. 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 +0 -69
  181. 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 +0 -101
  182. 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 +0 -58
  183. package/dist/packages/shadcn/src/components/index.cjs +0 -6
  184. package/dist/packages/shadcn/src/components/index.js +0 -5
  185. package/dist/packages/shadcn/src/components/ui/OrContinueWithSeparator.cjs +0 -6
  186. package/dist/packages/shadcn/src/components/ui/OrContinueWithSeparator.js +0 -3
  187. package/dist/packages/shadcn/src/components/ui/alert-dialog.cjs +0 -10
  188. package/dist/packages/shadcn/src/components/ui/alert-dialog.js +0 -6
  189. package/dist/packages/shadcn/src/components/ui/alert.cjs +0 -44
  190. package/dist/packages/shadcn/src/components/ui/alert.js +0 -38
  191. package/dist/packages/shadcn/src/components/ui/avatar.cjs +0 -5
  192. package/dist/packages/shadcn/src/components/ui/avatar.js +0 -2
  193. package/dist/packages/shadcn/src/components/ui/badge.cjs +0 -20
  194. package/dist/packages/shadcn/src/components/ui/badge.js +0 -16
  195. package/dist/packages/shadcn/src/components/ui/button.cjs +0 -50
  196. package/dist/packages/shadcn/src/components/ui/button.js +0 -45
  197. package/dist/packages/shadcn/src/components/ui/calendar.cjs +0 -8
  198. package/dist/packages/shadcn/src/components/ui/calendar.js +0 -4
  199. package/dist/packages/shadcn/src/components/ui/card.cjs +0 -5
  200. package/dist/packages/shadcn/src/components/ui/card.js +0 -2
  201. package/dist/packages/shadcn/src/components/ui/checkbox.cjs +0 -10
  202. package/dist/packages/shadcn/src/components/ui/checkbox.js +0 -6
  203. package/dist/packages/shadcn/src/components/ui/command.cjs +0 -11
  204. package/dist/packages/shadcn/src/components/ui/command.js +0 -7
  205. package/dist/packages/shadcn/src/components/ui/dialog.cjs +0 -93
  206. package/dist/packages/shadcn/src/components/ui/dialog.js +0 -81
  207. package/dist/packages/shadcn/src/components/ui/dropdown-menu.cjs +0 -7
  208. package/dist/packages/shadcn/src/components/ui/dropdown-menu.js +0 -3
  209. package/dist/packages/shadcn/src/components/ui/file-upload.cjs +0 -49
  210. package/dist/packages/shadcn/src/components/ui/file-upload.js +0 -45
  211. package/dist/packages/shadcn/src/components/ui/form.cjs +0 -12
  212. package/dist/packages/shadcn/src/components/ui/form.js +0 -9
  213. package/dist/packages/shadcn/src/components/ui/index.cjs +0 -30
  214. package/dist/packages/shadcn/src/components/ui/index.js +0 -29
  215. package/dist/packages/shadcn/src/components/ui/input.cjs +0 -5
  216. package/dist/packages/shadcn/src/components/ui/input.js +0 -2
  217. package/dist/packages/shadcn/src/components/ui/label.cjs +0 -5
  218. package/dist/packages/shadcn/src/components/ui/label.js +0 -2
  219. package/dist/packages/shadcn/src/components/ui/pagination.cjs +0 -9
  220. package/dist/packages/shadcn/src/components/ui/pagination.js +0 -4
  221. package/dist/packages/shadcn/src/components/ui/popover.cjs +0 -5
  222. package/dist/packages/shadcn/src/components/ui/popover.js +0 -2
  223. package/dist/packages/shadcn/src/components/ui/radio-group.cjs +0 -7
  224. package/dist/packages/shadcn/src/components/ui/radio-group.js +0 -3
  225. package/dist/packages/shadcn/src/components/ui/select.cjs +0 -10
  226. package/dist/packages/shadcn/src/components/ui/select.js +0 -6
  227. package/dist/packages/shadcn/src/components/ui/separator.cjs +0 -5
  228. package/dist/packages/shadcn/src/components/ui/separator.js +0 -2
  229. package/dist/packages/shadcn/src/components/ui/shadcn-io/tags/index.cjs +0 -26
  230. package/dist/packages/shadcn/src/components/ui/shadcn-io/tags/index.js +0 -22
  231. package/dist/packages/shadcn/src/components/ui/shadcn-io/tags-input-inline/index.cjs +0 -6
  232. package/dist/packages/shadcn/src/components/ui/shadcn-io/tags-input-inline/index.js +0 -3
  233. package/dist/packages/shadcn/src/components/ui/sheet.cjs +0 -7
  234. package/dist/packages/shadcn/src/components/ui/sheet.js +0 -3
  235. package/dist/packages/shadcn/src/components/ui/slider.cjs +0 -5
  236. package/dist/packages/shadcn/src/components/ui/slider.js +0 -2
  237. package/dist/packages/shadcn/src/components/ui/switch.cjs +0 -8
  238. package/dist/packages/shadcn/src/components/ui/switch.js +0 -5
  239. package/dist/packages/shadcn/src/components/ui/tabs.cjs +0 -5
  240. package/dist/packages/shadcn/src/components/ui/tabs.js +0 -2
  241. package/dist/packages/shadcn/src/components/ui/textarea.cjs +0 -5
  242. package/dist/packages/shadcn/src/components/ui/textarea.js +0 -2
  243. package/dist/packages/shadcn/src/components/ui/tooltip.cjs +0 -5
  244. package/dist/packages/shadcn/src/components/ui/tooltip.js +0 -2
  245. package/dist/packages/shadcn/src/lib/utils.cjs +0 -11
  246. package/dist/packages/shadcn/src/lib/utils.js +0 -10
@@ -1,566 +0,0 @@
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