@okam/stack-ui 1.37.1 → 1.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/components/Accordion/components/AccordionItem.d.ts +0 -1
- package/components/Alerts/components/AlertsCloseButton.d.ts +0 -1
- package/components/Button/index.d.ts +1 -1
- package/components/Button/interface.d.ts +6 -0
- package/components/Carousel/components/CarouselNavigationButton.d.ts +1 -2
- package/components/TabList/components/Tab.d.ts +1 -1
- package/components/TabList/tab-list.stories.d.ts +11 -0
- package/components/fields/CheckboxGroup/components/CheckboxGroupItem/index.d.ts +3 -3
- package/components/fields/DatePicker/components/Wrapper.d.ts +0 -1
- package/components/fields/ListBox/components/ListBoxSection.d.ts +4 -0
- package/components/fields/ListBox/index.d.ts +4 -0
- package/components/fields/ListBox/interface.d.ts +17 -0
- package/components/fields/ListBox/list-box.stories.d.ts +13 -0
- package/components/fields/Option/index.d.ts +4 -0
- package/components/fields/Option/interface.d.ts +15 -0
- package/components/fields/Select/Select.d.ts +2 -2
- package/components/fields/TextArea/index.d.ts +1 -1
- package/components/fields/TextInputField/index.d.ts +1 -1
- package/examples/PageLayout/index.d.ts +2 -0
- package/helpers/mergeDefaultComponentProps.d.ts +1 -1
- package/index102.js +1 -1
- package/index102.mjs +1 -1
- package/index103.js +1 -1
- package/index103.mjs +81 -21
- package/index104.js +1 -1
- package/index104.mjs +24 -8
- package/index105.js +1 -7
- package/index105.mjs +7 -13
- package/index106.js +6 -14
- package/index106.mjs +13 -65
- package/index107.js +15 -1
- package/index107.mjs +71 -7
- package/index108.js +1 -41
- package/index108.mjs +7 -106
- package/index109.js +32 -38
- package/index109.mjs +78 -74
- package/index11.js +1 -1
- package/index11.mjs +2 -2
- package/index110.js +46 -15
- package/index110.mjs +96 -19
- package/index111.js +16 -1
- package/index111.mjs +20 -37
- package/index112.js +1 -1
- package/index112.mjs +42 -48
- package/index113.js +1 -1
- package/index113.mjs +47 -22
- package/index114.js +1 -1
- package/index114.mjs +21 -61
- package/index115.js +1 -1
- package/index115.mjs +58 -24
- package/index116.js +1 -1
- package/index116.mjs +29 -52
- package/index117.js +1 -1
- package/index117.mjs +52 -4
- package/index118.js +1 -1
- package/index118.mjs +4 -11
- package/index119.js +1 -1
- package/index119.mjs +11 -14
- package/index120.js +1 -1
- package/index120.mjs +13 -37
- package/index121.js +1 -1
- package/index121.mjs +35 -20
- package/index122.js +1 -1
- package/index122.mjs +22 -43
- package/index123.js +1 -1
- package/index123.mjs +42 -18
- package/index124.js +1 -1
- package/index124.mjs +18 -36
- package/index125.js +1 -1
- package/index125.mjs +35 -13
- package/index126.js +1 -1
- package/index126.mjs +13 -238
- package/index127.js +1 -2
- package/index127.mjs +240 -12
- package/index128.js +1 -1
- package/index128.mjs +12 -38
- package/index129.js +2 -1
- package/index129.mjs +38 -10
- package/index13.js +1 -1
- package/index13.mjs +1 -1
- package/index130.js +1 -1
- package/index130.mjs +11 -39
- package/index131.js +1 -1
- package/index131.mjs +38 -23
- package/index132.js +1 -1
- package/index132.mjs +22 -21
- package/index133.js +1 -1
- package/index133.mjs +21 -41
- package/index134.js +1 -1
- package/index134.mjs +42 -25
- package/index135.js +1 -1
- package/index135.mjs +25 -40
- package/index136.js +1 -2
- package/index136.mjs +39 -56
- package/index137.js +2 -1
- package/index137.mjs +57 -38
- package/index138.js +1 -1
- package/index138.mjs +34 -26
- package/index139.js +1 -1
- package/index139.mjs +30 -7
- package/index14.js +1 -1
- package/index14.mjs +3 -3
- package/index140.js +1 -1
- package/index140.mjs +7 -8
- package/index141.js +1 -1
- package/index141.mjs +9 -30
- package/index142.js +1 -1
- package/index142.mjs +30 -15
- package/index143.js +1 -1
- package/index143.mjs +13 -15
- package/index144.js +1 -2
- package/index144.mjs +16 -47
- package/index145.js +2 -1
- package/index145.mjs +46 -36
- package/index146.js +1 -1
- package/index146.mjs +36 -27
- package/index147.js +1 -1
- package/index147.mjs +27 -20
- package/index148.js +1 -1
- package/index148.mjs +18 -32
- package/index149.js +1 -2
- package/index149.mjs +35 -21
- package/index150.js +1 -1
- package/index150.mjs +3 -3
- package/index151.js +1 -1
- package/index151.mjs +12 -21
- package/index152.js +1 -1
- package/index152.mjs +46 -6
- package/index153.js +2 -1
- package/index153.mjs +12 -11
- package/index154.js +1 -1
- package/index154.mjs +30 -46
- package/index155.js +1 -2
- package/index155.mjs +12 -13
- package/index156.js +1 -1
- package/index156.mjs +6 -30
- package/index157.js +2 -1
- package/index157.mjs +49 -11
- package/index158.js +1 -1
- package/index158.mjs +125 -5
- package/index159.js +1 -2
- package/index159.mjs +27 -49
- package/index16.js +1 -1
- package/index16.mjs +2 -2
- package/index160.js +1 -1
- package/index160.mjs +66 -118
- package/index161.js +1 -1
- package/index161.mjs +370 -62
- package/index162.js +1 -1
- package/index162.mjs +44 -379
- package/index163.js +1 -1
- package/index163.mjs +4 -47
- package/index164.js +1 -1
- package/index164.mjs +25 -4
- package/index165.js +1 -1
- package/index165.mjs +46 -23
- package/index166.js +1 -1
- package/index166.mjs +4 -46
- package/index167.js +1 -1
- package/index167.mjs +24 -5
- package/index168.js +1 -1
- package/index168.mjs +11 -23
- package/index169.js +1 -1
- package/index169.mjs +4 -12
- package/index17.js +1 -1
- package/index17.mjs +4 -4
- package/index170.js +1 -1
- package/index170.mjs +14 -4
- package/index171.js +1 -1
- package/index171.mjs +21 -14
- package/index172.js +1 -1
- package/index172.mjs +42 -21
- package/index173.js +1 -1
- package/index173.mjs +52 -37
- package/index174.js +1 -1
- package/index174.mjs +39 -55
- package/index175.js +1 -1
- package/index175.mjs +27 -40
- package/index176.js +1 -1
- package/index176.mjs +30 -27
- package/index177.js +1 -1
- package/index177.mjs +13 -30
- package/index178.js +1 -1
- package/index178.mjs +10 -14
- package/index179.js +1 -1
- package/index179.mjs +28 -10
- package/index18.js +1 -1
- package/index18.mjs +5 -5
- package/index180.js +1 -1
- package/index180.mjs +9 -28
- package/index181.js +1 -1
- package/index181.mjs +6 -9
- package/index182.js +1 -1
- package/index182.mjs +5 -6
- package/index183.js +1 -1
- package/index183.mjs +7 -5
- package/index184.js +1 -1
- package/index184.mjs +29 -7
- package/index185.js +1 -1
- package/index185.mjs +16 -27
- package/index186.js +1 -1
- package/index186.mjs +12 -17
- package/index187.js +1 -1
- package/index187.mjs +43 -13
- package/index188.js +1 -1
- package/index188.mjs +7 -42
- package/index189.js +1 -1
- package/index189.mjs +17 -8
- package/index19.js +1 -1
- package/index19.mjs +2 -2
- package/index190.js +1 -1
- package/index190.mjs +3 -18
- package/index191.js +1 -1
- package/index191.mjs +5 -3
- package/index192.js +1 -1
- package/index192.mjs +19 -4
- package/index193.js +1 -1
- package/index193.mjs +54 -19
- package/index194.js +1 -1
- package/index194.mjs +198 -49
- package/index195.js +1 -1
- package/index195.mjs +64 -27
- package/index196.js +1 -1
- package/index196.mjs +142 -123
- package/index197.js +1 -1
- package/index197.mjs +120 -130
- package/index198.js +1 -1
- package/index198.mjs +224 -44
- package/index199.js +1 -1
- package/index199.mjs +190 -14
- package/index2.js +1 -1
- package/index2.mjs +40 -38
- package/index20.js +1 -1
- package/index20.mjs +1 -1
- package/index200.js +1 -1
- package/index200.mjs +69 -95
- package/index201.js +1 -1
- package/index201.mjs +277 -104
- package/index202.js +1 -1
- package/index202.mjs +98 -4
- package/index203.js +1 -1
- package/index203.mjs +188 -3
- package/index204.js +1 -1
- package/index204.mjs +82 -123
- package/index205.js +1 -1
- package/index205.mjs +58 -29
- package/index206.js +1 -1
- package/index206.mjs +125 -50
- package/index207.js +1 -1
- package/index207.mjs +113 -41
- package/index208.js +1 -1
- package/index208.mjs +118 -33
- package/index209.js +1 -1
- package/index209.mjs +69 -110
- package/index210.js +1 -1
- package/index210.mjs +105 -72
- package/index211.js +1 -1
- package/index211.mjs +52 -101
- package/index212.js +1 -1
- package/index212.mjs +94 -98
- package/index213.js +1 -1
- package/index213.mjs +65 -135
- package/index214.js +1 -1
- package/index214.mjs +56 -197
- package/index215.js +1 -1
- package/index215.mjs +99 -22
- package/index216.js +5 -1
- package/index216.mjs +78 -47
- package/index217.js +1 -1
- package/index217.mjs +2019 -42
- package/index218.js +1 -1
- package/index218.mjs +54 -92
- package/index219.js +1 -1
- package/index219.mjs +189 -72
- package/index220.js +1 -1
- package/index220.mjs +133 -61
- package/index221.js +1 -1
- package/index221.mjs +197 -7
- package/index222.js +1 -1
- package/index222.mjs +22 -11
- package/index223.js +1 -1
- package/index223.mjs +46 -200
- package/index224.js +1 -1
- package/index224.mjs +45 -61
- package/index225.js +1 -1
- package/index225.mjs +93 -139
- package/index226.js +1 -1
- package/index226.mjs +72 -125
- package/index227.js +1 -1
- package/index227.mjs +62 -218
- package/index228.js +1 -1
- package/index228.mjs +7 -190
- package/index229.js +1 -1
- package/index229.mjs +11 -69
- package/index23.js +1 -1
- package/index23.mjs +2 -2
- package/index230.js +1 -1
- package/index230.mjs +116 -271
- package/index231.js +1 -1
- package/index231.mjs +129 -93
- package/index232.js +1 -1
- package/index232.mjs +44 -188
- package/index233.js +1 -1
- package/index233.mjs +14 -84
- package/index234.js +1 -1
- package/index234.mjs +95 -58
- package/index235.js +1 -1
- package/index235.mjs +105 -125
- package/index236.js +1 -1
- package/index236.mjs +4 -116
- package/index237.js +1 -1
- package/index237.mjs +3 -122
- package/index238.js +1 -1
- package/index238.mjs +123 -70
- package/index239.js +1 -1
- package/index239.mjs +25 -106
- package/index24.js +1 -1
- package/index24.mjs +3 -3
- package/index240.js +1 -1
- package/index240.mjs +51 -52
- package/index241.js +1 -1
- package/index241.mjs +44 -93
- package/index242.js +1 -1
- package/index242.mjs +36 -69
- package/index243.js +1 -1
- package/index243.mjs +111 -54
- package/index244.js +1 -1
- package/index244.mjs +77 -99
- package/index245.js +1 -5
- package/index245.mjs +101 -80
- package/index246.js +1 -1
- package/index246.mjs +97 -2025
- package/index247.js +1 -1
- package/index247.mjs +5 -59
- package/index248.js +1 -1
- package/index248.mjs +118 -185
- package/index249.js +1 -1
- package/index249.mjs +43 -5
- package/index25.js +1 -1
- package/index25.mjs +1 -1
- package/index250.js +1 -1
- package/index250.mjs +220 -111
- package/index251.js +1 -1
- package/index251.mjs +31 -43
- package/index252.js +1 -1
- package/index252.mjs +3 -230
- package/index253.js +1 -1
- package/index253.mjs +129 -30
- package/index254.js +1 -1
- package/index254.mjs +190 -3
- package/index255.js +1 -1
- package/index255.mjs +9 -4
- package/index256.js +1 -1
- package/index256.mjs +4 -5
- package/index257.js +1 -1
- package/index257.mjs +37 -5
- package/index258.js +1 -1
- package/index258.mjs +6 -5
- package/index259.js +1 -1
- package/index259.mjs +30 -5
- package/index26.js +1 -1
- package/index26.mjs +2 -2
- package/index260.js +1 -1
- package/index260.mjs +7 -5
- package/index261.js +1 -1
- package/index261.mjs +1 -1
- package/index262.js +1 -1
- package/index262.mjs +4 -4
- package/index263.js +1 -1
- package/index263.mjs +4 -4
- package/index264.js +1 -1
- package/index264.mjs +4 -4
- package/index265.js +1 -1
- package/index265.mjs +1 -1
- package/index266.js +1 -1
- package/index266.mjs +4 -4
- package/index267.js +1 -1
- package/index267.mjs +4 -4
- package/index268.js +1 -1
- package/index268.mjs +1 -1
- package/index269.js +1 -1
- package/index269.mjs +4 -4
- package/index270.js +1 -1
- package/index270.mjs +4 -4
- package/index271.js +1 -1
- package/index271.mjs +4 -4
- package/index272.js +1 -1
- package/index272.mjs +4 -4
- package/index273.js +1 -1
- package/index273.mjs +1 -1
- package/index274.js +1 -1
- package/index274.mjs +4 -4
- package/index275.js +1 -1
- package/index275.mjs +1 -1
- package/index276.js +1 -1
- package/index276.mjs +4 -4
- package/index277.js +1 -1
- package/index277.mjs +4 -4
- package/index278.js +1 -1
- package/index278.mjs +4 -4
- package/index279.js +1 -1
- package/index279.mjs +4 -4
- package/index28.js +1 -1
- package/index28.mjs +3 -3
- package/index280.js +1 -1
- package/index280.mjs +4 -4
- package/index281.js +1 -1
- package/index281.mjs +4 -4
- package/index282.js +1 -1
- package/index282.mjs +4 -4
- package/index283.js +1 -1
- package/index283.mjs +4 -4
- package/index284.js +1 -1
- package/index284.mjs +1 -1
- package/index285.js +1 -1
- package/index285.mjs +4 -4
- package/index286.js +1 -1
- package/index286.mjs +4 -4
- package/index287.js +1 -1
- package/index287.mjs +4 -4
- package/index288.js +1 -1
- package/index288.mjs +4 -4
- package/index289.js +1 -1
- package/index289.mjs +1 -1
- package/index29.js +1 -1
- package/index29.mjs +3 -3
- package/index290.js +1 -1
- package/index290.mjs +4 -130
- package/index291.js +1 -1
- package/index291.mjs +5 -191
- package/index292.js +1 -1
- package/index292.mjs +5 -10
- package/index293.js +1 -1
- package/index293.mjs +5 -4
- package/index294.js +1 -1
- package/index294.mjs +5 -37
- package/index295.js +1 -1
- package/index295.mjs +4 -5
- package/index296.js +1 -1
- package/index296.mjs +62 -29
- package/index297.js +1 -1
- package/index297.mjs +7 -7
- package/index298.js +1 -1
- package/index298.mjs +27 -62
- package/index299.js +1 -1
- package/index299.mjs +93 -7
- package/index30.js +1 -1
- package/index30.mjs +3 -3
- package/index300.js +1 -1
- package/index300.mjs +6 -24
- package/index301.js +1 -1
- package/index301.mjs +23 -90
- package/index302.js +1 -1
- package/index302.mjs +32 -8
- package/index303.js +1 -1
- package/index303.mjs +6 -25
- package/index304.js +1 -1
- package/index304.mjs +6 -33
- package/index305.js +1 -1
- package/index305.mjs +50 -6
- package/index306.js +1 -1
- package/index306.mjs +29 -6
- package/index307.js +1 -1
- package/index307.mjs +14 -50
- package/index308.js +1 -1
- package/index308.mjs +20 -28
- package/index309.js +1 -1
- package/index309.mjs +29 -14
- package/index310.js +1 -1
- package/index310.mjs +65 -20
- package/index311.js +1 -1
- package/index311.mjs +53 -29
- package/index312.js +1 -1
- package/index312.mjs +51 -63
- package/index313.js +1 -1
- package/index313.mjs +271 -43
- package/index314.js +1 -1
- package/index314.mjs +18 -52
- package/index315.js +1 -1
- package/index315.mjs +3 -281
- package/index316.js +1 -1
- package/index316.mjs +4 -20
- package/index317.js +1 -1
- package/index317.mjs +8 -3
- package/index318.js +1 -1
- package/index318.mjs +5 -4
- package/index319.js +1 -1
- package/index319.mjs +30 -8
- package/index32.js +1 -1
- package/index32.mjs +1 -1
- package/index320.js +1 -1
- package/index320.mjs +166 -4
- package/index34.js +1 -1
- package/index34.mjs +2 -2
- package/index35.js +1 -1
- package/index35.mjs +1 -1
- package/index38.js +1 -1
- package/index38.mjs +2 -2
- package/index4.js +1 -1
- package/index4.mjs +1 -1
- package/index42.js +1 -1
- package/index42.mjs +1 -1
- package/index44.js +1 -1
- package/index44.mjs +3 -3
- package/index46.js +1 -1
- package/index46.mjs +2 -2
- package/index47.js +1 -1
- package/index47.mjs +1 -1
- package/index6.mjs +30 -32
- package/index74.js +1 -1
- package/index74.mjs +1 -1
- package/index75.js +1 -1
- package/index75.mjs +1 -1
- package/index76.js +1 -1
- package/index76.mjs +1 -1
- package/index78.js +1 -1
- package/index78.mjs +1 -1
- package/index79.js +1 -1
- package/index79.mjs +1 -1
- package/index8.js +1 -1
- package/index8.mjs +1 -1
- package/index80.js +1 -1
- package/index80.mjs +1 -1
- package/index81.js +1 -1
- package/index81.mjs +1 -1
- package/index88.js +1 -1
- package/index88.mjs +9 -6
- package/index90.js +1 -1
- package/index90.mjs +3 -4
- package/index93.js +1 -1
- package/index93.mjs +1 -1
- package/logger.d.ts +1 -1
- package/message.d.ts +7 -0
- package/package.json +1 -1
- package/providers/Accordion/index.d.ts +0 -1
- package/providers/Menu/index.d.ts +0 -1
- package/providers/Swiper/index.d.ts +0 -1
- package/providers/Translation/index.d.ts +0 -1
- package/providers/Translation/interface.d.ts +0 -1
- package/providers/UserSearchQuery/index.d.ts +0 -1
- package/storybook/Lightbox/LightboxControlledState.d.ts +3 -0
- package/storybook/Menu/Menu.d.ts +34 -0
- package/storybook/Menu/NestedMenu.d.ts +2 -0
- package/storybook/Menu/mock.d.ts +2 -0
- package/storybook/SelectField/index.d.ts +3 -0
- package/storybook/ShareButtonExample/index.d.ts +3 -0
- package/theme/Accordion/index.d.ts +105 -105
- package/theme/Alerts/index.d.ts +558 -558
- package/theme/Box/index.d.ts +103 -103
- package/theme/Button/index.d.ts +70 -70
- package/theme/Calendar/index.d.ts +504 -504
- package/theme/Carousel/index.d.ts +108 -108
- package/theme/Checkbox/index.d.ts +49 -49
- package/theme/CheckboxGroup/index.d.ts +7 -7
- package/theme/DatePicker/index.d.ts +72 -72
- package/theme/LightBox/index.d.ts +180 -180
- package/theme/ListBox/index.d.ts +2885 -0
- package/theme/Radio/index.d.ts +28 -28
- package/theme/RadioGroup/index.d.ts +7 -7
- package/theme/Search/index.d.ts +7 -7
- package/theme/ShareButton/index.d.ts +70 -70
- package/theme/TabList/index.d.ts +400 -400
- package/theme/TagGroup/index.d.ts +568 -568
- package/theme/TextArea/index.d.ts +7 -7
- package/theme/Typography/index.d.ts +140 -140
- package/transitions/AccordionTransition.d.ts +0 -1
- package/transitions/ModalTransition.d.ts +0 -1
- package/transitions/RenderWithOpacity.d.ts +0 -1
- package/transitions/RenderWithSlide.d.ts +0 -1
- package/transitions/SidePanelTransition.d.ts +0 -1
- package/types/next-link.d.ts +0 -2
- package/index321.js +0 -1
- package/index321.mjs +0 -33
- package/index322.js +0 -1
- package/index322.mjs +0 -170
package/index250.mjs
CHANGED
|
@@ -1,124 +1,233 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { getItemElement as V, useCollectionId as fe, isNonContiguousSelectionModifier as H } from "./index308.mjs";
|
|
2
|
+
import { useTypeSelect as ae } from "./index309.mjs";
|
|
3
|
+
import { mergeProps as G } from "./index124.mjs";
|
|
4
|
+
import { focusWithoutScrolling as j } from "./index172.mjs";
|
|
5
|
+
import { useRouter as de } from "./index173.mjs";
|
|
6
|
+
import { useUpdateLayoutEffect as q } from "./index178.mjs";
|
|
7
|
+
import { useEvent as S } from "./index185.mjs";
|
|
8
|
+
import { scrollIntoView as ve, scrollIntoViewport as J } from "./index187.mjs";
|
|
9
|
+
import { useEffectEvent as Q } from "./index186.mjs";
|
|
10
|
+
import { FOCUS_EVENT as pe, CLEAR_FOCUS_EVENT as ye } from "./index190.mjs";
|
|
11
|
+
import { isCtrlKeyPressed as m } from "./index191.mjs";
|
|
12
|
+
import { flushSync as be } from "react-dom";
|
|
13
|
+
import { useRef as $, useEffect as X } from "react";
|
|
14
|
+
import { getInteractionModality as Y } from "./index296.mjs";
|
|
15
|
+
import { focusSafely as Z } from "./index307.mjs";
|
|
16
|
+
import { moveVirtualFocus as Ke, getFocusableTreeWalker as me } from "@react-aria/focus";
|
|
17
|
+
import { useLocale as $e } from "@react-aria/i18n";
|
|
18
|
+
function Ce(g) {
|
|
19
|
+
let { selectionManager: e, keyboardDelegate: o, ref: i, autoFocus: h = !1, shouldFocusWrap: F = !1, disallowEmptySelection: _ = !1, disallowSelectAll: ee = !1, escapeKeyBehavior: le = "clearSelection", selectOnFocus: b = e.selectionBehavior === "replace", disallowTypeAhead: oe = !1, shouldUseVirtualFocus: y, allowsTabNavigation: te = !1, isVirtualized: B, scrollRef: f = i, linkBehavior: C = "action" } = g, { direction: x } = $e(), re = de(), ce = (l) => {
|
|
20
|
+
var r;
|
|
21
|
+
if (l.altKey && l.key === "Tab" && l.preventDefault(), !(!((r = i.current) === null || r === void 0) && r.contains(l.target))) return;
|
|
22
|
+
const c = (t, v) => {
|
|
23
|
+
if (t != null) {
|
|
24
|
+
if (e.isLink(t) && C === "selection" && b && !H(l)) {
|
|
25
|
+
be(() => {
|
|
26
|
+
e.setFocusedKey(t, v);
|
|
27
|
+
});
|
|
28
|
+
let p = V(i, t), W = e.getItemProps(t);
|
|
29
|
+
p && re.open(p, l, W.href, W.routerOptions);
|
|
22
30
|
return;
|
|
23
|
-
}
|
|
31
|
+
}
|
|
32
|
+
if (e.setFocusedKey(t, v), e.isLink(t) && C === "override") return;
|
|
33
|
+
l.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(t) : b && !H(l) && e.replaceSelection(t);
|
|
24
34
|
}
|
|
25
|
-
|
|
35
|
+
};
|
|
36
|
+
switch (l.key) {
|
|
37
|
+
case "ArrowDown":
|
|
38
|
+
if (o.getKeyBelow) {
|
|
39
|
+
var n, s, u;
|
|
40
|
+
let t = e.focusedKey != null ? (n = o.getKeyBelow) === null || n === void 0 ? void 0 : n.call(o, e.focusedKey) : (s = o.getFirstKey) === null || s === void 0 ? void 0 : s.call(o);
|
|
41
|
+
t == null && F && (t = (u = o.getFirstKey) === null || u === void 0 ? void 0 : u.call(o, e.focusedKey)), t != null && (l.preventDefault(), c(t));
|
|
42
|
+
}
|
|
43
|
+
break;
|
|
44
|
+
case "ArrowUp":
|
|
45
|
+
if (o.getKeyAbove) {
|
|
46
|
+
var a, d, P;
|
|
47
|
+
let t = e.focusedKey != null ? (a = o.getKeyAbove) === null || a === void 0 ? void 0 : a.call(o, e.focusedKey) : (d = o.getLastKey) === null || d === void 0 ? void 0 : d.call(o);
|
|
48
|
+
t == null && F && (t = (P = o.getLastKey) === null || P === void 0 ? void 0 : P.call(o, e.focusedKey)), t != null && (l.preventDefault(), c(t));
|
|
49
|
+
}
|
|
50
|
+
break;
|
|
51
|
+
case "ArrowLeft":
|
|
52
|
+
if (o.getKeyLeftOf) {
|
|
53
|
+
var k, A, I;
|
|
54
|
+
let t = e.focusedKey != null ? (k = o.getKeyLeftOf) === null || k === void 0 ? void 0 : k.call(o, e.focusedKey) : null;
|
|
55
|
+
t == null && F && (t = x === "rtl" ? (A = o.getFirstKey) === null || A === void 0 ? void 0 : A.call(o, e.focusedKey) : (I = o.getLastKey) === null || I === void 0 ? void 0 : I.call(o, e.focusedKey)), t != null && (l.preventDefault(), c(t, x === "rtl" ? "first" : "last"));
|
|
56
|
+
}
|
|
57
|
+
break;
|
|
58
|
+
case "ArrowRight":
|
|
59
|
+
if (o.getKeyRightOf) {
|
|
60
|
+
var M, R, O;
|
|
61
|
+
let t = e.focusedKey != null ? (M = o.getKeyRightOf) === null || M === void 0 ? void 0 : M.call(o, e.focusedKey) : null;
|
|
62
|
+
t == null && F && (t = x === "rtl" ? (R = o.getLastKey) === null || R === void 0 ? void 0 : R.call(o, e.focusedKey) : (O = o.getFirstKey) === null || O === void 0 ? void 0 : O.call(o, e.focusedKey)), t != null && (l.preventDefault(), c(t, x === "rtl" ? "last" : "first"));
|
|
63
|
+
}
|
|
64
|
+
break;
|
|
65
|
+
case "Home":
|
|
66
|
+
if (o.getFirstKey) {
|
|
67
|
+
if (e.focusedKey === null && l.shiftKey) return;
|
|
68
|
+
l.preventDefault();
|
|
69
|
+
let t = o.getFirstKey(e.focusedKey, m(l));
|
|
70
|
+
e.setFocusedKey(t), t != null && (m(l) && l.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(t) : b && e.replaceSelection(t));
|
|
71
|
+
}
|
|
72
|
+
break;
|
|
73
|
+
case "End":
|
|
74
|
+
if (o.getLastKey) {
|
|
75
|
+
if (e.focusedKey === null && l.shiftKey) return;
|
|
76
|
+
l.preventDefault();
|
|
77
|
+
let t = o.getLastKey(e.focusedKey, m(l));
|
|
78
|
+
e.setFocusedKey(t), t != null && (m(l) && l.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(t) : b && e.replaceSelection(t));
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
81
|
+
case "PageDown":
|
|
82
|
+
if (o.getKeyPageBelow && e.focusedKey != null) {
|
|
83
|
+
let t = o.getKeyPageBelow(e.focusedKey);
|
|
84
|
+
t != null && (l.preventDefault(), c(t));
|
|
85
|
+
}
|
|
86
|
+
break;
|
|
87
|
+
case "PageUp":
|
|
88
|
+
if (o.getKeyPageAbove && e.focusedKey != null) {
|
|
89
|
+
let t = o.getKeyPageAbove(e.focusedKey);
|
|
90
|
+
t != null && (l.preventDefault(), c(t));
|
|
91
|
+
}
|
|
92
|
+
break;
|
|
93
|
+
case "a":
|
|
94
|
+
m(l) && e.selectionMode === "multiple" && ee !== !0 && (l.preventDefault(), e.selectAll());
|
|
95
|
+
break;
|
|
96
|
+
case "Escape":
|
|
97
|
+
le === "clearSelection" && !_ && e.selectedKeys.size !== 0 && (l.stopPropagation(), l.preventDefault(), e.clearSelection());
|
|
98
|
+
break;
|
|
99
|
+
case "Tab":
|
|
100
|
+
if (!te) {
|
|
101
|
+
if (l.shiftKey) i.current.focus();
|
|
102
|
+
else {
|
|
103
|
+
let t = me(i.current, {
|
|
104
|
+
tabbable: !0
|
|
105
|
+
}), v, p;
|
|
106
|
+
do
|
|
107
|
+
p = t.lastChild(), p && (v = p);
|
|
108
|
+
while (p);
|
|
109
|
+
v && !v.contains(document.activeElement) && j(v);
|
|
110
|
+
}
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
26
113
|
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
let
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
e.target === s.current && o.setFocusedKey(t);
|
|
114
|
+
}, w = $({
|
|
115
|
+
top: 0,
|
|
116
|
+
left: 0
|
|
117
|
+
});
|
|
118
|
+
S(f, "scroll", B ? void 0 : () => {
|
|
119
|
+
var l, r, c, n;
|
|
120
|
+
w.current = {
|
|
121
|
+
top: (c = (l = f.current) === null || l === void 0 ? void 0 : l.scrollTop) !== null && c !== void 0 ? c : 0,
|
|
122
|
+
left: (n = (r = f.current) === null || r === void 0 ? void 0 : r.scrollLeft) !== null && n !== void 0 ? n : 0
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
let ie = (l) => {
|
|
126
|
+
if (e.isFocused) {
|
|
127
|
+
l.currentTarget.contains(l.target) || e.setFocused(!1);
|
|
128
|
+
return;
|
|
43
129
|
}
|
|
44
|
-
|
|
45
|
-
|
|
130
|
+
if (l.currentTarget.contains(l.target)) {
|
|
131
|
+
if (e.setFocused(!0), e.focusedKey == null) {
|
|
132
|
+
var r, c;
|
|
133
|
+
let u = (d) => {
|
|
134
|
+
d != null && (e.setFocusedKey(d), b && !e.isSelected(d) && e.replaceSelection(d));
|
|
135
|
+
}, a = l.relatedTarget;
|
|
136
|
+
var n, s;
|
|
137
|
+
a && l.currentTarget.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_FOLLOWING ? u((n = e.lastSelectedKey) !== null && n !== void 0 ? n : (r = o.getLastKey) === null || r === void 0 ? void 0 : r.call(o)) : u((s = e.firstSelectedKey) !== null && s !== void 0 ? s : (c = o.getFirstKey) === null || c === void 0 ? void 0 : c.call(o));
|
|
138
|
+
} else !B && f.current && (f.current.scrollTop = w.current.top, f.current.scrollLeft = w.current.left);
|
|
139
|
+
if (e.focusedKey != null && f.current) {
|
|
140
|
+
let u = V(i, e.focusedKey);
|
|
141
|
+
u instanceof HTMLElement && (!u.contains(document.activeElement) && !y && j(u), Y() === "keyboard" && J(u, {
|
|
142
|
+
containingElement: i.current
|
|
143
|
+
}));
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}, ne = (l) => {
|
|
147
|
+
l.currentTarget.contains(l.relatedTarget) || e.setFocused(!1);
|
|
148
|
+
}, K = $(!1);
|
|
149
|
+
S(i, pe, y ? (l) => {
|
|
150
|
+
let { detail: r } = l;
|
|
151
|
+
l.stopPropagation(), e.setFocused(!0), (r == null ? void 0 : r.focusStrategy) === "first" && (K.current = !0);
|
|
152
|
+
} : void 0);
|
|
153
|
+
let N = Q(() => {
|
|
154
|
+
var l, r;
|
|
155
|
+
let c = (r = (l = o.getFirstKey) === null || l === void 0 ? void 0 : l.call(o)) !== null && r !== void 0 ? r : null;
|
|
156
|
+
c == null ? (Ke(i.current), e.collection.size > 0 && (K.current = !1)) : (e.setFocusedKey(c), K.current = !1);
|
|
46
157
|
});
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
158
|
+
q(() => {
|
|
159
|
+
K.current && N();
|
|
160
|
+
}, [
|
|
161
|
+
e.collection,
|
|
162
|
+
N
|
|
163
|
+
]);
|
|
164
|
+
let U = Q(() => {
|
|
165
|
+
e.collection.size > 0 && (K.current = !1);
|
|
166
|
+
});
|
|
167
|
+
q(() => {
|
|
168
|
+
U();
|
|
169
|
+
}, [
|
|
170
|
+
e.focusedKey,
|
|
171
|
+
U
|
|
172
|
+
]), S(i, ye, y ? (l) => {
|
|
173
|
+
var r;
|
|
174
|
+
l.stopPropagation(), e.setFocused(!1), !((r = l.detail) === null || r === void 0) && r.clearFocusKey && e.setFocusedKey(null);
|
|
175
|
+
} : void 0);
|
|
176
|
+
const z = $(h), T = $(!1);
|
|
177
|
+
X(() => {
|
|
178
|
+
if (z.current) {
|
|
179
|
+
var l, r;
|
|
180
|
+
let s = null;
|
|
181
|
+
var c;
|
|
182
|
+
h === "first" && (s = (c = (l = o.getFirstKey) === null || l === void 0 ? void 0 : l.call(o)) !== null && c !== void 0 ? c : null);
|
|
183
|
+
var n;
|
|
184
|
+
h === "last" && (s = (n = (r = o.getLastKey) === null || r === void 0 ? void 0 : r.call(o)) !== null && n !== void 0 ? n : null);
|
|
185
|
+
let u = e.selectedKeys;
|
|
186
|
+
if (u.size) {
|
|
187
|
+
for (let a of u) if (e.canSelectItem(a)) {
|
|
188
|
+
s = a;
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
e.setFocused(!0), e.setFocusedKey(s), s == null && !y && i.current && Z(i.current), e.collection.size > 0 && (z.current = !1, T.current = !0);
|
|
51
193
|
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (f || v && e.pointerType !== "mouse") {
|
|
63
|
-
if (e.pointerType === "keyboard" && !w()) return;
|
|
64
|
-
P(e);
|
|
65
|
-
} else e.pointerType !== "keyboard" && i && a(e);
|
|
66
|
-
}) : (n.onPressStart = (e) => {
|
|
67
|
-
b.current = e.pointerType, h.current = m, x.current = f, i && (e.pointerType === "mouse" && !f || e.pointerType === "keyboard" && (!S || A())) && a(e);
|
|
68
|
-
}, n.onPress = (e) => {
|
|
69
|
-
(e.pointerType === "touch" || e.pointerType === "pen" || e.pointerType === "virtual" || e.pointerType === "keyboard" && d && w() || e.pointerType === "mouse" && x.current) && (d ? P(e) : i && a(e));
|
|
70
|
-
}), u["data-collection"] = R(o.collection), u["data-key"] = t, n.preventFocusOnPress = l, l && (n = K(n, {
|
|
71
|
-
onPressStart(e) {
|
|
72
|
-
e.pointerType !== "touch" && (o.setFocused(!0), o.setFocusedKey(t));
|
|
73
|
-
},
|
|
74
|
-
onPress(e) {
|
|
75
|
-
e.pointerType === "touch" && (o.setFocused(!0), o.setFocusedKey(t));
|
|
194
|
+
});
|
|
195
|
+
let D = $(e.focusedKey);
|
|
196
|
+
X(() => {
|
|
197
|
+
if (e.isFocused && e.focusedKey != null && (e.focusedKey !== D.current || T.current) && f.current && i.current) {
|
|
198
|
+
let l = Y(), r = V(i, e.focusedKey);
|
|
199
|
+
if (!(r instanceof HTMLElement))
|
|
200
|
+
return;
|
|
201
|
+
(l === "keyboard" || T.current) && (ve(f.current, r), l !== "virtual" && J(r, {
|
|
202
|
+
containingElement: i.current
|
|
203
|
+
}));
|
|
76
204
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
205
|
+
!y && e.isFocused && e.focusedKey == null && D.current != null && i.current && Z(i.current), D.current = e.focusedKey, T.current = !1;
|
|
206
|
+
}), S(i, "react-aria-focus-scope-restore", (l) => {
|
|
207
|
+
l.preventDefault(), e.setFocused(!0);
|
|
208
|
+
});
|
|
209
|
+
let E = {
|
|
210
|
+
onKeyDown: ce,
|
|
211
|
+
onFocus: ie,
|
|
212
|
+
onBlur: ne,
|
|
213
|
+
onMouseDown(l) {
|
|
214
|
+
f.current === l.target && l.preventDefault();
|
|
84
215
|
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
216
|
+
}, { typeSelectProps: ue } = ae({
|
|
217
|
+
keyboardDelegate: o,
|
|
218
|
+
selectionManager: e
|
|
219
|
+
});
|
|
220
|
+
oe || (E = G(ue, E));
|
|
221
|
+
let L;
|
|
222
|
+
y || (L = e.focusedKey == null ? 0 : -1);
|
|
223
|
+
let se = fe(e.collection);
|
|
90
224
|
return {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
{
|
|
96
|
-
onDoubleClick: B,
|
|
97
|
-
onDragStartCapture: U,
|
|
98
|
-
onClick: V,
|
|
99
|
-
id: $
|
|
100
|
-
},
|
|
101
|
-
// Prevent DOM focus from moving on mouse down when using virtual focus
|
|
102
|
-
l ? {
|
|
103
|
-
onMouseDown: (e) => e.preventDefault()
|
|
104
|
-
} : void 0
|
|
105
|
-
),
|
|
106
|
-
isPressed: I,
|
|
107
|
-
isSelected: o.isSelected(t),
|
|
108
|
-
isFocused: o.isFocused && o.focusedKey === t,
|
|
109
|
-
isDisabled: c,
|
|
110
|
-
allowsSelection: i,
|
|
111
|
-
hasAction: d
|
|
225
|
+
collectionProps: G(E, {
|
|
226
|
+
tabIndex: L,
|
|
227
|
+
"data-collection": se
|
|
228
|
+
})
|
|
112
229
|
};
|
|
113
230
|
}
|
|
114
|
-
function w() {
|
|
115
|
-
let r = window.event;
|
|
116
|
-
return (r == null ? void 0 : r.key) === "Enter";
|
|
117
|
-
}
|
|
118
|
-
function A() {
|
|
119
|
-
let r = window.event;
|
|
120
|
-
return (r == null ? void 0 : r.key) === " " || (r == null ? void 0 : r.code) === "Space";
|
|
121
|
-
}
|
|
122
231
|
export {
|
|
123
|
-
|
|
232
|
+
Ce as useSelectableCollection
|
|
124
233
|
};
|
package/index251.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./index310.js"),y=require("./index159.js"),g=require("react");function K(t){var l;let[e,s]=y.useControlledState(t.selectedKey,(l=t.defaultSelectedKey)!==null&&l!==void 0?l:null,t.onSelectionChange),i=g.useMemo(()=>e!=null?[e]:[],[e]),{collection:a,disabledKeys:u,selectionManager:d}=S.useListState({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:i,onSelectionChange:o=>{if(o==="all")return;var n;let c=(n=o.values().next().value)!==null&&n!==void 0?n:null;c===e&&t.onSelectionChange&&t.onSelectionChange(c),s(c)}}),r=e!=null?a.getItem(e):null;return{collection:a,disabledKeys:u,selectionManager:d,selectedKey:e,setSelectedKey:s,selectedItem:r}}exports.useSingleSelectListState=K;
|
package/index251.mjs
CHANGED
|
@@ -1,46 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
return t;
|
|
32
|
-
}
|
|
33
|
-
getPreviousKey(e) {
|
|
34
|
-
let t = e;
|
|
35
|
-
do
|
|
36
|
-
t = this.collection.getKeyBefore(t), t == null && (t = this.collection.getLastKey());
|
|
37
|
-
while (t != null && this.isDisabled(t));
|
|
38
|
-
return t;
|
|
39
|
-
}
|
|
40
|
-
constructor(e, t, i, s = /* @__PURE__ */ new Set()) {
|
|
41
|
-
this.collection = e, this.flipDirection = t === "rtl" && i === "horizontal", this.disabledKeys = s, this.tabDirection = i === "horizontal";
|
|
42
|
-
}
|
|
1
|
+
import { useListState as f } from "./index310.mjs";
|
|
2
|
+
import { useControlledState as S } from "./index159.mjs";
|
|
3
|
+
import { useMemo as y } from "react";
|
|
4
|
+
function g(l) {
|
|
5
|
+
var t;
|
|
6
|
+
let [e, c] = S(l.selectedKey, (t = l.defaultSelectedKey) !== null && t !== void 0 ? t : null, l.onSelectionChange), i = y(() => e != null ? [
|
|
7
|
+
e
|
|
8
|
+
] : [], [
|
|
9
|
+
e
|
|
10
|
+
]), { collection: o, disabledKeys: d, selectionManager: u } = f({
|
|
11
|
+
...l,
|
|
12
|
+
selectionMode: "single",
|
|
13
|
+
disallowEmptySelection: !0,
|
|
14
|
+
allowDuplicateSelectionEvents: !0,
|
|
15
|
+
selectedKeys: i,
|
|
16
|
+
onSelectionChange: (s) => {
|
|
17
|
+
if (s === "all") return;
|
|
18
|
+
var n;
|
|
19
|
+
let a = (n = s.values().next().value) !== null && n !== void 0 ? n : null;
|
|
20
|
+
a === e && l.onSelectionChange && l.onSelectionChange(a), c(a);
|
|
21
|
+
}
|
|
22
|
+
}), r = e != null ? o.getItem(e) : null;
|
|
23
|
+
return {
|
|
24
|
+
collection: o,
|
|
25
|
+
disabledKeys: d,
|
|
26
|
+
selectionManager: u,
|
|
27
|
+
selectedKey: e,
|
|
28
|
+
setSelectedKey: c,
|
|
29
|
+
selectedItem: r
|
|
30
|
+
};
|
|
43
31
|
}
|
|
44
32
|
export {
|
|
45
|
-
|
|
33
|
+
g as useSingleSelectListState
|
|
46
34
|
};
|
package/index252.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function n(e,t=-1/0,a=1/0){return Math.min(Math.max(e,t),a)}exports.clamp=n;
|