@sparrowengg/integrations-templates-frontend 1.9.84-beta.2 → 1.9.84-beta.20
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/dist/cjs/_virtual/index10.js +2 -2
- package/dist/cjs/_virtual/index9.js +2 -2
- package/dist/cjs/authentication/constants/index.js +115 -1
- package/dist/cjs/authentication/constants/index.js.map +1 -1
- package/dist/cjs/authentication/index.js +36 -32
- package/dist/cjs/authentication/index.js.map +1 -1
- package/dist/cjs/cascader-dropdown/cascader-dropdown-breadcrumb.js +118 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown-breadcrumb.js.map +1 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown-content.js +186 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown-content.js.map +1 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown-item.js +65 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown-item.js.map +1 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown-list.js +83 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown-list.js.map +1 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown-node.js +90 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown-node.js.map +1 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown-provider.js +172 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown-provider.js.map +1 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown-root-node.js +56 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown-root-node.js.map +1 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown-search-input.js +141 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown-search-input.js.map +1 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown-search-list.js +174 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown-search-list.js.map +1 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown-value-selector.js +484 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown-value-selector.js.map +1 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown.js +98 -0
- package/dist/cjs/cascader-dropdown/cascader-dropdown.js.map +1 -0
- package/dist/cjs/cascader-dropdown/helpers/cascader-dropdown-constants.js +31 -0
- package/dist/cjs/cascader-dropdown/helpers/cascader-dropdown-constants.js.map +1 -0
- package/dist/cjs/cascader-dropdown/helpers/cascader-dropdown-utils.js +136 -0
- package/dist/cjs/cascader-dropdown/helpers/cascader-dropdown-utils.js.map +1 -0
- package/dist/cjs/cascader-dropdown/styled/StyledItem.js +42 -0
- package/dist/cjs/cascader-dropdown/styled/StyledItem.js.map +1 -0
- package/dist/cjs/cascader-dropdown/use-value.js +45 -0
- package/dist/cjs/cascader-dropdown/use-value.js.map +1 -0
- package/dist/cjs/commons/components/NamingModal.js +82 -0
- package/dist/cjs/commons/components/NamingModal.js.map +1 -0
- package/dist/cjs/commons/constants/enhanced.js +12 -0
- package/dist/cjs/commons/constants/enhanced.js.map +1 -0
- package/dist/cjs/commons/constants/index.js +7 -1
- package/dist/cjs/commons/constants/index.js.map +1 -1
- package/dist/cjs/contact-import/components/contact-import-configure.js.map +1 -1
- package/dist/cjs/contact-import/components/contact-import-mapping.js +10 -7
- package/dist/cjs/contact-import/components/contact-import-mapping.js.map +1 -1
- package/dist/cjs/contact-import/index.js +6 -9
- package/dist/cjs/contact-import/index.js.map +1 -1
- package/dist/cjs/dynamic-mapping/components/mapping.js +496 -0
- package/dist/cjs/dynamic-mapping/components/mapping.js.map +1 -0
- package/dist/cjs/dynamic-mapping/index.js +1083 -0
- package/dist/cjs/dynamic-mapping/index.js.map +1 -0
- package/dist/cjs/filter/filter-pill-value-selector.js +56 -0
- package/dist/cjs/filter/filter-pill-value-selector.js.map +1 -0
- package/dist/cjs/filter/filter-pill.js +301 -0
- package/dist/cjs/filter/filter-pill.js.map +1 -0
- package/dist/cjs/index.js +7 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/integration-template/components/dashboard.js +227 -197
- package/dist/cjs/integration-template/components/dashboard.js.map +1 -1
- package/dist/cjs/integration-template/index.js +33 -14
- package/dist/cjs/integration-template/index.js.map +1 -1
- package/dist/cjs/mapping/components/custom-date-menu.js +3 -2
- package/dist/cjs/mapping/components/custom-date-menu.js.map +1 -1
- package/dist/cjs/mapping/components/custom-menu.js.map +1 -1
- package/dist/cjs/mapping/components/field.js +14 -6
- package/dist/cjs/mapping/components/field.js.map +1 -1
- package/dist/cjs/mapping/components/mapping.js +29 -21
- package/dist/cjs/mapping/components/mapping.js.map +1 -1
- package/dist/cjs/mapping/constants/index.js +32 -0
- package/dist/cjs/mapping/constants/index.js.map +1 -0
- package/dist/cjs/mapping/index.js +453 -24
- package/dist/cjs/mapping/index.js.map +1 -1
- package/dist/cjs/mapping/services/index.js.map +1 -1
- package/dist/cjs/node_modules/@floating-ui/core/dist/floating-ui.core.js +823 -0
- package/dist/cjs/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
- package/dist/cjs/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +378 -0
- package/dist/cjs/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -0
- package/dist/cjs/node_modules/@floating-ui/react-dom/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +746 -0
- package/dist/cjs/node_modules/@floating-ui/react-dom/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/dist/cjs/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +176 -0
- package/dist/cjs/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
- package/dist/cjs/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +160 -0
- package/dist/cjs/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
- package/dist/cjs/node_modules/@internationalized/date/dist/CalendarDate.js +59 -0
- package/dist/cjs/node_modules/@internationalized/date/dist/CalendarDate.js.map +1 -1
- package/dist/cjs/node_modules/@internationalized/date/dist/conversion.js +36 -0
- package/dist/cjs/node_modules/@internationalized/date/dist/conversion.js.map +1 -1
- package/dist/cjs/node_modules/@internationalized/date/dist/manipulation.js +120 -0
- package/dist/cjs/node_modules/@internationalized/date/dist/manipulation.js.map +1 -1
- package/dist/cjs/node_modules/@internationalized/date/dist/queries.js +10 -0
- package/dist/cjs/node_modules/@internationalized/date/dist/queries.js.map +1 -1
- package/dist/cjs/node_modules/@internationalized/date/dist/string.js +11 -0
- package/dist/cjs/node_modules/@internationalized/date/dist/string.js.map +1 -1
- package/dist/cjs/node_modules/@internationalized/date/dist/utils.js +2 -1
- package/dist/cjs/node_modules/@internationalized/date/dist/utils.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/primitive/dist/index.js +14 -0
- package/dist/cjs/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-arrow/dist/index.js +48 -0
- package/dist/cjs/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-compose-refs/dist/index.js +62 -0
- package/dist/cjs/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-context/dist/index.js +85 -0
- package/dist/cjs/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +234 -0
- package/dist/cjs/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-focus-guards/dist/index.js +51 -0
- package/dist/cjs/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-focus-scope/dist/index.js +229 -0
- package/dist/cjs/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-id/dist/index.js +37 -0
- package/dist/cjs/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-popover/dist/index.js +337 -0
- package/dist/cjs/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-popper/dist/index.js +308 -0
- package/dist/cjs/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-portal/dist/index.js +39 -0
- package/dist/cjs/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-presence/dist/index.js +152 -0
- package/dist/cjs/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-primitive/dist/index.js +67 -0
- package/dist/cjs/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-slot/dist/index.js +111 -0
- package/dist/cjs/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +34 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +92 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +40 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +29 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-size/dist/index.js +62 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/calendar/calendar-header.js +37 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/calendar/calendar-header.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/calendar/calendar-range.js +336 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/calendar/calendar-range.js.map +1 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/calendar/calendar-utils.js +5 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/calendar/calendar-utils.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +3 -3
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-portal/dist/index.js +2 -2
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-presence/dist/index.js +3 -3
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-primitive/dist/index.js +3 -3
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@react-aria/calendar/dist/import.js +57 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@react-aria/calendar/dist/import.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@react-aria/utils/dist/import.js +33 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@react-aria/utils/dist/import.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@react-stately/calendar/dist/import.js +173 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@react-stately/calendar/dist/import.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-select/dist/index-baa8dc4f.esm.js +2 -2
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-select/dist/index-baa8dc4f.esm.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-transition-group/esm/Transition.js +5 -5
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-transition-group/esm/Transition.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/textarea/textarea.js +265 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/textarea/textarea.js.map +1 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/chevron-left.js +75 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/chevron-left.js.map +1 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/question-circle.js +99 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/question-circle.js.map +1 -0
- package/dist/cjs/node_modules/@stitches/react/dist/index.js +9 -0
- package/dist/cjs/node_modules/@stitches/react/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/aria-hidden/dist/es2015/index.js +140 -0
- package/dist/cjs/node_modules/aria-hidden/dist/es2015/index.js.map +1 -0
- package/dist/cjs/node_modules/get-nonce/dist/es2015/index.js +11 -0
- package/dist/cjs/node_modules/get-nonce/dist/es2015/index.js.map +1 -0
- package/dist/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +1 -1
- package/dist/cjs/node_modules/html-dom-parser/node_modules/domutils/lib/index.js +1 -1
- package/dist/cjs/node_modules/html-dom-parser/node_modules/htmlparser2/lib/index.js +1 -1
- package/dist/cjs/node_modules/react-remove-scroll/dist/es2015/Combination.js +34 -0
- package/dist/cjs/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
- package/dist/cjs/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +184 -0
- package/dist/cjs/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
- package/dist/cjs/node_modules/react-remove-scroll/dist/es2015/UI.js +60 -0
- package/dist/cjs/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
- package/dist/cjs/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +24 -0
- package/dist/cjs/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
- package/dist/cjs/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +110 -0
- package/dist/cjs/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
- package/dist/cjs/node_modules/react-remove-scroll/dist/es2015/medium.js +8 -0
- package/dist/cjs/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
- package/dist/cjs/node_modules/react-remove-scroll/dist/es2015/sidecar.js +12 -0
- package/dist/cjs/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
- package/dist/cjs/node_modules/react-remove-scroll-bar/dist/es2015/component.js +80 -0
- package/dist/cjs/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -0
- package/dist/cjs/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +16 -0
- package/dist/cjs/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -0
- package/dist/cjs/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +35 -0
- package/dist/cjs/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -0
- package/dist/cjs/node_modules/react-select/dist/index-a301f526.esm.js +2 -2
- package/dist/cjs/node_modules/react-select/dist/index-a301f526.esm.js.map +1 -1
- package/dist/cjs/node_modules/react-style-singleton/dist/es2015/component.js +22 -0
- package/dist/cjs/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -0
- package/dist/cjs/node_modules/react-style-singleton/dist/es2015/hook.js +47 -0
- package/dist/cjs/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -0
- package/dist/cjs/node_modules/react-style-singleton/dist/es2015/singleton.js +54 -0
- package/dist/cjs/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -0
- package/dist/cjs/node_modules/tslib/tslib.es6.js +60 -0
- package/dist/cjs/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/cjs/node_modules/use-callback-ref/dist/es2015/assignRef.js +27 -0
- package/dist/cjs/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -0
- package/dist/cjs/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +70 -0
- package/dist/cjs/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -0
- package/dist/cjs/node_modules/use-callback-ref/dist/es2015/useRef.js +45 -0
- package/dist/cjs/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -0
- package/dist/cjs/node_modules/use-sidecar/dist/es2015/exports.js +43 -0
- package/dist/cjs/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -0
- package/dist/cjs/node_modules/use-sidecar/dist/es2015/medium.js +80 -0
- package/dist/cjs/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -0
- package/dist/cjs/packages/frontend-templates/slitches.config.js +392 -0
- package/dist/cjs/packages/frontend-templates/slitches.config.js.map +1 -0
- package/dist/cjs/popover/popover.js +55 -0
- package/dist/cjs/popover/popover.js.map +1 -0
- package/dist/cjs/single-mapping/components/mapping.js +28 -14
- package/dist/cjs/single-mapping/components/mapping.js.map +1 -1
- package/dist/cjs/single-mapping/index.js +25 -28
- package/dist/cjs/single-mapping/index.js.map +1 -1
- package/dist/cjs/triggers/components/subcomponents.js +22 -21
- package/dist/cjs/triggers/components/subcomponents.js.map +1 -1
- package/dist/cjs/triggers/components/trigger.js +31 -32
- package/dist/cjs/triggers/components/trigger.js.map +1 -1
- package/dist/cjs/triggers/constants/index.js +5 -11
- package/dist/cjs/triggers/constants/index.js.map +1 -1
- package/dist/cjs/triggers/index.js +38 -39
- package/dist/cjs/triggers/index.js.map +1 -1
- package/dist/es/_virtual/index10.js +2 -2
- package/dist/es/_virtual/index9.js +2 -2
- package/dist/es/authentication/constants/index.js +114 -2
- package/dist/es/authentication/constants/index.js.map +1 -1
- package/dist/es/authentication/index.js +35 -31
- package/dist/es/authentication/index.js.map +1 -1
- package/dist/es/cascader-dropdown/cascader-dropdown-breadcrumb.js +116 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-breadcrumb.js.map +1 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-content.js +184 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-content.js.map +1 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-item.js +63 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-item.js.map +1 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-list.js +81 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-list.js.map +1 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-node.js +88 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-node.js.map +1 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-provider.js +170 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-provider.js.map +1 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-root-node.js +54 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-root-node.js.map +1 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-search-input.js +139 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-search-input.js.map +1 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-search-list.js +172 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-search-list.js.map +1 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-value-selector.js +478 -0
- package/dist/es/cascader-dropdown/cascader-dropdown-value-selector.js.map +1 -0
- package/dist/es/cascader-dropdown/cascader-dropdown.js +96 -0
- package/dist/es/cascader-dropdown/cascader-dropdown.js.map +1 -0
- package/dist/es/cascader-dropdown/helpers/cascader-dropdown-constants.js +27 -0
- package/dist/es/cascader-dropdown/helpers/cascader-dropdown-constants.js.map +1 -0
- package/dist/es/cascader-dropdown/helpers/cascader-dropdown-utils.js +129 -0
- package/dist/es/cascader-dropdown/helpers/cascader-dropdown-utils.js.map +1 -0
- package/dist/es/cascader-dropdown/styled/StyledItem.js +39 -0
- package/dist/es/cascader-dropdown/styled/StyledItem.js.map +1 -0
- package/dist/es/cascader-dropdown/use-value.js +42 -0
- package/dist/es/cascader-dropdown/use-value.js.map +1 -0
- package/dist/es/commons/components/NamingModal.js +78 -0
- package/dist/es/commons/components/NamingModal.js.map +1 -0
- package/dist/es/commons/constants/enhanced.js +10 -0
- package/dist/es/commons/constants/enhanced.js.map +1 -0
- package/dist/es/commons/constants/index.js +5 -2
- package/dist/es/commons/constants/index.js.map +1 -1
- package/dist/es/contact-import/components/contact-import-configure.js.map +1 -1
- package/dist/es/contact-import/components/contact-import-mapping.js +10 -7
- package/dist/es/contact-import/components/contact-import-mapping.js.map +1 -1
- package/dist/es/contact-import/index.js +4 -7
- package/dist/es/contact-import/index.js.map +1 -1
- package/dist/es/dynamic-mapping/components/mapping.js +492 -0
- package/dist/es/dynamic-mapping/components/mapping.js.map +1 -0
- package/dist/es/dynamic-mapping/index.js +1081 -0
- package/dist/es/dynamic-mapping/index.js.map +1 -0
- package/dist/es/filter/filter-pill-value-selector.js +52 -0
- package/dist/es/filter/filter-pill-value-selector.js.map +1 -0
- package/dist/es/filter/filter-pill.js +298 -0
- package/dist/es/filter/filter-pill.js.map +1 -0
- package/dist/es/index.js +3 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/integration-template/components/dashboard.js +227 -197
- package/dist/es/integration-template/components/dashboard.js.map +1 -1
- package/dist/es/integration-template/index.js +33 -14
- package/dist/es/integration-template/index.js.map +1 -1
- package/dist/es/mapping/components/custom-date-menu.js +3 -2
- package/dist/es/mapping/components/custom-date-menu.js.map +1 -1
- package/dist/es/mapping/components/custom-menu.js.map +1 -1
- package/dist/es/mapping/components/field.js +14 -6
- package/dist/es/mapping/components/field.js.map +1 -1
- package/dist/es/mapping/components/mapping.js +30 -22
- package/dist/es/mapping/components/mapping.js.map +1 -1
- package/dist/es/mapping/constants/index.js +28 -0
- package/dist/es/mapping/constants/index.js.map +1 -0
- package/dist/es/mapping/index.js +453 -24
- package/dist/es/mapping/index.js.map +1 -1
- package/dist/es/mapping/services/index.js.map +1 -1
- package/dist/es/node_modules/@floating-ui/core/dist/floating-ui.core.js +812 -0
- package/dist/es/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
- package/dist/es/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +348 -0
- package/dist/es/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -0
- package/dist/es/node_modules/@floating-ui/react-dom/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +734 -0
- package/dist/es/node_modules/@floating-ui/react-dom/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/dist/es/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +155 -0
- package/dist/es/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
- package/dist/es/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +137 -0
- package/dist/es/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
- package/dist/es/node_modules/@internationalized/date/dist/CalendarDate.js +62 -4
- package/dist/es/node_modules/@internationalized/date/dist/CalendarDate.js.map +1 -1
- package/dist/es/node_modules/@internationalized/date/dist/conversion.js +33 -2
- package/dist/es/node_modules/@internationalized/date/dist/conversion.js.map +1 -1
- package/dist/es/node_modules/@internationalized/date/dist/manipulation.js +117 -1
- package/dist/es/node_modules/@internationalized/date/dist/manipulation.js.map +1 -1
- package/dist/es/node_modules/@internationalized/date/dist/queries.js +9 -1
- package/dist/es/node_modules/@internationalized/date/dist/queries.js.map +1 -1
- package/dist/es/node_modules/@internationalized/date/dist/string.js +11 -1
- package/dist/es/node_modules/@internationalized/date/dist/string.js.map +1 -1
- package/dist/es/node_modules/@internationalized/date/dist/utils.js +2 -1
- package/dist/es/node_modules/@internationalized/date/dist/utils.js.map +1 -1
- package/dist/es/node_modules/@radix-ui/primitive/dist/index.js +12 -0
- package/dist/es/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
- package/dist/es/node_modules/@radix-ui/react-arrow/dist/index.js +26 -0
- package/dist/es/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -0
- package/dist/es/node_modules/@radix-ui/react-compose-refs/dist/index.js +40 -0
- package/dist/es/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
- package/dist/es/node_modules/@radix-ui/react-context/dist/index.js +64 -0
- package/dist/es/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/es/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +212 -0
- package/dist/es/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
- package/dist/es/node_modules/@radix-ui/react-focus-guards/dist/index.js +30 -0
- package/dist/es/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
- package/dist/es/node_modules/@radix-ui/react-focus-scope/dist/index.js +208 -0
- package/dist/es/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -0
- package/dist/es/node_modules/@radix-ui/react-id/dist/index.js +16 -0
- package/dist/es/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
- package/dist/es/node_modules/@radix-ui/react-popover/dist/index.js +302 -0
- package/dist/es/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -0
- package/dist/es/node_modules/@radix-ui/react-popper/dist/index.js +279 -0
- package/dist/es/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -0
- package/dist/es/node_modules/@radix-ui/react-portal/dist/index.js +18 -0
- package/dist/es/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
- package/dist/es/node_modules/@radix-ui/react-presence/dist/index.js +131 -0
- package/dist/es/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -0
- package/dist/es/node_modules/@radix-ui/react-primitive/dist/index.js +44 -0
- package/dist/es/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/es/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
- package/dist/es/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/es/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +13 -0
- package/dist/es/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
- package/dist/es/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +71 -0
- package/dist/es/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
- package/dist/es/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +19 -0
- package/dist/es/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
- package/dist/es/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +8 -0
- package/dist/es/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
- package/dist/es/node_modules/@radix-ui/react-use-size/dist/index.js +41 -0
- package/dist/es/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -0
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/calendar/calendar-header.js +37 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/calendar/calendar-header.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/calendar/calendar-range.js +334 -0
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/calendar/calendar-range.js.map +1 -0
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/calendar/calendar-utils.js +5 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/calendar/calendar-utils.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/dialog/dialog.js +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +2 -2
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-portal/dist/index.js +2 -2
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-presence/dist/index.js +2 -2
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-primitive/dist/index.js +2 -2
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@react-aria/calendar/dist/import.js +58 -2
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@react-aria/calendar/dist/import.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@react-aria/utils/dist/import.js +33 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@react-aria/utils/dist/import.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@react-stately/calendar/dist/import.js +175 -3
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@react-stately/calendar/dist/import.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-transition-group/esm/Transition.js +5 -5
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-transition-group/esm/Transition.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/textarea/textarea.js +263 -0
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/textarea/textarea.js.map +1 -0
- package/dist/es/node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/chevron-left.js +73 -0
- package/dist/es/node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/chevron-left.js.map +1 -0
- package/dist/es/node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/question-circle.js +97 -0
- package/dist/es/node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/question-circle.js.map +1 -0
- package/dist/es/node_modules/@stitches/react/dist/index.js +6 -0
- package/dist/es/node_modules/@stitches/react/dist/index.js.map +1 -0
- package/dist/es/node_modules/aria-hidden/dist/es2015/index.js +138 -0
- package/dist/es/node_modules/aria-hidden/dist/es2015/index.js.map +1 -0
- package/dist/es/node_modules/get-nonce/dist/es2015/index.js +9 -0
- package/dist/es/node_modules/get-nonce/dist/es2015/index.js.map +1 -0
- package/dist/es/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +1 -1
- package/dist/es/node_modules/html-dom-parser/node_modules/domutils/lib/index.js +1 -1
- package/dist/es/node_modules/html-dom-parser/node_modules/htmlparser2/lib/index.js +1 -1
- package/dist/es/node_modules/react-remove-scroll/dist/es2015/Combination.js +11 -0
- package/dist/es/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
- package/dist/es/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +161 -0
- package/dist/es/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
- package/dist/es/node_modules/react-remove-scroll/dist/es2015/UI.js +39 -0
- package/dist/es/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
- package/dist/es/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +22 -0
- package/dist/es/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
- package/dist/es/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +107 -0
- package/dist/es/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
- package/dist/es/node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
- package/dist/es/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
- package/dist/es/node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
- package/dist/es/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
- package/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/component.js +57 -0
- package/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -0
- package/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +11 -0
- package/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -0
- package/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +32 -0
- package/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -0
- package/dist/es/node_modules/react-style-singleton/dist/es2015/component.js +20 -0
- package/dist/es/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -0
- package/dist/es/node_modules/react-style-singleton/dist/es2015/hook.js +26 -0
- package/dist/es/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -0
- package/dist/es/node_modules/react-style-singleton/dist/es2015/singleton.js +52 -0
- package/dist/es/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -0
- package/dist/es/node_modules/tslib/tslib.es6.js +57 -0
- package/dist/es/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/es/node_modules/use-callback-ref/dist/es2015/assignRef.js +25 -0
- package/dist/es/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -0
- package/dist/es/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +49 -0
- package/dist/es/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -0
- package/dist/es/node_modules/use-callback-ref/dist/es2015/useRef.js +43 -0
- package/dist/es/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -0
- package/dist/es/node_modules/use-sidecar/dist/es2015/exports.js +22 -0
- package/dist/es/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -0
- package/dist/es/node_modules/use-sidecar/dist/es2015/medium.js +78 -0
- package/dist/es/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -0
- package/dist/es/packages/frontend-templates/slitches.config.js +379 -0
- package/dist/es/packages/frontend-templates/slitches.config.js.map +1 -0
- package/dist/es/popover/popover.js +52 -0
- package/dist/es/popover/popover.js.map +1 -0
- package/dist/es/single-mapping/components/mapping.js +28 -14
- package/dist/es/single-mapping/components/mapping.js.map +1 -1
- package/dist/es/single-mapping/index.js +25 -28
- package/dist/es/single-mapping/index.js.map +1 -1
- package/dist/es/triggers/components/subcomponents.js +22 -21
- package/dist/es/triggers/components/subcomponents.js.map +1 -1
- package/dist/es/triggers/components/trigger.js +31 -32
- package/dist/es/triggers/components/trigger.js.map +1 -1
- package/dist/es/triggers/constants/index.js +5 -11
- package/dist/es/triggers/constants/index.js.map +1 -1
- package/dist/es/triggers/index.js +38 -39
- package/dist/es/triggers/index.js.map +1 -1
- package/dist/index.d.ts +468 -89
- package/package.json +3 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/slot.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenRef = React.isValidElement(children) ? getElementRef(children) : void 0;\n const ref = useComposedRefs(childrenRef, forwardedRef);\n if (React.isValidElement(children)) {\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = ref;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;;;AAMA;AACA,SAAS,UAAU,CAAC,SAAS,EAAE;AAC/B,EAAE,MAAM,SAAS,mBAAmB,eAAe,CAAC,SAAS,CAAC,CAAC;AAC/D,EAAE,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK;AAC1D,IAAI,MAAM,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;AAC7C,IAAI,MAAM,aAAa,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC3D,IAAI,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AACtD,IAAI,IAAI,SAAS,EAAE;AACnB,MAAM,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC;AAClD,MAAM,MAAM,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK;AACvD,QAAQ,IAAI,KAAK,KAAK,SAAS,EAAE;AACjC,UAAU,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,OAAO,KAAK,CAAC,QAAQ,CAAC,I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CAAC;AAChE,EAAE,OAAO,GAAG,MAAM,IAAI,gBAAgB,IAAI,MAAM,IAAI,MAAM,CAAC,cAAc,CAAC;AAC1E,EAAE,IAAI,OAAO,EAAE;AACf,IAAI,OAAO,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC;AAC7B,GAAG;AACH,EAAE,OAAO,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;AAC1C;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
// packages/react/use-callback-ref/src/use-callback-ref.tsx
|
|
4
|
+
function useCallbackRef(callback) {
|
|
5
|
+
const callbackRef = React.useRef(callback);
|
|
6
|
+
React.useEffect(() => {
|
|
7
|
+
callbackRef.current = callback;
|
|
8
|
+
});
|
|
9
|
+
return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { useCallbackRef };
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"],"sourcesContent":["// packages/react/use-callback-ref/src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;AAAA;AAEA,SAAS,cAAc,CAAC,QAAQ,EAAE;AAClC,EAAE,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC7C,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;AACxB,IAAI,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;AACnC,GAAG,CAAC,CAAC;AACL,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,KAAK,WAAW,CAAC,OAAO,GAAG,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;AAC9E;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useLayoutEffect as useLayoutEffect2 } from '../../react-use-layout-effect/dist/index.js';
|
|
3
|
+
|
|
4
|
+
// src/use-controllable-state.tsx
|
|
5
|
+
var useInsertionEffect = React[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
6
|
+
function useControllableState({
|
|
7
|
+
prop,
|
|
8
|
+
defaultProp,
|
|
9
|
+
onChange = () => {
|
|
10
|
+
},
|
|
11
|
+
caller
|
|
12
|
+
}) {
|
|
13
|
+
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
|
14
|
+
defaultProp,
|
|
15
|
+
onChange
|
|
16
|
+
});
|
|
17
|
+
const isControlled = prop !== void 0;
|
|
18
|
+
const value = isControlled ? prop : uncontrolledProp;
|
|
19
|
+
{
|
|
20
|
+
const isControlledRef = React.useRef(prop !== void 0);
|
|
21
|
+
React.useEffect(() => {
|
|
22
|
+
const wasControlled = isControlledRef.current;
|
|
23
|
+
if (wasControlled !== isControlled) {
|
|
24
|
+
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
25
|
+
const to = isControlled ? "controlled" : "uncontrolled";
|
|
26
|
+
console.warn(
|
|
27
|
+
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
isControlledRef.current = isControlled;
|
|
31
|
+
}, [isControlled, caller]);
|
|
32
|
+
}
|
|
33
|
+
const setValue = React.useCallback(
|
|
34
|
+
(nextValue) => {
|
|
35
|
+
if (isControlled) {
|
|
36
|
+
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
37
|
+
if (value2 !== prop) {
|
|
38
|
+
onChangeRef.current?.(value2);
|
|
39
|
+
}
|
|
40
|
+
} else {
|
|
41
|
+
setUncontrolledProp(nextValue);
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
|
45
|
+
);
|
|
46
|
+
return [value, setValue];
|
|
47
|
+
}
|
|
48
|
+
function useUncontrolledState({
|
|
49
|
+
defaultProp,
|
|
50
|
+
onChange
|
|
51
|
+
}) {
|
|
52
|
+
const [value, setValue] = React.useState(defaultProp);
|
|
53
|
+
const prevValueRef = React.useRef(value);
|
|
54
|
+
const onChangeRef = React.useRef(onChange);
|
|
55
|
+
useInsertionEffect(() => {
|
|
56
|
+
onChangeRef.current = onChange;
|
|
57
|
+
}, [onChange]);
|
|
58
|
+
React.useEffect(() => {
|
|
59
|
+
if (prevValueRef.current !== value) {
|
|
60
|
+
onChangeRef.current?.(value);
|
|
61
|
+
prevValueRef.current = value;
|
|
62
|
+
}
|
|
63
|
+
}, [value, prevValueRef]);
|
|
64
|
+
return [value, setValue, onChangeRef];
|
|
65
|
+
}
|
|
66
|
+
function isFunction(value) {
|
|
67
|
+
return typeof value === "function";
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { useControllableState };
|
|
71
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"],"sourcesContent":["// src/use-controllable-state.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useInsertionEffect = React[\" useInsertionEffect \".trim().toString()] || useLayoutEffect;\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n },\n caller\n}) {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange\n });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n if (true) {\n const isControlledRef = React.useRef(prop !== void 0);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value2 !== prop) {\n onChangeRef.current?.(value2);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n return [value, setValue, onChangeRef];\n}\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n\n// src/use-controllable-state-reducer.tsx\nimport * as React2 from \"react\";\nimport { useEffectEvent } from \"@radix-ui/react-use-effect-event\";\nvar SYNC_STATE = Symbol(\"RADIX:SYNC_STATE\");\nfunction useControllableStateReducer(reducer, userArgs, initialArg, init) {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== void 0;\n const onChange = useEffectEvent(onChangeProp);\n if (true) {\n const isControlledRef = React2.useRef(controlledState !== void 0);\n React2.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const args = [{ ...initialArg, state: defaultProp }];\n if (init) {\n args.push(init);\n }\n const [internalState, dispatch] = React2.useReducer(\n (state2, action) => {\n if (action.type === SYNC_STATE) {\n return { ...state2, state: action.state };\n }\n const next = reducer(state2, action);\n if (isControlled && !Object.is(next.state, state2.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n const uncontrolledState = internalState.state;\n const prevValueRef = React2.useRef(uncontrolledState);\n React2.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [onChange, uncontrolledState, prevValueRef, isControlled]);\n const state = React2.useMemo(() => {\n const isControlled2 = controlledState !== void 0;\n if (isControlled2) {\n return { ...internalState, state: controlledState };\n }\n return internalState;\n }, [internalState, controlledState]);\n React2.useEffect(() => {\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n return [state, dispatch];\n}\nexport {\n useControllableState,\n useControllableStateReducer\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useLayoutEffect"],"mappings":";;;AAAA;AAGA,IAAI,kBAAkB,GAAG,KAAK,CAAC,sBAAsB,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,IAAIA,gBAAe,CAAC;AAC5F,SAAS,oBAAoB,CAAC;AAC9B,EAAE,IAAI;AACN,EAAE,WAAW;AACb,EAAE,QAAQ,GAAG,MAAM;AACnB,GAAG;AACH,EAAE,MAAM;AACR,CAAC,EAAE;AACH,EAAE,MAAM,CAAC,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ackRef } from '../../react-use-callback-ref/dist/index.js';
|
|
3
|
+
|
|
4
|
+
// packages/react/use-escape-keydown/src/use-escape-keydown.tsx
|
|
5
|
+
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
6
|
+
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
7
|
+
React.useEffect(() => {
|
|
8
|
+
const handleKeyDown = (event) => {
|
|
9
|
+
if (event.key === "Escape") {
|
|
10
|
+
onEscapeKeyDown(event);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
|
|
14
|
+
return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
|
|
15
|
+
}, [onEscapeKeyDown, ownerDocument]);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { useEscapeKeydown };
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs"],"sourcesContent":["// packages/react/use-escape-keydown/src/use-escape-keydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;;AAAA;AAGA,SAAS,gBAAgB,CAAC,mBAAmB,EAAE,aAAa,GAAG,UAAU,EAAE,QAAQ,EAAE;AACrF,EAAE,MAAM,eAAe,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC;AAC9D,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;AACxB,IAAI,MAAM,aAAa,GAAG,CAAC,KAAK,KAAK;AACrC,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,EAAE;AAClC,QAAQ,eAAe,CAAC,KAAK,CAAC,CAAC;AAC/B,OAAO;AACP,KAAK,CAAC;AACN,IAAI,aAAa,CAAC,gBAAgB,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AAChF,IAAI,OAAO,MAAM,aAAa,CAAC,mBAAmB,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AAChG,GAAG,EAAE,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC,CAAC;AACvC;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
// packages/react/use-layout-effect/src/use-layout-effect.tsx
|
|
4
|
+
var useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export { useLayoutEffect2 as useLayoutEffect };
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"],"sourcesContent":["// packages/react/use-layout-effect/src/use-layout-effect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;AAAA;AAEG,IAAC,gBAAgB,GAAG,UAAU,EAAE,QAAQ,GAAG,KAAK,CAAC,eAAe,GAAG,MAAM;AAC5E;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useLayoutEffect as useLayoutEffect2 } from '../../react-use-layout-effect/dist/index.js';
|
|
3
|
+
|
|
4
|
+
// packages/react/use-size/src/use-size.tsx
|
|
5
|
+
function useSize(element) {
|
|
6
|
+
const [size, setSize] = React.useState(void 0);
|
|
7
|
+
useLayoutEffect2(() => {
|
|
8
|
+
if (element) {
|
|
9
|
+
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
10
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
11
|
+
if (!Array.isArray(entries)) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
if (!entries.length) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const entry = entries[0];
|
|
18
|
+
let width;
|
|
19
|
+
let height;
|
|
20
|
+
if ("borderBoxSize" in entry) {
|
|
21
|
+
const borderSizeEntry = entry["borderBoxSize"];
|
|
22
|
+
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
23
|
+
width = borderSize["inlineSize"];
|
|
24
|
+
height = borderSize["blockSize"];
|
|
25
|
+
} else {
|
|
26
|
+
width = element.offsetWidth;
|
|
27
|
+
height = element.offsetHeight;
|
|
28
|
+
}
|
|
29
|
+
setSize({ width, height });
|
|
30
|
+
});
|
|
31
|
+
resizeObserver.observe(element, { box: "border-box" });
|
|
32
|
+
return () => resizeObserver.unobserve(element);
|
|
33
|
+
} else {
|
|
34
|
+
setSize(void 0);
|
|
35
|
+
}
|
|
36
|
+
}, [element]);
|
|
37
|
+
return size;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { useSize };
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-use-size/dist/index.mjs"],"sourcesContent":["// packages/react/use-size/src/use-size.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nfunction useSize(element) {\n const [size, setSize] = React.useState(void 0);\n useLayoutEffect(() => {\n if (element) {\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) {\n return;\n }\n if (!entries.length) {\n return;\n }\n const entry = entries[0];\n let width;\n let height;\n if (\"borderBoxSize\" in entry) {\n const borderSizeEntry = entry[\"borderBoxSize\"];\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width = borderSize[\"inlineSize\"];\n height = borderSize[\"blockSize\"];\n } else {\n width = element.offsetWidth;\n height = element.offsetHeight;\n }\n setSize({ width, height });\n });\n resizeObserver.observe(element, { box: \"border-box\" });\n return () => resizeObserver.unobserve(element);\n } else {\n setSize(void 0);\n }\n }, [element]);\n return size;\n}\nexport {\n useSize\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useLayoutEffect"],"mappings":";;;AAAA;AAGA,SAAS,OAAO,CAAC,OAAO,EAAE;AAC1B,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACjD,EAAEA,gBAAe,CAAC,MAAM;AACxB,IAAI,IAAI,OAAO,EAAE;AACjB,MAAM,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;AAC5E,MAAM,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,CAAC,OAAO,KAAK;AAC7D,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;AACrC,UAAU,OAAO;AACjB,SAAS;AACT,QAAQ,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;AAC7B,UAAU,OAAO;AACjB,SAAS;AACT,QAAQ,MAAM,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AACjC,QAAQ,IAAI,KAAK,CAAC;AAClB,QAAQ,IAAI,MAAM,CAAC;AACnB,QAAQ,IAAI,eAAe,IAAI,KAAK,EAAE;AACtC,UAAU,MAAM,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC;AACzD,UAAU,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC;AACnG,UAAU,KAAK,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;AAC3C,UAAU,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;AAC3C,SAAS,MAAM;AACf,UAAU,KAAK,GAAG,OAAO,CAAC,WAAW,CAAC;AACtC,UAAU,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;AACxC,SAAS;AACT,QAAQ,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;AACnC,OAAO,CAAC,CAAC;AACT,MAAM,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC,CAAC;AAC7D,MAAM,OAAO,MAAM,cAAc,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AACrD,KAAK,MAAM;AACX,MAAM,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;AACtB,KAAK;AACL,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;AAChB,EAAE,OAAO,IAAI,CAAC;AACd;;;;","x_google_ignoreList":[0]}
|
|
@@ -116,6 +116,42 @@ const CalendarTitle = ({
|
|
|
116
116
|
)
|
|
117
117
|
] });
|
|
118
118
|
};
|
|
119
|
+
const RangeCalendarTitle = ({
|
|
120
|
+
value,
|
|
121
|
+
timezone,
|
|
122
|
+
setCurrentCalendarView
|
|
123
|
+
}) => {
|
|
124
|
+
const calendarContext = useCalendarContext();
|
|
125
|
+
const formatMonth = $896ba0a80a8f4d36$export$85fd5fdf27bacc79({
|
|
126
|
+
month: "long"
|
|
127
|
+
});
|
|
128
|
+
return /* @__PURE__ */ jsxs(Flex, { gap: "$2", children: [
|
|
129
|
+
/* @__PURE__ */ jsx(
|
|
130
|
+
Button,
|
|
131
|
+
{
|
|
132
|
+
color: "default",
|
|
133
|
+
variant: "solid",
|
|
134
|
+
size: calendarContext.size,
|
|
135
|
+
onClick: () => {
|
|
136
|
+
setCurrentCalendarView(CALENDAR_VIEW.YEAR);
|
|
137
|
+
},
|
|
138
|
+
children: value.year
|
|
139
|
+
}
|
|
140
|
+
),
|
|
141
|
+
/* @__PURE__ */ jsx(
|
|
142
|
+
Button,
|
|
143
|
+
{
|
|
144
|
+
color: "default",
|
|
145
|
+
variant: "solid",
|
|
146
|
+
size: calendarContext.size,
|
|
147
|
+
onClick: () => {
|
|
148
|
+
setCurrentCalendarView(CALENDAR_VIEW.MONTH);
|
|
149
|
+
},
|
|
150
|
+
children: formatMonth.format(value.toDate(timezone))
|
|
151
|
+
}
|
|
152
|
+
)
|
|
153
|
+
] });
|
|
154
|
+
};
|
|
119
155
|
|
|
120
|
-
export { CalendarHeader, CalendarNavigationButton, CalendarTitle };
|
|
156
|
+
export { CalendarHeader, CalendarNavigationButton, CalendarTitle, RangeCalendarTitle };
|
|
121
157
|
//# sourceMappingURL=calendar-header.js.map
|
package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/calendar/calendar-header.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-header.js","sources":["../../../../../../../../../../node_modules/@sparrowengg/twigs-react/dist/es/calendar/calendar-header.js"],"sourcesContent":["import { jsx, jsxs } from 'react/jsx-runtime';\nimport { Button } from '../button/button.js';\nimport { IconButton } from '../button/icon-button.js';\nimport '../button/split-button.js';\nimport { Flex } from '../flex/flex.js';\nimport { styled } from '../stitches.config.js';\nimport { CALENDAR_VIEW } from './calendar.js';\nimport { useCalendarContext } from './calendar-utils.js';\nimport { useDateFormatter as $896ba0a80a8f4d36$export$85fd5fdf27bacc79 } from '../node_modules/@react-aria/i18n/dist/real-module.js';\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nconst CalendarNavigationButton = (_a) => {\n var _b = _a, {\n icon,\n onPress,\n isDisabled\n } = _b, rest = __objRest(_b, [\n \"icon\",\n \"onPress\",\n \"isDisabled\"\n ]);\n const calendarContext = useCalendarContext();\n return /* @__PURE__ */ jsx(\n IconButton,\n __spreadProps(__spreadValues({\n color: \"secondary\",\n variant: \"ghost\"\n }, rest), {\n onClick: onPress,\n icon,\n size: calendarContext.size,\n type: \"button\",\n disabled: isDisabled\n })\n );\n};\nconst CalendarHeader = styled(Flex, {\n alignItems: \"center\",\n justifyContent: \"space-between\",\n height: \"$16\",\n variants: {\n calendarSize: {\n lg: {\n padding: \"$6 $8\"\n },\n md: {\n padding: \"$6 $8\"\n }\n }\n },\n defaultVariants: {\n calendarSize: \"lg\"\n }\n});\nconst CalendarTitle = ({\n value,\n timezone,\n setCurrentCalendarView\n}) => {\n const calendarContext = useCalendarContext();\n const formatMonth = $896ba0a80a8f4d36$export$85fd5fdf27bacc79({\n month: \"long\"\n });\n return /* @__PURE__ */ jsxs(Flex, { gap: \"$2\", children: [\n /* @__PURE__ */ jsx(\n Button,\n {\n color: \"default\",\n size: calendarContext.size,\n onClick: () => {\n setCurrentCalendarView(CALENDAR_VIEW.YEAR);\n },\n children: value.year\n }\n ),\n /* @__PURE__ */ jsx(\n Button,\n {\n color: \"default\",\n size: calendarContext.size,\n onClick: () => {\n setCurrentCalendarView(CALENDAR_VIEW.MONTH);\n },\n children: formatMonth.format(value.toDate(timezone))\n }\n )\n ] });\n};\nconst RangeCalendarTitle = ({\n value,\n timezone,\n setCurrentCalendarView\n}) => {\n const calendarContext = useCalendarContext();\n const formatMonth = $896ba0a80a8f4d36$export$85fd5fdf27bacc79({\n month: \"long\"\n });\n return /* @__PURE__ */ jsxs(Flex, { gap: \"$2\", children: [\n /* @__PURE__ */ jsx(\n Button,\n {\n color: \"default\",\n variant: \"solid\",\n size: calendarContext.size,\n onClick: () => {\n setCurrentCalendarView(CALENDAR_VIEW.YEAR);\n },\n children: value.year\n }\n ),\n /* @__PURE__ */ jsx(\n Button,\n {\n color: \"default\",\n variant: \"solid\",\n size: calendarContext.size,\n onClick: () => {\n setCurrentCalendarView(CALENDAR_VIEW.MONTH);\n },\n children: formatMonth.format(value.toDate(timezone))\n }\n )\n ] });\n};\n\nexport { CalendarHeader, CalendarNavigationButton, CalendarTitle, RangeCalendarTitle };\n//# sourceMappingURL=calendar-header.js.map\n"],"names":[],"mappings":";;;;;;;;;;AAUA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAg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AM,MAAM;AACZ,MAAM;AACN,QAAQ,KAAK,EAAE,SAAS;AACxB,QAAQ,IAAI,EAAE,eAAe,CAAC,IAAI;AAClC,QAAQ,OAAO,EAAE,MAAM;AACvB,UAAU,sBAAsB,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AACtD,SAAS;AACT,QAAQ,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC5D,OAAO;AACP,KAAK;AACL,GAAG,EAAE,CAAC,CAAC;AACP;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"calendar-header.js","sources":["../../../../../../../../../../node_modules/@sparrowengg/twigs-react/dist/es/calendar/calendar-header.js"],"sourcesContent":["import { jsx, jsxs } from 'react/jsx-runtime';\nimport { Button } from '../button/button.js';\nimport { IconButton } from '../button/icon-button.js';\nimport '../button/split-button.js';\nimport { Flex } from '../flex/flex.js';\nimport { styled } from '../stitches.config.js';\nimport { CALENDAR_VIEW } from './calendar.js';\nimport { useCalendarContext } from './calendar-utils.js';\nimport { useDateFormatter as $896ba0a80a8f4d36$export$85fd5fdf27bacc79 } from '../node_modules/@react-aria/i18n/dist/real-module.js';\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nconst CalendarNavigationButton = (_a) => {\n var _b = _a, {\n icon,\n onPress,\n isDisabled\n } = _b, rest = __objRest(_b, [\n \"icon\",\n \"onPress\",\n \"isDisabled\"\n ]);\n const calendarContext = useCalendarContext();\n return /* @__PURE__ */ jsx(\n IconButton,\n __spreadProps(__spreadValues({\n color: \"secondary\",\n variant: \"ghost\"\n }, rest), {\n onClick: onPress,\n icon,\n size: calendarContext.size,\n type: \"button\",\n disabled: isDisabled\n })\n );\n};\nconst CalendarHeader = styled(Flex, {\n alignItems: \"center\",\n justifyContent: \"space-between\",\n height: \"$16\",\n variants: {\n calendarSize: {\n lg: {\n padding: \"$6 $8\"\n },\n md: {\n padding: \"$6 $8\"\n }\n }\n },\n defaultVariants: {\n calendarSize: \"lg\"\n }\n});\nconst CalendarTitle = ({\n value,\n timezone,\n setCurrentCalendarView\n}) => {\n const calendarContext = useCalendarContext();\n const formatMonth = $896ba0a80a8f4d36$export$85fd5fdf27bacc79({\n month: \"long\"\n });\n return /* @__PURE__ */ jsxs(Flex, { gap: \"$2\", children: [\n /* @__PURE__ */ jsx(\n Button,\n {\n color: \"default\",\n size: calendarContext.size,\n onClick: () => {\n setCurrentCalendarView(CALENDAR_VIEW.YEAR);\n },\n children: value.year\n }\n ),\n /* @__PURE__ */ jsx(\n Button,\n {\n color: \"default\",\n size: calendarContext.size,\n onClick: () => {\n setCurrentCalendarView(CALENDAR_VIEW.MONTH);\n },\n children: formatMonth.format(value.toDate(timezone))\n }\n )\n ] });\n};\nconst RangeCalendarTitle = ({\n value,\n timezone,\n setCurrentCalendarView\n}) => {\n const calendarContext = useCalendarContext();\n const formatMonth = $896ba0a80a8f4d36$export$85fd5fdf27bacc79({\n month: \"long\"\n });\n return /* @__PURE__ */ jsxs(Flex, { gap: \"$2\", children: [\n /* @__PURE__ */ jsx(\n Button,\n {\n color: \"default\",\n variant: \"solid\",\n size: calendarContext.size,\n onClick: () => {\n setCurrentCalendarView(CALENDAR_VIEW.YEAR);\n },\n children: value.year\n }\n ),\n /* @__PURE__ */ jsx(\n Button,\n {\n color: \"default\",\n variant: \"solid\",\n size: calendarContext.size,\n onClick: () => {\n setCurrentCalendarView(CALENDAR_VIEW.MONTH);\n },\n children: formatMonth.format(value.toDate(timezone))\n }\n )\n ] });\n};\n\nexport { CalendarHeader, CalendarNavigationButton, CalendarTitle, RangeCalendarTitle };\n//# sourceMappingURL=calendar-header.js.map\n"],"names":[],"mappings":";;;;;;;;;;AAUA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACzC,IAAI,iBAAiB,GAAG,MAAM,CAAC,yBAAyB,CAAC;AACzD,IAAI,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACvD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;AACnD,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC;AACzD,IAAI,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,KAAK,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAChK,IAAI,cAAc,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK;AAC/B,EAAE,KAAK,IAAI,IA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AG,CAAC,CAAC;AACL,EAAE,uBAAuB,IAAI,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE;AAC3D,oBAAoB,GAAG;AACvB,MAAM,MAAM;AACZ,MAAM;AACN,QAAQ,KAAK,EAAE,SAAS;AACxB,QAAQ,OAAO,EAAE,OAAO;AACxB,QAAQ,IAAI,EAAE,eAAe,CAAC,IAAI;AAClC,QAAQ,OAAO,EAAE,MAAM;AACvB,UAAU,sBAAsB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;AACrD,SAAS;AACT,QAAQ,QAAQ,EAAE,KAAK,CAAC,IAAI;AAC5B,OAAO;AACP,KAAK;AACL,oBAAoB,GAAG;AACvB,MAAM,MAAM;AACZ,MAAM;AACN,QAAQ,KAAK,EAAE,SAAS;AACxB,QAAQ,OAAO,EAAE,OAAO;AACxB,QAAQ,IAAI,EAAE,eAAe,CAAC,IAAI;AAClC,QAAQ,OAAO,EAAE,MAAM;AACvB,UAAU,sBAAsB,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AACtD,SAAS;AACT,QAAQ,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC5D,OAAO;AACP,KAAK;AACL,GAAG,EAAE,CAAC,CAAC;AACP;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { ZonedDateTime as $35ea8db9cb2ccb90$export$d3b7288e7994edea, CalendarDateTime as $35ea8db9cb2ccb90$export$ca871e8dbb80966f, createCalendar as $64244302c3013299$export$dd0bbc9b26defe37 } from '../node_modules/@internationalized/date/dist/import.js';
|
|
3
|
+
import { prefixClassName } from '../utils/prefix-class-name.js';
|
|
4
|
+
import { useEffect, useRef, useMemo, useState } from 'react';
|
|
5
|
+
import { Box } from '../box/box.js';
|
|
6
|
+
import { Button } from '../button/button.js';
|
|
7
|
+
import '../button/icon-button.js';
|
|
8
|
+
import '../button/split-button.js';
|
|
9
|
+
import { Flex } from '../flex/flex.js';
|
|
10
|
+
import { Text } from '../text/text.js';
|
|
11
|
+
import { CALENDAR_VIEW } from './calendar.js';
|
|
12
|
+
import { CalendarGrid } from './calendar-grid.js';
|
|
13
|
+
import { CalendarNavigationButton, RangeCalendarTitle } from './calendar-header.js';
|
|
14
|
+
import { CalendarMonthsView } from './calendar-months-view.js';
|
|
15
|
+
import { CalendarContext, useCalendarContext, CALENDAR_SIZE_TO_WIDTH, CALENDAR_SIZE_TO_DAY_BTN_SIZE } from './calendar-utils.js';
|
|
16
|
+
import { CalendarYearsView } from './calendar-years-view.js';
|
|
17
|
+
import { useRangeCalendarState as $9a36b6ba2fb1a7c5$export$9a987164d97ecc90 } from '../node_modules/@react-stately/calendar/dist/import.js';
|
|
18
|
+
import { useRangeCalendar as $46a4342aab3d8076$export$87e0539f600c24e5 } from '../node_modules/@react-aria/calendar/dist/import.js';
|
|
19
|
+
import { ChevronLeftIcon } from '../packages/react-icons/dist/es/icons/chevron-left.js';
|
|
20
|
+
import { ChevronRightIcon } from '../packages/react-icons/dist/es/icons/chevron-right.js';
|
|
21
|
+
import { useLocale as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, useDateFormatter as $896ba0a80a8f4d36$export$85fd5fdf27bacc79 } from '../node_modules/@react-aria/i18n/dist/real-module.js';
|
|
22
|
+
|
|
23
|
+
var __defProp = Object.defineProperty;
|
|
24
|
+
var __defProps = Object.defineProperties;
|
|
25
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
26
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
27
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
28
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
29
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
30
|
+
var __spreadValues = (a, b) => {
|
|
31
|
+
for (var prop in b || (b = {}))
|
|
32
|
+
if (__hasOwnProp.call(b, prop))
|
|
33
|
+
__defNormalProp(a, prop, b[prop]);
|
|
34
|
+
if (__getOwnPropSymbols)
|
|
35
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
36
|
+
if (__propIsEnum.call(b, prop))
|
|
37
|
+
__defNormalProp(a, prop, b[prop]);
|
|
38
|
+
}
|
|
39
|
+
return a;
|
|
40
|
+
};
|
|
41
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
42
|
+
var __objRest = (source, exclude) => {
|
|
43
|
+
var target = {};
|
|
44
|
+
for (var prop in source)
|
|
45
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
46
|
+
target[prop] = source[prop];
|
|
47
|
+
if (source != null && __getOwnPropSymbols)
|
|
48
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
49
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
50
|
+
target[prop] = source[prop];
|
|
51
|
+
}
|
|
52
|
+
return target;
|
|
53
|
+
};
|
|
54
|
+
const CalendarRange = (_a) => {
|
|
55
|
+
var _b = _a, {
|
|
56
|
+
size = "lg",
|
|
57
|
+
showFooter = true,
|
|
58
|
+
footerActionText = "Apply",
|
|
59
|
+
containerCSS,
|
|
60
|
+
footerAction,
|
|
61
|
+
onDaySelect,
|
|
62
|
+
onMonthSelect,
|
|
63
|
+
onYearSelect,
|
|
64
|
+
compact = false
|
|
65
|
+
} = _b, props = __objRest(_b, [
|
|
66
|
+
"size",
|
|
67
|
+
"showFooter",
|
|
68
|
+
"footerActionText",
|
|
69
|
+
"containerCSS",
|
|
70
|
+
"footerAction",
|
|
71
|
+
"onDaySelect",
|
|
72
|
+
"onMonthSelect",
|
|
73
|
+
"onYearSelect",
|
|
74
|
+
"compact"
|
|
75
|
+
]);
|
|
76
|
+
var _a2, _b2;
|
|
77
|
+
const { locale } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
|
|
78
|
+
const state = $9a36b6ba2fb1a7c5$export$9a987164d97ecc90(__spreadProps(__spreadValues({}, props), {
|
|
79
|
+
visibleDuration: compact ? { months: 1 } : { months: 2 },
|
|
80
|
+
pageBehavior: compact ? "single" : void 0,
|
|
81
|
+
locale,
|
|
82
|
+
createCalendar: $64244302c3013299$export$dd0bbc9b26defe37
|
|
83
|
+
}));
|
|
84
|
+
const dateType = state.anchorDate ? "start" : "end";
|
|
85
|
+
useEffect(() => {
|
|
86
|
+
if (props.showTimePicker && !(props.value instanceof $35ea8db9cb2ccb90$export$d3b7288e7994edea || props.value instanceof $35ea8db9cb2ccb90$export$ca871e8dbb80966f)) {
|
|
87
|
+
console.warn(
|
|
88
|
+
// eslint-disable-next-line max-len
|
|
89
|
+
"The value prop must be an instance of ZonedDateTime or CalendarDateTime when showTimePicker is true. Use parseDateTime or parseZonedDateTime from @internationalized/date. The value type will be changed to CalendarDateTime"
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
if (props.showTimezonePicker && !(props.value instanceof $35ea8db9cb2ccb90$export$d3b7288e7994edea)) {
|
|
93
|
+
console.warn(
|
|
94
|
+
"The value prop must be an instance of ZonedDateTime when showTimezonePicker is true. The value type will be changed to ZonedDateTime"
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
}, [props.showTimePicker]);
|
|
98
|
+
const ref = useRef(null);
|
|
99
|
+
const { calendarProps, prevButtonProps, nextButtonProps } = $46a4342aab3d8076$export$87e0539f600c24e5(
|
|
100
|
+
props,
|
|
101
|
+
state,
|
|
102
|
+
ref
|
|
103
|
+
);
|
|
104
|
+
const contextProviderValue = useMemo(() => {
|
|
105
|
+
return {
|
|
106
|
+
size
|
|
107
|
+
};
|
|
108
|
+
}, [size]);
|
|
109
|
+
const formatter = $896ba0a80a8f4d36$export$85fd5fdf27bacc79({
|
|
110
|
+
month: "short",
|
|
111
|
+
day: "numeric",
|
|
112
|
+
year: "numeric"
|
|
113
|
+
});
|
|
114
|
+
return /* @__PURE__ */ jsx(CalendarContext.Provider, { value: contextProviderValue, children: /* @__PURE__ */ jsxs(
|
|
115
|
+
Box,
|
|
116
|
+
{
|
|
117
|
+
css: __spreadValues({
|
|
118
|
+
borderRadius: "$2xl",
|
|
119
|
+
border: "1px solid",
|
|
120
|
+
borderColor: "$neutral300",
|
|
121
|
+
paddingTop: "$6",
|
|
122
|
+
maxWidth: "max-content"
|
|
123
|
+
}, containerCSS),
|
|
124
|
+
children: [
|
|
125
|
+
compact ? /* @__PURE__ */ jsx(Flex, __spreadProps(__spreadValues({}, calendarProps), { ref, css: { overflow: "auto" }, children: /* @__PURE__ */ jsx(
|
|
126
|
+
CalendarSingleSection,
|
|
127
|
+
{
|
|
128
|
+
state,
|
|
129
|
+
navigationButtonProps: { prev: prevButtonProps, next: nextButtonProps },
|
|
130
|
+
sectionName: "end",
|
|
131
|
+
onDaySelect: (date) => onDaySelect == null ? void 0 : onDaySelect(date, dateType),
|
|
132
|
+
onMonthSelect: (date) => onMonthSelect == null ? void 0 : onMonthSelect(date, dateType),
|
|
133
|
+
onYearSelect: (date) => onYearSelect == null ? void 0 : onYearSelect(date, dateType)
|
|
134
|
+
}
|
|
135
|
+
) })) : /* @__PURE__ */ jsxs(Flex, __spreadProps(__spreadValues({}, calendarProps), { gap: "$8", ref, css: { overflow: "auto" }, children: [
|
|
136
|
+
/* @__PURE__ */ jsx(
|
|
137
|
+
CalendarSingleSection,
|
|
138
|
+
{
|
|
139
|
+
state,
|
|
140
|
+
navigationButtonProps: prevButtonProps,
|
|
141
|
+
sectionName: "start",
|
|
142
|
+
onDaySelect: (date) => onDaySelect == null ? void 0 : onDaySelect(date, dateType),
|
|
143
|
+
onMonthSelect: (date) => onMonthSelect == null ? void 0 : onMonthSelect(date, dateType),
|
|
144
|
+
onYearSelect: (date) => onYearSelect == null ? void 0 : onYearSelect(date, dateType)
|
|
145
|
+
}
|
|
146
|
+
),
|
|
147
|
+
/* @__PURE__ */ jsx(
|
|
148
|
+
CalendarSingleSection,
|
|
149
|
+
{
|
|
150
|
+
state,
|
|
151
|
+
calendarOffset: { months: 1 },
|
|
152
|
+
sectionName: "end",
|
|
153
|
+
navigationButtonProps: nextButtonProps,
|
|
154
|
+
onDaySelect: (date) => onDaySelect == null ? void 0 : onDaySelect(date, dateType),
|
|
155
|
+
onMonthSelect: (date) => onMonthSelect == null ? void 0 : onMonthSelect(date, dateType),
|
|
156
|
+
onYearSelect: (date) => onYearSelect == null ? void 0 : onYearSelect(date, dateType)
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
] })),
|
|
160
|
+
showFooter && /* @__PURE__ */ jsx(Fragment, { children: props.renderFooter ? props.renderFooter(state) : /* @__PURE__ */ jsxs(
|
|
161
|
+
Flex,
|
|
162
|
+
{
|
|
163
|
+
alignItems: "center",
|
|
164
|
+
justifyContent: "space-between",
|
|
165
|
+
css: {
|
|
166
|
+
borderTop: "1px solid",
|
|
167
|
+
borderColor: "$neutral200",
|
|
168
|
+
padding: "$6 $8"
|
|
169
|
+
},
|
|
170
|
+
children: [
|
|
171
|
+
/* @__PURE__ */ jsx(
|
|
172
|
+
Text,
|
|
173
|
+
{
|
|
174
|
+
weight: "bold",
|
|
175
|
+
css: {
|
|
176
|
+
color: "$neutral700"
|
|
177
|
+
},
|
|
178
|
+
children: ((_a2 = state.value) == null ? void 0 : _a2.start) && ((_b2 = state.value) == null ? void 0 : _b2.end) && formatter.formatRange(
|
|
179
|
+
state.value.start.toDate(state.timeZone),
|
|
180
|
+
state.value.end.toDate(state.timeZone)
|
|
181
|
+
)
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
/* @__PURE__ */ jsx(
|
|
185
|
+
Button,
|
|
186
|
+
{
|
|
187
|
+
size: "lg",
|
|
188
|
+
color: "primary",
|
|
189
|
+
onClick: () => {
|
|
190
|
+
if (footerAction)
|
|
191
|
+
footerAction(state);
|
|
192
|
+
},
|
|
193
|
+
children: footerActionText
|
|
194
|
+
}
|
|
195
|
+
)
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
) })
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
) });
|
|
202
|
+
};
|
|
203
|
+
const CalendarSingleSection = ({
|
|
204
|
+
navigationButtonProps,
|
|
205
|
+
calendarOffset,
|
|
206
|
+
sectionName,
|
|
207
|
+
state,
|
|
208
|
+
onDaySelect,
|
|
209
|
+
onYearSelect,
|
|
210
|
+
onMonthSelect
|
|
211
|
+
}) => {
|
|
212
|
+
const [currentCalendarView, setCurrentCalendarView] = useState(CALENDAR_VIEW.GRID);
|
|
213
|
+
const calendarContext = useCalendarContext();
|
|
214
|
+
const compact = "prev" in navigationButtonProps && "next" in navigationButtonProps;
|
|
215
|
+
return /* @__PURE__ */ jsxs(
|
|
216
|
+
Box,
|
|
217
|
+
{
|
|
218
|
+
className: prefixClassName("calendar-range-section"),
|
|
219
|
+
css: {
|
|
220
|
+
flexShrink: 1,
|
|
221
|
+
flexGrow: 1,
|
|
222
|
+
flexBasis: 0,
|
|
223
|
+
maxWidth: CALENDAR_SIZE_TO_WIDTH[calendarContext.size]
|
|
224
|
+
},
|
|
225
|
+
children: [
|
|
226
|
+
currentCalendarView === CALENDAR_VIEW.GRID && /* @__PURE__ */ jsxs(
|
|
227
|
+
Flex,
|
|
228
|
+
{
|
|
229
|
+
flexDirection: "column",
|
|
230
|
+
alignItems: "center",
|
|
231
|
+
css: {
|
|
232
|
+
maxWidth: "max-content"
|
|
233
|
+
},
|
|
234
|
+
children: [
|
|
235
|
+
/* @__PURE__ */ jsx(
|
|
236
|
+
Flex,
|
|
237
|
+
{
|
|
238
|
+
alignItems: "center",
|
|
239
|
+
justifyContent: "space-between",
|
|
240
|
+
css: {
|
|
241
|
+
marginBottom: "$12",
|
|
242
|
+
padding: "0 $8",
|
|
243
|
+
width: "100%"
|
|
244
|
+
},
|
|
245
|
+
children: compact ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
246
|
+
/* @__PURE__ */ jsx(
|
|
247
|
+
CalendarNavigationButton,
|
|
248
|
+
__spreadProps(__spreadValues({}, navigationButtonProps.prev), {
|
|
249
|
+
icon: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
|
|
250
|
+
})
|
|
251
|
+
),
|
|
252
|
+
/* @__PURE__ */ jsx(
|
|
253
|
+
RangeCalendarTitle,
|
|
254
|
+
{
|
|
255
|
+
timezone: state.timeZone,
|
|
256
|
+
value: state.visibleRange[sectionName],
|
|
257
|
+
setCurrentCalendarView
|
|
258
|
+
}
|
|
259
|
+
),
|
|
260
|
+
/* @__PURE__ */ jsx(
|
|
261
|
+
CalendarNavigationButton,
|
|
262
|
+
__spreadProps(__spreadValues({}, navigationButtonProps.next), {
|
|
263
|
+
icon: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
264
|
+
})
|
|
265
|
+
)
|
|
266
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
267
|
+
sectionName === "end" && /* @__PURE__ */ jsx(Box, {}),
|
|
268
|
+
sectionName === "start" && /* @__PURE__ */ jsx(
|
|
269
|
+
CalendarNavigationButton,
|
|
270
|
+
__spreadProps(__spreadValues({}, navigationButtonProps), {
|
|
271
|
+
icon: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
|
|
272
|
+
})
|
|
273
|
+
),
|
|
274
|
+
/* @__PURE__ */ jsx(
|
|
275
|
+
RangeCalendarTitle,
|
|
276
|
+
{
|
|
277
|
+
timezone: state.timeZone,
|
|
278
|
+
value: state.visibleRange[sectionName],
|
|
279
|
+
setCurrentCalendarView
|
|
280
|
+
}
|
|
281
|
+
),
|
|
282
|
+
sectionName === "end" && /* @__PURE__ */ jsx(
|
|
283
|
+
CalendarNavigationButton,
|
|
284
|
+
__spreadProps(__spreadValues({}, navigationButtonProps), {
|
|
285
|
+
icon: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
286
|
+
})
|
|
287
|
+
),
|
|
288
|
+
sectionName === "start" && /* @__PURE__ */ jsx(Box, {})
|
|
289
|
+
] })
|
|
290
|
+
}
|
|
291
|
+
),
|
|
292
|
+
/* @__PURE__ */ jsx(
|
|
293
|
+
CalendarGrid,
|
|
294
|
+
__spreadProps(__spreadValues({
|
|
295
|
+
state
|
|
296
|
+
}, calendarOffset && {
|
|
297
|
+
offset: calendarOffset
|
|
298
|
+
}), {
|
|
299
|
+
containerCSS: {
|
|
300
|
+
maxWidth: `calc(7 * ${CALENDAR_SIZE_TO_DAY_BTN_SIZE[calendarContext.size]})`,
|
|
301
|
+
boxSizing: "content-box",
|
|
302
|
+
padding: "0 $8 0 $8"
|
|
303
|
+
},
|
|
304
|
+
onDaySelect
|
|
305
|
+
})
|
|
306
|
+
)
|
|
307
|
+
]
|
|
308
|
+
}
|
|
309
|
+
),
|
|
310
|
+
currentCalendarView === CALENDAR_VIEW.MONTH && /* @__PURE__ */ jsx(
|
|
311
|
+
CalendarMonthsView,
|
|
312
|
+
{
|
|
313
|
+
state,
|
|
314
|
+
range: sectionName,
|
|
315
|
+
setCurrentCalendarView,
|
|
316
|
+
onMonthSelect
|
|
317
|
+
}
|
|
318
|
+
),
|
|
319
|
+
currentCalendarView === CALENDAR_VIEW.YEAR && /* @__PURE__ */ jsx(
|
|
320
|
+
CalendarYearsView,
|
|
321
|
+
{
|
|
322
|
+
state,
|
|
323
|
+
range: sectionName,
|
|
324
|
+
setCurrentCalendarView,
|
|
325
|
+
onYearSelect
|
|
326
|
+
}
|
|
327
|
+
)
|
|
328
|
+
]
|
|
329
|
+
}
|
|
330
|
+
);
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
export { CalendarRange };
|
|
334
|
+
//# sourceMappingURL=calendar-range.js.map
|