@cashub/ui 0.46.1 → 0.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +14 -20
- 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/layout/Sidebar.jsx +33 -3
- 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 +19 -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/modal/TitleModal.js
CHANGED
|
@@ -15,19 +15,9 @@ var _scrollbar = _interopRequireDefault(require("../styles/mixin/scrollbar"));
|
|
|
15
15
|
var _Heading = _interopRequireDefault(require("../heading/Heading3"));
|
|
16
16
|
var _ModalBackdrop = _interopRequireDefault(require("../backdrop/ModalBackdrop"));
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
19
|
-
const _excluded = ["children"];
|
|
20
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
19
|
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); }
|
|
22
20
|
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; }
|
|
23
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
24
|
-
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; }
|
|
25
|
-
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; }
|
|
26
|
-
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; }
|
|
27
|
-
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; }
|
|
28
|
-
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; }
|
|
29
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
30
|
-
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); }
|
|
31
21
|
const TitleModal = props => {
|
|
32
22
|
const rootElement = (0, _utils.appendElementTo)('TitleModalContainer');
|
|
33
23
|
const Container = document.createElement('div');
|
|
@@ -55,10 +45,11 @@ const TitleModal = props => {
|
|
|
55
45
|
const methods = {
|
|
56
46
|
close: handleClose
|
|
57
47
|
};
|
|
58
|
-
_reactDom.default.render(/*#__PURE__*/(0, _jsxRuntime.jsx)(ModalContent,
|
|
48
|
+
_reactDom.default.render(/*#__PURE__*/(0, _jsxRuntime.jsx)(ModalContent, {
|
|
49
|
+
...props,
|
|
59
50
|
onClose: handleClose,
|
|
60
51
|
methods: methods
|
|
61
|
-
})
|
|
52
|
+
}), Container);
|
|
62
53
|
};
|
|
63
54
|
const ModalContent = _ref => {
|
|
64
55
|
let {
|
|
@@ -109,9 +100,9 @@ const ModalHeader = _ref2 => {
|
|
|
109
100
|
};
|
|
110
101
|
const ModalBody = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
111
102
|
let {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
103
|
+
children,
|
|
104
|
+
...props
|
|
105
|
+
} = _ref3;
|
|
115
106
|
const ownRef = (0, _react.useRef)(null);
|
|
116
107
|
const bodyRef = (0, _hooks.useForkRef)(ownRef, ref);
|
|
117
108
|
const recalculateHeight = (0, _react.useCallback)(() => {
|
|
@@ -127,18 +118,18 @@ const ModalBody = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
|
127
118
|
if (ModalFooterElement) {
|
|
128
119
|
needSubtractHeight += ModalFooterElement.offsetHeight;
|
|
129
120
|
}
|
|
130
|
-
ModalBodyElement.style.maxHeight =
|
|
121
|
+
ModalBodyElement.style.maxHeight = `calc(90vh - ${needSubtractHeight}px)`;
|
|
131
122
|
}, []);
|
|
132
123
|
(0, _react.useEffect)(() => {
|
|
133
124
|
recalculateHeight();
|
|
134
125
|
window.addEventListener('resize', recalculateHeight);
|
|
135
126
|
return () => window.removeEventListener('resize', recalculateHeight);
|
|
136
127
|
}, [recalculateHeight]);
|
|
137
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Body,
|
|
138
|
-
ref: bodyRef
|
|
139
|
-
|
|
128
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Body, {
|
|
129
|
+
ref: bodyRef,
|
|
130
|
+
...props,
|
|
140
131
|
children: children
|
|
141
|
-
})
|
|
132
|
+
});
|
|
142
133
|
});
|
|
143
134
|
ModalBody.displayName = 'ModalBody';
|
|
144
135
|
const ModalFooter = _ref4 => {
|
|
@@ -149,8 +140,18 @@ const ModalFooter = _ref4 => {
|
|
|
149
140
|
children: children
|
|
150
141
|
});
|
|
151
142
|
};
|
|
152
|
-
const Wrapper = (0, _styledComponents.default)(_ModalBackdrop.default)
|
|
153
|
-
|
|
143
|
+
const Wrapper = (0, _styledComponents.default)(_ModalBackdrop.default)`
|
|
144
|
+
z-index: 80;
|
|
145
|
+
`;
|
|
146
|
+
const Container = _styledComponents.default.div`
|
|
147
|
+
position: relative;
|
|
148
|
+
border-radius: var(--border-radius);
|
|
149
|
+
background: var(--color-background2);
|
|
150
|
+
box-shadow: var(--box-shadow);
|
|
151
|
+
border: var(--border-width) solid var(--border-color);
|
|
152
|
+
width: 100%;
|
|
153
|
+
|
|
154
|
+
${_ref5 => {
|
|
154
155
|
let {
|
|
155
156
|
size
|
|
156
157
|
} = _ref5;
|
|
@@ -166,7 +167,10 @@ const Container = _styledComponents.default.div(_templateObject2 || (_templateOb
|
|
|
166
167
|
default:
|
|
167
168
|
break;
|
|
168
169
|
}
|
|
169
|
-
}
|
|
170
|
+
}}
|
|
171
|
+
|
|
172
|
+
${_media.default.tablet`
|
|
173
|
+
${_ref6 => {
|
|
170
174
|
let {
|
|
171
175
|
size
|
|
172
176
|
} = _ref6;
|
|
@@ -181,7 +185,11 @@ const Container = _styledComponents.default.div(_templateObject2 || (_templateOb
|
|
|
181
185
|
default:
|
|
182
186
|
break;
|
|
183
187
|
}
|
|
184
|
-
}
|
|
188
|
+
}}
|
|
189
|
+
`}
|
|
190
|
+
|
|
191
|
+
${_media.default.mobile`
|
|
192
|
+
${_ref7 => {
|
|
185
193
|
let {
|
|
186
194
|
size
|
|
187
195
|
} = _ref7;
|
|
@@ -193,15 +201,48 @@ const Container = _styledComponents.default.div(_templateObject2 || (_templateOb
|
|
|
193
201
|
default:
|
|
194
202
|
break;
|
|
195
203
|
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
204
|
+
}}
|
|
205
|
+
`}
|
|
206
|
+
`;
|
|
207
|
+
const Header = _styledComponents.default.div`
|
|
208
|
+
display: flex;
|
|
209
|
+
align-items: center;
|
|
210
|
+
padding: var(--spacing-s) 56px var(--spacing-s) var(--spacing-s);
|
|
211
|
+
border-bottom: var(--border-width) solid var(--border-color);
|
|
212
|
+
min-height: 64px;
|
|
213
|
+
color: var(--font-on-background);
|
|
214
|
+
|
|
215
|
+
> svg {
|
|
216
|
+
position: absolute;
|
|
217
|
+
top: 24px;
|
|
218
|
+
right: calc(12px + var(--spacing));
|
|
219
|
+
color: var(--font-on-mute);
|
|
220
|
+
font-size: var(--font-body1);
|
|
221
|
+
cursor: pointer;
|
|
222
|
+
}
|
|
223
|
+
`;
|
|
224
|
+
const Body = _styledComponents.default.div`
|
|
225
|
+
padding: var(--spacing);
|
|
226
|
+
overflow-y: auto;
|
|
227
|
+
overflow-x: hidden;
|
|
228
|
+
|
|
229
|
+
${_scrollbar.default}
|
|
230
|
+
|
|
231
|
+
${_ref8 => {
|
|
199
232
|
let {
|
|
200
233
|
noPaddingBottom
|
|
201
234
|
} = _ref8;
|
|
202
235
|
return noPaddingBottom && 'padding-bottom: 0;';
|
|
203
|
-
}
|
|
204
|
-
|
|
236
|
+
}}
|
|
237
|
+
`;
|
|
238
|
+
const Footer = _styledComponents.default.div`
|
|
239
|
+
display: flex;
|
|
240
|
+
justify-content: flex-end;
|
|
241
|
+
padding: 0 var(--spacing);
|
|
242
|
+
border-top: var(--border-width) solid var(--border-color);
|
|
243
|
+
height: 64px;
|
|
244
|
+
line-height: 64px;
|
|
245
|
+
`;
|
|
205
246
|
var _default = exports.default = Object.assign(TitleModal, {
|
|
206
247
|
Header: ModalHeader,
|
|
207
248
|
Body: ModalBody,
|
package/package.json
CHANGED
package/page/Disclaimer.js
CHANGED
|
@@ -5,8 +5,124 @@ 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 Disclaimer = _styledComponents.default.div`
|
|
10
|
+
border: var(--border-width) solid var(--border-color);
|
|
11
|
+
border-radius: var(--border-radius);
|
|
12
|
+
color: var(--font-on-background);
|
|
13
|
+
padding: var(--spacing);
|
|
14
|
+
|
|
15
|
+
> article {
|
|
16
|
+
line-height: 1.5;
|
|
17
|
+
|
|
18
|
+
&:not(:last-child) {
|
|
19
|
+
padding-bottom: var(--spacing-l);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
> h2 {
|
|
23
|
+
text-align: center;
|
|
24
|
+
margin-bottom: var(--spacing-l);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
> em {
|
|
28
|
+
display: block;
|
|
29
|
+
margin-bottom: var(--spacing-s);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
> section {
|
|
33
|
+
margin-bottom: var(--spacing);
|
|
34
|
+
|
|
35
|
+
> h3 {
|
|
36
|
+
margin-bottom: var(--spacing-xs);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
> p {
|
|
40
|
+
margin-bottom: var(--spacing-xs);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
ul {
|
|
44
|
+
margin: var(--spacing-s) 0;
|
|
45
|
+
|
|
46
|
+
li {
|
|
47
|
+
margin: var(--spacing-xs) 0 var(--spacing-xs) var(--spacing-s);
|
|
48
|
+
|
|
49
|
+
&.disc {
|
|
50
|
+
list-style: disc;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
ol {
|
|
56
|
+
padding: 0;
|
|
57
|
+
margin: var(--spacing-xs) 0 var(--spacing-xs) var(--spacing-s);
|
|
58
|
+
|
|
59
|
+
&.counter-number {
|
|
60
|
+
counter-reset: number;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.counter-number-alpha {
|
|
64
|
+
counter-reset: number alpha;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.nested-counter-number {
|
|
68
|
+
counter-reset: nested-number;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.ml-0 {
|
|
72
|
+
margin-left: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
li {
|
|
76
|
+
margin: var(--spacing-s) 0;
|
|
77
|
+
|
|
78
|
+
&.decimal {
|
|
79
|
+
list-style: decimal;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&.counter-number-increment {
|
|
83
|
+
counter-increment: number;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&.counter-alpha-increment {
|
|
87
|
+
counter-increment: alpha;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&.counter-number {
|
|
91
|
+
display: flex;
|
|
92
|
+
margin: var(--spacing-xs) 0;
|
|
93
|
+
|
|
94
|
+
&::before {
|
|
95
|
+
margin-right: var(--spacing-xs);
|
|
96
|
+
content: counters(number, '.') ' ';
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&.counter-alpha {
|
|
101
|
+
display: flex;
|
|
102
|
+
margin: var(--spacing-xs) 0;
|
|
103
|
+
|
|
104
|
+
&::before {
|
|
105
|
+
margin-right: var(--spacing-xs);
|
|
106
|
+
content: '(' counter(alpha, upper-alpha) ')';
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&.nested-counter-number-increment {
|
|
111
|
+
counter-increment: nested-number;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&.nested-counter-number {
|
|
115
|
+
display: flex;
|
|
116
|
+
margin: var(--spacing-xs) 0;
|
|
117
|
+
|
|
118
|
+
&::before {
|
|
119
|
+
margin-right: var(--spacing-xs);
|
|
120
|
+
content: counters(number, '.') '.' counters(nested-number, '.');
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
`;
|
|
12
128
|
var _default = exports.default = Disclaimer;
|
package/paginate/Paginate.js
CHANGED
|
@@ -8,10 +8,8 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
8
8
|
var _fa = require("react-icons/fa");
|
|
9
9
|
var _hooks = require("@cashub/hooks");
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
12
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); }
|
|
13
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; }
|
|
14
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
15
13
|
const Paginate = props => {
|
|
16
14
|
const {
|
|
17
15
|
currentPage,
|
|
@@ -68,28 +66,72 @@ const Paginate = props => {
|
|
|
68
66
|
})]
|
|
69
67
|
});
|
|
70
68
|
};
|
|
71
|
-
const Container = _styledComponents.default.ul
|
|
69
|
+
const Container = _styledComponents.default.ul`
|
|
70
|
+
display: flex;
|
|
71
|
+
text-align: center;
|
|
72
|
+
|
|
73
|
+
${_ref => {
|
|
72
74
|
let {
|
|
73
75
|
alignRight
|
|
74
76
|
} = _ref;
|
|
75
77
|
return alignRight && 'justify-content: flex-end';
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
+
}};
|
|
79
|
+
`;
|
|
80
|
+
const Link = _styledComponents.default.li`
|
|
81
|
+
width: 36px;
|
|
82
|
+
line-height: 37px;
|
|
83
|
+
font-size: var(--font-body1);
|
|
84
|
+
color: var(--font-on-background);
|
|
85
|
+
border-radius: var(--border-radius-round);
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
transition: 0.3s;
|
|
88
|
+
|
|
89
|
+
&:not(:last-child) {
|
|
90
|
+
margin-right: var(--spacing-xs);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
${_ref2 => {
|
|
78
94
|
let {
|
|
79
95
|
disabled
|
|
80
96
|
} = _ref2;
|
|
81
|
-
return disabled && (0, _styledComponents.css)
|
|
82
|
-
|
|
97
|
+
return disabled && (0, _styledComponents.css)`
|
|
98
|
+
opacity: 0.5;
|
|
99
|
+
cursor: no-drop;
|
|
100
|
+
`;
|
|
101
|
+
}};
|
|
102
|
+
|
|
103
|
+
${_ref3 => {
|
|
83
104
|
let {
|
|
84
105
|
active
|
|
85
106
|
} = _ref3;
|
|
86
|
-
return active &&
|
|
87
|
-
|
|
107
|
+
return active && `
|
|
108
|
+
background-color: var(--color-primary);
|
|
109
|
+
color: var(--font-on-primary);
|
|
110
|
+
`;
|
|
111
|
+
}}
|
|
112
|
+
|
|
113
|
+
&:hover {
|
|
114
|
+
${_ref4 => {
|
|
88
115
|
let {
|
|
89
116
|
disabled,
|
|
90
117
|
className
|
|
91
118
|
} = _ref4;
|
|
92
|
-
return !disabled && !className &&
|
|
93
|
-
|
|
94
|
-
|
|
119
|
+
return !disabled && !className && `
|
|
120
|
+
background-color: var(--color-primary);
|
|
121
|
+
color: var(--font-on-primary);
|
|
122
|
+
`;
|
|
123
|
+
}}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&.paginationDots {
|
|
127
|
+
cursor: default;
|
|
128
|
+
}
|
|
129
|
+
`;
|
|
130
|
+
const Icon = _styledComponents.default.span`
|
|
131
|
+
font-size: var(--font-body1);
|
|
132
|
+
display: flex;
|
|
133
|
+
justify-content: center;
|
|
134
|
+
align-items: center;
|
|
135
|
+
height: 100%;
|
|
136
|
+
`;
|
|
95
137
|
var _default = exports.default = Paginate;
|
package/popover/Popover.js
CHANGED
|
@@ -11,41 +11,32 @@ var _reactOutsideClickHandler = _interopRequireDefault(require("react-outside-cl
|
|
|
11
11
|
var _hooks = require("@cashub/hooks");
|
|
12
12
|
var _utils = require("@cashub/utils");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
var _templateObject, _templateObject2;
|
|
15
|
-
const _excluded = ["container", "id"];
|
|
16
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.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; }
|
|
19
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
20
|
-
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; }
|
|
21
|
-
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; }
|
|
22
|
-
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; }
|
|
23
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
24
|
-
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); }
|
|
25
|
-
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; }
|
|
26
|
-
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; }
|
|
27
17
|
const Popover = _ref => {
|
|
28
18
|
let {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
container,
|
|
20
|
+
id,
|
|
21
|
+
...props
|
|
22
|
+
} = _ref;
|
|
33
23
|
const rootElement = (0, _utils.appendElementTo)('PopoverContainer', 'div', container);
|
|
34
24
|
const handleClose = () => {
|
|
35
25
|
// unmount component and clear event handler and state before remove container
|
|
36
26
|
(0, _reactDom.unmountComponentAtNode)(rootElement);
|
|
37
27
|
rootElement.remove();
|
|
38
28
|
};
|
|
39
|
-
const result = document.getElementById(
|
|
29
|
+
const result = document.getElementById(`popover${id}`);
|
|
40
30
|
// found previous element mean want to close popover now, so remove it
|
|
41
31
|
if (result) {
|
|
42
32
|
handleClose();
|
|
43
33
|
return;
|
|
44
34
|
}
|
|
45
|
-
_reactDom.default.render(/*#__PURE__*/(0, _jsxRuntime.jsx)(Box,
|
|
46
|
-
|
|
35
|
+
_reactDom.default.render(/*#__PURE__*/(0, _jsxRuntime.jsx)(Box, {
|
|
36
|
+
...props,
|
|
37
|
+
id: `popover${id}`,
|
|
47
38
|
handleClose: handleClose
|
|
48
|
-
})
|
|
39
|
+
}), rootElement);
|
|
49
40
|
};
|
|
50
41
|
const Box = _ref2 => {
|
|
51
42
|
let {
|
|
@@ -65,22 +56,36 @@ const Box = _ref2 => {
|
|
|
65
56
|
});
|
|
66
57
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactOutsideClickHandler.default, {
|
|
67
58
|
onOutsideClick: event => {
|
|
68
|
-
if (
|
|
59
|
+
if (`popover${event.target.id}` !== id) {
|
|
69
60
|
handleClose();
|
|
70
61
|
}
|
|
71
62
|
},
|
|
72
63
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Wrapper, {
|
|
73
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(PopoverBox,
|
|
64
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(PopoverBox, {
|
|
74
65
|
id: id,
|
|
75
66
|
ref: setTooltipElement,
|
|
76
|
-
style: styles.popper
|
|
77
|
-
|
|
67
|
+
style: styles.popper,
|
|
68
|
+
...attributes.popper,
|
|
78
69
|
placement: state && state.placement,
|
|
79
70
|
children: content
|
|
80
|
-
})
|
|
71
|
+
})
|
|
81
72
|
})
|
|
82
73
|
});
|
|
83
74
|
};
|
|
84
|
-
const Wrapper = _styledComponents.default.div
|
|
85
|
-
|
|
75
|
+
const Wrapper = _styledComponents.default.div`
|
|
76
|
+
position: relative;
|
|
77
|
+
`;
|
|
78
|
+
const PopoverBox = _styledComponents.default.div`
|
|
79
|
+
border: 1px solid var(--border-color);
|
|
80
|
+
color: var(--font-on-background);
|
|
81
|
+
background: var(--color-background2);
|
|
82
|
+
box-shadow: var(--box-shadow);
|
|
83
|
+
border-radius: calc(var(--border-radius) / 2);
|
|
84
|
+
padding: var(--spacing-xs);
|
|
85
|
+
z-index: 80;
|
|
86
|
+
font-size: var(--font-body1);
|
|
87
|
+
font-weight: var(--font-normal);
|
|
88
|
+
max-width: 50vw;
|
|
89
|
+
word-break: break-all;
|
|
90
|
+
`;
|
|
86
91
|
var _default = exports.default = Popover;
|
package/qrcode/QRCode.js
CHANGED
|
@@ -8,9 +8,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
var _qrcode = _interopRequireDefault(require("qrcode.react"));
|
|
9
9
|
var _cashubLogoOnly = _interopRequireDefault(require("../assets/images/cashub-logo-only.png"));
|
|
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
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
14
12
|
const QRCodeBox = _ref => {
|
|
15
13
|
let {
|
|
16
14
|
content,
|
|
@@ -37,8 +35,24 @@ const QRCodeBox = _ref => {
|
|
|
37
35
|
})]
|
|
38
36
|
});
|
|
39
37
|
};
|
|
40
|
-
const Wrapper = _styledComponents.default.div
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
const Wrapper = _styledComponents.default.div`
|
|
39
|
+
color: var(--font-on-background);
|
|
40
|
+
text-align: center;
|
|
41
|
+
font-weight: var(--font-bold);
|
|
42
|
+
`;
|
|
43
|
+
const Container = _styledComponents.default.div`
|
|
44
|
+
display: inline-block;
|
|
45
|
+
padding: var(--spacing);
|
|
46
|
+
background: #fff;
|
|
47
|
+
border-radius: var(--border-radius);
|
|
48
|
+
`;
|
|
49
|
+
const Text = _styledComponents.default.p`
|
|
50
|
+
margin-top: var(--spacing-s);
|
|
51
|
+
font-size: var(--font-h3);
|
|
52
|
+
color: #000;
|
|
53
|
+
`;
|
|
54
|
+
const Message = _styledComponents.default.p`
|
|
55
|
+
margin-top: var(--spacing);
|
|
56
|
+
font-size: var(--font-h2);
|
|
57
|
+
`;
|
|
44
58
|
var _default = exports.default = QRCodeBox;
|
|
@@ -6,9 +6,7 @@ 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, _templateObject2;
|
|
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
10
|
const QRCodeContainter = _ref => {
|
|
13
11
|
let {
|
|
14
12
|
src,
|
|
@@ -21,6 +19,16 @@ const QRCodeContainter = _ref => {
|
|
|
21
19
|
})
|
|
22
20
|
});
|
|
23
21
|
};
|
|
24
|
-
const Figure = _styledComponents.default.figure
|
|
25
|
-
|
|
22
|
+
const Figure = _styledComponents.default.figure`
|
|
23
|
+
height: 240px;
|
|
24
|
+
padding: var(--spacing-s);
|
|
25
|
+
text-align: center;
|
|
26
|
+
border: var(--border-width) solid var(--border-color);
|
|
27
|
+
border-radius: var(--border-radius);
|
|
28
|
+
`;
|
|
29
|
+
const Image = _styledComponents.default.img`
|
|
30
|
+
height: 100%;
|
|
31
|
+
object-fit: contain;
|
|
32
|
+
border-radius: var(--border-radius);
|
|
33
|
+
`;
|
|
26
34
|
var _default = exports.default = QRCodeContainter;
|
package/ribbon/Ribbon.js
CHANGED
|
@@ -7,11 +7,36 @@ exports.default = void 0;
|
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
var _backgroundColor = _interopRequireDefault(require("../styles/mixin/backgroundColor"));
|
|
9
9
|
var _colorOnBackground = _interopRequireDefault(require("../styles/mixin/colorOnBackground"));
|
|
10
|
-
var _templateObject, _templateObject2;
|
|
11
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
const Ribbon = _styledComponents.default.div`
|
|
12
|
+
width: 120px;
|
|
13
|
+
height: 120px;
|
|
14
|
+
position: absolute;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
top: -3px;
|
|
17
|
+
left: -3px;
|
|
18
|
+
`;
|
|
19
|
+
const RibbonContent = _styledComponents.default.span`
|
|
20
|
+
position: absolute;
|
|
21
|
+
text-transform: uppercase;
|
|
22
|
+
text-align: center;
|
|
23
|
+
display: block;
|
|
24
|
+
width: 200px;
|
|
25
|
+
transform: rotate(-45deg);
|
|
26
|
+
top: 25px;
|
|
27
|
+
right: -25px;
|
|
28
|
+
padding: 5px 0;
|
|
29
|
+
|
|
30
|
+
&::before,
|
|
31
|
+
&::after {
|
|
32
|
+
display: block;
|
|
33
|
+
content: '';
|
|
34
|
+
border: 1px solid rgba(255, 255, 255, 0.4);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
${_backgroundColor.default}
|
|
38
|
+
${_colorOnBackground.default}
|
|
39
|
+
`;
|
|
15
40
|
var _default = exports.default = Object.assign(Ribbon, {
|
|
16
41
|
Content: RibbonContent
|
|
17
42
|
});
|