@sparrowengg/integrations-templates-frontend 1.2.5 → 1.2.6
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/index7.js +2 -2
- package/dist/cjs/authentication/constants/index.js +10 -0
- package/dist/cjs/authentication/constants/index.js.map +1 -0
- package/dist/cjs/authentication/index.js +40 -47
- package/dist/cjs/authentication/index.js.map +1 -1
- package/dist/cjs/commons/components/theme-wrapper.js +24 -0
- package/dist/cjs/commons/components/theme-wrapper.js.map +1 -0
- package/dist/cjs/contact-import/components/contact-import-mapping.js +6 -4
- package/dist/cjs/contact-import/components/contact-import-mapping.js.map +1 -1
- package/dist/cjs/contact-import/index.js +34 -52
- package/dist/cjs/contact-import/index.js.map +1 -1
- package/dist/cjs/integration-template/index.js +1 -1
- package/dist/cjs/integration-template/index.js.map +1 -1
- package/dist/cjs/mapping/components/custom-date-menu.js +2 -2
- package/dist/cjs/mapping/components/custom-date-menu.js.map +1 -1
- package/dist/cjs/node_modules/@internationalized/date/dist/CalendarDate.js +156 -0
- package/dist/cjs/node_modules/@internationalized/date/dist/CalendarDate.js.map +1 -0
- package/dist/cjs/node_modules/@internationalized/date/dist/GregorianCalendar.js +139 -0
- package/dist/cjs/node_modules/@internationalized/date/dist/GregorianCalendar.js.map +1 -0
- package/dist/cjs/node_modules/@internationalized/date/dist/conversion.js +159 -0
- package/dist/cjs/node_modules/@internationalized/date/dist/conversion.js.map +1 -0
- package/dist/cjs/node_modules/@internationalized/date/dist/manipulation.js +229 -0
- package/dist/cjs/node_modules/@internationalized/date/dist/manipulation.js.map +1 -0
- package/dist/cjs/node_modules/@internationalized/date/dist/queries.js +22 -0
- package/dist/cjs/node_modules/@internationalized/date/dist/queries.js.map +1 -0
- package/dist/cjs/node_modules/@internationalized/date/dist/string.js +36 -0
- package/dist/cjs/node_modules/@internationalized/date/dist/string.js.map +1 -0
- package/dist/cjs/node_modules/@internationalized/date/dist/utils.js +19 -0
- package/dist/cjs/node_modules/@internationalized/date/dist/utils.js.map +1 -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/checkbox/checkbox.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/dialog/dialog.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/dropdown/dropdown.js +18 -18
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/dropdown/dropdown.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/form-label/form-label.js +2 -2
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/form-label/form-label.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/primitive/dist/index.js +9 -6
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/primitive/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-arrow/dist/index.js +40 -15
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-checkbox/dist/index.js +156 -138
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-checkbox/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-collection/dist/index.js +60 -85
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-compose-refs/dist/index.js +32 -21
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-context/dist/index.js +91 -92
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-context/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-dialog/dist/index.js +326 -247
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-dialog/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-direction/dist/index.js +26 -5
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +201 -207
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +303 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-focus-guards/dist/index.js +40 -24
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-focus-scope/dist/index.js +205 -258
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-id/dist/index.js +23 -26
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-id/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-label/dist/index.js +47 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-label/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-menu/dist/index.js +847 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-menu/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-popover/dist/index.js +298 -255
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-popper/dist/index.js +279 -265
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-portal/dist/index.js +31 -9
- 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 +125 -116
- 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 +54 -80
- 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/@radix-ui/react-radio-group/dist/index.js +273 -225
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-radio-group/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-roving-focus/dist/index.js +211 -208
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-slot/dist/index.js +88 -69
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-switch/dist/index.js +140 -111
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-switch/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-tabs/dist/index.js +186 -137
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-tabs/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-tooltip/dist/index.js +480 -526
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-tooltip/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +27 -14
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +58 -40
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +32 -16
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +24 -9
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-previous/dist/index.js +30 -17
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-previous/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-size/dist/index.js +54 -46
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-visually-hidden/dist/index.js +48 -20
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll/dist/es2015/Combination.js +2 -2
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +15 -4
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll/dist/es2015/UI.js +2 -2
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +12 -4
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/component.js +26 -4
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/popover/popover.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/radio/radio.js +25 -5
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/radio/radio.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/switch/switch.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/table/table.js +14 -9
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/table/table.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/tabs/tabs.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/theme-provider/theme-provider.js +12 -4
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/theme-provider/theme-provider.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/tooltip/tooltip.js +2 -2
- package/dist/cjs/node_modules/@sparrowengg/twigs-react/dist/es/tooltip/tooltip.js.map +1 -1
- package/dist/cjs/node_modules/@swc/helpers/esm/_check_private_redeclaration.js +0 -1
- package/dist/cjs/node_modules/@swc/helpers/esm/_check_private_redeclaration.js.map +1 -1
- package/dist/cjs/node_modules/@swc/helpers/esm/_class_private_field_init.js +1 -2
- package/dist/cjs/node_modules/@swc/helpers/esm/_class_private_field_init.js.map +1 -1
- package/dist/cjs/node_modules/domhandler/lib/index.js +176 -0
- package/dist/cjs/node_modules/domhandler/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/domhandler/lib/node.js +485 -0
- package/dist/cjs/node_modules/domhandler/lib/node.js.map +1 -0
- package/dist/cjs/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +1 -1
- package/dist/cjs/node_modules/html-dom-parser/lib/server/html-to-dom.js +3 -3
- package/dist/cjs/node_modules/html-react-parser/lib/index.js +1 -1
- package/dist/cjs/node_modules/htmlparser2/lib/Parser.js +531 -0
- package/dist/cjs/node_modules/htmlparser2/lib/Parser.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/lib/Tokenizer.js +789 -0
- package/dist/cjs/node_modules/htmlparser2/lib/Tokenizer.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/lib/index.js +131 -0
- package/dist/cjs/node_modules/htmlparser2/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/dom-serializer/lib/foreignNames.js +111 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/dom-serializer/lib/foreignNames.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/dom-serializer/lib/index.js +240 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/dom-serializer/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/domutils/lib/feeds.js +202 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/domutils/lib/feeds.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/domutils/lib/helpers.js +150 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/domutils/lib/helpers.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/domutils/lib/index.js +56 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/domutils/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/domutils/lib/legacy.js +164 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/domutils/lib/legacy.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/domutils/lib/manipulation.js +150 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/domutils/lib/manipulation.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/domutils/lib/querying.js +168 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/domutils/lib/querying.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/domutils/lib/stringify.js +106 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/domutils/lib/stringify.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/domutils/lib/traversal.js +135 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/domutils/lib/traversal.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/lib/decode.js +549 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/lib/decode.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/lib/decode_codepoint.js +82 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/lib/decode_codepoint.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/lib/encode.js +89 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/lib/encode.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/lib/escape.js +128 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/lib/escape.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/lib/generated/decode-data-html.js +12 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/lib/generated/decode-data-xml.js +12 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/lib/generated/encode-html.js +15 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/lib/generated/encode-html.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/lib/index.js +138 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/react-is/index.js +1 -1
- package/dist/cjs/node_modules/style-to-js/cjs/index.js +1 -1
- package/dist/cjs/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/es/_virtual/index10.js +2 -2
- package/dist/es/_virtual/index7.js +2 -2
- package/dist/es/authentication/constants/index.js +8 -0
- package/dist/es/authentication/constants/index.js.map +1 -0
- package/dist/es/authentication/index.js +40 -47
- package/dist/es/authentication/index.js.map +1 -1
- package/dist/es/commons/components/theme-wrapper.js +20 -0
- package/dist/es/commons/components/theme-wrapper.js.map +1 -0
- package/dist/es/contact-import/components/contact-import-mapping.js +6 -4
- package/dist/es/contact-import/components/contact-import-mapping.js.map +1 -1
- package/dist/es/contact-import/index.js +34 -52
- package/dist/es/contact-import/index.js.map +1 -1
- package/dist/es/integration-template/index.js +1 -1
- package/dist/es/integration-template/index.js.map +1 -1
- package/dist/es/mapping/components/custom-date-menu.js +1 -1
- package/dist/es/node_modules/@internationalized/date/dist/CalendarDate.js +153 -0
- package/dist/es/node_modules/@internationalized/date/dist/CalendarDate.js.map +1 -0
- package/dist/es/node_modules/@internationalized/date/dist/GregorianCalendar.js +133 -0
- package/dist/es/node_modules/@internationalized/date/dist/GregorianCalendar.js.map +1 -0
- package/dist/es/node_modules/@internationalized/date/dist/conversion.js +152 -0
- package/dist/es/node_modules/@internationalized/date/dist/conversion.js.map +1 -0
- package/dist/es/node_modules/@internationalized/date/dist/manipulation.js +219 -0
- package/dist/es/node_modules/@internationalized/date/dist/manipulation.js.map +1 -0
- package/dist/es/node_modules/@internationalized/date/dist/queries.js +18 -0
- package/dist/es/node_modules/@internationalized/date/dist/queries.js.map +1 -0
- package/dist/es/node_modules/@internationalized/date/dist/string.js +31 -0
- package/dist/es/node_modules/@internationalized/date/dist/string.js.map +1 -0
- package/dist/es/node_modules/@internationalized/date/dist/utils.js +17 -0
- package/dist/es/node_modules/@internationalized/date/dist/utils.js.map +1 -0
- 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/checkbox/checkbox.js +3 -3
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/checkbox/checkbox.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/dialog/dialog.js +7 -7
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/dialog/dialog.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/dropdown/dropdown.js +18 -18
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/dropdown/dropdown.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/form-label/form-label.js +2 -2
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/form-label/form-label.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/primitive/dist/index.js +9 -6
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/primitive/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-arrow/dist/index.js +22 -16
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-checkbox/dist/index.js +143 -144
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-checkbox/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-collection/dist/index.js +63 -88
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-compose-refs/dist/index.js +13 -21
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-context/dist/index.js +72 -93
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-context/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-dialog/dist/index.js +298 -241
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-dialog/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-direction/dist/index.js +8 -6
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +189 -215
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +254 -0
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map +1 -0
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-focus-guards/dist/index.js +22 -25
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-focus-scope/dist/index.js +190 -262
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-id/dist/index.js +11 -14
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-id/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-label/dist/index.js +25 -0
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-label/dist/index.js.map +1 -0
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-menu/dist/index.js +796 -0
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-menu/dist/index.js.map +1 -0
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-popover/dist/index.js +268 -244
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-popper/dist/index.js +257 -262
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-portal/dist/index.js +13 -10
- 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 +110 -121
- 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 +37 -83
- 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/@radix-ui/react-radio-group/dist/index.js +250 -221
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-radio-group/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-roving-focus/dist/index.js +200 -216
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-slot/dist/index.js +71 -71
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-switch/dist/index.js +126 -116
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-switch/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-tabs/dist/index.js +171 -141
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-tabs/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-tooltip/dist/index.js +453 -518
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-tooltip/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +9 -15
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +42 -43
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +15 -18
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +5 -9
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-previous/dist/index.js +12 -18
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-previous/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-size/dist/index.js +37 -48
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-visually-hidden/dist/index.js +30 -21
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll/dist/es2015/Combination.js +5 -5
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +15 -4
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll/dist/es2015/UI.js +2 -2
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +12 -4
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/component.js +25 -5
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/popover/popover.js +5 -5
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/popover/popover.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/radio/radio.js +29 -9
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/radio/radio.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/switch/switch.js +3 -3
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/switch/switch.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/table/table.js +14 -9
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/table/table.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/tabs/tabs.js +5 -5
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/tabs/tabs.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/theme-provider/theme-provider.js +13 -5
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/theme-provider/theme-provider.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/tooltip/tooltip.js +8 -8
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/tooltip/tooltip.js.map +1 -1
- package/dist/es/node_modules/@swc/helpers/esm/_check_private_redeclaration.js +1 -1
- package/dist/es/node_modules/@swc/helpers/esm/_check_private_redeclaration.js.map +1 -1
- package/dist/es/node_modules/@swc/helpers/esm/_class_private_field_init.js +2 -2
- package/dist/es/node_modules/@swc/helpers/esm/_class_private_field_init.js.map +1 -1
- package/dist/es/node_modules/domhandler/lib/index.js +174 -0
- package/dist/es/node_modules/domhandler/lib/index.js.map +1 -0
- package/dist/es/node_modules/domhandler/lib/node.js +481 -0
- package/dist/es/node_modules/domhandler/lib/node.js.map +1 -0
- package/dist/es/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +1 -1
- package/dist/es/node_modules/html-dom-parser/lib/server/html-to-dom.js +3 -3
- package/dist/es/node_modules/html-react-parser/lib/index.js +1 -1
- package/dist/es/node_modules/htmlparser2/lib/Parser.js +527 -0
- package/dist/es/node_modules/htmlparser2/lib/Parser.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/lib/Tokenizer.js +787 -0
- package/dist/es/node_modules/htmlparser2/lib/Tokenizer.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/lib/index.js +129 -0
- package/dist/es/node_modules/htmlparser2/lib/index.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/node_modules/dom-serializer/lib/foreignNames.js +107 -0
- package/dist/es/node_modules/htmlparser2/node_modules/dom-serializer/lib/foreignNames.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/node_modules/dom-serializer/lib/index.js +238 -0
- package/dist/es/node_modules/htmlparser2/node_modules/dom-serializer/lib/index.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/node_modules/domutils/lib/feeds.js +198 -0
- package/dist/es/node_modules/htmlparser2/node_modules/domutils/lib/feeds.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/node_modules/domutils/lib/helpers.js +148 -0
- package/dist/es/node_modules/htmlparser2/node_modules/domutils/lib/helpers.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/node_modules/domutils/lib/index.js +54 -0
- package/dist/es/node_modules/htmlparser2/node_modules/domutils/lib/index.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/node_modules/domutils/lib/legacy.js +160 -0
- package/dist/es/node_modules/htmlparser2/node_modules/domutils/lib/legacy.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/node_modules/domutils/lib/manipulation.js +146 -0
- package/dist/es/node_modules/htmlparser2/node_modules/domutils/lib/manipulation.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/node_modules/domutils/lib/querying.js +164 -0
- package/dist/es/node_modules/htmlparser2/node_modules/domutils/lib/querying.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/node_modules/domutils/lib/stringify.js +102 -0
- package/dist/es/node_modules/htmlparser2/node_modules/domutils/lib/stringify.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/node_modules/domutils/lib/traversal.js +131 -0
- package/dist/es/node_modules/htmlparser2/node_modules/domutils/lib/traversal.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/node_modules/entities/lib/decode.js +547 -0
- package/dist/es/node_modules/htmlparser2/node_modules/entities/lib/decode.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/node_modules/entities/lib/decode_codepoint.js +80 -0
- package/dist/es/node_modules/htmlparser2/node_modules/entities/lib/decode_codepoint.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/node_modules/entities/lib/encode.js +85 -0
- package/dist/es/node_modules/htmlparser2/node_modules/entities/lib/encode.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/node_modules/entities/lib/escape.js +126 -0
- package/dist/es/node_modules/htmlparser2/node_modules/entities/lib/escape.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/node_modules/entities/lib/generated/decode-data-html.js +10 -0
- package/dist/es/node_modules/htmlparser2/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/node_modules/entities/lib/generated/decode-data-xml.js +10 -0
- package/dist/es/node_modules/htmlparser2/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/node_modules/entities/lib/generated/encode-html.js +13 -0
- package/dist/es/node_modules/htmlparser2/node_modules/entities/lib/generated/encode-html.js.map +1 -0
- package/dist/es/node_modules/htmlparser2/node_modules/entities/lib/index.js +136 -0
- package/dist/es/node_modules/htmlparser2/node_modules/entities/lib/index.js.map +1 -0
- package/dist/es/node_modules/react-is/index.js +1 -1
- package/dist/es/node_modules/style-to-js/cjs/index.js +1 -1
- package/dist/es/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/index.d.ts +44 -12
- package/package.json +2 -2
|
@@ -1,280 +1,208 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useComposedRefs } from '../../react-compose-refs/dist/index.js';
|
|
3
|
+
import { Primitive } from '../../react-primitive/dist/index.js';
|
|
4
|
+
import { useCallbackRef } from '../../react-use-callback-ref/dist/index.js';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const relatedTarget = event.relatedTarget; // A `focusout` event with a `null` `relatedTarget` will happen in at least two cases:
|
|
43
|
-
//
|
|
44
|
-
// 1. When the user switches app/tabs/windows/the browser itself loses focus.
|
|
45
|
-
// 2. In Google Chrome, when the focused element is removed from the DOM.
|
|
46
|
-
//
|
|
47
|
-
// We let the browser do its thing here because:
|
|
48
|
-
//
|
|
49
|
-
// 1. The browser already keeps a memory of what's focused for when the page gets refocused.
|
|
50
|
-
// 2. In Google Chrome, if we try to focus the deleted focused element (as per below), it
|
|
51
|
-
// throws the CPU to 100%, so we avoid doing anything for this reason here too.
|
|
52
|
-
if (relatedTarget === null) return; // If the focus has moved to an actual legitimate element (`relatedTarget !== null`)
|
|
53
|
-
// that is outside the container, we move focus to the last valid focused element inside.
|
|
54
|
-
if (!container1.contains(relatedTarget)) $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {
|
|
55
|
-
select: true
|
|
56
|
-
});
|
|
57
|
-
} // When the focused element gets removed from the DOM, browsers move focus
|
|
58
|
-
// back to the document.body. In this case, we move focus to the container
|
|
59
|
-
// to keep focus trapped correctly.
|
|
60
|
-
function handleMutations(mutations) {
|
|
61
|
-
const focusedElement = document.activeElement;
|
|
62
|
-
for (const mutation of mutations){
|
|
63
|
-
if (mutation.removedNodes.length > 0) {
|
|
64
|
-
if (!(container1 !== null && container1 !== void 0 && container1.contains(focusedElement))) $d3863c46a17e8a28$var$focus(container1);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
document.addEventListener('focusin', handleFocusIn);
|
|
69
|
-
document.addEventListener('focusout', handleFocusOut);
|
|
70
|
-
const mutationObserver = new MutationObserver(handleMutations);
|
|
71
|
-
if (container1) mutationObserver.observe(container1, {
|
|
72
|
-
childList: true,
|
|
73
|
-
subtree: true
|
|
74
|
-
});
|
|
75
|
-
return ()=>{
|
|
76
|
-
document.removeEventListener('focusin', handleFocusIn);
|
|
77
|
-
document.removeEventListener('focusout', handleFocusOut);
|
|
78
|
-
mutationObserver.disconnect();
|
|
79
|
-
};
|
|
7
|
+
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
8
|
+
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
9
|
+
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
10
|
+
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
11
|
+
var FocusScope = React.forwardRef((props, forwardedRef) => {
|
|
12
|
+
const {
|
|
13
|
+
loop = false,
|
|
14
|
+
trapped = false,
|
|
15
|
+
onMountAutoFocus: onMountAutoFocusProp,
|
|
16
|
+
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
17
|
+
...scopeProps
|
|
18
|
+
} = props;
|
|
19
|
+
const [container, setContainer] = React.useState(null);
|
|
20
|
+
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
21
|
+
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
22
|
+
const lastFocusedElementRef = React.useRef(null);
|
|
23
|
+
const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
|
|
24
|
+
const focusScope = React.useRef({
|
|
25
|
+
paused: false,
|
|
26
|
+
pause() {
|
|
27
|
+
this.paused = true;
|
|
28
|
+
},
|
|
29
|
+
resume() {
|
|
30
|
+
this.paused = false;
|
|
31
|
+
}
|
|
32
|
+
}).current;
|
|
33
|
+
React.useEffect(() => {
|
|
34
|
+
if (trapped) {
|
|
35
|
+
let handleFocusIn2 = function(event) {
|
|
36
|
+
if (focusScope.paused || !container) return;
|
|
37
|
+
const target = event.target;
|
|
38
|
+
if (container.contains(target)) {
|
|
39
|
+
lastFocusedElementRef.current = target;
|
|
40
|
+
} else {
|
|
41
|
+
focus(lastFocusedElementRef.current, { select: true });
|
|
80
42
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
if (container1) {
|
|
88
|
-
$d3863c46a17e8a28$var$focusScopesStack.add(focusScope);
|
|
89
|
-
const previouslyFocusedElement = document.activeElement;
|
|
90
|
-
const hasFocusedCandidate = container1.contains(previouslyFocusedElement);
|
|
91
|
-
if (!hasFocusedCandidate) {
|
|
92
|
-
const mountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);
|
|
93
|
-
container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
94
|
-
container1.dispatchEvent(mountEvent);
|
|
95
|
-
if (!mountEvent.defaultPrevented) {
|
|
96
|
-
$d3863c46a17e8a28$var$focusFirst($d3863c46a17e8a28$var$removeLinks($d3863c46a17e8a28$var$getTabbableCandidates(container1)), {
|
|
97
|
-
select: true
|
|
98
|
-
});
|
|
99
|
-
if (document.activeElement === previouslyFocusedElement) $d3863c46a17e8a28$var$focus(container1);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
return ()=>{
|
|
103
|
-
container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus); // We hit a react bug (fixed in v17) with focusing in unmount.
|
|
104
|
-
// We need to delay the focus a little to get around it for now.
|
|
105
|
-
// See: https://github.com/facebook/react/issues/17894
|
|
106
|
-
setTimeout(()=>{
|
|
107
|
-
const unmountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);
|
|
108
|
-
container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
109
|
-
container1.dispatchEvent(unmountEvent);
|
|
110
|
-
if (!unmountEvent.defaultPrevented) $d3863c46a17e8a28$var$focus(previouslyFocusedElement !== null && previouslyFocusedElement !== void 0 ? previouslyFocusedElement : document.body, {
|
|
111
|
-
select: true
|
|
112
|
-
});
|
|
113
|
-
// we need to remove the listener after we `dispatchEvent`
|
|
114
|
-
container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
115
|
-
$d3863c46a17e8a28$var$focusScopesStack.remove(focusScope);
|
|
116
|
-
}, 0);
|
|
117
|
-
};
|
|
43
|
+
}, handleFocusOut2 = function(event) {
|
|
44
|
+
if (focusScope.paused || !container) return;
|
|
45
|
+
const relatedTarget = event.relatedTarget;
|
|
46
|
+
if (relatedTarget === null) return;
|
|
47
|
+
if (!container.contains(relatedTarget)) {
|
|
48
|
+
focus(lastFocusedElementRef.current, { select: true });
|
|
118
49
|
}
|
|
119
|
-
|
|
120
|
-
container1,
|
|
121
|
-
onMountAutoFocus,
|
|
122
|
-
onUnmountAutoFocus,
|
|
123
|
-
focusScope
|
|
124
|
-
]); // Takes care of looping focus (when tabbing whilst at the edges)
|
|
125
|
-
const handleKeyDown = useCallback((event)=>{
|
|
126
|
-
if (!loop && !trapped) return;
|
|
127
|
-
if (focusScope.paused) return;
|
|
128
|
-
const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
50
|
+
}, handleMutations2 = function(mutations) {
|
|
129
51
|
const focusedElement = document.activeElement;
|
|
130
|
-
if (
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
const hasTabbableElementsInside = first && last; // we can only wrap focus if we have tabbable edges
|
|
134
|
-
if (!hasTabbableElementsInside) {
|
|
135
|
-
if (focusedElement === container) event.preventDefault();
|
|
136
|
-
} else {
|
|
137
|
-
if (!event.shiftKey && focusedElement === last) {
|
|
138
|
-
event.preventDefault();
|
|
139
|
-
if (loop) $d3863c46a17e8a28$var$focus(first, {
|
|
140
|
-
select: true
|
|
141
|
-
});
|
|
142
|
-
} else if (event.shiftKey && focusedElement === first) {
|
|
143
|
-
event.preventDefault();
|
|
144
|
-
if (loop) $d3863c46a17e8a28$var$focus(last, {
|
|
145
|
-
select: true
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
}
|
|
52
|
+
if (focusedElement !== document.body) return;
|
|
53
|
+
for (const mutation of mutations) {
|
|
54
|
+
if (mutation.removedNodes.length > 0) focus(container);
|
|
149
55
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}));
|
|
161
|
-
});
|
|
162
|
-
/* -------------------------------------------------------------------------------------------------
|
|
163
|
-
* Utils
|
|
164
|
-
* -----------------------------------------------------------------------------------------------*/ /**
|
|
165
|
-
* Attempts focusing the first element in a list of candidates.
|
|
166
|
-
* Stops when focus has actually moved.
|
|
167
|
-
*/ function $d3863c46a17e8a28$var$focusFirst(candidates, { select: select = false } = {}) {
|
|
168
|
-
const previouslyFocusedElement = document.activeElement;
|
|
169
|
-
for (const candidate of candidates){
|
|
170
|
-
$d3863c46a17e8a28$var$focus(candidate, {
|
|
171
|
-
select: select
|
|
172
|
-
});
|
|
173
|
-
if (document.activeElement !== previouslyFocusedElement) return;
|
|
56
|
+
};
|
|
57
|
+
document.addEventListener("focusin", handleFocusIn2);
|
|
58
|
+
document.addEventListener("focusout", handleFocusOut2);
|
|
59
|
+
const mutationObserver = new MutationObserver(handleMutations2);
|
|
60
|
+
if (container) mutationObserver.observe(container, { childList: true, subtree: true });
|
|
61
|
+
return () => {
|
|
62
|
+
document.removeEventListener("focusin", handleFocusIn2);
|
|
63
|
+
document.removeEventListener("focusout", handleFocusOut2);
|
|
64
|
+
mutationObserver.disconnect();
|
|
65
|
+
};
|
|
174
66
|
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
* NOTE: This is only a close approximation. For example it doesn't take into account cases like when
|
|
191
|
-
* elements are not visible. This cannot be worked out easily by just reading a property, but rather
|
|
192
|
-
* necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.
|
|
193
|
-
*
|
|
194
|
-
* See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker
|
|
195
|
-
* Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1
|
|
196
|
-
*/ function $d3863c46a17e8a28$var$getTabbableCandidates(container) {
|
|
197
|
-
const nodes = [];
|
|
198
|
-
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
199
|
-
acceptNode: (node)=>{
|
|
200
|
-
const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';
|
|
201
|
-
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; // `.tabIndex` is not the same as the `tabindex` attribute. It works on the
|
|
202
|
-
// runtime's understanding of tabbability, so this automatically accounts
|
|
203
|
-
// for any kind of element that could be tabbed to.
|
|
204
|
-
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
67
|
+
}, [trapped, container, focusScope.paused]);
|
|
68
|
+
React.useEffect(() => {
|
|
69
|
+
if (container) {
|
|
70
|
+
focusScopesStack.add(focusScope);
|
|
71
|
+
const previouslyFocusedElement = document.activeElement;
|
|
72
|
+
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
|
73
|
+
if (!hasFocusedCandidate) {
|
|
74
|
+
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
|
|
75
|
+
container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
76
|
+
container.dispatchEvent(mountEvent);
|
|
77
|
+
if (!mountEvent.defaultPrevented) {
|
|
78
|
+
focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
|
|
79
|
+
if (document.activeElement === previouslyFocusedElement) {
|
|
80
|
+
focus(container);
|
|
81
|
+
}
|
|
205
82
|
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
83
|
+
}
|
|
84
|
+
return () => {
|
|
85
|
+
container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
86
|
+
setTimeout(() => {
|
|
87
|
+
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
|
|
88
|
+
container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
89
|
+
container.dispatchEvent(unmountEvent);
|
|
90
|
+
if (!unmountEvent.defaultPrevented) {
|
|
91
|
+
focus(previouslyFocusedElement ?? document.body, { select: true });
|
|
92
|
+
}
|
|
93
|
+
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
94
|
+
focusScopesStack.remove(focusScope);
|
|
95
|
+
}, 0);
|
|
96
|
+
};
|
|
220
97
|
}
|
|
98
|
+
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
99
|
+
const handleKeyDown = React.useCallback(
|
|
100
|
+
(event) => {
|
|
101
|
+
if (!loop && !trapped) return;
|
|
102
|
+
if (focusScope.paused) return;
|
|
103
|
+
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
104
|
+
const focusedElement = document.activeElement;
|
|
105
|
+
if (isTabKey && focusedElement) {
|
|
106
|
+
const container2 = event.currentTarget;
|
|
107
|
+
const [first, last] = getTabbableEdges(container2);
|
|
108
|
+
const hasTabbableElementsInside = first && last;
|
|
109
|
+
if (!hasTabbableElementsInside) {
|
|
110
|
+
if (focusedElement === container2) event.preventDefault();
|
|
111
|
+
} else {
|
|
112
|
+
if (!event.shiftKey && focusedElement === last) {
|
|
113
|
+
event.preventDefault();
|
|
114
|
+
if (loop) focus(first, { select: true });
|
|
115
|
+
} else if (event.shiftKey && focusedElement === first) {
|
|
116
|
+
event.preventDefault();
|
|
117
|
+
if (loop) focus(last, { select: true });
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
[loop, trapped, focusScope.paused]
|
|
123
|
+
);
|
|
124
|
+
return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
125
|
+
});
|
|
126
|
+
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
127
|
+
function focusFirst(candidates, { select = false } = {}) {
|
|
128
|
+
const previouslyFocusedElement = document.activeElement;
|
|
129
|
+
for (const candidate of candidates) {
|
|
130
|
+
focus(candidate, { select });
|
|
131
|
+
if (document.activeElement !== previouslyFocusedElement) return;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function getTabbableEdges(container) {
|
|
135
|
+
const candidates = getTabbableCandidates(container);
|
|
136
|
+
const first = findVisible(candidates, container);
|
|
137
|
+
const last = findVisible(candidates.reverse(), container);
|
|
138
|
+
return [first, last];
|
|
221
139
|
}
|
|
222
|
-
function
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
140
|
+
function getTabbableCandidates(container) {
|
|
141
|
+
const nodes = [];
|
|
142
|
+
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
143
|
+
acceptNode: (node) => {
|
|
144
|
+
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
145
|
+
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
146
|
+
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
229
147
|
}
|
|
230
|
-
|
|
148
|
+
});
|
|
149
|
+
while (walker.nextNode()) nodes.push(walker.currentNode);
|
|
150
|
+
return nodes;
|
|
231
151
|
}
|
|
232
|
-
function
|
|
233
|
-
|
|
152
|
+
function findVisible(elements, container) {
|
|
153
|
+
for (const element of elements) {
|
|
154
|
+
if (!isHidden(element, { upTo: container })) return element;
|
|
155
|
+
}
|
|
234
156
|
}
|
|
235
|
-
function
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}
|
|
157
|
+
function isHidden(node, { upTo }) {
|
|
158
|
+
if (getComputedStyle(node).visibility === "hidden") return true;
|
|
159
|
+
while (node) {
|
|
160
|
+
if (upTo !== void 0 && node === upTo) return false;
|
|
161
|
+
if (getComputedStyle(node).display === "none") return true;
|
|
162
|
+
node = node.parentElement;
|
|
163
|
+
}
|
|
164
|
+
return false;
|
|
244
165
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
function
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
166
|
+
function isSelectableInput(element) {
|
|
167
|
+
return element instanceof HTMLInputElement && "select" in element;
|
|
168
|
+
}
|
|
169
|
+
function focus(element, { select = false } = {}) {
|
|
170
|
+
if (element && element.focus) {
|
|
171
|
+
const previouslyFocusedElement = document.activeElement;
|
|
172
|
+
element.focus({ preventScroll: true });
|
|
173
|
+
if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
|
|
174
|
+
element.select();
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
var focusScopesStack = createFocusScopesStack();
|
|
178
|
+
function createFocusScopesStack() {
|
|
179
|
+
let stack = [];
|
|
180
|
+
return {
|
|
181
|
+
add(focusScope) {
|
|
182
|
+
const activeFocusScope = stack[0];
|
|
183
|
+
if (focusScope !== activeFocusScope) {
|
|
184
|
+
activeFocusScope?.pause();
|
|
185
|
+
}
|
|
186
|
+
stack = arrayRemove(stack, focusScope);
|
|
187
|
+
stack.unshift(focusScope);
|
|
188
|
+
},
|
|
189
|
+
remove(focusScope) {
|
|
190
|
+
stack = arrayRemove(stack, focusScope);
|
|
191
|
+
stack[0]?.resume();
|
|
192
|
+
}
|
|
193
|
+
};
|
|
265
194
|
}
|
|
266
|
-
function
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
195
|
+
function arrayRemove(array, item) {
|
|
196
|
+
const updatedArray = [...array];
|
|
197
|
+
const index = updatedArray.indexOf(item);
|
|
198
|
+
if (index !== -1) {
|
|
199
|
+
updatedArray.splice(index, 1);
|
|
200
|
+
}
|
|
201
|
+
return updatedArray;
|
|
273
202
|
}
|
|
274
|
-
function
|
|
275
|
-
|
|
276
|
-
);
|
|
203
|
+
function removeLinks(items) {
|
|
204
|
+
return items.filter((item) => item.tagName !== "A");
|
|
277
205
|
}
|
|
278
206
|
|
|
279
|
-
export {
|
|
207
|
+
export { FocusScope };
|
|
280
208
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../../../../../../node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-focus-scope/dist/index.js"],"sourcesContent":["import _extends from '../../../@babel/runtime/helpers/esm/extends.js';\nimport { forwardRef, useState, useRef, useEffect, useCallback, createElement } from 'react';\nimport { useComposedRefs as $6ed0406888f73fc4$export$c7b2cbe3552a0d05 } from '../../react-compose-refs/dist/index.js';\nimport { Primitive as $8927f6f2acc4f386$export$250ffa63cdc0d034 } from '../../react-primitive/dist/index.js';\nimport { useCallbackRef as $b1b2314f5f9a1d84$export$25bec8c6f54ee79a } from '../../react-use-callback-ref/dist/index.js';\n\nconst $d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount';\nconst $d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount';\nconst $d3863c46a17e8a28$var$EVENT_OPTIONS = {\n bubbles: false,\n cancelable: true\n};\nconst $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{\n const { loop: loop = false , trapped: trapped = false , onMountAutoFocus: onMountAutoFocusProp , onUnmountAutoFocus: onUnmountAutoFocusProp , ...scopeProps } = props;\n const [container1, setContainer] = useState(null);\n const onMountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onMountAutoFocusProp);\n const onUnmountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onUnmountAutoFocusProp);\n const lastFocusedElementRef = useRef(null);\n const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setContainer(node)\n );\n const focusScope = useRef({\n paused: false,\n pause () {\n this.paused = true;\n },\n resume () {\n this.paused = false;\n }\n }).current; // Takes care of trapping focus if focus is moved outside programmatically for example\n useEffect(()=>{\n if (trapped) {\n function handleFocusIn(event) {\n if (focusScope.paused || !container1) return;\n const target = event.target;\n if (container1.contains(target)) lastFocusedElementRef.current = target;\n else $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {\n select: true\n });\n }\n function handleFocusOut(event) {\n if (focusScope.paused || !container1) return;\n const relatedTarget = event.relatedTarget; // A `focusout` event with a `null` `relatedTarget` will happen in at least two cases:\n //\n // 1. When the user switches app/tabs/windows/the browser itself loses focus.\n // 2. In Google Chrome, when the focused element is removed from the DOM.\n //\n // We let the browser do its thing here because:\n //\n // 1. The browser already keeps a memory of what's focused for when the page gets refocused.\n // 2. In Google Chrome, if we try to focus the deleted focused element (as per below), it\n // throws the CPU to 100%, so we avoid doing anything for this reason here too.\n if (relatedTarget === null) return; // If the focus has moved to an actual legitimate element (`relatedTarget !== null`)\n // that is outside the container, we move focus to the last valid focused element inside.\n if (!container1.contains(relatedTarget)) $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {\n select: true\n });\n } // When the focused element gets removed from the DOM, browsers move focus\n // back to the document.body. In this case, we move focus to the container\n // to keep focus trapped correctly.\n function handleMutations(mutations) {\n const focusedElement = document.activeElement;\n for (const mutation of mutations){\n if (mutation.removedNodes.length > 0) {\n if (!(container1 !== null && container1 !== void 0 && container1.contains(focusedElement))) $d3863c46a17e8a28$var$focus(container1);\n }\n }\n }\n document.addEventListener('focusin', handleFocusIn);\n document.addEventListener('focusout', handleFocusOut);\n const mutationObserver = new MutationObserver(handleMutations);\n if (container1) mutationObserver.observe(container1, {\n childList: true,\n subtree: true\n });\n return ()=>{\n document.removeEventListener('focusin', handleFocusIn);\n document.removeEventListener('focusout', handleFocusOut);\n mutationObserver.disconnect();\n };\n }\n }, [\n trapped,\n container1,\n focusScope.paused\n ]);\n useEffect(()=>{\n if (container1) {\n $d3863c46a17e8a28$var$focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container1.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);\n container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container1.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n $d3863c46a17e8a28$var$focusFirst($d3863c46a17e8a28$var$removeLinks($d3863c46a17e8a28$var$getTabbableCandidates(container1)), {\n select: true\n });\n if (document.activeElement === previouslyFocusedElement) $d3863c46a17e8a28$var$focus(container1);\n }\n }\n return ()=>{\n container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus); // We hit a react bug (fixed in v17) with focusing in unmount.\n // We need to delay the focus a little to get around it for now.\n // See: https://github.com/facebook/react/issues/17894\n setTimeout(()=>{\n const unmountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);\n container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container1.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) $d3863c46a17e8a28$var$focus(previouslyFocusedElement !== null && previouslyFocusedElement !== void 0 ? previouslyFocusedElement : document.body, {\n select: true\n });\n // we need to remove the listener after we `dispatchEvent`\n container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n $d3863c46a17e8a28$var$focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [\n container1,\n onMountAutoFocus,\n onUnmountAutoFocus,\n focusScope\n ]); // Takes care of looping focus (when tabbing whilst at the edges)\n const handleKeyDown = useCallback((event)=>{\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container = event.currentTarget;\n const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(container);\n const hasTabbableElementsInside = first && last; // we can only wrap focus if we have tabbable edges\n if (!hasTabbableElementsInside) {\n if (focusedElement === container) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) $d3863c46a17e8a28$var$focus(first, {\n select: true\n });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) $d3863c46a17e8a28$var$focus(last, {\n select: true\n });\n }\n }\n }\n }, [\n loop,\n trapped,\n focusScope.paused\n ]);\n return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({\n tabIndex: -1\n }, scopeProps, {\n ref: composedRefs,\n onKeyDown: handleKeyDown\n }));\n});\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/ /**\n * Attempts focusing the first element in a list of candidates.\n * Stops when focus has actually moved.\n */ function $d3863c46a17e8a28$var$focusFirst(candidates, { select: select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates){\n $d3863c46a17e8a28$var$focus(candidate, {\n select: select\n });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\n/**\n * Returns the first and last tabbable elements inside a container.\n */ function $d3863c46a17e8a28$var$getTabbableEdges(container) {\n const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(container);\n const first = $d3863c46a17e8a28$var$findVisible(candidates, container);\n const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(), container);\n return [\n first,\n last\n ];\n}\n/**\n * Returns a list of potential tabbable candidates.\n *\n * NOTE: This is only a close approximation. For example it doesn't take into account cases like when\n * elements are not visible. This cannot be worked out easily by just reading a property, but rather\n * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1\n */ function $d3863c46a17e8a28$var$getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node)=>{\n const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n // runtime's understanding of tabbability, so this automatically accounts\n // for any kind of element that could be tabbed to.\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while(walker.nextNode())nodes.push(walker.currentNode); // we do not take into account the order of nodes with positive `tabIndex` as it\n // hinders accessibility to have tab order different from visual order.\n return nodes;\n}\n/**\n * Returns the first visible element in a list.\n * NOTE: Only checks visibility up to the `container`.\n */ function $d3863c46a17e8a28$var$findVisible(elements, container) {\n for (const element of elements){\n // we stop checking if it's hidden at the `container` level (excluding)\n if (!$d3863c46a17e8a28$var$isHidden(element, {\n upTo: container\n })) return element;\n }\n}\nfunction $d3863c46a17e8a28$var$isHidden(node, { upTo: upTo }) {\n if (getComputedStyle(node).visibility === 'hidden') return true;\n while(node){\n // we stop at `upTo` (excluding it)\n if (upTo !== undefined && node === upTo) return false;\n if (getComputedStyle(node).display === 'none') return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction $d3863c46a17e8a28$var$isSelectableInput(element) {\n return element instanceof HTMLInputElement && 'select' in element;\n}\nfunction $d3863c46a17e8a28$var$focus(element, { select: select = false } = {}) {\n // only focus if that element is focusable\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement; // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users\n element.focus({\n preventScroll: true\n }); // only select if its not the same element, it supports selection and we need to select\n if (element !== previouslyFocusedElement && $d3863c46a17e8a28$var$isSelectableInput(element) && select) element.select();\n }\n}\n/* -------------------------------------------------------------------------------------------------\n * FocusScope stack\n * -----------------------------------------------------------------------------------------------*/ const $d3863c46a17e8a28$var$focusScopesStack = $d3863c46a17e8a28$var$createFocusScopesStack();\nfunction $d3863c46a17e8a28$var$createFocusScopesStack() {\n /** A stack of focus scopes, with the active one at the top */ let stack = [];\n return {\n add (focusScope) {\n // pause the currently active focus scope (at the top of the stack)\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) activeFocusScope === null || activeFocusScope === void 0 || activeFocusScope.pause();\n // remove in case it already exists (because we'll re-add it at the top of the stack)\n stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove (focusScope) {\n var _stack$;\n stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);\n (_stack$ = stack[0]) === null || _stack$ === void 0 || _stack$.resume();\n }\n };\n}\nfunction $d3863c46a17e8a28$var$arrayRemove(array, item) {\n const updatedArray = [\n ...array\n ];\n const index = updatedArray.indexOf(item);\n if (index !== -1) updatedArray.splice(index, 1);\n return updatedArray;\n}\nfunction $d3863c46a17e8a28$var$removeLinks(items) {\n return items.filter((item)=>item.tagName !== 'A'\n );\n}\n\nexport { $d3863c46a17e8a28$export$20e40289641fbbb6 as FocusScope };\n//# sourceMappingURL=index.js.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B,KAAK,KAAK,CAAC,IAAI,gBAAgB,CAAC,KAAK,EAAE,CAAC;AACtI;AACA,YAAY,KAAK,GAAG,iCAAiC,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AACzE,YAAY,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AACtC,SAAS;AACT,QAAQ,MAAM,CAAC,CAAC,UAAU,EAAE;AAC5B,YAAY,IAAI,OAAO,CAAC;AACxB,YAAY,KAAK,GAAG,iCAAiC,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AACzE,YAAY,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,IAAI,IAAI,OAAO,KAAK,KAAK,CAAC,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;AACpF,SAAS;AACT,KAAK,CAAC;AACN,CAAC;AACD,SAAS,iCAAiC,CAAC,KAAK,EAAE,IAAI,EAAE;AACxD,IAAI,MAAM,YAAY,GAAG;AACzB,QAAQ,GAAG,KAAK;AAChB,KAAK,CAAC;AACN,IAAI,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC7C,IAAI,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AACpD,IAAI,OAAO,YAAY,CAAC;AACxB,CAAC;AACD,SAAS,iCAAiC,CAAC,KAAK,EAAE;AAClD,IAAI,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,KAAK,GAAG;AACpD,KAAK,CAAC;AACN;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../../../../../../node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-focus-scope/dist/index.js"],"sourcesContent":["import * as React from 'react';\nimport { useComposedRefs } from '../../react-compose-refs/dist/index.js';\nimport { Primitive } from '../../react-primitive/dist/index.js';\nimport { useCallbackRef } from '../../react-use-callback-ref/dist/index.js';\nimport { jsx } from 'react/jsx-runtime';\n\nvar AUTOFOCUS_ON_MOUNT = \"focusScope.autoFocusOnMount\";\nvar AUTOFOCUS_ON_UNMOUNT = \"focusScope.autoFocusOnUnmount\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar FOCUS_SCOPE_NAME = \"FocusScope\";\nvar FocusScope = React.forwardRef((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = React.useState(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));\n const focusScope = React.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n }\n }).current;\n React.useEffect(() => {\n if (trapped) {\n let handleFocusIn2 = function(event) {\n if (focusScope.paused || !container) return;\n const target = event.target;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleFocusOut2 = function(event) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget;\n if (relatedTarget === null) return;\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleMutations2 = function(mutations) {\n const focusedElement = document.activeElement;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n };\n document.addEventListener(\"focusin\", handleFocusIn2);\n document.addEventListener(\"focusout\", handleFocusOut2);\n const mutationObserver = new MutationObserver(handleMutations2);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n return () => {\n document.removeEventListener(\"focusin\", handleFocusIn2);\n document.removeEventListener(\"focusout\", handleFocusOut2);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n React.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n const handleKeyDown = React.useCallback(\n (event) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === \"Tab\" && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container2 = event.currentTarget;\n const [first, last] = getTabbableEdges(container2);\n const hasTabbableElementsInside = first && last;\n if (!hasTabbableElementsInside) {\n if (focusedElement === container2) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });\n});\nFocusScope.displayName = FOCUS_SCOPE_NAME;\nfunction focusFirst(candidates, { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\nfunction getTabbableEdges(container) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last];\n}\nfunction getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nfunction findVisible(elements, container) {\n for (const element of elements) {\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\nfunction isHidden(node, { upTo }) {\n if (getComputedStyle(node).visibility === \"hidden\") return true;\n while (node) {\n if (upTo !== void 0 && node === upTo) return false;\n if (getComputedStyle(node).display === \"none\") return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction isSelectableInput(element) {\n return element instanceof HTMLInputElement && \"select\" in element;\n}\nfunction focus(element, { select = false } = {}) {\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n element.focus({ preventScroll: true });\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\nvar focusScopesStack = createFocusScopesStack();\nfunction createFocusScopesStack() {\n let stack = [];\n return {\n add(focusScope) {\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove(focusScope) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n }\n };\n}\nfunction arrayRemove(array, item) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\nfunction removeLinks(items) {\n return items.filter((item) => item.tagName !== \"A\");\n}\n\nexport { FocusScope };\n//# sourceMappingURL=index.js.map\n"],"names":[],"mappings":";;;;;;AAMA,IAAI,kBAAkB,GAAG,6BAA6B,CAAC;AACvD,IAAI,oBAAoB,GAAG,+BAA+B,CAAC;AAC3D,IAAI,aAAa,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;AACzD,IAAI,gBAAgB,GAAG,YAAY,CAAC;AACjC,IAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK;AAC3D,EAAE,MAAM;AACR,IAAI,IAAI,GAAG,KAAK;AAChB,IAAI,OAAO,GAAG,KAAK;AACnB,IAAI,gBAAgB,EAAE,oBAAoB;AAC1C,IAAI,kBAAkB,EAAE,sBAAsB;AAC9C,IAAI,GAAG,UAAU;AACjB,GAAG,GAAG,KAAK,CAAC;AACZ,EAAE,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACzD,EAAE,MAAM,gBAAgB,GAAG,cAAc,CAAC,oBAAoB,CAAC,CAAC;AAChE,EAAE,MAAM,kBAAkB,GAAG,cAAc,CAAC,sBAAsB,CAAC,CAAC;AACpE,EAAE,MAAM,qBAAqB,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACnD,EAAE,MAAM,YAAY,GAAG,eAAe,CAAC,YAAY,EAAE,CAAC,IAAI,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;AACnF,EAAE,MAAM,UAAU,GAAG,KAAK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ACD,SAAS,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE;AAClC,EAAE,MAAM,YAAY,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;AAClC,EAAE,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC3C,EAAE,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;AACpB,IAAI,YAAY,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AAClC,GAAG;AACH,EAAE,OAAO,YAAY,CAAC;AACtB,CAAC;AACD,SAAS,WAAW,CAAC,KAAK,EAAE;AAC5B,EAAE,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,KAAK,GAAG,CAAC,CAAC;AACtD;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useLayoutEffect as
|
|
2
|
+
import { useLayoutEffect as useLayoutEffect2 } from '../../react-use-layout-effect/dist/index.js';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
);
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
deterministicId
|
|
14
|
-
]);
|
|
15
|
-
return deterministicId || (id ? `radix-${id}` : '');
|
|
4
|
+
// packages/react/id/src/id.tsx
|
|
5
|
+
var useReactId = React["useId".toString()] || (() => void 0);
|
|
6
|
+
var count = 0;
|
|
7
|
+
function useId(deterministicId) {
|
|
8
|
+
const [id, setId] = React.useState(useReactId());
|
|
9
|
+
useLayoutEffect2(() => {
|
|
10
|
+
if (!deterministicId) setId((reactId) => reactId ?? String(count++));
|
|
11
|
+
}, [deterministicId]);
|
|
12
|
+
return deterministicId || (id ? `radix-${id}` : "");
|
|
16
13
|
}
|
|
17
14
|
|
|
18
|
-
export {
|
|
15
|
+
export { useId };
|
|
19
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../../../../../../node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-id/dist/index.js"],"sourcesContent":["import * as React from 'react';\nimport { useLayoutEffect as
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../../../../../../node_modules/@sparrowengg/twigs-react/dist/es/node_modules/@radix-ui/react-id/dist/index.js"],"sourcesContent":["import * as React from 'react';\nimport { useLayoutEffect as useLayoutEffect2 } from '../../react-use-layout-effect/dist/index.js';\n\n// packages/react/id/src/id.tsx\nvar useReactId = React[\"useId\".toString()] || (() => void 0);\nvar count = 0;\nfunction useId(deterministicId) {\n const [id, setId] = React.useState(useReactId());\n useLayoutEffect2(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : \"\");\n}\n\nexport { useId };\n//# sourceMappingURL=index.js.map\n"],"names":[],"mappings":";;;AAGA;AACA,IAAI,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,MAAM,KAAK,CAAC,CAAC,CAAC;AAC7D,IAAI,KAAK,GAAG,CAAC,CAAC;AACd,SAAS,KAAK,CAAC,eAAe,EAAE;AAChC,EAAE,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;AACnD,EAAE,gBAAgB,CAAC,MAAM;AACzB,IAAI,IAAI,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC,OAAO,KAAK,OAAO,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AACzE,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;AACxB,EAAE,OAAO,eAAe,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AACtD;;;;","x_google_ignoreList":[0]}
|