@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
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const require_rolldown_runtime = require('../../../../../../../_virtual/rolldown_runtime.cjs');
|
|
5
|
+
let react = require("react");
|
|
6
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
7
|
+
|
|
8
|
+
//#region ../../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.mjs
|
|
9
|
+
var count = 0;
|
|
10
|
+
function useFocusGuards() {
|
|
11
|
+
react.useEffect(() => {
|
|
12
|
+
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
13
|
+
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
14
|
+
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
15
|
+
count++;
|
|
16
|
+
return () => {
|
|
17
|
+
if (count === 1) document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
|
18
|
+
count--;
|
|
19
|
+
};
|
|
20
|
+
}, []);
|
|
21
|
+
}
|
|
22
|
+
function createFocusGuard() {
|
|
23
|
+
const element = document.createElement("span");
|
|
24
|
+
element.setAttribute("data-radix-focus-guard", "");
|
|
25
|
+
element.tabIndex = 0;
|
|
26
|
+
element.style.outline = "none";
|
|
27
|
+
element.style.opacity = "0";
|
|
28
|
+
element.style.position = "fixed";
|
|
29
|
+
element.style.pointerEvents = "none";
|
|
30
|
+
return element;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
exports.useFocusGuards = useFocusGuards;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import * as React$1 from "react";
|
|
5
|
+
|
|
6
|
+
//#region ../../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.mjs
|
|
7
|
+
var count = 0;
|
|
8
|
+
function useFocusGuards() {
|
|
9
|
+
React$1.useEffect(() => {
|
|
10
|
+
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
11
|
+
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
12
|
+
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
13
|
+
count++;
|
|
14
|
+
return () => {
|
|
15
|
+
if (count === 1) document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
|
16
|
+
count--;
|
|
17
|
+
};
|
|
18
|
+
}, []);
|
|
19
|
+
}
|
|
20
|
+
function createFocusGuard() {
|
|
21
|
+
const element = document.createElement("span");
|
|
22
|
+
element.setAttribute("data-radix-focus-guard", "");
|
|
23
|
+
element.tabIndex = 0;
|
|
24
|
+
element.style.outline = "none";
|
|
25
|
+
element.style.opacity = "0";
|
|
26
|
+
element.style.position = "fixed";
|
|
27
|
+
element.style.pointerEvents = "none";
|
|
28
|
+
return element;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export { useFocusGuards };
|
|
@@ -0,0 +1,203 @@
|
|
|
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_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');
|
|
7
|
+
const require_index$2 = 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');
|
|
8
|
+
let react = require("react");
|
|
9
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
10
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
12
|
+
|
|
13
|
+
//#region ../../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.mjs
|
|
14
|
+
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
15
|
+
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
16
|
+
var EVENT_OPTIONS = {
|
|
17
|
+
bubbles: false,
|
|
18
|
+
cancelable: true
|
|
19
|
+
};
|
|
20
|
+
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
21
|
+
var FocusScope = react.forwardRef((props, forwardedRef) => {
|
|
22
|
+
const { loop = false, trapped = false, onMountAutoFocus: onMountAutoFocusProp, onUnmountAutoFocus: onUnmountAutoFocusProp,...scopeProps } = props;
|
|
23
|
+
const [container, setContainer] = react.useState(null);
|
|
24
|
+
const onMountAutoFocus = require_index$2.useCallbackRef(onMountAutoFocusProp);
|
|
25
|
+
const onUnmountAutoFocus = require_index$2.useCallbackRef(onUnmountAutoFocusProp);
|
|
26
|
+
const lastFocusedElementRef = react.useRef(null);
|
|
27
|
+
const composedRefs = require_index.useComposedRefs(forwardedRef, (node) => setContainer(node));
|
|
28
|
+
const focusScope = react.useRef({
|
|
29
|
+
paused: false,
|
|
30
|
+
pause() {
|
|
31
|
+
this.paused = true;
|
|
32
|
+
},
|
|
33
|
+
resume() {
|
|
34
|
+
this.paused = false;
|
|
35
|
+
}
|
|
36
|
+
}).current;
|
|
37
|
+
react.useEffect(() => {
|
|
38
|
+
if (trapped) {
|
|
39
|
+
let handleFocusIn2 = function(event) {
|
|
40
|
+
if (focusScope.paused || !container) return;
|
|
41
|
+
const target = event.target;
|
|
42
|
+
if (container.contains(target)) lastFocusedElementRef.current = target;
|
|
43
|
+
else focus(lastFocusedElementRef.current, { select: true });
|
|
44
|
+
}, handleFocusOut2 = function(event) {
|
|
45
|
+
if (focusScope.paused || !container) return;
|
|
46
|
+
const relatedTarget = event.relatedTarget;
|
|
47
|
+
if (relatedTarget === null) return;
|
|
48
|
+
if (!container.contains(relatedTarget)) focus(lastFocusedElementRef.current, { select: true });
|
|
49
|
+
}, handleMutations2 = function(mutations) {
|
|
50
|
+
if (document.activeElement !== document.body) return;
|
|
51
|
+
for (const mutation of mutations) if (mutation.removedNodes.length > 0) focus(container);
|
|
52
|
+
};
|
|
53
|
+
document.addEventListener("focusin", handleFocusIn2);
|
|
54
|
+
document.addEventListener("focusout", handleFocusOut2);
|
|
55
|
+
const mutationObserver = new MutationObserver(handleMutations2);
|
|
56
|
+
if (container) mutationObserver.observe(container, {
|
|
57
|
+
childList: true,
|
|
58
|
+
subtree: true
|
|
59
|
+
});
|
|
60
|
+
return () => {
|
|
61
|
+
document.removeEventListener("focusin", handleFocusIn2);
|
|
62
|
+
document.removeEventListener("focusout", handleFocusOut2);
|
|
63
|
+
mutationObserver.disconnect();
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}, [
|
|
67
|
+
trapped,
|
|
68
|
+
container,
|
|
69
|
+
focusScope.paused
|
|
70
|
+
]);
|
|
71
|
+
react.useEffect(() => {
|
|
72
|
+
if (container) {
|
|
73
|
+
focusScopesStack.add(focusScope);
|
|
74
|
+
const previouslyFocusedElement = document.activeElement;
|
|
75
|
+
if (!container.contains(previouslyFocusedElement)) {
|
|
76
|
+
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
|
|
77
|
+
container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
78
|
+
container.dispatchEvent(mountEvent);
|
|
79
|
+
if (!mountEvent.defaultPrevented) {
|
|
80
|
+
focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
|
|
81
|
+
if (document.activeElement === previouslyFocusedElement) focus(container);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return () => {
|
|
85
|
+
container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
86
|
+
setTimeout(() => {
|
|
87
|
+
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
|
|
88
|
+
container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
89
|
+
container.dispatchEvent(unmountEvent);
|
|
90
|
+
if (!unmountEvent.defaultPrevented) focus(previouslyFocusedElement ?? document.body, { select: true });
|
|
91
|
+
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
92
|
+
focusScopesStack.remove(focusScope);
|
|
93
|
+
}, 0);
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}, [
|
|
97
|
+
container,
|
|
98
|
+
onMountAutoFocus,
|
|
99
|
+
onUnmountAutoFocus,
|
|
100
|
+
focusScope
|
|
101
|
+
]);
|
|
102
|
+
const handleKeyDown = react.useCallback((event) => {
|
|
103
|
+
if (!loop && !trapped) return;
|
|
104
|
+
if (focusScope.paused) return;
|
|
105
|
+
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
106
|
+
const focusedElement = document.activeElement;
|
|
107
|
+
if (isTabKey && focusedElement) {
|
|
108
|
+
const container2 = event.currentTarget;
|
|
109
|
+
const [first, last] = getTabbableEdges(container2);
|
|
110
|
+
if (!(first && last)) {
|
|
111
|
+
if (focusedElement === container2) event.preventDefault();
|
|
112
|
+
} else if (!event.shiftKey && focusedElement === last) {
|
|
113
|
+
event.preventDefault();
|
|
114
|
+
if (loop) focus(first, { select: true });
|
|
115
|
+
} else if (event.shiftKey && focusedElement === first) {
|
|
116
|
+
event.preventDefault();
|
|
117
|
+
if (loop) focus(last, { select: true });
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}, [
|
|
121
|
+
loop,
|
|
122
|
+
trapped,
|
|
123
|
+
focusScope.paused
|
|
124
|
+
]);
|
|
125
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index$1.Primitive.div, {
|
|
126
|
+
tabIndex: -1,
|
|
127
|
+
...scopeProps,
|
|
128
|
+
ref: composedRefs,
|
|
129
|
+
onKeyDown: handleKeyDown
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
133
|
+
function focusFirst(candidates, { select = false } = {}) {
|
|
134
|
+
const previouslyFocusedElement = document.activeElement;
|
|
135
|
+
for (const candidate of candidates) {
|
|
136
|
+
focus(candidate, { select });
|
|
137
|
+
if (document.activeElement !== previouslyFocusedElement) return;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function getTabbableEdges(container) {
|
|
141
|
+
const candidates = getTabbableCandidates(container);
|
|
142
|
+
return [findVisible(candidates, container), findVisible(candidates.reverse(), container)];
|
|
143
|
+
}
|
|
144
|
+
function getTabbableCandidates(container) {
|
|
145
|
+
const nodes = [];
|
|
146
|
+
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { acceptNode: (node) => {
|
|
147
|
+
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
148
|
+
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
149
|
+
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
150
|
+
} });
|
|
151
|
+
while (walker.nextNode()) nodes.push(walker.currentNode);
|
|
152
|
+
return nodes;
|
|
153
|
+
}
|
|
154
|
+
function findVisible(elements, container) {
|
|
155
|
+
for (const element of elements) if (!isHidden(element, { upTo: container })) return element;
|
|
156
|
+
}
|
|
157
|
+
function isHidden(node, { upTo }) {
|
|
158
|
+
if (getComputedStyle(node).visibility === "hidden") return true;
|
|
159
|
+
while (node) {
|
|
160
|
+
if (upTo !== void 0 && node === upTo) return false;
|
|
161
|
+
if (getComputedStyle(node).display === "none") return true;
|
|
162
|
+
node = node.parentElement;
|
|
163
|
+
}
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
function isSelectableInput(element) {
|
|
167
|
+
return element instanceof HTMLInputElement && "select" in element;
|
|
168
|
+
}
|
|
169
|
+
function focus(element, { select = false } = {}) {
|
|
170
|
+
if (element && element.focus) {
|
|
171
|
+
const previouslyFocusedElement = document.activeElement;
|
|
172
|
+
element.focus({ preventScroll: true });
|
|
173
|
+
if (element !== previouslyFocusedElement && isSelectableInput(element) && select) element.select();
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
var focusScopesStack = createFocusScopesStack();
|
|
177
|
+
function createFocusScopesStack() {
|
|
178
|
+
let stack = [];
|
|
179
|
+
return {
|
|
180
|
+
add(focusScope) {
|
|
181
|
+
const activeFocusScope = stack[0];
|
|
182
|
+
if (focusScope !== activeFocusScope) activeFocusScope?.pause();
|
|
183
|
+
stack = arrayRemove(stack, focusScope);
|
|
184
|
+
stack.unshift(focusScope);
|
|
185
|
+
},
|
|
186
|
+
remove(focusScope) {
|
|
187
|
+
stack = arrayRemove(stack, focusScope);
|
|
188
|
+
stack[0]?.resume();
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
function arrayRemove(array, item) {
|
|
193
|
+
const updatedArray = [...array];
|
|
194
|
+
const index = updatedArray.indexOf(item);
|
|
195
|
+
if (index !== -1) updatedArray.splice(index, 1);
|
|
196
|
+
return updatedArray;
|
|
197
|
+
}
|
|
198
|
+
function removeLinks(items) {
|
|
199
|
+
return items.filter((item) => item.tagName !== "A");
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
//#endregion
|
|
203
|
+
exports.FocusScope = FocusScope;
|
|
@@ -0,0 +1,200 @@
|
|
|
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 { 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";
|
|
6
|
+
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";
|
|
7
|
+
import * as React$1 from "react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
|
|
10
|
+
//#region ../../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.mjs
|
|
11
|
+
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
12
|
+
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
13
|
+
var EVENT_OPTIONS = {
|
|
14
|
+
bubbles: false,
|
|
15
|
+
cancelable: true
|
|
16
|
+
};
|
|
17
|
+
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
18
|
+
var FocusScope = React$1.forwardRef((props, forwardedRef) => {
|
|
19
|
+
const { loop = false, trapped = false, onMountAutoFocus: onMountAutoFocusProp, onUnmountAutoFocus: onUnmountAutoFocusProp,...scopeProps } = props;
|
|
20
|
+
const [container, setContainer] = React$1.useState(null);
|
|
21
|
+
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
22
|
+
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
23
|
+
const lastFocusedElementRef = React$1.useRef(null);
|
|
24
|
+
const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
|
|
25
|
+
const focusScope = React$1.useRef({
|
|
26
|
+
paused: false,
|
|
27
|
+
pause() {
|
|
28
|
+
this.paused = true;
|
|
29
|
+
},
|
|
30
|
+
resume() {
|
|
31
|
+
this.paused = false;
|
|
32
|
+
}
|
|
33
|
+
}).current;
|
|
34
|
+
React$1.useEffect(() => {
|
|
35
|
+
if (trapped) {
|
|
36
|
+
let handleFocusIn2 = function(event) {
|
|
37
|
+
if (focusScope.paused || !container) return;
|
|
38
|
+
const target = event.target;
|
|
39
|
+
if (container.contains(target)) lastFocusedElementRef.current = target;
|
|
40
|
+
else focus(lastFocusedElementRef.current, { select: true });
|
|
41
|
+
}, handleFocusOut2 = function(event) {
|
|
42
|
+
if (focusScope.paused || !container) return;
|
|
43
|
+
const relatedTarget = event.relatedTarget;
|
|
44
|
+
if (relatedTarget === null) return;
|
|
45
|
+
if (!container.contains(relatedTarget)) focus(lastFocusedElementRef.current, { select: true });
|
|
46
|
+
}, handleMutations2 = function(mutations) {
|
|
47
|
+
if (document.activeElement !== document.body) return;
|
|
48
|
+
for (const mutation of mutations) if (mutation.removedNodes.length > 0) focus(container);
|
|
49
|
+
};
|
|
50
|
+
document.addEventListener("focusin", handleFocusIn2);
|
|
51
|
+
document.addEventListener("focusout", handleFocusOut2);
|
|
52
|
+
const mutationObserver = new MutationObserver(handleMutations2);
|
|
53
|
+
if (container) mutationObserver.observe(container, {
|
|
54
|
+
childList: true,
|
|
55
|
+
subtree: true
|
|
56
|
+
});
|
|
57
|
+
return () => {
|
|
58
|
+
document.removeEventListener("focusin", handleFocusIn2);
|
|
59
|
+
document.removeEventListener("focusout", handleFocusOut2);
|
|
60
|
+
mutationObserver.disconnect();
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}, [
|
|
64
|
+
trapped,
|
|
65
|
+
container,
|
|
66
|
+
focusScope.paused
|
|
67
|
+
]);
|
|
68
|
+
React$1.useEffect(() => {
|
|
69
|
+
if (container) {
|
|
70
|
+
focusScopesStack.add(focusScope);
|
|
71
|
+
const previouslyFocusedElement = document.activeElement;
|
|
72
|
+
if (!container.contains(previouslyFocusedElement)) {
|
|
73
|
+
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
|
|
74
|
+
container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
75
|
+
container.dispatchEvent(mountEvent);
|
|
76
|
+
if (!mountEvent.defaultPrevented) {
|
|
77
|
+
focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
|
|
78
|
+
if (document.activeElement === previouslyFocusedElement) focus(container);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return () => {
|
|
82
|
+
container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
83
|
+
setTimeout(() => {
|
|
84
|
+
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
|
|
85
|
+
container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
86
|
+
container.dispatchEvent(unmountEvent);
|
|
87
|
+
if (!unmountEvent.defaultPrevented) focus(previouslyFocusedElement ?? document.body, { select: true });
|
|
88
|
+
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
89
|
+
focusScopesStack.remove(focusScope);
|
|
90
|
+
}, 0);
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
}, [
|
|
94
|
+
container,
|
|
95
|
+
onMountAutoFocus,
|
|
96
|
+
onUnmountAutoFocus,
|
|
97
|
+
focusScope
|
|
98
|
+
]);
|
|
99
|
+
const handleKeyDown = React$1.useCallback((event) => {
|
|
100
|
+
if (!loop && !trapped) return;
|
|
101
|
+
if (focusScope.paused) return;
|
|
102
|
+
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
103
|
+
const focusedElement = document.activeElement;
|
|
104
|
+
if (isTabKey && focusedElement) {
|
|
105
|
+
const container2 = event.currentTarget;
|
|
106
|
+
const [first, last] = getTabbableEdges(container2);
|
|
107
|
+
if (!(first && last)) {
|
|
108
|
+
if (focusedElement === container2) event.preventDefault();
|
|
109
|
+
} else if (!event.shiftKey && focusedElement === last) {
|
|
110
|
+
event.preventDefault();
|
|
111
|
+
if (loop) focus(first, { select: true });
|
|
112
|
+
} else if (event.shiftKey && focusedElement === first) {
|
|
113
|
+
event.preventDefault();
|
|
114
|
+
if (loop) focus(last, { select: true });
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}, [
|
|
118
|
+
loop,
|
|
119
|
+
trapped,
|
|
120
|
+
focusScope.paused
|
|
121
|
+
]);
|
|
122
|
+
return /* @__PURE__ */ jsx(Primitive.div, {
|
|
123
|
+
tabIndex: -1,
|
|
124
|
+
...scopeProps,
|
|
125
|
+
ref: composedRefs,
|
|
126
|
+
onKeyDown: handleKeyDown
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
130
|
+
function focusFirst(candidates, { select = false } = {}) {
|
|
131
|
+
const previouslyFocusedElement = document.activeElement;
|
|
132
|
+
for (const candidate of candidates) {
|
|
133
|
+
focus(candidate, { select });
|
|
134
|
+
if (document.activeElement !== previouslyFocusedElement) return;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
function getTabbableEdges(container) {
|
|
138
|
+
const candidates = getTabbableCandidates(container);
|
|
139
|
+
return [findVisible(candidates, container), findVisible(candidates.reverse(), container)];
|
|
140
|
+
}
|
|
141
|
+
function getTabbableCandidates(container) {
|
|
142
|
+
const nodes = [];
|
|
143
|
+
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { acceptNode: (node) => {
|
|
144
|
+
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
145
|
+
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
146
|
+
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
147
|
+
} });
|
|
148
|
+
while (walker.nextNode()) nodes.push(walker.currentNode);
|
|
149
|
+
return nodes;
|
|
150
|
+
}
|
|
151
|
+
function findVisible(elements, container) {
|
|
152
|
+
for (const element of elements) if (!isHidden(element, { upTo: container })) return element;
|
|
153
|
+
}
|
|
154
|
+
function isHidden(node, { upTo }) {
|
|
155
|
+
if (getComputedStyle(node).visibility === "hidden") return true;
|
|
156
|
+
while (node) {
|
|
157
|
+
if (upTo !== void 0 && node === upTo) return false;
|
|
158
|
+
if (getComputedStyle(node).display === "none") return true;
|
|
159
|
+
node = node.parentElement;
|
|
160
|
+
}
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
function isSelectableInput(element) {
|
|
164
|
+
return element instanceof HTMLInputElement && "select" in element;
|
|
165
|
+
}
|
|
166
|
+
function focus(element, { select = false } = {}) {
|
|
167
|
+
if (element && element.focus) {
|
|
168
|
+
const previouslyFocusedElement = document.activeElement;
|
|
169
|
+
element.focus({ preventScroll: true });
|
|
170
|
+
if (element !== previouslyFocusedElement && isSelectableInput(element) && select) element.select();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
var focusScopesStack = createFocusScopesStack();
|
|
174
|
+
function createFocusScopesStack() {
|
|
175
|
+
let stack = [];
|
|
176
|
+
return {
|
|
177
|
+
add(focusScope) {
|
|
178
|
+
const activeFocusScope = stack[0];
|
|
179
|
+
if (focusScope !== activeFocusScope) activeFocusScope?.pause();
|
|
180
|
+
stack = arrayRemove(stack, focusScope);
|
|
181
|
+
stack.unshift(focusScope);
|
|
182
|
+
},
|
|
183
|
+
remove(focusScope) {
|
|
184
|
+
stack = arrayRemove(stack, focusScope);
|
|
185
|
+
stack[0]?.resume();
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
function arrayRemove(array, item) {
|
|
190
|
+
const updatedArray = [...array];
|
|
191
|
+
const index = updatedArray.indexOf(item);
|
|
192
|
+
if (index !== -1) updatedArray.splice(index, 1);
|
|
193
|
+
return updatedArray;
|
|
194
|
+
}
|
|
195
|
+
function removeLinks(items) {
|
|
196
|
+
return items.filter((item) => item.tagName !== "A");
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
//#endregion
|
|
200
|
+
export { FocusScope };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_index = require('../../../../../@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');
|
|
3
|
+
let react = require("react");
|
|
4
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
5
|
+
|
|
6
|
+
//#region ../../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.mjs
|
|
7
|
+
var useReactId = react[" useId ".trim().toString()] || (() => void 0);
|
|
8
|
+
var count = 0;
|
|
9
|
+
function useId(deterministicId) {
|
|
10
|
+
const [id, setId] = react.useState(useReactId());
|
|
11
|
+
require_index.useLayoutEffect2(() => {
|
|
12
|
+
if (!deterministicId) setId((reactId) => reactId ?? String(count++));
|
|
13
|
+
}, [deterministicId]);
|
|
14
|
+
return deterministicId || (id ? `radix-${id}` : "");
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
exports.useId = useId;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useLayoutEffect2 } from "../../../../../@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";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
|
|
4
|
+
//#region ../../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.mjs
|
|
5
|
+
var useReactId = React$1[" useId ".trim().toString()] || (() => void 0);
|
|
6
|
+
var count = 0;
|
|
7
|
+
function useId(deterministicId) {
|
|
8
|
+
const [id, setId] = React$1.useState(useReactId());
|
|
9
|
+
useLayoutEffect2(() => {
|
|
10
|
+
if (!deterministicId) setId((reactId) => reactId ?? String(count++));
|
|
11
|
+
}, [deterministicId]);
|
|
12
|
+
return deterministicId || (id ? `radix-${id}` : "");
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { useId };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const require_rolldown_runtime = require('../../../../../../../_virtual/rolldown_runtime.cjs');
|
|
5
|
+
const require_index = require('../../../../../@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');
|
|
6
|
+
const require_index$1 = 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');
|
|
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
|
+
let react_dom = require("react-dom");
|
|
12
|
+
react_dom = require_rolldown_runtime.__toESM(react_dom);
|
|
13
|
+
|
|
14
|
+
//#region ../../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.mjs
|
|
15
|
+
var PORTAL_NAME = "Portal";
|
|
16
|
+
var Portal = react.forwardRef((props, forwardedRef) => {
|
|
17
|
+
const { container: containerProp,...portalProps } = props;
|
|
18
|
+
const [mounted, setMounted] = react.useState(false);
|
|
19
|
+
require_index.useLayoutEffect2(() => setMounted(true), []);
|
|
20
|
+
const container = containerProp || mounted && globalThis?.document?.body;
|
|
21
|
+
return container ? react_dom.default.createPortal(/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index$1.Primitive.div, {
|
|
22
|
+
...portalProps,
|
|
23
|
+
ref: forwardedRef
|
|
24
|
+
}), container) : null;
|
|
25
|
+
});
|
|
26
|
+
Portal.displayName = PORTAL_NAME;
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
exports.Portal = Portal;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { useLayoutEffect2 } from "../../../../../@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";
|
|
5
|
+
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";
|
|
6
|
+
import * as React$1 from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import ReactDOM from "react-dom";
|
|
9
|
+
|
|
10
|
+
//#region ../../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.mjs
|
|
11
|
+
var PORTAL_NAME = "Portal";
|
|
12
|
+
var Portal = React$1.forwardRef((props, forwardedRef) => {
|
|
13
|
+
const { container: containerProp,...portalProps } = props;
|
|
14
|
+
const [mounted, setMounted] = React$1.useState(false);
|
|
15
|
+
useLayoutEffect2(() => setMounted(true), []);
|
|
16
|
+
const container = containerProp || mounted && globalThis?.document?.body;
|
|
17
|
+
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, {
|
|
18
|
+
...portalProps,
|
|
19
|
+
ref: forwardedRef
|
|
20
|
+
}), container) : null;
|
|
21
|
+
});
|
|
22
|
+
Portal.displayName = PORTAL_NAME;
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { Portal };
|
|
@@ -0,0 +1,110 @@
|
|
|
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_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');
|
|
7
|
+
let react = require("react");
|
|
8
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
9
|
+
|
|
10
|
+
//#region ../../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.mjs
|
|
11
|
+
function useStateMachine(initialState, machine) {
|
|
12
|
+
return react.useReducer((state, event) => {
|
|
13
|
+
return machine[state][event] ?? state;
|
|
14
|
+
}, initialState);
|
|
15
|
+
}
|
|
16
|
+
var Presence = (props) => {
|
|
17
|
+
const { present, children } = props;
|
|
18
|
+
const presence = usePresence(present);
|
|
19
|
+
const child = typeof children === "function" ? children({ present: presence.isPresent }) : react.Children.only(children);
|
|
20
|
+
const ref = require_index.useComposedRefs(presence.ref, getElementRef(child));
|
|
21
|
+
return typeof children === "function" || presence.isPresent ? react.cloneElement(child, { ref }) : null;
|
|
22
|
+
};
|
|
23
|
+
Presence.displayName = "Presence";
|
|
24
|
+
function usePresence(present) {
|
|
25
|
+
const [node, setNode] = react.useState();
|
|
26
|
+
const stylesRef = react.useRef(null);
|
|
27
|
+
const prevPresentRef = react.useRef(present);
|
|
28
|
+
const prevAnimationNameRef = react.useRef("none");
|
|
29
|
+
const [state, send] = useStateMachine(present ? "mounted" : "unmounted", {
|
|
30
|
+
mounted: {
|
|
31
|
+
UNMOUNT: "unmounted",
|
|
32
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
33
|
+
},
|
|
34
|
+
unmountSuspended: {
|
|
35
|
+
MOUNT: "mounted",
|
|
36
|
+
ANIMATION_END: "unmounted"
|
|
37
|
+
},
|
|
38
|
+
unmounted: { MOUNT: "mounted" }
|
|
39
|
+
});
|
|
40
|
+
react.useEffect(() => {
|
|
41
|
+
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
42
|
+
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
43
|
+
}, [state]);
|
|
44
|
+
require_index$1.useLayoutEffect2(() => {
|
|
45
|
+
const styles = stylesRef.current;
|
|
46
|
+
const wasPresent = prevPresentRef.current;
|
|
47
|
+
if (wasPresent !== present) {
|
|
48
|
+
const prevAnimationName = prevAnimationNameRef.current;
|
|
49
|
+
const currentAnimationName = getAnimationName(styles);
|
|
50
|
+
if (present) send("MOUNT");
|
|
51
|
+
else if (currentAnimationName === "none" || styles?.display === "none") send("UNMOUNT");
|
|
52
|
+
else if (wasPresent && prevAnimationName !== currentAnimationName) send("ANIMATION_OUT");
|
|
53
|
+
else send("UNMOUNT");
|
|
54
|
+
prevPresentRef.current = present;
|
|
55
|
+
}
|
|
56
|
+
}, [present, send]);
|
|
57
|
+
require_index$1.useLayoutEffect2(() => {
|
|
58
|
+
if (node) {
|
|
59
|
+
let timeoutId;
|
|
60
|
+
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
|
61
|
+
const handleAnimationEnd = (event) => {
|
|
62
|
+
const isCurrentAnimation = getAnimationName(stylesRef.current).includes(CSS.escape(event.animationName));
|
|
63
|
+
if (event.target === node && isCurrentAnimation) {
|
|
64
|
+
send("ANIMATION_END");
|
|
65
|
+
if (!prevPresentRef.current) {
|
|
66
|
+
const currentFillMode = node.style.animationFillMode;
|
|
67
|
+
node.style.animationFillMode = "forwards";
|
|
68
|
+
timeoutId = ownerWindow.setTimeout(() => {
|
|
69
|
+
if (node.style.animationFillMode === "forwards") node.style.animationFillMode = currentFillMode;
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const handleAnimationStart = (event) => {
|
|
75
|
+
if (event.target === node) prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
|
76
|
+
};
|
|
77
|
+
node.addEventListener("animationstart", handleAnimationStart);
|
|
78
|
+
node.addEventListener("animationcancel", handleAnimationEnd);
|
|
79
|
+
node.addEventListener("animationend", handleAnimationEnd);
|
|
80
|
+
return () => {
|
|
81
|
+
ownerWindow.clearTimeout(timeoutId);
|
|
82
|
+
node.removeEventListener("animationstart", handleAnimationStart);
|
|
83
|
+
node.removeEventListener("animationcancel", handleAnimationEnd);
|
|
84
|
+
node.removeEventListener("animationend", handleAnimationEnd);
|
|
85
|
+
};
|
|
86
|
+
} else send("ANIMATION_END");
|
|
87
|
+
}, [node, send]);
|
|
88
|
+
return {
|
|
89
|
+
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
90
|
+
ref: react.useCallback((node2) => {
|
|
91
|
+
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
|
92
|
+
setNode(node2);
|
|
93
|
+
}, [])
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function getAnimationName(styles) {
|
|
97
|
+
return styles?.animationName || "none";
|
|
98
|
+
}
|
|
99
|
+
function getElementRef(element) {
|
|
100
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
101
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
102
|
+
if (mayWarn) return element.ref;
|
|
103
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
104
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
105
|
+
if (mayWarn) return element.props.ref;
|
|
106
|
+
return element.props.ref || element.ref;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
//#endregion
|
|
110
|
+
exports.Presence = Presence;
|