@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/AbsoluteFill.cjs
CHANGED
|
@@ -1 +1,24 @@
|
|
|
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
|
+
|
|
7
|
+
//#region src/AbsoluteFill.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Stretched element to enable tooltips on disabled buttons
|
|
10
|
+
* When a button is disabled, tooltips don't work by default.
|
|
11
|
+
* This element is positioned absolutely over the button to capture events.
|
|
12
|
+
*/
|
|
13
|
+
function AbsoluteFill(props) {
|
|
14
|
+
const { ref,...rest } = props;
|
|
15
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
16
|
+
ref,
|
|
17
|
+
className: "absolute top-0 right-0 bottom-0 left-0",
|
|
18
|
+
...rest
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
AbsoluteFill.displayName = "StretchedElement";
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
exports.AbsoluteFill = AbsoluteFill;
|
package/dist/AbsoluteFill.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/AbsoluteFill.d.ts
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
10
10
|
*/
|
|
11
11
|
declare function AbsoluteFill(props: React.HTMLAttributes<HTMLDivElement> & {
|
|
12
12
|
ref?: React.Ref<HTMLDivElement>;
|
|
13
|
-
}):
|
|
13
|
+
}): react_jsx_runtime2.JSX.Element;
|
|
14
14
|
declare namespace AbsoluteFill {
|
|
15
15
|
var displayName: string;
|
|
16
16
|
}
|
package/dist/AbsoluteFill.js
CHANGED
|
@@ -1 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/AbsoluteFill.tsx
|
|
5
|
+
/**
|
|
6
|
+
* Stretched element to enable tooltips on disabled buttons
|
|
7
|
+
* When a button is disabled, tooltips don't work by default.
|
|
8
|
+
* This element is positioned absolutely over the button to capture events.
|
|
9
|
+
*/
|
|
10
|
+
function AbsoluteFill(props) {
|
|
11
|
+
const { ref,...rest } = props;
|
|
12
|
+
return /* @__PURE__ */ jsx("div", {
|
|
13
|
+
ref,
|
|
14
|
+
className: "absolute top-0 right-0 bottom-0 left-0",
|
|
15
|
+
...rest
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
AbsoluteFill.displayName = "StretchedElement";
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { AbsoluteFill };
|
package/dist/Alert.cjs
CHANGED
|
@@ -1 +1,81 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_utils = require('./packages/shadcn/src/lib/utils.cjs');
|
|
3
|
+
const require_alert = require('./packages/shadcn/src/components/ui/alert.cjs');
|
|
4
|
+
let lucide_react = require("lucide-react");
|
|
5
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_react);
|
|
6
|
+
let react = require("react");
|
|
7
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
10
|
+
|
|
11
|
+
//#region src/Alert.tsx
|
|
12
|
+
const iconClass = require_utils.cn("t-0 size-4");
|
|
13
|
+
const colors = {
|
|
14
|
+
error: {
|
|
15
|
+
descClass: "text-destructive",
|
|
16
|
+
textClass: "text-destructive",
|
|
17
|
+
class: require_utils.cn("border-current/80!"),
|
|
18
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.OctagonAlertIcon, { className: iconClass })
|
|
19
|
+
},
|
|
20
|
+
warning: {
|
|
21
|
+
descClass: "text-amber-600/80 dark:text-amber-400/80",
|
|
22
|
+
textClass: "text-amber-600 dark:border-amber-400 dark:text-amber-400",
|
|
23
|
+
class: require_utils.cn("border-current/80!"),
|
|
24
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CircleAlertIcon, { className: iconClass })
|
|
25
|
+
},
|
|
26
|
+
info: {
|
|
27
|
+
descClass: "text-sky-600/80 dark:text-sky-400/80",
|
|
28
|
+
textClass: "text-sky-600 dark:border-sky-400 dark:text-sky-400",
|
|
29
|
+
class: require_utils.cn("border-current/80!"),
|
|
30
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CircleAlertIcon, { className: iconClass })
|
|
31
|
+
},
|
|
32
|
+
success: {
|
|
33
|
+
descClass: "text-green-600/80 dark:text-green-400/80",
|
|
34
|
+
textClass: "text-green-600 dark:border-green-400 dark:text-green-400",
|
|
35
|
+
class: require_utils.cn("border-current/80!"),
|
|
36
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CircleCheckBigIcon, { className: iconClass })
|
|
37
|
+
},
|
|
38
|
+
default: {
|
|
39
|
+
descClass: "text-foreground/80",
|
|
40
|
+
textClass: "text-foreground",
|
|
41
|
+
class: require_utils.cn("border-current/60!"),
|
|
42
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CircleAlertIcon, { className: iconClass })
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
function getIcon(icon, variant) {
|
|
46
|
+
if (icon === false) return null;
|
|
47
|
+
if (icon === void 0 || icon === true) return colors[variant ?? "default"].icon;
|
|
48
|
+
return icon;
|
|
49
|
+
}
|
|
50
|
+
const Alert$1 = (props) => {
|
|
51
|
+
const { description, variant = "default", title, className, children, icon = false,...rest } = props;
|
|
52
|
+
const msgIcon = getIcon(icon, variant);
|
|
53
|
+
const hasTitle = title != null && title.trim() !== "";
|
|
54
|
+
const variantConfig = colors[variant] ?? colors.default;
|
|
55
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_alert.Alert, {
|
|
56
|
+
...rest,
|
|
57
|
+
variant: "destructive",
|
|
58
|
+
className: require_utils.cn("bg-card border-accent! flex justify-between rounded-sm border-0 border-l-4", variantConfig.class, variantConfig.textClass, className),
|
|
59
|
+
children: [
|
|
60
|
+
msgIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
61
|
+
className: require_utils.cn("mr-3 flex items-start pt-0.5"),
|
|
62
|
+
children: msgIcon
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
65
|
+
className: "flex flex-1 flex-col gap-1",
|
|
66
|
+
children: [hasTitle && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_alert.AlertTitle, {
|
|
67
|
+
className: require_utils.cn(variantConfig.textClass, { "block!": !hasTitle }),
|
|
68
|
+
children: title
|
|
69
|
+
}), description != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_alert.AlertDescription, {
|
|
70
|
+
className: require_utils.cn(variantConfig.descClass, !hasTitle && variantConfig.textClass),
|
|
71
|
+
children: description
|
|
72
|
+
})]
|
|
73
|
+
}),
|
|
74
|
+
children
|
|
75
|
+
]
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
Alert$1.displayName = "Alert";
|
|
79
|
+
|
|
80
|
+
//#endregion
|
|
81
|
+
exports.Alert = Alert$1;
|
package/dist/Alert.js
CHANGED
|
@@ -1 +1,77 @@
|
|
|
1
|
-
import{cn
|
|
1
|
+
import { cn } from "./packages/shadcn/src/lib/utils.js";
|
|
2
|
+
import { Alert, AlertDescription, AlertTitle } from "./packages/shadcn/src/components/ui/alert.js";
|
|
3
|
+
import { CircleAlertIcon, CircleCheckBigIcon, OctagonAlertIcon } from "lucide-react";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/Alert.tsx
|
|
8
|
+
const iconClass = cn("t-0 size-4");
|
|
9
|
+
const colors = {
|
|
10
|
+
error: {
|
|
11
|
+
descClass: "text-destructive",
|
|
12
|
+
textClass: "text-destructive",
|
|
13
|
+
class: cn("border-current/80!"),
|
|
14
|
+
icon: /* @__PURE__ */ jsx(OctagonAlertIcon, { className: iconClass })
|
|
15
|
+
},
|
|
16
|
+
warning: {
|
|
17
|
+
descClass: "text-amber-600/80 dark:text-amber-400/80",
|
|
18
|
+
textClass: "text-amber-600 dark:border-amber-400 dark:text-amber-400",
|
|
19
|
+
class: cn("border-current/80!"),
|
|
20
|
+
icon: /* @__PURE__ */ jsx(CircleAlertIcon, { className: iconClass })
|
|
21
|
+
},
|
|
22
|
+
info: {
|
|
23
|
+
descClass: "text-sky-600/80 dark:text-sky-400/80",
|
|
24
|
+
textClass: "text-sky-600 dark:border-sky-400 dark:text-sky-400",
|
|
25
|
+
class: cn("border-current/80!"),
|
|
26
|
+
icon: /* @__PURE__ */ jsx(CircleAlertIcon, { className: iconClass })
|
|
27
|
+
},
|
|
28
|
+
success: {
|
|
29
|
+
descClass: "text-green-600/80 dark:text-green-400/80",
|
|
30
|
+
textClass: "text-green-600 dark:border-green-400 dark:text-green-400",
|
|
31
|
+
class: cn("border-current/80!"),
|
|
32
|
+
icon: /* @__PURE__ */ jsx(CircleCheckBigIcon, { className: iconClass })
|
|
33
|
+
},
|
|
34
|
+
default: {
|
|
35
|
+
descClass: "text-foreground/80",
|
|
36
|
+
textClass: "text-foreground",
|
|
37
|
+
class: cn("border-current/60!"),
|
|
38
|
+
icon: /* @__PURE__ */ jsx(CircleAlertIcon, { className: iconClass })
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
function getIcon(icon, variant) {
|
|
42
|
+
if (icon === false) return null;
|
|
43
|
+
if (icon === void 0 || icon === true) return colors[variant ?? "default"].icon;
|
|
44
|
+
return icon;
|
|
45
|
+
}
|
|
46
|
+
const Alert$1 = (props) => {
|
|
47
|
+
const { description, variant = "default", title, className, children, icon = false,...rest } = props;
|
|
48
|
+
const msgIcon = getIcon(icon, variant);
|
|
49
|
+
const hasTitle = title != null && title.trim() !== "";
|
|
50
|
+
const variantConfig = colors[variant] ?? colors.default;
|
|
51
|
+
return /* @__PURE__ */ jsxs(Alert, {
|
|
52
|
+
...rest,
|
|
53
|
+
variant: "destructive",
|
|
54
|
+
className: cn("bg-card border-accent! flex justify-between rounded-sm border-0 border-l-4", variantConfig.class, variantConfig.textClass, className),
|
|
55
|
+
children: [
|
|
56
|
+
msgIcon && /* @__PURE__ */ jsx("div", {
|
|
57
|
+
className: cn("mr-3 flex items-start pt-0.5"),
|
|
58
|
+
children: msgIcon
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ jsxs("div", {
|
|
61
|
+
className: "flex flex-1 flex-col gap-1",
|
|
62
|
+
children: [hasTitle && /* @__PURE__ */ jsx(AlertTitle, {
|
|
63
|
+
className: cn(variantConfig.textClass, { "block!": !hasTitle }),
|
|
64
|
+
children: title
|
|
65
|
+
}), description != null && /* @__PURE__ */ jsx(AlertDescription, {
|
|
66
|
+
className: cn(variantConfig.descClass, !hasTitle && variantConfig.textClass),
|
|
67
|
+
children: description
|
|
68
|
+
})]
|
|
69
|
+
}),
|
|
70
|
+
children
|
|
71
|
+
]
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
Alert$1.displayName = "Alert";
|
|
75
|
+
|
|
76
|
+
//#endregion
|
|
77
|
+
export { Alert$1 as Alert };
|
package/dist/Button.cjs
CHANGED
|
@@ -1 +1,84 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_AbsoluteFill = require('./AbsoluteFill.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/Button.tsx
|
|
13
|
+
const LOADER_SIZE_SM = 14;
|
|
14
|
+
const LOADER_SIZE_DEFAULT = 16;
|
|
15
|
+
const LOADER_SIZE_LG = 20;
|
|
16
|
+
/**
|
|
17
|
+
* Get loader size based on button size
|
|
18
|
+
*/
|
|
19
|
+
function getLoaderSize(size) {
|
|
20
|
+
if (size === "sm" || size === "icon-sm") return LOADER_SIZE_SM;
|
|
21
|
+
if (size === "lg" || size === "icon-lg") return LOADER_SIZE_LG;
|
|
22
|
+
return LOADER_SIZE_DEFAULT;
|
|
23
|
+
}
|
|
24
|
+
function Button(props) {
|
|
25
|
+
const { children, disabled, onClick, disabledTooltip, loading, LoaderProps, onDisabledClick, tooltip, title, TooltipProps, className, variant, size, ref,...rest } = props;
|
|
26
|
+
const { placement: loaderPlacement = "end" } = LoaderProps || {};
|
|
27
|
+
const handleClick = (0, react.useCallback)((e) => {
|
|
28
|
+
if (onClick && !disabled) onClick(e);
|
|
29
|
+
}, [disabled, onClick]);
|
|
30
|
+
const isDisabled = disabled || loading;
|
|
31
|
+
const hasTooltip = Boolean(tooltip) || Boolean(title);
|
|
32
|
+
const hasDisabledTooltip = Boolean(disabledTooltip) && isDisabled;
|
|
33
|
+
const showTooltip = hasTooltip || hasDisabledTooltip;
|
|
34
|
+
const tooltipContent = hasDisabledTooltip ? disabledTooltip ?? "" : tooltip ?? title ?? "";
|
|
35
|
+
const Loader = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
36
|
+
className: (0, __pixpilot_shadcn.cn)("flex items-center justify-center", loaderPlacement === "center" && "rounded-0 absolute inset-0", loaderPlacement === "start" && "mr-1", loaderPlacement === "end" && "ml-1"),
|
|
37
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Loader2, {
|
|
38
|
+
className: "text-background animate-spin",
|
|
39
|
+
style: {
|
|
40
|
+
height: getLoaderSize(size),
|
|
41
|
+
width: getLoaderSize(size)
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
const buttonContent = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Button, {
|
|
46
|
+
...rest,
|
|
47
|
+
ref,
|
|
48
|
+
disabled: isDisabled,
|
|
49
|
+
onClick: handleClick,
|
|
50
|
+
className: (0, __pixpilot_shadcn.cn)("relative", className),
|
|
51
|
+
variant,
|
|
52
|
+
size,
|
|
53
|
+
children: [
|
|
54
|
+
Boolean(disabledTooltip) && isDisabled && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Tooltip, {
|
|
55
|
+
...TooltipProps,
|
|
56
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TooltipTrigger, {
|
|
57
|
+
asChild: true,
|
|
58
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AbsoluteFill.AbsoluteFill, {
|
|
59
|
+
onClick: onDisabledClick,
|
|
60
|
+
style: {
|
|
61
|
+
pointerEvents: "all",
|
|
62
|
+
cursor: "not-allowed"
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TooltipContent, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: disabledTooltip }) })]
|
|
66
|
+
}),
|
|
67
|
+
loading && loaderPlacement === "start" && Loader,
|
|
68
|
+
children,
|
|
69
|
+
loading && (loaderPlacement === "end" || loaderPlacement === "center") && Loader
|
|
70
|
+
]
|
|
71
|
+
});
|
|
72
|
+
if (showTooltip && !(Boolean(disabledTooltip) && isDisabled)) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Tooltip, {
|
|
73
|
+
...TooltipProps,
|
|
74
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TooltipTrigger, {
|
|
75
|
+
asChild: true,
|
|
76
|
+
children: buttonContent
|
|
77
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.TooltipContent, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: tooltipContent }) })]
|
|
78
|
+
});
|
|
79
|
+
return buttonContent;
|
|
80
|
+
}
|
|
81
|
+
Button.displayName = "Button";
|
|
82
|
+
|
|
83
|
+
//#endregion
|
|
84
|
+
exports.Button = Button;
|
package/dist/Button.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button, Tooltip, buttonVariants } from "@pixpilot/shadcn";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { VariantProps } from "class-variance-authority";
|
|
4
3
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import { VariantProps } from "class-variance-authority";
|
|
5
5
|
|
|
6
6
|
//#region src/Button.d.ts
|
|
7
7
|
interface ButtonLoaderProps {
|
package/dist/Button.js
CHANGED
|
@@ -1 +1,79 @@
|
|
|
1
|
-
import{AbsoluteFill
|
|
1
|
+
import { AbsoluteFill } from "./AbsoluteFill.js";
|
|
2
|
+
import { Button, Tooltip, TooltipContent, TooltipTrigger, cn } from "@pixpilot/shadcn";
|
|
3
|
+
import { Loader2 } from "lucide-react";
|
|
4
|
+
import React, { useCallback } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/Button.tsx
|
|
8
|
+
const LOADER_SIZE_SM = 14;
|
|
9
|
+
const LOADER_SIZE_DEFAULT = 16;
|
|
10
|
+
const LOADER_SIZE_LG = 20;
|
|
11
|
+
/**
|
|
12
|
+
* Get loader size based on button size
|
|
13
|
+
*/
|
|
14
|
+
function getLoaderSize(size) {
|
|
15
|
+
if (size === "sm" || size === "icon-sm") return LOADER_SIZE_SM;
|
|
16
|
+
if (size === "lg" || size === "icon-lg") return LOADER_SIZE_LG;
|
|
17
|
+
return LOADER_SIZE_DEFAULT;
|
|
18
|
+
}
|
|
19
|
+
function Button$1(props) {
|
|
20
|
+
const { children, disabled, onClick, disabledTooltip, loading, LoaderProps, onDisabledClick, tooltip, title, TooltipProps, className, variant, size, ref,...rest } = props;
|
|
21
|
+
const { placement: loaderPlacement = "end" } = LoaderProps || {};
|
|
22
|
+
const handleClick = useCallback((e) => {
|
|
23
|
+
if (onClick && !disabled) onClick(e);
|
|
24
|
+
}, [disabled, onClick]);
|
|
25
|
+
const isDisabled = disabled || loading;
|
|
26
|
+
const hasTooltip = Boolean(tooltip) || Boolean(title);
|
|
27
|
+
const hasDisabledTooltip = Boolean(disabledTooltip) && isDisabled;
|
|
28
|
+
const showTooltip = hasTooltip || hasDisabledTooltip;
|
|
29
|
+
const tooltipContent = hasDisabledTooltip ? disabledTooltip ?? "" : tooltip ?? title ?? "";
|
|
30
|
+
const Loader = /* @__PURE__ */ jsx("div", {
|
|
31
|
+
className: cn("flex items-center justify-center", loaderPlacement === "center" && "rounded-0 absolute inset-0", loaderPlacement === "start" && "mr-1", loaderPlacement === "end" && "ml-1"),
|
|
32
|
+
children: /* @__PURE__ */ jsx(Loader2, {
|
|
33
|
+
className: "text-background animate-spin",
|
|
34
|
+
style: {
|
|
35
|
+
height: getLoaderSize(size),
|
|
36
|
+
width: getLoaderSize(size)
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
const buttonContent = /* @__PURE__ */ jsxs(Button, {
|
|
41
|
+
...rest,
|
|
42
|
+
ref,
|
|
43
|
+
disabled: isDisabled,
|
|
44
|
+
onClick: handleClick,
|
|
45
|
+
className: cn("relative", className),
|
|
46
|
+
variant,
|
|
47
|
+
size,
|
|
48
|
+
children: [
|
|
49
|
+
Boolean(disabledTooltip) && isDisabled && /* @__PURE__ */ jsxs(Tooltip, {
|
|
50
|
+
...TooltipProps,
|
|
51
|
+
children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
52
|
+
asChild: true,
|
|
53
|
+
children: /* @__PURE__ */ jsx(AbsoluteFill, {
|
|
54
|
+
onClick: onDisabledClick,
|
|
55
|
+
style: {
|
|
56
|
+
pointerEvents: "all",
|
|
57
|
+
cursor: "not-allowed"
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
}), /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsx("p", { children: disabledTooltip }) })]
|
|
61
|
+
}),
|
|
62
|
+
loading && loaderPlacement === "start" && Loader,
|
|
63
|
+
children,
|
|
64
|
+
loading && (loaderPlacement === "end" || loaderPlacement === "center") && Loader
|
|
65
|
+
]
|
|
66
|
+
});
|
|
67
|
+
if (showTooltip && !(Boolean(disabledTooltip) && isDisabled)) return /* @__PURE__ */ jsxs(Tooltip, {
|
|
68
|
+
...TooltipProps,
|
|
69
|
+
children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
70
|
+
asChild: true,
|
|
71
|
+
children: buttonContent
|
|
72
|
+
}), /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsx("p", { children: tooltipContent }) })]
|
|
73
|
+
});
|
|
74
|
+
return buttonContent;
|
|
75
|
+
}
|
|
76
|
+
Button$1.displayName = "Button";
|
|
77
|
+
|
|
78
|
+
//#endregion
|
|
79
|
+
export { Button$1 as Button };
|
|
@@ -1 +1,20 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_CloseButtonRounded = require('./CloseButtonRounded.cjs');
|
|
3
|
+
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
4
|
+
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
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
|
+
|
|
10
|
+
//#region src/CloseButtonAbsolute.tsx
|
|
11
|
+
const CloseButtonAbsolute = (props) => {
|
|
12
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_CloseButtonRounded.CloseButtonRounded, {
|
|
13
|
+
...props,
|
|
14
|
+
className: (0, __pixpilot_shadcn.cn)("absolute top-1 right-1", props.className)
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
CloseButtonAbsolute.displayName = "CloseButtonAbsolute";
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
exports.CloseButtonAbsolute = CloseButtonAbsolute;
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
import{CloseButtonRounded
|
|
1
|
+
import { CloseButtonRounded } from "./CloseButtonRounded.js";
|
|
2
|
+
import { cn } from "@pixpilot/shadcn";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/CloseButtonAbsolute.tsx
|
|
7
|
+
const CloseButtonAbsolute = (props) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(CloseButtonRounded, {
|
|
9
|
+
...props,
|
|
10
|
+
className: cn("absolute top-1 right-1", props.className)
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
CloseButtonAbsolute.displayName = "CloseButtonAbsolute";
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { CloseButtonAbsolute };
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
3
|
+
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
4
|
+
let lucide_react = require("lucide-react");
|
|
5
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_react);
|
|
6
|
+
let react = require("react");
|
|
7
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
10
|
+
|
|
11
|
+
//#region src/CloseButtonRounded.tsx
|
|
12
|
+
const CloseButtonRounded = (props) => {
|
|
13
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Button, {
|
|
14
|
+
...props,
|
|
15
|
+
className: (0, __pixpilot_shadcn.cn)("flex h-8 w-8 items-center justify-center rounded-full p-0", props.className),
|
|
16
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, { className: "h-5 w-5" })
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
CloseButtonRounded.displayName = "CloseButtonRounded";
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
exports.CloseButtonRounded = CloseButtonRounded;
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
import{Button
|
|
1
|
+
import { Button, cn } from "@pixpilot/shadcn";
|
|
2
|
+
import { X } from "lucide-react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/CloseButtonRounded.tsx
|
|
7
|
+
const CloseButtonRounded = (props) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
9
|
+
...props,
|
|
10
|
+
className: cn("flex h-8 w-8 items-center justify-center rounded-full p-0", props.className),
|
|
11
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
CloseButtonRounded.displayName = "CloseButtonRounded";
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { CloseButtonRounded };
|
package/dist/Combobox.cjs
CHANGED
|
@@ -1 +1,53 @@
|
|
|
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 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 react_jsx_runtime = require("react/jsx-runtime");
|
|
13
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
14
|
+
|
|
15
|
+
//#region src/Combobox.tsx
|
|
16
|
+
const DEFAULT_OPTIONS = [];
|
|
17
|
+
const Combobox = (props) => {
|
|
18
|
+
const { value = "", onChange, options = DEFAULT_OPTIONS, placeholder = "Select option...", searchPlaceholder = "Search...", emptyText = "No option found.",...commandProps } = props;
|
|
19
|
+
const [open, setOpen] = (0, react.useState)(false);
|
|
20
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Popover, {
|
|
21
|
+
open,
|
|
22
|
+
onOpenChange: setOpen,
|
|
23
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PopoverTrigger, {
|
|
24
|
+
asChild: true,
|
|
25
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Button, {
|
|
26
|
+
variant: "outline",
|
|
27
|
+
role: "combobox",
|
|
28
|
+
"aria-expanded": open,
|
|
29
|
+
className: "w-full justify-between",
|
|
30
|
+
children: [value ? options.find((option) => option.value === value)?.label : placeholder, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })]
|
|
31
|
+
})
|
|
32
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.PopoverContent, {
|
|
33
|
+
className: "w-full p-0",
|
|
34
|
+
style: { width: "var(--radix-popover-trigger-width)" },
|
|
35
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.Command, {
|
|
36
|
+
...commandProps,
|
|
37
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.CommandInput, { placeholder: searchPlaceholder }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_CommandOptionList.CommandOptionList, {
|
|
38
|
+
options,
|
|
39
|
+
value,
|
|
40
|
+
onChange: (val) => {
|
|
41
|
+
onChange?.(val);
|
|
42
|
+
setOpen(false);
|
|
43
|
+
},
|
|
44
|
+
emptyText
|
|
45
|
+
})]
|
|
46
|
+
})
|
|
47
|
+
})]
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
Combobox.displayName = "Combobox";
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
exports.Combobox = Combobox;
|
package/dist/Combobox.js
CHANGED
|
@@ -1 +1,48 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { CommandOptionList } from "./CommandOptionList.js";
|
|
5
|
+
import { Button, Command, CommandInput, Popover, PopoverContent, PopoverTrigger } from "@pixpilot/shadcn";
|
|
6
|
+
import { ChevronsUpDown } from "lucide-react";
|
|
7
|
+
import React, { useState } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
|
|
10
|
+
//#region src/Combobox.tsx
|
|
11
|
+
const DEFAULT_OPTIONS = [];
|
|
12
|
+
const Combobox = (props) => {
|
|
13
|
+
const { value = "", onChange, options = DEFAULT_OPTIONS, placeholder = "Select option...", searchPlaceholder = "Search...", emptyText = "No option found.",...commandProps } = props;
|
|
14
|
+
const [open, setOpen] = useState(false);
|
|
15
|
+
return /* @__PURE__ */ jsxs(Popover, {
|
|
16
|
+
open,
|
|
17
|
+
onOpenChange: setOpen,
|
|
18
|
+
children: [/* @__PURE__ */ jsx(PopoverTrigger, {
|
|
19
|
+
asChild: true,
|
|
20
|
+
children: /* @__PURE__ */ jsxs(Button, {
|
|
21
|
+
variant: "outline",
|
|
22
|
+
role: "combobox",
|
|
23
|
+
"aria-expanded": open,
|
|
24
|
+
className: "w-full justify-between",
|
|
25
|
+
children: [value ? options.find((option) => option.value === value)?.label : placeholder, /* @__PURE__ */ jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })]
|
|
26
|
+
})
|
|
27
|
+
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
28
|
+
className: "w-full p-0",
|
|
29
|
+
style: { width: "var(--radix-popover-trigger-width)" },
|
|
30
|
+
children: /* @__PURE__ */ jsxs(Command, {
|
|
31
|
+
...commandProps,
|
|
32
|
+
children: [/* @__PURE__ */ jsx(CommandInput, { placeholder: searchPlaceholder }), /* @__PURE__ */ jsx(CommandOptionList, {
|
|
33
|
+
options,
|
|
34
|
+
value,
|
|
35
|
+
onChange: (val) => {
|
|
36
|
+
onChange?.(val);
|
|
37
|
+
setOpen(false);
|
|
38
|
+
},
|
|
39
|
+
emptyText
|
|
40
|
+
})]
|
|
41
|
+
})
|
|
42
|
+
})]
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Combobox.displayName = "Combobox";
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
export { Combobox };
|
|
@@ -1 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
5
|
+
let __pixpilot_shadcn = require("@pixpilot/shadcn");
|
|
6
|
+
__pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
|
|
7
|
+
let lucide_react = require("lucide-react");
|
|
8
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_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/CommandOptionList.tsx
|
|
13
|
+
const CommandOptionList = (props) => {
|
|
14
|
+
const { options, value, onChange, emptyText = "No option found." } = props;
|
|
15
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.CommandList, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.CommandEmpty, { children: emptyText }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.CommandGroup, { children: options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.CommandItem, {
|
|
16
|
+
value: option.value,
|
|
17
|
+
onSelect: (currentValue) => {
|
|
18
|
+
onChange?.(currentValue === value ? "" : currentValue);
|
|
19
|
+
},
|
|
20
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
21
|
+
className: "w-full flex items-center justify-between",
|
|
22
|
+
children: [option.label, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Check, { className: (0, __pixpilot_shadcn.cn)("mr-2 h-4 w-4", value === option.value ? "opacity-100" : "opacity-0") })]
|
|
23
|
+
})
|
|
24
|
+
}, option.value)) })] });
|
|
25
|
+
};
|
|
26
|
+
CommandOptionList.displayName = "CommandOptionList";
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
exports.CommandOptionList = CommandOptionList;
|