@cashub/ui 0.20.0 → 0.21.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.
- package/Tab/Tab.js +9 -13
- package/Tab/TabList.js +14 -32
- package/Tab/TabPanel.js +21 -58
- package/Tab/TabTab.js +20 -40
- package/Tab/index.js +2 -10
- package/Tab/subComponent/TabContext.js +2 -5
- package/animate/Collapse.js +26 -53
- package/animate/Loader.js +21 -26
- package/animate/NumberCounter.js +22 -44
- package/animate/PulseRing.js +9 -21
- package/animate/Spinner.js +2 -10
- package/animate/index.js +5 -11
- package/assets/css/autocomplete.css +16 -16
- package/assets/css/font.css +4 -4
- package/assets/css/global.css +3 -3
- package/assets/css/normalize.css +386 -386
- package/backdrop/BaseBackdrop.js +2 -9
- package/backdrop/LoadingBackdrop.js +2 -9
- package/backdrop/ModalBackdrop.js +2 -9
- package/backdrop/index.js +3 -7
- package/badge/Badge.js +2 -11
- package/badge/BadgeDot.js +2 -10
- package/badge/BadgeFill.js +15 -20
- package/badge/BadgeWithText.js +6 -13
- package/badge/index.js +4 -9
- package/billing/BarChart.js +10 -17
- package/billing/Grid.js +11 -15
- package/billing/Header2.js +6 -9
- package/billing/Header3.js +9 -16
- package/billing/Paragraph.js +8 -14
- package/billing/ParagraphGroup.js +6 -9
- package/billing/ParagraphText.js +7 -12
- package/billing/Section.js +13 -23
- package/billing/SectionBody.js +5 -8
- package/billing/SectionHeader.js +7 -12
- package/breadcrumb/Breadcrumb.js +11 -21
- package/breadcrumb/index.js +1 -3
- package/button/Button.js +41 -38
- package/button/ButtonGroup.js +21 -18
- package/button/IconButton.js +29 -29
- package/button/ScrollToTopButton.js +12 -39
- package/button/index.js +4 -9
- package/callout/Callout.js +13 -26
- package/callout/index.js +1 -3
- package/chart/BarChart.js +28 -53
- package/chart/DoughnutChart.js +23 -62
- package/chart/LineChart.js +33 -55
- package/chart/SingleBarChart.js +11 -17
- package/chart/index.js +5 -12
- package/chart/utils/customTooltip.js +26 -43
- package/chart/utils/htmlLegendPlugin.js +24 -30
- package/chart/utils/index.js +3 -7
- package/chart/utils/padEmptyChartBar.js +24 -22
- package/container/FlexContainer.js +9 -12
- package/container/index.js +1 -3
- package/cropper/Cropper.js +21 -34
- package/cropper/CropperModalHandler.js +15 -21
- package/cropper/index.js +2 -5
- package/cropper/subComponent/CropImageModal.js +23 -58
- package/datetimePicker/DatePicker.js +103 -217
- package/datetimePicker/DatePickerV2.js +116 -221
- package/datetimePicker/DatetimePicker.js +27 -48
- package/datetimePicker/DatetimePickerV2.js +115 -231
- package/datetimePicker/TimeInput.js +9 -22
- package/datetimePicker/TimePicker.js +94 -151
- package/datetimePicker/TimePickerStyle.js +14 -0
- package/datetimePicker/accordion/Month.js +70 -90
- package/datetimePicker/accordion/Year.js +91 -135
- package/datetimePicker/hooks/index.js +3 -7
- package/datetimePicker/hooks/useChangeNumber.js +14 -27
- package/datetimePicker/hooks/useDecrease.js +19 -35
- package/datetimePicker/hooks/useIncrease.js +19 -35
- package/datetimePicker/index.js +13 -13
- package/datetimePicker/provider/constant.js +2 -3
- package/datetimePicker/subComponent/Accordion.js +108 -158
- package/datetimePicker/subComponent/CustomTimeInput.js +18 -48
- package/datetimePicker/subComponent/DateTimePickerContext.js +2 -5
- package/datetimePicker/utils/GMTDate.js +3 -7
- package/datetimePicker/utils/pad.js +2 -6
- package/datetimePicker/utils/toUTC0.js +3 -6
- package/descriptionList/DescriptionDetail.js +5 -10
- package/descriptionList/DescriptionList.js +5 -10
- package/descriptionList/DescriptionTerm.js +2 -9
- package/descriptionList/index.js +3 -7
- package/divider/Divider.js +9 -12
- package/divider/index.js +1 -3
- package/dropdown/Dropdown.js +28 -65
- package/dropdown/DropdownButtonOption.js +2 -9
- package/dropdown/DropdownContent.js +33 -64
- package/dropdown/DropdownDivOption.js +2 -9
- package/dropdown/DropdownItem.js +10 -16
- package/dropdown/DropdownLinkOption.js +2 -9
- package/dropdown/DropdownToggle.js +18 -38
- package/dropdown/index.js +6 -17
- package/dropdown/subComponent/DropdownContext.js +2 -5
- package/dropzone/FileDropzone.js +148 -302
- package/dropzone/ImageDropzone.js +96 -171
- package/dropzone/index.js +2 -5
- package/dropzone/subComponent/Message.js +7 -14
- package/figure/IconFigure.js +9 -16
- package/figure/ImageFigure.js +11 -17
- package/figure/index.js +2 -5
- package/file/HiddenFileInput.js +5 -14
- package/file/index.js +1 -3
- package/form/Checkbox.js +34 -43
- package/form/FormItem.js +2 -9
- package/form/Input.js +13 -15
- package/form/Label.js +10 -13
- package/form/MutedText.js +5 -10
- package/form/RadioButton.js +20 -32
- package/form/Searchbox.js +21 -65
- package/form/Slider.js +14 -0
- package/form/SwitchButton.js +34 -39
- package/form/Textarea.js +2 -11
- package/form/index.js +9 -19
- package/grid/Column.js +17 -17
- package/grid/Grid.js +13 -14
- package/grid/index.js +2 -5
- package/heading/Heading1.js +5 -10
- package/heading/Heading2.js +9 -12
- package/heading/Heading3.js +21 -18
- package/heading/index.js +3 -7
- package/helmet/Helmet.js +6 -9
- package/helmet/index.js +2 -5
- package/iconbox/ApplicationIconBox.js +25 -31
- package/iconbox/IconBox.js +11 -24
- package/iconbox/IconBoxV2.js +14 -26
- package/iconbox/index.js +3 -7
- package/iconbox/subComponent/IconBoxFigure.js +25 -20
- package/iconbox/subComponent/IconBoxImage.js +15 -18
- package/image/ImageFluid.js +2 -10
- package/image/UploadImage.js +65 -113
- package/image/index.js +2 -5
- package/index.js +44 -130
- package/jsoneditor/JsonEditor.js +10 -32
- package/jsoneditor/index.js +1 -3
- package/keyframe/Pulse.js +2 -7
- package/keyframe/Spin.js +2 -7
- package/link/LinkSpan.js +22 -35
- package/link/index.js +1 -3
- package/map/GoogleMap.js +122 -175
- package/map/GoogleReverseGeolocation.js +79 -186
- package/map/LeafletMap.js +78 -132
- package/map/LeafletReverseGeolocation.js +49 -121
- package/map/index.js +4 -9
- package/map/subComponent/BasicLeafletMap.js +8 -14
- package/map/subComponent/GoogleMapContainer.js +5 -10
- package/map/subComponent/GoogleMapPopup.js +66 -123
- package/map/subComponent/GoogleMapWrapper.js +13 -32
- package/map/subComponent/GoogleMarkerSpiderfier.js +14 -24
- package/map/subComponent/LeafletDrawControl.js +47 -84
- package/map/subComponent/LeafletMapContainer.js +5 -10
- package/map/subComponent/MapSearchBoxControl.js +24 -70
- package/modal/StateModal.js +41 -100
- package/modal/TitleModal.js +89 -190
- package/modal/index.js +2 -5
- package/package.json +1 -1
- package/paginate/Paginate.js +40 -54
- package/paginate/index.js +1 -3
- package/popover/Popover.js +39 -87
- package/popover/index.js +1 -3
- package/qrcode/QRCode.js +10 -23
- package/qrcode/QRCodeContainter.js +8 -16
- package/qrcode/index.js +2 -5
- package/ribbon/Ribbon.js +4 -15
- package/ribbon/index.js +1 -3
- package/section/Section.js +57 -39
- package/section/SectionBody.js +15 -22
- package/section/SectionHeader.js +27 -27
- package/section/SectionToolbar.js +2 -9
- package/section/SectionToolbarItem.js +2 -9
- package/section/index.js +5 -11
- package/select/InputSelect.js +103 -215
- package/select/Select.js +204 -362
- package/select/index.js +2 -5
- package/select/subComponent/ListBox.js +9 -12
- package/select/subComponent/Option.js +8 -16
- package/select/subComponent/OptionGroup.js +2 -9
- package/select/subComponent/Options.js +5 -11
- package/select/subComponent/SearchBox.js +9 -29
- package/select/subComponent/SelectedMultiple.js +8 -16
- package/select/subComponent/SelectedSingle.js +2 -9
- package/styles/GlobalStyle.js +169 -91
- package/styles/config/breakpoint.style.js +2 -3
- package/styles/config/header.style.js +2 -3
- package/styles/config/sidebar.style.js +2 -3
- package/styles/index.js +2 -5
- package/styles/mixin/backgroundColor.js +17 -14
- package/styles/mixin/borderColor.js +17 -14
- package/styles/mixin/color.js +17 -14
- package/styles/mixin/colorOnBackground.js +17 -14
- package/styles/mixin/inputPlaceholder.js +3 -9
- package/styles/mixin/media.js +3 -11
- package/styles/mixin/rounded.js +13 -12
- package/styles/mixin/scrollbar.js +7 -13
- package/styles/theme/dark.theme.js +20 -20
- package/styles/theme/light.theme.js +20 -20
- package/styles/theme/white.theme.js +20 -20
- package/styles/themes.js +2 -8
- package/table/GridTable.js +105 -143
- package/table/ImageBox.js +8 -18
- package/table/PermissionTable.js +25 -25
- package/table/Table.js +137 -153
- package/table/__mock__/columns.js +2 -3
- package/table/__mock__/data.js +2 -3
- package/table/hooks/index.js +2 -5
- package/table/hooks/useCalculateDataRange.js +9 -36
- package/table/hooks/useGenerateSort.js +6 -17
- package/table/index.js +4 -9
- package/table/subComponent/BaseTableHeadCell.js +15 -21
- package/table/subComponent/GridTableFooter.js +5 -10
- package/table/subComponent/GridTableHeadCell.js +5 -10
- package/table/subComponent/Resizer.js +17 -44
- package/table/subComponent/TableFooter.js +5 -10
- package/table/subComponent/TableFooterInfo.js +2 -9
- package/table/subComponent/TableFooterPager.js +5 -12
- package/table/subComponent/TableHeadCell.js +2 -9
- package/table/subComponent/TableSort.js +13 -19
- package/tagify/TagifyStyle.js +14 -0
- package/tagify/Tags.js +15 -37
- package/tagify/index.js +8 -3
- package/text/Paragraph.js +25 -20
- package/text/index.js +1 -3
- package/timeline/Timeline.js +28 -37
- package/timeline/index.js +1 -3
- package/toast/CustomToastContainer.js +2 -9
- package/toast/MessageContainer.js +9 -18
- package/toast/index.js +3 -8
- package/toast/show.js +18 -28
- package/tooltip/Tooltip.js +48 -97
- package/tooltip/index.js +1 -3
- package/wizard/Wizard.js +63 -133
- package/wizard/index.js +1 -3
package/form/Checkbox.js
CHANGED
|
@@ -1,43 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
|
-
|
|
10
7
|
var _react = require("react");
|
|
11
|
-
|
|
12
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
13
|
-
|
|
14
9
|
var _Input = _interopRequireDefault(require("./Input"));
|
|
15
|
-
|
|
16
10
|
var _Label = _interopRequireDefault(require("./Label"));
|
|
17
|
-
|
|
18
11
|
var _md = require("react-icons/md");
|
|
19
|
-
|
|
20
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
-
|
|
22
13
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
23
|
-
|
|
24
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
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; }
|
|
29
|
-
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
30
17
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
18
|
+
const Checkbox = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
19
|
+
let {
|
|
20
|
+
htmlFor,
|
|
21
|
+
text,
|
|
22
|
+
disabled,
|
|
23
|
+
checked,
|
|
24
|
+
onChange,
|
|
25
|
+
noMargin,
|
|
26
|
+
fontSizeBig,
|
|
27
|
+
marginRight
|
|
28
|
+
} = _ref;
|
|
41
29
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledLabel, {
|
|
42
30
|
htmlFor: htmlFor,
|
|
43
31
|
disabled: disabled,
|
|
@@ -61,26 +49,29 @@ var Checkbox = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
61
49
|
})]
|
|
62
50
|
});
|
|
63
51
|
});
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
52
|
+
const StyledCheckbox = (0, _styledComponents.default)(_Input.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: none;\n\n &:checked + span {\n > div:last-of-type {\n display: block;\n color: var(--color-primary);\n }\n > div:first-of-type {\n display: none;\n }\n }\n"])));
|
|
53
|
+
const StyledLabel = (0, _styledComponents.default)(_Label.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: inline-block;\n cursor: pointer;\n vertical-align: middle;\n\n ", "\n\n > span {\n ", "\n display: flex;\n align-items: center;\n\n > div {\n margin-right: var(--spacing-xs);\n width: 24px;\n height: 24px;\n border-radius: 4px;\n }\n\n > div:last-of-type {\n display: none;\n }\n }\n\n ", "\n\n ", "\n"])), _ref2 => {
|
|
54
|
+
let {
|
|
55
|
+
marginRight
|
|
56
|
+
} = _ref2;
|
|
67
57
|
return marginRight && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-right: var(--spacing-l);\n "])));
|
|
68
|
-
},
|
|
69
|
-
|
|
58
|
+
}, _ref3 => {
|
|
59
|
+
let {
|
|
60
|
+
disabled
|
|
61
|
+
} = _ref3;
|
|
70
62
|
return disabled && (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n opacity: 0.5;\n cursor: not-allowed;\n "])));
|
|
71
|
-
},
|
|
72
|
-
|
|
63
|
+
}, _ref4 => {
|
|
64
|
+
let {
|
|
65
|
+
fontSizeBig
|
|
66
|
+
} = _ref4;
|
|
73
67
|
return fontSizeBig && 'font-size: var(--font-h3);';
|
|
74
|
-
},
|
|
75
|
-
|
|
68
|
+
}, _ref5 => {
|
|
69
|
+
let {
|
|
70
|
+
noMargin
|
|
71
|
+
} = _ref5;
|
|
76
72
|
return noMargin && 'margin: 0;';
|
|
77
73
|
});
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
var
|
|
82
|
-
|
|
83
|
-
var Text = _styledComponents.default.p(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n word-break: break-all;\n"])));
|
|
84
|
-
|
|
85
|
-
var _default = Checkbox;
|
|
86
|
-
exports.default = _default;
|
|
74
|
+
const Unchecked = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n flex: 0 0 auto;\n border: var(--border-width) solid var(--border-color);\n"])));
|
|
75
|
+
const Checked = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n flex: 0 0 auto;\n border: var(--border-width) solid var(--color-primary);\n background: var(--color-primary);\n position: relative;\n\n > svg {\n position: absolute;\n color: var(--font-on-primary);\n font-size: var(--font-h3);\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n"])));
|
|
76
|
+
const Text = _styledComponents.default.p(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n word-break: break-all;\n"])));
|
|
77
|
+
var _default = exports.default = Checkbox;
|
package/form/FormItem.js
CHANGED
|
@@ -4,16 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
|
|
10
8
|
var _templateObject;
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
var _default = FormItem;
|
|
19
|
-
exports.default = _default;
|
|
11
|
+
const FormItem = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-bottom: var(--spacing);\n"])));
|
|
12
|
+
var _default = exports.default = FormItem;
|
package/form/Input.js
CHANGED
|
@@ -4,27 +4,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
|
|
10
8
|
var _inputPlaceholder = _interopRequireDefault(require("../styles/mixin/inputPlaceholder"));
|
|
11
|
-
|
|
12
9
|
var _templateObject, _templateObject2;
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
11
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
const Input = _styledComponents.default.input(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n width: 100%;\n height: 36px;\n border: var(--border-width) solid var(--border-color);\n padding: 10px var(--spacing-s);\n border-radius: var(--border-radius-l);\n background: transparent;\n color: var(--font-on-background);\n transition: 0.3s;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n &:focus {\n border: var(--border-width) solid var(--color-primary);\n outline: none;\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), (0, _inputPlaceholder.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: var(--font-on-mute);\n "]))), _ref => {
|
|
13
|
+
let {
|
|
14
|
+
hidden
|
|
15
|
+
} = _ref;
|
|
20
16
|
return hidden && 'display: none;';
|
|
21
|
-
},
|
|
22
|
-
|
|
17
|
+
}, _ref2 => {
|
|
18
|
+
let {
|
|
19
|
+
borderRadiusS
|
|
20
|
+
} = _ref2;
|
|
23
21
|
return borderRadiusS && 'border-radius: var(--border-radius-s);';
|
|
24
|
-
},
|
|
25
|
-
|
|
22
|
+
}, _ref3 => {
|
|
23
|
+
let {
|
|
24
|
+
alignCenter
|
|
25
|
+
} = _ref3;
|
|
26
26
|
return alignCenter && 'text-align: center;';
|
|
27
27
|
});
|
|
28
|
-
|
|
29
|
-
var _default = Input;
|
|
30
|
-
exports.default = _default;
|
|
28
|
+
var _default = exports.default = Input;
|
package/form/Label.js
CHANGED
|
@@ -4,22 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
|
|
10
8
|
var _templateObject;
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
const Label = _styledComponents.default.label(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-block;\n color: var(--font-on-background);\n font-size: var(--font-body1);\n margin-bottom: var(--spacing-xs);\n\n ", "\n\n ", "\n"])), _ref => {
|
|
12
|
+
let {
|
|
13
|
+
required
|
|
14
|
+
} = _ref;
|
|
18
15
|
return required && "&:after {\n content: ' *';\n color: var(--color-danger);\n }\n ";
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
}, _ref2 => {
|
|
17
|
+
let {
|
|
18
|
+
noMarginBottom
|
|
19
|
+
} = _ref2;
|
|
20
|
+
return noMarginBottom && 'margin-bottom: 0;';
|
|
22
21
|
});
|
|
23
|
-
|
|
24
|
-
var _default = Label;
|
|
25
|
-
exports.default = _default;
|
|
22
|
+
var _default = exports.default = Label;
|
package/form/MutedText.js
CHANGED
|
@@ -4,19 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
|
|
10
8
|
var _templateObject;
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
const MutedText = _styledComponents.default.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n font-size: var(--font-caption);\n color: var(--font-on-mute);\n text-align: ", ";\n margin-top: var(--spacing-xs);\n"])), _ref => {
|
|
12
|
+
let {
|
|
13
|
+
alignRight
|
|
14
|
+
} = _ref;
|
|
18
15
|
return alignRight ? 'right' : 'left';
|
|
19
16
|
});
|
|
20
|
-
|
|
21
|
-
var _default = MutedText;
|
|
22
|
-
exports.default = _default;
|
|
17
|
+
var _default = exports.default = MutedText;
|
package/form/RadioButton.js
CHANGED
|
@@ -1,43 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
|
-
|
|
10
7
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
11
|
-
|
|
12
8
|
var _Input = _interopRequireDefault(require("./Input"));
|
|
13
|
-
|
|
14
9
|
var _Label = _interopRequireDefault(require("./Label"));
|
|
15
|
-
|
|
16
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
|
|
18
11
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
19
|
-
|
|
20
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
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; }
|
|
25
|
-
|
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
15
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
16
|
+
const RadioButton = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
htmlFor,
|
|
19
|
+
value,
|
|
20
|
+
text,
|
|
21
|
+
disabled,
|
|
22
|
+
checked,
|
|
23
|
+
onChange
|
|
24
|
+
} = _ref;
|
|
35
25
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledLabel, {
|
|
36
26
|
htmlFor: htmlFor,
|
|
37
27
|
disabled: disabled,
|
|
38
28
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(StyledCheckbox, {
|
|
39
|
-
onChange:
|
|
40
|
-
|
|
29
|
+
onChange: () => {
|
|
30
|
+
onChange(value);
|
|
41
31
|
},
|
|
42
32
|
checked: checked,
|
|
43
33
|
type: "checkbox",
|
|
@@ -48,14 +38,12 @@ var RadioButton = function RadioButton(_ref) {
|
|
|
48
38
|
})]
|
|
49
39
|
});
|
|
50
40
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
41
|
+
const StyledCheckbox = (0, _styledComponents.default)(_Input.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: none;\n\n &:checked + span {\n > div {\n &:before {\n display: block;\n }\n }\n }\n"])));
|
|
42
|
+
const StyledLabel = (0, _styledComponents.default)(_Label.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-right: var(--spacing-xs);\n\n > span {\n ", "\n display: flex;\n align-items: center;\n\n > div {\n margin-right: var(--spacing-xs);\n border-radius: var(--border-radius-round);\n\n width: 24px;\n height: 24px;\n\n &:before {\n display: none;\n }\n }\n }\n"])), _ref2 => {
|
|
43
|
+
let {
|
|
44
|
+
disabled
|
|
45
|
+
} = _ref2;
|
|
55
46
|
return disabled && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n opacity: 0.5;\n "])));
|
|
56
47
|
});
|
|
57
|
-
|
|
58
|
-
var
|
|
59
|
-
|
|
60
|
-
var _default = RadioButton;
|
|
61
|
-
exports.default = _default;
|
|
48
|
+
const Unchecked = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border: var(--border-width) solid var(--border-color);\n position: relative;\n\n &:before {\n content: '';\n background: var(--color-primary);\n width: 16px;\n height: 16px;\n position: absolute;\n border-radius: var(--border-radius-round);\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n"])));
|
|
49
|
+
var _default = exports.default = RadioButton;
|
package/form/Searchbox.js
CHANGED
|
@@ -4,78 +4,38 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("react");
|
|
9
|
-
|
|
10
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
-
|
|
12
9
|
var _fa = require("react-icons/fa");
|
|
13
|
-
|
|
14
10
|
var _md = require("react-icons/md");
|
|
15
|
-
|
|
16
11
|
var _inputPlaceholder = _interopRequireDefault(require("../styles/mixin/inputPlaceholder"));
|
|
17
|
-
|
|
18
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
|
|
20
13
|
var _templateObject, _templateObject2, _templateObject3;
|
|
21
|
-
|
|
22
|
-
var _excluded = ["onSearch", "autoFocus"];
|
|
23
|
-
|
|
24
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
15
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
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."); }
|
|
37
|
-
|
|
38
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
39
|
-
|
|
40
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
41
|
-
|
|
42
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
43
|
-
|
|
44
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
45
|
-
|
|
46
|
-
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; }
|
|
47
|
-
|
|
48
|
-
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; }
|
|
49
|
-
|
|
50
|
-
var Searchbox = function Searchbox(_ref) {
|
|
51
|
-
var onSearch = _ref.onSearch,
|
|
52
|
-
_ref$autoFocus = _ref.autoFocus,
|
|
53
|
-
autoFocus = _ref$autoFocus === void 0 ? false : _ref$autoFocus,
|
|
54
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
55
|
-
|
|
56
|
-
var _useState = (0, _react.useState)(''),
|
|
57
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
58
|
-
keyword = _useState2[0],
|
|
59
|
-
setKeyword = _useState2[1];
|
|
60
|
-
|
|
61
|
-
var handleSearch = function handleSearch(keyword) {
|
|
16
|
+
const Searchbox = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
onSearch,
|
|
19
|
+
autoFocus = false,
|
|
20
|
+
...props
|
|
21
|
+
} = _ref;
|
|
22
|
+
const [keyword, setKeyword] = (0, _react.useState)('');
|
|
23
|
+
const handleSearch = keyword => {
|
|
62
24
|
if (onSearch) onSearch(keyword);
|
|
63
25
|
};
|
|
64
|
-
|
|
65
|
-
var handleKeyup = function handleKeyup(event) {
|
|
26
|
+
const handleKeyup = event => {
|
|
66
27
|
if (event.keyCode === 108 || event.keyCode === 13) {
|
|
67
28
|
handleSearch(keyword);
|
|
68
29
|
}
|
|
69
30
|
};
|
|
70
|
-
|
|
71
|
-
var handleClear = function handleClear() {
|
|
31
|
+
const handleClear = () => {
|
|
72
32
|
setKeyword('');
|
|
73
33
|
handleSearch('');
|
|
74
34
|
};
|
|
75
|
-
|
|
76
|
-
|
|
35
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Wrapper, {
|
|
36
|
+
...props,
|
|
77
37
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_fa.FaSearch, {
|
|
78
|
-
onClick:
|
|
38
|
+
onClick: () => {
|
|
79
39
|
handleSearch(keyword);
|
|
80
40
|
},
|
|
81
41
|
role: "button",
|
|
@@ -85,9 +45,7 @@ var Searchbox = function Searchbox(_ref) {
|
|
|
85
45
|
placeholder: "Search",
|
|
86
46
|
autocomplete: "false",
|
|
87
47
|
value: keyword,
|
|
88
|
-
onChange:
|
|
89
|
-
return setKeyword(event.target.value);
|
|
90
|
-
},
|
|
48
|
+
onChange: event => setKeyword(event.target.value),
|
|
91
49
|
onKeyUp: handleKeyup,
|
|
92
50
|
autoFocus: autoFocus
|
|
93
51
|
}), keyword && /*#__PURE__*/(0, _jsxRuntime.jsx)(_md.MdClose, {
|
|
@@ -95,15 +53,13 @@ var Searchbox = function Searchbox(_ref) {
|
|
|
95
53
|
role: "button",
|
|
96
54
|
"aria-label": "clear button"
|
|
97
55
|
})]
|
|
98
|
-
})
|
|
56
|
+
});
|
|
99
57
|
};
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
58
|
+
const Wrapper = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n position: relative;\n height: 36px;\n background: var(--color-background1);\n border-radius: var(--border-radius-l);\n padding: 0 calc(var(--spacing-s) + var(--font-body1) + var(--spacing-xs)) 0\n var(--spacing-s);\n\n > svg {\n font-size: var(--font-body1);\n color: var(--font-on-mute);\n\n &:first-child {\n margin-right: var(--spacing-xs);\n }\n\n &:last-child {\n position: absolute;\n right: var(--spacing-s);\n }\n }\n\n ", "\n"])), _ref2 => {
|
|
59
|
+
let {
|
|
60
|
+
border
|
|
61
|
+
} = _ref2;
|
|
103
62
|
return border && 'border: var(--border-width) solid var(--border-color);';
|
|
104
63
|
});
|
|
105
|
-
|
|
106
|
-
var
|
|
107
|
-
|
|
108
|
-
var _default = Searchbox;
|
|
109
|
-
exports.default = _default;
|
|
64
|
+
const Input = _styledComponents.default.input(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: transparent;\n border: none;\n font-size: var(--font-body1);\n color: var(--font-on-background);\n outline: none;\n\n ", "\n"])), (0, _inputPlaceholder.default)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: var(--font-on-mute);\n "]))));
|
|
65
|
+
var _default = exports.default = Searchbox;
|
package/form/Slider.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
const Slider = props => {
|
|
9
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
10
|
+
type: "range",
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
var _default = exports.default = Slider;
|
package/form/SwitchButton.js
CHANGED
|
@@ -1,37 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
|
-
|
|
10
7
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
11
|
-
|
|
12
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
|
|
14
9
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
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; }
|
|
19
|
-
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
const SwitchButton = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
htmlFor,
|
|
16
|
+
text,
|
|
17
|
+
disabled,
|
|
18
|
+
checked = false,
|
|
19
|
+
onChange
|
|
20
|
+
} = _ref;
|
|
29
21
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Label, {
|
|
30
22
|
htmlFor: htmlFor,
|
|
31
23
|
disabled: disabled,
|
|
32
24
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Checkbox, {
|
|
33
|
-
onChange:
|
|
34
|
-
|
|
25
|
+
onChange: () => {
|
|
26
|
+
onChange(checked ? 0 : 1);
|
|
35
27
|
},
|
|
36
28
|
checked: checked,
|
|
37
29
|
type: "checkbox",
|
|
@@ -46,31 +38,34 @@ var SwitchButton = function SwitchButton(_ref) {
|
|
|
46
38
|
})]
|
|
47
39
|
});
|
|
48
40
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
41
|
+
const Label = _styledComponents.default.label(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-block;\n\n ", "\n"])), _ref2 => {
|
|
42
|
+
let {
|
|
43
|
+
disabled
|
|
44
|
+
} = _ref2;
|
|
52
45
|
return disabled && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n opacity: 0.5;\n cursor: not-allowed;\n "])));
|
|
53
46
|
});
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
47
|
+
const Checkbox = _styledComponents.default.input(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: none;\n"])));
|
|
48
|
+
const Switch = _styledComponents.default.span(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: var(--font-on-background);\n display: flex;\n align-items: center;\n position: relative;\n\n ", "\n"])), _ref3 => {
|
|
49
|
+
let {
|
|
50
|
+
disabled
|
|
51
|
+
} = _ref3;
|
|
59
52
|
return disabled && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n opacity: 0.5;\n "])));
|
|
60
53
|
});
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
54
|
+
const SwitchTrack = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: relative;\n width: 32px;\n height: 16px;\n border-radius: var(--border-radius);\n background: ", ";\n opacity: 0.5;\n margin-right: calc(var(--spacing-xs) + 12px);\n left: ", ";\n"])), _ref4 => {
|
|
55
|
+
let {
|
|
56
|
+
checked
|
|
57
|
+
} = _ref4;
|
|
64
58
|
return !checked ? 'var(--color-grey)' : 'var(--color-primary)';
|
|
65
|
-
},
|
|
66
|
-
|
|
59
|
+
}, _ref5 => {
|
|
60
|
+
let {
|
|
61
|
+
checked
|
|
62
|
+
} = _ref5;
|
|
67
63
|
return checked ? '0' : '12px';
|
|
68
64
|
});
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
const SwitchThumb = _styledComponents.default.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: 24px;\n height: 24px;\n background: var(--color-grey);\n border-radius: var(--border-radius-round);\n position: absolute;\n transition: 0.3s;\n\n ", "\n"])), _ref6 => {
|
|
66
|
+
let {
|
|
67
|
+
checked
|
|
68
|
+
} = _ref6;
|
|
72
69
|
return !checked ? 'left: 0;' : 'left: 20px; background: var(--color-primary);';
|
|
73
70
|
});
|
|
74
|
-
|
|
75
|
-
var _default = SwitchButton;
|
|
76
|
-
exports.default = _default;
|
|
71
|
+
var _default = exports.default = SwitchButton;
|
package/form/Textarea.js
CHANGED
|
@@ -4,20 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
|
|
10
8
|
var _inputPlaceholder = _interopRequireDefault(require("../styles/mixin/inputPlaceholder"));
|
|
11
|
-
|
|
12
9
|
var _scrollbar = _interopRequireDefault(require("../styles/mixin/scrollbar"));
|
|
13
|
-
|
|
14
10
|
var _templateObject, _templateObject2;
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
var _default = Textarea;
|
|
23
|
-
exports.default = _default;
|
|
13
|
+
const Textarea = _styledComponents.default.textarea(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n width: 100%;\n border: var(--border-width) solid var(--border-color);\n padding: 10px var(--spacing-s);\n border-radius: var(--border-radius);\n background: transparent;\n color: var(--font-on-background);\n transition: 0.3s;\n line-height: 1.5;\n\n /* disable resize because currently cannot fully control the resizer element */\n resize: none;\n\n ", "\n\n &:focus {\n border: var(--border-width) solid var(--color-primary);\n outline: none;\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n ", "\n"])), _scrollbar.default, (0, _inputPlaceholder.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: var(--font-on-mute);\n "]))));
|
|
14
|
+
var _default = exports.default = Textarea;
|