@councilbox/councilbox-ui 2.0.53 → 2.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/HOCs/overlayA11yStack.js +47 -0
- package/dist/HOCs/useA11yGuard.js +38 -0
- package/dist/HOCs/useDynamicStyles.js +18 -38
- package/dist/HOCs/useMenuNavigation.js +110 -0
- package/dist/HOCs/useOverlay.js +87 -0
- package/dist/HOCs/usePopoverPosition.js +228 -0
- package/dist/HOCs/useRipple.js +17 -35
- package/dist/HOCs/useWindowSize.js +24 -42
- package/dist/build-index.js +49 -99
- package/dist/components/1.Introduction.stories.mdx +1 -1
- package/dist/components/2.Changelog.stories.mdx +42 -0
- package/dist/components/3.Guide.stories.mdx +1 -1
- package/dist/components/Accordion/Accordion.css +7 -0
- package/dist/components/Accordion/Accordion.js +97 -102
- package/dist/components/Accordion/Accordion.stories.js +10 -12
- package/dist/components/Accordion/AccordionOld.js +32 -56
- package/dist/components/Accordion/DesignAccordion.stories.js +10 -21
- package/dist/components/Alert/Alert.js +55 -55
- package/dist/components/Alert/Alert.stories.js +10 -11
- package/dist/components/Avatar/Avatar.js +82 -74
- package/dist/components/Avatar/Avatar.stories.js +19 -23
- package/dist/components/Avatar/AvatarOld.js +46 -60
- package/dist/components/Avatar/DesignAvatar.stories.js +18 -26
- package/dist/components/Avatar/DesignAvatarText.stories.js +31 -40
- package/dist/components/AvatarGroup/AvatarGroup.js +7 -14
- package/dist/components/AvatarGroup/AvatarGroup.stories.js +6 -13
- package/dist/components/AvatarGroup/DesignAvatarGroup.stories.js +34 -45
- package/dist/components/Block/Block.css +3 -3
- package/dist/components/Block/Block.js +31 -45
- package/dist/components/Block/Block.stories.js +5 -12
- package/dist/components/Block/DesignBlock.stories.js +7 -13
- package/dist/components/Button/Button.js +44 -66
- package/dist/components/Button/Button.stories.js +8 -14
- package/dist/components/Button/button.css +1 -1
- package/dist/components/ButtonBasic/ButtonBasic.css +6 -1
- package/dist/components/ButtonBasic/ButtonBasic.js +96 -118
- package/dist/components/ButtonBasic/ButtonBasic.stories.js +14 -15
- package/dist/components/ButtonBasic/ButtonBasicOld.js +57 -77
- package/dist/components/Checkbox/Checkbox.css +6 -0
- package/dist/components/Checkbox/Checkbox.js +81 -100
- package/dist/components/Checkbox/Checkbox.stories.js +10 -11
- package/dist/components/Checkbox/CheckboxOld.js +19 -35
- package/dist/components/DragDrop/DragDrop.css +20 -9
- package/dist/components/DragDrop/DragDrop.js +80 -76
- package/dist/components/DragDrop/DragDrop.stories.js +9 -16
- package/dist/components/DrawerPanel/DesignDrawerPanel.js +35 -53
- package/dist/components/DrawerPanel/DrawerPanel.js +157 -146
- package/dist/components/DrawerPanel/DrawerPanel.stories.js +10 -12
- package/dist/components/DrawerPanel/DrawerPanelOld.js +76 -98
- package/dist/components/DropDown/DesignDropDown.stories.js +79 -97
- package/dist/components/DropDown/DropDown.js +168 -342
- package/dist/components/DropDown/DropDown.stories.js +6 -12
- package/dist/components/DropDown/DropDownOld.js +57 -89
- package/dist/components/DropDown/PopoverPlayground.js +68 -98
- package/dist/components/EnhancedTable/DesignEnhancedTable.stories.js +26 -36
- package/dist/components/EnhancedTable/EnhancedMyTable.js +16 -19
- package/dist/components/EnhancedTable/EnhancedTable.js +77 -136
- package/dist/components/EnhancedTable/EnhancedTable.stories.js +5 -12
- package/dist/components/EnhancedTable/EnhancedTableBody.js +11 -14
- package/dist/components/EnhancedTable/EnhancedTableCell.js +25 -34
- package/dist/components/EnhancedTable/EnhancedTableContainer.js +11 -14
- package/dist/components/EnhancedTable/EnhancedTableHead.js +11 -14
- package/dist/components/EnhancedTable/EnhancedTableRow.js +15 -18
- package/dist/components/EnhancedTable/EnhancedTableSortLabel.js +15 -18
- package/dist/components/FabButton/DesignFabButton.stories.js +9 -16
- package/dist/components/FabButton/FabButton.js +51 -54
- package/dist/components/FabButton/FabButton.stories.js +10 -12
- package/dist/components/Grid/DesignGrid.stories.js +7 -14
- package/dist/components/Grid/Grid.js +38 -46
- package/dist/components/Grid/Grid.stories.js +6 -13
- package/dist/components/Grid/GridItem.js +37 -39
- package/dist/components/Grid/GridItemOld.js +13 -18
- package/dist/components/Grid/GridOld.js +14 -21
- package/dist/components/Header/DesignHeader.stories.js +20 -24
- package/dist/components/Header/Header.js +201 -242
- package/dist/components/Header/Header.stories.js +9 -21
- package/dist/components/Header/header.css +10 -5
- package/dist/components/IconButton/DesignIconButton.stories.js +31 -36
- package/dist/components/IconButton/IconButton.css +6 -1
- package/dist/components/IconButton/IconButton.js +132 -138
- package/dist/components/IconButton/IconButton.stories.js +12 -13
- package/dist/components/IconButton/IconButtonOld.js +41 -57
- package/dist/components/IconButtonSquare/DesignIconButtonSquare.stories.js +5 -11
- package/dist/components/IconButtonSquare/IconButtonSquare.js +11 -25
- package/dist/components/IconButtonSquare/IconButtonSquare.stories.js +7 -13
- package/dist/components/IconButtonSquare/IconButtonSquareOld.js +44 -62
- package/dist/components/IconFont/IconFont.js +27 -48
- package/dist/components/IconFont/IconFont.stories.js +5 -11
- package/dist/components/InputAutocomplete/InputAutocomplete.css +6 -0
- package/dist/components/InputAutocomplete/InputAutocomplete.js +184 -260
- package/dist/components/InputAutocomplete/InputAutocomplete.stories.js +5 -11
- package/dist/components/InputAutocomplete/InputAutocompleteOld.js +43 -62
- package/dist/components/InputPassword/InputPassword.css +0 -6
- package/dist/components/InputPassword/InputPassword.js +58 -73
- package/dist/components/InputPassword/InputPassword.stories.js +5 -11
- package/dist/components/InputText/InputText.css +86 -78
- package/dist/components/InputText/InputText.js +207 -211
- package/dist/components/InputText/InputText.stories.js +11 -11
- package/dist/components/InputText/InputTextOld.js +48 -74
- package/dist/components/InputTextArea/DesignInputTextArea.stories.js +38 -51
- package/dist/components/InputTextArea/InputTextArea.js +84 -93
- package/dist/components/InputTextArea/InputTextArea.stories.js +5 -12
- package/dist/components/LoadingSection/LoadingSection.js +44 -51
- package/dist/components/LoadingSection/LoadingSection.stories.js +5 -11
- package/dist/components/MenuItem/DesignMenuItem.stories.js +20 -34
- package/dist/components/MenuItem/MenuItem.css +7 -2
- package/dist/components/MenuItem/MenuItem.js +100 -113
- package/dist/components/MenuItem/MenuItem.stories.js +6 -15
- package/dist/components/MenuItem/MenuItemOld.js +40 -56
- package/dist/components/MenuLateralLeft/MenuLateralLeft.css +24 -0
- package/dist/components/MenuLateralLeft/MenuLateralLeft.js +120 -157
- package/dist/components/MenuLateralLeft/MenuLateralLeft.stories.js +5 -12
- package/dist/components/MenuLateralRight/MenuLateralRight.css +2 -2
- package/dist/components/MenuLateralRight/MenuLateralRight.js +73 -77
- package/dist/components/MenuLateralRight/MenuLateralRight.stories.js +5 -12
- package/dist/components/Modal/DesignModal.stories.js +15 -30
- package/dist/components/Modal/Modal.css +35 -15
- package/dist/components/Modal/Modal.js +154 -145
- package/dist/components/Modal/Modal.stories.js +7 -16
- package/dist/components/Modal/ModalOld.js +73 -90
- package/dist/components/PaginationFooter/DesignPaginationFooter.stories.js +4 -10
- package/dist/components/PaginationFooter/PaginationFooter.css +10 -0
- package/dist/components/PaginationFooter/PaginationFooter.js +99 -91
- package/dist/components/PaginationFooter/PaginationFooter.stories.js +5 -12
- package/dist/components/RadioButton/Radio.css +19 -18
- package/dist/components/RadioButton/Radio.js +65 -83
- package/dist/components/RadioButton/Radio.stories.js +27 -36
- package/dist/components/RadioButton/RadioOld.js +23 -39
- package/dist/components/Ripple/DesignRipple.js +25 -41
- package/dist/components/Ripple/Ripple.stories.js +5 -11
- package/dist/components/Scrollbar/DesignScrollbar.js +5 -10
- package/dist/components/Scrollbar/Scrollbar.js +37 -56
- package/dist/components/Scrollbar/Scrollbar.stories.js +5 -12
- package/dist/components/SelectInput/DesignSelectInput.js +22 -45
- package/dist/components/SelectInput/SelectInput.js +101 -155
- package/dist/components/SelectInput/SelectInput.stories.js +6 -15
- package/dist/components/SelectInput/SelectInputOld.js +52 -81
- package/dist/components/Slider/DesignSlider.js +8 -14
- package/dist/components/Slider/Slider.css +57 -37
- package/dist/components/Slider/Slider.js +85 -84
- package/dist/components/Slider/Slider.stories.js +5 -12
- package/dist/components/Spacing/Spacing.js +38 -45
- package/dist/components/Spacing/Spacing.stories.js +5 -11
- package/dist/components/Stars/DesignStars.js +17 -30
- package/dist/components/Stars/Stars.css +55 -104
- package/dist/components/Stars/Stars.js +89 -73
- package/dist/components/Stars/Stars.stories.js +5 -12
- package/dist/components/Stepper/DesignStepper.stories.js +16 -30
- package/dist/components/Stepper/Stepper.css +46 -10
- package/dist/components/Stepper/Stepper.js +118 -134
- package/dist/components/Stepper/Stepper.stories.js +5 -12
- package/dist/components/Table/DesignTable.stories.js +200 -211
- package/dist/components/Table/Table.css +33 -2
- package/dist/components/Table/Table.js +30 -38
- package/dist/components/Table/Table.stories.js +5 -12
- package/dist/components/Table/TableBody.js +22 -34
- package/dist/components/Table/TableCell.js +71 -61
- package/dist/components/Table/TableContainer.js +22 -34
- package/dist/components/Table/TableHead.js +22 -34
- package/dist/components/Table/TableOld.js +52 -84
- package/dist/components/Table/TableRow.js +33 -37
- package/dist/components/Table/TableSortLabel.js +42 -52
- package/dist/components/Tabs/DesignTabs.js +14 -28
- package/dist/components/Tabs/Tabs.css +30 -11
- package/dist/components/Tabs/Tabs.js +151 -137
- package/dist/components/Tabs/Tabs.stories.js +5 -12
- package/dist/components/Tabs/TabsOld.js +28 -42
- package/dist/components/Tag/DesignTags.stories.js +24 -39
- package/dist/components/Tag/Tag.css +61 -42
- package/dist/components/Tag/Tag.js +93 -91
- package/dist/components/Tag/Tag.stories.js +5 -12
- package/dist/components/TextInput/TextInput.js +38 -54
- package/dist/components/TextInput/TextInput.stories.js +5 -11
- package/dist/components/ThemeProvider/Colors.js +2 -2
- package/dist/components/ThemeProvider/CouncilboxThemeContext.js +7 -10
- package/dist/components/ThemeProvider/ThemeProvider.js +34 -52
- package/dist/components/Timeline/DesignTimeline.stories.js +4 -10
- package/dist/components/Timeline/Timeline.js +66 -46
- package/dist/components/Timeline/Timeline.stories.js +5 -12
- package/dist/components/Toggle/Toggle.css +10 -0
- package/dist/components/Toggle/Toggle.js +115 -98
- package/dist/components/Toggle/Toggle.stories.js +10 -11
- package/dist/components/Tooltip/DesignTooltip.stories.js +10 -16
- package/dist/components/Tooltip/Tooltip.css +17 -1
- package/dist/components/Tooltip/Tooltip.js +190 -366
- package/dist/components/Tooltip/Tooltip.stories.js +5 -12
- package/dist/components/Typography/Typography.css +57 -6
- package/dist/components/Typography/Typography.js +44 -97
- package/dist/components/Typography/Typography.stories.js +5 -11
- package/dist/components/Typography/TypographyOld.js +29 -42
- package/dist/index.js +2 -6
- package/dist/reportWebVitals.js +8 -14
- package/dist/storybook.test.js +2 -4
- package/dist/styles/colorConsts.css +4 -4
- package/dist/styles/main.css +16 -0
- package/dist/styles/stylesheet.js +10 -22
- package/dist/testing/TestAutocomplete.js +74 -97
- package/dist/testing/TestComponents.js +5 -10
- package/dist/testing/TestDropdown.js +33 -41
- package/dist/utils/autoDetectScroll.js +12 -35
- package/dist/utils/index.js +37 -63
- package/dist/utils/useFallbackId.js +19 -0
- package/package.json +5 -2
|
@@ -3,19 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
6
|
+
exports["default"] = exports.Default = void 0;
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _DesignTooltip = _interopRequireDefault(require("./DesignTooltip.stories"));
|
|
11
|
-
|
|
12
9
|
var _Tooltip = _interopRequireDefault(require("./Tooltip"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
11
|
var _default = {
|
|
17
12
|
title: 'Components/Tooltip',
|
|
18
|
-
component: _Tooltip
|
|
13
|
+
component: _Tooltip["default"],
|
|
19
14
|
argTypes: {},
|
|
20
15
|
parameters: {
|
|
21
16
|
storybookCodePanel: {
|
|
@@ -28,12 +23,10 @@ var _default = {
|
|
|
28
23
|
}
|
|
29
24
|
}
|
|
30
25
|
};
|
|
31
|
-
exports
|
|
32
|
-
|
|
26
|
+
exports["default"] = _default;
|
|
33
27
|
var Template = function Template(args) {
|
|
34
|
-
return /*#__PURE__*/_react
|
|
28
|
+
return /*#__PURE__*/_react["default"].createElement(_DesignTooltip["default"], args);
|
|
35
29
|
};
|
|
36
|
-
|
|
37
30
|
Template.displayName = "Template";
|
|
38
31
|
var Default = Template.bind({});
|
|
39
32
|
exports.Default = Default;
|
|
@@ -1,9 +1,60 @@
|
|
|
1
1
|
.cbx-Typography {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
margin: 0;
|
|
3
|
+
color: var(--gray5);
|
|
4
|
+
font-weight: 400;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
.cbx-Typography-p,
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
.cbx-Typography-p,
|
|
8
|
+
a.cbx-Typography {
|
|
9
|
+
display: block;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.cbx-Typography-5XL {
|
|
13
|
+
font-size: 3rem;
|
|
14
|
+
line-height: 4rem;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.cbx-Typography-4XL {
|
|
18
|
+
font-size: 2.5rem;
|
|
19
|
+
line-height: 3.5rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.cbx-Typography-3XL {
|
|
23
|
+
font-size: 2rem;
|
|
24
|
+
line-height: 3rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.cbx-Typography-2XL {
|
|
28
|
+
font-size: 1.75rem;
|
|
29
|
+
line-height: 2.5rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.cbx-Typography-XL {
|
|
33
|
+
font-size: 1.5rem;
|
|
34
|
+
line-height: 2rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.cbx-Typography-L {
|
|
38
|
+
font-size: 1.25rem;
|
|
39
|
+
line-height: 1.75rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.cbx-Typography-M {
|
|
43
|
+
font-size: 1rem;
|
|
44
|
+
line-height: 1.5rem;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.cbx-Typography-S {
|
|
48
|
+
font-size: 0.875rem;
|
|
49
|
+
line-height: 1.25rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.cbx-Typography-XS {
|
|
53
|
+
font-size: 0.75rem;
|
|
54
|
+
line-height: 1rem;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.cbx-Typography-2XS {
|
|
58
|
+
font-size: 0.625rem;
|
|
59
|
+
line-height: 0.75rem;
|
|
60
|
+
}
|
|
@@ -1,36 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
7
|
+
exports["default"] = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
10
|
require("../../styles/main.css");
|
|
13
|
-
|
|
14
11
|
require("./Typography.css");
|
|
15
|
-
|
|
16
12
|
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
|
-
|
|
30
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
31
|
-
|
|
32
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
33
|
-
|
|
13
|
+
var _excluded = ["children", "styles", "variant", "fontWeight", "textAlign", "color", "secondaryFont", "component", "style", "sx", "className", "prefixClass", "id"];
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) { ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } } return n; }, _extends.apply(null, arguments); }
|
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
21
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) { o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } } return i; }
|
|
22
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) { if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } } return t; }
|
|
34
23
|
var nameVariant = {
|
|
35
24
|
'5XL': 'h1',
|
|
36
25
|
'4XL': 'h2',
|
|
@@ -43,73 +32,32 @@ var nameVariant = {
|
|
|
43
32
|
XS: 'p',
|
|
44
33
|
'2XS': 'p'
|
|
45
34
|
};
|
|
46
|
-
var
|
|
47
|
-
'5XL': {
|
|
48
|
-
fontSize: '3rem',
|
|
49
|
-
lineHeight: '4rem'
|
|
50
|
-
},
|
|
51
|
-
'4XL': {
|
|
52
|
-
fontSize: '2.5rem',
|
|
53
|
-
lineHeight: '3.5rem'
|
|
54
|
-
},
|
|
55
|
-
'3XL': {
|
|
56
|
-
fontSize: '2rem',
|
|
57
|
-
lineHeight: '3rem'
|
|
58
|
-
},
|
|
59
|
-
'2XL': {
|
|
60
|
-
fontSize: '1.75rem',
|
|
61
|
-
lineHeight: '2.5rem'
|
|
62
|
-
},
|
|
63
|
-
XL: {
|
|
64
|
-
fontSize: '1.5rem',
|
|
65
|
-
lineHeight: '2rem'
|
|
66
|
-
},
|
|
67
|
-
L: {
|
|
68
|
-
fontSize: '1.25rem',
|
|
69
|
-
lineHeight: '1.75rem'
|
|
70
|
-
},
|
|
71
|
-
M: {
|
|
72
|
-
fontSize: '1rem',
|
|
73
|
-
lineHeight: '1.5rem'
|
|
74
|
-
},
|
|
75
|
-
S: {
|
|
76
|
-
fontSize: '0.875rem',
|
|
77
|
-
lineHeight: '1.25rem'
|
|
78
|
-
},
|
|
79
|
-
XS: {
|
|
80
|
-
fontSize: '0.75rem',
|
|
81
|
-
lineHeight: '1rem'
|
|
82
|
-
},
|
|
83
|
-
'2XS': {
|
|
84
|
-
fontSize: '0.625rem',
|
|
85
|
-
lineHeight: '0.75rem'
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
var Typography = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
35
|
+
var Typography = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
|
|
90
36
|
var children = _ref.children,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
var _useDynamicStyles = (0, _useDynamicStyles2
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
37
|
+
styles = _ref.styles,
|
|
38
|
+
variant = _ref.variant,
|
|
39
|
+
fontWeight = _ref.fontWeight,
|
|
40
|
+
textAlign = _ref.textAlign,
|
|
41
|
+
color = _ref.color,
|
|
42
|
+
secondaryFont = _ref.secondaryFont,
|
|
43
|
+
component = _ref.component,
|
|
44
|
+
style = _ref.style,
|
|
45
|
+
sx = _ref.sx,
|
|
46
|
+
className = _ref.className,
|
|
47
|
+
propPrefixClass = _ref.prefixClass,
|
|
48
|
+
id = _ref.id,
|
|
49
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
50
|
+
var _useDynamicStyles = (0, _useDynamicStyles2["default"])(sx),
|
|
51
|
+
stylesInLine = _useDynamicStyles.stylesInLine,
|
|
52
|
+
dynamicPrefixClass = _useDynamicStyles.prefixClass;
|
|
108
53
|
var prefixClass = propPrefixClass || dynamicPrefixClass;
|
|
109
|
-
var
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
54
|
+
var stylesVariant = (variant === null || variant === void 0 ? void 0 : variant.toUpperCase()) || 'M';
|
|
55
|
+
var Component = component || nameVariant[stylesVariant] || 'p';
|
|
56
|
+
var variantClassName = "cbx-Typography-".concat(stylesVariant);
|
|
57
|
+
return /*#__PURE__*/_react["default"].createElement(Component, _extends({
|
|
58
|
+
id: id,
|
|
59
|
+
className: prefixClass("cbx-Typography ".concat(variantClassName, " ").concat(Component === 'p' ? 'cbx-Typography-p' : '', " ").concat(className || '')),
|
|
60
|
+
style: _objectSpread(_objectSpread(_objectSpread({
|
|
113
61
|
color: color,
|
|
114
62
|
fontWeight: fontWeight,
|
|
115
63
|
textAlign: textAlign,
|
|
@@ -118,15 +66,14 @@ var Typography = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
|
118
66
|
ref: ref
|
|
119
67
|
}, props), children);
|
|
120
68
|
});
|
|
121
|
-
|
|
122
69
|
Typography.propTypes = {
|
|
123
|
-
variant: _propTypes
|
|
124
|
-
color: _propTypes
|
|
125
|
-
styles: _propTypes
|
|
126
|
-
fontWeight: _propTypes
|
|
127
|
-
textAlign: _propTypes
|
|
128
|
-
component: _propTypes
|
|
129
|
-
secondaryFont: _propTypes
|
|
70
|
+
variant: _propTypes["default"].string,
|
|
71
|
+
color: _propTypes["default"].node,
|
|
72
|
+
styles: _propTypes["default"].object,
|
|
73
|
+
fontWeight: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]),
|
|
74
|
+
textAlign: _propTypes["default"].string,
|
|
75
|
+
component: _propTypes["default"].string,
|
|
76
|
+
secondaryFont: _propTypes["default"].bool
|
|
130
77
|
};
|
|
131
78
|
Typography.defaultProps = {
|
|
132
79
|
variant: '',
|
|
@@ -138,4 +85,4 @@ Typography.defaultProps = {
|
|
|
138
85
|
secondaryFont: false
|
|
139
86
|
};
|
|
140
87
|
var _default = Typography;
|
|
141
|
-
exports
|
|
88
|
+
exports["default"] = _default;
|
|
@@ -3,17 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
6
|
+
exports["default"] = exports.Secondary = exports.Default = void 0;
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _Typography = _interopRequireDefault(require("./Typography"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
10
|
var _default = {
|
|
15
11
|
title: 'Components/Typography',
|
|
16
|
-
component: _Typography
|
|
12
|
+
component: _Typography["default"],
|
|
17
13
|
argTypes: {
|
|
18
14
|
variant: {
|
|
19
15
|
options: ['5XL', '4XL', '3XL', '2XL', 'XL', 'L', 'M', 'S', 'XS', '2XS'],
|
|
@@ -53,12 +49,10 @@ var _default = {
|
|
|
53
49
|
}
|
|
54
50
|
}
|
|
55
51
|
};
|
|
56
|
-
exports
|
|
57
|
-
|
|
52
|
+
exports["default"] = _default;
|
|
58
53
|
var Template = function Template(args) {
|
|
59
|
-
return /*#__PURE__*/_react
|
|
54
|
+
return /*#__PURE__*/_react["default"].createElement(_Typography["default"], args);
|
|
60
55
|
};
|
|
61
|
-
|
|
62
56
|
Template.displayName = "Template";
|
|
63
57
|
var Default = Template.bind({});
|
|
64
58
|
exports.Default = Default;
|
|
@@ -1,34 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
7
|
+
exports["default"] = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
10
|
require("../../styles/main.css");
|
|
13
|
-
|
|
14
11
|
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
15
|
-
|
|
16
12
|
var _excluded = ["children", "styles", "variant", "fontWeight", "textAlign", "color", "secondaryFont", "component"];
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
|
-
|
|
28
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
29
|
-
|
|
30
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
31
|
-
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) { ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } } return n; }, _extends.apply(null, arguments); }
|
|
15
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) { o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } } return i; }
|
|
21
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) { if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } } return t; }
|
|
32
22
|
var nameVariant = {
|
|
33
23
|
'5XL': 'h1',
|
|
34
24
|
'4XL': 'h2',
|
|
@@ -83,19 +73,17 @@ var stylesVariants = {
|
|
|
83
73
|
lineHeight: '0.75rem'
|
|
84
74
|
}
|
|
85
75
|
};
|
|
86
|
-
|
|
87
76
|
var Typography = function Typography(_ref) {
|
|
88
77
|
var children = _ref.children,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return /*#__PURE__*/_react.default.createElement(_Typography.default, _extends({
|
|
78
|
+
styles = _ref.styles,
|
|
79
|
+
variant = _ref.variant,
|
|
80
|
+
fontWeight = _ref.fontWeight,
|
|
81
|
+
textAlign = _ref.textAlign,
|
|
82
|
+
color = _ref.color,
|
|
83
|
+
secondaryFont = _ref.secondaryFont,
|
|
84
|
+
component = _ref.component,
|
|
85
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
86
|
+
return /*#__PURE__*/_react["default"].createElement(_Typography["default"], _extends({
|
|
99
87
|
sx: _objectSpread(_objectSpread({}, stylesVariants[(variant === null || variant === void 0 ? void 0 : variant.toUpperCase()) || 'M']), {}, {
|
|
100
88
|
color: color || 'var(--gray5)',
|
|
101
89
|
fontWeight: fontWeight || '400',
|
|
@@ -106,17 +94,16 @@ var Typography = function Typography(_ref) {
|
|
|
106
94
|
component: component
|
|
107
95
|
}, props), children);
|
|
108
96
|
};
|
|
109
|
-
|
|
110
97
|
Typography.displayName = "Typography";
|
|
111
98
|
Typography.propTypes = {
|
|
112
|
-
variant: _propTypes
|
|
113
|
-
color: _propTypes
|
|
114
|
-
styles: _propTypes
|
|
115
|
-
children: _propTypes
|
|
116
|
-
fontWeight: _propTypes
|
|
117
|
-
textAlign: _propTypes
|
|
118
|
-
component: _propTypes
|
|
119
|
-
secondaryFont: _propTypes
|
|
99
|
+
variant: _propTypes["default"].string,
|
|
100
|
+
color: _propTypes["default"].string,
|
|
101
|
+
styles: _propTypes["default"].object,
|
|
102
|
+
children: _propTypes["default"].node,
|
|
103
|
+
fontWeight: _propTypes["default"].string,
|
|
104
|
+
textAlign: _propTypes["default"].string,
|
|
105
|
+
component: _propTypes["default"].string,
|
|
106
|
+
secondaryFont: _propTypes["default"].bool
|
|
120
107
|
};
|
|
121
108
|
Typography.defaultProps = {
|
|
122
109
|
variant: '',
|
|
@@ -129,4 +116,4 @@ Typography.defaultProps = {
|
|
|
129
116
|
secondaryFont: false
|
|
130
117
|
};
|
|
131
118
|
var _default = Typography;
|
|
132
|
-
exports
|
|
119
|
+
exports["default"] = _default;
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _react = _interopRequireDefault(require("react"));
|
|
4
|
-
|
|
5
4
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
6
|
-
|
|
7
5
|
var _TestComponents = _interopRequireDefault(require("./testing/TestComponents"));
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
_reactDom.default.render( /*#__PURE__*/_react.default.createElement(_TestComponents.default, null), document.getElementById('root'));
|
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
7
|
+
_reactDom["default"].render(/*#__PURE__*/_react["default"].createElement(_TestComponents["default"], null), document.getElementById('root'));
|
package/dist/reportWebVitals.js
CHANGED
|
@@ -3,24 +3,19 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
-
|
|
12
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
-
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) { "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); } return f; })(e, t); }
|
|
14
9
|
var reportWebVitals = function reportWebVitals(onPerfEntry) {
|
|
15
10
|
if (onPerfEntry && onPerfEntry instanceof Function) {
|
|
16
11
|
Promise.resolve().then(function () {
|
|
17
12
|
return _interopRequireWildcard(require('web-vitals'));
|
|
18
13
|
}).then(function (_ref) {
|
|
19
14
|
var getCLS = _ref.getCLS,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
getFID = _ref.getFID,
|
|
16
|
+
getFCP = _ref.getFCP,
|
|
17
|
+
getLCP = _ref.getLCP,
|
|
18
|
+
getTTFB = _ref.getTTFB;
|
|
24
19
|
getCLS(onPerfEntry);
|
|
25
20
|
getFID(onPerfEntry);
|
|
26
21
|
getFCP(onPerfEntry);
|
|
@@ -29,6 +24,5 @@ var reportWebVitals = function reportWebVitals(onPerfEntry) {
|
|
|
29
24
|
});
|
|
30
25
|
}
|
|
31
26
|
};
|
|
32
|
-
|
|
33
27
|
var _default = reportWebVitals;
|
|
34
|
-
exports
|
|
28
|
+
exports["default"] = _default;
|
package/dist/storybook.test.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _addonStoryshots = _interopRequireDefault(require("@storybook/addon-storyshots"));
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
(0, _addonStoryshots.default)();
|
|
4
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
5
|
+
(0, _addonStoryshots["default"])();
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
--primary: #38398C;
|
|
3
3
|
--secondary: #9B9BC5;
|
|
4
4
|
--accent: #6BEAF2;
|
|
5
|
-
--success: #
|
|
6
|
-
--error: #
|
|
7
|
-
--info: #
|
|
8
|
-
--warning: #
|
|
5
|
+
--success: #127C4F;
|
|
6
|
+
--error: #C33C37;
|
|
7
|
+
--info: #3567D2;
|
|
8
|
+
--warning: #aa5d00;
|
|
9
9
|
--primary75: #6A6BA9;
|
|
10
10
|
--primary50: #9B9BC5;
|
|
11
11
|
--primary25: #CDCDE2;
|
package/dist/styles/main.css
CHANGED
|
@@ -62,6 +62,22 @@ body {
|
|
|
62
62
|
animation: ripple-animation 600ms linear;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
.sr-only {
|
|
66
|
+
position: absolute;
|
|
67
|
+
width: 1px;
|
|
68
|
+
height: 1px;
|
|
69
|
+
padding: 0;
|
|
70
|
+
margin: -1px;
|
|
71
|
+
overflow: hidden;
|
|
72
|
+
clip: rect(0, 0, 0, 0);
|
|
73
|
+
clip-path: inset(50%);
|
|
74
|
+
white-space: nowrap;
|
|
75
|
+
border: 0;
|
|
76
|
+
color: #000;
|
|
77
|
+
background-color: #fff;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
65
81
|
.MuiAutocomplete-popper .MuiAutocomplete-option {
|
|
66
82
|
font-family: var(--font-family);
|
|
67
83
|
}
|
|
@@ -4,17 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.theme = exports.getSecondary = exports.getPrimary = exports.defaultBreakpoints = void 0;
|
|
7
|
-
|
|
8
7
|
var _styles = require("@mui/material/styles");
|
|
9
|
-
|
|
10
8
|
var _Colors = require("../components/ThemeProvider/Colors");
|
|
11
|
-
|
|
12
|
-
function ownKeys(
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /* eslint-disable import/prefer-default-export */
|
|
18
15
|
var defaultBreakpoints = {
|
|
19
16
|
xs: 0,
|
|
20
17
|
sm: 600,
|
|
@@ -23,30 +20,22 @@ var defaultBreakpoints = {
|
|
|
23
20
|
xl: 1920
|
|
24
21
|
};
|
|
25
22
|
exports.defaultBreakpoints = defaultBreakpoints;
|
|
26
|
-
|
|
27
23
|
var getPrimary = function getPrimary() {
|
|
28
24
|
var actual = document.documentElement.style.getPropertyValue('--primary') || _Colors.colorsThemeBrand.primary;
|
|
29
|
-
|
|
30
25
|
return actual;
|
|
31
26
|
};
|
|
32
|
-
|
|
33
27
|
exports.getPrimary = getPrimary;
|
|
34
|
-
|
|
35
28
|
var getSecondary = function getSecondary() {
|
|
36
29
|
var actual = document.documentElement.style.getPropertyValue('--secondary') || _Colors.colorsThemeBrand.secondary;
|
|
37
|
-
|
|
38
30
|
return actual;
|
|
39
31
|
};
|
|
40
|
-
|
|
41
32
|
exports.getSecondary = getSecondary;
|
|
42
|
-
|
|
43
33
|
var theme = function theme() {
|
|
44
34
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
35
|
+
_ref$colors = _ref.colors,
|
|
36
|
+
colors = _ref$colors === void 0 ? {} : _ref$colors,
|
|
37
|
+
_ref$breakpoints = _ref.breakpoints,
|
|
38
|
+
breakpoints = _ref$breakpoints === void 0 ? defaultBreakpoints : _ref$breakpoints;
|
|
50
39
|
return (0, _styles.createTheme)({
|
|
51
40
|
breakpoints: {
|
|
52
41
|
values: _objectSpread(_objectSpread({}, defaultBreakpoints), breakpoints)
|
|
@@ -81,5 +70,4 @@ var theme = function theme() {
|
|
|
81
70
|
}
|
|
82
71
|
});
|
|
83
72
|
};
|
|
84
|
-
|
|
85
73
|
exports.theme = theme;
|