@popmenu/common-ui 0.126.0 → 0.126.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/components/Avatar/Avatar.d.ts +3 -0
- package/build/{components → cjs/components}/Avatar/AvatarProps.d.ts +22 -22
- package/build/{components → cjs/components}/Avatar/avatar.styles.d.ts +2 -2
- package/build/cjs/components/Avatar/index.d.ts +2 -0
- package/build/{components → cjs/components}/Avatar/util/useImageProps.d.ts +10 -10
- package/build/{components → cjs/components}/BrowserSilhouette/BrowserSilhouette.d.ts +2 -2
- package/build/{components → cjs/components}/BrowserSilhouette/browserSilhouette.styles.d.ts +1 -1
- package/build/cjs/components/BrowserSilhouette/index.d.ts +1 -0
- package/build/{components → cjs/components}/Button/Button.d.ts +6 -6
- package/build/{components → cjs/components}/Button/ButtonProps.d.ts +11 -11
- package/build/cjs/components/Button/ButtonStyles.d.ts +2 -0
- package/build/cjs/components/Button/index.d.ts +2 -0
- package/build/cjs/components/Checkbox/Checkbox.d.ts +3 -0
- package/build/{components → cjs/components}/Checkbox/CheckboxProps.d.ts +7 -8
- package/build/cjs/components/Checkbox/index.d.ts +2 -0
- package/build/{components → cjs/components}/Chip/Chip.d.ts +6 -6
- package/build/{components → cjs/components}/Chip/ChipProps.d.ts +8 -8
- package/build/{components → cjs/components}/Chip/ChipStyles.d.ts +2 -2
- package/build/cjs/components/Chip/index.d.ts +2 -0
- package/build/{components → cjs/components}/CollapsibleText/CollapsibleText.d.ts +3 -3
- package/build/{components → cjs/components}/CollapsibleText/CollapsibleTextProps.d.ts +13 -13
- package/build/{components → cjs/components}/CollapsibleText/CollapsibleTextStyles.d.ts +5 -5
- package/build/cjs/components/CollapsibleText/index.d.ts +2 -0
- package/build/{components → cjs/components}/Divider/Divider.d.ts +3 -3
- package/build/{components → cjs/components}/Divider/DividerProps.d.ts +17 -17
- package/build/cjs/components/Divider/index.d.ts +2 -0
- package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.d.ts +2 -2
- package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationBody.d.ts +2 -2
- package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.d.ts +2 -2
- package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationContent.d.ts +4 -4
- package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationDialog.d.ts +3 -3
- package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts +29 -29
- package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationFooter.d.ts +2 -2
- package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationForm.d.ts +2 -2
- package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.d.ts +2 -2
- package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationInfo.d.ts +2 -2
- package/build/{components → cjs/components}/FollowerAuthenticationDialog/FollowerAuthenticationTitle.d.ts +2 -2
- package/build/{components → cjs/components}/FollowerAuthenticationDialog/context.d.ts +4 -4
- package/build/cjs/components/FollowerAuthenticationDialog/index.d.ts +2 -0
- package/build/{components → cjs/components}/FollowerAuthenticationDialog/theme.d.ts +35 -35
- package/build/{components → cjs/components}/Icon/Icon.d.ts +4 -4
- package/build/{components → cjs/components}/Icon/IconProps.d.ts +17 -17
- package/build/{components → cjs/components}/Icon/IconStyles.d.ts +2 -2
- package/build/cjs/components/Icon/index.d.ts +2 -0
- package/build/cjs/components/IconButton/IconButton.d.ts +3 -0
- package/build/{components → cjs/components}/IconButton/IconButtonProps.d.ts +2 -2
- package/build/cjs/components/IconButton/index.d.ts +2 -0
- package/build/{components → cjs/components}/Link/Link.d.ts +11 -11
- package/build/{components → cjs/components}/Link/LinkStyles.d.ts +2 -2
- package/build/cjs/components/Link/index.d.ts +2 -0
- package/build/{components → cjs/components}/NumberField/NumberField.d.ts +3 -3
- package/build/{components → cjs/components}/NumberField/NumberFieldProps.d.ts +12 -12
- package/build/{components → cjs/components}/NumberField/NumberFieldStyles.d.ts +2 -2
- package/build/cjs/components/NumberField/index.d.ts +2 -0
- package/build/cjs/components/Paper/Paper.d.ts +6 -0
- package/build/cjs/components/Paper/index.d.ts +2 -0
- package/build/{components → cjs/components}/PaperContent/PaperContent.d.ts +2 -2
- package/build/cjs/components/PaperContent/index.d.ts +1 -0
- package/build/cjs/components/Radio/Radio.d.ts +3 -0
- package/build/{components → cjs/components}/Radio/RadioProps.d.ts +7 -8
- package/build/cjs/components/Radio/index.d.ts +2 -0
- package/build/{components → cjs/components}/SplitInput/SplitInput.d.ts +3 -3
- package/build/{components → cjs/components}/SplitInput/SplitInputProps.d.ts +20 -20
- package/build/{components → cjs/components}/SplitInput/SplitInputStyles.d.ts +2 -2
- package/build/cjs/components/SplitInput/index.d.ts +2 -0
- package/build/cjs/components/Switch/Switch.d.ts +3 -0
- package/build/{components → cjs/components}/Switch/SwitchProps.d.ts +7 -8
- package/build/cjs/components/Switch/index.d.ts +2 -0
- package/build/{components → cjs/components}/Switch/switch.styles.d.ts +2 -2
- package/build/{components → cjs/components}/TabPanel/TabPanel.d.ts +3 -3
- package/build/{components → cjs/components}/TabPanel/TabPanelProps.d.ts +3 -3
- package/build/cjs/components/TabPanel/index.d.ts +2 -0
- package/build/cjs/components/ToggleButton/ToggleButton.d.ts +3 -0
- package/build/{components → cjs/components}/ToggleButton/ToggleButtonProps.d.ts +4 -4
- package/build/{components → cjs/components}/ToggleButton/ToggleButtonStyles.d.ts +2 -2
- package/build/cjs/components/ToggleButton/index.d.ts +2 -0
- package/build/cjs/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +3 -0
- package/build/{components → cjs/components}/ToggleButtonGroup/ToggleButtonGroupProps.d.ts +6 -6
- package/build/{components → cjs/components}/ToggleButtonGroup/ToggleButtonGroupStyles.d.ts +1 -1
- package/build/cjs/components/ToggleButtonGroup/index.d.ts +2 -0
- package/build/cjs/components/Tooltip/Tooltip.d.ts +3 -0
- package/build/cjs/components/Tooltip/TooltipProps.d.ts +1 -0
- package/build/{components → cjs/components}/Tooltip/TooltipStyles.d.ts +2 -2
- package/build/cjs/components/Tooltip/index.d.ts +2 -0
- package/build/{components → cjs/components}/Typography/Typography.d.ts +9 -9
- package/build/{components → cjs/components}/Typography/TypographyProps.d.ts +14 -15
- package/build/cjs/components/Typography/TypographyStyles.d.ts +10 -0
- package/build/cjs/components/Typography/index.d.ts +2 -0
- package/build/cjs/components/index.d.ts +45 -0
- package/build/{hooks → cjs/hooks}/index.d.ts +2 -2
- package/build/{hooks → cjs/hooks}/useCollapsibleText.d.ts +9 -9
- package/build/{hooks → cjs/hooks}/useTabs/index.d.ts +1 -1
- package/build/{hooks → cjs/hooks}/useTabs/useTabs.d.ts +3 -3
- package/build/{hooks → cjs/hooks}/useTabs/useTabsOptions.d.ts +3 -3
- package/build/{hooks → cjs/hooks}/useTabs/useTabsResult.d.ts +22 -22
- package/build/{index.d.ts → cjs/index.d.ts} +3 -3
- package/build/cjs/index.js +1303 -0
- package/build/cjs/index.js.map +1 -0
- package/build/{types → cjs/types}/index.d.ts +2 -2
- package/build/{util → cjs/util}/colors/alpha.d.ts +1 -1
- package/build/{util → cjs/util}/colors/darken.d.ts +1 -1
- package/build/{util → cjs/util}/colors/decomposeColor.d.ts +1 -1
- package/build/{util → cjs/util}/colors/getLuminance.d.ts +1 -1
- package/build/{util → cjs/util}/colors/hexToRgb.d.ts +1 -1
- package/build/{util → cjs/util}/colors/index.d.ts +8 -8
- package/build/{util → cjs/util}/colors/lighten.d.ts +1 -1
- package/build/{util → cjs/util}/colors/recomposeColor.d.ts +1 -1
- package/build/{util → cjs/util}/colors/rgbToHex.d.ts +1 -1
- package/build/{util → cjs/util}/createTheme.d.ts +1 -1
- package/build/{util → cjs/util}/index.d.ts +4 -4
- package/build/{util → cjs/util}/makeStyles.d.ts +1 -1
- package/build/esm/components/Avatar/Avatar.d.ts +3 -0
- package/build/esm/components/Avatar/Avatar.js +39 -0
- package/build/esm/components/Avatar/Avatar.js.map +1 -0
- package/build/esm/components/Avatar/AvatarProps.d.ts +22 -0
- package/build/esm/components/Avatar/avatar.styles.d.ts +2 -0
- package/build/esm/components/Avatar/avatar.styles.js +41 -0
- package/build/esm/components/Avatar/avatar.styles.js.map +1 -0
- package/build/esm/components/Avatar/index.d.ts +2 -0
- package/build/esm/components/Avatar/util/useImageProps.d.ts +10 -0
- package/build/esm/components/Avatar/util/useImageProps.js +21 -0
- package/build/esm/components/Avatar/util/useImageProps.js.map +1 -0
- package/build/esm/components/BrowserSilhouette/BrowserSilhouette.d.ts +2 -0
- package/build/esm/components/BrowserSilhouette/BrowserSilhouette.js +18 -0
- package/build/esm/components/BrowserSilhouette/BrowserSilhouette.js.map +1 -0
- package/build/esm/components/BrowserSilhouette/browserSilhouette.styles.d.ts +1 -0
- package/build/esm/components/BrowserSilhouette/browserSilhouette.styles.js +25 -0
- package/build/esm/components/BrowserSilhouette/browserSilhouette.styles.js.map +1 -0
- package/build/esm/components/BrowserSilhouette/index.d.ts +1 -0
- package/build/esm/components/Button/Button.d.ts +6 -0
- package/build/esm/components/Button/Button.js +21 -0
- package/build/esm/components/Button/Button.js.map +1 -0
- package/build/esm/components/Button/ButtonProps.d.ts +11 -0
- package/build/esm/components/Button/ButtonStyles.d.ts +2 -0
- package/build/esm/components/Button/ButtonStyles.js +16 -0
- package/build/esm/components/Button/ButtonStyles.js.map +1 -0
- package/build/esm/components/Button/index.d.ts +2 -0
- package/build/esm/components/Checkbox/Checkbox.d.ts +3 -0
- package/build/esm/components/Checkbox/Checkbox.js +13 -0
- package/build/esm/components/Checkbox/Checkbox.js.map +1 -0
- package/build/esm/components/Checkbox/CheckboxProps.d.ts +7 -0
- package/build/esm/components/Checkbox/index.d.ts +2 -0
- package/build/esm/components/Chip/Chip.d.ts +6 -0
- package/build/esm/components/Chip/Chip.js +23 -0
- package/build/esm/components/Chip/Chip.js.map +1 -0
- package/build/esm/components/Chip/ChipProps.d.ts +8 -0
- package/build/esm/components/Chip/ChipStyles.d.ts +2 -0
- package/build/esm/components/Chip/ChipStyles.js +83 -0
- package/build/esm/components/Chip/ChipStyles.js.map +1 -0
- package/build/esm/components/Chip/index.d.ts +2 -0
- package/build/esm/components/CollapsibleText/CollapsibleText.d.ts +3 -0
- package/build/esm/components/CollapsibleText/CollapsibleText.js +40 -0
- package/build/esm/components/CollapsibleText/CollapsibleText.js.map +1 -0
- package/build/esm/components/CollapsibleText/CollapsibleTextProps.d.ts +13 -0
- package/build/esm/components/CollapsibleText/CollapsibleTextStyles.d.ts +5 -0
- package/build/esm/components/CollapsibleText/CollapsibleTextStyles.js +24 -0
- package/build/esm/components/CollapsibleText/CollapsibleTextStyles.js.map +1 -0
- package/build/esm/components/CollapsibleText/index.d.ts +2 -0
- package/build/esm/components/Divider/Divider.d.ts +3 -0
- package/build/esm/components/Divider/Divider.js +70 -0
- package/build/esm/components/Divider/Divider.js.map +1 -0
- package/build/esm/components/Divider/DividerProps.d.ts +17 -0
- package/build/esm/components/Divider/index.d.ts +2 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.d.ts +2 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.js +86 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.js.map +1 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.d.ts +2 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.js +12 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.js.map +1 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.d.ts +2 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.js +24 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.js.map +1 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.d.ts +4 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.js +18 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.js.map +1 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.d.ts +3 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.js +37 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.js.map +1 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts +29 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.d.ts +2 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.js +13 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.js.map +1 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.d.ts +2 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js +149 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js.map +1 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.d.ts +2 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.js +15 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.js.map +1 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.d.ts +2 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.js +15 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.js.map +1 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.d.ts +2 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.js +13 -0
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.js.map +1 -0
- package/build/esm/components/FollowerAuthenticationDialog/context.d.ts +4 -0
- package/build/esm/components/FollowerAuthenticationDialog/context.js +14 -0
- package/build/esm/components/FollowerAuthenticationDialog/context.js.map +1 -0
- package/build/esm/components/FollowerAuthenticationDialog/index.d.ts +2 -0
- package/build/esm/components/FollowerAuthenticationDialog/theme.d.ts +35 -0
- package/build/esm/components/FollowerAuthenticationDialog/theme.js +36 -0
- package/build/esm/components/FollowerAuthenticationDialog/theme.js.map +1 -0
- package/build/esm/components/Icon/Icon.d.ts +4 -0
- package/build/esm/components/Icon/Icon.js +29 -0
- package/build/esm/components/Icon/Icon.js.map +1 -0
- package/build/esm/components/Icon/IconProps.d.ts +17 -0
- package/build/esm/components/Icon/IconStyles.d.ts +2 -0
- package/build/esm/components/Icon/IconStyles.js +43 -0
- package/build/esm/components/Icon/IconStyles.js.map +1 -0
- package/build/esm/components/Icon/index.d.ts +2 -0
- package/build/esm/components/IconButton/IconButton.d.ts +3 -0
- package/build/esm/components/IconButton/IconButton.js +14 -0
- package/build/esm/components/IconButton/IconButton.js.map +1 -0
- package/build/esm/components/IconButton/IconButtonProps.d.ts +2 -0
- package/build/esm/components/IconButton/index.d.ts +2 -0
- package/build/esm/components/Link/Link.d.ts +11 -0
- package/build/esm/components/Link/Link.js +18 -0
- package/build/esm/components/Link/Link.js.map +1 -0
- package/build/esm/components/Link/LinkStyles.d.ts +2 -0
- package/build/esm/components/Link/LinkStyles.js +15 -0
- package/build/esm/components/Link/LinkStyles.js.map +1 -0
- package/build/esm/components/Link/index.d.ts +2 -0
- package/build/esm/components/NumberField/NumberField.d.ts +3 -0
- package/build/esm/components/NumberField/NumberField.js +20 -0
- package/build/esm/components/NumberField/NumberField.js.map +1 -0
- package/build/esm/components/NumberField/NumberFieldProps.d.ts +12 -0
- package/build/esm/components/NumberField/NumberFieldStyles.d.ts +2 -0
- package/build/esm/components/NumberField/NumberFieldStyles.js +32 -0
- package/build/esm/components/NumberField/NumberFieldStyles.js.map +1 -0
- package/build/esm/components/NumberField/index.d.ts +2 -0
- package/build/esm/components/Paper/Paper.d.ts +6 -0
- package/build/esm/components/Paper/Paper.js +28 -0
- package/build/esm/components/Paper/Paper.js.map +1 -0
- package/build/esm/components/Paper/index.d.ts +2 -0
- package/build/esm/components/PaperContent/PaperContent.d.ts +2 -0
- package/build/esm/components/PaperContent/PaperContent.js +10 -0
- package/build/esm/components/PaperContent/PaperContent.js.map +1 -0
- package/build/esm/components/PaperContent/index.d.ts +1 -0
- package/build/esm/components/Radio/Radio.d.ts +3 -0
- package/build/esm/components/Radio/Radio.js +13 -0
- package/build/esm/components/Radio/Radio.js.map +1 -0
- package/build/esm/components/Radio/RadioProps.d.ts +7 -0
- package/build/esm/components/Radio/index.d.ts +2 -0
- package/build/esm/components/SplitInput/SplitInput.d.ts +3 -0
- package/build/esm/components/SplitInput/SplitInput.js +21 -0
- package/build/esm/components/SplitInput/SplitInput.js.map +1 -0
- package/build/esm/components/SplitInput/SplitInputProps.d.ts +20 -0
- package/build/esm/components/SplitInput/SplitInputStyles.d.ts +2 -0
- package/build/esm/components/SplitInput/SplitInputStyles.js +29 -0
- package/build/esm/components/SplitInput/SplitInputStyles.js.map +1 -0
- package/build/esm/components/SplitInput/index.d.ts +2 -0
- package/build/esm/components/Switch/Switch.d.ts +3 -0
- package/build/esm/components/Switch/Switch.js +15 -0
- package/build/esm/components/Switch/Switch.js.map +1 -0
- package/build/esm/components/Switch/SwitchProps.d.ts +7 -0
- package/build/esm/components/Switch/index.d.ts +2 -0
- package/build/esm/components/Switch/switch.styles.d.ts +2 -0
- package/build/esm/components/Switch/switch.styles.js +17 -0
- package/build/esm/components/Switch/switch.styles.js.map +1 -0
- package/build/esm/components/TabPanel/TabPanel.d.ts +3 -0
- package/build/esm/components/TabPanel/TabPanel.js +10 -0
- package/build/esm/components/TabPanel/TabPanel.js.map +1 -0
- package/build/esm/components/TabPanel/TabPanelProps.d.ts +3 -0
- package/build/esm/components/TabPanel/index.d.ts +2 -0
- package/build/esm/components/ToggleButton/ToggleButton.d.ts +3 -0
- package/build/esm/components/ToggleButton/ToggleButton.js +20 -0
- package/build/esm/components/ToggleButton/ToggleButton.js.map +1 -0
- package/build/esm/components/ToggleButton/ToggleButtonProps.d.ts +4 -0
- package/build/esm/components/ToggleButton/ToggleButtonStyles.d.ts +2 -0
- package/build/esm/components/ToggleButton/ToggleButtonStyles.js +19 -0
- package/build/esm/components/ToggleButton/ToggleButtonStyles.js.map +1 -0
- package/build/esm/components/ToggleButton/index.d.ts +2 -0
- package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +3 -0
- package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.js +20 -0
- package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.js.map +1 -0
- package/build/esm/components/ToggleButtonGroup/ToggleButtonGroupProps.d.ts +6 -0
- package/build/esm/components/ToggleButtonGroup/ToggleButtonGroupStyles.d.ts +1 -0
- package/build/esm/components/ToggleButtonGroup/ToggleButtonGroupStyles.js +12 -0
- package/build/esm/components/ToggleButtonGroup/ToggleButtonGroupStyles.js.map +1 -0
- package/build/esm/components/ToggleButtonGroup/index.d.ts +2 -0
- package/build/esm/components/Tooltip/Tooltip.d.ts +3 -0
- package/build/esm/components/Tooltip/Tooltip.js +13 -0
- package/build/esm/components/Tooltip/Tooltip.js.map +1 -0
- package/build/esm/components/Tooltip/TooltipProps.d.ts +1 -0
- package/build/esm/components/Tooltip/TooltipStyles.d.ts +2 -0
- package/build/esm/components/Tooltip/TooltipStyles.js +13 -0
- package/build/esm/components/Tooltip/TooltipStyles.js.map +1 -0
- package/build/esm/components/Tooltip/index.d.ts +2 -0
- package/build/esm/components/Typography/Typography.d.ts +9 -0
- package/build/esm/components/Typography/Typography.js +17 -0
- package/build/esm/components/Typography/Typography.js.map +1 -0
- package/build/esm/components/Typography/TypographyProps.d.ts +14 -0
- package/build/esm/components/Typography/TypographyProps.js +6 -0
- package/build/esm/components/Typography/TypographyProps.js.map +1 -0
- package/build/esm/components/Typography/TypographyStyles.d.ts +10 -0
- package/build/esm/components/Typography/TypographyStyles.js +76 -0
- package/build/esm/components/Typography/TypographyStyles.js.map +1 -0
- package/build/esm/components/Typography/index.d.ts +2 -0
- package/build/esm/components/index.d.ts +45 -0
- package/build/esm/hooks/index.d.ts +2 -0
- package/build/esm/hooks/useCollapsibleText.d.ts +9 -0
- package/build/esm/hooks/useCollapsibleText.js +17 -0
- package/build/esm/hooks/useCollapsibleText.js.map +1 -0
- package/build/esm/hooks/useTabs/index.d.ts +1 -0
- package/build/esm/hooks/useTabs/useTabs.d.ts +3 -0
- package/build/esm/hooks/useTabs/useTabs.js +35 -0
- package/build/esm/hooks/useTabs/useTabs.js.map +1 -0
- package/build/esm/hooks/useTabs/useTabsOptions.d.ts +3 -0
- package/build/esm/hooks/useTabs/useTabsResult.d.ts +22 -0
- package/build/esm/index.d.ts +3 -0
- package/build/esm/index.js +28 -0
- package/build/esm/index.js.map +1 -0
- package/build/esm/types/index.d.ts +2 -0
- package/build/esm/util/colors/alpha.d.ts +1 -0
- package/build/esm/util/colors/darken.d.ts +1 -0
- package/build/esm/util/colors/decomposeColor.d.ts +1 -0
- package/build/esm/util/colors/getLuminance.d.ts +1 -0
- package/build/esm/util/colors/hexToRgb.d.ts +1 -0
- package/build/esm/util/colors/index.d.ts +8 -0
- package/build/esm/util/colors/lighten.d.ts +1 -0
- package/build/esm/util/colors/recomposeColor.d.ts +1 -0
- package/build/esm/util/colors/rgbToHex.d.ts +1 -0
- package/build/esm/util/createTheme.d.ts +1 -0
- package/build/esm/util/index.d.ts +4 -0
- package/build/esm/util/makeStyles.d.ts +1 -0
- package/package.json +8 -8
- package/build/components/Accordion/index.d.ts +0 -1
- package/build/components/AccordionActions/index.d.ts +0 -1
- package/build/components/AccordionDetails/index.d.ts +0 -1
- package/build/components/AccordionSummary/index.d.ts +0 -1
- package/build/components/Alert/index.d.ts +0 -1
- package/build/components/AppBar/index.d.ts +0 -1
- package/build/components/Avatar/Avatar.d.ts +0 -3
- package/build/components/Avatar/index.d.ts +0 -2
- package/build/components/Badge/index.d.ts +0 -1
- package/build/components/Box/Box.d.ts +0 -3
- package/build/components/Box/BoxProps.d.ts +0 -5
- package/build/components/Box/BoxStyles.d.ts +0 -1
- package/build/components/Box/index.d.ts +0 -7
- package/build/components/Breadcrumbs/index.d.ts +0 -1
- package/build/components/BrowserSilhouette/index.d.ts +0 -1
- package/build/components/Button/ButtonStyles.d.ts +0 -2
- package/build/components/Button/index.d.ts +0 -2
- package/build/components/ButtonBase/index.d.ts +0 -1
- package/build/components/ButtonGroup/index.d.ts +0 -1
- package/build/components/Card/index.d.ts +0 -1
- package/build/components/CardActionArea/index.d.ts +0 -1
- package/build/components/CardActions/index.d.ts +0 -1
- package/build/components/CardContent/index.d.ts +0 -1
- package/build/components/CardHeader/index.d.ts +0 -1
- package/build/components/CardMedia/index.d.ts +0 -1
- package/build/components/Checkbox/Checkbox.d.ts +0 -3
- package/build/components/Checkbox/index.d.ts +0 -2
- package/build/components/Chip/index.d.ts +0 -2
- package/build/components/CircularProgress/index.d.ts +0 -1
- package/build/components/ClickAwayListener/index.d.ts +0 -1
- package/build/components/CollapsibleText/index.d.ts +0 -2
- package/build/components/Dialog/index.d.ts +0 -1
- package/build/components/DialogActions/index.d.ts +0 -1
- package/build/components/DialogContent/index.d.ts +0 -1
- package/build/components/DialogContentText/index.d.ts +0 -1
- package/build/components/DialogTitle/index.d.ts +0 -1
- package/build/components/Divider/index.d.ts +0 -2
- package/build/components/Drawer/index.d.ts +0 -1
- package/build/components/Fab/index.d.ts +0 -1
- package/build/components/FollowerAuthenticationDialog/index.d.ts +0 -2
- package/build/components/FormControl/index.d.ts +0 -1
- package/build/components/FormControlLabel/index.d.ts +0 -1
- package/build/components/FormLabel/index.d.ts +0 -1
- package/build/components/Grid/index.d.ts +0 -1
- package/build/components/GridList/index.d.ts +0 -1
- package/build/components/Hidden/index.d.ts +0 -1
- package/build/components/Icon/index.d.ts +0 -2
- package/build/components/IconButton/IconButton.d.ts +0 -3
- package/build/components/IconButton/index.d.ts +0 -2
- package/build/components/InputAdornment/index.d.ts +0 -1
- package/build/components/LinearProgress/index.d.ts +0 -1
- package/build/components/Link/index.d.ts +0 -2
- package/build/components/List/index.d.ts +0 -1
- package/build/components/ListItem/index.d.ts +0 -1
- package/build/components/ListItemAvatar/index.d.ts +0 -1
- package/build/components/ListItemIcon/index.d.ts +0 -1
- package/build/components/ListItemSecondaryAction/index.d.ts +0 -1
- package/build/components/ListItemText/index.d.ts +0 -1
- package/build/components/Menu/index.d.ts +0 -1
- package/build/components/MenuItem/index.d.ts +0 -1
- package/build/components/MenuList/index.d.ts +0 -1
- package/build/components/Modal/index.d.ts +0 -1
- package/build/components/NumberField/index.d.ts +0 -2
- package/build/components/Paper/Paper.d.ts +0 -6
- package/build/components/Paper/index.d.ts +0 -1
- package/build/components/PaperContent/index.d.ts +0 -1
- package/build/components/Popover/index.d.ts +0 -1
- package/build/components/Popper/index.d.ts +0 -1
- package/build/components/Radio/Radio.d.ts +0 -3
- package/build/components/Radio/index.d.ts +0 -2
- package/build/components/SplitInput/index.d.ts +0 -2
- package/build/components/Step/index.d.ts +0 -1
- package/build/components/StepButton/index.d.ts +0 -1
- package/build/components/StepConnector/index.d.ts +0 -1
- package/build/components/StepContent/index.d.ts +0 -1
- package/build/components/StepIcon/index.d.ts +0 -1
- package/build/components/StepLabel/index.d.ts +0 -1
- package/build/components/Stepper/index.d.ts +0 -1
- package/build/components/Switch/Switch.d.ts +0 -3
- package/build/components/Switch/index.d.ts +0 -2
- package/build/components/Tab/index.d.ts +0 -1
- package/build/components/TabPanel/index.d.ts +0 -2
- package/build/components/Tabs/index.d.ts +0 -1
- package/build/components/TextField/index.d.ts +0 -1
- package/build/components/ThemeProvider/index.d.ts +0 -1
- package/build/components/ToggleButton/ToggleButton.d.ts +0 -3
- package/build/components/ToggleButton/index.d.ts +0 -2
- package/build/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +0 -3
- package/build/components/ToggleButtonGroup/index.d.ts +0 -2
- package/build/components/Toolbar/index.d.ts +0 -1
- package/build/components/Tooltip/Tooltip.d.ts +0 -3
- package/build/components/Tooltip/TooltipProps.d.ts +0 -1
- package/build/components/Tooltip/index.d.ts +0 -2
- package/build/components/Typography/TypographyStyles.d.ts +0 -4
- package/build/components/Typography/index.d.ts +0 -2
- package/build/components/index.d.ts +0 -78
- package/build/index.es.js +0 -1479
- package/build/index.es.js.map +0 -1
- package/build/index.js +0 -1971
- package/build/index.js.map +0 -1
- package/build/util/ServerStyleSheets.d.ts +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ToggleButtonProps } from './ToggleButtonProps';
|
|
3
|
+
export declare const ToggleButton: React.ForwardRefExoticComponent<Pick<ToggleButtonProps, "color" | "translate" | "hidden" | "size" | "style" | "disabled" | "aria-describedby" | "aria-hidden" | "aria-label" | "className" | "form" | "slot" | "title" | "id" | "lang" | "name" | "type" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "classes" | "innerRef" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "action" | "selected" | "disableFocusRipple" | "buttonRef" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "onFocusVisible" | "TouchRippleProps"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import { ToggleButton as ToggleButton$1 } from '@material-ui/lab';
|
|
3
|
+
import React, { forwardRef } from 'react';
|
|
4
|
+
import { useToggleButtonStyles } from './ToggleButtonStyles.js';
|
|
5
|
+
|
|
6
|
+
var ToggleButton = forwardRef(function (props, ref) {
|
|
7
|
+
var children = props.children, muiProps = __rest(props, ["children"]);
|
|
8
|
+
var classes = useToggleButtonStyles(props);
|
|
9
|
+
return (React.createElement(ToggleButton$1, __assign({ ref: ref, classes: {
|
|
10
|
+
root: classes.root,
|
|
11
|
+
selected: classes.selected,
|
|
12
|
+
} }, muiProps), children));
|
|
13
|
+
});
|
|
14
|
+
ToggleButton.defaultProps = {
|
|
15
|
+
color: 'primary',
|
|
16
|
+
};
|
|
17
|
+
ToggleButton.displayName = 'ToggleButton';
|
|
18
|
+
|
|
19
|
+
export { ToggleButton };
|
|
20
|
+
//# sourceMappingURL=ToggleButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToggleButton.js","sources":["../../../../src/components/ToggleButton/ToggleButton.tsx"],"sourcesContent":["import { ToggleButton as MuiToggleButton } from '@material-ui/lab'\nimport React, { forwardRef } from 'react'\nimport { ToggleButtonProps } from './ToggleButtonProps'\nimport { useToggleButtonStyles } from './ToggleButtonStyles'\n\nexport const ToggleButton = forwardRef<HTMLButtonElement, ToggleButtonProps>((props, ref) => {\n const { children, ...muiProps } = props\n const classes = useToggleButtonStyles(props)\n\n return (\n <MuiToggleButton\n ref={ref}\n classes={{\n root: classes.root,\n selected: classes.selected,\n }}\n {...muiProps}\n >\n {children}\n </MuiToggleButton>\n )\n})\n\nToggleButton.defaultProps = {\n color: 'primary',\n}\n\nToggleButton.displayName = 'ToggleButton'\n"],"names":["MuiToggleButton"],"mappings":";;;;;IAKa,YAAY,GAAG,UAAU,CAAuC,UAAC,KAAK,EAAE,GAAG,EAAA;IAC9E,IAAA,QAAQ,GAAkB,KAAK,CAAvB,QAAA,EAAK,QAAQ,GAAA,MAAA,CAAK,KAAK,EAAjC,CAAyB,UAAA,CAAA,CAAF;AAC7B,IAAA,IAAM,OAAO,GAAG,qBAAqB,CAAC,KAAK,CAAC;IAE5C,QACE,oBAACA,cAAe,EAAA,QAAA,CAAA,EACd,GAAG,EAAE,GAAG,EACR,OAAO,EAAE;YACP,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,QAAQ,EAAE,OAAO,CAAC,QAAQ;AAC3B,SAAA,EAAA,EACG,QAAQ,CAAA,EAEX,QAAQ,CACO;AAEtB,CAAC;AAED,YAAY,CAAC,YAAY,GAAG;AAC1B,IAAA,KAAK,EAAE,SAAS;CACjB;AAED,YAAY,CAAC,WAAW,GAAG,cAAc;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { makeStyles } from '@material-ui/core';
|
|
2
|
+
|
|
3
|
+
var useToggleButtonStyles = makeStyles(function (theme) { return ({
|
|
4
|
+
root: {
|
|
5
|
+
color: theme.palette.text.primary,
|
|
6
|
+
},
|
|
7
|
+
selected: {
|
|
8
|
+
'&&': {
|
|
9
|
+
'&:hover': {
|
|
10
|
+
backgroundColor: function (props) { return theme.palette[props.color || 'primary'].dark; },
|
|
11
|
+
},
|
|
12
|
+
backgroundColor: function (props) { return theme.palette[props.color || 'primary'].main; },
|
|
13
|
+
color: 'white',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
}); });
|
|
17
|
+
|
|
18
|
+
export { useToggleButtonStyles };
|
|
19
|
+
//# sourceMappingURL=ToggleButtonStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToggleButtonStyles.js","sources":["../../../../src/components/ToggleButton/ToggleButtonStyles.ts"],"sourcesContent":["import { makeStyles, Theme } from '@material-ui/core'\n\nimport { ToggleButtonProps } from './ToggleButtonProps'\n\nexport const useToggleButtonStyles = makeStyles<Theme, ToggleButtonProps>((theme) => ({\n root: {\n color: theme.palette.text.primary,\n },\n selected: {\n '&&': {\n '&:hover': {\n backgroundColor: (props) => theme.palette[props.color || 'primary'].dark,\n },\n backgroundColor: (props) => theme.palette[props.color || 'primary'].main,\n color: 'white',\n },\n },\n}))\n"],"names":[],"mappings":";;AAIa,IAAA,qBAAqB,GAAG,UAAU,CAA2B,UAAC,KAAK,EAAK,EAAA,QAAC;AACpF,IAAA,IAAI,EAAE;AACJ,QAAA,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO;AAClC,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,SAAS,EAAE;AACT,gBAAA,eAAe,EAAE,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,SAAS,CAAC,CAAC,IAAI,GAAA;AACzE,aAAA;AACD,YAAA,eAAe,EAAE,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,SAAS,CAAC,CAAC,IAAI,GAAA;AACxE,YAAA,KAAK,EAAE,OAAO;AACf,SAAA;AACF,KAAA;CACF,EAAC,EAAA;;;;"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ToggleButtonGroupProps } from './ToggleButtonGroupProps';
|
|
3
|
+
export declare const ToggleButtonGroup: React.ForwardRefExoticComponent<Pick<ToggleButtonGroupProps, "color" | "translate" | "hidden" | "size" | "style" | "aria-describedby" | "aria-hidden" | "aria-label" | "className" | "slot" | "title" | "id" | "lang" | "role" | "tabIndex" | "orientation" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "classes" | "innerRef" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "value" | "exclusive"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import { ToggleButtonGroup as ToggleButtonGroup$1 } from '@material-ui/lab';
|
|
3
|
+
import React, { forwardRef } from 'react';
|
|
4
|
+
import { useToggleButtonGroupStyles } from './ToggleButtonGroupStyles.js';
|
|
5
|
+
|
|
6
|
+
var ToggleButtonGroup = forwardRef(function (props, ref) {
|
|
7
|
+
var children = props.children, _a = props.color, color = _a === void 0 ? 'primary' : _a, muiProps = __rest(props, ["children", "color"]);
|
|
8
|
+
var classes = useToggleButtonGroupStyles(props);
|
|
9
|
+
var childrenWithProps = React.Children.map(children, function (child) {
|
|
10
|
+
if (!React.isValidElement(child)) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
return React.cloneElement(child, { color: color });
|
|
14
|
+
});
|
|
15
|
+
return (React.createElement(ToggleButtonGroup$1, __assign({ ref: ref, classes: { root: classes.root } }, muiProps), childrenWithProps));
|
|
16
|
+
});
|
|
17
|
+
ToggleButtonGroup.displayName = 'ToggleButtonGroup';
|
|
18
|
+
|
|
19
|
+
export { ToggleButtonGroup };
|
|
20
|
+
//# sourceMappingURL=ToggleButtonGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToggleButtonGroup.js","sources":["../../../../src/components/ToggleButtonGroup/ToggleButtonGroup.tsx"],"sourcesContent":["import { ToggleButtonGroup as MuiToggleButtonGroup } from '@material-ui/lab'\nimport React, { forwardRef } from 'react'\nimport { ToggleButtonGroupProps } from './ToggleButtonGroupProps'\nimport { useToggleButtonGroupStyles } from './ToggleButtonGroupStyles'\n\nexport const ToggleButtonGroup = forwardRef<HTMLDivElement, ToggleButtonGroupProps>((props, ref) => {\n const { children, color = 'primary', ...muiProps } = props\n const classes = useToggleButtonGroupStyles(props)\n const childrenWithProps = React.Children.map(children, (child) => {\n if (!React.isValidElement(child)) {\n return null\n }\n return React.cloneElement(child, { color })\n })\n\n return (\n <MuiToggleButtonGroup ref={ref} classes={{ root: classes.root }} {...muiProps}>\n {childrenWithProps}\n </MuiToggleButtonGroup>\n )\n})\n\nToggleButtonGroup.displayName = 'ToggleButtonGroup'\n"],"names":["MuiToggleButtonGroup"],"mappings":";;;;;IAKa,iBAAiB,GAAG,UAAU,CAAyC,UAAC,KAAK,EAAE,GAAG,EAAA;IACrF,IAAA,QAAQ,GAAqC,KAAK,CAAA,QAA1C,EAAE,EAAmC,GAAA,KAAK,MAAvB,EAAjB,KAAK,mBAAG,SAAS,GAAA,EAAA,EAAK,QAAQ,GAAA,MAAA,CAAK,KAAK,EAApD,CAAA,UAAA,EAAA,OAAA,CAA4C,CAAF;AAChD,IAAA,IAAM,OAAO,GAAG,0BAA0B,CAAC,KAAK,CAAC;IACjD,IAAM,iBAAiB,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAC,KAAK,EAAA;AAC3D,QAAA,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE;AAChC,YAAA,OAAO,IAAI;AACZ;QACD,OAAO,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,KAAK,EAAA,KAAA,EAAE,CAAC;AAC7C,KAAC,CAAC;IAEF,QACE,oBAACA,mBAAoB,EAAA,QAAA,CAAA,EAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,EAAA,EAAM,QAAQ,CAC1E,EAAA,iBAAiB,CACG;AAE3B,CAAC;AAED,iBAAiB,CAAC,WAAW,GAAG,mBAAmB;;;;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ToggleButtonGroupProps as MuiToggleButtonGroupProps } from '@material-ui/lab';
|
|
2
|
+
import { Ref } from 'react';
|
|
3
|
+
export interface ToggleButtonGroupProps extends MuiToggleButtonGroupProps {
|
|
4
|
+
color: 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error';
|
|
5
|
+
ref?: (instance: HTMLDivElement) => void | Ref<HTMLDivElement> | null;
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useToggleButtonGroupStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<string>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { makeStyles } from '@material-ui/core';
|
|
2
|
+
|
|
3
|
+
var useToggleButtonGroupStyles = makeStyles(function (theme) { return ({
|
|
4
|
+
root: {
|
|
5
|
+
'&&': {
|
|
6
|
+
backgroundColor: theme.palette.grey[300],
|
|
7
|
+
},
|
|
8
|
+
},
|
|
9
|
+
}); });
|
|
10
|
+
|
|
11
|
+
export { useToggleButtonGroupStyles };
|
|
12
|
+
//# sourceMappingURL=ToggleButtonGroupStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToggleButtonGroupStyles.js","sources":["../../../../src/components/ToggleButtonGroup/ToggleButtonGroupStyles.ts"],"sourcesContent":["import { makeStyles, Theme } from '@material-ui/core'\n\nexport const useToggleButtonGroupStyles = makeStyles<Theme>((theme) => ({\n root: {\n '&&': {\n backgroundColor: theme.palette.grey[300],\n },\n },\n}))\n"],"names":[],"mappings":";;AAEa,IAAA,0BAA0B,GAAG,UAAU,CAAQ,UAAC,KAAK,EAAK,EAAA,QAAC;AACtE,IAAA,IAAI,EAAE;AACJ,QAAA,IAAI,EAAE;YACJ,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;AACzC,SAAA;AACF,KAAA;CACF,EAAC,EAAA;;;;"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TooltipProps } from './TooltipProps';
|
|
3
|
+
export declare const Tooltip: React.ForwardRefExoticComponent<Pick<TooltipProps, "color" | "translate" | "hidden" | "style" | "open" | "aria-describedby" | "aria-hidden" | "aria-label" | "className" | "slot" | "title" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "classes" | "innerRef" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "onClose" | "arrow" | "disableFocusListener" | "disableHoverListener" | "disableTouchListener" | "enterDelay" | "enterNextDelay" | "enterTouchDelay" | "interactive" | "leaveDelay" | "leaveTouchDelay" | "onOpen" | "placement" | "PopperComponent" | "PopperProps" | "TransitionComponent" | "TransitionProps"> & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { __assign } from 'tslib';
|
|
2
|
+
import { Tooltip as Tooltip$1 } from '@material-ui/core';
|
|
3
|
+
import React, { forwardRef } from 'react';
|
|
4
|
+
import { useTooltipStyles } from './TooltipStyles.js';
|
|
5
|
+
|
|
6
|
+
var Tooltip = forwardRef(function (props, ref) {
|
|
7
|
+
var classes = useTooltipStyles(props);
|
|
8
|
+
return React.createElement(Tooltip$1, __assign({ ref: ref, classes: classes }, props));
|
|
9
|
+
});
|
|
10
|
+
Tooltip.displayName = 'Tooltip';
|
|
11
|
+
|
|
12
|
+
export { Tooltip };
|
|
13
|
+
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import { Tooltip as MuiTooltip } from '@material-ui/core'\nimport React, { forwardRef } from 'react'\n\nimport { TooltipProps } from './TooltipProps'\nimport { useTooltipStyles } from './TooltipStyles'\n\nexport const Tooltip = forwardRef<HTMLElement, TooltipProps>((props, ref) => {\n const classes = useTooltipStyles(props)\n return <MuiTooltip ref={ref} classes={classes} {...props} />\n})\n\nTooltip.displayName = 'Tooltip'\n"],"names":["MuiTooltip"],"mappings":";;;;;IAMa,OAAO,GAAG,UAAU,CAA4B,UAAC,KAAK,EAAE,GAAG,EAAA;AACtE,IAAA,IAAM,OAAO,GAAG,gBAAgB,CAAC,KAAK,CAAC;AACvC,IAAA,OAAO,KAAC,CAAA,aAAA,CAAAA,SAAU,EAAC,QAAA,CAAA,EAAA,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAM,EAAA,KAAK,EAAI;AAC9D,CAAC;AAED,OAAO,CAAC,WAAW,GAAG,SAAS;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TooltipProps } from '@material-ui/core';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { makeStyles } from '@material-ui/core';
|
|
2
|
+
|
|
3
|
+
var useTooltipStyles = makeStyles(function (_a) {
|
|
4
|
+
var typography = _a.typography;
|
|
5
|
+
return ({
|
|
6
|
+
tooltip: {
|
|
7
|
+
fontSize: typography.pxToRem(16),
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export { useTooltipStyles };
|
|
13
|
+
//# sourceMappingURL=TooltipStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TooltipStyles.js","sources":["../../../../src/components/Tooltip/TooltipStyles.ts"],"sourcesContent":["import { makeStyles, Theme } from '@material-ui/core'\n\nimport { TooltipProps } from './TooltipProps'\n\nexport const useTooltipStyles = makeStyles<Theme, TooltipProps>(({ typography }) => ({\n tooltip: {\n fontSize: typography.pxToRem(16),\n },\n}))\n"],"names":[],"mappings":";;AAIa,IAAA,gBAAgB,GAAG,UAAU,CAAsB,UAAC,EAAc,EAAA;AAAZ,IAAA,IAAA,UAAU,GAAA,EAAA,CAAA,UAAA;AAAO,IAAA,QAAC;AACnF,QAAA,OAAO,EAAE;AACP,YAAA,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;AACjC,SAAA;KACF;AAJmF,CAIlF;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TypographyProps } from './TypographyProps';
|
|
3
|
+
export declare const Typography: {
|
|
4
|
+
<C extends React.ElementType<any> = "span">(props: TypographyProps<C>): JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
defaultProps: {
|
|
7
|
+
variant: "body1";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Typography as Typography$1 } from '@material-ui/core';
|
|
4
|
+
import { defaultTypographyProps } from './TypographyProps.js';
|
|
5
|
+
import { useTypographyStyles } from './TypographyStyles.js';
|
|
6
|
+
|
|
7
|
+
var Typography = function (props) {
|
|
8
|
+
props.weight; props.color; var TypographyRef = props.TypographyRef, restProps = __rest(props, ["weight", "color", "TypographyRef"]);
|
|
9
|
+
var classes = useTypographyStyles(__assign({}, props));
|
|
10
|
+
var variantMapping = { subtitle1: 'p' };
|
|
11
|
+
return React.createElement(Typography$1, __assign({ classes: classes, variantMapping: variantMapping, ref: TypographyRef }, restProps));
|
|
12
|
+
};
|
|
13
|
+
Typography.displayName = 'Typography';
|
|
14
|
+
Typography.defaultProps = defaultTypographyProps;
|
|
15
|
+
|
|
16
|
+
export { Typography };
|
|
17
|
+
//# sourceMappingURL=Typography.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Typography.js","sources":["../../../../src/components/Typography/Typography.tsx"],"sourcesContent":["import React from 'react'\nimport { Typography as MuiTypography } from '@material-ui/core'\n\nimport { TypographyProps, defaultTypographyProps, DefaultTypographyComponent } from './TypographyProps'\nimport { useTypographyStyles } from './TypographyStyles'\n\nexport const Typography = <C extends React.ElementType = DefaultTypographyComponent>(props: TypographyProps<C>) => {\n const { weight, color, TypographyRef, ...restProps } = props\n const classes = useTypographyStyles({ ...props } as TypographyProps & typeof defaultTypographyProps)\n const variantMapping = { subtitle1: 'p' }\n return <MuiTypography classes={classes} variantMapping={variantMapping} ref={TypographyRef} {...restProps} />\n}\n\nTypography.displayName = 'Typography'\n\nTypography.defaultProps = defaultTypographyProps\n"],"names":["MuiTypography"],"mappings":";;;;;;AAMO,IAAM,UAAU,GAAG,UAA2D,KAAyB,EAAA;IACrD,KAAK,CAAA,MAA9C,EAAyC,KAAK,CAAvC,KAAA,CAAA,KAAE,aAAa,GAAmB,KAAK,cAAxB,CAAK,CAAA,SAAS,UAAK,KAAK,EAAtD,CAA8C,QAAA,EAAA,OAAA,EAAA,eAAA,CAAA;IACpD,IAAM,OAAO,GAAG,mBAAmB,CAAC,aAAK,KAAK,CAAqD,CAAC;AACpG,IAAA,IAAM,cAAc,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE;AACzC,IAAA,OAAO,oBAACA,YAAa,EAAA,QAAA,CAAA,EAAC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,EAAM,EAAA,SAAS,EAAI;AAC/G;AAEA,UAAU,CAAC,WAAW,GAAG,YAAY;AAErC,UAAU,CAAC,YAAY,GAAG,sBAAsB;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TypographyProps as MuiTypographyProps, TypographyTypeMap } from '@material-ui/core';
|
|
2
|
+
import React, { RefObject } from 'react';
|
|
3
|
+
export declare type ThemeColors = 'primary.light' | 'primary' | 'primary.dark' | 'secondary.light' | 'secondary' | 'secondary.dark' | 'info.light' | 'info' | 'info.dark' | 'success.light' | 'success' | 'success.dark' | 'error.light' | 'error' | 'error.dark' | 'warning.light' | 'warning' | 'warning.dark' | 'white' | 'black' | 'grey.100' | 'grey.200' | 'grey.300' | 'grey.400' | 'grey.500' | 'grey.600' | 'grey.700' | 'grey.800' | 'grey.900' | 'textPrimary' | 'textSecondary';
|
|
4
|
+
export declare const defaultTypographyProps: {
|
|
5
|
+
variant: "body1";
|
|
6
|
+
};
|
|
7
|
+
export declare type DefaultTypographyComponent = TypographyTypeMap['defaultComponent'];
|
|
8
|
+
export declare type TypographyProps<C extends React.ElementType = DefaultTypographyComponent> = Omit<MuiTypographyProps<C, {
|
|
9
|
+
component?: C;
|
|
10
|
+
}>, 'color' | 'ref'> & {
|
|
11
|
+
TypographyRef?: RefObject<HTMLParagraphElement | HTMLHeadingElement | HTMLSpanElement>;
|
|
12
|
+
color?: ThemeColors;
|
|
13
|
+
weight?: 'regular' | 'medium' | 'semi-bold' | 'bold';
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypographyProps.js","sources":["../../../../src/components/Typography/TypographyProps.ts"],"sourcesContent":["import { TypographyProps as MuiTypographyProps, TypographyTypeMap } from '@material-ui/core'\nimport React, { RefObject } from 'react'\n\nexport type ThemeColors =\n | 'primary.light'\n | 'primary'\n | 'primary.dark'\n | 'secondary.light'\n | 'secondary'\n | 'secondary.dark'\n | 'info.light'\n | 'info'\n | 'info.dark'\n | 'success.light'\n | 'success'\n | 'success.dark'\n | 'error.light'\n | 'error'\n | 'error.dark'\n | 'warning.light'\n | 'warning'\n | 'warning.dark'\n | 'white'\n | 'black'\n | 'grey.100'\n | 'grey.200'\n | 'grey.300'\n | 'grey.400'\n | 'grey.500'\n | 'grey.600'\n | 'grey.700'\n | 'grey.800'\n | 'grey.900'\n | 'textPrimary'\n | 'textSecondary'\n\nexport const defaultTypographyProps = {\n variant: 'body1' as const,\n}\n\nexport type DefaultTypographyComponent = TypographyTypeMap['defaultComponent']\n\nexport type TypographyProps<C extends React.ElementType = DefaultTypographyComponent> = Omit<\n MuiTypographyProps<C, { component?: C }>,\n 'color' | 'ref'\n> & {\n TypographyRef?: RefObject<HTMLParagraphElement | HTMLHeadingElement | HTMLSpanElement>\n color?: ThemeColors\n weight?: 'regular' | 'medium' | 'semi-bold' | 'bold'\n}\n"],"names":[],"mappings":"AAoCa,IAAA,sBAAsB,GAAG;AACpC,IAAA,OAAO,EAAE,OAAgB;;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const useTypographyStyles: (props: Omit<import("@material-ui/core").TypographyProps<"span", {
|
|
3
|
+
component?: "span" | undefined;
|
|
4
|
+
}>, "color" | "ref"> & {
|
|
5
|
+
TypographyRef?: import("react").RefObject<HTMLHeadingElement | HTMLParagraphElement | HTMLSpanElement> | undefined;
|
|
6
|
+
color?: import("./TypographyProps").ThemeColors | undefined;
|
|
7
|
+
weight?: "medium" | "bold" | "regular" | "semi-bold" | undefined;
|
|
8
|
+
} & {
|
|
9
|
+
variant: "body1";
|
|
10
|
+
}) => import("@material-ui/styles").ClassNameMap<string>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { makeStyles } from '@material-ui/core';
|
|
2
|
+
import { iconStaticClassName } from '../Icon/Icon.js';
|
|
3
|
+
|
|
4
|
+
var weights = {
|
|
5
|
+
regular: 400,
|
|
6
|
+
medium: 500,
|
|
7
|
+
'semi-bold': 600,
|
|
8
|
+
bold: 700,
|
|
9
|
+
};
|
|
10
|
+
var getCustomColor = function (theme, color) {
|
|
11
|
+
var isCommonColor = color && ['white', 'black'].includes(color);
|
|
12
|
+
var isGreyColor = color && color.match(/^grey\.\d{3}/);
|
|
13
|
+
var isSemanticColor = color && color.match(/(primary|secondary|info|success|error|warning).?(light|dark)?/);
|
|
14
|
+
var isTextColor = color && ['textPrimary', 'textSecondary'].includes(color);
|
|
15
|
+
switch (true) {
|
|
16
|
+
case isCommonColor:
|
|
17
|
+
// @ts-expect-error - todo.
|
|
18
|
+
return theme.palette.common[color];
|
|
19
|
+
case Boolean(isGreyColor):
|
|
20
|
+
var scale = color.split('.')[1];
|
|
21
|
+
// @ts-expect-error - todo.
|
|
22
|
+
return theme.palette.grey[scale] || theme.palette.grey[900];
|
|
23
|
+
case Boolean(isSemanticColor):
|
|
24
|
+
var _a = color.split('.'), paletteKey = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
25
|
+
// @ts-expect-error - todo.
|
|
26
|
+
return theme.palette[paletteKey][variant];
|
|
27
|
+
case isTextColor:
|
|
28
|
+
// @ts-expect-error - todo.
|
|
29
|
+
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
30
|
+
default:
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
var useTypographyStyles = makeStyles(function (theme) {
|
|
35
|
+
var _a;
|
|
36
|
+
return ({
|
|
37
|
+
root: (_a = {},
|
|
38
|
+
_a["& ." + iconStaticClassName] = {
|
|
39
|
+
position: 'relative',
|
|
40
|
+
top: '0.125em',
|
|
41
|
+
padding: '0 0.125em',
|
|
42
|
+
boxSizing: 'content-box',
|
|
43
|
+
},
|
|
44
|
+
_a.fontFamily = theme.typography.fontFamily,
|
|
45
|
+
_a.fontWeight = function (_a) {
|
|
46
|
+
var variant = _a.variant, weight = _a.weight;
|
|
47
|
+
return (weight ? weights[weight] : theme.typography[variant].fontWeight);
|
|
48
|
+
},
|
|
49
|
+
_a.fontSize = function (_a) {
|
|
50
|
+
var variant = _a.variant;
|
|
51
|
+
return theme.typography[variant].fontSize;
|
|
52
|
+
},
|
|
53
|
+
_a.lineHeight = function (_a) {
|
|
54
|
+
var variant = _a.variant;
|
|
55
|
+
return theme.typography[variant].lineHeight;
|
|
56
|
+
},
|
|
57
|
+
_a.textTransform = function (_a) {
|
|
58
|
+
var variant = _a.variant;
|
|
59
|
+
return theme.typography[variant].textTransform;
|
|
60
|
+
},
|
|
61
|
+
_a.color = function (_a) {
|
|
62
|
+
var color = _a.color, variant = _a.variant;
|
|
63
|
+
return (color && getCustomColor(theme, color)) || theme.typography[variant].color;
|
|
64
|
+
},
|
|
65
|
+
_a),
|
|
66
|
+
caption: {
|
|
67
|
+
display: 'inline',
|
|
68
|
+
},
|
|
69
|
+
overline: {
|
|
70
|
+
display: 'inline',
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export { useTypographyStyles };
|
|
76
|
+
//# sourceMappingURL=TypographyStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypographyStyles.js","sources":["../../../../src/components/Typography/TypographyStyles.ts"],"sourcesContent":["import { makeStyles, Theme } from '@material-ui/core'\n\nimport { iconStaticClassName } from '../Icon'\nimport { defaultTypographyProps, TypographyProps } from './TypographyProps'\n\nconst weights = {\n regular: 400,\n medium: 500,\n 'semi-bold': 600,\n bold: 700,\n}\n\nconst getCustomColor = (theme: Theme, color: string) => {\n const isCommonColor = color && ['white', 'black'].includes(color)\n const isGreyColor = color && color.match(/^grey\\.\\d{3}/)\n const isSemanticColor = color && color.match(/(primary|secondary|info|success|error|warning).?(light|dark)?/)\n const isTextColor = color && ['textPrimary', 'textSecondary'].includes(color)\n switch (true) {\n case isCommonColor:\n // @ts-expect-error - todo.\n return theme.palette.common[color]\n case Boolean(isGreyColor):\n const scale = color.split('.')[1]\n // @ts-expect-error - todo.\n return theme.palette.grey[scale] || theme.palette.grey[900]\n case Boolean(isSemanticColor):\n const [paletteKey, variant = 'main'] = color.split('.')\n // @ts-expect-error - todo.\n return theme.palette[paletteKey][variant]\n case isTextColor:\n // @ts-expect-error - todo.\n return theme.palette.text[color.slice(4).toLowerCase()]\n default:\n return undefined\n }\n}\n\nexport const useTypographyStyles = makeStyles<Theme, TypographyProps & typeof defaultTypographyProps>((theme) => ({\n root: {\n [`& .${iconStaticClassName}`]: {\n position: 'relative',\n top: '0.125em',\n padding: '0 0.125em',\n boxSizing: 'content-box',\n },\n fontFamily: theme.typography.fontFamily,\n fontWeight: ({ variant, weight }) => (weight ? weights[weight] : theme.typography[variant].fontWeight),\n fontSize: ({ variant }) => theme.typography[variant].fontSize,\n lineHeight: ({ variant }) => theme.typography[variant].lineHeight,\n textTransform: ({ variant }) => theme.typography[variant].textTransform,\n color: ({ color, variant }) => (color && getCustomColor(theme, color)) || theme.typography[variant].color,\n },\n caption: {\n display: 'inline',\n },\n overline: {\n display: 'inline',\n },\n}))\n"],"names":[],"mappings":";;;AAKA,IAAM,OAAO,GAAG;AACd,IAAA,OAAO,EAAE,GAAG;AACZ,IAAA,MAAM,EAAE,GAAG;AACX,IAAA,WAAW,EAAE,GAAG;AAChB,IAAA,IAAI,EAAE,GAAG;CACV;AAED,IAAM,cAAc,GAAG,UAAC,KAAY,EAAE,KAAa,EAAA;AACjD,IAAA,IAAM,aAAa,GAAG,KAAK,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC;IACjE,IAAM,WAAW,GAAG,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC;IACxD,IAAM,eAAe,GAAG,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,+DAA+D,CAAC;AAC7G,IAAA,IAAM,WAAW,GAAG,KAAK,IAAI,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC;AAC7E,IAAA,QAAQ,IAAI;AACV,QAAA,KAAK,aAAa;;YAEhB,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;QACpC,KAAK,OAAO,CAAC,WAAW,CAAC;YACvB,IAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;;AAEjC,YAAA,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;QAC7D,KAAK,OAAO,CAAC,eAAe,CAAC;AACrB,YAAA,IAAA,KAAiC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAhD,UAAU,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,EAAgB,GAAA,EAAA,CAAA,CAAA,CAAA,EAAhB,OAAO,GAAG,EAAA,KAAA,MAAA,GAAA,MAAM,KAAoB;;YAEvD,OAAO,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;AAC3C,QAAA,KAAK,WAAW;;AAEd,YAAA,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AACzD,QAAA;AACE,YAAA,OAAO,SAAS;AACnB;AACH,CAAC;AAEY,IAAA,mBAAmB,GAAG,UAAU,CAAyD,UAAC,KAAK,EAAA;;AAAK,IAAA,QAAC;QAChH,IAAI,GAAA,EAAA,GAAA,EAAA;YACF,EAAC,CAAA,KAAA,GAAM,mBAAqB,CAAG,GAAA;AAC7B,gBAAA,QAAQ,EAAE,UAAU;AACpB,gBAAA,GAAG,EAAE,SAAS;AACd,gBAAA,OAAO,EAAE,WAAW;AACpB,gBAAA,SAAS,EAAE,aAAa;AACzB,aAAA;AACD,YAAA,EAAA,CAAA,UAAU,GAAE,KAAK,CAAC,UAAU,CAAC,UAAU;YACvC,EAAU,CAAA,UAAA,GAAE,UAAC,EAAmB,EAAA;oBAAjB,OAAO,GAAA,EAAA,CAAA,OAAA,EAAE,MAAM,GAAA,EAAA,CAAA,MAAA;gBAAO,QAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,UAAU;aAAC;YACtG,EAAQ,CAAA,QAAA,GAAE,UAAC,EAAW,EAAA;AAAT,gBAAA,IAAA,OAAO,GAAA,EAAA,CAAA,OAAA;AAAO,gBAAA,OAAA,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,QAAQ;aAAA;YAC7D,EAAU,CAAA,UAAA,GAAE,UAAC,EAAW,EAAA;AAAT,gBAAA,IAAA,OAAO,GAAA,EAAA,CAAA,OAAA;AAAO,gBAAA,OAAA,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,UAAU;aAAA;YACjE,EAAa,CAAA,aAAA,GAAE,UAAC,EAAW,EAAA;AAAT,gBAAA,IAAA,OAAO,GAAA,EAAA,CAAA,OAAA;AAAO,gBAAA,OAAA,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,aAAa;aAAA;YACvE,EAAK,CAAA,KAAA,GAAE,UAAC,EAAkB,EAAA;oBAAhB,KAAK,GAAA,EAAA,CAAA,KAAA,EAAE,OAAO,GAAA,EAAA,CAAA,OAAA;AAAO,gBAAA,OAAA,CAAC,KAAK,IAAI,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,KAAK;aAAA;AAC1G,YAAA,EAAA,CAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,QAAQ;AAClB,SAAA;AACD,QAAA,QAAQ,EAAE;AACR,YAAA,OAAO,EAAE,QAAQ;AAClB,SAAA;KACF;AArBgH,CAqB/G;;;;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export * from '@material-ui/core';
|
|
2
|
+
export { Alert, AlertTitle, Autocomplete, AvatarGroup, Pagination, PaginationItem, Rating, Skeleton, SpeedDial, SpeedDialAction, SpeedDialIcon, TabContext, TabList, Timeline, TimelineConnector, TimelineContent, TimelineDot, TimelineItem, TimelineOppositeContent, TimelineSeparator, TreeItem, TreeView, useAutocomplete, } from '@material-ui/lab';
|
|
3
|
+
export type { AlertProps, AlertTitleProps, AutocompleteProps, AvatarGroupProps, PaginationItemProps, PaginationProps, RatingProps, SkeletonProps, SpeedDialActionProps, SpeedDialIconProps, SpeedDialProps, TabContextProps, TabListProps, TimelineConnectorProps, TimelineContentProps, TimelineDotProps, TimelineItemProps, TimelineOppositeContentProps, TimelineProps, TimelineSeparatorProps, TreeItemProps, TreeViewProps, } from '@material-ui/lab';
|
|
4
|
+
export { Avatar } from './Avatar';
|
|
5
|
+
export type { AvatarProps } from './Avatar';
|
|
6
|
+
export { BrowserSilhouette } from './BrowserSilhouette';
|
|
7
|
+
export { Button } from './Button';
|
|
8
|
+
export type { ButtonProps } from './Button';
|
|
9
|
+
export { Checkbox } from './Checkbox';
|
|
10
|
+
export type { CheckboxProps } from './Checkbox';
|
|
11
|
+
export { Chip } from './Chip';
|
|
12
|
+
export type { ChipProps } from './Chip';
|
|
13
|
+
export { CollapsibleText } from './CollapsibleText';
|
|
14
|
+
export type { CollapsibleTextProps } from './CollapsibleText';
|
|
15
|
+
export { Divider } from './Divider';
|
|
16
|
+
export type { DividerProps } from './Divider';
|
|
17
|
+
export { FollowerAuthenticationDialog } from './FollowerAuthenticationDialog';
|
|
18
|
+
export type { FollowerAuthenticationDialogProps } from './FollowerAuthenticationDialog';
|
|
19
|
+
export { Icon } from './Icon';
|
|
20
|
+
export type { IconProps } from './Icon';
|
|
21
|
+
export { IconButton } from './IconButton';
|
|
22
|
+
export type { IconButtonProps } from './IconButton';
|
|
23
|
+
export { Link } from './Link';
|
|
24
|
+
export type { LinkProps } from './Link';
|
|
25
|
+
export { NumberField } from './NumberField';
|
|
26
|
+
export type { NumberFieldProps } from './NumberField';
|
|
27
|
+
export { Paper } from './Paper';
|
|
28
|
+
export type { PaperProps } from './Paper';
|
|
29
|
+
export { PaperContent } from './PaperContent';
|
|
30
|
+
export { Radio } from './Radio';
|
|
31
|
+
export type { RadioProps } from './Radio';
|
|
32
|
+
export { SplitInput } from './SplitInput';
|
|
33
|
+
export type { SplitInputProps } from './SplitInput';
|
|
34
|
+
export { Switch } from './Switch';
|
|
35
|
+
export type { SwitchProps } from './Switch';
|
|
36
|
+
export { TabPanel } from './TabPanel';
|
|
37
|
+
export type { TabPanelProps } from './TabPanel';
|
|
38
|
+
export { ToggleButton } from './ToggleButton';
|
|
39
|
+
export type { ToggleButtonProps } from './ToggleButton';
|
|
40
|
+
export { ToggleButtonGroup } from './ToggleButtonGroup';
|
|
41
|
+
export type { ToggleButtonGroupProps } from './ToggleButtonGroup';
|
|
42
|
+
export { Tooltip } from './Tooltip';
|
|
43
|
+
export type { TooltipProps } from './Tooltip';
|
|
44
|
+
export { Typography } from './Typography';
|
|
45
|
+
export type { ThemeColors, TypographyProps } from './Typography';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
var useCollapsibleText = function () {
|
|
4
|
+
var _a = useState(false), open = _a[0], setOpen = _a[1];
|
|
5
|
+
var collapseState = useState(false);
|
|
6
|
+
var toggle = function () { return collapseState[0] && setOpen(!open); };
|
|
7
|
+
return {
|
|
8
|
+
collapsibleText: {
|
|
9
|
+
open: open,
|
|
10
|
+
collapseState: collapseState,
|
|
11
|
+
},
|
|
12
|
+
toggle: toggle,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { useCollapsibleText };
|
|
17
|
+
//# sourceMappingURL=useCollapsibleText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCollapsibleText.js","sources":["../../../src/hooks/useCollapsibleText.ts"],"sourcesContent":["import { useState } from 'react'\n\ninterface CollapsibleTextHookResult {\n collapsibleText: {\n open: boolean\n collapseState: [boolean, (collapsible: boolean) => void]\n }\n toggle: () => void\n}\n\nexport const useCollapsibleText: () => CollapsibleTextHookResult = () => {\n const [open, setOpen] = useState(false)\n const collapseState = useState(false)\n const toggle = () => collapseState[0] && setOpen(!open)\n return {\n collapsibleText: {\n open,\n collapseState,\n },\n toggle,\n }\n}\n"],"names":[],"mappings":";;AAUa,IAAA,kBAAkB,GAAoC,YAAA;IAC3D,IAAA,EAAA,GAAkB,QAAQ,CAAC,KAAK,CAAC,EAAhC,IAAI,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,OAAO,GAAA,EAAA,CAAA,CAAA,CAAmB;AACvC,IAAA,IAAM,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC;AACrC,IAAA,IAAM,MAAM,GAAG,YAAA,EAAM,OAAA,aAAa,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,IAAI,CAAC,CAAA,EAAA;IACvD,OAAO;AACL,QAAA,eAAe,EAAE;AACf,YAAA,IAAI,EAAA,IAAA;AACJ,YAAA,aAAa,EAAA,aAAA;AACd,SAAA;AACD,QAAA,MAAM,EAAA,MAAA;KACP;AACH;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useTabs } from './useTabs';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
var useTabs = function (options) {
|
|
4
|
+
var initialTab = options.initialTab;
|
|
5
|
+
var genTabId = function (id) { return ("tab-" + id).toLowerCase().replace(/ /g, '-'); };
|
|
6
|
+
var genPanelId = function (id) { return ("tab-panel-" + id).toLowerCase().replace(/ /g, '-'); };
|
|
7
|
+
var _a = useState(genTabId(initialTab)), activeTab = _a[0], setActiveTab = _a[1];
|
|
8
|
+
var handleChange = function (_, nextTab) { return setActiveTab(nextTab); };
|
|
9
|
+
var TabsProps = { onChange: handleChange, value: activeTab };
|
|
10
|
+
var useTab = function (baseId) {
|
|
11
|
+
var tabId = genTabId(baseId);
|
|
12
|
+
var tabPanelId = genPanelId(baseId);
|
|
13
|
+
var tabProps = {
|
|
14
|
+
id: tabId,
|
|
15
|
+
label: baseId,
|
|
16
|
+
value: tabId,
|
|
17
|
+
'aria-controls': tabPanelId,
|
|
18
|
+
};
|
|
19
|
+
var panelProps = {
|
|
20
|
+
id: tabPanelId,
|
|
21
|
+
role: 'tabpanel',
|
|
22
|
+
show: activeTab === tabId,
|
|
23
|
+
'aria-labelledby': tabId,
|
|
24
|
+
};
|
|
25
|
+
return [tabProps, panelProps];
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
TabsProps: TabsProps,
|
|
29
|
+
useTab: useTab,
|
|
30
|
+
setActiveTab: function (tabId) { return setActiveTab(tabId); },
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { useTabs };
|
|
35
|
+
//# sourceMappingURL=useTabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTabs.js","sources":["../../../../src/hooks/useTabs/useTabs.ts"],"sourcesContent":["import { SyntheticEvent, useState } from 'react'\nimport { UseTabsOptions } from './useTabsOptions'\nimport { UseTabsResult, UseTabResult } from './useTabsResult'\n\nexport const useTabs = (options: UseTabsOptions): UseTabsResult => {\n const { initialTab } = options\n const genTabId = (id: string) => `tab-${id}`.toLowerCase().replace(/ /g, '-')\n const genPanelId = (id: string) => `tab-panel-${id}`.toLowerCase().replace(/ /g, '-')\n const [activeTab, setActiveTab] = useState(genTabId(initialTab))\n const handleChange = (_: SyntheticEvent, nextTab: string) => setActiveTab(nextTab)\n const TabsProps = { onChange: handleChange, value: activeTab }\n const useTab = (baseId: string) => {\n const tabId = genTabId(baseId)\n const tabPanelId = genPanelId(baseId)\n const tabProps = {\n id: tabId,\n label: baseId,\n value: tabId,\n 'aria-controls': tabPanelId,\n }\n const panelProps = {\n id: tabPanelId,\n role: 'tabpanel',\n show: activeTab === tabId,\n 'aria-labelledby': tabId,\n }\n return [tabProps, panelProps] as UseTabResult\n }\n return {\n TabsProps,\n useTab,\n setActiveTab: (tabId: string) => setActiveTab(tabId),\n }\n}\n"],"names":[],"mappings":";;AAIO,IAAM,OAAO,GAAG,UAAC,OAAuB,EAAA;AACrC,IAAA,IAAA,UAAU,GAAK,OAAO,CAAA,UAAZ;IAClB,IAAM,QAAQ,GAAG,UAAC,EAAU,IAAK,OAAA,CAAA,MAAO,GAAA,EAAI,EAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAA5C,EAA4C;IAC7E,IAAM,UAAU,GAAG,UAAC,EAAU,IAAK,OAAA,CAAA,YAAa,GAAA,EAAI,EAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAlD,EAAkD;AAC/E,IAAA,IAAA,EAA4B,GAAA,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAzD,SAAS,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,YAAY,QAAkC;AAChE,IAAA,IAAM,YAAY,GAAG,UAAC,CAAiB,EAAE,OAAe,EAAA,EAAK,OAAA,YAAY,CAAC,OAAO,CAAC,CAAA,EAAA;IAClF,IAAM,SAAS,GAAG,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE;IAC9D,IAAM,MAAM,GAAG,UAAC,MAAc,EAAA;AAC5B,QAAA,IAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC;AAC9B,QAAA,IAAM,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC;AACrC,QAAA,IAAM,QAAQ,GAAG;AACf,YAAA,EAAE,EAAE,KAAK;AACT,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,KAAK,EAAE,KAAK;AACZ,YAAA,eAAe,EAAE,UAAU;SAC5B;AACD,QAAA,IAAM,UAAU,GAAG;AACjB,YAAA,EAAE,EAAE,UAAU;AACd,YAAA,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,SAAS,KAAK,KAAK;AACzB,YAAA,iBAAiB,EAAE,KAAK;SACzB;AACD,QAAA,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAiB;AAC/C,KAAC;IACD,OAAO;AACL,QAAA,SAAS,EAAA,SAAA;AACT,QAAA,MAAM,EAAA,MAAA;QACN,YAAY,EAAE,UAAC,KAAa,EAAK,EAAA,OAAA,YAAY,CAAC,KAAK,CAAC,CAAA,EAAA;KACrD;AACH;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare type PreConfiguredTabProps = {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
'aria-controls': string;
|
|
6
|
+
};
|
|
7
|
+
declare type PreConfiguredPanelProps = {
|
|
8
|
+
id: string;
|
|
9
|
+
role: string;
|
|
10
|
+
show: boolean;
|
|
11
|
+
'aria-labelledby': string;
|
|
12
|
+
};
|
|
13
|
+
export declare type UseTabResult = [PreConfiguredTabProps, PreConfiguredPanelProps];
|
|
14
|
+
export interface UseTabsResult {
|
|
15
|
+
TabsProps: {
|
|
16
|
+
onChange: (event: any, value: string) => void;
|
|
17
|
+
value: string;
|
|
18
|
+
};
|
|
19
|
+
useTab: (baseTabId: string) => UseTabResult;
|
|
20
|
+
setActiveTab: (baseTabId: string) => void;
|
|
21
|
+
}
|
|
22
|
+
export {};
|