@cashub/ui 0.47.0 → 0.48.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/TabList.js +38 -26
- package/Tab/TabPanel.js +13 -20
- package/Tab/TabTab.js +36 -24
- package/Tab/index.js +15 -1
- package/Tab/subComponent/TabListV2.js +25 -0
- package/Tab/subComponent/TabPanelV2.js +52 -0
- package/Tab/subComponent/TabTabV2.js +63 -0
- package/VerticalTab/TabList.js +13 -18
- package/VerticalTab/TabPanel.js +16 -20
- package/VerticalTab/TabTab.js +40 -21
- package/VerticalTab/VerticalTab.js +8 -4
- package/alert/Alert.js +12 -5
- package/animate/Collapse.js +5 -7
- package/animate/Loader.js +18 -7
- package/animate/PulseRing.js +18 -5
- package/animate/Spinner.js +8 -3
- package/backdrop/BaseBackdrop.js +9 -3
- package/backdrop/LoadingBackdrop.js +7 -3
- package/backdrop/ModalBackdrop.js +5 -3
- package/badge/Badge.js +15 -3
- package/badge/BadgeDot.js +8 -3
- package/badge/BadgeFill.js +24 -6
- package/badge/BadgeWithText.js +13 -3
- package/billing/BarChart.js +1 -1
- package/breadcrumb/Breadcrumb.js +42 -3
- package/button/Button.js +88 -20
- package/button/ButtonGroup.js +33 -9
- package/button/IconButton.js +37 -10
- package/button/ScrollToTopButton.js +12 -4
- package/callout/Callout.js +37 -8
- package/chart/BarChart.js +10 -17
- package/chart/DoughnutChart.js +34 -20
- package/chart/LineChart.js +11 -18
- package/chart/SingleBarChart.js +22 -5
- package/chart/utils/centerTextPlugin.js +2 -2
- package/chart/utils/customTooltip.js +7 -7
- package/chart/utils/htmlLegendPlugin.js +1 -1
- package/container/FlexContainer.js +15 -7
- package/cropper/Cropper.js +1 -2
- package/datetimePicker/DatePicker.js +80 -26
- package/datetimePicker/DatePickerV2.js +95 -36
- package/datetimePicker/DatetimePicker.js +174 -11
- package/datetimePicker/DatetimePickerV2.js +87 -33
- package/datetimePicker/DatetimePickerV3.js +174 -11
- package/datetimePicker/TimeInput.js +35 -10
- package/datetimePicker/TimePicker.js +77 -22
- package/datetimePicker/TimePickerStyle.js +53 -3
- package/datetimePicker/TimePickerV2.js +54 -21
- package/datetimePicker/accordion/Month.js +93 -16
- package/datetimePicker/accordion/Year.js +96 -18
- package/datetimePicker/hooks/useChangeNumber.js +3 -6
- package/datetimePicker/hooks/useDecrease.js +3 -6
- package/datetimePicker/hooks/useIncrease.js +3 -6
- package/datetimePicker/subComponent/Accordion.js +101 -20
- package/descriptionList/DescriptionDetail.js +15 -4
- package/descriptionList/DescriptionList.js +12 -4
- package/descriptionList/DescriptionTerm.js +5 -3
- package/divider/Divider.js +15 -6
- package/dropdown/DropdownButtonOption.js +22 -6
- package/dropdown/DropdownContent.js +29 -15
- package/dropdown/DropdownDivOption.js +17 -3
- package/dropdown/DropdownLinkOption.js +14 -3
- package/dropdown/DropdownToggle.js +7 -15
- package/dropzone/FileDropzone.js +121 -22
- package/dropzone/ImageDropzone.js +83 -14
- package/dropzone/subComponent/Message.js +11 -4
- package/figure/IconFigure.js +16 -7
- package/figure/ImageFigure.js +19 -6
- package/file/HiddenFileInput.js +3 -3
- package/form/Checkbox.js +74 -13
- package/form/Fieldset.js +9 -3
- package/form/FormItem.js +10 -5
- package/form/Input.js +40 -7
- package/form/Label.js +34 -10
- package/form/MutedText.js +8 -4
- package/form/PasswordInput.js +20 -13
- package/form/RadioButton.js +55 -8
- package/form/SearchSelect.js +64 -12
- package/form/Searchbox.js +45 -19
- package/form/Slider.js +28 -10
- package/form/SwitchButton.js +48 -14
- package/form/Textarea.js +30 -3
- package/form/TreeView.js +13 -6
- package/grid/Column.js +23 -10
- package/grid/Grid.js +14 -6
- package/heading/Heading1.js +8 -4
- package/heading/Heading2.js +11 -5
- package/heading/Heading3.js +20 -8
- package/iconbox/ApplicationIconBox.js +48 -12
- package/iconbox/IconBox.js +31 -7
- package/iconbox/IconBoxV2.js +33 -8
- package/iconbox/subComponent/IconBoxFigure.js +17 -9
- package/iconbox/subComponent/IconBoxImage.js +21 -8
- package/image/ImageFluid.js +7 -3
- package/image/UploadImage.js +66 -18
- package/index.js +8 -1
- package/jsoneditor/JsonEditor.js +121 -15
- package/keyframe/Pulse.js +13 -3
- package/keyframe/Spin.js +5 -3
- package/layout/Aside.js +30 -5
- package/layout/Backdrop.js +8 -4
- package/layout/Container.js +21 -5
- package/layout/Footer.js +26 -7
- package/link/LinkSpan.js +37 -19
- package/map/GoogleMap.js +3 -7
- package/map/GoogleReverseGeolocation.js +6 -3
- package/map/LeafletMap.js +2 -2
- package/map/subComponent/GoogleMapContainer.js +16 -4
- package/map/subComponent/GoogleMapPopup.js +7 -10
- package/map/subComponent/GoogleMapWrapper.js +8 -15
- package/map/subComponent/LeafletDrawControl.js +9 -7
- package/map/subComponent/LeafletMapContainer.js +159 -4
- package/modal/StateModal.js +49 -28
- package/modal/TitleModal.js +70 -29
- package/package.json +1 -1
- package/page/Disclaimer.js +119 -3
- package/paginate/Paginate.js +54 -12
- package/popover/Popover.js +30 -25
- package/qrcode/QRCode.js +20 -6
- package/qrcode/QRCodeContainter.js +12 -4
- package/ribbon/Ribbon.js +29 -4
- package/section/Section.js +68 -20
- package/section/SectionBody.js +29 -8
- package/section/SectionHeader.js +36 -11
- package/section/SectionToolbar.js +9 -3
- package/section/SectionToolbarItem.js +8 -3
- package/select/InputSelect.js +16 -23
- package/select/Select.js +112 -43
- package/select/subComponent/Checkbox.js +24 -5
- package/select/subComponent/Footer.js +4 -3
- package/select/subComponent/ListBox.js +12 -5
- package/select/subComponent/Option.js +27 -7
- package/select/subComponent/OptionGroup.js +13 -3
- package/select/subComponent/Options.js +18 -5
- package/select/subComponent/SearchBox.js +34 -12
- package/select/subComponent/SelectedMultipleTags.js +21 -3
- package/select/subComponent/SelectedMultipleText.js +20 -4
- package/select/subComponent/SelectedSingle.js +7 -3
- package/styles/GlobalStyle.js +156 -45
- package/styles/mixin/backgroundColor.js +16 -8
- package/styles/mixin/borderColor.js +13 -7
- package/styles/mixin/color.js +13 -7
- package/styles/mixin/colorOnBackground.js +13 -7
- package/styles/mixin/inputPlaceholder.js +20 -3
- package/styles/mixin/media.js +5 -3
- package/styles/mixin/rounded.js +10 -6
- package/styles/mixin/scrollbar.js +13 -3
- package/styles/theme/dark.theme.js +15 -14
- package/styles/theme/light.theme.js +15 -14
- package/styles/theme/white.theme.js +15 -14
- package/table/GridTable.js +71 -33
- package/table/ImageBox.js +15 -5
- package/table/InfiniteGridTable.js +92 -46
- package/table/PermissionTable.js +32 -10
- package/table/SimpleGridTable.js +143 -0
- package/table/Table.js +198 -48
- package/table/__mock__/columns.js +1 -1
- package/table/index.js +7 -0
- package/table/subComponent/BaseTableHeadCell.js +37 -8
- package/table/subComponent/GridTableFooter.js +10 -4
- package/table/subComponent/GridTableHeadCell.js +6 -4
- package/table/subComponent/Resizer.js +19 -4
- package/table/subComponent/TableFooter.js +15 -6
- package/table/subComponent/TableFooterInfo.js +4 -3
- package/table/subComponent/TableFooterPager.js +19 -6
- package/table/subComponent/TableHeadCell.js +9 -3
- package/table/subComponent/TableSort.js +17 -7
- package/tagify/TagifyStyle.js +49 -3
- package/tagify/Tags.js +37 -21
- package/tagify/templates/getCreateButtonTemplate.js +5 -2
- package/text/Paragraph.js +50 -12
- package/timeline/Timeline.js +94 -17
- package/toast/CustomToastContainer.js +35 -3
- package/toast/MessageContainer.js +22 -4
- package/tooltip/Tooltip.js +47 -19
- package/treeView/TreeViewV2.js +1 -1
- package/treeView/TreeflexStyle.js +38 -3
- package/wizard/Wizard.js +115 -6
package/form/Input.js
CHANGED
|
@@ -6,28 +6,61 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
var _inputPlaceholder = _interopRequireDefault(require("../styles/mixin/inputPlaceholder"));
|
|
9
|
-
var _templateObject, _templateObject2;
|
|
10
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const Input = _styledComponents.default.input`
|
|
11
|
+
display: block;
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 36px;
|
|
14
|
+
border: var(--border-width) solid var(--border-color);
|
|
15
|
+
padding: 10px var(--spacing-s);
|
|
16
|
+
border-radius: var(--border-radius-l);
|
|
17
|
+
background: transparent;
|
|
18
|
+
color: var(--font-on-background);
|
|
19
|
+
transition: 0.3s;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
white-space: nowrap;
|
|
22
|
+
text-overflow: ellipsis;
|
|
23
|
+
|
|
24
|
+
&:focus {
|
|
25
|
+
border: var(--border-width) solid var(--color-primary);
|
|
26
|
+
outline: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&:disabled {
|
|
30
|
+
cursor: not-allowed;
|
|
31
|
+
opacity: 0.5;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
${(0, _inputPlaceholder.default)`
|
|
35
|
+
color: var(--font-on-mute);
|
|
36
|
+
`}
|
|
37
|
+
|
|
38
|
+
${_ref => {
|
|
13
39
|
let {
|
|
14
40
|
hidden
|
|
15
41
|
} = _ref;
|
|
16
42
|
return hidden && 'display: none;';
|
|
17
|
-
}
|
|
43
|
+
}}
|
|
44
|
+
|
|
45
|
+
${_ref2 => {
|
|
18
46
|
let {
|
|
19
47
|
borderRadiusS
|
|
20
48
|
} = _ref2;
|
|
21
49
|
return borderRadiusS && 'border-radius: var(--border-radius-s);';
|
|
22
|
-
}
|
|
50
|
+
}}
|
|
51
|
+
|
|
52
|
+
${_ref3 => {
|
|
23
53
|
let {
|
|
24
54
|
alignCenter
|
|
25
55
|
} = _ref3;
|
|
26
56
|
return alignCenter && 'text-align: center;';
|
|
27
|
-
}
|
|
57
|
+
}}
|
|
58
|
+
|
|
59
|
+
${_ref4 => {
|
|
28
60
|
let {
|
|
29
61
|
autoWidth
|
|
30
62
|
} = _ref4;
|
|
31
63
|
return autoWidth && 'width: auto;';
|
|
32
|
-
}
|
|
64
|
+
}};
|
|
65
|
+
`;
|
|
33
66
|
var _default = exports.default = Input;
|
package/form/Label.js
CHANGED
|
@@ -5,33 +5,57 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
-
var _templateObject;
|
|
9
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const Label = _styledComponents.default.label`
|
|
10
|
+
display: inline-block;
|
|
11
|
+
color: var(--font-on-background);
|
|
12
|
+
font-size: var(--font-body1);
|
|
13
|
+
word-break: break-word;
|
|
14
|
+
white-space: pre-wrap;
|
|
15
|
+
margin-bottom: var(--spacing-xs);
|
|
16
|
+
|
|
17
|
+
${_ref => {
|
|
12
18
|
let {
|
|
13
19
|
required
|
|
14
20
|
} = _ref;
|
|
15
|
-
return required &&
|
|
16
|
-
|
|
21
|
+
return required && `&:after {
|
|
22
|
+
content: ' *';
|
|
23
|
+
color: var(--color-danger);
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
}}
|
|
27
|
+
|
|
28
|
+
${_ref2 => {
|
|
17
29
|
let {
|
|
18
30
|
noMarginBottom
|
|
19
31
|
} = _ref2;
|
|
20
32
|
return noMarginBottom && 'margin-bottom: 0;';
|
|
21
|
-
}
|
|
33
|
+
}}
|
|
34
|
+
|
|
35
|
+
${_ref3 => {
|
|
22
36
|
let {
|
|
23
37
|
noBreakWord
|
|
24
38
|
} = _ref3;
|
|
25
39
|
return noBreakWord && 'word-break: keep-all;';
|
|
26
|
-
}
|
|
40
|
+
}}
|
|
41
|
+
|
|
42
|
+
/* use float to make element align to right */
|
|
43
|
+
/* use text-align to make all text(multiple line) align to right */
|
|
44
|
+
${_ref4 => {
|
|
27
45
|
let {
|
|
28
46
|
alignRight
|
|
29
47
|
} = _ref4;
|
|
30
|
-
return alignRight &&
|
|
31
|
-
|
|
48
|
+
return alignRight && `
|
|
49
|
+
text-align: right;
|
|
50
|
+
float: right;
|
|
51
|
+
`;
|
|
52
|
+
}}
|
|
53
|
+
|
|
54
|
+
${_ref5 => {
|
|
32
55
|
let {
|
|
33
56
|
disabled
|
|
34
57
|
} = _ref5;
|
|
35
58
|
return disabled && 'opacity: 0.5;';
|
|
36
|
-
}
|
|
59
|
+
}}
|
|
60
|
+
`;
|
|
37
61
|
var _default = exports.default = Label;
|
package/form/MutedText.js
CHANGED
|
@@ -5,13 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
-
var _templateObject;
|
|
9
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const MutedText = _styledComponents.default.span`
|
|
10
|
+
display: block;
|
|
11
|
+
font-size: var(--font-caption);
|
|
12
|
+
color: var(--font-on-mute);
|
|
13
|
+
text-align: ${_ref => {
|
|
12
14
|
let {
|
|
13
15
|
alignRight
|
|
14
16
|
} = _ref;
|
|
15
17
|
return alignRight ? 'right' : 'left';
|
|
16
|
-
}
|
|
18
|
+
}};
|
|
19
|
+
margin-top: var(--spacing-xs);
|
|
20
|
+
`;
|
|
17
21
|
var _default = exports.default = MutedText;
|
package/form/PasswordInput.js
CHANGED
|
@@ -10,31 +10,38 @@ var _Input = _interopRequireDefault(require("./Input"));
|
|
|
10
10
|
var _button = require("../button");
|
|
11
11
|
var _bi = require("react-icons/bi");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
var _templateObject;
|
|
14
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
16
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
19
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
20
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
21
|
-
function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
|
|
22
|
-
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); }
|
|
23
14
|
const PasswordInput = _ref => {
|
|
24
|
-
let
|
|
15
|
+
let {
|
|
16
|
+
...props
|
|
17
|
+
} = _ref;
|
|
25
18
|
const [type, setType] = (0, _react.useState)('password');
|
|
26
19
|
const toggleType = () => {
|
|
27
20
|
setType(type === 'password' ? 'text' : 'password');
|
|
28
21
|
};
|
|
29
22
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Container, {
|
|
30
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.default,
|
|
23
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.default, {
|
|
24
|
+
...props,
|
|
31
25
|
type: type
|
|
32
|
-
})
|
|
26
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_button.IconButton, {
|
|
33
27
|
size: "small",
|
|
34
28
|
onClick: toggleType,
|
|
35
29
|
children: [type === 'password' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_bi.BiHide, {}), type === 'text' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_bi.BiShow, {})]
|
|
36
30
|
})]
|
|
37
31
|
});
|
|
38
32
|
};
|
|
39
|
-
const Container = _styledComponents.default.div
|
|
33
|
+
const Container = _styledComponents.default.div`
|
|
34
|
+
position: relative;
|
|
35
|
+
|
|
36
|
+
${_Input.default} {
|
|
37
|
+
padding-right: 40px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
${_button.IconButton} {
|
|
41
|
+
position: absolute;
|
|
42
|
+
top: 50%;
|
|
43
|
+
transform: translateY(-50%);
|
|
44
|
+
right: 0.5rem;
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
40
47
|
var _default = exports.default = PasswordInput;
|
package/form/RadioButton.js
CHANGED
|
@@ -8,11 +8,9 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
8
8
|
var _Input = _interopRequireDefault(require("./Input"));
|
|
9
9
|
var _Label = _interopRequireDefault(require("./Label"));
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
12
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
12
|
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
13
|
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 && {}.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; }
|
|
15
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
16
14
|
const RadioButton = _ref => {
|
|
17
15
|
let {
|
|
18
16
|
htmlFor,
|
|
@@ -40,17 +38,66 @@ const RadioButton = _ref => {
|
|
|
40
38
|
})]
|
|
41
39
|
});
|
|
42
40
|
};
|
|
43
|
-
const StyledCheckbox = (0, _styledComponents.default)(_Input.default)
|
|
44
|
-
|
|
41
|
+
const StyledCheckbox = (0, _styledComponents.default)(_Input.default)`
|
|
42
|
+
display: none;
|
|
43
|
+
|
|
44
|
+
&:checked + span {
|
|
45
|
+
> div {
|
|
46
|
+
&:before {
|
|
47
|
+
display: block;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
52
|
+
const StyledLabel = (0, _styledComponents.default)(_Label.default)`
|
|
53
|
+
margin-right: var(--spacing-xs);
|
|
54
|
+
|
|
55
|
+
> span {
|
|
56
|
+
${_ref2 => {
|
|
45
57
|
let {
|
|
46
58
|
disabled
|
|
47
59
|
} = _ref2;
|
|
48
|
-
return disabled && (0, _styledComponents.css)
|
|
49
|
-
|
|
60
|
+
return disabled && (0, _styledComponents.css)`
|
|
61
|
+
opacity: 0.5;
|
|
62
|
+
`;
|
|
63
|
+
}}
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
|
|
67
|
+
> div {
|
|
68
|
+
margin-right: var(--spacing-xs);
|
|
69
|
+
border-radius: var(--border-radius-round);
|
|
70
|
+
|
|
71
|
+
width: 24px;
|
|
72
|
+
height: 24px;
|
|
73
|
+
|
|
74
|
+
&:before {
|
|
75
|
+
display: none;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
${_ref3 => {
|
|
50
81
|
let {
|
|
51
82
|
noMarginBottom
|
|
52
83
|
} = _ref3;
|
|
53
84
|
return noMarginBottom && 'margin-bottom: 0;';
|
|
54
|
-
}
|
|
55
|
-
|
|
85
|
+
}}
|
|
86
|
+
`;
|
|
87
|
+
const Unchecked = _styledComponents.default.div`
|
|
88
|
+
border: var(--border-width) solid var(--border-color);
|
|
89
|
+
position: relative;
|
|
90
|
+
|
|
91
|
+
&:before {
|
|
92
|
+
content: '';
|
|
93
|
+
background: var(--color-primary);
|
|
94
|
+
width: 16px;
|
|
95
|
+
height: 16px;
|
|
96
|
+
position: absolute;
|
|
97
|
+
border-radius: var(--border-radius-round);
|
|
98
|
+
top: 50%;
|
|
99
|
+
left: 50%;
|
|
100
|
+
transform: translate(-50%, -50%);
|
|
101
|
+
}
|
|
102
|
+
`;
|
|
56
103
|
var _default = exports.default = RadioButton;
|
package/form/SearchSelect.js
CHANGED
|
@@ -12,9 +12,7 @@ var _md = require("react-icons/md");
|
|
|
12
12
|
var _inputPlaceholder = _interopRequireDefault(require("../styles/mixin/inputPlaceholder"));
|
|
13
13
|
var _scrollbar = _interopRequireDefault(require("../styles/mixin/scrollbar"));
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
16
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
18
16
|
const SearchSelect = _ref => {
|
|
19
17
|
let {
|
|
20
18
|
keyword,
|
|
@@ -46,8 +44,7 @@ const SearchSelect = _ref => {
|
|
|
46
44
|
(0, _react.useEffect)(() => {
|
|
47
45
|
if (!containerRef.current || !showDropdown) return;
|
|
48
46
|
const handleClick = event => {
|
|
49
|
-
|
|
50
|
-
if (!((_containerRef$current = containerRef.current) !== null && _containerRef$current !== void 0 && _containerRef$current.contains(event.target))) {
|
|
47
|
+
if (!containerRef.current?.contains(event.target)) {
|
|
51
48
|
setShowDropdown(false);
|
|
52
49
|
}
|
|
53
50
|
};
|
|
@@ -118,12 +115,67 @@ const SearchSelect = _ref => {
|
|
|
118
115
|
})]
|
|
119
116
|
});
|
|
120
117
|
};
|
|
121
|
-
const Container = _styledComponents.default.div
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
|
|
118
|
+
const Container = _styledComponents.default.div`
|
|
119
|
+
position: relative;
|
|
120
|
+
min-width: 160px;
|
|
121
|
+
max-width: 320px;
|
|
122
|
+
`;
|
|
123
|
+
const InputWrapper = _styledComponents.default.div`
|
|
124
|
+
display: flex;
|
|
125
|
+
align-items: center;
|
|
126
|
+
height: 36px;
|
|
127
|
+
background: var(--color-background2);
|
|
128
|
+
border-radius: var(--border-radius-l);
|
|
129
|
+
padding: var(--spacing-s);
|
|
130
|
+
margin: 0;
|
|
131
|
+
gap: var(--spacing-xs);
|
|
132
|
+
|
|
133
|
+
> svg {
|
|
134
|
+
color: var(--font-on-mute);
|
|
135
|
+
}
|
|
136
|
+
`;
|
|
137
|
+
const Input = _styledComponents.default.input`
|
|
138
|
+
background: transparent;
|
|
139
|
+
border: none;
|
|
140
|
+
font-size: var(--font-body1);
|
|
141
|
+
color: var(--font-on-background);
|
|
142
|
+
outline: none;
|
|
143
|
+
flex:1;
|
|
144
|
+
min-width: 0;
|
|
145
|
+
|
|
146
|
+
${(0, _inputPlaceholder.default)`
|
|
147
|
+
color: var(--font-on-mute);
|
|
148
|
+
`}
|
|
149
|
+
`;
|
|
150
|
+
const Dropdown = _styledComponents.default.div`
|
|
151
|
+
position: absolute;
|
|
152
|
+
inset: 44px auto auto 0px;
|
|
153
|
+
background: var(--color-background1);
|
|
154
|
+
color: var(--font-on-background);
|
|
155
|
+
border: var(--border-width) solid var(--border-color);
|
|
156
|
+
border-radius: var(--border-radius);
|
|
157
|
+
box-shadow: var(--box-shadow);
|
|
158
|
+
z-index: 1;
|
|
159
|
+
padding: var(--spacing-xs) 0;
|
|
160
|
+
overflow-y: auto;
|
|
161
|
+
max-height: min(320px, ((50vh - 36px) - 20px) - 36px);
|
|
162
|
+
${_scrollbar.default}
|
|
163
|
+
`;
|
|
164
|
+
const OptionList = _styledComponents.default.div``;
|
|
165
|
+
const Option = _styledComponents.default.div`
|
|
166
|
+
padding: 12px var(--spacing-s);
|
|
167
|
+
cursor: pointer;
|
|
168
|
+
|
|
169
|
+
&:hover {
|
|
170
|
+
background: var(--color-hover);
|
|
171
|
+
}
|
|
172
|
+
`;
|
|
173
|
+
const MessageWrapper = _styledComponents.default.div`
|
|
174
|
+
width: 100%;
|
|
175
|
+
text-align: center;
|
|
176
|
+
`;
|
|
177
|
+
const Message = _styledComponents.default.p`
|
|
178
|
+
margin: 0;
|
|
179
|
+
padding: 12px var(--spacing-s);
|
|
180
|
+
`;
|
|
129
181
|
var _default = exports.default = SearchSelect;
|
package/form/Searchbox.js
CHANGED
|
@@ -10,23 +10,13 @@ var _fa = require("react-icons/fa");
|
|
|
10
10
|
var _md = require("react-icons/md");
|
|
11
11
|
var _inputPlaceholder = _interopRequireDefault(require("../styles/mixin/inputPlaceholder"));
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
14
|
-
const _excluded = ["onSearch", "autoFocus"];
|
|
15
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
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 s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(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 (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
24
14
|
const Searchbox = _ref => {
|
|
25
15
|
let {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
onSearch,
|
|
17
|
+
autoFocus = false,
|
|
18
|
+
...props
|
|
19
|
+
} = _ref;
|
|
30
20
|
const [keyword, setKeyword] = (0, _react.useState)('');
|
|
31
21
|
const handleSearch = keyword => {
|
|
32
22
|
if (onSearch) onSearch(keyword);
|
|
@@ -40,7 +30,8 @@ const Searchbox = _ref => {
|
|
|
40
30
|
setKeyword('');
|
|
41
31
|
handleSearch('');
|
|
42
32
|
};
|
|
43
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Wrapper,
|
|
33
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Wrapper, {
|
|
34
|
+
...props,
|
|
44
35
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_fa.FaSearch, {
|
|
45
36
|
onClick: () => {
|
|
46
37
|
handleSearch(keyword);
|
|
@@ -60,13 +51,48 @@ const Searchbox = _ref => {
|
|
|
60
51
|
role: "button",
|
|
61
52
|
"aria-label": "clear button"
|
|
62
53
|
})]
|
|
63
|
-
})
|
|
54
|
+
});
|
|
64
55
|
};
|
|
65
|
-
const Wrapper = _styledComponents.default.div
|
|
56
|
+
const Wrapper = _styledComponents.default.div`
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
position: relative;
|
|
60
|
+
height: 36px;
|
|
61
|
+
background: var(--color-background1);
|
|
62
|
+
border-radius: var(--border-radius-l);
|
|
63
|
+
padding: 0 calc(var(--spacing-s) + var(--font-body1) + var(--spacing-xs)) 0
|
|
64
|
+
var(--spacing-s);
|
|
65
|
+
|
|
66
|
+
> svg {
|
|
67
|
+
font-size: var(--font-body1);
|
|
68
|
+
color: var(--font-on-mute);
|
|
69
|
+
|
|
70
|
+
&:first-child {
|
|
71
|
+
margin-right: var(--spacing-xs);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&:last-child {
|
|
75
|
+
position: absolute;
|
|
76
|
+
right: var(--spacing-s);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
${_ref2 => {
|
|
66
81
|
let {
|
|
67
82
|
border
|
|
68
83
|
} = _ref2;
|
|
69
84
|
return border && 'border: var(--border-width) solid var(--border-color);';
|
|
70
|
-
}
|
|
71
|
-
|
|
85
|
+
}}
|
|
86
|
+
`;
|
|
87
|
+
const Input = _styledComponents.default.input`
|
|
88
|
+
background: transparent;
|
|
89
|
+
border: none;
|
|
90
|
+
font-size: var(--font-body1);
|
|
91
|
+
color: var(--font-on-background);
|
|
92
|
+
outline: none;
|
|
93
|
+
|
|
94
|
+
${(0, _inputPlaceholder.default)`
|
|
95
|
+
color: var(--font-on-mute);
|
|
96
|
+
`}
|
|
97
|
+
`;
|
|
72
98
|
var _default = exports.default = Searchbox;
|
package/form/Slider.js
CHANGED
|
@@ -6,23 +6,41 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
var _templateObject;
|
|
10
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
12
|
-
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; }
|
|
13
|
-
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; }
|
|
14
|
-
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; }
|
|
15
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
16
|
-
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); }
|
|
17
10
|
const Slider = props => {
|
|
18
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(RangeInput,
|
|
11
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(RangeInput, {
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
19
14
|
};
|
|
20
15
|
const RangeInput = _styledComponents.default.input.attrs(() => ({
|
|
21
16
|
type: 'range'
|
|
22
|
-
}))
|
|
17
|
+
}))`
|
|
18
|
+
appearance: none;
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 8px;
|
|
21
|
+
border-radius: var(--border-radius);
|
|
22
|
+
background: var(--color-grey);
|
|
23
|
+
|
|
24
|
+
${_ref => {
|
|
23
25
|
let {
|
|
24
26
|
autoWidth
|
|
25
27
|
} = _ref;
|
|
26
28
|
return autoWidth && 'width: auto;';
|
|
27
|
-
}
|
|
29
|
+
}};
|
|
30
|
+
|
|
31
|
+
&::-webkit-slider-thumb {
|
|
32
|
+
-webkit-appearance: none;
|
|
33
|
+
width: 16px;
|
|
34
|
+
height: 16px;
|
|
35
|
+
border-radius: var(--border-radius-round);
|
|
36
|
+
background: var(--color-primary);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&::-moz-range-thumb {
|
|
40
|
+
width: 16px;
|
|
41
|
+
height: 16px;
|
|
42
|
+
border-radius: var(--border-radius-round);
|
|
43
|
+
background: var(--color-primary);
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
28
46
|
var _default = exports.default = Slider;
|
package/form/SwitchButton.js
CHANGED
|
@@ -6,10 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
10
9
|
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
10
|
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 && {}.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; }
|
|
12
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
13
11
|
const SwitchButton = _ref => {
|
|
14
12
|
let {
|
|
15
13
|
htmlFor,
|
|
@@ -38,34 +36,70 @@ const SwitchButton = _ref => {
|
|
|
38
36
|
})]
|
|
39
37
|
});
|
|
40
38
|
};
|
|
41
|
-
const Label = _styledComponents.default.label
|
|
39
|
+
const Label = _styledComponents.default.label`
|
|
40
|
+
display: inline-block;
|
|
41
|
+
|
|
42
|
+
${_ref2 => {
|
|
42
43
|
let {
|
|
43
44
|
disabled
|
|
44
45
|
} = _ref2;
|
|
45
|
-
return disabled && (0, _styledComponents.css)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
return disabled && (0, _styledComponents.css)`
|
|
47
|
+
opacity: 0.5;
|
|
48
|
+
cursor: not-allowed;
|
|
49
|
+
`;
|
|
50
|
+
}}
|
|
51
|
+
`;
|
|
52
|
+
const Checkbox = _styledComponents.default.input`
|
|
53
|
+
display: none;
|
|
54
|
+
`;
|
|
55
|
+
const Switch = _styledComponents.default.span`
|
|
56
|
+
color: var(--font-on-background);
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
position: relative;
|
|
60
|
+
|
|
61
|
+
${_ref3 => {
|
|
49
62
|
let {
|
|
50
63
|
disabled
|
|
51
64
|
} = _ref3;
|
|
52
|
-
return disabled && (0, _styledComponents.css)
|
|
53
|
-
|
|
54
|
-
|
|
65
|
+
return disabled && (0, _styledComponents.css)`
|
|
66
|
+
opacity: 0.5;
|
|
67
|
+
`;
|
|
68
|
+
}}
|
|
69
|
+
`;
|
|
70
|
+
const SwitchTrack = _styledComponents.default.div`
|
|
71
|
+
position: relative;
|
|
72
|
+
width: 32px;
|
|
73
|
+
height: 16px;
|
|
74
|
+
border-radius: var(--border-radius);
|
|
75
|
+
background: ${_ref4 => {
|
|
55
76
|
let {
|
|
56
77
|
checked
|
|
57
78
|
} = _ref4;
|
|
58
79
|
return !checked ? 'var(--color-grey)' : 'var(--color-primary)';
|
|
59
|
-
}
|
|
80
|
+
}};
|
|
81
|
+
opacity: 0.5;
|
|
82
|
+
margin-right: calc(var(--spacing-xs) + 12px);
|
|
83
|
+
left: ${_ref5 => {
|
|
60
84
|
let {
|
|
61
85
|
checked
|
|
62
86
|
} = _ref5;
|
|
63
87
|
return checked ? '0' : '12px';
|
|
64
|
-
}
|
|
65
|
-
|
|
88
|
+
}};
|
|
89
|
+
`;
|
|
90
|
+
const SwitchThumb = _styledComponents.default.span`
|
|
91
|
+
width: 24px;
|
|
92
|
+
height: 24px;
|
|
93
|
+
background: var(--color-grey);
|
|
94
|
+
border-radius: var(--border-radius-round);
|
|
95
|
+
position: absolute;
|
|
96
|
+
transition: 0.3s;
|
|
97
|
+
|
|
98
|
+
${_ref6 => {
|
|
66
99
|
let {
|
|
67
100
|
checked
|
|
68
101
|
} = _ref6;
|
|
69
102
|
return !checked ? 'left: 0;' : 'left: 20px; background: var(--color-primary);';
|
|
70
|
-
}
|
|
103
|
+
}}
|
|
104
|
+
`;
|
|
71
105
|
var _default = exports.default = SwitchButton;
|