se-design 1.0.75 → 1.0.76-dev1
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/style.css +1 -1
- package/dist/components/AccessibleDiv/index.d.ts +24 -0
- package/dist/components/Checkbox/index.d.ts +12 -0
- package/dist/components/CustomAccordion/index.d.ts +1 -0
- package/dist/components/CustomModal/index.d.ts +15 -12
- package/dist/components/DatePicker/useDatePickerA11y.d.ts +50 -0
- package/dist/components/Dropdown/index.d.ts +13 -0
- package/dist/components/Icon/index.d.ts +8 -2
- package/dist/components/InputWithIcon/index.d.ts +9 -1
- package/dist/components/LabelChip/index.d.ts +1 -0
- package/dist/components/Modal/index.d.ts +1 -0
- package/dist/components/PhoneInput/index.d.ts +13 -5
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/SidebarOverlay/index.d.ts +8 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.js +144 -133
- package/dist/index.js.map +1 -1
- package/dist/index10.js +23 -59
- 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 +2 -2
- 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 +2 -2
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +2 -2
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +2 -2
- package/dist/index109.js.map +1 -1
- package/dist/index11.js +70 -63
- package/dist/index11.js.map +1 -1
- package/dist/index110.js +2 -2
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +1 -1
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +1 -1
- 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 +2 -2
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +1 -1
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +71 -34
- package/dist/index12.js.map +1 -1
- package/dist/index120.js +2 -2
- 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 +2 -2
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +2 -2
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +2 -2
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +1 -1
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +1 -1
- 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 +50 -14
- package/dist/index13.js.map +1 -1
- package/dist/index130.js +2 -2
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +2 -2
- 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 +2 -2
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +1 -1
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +1 -1
- 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 -9
- package/dist/index14.js.map +1 -1
- package/dist/index140.js +1 -1
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +2 -2
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +1 -1
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +2 -2
- 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 +2 -2
- package/dist/index147.js.map +1 -1
- package/dist/index148.js +1 -1
- 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 -218
- package/dist/index15.js.map +1 -1
- package/dist/index150.js +2 -2
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +2 -2
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +1 -1
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +2 -2
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +2 -2
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +1 -1
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +1 -1
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +1 -1
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +1 -1
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +1 -1
- package/dist/index159.js.map +1 -1
- package/dist/index16.js +220 -60
- package/dist/index16.js.map +1 -1
- package/dist/index160.js +1 -1
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +1 -1
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +1 -1
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +1 -1
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +1 -1
- package/dist/index164.js.map +1 -1
- package/dist/index165.js +1 -1
- package/dist/index165.js.map +1 -1
- package/dist/index166.js +1 -1
- package/dist/index166.js.map +1 -1
- package/dist/index167.js +1 -1
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +1 -1
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +1 -1
- package/dist/index169.js.map +1 -1
- package/dist/index17.js +60 -99
- package/dist/index17.js.map +1 -1
- package/dist/index170.js +1 -1
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +1 -1
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +1 -1
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +2 -2
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +1 -1
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +1 -1
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +1 -1
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +2 -2
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +1 -1
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +1 -1
- package/dist/index179.js.map +1 -1
- package/dist/index18.js +95 -282
- package/dist/index18.js.map +1 -1
- package/dist/index180.js +2 -2
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +1 -1
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +1 -1
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +1 -1
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +2 -2
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +1 -1
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +1 -1
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +2 -2
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +1 -1
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +2 -2
- package/dist/index189.js.map +1 -1
- package/dist/index19.js +317 -16
- package/dist/index19.js.map +1 -1
- package/dist/index190.js +2 -149
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +2 -9
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +2 -6
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +2 -5
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +2 -40
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +2 -59
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +2 -23
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +152 -0
- package/dist/index197.js.map +1 -0
- package/dist/index198.js +12 -0
- package/dist/index198.js.map +1 -0
- package/dist/index199.js +5 -23
- package/dist/index199.js.map +1 -1
- package/dist/index20.js +15 -31
- package/dist/index20.js.map +1 -1
- package/dist/index200.js +8 -0
- package/dist/index200.js.map +1 -0
- package/dist/index201.js +36 -80
- package/dist/index201.js.map +1 -1
- package/dist/index206.js +26 -0
- package/dist/index206.js.map +1 -0
- package/dist/index207.js +71 -0
- package/dist/index207.js.map +1 -0
- package/dist/index21.js +33 -61
- package/dist/index21.js.map +1 -1
- package/dist/{index210.js → index215.js} +1 -1
- package/dist/{index210.js.map → index215.js.map} +1 -1
- package/dist/index22.js +57 -76
- package/dist/index22.js.map +1 -1
- package/dist/{index218.js → index223.js} +1 -1
- package/dist/{index218.js.map → index223.js.map} +1 -1
- package/dist/{index221.js → index226.js} +2 -2
- package/dist/{index221.js.map → index226.js.map} +1 -1
- package/dist/index23.js +83 -21
- package/dist/index23.js.map +1 -1
- package/dist/index235.js +171 -8
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +3 -9
- package/dist/index236.js.map +1 -1
- package/dist/index238.js +18 -169
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +10 -11
- package/dist/index239.js.map +1 -1
- package/dist/index24.js +20 -222
- package/dist/index24.js.map +1 -1
- package/dist/index240.js +8 -4
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +4 -5
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +168 -36
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +11 -2
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +5 -7
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +5 -326
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +36 -48
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +2 -2
- package/dist/index248.js +7 -75
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +308 -74
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +289 -43
- package/dist/index25.js.map +1 -1
- package/dist/index250.js +45 -47
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +2 -8
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +75 -4
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +89 -48
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +52 -2
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +8 -2
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +8 -0
- package/dist/index256.js.map +1 -0
- package/dist/index257.js +55 -0
- package/dist/index257.js.map +1 -0
- package/dist/index258.js +5 -0
- package/dist/index258.js.map +1 -0
- package/dist/index259.js +5 -0
- package/dist/index259.js.map +1 -0
- package/dist/index26.js +48 -23
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +21 -81
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +101 -138
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +139 -128
- package/dist/index29.js.map +1 -1
- package/dist/index3.js +57 -98
- package/dist/index3.js.map +1 -1
- package/dist/index30.js +133 -69
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +67 -96
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +96 -71
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +70 -38
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +40 -71
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +67 -82
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +99 -54
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +53 -280
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +281 -70
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +69 -80
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +102 -42
- package/dist/index4.js.map +1 -1
- package/dist/index40.js +82 -32
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +26 -44
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +45 -67
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +65 -49
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +53 -139
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +132 -179
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +194 -35
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +34 -29
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +31 -145
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +131 -70
- package/dist/index49.js.map +1 -1
- package/dist/index5.js +40 -315
- package/dist/index5.js.map +1 -1
- package/dist/index50.js +80 -371
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +451 -91
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +98 -38
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +35 -35
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +35 -90
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +89 -159
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +157 -143
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +149 -33
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +33 -86
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +80 -113
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +323 -43
- package/dist/index6.js.map +1 -1
- package/dist/index60.js +114 -62
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +62 -147
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +146 -312
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +317 -44
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +44 -143
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +145 -12
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +10 -44
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +42 -15
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +76 -48
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +18 -58
- 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 -5
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +25 -7
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +105 -0
- package/dist/index72.js.map +1 -0
- 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 +5 -2
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +54 -2
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +24 -2
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +9 -2
- package/dist/index78.js.map +1 -1
- package/dist/index8.js +48 -85
- package/dist/index8.js.map +1 -1
- package/dist/index80.js +2 -2
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +2 -2
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +1 -1
- package/dist/index82.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 +1 -1
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +1 -1
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +1 -1
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +1 -1
- package/dist/index89.js.map +1 -1
- package/dist/index9.js +91 -27
- 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 +1 -1
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +1 -1
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +1 -1
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +1 -1
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +1 -1
- 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/index230.js +0 -7
- package/dist/index230.js.map +0 -1
- package/dist/index232.js +0 -25
- package/dist/index232.js.map +0 -1
- package/dist/index233.js +0 -57
- package/dist/index233.js.map +0 -1
- package/dist/index234.js +0 -22
- package/dist/index234.js.map +0 -1
- package/dist/index237.js +0 -8
- package/dist/index237.js.map +0 -1
- package/dist/index79.js +0 -5
- package/dist/index79.js.map +0 -1
package/dist/index9.js
CHANGED
|
@@ -1,30 +1,94 @@
|
|
|
1
|
-
import
|
|
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
|
-
|
|
1
|
+
import o from "react";
|
|
2
|
+
import { useStableId as k } from "./index199.js";
|
|
3
|
+
import { getA11yNameAttributes as A } from "./index78.js";
|
|
4
|
+
import { useAccessiblePress as O } from "./index67.js";
|
|
5
|
+
import "./index72.js";
|
|
6
|
+
import { mergeIds as C } from "./index200.js";
|
|
7
|
+
function l() {
|
|
8
|
+
return l = Object.assign ? Object.assign.bind() : function(t) {
|
|
9
|
+
for (var a = 1; a < arguments.length; a++) {
|
|
10
|
+
var e = arguments[a];
|
|
11
|
+
for (var r in e) ({}).hasOwnProperty.call(e, r) && (t[r] = e[r]);
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
}, l.apply(null, arguments);
|
|
15
|
+
}
|
|
16
|
+
const P = /* @__PURE__ */ o.forwardRef(({
|
|
17
|
+
checked: t = !1,
|
|
18
|
+
onToggle: a = () => {
|
|
19
|
+
},
|
|
20
|
+
disabled: e = !1,
|
|
21
|
+
label: r,
|
|
22
|
+
labelPosition: c = "left",
|
|
23
|
+
labelClickable: n = !0,
|
|
24
|
+
automationId: s = "toggle",
|
|
25
|
+
ariaLabelledBy: i,
|
|
26
|
+
ariaDescribedBy: b,
|
|
27
|
+
ariaLabel: g,
|
|
28
|
+
tabIndex: v = 0
|
|
29
|
+
}, h) => {
|
|
30
|
+
const u = k(void 0, "toggle-label"), d = () => {
|
|
31
|
+
e || a(!t);
|
|
32
|
+
}, {
|
|
33
|
+
pressProps: y,
|
|
34
|
+
tabIndex: x,
|
|
35
|
+
role: $
|
|
36
|
+
} = O({
|
|
37
|
+
disabled: e,
|
|
38
|
+
onClick: d,
|
|
39
|
+
stopPropagation: n,
|
|
40
|
+
isNative: !1,
|
|
41
|
+
role: "switch",
|
|
42
|
+
tabIndex: v
|
|
43
|
+
}), w = A({
|
|
44
|
+
ariaLabelledBy: r && !g ? C(u, i) : i,
|
|
45
|
+
ariaLabel: g,
|
|
46
|
+
ariaDescribedBy: b
|
|
47
|
+
}), m = (p, I = !1) => p ? /* @__PURE__ */ o.createElement("label", {
|
|
48
|
+
id: u,
|
|
49
|
+
className: `select-none ${E[I ? "disabled" : "enabled"]}`,
|
|
50
|
+
"data-automation-id": `${s}-label`
|
|
51
|
+
}, p) : null, N = {
|
|
52
|
+
enabled: "cursor-pointer",
|
|
53
|
+
disabled: "cursor-not-allowed"
|
|
54
|
+
}, E = {
|
|
55
|
+
enabled: `text-[var(--color-gray-700)] ${n ? "cursor-pointer" : ""}`,
|
|
56
|
+
disabled: "text-[var(--color-gray-600)] cursor-not-allowed"
|
|
57
|
+
}, f = {
|
|
58
|
+
checked: ` ${e ? "bg-[var(--color-green-100)]" : "bg-[var(--color-green-400)] hover:bg-[var(--color-green-500)]"}`,
|
|
59
|
+
unchecked: ` ${e ? "bg-[var(--color-gray-400)]" : "bg-[var(--color-gray-600)] hover:bg-[var(--color-gray-650)]"}`,
|
|
60
|
+
enabled: " cursor-pointer",
|
|
61
|
+
disabled: " cursor-not-allowed"
|
|
62
|
+
};
|
|
63
|
+
return /* @__PURE__ */ o.createElement("div", {
|
|
64
|
+
className: `se-design-toggle flex items-center gap-1 ${N[e ? "disabled" : "enabled"]}`,
|
|
65
|
+
onClick: n ? d : void 0,
|
|
66
|
+
"data-automation-id": `${s}-container`
|
|
67
|
+
}, r && c === "left" && m(r, e), /* @__PURE__ */ o.createElement("div", l({
|
|
68
|
+
ref: h,
|
|
69
|
+
role: $,
|
|
70
|
+
tabIndex: x,
|
|
71
|
+
"aria-checked": t
|
|
72
|
+
}, w, y, {
|
|
73
|
+
className: `toggle-btn focus-outline block w-8 h-4 p-0.5 rounded-full transition ease-in-out
|
|
74
|
+
${f[t ? "checked" : "unchecked"]}
|
|
75
|
+
${f[e ? "disabled" : "enabled"]}
|
|
76
|
+
`,
|
|
77
|
+
"data-automation-id": `${s}-button`
|
|
78
|
+
}), /* @__PURE__ */ o.createElement("input", {
|
|
79
|
+
className: "opacity-0 hidden",
|
|
80
|
+
type: "checkbox",
|
|
81
|
+
checked: t,
|
|
82
|
+
readOnly: !0,
|
|
83
|
+
disabled: e,
|
|
84
|
+
tabIndex: -1
|
|
85
|
+
}), /* @__PURE__ */ o.createElement("span", {
|
|
86
|
+
className: `block w-3 h-3 rounded-full bg-[var(--color-white)]
|
|
87
|
+
transform transition-transform ${t ? "translate-x-4" : ""}`
|
|
88
|
+
})), r && c === "right" && m(r, e));
|
|
89
|
+
});
|
|
90
|
+
P.displayName = "Toggle";
|
|
27
91
|
export {
|
|
28
|
-
|
|
92
|
+
P as Toggle
|
|
29
93
|
};
|
|
30
94
|
//# sourceMappingURL=index9.js.map
|
package/dist/index9.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index9.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index9.js","sources":["../src/components/Toggle/index.tsx"],"sourcesContent":["import React from 'react';\nimport { useStableId } from '../../utils/useStableId';\nimport { useAccessiblePress, getA11yNameAttributes } from '../../utils/a11y';\nimport { mergeIds } from '../../utils/mergeIds';\n\nexport interface ToggleProps {\n /**\n * Callback when the toggle is toggled. The parent is responsible for updating the checked state.\n */\n onToggle?: (checked: boolean) => void;\n /**\n * The controlled state of the toggle.\n */\n checked: boolean;\n /**\n * Optional disabled state\n */\n disabled?: boolean;\n /**\n * Optional label\n */\n label?: string;\n /**\n * Position of the label\n */\n labelPosition?: 'left' | 'right';\n /**\n * Optional className\n */\n labelClickable?: boolean;\n /**\n * Automation ID for testing\n */\n automationId?: string;\n /**\n * ID(s) of element(s) that label this toggle (for screen reader association).\n * Typically used when toggle is part of a larger labelled context.\n */\n ariaLabelledBy?: string;\n /**\n * ID(s) of element(s) that describe this toggle (provides additional context).\n * Often used for help text or instructions.\n */\n ariaDescribedBy?: string;\n /**\n * Explicit accessible name for the toggle.\n * Used as fallback when ariaLabelledBy is not provided and no internal label exists.\n */\n ariaLabel?: string;\n /**\n * Custom tab index for the toggle.\n * Use -1 to remove from tab order, 0 (default) for natural tab order.\n */\n tabIndex?: number;\n}\n\nexport const Toggle = React.forwardRef<HTMLDivElement, ToggleProps>(({\n checked = false,\n onToggle = () => {},\n disabled = false,\n label,\n labelPosition = 'left',\n labelClickable = true,\n automationId = 'toggle',\n ariaLabelledBy,\n ariaDescribedBy,\n ariaLabel,\n tabIndex: tabIndexProp = 0\n}, ref) => {\n const internalLabelId = useStableId(undefined, 'toggle-label');\n\n const handleToggle = () => {\n if (disabled) return;\n onToggle(!checked);\n };\n\n // pressProps contains: onPointerDown, onMouseDown, onTouchStart, onClick, onKeyDown, aria-disabled, aria-busy\n // When labelClickable=true, container has onClick handler, so we need stopPropagation to prevent\n // container's onClick from firing when button is clicked (avoiding double-toggle).\n // When labelClickable=false, container has no onClick, so stopPropagation isn't needed but harmless.\n const { pressProps, tabIndex, role } = useAccessiblePress({\n disabled,\n onClick: handleToggle,\n stopPropagation: labelClickable,\n isNative: false,\n role: 'switch',\n tabIndex: tabIndexProp\n });\n\n // a11yNameAttributes contains: aria-labelledby (if provided), aria-label (fallback), aria-describedby (if provided)\n // When ariaLabel is provided, it takes precedence over label (matches AutoCompleteInput/PhoneInput pattern)\n const a11yNameAttributes = getA11yNameAttributes({\n ariaLabelledBy: label && !ariaLabel ? mergeIds(internalLabelId, ariaLabelledBy) : ariaLabelledBy,\n ariaLabel,\n ariaDescribedBy\n });\n\n const renderLabel = (label: string, disabled: boolean = false) => {\n if (label) {\n return (\n <label\n id={internalLabelId}\n className={`select-none ${labelClass[disabled ? 'disabled' : 'enabled']}`}\n data-automation-id={`${automationId}-label`}\n >\n {label}\n </label>\n );\n }\n return null;\n };\n\n const containerClass = {\n enabled: 'cursor-pointer',\n disabled: 'cursor-not-allowed'\n };\n const labelClass = {\n enabled: `text-[var(--color-gray-700)] ${labelClickable ? 'cursor-pointer' : ''}`,\n disabled: 'text-[var(--color-gray-600)] cursor-not-allowed'\n };\n const toggleClass = {\n checked: ` ${\n disabled ? 'bg-[var(--color-green-100)]' : 'bg-[var(--color-green-400)] hover:bg-[var(--color-green-500)]'\n }`,\n unchecked: ` ${\n disabled ? 'bg-[var(--color-gray-400)]' : 'bg-[var(--color-gray-600)] hover:bg-[var(--color-gray-650)]'\n }`,\n enabled: ' cursor-pointer',\n disabled: ' cursor-not-allowed'\n };\n\n return (\n <div\n className={`se-design-toggle flex items-center gap-1 ${containerClass[disabled ? 'disabled' : 'enabled']}`}\n onClick={labelClickable ? handleToggle : undefined}\n data-automation-id={`${automationId}-container`}\n >\n {label && labelPosition === 'left' && renderLabel(label, disabled)}\n <div\n ref={ref}\n role={role}\n tabIndex={tabIndex}\n aria-checked={checked}\n {...a11yNameAttributes}\n {...pressProps}\n className={`toggle-btn focus-outline block w-8 h-4 p-0.5 rounded-full transition ease-in-out\n ${toggleClass[checked ? 'checked' : 'unchecked']}\n ${toggleClass[disabled ? 'disabled' : 'enabled']}\n `}\n data-automation-id={`${automationId}-button`}\n >\n <input className=\"opacity-0 hidden\" type=\"checkbox\" checked={checked} readOnly disabled={disabled} tabIndex={-1} />\n <span\n className={`block w-3 h-3 rounded-full bg-[var(--color-white)]\n transform transition-transform ${checked ? 'translate-x-4' : ''}`}\n ></span>\n </div>\n {label && labelPosition === 'right' && renderLabel(label, disabled)}\n </div>\n );\n});\n\nToggle.displayName = 'Toggle';\n"],"names":["Toggle","React","forwardRef","checked","onToggle","disabled","label","labelPosition","labelClickable","automationId","ariaLabelledBy","ariaDescribedBy","ariaLabel","tabIndex","tabIndexProp","ref","internalLabelId","useStableId","undefined","handleToggle","pressProps","role","useAccessiblePress","onClick","stopPropagation","isNative","a11yNameAttributes","getA11yNameAttributes","mergeIds","renderLabel","createElement","id","className","labelClass","containerClass","enabled","toggleClass","unchecked","_extends","type","readOnly","displayName"],"mappings":";;;;;;;;;;;;;;;AAwDO,MAAMA,IAASC,gBAAAA,EAAMC,WAAwC,CAAC;AAAA,EACnEC,SAAAA,IAAU;AAAA,EACVC,UAAAA,IAAWA,MAAM;AAAA,EAAC;AAAA,EAClBC,UAAAA,IAAW;AAAA,EACXC,OAAAA;AAAAA,EACAC,eAAAA,IAAgB;AAAA,EAChBC,gBAAAA,IAAiB;AAAA,EACjBC,cAAAA,IAAe;AAAA,EACfC,gBAAAA;AAAAA,EACAC,iBAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACAC,UAAUC,IAAe;AAC3B,GAAGC,MAAQ;AACT,QAAMC,IAAkBC,EAAYC,QAAW,cAAc,GAEvDC,IAAeA,MAAM;AACzB,IAAId,KACJD,EAAS,CAACD,CAAO;AAAA,EACnB,GAMM;AAAA,IAAEiB,YAAAA;AAAAA,IAAYP,UAAAA;AAAAA,IAAUQ,MAAAA;AAAAA,EAAAA,IAASC,EAAmB;AAAA,IACxDjB,UAAAA;AAAAA,IACAkB,SAASJ;AAAAA,IACTK,iBAAiBhB;AAAAA,IACjBiB,UAAU;AAAA,IACVJ,MAAM;AAAA,IACNR,UAAUC;AAAAA,EAAAA,CACX,GAIKY,IAAqBC,EAAsB;AAAA,IAC/CjB,gBAAgBJ,KAAS,CAACM,IAAYgB,EAASZ,GAAiBN,CAAc,IAAIA;AAAAA,IAClFE,WAAAA;AAAAA,IACAD,iBAAAA;AAAAA,EAAAA,CACD,GAEKkB,IAAcA,CAACvB,GAAeD,IAAoB,OAClDC,IAEAL,gBAAAA,EAAA6B,cAAA,SAAA;AAAA,IACEC,IAAIf;AAAAA,IACJgB,WAAW,eAAeC,EAAW5B,IAAW,aAAa,SAAS,CAAC;AAAA,IACvE,sBAAoB,GAAGI,CAAY;AAAA,EAAA,GAElCH,CACI,IAGJ,MAGH4B,IAAiB;AAAA,IACrBC,SAAS;AAAA,IACT9B,UAAU;AAAA,EAAA,GAEN4B,IAAa;AAAA,IACjBE,SAAS,gCAAgC3B,IAAiB,mBAAmB,EAAE;AAAA,IAC/EH,UAAU;AAAA,EAAA,GAEN+B,IAAc;AAAA,IAClBjC,SAAS,IACPE,IAAW,gCAAgC,+DAA+D;AAAA,IAE5GgC,WAAW,IACThC,IAAW,+BAA+B,6DAA6D;AAAA,IAEzG8B,SAAS;AAAA,IACT9B,UAAU;AAAA,EAAA;AAGZ,SACEJ,gBAAAA,EAAA6B,cAAA,OAAA;AAAA,IACEE,WAAW,4CAA4CE,EAAe7B,IAAW,aAAa,SAAS,CAAC;AAAA,IACxGkB,SAASf,IAAiBW,IAAeD;AAAAA,IACzC,sBAAoB,GAAGT,CAAY;AAAA,EAAA,GAElCH,KAASC,MAAkB,UAAUsB,EAAYvB,GAAOD,CAAQ,GACjEJ,gBAAAA,EAAA6B,qBAAAQ,EAAA;AAAA,IACEvB,KAAAA;AAAAA,IACAM,MAAAA;AAAAA,IACAR,UAAAA;AAAAA,IACA,gBAAcV;AAAAA,EAAAA,GACVuB,GACAN,GAAU;AAAA,IACdY,WAAW;AAAA,UACTI,EAAYjC,IAAU,YAAY,WAAW,CAAC;AAAA,UAC9CiC,EAAY/B,IAAW,aAAa,SAAS,CAAC;AAAA;AAAA,IAEhD,sBAAoB,GAAGI,CAAY;AAAA,EAAA,CAAU,GAE7CR,gBAAAA,EAAA6B,cAAA,SAAA;AAAA,IAAOE,WAAU;AAAA,IAAmBO,MAAK;AAAA,IAAWpC,SAAAA;AAAAA,IAAkBqC,UAAQ;AAAA,IAACnC,UAAAA;AAAAA,IAAoBQ,UAAU;AAAA,EAAA,CAAK,GAClHZ,gBAAAA,EAAA6B,cAAA,QAAA;AAAA,IACEE,WAAW;AAAA,6CACwB7B,IAAU,kBAAkB,EAAE;AAAA,EAAA,CAC5D,CACJ,GACJG,KAASC,MAAkB,WAAWsB,EAAYvB,GAAOD,CAAQ,CAC/D;AAET,CAAC;AAEDL,EAAOyC,cAAc;"}
|
package/dist/index90.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = "data:image/svg+xml,%3csvg%20width='
|
|
1
|
+
const e = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%3e%3cpath%20d='M10.4375%2022.2109H13.5804'%20stroke='white'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18.9881%208.7626C18.9881%206.91103%2018.2525%205.1353%2016.9432%203.82604C15.634%202.51678%2013.8582%201.78125%2012.0067%201.78125C10.1551%201.78125%208.37937%202.51678%207.07012%203.82604C5.76085%205.1353%205.02531%206.91103%205.02531%208.7626V15.6975C5.02531%2016.3918%204.74949%2017.0577%204.25852%2017.5486C3.76756%2018.0397%203.27246%2018.3155%202.57812%2018.3155H21.4353C20.7409%2018.3155%2020.2459%2018.0397%2019.7548%2017.5486C19.2639%2017.0577%2018.9881%2016.3918%2018.9881%2015.6975V8.7626Z'%20stroke='white'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
2
2
|
export {
|
|
3
3
|
e as default
|
|
4
4
|
};
|
package/dist/index90.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index90.js","sources":["../src/assets/icons/
|
|
1
|
+
{"version":3,"file":"index90.js","sources":["../src/assets/icons/bell-notification.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%3e%3cpath%20d='M10.4375%2022.2109H13.5804'%20stroke='white'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18.9881%208.7626C18.9881%206.91103%2018.2525%205.1353%2016.9432%203.82604C15.634%202.51678%2013.8582%201.78125%2012.0067%201.78125C10.1551%201.78125%208.37937%202.51678%207.07012%203.82604C5.76085%205.1353%205.02531%206.91103%205.02531%208.7626V15.6975C5.02531%2016.3918%204.74949%2017.0577%204.25852%2017.5486C3.76756%2018.0397%203.27246%2018.3155%202.57812%2018.3155H21.4353C20.7409%2018.3155%2020.2459%2018.0397%2019.7548%2017.5486C19.2639%2017.0577%2018.9881%2016.3918%2018.9881%2015.6975V8.7626Z'%20stroke='white'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_10"],"mappings":"AAAA,MAAAA,IAAe;"}
|
package/dist/index91.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = "data:image/svg+xml,%3csvg%20width='
|
|
1
|
+
const e = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.875%209.66284H22.125M15.8942%2015.1148H18.2307M20.5673%204.21094H3.43274C2.57245%204.21094%201.87505%204.94505%201.87505%205.85061V18.1482C1.87505%2019.0537%202.57245%2019.7878%203.43274%2019.7878H20.5673C21.4276%2019.7878%2022.125%2019.0537%2022.125%2018.1482V5.85061C22.125%204.94505%2021.4276%204.21094%2020.5673%204.21094Z'%20stroke='%23415575'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
2
2
|
export {
|
|
3
3
|
e as default
|
|
4
4
|
};
|
package/dist/index91.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index91.js","sources":["../src/assets/icons/
|
|
1
|
+
{"version":3,"file":"index91.js","sources":["../src/assets/icons/card.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.875%209.66284H22.125M15.8942%2015.1148H18.2307M20.5673%204.21094H3.43274C2.57245%204.21094%201.87505%204.94505%201.87505%205.85061V18.1482C1.87505%2019.0537%202.57245%2019.7878%203.43274%2019.7878H20.5673C21.4276%2019.7878%2022.125%2019.0537%2022.125%2018.1482V5.85061C22.125%204.94505%2021.4276%204.21094%2020.5673%204.21094Z'%20stroke='%23415575'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_11"],"mappings":"AAAA,MAAAA,IAAe;"}
|
package/dist/index92.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = "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='
|
|
1
|
+
const e = "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='M1.6%202.8H14.3995M2.6%206.3H13M4.6%209.8H10.9997M1.59998%2013.3H14.4'%20stroke='currentColor'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
2
2
|
export {
|
|
3
3
|
e as default
|
|
4
4
|
};
|
package/dist/index92.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index92.js","sources":["../src/assets/icons/
|
|
1
|
+
{"version":3,"file":"index92.js","sources":["../src/assets/icons/center-align.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='M1.6%202.8H14.3995M2.6%206.3H13M4.6%209.8H10.9997M1.59998%2013.3H14.4'%20stroke='currentColor'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_12"],"mappings":"AAAA,MAAAA,IAAe;"}
|
package/dist/index93.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = "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='%
|
|
1
|
+
const e = "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='%23E4E9F1'/%3e%3cpath%20d='M12%208H4'%20stroke='%237a90b4'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
2
2
|
export {
|
|
3
3
|
e as default
|
|
4
4
|
};
|
package/dist/index93.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index93.js","sources":["../src/assets/icons/checkbox-
|
|
1
|
+
{"version":3,"file":"index93.js","sources":["../src/assets/icons/checkbox-disabled-minus.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='%23E4E9F1'/%3e%3cpath%20d='M12%208H4'%20stroke='%237a90b4'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_13"],"mappings":"AAAA,MAAAA,IAAe;"}
|
package/dist/index94.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = "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='%
|
|
1
|
+
const e = "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='%23E4E9F1'/%3e%3cpath%20d='M11.8082%205.5L6.89749%2010.5L4.66534%208.22727'%20stroke='%237a90b4'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
2
2
|
export {
|
|
3
3
|
e as default
|
|
4
4
|
};
|
package/dist/index94.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index94.js","sources":["../src/assets/icons/checkbox-
|
|
1
|
+
{"version":3,"file":"index94.js","sources":["../src/assets/icons/checkbox-disabled-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='%23E4E9F1'/%3e%3cpath%20d='M11.8082%205.5L6.89749%2010.5L4.66534%208.22727'%20stroke='%237a90b4'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_14"],"mappings":"AAAA,MAAAA,IAAe;"}
|
package/dist/index95.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = "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='%
|
|
1
|
+
const e = "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='%23E4E9F1'/%3e%3c/svg%3e";
|
|
2
2
|
export {
|
|
3
3
|
e as default
|
|
4
4
|
};
|
package/dist/index95.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index95.js","sources":["../src/assets/icons/checkbox-
|
|
1
|
+
{"version":3,"file":"index95.js","sources":["../src/assets/icons/checkbox-disabled.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='%23E4E9F1'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_15"],"mappings":"AAAA,MAAAA,IAAe;"}
|
package/dist/index96.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%
|
|
1
|
+
const e = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%3e%3cpath%20d='M11.0198%205.66834L6.87692%2010.8469L4.80549%209.29334M1.78467%202.82038V13.1775C1.78467%2013.7496%202.24838%2014.2132%202.82038%2014.2132H13.1775C13.7496%2014.2132%2014.2132%2013.7496%2014.2132%2013.1775V2.82038C14.2132%202.24837%2013.7496%201.78467%2013.1775%201.78467H2.82038C2.24838%201.78467%201.78467%202.24838%201.78467%202.82038Z'%20stroke='black'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'%20/%3e%3c/svg%3e";
|
|
2
2
|
export {
|
|
3
3
|
e as default
|
|
4
4
|
};
|
package/dist/index96.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index96.js","sources":["../src/assets/icons/
|
|
1
|
+
{"version":3,"file":"index96.js","sources":["../src/assets/icons/checkbox-field.svg?url"],"sourcesContent":["export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%3e%3cpath%20d='M11.0198%205.66834L6.87692%2010.8469L4.80549%209.29334M1.78467%202.82038V13.1775C1.78467%2013.7496%202.24838%2014.2132%202.82038%2014.2132H13.1775C13.7496%2014.2132%2014.2132%2013.7496%2014.2132%2013.1775V2.82038C14.2132%202.24837%2013.7496%201.78467%2013.1775%201.78467H2.82038C2.24838%201.78467%201.78467%202.24838%201.78467%202.82038Z'%20stroke='black'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'%20/%3e%3c/svg%3e\""],"names":["__vite_glob_0_16"],"mappings":"AAAA,MAAAA,IAAe;"}
|
package/dist/index97.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = "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='
|
|
1
|
+
const e = "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='%237a90b4'%20stroke-width='1.2'%20stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
2
2
|
export {
|
|
3
3
|
e as default
|
|
4
4
|
};
|
package/dist/index97.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index97.js","sources":["../src/assets/icons/
|
|
1
|
+
{"version":3,"file":"index97.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='%237a90b4'%20stroke-width='1.2'%20stroke-linejoin='round'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_17"],"mappings":"AAAA,MAAAA,IAAe;"}
|
package/dist/index98.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = "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='
|
|
1
|
+
const e = "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='%23f2f4f8'/%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='%234D678A'%20stroke-width='1.2'%20stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
2
2
|
export {
|
|
3
3
|
e as default
|
|
4
4
|
};
|
package/dist/index98.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index98.js","sources":["../src/assets/icons/
|
|
1
|
+
{"version":3,"file":"index98.js","sources":["../src/assets/icons/checkbox-hover-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='%23f2f4f8'/%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='%234D678A'%20stroke-width='1.2'%20stroke-linejoin='round'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_18"],"mappings":"AAAA,MAAAA,IAAe;"}
|
package/dist/index99.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = "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='
|
|
1
|
+
const e = "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='%2300539E'/%3e%3cpath%20d='M12%208H4'%20stroke='white'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
|
|
2
2
|
export {
|
|
3
3
|
e as default
|
|
4
4
|
};
|
package/dist/index99.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index99.js","sources":["../src/assets/icons/
|
|
1
|
+
{"version":3,"file":"index99.js","sources":["../src/assets/icons/checkbox-hover-minus.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='%2300539E'/%3e%3cpath%20d='M12%208H4'%20stroke='white'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e\""],"names":["__vite_glob_0_19"],"mappings":"AAAA,MAAAA,IAAe;"}
|
package/package.json
CHANGED
package/dist/index230.js
DELETED
package/dist/index230.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index230.js","sources":["../src/utils/delay.ts"],"sourcesContent":["/**\n * Delays execution by the specified number of milliseconds\n * @param ms - The number of milliseconds to delay\n * @returns A Promise that resolves after the specified delay\n */\nexport function delay(ms: number): Promise<void> {\n return new Promise(resolve => setTimeout(resolve, ms));\n} "],"names":["delay","ms","Promise","resolve","setTimeout"],"mappings":"AAKO,SAASA,EAAMC,GAA2B;AAC7C,SAAO,IAAIC,QAAQC,CAAAA,MAAWC,WAAWD,GAASF,CAAE,CAAC;AACzD;"}
|
package/dist/index232.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const l = ["button:not([disabled])", "[href]", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])", '[tabindex]:not([tabindex="-1"]):not([disabled])', '[contenteditable="true"]'].join(", "), a = [l, '[role="menuitem"]', '[role="option"]', '[role="menuitemcheckbox"]', '[role="menuitemradio"]'].join(", ");
|
|
2
|
-
function u({
|
|
3
|
-
container: e,
|
|
4
|
-
includeRoles: t = !1,
|
|
5
|
-
additionalSelectors: r = [],
|
|
6
|
-
filterHidden: s = !1
|
|
7
|
-
}) {
|
|
8
|
-
if (!e) return [];
|
|
9
|
-
const d = [t ? a : l, ...r].filter(Boolean).join(", "), i = Array.from(e.querySelectorAll(d));
|
|
10
|
-
return s ? i.filter((n) => {
|
|
11
|
-
const o = window.getComputedStyle(n);
|
|
12
|
-
return o.display !== "none" && o.visibility !== "hidden" && o.opacity !== "0" && !n.hasAttribute("hidden") && n.offsetWidth > 0 && n.offsetHeight > 0;
|
|
13
|
-
}) : i;
|
|
14
|
-
}
|
|
15
|
-
function c(e) {
|
|
16
|
-
const t = u(e);
|
|
17
|
-
return t.length > 0 ? t[0] : null;
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
l as FOCUSABLE_SELECTOR,
|
|
21
|
-
a as FOCUSABLE_WITH_ROLES_SELECTOR,
|
|
22
|
-
c as getFirstFocusableElement,
|
|
23
|
-
u as getFocusableElements
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=index232.js.map
|
package/dist/index232.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index232.js","sources":["../src/utils/a11y/focusableElements.ts"],"sourcesContent":["/**\n * Utilities for finding focusable elements within a container.\n * \n * Used for focus management in modals, popovers, and other interactive overlays.\n */\n\n/**\n * Base selector for standard focusable elements.\n * Matches: buttons, links, inputs, selects, textareas, elements with tabindex >= 0, contenteditable.\n */\nexport const FOCUSABLE_SELECTOR = [\n 'button:not([disabled])',\n '[href]',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"]):not([disabled])',\n '[contenteditable=\"true\"]'\n].join(', ');\n\n/**\n * Extended selector that includes ARIA role-based focusable elements.\n * Useful for composite widgets like menus, listboxes, etc.\n */\nexport const FOCUSABLE_WITH_ROLES_SELECTOR = [\n FOCUSABLE_SELECTOR,\n '[role=\"menuitem\"]',\n '[role=\"option\"]',\n '[role=\"menuitemcheckbox\"]',\n '[role=\"menuitemradio\"]'\n].join(', ');\n\n/**\n * Options for getFocusableElements\n */\nexport interface GetFocusableElementsOptions {\n /**\n * Container element to search within. If null/undefined, returns empty array.\n */\n container: HTMLElement | null;\n /**\n * Whether to include role-based focusable elements (menuitem, option, etc.).\n * Default: false (uses base selector only)\n */\n includeRoles?: boolean;\n /**\n * Additional custom selectors to include.\n */\n additionalSelectors?: string[];\n /**\n * Whether to filter out hidden/invisible elements.\n * Default: false (returns all matching elements regardless of visibility)\n */\n filterHidden?: boolean;\n}\n\n/**\n * Get all focusable elements within a container.\n * \n * @example Basic usage (standard focusable elements)\n * ```ts\n * const focusables = getFocusableElements({ container: dialogRef.current });\n * focusables[0]?.focus(); // Focus first element\n * ```\n * \n * @example With role-based elements (for menus/listboxes)\n * ```ts\n * const focusables = getFocusableElements({ \n * container: menuRef.current,\n * includeRoles: true \n * });\n * ```\n * \n * @example With custom selectors\n * ```ts\n * const focusables = getFocusableElements({ \n * container: customWidgetRef.current,\n * additionalSelectors: ['[data-focusable=\"true\"]']\n * });\n * ```\n */\nexport function getFocusableElements({\n container,\n includeRoles = false,\n additionalSelectors = [],\n filterHidden = false\n}: GetFocusableElementsOptions): HTMLElement[] {\n if (!container) return [];\n\n const selector = [\n includeRoles ? FOCUSABLE_WITH_ROLES_SELECTOR : FOCUSABLE_SELECTOR,\n ...additionalSelectors\n ].filter(Boolean).join(', ');\n\n const elements = Array.from(container.querySelectorAll<HTMLElement>(selector));\n\n if (!filterHidden) return elements;\n\n // Filter out hidden/invisible elements\n return elements.filter((el) => {\n const style = window.getComputedStyle(el);\n return (\n style.display !== 'none' &&\n style.visibility !== 'hidden' &&\n style.opacity !== '0' &&\n !el.hasAttribute('hidden') &&\n el.offsetWidth > 0 &&\n el.offsetHeight > 0\n );\n });\n}\n\n/**\n * Get the first focusable element in a container.\n * Returns null if none found.\n */\nexport function getFirstFocusableElement(\n options: GetFocusableElementsOptions\n): HTMLElement | null {\n const focusables = getFocusableElements(options);\n return focusables.length > 0 ? focusables[0] : null;\n}\n\n/**\n * Get the last focusable element in a container.\n * Returns null if none found.\n */\nexport function getLastFocusableElement(\n options: GetFocusableElementsOptions\n): HTMLElement | null {\n const focusables = getFocusableElements(options);\n return focusables.length > 0 ? focusables[focusables.length - 1] : null;\n}\n"],"names":["FOCUSABLE_SELECTOR","join","FOCUSABLE_WITH_ROLES_SELECTOR","getFocusableElements","container","includeRoles","additionalSelectors","filterHidden","selector","filter","Boolean","elements","Array","from","querySelectorAll","el","style","window","getComputedStyle","display","visibility","opacity","hasAttribute","offsetWidth","offsetHeight","getFirstFocusableElement","options","focusables","length"],"mappings":"AAUaA,MAAAA,IAAqB,CAChC,0BACA,UACA,yBACA,0BACA,4BACA,mDACA,0BAA0B,EAC1BC,KAAK,IAAI,GAMEC,IAAgC,CAC3CF,GACA,qBACA,mBACA,6BACA,wBAAwB,EACxBC,KAAK,IAAI;AAmDJ,SAASE,EAAqB;AAAA,EACnCC,WAAAA;AAAAA,EACAC,cAAAA,IAAe;AAAA,EACfC,qBAAAA,IAAsB,CAAE;AAAA,EACxBC,cAAAA,IAAe;AACY,GAAkB;AACzC,MAAA,CAACH,EAAW,QAAO;AAEvB,QAAMI,IAAW,CACfH,IAAeH,IAAgCF,GAC/C,GAAGM,CAAmB,EACtBG,OAAOC,OAAO,EAAET,KAAK,IAAI,GAErBU,IAAWC,MAAMC,KAAKT,EAAUU,iBAA8BN,CAAQ,CAAC;AAEzE,SAACD,IAGEI,EAASF,OAAQM,CAAOA,MAAA;AACvBC,UAAAA,IAAQC,OAAOC,iBAAiBH,CAAE;AACxC,WACEC,EAAMG,YAAY,UAClBH,EAAMI,eAAe,YACrBJ,EAAMK,YAAY,OAClB,CAACN,EAAGO,aAAa,QAAQ,KACzBP,EAAGQ,cAAc,KACjBR,EAAGS,eAAe;AAAA,EAAA,CAErB,IAbyBb;AAc5B;AAMO,SAASc,EACdC,GACoB;AACdC,QAAAA,IAAaxB,EAAqBuB,CAAO;AAC/C,SAAOC,EAAWC,SAAS,IAAID,EAAW,CAAC,IAAI;AACjD;"}
|
package/dist/index233.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { useState as m, useEffect as w, useCallback as b } from "react";
|
|
2
|
-
import { useScrollActiveIntoView as x } from "./index234.js";
|
|
3
|
-
function E({
|
|
4
|
-
items: u,
|
|
5
|
-
isOpen: t,
|
|
6
|
-
onSelect: o,
|
|
7
|
-
onClose: c,
|
|
8
|
-
onOpen: l,
|
|
9
|
-
loop: i = !0,
|
|
10
|
-
disabled: h = !1,
|
|
11
|
-
listboxRef: k,
|
|
12
|
-
optionSelector: g = '[role="option"]'
|
|
13
|
-
}) {
|
|
14
|
-
const [f, a] = m(-1);
|
|
15
|
-
w(() => {
|
|
16
|
-
t || a(-1);
|
|
17
|
-
}, [t]), x({
|
|
18
|
-
containerRef: k,
|
|
19
|
-
activeIndex: f,
|
|
20
|
-
itemSelector: g,
|
|
21
|
-
enabled: t
|
|
22
|
-
});
|
|
23
|
-
const D = b((r) => {
|
|
24
|
-
if (h) {
|
|
25
|
-
r.key === "Escape" && t && (r.preventDefault(), c());
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
const e = u.length;
|
|
29
|
-
switch (r.key) {
|
|
30
|
-
case "ArrowDown":
|
|
31
|
-
r.preventDefault(), !t && e > 0 ? (l?.(), a(0)) : t && e > 0 && a((n) => i ? (n + 1) % e : Math.min(n + 1, e - 1));
|
|
32
|
-
break;
|
|
33
|
-
case "ArrowUp":
|
|
34
|
-
r.preventDefault(), t && e > 0 && a((n) => n === -1 ? e - 1 : i ? (n - 1 + e) % e : Math.max(n - 1, 0));
|
|
35
|
-
break;
|
|
36
|
-
case "Enter":
|
|
37
|
-
t && f >= 0 && u[f] && (r.preventDefault(), o(u[f], f), a(-1));
|
|
38
|
-
break;
|
|
39
|
-
case "Escape":
|
|
40
|
-
t && (r.preventDefault(), c(), a(-1));
|
|
41
|
-
break;
|
|
42
|
-
case "Tab":
|
|
43
|
-
t && (c(), a(-1));
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
}, [h, u, t, f, o, c, l, i]), d = b((r, e) => `${r}-option-${e}`, []);
|
|
47
|
-
return {
|
|
48
|
-
highlightedIndex: f,
|
|
49
|
-
setHighlightedIndex: a,
|
|
50
|
-
handleKeyDown: D,
|
|
51
|
-
getOptionId: d
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
export {
|
|
55
|
-
E as useComboboxNavigation
|
|
56
|
-
};
|
|
57
|
-
//# sourceMappingURL=index233.js.map
|
package/dist/index233.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index233.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 * 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}: 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 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 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 if (isOpen && highlightedIndex >= 0 && items[highlightedIndex]) {\n e.preventDefault();\n onSelect(items[highlightedIndex], highlightedIndex);\n setHighlightedIndex(-1);\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 // Close dropdown on Tab (don't preventDefault - let focus move naturally)\n if (isOpen) {\n onClose();\n setHighlightedIndex(-1);\n }\n break;\n }\n },\n [disabled, items, isOpen, highlightedIndex, onSelect, onClose, onOpen, loop]\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","highlightedIndex","setHighlightedIndex","containerRef","activeIndex","itemSelector","enabled","handleKeyDown","e","key","preventDefault","itemCount","length","prev","Math","min","max","getOptionId","listboxId","index"],"mappings":"AA2GO,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;AACc,GAAgC;AAC/D,QAAM,CAACC,GAAkBC,CAAmB,IAAIf,EAAiB,EAAE;AAGnEC,EAAAA,EAAU,MAAM;AACd,IAAKK,KACHS,EAAoB,EAAE;AAAA,EACxB,GACC,CAACT,CAAM,CAAC,GAGaH,EAAA;AAAA,IACtBa,cAAcJ;AAAAA,IACdK,aAAaH;AAAAA,IACbI,cAAcL;AAAAA,IACdM,SAASb;AAAAA,EAAAA,CACV;AAEKc,QAAAA,IAAgBlB,EACpB,CAACmB,MAA2B;AAC1B,QAAIV,GAAU;AAERU,MAAAA,EAAEC,QAAQ,YAAYhB,MACxBe,EAAEE,eAAe,GACTf;AAEV;AAAA,IACF;AAEA,UAAMgB,IAAYnB,EAAMoB;AAExB,YAAQJ,EAAEC,KAAG;AAAA,MACX,KAAK;AACHD,QAAAA,EAAEE,eAAe,GACb,CAACjB,KAAUkB,IAAY,KAEhBf,OACTM,EAAoB,CAAC,KACZT,KAAUkB,IAAY,KAE/BT,EAAqBW,CAASA,MACxBhB,KACMgB,IAAO,KAAKF,IAEfG,KAAKC,IAAIF,IAAO,GAAGF,IAAY,CAAC,CACxC;AAEH;AAAA,MAEF,KAAK;AACHH,QAAAA,EAAEE,eAAe,GACbjB,KAAUkB,IAAY,KAExBT,EAAqBW,CAASA,MAExBA,MAAS,KACJF,IAAY,IAEjBd,KACMgB,IAAO,IAAIF,KAAaA,IAE3BG,KAAKE,IAAIH,IAAO,GAAG,CAAC,CAC5B;AAEH;AAAA,MAEF,KAAK;AACH,QAAIpB,KAAUQ,KAAoB,KAAKT,EAAMS,CAAgB,MAC3DO,EAAEE,eAAe,GACRlB,EAAAA,EAAMS,CAAgB,GAAGA,CAAgB,GAClDC,EAAoB,EAAE;AAExB;AAAA,MAEF,KAAK;AACH,QAAIT,MACFe,EAAEE,eAAe,GACTf,KACRO,EAAoB,EAAE;AAExB;AAAA,MAEF,KAAK;AAEH,QAAIT,MACME,KACRO,EAAoB,EAAE;AAExB;AAAA,IACJ;AAAA,EAAA,GAEF,CAACJ,GAAUN,GAAOC,GAAQQ,GAAkBP,GAAUC,GAASC,GAAQC,CAAI,CAC7E,GAEMoB,IAAc5B,EAClB,CAAC6B,GAAmBC,MAAkB,GAAGD,CAAS,WAAWC,CAAK,IAClE,CACF,CAAA;AAEO,SAAA;AAAA,IACLlB,kBAAAA;AAAAA,IACAC,qBAAAA;AAAAA,IACAK,eAAAA;AAAAA,IACAU,aAAAA;AAAAA,EAAAA;AAEJ;"}
|
package/dist/index234.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { useEffect as s } from "react";
|
|
2
|
-
const u = {
|
|
3
|
-
block: "nearest"
|
|
4
|
-
};
|
|
5
|
-
function m({
|
|
6
|
-
containerRef: t,
|
|
7
|
-
activeIndex: o,
|
|
8
|
-
itemSelector: r = '[role="option"]',
|
|
9
|
-
enabled: c = !0,
|
|
10
|
-
scrollOptions: e = u
|
|
11
|
-
}) {
|
|
12
|
-
s(() => {
|
|
13
|
-
if (!c || o < 0 || !t?.current)
|
|
14
|
-
return;
|
|
15
|
-
const n = t.current.querySelectorAll(r)[o];
|
|
16
|
-
n && n.scrollIntoView(e);
|
|
17
|
-
}, [o, t, r, c, e]);
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
m as useScrollActiveIntoView
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=index234.js.map
|
package/dist/index234.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index234.js","sources":["../src/utils/a11y/useScrollActiveIntoView.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport type { RefObject } from 'react';\n\nconst DEFAULT_SCROLL_OPTIONS: ScrollIntoViewOptions = { block: 'nearest' };\n\nexport interface UseScrollActiveIntoViewOptions {\n /**\n * Ref to the container element\n */\n containerRef?: RefObject<HTMLElement | null>;\n \n /**\n * Index of the currently active/highlighted item (-1 if none)\n */\n activeIndex: number;\n \n /**\n * CSS selector for item elements\n * Default: '[role=\"option\"]'\n */\n itemSelector?: string;\n \n /**\n * Whether scrolling is enabled\n * Default: true\n */\n enabled?: boolean;\n \n /**\n * ScrollIntoView options\n * Default: { block: 'nearest' }\n */\n scrollOptions?: ScrollIntoViewOptions;\n}\n\n/**\n * Hook to automatically scroll the active item into view.\n * \n * Useful for aria-activedescendant patterns where DOM focus stays\n * on the container (e.g., input field) but we need to visually show\n * which descendant option is logically active.\n * \n * Common use cases:\n * - Combobox dropdown options\n * - Menu items with virtual focus\n * - Grid cells with keyboard navigation\n * - Tree view items\n * - Listbox options\n * \n * @example\n * ```tsx\n * const [highlightedIndex, setHighlightedIndex] = useState(-1);\n * const listboxRef = useRef<HTMLDivElement>(null);\n * \n * useScrollActiveIntoView({\n * containerRef: listboxRef,\n * activeIndex: highlightedIndex,\n * itemSelector: '[role=\"option\"]'\n * });\n * \n * // Now when highlightedIndex changes, the item scrolls into view\n * ```\n * \n * @example Custom scroll behavior\n * ```tsx\n * useScrollActiveIntoView({\n * containerRef: menuRef,\n * activeIndex: activeMenuIndex,\n * itemSelector: '[role=\"menuitem\"]',\n * scrollOptions: { block: 'center', behavior: 'smooth' }\n * });\n * ```\n */\nexport function useScrollActiveIntoView({\n containerRef,\n activeIndex,\n itemSelector = '[role=\"option\"]',\n enabled = true,\n scrollOptions = DEFAULT_SCROLL_OPTIONS\n}: UseScrollActiveIntoViewOptions): void {\n useEffect(() => {\n // Early returns for disabled states\n if (!enabled || activeIndex < 0 || !containerRef?.current) {\n return;\n }\n \n const container = containerRef.current;\n const items = container.querySelectorAll(itemSelector);\n const activeItem = items[activeIndex] as HTMLElement;\n \n if (activeItem) {\n activeItem.scrollIntoView(scrollOptions);\n }\n }, [activeIndex, containerRef, itemSelector, enabled, scrollOptions]);\n}\n"],"names":["useEffect","DEFAULT_SCROLL_OPTIONS","block","useScrollActiveIntoView","containerRef","activeIndex","itemSelector","enabled","scrollOptions","current","activeItem","querySelectorAll","scrollIntoView"],"mappings":"AAGA,SAAA,aAAAA,SAAA;AAAA,MAAMC,IAAgD;AAAA,EAAEC,OAAO;AAAU;AAsElE,SAASC,EAAwB;AAAA,EACtCC,cAAAA;AAAAA,EACAC,aAAAA;AAAAA,EACAC,cAAAA,IAAe;AAAA,EACfC,SAAAA,IAAU;AAAA,EACVC,eAAAA,IAAgBP;AACc,GAAS;AACvCD,EAAAA,EAAU,MAAM;AAEd,QAAI,CAACO,KAAWF,IAAc,KAAK,CAACD,GAAcK;AAChD;AAKIC,UAAAA,IAFYN,EAAaK,QACPE,iBAAiBL,CAAY,EAC5BD,CAAW;AAEpC,IAAIK,KACFA,EAAWE,eAAeJ,CAAa;AAAA,EACzC,GACC,CAACH,GAAaD,GAAcE,GAAcC,GAASC,CAAa,CAAC;AACtE;"}
|
package/dist/index237.js
DELETED
package/dist/index237.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index237.js","sources":["../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js"],"sourcesContent":["import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };"],"names":["_setPrototypeOf","_inheritsLoose","t","o","setPrototypeOf"],"mappings":"AACA,OAAAA,OAAA;AAAA,SAASC,EAAeC,GAAGC,GAAG;AAC5B,EAAAD,EAAE,YAAY,OAAO,OAAOC,EAAE,SAAS,GAAGD,EAAE,UAAU,cAAcA,GAAGE,EAAeF,GAAGC,CAAC;AAC5F;","x_google_ignoreList":[0]}
|
package/dist/index79.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
const e = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20transform='rotate(45)'%3e%3cpath%20fillRule='evenodd'%20clipRule='evenodd'%20d='M4.10624%2012.3651C4.22961%2012.6989%204.54783%2012.9205%204.90372%2012.9205C5.27396%2012.9205%205.60164%2012.6809%205.7139%2012.3281L7.24454%207.51754C7.28945%207.37641%207.39461%207.26245%207.53169%207.20637L12.3767%205.22431C12.6992%205.09241%2012.9098%204.77864%2012.9098%204.43029C12.9098%204.05897%2012.6709%203.72979%2012.3179%203.61467L1.3937%200.0524441C1.01297%20-0.0717039%200.59479%200.0284601%200.311625%200.311623C0.0179321%200.605312%20-0.0779839%201.04307%200.0659951%201.43266L4.10624%2012.3651Z'%20fill='%23E04E05'%20/%3e%3c/svg%3e";
|
|
2
|
-
export {
|
|
3
|
-
e as default
|
|
4
|
-
};
|
|
5
|
-
//# sourceMappingURL=index79.js.map
|
package/dist/index79.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index79.js","sources":["../src/assets/icons/arrow-head.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'%20transform='rotate(45)'%3e%3cpath%20fillRule='evenodd'%20clipRule='evenodd'%20d='M4.10624%2012.3651C4.22961%2012.6989%204.54783%2012.9205%204.90372%2012.9205C5.27396%2012.9205%205.60164%2012.6809%205.7139%2012.3281L7.24454%207.51754C7.28945%207.37641%207.39461%207.26245%207.53169%207.20637L12.3767%205.22431C12.6992%205.09241%2012.9098%204.77864%2012.9098%204.43029C12.9098%204.05897%2012.6709%203.72979%2012.3179%203.61467L1.3937%200.0524441C1.01297%20-0.0717039%200.59479%200.0284601%200.311625%200.311623C0.0179321%200.605312%20-0.0779839%201.04307%200.0659951%201.43266L4.10624%2012.3651Z'%20fill='%23E04E05'%20/%3e%3c/svg%3e\""],"names":["__vite_glob_0_6"],"mappings":"AAAA,MAAeA,IAAA;"}
|