@councilbox/councilbox-ui 1.0.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/HOCs/useDynamicStyles.js +99 -0
- package/dist/HOCs/useRipple.js +91 -0
- package/dist/build-index.js +8 -0
- package/dist/components/1.Introduction.stories.mdx +2 -1
- package/dist/components/2.Changelog.stories.mdx +3 -0
- package/dist/components/3.Guide.stories.mdx +56 -0
- package/dist/components/Accordion/Accordion.css +39 -1
- package/dist/components/Accordion/Accordion.js +84 -45
- package/dist/components/Accordion/Accordion.stories.js +4 -2
- package/dist/components/Accordion/AccordionOld.css +16 -0
- package/dist/components/Accordion/AccordionOld.js +115 -0
- package/dist/components/Accordion/DesignAccordion.stories.js +38 -0
- package/dist/components/Alert/Alert.css +5 -0
- package/dist/components/Alert/Alert.js +17 -6
- package/dist/components/Avatar/Avatar.css +3 -3
- package/dist/components/Avatar/Avatar.js +36 -20
- package/dist/components/Avatar/AvatarOld.js +138 -0
- package/dist/components/Avatar/DesignAvatar.stories.js +1 -1
- package/dist/components/Block/Block.js +17 -2
- package/dist/components/ButtonBasic/ButtonBasic.css +264 -20
- package/dist/components/ButtonBasic/ButtonBasic.js +85 -110
- package/dist/components/ButtonBasic/ButtonBasicOld.css +41 -0
- package/dist/components/ButtonBasic/ButtonBasicOld.js +231 -0
- package/dist/components/Checkbox/Checkbox.css +101 -22
- package/dist/components/Checkbox/Checkbox.js +119 -63
- package/dist/components/Checkbox/CheckboxOld.css +31 -0
- package/dist/components/Checkbox/CheckboxOld.js +112 -0
- package/dist/components/DragDrop/DragDrop.js +24 -9
- package/dist/components/DrawerPanel/DesignDrawerPanel.js +4 -2
- package/dist/components/DrawerPanel/DrawerPanel.css +76 -36
- package/dist/components/DrawerPanel/DrawerPanel.js +137 -115
- package/dist/components/DrawerPanel/DrawerPanelOld.css +56 -0
- package/dist/components/DrawerPanel/DrawerPanelOld.js +233 -0
- package/dist/components/DropDown/DesignDropDown.stories.js +146 -17
- package/dist/components/DropDown/DropDown.css +96 -1
- package/dist/components/DropDown/DropDown.js +363 -82
- package/dist/components/DropDown/DropDown.stories.js +1 -0
- package/dist/components/DropDown/DropDownOld.css +3 -0
- package/dist/components/DropDown/DropDownOld.js +186 -0
- package/dist/components/DropDown/PopoverPlayground.css +22 -0
- package/dist/components/DropDown/PopoverPlayground.js +235 -0
- package/dist/components/EnhancedTable/EnhancedTable.js +5 -6
- package/dist/components/FabButton/DesignFabButton.stories.js +3 -1
- package/dist/components/FabButton/FabButton.js +25 -5
- package/dist/components/Grid/DesignGrid.stories.js +9 -3
- package/dist/components/Grid/Grid.css +325 -0
- package/dist/components/Grid/Grid.js +57 -16
- package/dist/components/Grid/GridItem.js +31 -13
- package/dist/components/Grid/GridItemOld.js +43 -0
- package/dist/components/Grid/GridOld.css +0 -0
- package/dist/components/Grid/GridOld.js +53 -0
- package/dist/components/Header/Header.js +95 -116
- package/dist/components/IconButton/DesignIconButton.stories.js +22 -2
- package/dist/components/IconButton/IconButton.css +121 -1
- package/dist/components/IconButton/IconButton.js +98 -53
- package/dist/components/IconButton/IconButtonOld.css +0 -0
- package/dist/components/IconButton/IconButtonOld.js +138 -0
- package/dist/components/IconButtonSquare/IconButtonSquare.js +20 -90
- package/dist/components/IconButtonSquare/IconButtonSquareOld.css +43 -0
- package/dist/components/IconButtonSquare/IconButtonSquareOld.js +133 -0
- package/dist/components/InputAutocomplete/InputAutocomplete.css +109 -0
- package/dist/components/InputAutocomplete/InputAutocomplete.js +316 -77
- package/dist/components/InputAutocomplete/InputAutocomplete.stories.js +118 -6
- package/dist/components/InputAutocomplete/InputAutocompleteOld.css +5 -0
- package/dist/components/InputAutocomplete/InputAutocompleteOld.js +178 -0
- package/dist/components/InputPassword/InputPassword.js +10 -20
- package/dist/components/InputText/InputText.css +442 -1
- package/dist/components/InputText/InputText.js +298 -239
- package/dist/components/InputText/InputText.stories.js +12 -3
- package/dist/components/InputText/InputTextOld.css +10 -0
- package/dist/components/InputText/InputTextOld.js +340 -0
- package/dist/components/InputTextArea/DesignInputTextArea.stories.js +30 -4
- package/dist/components/InputTextArea/InputTextArea.js +13 -6
- package/dist/components/LoadingSection/LoadingSection.css +44 -2
- package/dist/components/LoadingSection/LoadingSection.js +63 -9
- package/dist/components/MenuItem/DesignMenuItem.stories.js +1 -0
- package/dist/components/MenuItem/MenuItem.css +31 -6
- package/dist/components/MenuItem/MenuItem.js +95 -50
- package/dist/components/MenuItem/MenuItemOld.js +139 -0
- package/dist/components/MenuLateralLeft/MenuLateralLeft.js +60 -40
- package/dist/components/MenuLateralRight/MenuLateralRight.js +23 -8
- package/dist/components/Modal/DesignModal.stories.js +54 -0
- package/dist/components/Modal/Modal.css +81 -2
- package/dist/components/Modal/Modal.js +112 -80
- package/dist/components/Modal/Modal.stories.js +13 -2
- package/dist/components/Modal/ModalOld.css +3 -0
- package/dist/components/Modal/ModalOld.js +230 -0
- package/dist/components/PaginationFooter/DesignPaginationFooter.stories.js +9 -1
- package/dist/components/PaginationFooter/PaginationFooter.css +73 -0
- package/dist/components/PaginationFooter/PaginationFooter.js +45 -87
- package/dist/components/RadioButton/Radio.css +115 -16
- package/dist/components/RadioButton/Radio.js +70 -94
- package/dist/components/RadioButton/Radio.stories.js +42 -18
- package/dist/components/RadioButton/RadioOld.css +31 -0
- package/dist/components/RadioButton/RadioOld.js +142 -0
- package/dist/components/Ripple/DesignRipple.js +77 -0
- package/dist/components/Ripple/Ripple.stories.js +45 -0
- package/dist/components/Scrollbar/Scrollbar.js +21 -6
- package/dist/components/SelectInput/DesignSelectInput.js +62 -23
- package/dist/components/SelectInput/SelectInput.css +128 -10
- package/dist/components/SelectInput/SelectInput.js +233 -246
- package/dist/components/SelectInput/SelectInputOld.css +17 -0
- package/dist/components/SelectInput/SelectInputOld.js +325 -0
- package/dist/components/Stars/Stars.css +28 -28
- package/dist/components/Stars/Stars.js +22 -12
- package/dist/components/Stepper/Stepper.css +1 -0
- package/dist/components/Stepper/Stepper.js +81 -24
- package/dist/components/Table/DesignTable.stories.js +1 -0
- package/dist/components/Table/Table.css +56 -53
- package/dist/components/Table/Table.js +55 -75
- package/dist/components/Table/TableOld.css +79 -0
- package/dist/components/Table/TableOld.js +165 -0
- package/dist/components/Tabs/DesignTabs.js +37 -12
- package/dist/components/Tabs/Tabs.css +39 -4
- package/dist/components/Tabs/Tabs.js +194 -30
- package/dist/components/Tabs/Tabs.stories.js +8 -1
- package/dist/components/Tabs/TabsOld.js +92 -0
- package/dist/components/Tag/Tag.js +19 -9
- package/dist/components/Toggle/Toggle.css +122 -3
- package/dist/components/Toggle/Toggle.js +95 -68
- package/dist/components/Tooltip/DesignTooltip.stories.js +48 -0
- package/dist/components/Tooltip/Tooltip.css +75 -0
- package/dist/components/Tooltip/Tooltip.js +126 -0
- package/dist/components/Tooltip/Tooltip.stories.js +40 -0
- package/dist/components/Typography/Typography.css +9 -0
- package/dist/components/Typography/Typography.js +30 -21
- package/dist/components/Typography/TypographyOld.js +132 -0
- package/dist/styles/colorConsts.css +24 -0
- package/dist/styles/main.css +41 -49
- package/dist/styles/scpacingConsts.css +26 -0
- package/dist/styles/zIndexConsts.css +9 -0
- package/package.json +2 -1
|
@@ -5,16 +5,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _material = require("@mui/material");
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
|
|
12
10
|
require("../../styles/main.css");
|
|
13
11
|
|
|
14
12
|
var _SelectInput = _interopRequireDefault(require("./SelectInput"));
|
|
15
13
|
|
|
14
|
+
var _MenuItem = _interopRequireDefault(require("../MenuItem/MenuItem"));
|
|
15
|
+
|
|
16
|
+
var _Checkbox = _interopRequireDefault(require("../Checkbox/Checkbox"));
|
|
17
|
+
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
20
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
21
|
+
|
|
22
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
23
|
+
|
|
24
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
25
|
+
|
|
26
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
27
|
+
|
|
18
28
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
19
29
|
|
|
20
30
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -27,37 +37,66 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
27
37
|
|
|
28
38
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
29
39
|
|
|
30
|
-
var
|
|
40
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
41
|
+
|
|
42
|
+
var arrayTypes = [{
|
|
43
|
+
text: 'Español',
|
|
44
|
+
value: 'es'
|
|
45
|
+
}, {
|
|
46
|
+
text: 'English',
|
|
47
|
+
value: 'en'
|
|
48
|
+
}, {
|
|
49
|
+
text: 'galego',
|
|
50
|
+
value: 'ga'
|
|
51
|
+
}];
|
|
52
|
+
|
|
53
|
+
var DesignSelectInput = function DesignSelectInput(_ref) {
|
|
54
|
+
var props = _extends({}, _ref);
|
|
31
55
|
|
|
32
|
-
var
|
|
33
|
-
var _React$useState = _react.default.useState(''),
|
|
56
|
+
var _React$useState = _react.default.useState(['es']),
|
|
34
57
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
35
|
-
|
|
36
|
-
|
|
58
|
+
languages = _React$useState2[0],
|
|
59
|
+
setLanguages = _React$useState2[1];
|
|
60
|
+
|
|
61
|
+
var handleLanguageChange = function handleLanguageChange(event, langValue) {
|
|
62
|
+
if (event.target.checked) {
|
|
63
|
+
setLanguages(function (prevLanguages) {
|
|
64
|
+
return [].concat(_toConsumableArray(prevLanguages), [langValue]);
|
|
65
|
+
});
|
|
66
|
+
} else {
|
|
67
|
+
setLanguages(function (prevLanguages) {
|
|
68
|
+
return prevLanguages.filter(function (l) {
|
|
69
|
+
return l !== langValue;
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
};
|
|
37
74
|
|
|
38
75
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
39
|
-
style: {
|
|
40
|
-
display: 'flex',
|
|
41
|
-
width: '100%'
|
|
42
|
-
}
|
|
76
|
+
style: {}
|
|
43
77
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
44
78
|
style: {
|
|
45
79
|
marginRight: '4px',
|
|
46
|
-
|
|
80
|
+
marginTop: '14px'
|
|
47
81
|
}
|
|
48
|
-
}, /*#__PURE__*/_react.default.createElement(_SelectInput.default, {
|
|
82
|
+
}, /*#__PURE__*/_react.default.createElement(_SelectInput.default, _extends({
|
|
49
83
|
label: 'Majority Type',
|
|
50
|
-
|
|
51
|
-
|
|
84
|
+
value: languages,
|
|
85
|
+
onChange: function onChange(ev) {
|
|
86
|
+
setLanguages(ev.target.value);
|
|
52
87
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
88
|
+
multiple: true
|
|
89
|
+
}, props), arrayTypes.map(function (lang) {
|
|
90
|
+
return /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
91
|
+
key: lang.value,
|
|
92
|
+
value: lang.value
|
|
93
|
+
}, /*#__PURE__*/_react.default.createElement(_Checkbox.default, {
|
|
94
|
+
checked: languages.includes(lang.value),
|
|
95
|
+
value: lang.value,
|
|
96
|
+
onChange: function onChange(ev) {
|
|
97
|
+
return handleLanguageChange(ev, lang.value);
|
|
98
|
+
}
|
|
99
|
+
}), /*#__PURE__*/_react.default.createElement("span", null, lang.text));
|
|
61
100
|
})))));
|
|
62
101
|
};
|
|
63
102
|
|
|
@@ -1,17 +1,135 @@
|
|
|
1
|
-
.cbx-
|
|
1
|
+
.cbx-inputText-container-select.cbx-inputText-container:after {
|
|
2
|
+
position: absolute;
|
|
3
|
+
top: 1.313rem;
|
|
4
|
+
right: 0.875rem;
|
|
5
|
+
width: 0;
|
|
6
|
+
height: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
content: '';
|
|
9
|
+
border-left: 0.375rem solid transparent;
|
|
10
|
+
border-right: 0.375rem solid transparent;
|
|
11
|
+
border-top: 0.375rem solid var(--gray3);
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
transition: .2s;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.cbx-selectInput-container-open .cbx-inputText-container:after {
|
|
17
|
+
transform: rotate(180deg);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.cbx-inputText-container-disabled.cbx-inputText-container-select.cbx-inputText-container:after {
|
|
21
|
+
border-left: 0px solid transparent;
|
|
22
|
+
border-right: 0px solid transparent;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.cbx-input.cbx-inputText-select {
|
|
26
|
+
padding: 1.031rem 0.875rem;
|
|
27
|
+
min-height: 3.5rem;
|
|
28
|
+
padding-right: 2rem;
|
|
29
|
+
-moz-appearance: none;
|
|
30
|
+
-webkit-appearance: none;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
caret-color: transparent;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.cbx-inputText-container-disabled .cbx-input.cbx-inputText-select {
|
|
36
|
+
cursor: auto;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.cbx-selectInput-container {
|
|
40
|
+
position: relative;
|
|
41
|
+
width: 15rem;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.cbx-selectInput-container.cbx-selectInput-container-fullWidth {
|
|
45
|
+
width: 100%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.cbx-selectInput-options-container {
|
|
49
|
+
background-color: rgb(255, 255, 255);
|
|
50
|
+
color: rgba(0, 0, 0, 0.87);
|
|
51
|
+
transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
52
|
+
border-radius: 0.25rem;
|
|
53
|
+
box-shadow: rgba(0, 0, 0, 0.2) 0px 5px 5px -3px, rgba(0, 0, 0, 0.14) 0px 8px 10px 1px, rgba(0, 0, 0, 0.12) 0px 3px 14px 2px;
|
|
54
|
+
position: absolute;
|
|
55
|
+
overflow: hidden auto;
|
|
56
|
+
min-width: 1rem;
|
|
57
|
+
min-height: 1rem;
|
|
58
|
+
max-height: calc(100% - 2rem);
|
|
59
|
+
max-width: calc(100% - 2rem);
|
|
60
|
+
outline: 0px;
|
|
61
|
+
opacity: 1;
|
|
62
|
+
transform: none;
|
|
63
|
+
min-width: 15rem;
|
|
64
|
+
transition: opacity 248ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 165ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
|
65
|
+
transform-origin: 7.5rem 0px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.cbx-selectInput-options-container.cbx-selectInput-options-container-open {
|
|
69
|
+
animation: dropdownOpen 150ms ease-out forwards;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.cbx-selectInput-options-container.cbx-selectInput-options-container-close {
|
|
73
|
+
animation: dropdownClose 150ms ease-out forwards;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.cbx-selectInput-presentation {
|
|
77
|
+
position: fixed;
|
|
78
|
+
z-index: var(--zIdxSelect);
|
|
79
|
+
inset: 0px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.cbx-selectInput-options {
|
|
83
|
+
list-style: none;
|
|
84
|
+
margin: 0px;
|
|
85
|
+
padding: 0.5rem 0px;
|
|
86
|
+
position: relative;
|
|
87
|
+
outline: 0px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.cbx-selectInput-backdrop {
|
|
91
|
+
position: fixed;
|
|
2
92
|
display: flex;
|
|
93
|
+
-webkit-box-align: center;
|
|
3
94
|
align-items: center;
|
|
95
|
+
-webkit-box-pack: center;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
inset: 0px;
|
|
98
|
+
background-color: transparent;
|
|
99
|
+
-webkit-tap-highlight-color: transparent;
|
|
100
|
+
z-index: -1;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@keyframes dropdownOpen {
|
|
104
|
+
0% {
|
|
105
|
+
opacity: 0;
|
|
106
|
+
transform: scale(0.75, 0.5625);
|
|
107
|
+
}
|
|
108
|
+
100% {
|
|
109
|
+
opacity: 1;
|
|
110
|
+
transform: scale(1, 1);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@keyframes dropdownClose {
|
|
115
|
+
0% {
|
|
116
|
+
opacity: 1;
|
|
117
|
+
transform: scale(1, 1);
|
|
118
|
+
}
|
|
119
|
+
100% {
|
|
120
|
+
opacity: 0;
|
|
121
|
+
transform: scale(0.75, 0.5625);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.cbx-selectInput-container .cbx-inputText-renderValue-container{
|
|
126
|
+
cursor: pointer;
|
|
4
127
|
}
|
|
5
128
|
|
|
6
|
-
.cbx-selectInput-
|
|
7
|
-
|
|
8
|
-
height: 0.875rem;
|
|
9
|
-
line-height: 1.1;
|
|
10
|
-
font-size: 0.875rem;
|
|
129
|
+
.cbx-selectInput-container.cbx-selectInput-container-disabled .cbx-inputText-renderValue-container{
|
|
130
|
+
cursor: auto;
|
|
11
131
|
}
|
|
12
132
|
|
|
13
|
-
.cbx-selectInput-
|
|
14
|
-
|
|
15
|
-
min-width: 100%!important;
|
|
16
|
-
max-width: 100%!important;
|
|
133
|
+
.cbx-selectInput-container.cbx-selectInput-container-disabled .cbx-inputText-fieldset.cbx-inputText-fieldset-outlined{
|
|
134
|
+
border: 0.063rem dashed var(--gray2);
|
|
17
135
|
}
|