@bolio-ui/core 2.0.0-alpha.1 → 2.0.0-alpha.2
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/Avatar/Avatar.d.ts +3 -2
- package/dist/Avatar/AvatarGroup.d.ts +2 -1
- package/dist/Avatar/index.js +10 -785
- package/dist/Badge/Badge.d.ts +11 -2
- package/dist/Badge/BadgeAnchor.d.ts +3 -3
- package/dist/Badge/index.js +11 -799
- package/dist/BolioUIProvider/index.js +26 -1724
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +3 -2
- package/dist/Breadcrumbs/BreadcrumbsItem.d.ts +3 -2
- package/dist/Breadcrumbs/BreadcrumbsSeparator.d.ts +2 -1
- package/dist/Breadcrumbs/index.js +12 -873
- package/dist/Button/Button.d.ts +2 -1
- package/dist/Button/ButtonIcon.d.ts +2 -1
- package/dist/Button/index.js +18 -1242
- package/dist/Button/styles.d.ts +2 -0
- package/dist/ButtonDropdown/ButtonDropdown.d.ts +3 -2
- package/dist/ButtonDropdown/ButtonDropdownItem.d.ts +2 -1
- package/dist/ButtonDropdown/index.js +16 -1015
- package/dist/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/dist/ButtonGroup/index.js +11 -706
- package/dist/Calendar/index.js +10 -937
- package/dist/Capacity/Capacity.d.ts +3 -2
- package/dist/Capacity/index.js +11 -693
- package/dist/Card/Card.d.ts +6 -2
- package/dist/Card/CardContent.d.ts +2 -1
- package/dist/Card/CardFooter.d.ts +2 -1
- package/dist/Card/index.js +17 -1159
- package/dist/Card/styles.d.ts +7 -1
- package/dist/Checkbox/Checkbox.d.ts +3 -2
- package/dist/Checkbox/CheckboxGroup.d.ts +2 -1
- package/dist/Checkbox/CheckboxIcon.d.ts +1 -2
- package/dist/Checkbox/index.js +11 -941
- package/dist/Checkbox/styles.d.ts +1 -5
- package/dist/Code/Code.d.ts +6 -2
- package/dist/Code/index.js +10 -714
- package/dist/Col/Col.d.ts +3 -2
- package/dist/Col/index.js +4 -65
- package/dist/Collapse/Collapse.d.ts +3 -2
- package/dist/Collapse/CollapseGroup.d.ts +3 -2
- package/dist/Collapse/index.js +18 -1032
- package/dist/Combobox/index.js +10 -855
- package/dist/Container/Container.d.ts +1 -1
- package/dist/Container/index.js +8 -408
- package/dist/CssBaseline/CssBaseline.d.ts +1 -1
- package/dist/CssBaseline/index.js +7 -331
- package/dist/DatePicker/index.js +16 -1124
- package/dist/Description/Description.d.ts +3 -2
- package/dist/Description/index.js +10 -657
- package/dist/Display/Display.d.ts +3 -2
- package/dist/Display/index.js +10 -661
- package/dist/Divider/Divider.d.ts +3 -2
- package/dist/Divider/index.js +10 -681
- package/dist/Dot/Dot.d.ts +3 -2
- package/dist/Dot/index.js +10 -672
- package/dist/Drawer/Drawer.d.ts +1 -1
- package/dist/Drawer/DrawerWrapper.d.ts +1 -1
- package/dist/Drawer/helper.d.ts +1 -3
- package/dist/Drawer/index.js +21 -1368
- package/dist/Fieldset/Fieldset.d.ts +3 -2
- package/dist/Fieldset/FieldsetContent.d.ts +3 -2
- package/dist/Fieldset/FieldsetFooter.d.ts +3 -2
- package/dist/Fieldset/FieldsetGroup.d.ts +3 -2
- package/dist/Fieldset/index.js +16 -953
- package/dist/Grid/BasicItem.d.ts +3 -2
- package/dist/Grid/Grid.d.ts +107 -105
- package/dist/Grid/GridContainer.d.ts +107 -105
- package/dist/Grid/GridTypes.d.ts +5 -11
- package/dist/Grid/index.js +10 -783
- package/dist/Image/Image.d.ts +3 -2
- package/dist/Image/ImageBrowser.d.ts +4 -3
- package/dist/Image/index.js +12 -979
- package/dist/Input/Input.d.ts +3 -2
- package/dist/Input/InputBlockLabel.d.ts +3 -1
- package/dist/Input/InputProps.d.ts +1 -2
- package/dist/Input/Password.d.ts +3 -2
- package/dist/Input/index.js +17 -1174
- package/dist/Keyboard/Keyboard.d.ts +3 -2
- package/dist/Keyboard/index.js +9 -635
- package/dist/Link/Link.d.ts +3 -2
- package/dist/Link/index.js +11 -766
- package/dist/Loading/Loading.d.ts +3 -2
- package/dist/Loading/index.js +10 -681
- package/dist/MdxWidgets/index.js +42 -401
- package/dist/Menu/Menu.d.ts +20 -0
- package/dist/Menu/MenuContext.d.ts +15 -0
- package/dist/Menu/MenuItem.d.ts +57 -0
- package/dist/Menu/MenuList.d.ts +12 -0
- package/dist/Menu/MenuSub.d.ts +12 -0
- package/dist/Menu/index.d.ts +17 -0
- package/dist/Menu/index.js +24 -0
- package/dist/Modal/Modal.d.ts +3 -2
- package/dist/Modal/ModalAction.d.ts +1 -1
- package/dist/Modal/ModalActions.d.ts +1 -1
- package/dist/Modal/ModalContent.d.ts +1 -1
- package/dist/Modal/ModalSubtitle.d.ts +1 -1
- package/dist/Modal/ModalTitle.d.ts +3 -2
- package/dist/Modal/ModalWrapper.d.ts +1 -1
- package/dist/Modal/index.js +27 -2041
- package/dist/Next/index.js +20 -79
- package/dist/Note/Note.d.ts +6 -3
- package/dist/Note/index.js +11 -688
- package/dist/NumberInput/NumberInput.d.ts +24 -0
- package/dist/NumberInput/index.d.ts +3 -0
- package/dist/NumberInput/index.js +16 -0
- package/dist/Page/Page.d.ts +4 -4
- package/dist/Page/PageContent.d.ts +3 -2
- package/dist/Page/PageFooter.d.ts +3 -2
- package/dist/Page/PageHeader.d.ts +3 -2
- package/dist/Page/index.js +10 -820
- package/dist/Pagination/Pagination.d.ts +3 -2
- package/dist/Pagination/PaginationContext.d.ts +1 -3
- package/dist/Pagination/PaginationItem.d.ts +2 -1
- package/dist/Pagination/PaginationNext.d.ts +2 -1
- package/dist/Pagination/PaginationPrevious.d.ts +2 -1
- package/dist/Pagination/index.js +16 -1071
- package/dist/Popover/Popover.d.ts +1 -1
- package/dist/Popover/PopoverItem.d.ts +3 -2
- package/dist/Popover/index.js +23 -1413
- package/dist/Progress/Progress.d.ts +3 -2
- package/dist/Progress/index.js +11 -717
- package/dist/Radio/Radio.d.ts +3 -2
- package/dist/Radio/RadioDescription.d.ts +3 -2
- package/dist/Radio/RadioGroup.d.ts +3 -2
- package/dist/Radio/index.js +11 -909
- package/dist/Rating/Rating.d.ts +5 -6
- package/dist/Rating/index.js +10 -807
- package/dist/Row/Row.d.ts +1 -1
- package/dist/Row/index.js +8 -406
- package/dist/Section/Section.d.ts +1 -1
- package/dist/Section/index.js +10 -650
- package/dist/Select/Select.d.ts +3 -2
- package/dist/Select/SelectDropdown.d.ts +3 -2
- package/dist/Select/SelectOption.d.ts +3 -2
- package/dist/Select/index.js +24 -1696
- package/dist/Shared/backdrop.d.ts +1 -15
- package/dist/Shared/css-transition.d.ts +3 -17
- package/dist/Shared/expand.d.ts +1 -9
- package/dist/Shared/highlight.d.ts +2 -1
- package/dist/Skeleton/Skeleton.d.ts +13 -0
- package/dist/Skeleton/index.d.ts +3 -0
- package/dist/Skeleton/index.js +14 -0
- package/dist/Slider/Slider.d.ts +3 -2
- package/dist/Slider/SliderDot.d.ts +3 -2
- package/dist/Slider/index.js +16 -1012
- package/dist/Snippet/Snippet.d.ts +6 -2
- package/dist/Snippet/index.js +20 -1069
- package/dist/Snippet/styles.d.ts +7 -1
- package/dist/Spacer/index.js +9 -617
- package/dist/Spinner/Spinner.d.ts +3 -2
- package/dist/Spinner/index.js +10 -675
- package/dist/Stepper/Stepper.d.ts +14 -0
- package/dist/Stepper/StepperContext.d.ts +10 -0
- package/dist/Stepper/StepperStep.d.ts +13 -0
- package/dist/Stepper/index.d.ts +9 -0
- package/dist/Stepper/index.js +14 -0
- package/dist/Table/Table.d.ts +4 -3
- package/dist/Table/TableBody.d.ts +3 -10
- package/dist/Table/TableCell.d.ts +2 -1
- package/dist/Table/TableColumn.d.ts +0 -4
- package/dist/Table/TableContext.d.ts +1 -1
- package/dist/Table/TableHead.d.ts +2 -4
- package/dist/Table/TableTypes.d.ts +2 -1
- package/dist/Table/index.js +17 -1017
- package/dist/Tabs/Tabs.d.ts +1 -1
- package/dist/Tabs/TabsContext.d.ts +7 -2
- package/dist/Tabs/TabsItem.d.ts +5 -2
- package/dist/Tabs/index.js +11 -1018
- package/dist/Tag/Tag.d.ts +5 -2
- package/dist/Tag/index.js +10 -669
- package/dist/Text/Child.d.ts +3 -2
- package/dist/Text/Text.d.ts +4 -3
- package/dist/Text/index.js +9 -751
- package/dist/Textarea/Textarea.d.ts +4 -4
- package/dist/Textarea/index.js +11 -839
- package/dist/Themes/index.js +4 -305
- package/dist/Toggle/Toggle.d.ts +3 -2
- package/dist/Toggle/index.js +10 -763
- package/dist/Tooltip/Tooltip.d.ts +6 -2
- package/dist/Tooltip/TooltipContent.d.ts +3 -0
- package/dist/Tooltip/helper.d.ts +1 -1
- package/dist/Tooltip/index.js +21 -1244
- package/dist/Tooltip/styles.d.ts +7 -1
- package/dist/chunk-33BUV2RX.js +10 -0
- package/dist/chunk-33WYJZ4F.js +88 -0
- package/dist/chunk-3BVFLDHI.js +295 -0
- package/dist/chunk-3WPRUUZ6.js +25 -0
- package/dist/chunk-3XTTDT42.js +72 -0
- package/dist/chunk-45MVPPJN.js +10 -0
- package/dist/chunk-4RJGB3WA.js +107 -0
- package/dist/chunk-4VCNNVZ4.js +310 -0
- package/dist/chunk-5BRAW5HK.js +10 -0
- package/dist/chunk-5GR6MFT5.js +70 -0
- package/dist/chunk-5JAYTLFV.js +227 -0
- package/dist/chunk-5KUROAEP.js +39 -0
- package/dist/chunk-5KWSYI7C.js +143 -0
- package/dist/chunk-5W4MJC2K.js +55 -0
- package/dist/chunk-6BHDVSPB.js +226 -0
- package/dist/chunk-6XJS3KMW.js +436 -0
- package/dist/chunk-7L3HCDGD.js +65 -0
- package/dist/chunk-A3BIV2QM.js +26 -0
- package/dist/chunk-APDSEVV6.js +443 -0
- package/dist/chunk-AXYDJGTN.js +18 -0
- package/dist/chunk-BDEBNBW6.js +61 -0
- package/dist/chunk-BSDZWWUS.js +20 -0
- package/dist/chunk-BXDUHMWS.js +57 -0
- package/dist/chunk-C3ZZPIUO.js +54 -0
- package/dist/chunk-CNY7HPMQ.js +191 -0
- package/dist/chunk-CPIFYIT3.js +465 -0
- package/dist/chunk-CV4DIXTB.js +93 -0
- package/dist/chunk-DD72MTCX.js +55 -0
- package/dist/chunk-DGXZP4VJ.js +10 -0
- package/dist/chunk-DSX6YDJM.js +71 -0
- package/dist/chunk-DTRBG524.js +195 -0
- package/dist/chunk-ELIPUM6Q.js +142 -0
- package/dist/chunk-EMDU5OPY.js +236 -0
- package/dist/chunk-EZILJ6TJ.js +133 -0
- package/dist/chunk-F3AL4TQZ.js +186 -0
- package/dist/chunk-F5ENWFJU.js +273 -0
- package/dist/chunk-GGD4BGH2.js +30 -0
- package/dist/chunk-GJZT47MP.js +32 -0
- package/dist/chunk-HH2IP5Z4.js +189 -0
- package/dist/chunk-HKOESPKZ.js +35 -0
- package/dist/chunk-HMOOLCMA.js +401 -0
- package/dist/chunk-HMOTWEQB.js +113 -0
- package/dist/chunk-HX5M3GSJ.js +63 -0
- package/dist/chunk-I6WWABJN.js +27 -0
- package/dist/chunk-IB2FP4DM.js +307 -0
- package/dist/chunk-IUOX444H.js +282 -0
- package/{esm/Select/styles.js → dist/chunk-IWMGNPNV.js} +26 -12
- package/dist/chunk-J4K4LRBI.js +32 -0
- package/dist/chunk-J6KQRS7O.js +226 -0
- package/dist/chunk-JJFOGZ6V.js +22 -0
- package/dist/chunk-JM3DV57W.js +44 -0
- package/dist/chunk-K53ERLS7.js +150 -0
- package/dist/chunk-KBCAV5FR.js +22 -0
- package/dist/chunk-KHB3EKRQ.js +36 -0
- package/dist/chunk-KVIIL2O6.js +192 -0
- package/dist/chunk-KZXX7IEN.js +44 -0
- package/dist/chunk-LDTDMDE6.js +51 -0
- package/dist/chunk-MYAZEMZC.js +134 -0
- package/dist/chunk-NCUSKYUE.js +95 -0
- package/dist/chunk-NDERASK2.js +13 -0
- package/dist/chunk-NRSWR3C4.js +165 -0
- package/dist/chunk-O3RTRCY5.js +64 -0
- package/dist/chunk-OEHIZKSM.js +31 -0
- package/dist/chunk-OFNHKVGZ.js +136 -0
- package/dist/chunk-PGK3BYA2.js +60 -0
- package/dist/chunk-PHKAYQE4.js +42 -0
- package/dist/chunk-PJH7CP77.js +27 -0
- package/dist/chunk-QMV4ULSR.js +124 -0
- package/dist/chunk-QUMM6MGX.js +10 -0
- package/dist/chunk-RF5ZQ37O.js +66 -0
- package/dist/chunk-RSHEENJP.js +156 -0
- package/dist/chunk-RZBEZ26A.js +38 -0
- package/dist/chunk-S62PPQHN.js +208 -0
- package/dist/chunk-TF3CTLKX.js +42 -0
- package/dist/chunk-TFZ2IGNH.js +14 -0
- package/dist/chunk-TUWG4TLU.js +97 -0
- package/dist/chunk-TXG6TBSG.js +91 -0
- package/dist/chunk-U2NJJS3T.js +88 -0
- package/dist/chunk-UEWD6OUC.js +137 -0
- package/dist/chunk-UF4IKEU2.js +17 -0
- package/dist/chunk-UVCSH6DW.js +16 -0
- package/dist/chunk-UX2B3G6U.js +106 -0
- package/dist/chunk-V57PNXMD.js +14 -0
- package/dist/chunk-VCTKX4AS.js +247 -0
- package/dist/chunk-W4T2KO5B.js +129 -0
- package/dist/chunk-XSXJO2KP.js +29 -0
- package/dist/chunk-XXMCR322.js +199 -0
- package/dist/chunk-Y6X5SEN7.js +232 -0
- package/dist/chunk-YDYRM2KN.js +25 -0
- package/dist/chunk-YFQOB5OC.js +204 -0
- package/dist/chunk-YHEIC6EK.js +102 -0
- package/dist/chunk-YS5PWRS7.js +288 -0
- package/dist/chunk-ZNNLYTW5.js +64 -0
- package/dist/chunk-ZQ25CQCG.js +153 -0
- package/dist/chunk-ZRORQ2WH.js +14 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +325 -10217
- package/dist/use-all-themes/index.js +5 -321
- package/dist/use-body-scroll/index.js +3 -153
- package/dist/use-body-scroll/use-body-scroll.d.ts +1 -1
- package/dist/use-classes/index.d.ts +1 -0
- package/dist/use-classes/index.js +3 -42
- package/dist/use-classes/use-classes.d.ts +1 -0
- package/dist/use-click-away/index.js +3 -23
- package/dist/use-clipboard/index.js +7 -155
- package/dist/use-current-state/index.js +3 -73
- package/dist/use-input/index.js +5 -109
- package/dist/use-keyboard/helper.d.ts +1 -1
- package/dist/use-keyboard/index.js +5 -194
- package/dist/use-media-query/index.js +7 -458
- package/dist/use-media-query/use-media-query.d.ts +2 -4
- package/dist/use-modal/index.js +5 -94
- package/dist/use-scale/index.js +8 -587
- package/dist/use-tabs/index.js +5 -93
- package/dist/use-theme/index.js +6 -319
- package/dist/use-toasts/helpers.d.ts +2 -4
- package/dist/use-toasts/index.js +5 -204
- package/dist/utils/collections.d.ts +1 -1
- package/dist/utils/log-warning.d.ts +2 -0
- package/dist/utils/prop-types.d.ts +8 -17
- package/dist/utils/types.d.ts +3 -1
- package/dist/utils/use-bolio-ui-context.d.ts +3 -3
- package/dist/utils/use-default-props.d.ts +2 -1
- package/dist/utils/use-drag.d.ts +1 -1
- package/dist/utils/use-latest.d.ts +3 -0
- package/dist/utils/use-previous.d.ts +1 -1
- package/dist/utils/variant-colors.d.ts +11 -0
- package/esm/Avatar/Avatar.d.ts +3 -2
- package/esm/Avatar/AvatarGroup.d.ts +2 -1
- package/esm/Avatar/index.js +13 -4
- package/esm/Badge/Badge.d.ts +11 -2
- package/esm/Badge/BadgeAnchor.d.ts +3 -3
- package/esm/Badge/index.js +14 -4
- package/esm/BolioUIProvider/index.js +26 -2
- package/esm/Breadcrumbs/Breadcrumbs.d.ts +3 -2
- package/esm/Breadcrumbs/BreadcrumbsItem.d.ts +3 -2
- package/esm/Breadcrumbs/BreadcrumbsSeparator.d.ts +2 -1
- package/esm/Breadcrumbs/index.js +15 -6
- package/esm/Button/Button.d.ts +2 -1
- package/esm/Button/ButtonIcon.d.ts +2 -1
- package/esm/Button/index.js +18 -2
- package/esm/Button/styles.d.ts +2 -0
- package/esm/ButtonDropdown/ButtonDropdown.d.ts +3 -2
- package/esm/ButtonDropdown/ButtonDropdownItem.d.ts +2 -1
- package/esm/ButtonDropdown/index.js +16 -4
- package/esm/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/esm/ButtonGroup/index.js +14 -2
- package/esm/Calendar/index.js +13 -2
- package/esm/Capacity/Capacity.d.ts +3 -2
- package/esm/Capacity/index.js +14 -2
- package/esm/Card/Card.d.ts +6 -2
- package/esm/Card/CardContent.d.ts +2 -1
- package/esm/Card/CardFooter.d.ts +2 -1
- package/esm/Card/index.js +17 -8
- package/esm/Card/styles.d.ts +7 -1
- package/esm/Checkbox/Checkbox.d.ts +3 -2
- package/esm/Checkbox/CheckboxGroup.d.ts +2 -1
- package/esm/Checkbox/CheckboxIcon.d.ts +1 -2
- package/esm/Checkbox/index.js +14 -4
- package/esm/Checkbox/styles.d.ts +1 -5
- package/esm/Code/Code.d.ts +6 -2
- package/esm/Code/index.js +13 -2
- package/esm/Col/Col.d.ts +3 -2
- package/esm/Col/index.js +7 -2
- package/esm/Collapse/Collapse.d.ts +3 -2
- package/esm/Collapse/CollapseGroup.d.ts +3 -2
- package/esm/Collapse/index.js +18 -4
- package/esm/Combobox/index.js +13 -2
- package/esm/Container/Container.d.ts +1 -1
- package/esm/Container/index.js +11 -2
- package/esm/CssBaseline/CssBaseline.d.ts +1 -1
- package/esm/CssBaseline/index.js +10 -1
- package/esm/DatePicker/index.js +16 -2
- package/esm/Description/Description.d.ts +3 -2
- package/esm/Description/index.js +13 -2
- package/esm/Display/Display.d.ts +3 -2
- package/esm/Display/index.js +13 -2
- package/esm/Divider/Divider.d.ts +3 -2
- package/esm/Divider/index.js +13 -2
- package/esm/Dot/Dot.d.ts +3 -2
- package/esm/Dot/index.js +13 -2
- package/esm/Drawer/Drawer.d.ts +1 -1
- package/esm/Drawer/DrawerWrapper.d.ts +1 -1
- package/esm/Drawer/helper.d.ts +1 -3
- package/esm/Drawer/index.js +21 -8
- package/esm/Fieldset/Fieldset.d.ts +3 -2
- package/esm/Fieldset/FieldsetContent.d.ts +3 -2
- package/esm/Fieldset/FieldsetFooter.d.ts +3 -2
- package/esm/Fieldset/FieldsetGroup.d.ts +3 -2
- package/esm/Fieldset/index.js +16 -13
- package/esm/Grid/BasicItem.d.ts +3 -2
- package/esm/Grid/Grid.d.ts +107 -105
- package/esm/Grid/GridContainer.d.ts +107 -105
- package/esm/Grid/GridTypes.d.ts +5 -11
- package/esm/Grid/index.js +13 -4
- package/esm/Image/Image.d.ts +3 -2
- package/esm/Image/ImageBrowser.d.ts +4 -3
- package/esm/Image/index.js +15 -4
- package/esm/Input/Input.d.ts +3 -2
- package/esm/Input/InputBlockLabel.d.ts +3 -1
- package/esm/Input/InputProps.d.ts +1 -2
- package/esm/Input/Password.d.ts +3 -2
- package/esm/Input/index.js +17 -6
- package/esm/Keyboard/Keyboard.d.ts +3 -2
- package/esm/Keyboard/index.js +12 -2
- package/esm/Link/Link.d.ts +3 -2
- package/esm/Link/index.js +14 -2
- package/esm/Loading/Loading.d.ts +3 -2
- package/esm/Loading/index.js +13 -2
- package/esm/MdxWidgets/index.js +51 -2
- package/esm/Menu/Menu.d.ts +20 -0
- package/esm/Menu/MenuContext.d.ts +15 -0
- package/esm/Menu/MenuItem.d.ts +57 -0
- package/esm/Menu/MenuList.d.ts +12 -0
- package/esm/Menu/MenuSub.d.ts +12 -0
- package/esm/Menu/index.d.ts +17 -0
- package/esm/Menu/index.js +24 -0
- package/esm/Modal/Modal.d.ts +3 -2
- package/esm/Modal/ModalAction.d.ts +1 -1
- package/esm/Modal/ModalActions.d.ts +1 -1
- package/esm/Modal/ModalContent.d.ts +1 -1
- package/esm/Modal/ModalSubtitle.d.ts +1 -1
- package/esm/Modal/ModalTitle.d.ts +3 -2
- package/esm/Modal/ModalWrapper.d.ts +1 -1
- package/esm/Modal/index.js +27 -10
- package/esm/Next/index.js +24 -3
- package/esm/Note/Note.d.ts +6 -3
- package/esm/Note/index.js +14 -2
- package/esm/NumberInput/NumberInput.d.ts +24 -0
- package/esm/NumberInput/index.d.ts +3 -0
- package/esm/NumberInput/index.js +16 -0
- package/esm/Page/Page.d.ts +4 -4
- package/esm/Page/PageContent.d.ts +3 -2
- package/esm/Page/PageFooter.d.ts +3 -2
- package/esm/Page/PageHeader.d.ts +3 -2
- package/esm/Page/index.js +13 -9
- package/esm/Pagination/Pagination.d.ts +3 -2
- package/esm/Pagination/PaginationContext.d.ts +1 -3
- package/esm/Pagination/PaginationItem.d.ts +2 -1
- package/esm/Pagination/PaginationNext.d.ts +2 -1
- package/esm/Pagination/PaginationPrevious.d.ts +2 -1
- package/esm/Pagination/index.js +16 -6
- package/esm/Popover/Popover.d.ts +1 -1
- package/esm/Popover/PopoverItem.d.ts +3 -2
- package/esm/Popover/index.js +23 -5
- package/esm/Progress/Progress.d.ts +3 -2
- package/esm/Progress/index.js +14 -2
- package/esm/Radio/Radio.d.ts +3 -2
- package/esm/Radio/RadioDescription.d.ts +3 -2
- package/esm/Radio/RadioGroup.d.ts +3 -2
- package/esm/Radio/index.js +14 -7
- package/esm/Rating/Rating.d.ts +5 -6
- package/esm/Rating/index.js +13 -2
- package/esm/Row/Row.d.ts +1 -1
- package/esm/Row/index.js +11 -2
- package/esm/Section/Section.d.ts +1 -1
- package/esm/Section/index.js +13 -2
- package/esm/Select/Select.d.ts +3 -2
- package/esm/Select/SelectDropdown.d.ts +3 -2
- package/esm/Select/SelectOption.d.ts +3 -2
- package/esm/Select/index.js +24 -4
- package/esm/Shared/backdrop.d.ts +1 -15
- package/esm/Shared/css-transition.d.ts +3 -17
- package/esm/Shared/expand.d.ts +1 -9
- package/esm/Shared/highlight.d.ts +2 -1
- package/esm/Skeleton/Skeleton.d.ts +13 -0
- package/esm/Skeleton/index.d.ts +3 -0
- package/esm/Skeleton/index.js +14 -0
- package/esm/Slider/Slider.d.ts +3 -2
- package/esm/Slider/SliderDot.d.ts +3 -2
- package/esm/Slider/index.js +16 -2
- package/esm/Snippet/Snippet.d.ts +6 -2
- package/esm/Snippet/index.js +20 -2
- package/esm/Snippet/styles.d.ts +7 -1
- package/esm/Spacer/index.js +12 -2
- package/esm/Spinner/Spinner.d.ts +3 -2
- package/esm/Spinner/index.js +13 -2
- package/esm/Stepper/Stepper.d.ts +14 -0
- package/esm/Stepper/StepperContext.d.ts +10 -0
- package/esm/Stepper/StepperStep.d.ts +13 -0
- package/esm/Stepper/index.d.ts +9 -0
- package/esm/Stepper/index.js +14 -0
- package/esm/Table/Table.d.ts +4 -3
- package/esm/Table/TableBody.d.ts +3 -10
- package/esm/Table/TableCell.d.ts +2 -1
- package/esm/Table/TableColumn.d.ts +0 -4
- package/esm/Table/TableContext.d.ts +1 -1
- package/esm/Table/TableHead.d.ts +2 -4
- package/esm/Table/TableTypes.d.ts +2 -1
- package/esm/Table/index.js +17 -2
- package/esm/Tabs/Tabs.d.ts +1 -1
- package/esm/Tabs/TabsContext.d.ts +7 -2
- package/esm/Tabs/TabsItem.d.ts +5 -2
- package/esm/Tabs/index.js +14 -5
- package/esm/Tag/Tag.d.ts +5 -2
- package/esm/Tag/index.js +13 -2
- package/esm/Text/Child.d.ts +3 -2
- package/esm/Text/Text.d.ts +4 -3
- package/esm/Text/index.js +12 -2
- package/esm/Textarea/Textarea.d.ts +4 -4
- package/esm/Textarea/index.js +14 -2
- package/esm/Themes/index.js +7 -2
- package/esm/Toggle/Toggle.d.ts +3 -2
- package/esm/Toggle/index.js +13 -2
- package/esm/Tooltip/Tooltip.d.ts +6 -2
- package/esm/Tooltip/TooltipContent.d.ts +3 -0
- package/esm/Tooltip/helper.d.ts +1 -1
- package/esm/Tooltip/index.js +21 -2
- package/esm/Tooltip/styles.d.ts +7 -1
- package/esm/chunk-33BUV2RX.js +10 -0
- package/esm/chunk-33WYJZ4F.js +88 -0
- package/esm/chunk-3BVFLDHI.js +295 -0
- package/esm/chunk-3WPRUUZ6.js +25 -0
- package/esm/chunk-3XTTDT42.js +72 -0
- package/esm/chunk-45MVPPJN.js +10 -0
- package/esm/chunk-4RJGB3WA.js +107 -0
- package/esm/chunk-4VCNNVZ4.js +310 -0
- package/esm/chunk-5BRAW5HK.js +10 -0
- package/esm/chunk-5GR6MFT5.js +70 -0
- package/esm/chunk-5JAYTLFV.js +227 -0
- package/esm/chunk-5KUROAEP.js +39 -0
- package/esm/chunk-5KWSYI7C.js +143 -0
- package/esm/chunk-5W4MJC2K.js +55 -0
- package/esm/chunk-6BHDVSPB.js +226 -0
- package/esm/chunk-6XJS3KMW.js +436 -0
- package/esm/chunk-7L3HCDGD.js +65 -0
- package/esm/chunk-A3BIV2QM.js +26 -0
- package/esm/chunk-APDSEVV6.js +443 -0
- package/esm/chunk-AXYDJGTN.js +18 -0
- package/esm/chunk-BDEBNBW6.js +61 -0
- package/esm/chunk-BSDZWWUS.js +20 -0
- package/esm/chunk-BXDUHMWS.js +57 -0
- package/esm/chunk-C3ZZPIUO.js +54 -0
- package/esm/chunk-CNY7HPMQ.js +191 -0
- package/esm/chunk-CPIFYIT3.js +465 -0
- package/esm/chunk-CV4DIXTB.js +93 -0
- package/esm/chunk-DD72MTCX.js +55 -0
- package/esm/chunk-DGXZP4VJ.js +10 -0
- package/esm/chunk-DSX6YDJM.js +71 -0
- package/esm/chunk-DTRBG524.js +195 -0
- package/esm/chunk-ELIPUM6Q.js +142 -0
- package/esm/chunk-EMDU5OPY.js +236 -0
- package/esm/chunk-EZILJ6TJ.js +133 -0
- package/esm/chunk-F3AL4TQZ.js +186 -0
- package/esm/chunk-F5ENWFJU.js +273 -0
- package/esm/chunk-GGD4BGH2.js +30 -0
- package/esm/chunk-GJZT47MP.js +32 -0
- package/esm/chunk-HH2IP5Z4.js +189 -0
- package/esm/chunk-HKOESPKZ.js +35 -0
- package/esm/chunk-HMOOLCMA.js +401 -0
- package/esm/chunk-HMOTWEQB.js +113 -0
- package/esm/chunk-HX5M3GSJ.js +63 -0
- package/esm/chunk-I6WWABJN.js +27 -0
- package/esm/chunk-IB2FP4DM.js +307 -0
- package/esm/chunk-IUOX444H.js +282 -0
- package/esm/{Input/styles.js → chunk-IWMGNPNV.js} +26 -19
- package/esm/chunk-J4K4LRBI.js +32 -0
- package/esm/chunk-J6KQRS7O.js +226 -0
- package/esm/chunk-JJFOGZ6V.js +22 -0
- package/esm/chunk-JM3DV57W.js +44 -0
- package/esm/chunk-K53ERLS7.js +150 -0
- package/esm/chunk-KBCAV5FR.js +22 -0
- package/esm/chunk-KHB3EKRQ.js +36 -0
- package/esm/chunk-KVIIL2O6.js +192 -0
- package/esm/chunk-KZXX7IEN.js +44 -0
- package/esm/chunk-LDTDMDE6.js +51 -0
- package/esm/chunk-MYAZEMZC.js +134 -0
- package/esm/chunk-NCUSKYUE.js +95 -0
- package/esm/chunk-NDERASK2.js +13 -0
- package/esm/chunk-NRSWR3C4.js +165 -0
- package/esm/chunk-O3RTRCY5.js +64 -0
- package/esm/chunk-OEHIZKSM.js +31 -0
- package/esm/chunk-OFNHKVGZ.js +136 -0
- package/esm/chunk-PGK3BYA2.js +60 -0
- package/esm/chunk-PHKAYQE4.js +42 -0
- package/esm/chunk-PJH7CP77.js +27 -0
- package/esm/chunk-QMV4ULSR.js +124 -0
- package/esm/chunk-QUMM6MGX.js +10 -0
- package/esm/chunk-RF5ZQ37O.js +66 -0
- package/esm/chunk-RSHEENJP.js +156 -0
- package/esm/chunk-RZBEZ26A.js +38 -0
- package/esm/chunk-S62PPQHN.js +208 -0
- package/esm/chunk-TF3CTLKX.js +42 -0
- package/esm/chunk-TFZ2IGNH.js +14 -0
- package/esm/chunk-TUWG4TLU.js +97 -0
- package/esm/chunk-TXG6TBSG.js +91 -0
- package/esm/chunk-U2NJJS3T.js +88 -0
- package/esm/chunk-UEWD6OUC.js +137 -0
- package/esm/chunk-UF4IKEU2.js +17 -0
- package/esm/chunk-UVCSH6DW.js +16 -0
- package/esm/chunk-UX2B3G6U.js +106 -0
- package/esm/chunk-V57PNXMD.js +14 -0
- package/esm/chunk-VCTKX4AS.js +247 -0
- package/esm/chunk-W4T2KO5B.js +129 -0
- package/esm/chunk-XSXJO2KP.js +29 -0
- package/esm/chunk-XXMCR322.js +199 -0
- package/esm/chunk-Y6X5SEN7.js +232 -0
- package/esm/chunk-YDYRM2KN.js +25 -0
- package/esm/chunk-YFQOB5OC.js +204 -0
- package/esm/chunk-YHEIC6EK.js +102 -0
- package/esm/chunk-YS5PWRS7.js +288 -0
- package/esm/chunk-ZNNLYTW5.js +64 -0
- package/esm/chunk-ZQ25CQCG.js +153 -0
- package/esm/chunk-ZRORQ2WH.js +14 -0
- package/esm/index.d.ts +8 -0
- package/esm/index.js +325 -74
- package/esm/use-all-themes/index.js +8 -2
- package/esm/use-body-scroll/index.js +6 -2
- package/esm/use-body-scroll/use-body-scroll.d.ts +1 -1
- package/esm/use-classes/index.d.ts +1 -0
- package/esm/use-classes/index.js +8 -2
- package/esm/use-classes/use-classes.d.ts +1 -0
- package/esm/use-click-away/index.js +6 -2
- package/esm/use-clipboard/index.js +10 -2
- package/esm/use-current-state/index.js +6 -2
- package/esm/use-input/index.js +8 -2
- package/esm/use-keyboard/helper.d.ts +1 -1
- package/esm/use-keyboard/index.js +12 -4
- package/esm/use-media-query/index.js +10 -2
- package/esm/use-media-query/use-media-query.d.ts +2 -4
- package/esm/use-modal/index.js +8 -2
- package/esm/use-scale/index.js +23 -6
- package/esm/use-tabs/index.js +8 -2
- package/esm/use-theme/index.js +9 -2
- package/esm/use-toasts/helpers.d.ts +2 -4
- package/esm/use-toasts/index.js +8 -2
- package/esm/utils/collections.d.ts +1 -1
- package/esm/utils/log-warning.d.ts +2 -0
- package/esm/utils/prop-types.d.ts +8 -17
- package/esm/utils/types.d.ts +3 -1
- package/esm/utils/use-bolio-ui-context.d.ts +3 -3
- package/esm/utils/use-default-props.d.ts +2 -1
- package/esm/utils/use-drag.d.ts +1 -1
- package/esm/utils/use-latest.d.ts +3 -0
- package/esm/utils/use-previous.d.ts +1 -1
- package/esm/utils/variant-colors.d.ts +11 -0
- package/package.json +43 -52
- package/dist/utils/use-warning.d.ts +0 -2
- package/esm/Avatar/Avatar.js +0 -91
- package/esm/Avatar/AvatarGroup.js +0 -25
- package/esm/Avatar/AvatarSkeleton.js +0 -20
- package/esm/Avatar/helpers.js +0 -14
- package/esm/Badge/Badge.js +0 -54
- package/esm/Badge/BadgeAnchor.js +0 -64
- package/esm/BolioUIProvider/BolioUIProvider.js +0 -53
- package/esm/BolioUIProvider/ThemeProvider.js +0 -43
- package/esm/Breadcrumbs/Breadcrumbs.js +0 -42
- package/esm/Breadcrumbs/BreadcrumbsItem.js +0 -43
- package/esm/Breadcrumbs/BreadcrumbsSeparator.js +0 -21
- package/esm/Button/Button.js +0 -131
- package/esm/Button/ButtonDrip.js +0 -55
- package/esm/Button/ButtonIcon.js +0 -26
- package/esm/Button/ButtonLoading.js +0 -15
- package/esm/Button/styles.js +0 -232
- package/esm/Button/utils.js +0 -45
- package/esm/ButtonDropdown/ButtonDropdown.js +0 -107
- package/esm/ButtonDropdown/ButtonDropdownContext.js +0 -11
- package/esm/ButtonDropdown/ButtonDropdownItem.js +0 -45
- package/esm/ButtonDropdown/Icon.js +0 -28
- package/esm/ButtonDropdown/styles.js +0 -71
- package/esm/ButtonGroup/ButtonGroup.js +0 -80
- package/esm/ButtonGroup/ButtonGroupContext.js +0 -9
- package/esm/Calendar/Calendar.js +0 -243
- package/esm/Calendar/date-utils.js +0 -39
- package/esm/Capacity/Capacity.js +0 -47
- package/esm/Card/Card.js +0 -66
- package/esm/Card/CardContent.js +0 -24
- package/esm/Card/CardFooter.js +0 -31
- package/esm/Card/styles.js +0 -54
- package/esm/Checkbox/Checkbox.js +0 -102
- package/esm/Checkbox/CheckboxContext.js +0 -10
- package/esm/Checkbox/CheckboxGroup.js +0 -62
- package/esm/Checkbox/CheckboxIcon.js +0 -63
- package/esm/Checkbox/styles.js +0 -34
- package/esm/Code/Code.js +0 -54
- package/esm/Col/Col.js +0 -28
- package/esm/Collapse/Collapse.js +0 -92
- package/esm/Collapse/CollapseContext.js +0 -8
- package/esm/Collapse/CollapseGroup.js +0 -65
- package/esm/Collapse/CollapseIcon.js +0 -26
- package/esm/Combobox/Combobox.js +0 -199
- package/esm/Container/Container.js +0 -62
- package/esm/CssBaseline/CssBaseline.js +0 -12
- package/esm/DatePicker/DatePicker.js +0 -163
- package/esm/Description/Description.js +0 -36
- package/esm/Display/Display.js +0 -40
- package/esm/Divider/Divider.js +0 -60
- package/esm/Dot/Dot.js +0 -51
- package/esm/Drawer/Drawer.js +0 -69
- package/esm/Drawer/DrawerWrapper.js +0 -82
- package/esm/Drawer/helper.js +0 -27
- package/esm/Fieldset/Fieldset.js +0 -84
- package/esm/Fieldset/FieldsetContent.js +0 -25
- package/esm/Fieldset/FieldsetContext.js +0 -9
- package/esm/Fieldset/FieldsetFooter.js +0 -25
- package/esm/Fieldset/FieldsetGroup.js +0 -77
- package/esm/Fieldset/FieldsetSubtitle.js +0 -18
- package/esm/Fieldset/FieldsetTitle.js +0 -20
- package/esm/Grid/BasicItem.js +0 -95
- package/esm/Grid/Grid.js +0 -34
- package/esm/Grid/GridContainer.js +0 -43
- package/esm/Grid/GridTypes.js +0 -6
- package/esm/Image/Image.js +0 -83
- package/esm/Image/ImageBrowser.js +0 -80
- package/esm/Image/ImageBrowserHttpsIcon.js +0 -21
- package/esm/Image/ImageSkeleton.js +0 -20
- package/esm/Image/helpers.js +0 -14
- package/esm/Image/styles.js +0 -15
- package/esm/Input/Input.js +0 -165
- package/esm/Input/InputBlockLabel.js +0 -17
- package/esm/Input/InputIcon.js +0 -17
- package/esm/Input/InputIconClear.js +0 -43
- package/esm/Input/InputLabel.js +0 -16
- package/esm/Input/InputProps.js +0 -13
- package/esm/Input/Password.js +0 -57
- package/esm/Input/PasswordIcon.js +0 -28
- package/esm/Keyboard/Keyboard.js +0 -45
- package/esm/Link/Icon.js +0 -30
- package/esm/Link/Link.js +0 -47
- package/esm/Loading/Loading.js +0 -60
- package/esm/MdxWidgets/MockPage.js +0 -31
- package/esm/MdxWidgets/ParsedCodes/WaitTime.js +0 -11
- package/esm/MdxWidgets/ParsedCodes/index.js +0 -1
- package/esm/Modal/Modal.js +0 -109
- package/esm/Modal/ModalAction.js +0 -67
- package/esm/Modal/ModalActions.js +0 -34
- package/esm/Modal/ModalContent.js +0 -24
- package/esm/Modal/ModalContext.js +0 -6
- package/esm/Modal/ModalSubtitle.js +0 -30
- package/esm/Modal/ModalTitle.js +0 -30
- package/esm/Modal/ModalWrapper.js +0 -76
- package/esm/Next/StyledJsxRegistry.js +0 -26
- package/esm/Note/Note.js +0 -67
- package/esm/Page/Page.js +0 -80
- package/esm/Page/PageContent.js +0 -22
- package/esm/Page/PageFooter.js +0 -21
- package/esm/Page/PageHeader.js +0 -29
- package/esm/Pagination/Pagination.js +0 -99
- package/esm/Pagination/PaginationContext.js +0 -8
- package/esm/Pagination/PaginationEllipsis.js +0 -69
- package/esm/Pagination/PaginationItem.js +0 -44
- package/esm/Pagination/PaginationNext.js +0 -21
- package/esm/Pagination/PaginationPages.js +0 -84
- package/esm/Pagination/PaginationPrevious.js +0 -21
- package/esm/Popover/Popover.js +0 -96
- package/esm/Popover/PopoverContext.js +0 -9
- package/esm/Popover/PopoverItem.js +0 -55
- package/esm/Progress/Progress.js +0 -71
- package/esm/Radio/Radio.js +0 -108
- package/esm/Radio/RadioContext.js +0 -9
- package/esm/Radio/RadioDescription.js +0 -25
- package/esm/Radio/RadioGroup.js +0 -55
- package/esm/Radio/styles.js +0 -41
- package/esm/Rating/Rating.js +0 -104
- package/esm/Rating/RatingIcon.js +0 -18
- package/esm/Row/Row.js +0 -60
- package/esm/Section/Section.js +0 -28
- package/esm/Select/Select.js +0 -223
- package/esm/Select/SelectContext.js +0 -9
- package/esm/Select/SelectDropdown.js +0 -39
- package/esm/Select/SelectIcon.js +0 -21
- package/esm/Select/SelectIconClear.js +0 -37
- package/esm/Select/SelectInput.js +0 -37
- package/esm/Select/SelectMultipleValue.js +0 -21
- package/esm/Select/SelectOption.js +0 -88
- package/esm/Shared/backdrop.js +0 -70
- package/esm/Shared/css-transition.js +0 -66
- package/esm/Shared/dropdown.js +0 -97
- package/esm/Shared/ellipsis.js +0 -13
- package/esm/Shared/expand.js +0 -87
- package/esm/Shared/highlight.js +0 -44
- package/esm/Slider/Slider.js +0 -178
- package/esm/Slider/SliderDot.js +0 -32
- package/esm/Slider/SliderMark.js +0 -35
- package/esm/Slider/styles.js +0 -27
- package/esm/Snippet/Snippet.js +0 -94
- package/esm/Snippet/SnippetIcon.js +0 -25
- package/esm/Snippet/styles.js +0 -58
- package/esm/Spacer/Spacer.js +0 -26
- package/esm/Spinner/Spinner.js +0 -43
- package/esm/Table/Table.js +0 -112
- package/esm/Table/TableBody.js +0 -49
- package/esm/Table/TableCell.js +0 -25
- package/esm/Table/TableColumn.js +0 -35
- package/esm/Table/TableContext.js +0 -9
- package/esm/Table/TableHead.js +0 -55
- package/esm/Table/TableTypes.js +0 -1
- package/esm/Tabs/Tabs.js +0 -140
- package/esm/Tabs/TabsContext.js +0 -8
- package/esm/Tabs/TabsItem.js +0 -89
- package/esm/Tag/Tag.js +0 -79
- package/esm/Text/Child.js +0 -74
- package/esm/Text/Text.js +0 -91
- package/esm/Textarea/Textarea.js +0 -100
- package/esm/Themes/Presets/Dark.js +0 -67
- package/esm/Themes/Presets/Default.js +0 -67
- package/esm/Themes/Presets/Shared.js +0 -42
- package/esm/Themes/Presets/index.js +0 -1
- package/esm/Themes/Themes.js +0 -76
- package/esm/Toggle/Toggle.js +0 -80
- package/esm/Toggle/styles.js +0 -27
- package/esm/Tooltip/Tooltip.js +0 -136
- package/esm/Tooltip/TooltipContent.js +0 -77
- package/esm/Tooltip/TooltipIcon.js +0 -28
- package/esm/Tooltip/helper.js +0 -21
- package/esm/Tooltip/placement.js +0 -160
- package/esm/Tooltip/styles.js +0 -18
- package/esm/use-all-themes/all-themes-context.js +0 -9
- package/esm/use-body-scroll/use-body-scroll.js +0 -60
- package/esm/use-classes/use-classes.js +0 -32
- package/esm/use-click-away/use-click-away.js +0 -19
- package/esm/use-clipboard/use-clipboard.js +0 -39
- package/esm/use-current-state/use-current-state.js +0 -21
- package/esm/use-input/use-input.js +0 -29
- package/esm/use-keyboard/codes.js +0 -95
- package/esm/use-keyboard/helper.js +0 -26
- package/esm/use-keyboard/use-keyboard.js +0 -68
- package/esm/use-media-query/use-media-query.js +0 -79
- package/esm/use-modal/use-modal.js +0 -22
- package/esm/use-scale/scale-context.js +0 -35
- package/esm/use-scale/utils.js +0 -49
- package/esm/use-scale/with-scale.js +0 -105
- package/esm/use-tabs/use-tabs.js +0 -21
- package/esm/use-theme/theme-context.js +0 -7
- package/esm/use-toasts/helpers.js +0 -70
- package/esm/use-toasts/toast-container.js +0 -118
- package/esm/use-toasts/toast-item.js +0 -45
- package/esm/use-toasts/use-toast.js +0 -101
- package/esm/utils/calculations.js +0 -27
- package/esm/utils/collections.js +0 -126
- package/esm/utils/color.js +0 -35
- package/esm/utils/layouts.js +0 -71
- package/esm/utils/prop-types.js +0 -20
- package/esm/utils/types.js +0 -1
- package/esm/utils/use-body-scroll.js +0 -2
- package/esm/utils/use-bolio-ui-context.js +0 -27
- package/esm/utils/use-click-anywhere.js +0 -13
- package/esm/utils/use-click-away.js +0 -2
- package/esm/utils/use-clipboard.js +0 -2
- package/esm/utils/use-context-state/create-bolio-ui-context.js +0 -49
- package/esm/utils/use-context-state/use-context-state.js +0 -38
- package/esm/utils/use-current-state.js +0 -2
- package/esm/utils/use-default-props.js +0 -17
- package/esm/utils/use-dom-observer.js +0 -24
- package/esm/utils/use-drag.js +0 -64
- package/esm/utils/use-portal.js +0 -32
- package/esm/utils/use-previous.js +0 -9
- package/esm/utils/use-real-shape.js +0 -45
- package/esm/utils/use-resize.js +0 -17
- package/esm/utils/use-ssr.js +0 -17
- package/esm/utils/use-warning.d.ts +0 -2
- package/esm/utils/use-warning.js +0 -13
package/dist/Button/index.js
CHANGED
|
@@ -1,1243 +1,19 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (Array.isArray(r)) return r;
|
|
21
|
-
}
|
|
22
|
-
function _createForOfIteratorHelper(r, e) {
|
|
23
|
-
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
24
|
-
if (!t) {
|
|
25
|
-
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
26
|
-
t && (r = t);
|
|
27
|
-
var n = 0,
|
|
28
|
-
F = function () {};
|
|
29
|
-
return {
|
|
30
|
-
s: F,
|
|
31
|
-
n: function () {
|
|
32
|
-
return n >= r.length ? {
|
|
33
|
-
done: !0
|
|
34
|
-
} : {
|
|
35
|
-
done: !1,
|
|
36
|
-
value: r[n++]
|
|
37
|
-
};
|
|
38
|
-
},
|
|
39
|
-
e: function (r) {
|
|
40
|
-
throw r;
|
|
41
|
-
},
|
|
42
|
-
f: F
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
46
|
-
}
|
|
47
|
-
var o,
|
|
48
|
-
a = !0,
|
|
49
|
-
u = !1;
|
|
50
|
-
return {
|
|
51
|
-
s: function () {
|
|
52
|
-
t = t.call(r);
|
|
53
|
-
},
|
|
54
|
-
n: function () {
|
|
55
|
-
var r = t.next();
|
|
56
|
-
return a = r.done, r;
|
|
57
|
-
},
|
|
58
|
-
e: function (r) {
|
|
59
|
-
u = !0, o = r;
|
|
60
|
-
},
|
|
61
|
-
f: function () {
|
|
62
|
-
try {
|
|
63
|
-
a || null == t.return || t.return();
|
|
64
|
-
} finally {
|
|
65
|
-
if (u) throw o;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
function _defineProperty(e, r, t) {
|
|
71
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
72
|
-
value: t,
|
|
73
|
-
enumerable: !0,
|
|
74
|
-
configurable: !0,
|
|
75
|
-
writable: !0
|
|
76
|
-
}) : e[r] = t, e;
|
|
77
|
-
}
|
|
78
|
-
function _extends() {
|
|
79
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
80
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
81
|
-
var t = arguments[e];
|
|
82
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
83
|
-
}
|
|
84
|
-
return n;
|
|
85
|
-
}, _extends.apply(null, arguments);
|
|
86
|
-
}
|
|
87
|
-
function _iterableToArrayLimit(r, l) {
|
|
88
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
89
|
-
if (null != t) {
|
|
90
|
-
var e,
|
|
91
|
-
n,
|
|
92
|
-
i,
|
|
93
|
-
u,
|
|
94
|
-
a = [],
|
|
95
|
-
f = !0,
|
|
96
|
-
o = !1;
|
|
97
|
-
try {
|
|
98
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
99
|
-
if (Object(t) !== t) return;
|
|
100
|
-
f = !1;
|
|
101
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
102
|
-
} catch (r) {
|
|
103
|
-
o = !0, n = r;
|
|
104
|
-
} finally {
|
|
105
|
-
try {
|
|
106
|
-
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
107
|
-
} finally {
|
|
108
|
-
if (o) throw n;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
return a;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
function _nonIterableRest() {
|
|
115
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
116
|
-
}
|
|
117
|
-
function ownKeys(e, r) {
|
|
118
|
-
var t = Object.keys(e);
|
|
119
|
-
if (Object.getOwnPropertySymbols) {
|
|
120
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
121
|
-
r && (o = o.filter(function (r) {
|
|
122
|
-
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
123
|
-
})), t.push.apply(t, o);
|
|
124
|
-
}
|
|
125
|
-
return t;
|
|
126
|
-
}
|
|
127
|
-
function _objectSpread2(e) {
|
|
128
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
129
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
130
|
-
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
131
|
-
_defineProperty(e, r, t[r]);
|
|
132
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
133
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
return e;
|
|
137
|
-
}
|
|
138
|
-
function _objectWithoutProperties(e, t) {
|
|
139
|
-
if (null == e) return {};
|
|
140
|
-
var o,
|
|
141
|
-
r,
|
|
142
|
-
i = _objectWithoutPropertiesLoose(e, t);
|
|
143
|
-
if (Object.getOwnPropertySymbols) {
|
|
144
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
145
|
-
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
146
|
-
}
|
|
147
|
-
return i;
|
|
148
|
-
}
|
|
149
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
150
|
-
if (null == r) return {};
|
|
151
|
-
var t = {};
|
|
152
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
153
|
-
if (-1 !== e.indexOf(n)) continue;
|
|
154
|
-
t[n] = r[n];
|
|
155
|
-
}
|
|
156
|
-
return t;
|
|
157
|
-
}
|
|
158
|
-
function _slicedToArray(r, e) {
|
|
159
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
160
|
-
}
|
|
161
|
-
function _toPrimitive(t, r) {
|
|
162
|
-
if ("object" != typeof t || !t) return t;
|
|
163
|
-
var e = t[Symbol.toPrimitive];
|
|
164
|
-
if (void 0 !== e) {
|
|
165
|
-
var i = e.call(t, r || "default");
|
|
166
|
-
if ("object" != typeof i) return i;
|
|
167
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
168
|
-
}
|
|
169
|
-
return ("string" === r ? String : Number)(t);
|
|
170
|
-
}
|
|
171
|
-
function _toPropertyKey(t) {
|
|
172
|
-
var i = _toPrimitive(t, "string");
|
|
173
|
-
return "symbol" == typeof i ? i : i + "";
|
|
174
|
-
}
|
|
175
|
-
function _typeof(o) {
|
|
176
|
-
"@babel/helpers - typeof";
|
|
177
|
-
|
|
178
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
179
|
-
return typeof o;
|
|
180
|
-
} : function (o) {
|
|
181
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
182
|
-
}, _typeof(o);
|
|
183
|
-
}
|
|
184
|
-
function _unsupportedIterableToArray(r, a) {
|
|
185
|
-
if (r) {
|
|
186
|
-
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
187
|
-
var t = {}.toString.call(r).slice(8, -1);
|
|
188
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
var ScalePropKeys = ['width', 'height', 'padding', 'margin', 'w', 'h', 'paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom', 'pl', 'pr', 'pt', 'pb', 'marginLeft', 'marginRight', 'marginTop', 'marginBottom', 'ml', 'mr', 'mt', 'mb', 'px', 'py', 'mx', 'my', 'font', 'unit', 'scale'];
|
|
193
|
-
var defaultDynamicLayoutPipe = function defaultDynamicLayoutPipe(scale1x) {
|
|
194
|
-
return "".concat(scale1x);
|
|
195
|
-
};
|
|
196
|
-
var defaultContext$1 = {
|
|
197
|
-
getScaleProps: function getScaleProps() {
|
|
198
|
-
return undefined;
|
|
199
|
-
},
|
|
200
|
-
getAllScaleProps: function getAllScaleProps() {
|
|
201
|
-
return {};
|
|
202
|
-
},
|
|
203
|
-
SCALES: {
|
|
204
|
-
pl: defaultDynamicLayoutPipe,
|
|
205
|
-
pr: defaultDynamicLayoutPipe,
|
|
206
|
-
pb: defaultDynamicLayoutPipe,
|
|
207
|
-
pt: defaultDynamicLayoutPipe,
|
|
208
|
-
px: defaultDynamicLayoutPipe,
|
|
209
|
-
py: defaultDynamicLayoutPipe,
|
|
210
|
-
mb: defaultDynamicLayoutPipe,
|
|
211
|
-
ml: defaultDynamicLayoutPipe,
|
|
212
|
-
mr: defaultDynamicLayoutPipe,
|
|
213
|
-
mt: defaultDynamicLayoutPipe,
|
|
214
|
-
mx: defaultDynamicLayoutPipe,
|
|
215
|
-
my: defaultDynamicLayoutPipe,
|
|
216
|
-
width: defaultDynamicLayoutPipe,
|
|
217
|
-
height: defaultDynamicLayoutPipe,
|
|
218
|
-
font: defaultDynamicLayoutPipe
|
|
219
|
-
},
|
|
220
|
-
unit: '16px'
|
|
221
|
-
};
|
|
222
|
-
var ScaleContext = /*#__PURE__*/React__default["default"].createContext(defaultContext$1);
|
|
223
|
-
var useScale$1 = function useScale() {
|
|
224
|
-
return React__default["default"].useContext(ScaleContext);
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
-
var defaultFont = {
|
|
228
|
-
sans: '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',
|
|
229
|
-
mono: 'Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace',
|
|
230
|
-
prism: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,"Liberation Mono", "Courier New", monospace'
|
|
231
|
-
};
|
|
232
|
-
var defaultBreakpoints = {
|
|
233
|
-
xs: {
|
|
234
|
-
min: '0',
|
|
235
|
-
max: '650px'
|
|
236
|
-
},
|
|
237
|
-
sm: {
|
|
238
|
-
min: '650px',
|
|
239
|
-
max: '900px'
|
|
240
|
-
},
|
|
241
|
-
md: {
|
|
242
|
-
min: '900px',
|
|
243
|
-
max: '1280px'
|
|
244
|
-
},
|
|
245
|
-
lg: {
|
|
246
|
-
min: '1280px',
|
|
247
|
-
max: '1920px'
|
|
248
|
-
},
|
|
249
|
-
xl: {
|
|
250
|
-
min: '1920px',
|
|
251
|
-
max: '10000px'
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
var defaultLayout = {
|
|
255
|
-
gap: '16pt',
|
|
256
|
-
gapNegative: '-16pt',
|
|
257
|
-
gapHalf: '8pt',
|
|
258
|
-
gapHalfNegative: '-8pt',
|
|
259
|
-
gapQuarter: '4pt',
|
|
260
|
-
gapQuarterNegative: '-4pt',
|
|
261
|
-
pageMargin: '16pt',
|
|
262
|
-
pageWidth: '900pt',
|
|
263
|
-
pageWidthWithMargin: '930pt',
|
|
264
|
-
breakpointMobile: defaultBreakpoints.xs.max,
|
|
265
|
-
breakpointTablet: defaultBreakpoints.sm.max,
|
|
266
|
-
radius: '10px',
|
|
267
|
-
unit: '16px'
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
var palette$1 = {
|
|
271
|
-
background: '#fff',
|
|
272
|
-
foreground: '#000',
|
|
273
|
-
accents_1: '#fafafa',
|
|
274
|
-
accents_2: '#eaeaea',
|
|
275
|
-
accents_3: '#999',
|
|
276
|
-
accents_4: '#888',
|
|
277
|
-
accents_5: '#666',
|
|
278
|
-
accents_6: '#444',
|
|
279
|
-
accents_7: '#333',
|
|
280
|
-
accents_8: '#111',
|
|
281
|
-
selection: 'rgba(206,228,254, 0.5)',
|
|
282
|
-
code: '#C25FFF',
|
|
283
|
-
border: '#eaeaea',
|
|
284
|
-
primary: '#0072F6',
|
|
285
|
-
primaryLight: '#CEE4FF',
|
|
286
|
-
primaryLighter: '#96C1F3',
|
|
287
|
-
primaryDark: '#00254E',
|
|
288
|
-
secondary: '#7828C9',
|
|
289
|
-
secondaryLight: '#EADCF9',
|
|
290
|
-
secondaryLighter: '#D1B1F1',
|
|
291
|
-
secondaryDark: '#290E45',
|
|
292
|
-
error: '#F31261',
|
|
293
|
-
errorLight: '#FDD8E6',
|
|
294
|
-
errorLighter: '#FAA8C6',
|
|
295
|
-
errorDark: '#4E041F',
|
|
296
|
-
success: '#17C965',
|
|
297
|
-
successLight: '#DAFBE9',
|
|
298
|
-
successLighter: '#ADF5CD',
|
|
299
|
-
successDark: '#06371C',
|
|
300
|
-
warning: '#F5A525',
|
|
301
|
-
warningLight: '#FDEFD9',
|
|
302
|
-
warningLighter: '#FBDBA8',
|
|
303
|
-
warningDark: '#4E3105',
|
|
304
|
-
info: '#06B7DC',
|
|
305
|
-
infoLight: '#D7F8FF',
|
|
306
|
-
infoLighter: '#A5EEFE',
|
|
307
|
-
infoDark: '#053B49',
|
|
308
|
-
purple: '#f81ce5',
|
|
309
|
-
alert: '#ff0080',
|
|
310
|
-
link: '#0070f3',
|
|
311
|
-
pre: '#363450'
|
|
312
|
-
};
|
|
313
|
-
var expressiveness$1 = {
|
|
314
|
-
linkStyle: 'none',
|
|
315
|
-
linkHoverStyle: 'none',
|
|
316
|
-
dropdownBoxShadow: '0 4px 4px 0 rgba(0, 0, 0, 0.02)',
|
|
317
|
-
scrollerStart: 'rgba(255, 255, 255, 1)',
|
|
318
|
-
scrollerEnd: 'rgba(255, 255, 255, 0)',
|
|
319
|
-
shadowSmall: '0 5px 10px rgba(0, 0, 0, 0.12)',
|
|
320
|
-
shadowMedium: '0 8px 30px rgba(0, 0, 0, 0.12)',
|
|
321
|
-
shadowLarge: '0 30px 60px rgba(0, 0, 0, 0.12)',
|
|
322
|
-
portalOpacity: 0.25
|
|
323
|
-
};
|
|
324
|
-
var font$1 = defaultFont;
|
|
325
|
-
var breakpoints$1 = defaultBreakpoints;
|
|
326
|
-
var layout$1 = defaultLayout;
|
|
327
|
-
var themes$1 = {
|
|
328
|
-
type: 'light',
|
|
329
|
-
font: font$1,
|
|
330
|
-
layout: layout$1,
|
|
331
|
-
palette: palette$1,
|
|
332
|
-
breakpoints: breakpoints$1,
|
|
333
|
-
expressiveness: expressiveness$1
|
|
334
|
-
};
|
|
335
|
-
var lightTheme = themes$1;
|
|
336
|
-
|
|
337
|
-
var palette = {
|
|
338
|
-
background: '#000',
|
|
339
|
-
foreground: '#fff',
|
|
340
|
-
accents_1: '#111',
|
|
341
|
-
accents_2: '#333',
|
|
342
|
-
accents_3: '#444',
|
|
343
|
-
accents_4: '#666',
|
|
344
|
-
accents_5: '#888',
|
|
345
|
-
accents_6: '#999',
|
|
346
|
-
accents_7: '#eaeaea',
|
|
347
|
-
accents_8: '#fafafa',
|
|
348
|
-
selection: 'rgba(248,28,229, 0.5)',
|
|
349
|
-
code: '#C25FFF',
|
|
350
|
-
border: '#333',
|
|
351
|
-
primary: '#0072F6',
|
|
352
|
-
primaryLight: '#CEE4FF',
|
|
353
|
-
primaryLighter: '#96C1F3',
|
|
354
|
-
primaryDark: '#00254E',
|
|
355
|
-
secondary: '#7828C9',
|
|
356
|
-
secondaryLight: '#EADCF9',
|
|
357
|
-
secondaryLighter: '#D1B1F1',
|
|
358
|
-
secondaryDark: '#290E45',
|
|
359
|
-
error: '#F31261',
|
|
360
|
-
errorLight: '#FDD8E6',
|
|
361
|
-
errorLighter: '#FAA8C6',
|
|
362
|
-
errorDark: '#4E041F',
|
|
363
|
-
success: '#17C965',
|
|
364
|
-
successLight: '#DAFBE9',
|
|
365
|
-
successLighter: '#ADF5CD',
|
|
366
|
-
successDark: '#06371C',
|
|
367
|
-
warning: '#F5A525',
|
|
368
|
-
warningLight: '#FDEFD9',
|
|
369
|
-
warningLighter: '#FBDBA8',
|
|
370
|
-
warningDark: '#4E3105',
|
|
371
|
-
info: '#06B7DC',
|
|
372
|
-
infoLight: '#D7F8FF',
|
|
373
|
-
infoLighter: '#A5EEFE',
|
|
374
|
-
infoDark: '#053B49',
|
|
375
|
-
purple: '#f81ce5',
|
|
376
|
-
alert: '#ff0080',
|
|
377
|
-
link: '#3291ff',
|
|
378
|
-
pre: '#111'
|
|
379
|
-
};
|
|
380
|
-
var expressiveness = {
|
|
381
|
-
linkStyle: 'none',
|
|
382
|
-
linkHoverStyle: 'none',
|
|
383
|
-
dropdownBoxShadow: '0 0 0 1px #333',
|
|
384
|
-
scrollerStart: 'rgba(255, 255, 255, 1)',
|
|
385
|
-
scrollerEnd: 'rgba(255, 255, 255, 0)',
|
|
386
|
-
shadowSmall: '0 5px 10px rgba(255, 255, 255, 0.12)',
|
|
387
|
-
shadowMedium: '0 8px 30px rgba(255, 255, 255, 0.12)',
|
|
388
|
-
shadowLarge: '0 30px 60px rgba(255, 255, 255, 0.12)',
|
|
389
|
-
portalOpacity: 0.75
|
|
390
|
-
};
|
|
391
|
-
var font = defaultFont;
|
|
392
|
-
var breakpoints = defaultBreakpoints;
|
|
393
|
-
var layout = defaultLayout;
|
|
394
|
-
var themes = {
|
|
395
|
-
type: 'dark',
|
|
396
|
-
font: font,
|
|
397
|
-
layout: layout,
|
|
398
|
-
palette: palette,
|
|
399
|
-
breakpoints: breakpoints,
|
|
400
|
-
expressiveness: expressiveness
|
|
401
|
-
};
|
|
402
|
-
var darkTheme = themes;
|
|
403
|
-
|
|
404
|
-
var isObject = function isObject(target) {
|
|
405
|
-
return target && _typeof(target) === 'object';
|
|
406
|
-
};
|
|
407
|
-
var deepDuplicable = function deepDuplicable(source, target) {
|
|
408
|
-
if (!isObject(target) || !isObject(source)) return source;
|
|
409
|
-
var sourceKeys = Object.keys(source);
|
|
410
|
-
var result = {};
|
|
411
|
-
for (var _i = 0, _sourceKeys = sourceKeys; _i < _sourceKeys.length; _i++) {
|
|
412
|
-
var key = _sourceKeys[_i];
|
|
413
|
-
var sourceValue = source[key];
|
|
414
|
-
var targetValue = target[key];
|
|
415
|
-
if (Array.isArray(sourceValue) && Array.isArray(targetValue)) {
|
|
416
|
-
result[key] = targetValue.concat(sourceValue);
|
|
417
|
-
} else if (isObject(sourceValue) && isObject(targetValue)) {
|
|
418
|
-
result[key] = deepDuplicable(sourceValue, _objectSpread2({}, targetValue));
|
|
419
|
-
} else if (targetValue) {
|
|
420
|
-
result[key] = targetValue;
|
|
421
|
-
} else {
|
|
422
|
-
result[key] = sourceValue;
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
return result;
|
|
426
|
-
};
|
|
427
|
-
var getPresets = function getPresets() {
|
|
428
|
-
return [lightTheme, darkTheme];
|
|
429
|
-
};
|
|
430
|
-
var getPresetStaticTheme = function getPresetStaticTheme() {
|
|
431
|
-
return lightTheme;
|
|
432
|
-
};
|
|
433
|
-
var isAvailableThemeType = function isAvailableThemeType(type) {
|
|
434
|
-
if (!type) return false;
|
|
435
|
-
var presetThemes = getPresets();
|
|
436
|
-
var hasType = presetThemes.find(function (theme) {
|
|
437
|
-
return theme.type === type;
|
|
438
|
-
});
|
|
439
|
-
return !hasType;
|
|
440
|
-
};
|
|
441
|
-
var isPresetTheme = function isPresetTheme(themeOrType) {
|
|
442
|
-
if (!themeOrType) return false;
|
|
443
|
-
var isType = typeof themeOrType === 'string';
|
|
444
|
-
var type = isType ? themeOrType : themeOrType.type;
|
|
445
|
-
return !isAvailableThemeType(type);
|
|
446
|
-
};
|
|
447
|
-
var hasUserCustomTheme = function hasUserCustomTheme() {
|
|
448
|
-
var themes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
449
|
-
return !!themes.find(function (item) {
|
|
450
|
-
return isAvailableThemeType(item.type);
|
|
451
|
-
});
|
|
452
|
-
};
|
|
453
|
-
var create = function create(base, custom) {
|
|
454
|
-
if (!isAvailableThemeType(custom.type)) {
|
|
455
|
-
throw new Error('Duplicate or unavailable theme type');
|
|
456
|
-
}
|
|
457
|
-
return deepDuplicable(base, custom);
|
|
458
|
-
};
|
|
459
|
-
var createFromDark = function createFromDark(custom) {
|
|
460
|
-
return create(darkTheme, custom);
|
|
461
|
-
};
|
|
462
|
-
var createFromLight = function createFromLight(custom) {
|
|
463
|
-
return create(lightTheme, custom);
|
|
464
|
-
};
|
|
465
|
-
var Themes = {
|
|
466
|
-
isPresetTheme: isPresetTheme,
|
|
467
|
-
isAvailableThemeType: isAvailableThemeType,
|
|
468
|
-
hasUserCustomTheme: hasUserCustomTheme,
|
|
469
|
-
getPresets: getPresets,
|
|
470
|
-
getPresetStaticTheme: getPresetStaticTheme,
|
|
471
|
-
create: create,
|
|
472
|
-
createFromDark: createFromDark,
|
|
473
|
-
createFromLight: createFromLight
|
|
474
|
-
};
|
|
475
|
-
var Themes$1 = Themes;
|
|
476
|
-
|
|
477
|
-
var defaultTheme = Themes$1.getPresetStaticTheme();
|
|
478
|
-
var ThemeContext = /*#__PURE__*/React__default["default"].createContext(defaultTheme);
|
|
479
|
-
var useTheme$1 = function useTheme() {
|
|
480
|
-
return React__default["default"].useContext(ThemeContext);
|
|
481
|
-
};
|
|
482
|
-
|
|
483
|
-
var useTheme = useTheme$1;
|
|
484
|
-
|
|
485
|
-
var isCSSNumberValue = function isCSSNumberValue(value) {
|
|
486
|
-
return value !== undefined && !Number.isNaN(+value);
|
|
487
|
-
};
|
|
488
|
-
|
|
489
|
-
var generateGetScaleProps = function generateGetScaleProps(props) {
|
|
490
|
-
var getScaleProps = function getScaleProps(keyOrKeys) {
|
|
491
|
-
if (!Array.isArray(keyOrKeys)) return props[keyOrKeys];
|
|
492
|
-
var value = undefined;
|
|
493
|
-
var _iterator = _createForOfIteratorHelper(keyOrKeys),
|
|
494
|
-
_step;
|
|
495
|
-
try {
|
|
496
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
497
|
-
var key = _step.value;
|
|
498
|
-
var currentValue = props[key];
|
|
499
|
-
if (typeof currentValue !== 'undefined') {
|
|
500
|
-
value = currentValue;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
} catch (err) {
|
|
504
|
-
_iterator.e(err);
|
|
505
|
-
} finally {
|
|
506
|
-
_iterator.f();
|
|
507
|
-
}
|
|
508
|
-
return value;
|
|
509
|
-
};
|
|
510
|
-
return getScaleProps;
|
|
511
|
-
};
|
|
512
|
-
var generateGetAllScaleProps = function generateGetAllScaleProps(props) {
|
|
513
|
-
var getAllScaleProps = function getAllScaleProps() {
|
|
514
|
-
var scaleProps = {};
|
|
515
|
-
var _iterator2 = _createForOfIteratorHelper(ScalePropKeys),
|
|
516
|
-
_step2;
|
|
517
|
-
try {
|
|
518
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
519
|
-
var key = _step2.value;
|
|
520
|
-
var value = props[key];
|
|
521
|
-
if (typeof value !== 'undefined') {
|
|
522
|
-
scaleProps[key] = value;
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
} catch (err) {
|
|
526
|
-
_iterator2.e(err);
|
|
527
|
-
} finally {
|
|
528
|
-
_iterator2.f();
|
|
529
|
-
}
|
|
530
|
-
return scaleProps;
|
|
531
|
-
};
|
|
532
|
-
return getAllScaleProps;
|
|
533
|
-
};
|
|
534
|
-
|
|
535
|
-
var _excluded$3 = ["children"],
|
|
536
|
-
_excluded2 = ["paddingLeft", "pl", "paddingRight", "pr", "paddingTop", "pt", "paddingBottom", "pb", "marginTop", "mt", "marginRight", "mr", "marginBottom", "mb", "marginLeft", "ml", "px", "py", "mx", "my", "width", "height", "font", "w", "h", "margin", "padding", "unit", "scale"];
|
|
537
|
-
var reduceScaleCoefficient = function reduceScaleCoefficient(scale) {
|
|
538
|
-
if (scale === 1) return scale;
|
|
539
|
-
var diff = Math.abs((scale - 1) / 2);
|
|
540
|
-
return scale > 1 ? 1 + diff : 1 - diff;
|
|
541
|
-
};
|
|
542
|
-
|
|
543
|
-
/* eslint-disable @typescript-eslint/ban-types */
|
|
544
|
-
|
|
545
|
-
function withScale(Render) {
|
|
546
|
-
var ScaleFC = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
547
|
-
var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref0, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31;
|
|
548
|
-
var children = _ref.children,
|
|
549
|
-
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
550
|
-
var _useTheme = useTheme(),
|
|
551
|
-
layout = _useTheme.layout;
|
|
552
|
-
var paddingLeft = props.paddingLeft,
|
|
553
|
-
pl = props.pl,
|
|
554
|
-
paddingRight = props.paddingRight,
|
|
555
|
-
pr = props.pr,
|
|
556
|
-
paddingTop = props.paddingTop,
|
|
557
|
-
pt = props.pt,
|
|
558
|
-
paddingBottom = props.paddingBottom,
|
|
559
|
-
pb = props.pb,
|
|
560
|
-
marginTop = props.marginTop,
|
|
561
|
-
mt = props.mt,
|
|
562
|
-
marginRight = props.marginRight,
|
|
563
|
-
mr = props.mr,
|
|
564
|
-
marginBottom = props.marginBottom,
|
|
565
|
-
mb = props.mb,
|
|
566
|
-
marginLeft = props.marginLeft,
|
|
567
|
-
ml = props.ml,
|
|
568
|
-
px = props.px,
|
|
569
|
-
py = props.py,
|
|
570
|
-
mx = props.mx,
|
|
571
|
-
my = props.my,
|
|
572
|
-
width = props.width,
|
|
573
|
-
height = props.height,
|
|
574
|
-
font = props.font,
|
|
575
|
-
w = props.w,
|
|
576
|
-
h = props.h,
|
|
577
|
-
margin = props.margin,
|
|
578
|
-
padding = props.padding,
|
|
579
|
-
_props$unit = props.unit,
|
|
580
|
-
unit = _props$unit === void 0 ? layout.unit : _props$unit,
|
|
581
|
-
_props$scale = props.scale,
|
|
582
|
-
scale = _props$scale === void 0 ? 1 : _props$scale,
|
|
583
|
-
innerProps = _objectWithoutProperties(props, _excluded2);
|
|
584
|
-
var makeScaleHandler = function makeScaleHandler(attrValue) {
|
|
585
|
-
return function (scale1x, defaultValue) {
|
|
586
|
-
// 0 means disable scale and the default value is 0
|
|
587
|
-
if (scale1x === 0) {
|
|
588
|
-
scale1x = 1;
|
|
589
|
-
defaultValue = defaultValue || 0;
|
|
590
|
-
}
|
|
591
|
-
var factor = reduceScaleCoefficient(scale) * scale1x;
|
|
592
|
-
if (typeof attrValue === 'undefined') {
|
|
593
|
-
if (typeof defaultValue !== 'undefined') return "".concat(defaultValue);
|
|
594
|
-
return "calc(".concat(factor, " * ").concat(unit, ")");
|
|
595
|
-
}
|
|
596
|
-
if (!isCSSNumberValue(attrValue)) return "".concat(attrValue);
|
|
597
|
-
var customFactor = factor * Number(attrValue);
|
|
598
|
-
return "calc(".concat(customFactor, " * ").concat(unit, ")");
|
|
599
|
-
};
|
|
600
|
-
};
|
|
601
|
-
var value = {
|
|
602
|
-
unit: unit,
|
|
603
|
-
SCALES: {
|
|
604
|
-
pt: makeScaleHandler((_ref2 = (_ref3 = paddingTop !== null && paddingTop !== void 0 ? paddingTop : pt) !== null && _ref3 !== void 0 ? _ref3 : py) !== null && _ref2 !== void 0 ? _ref2 : padding),
|
|
605
|
-
pr: makeScaleHandler((_ref4 = (_ref5 = paddingRight !== null && paddingRight !== void 0 ? paddingRight : pr) !== null && _ref5 !== void 0 ? _ref5 : px) !== null && _ref4 !== void 0 ? _ref4 : padding),
|
|
606
|
-
pb: makeScaleHandler((_ref6 = (_ref7 = paddingBottom !== null && paddingBottom !== void 0 ? paddingBottom : pb) !== null && _ref7 !== void 0 ? _ref7 : py) !== null && _ref6 !== void 0 ? _ref6 : padding),
|
|
607
|
-
pl: makeScaleHandler((_ref8 = (_ref9 = paddingLeft !== null && paddingLeft !== void 0 ? paddingLeft : pl) !== null && _ref9 !== void 0 ? _ref9 : px) !== null && _ref8 !== void 0 ? _ref8 : padding),
|
|
608
|
-
px: makeScaleHandler((_ref0 = (_ref1 = (_ref10 = (_ref11 = px !== null && px !== void 0 ? px : paddingLeft) !== null && _ref11 !== void 0 ? _ref11 : paddingRight) !== null && _ref10 !== void 0 ? _ref10 : pl) !== null && _ref1 !== void 0 ? _ref1 : pr) !== null && _ref0 !== void 0 ? _ref0 : padding),
|
|
609
|
-
py: makeScaleHandler((_ref12 = (_ref13 = (_ref14 = (_ref15 = py !== null && py !== void 0 ? py : paddingTop) !== null && _ref15 !== void 0 ? _ref15 : paddingBottom) !== null && _ref14 !== void 0 ? _ref14 : pt) !== null && _ref13 !== void 0 ? _ref13 : pb) !== null && _ref12 !== void 0 ? _ref12 : padding),
|
|
610
|
-
mt: makeScaleHandler((_ref16 = (_ref17 = marginTop !== null && marginTop !== void 0 ? marginTop : mt) !== null && _ref17 !== void 0 ? _ref17 : my) !== null && _ref16 !== void 0 ? _ref16 : margin),
|
|
611
|
-
mr: makeScaleHandler((_ref18 = (_ref19 = marginRight !== null && marginRight !== void 0 ? marginRight : mr) !== null && _ref19 !== void 0 ? _ref19 : mx) !== null && _ref18 !== void 0 ? _ref18 : margin),
|
|
612
|
-
mb: makeScaleHandler((_ref20 = (_ref21 = marginBottom !== null && marginBottom !== void 0 ? marginBottom : mb) !== null && _ref21 !== void 0 ? _ref21 : my) !== null && _ref20 !== void 0 ? _ref20 : margin),
|
|
613
|
-
ml: makeScaleHandler((_ref22 = (_ref23 = marginLeft !== null && marginLeft !== void 0 ? marginLeft : ml) !== null && _ref23 !== void 0 ? _ref23 : mx) !== null && _ref22 !== void 0 ? _ref22 : margin),
|
|
614
|
-
mx: makeScaleHandler((_ref24 = (_ref25 = (_ref26 = (_ref27 = mx !== null && mx !== void 0 ? mx : marginLeft) !== null && _ref27 !== void 0 ? _ref27 : marginRight) !== null && _ref26 !== void 0 ? _ref26 : ml) !== null && _ref25 !== void 0 ? _ref25 : mr) !== null && _ref24 !== void 0 ? _ref24 : margin),
|
|
615
|
-
my: makeScaleHandler((_ref28 = (_ref29 = (_ref30 = (_ref31 = my !== null && my !== void 0 ? my : marginTop) !== null && _ref31 !== void 0 ? _ref31 : marginBottom) !== null && _ref30 !== void 0 ? _ref30 : mt) !== null && _ref29 !== void 0 ? _ref29 : mb) !== null && _ref28 !== void 0 ? _ref28 : margin),
|
|
616
|
-
width: makeScaleHandler(width !== null && width !== void 0 ? width : w),
|
|
617
|
-
height: makeScaleHandler(height !== null && height !== void 0 ? height : h),
|
|
618
|
-
font: makeScaleHandler(font)
|
|
619
|
-
},
|
|
620
|
-
getScaleProps: generateGetScaleProps(props),
|
|
621
|
-
getAllScaleProps: generateGetAllScaleProps(props)
|
|
622
|
-
};
|
|
623
|
-
return /*#__PURE__*/React__default["default"].createElement(ScaleContext.Provider, {
|
|
624
|
-
value: value
|
|
625
|
-
}, /*#__PURE__*/React__default["default"].createElement(Render, _extends({}, innerProps, {
|
|
626
|
-
ref: ref
|
|
627
|
-
}), children));
|
|
628
|
-
});
|
|
629
|
-
ScaleFC.displayName = "Scale".concat(Render.displayName || 'Wrapper');
|
|
630
|
-
return ScaleFC;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
var useScale = useScale$1;
|
|
634
|
-
|
|
635
|
-
var defaultProps$1 = {
|
|
636
|
-
x: 0,
|
|
637
|
-
y: 0
|
|
638
|
-
};
|
|
639
|
-
var ButtonDrip = function ButtonDrip(_ref) {
|
|
640
|
-
var x = _ref.x,
|
|
641
|
-
y = _ref.y,
|
|
642
|
-
color = _ref.color,
|
|
643
|
-
onCompleted = _ref.onCompleted;
|
|
644
|
-
var dripRef = React.useRef(null);
|
|
645
|
-
var top = Number.isNaN(+y) ? 0 : y - 10;
|
|
646
|
-
var left = Number.isNaN(+x) ? 0 : x - 10;
|
|
647
|
-
React.useEffect(function () {
|
|
648
|
-
if (!dripRef.current) return;
|
|
649
|
-
dripRef.current.addEventListener('animationend', onCompleted);
|
|
650
|
-
return function () {
|
|
651
|
-
if (!dripRef.current) return;
|
|
652
|
-
dripRef.current.removeEventListener('animationend', onCompleted);
|
|
653
|
-
};
|
|
654
|
-
});
|
|
655
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
656
|
-
ref: dripRef,
|
|
657
|
-
className: "jsx-3424889537" + " " + "drip"
|
|
658
|
-
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
659
|
-
width: "20",
|
|
660
|
-
height: "20",
|
|
661
|
-
viewBox: "0 0 20 20",
|
|
662
|
-
style: {
|
|
663
|
-
top: top,
|
|
664
|
-
left: left
|
|
665
|
-
},
|
|
666
|
-
className: "jsx-3424889537"
|
|
667
|
-
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
668
|
-
stroke: "none",
|
|
669
|
-
strokeWidth: "1",
|
|
670
|
-
fill: "none",
|
|
671
|
-
fillRule: "evenodd",
|
|
672
|
-
className: "jsx-3424889537"
|
|
673
|
-
}, /*#__PURE__*/React__default["default"].createElement("g", {
|
|
674
|
-
fill: color,
|
|
675
|
-
className: "jsx-3424889537"
|
|
676
|
-
}, /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
677
|
-
width: "100%",
|
|
678
|
-
height: "100%",
|
|
679
|
-
rx: "10",
|
|
680
|
-
className: "jsx-3424889537"
|
|
681
|
-
})))), /*#__PURE__*/React__default["default"].createElement(_JSXStyle__default["default"], {
|
|
682
|
-
id: "3424889537"
|
|
683
|
-
}, ".drip.jsx-3424889537{position:absolute;left:0;right:0;top:0;bottom:0;}svg.jsx-3424889537{position:absolute;-webkit-animation:350ms ease-in expand-jsx-3424889537;animation:350ms ease-in expand-jsx-3424889537;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;width:1rem;height:1rem;}@-webkit-keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}@keyframes expand-jsx-3424889537{0%{opacity:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}"));
|
|
684
|
-
};
|
|
685
|
-
ButtonDrip.defaultProps = defaultProps$1;
|
|
686
|
-
ButtonDrip.displayName = 'BolioUItButtonDrip';
|
|
687
|
-
var ButtonDrip$1 = ButtonDrip;
|
|
688
|
-
|
|
689
|
-
var classObjectToString = function classObjectToString(className) {
|
|
690
|
-
var keys = Object.keys(className);
|
|
691
|
-
var len = keys.length;
|
|
692
|
-
var str = '';
|
|
693
|
-
for (var index = 0; index < len; index++) {
|
|
694
|
-
var key = keys[index];
|
|
695
|
-
var val = className[keys[index]];
|
|
696
|
-
if (!val) continue;
|
|
697
|
-
str = str ? "".concat(str, " ").concat(String(key)) : String(key);
|
|
698
|
-
}
|
|
699
|
-
return str;
|
|
700
|
-
};
|
|
701
|
-
var isObjectClassName = function isObjectClassName(value) {
|
|
702
|
-
return _typeof(value) === 'object' && !Array.isArray(value);
|
|
703
|
-
};
|
|
704
|
-
var useClasses = function useClasses() {
|
|
705
|
-
var len = arguments.length;
|
|
706
|
-
var classes = '';
|
|
707
|
-
if (len === 0) return classes;
|
|
708
|
-
for (var index = 0; index < len; index++) {
|
|
709
|
-
var val = index < 0 || arguments.length <= index ? undefined : arguments[index];
|
|
710
|
-
if (!val) continue;
|
|
711
|
-
if (isObjectClassName(val)) {
|
|
712
|
-
classes += " ".concat(classObjectToString(val));
|
|
713
|
-
} else {
|
|
714
|
-
classes += " ".concat(String(val).trim());
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
return classes.trim();
|
|
718
|
-
};
|
|
719
|
-
var useClasses$1 = useClasses;
|
|
720
|
-
|
|
721
|
-
var _excluded$2 = ["children", "type", "color", "className", "spaceRatio"];
|
|
722
|
-
var getIconBgColor = function getIconBgColor(type, palette, color) {
|
|
723
|
-
var colors = {
|
|
724
|
-
"default": palette.accents_6,
|
|
725
|
-
primary: palette.primary,
|
|
726
|
-
secondary: palette.secondary,
|
|
727
|
-
success: palette.success,
|
|
728
|
-
warning: palette.warning,
|
|
729
|
-
error: palette.error,
|
|
730
|
-
info: palette.info
|
|
731
|
-
};
|
|
732
|
-
return color ? color : colors[type];
|
|
733
|
-
};
|
|
734
|
-
var LoadingComponent = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
735
|
-
var children = _ref.children,
|
|
736
|
-
_ref$type = _ref.type,
|
|
737
|
-
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
738
|
-
color = _ref.color,
|
|
739
|
-
_ref$className = _ref.className,
|
|
740
|
-
className = _ref$className === void 0 ? '' : _ref$className,
|
|
741
|
-
_ref$spaceRatio = _ref.spaceRatio,
|
|
742
|
-
spaceRatio = _ref$spaceRatio === void 0 ? 1 : _ref$spaceRatio,
|
|
743
|
-
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
744
|
-
var theme = useTheme();
|
|
745
|
-
var _useScale = useScale(),
|
|
746
|
-
SCALES = _useScale.SCALES;
|
|
747
|
-
var classes = useClasses$1('loading-container', className);
|
|
748
|
-
var bgColor = React.useMemo(function () {
|
|
749
|
-
return getIconBgColor(type, theme.palette, color);
|
|
750
|
-
}, [type, theme.palette, color]);
|
|
751
|
-
return /*#__PURE__*/React__default["default"].createElement("div", _extends({
|
|
752
|
-
ref: ref,
|
|
753
|
-
role: "status"
|
|
754
|
-
}, props, {
|
|
755
|
-
className: _JSXStyle__default["default"].dynamic([["1090444014", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]]) + " " + (props && props.className != null && props.className || classes || "")
|
|
756
|
-
}), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
757
|
-
className: _JSXStyle__default["default"].dynamic([["1090444014", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]]) + " " + "loading"
|
|
758
|
-
}, children && /*#__PURE__*/React__default["default"].createElement("label", {
|
|
759
|
-
className: _JSXStyle__default["default"].dynamic([["1090444014", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
|
|
760
|
-
}, children), /*#__PURE__*/React__default["default"].createElement("i", {
|
|
761
|
-
className: _JSXStyle__default["default"].dynamic([["1090444014", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
|
|
762
|
-
}), /*#__PURE__*/React__default["default"].createElement("i", {
|
|
763
|
-
className: _JSXStyle__default["default"].dynamic([["1090444014", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
|
|
764
|
-
}), /*#__PURE__*/React__default["default"].createElement("i", {
|
|
765
|
-
className: _JSXStyle__default["default"].dynamic([["1090444014", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]]])
|
|
766
|
-
})), /*#__PURE__*/React__default["default"].createElement(_JSXStyle__default["default"], {
|
|
767
|
-
id: "1090444014",
|
|
768
|
-
dynamic: [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, '100%'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), theme.palette.accents_5, bgColor, spaceRatio]
|
|
769
|
-
}, ".loading-container.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative;font-size:".concat(SCALES.font(1), ";width:").concat(SCALES.width(1, '100%'), ";height:").concat(SCALES.height(1, '100%'), ";min-height:1em;padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}label.__jsx-style-dynamic-selector{margin-right:0.5em;color:").concat(theme.palette.accents_5, ";line-height:1;}label.__jsx-style-dynamic-selector *{margin:0;}.loading.__jsx-style-dynamic-selector{position:absolute;top:50%;left:50%;width:100%;height:100%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}i.__jsx-style-dynamic-selector{width:0.25em;height:0.25em;border-radius:50%;background-color:").concat(bgColor, ";margin:0 calc(0.25em / 2 * ").concat(spaceRatio, ");display:inline-block;-webkit-animation:loading-blink-__jsx-style-dynamic-selector 1.4s infinite both;animation:loading-blink-__jsx-style-dynamic-selector 1.4s infinite both;}i.__jsx-style-dynamic-selector:nth-child(2){-webkit-animation-delay:0.2s;animation-delay:0.2s;}i.__jsx-style-dynamic-selector:nth-child(3){-webkit-animation-delay:0.4s;animation-delay:0.4s;}@-webkit-keyframes loading-blink-__jsx-style-dynamic-selector{0%{opacity:0.2;}20%{opacity:1;}100%{opacity:0.2;}}@keyframes loading-blink-__jsx-style-dynamic-selector{0%{opacity:0.2;}20%{opacity:1;}100%{opacity:0.2;}}")));
|
|
770
|
-
});
|
|
771
|
-
LoadingComponent.displayName = 'BolioUILoading';
|
|
772
|
-
var Loading = withScale(LoadingComponent);
|
|
773
|
-
var Loading$1 = Loading;
|
|
774
|
-
|
|
775
|
-
function ButtonLoading(_ref) {
|
|
776
|
-
var color = _ref.color;
|
|
777
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
778
|
-
className: "jsx-412966635" + " " + "btn-loading"
|
|
779
|
-
}, /*#__PURE__*/React__default["default"].createElement(Loading$1, {
|
|
780
|
-
color: color
|
|
781
|
-
}), /*#__PURE__*/React__default["default"].createElement(_JSXStyle__default["default"], {
|
|
782
|
-
id: "412966635"
|
|
783
|
-
}, ".btn-loading.jsx-412966635{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;background-color:var(--bolio-ui-button-bg);}"));
|
|
784
|
-
}
|
|
785
|
-
ButtonLoading.displayName = 'BolioUIButtonLoading';
|
|
786
|
-
|
|
787
|
-
var _excluded$1 = ["isRight", "isSingle", "children", "className"];
|
|
788
|
-
function ButtonIcon(_ref) {
|
|
789
|
-
var _ref$isRight = _ref.isRight,
|
|
790
|
-
isRight = _ref$isRight === void 0 ? false : _ref$isRight,
|
|
791
|
-
isSingle = _ref.isSingle,
|
|
792
|
-
children = _ref.children,
|
|
793
|
-
_ref$className = _ref.className,
|
|
794
|
-
className = _ref$className === void 0 ? '' : _ref$className,
|
|
795
|
-
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
796
|
-
var classes = useClasses$1('icon', {
|
|
797
|
-
right: isRight,
|
|
798
|
-
single: isSingle
|
|
799
|
-
}, className);
|
|
800
|
-
return /*#__PURE__*/React__default["default"].createElement("span", _extends({}, props, {
|
|
801
|
-
className: "jsx-2499243154" + " " + (props && props.className != null && props.className || classes || "")
|
|
802
|
-
}), children, /*#__PURE__*/React__default["default"].createElement(_JSXStyle__default["default"], {
|
|
803
|
-
id: "2499243154"
|
|
804
|
-
}, ".icon.jsx-2499243154{position:absolute;left:var(--bolio-ui-button-icon-padding);right:auto;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--bolio-ui-button-color);z-index:1;}.right.jsx-2499243154{right:var(--bolio-ui-button-icon-padding);left:auto;}.icon.jsx-2499243154 svg{background:transparent;height:calc(var(--bolio-ui-button-height) / 2.35);width:calc(var(--bolio-ui-button-height) / 2.35);}.single.jsx-2499243154{position:static;-webkit-transform:none;-ms-transform:none;transform:none;}"));
|
|
805
|
-
}
|
|
806
|
-
ButtonIcon.displayName = 'BolioUIButtonIcon';
|
|
807
|
-
|
|
808
|
-
var getButtonChildrenWithIcon = function getButtonChildrenWithIcon() {
|
|
809
|
-
var auto = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
810
|
-
var children = arguments.length > 1 ? arguments[1] : undefined;
|
|
811
|
-
var icons = arguments.length > 2 ? arguments[2] : undefined;
|
|
812
|
-
var icon = icons.icon,
|
|
813
|
-
iconRight = icons.iconRight;
|
|
814
|
-
var hasIcon = icon || iconRight;
|
|
815
|
-
var isRight = Boolean(iconRight);
|
|
816
|
-
var paddingForAutoMode = auto ? "calc(var(--bolio-ui-button-height) / 2 + var(--bolio-ui-button-icon-padding) * .5)" : 0;
|
|
817
|
-
|
|
818
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
819
|
-
var classes = useClasses$1('text', isRight ? 'right' : 'left');
|
|
820
|
-
if (!hasIcon) return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
821
|
-
className: "text"
|
|
822
|
-
}, children);
|
|
823
|
-
if (React__default["default"].Children.count(children) === 0) {
|
|
824
|
-
return /*#__PURE__*/React__default["default"].createElement(ButtonIcon, {
|
|
825
|
-
isRight: isRight,
|
|
826
|
-
isSingle: true
|
|
827
|
-
}, hasIcon);
|
|
828
|
-
}
|
|
829
|
-
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(ButtonIcon, {
|
|
830
|
-
isRight: isRight
|
|
831
|
-
}, hasIcon), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
832
|
-
className: _JSXStyle__default["default"].dynamic([["3568181479", [paddingForAutoMode, paddingForAutoMode]]]) + " " + (classes || "")
|
|
833
|
-
}, children, /*#__PURE__*/React__default["default"].createElement(_JSXStyle__default["default"], {
|
|
834
|
-
id: "3568181479",
|
|
835
|
-
dynamic: [paddingForAutoMode, paddingForAutoMode]
|
|
836
|
-
}, ".left.__jsx-style-dynamic-selector{padding-left:".concat(paddingForAutoMode, ";}.right.__jsx-style-dynamic-selector{padding-right:").concat(paddingForAutoMode, ";}"))));
|
|
837
|
-
};
|
|
838
|
-
var filterPropsWithGroup = function filterPropsWithGroup(props, config) {
|
|
839
|
-
if (!config.isButtonGroup) return props;
|
|
840
|
-
return _objectSpread2(_objectSpread2({}, props), {}, {
|
|
841
|
-
auto: true,
|
|
842
|
-
shadow: false,
|
|
843
|
-
ghost: config.ghost || props.ghost,
|
|
844
|
-
type: config.type || props.type,
|
|
845
|
-
disabled: config.disabled || props.disabled
|
|
846
|
-
});
|
|
847
|
-
};
|
|
848
|
-
|
|
849
|
-
var defaultContext = {
|
|
850
|
-
isButtonGroup: false,
|
|
851
|
-
disabled: false
|
|
852
|
-
};
|
|
853
|
-
var ButtonGroupContext = /*#__PURE__*/React__default["default"].createContext(defaultContext);
|
|
854
|
-
var useButtonGroupContext = function useButtonGroupContext() {
|
|
855
|
-
return React__default["default"].useContext(ButtonGroupContext);
|
|
856
|
-
};
|
|
857
|
-
|
|
858
|
-
var hexToRgb = function hexToRgb(color) {
|
|
859
|
-
var fullReg = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
860
|
-
var full = color.replace(fullReg, function (_, r, g, b) {
|
|
861
|
-
return "".concat(r).concat(r).concat(g).concat(g).concat(b).concat(b);
|
|
862
|
-
});
|
|
863
|
-
var values = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(full);
|
|
864
|
-
if (!values) {
|
|
865
|
-
throw new Error("Bolio UI: Unsupported ".concat(color, " color."));
|
|
866
|
-
}
|
|
867
|
-
return [Number.parseInt(values[1], 16), Number.parseInt(values[2], 16), Number.parseInt(values[3], 16)];
|
|
868
|
-
};
|
|
869
|
-
var colorToRgbValues = function colorToRgbValues(color) {
|
|
870
|
-
if (color.charAt(0) === '#') return hexToRgb(color);
|
|
871
|
-
var safeColor = color.replace(/ /g, '');
|
|
872
|
-
var colorType = color.substr(0, 4);
|
|
873
|
-
var regArray = safeColor.match(/\((.+)\)/);
|
|
874
|
-
if (!colorType.startsWith('rgb') || !regArray) {
|
|
875
|
-
console.log(color);
|
|
876
|
-
throw new Error("Bolio UI: Only support [\"RGB\", \"RGBA\", \"HEX\"] color.");
|
|
877
|
-
}
|
|
878
|
-
return regArray[1].split(',').map(function (str) {
|
|
879
|
-
return Number.parseFloat(str);
|
|
880
|
-
});
|
|
881
|
-
};
|
|
882
|
-
var addColorAlpha = function addColorAlpha(color, alpha) {
|
|
883
|
-
if (!/^#|rgb|RGB/.test(color)) return color;
|
|
884
|
-
var _colorToRgbValues = colorToRgbValues(color),
|
|
885
|
-
_colorToRgbValues2 = _slicedToArray(_colorToRgbValues, 3),
|
|
886
|
-
r = _colorToRgbValues2[0],
|
|
887
|
-
g = _colorToRgbValues2[1],
|
|
888
|
-
b = _colorToRgbValues2[2];
|
|
889
|
-
var safeAlpha = alpha > 1 ? 1 : alpha < 0 ? 0 : alpha;
|
|
890
|
-
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(safeAlpha, ")");
|
|
891
|
-
};
|
|
892
|
-
|
|
893
|
-
var getButtonGhostColors = function getButtonGhostColors(palette, type) {
|
|
894
|
-
var colors = {
|
|
895
|
-
primary: {
|
|
896
|
-
bg: palette.background,
|
|
897
|
-
border: palette.primary,
|
|
898
|
-
color: palette.primary
|
|
899
|
-
},
|
|
900
|
-
secondary: {
|
|
901
|
-
bg: palette.background,
|
|
902
|
-
border: palette.secondary,
|
|
903
|
-
color: palette.secondary
|
|
904
|
-
},
|
|
905
|
-
success: {
|
|
906
|
-
bg: palette.background,
|
|
907
|
-
border: palette.success,
|
|
908
|
-
color: palette.success
|
|
909
|
-
},
|
|
910
|
-
warning: {
|
|
911
|
-
bg: palette.background,
|
|
912
|
-
border: palette.warning,
|
|
913
|
-
color: palette.warning
|
|
914
|
-
},
|
|
915
|
-
error: {
|
|
916
|
-
bg: palette.background,
|
|
917
|
-
border: palette.error,
|
|
918
|
-
color: palette.error
|
|
919
|
-
},
|
|
920
|
-
info: {
|
|
921
|
-
bg: palette.background,
|
|
922
|
-
border: palette.info,
|
|
923
|
-
color: palette.info
|
|
924
|
-
}
|
|
925
|
-
};
|
|
926
|
-
return colors[type] || null;
|
|
927
|
-
};
|
|
928
|
-
var getButtonColors = function getButtonColors(palette, props) {
|
|
929
|
-
var type = props.type,
|
|
930
|
-
disabled = props.disabled,
|
|
931
|
-
ghost = props.ghost;
|
|
932
|
-
var colors = {
|
|
933
|
-
"default": {
|
|
934
|
-
bg: palette.accents_2,
|
|
935
|
-
border: palette.accents_2,
|
|
936
|
-
color: palette.foreground
|
|
937
|
-
},
|
|
938
|
-
primary: {
|
|
939
|
-
bg: palette.primary,
|
|
940
|
-
border: palette.primary,
|
|
941
|
-
color: '#fff'
|
|
942
|
-
},
|
|
943
|
-
secondary: {
|
|
944
|
-
bg: palette.secondary,
|
|
945
|
-
border: palette.secondary,
|
|
946
|
-
color: '#fff'
|
|
947
|
-
},
|
|
948
|
-
success: {
|
|
949
|
-
bg: palette.success,
|
|
950
|
-
border: palette.success,
|
|
951
|
-
color: '#fff'
|
|
952
|
-
},
|
|
953
|
-
warning: {
|
|
954
|
-
bg: palette.warning,
|
|
955
|
-
border: palette.warning,
|
|
956
|
-
color: '#fff'
|
|
957
|
-
},
|
|
958
|
-
error: {
|
|
959
|
-
bg: palette.error,
|
|
960
|
-
border: palette.error,
|
|
961
|
-
color: '#fff'
|
|
962
|
-
},
|
|
963
|
-
info: {
|
|
964
|
-
bg: palette.info,
|
|
965
|
-
border: palette.info,
|
|
966
|
-
color: '#fff'
|
|
967
|
-
},
|
|
968
|
-
abort: {
|
|
969
|
-
bg: 'transparent',
|
|
970
|
-
border: 'transparent',
|
|
971
|
-
color: palette.accents_5
|
|
972
|
-
}
|
|
973
|
-
};
|
|
974
|
-
if (disabled) return {
|
|
975
|
-
bg: palette.accents_2,
|
|
976
|
-
border: palette.accents_2,
|
|
977
|
-
color: palette.accents_4
|
|
978
|
-
};
|
|
979
|
-
|
|
980
|
-
/**
|
|
981
|
-
* The '-light' type is the same color as the common type,
|
|
982
|
-
* only hover's color is different.
|
|
983
|
-
* e.g.
|
|
984
|
-
* Color['success'] === Color['success-light']
|
|
985
|
-
* Color['warning'] === Color['warning-light']
|
|
986
|
-
*/
|
|
987
|
-
var withoutLightType = type === null || type === void 0 ? void 0 : type.replace('-light', '');
|
|
988
|
-
var defaultColor = colors["default"];
|
|
989
|
-
if (ghost) return getButtonGhostColors(palette, withoutLightType) || defaultColor;
|
|
990
|
-
return colors[withoutLightType] || defaultColor;
|
|
991
|
-
};
|
|
992
|
-
var getButtonGhostHoverColors = function getButtonGhostHoverColors(palette, type) {
|
|
993
|
-
var colors = {
|
|
994
|
-
primary: {
|
|
995
|
-
bg: palette.primary,
|
|
996
|
-
border: palette.background,
|
|
997
|
-
color: 'white'
|
|
998
|
-
},
|
|
999
|
-
secondary: {
|
|
1000
|
-
bg: palette.secondary,
|
|
1001
|
-
border: palette.background,
|
|
1002
|
-
color: 'white'
|
|
1003
|
-
},
|
|
1004
|
-
success: {
|
|
1005
|
-
bg: palette.success,
|
|
1006
|
-
border: palette.background,
|
|
1007
|
-
color: 'white'
|
|
1008
|
-
},
|
|
1009
|
-
warning: {
|
|
1010
|
-
bg: palette.warning,
|
|
1011
|
-
border: palette.background,
|
|
1012
|
-
color: 'white'
|
|
1013
|
-
},
|
|
1014
|
-
error: {
|
|
1015
|
-
bg: palette.error,
|
|
1016
|
-
border: palette.background,
|
|
1017
|
-
color: 'white'
|
|
1018
|
-
},
|
|
1019
|
-
info: {
|
|
1020
|
-
bg: palette.info,
|
|
1021
|
-
border: palette.background,
|
|
1022
|
-
color: 'white'
|
|
1023
|
-
}
|
|
1024
|
-
};
|
|
1025
|
-
var withoutLightType = type.replace('-light', '');
|
|
1026
|
-
return colors[withoutLightType] || null;
|
|
1027
|
-
};
|
|
1028
|
-
var getButtonHoverColors = function getButtonHoverColors(palette, props) {
|
|
1029
|
-
var type = props.type,
|
|
1030
|
-
disabled = props.disabled,
|
|
1031
|
-
loading = props.loading,
|
|
1032
|
-
shadow = props.shadow,
|
|
1033
|
-
ghost = props.ghost;
|
|
1034
|
-
var defaultColor = getButtonColors(palette, props);
|
|
1035
|
-
var alphaBackground = addColorAlpha(defaultColor.bg, 0.85);
|
|
1036
|
-
var colors = {
|
|
1037
|
-
"default": {
|
|
1038
|
-
bg: palette.background,
|
|
1039
|
-
border: palette.foreground
|
|
1040
|
-
},
|
|
1041
|
-
primary: {
|
|
1042
|
-
bg: palette.background,
|
|
1043
|
-
border: palette.primary
|
|
1044
|
-
},
|
|
1045
|
-
secondary: {
|
|
1046
|
-
bg: palette.background,
|
|
1047
|
-
border: palette.secondary
|
|
1048
|
-
},
|
|
1049
|
-
success: {
|
|
1050
|
-
bg: palette.background,
|
|
1051
|
-
border: palette.success
|
|
1052
|
-
},
|
|
1053
|
-
warning: {
|
|
1054
|
-
bg: palette.background,
|
|
1055
|
-
border: palette.warning
|
|
1056
|
-
},
|
|
1057
|
-
error: {
|
|
1058
|
-
bg: palette.background,
|
|
1059
|
-
border: palette.error
|
|
1060
|
-
},
|
|
1061
|
-
info: {
|
|
1062
|
-
bg: palette.background,
|
|
1063
|
-
border: palette.info
|
|
1064
|
-
},
|
|
1065
|
-
abort: {
|
|
1066
|
-
bg: 'transparent',
|
|
1067
|
-
border: 'transparent',
|
|
1068
|
-
color: palette.accents_5
|
|
1069
|
-
},
|
|
1070
|
-
'primary-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
1071
|
-
bg: alphaBackground
|
|
1072
|
-
}),
|
|
1073
|
-
'secondary-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
1074
|
-
bg: alphaBackground
|
|
1075
|
-
}),
|
|
1076
|
-
'success-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
1077
|
-
bg: alphaBackground
|
|
1078
|
-
}),
|
|
1079
|
-
'warning-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
1080
|
-
bg: alphaBackground
|
|
1081
|
-
}),
|
|
1082
|
-
'error-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
1083
|
-
bg: alphaBackground
|
|
1084
|
-
}),
|
|
1085
|
-
'info-light': _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
1086
|
-
bg: alphaBackground
|
|
1087
|
-
})
|
|
1088
|
-
};
|
|
1089
|
-
if (disabled) return {
|
|
1090
|
-
bg: palette.accents_2,
|
|
1091
|
-
border: palette.accents_2,
|
|
1092
|
-
color: '#ccc'
|
|
1093
|
-
};
|
|
1094
|
-
if (loading) return _objectSpread2(_objectSpread2({}, defaultColor), {}, {
|
|
1095
|
-
color: 'transparent'
|
|
1096
|
-
});
|
|
1097
|
-
if (shadow) return defaultColor;
|
|
1098
|
-
var hoverColor = (ghost ? getButtonGhostHoverColors(palette, type) : colors[type]) || colors["default"];
|
|
1099
|
-
return _objectSpread2(_objectSpread2({}, hoverColor), {}, {
|
|
1100
|
-
color: hoverColor.color || hoverColor.border
|
|
1101
|
-
});
|
|
1102
|
-
};
|
|
1103
|
-
var getButtonCursor = function getButtonCursor(disabled, loading) {
|
|
1104
|
-
if (disabled) return {
|
|
1105
|
-
cursor: 'not-allowed',
|
|
1106
|
-
events: 'auto'
|
|
1107
|
-
};
|
|
1108
|
-
if (loading) return {
|
|
1109
|
-
cursor: 'default',
|
|
1110
|
-
events: 'none'
|
|
1111
|
-
};
|
|
1112
|
-
return {
|
|
1113
|
-
cursor: 'pointer',
|
|
1114
|
-
events: 'auto'
|
|
1115
|
-
};
|
|
1116
|
-
};
|
|
1117
|
-
var getButtonDripColor = function getButtonDripColor(palette, props) {
|
|
1118
|
-
var type = props.type;
|
|
1119
|
-
var isLightHover = type === null || type === void 0 ? void 0 : type.endsWith('light');
|
|
1120
|
-
var hoverColors = getButtonHoverColors(palette, props);
|
|
1121
|
-
return isLightHover ? addColorAlpha(hoverColors.bg, 0.65) : addColorAlpha(palette.accents_3, 0.65);
|
|
1122
|
-
};
|
|
1123
|
-
|
|
1124
|
-
var _excluded = ["children", "disabled", "type", "loading", "shadow", "ghost", "rounded", "effect", "onClick", "auto", "icon", "htmlType", "iconRight", "className"];
|
|
1125
|
-
var defaultProps = {
|
|
1126
|
-
type: 'default',
|
|
1127
|
-
htmlType: 'button',
|
|
1128
|
-
ghost: false,
|
|
1129
|
-
rounded: false,
|
|
1130
|
-
loading: false,
|
|
1131
|
-
shadow: false,
|
|
1132
|
-
auto: false,
|
|
1133
|
-
effect: true,
|
|
1134
|
-
disabled: false,
|
|
1135
|
-
className: ''
|
|
1136
|
-
};
|
|
1137
|
-
var ButtonComponent = /*#__PURE__*/React__default["default"].forwardRef(function (btnProps, ref) {
|
|
1138
|
-
var theme = useTheme();
|
|
1139
|
-
var _useScale = useScale(),
|
|
1140
|
-
SCALES = _useScale.SCALES;
|
|
1141
|
-
var buttonRef = React.useRef(null);
|
|
1142
|
-
React.useImperativeHandle(ref, function () {
|
|
1143
|
-
return buttonRef.current;
|
|
1144
|
-
});
|
|
1145
|
-
var _useState = React.useState(false),
|
|
1146
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
1147
|
-
dripShow = _useState2[0],
|
|
1148
|
-
setDripShow = _useState2[1];
|
|
1149
|
-
var _useState3 = React.useState(0),
|
|
1150
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
1151
|
-
dripX = _useState4[0],
|
|
1152
|
-
setDripX = _useState4[1];
|
|
1153
|
-
var _useState5 = React.useState(0),
|
|
1154
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
1155
|
-
dripY = _useState6[0],
|
|
1156
|
-
setDripY = _useState6[1];
|
|
1157
|
-
var groupConfig = useButtonGroupContext();
|
|
1158
|
-
var filteredProps = filterPropsWithGroup(btnProps, groupConfig);
|
|
1159
|
-
|
|
1160
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1161
|
-
var children = filteredProps.children,
|
|
1162
|
-
disabled = filteredProps.disabled;
|
|
1163
|
-
filteredProps.type;
|
|
1164
|
-
var loading = filteredProps.loading,
|
|
1165
|
-
shadow = filteredProps.shadow;
|
|
1166
|
-
filteredProps.ghost;
|
|
1167
|
-
var rounded = filteredProps.rounded,
|
|
1168
|
-
effect = filteredProps.effect,
|
|
1169
|
-
onClick = filteredProps.onClick,
|
|
1170
|
-
auto = filteredProps.auto,
|
|
1171
|
-
icon = filteredProps.icon,
|
|
1172
|
-
htmlType = filteredProps.htmlType,
|
|
1173
|
-
iconRight = filteredProps.iconRight,
|
|
1174
|
-
className = filteredProps.className,
|
|
1175
|
-
props = _objectWithoutProperties(filteredProps, _excluded);
|
|
1176
|
-
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
1177
|
-
|
|
1178
|
-
var _useMemo = React.useMemo(function () {
|
|
1179
|
-
return getButtonColors(theme.palette, filteredProps);
|
|
1180
|
-
}, [theme.palette, filteredProps]),
|
|
1181
|
-
bg = _useMemo.bg,
|
|
1182
|
-
border = _useMemo.border,
|
|
1183
|
-
color = _useMemo.color;
|
|
1184
|
-
var hover = React.useMemo(function () {
|
|
1185
|
-
return getButtonHoverColors(theme.palette, filteredProps);
|
|
1186
|
-
}, [theme.palette, filteredProps]);
|
|
1187
|
-
var _useMemo2 = React.useMemo(function () {
|
|
1188
|
-
return getButtonCursor(disabled, loading);
|
|
1189
|
-
}, [disabled, loading]),
|
|
1190
|
-
cursor = _useMemo2.cursor,
|
|
1191
|
-
events = _useMemo2.events;
|
|
1192
|
-
var dripColor = React.useMemo(function () {
|
|
1193
|
-
return getButtonDripColor(theme.palette, filteredProps);
|
|
1194
|
-
}, [theme.palette, filteredProps]);
|
|
1195
|
-
var dripCompletedHandle = function dripCompletedHandle() {
|
|
1196
|
-
setDripShow(false);
|
|
1197
|
-
setDripX(0);
|
|
1198
|
-
setDripY(0);
|
|
1199
|
-
};
|
|
1200
|
-
var clickHandler = function clickHandler(event) {
|
|
1201
|
-
if (disabled || loading) return;
|
|
1202
|
-
var showDrip = effect;
|
|
1203
|
-
if (showDrip && buttonRef.current) {
|
|
1204
|
-
var rect = buttonRef.current.getBoundingClientRect();
|
|
1205
|
-
setDripShow(true);
|
|
1206
|
-
setDripX(event.clientX - rect.left);
|
|
1207
|
-
setDripY(event.clientY - rect.top);
|
|
1208
|
-
}
|
|
1209
|
-
onClick && onClick(event);
|
|
1210
|
-
};
|
|
1211
|
-
var childrenWithIcon = React.useMemo(function () {
|
|
1212
|
-
return getButtonChildrenWithIcon(auto, children, {
|
|
1213
|
-
icon: icon,
|
|
1214
|
-
iconRight: iconRight
|
|
1215
|
-
});
|
|
1216
|
-
}, [auto, children, icon, iconRight]);
|
|
1217
|
-
var paddingLeft = auto ? SCALES.pl(1.15) : SCALES.pl(1.15),
|
|
1218
|
-
paddingRight = auto ? SCALES.pr(1.15) : SCALES.pr(1.15);
|
|
1219
|
-
return /*#__PURE__*/React__default["default"].createElement("button", _extends({
|
|
1220
|
-
ref: buttonRef,
|
|
1221
|
-
type: htmlType,
|
|
1222
|
-
disabled: disabled,
|
|
1223
|
-
onClick: clickHandler
|
|
1224
|
-
}, props, {
|
|
1225
|
-
className: _JSXStyle__default["default"].dynamic([["1204671885", [rounded ? '25px' : theme.layout.radius, SCALES.font(0.875), color, bg, border, cursor, events, shadow ? '0 4px 10px 0' + bg : 'none', SCALES.pl(0.75), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events]]]) + " " + (props && props.className != null && props.className || useClasses$1('btn', className) || "")
|
|
1226
|
-
}), loading && /*#__PURE__*/React__default["default"].createElement(ButtonLoading, {
|
|
1227
|
-
color: color
|
|
1228
|
-
}), childrenWithIcon, dripShow && /*#__PURE__*/React__default["default"].createElement(ButtonDrip$1, {
|
|
1229
|
-
x: dripX,
|
|
1230
|
-
y: dripY,
|
|
1231
|
-
color: dripColor,
|
|
1232
|
-
onCompleted: dripCompletedHandle
|
|
1233
|
-
}), /*#__PURE__*/React__default["default"].createElement(_JSXStyle__default["default"], {
|
|
1234
|
-
id: "1204671885",
|
|
1235
|
-
dynamic: [rounded ? '25px' : theme.layout.radius, SCALES.font(0.875), color, bg, border, cursor, events, shadow ? '0 4px 10px 0' + bg : 'none', SCALES.pl(0.75), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events]
|
|
1236
|
-
}, ".btn.__jsx-style-dynamic-selector{box-sizing:border-box;display:inline-block;border-radius:".concat(rounded ? '25px' : theme.layout.radius, ";font-weight:bold;font-size:").concat(SCALES.font(0.875), ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;text-transform:capitalize;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;white-space:nowrap;-webkit-transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;position:relative;overflow:hidden;color:").concat(color, ";background-color:").concat(bg, ";border:1px solid ").concat(border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(shadow ? '0 4px 10px 0' + bg : 'none', ";--bolio-ui-button-icon-padding:").concat(SCALES.pl(0.75), ";--bolio-ui-button-height:").concat(SCALES.height(2.5), ";--bolio-ui-button-color:").concat(color, ";--bolio-ui-button-bg:").concat(bg, ";min-width:").concat(auto ? 'min-content' : SCALES.width(10.5), ";width:").concat(auto ? 'auto' : 'initial', ";height:").concat(SCALES.height(2.5), ";padding:").concat(SCALES.pt(0), " ").concat(paddingRight, " ").concat(SCALES.pb(0), " ").concat(paddingLeft, ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.btn.__jsx-style-dynamic-selector:hover,.btn.__jsx-style-dynamic-selector:focus{cursor:").concat(cursor, ";pointer-events:").concat(events, ";}.btn.__jsx-style-dynamic-selector:active{-webkit-transform:scale(0.98,0.98);-ms-transform:scale(0.98,0.98);transform:scale(0.98,0.98);}.btn.__jsx-style-dynamic-selector .text{position:relative;z-index:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;line-height:inherit;}.btn.__jsx-style-dynamic-selector .text p,.btn.__jsx-style-dynamic-selector .text pre,.btn.__jsx-style-dynamic-selector .text div{margin:0;}")));
|
|
1237
|
-
});
|
|
1238
|
-
ButtonComponent.defaultProps = defaultProps;
|
|
1239
|
-
ButtonComponent.displayName = 'BolioUIButton';
|
|
1240
|
-
var Button = withScale(ButtonComponent);
|
|
1241
|
-
var Button$1 = Button;
|
|
1242
|
-
|
|
1243
|
-
exports["default"] = Button$1;
|
|
2
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
3
|
+
|
|
4
|
+
var _chunk6XJS3KMWjs = require('../chunk-6XJS3KMW.js');
|
|
5
|
+
require('../chunk-BSDZWWUS.js');
|
|
6
|
+
require('../chunk-GJZT47MP.js');
|
|
7
|
+
require('../chunk-RZBEZ26A.js');
|
|
8
|
+
require('../chunk-BDEBNBW6.js');
|
|
9
|
+
require('../chunk-NDERASK2.js');
|
|
10
|
+
require('../chunk-S62PPQHN.js');
|
|
11
|
+
require('../chunk-UX2B3G6U.js');
|
|
12
|
+
require('../chunk-45MVPPJN.js');
|
|
13
|
+
require('../chunk-TFZ2IGNH.js');
|
|
14
|
+
require('../chunk-QUMM6MGX.js');
|
|
15
|
+
require('../chunk-VCTKX4AS.js');
|
|
16
|
+
require('../chunk-5KUROAEP.js');
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
exports.default = _chunk6XJS3KMWjs.Button_default;
|