@pixpilot/shadcn-ui 0.4.1 → 0.4.3
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.d.ts +2 -2
- package/dist/Alert.cjs +10 -8
- package/dist/Alert.js +13 -12
- package/dist/Button.d.cts +1 -1
- package/dist/ContentCard.d.cts +1 -1
- package/dist/DatePicker.d.cts +1 -1
- package/dist/DatePicker.d.ts +2 -2
- package/dist/Select.d.cts +1 -1
- package/dist/_virtual/rolldown_runtime.cjs +0 -19
- package/dist/confirmation-dialog/ConfirmationDialog.cjs +2 -3
- package/dist/confirmation-dialog/ConfirmationDialog.d.cts +0 -1
- package/dist/confirmation-dialog/ConfirmationDialog.js +3 -4
- package/dist/confirmation-dialog/index.cjs +0 -1
- package/dist/file-upload/FileUploadListItem.cjs +1 -2
- package/dist/file-upload/FileUploadListItem.js +2 -3
- package/dist/file-upload/hooks/index.cjs +0 -1
- package/dist/file-upload/hooks/use-file-error.cjs +3 -3
- package/dist/file-upload/hooks/use-file-error.js +2 -3
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.cjs +3 -3
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.js +2 -3
- package/dist/file-upload/index.cjs +0 -1
- package/dist/file-upload/index.d.cts +1 -2
- package/dist/file-upload/utils/create-placeholder-file.cjs +0 -1
- package/dist/file-upload/utils/get-file-key.cjs +0 -1
- package/dist/file-upload/utils/get-file-meta.cjs +0 -1
- package/dist/file-upload/utils/is-file-equal.cjs +0 -1
- package/dist/file-upload/utils/merge-file-metadata.cjs +0 -1
- package/dist/file-upload-inline/FileUploadInlineItem.cjs +1 -3
- package/dist/file-upload-inline/FileUploadInlineItem.js +2 -4
- package/dist/file-upload-inline/defaults.cjs +0 -1
- package/dist/file-upload-inline/index.cjs +0 -1
- package/dist/file-upload-inline/utils.cjs +0 -1
- package/dist/hooks/index.cjs +0 -1
- package/dist/icon-selector/IconPicker.cjs +1 -1
- package/dist/icon-selector/IconPicker.d.cts +0 -1
- package/dist/icon-selector/IconPicker.d.ts +0 -1
- package/dist/icon-selector/IconPicker.js +1 -1
- package/dist/icon-selector/constants.cjs +0 -1
- package/dist/icon-selector/index.cjs +0 -1
- package/dist/icon-selector/index.d.cts +2 -2
- package/dist/icon-selector/index.d.ts +2 -2
- package/dist/icon-selector/utils/is-valid-provider.cjs +0 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/pagination/index.cjs +0 -1
- package/dist/rich-text-editor/index.cjs +0 -1
- package/dist/shadcn/src/lib/index.cjs +1 -0
- package/dist/shadcn/src/lib/index.js +1 -0
- package/dist/shadcn/src/lib/utils.cjs +13 -0
- package/dist/shadcn/src/lib/utils.js +10 -0
- package/dist/spinner/index.cjs +0 -1
- package/dist/spinner/styles.cjs +0 -1
- package/dist/toast/AlertToast.js +2 -2
- package/dist/toast/index.cjs +0 -1
- package/package.json +4 -4
- package/dist/_virtual/rolldown_runtime.js +0 -43
- package/dist/file-upload/hooks/index.d.cts +0 -2
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.d.cts +0 -1
- package/dist/file-upload/hooks/use-file-upload-store.d.cts +0 -2
- package/dist/file-upload/utils/get-file-key.d.cts +0 -1
- package/dist/file-upload/utils/get-file-meta.d.cts +0 -1
- package/dist/file-upload/utils/index.d.cts +0 -4
- package/dist/file-upload/utils/is-file-equal.d.cts +0 -1
- package/dist/file-upload/utils/merge-file-metadata.d.cts +0 -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 +0 -558
- 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 +0 -555
- 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 +0 -566
- 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 +0 -565
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +0 -695
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -679
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +0 -521
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -503
- 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 +0 -282
- 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 +0 -266
- 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 +0 -3767
- 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 +0 -3747
- 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 +0 -426
- 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 +0 -379
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +0 -165
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +0 -175
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -151
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -138
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.cjs +0 -13
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.js +0 -11
- 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 +0 -33
- 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 +0 -30
- 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 +0 -92
- 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 +0 -88
- 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 +0 -310
- 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 +0 -299
- 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 +0 -190
- 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 +0 -187
- 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 +0 -34
- 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 +0 -32
- 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 +0 -203
- 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 +0 -200
- 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 +0 -18
- 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 +0 -16
- 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 +0 -29
- 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 +0 -25
- 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 +0 -110
- 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 +0 -108
- 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 +0 -52
- 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 +0 -47
- 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 +0 -92
- 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 +0 -89
- 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 +0 -103
- 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 +0 -100
- 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 +0 -15
- 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 +0 -13
- 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 +0 -64
- 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 +0 -62
- 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 +0 -19
- 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 +0 -17
- 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 +0 -9
- 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 +0 -7
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +0 -108
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es5/index.cjs +0 -155
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs +0 -19
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +0 -17
- package/dist/node_modules/.pnpm/detect-node-es@1.1.0/node_modules/detect-node-es/es5/node.cjs +0 -14
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +0 -9
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es5/index.cjs +0 -22
- 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 +0 -46
- 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 +0 -12
- 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 +0 -3
- 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 +0 -37
- 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 +0 -61
- 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 +0 -23
- 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 +0 -57
- 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 +0 -49
- 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 +0 -17
- 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 +0 -163
- 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 +0 -64
- 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 +0 -16
- 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 +0 -85
- 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 +0 -7
- 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 +0 -9
- 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 +0 -29
- 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 +0 -179
- 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 +0 -79
- 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 +0 -27
- 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 +0 -98
- 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 +0 -19
- 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 +0 -18
- 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 +0 -21
- 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 +0 -21
- 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 +0 -27
- 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 +0 -3
- 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 +0 -43
- 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 +0 -33
- 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 +0 -40
- 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 +0 -39
- 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 +0 -55
- package/dist/node_modules/.pnpm/tabbable@6.3.0/node_modules/tabbable/dist/index.cjs +0 -347
- package/dist/node_modules/.pnpm/tabbable@6.3.0/node_modules/tabbable/dist/index.esm.js +0 -268
- package/dist/node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.cjs +0 -1895
- package/dist/node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.js +0 -1893
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.cjs +0 -557
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +0 -31
- 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 +0 -22
- 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 +0 -47
- 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 +0 -42
- 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 +0 -34
- 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 +0 -39
- 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 +0 -85
- 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 +0 -40
- 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 +0 -59
- 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 +0 -34
- 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 +0 -61
- 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 +0 -53
- 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 +0 -38
- 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 +0 -19
- 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 +0 -84
- 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 +0 -22
- 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 +0 -21
- 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 +0 -31
- 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 +0 -31
- 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 +0 -60
- 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 +0 -69
- 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 +0 -101
- 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 +0 -58
- package/dist/packages/shadcn/src/components/index.cjs +0 -6
- package/dist/packages/shadcn/src/components/index.js +0 -5
- package/dist/packages/shadcn/src/components/ui/OrContinueWithSeparator.cjs +0 -6
- package/dist/packages/shadcn/src/components/ui/OrContinueWithSeparator.js +0 -3
- package/dist/packages/shadcn/src/components/ui/alert-dialog.cjs +0 -10
- package/dist/packages/shadcn/src/components/ui/alert-dialog.js +0 -6
- package/dist/packages/shadcn/src/components/ui/alert.cjs +0 -44
- package/dist/packages/shadcn/src/components/ui/alert.js +0 -38
- package/dist/packages/shadcn/src/components/ui/avatar.cjs +0 -5
- package/dist/packages/shadcn/src/components/ui/avatar.js +0 -2
- package/dist/packages/shadcn/src/components/ui/badge.cjs +0 -20
- package/dist/packages/shadcn/src/components/ui/badge.js +0 -16
- package/dist/packages/shadcn/src/components/ui/button.cjs +0 -50
- package/dist/packages/shadcn/src/components/ui/button.js +0 -45
- package/dist/packages/shadcn/src/components/ui/calendar.cjs +0 -8
- package/dist/packages/shadcn/src/components/ui/calendar.js +0 -4
- package/dist/packages/shadcn/src/components/ui/card.cjs +0 -5
- package/dist/packages/shadcn/src/components/ui/card.js +0 -2
- package/dist/packages/shadcn/src/components/ui/checkbox.cjs +0 -10
- package/dist/packages/shadcn/src/components/ui/checkbox.js +0 -6
- package/dist/packages/shadcn/src/components/ui/command.cjs +0 -11
- package/dist/packages/shadcn/src/components/ui/command.js +0 -7
- package/dist/packages/shadcn/src/components/ui/dialog.cjs +0 -93
- package/dist/packages/shadcn/src/components/ui/dialog.js +0 -81
- package/dist/packages/shadcn/src/components/ui/dropdown-menu.cjs +0 -7
- package/dist/packages/shadcn/src/components/ui/dropdown-menu.js +0 -3
- package/dist/packages/shadcn/src/components/ui/file-upload.cjs +0 -49
- package/dist/packages/shadcn/src/components/ui/file-upload.js +0 -45
- package/dist/packages/shadcn/src/components/ui/form.cjs +0 -12
- package/dist/packages/shadcn/src/components/ui/form.js +0 -9
- package/dist/packages/shadcn/src/components/ui/index.cjs +0 -30
- package/dist/packages/shadcn/src/components/ui/index.js +0 -29
- package/dist/packages/shadcn/src/components/ui/input.cjs +0 -5
- package/dist/packages/shadcn/src/components/ui/input.js +0 -2
- package/dist/packages/shadcn/src/components/ui/label.cjs +0 -5
- package/dist/packages/shadcn/src/components/ui/label.js +0 -2
- package/dist/packages/shadcn/src/components/ui/pagination.cjs +0 -9
- package/dist/packages/shadcn/src/components/ui/pagination.js +0 -4
- package/dist/packages/shadcn/src/components/ui/popover.cjs +0 -5
- package/dist/packages/shadcn/src/components/ui/popover.js +0 -2
- package/dist/packages/shadcn/src/components/ui/radio-group.cjs +0 -7
- package/dist/packages/shadcn/src/components/ui/radio-group.js +0 -3
- package/dist/packages/shadcn/src/components/ui/select.cjs +0 -10
- package/dist/packages/shadcn/src/components/ui/select.js +0 -6
- package/dist/packages/shadcn/src/components/ui/separator.cjs +0 -5
- package/dist/packages/shadcn/src/components/ui/separator.js +0 -2
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags/index.cjs +0 -26
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags/index.js +0 -22
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags-input-inline/index.cjs +0 -6
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags-input-inline/index.js +0 -3
- package/dist/packages/shadcn/src/components/ui/sheet.cjs +0 -7
- package/dist/packages/shadcn/src/components/ui/sheet.js +0 -3
- package/dist/packages/shadcn/src/components/ui/slider.cjs +0 -5
- package/dist/packages/shadcn/src/components/ui/slider.js +0 -2
- package/dist/packages/shadcn/src/components/ui/switch.cjs +0 -8
- package/dist/packages/shadcn/src/components/ui/switch.js +0 -5
- package/dist/packages/shadcn/src/components/ui/tabs.cjs +0 -5
- package/dist/packages/shadcn/src/components/ui/tabs.js +0 -2
- package/dist/packages/shadcn/src/components/ui/textarea.cjs +0 -5
- package/dist/packages/shadcn/src/components/ui/textarea.js +0 -2
- package/dist/packages/shadcn/src/components/ui/tooltip.cjs +0 -5
- package/dist/packages/shadcn/src/components/ui/tooltip.js +0 -2
- package/dist/packages/shadcn/src/lib/utils.cjs +0 -11
- package/dist/packages/shadcn/src/lib/utils.js +0 -10
|
@@ -1,679 +0,0 @@
|
|
|
1
|
-
import { __esm } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
-
import { clamp, evaluate, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, init_floating_ui_utils, max, min, placements, rectToClientRect, sides } from "../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js";
|
|
3
|
-
|
|
4
|
-
//#region ../../node_modules/.pnpm/@floating-ui+core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
5
|
-
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
6
|
-
let { reference, floating } = _ref;
|
|
7
|
-
const sideAxis = getSideAxis(placement);
|
|
8
|
-
const alignmentAxis = getAlignmentAxis(placement);
|
|
9
|
-
const alignLength = getAxisLength(alignmentAxis);
|
|
10
|
-
const side = getSide(placement);
|
|
11
|
-
const isVertical = sideAxis === "y";
|
|
12
|
-
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
13
|
-
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
14
|
-
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
|
15
|
-
let coords;
|
|
16
|
-
switch (side) {
|
|
17
|
-
case "top":
|
|
18
|
-
coords = {
|
|
19
|
-
x: commonX,
|
|
20
|
-
y: reference.y - floating.height
|
|
21
|
-
};
|
|
22
|
-
break;
|
|
23
|
-
case "bottom":
|
|
24
|
-
coords = {
|
|
25
|
-
x: commonX,
|
|
26
|
-
y: reference.y + reference.height
|
|
27
|
-
};
|
|
28
|
-
break;
|
|
29
|
-
case "right":
|
|
30
|
-
coords = {
|
|
31
|
-
x: reference.x + reference.width,
|
|
32
|
-
y: commonY
|
|
33
|
-
};
|
|
34
|
-
break;
|
|
35
|
-
case "left":
|
|
36
|
-
coords = {
|
|
37
|
-
x: reference.x - floating.width,
|
|
38
|
-
y: commonY
|
|
39
|
-
};
|
|
40
|
-
break;
|
|
41
|
-
default: coords = {
|
|
42
|
-
x: reference.x,
|
|
43
|
-
y: reference.y
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
switch (getAlignment(placement)) {
|
|
47
|
-
case "start":
|
|
48
|
-
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
49
|
-
break;
|
|
50
|
-
case "end":
|
|
51
|
-
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
|
-
return coords;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Resolves with an object of overflow side offsets that determine how much the
|
|
58
|
-
* element is overflowing a given clipping boundary on each side.
|
|
59
|
-
* - positive = overflowing the boundary by that number of pixels
|
|
60
|
-
* - negative = how many pixels left before it will overflow
|
|
61
|
-
* - 0 = lies flush with the boundary
|
|
62
|
-
* @see https://floating-ui.com/docs/detectOverflow
|
|
63
|
-
*/
|
|
64
|
-
async function detectOverflow(state, options) {
|
|
65
|
-
var _await$platform$isEle;
|
|
66
|
-
if (options === void 0) options = {};
|
|
67
|
-
const { x, y, platform, rects, elements, strategy } = state;
|
|
68
|
-
const { boundary = "clippingAncestors", rootBoundary = "viewport", elementContext = "floating", altBoundary = false, padding = 0 } = evaluate(options, state);
|
|
69
|
-
const paddingObject = getPaddingObject(padding);
|
|
70
|
-
const element = elements[altBoundary ? elementContext === "floating" ? "reference" : "floating" : elementContext];
|
|
71
|
-
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
72
|
-
element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating)),
|
|
73
|
-
boundary,
|
|
74
|
-
rootBoundary,
|
|
75
|
-
strategy
|
|
76
|
-
}));
|
|
77
|
-
const rect = elementContext === "floating" ? {
|
|
78
|
-
x,
|
|
79
|
-
y,
|
|
80
|
-
width: rects.floating.width,
|
|
81
|
-
height: rects.floating.height
|
|
82
|
-
} : rects.reference;
|
|
83
|
-
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
84
|
-
const offsetScale = await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)) ? await (platform.getScale == null ? void 0 : platform.getScale(offsetParent)) || {
|
|
85
|
-
x: 1,
|
|
86
|
-
y: 1
|
|
87
|
-
} : {
|
|
88
|
-
x: 1,
|
|
89
|
-
y: 1
|
|
90
|
-
};
|
|
91
|
-
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
92
|
-
elements,
|
|
93
|
-
rect,
|
|
94
|
-
offsetParent,
|
|
95
|
-
strategy
|
|
96
|
-
}) : rect);
|
|
97
|
-
return {
|
|
98
|
-
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
99
|
-
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
100
|
-
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
101
|
-
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
function getPlacementList(alignment, autoAlignment, allowedPlacements) {
|
|
105
|
-
return (alignment ? [...allowedPlacements.filter((placement) => getAlignment(placement) === alignment), ...allowedPlacements.filter((placement) => getAlignment(placement) !== alignment)] : allowedPlacements.filter((placement) => getSide(placement) === placement)).filter((placement) => {
|
|
106
|
-
if (alignment) return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
|
|
107
|
-
return true;
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
function getSideOffsets(overflow, rect) {
|
|
111
|
-
return {
|
|
112
|
-
top: overflow.top - rect.height,
|
|
113
|
-
right: overflow.right - rect.width,
|
|
114
|
-
bottom: overflow.bottom - rect.height,
|
|
115
|
-
left: overflow.left - rect.width
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
function isAnySideFullyClipped(overflow) {
|
|
119
|
-
return sides.some((side) => overflow[side] >= 0);
|
|
120
|
-
}
|
|
121
|
-
function getBoundingRect(rects) {
|
|
122
|
-
const minX = min(...rects.map((rect) => rect.left));
|
|
123
|
-
const minY = min(...rects.map((rect) => rect.top));
|
|
124
|
-
const maxX = max(...rects.map((rect) => rect.right));
|
|
125
|
-
const maxY = max(...rects.map((rect) => rect.bottom));
|
|
126
|
-
return {
|
|
127
|
-
x: minX,
|
|
128
|
-
y: minY,
|
|
129
|
-
width: maxX - minX,
|
|
130
|
-
height: maxY - minY
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
function getRectsByLine(rects) {
|
|
134
|
-
const sortedRects = rects.slice().sort((a, b) => a.y - b.y);
|
|
135
|
-
const groups = [];
|
|
136
|
-
let prevRect = null;
|
|
137
|
-
for (let i = 0; i < sortedRects.length; i++) {
|
|
138
|
-
const rect = sortedRects[i];
|
|
139
|
-
if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) groups.push([rect]);
|
|
140
|
-
else groups[groups.length - 1].push(rect);
|
|
141
|
-
prevRect = rect;
|
|
142
|
-
}
|
|
143
|
-
return groups.map((rect) => rectToClientRect(getBoundingRect(rect)));
|
|
144
|
-
}
|
|
145
|
-
async function convertValueToCoords(state, options) {
|
|
146
|
-
const { placement, platform, elements } = state;
|
|
147
|
-
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
148
|
-
const side = getSide(placement);
|
|
149
|
-
const alignment = getAlignment(placement);
|
|
150
|
-
const isVertical = getSideAxis(placement) === "y";
|
|
151
|
-
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
152
|
-
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
153
|
-
const rawValue = evaluate(options, state);
|
|
154
|
-
let { mainAxis, crossAxis, alignmentAxis } = typeof rawValue === "number" ? {
|
|
155
|
-
mainAxis: rawValue,
|
|
156
|
-
crossAxis: 0,
|
|
157
|
-
alignmentAxis: null
|
|
158
|
-
} : {
|
|
159
|
-
mainAxis: rawValue.mainAxis || 0,
|
|
160
|
-
crossAxis: rawValue.crossAxis || 0,
|
|
161
|
-
alignmentAxis: rawValue.alignmentAxis
|
|
162
|
-
};
|
|
163
|
-
if (alignment && typeof alignmentAxis === "number") crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
|
|
164
|
-
return isVertical ? {
|
|
165
|
-
x: crossAxis * crossAxisMulti,
|
|
166
|
-
y: mainAxis * mainAxisMulti
|
|
167
|
-
} : {
|
|
168
|
-
x: mainAxis * mainAxisMulti,
|
|
169
|
-
y: crossAxis * crossAxisMulti
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
var computePosition, arrow, autoPlacement, flip, hide, inline, originSides, offset, shift, limitShift, size;
|
|
173
|
-
var init_floating_ui_core = __esm({ "../../node_modules/.pnpm/@floating-ui+core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.mjs": (() => {
|
|
174
|
-
init_floating_ui_utils();
|
|
175
|
-
computePosition = async (reference, floating, config) => {
|
|
176
|
-
const { placement = "bottom", strategy = "absolute", middleware = [], platform } = config;
|
|
177
|
-
const validMiddleware = middleware.filter(Boolean);
|
|
178
|
-
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
179
|
-
let rects = await platform.getElementRects({
|
|
180
|
-
reference,
|
|
181
|
-
floating,
|
|
182
|
-
strategy
|
|
183
|
-
});
|
|
184
|
-
let { x, y } = computeCoordsFromPlacement(rects, placement, rtl);
|
|
185
|
-
let statefulPlacement = placement;
|
|
186
|
-
let middlewareData = {};
|
|
187
|
-
let resetCount = 0;
|
|
188
|
-
for (let i = 0; i < validMiddleware.length; i++) {
|
|
189
|
-
const { name, fn } = validMiddleware[i];
|
|
190
|
-
const { x: nextX, y: nextY, data, reset } = await fn({
|
|
191
|
-
x,
|
|
192
|
-
y,
|
|
193
|
-
initialPlacement: placement,
|
|
194
|
-
placement: statefulPlacement,
|
|
195
|
-
strategy,
|
|
196
|
-
middlewareData,
|
|
197
|
-
rects,
|
|
198
|
-
platform,
|
|
199
|
-
elements: {
|
|
200
|
-
reference,
|
|
201
|
-
floating
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
x = nextX != null ? nextX : x;
|
|
205
|
-
y = nextY != null ? nextY : y;
|
|
206
|
-
middlewareData = {
|
|
207
|
-
...middlewareData,
|
|
208
|
-
[name]: {
|
|
209
|
-
...middlewareData[name],
|
|
210
|
-
...data
|
|
211
|
-
}
|
|
212
|
-
};
|
|
213
|
-
if (reset && resetCount <= 50) {
|
|
214
|
-
resetCount++;
|
|
215
|
-
if (typeof reset === "object") {
|
|
216
|
-
if (reset.placement) statefulPlacement = reset.placement;
|
|
217
|
-
if (reset.rects) rects = reset.rects === true ? await platform.getElementRects({
|
|
218
|
-
reference,
|
|
219
|
-
floating,
|
|
220
|
-
strategy
|
|
221
|
-
}) : reset.rects;
|
|
222
|
-
({x, y} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
223
|
-
}
|
|
224
|
-
i = -1;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
return {
|
|
228
|
-
x,
|
|
229
|
-
y,
|
|
230
|
-
placement: statefulPlacement,
|
|
231
|
-
strategy,
|
|
232
|
-
middlewareData
|
|
233
|
-
};
|
|
234
|
-
};
|
|
235
|
-
arrow = (options) => ({
|
|
236
|
-
name: "arrow",
|
|
237
|
-
options,
|
|
238
|
-
async fn(state) {
|
|
239
|
-
const { x, y, placement, rects, platform, elements, middlewareData } = state;
|
|
240
|
-
const { element, padding = 0 } = evaluate(options, state) || {};
|
|
241
|
-
if (element == null) return {};
|
|
242
|
-
const paddingObject = getPaddingObject(padding);
|
|
243
|
-
const coords = {
|
|
244
|
-
x,
|
|
245
|
-
y
|
|
246
|
-
};
|
|
247
|
-
const axis = getAlignmentAxis(placement);
|
|
248
|
-
const length = getAxisLength(axis);
|
|
249
|
-
const arrowDimensions = await platform.getDimensions(element);
|
|
250
|
-
const isYAxis = axis === "y";
|
|
251
|
-
const minProp = isYAxis ? "top" : "left";
|
|
252
|
-
const maxProp = isYAxis ? "bottom" : "right";
|
|
253
|
-
const clientProp = isYAxis ? "clientHeight" : "clientWidth";
|
|
254
|
-
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
|
255
|
-
const startDiff = coords[axis] - rects.reference[axis];
|
|
256
|
-
const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
|
|
257
|
-
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
|
|
258
|
-
if (!clientSize || !await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent))) clientSize = elements.floating[clientProp] || rects.floating[length];
|
|
259
|
-
const centerToReference = endDiff / 2 - startDiff / 2;
|
|
260
|
-
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
|
|
261
|
-
const minPadding = min(paddingObject[minProp], largestPossiblePadding);
|
|
262
|
-
const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
|
|
263
|
-
const min$1 = minPadding;
|
|
264
|
-
const max$1 = clientSize - arrowDimensions[length] - maxPadding;
|
|
265
|
-
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
266
|
-
const offset$1 = clamp(min$1, center, max$1);
|
|
267
|
-
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset$1 && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
268
|
-
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max$1 : 0;
|
|
269
|
-
return {
|
|
270
|
-
[axis]: coords[axis] + alignmentOffset,
|
|
271
|
-
data: {
|
|
272
|
-
[axis]: offset$1,
|
|
273
|
-
centerOffset: center - offset$1 - alignmentOffset,
|
|
274
|
-
...shouldAddOffset && { alignmentOffset }
|
|
275
|
-
},
|
|
276
|
-
reset: shouldAddOffset
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
});
|
|
280
|
-
autoPlacement = function(options) {
|
|
281
|
-
if (options === void 0) options = {};
|
|
282
|
-
return {
|
|
283
|
-
name: "autoPlacement",
|
|
284
|
-
options,
|
|
285
|
-
async fn(state) {
|
|
286
|
-
var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
|
|
287
|
-
const { rects, middlewareData, placement, platform, elements } = state;
|
|
288
|
-
const { crossAxis = false, alignment, allowedPlacements = placements, autoAlignment = true,...detectOverflowOptions } = evaluate(options, state);
|
|
289
|
-
const placements$1 = alignment !== void 0 || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
|
290
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
291
|
-
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
|
|
292
|
-
const currentPlacement = placements$1[currentIndex];
|
|
293
|
-
if (currentPlacement == null) return {};
|
|
294
|
-
const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
|
|
295
|
-
if (placement !== currentPlacement) return { reset: { placement: placements$1[0] } };
|
|
296
|
-
const currentOverflows = [
|
|
297
|
-
overflow[getSide(currentPlacement)],
|
|
298
|
-
overflow[alignmentSides[0]],
|
|
299
|
-
overflow[alignmentSides[1]]
|
|
300
|
-
];
|
|
301
|
-
const allOverflows = [...((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || [], {
|
|
302
|
-
placement: currentPlacement,
|
|
303
|
-
overflows: currentOverflows
|
|
304
|
-
}];
|
|
305
|
-
const nextPlacement = placements$1[currentIndex + 1];
|
|
306
|
-
if (nextPlacement) return {
|
|
307
|
-
data: {
|
|
308
|
-
index: currentIndex + 1,
|
|
309
|
-
overflows: allOverflows
|
|
310
|
-
},
|
|
311
|
-
reset: { placement: nextPlacement }
|
|
312
|
-
};
|
|
313
|
-
const placementsSortedByMostSpace = allOverflows.map((d) => {
|
|
314
|
-
const alignment$1 = getAlignment(d.placement);
|
|
315
|
-
return [
|
|
316
|
-
d.placement,
|
|
317
|
-
alignment$1 && crossAxis ? d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) : d.overflows[0],
|
|
318
|
-
d.overflows
|
|
319
|
-
];
|
|
320
|
-
}).sort((a, b) => a[1] - b[1]);
|
|
321
|
-
const resetPlacement = ((_placementsThatFitOnE = placementsSortedByMostSpace.filter((d) => d[2].slice(0, getAlignment(d[0]) ? 2 : 3).every((v) => v <= 0))[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
|
|
322
|
-
if (resetPlacement !== placement) return {
|
|
323
|
-
data: {
|
|
324
|
-
index: currentIndex + 1,
|
|
325
|
-
overflows: allOverflows
|
|
326
|
-
},
|
|
327
|
-
reset: { placement: resetPlacement }
|
|
328
|
-
};
|
|
329
|
-
return {};
|
|
330
|
-
}
|
|
331
|
-
};
|
|
332
|
-
};
|
|
333
|
-
flip = function(options) {
|
|
334
|
-
if (options === void 0) options = {};
|
|
335
|
-
return {
|
|
336
|
-
name: "flip",
|
|
337
|
-
options,
|
|
338
|
-
async fn(state) {
|
|
339
|
-
var _middlewareData$arrow, _middlewareData$flip;
|
|
340
|
-
const { placement, middlewareData, rects, initialPlacement, platform, elements } = state;
|
|
341
|
-
const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true, fallbackPlacements: specifiedFallbackPlacements, fallbackStrategy = "bestFit", fallbackAxisSideDirection = "none", flipAlignment = true,...detectOverflowOptions } = evaluate(options, state);
|
|
342
|
-
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
|
|
343
|
-
const side = getSide(placement);
|
|
344
|
-
const initialSideAxis = getSideAxis(initialPlacement);
|
|
345
|
-
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
346
|
-
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
347
|
-
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
348
|
-
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
|
|
349
|
-
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
350
|
-
const placements$1 = [initialPlacement, ...fallbackPlacements];
|
|
351
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
352
|
-
const overflows = [];
|
|
353
|
-
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
354
|
-
if (checkMainAxis) overflows.push(overflow[side]);
|
|
355
|
-
if (checkCrossAxis) {
|
|
356
|
-
const sides$1 = getAlignmentSides(placement, rects, rtl);
|
|
357
|
-
overflows.push(overflow[sides$1[0]], overflow[sides$1[1]]);
|
|
358
|
-
}
|
|
359
|
-
overflowsData = [...overflowsData, {
|
|
360
|
-
placement,
|
|
361
|
-
overflows
|
|
362
|
-
}];
|
|
363
|
-
if (!overflows.every((side$1) => side$1 <= 0)) {
|
|
364
|
-
var _middlewareData$flip2, _overflowsData$filter;
|
|
365
|
-
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
366
|
-
const nextPlacement = placements$1[nextIndex];
|
|
367
|
-
if (nextPlacement) {
|
|
368
|
-
if (!(checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false) || overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) return {
|
|
369
|
-
data: {
|
|
370
|
-
index: nextIndex,
|
|
371
|
-
overflows: overflowsData
|
|
372
|
-
},
|
|
373
|
-
reset: { placement: nextPlacement }
|
|
374
|
-
};
|
|
375
|
-
}
|
|
376
|
-
let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
377
|
-
if (!resetPlacement) switch (fallbackStrategy) {
|
|
378
|
-
case "bestFit": {
|
|
379
|
-
var _overflowsData$filter2;
|
|
380
|
-
const placement$1 = (_overflowsData$filter2 = overflowsData.filter((d) => {
|
|
381
|
-
if (hasFallbackAxisSideDirection) {
|
|
382
|
-
const currentSideAxis = getSideAxis(d.placement);
|
|
383
|
-
return currentSideAxis === initialSideAxis || currentSideAxis === "y";
|
|
384
|
-
}
|
|
385
|
-
return true;
|
|
386
|
-
}).map((d) => [d.placement, d.overflows.filter((overflow$1) => overflow$1 > 0).reduce((acc, overflow$1) => acc + overflow$1, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
|
|
387
|
-
if (placement$1) resetPlacement = placement$1;
|
|
388
|
-
break;
|
|
389
|
-
}
|
|
390
|
-
case "initialPlacement":
|
|
391
|
-
resetPlacement = initialPlacement;
|
|
392
|
-
break;
|
|
393
|
-
}
|
|
394
|
-
if (placement !== resetPlacement) return { reset: { placement: resetPlacement } };
|
|
395
|
-
}
|
|
396
|
-
return {};
|
|
397
|
-
}
|
|
398
|
-
};
|
|
399
|
-
};
|
|
400
|
-
hide = function(options) {
|
|
401
|
-
if (options === void 0) options = {};
|
|
402
|
-
return {
|
|
403
|
-
name: "hide",
|
|
404
|
-
options,
|
|
405
|
-
async fn(state) {
|
|
406
|
-
const { rects } = state;
|
|
407
|
-
const { strategy = "referenceHidden",...detectOverflowOptions } = evaluate(options, state);
|
|
408
|
-
switch (strategy) {
|
|
409
|
-
case "referenceHidden": {
|
|
410
|
-
const offsets = getSideOffsets(await detectOverflow(state, {
|
|
411
|
-
...detectOverflowOptions,
|
|
412
|
-
elementContext: "reference"
|
|
413
|
-
}), rects.reference);
|
|
414
|
-
return { data: {
|
|
415
|
-
referenceHiddenOffsets: offsets,
|
|
416
|
-
referenceHidden: isAnySideFullyClipped(offsets)
|
|
417
|
-
} };
|
|
418
|
-
}
|
|
419
|
-
case "escaped": {
|
|
420
|
-
const offsets = getSideOffsets(await detectOverflow(state, {
|
|
421
|
-
...detectOverflowOptions,
|
|
422
|
-
altBoundary: true
|
|
423
|
-
}), rects.floating);
|
|
424
|
-
return { data: {
|
|
425
|
-
escapedOffsets: offsets,
|
|
426
|
-
escaped: isAnySideFullyClipped(offsets)
|
|
427
|
-
} };
|
|
428
|
-
}
|
|
429
|
-
default: return {};
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
};
|
|
433
|
-
};
|
|
434
|
-
inline = function(options) {
|
|
435
|
-
if (options === void 0) options = {};
|
|
436
|
-
return {
|
|
437
|
-
name: "inline",
|
|
438
|
-
options,
|
|
439
|
-
async fn(state) {
|
|
440
|
-
const { placement, elements, rects, platform, strategy } = state;
|
|
441
|
-
const { padding = 2, x, y } = evaluate(options, state);
|
|
442
|
-
const nativeClientRects = Array.from(await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference)) || []);
|
|
443
|
-
const clientRects = getRectsByLine(nativeClientRects);
|
|
444
|
-
const fallback = rectToClientRect(getBoundingRect(nativeClientRects));
|
|
445
|
-
const paddingObject = getPaddingObject(padding);
|
|
446
|
-
function getBoundingClientRect() {
|
|
447
|
-
if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) return clientRects.find((rect) => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;
|
|
448
|
-
if (clientRects.length >= 2) {
|
|
449
|
-
if (getSideAxis(placement) === "y") {
|
|
450
|
-
const firstRect = clientRects[0];
|
|
451
|
-
const lastRect = clientRects[clientRects.length - 1];
|
|
452
|
-
const isTop = getSide(placement) === "top";
|
|
453
|
-
const top$1 = firstRect.top;
|
|
454
|
-
const bottom$1 = lastRect.bottom;
|
|
455
|
-
const left$1 = isTop ? firstRect.left : lastRect.left;
|
|
456
|
-
const right$1 = isTop ? firstRect.right : lastRect.right;
|
|
457
|
-
return {
|
|
458
|
-
top: top$1,
|
|
459
|
-
bottom: bottom$1,
|
|
460
|
-
left: left$1,
|
|
461
|
-
right: right$1,
|
|
462
|
-
width: right$1 - left$1,
|
|
463
|
-
height: bottom$1 - top$1,
|
|
464
|
-
x: left$1,
|
|
465
|
-
y: top$1
|
|
466
|
-
};
|
|
467
|
-
}
|
|
468
|
-
const isLeftSide = getSide(placement) === "left";
|
|
469
|
-
const maxRight = max(...clientRects.map((rect) => rect.right));
|
|
470
|
-
const minLeft = min(...clientRects.map((rect) => rect.left));
|
|
471
|
-
const measureRects = clientRects.filter((rect) => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
|
|
472
|
-
const top = measureRects[0].top;
|
|
473
|
-
const bottom = measureRects[measureRects.length - 1].bottom;
|
|
474
|
-
const left = minLeft;
|
|
475
|
-
const right = maxRight;
|
|
476
|
-
return {
|
|
477
|
-
top,
|
|
478
|
-
bottom,
|
|
479
|
-
left,
|
|
480
|
-
right,
|
|
481
|
-
width: right - left,
|
|
482
|
-
height: bottom - top,
|
|
483
|
-
x: left,
|
|
484
|
-
y: top
|
|
485
|
-
};
|
|
486
|
-
}
|
|
487
|
-
return fallback;
|
|
488
|
-
}
|
|
489
|
-
const resetRects = await platform.getElementRects({
|
|
490
|
-
reference: { getBoundingClientRect },
|
|
491
|
-
floating: elements.floating,
|
|
492
|
-
strategy
|
|
493
|
-
});
|
|
494
|
-
if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) return { reset: { rects: resetRects } };
|
|
495
|
-
return {};
|
|
496
|
-
}
|
|
497
|
-
};
|
|
498
|
-
};
|
|
499
|
-
originSides = /* @__PURE__ */ new Set(["left", "top"]);
|
|
500
|
-
offset = function(options) {
|
|
501
|
-
if (options === void 0) options = 0;
|
|
502
|
-
return {
|
|
503
|
-
name: "offset",
|
|
504
|
-
options,
|
|
505
|
-
async fn(state) {
|
|
506
|
-
var _middlewareData$offse, _middlewareData$arrow;
|
|
507
|
-
const { x, y, placement, middlewareData } = state;
|
|
508
|
-
const diffCoords = await convertValueToCoords(state, options);
|
|
509
|
-
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
|
|
510
|
-
return {
|
|
511
|
-
x: x + diffCoords.x,
|
|
512
|
-
y: y + diffCoords.y,
|
|
513
|
-
data: {
|
|
514
|
-
...diffCoords,
|
|
515
|
-
placement
|
|
516
|
-
}
|
|
517
|
-
};
|
|
518
|
-
}
|
|
519
|
-
};
|
|
520
|
-
};
|
|
521
|
-
shift = function(options) {
|
|
522
|
-
if (options === void 0) options = {};
|
|
523
|
-
return {
|
|
524
|
-
name: "shift",
|
|
525
|
-
options,
|
|
526
|
-
async fn(state) {
|
|
527
|
-
const { x, y, placement } = state;
|
|
528
|
-
const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = false, limiter = { fn: (_ref) => {
|
|
529
|
-
let { x: x$1, y: y$1 } = _ref;
|
|
530
|
-
return {
|
|
531
|
-
x: x$1,
|
|
532
|
-
y: y$1
|
|
533
|
-
};
|
|
534
|
-
} },...detectOverflowOptions } = evaluate(options, state);
|
|
535
|
-
const coords = {
|
|
536
|
-
x,
|
|
537
|
-
y
|
|
538
|
-
};
|
|
539
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
540
|
-
const crossAxis = getSideAxis(getSide(placement));
|
|
541
|
-
const mainAxis = getOppositeAxis(crossAxis);
|
|
542
|
-
let mainAxisCoord = coords[mainAxis];
|
|
543
|
-
let crossAxisCoord = coords[crossAxis];
|
|
544
|
-
if (checkMainAxis) {
|
|
545
|
-
const minSide = mainAxis === "y" ? "top" : "left";
|
|
546
|
-
const maxSide = mainAxis === "y" ? "bottom" : "right";
|
|
547
|
-
const min$1 = mainAxisCoord + overflow[minSide];
|
|
548
|
-
const max$1 = mainAxisCoord - overflow[maxSide];
|
|
549
|
-
mainAxisCoord = clamp(min$1, mainAxisCoord, max$1);
|
|
550
|
-
}
|
|
551
|
-
if (checkCrossAxis) {
|
|
552
|
-
const minSide = crossAxis === "y" ? "top" : "left";
|
|
553
|
-
const maxSide = crossAxis === "y" ? "bottom" : "right";
|
|
554
|
-
const min$1 = crossAxisCoord + overflow[minSide];
|
|
555
|
-
const max$1 = crossAxisCoord - overflow[maxSide];
|
|
556
|
-
crossAxisCoord = clamp(min$1, crossAxisCoord, max$1);
|
|
557
|
-
}
|
|
558
|
-
const limitedCoords = limiter.fn({
|
|
559
|
-
...state,
|
|
560
|
-
[mainAxis]: mainAxisCoord,
|
|
561
|
-
[crossAxis]: crossAxisCoord
|
|
562
|
-
});
|
|
563
|
-
return {
|
|
564
|
-
...limitedCoords,
|
|
565
|
-
data: {
|
|
566
|
-
x: limitedCoords.x - x,
|
|
567
|
-
y: limitedCoords.y - y,
|
|
568
|
-
enabled: {
|
|
569
|
-
[mainAxis]: checkMainAxis,
|
|
570
|
-
[crossAxis]: checkCrossAxis
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
};
|
|
574
|
-
}
|
|
575
|
-
};
|
|
576
|
-
};
|
|
577
|
-
limitShift = function(options) {
|
|
578
|
-
if (options === void 0) options = {};
|
|
579
|
-
return {
|
|
580
|
-
options,
|
|
581
|
-
fn(state) {
|
|
582
|
-
const { x, y, placement, rects, middlewareData } = state;
|
|
583
|
-
const { offset: offset$1 = 0, mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true } = evaluate(options, state);
|
|
584
|
-
const coords = {
|
|
585
|
-
x,
|
|
586
|
-
y
|
|
587
|
-
};
|
|
588
|
-
const crossAxis = getSideAxis(placement);
|
|
589
|
-
const mainAxis = getOppositeAxis(crossAxis);
|
|
590
|
-
let mainAxisCoord = coords[mainAxis];
|
|
591
|
-
let crossAxisCoord = coords[crossAxis];
|
|
592
|
-
const rawOffset = evaluate(offset$1, state);
|
|
593
|
-
const computedOffset = typeof rawOffset === "number" ? {
|
|
594
|
-
mainAxis: rawOffset,
|
|
595
|
-
crossAxis: 0
|
|
596
|
-
} : {
|
|
597
|
-
mainAxis: 0,
|
|
598
|
-
crossAxis: 0,
|
|
599
|
-
...rawOffset
|
|
600
|
-
};
|
|
601
|
-
if (checkMainAxis) {
|
|
602
|
-
const len = mainAxis === "y" ? "height" : "width";
|
|
603
|
-
const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
|
|
604
|
-
const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
|
|
605
|
-
if (mainAxisCoord < limitMin) mainAxisCoord = limitMin;
|
|
606
|
-
else if (mainAxisCoord > limitMax) mainAxisCoord = limitMax;
|
|
607
|
-
}
|
|
608
|
-
if (checkCrossAxis) {
|
|
609
|
-
var _middlewareData$offse, _middlewareData$offse2;
|
|
610
|
-
const len = mainAxis === "y" ? "width" : "height";
|
|
611
|
-
const isOriginSide = originSides.has(getSide(placement));
|
|
612
|
-
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
|
|
613
|
-
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
|
|
614
|
-
if (crossAxisCoord < limitMin) crossAxisCoord = limitMin;
|
|
615
|
-
else if (crossAxisCoord > limitMax) crossAxisCoord = limitMax;
|
|
616
|
-
}
|
|
617
|
-
return {
|
|
618
|
-
[mainAxis]: mainAxisCoord,
|
|
619
|
-
[crossAxis]: crossAxisCoord
|
|
620
|
-
};
|
|
621
|
-
}
|
|
622
|
-
};
|
|
623
|
-
};
|
|
624
|
-
size = function(options) {
|
|
625
|
-
if (options === void 0) options = {};
|
|
626
|
-
return {
|
|
627
|
-
name: "size",
|
|
628
|
-
options,
|
|
629
|
-
async fn(state) {
|
|
630
|
-
var _state$middlewareData, _state$middlewareData2;
|
|
631
|
-
const { placement, rects, platform, elements } = state;
|
|
632
|
-
const { apply = () => {},...detectOverflowOptions } = evaluate(options, state);
|
|
633
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
634
|
-
const side = getSide(placement);
|
|
635
|
-
const alignment = getAlignment(placement);
|
|
636
|
-
const isYAxis = getSideAxis(placement) === "y";
|
|
637
|
-
const { width, height } = rects.floating;
|
|
638
|
-
let heightSide;
|
|
639
|
-
let widthSide;
|
|
640
|
-
if (side === "top" || side === "bottom") {
|
|
641
|
-
heightSide = side;
|
|
642
|
-
widthSide = alignment === (await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
|
|
643
|
-
} else {
|
|
644
|
-
widthSide = side;
|
|
645
|
-
heightSide = alignment === "end" ? "top" : "bottom";
|
|
646
|
-
}
|
|
647
|
-
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
|
648
|
-
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
649
|
-
const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
|
|
650
|
-
const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
|
|
651
|
-
const noShift = !state.middlewareData.shift;
|
|
652
|
-
let availableHeight = overflowAvailableHeight;
|
|
653
|
-
let availableWidth = overflowAvailableWidth;
|
|
654
|
-
if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) availableWidth = maximumClippingWidth;
|
|
655
|
-
if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) availableHeight = maximumClippingHeight;
|
|
656
|
-
if (noShift && !alignment) {
|
|
657
|
-
const xMin = max(overflow.left, 0);
|
|
658
|
-
const xMax = max(overflow.right, 0);
|
|
659
|
-
const yMin = max(overflow.top, 0);
|
|
660
|
-
const yMax = max(overflow.bottom, 0);
|
|
661
|
-
if (isYAxis) availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
|
|
662
|
-
else availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
|
|
663
|
-
}
|
|
664
|
-
await apply({
|
|
665
|
-
...state,
|
|
666
|
-
availableWidth,
|
|
667
|
-
availableHeight
|
|
668
|
-
});
|
|
669
|
-
const nextDimensions = await platform.getDimensions(elements.floating);
|
|
670
|
-
if (width !== nextDimensions.width || height !== nextDimensions.height) return { reset: { rects: true } };
|
|
671
|
-
return {};
|
|
672
|
-
}
|
|
673
|
-
};
|
|
674
|
-
};
|
|
675
|
-
}) });
|
|
676
|
-
|
|
677
|
-
//#endregion
|
|
678
|
-
init_floating_ui_core();
|
|
679
|
-
export { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, init_floating_ui_core, inline, limitShift, offset, shift, size };
|