@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.
- package/dist/AbsoluteFill.cjs +24 -1
- package/dist/AbsoluteFill.d.ts +2 -2
- package/dist/AbsoluteFill.js +21 -1
- package/dist/Alert.cjs +81 -1
- package/dist/Alert.js +77 -1
- package/dist/Button.cjs +84 -1
- package/dist/Button.d.ts +1 -1
- package/dist/Button.js +79 -1
- package/dist/CloseButtonAbsolute.cjs +20 -1
- package/dist/CloseButtonAbsolute.js +16 -1
- package/dist/CloseButtonRounded.cjs +22 -1
- package/dist/CloseButtonRounded.js +17 -1
- package/dist/Combobox.cjs +53 -1
- package/dist/Combobox.js +48 -1
- package/dist/CommandOptionList.cjs +29 -1
- package/dist/CommandOptionList.js +25 -1
- package/dist/ContentCard.cjs +27 -1
- package/dist/ContentCard.js +23 -1
- package/dist/DatePicker.cjs +38 -1
- package/dist/DatePicker.d.ts +2 -2
- package/dist/DatePicker.js +33 -1
- package/dist/LoadingOverlay.cjs +65 -1
- package/dist/LoadingOverlay.js +60 -1
- package/dist/Select.cjs +27 -1
- package/dist/Select.js +23 -1
- package/dist/Slider.cjs +19 -1
- package/dist/Slider.js +15 -1
- package/dist/ThemeToggle.cjs +98 -1
- package/dist/ThemeToggle.js +94 -1
- package/dist/_virtual/rolldown_runtime.cjs +44 -1
- package/dist/_virtual/rolldown_runtime.js +43 -1
- package/dist/confirmation-dialog/ConfirmationDialog.cjs +47 -1
- package/dist/confirmation-dialog/ConfirmationDialog.d.cts +1 -0
- package/dist/confirmation-dialog/ConfirmationDialog.js +43 -1
- package/dist/confirmation-dialog/DialogProvider.cjs +16 -1
- package/dist/confirmation-dialog/DialogProvider.js +12 -1
- package/dist/confirmation-dialog/confirmation-dialogs.cjs +14 -1
- package/dist/confirmation-dialog/confirmation-dialogs.js +12 -1
- package/dist/confirmation-dialog/index.cjs +7 -1
- package/dist/confirmation-dialog/index.js +6 -1
- package/dist/file-upload/FileUpload.cjs +68 -1
- package/dist/file-upload/FileUpload.js +63 -1
- package/dist/file-upload/FileUploadItems.cjs +36 -1
- package/dist/file-upload/FileUploadItems.js +32 -1
- package/dist/file-upload/FileUploadListItem.cjs +89 -1
- package/dist/file-upload/FileUploadListItem.js +83 -1
- package/dist/file-upload/hooks/index.cjs +4 -1
- package/dist/file-upload/hooks/index.d.cts +2 -0
- package/dist/file-upload/hooks/index.js +3 -1
- package/dist/file-upload/hooks/use-file-error.cjs +15 -1
- package/dist/file-upload/hooks/use-file-error.js +14 -1
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.cjs +34 -1
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.d.cts +1 -0
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.js +32 -1
- package/dist/file-upload/hooks/use-file-upload-store.cjs +77 -1
- package/dist/file-upload/hooks/use-file-upload-store.d.cts +2 -0
- package/dist/file-upload/hooks/use-file-upload-store.js +75 -1
- package/dist/file-upload/index.cjs +6 -1
- package/dist/file-upload/index.d.cts +2 -1
- package/dist/file-upload/index.js +5 -1
- package/dist/file-upload/utils/create-placeholder-file.cjs +12 -1
- package/dist/file-upload/utils/create-placeholder-file.js +10 -1
- package/dist/file-upload/utils/get-file-key.cjs +9 -1
- package/dist/file-upload/utils/get-file-key.d.cts +1 -0
- package/dist/file-upload/utils/get-file-key.js +7 -1
- package/dist/file-upload/utils/get-file-meta.cjs +24 -1
- package/dist/file-upload/utils/get-file-meta.d.cts +1 -0
- package/dist/file-upload/utils/get-file-meta.js +21 -1
- package/dist/file-upload/utils/index.d.cts +4 -0
- package/dist/file-upload/utils/is-file-equal.cjs +10 -1
- package/dist/file-upload/utils/is-file-equal.d.cts +1 -0
- package/dist/file-upload/utils/is-file-equal.js +8 -1
- package/dist/file-upload/utils/merge-file-metadata.cjs +27 -1
- package/dist/file-upload/utils/merge-file-metadata.d.cts +1 -0
- package/dist/file-upload/utils/merge-file-metadata.js +26 -1
- package/dist/file-upload-inline/FileUploadInline.cjs +71 -1
- package/dist/file-upload-inline/FileUploadInline.js +66 -1
- package/dist/file-upload-inline/FileUploadInlineItem.cjs +96 -1
- package/dist/file-upload-inline/FileUploadInlineItem.js +90 -1
- package/dist/file-upload-inline/defaults.cjs +12 -1
- package/dist/file-upload-inline/defaults.js +10 -1
- package/dist/file-upload-inline/index.cjs +2 -1
- package/dist/file-upload-inline/index.js +1 -1
- package/dist/file-upload-inline/utils.cjs +37 -1
- package/dist/file-upload-inline/utils.js +34 -1
- package/dist/hooks/index.cjs +2 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-media-query.cjs +9 -1
- package/dist/hooks/use-media-query.js +7 -1
- package/dist/icon-selector/IconPicker.cjs +93 -1
- package/dist/icon-selector/IconPicker.js +88 -1
- package/dist/icon-selector/constants.cjs +7 -1
- package/dist/icon-selector/constants.js +5 -0
- package/dist/icon-selector/icon-picker-container.cjs +35 -1
- package/dist/icon-selector/icon-picker-container.js +32 -1
- package/dist/icon-selector/icon-picker-content.cjs +146 -1
- package/dist/icon-selector/icon-picker-content.js +141 -1
- package/dist/icon-selector/index.cjs +2 -1
- package/dist/icon-selector/index.js +1 -1
- package/dist/icon-selector/use-async-providers.cjs +69 -1
- package/dist/icon-selector/use-async-providers.js +67 -1
- package/dist/icon-selector/utils/is-valid-provider.cjs +12 -1
- package/dist/icon-selector/utils/is-valid-provider.js +10 -1
- package/dist/icon-selector/virtualized-icon-grid.cjs +137 -1
- package/dist/icon-selector/virtualized-icon-grid.js +132 -1
- package/dist/index.cjs +76 -1
- package/dist/index.js +37 -1
- 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
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +695 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +679 -1
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +521 -1
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +503 -1
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +165 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +175 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +151 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +138 -1
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.cjs +13 -0
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.js +11 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +108 -0
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es5/index.cjs +155 -0
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs +19 -0
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/.pnpm/detect-node-es@1.1.0/node_modules/detect-node-es/es5/node.cjs +14 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +9 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es5/index.cjs +22 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/tabbable@6.3.0/node_modules/tabbable/dist/index.cjs +347 -1
- package/dist/node_modules/.pnpm/tabbable@6.3.0/node_modules/tabbable/dist/index.esm.js +268 -1
- package/dist/node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.cjs +1895 -0
- package/dist/node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.js +1893 -0
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.cjs +557 -0
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +31 -0
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/packages/shadcn/src/components/index.cjs +6 -1
- package/dist/packages/shadcn/src/components/index.js +5 -1
- package/dist/packages/shadcn/src/components/ui/OrContinueWithSeparator.cjs +6 -1
- package/dist/packages/shadcn/src/components/ui/OrContinueWithSeparator.js +3 -1
- package/dist/packages/shadcn/src/components/ui/alert-dialog.cjs +10 -1
- package/dist/packages/shadcn/src/components/ui/alert-dialog.js +6 -1
- package/dist/packages/shadcn/src/components/ui/alert.cjs +44 -1
- package/dist/packages/shadcn/src/components/ui/alert.js +38 -1
- package/dist/packages/shadcn/src/components/ui/avatar.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/avatar.js +2 -1
- package/dist/packages/shadcn/src/components/ui/badge.cjs +20 -1
- package/dist/packages/shadcn/src/components/ui/badge.js +16 -1
- package/dist/packages/shadcn/src/components/ui/button.cjs +50 -1
- package/dist/packages/shadcn/src/components/ui/button.js +45 -1
- package/dist/packages/shadcn/src/components/ui/calendar.cjs +8 -1
- package/dist/packages/shadcn/src/components/ui/calendar.js +4 -1
- package/dist/packages/shadcn/src/components/ui/card.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/card.js +2 -1
- package/dist/packages/shadcn/src/components/ui/checkbox.cjs +10 -1
- package/dist/packages/shadcn/src/components/ui/checkbox.js +6 -1
- package/dist/packages/shadcn/src/components/ui/command.cjs +11 -1
- package/dist/packages/shadcn/src/components/ui/command.js +7 -1
- package/dist/packages/shadcn/src/components/ui/dialog.cjs +93 -1
- package/dist/packages/shadcn/src/components/ui/dialog.js +81 -1
- package/dist/packages/shadcn/src/components/ui/dropdown-menu.cjs +7 -1
- package/dist/packages/shadcn/src/components/ui/dropdown-menu.js +3 -1
- package/dist/packages/shadcn/src/components/ui/file-upload.cjs +49 -1
- package/dist/packages/shadcn/src/components/ui/file-upload.js +45 -1
- package/dist/packages/shadcn/src/components/ui/form.cjs +12 -1
- package/dist/packages/shadcn/src/components/ui/form.js +9 -1
- package/dist/packages/shadcn/src/components/ui/index.cjs +30 -1
- package/dist/packages/shadcn/src/components/ui/index.js +29 -1
- package/dist/packages/shadcn/src/components/ui/input.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/input.js +2 -1
- package/dist/packages/shadcn/src/components/ui/label.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/label.js +2 -1
- package/dist/packages/shadcn/src/components/ui/pagination.cjs +9 -1
- package/dist/packages/shadcn/src/components/ui/pagination.js +4 -1
- package/dist/packages/shadcn/src/components/ui/popover.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/popover.js +2 -1
- package/dist/packages/shadcn/src/components/ui/radio-group.cjs +7 -1
- package/dist/packages/shadcn/src/components/ui/radio-group.js +3 -1
- package/dist/packages/shadcn/src/components/ui/select.cjs +10 -1
- package/dist/packages/shadcn/src/components/ui/select.js +6 -1
- package/dist/packages/shadcn/src/components/ui/separator.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/separator.js +2 -1
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags/index.cjs +26 -1
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags/index.js +22 -1
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags-input-inline/index.cjs +6 -1
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags-input-inline/index.js +3 -1
- package/dist/packages/shadcn/src/components/ui/sheet.cjs +7 -1
- package/dist/packages/shadcn/src/components/ui/sheet.js +3 -1
- package/dist/packages/shadcn/src/components/ui/slider.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/slider.js +2 -1
- package/dist/packages/shadcn/src/components/ui/switch.cjs +8 -1
- package/dist/packages/shadcn/src/components/ui/switch.js +5 -1
- package/dist/packages/shadcn/src/components/ui/tabs.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/tabs.js +2 -1
- package/dist/packages/shadcn/src/components/ui/textarea.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/textarea.js +2 -1
- package/dist/packages/shadcn/src/components/ui/tooltip.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/tooltip.js +2 -1
- package/dist/packages/shadcn/src/lib/utils.cjs +11 -1
- package/dist/packages/shadcn/src/lib/utils.js +10 -1
- package/dist/pagination/Pagination.cjs +156 -1
- package/dist/pagination/Pagination.js +151 -1
- package/dist/pagination/index.cjs +2 -1
- package/dist/pagination/index.js +1 -1
- package/dist/rich-text-editor/RichTextEditor.cjs +132 -1
- package/dist/rich-text-editor/RichTextEditor.js +126 -1
- package/dist/rich-text-editor/index.cjs +2 -1
- package/dist/rich-text-editor/index.js +1 -1
- package/dist/rich-text-editor/predefined-toolbar-options.cjs +84 -1
- package/dist/rich-text-editor/predefined-toolbar-options.js +81 -1
- package/dist/spinner/index.cjs +2 -1
- package/dist/spinner/index.js +1 -1
- package/dist/spinner/spinner.cjs +73 -6
- package/dist/spinner/spinner.js +70 -6
- package/dist/spinner/styles.cjs +25 -12
- package/dist/spinner/styles.js +23 -12
- package/dist/tags-input.cjs +226 -1
- package/dist/tags-input.js +222 -1
- package/dist/theme-provider/ThemeProvider.cjs +27 -1
- package/dist/theme-provider/ThemeProvider.js +23 -1
- package/dist/theme-provider/index.cjs +4 -1
- package/dist/theme-provider/index.js +4 -1
- package/dist/toast/AlertToast.cjs +36 -1
- package/dist/toast/AlertToast.js +31 -1
- package/dist/toast/index.cjs +2 -1
- package/dist/toast/index.js +1 -1
- package/dist/toast/toast.cjs +75 -1
- package/dist/toast/toast.js +66 -1
- package/package.json +3 -3
- package/dist/packages/shadcn/src/lib/index.cjs +0 -1
- package/dist/packages/shadcn/src/lib/index.js +0 -1
package/dist/tags-input.cjs
CHANGED
|
@@ -1 +1,226 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
5
|
+
const require_CommandOptionList = require('./CommandOptionList.cjs');
|
|
6
|
+
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
7
|
+
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
8
|
+
let react = require("react");
|
|
9
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
10
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
12
|
+
|
|
13
|
+
//#region src/tags-input.tsx
|
|
14
|
+
const EMPTY_ARRAY = [];
|
|
15
|
+
const EMPTY_OPTIONS = [];
|
|
16
|
+
/**
|
|
17
|
+
* TagsInput component - Inline tags input based on DiceUI
|
|
18
|
+
*
|
|
19
|
+
* This is a different implementation than TagsInput, using the DiceUI library
|
|
20
|
+
* for a more streamlined inline editing experience.
|
|
21
|
+
*
|
|
22
|
+
* Features:
|
|
23
|
+
* - Inline tag display and editing
|
|
24
|
+
* - Keyboard navigation (Arrow keys, Home, End, Delete, Backspace)
|
|
25
|
+
* - Optional tag editing (editable prop)
|
|
26
|
+
* - Validation support
|
|
27
|
+
* - Paste support with delimiter parsing
|
|
28
|
+
* - Max tags limit
|
|
29
|
+
* - Options support with dropdown (like Select)
|
|
30
|
+
* - freeSolo mode for custom tags (like MUI Autocomplete)
|
|
31
|
+
*/
|
|
32
|
+
function TagsInput({ value = EMPTY_ARRAY, onChange, options = EMPTY_OPTIONS, freeSolo = true, placeholder = "Add tags...", emptyText = "No options found.", className, disabled = false, readOnly = false, maxTags, allowDuplicates = false, editable = false, label, delimiter = ",", addOnPaste = true, addOnTab = true, onValidate }) {
|
|
33
|
+
const [open, setOpen] = (0, react.useState)(false);
|
|
34
|
+
const [searchValue, setSearchValue] = (0, react.useState)("");
|
|
35
|
+
const inputRef = (0, react.useRef)(null);
|
|
36
|
+
const hasOptions = options.length > 0;
|
|
37
|
+
(0, react.useEffect)(() => {
|
|
38
|
+
if (open && inputRef.current) {
|
|
39
|
+
const timer = setTimeout(() => {
|
|
40
|
+
inputRef.current?.focus();
|
|
41
|
+
}, 0);
|
|
42
|
+
return () => {
|
|
43
|
+
clearTimeout(timer);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}, [open]);
|
|
47
|
+
const stringValues = (0, react.useMemo)(() => {
|
|
48
|
+
return value.map((v) => String(v));
|
|
49
|
+
}, [value]);
|
|
50
|
+
const getLabel = (0, react.useCallback)((val) => {
|
|
51
|
+
if (!hasOptions) return String(val);
|
|
52
|
+
return options.find((opt) => String(opt.value) === String(val))?.label ?? String(val);
|
|
53
|
+
}, [options, hasOptions]);
|
|
54
|
+
const filteredOptions = (0, react.useMemo)(() => {
|
|
55
|
+
if (!hasOptions) return [];
|
|
56
|
+
return options.filter((option) => {
|
|
57
|
+
if (searchValue) return option.label.toLowerCase().includes(searchValue.toLowerCase());
|
|
58
|
+
return true;
|
|
59
|
+
});
|
|
60
|
+
}, [
|
|
61
|
+
options,
|
|
62
|
+
searchValue,
|
|
63
|
+
hasOptions
|
|
64
|
+
]);
|
|
65
|
+
const handleValueChange = (0, react.useCallback)((newTags) => {
|
|
66
|
+
setSearchValue("");
|
|
67
|
+
if (hasOptions) {
|
|
68
|
+
const convertedValues = newTags.map((tag) => {
|
|
69
|
+
return options.find((opt) => String(opt.value) === tag)?.value ?? tag;
|
|
70
|
+
});
|
|
71
|
+
onChange?.(convertedValues);
|
|
72
|
+
} else onChange?.(newTags);
|
|
73
|
+
}, [
|
|
74
|
+
onChange,
|
|
75
|
+
options,
|
|
76
|
+
hasOptions
|
|
77
|
+
]);
|
|
78
|
+
const handleValidate = (0, react.useCallback)((tag) => {
|
|
79
|
+
if (maxTags !== void 0 && value.length >= maxTags) return false;
|
|
80
|
+
if (!allowDuplicates && stringValues.includes(tag)) return false;
|
|
81
|
+
if (hasOptions && !freeSolo) {
|
|
82
|
+
if (!options.some((opt) => String(opt.value) === tag)) return false;
|
|
83
|
+
}
|
|
84
|
+
if (onValidate) return onValidate(tag);
|
|
85
|
+
return true;
|
|
86
|
+
}, [
|
|
87
|
+
value,
|
|
88
|
+
maxTags,
|
|
89
|
+
allowDuplicates,
|
|
90
|
+
onValidate,
|
|
91
|
+
stringValues,
|
|
92
|
+
hasOptions,
|
|
93
|
+
freeSolo,
|
|
94
|
+
options
|
|
95
|
+
]);
|
|
96
|
+
const handleSelectOption = (0, react.useCallback)((optionValue) => {
|
|
97
|
+
const isSelected = value.some((v) => String(v) === String(optionValue));
|
|
98
|
+
let newValues;
|
|
99
|
+
if (isSelected) newValues = value.filter((v) => String(v) !== String(optionValue));
|
|
100
|
+
else newValues = [...value, optionValue];
|
|
101
|
+
onChange?.(newValues);
|
|
102
|
+
setSearchValue("");
|
|
103
|
+
}, [value, onChange]);
|
|
104
|
+
if (!hasOptions) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.TagsInputInLineRoot, {
|
|
105
|
+
className,
|
|
106
|
+
disabled,
|
|
107
|
+
editable,
|
|
108
|
+
max: maxTags,
|
|
109
|
+
onValueChange: handleValueChange,
|
|
110
|
+
onValidate: handleValidate,
|
|
111
|
+
readOnly,
|
|
112
|
+
value: stringValues,
|
|
113
|
+
delimiter,
|
|
114
|
+
addOnPaste,
|
|
115
|
+
addOnTab,
|
|
116
|
+
children: [
|
|
117
|
+
label !== void 0 && label !== "" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TagsInputInLineLabel, { children: label }) : null,
|
|
118
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.TagsInputInLineList, { children: [stringValues.map((tag) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TagsInputInLineItem, {
|
|
119
|
+
value: tag,
|
|
120
|
+
children: tag
|
|
121
|
+
}, tag)), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TagsInputInLineInput, { placeholder })] }),
|
|
122
|
+
value.length > 0 && !disabled && !readOnly && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TagsInputInLineClear, {})
|
|
123
|
+
]
|
|
124
|
+
});
|
|
125
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
126
|
+
className: (0, __pixpilot_shadcn.cn)("relative", className),
|
|
127
|
+
children: [label !== void 0 && label !== "" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TagsInputInLineLabel, { children: label }) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Popover, {
|
|
128
|
+
open: open && !disabled && !readOnly,
|
|
129
|
+
onOpenChange: setOpen,
|
|
130
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PopoverTrigger, {
|
|
131
|
+
asChild: true,
|
|
132
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
133
|
+
className: "w-full",
|
|
134
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.TagsInputInLineRoot, {
|
|
135
|
+
disabled,
|
|
136
|
+
editable,
|
|
137
|
+
max: maxTags,
|
|
138
|
+
onValueChange: handleValueChange,
|
|
139
|
+
onValidate: handleValidate,
|
|
140
|
+
readOnly,
|
|
141
|
+
value: stringValues,
|
|
142
|
+
delimiter: freeSolo ? delimiter : void 0,
|
|
143
|
+
addOnPaste: freeSolo ? addOnPaste : false,
|
|
144
|
+
addOnTab: freeSolo ? addOnTab : false,
|
|
145
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.TagsInputInLineList, {
|
|
146
|
+
onClick: (e) => {
|
|
147
|
+
if (!disabled && !readOnly) {
|
|
148
|
+
e.stopPropagation();
|
|
149
|
+
setOpen(true);
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
children: [value.map((val) => {
|
|
153
|
+
const displayLabel = getLabel(val);
|
|
154
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TagsInputInLineItem, {
|
|
155
|
+
value: String(val),
|
|
156
|
+
children: displayLabel
|
|
157
|
+
}, String(val));
|
|
158
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TagsInputInLineInput, {
|
|
159
|
+
ref: inputRef,
|
|
160
|
+
placeholder,
|
|
161
|
+
onFocus: (e) => {
|
|
162
|
+
e.stopPropagation();
|
|
163
|
+
setOpen(true);
|
|
164
|
+
},
|
|
165
|
+
onChange: (e) => {
|
|
166
|
+
e.stopPropagation();
|
|
167
|
+
setSearchValue(e.target.value);
|
|
168
|
+
},
|
|
169
|
+
onKeyDown: (e) => {
|
|
170
|
+
if (open && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
|
|
171
|
+
e.preventDefault();
|
|
172
|
+
e.stopPropagation();
|
|
173
|
+
const command = document.querySelector("[cmdk-root]");
|
|
174
|
+
if (command) {
|
|
175
|
+
const event = new KeyboardEvent("keydown", {
|
|
176
|
+
key: e.key,
|
|
177
|
+
bubbles: true,
|
|
178
|
+
cancelable: true
|
|
179
|
+
});
|
|
180
|
+
command.dispatchEvent(event);
|
|
181
|
+
}
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
if (open && e.key === "Enter") {
|
|
185
|
+
const selectedItem = document.querySelector("[cmdk-item][data-selected=\"true\"]");
|
|
186
|
+
if (selectedItem) {
|
|
187
|
+
e.preventDefault();
|
|
188
|
+
e.stopPropagation();
|
|
189
|
+
selectedItem.click();
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
e.stopPropagation();
|
|
194
|
+
},
|
|
195
|
+
onMouseDown: (e) => {
|
|
196
|
+
e.stopPropagation();
|
|
197
|
+
}
|
|
198
|
+
})]
|
|
199
|
+
}), value.length > 0 && !disabled && !readOnly && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TagsInputInLineClear, {})]
|
|
200
|
+
})
|
|
201
|
+
})
|
|
202
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PopoverContent, {
|
|
203
|
+
className: "p-0",
|
|
204
|
+
align: "start",
|
|
205
|
+
style: { width: "var(--radix-popover-trigger-width)" },
|
|
206
|
+
onOpenAutoFocus: (e) => {
|
|
207
|
+
e.preventDefault();
|
|
208
|
+
},
|
|
209
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Command, {
|
|
210
|
+
shouldFilter: false,
|
|
211
|
+
value: searchValue,
|
|
212
|
+
loop: true,
|
|
213
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_CommandOptionList.CommandOptionList, {
|
|
214
|
+
options: filteredOptions,
|
|
215
|
+
value,
|
|
216
|
+
onChange: handleSelectOption,
|
|
217
|
+
emptyText
|
|
218
|
+
})
|
|
219
|
+
})
|
|
220
|
+
})]
|
|
221
|
+
})]
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
//#endregion
|
|
226
|
+
exports.TagsInput = TagsInput;
|
package/dist/tags-input.js
CHANGED
|
@@ -1 +1,222 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { CommandOptionList } from "./CommandOptionList.js";
|
|
5
|
+
import { Command, Popover, PopoverContent, PopoverTrigger, TagsInputInLineClear, TagsInputInLineInput, TagsInputInLineItem, TagsInputInLineLabel, TagsInputInLineList, TagsInputInLineRoot, cn } from "@pixpilot/shadcn";
|
|
6
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region src/tags-input.tsx
|
|
10
|
+
const EMPTY_ARRAY = [];
|
|
11
|
+
const EMPTY_OPTIONS = [];
|
|
12
|
+
/**
|
|
13
|
+
* TagsInput component - Inline tags input based on DiceUI
|
|
14
|
+
*
|
|
15
|
+
* This is a different implementation than TagsInput, using the DiceUI library
|
|
16
|
+
* for a more streamlined inline editing experience.
|
|
17
|
+
*
|
|
18
|
+
* Features:
|
|
19
|
+
* - Inline tag display and editing
|
|
20
|
+
* - Keyboard navigation (Arrow keys, Home, End, Delete, Backspace)
|
|
21
|
+
* - Optional tag editing (editable prop)
|
|
22
|
+
* - Validation support
|
|
23
|
+
* - Paste support with delimiter parsing
|
|
24
|
+
* - Max tags limit
|
|
25
|
+
* - Options support with dropdown (like Select)
|
|
26
|
+
* - freeSolo mode for custom tags (like MUI Autocomplete)
|
|
27
|
+
*/
|
|
28
|
+
function TagsInput({ value = EMPTY_ARRAY, onChange, options = EMPTY_OPTIONS, freeSolo = true, placeholder = "Add tags...", emptyText = "No options found.", className, disabled = false, readOnly = false, maxTags, allowDuplicates = false, editable = false, label, delimiter = ",", addOnPaste = true, addOnTab = true, onValidate }) {
|
|
29
|
+
const [open, setOpen] = useState(false);
|
|
30
|
+
const [searchValue, setSearchValue] = useState("");
|
|
31
|
+
const inputRef = useRef(null);
|
|
32
|
+
const hasOptions = options.length > 0;
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (open && inputRef.current) {
|
|
35
|
+
const timer = setTimeout(() => {
|
|
36
|
+
inputRef.current?.focus();
|
|
37
|
+
}, 0);
|
|
38
|
+
return () => {
|
|
39
|
+
clearTimeout(timer);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}, [open]);
|
|
43
|
+
const stringValues = useMemo(() => {
|
|
44
|
+
return value.map((v) => String(v));
|
|
45
|
+
}, [value]);
|
|
46
|
+
const getLabel = useCallback((val) => {
|
|
47
|
+
if (!hasOptions) return String(val);
|
|
48
|
+
return options.find((opt) => String(opt.value) === String(val))?.label ?? String(val);
|
|
49
|
+
}, [options, hasOptions]);
|
|
50
|
+
const filteredOptions = useMemo(() => {
|
|
51
|
+
if (!hasOptions) return [];
|
|
52
|
+
return options.filter((option) => {
|
|
53
|
+
if (searchValue) return option.label.toLowerCase().includes(searchValue.toLowerCase());
|
|
54
|
+
return true;
|
|
55
|
+
});
|
|
56
|
+
}, [
|
|
57
|
+
options,
|
|
58
|
+
searchValue,
|
|
59
|
+
hasOptions
|
|
60
|
+
]);
|
|
61
|
+
const handleValueChange = useCallback((newTags) => {
|
|
62
|
+
setSearchValue("");
|
|
63
|
+
if (hasOptions) {
|
|
64
|
+
const convertedValues = newTags.map((tag) => {
|
|
65
|
+
return options.find((opt) => String(opt.value) === tag)?.value ?? tag;
|
|
66
|
+
});
|
|
67
|
+
onChange?.(convertedValues);
|
|
68
|
+
} else onChange?.(newTags);
|
|
69
|
+
}, [
|
|
70
|
+
onChange,
|
|
71
|
+
options,
|
|
72
|
+
hasOptions
|
|
73
|
+
]);
|
|
74
|
+
const handleValidate = useCallback((tag) => {
|
|
75
|
+
if (maxTags !== void 0 && value.length >= maxTags) return false;
|
|
76
|
+
if (!allowDuplicates && stringValues.includes(tag)) return false;
|
|
77
|
+
if (hasOptions && !freeSolo) {
|
|
78
|
+
if (!options.some((opt) => String(opt.value) === tag)) return false;
|
|
79
|
+
}
|
|
80
|
+
if (onValidate) return onValidate(tag);
|
|
81
|
+
return true;
|
|
82
|
+
}, [
|
|
83
|
+
value,
|
|
84
|
+
maxTags,
|
|
85
|
+
allowDuplicates,
|
|
86
|
+
onValidate,
|
|
87
|
+
stringValues,
|
|
88
|
+
hasOptions,
|
|
89
|
+
freeSolo,
|
|
90
|
+
options
|
|
91
|
+
]);
|
|
92
|
+
const handleSelectOption = useCallback((optionValue) => {
|
|
93
|
+
const isSelected = value.some((v) => String(v) === String(optionValue));
|
|
94
|
+
let newValues;
|
|
95
|
+
if (isSelected) newValues = value.filter((v) => String(v) !== String(optionValue));
|
|
96
|
+
else newValues = [...value, optionValue];
|
|
97
|
+
onChange?.(newValues);
|
|
98
|
+
setSearchValue("");
|
|
99
|
+
}, [value, onChange]);
|
|
100
|
+
if (!hasOptions) return /* @__PURE__ */ jsxs(TagsInputInLineRoot, {
|
|
101
|
+
className,
|
|
102
|
+
disabled,
|
|
103
|
+
editable,
|
|
104
|
+
max: maxTags,
|
|
105
|
+
onValueChange: handleValueChange,
|
|
106
|
+
onValidate: handleValidate,
|
|
107
|
+
readOnly,
|
|
108
|
+
value: stringValues,
|
|
109
|
+
delimiter,
|
|
110
|
+
addOnPaste,
|
|
111
|
+
addOnTab,
|
|
112
|
+
children: [
|
|
113
|
+
label !== void 0 && label !== "" ? /* @__PURE__ */ jsx(TagsInputInLineLabel, { children: label }) : null,
|
|
114
|
+
/* @__PURE__ */ jsxs(TagsInputInLineList, { children: [stringValues.map((tag) => /* @__PURE__ */ jsx(TagsInputInLineItem, {
|
|
115
|
+
value: tag,
|
|
116
|
+
children: tag
|
|
117
|
+
}, tag)), /* @__PURE__ */ jsx(TagsInputInLineInput, { placeholder })] }),
|
|
118
|
+
value.length > 0 && !disabled && !readOnly && /* @__PURE__ */ jsx(TagsInputInLineClear, {})
|
|
119
|
+
]
|
|
120
|
+
});
|
|
121
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
122
|
+
className: cn("relative", className),
|
|
123
|
+
children: [label !== void 0 && label !== "" ? /* @__PURE__ */ jsx(TagsInputInLineLabel, { children: label }) : null, /* @__PURE__ */ jsxs(Popover, {
|
|
124
|
+
open: open && !disabled && !readOnly,
|
|
125
|
+
onOpenChange: setOpen,
|
|
126
|
+
children: [/* @__PURE__ */ jsx(PopoverTrigger, {
|
|
127
|
+
asChild: true,
|
|
128
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
129
|
+
className: "w-full",
|
|
130
|
+
children: /* @__PURE__ */ jsxs(TagsInputInLineRoot, {
|
|
131
|
+
disabled,
|
|
132
|
+
editable,
|
|
133
|
+
max: maxTags,
|
|
134
|
+
onValueChange: handleValueChange,
|
|
135
|
+
onValidate: handleValidate,
|
|
136
|
+
readOnly,
|
|
137
|
+
value: stringValues,
|
|
138
|
+
delimiter: freeSolo ? delimiter : void 0,
|
|
139
|
+
addOnPaste: freeSolo ? addOnPaste : false,
|
|
140
|
+
addOnTab: freeSolo ? addOnTab : false,
|
|
141
|
+
children: [/* @__PURE__ */ jsxs(TagsInputInLineList, {
|
|
142
|
+
onClick: (e) => {
|
|
143
|
+
if (!disabled && !readOnly) {
|
|
144
|
+
e.stopPropagation();
|
|
145
|
+
setOpen(true);
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
children: [value.map((val) => {
|
|
149
|
+
const displayLabel = getLabel(val);
|
|
150
|
+
return /* @__PURE__ */ jsx(TagsInputInLineItem, {
|
|
151
|
+
value: String(val),
|
|
152
|
+
children: displayLabel
|
|
153
|
+
}, String(val));
|
|
154
|
+
}), /* @__PURE__ */ jsx(TagsInputInLineInput, {
|
|
155
|
+
ref: inputRef,
|
|
156
|
+
placeholder,
|
|
157
|
+
onFocus: (e) => {
|
|
158
|
+
e.stopPropagation();
|
|
159
|
+
setOpen(true);
|
|
160
|
+
},
|
|
161
|
+
onChange: (e) => {
|
|
162
|
+
e.stopPropagation();
|
|
163
|
+
setSearchValue(e.target.value);
|
|
164
|
+
},
|
|
165
|
+
onKeyDown: (e) => {
|
|
166
|
+
if (open && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
|
|
167
|
+
e.preventDefault();
|
|
168
|
+
e.stopPropagation();
|
|
169
|
+
const command = document.querySelector("[cmdk-root]");
|
|
170
|
+
if (command) {
|
|
171
|
+
const event = new KeyboardEvent("keydown", {
|
|
172
|
+
key: e.key,
|
|
173
|
+
bubbles: true,
|
|
174
|
+
cancelable: true
|
|
175
|
+
});
|
|
176
|
+
command.dispatchEvent(event);
|
|
177
|
+
}
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
if (open && e.key === "Enter") {
|
|
181
|
+
const selectedItem = document.querySelector("[cmdk-item][data-selected=\"true\"]");
|
|
182
|
+
if (selectedItem) {
|
|
183
|
+
e.preventDefault();
|
|
184
|
+
e.stopPropagation();
|
|
185
|
+
selectedItem.click();
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
e.stopPropagation();
|
|
190
|
+
},
|
|
191
|
+
onMouseDown: (e) => {
|
|
192
|
+
e.stopPropagation();
|
|
193
|
+
}
|
|
194
|
+
})]
|
|
195
|
+
}), value.length > 0 && !disabled && !readOnly && /* @__PURE__ */ jsx(TagsInputInLineClear, {})]
|
|
196
|
+
})
|
|
197
|
+
})
|
|
198
|
+
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
199
|
+
className: "p-0",
|
|
200
|
+
align: "start",
|
|
201
|
+
style: { width: "var(--radix-popover-trigger-width)" },
|
|
202
|
+
onOpenAutoFocus: (e) => {
|
|
203
|
+
e.preventDefault();
|
|
204
|
+
},
|
|
205
|
+
children: /* @__PURE__ */ jsx(Command, {
|
|
206
|
+
shouldFilter: false,
|
|
207
|
+
value: searchValue,
|
|
208
|
+
loop: true,
|
|
209
|
+
children: /* @__PURE__ */ jsx(CommandOptionList, {
|
|
210
|
+
options: filteredOptions,
|
|
211
|
+
value,
|
|
212
|
+
onChange: handleSelectOption,
|
|
213
|
+
emptyText
|
|
214
|
+
})
|
|
215
|
+
})
|
|
216
|
+
})]
|
|
217
|
+
})]
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
//#endregion
|
|
222
|
+
export { TagsInput };
|
|
@@ -1 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
5
|
+
let react = require("react");
|
|
6
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
9
|
+
let next_themes = require("next-themes");
|
|
10
|
+
next_themes = require_rolldown_runtime.__toESM(next_themes);
|
|
11
|
+
|
|
12
|
+
//#region src/theme-provider/ThemeProvider.tsx
|
|
13
|
+
const ThemeProvider = (props) => {
|
|
14
|
+
const { children } = props;
|
|
15
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(next_themes.ThemeProvider, {
|
|
16
|
+
attribute: "class",
|
|
17
|
+
defaultTheme: "system",
|
|
18
|
+
enableSystem: true,
|
|
19
|
+
disableTransitionOnChange: false,
|
|
20
|
+
...props,
|
|
21
|
+
children
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
ThemeProvider.displayName = "ThemeProvider";
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
exports.ThemeProvider = ThemeProvider;
|
|
@@ -1 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { ThemeProvider } from "next-themes";
|
|
7
|
+
|
|
8
|
+
//#region src/theme-provider/ThemeProvider.tsx
|
|
9
|
+
const ThemeProvider$1 = (props) => {
|
|
10
|
+
const { children } = props;
|
|
11
|
+
return /* @__PURE__ */ jsx(ThemeProvider, {
|
|
12
|
+
attribute: "class",
|
|
13
|
+
defaultTheme: "system",
|
|
14
|
+
enableSystem: true,
|
|
15
|
+
disableTransitionOnChange: false,
|
|
16
|
+
...props,
|
|
17
|
+
children
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
ThemeProvider$1.displayName = "ThemeProvider";
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { ThemeProvider$1 as ThemeProvider };
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_ThemeProvider = require('./ThemeProvider.cjs');
|
|
3
|
+
let next_themes = require("next-themes");
|
|
4
|
+
next_themes = require_rolldown_runtime.__toESM(next_themes);
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
import{ThemeProvider as
|
|
1
|
+
import { ThemeProvider as ThemeProvider$1 } from "./ThemeProvider.js";
|
|
2
|
+
import { useTheme as useTheme$1 } from "next-themes";
|
|
3
|
+
|
|
4
|
+
export { useTheme$1 as useTheme };
|
|
@@ -1 +1,36 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_Alert = require('../Alert.cjs');
|
|
3
|
+
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
4
|
+
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
5
|
+
let lucide_react = require("lucide-react");
|
|
6
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_react);
|
|
7
|
+
let react = require("react");
|
|
8
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
9
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
11
|
+
|
|
12
|
+
//#region src/toast/AlertToast.tsx
|
|
13
|
+
const AlertToast = (props) => {
|
|
14
|
+
const { duration, onClose,...rest } = props;
|
|
15
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.Alert, {
|
|
16
|
+
icon: true,
|
|
17
|
+
...rest,
|
|
18
|
+
className: (0, __pixpilot_shadcn.cn)("shadow-md", props.className, { "pr-3": onClose }),
|
|
19
|
+
children: onClose && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
20
|
+
className: "flex items-start pt-0.5 pl-1",
|
|
21
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
22
|
+
type: "button",
|
|
23
|
+
className: "cursor-pointer opacity-80 transition-opacity hover:opacity-100",
|
|
24
|
+
onClick: onClose,
|
|
25
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.XIcon, { className: "size-4.5" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
26
|
+
className: "sr-only",
|
|
27
|
+
children: "Close"
|
|
28
|
+
})]
|
|
29
|
+
})
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
AlertToast.displayName = "AlertToast";
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
exports.AlertToast = AlertToast;
|
package/dist/toast/AlertToast.js
CHANGED
|
@@ -1 +1,31 @@
|
|
|
1
|
-
import{Alert
|
|
1
|
+
import { Alert } from "../Alert.js";
|
|
2
|
+
import { cn } from "@pixpilot/shadcn";
|
|
3
|
+
import { XIcon } from "lucide-react";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/toast/AlertToast.tsx
|
|
8
|
+
const AlertToast = (props) => {
|
|
9
|
+
const { duration, onClose,...rest } = props;
|
|
10
|
+
return /* @__PURE__ */ jsx(Alert, {
|
|
11
|
+
icon: true,
|
|
12
|
+
...rest,
|
|
13
|
+
className: cn("shadow-md", props.className, { "pr-3": onClose }),
|
|
14
|
+
children: onClose && /* @__PURE__ */ jsx("div", {
|
|
15
|
+
className: "flex items-start pt-0.5 pl-1",
|
|
16
|
+
children: /* @__PURE__ */ jsxs("button", {
|
|
17
|
+
type: "button",
|
|
18
|
+
className: "cursor-pointer opacity-80 transition-opacity hover:opacity-100",
|
|
19
|
+
onClick: onClose,
|
|
20
|
+
children: [/* @__PURE__ */ jsx(XIcon, { className: "size-4.5" }), /* @__PURE__ */ jsx("span", {
|
|
21
|
+
className: "sr-only",
|
|
22
|
+
children: "Close"
|
|
23
|
+
})]
|
|
24
|
+
})
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
AlertToast.displayName = "AlertToast";
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { AlertToast };
|
package/dist/toast/index.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_toast = require('./toast.cjs');
|
package/dist/toast/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_ALERT_DURATION
|
|
1
|
+
import { DEFAULT_ALERT_DURATION, toast, toastError, toastInfo, toastSuccess, toastWarning } from "./toast.js";
|