@fountain-ui/core 2.0.0-beta.92 → 2.0.0-beta.94
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/build/commonjs/Accordion/Accordion.js +50 -52
- package/build/commonjs/Accordion/Accordion.js.map +1 -1
- package/build/commonjs/Accordion/AccordionProps.js +7 -0
- package/build/commonjs/Accordion/AccordionProps.js.map +1 -1
- package/build/commonjs/Accordion/LegacyAccordion.js +171 -0
- package/build/commonjs/Accordion/LegacyAccordion.js.map +1 -0
- package/build/commonjs/Accordion/LegacyAccordionProps.js +2 -0
- package/build/commonjs/Accordion/LegacyAccordionProps.js.map +1 -0
- package/build/commonjs/Accordion/index.js +2 -2
- package/build/commonjs/Accordion/index.js.map +1 -1
- package/build/commonjs/Accordion/useVariantStyleMap.js +126 -0
- package/build/commonjs/Accordion/useVariantStyleMap.js.map +1 -0
- package/build/commonjs/Badge/Badge.js +16 -20
- package/build/commonjs/Badge/Badge.js.map +1 -1
- package/build/commonjs/Badge/BadgeProps.js +15 -0
- package/build/commonjs/Badge/BadgeProps.js.map +1 -1
- package/build/commonjs/Badge/LegacyBadge.js +61 -0
- package/build/commonjs/Badge/LegacyBadge.js.map +1 -0
- package/build/commonjs/Badge/LegacyBadgeProps.js +2 -0
- package/build/commonjs/Badge/LegacyBadgeProps.js.map +1 -0
- package/build/commonjs/Badge/index.js +2 -2
- package/build/commonjs/Badge/index.js.map +1 -1
- package/build/commonjs/Badge/useVariantStyleMap.js +74 -0
- package/build/commonjs/Badge/useVariantStyleMap.js.map +1 -0
- package/build/commonjs/Button/Button.js +101 -71
- package/build/commonjs/Button/Button.js.map +1 -1
- package/build/commonjs/Button/ButtonProps.js +11 -0
- package/build/commonjs/Button/ButtonProps.js.map +1 -1
- package/build/commonjs/Button/LegacyButton.js +144 -0
- package/build/commonjs/Button/LegacyButton.js.map +1 -0
- package/build/commonjs/Button/LegacyButtonProps.js +2 -0
- package/build/commonjs/Button/LegacyButtonProps.js.map +1 -0
- package/build/commonjs/Button/index.js +2 -2
- package/build/commonjs/Button/index.js.map +1 -1
- package/build/commonjs/Button/useVariantStyleMap.js +174 -0
- package/build/commonjs/Button/useVariantStyleMap.js.map +1 -0
- package/build/commonjs/ButtonBase/ButtonBase.js +4 -10
- package/build/commonjs/ButtonBase/ButtonBase.js.map +1 -1
- package/build/commonjs/ButtonBase/LegacyButtonBase.js +126 -0
- package/build/commonjs/ButtonBase/LegacyButtonBase.js.map +1 -0
- package/build/commonjs/ButtonBase/index.js +2 -2
- package/build/commonjs/ButtonBase/index.js.map +1 -1
- package/build/commonjs/ButtonSet/ButtonSet.js +54 -0
- package/build/commonjs/ButtonSet/ButtonSet.js.map +1 -0
- package/build/commonjs/ButtonSet/ButtonSetProps.js +11 -0
- package/build/commonjs/ButtonSet/ButtonSetProps.js.map +1 -0
- package/build/commonjs/ButtonSet/index.js +30 -0
- package/build/commonjs/ButtonSet/index.js.map +1 -0
- package/build/commonjs/ButtonSet/useVariantStyleMap.js +85 -0
- package/build/commonjs/ButtonSet/useVariantStyleMap.js.map +1 -0
- package/build/commonjs/Checkbox/Checkbox.js +33 -23
- package/build/commonjs/Checkbox/Checkbox.js.map +1 -1
- package/build/commonjs/Checkbox/CheckboxProps.js +7 -0
- package/build/commonjs/Checkbox/CheckboxProps.js.map +1 -1
- package/build/commonjs/Checkbox/LegacyCheckbox.js +65 -0
- package/build/commonjs/Checkbox/LegacyCheckbox.js.map +1 -0
- package/build/commonjs/Checkbox/LegacyCheckboxProps.js +2 -0
- package/build/commonjs/Checkbox/LegacyCheckboxProps.js.map +1 -0
- package/build/commonjs/Checkbox/index.js +2 -2
- package/build/commonjs/Checkbox/index.js.map +1 -1
- package/build/commonjs/Checkbox/useVariantStyleMap.js +70 -0
- package/build/commonjs/Checkbox/useVariantStyleMap.js.map +1 -0
- package/build/commonjs/CheckboxGroup/CheckboxGroup.js +50 -0
- package/build/commonjs/CheckboxGroup/CheckboxGroup.js.map +1 -0
- package/build/commonjs/CheckboxGroup/CheckboxGroupProps.js +2 -0
- package/build/commonjs/CheckboxGroup/CheckboxGroupProps.js.map +1 -0
- package/build/commonjs/CheckboxGroup/index.js +16 -0
- package/build/commonjs/CheckboxGroup/index.js.map +1 -0
- package/build/commonjs/Chip/Chip.js +24 -62
- package/build/commonjs/Chip/Chip.js.map +1 -1
- package/build/commonjs/Chip/ChipProps.js +9 -0
- package/build/commonjs/Chip/ChipProps.js.map +1 -1
- package/build/commonjs/Chip/LegacyChip.js +98 -0
- package/build/commonjs/Chip/LegacyChip.js.map +1 -0
- package/build/commonjs/Chip/LegacyChipProps.js +2 -0
- package/build/commonjs/Chip/LegacyChipProps.js.map +1 -0
- package/build/commonjs/Chip/index.js +2 -2
- package/build/commonjs/Chip/index.js.map +1 -1
- package/build/commonjs/Chip/useChipStyle.js +113 -0
- package/build/commonjs/Chip/useChipStyle.js.map +1 -0
- package/build/commonjs/Empty/Empty.js +86 -0
- package/build/commonjs/Empty/Empty.js.map +1 -0
- package/build/commonjs/Empty/EmptyProps.js +2 -0
- package/build/commonjs/Empty/EmptyProps.js.map +1 -0
- package/build/commonjs/Empty/index.js +16 -0
- package/build/commonjs/Empty/index.js.map +1 -0
- package/build/commonjs/IconButton/IconButton.js +39 -42
- package/build/commonjs/IconButton/IconButton.js.map +1 -1
- package/build/commonjs/IconButton/IconButtonProps.js +7 -0
- package/build/commonjs/IconButton/IconButtonProps.js.map +1 -1
- package/build/commonjs/IconButton/LegacyIconButton.js +89 -0
- package/build/commonjs/IconButton/LegacyIconButton.js.map +1 -0
- package/build/commonjs/IconButton/LegacyIconButtonProps.js +2 -0
- package/build/commonjs/IconButton/LegacyIconButtonProps.js.map +1 -0
- package/build/commonjs/IconButton/index.js +2 -2
- package/build/commonjs/IconButton/index.js.map +1 -1
- package/build/commonjs/Pagination/LegacyPagination.js +145 -0
- package/build/commonjs/Pagination/LegacyPagination.js.map +1 -0
- package/build/commonjs/Pagination/LegacyPaginationProps.js +2 -0
- package/build/commonjs/Pagination/LegacyPaginationProps.js.map +1 -0
- package/build/commonjs/Pagination/NumberPagination.js +71 -0
- package/build/commonjs/Pagination/NumberPagination.js.map +1 -0
- package/build/commonjs/Pagination/Pagination.js +9 -5
- package/build/commonjs/Pagination/Pagination.js.map +1 -1
- package/build/commonjs/Pagination/PaginationProps.js +7 -0
- package/build/commonjs/Pagination/PaginationProps.js.map +1 -1
- package/build/commonjs/Pagination/index.js +2 -2
- package/build/commonjs/Pagination/index.js.map +1 -1
- package/build/commonjs/PaginationItem/LegacyPaginationItem.js +53 -0
- package/build/commonjs/PaginationItem/LegacyPaginationItem.js.map +1 -0
- package/build/commonjs/PaginationItem/PaginationItem.js +2 -2
- package/build/commonjs/PaginationItem/PaginationItem.js.map +1 -1
- package/build/commonjs/Radio/LegacyRadio.js +82 -0
- package/build/commonjs/Radio/LegacyRadio.js.map +1 -0
- package/build/commonjs/Radio/LegacyRadioProps.js +2 -0
- package/build/commonjs/Radio/LegacyRadioProps.js.map +1 -0
- package/build/commonjs/Radio/Radio.js +40 -19
- package/build/commonjs/Radio/Radio.js.map +1 -1
- package/build/commonjs/Radio/RadioProps.js.map +1 -1
- package/build/commonjs/Radio/index.js +2 -2
- package/build/commonjs/Radio/index.js.map +1 -1
- package/build/commonjs/RadioGroup/LegacyRadioGroup.js +31 -0
- package/build/commonjs/RadioGroup/LegacyRadioGroup.js.map +1 -0
- package/build/commonjs/RadioGroup/RadioGroup.js +28 -2
- package/build/commonjs/RadioGroup/RadioGroup.js.map +1 -1
- package/build/commonjs/RadioGroup/index.js +2 -2
- package/build/commonjs/RadioGroup/index.js.map +1 -1
- package/build/commonjs/ShadowView/ShadowView.js +35 -0
- package/build/commonjs/ShadowView/ShadowView.js.map +1 -0
- package/build/commonjs/ShadowView/ShadowView.native.js +35 -0
- package/build/commonjs/ShadowView/ShadowView.native.js.map +1 -0
- package/build/commonjs/ShadowView/ShadowViewProps.js +2 -0
- package/build/commonjs/ShadowView/ShadowViewProps.js.map +1 -0
- package/build/commonjs/ShadowView/index.js +16 -0
- package/build/commonjs/ShadowView/index.js.map +1 -0
- package/build/commonjs/Snackbar/LegacySnackbar.js +134 -0
- package/build/commonjs/Snackbar/LegacySnackbar.js.map +1 -0
- package/build/commonjs/Snackbar/LegacySnackbarProps.js +2 -0
- package/build/commonjs/Snackbar/LegacySnackbarProps.js.map +1 -0
- package/build/commonjs/Snackbar/Snackbar.js +7 -5
- package/build/commonjs/Snackbar/Snackbar.js.map +1 -1
- package/build/commonjs/Snackbar/SnackbarProps.js +7 -0
- package/build/commonjs/Snackbar/SnackbarProps.js.map +1 -1
- package/build/commonjs/Snackbar/index.js +2 -2
- package/build/commonjs/Snackbar/index.js.map +1 -1
- package/build/commonjs/SnackbarContent/LegacySnackbarContent.js +105 -0
- package/build/commonjs/SnackbarContent/LegacySnackbarContent.js.map +1 -0
- package/build/commonjs/SnackbarContent/LegacySnackbarContentProps.js +2 -0
- package/build/commonjs/SnackbarContent/LegacySnackbarContentProps.js.map +1 -0
- package/build/commonjs/SnackbarContent/SnackbarContent.js +48 -38
- package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
- package/build/commonjs/SnackbarContent/SnackbarContentProps.js.map +1 -1
- package/build/commonjs/SnackbarContent/StatusIcon.js +43 -0
- package/build/commonjs/SnackbarContent/StatusIcon.js.map +1 -0
- package/build/commonjs/SnackbarContent/index.js +2 -2
- package/build/commonjs/SnackbarContent/index.js.map +1 -1
- package/build/commonjs/SvgIcon/LegacySvgIcon.js +43 -0
- package/build/commonjs/SvgIcon/LegacySvgIcon.js.map +1 -0
- package/build/commonjs/SvgIcon/LegacySvgIconProps.js +2 -0
- package/build/commonjs/SvgIcon/LegacySvgIconProps.js.map +1 -0
- package/build/commonjs/SvgIcon/SvgIcon.js +16 -4
- package/build/commonjs/SvgIcon/SvgIcon.js.map +1 -1
- package/build/commonjs/SvgIcon/SvgIconProps.js +15 -0
- package/build/commonjs/SvgIcon/SvgIconProps.js.map +1 -1
- package/build/commonjs/SvgIcon/index.js +2 -2
- package/build/commonjs/SvgIcon/index.js.map +1 -1
- package/build/commonjs/Tab/LegacyTab.js +126 -0
- package/build/commonjs/Tab/LegacyTab.js.map +1 -0
- package/build/commonjs/Tab/LegacyTabProps.js +2 -0
- package/build/commonjs/Tab/LegacyTabProps.js.map +1 -0
- package/build/commonjs/Tab/Tab.js +31 -69
- package/build/commonjs/Tab/Tab.js.map +1 -1
- package/build/commonjs/Tab/TabIndicator.js.map +1 -1
- package/build/commonjs/Tab/TabProps.js +7 -0
- package/build/commonjs/Tab/TabProps.js.map +1 -1
- package/build/commonjs/Tab/index.js +2 -2
- package/build/commonjs/Tab/index.js.map +1 -1
- package/build/commonjs/Tab/useVariantStyleMap.js +80 -0
- package/build/commonjs/Tab/useVariantStyleMap.js.map +1 -0
- package/build/commonjs/TabBase/LegacyTabBase.js +57 -0
- package/build/commonjs/TabBase/LegacyTabBase.js.map +1 -0
- package/build/commonjs/TabBase/TabBase.js +1 -6
- package/build/commonjs/TabBase/TabBase.js.map +1 -1
- package/build/commonjs/TabBase/index.js +2 -2
- package/build/commonjs/TabBase/index.js.map +1 -1
- package/build/commonjs/Tabs/LegacyTabIndicator.js +119 -0
- package/build/commonjs/Tabs/LegacyTabIndicator.js.map +1 -0
- package/build/commonjs/Tabs/LegacyTabIndicatorProps.js +2 -0
- package/build/commonjs/Tabs/LegacyTabIndicatorProps.js.map +1 -0
- package/build/commonjs/Tabs/LegacyTabs.js +205 -0
- package/build/commonjs/Tabs/LegacyTabs.js.map +1 -0
- package/build/commonjs/Tabs/LegacyTabsProps.js +2 -0
- package/build/commonjs/Tabs/LegacyTabsProps.js.map +1 -0
- package/build/commonjs/Tabs/TabIndicator.js +5 -9
- package/build/commonjs/Tabs/TabIndicator.js.map +1 -1
- package/build/commonjs/Tabs/TabIndicatorProps.js.map +1 -1
- package/build/commonjs/Tabs/Tabs.js +10 -9
- package/build/commonjs/Tabs/Tabs.js.map +1 -1
- package/build/commonjs/Tabs/TabsProps.js +7 -0
- package/build/commonjs/Tabs/TabsProps.js.map +1 -1
- package/build/commonjs/Tabs/index.js +2 -2
- package/build/commonjs/Tabs/index.js.map +1 -1
- package/build/commonjs/TextField/LegacyTextField.js +195 -0
- package/build/commonjs/TextField/LegacyTextField.js.map +1 -0
- package/build/commonjs/TextField/LegacyTextFieldProps.js +2 -0
- package/build/commonjs/TextField/LegacyTextFieldProps.js.map +1 -0
- package/build/commonjs/TextField/OutlinedTextField.js.map +1 -1
- package/build/commonjs/TextField/TextField.js +105 -147
- package/build/commonjs/TextField/TextField.js.map +1 -1
- package/build/commonjs/TextField/TextFieldProps.js +9 -0
- package/build/commonjs/TextField/TextFieldProps.js.map +1 -1
- package/build/commonjs/TextField/index.js +2 -2
- package/build/commonjs/TextField/index.js.map +1 -1
- package/build/commonjs/TextField/useVariantStyleMap.js +103 -0
- package/build/commonjs/TextField/useVariantStyleMap.js.map +1 -0
- package/build/commonjs/Toggle/Toggle.js +110 -0
- package/build/commonjs/Toggle/Toggle.js.map +1 -0
- package/build/commonjs/Toggle/ToggleProps.js +2 -0
- package/build/commonjs/Toggle/ToggleProps.js.map +1 -0
- package/build/commonjs/Toggle/index.js +16 -0
- package/build/commonjs/Toggle/index.js.map +1 -0
- package/build/commonjs/Tooltip/Beaks/Beak.js +69 -0
- package/build/commonjs/Tooltip/Beaks/Beak.js.map +1 -0
- package/build/commonjs/Tooltip/Beaks/BeakProps.js +2 -0
- package/build/commonjs/Tooltip/Beaks/BeakProps.js.map +1 -0
- package/build/commonjs/Tooltip/Beaks/HorizontalLargeBeak.js +25 -0
- package/build/commonjs/Tooltip/Beaks/HorizontalLargeBeak.js.map +1 -0
- package/build/commonjs/Tooltip/Beaks/HorizontalSmallBeak.js +25 -0
- package/build/commonjs/Tooltip/Beaks/HorizontalSmallBeak.js.map +1 -0
- package/build/commonjs/Tooltip/Beaks/VerticalLargeBeak.js +25 -0
- package/build/commonjs/Tooltip/Beaks/VerticalLargeBeak.js.map +1 -0
- package/build/commonjs/Tooltip/Beaks/VerticalSmallBeak.js +25 -0
- package/build/commonjs/Tooltip/Beaks/VerticalSmallBeak.js.map +1 -0
- package/build/commonjs/Tooltip/Beaks/index.js +16 -0
- package/build/commonjs/Tooltip/Beaks/index.js.map +1 -0
- package/build/commonjs/Tooltip/LegacyTooltip.js +147 -0
- package/build/commonjs/Tooltip/LegacyTooltip.js.map +1 -0
- package/build/commonjs/Tooltip/LegacyTooltipProps.js +2 -0
- package/build/commonjs/Tooltip/LegacyTooltipProps.js.map +1 -0
- package/build/commonjs/Tooltip/Tooltip.js +101 -52
- package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
- package/build/commonjs/Tooltip/TooltipProps.js +11 -0
- package/build/commonjs/Tooltip/TooltipProps.js.map +1 -1
- package/build/commonjs/Tooltip/index.js +2 -2
- package/build/commonjs/Tooltip/index.js.map +1 -1
- package/build/commonjs/Typography/LegacyTypography.js +142 -0
- package/build/commonjs/Typography/LegacyTypography.js.map +1 -0
- package/build/commonjs/Typography/LegacyTypographyProps.js +2 -0
- package/build/commonjs/Typography/LegacyTypographyProps.js.map +1 -0
- package/build/commonjs/Typography/Typography.js +15 -54
- package/build/commonjs/Typography/Typography.js.map +1 -1
- package/build/commonjs/Typography/TypographyProps.js +7 -0
- package/build/commonjs/Typography/TypographyProps.js.map +1 -1
- package/build/commonjs/Typography/index.js +2 -2
- package/build/commonjs/Typography/index.js.map +1 -1
- package/build/commonjs/hooks/useCollapsibleAppBar.js +13 -5
- package/build/commonjs/hooks/useCollapsibleAppBar.js.map +1 -1
- package/build/commonjs/index.js +105 -0
- package/build/commonjs/index.js.map +1 -1
- package/build/commonjs/internal/icons/Check.js +23 -0
- package/build/commonjs/internal/icons/Check.js.map +1 -0
- package/build/commonjs/internal/icons/CheckCircle.js +27 -0
- package/build/commonjs/internal/icons/CheckCircle.js.map +1 -0
- package/build/commonjs/internal/icons/CheckboxOn.js +23 -0
- package/build/commonjs/internal/icons/CheckboxOn.js.map +1 -0
- package/build/commonjs/internal/icons/Clear.js +27 -0
- package/build/commonjs/internal/icons/Clear.js.map +1 -0
- package/build/commonjs/internal/icons/EyeOff.js +31 -0
- package/build/commonjs/internal/icons/EyeOff.js.map +1 -0
- package/build/commonjs/internal/icons/EyeOn.js +27 -0
- package/build/commonjs/internal/icons/EyeOn.js.map +1 -0
- package/build/commonjs/internal/icons/InfoCircle.js +27 -0
- package/build/commonjs/internal/icons/InfoCircle.js.map +1 -0
- package/build/commonjs/internal/icons/LoadingSpinner/LoadingSpinnerProps.js +2 -0
- package/build/commonjs/internal/icons/LoadingSpinner/LoadingSpinnerProps.js.map +1 -0
- package/build/commonjs/internal/icons/LoadingSpinner/index.js +36 -0
- package/build/commonjs/internal/icons/LoadingSpinner/index.js.map +1 -0
- package/build/commonjs/internal/icons/LoadingSpinner/index.native.js +36 -0
- package/build/commonjs/internal/icons/LoadingSpinner/index.native.js.map +1 -0
- package/build/commonjs/internal/icons/LoadingSpinner/loadingSpinnerGray.json +1 -0
- package/build/commonjs/internal/icons/LoadingSpinner/loadingSpinnerWhite.json +1 -0
- package/build/commonjs/internal/icons/LoadingSpinner/utils.js +25 -0
- package/build/commonjs/internal/icons/LoadingSpinner/utils.js.map +1 -0
- package/build/commonjs/internal/icons/Search.js +23 -0
- package/build/commonjs/internal/icons/Search.js.map +1 -0
- package/build/commonjs/internal/icons/index.js +72 -0
- package/build/commonjs/internal/icons/index.js.map +1 -1
- package/build/commonjs/styles/createFontStyle.js.map +1 -1
- package/build/commonjs/utils/cloneElementSafely.js.map +1 -1
- package/build/commonjs/utils/createSvgIcon.js +15 -3
- package/build/commonjs/utils/createSvgIcon.js.map +1 -1
- package/build/commonjs/utils/index.js.map +1 -1
- package/build/module/Accordion/Accordion.js +47 -50
- package/build/module/Accordion/Accordion.js.map +1 -1
- package/build/module/Accordion/AccordionProps.js +1 -1
- package/build/module/Accordion/AccordionProps.js.map +1 -1
- package/build/module/Accordion/LegacyAccordion.js +148 -0
- package/build/module/Accordion/LegacyAccordion.js.map +1 -0
- package/build/module/Accordion/LegacyAccordionProps.js +2 -0
- package/build/module/Accordion/LegacyAccordionProps.js.map +1 -0
- package/build/module/Accordion/index.js +1 -1
- package/build/module/Accordion/index.js.map +1 -1
- package/build/module/Accordion/useVariantStyleMap.js +116 -0
- package/build/module/Accordion/useVariantStyleMap.js.map +1 -0
- package/build/module/Badge/Badge.js +17 -23
- package/build/module/Badge/Badge.js.map +1 -1
- package/build/module/Badge/BadgeProps.js +5 -1
- package/build/module/Badge/BadgeProps.js.map +1 -1
- package/build/module/Badge/LegacyBadge.js +48 -0
- package/build/module/Badge/LegacyBadge.js.map +1 -0
- package/build/module/Badge/LegacyBadgeProps.js +2 -0
- package/build/module/Badge/LegacyBadgeProps.js.map +1 -0
- package/build/module/Badge/index.js +1 -1
- package/build/module/Badge/index.js.map +1 -1
- package/build/module/Badge/useVariantStyleMap.js +64 -0
- package/build/module/Badge/useVariantStyleMap.js.map +1 -0
- package/build/module/Button/Button.js +100 -70
- package/build/module/Button/Button.js.map +1 -1
- package/build/module/Button/ButtonProps.js +3 -1
- package/build/module/Button/ButtonProps.js.map +1 -1
- package/build/module/Button/LegacyButton.js +127 -0
- package/build/module/Button/LegacyButton.js.map +1 -0
- package/build/module/Button/LegacyButtonProps.js +2 -0
- package/build/module/Button/LegacyButtonProps.js.map +1 -0
- package/build/module/Button/index.js +1 -1
- package/build/module/Button/index.js.map +1 -1
- package/build/module/Button/useVariantStyleMap.js +164 -0
- package/build/module/Button/useVariantStyleMap.js.map +1 -0
- package/build/module/ButtonBase/ButtonBase.js +4 -9
- package/build/module/ButtonBase/ButtonBase.js.map +1 -1
- package/build/module/ButtonBase/LegacyButtonBase.js +106 -0
- package/build/module/ButtonBase/LegacyButtonBase.js.map +1 -0
- package/build/module/ButtonBase/index.js +1 -1
- package/build/module/ButtonBase/index.js.map +1 -1
- package/build/module/ButtonSet/ButtonSet.js +34 -0
- package/build/module/ButtonSet/ButtonSet.js.map +1 -0
- package/build/module/ButtonSet/ButtonSetProps.js +3 -0
- package/build/module/ButtonSet/ButtonSetProps.js.map +1 -0
- package/build/module/ButtonSet/index.js +3 -0
- package/build/module/ButtonSet/index.js.map +1 -0
- package/build/module/ButtonSet/useVariantStyleMap.js +76 -0
- package/build/module/ButtonSet/useVariantStyleMap.js.map +1 -0
- package/build/module/Checkbox/Checkbox.js +32 -26
- package/build/module/Checkbox/Checkbox.js.map +1 -1
- package/build/module/Checkbox/CheckboxProps.js +1 -1
- package/build/module/Checkbox/CheckboxProps.js.map +1 -1
- package/build/module/Checkbox/LegacyCheckbox.js +52 -0
- package/build/module/Checkbox/LegacyCheckbox.js.map +1 -0
- package/build/module/Checkbox/LegacyCheckboxProps.js +2 -0
- package/build/module/Checkbox/LegacyCheckboxProps.js.map +1 -0
- package/build/module/Checkbox/index.js +1 -1
- package/build/module/Checkbox/index.js.map +1 -1
- package/build/module/Checkbox/useVariantStyleMap.js +59 -0
- package/build/module/Checkbox/useVariantStyleMap.js.map +1 -0
- package/build/module/CheckboxGroup/CheckboxGroup.js +34 -0
- package/build/module/CheckboxGroup/CheckboxGroup.js.map +1 -0
- package/build/module/CheckboxGroup/CheckboxGroupProps.js +2 -0
- package/build/module/CheckboxGroup/CheckboxGroupProps.js.map +1 -0
- package/build/module/CheckboxGroup/index.js +2 -0
- package/build/module/CheckboxGroup/index.js.map +1 -0
- package/build/module/Chip/Chip.js +25 -64
- package/build/module/Chip/Chip.js.map +1 -1
- package/build/module/Chip/ChipProps.js +2 -1
- package/build/module/Chip/ChipProps.js.map +1 -1
- package/build/module/Chip/LegacyChip.js +84 -0
- package/build/module/Chip/LegacyChip.js.map +1 -0
- package/build/module/Chip/LegacyChipProps.js +2 -0
- package/build/module/Chip/LegacyChipProps.js.map +1 -0
- package/build/module/Chip/index.js +1 -1
- package/build/module/Chip/index.js.map +1 -1
- package/build/module/Chip/useChipStyle.js +104 -0
- package/build/module/Chip/useChipStyle.js.map +1 -0
- package/build/module/Empty/Empty.js +71 -0
- package/build/module/Empty/Empty.js.map +1 -0
- package/build/module/Empty/EmptyProps.js +2 -0
- package/build/module/Empty/EmptyProps.js.map +1 -0
- package/build/module/Empty/index.js +2 -0
- package/build/module/Empty/index.js.map +1 -0
- package/build/module/IconButton/IconButton.js +36 -40
- package/build/module/IconButton/IconButton.js.map +1 -1
- package/build/module/IconButton/IconButtonProps.js +1 -1
- package/build/module/IconButton/IconButtonProps.js.map +1 -1
- package/build/module/IconButton/LegacyIconButton.js +74 -0
- package/build/module/IconButton/LegacyIconButton.js.map +1 -0
- package/build/module/IconButton/LegacyIconButtonProps.js +2 -0
- package/build/module/IconButton/LegacyIconButtonProps.js.map +1 -0
- package/build/module/IconButton/index.js +1 -1
- package/build/module/IconButton/index.js.map +1 -1
- package/build/module/Pagination/LegacyPagination.js +129 -0
- package/build/module/Pagination/LegacyPagination.js.map +1 -0
- package/build/module/Pagination/LegacyPaginationProps.js +2 -0
- package/build/module/Pagination/LegacyPaginationProps.js.map +1 -0
- package/build/module/Pagination/NumberPagination.js +57 -0
- package/build/module/Pagination/NumberPagination.js.map +1 -0
- package/build/module/Pagination/Pagination.js +8 -5
- package/build/module/Pagination/Pagination.js.map +1 -1
- package/build/module/Pagination/PaginationProps.js +1 -1
- package/build/module/Pagination/PaginationProps.js.map +1 -1
- package/build/module/Pagination/index.js +1 -1
- package/build/module/Pagination/index.js.map +1 -1
- package/build/module/PaginationItem/LegacyPaginationItem.js +40 -0
- package/build/module/PaginationItem/LegacyPaginationItem.js.map +1 -0
- package/build/module/PaginationItem/PaginationItem.js +2 -2
- package/build/module/PaginationItem/PaginationItem.js.map +1 -1
- package/build/module/Radio/LegacyRadio.js +63 -0
- package/build/module/Radio/LegacyRadio.js.map +1 -0
- package/build/module/Radio/LegacyRadioProps.js +2 -0
- package/build/module/Radio/LegacyRadioProps.js.map +1 -0
- package/build/module/Radio/Radio.js +35 -18
- package/build/module/Radio/Radio.js.map +1 -1
- package/build/module/Radio/RadioProps.js.map +1 -1
- package/build/module/Radio/index.js +1 -1
- package/build/module/Radio/index.js.map +1 -1
- package/build/module/RadioGroup/LegacyRadioGroup.js +18 -0
- package/build/module/RadioGroup/LegacyRadioGroup.js.map +1 -0
- package/build/module/RadioGroup/RadioGroup.js +21 -2
- package/build/module/RadioGroup/RadioGroup.js.map +1 -1
- package/build/module/RadioGroup/index.js +1 -1
- package/build/module/RadioGroup/index.js.map +1 -1
- package/build/module/ShadowView/ShadowView.js +23 -0
- package/build/module/ShadowView/ShadowView.js.map +1 -0
- package/build/module/ShadowView/ShadowView.native.js +23 -0
- package/build/module/ShadowView/ShadowView.native.js.map +1 -0
- package/build/module/ShadowView/ShadowViewProps.js +2 -0
- package/build/module/ShadowView/ShadowViewProps.js.map +1 -0
- package/build/module/ShadowView/index.js +2 -0
- package/build/module/ShadowView/index.js.map +1 -0
- package/build/module/Snackbar/LegacySnackbar.js +107 -0
- package/build/module/Snackbar/LegacySnackbar.js.map +1 -0
- package/build/module/Snackbar/LegacySnackbarProps.js +2 -0
- package/build/module/Snackbar/LegacySnackbarProps.js.map +1 -0
- package/build/module/Snackbar/Snackbar.js +7 -5
- package/build/module/Snackbar/Snackbar.js.map +1 -1
- package/build/module/Snackbar/SnackbarProps.js +1 -1
- package/build/module/Snackbar/SnackbarProps.js.map +1 -1
- package/build/module/Snackbar/index.js +1 -1
- package/build/module/Snackbar/index.js.map +1 -1
- package/build/module/SnackbarContent/LegacySnackbarContent.js +84 -0
- package/build/module/SnackbarContent/LegacySnackbarContent.js.map +1 -0
- package/build/module/SnackbarContent/LegacySnackbarContentProps.js +2 -0
- package/build/module/SnackbarContent/LegacySnackbarContentProps.js.map +1 -0
- package/build/module/SnackbarContent/SnackbarContent.js +48 -35
- package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
- package/build/module/SnackbarContent/SnackbarContentProps.js.map +1 -1
- package/build/module/SnackbarContent/StatusIcon.js +31 -0
- package/build/module/SnackbarContent/StatusIcon.js.map +1 -0
- package/build/module/SnackbarContent/index.js +1 -1
- package/build/module/SnackbarContent/index.js.map +1 -1
- package/build/module/SvgIcon/LegacySvgIcon.js +30 -0
- package/build/module/SvgIcon/LegacySvgIcon.js.map +1 -0
- package/build/module/SvgIcon/LegacySvgIconProps.js +2 -0
- package/build/module/SvgIcon/LegacySvgIconProps.js.map +1 -0
- package/build/module/SvgIcon/SvgIcon.js +15 -4
- package/build/module/SvgIcon/SvgIcon.js.map +1 -1
- package/build/module/SvgIcon/SvgIconProps.js +7 -1
- package/build/module/SvgIcon/SvgIconProps.js.map +1 -1
- package/build/module/SvgIcon/index.js +1 -1
- package/build/module/SvgIcon/index.js.map +1 -1
- package/build/module/Tab/LegacyTab.js +105 -0
- package/build/module/Tab/LegacyTab.js.map +1 -0
- package/build/module/Tab/LegacyTabProps.js +2 -0
- package/build/module/Tab/LegacyTabProps.js.map +1 -0
- package/build/module/Tab/Tab.js +30 -66
- package/build/module/Tab/Tab.js.map +1 -1
- package/build/module/Tab/TabIndicator.js.map +1 -1
- package/build/module/Tab/TabProps.js +1 -1
- package/build/module/Tab/TabProps.js.map +1 -1
- package/build/module/Tab/index.js +1 -1
- package/build/module/Tab/index.js.map +1 -1
- package/build/module/Tab/useVariantStyleMap.js +70 -0
- package/build/module/Tab/useVariantStyleMap.js.map +1 -0
- package/build/module/TabBase/LegacyTabBase.js +44 -0
- package/build/module/TabBase/LegacyTabBase.js.map +1 -0
- package/build/module/TabBase/TabBase.js +1 -5
- package/build/module/TabBase/TabBase.js.map +1 -1
- package/build/module/TabBase/index.js +1 -1
- package/build/module/TabBase/index.js.map +1 -1
- package/build/module/Tabs/LegacyTabIndicator.js +98 -0
- package/build/module/Tabs/LegacyTabIndicator.js.map +1 -0
- package/build/module/Tabs/LegacyTabIndicatorProps.js +2 -0
- package/build/module/Tabs/LegacyTabIndicatorProps.js.map +1 -0
- package/build/module/Tabs/LegacyTabs.js +180 -0
- package/build/module/Tabs/LegacyTabs.js.map +1 -0
- package/build/module/Tabs/LegacyTabsProps.js +2 -0
- package/build/module/Tabs/LegacyTabsProps.js.map +1 -0
- package/build/module/Tabs/TabIndicator.js +5 -9
- package/build/module/Tabs/TabIndicator.js.map +1 -1
- package/build/module/Tabs/TabIndicatorProps.js.map +1 -1
- package/build/module/Tabs/Tabs.js +10 -9
- package/build/module/Tabs/Tabs.js.map +1 -1
- package/build/module/Tabs/TabsProps.js +1 -1
- package/build/module/Tabs/TabsProps.js.map +1 -1
- package/build/module/Tabs/index.js +1 -1
- package/build/module/Tabs/index.js.map +1 -1
- package/build/module/TextField/LegacyTextField.js +169 -0
- package/build/module/TextField/LegacyTextField.js.map +1 -0
- package/build/module/TextField/LegacyTextFieldProps.js +2 -0
- package/build/module/TextField/LegacyTextFieldProps.js.map +1 -0
- package/build/module/TextField/OutlinedTextField.js.map +1 -1
- package/build/module/TextField/TextField.js +104 -144
- package/build/module/TextField/TextField.js.map +1 -1
- package/build/module/TextField/TextFieldProps.js +2 -1
- package/build/module/TextField/TextFieldProps.js.map +1 -1
- package/build/module/TextField/index.js +1 -1
- package/build/module/TextField/index.js.map +1 -1
- package/build/module/TextField/useVariantStyleMap.js +94 -0
- package/build/module/TextField/useVariantStyleMap.js.map +1 -0
- package/build/module/Toggle/Toggle.js +90 -0
- package/build/module/Toggle/Toggle.js.map +1 -0
- package/build/module/Toggle/ToggleProps.js +2 -0
- package/build/module/Toggle/ToggleProps.js.map +1 -0
- package/build/module/Toggle/index.js +2 -0
- package/build/module/Toggle/index.js.map +1 -0
- package/build/module/Tooltip/Beaks/Beak.js +56 -0
- package/build/module/Tooltip/Beaks/Beak.js.map +1 -0
- package/build/module/Tooltip/Beaks/BeakProps.js +2 -0
- package/build/module/Tooltip/Beaks/BeakProps.js.map +1 -0
- package/build/module/Tooltip/Beaks/HorizontalLargeBeak.js +14 -0
- package/build/module/Tooltip/Beaks/HorizontalLargeBeak.js.map +1 -0
- package/build/module/Tooltip/Beaks/HorizontalSmallBeak.js +14 -0
- package/build/module/Tooltip/Beaks/HorizontalSmallBeak.js.map +1 -0
- package/build/module/Tooltip/Beaks/VerticalLargeBeak.js +14 -0
- package/build/module/Tooltip/Beaks/VerticalLargeBeak.js.map +1 -0
- package/build/module/Tooltip/Beaks/VerticalSmallBeak.js +14 -0
- package/build/module/Tooltip/Beaks/VerticalSmallBeak.js.map +1 -0
- package/build/module/Tooltip/Beaks/index.js +2 -0
- package/build/module/Tooltip/Beaks/index.js.map +1 -0
- package/build/module/Tooltip/LegacyTooltip.js +121 -0
- package/build/module/Tooltip/LegacyTooltip.js.map +1 -0
- package/build/module/Tooltip/LegacyTooltipProps.js +2 -0
- package/build/module/Tooltip/LegacyTooltipProps.js.map +1 -0
- package/build/module/Tooltip/Tooltip.js +97 -46
- package/build/module/Tooltip/Tooltip.js.map +1 -1
- package/build/module/Tooltip/TooltipProps.js +3 -1
- package/build/module/Tooltip/TooltipProps.js.map +1 -1
- package/build/module/Tooltip/index.js +1 -1
- package/build/module/Tooltip/index.js.map +1 -1
- package/build/module/Typography/LegacyTypography.js +126 -0
- package/build/module/Typography/LegacyTypography.js.map +1 -0
- package/build/module/Typography/LegacyTypographyProps.js +2 -0
- package/build/module/Typography/LegacyTypographyProps.js.map +1 -0
- package/build/module/Typography/Typography.js +15 -54
- package/build/module/Typography/Typography.js.map +1 -1
- package/build/module/Typography/TypographyProps.js +1 -1
- package/build/module/Typography/TypographyProps.js.map +1 -1
- package/build/module/Typography/index.js +1 -1
- package/build/module/Typography/index.js.map +1 -1
- package/build/module/hooks/useCollapsibleAppBar.js +14 -6
- package/build/module/hooks/useCollapsibleAppBar.js.map +1 -1
- package/build/module/index.js +10 -0
- package/build/module/index.js.map +1 -1
- package/build/module/internal/icons/Check.js +9 -0
- package/build/module/internal/icons/Check.js.map +1 -0
- package/build/module/internal/icons/CheckCircle.js +13 -0
- package/build/module/internal/icons/CheckCircle.js.map +1 -0
- package/build/module/internal/icons/CheckboxOn.js +9 -0
- package/build/module/internal/icons/CheckboxOn.js.map +1 -0
- package/build/module/internal/icons/Clear.js +13 -0
- package/build/module/internal/icons/Clear.js.map +1 -0
- package/build/module/internal/icons/EyeOff.js +17 -0
- package/build/module/internal/icons/EyeOff.js.map +1 -0
- package/build/module/internal/icons/EyeOn.js +13 -0
- package/build/module/internal/icons/EyeOn.js.map +1 -0
- package/build/module/internal/icons/InfoCircle.js +13 -0
- package/build/module/internal/icons/InfoCircle.js.map +1 -0
- package/build/module/internal/icons/LoadingSpinner/LoadingSpinnerProps.js +2 -0
- package/build/module/internal/icons/LoadingSpinner/LoadingSpinnerProps.js.map +1 -0
- package/build/module/internal/icons/LoadingSpinner/index.js +23 -0
- package/build/module/internal/icons/LoadingSpinner/index.js.map +1 -0
- package/build/module/internal/icons/LoadingSpinner/index.native.js +23 -0
- package/build/module/internal/icons/LoadingSpinner/index.native.js.map +1 -0
- package/build/module/internal/icons/LoadingSpinner/loadingSpinnerGray.json +1 -0
- package/build/module/internal/icons/LoadingSpinner/loadingSpinnerWhite.json +1 -0
- package/build/module/internal/icons/LoadingSpinner/utils.js +12 -0
- package/build/module/internal/icons/LoadingSpinner/utils.js.map +1 -0
- package/build/module/internal/icons/Search.js +9 -0
- package/build/module/internal/icons/Search.js.map +1 -0
- package/build/module/internal/icons/index.js +9 -0
- package/build/module/internal/icons/index.js.map +1 -1
- package/build/module/styles/createFontStyle.js.map +1 -1
- package/build/module/utils/cloneElementSafely.js.map +1 -1
- package/build/module/utils/createSvgIcon.js +14 -3
- package/build/module/utils/createSvgIcon.js.map +1 -1
- package/build/module/utils/index.js.map +1 -1
- package/build/typescript/Accordion/Accordion.d.ts +1 -1
- package/build/typescript/Accordion/AccordionProps.d.ts +8 -1
- package/build/typescript/Accordion/LegacyAccordion.d.ts +3 -0
- package/build/typescript/Accordion/LegacyAccordionProps.d.ts +28 -0
- package/build/typescript/Accordion/index.d.ts +2 -2
- package/build/typescript/Accordion/useVariantStyleMap.d.ts +13 -0
- package/build/typescript/Badge/Badge.d.ts +1 -1
- package/build/typescript/Badge/BadgeProps.d.ts +28 -2
- package/build/typescript/Badge/LegacyBadge.d.ts +3 -0
- package/build/typescript/Badge/LegacyBadgeProps.d.ts +34 -0
- package/build/typescript/Badge/index.d.ts +2 -2
- package/build/typescript/Badge/useVariantStyleMap.d.ts +9 -0
- package/build/typescript/Button/ButtonProps.d.ts +18 -11
- package/build/typescript/Button/LegacyButton.d.ts +3 -0
- package/build/typescript/Button/LegacyButtonProps.d.ts +51 -0
- package/build/typescript/Button/index.d.ts +2 -2
- package/build/typescript/Button/useVariantStyleMap.d.ts +9 -0
- package/build/typescript/ButtonBase/ButtonBase.d.ts +0 -1
- package/build/typescript/ButtonBase/LegacyButtonBase.d.ts +5 -0
- package/build/typescript/ButtonBase/index.d.ts +1 -1
- package/build/typescript/ButtonSet/ButtonSet.d.ts +3 -0
- package/build/typescript/ButtonSet/ButtonSetProps.d.ts +20 -0
- package/build/typescript/ButtonSet/index.d.ts +3 -0
- package/build/typescript/ButtonSet/useVariantStyleMap.d.ts +10 -0
- package/build/typescript/Checkbox/CheckboxProps.d.ts +10 -14
- package/build/typescript/Checkbox/LegacyCheckbox.d.ts +3 -0
- package/build/typescript/Checkbox/LegacyCheckboxProps.d.ts +36 -0
- package/build/typescript/Checkbox/index.d.ts +2 -2
- package/build/typescript/Checkbox/useVariantStyleMap.d.ts +9 -0
- package/build/typescript/CheckboxGroup/CheckboxGroup.d.ts +3 -0
- package/build/typescript/CheckboxGroup/CheckboxGroupProps.d.ts +11 -0
- package/build/typescript/CheckboxGroup/index.d.ts +2 -0
- package/build/typescript/Chip/ChipProps.d.ts +13 -6
- package/build/typescript/Chip/LegacyChip.d.ts +3 -0
- package/build/typescript/Chip/LegacyChipProps.d.ts +28 -0
- package/build/typescript/Chip/index.d.ts +2 -2
- package/build/typescript/Chip/useChipStyle.d.ts +11 -0
- package/build/typescript/Empty/Empty.d.ts +3 -0
- package/build/typescript/Empty/EmptyProps.d.ts +27 -0
- package/build/typescript/Empty/index.d.ts +2 -0
- package/build/typescript/IconButton/IconButtonProps.d.ts +7 -10
- package/build/typescript/IconButton/LegacyIconButton.d.ts +3 -0
- package/build/typescript/IconButton/LegacyIconButtonProps.d.ts +30 -0
- package/build/typescript/IconButton/index.d.ts +2 -2
- package/build/typescript/Pagination/LegacyPagination.d.ts +3 -0
- package/build/typescript/Pagination/LegacyPaginationProps.d.ts +71 -0
- package/build/typescript/Pagination/NumberPagination.d.ts +8 -0
- package/build/typescript/Pagination/PaginationProps.d.ts +7 -0
- package/build/typescript/Pagination/index.d.ts +2 -2
- package/build/typescript/PaginationItem/LegacyPaginationItem.d.ts +5 -0
- package/build/typescript/Radio/LegacyRadio.d.ts +3 -0
- package/build/typescript/Radio/LegacyRadioProps.d.ts +43 -0
- package/build/typescript/Radio/RadioProps.d.ts +9 -14
- package/build/typescript/Radio/index.d.ts +2 -2
- package/build/typescript/RadioGroup/LegacyRadioGroup.d.ts +3 -0
- package/build/typescript/RadioGroup/index.d.ts +1 -1
- package/build/typescript/ShadowView/ShadowView.d.ts +3 -0
- package/build/typescript/ShadowView/ShadowView.native.d.ts +3 -0
- package/build/typescript/ShadowView/ShadowViewProps.d.ts +11 -0
- package/build/typescript/ShadowView/index.d.ts +2 -0
- package/build/typescript/Snackbar/LegacySnackbar.d.ts +3 -0
- package/build/typescript/Snackbar/LegacySnackbarProps.d.ts +51 -0
- package/build/typescript/Snackbar/SnackbarProps.d.ts +9 -2
- package/build/typescript/Snackbar/index.d.ts +2 -2
- package/build/typescript/SnackbarContent/LegacySnackbarContent.d.ts +3 -0
- package/build/typescript/SnackbarContent/LegacySnackbarContentProps.d.ts +26 -0
- package/build/typescript/SnackbarContent/SnackbarContentProps.d.ts +5 -24
- package/build/typescript/SnackbarContent/StatusIcon.d.ts +7 -0
- package/build/typescript/SnackbarContent/index.d.ts +2 -2
- package/build/typescript/SvgIcon/LegacySvgIcon.d.ts +3 -0
- package/build/typescript/SvgIcon/LegacySvgIconProps.d.ts +35 -0
- package/build/typescript/SvgIcon/SvgIconProps.d.ts +17 -6
- package/build/typescript/SvgIcon/index.d.ts +2 -2
- package/build/typescript/Tab/LegacyTab.d.ts +3 -0
- package/build/typescript/Tab/LegacyTabProps.d.ts +58 -0
- package/build/typescript/Tab/TabIndicator.d.ts +2 -2
- package/build/typescript/Tab/TabProps.d.ts +3 -16
- package/build/typescript/Tab/index.d.ts +2 -2
- package/build/typescript/Tab/useVariantStyleMap.d.ts +10 -0
- package/build/typescript/TabBase/LegacyTabBase.d.ts +3 -0
- package/build/typescript/TabBase/index.d.ts +1 -1
- package/build/typescript/Tabs/LegacyTabIndicator.d.ts +3 -0
- package/build/typescript/Tabs/LegacyTabIndicatorProps.d.ts +28 -0
- package/build/typescript/Tabs/LegacyTabs.d.ts +5 -0
- package/build/typescript/Tabs/LegacyTabsProps.d.ts +74 -0
- package/build/typescript/Tabs/TabIndicatorProps.d.ts +0 -10
- package/build/typescript/Tabs/Tabs.d.ts +1 -1
- package/build/typescript/Tabs/TabsProps.d.ts +10 -10
- package/build/typescript/Tabs/index.d.ts +2 -2
- package/build/typescript/TextField/LegacyTextField.d.ts +5 -0
- package/build/typescript/TextField/LegacyTextFieldProps.d.ts +67 -0
- package/build/typescript/TextField/OutlinedTextField.d.ts +1 -1
- package/build/typescript/TextField/TextField.d.ts +1 -1
- package/build/typescript/TextField/TextFieldProps.d.ts +25 -51
- package/build/typescript/TextField/index.d.ts +2 -2
- package/build/typescript/TextField/useVariantStyleMap.d.ts +9 -0
- package/build/typescript/Toggle/Toggle.d.ts +3 -0
- package/build/typescript/Toggle/ToggleProps.d.ts +19 -0
- package/build/typescript/Toggle/index.d.ts +2 -0
- package/build/typescript/Tooltip/Beaks/Beak.d.ts +3 -0
- package/build/typescript/Tooltip/Beaks/BeakProps.d.ts +4 -0
- package/build/typescript/Tooltip/Beaks/HorizontalLargeBeak.d.ts +3 -0
- package/build/typescript/Tooltip/Beaks/HorizontalSmallBeak.d.ts +3 -0
- package/build/typescript/Tooltip/Beaks/VerticalLargeBeak.d.ts +3 -0
- package/build/typescript/Tooltip/Beaks/VerticalSmallBeak.d.ts +3 -0
- package/build/typescript/Tooltip/Beaks/index.d.ts +2 -0
- package/build/typescript/Tooltip/LegacyTooltip.d.ts +3 -0
- package/build/typescript/Tooltip/LegacyTooltipProps.d.ts +72 -0
- package/build/typescript/Tooltip/TooltipProps.d.ts +19 -9
- package/build/typescript/Tooltip/index.d.ts +2 -2
- package/build/typescript/Typography/LegacyTypography.d.ts +5 -0
- package/build/typescript/Typography/LegacyTypographyProps.d.ts +81 -0
- package/build/typescript/Typography/Typography.d.ts +1 -1
- package/build/typescript/Typography/TypographyProps.d.ts +12 -9
- package/build/typescript/Typography/index.d.ts +2 -2
- package/build/typescript/hooks/useCollapsibleAppBar.d.ts +1 -0
- package/build/typescript/index.d.ts +10 -0
- package/build/typescript/internal/icons/Check.d.ts +8 -0
- package/build/typescript/internal/icons/CheckCircle.d.ts +8 -0
- package/build/typescript/internal/icons/Checkbox.d.ts +2 -124
- package/build/typescript/internal/icons/CheckboxChecked.d.ts +2 -124
- package/build/typescript/internal/icons/CheckboxOn.d.ts +8 -0
- package/build/typescript/internal/icons/ChevronDown.d.ts +2 -124
- package/build/typescript/internal/icons/ChevronLeft.d.ts +2 -124
- package/build/typescript/internal/icons/ChevronRight.d.ts +2 -124
- package/build/typescript/internal/icons/Clear.d.ts +8 -0
- package/build/typescript/internal/icons/Close.d.ts +2 -124
- package/build/typescript/internal/icons/EyeOff.d.ts +8 -0
- package/build/typescript/internal/icons/EyeOn.d.ts +8 -0
- package/build/typescript/internal/icons/InfoCircle.d.ts +8 -0
- package/build/typescript/internal/icons/LoadingSpinner/LoadingSpinnerProps.d.ts +9 -0
- package/build/typescript/internal/icons/LoadingSpinner/index.d.ts +3 -0
- package/build/typescript/internal/icons/LoadingSpinner/index.native.d.ts +3 -0
- package/build/typescript/internal/icons/LoadingSpinner/utils.d.ts +3 -0
- package/build/typescript/internal/icons/Radio.d.ts +2 -124
- package/build/typescript/internal/icons/RadioChecked.d.ts +2 -124
- package/build/typescript/internal/icons/Search.d.ts +8 -0
- package/build/typescript/internal/icons/index.d.ts +9 -0
- package/build/typescript/styles/createFontStyle.d.ts +1 -1
- package/build/typescript/utils/cloneElementSafely.d.ts +1 -2
- package/build/typescript/utils/createSvgIcon.d.ts +8 -3
- package/build/typescript/utils/index.d.ts +1 -0
- package/package.json +2 -2
- package/src/Accordion/Accordion.tsx +75 -72
- package/src/Accordion/AccordionProps.ts +11 -2
- package/src/Accordion/LegacyAccordion.tsx +188 -0
- package/src/Accordion/LegacyAccordionProps.ts +34 -0
- package/src/Accordion/index.ts +2 -2
- package/src/Accordion/useVariantStyleMap.ts +127 -0
- package/src/Badge/Badge.tsx +23 -29
- package/src/Badge/BadgeProps.ts +35 -2
- package/src/Badge/LegacyBadge.tsx +66 -0
- package/src/Badge/LegacyBadgeProps.ts +40 -0
- package/src/Badge/index.ts +2 -2
- package/src/Badge/useVariantStyleMap.ts +73 -0
- package/src/Button/Button.tsx +113 -81
- package/src/Button/ButtonProps.ts +37 -12
- package/src/Button/LegacyButton.tsx +157 -0
- package/src/Button/LegacyButtonProps.ts +62 -0
- package/src/Button/index.ts +2 -2
- package/src/Button/useVariantStyleMap.ts +178 -0
- package/src/ButtonBase/ButtonBase.tsx +4 -10
- package/src/ButtonBase/LegacyButtonBase.tsx +135 -0
- package/src/ButtonBase/index.ts +2 -2
- package/src/ButtonSet/ButtonSet.tsx +43 -0
- package/src/ButtonSet/ButtonSetProps.ts +27 -0
- package/src/ButtonSet/index.ts +3 -0
- package/src/ButtonSet/useVariantStyleMap.ts +84 -0
- package/src/Checkbox/Checkbox.tsx +48 -33
- package/src/Checkbox/CheckboxProps.ts +10 -15
- package/src/Checkbox/LegacyCheckbox.tsx +62 -0
- package/src/Checkbox/LegacyCheckboxProps.ts +42 -0
- package/src/Checkbox/index.ts +2 -2
- package/src/Checkbox/useVariantStyleMap.ts +71 -0
- package/src/CheckboxGroup/CheckboxGroup.tsx +47 -0
- package/src/CheckboxGroup/CheckboxGroupProps.ts +11 -0
- package/src/CheckboxGroup/index.ts +2 -0
- package/src/Chip/Chip.tsx +26 -82
- package/src/Chip/ChipProps.ts +16 -7
- package/src/Chip/LegacyChip.tsx +116 -0
- package/src/Chip/LegacyChipProps.ts +33 -0
- package/src/Chip/index.ts +2 -2
- package/src/Chip/useChipStyle.ts +123 -0
- package/src/Empty/Empty.tsx +108 -0
- package/src/Empty/EmptyProps.ts +31 -0
- package/src/Empty/index.ts +2 -0
- package/src/IconButton/IconButton.tsx +36 -54
- package/src/IconButton/IconButtonProps.ts +12 -12
- package/src/IconButton/LegacyIconButton.tsx +97 -0
- package/src/IconButton/LegacyIconButtonProps.ts +36 -0
- package/src/IconButton/index.ts +2 -2
- package/src/Pagination/LegacyPagination.tsx +168 -0
- package/src/Pagination/LegacyPaginationProps.ts +85 -0
- package/src/Pagination/NumberPagination.tsx +78 -0
- package/src/Pagination/Pagination.tsx +15 -5
- package/src/Pagination/PaginationProps.ts +9 -0
- package/src/Pagination/index.ts +2 -2
- package/src/PaginationItem/LegacyPaginationItem.tsx +52 -0
- package/src/PaginationItem/PaginationItem.tsx +2 -2
- package/src/Radio/LegacyRadio.tsx +72 -0
- package/src/Radio/LegacyRadioProps.ts +50 -0
- package/src/Radio/Radio.tsx +47 -16
- package/src/Radio/RadioProps.ts +10 -16
- package/src/Radio/index.ts +2 -2
- package/src/RadioGroup/LegacyRadioGroup.tsx +20 -0
- package/src/RadioGroup/RadioGroup.tsx +31 -4
- package/src/RadioGroup/index.ts +2 -2
- package/src/ShadowView/ShadowView.native.tsx +37 -0
- package/src/ShadowView/ShadowView.tsx +33 -0
- package/src/ShadowView/ShadowViewProps.ts +11 -0
- package/src/ShadowView/index.ts +2 -0
- package/src/Snackbar/LegacySnackbar.tsx +130 -0
- package/src/Snackbar/LegacySnackbarProps.ts +61 -0
- package/src/Snackbar/Snackbar.tsx +7 -5
- package/src/Snackbar/SnackbarProps.ts +11 -3
- package/src/Snackbar/index.ts +2 -2
- package/src/SnackbarContent/LegacySnackbarContent.tsx +129 -0
- package/src/SnackbarContent/LegacySnackbarContentProps.ts +30 -0
- package/src/SnackbarContent/SnackbarContent.tsx +53 -48
- package/src/SnackbarContent/SnackbarContentProps.ts +10 -27
- package/src/SnackbarContent/StatusIcon.tsx +37 -0
- package/src/SnackbarContent/index.ts +2 -2
- package/src/SvgIcon/LegacySvgIcon.tsx +36 -0
- package/src/SvgIcon/LegacySvgIconProps.ts +41 -0
- package/src/SvgIcon/SvgIcon.tsx +19 -5
- package/src/SvgIcon/SvgIconProps.ts +33 -6
- package/src/SvgIcon/index.ts +2 -2
- package/src/Tab/LegacyTab.tsx +141 -0
- package/src/Tab/LegacyTabProps.ts +68 -0
- package/src/Tab/Tab.tsx +36 -79
- package/src/Tab/TabIndicator.tsx +5 -2
- package/src/Tab/TabProps.ts +3 -18
- package/src/Tab/index.ts +2 -2
- package/src/Tab/useVariantStyleMap.ts +86 -0
- package/src/TabBase/LegacyTabBase.tsx +55 -0
- package/src/TabBase/TabBase.tsx +0 -5
- package/src/TabBase/index.ts +2 -2
- package/src/Tabs/LegacyTabIndicator.tsx +111 -0
- package/src/Tabs/LegacyTabIndicatorProps.ts +33 -0
- package/src/Tabs/LegacyTabs.tsx +225 -0
- package/src/Tabs/LegacyTabsProps.ts +87 -0
- package/src/Tabs/TabIndicator.tsx +6 -12
- package/src/Tabs/TabIndicatorProps.ts +0 -13
- package/src/Tabs/Tabs.tsx +12 -8
- package/src/Tabs/TabsProps.ts +12 -11
- package/src/Tabs/index.ts +2 -2
- package/src/TextField/LegacyTextField.tsx +168 -0
- package/src/TextField/LegacyTextFieldProps.ts +80 -0
- package/src/TextField/OutlinedTextField.tsx +1 -1
- package/src/TextField/TextField.tsx +155 -137
- package/src/TextField/TextFieldProps.ts +27 -57
- package/src/TextField/index.tsx +2 -2
- package/src/TextField/useVariantStyleMap.ts +100 -0
- package/src/Toggle/Toggle.tsx +113 -0
- package/src/Toggle/ToggleProps.ts +21 -0
- package/src/Toggle/index.ts +2 -0
- package/src/Tooltip/Beaks/Beak.tsx +53 -0
- package/src/Tooltip/Beaks/BeakProps.ts +4 -0
- package/src/Tooltip/Beaks/HorizontalLargeBeak.tsx +18 -0
- package/src/Tooltip/Beaks/HorizontalSmallBeak.tsx +18 -0
- package/src/Tooltip/Beaks/VerticalLargeBeak.tsx +18 -0
- package/src/Tooltip/Beaks/VerticalSmallBeak.tsx +18 -0
- package/src/Tooltip/Beaks/index.ts +2 -0
- package/src/Tooltip/LegacyTooltip.tsx +167 -0
- package/src/Tooltip/LegacyTooltipProps.ts +86 -0
- package/src/Tooltip/Tooltip.tsx +114 -66
- package/src/Tooltip/TooltipProps.ts +28 -10
- package/src/Tooltip/index.ts +2 -2
- package/src/Typography/LegacyTypography.tsx +107 -0
- package/src/Typography/LegacyTypographyProps.ts +122 -0
- package/src/Typography/Typography.tsx +24 -30
- package/src/Typography/TypographyProps.ts +29 -34
- package/src/Typography/index.ts +2 -2
- package/src/hooks/useCollapsibleAppBar.ts +14 -5
- package/src/index.ts +15 -0
- package/src/internal/icons/Check.tsx +13 -0
- package/src/internal/icons/CheckCircle.tsx +20 -0
- package/src/internal/icons/CheckboxOn.tsx +13 -0
- package/src/internal/icons/Clear.tsx +20 -0
- package/src/internal/icons/EyeOff.tsx +25 -0
- package/src/internal/icons/EyeOn.tsx +20 -0
- package/src/internal/icons/InfoCircle.tsx +21 -0
- package/src/internal/icons/LoadingSpinner/LoadingSpinnerProps.ts +11 -0
- package/src/internal/icons/LoadingSpinner/index.native.tsx +31 -0
- package/src/internal/icons/LoadingSpinner/index.tsx +31 -0
- package/src/internal/icons/LoadingSpinner/loadingSpinnerGray.json +1 -0
- package/src/internal/icons/LoadingSpinner/loadingSpinnerWhite.json +1 -0
- package/src/internal/icons/LoadingSpinner/utils.ts +14 -0
- package/src/internal/icons/Search.tsx +15 -0
- package/src/internal/icons/index.ts +9 -0
- package/src/styles/createFontStyle.ts +1 -1
- package/src/utils/cloneElementSafely.ts +1 -1
- package/src/utils/createSvgIcon.tsx +29 -6
- package/src/utils/index.ts +1 -0
|
@@ -1,97 +1,121 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { Linking, Text } from 'react-native';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import { Linking, Text, View } from 'react-native';
|
|
5
|
+
import { typographyOf } from '@fountain-ui/styles';
|
|
6
|
+
import ButtonBase from '../ButtonBase/ButtonBase';
|
|
7
|
+
import { LoadingSpinner } from '../internal/icons';
|
|
8
|
+
import { createFontStyle, css, useTheme } from '../styles';
|
|
7
9
|
import { cloneElementSafely } from '../utils';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
import useVariantStyleMap from './useVariantStyleMap';
|
|
11
|
+
|
|
12
|
+
const useStyles = function () {
|
|
13
|
+
const theme = useTheme();
|
|
14
|
+
return {
|
|
15
|
+
root: {
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
borderRadius: theme.shape.radius.sm,
|
|
18
|
+
flexDirection: 'row',
|
|
19
|
+
justifyContent: 'center'
|
|
20
|
+
},
|
|
21
|
+
fullWidth: {
|
|
22
|
+
width: '100%'
|
|
23
|
+
},
|
|
24
|
+
large: {
|
|
25
|
+
gap: theme.spacing(2),
|
|
26
|
+
minWidth: 104,
|
|
27
|
+
paddingHorizontal: theme.spacing(6),
|
|
28
|
+
paddingVertical: theme.spacing(3.5)
|
|
29
|
+
},
|
|
30
|
+
medium: {
|
|
31
|
+
gap: theme.spacing(1.5),
|
|
32
|
+
minWidth: 88,
|
|
33
|
+
paddingHorizontal: theme.spacing(6),
|
|
34
|
+
paddingVertical: theme.spacing(2.75)
|
|
35
|
+
},
|
|
36
|
+
small: {
|
|
37
|
+
minWidth: 64,
|
|
38
|
+
paddingHorizontal: theme.spacing(6),
|
|
39
|
+
paddingVertical: theme.spacing(2)
|
|
40
|
+
},
|
|
41
|
+
loadingSpinner: {
|
|
42
|
+
position: 'absolute'
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const fontStyleMap = {
|
|
48
|
+
large: typographyOf({
|
|
49
|
+
fontSize: 16,
|
|
50
|
+
lineHeight: 20,
|
|
51
|
+
fontFamily: 'LexendDeca-SemiBold',
|
|
52
|
+
letterSpacing: -0.32
|
|
53
|
+
}),
|
|
54
|
+
medium: typographyOf({
|
|
55
|
+
fontSize: 15,
|
|
56
|
+
lineHeight: 19.5,
|
|
57
|
+
fontFamily: 'LexendDeca-SemiBold',
|
|
58
|
+
letterSpacing: -0.3
|
|
59
|
+
}),
|
|
60
|
+
small: typographyOf({
|
|
61
|
+
fontSize: 13,
|
|
62
|
+
lineHeight: 16.9,
|
|
63
|
+
fontFamily: 'LexendDeca-SemiBold',
|
|
64
|
+
letterSpacing: -0.26
|
|
65
|
+
})
|
|
11
66
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
alignItems: 'center'
|
|
17
|
-
},
|
|
18
|
-
fullWidth: {
|
|
19
|
-
width: '100%'
|
|
20
|
-
},
|
|
21
|
-
medium: {
|
|
22
|
-
minWidth: 104,
|
|
23
|
-
height: 48
|
|
24
|
-
},
|
|
25
|
-
small: {
|
|
26
|
-
minWidth: 56,
|
|
27
|
-
height: 32
|
|
67
|
+
|
|
68
|
+
function getLoadingSpinnerColor(variant, color) {
|
|
69
|
+
if (variant === 'solid' || variant === 'capsuleSolid' && color !== 'secondary') {
|
|
70
|
+
return 'white';
|
|
28
71
|
}
|
|
29
|
-
|
|
72
|
+
|
|
73
|
+
return 'gray';
|
|
74
|
+
}
|
|
75
|
+
|
|
30
76
|
export default function Button(props) {
|
|
31
77
|
const {
|
|
32
78
|
children,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
79
|
+
color: colorProp = 'primary',
|
|
80
|
+
disabled: disabledProp = false,
|
|
81
|
+
disableMinWidth = false,
|
|
36
82
|
endIcon: endIconProp,
|
|
37
83
|
fullWidth = false,
|
|
38
84
|
href,
|
|
85
|
+
isLoading = false,
|
|
39
86
|
onPress,
|
|
40
87
|
pressEffect,
|
|
41
88
|
size = 'medium',
|
|
42
89
|
startIcon: startIconProp,
|
|
43
90
|
style: styleProp,
|
|
44
|
-
variant = '
|
|
91
|
+
variant = 'solid',
|
|
45
92
|
...otherProps
|
|
46
93
|
} = props;
|
|
47
94
|
const theme = useTheme();
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
borderColor: mainColor,
|
|
57
|
-
borderStyle: 'solid',
|
|
58
|
-
borderWidth: 1
|
|
59
|
-
},
|
|
60
|
-
text: {
|
|
61
|
-
backgroundColor: 'transparent'
|
|
62
|
-
}
|
|
63
|
-
};
|
|
95
|
+
const styles = useStyles();
|
|
96
|
+
const disabled = disabledProp || isLoading;
|
|
97
|
+
const color = disabledProp ? 'disabled' : colorProp;
|
|
98
|
+
const {
|
|
99
|
+
container: containerStyle,
|
|
100
|
+
iconColor,
|
|
101
|
+
labelColor
|
|
102
|
+
} = useVariantStyleMap(variant, color);
|
|
64
103
|
const iconProps = {
|
|
65
|
-
|
|
66
|
-
height: iconSizes[size],
|
|
67
|
-
fill: fontColor
|
|
104
|
+
fill: iconColor
|
|
68
105
|
};
|
|
69
106
|
const startIcon = cloneElementSafely(startIconProp, iconProps);
|
|
70
107
|
const endIcon = cloneElementSafely(endIconProp, iconProps);
|
|
71
|
-
const
|
|
72
|
-
const paddingLeft = startIcon ? paddingSize - theme.spacing(1) : paddingSize;
|
|
73
|
-
const paddingRight = endIcon ? paddingSize - theme.spacing(1) : paddingSize;
|
|
74
|
-
const borderRadius = theme.shape.roundnessLarge;
|
|
75
|
-
const buttonBaseStyle = css([styles.root, variantStyleMap[variant], size === 'medium' ? styles.medium : styles.small, fullWidth ? styles.fullWidth : undefined, {
|
|
76
|
-
borderRadius,
|
|
77
|
-
color: fontColor
|
|
78
|
-
}, variant === 'text' && clipHorizontalSpacing ? {
|
|
108
|
+
const buttonBaseStyle = css([styles.root, containerStyle, styles[size], fullWidth ? styles.fullWidth : undefined, disableMinWidth ? {
|
|
79
109
|
minWidth: 0
|
|
80
|
-
} :
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
110
|
+
} : undefined, styleProp]);
|
|
111
|
+
const contentStyle = css({
|
|
112
|
+
opacity: isLoading ? 0 : 1
|
|
113
|
+
});
|
|
84
114
|
const fontStyle = createFontStyle(theme, {
|
|
85
|
-
selector:
|
|
86
|
-
color:
|
|
115
|
+
selector: _ => fontStyleMap[size],
|
|
116
|
+
color: labelColor
|
|
87
117
|
});
|
|
88
|
-
const
|
|
89
|
-
const textMarginStyle = startIcon ? {
|
|
90
|
-
marginLeft: textMarginSize
|
|
91
|
-
} : endIcon ? {
|
|
92
|
-
marginRight: textMarginSize
|
|
93
|
-
} : undefined;
|
|
94
|
-
const textStyle = css([fontStyle, textMarginStyle, {
|
|
118
|
+
const textStyle = css([fontStyle, {
|
|
95
119
|
textAlign: 'center'
|
|
96
120
|
}]);
|
|
97
121
|
const modifiedPressEffect = variant !== 'text' && !pressEffect ? 'scale' : pressEffect;
|
|
@@ -113,15 +137,21 @@ export default function Button(props) {
|
|
|
113
137
|
}
|
|
114
138
|
};
|
|
115
139
|
|
|
140
|
+
const loadingSpinnerColor = getLoadingSpinnerColor(variant, color);
|
|
116
141
|
return /*#__PURE__*/React.createElement(ButtonBase, _extends({
|
|
117
142
|
disabled: disabled,
|
|
118
143
|
onPress: handlePress,
|
|
119
144
|
style: buttonBaseStyle,
|
|
120
145
|
pressEffect: modifiedPressEffect
|
|
121
|
-
}, otherProps),
|
|
122
|
-
|
|
146
|
+
}, otherProps), /*#__PURE__*/React.createElement(View, {
|
|
147
|
+
style: contentStyle
|
|
148
|
+
}, startIcon, /*#__PURE__*/React.createElement(Text, {
|
|
123
149
|
style: textStyle
|
|
124
|
-
}), endIcon)
|
|
150
|
+
}, children), endIcon), isLoading ? /*#__PURE__*/React.createElement(LoadingSpinner, {
|
|
151
|
+
color: loadingSpinnerColor,
|
|
152
|
+
size: size,
|
|
153
|
+
style: styles.loadingSpinner
|
|
154
|
+
}) : null);
|
|
125
155
|
}
|
|
126
156
|
;
|
|
127
157
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Linking","Text","ButtonBase","createFontStyle","css","StyleSheet","useTheme","cloneElementSafely","iconSizes","small","medium","styles","create","root","flexDirection","justifyContent","alignItems","fullWidth","width","minWidth","height","Button","props","children","clipHorizontalSpacing","color","disabled","endIcon","endIconProp","href","onPress","pressEffect","size","startIcon","startIconProp","style","styleProp","variant","otherProps","theme","mainColor","palette","main","fontColor","contrastTextColor","variantStyleMap","contained","backgroundColor","outlined","borderColor","borderStyle","borderWidth","text","iconProps","fill","paddingSize","spacing","paddingLeft","paddingRight","borderRadius","shape","roundnessLarge","buttonBaseStyle","undefined","fontStyle","selector","typo","button2","button1","textMarginSize","textMarginStyle","marginLeft","marginRight","textStyle","textAlign","modifiedPressEffect","handlePress","canOpenURL","openURL"],"sources":["Button.tsx"],"sourcesContent":["import React from 'react';\nimport { Linking, Text } from 'react-native';\nimport ButtonBase from '../ButtonBase';\nimport { createFontStyle, css, StyleSheet, useTheme } from '../styles';\nimport { cloneElementSafely } from '../utils';\nimport type ButtonProps from './ButtonProps';\nimport type { ButtonSize } from './ButtonProps';\n\ntype IconSizes = { [n in ButtonSize]: number };\n\nconst iconSizes: IconSizes = {\n small: 20,\n medium: 24,\n};\n\nconst styles = StyleSheet.create({\n root: {\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n },\n fullWidth: {\n width: '100%',\n },\n medium: {\n minWidth: 104,\n height: 48,\n },\n small: {\n minWidth: 56,\n height: 32,\n },\n});\n\nexport default function Button(props: ButtonProps) {\n const {\n children,\n clipHorizontalSpacing = false,\n color = 'primary',\n disabled = false,\n endIcon: endIconProp,\n fullWidth = false,\n href,\n onPress,\n pressEffect,\n size = 'medium',\n startIcon: startIconProp,\n style: styleProp,\n variant = 'contained',\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const mainColor = theme.palette[color].main;\n\n const fontColor = variant === 'contained'\n ? theme.palette[color].contrastTextColor\n : theme.palette[color].main;\n\n const variantStyleMap = {\n contained: {\n backgroundColor: mainColor,\n },\n outlined: {\n backgroundColor: 'transparent',\n borderColor: mainColor,\n borderStyle: 'solid',\n borderWidth: 1,\n },\n text: {\n backgroundColor: 'transparent',\n },\n };\n\n const iconProps = {\n width: iconSizes[size],\n height: iconSizes[size],\n fill: fontColor,\n };\n\n const startIcon = cloneElementSafely(startIconProp, iconProps);\n const endIcon = cloneElementSafely(endIconProp, iconProps);\n\n const paddingSize = size === 'small' ? theme.spacing(3) : theme.spacing(4);\n const paddingLeft = startIcon ? paddingSize - theme.spacing(1) : paddingSize;\n const paddingRight = endIcon ? paddingSize - theme.spacing(1) : paddingSize;\n\n const borderRadius = theme.shape.roundnessLarge;\n const buttonBaseStyle = css([\n styles.root,\n variantStyleMap[variant],\n size === 'medium' ? styles.medium : styles.small,\n fullWidth ? styles.fullWidth : undefined,\n { borderRadius, color: fontColor },\n (variant === 'text' && clipHorizontalSpacing)\n ? { minWidth: 0 }\n : { paddingLeft, paddingRight },\n styleProp,\n ]);\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => size === 'small' ? typo.button2 : typo.button1,\n color: fontColor,\n });\n\n const textMarginSize = size === 'small' ? theme.spacing(1) : theme.spacing(2);\n const textMarginStyle = startIcon\n ? { marginLeft: textMarginSize }\n : endIcon\n ? { marginRight: textMarginSize }\n : undefined;\n\n const textStyle = css([\n fontStyle,\n textMarginStyle,\n { textAlign: 'center' },\n ]);\n\n const modifiedPressEffect = variant !== 'text' && !pressEffect\n ? 'scale'\n : pressEffect;\n\n const handlePress = async () => {\n if (disabled) {\n return;\n }\n if (onPress) {\n onPress();\n return;\n }\n if (href) {\n if (await Linking.canOpenURL(href)) {\n await Linking.openURL(href);\n }\n }\n };\n\n return (\n <ButtonBase\n disabled={disabled}\n onPress={handlePress}\n style={buttonBaseStyle}\n pressEffect={modifiedPressEffect}\n {...otherProps}\n >\n {startIcon}\n\n <Text\n children={children}\n style={textStyle}\n />\n\n {endIcon}\n </ButtonBase>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,OAAT,EAAkBC,IAAlB,QAA8B,cAA9B;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,UAA/B,EAA2CC,QAA3C,QAA2D,WAA3D;AACA,SAASC,kBAAT,QAAmC,UAAnC;AAMA,MAAMC,SAAoB,GAAG;EACzBC,KAAK,EAAE,EADkB;EAEzBC,MAAM,EAAE;AAFiB,CAA7B;AAKA,MAAMC,MAAM,GAAGN,UAAU,CAACO,MAAX,CAAkB;EAC7BC,IAAI,EAAE;IACFC,aAAa,EAAE,KADb;IAEFC,cAAc,EAAE,QAFd;IAGFC,UAAU,EAAE;EAHV,CADuB;EAM7BC,SAAS,EAAE;IACPC,KAAK,EAAE;EADA,CANkB;EAS7BR,MAAM,EAAE;IACJS,QAAQ,EAAE,GADN;IAEJC,MAAM,EAAE;EAFJ,CATqB;EAa7BX,KAAK,EAAE;IACHU,QAAQ,EAAE,EADP;IAEHC,MAAM,EAAE;EAFL;AAbsB,CAAlB,CAAf;AAmBA,eAAe,SAASC,MAAT,CAAgBC,KAAhB,EAAoC;EAC/C,MAAM;IACFC,QADE;IAEFC,qBAAqB,GAAG,KAFtB;IAGFC,KAAK,GAAG,SAHN;IAIFC,QAAQ,GAAG,KAJT;IAKFC,OAAO,EA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B;IAAEI,SAAS,EAAE;EAAb,CAHkB,CAAD,CAArB;EAMA,MAAMC,mBAAmB,GAAGtC,OAAO,KAAK,MAAZ,IAAsB,CAACN,WAAvB,GACtB,OADsB,GAEtBA,WAFN;;EAIA,MAAM6C,WAAW,GAAG,YAAY;IAC5B,IAAIlD,QAAJ,EAAc;MACV;IACH;;IACD,IAAII,OAAJ,EAAa;MACTA,OAAO;MACP;IACH;;IACD,IAAID,IAAJ,EAAU;MACN,IAAI,MAAM7B,OAAO,CAAC6E,UAAR,CAAmBhD,IAAnB,CAAV,EAAoC;QAChC,MAAM7B,OAAO,CAAC8E,OAAR,CAAgBjD,IAAhB,CAAN;MACH;IACJ;EACJ,CAbD;;EAeA,oBACI,oBAAC,UAAD;IACI,QAAQ,EAAEH,QADd;IAEI,OAAO,EAAEkD,WAFb;IAGI,KAAK,EAAEd,eAHX;IAII,WAAW,EAAEa;EAJjB,GAKQrC,UALR,GAOKL,SAPL,eASI,oBAAC,IAAD;IACI,QAAQ,EAAEV,QADd;IAEI,KAAK,EAAEkD;EAFX,EATJ,EAcK9C,OAdL,CADJ;AAkBH;AAAA"}
|
|
1
|
+
{"version":3,"names":["React","Linking","Text","View","typographyOf","ButtonBase","LoadingSpinner","createFontStyle","css","useTheme","cloneElementSafely","useVariantStyleMap","useStyles","theme","root","alignItems","borderRadius","shape","radius","sm","flexDirection","justifyContent","fullWidth","width","large","gap","spacing","minWidth","paddingHorizontal","paddingVertical","medium","small","loadingSpinner","position","fontStyleMap","fontSize","lineHeight","fontFamily","letterSpacing","getLoadingSpinnerColor","variant","color","Button","props","children","colorProp","disabled","disabledProp","disableMinWidth","endIcon","endIconProp","href","isLoading","onPress","pressEffect","size","startIcon","startIconProp","style","styleProp","otherProps","styles","container","containerStyle","iconColor","labelColor","iconProps","fill","buttonBaseStyle","undefined","contentStyle","opacity","fontStyle","selector","_","textStyle","textAlign","modifiedPressEffect","handlePress","canOpenURL","openURL","loadingSpinnerColor"],"sources":["Button.tsx"],"sourcesContent":["import React from 'react';\nimport { Linking, Text, View } from 'react-native';\nimport type { FontStyle, NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase/ButtonBase';\nimport { LoadingSpinner } from '../internal/icons';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport { cloneElementSafely } from '../utils';\nimport type ButtonProps from './ButtonProps';\nimport type { ButtonColor, ButtonSize, ButtonVariant } from './ButtonProps';\nimport useVariantStyleMap from './useVariantStyleMap';\n\ntype ButtonStyles = NamedStylesStringUnion<'root' | 'fullWidth' | 'large' | 'medium' | 'small' | 'loadingSpinner'>;\n\nconst useStyles: UseStyles<ButtonStyles> = function (): ButtonStyles {\n const theme = useTheme();\n\n return {\n root: {\n alignItems: 'center',\n borderRadius: theme.shape.radius.sm,\n flexDirection: 'row',\n justifyContent: 'center',\n },\n fullWidth: {\n width: '100%',\n },\n large: {\n gap: theme.spacing(2),\n minWidth: 104,\n paddingHorizontal: theme.spacing(6),\n paddingVertical: theme.spacing(3.5),\n },\n medium: {\n gap: theme.spacing(1.5),\n minWidth: 88,\n paddingHorizontal: theme.spacing(6),\n paddingVertical: theme.spacing(2.75),\n },\n small: {\n minWidth: 64,\n paddingHorizontal: theme.spacing(6),\n paddingVertical: theme.spacing(2),\n },\n loadingSpinner: {\n position: 'absolute',\n },\n };\n};\n\nconst fontStyleMap: Record<ButtonSize, FontStyle> = {\n large: typographyOf({\n fontSize: 16,\n lineHeight: 20,\n fontFamily: 'LexendDeca-SemiBold',\n letterSpacing: -0.32,\n }),\n medium: typographyOf({\n fontSize: 15,\n lineHeight: 19.5,\n fontFamily: 'LexendDeca-SemiBold',\n letterSpacing: -0.3,\n }),\n small: typographyOf({\n fontSize: 13,\n lineHeight: 16.9,\n fontFamily: 'LexendDeca-SemiBold',\n letterSpacing: -0.26,\n }),\n};\n\nfunction getLoadingSpinnerColor(variant: ButtonVariant, color: ButtonColor) {\n if (variant === 'solid' || (variant === 'capsuleSolid' && color !== 'secondary')) {\n return 'white';\n }\n return 'gray';\n}\n\nexport default function Button(props: ButtonProps) {\n const {\n children,\n color: colorProp = 'primary' as ButtonColor,\n disabled: disabledProp = false,\n disableMinWidth = false,\n endIcon: endIconProp,\n fullWidth = false,\n href,\n isLoading = false,\n onPress,\n pressEffect,\n size = 'medium' as ButtonSize,\n startIcon: startIconProp,\n style: styleProp,\n variant = 'solid' as ButtonVariant,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const disabled = disabledProp || isLoading;\n\n const color = disabledProp ? 'disabled' : colorProp;\n const {\n container: containerStyle,\n iconColor,\n labelColor,\n } = useVariantStyleMap(variant, color);\n\n const iconProps = {\n fill: iconColor,\n };\n\n const startIcon = cloneElementSafely(startIconProp, iconProps);\n const endIcon = cloneElementSafely(endIconProp, iconProps);\n\n const buttonBaseStyle = css([\n styles.root,\n containerStyle,\n styles[size],\n fullWidth ? styles.fullWidth : undefined,\n disableMinWidth ? { minWidth: 0 } : undefined,\n styleProp,\n ]);\n\n const contentStyle = css({\n opacity: isLoading ? 0 : 1,\n });\n\n const fontStyle = createFontStyle(theme, {\n selector: (_) => fontStyleMap[size],\n color: labelColor,\n });\n\n const textStyle = css([\n fontStyle,\n { textAlign: 'center' },\n ]);\n\n const modifiedPressEffect = variant !== 'text' && !pressEffect\n ? 'scale'\n : pressEffect;\n\n const handlePress = async () => {\n if (disabled) {\n return;\n }\n if (onPress) {\n onPress();\n return;\n }\n if (href) {\n if (await Linking.canOpenURL(href)) {\n await Linking.openURL(href);\n }\n }\n };\n\n const loadingSpinnerColor = getLoadingSpinnerColor(variant, color);\n\n return (\n <ButtonBase\n disabled={disabled}\n onPress={handlePress}\n style={buttonBaseStyle}\n pressEffect={modifiedPressEffect}\n {...otherProps}\n >\n <View style={contentStyle}>\n {startIcon}\n\n <Text style={textStyle}>\n {children}\n </Text>\n\n {endIcon}\n </View>\n\n {isLoading ? (\n <LoadingSpinner\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b,CAFkB,CAAD,CAArB;EAKA,MAAMC,mBAAmB,GAAGrC,OAAO,KAAK,MAAZ,IAAsB,CAACc,WAAvB,GACtB,OADsB,GAEtBA,WAFN;;EAIA,MAAMwB,WAAW,GAAG,YAAY;IAC5B,IAAIhC,QAAJ,EAAc;MACV;IACH;;IACD,IAAIO,OAAJ,EAAa;MACTA,OAAO;MACP;IACH;;IACD,IAAIF,IAAJ,EAAU;MACN,IAAI,MAAMlD,OAAO,CAAC8E,UAAR,CAAmB5B,IAAnB,CAAV,EAAoC;QAChC,MAAMlD,OAAO,CAAC+E,OAAR,CAAgB7B,IAAhB,CAAN;MACH;IACJ;EACJ,CAbD;;EAeA,MAAM8B,mBAAmB,GAAG1C,sBAAsB,CAACC,OAAD,EAAUC,KAAV,CAAlD;EAEA,oBACI,oBAAC,UAAD;IACI,QAAQ,EAAEK,QADd;IAEI,OAAO,EAAEgC,WAFb;IAGI,KAAK,EAAEV,eAHX;IAII,WAAW,EAAES;EAJjB,GAKQjB,UALR,gBAOI,oBAAC,IAAD;IAAM,KAAK,EAAEU;EAAb,GACKd,SADL,eAGI,oBAAC,IAAD;IAAM,KAAK,EAAEmB;EAAb,GACK/B,QADL,CAHJ,EAOKK,OAPL,CAPJ,EAiBKG,SAAS,gBACN,oBAAC,cAAD;IACI,KAAK,EAAE6B,mBADX;IAEI,IAAI,EAAE1B,IAFV;IAGI,KAAK,EAAEM,MAAM,CAAC7B;EAHlB,EADM,GAMN,IAvBR,CADJ;AA2BH;AAAA"}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export const ButtonColors = ['accent', 'primary', 'danger', 'disabled', 'secondary', 'accentAlt'];
|
|
2
|
+
export const ButtonSizes = ['small', 'medium', 'large'];
|
|
3
|
+
export const ButtonVariants = ['solid', 'outlined', 'text', 'capsuleSolid', 'capsuleOutlined'];
|
|
2
4
|
//# sourceMappingURL=ButtonProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["ButtonProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ButtonBaseProps } from '../ButtonBase';\nimport type { OverridableComponentProps
|
|
1
|
+
{"version":3,"names":["ButtonColors","ButtonSizes","ButtonVariants"],"sources":["ButtonProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ButtonBaseProps } from '../ButtonBase';\nimport type { OverridableComponentProps } from '../types';\n\nexport const ButtonColors = [\n 'accent',\n 'primary',\n 'danger',\n 'disabled',\n 'secondary',\n 'accentAlt',\n] as const;\nexport type ButtonColor = typeof ButtonColors[number];\n\nexport const ButtonSizes = [\n 'small',\n 'medium',\n 'large',\n] as const;\nexport type ButtonSize = typeof ButtonSizes[number];\n\nexport const ButtonVariants = [\n 'solid',\n 'outlined',\n 'text',\n 'capsuleSolid',\n 'capsuleOutlined',\n] as const;\nexport type ButtonVariant = typeof ButtonVariants[number];\n\nexport default interface ButtonProps extends OverridableComponentProps<ButtonBaseProps, {\n /**\n * The content of the button.\n */\n children: string;\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color?: ButtonColor;\n\n /**\n * Determines whether minWidth should be applied.\n * @default false\n */\n disableMinWidth?: boolean;\n\n /**\n * Element placed after the children.\n */\n endIcon?: React.ReactElement;\n\n /**\n * If `true`, the button will take up the full width of its container.\n * @default false\n */\n fullWidth?: boolean;\n\n /**\n * The URL to link to when the button is clicked.\n */\n href?: string;\n\n /**\n * Determines whether to show the loading status or not.\n * @default false\n */\n isLoading?: boolean;\n\n /**\n * The size of the button.\n * @default 'medium'\n */\n size?: ButtonSize;\n\n /**\n * Element placed before the children.\n */\n startIcon?: React.ReactElement;\n\n /**\n * The variant to use.\n * @default 'solid'\n */\n variant?: ButtonVariant;\n}> {}\n"],"mappings":"AAIA,OAAO,MAAMA,YAAY,GAAG,CACxB,QADwB,EAExB,SAFwB,EAGxB,QAHwB,EAIxB,UAJwB,EAKxB,WALwB,EAMxB,WANwB,CAArB;AAUP,OAAO,MAAMC,WAAW,GAAG,CACvB,OADuB,EAEvB,QAFuB,EAGvB,OAHuB,CAApB;AAOP,OAAO,MAAMC,cAAc,GAAG,CAC1B,OAD0B,EAE1B,UAF0B,EAG1B,MAH0B,EAI1B,cAJ0B,EAK1B,iBAL0B,CAAvB"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Linking, Text } from 'react-native';
|
|
5
|
+
import ButtonBase from '../ButtonBase';
|
|
6
|
+
import { createFontStyle, css, StyleSheet, useTheme } from '../styles';
|
|
7
|
+
import { cloneElementSafely } from '../utils';
|
|
8
|
+
const iconSizes = {
|
|
9
|
+
small: 20,
|
|
10
|
+
medium: 24
|
|
11
|
+
};
|
|
12
|
+
const styles = StyleSheet.create({
|
|
13
|
+
root: {
|
|
14
|
+
flexDirection: 'row',
|
|
15
|
+
justifyContent: 'center',
|
|
16
|
+
alignItems: 'center'
|
|
17
|
+
},
|
|
18
|
+
fullWidth: {
|
|
19
|
+
width: '100%'
|
|
20
|
+
},
|
|
21
|
+
medium: {
|
|
22
|
+
minWidth: 104,
|
|
23
|
+
height: 48
|
|
24
|
+
},
|
|
25
|
+
small: {
|
|
26
|
+
minWidth: 56,
|
|
27
|
+
height: 32
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export default function Button(props) {
|
|
31
|
+
const {
|
|
32
|
+
children,
|
|
33
|
+
clipHorizontalSpacing = false,
|
|
34
|
+
color = 'primary',
|
|
35
|
+
disabled = false,
|
|
36
|
+
endIcon: endIconProp,
|
|
37
|
+
fullWidth = false,
|
|
38
|
+
href,
|
|
39
|
+
onPress,
|
|
40
|
+
pressEffect,
|
|
41
|
+
size = 'medium',
|
|
42
|
+
startIcon: startIconProp,
|
|
43
|
+
style: styleProp,
|
|
44
|
+
variant = 'contained',
|
|
45
|
+
...otherProps
|
|
46
|
+
} = props;
|
|
47
|
+
const theme = useTheme();
|
|
48
|
+
const mainColor = theme.palette[color].main;
|
|
49
|
+
const fontColor = variant === 'contained' ? theme.palette[color].contrastTextColor : theme.palette[color].main;
|
|
50
|
+
const variantStyleMap = {
|
|
51
|
+
contained: {
|
|
52
|
+
backgroundColor: mainColor
|
|
53
|
+
},
|
|
54
|
+
outlined: {
|
|
55
|
+
backgroundColor: 'transparent',
|
|
56
|
+
borderColor: mainColor,
|
|
57
|
+
borderStyle: 'solid',
|
|
58
|
+
borderWidth: 1
|
|
59
|
+
},
|
|
60
|
+
text: {
|
|
61
|
+
backgroundColor: 'transparent'
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const iconProps = {
|
|
65
|
+
width: iconSizes[size],
|
|
66
|
+
height: iconSizes[size],
|
|
67
|
+
fill: fontColor
|
|
68
|
+
};
|
|
69
|
+
const startIcon = cloneElementSafely(startIconProp, iconProps);
|
|
70
|
+
const endIcon = cloneElementSafely(endIconProp, iconProps);
|
|
71
|
+
const paddingSize = size === 'small' ? theme.spacing(3) : theme.spacing(4);
|
|
72
|
+
const paddingLeft = startIcon ? paddingSize - theme.spacing(1) : paddingSize;
|
|
73
|
+
const paddingRight = endIcon ? paddingSize - theme.spacing(1) : paddingSize;
|
|
74
|
+
const borderRadius = theme.shape.roundnessLarge;
|
|
75
|
+
const buttonBaseStyle = css([styles.root, variantStyleMap[variant], size === 'medium' ? styles.medium : styles.small, fullWidth ? styles.fullWidth : undefined, {
|
|
76
|
+
borderRadius,
|
|
77
|
+
color: fontColor
|
|
78
|
+
}, variant === 'text' && clipHorizontalSpacing ? {
|
|
79
|
+
minWidth: 0
|
|
80
|
+
} : {
|
|
81
|
+
paddingLeft,
|
|
82
|
+
paddingRight
|
|
83
|
+
}, styleProp]);
|
|
84
|
+
const fontStyle = createFontStyle(theme, {
|
|
85
|
+
selector: typo => size === 'small' ? typo.button2 : typo.button1,
|
|
86
|
+
color: fontColor
|
|
87
|
+
});
|
|
88
|
+
const textMarginSize = size === 'small' ? theme.spacing(1) : theme.spacing(2);
|
|
89
|
+
const textMarginStyle = startIcon ? {
|
|
90
|
+
marginLeft: textMarginSize
|
|
91
|
+
} : endIcon ? {
|
|
92
|
+
marginRight: textMarginSize
|
|
93
|
+
} : undefined;
|
|
94
|
+
const textStyle = css([fontStyle, textMarginStyle, {
|
|
95
|
+
textAlign: 'center'
|
|
96
|
+
}]);
|
|
97
|
+
const modifiedPressEffect = variant !== 'text' && !pressEffect ? 'scale' : pressEffect;
|
|
98
|
+
|
|
99
|
+
const handlePress = async () => {
|
|
100
|
+
if (disabled) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (onPress) {
|
|
105
|
+
onPress();
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (href) {
|
|
110
|
+
if (await Linking.canOpenURL(href)) {
|
|
111
|
+
await Linking.openURL(href);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
return /*#__PURE__*/React.createElement(ButtonBase, _extends({
|
|
117
|
+
disabled: disabled,
|
|
118
|
+
onPress: handlePress,
|
|
119
|
+
style: buttonBaseStyle,
|
|
120
|
+
pressEffect: modifiedPressEffect
|
|
121
|
+
}, otherProps), startIcon, /*#__PURE__*/React.createElement(Text, {
|
|
122
|
+
children: children,
|
|
123
|
+
style: textStyle
|
|
124
|
+
}), endIcon);
|
|
125
|
+
}
|
|
126
|
+
;
|
|
127
|
+
//# sourceMappingURL=LegacyButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Linking","Text","ButtonBase","createFontStyle","css","StyleSheet","useTheme","cloneElementSafely","iconSizes","small","medium","styles","create","root","flexDirection","justifyContent","alignItems","fullWidth","width","minWidth","height","Button","props","children","clipHorizontalSpacing","color","disabled","endIcon","endIconProp","href","onPress","pressEffect","size","startIcon","startIconProp","style","styleProp","variant","otherProps","theme","mainColor","palette","main","fontColor","contrastTextColor","variantStyleMap","contained","backgroundColor","outlined","borderColor","borderStyle","borderWidth","text","iconProps","fill","paddingSize","spacing","paddingLeft","paddingRight","borderRadius","shape","roundnessLarge","buttonBaseStyle","undefined","fontStyle","selector","typo","button2","button1","textMarginSize","textMarginStyle","marginLeft","marginRight","textStyle","textAlign","modifiedPressEffect","handlePress","canOpenURL","openURL"],"sources":["LegacyButton.tsx"],"sourcesContent":["import React from 'react';\nimport { Linking, Text } from 'react-native';\nimport ButtonBase from '../ButtonBase';\nimport { createFontStyle, css, StyleSheet, useTheme } from '../styles';\nimport { cloneElementSafely } from '../utils';\nimport type ButtonProps from './LegacyButtonProps';\nimport type { ButtonSize } from './LegacyButtonProps';\n\ntype IconSizes = { [n in ButtonSize]: number };\n\nconst iconSizes: IconSizes = {\n small: 20,\n medium: 24,\n};\n\nconst styles = StyleSheet.create({\n root: {\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n },\n fullWidth: {\n width: '100%',\n },\n medium: {\n minWidth: 104,\n height: 48,\n },\n small: {\n minWidth: 56,\n height: 32,\n },\n});\n\nexport default function Button(props: ButtonProps) {\n const {\n children,\n clipHorizontalSpacing = false,\n color = 'primary',\n disabled = false,\n endIcon: endIconProp,\n fullWidth = false,\n href,\n onPress,\n pressEffect,\n size = 'medium',\n startIcon: startIconProp,\n style: styleProp,\n variant = 'contained',\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const mainColor = theme.palette[color].main;\n\n const fontColor = variant === 'contained'\n ? theme.palette[color].contrastTextColor\n : theme.palette[color].main;\n\n const variantStyleMap = {\n contained: {\n backgroundColor: mainColor,\n },\n outlined: {\n backgroundColor: 'transparent',\n borderColor: mainColor,\n borderStyle: 'solid',\n borderWidth: 1,\n },\n text: {\n backgroundColor: 'transparent',\n },\n };\n\n const iconProps = {\n width: iconSizes[size],\n height: iconSizes[size],\n fill: fontColor,\n };\n\n const startIcon = cloneElementSafely(startIconProp, iconProps);\n const endIcon = cloneElementSafely(endIconProp, iconProps);\n\n const paddingSize = size === 'small' ? theme.spacing(3) : theme.spacing(4);\n const paddingLeft = startIcon ? paddingSize - theme.spacing(1) : paddingSize;\n const paddingRight = endIcon ? paddingSize - theme.spacing(1) : paddingSize;\n\n const borderRadius = theme.shape.roundnessLarge;\n const buttonBaseStyle = css([\n styles.root,\n variantStyleMap[variant],\n size === 'medium' ? styles.medium : styles.small,\n fullWidth ? styles.fullWidth : undefined,\n { borderRadius, color: fontColor },\n (variant === 'text' && clipHorizontalSpacing)\n ? { minWidth: 0 }\n : { paddingLeft, paddingRight },\n styleProp,\n ]);\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => size === 'small' ? typo.button2 : typo.button1,\n color: fontColor,\n });\n\n const textMarginSize = size === 'small' ? theme.spacing(1) : theme.spacing(2);\n const textMarginStyle = startIcon\n ? { marginLeft: textMarginSize }\n : endIcon\n ? { marginRight: textMarginSize }\n : undefined;\n\n const textStyle = css([\n fontStyle,\n textMarginStyle,\n { textAlign: 'center' },\n ]);\n\n const modifiedPressEffect = variant !== 'text' && !pressEffect\n ? 'scale'\n : pressEffect;\n\n const handlePress = async () => {\n if (disabled) {\n return;\n }\n if (onPress) {\n onPress();\n return;\n }\n if (href) {\n if (await Linking.canOpenURL(href)) {\n await Linking.openURL(href);\n }\n }\n };\n\n return (\n <ButtonBase\n disabled={disabled}\n onPress={handlePress}\n style={buttonBaseStyle}\n pressEffect={modifiedPressEffect}\n {...otherProps}\n >\n {startIcon}\n\n <Text\n children={children}\n style={textStyle}\n />\n\n {endIcon}\n </ButtonBase>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,OAAT,EAAkBC,IAAlB,QAA8B,cAA9B;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,SAASC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,WAFb;IAGI,KAAK,EAAEd,eAHX;IAII,WAAW,EAAEa;EAJjB,GAKQrC,UALR,GAOKL,SAPL,eASI,oBAAC,IAAD;IACI,QAAQ,EAAEV,QADd;IAEI,KAAK,EAAEkD;EAFX,EATJ,EAcK9C,OAdL,CADJ;AAkBH;AAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["LegacyButtonProps.ts"],"sourcesContent":["import React from 'react';\nimport type { ButtonBaseProps } from '../ButtonBase';\nimport type { OverridableComponentProps, CommonComponentColor } from '../types';\n\nexport type ButtonColor = CommonComponentColor;\n\nexport type ButtonSize = 'small' | 'medium';\n\nexport type ButtonVariant = 'contained' | 'outlined' | 'text';\n\nexport default interface ButtonProps extends OverridableComponentProps<ButtonBaseProps, {\n /**\n * The content of the button.\n */\n children: string;\n\n /**\n * If `true`, remove horizontal padding and minimum width.\n * This prop only applied on `text` variant.\n * @default false\n */\n clipHorizontalSpacing?: boolean;\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color?: ButtonColor;\n\n /**\n * Element placed after the children.\n */\n endIcon?: React.ReactElement;\n\n /**\n * If `true`, the button will take up the full width of its container.\n * @default false\n */\n fullWidth?: boolean;\n\n /**\n * The URL to link to when the button is clicked.\n */\n href?: string;\n\n /**\n * The size of the button.\n * @default 'medium'\n */\n size?: ButtonSize;\n\n /**\n * Element placed before the children.\n */\n startIcon?: React.ReactElement;\n\n /**\n * The variant to use.\n * @default 'contained'\n */\n variant?: ButtonVariant;\n}> {}\n"],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './
|
|
1
|
+
export { default } from './LegacyButton';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './
|
|
1
|
+
{"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './LegacyButton';\nexport type { default as ButtonProps } from './LegacyButtonProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,gBAAxB"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { commonColors } from '@fountain-ui/styles';
|
|
3
|
+
import { useTheme } from '../styles';
|
|
4
|
+
export default function useVariantStyleMap(variant, color) {
|
|
5
|
+
const theme = useTheme();
|
|
6
|
+
return useMemo(() => {
|
|
7
|
+
const {
|
|
8
|
+
palette
|
|
9
|
+
} = theme;
|
|
10
|
+
const variantStyleMap = {
|
|
11
|
+
solid: {
|
|
12
|
+
accent: {
|
|
13
|
+
container: {
|
|
14
|
+
backgroundColor: palette.fill.accent
|
|
15
|
+
},
|
|
16
|
+
labelColor: commonColors.static.strongInverse,
|
|
17
|
+
iconColor: commonColors.static.strongInverse
|
|
18
|
+
},
|
|
19
|
+
primary: {
|
|
20
|
+
container: {
|
|
21
|
+
backgroundColor: palette.fill.base
|
|
22
|
+
},
|
|
23
|
+
labelColor: palette.text.strongInverse,
|
|
24
|
+
iconColor: palette.icon.strongInverse
|
|
25
|
+
},
|
|
26
|
+
danger: {
|
|
27
|
+
container: {
|
|
28
|
+
backgroundColor: palette.status.danger
|
|
29
|
+
},
|
|
30
|
+
labelColor: commonColors.static.strongInverse,
|
|
31
|
+
iconColor: commonColors.static.strongInverse
|
|
32
|
+
},
|
|
33
|
+
disabled: {
|
|
34
|
+
container: {
|
|
35
|
+
backgroundColor: palette.status.disabled
|
|
36
|
+
},
|
|
37
|
+
labelColor: palette.status.onDisabled,
|
|
38
|
+
iconColor: palette.status.onDisabled
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
outlined: {
|
|
42
|
+
accent: {
|
|
43
|
+
container: {
|
|
44
|
+
borderColor: palette.border.accent,
|
|
45
|
+
borderWidth: 1
|
|
46
|
+
},
|
|
47
|
+
labelColor: palette.text.accent,
|
|
48
|
+
iconColor: palette.icon.accent
|
|
49
|
+
},
|
|
50
|
+
primary: {
|
|
51
|
+
container: {
|
|
52
|
+
borderColor: palette.border.base,
|
|
53
|
+
borderWidth: 1
|
|
54
|
+
},
|
|
55
|
+
labelColor: palette.text.base,
|
|
56
|
+
iconColor: palette.icon.base
|
|
57
|
+
},
|
|
58
|
+
disabled: {
|
|
59
|
+
container: {
|
|
60
|
+
borderColor: palette.status.disabled,
|
|
61
|
+
borderWidth: 1
|
|
62
|
+
},
|
|
63
|
+
labelColor: palette.status.disabledLabel,
|
|
64
|
+
iconColor: palette.status.disabledLabel
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
text: {
|
|
68
|
+
primary: {
|
|
69
|
+
labelColor: palette.text.strong,
|
|
70
|
+
iconColor: palette.icon.strong
|
|
71
|
+
},
|
|
72
|
+
secondary: {
|
|
73
|
+
labelColor: palette.text.base,
|
|
74
|
+
iconColor: palette.icon.base
|
|
75
|
+
},
|
|
76
|
+
accent: {
|
|
77
|
+
labelColor: palette.text.accent,
|
|
78
|
+
iconColor: palette.icon.accent
|
|
79
|
+
},
|
|
80
|
+
accentAlt: {
|
|
81
|
+
labelColor: palette.text.accentAlt,
|
|
82
|
+
iconColor: palette.icon.accentAlt
|
|
83
|
+
},
|
|
84
|
+
disabled: {
|
|
85
|
+
labelColor: palette.status.disabledLabel,
|
|
86
|
+
iconColor: palette.status.disabledLabel
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
capsuleSolid: {
|
|
90
|
+
accent: {
|
|
91
|
+
container: {
|
|
92
|
+
backgroundColor: theme.palette.fill.accent,
|
|
93
|
+
borderRadius: theme.shape.radius.full
|
|
94
|
+
},
|
|
95
|
+
labelColor: commonColors.static.strongInverse,
|
|
96
|
+
iconColor: commonColors.static.strongInverse
|
|
97
|
+
},
|
|
98
|
+
primary: {
|
|
99
|
+
container: {
|
|
100
|
+
backgroundColor: theme.palette.fill.base,
|
|
101
|
+
borderRadius: theme.shape.radius.full
|
|
102
|
+
},
|
|
103
|
+
labelColor: palette.text.strongInverse,
|
|
104
|
+
iconColor: palette.icon.strongInverse
|
|
105
|
+
},
|
|
106
|
+
danger: {
|
|
107
|
+
container: {
|
|
108
|
+
backgroundColor: theme.palette.status.danger,
|
|
109
|
+
borderRadius: theme.shape.radius.full
|
|
110
|
+
},
|
|
111
|
+
labelColor: commonColors.static.strongInverse,
|
|
112
|
+
iconColor: commonColors.static.strongInverse
|
|
113
|
+
},
|
|
114
|
+
secondary: {
|
|
115
|
+
container: {
|
|
116
|
+
backgroundColor: commonColors.static.strongInverse,
|
|
117
|
+
borderRadius: theme.shape.radius.full
|
|
118
|
+
},
|
|
119
|
+
labelColor: theme.palette.text.strong,
|
|
120
|
+
iconColor: theme.palette.icon.strong
|
|
121
|
+
},
|
|
122
|
+
disabled: {
|
|
123
|
+
container: {
|
|
124
|
+
backgroundColor: theme.palette.status.disabled,
|
|
125
|
+
borderRadius: theme.shape.radius.full
|
|
126
|
+
},
|
|
127
|
+
labelColor: theme.palette.status.onDisabled,
|
|
128
|
+
iconColor: theme.palette.status.onDisabled
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
capsuleOutlined: {
|
|
132
|
+
primary: {
|
|
133
|
+
container: {
|
|
134
|
+
borderColor: theme.palette.border.base,
|
|
135
|
+
borderRadius: theme.shape.radius.full,
|
|
136
|
+
borderWidth: 1
|
|
137
|
+
},
|
|
138
|
+
labelColor: theme.palette.text.strong,
|
|
139
|
+
iconColor: theme.palette.icon.strong
|
|
140
|
+
},
|
|
141
|
+
disabled: {
|
|
142
|
+
container: {
|
|
143
|
+
borderColor: theme.palette.status.disabled,
|
|
144
|
+
borderRadius: theme.shape.radius.full,
|
|
145
|
+
borderWidth: 1
|
|
146
|
+
},
|
|
147
|
+
labelColor: theme.palette.status.disabledLabel,
|
|
148
|
+
iconColor: theme.palette.status.disabledLabel
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
if (variantStyleMap[variant][color]) {
|
|
154
|
+
return variantStyleMap[variant][color];
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
158
|
+
console.warn('The selected color is not supported for the chosen variant.');
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
return {};
|
|
162
|
+
}, [theme, variant, color]);
|
|
163
|
+
}
|
|
164
|
+
//# sourceMappingURL=useVariantStyleMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useMemo","commonColors","useTheme","useVariantStyleMap","variant","color","theme","palette","variantStyleMap","solid","accent","container","backgroundColor","fill","labelColor","static","strongInverse","iconColor","primary","base","text","icon","danger","status","disabled","onDisabled","outlined","borderColor","border","borderWidth","disabledLabel","strong","secondary","accentAlt","capsuleSolid","borderRadius","shape","radius","full","capsuleOutlined","process","env","NODE_ENV","console","warn"],"sources":["useVariantStyleMap.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { commonColors } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport { ButtonColor, ButtonVariant } from './ButtonProps';\n\ntype UseVariantStyleMapReturns = {\n container?: FountainUiStyle;\n iconColor?: string;\n labelColor?: string;\n}\n\ntype VariantStyleMap = {\n [variant in ButtonVariant]: {\n [color in ButtonColor]?: UseVariantStyleMapReturns;\n }\n};\n\nexport default function useVariantStyleMap(variant: ButtonVariant, color: ButtonColor): UseVariantStyleMapReturns {\n const theme = useTheme();\n\n return useMemo(() => {\n const { palette } = theme;\n\n const variantStyleMap: VariantStyleMap = {\n solid: {\n accent: {\n container: {\n backgroundColor: palette.fill.accent,\n },\n labelColor: commonColors.static.strongInverse,\n iconColor: commonColors.static.strongInverse,\n },\n primary: {\n container: {\n backgroundColor: palette.fill.base,\n },\n labelColor: palette.text.strongInverse,\n iconColor: palette.icon.strongInverse,\n },\n danger: {\n container: {\n backgroundColor: palette.status.danger,\n },\n labelColor: commonColors.static.strongInverse,\n iconColor: commonColors.static.strongInverse,\n },\n disabled: {\n container: {\n backgroundColor: palette.status.disabled,\n },\n labelColor: palette.status.onDisabled,\n iconColor: palette.status.onDisabled,\n },\n },\n outlined: {\n accent: {\n container: {\n borderColor: palette.border.accent,\n borderWidth: 1,\n },\n labelColor: palette.text.accent,\n iconColor: palette.icon.accent,\n },\n primary: {\n container: {\n borderColor: palette.border.base,\n borderWidth: 1,\n },\n labelColor: palette.text.base,\n iconColor: palette.icon.base,\n },\n disabled: {\n container: {\n borderColor: palette.status.disabled,\n borderWidth: 1,\n },\n labelColor: palette.status.disabledLabel,\n iconColor: palette.status.disabledLabel,\n },\n },\n text: {\n primary: {\n labelColor: palette.text.strong,\n iconColor: palette.icon.strong,\n },\n secondary: {\n labelColor: palette.text.base,\n iconColor: palette.icon.base,\n },\n accent: {\n labelColor: palette.text.accent,\n iconColor: palette.icon.accent,\n },\n accentAlt: {\n labelColor: palette.text.accentAlt,\n iconColor: palette.icon.accentAlt,\n },\n disabled: {\n labelColor: palette.status.disabledLabel,\n iconColor: palette.status.disabledLabel,\n },\n },\n capsuleSolid: {\n accent: {\n container: {\n backgroundColor: theme.palette.fill.accent,\n borderRadius: theme.shape.radius.full,\n },\n labelColor: commonColors.static.strongInverse,\n iconColor: commonColors.static.strongInverse,\n },\n primary: {\n container: {\n backgroundColor: theme.palette.fill.base,\n borderRadius: theme.shape.radius.full,\n },\n labelColor: palette.text.strongInverse,\n iconColor: palette.icon.strongInverse,\n },\n danger: {\n container: {\n backgroundColor: theme.palette.status.danger,\n borderRadius: theme.shape.radius.full,\n },\n labelColor: commonColors.static.strongInverse,\n iconColor: commonColors.static.strongInverse,\n },\n secondary: {\n container: {\n backgroundColor: commonColors.static.strongInverse,\n borderRadius: theme.shape.radius.full,\n },\n labelColor: theme.palette.text.strong,\n iconColor: theme.palette.icon.strong,\n },\n disabled: {\n container: {\n backgroundColor: theme.palette.status.disabled,\n borderRadius: theme.shape.radius.full,\n },\n labelColor: theme.palette.status.onDisabled,\n iconColor: theme.palette.status.onDisabled,\n },\n },\n capsuleOutlined: {\n primary: {\n container: {\n borderColor: theme.palette.border.base,\n borderRadius: theme.shape.radius.full,\n borderWidth: 1,\n },\n labelColor: theme.palette.text.strong,\n iconColor: theme.palette.icon.strong,\n },\n disabled: {\n container: {\n borderColor: theme.palette.status.disabled,\n borderRadius: theme.shape.radius.full,\n borderWidth: 1,\n },\n labelColor: theme.palette.status.disabledLabel,\n iconColor: theme.palette.status.disabledLabel,\n },\n },\n };\n\n if (variantStyleMap[variant][color]) {\n return variantStyleMap[variant][color] as UseVariantStyleMapReturns;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n console.warn('The selected color is not supported for the chosen variant.');\n }\n\n return {};\n }, [theme, variant, color]);\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AAEA,SAASC,YAAT,QAA6B,qBAA7B;AACA,SAASC,QAAT,QAAyB,WAAzB;AAeA,eAAe,SAASC,kBAAT,CAA4BC,OAA5B,EAAoDC,KAApD,EAAmG;EAC9G,MAAMC,KAAK,GAAGJ,QAAQ,EAAtB;EAEA,OAAOF,OAAO,CAAC,MAAM;IACjB,MAAM;MAAEO;IAAF,IAAcD,KAApB;IAEA,MAAME,eAAgC,GAAG;MACrCC,KAAK,EAAE;QACHC,MAAM,EAAE;UACJC,SAAS,EAAE;YACPC,eAAe,EAAEL,OAAO,CAACM,IAAR,CAAaH;UADvB,CADP;UAIJI,UAAU,EAAEb,YAAY,CAACc,MAAb,CAAoBC,aAJ5B;UAKJC,SAAS,EAAEhB,YAAY,CAACc,MAAb,CAAoBC;QAL3B,CADL;QAQHE,OAAO,EAAE;UACLP,SAAS,EAAE;YACPC,eAAe,EAAEL,OAAO,CAACM,IAAR,CAAaM;UADvB,CADN;UAILL,UAAU,EAAEP,OAAO,CAACa,IAAR,CAAaJ,aAJpB;UAKLC,SAAS,EAAEV,OAAO,CAACc,IAAR,CAAaL;QALnB,CARN;QAeHM,MAAM,EAAE;UACJX,SAAS,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