@councilbox/councilbox-ui 2.0.54 → 2.0.56
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/Accordion.js +3 -0
- package/Alert.js +3 -0
- package/Avatar.js +3 -0
- package/AvatarGroup.js +3 -0
- package/Block.js +3 -0
- package/Button.js +3 -0
- package/ButtonBasic.js +3 -0
- package/Checkbox.js +3 -0
- package/DatePicker.js +3 -0
- package/DateRangePicker.js +3 -0
- package/DateTimePicker.js +3 -0
- package/DragDrop.js +3 -0
- package/DrawerPanel.js +3 -0
- package/DropDown.js +3 -0
- package/EnhancedTable.js +3 -0
- package/FabButton.js +3 -0
- package/Grid.js +3 -0
- package/Header.js +3 -0
- package/IconButton.js +3 -0
- package/IconButtonSquare.js +3 -0
- package/IconFont.js +3 -0
- package/InputAutocomplete.js +3 -0
- package/InputPassword.js +3 -0
- package/InputText.js +3 -0
- package/InputTextArea.js +3 -0
- package/LoadingSection.js +3 -0
- package/MenuItem.js +3 -0
- package/MenuLateralLeft.js +3 -0
- package/MenuLateralRight.js +3 -0
- package/Modal.js +3 -0
- package/Radio.js +3 -0
- package/RichTextInput.js +3 -0
- package/Scrollbar.js +3 -0
- package/ScrollbarOld.js +3 -0
- package/SelectInput.js +3 -0
- package/Slider.js +3 -0
- package/Spacing.js +3 -0
- package/Stars.js +3 -0
- package/Stepper.js +3 -0
- package/Table.js +3 -0
- package/TableBody.js +3 -0
- package/TableCell.js +3 -0
- package/TableContainer.js +3 -0
- package/TableHead.js +3 -0
- package/TableRow.js +3 -0
- package/TableSortLabel.js +3 -0
- package/Tabs.js +3 -0
- package/Tag.js +3 -0
- package/TextInput.js +3 -0
- package/ThemeProvider.js +3 -0
- package/TimePicker.js +3 -0
- package/Timeline.js +3 -0
- package/ToastProvider.js +3 -0
- package/Toggle.js +3 -0
- package/Tooltip.js +3 -0
- package/Typography.js +3 -0
- package/dist/HOCs/useDynamicStyles.js +25 -24
- package/dist/HOCs/usePopoverPosition.js +2 -0
- package/dist/build-index.js +70 -0
- package/dist/components/1.Introduction.stories.mdx +4 -1
- package/dist/components/2.Changelog.stories.mdx +25 -2
- package/dist/components/Button/Button.js +15 -0
- package/dist/components/ButtonBasic/ButtonBasic.js +15 -0
- package/dist/components/Checkbox/Checkbox.js +2 -2
- package/dist/components/DatePicker/Calendar.js +243 -0
- package/dist/components/DatePicker/DatePicker.css +197 -0
- package/dist/components/DatePicker/DatePicker.js +465 -0
- package/dist/components/DatePicker/DatePicker.stories.js +180 -0
- package/dist/components/DatePicker/dateUtils.js +525 -0
- package/dist/components/DateRangePicker/DateRangePicker.css +41 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +530 -0
- package/dist/components/DateRangePicker/DateRangePicker.stories.js +147 -0
- package/dist/components/DateRangePicker/RangeCalendar.js +188 -0
- package/dist/components/DateTimePicker/DateTimePicker.css +4 -0
- package/dist/components/DateTimePicker/DateTimePicker.js +541 -0
- package/dist/components/DateTimePicker/DateTimePicker.stories.js +144 -0
- package/dist/components/DateTimePicker/TimeColumns.css +46 -0
- package/dist/components/DateTimePicker/TimeColumns.js +175 -0
- package/dist/components/DragDrop/DragDrop.js +21 -5
- package/dist/components/DropDown/DesignDropDown.stories.js +8 -0
- package/dist/components/DropDown/DropDown.js +14 -4
- package/dist/components/Header/Header.js +134 -25
- package/dist/components/IconButton/IconButton.js +3 -2
- package/dist/components/IconButtonSquare/IconButtonSquare.js +3 -3
- package/dist/components/InputAutocomplete/InputAutocomplete.js +17 -2
- package/dist/components/InputPassword/InputPassword.js +14 -1
- package/dist/components/InputText/InputText.css +10 -5
- package/dist/components/InputText/InputText.js +4 -4
- package/dist/components/InputTextArea/InputTextArea.js +14 -0
- package/dist/components/LoadingSection/LoadingSection.js +16 -4
- package/dist/components/MenuItem/MenuItem.js +78 -61
- package/dist/components/MenuLateralLeft/MenuLateralLeft.js +16 -2
- package/dist/components/MenuLateralRight/MenuLateralRight.js +34 -4
- package/dist/components/Modal/Modal.js +16 -1
- package/dist/components/RadioButton/Radio.js +15 -0
- package/dist/components/RichTextInput/DesignRichTextInput.stories.js +119 -0
- package/dist/components/RichTextInput/RichTextInput.css +352 -0
- package/dist/components/RichTextInput/RichTextInput.js +1057 -0
- package/dist/components/RichTextInput/RichTextInput.stories.js +33 -0
- package/dist/components/Ripple/DesignRipple.js +17 -0
- package/dist/components/Scrollbar/Scrollbar.css +60 -19
- package/dist/components/Scrollbar/Scrollbar.js +384 -62
- package/dist/components/ScrollbarOld/DesignScrollbarOld.js +24 -0
- package/dist/components/ScrollbarOld/ScrollbarOld.css +38 -0
- package/dist/components/ScrollbarOld/ScrollbarOld.js +104 -0
- package/dist/components/ScrollbarOld/ScrollbarOld.stories.js +37 -0
- package/dist/components/SelectInput/SelectInput.js +112 -86
- package/dist/components/Slider/Slider.js +15 -0
- package/dist/components/Stars/Stars.js +13 -0
- package/dist/components/Stepper/Stepper.js +15 -2
- package/dist/components/Table/TableSortLabel.js +11 -0
- package/dist/components/Tabs/DesignTabs.js +1 -1
- package/dist/components/Tabs/Tabs.js +13 -2
- package/dist/components/Tag/Tag.js +16 -0
- package/dist/components/TextInput/TextInput.js +13 -0
- package/dist/components/TimePicker/TimePicker.css +3 -0
- package/dist/components/TimePicker/TimePicker.js +441 -0
- package/dist/components/TimePicker/TimePicker.stories.js +132 -0
- package/dist/components/Toast/DesignToast.stories.js +174 -0
- package/dist/components/Toast/Toast.css +154 -0
- package/dist/components/Toast/Toast.js +178 -0
- package/dist/components/Toast/Toast.stories.js +33 -0
- package/dist/components/Toast/ToastProvider.js +33 -0
- package/dist/components/Toast/ToastRoot.js +89 -0
- package/dist/components/Toast/toastStore.js +138 -0
- package/dist/components/Toast/useToast.js +42 -0
- package/dist/components/Toggle/Toggle.js +20 -14
- package/dist/components/Tooltip/Tooltip.js +24 -2
- package/dist/styles/styleFont.css +1 -1
- package/dist/styles/zIndexConsts.css +2 -0
- package/package.json +63 -3
- package/toast.js +7 -0
- package/useCouncilboxTheme.js +7 -0
- package/useToast.js +7 -0
- package/dist/components/Accordion/AccordionOld.css +0 -16
- package/dist/components/Accordion/AccordionOld.js +0 -91
- package/dist/components/Avatar/AvatarOld.js +0 -124
- package/dist/components/ButtonBasic/ButtonBasicOld.css +0 -41
- package/dist/components/ButtonBasic/ButtonBasicOld.js +0 -211
- package/dist/components/Checkbox/CheckboxOld.css +0 -31
- package/dist/components/Checkbox/CheckboxOld.js +0 -96
- package/dist/components/DrawerPanel/DrawerPanelOld.css +0 -56
- package/dist/components/DrawerPanel/DrawerPanelOld.js +0 -211
- package/dist/components/DropDown/DropDownOld.css +0 -3
- package/dist/components/DropDown/DropDownOld.js +0 -154
- package/dist/components/Grid/GridItemOld.js +0 -38
- package/dist/components/Grid/GridOld.css +0 -0
- package/dist/components/Grid/GridOld.js +0 -46
- package/dist/components/IconButton/IconButtonOld.css +0 -0
- package/dist/components/IconButton/IconButtonOld.js +0 -122
- package/dist/components/IconButtonSquare/IconButtonSquareOld.css +0 -43
- package/dist/components/IconButtonSquare/IconButtonSquareOld.js +0 -115
- package/dist/components/InputAutocomplete/InputAutocompleteOld.css +0 -5
- package/dist/components/InputAutocomplete/InputAutocompleteOld.js +0 -159
- package/dist/components/InputText/InputTextOld.css +0 -10
- package/dist/components/InputText/InputTextOld.js +0 -314
- package/dist/components/MenuItem/MenuItemOld.js +0 -123
- package/dist/components/Modal/ModalOld.css +0 -3
- package/dist/components/Modal/ModalOld.js +0 -213
- package/dist/components/RadioButton/RadioOld.css +0 -31
- package/dist/components/RadioButton/RadioOld.js +0 -126
- package/dist/components/SelectInput/SelectInputOld.css +0 -17
- package/dist/components/SelectInput/SelectInputOld.js +0 -296
- package/dist/components/Table/TableOld.css +0 -79
- package/dist/components/Table/TableOld.js +0 -133
- package/dist/components/Tabs/TabsOld.js +0 -78
- package/dist/components/Typography/TypographyOld.js +0 -119
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
.cbx-table-container {
|
|
2
|
-
width: 100%;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.cbx-table-container-loadingSection {
|
|
6
|
-
margin-top: 3rem;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.cbx-table th {
|
|
10
|
-
padding: 0.625rem 0.75rem !important;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.cbx-table td {
|
|
14
|
-
padding: var(--spacing12) !important;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.cbx-table thead tr {
|
|
18
|
-
height: var(--spacing52);
|
|
19
|
-
position: relative;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.cbx-table tbody tr {
|
|
23
|
-
height: var(--spacing64);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.lastResponsive th,
|
|
27
|
-
.lastResponsive td {
|
|
28
|
-
padding: 0 !important;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.lastResponsive tr>td:last-child,
|
|
32
|
-
.lastResponsive tr>th:last-child {
|
|
33
|
-
min-width: 4.438rem;
|
|
34
|
-
width: 4.438rem;
|
|
35
|
-
position: sticky;
|
|
36
|
-
right: 0;
|
|
37
|
-
text-align: center;
|
|
38
|
-
background: white;
|
|
39
|
-
padding: 0;
|
|
40
|
-
margin: 0;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.lastResponsive tr>td:last-child {
|
|
44
|
-
min-height: 3.938rem;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.lastResponsive tr>th:last-child {
|
|
48
|
-
height: var(--spacing52);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.lastResponsive tr>td:last-child {
|
|
52
|
-
display: flex;
|
|
53
|
-
justify-content: flex-end;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.lastResponsive tr>th:last-child div {
|
|
57
|
-
float: right;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.lastResponsive tr>td:last-child div,
|
|
61
|
-
.lastResponsive tr>th:last-child div {
|
|
62
|
-
box-shadow: -4px 0px 4px rgba(0, 0, 0, 0.25);
|
|
63
|
-
width: 4rem;
|
|
64
|
-
display: flex;
|
|
65
|
-
align-items: center;
|
|
66
|
-
justify-content: center;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.lastResponsive tr>td:last-child div{
|
|
70
|
-
min-height: 3.938rem;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.lastResponsive tr>th:last-child div {
|
|
74
|
-
height: 3.188rem;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.lastResponsive tr>th:last-child {
|
|
78
|
-
z-index: 20 !important;
|
|
79
|
-
}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.TableSortLabel = exports.TableRow = exports.TableHead = exports.TableContainer = exports.TableCell = exports.TableBody = exports.Table = void 0;
|
|
8
|
-
var _Table = _interopRequireDefault(require("@mui/material/Table"));
|
|
9
|
-
var _TableBody = _interopRequireDefault(require("@mui/material/TableBody"));
|
|
10
|
-
var _TableCell = _interopRequireDefault(require("@mui/material/TableCell"));
|
|
11
|
-
var _TableContainer = _interopRequireDefault(require("@mui/material/TableContainer"));
|
|
12
|
-
var _TableHead = _interopRequireDefault(require("@mui/material/TableHead"));
|
|
13
|
-
var _TableRow = _interopRequireDefault(require("@mui/material/TableRow"));
|
|
14
|
-
var _TableSortLabel = _interopRequireDefault(require("@mui/material/TableSortLabel"));
|
|
15
|
-
var _excluded = ["lastResponsive"],
|
|
16
|
-
_excluded2 = ["children", "component", "hover", "selected", "onClick", "className"],
|
|
17
|
-
_excluded3 = ["children", "component"],
|
|
18
|
-
_excluded4 = ["children", "component"],
|
|
19
|
-
_excluded5 = ["children", "active", "direction", "onClick", "hideSortIcon", "IconComponent"],
|
|
20
|
-
_excluded6 = ["children", "component", "padding", "scope", "size", "sortDirection", "variant", "align", "sx"],
|
|
21
|
-
_excluded7 = ["children", "component"];
|
|
22
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
23
|
-
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; }
|
|
24
|
-
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; }
|
|
25
|
-
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; }
|
|
26
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
27
|
-
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); }
|
|
28
|
-
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); }
|
|
29
|
-
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; }
|
|
30
|
-
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; }
|
|
31
|
-
// import './TableOld.css';
|
|
32
|
-
|
|
33
|
-
var Table = function Table(_ref) {
|
|
34
|
-
var lastResponsive = _ref.lastResponsive,
|
|
35
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
36
|
-
return /*#__PURE__*/React.createElement(_Table["default"], _extends({
|
|
37
|
-
className: lastResponsive ? 'cbx-table lastResponsive' : 'cbx-table'
|
|
38
|
-
}, props));
|
|
39
|
-
};
|
|
40
|
-
exports.Table = Table;
|
|
41
|
-
Table.displayName = "Table";
|
|
42
|
-
var TableRow = function TableRow(_ref2) {
|
|
43
|
-
var children = _ref2.children,
|
|
44
|
-
component = _ref2.component,
|
|
45
|
-
hover = _ref2.hover,
|
|
46
|
-
selected = _ref2.selected,
|
|
47
|
-
onClick = _ref2.onClick,
|
|
48
|
-
className = _ref2.className,
|
|
49
|
-
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
50
|
-
return /*#__PURE__*/React.createElement(_TableRow["default"], _extends({
|
|
51
|
-
className: className,
|
|
52
|
-
component: component,
|
|
53
|
-
hover: hover,
|
|
54
|
-
selected: selected,
|
|
55
|
-
onClick: onClick
|
|
56
|
-
}, props), children);
|
|
57
|
-
};
|
|
58
|
-
exports.TableRow = TableRow;
|
|
59
|
-
TableRow.displayName = "TableRow";
|
|
60
|
-
var TableBody = function TableBody(_ref3) {
|
|
61
|
-
var children = _ref3.children,
|
|
62
|
-
component = _ref3.component,
|
|
63
|
-
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
64
|
-
return /*#__PURE__*/React.createElement(_TableBody["default"], _extends({
|
|
65
|
-
component: component
|
|
66
|
-
}, props), children);
|
|
67
|
-
};
|
|
68
|
-
exports.TableBody = TableBody;
|
|
69
|
-
TableBody.displayName = "TableBody";
|
|
70
|
-
var TableHead = function TableHead(_ref4) {
|
|
71
|
-
var children = _ref4.children,
|
|
72
|
-
component = _ref4.component,
|
|
73
|
-
props = _objectWithoutProperties(_ref4, _excluded4);
|
|
74
|
-
return /*#__PURE__*/React.createElement(_TableHead["default"], _extends({
|
|
75
|
-
component: component
|
|
76
|
-
}, props), children);
|
|
77
|
-
};
|
|
78
|
-
exports.TableHead = TableHead;
|
|
79
|
-
TableHead.displayName = "TableHead";
|
|
80
|
-
var TableSortLabel = function TableSortLabel(_ref5) {
|
|
81
|
-
var children = _ref5.children,
|
|
82
|
-
active = _ref5.active,
|
|
83
|
-
direction = _ref5.direction,
|
|
84
|
-
onClick = _ref5.onClick,
|
|
85
|
-
hideSortIcon = _ref5.hideSortIcon,
|
|
86
|
-
IconComponent = _ref5.IconComponent,
|
|
87
|
-
props = _objectWithoutProperties(_ref5, _excluded5);
|
|
88
|
-
return /*#__PURE__*/React.createElement(_TableSortLabel["default"], _extends({
|
|
89
|
-
onClick: onClick,
|
|
90
|
-
active: active,
|
|
91
|
-
direction: direction,
|
|
92
|
-
hideSortIcon: hideSortIcon,
|
|
93
|
-
IconComponent: IconComponent
|
|
94
|
-
}, props), children);
|
|
95
|
-
};
|
|
96
|
-
exports.TableSortLabel = TableSortLabel;
|
|
97
|
-
TableSortLabel.displayName = "TableSortLabel";
|
|
98
|
-
var TableCell = function TableCell(_ref6) {
|
|
99
|
-
var children = _ref6.children,
|
|
100
|
-
component = _ref6.component,
|
|
101
|
-
padding = _ref6.padding,
|
|
102
|
-
scope = _ref6.scope,
|
|
103
|
-
size = _ref6.size,
|
|
104
|
-
sortDirection = _ref6.sortDirection,
|
|
105
|
-
variant = _ref6.variant,
|
|
106
|
-
align = _ref6.align,
|
|
107
|
-
sx = _ref6.sx,
|
|
108
|
-
props = _objectWithoutProperties(_ref6, _excluded6);
|
|
109
|
-
return /*#__PURE__*/React.createElement(_TableCell["default"], _extends({
|
|
110
|
-
component: component,
|
|
111
|
-
padding: padding,
|
|
112
|
-
scope: scope,
|
|
113
|
-
size: size,
|
|
114
|
-
sortDirection: sortDirection,
|
|
115
|
-
variant: variant,
|
|
116
|
-
align: align,
|
|
117
|
-
sx: _objectSpread({
|
|
118
|
-
color: 'var(--gray3)'
|
|
119
|
-
}, sx)
|
|
120
|
-
}, props), children);
|
|
121
|
-
};
|
|
122
|
-
exports.TableCell = TableCell;
|
|
123
|
-
TableCell.displayName = "TableCell";
|
|
124
|
-
var TableContainer = function TableContainer(_ref7) {
|
|
125
|
-
var children = _ref7.children,
|
|
126
|
-
component = _ref7.component,
|
|
127
|
-
props = _objectWithoutProperties(_ref7, _excluded7);
|
|
128
|
-
return /*#__PURE__*/React.createElement(_TableContainer["default"], _extends({
|
|
129
|
-
component: component
|
|
130
|
-
}, props), children);
|
|
131
|
-
};
|
|
132
|
-
exports.TableContainer = TableContainer;
|
|
133
|
-
TableContainer.displayName = "TableContainer";
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
-
var _Tabs = _interopRequireDefault(require("@mui/material/Tabs"));
|
|
11
|
-
var _Tab = _interopRequireDefault(require("@mui/material/Tab"));
|
|
12
|
-
require("../../styles/main.css");
|
|
13
|
-
require("./Tabs.css");
|
|
14
|
-
var _excluded = ["id", "className", "value", "onChange", "itemsTab", "variant"];
|
|
15
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
|
-
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); }
|
|
17
|
-
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; }
|
|
18
|
-
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; }
|
|
19
|
-
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; }
|
|
20
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
21
|
-
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); }
|
|
22
|
-
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; }
|
|
23
|
-
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; }
|
|
24
|
-
var Tabs = function Tabs(_ref) {
|
|
25
|
-
var id = _ref.id,
|
|
26
|
-
className = _ref.className,
|
|
27
|
-
value = _ref.value,
|
|
28
|
-
onChange = _ref.onChange,
|
|
29
|
-
itemsTab = _ref.itemsTab,
|
|
30
|
-
variant = _ref.variant,
|
|
31
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
-
return /*#__PURE__*/_react["default"].createElement(_Tabs["default"], _extends({
|
|
33
|
-
id: id,
|
|
34
|
-
className: className,
|
|
35
|
-
value: value,
|
|
36
|
-
onChange: onChange,
|
|
37
|
-
variant: variant === 'scrollable-fullWidth' ? 'scrollable' : variant,
|
|
38
|
-
scrollButtons: "auto"
|
|
39
|
-
}, props), itemsTab === null || itemsTab === void 0 ? void 0 : itemsTab.map(function (item, index) {
|
|
40
|
-
return /*#__PURE__*/_react["default"].createElement(_Tab["default"], _extends({
|
|
41
|
-
key: "".concat(item.text, "-").concat(index),
|
|
42
|
-
sx: _objectSpread(_objectSpread({
|
|
43
|
-
borderBottom: '2px solid var(--gray2)',
|
|
44
|
-
'&:focus': {
|
|
45
|
-
outline: 'none'
|
|
46
|
-
}
|
|
47
|
-
}, variant === 'scrollable-fullWidth' ? {
|
|
48
|
-
minWidth: 'fit-content',
|
|
49
|
-
flex: 1
|
|
50
|
-
} : {}), item.sx),
|
|
51
|
-
disabled: item.disabled,
|
|
52
|
-
value: item.value || index,
|
|
53
|
-
label: /*#__PURE__*/_react["default"].createElement("div", {
|
|
54
|
-
className: "cbx-Tab-container-label"
|
|
55
|
-
}, item.badge && /*#__PURE__*/_react["default"].createElement("div", {
|
|
56
|
-
className: 'cbx-Tab-red-dot'
|
|
57
|
-
}), item.text)
|
|
58
|
-
}, item));
|
|
59
|
-
}));
|
|
60
|
-
};
|
|
61
|
-
Tabs.displayName = "Tabs";
|
|
62
|
-
Tabs.propTypes = {
|
|
63
|
-
value: _propTypes["default"].any,
|
|
64
|
-
onChange: _propTypes["default"].func,
|
|
65
|
-
itemsTab: _propTypes["default"].array,
|
|
66
|
-
variant: _propTypes["default"].string
|
|
67
|
-
};
|
|
68
|
-
Tabs.defaultProps = {
|
|
69
|
-
value: 0,
|
|
70
|
-
onChange: undefined,
|
|
71
|
-
itemsTab: [],
|
|
72
|
-
variant: ''
|
|
73
|
-
// variant: 'fullWidth'
|
|
74
|
-
// variant: 'scrollable-fullWidth'
|
|
75
|
-
// variant: 'scrollable'
|
|
76
|
-
};
|
|
77
|
-
var _default = Tabs;
|
|
78
|
-
exports["default"] = _default;
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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); }
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
-
require("../../styles/main.css");
|
|
11
|
-
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
12
|
-
var _excluded = ["children", "styles", "variant", "fontWeight", "textAlign", "color", "secondaryFont", "component"];
|
|
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; }
|
|
22
|
-
var nameVariant = {
|
|
23
|
-
'5XL': 'h1',
|
|
24
|
-
'4XL': 'h2',
|
|
25
|
-
'3XL': 'h3',
|
|
26
|
-
'2XL': 'h4',
|
|
27
|
-
XL: 'h5',
|
|
28
|
-
L: 'h6',
|
|
29
|
-
M: 'body1',
|
|
30
|
-
S: 'body2',
|
|
31
|
-
XS: 'subtitle1',
|
|
32
|
-
'2XS': 'subtitle2'
|
|
33
|
-
};
|
|
34
|
-
var stylesVariants = {
|
|
35
|
-
'5XL': {
|
|
36
|
-
fontSize: '3rem',
|
|
37
|
-
lineHeight: '4rem'
|
|
38
|
-
},
|
|
39
|
-
'4XL': {
|
|
40
|
-
fontSize: '2.5rem',
|
|
41
|
-
lineHeight: '3.5rem'
|
|
42
|
-
},
|
|
43
|
-
'3XL': {
|
|
44
|
-
fontSize: '2rem',
|
|
45
|
-
lineHeight: '3rem'
|
|
46
|
-
},
|
|
47
|
-
'2XL': {
|
|
48
|
-
fontSize: '1.75rem',
|
|
49
|
-
lineHeight: '2.5rem'
|
|
50
|
-
},
|
|
51
|
-
XL: {
|
|
52
|
-
fontSize: '1.5rem',
|
|
53
|
-
lineHeight: '2rem'
|
|
54
|
-
},
|
|
55
|
-
L: {
|
|
56
|
-
fontSize: '1.25rem',
|
|
57
|
-
lineHeight: '1.75rem'
|
|
58
|
-
},
|
|
59
|
-
M: {
|
|
60
|
-
fontSize: '1rem',
|
|
61
|
-
lineHeight: '1.5rem'
|
|
62
|
-
},
|
|
63
|
-
S: {
|
|
64
|
-
fontSize: '0.875rem',
|
|
65
|
-
lineHeight: '1.25rem'
|
|
66
|
-
},
|
|
67
|
-
XS: {
|
|
68
|
-
fontSize: '0.75rem',
|
|
69
|
-
lineHeight: '1rem'
|
|
70
|
-
},
|
|
71
|
-
'2XS': {
|
|
72
|
-
fontSize: '0.625rem',
|
|
73
|
-
lineHeight: '0.75rem'
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
var Typography = function Typography(_ref) {
|
|
77
|
-
var children = _ref.children,
|
|
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({
|
|
87
|
-
sx: _objectSpread(_objectSpread({}, stylesVariants[(variant === null || variant === void 0 ? void 0 : variant.toUpperCase()) || 'M']), {}, {
|
|
88
|
-
color: color || 'var(--gray5)',
|
|
89
|
-
fontWeight: fontWeight || '400',
|
|
90
|
-
textAlign: textAlign,
|
|
91
|
-
fontFamily: secondaryFont && 'var(--font-secondary)'
|
|
92
|
-
}, styles),
|
|
93
|
-
variant: nameVariant[(variant === null || variant === void 0 ? void 0 : variant.toUpperCase()) || 'M'],
|
|
94
|
-
component: component
|
|
95
|
-
}, props), children);
|
|
96
|
-
};
|
|
97
|
-
Typography.displayName = "Typography";
|
|
98
|
-
Typography.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
|
|
107
|
-
};
|
|
108
|
-
Typography.defaultProps = {
|
|
109
|
-
variant: '',
|
|
110
|
-
color: '',
|
|
111
|
-
styles: {},
|
|
112
|
-
children: '',
|
|
113
|
-
fontWeight: '',
|
|
114
|
-
textAlign: '',
|
|
115
|
-
component: '',
|
|
116
|
-
secondaryFont: false
|
|
117
|
-
};
|
|
118
|
-
var _default = Typography;
|
|
119
|
-
exports["default"] = _default;
|