@doist/reactist 25.0.0-beta.2 → 25.0.0-beta.3
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/README.md +35 -16
- package/dist/reactist.cjs.development.js +448 -422
- package/dist/reactist.cjs.development.js.map +1 -1
- package/dist/reactist.cjs.production.min.js +1 -1
- package/dist/reactist.cjs.production.min.js.map +1 -1
- package/es/alert/alert.js +13 -13
- package/es/alert/alert.js.map +1 -1
- package/es/alert/alert.module.css.js +1 -1
- package/es/avatar/avatar.js +6 -6
- package/es/avatar/avatar.js.map +1 -1
- package/es/avatar/avatar.module.css.js +1 -1
- package/es/avatar/utils.js.map +1 -1
- package/es/badge/badge.js +4 -4
- package/es/badge/badge.js.map +1 -1
- package/es/badge/badge.module.css.js +1 -1
- package/es/banner/banner.js +16 -16
- package/es/banner/banner.js.map +1 -1
- package/es/banner/banner.module.css.js +1 -1
- package/es/base-field/base-field.js +25 -25
- package/es/base-field/base-field.js.map +1 -1
- package/es/base-field/base-field.module.css.js +1 -1
- package/es/box/box.js +12 -12
- package/es/box/box.js.map +1 -1
- package/es/box/box.module.css.js +1 -1
- package/es/box/gap.module.css.js +1 -1
- package/es/box/margin.module.css.js +1 -1
- package/es/box/padding.module.css.js +1 -1
- package/es/box/width.module.css.js +1 -1
- package/es/button/button.js +19 -19
- package/es/button/button.js.map +1 -1
- package/es/button/button.module.css.js +1 -1
- package/es/checkbox-field/checkbox-field.js +16 -16
- package/es/checkbox-field/checkbox-field.js.map +1 -1
- package/es/checkbox-field/checkbox-field.module.css.js +1 -1
- package/es/checkbox-field/checkbox-icon.js +3 -3
- package/es/checkbox-field/checkbox-icon.js.map +1 -1
- package/es/checkbox-field/use-fork-ref.js.map +1 -1
- package/es/columns/columns.js +6 -6
- package/es/columns/columns.js.map +1 -1
- package/es/columns/columns.module.css.js +1 -1
- package/es/components/color-picker/color-picker.js +11 -11
- package/es/components/color-picker/color-picker.js.map +1 -1
- package/es/components/color-picker/index.js +1 -5
- package/es/components/color-picker/index.js.map +1 -1
- package/es/components/deprecated-button/deprecated-button.js +4 -4
- package/es/components/deprecated-button/deprecated-button.js.map +1 -1
- package/es/components/deprecated-button/index.js +1 -4
- package/es/components/deprecated-button/index.js.map +1 -1
- package/es/components/deprecated-dropdown/dropdown.js +11 -11
- package/es/components/deprecated-dropdown/dropdown.js.map +1 -1
- package/es/components/deprecated-dropdown/index.js +1 -4
- package/es/components/deprecated-dropdown/index.js.map +1 -1
- package/es/components/deprecated-input/index.js +1 -4
- package/es/components/deprecated-input/index.js.map +1 -1
- package/es/components/deprecated-input/input.js +3 -3
- package/es/components/deprecated-input/input.js.map +1 -1
- package/es/components/deprecated-select/index.js +1 -4
- package/es/components/deprecated-select/index.js.map +1 -1
- package/es/components/deprecated-select/select.js +3 -3
- package/es/components/deprecated-select/select.js.map +1 -1
- package/es/components/key-capturer/index.js +1 -5
- package/es/components/key-capturer/index.js.map +1 -1
- package/es/components/key-capturer/key-capturer.js +3 -3
- package/es/components/key-capturer/key-capturer.js.map +1 -1
- package/es/components/keyboard-shortcut/index.js +1 -4
- package/es/components/keyboard-shortcut/index.js.map +1 -1
- package/es/components/keyboard-shortcut/keyboard-shortcut.js +4 -4
- package/es/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/es/components/progress-bar/index.js +1 -4
- package/es/components/progress-bar/index.js.map +1 -1
- package/es/components/progress-bar/progress-bar.js +5 -5
- package/es/components/progress-bar/progress-bar.js.map +1 -1
- package/es/components/time/index.js +1 -4
- package/es/components/time/index.js.map +1 -1
- package/es/components/time/time-utils.js.map +1 -1
- package/es/components/time/time.js +5 -5
- package/es/components/time/time.js.map +1 -1
- package/es/divider/divider.js +4 -4
- package/es/divider/divider.js.map +1 -1
- package/es/divider/divider.module.css.js +1 -1
- package/es/heading/heading.js +5 -5
- package/es/heading/heading.js.map +1 -1
- package/es/heading/heading.module.css.js +1 -1
- package/es/hidden/hidden.js +5 -5
- package/es/hidden/hidden.js.map +1 -1
- package/es/hidden/hidden.module.css.js +1 -1
- package/es/hidden-visually/hidden-visually.js +4 -4
- package/es/hidden-visually/hidden-visually.js.map +1 -1
- package/es/hidden-visually/hidden-visually.module.css.js +1 -1
- package/es/icons/alert-icon.js +10 -10
- package/es/icons/alert-icon.js.map +1 -1
- package/es/icons/close-icon.js +3 -3
- package/es/icons/close-icon.js.map +1 -1
- package/es/icons/password-hidden-icon.js +6 -6
- package/es/icons/password-hidden-icon.js.map +1 -1
- package/es/icons/password-visible-icon.js +5 -5
- package/es/icons/password-visible-icon.js.map +1 -1
- package/es/index.js +13 -15
- package/es/index.js.map +1 -1
- package/es/inline/inline.js +2 -2
- package/es/inline/inline.js.map +1 -1
- package/es/loading/loading.js +3 -3
- package/es/loading/loading.js.map +1 -1
- package/es/menu/menu.js +32 -32
- package/es/menu/menu.js.map +1 -1
- package/es/modal/modal.js +45 -45
- package/es/modal/modal.js.map +1 -1
- package/es/modal/modal.module.css.js +1 -1
- package/es/notice/notice.js +8 -8
- package/es/notice/notice.js.map +1 -1
- package/es/notice/notice.module.css.js +1 -1
- package/es/password-field/password-field.js +7 -7
- package/es/password-field/password-field.js.map +1 -1
- package/es/prose/prose.js +4 -4
- package/es/prose/prose.js.map +1 -1
- package/es/prose/prose.module.css.js +1 -1
- package/es/select-field/select-field.js +11 -11
- package/es/select-field/select-field.js.map +1 -1
- package/es/select-field/select-field.module.css.js +1 -1
- package/es/spinner/spinner.js +9 -9
- package/es/spinner/spinner.js.map +1 -1
- package/es/spinner/spinner.module.css.js +1 -1
- package/es/stack/stack.js +4 -4
- package/es/stack/stack.js.map +1 -1
- package/es/switch-field/switch-field.js +18 -18
- package/es/switch-field/switch-field.js.map +1 -1
- package/es/switch-field/switch-field.module.css.js +1 -1
- package/es/tabs/tabs.js +23 -23
- package/es/tabs/tabs.js.map +1 -1
- package/es/tabs/tabs.module.css.js +1 -1
- package/es/text/text.js +5 -5
- package/es/text/text.js.map +1 -1
- package/es/text/text.module.css.js +1 -1
- package/es/text-area/text-area.js +14 -14
- package/es/text-area/text-area.js.map +1 -1
- package/es/text-area/text-area.module.css.js +1 -1
- package/es/text-field/text-field.js +13 -13
- package/es/text-field/text-field.js.map +1 -1
- package/es/text-field/text-field.module.css.js +1 -1
- package/es/text-link/text-link.js +5 -5
- package/es/text-link/text-link.js.map +1 -1
- package/es/text-link/text-link.module.css.js +1 -1
- package/es/toast/static-toast.js +5 -5
- package/es/toast/static-toast.js.map +1 -1
- package/es/toast/toast-animation.js.map +1 -1
- package/es/toast/toast.module.css.js +1 -1
- package/es/toast/use-toasts.js +4 -4
- package/es/toast/use-toasts.js.map +1 -1
- package/es/tooltip/tooltip.js +9 -9
- package/es/tooltip/tooltip.js.map +1 -1
- package/es/tooltip/tooltip.module.css.js +1 -1
- package/es/utils/common-helpers.js +2 -2
- package/es/utils/common-helpers.js.map +1 -1
- package/es/utils/polymorphism.js +2 -2
- package/es/utils/polymorphism.js.map +1 -1
- package/es/utils/responsive-props.js.map +1 -1
- package/lib/alert/alert.d.ts +3 -3
- package/lib/alert/alert.js +1 -1
- package/lib/alert/alert.js.map +1 -1
- package/lib/avatar/avatar.d.ts +2 -2
- package/lib/avatar/avatar.js +1 -1
- package/lib/avatar/avatar.js.map +1 -1
- package/lib/avatar/utils.js.map +1 -1
- package/lib/badge/badge.d.ts +2 -2
- package/lib/badge/badge.js +1 -1
- package/lib/badge/badge.js.map +1 -1
- package/lib/banner/banner.d.ts +2 -2
- package/lib/banner/banner.js +1 -1
- package/lib/banner/banner.js.map +1 -1
- package/lib/base-field/base-field.d.ts +9 -9
- package/lib/base-field/base-field.js +1 -1
- package/lib/base-field/base-field.js.map +1 -1
- package/lib/box/box.d.ts +15 -15
- package/lib/box/box.js +1 -1
- package/lib/box/box.js.map +1 -1
- package/lib/button/button.d.ts +4 -4
- package/lib/button/button.js +1 -1
- package/lib/button/button.js.map +1 -1
- package/lib/checkbox-field/checkbox-field.js +1 -1
- package/lib/checkbox-field/checkbox-field.js.map +1 -1
- package/lib/checkbox-field/checkbox-icon.d.ts +1 -1
- package/lib/checkbox-field/checkbox-icon.js +1 -1
- package/lib/checkbox-field/checkbox-icon.js.map +1 -1
- package/lib/checkbox-field/use-fork-ref.js.map +1 -1
- package/lib/columns/columns.d.ts +4 -4
- package/lib/columns/columns.js +1 -1
- package/lib/columns/columns.js.map +1 -1
- package/lib/components/color-picker/color-picker.d.ts +3 -3
- package/lib/components/color-picker/color-picker.js +1 -1
- package/lib/components/color-picker/color-picker.js.map +1 -1
- package/lib/components/deprecated-button/deprecated-button.d.ts +4 -4
- package/lib/components/deprecated-button/deprecated-button.js +1 -1
- package/lib/components/deprecated-button/deprecated-button.js.map +1 -1
- package/lib/components/deprecated-dropdown/dropdown.d.ts +5 -5
- package/lib/components/deprecated-dropdown/dropdown.js +1 -1
- package/lib/components/deprecated-dropdown/dropdown.js.map +1 -1
- package/lib/components/deprecated-input/input.js +1 -1
- package/lib/components/deprecated-input/input.js.map +1 -1
- package/lib/components/deprecated-select/select.d.ts +2 -2
- package/lib/components/deprecated-select/select.js +1 -1
- package/lib/components/deprecated-select/select.js.map +1 -1
- package/lib/components/key-capturer/key-capturer.d.ts +5 -5
- package/lib/components/key-capturer/key-capturer.js +1 -1
- package/lib/components/key-capturer/key-capturer.js.map +1 -1
- package/lib/components/keyboard-shortcut/keyboard-shortcut.d.ts +3 -3
- package/lib/components/keyboard-shortcut/keyboard-shortcut.js +1 -1
- package/lib/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/lib/components/progress-bar/progress-bar.d.ts +1 -1
- package/lib/components/progress-bar/progress-bar.js +1 -1
- package/lib/components/progress-bar/progress-bar.js.map +1 -1
- package/lib/components/time/time-utils.d.ts +1 -1
- package/lib/components/time/time-utils.js +1 -1
- package/lib/components/time/time-utils.js.map +1 -1
- package/lib/components/time/time.d.ts +2 -2
- package/lib/components/time/time.js +1 -1
- package/lib/components/time/time.js.map +1 -1
- package/lib/divider/divider.js +1 -1
- package/lib/divider/divider.js.map +1 -1
- package/lib/heading/heading.d.ts +2 -2
- package/lib/heading/heading.js +1 -1
- package/lib/heading/heading.js.map +1 -1
- package/lib/hidden/hidden.d.ts +4 -4
- package/lib/hidden/hidden.js +1 -1
- package/lib/hidden/hidden.js.map +1 -1
- package/lib/hidden-visually/hidden-visually.d.ts +1 -1
- package/lib/hidden-visually/hidden-visually.js +1 -1
- package/lib/hidden-visually/hidden-visually.js.map +1 -1
- package/lib/icons/alert-icon.js +1 -1
- package/lib/icons/alert-icon.js.map +1 -1
- package/lib/icons/close-icon.js +1 -1
- package/lib/icons/close-icon.js.map +1 -1
- package/lib/icons/password-hidden-icon.js +1 -1
- package/lib/icons/password-hidden-icon.js.map +1 -1
- package/lib/icons/password-visible-icon.js +1 -1
- package/lib/icons/password-visible-icon.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/inline/inline.d.ts +1 -1
- package/lib/inline/inline.js +1 -1
- package/lib/inline/inline.js.map +1 -1
- package/lib/loading/loading.d.ts +3 -3
- package/lib/loading/loading.js +1 -1
- package/lib/loading/loading.js.map +1 -1
- package/lib/menu/menu.d.ts +1 -1
- package/lib/menu/menu.js +1 -1
- package/lib/menu/menu.js.map +1 -1
- package/lib/modal/modal-stories-components.d.ts +2 -2
- package/lib/modal/modal.d.ts +4 -4
- package/lib/modal/modal.js +1 -1
- package/lib/modal/modal.js.map +1 -1
- package/lib/notice/notice.d.ts +1 -1
- package/lib/notice/notice.js +1 -1
- package/lib/notice/notice.js.map +1 -1
- package/lib/password-field/password-field.js +1 -1
- package/lib/password-field/password-field.js.map +1 -1
- package/lib/prose/prose.js +1 -1
- package/lib/prose/prose.js.map +1 -1
- package/lib/select-field/select-field.js +1 -1
- package/lib/select-field/select-field.js.map +1 -1
- package/lib/spinner/spinner.js +1 -1
- package/lib/spinner/spinner.js.map +1 -1
- package/lib/stack/stack.d.ts +1 -1
- package/lib/stack/stack.js +1 -1
- package/lib/stack/stack.js.map +1 -1
- package/lib/switch-field/switch-field.js +1 -1
- package/lib/switch-field/switch-field.js.map +1 -1
- package/lib/tabs/tabs.d.ts +5 -6
- package/lib/tabs/tabs.js +1 -1
- package/lib/tabs/tabs.js.map +1 -1
- package/lib/text/text.d.ts +1 -1
- package/lib/text/text.js +1 -1
- package/lib/text/text.js.map +1 -1
- package/lib/text-area/text-area.js +1 -1
- package/lib/text-area/text-area.js.map +1 -1
- package/lib/text-field/text-field.d.ts +1 -1
- package/lib/text-field/text-field.js +1 -1
- package/lib/text-field/text-field.js.map +1 -1
- package/lib/text-link/text-link.d.ts +1 -1
- package/lib/text-link/text-link.js +1 -1
- package/lib/text-link/text-link.js.map +1 -1
- package/lib/toast/static-toast.d.ts +2 -2
- package/lib/toast/static-toast.js +1 -1
- package/lib/toast/static-toast.js.map +1 -1
- package/lib/toast/toast-animation.d.ts +1 -1
- package/lib/toast/toast-animation.js.map +1 -1
- package/lib/toast/use-toasts.d.ts +3 -3
- package/lib/toast/use-toasts.js +1 -1
- package/lib/toast/use-toasts.js.map +1 -1
- package/lib/tooltip/tooltip.js +1 -1
- package/lib/tooltip/tooltip.js.map +1 -1
- package/lib/utils/common-helpers.js +1 -1
- package/lib/utils/common-helpers.js.map +1 -1
- package/lib/utils/common-types.d.ts +8 -8
- package/lib/utils/polymorphism.d.ts +9 -9
- package/lib/utils/polymorphism.js +1 -1
- package/lib/utils/polymorphism.js.map +1 -1
- package/lib/utils/responsive-props.d.ts +3 -3
- package/lib/utils/responsive-props.js.map +1 -1
- package/lib/utils/test-helpers.d.ts +1 -1
- package/package.json +13 -7
- package/lib/alert/alert.test.d.ts +0 -1
- package/lib/avatar/avatar.test.d.ts +0 -1
- package/lib/avatar/utils.test.d.ts +0 -1
- package/lib/badge/badge.test.d.ts +0 -1
- package/lib/banner/banner.test.d.ts +0 -1
- package/lib/box/box.test.d.ts +0 -1
- package/lib/button/button.test.d.ts +0 -1
- package/lib/checkbox-field/checkbox-field.test.d.ts +0 -1
- package/lib/columns/columns.test.d.ts +0 -1
- package/lib/components/color-picker/color-picker.test.d.ts +0 -1
- package/lib/components/deprecated-button/deprecated-button.test.d.ts +0 -1
- package/lib/components/deprecated-dropdown/dropdown.test.d.ts +0 -1
- package/lib/components/deprecated-input/input.test.d.ts +0 -1
- package/lib/components/deprecated-select/select.test.d.ts +0 -1
- package/lib/components/key-capturer/key-capturer.test.d.ts +0 -1
- package/lib/components/keyboard-shortcut/keyboard-shortcut.test.d.ts +0 -1
- package/lib/components/progress-bar/progress-bar.test.d.ts +0 -1
- package/lib/components/time/time-utils.test.d.ts +0 -1
- package/lib/components/time/time.test.d.ts +0 -1
- package/lib/heading/heading.test.d.ts +0 -1
- package/lib/hidden/hidden.test.d.ts +0 -1
- package/lib/hidden-visually/hidden-visually.test.d.ts +0 -1
- package/lib/inline/inline.test.d.ts +0 -1
- package/lib/loading/loading.test.d.ts +0 -1
- package/lib/menu/menu.test.d.ts +0 -1
- package/lib/modal/modal.test.d.ts +0 -1
- package/lib/notice/notice.test.d.ts +0 -1
- package/lib/password-field/password-field.test.d.ts +0 -1
- package/lib/prose/prose.test.d.ts +0 -1
- package/lib/select-field/select-field.test.d.ts +0 -1
- package/lib/stack/stack.test.d.ts +0 -1
- package/lib/switch-field/switch-field.test.d.ts +0 -1
- package/lib/tabs/tabs.test.d.ts +0 -1
- package/lib/text/text.test.d.ts +0 -1
- package/lib/text-area/text-area.test.d.ts +0 -1
- package/lib/text-field/text-field.test.d.ts +0 -1
- package/lib/toast/toast.test.d.ts +0 -1
- package/lib/tooltip/tooltip.test.d.ts +0 -1
- package/styles/color-picker.css +0 -9
- package/styles/deprecated-button.css +0 -7
- package/styles/dropdown.css +0 -8
- package/styles/progress-bar.css +0 -7
- package/styles/select.css +0 -1
- package/styles/time.css +0 -7
- /package/styles/{input.css → index.css} +0 -0
- /package/styles/{spinner.module.css.css → spinner.css} +0 -0
|
@@ -2,19 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
|
-
|
|
7
5
|
var React = require('react');
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var flattenChildren = _interopDefault(require('react-keyed-flatten-children'));
|
|
6
|
+
var classNames = require('classnames');
|
|
7
|
+
var flattenChildren = require('react-keyed-flatten-children');
|
|
11
8
|
var react = require('@ariakit/react');
|
|
12
9
|
var useCallbackRef = require('use-callback-ref');
|
|
13
|
-
var FocusLock =
|
|
10
|
+
var FocusLock = require('react-focus-lock');
|
|
14
11
|
var ariaHidden = require('aria-hidden');
|
|
15
|
-
var ReactDOM =
|
|
16
|
-
var dayjs =
|
|
17
|
-
var LocalizedFormat =
|
|
12
|
+
var ReactDOM = require('react-dom');
|
|
13
|
+
var dayjs = require('dayjs');
|
|
14
|
+
var LocalizedFormat = require('dayjs/plugin/localizedFormat');
|
|
15
|
+
|
|
16
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
|
+
|
|
18
|
+
function _interopNamespace(e) {
|
|
19
|
+
if (e && e.__esModule) return e;
|
|
20
|
+
var n = Object.create(null);
|
|
21
|
+
if (e) {
|
|
22
|
+
Object.keys(e).forEach(function (k) {
|
|
23
|
+
if (k !== 'default') {
|
|
24
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
25
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return e[k]; }
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
n["default"] = e;
|
|
33
|
+
return n;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
37
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
38
|
+
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
39
|
+
var flattenChildren__default = /*#__PURE__*/_interopDefaultLegacy(flattenChildren);
|
|
40
|
+
var FocusLock__default = /*#__PURE__*/_interopDefaultLegacy(FocusLock);
|
|
41
|
+
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
42
|
+
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
43
|
+
var LocalizedFormat__default = /*#__PURE__*/_interopDefaultLegacy(LocalizedFormat);
|
|
18
44
|
|
|
19
45
|
function ownKeys(object, enumerableOnly) {
|
|
20
46
|
var keys = Object.keys(object);
|
|
@@ -115,7 +141,7 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
115
141
|
*/
|
|
116
142
|
|
|
117
143
|
function polymorphicComponent(render) {
|
|
118
|
-
return /*#__PURE__*/
|
|
144
|
+
return /*#__PURE__*/React__namespace.forwardRef(render);
|
|
119
145
|
}
|
|
120
146
|
|
|
121
147
|
/**
|
|
@@ -151,7 +177,7 @@ function getClassNames(styles, property, value) {
|
|
|
151
177
|
if (value.desktop) classList.push(styles["desktop-" + property + "-" + value.desktop]);
|
|
152
178
|
}
|
|
153
179
|
|
|
154
|
-
if (
|
|
180
|
+
if (!classList.every(Boolean)) {
|
|
155
181
|
// eslint-disable-next-line no-console
|
|
156
182
|
console.warn('Not all generated class names were found', {
|
|
157
183
|
property,
|
|
@@ -200,7 +226,7 @@ var modules_89b7671c = {"minWidth-0":"_68ab48ca","minWidth-xsmall":"_6fa2b565","
|
|
|
200
226
|
|
|
201
227
|
var modules_8b5c09cb = {"gap-none":"_64ed24f4","gap-xsmall":"_2580a74b","gap-small":"c68f8bf6","gap-medium":"_43e5f8e9","gap-large":"_966b120f","gap-xlarge":"f957894c","gap-xxlarge":"_8cca104b","tablet-gap-none":"_5797cee2","tablet-gap-xsmall":"_9015672f","tablet-gap-small":"_7ec86eec","tablet-gap-medium":"_714d7179","tablet-gap-large":"ae1deb59","tablet-gap-xlarge":"e1cfce55","tablet-gap-xxlarge":"_168a8ff8","desktop-gap-none":"_43e2b619","desktop-gap-xsmall":"_0ea9bf88","desktop-gap-small":"d451307a","desktop-gap-medium":"bf93cf66","desktop-gap-large":"_1430cddf","desktop-gap-xlarge":"fa00c93e","desktop-gap-xxlarge":"_6f3aee54"};
|
|
202
228
|
|
|
203
|
-
const _excluded = ["as", "position", "display", "flexDirection", "flexWrap", "flexGrow", "flexShrink", "gap", "alignItems", "justifyContent", "alignSelf", "overflow", "width", "height", "background", "border", "borderRadius", "minWidth", "maxWidth", "textAlign", "padding", "paddingY", "paddingX", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "margin", "marginY", "marginX", "marginTop", "marginRight", "marginBottom", "marginLeft", "className", "children"];
|
|
229
|
+
const _excluded$v = ["as", "position", "display", "flexDirection", "flexWrap", "flexGrow", "flexShrink", "gap", "alignItems", "justifyContent", "alignSelf", "overflow", "width", "height", "background", "border", "borderRadius", "minWidth", "maxWidth", "textAlign", "padding", "paddingY", "paddingX", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "margin", "marginY", "marginX", "marginTop", "marginRight", "marginBottom", "marginLeft", "className", "children"];
|
|
204
230
|
|
|
205
231
|
function getBoxClassNames({
|
|
206
232
|
position = 'static',
|
|
@@ -249,14 +275,14 @@ function getBoxClassNames({
|
|
|
249
275
|
const resolvedMarginBottom = (_ref7 = marginBottom != null ? marginBottom : marginY) != null ? _ref7 : margin;
|
|
250
276
|
const resolvedMarginLeft = (_ref8 = marginLeft != null ? marginLeft : marginX) != null ? _ref8 : margin;
|
|
251
277
|
const omitFlex = !display || typeof display === 'string' && display !== 'flex' && display !== 'inlineFlex';
|
|
252
|
-
return
|
|
278
|
+
return classNames__default["default"](className, modules_54d944f2.box, display ? getClassNames(modules_54d944f2, 'display', display) : null, position !== 'static' ? getClassNames(modules_54d944f2, 'position', position) : null, minWidth != null ? getClassNames(modules_89b7671c, 'minWidth', String(minWidth)) : null, getClassNames(modules_89b7671c, 'maxWidth', maxWidth), getClassNames(modules_54d944f2, 'textAlign', textAlign), // padding
|
|
253
279
|
getClassNames(modules_b537a8ee, 'paddingTop', resolvedPaddingTop), getClassNames(modules_b537a8ee, 'paddingRight', resolvedPaddingRight), getClassNames(modules_b537a8ee, 'paddingBottom', resolvedPaddingBottom), getClassNames(modules_b537a8ee, 'paddingLeft', resolvedPaddingLeft), // margin
|
|
254
280
|
getClassNames(modules_131405ac, 'marginTop', resolvedMarginTop), getClassNames(modules_131405ac, 'marginRight', resolvedMarginRight), getClassNames(modules_131405ac, 'marginBottom', resolvedMarginBottom), getClassNames(modules_131405ac, 'marginLeft', resolvedMarginLeft), // flex props
|
|
255
281
|
omitFlex ? null : getClassNames(modules_54d944f2, 'flexDirection', flexDirection), omitFlex ? null : getClassNames(modules_54d944f2, 'flexWrap', flexWrap), omitFlex ? null : getClassNames(modules_54d944f2, 'alignItems', alignItems), omitFlex ? null : getClassNames(modules_54d944f2, 'justifyContent', justifyContent), alignSelf != null ? getClassNames(modules_54d944f2, 'alignSelf', alignSelf) : null, flexShrink != null ? getClassNames(modules_54d944f2, 'flexShrink', String(flexShrink)) : null, flexGrow != null ? getClassNames(modules_54d944f2, 'flexGrow', String(flexGrow)) : null, gap ? getClassNames(modules_8b5c09cb, 'gap', gap) : null, // other props
|
|
256
282
|
getClassNames(modules_54d944f2, 'overflow', overflow), width != null ? getClassNames(modules_89b7671c, 'width', String(width)) : null, getClassNames(modules_54d944f2, 'height', height), getClassNames(modules_54d944f2, 'bg', background), borderRadius !== 'none' ? getClassNames(modules_54d944f2, 'borderRadius', borderRadius) : null, border !== 'none' ? getClassNames(modules_54d944f2, 'border', border) : null);
|
|
257
283
|
}
|
|
258
284
|
|
|
259
|
-
const Box = /*#__PURE__*/polymorphicComponent(function Box(_ref9, ref) {
|
|
285
|
+
const Box$1 = /*#__PURE__*/polymorphicComponent(function Box(_ref9, ref) {
|
|
260
286
|
let {
|
|
261
287
|
as: component = 'div',
|
|
262
288
|
position = 'static',
|
|
@@ -295,9 +321,9 @@ const Box = /*#__PURE__*/polymorphicComponent(function Box(_ref9, ref) {
|
|
|
295
321
|
className,
|
|
296
322
|
children
|
|
297
323
|
} = _ref9,
|
|
298
|
-
props = _objectWithoutProperties(_ref9, _excluded);
|
|
324
|
+
props = _objectWithoutProperties(_ref9, _excluded$v);
|
|
299
325
|
|
|
300
|
-
return /*#__PURE__*/
|
|
326
|
+
return /*#__PURE__*/React__namespace.createElement(component, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
301
327
|
className: getBoxClassNames({
|
|
302
328
|
position,
|
|
303
329
|
display,
|
|
@@ -340,17 +366,17 @@ const Box = /*#__PURE__*/polymorphicComponent(function Box(_ref9, ref) {
|
|
|
340
366
|
|
|
341
367
|
var modules_67f2d07a = {"container":"eae3d34f","container-xsmall":"_9b4012c9","container-small":"e35e0320","container-medium":"_0703e67f","container-large":"_1cf15621","container-xlarge":"_1c7dff67","container-xxlarge":"_25bee9b6","columnWidth-content":"_4bb9987d","columnWidth-auto":"_9dd31975","columnWidth-1-2":"_38d11c0e","columnWidth-1-3":"_7ac225c6","columnWidth-2-3":"_9c340680","columnWidth-1-4":"_81cb99d2","columnWidth-3-4":"_10fd355f","columnWidth-1-5":"_3ee66520","columnWidth-2-5":"df1201a5","columnWidth-3-5":"f772e0b2","columnWidth-4-5":"_880cbbb1"};
|
|
342
368
|
|
|
343
|
-
const _excluded$
|
|
344
|
-
_excluded2 = ["space", "align", "alignY", "collapseBelow", "children", "exceptionallySetClassName"];
|
|
369
|
+
const _excluded$u = ["width", "children", "exceptionallySetClassName"],
|
|
370
|
+
_excluded2$4 = ["space", "align", "alignY", "collapseBelow", "children", "exceptionallySetClassName"];
|
|
345
371
|
const Column = /*#__PURE__*/polymorphicComponent(function Column(_ref, ref) {
|
|
346
372
|
let {
|
|
347
373
|
width = 'auto',
|
|
348
374
|
children,
|
|
349
375
|
exceptionallySetClassName
|
|
350
376
|
} = _ref,
|
|
351
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
377
|
+
props = _objectWithoutProperties(_ref, _excluded$u);
|
|
352
378
|
|
|
353
|
-
return /*#__PURE__*/
|
|
379
|
+
return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
354
380
|
className: [exceptionallySetClassName, getClassNames(modules_67f2d07a, 'columnWidth', width.replace('/', '-'))],
|
|
355
381
|
minWidth: 0,
|
|
356
382
|
height: "full",
|
|
@@ -368,9 +394,9 @@ const Columns = /*#__PURE__*/polymorphicComponent(function Columns(_ref2, ref) {
|
|
|
368
394
|
children,
|
|
369
395
|
exceptionallySetClassName
|
|
370
396
|
} = _ref2,
|
|
371
|
-
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
397
|
+
props = _objectWithoutProperties(_ref2, _excluded2$4);
|
|
372
398
|
|
|
373
|
-
return /*#__PURE__*/
|
|
399
|
+
return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
374
400
|
className: [exceptionallySetClassName, modules_67f2d07a.container, getClassNames(modules_67f2d07a, 'container', space)],
|
|
375
401
|
display: "flex",
|
|
376
402
|
gap: space,
|
|
@@ -390,21 +416,21 @@ const Columns = /*#__PURE__*/polymorphicComponent(function Columns(_ref2, ref) {
|
|
|
390
416
|
|
|
391
417
|
var modules_c742c4d7 = {"weight-primary":"_3f3a401c","weight-secondary":"_03b05b70","weight-tertiary":"b6f67ff8"};
|
|
392
418
|
|
|
393
|
-
const _excluded$
|
|
419
|
+
const _excluded$t = ["weight"];
|
|
394
420
|
|
|
395
421
|
function Divider(_ref) {
|
|
396
422
|
let {
|
|
397
423
|
weight = 'tertiary'
|
|
398
424
|
} = _ref,
|
|
399
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
425
|
+
props = _objectWithoutProperties(_ref, _excluded$t);
|
|
400
426
|
|
|
401
|
-
return /*#__PURE__*/
|
|
427
|
+
return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2({
|
|
402
428
|
as: "hr",
|
|
403
429
|
className: getClassNames(modules_c742c4d7, 'weight', weight)
|
|
404
430
|
}, props));
|
|
405
431
|
}
|
|
406
432
|
|
|
407
|
-
const _excluded$
|
|
433
|
+
const _excluded$s = ["as", "space", "align", "alignY", "children", "exceptionallySetClassName"];
|
|
408
434
|
const Inline = /*#__PURE__*/polymorphicComponent(function Inline(_ref, ref) {
|
|
409
435
|
let {
|
|
410
436
|
as,
|
|
@@ -414,9 +440,9 @@ const Inline = /*#__PURE__*/polymorphicComponent(function Inline(_ref, ref) {
|
|
|
414
440
|
children,
|
|
415
441
|
exceptionallySetClassName
|
|
416
442
|
} = _ref,
|
|
417
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
443
|
+
props = _objectWithoutProperties(_ref, _excluded$s);
|
|
418
444
|
|
|
419
|
-
return /*#__PURE__*/
|
|
445
|
+
return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
420
446
|
as: as,
|
|
421
447
|
display: "flex",
|
|
422
448
|
flexWrap: "wrap",
|
|
@@ -428,7 +454,7 @@ const Inline = /*#__PURE__*/polymorphicComponent(function Inline(_ref, ref) {
|
|
|
428
454
|
}), children);
|
|
429
455
|
});
|
|
430
456
|
|
|
431
|
-
const _excluded$
|
|
457
|
+
const _excluded$r = ["as", "space", "align", "dividers", "width", "children", "exceptionallySetClassName"];
|
|
432
458
|
const Stack = /*#__PURE__*/polymorphicComponent(function Stack(_ref, ref) {
|
|
433
459
|
let {
|
|
434
460
|
as,
|
|
@@ -439,10 +465,10 @@ const Stack = /*#__PURE__*/polymorphicComponent(function Stack(_ref, ref) {
|
|
|
439
465
|
children,
|
|
440
466
|
exceptionallySetClassName
|
|
441
467
|
} = _ref,
|
|
442
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
468
|
+
props = _objectWithoutProperties(_ref, _excluded$r);
|
|
443
469
|
|
|
444
470
|
const alignItems = align === undefined ? undefined : mapResponsiveProp(align, align => align === 'start' ? 'flexStart' : align === 'end' ? 'flexEnd' : 'center');
|
|
445
|
-
return /*#__PURE__*/
|
|
471
|
+
return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
446
472
|
display: "flex",
|
|
447
473
|
flexDirection: "column",
|
|
448
474
|
width: width,
|
|
@@ -451,14 +477,14 @@ const Stack = /*#__PURE__*/polymorphicComponent(function Stack(_ref, ref) {
|
|
|
451
477
|
as: as,
|
|
452
478
|
className: exceptionallySetClassName,
|
|
453
479
|
ref: ref
|
|
454
|
-
}), dividers !== 'none' ?
|
|
480
|
+
}), dividers !== 'none' ? React__namespace.Children.map(flattenChildren__default["default"](children), (child, index) => index > 0 ? /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Divider, {
|
|
455
481
|
weight: dividers
|
|
456
482
|
}), child) : child) : children);
|
|
457
483
|
});
|
|
458
484
|
|
|
459
485
|
var modules_4689e97e = {"hiddenOnPrint":"_0e595dea"};
|
|
460
486
|
|
|
461
|
-
const _excluded$
|
|
487
|
+
const _excluded$q = ["display", "children", "exceptionallySetClassName"];
|
|
462
488
|
/**
|
|
463
489
|
* A component that allows to specify how to hide itself on certain responsive screen sizes, or on
|
|
464
490
|
* print media.
|
|
@@ -474,7 +500,7 @@ const Hidden = /*#__PURE__*/polymorphicComponent(function Hidden(_ref, ref) {
|
|
|
474
500
|
children,
|
|
475
501
|
exceptionallySetClassName
|
|
476
502
|
} = _ref,
|
|
477
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
503
|
+
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
478
504
|
|
|
479
505
|
const hiddenOnPrint = 'print' in props && props.print;
|
|
480
506
|
const hiddenOnDesktop = ('above' in props);
|
|
@@ -495,7 +521,7 @@ const Hidden = /*#__PURE__*/polymorphicComponent(function Hidden(_ref, ref) {
|
|
|
495
521
|
if ('above' in props) delete props['above'];
|
|
496
522
|
if ('below' in props) delete props['below'];
|
|
497
523
|
if ('print' in props) delete props['print'];
|
|
498
|
-
return /*#__PURE__*/
|
|
524
|
+
return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
499
525
|
ref: ref,
|
|
500
526
|
className: [exceptionallySetClassName, hiddenOnPrint ? modules_4689e97e.hiddenOnPrint : null],
|
|
501
527
|
display: hiddenOnDesktop && hiddenOnMobile ? 'none' : {
|
|
@@ -515,7 +541,7 @@ var modules_61c16c43 = {"hiddenVisually":"_618235b7"};
|
|
|
515
541
|
*/
|
|
516
542
|
|
|
517
543
|
const HiddenVisually = /*#__PURE__*/polymorphicComponent(function HiddenVisually(props, ref) {
|
|
518
|
-
return /*#__PURE__*/
|
|
544
|
+
return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
519
545
|
ref: ref,
|
|
520
546
|
position: "absolute",
|
|
521
547
|
overflow: "hidden",
|
|
@@ -528,20 +554,20 @@ var modules_c7f5018f = {"svg":"_51539197","spinner":"_54fbe2b3","tint":"a0c466ed
|
|
|
528
554
|
function Spinner({
|
|
529
555
|
size = 24
|
|
530
556
|
}) {
|
|
531
|
-
return /*#__PURE__*/
|
|
557
|
+
return /*#__PURE__*/React__namespace.createElement("svg", {
|
|
532
558
|
"aria-hidden": true,
|
|
533
559
|
width: size,
|
|
534
560
|
height: size,
|
|
535
561
|
viewBox: "0 0 24 24",
|
|
536
562
|
className: modules_c7f5018f.svg,
|
|
537
563
|
"data-chromatic": "ignore"
|
|
538
|
-
}, /*#__PURE__*/
|
|
564
|
+
}, /*#__PURE__*/React__namespace.createElement("g", {
|
|
539
565
|
fill: "none",
|
|
540
566
|
fillRule: "nonzero"
|
|
541
|
-
}, /*#__PURE__*/
|
|
567
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
542
568
|
className: modules_c7f5018f.tint,
|
|
543
569
|
d: "M17.945 3.958A9.955 9.955 0 0 0 12 2c-2.19 0-4.217.705-5.865 1.9L5.131 2.16A11.945 11.945 0 0 1 12 0c2.59 0 4.99.82 6.95 2.217l-1.005 1.741z"
|
|
544
|
-
}), /*#__PURE__*/
|
|
570
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
545
571
|
className: modules_c7f5018f.fill,
|
|
546
572
|
d: "M5.13 2.16L6.136 3.9A9.987 9.987 0 0 0 2 12c0 5.523 4.477 10 10 10s10-4.477 10-10a9.986 9.986 0 0 0-4.055-8.042l1.006-1.741A11.985 11.985 0 0 1 24 12c0 6.627-5.373 12-12 12S0 18.627 0 12c0-4.073 2.029-7.671 5.13-9.84z"
|
|
547
573
|
})));
|
|
@@ -563,7 +589,7 @@ function Tooltip({
|
|
|
563
589
|
hideTimeout: 100
|
|
564
590
|
});
|
|
565
591
|
const isOpen = tooltip.useState('open');
|
|
566
|
-
const child =
|
|
592
|
+
const child = React__namespace.Children.only(children);
|
|
567
593
|
|
|
568
594
|
if (!child) {
|
|
569
595
|
return child;
|
|
@@ -573,14 +599,14 @@ function Tooltip({
|
|
|
573
599
|
throw new Error('Tooltip: String refs cannot be used as they cannot be forwarded');
|
|
574
600
|
}
|
|
575
601
|
|
|
576
|
-
return /*#__PURE__*/
|
|
602
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(react.TooltipAnchor, {
|
|
577
603
|
render: child,
|
|
578
604
|
store: tooltip,
|
|
579
605
|
ref: child.ref
|
|
580
|
-
}), isOpen && content ? /*#__PURE__*/
|
|
606
|
+
}), isOpen && content ? /*#__PURE__*/React__namespace.createElement(react.Tooltip, {
|
|
581
607
|
store: tooltip,
|
|
582
608
|
gutter: gapSize,
|
|
583
|
-
render: /*#__PURE__*/
|
|
609
|
+
render: /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
584
610
|
className: [modules_95f1407a.tooltip, exceptionallySetClassName],
|
|
585
611
|
background: "toast",
|
|
586
612
|
borderRadius: "standard",
|
|
@@ -591,13 +617,13 @@ function Tooltip({
|
|
|
591
617
|
overflow: "hidden",
|
|
592
618
|
textAlign: "center"
|
|
593
619
|
})
|
|
594
|
-
}, withArrow ? /*#__PURE__*/
|
|
620
|
+
}, withArrow ? /*#__PURE__*/React__namespace.createElement(react.TooltipArrow, null) : null, typeof content === 'function' ? content() : content) : null);
|
|
595
621
|
}
|
|
596
622
|
|
|
597
623
|
var modules_5357ebb8 = {"baseButton":"_3930afa0","label":"_90654824","shape-rounded":"c05d17c2","size-small":"_1e29d236","size-normal":"_7246d092","size-large":"_2d084671","disabled":"_2b0b9d95","iconButton":"abd5766f","startIcon":"_380e7c73","endIcon":"_20fe4105","variant-primary":"_7ea1378e","variant-secondary":"_64ee8afd","variant-tertiary":"_650176bf","variant-quaternary":"aa19cb97","tone-destructive":"_7a2d9a8c"};
|
|
598
624
|
|
|
599
|
-
const _excluded$
|
|
600
|
-
_excluded2$
|
|
625
|
+
const _excluded$p = ["variant", "tone", "size", "shape", "type", "disabled", "loading", "tooltip", "render", "onClick", "exceptionallySetClassName", "children", "startIcon", "endIcon", "width", "align"],
|
|
626
|
+
_excluded2$3 = ["variant", "tone", "size", "shape", "type", "disabled", "loading", "tooltip", "render", "onClick", "exceptionallySetClassName", "children", "icon"];
|
|
601
627
|
|
|
602
628
|
function preventDefault(event) {
|
|
603
629
|
event.preventDefault();
|
|
@@ -608,7 +634,7 @@ function preventDefault(event) {
|
|
|
608
634
|
*/
|
|
609
635
|
|
|
610
636
|
|
|
611
|
-
const Button = /*#__PURE__*/
|
|
637
|
+
const Button$1 = /*#__PURE__*/React__namespace.forwardRef(function Button(_ref, ref) {
|
|
612
638
|
let {
|
|
613
639
|
variant,
|
|
614
640
|
tone = 'normal',
|
|
@@ -627,34 +653,34 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
|
|
|
627
653
|
width = 'auto',
|
|
628
654
|
align = 'center'
|
|
629
655
|
} = _ref,
|
|
630
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
656
|
+
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
631
657
|
|
|
632
658
|
const isDisabled = loading || disabled;
|
|
633
|
-
const buttonElement = /*#__PURE__*/
|
|
659
|
+
const buttonElement = /*#__PURE__*/React__namespace.createElement(react.Role.button, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
634
660
|
render: render,
|
|
635
661
|
type: render != null ? undefined : type,
|
|
636
662
|
ref: ref,
|
|
637
663
|
"aria-disabled": isDisabled,
|
|
638
664
|
onClick: isDisabled ? preventDefault : onClick,
|
|
639
|
-
className:
|
|
665
|
+
className: classNames__default["default"]([getBoxClassNames({
|
|
640
666
|
width
|
|
641
667
|
}), exceptionallySetClassName, modules_5357ebb8.baseButton, modules_5357ebb8["variant-" + variant], modules_5357ebb8["tone-" + tone], modules_5357ebb8["size-" + size], shape === 'rounded' ? modules_5357ebb8['shape-rounded'] : null, disabled ? modules_5357ebb8.disabled : null])
|
|
642
|
-
}), /*#__PURE__*/
|
|
668
|
+
}), /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, startIcon ? /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
643
669
|
display: "flex",
|
|
644
670
|
className: modules_5357ebb8.startIcon,
|
|
645
671
|
"aria-hidden": true
|
|
646
|
-
}, loading && !endIcon ? /*#__PURE__*/
|
|
672
|
+
}, loading && !endIcon ? /*#__PURE__*/React__namespace.createElement(Spinner, null) : startIcon) : null, children ? /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
647
673
|
as: "span",
|
|
648
674
|
className: modules_5357ebb8.label,
|
|
649
675
|
overflow: "hidden",
|
|
650
676
|
width: width === 'full' ? 'full' : undefined,
|
|
651
677
|
textAlign: width === 'auto' ? 'center' : align
|
|
652
|
-
}, children) : null, endIcon || loading && !startIcon ? /*#__PURE__*/
|
|
678
|
+
}, children) : null, endIcon || loading && !startIcon ? /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
653
679
|
display: "flex",
|
|
654
680
|
className: modules_5357ebb8.endIcon,
|
|
655
681
|
"aria-hidden": true
|
|
656
|
-
}, loading ? /*#__PURE__*/
|
|
657
|
-
return tooltip ? /*#__PURE__*/
|
|
682
|
+
}, loading ? /*#__PURE__*/React__namespace.createElement(Spinner, null) : endIcon) : null));
|
|
683
|
+
return tooltip ? /*#__PURE__*/React__namespace.createElement(Tooltip, {
|
|
658
684
|
content: tooltip
|
|
659
685
|
}, buttonElement) : buttonElement;
|
|
660
686
|
});
|
|
@@ -664,7 +690,7 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
|
|
|
664
690
|
* [WAI-ARIA Button Pattern](https://www.w3.org/TR/wai-aria-practices/#button).
|
|
665
691
|
*/
|
|
666
692
|
|
|
667
|
-
const IconButton = /*#__PURE__*/
|
|
693
|
+
const IconButton = /*#__PURE__*/React__namespace.forwardRef(function IconButton(_ref2, ref) {
|
|
668
694
|
let {
|
|
669
695
|
variant,
|
|
670
696
|
tone = 'normal',
|
|
@@ -680,24 +706,24 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(_ref2, ref)
|
|
|
680
706
|
children,
|
|
681
707
|
icon
|
|
682
708
|
} = _ref2,
|
|
683
|
-
props = _objectWithoutProperties(_ref2, _excluded2$
|
|
709
|
+
props = _objectWithoutProperties(_ref2, _excluded2$3);
|
|
684
710
|
|
|
685
711
|
const isDisabled = loading || disabled;
|
|
686
|
-
const buttonElement = /*#__PURE__*/
|
|
712
|
+
const buttonElement = /*#__PURE__*/React__namespace.createElement(react.Role.button, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
687
713
|
render: render,
|
|
688
714
|
type: render != null ? undefined : type,
|
|
689
715
|
ref: ref,
|
|
690
716
|
"aria-disabled": isDisabled,
|
|
691
717
|
onClick: isDisabled ? preventDefault : onClick,
|
|
692
|
-
className:
|
|
693
|
-
}), loading && /*#__PURE__*/
|
|
718
|
+
className: classNames__default["default"]([exceptionallySetClassName, modules_5357ebb8.baseButton, modules_5357ebb8["variant-" + variant], modules_5357ebb8["tone-" + tone], modules_5357ebb8["size-" + size], shape === 'rounded' ? modules_5357ebb8['shape-rounded'] : null, modules_5357ebb8.iconButton, disabled ? modules_5357ebb8.disabled : null])
|
|
719
|
+
}), loading && /*#__PURE__*/React__namespace.createElement(Spinner, null) || icon);
|
|
694
720
|
const tooltipContent = tooltip === undefined ? props['aria-label'] : tooltip;
|
|
695
|
-
return tooltipContent ? /*#__PURE__*/
|
|
721
|
+
return tooltipContent ? /*#__PURE__*/React__namespace.createElement(Tooltip, {
|
|
696
722
|
content: tooltipContent
|
|
697
723
|
}, buttonElement) : buttonElement;
|
|
698
724
|
});
|
|
699
725
|
|
|
700
|
-
const _excluded$
|
|
726
|
+
const _excluded$o = ["tone"];
|
|
701
727
|
const alertIconForTone = {
|
|
702
728
|
info: AlertInfoIcon,
|
|
703
729
|
positive: AlertPositiveIcon,
|
|
@@ -709,19 +735,19 @@ function AlertIcon(_ref) {
|
|
|
709
735
|
let {
|
|
710
736
|
tone
|
|
711
737
|
} = _ref,
|
|
712
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
738
|
+
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
713
739
|
|
|
714
740
|
const Icon = alertIconForTone[tone];
|
|
715
|
-
return Icon ? /*#__PURE__*/
|
|
741
|
+
return Icon ? /*#__PURE__*/React__namespace.createElement(Icon, _objectSpread2({}, props)) : null;
|
|
716
742
|
}
|
|
717
743
|
|
|
718
744
|
function AlertInfoIcon(props) {
|
|
719
|
-
return /*#__PURE__*/
|
|
745
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _objectSpread2({
|
|
720
746
|
xmlns: "http://www.w3.org/2000/svg",
|
|
721
747
|
width: "24",
|
|
722
748
|
height: "24",
|
|
723
749
|
viewBox: "0 0 24 24"
|
|
724
|
-
}, props), /*#__PURE__*/
|
|
750
|
+
}, props), /*#__PURE__*/React__namespace.createElement("path", {
|
|
725
751
|
fillRule: "evenodd",
|
|
726
752
|
clipRule: "evenodd",
|
|
727
753
|
d: "M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-8-3.94a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM10.25 10a.75.75 0 0 0 0 1.5h1.25V15h-1.25a.75.75 0 0 0 0 1.5h3.5a.75.75 0 0 0 0-1.5H13v-4.25a.75.75 0 0 0-.75-.75h-2Z",
|
|
@@ -730,12 +756,12 @@ function AlertInfoIcon(props) {
|
|
|
730
756
|
}
|
|
731
757
|
|
|
732
758
|
function AlertPositiveIcon(props) {
|
|
733
|
-
return /*#__PURE__*/
|
|
759
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _objectSpread2({
|
|
734
760
|
xmlns: "http://www.w3.org/2000/svg",
|
|
735
761
|
width: "24",
|
|
736
762
|
height: "24",
|
|
737
763
|
viewBox: "0 0 24 24"
|
|
738
|
-
}, props), /*#__PURE__*/
|
|
764
|
+
}, props), /*#__PURE__*/React__namespace.createElement("path", {
|
|
739
765
|
fillRule: "evenodd",
|
|
740
766
|
clipRule: "evenodd",
|
|
741
767
|
d: "M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-5.555-2.99a.75.75 0 0 1 1.06 1.06l-5.303 5.304a.748.748 0 0 1-1.061 0l-2.475-2.475a.75.75 0 0 1 1.06-1.06l1.945 1.944 4.774-4.773Z",
|
|
@@ -744,12 +770,12 @@ function AlertPositiveIcon(props) {
|
|
|
744
770
|
}
|
|
745
771
|
|
|
746
772
|
function AlertCautionIcon(props) {
|
|
747
|
-
return /*#__PURE__*/
|
|
773
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _objectSpread2({
|
|
748
774
|
xmlns: "http://www.w3.org/2000/svg",
|
|
749
775
|
width: "24",
|
|
750
776
|
height: "24",
|
|
751
777
|
viewBox: "0 0 24 24"
|
|
752
|
-
}, props), /*#__PURE__*/
|
|
778
|
+
}, props), /*#__PURE__*/React__namespace.createElement("path", {
|
|
753
779
|
fillRule: "evenodd",
|
|
754
780
|
clipRule: "evenodd",
|
|
755
781
|
d: "m10.272 4.962-7.018 12.03A2 2 0 0 0 4.982 20h14.036a2 2 0 0 0 1.727-3.008l-7.018-12.03a2 2 0 0 0-3.455 0ZM13 16.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm-.014-7.013A.987.987 0 0 0 12 8.5h-.028l-.027.002a.987.987 0 0 0-.93 1.04l.236 4.25c.052.944 1.445.944 1.498 0l.236-4.25a1.925 1.925 0 0 0 .001-.055Z",
|
|
@@ -758,12 +784,12 @@ function AlertCautionIcon(props) {
|
|
|
758
784
|
}
|
|
759
785
|
|
|
760
786
|
function AlertCriticalIcon(props) {
|
|
761
|
-
return /*#__PURE__*/
|
|
787
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _objectSpread2({
|
|
762
788
|
xmlns: "http://www.w3.org/2000/svg",
|
|
763
789
|
width: "24",
|
|
764
790
|
height: "24",
|
|
765
791
|
viewBox: "0 0 24 24"
|
|
766
|
-
}, props), /*#__PURE__*/
|
|
792
|
+
}, props), /*#__PURE__*/React__namespace.createElement("path", {
|
|
767
793
|
fillRule: "evenodd",
|
|
768
794
|
clipRule: "evenodd",
|
|
769
795
|
d: "M12.9866 2.25049C12.3729 1.91683 11.6271 1.91683 11.0134 2.25049L4.04793 6.03744C3.40122 6.38904 2.99999 7.05702 2.99999 7.78208V15.2184C2.99999 15.9435 3.40122 16.6115 4.04793 16.963L11.0134 20.75C11.6271 21.0837 12.3729 21.0837 12.9866 20.75L19.9521 16.963C20.5988 16.6114 21 15.9435 21 15.2184V7.78208C21 7.05701 20.5988 6.38904 19.9521 6.03744L12.9866 2.25049ZM12 7.00024C12.5448 7.00024 12.9865 7.44191 12.9865 7.98674C12.9864 8.00043 12.9863 8.00727 12.9861 8.01411C12.9859 8.02095 12.9856 8.02779 12.985 8.04146L12.7489 12.2918C12.6964 13.2364 11.3036 13.2364 11.2512 12.2918L11.015 8.04146C10.9848 7.49747 11.4013 7.03198 11.9453 7.00176L11.9726 7.00062L12 7.00024ZM13 15.0002C13 15.5525 12.5523 16.0002 12 16.0002C11.4477 16.0002 11 15.5525 11 15.0002C11 14.448 11.4477 14.0002 12 14.0002C12.5523 14.0002 13 14.448 13 15.0002Z",
|
|
@@ -772,11 +798,11 @@ function AlertCriticalIcon(props) {
|
|
|
772
798
|
}
|
|
773
799
|
|
|
774
800
|
function CloseIcon(props) {
|
|
775
|
-
return /*#__PURE__*/
|
|
801
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _objectSpread2({
|
|
776
802
|
xmlns: "http://www.w3.org/2000/svg",
|
|
777
803
|
width: "24",
|
|
778
804
|
height: "24"
|
|
779
|
-
}, props), /*#__PURE__*/
|
|
805
|
+
}, props), /*#__PURE__*/React__namespace.createElement("path", {
|
|
780
806
|
fill: "currentColor",
|
|
781
807
|
d: "M5.146 5.146a.5.5 0 0 1 .708 0L12 11.293l6.146-6.147a.5.5 0 0 1 .638-.057l.07.057a.5.5 0 0 1 0 .708L12.707 12l6.147 6.146a.5.5 0 0 1 .057.638l-.057.07a.5.5 0 0 1-.708 0L12 12.707l-6.146 6.147a.5.5 0 0 1-.638.057l-.07-.057a.5.5 0 0 1 0-.708L11.293 12 5.146 5.854a.5.5 0 0 1-.057-.638z"
|
|
782
808
|
}));
|
|
@@ -791,31 +817,31 @@ function Alert({
|
|
|
791
817
|
closeLabel,
|
|
792
818
|
onClose
|
|
793
819
|
}) {
|
|
794
|
-
return /*#__PURE__*/
|
|
820
|
+
return /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
795
821
|
id: id,
|
|
796
822
|
role: "alert",
|
|
797
823
|
"aria-live": "polite",
|
|
798
824
|
borderRadius: "full",
|
|
799
825
|
className: [modules_6205a58e.container, getClassNames(modules_6205a58e, 'tone', tone)]
|
|
800
|
-
}, /*#__PURE__*/
|
|
826
|
+
}, /*#__PURE__*/React__namespace.createElement(Columns, {
|
|
801
827
|
space: "small",
|
|
802
828
|
alignY: "center"
|
|
803
|
-
}, /*#__PURE__*/
|
|
829
|
+
}, /*#__PURE__*/React__namespace.createElement(Column, {
|
|
804
830
|
width: "content"
|
|
805
|
-
}, /*#__PURE__*/
|
|
831
|
+
}, /*#__PURE__*/React__namespace.createElement(AlertIcon, {
|
|
806
832
|
tone: tone,
|
|
807
833
|
className: modules_6205a58e.icon
|
|
808
|
-
})), /*#__PURE__*/
|
|
834
|
+
})), /*#__PURE__*/React__namespace.createElement(Column, null, /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
809
835
|
paddingY: "xsmall",
|
|
810
836
|
paddingRight: onClose != null && closeLabel != null ? undefined : 'small'
|
|
811
|
-
}, children)), onClose != null && closeLabel != null ? /*#__PURE__*/
|
|
837
|
+
}, children)), onClose != null && closeLabel != null ? /*#__PURE__*/React__namespace.createElement(Column, {
|
|
812
838
|
width: "content"
|
|
813
|
-
}, /*#__PURE__*/
|
|
839
|
+
}, /*#__PURE__*/React__namespace.createElement(Button$1, {
|
|
814
840
|
variant: "quaternary",
|
|
815
841
|
size: "small",
|
|
816
842
|
onClick: onClose,
|
|
817
843
|
"aria-label": closeLabel,
|
|
818
|
-
icon: /*#__PURE__*/
|
|
844
|
+
icon: /*#__PURE__*/React__namespace.createElement(CloseIcon, null),
|
|
819
845
|
style: {
|
|
820
846
|
// @ts-expect-error not sure how to make TypeScript understand custom CSS properties
|
|
821
847
|
'--reactist-btn-hover-fill': 'transparent'
|
|
@@ -834,7 +860,7 @@ function generateElementId(prefix) {
|
|
|
834
860
|
return prefix + "-" + num;
|
|
835
861
|
}
|
|
836
862
|
function useId(providedId) {
|
|
837
|
-
const ref =
|
|
863
|
+
const ref = React__namespace.useRef(providedId != null ? providedId : null);
|
|
838
864
|
|
|
839
865
|
if (!ref.current) {
|
|
840
866
|
ref.current = generateElementId('element');
|
|
@@ -845,8 +871,8 @@ function useId(providedId) {
|
|
|
845
871
|
|
|
846
872
|
var modules_afa80466 = {"banner":"c1dffd60","banner-info":"_9d552538","banner-promotion":"d797752e","title":"_8cd610da","title-without-description":"_78ea5373","title-info":"_319c73fa","title-promotion":"fc84253f","description":"af4bd758","description-info":"b95a8c07","description-promotion":"_3c33f615"};
|
|
847
873
|
|
|
848
|
-
const _excluded$
|
|
849
|
-
const Banner = /*#__PURE__*/
|
|
874
|
+
const _excluded$n = ["id", "tone", "icon", "title", "description", "action"];
|
|
875
|
+
const Banner = /*#__PURE__*/React__namespace.forwardRef(function Banner(_ref, ref) {
|
|
850
876
|
let {
|
|
851
877
|
id,
|
|
852
878
|
tone,
|
|
@@ -855,11 +881,11 @@ const Banner = /*#__PURE__*/React.forwardRef(function Banner(_ref, ref) {
|
|
|
855
881
|
description,
|
|
856
882
|
action
|
|
857
883
|
} = _ref,
|
|
858
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
884
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
859
885
|
|
|
860
886
|
const titleId = useId();
|
|
861
887
|
const descriptionId = useId();
|
|
862
|
-
return /*#__PURE__*/
|
|
888
|
+
return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
863
889
|
ref: ref,
|
|
864
890
|
id: id,
|
|
865
891
|
role: "status",
|
|
@@ -869,35 +895,35 @@ const Banner = /*#__PURE__*/React.forwardRef(function Banner(_ref, ref) {
|
|
|
869
895
|
tabIndex: 0,
|
|
870
896
|
borderRadius: "standard",
|
|
871
897
|
className: [modules_afa80466.banner, modules_afa80466["banner-" + tone]]
|
|
872
|
-
}), /*#__PURE__*/
|
|
898
|
+
}), /*#__PURE__*/React__namespace.createElement(Columns, {
|
|
873
899
|
space: "medium",
|
|
874
900
|
alignY: "center"
|
|
875
|
-
}, /*#__PURE__*/
|
|
901
|
+
}, /*#__PURE__*/React__namespace.createElement(Column, {
|
|
876
902
|
width: "content",
|
|
877
903
|
"aria-hidden": true,
|
|
878
904
|
style: {
|
|
879
905
|
/* Make sure the icon is centered vertically */
|
|
880
906
|
lineHeight: 0
|
|
881
907
|
}
|
|
882
|
-
}, icon), /*#__PURE__*/
|
|
908
|
+
}, icon), /*#__PURE__*/React__namespace.createElement(Column, null, /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
883
909
|
paddingY: "xsmall"
|
|
884
|
-
}, description ? /*#__PURE__*/
|
|
910
|
+
}, description ? /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
885
911
|
id: titleId,
|
|
886
912
|
className: [modules_afa80466.title, modules_afa80466["title-" + tone]]
|
|
887
|
-
}, title) : /*#__PURE__*/
|
|
913
|
+
}, title) : /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
888
914
|
id: titleId,
|
|
889
915
|
className: [modules_afa80466.title, // If the banner does not have a description, we need to slightly tweak
|
|
890
916
|
// the styling of the title applying an extra css class
|
|
891
917
|
modules_afa80466["title-without-description"], modules_afa80466["title-" + tone]]
|
|
892
|
-
}, title), description ? /*#__PURE__*/
|
|
918
|
+
}, title), description ? /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
893
919
|
id: descriptionId,
|
|
894
920
|
className: [modules_afa80466.description, modules_afa80466["description-" + tone]]
|
|
895
|
-
}, description) : null)), action ? /*#__PURE__*/
|
|
921
|
+
}, description) : null)), action ? /*#__PURE__*/React__namespace.createElement(Column, {
|
|
896
922
|
width: "content"
|
|
897
923
|
}, action) : null));
|
|
898
924
|
});
|
|
899
925
|
|
|
900
|
-
const _excluded$
|
|
926
|
+
const _excluded$m = ["size", "exceptionallySetClassName"];
|
|
901
927
|
const sizeMapping = {
|
|
902
928
|
xsmall: 16,
|
|
903
929
|
small: 24,
|
|
@@ -912,18 +938,18 @@ function Loading(_ref) {
|
|
|
912
938
|
size = 'small',
|
|
913
939
|
exceptionallySetClassName
|
|
914
940
|
} = _ref,
|
|
915
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
941
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
916
942
|
|
|
917
943
|
const numericSize = (_sizeMapping$size = sizeMapping[size]) != null ? _sizeMapping$size : sizeMapping.small;
|
|
918
944
|
const ariaLabel = props['aria-label'] ? props['aria-label'] : !props['aria-labelledby'] ? 'Loading…' : undefined;
|
|
919
|
-
return /*#__PURE__*/
|
|
945
|
+
return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
920
946
|
"aria-label": ariaLabel,
|
|
921
947
|
className: exceptionallySetClassName,
|
|
922
948
|
display: "flex",
|
|
923
949
|
alignItems: "center",
|
|
924
950
|
justifyContent: "center",
|
|
925
951
|
role: "progressbar"
|
|
926
|
-
}), /*#__PURE__*/
|
|
952
|
+
}), /*#__PURE__*/React__namespace.createElement(Spinner, {
|
|
927
953
|
size: numericSize,
|
|
928
954
|
"aria-hidden": true
|
|
929
955
|
}));
|
|
@@ -936,26 +962,26 @@ function Notice({
|
|
|
936
962
|
children,
|
|
937
963
|
tone
|
|
938
964
|
}) {
|
|
939
|
-
return /*#__PURE__*/
|
|
965
|
+
return /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
940
966
|
id: id,
|
|
941
967
|
role: "alert",
|
|
942
968
|
"aria-live": "polite",
|
|
943
969
|
className: [modules_1b547e7e.container, getClassNames(modules_1b547e7e, 'tone', tone)]
|
|
944
|
-
}, /*#__PURE__*/
|
|
970
|
+
}, /*#__PURE__*/React__namespace.createElement(Columns, {
|
|
945
971
|
space: "small",
|
|
946
972
|
alignY: "top"
|
|
947
|
-
}, /*#__PURE__*/
|
|
973
|
+
}, /*#__PURE__*/React__namespace.createElement(Column, {
|
|
948
974
|
width: "content"
|
|
949
|
-
}, /*#__PURE__*/
|
|
975
|
+
}, /*#__PURE__*/React__namespace.createElement(AlertIcon, {
|
|
950
976
|
tone: tone
|
|
951
|
-
})), /*#__PURE__*/
|
|
977
|
+
})), /*#__PURE__*/React__namespace.createElement(Column, null, /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
952
978
|
paddingY: "xsmall"
|
|
953
979
|
}, children))));
|
|
954
980
|
}
|
|
955
981
|
|
|
956
982
|
var modules_a9637dd3 = {"text":"a83bd4e0","size-caption":"_266d6623","size-copy":"a8d37c6e","size-subtitle":"_39f4eb1f","weight-semibold":"_7be5c531","weight-bold":"e214ff2e","tone-secondary":"_6a3e5ade","tone-danger":"_8f5b5f2b","tone-positive":"_9ae47ae4","lineClampMultipleLines":"_969f18f7","lineClamp-1":"_2f303ac3","lineClamp-2":"d3e04245","lineClamp-3":"_33411704","lineClamp-4":"bfc32640","lineClamp-5":"f813c82f"};
|
|
957
983
|
|
|
958
|
-
const _excluded$
|
|
984
|
+
const _excluded$l = ["as", "size", "weight", "tone", "align", "children", "lineClamp", "exceptionallySetClassName"];
|
|
959
985
|
const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
|
|
960
986
|
let {
|
|
961
987
|
as,
|
|
@@ -967,10 +993,10 @@ const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
|
|
|
967
993
|
lineClamp,
|
|
968
994
|
exceptionallySetClassName
|
|
969
995
|
} = _ref,
|
|
970
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
996
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
971
997
|
|
|
972
998
|
const lineClampMultipleLines = typeof lineClamp === 'string' ? Number(lineClamp) > 1 : (lineClamp != null ? lineClamp : 1) > 1;
|
|
973
|
-
return /*#__PURE__*/
|
|
999
|
+
return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
974
1000
|
as: as,
|
|
975
1001
|
className: [exceptionallySetClassName, modules_a9637dd3.text, size !== 'body' ? getClassNames(modules_a9637dd3, 'size', size) : null, weight !== 'regular' ? getClassNames(modules_a9637dd3, 'weight', weight) : null, tone !== 'normal' ? getClassNames(modules_a9637dd3, 'tone', tone) : null, lineClampMultipleLines ? modules_a9637dd3.lineClampMultipleLines : null, lineClamp ? getClassNames(modules_a9637dd3, 'lineClamp', lineClamp.toString()) : null],
|
|
976
1002
|
textAlign: align,
|
|
@@ -983,7 +1009,7 @@ const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
|
|
|
983
1009
|
|
|
984
1010
|
var modules_d11e18f0 = {"stackedToastsView":"_616cc3f3","toastContainer":"_1b5f8e86","slot":"ce2e3476"};
|
|
985
1011
|
|
|
986
|
-
const _excluded$
|
|
1012
|
+
const _excluded$k = ["message", "description", "icon", "action", "onDismiss", "dismissLabel"];
|
|
987
1013
|
/**
|
|
988
1014
|
* A toast that shows a message, and an optional action associated with it.
|
|
989
1015
|
*
|
|
@@ -999,7 +1025,7 @@ const _excluded$b = ["message", "description", "icon", "action", "onDismiss", "d
|
|
|
999
1025
|
* @see useToasts
|
|
1000
1026
|
*/
|
|
1001
1027
|
|
|
1002
|
-
const StaticToast = /*#__PURE__*/React__default.forwardRef(function Toast(_ref, ref) {
|
|
1028
|
+
const StaticToast = /*#__PURE__*/React__default["default"].forwardRef(function Toast(_ref, ref) {
|
|
1003
1029
|
let {
|
|
1004
1030
|
message,
|
|
1005
1031
|
description,
|
|
@@ -1008,9 +1034,9 @@ const StaticToast = /*#__PURE__*/React__default.forwardRef(function Toast(_ref,
|
|
|
1008
1034
|
onDismiss,
|
|
1009
1035
|
dismissLabel = 'Close'
|
|
1010
1036
|
} = _ref,
|
|
1011
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1037
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
1012
1038
|
|
|
1013
|
-
return /*#__PURE__*/React__default.createElement(Box, _objectSpread2({
|
|
1039
|
+
return /*#__PURE__*/React__default["default"].createElement(Box$1, _objectSpread2({
|
|
1014
1040
|
ref: ref,
|
|
1015
1041
|
role: "alert",
|
|
1016
1042
|
"aria-live": "polite",
|
|
@@ -1021,23 +1047,23 @@ const StaticToast = /*#__PURE__*/React__default.forwardRef(function Toast(_ref,
|
|
|
1021
1047
|
padding: "large",
|
|
1022
1048
|
alignItems: "center",
|
|
1023
1049
|
className: modules_d11e18f0.toastContainer
|
|
1024
|
-
}, props), icon ? /*#__PURE__*/React__default.createElement(ToastContentSlot, null, icon) : null, /*#__PURE__*/React__default.createElement(Box, {
|
|
1050
|
+
}, props), icon ? /*#__PURE__*/React__default["default"].createElement(ToastContentSlot, null, icon) : null, /*#__PURE__*/React__default["default"].createElement(Box$1, {
|
|
1025
1051
|
flexGrow: 1,
|
|
1026
1052
|
maxWidth: "small"
|
|
1027
|
-
}, description ? /*#__PURE__*/React__default.createElement(Stack, {
|
|
1053
|
+
}, description ? /*#__PURE__*/React__default["default"].createElement(Stack, {
|
|
1028
1054
|
space: "small"
|
|
1029
|
-
}, /*#__PURE__*/React__default.createElement(Text, {
|
|
1055
|
+
}, /*#__PURE__*/React__default["default"].createElement(Text, {
|
|
1030
1056
|
weight: "bold"
|
|
1031
|
-
}, message, " "), /*#__PURE__*/React__default.createElement(Text, null, description)) : /*#__PURE__*/React__default.createElement(Text, null, message)), action ? /*#__PURE__*/React__default.createElement(ToastContentSlot, null, isActionObject(action) ? /*#__PURE__*/React__default.createElement(Button, {
|
|
1057
|
+
}, message, " "), /*#__PURE__*/React__default["default"].createElement(Text, null, description)) : /*#__PURE__*/React__default["default"].createElement(Text, null, message)), action ? /*#__PURE__*/React__default["default"].createElement(ToastContentSlot, null, isActionObject(action) ? /*#__PURE__*/React__default["default"].createElement(Button$1, {
|
|
1032
1058
|
variant: "tertiary",
|
|
1033
1059
|
size: "small",
|
|
1034
1060
|
onClick: action.onClick
|
|
1035
|
-
}, action.label) : action) : null, onDismiss ? /*#__PURE__*/React__default.createElement(ToastContentSlot, null, /*#__PURE__*/React__default.createElement(IconButton, {
|
|
1061
|
+
}, action.label) : action) : null, onDismiss ? /*#__PURE__*/React__default["default"].createElement(ToastContentSlot, null, /*#__PURE__*/React__default["default"].createElement(IconButton, {
|
|
1036
1062
|
variant: "quaternary",
|
|
1037
1063
|
size: "small",
|
|
1038
1064
|
onClick: onDismiss,
|
|
1039
1065
|
"aria-label": dismissLabel,
|
|
1040
|
-
icon: /*#__PURE__*/React__default.createElement(CloseIcon, null)
|
|
1066
|
+
icon: /*#__PURE__*/React__default["default"].createElement(CloseIcon, null)
|
|
1041
1067
|
})) : null);
|
|
1042
1068
|
});
|
|
1043
1069
|
|
|
@@ -1048,7 +1074,7 @@ function isActionObject(action) {
|
|
|
1048
1074
|
function ToastContentSlot({
|
|
1049
1075
|
children
|
|
1050
1076
|
}) {
|
|
1051
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
1077
|
+
return /*#__PURE__*/React__default["default"].createElement(Box$1, {
|
|
1052
1078
|
display: "flex",
|
|
1053
1079
|
alignItems: "center",
|
|
1054
1080
|
justifyContent: "center",
|
|
@@ -1229,10 +1255,10 @@ function useToastsAnimation() {
|
|
|
1229
1255
|
};
|
|
1230
1256
|
}
|
|
1231
1257
|
|
|
1232
|
-
const _excluded$
|
|
1258
|
+
const _excluded$j = ["toastId"];
|
|
1233
1259
|
/** @private */
|
|
1234
1260
|
|
|
1235
|
-
const InternalToast = /*#__PURE__*/React__default.forwardRef(function InternalToast({
|
|
1261
|
+
const InternalToast = /*#__PURE__*/React__default["default"].forwardRef(function InternalToast({
|
|
1236
1262
|
message,
|
|
1237
1263
|
description,
|
|
1238
1264
|
icon,
|
|
@@ -1244,21 +1270,21 @@ const InternalToast = /*#__PURE__*/React__default.forwardRef(function InternalTo
|
|
|
1244
1270
|
onDismiss,
|
|
1245
1271
|
onRemoveToast
|
|
1246
1272
|
}, ref) {
|
|
1247
|
-
const [timeoutRunning, setTimeoutRunning] = React__default.useState(Boolean(autoDismissDelay));
|
|
1248
|
-
const timeoutRef = React__default.useRef();
|
|
1249
|
-
const startTimeout = React__default.useCallback(function startTimeout() {
|
|
1273
|
+
const [timeoutRunning, setTimeoutRunning] = React__default["default"].useState(Boolean(autoDismissDelay));
|
|
1274
|
+
const timeoutRef = React__default["default"].useRef();
|
|
1275
|
+
const startTimeout = React__default["default"].useCallback(function startTimeout() {
|
|
1250
1276
|
setTimeoutRunning(true);
|
|
1251
1277
|
}, []);
|
|
1252
|
-
const stopTimeout = React__default.useCallback(function stopTimeout() {
|
|
1278
|
+
const stopTimeout = React__default["default"].useCallback(function stopTimeout() {
|
|
1253
1279
|
setTimeoutRunning(false);
|
|
1254
1280
|
clearTimeout(timeoutRef.current);
|
|
1255
1281
|
timeoutRef.current = undefined;
|
|
1256
1282
|
}, []);
|
|
1257
|
-
const removeToast = React__default.useCallback(function removeToast() {
|
|
1283
|
+
const removeToast = React__default["default"].useCallback(function removeToast() {
|
|
1258
1284
|
onRemoveToast(toastId);
|
|
1259
1285
|
onDismiss == null ? void 0 : onDismiss();
|
|
1260
1286
|
}, [onDismiss, onRemoveToast, toastId]);
|
|
1261
|
-
React__default.useEffect(function setupAutoDismiss() {
|
|
1287
|
+
React__default["default"].useEffect(function setupAutoDismiss() {
|
|
1262
1288
|
if (!timeoutRunning || !autoDismissDelay) return;
|
|
1263
1289
|
timeoutRef.current = window.setTimeout(removeToast, autoDismissDelay * 1000);
|
|
1264
1290
|
return stopTimeout;
|
|
@@ -1269,7 +1295,7 @@ const InternalToast = /*#__PURE__*/React__default.forwardRef(function InternalTo
|
|
|
1269
1295
|
* for removing the toast when the action is triggered.
|
|
1270
1296
|
*/
|
|
1271
1297
|
|
|
1272
|
-
const actionWithCustomActionHandler = React__default.useMemo(() => {
|
|
1298
|
+
const actionWithCustomActionHandler = React__default["default"].useMemo(() => {
|
|
1273
1299
|
if (!isActionObject(action)) {
|
|
1274
1300
|
return action;
|
|
1275
1301
|
}
|
|
@@ -1285,7 +1311,7 @@ const InternalToast = /*#__PURE__*/React__default.forwardRef(function InternalTo
|
|
|
1285
1311
|
}
|
|
1286
1312
|
});
|
|
1287
1313
|
}, [action, removeToast]);
|
|
1288
|
-
return /*#__PURE__*/React__default.createElement(StaticToast, {
|
|
1314
|
+
return /*#__PURE__*/React__default["default"].createElement(StaticToast, {
|
|
1289
1315
|
ref: ref,
|
|
1290
1316
|
message: message,
|
|
1291
1317
|
description: description,
|
|
@@ -1298,7 +1324,7 @@ const InternalToast = /*#__PURE__*/React__default.forwardRef(function InternalTo
|
|
|
1298
1324
|
onMouseLeave: startTimeout
|
|
1299
1325
|
});
|
|
1300
1326
|
});
|
|
1301
|
-
const ToastsContext = /*#__PURE__*/React__default.createContext(() => () => undefined);
|
|
1327
|
+
const ToastsContext = /*#__PURE__*/React__default["default"].createContext(() => () => undefined);
|
|
1302
1328
|
/**
|
|
1303
1329
|
* Provides the state management and rendering of the toasts currently active.
|
|
1304
1330
|
*
|
|
@@ -1316,12 +1342,12 @@ function ToastsProvider({
|
|
|
1316
1342
|
defaultDismissLabel = 'Close',
|
|
1317
1343
|
containerClassName
|
|
1318
1344
|
}) {
|
|
1319
|
-
const [toasts, setToasts] = React__default.useState([]);
|
|
1345
|
+
const [toasts, setToasts] = React__default["default"].useState([]);
|
|
1320
1346
|
const {
|
|
1321
1347
|
mappedRef,
|
|
1322
1348
|
animateRemove
|
|
1323
1349
|
} = useToastsAnimation();
|
|
1324
|
-
const removeToast = React__default.useCallback(function onRemoveToast(toastId) {
|
|
1350
|
+
const removeToast = React__default["default"].useCallback(function onRemoveToast(toastId) {
|
|
1325
1351
|
animateRemove(toastId, () => {
|
|
1326
1352
|
setToasts(list => {
|
|
1327
1353
|
const index = list.findIndex(n => n.toastId === toastId);
|
|
@@ -1332,7 +1358,7 @@ function ToastsProvider({
|
|
|
1332
1358
|
});
|
|
1333
1359
|
});
|
|
1334
1360
|
}, [animateRemove]);
|
|
1335
|
-
const showToast = React__default.useCallback(function showToast(props) {
|
|
1361
|
+
const showToast = React__default["default"].useCallback(function showToast(props) {
|
|
1336
1362
|
const toastId = generateElementId('toast');
|
|
1337
1363
|
|
|
1338
1364
|
const newToast = _objectSpread2(_objectSpread2({
|
|
@@ -1345,24 +1371,24 @@ function ToastsProvider({
|
|
|
1345
1371
|
setToasts(list => [...list, newToast]);
|
|
1346
1372
|
return () => removeToast(toastId);
|
|
1347
1373
|
}, [defaultAutoDismissDelay, defaultDismissLabel, removeToast]);
|
|
1348
|
-
return /*#__PURE__*/React__default.createElement(ToastsContext.Provider, {
|
|
1374
|
+
return /*#__PURE__*/React__default["default"].createElement(ToastsContext.Provider, {
|
|
1349
1375
|
value: showToast
|
|
1350
|
-
}, children, /*#__PURE__*/React__default.createElement(react.Portal, null, toasts.length === 0 ? null : /*#__PURE__*/React__default.createElement(Box, {
|
|
1376
|
+
}, children, /*#__PURE__*/React__default["default"].createElement(react.Portal, null, toasts.length === 0 ? null : /*#__PURE__*/React__default["default"].createElement(Box$1, {
|
|
1351
1377
|
className: [modules_d11e18f0.stackedToastsView, containerClassName],
|
|
1352
1378
|
position: "fixed",
|
|
1353
1379
|
width: "full",
|
|
1354
1380
|
paddingX: padding,
|
|
1355
1381
|
paddingBottom: padding,
|
|
1356
1382
|
"data-testid": "toasts-container"
|
|
1357
|
-
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
1383
|
+
}, /*#__PURE__*/React__default["default"].createElement(Stack, {
|
|
1358
1384
|
space: "medium"
|
|
1359
1385
|
}, toasts.map(_ref => {
|
|
1360
1386
|
let {
|
|
1361
1387
|
toastId
|
|
1362
1388
|
} = _ref,
|
|
1363
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1389
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
1364
1390
|
|
|
1365
|
-
return /*#__PURE__*/React__default.createElement(InternalToast, _objectSpread2({
|
|
1391
|
+
return /*#__PURE__*/React__default["default"].createElement(InternalToast, _objectSpread2({
|
|
1366
1392
|
key: toastId,
|
|
1367
1393
|
ref: mappedRef(toastId),
|
|
1368
1394
|
toastId: toastId,
|
|
@@ -1391,7 +1417,7 @@ function ToastsProvider({
|
|
|
1391
1417
|
|
|
1392
1418
|
|
|
1393
1419
|
function useToasts() {
|
|
1394
|
-
return React__default.useContext(ToastsContext);
|
|
1420
|
+
return React__default["default"].useContext(ToastsContext);
|
|
1395
1421
|
}
|
|
1396
1422
|
/**
|
|
1397
1423
|
* Adds a toast to be rendered, stacked alongside any other currently active toasts.
|
|
@@ -1426,8 +1452,8 @@ function useToasts() {
|
|
|
1426
1452
|
|
|
1427
1453
|
function Toast(props) {
|
|
1428
1454
|
const showToast = useToasts();
|
|
1429
|
-
const propsRef = React__default.useRef(props);
|
|
1430
|
-
React__default.useEffect(() => {
|
|
1455
|
+
const propsRef = React__default["default"].useRef(props);
|
|
1456
|
+
React__default["default"].useEffect(() => {
|
|
1431
1457
|
const dismissToast = showToast(propsRef.current);
|
|
1432
1458
|
return dismissToast;
|
|
1433
1459
|
}, [showToast]);
|
|
@@ -1436,8 +1462,8 @@ function Toast(props) {
|
|
|
1436
1462
|
|
|
1437
1463
|
var modules_949d2ff4 = {"heading":"bff24867","weight-medium":"_9b540c61","weight-light":"c6729907","tone-secondary":"d6507f70","tone-danger":"d1846d93","size-largest":"_7cbdd1ba","size-larger":"b3e14969","size-smaller":"be14a265","lineClampMultipleLines":"_71391f13","lineClamp-1":"_97298b1b","lineClamp-2":"_6d357d76","lineClamp-3":"d820b451","lineClamp-4":"_8d37487d","lineClamp-5":"_5215b4d7"};
|
|
1438
1464
|
|
|
1439
|
-
const _excluded$
|
|
1440
|
-
const Heading = /*#__PURE__*/
|
|
1465
|
+
const _excluded$i = ["level", "weight", "size", "tone", "children", "lineClamp", "align", "exceptionallySetClassName"];
|
|
1466
|
+
const Heading = /*#__PURE__*/React__namespace.forwardRef(function Heading(_ref, ref) {
|
|
1441
1467
|
let {
|
|
1442
1468
|
level,
|
|
1443
1469
|
weight = 'regular',
|
|
@@ -1448,13 +1474,13 @@ const Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
|
|
|
1448
1474
|
align,
|
|
1449
1475
|
exceptionallySetClassName
|
|
1450
1476
|
} = _ref,
|
|
1451
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1477
|
+
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
1452
1478
|
|
|
1453
1479
|
// In TypeScript v4.1, this would be properly recognized without needing the type assertion
|
|
1454
1480
|
// https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#template-literal-types
|
|
1455
1481
|
const headingElementName = "h" + level;
|
|
1456
1482
|
const lineClampMultipleLines = typeof lineClamp === 'string' ? parseInt(lineClamp, 10) > 1 : (lineClamp || 0) > 1;
|
|
1457
|
-
return /*#__PURE__*/
|
|
1483
|
+
return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1458
1484
|
className: [exceptionallySetClassName, modules_949d2ff4.heading, weight !== 'regular' ? getClassNames(modules_949d2ff4, 'weight', weight) : null, tone !== 'normal' ? getClassNames(modules_949d2ff4, 'tone', tone) : null, getClassNames(modules_949d2ff4, 'size', size), lineClampMultipleLines ? modules_949d2ff4.lineClampMultipleLines : null, lineClamp ? getClassNames(modules_949d2ff4, 'lineClamp', lineClamp.toString()) : null],
|
|
1459
1485
|
textAlign: align,
|
|
1460
1486
|
// Prevents emojis from being cut-off
|
|
@@ -1467,7 +1493,7 @@ const Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
|
|
|
1467
1493
|
|
|
1468
1494
|
var modules_8ebe6db0 = {"prose":"_560c1e08","darkModeTypography":"_8b53b13e"};
|
|
1469
1495
|
|
|
1470
|
-
const _excluded$
|
|
1496
|
+
const _excluded$h = ["darkModeTypography", "exceptionallySetClassName"];
|
|
1471
1497
|
/**
|
|
1472
1498
|
* Used to style HTML you don’t control, like HTML content generated from Markdown.
|
|
1473
1499
|
*/
|
|
@@ -1477,25 +1503,25 @@ function Prose(_ref) {
|
|
|
1477
1503
|
darkModeTypography,
|
|
1478
1504
|
exceptionallySetClassName
|
|
1479
1505
|
} = _ref,
|
|
1480
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1506
|
+
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
1481
1507
|
|
|
1482
|
-
return /*#__PURE__*/
|
|
1508
|
+
return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1483
1509
|
className: [modules_8ebe6db0.prose, darkModeTypography ? modules_8ebe6db0.darkModeTypography : null, exceptionallySetClassName]
|
|
1484
1510
|
}));
|
|
1485
1511
|
}
|
|
1486
1512
|
|
|
1487
1513
|
var modules_3d05deee = {"container":"fdc181b3"};
|
|
1488
1514
|
|
|
1489
|
-
const _excluded$
|
|
1515
|
+
const _excluded$g = ["as", "openInNewTab", "exceptionallySetClassName"];
|
|
1490
1516
|
const TextLink = /*#__PURE__*/polymorphicComponent(function TextLink(_ref, ref) {
|
|
1491
1517
|
let {
|
|
1492
1518
|
as = 'a',
|
|
1493
1519
|
openInNewTab = false,
|
|
1494
1520
|
exceptionallySetClassName
|
|
1495
1521
|
} = _ref,
|
|
1496
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1522
|
+
props = _objectWithoutProperties(_ref, _excluded$g);
|
|
1497
1523
|
|
|
1498
|
-
return /*#__PURE__*/
|
|
1524
|
+
return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1499
1525
|
as: as,
|
|
1500
1526
|
display: "inline",
|
|
1501
1527
|
className: [exceptionallySetClassName, modules_3d05deee.container],
|
|
@@ -1505,7 +1531,7 @@ const TextLink = /*#__PURE__*/polymorphicComponent(function TextLink(_ref, ref)
|
|
|
1505
1531
|
}));
|
|
1506
1532
|
});
|
|
1507
1533
|
|
|
1508
|
-
const _excluded$
|
|
1534
|
+
const _excluded$f = ["checked", "indeterminate", "disabled"];
|
|
1509
1535
|
const svgPath = {
|
|
1510
1536
|
checked: 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2.457 4.293l-5.293 5.293-1.793-1.793a1 1 0 1 0-1.414 1.414l2.5 2.5a1 1 0 0 0 1.414 0l6-6a1 1 0 1 0-1.414-1.414z',
|
|
1511
1537
|
unchecked: 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm0 1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z',
|
|
@@ -1544,19 +1570,19 @@ function CheckboxIcon(_ref) {
|
|
|
1544
1570
|
indeterminate,
|
|
1545
1571
|
disabled
|
|
1546
1572
|
} = _ref,
|
|
1547
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1573
|
+
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
1548
1574
|
|
|
1549
1575
|
const pathKey = getPathKey({
|
|
1550
1576
|
checked,
|
|
1551
1577
|
indeterminate,
|
|
1552
1578
|
disabled
|
|
1553
1579
|
});
|
|
1554
|
-
return /*#__PURE__*/
|
|
1580
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _objectSpread2({
|
|
1555
1581
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1556
1582
|
width: "24",
|
|
1557
1583
|
height: "24",
|
|
1558
1584
|
viewBox: "0 0 24 24"
|
|
1559
|
-
}, props), /*#__PURE__*/
|
|
1585
|
+
}, props), /*#__PURE__*/React__namespace.createElement("path", {
|
|
1560
1586
|
fill: "currentColor",
|
|
1561
1587
|
fillRule: "nonzero",
|
|
1562
1588
|
d: svgPath[pathKey]
|
|
@@ -1596,8 +1622,8 @@ function useForkRef(...refs) {
|
|
|
1596
1622
|
refs);
|
|
1597
1623
|
}
|
|
1598
1624
|
|
|
1599
|
-
const _excluded$
|
|
1600
|
-
const CheckboxField = /*#__PURE__*/
|
|
1625
|
+
const _excluded$e = ["label", "icon", "disabled", "indeterminate", "defaultChecked", "onChange"];
|
|
1626
|
+
const CheckboxField = /*#__PURE__*/React__namespace.forwardRef(function CheckboxField(_ref, ref) {
|
|
1601
1627
|
var _ref2, _props$checked, _props$checked2;
|
|
1602
1628
|
|
|
1603
1629
|
let {
|
|
@@ -1608,7 +1634,7 @@ const CheckboxField = /*#__PURE__*/React.forwardRef(function CheckboxField(_ref,
|
|
|
1608
1634
|
defaultChecked,
|
|
1609
1635
|
onChange
|
|
1610
1636
|
} = _ref,
|
|
1611
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1637
|
+
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
1612
1638
|
|
|
1613
1639
|
const isControlledComponent = typeof props.checked === 'boolean';
|
|
1614
1640
|
|
|
@@ -1623,22 +1649,22 @@ const CheckboxField = /*#__PURE__*/React.forwardRef(function CheckboxField(_ref,
|
|
|
1623
1649
|
console.warn('A Checkbox needs a label');
|
|
1624
1650
|
}
|
|
1625
1651
|
|
|
1626
|
-
const [keyFocused, setKeyFocused] =
|
|
1627
|
-
const [checkedState, setChecked] =
|
|
1652
|
+
const [keyFocused, setKeyFocused] = React__namespace.useState(false);
|
|
1653
|
+
const [checkedState, setChecked] = React__namespace.useState((_ref2 = (_props$checked = props.checked) != null ? _props$checked : defaultChecked) != null ? _ref2 : false);
|
|
1628
1654
|
const isChecked = (_props$checked2 = props.checked) != null ? _props$checked2 : checkedState;
|
|
1629
|
-
const internalRef =
|
|
1655
|
+
const internalRef = React__namespace.useRef(null);
|
|
1630
1656
|
const combinedRef = useForkRef(internalRef, ref);
|
|
1631
|
-
|
|
1657
|
+
React__namespace.useEffect(function setIndeterminate() {
|
|
1632
1658
|
if (internalRef.current && typeof indeterminate === 'boolean') {
|
|
1633
1659
|
internalRef.current.indeterminate = indeterminate;
|
|
1634
1660
|
}
|
|
1635
1661
|
}, [indeterminate]);
|
|
1636
|
-
return /*#__PURE__*/
|
|
1662
|
+
return /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
1637
1663
|
as: "label",
|
|
1638
1664
|
display: "flex",
|
|
1639
1665
|
alignItems: "center",
|
|
1640
1666
|
className: [modules_664a6a80.container, disabled ? modules_664a6a80.disabled : null, isChecked ? modules_664a6a80.checked : null, keyFocused ? modules_664a6a80.keyFocused : null]
|
|
1641
|
-
}, /*#__PURE__*/
|
|
1667
|
+
}, /*#__PURE__*/React__namespace.createElement("input", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1642
1668
|
ref: combinedRef,
|
|
1643
1669
|
type: "checkbox",
|
|
1644
1670
|
"aria-checked": indeterminate ? 'mixed' : isChecked,
|
|
@@ -1659,33 +1685,33 @@ const CheckboxField = /*#__PURE__*/React.forwardRef(function CheckboxField(_ref,
|
|
|
1659
1685
|
setKeyFocused(true);
|
|
1660
1686
|
props == null ? void 0 : props.onKeyUp == null ? void 0 : props.onKeyUp(event);
|
|
1661
1687
|
}
|
|
1662
|
-
})), /*#__PURE__*/
|
|
1688
|
+
})), /*#__PURE__*/React__namespace.createElement(CheckboxIcon, {
|
|
1663
1689
|
checked: isChecked,
|
|
1664
1690
|
disabled: disabled,
|
|
1665
1691
|
indeterminate: indeterminate,
|
|
1666
1692
|
"aria-hidden": true
|
|
1667
|
-
}), icon ? /*#__PURE__*/
|
|
1693
|
+
}), icon ? /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
1668
1694
|
display: "flex",
|
|
1669
1695
|
className: modules_664a6a80.icon,
|
|
1670
1696
|
"aria-hidden": true
|
|
1671
|
-
}, icon) : null, label ? /*#__PURE__*/
|
|
1697
|
+
}, icon) : null, label ? /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
1672
1698
|
display: "flex",
|
|
1673
1699
|
className: modules_664a6a80.label
|
|
1674
|
-
}, /*#__PURE__*/
|
|
1700
|
+
}, /*#__PURE__*/React__namespace.createElement(Text, null, label)) : null);
|
|
1675
1701
|
});
|
|
1676
1702
|
|
|
1677
1703
|
function PasswordVisibleIcon(props) {
|
|
1678
|
-
return /*#__PURE__*/
|
|
1704
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _objectSpread2({
|
|
1679
1705
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1680
1706
|
width: "24",
|
|
1681
1707
|
height: "24"
|
|
1682
|
-
}, props), /*#__PURE__*/
|
|
1708
|
+
}, props), /*#__PURE__*/React__namespace.createElement("g", {
|
|
1683
1709
|
fill: "none",
|
|
1684
1710
|
fillRule: "evenodd",
|
|
1685
1711
|
stroke: "gray"
|
|
1686
|
-
}, /*#__PURE__*/
|
|
1712
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
1687
1713
|
d: "M21.358 12C17.825 7.65 14.692 5.5 12 5.5c-2.624 0-5.67 2.043-9.097 6.181a.5.5 0 0 0 0 .638C6.331 16.457 9.376 18.5 12 18.5c2.692 0 5.825-2.15 9.358-6.5z"
|
|
1688
|
-
}), /*#__PURE__*/
|
|
1714
|
+
}), /*#__PURE__*/React__namespace.createElement("circle", {
|
|
1689
1715
|
cx: "12",
|
|
1690
1716
|
cy: "12",
|
|
1691
1717
|
r: "3.5"
|
|
@@ -1693,21 +1719,21 @@ function PasswordVisibleIcon(props) {
|
|
|
1693
1719
|
}
|
|
1694
1720
|
|
|
1695
1721
|
function PasswordHiddenIcon(props) {
|
|
1696
|
-
return /*#__PURE__*/
|
|
1722
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _objectSpread2({
|
|
1697
1723
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1698
1724
|
width: "24",
|
|
1699
1725
|
height: "24"
|
|
1700
|
-
}, props), /*#__PURE__*/
|
|
1726
|
+
}, props), /*#__PURE__*/React__namespace.createElement("g", {
|
|
1701
1727
|
fill: "gray",
|
|
1702
1728
|
fillRule: "evenodd",
|
|
1703
1729
|
transform: "translate(2 4)"
|
|
1704
|
-
}, /*#__PURE__*/
|
|
1730
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
1705
1731
|
fillRule: "nonzero",
|
|
1706
1732
|
d: "M13.047 2.888C11.962 2.294 10.944 2 10 2 7.56 2 4.63 3.966 1.288 8c1.133 1.368 2.218 2.497 3.253 3.394l-.708.708c-1.068-.93-2.173-2.085-3.315-3.464a1 1 0 0 1 0-1.276C4.031 3.121 7.192 1 10 1c1.196 0 2.456.385 3.78 1.154l-.733.734zm-6.02 10.263C8.084 13.72 9.076 14 10 14c2.443 0 5.373-1.969 8.712-6-1.11-1.34-2.176-2.453-3.193-3.341l.708-.709C17.437 5.013 18.695 6.363 20 8c-3.721 4.667-7.054 7-10 7-1.175 0-2.411-.371-3.709-1.113l.735-.736z"
|
|
1707
|
-
}), /*#__PURE__*/
|
|
1733
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
1708
1734
|
fillRule: "nonzero",
|
|
1709
1735
|
d: "M8.478 11.7l.79-.79a3 3 0 0 0 3.642-3.642l.79-.79A4 4 0 0 1 8.477 11.7zM6.334 9.602a4 4 0 0 1 5.268-5.268l-.78.78A3.002 3.002 0 0 0 7.113 8.82l-.78.78z"
|
|
1710
|
-
}), /*#__PURE__*/
|
|
1736
|
+
}), /*#__PURE__*/React__namespace.createElement("rect", {
|
|
1711
1737
|
width: "21",
|
|
1712
1738
|
height: "1",
|
|
1713
1739
|
x: "-.722",
|
|
@@ -1720,7 +1746,7 @@ function PasswordHiddenIcon(props) {
|
|
|
1720
1746
|
var modules_540a88ff = {"container":"_7acdc928","auxiliaryLabel":"_815bad88","bordered":"e35886fe","error":"_6c7b5dc8","primaryLabel":"ec74af87","secondaryLabel":"_6db0ec44","messageIcon":"_05c35af8"};
|
|
1721
1747
|
|
|
1722
1748
|
function FieldHint(props) {
|
|
1723
|
-
return /*#__PURE__*/
|
|
1749
|
+
return /*#__PURE__*/React__namespace.createElement(Text, _objectSpread2({
|
|
1724
1750
|
as: "p",
|
|
1725
1751
|
tone: "secondary",
|
|
1726
1752
|
size: "copy"
|
|
@@ -1728,13 +1754,13 @@ function FieldHint(props) {
|
|
|
1728
1754
|
}
|
|
1729
1755
|
|
|
1730
1756
|
function MessageIcon(props) {
|
|
1731
|
-
return /*#__PURE__*/
|
|
1757
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _objectSpread2({
|
|
1732
1758
|
width: "16",
|
|
1733
1759
|
height: "16",
|
|
1734
1760
|
viewBox: "0 0 16 16",
|
|
1735
1761
|
fill: "none",
|
|
1736
1762
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1737
|
-
}, props), /*#__PURE__*/
|
|
1763
|
+
}, props), /*#__PURE__*/React__namespace.createElement("path", {
|
|
1738
1764
|
fillRule: "evenodd",
|
|
1739
1765
|
clipRule: "evenodd",
|
|
1740
1766
|
d: "M8 2.5C4.96243 2.5 2.5 4.96243 2.5 8C2.5 11.0376 4.96243 13.5 8 13.5C11.0376 13.5 13.5 11.0376 13.5 8C13.5 4.96243 11.0376 2.5 8 2.5ZM1.5 8C1.5 4.41015 4.41015 1.5 8 1.5C11.5899 1.5 14.5 4.41015 14.5 8C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8ZM8.66667 10.3333C8.66667 10.7015 8.36819 11 8 11C7.63181 11 7.33333 10.7015 7.33333 10.3333C7.33333 9.96514 7.63181 9.66667 8 9.66667C8.36819 9.66667 8.66667 9.96514 8.66667 10.3333ZM8.65766 5.65766C8.65766 5.29445 8.36322 5 8 5C7.99087 5.00008 7.98631 5.00013 7.98175 5.00025C7.97719 5.00038 7.97263 5.00059 7.96352 5.00101C7.60086 5.02116 7.3232 5.33149 7.34335 5.69415L7.50077 8.52774C7.53575 9.15742 8.46425 9.15742 8.49923 8.52774L8.65665 5.69415C8.65707 5.68503 8.65728 5.68047 8.65741 5.67591C8.65754 5.67135 8.65758 5.66679 8.65766 5.65766Z",
|
|
@@ -1748,19 +1774,19 @@ function FieldMessage({
|
|
|
1748
1774
|
tone
|
|
1749
1775
|
}) {
|
|
1750
1776
|
const textTone = tone === 'error' ? 'danger' : tone === 'success' ? 'positive' : 'normal';
|
|
1751
|
-
return /*#__PURE__*/
|
|
1777
|
+
return /*#__PURE__*/React__namespace.createElement(Text, {
|
|
1752
1778
|
as: "p",
|
|
1753
1779
|
tone: textTone,
|
|
1754
1780
|
size: "copy",
|
|
1755
1781
|
id: id
|
|
1756
|
-
}, /*#__PURE__*/
|
|
1782
|
+
}, /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
1757
1783
|
as: "span",
|
|
1758
1784
|
marginRight: "xsmall",
|
|
1759
1785
|
display: "inlineFlex",
|
|
1760
1786
|
className: modules_540a88ff.messageIcon
|
|
1761
|
-
}, tone === 'loading' ? /*#__PURE__*/
|
|
1787
|
+
}, tone === 'loading' ? /*#__PURE__*/React__namespace.createElement(Spinner, {
|
|
1762
1788
|
size: 16
|
|
1763
|
-
}) : /*#__PURE__*/
|
|
1789
|
+
}) : /*#__PURE__*/React__namespace.createElement(MessageIcon, {
|
|
1764
1790
|
"aria-hidden": true
|
|
1765
1791
|
})), children);
|
|
1766
1792
|
}
|
|
@@ -1789,40 +1815,40 @@ function BaseField({
|
|
|
1789
1815
|
'aria-describedby': ariaDescribedBy,
|
|
1790
1816
|
'aria-invalid': tone === 'error' ? true : undefined
|
|
1791
1817
|
};
|
|
1792
|
-
return /*#__PURE__*/
|
|
1818
|
+
return /*#__PURE__*/React__namespace.createElement(Stack, {
|
|
1793
1819
|
space: "small",
|
|
1794
1820
|
hidden: hidden
|
|
1795
|
-
}, /*#__PURE__*/
|
|
1821
|
+
}, /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
1796
1822
|
className: [className, modules_540a88ff.container, tone === 'error' ? modules_540a88ff.error : null, variant === 'bordered' ? modules_540a88ff.bordered : null],
|
|
1797
1823
|
maxWidth: maxWidth
|
|
1798
|
-
}, label || secondaryLabel || auxiliaryLabel ? /*#__PURE__*/
|
|
1824
|
+
}, label || secondaryLabel || auxiliaryLabel ? /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
1799
1825
|
as: "span",
|
|
1800
1826
|
display: "flex",
|
|
1801
1827
|
justifyContent: "spaceBetween",
|
|
1802
1828
|
alignItems: "flexEnd"
|
|
1803
|
-
}, /*#__PURE__*/
|
|
1829
|
+
}, /*#__PURE__*/React__namespace.createElement(Text, {
|
|
1804
1830
|
size: variant === 'bordered' ? 'caption' : 'body',
|
|
1805
1831
|
as: "label",
|
|
1806
1832
|
htmlFor: id
|
|
1807
|
-
}, label ? /*#__PURE__*/
|
|
1833
|
+
}, label ? /*#__PURE__*/React__namespace.createElement("span", {
|
|
1808
1834
|
className: modules_540a88ff.primaryLabel
|
|
1809
|
-
}, label) : null, secondaryLabel ? /*#__PURE__*/
|
|
1835
|
+
}, label) : null, secondaryLabel ? /*#__PURE__*/React__namespace.createElement("span", {
|
|
1810
1836
|
className: modules_540a88ff.secondaryLabel
|
|
1811
|
-
}, "\u00A0(", secondaryLabel, ")") : null), auxiliaryLabel ? /*#__PURE__*/
|
|
1837
|
+
}, "\u00A0(", secondaryLabel, ")") : null), auxiliaryLabel ? /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
1812
1838
|
className: modules_540a88ff.auxiliaryLabel,
|
|
1813
1839
|
paddingLeft: "small"
|
|
1814
|
-
}, auxiliaryLabel) : null) : null, children(childrenProps)), message ? /*#__PURE__*/
|
|
1840
|
+
}, auxiliaryLabel) : null) : null, children(childrenProps)), message ? /*#__PURE__*/React__namespace.createElement(FieldMessage, {
|
|
1815
1841
|
id: messageId,
|
|
1816
1842
|
tone: tone
|
|
1817
|
-
}, message) : null, hint ? /*#__PURE__*/
|
|
1843
|
+
}, message) : null, hint ? /*#__PURE__*/React__namespace.createElement(FieldHint, {
|
|
1818
1844
|
id: hintId
|
|
1819
1845
|
}, hint) : null);
|
|
1820
1846
|
}
|
|
1821
1847
|
|
|
1822
1848
|
var modules_aaf25250 = {"inputWrapper":"dea25485","bordered":"_80b6b376","error":"_1a32867a","slot":"dbbd207e"};
|
|
1823
1849
|
|
|
1824
|
-
const _excluded$
|
|
1825
|
-
const TextField = /*#__PURE__*/
|
|
1850
|
+
const _excluded$d = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "type", "maxWidth", "hidden", "aria-describedby", "startSlot", "endSlot"];
|
|
1851
|
+
const TextField = /*#__PURE__*/React__namespace.forwardRef(function TextField(_ref, ref) {
|
|
1826
1852
|
let {
|
|
1827
1853
|
variant = 'default',
|
|
1828
1854
|
id,
|
|
@@ -1839,9 +1865,9 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
|
|
|
1839
1865
|
startSlot,
|
|
1840
1866
|
endSlot
|
|
1841
1867
|
} = _ref,
|
|
1842
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1868
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
1843
1869
|
|
|
1844
|
-
const internalRef =
|
|
1870
|
+
const internalRef = React__namespace.useRef(null);
|
|
1845
1871
|
const combinedRef = useCallbackRef.useMergeRefs([ref, internalRef]);
|
|
1846
1872
|
|
|
1847
1873
|
function handleClick(event) {
|
|
@@ -1851,7 +1877,7 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
|
|
|
1851
1877
|
(_internalRef$current = internalRef.current) == null ? void 0 : _internalRef$current.focus();
|
|
1852
1878
|
}
|
|
1853
1879
|
|
|
1854
|
-
return /*#__PURE__*/
|
|
1880
|
+
return /*#__PURE__*/React__namespace.createElement(BaseField, {
|
|
1855
1881
|
variant: variant,
|
|
1856
1882
|
id: id,
|
|
1857
1883
|
label: label,
|
|
@@ -1863,20 +1889,20 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
|
|
|
1863
1889
|
maxWidth: maxWidth,
|
|
1864
1890
|
hidden: hidden,
|
|
1865
1891
|
"aria-describedby": ariaDescribedBy
|
|
1866
|
-
}, extraProps => /*#__PURE__*/
|
|
1892
|
+
}, extraProps => /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
1867
1893
|
display: "flex",
|
|
1868
1894
|
alignItems: "center",
|
|
1869
1895
|
className: [modules_aaf25250.inputWrapper, tone === 'error' ? modules_aaf25250.error : null, variant === 'bordered' ? modules_aaf25250.bordered : null],
|
|
1870
1896
|
onClick: handleClick
|
|
1871
|
-
}, startSlot ? /*#__PURE__*/
|
|
1897
|
+
}, startSlot ? /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
1872
1898
|
className: modules_aaf25250.slot,
|
|
1873
1899
|
display: "flex",
|
|
1874
1900
|
marginRight: variant === 'bordered' ? 'xsmall' : '-xsmall',
|
|
1875
1901
|
marginLeft: variant === 'bordered' ? '-xsmall' : 'xsmall'
|
|
1876
|
-
}, startSlot) : null, /*#__PURE__*/
|
|
1902
|
+
}, startSlot) : null, /*#__PURE__*/React__namespace.createElement("input", _objectSpread2(_objectSpread2(_objectSpread2({}, props), extraProps), {}, {
|
|
1877
1903
|
type: type,
|
|
1878
1904
|
ref: combinedRef
|
|
1879
|
-
})), endSlot ? /*#__PURE__*/
|
|
1905
|
+
})), endSlot ? /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
1880
1906
|
className: modules_aaf25250.slot,
|
|
1881
1907
|
display: "flex",
|
|
1882
1908
|
marginRight: variant === 'bordered' ? '-xsmall' : 'xsmall',
|
|
@@ -1884,22 +1910,22 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
|
|
|
1884
1910
|
}, endSlot) : null));
|
|
1885
1911
|
});
|
|
1886
1912
|
|
|
1887
|
-
const _excluded$
|
|
1888
|
-
const PasswordField = /*#__PURE__*/
|
|
1913
|
+
const _excluded$c = ["togglePasswordLabel"];
|
|
1914
|
+
const PasswordField = /*#__PURE__*/React__namespace.forwardRef(function PasswordField(_ref, ref) {
|
|
1889
1915
|
let {
|
|
1890
1916
|
togglePasswordLabel = 'Toggle password visibility'
|
|
1891
1917
|
} = _ref,
|
|
1892
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1918
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
1893
1919
|
|
|
1894
|
-
const [isPasswordVisible, setPasswordVisible] =
|
|
1920
|
+
const [isPasswordVisible, setPasswordVisible] = React__namespace.useState(false);
|
|
1895
1921
|
const Icon = isPasswordVisible ? PasswordVisibleIcon : PasswordHiddenIcon;
|
|
1896
|
-
return /*#__PURE__*/
|
|
1922
|
+
return /*#__PURE__*/React__namespace.createElement(TextField, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1897
1923
|
ref: ref,
|
|
1898
1924
|
// @ts-expect-error TextField does not support type="password", so we override the type check here
|
|
1899
1925
|
type: isPasswordVisible ? 'text' : 'password',
|
|
1900
|
-
endSlot: /*#__PURE__*/
|
|
1926
|
+
endSlot: /*#__PURE__*/React__namespace.createElement(IconButton, {
|
|
1901
1927
|
variant: "quaternary",
|
|
1902
|
-
icon: /*#__PURE__*/
|
|
1928
|
+
icon: /*#__PURE__*/React__namespace.createElement(Icon, {
|
|
1903
1929
|
"aria-hidden": true
|
|
1904
1930
|
}),
|
|
1905
1931
|
"aria-label": togglePasswordLabel,
|
|
@@ -1910,8 +1936,8 @@ const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref,
|
|
|
1910
1936
|
|
|
1911
1937
|
var modules_1fa9b208 = {"selectWrapper":"b930bb07","bordered":"e1f620b6","error":"_7e87474e"};
|
|
1912
1938
|
|
|
1913
|
-
const _excluded$
|
|
1914
|
-
const SelectField = /*#__PURE__*/
|
|
1939
|
+
const _excluded$b = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "children", "hidden", "aria-describedby"];
|
|
1940
|
+
const SelectField = /*#__PURE__*/React__namespace.forwardRef(function SelectField(_ref, ref) {
|
|
1915
1941
|
let {
|
|
1916
1942
|
variant = 'default',
|
|
1917
1943
|
id,
|
|
@@ -1926,9 +1952,9 @@ const SelectField = /*#__PURE__*/React.forwardRef(function SelectField(_ref, ref
|
|
|
1926
1952
|
hidden,
|
|
1927
1953
|
'aria-describedby': ariaDescribedBy
|
|
1928
1954
|
} = _ref,
|
|
1929
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1955
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
1930
1956
|
|
|
1931
|
-
return /*#__PURE__*/
|
|
1957
|
+
return /*#__PURE__*/React__namespace.createElement(BaseField, {
|
|
1932
1958
|
variant: variant,
|
|
1933
1959
|
id: id,
|
|
1934
1960
|
label: label,
|
|
@@ -1940,23 +1966,23 @@ const SelectField = /*#__PURE__*/React.forwardRef(function SelectField(_ref, ref
|
|
|
1940
1966
|
maxWidth: maxWidth,
|
|
1941
1967
|
hidden: hidden,
|
|
1942
1968
|
"aria-describedby": ariaDescribedBy
|
|
1943
|
-
}, extraProps => /*#__PURE__*/
|
|
1969
|
+
}, extraProps => /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
1944
1970
|
"data-testid": "select-wrapper",
|
|
1945
1971
|
className: [modules_1fa9b208.selectWrapper, tone === 'error' ? modules_1fa9b208.error : null, variant === 'bordered' ? modules_1fa9b208.bordered : null]
|
|
1946
|
-
}, /*#__PURE__*/
|
|
1972
|
+
}, /*#__PURE__*/React__namespace.createElement("select", _objectSpread2(_objectSpread2(_objectSpread2({}, props), extraProps), {}, {
|
|
1947
1973
|
ref: ref
|
|
1948
|
-
}), children), /*#__PURE__*/
|
|
1974
|
+
}), children), /*#__PURE__*/React__namespace.createElement(SelectChevron, {
|
|
1949
1975
|
"aria-hidden": true
|
|
1950
1976
|
})));
|
|
1951
1977
|
});
|
|
1952
1978
|
|
|
1953
1979
|
function SelectChevron(props) {
|
|
1954
|
-
return /*#__PURE__*/
|
|
1980
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _objectSpread2({
|
|
1955
1981
|
width: "16",
|
|
1956
1982
|
height: "16",
|
|
1957
1983
|
fill: "none",
|
|
1958
1984
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1959
|
-
}, props), /*#__PURE__*/
|
|
1985
|
+
}, props), /*#__PURE__*/React__namespace.createElement("path", {
|
|
1960
1986
|
d: "M11.646 5.646a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 1 1 .708-.708L8 9.293l3.646-3.647z",
|
|
1961
1987
|
fill: "currentColor"
|
|
1962
1988
|
}));
|
|
@@ -1964,8 +1990,8 @@ function SelectChevron(props) {
|
|
|
1964
1990
|
|
|
1965
1991
|
var modules_8e05f7c9 = {"container":"bae487be","disabled":"_408d32a0","checked":"_99b0ead7","toggle":"_5af09fb5","label":"a66e1846","handle":"_0dcf70ec","keyFocused":"_1f5e7fd4"};
|
|
1966
1992
|
|
|
1967
|
-
const _excluded$
|
|
1968
|
-
const SwitchField = /*#__PURE__*/
|
|
1993
|
+
const _excluded$a = ["label", "hint", "disabled", "hidden", "defaultChecked", "id", "aria-describedby", "aria-label", "aria-labelledby", "onChange"];
|
|
1994
|
+
const SwitchField = /*#__PURE__*/React__namespace.forwardRef(function SwitchField(_ref, ref) {
|
|
1969
1995
|
var _ref2, _props$checked, _props$checked2;
|
|
1970
1996
|
|
|
1971
1997
|
let {
|
|
@@ -1980,32 +2006,32 @@ const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref
|
|
|
1980
2006
|
'aria-labelledby': originalAriaLabelledby,
|
|
1981
2007
|
onChange
|
|
1982
2008
|
} = _ref,
|
|
1983
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2009
|
+
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
1984
2010
|
|
|
1985
2011
|
const id = useId(originalId);
|
|
1986
2012
|
const hintId = useId();
|
|
1987
2013
|
const ariaDescribedBy = originalAriaDescribedBy != null ? originalAriaDescribedBy : hint ? hintId : undefined;
|
|
1988
2014
|
const ariaLabel = originalAriaLabel != null ? originalAriaLabel : undefined;
|
|
1989
2015
|
const ariaLabelledBy = originalAriaLabelledby != null ? originalAriaLabelledby : undefined;
|
|
1990
|
-
const [keyFocused, setKeyFocused] =
|
|
1991
|
-
const [checkedState, setChecked] =
|
|
2016
|
+
const [keyFocused, setKeyFocused] = React__namespace.useState(false);
|
|
2017
|
+
const [checkedState, setChecked] = React__namespace.useState((_ref2 = (_props$checked = props.checked) != null ? _props$checked : defaultChecked) != null ? _ref2 : false);
|
|
1992
2018
|
const isChecked = (_props$checked2 = props.checked) != null ? _props$checked2 : checkedState;
|
|
1993
|
-
return /*#__PURE__*/
|
|
2019
|
+
return /*#__PURE__*/React__namespace.createElement(Stack, {
|
|
1994
2020
|
space: "small",
|
|
1995
2021
|
hidden: hidden
|
|
1996
|
-
}, /*#__PURE__*/
|
|
2022
|
+
}, /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
1997
2023
|
className: [modules_8e05f7c9.container, disabled ? modules_8e05f7c9.disabled : null, isChecked ? modules_8e05f7c9.checked : null, keyFocused ? modules_8e05f7c9.keyFocused : null],
|
|
1998
2024
|
as: "label",
|
|
1999
2025
|
display: "flex",
|
|
2000
2026
|
alignItems: "center"
|
|
2001
|
-
}, /*#__PURE__*/
|
|
2027
|
+
}, /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
2002
2028
|
position: "relative",
|
|
2003
2029
|
display: "inlineBlock",
|
|
2004
2030
|
overflow: "visible",
|
|
2005
2031
|
marginRight: "small",
|
|
2006
2032
|
flexShrink: 0,
|
|
2007
2033
|
className: modules_8e05f7c9.toggle
|
|
2008
|
-
}, /*#__PURE__*/
|
|
2034
|
+
}, /*#__PURE__*/React__namespace.createElement(HiddenVisually, null, /*#__PURE__*/React__namespace.createElement("input", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2009
2035
|
id: id,
|
|
2010
2036
|
type: "checkbox",
|
|
2011
2037
|
disabled: disabled,
|
|
@@ -2029,19 +2055,19 @@ const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref
|
|
|
2029
2055
|
setKeyFocused(true);
|
|
2030
2056
|
props == null ? void 0 : props.onKeyUp == null ? void 0 : props.onKeyUp(event);
|
|
2031
2057
|
}
|
|
2032
|
-
}))), /*#__PURE__*/
|
|
2058
|
+
}))), /*#__PURE__*/React__namespace.createElement("span", {
|
|
2033
2059
|
className: modules_8e05f7c9.handle
|
|
2034
|
-
})), /*#__PURE__*/
|
|
2060
|
+
})), /*#__PURE__*/React__namespace.createElement(Text, {
|
|
2035
2061
|
exceptionallySetClassName: modules_8e05f7c9.label
|
|
2036
|
-
}, label)), hint ? /*#__PURE__*/
|
|
2062
|
+
}, label)), hint ? /*#__PURE__*/React__namespace.createElement(FieldHint, {
|
|
2037
2063
|
id: hintId
|
|
2038
2064
|
}, hint) : null);
|
|
2039
2065
|
});
|
|
2040
2066
|
|
|
2041
2067
|
var modules_2728c236 = {"textAreaContainer":"_55ccf266","innerContainer":"_89bb7098","bordered":"_02a47358","error":"_704ff540","autoExpand":"_145ca8f0"};
|
|
2042
2068
|
|
|
2043
|
-
const _excluded$
|
|
2044
|
-
const TextArea = /*#__PURE__*/
|
|
2069
|
+
const _excluded$9 = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "hidden", "aria-describedby", "rows", "autoExpand"];
|
|
2070
|
+
const TextArea = /*#__PURE__*/React__namespace.forwardRef(function TextArea(_ref, ref) {
|
|
2045
2071
|
let {
|
|
2046
2072
|
variant = 'default',
|
|
2047
2073
|
id,
|
|
@@ -2057,12 +2083,12 @@ const TextArea = /*#__PURE__*/React.forwardRef(function TextArea(_ref, ref) {
|
|
|
2057
2083
|
rows,
|
|
2058
2084
|
autoExpand = false
|
|
2059
2085
|
} = _ref,
|
|
2060
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2086
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
2061
2087
|
|
|
2062
|
-
const containerRef =
|
|
2063
|
-
const internalRef =
|
|
2088
|
+
const containerRef = React__namespace.useRef(null);
|
|
2089
|
+
const internalRef = React__namespace.useRef(null);
|
|
2064
2090
|
const combinedRef = useCallbackRef.useMergeRefs([ref, internalRef]);
|
|
2065
|
-
|
|
2091
|
+
React__namespace.useEffect(function setupAutoExpand() {
|
|
2066
2092
|
const containerElement = containerRef.current;
|
|
2067
2093
|
|
|
2068
2094
|
function handleAutoExpand(value) {
|
|
@@ -2086,7 +2112,7 @@ const TextArea = /*#__PURE__*/React.forwardRef(function TextArea(_ref, ref) {
|
|
|
2086
2112
|
textAreaElement.addEventListener('input', handleInput);
|
|
2087
2113
|
return () => textAreaElement.removeEventListener('input', handleInput);
|
|
2088
2114
|
}, [autoExpand]);
|
|
2089
|
-
return /*#__PURE__*/
|
|
2115
|
+
return /*#__PURE__*/React__namespace.createElement(BaseField, {
|
|
2090
2116
|
variant: variant,
|
|
2091
2117
|
id: id,
|
|
2092
2118
|
label: label,
|
|
@@ -2099,12 +2125,12 @@ const TextArea = /*#__PURE__*/React.forwardRef(function TextArea(_ref, ref) {
|
|
|
2099
2125
|
"aria-describedby": ariaDescribedBy,
|
|
2100
2126
|
className: [modules_2728c236.textAreaContainer, tone === 'error' ? modules_2728c236.error : null, variant === 'bordered' ? modules_2728c236.bordered : null],
|
|
2101
2127
|
maxWidth: maxWidth
|
|
2102
|
-
}, extraProps => /*#__PURE__*/
|
|
2128
|
+
}, extraProps => /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
2103
2129
|
width: "full",
|
|
2104
2130
|
display: "flex",
|
|
2105
2131
|
className: modules_2728c236.innerContainer,
|
|
2106
2132
|
ref: containerRef
|
|
2107
|
-
}, /*#__PURE__*/
|
|
2133
|
+
}, /*#__PURE__*/React__namespace.createElement("textarea", _objectSpread2(_objectSpread2(_objectSpread2({}, props), extraProps), {}, {
|
|
2108
2134
|
ref: combinedRef,
|
|
2109
2135
|
rows: rows,
|
|
2110
2136
|
className: autoExpand ? modules_2728c236.autoExpand : undefined
|
|
@@ -2140,7 +2166,7 @@ function emailToIndex(email, maxIndex) {
|
|
|
2140
2166
|
|
|
2141
2167
|
var modules_08f3eeac = {"avatar":"_38a1be89","size-xxs":"d32e92ae","size-xs":"_0667d719","size-s":"cf529fcf","size-m":"_6e268eab","size-l":"d64c62cf","size-xl":"_44fb77de","size-xxl":"_01f85e0e","size-xxxl":"_41a5fe19","tablet-size-xxs":"_6ab1577d","tablet-size-xs":"b52a4963","tablet-size-s":"_714a8419","tablet-size-m":"_81cd4d51","tablet-size-l":"bf0a4edb","tablet-size-xl":"e4f0dabd","tablet-size-xxl":"_67ea065d","tablet-size-xxxl":"_2af7f76f","desktop-size-xxs":"_759081dc","desktop-size-xs":"_8290d1c1","desktop-size-s":"_48ea172d","desktop-size-m":"_758f6641","desktop-size-l":"f9ada088","desktop-size-xl":"d3bb7470","desktop-size-xxl":"_9a312ee3","desktop-size-xxxl":"a1d30c23"};
|
|
2142
2168
|
|
|
2143
|
-
const _excluded$
|
|
2169
|
+
const _excluded$8 = ["user", "avatarUrl", "size", "className", "colorList", "exceptionallySetClassName"];
|
|
2144
2170
|
const AVATAR_COLORS = ['#fcc652', '#e9952c', '#e16b2d', '#d84b40', '#e8435a', '#e5198a', '#ad3889', '#86389c', '#a8a8a8', '#98be2f', '#5d9d50', '#5f9f85', '#5bbcb6', '#32a3bf', '#2bafeb', '#2d88c3', '#3863cc', '#5e5e5e'];
|
|
2145
2171
|
|
|
2146
2172
|
function Avatar(_ref) {
|
|
@@ -2152,7 +2178,7 @@ function Avatar(_ref) {
|
|
|
2152
2178
|
colorList = AVATAR_COLORS,
|
|
2153
2179
|
exceptionallySetClassName
|
|
2154
2180
|
} = _ref,
|
|
2155
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2181
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
2156
2182
|
|
|
2157
2183
|
const userInitials = getInitials(user.name) || getInitials(user.email);
|
|
2158
2184
|
const avatarSize = size ? size : 'l';
|
|
@@ -2164,7 +2190,7 @@ function Avatar(_ref) {
|
|
|
2164
2190
|
backgroundColor: colorList[emailToIndex(user.email, colorList.length)]
|
|
2165
2191
|
};
|
|
2166
2192
|
const sizeClassName = getClassNames(modules_08f3eeac, 'size', avatarSize);
|
|
2167
|
-
return /*#__PURE__*/
|
|
2193
|
+
return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2({
|
|
2168
2194
|
className: [className, modules_08f3eeac.avatar, sizeClassName, exceptionallySetClassName],
|
|
2169
2195
|
style: style
|
|
2170
2196
|
}, props), userInitials);
|
|
@@ -2174,16 +2200,16 @@ Avatar.displayName = 'Avatar';
|
|
|
2174
2200
|
|
|
2175
2201
|
var modules_33c7c985 = {"badge":"c6ba5977","badge-info":"cf731337","badge-positive":"_7cfc5738","badge-promote":"_63691069","badge-attention":"_28ffb572","badge-warning":"_89e77f92"};
|
|
2176
2202
|
|
|
2177
|
-
const _excluded$
|
|
2203
|
+
const _excluded$7 = ["tone", "label"];
|
|
2178
2204
|
|
|
2179
2205
|
function Badge(_ref) {
|
|
2180
2206
|
let {
|
|
2181
2207
|
tone,
|
|
2182
2208
|
label
|
|
2183
2209
|
} = _ref,
|
|
2184
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2210
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
2185
2211
|
|
|
2186
|
-
return /*#__PURE__*/
|
|
2212
|
+
return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2187
2213
|
as: "span" // It enables putting the badge inside a button (https://stackoverflow.com/a/12982334)
|
|
2188
2214
|
,
|
|
2189
2215
|
display: "inline",
|
|
@@ -2193,12 +2219,12 @@ function Badge(_ref) {
|
|
|
2193
2219
|
|
|
2194
2220
|
var modules_8f59d13b = {"overlay":"_8aa86dd3","fadein":"_20c07ee6","fitContent":"_713bc08f","container":"_45139719","full":"ec8619a2","large":"_86a1d5a4","medium":"_11d61de3","small":"aee19643","xlarge":"fe449c81","expand":"_61ffb38f","buttonContainer":"_49ffdac0","headerContent":"ee92ccb3"};
|
|
2195
2221
|
|
|
2196
|
-
const _excluded$
|
|
2222
|
+
const _excluded$6 = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "exceptionallySetOverlayClassName", "autoFocus", "hideOnEscape", "hideOnInteractOutside", "children", "portalElement", "onKeyDown", "className"],
|
|
2197
2223
|
_excluded2$2 = ["children", "button", "withDivider", "exceptionallySetClassName"],
|
|
2198
|
-
_excluded3 = ["exceptionallySetClassName", "children"],
|
|
2199
|
-
_excluded4 = ["exceptionallySetClassName", "withDivider"],
|
|
2200
|
-
_excluded5 = ["children"];
|
|
2201
|
-
const ModalContext = /*#__PURE__*/
|
|
2224
|
+
_excluded3$1 = ["exceptionallySetClassName", "children"],
|
|
2225
|
+
_excluded4$1 = ["exceptionallySetClassName", "withDivider"],
|
|
2226
|
+
_excluded5$1 = ["children"];
|
|
2227
|
+
const ModalContext = /*#__PURE__*/React__namespace.createContext({
|
|
2202
2228
|
onDismiss: undefined,
|
|
2203
2229
|
height: 'fitContent'
|
|
2204
2230
|
});
|
|
@@ -2234,9 +2260,9 @@ function Modal(_ref) {
|
|
|
2234
2260
|
// @ts-expect-error we want to make sure to not pass it to the Dialog component
|
|
2235
2261
|
className
|
|
2236
2262
|
} = _ref,
|
|
2237
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2263
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
2238
2264
|
|
|
2239
|
-
const setOpen =
|
|
2265
|
+
const setOpen = React__namespace.useCallback(visible => {
|
|
2240
2266
|
if (!visible) {
|
|
2241
2267
|
onDismiss == null ? void 0 : onDismiss();
|
|
2242
2268
|
}
|
|
@@ -2245,14 +2271,14 @@ function Modal(_ref) {
|
|
|
2245
2271
|
open: isOpen,
|
|
2246
2272
|
setOpen
|
|
2247
2273
|
});
|
|
2248
|
-
const contextValue =
|
|
2274
|
+
const contextValue = React__namespace.useMemo(() => ({
|
|
2249
2275
|
onDismiss,
|
|
2250
2276
|
height
|
|
2251
2277
|
}), [onDismiss, height]);
|
|
2252
|
-
const portalRef =
|
|
2253
|
-
const dialogRef =
|
|
2254
|
-
const backdropRef =
|
|
2255
|
-
const handleBackdropClick =
|
|
2278
|
+
const portalRef = React__namespace.useRef(null);
|
|
2279
|
+
const dialogRef = React__namespace.useRef(null);
|
|
2280
|
+
const backdropRef = React__namespace.useRef(null);
|
|
2281
|
+
const handleBackdropClick = React__namespace.useCallback(event => {
|
|
2256
2282
|
var _dialogRef$current, _backdropRef$current;
|
|
2257
2283
|
|
|
2258
2284
|
if ( // The focus lock element takes up the same space as the backdrop and is where the event bubbles up from,
|
|
@@ -2263,14 +2289,14 @@ function Modal(_ref) {
|
|
|
2263
2289
|
onDismiss == null ? void 0 : onDismiss();
|
|
2264
2290
|
}
|
|
2265
2291
|
}, [onDismiss]);
|
|
2266
|
-
|
|
2292
|
+
React__namespace.useLayoutEffect(function disableAccessibilityTreeOutside() {
|
|
2267
2293
|
if (!isOpen || !portalRef.current) {
|
|
2268
2294
|
return;
|
|
2269
2295
|
}
|
|
2270
2296
|
|
|
2271
2297
|
return ariaHidden.hideOthers(portalRef.current);
|
|
2272
2298
|
}, [isOpen]);
|
|
2273
|
-
const handleKeyDown =
|
|
2299
|
+
const handleKeyDown = React__namespace.useCallback(function handleKeyDown(event) {
|
|
2274
2300
|
if (hideOnEscape && onDismiss != null && event.key === 'Escape' && !event.defaultPrevented) {
|
|
2275
2301
|
event.stopPropagation();
|
|
2276
2302
|
onDismiss();
|
|
@@ -2283,13 +2309,13 @@ function Modal(_ref) {
|
|
|
2283
2309
|
return null;
|
|
2284
2310
|
}
|
|
2285
2311
|
|
|
2286
|
-
return /*#__PURE__*/
|
|
2312
|
+
return /*#__PURE__*/React__namespace.createElement(react.Portal, {
|
|
2287
2313
|
portalRef: portalRef,
|
|
2288
2314
|
portalElement: portalElement
|
|
2289
|
-
}, /*#__PURE__*/
|
|
2315
|
+
}, /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
2290
2316
|
"data-testid": "modal-overlay",
|
|
2291
2317
|
"data-overlay": true,
|
|
2292
|
-
className:
|
|
2318
|
+
className: classNames__default["default"](modules_8f59d13b.overlay, modules_8f59d13b[height], modules_8f59d13b[width], exceptionallySetOverlayClassName),
|
|
2293
2319
|
|
|
2294
2320
|
/**
|
|
2295
2321
|
* We're using `onPointerDown` instead of `onClick` to prevent the modal from
|
|
@@ -2297,13 +2323,13 @@ function Modal(_ref) {
|
|
|
2297
2323
|
*/
|
|
2298
2324
|
onPointerDown: hideOnInteractOutside ? handleBackdropClick : undefined,
|
|
2299
2325
|
ref: backdropRef
|
|
2300
|
-
}, /*#__PURE__*/
|
|
2326
|
+
}, /*#__PURE__*/React__namespace.createElement(FocusLock__default["default"], {
|
|
2301
2327
|
autoFocus: autoFocus,
|
|
2302
2328
|
whiteList: isNotInternalFrame,
|
|
2303
2329
|
returnFocus: true
|
|
2304
|
-
}, /*#__PURE__*/
|
|
2330
|
+
}, /*#__PURE__*/React__namespace.createElement(react.Dialog, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2305
2331
|
ref: dialogRef,
|
|
2306
|
-
render: /*#__PURE__*/
|
|
2332
|
+
render: /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
2307
2333
|
borderRadius: "full",
|
|
2308
2334
|
background: "default",
|
|
2309
2335
|
display: "flex",
|
|
@@ -2312,7 +2338,7 @@ function Modal(_ref) {
|
|
|
2312
2338
|
height: height === 'expand' ? 'full' : undefined,
|
|
2313
2339
|
flexGrow: height === 'expand' ? 1 : 0
|
|
2314
2340
|
}),
|
|
2315
|
-
className:
|
|
2341
|
+
className: classNames__default["default"](exceptionallySetClassName, modules_8f59d13b.container),
|
|
2316
2342
|
store: store,
|
|
2317
2343
|
preventBodyScroll: true,
|
|
2318
2344
|
// Disable focus lock as we set up our own using ReactFocusLock
|
|
@@ -2326,7 +2352,7 @@ function Modal(_ref) {
|
|
|
2326
2352
|
hideOnInteractOutside: false,
|
|
2327
2353
|
hideOnEscape: false,
|
|
2328
2354
|
onKeyDown: handleKeyDown
|
|
2329
|
-
}), /*#__PURE__*/
|
|
2355
|
+
}), /*#__PURE__*/React__namespace.createElement(ModalContext.Provider, {
|
|
2330
2356
|
value: contextValue
|
|
2331
2357
|
}, children)))));
|
|
2332
2358
|
}
|
|
@@ -2340,20 +2366,20 @@ function Modal(_ref) {
|
|
|
2340
2366
|
function ModalCloseButton(props) {
|
|
2341
2367
|
const {
|
|
2342
2368
|
onDismiss
|
|
2343
|
-
} =
|
|
2344
|
-
const [includeInTabOrder, setIncludeInTabOrder] =
|
|
2345
|
-
const [isMounted, setIsMounted] =
|
|
2346
|
-
|
|
2369
|
+
} = React__namespace.useContext(ModalContext);
|
|
2370
|
+
const [includeInTabOrder, setIncludeInTabOrder] = React__namespace.useState(false);
|
|
2371
|
+
const [isMounted, setIsMounted] = React__namespace.useState(false);
|
|
2372
|
+
React__namespace.useEffect(function skipAutoFocus() {
|
|
2347
2373
|
if (isMounted) {
|
|
2348
2374
|
setIncludeInTabOrder(true);
|
|
2349
2375
|
} else {
|
|
2350
2376
|
setIsMounted(true);
|
|
2351
2377
|
}
|
|
2352
2378
|
}, [isMounted]);
|
|
2353
|
-
return /*#__PURE__*/
|
|
2379
|
+
return /*#__PURE__*/React__namespace.createElement(IconButton, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2354
2380
|
variant: "quaternary",
|
|
2355
2381
|
onClick: onDismiss,
|
|
2356
|
-
icon: /*#__PURE__*/
|
|
2382
|
+
icon: /*#__PURE__*/React__namespace.createElement(CloseIcon, null),
|
|
2357
2383
|
tabIndex: includeInTabOrder ? 0 : -1
|
|
2358
2384
|
}));
|
|
2359
2385
|
}
|
|
@@ -2374,27 +2400,27 @@ function ModalHeader(_ref2) {
|
|
|
2374
2400
|
} = _ref2,
|
|
2375
2401
|
props = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
2376
2402
|
|
|
2377
|
-
return /*#__PURE__*/
|
|
2403
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2378
2404
|
as: "header",
|
|
2379
2405
|
paddingLeft: "large",
|
|
2380
2406
|
paddingRight: button === false || button === null ? 'large' : 'small',
|
|
2381
2407
|
paddingY: "small",
|
|
2382
2408
|
className: exceptionallySetClassName
|
|
2383
|
-
}), /*#__PURE__*/
|
|
2409
|
+
}), /*#__PURE__*/React__namespace.createElement(Columns, {
|
|
2384
2410
|
space: "large",
|
|
2385
2411
|
alignY: "center"
|
|
2386
|
-
}, /*#__PURE__*/
|
|
2412
|
+
}, /*#__PURE__*/React__namespace.createElement(Column, {
|
|
2387
2413
|
width: "auto"
|
|
2388
|
-
}, children), button === false || button === null ? /*#__PURE__*/
|
|
2414
|
+
}, children), button === false || button === null ? /*#__PURE__*/React__namespace.createElement("div", {
|
|
2389
2415
|
className: modules_8f59d13b.headerContent
|
|
2390
|
-
}) : /*#__PURE__*/
|
|
2416
|
+
}) : /*#__PURE__*/React__namespace.createElement(Column, {
|
|
2391
2417
|
width: "content",
|
|
2392
2418
|
exceptionallySetClassName: modules_8f59d13b.buttonContainer,
|
|
2393
2419
|
"data-testid": "button-container"
|
|
2394
|
-
}, typeof button === 'boolean' ? /*#__PURE__*/
|
|
2420
|
+
}, typeof button === 'boolean' ? /*#__PURE__*/React__namespace.createElement(ModalCloseButton, {
|
|
2395
2421
|
"aria-label": "Close modal",
|
|
2396
2422
|
autoFocus: false
|
|
2397
|
-
}) : button))), withDivider ? /*#__PURE__*/
|
|
2423
|
+
}) : button))), withDivider ? /*#__PURE__*/React__namespace.createElement(Divider, null) : null);
|
|
2398
2424
|
}
|
|
2399
2425
|
/**
|
|
2400
2426
|
* Renders the body of a modal.
|
|
@@ -2414,17 +2440,17 @@ function ModalBody(_ref3) {
|
|
|
2414
2440
|
exceptionallySetClassName,
|
|
2415
2441
|
children
|
|
2416
2442
|
} = _ref3,
|
|
2417
|
-
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
2443
|
+
props = _objectWithoutProperties(_ref3, _excluded3$1);
|
|
2418
2444
|
|
|
2419
2445
|
const {
|
|
2420
2446
|
height
|
|
2421
|
-
} =
|
|
2422
|
-
return /*#__PURE__*/
|
|
2447
|
+
} = React__namespace.useContext(ModalContext);
|
|
2448
|
+
return /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2423
2449
|
className: exceptionallySetClassName,
|
|
2424
2450
|
flexGrow: height === 'expand' ? 1 : 0,
|
|
2425
2451
|
height: height === 'expand' ? 'full' : undefined,
|
|
2426
2452
|
overflow: "auto"
|
|
2427
|
-
}), /*#__PURE__*/
|
|
2453
|
+
}), /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
2428
2454
|
padding: "large",
|
|
2429
2455
|
paddingBottom: "xxlarge"
|
|
2430
2456
|
}, children));
|
|
@@ -2442,9 +2468,9 @@ function ModalFooter(_ref4) {
|
|
|
2442
2468
|
exceptionallySetClassName,
|
|
2443
2469
|
withDivider = false
|
|
2444
2470
|
} = _ref4,
|
|
2445
|
-
props = _objectWithoutProperties(_ref4, _excluded4);
|
|
2471
|
+
props = _objectWithoutProperties(_ref4, _excluded4$1);
|
|
2446
2472
|
|
|
2447
|
-
return /*#__PURE__*/
|
|
2473
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, withDivider ? /*#__PURE__*/React__namespace.createElement(Divider, null) : null, /*#__PURE__*/React__namespace.createElement(Box$1, _objectSpread2(_objectSpread2({
|
|
2448
2474
|
as: "footer"
|
|
2449
2475
|
}, props), {}, {
|
|
2450
2476
|
className: exceptionallySetClassName,
|
|
@@ -2460,9 +2486,9 @@ function ModalActions(_ref5) {
|
|
|
2460
2486
|
let {
|
|
2461
2487
|
children
|
|
2462
2488
|
} = _ref5,
|
|
2463
|
-
props = _objectWithoutProperties(_ref5, _excluded5);
|
|
2489
|
+
props = _objectWithoutProperties(_ref5, _excluded5$1);
|
|
2464
2490
|
|
|
2465
|
-
return /*#__PURE__*/
|
|
2491
|
+
return /*#__PURE__*/React__namespace.createElement(ModalFooter, _objectSpread2({}, props), /*#__PURE__*/React__namespace.createElement(Inline, {
|
|
2466
2492
|
align: "right",
|
|
2467
2493
|
space: "large"
|
|
2468
2494
|
}, children));
|
|
@@ -2470,9 +2496,9 @@ function ModalActions(_ref5) {
|
|
|
2470
2496
|
|
|
2471
2497
|
var modules_40c67f5b = {"tab":"e96bf360","track":"_430e252d","tab-neutral":"f631ccbe","tab-themed":"_6ba96acc","track-neutral":"ef4cd8d3","track-themed":"_344b3b10"};
|
|
2472
2498
|
|
|
2473
|
-
const _excluded$
|
|
2474
|
-
_excluded2$
|
|
2475
|
-
const TabsContext = /*#__PURE__*/
|
|
2499
|
+
const _excluded$5 = ["children", "space"],
|
|
2500
|
+
_excluded2$1 = ["children", "id", "renderMode"];
|
|
2501
|
+
const TabsContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
2476
2502
|
/**
|
|
2477
2503
|
* Used to group components that compose a set of tabs. There can only be one active tab within the same `<Tabs>` group.
|
|
2478
2504
|
*/
|
|
@@ -2490,7 +2516,7 @@ function Tabs({
|
|
|
2490
2516
|
setSelectedId: onSelectedIdChange
|
|
2491
2517
|
});
|
|
2492
2518
|
const actualSelectedId = tabStore.useState('selectedId');
|
|
2493
|
-
const memoizedTabState =
|
|
2519
|
+
const memoizedTabState = React__namespace.useMemo(() => {
|
|
2494
2520
|
var _ref;
|
|
2495
2521
|
|
|
2496
2522
|
return {
|
|
@@ -2499,7 +2525,7 @@ function Tabs({
|
|
|
2499
2525
|
selectedId: (_ref = selectedId != null ? selectedId : actualSelectedId) != null ? _ref : null
|
|
2500
2526
|
};
|
|
2501
2527
|
}, [variant, tabStore, selectedId, actualSelectedId]);
|
|
2502
|
-
return /*#__PURE__*/
|
|
2528
|
+
return /*#__PURE__*/React__namespace.createElement(TabsContext.Provider, {
|
|
2503
2529
|
value: memoizedTabState
|
|
2504
2530
|
}, children);
|
|
2505
2531
|
}
|
|
@@ -2508,21 +2534,21 @@ function Tabs({
|
|
|
2508
2534
|
*/
|
|
2509
2535
|
|
|
2510
2536
|
|
|
2511
|
-
const Tab = /*#__PURE__*/
|
|
2537
|
+
const Tab = /*#__PURE__*/React__namespace.forwardRef(function Tab({
|
|
2512
2538
|
children,
|
|
2513
2539
|
id,
|
|
2514
2540
|
exceptionallySetClassName,
|
|
2515
2541
|
render,
|
|
2516
2542
|
onClick
|
|
2517
2543
|
}, ref) {
|
|
2518
|
-
const tabContextValue =
|
|
2544
|
+
const tabContextValue = React__namespace.useContext(TabsContext);
|
|
2519
2545
|
if (!tabContextValue) return null;
|
|
2520
2546
|
const {
|
|
2521
2547
|
variant,
|
|
2522
2548
|
tabStore
|
|
2523
2549
|
} = tabContextValue;
|
|
2524
|
-
const className =
|
|
2525
|
-
return /*#__PURE__*/
|
|
2550
|
+
const className = classNames__default["default"](exceptionallySetClassName, modules_40c67f5b.tab, modules_40c67f5b["tab-" + variant]);
|
|
2551
|
+
return /*#__PURE__*/React__namespace.createElement(react.Tab, {
|
|
2526
2552
|
id: id,
|
|
2527
2553
|
ref: ref,
|
|
2528
2554
|
store: tabStore,
|
|
@@ -2540,9 +2566,9 @@ function TabList(_ref2) {
|
|
|
2540
2566
|
children,
|
|
2541
2567
|
space
|
|
2542
2568
|
} = _ref2,
|
|
2543
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
2569
|
+
props = _objectWithoutProperties(_ref2, _excluded$5);
|
|
2544
2570
|
|
|
2545
|
-
const tabContextValue =
|
|
2571
|
+
const tabContextValue = React__namespace.useContext(TabsContext);
|
|
2546
2572
|
|
|
2547
2573
|
if (!tabContextValue) {
|
|
2548
2574
|
return null;
|
|
@@ -2556,15 +2582,15 @@ function TabList(_ref2) {
|
|
|
2556
2582
|
/*#__PURE__*/
|
|
2557
2583
|
// The extra <div> prevents <Inline>'s negative margins from collapsing when used in a flex container
|
|
2558
2584
|
// which will render the track with the wrong height
|
|
2559
|
-
|
|
2585
|
+
React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement(react.TabList, _objectSpread2({
|
|
2560
2586
|
store: tabStore,
|
|
2561
|
-
render: /*#__PURE__*/
|
|
2587
|
+
render: /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
2562
2588
|
position: "relative",
|
|
2563
2589
|
width: "maxContent"
|
|
2564
2590
|
})
|
|
2565
|
-
}, props), /*#__PURE__*/
|
|
2591
|
+
}, props), /*#__PURE__*/React__namespace.createElement(Box$1, {
|
|
2566
2592
|
className: [modules_40c67f5b.track, modules_40c67f5b["track-" + variant]]
|
|
2567
|
-
}), /*#__PURE__*/
|
|
2593
|
+
}), /*#__PURE__*/React__namespace.createElement(Inline, {
|
|
2568
2594
|
space: space
|
|
2569
2595
|
}, children)))
|
|
2570
2596
|
);
|
|
@@ -2575,19 +2601,19 @@ function TabList(_ref2) {
|
|
|
2575
2601
|
*/
|
|
2576
2602
|
|
|
2577
2603
|
|
|
2578
|
-
const TabPanel = /*#__PURE__*/
|
|
2604
|
+
const TabPanel = /*#__PURE__*/React__namespace.forwardRef(function TabPanel(_ref3, ref) {
|
|
2579
2605
|
let {
|
|
2580
2606
|
children,
|
|
2581
2607
|
id,
|
|
2582
2608
|
renderMode = 'always'
|
|
2583
2609
|
} = _ref3,
|
|
2584
|
-
props = _objectWithoutProperties(_ref3, _excluded2$
|
|
2610
|
+
props = _objectWithoutProperties(_ref3, _excluded2$1);
|
|
2585
2611
|
|
|
2586
|
-
const tabContextValue =
|
|
2587
|
-
const [tabRendered, setTabRendered] =
|
|
2612
|
+
const tabContextValue = React__namespace.useContext(TabsContext);
|
|
2613
|
+
const [tabRendered, setTabRendered] = React__namespace.useState(false);
|
|
2588
2614
|
const selectedId = tabContextValue == null ? void 0 : tabContextValue.tabStore.useState('selectedId');
|
|
2589
2615
|
const tabIsActive = selectedId === id;
|
|
2590
|
-
|
|
2616
|
+
React__namespace.useEffect(function trackTabRenderedState() {
|
|
2591
2617
|
if (!tabRendered && tabIsActive) {
|
|
2592
2618
|
setTabRendered(true);
|
|
2593
2619
|
}
|
|
@@ -2601,7 +2627,7 @@ const TabPanel = /*#__PURE__*/React.forwardRef(function TabPanel(_ref3, ref) {
|
|
|
2601
2627
|
tabStore
|
|
2602
2628
|
} = tabContextValue;
|
|
2603
2629
|
const shouldRender = renderMode === 'always' || renderMode === 'active' && tabIsActive || renderMode === 'lazy' && (tabIsActive || tabRendered);
|
|
2604
|
-
return shouldRender ? /*#__PURE__*/
|
|
2630
|
+
return shouldRender ? /*#__PURE__*/React__namespace.createElement(react.TabPanel, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2605
2631
|
tabId: id,
|
|
2606
2632
|
store: tabStore,
|
|
2607
2633
|
ref: ref
|
|
@@ -2615,20 +2641,20 @@ const TabPanel = /*#__PURE__*/React.forwardRef(function TabPanel(_ref3, ref) {
|
|
|
2615
2641
|
function TabAwareSlot({
|
|
2616
2642
|
children
|
|
2617
2643
|
}) {
|
|
2618
|
-
const tabContextValue =
|
|
2644
|
+
const tabContextValue = React__namespace.useContext(TabsContext);
|
|
2619
2645
|
const selectedId = tabContextValue == null ? void 0 : tabContextValue.tabStore.useState('selectedId');
|
|
2620
2646
|
return tabContextValue ? children({
|
|
2621
2647
|
selectedId
|
|
2622
2648
|
}) : null;
|
|
2623
2649
|
}
|
|
2624
2650
|
|
|
2625
|
-
const _excluded$
|
|
2626
|
-
_excluded2
|
|
2627
|
-
_excluded3
|
|
2628
|
-
_excluded4
|
|
2629
|
-
_excluded5
|
|
2651
|
+
const _excluded$4 = ["children", "onItemSelect"],
|
|
2652
|
+
_excluded2 = ["exceptionallySetClassName"],
|
|
2653
|
+
_excluded3 = ["render"],
|
|
2654
|
+
_excluded4 = ["exceptionallySetClassName", "modal"],
|
|
2655
|
+
_excluded5 = ["value", "children", "onSelect", "hideOnSelect", "onClick", "exceptionallySetClassName"],
|
|
2630
2656
|
_excluded6 = ["label", "children", "exceptionallySetClassName"];
|
|
2631
|
-
const MenuContext = /*#__PURE__*/
|
|
2657
|
+
const MenuContext = /*#__PURE__*/React__namespace.createContext({
|
|
2632
2658
|
menuStore: null,
|
|
2633
2659
|
handleItemSelect: () => undefined,
|
|
2634
2660
|
getAnchorRect: null,
|
|
@@ -2644,20 +2670,20 @@ function Menu(_ref) {
|
|
|
2644
2670
|
children,
|
|
2645
2671
|
onItemSelect
|
|
2646
2672
|
} = _ref,
|
|
2647
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2673
|
+
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
2648
2674
|
|
|
2649
|
-
const [anchorRect, setAnchorRect] =
|
|
2650
|
-
const getAnchorRect =
|
|
2675
|
+
const [anchorRect, setAnchorRect] = React__namespace.useState(null);
|
|
2676
|
+
const getAnchorRect = React__namespace.useMemo(() => anchorRect ? () => anchorRect : null, [anchorRect]);
|
|
2651
2677
|
const menuStore = react.useMenuStore(_objectSpread2({
|
|
2652
2678
|
focusLoop: true
|
|
2653
2679
|
}, props));
|
|
2654
|
-
const value =
|
|
2680
|
+
const value = React__namespace.useMemo(() => ({
|
|
2655
2681
|
menuStore,
|
|
2656
2682
|
handleItemSelect: onItemSelect,
|
|
2657
2683
|
getAnchorRect,
|
|
2658
2684
|
setAnchorRect
|
|
2659
2685
|
}), [menuStore, onItemSelect, getAnchorRect, setAnchorRect]);
|
|
2660
|
-
return /*#__PURE__*/
|
|
2686
|
+
return /*#__PURE__*/React__namespace.createElement(MenuContext.Provider, {
|
|
2661
2687
|
value: value
|
|
2662
2688
|
}, children);
|
|
2663
2689
|
}
|
|
@@ -2666,42 +2692,42 @@ function Menu(_ref) {
|
|
|
2666
2692
|
*/
|
|
2667
2693
|
|
|
2668
2694
|
|
|
2669
|
-
const MenuButton = /*#__PURE__*/
|
|
2695
|
+
const MenuButton = /*#__PURE__*/React__namespace.forwardRef(function MenuButton(_ref2, ref) {
|
|
2670
2696
|
let {
|
|
2671
2697
|
exceptionallySetClassName
|
|
2672
2698
|
} = _ref2,
|
|
2673
|
-
props = _objectWithoutProperties(_ref2, _excluded2
|
|
2699
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
2674
2700
|
|
|
2675
2701
|
const {
|
|
2676
2702
|
menuStore
|
|
2677
|
-
} =
|
|
2703
|
+
} = React__namespace.useContext(MenuContext);
|
|
2678
2704
|
|
|
2679
2705
|
if (!menuStore) {
|
|
2680
2706
|
throw new Error('MenuButton must be wrapped in <Menu/>');
|
|
2681
2707
|
}
|
|
2682
2708
|
|
|
2683
|
-
return /*#__PURE__*/
|
|
2709
|
+
return /*#__PURE__*/React__namespace.createElement(react.MenuButton, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2684
2710
|
store: menuStore,
|
|
2685
2711
|
ref: ref,
|
|
2686
|
-
className:
|
|
2712
|
+
className: classNames__default["default"]('reactist_menubutton', exceptionallySetClassName)
|
|
2687
2713
|
}));
|
|
2688
2714
|
});
|
|
2689
|
-
const ContextMenuTrigger = /*#__PURE__*/
|
|
2715
|
+
const ContextMenuTrigger = /*#__PURE__*/React__namespace.forwardRef(function ContextMenuTrigger(_ref3, ref) {
|
|
2690
2716
|
let {
|
|
2691
2717
|
render
|
|
2692
2718
|
} = _ref3,
|
|
2693
|
-
props = _objectWithoutProperties(_ref3, _excluded3
|
|
2719
|
+
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
2694
2720
|
|
|
2695
2721
|
const {
|
|
2696
2722
|
setAnchorRect,
|
|
2697
2723
|
menuStore
|
|
2698
|
-
} =
|
|
2724
|
+
} = React__namespace.useContext(MenuContext);
|
|
2699
2725
|
|
|
2700
2726
|
if (!menuStore) {
|
|
2701
2727
|
throw new Error('ContextMenuTrigger must be wrapped in <Menu/>');
|
|
2702
2728
|
}
|
|
2703
2729
|
|
|
2704
|
-
const handleContextMenu =
|
|
2730
|
+
const handleContextMenu = React__namespace.useCallback(function handleContextMenu(event) {
|
|
2705
2731
|
event.preventDefault();
|
|
2706
2732
|
setAnchorRect({
|
|
2707
2733
|
x: event.clientX,
|
|
@@ -2710,10 +2736,10 @@ const ContextMenuTrigger = /*#__PURE__*/React.forwardRef(function ContextMenuTri
|
|
|
2710
2736
|
menuStore.show();
|
|
2711
2737
|
}, [setAnchorRect, menuStore]);
|
|
2712
2738
|
const isOpen = menuStore.useState('open');
|
|
2713
|
-
|
|
2739
|
+
React__namespace.useEffect(() => {
|
|
2714
2740
|
if (!isOpen) setAnchorRect(null);
|
|
2715
2741
|
}, [isOpen, setAnchorRect]);
|
|
2716
|
-
return /*#__PURE__*/
|
|
2742
|
+
return /*#__PURE__*/React__namespace.createElement(react.Role.div, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2717
2743
|
onContextMenu: handleContextMenu,
|
|
2718
2744
|
ref: ref,
|
|
2719
2745
|
render: render
|
|
@@ -2723,31 +2749,31 @@ const ContextMenuTrigger = /*#__PURE__*/React.forwardRef(function ContextMenuTri
|
|
|
2723
2749
|
* The dropdown menu itself, containing a list of menu items.
|
|
2724
2750
|
*/
|
|
2725
2751
|
|
|
2726
|
-
const MenuList = /*#__PURE__*/
|
|
2752
|
+
const MenuList = /*#__PURE__*/React__namespace.forwardRef(function MenuList(_ref4, ref) {
|
|
2727
2753
|
let {
|
|
2728
2754
|
exceptionallySetClassName,
|
|
2729
2755
|
modal = true
|
|
2730
2756
|
} = _ref4,
|
|
2731
|
-
props = _objectWithoutProperties(_ref4, _excluded4
|
|
2757
|
+
props = _objectWithoutProperties(_ref4, _excluded4);
|
|
2732
2758
|
|
|
2733
2759
|
const {
|
|
2734
2760
|
menuStore,
|
|
2735
2761
|
getAnchorRect
|
|
2736
|
-
} =
|
|
2762
|
+
} = React__namespace.useContext(MenuContext);
|
|
2737
2763
|
|
|
2738
2764
|
if (!menuStore) {
|
|
2739
2765
|
throw new Error('MenuList must be wrapped in <Menu/>');
|
|
2740
2766
|
}
|
|
2741
2767
|
|
|
2742
2768
|
const isOpen = menuStore.useState('open');
|
|
2743
|
-
return isOpen ? /*#__PURE__*/
|
|
2769
|
+
return isOpen ? /*#__PURE__*/React__namespace.createElement(react.Portal, {
|
|
2744
2770
|
preserveTabOrder: true
|
|
2745
|
-
}, /*#__PURE__*/
|
|
2771
|
+
}, /*#__PURE__*/React__namespace.createElement(react.Menu, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2746
2772
|
store: menuStore,
|
|
2747
2773
|
gutter: 8,
|
|
2748
2774
|
shift: 4,
|
|
2749
2775
|
ref: ref,
|
|
2750
|
-
className:
|
|
2776
|
+
className: classNames__default["default"]('reactist_menulist', exceptionallySetClassName),
|
|
2751
2777
|
getAnchorRect: getAnchorRect != null ? getAnchorRect : undefined,
|
|
2752
2778
|
modal: modal
|
|
2753
2779
|
}))) : null;
|
|
@@ -2757,7 +2783,7 @@ const MenuList = /*#__PURE__*/React.forwardRef(function MenuList(_ref4, ref) {
|
|
|
2757
2783
|
* callback.
|
|
2758
2784
|
*/
|
|
2759
2785
|
|
|
2760
|
-
const MenuItem = /*#__PURE__*/
|
|
2786
|
+
const MenuItem = /*#__PURE__*/React__namespace.forwardRef(function MenuItem(_ref5, ref) {
|
|
2761
2787
|
let {
|
|
2762
2788
|
value,
|
|
2763
2789
|
children,
|
|
@@ -2766,12 +2792,12 @@ const MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(_ref5, ref) {
|
|
|
2766
2792
|
onClick,
|
|
2767
2793
|
exceptionallySetClassName
|
|
2768
2794
|
} = _ref5,
|
|
2769
|
-
props = _objectWithoutProperties(_ref5, _excluded5
|
|
2795
|
+
props = _objectWithoutProperties(_ref5, _excluded5);
|
|
2770
2796
|
|
|
2771
2797
|
const {
|
|
2772
2798
|
handleItemSelect,
|
|
2773
2799
|
menuStore
|
|
2774
|
-
} =
|
|
2800
|
+
} = React__namespace.useContext(MenuContext);
|
|
2775
2801
|
|
|
2776
2802
|
if (!menuStore) {
|
|
2777
2803
|
throw new Error('MenuItem must be wrapped in <Menu/>');
|
|
@@ -2780,14 +2806,14 @@ const MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(_ref5, ref) {
|
|
|
2780
2806
|
const {
|
|
2781
2807
|
hide
|
|
2782
2808
|
} = menuStore;
|
|
2783
|
-
const handleClick =
|
|
2809
|
+
const handleClick = React__namespace.useCallback(function handleClick(event) {
|
|
2784
2810
|
onClick == null ? void 0 : onClick(event);
|
|
2785
2811
|
const onSelectResult = onSelect && !event.defaultPrevented ? onSelect() : undefined;
|
|
2786
2812
|
const shouldClose = onSelectResult !== false && hideOnSelect;
|
|
2787
2813
|
handleItemSelect == null ? void 0 : handleItemSelect(value);
|
|
2788
2814
|
if (shouldClose) hide();
|
|
2789
2815
|
}, [onSelect, onClick, handleItemSelect, hideOnSelect, hide, value]);
|
|
2790
|
-
return /*#__PURE__*/
|
|
2816
|
+
return /*#__PURE__*/React__namespace.createElement(react.MenuItem, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2791
2817
|
store: menuStore,
|
|
2792
2818
|
ref: ref,
|
|
2793
2819
|
onClick: handleClick,
|
|
@@ -2817,14 +2843,14 @@ const MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(_ref5, ref) {
|
|
|
2817
2843
|
* opening a sub-menu with the menu items list below it.
|
|
2818
2844
|
*/
|
|
2819
2845
|
|
|
2820
|
-
const SubMenu = /*#__PURE__*/
|
|
2846
|
+
const SubMenu = /*#__PURE__*/React__namespace.forwardRef(function SubMenu({
|
|
2821
2847
|
children,
|
|
2822
2848
|
onItemSelect
|
|
2823
2849
|
}, ref) {
|
|
2824
2850
|
const {
|
|
2825
2851
|
handleItemSelect: parentMenuItemSelect,
|
|
2826
2852
|
menuStore
|
|
2827
|
-
} =
|
|
2853
|
+
} = React__namespace.useContext(MenuContext);
|
|
2828
2854
|
|
|
2829
2855
|
if (!menuStore) {
|
|
2830
2856
|
throw new Error('SubMenu must be wrapped in <Menu/>');
|
|
@@ -2833,16 +2859,16 @@ const SubMenu = /*#__PURE__*/React.forwardRef(function SubMenu({
|
|
|
2833
2859
|
const {
|
|
2834
2860
|
hide: parentMenuHide
|
|
2835
2861
|
} = menuStore;
|
|
2836
|
-
const handleSubItemSelect =
|
|
2862
|
+
const handleSubItemSelect = React__namespace.useCallback(function handleSubItemSelect(value) {
|
|
2837
2863
|
onItemSelect == null ? void 0 : onItemSelect(value);
|
|
2838
2864
|
parentMenuItemSelect == null ? void 0 : parentMenuItemSelect(value);
|
|
2839
2865
|
parentMenuHide();
|
|
2840
2866
|
}, [parentMenuHide, parentMenuItemSelect, onItemSelect]);
|
|
2841
|
-
const [button, list] =
|
|
2867
|
+
const [button, list] = React__namespace.Children.toArray(children);
|
|
2842
2868
|
const buttonElement = button;
|
|
2843
|
-
return /*#__PURE__*/
|
|
2869
|
+
return /*#__PURE__*/React__namespace.createElement(Menu, {
|
|
2844
2870
|
onItemSelect: handleSubItemSelect
|
|
2845
|
-
}, /*#__PURE__*/
|
|
2871
|
+
}, /*#__PURE__*/React__namespace.createElement(react.MenuItem, {
|
|
2846
2872
|
store: menuStore,
|
|
2847
2873
|
ref: ref,
|
|
2848
2874
|
hideOnClick: false,
|
|
@@ -2856,7 +2882,7 @@ const SubMenu = /*#__PURE__*/React.forwardRef(function SubMenu({
|
|
|
2856
2882
|
* before and/or after the group if you so wish.
|
|
2857
2883
|
*/
|
|
2858
2884
|
|
|
2859
|
-
const MenuGroup = /*#__PURE__*/
|
|
2885
|
+
const MenuGroup = /*#__PURE__*/React__namespace.forwardRef(function MenuGroup(_ref6, ref) {
|
|
2860
2886
|
let {
|
|
2861
2887
|
label,
|
|
2862
2888
|
children,
|
|
@@ -2866,28 +2892,28 @@ const MenuGroup = /*#__PURE__*/React.forwardRef(function MenuGroup(_ref6, ref) {
|
|
|
2866
2892
|
|
|
2867
2893
|
const {
|
|
2868
2894
|
menuStore
|
|
2869
|
-
} =
|
|
2895
|
+
} = React__namespace.useContext(MenuContext);
|
|
2870
2896
|
|
|
2871
2897
|
if (!menuStore) {
|
|
2872
2898
|
throw new Error('MenuGroup must be wrapped in <Menu/>');
|
|
2873
2899
|
}
|
|
2874
2900
|
|
|
2875
|
-
return /*#__PURE__*/
|
|
2901
|
+
return /*#__PURE__*/React__namespace.createElement(react.MenuGroup, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2876
2902
|
ref: ref,
|
|
2877
2903
|
store: menuStore,
|
|
2878
2904
|
className: exceptionallySetClassName
|
|
2879
|
-
}), label ? /*#__PURE__*/
|
|
2905
|
+
}), label ? /*#__PURE__*/React__namespace.createElement("div", {
|
|
2880
2906
|
role: "presentation",
|
|
2881
2907
|
className: "reactist_menugroup__label"
|
|
2882
2908
|
}, label) : null, children);
|
|
2883
2909
|
});
|
|
2884
2910
|
|
|
2885
|
-
const _excluded$
|
|
2911
|
+
const _excluded$3 = ["type", "variant", "size", "loading", "disabled", "tooltip", "onClick", "children"];
|
|
2886
2912
|
/**
|
|
2887
2913
|
* @deprecated
|
|
2888
2914
|
*/
|
|
2889
2915
|
|
|
2890
|
-
const Button
|
|
2916
|
+
const Button = /*#__PURE__*/React__namespace.forwardRef(function Button(_ref, ref) {
|
|
2891
2917
|
let {
|
|
2892
2918
|
type = 'button',
|
|
2893
2919
|
variant,
|
|
@@ -2898,38 +2924,38 @@ const Button$1 = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
|
|
|
2898
2924
|
onClick,
|
|
2899
2925
|
children
|
|
2900
2926
|
} = _ref,
|
|
2901
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2927
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
2902
2928
|
|
|
2903
|
-
const className =
|
|
2929
|
+
const className = classNames__default["default"]('reactist_button', variant ? "reactist_button--" + variant : null, size !== 'default' ? "reactist_button--" + size : null, {
|
|
2904
2930
|
'reactist_button--loading': loading
|
|
2905
2931
|
}, props.className);
|
|
2906
|
-
const button = /*#__PURE__*/
|
|
2932
|
+
const button = /*#__PURE__*/React__namespace.createElement("button", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2907
2933
|
ref: ref,
|
|
2908
2934
|
type: type,
|
|
2909
2935
|
className: className,
|
|
2910
2936
|
"aria-disabled": disabled || loading,
|
|
2911
2937
|
onClick: disabled || loading ? undefined : onClick
|
|
2912
2938
|
}), children);
|
|
2913
|
-
return tooltip ? /*#__PURE__*/
|
|
2939
|
+
return tooltip ? /*#__PURE__*/React__namespace.createElement(Tooltip, {
|
|
2914
2940
|
content: tooltip
|
|
2915
2941
|
}, button) : button;
|
|
2916
2942
|
});
|
|
2917
|
-
Button
|
|
2918
|
-
Button
|
|
2943
|
+
Button.displayName = 'Button';
|
|
2944
|
+
Button.defaultProps = {
|
|
2919
2945
|
size: 'default',
|
|
2920
2946
|
loading: false,
|
|
2921
2947
|
disabled: false
|
|
2922
2948
|
};
|
|
2923
2949
|
|
|
2924
|
-
const _excluded$
|
|
2950
|
+
const _excluded$2 = ["children", "onClick", "tooltip", "className"];
|
|
2925
2951
|
|
|
2926
|
-
class Box
|
|
2952
|
+
class Box extends React__namespace.Component {
|
|
2927
2953
|
constructor(props, context) {
|
|
2928
2954
|
super(props, context);
|
|
2929
2955
|
this._timeout = void 0;
|
|
2930
2956
|
|
|
2931
2957
|
this._handleClickOutside = event => {
|
|
2932
|
-
const dropdownDOMNode =
|
|
2958
|
+
const dropdownDOMNode = ReactDOM__default["default"].findDOMNode(this);
|
|
2933
2959
|
if (dropdownDOMNode && !dropdownDOMNode.contains(event.target)) this._toggleShowBody();else if (!this.props.allowBodyInteractions) {
|
|
2934
2960
|
// won't close when body interactions are allowed
|
|
2935
2961
|
this._timeout = setTimeout(() => {
|
|
@@ -2961,13 +2987,13 @@ class Box$1 extends React.Component {
|
|
|
2961
2987
|
const scrollingParent = document.getElementById(this.props.scrolling_parent ? this.props.scrolling_parent : '');
|
|
2962
2988
|
|
|
2963
2989
|
if (scrollingParent) {
|
|
2964
|
-
const dropdown =
|
|
2990
|
+
const dropdown = ReactDOM__default["default"].findDOMNode(this);
|
|
2965
2991
|
|
|
2966
2992
|
if (!dropdown) {
|
|
2967
2993
|
return;
|
|
2968
2994
|
}
|
|
2969
2995
|
|
|
2970
|
-
const dropdownVerticalPosition =
|
|
2996
|
+
const dropdownVerticalPosition = ReactDOM__default["default"].findDOMNode(this).offsetTop;
|
|
2971
2997
|
const dropdownTrigger = dropdown.querySelector('.trigger');
|
|
2972
2998
|
|
|
2973
2999
|
if (!dropdownTrigger) {
|
|
@@ -3010,7 +3036,7 @@ class Box$1 extends React.Component {
|
|
|
3010
3036
|
|
|
3011
3037
|
const _trigger = (_this$props$children = this.props.children) == null ? void 0 : _this$props$children[0];
|
|
3012
3038
|
|
|
3013
|
-
return _trigger ? /*#__PURE__*/
|
|
3039
|
+
return _trigger ? /*#__PURE__*/React__namespace.cloneElement(_trigger, {
|
|
3014
3040
|
onClick: this._toggleShowBody
|
|
3015
3041
|
}) : undefined;
|
|
3016
3042
|
} // https://facebook.github.io/react/docs/refs-and-the-dom.html#exposing-dom-refs-to-parent-components
|
|
@@ -3033,15 +3059,15 @@ class Box$1 extends React.Component {
|
|
|
3033
3059
|
right,
|
|
3034
3060
|
setPosition: this._setPosition
|
|
3035
3061
|
};
|
|
3036
|
-
const className =
|
|
3062
|
+
const className = classNames__default["default"]({
|
|
3037
3063
|
body_wrapper: true,
|
|
3038
3064
|
with_arrow: true,
|
|
3039
3065
|
top: top,
|
|
3040
3066
|
bottom: !top
|
|
3041
3067
|
});
|
|
3042
3068
|
const body = children == null ? void 0 : children[1];
|
|
3043
|
-
const contentMarkup = typeof body === 'function' ? body(props) : body ? /*#__PURE__*/
|
|
3044
|
-
return /*#__PURE__*/
|
|
3069
|
+
const contentMarkup = typeof body === 'function' ? body(props) : body ? /*#__PURE__*/React__namespace.cloneElement(body, props) : undefined;
|
|
3070
|
+
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
3045
3071
|
className: className,
|
|
3046
3072
|
style: {
|
|
3047
3073
|
position: 'relative'
|
|
@@ -3050,11 +3076,11 @@ class Box$1 extends React.Component {
|
|
|
3050
3076
|
}
|
|
3051
3077
|
|
|
3052
3078
|
render() {
|
|
3053
|
-
const className =
|
|
3079
|
+
const className = classNames__default["default"]('reactist_dropdown', this.props.className);
|
|
3054
3080
|
const {
|
|
3055
3081
|
top
|
|
3056
3082
|
} = this.state;
|
|
3057
|
-
return /*#__PURE__*/
|
|
3083
|
+
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
3058
3084
|
style: {
|
|
3059
3085
|
display: 'inline-block'
|
|
3060
3086
|
},
|
|
@@ -3065,16 +3091,16 @@ class Box$1 extends React.Component {
|
|
|
3065
3091
|
|
|
3066
3092
|
}
|
|
3067
3093
|
|
|
3068
|
-
Box
|
|
3069
|
-
Box
|
|
3070
|
-
const Trigger = /*#__PURE__*/
|
|
3094
|
+
Box.displayName = void 0;
|
|
3095
|
+
Box.displayName = 'Dropdown.Box';
|
|
3096
|
+
const Trigger = /*#__PURE__*/React__namespace.forwardRef(function Trigger(_ref, ref) {
|
|
3071
3097
|
let {
|
|
3072
3098
|
children,
|
|
3073
3099
|
onClick,
|
|
3074
3100
|
tooltip,
|
|
3075
3101
|
className
|
|
3076
3102
|
} = _ref,
|
|
3077
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3103
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
3078
3104
|
|
|
3079
3105
|
function handleClick(event) {
|
|
3080
3106
|
event.preventDefault();
|
|
@@ -3082,8 +3108,8 @@ const Trigger = /*#__PURE__*/React.forwardRef(function Trigger(_ref, ref) {
|
|
|
3082
3108
|
if (onClick) onClick(event);
|
|
3083
3109
|
}
|
|
3084
3110
|
|
|
3085
|
-
return /*#__PURE__*/
|
|
3086
|
-
className:
|
|
3111
|
+
return /*#__PURE__*/React__namespace.createElement(Button, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
3112
|
+
className: classNames__default["default"]('trigger', className),
|
|
3087
3113
|
onClick: handleClick,
|
|
3088
3114
|
tooltip: tooltip,
|
|
3089
3115
|
ref: ref
|
|
@@ -3113,7 +3139,7 @@ function Body({
|
|
|
3113
3139
|
style.left = 0;
|
|
3114
3140
|
}
|
|
3115
3141
|
|
|
3116
|
-
return /*#__PURE__*/
|
|
3142
|
+
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
3117
3143
|
ref: setPosition,
|
|
3118
3144
|
style: style,
|
|
3119
3145
|
className: "body",
|
|
@@ -3124,7 +3150,7 @@ function Body({
|
|
|
3124
3150
|
|
|
3125
3151
|
Body.displayName = 'Dropdown.Body';
|
|
3126
3152
|
const Dropdown = {
|
|
3127
|
-
Box
|
|
3153
|
+
Box,
|
|
3128
3154
|
Trigger,
|
|
3129
3155
|
Body
|
|
3130
3156
|
};
|
|
@@ -3144,26 +3170,26 @@ function ColorPicker({
|
|
|
3144
3170
|
onChange,
|
|
3145
3171
|
colorList = COLORS
|
|
3146
3172
|
}) {
|
|
3147
|
-
return /*#__PURE__*/
|
|
3173
|
+
return /*#__PURE__*/React__namespace.createElement(Dropdown.Box, {
|
|
3148
3174
|
right: true,
|
|
3149
3175
|
className: "reactist_color_picker"
|
|
3150
|
-
}, /*#__PURE__*/
|
|
3176
|
+
}, /*#__PURE__*/React__namespace.createElement(Dropdown.Trigger, null, (() => {
|
|
3151
3177
|
const backgroundColor = _getColor(colorList, color);
|
|
3152
3178
|
|
|
3153
|
-
return /*#__PURE__*/
|
|
3154
|
-
className:
|
|
3179
|
+
return /*#__PURE__*/React__namespace.createElement("span", {
|
|
3180
|
+
className: classNames__default["default"]('color_trigger', {
|
|
3155
3181
|
small
|
|
3156
3182
|
}),
|
|
3157
3183
|
style: {
|
|
3158
3184
|
backgroundColor: _isNamedColor(backgroundColor) ? backgroundColor.color : backgroundColor
|
|
3159
3185
|
}
|
|
3160
|
-
}, /*#__PURE__*/
|
|
3186
|
+
}, /*#__PURE__*/React__namespace.createElement("span", {
|
|
3161
3187
|
className: "color_trigger--inner_ring"
|
|
3162
3188
|
}));
|
|
3163
|
-
})()), /*#__PURE__*/
|
|
3189
|
+
})()), /*#__PURE__*/React__namespace.createElement(Dropdown.Body, null, /*#__PURE__*/React__namespace.createElement("div", {
|
|
3164
3190
|
className: "color_options"
|
|
3165
3191
|
}, colorList.reduce((items, currentColor, currentIndex) => {
|
|
3166
|
-
items.push( /*#__PURE__*/
|
|
3192
|
+
items.push( /*#__PURE__*/React__namespace.createElement(ColorItem, {
|
|
3167
3193
|
isActive: color >= colorList.length ? currentIndex === 0 : currentIndex === color,
|
|
3168
3194
|
key: currentIndex,
|
|
3169
3195
|
color: _isNamedColor(currentColor) ? currentColor.color : currentColor,
|
|
@@ -3184,24 +3210,24 @@ function ColorItem({
|
|
|
3184
3210
|
onClick,
|
|
3185
3211
|
tooltip
|
|
3186
3212
|
}) {
|
|
3187
|
-
const item = /*#__PURE__*/
|
|
3213
|
+
const item = /*#__PURE__*/React__namespace.createElement("span", {
|
|
3188
3214
|
"data-testid": "reactist-color-item",
|
|
3189
3215
|
className: 'reactist color_item' + (isActive ? ' active' : ''),
|
|
3190
3216
|
style: {
|
|
3191
3217
|
backgroundColor: color
|
|
3192
3218
|
},
|
|
3193
3219
|
onClick: () => onClick == null ? void 0 : onClick(colorIndex)
|
|
3194
|
-
}, /*#__PURE__*/
|
|
3220
|
+
}, /*#__PURE__*/React__namespace.createElement("span", {
|
|
3195
3221
|
className: "color_item--inner_ring"
|
|
3196
3222
|
}));
|
|
3197
|
-
return tooltip ? /*#__PURE__*/
|
|
3223
|
+
return tooltip ? /*#__PURE__*/React__namespace.createElement(Tooltip, {
|
|
3198
3224
|
content: tooltip
|
|
3199
3225
|
}, item) : item;
|
|
3200
3226
|
}
|
|
3201
3227
|
|
|
3202
3228
|
ColorItem.displayName = 'ColorItem';
|
|
3203
3229
|
|
|
3204
|
-
const _excluded$
|
|
3230
|
+
const _excluded$1 = ["children", "className", "translateKey", "isMac"];
|
|
3205
3231
|
// Support for setting up how to translate modifiers globally.
|
|
3206
3232
|
//
|
|
3207
3233
|
|
|
@@ -3283,16 +3309,16 @@ function KeyboardShortcut(_ref) {
|
|
|
3283
3309
|
translateKey = globalTranslateKey,
|
|
3284
3310
|
isMac = (_navigator$platform$t = (_navigator$platform = navigator.platform) == null ? void 0 : _navigator$platform.toUpperCase().includes('MAC')) != null ? _navigator$platform$t : false
|
|
3285
3311
|
} = _ref,
|
|
3286
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3312
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
3287
3313
|
|
|
3288
3314
|
const shortcuts = typeof children === 'string' ? [children] : children;
|
|
3289
|
-
return /*#__PURE__*/
|
|
3290
|
-
className:
|
|
3315
|
+
return /*#__PURE__*/React__namespace.createElement("span", _objectSpread2({
|
|
3316
|
+
className: classNames__default["default"]('reactist_keyboard_shortcut', className, {
|
|
3291
3317
|
'reactist_keyboard_shortcut--macos': isMac
|
|
3292
3318
|
})
|
|
3293
|
-
}, props), shortcuts.map((shortcut, i) => /*#__PURE__*/
|
|
3319
|
+
}, props), shortcuts.map((shortcut, i) => /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, {
|
|
3294
3320
|
key: i
|
|
3295
|
-
}, i === 0 ? null : ', ', /*#__PURE__*/
|
|
3321
|
+
}, i === 0 ? null : ', ', /*#__PURE__*/React__namespace.createElement("kbd", null, parseKeys(shortcut, isMac, translateKey).map((key, j) => /*#__PURE__*/React__namespace.createElement("kbd", {
|
|
3296
3322
|
key: j
|
|
3297
3323
|
}, key))))));
|
|
3298
3324
|
}
|
|
@@ -3438,7 +3464,7 @@ function KeyCapturer(props) {
|
|
|
3438
3464
|
children,
|
|
3439
3465
|
eventName = 'onKeyDown'
|
|
3440
3466
|
} = props;
|
|
3441
|
-
const composingRef =
|
|
3467
|
+
const composingRef = React__namespace.useRef(false);
|
|
3442
3468
|
const composingEventHandlers = props.onEnter ? {
|
|
3443
3469
|
onCompositionStart: () => {
|
|
3444
3470
|
composingRef.current = true;
|
|
@@ -3474,7 +3500,7 @@ function KeyCapturer(props) {
|
|
|
3474
3500
|
}
|
|
3475
3501
|
}
|
|
3476
3502
|
|
|
3477
|
-
return /*#__PURE__*/
|
|
3503
|
+
return /*#__PURE__*/React__namespace.cloneElement(children, _objectSpread2({
|
|
3478
3504
|
[eventName]: handleKeyEvent
|
|
3479
3505
|
}, composingEventHandlers));
|
|
3480
3506
|
}
|
|
@@ -3484,16 +3510,16 @@ function ProgressBar({
|
|
|
3484
3510
|
className,
|
|
3485
3511
|
'aria-valuetext': ariaValuetext
|
|
3486
3512
|
}) {
|
|
3487
|
-
const finalClassName =
|
|
3513
|
+
const finalClassName = classNames__default["default"]('reactist_progress_bar', className);
|
|
3488
3514
|
const width = fillPercentage < 0 ? 0 : fillPercentage > 100 ? 100 : fillPercentage;
|
|
3489
|
-
return /*#__PURE__*/
|
|
3515
|
+
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
3490
3516
|
className: finalClassName
|
|
3491
|
-
}, /*#__PURE__*/
|
|
3517
|
+
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
3492
3518
|
className: "inner",
|
|
3493
3519
|
style: {
|
|
3494
3520
|
width: width + "%"
|
|
3495
3521
|
}
|
|
3496
|
-
}), /*#__PURE__*/
|
|
3522
|
+
}), /*#__PURE__*/React__namespace.createElement(HiddenVisually, null, /*#__PURE__*/React__namespace.createElement("progress", {
|
|
3497
3523
|
value: width,
|
|
3498
3524
|
max: 100,
|
|
3499
3525
|
"aria-valuetext": ariaValuetext != null ? ariaValuetext : undefined
|
|
@@ -3502,7 +3528,7 @@ function ProgressBar({
|
|
|
3502
3528
|
|
|
3503
3529
|
ProgressBar.displayName = 'ProgressBar';
|
|
3504
3530
|
|
|
3505
|
-
|
|
3531
|
+
dayjs__default["default"].extend(LocalizedFormat__default["default"]);
|
|
3506
3532
|
const TimeUtils = {
|
|
3507
3533
|
SHORT_FORMAT_CURRENT_YEAR: 'L',
|
|
3508
3534
|
SHORT_FORMAT_PAST_YEAR: 'LL',
|
|
@@ -3518,8 +3544,8 @@ const TimeUtils = {
|
|
|
3518
3544
|
minutesSuffix = 'm',
|
|
3519
3545
|
momentsAgo = 'moments ago'
|
|
3520
3546
|
} = config;
|
|
3521
|
-
const now =
|
|
3522
|
-
const date =
|
|
3547
|
+
const now = dayjs__default["default"]();
|
|
3548
|
+
const date = dayjs__default["default"](timestamp * 1000);
|
|
3523
3549
|
date.locale(locale);
|
|
3524
3550
|
const diffMinutes = now.diff(date, 'minute');
|
|
3525
3551
|
const diffHours = now.diff(date, 'hour');
|
|
@@ -3548,10 +3574,10 @@ const TimeUtils = {
|
|
|
3548
3574
|
shortFormatCurrentYear = this.SHORT_FORMAT_CURRENT_YEAR,
|
|
3549
3575
|
shortFormatPastYear = this.SHORT_FORMAT_PAST_YEAR
|
|
3550
3576
|
} = config;
|
|
3551
|
-
const date =
|
|
3577
|
+
const date = dayjs__default["default"](timestamp * 1000);
|
|
3552
3578
|
date.locale(locale);
|
|
3553
3579
|
|
|
3554
|
-
if (date.isSame(
|
|
3580
|
+
if (date.isSame(dayjs__default["default"](), 'year')) {
|
|
3555
3581
|
return date.format(shortFormatCurrentYear);
|
|
3556
3582
|
} else {
|
|
3557
3583
|
return date.format(shortFormatPastYear);
|
|
@@ -3563,7 +3589,7 @@ const TimeUtils = {
|
|
|
3563
3589
|
locale = 'en',
|
|
3564
3590
|
longFormat = this.LONG_FORMAT
|
|
3565
3591
|
} = config;
|
|
3566
|
-
const date =
|
|
3592
|
+
const date = dayjs__default["default"](timestamp * 1000);
|
|
3567
3593
|
date.locale(locale);
|
|
3568
3594
|
return date.format(longFormat);
|
|
3569
3595
|
}
|
|
@@ -3572,7 +3598,7 @@ const TimeUtils = {
|
|
|
3572
3598
|
|
|
3573
3599
|
const DELAY = 60000;
|
|
3574
3600
|
|
|
3575
|
-
class Time extends
|
|
3601
|
+
class Time extends React__namespace.Component {
|
|
3576
3602
|
constructor(props) {
|
|
3577
3603
|
super(props);
|
|
3578
3604
|
this.refreshInterval = void 0;
|
|
@@ -3661,13 +3687,13 @@ class Time extends React.Component {
|
|
|
3661
3687
|
|
|
3662
3688
|
const timeComponent = this._renderTime(this.props.config);
|
|
3663
3689
|
|
|
3664
|
-
return /*#__PURE__*/
|
|
3690
|
+
return /*#__PURE__*/React__namespace.createElement("time", {
|
|
3665
3691
|
className: className,
|
|
3666
3692
|
onMouseEnter: event => this._setHovered(true, event),
|
|
3667
3693
|
onMouseLeave: event => this._setHovered(false, event)
|
|
3668
|
-
}, this.props.tooltipOnHover ? /*#__PURE__*/
|
|
3694
|
+
}, this.props.tooltipOnHover ? /*#__PURE__*/React__namespace.createElement(Tooltip, {
|
|
3669
3695
|
content: this.props.tooltip || this.props.time && TimeUtils.formatTimeLong(this.props.time, this.props.config)
|
|
3670
|
-
}, /*#__PURE__*/
|
|
3696
|
+
}, /*#__PURE__*/React__namespace.createElement("span", null, timeComponent)) : timeComponent);
|
|
3671
3697
|
}
|
|
3672
3698
|
|
|
3673
3699
|
}
|
|
@@ -3693,16 +3719,16 @@ Time.defaultProps = {
|
|
|
3693
3719
|
* @deprecated
|
|
3694
3720
|
*/
|
|
3695
3721
|
|
|
3696
|
-
const Input = /*#__PURE__*/
|
|
3697
|
-
const className =
|
|
3698
|
-
return /*#__PURE__*/
|
|
3722
|
+
const Input = /*#__PURE__*/React__namespace.forwardRef(function Input(props, ref) {
|
|
3723
|
+
const className = classNames__default["default"]('reactist_input', props.className);
|
|
3724
|
+
return /*#__PURE__*/React__namespace.createElement("input", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
3699
3725
|
className: className,
|
|
3700
3726
|
ref: ref
|
|
3701
3727
|
}));
|
|
3702
3728
|
});
|
|
3703
3729
|
Input.displayName = 'Input';
|
|
3704
3730
|
|
|
3705
|
-
const _excluded
|
|
3731
|
+
const _excluded = ["value", "options", "onChange", "disabled", "className", "defaultValue"];
|
|
3706
3732
|
|
|
3707
3733
|
function Select(_ref) {
|
|
3708
3734
|
let {
|
|
@@ -3713,18 +3739,18 @@ function Select(_ref) {
|
|
|
3713
3739
|
className = '',
|
|
3714
3740
|
defaultValue
|
|
3715
3741
|
} = _ref,
|
|
3716
|
-
otherProps = _objectWithoutProperties(_ref, _excluded
|
|
3742
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
3717
3743
|
|
|
3718
|
-
const selectClassName =
|
|
3744
|
+
const selectClassName = classNames__default["default"]('reactist_select', {
|
|
3719
3745
|
disabled
|
|
3720
3746
|
}, className);
|
|
3721
|
-
return /*#__PURE__*/
|
|
3747
|
+
return /*#__PURE__*/React__namespace.createElement("select", _objectSpread2({
|
|
3722
3748
|
className: selectClassName,
|
|
3723
3749
|
value: value,
|
|
3724
3750
|
onChange: event => onChange ? onChange(event.target.value) : undefined,
|
|
3725
3751
|
disabled: disabled,
|
|
3726
3752
|
defaultValue: defaultValue
|
|
3727
|
-
}, otherProps), options == null ? void 0 : options.map(option => /*#__PURE__*/
|
|
3753
|
+
}, otherProps), options == null ? void 0 : options.map(option => /*#__PURE__*/React__namespace.createElement("option", {
|
|
3728
3754
|
key: option.key || option.value,
|
|
3729
3755
|
value: option.value,
|
|
3730
3756
|
disabled: option.disabled
|
|
@@ -3741,15 +3767,15 @@ exports.Alert = Alert;
|
|
|
3741
3767
|
exports.Avatar = Avatar;
|
|
3742
3768
|
exports.Badge = Badge;
|
|
3743
3769
|
exports.Banner = Banner;
|
|
3744
|
-
exports.Box = Box;
|
|
3745
|
-
exports.Button = Button;
|
|
3770
|
+
exports.Box = Box$1;
|
|
3771
|
+
exports.Button = Button$1;
|
|
3746
3772
|
exports.COLORS = COLORS;
|
|
3747
3773
|
exports.CheckboxField = CheckboxField;
|
|
3748
3774
|
exports.ColorPicker = ColorPicker;
|
|
3749
3775
|
exports.Column = Column;
|
|
3750
3776
|
exports.Columns = Columns;
|
|
3751
3777
|
exports.ContextMenuTrigger = ContextMenuTrigger;
|
|
3752
|
-
exports.DeprecatedButton = Button
|
|
3778
|
+
exports.DeprecatedButton = Button;
|
|
3753
3779
|
exports.DeprecatedDropdown = Dropdown;
|
|
3754
3780
|
exports.DeprecatedInput = Input;
|
|
3755
3781
|
exports.DeprecatedSelect = Select;
|