@cashub/ui 0.48.21 → 0.48.23
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 +25 -37
- 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 +22 -102
- 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 +21 -13
- 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 +16 -81
- 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 +10 -45
- 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 +38 -62
- 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 +56 -121
- 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/SelectedMultipleCount.js +25 -0
- 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 +26 -52
- 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
|
@@ -18,6 +18,7 @@ var _media = _interopRequireDefault(require("../styles/mixin/media"));
|
|
|
18
18
|
var _SelectedSingle = _interopRequireDefault(require("./subComponent/SelectedSingle"));
|
|
19
19
|
var _SelectedMultipleTags = _interopRequireDefault(require("./subComponent/SelectedMultipleTags"));
|
|
20
20
|
var _SelectedMultipleText = _interopRequireDefault(require("./subComponent/SelectedMultipleText"));
|
|
21
|
+
var _SelectedMultipleCount = _interopRequireDefault(require("./subComponent/SelectedMultipleCount"));
|
|
21
22
|
var _ListBox = _interopRequireDefault(require("./subComponent/ListBox"));
|
|
22
23
|
var _SearchBox = _interopRequireDefault(require("./subComponent/SearchBox"));
|
|
23
24
|
var _Options = _interopRequireDefault(require("./subComponent/Options"));
|
|
@@ -28,7 +29,14 @@ var _Footer = _interopRequireDefault(require("./subComponent/Footer"));
|
|
|
28
29
|
var _figure = require("../figure");
|
|
29
30
|
var _image = require("../image");
|
|
30
31
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
32
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
31
33
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
34
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
35
|
+
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; }
|
|
36
|
+
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; }
|
|
37
|
+
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; }
|
|
38
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
39
|
+
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
40
|
const Select = _ref => {
|
|
33
41
|
let {
|
|
34
42
|
options,
|
|
@@ -77,10 +85,9 @@ const Select = _ref => {
|
|
|
77
85
|
const newOptions = (0, _react.useMemo)(() => {
|
|
78
86
|
if (!options) return;
|
|
79
87
|
const newOptions = options.map(item => {
|
|
80
|
-
return {
|
|
81
|
-
isDisable: false
|
|
82
|
-
|
|
83
|
-
};
|
|
88
|
+
return _objectSpread({
|
|
89
|
+
isDisable: false
|
|
90
|
+
}, item);
|
|
84
91
|
});
|
|
85
92
|
if (options.length > 0 && multiple && enableSelectAll) {
|
|
86
93
|
newOptions.unshift({
|
|
@@ -126,8 +133,9 @@ const Select = _ref => {
|
|
|
126
133
|
return [option.text, option.suffix].filter(text => text || text === 0).join(' ');
|
|
127
134
|
}, []);
|
|
128
135
|
const renderOptionContent = (0, _react.useCallback)(option => {
|
|
136
|
+
var _option$highlightText;
|
|
129
137
|
const text = getOptionText(option);
|
|
130
|
-
const highlightText = option.highlightText
|
|
138
|
+
const highlightText = (_option$highlightText = option.highlightText) === null || _option$highlightText === void 0 ? void 0 : _option$highlightText.toString();
|
|
131
139
|
if (highlightText && text.includes(highlightText)) {
|
|
132
140
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(OptionLabel, {
|
|
133
141
|
children: text.split(highlightText).map((textPart, index, textParts) => {
|
|
@@ -136,7 +144,7 @@ const Select = _ref => {
|
|
|
136
144
|
$color: option.highlightColor,
|
|
137
145
|
children: highlightText
|
|
138
146
|
})]
|
|
139
|
-
},
|
|
147
|
+
}, "".concat(highlightText, "-").concat(index));
|
|
140
148
|
})
|
|
141
149
|
});
|
|
142
150
|
}
|
|
@@ -212,13 +220,13 @@ const Select = _ref => {
|
|
|
212
220
|
return id === value;
|
|
213
221
|
});
|
|
214
222
|
});
|
|
215
|
-
const actualOpt = targetOption
|
|
223
|
+
const actualOpt = targetOption !== null && targetOption !== void 0 && targetOption.child ? targetOption.child.find(_ref4 => {
|
|
216
224
|
let {
|
|
217
225
|
id
|
|
218
226
|
} = _ref4;
|
|
219
227
|
return id === value;
|
|
220
228
|
}) : targetOption;
|
|
221
|
-
if (actualOpt
|
|
229
|
+
if (actualOpt !== null && actualOpt !== void 0 && actualOpt.isDisable) return;
|
|
222
230
|
|
|
223
231
|
// 選取選項
|
|
224
232
|
// 點選 all 全選
|
|
@@ -297,6 +305,12 @@ const Select = _ref => {
|
|
|
297
305
|
children: text
|
|
298
306
|
});
|
|
299
307
|
}
|
|
308
|
+
if (displayMode === 'count') {
|
|
309
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectedMultipleCount.default, {
|
|
310
|
+
placeholder: placeholder,
|
|
311
|
+
count: selectedOptions.length
|
|
312
|
+
});
|
|
313
|
+
}
|
|
300
314
|
if (selectedOptions[0].id === allOptionId) {
|
|
301
315
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectedMultipleTags.default, {
|
|
302
316
|
content: renderOptionContent(selectedOptions[0]),
|
|
@@ -533,8 +547,7 @@ const Select = _ref => {
|
|
|
533
547
|
if (!filteredOptions) return;
|
|
534
548
|
setOptionList(filteredOptions.map(option => {
|
|
535
549
|
if (option.child && option.child.length > 0) {
|
|
536
|
-
return {
|
|
537
|
-
...option,
|
|
550
|
+
return _objectSpread(_objectSpread({}, option), {}, {
|
|
538
551
|
child: option.child.map(option => {
|
|
539
552
|
let selected = false;
|
|
540
553
|
if (multiple && selectedAllOptions.includes(option.id.toString())) {
|
|
@@ -542,12 +555,11 @@ const Select = _ref => {
|
|
|
542
555
|
} else if (selectedAllOptions === option.id.toString()) {
|
|
543
556
|
selected = true;
|
|
544
557
|
}
|
|
545
|
-
return {
|
|
546
|
-
...option,
|
|
558
|
+
return _objectSpread(_objectSpread({}, option), {}, {
|
|
547
559
|
selected
|
|
548
|
-
};
|
|
560
|
+
});
|
|
549
561
|
})
|
|
550
|
-
};
|
|
562
|
+
});
|
|
551
563
|
}
|
|
552
564
|
let selected = false;
|
|
553
565
|
if (multiple && selectedAllOptions.includes(option.id.toString())) {
|
|
@@ -555,10 +567,9 @@ const Select = _ref => {
|
|
|
555
567
|
} else if (selectedAllOptions === option.id.toString()) {
|
|
556
568
|
selected = true;
|
|
557
569
|
}
|
|
558
|
-
return {
|
|
559
|
-
...option,
|
|
570
|
+
return _objectSpread(_objectSpread({}, option), {}, {
|
|
560
571
|
selected
|
|
561
|
-
};
|
|
572
|
+
});
|
|
562
573
|
}));
|
|
563
574
|
}, [filteredOptions, multiple, selectedAllOptions]);
|
|
564
575
|
|
|
@@ -569,10 +580,9 @@ const Select = _ref => {
|
|
|
569
580
|
if (option.child && option.child.length > 0) {
|
|
570
581
|
const tmpFilteredChildOptions = option.child.filter(option => getOptionText(option).toLowerCase().indexOf(search.toLowerCase().trim()) !== -1);
|
|
571
582
|
if (tmpFilteredChildOptions.length > 0) {
|
|
572
|
-
tmpFilteredOptions.push({
|
|
573
|
-
...option,
|
|
583
|
+
tmpFilteredOptions.push(_objectSpread(_objectSpread({}, option), {}, {
|
|
574
584
|
child: tmpFilteredChildOptions
|
|
575
|
-
});
|
|
585
|
+
}));
|
|
576
586
|
}
|
|
577
587
|
} else if (getOptionText(option).toLowerCase().indexOf(search.toLowerCase().trim()) !== -1) {
|
|
578
588
|
tmpFilteredOptions.push(option);
|
|
@@ -626,7 +636,7 @@ const Select = _ref => {
|
|
|
626
636
|
"aria-haspopup": "listbox",
|
|
627
637
|
"aria-expanded": display
|
|
628
638
|
})]
|
|
629
|
-
}), /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(_ListBox.default, {
|
|
639
|
+
}), /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(_ListBox.default, _objectSpread(_objectSpread({
|
|
630
640
|
role: "listbox",
|
|
631
641
|
tabIndex: "0",
|
|
632
642
|
id: id,
|
|
@@ -635,8 +645,8 @@ const Select = _ref => {
|
|
|
635
645
|
onKeyDown: handleKeyDown,
|
|
636
646
|
width: listBoxWidth,
|
|
637
647
|
$display: display,
|
|
638
|
-
style: styles.popper
|
|
639
|
-
|
|
648
|
+
style: styles.popper
|
|
649
|
+
}, attributes.popper), {}, {
|
|
640
650
|
placement: state && state.placement,
|
|
641
651
|
children: [allowSearch && /*#__PURE__*/(0, _jsxRuntime.jsx)(_SearchBox.default, {
|
|
642
652
|
ref: searchBoxElement,
|
|
@@ -652,7 +662,7 @@ const Select = _ref => {
|
|
|
652
662
|
}), footer && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Footer.default, {
|
|
653
663
|
children: footer
|
|
654
664
|
})]
|
|
655
|
-
}), document.body)]
|
|
665
|
+
})), document.body)]
|
|
656
666
|
})
|
|
657
667
|
});
|
|
658
668
|
};
|
|
@@ -672,140 +682,65 @@ const Icon = _ref5 => {
|
|
|
672
682
|
}), "\xA0"]
|
|
673
683
|
});
|
|
674
684
|
};
|
|
675
|
-
const Combobox = _styledComponents.default.div
|
|
676
|
-
display: flex;
|
|
677
|
-
flex-wrap: wrap;
|
|
678
|
-
align-items: center;
|
|
679
|
-
min-height: 36px;
|
|
680
|
-
cursor: pointer;
|
|
681
|
-
position: relative;
|
|
682
|
-
background: transparent;
|
|
683
|
-
color: var(--font-on-background);
|
|
684
|
-
font-size: var(--font-body1);
|
|
685
|
-
border: var(--border-width) solid var(--border-color);
|
|
686
|
-
border-radius: var(--border-radius-l);
|
|
687
|
-
padding: 0 calc(var(--spacing-s) * 2 + 8px) 0 var(--spacing-s);
|
|
688
|
-
|
|
689
|
-
&:focus {
|
|
690
|
-
${_ref6 => {
|
|
685
|
+
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 => {
|
|
691
686
|
let {
|
|
692
687
|
disabled
|
|
693
688
|
} = _ref6;
|
|
694
|
-
return !disabled &&
|
|
695
|
-
|
|
696
|
-
outline: none;
|
|
697
|
-
`;
|
|
698
|
-
}};
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
${_ref7 => {
|
|
689
|
+
return !disabled && "\n border-color: var(--color-primary);\n outline: none;\n ";
|
|
690
|
+
}, _ref7 => {
|
|
702
691
|
let {
|
|
703
692
|
flexGrow
|
|
704
693
|
} = _ref7;
|
|
705
694
|
return !flexGrow && 'min-width: 160px;';
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
${_ref8 => {
|
|
695
|
+
}, _ref8 => {
|
|
709
696
|
let {
|
|
710
697
|
$display
|
|
711
698
|
} = _ref8;
|
|
712
|
-
return $display &&
|
|
713
|
-
|
|
714
|
-
outline: none;
|
|
715
|
-
`;
|
|
716
|
-
}}
|
|
717
|
-
|
|
718
|
-
${_ref9 => {
|
|
699
|
+
return $display && "\n border-color: var(--color-primary);\n outline: none;\n ";
|
|
700
|
+
}, _ref9 => {
|
|
719
701
|
let {
|
|
720
702
|
disabled
|
|
721
703
|
} = _ref9;
|
|
722
704
|
return disabled && 'cursor: not-allowed;opacity: 0.5;';
|
|
723
|
-
}
|
|
724
|
-
${_ref10 => {
|
|
705
|
+
}, _ref10 => {
|
|
725
706
|
let {
|
|
726
707
|
placeholder
|
|
727
708
|
} = _ref10;
|
|
728
709
|
return placeholder && 'color: var(--font-on-mute);';
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
${_ref11 => {
|
|
710
|
+
}, _ref11 => {
|
|
732
711
|
let {
|
|
733
712
|
fullWidth
|
|
734
713
|
} = _ref11;
|
|
735
714
|
return fullWidth ? 'width: 100%' : 'max-width: 320px';
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
${_ref12 => {
|
|
715
|
+
}, _ref12 => {
|
|
739
716
|
let {
|
|
740
717
|
large
|
|
741
718
|
} = _ref12;
|
|
742
|
-
return large &&
|
|
743
|
-
|
|
744
|
-
padding: 12px calc(var(--spacing-s) * 2 + 8px) 12px var(--spacing-s);
|
|
745
|
-
`;
|
|
746
|
-
}}
|
|
747
|
-
|
|
748
|
-
${_ref13 => {
|
|
719
|
+
return large && "\n height: 40px;\n padding: 12px calc(var(--spacing-s) * 2 + 8px) 12px var(--spacing-s);\n ";
|
|
720
|
+
}, _ref13 => {
|
|
749
721
|
let {
|
|
750
722
|
$fill
|
|
751
723
|
} = _ref13;
|
|
752
|
-
return $fill &&
|
|
753
|
-
|
|
754
|
-
border-color: transparent;
|
|
755
|
-
`;
|
|
756
|
-
}}
|
|
757
|
-
|
|
758
|
-
${_ref14 => {
|
|
724
|
+
return $fill && "\n background: var(--color-background2);\n border-color: transparent;\n ";
|
|
725
|
+
}, _ref14 => {
|
|
759
726
|
let {
|
|
760
727
|
fillReverse
|
|
761
728
|
} = _ref14;
|
|
762
|
-
return fillReverse &&
|
|
763
|
-
|
|
764
|
-
border-color: transparent;
|
|
765
|
-
`;
|
|
766
|
-
}}
|
|
767
|
-
`;
|
|
729
|
+
return fillReverse && "\n background: var(--color-background1);\n border-color: transparent;\n ";
|
|
730
|
+
});
|
|
768
731
|
Combobox.displayName = 'Combobox';
|
|
769
|
-
const CloseButton = (0, _styledComponents.default)(_md.MdClose)
|
|
770
|
-
position: absolute;
|
|
771
|
-
top: 50%;
|
|
772
|
-
transform: translateY(-50%);
|
|
773
|
-
color: var(--color-primary);
|
|
774
|
-
font-size: var(--font-body1);
|
|
775
|
-
right: var(--spacing-l);
|
|
776
|
-
|
|
777
|
-
${_media.default.tablet`
|
|
778
|
-
right: calc(var(--spacing) + var(--spacing-s));
|
|
779
|
-
`};
|
|
780
|
-
`;
|
|
732
|
+
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 "]))));
|
|
781
733
|
CloseButton.displayName = 'CloseButton';
|
|
782
|
-
const ExpandArrow = (0, _styledComponents.default)(_ti.TiArrowSortedDown)
|
|
783
|
-
position: absolute;
|
|
784
|
-
top: 50%;
|
|
785
|
-
transform: translateY(-50%);
|
|
786
|
-
color: var(--color-primary);
|
|
787
|
-
font-size: var(--font-body1);
|
|
788
|
-
right: var(--spacing-s);
|
|
789
|
-
`;
|
|
734
|
+
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"])));
|
|
790
735
|
ExpandArrow.displayName = 'ExpandArrow';
|
|
791
|
-
const Message = _styledComponents.default.p
|
|
792
|
-
margin: 0;
|
|
793
|
-
padding: 12px var(--spacing-s);
|
|
794
|
-
`;
|
|
736
|
+
const Message = _styledComponents.default.p(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin: 0;\n padding: 12px var(--spacing-s);\n"])));
|
|
795
737
|
Message.displayName = 'Message';
|
|
796
|
-
const OptionBadge = _styledComponents.default.span
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
`;
|
|
800
|
-
const OptionLabel = _styledComponents.default.div`
|
|
801
|
-
min-width: 0;
|
|
802
|
-
`;
|
|
803
|
-
const OptionHighlight = _styledComponents.default.span`
|
|
804
|
-
color: ${_ref15 => {
|
|
738
|
+
const OptionBadge = _styledComponents.default.span(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: var(--color-danger);\n font-style: italic;\n"])));
|
|
739
|
+
const OptionLabel = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n min-width: 0;\n"])));
|
|
740
|
+
const OptionHighlight = _styledComponents.default.span(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n color: ", ";\n"])), _ref15 => {
|
|
805
741
|
let {
|
|
806
742
|
$color
|
|
807
743
|
} = _ref15;
|
|
808
744
|
return $color || 'var(--color-danger)';
|
|
809
|
-
}
|
|
810
|
-
`;
|
|
745
|
+
});
|
|
811
746
|
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;
|