@doist/reactist 25.0.0-beta.2 → 25.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"close-icon.js","sources":["../../src/icons/close-icon.tsx"],"sourcesContent":["import * as React from 'react'\n\nfunction CloseIcon(props: JSX.IntrinsicElements['svg']) {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" {...props}>\n <path\n fill=\"currentColor\"\n 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\"\n />\n </svg>\n )\n}\n\nexport { CloseIcon }\n"],"names":["CloseIcon","props","React","xmlns","width","height","fill","d"],"mappings":";;;AAEA,SAASA,SAAT,CAAmBC,KAAnB;
|
|
1
|
+
{"version":3,"file":"close-icon.js","sources":["../../src/icons/close-icon.tsx"],"sourcesContent":["import * as React from 'react'\n\nfunction CloseIcon(props: JSX.IntrinsicElements['svg']) {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" {...props}>\n <path\n fill=\"currentColor\"\n 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\"\n />\n </svg>\n )\n}\n\nexport { CloseIcon }\n"],"names":["CloseIcon","props","React","createElement","_objectSpread","xmlns","width","height","fill","d"],"mappings":";;;AAEA,SAASA,SAAT,CAAmBC,KAAnB,EAAsD;AAClD,EAAA,oBACIC,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAAC,cAAA,CAAA;AAAKC,IAAAA,KAAK,EAAC,4BAAX;AAAwCC,IAAAA,KAAK,EAAC,IAA9C;AAAmDC,IAAAA,MAAM,EAAC,IAAA;AAA1D,GAAA,EAAmEN,KAAnE,CACIC,eAAAA,KACI,CAAAC,aADJ,CACI,MADJ,EACI;AAAAK,IAAAA,IAAI,EAAC,cAAL;AACAC,IAAAA,CAAC,EAAC,6RAAA;AADF,GADJ,CADJ,CADJ,CAAA;AAQH;;;;"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
function PasswordHiddenIcon(props) {
|
|
5
|
-
return /*#__PURE__*/createElement("svg", _objectSpread2({
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", _objectSpread2({
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
7
|
width: "24",
|
|
8
8
|
height: "24"
|
|
9
|
-
}, props), /*#__PURE__*/createElement("g", {
|
|
9
|
+
}, props), /*#__PURE__*/React.createElement("g", {
|
|
10
10
|
fill: "gray",
|
|
11
11
|
fillRule: "evenodd",
|
|
12
12
|
transform: "translate(2 4)"
|
|
13
|
-
}, /*#__PURE__*/createElement("path", {
|
|
13
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
14
14
|
fillRule: "nonzero",
|
|
15
15
|
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"
|
|
16
|
-
}), /*#__PURE__*/createElement("path", {
|
|
16
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
17
17
|
fillRule: "nonzero",
|
|
18
18
|
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"
|
|
19
|
-
}), /*#__PURE__*/createElement("rect", {
|
|
19
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
20
20
|
width: "21",
|
|
21
21
|
height: "1",
|
|
22
22
|
x: "-.722",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password-hidden-icon.js","sources":["../../src/icons/password-hidden-icon.tsx"],"sourcesContent":["import * as React from 'react'\n\nfunction PasswordHiddenIcon(props: JSX.IntrinsicElements['svg']) {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" {...props}>\n <g fill=\"gray\" fillRule=\"evenodd\" transform=\"translate(2 4)\">\n <path\n fillRule=\"nonzero\"\n 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\"\n />\n <path\n fillRule=\"nonzero\"\n 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\"\n />\n <rect\n width=\"21\"\n height=\"1\"\n x=\"-.722\"\n y=\"7.778\"\n rx=\".5\"\n transform=\"rotate(-45 9.778 8.278)\"\n />\n </g>\n </svg>\n )\n}\n\nexport { PasswordHiddenIcon }\n"],"names":["PasswordHiddenIcon","props","React","xmlns","width","height","fill","fillRule","transform","d","x","y","rx"],"mappings":";;;AAEA,SAASA,kBAAT,CAA4BC,KAA5B;
|
|
1
|
+
{"version":3,"file":"password-hidden-icon.js","sources":["../../src/icons/password-hidden-icon.tsx"],"sourcesContent":["import * as React from 'react'\n\nfunction PasswordHiddenIcon(props: JSX.IntrinsicElements['svg']) {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" {...props}>\n <g fill=\"gray\" fillRule=\"evenodd\" transform=\"translate(2 4)\">\n <path\n fillRule=\"nonzero\"\n 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\"\n />\n <path\n fillRule=\"nonzero\"\n 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\"\n />\n <rect\n width=\"21\"\n height=\"1\"\n x=\"-.722\"\n y=\"7.778\"\n rx=\".5\"\n transform=\"rotate(-45 9.778 8.278)\"\n />\n </g>\n </svg>\n )\n}\n\nexport { PasswordHiddenIcon }\n"],"names":["PasswordHiddenIcon","props","React","createElement","_objectSpread","xmlns","width","height","fill","fillRule","transform","d","x","y","rx"],"mappings":";;;AAEA,SAASA,kBAAT,CAA4BC,KAA5B,EAA+D;AAC3D,EAAA,oBACIC,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAAC,cAAA,CAAA;AAAKC,IAAAA,KAAK,EAAC,4BAAX;AAAwCC,IAAAA,KAAK,EAAC,IAA9C;AAAmDC,IAAAA,MAAM,EAAC,IAAA;AAA1D,GAAA,EAAmEN,KAAnE,CACIC,eAAAA,KAAG,CAAAC,aAAH,CAAG,GAAH,EAAG;AAAAK,IAAAA,IAAI,EAAC,MAAL;AAAYC,IAAAA,QAAQ,EAAC,SAArB;AAA+BC,IAAAA,SAAS,EAAC,gBAAA;AAAzC,GAAH,eACIR,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AACIM,IAAAA,QAAQ,EAAC,SADb;AAEIE,IAAAA,CAAC,EAAC,2bAAA;AAFN,GAAA,CADJ,eAKIT,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AACIM,IAAAA,QAAQ,EAAC,SADb;AAEIE,IAAAA,CAAC,EAAC,yJAAA;AAFN,GAAA,CALJ,eASIT,KACI,CAAAC,aADJ,CACI,MADJ,EACI;AAAAG,IAAAA,KAAK,EAAC,IAAN;AACAC,IAAAA,MAAM,EAAC,GADP;AAEAK,IAAAA,CAAC,EAAC,OAFF;AAGAC,IAAAA,CAAC,EAAC,OAHF;AAIAC,IAAAA,EAAE,EAAC,IAJH;AAKAJ,IAAAA,SAAS,EAAC,yBAAA;GANd,CATJ,CADJ,CADJ,CAAA;AAsBH;;;;"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
function PasswordVisibleIcon(props) {
|
|
5
|
-
return /*#__PURE__*/createElement("svg", _objectSpread2({
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", _objectSpread2({
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
7
|
width: "24",
|
|
8
8
|
height: "24"
|
|
9
|
-
}, props), /*#__PURE__*/createElement("g", {
|
|
9
|
+
}, props), /*#__PURE__*/React.createElement("g", {
|
|
10
10
|
fill: "none",
|
|
11
11
|
fillRule: "evenodd",
|
|
12
12
|
stroke: "gray"
|
|
13
|
-
}, /*#__PURE__*/createElement("path", {
|
|
13
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
14
14
|
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"
|
|
15
|
-
}), /*#__PURE__*/createElement("circle", {
|
|
15
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
16
16
|
cx: "12",
|
|
17
17
|
cy: "12",
|
|
18
18
|
r: "3.5"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password-visible-icon.js","sources":["../../src/icons/password-visible-icon.tsx"],"sourcesContent":["import * as React from 'react'\n\nfunction PasswordVisibleIcon(props: JSX.IntrinsicElements['svg']) {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" {...props}>\n <g fill=\"none\" fillRule=\"evenodd\" stroke=\"gray\">\n <path 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\" />\n <circle cx=\"12\" cy=\"12\" r=\"3.5\" />\n </g>\n </svg>\n )\n}\n\nexport { PasswordVisibleIcon }\n"],"names":["PasswordVisibleIcon","props","React","xmlns","width","height","fill","fillRule","stroke","d","cx","cy","r"],"mappings":";;;AAEA,SAASA,mBAAT,CAA6BC,KAA7B;
|
|
1
|
+
{"version":3,"file":"password-visible-icon.js","sources":["../../src/icons/password-visible-icon.tsx"],"sourcesContent":["import * as React from 'react'\n\nfunction PasswordVisibleIcon(props: JSX.IntrinsicElements['svg']) {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" {...props}>\n <g fill=\"none\" fillRule=\"evenodd\" stroke=\"gray\">\n <path 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\" />\n <circle cx=\"12\" cy=\"12\" r=\"3.5\" />\n </g>\n </svg>\n )\n}\n\nexport { PasswordVisibleIcon }\n"],"names":["PasswordVisibleIcon","props","React","createElement","_objectSpread","xmlns","width","height","fill","fillRule","stroke","d","cx","cy","r"],"mappings":";;;AAEA,SAASA,mBAAT,CAA6BC,KAA7B,EAAgE;AAC5D,EAAA,oBACIC,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAAC,cAAA,CAAA;AAAKC,IAAAA,KAAK,EAAC,4BAAX;AAAwCC,IAAAA,KAAK,EAAC,IAA9C;AAAmDC,IAAAA,MAAM,EAAC,IAAA;AAA1D,GAAA,EAAmEN,KAAnE,CACIC,eAAAA,KAAG,CAAAC,aAAH,CAAG,GAAH,EAAG;AAAAK,IAAAA,IAAI,EAAC,MAAL;AAAYC,IAAAA,QAAQ,EAAC,SAArB;AAA+BC,IAAAA,MAAM,EAAC,MAAA;AAAtC,GAAH,eACIR,KAAM,CAAAC,aAAN,CAAM,MAAN,EAAM;AAAAQ,IAAAA,CAAC,EAAC,0JAAA;AAAF,GAAN,CADJ,eAEIT,KAAA,CAAAC,aAAA,CAAA,QAAA,EAAA;AAAQS,IAAAA,EAAE,EAAC,IAAX;AAAgBC,IAAAA,EAAE,EAAC,IAAnB;AAAwBC,IAAAA,CAAC,EAAC,KAAA;GAA1B,CAFJ,CADJ,CADJ,CAAA;AAQH;;;;"}
|
package/es/index.js
CHANGED
|
@@ -5,38 +5,36 @@ export { Inline } from './inline/inline.js';
|
|
|
5
5
|
export { Stack } from './stack/stack.js';
|
|
6
6
|
export { Hidden } from './hidden/hidden.js';
|
|
7
7
|
export { HiddenVisually } from './hidden-visually/hidden-visually.js';
|
|
8
|
-
export { Tooltip } from './tooltip/tooltip.js';
|
|
9
|
-
export { Button, IconButton } from './button/button.js';
|
|
10
8
|
export { Alert } from './alert/alert.js';
|
|
11
9
|
export { Banner } from './banner/banner.js';
|
|
12
10
|
export { Loading } from './loading/loading.js';
|
|
13
11
|
export { Notice } from './notice/notice.js';
|
|
14
|
-
export { Text } from './text/text.js';
|
|
15
12
|
export { StaticToast } from './toast/static-toast.js';
|
|
16
13
|
export { Toast, ToastsProvider, useToasts } from './toast/use-toasts.js';
|
|
17
14
|
export { Heading } from './heading/heading.js';
|
|
15
|
+
export { Text } from './text/text.js';
|
|
18
16
|
export { Prose } from './prose/prose.js';
|
|
17
|
+
export { Button, IconButton } from './button/button.js';
|
|
19
18
|
export { TextLink } from './text-link/text-link.js';
|
|
20
19
|
export { CheckboxField } from './checkbox-field/checkbox-field.js';
|
|
21
|
-
export { TextField } from './text-field/text-field.js';
|
|
22
20
|
export { PasswordField } from './password-field/password-field.js';
|
|
23
21
|
export { SelectField } from './select-field/select-field.js';
|
|
24
22
|
export { SwitchField } from './switch-field/switch-field.js';
|
|
25
23
|
export { TextArea } from './text-area/text-area.js';
|
|
24
|
+
export { TextField } from './text-field/text-field.js';
|
|
26
25
|
export { Avatar } from './avatar/avatar.js';
|
|
27
26
|
export { Badge } from './badge/badge.js';
|
|
28
27
|
export { Modal, ModalActions, ModalBody, ModalCloseButton, ModalFooter, ModalHeader } from './modal/modal.js';
|
|
29
28
|
export { Tab, TabAwareSlot, TabList, TabPanel, Tabs } from './tabs/tabs.js';
|
|
29
|
+
export { Tooltip } from './tooltip/tooltip.js';
|
|
30
30
|
export { ContextMenuTrigger, Menu, MenuButton, MenuGroup, MenuItem, MenuList, SubMenu } from './menu/menu.js';
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
33
|
-
export {
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
37
|
-
export {
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export { default as DeprecatedInput } from './components/deprecated-input/index.js';
|
|
41
|
-
export { default as DeprecatedSelect } from './components/deprecated-select/index.js';
|
|
31
|
+
export { COLORS, ColorPicker } from './components/color-picker/color-picker.js';
|
|
32
|
+
export { KeyboardShortcut } from './components/keyboard-shortcut/keyboard-shortcut.js';
|
|
33
|
+
export { KeyCapturer, SUPPORTED_KEYS } from './components/key-capturer/key-capturer.js';
|
|
34
|
+
export { ProgressBar } from './components/progress-bar/progress-bar.js';
|
|
35
|
+
export { Time } from './components/time/time.js';
|
|
36
|
+
export { Button as DeprecatedButton } from './components/deprecated-button/deprecated-button.js';
|
|
37
|
+
export { Dropdown as DeprecatedDropdown } from './components/deprecated-dropdown/dropdown.js';
|
|
38
|
+
export { Input as DeprecatedInput } from './components/deprecated-input/input.js';
|
|
39
|
+
export { Select as DeprecatedSelect } from './components/deprecated-select/select.js';
|
|
42
40
|
//# sourceMappingURL=index.js.map
|
package/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/es/inline/inline.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import { polymorphicComponent } from '../utils/polymorphism.js';
|
|
4
4
|
import { mapResponsiveProp } from '../utils/responsive-props.js';
|
|
5
5
|
import { Box } from '../box/box.js';
|
|
@@ -16,7 +16,7 @@ const Inline = /*#__PURE__*/polymorphicComponent(function Inline(_ref, ref) {
|
|
|
16
16
|
} = _ref,
|
|
17
17
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
18
|
|
|
19
|
-
return /*#__PURE__*/createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
19
|
+
return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
20
20
|
as: as,
|
|
21
21
|
display: "flex",
|
|
22
22
|
flexWrap: "wrap",
|
package/es/inline/inline.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline.js","sources":["../../src/inline/inline.tsx"],"sourcesContent":["import * as React from 'react'\nimport { polymorphicComponent } from '../utils/polymorphism'\nimport { mapResponsiveProp } from '../utils/responsive-props'\nimport { Box } from '../box'\n\nimport type { ResponsiveProp } from '../utils/responsive-props'\nimport type { Space } from '../utils/common-types'\nimport type { ReusableBoxProps } from '../box'\n\ntype InlineAlign = 'left' | 'center' | 'right'\n\ninterface InlineProps extends ReusableBoxProps {\n space?: ResponsiveProp<Space>\n align?: ResponsiveProp<InlineAlign>\n alignY?: ResponsiveProp<'top' | 'center' | 'bottom'>\n}\n\nconst Inline = polymorphicComponent<'div', InlineProps>(function Inline(\n { as, space, align = 'left', alignY = 'center', children, exceptionallySetClassName, ...props },\n ref,\n) {\n return (\n <Box\n {...props}\n as={as}\n display=\"flex\"\n flexWrap=\"wrap\"\n gap={space}\n className={exceptionallySetClassName}\n ref={ref}\n alignItems={mapResponsiveProp(alignY, (alignY) =>\n alignY === 'top' ? 'flexStart' : alignY === 'bottom' ? 'flexEnd' : 'center',\n )}\n justifyContent={mapResponsiveProp(align, (align) =>\n align === 'left' ? 'flexStart' : align === 'right' ? 'flexEnd' : 'center',\n )}\n >\n {children}\n </Box>\n )\n})\n\nexport type { InlineProps, InlineAlign }\nexport { Inline }\n"],"names":["Inline","polymorphicComponent","ref","as","space","align","alignY","children","exceptionallySetClassName","props","React","Box","display","flexWrap","gap","className","alignItems","mapResponsiveProp","justifyContent"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"inline.js","sources":["../../src/inline/inline.tsx"],"sourcesContent":["import * as React from 'react'\nimport { polymorphicComponent } from '../utils/polymorphism'\nimport { mapResponsiveProp } from '../utils/responsive-props'\nimport { Box } from '../box'\n\nimport type { ResponsiveProp } from '../utils/responsive-props'\nimport type { Space } from '../utils/common-types'\nimport type { ReusableBoxProps } from '../box'\n\ntype InlineAlign = 'left' | 'center' | 'right'\n\ninterface InlineProps extends ReusableBoxProps {\n space?: ResponsiveProp<Space>\n align?: ResponsiveProp<InlineAlign>\n alignY?: ResponsiveProp<'top' | 'center' | 'bottom'>\n}\n\nconst Inline = polymorphicComponent<'div', InlineProps>(function Inline(\n { as, space, align = 'left', alignY = 'center', children, exceptionallySetClassName, ...props },\n ref,\n) {\n return (\n <Box\n {...props}\n as={as}\n display=\"flex\"\n flexWrap=\"wrap\"\n gap={space}\n className={exceptionallySetClassName}\n ref={ref}\n alignItems={mapResponsiveProp(alignY, (alignY) =>\n alignY === 'top' ? 'flexStart' : alignY === 'bottom' ? 'flexEnd' : 'center',\n )}\n justifyContent={mapResponsiveProp(align, (align) =>\n align === 'left' ? 'flexStart' : align === 'right' ? 'flexEnd' : 'center',\n )}\n >\n {children}\n </Box>\n )\n})\n\nexport type { InlineProps, InlineAlign }\nexport { Inline }\n"],"names":["Inline","polymorphicComponent","ref","as","space","align","alignY","children","exceptionallySetClassName","props","React","Box","display","flexWrap","gap","className","alignItems","mapResponsiveProp","justifyContent"],"mappings":";;;;;;;AAiBMA,MAAAA,MAAM,gBAAGC,oBAAoB,CAAqB,SAASD,MAAT,CAAA,IAAA,EAEpDE,GAFoD,EAEjD;EAAA,IADH;IAAEC,EAAF;IAAMC,KAAN;AAAaC,IAAAA,KAAK,GAAG,MAArB;AAA6BC,IAAAA,MAAM,GAAG,QAAtC;IAAgDC,QAAhD;AAA0DC,IAAAA,yBAAAA;GACvD,GAAA,IAAA;AAAA,MADqFC,KACrF,GAAA,wBAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;;AAEH,EAAA,oBACIC,mBAAA,CAACC,GAAD,oCACQF,KADR,CAAA,EAAA,EAAA,EAAA;AAEIN,IAAAA,EAAE,EAAEA,EAFR;AAGIS,IAAAA,OAAO,EAAC,MAHZ;AAIIC,IAAAA,QAAQ,EAAC,MAJb;AAKIC,IAAAA,GAAG,EAAEV,KALT;AAMIW,IAAAA,SAAS,EAAEP,yBANf;AAOIN,IAAAA,GAAG,EAAEA,GAPT;IAQIc,UAAU,EAAEC,iBAAiB,CAACX,MAAD,EAAUA,MAAD,IAClCA,MAAM,KAAK,KAAX,GAAmB,WAAnB,GAAiCA,MAAM,KAAK,QAAX,GAAsB,SAAtB,GAAkC,QAD1C,CARjC;AAWIY,IAAAA,cAAc,EAAED,iBAAiB,CAACZ,KAAD,EAASA,KAAD,IACrCA,KAAK,KAAK,MAAV,GAAmB,WAAnB,GAAiCA,KAAK,KAAK,OAAV,GAAoB,SAApB,GAAgC,QADpC,CAAA;AAXrC,GAAA,CAAA,EAeKE,QAfL,CADJ,CAAA;AAmBH,CAvBkC;;;;"}
|
package/es/loading/loading.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import { Box } from '../box/box.js';
|
|
4
4
|
import { Spinner } from '../spinner/spinner.js';
|
|
5
5
|
|
|
@@ -22,14 +22,14 @@ function Loading(_ref) {
|
|
|
22
22
|
|
|
23
23
|
const numericSize = (_sizeMapping$size = sizeMapping[size]) != null ? _sizeMapping$size : sizeMapping.small;
|
|
24
24
|
const ariaLabel = props['aria-label'] ? props['aria-label'] : !props['aria-labelledby'] ? 'Loading…' : undefined;
|
|
25
|
-
return /*#__PURE__*/createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
25
|
+
return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
26
26
|
"aria-label": ariaLabel,
|
|
27
27
|
className: exceptionallySetClassName,
|
|
28
28
|
display: "flex",
|
|
29
29
|
alignItems: "center",
|
|
30
30
|
justifyContent: "center",
|
|
31
31
|
role: "progressbar"
|
|
32
|
-
}), /*#__PURE__*/createElement(Spinner, {
|
|
32
|
+
}), /*#__PURE__*/React.createElement(Spinner, {
|
|
33
33
|
size: numericSize,
|
|
34
34
|
"aria-hidden": true
|
|
35
35
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loading.js","sources":["../../src/loading/loading.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box } from '../box'\nimport { Spinner } from '../spinner'\nimport type { ObfuscatedClassName } from '../utils/common-types'\n\ntype Size = 'xsmall' | 'small' | 'medium' | 'large'\n\ntype NativeProps = Omit<\n React.HTMLAttributes<HTMLDivElement>,\n 'className' | 'aria-describedby' | 'aria-label' | 'aria-labelledby' | 'role' | 'size'\n>\n\ntype LoadingProps = NativeProps &\n ObfuscatedClassName & {\n /**\n * The size of the loading spinner.\n * @default 'small'\n */\n size?: Size\n\n /**\n * Identifies the element (or elements) that describes the loading component for assistive technologies.\n */\n 'aria-describedby'?: string\n } & (\n | {\n /** Defines a string value that labels the current loading component for assistive technologies. */\n 'aria-label': string\n 'aria-labelledby'?: never\n }\n | {\n /** Identifies the element (or elements) that labels the current loading component for assistive technologies. */\n 'aria-labelledby': string\n 'aria-label'?: never\n }\n )\n\nconst sizeMapping: Record<Size, number> = {\n xsmall: 16,\n small: 24,\n medium: 36,\n large: 48,\n}\n\nfunction Loading({ size = 'small', exceptionallySetClassName, ...props }: LoadingProps) {\n const numericSize = sizeMapping[size] ?? sizeMapping.small\n const ariaLabel = props['aria-label']\n ? props['aria-label']\n : !props['aria-labelledby']\n ? 'Loading…'\n : undefined\n\n return (\n <Box\n {...props}\n aria-label={ariaLabel}\n className={exceptionallySetClassName}\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n role=\"progressbar\"\n >\n <Spinner size={numericSize} aria-hidden />\n </Box>\n )\n}\n\nexport { Loading }\nexport type { LoadingProps }\n"],"names":["sizeMapping","xsmall","small","medium","large","Loading","size","exceptionallySetClassName","props","numericSize","ariaLabel","undefined","React","Box","className","display","alignItems","justifyContent","role","Spinner"],"mappings":";;;;;;AAqCA,MAAMA,WAAW,GAAyB;
|
|
1
|
+
{"version":3,"file":"loading.js","sources":["../../src/loading/loading.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Box } from '../box'\nimport { Spinner } from '../spinner'\nimport type { ObfuscatedClassName } from '../utils/common-types'\n\ntype Size = 'xsmall' | 'small' | 'medium' | 'large'\n\ntype NativeProps = Omit<\n React.HTMLAttributes<HTMLDivElement>,\n 'className' | 'aria-describedby' | 'aria-label' | 'aria-labelledby' | 'role' | 'size'\n>\n\ntype LoadingProps = NativeProps &\n ObfuscatedClassName & {\n /**\n * The size of the loading spinner.\n * @default 'small'\n */\n size?: Size\n\n /**\n * Identifies the element (or elements) that describes the loading component for assistive technologies.\n */\n 'aria-describedby'?: string\n } & (\n | {\n /** Defines a string value that labels the current loading component for assistive technologies. */\n 'aria-label': string\n 'aria-labelledby'?: never\n }\n | {\n /** Identifies the element (or elements) that labels the current loading component for assistive technologies. */\n 'aria-labelledby': string\n 'aria-label'?: never\n }\n )\n\nconst sizeMapping: Record<Size, number> = {\n xsmall: 16,\n small: 24,\n medium: 36,\n large: 48,\n}\n\nfunction Loading({ size = 'small', exceptionallySetClassName, ...props }: LoadingProps) {\n const numericSize = sizeMapping[size] ?? sizeMapping.small\n const ariaLabel = props['aria-label']\n ? props['aria-label']\n : !props['aria-labelledby']\n ? 'Loading…'\n : undefined\n\n return (\n <Box\n {...props}\n aria-label={ariaLabel}\n className={exceptionallySetClassName}\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n role=\"progressbar\"\n >\n <Spinner size={numericSize} aria-hidden />\n </Box>\n )\n}\n\nexport { Loading }\nexport type { LoadingProps }\n"],"names":["sizeMapping","xsmall","small","medium","large","Loading","size","exceptionallySetClassName","props","numericSize","ariaLabel","undefined","React","createElement","Box","className","display","alignItems","justifyContent","role","Spinner"],"mappings":";;;;;;AAqCA,MAAMA,WAAW,GAAyB;AACtCC,EAAAA,MAAM,EAAE,EAD8B;AAEtCC,EAAAA,KAAK,EAAE,EAF+B;AAGtCC,EAAAA,MAAM,EAAE,EAH8B;AAItCC,EAAAA,KAAK,EAAE,EAAA;AAJ+B,CAA1C,CAAA;;AAOA,SAASC,OAAT,CAAsF,IAAA,EAAA;AAAA,EAAA,IAAA,iBAAA,CAAA;;EAAA,IAArE;AAAEC,IAAAA,IAAI,GAAG,OAAT;AAAkBC,IAAAA,yBAAAA;GAAmD,GAAA,IAAA;AAAA,MAArBC,KAAqB,GAAA,wBAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;;EAClF,MAAMC,WAAW,wBAAGT,WAAW,CAACM,IAAD,CAAd,KAAA,IAAA,GAAA,iBAAA,GAAwBN,WAAW,CAACE,KAArD,CAAA;EACA,MAAMQ,SAAS,GAAGF,KAAK,CAAC,YAAD,CAAL,GACZA,KAAK,CAAC,YAAD,CADO,GAEZ,CAACA,KAAK,CAAC,iBAAD,CAAN,GACA,UADA,GAEAG,SAJN,CAAA;AAMA,EAAA,oBACIC,KAAC,CAAAC,aAAD,CAACC,GAAD,oCACQN,KADR,CAAA,EAAA,EAAA,EAAA;AAEgB,IAAA,YAAA,EAAAE,SAFhB;AAGIK,IAAAA,SAAS,EAAER,yBAHf;AAIIS,IAAAA,OAAO,EAAC,MAJZ;AAKIC,IAAAA,UAAU,EAAC,QALf;AAMIC,IAAAA,cAAc,EAAC,QANnB;AAOIC,IAAAA,IAAI,EAAC,aAAA;AAPT,GAAA,CAAA,eASIP,KAAC,CAAAC,aAAD,CAACO,OAAD;AAASd,IAAAA,IAAI,EAAEG;IAA2B,aAAA,EAAA,IAAA;GAA1C,CATJ,CADJ,CAAA;AAaH;;;;"}
|
package/es/menu/menu.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { useMenuStore, MenuButton as MenuButton$1, Role, Portal, Menu as Menu$1, MenuItem as MenuItem$1, MenuGroup as MenuGroup$1 } from '@ariakit/react';
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ const _excluded = ["children", "onItemSelect"],
|
|
|
9
9
|
_excluded4 = ["exceptionallySetClassName", "modal"],
|
|
10
10
|
_excluded5 = ["value", "children", "onSelect", "hideOnSelect", "onClick", "exceptionallySetClassName"],
|
|
11
11
|
_excluded6 = ["label", "children", "exceptionallySetClassName"];
|
|
12
|
-
const MenuContext = /*#__PURE__*/createContext({
|
|
12
|
+
const MenuContext = /*#__PURE__*/React.createContext({
|
|
13
13
|
menuStore: null,
|
|
14
14
|
handleItemSelect: () => undefined,
|
|
15
15
|
getAnchorRect: null,
|
|
@@ -27,18 +27,18 @@ function Menu(_ref) {
|
|
|
27
27
|
} = _ref,
|
|
28
28
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
29
29
|
|
|
30
|
-
const [anchorRect, setAnchorRect] = useState(null);
|
|
31
|
-
const getAnchorRect = useMemo(() => anchorRect ? () => anchorRect : null, [anchorRect]);
|
|
30
|
+
const [anchorRect, setAnchorRect] = React.useState(null);
|
|
31
|
+
const getAnchorRect = React.useMemo(() => anchorRect ? () => anchorRect : null, [anchorRect]);
|
|
32
32
|
const menuStore = useMenuStore(_objectSpread2({
|
|
33
33
|
focusLoop: true
|
|
34
34
|
}, props));
|
|
35
|
-
const value = useMemo(() => ({
|
|
35
|
+
const value = React.useMemo(() => ({
|
|
36
36
|
menuStore,
|
|
37
37
|
handleItemSelect: onItemSelect,
|
|
38
38
|
getAnchorRect,
|
|
39
39
|
setAnchorRect
|
|
40
40
|
}), [menuStore, onItemSelect, getAnchorRect, setAnchorRect]);
|
|
41
|
-
return /*#__PURE__*/createElement(MenuContext.Provider, {
|
|
41
|
+
return /*#__PURE__*/React.createElement(MenuContext.Provider, {
|
|
42
42
|
value: value
|
|
43
43
|
}, children);
|
|
44
44
|
}
|
|
@@ -47,7 +47,7 @@ function Menu(_ref) {
|
|
|
47
47
|
*/
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
const MenuButton = /*#__PURE__*/forwardRef(function MenuButton(_ref2, ref) {
|
|
50
|
+
const MenuButton = /*#__PURE__*/React.forwardRef(function MenuButton(_ref2, ref) {
|
|
51
51
|
let {
|
|
52
52
|
exceptionallySetClassName
|
|
53
53
|
} = _ref2,
|
|
@@ -55,19 +55,19 @@ const MenuButton = /*#__PURE__*/forwardRef(function MenuButton(_ref2, ref) {
|
|
|
55
55
|
|
|
56
56
|
const {
|
|
57
57
|
menuStore
|
|
58
|
-
} = useContext(MenuContext);
|
|
58
|
+
} = React.useContext(MenuContext);
|
|
59
59
|
|
|
60
60
|
if (!menuStore) {
|
|
61
61
|
throw new Error('MenuButton must be wrapped in <Menu/>');
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
return /*#__PURE__*/createElement(MenuButton$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
64
|
+
return /*#__PURE__*/React.createElement(MenuButton$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
65
65
|
store: menuStore,
|
|
66
66
|
ref: ref,
|
|
67
67
|
className: classNames('reactist_menubutton', exceptionallySetClassName)
|
|
68
68
|
}));
|
|
69
69
|
});
|
|
70
|
-
const ContextMenuTrigger = /*#__PURE__*/forwardRef(function ContextMenuTrigger(_ref3, ref) {
|
|
70
|
+
const ContextMenuTrigger = /*#__PURE__*/React.forwardRef(function ContextMenuTrigger(_ref3, ref) {
|
|
71
71
|
let {
|
|
72
72
|
render
|
|
73
73
|
} = _ref3,
|
|
@@ -76,13 +76,13 @@ const ContextMenuTrigger = /*#__PURE__*/forwardRef(function ContextMenuTrigger(_
|
|
|
76
76
|
const {
|
|
77
77
|
setAnchorRect,
|
|
78
78
|
menuStore
|
|
79
|
-
} = useContext(MenuContext);
|
|
79
|
+
} = React.useContext(MenuContext);
|
|
80
80
|
|
|
81
81
|
if (!menuStore) {
|
|
82
82
|
throw new Error('ContextMenuTrigger must be wrapped in <Menu/>');
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
const handleContextMenu = useCallback(function handleContextMenu(event) {
|
|
85
|
+
const handleContextMenu = React.useCallback(function handleContextMenu(event) {
|
|
86
86
|
event.preventDefault();
|
|
87
87
|
setAnchorRect({
|
|
88
88
|
x: event.clientX,
|
|
@@ -91,10 +91,10 @@ const ContextMenuTrigger = /*#__PURE__*/forwardRef(function ContextMenuTrigger(_
|
|
|
91
91
|
menuStore.show();
|
|
92
92
|
}, [setAnchorRect, menuStore]);
|
|
93
93
|
const isOpen = menuStore.useState('open');
|
|
94
|
-
useEffect(() => {
|
|
94
|
+
React.useEffect(() => {
|
|
95
95
|
if (!isOpen) setAnchorRect(null);
|
|
96
96
|
}, [isOpen, setAnchorRect]);
|
|
97
|
-
return /*#__PURE__*/createElement(Role.div, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
97
|
+
return /*#__PURE__*/React.createElement(Role.div, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
98
98
|
onContextMenu: handleContextMenu,
|
|
99
99
|
ref: ref,
|
|
100
100
|
render: render
|
|
@@ -104,7 +104,7 @@ const ContextMenuTrigger = /*#__PURE__*/forwardRef(function ContextMenuTrigger(_
|
|
|
104
104
|
* The dropdown menu itself, containing a list of menu items.
|
|
105
105
|
*/
|
|
106
106
|
|
|
107
|
-
const MenuList = /*#__PURE__*/forwardRef(function MenuList(_ref4, ref) {
|
|
107
|
+
const MenuList = /*#__PURE__*/React.forwardRef(function MenuList(_ref4, ref) {
|
|
108
108
|
let {
|
|
109
109
|
exceptionallySetClassName,
|
|
110
110
|
modal = true
|
|
@@ -114,16 +114,16 @@ const MenuList = /*#__PURE__*/forwardRef(function MenuList(_ref4, ref) {
|
|
|
114
114
|
const {
|
|
115
115
|
menuStore,
|
|
116
116
|
getAnchorRect
|
|
117
|
-
} = useContext(MenuContext);
|
|
117
|
+
} = React.useContext(MenuContext);
|
|
118
118
|
|
|
119
119
|
if (!menuStore) {
|
|
120
120
|
throw new Error('MenuList must be wrapped in <Menu/>');
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
const isOpen = menuStore.useState('open');
|
|
124
|
-
return isOpen ? /*#__PURE__*/createElement(Portal, {
|
|
124
|
+
return isOpen ? /*#__PURE__*/React.createElement(Portal, {
|
|
125
125
|
preserveTabOrder: true
|
|
126
|
-
}, /*#__PURE__*/createElement(Menu$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
126
|
+
}, /*#__PURE__*/React.createElement(Menu$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
127
127
|
store: menuStore,
|
|
128
128
|
gutter: 8,
|
|
129
129
|
shift: 4,
|
|
@@ -138,7 +138,7 @@ const MenuList = /*#__PURE__*/forwardRef(function MenuList(_ref4, ref) {
|
|
|
138
138
|
* callback.
|
|
139
139
|
*/
|
|
140
140
|
|
|
141
|
-
const MenuItem = /*#__PURE__*/forwardRef(function MenuItem(_ref5, ref) {
|
|
141
|
+
const MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(_ref5, ref) {
|
|
142
142
|
let {
|
|
143
143
|
value,
|
|
144
144
|
children,
|
|
@@ -152,7 +152,7 @@ const MenuItem = /*#__PURE__*/forwardRef(function MenuItem(_ref5, ref) {
|
|
|
152
152
|
const {
|
|
153
153
|
handleItemSelect,
|
|
154
154
|
menuStore
|
|
155
|
-
} = useContext(MenuContext);
|
|
155
|
+
} = React.useContext(MenuContext);
|
|
156
156
|
|
|
157
157
|
if (!menuStore) {
|
|
158
158
|
throw new Error('MenuItem must be wrapped in <Menu/>');
|
|
@@ -161,14 +161,14 @@ const MenuItem = /*#__PURE__*/forwardRef(function MenuItem(_ref5, ref) {
|
|
|
161
161
|
const {
|
|
162
162
|
hide
|
|
163
163
|
} = menuStore;
|
|
164
|
-
const handleClick = useCallback(function handleClick(event) {
|
|
164
|
+
const handleClick = React.useCallback(function handleClick(event) {
|
|
165
165
|
onClick == null ? void 0 : onClick(event);
|
|
166
166
|
const onSelectResult = onSelect && !event.defaultPrevented ? onSelect() : undefined;
|
|
167
167
|
const shouldClose = onSelectResult !== false && hideOnSelect;
|
|
168
168
|
handleItemSelect == null ? void 0 : handleItemSelect(value);
|
|
169
169
|
if (shouldClose) hide();
|
|
170
170
|
}, [onSelect, onClick, handleItemSelect, hideOnSelect, hide, value]);
|
|
171
|
-
return /*#__PURE__*/createElement(MenuItem$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
171
|
+
return /*#__PURE__*/React.createElement(MenuItem$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
172
172
|
store: menuStore,
|
|
173
173
|
ref: ref,
|
|
174
174
|
onClick: handleClick,
|
|
@@ -198,14 +198,14 @@ const MenuItem = /*#__PURE__*/forwardRef(function MenuItem(_ref5, ref) {
|
|
|
198
198
|
* opening a sub-menu with the menu items list below it.
|
|
199
199
|
*/
|
|
200
200
|
|
|
201
|
-
const SubMenu = /*#__PURE__*/forwardRef(function SubMenu({
|
|
201
|
+
const SubMenu = /*#__PURE__*/React.forwardRef(function SubMenu({
|
|
202
202
|
children,
|
|
203
203
|
onItemSelect
|
|
204
204
|
}, ref) {
|
|
205
205
|
const {
|
|
206
206
|
handleItemSelect: parentMenuItemSelect,
|
|
207
207
|
menuStore
|
|
208
|
-
} = useContext(MenuContext);
|
|
208
|
+
} = React.useContext(MenuContext);
|
|
209
209
|
|
|
210
210
|
if (!menuStore) {
|
|
211
211
|
throw new Error('SubMenu must be wrapped in <Menu/>');
|
|
@@ -214,16 +214,16 @@ const SubMenu = /*#__PURE__*/forwardRef(function SubMenu({
|
|
|
214
214
|
const {
|
|
215
215
|
hide: parentMenuHide
|
|
216
216
|
} = menuStore;
|
|
217
|
-
const handleSubItemSelect = useCallback(function handleSubItemSelect(value) {
|
|
217
|
+
const handleSubItemSelect = React.useCallback(function handleSubItemSelect(value) {
|
|
218
218
|
onItemSelect == null ? void 0 : onItemSelect(value);
|
|
219
219
|
parentMenuItemSelect == null ? void 0 : parentMenuItemSelect(value);
|
|
220
220
|
parentMenuHide();
|
|
221
221
|
}, [parentMenuHide, parentMenuItemSelect, onItemSelect]);
|
|
222
|
-
const [button, list] = Children.toArray(children);
|
|
222
|
+
const [button, list] = React.Children.toArray(children);
|
|
223
223
|
const buttonElement = button;
|
|
224
|
-
return /*#__PURE__*/createElement(Menu, {
|
|
224
|
+
return /*#__PURE__*/React.createElement(Menu, {
|
|
225
225
|
onItemSelect: handleSubItemSelect
|
|
226
|
-
}, /*#__PURE__*/createElement(MenuItem$1, {
|
|
226
|
+
}, /*#__PURE__*/React.createElement(MenuItem$1, {
|
|
227
227
|
store: menuStore,
|
|
228
228
|
ref: ref,
|
|
229
229
|
hideOnClick: false,
|
|
@@ -237,7 +237,7 @@ const SubMenu = /*#__PURE__*/forwardRef(function SubMenu({
|
|
|
237
237
|
* before and/or after the group if you so wish.
|
|
238
238
|
*/
|
|
239
239
|
|
|
240
|
-
const MenuGroup = /*#__PURE__*/forwardRef(function MenuGroup(_ref6, ref) {
|
|
240
|
+
const MenuGroup = /*#__PURE__*/React.forwardRef(function MenuGroup(_ref6, ref) {
|
|
241
241
|
let {
|
|
242
242
|
label,
|
|
243
243
|
children,
|
|
@@ -247,17 +247,17 @@ const MenuGroup = /*#__PURE__*/forwardRef(function MenuGroup(_ref6, ref) {
|
|
|
247
247
|
|
|
248
248
|
const {
|
|
249
249
|
menuStore
|
|
250
|
-
} = useContext(MenuContext);
|
|
250
|
+
} = React.useContext(MenuContext);
|
|
251
251
|
|
|
252
252
|
if (!menuStore) {
|
|
253
253
|
throw new Error('MenuGroup must be wrapped in <Menu/>');
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
return /*#__PURE__*/createElement(MenuGroup$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
256
|
+
return /*#__PURE__*/React.createElement(MenuGroup$1, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
257
257
|
ref: ref,
|
|
258
258
|
store: menuStore,
|
|
259
259
|
className: exceptionallySetClassName
|
|
260
|
-
}), label ? /*#__PURE__*/createElement("div", {
|
|
260
|
+
}), label ? /*#__PURE__*/React.createElement("div", {
|
|
261
261
|
role: "presentation",
|
|
262
262
|
className: "reactist_menugroup__label"
|
|
263
263
|
}, label) : null, children);
|
package/es/menu/menu.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.js","sources":["../../src/menu/menu.tsx"],"sourcesContent":["import * as React from 'react'\nimport classNames from 'classnames'\n\nimport {\n Portal,\n MenuStore,\n MenuStoreProps,\n useMenuStore,\n MenuProps as AriakitMenuProps,\n Menu as AriakitMenu,\n MenuGroup as AriakitMenuGroup,\n MenuItem as AriakitMenuItem,\n MenuItemProps as AriakitMenuItemProps,\n MenuButton as AriakitMenuButton,\n MenuButtonProps as AriakitMenuButtonProps,\n Role,\n RoleProps,\n} from '@ariakit/react'\n\nimport './menu.less'\nimport type { ObfuscatedClassName } from '../utils/common-types'\n\ntype MenuContextState = {\n menuStore: MenuStore | null\n handleItemSelect?: (value: string | null | undefined) => void\n getAnchorRect: (() => { x: number; y: number }) | null\n setAnchorRect: (rect: { x: number; y: number } | null) => void\n}\n\nconst MenuContext = React.createContext<MenuContextState>({\n menuStore: null,\n handleItemSelect: () => undefined,\n getAnchorRect: null,\n setAnchorRect: () => undefined,\n})\n\n//\n// Menu\n//\n\ninterface MenuProps extends Omit<MenuStoreProps, 'visible'> {\n /**\n * The `Menu` must contain a `MenuList` that defines the menu options. It must also contain a\n * `MenuButton` that triggers the menu to be opened or closed.\n */\n children: React.ReactNode\n\n /**\n * An optional callback that will be called back whenever a menu item is selected. It receives\n * the `value` of the selected `MenuItem`.\n *\n * If you pass down this callback, it is recommended that you properly memoize it so it does not\n * change on every render.\n */\n onItemSelect?: (value: string | null | undefined) => void\n}\n\n/**\n * Wrapper component to control a menu. It does not render anything, only providing the state\n * management for the menu components inside it.\n */\nfunction Menu({ children, onItemSelect, ...props }: MenuProps) {\n const [anchorRect, setAnchorRect] = React.useState<{ x: number; y: number } | null>(null)\n const getAnchorRect = React.useMemo(() => (anchorRect ? () => anchorRect : null), [anchorRect])\n const menuStore = useMenuStore({ focusLoop: true, ...props })\n\n const value: MenuContextState = React.useMemo(\n () => ({ menuStore, handleItemSelect: onItemSelect, getAnchorRect, setAnchorRect }),\n [menuStore, onItemSelect, getAnchorRect, setAnchorRect],\n )\n\n return <MenuContext.Provider value={value}>{children}</MenuContext.Provider>\n}\n\n//\n// MenuButton\n//\n\ninterface MenuButtonProps\n extends Omit<AriakitMenuButtonProps, 'store' | 'className' | 'as'>,\n ObfuscatedClassName {}\n\n/**\n * A button to toggle a dropdown menu open or closed.\n */\nconst MenuButton = React.forwardRef<HTMLButtonElement, MenuButtonProps>(function MenuButton(\n { exceptionallySetClassName, ...props },\n ref,\n) {\n const { menuStore } = React.useContext(MenuContext)\n if (!menuStore) {\n throw new Error('MenuButton must be wrapped in <Menu/>')\n }\n return (\n <AriakitMenuButton\n {...props}\n store={menuStore}\n ref={ref}\n className={classNames('reactist_menubutton', exceptionallySetClassName)}\n />\n )\n})\n\n//\n// ContextMenuTrigger\n//\n\ninterface ContextMenuTriggerProps\n extends ObfuscatedClassName,\n React.HTMLAttributes<HTMLDivElement>,\n Pick<RoleProps, 'render'> {}\n\nconst ContextMenuTrigger = React.forwardRef<HTMLDivElement, ContextMenuTriggerProps>(\n function ContextMenuTrigger({ render, ...props }, ref) {\n const { setAnchorRect, menuStore } = React.useContext(MenuContext)\n if (!menuStore) {\n throw new Error('ContextMenuTrigger must be wrapped in <Menu/>')\n }\n\n const handleContextMenu = React.useCallback(\n function handleContextMenu(event: React.MouseEvent) {\n event.preventDefault()\n setAnchorRect({ x: event.clientX, y: event.clientY })\n menuStore.show()\n },\n [setAnchorRect, menuStore],\n )\n\n const isOpen = menuStore.useState('open')\n React.useEffect(() => {\n if (!isOpen) setAnchorRect(null)\n }, [isOpen, setAnchorRect])\n\n return <Role.div {...props} onContextMenu={handleContextMenu} ref={ref} render={render} />\n },\n)\n\n//\n// MenuList\n//\n\ninterface MenuListProps\n extends Omit<AriakitMenuProps, 'store' | 'className'>,\n ObfuscatedClassName {}\n\n/**\n * The dropdown menu itself, containing a list of menu items.\n */\nconst MenuList = React.forwardRef<HTMLDivElement, MenuListProps>(function MenuList(\n { exceptionallySetClassName, modal = true, ...props },\n ref,\n) {\n const { menuStore, getAnchorRect } = React.useContext(MenuContext)\n if (!menuStore) {\n throw new Error('MenuList must be wrapped in <Menu/>')\n }\n\n const isOpen = menuStore.useState('open')\n\n return isOpen ? (\n <Portal preserveTabOrder>\n <AriakitMenu\n {...props}\n store={menuStore}\n gutter={8}\n shift={4}\n ref={ref}\n className={classNames('reactist_menulist', exceptionallySetClassName)}\n getAnchorRect={getAnchorRect ?? undefined}\n modal={modal}\n />\n </Portal>\n ) : null\n})\n\n//\n// MenuItem\n//\n\ninterface MenuItemProps extends AriakitMenuItemProps, ObfuscatedClassName {\n /**\n * An optional value given to this menu item. It is passed on to the parent `Menu`'s\n * `onItemSelect` when you provide that instead of (or alongside) providing individual\n * `onSelect` callbacks to each menu item.\n */\n value?: string\n\n /**\n * When `true` the menu item is disabled and won't be selectable or be part of the keyboard\n * navigation across the menu options.\n *\n * @default true\n */\n disabled?: boolean\n\n /**\n * When `true` the menu will close when the menu item is selected, in addition to performing the\n * action that the menu item is set out to do.\n *\n * Set this to `false` to make sure that a given menu item does not auto-closes the menu when\n * selected. This should be the exception and not the norm, as the default is to auto-close.\n *\n * @default true\n */\n hideOnSelect?: boolean\n\n /**\n * The action to perform when the menu item is selected.\n *\n * If you return `false` from this function, the menu will not auto-close when this menu item\n * is selected. Though you should use `hideOnSelect` for this purpose, this allows you to\n * achieve the same effect conditionally and dynamically deciding at run time.\n */\n onSelect?: () => unknown\n\n /**\n * The event handler called when the menu item is clicked.\n *\n * This is similar to `onSelect`, but a bit different. You can certainly use it to trigger the\n * action that the menu item represents. But in general you should prefer `onSelect` for that.\n *\n * The main use for this handler is to get access to the click event. This can be used, for\n * example, to call `event.preventDefault()`, which will effectively prevent the rest of the\n * consequences of the click, including preventing `onSelect` from being called. In particular,\n * this is useful in menu items that are links, and you want the click to not trigger navigation\n * under some circumstances.\n */\n onClick?: (event: React.MouseEvent) => void\n}\n\n/**\n * A menu item inside a menu list. It can be selected by the user, triggering the `onSelect`\n * callback.\n */\nconst MenuItem = React.forwardRef<HTMLDivElement, MenuItemProps>(function MenuItem(\n {\n value,\n children,\n onSelect,\n hideOnSelect = true,\n onClick,\n exceptionallySetClassName,\n ...props\n },\n ref,\n) {\n const { handleItemSelect, menuStore } = React.useContext(MenuContext)\n if (!menuStore) {\n throw new Error('MenuItem must be wrapped in <Menu/>')\n }\n\n const { hide } = menuStore\n const handleClick = React.useCallback(\n function handleClick(event: React.MouseEvent) {\n onClick?.(event)\n const onSelectResult: unknown =\n onSelect && !event.defaultPrevented ? onSelect() : undefined\n const shouldClose = onSelectResult !== false && hideOnSelect\n handleItemSelect?.(value)\n if (shouldClose) hide()\n },\n [onSelect, onClick, handleItemSelect, hideOnSelect, hide, value],\n )\n\n return (\n <AriakitMenuItem\n {...props}\n store={menuStore}\n ref={ref}\n onClick={handleClick}\n className={exceptionallySetClassName}\n hideOnClick={false}\n >\n {children}\n </AriakitMenuItem>\n )\n})\n\n//\n// SubMenu\n//\n\ntype SubMenuProps = Pick<MenuProps, 'children' | 'onItemSelect'>\n\n/**\n * This component can be rendered alongside other `MenuItem` inside a `MenuList` in order to have\n * a sub-menu.\n *\n * Its children are expected to have the structure of a first level menu (a `MenuButton` and a\n * `MenuList`).\n *\n * ```jsx\n * <MenuItem label=\"Edit profile\" />\n * <SubMenu>\n * <MenuButton>More options</MenuButton>\n * <MenuList>\n * <MenuItem label=\"Preferences\" />\n * <MenuItem label=\"Sign out\" />\n * </MenuList>\n * </SubMenu>\n * ```\n *\n * The `MenuButton` will become a menu item in the current menu items list, and it will lead to\n * opening a sub-menu with the menu items list below it.\n */\nconst SubMenu = React.forwardRef<HTMLDivElement, SubMenuProps>(function SubMenu(\n { children, onItemSelect },\n ref,\n) {\n const { handleItemSelect: parentMenuItemSelect, menuStore } = React.useContext(MenuContext)\n if (!menuStore) {\n throw new Error('SubMenu must be wrapped in <Menu/>')\n }\n\n const { hide: parentMenuHide } = menuStore\n const handleSubItemSelect = React.useCallback(\n function handleSubItemSelect(value: string | null | undefined) {\n onItemSelect?.(value)\n parentMenuItemSelect?.(value)\n parentMenuHide()\n },\n [parentMenuHide, parentMenuItemSelect, onItemSelect],\n )\n\n const [button, list] = React.Children.toArray(children)\n const buttonElement = button as React.ReactElement<MenuButtonProps>\n\n return (\n <Menu onItemSelect={handleSubItemSelect}>\n <AriakitMenuItem store={menuStore} ref={ref} hideOnClick={false} render={buttonElement}>\n {buttonElement.props.children}\n </AriakitMenuItem>\n {list}\n </Menu>\n )\n})\n\n//\n// MenuGroup\n//\n\ninterface MenuGroupProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, 'className'>,\n ObfuscatedClassName {\n /**\n * A label to be shown visually and also used to semantically label the group.\n */\n label: string\n}\n\n/**\n * A way to semantically group some menu items.\n *\n * This group does not add any visual separator. You can do that yourself adding `<hr />` elements\n * before and/or after the group if you so wish.\n */\nconst MenuGroup = React.forwardRef<HTMLDivElement, MenuGroupProps>(function MenuGroup(\n { label, children, exceptionallySetClassName, ...props },\n ref,\n) {\n const { menuStore } = React.useContext(MenuContext)\n if (!menuStore) {\n throw new Error('MenuGroup must be wrapped in <Menu/>')\n }\n\n return (\n <AriakitMenuGroup\n {...props}\n ref={ref}\n store={menuStore}\n className={exceptionallySetClassName}\n >\n {label ? (\n <div role=\"presentation\" className=\"reactist_menugroup__label\">\n {label}\n </div>\n ) : null}\n {children}\n </AriakitMenuGroup>\n )\n})\n\nexport { ContextMenuTrigger, Menu, MenuButton, MenuList, MenuItem, SubMenu, MenuGroup }\nexport type { MenuButtonProps, MenuListProps, MenuItemProps, MenuGroupProps }\n"],"names":["MenuContext","React","menuStore","handleItemSelect","undefined","getAnchorRect","setAnchorRect","Menu","children","onItemSelect","props","anchorRect","useMenuStore","focusLoop","value","Provider","MenuButton","ref","exceptionallySetClassName","Error","AriakitMenuButton","store","className","classNames","ContextMenuTrigger","render","handleContextMenu","event","preventDefault","x","clientX","y","clientY","show","isOpen","useState","Role","div","onContextMenu","MenuList","modal","Portal","preserveTabOrder","AriakitMenu","gutter","shift","MenuItem","onSelect","hideOnSelect","onClick","hide","handleClick","onSelectResult","defaultPrevented","shouldClose","AriakitMenuItem","hideOnClick","SubMenu","parentMenuItemSelect","parentMenuHide","handleSubItemSelect","button","list","toArray","buttonElement","MenuGroup","label","AriakitMenuGroup","role"],"mappings":";;;;;;;;;;;AA6BA,MAAMA,WAAW,gBAAGC,aAAA,CAAsC;EACtDC,SAAS,EAAE,IAD2C;EAEtDC,gBAAgB,EAAE,MAAMC,SAF8B;EAGtDC,aAAa,EAAE,IAHuC;EAItDC,aAAa,EAAE,MAAMF;AAJiC,CAAtC,CAApB;AA4BA;;;;;AAIA,SAASG,IAAT;MAAc;IAAEC,QAAF;IAAYC;;MAAiBC;;EACvC,MAAM,CAACC,UAAD,EAAaL,aAAb,IAA8BL,QAAA,CAAgD,IAAhD,CAApC;EACA,MAAMI,aAAa,GAAGJ,OAAA,CAAc,MAAOU,UAAU,GAAG,MAAMA,UAAT,GAAsB,IAArD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T;IAGII,KAAK,EAAEnB,SAHX;IAIIoB,SAAS,EAAEJ;MAEVgD,KAAK,gBACFjE,aAAA,MAAA;IAAKmE,IAAI,EAAC;IAAe9C,SAAS,EAAC;GAAnC,EACK4C,KADL,CADE,GAIF,IAVR,EAWK1D,QAXL,CADJ;AAeH,CAxBiB;;;;"}
|
|
1
|
+
{"version":3,"file":"menu.js","sources":["../../src/menu/menu.tsx"],"sourcesContent":["import * as React from 'react'\nimport classNames from 'classnames'\n\nimport {\n Portal,\n MenuStore,\n MenuStoreProps,\n useMenuStore,\n MenuProps as AriakitMenuProps,\n Menu as AriakitMenu,\n MenuGroup as AriakitMenuGroup,\n MenuItem as AriakitMenuItem,\n MenuItemProps as AriakitMenuItemProps,\n MenuButton as AriakitMenuButton,\n MenuButtonProps as AriakitMenuButtonProps,\n Role,\n RoleProps,\n} from '@ariakit/react'\n\nimport './menu.less'\nimport type { ObfuscatedClassName } from '../utils/common-types'\n\ntype MenuContextState = {\n menuStore: MenuStore | null\n handleItemSelect?: (value: string | null | undefined) => void\n getAnchorRect: (() => { x: number; y: number }) | null\n setAnchorRect: (rect: { x: number; y: number } | null) => void\n}\n\nconst MenuContext = React.createContext<MenuContextState>({\n menuStore: null,\n handleItemSelect: () => undefined,\n getAnchorRect: null,\n setAnchorRect: () => undefined,\n})\n\n//\n// Menu\n//\n\ninterface MenuProps extends Omit<MenuStoreProps, 'visible'> {\n /**\n * The `Menu` must contain a `MenuList` that defines the menu options. It must also contain a\n * `MenuButton` that triggers the menu to be opened or closed.\n */\n children: React.ReactNode\n\n /**\n * An optional callback that will be called back whenever a menu item is selected. It receives\n * the `value` of the selected `MenuItem`.\n *\n * If you pass down this callback, it is recommended that you properly memoize it so it does not\n * change on every render.\n */\n onItemSelect?: (value: string | null | undefined) => void\n}\n\n/**\n * Wrapper component to control a menu. It does not render anything, only providing the state\n * management for the menu components inside it.\n */\nfunction Menu({ children, onItemSelect, ...props }: MenuProps) {\n const [anchorRect, setAnchorRect] = React.useState<{ x: number; y: number } | null>(null)\n const getAnchorRect = React.useMemo(() => (anchorRect ? () => anchorRect : null), [anchorRect])\n const menuStore = useMenuStore({ focusLoop: true, ...props })\n\n const value: MenuContextState = React.useMemo(\n () => ({ menuStore, handleItemSelect: onItemSelect, getAnchorRect, setAnchorRect }),\n [menuStore, onItemSelect, getAnchorRect, setAnchorRect],\n )\n\n return <MenuContext.Provider value={value}>{children}</MenuContext.Provider>\n}\n\n//\n// MenuButton\n//\n\ninterface MenuButtonProps\n extends Omit<AriakitMenuButtonProps, 'store' | 'className' | 'as'>,\n ObfuscatedClassName {}\n\n/**\n * A button to toggle a dropdown menu open or closed.\n */\nconst MenuButton = React.forwardRef<HTMLButtonElement, MenuButtonProps>(function MenuButton(\n { exceptionallySetClassName, ...props },\n ref,\n) {\n const { menuStore } = React.useContext(MenuContext)\n if (!menuStore) {\n throw new Error('MenuButton must be wrapped in <Menu/>')\n }\n return (\n <AriakitMenuButton\n {...props}\n store={menuStore}\n ref={ref}\n className={classNames('reactist_menubutton', exceptionallySetClassName)}\n />\n )\n})\n\n//\n// ContextMenuTrigger\n//\n\ninterface ContextMenuTriggerProps\n extends ObfuscatedClassName,\n React.HTMLAttributes<HTMLDivElement>,\n Pick<RoleProps, 'render'> {}\n\nconst ContextMenuTrigger = React.forwardRef<HTMLDivElement, ContextMenuTriggerProps>(\n function ContextMenuTrigger({ render, ...props }, ref) {\n const { setAnchorRect, menuStore } = React.useContext(MenuContext)\n if (!menuStore) {\n throw new Error('ContextMenuTrigger must be wrapped in <Menu/>')\n }\n\n const handleContextMenu = React.useCallback(\n function handleContextMenu(event: React.MouseEvent) {\n event.preventDefault()\n setAnchorRect({ x: event.clientX, y: event.clientY })\n menuStore.show()\n },\n [setAnchorRect, menuStore],\n )\n\n const isOpen = menuStore.useState('open')\n React.useEffect(() => {\n if (!isOpen) setAnchorRect(null)\n }, [isOpen, setAnchorRect])\n\n return <Role.div {...props} onContextMenu={handleContextMenu} ref={ref} render={render} />\n },\n)\n\n//\n// MenuList\n//\n\ninterface MenuListProps\n extends Omit<AriakitMenuProps, 'store' | 'className'>,\n ObfuscatedClassName {}\n\n/**\n * The dropdown menu itself, containing a list of menu items.\n */\nconst MenuList = React.forwardRef<HTMLDivElement, MenuListProps>(function MenuList(\n { exceptionallySetClassName, modal = true, ...props },\n ref,\n) {\n const { menuStore, getAnchorRect } = React.useContext(MenuContext)\n if (!menuStore) {\n throw new Error('MenuList must be wrapped in <Menu/>')\n }\n\n const isOpen = menuStore.useState('open')\n\n return isOpen ? (\n <Portal preserveTabOrder>\n <AriakitMenu\n {...props}\n store={menuStore}\n gutter={8}\n shift={4}\n ref={ref}\n className={classNames('reactist_menulist', exceptionallySetClassName)}\n getAnchorRect={getAnchorRect ?? undefined}\n modal={modal}\n />\n </Portal>\n ) : null\n})\n\n//\n// MenuItem\n//\n\ninterface MenuItemProps extends AriakitMenuItemProps, ObfuscatedClassName {\n /**\n * An optional value given to this menu item. It is passed on to the parent `Menu`'s\n * `onItemSelect` when you provide that instead of (or alongside) providing individual\n * `onSelect` callbacks to each menu item.\n */\n value?: string\n\n /**\n * When `true` the menu item is disabled and won't be selectable or be part of the keyboard\n * navigation across the menu options.\n *\n * @default true\n */\n disabled?: boolean\n\n /**\n * When `true` the menu will close when the menu item is selected, in addition to performing the\n * action that the menu item is set out to do.\n *\n * Set this to `false` to make sure that a given menu item does not auto-closes the menu when\n * selected. This should be the exception and not the norm, as the default is to auto-close.\n *\n * @default true\n */\n hideOnSelect?: boolean\n\n /**\n * The action to perform when the menu item is selected.\n *\n * If you return `false` from this function, the menu will not auto-close when this menu item\n * is selected. Though you should use `hideOnSelect` for this purpose, this allows you to\n * achieve the same effect conditionally and dynamically deciding at run time.\n */\n onSelect?: () => unknown\n\n /**\n * The event handler called when the menu item is clicked.\n *\n * This is similar to `onSelect`, but a bit different. You can certainly use it to trigger the\n * action that the menu item represents. But in general you should prefer `onSelect` for that.\n *\n * The main use for this handler is to get access to the click event. This can be used, for\n * example, to call `event.preventDefault()`, which will effectively prevent the rest of the\n * consequences of the click, including preventing `onSelect` from being called. In particular,\n * this is useful in menu items that are links, and you want the click to not trigger navigation\n * under some circumstances.\n */\n onClick?: (event: React.MouseEvent) => void\n}\n\n/**\n * A menu item inside a menu list. It can be selected by the user, triggering the `onSelect`\n * callback.\n */\nconst MenuItem = React.forwardRef<HTMLDivElement, MenuItemProps>(function MenuItem(\n {\n value,\n children,\n onSelect,\n hideOnSelect = true,\n onClick,\n exceptionallySetClassName,\n ...props\n },\n ref,\n) {\n const { handleItemSelect, menuStore } = React.useContext(MenuContext)\n if (!menuStore) {\n throw new Error('MenuItem must be wrapped in <Menu/>')\n }\n\n const { hide } = menuStore\n const handleClick = React.useCallback(\n function handleClick(event: React.MouseEvent) {\n onClick?.(event)\n const onSelectResult: unknown =\n onSelect && !event.defaultPrevented ? onSelect() : undefined\n const shouldClose = onSelectResult !== false && hideOnSelect\n handleItemSelect?.(value)\n if (shouldClose) hide()\n },\n [onSelect, onClick, handleItemSelect, hideOnSelect, hide, value],\n )\n\n return (\n <AriakitMenuItem\n {...props}\n store={menuStore}\n ref={ref}\n onClick={handleClick}\n className={exceptionallySetClassName}\n hideOnClick={false}\n >\n {children}\n </AriakitMenuItem>\n )\n})\n\n//\n// SubMenu\n//\n\ntype SubMenuProps = Pick<MenuProps, 'children' | 'onItemSelect'>\n\n/**\n * This component can be rendered alongside other `MenuItem` inside a `MenuList` in order to have\n * a sub-menu.\n *\n * Its children are expected to have the structure of a first level menu (a `MenuButton` and a\n * `MenuList`).\n *\n * ```jsx\n * <MenuItem label=\"Edit profile\" />\n * <SubMenu>\n * <MenuButton>More options</MenuButton>\n * <MenuList>\n * <MenuItem label=\"Preferences\" />\n * <MenuItem label=\"Sign out\" />\n * </MenuList>\n * </SubMenu>\n * ```\n *\n * The `MenuButton` will become a menu item in the current menu items list, and it will lead to\n * opening a sub-menu with the menu items list below it.\n */\nconst SubMenu = React.forwardRef<HTMLDivElement, SubMenuProps>(function SubMenu(\n { children, onItemSelect },\n ref,\n) {\n const { handleItemSelect: parentMenuItemSelect, menuStore } = React.useContext(MenuContext)\n if (!menuStore) {\n throw new Error('SubMenu must be wrapped in <Menu/>')\n }\n\n const { hide: parentMenuHide } = menuStore\n const handleSubItemSelect = React.useCallback(\n function handleSubItemSelect(value: string | null | undefined) {\n onItemSelect?.(value)\n parentMenuItemSelect?.(value)\n parentMenuHide()\n },\n [parentMenuHide, parentMenuItemSelect, onItemSelect],\n )\n\n const [button, list] = React.Children.toArray(children)\n const buttonElement = button as React.ReactElement<MenuButtonProps>\n\n return (\n <Menu onItemSelect={handleSubItemSelect}>\n <AriakitMenuItem store={menuStore} ref={ref} hideOnClick={false} render={buttonElement}>\n {buttonElement.props.children}\n </AriakitMenuItem>\n {list}\n </Menu>\n )\n})\n\n//\n// MenuGroup\n//\n\ninterface MenuGroupProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, 'className'>,\n ObfuscatedClassName {\n /**\n * A label to be shown visually and also used to semantically label the group.\n */\n label: string\n}\n\n/**\n * A way to semantically group some menu items.\n *\n * This group does not add any visual separator. You can do that yourself adding `<hr />` elements\n * before and/or after the group if you so wish.\n */\nconst MenuGroup = React.forwardRef<HTMLDivElement, MenuGroupProps>(function MenuGroup(\n { label, children, exceptionallySetClassName, ...props },\n ref,\n) {\n const { menuStore } = React.useContext(MenuContext)\n if (!menuStore) {\n throw new Error('MenuGroup must be wrapped in <Menu/>')\n }\n\n return (\n <AriakitMenuGroup\n {...props}\n ref={ref}\n store={menuStore}\n className={exceptionallySetClassName}\n >\n {label ? (\n <div role=\"presentation\" className=\"reactist_menugroup__label\">\n {label}\n </div>\n ) : null}\n {children}\n </AriakitMenuGroup>\n )\n})\n\nexport { ContextMenuTrigger, Menu, MenuButton, MenuList, MenuItem, SubMenu, MenuGroup }\nexport type { MenuButtonProps, MenuListProps, MenuItemProps, MenuGroupProps }\n"],"names":["MenuContext","React","createContext","menuStore","handleItemSelect","undefined","getAnchorRect","setAnchorRect","Menu","children","onItemSelect","props","anchorRect","useState","useMemo","useMenuStore","_objectSpread","focusLoop","value","createElement","Provider","MenuButton","forwardRef","ref","exceptionallySetClassName","useContext","Error","AriakitMenuButton","store","className","classNames","ContextMenuTrigger","render","handleContextMenu","useCallback","event","preventDefault","x","clientX","y","clientY","show","isOpen","useEffect","Role","div","onContextMenu","MenuList","modal","Portal","preserveTabOrder","AriakitMenu","gutter","shift","MenuItem","onSelect","hideOnSelect","onClick","hide","handleClick","onSelectResult","defaultPrevented","shouldClose","AriakitMenuItem","hideOnClick","SubMenu","parentMenuItemSelect","parentMenuHide","handleSubItemSelect","button","list","Children","toArray","buttonElement","MenuGroup","label","AriakitMenuGroup","role"],"mappings":";;;;;;;;;;;AA6BA,MAAMA,WAAW,gBAAGC,KAAK,CAACC,aAAN,CAAsC;AACtDC,EAAAA,SAAS,EAAE,IAD2C;EAEtDC,gBAAgB,EAAE,MAAMC,SAF8B;AAGtDC,EAAAA,aAAa,EAAE,IAHuC;AAItDC,EAAAA,aAAa,EAAE,MAAMF,SAAAA;AAJiC,CAAtC,CAApB,CAAA;AA4BA;;;AAGG;;AACH,SAASG,IAAT,CAA6D,IAAA,EAAA;EAAA,IAA/C;IAAEC,QAAF;AAAYC,IAAAA,YAAAA;GAAmC,GAAA,IAAA;AAAA,MAAlBC,KAAkB,GAAA,wBAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;;EACzD,MAAM,CAACC,UAAD,EAAaL,aAAb,CAAA,GAA8BN,KAAK,CAACY,QAAN,CAAgD,IAAhD,CAApC,CAAA;AACA,EAAA,MAAMP,aAAa,GAAGL,KAAK,CAACa,OAAN,CAAc,MAAOF,UAAU,GAAG,MAAMA,UAAT,GAAsB,IAArD,EAA4D,CAACA,UAAD,CAA5D,CAAtB,CAAA;EACA,MAAMT,SAAS,GAAGY,YAAY,CAAAC,cAAA,CAAA;AAAGC,IAAAA,SAAS,EAAE,IAAA;AAAd,GAAA,EAAuBN,KAAvB,CAA9B,C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