@dreamcommerce/aurora 3.0.0-44 → 3.0.0-45
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/build/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -49
- package/build/cjs/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/control/control.js +21 -0
- package/build/cjs/packages/aurora/src/components/controls/input_control/input_control.js +63 -0
- package/build/cjs/packages/aurora/src/components/controls/switch_control/switch_control.js +56 -0
- package/build/cjs/packages/aurora/src/components/drawer/components/drawer_close.js +2 -2
- package/build/cjs/packages/aurora/src/components/drawer/components/drawer_close.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/drawer/components/drawer_content.js +2 -2
- package/build/cjs/packages/aurora/src/components/drawer/components/drawer_content.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/drawer/components/drawer_portal.js +2 -2
- package/build/cjs/packages/aurora/src/components/drawer/components/drawer_portal.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/drawer/components/drawer_title.js +3 -3
- package/build/cjs/packages/aurora/src/components/drawer/components/drawer_title.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/drawer/components/drawer_trigger.js +2 -2
- package/build/cjs/packages/aurora/src/components/drawer/components/drawer_trigger.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/drawer/drawer.js +2 -2
- package/build/cjs/packages/aurora/src/components/drawer/drawer.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/input/input.js +59 -0
- package/build/cjs/{external/@radix-ui/react-use-controllable-state/dist/index.mjs.js.map → packages/aurora/src/components/input/input.js.map} +1 -1
- package/build/cjs/packages/aurora/src/components/input/input_variants.js +10 -0
- package/build/cjs/packages/aurora/src/components/input/input_variants.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/modal/components/modal/modal.js +2 -2
- package/build/cjs/packages/aurora/src/components/modal/components/modals_wrapper.js +2 -2
- package/build/cjs/packages/aurora/src/components/switch/switch.js +44 -0
- package/build/cjs/{external/use-callback-ref/dist/es2015/useRef.js.map → packages/aurora/src/components/switch/switch.js.map} +1 -1
- package/build/cjs/packages/aurora/src/components/tag/tag.js +43 -0
- package/build/cjs/{external/@radix-ui/react-focus-guards/dist/index.mjs.js.map → packages/aurora/src/components/tag/tag.js.map} +1 -1
- package/build/cjs/packages/aurora/src/components/tag/tag_constants.js +12 -0
- package/build/cjs/packages/aurora/src/components/tag/tag_variants.js +23 -0
- package/build/cjs/packages/aurora/src/components/tag/tag_variants.js.map +1 -0
- package/build/cjs/packages/aurora/src/index.js +12 -2
- package/build/cjs/packages/aurora/src/index.js.map +1 -1
- package/build/esm/_virtual/_rollupPluginBabelHelpers.js +1 -49
- package/build/esm/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/build/esm/packages/aurora/src/assets/icons/lock_icon.d.ts +1 -0
- package/build/esm/packages/aurora/src/assets/icons/lock_icon.js +3 -0
- package/build/esm/packages/aurora/src/assets/icons/lock_icon.js.map +1 -0
- package/build/esm/packages/aurora/src/assets/icons/lock_unlock_ikon.d.ts +1 -0
- package/build/esm/packages/aurora/src/assets/icons/lock_unlock_ikon.js +3 -0
- package/build/esm/packages/aurora/src/assets/icons/lock_unlock_ikon.js.map +1 -0
- package/build/esm/packages/aurora/src/components/action_list/action_list.js +2 -2
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_content.js +3 -3
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_divider.js +2 -2
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_group.js +3 -3
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_item.js +3 -3
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_label.js +5 -5
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_radio_group.js +3 -3
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_radio_item.js +4 -4
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_sub_content.js +3 -3
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_sub_trigger.js +5 -5
- package/build/esm/packages/aurora/src/components/action_list/components/action_list_trigger.js +3 -3
- package/build/esm/packages/aurora/src/components/box/box.js +3 -3
- package/build/esm/packages/aurora/src/components/button/button.js +3 -3
- package/build/esm/packages/aurora/src/components/control/control.js +12 -4
- package/build/esm/packages/aurora/src/components/control/control.js.map +1 -1
- package/build/esm/packages/aurora/src/components/controls/input_control/input_control.d.ts +3 -0
- package/build/esm/packages/aurora/src/components/controls/input_control/input_control.js +55 -0
- package/build/esm/packages/aurora/src/components/controls/input_control/input_control_types.d.ts +7 -0
- package/build/esm/packages/aurora/src/components/controls/input_control/input_control_types.js +3 -0
- package/build/esm/packages/aurora/src/components/controls/input_control/input_control_types.js.map +1 -0
- package/build/esm/packages/aurora/src/components/controls/switch_control/switch_control.js +47 -13
- package/build/esm/packages/aurora/src/components/controls/switch_control/switch_control.js.map +1 -1
- package/build/esm/packages/aurora/src/components/divider/divider.js +3 -3
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_close.js +1 -1
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_close.js.map +1 -1
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_content.js +1 -1
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_content.js.map +1 -1
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_portal.js +1 -1
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_portal.js.map +1 -1
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_title.js +1 -1
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_title.js.map +1 -1
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_trigger.js +1 -1
- package/build/esm/packages/aurora/src/components/drawer/components/drawer_trigger.js.map +1 -1
- package/build/esm/packages/aurora/src/components/drawer/context/drawer_context.js +2 -2
- package/build/esm/packages/aurora/src/components/drawer/drawer.js +1 -1
- package/build/esm/packages/aurora/src/components/drawer/drawer.js.map +1 -1
- package/build/esm/packages/aurora/src/components/icon_button/icon_button.js +4 -4
- package/build/esm/packages/aurora/src/components/input/input.d.ts +3 -0
- package/build/esm/packages/aurora/src/components/input/input.js +51 -0
- package/build/esm/{external/@radix-ui/react-use-controllable-state/dist/index.mjs.js.map → packages/aurora/src/components/input/input.js.map} +1 -1
- package/build/esm/packages/aurora/src/components/input/input_types.d.ts +8 -0
- package/build/esm/packages/aurora/src/components/input/input_types.js +3 -0
- package/build/esm/packages/aurora/src/components/input/input_types.js.map +1 -0
- package/build/esm/packages/aurora/src/components/input/input_variants.d.ts +1 -0
- package/build/esm/packages/aurora/src/components/input/input_variants.js +6 -0
- package/build/esm/packages/aurora/src/components/input/input_variants.js.map +1 -0
- package/build/esm/packages/aurora/src/components/label/components/label_content.js +4 -4
- package/build/esm/packages/aurora/src/components/link/link.js +3 -3
- package/build/esm/packages/aurora/src/components/loader/loader.js +2 -2
- package/build/esm/packages/aurora/src/components/message_box/message_box.js +11 -11
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal.js +5 -5
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal_close_icon.js +3 -3
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal_footer.js +2 -2
- package/build/esm/packages/aurora/src/components/modal/components/modal/modal_header.js +4 -4
- package/build/esm/packages/aurora/src/components/modal/components/modals_wrapper.js +4 -4
- package/build/esm/packages/aurora/src/components/modal/modals_manager.js +3 -3
- package/build/esm/packages/aurora/src/components/segmented_control/components/segmented_control_item.js +4 -4
- package/build/esm/packages/aurora/src/components/segmented_control/context/segmented_control_context.js +2 -2
- package/build/esm/packages/aurora/src/components/segmented_control/segmented_control.js +4 -4
- package/build/esm/packages/aurora/src/components/sidebar/components/sidebar_trigger.js +3 -3
- package/build/esm/packages/aurora/src/components/sidebar/context/sidebar_context.js +2 -2
- package/build/esm/packages/aurora/src/components/sidebar/hooks/use_sidebar.js +2 -2
- package/build/esm/packages/aurora/src/components/stack/stack.js +3 -3
- package/build/esm/packages/aurora/src/components/switch/switch.js +34 -9
- package/build/esm/packages/aurora/src/components/switch/switch.js.map +1 -1
- package/build/esm/packages/aurora/src/components/tabs/context/tabs_context.js +2 -2
- package/build/esm/packages/aurora/src/components/tabs/tabs.js +4 -4
- package/build/esm/packages/aurora/src/components/tag/tag.js +39 -16
- package/build/esm/packages/aurora/src/components/tag/tag.js.map +1 -1
- package/build/esm/packages/aurora/src/components/tag/tag_constants.js +7 -5
- package/build/esm/packages/aurora/src/components/tag/tag_constants.js.map +1 -1
- package/build/esm/packages/aurora/src/components/tag/tag_variants.js +18 -18
- package/build/esm/packages/aurora/src/components/tag/tag_variants.js.map +1 -1
- package/build/esm/packages/aurora/src/components/typography/typography.js +2 -2
- package/build/esm/packages/aurora/src/components/values_syncer/values_syncer.d.ts +16 -0
- package/build/esm/packages/aurora/src/components/values_syncer/values_syncer.js +41 -0
- package/build/esm/packages/aurora/src/components/values_syncer/values_syncer.js.map +1 -0
- package/build/esm/packages/aurora/src/hooks/search/use_search.js +12 -22
- package/build/esm/packages/aurora/src/hooks/search/use_search.js.map +1 -1
- package/build/esm/packages/aurora/src/index.d.ts +6 -1
- package/build/esm/packages/aurora/src/index.js +6 -1
- package/build/esm/packages/aurora/src/index.js.map +1 -1
- package/build/esm/packages/aurora/src/utilities/fuzzy_search.js +61 -55
- package/build/esm/packages/aurora/src/utilities/fuzzy_search.js.map +1 -1
- package/build/index.css +1 -1
- package/package.json +3 -2
- package/build/cjs/external/@radix-ui/primitive/dist/index.mjs.js +0 -19
- package/build/cjs/external/@radix-ui/primitive/dist/index.mjs.js.map +0 -1
- package/build/cjs/external/@radix-ui/react-compose-refs/dist/index.mjs.js +0 -34
- package/build/cjs/external/@radix-ui/react-compose-refs/dist/index.mjs.js.map +0 -1
- package/build/cjs/external/@radix-ui/react-context/dist/index.mjs.js +0 -111
- package/build/cjs/external/@radix-ui/react-context/dist/index.mjs.js.map +0 -1
- package/build/cjs/external/@radix-ui/react-dialog/dist/index.mjs.js +0 -390
- package/build/cjs/external/@radix-ui/react-dialog/dist/index.mjs.js.map +0 -1
- package/build/cjs/external/@radix-ui/react-dismissable-layer/dist/index.mjs.js +0 -247
- package/build/cjs/external/@radix-ui/react-dismissable-layer/dist/index.mjs.js.map +0 -1
- package/build/cjs/external/@radix-ui/react-focus-guards/dist/index.mjs.js +0 -37
- package/build/cjs/external/@radix-ui/react-focus-scope/dist/index.mjs.js +0 -286
- package/build/cjs/external/@radix-ui/react-focus-scope/dist/index.mjs.js.map +0 -1
- package/build/cjs/external/@radix-ui/react-id/dist/index.mjs.js +0 -49
- package/build/cjs/external/@radix-ui/react-id/dist/index.mjs.js.map +0 -1
- package/build/cjs/external/@radix-ui/react-portal/dist/index.mjs.js +0 -37
- package/build/cjs/external/@radix-ui/react-portal/dist/index.mjs.js.map +0 -1
- package/build/cjs/external/@radix-ui/react-presence/dist/index.mjs.js +0 -149
- package/build/cjs/external/@radix-ui/react-presence/dist/index.mjs.js.map +0 -1
- package/build/cjs/external/@radix-ui/react-primitive/dist/index.mjs.js +0 -36
- package/build/cjs/external/@radix-ui/react-primitive/dist/index.mjs.js.map +0 -1
- package/build/cjs/external/@radix-ui/react-use-callback-ref/dist/index.mjs.js +0 -25
- package/build/cjs/external/@radix-ui/react-use-callback-ref/dist/index.mjs.js.map +0 -1
- package/build/cjs/external/@radix-ui/react-use-controllable-state/dist/index.mjs.js +0 -53
- package/build/cjs/external/@radix-ui/react-use-escape-keydown/dist/index.mjs.js +0 -30
- package/build/cjs/external/@radix-ui/react-use-escape-keydown/dist/index.mjs.js.map +0 -1
- package/build/cjs/external/@radix-ui/react-use-layout-effect/dist/index.mjs.js +0 -11
- package/build/cjs/external/@radix-ui/react-use-layout-effect/dist/index.mjs.js.map +0 -1
- package/build/cjs/external/aria-hidden/dist/es2015/index.js +0 -141
- package/build/cjs/external/aria-hidden/dist/es2015/index.js.map +0 -1
- package/build/cjs/external/get-nonce/dist/es2015/index.js +0 -13
- package/build/cjs/external/get-nonce/dist/es2015/index.js.map +0 -1
- package/build/cjs/external/react-remove-scroll/dist/es2015/Combination.js +0 -14
- package/build/cjs/external/react-remove-scroll/dist/es2015/Combination.js.map +0 -1
- package/build/cjs/external/react-remove-scroll/dist/es2015/SideEffect.js +0 -167
- package/build/cjs/external/react-remove-scroll/dist/es2015/SideEffect.js.map +0 -1
- package/build/cjs/external/react-remove-scroll/dist/es2015/UI.js +0 -43
- package/build/cjs/external/react-remove-scroll/dist/es2015/UI.js.map +0 -1
- package/build/cjs/external/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -26
- package/build/cjs/external/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +0 -1
- package/build/cjs/external/react-remove-scroll/dist/es2015/handleScroll.js +0 -115
- package/build/cjs/external/react-remove-scroll/dist/es2015/handleScroll.js.map +0 -1
- package/build/cjs/external/react-remove-scroll/dist/es2015/medium.js +0 -10
- package/build/cjs/external/react-remove-scroll/dist/es2015/medium.js.map +0 -1
- package/build/cjs/external/react-remove-scroll/dist/es2015/sidecar.js +0 -12
- package/build/cjs/external/react-remove-scroll/external/tslib/tslib.es6.mjs.js +0 -60
- package/build/cjs/external/react-remove-scroll/external/tslib/tslib.es6.mjs.js.map +0 -1
- package/build/cjs/external/react-remove-scroll-bar/dist/es2015/component.js +0 -63
- package/build/cjs/external/react-remove-scroll-bar/dist/es2015/constants.js +0 -18
- package/build/cjs/external/react-remove-scroll-bar/dist/es2015/constants.js.map +0 -1
- package/build/cjs/external/react-remove-scroll-bar/dist/es2015/utils.js +0 -37
- package/build/cjs/external/react-remove-scroll-bar/dist/es2015/utils.js.map +0 -1
- package/build/cjs/external/react-style-singleton/dist/es2015/component.js +0 -24
- package/build/cjs/external/react-style-singleton/dist/es2015/component.js.map +0 -1
- package/build/cjs/external/react-style-singleton/dist/es2015/hook.js +0 -30
- package/build/cjs/external/react-style-singleton/dist/es2015/hook.js.map +0 -1
- package/build/cjs/external/react-style-singleton/dist/es2015/singleton.js +0 -56
- package/build/cjs/external/use-callback-ref/dist/es2015/assignRef.js +0 -29
- package/build/cjs/external/use-callback-ref/dist/es2015/assignRef.js.map +0 -1
- package/build/cjs/external/use-callback-ref/dist/es2015/useMergeRef.js +0 -53
- package/build/cjs/external/use-callback-ref/dist/es2015/useMergeRef.js.map +0 -1
- package/build/cjs/external/use-callback-ref/dist/es2015/useRef.js +0 -47
- package/build/cjs/external/use-sidecar/dist/es2015/exports.js +0 -26
- package/build/cjs/external/use-sidecar/dist/es2015/exports.js.map +0 -1
- package/build/cjs/external/use-sidecar/dist/es2015/medium.js +0 -82
- package/build/cjs/external/use-sidecar/dist/es2015/medium.js.map +0 -1
- package/build/cjs/external/use-sidecar/external/tslib/tslib.es6.mjs.js +0 -49
- package/build/cjs/external/use-sidecar/external/tslib/tslib.es6.mjs.js.map +0 -1
- package/build/cjs/external/vaul/dist/index.mjs.js +0 -1666
- package/build/cjs/external/vaul/dist/index.mjs.js.map +0 -1
- package/build/cjs/packages/aurora/src/hooks/search/use_search.js +0 -28
- package/build/cjs/packages/aurora/src/hooks/search/use_search.js.map +0 -1
- package/build/cjs/packages/aurora/src/utilities/fuzzy_search.js +0 -65
- package/build/cjs/packages/aurora/src/utilities/fuzzy_search.js.map +0 -1
- package/build/esm/external/@radix-ui/primitive/dist/index.mjs.js +0 -15
- package/build/esm/external/@radix-ui/primitive/dist/index.mjs.js.map +0 -1
- package/build/esm/external/@radix-ui/react-compose-refs/dist/index.mjs.js +0 -29
- package/build/esm/external/@radix-ui/react-compose-refs/dist/index.mjs.js.map +0 -1
- package/build/esm/external/@radix-ui/react-context/dist/index.mjs.js +0 -106
- package/build/esm/external/@radix-ui/react-context/dist/index.mjs.js.map +0 -1
- package/build/esm/external/@radix-ui/react-dialog/dist/index.mjs.js +0 -369
- package/build/esm/external/@radix-ui/react-dialog/dist/index.mjs.js.map +0 -1
- package/build/esm/external/@radix-ui/react-dismissable-layer/dist/index.mjs.js +0 -242
- package/build/esm/external/@radix-ui/react-dismissable-layer/dist/index.mjs.js.map +0 -1
- package/build/esm/external/@radix-ui/react-focus-guards/dist/index.mjs.js +0 -33
- package/build/esm/external/@radix-ui/react-focus-guards/dist/index.mjs.js.map +0 -1
- package/build/esm/external/@radix-ui/react-focus-scope/dist/index.mjs.js +0 -282
- package/build/esm/external/@radix-ui/react-focus-scope/dist/index.mjs.js.map +0 -1
- package/build/esm/external/@radix-ui/react-id/dist/index.mjs.js +0 -24
- package/build/esm/external/@radix-ui/react-id/dist/index.mjs.js.map +0 -1
- package/build/esm/external/@radix-ui/react-portal/dist/index.mjs.js +0 -29
- package/build/esm/external/@radix-ui/react-portal/dist/index.mjs.js.map +0 -1
- package/build/esm/external/@radix-ui/react-presence/dist/index.mjs.js +0 -145
- package/build/esm/external/@radix-ui/react-presence/dist/index.mjs.js.map +0 -1
- package/build/esm/external/@radix-ui/react-primitive/dist/index.mjs.js +0 -31
- package/build/esm/external/@radix-ui/react-primitive/dist/index.mjs.js.map +0 -1
- package/build/esm/external/@radix-ui/react-use-callback-ref/dist/index.mjs.js +0 -21
- package/build/esm/external/@radix-ui/react-use-controllable-state/dist/index.mjs.js +0 -49
- package/build/esm/external/@radix-ui/react-use-escape-keydown/dist/index.mjs.js +0 -26
- package/build/esm/external/@radix-ui/react-use-escape-keydown/dist/index.mjs.js.map +0 -1
- package/build/esm/external/@radix-ui/react-use-layout-effect/dist/index.mjs.js +0 -7
- package/build/esm/external/@radix-ui/react-use-layout-effect/dist/index.mjs.js.map +0 -1
- package/build/esm/external/aria-hidden/dist/es2015/index.js +0 -137
- package/build/esm/external/aria-hidden/dist/es2015/index.js.map +0 -1
- package/build/esm/external/get-nonce/dist/es2015/index.js +0 -9
- package/build/esm/external/get-nonce/dist/es2015/index.js.map +0 -1
- package/build/esm/external/react-remove-scroll/dist/es2015/Combination.js +0 -10
- package/build/esm/external/react-remove-scroll/dist/es2015/Combination.js.map +0 -1
- package/build/esm/external/react-remove-scroll/dist/es2015/SideEffect.js +0 -161
- package/build/esm/external/react-remove-scroll/dist/es2015/SideEffect.js.map +0 -1
- package/build/esm/external/react-remove-scroll/dist/es2015/UI.js +0 -39
- package/build/esm/external/react-remove-scroll/dist/es2015/UI.js.map +0 -1
- package/build/esm/external/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -22
- package/build/esm/external/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +0 -1
- package/build/esm/external/react-remove-scroll/dist/es2015/handleScroll.js +0 -110
- package/build/esm/external/react-remove-scroll/dist/es2015/handleScroll.js.map +0 -1
- package/build/esm/external/react-remove-scroll/dist/es2015/medium.js +0 -6
- package/build/esm/external/react-remove-scroll/dist/es2015/medium.js.map +0 -1
- package/build/esm/external/react-remove-scroll/dist/es2015/sidecar.js +0 -8
- package/build/esm/external/react-remove-scroll/dist/es2015/sidecar.js.map +0 -1
- package/build/esm/external/react-remove-scroll/external/tslib/tslib.es6.mjs.js +0 -55
- package/build/esm/external/react-remove-scroll-bar/dist/es2015/component.js +0 -57
- package/build/esm/external/react-remove-scroll-bar/dist/es2015/component.js.map +0 -1
- package/build/esm/external/react-remove-scroll-bar/dist/es2015/constants.js +0 -11
- package/build/esm/external/react-remove-scroll-bar/dist/es2015/constants.js.map +0 -1
- package/build/esm/external/react-remove-scroll-bar/dist/es2015/utils.js +0 -32
- package/build/esm/external/react-remove-scroll-bar/dist/es2015/utils.js.map +0 -1
- package/build/esm/external/react-style-singleton/dist/es2015/component.js +0 -20
- package/build/esm/external/react-style-singleton/dist/es2015/component.js.map +0 -1
- package/build/esm/external/react-style-singleton/dist/es2015/hook.js +0 -26
- package/build/esm/external/react-style-singleton/dist/es2015/hook.js.map +0 -1
- package/build/esm/external/react-style-singleton/dist/es2015/singleton.js +0 -52
- package/build/esm/external/react-style-singleton/dist/es2015/singleton.js.map +0 -1
- package/build/esm/external/use-callback-ref/dist/es2015/assignRef.js +0 -25
- package/build/esm/external/use-callback-ref/dist/es2015/assignRef.js.map +0 -1
- package/build/esm/external/use-callback-ref/dist/es2015/useMergeRef.js +0 -49
- package/build/esm/external/use-callback-ref/dist/es2015/useMergeRef.js.map +0 -1
- package/build/esm/external/use-callback-ref/dist/es2015/useRef.js +0 -43
- package/build/esm/external/use-callback-ref/dist/es2015/useRef.js.map +0 -1
- package/build/esm/external/use-sidecar/dist/es2015/exports.js +0 -22
- package/build/esm/external/use-sidecar/dist/es2015/exports.js.map +0 -1
- package/build/esm/external/use-sidecar/dist/es2015/medium.js +0 -78
- package/build/esm/external/use-sidecar/dist/es2015/medium.js.map +0 -1
- package/build/esm/external/use-sidecar/external/tslib/tslib.es6.mjs.js +0 -45
- package/build/esm/external/use-sidecar/external/tslib/tslib.es6.mjs.js.map +0 -1
- package/build/esm/external/vaul/dist/index.mjs.js +0 -1652
- package/build/esm/external/vaul/dist/index.mjs.js.map +0 -1
- /package/build/{esm/external/@radix-ui/react-use-callback-ref/dist/index.mjs.js.map → cjs/packages/aurora/src/components/control/control.js.map} +0 -0
- /package/build/cjs/{external/react-remove-scroll-bar/dist/es2015/component.js.map → packages/aurora/src/components/controls/input_control/input_control.js.map} +0 -0
- /package/build/cjs/{external/react-style-singleton/dist/es2015/singleton.js.map → packages/aurora/src/components/controls/switch_control/switch_control.js.map} +0 -0
- /package/build/cjs/{external/react-remove-scroll/dist/es2015/sidecar.js.map → packages/aurora/src/components/tag/tag_constants.js.map} +0 -0
- /package/build/esm/{external/react-remove-scroll/external/tslib/tslib.es6.mjs.js.map → packages/aurora/src/components/controls/input_control/input_control.js.map} +0 -0
|
@@ -1,11 +1,36 @@
|
|
|
1
|
-
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import
|
|
4
|
-
import '
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
+
import classnames from '../../../../../external/classnames/index.js';
|
|
4
|
+
import { Root, SwitchThumb } from '@radix-ui/react-switch';
|
|
5
|
+
|
|
6
|
+
var _excluded = ["id", "name", "value", "className", "disabled", "checked", "defaultChecked", "errors", "onCheckedChange"];
|
|
7
|
+
var Switch = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
8
|
+
var id = _ref.id,
|
|
9
|
+
name = _ref.name,
|
|
10
|
+
value = _ref.value,
|
|
11
|
+
className = _ref.className,
|
|
12
|
+
disabled = _ref.disabled,
|
|
13
|
+
checked = _ref.checked,
|
|
14
|
+
defaultChecked = _ref.defaultChecked,
|
|
15
|
+
_ref$errors = _ref.errors,
|
|
16
|
+
errors = _ref$errors === void 0 ? [] : _ref$errors,
|
|
17
|
+
onCheckedChange = _ref.onCheckedChange,
|
|
18
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
19
|
+
return /*#__PURE__*/React.createElement(Root, _objectSpread2({
|
|
20
|
+
id: id,
|
|
21
|
+
name: name,
|
|
22
|
+
value: value,
|
|
23
|
+
ref: ref,
|
|
24
|
+
className: classnames('aurora-inline-flex aurora-items-center aurora-relative aurora-w-11 aurora-h-6 aurora-rounded-full aurora-bg-active hover:aurora-ring-2 hover:aurora-ring-subtle focus:aurora-ring-2 focus:aurora-ring-primary focus:aurora-outline-none focus:aurora-ring-offset aurora-cursor-pointer aurora-transition-all data-[state=checked]:aurora-bg-primary', disabled && 'aurora-cursor-not-allowed aurora-pointer-events-none aurora-bg-neutral-300 data-[state=checked]:!aurora-bg-active', errors && errors.length > 0 && 'aurora-ring-danger aurora-ring-2', className),
|
|
25
|
+
disabled: disabled,
|
|
26
|
+
defaultChecked: defaultChecked,
|
|
27
|
+
checked: checked,
|
|
28
|
+
onCheckedChange: onCheckedChange
|
|
29
|
+
}, props), /*#__PURE__*/React.createElement(SwitchThumb, {
|
|
30
|
+
className: classnames('aurora-block aurora-w-5 aurora-h-5 aurora-rounded-full aurora-transition-transform', disabled ? 'aurora-bg-subtle' : 'aurora-bg', 'data-[state=checked]:aurora-translate-x-[22px] aurora-translate-x-[2px]')
|
|
31
|
+
}));
|
|
9
32
|
});
|
|
10
|
-
Switch.displayName =
|
|
11
|
-
|
|
33
|
+
Switch.displayName = Root.displayName;
|
|
34
|
+
|
|
35
|
+
export { Switch };
|
|
36
|
+
//# sourceMappingURL=switch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA,uBAAuB,6CAAiD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { TABS_SIZE_TYPES, TABS_VARIANT_TYPES } from '../tabs_constants.js';
|
|
3
3
|
|
|
4
|
-
var TabsContext = /*#__PURE__*/
|
|
4
|
+
var TabsContext = /*#__PURE__*/React.createContext({
|
|
5
5
|
size: TABS_SIZE_TYPES.basic,
|
|
6
6
|
variant: TABS_VARIANT_TYPES.basic
|
|
7
7
|
});
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
3
|
import { TabsContext } from './context/tabs_context.js';
|
|
4
4
|
import { Root, Tabs as Tabs$1 } from '@radix-ui/react-tabs';
|
|
5
5
|
|
|
6
6
|
var _excluded = ["className", "size", "variant", "children"];
|
|
7
|
-
var Tabs = /*#__PURE__*/
|
|
7
|
+
var Tabs = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
8
8
|
var className = _ref.className,
|
|
9
9
|
size = _ref.size,
|
|
10
10
|
variant = _ref.variant,
|
|
11
11
|
children = _ref.children,
|
|
12
12
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
13
|
-
return /*#__PURE__*/
|
|
13
|
+
return /*#__PURE__*/React.createElement(Root, _objectSpread2({
|
|
14
14
|
ref: ref
|
|
15
|
-
}, props), /*#__PURE__*/
|
|
15
|
+
}, props), /*#__PURE__*/React.createElement(TabsContext.Provider, {
|
|
16
16
|
value: {
|
|
17
17
|
size: size,
|
|
18
18
|
variant: variant
|
|
@@ -1,16 +1,39 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import '
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { createElement } from 'react';
|
|
2
|
+
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
+
import { cn } from '../../utilities/cn.js';
|
|
4
|
+
import { CloseLineIcon } from '../../assets/icons/close_icon.js';
|
|
5
|
+
import classnames from '../../../../../external/classnames/index.js';
|
|
6
|
+
import { tagVariants } from './tag_variants.js';
|
|
7
|
+
|
|
8
|
+
var _excluded = ["className", "label", "variant", "disabled", "onDelete"];
|
|
9
|
+
var Tag = function Tag(_ref) {
|
|
10
|
+
var className = _ref.className,
|
|
11
|
+
label = _ref.label,
|
|
12
|
+
_ref$variant = _ref.variant,
|
|
13
|
+
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
14
|
+
_ref$disabled = _ref.disabled,
|
|
15
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
16
|
+
onDelete = _ref.onDelete,
|
|
17
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
+
return /*#__PURE__*/createElement("div", _objectSpread2(_objectSpread2({
|
|
19
|
+
className: cn(tagVariants({
|
|
20
|
+
variant: variant,
|
|
21
|
+
disabled: disabled
|
|
22
|
+
}), className, {
|
|
23
|
+
'aurora-pointer-events-none': disabled
|
|
24
|
+
})
|
|
25
|
+
}, props), {}, {
|
|
26
|
+
"aria-disabled": disabled
|
|
27
|
+
}), /*#__PURE__*/createElement("span", null, label), variant === 'deletable' && (/*#__PURE__*/createElement("button", {
|
|
28
|
+
className: "aurora-bg-transparent hover:aurora-bg-active aurora-rounded-2 focus",
|
|
29
|
+
onClick: function onClick(e) {
|
|
30
|
+
e.stopPropagation();
|
|
31
|
+
onDelete === null || onDelete === void 0 ? void 0 : onDelete();
|
|
32
|
+
}
|
|
33
|
+
}, /*#__PURE__*/createElement(CloseLineIcon, {
|
|
34
|
+
className: classnames("aurora-w-5 aurora-h-5 aurora-fill-subtle hover:aurora-fill", disabled && "aurora-fill-disabled")
|
|
35
|
+
}))));
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { Tag };
|
|
39
|
+
//# sourceMappingURL=tag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,uBAAuB,6CAAiD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
var TAG_VARIANTS = {
|
|
2
|
+
default: 'default',
|
|
3
|
+
clickable: 'clickable',
|
|
4
|
+
deletable: 'deletable'
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
export { TAG_VARIANTS };
|
|
8
|
+
//# sourceMappingURL=tag_constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
variant: TAG_VARIANTS.default,
|
|
17
|
-
},
|
|
1
|
+
import { defineProperty as _defineProperty } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import { cva } from '../../../../../external/class-variance-authority/dist/index.mjs.js';
|
|
3
|
+
import { TAG_VARIANTS } from './tag_constants.js';
|
|
4
|
+
|
|
5
|
+
var tagVariants = cva('aurora-inline-flex aurora-gap-1 aurora-items-center aurora-text-xs aurora-font-weight-medium aurora-py-0.5 aurora-pr-1.5 aurora-pl-2 aurora-rounded-4', {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: _defineProperty(_defineProperty(_defineProperty({}, TAG_VARIANTS.default, 'aurora-bg-subtle aurora-text-primary aurora-pr-2 aurora-pl-2'), TAG_VARIANTS.clickable, 'aurora-bg-subtle aurora-cursor-pointer aurora-pr-2 aurora-pl-2 hover:aurora-bg-active focus'), TAG_VARIANTS.deletable, 'aurora-bg-subtle'),
|
|
8
|
+
disabled: {
|
|
9
|
+
true: 'aurora-bg-disabled aurora-text-disabled aurora-cursor-not-allowed aurora-text-inverse-subtle',
|
|
10
|
+
false: ''
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
variant: TAG_VARIANTS.default
|
|
15
|
+
}
|
|
18
16
|
});
|
|
19
|
-
|
|
17
|
+
|
|
18
|
+
export { tagVariants };
|
|
19
|
+
//# sourceMappingURL=tag_variants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,oBAAoB,oEAAwE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2, defineProperty as _defineProperty } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
3
|
import { cn } from '../../utilities/cn.js';
|
|
4
4
|
import { typographyVariants } from './typography_variants.js';
|
|
@@ -17,7 +17,7 @@ var Typography = function Typography(_ref) {
|
|
|
17
17
|
children = _ref.children,
|
|
18
18
|
className = _ref.className,
|
|
19
19
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
-
return /*#__PURE__*/
|
|
20
|
+
return /*#__PURE__*/React.createElement(as, _objectSpread2({
|
|
21
21
|
className: cn(typographyVariants({
|
|
22
22
|
variant: variant,
|
|
23
23
|
transform: transform,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type TValuesSyncerProps = {
|
|
3
|
+
firstControl: (value: unknown, setValue: (value: unknown) => void) => React.ReactNode;
|
|
4
|
+
secondControl: (value: unknown, setValue: (value: unknown) => void) => React.ReactNode;
|
|
5
|
+
initialFirstValue?: unknown;
|
|
6
|
+
initialSecondValue?: unknown;
|
|
7
|
+
isLocked?: boolean;
|
|
8
|
+
onLock?: (isLocked: boolean) => void;
|
|
9
|
+
onChange?: (props: {
|
|
10
|
+
first: unknown;
|
|
11
|
+
second: unknown;
|
|
12
|
+
isLocked: boolean;
|
|
13
|
+
}) => void;
|
|
14
|
+
};
|
|
15
|
+
declare const ValuesSyncer: React.FC<TValuesSyncerProps>;
|
|
16
|
+
export default ValuesSyncer;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { LockLine } from '@auroraAssets/icons/lock_icon';
|
|
2
|
+
import { LockUnlockLine } from '@auroraAssets/icons/lock_unlock_ikon';
|
|
3
|
+
import { Stack } from '@auroraComponents/stack/stack';
|
|
4
|
+
import React, { useEffect, useState } from 'react';
|
|
5
|
+
const ValuesSyncer = ({ firstControl, secondControl, initialFirstValue, initialSecondValue, isLocked = false, onLock, onChange, }) => {
|
|
6
|
+
const [locked, setLocked] = useState(isLocked);
|
|
7
|
+
const [firstControlValue, setFirstControlValue] = useState(initialFirstValue);
|
|
8
|
+
const [secondControlValue, setSecondControlValue] = useState(initialSecondValue);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
onLock?.(locked);
|
|
11
|
+
if (locked) {
|
|
12
|
+
setSecondControlValue(firstControlValue);
|
|
13
|
+
}
|
|
14
|
+
}, [locked]);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
setFirstControlValue(initialFirstValue);
|
|
17
|
+
setSecondControlValue(initialSecondValue);
|
|
18
|
+
}, [initialFirstValue, initialSecondValue]);
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
onChange?.({ first: firstControlValue, second: secondControlValue, isLocked: locked });
|
|
21
|
+
}, [firstControlValue, secondControlValue, locked]);
|
|
22
|
+
const handleFirstControlChange = (value) => {
|
|
23
|
+
setFirstControlValue(value);
|
|
24
|
+
if (locked) {
|
|
25
|
+
setSecondControlValue(value);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const handleSecondControlChange = (value) => {
|
|
29
|
+
setSecondControlValue(value);
|
|
30
|
+
if (locked) {
|
|
31
|
+
setFirstControlValue(value);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const toggleLock = () => setLocked((prev) => !prev);
|
|
35
|
+
return (React.createElement(Stack, { spacing: "16", align: "end" },
|
|
36
|
+
firstControl(firstControlValue, handleFirstControlChange),
|
|
37
|
+
React.createElement("button", { "aria-label": "Lock values", type: "button", onClick: toggleLock }, locked ? React.createElement(LockLine, null) : React.createElement(LockUnlockLine, null)),
|
|
38
|
+
secondControl(secondControlValue, handleSecondControlChange)));
|
|
39
|
+
};
|
|
40
|
+
export default ValuesSyncer;
|
|
41
|
+
//# sourceMappingURL=values_syncer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"values_syncer.js","sourceRoot":"","sources":["../../../../../../../src/components/values_syncer/values_syncer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAYnD,MAAM,YAAY,GAAiC,CAAC,EAClD,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,QAAQ,GAAG,KAAK,EAChB,MAAM,EACN,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC/C,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAU,iBAAiB,CAAC,CAAC;IACvF,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,QAAQ,CAAU,kBAAkB,CAAC,CAAC;IAE1F,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC;QAEjB,IAAI,MAAM,EAAE;YACV,qBAAqB,CAAC,iBAAiB,CAAC,CAAC;SAC1C;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,SAAS,CAAC,GAAG,EAAE;QACb,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;QACxC,qBAAqB,CAAC,kBAAkB,CAAC,CAAC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from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
_items = _useState2[0],
|
|
13
|
-
setItems = _useState2[1];
|
|
14
|
-
var search = function search(query) {
|
|
15
|
-
setItems(searchStrategy(query, items, searchKey));
|
|
16
|
-
};
|
|
17
|
-
return {
|
|
18
|
-
search: search,
|
|
19
|
-
items: _items
|
|
20
|
-
};
|
|
3
|
+
import { fuzzySearch } from '@auroraUtilities/fuzzy_search';
|
|
4
|
+
export const useSearch = ({ items, searchKey, searchStrategy = fuzzySearch }) => {
|
|
5
|
+
const [_items, setItems] = useState(items);
|
|
6
|
+
const search = (query) => {
|
|
7
|
+
setItems(searchStrategy(query, items, searchKey));
|
|
8
|
+
};
|
|
9
|
+
return {
|
|
10
|
+
search,
|
|
11
|
+
items: _items
|
|
12
|
+
};
|
|
21
13
|
};
|
|
22
|
-
|
|
23
|
-
export { useSearch };
|
|
24
|
-
//# sourceMappingURL=use_search.js.map
|
|
14
|
+
//# sourceMappingURL=use_search.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":
|
|
1
|
+
{"version":3,"file":"use_search.js","sourceRoot":"","sources":["../../../../../../../src/hooks/search/use_search.ts"],"names":[],"mappings":"AAAA,OAA4D,sCAAsC,CAAC;AACnG,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,MAAM,CAAC,MAAM,SAAS,GAAG,CAAsC,EAC3D,KAAK,EACL,SAAS,EACT,cAAc,GAAG,WAAW,EACX,EAAoB,EAAE;IACvC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE3C,MAAM,MAAM,GAAG,CAAC,KAAa,EAAQ,EAAE;QACnC,QAAQ,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;IACtD,CAAC,CAAC;IAEF,OAAO;QACH,MAAM;QACN,KAAK,EAAE,MAAwB;KAClC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -81,4 +81,9 @@ export { DrawerContent } from "./components/drawer/components/drawer_content";
|
|
|
81
81
|
export { DrawerTitle } from "./components/drawer/components/drawer_title";
|
|
82
82
|
export { DrawerClose } from "./components/drawer/components/drawer_close";
|
|
83
83
|
export { DRAWER_DIRECTIONS } from "./components/drawer/drawer_constants";
|
|
84
|
-
export {
|
|
84
|
+
export { Tag } from "./components/tag/tag";
|
|
85
|
+
export { TAG_VARIANTS } from "./components/tag/tag_constants";
|
|
86
|
+
export { Switch } from "./components/switch/switch";
|
|
87
|
+
export { SwitchControl } from './components/controls/switch_control/switch_control';
|
|
88
|
+
export { Input } from "./components/input/input";
|
|
89
|
+
export { InputControl } from './components/controls/input_control/input_control';
|
|
@@ -78,5 +78,10 @@ export { DrawerTrigger } from './components/drawer/components/drawer_trigger.js'
|
|
|
78
78
|
export { DrawerContent } from './components/drawer/components/drawer_content.js';
|
|
79
79
|
export { DrawerClose } from './components/drawer/components/drawer_close.js';
|
|
80
80
|
export { DrawerTitle } from './components/drawer/components/drawer_title.js';
|
|
81
|
-
export {
|
|
81
|
+
export { TAG_VARIANTS } from './components/tag/tag_constants.js';
|
|
82
|
+
export { Tag } from './components/tag/tag.js';
|
|
83
|
+
export { Switch } from './components/switch/switch.js';
|
|
84
|
+
export { SwitchControl } from './components/controls/switch_control/switch_control.js';
|
|
85
|
+
export { Input } from './components/input/input.js';
|
|
86
|
+
export { InputControl } from './components/controls/input_control/input_control.js';
|
|
82
87
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,57 +1,63 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
* @param {string}
|
|
7
|
-
* @
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* {id:
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* ], 'text')
|
|
16
|
-
* @returns {Array} - filtered array
|
|
1
|
+
import { union } from 'lodash';
|
|
2
|
+
/**
|
|
3
|
+
* searches within array of objects by given key, returns filtered array of objects using fuzzy algorithm
|
|
4
|
+
* @param {string} query - the phrase by which it searches
|
|
5
|
+
* @param {Array<Object>} arrayToFilter - array which will be searched
|
|
6
|
+
* @param {string} key - key of object within arrayToFilter where search should be used
|
|
7
|
+
* @example
|
|
8
|
+
* // returns [{id: 1, text: 'polish'}, {id: 2, text: 'portugal'}]
|
|
9
|
+
* fuzzySearch('pol', [
|
|
10
|
+
* {id: 1, text: 'polish'},
|
|
11
|
+
* {id: 2, text: 'portugal'},
|
|
12
|
+
* {id: 3, text: 'english'}
|
|
13
|
+
* ], 'text')
|
|
14
|
+
* @returns {Array} - filtered array
|
|
17
15
|
*/
|
|
18
|
-
function fuzzySearch(query, arrayToFilter, key) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
16
|
+
export function fuzzySearch(query, arrayToFilter, key) {
|
|
17
|
+
if (query !== '' && query.search(/[-[\]/{}()*+?.\\^$|]/g) === -1) {
|
|
18
|
+
const exactSearch = new RegExp('^' + query + '$', 'i');
|
|
19
|
+
const firstSearch = new RegExp('^' + query, 'i');
|
|
20
|
+
const looseSearch = new RegExp('.*' + query + '.*', 'i');
|
|
21
|
+
const fuzzySearch = new RegExp('(^' + query + ')|(' + query + ')|(' + query.replace(/\s+/g, '').split('').join('.*') + ')', 'i');
|
|
22
|
+
const exact = [];
|
|
23
|
+
const first = [];
|
|
24
|
+
const loose = [];
|
|
25
|
+
const fuzzy = [];
|
|
26
|
+
console.log('arrayToFilter', arrayToFilter);
|
|
27
|
+
console.log('key', key);
|
|
28
|
+
arrayToFilter.forEach((option) => {
|
|
29
|
+
const searchBy = !key ? option.toString() : option[key].toString();
|
|
30
|
+
const textWithoutPolishSigns = searchBy
|
|
31
|
+
.replace(/ę/gi, 'e')
|
|
32
|
+
.replace(/ó/gi, 'o')
|
|
33
|
+
.replace(/ą/gi, 'a')
|
|
34
|
+
.replace(/ś/gi, 's')
|
|
35
|
+
.replace(/ł/gi, 'l')
|
|
36
|
+
.replace(/ż/gi, 'z')
|
|
37
|
+
.replace(/ź/gi, 'z')
|
|
38
|
+
.replace(/ć/gi, 'c')
|
|
39
|
+
.replace(/ń/gi, 'n');
|
|
40
|
+
if (searchBy.match(exactSearch) || textWithoutPolishSigns.match(exactSearch)) {
|
|
41
|
+
exact.push(option);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (searchBy.match(firstSearch) || textWithoutPolishSigns.match(firstSearch)) {
|
|
45
|
+
first.push(option);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (searchBy.match(looseSearch) || textWithoutPolishSigns.match(looseSearch)) {
|
|
49
|
+
loose.push(option);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (searchBy.match(fuzzySearch) || textWithoutPolishSigns.match(fuzzySearch)) {
|
|
53
|
+
fuzzy.push(option);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
return union(exact, first, loose, fuzzy);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
return [...arrayToFilter];
|
|
61
|
+
}
|
|
54
62
|
}
|
|
55
|
-
|
|
56
|
-
export { fuzzySearch };
|
|
57
|
-
//# sourceMappingURL=fuzzy_search.js.map
|
|
63
|
+
//# sourceMappingURL=fuzzy_search.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":
|
|
1
|
+
{"version":3,"file":"fuzzy_search.js","sourceRoot":"","sources":["../../../../../../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