@popmenu/common-ui 0.127.0 → 0.128.0
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/AvatarProps.d.ts +2 -2
- package/build/cjs/components/Button/Button.d.ts +1 -1
- package/build/cjs/components/Button/ButtonProps.d.ts +1 -1
- package/build/cjs/components/Button/ButtonStyles.d.ts +1 -1
- package/build/cjs/components/Chip/Chip.d.ts +1 -1
- package/build/cjs/components/Chip/ChipProps.d.ts +2 -2
- package/build/cjs/components/CollapsibleText/CollapsibleTextStyles.d.ts +2 -2
- package/build/cjs/components/Divider/DividerProps.d.ts +1 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.d.ts +0 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.d.ts +0 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.d.ts +0 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.d.ts +0 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts +6 -6
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.d.ts +0 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.d.ts +0 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.d.ts +0 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.d.ts +0 -1
- package/build/cjs/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.d.ts +0 -1
- package/build/cjs/components/FollowerAuthenticationDialog/context.d.ts +0 -1
- package/build/cjs/components/Icon/IconStyles.d.ts +1 -1
- package/build/cjs/components/IconButton/IconButtonProps.d.ts +1 -1
- package/build/cjs/components/Link/LinkStyles.d.ts +1 -1
- package/build/cjs/components/NumberField/NumberField.d.ts +0 -1
- package/build/cjs/components/NumberField/NumberFieldStyles.d.ts +1 -1
- package/build/cjs/components/SplitInput/SplitInputStyles.d.ts +1 -1
- package/build/cjs/components/Tooltip/TooltipProps.d.ts +1 -1
- package/build/cjs/components/Typography/Typography.d.ts +1 -1
- package/build/cjs/components/Typography/TypographyProps.d.ts +3 -3
- package/build/cjs/components/Typography/TypographyStyles.d.ts +1 -1
- package/build/cjs/hooks/useTabs/useTabsResult.d.ts +3 -3
- package/build/cjs/index.js +412 -437
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/types/index.d.ts +2 -2
- package/build/esm/components/Avatar/Avatar.js +9 -10
- package/build/esm/components/Avatar/Avatar.js.map +1 -1
- package/build/esm/components/Avatar/AvatarProps.d.ts +2 -2
- package/build/esm/components/Avatar/avatar.styles.js +11 -11
- package/build/esm/components/Avatar/avatar.styles.js.map +1 -1
- package/build/esm/components/Avatar/util/useImageProps.js +9 -8
- package/build/esm/components/Avatar/util/useImageProps.js.map +1 -1
- package/build/esm/components/BrowserSilhouette/BrowserSilhouette.js +2 -3
- package/build/esm/components/BrowserSilhouette/BrowserSilhouette.js.map +1 -1
- package/build/esm/components/BrowserSilhouette/browserSilhouette.styles.js +5 -5
- package/build/esm/components/BrowserSilhouette/browserSilhouette.styles.js.map +1 -1
- package/build/esm/components/Button/Button.d.ts +1 -1
- package/build/esm/components/Button/Button.js +7 -8
- package/build/esm/components/Button/Button.js.map +1 -1
- package/build/esm/components/Button/ButtonProps.d.ts +1 -1
- package/build/esm/components/Button/ButtonStyles.d.ts +1 -1
- package/build/esm/components/Button/ButtonStyles.js +3 -6
- package/build/esm/components/Button/ButtonStyles.js.map +1 -1
- package/build/esm/components/Checkbox/Checkbox.js +5 -5
- package/build/esm/components/Checkbox/Checkbox.js.map +1 -1
- package/build/esm/components/Chip/Chip.d.ts +1 -1
- package/build/esm/components/Chip/Chip.js +7 -8
- package/build/esm/components/Chip/Chip.js.map +1 -1
- package/build/esm/components/Chip/ChipProps.d.ts +2 -2
- package/build/esm/components/Chip/ChipStyles.js +19 -19
- package/build/esm/components/Chip/ChipStyles.js.map +1 -1
- package/build/esm/components/CollapsibleText/CollapsibleText.js +19 -20
- package/build/esm/components/CollapsibleText/CollapsibleText.js.map +1 -1
- package/build/esm/components/CollapsibleText/CollapsibleTextStyles.d.ts +2 -2
- package/build/esm/components/CollapsibleText/CollapsibleTextStyles.js +5 -6
- package/build/esm/components/CollapsibleText/CollapsibleTextStyles.js.map +1 -1
- package/build/esm/components/Divider/Divider.js +11 -15
- package/build/esm/components/Divider/Divider.js.map +1 -1
- package/build/esm/components/Divider/DividerProps.d.ts +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.js +26 -26
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationAltActions.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.js +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationBody.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.js +6 -6
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationCloseButton.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.js +4 -4
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationContent.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.js +11 -15
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialog.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationDialogProps.d.ts +6 -6
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.js +2 -2
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationFooter.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js +49 -52
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationForm.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.js +4 -4
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationGraphic.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.js +3 -3
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationInfo.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.js +3 -3
- package/build/esm/components/FollowerAuthenticationDialog/FollowerAuthenticationTitle.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/context.d.ts +0 -1
- package/build/esm/components/FollowerAuthenticationDialog/context.js +4 -4
- package/build/esm/components/FollowerAuthenticationDialog/context.js.map +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/theme.js +1 -1
- package/build/esm/components/FollowerAuthenticationDialog/theme.js.map +1 -1
- package/build/esm/components/Icon/Icon.js +12 -8
- package/build/esm/components/Icon/Icon.js.map +1 -1
- package/build/esm/components/Icon/IconStyles.d.ts +1 -1
- package/build/esm/components/Icon/IconStyles.js +7 -9
- package/build/esm/components/Icon/IconStyles.js.map +1 -1
- package/build/esm/components/IconButton/IconButton.js +2 -3
- package/build/esm/components/IconButton/IconButton.js.map +1 -1
- package/build/esm/components/IconButton/IconButtonProps.d.ts +1 -1
- package/build/esm/components/Link/Link.js +4 -5
- package/build/esm/components/Link/Link.js.map +1 -1
- package/build/esm/components/Link/LinkStyles.d.ts +1 -1
- package/build/esm/components/Link/LinkStyles.js +8 -8
- package/build/esm/components/Link/LinkStyles.js.map +1 -1
- package/build/esm/components/NumberField/NumberField.d.ts +0 -1
- package/build/esm/components/NumberField/NumberField.js +14 -9
- package/build/esm/components/NumberField/NumberField.js.map +1 -1
- package/build/esm/components/NumberField/NumberFieldStyles.d.ts +1 -1
- package/build/esm/components/NumberField/NumberFieldStyles.js +4 -4
- package/build/esm/components/NumberField/NumberFieldStyles.js.map +1 -1
- package/build/esm/components/Paper/Paper.js +12 -16
- package/build/esm/components/Paper/Paper.js.map +1 -1
- package/build/esm/components/PaperContent/PaperContent.js +2 -2
- package/build/esm/components/PaperContent/PaperContent.js.map +1 -1
- package/build/esm/components/Radio/Radio.js +5 -5
- package/build/esm/components/Radio/Radio.js.map +1 -1
- package/build/esm/components/SplitInput/SplitInput.js +4 -6
- package/build/esm/components/SplitInput/SplitInput.js.map +1 -1
- package/build/esm/components/SplitInput/SplitInputStyles.d.ts +1 -1
- package/build/esm/components/SplitInput/SplitInputStyles.js +4 -4
- package/build/esm/components/SplitInput/SplitInputStyles.js.map +1 -1
- package/build/esm/components/Switch/Switch.js +6 -6
- package/build/esm/components/Switch/Switch.js.map +1 -1
- package/build/esm/components/Switch/switch.styles.js +2 -2
- package/build/esm/components/Switch/switch.styles.js.map +1 -1
- package/build/esm/components/TabPanel/TabPanel.js +2 -2
- package/build/esm/components/TabPanel/TabPanel.js.map +1 -1
- package/build/esm/components/ToggleButton/ToggleButton.js +5 -6
- package/build/esm/components/ToggleButton/ToggleButton.js.map +1 -1
- package/build/esm/components/ToggleButton/ToggleButtonStyles.js +4 -4
- package/build/esm/components/ToggleButton/ToggleButtonStyles.js.map +1 -1
- package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.js +6 -7
- package/build/esm/components/ToggleButtonGroup/ToggleButtonGroup.js.map +1 -1
- package/build/esm/components/ToggleButtonGroup/ToggleButtonGroupStyles.js +2 -2
- package/build/esm/components/ToggleButtonGroup/ToggleButtonGroupStyles.js.map +1 -1
- package/build/esm/components/Tooltip/Tooltip.js +3 -4
- package/build/esm/components/Tooltip/Tooltip.js.map +1 -1
- package/build/esm/components/Tooltip/TooltipProps.d.ts +1 -1
- package/build/esm/components/Tooltip/TooltipStyles.js +5 -8
- package/build/esm/components/Tooltip/TooltipStyles.js.map +1 -1
- package/build/esm/components/Typography/Typography.d.ts +1 -1
- package/build/esm/components/Typography/Typography.js +4 -6
- package/build/esm/components/Typography/Typography.js.map +1 -1
- package/build/esm/components/Typography/TypographyProps.d.ts +3 -3
- package/build/esm/components/Typography/TypographyStyles.d.ts +1 -1
- package/build/esm/components/Typography/TypographyStyles.js +29 -47
- package/build/esm/components/Typography/TypographyStyles.js.map +1 -1
- package/build/esm/hooks/useCollapsibleText.js +7 -7
- package/build/esm/hooks/useCollapsibleText.js.map +1 -1
- package/build/esm/hooks/useTabs/useTabs.js +15 -15
- package/build/esm/hooks/useTabs/useTabs.js.map +1 -1
- package/build/esm/hooks/useTabs/useTabsResult.d.ts +3 -3
- package/build/esm/types/index.d.ts +2 -2
- package/package.json +2 -2
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import { __rest, __assign } from 'tslib';
|
|
2
1
|
import React, { forwardRef } from 'react';
|
|
3
2
|
import { makeStyles, Paper as Paper$1 } from '@material-ui/core';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
'&:last-child': {
|
|
10
|
-
marginBottom: 0,
|
|
11
|
-
},
|
|
12
|
-
marginBottom: spacing(4),
|
|
13
|
-
padding: spacing(4),
|
|
4
|
+
const useStyles = makeStyles(({ spacing }) => ({
|
|
5
|
+
root: {
|
|
6
|
+
'&:last-child': {
|
|
7
|
+
marginBottom: 0,
|
|
14
8
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
marginBottom: spacing(4),
|
|
10
|
+
padding: spacing(4),
|
|
11
|
+
},
|
|
12
|
+
}));
|
|
13
|
+
const Paper = forwardRef((props, ref) => {
|
|
14
|
+
const { legacyStyles, ...restProps } = props;
|
|
15
|
+
const classes = useStyles(props);
|
|
16
|
+
return React.createElement(Paper$1, { ...ref, classes: { ...(legacyStyles && classes) }, ...restProps });
|
|
21
17
|
});
|
|
22
18
|
Paper.displayName = 'Paper';
|
|
23
19
|
Paper.defaultProps = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Paper.js","sources":["../../../../src/components/Paper/Paper.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\nimport { makeStyles, Paper as MuiPaper, PaperProps as MuiPaperProps } from '@material-ui/core'\n\nconst useStyles = makeStyles(({ spacing }) => ({\n root: {\n '&:last-child': {\n marginBottom: 0,\n },\n marginBottom: spacing(4),\n padding: spacing(4),\n },\n}))\n\nexport interface PaperProps extends MuiPaperProps {\n legacyStyles?: boolean\n}\n\nexport const Paper = forwardRef<HTMLDivElement, PaperProps>((props, ref) => {\n const { legacyStyles, ...restProps } = props\n const classes = useStyles(props)\n return <MuiPaper {...ref} classes={{ ...(legacyStyles && classes) }} {...restProps} />\n})\n\nPaper.displayName = 'Paper'\n\nPaper.defaultProps = {\n legacyStyles: false,\n}\n"],"names":["MuiPaper"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Paper.js","sources":["../../../../src/components/Paper/Paper.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\nimport { makeStyles, Paper as MuiPaper, PaperProps as MuiPaperProps } from '@material-ui/core'\n\nconst useStyles = makeStyles(({ spacing }) => ({\n root: {\n '&:last-child': {\n marginBottom: 0,\n },\n marginBottom: spacing(4),\n padding: spacing(4),\n },\n}))\n\nexport interface PaperProps extends MuiPaperProps {\n legacyStyles?: boolean\n}\n\nexport const Paper = forwardRef<HTMLDivElement, PaperProps>((props, ref) => {\n const { legacyStyles, ...restProps } = props\n const classes = useStyles(props)\n return <MuiPaper {...ref} classes={{ ...(legacyStyles && classes) }} {...restProps} />\n})\n\nPaper.displayName = 'Paper'\n\nPaper.defaultProps = {\n legacyStyles: false,\n}\n"],"names":["MuiPaper"],"mappings":";;;AAGA,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM;AAC7C,IAAA,IAAI,EAAE;AACJ,QAAA,cAAc,EAAE;AACd,YAAA,YAAY,EAAE,CAAC;AAChB,SAAA;AACD,QAAA,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC;AACxB,QAAA,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AACpB,KAAA;AACF,CAAA,CAAC,CAAC;AAMU,MAAA,KAAK,GAAG,UAAU,CAA6B,CAAC,KAAK,EAAE,GAAG,KAAI;IACzE,MAAM,EAAE,YAAY,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK;AAC5C,IAAA,MAAM,OAAO,GAAG,SAAS,CAAC,KAAK,CAAC;AAChC,IAAA,OAAO,oBAACA,OAAQ,EAAA,EAAA,GAAK,GAAG,EAAE,OAAO,EAAE,EAAE,IAAI,YAAY,IAAI,OAAO,CAAC,EAAE,EAAM,GAAA,SAAS,GAAI;AACxF,CAAC;AAED,KAAK,CAAC,WAAW,GAAG,OAAO;AAE3B,KAAK,CAAC,YAAY,GAAG;AACnB,IAAA,YAAY,EAAE,KAAK;CACpB;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Box } from '@material-ui/core';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const PaperContent = (props) => {
|
|
5
|
+
const { children } = props;
|
|
6
6
|
return React.createElement(Box, { padding: 4 }, children);
|
|
7
7
|
};
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaperContent.js","sources":["../../../../src/components/PaperContent/PaperContent.tsx"],"sourcesContent":["import React, { FC } from 'react'\n\nimport { Box } from '@material-ui/core'\n\nexport const PaperContent: FC<Record<string, never>> = (props) => {\n const { children } = props\n return <Box padding={4}>{children}</Box>\n}\n"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"PaperContent.js","sources":["../../../../src/components/PaperContent/PaperContent.tsx"],"sourcesContent":["import React, { FC } from 'react'\n\nimport { Box } from '@material-ui/core'\n\nexport const PaperContent: FC<Record<string, never>> = (props) => {\n const { children } = props\n return <Box padding={4}>{children}</Box>\n}\n"],"names":[],"mappings":";;;AAIa,MAAA,YAAY,GAA8B,CAAC,KAAK,KAAI;AAC/D,IAAA,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK;IAC1B,OAAO,KAAA,CAAA,aAAA,CAAC,GAAG,EAAC,EAAA,OAAO,EAAE,CAAC,EAAA,EAAG,QAAQ,CAAO;AAC1C;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { __rest, __assign } from 'tslib';
|
|
2
1
|
import React, { forwardRef } from 'react';
|
|
3
2
|
import { Radio as Radio$1, FormControlLabel } from '@material-ui/core';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
const Radio = forwardRef((props, ref) => {
|
|
5
|
+
const { disabled, LabelProps, ...muiProps } = props;
|
|
6
|
+
const label = LabelProps?.label || props.label;
|
|
7
|
+
const control = React.createElement(Radio$1, { disabled: label ? undefined : disabled, ...muiProps });
|
|
8
|
+
return label ? (React.createElement(FormControlLabel, { disabled: disabled, inputRef: ref, control: control, ...LabelProps, label: label })) : (control);
|
|
9
9
|
});
|
|
10
10
|
Radio.displayName = 'Radio';
|
|
11
11
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","sources":["../../../../src/components/Radio/Radio.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\n\nimport { FormControlLabel, Radio as MuiRadio } from '@material-ui/core'\nimport { RadioProps } from './RadioProps'\n\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>((props, ref) => {\n const {
|
|
1
|
+
{"version":3,"file":"Radio.js","sources":["../../../../src/components/Radio/Radio.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\n\nimport { FormControlLabel, Radio as MuiRadio } from '@material-ui/core'\nimport { RadioProps } from './RadioProps'\n\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>((props, ref) => {\n const { disabled, LabelProps, ...muiProps } = props\n const label = LabelProps?.label || props.label\n const control = <MuiRadio disabled={label ? undefined : disabled} {...muiProps} />\n return label ? (\n <FormControlLabel disabled={disabled} inputRef={ref} control={control} {...LabelProps} label={label} />\n ) : (\n control\n )\n})\n\nRadio.displayName = 'Radio'\n"],"names":["MuiRadio"],"mappings":";;;AAKa,MAAA,KAAK,GAAG,UAAU,CAA+B,CAAC,KAAK,EAAE,GAAG,KAAI;IAC3E,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK;IACnD,MAAM,KAAK,GAAG,UAAU,EAAE,KAAK,IAAI,KAAK,CAAC,KAAK;AAC9C,IAAA,MAAM,OAAO,GAAG,KAAA,CAAA,aAAA,CAACA,OAAQ,EAAC,EAAA,QAAQ,EAAE,KAAK,GAAG,SAAS,GAAG,QAAQ,EAAM,GAAA,QAAQ,GAAI;AAClF,IAAA,OAAO,KAAK,IACV,KAAC,CAAA,aAAA,CAAA,gBAAgB,EAAC,EAAA,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAA,GAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAI,CAAA,KAEvG,OAAO,CACR;AACH,CAAC;AAED,KAAK,CAAC,WAAW,GAAG,OAAO;;;;"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { __assign } from 'tslib';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { Box, TextField } from '@material-ui/core';
|
|
4
3
|
import { Button } from '../Button/Button.js';
|
|
5
4
|
import { useSplitInputStyles } from './SplitInputStyles.js';
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var classes = useSplitInputStyles({ backgroundTransparency: backgroundTransparency, inputTextColor: inputTextColor });
|
|
6
|
+
const SplitInput = ({ ButtonProps, TextFieldProps, backgroundTransparency = true, buttonLabel, color = 'primary', inputTextColor, onChange, onClick, }) => {
|
|
7
|
+
const classes = useSplitInputStyles({ backgroundTransparency, inputTextColor });
|
|
10
8
|
return (React.createElement(Box, { display: "flex" },
|
|
11
|
-
React.createElement(TextField,
|
|
12
|
-
React.createElement(Button,
|
|
9
|
+
React.createElement(TextField, { classes: { root: classes.textfield }, InputProps: { classes: { root: classes.input, focused: classes.focused } }, color: color, variant: "outlined", onChange: onChange, ...TextFieldProps }),
|
|
10
|
+
React.createElement(Button, { classes: { root: classes.button }, disableElevation: true, color: color, variant: "contained", onClick: onClick, ...ButtonProps }, buttonLabel)));
|
|
13
11
|
};
|
|
14
12
|
SplitInput.displayName = 'SplitInput';
|
|
15
13
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplitInput.js","sources":["../../../../src/components/SplitInput/SplitInput.tsx"],"sourcesContent":["import React, { FC } from 'react'\n\nimport { Box, TextField } from '@material-ui/core'\nimport { Button } from '../Button'\nimport { SplitInputProps } from './SplitInputProps'\nimport { useSplitInputStyles } from './SplitInputStyles'\n\nexport const SplitInput: FC<SplitInputProps> = ({\n ButtonProps,\n TextFieldProps,\n backgroundTransparency = true,\n buttonLabel,\n color = 'primary',\n inputTextColor,\n onChange,\n onClick,\n}) => {\n const classes = useSplitInputStyles({ backgroundTransparency, inputTextColor })\n return (\n <Box display=\"flex\">\n <TextField\n classes={{ root: classes.textfield }}\n InputProps={{ classes: { root: classes.input, focused: classes.focused } }}\n color={color}\n variant=\"outlined\"\n onChange={onChange}\n {...TextFieldProps}\n />\n <Button\n classes={{ root: classes.button }}\n disableElevation\n color={color}\n variant=\"contained\"\n onClick={onClick}\n {...ButtonProps}\n >\n {buttonLabel}\n </Button>\n </Box>\n )\n}\n\nSplitInput.displayName = 'SplitInput'\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SplitInput.js","sources":["../../../../src/components/SplitInput/SplitInput.tsx"],"sourcesContent":["import React, { FC } from 'react'\n\nimport { Box, TextField } from '@material-ui/core'\nimport { Button } from '../Button'\nimport { SplitInputProps } from './SplitInputProps'\nimport { useSplitInputStyles } from './SplitInputStyles'\n\nexport const SplitInput: FC<SplitInputProps> = ({\n ButtonProps,\n TextFieldProps,\n backgroundTransparency = true,\n buttonLabel,\n color = 'primary',\n inputTextColor,\n onChange,\n onClick,\n}) => {\n const classes = useSplitInputStyles({ backgroundTransparency, inputTextColor })\n return (\n <Box display=\"flex\">\n <TextField\n classes={{ root: classes.textfield }}\n InputProps={{ classes: { root: classes.input, focused: classes.focused } }}\n color={color}\n variant=\"outlined\"\n onChange={onChange}\n {...TextFieldProps}\n />\n <Button\n classes={{ root: classes.button }}\n disableElevation\n color={color}\n variant=\"contained\"\n onClick={onClick}\n {...ButtonProps}\n >\n {buttonLabel}\n </Button>\n </Box>\n )\n}\n\nSplitInput.displayName = 'SplitInput'\n"],"names":[],"mappings":";;;;;AAOa,MAAA,UAAU,GAAwB,CAAC,EAC9C,WAAW,EACX,cAAc,EACd,sBAAsB,GAAG,IAAI,EAC7B,WAAW,EACX,KAAK,GAAG,SAAS,EACjB,cAAc,EACd,QAAQ,EACR,OAAO,GACR,KAAI;IACH,MAAM,OAAO,GAAG,mBAAmB,CAAC,EAAE,sBAAsB,EAAE,cAAc,EAAE,CAAC;AAC/E,IAAA,QACE,KAAC,CAAA,aAAA,CAAA,GAAG,EAAC,EAAA,OAAO,EAAC,MAAM,EAAA;QACjB,KAAC,CAAA,aAAA,CAAA,SAAS,IACR,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,SAAS,EAAE,EACpC,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,EAAE,EAC1E,KAAK,EAAE,KAAK,EACZ,OAAO,EAAC,UAAU,EAClB,QAAQ,EAAE,QAAQ,EACd,GAAA,cAAc,EAClB,CAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EACL,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,EACjC,gBAAgB,QAChB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,OAAO,EACZ,GAAA,WAAW,EAEd,EAAA,WAAW,CACL,CACL;AAEV;AAEA,UAAU,CAAC,WAAW,GAAG,YAAY;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { SplitInputProps } from './SplitInputProps';
|
|
2
|
-
|
|
2
|
+
type StyleProps = Pick<SplitInputProps, 'backgroundTransparency' | 'inputTextColor'>;
|
|
3
3
|
export declare const useSplitInputStyles: (props: StyleProps) => import("@material-ui/styles").ClassNameMap<string>;
|
|
4
4
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { makeStyles } from '@material-ui/core';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const useSplitInputStyles = makeStyles(() => ({
|
|
4
4
|
textfield: {
|
|
5
|
-
background:
|
|
5
|
+
background: (props) => (props.backgroundTransparency ? '#FFFFFF44' : 'none'),
|
|
6
6
|
borderTopLeftRadius: 4,
|
|
7
7
|
borderBottomLeftRadius: 4,
|
|
8
8
|
'& fieldset': {
|
|
@@ -17,13 +17,13 @@ var useSplitInputStyles = makeStyles(function () { return ({
|
|
|
17
17
|
alignSelf: 'stretch',
|
|
18
18
|
},
|
|
19
19
|
input: {
|
|
20
|
-
color:
|
|
20
|
+
color: (props) => props.inputTextColor || 'inherit',
|
|
21
21
|
'&$focused fieldset': {
|
|
22
22
|
top: -4,
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
focused: {},
|
|
26
|
-
})
|
|
26
|
+
}));
|
|
27
27
|
|
|
28
28
|
export { useSplitInputStyles };
|
|
29
29
|
//# sourceMappingURL=SplitInputStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplitInputStyles.js","sources":["../../../../src/components/SplitInput/SplitInputStyles.ts"],"sourcesContent":["import { makeStyles, Theme } from '@material-ui/core'\n\nimport { SplitInputProps } from './SplitInputProps'\n\ntype StyleProps = Pick<SplitInputProps, 'backgroundTransparency' | 'inputTextColor'>\n\nexport const useSplitInputStyles = makeStyles<Theme, StyleProps>(() => ({\n textfield: {\n background: (props) => (props.backgroundTransparency ? '#FFFFFF44' : 'none'),\n borderTopLeftRadius: 4,\n borderBottomLeftRadius: 4,\n '& fieldset': {\n borderRight: 'none',\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n },\n },\n button: {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n alignSelf: 'stretch',\n },\n input: {\n color: (props) => props.inputTextColor || 'inherit',\n '&$focused fieldset': {\n top: -4,\n },\n },\n focused: {},\n}))\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"SplitInputStyles.js","sources":["../../../../src/components/SplitInput/SplitInputStyles.ts"],"sourcesContent":["import { makeStyles, Theme } from '@material-ui/core'\n\nimport { SplitInputProps } from './SplitInputProps'\n\ntype StyleProps = Pick<SplitInputProps, 'backgroundTransparency' | 'inputTextColor'>\n\nexport const useSplitInputStyles = makeStyles<Theme, StyleProps>(() => ({\n textfield: {\n background: (props) => (props.backgroundTransparency ? '#FFFFFF44' : 'none'),\n borderTopLeftRadius: 4,\n borderBottomLeftRadius: 4,\n '& fieldset': {\n borderRight: 'none',\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n },\n },\n button: {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n alignSelf: 'stretch',\n },\n input: {\n color: (props) => props.inputTextColor || 'inherit',\n '&$focused fieldset': {\n top: -4,\n },\n },\n focused: {},\n}))\n"],"names":[],"mappings":";;MAMa,mBAAmB,GAAG,UAAU,CAAoB,OAAO;AACtE,IAAA,SAAS,EAAE;AACT,QAAA,UAAU,EAAE,CAAC,KAAK,MAAM,KAAK,CAAC,sBAAsB,GAAG,WAAW,GAAG,MAAM,CAAC;AAC5E,QAAA,mBAAmB,EAAE,CAAC;AACtB,QAAA,sBAAsB,EAAE,CAAC;AACzB,QAAA,YAAY,EAAE;AACZ,YAAA,WAAW,EAAE,MAAM;AACnB,YAAA,oBAAoB,EAAE,CAAC;AACvB,YAAA,uBAAuB,EAAE,CAAC;AAC3B,SAAA;AACF,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,mBAAmB,EAAE,CAAC;AACtB,QAAA,sBAAsB,EAAE,CAAC;AACzB,QAAA,SAAS,EAAE,SAAS;AACrB,KAAA;AACD,IAAA,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,cAAc,IAAI,SAAS;AACnD,QAAA,oBAAoB,EAAE;YACpB,GAAG,EAAE,EAAE;AACR,SAAA;AACF,KAAA;AACD,IAAA,OAAO,EAAE,EAAE;AACZ,CAAA,CAAC;;;;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { __rest, __assign } from 'tslib';
|
|
2
1
|
import React, { forwardRef } from 'react';
|
|
3
2
|
import { Switch as Switch$1, FormControlLabel } from '@material-ui/core';
|
|
4
3
|
import { useSwitchStyles } from './switch.styles.js';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
const Switch = forwardRef((props, ref) => {
|
|
6
|
+
const { disabled, LabelProps, ...muiProps } = props;
|
|
7
|
+
const label = LabelProps?.label || props.label;
|
|
8
|
+
const classes = useSwitchStyles(props);
|
|
9
|
+
const control = React.createElement(Switch$1, { classes: classes, disabled: label ? undefined : disabled, ...muiProps });
|
|
10
|
+
return label ? (React.createElement(FormControlLabel, { disabled: disabled, inputRef: ref, control: control, ...LabelProps, label: label })) : (control);
|
|
11
11
|
});
|
|
12
12
|
Switch.displayName = 'Switch';
|
|
13
13
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.js","sources":["../../../../src/components/Switch/Switch.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\n\nimport { FormControlLabel, Switch as MuiSwitch } from '@material-ui/core'\nimport { SwitchProps } from './SwitchProps'\nimport { useSwitchStyles } from './switch.styles'\n\nexport const Switch = forwardRef<HTMLInputElement, SwitchProps>((props, ref) => {\n const {
|
|
1
|
+
{"version":3,"file":"Switch.js","sources":["../../../../src/components/Switch/Switch.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\n\nimport { FormControlLabel, Switch as MuiSwitch } from '@material-ui/core'\nimport { SwitchProps } from './SwitchProps'\nimport { useSwitchStyles } from './switch.styles'\n\nexport const Switch = forwardRef<HTMLInputElement, SwitchProps>((props, ref) => {\n const { disabled, LabelProps, ...muiProps } = props\n const label = LabelProps?.label || props.label\n const classes = useSwitchStyles(props)\n const control = <MuiSwitch classes={classes} disabled={label ? undefined : disabled} {...muiProps} />\n return label ? (\n <FormControlLabel disabled={disabled} inputRef={ref} control={control} {...LabelProps} label={label} />\n ) : (\n control\n )\n})\n\nSwitch.displayName = 'Switch'\n"],"names":["MuiSwitch"],"mappings":";;;;AAMa,MAAA,MAAM,GAAG,UAAU,CAAgC,CAAC,KAAK,EAAE,GAAG,KAAI;IAC7E,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK;IACnD,MAAM,KAAK,GAAG,UAAU,EAAE,KAAK,IAAI,KAAK,CAAC,KAAK;AAC9C,IAAA,MAAM,OAAO,GAAG,eAAe,CAAC,KAAK,CAAC;IACtC,MAAM,OAAO,GAAG,KAAC,CAAA,aAAA,CAAAA,QAAS,IAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,GAAG,SAAS,GAAG,QAAQ,EAAA,GAAM,QAAQ,EAAA,CAAI;AACrG,IAAA,OAAO,KAAK,IACV,KAAC,CAAA,aAAA,CAAA,gBAAgB,EAAC,EAAA,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAA,GAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAI,CAAA,KAEvG,OAAO,CACR;AACH,CAAC;AAED,MAAM,CAAC,WAAW,GAAG,QAAQ;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { makeStyles } from '@material-ui/core';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const useSwitchStyles = makeStyles((theme) => ({
|
|
4
4
|
checked: {
|
|
5
5
|
'& $thumb': {
|
|
6
6
|
background: theme.palette.success.main,
|
|
@@ -11,7 +11,7 @@ var useSwitchStyles = makeStyles(function (theme) { return ({
|
|
|
11
11
|
},
|
|
12
12
|
thumb: {},
|
|
13
13
|
track: {},
|
|
14
|
-
})
|
|
14
|
+
}));
|
|
15
15
|
|
|
16
16
|
export { useSwitchStyles };
|
|
17
17
|
//# sourceMappingURL=switch.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.styles.js","sources":["../../../../src/components/Switch/switch.styles.ts"],"sourcesContent":["import { makeStyles, Theme } from '@material-ui/core'\nimport { SwitchProps } from './SwitchProps'\n\nexport const useSwitchStyles = makeStyles<Theme, SwitchProps>((theme) => ({\n checked: {\n '& $thumb': {\n background: theme.palette.success.main,\n },\n '&& + $track': {\n backgroundColor: theme.palette.success.main,\n },\n },\n thumb: {},\n track: {},\n}))\n"],"names":[],"mappings":";;AAGa,
|
|
1
|
+
{"version":3,"file":"switch.styles.js","sources":["../../../../src/components/Switch/switch.styles.ts"],"sourcesContent":["import { makeStyles, Theme } from '@material-ui/core'\nimport { SwitchProps } from './SwitchProps'\n\nexport const useSwitchStyles = makeStyles<Theme, SwitchProps>((theme) => ({\n checked: {\n '& $thumb': {\n background: theme.palette.success.main,\n },\n '&& + $track': {\n backgroundColor: theme.palette.success.main,\n },\n },\n thumb: {},\n track: {},\n}))\n"],"names":[],"mappings":";;AAGa,MAAA,eAAe,GAAG,UAAU,CAAqB,CAAC,KAAK,MAAM;AACxE,IAAA,OAAO,EAAE;AACP,QAAA,UAAU,EAAE;AACV,YAAA,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI;AACvC,SAAA;AACD,QAAA,aAAa,EAAE;AACb,YAAA,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI;AAC5C,SAAA;AACF,KAAA;AACD,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,KAAK,EAAE,EAAE;AACV,CAAA,CAAC;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Box } from '@material-ui/core';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const TabPanel = (props) => {
|
|
5
|
+
const { children, show } = props;
|
|
6
6
|
return show ? React.createElement(Box, null, children) : null;
|
|
7
7
|
};
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabPanel.js","sources":["../../../../src/components/TabPanel/TabPanel.tsx"],"sourcesContent":["import React, { PropsWithChildren } from 'react'\n\nimport { Box } from '@material-ui/core'\nimport { TabPanelProps } from './TabPanelProps'\n\nexport const TabPanel = (props: PropsWithChildren<TabPanelProps>) => {\n const { children, show } = props\n return show ? <Box>{children}</Box> : null\n}\n"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"TabPanel.js","sources":["../../../../src/components/TabPanel/TabPanel.tsx"],"sourcesContent":["import React, { PropsWithChildren } from 'react'\n\nimport { Box } from '@material-ui/core'\nimport { TabPanelProps } from './TabPanelProps'\n\nexport const TabPanel = (props: PropsWithChildren<TabPanelProps>) => {\n const { children, show } = props\n return show ? <Box>{children}</Box> : null\n}\n"],"names":[],"mappings":";;;AAKa,MAAA,QAAQ,GAAG,CAAC,KAAuC,KAAI;AAClE,IAAA,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK;AAChC,IAAA,OAAO,IAAI,GAAG,KAAC,CAAA,aAAA,CAAA,GAAG,EAAE,IAAA,EAAA,QAAQ,CAAO,GAAG,IAAI;AAC5C;;;;"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { __rest, __assign } from 'tslib';
|
|
2
1
|
import { ToggleButton as ToggleButton$1 } from '@material-ui/lab';
|
|
3
2
|
import React, { forwardRef } from 'react';
|
|
4
3
|
import { useToggleButtonStyles } from './ToggleButtonStyles.js';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return (React.createElement(ToggleButton$1,
|
|
5
|
+
const ToggleButton = forwardRef((props, ref) => {
|
|
6
|
+
const { children, ...muiProps } = props;
|
|
7
|
+
const classes = useToggleButtonStyles(props);
|
|
8
|
+
return (React.createElement(ToggleButton$1, { ref: ref, classes: {
|
|
10
9
|
root: classes.root,
|
|
11
10
|
selected: classes.selected,
|
|
12
|
-
}
|
|
11
|
+
}, ...muiProps }, children));
|
|
13
12
|
});
|
|
14
13
|
ToggleButton.defaultProps = {
|
|
15
14
|
color: 'primary',
|
|
@@ -1 +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":"
|
|
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":";;;;AAKa,MAAA,YAAY,GAAG,UAAU,CAAuC,CAAC,KAAK,EAAE,GAAG,KAAI;IAC1F,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK;AACvC,IAAA,MAAM,OAAO,GAAG,qBAAqB,CAAC,KAAK,CAAC;IAE5C,QACE,oBAACA,cAAe,EAAA,EACd,GAAG,EAAE,GAAG,EACR,OAAO,EAAE;YACP,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,QAAQ,EAAE,OAAO,CAAC,QAAQ;AAC3B,SAAA,EAAA,GACG,QAAQ,EAAA,EAEX,QAAQ,CACO;AAEtB,CAAC;AAED,YAAY,CAAC,YAAY,GAAG;AAC1B,IAAA,KAAK,EAAE,SAAS;CACjB;AAED,YAAY,CAAC,WAAW,GAAG,cAAc;;;;"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { makeStyles } from '@material-ui/core';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const useToggleButtonStyles = makeStyles((theme) => ({
|
|
4
4
|
root: {
|
|
5
5
|
color: theme.palette.text.primary,
|
|
6
6
|
},
|
|
7
7
|
selected: {
|
|
8
8
|
'&&': {
|
|
9
9
|
'&:hover': {
|
|
10
|
-
backgroundColor:
|
|
10
|
+
backgroundColor: (props) => theme.palette[props.color || 'primary'].dark,
|
|
11
11
|
},
|
|
12
|
-
backgroundColor:
|
|
12
|
+
backgroundColor: (props) => theme.palette[props.color || 'primary'].main,
|
|
13
13
|
color: 'white',
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
|
-
})
|
|
16
|
+
}));
|
|
17
17
|
|
|
18
18
|
export { useToggleButtonStyles };
|
|
19
19
|
//# sourceMappingURL=ToggleButtonStyles.js.map
|
|
@@ -1 +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,
|
|
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,MAAA,qBAAqB,GAAG,UAAU,CAA2B,CAAC,KAAK,MAAM;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,CAAC,KAAK,KAAK,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,SAAS,CAAC,CAAC,IAAI;AACzE,aAAA;AACD,YAAA,eAAe,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,SAAS,CAAC,CAAC,IAAI;AACxE,YAAA,KAAK,EAAE,OAAO;AACf,SAAA;AACF,KAAA;AACF,CAAA,CAAC;;;;"}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { __rest, __assign } from 'tslib';
|
|
2
1
|
import { ToggleButtonGroup as ToggleButtonGroup$1 } from '@material-ui/lab';
|
|
3
2
|
import React, { forwardRef } from 'react';
|
|
4
3
|
import { useToggleButtonGroupStyles } from './ToggleButtonGroupStyles.js';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
const ToggleButtonGroup = forwardRef((props, ref) => {
|
|
6
|
+
const { children, color = 'primary', ...muiProps } = props;
|
|
7
|
+
const classes = useToggleButtonGroupStyles(props);
|
|
8
|
+
const childrenWithProps = React.Children.map(children, (child) => {
|
|
10
9
|
if (!React.isValidElement(child)) {
|
|
11
10
|
return null;
|
|
12
11
|
}
|
|
13
|
-
return React.cloneElement(child, { color
|
|
12
|
+
return React.cloneElement(child, { color });
|
|
14
13
|
});
|
|
15
|
-
return (React.createElement(ToggleButtonGroup$1,
|
|
14
|
+
return (React.createElement(ToggleButtonGroup$1, { ref: ref, classes: { root: classes.root }, ...muiProps }, childrenWithProps));
|
|
16
15
|
});
|
|
17
16
|
ToggleButtonGroup.displayName = 'ToggleButtonGroup';
|
|
18
17
|
|
|
@@ -1 +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
|
|
1
|
+
{"version":3,"file":"ToggleButtonGroup.js","sources":["../../../../src/components/ToggleButtonGroup/ToggleButtonGroup.tsx"],"sourcesContent":["import { ToggleButtonGroup as MuiToggleButtonGroup, ToggleButtonProps } 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 as React.ReactElement<ToggleButtonProps>, { 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":";;;;AAKa,MAAA,iBAAiB,GAAG,UAAU,CAAyC,CAAC,KAAK,EAAE,GAAG,KAAI;AACjG,IAAA,MAAM,EAAE,QAAQ,EAAE,KAAK,GAAG,SAAS,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK;AAC1D,IAAA,MAAM,OAAO,GAAG,0BAA0B,CAAC,KAAK,CAAC;AACjD,IAAA,MAAM,iBAAiB,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,KAAI;QAC/D,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE;AAChC,YAAA,OAAO,IAAI;;QAEb,OAAO,KAAK,CAAC,YAAY,CAAC,KAA8C,EAAE,EAAE,KAAK,EAAE,CAAC;AACtF,KAAC,CAAC;IAEF,QACE,oBAACA,mBAAoB,EAAA,EAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,EAAA,GAAM,QAAQ,EAC1E,EAAA,iBAAiB,CACG;AAE3B,CAAC;AAED,iBAAiB,CAAC,WAAW,GAAG,mBAAmB;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { makeStyles } from '@material-ui/core';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const useToggleButtonGroupStyles = makeStyles((theme) => ({
|
|
4
4
|
root: {
|
|
5
5
|
'&&': {
|
|
6
6
|
backgroundColor: theme.palette.grey[300],
|
|
7
7
|
},
|
|
8
8
|
},
|
|
9
|
-
})
|
|
9
|
+
}));
|
|
10
10
|
|
|
11
11
|
export { useToggleButtonGroupStyles };
|
|
12
12
|
//# sourceMappingURL=ToggleButtonGroupStyles.js.map
|
|
@@ -1 +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,
|
|
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,MAAA,0BAA0B,GAAG,UAAU,CAAQ,CAAC,KAAK,MAAM;AACtE,IAAA,IAAI,EAAE;AACJ,QAAA,IAAI,EAAE;YACJ,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;AACzC,SAAA;AACF,KAAA;AACF,CAAA,CAAC;;;;"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { __assign } from 'tslib';
|
|
2
1
|
import { Tooltip as Tooltip$1 } from '@material-ui/core';
|
|
3
2
|
import React, { forwardRef } from 'react';
|
|
4
3
|
import { useTooltipStyles } from './TooltipStyles.js';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return React.createElement(Tooltip$1,
|
|
5
|
+
const Tooltip = forwardRef((props, ref) => {
|
|
6
|
+
const classes = useTooltipStyles(props);
|
|
7
|
+
return React.createElement(Tooltip$1, { ref: ref, classes: classes, ...props });
|
|
9
8
|
});
|
|
10
9
|
Tooltip.displayName = 'Tooltip';
|
|
11
10
|
|
|
@@ -1 +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":"
|
|
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":";;;;AAMa,MAAA,OAAO,GAAG,UAAU,CAA4B,CAAC,KAAK,EAAE,GAAG,KAAI;AAC1E,IAAA,MAAM,OAAO,GAAG,gBAAgB,CAAC,KAAK,CAAC;AACvC,IAAA,OAAO,KAAC,CAAA,aAAA,CAAAA,SAAU,EAAC,EAAA,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAM,GAAA,KAAK,GAAI;AAC9D,CAAC;AAED,OAAO,CAAC,WAAW,GAAG,SAAS;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { TooltipProps } from '@material-ui/core';
|
|
1
|
+
export type { TooltipProps } from '@material-ui/core';
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { makeStyles } from '@material-ui/core';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
});
|
|
10
|
-
});
|
|
3
|
+
const useTooltipStyles = makeStyles(({ typography }) => ({
|
|
4
|
+
tooltip: {
|
|
5
|
+
fontSize: typography.pxToRem(16),
|
|
6
|
+
},
|
|
7
|
+
}));
|
|
11
8
|
|
|
12
9
|
export { useTooltipStyles };
|
|
13
10
|
//# sourceMappingURL=TooltipStyles.js.map
|
|
@@ -1 +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":";;
|
|
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":";;AAIO,MAAM,gBAAgB,GAAG,UAAU,CAAsB,CAAC,EAAE,UAAU,EAAE,MAAM;AACnF,IAAA,OAAO,EAAE;AACP,QAAA,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;AACjC,KAAA;AACF,CAAA,CAAC;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TypographyProps } from './TypographyProps';
|
|
3
3
|
export declare const Typography: {
|
|
4
|
-
<C extends React.ElementType
|
|
4
|
+
<C extends React.ElementType = "span">({ TypographyRef, color, variant, weight, ...restProps }: TypographyProps<C>): JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { __rest, __assign } from 'tslib';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { Typography as Typography$1 } from '@material-ui/core';
|
|
4
3
|
import { useTypographyStyles } from './TypographyStyles.js';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return (React.createElement(Typography$1, __assign({ classes: classes, variant: variant, variantMapping: variantMapping, ref: TypographyRef }, restProps)));
|
|
5
|
+
const Typography = ({ TypographyRef, color, variant = 'body1', weight, ...restProps }) => {
|
|
6
|
+
const classes = useTypographyStyles({ color, variant, weight });
|
|
7
|
+
const variantMapping = { subtitle1: 'p' };
|
|
8
|
+
return (React.createElement(Typography$1, { classes: classes, variant: variant, variantMapping: variantMapping, ref: TypographyRef, ...restProps }));
|
|
11
9
|
};
|
|
12
10
|
Typography.displayName = 'Typography';
|
|
13
11
|
|
|
@@ -1 +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, DefaultTypographyComponent } from './TypographyProps'\nimport { useTypographyStyles } from './TypographyStyles'\n\nexport const Typography = <C extends React.ElementType = DefaultTypographyComponent>({\n TypographyRef,\n color,\n variant = 'body1',\n weight,\n ...restProps\n}: TypographyProps<C>) => {\n const classes = useTypographyStyles({ color, variant, weight })\n const variantMapping = { subtitle1: 'p' }\n return (\n <MuiTypography\n classes={classes}\n variant={variant}\n variantMapping={variantMapping}\n ref={TypographyRef}\n {...restProps}\n />\n )\n}\n\nTypography.displayName = 'Typography'\n"],"names":["MuiTypography"],"mappings":"
|
|
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, DefaultTypographyComponent } from './TypographyProps'\nimport { useTypographyStyles } from './TypographyStyles'\n\nexport const Typography = <C extends React.ElementType = DefaultTypographyComponent>({\n TypographyRef,\n color,\n variant = 'body1',\n weight,\n ...restProps\n}: TypographyProps<C>) => {\n const classes = useTypographyStyles({ color, variant, weight })\n const variantMapping = { subtitle1: 'p' }\n return (\n <MuiTypography\n classes={classes}\n variant={variant}\n variantMapping={variantMapping}\n ref={TypographyRef}\n {...restProps}\n />\n )\n}\n\nTypography.displayName = 'Typography'\n"],"names":["MuiTypography"],"mappings":";;;;MAMa,UAAU,GAAG,CAA2D,EACnF,aAAa,EACb,KAAK,EACL,OAAO,GAAG,OAAO,EACjB,MAAM,EACN,GAAG,SAAS,EACO,KAAI;AACvB,IAAA,MAAM,OAAO,GAAG,mBAAmB,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;AAC/D,IAAA,MAAM,cAAc,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE;IACzC,QACE,oBAACA,YAAa,EAAA,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,EAC9B,GAAG,EAAE,aAAa,EACd,GAAA,SAAS,EACb,CAAA;AAEN;AAEA,UAAU,CAAC,WAAW,GAAG,YAAY;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TypographyProps as MuiTypographyProps, TypographyTypeMap, TypographyVariant } from '@material-ui/core';
|
|
2
2
|
import React, { RefObject } from 'react';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
3
|
+
export 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 type DefaultTypographyComponent = TypographyTypeMap['defaultComponent'];
|
|
5
|
+
export type TypographyProps<C extends React.ElementType = DefaultTypographyComponent> = Omit<MuiTypographyProps<C, {
|
|
6
6
|
component?: C;
|
|
7
7
|
}>, 'color' | 'variant' | 'ref'> & {
|
|
8
8
|
TypographyRef?: RefObject<HTMLParagraphElement | HTMLHeadingElement | HTMLSpanElement>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TypographyProps } from './TypographyProps';
|
|
2
|
-
|
|
2
|
+
type StyleProps = Pick<TypographyProps, 'color' | 'weight'> & {
|
|
3
3
|
variant: NonNullable<TypographyProps['variant']>;
|
|
4
4
|
};
|
|
5
5
|
export declare const useTypographyStyles: (props: StyleProps) => import("@material-ui/styles").ClassNameMap<string>;
|