welcome-ui 1.0.0-beta.3 → 1.0.0-beta.4
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/AXB53BZF-BxNazDnS.mjs +25 -0
- package/dist/AXB53BZF-KWM2jKTz.js +1 -0
- package/dist/Accordion.js +16 -30
- package/dist/Accordion.mjs +27 -515
- package/dist/Alert.js +37 -1
- package/dist/Alert.mjs +118 -5
- package/dist/AspectRatio.mjs +7 -7
- package/dist/Avatar.js +3 -3
- package/dist/Avatar.mjs +16 -15
- package/dist/BYC7LY2E-BAjGN7k_.mjs +1074 -0
- package/dist/BYC7LY2E-BkAEL2VD.js +1 -0
- package/dist/Badge.js +3 -3
- package/dist/Badge.mjs +10 -10
- package/dist/Breadcrumb.js +1 -54
- package/dist/Breadcrumb.mjs +7 -437
- package/dist/Button.js +78 -0
- package/dist/Button.mjs +136 -0
- package/dist/ButtonGroup.js +32 -0
- package/dist/ButtonGroup.mjs +51 -0
- package/dist/Card.js +17 -0
- package/dist/Card.mjs +29 -0
- package/dist/Checkbox.js +1 -0
- package/dist/Checkbox.mjs +6 -0
- package/dist/ClearButton.js +14 -0
- package/dist/ClearButton.mjs +26 -0
- package/dist/CloseButton.js +6 -0
- package/dist/CloseButton.mjs +15 -0
- package/dist/CustomInput-9aCUiD6o.js +1070 -0
- package/dist/CustomInput-CenfXh_H.mjs +7825 -0
- package/dist/DatePicker.js +1 -0
- package/dist/DatePicker.mjs +108 -0
- package/dist/DateTimePicker.js +38 -0
- package/dist/DateTimePicker.mjs +109 -0
- package/dist/DateTimePickerCommon.js +1 -0
- package/dist/DateTimePickerCommon.mjs +14 -0
- package/dist/Drawer.js +64 -0
- package/dist/Drawer.mjs +267 -0
- package/dist/DropdownMenu.js +45 -0
- package/dist/DropdownMenu.mjs +776 -0
- package/dist/Field.js +72 -0
- package/dist/Field.mjs +177 -0
- package/dist/FieldGroup.js +13 -0
- package/dist/FieldGroup.mjs +26 -0
- package/dist/FileDrop.js +46 -0
- package/dist/FileDrop.mjs +2325 -0
- package/dist/FileUpload.js +3 -0
- package/dist/FileUpload.mjs +88 -0
- package/dist/Grid.js +1 -0
- package/dist/Grid.mjs +57 -0
- package/dist/Hint.js +8 -0
- package/dist/Hint.mjs +22 -0
- package/dist/ITI7HKP4-BPa8qpnl.js +1 -0
- package/dist/ITI7HKP4-Couz1Z73.mjs +473 -0
- package/dist/Icon.js +17 -0
- package/dist/Icon.mjs +51 -0
- package/dist/IconFont.js +17 -0
- package/dist/IconFont.mjs +348 -0
- package/dist/InputText.js +8 -0
- package/dist/InputText.mjs +81 -0
- package/dist/JC64G2H7-CQsqXPS_.mjs +965 -0
- package/dist/JC64G2H7-YkBMNrtl.js +1 -0
- package/dist/KUU7WJ55-DN8gk6_R.js +1 -0
- package/dist/KUU7WJ55-bC4FU_j7.mjs +61 -0
- package/dist/LVA2YJMS-B2HZjIhJ.js +14 -0
- package/dist/LVA2YJMS-Dm5ieEMw.mjs +1479 -0
- package/dist/Label.js +35 -0
- package/dist/Label.mjs +78 -0
- package/dist/Link.js +43 -0
- package/dist/Link.mjs +77 -0
- package/dist/Loader.js +30 -0
- package/dist/Loader.mjs +48 -0
- package/dist/Logo.js +1 -0
- package/dist/Logo.mjs +8 -0
- package/dist/MTZPJQMC-5Xg78Uyy.js +1 -0
- package/dist/MTZPJQMC-DZ3zg4be.mjs +13 -0
- package/dist/Modal.js +181 -0
- package/dist/Modal.mjs +365 -0
- package/dist/NLEBE274-DvH3XTTw.js +1 -0
- package/dist/NLEBE274-FThuwZH_.mjs +84 -0
- package/dist/P2CTZE2T-5jxBu6ix.mjs +297 -0
- package/dist/P2CTZE2T-q8vyaGc0.js +1 -0
- package/dist/P4IRICAX-DF0_vmod.mjs +37 -0
- package/dist/P4IRICAX-nhgZ26A1.js +1 -0
- package/dist/Pagination.js +46 -0
- package/dist/Pagination.mjs +158 -0
- package/dist/PasswordInput.js +1 -0
- package/dist/PasswordInput.mjs +54 -0
- package/dist/Picker.js +8 -0
- package/dist/Picker.mjs +50 -0
- package/dist/Popover.js +1 -0
- package/dist/Popover.mjs +8 -0
- package/dist/QYJ6MIDR-CRK3satR.js +1 -0
- package/dist/QYJ6MIDR-Cy39pEs2.mjs +97 -0
- package/dist/Radio.js +60 -0
- package/dist/Radio.mjs +118 -0
- package/dist/RadioGroup.js +8 -0
- package/dist/RadioGroup.mjs +68 -0
- package/dist/RadioTab.js +61 -0
- package/dist/RadioTab.mjs +104 -0
- package/dist/SYRFVSLH-BpAfr7UE.js +1 -0
- package/dist/SYRFVSLH-DyepaZf7.mjs +48 -0
- package/dist/Search.js +70 -0
- package/dist/Search.mjs +225 -0
- package/dist/Select.js +122 -0
- package/dist/Select.mjs +1071 -0
- package/dist/Shape.js +23 -0
- package/dist/Shape.mjs +37 -0
- package/dist/Slider.js +190 -0
- package/dist/Slider.mjs +531 -0
- package/dist/Stack.js +1 -0
- package/dist/Stack.mjs +32 -0
- package/dist/Swiper.js +141 -0
- package/dist/Swiper.mjs +448 -0
- package/dist/System.js +1 -1
- package/dist/System.mjs +5 -5
- package/dist/Table.js +55 -0
- package/dist/Table.mjs +75 -0
- package/dist/Tabs.js +82 -0
- package/dist/Tabs.mjs +539 -0
- package/dist/Tag.js +78 -0
- package/dist/Tag.mjs +135 -0
- package/dist/Text.js +46 -0
- package/dist/Text.mjs +97 -0
- package/dist/Textarea.js +6 -0
- package/dist/Textarea.mjs +55 -0
- package/dist/TimePicker.js +4 -0
- package/dist/TimePicker.mjs +88 -0
- package/dist/Toast.js +42 -0
- package/dist/Toast.mjs +264 -0
- package/dist/Toggle.js +75 -0
- package/dist/Toggle.mjs +93 -0
- package/dist/Tooltip.js +68 -0
- package/dist/Tooltip.mjs +303 -0
- package/dist/UniversalLink.js +4 -0
- package/dist/UniversalLink.mjs +25 -0
- package/dist/VEVQD5MH-De4r89YE.mjs +20 -0
- package/dist/VEVQD5MH-mN1wMozH.js +1 -0
- package/dist/VGCJ63VH-BNLwLOaC.js +1 -0
- package/dist/VGCJ63VH-fv0YLRh8.mjs +186 -0
- package/dist/VariantIcon.js +8 -0
- package/dist/VariantIcon.mjs +32 -0
- package/dist/Welcome-BNr4uu5n.mjs +48 -0
- package/dist/Welcome-Dw9OaREs.js +3 -0
- package/dist/WelcomeLoader.js +11 -0
- package/dist/WelcomeLoader.mjs +9453 -0
- package/dist/X5NMLKT6-BzhcQu_I.js +1 -0
- package/dist/X5NMLKT6-DGZEtYXj.mjs +25 -0
- package/dist/YV4JVR4I-1ezWeCCz.mjs +341 -0
- package/dist/YV4JVR4I-DIthYWMj.js +15 -0
- package/dist/_commonjsHelpers-CXJ7dpIk.mjs +9 -0
- package/dist/_commonjsHelpers-DvH0V_XJ.js +1 -0
- package/dist/create-event-YSlay9Ef.js +1 -0
- package/dist/create-event-rXDe5aCQ.mjs +8 -0
- package/dist/downshift.esm-DAo-GJwH.js +1 -0
- package/dist/downshift.esm-K4YLLQXl.mjs +1085 -0
- package/dist/field-styles-CeV7pnOp.mjs +86 -0
- package/dist/field-styles-D_gf6ypV.js +63 -0
- package/dist/get-max-width-height-CDLBnp_J.js +1 -0
- package/dist/get-max-width-height-DoUro2T7.mjs +8 -0
- package/dist/hide-focus-rings-root-BNyva1yb.mjs +14 -0
- package/dist/hide-focus-rings-root-DGU4Klq5.js +5 -0
- package/dist/index-1C9Z0d5Q.mjs +446 -0
- package/dist/index-BHi0wohR.js +142 -0
- package/dist/index-BLom3M2B.js +2 -0
- package/dist/{index-WmqrMIzg.mjs → index-BYdkhqH4.mjs} +6344 -6386
- package/dist/index-C_r0bVmL.js +56 -0
- package/dist/index-CgT8GWHS.js +1 -0
- package/dist/index-ColyClKR.mjs +239 -0
- package/dist/index-CrhKWaM2.js +54 -0
- package/dist/index-Cs1IZBks.js +17 -0
- package/dist/index-DCOLdphy.mjs +184 -0
- package/dist/index-DHOW43M6.mjs +132 -0
- package/dist/index-SbQUT2mU.mjs +639 -0
- package/dist/index.js +5 -147
- package/dist/index.mjs +1448 -537
- package/dist/overflow-ellipsis-C2ESrF8C.js +5 -0
- package/dist/overflow-ellipsis-DGV5Kgt-.mjs +10 -0
- package/dist/radio-group-29lMl-2M.mjs +51 -0
- package/dist/radio-group-BpImAAmy.js +1 -0
- package/dist/throttle-BB1Y3bfD.js +1 -0
- package/dist/throttle-BDBzFeFj.mjs +13 -0
- package/dist/types/components/Alert/Title.d.ts +1 -1
- package/dist/types/components/Alert/index.d.ts +3 -3
- package/dist/types/components/Alert/styles.d.ts +2 -2
- package/dist/types/components/Avatar/index.d.ts +1 -1
- package/dist/types/components/Avatar/styles.d.ts +2 -2
- package/dist/types/components/Badge/styles.d.ts +2 -2
- package/dist/types/components/Card/Cover.d.ts +1 -1
- package/dist/types/components/Card/Cover.styles.d.ts +1 -1
- package/dist/types/components/Checkbox/index.d.ts +13 -0
- package/dist/types/components/Checkbox/styles.d.ts +3 -0
- package/dist/types/components/Checkbox/theme.d.ts +8 -0
- package/dist/types/components/ClearButton/styles.d.ts +1 -1
- package/dist/types/components/CloseButton/styles.d.ts +1 -1
- package/dist/types/components/DatePicker/index.d.ts +15 -0
- package/dist/types/components/DateTimePicker/index.d.ts +5 -0
- package/dist/types/components/DateTimePicker/styles.d.ts +1 -0
- package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +18 -0
- package/dist/types/components/DateTimePickerCommon/CustomInput.d.ts +17 -0
- package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +4 -0
- package/dist/types/components/DateTimePickerCommon/datePickerStyles.d.ts +1 -0
- package/dist/types/components/DateTimePickerCommon/index.d.ts +5 -0
- package/dist/types/components/DateTimePickerCommon/styles.d.ts +9 -0
- package/dist/types/components/DateTimePickerCommon/theme.d.ts +9 -0
- package/dist/types/components/DateTimePickerCommon/utils.d.ts +6 -0
- package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +31 -0
- package/dist/types/components/Drawer/AssetDrawer/index.d.ts +4 -0
- package/dist/types/components/Drawer/AssetDrawer/styles.d.ts +3 -0
- package/dist/types/components/Drawer/Close.d.ts +5 -0
- package/dist/types/components/Drawer/Content.d.ts +4 -0
- package/dist/types/components/Drawer/Footer.d.ts +4 -0
- package/dist/types/components/Drawer/Title.d.ts +3 -0
- package/dist/types/components/Drawer/index.d.ts +52 -0
- package/dist/types/components/Drawer/styles.d.ts +10 -0
- package/dist/types/components/Drawer/theme.d.ts +17 -0
- package/dist/types/components/DropdownMenu/Arrow.d.ts +4 -0
- package/dist/types/components/DropdownMenu/Arrow.styled.d.ts +4 -0
- package/dist/types/components/DropdownMenu/Item.d.ts +4 -0
- package/dist/types/components/DropdownMenu/Item.styled.d.ts +1 -0
- package/dist/types/components/DropdownMenu/Separator.d.ts +4 -0
- package/dist/types/components/DropdownMenu/Separator.styled.d.ts +1 -0
- package/dist/types/components/DropdownMenu/index.d.ts +25 -0
- package/dist/types/components/DropdownMenu/styles.d.ts +1 -0
- package/dist/types/components/DropdownMenu/theme.d.ts +8 -0
- package/dist/types/components/Field/index.d.ts +26 -0
- package/dist/types/components/Field/styles.d.ts +21 -0
- package/dist/types/components/Field/utils.d.ts +5 -0
- package/dist/types/components/FieldGroup/index.d.ts +11 -0
- package/dist/types/components/FieldGroup/styles.d.ts +1 -0
- package/dist/types/components/FileDrop/FilePreview.d.ts +9 -0
- package/dist/types/components/FileDrop/Message.d.ts +7 -0
- package/dist/types/components/FileDrop/Preview.d.ts +3 -0
- package/dist/types/components/FileDrop/index.d.ts +52 -0
- package/dist/types/components/FileDrop/styles.d.ts +9 -0
- package/dist/types/components/FileDrop/theme.d.ts +9 -0
- package/dist/types/components/FileDrop/utils.d.ts +3 -0
- package/dist/types/components/FileUpload/index.d.ts +35 -0
- package/dist/types/components/FileUpload/styles.d.ts +1 -0
- package/dist/types/components/Files/index.d.ts +8 -0
- package/dist/types/components/Files/types.d.ts +72 -0
- package/dist/types/components/Grid/Item.d.ts +14 -0
- package/dist/types/components/Grid/index.d.ts +31 -0
- package/dist/types/components/Hint/index.d.ts +10 -0
- package/dist/types/components/Hint/styles.d.ts +4 -0
- package/dist/types/components/Hint/theme.d.ts +9 -0
- package/dist/types/components/Icon/index.d.ts +26 -0
- package/dist/types/components/Icon/styles.d.ts +9 -0
- package/dist/types/components/Icon/theme.d.ts +10 -0
- package/dist/types/components/IconFont/index.d.ts +311 -0
- package/dist/types/components/IconFont/styles.d.ts +7 -0
- package/dist/types/components/IconFont/unicode.json.d.ts +303 -0
- package/dist/types/components/InputText/index.d.ts +21 -0
- package/dist/types/components/InputText/styles.d.ts +3 -0
- package/dist/types/components/Label/index.d.ts +16 -0
- package/dist/types/components/Label/styles.d.ts +5 -0
- package/dist/types/components/Label/theme.d.ts +4 -0
- package/dist/types/components/Link/index.d.ts +15 -0
- package/dist/types/components/Link/styles.d.ts +2 -0
- package/dist/types/components/Link/theme.d.ts +16 -0
- package/dist/types/components/Link/utils.d.ts +1 -0
- package/dist/types/components/Loader/index.d.ts +11 -0
- package/dist/types/components/Loader/styles.d.ts +6 -0
- package/dist/types/components/Loader/theme.d.ts +8 -0
- package/dist/types/components/Logo/Solutions.d.ts +3 -0
- package/dist/types/components/Logo/Symbol.d.ts +3 -0
- package/dist/types/components/Logo/Welcome.d.ts +3 -0
- package/dist/types/components/Logo/Wui.d.ts +3 -0
- package/dist/types/components/Logo/index.d.ts +7 -0
- package/dist/types/components/Logo/styles.d.ts +1 -0
- package/dist/types/components/Modal/Assets/AssetWithTitle.d.ts +9 -0
- package/dist/types/components/Modal/Assets/Backdrop.d.ts +4 -0
- package/dist/types/components/Modal/Assets/Iframe.d.ts +5 -0
- package/dist/types/components/Modal/Assets/index.d.ts +17 -0
- package/dist/types/components/Modal/Assets/styles.d.ts +7 -0
- package/dist/types/components/Modal/Close.d.ts +6 -0
- package/dist/types/components/Modal/Content.d.ts +16 -0
- package/dist/types/components/Modal/Footer.d.ts +12 -0
- package/dist/types/components/Modal/Header.d.ts +12 -0
- package/dist/types/components/Modal/index.d.ts +53 -0
- package/dist/types/components/Modal/styles.d.ts +11 -0
- package/dist/types/components/Modal/theme.d.ts +17 -0
- package/dist/types/components/Pagination/index.d.ts +14 -0
- package/dist/types/components/Pagination/styles.d.ts +7 -0
- package/dist/types/components/Pagination/theme.d.ts +9 -0
- package/dist/types/components/Pagination/utils.d.ts +7 -0
- package/dist/types/components/PasswordInput/ToggleButton.d.ts +9 -0
- package/dist/types/components/PasswordInput/index.d.ts +5 -0
- package/dist/types/components/Picker/index.d.ts +17 -0
- package/dist/types/components/Picker/styles.d.ts +2 -0
- package/dist/types/components/Popover/Arrow.d.ts +6 -0
- package/dist/types/components/Popover/Content.d.ts +9 -0
- package/dist/types/components/Popover/Popover.d.ts +14 -0
- package/dist/types/components/Popover/PopoverHover.d.ts +14 -0
- package/dist/types/components/Popover/Trigger.d.ts +10 -0
- package/dist/types/components/Popover/index.d.ts +3 -0
- package/dist/types/components/Popover/styles.d.ts +12 -0
- package/dist/types/components/Popover/theme.d.ts +8 -0
- package/dist/types/components/Popover/usePopover.d.ts +15 -0
- package/dist/types/components/Radio/index.d.ts +12 -0
- package/dist/types/components/Radio/styles.d.ts +7 -0
- package/dist/types/components/Radio/theme.d.ts +11 -0
- package/dist/types/components/RadioGroup/index.d.ts +17 -0
- package/dist/types/components/RadioGroup/styles.d.ts +4 -0
- package/dist/types/components/RadioTab/index.d.ts +14 -0
- package/dist/types/components/RadioTab/styles.d.ts +18 -0
- package/dist/types/components/RadioTab/theme.d.ts +7 -0
- package/dist/types/components/Search/index.d.ts +29 -0
- package/dist/types/components/Search/styles.d.ts +15 -0
- package/dist/types/components/Select/index.d.ts +54 -0
- package/dist/types/components/Select/multipleSelections.d.ts +3 -0
- package/dist/types/components/Select/styles.d.ts +32 -0
- package/dist/types/components/Select/utils.d.ts +18 -0
- package/dist/types/components/Shape/index.d.ts +6 -0
- package/dist/types/components/Shape/styles.d.ts +2 -0
- package/dist/types/components/Slider/Range.d.ts +17 -0
- package/dist/types/components/Slider/index.d.ts +27 -0
- package/dist/types/components/Slider/styles.d.ts +19 -0
- package/dist/types/components/Slider/theme.d.ts +11 -0
- package/dist/types/components/Stack/index.d.ts +7 -0
- package/dist/types/components/Swiper/index.d.ts +80 -0
- package/dist/types/components/Swiper/styles.d.ts +138 -0
- package/dist/types/components/Swiper/theme.d.ts +11 -0
- package/dist/types/components/Swiper/use-interval.d.ts +1 -0
- package/dist/types/components/Table/index.d.ts +18 -0
- package/dist/types/components/Table/styles.d.ts +13 -0
- package/dist/types/components/Table/theme.d.ts +15 -0
- package/dist/types/components/Tabs/ActiveBar.d.ts +13 -0
- package/dist/types/components/Tabs/TabList.d.ts +13 -0
- package/dist/types/components/Tabs/TabPanel.d.ts +11 -0
- package/dist/types/components/Tabs/index.d.ts +18 -0
- package/dist/types/components/Tabs/styles.d.ts +9 -0
- package/dist/types/components/Tabs/theme.d.ts +28 -0
- package/dist/types/components/Tabs/utils.d.ts +1 -0
- package/dist/types/components/Tag/index.d.ts +17 -0
- package/dist/types/components/Tag/styles.d.ts +15 -0
- package/dist/types/components/Tag/theme.d.ts +14 -0
- package/dist/types/components/Text/index.d.ts +25 -0
- package/dist/types/components/Text/styles.d.ts +2 -0
- package/dist/types/components/Textarea/index.d.ts +18 -0
- package/dist/types/components/Textarea/styles.d.ts +2 -0
- package/dist/types/components/Textarea/theme.d.ts +4 -0
- package/dist/types/components/TimePicker/index.d.ts +13 -0
- package/dist/types/components/TimePicker/styles.d.ts +1 -0
- package/dist/types/components/Toast/Growl.d.ts +12 -0
- package/dist/types/components/Toast/Snackbar.d.ts +18 -0
- package/dist/types/components/Toast/ToastWrapper.d.ts +16 -0
- package/dist/types/components/Toast/index.d.ts +27 -0
- package/dist/types/components/Toast/styles.d.ts +19 -0
- package/dist/types/components/Toast/theme.d.ts +22 -0
- package/dist/types/components/Toast/utils.d.ts +26 -0
- package/dist/types/components/Toggle/index.d.ts +11 -0
- package/dist/types/components/Toggle/styles.d.ts +12 -0
- package/dist/types/components/Toggle/theme.d.ts +10 -0
- package/dist/types/components/Tooltip/index.d.ts +11 -0
- package/dist/types/components/Tooltip/styles.d.ts +10 -0
- package/dist/types/components/Tooltip/theme.d.ts +4 -0
- package/dist/types/components/UniversalLink/index.d.ts +7 -0
- package/dist/types/components/UniversalLink/styles.d.ts +1 -0
- package/dist/types/components/VariantIcon/index.d.ts +11 -0
- package/dist/types/components/VariantIcon/styles.d.ts +4 -0
- package/dist/types/components/VariantIcon/theme.d.ts +10 -0
- package/dist/types/components/WelcomeLoader/index.d.ts +2 -0
- package/dist/types/components/WelcomeLoader/loader.json.d.ts +3 -0
- package/dist/types/components/index.d.ts +43 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/theme/defaultFields.d.ts +39 -0
- package/dist/types/theme/index.d.ts +52 -2
- package/dist/types/theme/typography.d.ts +2 -2
- package/dist/types/utils/clamp.d.ts +1 -0
- package/dist/types/utils/create-event.d.ts +8 -0
- package/dist/types/utils/field-styles.d.ts +21 -0
- package/dist/types/utils/format-bytes.d.ts +1 -0
- package/dist/types/utils/get-max-width-height.d.ts +1 -0
- package/dist/types/utils/hex-to-rgb.d.ts +1 -0
- package/dist/types/utils/hex-to-rgba.d.ts +1 -0
- package/dist/types/utils/hide-focus-rings-root.d.ts +8 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/overflow-ellipsis.d.ts +1 -0
- package/dist/types/utils/throttle.d.ts +5 -0
- package/dist/types/utils/use-copy-text.d.ts +5 -0
- package/dist/types/utils/use-create-portal.d.ts +4 -0
- package/dist/types/utils/use-fork-ref.d.ts +3 -0
- package/dist/types/utils/use-isomorphic-layout-effect.d.ts +2 -0
- package/dist/types/utils/use-viewport.d.ts +6 -0
- package/dist/types/utils/wrap-children.d.ts +1 -0
- package/dist/use-isomorphic-layout-effect-C1_Gy5Nu.js +1 -0
- package/dist/use-isomorphic-layout-effect-Izr-e2pi.mjs +6 -0
- package/dist/use-viewport-BDDjd1nl.js +1 -0
- package/dist/use-viewport-m3glsbna.mjs +16 -0
- package/dist/usePopover-CZsYHcTW.js +31 -0
- package/dist/usePopover-CcsC9Y-s.mjs +143 -0
- package/dist/wrap-children-BLDjJiiy.js +1 -0
- package/dist/wrap-children-aq69jtFP.mjs +12 -0
- package/package.json +56 -4
- package/dist/X5NMLKT6-BC1Q56kB.mjs +0 -1258
- package/dist/X5NMLKT6-vrNG8i_R.js +0 -14
- package/dist/index-0MPAX4B5.mjs +0 -320
- package/dist/index-BNA_A0oa.js +0 -155
- package/dist/index-BXJQXgy9.js +0 -13
- package/dist/index-Bwrtxit1.mjs +0 -84
- package/dist/index-Ct2FOeyM.js +0 -17
- package/dist/index-DRNn5iIc.js +0 -142
- package/dist/index-Du8Nrf16.mjs +0 -128
- package/dist/index-MifIgNHW.mjs +0 -47
- package/dist/index-V28zHt_Z.js +0 -68
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";const de=require("./JC64G2H7-YkBMNrtl.js"),D=require("./YV4JVR4I-DIthYWMj.js"),c=require("./LVA2YJMS-B2HZjIhJ.js"),ce=require("./MTZPJQMC-5Xg78Uyy.js"),C=require("react");function Je(e={}){var n=e,{popover:o}=n,t=c.__objRest$1(n,["popover"]);const i=D.mergeStore(t.store,D.omit2(o,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));D.throwOnConflictingProps(t,i);const r=i==null?void 0:i.getState(),u=de.createDialogStore(c.__spreadProps$1(c.__spreadValues$1({},t),{store:i})),a=c.defaultValue(t.placement,r==null?void 0:r.placement,"bottom"),l=c.__spreadProps$1(c.__spreadValues$1({},u.getState()),{placement:a,currentPlacement:a,anchorElement:c.defaultValue(r==null?void 0:r.anchorElement,null),popoverElement:c.defaultValue(r==null?void 0:r.popoverElement,null),arrowElement:c.defaultValue(r==null?void 0:r.arrowElement,null),rendered:Symbol("rendered")}),s=D.createStore(l,u,i);return c.__spreadProps$1(c.__spreadValues$1(c.__spreadValues$1({},u),s),{setAnchorElement:d=>s.setState("anchorElement",d),setPopoverElement:d=>s.setState("popoverElement",d),setArrowElement:d=>s.setState("arrowElement",d),render:()=>s.setState("rendered",Symbol("rendered"))})}function Ue(e,n,o){return c.useUpdateEffect(n,[o.popover]),D.useStoreProps(e,o,"placement"),de.useDialogStoreProps(e,n,o)}function gt(e={}){const[n,o]=D.useStore(Je,e);return Ue(n,o,e)}function ue(e){return e.split("-")[1]}function Te(e){return e==="y"?"height":"width"}function q(e){return e.split("-")[0]}function ee(e){return["top","bottom"].includes(q(e))?"x":"y"}function ke(e,n,o){let{reference:t,floating:i}=e;const r=t.x+t.width/2-i.width/2,u=t.y+t.height/2-i.height/2,a=ee(n),l=Te(a),s=t[l]/2-i[l]/2,d=a==="x";let f;switch(q(n)){case"top":f={x:r,y:t.y-i.height};break;case"bottom":f={x:r,y:t.y+t.height};break;case"right":f={x:t.x+t.width,y:u};break;case"left":f={x:t.x-i.width,y:u};break;default:f={x:t.x,y:t.y}}switch(ue(n)){case"start":f[a]-=s*(o&&d?-1:1);break;case"end":f[a]+=s*(o&&d?-1:1)}return f}const vt=async(e,n,o)=>{const{placement:t="bottom",strategy:i="absolute",middleware:r=[],platform:u}=o,a=r.filter(Boolean),l=await(u.isRTL==null?void 0:u.isRTL(n));let s=await u.getElementRects({reference:e,floating:n,strategy:i}),{x:d,y:f}=ke(s,t,l),h=t,m={},p=0;for(let g=0;g<a.length;g++){const{name:v,fn:x}=a[g],{x:w,y:b,data:E,reset:y}=await x({x:d,y:f,initialPlacement:t,placement:h,strategy:i,middlewareData:m,rects:s,platform:u,elements:{reference:e,floating:n}});d=w??d,f=b??f,m={...m,[v]:{...m[v],...E}},y&&p<=50&&(p++,typeof y=="object"&&(y.placement&&(h=y.placement),y.rects&&(s=y.rects===!0?await u.getElementRects({reference:e,floating:n,strategy:i}):y.rects),{x:d,y:f}=ke(s,h,l)),g=-1)}return{x:d,y:f,placement:h,strategy:i,middlewareData:m}};function X(e,n){return typeof e=="function"?e(n):e}function Ze(e){return typeof e!="number"?function(n){return{top:0,right:0,bottom:0,left:0,...n}}(e):{top:e,right:e,bottom:e,left:e}}function xe(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function $e(e,n){var o;n===void 0&&(n={});const{x:t,y:i,platform:r,rects:u,elements:a,strategy:l}=e,{boundary:s="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=X(n,e),p=Ze(m),g=a[h?f==="floating"?"reference":"floating":f],v=xe(await r.getClippingRect({element:(o=await(r.isElement==null?void 0:r.isElement(g)))==null||o?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:s,rootBoundary:d,strategy:l})),x=f==="floating"?{...u.floating,x:t,y:i}:u.reference,w=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),b=await(r.isElement==null?void 0:r.isElement(w))&&await(r.getScale==null?void 0:r.getScale(w))||{x:1,y:1},E=xe(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:x,offsetParent:w,strategy:l}):x);return{top:(v.top-E.top+p.top)/b.y,bottom:(E.bottom-v.bottom+p.bottom)/b.y,left:(v.left-E.left+p.left)/b.x,right:(E.right-v.right+p.right)/b.x}}const ae=Math.min,Z=Math.max;function _e(e,n,o){return Z(e,ae(n,o))}const xt=e=>({name:"arrow",options:e,async fn(n){const{x:o,y:t,placement:i,rects:r,platform:u,elements:a}=n,{element:l,padding:s=0}=X(e,n)||{};if(l==null)return{};const d=Ze(s),f={x:o,y:t},h=ee(i),m=Te(h),p=await u.getDimensions(l),g=h==="y",v=g?"top":"left",x=g?"bottom":"right",w=g?"clientHeight":"clientWidth",b=r.reference[m]+r.reference[h]-f[h]-r.floating[m],E=f[h]-r.reference[h],y=await(u.getOffsetParent==null?void 0:u.getOffsetParent(l));let S=y?y[w]:0;S&&await(u.isElement==null?void 0:u.isElement(y))||(S=a.floating[w]||r.floating[m]);const $=b/2-E/2,H=S/2-p[m]/2-1,L=ae(d[v],H),_=ae(d[x],H),A=L,M=S-p[m]-_,P=S/2-p[m]/2+$,O=_e(A,P,M),R=ue(i)!=null&&P!=O&&r.reference[m]/2-(P<A?L:_)-p[m]/2<0?P<A?A-P:M-P:0;return{[h]:f[h]-R,data:{[h]:O,centerOffset:P-O+R}}}}),wt=["top","right","bottom","left"];wt.reduce((e,n)=>e.concat(n,n+"-start",n+"-end"),[]);const yt={left:"right",right:"left",bottom:"top",top:"bottom"};function we(e){return e.replace(/left|right|bottom|top/g,n=>yt[n])}function Pt(e,n,o){o===void 0&&(o=!1);const t=ue(e),i=ee(e),r=Te(i);let u=i==="x"?t===(o?"end":"start")?"right":"left":t==="start"?"bottom":"top";return n.reference[r]>n.floating[r]&&(u=we(u)),{main:u,cross:we(u)}}const bt={start:"end",end:"start"};function Se(e){return e.replace(/start|end/g,n=>bt[n])}const Et=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var o;const{placement:t,middlewareData:i,rects:r,initialPlacement:u,platform:a,elements:l}=n,{mainAxis:s=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...g}=X(e,n),v=q(t),x=q(u)===u,w=await(a.isRTL==null?void 0:a.isRTL(l.floating)),b=f||(x||!p?[we(u)]:function(A){const M=we(A);return[Se(A),M,Se(M)]}(u));f||m==="none"||b.push(...function(A,M,P,O){const R=ue(A);let T=function(V,k,G){const j=["left","right"],B=["right","left"],U=["top","bottom"],te=["bottom","top"];switch(V){case"top":case"bottom":return G?k?B:j:k?j:B;case"left":case"right":return k?U:te;default:return[]}}(q(A),P==="start",O);return R&&(T=T.map(V=>V+"-"+R),M&&(T=T.concat(T.map(Se)))),T}(u,p,m,w));const E=[u,...b],y=await $e(n,g),S=[];let $=((o=i.flip)==null?void 0:o.overflows)||[];if(s&&S.push(y[v]),d){const{main:A,cross:M}=Pt(t,r,w);S.push(y[A],y[M])}if($=[...$,{placement:t,overflows:S}],!S.every(A=>A<=0)){var H,L;const A=(((H=i.flip)==null?void 0:H.index)||0)+1,M=E[A];if(M)return{data:{index:A,overflows:$},reset:{placement:M}};let P=(L=$.filter(O=>O.overflows[0]<=0).sort((O,R)=>O.overflows[1]-R.overflows[1])[0])==null?void 0:L.placement;if(!P)switch(h){case"bestFit":{var _;const O=(_=$.map(R=>[R.placement,R.overflows.filter(T=>T>0).reduce((T,V)=>T+V,0)]).sort((R,T)=>R[1]-T[1])[0])==null?void 0:_[0];O&&(P=O);break}case"initialPlacement":P=u}if(t!==P)return{reset:{placement:P}}}return{}}}},St=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){const{x:o,y:t}=n,i=await async function(r,u){const{placement:a,platform:l,elements:s}=r,d=await(l.isRTL==null?void 0:l.isRTL(s.floating)),f=q(a),h=ue(a),m=ee(a)==="x",p=["left","top"].includes(f)?-1:1,g=d&&m?-1:1,v=X(u,r);let{mainAxis:x,crossAxis:w,alignmentAxis:b}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...v};return h&&typeof b=="number"&&(w=h==="end"?-1*b:b),m?{x:w*g,y:x*p}:{x:x*p,y:w*g}}(n,e);return{x:o+i.x,y:t+i.y,data:i}}}};function Qe(e){return e==="x"?"y":"x"}const Rt=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:o,y:t,placement:i}=n,{mainAxis:r=!0,crossAxis:u=!1,limiter:a={fn:v=>{let{x,y:w}=v;return{x,y:w}}},...l}=X(e,n),s={x:o,y:t},d=await $e(n,l),f=ee(q(i)),h=Qe(f);let m=s[f],p=s[h];if(r){const v=f==="y"?"bottom":"right";m=_e(m+d[f==="y"?"top":"left"],m,m-d[v])}if(u){const v=h==="y"?"bottom":"right";p=_e(p+d[h==="y"?"top":"left"],p,p-d[v])}const g=a.fn({...n,[f]:m,[h]:p});return{...g,data:{x:g.x-o,y:g.y-t}}}}},_t=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:o,y:t,placement:i,rects:r,middlewareData:u}=n,{offset:a=0,mainAxis:l=!0,crossAxis:s=!0}=X(e,n),d={x:o,y:t},f=ee(i),h=Qe(f);let m=d[f],p=d[h];const g=X(a,n),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const b=f==="y"?"height":"width",E=r.reference[f]-r.floating[b]+v.mainAxis,y=r.reference[f]+r.reference[b]-v.mainAxis;m<E?m=E:m>y&&(m=y)}if(s){var x,w;const b=f==="y"?"width":"height",E=["top","left"].includes(q(i)),y=r.reference[h]-r.floating[b]+(E&&((x=u.offset)==null?void 0:x[h])||0)+(E?0:v.crossAxis),S=r.reference[h]+r.reference[b]+(E?0:((w=u.offset)==null?void 0:w[h])||0)-(E?v.crossAxis:0);p<y?p=y:p>S&&(p=S)}return{[f]:m,[h]:p}}}},At=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){const{placement:o,rects:t,platform:i,elements:r}=n,{apply:u=()=>{},...a}=X(e,n),l=await $e(n,a),s=q(o),d=ue(o),f=ee(o)==="x",{width:h,height:m}=t.floating;let p,g;s==="top"||s==="bottom"?(p=s,g=d===(await(i.isRTL==null?void 0:i.isRTL(r.floating))?"start":"end")?"left":"right"):(g=s,p=d==="end"?"top":"bottom");const v=m-l[p],x=h-l[g],w=!n.middlewareData.shift;let b=v,E=x;if(f){const S=h-l.left-l.right;E=d||w?ae(x,S):S}else{const S=m-l.top-l.bottom;b=d||w?ae(v,S):S}if(w&&!d){const S=Z(l.left,0),$=Z(l.right,0),H=Z(l.top,0),L=Z(l.bottom,0);f?E=h-2*(S!==0||$!==0?S+$:Z(l.left,l.right)):b=m-2*(H!==0||L!==0?H+L:Z(l.top,l.bottom))}await u({...n,availableWidth:E,availableHeight:b});const y=await i.getDimensions(r.floating);return h!==y.width||m!==y.height?{reset:{rects:!0}}:{}}}};function F(e){var n;return((n=e.ownerDocument)==null?void 0:n.defaultView)||window}function N(e){return F(e).getComputedStyle(e)}function Ke(e){return e instanceof F(e).Node}function J(e){return Ke(e)?(e.nodeName||"").toLowerCase():"#document"}function W(e){return e instanceof F(e).HTMLElement}function I(e){return e instanceof F(e).Element}function Ne(e){return typeof ShadowRoot<"u"&&(e instanceof F(e).ShadowRoot||e instanceof ShadowRoot)}function fe(e){const{overflow:n,overflowX:o,overflowY:t,display:i}=N(e);return/auto|scroll|overlay|hidden|clip/.test(n+t+o)&&!["inline","contents"].includes(i)}function Ot(e){return["table","td","th"].includes(J(e))}function Ae(e){const n=He(),o=N(e);return o.transform!=="none"||o.perspective!=="none"||!n&&!!o.backdropFilter&&o.backdropFilter!=="none"||!n&&!!o.filter&&o.filter!=="none"||["transform","perspective","filter"].some(t=>(o.willChange||"").includes(t))||["paint","layout","strict","content"].some(t=>(o.contain||"").includes(t))}function He(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function be(e){return["html","body","#document"].includes(J(e))}const Oe=Math.min,re=Math.max,ye=Math.round,ve=Math.floor,Q=e=>({x:e,y:e});function et(e){const n=N(e);let o=parseFloat(n.width)||0,t=parseFloat(n.height)||0;const i=W(e),r=i?e.offsetWidth:o,u=i?e.offsetHeight:t,a=ye(o)!==r||ye(t)!==u;return a&&(o=r,t=u),{width:o,height:t,$:a}}function Ce(e){return I(e)?e:e.contextElement}function ie(e){const n=Ce(e);if(!W(n))return Q(1);const o=n.getBoundingClientRect(),{width:t,height:i,$:r}=et(n);let u=(r?ye(o.width):o.width)/t,a=(r?ye(o.height):o.height)/i;return u&&Number.isFinite(u)||(u=1),a&&Number.isFinite(a)||(a=1),{x:u,y:a}}const We=Q(0);function tt(e,n,o){var t,i;if(n===void 0&&(n=!0),!He())return We;const r=e?F(e):window;return!o||n&&o!==r?We:{x:((t=r.visualViewport)==null?void 0:t.offsetLeft)||0,y:((i=r.visualViewport)==null?void 0:i.offsetTop)||0}}function K(e,n,o,t){n===void 0&&(n=!1),o===void 0&&(o=!1);const i=e.getBoundingClientRect(),r=Ce(e);let u=Q(1);n&&(t?I(t)&&(u=ie(t)):u=ie(e));const a=tt(r,o,t);let l=(i.left+a.x)/u.x,s=(i.top+a.y)/u.y,d=i.width/u.x,f=i.height/u.y;if(r){const h=F(r),m=t&&I(t)?F(t):t;let p=h.frameElement;for(;p&&t&&m!==h;){const g=ie(p),v=p.getBoundingClientRect(),x=getComputedStyle(p),w=v.left+(p.clientLeft+parseFloat(x.paddingLeft))*g.x,b=v.top+(p.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,s*=g.y,d*=g.x,f*=g.y,l+=w,s+=b,p=F(p).frameElement}}return xe({width:d,height:f,x:l,y:s})}function Y(e){return((Ke(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ee(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function nt(e){return K(Y(e)).left+Ee(e).scrollLeft}function se(e){if(J(e)==="html")return e;const n=e.assignedSlot||e.parentNode||Ne(e)&&e.host||Y(e);return Ne(n)?n.host:n}function ot(e){const n=se(e);return be(n)?e.ownerDocument?e.ownerDocument.body:e.body:W(n)&&fe(n)?n:ot(n)}function Pe(e,n){var o;n===void 0&&(n=[]);const t=ot(e),i=t===((o=e.ownerDocument)==null?void 0:o.body),r=F(t);return i?n.concat(r,r.visualViewport||[],fe(t)?t:[]):n.concat(t,Pe(t))}function je(e,n,o){let t;if(n==="viewport")t=function(i,r){const u=F(i),a=Y(i),l=u.visualViewport;let s=a.clientWidth,d=a.clientHeight,f=0,h=0;if(l){s=l.width,d=l.height;const m=He();(!m||m&&r==="fixed")&&(f=l.offsetLeft,h=l.offsetTop)}return{width:s,height:d,x:f,y:h}}(e,o);else if(n==="document")t=function(i){const r=Y(i),u=Ee(i),a=i.ownerDocument.body,l=re(r.scrollWidth,r.clientWidth,a.scrollWidth,a.clientWidth),s=re(r.scrollHeight,r.clientHeight,a.scrollHeight,a.clientHeight);let d=-u.scrollLeft+nt(i);const f=-u.scrollTop;return N(a).direction==="rtl"&&(d+=re(r.clientWidth,a.clientWidth)-l),{width:l,height:s,x:d,y:f}}(Y(e));else if(I(n))t=function(i,r){const u=K(i,!0,r==="fixed"),a=u.top+i.clientTop,l=u.left+i.clientLeft,s=W(i)?ie(i):Q(1);return{width:i.clientWidth*s.x,height:i.clientHeight*s.y,x:l*s.x,y:a*s.y}}(n,o);else{const i=tt(e);t={...n,x:n.x-i.x,y:n.y-i.y}}return xe(t)}function rt(e,n){const o=se(e);return!(o===n||!I(o)||be(o))&&(N(o).position==="fixed"||rt(o,n))}function Be(e,n){return W(e)&&N(e).position!=="fixed"?n?n(e):e.offsetParent:null}function ze(e,n){const o=F(e);if(!W(e))return o;let t=Be(e,n);for(;t&&Ot(t)&&N(t).position==="static";)t=Be(t,n);return t&&(J(t)==="html"||J(t)==="body"&&N(t).position==="static"&&!Ae(t))?o:t||function(i){let r=se(i);for(;W(r)&&!be(r);){if(Ae(r))return r;r=se(r)}return null}(e)||o}function Tt(e,n,o){const t=W(n),i=Y(n),r=o==="fixed",u=K(e,!0,r,n);let a={scrollLeft:0,scrollTop:0};const l=Q(0);if(t||!t&&!r)if((J(n)!=="body"||fe(i))&&(a=Ee(n)),W(n)){const s=K(n,!0,r,n);l.x=s.x+n.clientLeft,l.y=s.y+n.clientTop}else i&&(l.x=nt(i));return{x:u.left+a.scrollLeft-l.x,y:u.top+a.scrollTop-l.y,width:u.width,height:u.height}}const $t={getClippingRect:function(e){let{element:n,boundary:o,rootBoundary:t,strategy:i}=e;const r=o==="clippingAncestors"?function(s,d){const f=d.get(s);if(f)return f;let h=Pe(s).filter(v=>I(v)&&J(v)!=="body"),m=null;const p=N(s).position==="fixed";let g=p?se(s):s;for(;I(g)&&!be(g);){const v=N(g),x=Ae(g);x||v.position!=="fixed"||(m=null),(p?!x&&!m:!x&&v.position==="static"&&m&&["absolute","fixed"].includes(m.position)||fe(g)&&!x&&rt(s,g))?h=h.filter(w=>w!==g):m=v,g=se(g)}return d.set(s,h),h}(n,this._c):[].concat(o),u=[...r,t],a=u[0],l=u.reduce((s,d)=>{const f=je(n,d,i);return s.top=re(f.top,s.top),s.right=Oe(f.right,s.right),s.bottom=Oe(f.bottom,s.bottom),s.left=re(f.left,s.left),s},je(n,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:n,offsetParent:o,strategy:t}=e;const i=W(o),r=Y(o);if(o===r)return n;let u={scrollLeft:0,scrollTop:0},a=Q(1);const l=Q(0);if((i||!i&&t!=="fixed")&&((J(o)!=="body"||fe(r))&&(u=Ee(o)),W(o))){const s=K(o);a=ie(o),l.x=s.x+o.clientLeft,l.y=s.y+o.clientTop}return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-u.scrollLeft*a.x+l.x,y:n.y*a.y-u.scrollTop*a.y+l.y}},isElement:I,getDimensions:function(e){return et(e)},getOffsetParent:ze,getDocumentElement:Y,getScale:ie,async getElementRects(e){let{reference:n,floating:o,strategy:t}=e;const i=this.getOffsetParent||ze,r=this.getDimensions;return{reference:Tt(n,await i(o),t),floating:{x:0,y:0,...await r(o)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>N(e).direction==="rtl"};function Ht(e,n,o,t){t===void 0&&(t={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:u=!0,layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=t,s=Ce(e),d=i||r?[...s?Pe(s):[],...Pe(n)]:[];d.forEach(g=>{i&&g.addEventListener("scroll",o,{passive:!0}),r&&g.addEventListener("resize",o)});const f=s&&a?function(g,v){let x,w=null;const b=Y(g);function E(){clearTimeout(x),w&&w.disconnect(),w=null}return function y(S,$){S===void 0&&(S=!1),$===void 0&&($=1),E();const{left:H,top:L,width:_,height:A}=g.getBoundingClientRect();if(S||v(),!_||!A)return;const M=ve(L),P=ve(b.clientWidth-(H+_)),O=ve(b.clientHeight-(L+A)),R=ve(H);let T=!0;w=new IntersectionObserver(V=>{const k=V[0].intersectionRatio;if(k!==$){if(!T)return y();k?y(!1,k):x=setTimeout(()=>{y(!1,1e-7)},100)}T=!1},{rootMargin:-M+"px "+-P+"px "+-O+"px "+-R+"px",threshold:re(0,Oe(1,$))||1}),w.observe(g)}(!0),E}(s,o):null;let h,m=null;u&&(m=new ResizeObserver(o),s&&!l&&m.observe(s),m.observe(n));let p=l?K(e):null;return l&&function g(){const v=K(e);!p||v.x===p.x&&v.y===p.y&&v.width===p.width&&v.height===p.height||o(),p=v,h=requestAnimationFrame(g)}(),o(),()=>{d.forEach(g=>{i&&g.removeEventListener("scroll",o),r&&g.removeEventListener("resize",o)}),f&&f(),m&&m.disconnect(),m=null,l&&cancelAnimationFrame(h)}}const Ct=(e,n,o)=>{const t=new Map,i={platform:$t,...o},r={...i.platform,_c:t};return vt(e,n,{...i,platform:r})};var Mt="div";function qe(e=0,n=0,o=0,t=0){if(typeof DOMRect=="function")return new DOMRect(e,n,o,t);const i={x:e,y:n,width:o,height:t,top:n,right:e+o,bottom:n+t,left:e};return c.__spreadProps(c.__spreadValues({},i),{toJSON:()=>i})}function Vt(e){if(!e)return qe();const{x:n,y:o,width:t,height:i}=e;return qe(n,o,t,i)}function Lt(e,n){return{contextElement:e||void 0,getBoundingClientRect:()=>{const t=e,i=n==null?void 0:n(t);return i||!t?Vt(i):t.getBoundingClientRect()}}}function Dt(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}function Ie(e){const n=window.devicePixelRatio||1;return Math.round(e*n)/n}function Ft(e,n){return St(({placement:o})=>{var t;const i=((e==null?void 0:e.clientHeight)||0)/2,r=typeof n.gutter=="number"?n.gutter+i:(t=n.gutter)!=null?t:i;return{crossAxis:!!o.split("-")[1]?void 0:n.shift,mainAxis:r,alignmentAxis:n.shift}})}function kt(e){if(e.flip===!1)return;const n=typeof e.flip=="string"?e.flip.split(" "):void 0;return c.invariant(!n||n.every(Dt),process.env.NODE_ENV!=="production"&&"`flip` expects a spaced-delimited list of placements"),Et({padding:e.overflowPadding,fallbackPlacements:n})}function Nt(e){if(!(!e.slide&&!e.overlap))return Rt({mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:_t()})}function Wt(e){return At({padding:e.overflowPadding,apply({elements:n,availableWidth:o,availableHeight:t,rects:i}){const r=n.floating,u=Math.round(i.reference.width);o=Math.floor(o),t=Math.floor(t),r.style.setProperty("--popover-anchor-width",`${u}px`),r.style.setProperty("--popover-available-width",`${o}px`),r.style.setProperty("--popover-available-height",`${t}px`),e.sameWidth&&(r.style.width=`${u}px`),e.fitViewport&&(r.style.maxWidth=`${o}px`,r.style.maxHeight=`${t}px`)}})}function jt(e,n){if(e)return xt({element:e,padding:n.arrowPadding})}var it=c.createHook(function(n){var o=n,{store:t,modal:i=!1,portal:r=!!i,preserveTabOrder:u=!0,autoFocusOnShow:a=!0,wrapperProps:l,fixed:s=!1,flip:d=!0,shift:f=0,slide:h=!0,overlap:m=!1,sameWidth:p=!1,fitViewport:g=!1,gutter:v,arrowPadding:x=4,overflowPadding:w=8,getAnchorRect:b,updatePosition:E}=o,y=c.__objRest(o,["store","modal","portal","preserveTabOrder","autoFocusOnShow","wrapperProps","fixed","flip","shift","slide","overlap","sameWidth","fitViewport","gutter","arrowPadding","overflowPadding","getAnchorRect","updatePosition"]);const S=ce.usePopoverProviderContext();t=t||S,c.invariant(t,process.env.NODE_ENV!=="production"&&"Popover must receive a `store` prop or be wrapped in a PopoverProvider component.");const $=t.useState("arrowElement"),H=t.useState("anchorElement"),L=t.useState("disclosureElement"),_=t.useState("popoverElement"),A=t.useState("contentElement"),M=t.useState("placement"),P=t.useState("mounted"),O=t.useState("rendered"),R=C.useRef(null),[T,V]=C.useState(!1),{portalRef:k,domReady:G}=c.usePortalRef(r,y.portalRef),j=c.useEvent(b),B=c.useEvent(E),U=!!E;c.useSafeLayoutEffect(()=>{if(!(_!=null&&_.isConnected))return;_.style.setProperty("--popover-overflow-padding",`${w}px`);const z=Lt(H,j),le=async()=>{if(!P)return;$||(R.current=R.current||document.createElement("div"));const ne=$||R.current,pt=[Ft(ne,{gutter:v,shift:f}),kt({flip:d,overflowPadding:w}),Nt({slide:h,shift:f,overlap:m,overflowPadding:w}),jt(ne,{arrowPadding:x}),Wt({sameWidth:p,fitViewport:g,overflowPadding:w})],oe=await Ct(z,_,{placement:M,strategy:s?"fixed":"absolute",middleware:pt});t==null||t.setState("currentPlacement",oe.placement),V(!0);const mt=Ie(oe.x),ht=Ie(oe.y);if(Object.assign(_.style,{top:"0",left:"0",transform:`translate3d(${mt}px,${ht}px,0)`}),ne&&oe.middlewareData.arrow){const{x:pe,y:me}=oe.middlewareData.arrow,Le=oe.placement.split("-")[0],he=ne.clientWidth/2,ge=ne.clientHeight/2,De=pe!=null?pe+he:-he,Fe=me!=null?me+ge:-ge;_.style.setProperty("--popover-transform-origin",{top:`${De}px calc(100% + ${ge}px)`,bottom:`${De}px ${-ge}px`,left:`calc(100% + ${he}px) ${Fe}px`,right:`${-he}px ${Fe}px`}[Le]),Object.assign(ne.style,{left:pe!=null?`${pe}px`:"",top:me!=null?`${me}px`:"",[Le]:"100%"})}},dt=Ht(z,_,async()=>{U?(await B({updatePosition:le}),V(!0)):await le()},{elementResize:typeof ResizeObserver=="function"});return()=>{V(!1),dt()}},[t,O,_,$,H,_,M,P,G,s,d,f,h,m,p,g,v,x,w,j,U,B]),c.useSafeLayoutEffect(()=>{if(!P||!G||!(_!=null&&_.isConnected)||!(A!=null&&A.isConnected))return;const z=()=>{_.style.zIndex=getComputedStyle(A).zIndex};z();let le=requestAnimationFrame(()=>{le=requestAnimationFrame(z)});return()=>cancelAnimationFrame(le)},[P,G,_,A]);const te=s?"fixed":"absolute";return y=c.useWrapElement(y,z=>c.jsxRuntimeExports.jsx("div",c.__spreadProps(c.__spreadValues({},l),{style:c.__spreadValues({position:te,top:0,left:0,width:"max-content"},l==null?void 0:l.style),ref:t==null?void 0:t.setPopoverElement,children:z})),[t,te,l]),y=c.useWrapElement(y,z=>c.jsxRuntimeExports.jsx(ce.PopoverScopedContextProvider,{value:t,children:z}),[t]),y=c.__spreadProps(c.__spreadValues({"data-placing":!T||void 0},y),{style:c.__spreadValues({position:"relative"},y.style)}),y=de.useDialog(c.__spreadProps(c.__spreadValues({store:t,modal:i,portal:r,preserveTabOrder:u,preserveTabOrderAnchor:L||H,autoFocusOnShow:T&&a},y),{portalRef:k})),y}),Bt=de.createDialogComponent(c.forwardRef2(function(n){const o=it(n);return c.createElement(Mt,o)}),ce.usePopoverProviderContext),Me=c.createStoreContext([ce.PopoverContextProvider],[ce.PopoverScopedContextProvider]),Ve=Me.useProviderContext,zt=Me.ContextProvider,st=Me.ScopedContextProvider;function ut(e={}){var n;const o=(n=e.store)==null?void 0:n.getState(),t=Je(c.__spreadProps$1(c.__spreadValues$1({},e),{placement:c.defaultValue(e.placement,o==null?void 0:o.placement,"bottom")})),i=c.defaultValue(e.timeout,o==null?void 0:o.timeout,500),r=c.__spreadProps$1(c.__spreadValues$1({},t.getState()),{timeout:i,showTimeout:c.defaultValue(e.showTimeout,o==null?void 0:o.showTimeout),hideTimeout:c.defaultValue(e.hideTimeout,o==null?void 0:o.hideTimeout),autoFocusOnShow:c.defaultValue(o==null?void 0:o.autoFocusOnShow,!1)}),u=D.createStore(r,t,e.store);return c.__spreadProps$1(c.__spreadValues$1(c.__spreadValues$1({},t),u),{setAutoFocusOnShow:a=>u.setState("autoFocusOnShow",a)})}function lt(e,n,o){return D.useStoreProps(e,o,"timeout"),D.useStoreProps(e,o,"showTimeout"),D.useStoreProps(e,o,"hideTimeout"),Ue(e,n,o)}function qt(e={}){const[n,o]=D.useStore(ut,e);return lt(n,o,e)}function Re(e){return[e.clientX,e.clientY]}function Ye(e,n){const[o,t]=e;let i=!1;const r=n.length;for(let u=r,a=0,l=u-1;a<u;l=a++){const[s,d]=n[a],[f,h]=n[l],[,m]=n[l===0?u-1:l-1]||[0,0],p=(d-h)*(o-s)-(s-f)*(t-d);if(h<d){if(t>=h&&t<d){if(p===0)return!0;p>0&&(t===h?t>m&&(i=!i):i=!i)}}else if(d<h){if(t>d&&t<=h){if(p===0)return!0;p<0&&(t===h?t<m&&(i=!i):i=!i)}}else if(t===d&&(o>=f&&o<=s||o>=s&&o<=f))return!0}return i}function It(e,n){const{top:o,right:t,bottom:i,left:r}=n,[u,a]=e,l=u<r?"left":u>t?"right":null,s=a<o?"top":a>i?"bottom":null;return[l,s]}function Ge(e,n){const o=e.getBoundingClientRect(),{top:t,right:i,bottom:r,left:u}=o,[a,l]=It(n,o),s=[n];return a?(l!=="top"&&s.push([a==="left"?u:i,t]),s.push([a==="left"?i:u,t]),s.push([a==="left"?i:u,r]),l!=="bottom"&&s.push([a==="left"?u:i,r])):l==="top"?(s.push([u,t]),s.push([u,r]),s.push([i,r]),s.push([i,t])):(s.push([u,r]),s.push([u,t]),s.push([i,t]),s.push([i,r])),s}var Yt="div";function ct(e,n,o,t){return c.hasFocusWithin(n)?!0:e?!!(c.contains(n,e)||o&&c.contains(o,e)||t!=null&&t.some(i=>ct(e,i,o))):!1}function Gt(e){var n=e,{store:o}=n,t=c.__objRest(n,["store"]);const[i,r]=C.useState(!1),u=o.useState("mounted");C.useEffect(()=>{u||r(!1)},[u]);const a=t.onFocus,l=c.useEvent(d=>{a==null||a(d),!d.defaultPrevented&&r(!0)}),s=C.useRef(null);return C.useEffect(()=>D.sync(o,["anchorElement"],d=>{s.current=d.anchorElement}),[]),t=c.__spreadProps(c.__spreadValues({autoFocusOnHide:i,finalFocus:s},t),{onFocus:l}),t}var Xe=C.createContext(null),at=c.createHook(function(n){var o=n,{store:t,modal:i=!1,portal:r=!!i,hideOnEscape:u=!0,hideOnHoverOutside:a=!0,disablePointerEventsOnApproach:l=!!a}=o,s=c.__objRest(o,["store","modal","portal","hideOnEscape","hideOnHoverOutside","disablePointerEventsOnApproach"]);const d=Ve();t=t||d,c.invariant(t,process.env.NODE_ENV!=="production"&&"Hovercard must receive a `store` prop or be wrapped in a HovercardProvider component.");const f=C.useRef(null),[h,m]=C.useState([]),p=C.useRef(0),g=C.useRef(null),{portalRef:v,domReady:x}=c.usePortalRef(r,s.portalRef),w=c.useIsMouseMoving(),b=!!a,E=c.useBooleanEvent(a),y=!!l,S=c.useBooleanEvent(l),$=t.useState("open"),H=t.useState("mounted");C.useEffect(()=>{if(!x||!H||!b&&!y)return;const P=f.current;if(!P)return;const O=R=>{if(!t||!w())return;const{anchorElement:T,hideTimeout:V,timeout:k}=t.getState(),G=g.current,[j]=R.composedPath(),B=T;if(ct(j,P,B,h)){g.current=j&&B&&c.contains(B,j)?Re(R):null,window.clearTimeout(p.current),p.current=0;return}if(!p.current){if(G){const U=Re(R),te=Ge(P,G);if(Ye(U,te)){if(g.current=U,!S(R))return;R.preventDefault(),R.stopPropagation();return}}E(R)&&(p.current=window.setTimeout(()=>{p.current=0,t==null||t.hide()},V??k))}};return c.chain(c.addGlobalEventListener("mousemove",O,!0),()=>clearTimeout(p.current))},[t,w,x,H,b,y,h,S,E]),C.useEffect(()=>{if(!x||!H||!y)return;const P=O=>{const R=f.current;if(!R)return;const T=g.current;if(!T)return;const V=Ge(R,T);if(Ye(Re(O),V)){if(!S(O))return;O.preventDefault(),O.stopPropagation()}};return c.chain(c.addGlobalEventListener("mouseenter",P,!0),c.addGlobalEventListener("mouseover",P,!0),c.addGlobalEventListener("mouseout",P,!0),c.addGlobalEventListener("mouseleave",P,!0))},[x,H,y,S]),C.useEffect(()=>{x&&($||t==null||t.setAutoFocusOnShow(!1))},[t,x,$]);const L=c.useLiveRef($);C.useEffect(()=>{if(x)return()=>{L.current||t==null||t.setAutoFocusOnShow(!1)}},[t,x]);const _=C.useContext(Xe);c.useSafeLayoutEffect(()=>{if(i||!r||!H||!x)return;const P=f.current;if(P)return _==null?void 0:_(P)},[i,r,H,x]);const A=C.useCallback(P=>{m(R=>[...R,P]);const O=_==null?void 0:_(P);return()=>{m(R=>R.filter(T=>T!==P)),O==null||O()}},[_]);s=c.useWrapElement(s,P=>c.jsxRuntimeExports.jsx(st,{value:t,children:c.jsxRuntimeExports.jsx(Xe.Provider,{value:A,children:P})}),[t,A]),s=c.__spreadProps(c.__spreadValues({},s),{ref:c.useMergeRefs(f,s.ref)}),s=Gt(c.__spreadValues({store:t},s));const M=t.useState(P=>i||P.autoFocusOnShow);return s=it(c.__spreadProps(c.__spreadValues({store:t,modal:i,portal:r,autoFocusOnShow:M},s),{portalRef:v,hideOnEscape(P){return c.isFalsyBooleanCallback(u,P)?!1:(requestAnimationFrame(()=>{requestAnimationFrame(()=>{t==null||t.hide()})}),!0)}})),s}),Xt=de.createDialogComponent(c.forwardRef2(function(n){const o=at(n);return c.createElement(Yt,o)}),Ve),Jt="a",ft=c.createHook(function(n){var o=n,{store:t,showOnHover:i=!0}=o,r=c.__objRest(o,["store","showOnHover"]);const u=Ve();t=t||u,c.invariant(t,process.env.NODE_ENV!=="production"&&"HovercardAnchor must receive a `store` prop or be wrapped in a HovercardProvider component.");const a=c.disabledFromProps(r),l=C.useRef(0);C.useEffect(()=>()=>window.clearTimeout(l.current),[]),C.useEffect(()=>{const v=x=>{if(!t)return;const{anchorElement:w}=t.getState();w&&x.target===w&&(window.clearTimeout(l.current),l.current=0)};return c.addGlobalEventListener("mouseleave",v,!0)},[t]);const s=r.onMouseMove,d=c.useBooleanEvent(i),f=c.useIsMouseMoving(),h=c.useEvent(v=>{if(s==null||s(v),a||!t||v.defaultPrevented||l.current||!f()||!d(v))return;const x=v.currentTarget;t.setAnchorElement(x),t.setDisclosureElement(x);const{showTimeout:w,timeout:b}=t.getState(),E=()=>{l.current=0,f()&&(t==null||t.setAnchorElement(x),t==null||t.show(),queueMicrotask(()=>{t==null||t.setDisclosureElement(x)}))},y=w??b;y===0?E():l.current=window.setTimeout(E,y)}),m=r.onClick,p=c.useEvent(v=>{m==null||m(v),t&&(window.clearTimeout(l.current),l.current=0)}),g=C.useCallback(v=>{if(!t)return;const{anchorElement:x}=t.getState();x!=null&&x.isConnected||t.setAnchorElement(v)},[t]);return r=c.__spreadProps(c.__spreadValues({},r),{ref:c.useMergeRefs(g,r.ref),onMouseMove:h,onClick:p}),r=c.useFocusable(r),r}),Ut=c.forwardRef2(function(n){const o=ft(n);return c.createElement(Jt,o)});exports.Hovercard=Xt;exports.HovercardAnchor=Ut;exports.HovercardContextProvider=zt;exports.HovercardScopedContextProvider=st;exports.Popover=Bt;exports.createHovercardStore=ut;exports.useHovercard=at;exports.useHovercardAnchor=ft;exports.useHovercardStore=qt;exports.useHovercardStoreProps=lt;exports.usePopoverStore=gt;
|
package/dist/Badge.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react"),b=require("./System.js"),e=require("@xstyled/styled-components"),f=e.div(({disabled:t,length:
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react"),b=require("./System.js"),e=require("@xstyled/styled-components"),f=e.div(({disabled:t,length:d,size:s,variant:a})=>e.css`
|
|
2
2
|
${e.th("badges.default")};
|
|
3
3
|
${e.th(`badges.variants.${a}`)};
|
|
4
4
|
${e.th(`badges.sizes.${s}`)};
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
${e.th(`badges.disabled.${a}`)};
|
|
12
12
|
`}
|
|
13
13
|
|
|
14
|
-
${
|
|
14
|
+
${d===1&&e.css`
|
|
15
15
|
width: ${e.th(`badges.sizes.${s}.height`)};
|
|
16
16
|
`}
|
|
17
|
-
`),
|
|
17
|
+
`),n=b.forwardRef(({children:t,dataTestId:d,disabled:s,size:a="md",variant:g="default",withNumberAbbreviation:r,...l},c)=>{let i;const o=Number.isInteger(t),u=t.toString().length;return o&&r&&t>99?i="99+":i=t,$.createElement(f,{"data-testid":d,disabled:s,length:u,ref:c,size:a,variant:g,...l},i)});n.displayName="Badge";exports.Badge=n;
|
package/dist/Badge.mjs
CHANGED
|
@@ -20,34 +20,34 @@ const p = b.div(
|
|
|
20
20
|
width: ${t(`badges.sizes.${s}.height`)};
|
|
21
21
|
`}
|
|
22
22
|
`
|
|
23
|
-
),
|
|
23
|
+
), y = u(
|
|
24
24
|
({
|
|
25
25
|
children: e,
|
|
26
26
|
dataTestId: i,
|
|
27
27
|
disabled: s,
|
|
28
28
|
size: a = "md",
|
|
29
29
|
variant: n = "default",
|
|
30
|
-
withNumberAbbreviation:
|
|
31
|
-
...
|
|
32
|
-
},
|
|
30
|
+
withNumberAbbreviation: l,
|
|
31
|
+
...o
|
|
32
|
+
}, r) => {
|
|
33
33
|
let d;
|
|
34
|
-
const
|
|
35
|
-
return
|
|
34
|
+
const f = Number.isInteger(e), m = e.toString().length;
|
|
35
|
+
return f && l && e > 99 ? d = "99+" : d = e, /* @__PURE__ */ $.createElement(
|
|
36
36
|
p,
|
|
37
37
|
{
|
|
38
38
|
"data-testid": i,
|
|
39
39
|
disabled: s,
|
|
40
40
|
length: m,
|
|
41
|
-
ref:
|
|
41
|
+
ref: r,
|
|
42
42
|
size: a,
|
|
43
43
|
variant: n,
|
|
44
|
-
...
|
|
44
|
+
...o
|
|
45
45
|
},
|
|
46
46
|
d
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
49
|
);
|
|
50
|
-
|
|
50
|
+
y.displayName = "Badge";
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
y as Badge
|
|
53
53
|
};
|
package/dist/Breadcrumb.js
CHANGED
|
@@ -1,54 +1 @@
|
|
|
1
|
-
"use
|
|
2
|
-
${u.th("breadcrumbs.item.default")};
|
|
3
|
-
align-items: center;
|
|
4
|
-
transition: medium;
|
|
5
|
-
direction: initial;
|
|
6
|
-
|
|
7
|
-
&:hover {
|
|
8
|
-
${u.th("breadcrumbs.item.hover")};
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
&[aria-current='page'] {
|
|
12
|
-
${u.th("breadcrumbs.item.active")};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&[aria-disabled='true'] {
|
|
16
|
-
pointer-events: none;
|
|
17
|
-
cursor: default;
|
|
18
|
-
}
|
|
19
|
-
`,Ne=u.spanBox`
|
|
20
|
-
${u.th("breadcrumbs.separator")};
|
|
21
|
-
display: flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
`,$e=ee.forwardRef(({children:e,dataTestId:t,isActive:r,separator:n,...i},a)=>{const o=i.href||i.to;return s.createElement(fe.Box,{"aria-label":"breadcrumb",as:"li","data-testid":t,display:"inline-flex",flex:"0 0 auto",lineHeight:"normal"},n&&s.createElement(Ne,{role:"presentation"},n),s.createElement(Me,{"aria-current":r?"page":void 0,"aria-disabled":!o,...i,ref:a},e))}),ae=u.spanBox(({gradientBackground:e,theme:t})=>u.css`
|
|
24
|
-
left: 0;
|
|
25
|
-
background-image: ${ue(t,e)};
|
|
26
|
-
transform-origin: left;
|
|
27
|
-
`),ce=u.spanBox(({gradientBackground:e,theme:t})=>u.css`
|
|
28
|
-
right: 0;
|
|
29
|
-
background-image: ${ue(t,e,"left")};
|
|
30
|
-
transform-origin: right;
|
|
31
|
-
`),We=u.divBox`
|
|
32
|
-
${u.th("breadcrumbs.list")};
|
|
33
|
-
height: 100%;
|
|
34
|
-
position: relative;
|
|
35
|
-
overflow-x: hidden;
|
|
36
|
-
|
|
37
|
-
${ae},
|
|
38
|
-
${ce} {
|
|
39
|
-
position: absolute;
|
|
40
|
-
bottom: 0;
|
|
41
|
-
top: 0;
|
|
42
|
-
width: 30;
|
|
43
|
-
}
|
|
44
|
-
`,Pe=u.olBox`
|
|
45
|
-
display: inline-flex;
|
|
46
|
-
align-items: center;
|
|
47
|
-
max-width: 100%;
|
|
48
|
-
height: 100%;
|
|
49
|
-
overflow-x: auto;
|
|
50
|
-
margin: 0;
|
|
51
|
-
padding: 0;
|
|
52
|
-
list-style: none;
|
|
53
|
-
white-space: nowrap;
|
|
54
|
-
`,ue=(e,t,r="right")=>{const n=u.th(`colors.${t}`)({theme:e}),i=_.hexToRGBA(n,0);return`linear-gradient(to ${r}, ${n}, ${i} 100%)`},H=ee.forwardRef(({children:e,gradientBackground:t="neutral-10",lastChildNotClickable:r=!0,separator:n=s.createElement(ve.RightIcon,{size:"xs"}),...i},a)=>{const o=s.useRef(null),v=s.useRef(),f=s.useRef(),[l,y]=s.useState(!1),[h,N]=s.useState(0),k=s.Children.toArray(e).filter(Boolean),D=k.length,$=k.map((c,d)=>{const b=D===1||D===d+1,g=b&&r;return s.cloneElement(c,{key:`breadcrumb-${d}`,separator:b?void 0:n,isActive:g,...c.props})});function O(c,d){c&&(c.style.transform=`scale3d(${d}, 1, 1)`)}const x=s.useCallback(c=>{const d=1-c;O(v.current,d),O(f.current,c)},[]),B=s.useCallback(()=>{const{current:{offsetWidth:c,scrollLeft:d,scrollWidth:b}}=o,g=b-c,z=_.clamp(Math.abs(d-h),0,g)/g;x(z)},[h,x]),T=s.useMemo(()=>_.throttle(c=>{const[{target:{offsetWidth:d,scrollLeft:b,scrollWidth:g}}]=c,m=g-d;h||N(b===0?0:m),y(m>0)},300,!1),[h]);return s.useEffect(()=>{const c=new Le(T);return c.observe(o.current),()=>c.disconnect()},[]),s.useEffect(()=>{v.current&&f.current&&x(0)},[l,x]),s.createElement(We,{as:"nav",ref:a,...i},l&&s.createElement(ae,{gradientBackground:t,ref:v}),s.createElement(Pe,{dir:"rtl",onScroll:B,ref:o},$.reverse()),l&&s.createElement(ce,{gradientBackground:t,ref:f}))});H.displayName="Breadcrumb";const _e=Object.assign(H,{Item:$e});exports.Breadcrumb=_e;exports.BreadcrumbComponent=H;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react");const e=require("./index-CrhKWaM2.js");require("./index-Cs1IZBks.js");require("./System.js");require("./throttle-BB1Y3bfD.js");exports.Breadcrumb=e.Breadcrumb;exports.BreadcrumbComponent=e.BreadcrumbComponent;
|
package/dist/Breadcrumb.mjs
CHANGED
|
@@ -1,439 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { Box as Re } from "./Box.mjs";
|
|
7
|
-
import R, { th as z, css as ie } from "@xstyled/styled-components";
|
|
8
|
-
var x = [], ye = function() {
|
|
9
|
-
return x.some(function(e) {
|
|
10
|
-
return e.activeTargets.length > 0;
|
|
11
|
-
});
|
|
12
|
-
}, Be = function() {
|
|
13
|
-
return x.some(function(e) {
|
|
14
|
-
return e.skippedTargets.length > 0;
|
|
15
|
-
});
|
|
16
|
-
}, U = "ResizeObserver loop completed with undelivered notifications.", Te = function() {
|
|
17
|
-
var e;
|
|
18
|
-
typeof ErrorEvent == "function" ? e = new ErrorEvent("error", {
|
|
19
|
-
message: U
|
|
20
|
-
}) : (e = document.createEvent("Event"), e.initEvent("error", !1, !1), e.message = U), window.dispatchEvent(e);
|
|
21
|
-
}, k;
|
|
22
|
-
(function(e) {
|
|
23
|
-
e.BORDER_BOX = "border-box", e.CONTENT_BOX = "content-box", e.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
|
|
24
|
-
})(k || (k = {}));
|
|
25
|
-
var E = function(e) {
|
|
26
|
-
return Object.freeze(e);
|
|
27
|
-
}, Se = /* @__PURE__ */ function() {
|
|
28
|
-
function e(t, r) {
|
|
29
|
-
this.inlineSize = t, this.blockSize = r, E(this);
|
|
30
|
-
}
|
|
31
|
-
return e;
|
|
32
|
-
}(), oe = function() {
|
|
33
|
-
function e(t, r, n, i) {
|
|
34
|
-
return this.x = t, this.y = r, this.width = n, this.height = i, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, E(this);
|
|
35
|
-
}
|
|
36
|
-
return e.prototype.toJSON = function() {
|
|
37
|
-
var t = this, r = t.x, n = t.y, i = t.top, s = t.right, o = t.bottom, l = t.left, d = t.width, c = t.height;
|
|
38
|
-
return { x: r, y: n, top: i, right: s, bottom: o, left: l, width: d, height: c };
|
|
39
|
-
}, e.fromRect = function(t) {
|
|
40
|
-
return new e(t.x, t.y, t.width, t.height);
|
|
41
|
-
}, e;
|
|
42
|
-
}(), G = function(e) {
|
|
43
|
-
return e instanceof SVGElement && "getBBox" in e;
|
|
44
|
-
}, se = function(e) {
|
|
45
|
-
if (G(e)) {
|
|
46
|
-
var t = e.getBBox(), r = t.width, n = t.height;
|
|
47
|
-
return !r && !n;
|
|
48
|
-
}
|
|
49
|
-
var i = e, s = i.offsetWidth, o = i.offsetHeight;
|
|
50
|
-
return !(s || o || e.getClientRects().length);
|
|
51
|
-
}, Y = function(e) {
|
|
52
|
-
var t;
|
|
53
|
-
if (e instanceof Element)
|
|
54
|
-
return !0;
|
|
55
|
-
var r = (t = e == null ? void 0 : e.ownerDocument) === null || t === void 0 ? void 0 : t.defaultView;
|
|
56
|
-
return !!(r && e instanceof r.Element);
|
|
57
|
-
}, Ce = function(e) {
|
|
58
|
-
switch (e.tagName) {
|
|
59
|
-
case "INPUT":
|
|
60
|
-
if (e.type !== "image")
|
|
61
|
-
break;
|
|
62
|
-
case "VIDEO":
|
|
63
|
-
case "AUDIO":
|
|
64
|
-
case "EMBED":
|
|
65
|
-
case "OBJECT":
|
|
66
|
-
case "CANVAS":
|
|
67
|
-
case "IFRAME":
|
|
68
|
-
case "IMG":
|
|
69
|
-
return !0;
|
|
70
|
-
}
|
|
71
|
-
return !1;
|
|
72
|
-
}, C = typeof window < "u" ? window : {}, A = /* @__PURE__ */ new WeakMap(), K = /auto|scroll/, ke = /^tb|vertical/, De = /msie|trident/i.test(C.navigator && C.navigator.userAgent), f = function(e) {
|
|
73
|
-
return parseFloat(e || "0");
|
|
74
|
-
}, O = function(e, t, r) {
|
|
75
|
-
return e === void 0 && (e = 0), t === void 0 && (t = 0), r === void 0 && (r = !1), new Se((r ? t : e) || 0, (r ? e : t) || 0);
|
|
76
|
-
}, Q = E({
|
|
77
|
-
devicePixelContentBoxSize: O(),
|
|
78
|
-
borderBoxSize: O(),
|
|
79
|
-
contentBoxSize: O(),
|
|
80
|
-
contentRect: new oe(0, 0, 0, 0)
|
|
81
|
-
}), ae = function(e, t) {
|
|
82
|
-
if (t === void 0 && (t = !1), A.has(e) && !t)
|
|
83
|
-
return A.get(e);
|
|
84
|
-
if (se(e))
|
|
85
|
-
return A.set(e, Q), Q;
|
|
86
|
-
var r = getComputedStyle(e), n = G(e) && e.ownerSVGElement && e.getBBox(), i = !De && r.boxSizing === "border-box", s = ke.test(r.writingMode || ""), o = !n && K.test(r.overflowY || ""), l = !n && K.test(r.overflowX || ""), d = n ? 0 : f(r.paddingTop), c = n ? 0 : f(r.paddingRight), y = n ? 0 : f(r.paddingBottom), v = n ? 0 : f(r.paddingLeft), M = n ? 0 : f(r.borderTopWidth), D = n ? 0 : f(r.borderRightWidth), I = n ? 0 : f(r.borderBottomWidth), W = n ? 0 : f(r.borderLeftWidth), B = v + c, m = d + y, T = W + D, S = M + I, a = l ? e.offsetHeight - S - e.clientHeight : 0, u = o ? e.offsetWidth - T - e.clientWidth : 0, h = i ? B + T : 0, p = i ? m + S : 0, b = n ? n.width : f(r.width) - h - u, w = n ? n.height : f(r.height) - p - a, pe = b + B + u + T, be = w + m + a + S, V = E({
|
|
87
|
-
devicePixelContentBoxSize: O(Math.round(b * devicePixelRatio), Math.round(w * devicePixelRatio), s),
|
|
88
|
-
borderBoxSize: O(pe, be, s),
|
|
89
|
-
contentBoxSize: O(b, w, s),
|
|
90
|
-
contentRect: new oe(v, d, b, w)
|
|
91
|
-
});
|
|
92
|
-
return A.set(e, V), V;
|
|
93
|
-
}, ce = function(e, t, r) {
|
|
94
|
-
var n = ae(e, r), i = n.borderBoxSize, s = n.contentBoxSize, o = n.devicePixelContentBoxSize;
|
|
95
|
-
switch (t) {
|
|
96
|
-
case k.DEVICE_PIXEL_CONTENT_BOX:
|
|
97
|
-
return o;
|
|
98
|
-
case k.BORDER_BOX:
|
|
99
|
-
return i;
|
|
100
|
-
default:
|
|
101
|
-
return s;
|
|
102
|
-
}
|
|
103
|
-
}, Ie = /* @__PURE__ */ function() {
|
|
104
|
-
function e(t) {
|
|
105
|
-
var r = ae(t);
|
|
106
|
-
this.target = t, this.contentRect = r.contentRect, this.borderBoxSize = E([r.borderBoxSize]), this.contentBoxSize = E([r.contentBoxSize]), this.devicePixelContentBoxSize = E([r.devicePixelContentBoxSize]);
|
|
107
|
-
}
|
|
108
|
-
return e;
|
|
109
|
-
}(), ue = function(e) {
|
|
110
|
-
if (se(e))
|
|
111
|
-
return 1 / 0;
|
|
112
|
-
for (var t = 0, r = e.parentNode; r; )
|
|
113
|
-
t += 1, r = r.parentNode;
|
|
114
|
-
return t;
|
|
115
|
-
}, Ae = function() {
|
|
116
|
-
var e = 1 / 0, t = [];
|
|
117
|
-
x.forEach(function(o) {
|
|
118
|
-
if (o.activeTargets.length !== 0) {
|
|
119
|
-
var l = [];
|
|
120
|
-
o.activeTargets.forEach(function(c) {
|
|
121
|
-
var y = new Ie(c.target), v = ue(c.target);
|
|
122
|
-
l.push(y), c.lastReportedSize = ce(c.target, c.observedBox), v < e && (e = v);
|
|
123
|
-
}), t.push(function() {
|
|
124
|
-
o.callback.call(o.observer, l, o.observer);
|
|
125
|
-
}), o.activeTargets.splice(0, o.activeTargets.length);
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
for (var r = 0, n = t; r < n.length; r++) {
|
|
129
|
-
var i = n[r];
|
|
130
|
-
i();
|
|
131
|
-
}
|
|
132
|
-
return e;
|
|
133
|
-
}, Z = function(e) {
|
|
134
|
-
x.forEach(function(r) {
|
|
135
|
-
r.activeTargets.splice(0, r.activeTargets.length), r.skippedTargets.splice(0, r.skippedTargets.length), r.observationTargets.forEach(function(i) {
|
|
136
|
-
i.isActive() && (ue(i.target) > e ? r.activeTargets.push(i) : r.skippedTargets.push(i));
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
}, Le = function() {
|
|
140
|
-
var e = 0;
|
|
141
|
-
for (Z(e); ye(); )
|
|
142
|
-
e = Ae(), Z(e);
|
|
143
|
-
return Be() && Te(), e > 0;
|
|
144
|
-
}, P, le = [], Ne = function() {
|
|
145
|
-
return le.splice(0).forEach(function(e) {
|
|
146
|
-
return e();
|
|
147
|
-
});
|
|
148
|
-
}, _e = function(e) {
|
|
149
|
-
if (!P) {
|
|
150
|
-
var t = 0, r = document.createTextNode(""), n = { characterData: !0 };
|
|
151
|
-
new MutationObserver(function() {
|
|
152
|
-
return Ne();
|
|
153
|
-
}).observe(r, n), P = function() {
|
|
154
|
-
r.textContent = "".concat(t ? t-- : t++);
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
le.push(e), P();
|
|
158
|
-
}, Me = function(e) {
|
|
159
|
-
_e(function() {
|
|
160
|
-
requestAnimationFrame(e);
|
|
161
|
-
});
|
|
162
|
-
}, _ = 0, We = function() {
|
|
163
|
-
return !!_;
|
|
164
|
-
}, $e = 250, Pe = { attributes: !0, characterData: !0, childList: !0, subtree: !0 }, j = [
|
|
165
|
-
"resize",
|
|
166
|
-
"load",
|
|
167
|
-
"transitionend",
|
|
168
|
-
"animationend",
|
|
169
|
-
"animationstart",
|
|
170
|
-
"animationiteration",
|
|
171
|
-
"keyup",
|
|
172
|
-
"keydown",
|
|
173
|
-
"mouseup",
|
|
174
|
-
"mousedown",
|
|
175
|
-
"mouseover",
|
|
176
|
-
"mouseout",
|
|
177
|
-
"blur",
|
|
178
|
-
"focus"
|
|
179
|
-
], ee = function(e) {
|
|
180
|
-
return e === void 0 && (e = 0), Date.now() + e;
|
|
181
|
-
}, F = !1, Fe = function() {
|
|
182
|
-
function e() {
|
|
183
|
-
var t = this;
|
|
184
|
-
this.stopped = !0, this.listener = function() {
|
|
185
|
-
return t.schedule();
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
return e.prototype.run = function(t) {
|
|
189
|
-
var r = this;
|
|
190
|
-
if (t === void 0 && (t = $e), !F) {
|
|
191
|
-
F = !0;
|
|
192
|
-
var n = ee(t);
|
|
193
|
-
Me(function() {
|
|
194
|
-
var i = !1;
|
|
195
|
-
try {
|
|
196
|
-
i = Le();
|
|
197
|
-
} finally {
|
|
198
|
-
if (F = !1, t = n - ee(), !We())
|
|
199
|
-
return;
|
|
200
|
-
i ? r.run(1e3) : t > 0 ? r.run(t) : r.start();
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
}, e.prototype.schedule = function() {
|
|
205
|
-
this.stop(), this.run();
|
|
206
|
-
}, e.prototype.observe = function() {
|
|
207
|
-
var t = this, r = function() {
|
|
208
|
-
return t.observer && t.observer.observe(document.body, Pe);
|
|
209
|
-
};
|
|
210
|
-
document.body ? r() : C.addEventListener("DOMContentLoaded", r);
|
|
211
|
-
}, e.prototype.start = function() {
|
|
212
|
-
var t = this;
|
|
213
|
-
this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), j.forEach(function(r) {
|
|
214
|
-
return C.addEventListener(r, t.listener, !0);
|
|
215
|
-
}));
|
|
216
|
-
}, e.prototype.stop = function() {
|
|
217
|
-
var t = this;
|
|
218
|
-
this.stopped || (this.observer && this.observer.disconnect(), j.forEach(function(r) {
|
|
219
|
-
return C.removeEventListener(r, t.listener, !0);
|
|
220
|
-
}), this.stopped = !0);
|
|
221
|
-
}, e;
|
|
222
|
-
}(), H = new Fe(), te = function(e) {
|
|
223
|
-
!_ && e > 0 && H.start(), _ += e, !_ && H.stop();
|
|
224
|
-
}, He = function(e) {
|
|
225
|
-
return !G(e) && !Ce(e) && getComputedStyle(e).display === "inline";
|
|
226
|
-
}, Ge = function() {
|
|
227
|
-
function e(t, r) {
|
|
228
|
-
this.target = t, this.observedBox = r || k.CONTENT_BOX, this.lastReportedSize = {
|
|
229
|
-
inlineSize: 0,
|
|
230
|
-
blockSize: 0
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
return e.prototype.isActive = function() {
|
|
234
|
-
var t = ce(this.target, this.observedBox, !0);
|
|
235
|
-
return He(this.target) && (this.lastReportedSize = t), this.lastReportedSize.inlineSize !== t.inlineSize || this.lastReportedSize.blockSize !== t.blockSize;
|
|
236
|
-
}, e;
|
|
237
|
-
}(), Ve = /* @__PURE__ */ function() {
|
|
238
|
-
function e(t, r) {
|
|
239
|
-
this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t, this.callback = r;
|
|
240
|
-
}
|
|
241
|
-
return e;
|
|
242
|
-
}(), L = /* @__PURE__ */ new WeakMap(), re = function(e, t) {
|
|
243
|
-
for (var r = 0; r < e.length; r += 1)
|
|
244
|
-
if (e[r].target === t)
|
|
245
|
-
return r;
|
|
246
|
-
return -1;
|
|
247
|
-
}, N = function() {
|
|
248
|
-
function e() {
|
|
249
|
-
}
|
|
250
|
-
return e.connect = function(t, r) {
|
|
251
|
-
var n = new Ve(t, r);
|
|
252
|
-
L.set(t, n);
|
|
253
|
-
}, e.observe = function(t, r, n) {
|
|
254
|
-
var i = L.get(t), s = i.observationTargets.length === 0;
|
|
255
|
-
re(i.observationTargets, r) < 0 && (s && x.push(i), i.observationTargets.push(new Ge(r, n && n.box)), te(1), H.schedule());
|
|
256
|
-
}, e.unobserve = function(t, r) {
|
|
257
|
-
var n = L.get(t), i = re(n.observationTargets, r), s = n.observationTargets.length === 1;
|
|
258
|
-
i >= 0 && (s && x.splice(x.indexOf(n), 1), n.observationTargets.splice(i, 1), te(-1));
|
|
259
|
-
}, e.disconnect = function(t) {
|
|
260
|
-
var r = this, n = L.get(t);
|
|
261
|
-
n.observationTargets.slice().forEach(function(i) {
|
|
262
|
-
return r.unobserve(t, i.target);
|
|
263
|
-
}), n.activeTargets.splice(0, n.activeTargets.length);
|
|
264
|
-
}, e;
|
|
265
|
-
}(), Xe = function() {
|
|
266
|
-
function e(t) {
|
|
267
|
-
if (arguments.length === 0)
|
|
268
|
-
throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
269
|
-
if (typeof t != "function")
|
|
270
|
-
throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
|
|
271
|
-
N.connect(this, t);
|
|
272
|
-
}
|
|
273
|
-
return e.prototype.observe = function(t, r) {
|
|
274
|
-
if (arguments.length === 0)
|
|
275
|
-
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
276
|
-
if (!Y(t))
|
|
277
|
-
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
|
278
|
-
N.observe(this, t, r);
|
|
279
|
-
}, e.prototype.unobserve = function(t) {
|
|
280
|
-
if (arguments.length === 0)
|
|
281
|
-
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
282
|
-
if (!Y(t))
|
|
283
|
-
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
|
284
|
-
N.unobserve(this, t);
|
|
285
|
-
}, e.prototype.disconnect = function() {
|
|
286
|
-
N.disconnect(this);
|
|
287
|
-
}, e.toString = function() {
|
|
288
|
-
return "function ResizeObserver () { [polyfill code] }";
|
|
289
|
-
}, e;
|
|
290
|
-
}();
|
|
291
|
-
const qe = R.aBox`
|
|
292
|
-
${z("breadcrumbs.item.default")};
|
|
293
|
-
align-items: center;
|
|
294
|
-
transition: medium;
|
|
295
|
-
direction: initial;
|
|
296
|
-
|
|
297
|
-
&:hover {
|
|
298
|
-
${z("breadcrumbs.item.hover")};
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
&[aria-current='page'] {
|
|
302
|
-
${z("breadcrumbs.item.active")};
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
&[aria-disabled='true'] {
|
|
306
|
-
pointer-events: none;
|
|
307
|
-
cursor: default;
|
|
308
|
-
}
|
|
309
|
-
`, Je = R.spanBox`
|
|
310
|
-
${z("breadcrumbs.separator")};
|
|
311
|
-
display: flex;
|
|
312
|
-
align-items: center;
|
|
313
|
-
`, Ue = ne(
|
|
314
|
-
({ children: e, dataTestId: t, isActive: r, separator: n, ...i }, s) => {
|
|
315
|
-
const o = i.href || i.to;
|
|
316
|
-
return /* @__PURE__ */ g.createElement(
|
|
317
|
-
Re,
|
|
318
|
-
{
|
|
319
|
-
"aria-label": "breadcrumb",
|
|
320
|
-
as: "li",
|
|
321
|
-
"data-testid": t,
|
|
322
|
-
display: "inline-flex",
|
|
323
|
-
flex: "0 0 auto",
|
|
324
|
-
lineHeight: "normal"
|
|
325
|
-
},
|
|
326
|
-
n && /* @__PURE__ */ g.createElement(Je, { role: "presentation" }, n),
|
|
327
|
-
/* @__PURE__ */ g.createElement(
|
|
328
|
-
qe,
|
|
329
|
-
{
|
|
330
|
-
"aria-current": r ? "page" : void 0,
|
|
331
|
-
"aria-disabled": !o,
|
|
332
|
-
...i,
|
|
333
|
-
ref: s
|
|
334
|
-
},
|
|
335
|
-
e
|
|
336
|
-
)
|
|
337
|
-
);
|
|
338
|
-
}
|
|
339
|
-
), de = R.spanBox(
|
|
340
|
-
({ gradientBackground: e, theme: t }) => ie`
|
|
341
|
-
left: 0;
|
|
342
|
-
background-image: ${fe(t, e)};
|
|
343
|
-
transform-origin: left;
|
|
344
|
-
`
|
|
345
|
-
), ve = R.spanBox(
|
|
346
|
-
({ gradientBackground: e, theme: t }) => ie`
|
|
347
|
-
right: 0;
|
|
348
|
-
background-image: ${fe(t, e, "left")};
|
|
349
|
-
transform-origin: right;
|
|
350
|
-
`
|
|
351
|
-
), Ye = R.divBox`
|
|
352
|
-
${z("breadcrumbs.list")};
|
|
353
|
-
height: 100%;
|
|
354
|
-
position: relative;
|
|
355
|
-
overflow-x: hidden;
|
|
356
|
-
|
|
357
|
-
${de},
|
|
358
|
-
${ve} {
|
|
359
|
-
position: absolute;
|
|
360
|
-
bottom: 0;
|
|
361
|
-
top: 0;
|
|
362
|
-
width: 30;
|
|
363
|
-
}
|
|
364
|
-
`, Ke = R.olBox`
|
|
365
|
-
display: inline-flex;
|
|
366
|
-
align-items: center;
|
|
367
|
-
max-width: 100%;
|
|
368
|
-
height: 100%;
|
|
369
|
-
overflow-x: auto;
|
|
370
|
-
margin: 0;
|
|
371
|
-
padding: 0;
|
|
372
|
-
list-style: none;
|
|
373
|
-
white-space: nowrap;
|
|
374
|
-
`, fe = (e, t, r = "right") => {
|
|
375
|
-
const n = z(`colors.${t}`)({ theme: e }), i = Ee(n, 0);
|
|
376
|
-
return `linear-gradient(to ${r}, ${n}, ${i} 100%)`;
|
|
377
|
-
}, he = ne(
|
|
378
|
-
({
|
|
379
|
-
children: e,
|
|
380
|
-
gradientBackground: t = "neutral-10",
|
|
381
|
-
lastChildNotClickable: r = !0,
|
|
382
|
-
separator: n = /* @__PURE__ */ g.createElement(Oe, { size: "xs" }),
|
|
383
|
-
...i
|
|
384
|
-
}, s) => {
|
|
385
|
-
const o = $(null), l = $(), d = $(), [c, y] = X(!1), [v, M] = X(0), D = ge.toArray(e).filter(Boolean), I = D.length, W = D.map((a, u) => {
|
|
386
|
-
const h = I === 1 || I === u + 1, p = h && r;
|
|
387
|
-
return me(a, {
|
|
388
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
389
|
-
key: `breadcrumb-${u}`,
|
|
390
|
-
separator: h ? void 0 : n,
|
|
391
|
-
isActive: p,
|
|
392
|
-
...a.props
|
|
393
|
-
});
|
|
394
|
-
});
|
|
395
|
-
function B(a, u) {
|
|
396
|
-
a && (a.style.transform = `scale3d(${u}, 1, 1)`);
|
|
397
|
-
}
|
|
398
|
-
const m = q((a) => {
|
|
399
|
-
const u = 1 - a;
|
|
400
|
-
B(l.current, u), B(d.current, a);
|
|
401
|
-
}, []), T = q(() => {
|
|
402
|
-
const {
|
|
403
|
-
current: { offsetWidth: a, scrollLeft: u, scrollWidth: h }
|
|
404
|
-
} = o, p = h - a, w = ze(Math.abs(u - v), 0, p) / p;
|
|
405
|
-
m(w);
|
|
406
|
-
}, [v, m]), S = xe(
|
|
407
|
-
() => we(
|
|
408
|
-
(a) => {
|
|
409
|
-
const [
|
|
410
|
-
{
|
|
411
|
-
// Is offsetWidth really needed ?
|
|
412
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
413
|
-
// @ts-ignore
|
|
414
|
-
target: { offsetWidth: u, scrollLeft: h, scrollWidth: p }
|
|
415
|
-
}
|
|
416
|
-
] = a, b = p - u;
|
|
417
|
-
v || M(h === 0 ? 0 : b), y(b > 0);
|
|
418
|
-
},
|
|
419
|
-
300,
|
|
420
|
-
!1
|
|
421
|
-
),
|
|
422
|
-
[v]
|
|
423
|
-
);
|
|
424
|
-
return J(() => {
|
|
425
|
-
const a = new Xe(S);
|
|
426
|
-
return a.observe(o.current), () => a.disconnect();
|
|
427
|
-
}, []), J(() => {
|
|
428
|
-
l.current && d.current && m(0);
|
|
429
|
-
}, [c, m]), /* @__PURE__ */ g.createElement(Ye, { as: "nav", ref: s, ...i }, c && /* @__PURE__ */ g.createElement(de, { gradientBackground: t, ref: l }), /* @__PURE__ */ g.createElement(Ke, { dir: "rtl", onScroll: T, ref: o }, W.reverse()), c && /* @__PURE__ */ g.createElement(ve, { gradientBackground: t, ref: d }));
|
|
430
|
-
}
|
|
431
|
-
);
|
|
432
|
-
he.displayName = "Breadcrumb";
|
|
433
|
-
const nt = Object.assign(he, {
|
|
434
|
-
Item: Ue
|
|
435
|
-
});
|
|
1
|
+
import "react";
|
|
2
|
+
import { a as e, B as i } from "./index-1C9Z0d5Q.mjs";
|
|
3
|
+
import "./index-ColyClKR.mjs";
|
|
4
|
+
import "./System.mjs";
|
|
5
|
+
import "./throttle-BDBzFeFj.mjs";
|
|
436
6
|
export {
|
|
437
|
-
|
|
438
|
-
|
|
7
|
+
e as Breadcrumb,
|
|
8
|
+
i as BreadcrumbComponent
|
|
439
9
|
};
|