se-design 1.0.3 → 1.0.8-5.dev.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/dist/assets/colors.css +26 -13
- package/dist/assets/icons/ai-off.svg +6 -0
- package/dist/assets/icons/ai-re-run.svg +5 -0
- package/dist/assets/icons/arrow-head.svg +8 -0
- package/dist/assets/icons/center-align.svg +3 -0
- package/dist/assets/icons/chat.svg +4 -0
- package/dist/assets/icons/checkbox-disabled-minus.svg +1 -1
- package/dist/assets/icons/checkbox-disabled-tick.svg +1 -1
- package/dist/assets/icons/checkbox-fill.svg +1 -1
- package/dist/assets/icons/checkbox-hover-fill.svg +2 -2
- package/dist/assets/icons/checkbox-hover-minus.svg +1 -1
- package/dist/assets/icons/checkbox-hover-tick.svg +1 -1
- package/dist/assets/icons/checkbox-minus.svg +1 -1
- package/dist/assets/icons/checkbox-tick.svg +1 -1
- package/dist/assets/icons/combobox-field.svg +6 -0
- package/dist/assets/icons/command.svg +1 -1
- package/dist/assets/icons/envelope.svg +4 -0
- package/dist/assets/icons/file-filled-checked.svg +8 -0
- package/dist/assets/icons/filter.svg +3 -0
- package/dist/assets/icons/google-drive.svg +8 -0
- package/dist/assets/icons/home.svg +3 -2
- package/dist/assets/icons/left-align.svg +3 -0
- package/dist/assets/icons/library.svg +6 -0
- package/dist/assets/icons/minus.svg +3 -0
- package/dist/assets/icons/plus.svg +4 -0
- package/dist/assets/icons/reports.svg +4 -0
- package/dist/assets/icons/repository.svg +4 -0
- package/dist/assets/icons/right-align.svg +3 -0
- package/dist/assets/icons/sort-asc.svg +3 -4
- package/dist/assets/icons/sort-desc.svg +2 -3
- package/dist/assets/icons/tag.svg +2 -2
- package/dist/assets/icons/views.svg +7 -0
- package/dist/assets/icons/warning.svg +10 -0
- package/dist/assets/style.css +1 -1
- package/dist/assets/typographyMixin.scss +8 -0
- package/dist/components/AccessibleDiv/index.d.ts +46 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/AutoCompleteInput/index.d.ts +37 -7
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Banner/index.d.ts +17 -4
- package/dist/components/BottomSheet/index.d.ts +14 -0
- package/dist/components/BreadCrumbs/index.d.ts +5 -0
- package/dist/components/Button/index.d.ts +51 -7
- package/dist/components/Checkbox/index.d.ts +35 -0
- package/dist/components/CustomAccordion/index.d.ts +6 -0
- package/dist/components/CustomModal/index.d.ts +56 -1
- package/dist/components/DatePicker/index.d.ts +7 -0
- package/dist/components/DatePicker/useDatePickerA11y.d.ts +47 -0
- package/dist/components/Dropdown/index.d.ts +23 -0
- package/dist/components/DropdownWithInputTags/index.d.ts +12 -2
- package/dist/components/GuidedTour/index.d.ts +27 -0
- package/dist/components/Header/index.d.ts +3 -2
- package/dist/components/Icon/index.d.ts +45 -4
- package/dist/components/InfoTooltip/index.d.ts +14 -1
- package/dist/components/Input/index.d.ts +38 -6
- package/dist/components/InputWithIcon/index.d.ts +36 -2
- package/dist/components/KebabMenu/index.d.ts +1 -0
- package/dist/components/LabelChip/index.d.ts +3 -0
- package/dist/components/Link/index.d.ts +64 -0
- package/dist/components/MenuItem/index.d.ts +13 -3
- package/dist/components/MenuList/index.d.ts +3 -2
- package/dist/components/MessageBar/index.d.ts +20 -1
- package/dist/components/Modal/index.d.ts +3 -0
- package/dist/components/NavigationBar/TabButton.d.ts +20 -0
- package/dist/components/NavigationBar/index.d.ts +8 -1
- package/dist/components/OTPInput/index.d.ts +1 -0
- package/dist/components/OnboardingTour/index.d.ts +35 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Paywall/index.d.ts +47 -0
- package/dist/components/PhoneInput/index.d.ts +27 -0
- package/dist/components/Popover/index.d.ts +15 -3
- package/dist/components/Radio/index.d.ts +7 -1
- package/dist/components/RadioGroup/index.d.ts +18 -0
- package/dist/components/ShimmerLoader/index.d.ts +4 -2
- package/dist/components/SidebarOverlay/index.d.ts +36 -0
- package/dist/components/SkipLinksBar/index.d.ts +11 -0
- package/dist/components/SnackBar/index.d.ts +5 -2
- package/dist/components/Spinner/index.d.ts +13 -1
- package/dist/components/TableLayout/index.d.ts +18 -0
- package/dist/components/Tabs/index.d.ts +6 -1
- package/dist/components/TimePicker/index.d.ts +14 -0
- package/dist/components/Toggle/index.d.ts +25 -1
- package/dist/components/Tooltip/index.d.ts +19 -2
- package/dist/components/index.d.ts +8 -0
- package/dist/index.js +153 -108
- package/dist/index.js.map +1 -1
- package/dist/index10.js +23 -48
- package/dist/index10.js.map +1 -1
- package/dist/index100.js +1 -1
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +1 -1
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +2 -2
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +1 -1
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +1 -1
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +1 -1
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +1 -1
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +1 -1
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +1 -1
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +1 -1
- package/dist/index109.js.map +1 -1
- package/dist/index11.js +74 -18
- package/dist/index11.js.map +1 -1
- package/dist/index110.js +1 -1
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +1 -1
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +2 -2
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +2 -2
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +2 -2
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +1 -1
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +1 -1
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +1 -1
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +1 -1
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +1 -1
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +76 -11
- package/dist/index12.js.map +1 -1
- package/dist/index120.js +1 -1
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +2 -2
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +2 -2
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +1 -1
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +1 -1
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +2 -2
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +2 -2
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +2 -2
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +1 -1
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +1 -1
- package/dist/index129.js.map +1 -1
- package/dist/index13.js +64 -5
- package/dist/index13.js.map +1 -1
- package/dist/index130.js +2 -2
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +1 -1
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +1 -1
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +1 -1
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +1 -1
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +2 -2
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +2 -2
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +1 -1
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +1 -1
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +1 -1
- package/dist/index139.js.map +1 -1
- package/dist/index14.js +15 -138
- package/dist/index14.js.map +1 -1
- package/dist/index140.js +1 -1
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +1 -1
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +1 -1
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +1 -1
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +2 -2
- package/dist/index144.js.map +1 -1
- package/dist/index145.js +1 -1
- package/dist/index145.js.map +1 -1
- package/dist/index146.js +2 -2
- package/dist/index146.js.map +1 -1
- package/dist/index147.js +1 -1
- package/dist/index147.js.map +1 -1
- package/dist/index148.js +2 -2
- package/dist/index148.js.map +1 -1
- package/dist/index149.js +1 -1
- package/dist/index149.js.map +1 -1
- package/dist/index15.js +10 -54
- package/dist/index15.js.map +1 -1
- package/dist/index150.js +1 -1
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +1 -1
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +1 -1
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +1 -1
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +1 -1
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +2 -2
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +2 -2
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +2 -2
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +2 -2
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +1 -1
- package/dist/index159.js.map +1 -1
- package/dist/index16.js +216 -54
- package/dist/index16.js.map +1 -1
- package/dist/index160.js +2 -149
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +5 -0
- package/dist/index161.js.map +1 -0
- package/dist/index162.js +5 -0
- package/dist/index162.js.map +1 -0
- package/dist/index163.js +5 -0
- package/dist/index163.js.map +1 -0
- package/dist/index164.js +5 -0
- package/dist/index164.js.map +1 -0
- package/dist/index165.js +5 -0
- package/dist/index165.js.map +1 -0
- package/dist/index166.js +5 -0
- package/dist/index166.js.map +1 -0
- package/dist/index167.js +5 -0
- package/dist/index167.js.map +1 -0
- package/dist/index168.js +5 -0
- package/dist/index168.js.map +1 -0
- package/dist/index169.js +5 -0
- package/dist/index169.js.map +1 -0
- package/dist/index17.js +60 -255
- package/dist/index17.js.map +1 -1
- package/dist/index170.js +5 -0
- package/dist/index170.js.map +1 -0
- package/dist/index171.js +5 -0
- package/dist/index171.js.map +1 -0
- package/dist/index172.js +2 -12
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +5 -0
- package/dist/index173.js.map +1 -0
- package/dist/index174.js +5 -0
- package/dist/index174.js.map +1 -0
- package/dist/index175.js +5 -0
- package/dist/index175.js.map +1 -0
- package/dist/index176.js +5 -0
- package/dist/index176.js.map +1 -0
- package/dist/index177.js +5 -0
- package/dist/index177.js.map +1 -0
- package/dist/index178.js +5 -0
- package/dist/index178.js.map +1 -0
- package/dist/index179.js +5 -0
- package/dist/index179.js.map +1 -0
- package/dist/index18.js +128 -11
- package/dist/index18.js.map +1 -1
- package/dist/index180.js +1 -1232
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +5 -0
- package/dist/index181.js.map +1 -0
- package/dist/index182.js +5 -0
- package/dist/index182.js.map +1 -0
- package/dist/index183.js +5 -0
- package/dist/index183.js.map +1 -0
- package/dist/index184.js +2 -4
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +5 -0
- package/dist/index185.js.map +1 -0
- package/dist/index186.js +5 -0
- package/dist/index186.js.map +1 -0
- package/dist/index187.js +5 -0
- package/dist/index187.js.map +1 -0
- package/dist/index188.js +5 -0
- package/dist/index188.js.map +1 -0
- package/dist/index189.js +2 -10
- package/dist/index189.js.map +1 -1
- package/dist/index19.js +360 -32
- package/dist/index19.js.map +1 -1
- package/dist/index190.js +1 -9
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +2 -5
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +2 -170
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +2 -11
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +1 -5
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +2 -6
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +2 -38
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +2 -2
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +2 -8
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +2 -327
- package/dist/index199.js.map +1 -1
- package/dist/index20.js +18 -55
- package/dist/index20.js.map +1 -1
- package/dist/index200.js +2 -50
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +2 -2
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +2 -76
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +147 -91
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +8 -51
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +5 -7
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +4 -4
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +41 -50
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +21 -2
- package/dist/index208.js.map +1 -1
- package/dist/index21.js +33 -76
- package/dist/index21.js.map +1 -1
- package/dist/index215.js +31 -0
- package/dist/index215.js.map +1 -0
- package/dist/index216.js +75 -0
- package/dist/index216.js.map +1 -0
- package/dist/index22.js +64 -21
- package/dist/index22.js.map +1 -1
- package/dist/index224.js +15 -0
- package/dist/index224.js.map +1 -0
- package/dist/index23.js +84 -187
- package/dist/index23.js.map +1 -1
- package/dist/index232.js +1236 -0
- package/dist/index232.js.map +1 -0
- package/dist/index235.js +46 -0
- package/dist/index235.js.map +1 -0
- package/dist/index24.js +21 -45
- package/dist/index24.js.map +1 -1
- package/dist/index244.js +173 -0
- package/dist/index244.js.map +1 -0
- package/dist/index245.js +7 -0
- package/dist/index245.js.map +1 -0
- package/dist/index247.js +22 -0
- package/dist/index247.js.map +1 -0
- package/dist/index248.js +13 -0
- package/dist/index248.js.map +1 -0
- package/dist/index249.js +13 -0
- package/dist/index249.js.map +1 -0
- package/dist/index25.js +384 -18
- package/dist/index25.js.map +1 -1
- package/dist/index250.js +8 -0
- package/dist/index250.js.map +1 -0
- package/dist/index251.js +173 -0
- package/dist/index251.js.map +1 -0
- package/dist/index252.js +14 -0
- package/dist/index252.js.map +1 -0
- package/dist/index253.js +9 -0
- package/dist/index253.js.map +1 -0
- package/dist/index254.js +9 -0
- package/dist/index254.js.map +1 -0
- package/dist/index255.js +41 -0
- package/dist/index255.js.map +1 -0
- package/dist/index256.js +5 -0
- package/dist/index256.js.map +1 -0
- package/dist/index257.js +11 -0
- package/dist/index257.js.map +1 -0
- package/dist/index258.js +330 -0
- package/dist/index258.js.map +1 -0
- package/dist/index259.js +53 -0
- package/dist/index259.js.map +1 -0
- package/dist/index26.js +46 -51
- package/dist/index26.js.map +1 -1
- package/dist/index260.js +5 -0
- package/dist/index260.js.map +1 -0
- package/dist/index261.js +79 -0
- package/dist/index261.js.map +1 -0
- package/dist/index262.js +96 -0
- package/dist/index262.js.map +1 -0
- package/dist/index263.js +55 -0
- package/dist/index263.js.map +1 -0
- package/dist/index264.js +11 -0
- package/dist/index264.js.map +1 -0
- package/dist/index265.js +8 -0
- package/dist/index265.js.map +1 -0
- package/dist/index266.js +55 -0
- package/dist/index266.js.map +1 -0
- package/dist/index267.js +5 -0
- package/dist/index267.js.map +1 -0
- package/dist/{index209.js → index268.js} +1 -1
- package/dist/index268.js.map +1 -0
- package/dist/index27.js +22 -78
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +108 -83
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +148 -49
- package/dist/index29.js.map +1 -1
- package/dist/index3.js +69 -65
- package/dist/index3.js.map +1 -1
- package/dist/index30.js +133 -95
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +77 -56
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +99 -32
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +75 -36
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +42 -46
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +72 -56
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +96 -244
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +50 -37
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +306 -82
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +70 -31
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +108 -42
- package/dist/index4.js.map +1 -1
- package/dist/index40.js +82 -50
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +27 -67
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +45 -51
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +109 -94
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +54 -92
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +143 -35
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +194 -30
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +36 -30
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +34 -53
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +142 -359
- package/dist/index49.js.map +1 -1
- package/dist/index5.js +41 -238
- package/dist/index5.js.map +1 -1
- package/dist/index50.js +82 -61
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +458 -35
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +98 -38
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +42 -84
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +36 -140
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +88 -136
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +163 -29
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +143 -45
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +36 -0
- package/dist/index58.js.map +1 -0
- package/dist/index59.js +86 -2
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +328 -50
- package/dist/index6.js.map +1 -1
- package/dist/index60.js +119 -2
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +78 -2
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +152 -2
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +318 -2
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +47 -2
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +145 -2
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +12 -2
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +46 -2
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +103 -2
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +19 -2
- package/dist/index69.js.map +1 -1
- package/dist/index7.js +44 -51
- package/dist/index7.js.map +1 -1
- package/dist/index70.js +66 -2
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +27 -2
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +108 -2
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +62 -2
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +21 -2
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +171 -2
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +18 -2
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +11 -2
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +5 -2
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +56 -2
- package/dist/index79.js.map +1 -1
- package/dist/index8.js +48 -18
- package/dist/index8.js.map +1 -1
- package/dist/index80.js +27 -2
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +9 -2
- package/dist/index81.js.map +1 -1
- package/dist/index83.js +2 -2
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +1 -1
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +1 -1
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +2 -2
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +1 -1
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +2 -2
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +2 -2
- package/dist/index89.js.map +1 -1
- package/dist/index9.js +91 -59
- package/dist/index9.js.map +1 -1
- package/dist/index90.js +1 -1
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +1 -1
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +1 -1
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +1 -1
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +2 -2
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +2 -2
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +2 -2
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +1 -1
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +2 -2
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +1 -1
- package/dist/index99.js.map +1 -1
- package/package.json +1 -1
- package/dist/index209.js.map +0 -1
- package/dist/index82.js +0 -5
- package/dist/index82.js.map +0 -1
package/dist/index72.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index72.js","sources":["../src/assets/icons/checkbox-fill.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.6%204C0.6%202.12223%202.12223%200.6%204%200.6H12C13.8778%200.6%2015.4%202.12223%2015.4%204V12C15.4%2013.8778%2013.8778%2015.4%2012%2015.4H4C2.12223%2015.4%200.6%2013.8778%200.6%2012V4Z'%20fill='white'/%3e%3cpath%20d='M0.6%204C0.6%202.12223%202.12223%200.6%204%200.6H12C13.8778%200.6%2015.4%202.12223%2015.4%204V12C15.4%2013.8778%2013.8778%2015.4%2012%2015.4H4C2.12223%2015.4%200.6%2013.8778%200.6%2012V4Z'%20stroke='%23A1B3CF'%20stroke-width='1.2'%20stroke-linejoin='round'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_13"],"mappings":"AAAA,MAAeA,IAAA;"}
|
|
1
|
+
{"version":3,"file":"index72.js","sources":["../src/utils/a11y/useFocusTrap.ts"],"sourcesContent":["import { useLayoutEffect, useRef } from 'react';\nimport type { MutableRefObject, RefObject } from 'react';\nimport { getFocusableElements, getFirstFocusableElement } from './focusableElements';\n\nexport interface UseFocusTrapOptions<T extends HTMLElement = HTMLElement> {\n /**\n * Whether the focus trap is active.\n */\n enabled: boolean;\n /**\n * Container element ref to trap focus within.\n */\n containerRef: React.RefObject<T | null>;\n /**\n * Whether to restore focus to the element that had focus before trap activated.\n * Default: true\n */\n restoreFocus?: boolean;\n /**\n * Initial focus target when trap activates.\n * - 'first': Focus first focusable element (default)\n * - 'container': Focus the container itself\n * - 'none': Skip initial focus — browser handles it (e.g. autofocus attribute)\n * - CSS selector: Focus element matching selector\n * - HTMLElement: Focus this specific element\n */\n initialFocus?: 'first' | 'container' | 'none' | string | HTMLElement;\n /**\n * Explicit element to restore focus to when the trap deactivates.\n * Overrides the automatic trigger capture (_lastInteractedElement / document.activeElement).\n * Use when the opener is known at call-site (e.g. a ref on the toggle button).\n */\n returnFocusRef?: React.RefObject<HTMLElement | null>;\n /**\n * Additional container refs that are logically part of this focus trap\n * (e.g., portal-rendered content from Popover/Dropdown). Focus moving to\n * these containers will NOT trigger the safety net redirect.\n */\n portalContainerRefs?: MutableRefObject<RefObject<HTMLElement | null>[]>;\n}\n\nexport interface UseFocusTrapReturn {\n /**\n * Ref to the element that had focus before trap activated.\n * Useful for manual focus restoration if needed.\n */\n triggerRef: React.MutableRefObject<HTMLElement | null>;\n}\n\n// Module-level trigger tracking: React's commit phase is bottom-up, so by the\n// time useFocusTrap's useLayoutEffect runs, document.activeElement may already\n// be the autoFocus element inside the modal rather than the opener button.\n// We capture the last interacted element via pointerdown/keydown listeners\n// (which fire before any React state update commits) to work around this.\nlet _lastInteractedElement: HTMLElement | null = null;\n\nfunction _onPointerDown(e: PointerEvent): void {\n // Walk composedPath to find the nearest focusable element being pressed.\n const path = e.composedPath();\n for (const node of path) {\n if (node instanceof HTMLElement && node.tabIndex >= 0) {\n _lastInteractedElement = node;\n return;\n }\n }\n}\n\nfunction _onKeyDown(e: KeyboardEvent): void {\n // Enter/Space on a focused button will synthesise a click — capture before that.\n if (e.key === 'Enter' || e.key === ' ') {\n _lastInteractedElement = document.activeElement as HTMLElement;\n }\n}\n\nif (typeof document !== 'undefined') {\n document.addEventListener('pointerdown', _onPointerDown, true);\n document.addEventListener('keydown', _onKeyDown, true);\n}\n\n/**\n * Returns (and clears) the last element interacted with before a React commit.\n * Used by SidebarOverlay complementary mode to seed its trigger ref without\n * relying on document.activeElement timing.\n */\nexport function consumeLastInteractedElement(): HTMLElement | null {\n const el = _lastInteractedElement;\n _lastInteractedElement = null;\n return el;\n}\n\n// Focus anchor — explicit stable return-focus target, higher priority than\n// _lastInteractedElement. Auto-clears via setTimeout(0) to prevent a stale\n// anchor leaking to an unrelated open.\nlet _focusAnchor: HTMLElement | null = null;\nlet _focusAnchorClearFrame: ReturnType<typeof requestAnimationFrame> | null = null;\n\n/**\n * Sets an explicit focus-return anchor element.\n * Call this before dispatching an action that will open a modal or sidebar,\n * when the natural last-interacted element is not the right return target\n * (e.g. a popover menu item that will be unmounted when the popover closes).\n */\nexport function setFocusAnchor(el: HTMLElement | null): void {\n if (_focusAnchorClearFrame !== null) cancelAnimationFrame(_focusAnchorClearFrame);\n _focusAnchor = el;\n // Auto-clear if not consumed — prevents stale anchor leaking to unrelated opens.\n // rAF fires after React has committed and painted, giving useFocusTrap time to\n // consume the anchor before it is discarded.\n _focusAnchorClearFrame = requestAnimationFrame(() => {\n _focusAnchor = null;\n _focusAnchorClearFrame = null;\n });\n}\n\n/**\n * Returns (and clears) the focus anchor if one was set, otherwise null.\n * Used internally by useFocusTrap and SidebarOverlay.\n */\nexport function consumeFocusAnchor(): HTMLElement | null {\n if (_focusAnchorClearFrame !== null) {\n cancelAnimationFrame(_focusAnchorClearFrame);\n _focusAnchorClearFrame = null;\n }\n const el = _focusAnchor;\n _focusAnchor = null;\n return el;\n}\n\n/**\n * Resolve the initial focus target based on the initialFocus option.\n */\nfunction resolveInitialFocusTarget(\n container: HTMLElement,\n initialFocus: 'first' | 'container' | 'none' | string | HTMLElement\n): HTMLElement | null {\n if (initialFocus === 'none') return null;\n if (initialFocus === 'first') {\n return getFirstFocusableElement({ container }) || container;\n }\n if (initialFocus === 'container') {\n return container;\n }\n if (typeof initialFocus === 'string') {\n return container.querySelector<HTMLElement>(initialFocus);\n }\n if (initialFocus instanceof HTMLElement) {\n return initialFocus;\n }\n return null;\n}\n\n/**\n * Hook to trap focus within a container (for modals, dialogs, drawers).\n *\n * Implements WCAG 2.1 focus trap pattern:\n * - Moves focus into container on activation\n * - Wraps Tab/Shift+Tab navigation within container\n * - Restores focus to trigger element on deactivation\n * - Safety net: catches focus escaping via other means\n * - Handles autoFocus content: captures trigger before autoFocus fires\n * - Handles {isOpen && <Modal>} pattern: restores focus on unmount\n *\n * Note: For Escape key handling, use `useDismissOnEscape` hook separately.\n * This keeps focus trap (accessibility) separate from Escape handling (UX).\n *\n * @example\n * ```tsx\n * const MyModal = ({ isOpen, onClose }) => {\n * const containerRef = useRef<HTMLDivElement>(null);\n *\n * // Escape handling (UX)\n * useDismissOnEscape({\n * containerRef,\n * onDismiss: onClose,\n * enabled: isOpen\n * });\n *\n * // Focus trap (accessibility)\n * const { triggerRef } = useFocusTrap({\n * enabled: isOpen,\n * containerRef,\n * restoreFocus: true\n * });\n *\n * return (\n * <div ref={containerRef}>\n * <button>First</button>\n * <button>Second</button>\n * </div>\n * );\n * };\n * ```\n */\nexport function useFocusTrap<T extends HTMLElement = HTMLElement>({\n enabled,\n containerRef,\n restoreFocus = true,\n initialFocus = 'first',\n returnFocusRef,\n portalContainerRefs,\n}: UseFocusTrapOptions<T>): UseFocusTrapReturn {\n const triggerRef = useRef<HTMLElement | null>(null);\n const lastFocusedInContainer = useRef<HTMLElement | null>(null);\n\n // Focus management: save trigger, move focus into container on activate, restore on deactivate\n useLayoutEffect(() => {\n if (!enabled) {\n // Restore focus to trigger when trap deactivates\n if (restoreFocus && triggerRef.current) {\n const el = triggerRef.current;\n triggerRef.current = null;\n requestAnimationFrame(() => {\n if (el.isConnected) el.focus();\n });\n }\n return;\n }\n\n const container = containerRef.current;\n if (!container) return;\n\n // Resolve trigger: explicit returnFocusRef wins, then focusAnchor (explicitly set\n // by caller for two-step flows like popover menu → modal), then the pre-commit\n // interaction record, then document.activeElement as final fallback.\n const previousActiveElement = returnFocusRef?.current ?? consumeFocusAnchor() ?? _lastInteractedElement ?? (document.activeElement as HTMLElement);\n _lastInteractedElement = null;\n\n // iframes manage their own internal focus. document.activeElement only ever\n // resolves to the <iframe> element from the parent doc — calling .focus()\n // on any parent-doc element forcibly blurs the iframe content (kills caret\n // in textareas, cancels native <select> dropdowns). Skip capture so the\n // auto-focus on open and focus-restore on close short-circuit on null trigger.\n if (previousActiveElement?.tagName === 'IFRAME') {\n triggerRef.current = null;\n return;\n }\n\n triggerRef.current = previousActiveElement;\n\n // Only move initial focus if autoFocus hasn't already placed it inside the container.\n if (!container.contains(document.activeElement)) {\n requestAnimationFrame(() => {\n resolveInitialFocusTarget(container, initialFocus)?.focus();\n });\n }\n\n // Restore focus on unmount while enabled (covers {isOpen && <Modal>} pattern\n // where the component unmounts before enabled can transition true → false)\n return () => {\n if (restoreFocus && triggerRef.current) {\n const el = triggerRef.current;\n triggerRef.current = null;\n requestAnimationFrame(() => {\n if (el.isConnected) el.focus();\n });\n }\n };\n }, [enabled, containerRef, restoreFocus, initialFocus]);\n\n // Focus trap: Tab wrapping (only when enabled)\n useLayoutEffect(() => {\n if (!enabled) return;\n\n const container = containerRef.current;\n if (!container) return;\n\n const handleKeyDown = (e: KeyboardEvent) => {\n // Tab wrapping\n if (e.key === 'Tab') {\n const focusables = getFocusableElements({ container });\n\n if (focusables.length === 0) {\n e.preventDefault();\n container.focus();\n return;\n }\n\n const first = focusables[0];\n const last = focusables[focusables.length - 1];\n const activeElement = document.activeElement;\n\n if (e.shiftKey && activeElement === first) {\n e.preventDefault();\n last.focus();\n } else if (!e.shiftKey && activeElement === last) {\n e.preventDefault();\n first.focus();\n }\n }\n };\n\n document.addEventListener('keydown', handleKeyDown, true);\n return () => document.removeEventListener('keydown', handleKeyDown, true);\n }, [enabled, containerRef]);\n\n // Focus trap safety net: catch focus escaping\n useLayoutEffect(() => {\n if (!enabled) return;\n\n const container = containerRef.current;\n if (!container) return;\n\n const handleFocusIn = (e: FocusEvent) => {\n const target = e.target as Node;\n\n // iframe focus is opaque from the parent doc — leave it alone, otherwise\n // a click into the iframe gets yanked back into the trap.\n if ((target as Element | null)?.tagName === 'IFRAME') return;\n\n if (container.contains(target)) {\n lastFocusedInContainer.current = target as HTMLElement;\n } else if (portalContainerRefs?.current?.some(ref => ref.current?.contains(target))) {\n // Focus is in a registered portal — allow it, but don't update\n // lastFocusedInContainer so safety net restores to the last main-container\n // element (e.g., the dropdown trigger) when the portal unmounts\n } else {\n // Focus escaped — redirect back\n const fallback = lastFocusedInContainer.current\n || getFirstFocusableElement({ container })\n || container;\n fallback.focus();\n }\n };\n\n document.addEventListener('focusin', handleFocusIn, true);\n return () => document.removeEventListener('focusin', handleFocusIn, true);\n }, [enabled, containerRef]);\n\n return { triggerRef };\n}\n"],"names":["_lastInteractedElement","_onPointerDown","e","path","composedPath","node","HTMLElement","tabIndex","_onKeyDown","key","document","activeElement","addEventListener","consumeLastInteractedElement","el","_focusAnchor","_focusAnchorClearFrame","setFocusAnchor","cancelAnimationFrame","requestAnimationFrame","consumeFocusAnchor","resolveInitialFocusTarget","container","initialFocus","getFirstFocusableElement","querySelector","useFocusTrap","enabled","containerRef","restoreFocus","returnFocusRef","portalContainerRefs","triggerRef","useRef","lastFocusedInContainer","useLayoutEffect","current","isConnected","focus","previousActiveElement","tagName","contains","handleKeyDown","focusables","getFocusableElements","length","preventDefault","first","last","shiftKey","removeEventListener","handleFocusIn","target","some","ref"],"mappings":";;AAsDA,IAAIA,IAA6C;AAEjD,SAASC,EAAeC,GAAuB;AAE7C,QAAMC,IAAOD,EAAEE,aAAAA;AACf,aAAWC,KAAQF;AACjB,QAAIE,aAAgBC,eAAeD,EAAKE,YAAY,GAAG;AACrDP,MAAAA,IAAyBK;AACzB;AAAA,IACF;AAEJ;AAEA,SAASG,EAAWN,GAAwB;AAE1C,GAAIA,EAAEO,QAAQ,WAAWP,EAAEO,QAAQ,SACjCT,IAAyBU,SAASC;AAEtC;AAEI,OAAOD,WAAa,QACtBA,SAASE,iBAAiB,eAAeX,GAAgB,EAAI,GAC7DS,SAASE,iBAAiB,WAAWJ,GAAY,EAAI;AAQhD,SAASK,IAAmD;AACjE,QAAMC,IAAKd;AACXA,SAAAA,IAAyB,MAClBc;AACT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,EAAI;AAAA,EAC1E,GAAG,CAACf,GAASC,CAAY,CAAC,GAG1BO,EAAgB,MAAM;AACpB,QAAI,CAACR,EAAS;AAEd,UAAML,IAAYM,EAAaQ;AAC/B,QAAI,CAACd,EAAW;AAEhB,UAAM6B,IAAgBA,CAACjD,MAAkB;AACvC,YAAMkD,IAASlD,EAAEkD;AAIjB,MAAKA,GAA2BZ,YAAY,aAExClB,EAAUmB,SAASW,CAAM,IAC3BlB,EAAuBE,UAAUgB,IACxBrB,GAAqBK,SAASiB,KAAKC,CAAAA,MAAOA,EAAIlB,SAASK,SAASW,CAAM,CAAC,MAM/DlB,EAAuBE,WACnCZ,EAAyB;AAAA,QAAEF,WAAAA;AAAAA,MAAAA,CAAW,KACtCA,GACIgB,MAAAA;AAAAA,IAEb;AAEA5B,oBAASE,iBAAiB,WAAWuC,GAAe,EAAI,GACjD,MAAMzC,SAASwC,oBAAoB,WAAWC,GAAe,EAAI;AAAA,EAC1E,GAAG,CAACxB,GAASC,CAAY,CAAC,GAEnB;AAAA,IAAEI,YAAAA;AAAAA,EAAAA;AACX;"}
|
package/dist/index73.js
CHANGED
|
@@ -1,5 +1,65 @@
|
|
|
1
|
-
|
|
1
|
+
import { useCallback as c } from "react";
|
|
2
|
+
import { useRovingFocus as d } from "./index70.js";
|
|
3
|
+
const s = (r, t) => `tab${t ? `-${t}` : ""}-${r}`, l = (r, t) => `panel${t ? `-${t}` : ""}-${r}`, C = (r, t) => ({
|
|
4
|
+
id: l(r, t),
|
|
5
|
+
role: "tabpanel",
|
|
6
|
+
"aria-labelledby": s(r, t)
|
|
7
|
+
});
|
|
8
|
+
function R({
|
|
9
|
+
itemIds: r,
|
|
10
|
+
orientation: t = "horizontal",
|
|
11
|
+
activeItem: n,
|
|
12
|
+
idBase: e = "",
|
|
13
|
+
includePanelLinks: a = !0,
|
|
14
|
+
externalPanelId: u
|
|
15
|
+
}) {
|
|
16
|
+
const {
|
|
17
|
+
setFocusedId: f,
|
|
18
|
+
handleKeyDown: p,
|
|
19
|
+
getRovingItemProps: b,
|
|
20
|
+
getContainerProps: g
|
|
21
|
+
} = d({
|
|
22
|
+
itemIds: r,
|
|
23
|
+
defaultFocusedId: n,
|
|
24
|
+
orientation: t,
|
|
25
|
+
loop: !0,
|
|
26
|
+
role: "tablist"
|
|
27
|
+
}), P = c((o) => {
|
|
28
|
+
const {
|
|
29
|
+
ref: $,
|
|
30
|
+
tabIndex: x,
|
|
31
|
+
onFocus: F
|
|
32
|
+
} = b(o), y = n === o;
|
|
33
|
+
return {
|
|
34
|
+
ref: $,
|
|
35
|
+
tabIndex: x,
|
|
36
|
+
onFocus: F,
|
|
37
|
+
id: s(o, e),
|
|
38
|
+
...a && {
|
|
39
|
+
"aria-controls": u ?? l(o, e)
|
|
40
|
+
},
|
|
41
|
+
"aria-selected": y,
|
|
42
|
+
role: "tab"
|
|
43
|
+
};
|
|
44
|
+
}, [n, b, e, a, u]), T = c((o) => ({
|
|
45
|
+
id: l(o, e),
|
|
46
|
+
role: "tabpanel",
|
|
47
|
+
"aria-labelledby": s(o, e)
|
|
48
|
+
}), [e]);
|
|
49
|
+
return {
|
|
50
|
+
getTabProps: P,
|
|
51
|
+
getPanelProps: T,
|
|
52
|
+
getTabListProps: g,
|
|
53
|
+
setFocusedTabId: f,
|
|
54
|
+
handleKeyDown: p,
|
|
55
|
+
getPanelId: (o) => l(o, e),
|
|
56
|
+
getTabId: (o) => s(o, e)
|
|
57
|
+
};
|
|
58
|
+
}
|
|
2
59
|
export {
|
|
3
|
-
|
|
60
|
+
l as getPanelId,
|
|
61
|
+
s as getTabId,
|
|
62
|
+
C as getTabPanelProps,
|
|
63
|
+
R as useTabsA11y
|
|
4
64
|
};
|
|
5
65
|
//# sourceMappingURL=index73.js.map
|
package/dist/index73.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index73.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index73.js","sources":["../src/utils/a11y/useTabsA11y.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { useRovingFocus } from './useRovingFocus';\n\nexport const getTabId = (itemId: string, idBase: string) => {\n const suffix = idBase ? `-${idBase}` : '';\n return `tab${suffix}-${itemId}`;\n};\n\nexport const getPanelId = (itemId: string, idBase: string) => {\n const suffix = idBase ? `-${idBase}` : '';\n return `panel${suffix}-${itemId}`;\n};\n\nexport const getTabPanelProps = (tabId: string, idBase: string) => ({\n id: getPanelId(tabId, idBase),\n role: 'tabpanel' as const,\n 'aria-labelledby': getTabId(tabId, idBase)\n});\n\ninterface UseTabsA11yProps {\n itemIds: string[];\n orientation?: 'horizontal' | 'vertical';\n activeItem: string;\n idBase?: string;\n includePanelLinks?: boolean; // Set to false when consumer manages their own panels externally\n externalPanelId?: string; // When set, all tabs point aria-controls to this single external panel id\n}\n\ninterface TabA11yProps {\n ref: (el: HTMLElement | null) => void;\n tabIndex: number;\n onFocus: () => void;\n id: string;\n 'aria-controls'?: string;\n 'aria-selected': boolean;\n role: 'tab';\n}\n\ninterface PanelA11yProps {\n id: string;\n role: 'tabpanel';\n 'aria-labelledby': string;\n}\n\n/**\n * Hook for managing Tabs (NavigationBar) focus and ARIA props.\n * Handles roving tabindex pattern and generates tab-specific ARIA attributes.\n * \n * @example\n * const itemIds = useMemo(() => navigationItems.map(item => item.id), [navigationItems]);\n * const { getTabProps, setFocusedTabId, handleKeyDown } = useTabsA11y({\n * itemIds,\n * activeNavigationItem: 'tab-1',\n * orientation: 'horizontal',\n * idBase: 'settings'\n * });\n */\nexport function useTabsA11y({\n itemIds,\n orientation = 'horizontal',\n activeItem,\n idBase = '',\n includePanelLinks = true,\n externalPanelId\n}: UseTabsA11yProps) {\n const {\n setFocusedId: setFocusedTabId,\n handleKeyDown,\n getRovingItemProps,\n getContainerProps\n } = useRovingFocus({\n itemIds,\n defaultFocusedId: activeItem,\n orientation,\n loop: true,\n role: 'tablist'\n });\n\n /**\n * Get all props needed for a tab button.\n * Combines roving focus props (ref, tabIndex) with tab-specific ARIA attributes.\n */\n const getTabProps = useCallback((itemId: string): TabA11yProps => {\n const { ref, tabIndex, onFocus } = getRovingItemProps(itemId);\n const isSelected = activeItem === itemId;\n\n return {\n ref,\n tabIndex,\n onFocus,\n id: getTabId(itemId, idBase),\n ...(includePanelLinks && { 'aria-controls': externalPanelId ?? getPanelId(itemId, idBase) }),\n 'aria-selected': isSelected,\n role: 'tab'\n };\n }, [activeItem, getRovingItemProps, idBase, includePanelLinks, externalPanelId]);\n\n /**\n * Get all props needed for a tab panel.\n * Provides ARIA attributes to associate the panel with its tab.\n */\n const getPanelProps = useCallback((itemId: string): PanelA11yProps => {\n return {\n id: getPanelId(itemId, idBase),\n role: 'tabpanel',\n 'aria-labelledby': getTabId(itemId, idBase)\n };\n }, [idBase]);\n\n return {\n getTabProps,\n getPanelProps,\n getTabListProps: getContainerProps,\n setFocusedTabId,\n handleKeyDown,\n getPanelId: (itemId: string) => getPanelId(itemId, idBase),\n getTabId: (itemId: string) => getTabId(itemId, idBase)\n };\n}\n\n"],"names":["useCallback","useRovingFocus","getTabId","itemId","idBase","getPanelId","getTabPanelProps","tabId","id","role","useTabsA11y","itemIds","orientation","activeItem","includePanelLinks","externalPanelId","setFocusedId","setFocusedTabId","handleKeyDown","getRovingItemProps","getContainerProps","defaultFocusedId","loop","getTabProps","ref","tabIndex","onFocus","isSelected","getPanelProps","getTabListProps"],"mappings":"AAGO,SAAA,eAAAA,SAAA;AAAA,SAAA,kBAAAC,SAAA;AAAA,MAAMC,IAAWA,CAACC,GAAgBC,MAEhC,MADQA,IAAS,IAAIA,CAAM,KAAK,EACpB,IAAID,CAAM,IAGlBE,IAAaA,CAACF,GAAgBC,MAElC,QADQA,IAAS,IAAIA,CAAM,KAAK,EAClB,IAAID,CAAM,IAGpBG,IAAmBA,CAACC,GAAeH,OAAoB;AAAA,EAClEI,IAAIH,EAAWE,GAAOH,CAAM;AAAA,EAC5BK,MAAM;AAAA,EACN,mBAAmBP,EAASK,GAAOH,CAAM;AAC3C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AACF,MAAmBE,EAAWF,GAAQC,CAAM;AAAA,IACzDF,UAAUA,CAACC,MAAmBD,EAASC,GAAQC,CAAM;AAAA,EAAA;AAEzD;"}
|
package/dist/index74.js
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
import { useEffect as u } from "react";
|
|
2
|
+
import { getFirstFocusableElement as f } from "./index71.js";
|
|
3
|
+
function s({
|
|
4
|
+
focusRef: r,
|
|
5
|
+
containerRef: t,
|
|
6
|
+
isReady: e,
|
|
7
|
+
shouldFocus: n
|
|
8
|
+
}) {
|
|
9
|
+
u(() => {
|
|
10
|
+
if (e && !(n && !n())) {
|
|
11
|
+
if (r?.current) {
|
|
12
|
+
r.current.focus();
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
t?.current && f({
|
|
16
|
+
container: t.current
|
|
17
|
+
})?.focus();
|
|
18
|
+
}
|
|
19
|
+
}, [e]);
|
|
20
|
+
}
|
|
2
21
|
export {
|
|
3
|
-
|
|
22
|
+
s as useFocusOnReady
|
|
4
23
|
};
|
|
5
24
|
//# sourceMappingURL=index74.js.map
|
package/dist/index74.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index74.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index74.js","sources":["../src/utils/a11y/useFocusOnReady.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport type { RefObject } from 'react';\nimport { getFirstFocusableElement } from './focusableElements';\n\nexport interface UseFocusOnReadyOptions {\n /**\n * Specific element to focus. Takes priority over containerRef.\n */\n focusRef?: RefObject<HTMLElement | null>;\n /**\n * Container to search for first focusable element.\n * Used as fallback when focusRef is not provided or its current is null.\n */\n containerRef?: RefObject<HTMLElement | null>;\n /**\n * When this transitions to true, focus is triggered.\n */\n isReady: boolean;\n /**\n * Optional guard for async content — evaluated at the moment isReady becomes true.\n * Return false to skip focusing (e.g. if the user has tabbed away while content was loading).\n * Not needed for synchronous open/close like modals or dropdowns where focus is immediate.\n */\n shouldFocus?: () => boolean;\n}\n\n/**\n * Moves focus to an element when an async condition becomes ready.\n *\n * When `focusRef` is provided, focuses that element directly.\n * When only `containerRef` is provided, finds and focuses the first focusable child.\n * When both are provided, `focusRef` takes priority; `containerRef` is the fallback.\n *\n * @example Focus first focusable in container after loading\n * ```tsx\n * useFocusOnReady({\n * containerRef: panelRef,\n * isReady: !isLoading,\n * shouldFocus: () => document.activeElement === panelRef.current\n * });\n * ```\n *\n * @example Focus a specific element when modal opens\n * ```tsx\n * useFocusOnReady({\n * focusRef: closeButtonRef,\n * isReady: isOpen\n * });\n * ```\n *\n * @example Specific element with container fallback\n * ```tsx\n * useFocusOnReady({\n * focusRef: preferredRef,\n * containerRef: dialogRef,\n * isReady: isOpen\n * });\n * ```\n */\nexport function useFocusOnReady({\n focusRef,\n containerRef,\n isReady,\n shouldFocus\n}: UseFocusOnReadyOptions): void {\n useEffect(() => {\n if (!isReady) return;\n if (shouldFocus && !shouldFocus()) return;\n\n if (focusRef?.current) {\n focusRef.current.focus();\n return;\n }\n\n if (containerRef?.current) {\n const first = getFirstFocusableElement({ container: containerRef.current });\n first?.focus();\n }\n }, [isReady]);\n}\n"],"names":["useEffect","getFirstFocusableElement","useFocusOnReady","focusRef","containerRef","isReady","shouldFocus","current","focus","container"],"mappings":"AA2DO,SAAA,aAAAA,SAAA;AAAA,SAAA,4BAAAC,SAAA;AAAA,SAASC,EAAgB;AAAA,EAC9BC,UAAAA;AAAAA,EACAC,cAAAA;AAAAA,EACAC,SAAAA;AAAAA,EACAC,aAAAA;AACsB,GAAS;AAC/BN,EAAAA,EAAU,MAAM;AACd,QAAKK,KACDC,EAAAA,KAAe,CAACA,MAEpB;AAAA,UAAIH,GAAUI,SAAS;AACrBJ,QAAAA,EAASI,QAAQC,MAAAA;AACjB;AAAA,MACF;AAEA,MAAIJ,GAAcG,WACFN,EAAyB;AAAA,QAAEQ,WAAWL,EAAaG;AAAAA,MAAAA,CAAS,GACnEC,MAAAA;AAAAA;AAAAA,EAEX,GAAG,CAACH,CAAO,CAAC;AACd;"}
|
package/dist/index75.js
CHANGED
|
@@ -1,5 +1,174 @@
|
|
|
1
|
-
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var g = (r, e, t) => e in r ? m(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var o = (r, e, t) => g(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
const u = "sr-only", h = "data-batch-id", f = "data-modal-announcer";
|
|
5
|
+
let c = null;
|
|
6
|
+
function p() {
|
|
7
|
+
return c || (c = new T()), c;
|
|
8
|
+
}
|
|
9
|
+
class T {
|
|
10
|
+
constructor() {
|
|
11
|
+
o(this, "container", null);
|
|
12
|
+
o(this, "assertiveLog", null);
|
|
13
|
+
o(this, "politeLog", null);
|
|
14
|
+
o(this, "cleanupTimers", /* @__PURE__ */ new Map());
|
|
15
|
+
o(this, "delayTimers", /* @__PURE__ */ new Map());
|
|
16
|
+
o(this, "pendingRafByBatchId", /* @__PURE__ */ new Map());
|
|
17
|
+
o(this, "ready", !1);
|
|
18
|
+
o(this, "pendingQueue", []);
|
|
19
|
+
typeof document > "u" || (this.container = document.createElement("div"), this.container.dataset.liveAnnouncer = "true", this.container.className = u, this.assertiveLog = this.createLog("assertive"), this.politeLog = this.createLog("polite"), this.container.appendChild(this.assertiveLog), this.container.appendChild(this.politeLog), document.body.prepend(this.container), this.isTestEnvironment() ? this.ready = !0 : setTimeout(() => {
|
|
20
|
+
this.ready = !0, this.flushPendingQueue();
|
|
21
|
+
}, 100));
|
|
22
|
+
}
|
|
23
|
+
// -----------------------------------------------------------------------
|
|
24
|
+
// Public
|
|
25
|
+
// -----------------------------------------------------------------------
|
|
26
|
+
announce(e, t = {}) {
|
|
27
|
+
const i = {
|
|
28
|
+
assertiveness: t.assertiveness ?? "polite",
|
|
29
|
+
timeout: t.timeout ?? 7e3,
|
|
30
|
+
batchId: t.batchId ?? "",
|
|
31
|
+
delay: t.delay ?? 0
|
|
32
|
+
};
|
|
33
|
+
if (i.batchId) {
|
|
34
|
+
const n = this.delayTimers.get(i.batchId);
|
|
35
|
+
n && (clearTimeout(n), this.delayTimers.delete(i.batchId));
|
|
36
|
+
}
|
|
37
|
+
if (!this.ready) {
|
|
38
|
+
this.pendingQueue.push({
|
|
39
|
+
message: e,
|
|
40
|
+
options: i
|
|
41
|
+
});
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (i.delay > 0) {
|
|
45
|
+
const n = i.batchId || `__delay_${Date.now()}_${Math.random()}`, a = setTimeout(() => {
|
|
46
|
+
this.delayTimers.delete(n), this.doAnnounce(e, i);
|
|
47
|
+
}, i.delay);
|
|
48
|
+
this.delayTimers.set(n, a);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
this.doAnnounce(e, i);
|
|
52
|
+
}
|
|
53
|
+
clear(e) {
|
|
54
|
+
(!e || e === "assertive") && this.clearLog(this.assertiveLog), (!e || e === "polite") && this.clearLog(this.politeLog);
|
|
55
|
+
}
|
|
56
|
+
destroy() {
|
|
57
|
+
this.cleanupTimers.forEach((e) => clearTimeout(e)), this.cleanupTimers.clear(), this.delayTimers.forEach((e) => clearTimeout(e)), this.delayTimers.clear(), this.pendingRafByBatchId.forEach((e) => cancelAnimationFrame(e)), this.pendingRafByBatchId.clear(), this.container?.remove(), this.container = null, this.assertiveLog = null, this.politeLog = null, this.ready = !1, this.pendingQueue = [], c === this && (c = null);
|
|
58
|
+
}
|
|
59
|
+
isAttached() {
|
|
60
|
+
return this.container?.isConnected ?? !1;
|
|
61
|
+
}
|
|
62
|
+
// -----------------------------------------------------------------------
|
|
63
|
+
// Private
|
|
64
|
+
// -----------------------------------------------------------------------
|
|
65
|
+
createLog(e) {
|
|
66
|
+
const t = document.createElement("div");
|
|
67
|
+
return t.setAttribute("role", "log"), t.setAttribute("aria-live", e), t.setAttribute("aria-relevant", "additions"), t;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Returns the appropriate log element for the current context.
|
|
71
|
+
* When an aria-modal dialog is active, announcements must be made from
|
|
72
|
+
* within the modal (screen readers ignore content outside aria-modal).
|
|
73
|
+
* A live region is lazily created inside the modal and cleaned up when
|
|
74
|
+
* the modal is removed from the DOM.
|
|
75
|
+
*/
|
|
76
|
+
getLogForContext(e) {
|
|
77
|
+
const t = this.findVisibleModal();
|
|
78
|
+
if (!t)
|
|
79
|
+
return e === "assertive" ? this.assertiveLog : this.politeLog;
|
|
80
|
+
let i = t.querySelector(`[${f}]`);
|
|
81
|
+
if (!i) {
|
|
82
|
+
i = document.createElement("div"), i.setAttribute(f, "true"), i.className = u;
|
|
83
|
+
const s = this.createLog("assertive"), d = this.createLog("polite");
|
|
84
|
+
i.appendChild(s), i.appendChild(d), t.appendChild(i);
|
|
85
|
+
}
|
|
86
|
+
const n = i.querySelectorAll('[role="log"]'), a = n[0], l = n[1];
|
|
87
|
+
return e === "assertive" ? a : l;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Returns the first aria-modal element that is actually visible.
|
|
91
|
+
* A modal is considered hidden if:
|
|
92
|
+
* - it or an ancestor has aria-hidden="true", or
|
|
93
|
+
* - its computed visibility is "hidden" (se-design Modal uses the
|
|
94
|
+
* `invisible` CSS class on the wrapper when closed).
|
|
95
|
+
*/
|
|
96
|
+
findVisibleModal() {
|
|
97
|
+
const e = document.querySelectorAll('[aria-modal="true"]');
|
|
98
|
+
for (const t of e) {
|
|
99
|
+
const i = t;
|
|
100
|
+
if (!i.closest('[aria-hidden="true"]') && getComputedStyle(i).visibility !== "hidden")
|
|
101
|
+
return i;
|
|
102
|
+
}
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
doAnnounce(e, t) {
|
|
106
|
+
const i = this.getLogForContext(t.assertiveness);
|
|
107
|
+
if (!i) return;
|
|
108
|
+
let n = !1;
|
|
109
|
+
if (t.batchId) {
|
|
110
|
+
const s = i.querySelector(`[${h}="${CSS.escape(t.batchId)}"]`);
|
|
111
|
+
s && (this.removeNode(s), n = !0);
|
|
112
|
+
}
|
|
113
|
+
const a = document.createElement("div");
|
|
114
|
+
a.textContent = e, t.batchId && a.setAttribute(h, t.batchId);
|
|
115
|
+
const l = () => {
|
|
116
|
+
if (i.isConnected && (i.appendChild(a), e !== "")) {
|
|
117
|
+
const s = setTimeout(() => {
|
|
118
|
+
this.removeNode(a);
|
|
119
|
+
}, t.timeout);
|
|
120
|
+
this.cleanupTimers.set(a, s);
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
if (n) {
|
|
124
|
+
const s = this.pendingRafByBatchId.get(t.batchId);
|
|
125
|
+
s !== void 0 && cancelAnimationFrame(s);
|
|
126
|
+
const d = requestAnimationFrame(() => {
|
|
127
|
+
this.pendingRafByBatchId.delete(t.batchId), l();
|
|
128
|
+
});
|
|
129
|
+
this.pendingRafByBatchId.set(t.batchId, d);
|
|
130
|
+
} else
|
|
131
|
+
l();
|
|
132
|
+
}
|
|
133
|
+
removeNode(e) {
|
|
134
|
+
const t = this.cleanupTimers.get(e);
|
|
135
|
+
t && (clearTimeout(t), this.cleanupTimers.delete(e)), e.remove();
|
|
136
|
+
}
|
|
137
|
+
clearLog(e) {
|
|
138
|
+
e && (Array.from(e.children).forEach((t) => {
|
|
139
|
+
const i = this.cleanupTimers.get(t);
|
|
140
|
+
i && (clearTimeout(i), this.cleanupTimers.delete(t));
|
|
141
|
+
}), e.innerHTML = "");
|
|
142
|
+
}
|
|
143
|
+
flushPendingQueue() {
|
|
144
|
+
this.pendingQueue.splice(0).forEach(({
|
|
145
|
+
message: t,
|
|
146
|
+
options: i
|
|
147
|
+
}) => this.doAnnounce(t, i));
|
|
148
|
+
}
|
|
149
|
+
isTestEnvironment() {
|
|
150
|
+
try {
|
|
151
|
+
if (typeof IS_REACT_ACT_ENVIRONMENT == "boolean" && IS_REACT_ACT_ENVIRONMENT || typeof jest < "u" || typeof vitest < "u") return !0;
|
|
152
|
+
} catch {
|
|
153
|
+
}
|
|
154
|
+
return !1;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function A(r, e) {
|
|
158
|
+
const t = typeof e == "string" ? {
|
|
159
|
+
assertiveness: e
|
|
160
|
+
} : e ?? {};
|
|
161
|
+
p().announce(r, t);
|
|
162
|
+
}
|
|
163
|
+
function L(r) {
|
|
164
|
+
c?.clear(r);
|
|
165
|
+
}
|
|
166
|
+
function I() {
|
|
167
|
+
c?.destroy();
|
|
168
|
+
}
|
|
2
169
|
export {
|
|
3
|
-
|
|
170
|
+
A as announce,
|
|
171
|
+
L as clearAnnouncer,
|
|
172
|
+
I as destroyAnnouncer
|
|
4
173
|
};
|
|
5
174
|
//# sourceMappingURL=index75.js.map
|
package/dist/index75.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index75.js","sources":["../src/assets/icons/checkbox-hover-tick.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%204C0%201.79086%201.79086%200%204%200H12C14.2091%200%2016%201.79086%2016%204V12C16%2014.2091%2014.2091%2016%2012%2016H4C1.79086%2016%200%2014.2091%200%2012V4Z'%20fill='%230167C2'/%3e%3cpath%20d='M11.8082%205.5L6.89749%2010.5L4.66534%208.22727'%20stroke='white'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_16"],"mappings":"AAAA,MAAeA,IAAA;"}
|
|
1
|
+
{"version":3,"file":"index75.js","sources":["../src/utils/a11y/liveAnnouncer/LiveAnnouncer.ts"],"sourcesContent":["/**\n * LiveAnnouncer — singleton vanilla-DOM announcer for screen readers.\n *\n * Architecture:\n * - Prepends a visually-hidden container to document.body on first use.\n * - Two <div role=\"log\" aria-live=\"...\"> regions: one polite, one assertive.\n * - Each announce() appends a NEW child node (aria-relevant=\"additions\" makes\n * screen readers announce only additions, never re-read existing content).\n * - Child nodes auto-remove after a timeout (default 7 s) to keep the DOM clean.\n * - batchId option: if a node with the same batchId already exists in a log,\n * it is replaced — so only the final value is announced (e.g. \"N results\").\n *\n * No React dependency. No role=\"status\" or role=\"alert\" (avoids double-announce\n * bugs on iOS VoiceOver).\n */\n\nexport type Assertiveness = 'assertive' | 'polite';\n\nexport interface AnnounceOptions {\n /** Default: 'polite' */\n assertiveness?: Assertiveness;\n /** Auto-clear timeout in ms. Default: 7000 */\n timeout?: number;\n /**\n * When provided, any pending node with the same batchId is replaced rather\n * than appending a second node. Useful for rapidly-updating counts\n * (e.g. search results, selection count).\n */\n batchId?: string;\n /**\n * Delay in ms before the announcement is made. Useful when focus changes\n * would otherwise swallow the announcement (e.g. after adding a tag in\n * a combobox). A subsequent call with the same batchId cancels any\n * pending delayed announcement.\n */\n delay?: number;\n}\n\nconst DEFAULT_TIMEOUT = 7000;\nconst SAFARI_INIT_DELAY = 100;\n\nconst SR_ONLY_CLASS = 'sr-only';\n\n/** Attribute used to find batchId nodes for replacement. */\nconst BATCH_ATTR = 'data-batch-id';\n\n/** Attribute used to identify announcer containers injected into modals. */\nconst MODAL_ANNOUNCER_ATTR = 'data-modal-announcer';\n\n// ---------------------------------------------------------------------------\n// Singleton\n// ---------------------------------------------------------------------------\n\nlet instance: LiveAnnouncer | null = null;\n\n/**\n * Get or create the singleton LiveAnnouncer.\n * Safe to call multiple times — returns the same instance.\n */\nfunction getInstance(): LiveAnnouncer {\n if (!instance) {\n instance = new LiveAnnouncer();\n }\n return instance;\n}\n\n// ---------------------------------------------------------------------------\n// Class\n// ---------------------------------------------------------------------------\n\nclass LiveAnnouncer {\n private container: HTMLDivElement | null = null;\n private assertiveLog: HTMLDivElement | null = null;\n private politeLog: HTMLDivElement | null = null;\n private cleanupTimers: Map<HTMLElement, ReturnType<typeof setTimeout>> = new Map();\n private delayTimers: Map<string, ReturnType<typeof setTimeout>> = new Map();\n private pendingRafByBatchId: Map<string, number> = new Map();\n private ready = false;\n private pendingQueue: Array<{ message: string; options: Required<AnnounceOptions> }> = [];\n\n constructor() {\n if (typeof document === 'undefined') return;\n\n this.container = document.createElement('div');\n this.container.dataset.liveAnnouncer = 'true';\n this.container.className = SR_ONLY_CLASS;\n\n this.assertiveLog = this.createLog('assertive');\n this.politeLog = this.createLog('polite');\n\n this.container.appendChild(this.assertiveLog);\n this.container.appendChild(this.politeLog);\n\n // Prepend so screen readers encounter it early in the DOM.\n document.body.prepend(this.container);\n\n // Safari/VoiceOver ignores content injected within ~100 ms of the live\n // region being added to the DOM. Delay readiness accordingly.\n // In test environments, skip the delay.\n if (this.isTestEnvironment()) {\n this.ready = true;\n } else {\n setTimeout(() => {\n this.ready = true;\n this.flushPendingQueue();\n }, SAFARI_INIT_DELAY);\n }\n }\n\n // -----------------------------------------------------------------------\n // Public\n // -----------------------------------------------------------------------\n\n announce(message: string, options: AnnounceOptions = {}): void {\n const resolved: Required<AnnounceOptions> = {\n assertiveness: options.assertiveness ?? 'polite',\n timeout: options.timeout ?? DEFAULT_TIMEOUT,\n batchId: options.batchId ?? '',\n delay: options.delay ?? 0,\n };\n\n // Cancel any pending delayed announcement with the same batchId.\n if (resolved.batchId) {\n const pendingTimer = this.delayTimers.get(resolved.batchId);\n if (pendingTimer) {\n clearTimeout(pendingTimer);\n this.delayTimers.delete(resolved.batchId);\n }\n }\n\n if (!this.ready) {\n this.pendingQueue.push({ message, options: resolved });\n return;\n }\n\n if (resolved.delay > 0) {\n const key = resolved.batchId || `__delay_${Date.now()}_${Math.random()}`;\n const timer = setTimeout(() => {\n this.delayTimers.delete(key);\n this.doAnnounce(message, resolved);\n }, resolved.delay);\n this.delayTimers.set(key, timer);\n return;\n }\n\n this.doAnnounce(message, resolved);\n }\n\n clear(assertiveness?: Assertiveness): void {\n if (!assertiveness || assertiveness === 'assertive') {\n this.clearLog(this.assertiveLog);\n }\n if (!assertiveness || assertiveness === 'polite') {\n this.clearLog(this.politeLog);\n }\n }\n\n destroy(): void {\n // Cancel all pending auto-clear timers.\n this.cleanupTimers.forEach((timer) => clearTimeout(timer));\n this.cleanupTimers.clear();\n // Cancel all pending delayed announcements.\n this.delayTimers.forEach((timer) => clearTimeout(timer));\n this.delayTimers.clear();\n // Cancel any pending rAF deferred appends.\n this.pendingRafByBatchId.forEach((rafId) => cancelAnimationFrame(rafId));\n this.pendingRafByBatchId.clear();\n\n this.container?.remove();\n this.container = null;\n this.assertiveLog = null;\n this.politeLog = null;\n this.ready = false;\n this.pendingQueue = [];\n\n if (instance === this) {\n instance = null;\n }\n }\n\n isAttached(): boolean {\n return this.container?.isConnected ?? false;\n }\n\n // -----------------------------------------------------------------------\n // Private\n // -----------------------------------------------------------------------\n\n private createLog(ariaLive: Assertiveness): HTMLDivElement {\n const log = document.createElement('div');\n log.setAttribute('role', 'log');\n log.setAttribute('aria-live', ariaLive);\n log.setAttribute('aria-relevant', 'additions');\n return log;\n }\n\n /**\n * Returns the appropriate log element for the current context.\n * When an aria-modal dialog is active, announcements must be made from\n * within the modal (screen readers ignore content outside aria-modal).\n * A live region is lazily created inside the modal and cleaned up when\n * the modal is removed from the DOM.\n */\n private getLogForContext(assertiveness: Assertiveness): HTMLDivElement | null {\n // Find the first *visible* aria-modal dialog. Hidden modals (e.g. pre-\n // rendered paywall, upload-contacts) must be skipped — otherwise the\n // announcement lands inside a hidden container and is never read.\n const modal = this.findVisibleModal();\n if (!modal) {\n return assertiveness === 'assertive' ? this.assertiveLog : this.politeLog;\n }\n\n // Find or create a live region container inside the modal.\n let modalAnnouncer = modal.querySelector(`[${MODAL_ANNOUNCER_ATTR}]`) as HTMLDivElement | null;\n if (!modalAnnouncer) {\n modalAnnouncer = document.createElement('div');\n modalAnnouncer.setAttribute(MODAL_ANNOUNCER_ATTR, 'true');\n modalAnnouncer.className = SR_ONLY_CLASS;\n\n const assertiveLog = this.createLog('assertive');\n const politeLog = this.createLog('polite');\n modalAnnouncer.appendChild(assertiveLog);\n modalAnnouncer.appendChild(politeLog);\n\n modal.appendChild(modalAnnouncer);\n }\n\n const logs = modalAnnouncer.querySelectorAll('[role=\"log\"]');\n const assertiveLog = logs[0] as HTMLDivElement | null;\n const politeLog = logs[1] as HTMLDivElement | null;\n\n return assertiveness === 'assertive' ? assertiveLog : politeLog;\n }\n\n /**\n * Returns the first aria-modal element that is actually visible.\n * A modal is considered hidden if:\n * - it or an ancestor has aria-hidden=\"true\", or\n * - its computed visibility is \"hidden\" (se-design Modal uses the\n * `invisible` CSS class on the wrapper when closed).\n */\n private findVisibleModal(): HTMLElement | null {\n const modals = document.querySelectorAll('[aria-modal=\"true\"]');\n for (const m of modals) {\n const el = m as HTMLElement;\n if (el.closest('[aria-hidden=\"true\"]')) continue;\n if (getComputedStyle(el).visibility === 'hidden') continue;\n return el;\n }\n return null;\n }\n\n private doAnnounce(message: string, options: Required<AnnounceOptions>): void {\n const log = this.getLogForContext(options.assertiveness);\n if (!log) return;\n\n // batchId dedup: remove any existing node with the same batchId.\n let hadExisting = false;\n if (options.batchId) {\n const existing = log.querySelector(`[${BATCH_ATTR}=\"${CSS.escape(options.batchId)}\"]`) as HTMLElement | null;\n if (existing) {\n this.removeNode(existing);\n hadExisting = true;\n }\n }\n\n const node = document.createElement('div');\n node.textContent = message;\n\n if (options.batchId) {\n node.setAttribute(BATCH_ATTR, options.batchId);\n }\n\n const appendNode = () => {\n // Guard: destroy() may have been called during the rAF window\n if (!log.isConnected) return;\n log.appendChild(node);\n // Auto-remove after timeout to keep the DOM clean.\n if (message !== '') {\n const timer = setTimeout(() => {\n this.removeNode(node);\n }, options.timeout);\n this.cleanupTimers.set(node, timer);\n }\n };\n\n // When replacing a batched node, defer the append by one animation frame.\n // Remove + append in the same tick looks like a mutation to screen readers\n // (aria-relevant=\"additions\" is not triggered), so the announcement is missed.\n // Deferring ensures the SR sees a clean addition event.\n // Cancel any pending rAF for this batchId to avoid duplicate nodes if two\n // announce() calls fire before the first rAF runs.\n if (hadExisting) {\n const pendingRaf = this.pendingRafByBatchId.get(options.batchId);\n if (pendingRaf !== undefined) {\n cancelAnimationFrame(pendingRaf);\n }\n const rafId = requestAnimationFrame(() => {\n this.pendingRafByBatchId.delete(options.batchId);\n appendNode();\n });\n this.pendingRafByBatchId.set(options.batchId, rafId);\n } else {\n appendNode();\n }\n }\n\n private removeNode(node: HTMLElement): void {\n const timer = this.cleanupTimers.get(node);\n if (timer) {\n clearTimeout(timer);\n this.cleanupTimers.delete(node);\n }\n node.remove();\n }\n\n private clearLog(log: HTMLDivElement | null): void {\n if (!log) return;\n // Cancel timers for all children in this log.\n Array.from(log.children).forEach((child) => {\n const timer = this.cleanupTimers.get(child as HTMLElement);\n if (timer) {\n clearTimeout(timer);\n this.cleanupTimers.delete(child as HTMLElement);\n }\n });\n log.innerHTML = '';\n }\n\n private flushPendingQueue(): void {\n const queued = this.pendingQueue.splice(0);\n queued.forEach(({ message, options }) => this.doAnnounce(message, options));\n }\n\n private isTestEnvironment(): boolean {\n try {\n // React 18+ test flag\n // @ts-expect-error – global test flag\n if (typeof IS_REACT_ACT_ENVIRONMENT === 'boolean' && IS_REACT_ACT_ENVIRONMENT) return true;\n // Jest / Vitest\n // @ts-expect-error – jest global may not be typed\n if (typeof jest !== 'undefined') return true;\n // @ts-expect-error – Vitest global\n if (typeof vitest !== 'undefined') return true;\n } catch {\n // ignore\n }\n return false;\n }\n}\n\n// ---------------------------------------------------------------------------\n// Public imperative API (module-level)\n// ---------------------------------------------------------------------------\n\n/**\n * Announce a message to screen readers.\n *\n * Works anywhere — React components, event handlers, thunks, vanilla JS.\n * The singleton live region is lazily created on first call.\n *\n * @example\n * announce('5 results found');\n * announce('Error: upload failed', { assertiveness: 'assertive' });\n * announce('3 items selected', { batchId: 'selection-count' });\n * announce('Invalid email', { assertiveness: 'assertive', delay: 300 });\n */\nexport function announce(message: string, options?: AnnounceOptions): void;\nexport function announce(message: string, assertiveness?: Assertiveness): void;\nexport function announce(\n message: string,\n optionsOrAssertiveness?: AnnounceOptions | Assertiveness\n): void {\n const options: AnnounceOptions =\n typeof optionsOrAssertiveness === 'string'\n ? { assertiveness: optionsOrAssertiveness }\n : optionsOrAssertiveness ?? {};\n\n getInstance().announce(message, options);\n}\n\n/**\n * Clear all pending announcements.\n * @param assertiveness — if omitted, clears both polite and assertive logs.\n */\nexport function clearAnnouncer(assertiveness?: Assertiveness): void {\n instance?.clear(assertiveness);\n}\n\n/**\n * Remove the live-region container from the DOM and reset the singleton.\n * Typically called when the host app unmounts (via LiveAnnouncerProvider).\n */\nexport function destroyAnnouncer(): void {\n instance?.destroy();\n}\n\n/**\n * Check whether the live-region container is currently in the DOM.\n */\nexport function isAnnouncerAttached(): boolean {\n return instance?.isAttached() ?? false;\n}\n"],"names":["SR_ONLY_CLASS","BATCH_ATTR","MODAL_ANNOUNCER_ATTR","instance","getInstance","LiveAnnouncer","constructor","container","assertiveLog","politeLog","cleanupTimers","Map","delayTimers","pendingRafByBatchId","ready","pendingQueue","document","createElement","dataset","liveAnnouncer","className","createLog","appendChild","body","prepend","isTestEnvironment","setTimeout","flushPendingQueue","SAFARI_INIT_DELAY","announce","message","options","resolved","assertiveness","timeout","DEFAULT_TIMEOUT","batchId","delay","pendingTimer","get","clearTimeout","delete","push","key","Date","now","Math","random","timer","doAnnounce","set","clear","clearLog","destroy","forEach","rafId","cancelAnimationFrame","remove","isAttached","isConnected","ariaLive","log","setAttribute","getLogForContext","modal","findVisibleModal","modalAnnouncer","querySelector","logs","querySelectorAll","modals","m","el","closest","getComputedStyle","visibility","hadExisting","existing","CSS","escape","removeNode","node","textContent","appendNode","pendingRaf","undefined","requestAnimationFrame","Array","from","children","child","innerHTML","queued","splice","IS_REACT_ACT_ENVIRONMENT","jest","vitest","optionsOrAssertiveness","clearAnnouncer","destroyAnnouncer"],"mappings":";;;AAyCA,MAAMA,IAAgB,WAGhBC,IAAa,iBAGbC,IAAuB;AAM7B,IAAIC,IAAiC;AAMrC,SAASC,IAA6B;AACpC,SAAKD,MAC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EAEQL,SAASS,GAAkC;AACjD,IAAKA,MAEL0B,MAAMC,KAAK3B,EAAI4B,QAAQ,EAAEnC,QAASoC,CAAAA,MAAU;AAC1C,YAAM1C,IAAQ,KAAKtC,cAAc6B,IAAImD,CAAoB;AACzD,MAAI1C,MACFR,aAAaQ,CAAK,GAClB,KAAKtC,cAAc+B,OAAOiD,CAAoB;AAAA,IAElD,CAAC,GACD7B,EAAI8B,YAAY;AAAA,EAClB;AAAA,EAEQhE,oBAA0B;AAEhCiE,IADe,KAAK7E,aAAa8E,OAAO,CAAC,EAClCvC,QAAQ,CAAC;AAAA,MAAExB,SAAAA;AAAAA,MAASC,SAAAA;AAAAA,IAAAA,MAAc,KAAKkB,WAAWnB,GAASC,CAAO,CAAC;AAAA,EAC5E;AAAA,EAEQN,oBAA6B;AACnC,QAAI;AAQF,UALI,OAAOqE,4BAA6B,aAAaA,4BAGjD,OAAOC,OAAS,OAEhB,OAAOC,SAAW,IAAa,QAAO;AAAA,IAC5C,QAAQ;AAAA,IACN;AAEF,WAAO;AAAA,EACT;AACF;AAoBO,SAASnE,EACdC,GACAmE,GACM;AACN,QAAMlE,IACJ,OAAOkE,KAA2B,WAC9B;AAAA,IAAEhE,eAAegE;AAAAA,EAAAA,IACjBA,KAA0B,CAAA;AAEhC7F,EAAAA,IAAcyB,SAASC,GAASC,CAAO;AACzC;AAMO,SAASmE,EAAejE,GAAqC;AAClE9B,EAAAA,GAAUgD,MAAMlB,CAAa;AAC/B;AAMO,SAASkE,IAAyB;AACvChG,EAAAA,GAAUkD,QAAAA;AACZ;"}
|
package/dist/index76.js
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
import o, { useEffect as t, useMemo as c, createContext as u } from "react";
|
|
2
|
+
import { announce as e, destroyAnnouncer as a, clearAnnouncer as l } from "./index75.js";
|
|
3
|
+
const i = /* @__PURE__ */ u(null), f = ({
|
|
4
|
+
children: n
|
|
5
|
+
}) => {
|
|
6
|
+
t(() => (e(""), () => {
|
|
7
|
+
a();
|
|
8
|
+
}), []);
|
|
9
|
+
const r = c(() => ({
|
|
10
|
+
announce: e,
|
|
11
|
+
clear: l
|
|
12
|
+
}), []);
|
|
13
|
+
return /* @__PURE__ */ o.createElement(i.Provider, {
|
|
14
|
+
value: r
|
|
15
|
+
}, n);
|
|
16
|
+
};
|
|
2
17
|
export {
|
|
3
|
-
|
|
18
|
+
i as LiveAnnouncerContext,
|
|
19
|
+
f as LiveAnnouncerProvider
|
|
4
20
|
};
|
|
5
21
|
//# sourceMappingURL=index76.js.map
|
package/dist/index76.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index76.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index76.js","sources":["../src/utils/a11y/liveAnnouncer/LiveAnnouncerProvider.tsx"],"sourcesContent":["import React, { createContext, useEffect, useMemo } from 'react';\nimport {\n announce,\n clearAnnouncer,\n destroyAnnouncer,\n type AnnounceOptions,\n type Assertiveness,\n} from './LiveAnnouncer';\n\n// ---------------------------------------------------------------------------\n// Context\n// ---------------------------------------------------------------------------\n\nexport interface LiveAnnouncerContextValue {\n announce: (message: string, options?: AnnounceOptions) => void;\n clear: (assertiveness?: Assertiveness) => void;\n}\n\nexport const LiveAnnouncerContext = createContext<LiveAnnouncerContextValue | null>(null);\n\n// ---------------------------------------------------------------------------\n// Provider\n// ---------------------------------------------------------------------------\n\nexport interface LiveAnnouncerProviderProps {\n children: React.ReactNode;\n}\n\n/**\n * Mounts the singleton live-region container on mount and tears it down on\n * unmount. Provides `{ announce, clear }` via React context so descendants\n * can use the `useLiveAnnouncer` hook.\n *\n * Optional — `announce()` works without a provider (the singleton auto-creates\n * on first call). The provider simply gives you explicit lifecycle control.\n *\n * @example\n * <LiveAnnouncerProvider>\n * <App />\n * </LiveAnnouncerProvider>\n */\nexport const LiveAnnouncerProvider: React.FC<LiveAnnouncerProviderProps> = ({ children }) => {\n // Trigger singleton creation on mount (if not already created).\n // The announce import already lazily creates, but calling it with an empty\n // string ensures the container is in the DOM before any child renders.\n useEffect(() => {\n // Force singleton init by importing — the constructor runs on getInstance().\n // We don't announce anything; just ensure the container exists.\n announce('');\n return () => {\n destroyAnnouncer();\n };\n }, []);\n\n const value = useMemo<LiveAnnouncerContextValue>(\n () => ({ announce, clear: clearAnnouncer }),\n []\n );\n\n return (\n <LiveAnnouncerContext.Provider value={value}>\n {children}\n </LiveAnnouncerContext.Provider>\n );\n};\n"],"names":["React__default","useEffect","useMemo","createContext","announce","destroyAnnouncer","clearAnnouncer","LiveAnnouncerContext","LiveAnnouncerProvider","children","value","clear","React","createElement","Provider"],"mappings":"AAkBO,OAAAA,KAAA,aAAAC,GAAA,WAAAC,GAAA,iBAAAC,SAAA;AAAA,SAAA,YAAAC,GAAA,oBAAAC,GAAA,kBAAAC,SAAA;AAAA,MAAMC,sBAAuE,IAAI,GAuB3EC,IAA8DA,CAAC;AAAA,EAAEC,UAAAA;AAAS,MAAM;AAI3FR,EAAAA,EAAU,OAGRG,EAAS,EAAE,GACJ,MAAM;AACXC,IAAAA,EAAAA;AAAAA,EACF,IACC,CAAA,CAAE;AAEL,QAAMK,IAAQR,EACZ,OAAO;AAAA,IAAEE,UAAAA;AAAAA,IAAUO,OAAOL;AAAAA,EAAAA,IAC1B,CAAA,CACF;AAEA,SACEM,gBAAAA,EAAAC,cAACN,EAAqBO,UAAQ;AAAA,IAACJ,OAAAA;AAAAA,EAAAA,GAC5BD,CAC4B;AAEnC;"}
|
package/dist/index77.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { useContext as t, useMemo as c } from "react";
|
|
2
|
+
import { clearAnnouncer as u, announce as m } from "./index75.js";
|
|
3
|
+
import { LiveAnnouncerContext as a } from "./index76.js";
|
|
4
|
+
function l() {
|
|
5
|
+
const o = t(a), e = c(() => ({
|
|
6
|
+
announce: (n, r) => m(n, r ?? {}),
|
|
7
|
+
clear: (n) => u(n)
|
|
8
|
+
}), []);
|
|
9
|
+
return o ?? e;
|
|
10
|
+
}
|
|
2
11
|
export {
|
|
3
|
-
|
|
12
|
+
l as useLiveAnnouncer
|
|
4
13
|
};
|
|
5
14
|
//# sourceMappingURL=index77.js.map
|
package/dist/index77.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index77.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index77.js","sources":["../src/utils/a11y/liveAnnouncer/useLiveAnnouncer.ts"],"sourcesContent":["import { useContext, useMemo } from 'react';\nimport {\n announce,\n clearAnnouncer,\n type AnnounceOptions,\n type Assertiveness,\n} from './LiveAnnouncer';\nimport { LiveAnnouncerContext, type LiveAnnouncerContextValue } from './LiveAnnouncerProvider';\n\n/**\n * React hook that returns `{ announce, clear }`.\n *\n * Uses the LiveAnnouncerProvider context if available; otherwise falls back\n * to the module-level singleton (which auto-creates on first call).\n *\n * @example\n * const { announce } = useLiveAnnouncer();\n * announce('Document saved');\n * announce('Upload failed', { assertiveness: 'assertive' });\n * announce('5 results', { batchId: 'search-count' });\n */\nexport function useLiveAnnouncer(): LiveAnnouncerContextValue {\n const fromContext = useContext(LiveAnnouncerContext);\n\n const fallback = useMemo<LiveAnnouncerContextValue>(\n () => ({\n announce: (message: string, options?: AnnounceOptions) => announce(message, options ?? {}),\n clear: (assertiveness?: Assertiveness) => clearAnnouncer(assertiveness),\n }),\n []\n );\n\n return fromContext ?? fallback;\n}\n"],"names":["useContext","useMemo","clearAnnouncer","announce","LiveAnnouncerContext","useLiveAnnouncer","fromContext","fallback","message","options","clear","assertiveness"],"mappings":"AAqBO,SAAA,cAAAA,GAAA,WAAAC,SAAA;AAAA,SAAA,kBAAAC,GAAA,YAAAC,SAAA;AAAA,SAAA,wBAAAC,SAAA;AAAA,SAASC,IAA8C;AAC5D,QAAMC,IAAcN,EAAWI,CAAoB,GAE7CG,IAAWN,EACf,OAAO;AAAA,IACLE,UAAUA,CAACK,GAAiBC,MAA8BN,EAASK,GAASC,KAAW,EAAE;AAAA,IACzFC,OAAOA,CAACC,MAAkCT,EAAeS,CAAa;AAAA,EAAA,IAExE,CAAA,CACF;AAEA,SAAOL,KAAeC;AACxB;"}
|
package/dist/index78.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t = () => typeof navigator < "u" && /Android/i.test(navigator.userAgent), o = (i) => {
|
|
2
|
+
const r = "pointerType" in i ? i.pointerType : void 0;
|
|
3
|
+
return r === "" && i.isTrusted ? !0 : t() && r ? i.type === "click" && i.buttons === 1 : i.detail === 0 && !r;
|
|
4
|
+
};
|
|
2
5
|
export {
|
|
3
|
-
|
|
6
|
+
o as isVirtualClick
|
|
4
7
|
};
|
|
5
8
|
//# sourceMappingURL=index78.js.map
|
package/dist/index78.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index78.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index78.js","sources":["../src/utils/virtualClick.ts"],"sourcesContent":["/**\n * Input/virtual click detection helpers.\n */\n\nconst isAndroid = () =>\n typeof navigator !== 'undefined' && /Android/i.test(navigator.userAgent);\n\nexport const isVirtualClick = (event: MouseEvent | PointerEvent): boolean => {\n const pointerType = 'pointerType' in event ? event.pointerType : undefined;\n\n // JAWS/NVDA with Firefox.\n if (pointerType === '' && event.isTrusted) {\n return true;\n }\n\n // Android TalkBack's detail value varies depending on listener type.\n if (isAndroid() && pointerType) {\n return event.type === 'click' && event.buttons === 1;\n }\n\n // Most browsers: virtual click has detail === 0 and no pointerType.\n return event.detail === 0 && !pointerType;\n};\n\n\n"],"names":["isAndroid","navigator","test","userAgent","isVirtualClick","event","pointerType","undefined","isTrusted","type","buttons","detail"],"mappings":"AAIA,MAAMA,IAAYA,MAChB,OAAOC,YAAc,OAAe,WAAWC,KAAKD,UAAUE,SAAS,GAE5DC,IAAiBA,CAACC,MAA8C;AAC3E,QAAMC,IAAc,iBAAiBD,IAAQA,EAAMC,cAAcC;AAGjE,SAAID,MAAgB,MAAMD,EAAMG,YACvB,KAILR,EAAAA,KAAeM,IACVD,EAAMI,SAAS,WAAWJ,EAAMK,YAAY,IAI9CL,EAAMM,WAAW,KAAK,CAACL;AAChC;"}
|
package/dist/index79.js
CHANGED
|
@@ -1,5 +1,59 @@
|
|
|
1
|
-
|
|
1
|
+
import { useState as w, useEffect as x, useCallback as k } from "react";
|
|
2
|
+
import { useScrollActiveIntoView as v } from "./index247.js";
|
|
3
|
+
function y({
|
|
4
|
+
items: u,
|
|
5
|
+
isOpen: t,
|
|
6
|
+
onSelect: l,
|
|
7
|
+
onClose: i,
|
|
8
|
+
onOpen: n,
|
|
9
|
+
loop: c = !0,
|
|
10
|
+
disabled: b = !1,
|
|
11
|
+
listboxRef: D,
|
|
12
|
+
optionSelector: d = '[role="option"]',
|
|
13
|
+
keepHighlightOnSelect: h = !1,
|
|
14
|
+
closeOnTab: g = !0
|
|
15
|
+
}) {
|
|
16
|
+
const [f, a] = w(-1);
|
|
17
|
+
x(() => {
|
|
18
|
+
t || a(-1);
|
|
19
|
+
}, [t]), v({
|
|
20
|
+
containerRef: D,
|
|
21
|
+
activeIndex: f,
|
|
22
|
+
itemSelector: d,
|
|
23
|
+
enabled: t
|
|
24
|
+
});
|
|
25
|
+
const m = k((r) => {
|
|
26
|
+
if (b) {
|
|
27
|
+
r.key === "Escape" && t && (r.preventDefault(), i());
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const e = u.length;
|
|
31
|
+
switch (r.key) {
|
|
32
|
+
case "ArrowDown":
|
|
33
|
+
r.preventDefault(), r.stopPropagation(), !t && e > 0 ? (n?.(), a(0)) : t && e > 0 && a((o) => c ? (o + 1) % e : Math.min(o + 1, e - 1));
|
|
34
|
+
break;
|
|
35
|
+
case "ArrowUp":
|
|
36
|
+
r.preventDefault(), r.stopPropagation(), t && e > 0 && a((o) => o === -1 ? e - 1 : c ? (o - 1 + e) % e : Math.max(o - 1, 0));
|
|
37
|
+
break;
|
|
38
|
+
case "Enter":
|
|
39
|
+
r.preventDefault(), t ? f >= 0 && u[f] && (l(u[f], f), h || a(-1)) : (n?.(), a(0));
|
|
40
|
+
break;
|
|
41
|
+
case "Escape":
|
|
42
|
+
t && (r.preventDefault(), i(), a(-1));
|
|
43
|
+
break;
|
|
44
|
+
case "Tab":
|
|
45
|
+
t && g && (i(), a(-1));
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
}, [b, u, t, f, l, i, n, c, h, g]), s = k((r, e) => `${r}-option-${e}`, []);
|
|
49
|
+
return {
|
|
50
|
+
highlightedIndex: f,
|
|
51
|
+
setHighlightedIndex: a,
|
|
52
|
+
handleKeyDown: m,
|
|
53
|
+
getOptionId: s
|
|
54
|
+
};
|
|
55
|
+
}
|
|
2
56
|
export {
|
|
3
|
-
|
|
57
|
+
y as useComboboxNavigation
|
|
4
58
|
};
|
|
5
59
|
//# sourceMappingURL=index79.js.map
|
package/dist/index79.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index79.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index79.js","sources":["../src/utils/a11y/useComboboxNavigation.ts"],"sourcesContent":["import { useCallback, useState, useEffect } from 'react';\nimport type { RefObject } from 'react';\nimport { useScrollActiveIntoView } from './useScrollActiveIntoView';\n\nexport interface UseComboboxNavigationOptions<T = any> {\n /**\n * Array of items to navigate through\n */\n items: T[];\n \n /**\n * Whether the dropdown is currently open\n */\n isOpen: boolean;\n \n /**\n * Callback when an item is selected (Enter key)\n */\n onSelect: (item: T, index: number) => void;\n \n /**\n * Callback to close the dropdown\n */\n onClose: () => void;\n \n /**\n * Optional: Callback to open the dropdown\n */\n onOpen?: () => void;\n \n /**\n * Whether to wrap around at the ends of the list.\n * Default: true\n */\n loop?: boolean;\n \n /**\n * Whether keyboard navigation is disabled\n * (e.g., for custom rendered content)\n */\n disabled?: boolean;\n\n /**\n * Whether to keep the highlighted index after selecting an item.\n * Useful for multi-select where the dropdown stays open after selection.\n * Default: false\n */\n keepHighlightOnSelect?: boolean;\n\n /**\n * Whether Tab should close the dropdown.\n * Set to false when Tab should move focus to elements within the popup (e.g. CTAs).\n * Default: true\n */\n closeOnTab?: boolean;\n\n /**\n * Ref to the listbox container for scroll management\n */\n listboxRef?: RefObject<HTMLElement | null>;\n \n /**\n * CSS selector for option elements (default: '[role=\"option\"]')\n */\n optionSelector?: string;\n}\n\nexport interface UseComboboxNavigationReturn {\n /**\n * Currently highlighted index (-1 if none)\n */\n highlightedIndex: number;\n \n /**\n * Set the highlighted index manually\n */\n setHighlightedIndex: (index: number | ((prev: number) => number)) => void;\n \n /**\n * Keyboard event handler for the combobox input\n */\n handleKeyDown: (e: React.KeyboardEvent) => void;\n \n /**\n * Generate stable ID for an option\n */\n getOptionId: (listboxId: string, index: number) => string;\n \n}\n\n/**\n * Hook for managing combobox keyboard navigation with aria-activedescendant.\n * \n * Implements WAI-ARIA 1.2 Combobox pattern:\n * - Arrow Up/Down to navigate options\n * - Enter to select highlighted option\n * - Escape to close dropdown\n * - Tab to close and move focus\n * - Auto-scrolls highlighted option into view\n * \n * @example\n * ```tsx\n * const { \n * highlightedIndex, \n * handleKeyDown, \n * getOptionId \n * } = useComboboxNavigation({\n * items: suggestions,\n * isOpen: isDropdownOpen,\n * onSelect: (item, idx) => handleSelect(item),\n * onClose: () => setIsOpen(false),\n * listboxRef\n * });\n * \n * <input\n * role=\"combobox\"\n * onKeyDown={handleKeyDown}\n * aria-activedescendant={highlightedIndex >= 0 ? getOptionId(listboxId, highlightedIndex) : undefined}\n * />\n * ```\n */\nexport function useComboboxNavigation<T = any>({\n items,\n isOpen,\n onSelect,\n onClose,\n onOpen,\n loop = true,\n disabled = false,\n listboxRef,\n optionSelector = '[role=\"option\"]',\n keepHighlightOnSelect = false,\n closeOnTab = true\n}: UseComboboxNavigationOptions<T>): UseComboboxNavigationReturn {\n const [highlightedIndex, setHighlightedIndex] = useState<number>(-1);\n \n // Reset highlighted index when dropdown closes\n useEffect(() => {\n if (!isOpen) {\n setHighlightedIndex(-1);\n }\n }, [isOpen]);\n \n // Auto-scroll highlighted item into view\n useScrollActiveIntoView({\n containerRef: listboxRef,\n activeIndex: highlightedIndex,\n itemSelector: optionSelector,\n enabled: isOpen\n });\n \n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (disabled) {\n // For disabled navigation, still handle Escape\n if (e.key === 'Escape' && isOpen) {\n e.preventDefault();\n onClose();\n }\n return;\n }\n \n const itemCount = items.length;\n \n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault();\n e.stopPropagation();\n if (!isOpen && itemCount > 0) {\n // Open dropdown and highlight first item\n onOpen?.();\n setHighlightedIndex(0);\n } else if (isOpen && itemCount > 0) {\n // Navigate down\n setHighlightedIndex((prev) => {\n if (loop) {\n return (prev + 1) % itemCount;\n }\n return Math.min(prev + 1, itemCount - 1);\n });\n }\n break;\n\n case 'ArrowUp':\n e.preventDefault();\n e.stopPropagation();\n if (isOpen && itemCount > 0) {\n // Navigate up\n setHighlightedIndex((prev) => {\n // If nothing highlighted, go to last item\n if (prev === -1) {\n return itemCount - 1;\n }\n if (loop) {\n return (prev - 1 + itemCount) % itemCount;\n }\n return Math.max(prev - 1, 0);\n });\n }\n break;\n \n case 'Enter':\n e.preventDefault();\n if (!isOpen) {\n onOpen?.();\n setHighlightedIndex(0);\n } else if (highlightedIndex >= 0 && items[highlightedIndex]) {\n onSelect(items[highlightedIndex], highlightedIndex);\n if (!keepHighlightOnSelect) {\n setHighlightedIndex(-1);\n }\n }\n break;\n\n case 'Escape':\n if (isOpen) {\n e.preventDefault();\n onClose();\n setHighlightedIndex(-1);\n }\n break;\n \n case 'Tab':\n // closeOnTab=true (default): close dropdown and let focus move to next element\n // closeOnTab=false: keep dropdown open so Tab reaches CTAs (Clear/Apply)\n if (isOpen && closeOnTab) {\n onClose();\n setHighlightedIndex(-1);\n }\n break;\n }\n },\n [disabled, items, isOpen, highlightedIndex, onSelect, onClose, onOpen, loop, keepHighlightOnSelect, closeOnTab]\n );\n \n const getOptionId = useCallback(\n (listboxId: string, index: number) => `${listboxId}-option-${index}`,\n []\n );\n \n return {\n highlightedIndex,\n setHighlightedIndex,\n handleKeyDown,\n getOptionId\n };\n}\n"],"names":["useState","useEffect","useCallback","useScrollActiveIntoView","useComboboxNavigation","items","isOpen","onSelect","onClose","onOpen","loop","disabled","listboxRef","optionSelector","keepHighlightOnSelect","closeOnTab","highlightedIndex","setHighlightedIndex","containerRef","activeIndex","itemSelector","enabled","handleKeyDown","e","key","preventDefault","itemCount","length","stopPropagation","prev","Math","min","max","getOptionId","listboxId","index"],"mappings":"AAyHO,SAAA,YAAAA,GAAA,aAAAC,GAAA,eAAAC,SAAA;AAAA,SAAA,2BAAAC,SAAA;AAAA,SAASC,EAA+B;AAAA,EAC7CC,OAAAA;AAAAA,EACAC,QAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,SAAAA;AAAAA,EACAC,QAAAA;AAAAA,EACAC,MAAAA,IAAO;AAAA,EACPC,UAAAA,IAAW;AAAA,EACXC,YAAAA;AAAAA,EACAC,gBAAAA,IAAiB;AAAA,EACjBC,uBAAAA,IAAwB;AAAA,EACxBC,YAAAA,IAAa;AACkB,GAAgC;AAC/D,QAAM,CAACC,GAAkBC,CAAmB,IAAIjB,EAAiB,EAAE;AAGnEC,EAAAA,EAAU,MAAM;AACd,IAAKK,KACHW,EAAoB,EAAE;AAAA,EAE1B,GAAG,CAACX,CAAM,CAAC,GAGXH,EAAwB;AAAA,IACtBe,cAAcN;AAAAA,IACdO,aAAaH;AAAAA,IACbI,cAAcP;AAAAA,IACdQ,SAASf;AAAAA,EAAAA,CACV;AAED,QAAMgB,IAAgBpB,EACpB,CAACqB,MAA2B;AAC1B,QAAIZ,GAAU;AAEZ,MAAIY,EAAEC,QAAQ,YAAYlB,MACxBiB,EAAEE,eAAAA,GACFjB,EAAAA;AAEF;AAAA,IACF;AAEA,UAAMkB,IAAYrB,EAAMsB;AAExB,YAA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