@cashub/ui 0.48.6 → 0.48.7
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 +26 -38
- package/Tab/TabPanel.js +20 -13
- package/Tab/TabTab.js +24 -36
- package/Tab/index.js +6 -3
- package/Tab/subComponent/TabListV2.js +18 -11
- package/Tab/subComponent/TabPanelV2.js +20 -16
- package/Tab/subComponent/TabTabV2.js +21 -33
- package/VerticalTab/TabList.js +18 -13
- package/VerticalTab/TabPanel.js +20 -16
- package/VerticalTab/TabTab.js +21 -40
- package/VerticalTab/VerticalTab.js +4 -8
- package/alert/Alert.js +5 -12
- package/animate/Collapse.js +7 -5
- package/animate/Loader.js +7 -18
- package/animate/PulseRing.js +5 -18
- package/animate/Spinner.js +3 -8
- package/backdrop/BaseBackdrop.js +3 -9
- package/backdrop/LoadingBackdrop.js +3 -7
- package/backdrop/ModalBackdrop.js +3 -5
- package/badge/Badge.js +3 -15
- package/badge/BadgeDot.js +3 -8
- package/badge/BadgeFill.js +6 -24
- package/badge/BadgeWithText.js +3 -13
- package/billing/BarChart.js +1 -1
- package/breadcrumb/Breadcrumb.js +3 -42
- package/button/Button.js +20 -88
- package/button/ButtonGroup.js +9 -33
- package/button/IconButton.js +10 -37
- package/button/ScrollToTopButton.js +4 -12
- package/callout/Callout.js +8 -37
- package/chart/BarChart.js +27 -22
- package/chart/DoughnutChart.js +20 -34
- package/chart/LineChart.js +21 -13
- package/chart/SingleBarChart.js +5 -22
- package/chart/utils/centerTextPlugin.js +2 -2
- package/chart/utils/customTooltip.js +8 -8
- package/chart/utils/htmlLegendPlugin.js +1 -1
- package/chart/utils/yAxisTopTitlePlugin.js +1 -1
- package/container/FlexContainer.js +7 -15
- package/cropper/Cropper.js +2 -1
- package/datetimePicker/DatePicker.js +26 -80
- package/datetimePicker/DatePickerV2.js +36 -95
- package/datetimePicker/DatetimePicker.js +11 -174
- package/datetimePicker/DatetimePickerV2.js +33 -87
- package/datetimePicker/DatetimePickerV3.js +11 -174
- package/datetimePicker/TimeInput.js +10 -35
- package/datetimePicker/TimePicker.js +22 -77
- package/datetimePicker/TimePickerStyle.js +3 -53
- package/datetimePicker/TimePickerV2.js +21 -54
- package/datetimePicker/accordion/Month.js +16 -93
- package/datetimePicker/accordion/Year.js +18 -96
- package/datetimePicker/hooks/useChangeNumber.js +6 -3
- package/datetimePicker/hooks/useDecrease.js +6 -3
- package/datetimePicker/hooks/useIncrease.js +6 -3
- package/datetimePicker/subComponent/Accordion.js +20 -101
- package/descriptionList/DescriptionDetail.js +4 -15
- package/descriptionList/DescriptionList.js +4 -12
- package/descriptionList/DescriptionTerm.js +3 -5
- package/divider/Divider.js +6 -15
- package/dropdown/DropdownButtonOption.js +6 -22
- package/dropdown/DropdownContent.js +15 -29
- package/dropdown/DropdownDivOption.js +3 -17
- package/dropdown/DropdownLinkOption.js +3 -14
- package/dropdown/DropdownToggle.js +15 -7
- package/dropzone/FileDropzone.js +22 -121
- package/dropzone/ImageDropzone.js +14 -83
- package/dropzone/subComponent/Message.js +4 -11
- package/figure/IconFigure.js +7 -16
- package/figure/ImageFigure.js +6 -19
- package/file/HiddenFileInput.js +3 -3
- package/form/Checkbox.js +13 -74
- package/form/Fieldset.js +3 -9
- package/form/FormItem.js +5 -10
- package/form/Input.js +7 -40
- package/form/Label.js +10 -34
- package/form/MutedText.js +4 -8
- package/form/PasswordInput.js +13 -20
- package/form/RadioButton.js +8 -55
- package/form/SearchSelect.js +12 -64
- package/form/Searchbox.js +19 -45
- package/form/Slider.js +10 -28
- package/form/SwitchButton.js +14 -48
- package/form/Textarea.js +3 -30
- package/form/TreeView.js +6 -13
- package/grid/Column.js +10 -23
- package/grid/Grid.js +6 -14
- package/heading/Heading1.js +4 -8
- package/heading/Heading2.js +5 -11
- package/heading/Heading3.js +8 -20
- package/iconbox/ApplicationIconBox.js +12 -48
- package/iconbox/IconBox.js +7 -31
- package/iconbox/IconBoxV2.js +8 -33
- package/iconbox/subComponent/IconBoxFigure.js +9 -17
- package/iconbox/subComponent/IconBoxImage.js +8 -21
- package/image/ImageFluid.js +3 -7
- package/image/UploadImage.js +18 -66
- package/jsoneditor/JsonEditor.js +15 -121
- package/keyframe/Pulse.js +3 -13
- package/keyframe/Spin.js +3 -5
- package/layout/Aside.js +5 -30
- package/layout/Backdrop.js +4 -8
- package/layout/Container.js +5 -21
- package/layout/Footer.js +7 -26
- package/link/LinkSpan.js +19 -37
- package/map/GoogleMap.js +7 -3
- package/map/GoogleReverseGeolocation.js +3 -6
- package/map/LeafletMap.js +2 -2
- package/map/subComponent/GoogleMapContainer.js +4 -16
- package/map/subComponent/GoogleMapPopup.js +10 -7
- package/map/subComponent/GoogleMapWrapper.js +15 -8
- package/map/subComponent/LeafletDrawControl.js +7 -9
- package/map/subComponent/LeafletMapContainer.js +4 -159
- package/modal/StateModal.js +28 -49
- package/modal/TitleModal.js +29 -70
- package/package.json +1 -1
- package/page/Disclaimer.js +3 -119
- package/paginate/Paginate.js +12 -54
- package/popover/Popover.js +25 -30
- package/qrcode/QRCode.js +6 -20
- package/qrcode/QRCodeContainter.js +4 -12
- package/ribbon/Ribbon.js +4 -29
- package/section/Section.js +20 -68
- package/section/SectionBody.js +8 -29
- package/section/SectionHeader.js +11 -36
- package/section/SectionToolbar.js +3 -9
- package/section/SectionToolbarItem.js +3 -8
- package/select/InputSelect.js +23 -16
- package/select/Select.js +43 -112
- package/select/subComponent/Checkbox.js +5 -24
- package/select/subComponent/Footer.js +3 -4
- package/select/subComponent/ListBox.js +5 -12
- package/select/subComponent/Option.js +7 -27
- package/select/subComponent/OptionGroup.js +3 -13
- package/select/subComponent/Options.js +5 -18
- package/select/subComponent/SearchBox.js +12 -34
- package/select/subComponent/SelectedMultipleTags.js +3 -21
- package/select/subComponent/SelectedMultipleText.js +4 -20
- package/select/subComponent/SelectedSingle.js +3 -7
- package/styles/GlobalStyle.js +45 -156
- package/styles/mixin/backgroundColor.js +8 -16
- package/styles/mixin/borderColor.js +7 -13
- package/styles/mixin/color.js +7 -13
- package/styles/mixin/colorOnBackground.js +7 -13
- package/styles/mixin/inputPlaceholder.js +3 -20
- package/styles/mixin/media.js +3 -5
- package/styles/mixin/rounded.js +6 -10
- package/styles/mixin/scrollbar.js +3 -13
- package/styles/theme/dark.theme.js +14 -15
- package/styles/theme/light.theme.js +14 -15
- package/styles/theme/white.theme.js +14 -15
- package/table/GridTable.js +33 -71
- package/table/ImageBox.js +5 -15
- package/table/InfiniteGridTable.js +46 -92
- package/table/PermissionTable.js +10 -32
- package/table/SimpleGridTable.js +17 -52
- package/table/Table.js +48 -198
- package/table/__mock__/columns.js +1 -1
- package/table/subComponent/BaseTableHeadCell.js +8 -37
- package/table/subComponent/GridTableFooter.js +4 -10
- package/table/subComponent/GridTableHeadCell.js +4 -6
- package/table/subComponent/Resizer.js +4 -19
- package/table/subComponent/TableFooter.js +6 -15
- package/table/subComponent/TableFooterInfo.js +3 -4
- package/table/subComponent/TableFooterPager.js +6 -19
- package/table/subComponent/TableHeadCell.js +3 -9
- package/table/subComponent/TableSort.js +7 -17
- package/tagify/TagifyStyle.js +3 -49
- package/tagify/Tags.js +21 -37
- package/tagify/templates/getCreateButtonTemplate.js +2 -5
- package/text/Paragraph.js +12 -50
- package/timeline/Timeline.js +17 -94
- package/toast/CustomToastContainer.js +3 -35
- package/toast/MessageContainer.js +4 -22
- package/tooltip/Tooltip.js +19 -47
- package/treeView/TreeViewV2.js +1 -1
- package/treeView/TreeflexStyle.js +3 -38
- package/wizard/Wizard.js +6 -115
package/section/SectionHeader.js
CHANGED
|
@@ -6,65 +6,40 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
8
|
var _header = _interopRequireDefault(require("../styles/config/header.style"));
|
|
9
|
+
var _templateObject, _templateObject2;
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
11
|
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
12
|
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
|
-
|
|
13
|
-
background: transparent
|
|
14
|
-
padding: 0;
|
|
15
|
-
margin-bottom: calc(var(--spacing-s) * -1);
|
|
16
|
-
|
|
17
|
-
> * {
|
|
18
|
-
padding-bottom: var(--spacing-s);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
${_ref => {
|
|
13
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
14
|
+
const SectionHeader = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: transparent;\n padding: 0;\n margin-bottom: calc(var(--spacing-s) * -1);\n\n > * {\n padding-bottom: var(--spacing-s);\n }\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), _ref => {
|
|
22
15
|
let {
|
|
23
16
|
inline
|
|
24
17
|
} = _ref;
|
|
25
|
-
return inline && (0, _styledComponents.css)
|
|
26
|
-
|
|
27
|
-
justify-content: space-between;
|
|
28
|
-
align-items: center;
|
|
29
|
-
`;
|
|
30
|
-
}}
|
|
31
|
-
|
|
32
|
-
${_ref2 => {
|
|
18
|
+
return inline && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n "])));
|
|
19
|
+
}, _ref2 => {
|
|
33
20
|
let {
|
|
34
21
|
flexStart
|
|
35
22
|
} = _ref2;
|
|
36
23
|
return flexStart && 'justify-content: flex-start;';
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
${_ref3 => {
|
|
24
|
+
}, _ref3 => {
|
|
40
25
|
let {
|
|
41
26
|
border
|
|
42
27
|
} = _ref3;
|
|
43
28
|
return border && 'border-bottom: var(--border-width) solid var(--border-color);';
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
${_ref4 => {
|
|
29
|
+
}, _ref4 => {
|
|
47
30
|
let {
|
|
48
31
|
backgroundFill
|
|
49
32
|
} = _ref4;
|
|
50
33
|
return backgroundFill && 'background: var(--color-background1);';
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
${_ref5 => {
|
|
34
|
+
}, _ref5 => {
|
|
54
35
|
let {
|
|
55
36
|
backgroundReverse
|
|
56
37
|
} = _ref5;
|
|
57
38
|
return backgroundReverse && 'background: var(--color-background2);';
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
${_ref6 => {
|
|
39
|
+
}, _ref6 => {
|
|
61
40
|
let {
|
|
62
41
|
sticky
|
|
63
42
|
} = _ref6;
|
|
64
|
-
return sticky &&
|
|
65
|
-
|
|
66
|
-
top: ${_header.default.height};
|
|
67
|
-
`;
|
|
68
|
-
}}
|
|
69
|
-
`;
|
|
43
|
+
return sticky && "position: sticky;\n z-index:20;\n top: ".concat(_header.default.height, ";\n ");
|
|
44
|
+
});
|
|
70
45
|
var _default = exports.default = SectionHeader;
|
|
@@ -5,14 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject;
|
|
8
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
|
|
10
|
-
display: flex;
|
|
11
|
-
justify-content: space-between;
|
|
12
|
-
align-items: center;
|
|
13
|
-
|
|
14
|
-
> *:not(:first-child) {
|
|
15
|
-
margin-left: var(--spacing-s);
|
|
16
|
-
}
|
|
17
|
-
`;
|
|
10
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
11
|
+
const SectionToolbar = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n > *:not(:first-child) {\n margin-left: var(--spacing-s);\n }\n"])));
|
|
18
12
|
var _default = exports.default = SectionToolbar;
|
|
@@ -5,13 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject;
|
|
8
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
|
|
10
|
-
display: flex;
|
|
11
|
-
align-items: center;
|
|
12
|
-
|
|
13
|
-
> *:not(:first-child) {
|
|
14
|
-
margin-left: var(--spacing-s);
|
|
15
|
-
}
|
|
16
|
-
`;
|
|
10
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
11
|
+
const SectionToolbarItem = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n\n > *:not(:first-child) {\n margin-left: var(--spacing-s);\n }\n"])));
|
|
17
12
|
var _default = exports.default = SectionToolbarItem;
|
package/select/InputSelect.js
CHANGED
|
@@ -13,16 +13,24 @@ var _ListBox = _interopRequireDefault(require("./subComponent/ListBox"));
|
|
|
13
13
|
var _Option = _interopRequireDefault(require("./subComponent/Option"));
|
|
14
14
|
var _Options = _interopRequireDefault(require("./subComponent/Options"));
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
const _excluded = ["options", "value", "disabled", "onChange", "onSelect"];
|
|
16
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
+
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; }
|
|
19
|
+
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; }
|
|
20
|
+
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; }
|
|
21
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
22
|
+
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); }
|
|
23
|
+
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; }
|
|
24
|
+
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; }
|
|
17
25
|
const InputSelect = _ref => {
|
|
18
26
|
let {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
options = [],
|
|
28
|
+
value,
|
|
29
|
+
disabled,
|
|
30
|
+
onChange,
|
|
31
|
+
onSelect
|
|
32
|
+
} = _ref,
|
|
33
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
26
34
|
const [displayListBox, setDisplayListBox] = (0, _react.useState)(false);
|
|
27
35
|
const [filteredOptions, setFilteredOptions] = (0, _react.useState)([]);
|
|
28
36
|
const [optionList, setOptionList] = (0, _react.useState)([]);
|
|
@@ -221,10 +229,9 @@ const InputSelect = _ref => {
|
|
|
221
229
|
} else {
|
|
222
230
|
selected = false;
|
|
223
231
|
}
|
|
224
|
-
return {
|
|
225
|
-
...option,
|
|
232
|
+
return _objectSpread(_objectSpread({}, option), {}, {
|
|
226
233
|
selected
|
|
227
|
-
};
|
|
234
|
+
});
|
|
228
235
|
}));
|
|
229
236
|
}, [filteredOptions, parsedSelected]);
|
|
230
237
|
(0, _react.useEffect)(() => {
|
|
@@ -236,16 +243,16 @@ const InputSelect = _ref => {
|
|
|
236
243
|
onOutsideClick: () => {
|
|
237
244
|
setDisplayListBox(false);
|
|
238
245
|
},
|
|
239
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.default, {
|
|
240
|
-
autoComplete: "off"
|
|
241
|
-
|
|
246
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.default, _objectSpread(_objectSpread(_objectSpread({
|
|
247
|
+
autoComplete: "off"
|
|
248
|
+
}, props), {}, {
|
|
242
249
|
onChange: event => {
|
|
243
250
|
onChange(event);
|
|
244
251
|
if (!displayListBox) setDisplayListBox(true);
|
|
245
252
|
},
|
|
246
253
|
value: value,
|
|
247
|
-
ref: setListBoxElement
|
|
248
|
-
|
|
254
|
+
ref: setListBoxElement
|
|
255
|
+
}, attributes.popper), {}, {
|
|
249
256
|
placement: state && state.placement,
|
|
250
257
|
onClick: handleDisplay,
|
|
251
258
|
onKeyUp: handleKeyUp,
|
|
@@ -253,7 +260,7 @@ const InputSelect = _ref => {
|
|
|
253
260
|
setDisplayListBox(true);
|
|
254
261
|
},
|
|
255
262
|
onKeyDown: handleKeyDown
|
|
256
|
-
}), optionItem.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListBox.default, {
|
|
263
|
+
})), optionItem.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListBox.default, {
|
|
257
264
|
style: styles.popper,
|
|
258
265
|
$display: displayListBox,
|
|
259
266
|
ref: setDropdownElement,
|
package/select/Select.js
CHANGED
|
@@ -28,7 +28,14 @@ var _Footer = _interopRequireDefault(require("./subComponent/Footer"));
|
|
|
28
28
|
var _figure = require("../figure");
|
|
29
29
|
var _image = require("../image");
|
|
30
30
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
31
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
31
32
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
33
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
34
|
+
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; }
|
|
35
|
+
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; }
|
|
36
|
+
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; }
|
|
37
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
38
|
+
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); }
|
|
32
39
|
const Select = _ref => {
|
|
33
40
|
let {
|
|
34
41
|
options,
|
|
@@ -77,10 +84,9 @@ const Select = _ref => {
|
|
|
77
84
|
const newOptions = (0, _react.useMemo)(() => {
|
|
78
85
|
if (!options) return;
|
|
79
86
|
const newOptions = options.map(item => {
|
|
80
|
-
return {
|
|
81
|
-
isDisable: false
|
|
82
|
-
|
|
83
|
-
};
|
|
87
|
+
return _objectSpread({
|
|
88
|
+
isDisable: false
|
|
89
|
+
}, item);
|
|
84
90
|
});
|
|
85
91
|
if (options.length > 0 && multiple && enableSelectAll) {
|
|
86
92
|
newOptions.unshift({
|
|
@@ -188,13 +194,13 @@ const Select = _ref => {
|
|
|
188
194
|
return id === value;
|
|
189
195
|
});
|
|
190
196
|
});
|
|
191
|
-
const actualOpt = targetOption
|
|
197
|
+
const actualOpt = targetOption !== null && targetOption !== void 0 && targetOption.child ? targetOption.child.find(_ref4 => {
|
|
192
198
|
let {
|
|
193
199
|
id
|
|
194
200
|
} = _ref4;
|
|
195
201
|
return id === value;
|
|
196
202
|
}) : targetOption;
|
|
197
|
-
if (actualOpt
|
|
203
|
+
if (actualOpt !== null && actualOpt !== void 0 && actualOpt.isDisable) return;
|
|
198
204
|
|
|
199
205
|
// 選取選項
|
|
200
206
|
// 點選 all 全選
|
|
@@ -510,8 +516,7 @@ const Select = _ref => {
|
|
|
510
516
|
if (!filteredOptions) return;
|
|
511
517
|
setOptionList(filteredOptions.map(option => {
|
|
512
518
|
if (option.child && option.child.length > 0) {
|
|
513
|
-
return {
|
|
514
|
-
...option,
|
|
519
|
+
return _objectSpread(_objectSpread({}, option), {}, {
|
|
515
520
|
child: option.child.map(option => {
|
|
516
521
|
let selected = false;
|
|
517
522
|
if (multiple && selectedAllOptions.includes(option.id.toString())) {
|
|
@@ -519,12 +524,11 @@ const Select = _ref => {
|
|
|
519
524
|
} else if (selectedAllOptions === option.id.toString()) {
|
|
520
525
|
selected = true;
|
|
521
526
|
}
|
|
522
|
-
return {
|
|
523
|
-
...option,
|
|
527
|
+
return _objectSpread(_objectSpread({}, option), {}, {
|
|
524
528
|
selected
|
|
525
|
-
};
|
|
529
|
+
});
|
|
526
530
|
})
|
|
527
|
-
};
|
|
531
|
+
});
|
|
528
532
|
}
|
|
529
533
|
let selected = false;
|
|
530
534
|
if (multiple && selectedAllOptions.includes(option.id.toString())) {
|
|
@@ -532,10 +536,9 @@ const Select = _ref => {
|
|
|
532
536
|
} else if (selectedAllOptions === option.id.toString()) {
|
|
533
537
|
selected = true;
|
|
534
538
|
}
|
|
535
|
-
return {
|
|
536
|
-
...option,
|
|
539
|
+
return _objectSpread(_objectSpread({}, option), {}, {
|
|
537
540
|
selected
|
|
538
|
-
};
|
|
541
|
+
});
|
|
539
542
|
}));
|
|
540
543
|
}, [filteredOptions, multiple, selectedAllOptions]);
|
|
541
544
|
|
|
@@ -546,10 +549,9 @@ const Select = _ref => {
|
|
|
546
549
|
if (option.child && option.child.length > 0) {
|
|
547
550
|
const tmpFilteredChildOptions = option.child.filter(option => option.text.toLowerCase().indexOf(search.toLowerCase().trim()) !== -1);
|
|
548
551
|
if (tmpFilteredChildOptions.length > 0) {
|
|
549
|
-
tmpFilteredOptions.push({
|
|
550
|
-
...option,
|
|
552
|
+
tmpFilteredOptions.push(_objectSpread(_objectSpread({}, option), {}, {
|
|
551
553
|
child: tmpFilteredChildOptions
|
|
552
|
-
});
|
|
554
|
+
}));
|
|
553
555
|
}
|
|
554
556
|
} else if (option.text.toLowerCase().indexOf(search.toLowerCase().trim()) !== -1) {
|
|
555
557
|
tmpFilteredOptions.push(option);
|
|
@@ -603,7 +605,7 @@ const Select = _ref => {
|
|
|
603
605
|
"aria-haspopup": "listbox",
|
|
604
606
|
"aria-expanded": display
|
|
605
607
|
})]
|
|
606
|
-
}), /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(_ListBox.default, {
|
|
608
|
+
}), /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(_ListBox.default, _objectSpread(_objectSpread({
|
|
607
609
|
role: "listbox",
|
|
608
610
|
tabIndex: "0",
|
|
609
611
|
id: id,
|
|
@@ -612,8 +614,8 @@ const Select = _ref => {
|
|
|
612
614
|
onKeyDown: handleKeyDown,
|
|
613
615
|
width: listBoxWidth,
|
|
614
616
|
$display: display,
|
|
615
|
-
style: styles.popper
|
|
616
|
-
|
|
617
|
+
style: styles.popper
|
|
618
|
+
}, attributes.popper), {}, {
|
|
617
619
|
placement: state && state.placement,
|
|
618
620
|
children: [allowSearch && /*#__PURE__*/(0, _jsxRuntime.jsx)(_SearchBox.default, {
|
|
619
621
|
ref: searchBoxElement,
|
|
@@ -629,7 +631,7 @@ const Select = _ref => {
|
|
|
629
631
|
}), footer && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Footer.default, {
|
|
630
632
|
children: footer
|
|
631
633
|
})]
|
|
632
|
-
}), document.body)]
|
|
634
|
+
})), document.body)]
|
|
633
635
|
})
|
|
634
636
|
});
|
|
635
637
|
};
|
|
@@ -649,129 +651,58 @@ const Icon = _ref5 => {
|
|
|
649
651
|
}), "\xA0"]
|
|
650
652
|
});
|
|
651
653
|
};
|
|
652
|
-
const Combobox = _styledComponents.default.div
|
|
653
|
-
display: flex;
|
|
654
|
-
flex-wrap: wrap;
|
|
655
|
-
align-items: center;
|
|
656
|
-
min-height: 36px;
|
|
657
|
-
cursor: pointer;
|
|
658
|
-
position: relative;
|
|
659
|
-
background: transparent;
|
|
660
|
-
color: var(--font-on-background);
|
|
661
|
-
font-size: var(--font-body1);
|
|
662
|
-
border: var(--border-width) solid var(--border-color);
|
|
663
|
-
border-radius: var(--border-radius-l);
|
|
664
|
-
padding: 0 calc(var(--spacing-s) * 2 + 8px) 0 var(--spacing-s);
|
|
665
|
-
|
|
666
|
-
&:focus {
|
|
667
|
-
${_ref6 => {
|
|
654
|
+
const Combobox = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n min-height: 36px;\n cursor: pointer;\n position: relative;\n background: transparent;\n color: var(--font-on-background);\n font-size: var(--font-body1);\n border: var(--border-width) solid var(--border-color);\n border-radius: var(--border-radius-l);\n padding: 0 calc(var(--spacing-s) * 2 + 8px) 0 var(--spacing-s);\n\n &:focus {\n ", ";\n }\n\n ", "\n\n ", "\n\n ", "\n ", "\n \n ", ";\n\n ", "\n\n ", "\n\n ", "\n"])), _ref6 => {
|
|
668
655
|
let {
|
|
669
656
|
disabled
|
|
670
657
|
} = _ref6;
|
|
671
|
-
return !disabled &&
|
|
672
|
-
|
|
673
|
-
outline: none;
|
|
674
|
-
`;
|
|
675
|
-
}};
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
${_ref7 => {
|
|
658
|
+
return !disabled && "\n border-color: var(--color-primary);\n outline: none;\n ";
|
|
659
|
+
}, _ref7 => {
|
|
679
660
|
let {
|
|
680
661
|
flexGrow
|
|
681
662
|
} = _ref7;
|
|
682
663
|
return !flexGrow && 'min-width: 160px;';
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
${_ref8 => {
|
|
664
|
+
}, _ref8 => {
|
|
686
665
|
let {
|
|
687
666
|
$display
|
|
688
667
|
} = _ref8;
|
|
689
|
-
return $display &&
|
|
690
|
-
|
|
691
|
-
outline: none;
|
|
692
|
-
`;
|
|
693
|
-
}}
|
|
694
|
-
|
|
695
|
-
${_ref9 => {
|
|
668
|
+
return $display && "\n border-color: var(--color-primary);\n outline: none;\n ";
|
|
669
|
+
}, _ref9 => {
|
|
696
670
|
let {
|
|
697
671
|
disabled
|
|
698
672
|
} = _ref9;
|
|
699
673
|
return disabled && 'cursor: not-allowed;opacity: 0.5;';
|
|
700
|
-
}
|
|
701
|
-
${_ref10 => {
|
|
674
|
+
}, _ref10 => {
|
|
702
675
|
let {
|
|
703
676
|
placeholder
|
|
704
677
|
} = _ref10;
|
|
705
678
|
return placeholder && 'color: var(--font-on-mute);';
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
${_ref11 => {
|
|
679
|
+
}, _ref11 => {
|
|
709
680
|
let {
|
|
710
681
|
fullWidth
|
|
711
682
|
} = _ref11;
|
|
712
683
|
return fullWidth ? 'width: 100%' : 'max-width: 320px';
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
${_ref12 => {
|
|
684
|
+
}, _ref12 => {
|
|
716
685
|
let {
|
|
717
686
|
large
|
|
718
687
|
} = _ref12;
|
|
719
|
-
return large &&
|
|
720
|
-
|
|
721
|
-
padding: 12px calc(var(--spacing-s) * 2 + 8px) 12px var(--spacing-s);
|
|
722
|
-
`;
|
|
723
|
-
}}
|
|
724
|
-
|
|
725
|
-
${_ref13 => {
|
|
688
|
+
return large && "\n height: 40px;\n padding: 12px calc(var(--spacing-s) * 2 + 8px) 12px var(--spacing-s);\n ";
|
|
689
|
+
}, _ref13 => {
|
|
726
690
|
let {
|
|
727
691
|
$fill
|
|
728
692
|
} = _ref13;
|
|
729
|
-
return $fill &&
|
|
730
|
-
|
|
731
|
-
border-color: transparent;
|
|
732
|
-
`;
|
|
733
|
-
}}
|
|
734
|
-
|
|
735
|
-
${_ref14 => {
|
|
693
|
+
return $fill && "\n background: var(--color-background2);\n border-color: transparent;\n ";
|
|
694
|
+
}, _ref14 => {
|
|
736
695
|
let {
|
|
737
696
|
fillReverse
|
|
738
697
|
} = _ref14;
|
|
739
|
-
return fillReverse &&
|
|
740
|
-
|
|
741
|
-
border-color: transparent;
|
|
742
|
-
`;
|
|
743
|
-
}}
|
|
744
|
-
`;
|
|
698
|
+
return fillReverse && "\n background: var(--color-background1);\n border-color: transparent;\n ";
|
|
699
|
+
});
|
|
745
700
|
Combobox.displayName = 'Combobox';
|
|
746
|
-
const CloseButton = (0, _styledComponents.default)(_md.MdClose)
|
|
747
|
-
position: absolute;
|
|
748
|
-
top: 50%;
|
|
749
|
-
transform: translateY(-50%);
|
|
750
|
-
color: var(--color-primary);
|
|
751
|
-
font-size: var(--font-body1);
|
|
752
|
-
right: var(--spacing-l);
|
|
753
|
-
|
|
754
|
-
${_media.default.tablet`
|
|
755
|
-
right: calc(var(--spacing) + var(--spacing-s));
|
|
756
|
-
`};
|
|
757
|
-
`;
|
|
701
|
+
const CloseButton = (0, _styledComponents.default)(_md.MdClose)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n color: var(--color-primary);\n font-size: var(--font-body1);\n right: var(--spacing-l);\n\n ", ";\n"])), _media.default.tablet(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n right: calc(var(--spacing) + var(--spacing-s));\n "]))));
|
|
758
702
|
CloseButton.displayName = 'CloseButton';
|
|
759
|
-
const ExpandArrow = (0, _styledComponents.default)(_ti.TiArrowSortedDown)
|
|
760
|
-
position: absolute;
|
|
761
|
-
top: 50%;
|
|
762
|
-
transform: translateY(-50%);
|
|
763
|
-
color: var(--color-primary);
|
|
764
|
-
font-size: var(--font-body1);
|
|
765
|
-
right: var(--spacing-s);
|
|
766
|
-
`;
|
|
703
|
+
const ExpandArrow = (0, _styledComponents.default)(_ti.TiArrowSortedDown)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n color: var(--color-primary);\n font-size: var(--font-body1);\n right: var(--spacing-s);\n"])));
|
|
767
704
|
ExpandArrow.displayName = 'ExpandArrow';
|
|
768
|
-
const Message = _styledComponents.default.p
|
|
769
|
-
margin: 0;
|
|
770
|
-
padding: 12px var(--spacing-s);
|
|
771
|
-
`;
|
|
705
|
+
const Message = _styledComponents.default.p(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin: 0;\n padding: 12px var(--spacing-s);\n"])));
|
|
772
706
|
Message.displayName = 'Message';
|
|
773
|
-
const OptionBadge = _styledComponents.default.span
|
|
774
|
-
color: var(--color-danger);
|
|
775
|
-
font-style: italic;
|
|
776
|
-
`;
|
|
707
|
+
const OptionBadge = _styledComponents.default.span(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: var(--color-danger);\n font-style: italic;\n"])));
|
|
777
708
|
var _default = exports.default = Select;
|
|
@@ -7,8 +7,10 @@ exports.default = void 0;
|
|
|
7
7
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
8
|
var _md = require("react-icons/md");
|
|
9
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
var _templateObject, _templateObject2;
|
|
10
11
|
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
12
|
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; }
|
|
13
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
12
14
|
const Checkbox = _ref => {
|
|
13
15
|
let {
|
|
14
16
|
selected
|
|
@@ -18,31 +20,10 @@ const Checkbox = _ref => {
|
|
|
18
20
|
children: selected && /*#__PURE__*/(0, _jsxRuntime.jsx)(_md.MdDone, {})
|
|
19
21
|
});
|
|
20
22
|
};
|
|
21
|
-
const Container = _styledComponents.default.div
|
|
22
|
-
position: relative;
|
|
23
|
-
width: 24px;
|
|
24
|
-
height: 24px;
|
|
25
|
-
border: var(--border-width) solid var(--border-color);
|
|
26
|
-
margin-right: var(--spacing-xs);
|
|
27
|
-
border-radius: 4px;
|
|
28
|
-
|
|
29
|
-
${_ref2 => {
|
|
23
|
+
const Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n width: 24px;\n height: 24px;\n border: var(--border-width) solid var(--border-color);\n margin-right: var(--spacing-xs);\n border-radius: 4px;\n\n ", "\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"])), _ref2 => {
|
|
30
24
|
let {
|
|
31
25
|
selected
|
|
32
26
|
} = _ref2;
|
|
33
|
-
return selected && (0, _styledComponents.css)
|
|
34
|
-
|
|
35
|
-
border-color: var(--color-primary);
|
|
36
|
-
`;
|
|
37
|
-
}}
|
|
38
|
-
|
|
39
|
-
> svg {
|
|
40
|
-
position: absolute;
|
|
41
|
-
color: var(--font-on-primary);
|
|
42
|
-
font-size: var(--font-h3);
|
|
43
|
-
top: 50%;
|
|
44
|
-
left: 50%;
|
|
45
|
-
transform: translate(-50%, -50%);
|
|
46
|
-
}
|
|
47
|
-
`;
|
|
27
|
+
return selected && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: var(--color-primary);\n border-color: var(--color-primary);\n "])));
|
|
28
|
+
});
|
|
48
29
|
var _default = exports.default = Checkbox;
|
|
@@ -5,9 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject;
|
|
8
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
|
|
10
|
-
padding: var(--spacing-s);
|
|
11
|
-
border-top: 1px solid var(--border-color);
|
|
12
|
-
`;
|
|
10
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
11
|
+
const Footer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: var(--spacing-s);\n border-top: 1px solid var(--border-color);\n"])));
|
|
13
12
|
var _default = exports.default = Footer;
|
|
@@ -5,26 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject;
|
|
8
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
|
|
10
|
-
visibility:
|
|
10
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
11
|
+
const ListBox = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n visibility: ", ";\n background: var(--color-background1);\n color: var(--font-on-background);\n border: var(--border-width) solid var(--border-color);\n border-radius: var(--border-radius);\n box-shadow: var(--box-shadow);\n width: ", "px;\n z-index: 85;\n"])), _ref => {
|
|
11
12
|
let {
|
|
12
13
|
$display
|
|
13
14
|
} = _ref;
|
|
14
15
|
return $display ? 'visible' : 'hidden';
|
|
15
|
-
}
|
|
16
|
-
background: var(--color-background1);
|
|
17
|
-
color: var(--font-on-background);
|
|
18
|
-
border: var(--border-width) solid var(--border-color);
|
|
19
|
-
border-radius: var(--border-radius);
|
|
20
|
-
box-shadow: var(--box-shadow);
|
|
21
|
-
width: ${_ref2 => {
|
|
16
|
+
}, _ref2 => {
|
|
22
17
|
let {
|
|
23
18
|
width
|
|
24
19
|
} = _ref2;
|
|
25
20
|
return width;
|
|
26
|
-
}
|
|
27
|
-
z-index: 85;
|
|
28
|
-
`;
|
|
21
|
+
});
|
|
29
22
|
ListBox.displayName = 'ListBox';
|
|
30
23
|
var _default = exports.default = ListBox;
|
|
@@ -5,41 +5,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
8
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); }
|
|
9
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; }
|
|
10
|
-
|
|
11
|
-
display: flex
|
|
12
|
-
align-items: center;
|
|
13
|
-
max-width: 100%;
|
|
14
|
-
word-break: break-all;
|
|
15
|
-
padding: 12px var(--spacing-s);
|
|
16
|
-
background: var(--color-background1);
|
|
17
|
-
transition: background 0.3s;
|
|
18
|
-
|
|
19
|
-
&:hover {
|
|
20
|
-
background: var(--color-hover);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
${_ref => {
|
|
11
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
12
|
+
const Option = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n max-width: 100%;\n word-break: break-all;\n padding: 12px var(--spacing-s);\n background: var(--color-background1);\n transition: background 0.3s;\n\n &:hover {\n background: var(--color-hover);\n }\n\n ", "\n\n ", "\n"])), _ref => {
|
|
24
13
|
let {
|
|
25
14
|
selected,
|
|
26
15
|
focus
|
|
27
16
|
} = _ref;
|
|
28
|
-
return (selected || focus) && (0, _styledComponents.css)
|
|
29
|
-
|
|
30
|
-
`;
|
|
31
|
-
}}
|
|
32
|
-
|
|
33
|
-
${_ref2 => {
|
|
17
|
+
return (selected || focus) && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: var(--color-hover);\n "])));
|
|
18
|
+
}, _ref2 => {
|
|
34
19
|
let {
|
|
35
20
|
disabled
|
|
36
21
|
} = _ref2;
|
|
37
|
-
return disabled && (0, _styledComponents.css)
|
|
38
|
-
|
|
39
|
-
pointer-events: none;
|
|
40
|
-
color: var(--font-on-mute);
|
|
41
|
-
`;
|
|
42
|
-
}}
|
|
43
|
-
`;
|
|
22
|
+
return disabled && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n cursor: not-allowed;\n pointer-events: none;\n color: var(--font-on-mute);\n "])));
|
|
23
|
+
});
|
|
44
24
|
Option.displayName = 'Option';
|
|
45
25
|
var _default = exports.default = Option;
|
|
@@ -5,19 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject;
|
|
8
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
|
|
10
|
-
[role='presentation'] {
|
|
11
|
-
font-weight: bold;
|
|
12
|
-
|
|
13
|
-
&:hover {
|
|
14
|
-
background: var(--color-background1);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
[role='option'] {
|
|
19
|
-
padding-left: calc(var(--spacing-s) * 2);
|
|
20
|
-
}
|
|
21
|
-
`;
|
|
10
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
11
|
+
const OptionGroup = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n [role='presentation'] {\n font-weight: bold;\n\n &:hover {\n background: var(--color-background1);\n }\n }\n\n [role='option'] {\n padding-left: calc(var(--spacing-s) * 2);\n }\n"])));
|
|
22
12
|
OptionGroup.displayName = 'OptionGroup';
|
|
23
13
|
var _default = exports.default = OptionGroup;
|