@superdispatch/ui 0.16.0-alpha.0 → 0.16.0-alpha.1

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.
Files changed (120) hide show
  1. package/dist-node/index.js +205 -3686
  2. package/dist-node/index.js.map +1 -1
  3. package/dist-src/adaptive-toolbar/AdaptiveToolbar.js +12 -12
  4. package/dist-src/app-bar/AppBarOverrides.js +6 -4
  5. package/dist-src/autocomplete/AutocompleteOverrides.js +13 -16
  6. package/dist-src/avatar/AvatarOverrides.js +14 -12
  7. package/dist-src/avatar-button/AvatarButton.js +78 -92
  8. package/dist-src/button/Button.js +11 -15
  9. package/dist-src/button/ButtonOverrides.js +147 -149
  10. package/dist-src/card/CardOverrides.js +10 -6
  11. package/dist-src/card-button/CardButton.js +78 -75
  12. package/dist-src/checkbox/CheckboxField.js +1 -1
  13. package/dist-src/checkbox/CheckboxGroudField.js +1 -1
  14. package/dist-src/checkbox/CheckboxOverrides.js +60 -50
  15. package/dist-src/chip/ChipOverrides.js +88 -85
  16. package/dist-src/description-list/DescriptionList.js +58 -55
  17. package/dist-src/dialog/DialogOverrides.js +31 -25
  18. package/dist-src/drawer/DrawerActions.js +32 -34
  19. package/dist-src/drawer/DrawerContent.js +10 -26
  20. package/dist-src/drawer/DrawerList.js +8 -27
  21. package/dist-src/drawer/DrawerOverrides.js +12 -10
  22. package/dist-src/drawer/DrawerTitle.js +46 -40
  23. package/dist-src/grid/GridStack.js +1 -1
  24. package/dist-src/grid/InlineGrid.js +2 -2
  25. package/dist-src/icon-button/IconButtonOverrides.js +48 -32
  26. package/dist-src/index.js +1 -5
  27. package/dist-src/info-card/InfoCard.js +27 -37
  28. package/dist-src/link/LinkOverrides.js +29 -26
  29. package/dist-src/list/ListOverrides.js +10 -7
  30. package/dist-src/menu/MenuOverrides.js +28 -14
  31. package/dist-src/overflow-text/OverflowText.js +35 -34
  32. package/dist-src/pagination/PaginationOverrides.js +27 -32
  33. package/dist-src/paper/PaperOverrides.js +8 -6
  34. package/dist-src/radio/RadioField.js +1 -1
  35. package/dist-src/radio/RadioGroupField.js +1 -1
  36. package/dist-src/radio/RadioOverrides.js +38 -36
  37. package/dist-src/responsive/ResponsiveContext.js +1 -1
  38. package/dist-src/snackbar/Snackbar.js +1 -1
  39. package/dist-src/snackbar/SnackbarContent.js +3 -3
  40. package/dist-src/snackbar/SnackbarOverrides.js +28 -18
  41. package/dist-src/svg-icon/SvgIconOverrides.js +26 -18
  42. package/dist-src/switch/SwitchOverrides.js +72 -71
  43. package/dist-src/tabs/TabsOverrides.js +34 -30
  44. package/dist-src/tag/Tag.js +2 -2
  45. package/dist-src/text-field/TextFieldOverrides.js +158 -137
  46. package/dist-src/{v5/theme → theme}/CssBaselineOverrides.js +0 -0
  47. package/dist-src/theme/ThemeProvider.js +25 -28
  48. package/dist-src/tiles/Tiles.js +4 -3
  49. package/dist-src/toolbar/ToolbarOverrides.js +10 -8
  50. package/dist-src/tooltip/TooltipOverrides.js +33 -30
  51. package/dist-src/typography/TypographyOverrides.js +14 -2
  52. package/dist-types/index.d.ts +7 -621
  53. package/dist-web/index.js +18 -3495
  54. package/dist-web/index.js.map +1 -1
  55. package/package.json +1 -1
  56. package/dist-src/v5/adaptive-toolbar/AdaptiveToolbar.js +0 -146
  57. package/dist-src/v5/app-bar/AppBarOverrides.js +0 -9
  58. package/dist-src/v5/autocomplete/AutocompleteOverrides.js +0 -63
  59. package/dist-src/v5/avatar/AvatarOverrides.js +0 -21
  60. package/dist-src/v5/avatar-button/AvatarButton.js +0 -146
  61. package/dist-src/v5/button/Button.js +0 -32
  62. package/dist-src/v5/button/ButtonOverrides.js +0 -238
  63. package/dist-src/v5/card/CardOverrides.js +0 -16
  64. package/dist-src/v5/card-button/CardButton.js +0 -135
  65. package/dist-src/v5/checkbox/CheckboxField.js +0 -37
  66. package/dist-src/v5/checkbox/CheckboxGroudField.js +0 -32
  67. package/dist-src/v5/checkbox/CheckboxOverrides.js +0 -71
  68. package/dist-src/v5/chip/ChipOverrides.js +0 -106
  69. package/dist-src/v5/columns/Column.js +0 -75
  70. package/dist-src/v5/columns/Columns.js +0 -28
  71. package/dist-src/v5/description-list/DescriptionList.js +0 -114
  72. package/dist-src/v5/dialog/DialogOverrides.js +0 -43
  73. package/dist-src/v5/drawer/DrawerActions.js +0 -69
  74. package/dist-src/v5/drawer/DrawerContent.js +0 -15
  75. package/dist-src/v5/drawer/DrawerList.js +0 -31
  76. package/dist-src/v5/drawer/DrawerOverrides.js +0 -17
  77. package/dist-src/v5/drawer/DrawerTitle.js +0 -119
  78. package/dist-src/v5/grid/GridStack.js +0 -33
  79. package/dist-src/v5/grid/InlineGrid.js +0 -34
  80. package/dist-src/v5/icon-button/IconButtonOverrides.js +0 -60
  81. package/dist-src/v5/index.js +0 -38
  82. package/dist-src/v5/info-card/InfoCard.js +0 -59
  83. package/dist-src/v5/inline/Inline.js +0 -56
  84. package/dist-src/v5/link/LinkOverrides.js +0 -46
  85. package/dist-src/v5/list/ListOverrides.js +0 -16
  86. package/dist-src/v5/menu/MenuOverrides.js +0 -34
  87. package/dist-src/v5/overflow-text/OverflowText.js +0 -84
  88. package/dist-src/v5/pagination/PaginationOverrides.js +0 -35
  89. package/dist-src/v5/paper/PaperOverrides.js +0 -13
  90. package/dist-src/v5/props/AlignProps.js +0 -15
  91. package/dist-src/v5/props/CollapseProp.js +0 -3
  92. package/dist-src/v5/props/ResponsiveProp.js +0 -42
  93. package/dist-src/v5/props/SpaceProp.js +0 -28
  94. package/dist-src/v5/radio/RadioField.js +0 -36
  95. package/dist-src/v5/radio/RadioGroupField.js +0 -38
  96. package/dist-src/v5/radio/RadioOverrides.js +0 -49
  97. package/dist-src/v5/responsive/CollapseBreakpoint.js +0 -15
  98. package/dist-src/v5/responsive/ResponsiveContext.js +0 -31
  99. package/dist-src/v5/snackbar/Snackbar.js +0 -53
  100. package/dist-src/v5/snackbar/SnackbarContent.js +0 -105
  101. package/dist-src/v5/snackbar/SnackbarOverrides.js +0 -35
  102. package/dist-src/v5/snackbar/SnackbarStack.js +0 -113
  103. package/dist-src/v5/stack/Stack.js +0 -43
  104. package/dist-src/v5/svg-icon/SvgIconOverrides.js +0 -33
  105. package/dist-src/v5/switch/SwitchOverrides.js +0 -88
  106. package/dist-src/v5/tabs/TabsOverrides.js +0 -45
  107. package/dist-src/v5/tag/Tag.js +0 -118
  108. package/dist-src/v5/text-field/TextFieldOverrides.js +0 -205
  109. package/dist-src/v5/theme/Color.js +0 -77
  110. package/dist-src/v5/theme/SuperDispatchTheme.js +0 -2
  111. package/dist-src/v5/theme/ThemeProvider.js +0 -142
  112. package/dist-src/v5/tiles/Tiles.js +0 -94
  113. package/dist-src/v5/toolbar/ToolbarOverrides.js +0 -15
  114. package/dist-src/v5/tooltip/TooltipOverrides.js +0 -42
  115. package/dist-src/v5/typography/TypographyOverrides.js +0 -121
  116. package/dist-src/v5/utils/VisibilityObserver.js +0 -53
  117. package/dist-src/v5/utils/isEmptyReactNode.js +0 -3
  118. package/dist-src/v5/utils/mergeRefs.js +0 -20
  119. package/dist-src/v5/utils/renderChildren.js +0 -8
  120. package/dist-src/v5/utils/useUID.js +0 -6
@@ -1,77 +0,0 @@
1
- export var Color;
2
-
3
- (function (Color) {
4
- Color["White"] = "#fff";
5
- Color["White50"] = "rgba(255, 255, 255, 0.5)";
6
- Color["White40"] = "rgba(255, 255, 255, 0.4)";
7
- Color["White20"] = "rgba(255, 255, 255, 0.2)";
8
- Color["White10"] = "rgba(255, 255, 255, 0.1)";
9
- Color["White08"] = "rgba(255, 255, 255, 0.08)";
10
- Color["Transparent"] = "rgba(0, 0, 0, 0)";
11
- Color["Black"] = "#000";
12
- Color["Black50"] = "rgba(0, 0, 0, 0.5)";
13
- Color["Black20"] = "rgba(0, 0, 0, 0.2)";
14
- Color["Grey100"] = "#8F949E";
15
- Color["Grey200"] = "#6A707C";
16
- Color["Grey300"] = "#5B6371";
17
- Color["Grey400"] = "#323C4E";
18
- Color["Grey450"] = "#222F44";
19
- Color["Grey500"] = "#192334";
20
- Color["Dark100"] = "#8F949E";
21
- Color["Dark200"] = "#6A707C";
22
- Color["Dark300"] = "#5B6371";
23
- Color["Dark400"] = "#323C4E";
24
- Color["Dark450"] = "#222F44";
25
- Color["Dark500"] = "#192334";
26
- Color["Silver100"] = "#F6F7F8";
27
- Color["Silver200"] = "#F3F5F8";
28
- Color["Silver300"] = "#E8ECF0";
29
- Color["Silver400"] = "#E1E5EA";
30
- Color["Silver500"] = "#C4CDD5";
31
- Color["Blue50"] = "#EBF4FF";
32
- Color["Blue75"] = "#CCE5FF";
33
- Color["Blue100"] = "#A8D1FF";
34
- Color["Blue200"] = "#66ADFF";
35
- Color["Blue300"] = "#0075FF";
36
- Color["Blue400"] = "#0063DB";
37
- Color["Blue500"] = "#0050B2";
38
- Color["Green50"] = "#ECF9EF";
39
- Color["Green75"] = "#C8F4D1";
40
- Color["Green100"] = "#90EAAE";
41
- Color["Green200"] = "#5DDA87";
42
- Color["Green300"] = "#1FA84D";
43
- Color["Green400"] = "#1E8F46";
44
- Color["Green500"] = "#19803D";
45
- Color["Purple50"] = "#EFEEFC";
46
- Color["Purple75"] = "#DCDBF5";
47
- Color["Purple100"] = "#CBC8EE";
48
- Color["Purple200"] = "#A7A1E8";
49
- Color["Purple300"] = "#6559CF";
50
- Color["Purple400"] = "#473ABB";
51
- Color["Purple500"] = "#3A2F9D";
52
- Color["Red50"] = "#FFEDEB";
53
- Color["Red75"] = "#FDD9D3";
54
- Color["Red100"] = "#FDC2BA";
55
- Color["Red200"] = "#FE988B";
56
- Color["Red300"] = "#EE3017";
57
- Color["Red400"] = "#D9210D";
58
- Color["Red500"] = "#C31909";
59
- Color["Teal50"] = "#E3F6FC";
60
- Color["Teal75"] = "#BEEDF9";
61
- Color["Teal100"] = "#91E3F8";
62
- Color["Teal200"] = "#61D3EF";
63
- Color["Teal300"] = "#00A0CC";
64
- Color["Teal400"] = "#008DB8";
65
- Color["Teal500"] = "#007DA3";
66
- Color["Yellow50"] = "#FFF9E5";
67
- Color["Yellow75"] = "#FFF1C2";
68
- Color["Yellow100"] = "#FFE494";
69
- Color["Yellow200"] = "#FFDC6B";
70
- Color["Yellow300"] = "#FFCB47";
71
- Color["Yellow400"] = "#FFA91F";
72
- Color["Yellow500"] = "#DB7500";
73
- })(Color || (Color = {}));
74
-
75
- export function isColorProp(name) {
76
- return typeof name == 'string' && Object.prototype.hasOwnProperty.call(Color, name);
77
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- export {};
@@ -1,142 +0,0 @@
1
- import { createTheme, CssBaseline, ThemeProvider as MaterialThemeProvider } from '@mui/material';
2
- import { createGenerateClassName, StylesProvider } from '@mui/styles';
3
- import { createBreakpoints } from '@mui/system';
4
- import { useConstant } from '@superdispatch/hooks';
5
- import { overrideAppBar } from "../app-bar/AppBarOverrides.js";
6
- import { overrideAutocomplete } from "../autocomplete/AutocompleteOverrides.js";
7
- import { overrideAvatar } from "../avatar/AvatarOverrides.js";
8
- import { overrideButton } from "../button/ButtonOverrides.js";
9
- import { overrideCard } from "../card/CardOverrides.js";
10
- import { overrideCheckbox } from "../checkbox/CheckboxOverrides.js";
11
- import { overrideChip } from "../chip/ChipOverrides.js";
12
- import { overrideDialog } from "../dialog/DialogOverrides.js";
13
- import { overrideDrawer } from "../drawer/DrawerOverrides.js";
14
- import { overrideIconButton } from "../icon-button/IconButtonOverrides.js";
15
- import { overrideLink } from "../link/LinkOverrides.js";
16
- import { overrideList } from "../list/ListOverrides.js";
17
- import { overrideMenu } from "../menu/MenuOverrides.js";
18
- import { overridePagination } from "../pagination/PaginationOverrides.js";
19
- import { overridePaper } from "../paper/PaperOverrides.js";
20
- import { overrideRadio } from "../radio/RadioOverrides.js";
21
- import { ResponsiveContextProvider } from "../responsive/ResponsiveContext.js";
22
- import { overrideSnackbar } from "../snackbar/SnackbarOverrides.js";
23
- import { SnackbarStackProvider } from "../snackbar/SnackbarStack.js";
24
- import { overrideSvgIcon } from "../svg-icon/SvgIconOverrides.js";
25
- import { overrideSwitch } from "../switch/SwitchOverrides.js";
26
- import { overrideTabs } from "../tabs/TabsOverrides.js";
27
- import { overrideTextField } from "../text-field/TextFieldOverrides.js";
28
- import { overrideToolbar } from "../toolbar/ToolbarOverrides.js";
29
- import { overrideTooltip } from "../tooltip/TooltipOverrides.js";
30
- import { createTypographyOptions, overrideTypography } from "../typography/TypographyOverrides.js";
31
- import { Color } from "./Color.js";
32
- import { overrideCssBaseline } from "./CssBaselineOverrides.js";
33
- import { jsx as _jsx } from "react/jsx-runtime";
34
- import { jsxs as _jsxs } from "react/jsx-runtime";
35
-
36
- function createSuperDispatchTheme() {
37
- var breakpoints = createBreakpoints({});
38
- var theme = createTheme({
39
- breakpoints,
40
- palette: {
41
- primary: {
42
- main: Color.Blue300
43
- },
44
- error: {
45
- main: Color.Red300
46
- },
47
- action: {
48
- hover: Color.Silver100,
49
- selected: Color.Silver300,
50
- disabled: Color.Silver400
51
- },
52
- text: {
53
- primary: Color.Dark500,
54
- secondary: Color.Dark200,
55
- // hint: Color.Dark100, todo
56
- disabled: Color.Dark100
57
- },
58
- divider: Color.Silver400
59
- },
60
- typography: createTypographyOptions(breakpoints),
61
- components: {}
62
- });
63
- overrideCard(theme);
64
- overrideButton(theme);
65
- overrideAppBar(theme);
66
- overridePaper(theme);
67
- overrideTooltip(theme);
68
- overrideSvgIcon(theme);
69
- overrideToolbar(theme);
70
- overrideIconButton(theme);
71
- overrideTypography(theme);
72
- overrideMenu(theme);
73
- overrideAvatar(theme);
74
- overrideTextField(theme);
75
- overrideAutocomplete(theme);
76
- overrideCssBaseline(theme);
77
- overrideCheckbox(theme);
78
- overrideRadio(theme);
79
- overrideSwitch(theme);
80
- overrideChip(theme);
81
- overrideDialog(theme);
82
- overrideDrawer(theme);
83
- overridePagination(theme);
84
- overrideList(theme);
85
- overrideLink(theme);
86
- overrideSnackbar(theme);
87
- overrideTabs(theme);
88
- return theme;
89
- }
90
-
91
- var generateMaterialClassName = /*#__PURE__*/createGenerateClassName();
92
-
93
- function generateClassName(rule, sheet) {
94
- var {
95
- meta,
96
- link
97
- } = (sheet === null || sheet === void 0 ? void 0 : sheet.options) || {};
98
-
99
- if (meta && rule.type === 'style') {
100
- if (meta.startsWith('SD-')) {
101
- return "".concat(meta, "-").concat(rule.key);
102
- }
103
-
104
- if (meta.startsWith('Mui')) {
105
- var isPseudoClass = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected'].includes(rule.key);
106
-
107
- if (isPseudoClass) {
108
- return "Mui-".concat(rule.key);
109
- }
110
-
111
- if (!link) {
112
- return "".concat(meta, "-").concat(rule.key);
113
- }
114
- }
115
- }
116
-
117
- return generateMaterialClassName(rule, sheet);
118
- }
119
-
120
- export function ThemeProvider(_ref) {
121
- var {
122
- modifier,
123
- children,
124
- injectFirst = true
125
- } = _ref;
126
- var theme = useConstant(() => {
127
- var nextTheme = createSuperDispatchTheme();
128
- return !modifier ? nextTheme : modifier(nextTheme);
129
- });
130
- return /*#__PURE__*/_jsx(StylesProvider, {
131
- injectFirst: injectFirst,
132
- generateClassName: generateClassName,
133
- children: /*#__PURE__*/_jsxs(MaterialThemeProvider, {
134
- theme: theme,
135
- children: [/*#__PURE__*/_jsx(CssBaseline, {}), /*#__PURE__*/_jsx(ResponsiveContextProvider, {
136
- children: /*#__PURE__*/_jsx(SnackbarStackProvider, {
137
- children: children
138
- })
139
- })]
140
- })
141
- });
142
- }
@@ -1,94 +0,0 @@
1
- import { makeStyles } from '@mui/styles';
2
- import clsx from 'clsx';
3
- import { forwardRef } from 'react';
4
- import flattenChildren from 'react-keyed-flatten-children';
5
- import { useResponsivePropRecord } from "../props/ResponsiveProp.js";
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- var PREVENT_COLLAPSE = 1;
8
-
9
- function spaceVariant(theme, space) {
10
- var gap = theme.spacing(space);
11
- var parsedGap = parseInt(gap);
12
- return {
13
- '&:before': {
14
- marginTop: -parsedGap - PREVENT_COLLAPSE
15
- },
16
- '& > $container': {
17
- marginLeft: -parsedGap,
18
- '& > $child > $childContainer': {
19
- marginTop: gap,
20
- marginLeft: gap
21
- }
22
- }
23
- };
24
- }
25
-
26
- function columnVariant(columns) {
27
- return {
28
- flex: "0 0 ".concat(100 / columns, "%")
29
- };
30
- }
31
-
32
- var useStyles = /*#__PURE__*/makeStyles(theme => ({
33
- root: {
34
- paddingTop: PREVENT_COLLAPSE,
35
- '&:before': {
36
- content: '""',
37
- display: 'block',
38
- marginTop: -PREVENT_COLLAPSE
39
- }
40
- },
41
- container: {
42
- display: 'flex',
43
- flexWrap: 'wrap'
44
- },
45
- child: {
46
- minWidth: 0
47
- },
48
- childContainer: {
49
- height: '100%'
50
- },
51
- space1: spaceVariant(theme, 1),
52
- space2: spaceVariant(theme, 2),
53
- space3: spaceVariant(theme, 3),
54
- space4: spaceVariant(theme, 4),
55
- space5: spaceVariant(theme, 5),
56
- space6: spaceVariant(theme, 6),
57
- space7: spaceVariant(theme, 7),
58
- space8: spaceVariant(theme, 8),
59
- space9: spaceVariant(theme, 9),
60
- space10: spaceVariant(theme, 10),
61
- columns1: columnVariant(1),
62
- columns2: columnVariant(2),
63
- columns3: columnVariant(3),
64
- columns4: columnVariant(4),
65
- columns5: columnVariant(5),
66
- columns6: columnVariant(6)
67
- }), {
68
- name: 'SD-Tiles'
69
- });
70
- export var Tiles = /*#__PURE__*/forwardRef((_ref, ref) => {
71
- var {
72
- children,
73
- space: spaceProp = 1,
74
- columns: columnsProp = 1
75
- } = _ref;
76
- var styles = useStyles({});
77
- var space = useResponsivePropRecord(spaceProp);
78
- var columns = useResponsivePropRecord(columnsProp);
79
- return /*#__PURE__*/_jsx("div", {
80
- ref: ref,
81
- className: clsx(styles.root, space === 1 && styles.space1, space === 2 && styles.space2, space === 3 && styles.space3, space === 4 && styles.space4, space === 5 && styles.space5, space === 6 && styles.space6, space === 7 && styles.space7, space === 8 && styles.space8, space === 9 && styles.space9, space === 10 && styles.space10),
82
- children: /*#__PURE__*/_jsx("div", {
83
- className: styles.container,
84
- children: flattenChildren(children).map((child, idx) => /*#__PURE__*/_jsx("div", {
85
- className: clsx(styles.child, columns === 1 && styles.columns1, columns === 2 && styles.columns2, columns === 3 && styles.columns3, columns === 4 && styles.columns4, columns === 5 && styles.columns5, columns === 6 && styles.columns6),
86
- children: /*#__PURE__*/_jsx("div", {
87
- className: styles.childContainer,
88
- children: child
89
- })
90
- }, idx))
91
- })
92
- });
93
- });
94
- if (process.env.NODE_ENV !== "production") Tiles.displayName = "Tiles";
@@ -1,15 +0,0 @@
1
- export function overrideToolbar(theme) {
2
- theme.components.MuiToolbar = {
3
- styleOverrides: {
4
- regular: {
5
- minHeight: theme.spacing(8)
6
- },
7
- gutters: {
8
- [theme.breakpoints.up('sm')]: {
9
- paddingLeft: theme.spacing(2),
10
- paddingRight: theme.spacing(2)
11
- }
12
- }
13
- }
14
- };
15
- }
@@ -1,42 +0,0 @@
1
- import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
- import { tooltipClasses } from '@mui/material';
3
- import { Color } from "../theme/Color.js";
4
- export function overrideTooltip(theme) {
5
- theme.components.MuiTooltip = {
6
- defaultProps: {
7
- arrow: true
8
- },
9
- styleOverrides: {
10
- tooltip: _objectSpread(_objectSpread({}, theme.typography.body2), {}, {
11
- padding: theme.spacing(1, 1.5),
12
- backgroundColor: Color.Dark400
13
- }),
14
- popperArrow: {
15
- ["&[data-popper-placement*=\"top\"] .".concat(tooltipClasses.arrow)]: {
16
- '&::before': {
17
- borderBottomRightRadius: 2
18
- }
19
- },
20
- ["&[data-popper-placement*=\"left\"] .".concat(tooltipClasses.arrow)]: {
21
- '&::before': {
22
- borderTopRightRadius: 2
23
- }
24
- },
25
- ["&[data-popper-placement*=\"right\"] .".concat(tooltipClasses.arrow)]: {
26
- '&::before': {
27
- borderBottomLeftRadius: 2
28
- }
29
- },
30
- ["&[data-popper-placement*=\"bottom\"] .".concat(tooltipClasses.arrow)]: {
31
- '&::before': {
32
- borderTopLeftRadius: 2
33
- }
34
- }
35
- },
36
- arrow: {
37
- color: Color.Dark400,
38
- fontSize: theme.spacing(1)
39
- }
40
- }
41
- };
42
- }
@@ -1,121 +0,0 @@
1
- import '@mui/material';
2
-
3
- function createCSSVarName(component, property) {
4
- return "--mui-".concat(component, "-").concat(property);
5
- }
6
-
7
- export var typographyVars = {
8
- color: /*#__PURE__*/createCSSVarName('typography', 'color'),
9
- backgroundImage: /*#__PURE__*/createCSSVarName('typography', 'backgroundImage')
10
- };
11
- export function createTypographyOptions(breakpoints) {
12
- var xsOnly = breakpoints.only('xs');
13
- return {
14
- fontSize: 14,
15
- fontWeightLight: 300,
16
- fontWeightRegular: 400,
17
- fontWeightMedium: 500,
18
- fontWeightBold: 600,
19
- fontFamily: '"Inter", sans-serif',
20
- h1: {
21
- fontSize: '32px',
22
- lineHeight: '40px',
23
- fontWeight: 700,
24
- [xsOnly]: {
25
- fontSize: '28px',
26
- lineHeight: '36px'
27
- }
28
- },
29
- h2: {
30
- fontSize: '24px',
31
- lineHeight: '28px',
32
- fontWeight: 500,
33
- [xsOnly]: {
34
- fontSize: '22px',
35
- lineHeight: '26px'
36
- }
37
- },
38
- h3: {
39
- fontSize: '20px',
40
- lineHeight: '28px',
41
- fontWeight: 500,
42
- [xsOnly]: {
43
- fontSize: '20px',
44
- lineHeight: '26px'
45
- }
46
- },
47
- h4: {
48
- fontSize: '16px',
49
- lineHeight: '24px',
50
- fontWeight: 500,
51
- [xsOnly]: {
52
- fontSize: '17px',
53
- lineHeight: '26px'
54
- }
55
- },
56
- h5: {
57
- fontSize: '14px',
58
- lineHeight: '20px',
59
- fontWeight: 600,
60
- [xsOnly]: {
61
- fontSize: '16px',
62
- lineHeight: '24px'
63
- }
64
- },
65
- h6: {
66
- fontSize: '12px',
67
- lineHeight: '16px',
68
- fontWeight: 700,
69
- letterSpacing: '0.1em',
70
- textTransform: 'uppercase',
71
- [xsOnly]: {
72
- fontSize: '14px',
73
- lineHeight: '20px'
74
- }
75
- },
76
- body1: {
77
- fontSize: '14px',
78
- lineHeight: '20px',
79
- fontWeight: 600,
80
- [xsOnly]: {
81
- fontSize: '16px',
82
- lineHeight: '24px'
83
- }
84
- },
85
- body2: {
86
- fontSize: '14px',
87
- lineHeight: '20px',
88
- fontWeight: 400,
89
- [xsOnly]: {
90
- fontSize: '16px',
91
- lineHeight: '24px'
92
- }
93
- },
94
- caption: {
95
- fontSize: '12px',
96
- lineHeight: '16px',
97
- fontWeight: 400,
98
- [xsOnly]: {
99
- fontSize: '14px',
100
- lineHeight: '20px'
101
- }
102
- },
103
- button: {
104
- fontSize: '14px',
105
- lineHeight: '20px',
106
- fontWeight: 600,
107
- textTransform: undefined,
108
- [xsOnly]: {
109
- fontSize: '16px',
110
- lineHeight: '24px'
111
- }
112
- }
113
- };
114
- }
115
- export function overrideTypography(theme) {
116
- theme.components.MuiTypography = {
117
- defaultProps: {
118
- variant: 'body2'
119
- }
120
- };
121
- }
@@ -1,53 +0,0 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
- var _excluded = ["render", "onChange"];
3
- import { useValueObserver } from '@superdispatch/hooks';
4
- import { useLayoutEffect, useState } from 'react';
5
- import { renderChildren } from "./renderChildren.js";
6
- export function useVisibilityObserver(node) {
7
- var {
8
- threshold = 0,
9
- marginTop = '0px',
10
- marginLeft = '0px',
11
- marginRight = '0px',
12
- marginBottom = '0px'
13
- } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
14
- var [state, setState] = useState('undetermined');
15
- var rootMargin = "".concat(marginTop, " ").concat(marginRight, " ").concat(marginBottom, " ").concat(marginLeft);
16
- useLayoutEffect(() => {
17
- if (!node || !('IntersectionObserver' in window)) {
18
- setState('undetermined');
19
- return;
20
- }
21
-
22
- var observer = new IntersectionObserver(_ref => {
23
- var [entry] = _ref;
24
- setState(entry !== null && entry !== void 0 && entry.isIntersecting ? 'visible' : 'invisible');
25
- }, {
26
- rootMargin,
27
- threshold
28
- });
29
- observer.observe(node);
30
- return () => {
31
- observer.disconnect();
32
- };
33
- }, [node, threshold, rootMargin]);
34
- return state;
35
- }
36
- export function VisibilityObserver(_ref2) {
37
- var {
38
- render,
39
- onChange
40
- } = _ref2,
41
- options = _objectWithoutProperties(_ref2, _excluded);
42
-
43
- var [node, setNode] = useState(null);
44
- var visibility = useVisibilityObserver(node, options);
45
- var children = render({
46
- ref: setNode,
47
- visibility
48
- });
49
- useValueObserver(visibility, () => {
50
- onChange === null || onChange === void 0 ? void 0 : onChange(visibility);
51
- });
52
- return renderChildren(children);
53
- }
@@ -1,3 +0,0 @@
1
- export function isEmptyReactNode(node) {
2
- return node == null || typeof node == 'boolean' || typeof node == 'string' && node.length === 0;
3
- }
@@ -1,20 +0,0 @@
1
- export function mergeRefs() {
2
- for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
3
- refs[_key] = arguments[_key];
4
- }
5
-
6
- return node => {
7
- refs.forEach(ref => {
8
- assignRef(ref, node);
9
- });
10
- };
11
- }
12
- export function assignRef(ref, value) {
13
- if (ref) {
14
- if (typeof ref === 'function') {
15
- ref(value);
16
- } else {
17
- ref.current = value;
18
- }
19
- }
20
- }
@@ -1,8 +0,0 @@
1
- export function renderChildren(node) {
2
- if (node == null || typeof node == 'boolean') {
3
- return null;
4
- } // Workaround for https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18051
5
-
6
-
7
- return node;
8
- }
@@ -1,6 +0,0 @@
1
- import { useMemo } from 'react';
2
- var current = 0;
3
- export function useUID(defaultID) {
4
- var uid = useMemo(() => "uid_".concat(current += 1), []);
5
- return defaultID || uid;
6
- }