@pixpilot/shadcn-ui 0.1.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.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.d.cts +2 -2
- package/dist/Select.d.ts +2 -2
- 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.d.cts +2 -2
- package/dist/ThemeToggle.d.ts +2 -2
- package/dist/ThemeToggle.js +94 -1
- package/dist/_virtual/rolldown_runtime.cjs +44 -1
- package/dist/_virtual/rolldown_runtime.js +43 -0
- 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 -0
- package/dist/file-upload/FileUpload.d.cts +7 -0
- package/dist/file-upload/FileUpload.d.ts +7 -0
- package/dist/file-upload/FileUpload.js +63 -0
- package/dist/file-upload/FileUploadItems.cjs +36 -0
- package/dist/file-upload/FileUploadItems.js +32 -0
- package/dist/file-upload/FileUploadListItem.cjs +89 -0
- package/dist/file-upload/FileUploadListItem.js +83 -0
- package/dist/file-upload/hooks/index.cjs +4 -0
- package/dist/file-upload/hooks/index.d.cts +2 -0
- package/dist/file-upload/hooks/index.d.ts +2 -0
- package/dist/file-upload/hooks/index.js +3 -0
- package/dist/file-upload/hooks/use-file-error.cjs +15 -0
- package/dist/file-upload/hooks/use-file-error.js +14 -0
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.cjs +34 -0
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.d.cts +1 -0
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.d.ts +1 -0
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.js +32 -0
- package/dist/file-upload/hooks/use-file-upload-store.cjs +77 -0
- package/dist/file-upload/hooks/use-file-upload-store.d.cts +2 -0
- package/dist/file-upload/hooks/use-file-upload-store.d.ts +2 -0
- package/dist/file-upload/hooks/use-file-upload-store.js +75 -0
- package/dist/file-upload/index.cjs +6 -0
- package/dist/file-upload/index.d.cts +3 -0
- package/dist/file-upload/index.d.ts +3 -0
- package/dist/file-upload/index.js +5 -0
- package/dist/file-upload/types/index.d.cts +40 -0
- package/dist/file-upload/types/index.d.ts +40 -0
- package/dist/file-upload/utils/create-placeholder-file.cjs +12 -0
- package/dist/file-upload/utils/create-placeholder-file.js +10 -0
- package/dist/file-upload/utils/get-file-key.cjs +9 -0
- package/dist/file-upload/utils/get-file-key.d.cts +1 -0
- package/dist/file-upload/utils/get-file-key.d.ts +1 -0
- package/dist/file-upload/utils/get-file-key.js +7 -0
- package/dist/file-upload/utils/get-file-meta.cjs +24 -0
- package/dist/file-upload/utils/get-file-meta.d.cts +1 -0
- package/dist/file-upload/utils/get-file-meta.d.ts +1 -0
- package/dist/file-upload/utils/get-file-meta.js +21 -0
- package/dist/file-upload/utils/index.d.cts +4 -0
- package/dist/file-upload/utils/index.d.ts +4 -0
- package/dist/file-upload/utils/is-file-equal.cjs +10 -0
- package/dist/file-upload/utils/is-file-equal.d.cts +1 -0
- package/dist/file-upload/utils/is-file-equal.d.ts +1 -0
- package/dist/file-upload/utils/is-file-equal.js +8 -0
- package/dist/file-upload/utils/merge-file-metadata.cjs +27 -0
- package/dist/file-upload/utils/merge-file-metadata.d.cts +1 -0
- package/dist/file-upload/utils/merge-file-metadata.d.ts +1 -0
- package/dist/file-upload/utils/merge-file-metadata.js +26 -0
- package/dist/file-upload-inline/FileUploadInline.cjs +71 -0
- package/dist/file-upload-inline/FileUploadInline.d.cts +10 -0
- package/dist/file-upload-inline/FileUploadInline.d.ts +10 -0
- package/dist/file-upload-inline/FileUploadInline.js +66 -0
- package/dist/file-upload-inline/FileUploadInlineItem.cjs +96 -0
- package/dist/file-upload-inline/FileUploadInlineItem.js +90 -0
- package/dist/file-upload-inline/defaults.cjs +12 -0
- package/dist/file-upload-inline/defaults.js +10 -0
- package/dist/file-upload-inline/index.cjs +2 -0
- package/dist/file-upload-inline/index.d.cts +2 -0
- package/dist/file-upload-inline/index.d.ts +2 -0
- package/dist/file-upload-inline/index.js +1 -0
- package/dist/file-upload-inline/types.d.cts +16 -0
- package/dist/file-upload-inline/types.d.ts +16 -0
- package/dist/file-upload-inline/utils.cjs +37 -0
- package/dist/file-upload-inline/utils.js +34 -0
- 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.d.cts +3 -2
- package/dist/icon-selector/IconPicker.d.ts +3 -2
- 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.d.cts +1 -2
- package/dist/icon-selector/index.d.ts +1 -2
- package/dist/icon-selector/index.js +1 -1
- package/dist/icon-selector/types.d.cts +4 -2
- package/dist/icon-selector/types.d.ts +4 -2
- 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.d.cts +12 -7
- package/dist/index.d.ts +12 -7
- 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 -0
- 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 -0
- 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 -0
- 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 -0
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +695 -0
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +679 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +521 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +503 -0
- 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 -0
- 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 -0
- 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 -0
- 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 -0
- 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 -0
- 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 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +165 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +175 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +151 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +138 -0
- 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 -0
- package/dist/node_modules/.pnpm/tabbable@6.3.0/node_modules/tabbable/dist/index.esm.js +268 -0
- 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 -0
- package/dist/packages/shadcn/src/components/index.js +5 -0
- package/dist/packages/shadcn/src/components/ui/OrContinueWithSeparator.cjs +6 -0
- package/dist/packages/shadcn/src/components/ui/OrContinueWithSeparator.js +3 -0
- package/dist/packages/shadcn/src/components/ui/alert-dialog.cjs +10 -0
- package/dist/packages/shadcn/src/components/ui/alert-dialog.js +6 -0
- package/dist/packages/shadcn/src/components/ui/alert.cjs +44 -0
- package/dist/packages/shadcn/src/components/ui/alert.js +38 -0
- package/dist/packages/shadcn/src/components/ui/avatar.cjs +5 -0
- package/dist/packages/shadcn/src/components/ui/avatar.js +2 -0
- package/dist/packages/shadcn/src/components/ui/badge.cjs +20 -0
- package/dist/packages/shadcn/src/components/ui/badge.js +16 -0
- package/dist/packages/shadcn/src/components/ui/button.cjs +50 -0
- package/dist/packages/shadcn/src/components/ui/button.js +45 -0
- package/dist/packages/shadcn/src/components/ui/calendar.cjs +8 -0
- package/dist/packages/shadcn/src/components/ui/calendar.js +4 -0
- package/dist/packages/shadcn/src/components/ui/card.cjs +5 -0
- package/dist/packages/shadcn/src/components/ui/card.js +2 -0
- package/dist/packages/shadcn/src/components/ui/checkbox.cjs +10 -0
- package/dist/packages/shadcn/src/components/ui/checkbox.js +6 -0
- package/dist/packages/shadcn/src/components/ui/command.cjs +11 -0
- package/dist/packages/shadcn/src/components/ui/command.js +7 -0
- package/dist/packages/shadcn/src/components/ui/dialog.cjs +93 -0
- package/dist/packages/shadcn/src/components/ui/dialog.js +81 -0
- package/dist/packages/shadcn/src/components/ui/dropdown-menu.cjs +7 -0
- package/dist/packages/shadcn/src/components/ui/dropdown-menu.js +3 -0
- package/dist/packages/shadcn/src/components/ui/file-upload.cjs +49 -0
- package/dist/packages/shadcn/src/components/ui/file-upload.js +45 -0
- package/dist/packages/shadcn/src/components/ui/form.cjs +12 -0
- package/dist/packages/shadcn/src/components/ui/form.js +9 -0
- package/dist/packages/shadcn/src/components/ui/index.cjs +30 -0
- package/dist/packages/shadcn/src/components/ui/index.js +29 -0
- package/dist/packages/shadcn/src/components/ui/input.cjs +5 -0
- package/dist/packages/shadcn/src/components/ui/input.js +2 -0
- package/dist/packages/shadcn/src/components/ui/label.cjs +5 -0
- package/dist/packages/shadcn/src/components/ui/label.js +2 -0
- package/dist/packages/shadcn/src/components/ui/pagination.cjs +9 -0
- package/dist/packages/shadcn/src/components/ui/pagination.js +4 -0
- package/dist/packages/shadcn/src/components/ui/popover.cjs +5 -0
- package/dist/packages/shadcn/src/components/ui/popover.js +2 -0
- package/dist/packages/shadcn/src/components/ui/radio-group.cjs +7 -0
- package/dist/packages/shadcn/src/components/ui/radio-group.js +3 -0
- package/dist/packages/shadcn/src/components/ui/select.cjs +10 -0
- package/dist/packages/shadcn/src/components/ui/select.js +6 -0
- package/dist/packages/shadcn/src/components/ui/separator.cjs +5 -0
- package/dist/packages/shadcn/src/components/ui/separator.js +2 -0
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags/index.cjs +26 -0
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags/index.js +22 -0
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags-input-inline/index.cjs +6 -0
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags-input-inline/index.js +3 -0
- package/dist/packages/shadcn/src/components/ui/sheet.cjs +7 -0
- package/dist/packages/shadcn/src/components/ui/sheet.js +3 -0
- package/dist/packages/shadcn/src/components/ui/slider.cjs +5 -0
- package/dist/packages/shadcn/src/components/ui/slider.js +2 -0
- package/dist/packages/shadcn/src/components/ui/switch.cjs +8 -0
- package/dist/packages/shadcn/src/components/ui/switch.js +5 -0
- package/dist/packages/shadcn/src/components/ui/tabs.cjs +5 -0
- package/dist/packages/shadcn/src/components/ui/tabs.js +2 -0
- package/dist/packages/shadcn/src/components/ui/textarea.cjs +5 -0
- package/dist/packages/shadcn/src/components/ui/textarea.js +2 -0
- package/dist/packages/shadcn/src/components/ui/tooltip.cjs +5 -0
- package/dist/packages/shadcn/src/components/ui/tooltip.js +2 -0
- package/dist/packages/shadcn/src/lib/utils.cjs +11 -0
- package/dist/packages/shadcn/src/lib/utils.js +10 -0
- package/dist/pagination/Pagination.cjs +156 -0
- package/dist/{Pagination → pagination}/Pagination.d.cts +1 -1
- package/dist/{Pagination → pagination}/Pagination.d.ts +1 -1
- package/dist/pagination/Pagination.js +151 -0
- package/dist/pagination/index.cjs +2 -0
- package/dist/pagination/index.js +1 -0
- package/dist/rich-text-editor/RichTextEditor.cjs +132 -0
- package/dist/rich-text-editor/RichTextEditor.d.cts +55 -0
- package/dist/rich-text-editor/RichTextEditor.d.ts +55 -0
- package/dist/rich-text-editor/RichTextEditor.js +126 -0
- package/dist/rich-text-editor/index.cjs +2 -0
- package/dist/rich-text-editor/index.d.cts +1 -0
- package/dist/rich-text-editor/index.d.ts +1 -0
- package/dist/rich-text-editor/index.js +1 -0
- package/dist/rich-text-editor/predefined-toolbar-options.cjs +84 -0
- package/dist/rich-text-editor/predefined-toolbar-options.js +81 -0
- 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.d.cts +2 -2
- package/dist/tags-input.d.ts +2 -2
- 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 +11 -4
- package/dist/FileUploadInline.cjs +0 -1
- package/dist/FileUploadInline.d.cts +0 -75
- package/dist/FileUploadInline.d.ts +0 -75
- package/dist/FileUploadInline.js +0 -1
- package/dist/Pagination/Pagination.cjs +0 -1
- package/dist/Pagination/Pagination.js +0 -1
- package/dist/Pagination/index.cjs +0 -1
- package/dist/Pagination/index.js +0 -1
- package/dist/PopoverContent.cjs +0 -1
- package/dist/PopoverContent.d.cts +0 -8
- package/dist/PopoverContent.d.ts +0 -8
- package/dist/PopoverContent.js +0 -1
- package/dist/icon-selector/use-async-providers.d.cts +0 -14
- package/dist/icon-selector/use-async-providers.d.ts +0 -14
- package/dist/shadcn/src/components/ui/alert.cjs +0 -1
- package/dist/shadcn/src/components/ui/alert.js +0 -1
- package/dist/shadcn/src/components/ui/dialog.cjs +0 -1
- package/dist/shadcn/src/components/ui/dialog.js +0 -1
- package/dist/shadcn/src/lib/index.cjs +0 -1
- package/dist/shadcn/src/lib/index.js +0 -1
- package/dist/shadcn/src/lib/utils.cjs +0 -1
- package/dist/shadcn/src/lib/utils.js +0 -1
- /package/dist/{Pagination → pagination}/index.d.cts +0 -0
- /package/dist/{Pagination → pagination}/index.d.ts +0 -0
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { useComposedRefs } from "../../../../../@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";
|
|
5
|
+
import { createContext2, createContextScope } from "../../../../../@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";
|
|
6
|
+
import { composeEventHandlers } from "../../../../../@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.js";
|
|
7
|
+
import { useId } from "../../../../../@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";
|
|
8
|
+
import { useControllableState } from "../../../../../@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";
|
|
9
|
+
import { createSlot } from "../../../../../@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";
|
|
10
|
+
import { Primitive } from "../../../../../@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";
|
|
11
|
+
import { DismissableLayer } from "../../../../../@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";
|
|
12
|
+
import { FocusScope } from "../../../../../@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";
|
|
13
|
+
import { Portal } from "../../../../../@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";
|
|
14
|
+
import { Presence } from "../../../../../@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";
|
|
15
|
+
import { useFocusGuards } from "../../../../../@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";
|
|
16
|
+
import Combination_default from "../../../../../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
|
+
import { hideOthers } from "../../../../../aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js";
|
|
18
|
+
import * as React$1 from "react";
|
|
19
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
+
|
|
21
|
+
//#region ../../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.mjs
|
|
22
|
+
var DIALOG_NAME = "Dialog";
|
|
23
|
+
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
24
|
+
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
25
|
+
var Dialog = (props) => {
|
|
26
|
+
const { __scopeDialog, children, open: openProp, defaultOpen, onOpenChange, modal = true } = props;
|
|
27
|
+
const triggerRef = React$1.useRef(null);
|
|
28
|
+
const contentRef = React$1.useRef(null);
|
|
29
|
+
const [open, setOpen] = useControllableState({
|
|
30
|
+
prop: openProp,
|
|
31
|
+
defaultProp: defaultOpen ?? false,
|
|
32
|
+
onChange: onOpenChange,
|
|
33
|
+
caller: DIALOG_NAME
|
|
34
|
+
});
|
|
35
|
+
return /* @__PURE__ */ jsx(DialogProvider, {
|
|
36
|
+
scope: __scopeDialog,
|
|
37
|
+
triggerRef,
|
|
38
|
+
contentRef,
|
|
39
|
+
contentId: useId(),
|
|
40
|
+
titleId: useId(),
|
|
41
|
+
descriptionId: useId(),
|
|
42
|
+
open,
|
|
43
|
+
onOpenChange: setOpen,
|
|
44
|
+
onOpenToggle: React$1.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
45
|
+
modal,
|
|
46
|
+
children
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
Dialog.displayName = DIALOG_NAME;
|
|
50
|
+
var TRIGGER_NAME = "DialogTrigger";
|
|
51
|
+
var DialogTrigger = React$1.forwardRef((props, forwardedRef) => {
|
|
52
|
+
const { __scopeDialog,...triggerProps } = props;
|
|
53
|
+
const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
|
|
54
|
+
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
55
|
+
return /* @__PURE__ */ jsx(Primitive.button, {
|
|
56
|
+
type: "button",
|
|
57
|
+
"aria-haspopup": "dialog",
|
|
58
|
+
"aria-expanded": context.open,
|
|
59
|
+
"aria-controls": context.contentId,
|
|
60
|
+
"data-state": getState(context.open),
|
|
61
|
+
...triggerProps,
|
|
62
|
+
ref: composedTriggerRef,
|
|
63
|
+
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
DialogTrigger.displayName = TRIGGER_NAME;
|
|
67
|
+
var PORTAL_NAME = "DialogPortal";
|
|
68
|
+
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, { forceMount: void 0 });
|
|
69
|
+
var DialogPortal = (props) => {
|
|
70
|
+
const { __scopeDialog, forceMount, children, container } = props;
|
|
71
|
+
const context = useDialogContext(PORTAL_NAME, __scopeDialog);
|
|
72
|
+
return /* @__PURE__ */ jsx(PortalProvider, {
|
|
73
|
+
scope: __scopeDialog,
|
|
74
|
+
forceMount,
|
|
75
|
+
children: React$1.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, {
|
|
76
|
+
present: forceMount || context.open,
|
|
77
|
+
children: /* @__PURE__ */ jsx(Portal, {
|
|
78
|
+
asChild: true,
|
|
79
|
+
container,
|
|
80
|
+
children: child
|
|
81
|
+
})
|
|
82
|
+
}))
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
DialogPortal.displayName = PORTAL_NAME;
|
|
86
|
+
var OVERLAY_NAME = "DialogOverlay";
|
|
87
|
+
var DialogOverlay = React$1.forwardRef((props, forwardedRef) => {
|
|
88
|
+
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
|
89
|
+
const { forceMount = portalContext.forceMount,...overlayProps } = props;
|
|
90
|
+
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
|
91
|
+
return context.modal ? /* @__PURE__ */ jsx(Presence, {
|
|
92
|
+
present: forceMount || context.open,
|
|
93
|
+
children: /* @__PURE__ */ jsx(DialogOverlayImpl, {
|
|
94
|
+
...overlayProps,
|
|
95
|
+
ref: forwardedRef
|
|
96
|
+
})
|
|
97
|
+
}) : null;
|
|
98
|
+
});
|
|
99
|
+
DialogOverlay.displayName = OVERLAY_NAME;
|
|
100
|
+
var Slot = createSlot("DialogOverlay.RemoveScroll");
|
|
101
|
+
var DialogOverlayImpl = React$1.forwardRef((props, forwardedRef) => {
|
|
102
|
+
const { __scopeDialog,...overlayProps } = props;
|
|
103
|
+
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
104
|
+
return /* @__PURE__ */ jsx(Combination_default, {
|
|
105
|
+
as: Slot,
|
|
106
|
+
allowPinchZoom: true,
|
|
107
|
+
shards: [context.contentRef],
|
|
108
|
+
children: /* @__PURE__ */ jsx(Primitive.div, {
|
|
109
|
+
"data-state": getState(context.open),
|
|
110
|
+
...overlayProps,
|
|
111
|
+
ref: forwardedRef,
|
|
112
|
+
style: {
|
|
113
|
+
pointerEvents: "auto",
|
|
114
|
+
...overlayProps.style
|
|
115
|
+
}
|
|
116
|
+
})
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
var CONTENT_NAME = "DialogContent";
|
|
120
|
+
var DialogContent = React$1.forwardRef((props, forwardedRef) => {
|
|
121
|
+
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
|
|
122
|
+
const { forceMount = portalContext.forceMount,...contentProps } = props;
|
|
123
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
124
|
+
return /* @__PURE__ */ jsx(Presence, {
|
|
125
|
+
present: forceMount || context.open,
|
|
126
|
+
children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, {
|
|
127
|
+
...contentProps,
|
|
128
|
+
ref: forwardedRef
|
|
129
|
+
}) : /* @__PURE__ */ jsx(DialogContentNonModal, {
|
|
130
|
+
...contentProps,
|
|
131
|
+
ref: forwardedRef
|
|
132
|
+
})
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
DialogContent.displayName = CONTENT_NAME;
|
|
136
|
+
var DialogContentModal = React$1.forwardRef((props, forwardedRef) => {
|
|
137
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
138
|
+
const contentRef = React$1.useRef(null);
|
|
139
|
+
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
140
|
+
React$1.useEffect(() => {
|
|
141
|
+
const content = contentRef.current;
|
|
142
|
+
if (content) return hideOthers(content);
|
|
143
|
+
}, []);
|
|
144
|
+
return /* @__PURE__ */ jsx(DialogContentImpl, {
|
|
145
|
+
...props,
|
|
146
|
+
ref: composedRefs,
|
|
147
|
+
trapFocus: context.open,
|
|
148
|
+
disableOutsidePointerEvents: true,
|
|
149
|
+
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
|
|
150
|
+
event.preventDefault();
|
|
151
|
+
context.triggerRef.current?.focus();
|
|
152
|
+
}),
|
|
153
|
+
onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
|
|
154
|
+
const originalEvent = event.detail.originalEvent;
|
|
155
|
+
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
156
|
+
if (originalEvent.button === 2 || ctrlLeftClick) event.preventDefault();
|
|
157
|
+
}),
|
|
158
|
+
onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => event.preventDefault())
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
var DialogContentNonModal = React$1.forwardRef((props, forwardedRef) => {
|
|
162
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
163
|
+
const hasInteractedOutsideRef = React$1.useRef(false);
|
|
164
|
+
const hasPointerDownOutsideRef = React$1.useRef(false);
|
|
165
|
+
return /* @__PURE__ */ jsx(DialogContentImpl, {
|
|
166
|
+
...props,
|
|
167
|
+
ref: forwardedRef,
|
|
168
|
+
trapFocus: false,
|
|
169
|
+
disableOutsidePointerEvents: false,
|
|
170
|
+
onCloseAutoFocus: (event) => {
|
|
171
|
+
props.onCloseAutoFocus?.(event);
|
|
172
|
+
if (!event.defaultPrevented) {
|
|
173
|
+
if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
|
|
174
|
+
event.preventDefault();
|
|
175
|
+
}
|
|
176
|
+
hasInteractedOutsideRef.current = false;
|
|
177
|
+
hasPointerDownOutsideRef.current = false;
|
|
178
|
+
},
|
|
179
|
+
onInteractOutside: (event) => {
|
|
180
|
+
props.onInteractOutside?.(event);
|
|
181
|
+
if (!event.defaultPrevented) {
|
|
182
|
+
hasInteractedOutsideRef.current = true;
|
|
183
|
+
if (event.detail.originalEvent.type === "pointerdown") hasPointerDownOutsideRef.current = true;
|
|
184
|
+
}
|
|
185
|
+
const target = event.target;
|
|
186
|
+
if (context.triggerRef.current?.contains(target)) event.preventDefault();
|
|
187
|
+
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) event.preventDefault();
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
var DialogContentImpl = React$1.forwardRef((props, forwardedRef) => {
|
|
192
|
+
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus,...contentProps } = props;
|
|
193
|
+
const context = useDialogContext(CONTENT_NAME, __scopeDialog);
|
|
194
|
+
const contentRef = React$1.useRef(null);
|
|
195
|
+
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
196
|
+
useFocusGuards();
|
|
197
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(FocusScope, {
|
|
198
|
+
asChild: true,
|
|
199
|
+
loop: true,
|
|
200
|
+
trapped: trapFocus,
|
|
201
|
+
onMountAutoFocus: onOpenAutoFocus,
|
|
202
|
+
onUnmountAutoFocus: onCloseAutoFocus,
|
|
203
|
+
children: /* @__PURE__ */ jsx(DismissableLayer, {
|
|
204
|
+
role: "dialog",
|
|
205
|
+
id: context.contentId,
|
|
206
|
+
"aria-describedby": context.descriptionId,
|
|
207
|
+
"aria-labelledby": context.titleId,
|
|
208
|
+
"data-state": getState(context.open),
|
|
209
|
+
...contentProps,
|
|
210
|
+
ref: composedRefs,
|
|
211
|
+
onDismiss: () => context.onOpenChange(false)
|
|
212
|
+
})
|
|
213
|
+
}), /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }), /* @__PURE__ */ jsx(DescriptionWarning, {
|
|
214
|
+
contentRef,
|
|
215
|
+
descriptionId: context.descriptionId
|
|
216
|
+
})] })] });
|
|
217
|
+
});
|
|
218
|
+
var TITLE_NAME = "DialogTitle";
|
|
219
|
+
var DialogTitle = React$1.forwardRef((props, forwardedRef) => {
|
|
220
|
+
const { __scopeDialog,...titleProps } = props;
|
|
221
|
+
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
222
|
+
return /* @__PURE__ */ jsx(Primitive.h2, {
|
|
223
|
+
id: context.titleId,
|
|
224
|
+
...titleProps,
|
|
225
|
+
ref: forwardedRef
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
DialogTitle.displayName = TITLE_NAME;
|
|
229
|
+
var DESCRIPTION_NAME = "DialogDescription";
|
|
230
|
+
var DialogDescription = React$1.forwardRef((props, forwardedRef) => {
|
|
231
|
+
const { __scopeDialog,...descriptionProps } = props;
|
|
232
|
+
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
233
|
+
return /* @__PURE__ */ jsx(Primitive.p, {
|
|
234
|
+
id: context.descriptionId,
|
|
235
|
+
...descriptionProps,
|
|
236
|
+
ref: forwardedRef
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
240
|
+
var CLOSE_NAME = "DialogClose";
|
|
241
|
+
var DialogClose = React$1.forwardRef((props, forwardedRef) => {
|
|
242
|
+
const { __scopeDialog,...closeProps } = props;
|
|
243
|
+
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
244
|
+
return /* @__PURE__ */ jsx(Primitive.button, {
|
|
245
|
+
type: "button",
|
|
246
|
+
...closeProps,
|
|
247
|
+
ref: forwardedRef,
|
|
248
|
+
onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
DialogClose.displayName = CLOSE_NAME;
|
|
252
|
+
function getState(open) {
|
|
253
|
+
return open ? "open" : "closed";
|
|
254
|
+
}
|
|
255
|
+
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
|
256
|
+
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
|
|
257
|
+
contentName: CONTENT_NAME,
|
|
258
|
+
titleName: TITLE_NAME,
|
|
259
|
+
docsSlug: "dialog"
|
|
260
|
+
});
|
|
261
|
+
var TitleWarning = ({ titleId }) => {
|
|
262
|
+
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
|
263
|
+
const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
|
264
|
+
|
|
265
|
+
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
266
|
+
|
|
267
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
|
268
|
+
React$1.useEffect(() => {
|
|
269
|
+
if (titleId) {
|
|
270
|
+
if (!document.getElementById(titleId)) console.error(MESSAGE);
|
|
271
|
+
}
|
|
272
|
+
}, [MESSAGE, titleId]);
|
|
273
|
+
return null;
|
|
274
|
+
};
|
|
275
|
+
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
276
|
+
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
277
|
+
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;
|
|
278
|
+
React$1.useEffect(() => {
|
|
279
|
+
const describedById = contentRef.current?.getAttribute("aria-describedby");
|
|
280
|
+
if (descriptionId && describedById) {
|
|
281
|
+
if (!document.getElementById(descriptionId)) console.warn(MESSAGE);
|
|
282
|
+
}
|
|
283
|
+
}, [
|
|
284
|
+
MESSAGE,
|
|
285
|
+
contentRef,
|
|
286
|
+
descriptionId
|
|
287
|
+
]);
|
|
288
|
+
return null;
|
|
289
|
+
};
|
|
290
|
+
var Root = Dialog;
|
|
291
|
+
var Portal$1 = DialogPortal;
|
|
292
|
+
var Overlay = DialogOverlay;
|
|
293
|
+
var Content = DialogContent;
|
|
294
|
+
var Title = DialogTitle;
|
|
295
|
+
var Description = DialogDescription;
|
|
296
|
+
var Close = DialogClose;
|
|
297
|
+
|
|
298
|
+
//#endregion
|
|
299
|
+
export { Close, Content, Description, Overlay, Portal$1 as Portal, Root, Title };
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const require_rolldown_runtime = require('../../../../../../../_virtual/rolldown_runtime.cjs');
|
|
5
|
+
const require_index = require('../../../../../@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');
|
|
6
|
+
const require_index$1 = require('../../../../../@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.cjs');
|
|
7
|
+
const require_index$2 = require('../../../../../@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');
|
|
8
|
+
const require_index$3 = require('../../../../../@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');
|
|
9
|
+
const require_index$4 = require('../../../../../@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');
|
|
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 ../../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.mjs
|
|
16
|
+
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
17
|
+
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
18
|
+
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
19
|
+
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
20
|
+
var originalBodyPointerEvents;
|
|
21
|
+
var DismissableLayerContext = react.createContext({
|
|
22
|
+
layers: /* @__PURE__ */ new Set(),
|
|
23
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
24
|
+
branches: /* @__PURE__ */ new Set()
|
|
25
|
+
});
|
|
26
|
+
var DismissableLayer = react.forwardRef((props, forwardedRef) => {
|
|
27
|
+
const { disableOutsidePointerEvents = false, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onDismiss,...layerProps } = props;
|
|
28
|
+
const context = react.useContext(DismissableLayerContext);
|
|
29
|
+
const [node, setNode] = react.useState(null);
|
|
30
|
+
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
31
|
+
const [, force] = react.useState({});
|
|
32
|
+
const composedRefs = require_index.useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
33
|
+
const layers = Array.from(context.layers);
|
|
34
|
+
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
35
|
+
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
36
|
+
const index = node ? layers.indexOf(node) : -1;
|
|
37
|
+
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
38
|
+
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
39
|
+
const pointerDownOutside = usePointerDownOutside((event) => {
|
|
40
|
+
const target = event.target;
|
|
41
|
+
const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
42
|
+
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
43
|
+
onPointerDownOutside?.(event);
|
|
44
|
+
onInteractOutside?.(event);
|
|
45
|
+
if (!event.defaultPrevented) onDismiss?.();
|
|
46
|
+
}, ownerDocument);
|
|
47
|
+
const focusOutside = useFocusOutside((event) => {
|
|
48
|
+
const target = event.target;
|
|
49
|
+
if ([...context.branches].some((branch) => branch.contains(target))) return;
|
|
50
|
+
onFocusOutside?.(event);
|
|
51
|
+
onInteractOutside?.(event);
|
|
52
|
+
if (!event.defaultPrevented) onDismiss?.();
|
|
53
|
+
}, ownerDocument);
|
|
54
|
+
require_index$4.useEscapeKeydown((event) => {
|
|
55
|
+
if (!(index === context.layers.size - 1)) return;
|
|
56
|
+
onEscapeKeyDown?.(event);
|
|
57
|
+
if (!event.defaultPrevented && onDismiss) {
|
|
58
|
+
event.preventDefault();
|
|
59
|
+
onDismiss();
|
|
60
|
+
}
|
|
61
|
+
}, ownerDocument);
|
|
62
|
+
react.useEffect(() => {
|
|
63
|
+
if (!node) return;
|
|
64
|
+
if (disableOutsidePointerEvents) {
|
|
65
|
+
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
66
|
+
originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
|
67
|
+
ownerDocument.body.style.pointerEvents = "none";
|
|
68
|
+
}
|
|
69
|
+
context.layersWithOutsidePointerEventsDisabled.add(node);
|
|
70
|
+
}
|
|
71
|
+
context.layers.add(node);
|
|
72
|
+
dispatchUpdate();
|
|
73
|
+
return () => {
|
|
74
|
+
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
|
|
75
|
+
};
|
|
76
|
+
}, [
|
|
77
|
+
node,
|
|
78
|
+
ownerDocument,
|
|
79
|
+
disableOutsidePointerEvents,
|
|
80
|
+
context
|
|
81
|
+
]);
|
|
82
|
+
react.useEffect(() => {
|
|
83
|
+
return () => {
|
|
84
|
+
if (!node) return;
|
|
85
|
+
context.layers.delete(node);
|
|
86
|
+
context.layersWithOutsidePointerEventsDisabled.delete(node);
|
|
87
|
+
dispatchUpdate();
|
|
88
|
+
};
|
|
89
|
+
}, [node, context]);
|
|
90
|
+
react.useEffect(() => {
|
|
91
|
+
const handleUpdate = () => force({});
|
|
92
|
+
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
93
|
+
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
94
|
+
}, []);
|
|
95
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index$2.Primitive.div, {
|
|
96
|
+
...layerProps,
|
|
97
|
+
ref: composedRefs,
|
|
98
|
+
style: {
|
|
99
|
+
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
100
|
+
...props.style
|
|
101
|
+
},
|
|
102
|
+
onFocusCapture: require_index$1.composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
103
|
+
onBlurCapture: require_index$1.composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
104
|
+
onPointerDownCapture: require_index$1.composeEventHandlers(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
108
|
+
var BRANCH_NAME = "DismissableLayerBranch";
|
|
109
|
+
var DismissableLayerBranch = react.forwardRef((props, forwardedRef) => {
|
|
110
|
+
const context = react.useContext(DismissableLayerContext);
|
|
111
|
+
const ref = react.useRef(null);
|
|
112
|
+
const composedRefs = require_index.useComposedRefs(forwardedRef, ref);
|
|
113
|
+
react.useEffect(() => {
|
|
114
|
+
const node = ref.current;
|
|
115
|
+
if (node) {
|
|
116
|
+
context.branches.add(node);
|
|
117
|
+
return () => {
|
|
118
|
+
context.branches.delete(node);
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
}, [context.branches]);
|
|
122
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index$2.Primitive.div, {
|
|
123
|
+
...props,
|
|
124
|
+
ref: composedRefs
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
128
|
+
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
129
|
+
const handlePointerDownOutside = require_index$3.useCallbackRef(onPointerDownOutside);
|
|
130
|
+
const isPointerInsideReactTreeRef = react.useRef(false);
|
|
131
|
+
const handleClickRef = react.useRef(() => {});
|
|
132
|
+
react.useEffect(() => {
|
|
133
|
+
const handlePointerDown = (event) => {
|
|
134
|
+
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
135
|
+
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
136
|
+
handleAndDispatchCustomEvent(POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, { discrete: true });
|
|
137
|
+
};
|
|
138
|
+
const eventDetail = { originalEvent: event };
|
|
139
|
+
if (event.pointerType === "touch") {
|
|
140
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
141
|
+
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
|
142
|
+
ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
|
|
143
|
+
} else handleAndDispatchPointerDownOutsideEvent2();
|
|
144
|
+
} else ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
145
|
+
isPointerInsideReactTreeRef.current = false;
|
|
146
|
+
};
|
|
147
|
+
const timerId = window.setTimeout(() => {
|
|
148
|
+
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
|
149
|
+
}, 0);
|
|
150
|
+
return () => {
|
|
151
|
+
window.clearTimeout(timerId);
|
|
152
|
+
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
|
153
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
154
|
+
};
|
|
155
|
+
}, [ownerDocument, handlePointerDownOutside]);
|
|
156
|
+
return { onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true };
|
|
157
|
+
}
|
|
158
|
+
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
159
|
+
const handleFocusOutside = require_index$3.useCallbackRef(onFocusOutside);
|
|
160
|
+
const isFocusInsideReactTreeRef = react.useRef(false);
|
|
161
|
+
react.useEffect(() => {
|
|
162
|
+
const handleFocus = (event) => {
|
|
163
|
+
if (event.target && !isFocusInsideReactTreeRef.current) handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, { originalEvent: event }, { discrete: false });
|
|
164
|
+
};
|
|
165
|
+
ownerDocument.addEventListener("focusin", handleFocus);
|
|
166
|
+
return () => ownerDocument.removeEventListener("focusin", handleFocus);
|
|
167
|
+
}, [ownerDocument, handleFocusOutside]);
|
|
168
|
+
return {
|
|
169
|
+
onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
|
|
170
|
+
onBlurCapture: () => isFocusInsideReactTreeRef.current = false
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
function dispatchUpdate() {
|
|
174
|
+
const event = new CustomEvent(CONTEXT_UPDATE);
|
|
175
|
+
document.dispatchEvent(event);
|
|
176
|
+
}
|
|
177
|
+
function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
178
|
+
const target = detail.originalEvent.target;
|
|
179
|
+
const event = new CustomEvent(name, {
|
|
180
|
+
bubbles: false,
|
|
181
|
+
cancelable: true,
|
|
182
|
+
detail
|
|
183
|
+
});
|
|
184
|
+
if (handler) target.addEventListener(name, handler, { once: true });
|
|
185
|
+
if (discrete) require_index$2.dispatchDiscreteCustomEvent(target, event);
|
|
186
|
+
else target.dispatchEvent(event);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
//#endregion
|
|
190
|
+
exports.DismissableLayer = DismissableLayer;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { useComposedRefs } from "../../../../../@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";
|
|
5
|
+
import { composeEventHandlers } from "../../../../../@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.js";
|
|
6
|
+
import { Primitive, dispatchDiscreteCustomEvent } from "../../../../../@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";
|
|
7
|
+
import { useCallbackRef } from "../../../../../@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";
|
|
8
|
+
import { useEscapeKeydown } from "../../../../../@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";
|
|
9
|
+
import * as React$1 from "react";
|
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
|
11
|
+
|
|
12
|
+
//#region ../../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.mjs
|
|
13
|
+
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
14
|
+
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
15
|
+
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
16
|
+
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
17
|
+
var originalBodyPointerEvents;
|
|
18
|
+
var DismissableLayerContext = React$1.createContext({
|
|
19
|
+
layers: /* @__PURE__ */ new Set(),
|
|
20
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
21
|
+
branches: /* @__PURE__ */ new Set()
|
|
22
|
+
});
|
|
23
|
+
var DismissableLayer = React$1.forwardRef((props, forwardedRef) => {
|
|
24
|
+
const { disableOutsidePointerEvents = false, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onDismiss,...layerProps } = props;
|
|
25
|
+
const context = React$1.useContext(DismissableLayerContext);
|
|
26
|
+
const [node, setNode] = React$1.useState(null);
|
|
27
|
+
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
28
|
+
const [, force] = React$1.useState({});
|
|
29
|
+
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
30
|
+
const layers = Array.from(context.layers);
|
|
31
|
+
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
32
|
+
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
33
|
+
const index = node ? layers.indexOf(node) : -1;
|
|
34
|
+
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
35
|
+
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
36
|
+
const pointerDownOutside = usePointerDownOutside((event) => {
|
|
37
|
+
const target = event.target;
|
|
38
|
+
const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
39
|
+
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
40
|
+
onPointerDownOutside?.(event);
|
|
41
|
+
onInteractOutside?.(event);
|
|
42
|
+
if (!event.defaultPrevented) onDismiss?.();
|
|
43
|
+
}, ownerDocument);
|
|
44
|
+
const focusOutside = useFocusOutside((event) => {
|
|
45
|
+
const target = event.target;
|
|
46
|
+
if ([...context.branches].some((branch) => branch.contains(target))) return;
|
|
47
|
+
onFocusOutside?.(event);
|
|
48
|
+
onInteractOutside?.(event);
|
|
49
|
+
if (!event.defaultPrevented) onDismiss?.();
|
|
50
|
+
}, ownerDocument);
|
|
51
|
+
useEscapeKeydown((event) => {
|
|
52
|
+
if (!(index === context.layers.size - 1)) return;
|
|
53
|
+
onEscapeKeyDown?.(event);
|
|
54
|
+
if (!event.defaultPrevented && onDismiss) {
|
|
55
|
+
event.preventDefault();
|
|
56
|
+
onDismiss();
|
|
57
|
+
}
|
|
58
|
+
}, ownerDocument);
|
|
59
|
+
React$1.useEffect(() => {
|
|
60
|
+
if (!node) return;
|
|
61
|
+
if (disableOutsidePointerEvents) {
|
|
62
|
+
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
63
|
+
originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
|
64
|
+
ownerDocument.body.style.pointerEvents = "none";
|
|
65
|
+
}
|
|
66
|
+
context.layersWithOutsidePointerEventsDisabled.add(node);
|
|
67
|
+
}
|
|
68
|
+
context.layers.add(node);
|
|
69
|
+
dispatchUpdate();
|
|
70
|
+
return () => {
|
|
71
|
+
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
|
|
72
|
+
};
|
|
73
|
+
}, [
|
|
74
|
+
node,
|
|
75
|
+
ownerDocument,
|
|
76
|
+
disableOutsidePointerEvents,
|
|
77
|
+
context
|
|
78
|
+
]);
|
|
79
|
+
React$1.useEffect(() => {
|
|
80
|
+
return () => {
|
|
81
|
+
if (!node) return;
|
|
82
|
+
context.layers.delete(node);
|
|
83
|
+
context.layersWithOutsidePointerEventsDisabled.delete(node);
|
|
84
|
+
dispatchUpdate();
|
|
85
|
+
};
|
|
86
|
+
}, [node, context]);
|
|
87
|
+
React$1.useEffect(() => {
|
|
88
|
+
const handleUpdate = () => force({});
|
|
89
|
+
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
90
|
+
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
91
|
+
}, []);
|
|
92
|
+
return /* @__PURE__ */ jsx(Primitive.div, {
|
|
93
|
+
...layerProps,
|
|
94
|
+
ref: composedRefs,
|
|
95
|
+
style: {
|
|
96
|
+
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
97
|
+
...props.style
|
|
98
|
+
},
|
|
99
|
+
onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
100
|
+
onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
101
|
+
onPointerDownCapture: composeEventHandlers(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
105
|
+
var BRANCH_NAME = "DismissableLayerBranch";
|
|
106
|
+
var DismissableLayerBranch = React$1.forwardRef((props, forwardedRef) => {
|
|
107
|
+
const context = React$1.useContext(DismissableLayerContext);
|
|
108
|
+
const ref = React$1.useRef(null);
|
|
109
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
110
|
+
React$1.useEffect(() => {
|
|
111
|
+
const node = ref.current;
|
|
112
|
+
if (node) {
|
|
113
|
+
context.branches.add(node);
|
|
114
|
+
return () => {
|
|
115
|
+
context.branches.delete(node);
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
}, [context.branches]);
|
|
119
|
+
return /* @__PURE__ */ jsx(Primitive.div, {
|
|
120
|
+
...props,
|
|
121
|
+
ref: composedRefs
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
125
|
+
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
126
|
+
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
127
|
+
const isPointerInsideReactTreeRef = React$1.useRef(false);
|
|
128
|
+
const handleClickRef = React$1.useRef(() => {});
|
|
129
|
+
React$1.useEffect(() => {
|
|
130
|
+
const handlePointerDown = (event) => {
|
|
131
|
+
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
132
|
+
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
133
|
+
handleAndDispatchCustomEvent(POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, { discrete: true });
|
|
134
|
+
};
|
|
135
|
+
const eventDetail = { originalEvent: event };
|
|
136
|
+
if (event.pointerType === "touch") {
|
|
137
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
138
|
+
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
|
139
|
+
ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
|
|
140
|
+
} else handleAndDispatchPointerDownOutsideEvent2();
|
|
141
|
+
} else ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
142
|
+
isPointerInsideReactTreeRef.current = false;
|
|
143
|
+
};
|
|
144
|
+
const timerId = window.setTimeout(() => {
|
|
145
|
+
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
|
146
|
+
}, 0);
|
|
147
|
+
return () => {
|
|
148
|
+
window.clearTimeout(timerId);
|
|
149
|
+
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
|
150
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
151
|
+
};
|
|
152
|
+
}, [ownerDocument, handlePointerDownOutside]);
|
|
153
|
+
return { onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true };
|
|
154
|
+
}
|
|
155
|
+
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
156
|
+
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
157
|
+
const isFocusInsideReactTreeRef = React$1.useRef(false);
|
|
158
|
+
React$1.useEffect(() => {
|
|
159
|
+
const handleFocus = (event) => {
|
|
160
|
+
if (event.target && !isFocusInsideReactTreeRef.current) handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, { originalEvent: event }, { discrete: false });
|
|
161
|
+
};
|
|
162
|
+
ownerDocument.addEventListener("focusin", handleFocus);
|
|
163
|
+
return () => ownerDocument.removeEventListener("focusin", handleFocus);
|
|
164
|
+
}, [ownerDocument, handleFocusOutside]);
|
|
165
|
+
return {
|
|
166
|
+
onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
|
|
167
|
+
onBlurCapture: () => isFocusInsideReactTreeRef.current = false
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
function dispatchUpdate() {
|
|
171
|
+
const event = new CustomEvent(CONTEXT_UPDATE);
|
|
172
|
+
document.dispatchEvent(event);
|
|
173
|
+
}
|
|
174
|
+
function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
175
|
+
const target = detail.originalEvent.target;
|
|
176
|
+
const event = new CustomEvent(name, {
|
|
177
|
+
bubbles: false,
|
|
178
|
+
cancelable: true,
|
|
179
|
+
detail
|
|
180
|
+
});
|
|
181
|
+
if (handler) target.addEventListener(name, handler, { once: true });
|
|
182
|
+
if (discrete) dispatchDiscreteCustomEvent(target, event);
|
|
183
|
+
else target.dispatchEvent(event);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
//#endregion
|
|
187
|
+
export { DismissableLayer };
|