@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
|
@@ -1 +1,43 @@
|
|
|
1
|
-
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __esm = (fn, res) => function() {
|
|
9
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
10
|
+
};
|
|
11
|
+
var __commonJS = (cb, mod) => function() {
|
|
12
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
13
|
+
};
|
|
14
|
+
var __export = (all) => {
|
|
15
|
+
let target = {};
|
|
16
|
+
for (var name in all) __defProp(target, name, {
|
|
17
|
+
get: all[name],
|
|
18
|
+
enumerable: true
|
|
19
|
+
});
|
|
20
|
+
return target;
|
|
21
|
+
};
|
|
22
|
+
var __copyProps = (to, from, except, desc) => {
|
|
23
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
24
|
+
key = keys[i];
|
|
25
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
26
|
+
get: ((k) => from[k]).bind(null, key),
|
|
27
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
32
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
33
|
+
value: mod,
|
|
34
|
+
enumerable: true
|
|
35
|
+
}) : target, mod));
|
|
36
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) {
|
|
38
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
39
|
+
throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function.");
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
//#endregion
|
|
43
|
+
export { __commonJS, __esm, __export, __require, __toCommonJS, __toESM };
|
|
@@ -1 +1,47 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_dialog = require('../packages/shadcn/src/components/ui/dialog.cjs');
|
|
3
|
+
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
4
|
+
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
7
|
+
let __ebay_nice_modal_react = require("@ebay/nice-modal-react");
|
|
8
|
+
__ebay_nice_modal_react = require_rolldown_runtime.__toESM(__ebay_nice_modal_react);
|
|
9
|
+
|
|
10
|
+
//#region src/confirmation-dialog/ConfirmationDialog.tsx
|
|
11
|
+
const ConfirmationDialog = __ebay_nice_modal_react.default.create((props) => {
|
|
12
|
+
const { title = "Confirmation Dialog" } = props;
|
|
13
|
+
const modal = (0, __ebay_nice_modal_react.useModal)();
|
|
14
|
+
const handleConfirm = () => {
|
|
15
|
+
props.onConfirm?.();
|
|
16
|
+
modal.resolve(true);
|
|
17
|
+
modal.hide();
|
|
18
|
+
};
|
|
19
|
+
const handleCancel = () => {
|
|
20
|
+
props.onCancel?.();
|
|
21
|
+
modal.resolve(false);
|
|
22
|
+
modal.hide();
|
|
23
|
+
};
|
|
24
|
+
const onOpenChange = (isOpen) => {
|
|
25
|
+
if (!isOpen) handleCancel();
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_dialog.Dialog, {
|
|
28
|
+
open: modal.visible,
|
|
29
|
+
onOpenChange,
|
|
30
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_dialog.DialogContent, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_dialog.DialogHeader, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_dialog.DialogTitle, { children: title }), props.description != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_dialog.DialogDescription, { children: props.description })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_dialog.DialogFooter, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_dialog.DialogClose, {
|
|
31
|
+
asChild: true,
|
|
32
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Button, {
|
|
33
|
+
variant: "outline",
|
|
34
|
+
onClick: handleCancel,
|
|
35
|
+
children: props.cancelText ?? "Cancel"
|
|
36
|
+
})
|
|
37
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Button, {
|
|
38
|
+
onClick: handleConfirm,
|
|
39
|
+
children: props.confirmText ?? "Confirm"
|
|
40
|
+
})] })] })
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
ConfirmationDialog.displayName = "ConfirmationDialog";
|
|
44
|
+
var ConfirmationDialog_default = ConfirmationDialog;
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
47
|
+
exports.default = ConfirmationDialog_default;
|
|
@@ -1 +1,43 @@
|
|
|
1
|
-
import{Dialog as
|
|
1
|
+
import { Dialog as Dialog$1, DialogClose, DialogContent as DialogContent$1, DialogDescription, DialogFooter, DialogHeader as DialogHeader$1, DialogTitle as DialogTitle$1 } from "../packages/shadcn/src/components/ui/dialog.js";
|
|
2
|
+
import { Button } from "@pixpilot/shadcn";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import NiceModal, { useModal } from "@ebay/nice-modal-react";
|
|
5
|
+
|
|
6
|
+
//#region src/confirmation-dialog/ConfirmationDialog.tsx
|
|
7
|
+
const ConfirmationDialog = NiceModal.create((props) => {
|
|
8
|
+
const { title = "Confirmation Dialog" } = props;
|
|
9
|
+
const modal = useModal();
|
|
10
|
+
const handleConfirm = () => {
|
|
11
|
+
props.onConfirm?.();
|
|
12
|
+
modal.resolve(true);
|
|
13
|
+
modal.hide();
|
|
14
|
+
};
|
|
15
|
+
const handleCancel = () => {
|
|
16
|
+
props.onCancel?.();
|
|
17
|
+
modal.resolve(false);
|
|
18
|
+
modal.hide();
|
|
19
|
+
};
|
|
20
|
+
const onOpenChange = (isOpen) => {
|
|
21
|
+
if (!isOpen) handleCancel();
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ jsx(Dialog$1, {
|
|
24
|
+
open: modal.visible,
|
|
25
|
+
onOpenChange,
|
|
26
|
+
children: /* @__PURE__ */ jsxs(DialogContent$1, { children: [/* @__PURE__ */ jsxs(DialogHeader$1, { children: [/* @__PURE__ */ jsx(DialogTitle$1, { children: title }), props.description != null && /* @__PURE__ */ jsx(DialogDescription, { children: props.description })] }), /* @__PURE__ */ jsxs(DialogFooter, { children: [/* @__PURE__ */ jsx(DialogClose, {
|
|
27
|
+
asChild: true,
|
|
28
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
29
|
+
variant: "outline",
|
|
30
|
+
onClick: handleCancel,
|
|
31
|
+
children: props.cancelText ?? "Cancel"
|
|
32
|
+
})
|
|
33
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
34
|
+
onClick: handleConfirm,
|
|
35
|
+
children: props.confirmText ?? "Confirm"
|
|
36
|
+
})] })] })
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
ConfirmationDialog.displayName = "ConfirmationDialog";
|
|
40
|
+
var ConfirmationDialog_default = ConfirmationDialog;
|
|
41
|
+
|
|
42
|
+
//#endregion
|
|
43
|
+
export { ConfirmationDialog_default as default };
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let react = require("react");
|
|
3
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
6
|
+
let __ebay_nice_modal_react = require("@ebay/nice-modal-react");
|
|
7
|
+
__ebay_nice_modal_react = require_rolldown_runtime.__toESM(__ebay_nice_modal_react);
|
|
8
|
+
|
|
9
|
+
//#region src/confirmation-dialog/DialogProvider.tsx
|
|
10
|
+
const DialogProvider = (props) => {
|
|
11
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ebay_nice_modal_react.default.Provider, { children: props.children });
|
|
12
|
+
};
|
|
13
|
+
DialogProvider.displayName = "DialogProvider";
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
exports.DialogProvider = DialogProvider;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import NiceModal from "@ebay/nice-modal-react";
|
|
4
|
+
|
|
5
|
+
//#region src/confirmation-dialog/DialogProvider.tsx
|
|
6
|
+
const DialogProvider = (props) => {
|
|
7
|
+
return /* @__PURE__ */ jsx(NiceModal.Provider, { children: props.children });
|
|
8
|
+
};
|
|
9
|
+
DialogProvider.displayName = "DialogProvider";
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { DialogProvider };
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_ConfirmationDialog = require('./ConfirmationDialog.cjs');
|
|
3
|
+
let __ebay_nice_modal_react = require("@ebay/nice-modal-react");
|
|
4
|
+
__ebay_nice_modal_react = require_rolldown_runtime.__toESM(__ebay_nice_modal_react);
|
|
5
|
+
|
|
6
|
+
//#region src/confirmation-dialog/confirmation-dialogs.tsx
|
|
7
|
+
async function showConfirmDialog(props) {
|
|
8
|
+
const id = crypto.randomUUID();
|
|
9
|
+
__ebay_nice_modal_react.default.register(id, require_ConfirmationDialog.default);
|
|
10
|
+
return __ebay_nice_modal_react.default.show(id, props);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
exports.showConfirmDialog = showConfirmDialog;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ConfirmationDialog_default from "./ConfirmationDialog.js";
|
|
2
|
+
import NiceModal from "@ebay/nice-modal-react";
|
|
3
|
+
|
|
4
|
+
//#region src/confirmation-dialog/confirmation-dialogs.tsx
|
|
5
|
+
async function showConfirmDialog(props) {
|
|
6
|
+
const id = crypto.randomUUID();
|
|
7
|
+
NiceModal.register(id, ConfirmationDialog_default);
|
|
8
|
+
return NiceModal.show(id, props);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { showConfirmDialog };
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
5
|
+
require('./ConfirmationDialog.cjs');
|
|
6
|
+
const require_confirmation_dialogs = require('./confirmation-dialogs.cjs');
|
|
7
|
+
const require_DialogProvider = require('./DialogProvider.cjs');
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import "./ConfirmationDialog.js";
|
|
5
|
+
import { showConfirmDialog } from "./confirmation-dialogs.js";
|
|
6
|
+
import { DialogProvider } from "./DialogProvider.js";
|
|
@@ -1 +1,68 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
5
|
+
const require_FileUploadItems = require('./FileUploadItems.cjs');
|
|
6
|
+
const require_use_file_upload_store = require('./hooks/use-file-upload-store.cjs');
|
|
7
|
+
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
8
|
+
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
9
|
+
let lucide_react = require("lucide-react");
|
|
10
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_react);
|
|
11
|
+
let react = require("react");
|
|
12
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
13
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
14
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
15
|
+
|
|
16
|
+
//#region src/file-upload/FileUpload.tsx
|
|
17
|
+
function FileUpload(props) {
|
|
18
|
+
const { value, onChange, className, multiple = true, onAccept, maxFiles, preventDuplicates,...rest } = props;
|
|
19
|
+
const { handleAccept, displayFiles, deleteFile, getFile, orgValue } = require_use_file_upload_store.useFileUploadStore({
|
|
20
|
+
value,
|
|
21
|
+
onChange,
|
|
22
|
+
multiple,
|
|
23
|
+
preventDuplicates
|
|
24
|
+
});
|
|
25
|
+
const handleFileAccept = react.useCallback((files) => {
|
|
26
|
+
onAccept?.(files);
|
|
27
|
+
handleAccept(files);
|
|
28
|
+
}, [handleAccept, onAccept]);
|
|
29
|
+
const itemSize = "size-22";
|
|
30
|
+
const containerClasses = (0, __pixpilot_shadcn.cn)("p-1.5");
|
|
31
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.FileUpload, {
|
|
32
|
+
...rest,
|
|
33
|
+
value: orgValue,
|
|
34
|
+
onAccept: handleFileAccept,
|
|
35
|
+
multiple,
|
|
36
|
+
className: (0, __pixpilot_shadcn.cn)("w-full", className),
|
|
37
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.FileUploadDropzone, {
|
|
38
|
+
className: containerClasses,
|
|
39
|
+
children: displayFiles.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
40
|
+
className: "flex flex-col items-center gap-1 text-center p-2",
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
43
|
+
className: "flex items-center justify-center rounded-full border p-2.5",
|
|
44
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Upload, { className: "size-6 text-muted-foreground" })
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
47
|
+
className: "font-medium text-sm",
|
|
48
|
+
children: "Drag & drop files here"
|
|
49
|
+
}),
|
|
50
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
51
|
+
className: "text-muted-foreground text-xs",
|
|
52
|
+
children: "Or click to browse (max 10 files, up to 5MB each)"
|
|
53
|
+
})
|
|
54
|
+
]
|
|
55
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FileUploadItems.FileUploadItems, {
|
|
56
|
+
displayFiles,
|
|
57
|
+
deleteFile,
|
|
58
|
+
getFile,
|
|
59
|
+
maxFiles,
|
|
60
|
+
itemSize,
|
|
61
|
+
className: containerClasses
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
//#endregion
|
|
68
|
+
exports.FileUpload = FileUpload;
|
|
@@ -1 +1,63 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { FileUploadItems } from "./FileUploadItems.js";
|
|
5
|
+
import { useFileUploadStore } from "./hooks/use-file-upload-store.js";
|
|
6
|
+
import { FileUpload, FileUploadDropzone, cn } from "@pixpilot/shadcn";
|
|
7
|
+
import { Upload } from "lucide-react";
|
|
8
|
+
import * as React$1 from "react";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
|
|
11
|
+
//#region src/file-upload/FileUpload.tsx
|
|
12
|
+
function FileUpload$1(props) {
|
|
13
|
+
const { value, onChange, className, multiple = true, onAccept, maxFiles, preventDuplicates,...rest } = props;
|
|
14
|
+
const { handleAccept, displayFiles, deleteFile, getFile, orgValue } = useFileUploadStore({
|
|
15
|
+
value,
|
|
16
|
+
onChange,
|
|
17
|
+
multiple,
|
|
18
|
+
preventDuplicates
|
|
19
|
+
});
|
|
20
|
+
const handleFileAccept = React$1.useCallback((files) => {
|
|
21
|
+
onAccept?.(files);
|
|
22
|
+
handleAccept(files);
|
|
23
|
+
}, [handleAccept, onAccept]);
|
|
24
|
+
const itemSize = "size-22";
|
|
25
|
+
const containerClasses = cn("p-1.5");
|
|
26
|
+
return /* @__PURE__ */ jsx(FileUpload, {
|
|
27
|
+
...rest,
|
|
28
|
+
value: orgValue,
|
|
29
|
+
onAccept: handleFileAccept,
|
|
30
|
+
multiple,
|
|
31
|
+
className: cn("w-full", className),
|
|
32
|
+
children: /* @__PURE__ */ jsx(FileUploadDropzone, {
|
|
33
|
+
className: containerClasses,
|
|
34
|
+
children: displayFiles.length === 0 ? /* @__PURE__ */ jsxs("div", {
|
|
35
|
+
className: "flex flex-col items-center gap-1 text-center p-2",
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsx("div", {
|
|
38
|
+
className: "flex items-center justify-center rounded-full border p-2.5",
|
|
39
|
+
children: /* @__PURE__ */ jsx(Upload, { className: "size-6 text-muted-foreground" })
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ jsx("p", {
|
|
42
|
+
className: "font-medium text-sm",
|
|
43
|
+
children: "Drag & drop files here"
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ jsx("p", {
|
|
46
|
+
className: "text-muted-foreground text-xs",
|
|
47
|
+
children: "Or click to browse (max 10 files, up to 5MB each)"
|
|
48
|
+
})
|
|
49
|
+
]
|
|
50
|
+
}) : /* @__PURE__ */ jsx(FileUploadItems, {
|
|
51
|
+
displayFiles,
|
|
52
|
+
deleteFile,
|
|
53
|
+
getFile,
|
|
54
|
+
maxFiles,
|
|
55
|
+
itemSize,
|
|
56
|
+
className: containerClasses
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
//#endregion
|
|
63
|
+
export { FileUpload$1 as FileUpload };
|
|
@@ -1 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
5
|
+
const require_FileUploadListItem = require('./FileUploadListItem.cjs');
|
|
6
|
+
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
7
|
+
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
8
|
+
let lucide_react = require("lucide-react");
|
|
9
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_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/file-upload/FileUploadItems.tsx
|
|
14
|
+
function FileUploadItems({ displayFiles, deleteFile, getFile, maxFiles, itemSize, className }) {
|
|
15
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.FileUploadList, {
|
|
16
|
+
orientation: "horizontal",
|
|
17
|
+
forceMount: true,
|
|
18
|
+
className: (0, __pixpilot_shadcn.cn)("flex-wrap gap-4 w-full ", className),
|
|
19
|
+
children: [displayFiles.map((fileMeta) => {
|
|
20
|
+
const { name, lastModified } = fileMeta;
|
|
21
|
+
const key = `${name}-${lastModified}`;
|
|
22
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FileUploadListItem.FileUploadListItem, {
|
|
23
|
+
fileMeta,
|
|
24
|
+
deleteFile,
|
|
25
|
+
getFile,
|
|
26
|
+
itemSize
|
|
27
|
+
}, key);
|
|
28
|
+
}), maxFiles === void 0 || displayFiles.length < maxFiles ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
29
|
+
className: (0, __pixpilot_shadcn.cn)(itemSize, "flex items-center justify-center border-2 border-dashed rounded-md"),
|
|
30
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Plus, { className: "size-6 text-muted-foreground" })
|
|
31
|
+
}) : null]
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
exports.FileUploadItems = FileUploadItems;
|
|
@@ -1 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { FileUploadListItem } from "./FileUploadListItem.js";
|
|
5
|
+
import { FileUploadList, cn } from "@pixpilot/shadcn";
|
|
6
|
+
import { Plus } from "lucide-react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region src/file-upload/FileUploadItems.tsx
|
|
10
|
+
function FileUploadItems({ displayFiles, deleteFile, getFile, maxFiles, itemSize, className }) {
|
|
11
|
+
return /* @__PURE__ */ jsxs(FileUploadList, {
|
|
12
|
+
orientation: "horizontal",
|
|
13
|
+
forceMount: true,
|
|
14
|
+
className: cn("flex-wrap gap-4 w-full ", className),
|
|
15
|
+
children: [displayFiles.map((fileMeta) => {
|
|
16
|
+
const { name, lastModified } = fileMeta;
|
|
17
|
+
const key = `${name}-${lastModified}`;
|
|
18
|
+
return /* @__PURE__ */ jsx(FileUploadListItem, {
|
|
19
|
+
fileMeta,
|
|
20
|
+
deleteFile,
|
|
21
|
+
getFile,
|
|
22
|
+
itemSize
|
|
23
|
+
}, key);
|
|
24
|
+
}), maxFiles === void 0 || displayFiles.length < maxFiles ? /* @__PURE__ */ jsx("div", {
|
|
25
|
+
className: cn(itemSize, "flex items-center justify-center border-2 border-dashed rounded-md"),
|
|
26
|
+
children: /* @__PURE__ */ jsx(Plus, { className: "size-6 text-muted-foreground" })
|
|
27
|
+
}) : null]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export { FileUploadItems };
|
|
@@ -1 +1,89 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
5
|
+
const require_button = require('../packages/shadcn/src/components/ui/button.cjs');
|
|
6
|
+
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
7
|
+
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
8
|
+
let lucide_react = require("lucide-react");
|
|
9
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_react);
|
|
10
|
+
let react = require("react");
|
|
11
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
12
|
+
let pretty_bytes = require("pretty-bytes");
|
|
13
|
+
pretty_bytes = require_rolldown_runtime.__toESM(pretty_bytes);
|
|
14
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
15
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
16
|
+
|
|
17
|
+
//#region src/file-upload/FileUploadListItem.tsx
|
|
18
|
+
const Backdrop = ({ className, children }) => {
|
|
19
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
20
|
+
className: (0, __pixpilot_shadcn.cn)("bg-black/70 inset-0 absolute", className),
|
|
21
|
+
children
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
const FileUploadListItem = react.default.memo(({ fileMeta, deleteFile, getFile, itemSize }) => {
|
|
25
|
+
const file = getFile(fileMeta);
|
|
26
|
+
const storeFile = (0, __pixpilot_shadcn.useFileUpload)((store) => store.files.get(file));
|
|
27
|
+
const hasError = storeFile?.error != null;
|
|
28
|
+
const url = typeof fileMeta.url === "string" ? fileMeta.url : "";
|
|
29
|
+
const shouldRenderProgress = storeFile?.status !== "idle" && storeFile?.progress !== 100 && !hasError;
|
|
30
|
+
const renderPreview = (_file, fallback) => {
|
|
31
|
+
if (url.length > 0 && fileMeta.type.startsWith("image/")) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
32
|
+
className: "relative size-full",
|
|
33
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
|
|
34
|
+
src: url,
|
|
35
|
+
alt: fileMeta.name,
|
|
36
|
+
className: "size-full object-cover"
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
return fallback();
|
|
40
|
+
};
|
|
41
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.FileUploadItem, {
|
|
42
|
+
value: file,
|
|
43
|
+
className: (0, __pixpilot_shadcn.cn)("p-0"),
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Tooltip, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TooltipTrigger, {
|
|
46
|
+
asChild: true,
|
|
47
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.FileUploadItemPreview, {
|
|
48
|
+
className: (0, __pixpilot_shadcn.cn)(itemSize, "relative"),
|
|
49
|
+
render: renderPreview,
|
|
50
|
+
children: hasError ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Backdrop, {
|
|
51
|
+
className: "flex items-center justify-center",
|
|
52
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.AlertTriangle, { className: "text-destructive size-9" })
|
|
53
|
+
}) : shouldRenderProgress && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Backdrop, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.FileUploadItemProgress, {
|
|
54
|
+
variant: "circular",
|
|
55
|
+
strokeWidth: 4
|
|
56
|
+
}) })
|
|
57
|
+
})
|
|
58
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.TooltipContent, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", { children: [
|
|
59
|
+
fileMeta.name,
|
|
60
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("br", {}),
|
|
61
|
+
"Size: ",
|
|
62
|
+
(0, pretty_bytes.default)(fileMeta.size)
|
|
63
|
+
] }), hasError && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
64
|
+
className: "text-destructive flex items-center gap-2 mt-2",
|
|
65
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.AlertTriangle, { className: "text-destructive size-4" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
66
|
+
className: "font-bold",
|
|
67
|
+
children: storeFile?.error
|
|
68
|
+
})]
|
|
69
|
+
})] })] }),
|
|
70
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.FileUploadItemMetadata, { className: "sr-only" }),
|
|
71
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_button.Button, {
|
|
72
|
+
type: "button",
|
|
73
|
+
variant: "secondary",
|
|
74
|
+
size: "icon",
|
|
75
|
+
className: "-top-1 -right-1 absolute size-5 rounded-full",
|
|
76
|
+
onClick: (event) => {
|
|
77
|
+
event.preventDefault();
|
|
78
|
+
event.stopPropagation();
|
|
79
|
+
deleteFile(fileMeta);
|
|
80
|
+
},
|
|
81
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, { className: "size-3" })
|
|
82
|
+
})
|
|
83
|
+
]
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
FileUploadListItem.displayName = "FileUploadListItem";
|
|
87
|
+
|
|
88
|
+
//#endregion
|
|
89
|
+
exports.FileUploadListItem = FileUploadListItem;
|
|
@@ -1 +1,83 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { Button as Button$1 } from "../packages/shadcn/src/components/ui/button.js";
|
|
5
|
+
import { FileUploadItem, FileUploadItemMetadata, FileUploadItemPreview, FileUploadItemProgress, Tooltip, TooltipContent, TooltipTrigger, cn, useFileUpload } from "@pixpilot/shadcn";
|
|
6
|
+
import { AlertTriangle, X } from "lucide-react";
|
|
7
|
+
import React from "react";
|
|
8
|
+
import prettyBytes from "pretty-bytes";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
|
|
11
|
+
//#region src/file-upload/FileUploadListItem.tsx
|
|
12
|
+
const Backdrop = ({ className, children }) => {
|
|
13
|
+
return /* @__PURE__ */ jsx("div", {
|
|
14
|
+
className: cn("bg-black/70 inset-0 absolute", className),
|
|
15
|
+
children
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
const FileUploadListItem = React.memo(({ fileMeta, deleteFile, getFile, itemSize }) => {
|
|
19
|
+
const file = getFile(fileMeta);
|
|
20
|
+
const storeFile = useFileUpload((store) => store.files.get(file));
|
|
21
|
+
const hasError = storeFile?.error != null;
|
|
22
|
+
const url = typeof fileMeta.url === "string" ? fileMeta.url : "";
|
|
23
|
+
const shouldRenderProgress = storeFile?.status !== "idle" && storeFile?.progress !== 100 && !hasError;
|
|
24
|
+
const renderPreview = (_file, fallback) => {
|
|
25
|
+
if (url.length > 0 && fileMeta.type.startsWith("image/")) return /* @__PURE__ */ jsx("div", {
|
|
26
|
+
className: "relative size-full",
|
|
27
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
28
|
+
src: url,
|
|
29
|
+
alt: fileMeta.name,
|
|
30
|
+
className: "size-full object-cover"
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
return fallback();
|
|
34
|
+
};
|
|
35
|
+
return /* @__PURE__ */ jsxs(FileUploadItem, {
|
|
36
|
+
value: file,
|
|
37
|
+
className: cn("p-0"),
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
40
|
+
asChild: true,
|
|
41
|
+
children: /* @__PURE__ */ jsx(FileUploadItemPreview, {
|
|
42
|
+
className: cn(itemSize, "relative"),
|
|
43
|
+
render: renderPreview,
|
|
44
|
+
children: hasError ? /* @__PURE__ */ jsx(Backdrop, {
|
|
45
|
+
className: "flex items-center justify-center",
|
|
46
|
+
children: /* @__PURE__ */ jsx(AlertTriangle, { className: "text-destructive size-9" })
|
|
47
|
+
}) : shouldRenderProgress && /* @__PURE__ */ jsx(Backdrop, { children: /* @__PURE__ */ jsx(FileUploadItemProgress, {
|
|
48
|
+
variant: "circular",
|
|
49
|
+
strokeWidth: 4
|
|
50
|
+
}) })
|
|
51
|
+
})
|
|
52
|
+
}), /* @__PURE__ */ jsxs(TooltipContent, { children: [/* @__PURE__ */ jsxs("p", { children: [
|
|
53
|
+
fileMeta.name,
|
|
54
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
55
|
+
"Size: ",
|
|
56
|
+
prettyBytes(fileMeta.size)
|
|
57
|
+
] }), hasError && /* @__PURE__ */ jsxs("div", {
|
|
58
|
+
className: "text-destructive flex items-center gap-2 mt-2",
|
|
59
|
+
children: [/* @__PURE__ */ jsx(AlertTriangle, { className: "text-destructive size-4" }), /* @__PURE__ */ jsx("p", {
|
|
60
|
+
className: "font-bold",
|
|
61
|
+
children: storeFile?.error
|
|
62
|
+
})]
|
|
63
|
+
})] })] }),
|
|
64
|
+
/* @__PURE__ */ jsx(FileUploadItemMetadata, { className: "sr-only" }),
|
|
65
|
+
/* @__PURE__ */ jsx(Button$1, {
|
|
66
|
+
type: "button",
|
|
67
|
+
variant: "secondary",
|
|
68
|
+
size: "icon",
|
|
69
|
+
className: "-top-1 -right-1 absolute size-5 rounded-full",
|
|
70
|
+
onClick: (event) => {
|
|
71
|
+
event.preventDefault();
|
|
72
|
+
event.stopPropagation();
|
|
73
|
+
deleteFile(fileMeta);
|
|
74
|
+
},
|
|
75
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-3" })
|
|
76
|
+
})
|
|
77
|
+
]
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
FileUploadListItem.displayName = "FileUploadListItem";
|
|
81
|
+
|
|
82
|
+
//#endregion
|
|
83
|
+
export { FileUploadListItem };
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_use_file_upload_store = require('./use-file-upload-store.cjs');
|
|
3
|
+
const require_use_file_error = require('./use-file-error.cjs');
|
|
4
|
+
const require_use_file_upload_progress_callbacks = require('./use-file-upload-progress-callbacks.cjs');
|