se-design 1.0.90-dev.0 → 1.0.91-r-dev.1
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/AnchoredOverlay/index.d.ts +41 -0
- package/dist/components/NLSearch/ClearAiFiltersBar.d.ts +21 -0
- package/dist/components/NLSearch/NLDynamicChip.d.ts +26 -0
- package/dist/components/NLSearch/NLSearchInput.d.ts +46 -0
- package/dist/components/NLSearch/index.d.ts +6 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/index.js +161 -152
- package/dist/index.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 +1 -1
- 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 +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 +1 -1
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +1 -1
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +2 -2
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +2 -2
- 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 +3 -3
- package/dist/index120.js +1 -1
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +1 -1
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +1 -1
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +1 -1
- 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 +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 +2 -2
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +1 -1
- package/dist/index129.js.map +1 -1
- package/dist/index13.js +3 -3
- package/dist/index130.js +1 -1
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +2 -2
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +2 -2
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +2 -2
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +1 -1
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +1 -1
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +2 -2
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +2 -2
- 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/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 +2 -2
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +1 -1
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +1 -1
- package/dist/index144.js.map +1 -1
- package/dist/index145.js +1 -1
- package/dist/index145.js.map +1 -1
- package/dist/index146.js +1 -1
- 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/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 +2 -2
- 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 +1 -1
- 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 +1 -1
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +2 -2
- package/dist/index159.js.map +1 -1
- package/dist/index16.js +3 -3
- package/dist/index160.js +2 -2
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +2 -2
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +2 -2
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +1 -1
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +2 -2
- package/dist/index164.js.map +1 -1
- package/dist/index165.js +2 -2
- 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/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 +1 -1
- 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 +1 -1
- 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 +3 -3
- package/dist/index180.js +1 -1
- 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 +1 -1
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +1 -1
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +2 -2
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +1 -1
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +1 -1
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +1 -1
- package/dist/index189.js.map +1 -1
- package/dist/index19.js +5 -5
- package/dist/index190.js +2 -2
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +2 -2
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +1 -1
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +1 -1
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +1 -1
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +2 -2
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +1 -1
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +1 -1
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +1 -1
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +1 -1
- package/dist/index199.js.map +1 -1
- package/dist/index20.js +96 -18
- package/dist/index20.js.map +1 -1
- package/dist/index200.js +1 -1
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +2 -2
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +1 -1
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +2 -2
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +2 -149
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +2 -9
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +2 -6
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +2 -43
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +2 -21
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +152 -0
- package/dist/index209.js.map +1 -0
- package/dist/index21.js +17 -32
- package/dist/index21.js.map +1 -1
- package/dist/index210.js +12 -0
- package/dist/index210.js.map +1 -0
- package/dist/index211.js +9 -0
- package/dist/index211.js.map +1 -0
- package/dist/index212.js +46 -0
- package/dist/index212.js.map +1 -0
- package/dist/index213.js +24 -0
- package/dist/index213.js.map +1 -0
- package/dist/index22.js +33 -66
- package/dist/index22.js.map +1 -1
- package/dist/{index215.js → index220.js} +1 -1
- package/dist/{index215.js.map → index220.js.map} +1 -1
- package/dist/{index216.js → index221.js} +3 -3
- package/dist/{index216.js.map → index221.js.map} +1 -1
- package/dist/{index223.js → index228.js} +1 -1
- package/dist/{index223.js.map → index228.js.map} +1 -1
- package/dist/index23.js +62 -83
- package/dist/index23.js.map +1 -1
- package/dist/{index225.js → index230.js} +1 -1
- package/dist/{index225.js.map → index230.js.map} +1 -1
- package/dist/{index233.js → index238.js} +1 -1
- package/dist/{index233.js.map → index238.js.map} +1 -1
- package/dist/index24.js +85 -21
- package/dist/index24.js.map +1 -1
- package/dist/{index236.js → index241.js} +1 -1
- package/dist/{index236.js.map → index241.js.map} +1 -1
- package/dist/index25.js +19 -401
- package/dist/index25.js.map +1 -1
- package/dist/index250.js +169 -9
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +3 -4
- package/dist/index251.js.map +1 -1
- package/dist/index253.js +19 -11
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +9 -5
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +9 -5
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +4 -37
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +170 -2
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +11 -8
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +5 -326
- package/dist/index259.js.map +1 -1
- package/dist/index26.js +400 -44
- package/dist/index26.js.map +1 -1
- package/dist/index260.js +5 -49
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +38 -2
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +2 -76
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +7 -92
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +322 -47
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +49 -7
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +2 -5
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +72 -48
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +93 -2
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +52 -2
- package/dist/index269.js.map +1 -1
- package/dist/index27.js +48 -23
- package/dist/index27.js.map +1 -1
- package/dist/index270.js +11 -0
- package/dist/index270.js.map +1 -0
- package/dist/index271.js +8 -0
- package/dist/index271.js.map +1 -0
- package/dist/index272.js +55 -0
- package/dist/index272.js.map +1 -0
- package/dist/index273.js +5 -0
- package/dist/index273.js.map +1 -0
- package/dist/index274.js +5 -0
- package/dist/index274.js.map +1 -0
- package/dist/index28.js +21 -108
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +107 -147
- package/dist/index29.js.map +1 -1
- package/dist/index3.js +3 -3
- package/dist/index30.js +146 -132
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +136 -76
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +73 -94
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +96 -73
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +72 -38
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +40 -72
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +68 -94
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +98 -77
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +75 -311
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +313 -75
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +4 -4
- package/dist/index40.js +72 -79
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +82 -32
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +26 -43
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +49 -109
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +105 -50
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +53 -142
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +137 -188
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +199 -36
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +40 -36
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +36 -149
- package/dist/index49.js.map +1 -1
- package/dist/index51.js +188 -451
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +38 -98
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +33 -40
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +151 -36
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +82 -88
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +452 -154
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +97 -148
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +43 -33
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +34 -82
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +125 -125
- package/dist/index60.js +87 -113
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +156 -71
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +144 -147
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +30 -315
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +83 -44
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +113 -138
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +77 -11
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +151 -54
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +312 -107
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +45 -17
- package/dist/index69.js.map +1 -1
- package/dist/index7.js +10 -9
- package/dist/index70.js +142 -63
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +10 -25
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +51 -104
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +106 -55
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +17 -19
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +63 -168
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +27 -18
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +107 -10
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +62 -5
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +18 -59
- package/dist/index79.js.map +1 -1
- package/dist/index80.js +170 -26
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +18 -11
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +14 -0
- package/dist/index82.js.map +1 -0
- package/dist/index83.js +5 -2
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +62 -2
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +27 -2
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +11 -2
- package/dist/index86.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 +4 -4
- package/dist/index90.js +1 -1
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +2 -2
- 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/index245.js +0 -173
- package/dist/index245.js.map +0 -1
- package/dist/index246.js +0 -7
- package/dist/index246.js.map +0 -1
- package/dist/index248.js +0 -22
- package/dist/index248.js.map +0 -1
- package/dist/index249.js +0 -13
- package/dist/index249.js.map +0 -1
- package/dist/index252.js +0 -173
- package/dist/index252.js.map +0 -1
- package/dist/index50.js +0 -89
- package/dist/index50.js.map +0 -1
- package/dist/index87.js +0 -5
- package/dist/index87.js.map +0 -1
package/dist/index34.js
CHANGED
|
@@ -1,45 +1,79 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
4
|
-
return l = Object.assign ? Object.assign.bind() : function(e) {
|
|
5
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
6
|
-
var n = arguments[t];
|
|
7
|
-
for (var a in n) ({}).hasOwnProperty.call(n, a) && (e[a] = n[a]);
|
|
8
|
-
}
|
|
9
|
-
return e;
|
|
10
|
-
}, l.apply(null, arguments);
|
|
11
|
-
}
|
|
12
|
-
function g(e) {
|
|
1
|
+
import e, { useRef as y } from "react";
|
|
2
|
+
import { useStableId as N } from "./index211.js";
|
|
3
|
+
function I(a) {
|
|
13
4
|
const {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
name:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
5
|
+
label: s,
|
|
6
|
+
value: n,
|
|
7
|
+
checked: l,
|
|
8
|
+
disabled: t,
|
|
9
|
+
name: i,
|
|
10
|
+
onChange: u,
|
|
11
|
+
width: m,
|
|
12
|
+
radioLabelClassName: f = "",
|
|
13
|
+
radioContainerClassName: p = "",
|
|
14
|
+
automationId: h = "",
|
|
15
|
+
bgColor: b = "var(--color-white)",
|
|
16
|
+
withBorder: x = !0,
|
|
17
|
+
content: c,
|
|
18
|
+
ariaControls: C
|
|
19
|
+
} = a, o = y(null), d = N(void 0, `${i}-${n}`);
|
|
20
|
+
e.useLayoutEffect(() => {
|
|
21
|
+
o.current && (o.current.checked = l);
|
|
22
|
+
}, [l]);
|
|
23
|
+
const g = () => {
|
|
24
|
+
t || (o.current?.focus(), o.current?.click());
|
|
25
|
+
}, k = (r) => {
|
|
26
|
+
r.stopPropagation();
|
|
27
|
+
}, w = (r) => {
|
|
28
|
+
r.stopPropagation();
|
|
29
|
+
}, v = () => {
|
|
30
|
+
u?.({
|
|
31
|
+
...a,
|
|
22
32
|
checked: !0
|
|
23
33
|
});
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
}, $ = l ? "border-[var(--color-blue-500)]" : "border-[var(--color-gray-400)]";
|
|
35
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
36
|
+
className: `se-design-radio-container flex flex-col justify-center items-start gap-2 ${t ? "cursor-not-allowed" : "cursor-pointer"} ${x ? `border ${$} p-4` : ""} rounded-[6px] transition-colors duration-300 ${t ? "opacity-50" : ""} ${p}`,
|
|
37
|
+
onClick: g,
|
|
38
|
+
style: {
|
|
39
|
+
width: m || "auto",
|
|
40
|
+
backgroundColor: b
|
|
41
|
+
},
|
|
42
|
+
"data-automation-id": h
|
|
43
|
+
}, /* @__PURE__ */ e.createElement("div", {
|
|
44
|
+
className: "flex items-center gap-[0.625rem]",
|
|
45
|
+
"data-automation-id": "radio-field-content"
|
|
46
|
+
}, /* @__PURE__ */ e.createElement("input", {
|
|
47
|
+
ref: o,
|
|
48
|
+
type: "radio",
|
|
49
|
+
id: d,
|
|
50
|
+
name: i,
|
|
51
|
+
value: n,
|
|
52
|
+
disabled: t,
|
|
53
|
+
className: "radio-field-input cursor-pointer accent-[var(--color-blue-500)] disabled:cursor-not-allowed disabled:opacity-50 text-[var(--color-blue-500)] w-[14px] h-[14px] p-[3px]",
|
|
54
|
+
"aria-controls": C,
|
|
55
|
+
onClick: w,
|
|
56
|
+
onChange: v
|
|
57
|
+
}), /* @__PURE__ */ e.createElement("label", {
|
|
58
|
+
htmlFor: d,
|
|
59
|
+
className: `${a.helperLabel ? "flex flex-col gap-[6px] " : ""}${t ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
60
|
+
"data-automation-id": "radio-field-label",
|
|
61
|
+
onClick: k
|
|
62
|
+
}, /* @__PURE__ */ e.createElement("span", {
|
|
63
|
+
className: `text-sm text-[var(--color-gray-800)] ${f} `,
|
|
64
|
+
style: {
|
|
65
|
+
fontSize: "16px",
|
|
66
|
+
fontWeight: "400"
|
|
67
|
+
}
|
|
68
|
+
}, s))), l && c && /* @__PURE__ */ e.createElement("div", {
|
|
69
|
+
className: "radio-child-content pl-[1.5rem] w-full",
|
|
70
|
+
onClick: (r) => r.stopPropagation()
|
|
71
|
+
}, c()), a.helperLabel && /* @__PURE__ */ e.createElement("span", {
|
|
72
|
+
className: `text-sm font-normal text-[var(--color-gray-600)] ${a.maxWidth ? `max-w-[${a.maxWidth}]` : "max-w-full"} break-words whitespace-normal`,
|
|
73
|
+
"data-automation-id": "radio-field-helper-text"
|
|
74
|
+
}, a.helperLabel));
|
|
41
75
|
}
|
|
42
76
|
export {
|
|
43
|
-
|
|
77
|
+
I as Radio
|
|
44
78
|
};
|
|
45
79
|
//# sourceMappingURL=index34.js.map
|
package/dist/index34.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index34.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index34.js","sources":["../src/components/Radio/index.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport { useStableId } from '../../utils/useStableId';\n\nexport interface RadioProps {\n label: string;\n value: string;\n checked: boolean;\n disabled: boolean;\n name: string;\n onChange?: (props: RadioProps) => void;\n helperLabel?: string;\n maxWidth?: string;\n width?: string;\n radioLabelClassName?: string;\n radioContainerClassName?: string;\n automationId?: string;\n withBorder?: boolean;\n bgColor?: string;\n content?: () => React.ReactNode;\n /**\n * ID of the element controlled by this radio (e.g. an expandable content region).\n */\n ariaControls?: string;\n}\n\nexport function Radio(props: RadioProps) {\n const {\n label,\n value,\n checked,\n disabled,\n name,\n onChange,\n width,\n radioLabelClassName = '',\n radioContainerClassName = '',\n automationId = '',\n bgColor = 'var(--color-white)',\n withBorder = true,\n content,\n ariaControls\n } = props;\n const radioRef = useRef<HTMLInputElement>(null);\n const inputId = useStableId(undefined, `${name}-${value}`);\n\n // Sync DOM checked state with prop — bypasses React's controlled-input restore mechanism\n // which resets DOM.checked=false after the first click on an unselected radio.\n React.useLayoutEffect(() => {\n if (radioRef.current) {\n radioRef.current.checked = checked;\n }\n }, [checked]);\n\n const handleContainerClick = () => {\n if (!disabled) {\n radioRef.current?.focus();\n radioRef.current?.click();\n }\n };\n\n const handleLabelClick = (e: React.MouseEvent<HTMLLabelElement>) => {\n // Stop label click from bubbling to container (which would double-fire handleContainerClick).\n // No preventDefault — native htmlFor redirect fires a new click on the input, which handles\n // check + focus + onChange via handleInputChange. No manual replication needed.\n e.stopPropagation();\n };\n\n const handleInputClick = (e: React.MouseEvent<HTMLInputElement>) => {\n e.stopPropagation();\n };\n\n const handleInputChange = () => {\n onChange?.({ ...props, checked: true });\n };\n\n const borderColor = checked ? 'border-[var(--color-blue-500)]' : 'border-[var(--color-gray-400)]';\n\n return (\n <div\n className={`se-design-radio-container flex flex-col justify-center items-start gap-2 ${\n disabled ? 'cursor-not-allowed' : 'cursor-pointer'\n } ${\n withBorder ? `border ${borderColor} p-4` : ''\n } rounded-[6px] transition-colors duration-300 ${disabled ? 'opacity-50' : ''} ${radioContainerClassName}`}\n onClick={handleContainerClick}\n style={{ width: width || 'auto', backgroundColor: bgColor }}\n data-automation-id={automationId}\n >\n <div className=\"flex items-center gap-[0.625rem]\" data-automation-id=\"radio-field-content\">\n <input\n ref={radioRef}\n type=\"radio\"\n id={inputId}\n name={name}\n value={value}\n disabled={disabled}\n className=\"radio-field-input cursor-pointer accent-[var(--color-blue-500)] disabled:cursor-not-allowed disabled:opacity-50 text-[var(--color-blue-500)] w-[14px] h-[14px] p-[3px]\"\n aria-controls={ariaControls}\n onClick={handleInputClick}\n onChange={handleInputChange}\n />\n <label\n htmlFor={inputId}\n className={`${props.helperLabel ? 'flex flex-col gap-[6px] ' : ''}${\n disabled ? 'cursor-not-allowed' : 'cursor-pointer'\n }`}\n data-automation-id=\"radio-field-label\"\n onClick={handleLabelClick}\n >\n <span\n className={`text-sm text-[var(--color-gray-800)] ${radioLabelClassName} `}\n style={{ fontSize: '16px', fontWeight: '400' }}\n >\n {label}\n </span>\n </label>\n </div>\n {checked && content && (\n <div className=\"radio-child-content pl-[1.5rem] w-full\" onClick={(e) => e.stopPropagation()}>\n {content()}\n </div>\n )}\n {props.helperLabel && (\n <span\n className={`text-sm font-normal text-[var(--color-gray-600)] ${\n props.maxWidth ? `max-w-[${props.maxWidth}]` : 'max-w-full'\n } break-words whitespace-normal`}\n data-automation-id=\"radio-field-helper-text\"\n >\n {props.helperLabel}\n </span>\n )}\n </div>\n );\n}\n"],"names":["Radio","props","label","value","checked","disabled","name","onChange","width","radioLabelClassName","radioContainerClassName","automationId","bgColor","withBorder","content","ariaControls","radioRef","useRef","inputId","useStableId","undefined","React","useLayoutEffect","current","handleContainerClick","focus","click","handleLabelClick","e","stopPropagation","handleInputClick","handleInputChange","borderColor","createElement","className","onClick","style","backgroundColor","ref","type","id","htmlFor","helperLabel","fontSize","fontWeight","maxWidth"],"mappings":"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"}
|
package/dist/index35.js
CHANGED
|
@@ -1,77 +1,45 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return r = Object.assign ? Object.assign.bind() : function(n) {
|
|
9
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
10
|
-
var o = arguments[s];
|
|
11
|
-
for (var t in o) ({}).hasOwnProperty.call(o, t) && (n[t] = o[t]);
|
|
1
|
+
import o from "react";
|
|
2
|
+
import { Radio as m } from "./index34.js";
|
|
3
|
+
function l() {
|
|
4
|
+
return l = Object.assign ? Object.assign.bind() : function(e) {
|
|
5
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
6
|
+
var n = arguments[t];
|
|
7
|
+
for (var a in n) ({}).hasOwnProperty.call(n, a) && (e[a] = n[a]);
|
|
12
8
|
}
|
|
13
|
-
return
|
|
14
|
-
},
|
|
9
|
+
return e;
|
|
10
|
+
}, l.apply(null, arguments);
|
|
11
|
+
}
|
|
12
|
+
function g(e) {
|
|
13
|
+
const {
|
|
14
|
+
automationId: t = "",
|
|
15
|
+
withBorder: n = !0,
|
|
16
|
+
ariaLabel: a,
|
|
17
|
+
ariaLabelledBy: i,
|
|
18
|
+
name: c
|
|
19
|
+
} = e, u = (r) => {
|
|
20
|
+
e.onRadioGroupChange({
|
|
21
|
+
...r,
|
|
22
|
+
checked: !0
|
|
23
|
+
});
|
|
24
|
+
}, d = i ? {
|
|
25
|
+
"aria-labelledby": i
|
|
26
|
+
} : a ? {
|
|
27
|
+
"aria-label": a
|
|
28
|
+
} : {};
|
|
29
|
+
return /* @__PURE__ */ o.createElement("div", {
|
|
30
|
+
"data-automation-id": t
|
|
31
|
+
}, /* @__PURE__ */ o.createElement("fieldset", l({
|
|
32
|
+
className: `flex flex-wrap gap-2 ${e.direction === "column" ? "flex-col" : "flex-row"}`
|
|
33
|
+
}, d), e.options.map((r) => /* @__PURE__ */ o.createElement(m, l({
|
|
34
|
+
key: r.value
|
|
35
|
+
}, r, {
|
|
36
|
+
name: c,
|
|
37
|
+
onChange: u,
|
|
38
|
+
checked: r.value === e.value,
|
|
39
|
+
withBorder: n
|
|
40
|
+
})))));
|
|
15
41
|
}
|
|
16
|
-
const j = ({
|
|
17
|
-
title: n,
|
|
18
|
-
titleTag: s = "h4",
|
|
19
|
-
content: o,
|
|
20
|
-
defaultOpen: t,
|
|
21
|
-
overflow: d,
|
|
22
|
-
titleClassName: u = "",
|
|
23
|
-
showSeparator: m = !0,
|
|
24
|
-
automationId: f = "",
|
|
25
|
-
id: p
|
|
26
|
-
}) => {
|
|
27
|
-
const [i, c] = h(!1);
|
|
28
|
-
E(() => {
|
|
29
|
-
c(t || !1);
|
|
30
|
-
}, [t]);
|
|
31
|
-
const a = $(p, "accordion"), l = `${a}-content`, {
|
|
32
|
-
pressProps: g,
|
|
33
|
-
role: v,
|
|
34
|
-
tabIndex: b
|
|
35
|
-
} = _({
|
|
36
|
-
onClick: () => c(!i),
|
|
37
|
-
isNative: !1
|
|
38
|
-
// Not a native button, so hook adds Enter/Space handling
|
|
39
|
-
}), x = I({
|
|
40
|
-
titleId: a,
|
|
41
|
-
isFocusable: !1
|
|
42
|
-
});
|
|
43
|
-
return /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement("div", r({}, g, {
|
|
44
|
-
role: v,
|
|
45
|
-
tabIndex: b,
|
|
46
|
-
"aria-expanded": i,
|
|
47
|
-
"aria-controls": l,
|
|
48
|
-
className: "se-design-accordion-header flex items-center cursor-pointer group focus-visible:outline-none",
|
|
49
|
-
"data-automation-id": f
|
|
50
|
-
}), /* @__PURE__ */ e.createElement("div", {
|
|
51
|
-
className: "flex items-center gap-2 rounded group-focus-visible:[outline:var(--focus-width)_solid_var(--focus-color)] group-focus-visible:[outline-offset:var(--focus-offset)] group-focus-visible:p-[2px]"
|
|
52
|
-
}, /* @__PURE__ */ e.createElement("div", {
|
|
53
|
-
className: `transform transition-transform duration-300 ${i ? "rotate-90" : ""}`
|
|
54
|
-
}, /* @__PURE__ */ e.createElement(N, {
|
|
55
|
-
name: "rightSide"
|
|
56
|
-
})), /* @__PURE__ */ e.createElement(s, {
|
|
57
|
-
id: a,
|
|
58
|
-
className: `se-design-accordion-title text-[var(--color-gray-900)]] font-inter text-[18px] font-semibold leading-[24px] ${u}`
|
|
59
|
-
}, n))), /* @__PURE__ */ e.createElement("div", r({
|
|
60
|
-
id: l
|
|
61
|
-
}, x, {
|
|
62
|
-
className: `
|
|
63
|
-
se-design-accordion-content
|
|
64
|
-
overflow-${d || "hidden"}
|
|
65
|
-
transition-all
|
|
66
|
-
duration-300
|
|
67
|
-
ml-1
|
|
68
|
-
mt-[1vw]
|
|
69
|
-
${i ? "max-h-[1000vh] opacity-100 visible h-auto" : "hidden"}`
|
|
70
|
-
}), o), m && /* @__PURE__ */ e.createElement("div", {
|
|
71
|
-
className: `h-[1px] bg-[#E5E7EB] mt-[12px] ${i ? "hidden" : "block"}`
|
|
72
|
-
}));
|
|
73
|
-
};
|
|
74
42
|
export {
|
|
75
|
-
|
|
43
|
+
g as RadioGroup
|
|
76
44
|
};
|
|
77
45
|
//# sourceMappingURL=index35.js.map
|
package/dist/index35.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index35.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index35.js","sources":["../src/components/RadioGroup/index.tsx"],"sourcesContent":["import React from 'react';\nimport { Radio, RadioProps } from '../Radio';\n\nexport interface RadioGroupProps {\n options: RadioProps[];\n onRadioGroupChange: (obj: RadioProps) => void;\n value?: string;\n direction?: 'row' | 'column';\n automationId?: string;\n withBorder?: boolean;\n /**\n * Accessible name for the radio group.\n * Applied to the fieldset element.\n * Prefer ariaLabelledBy when a visible label exists.\n */\n ariaLabel?: string;\n /**\n * ID(s) of element(s) that label this radio group.\n * Preferred over ariaLabel when a visible label exists (keeps SR and visual text in sync).\n */\n ariaLabelledBy?: string;\n /**\n * Shared name attribute for all radio inputs in the group.\n * Enables arrow-key navigation between options.\n * Must be unique per RadioGroup instance on the page.\n */\n name: string;\n}\n\nexport function RadioGroup(props: RadioGroupProps) {\n const { automationId = '', withBorder = true, ariaLabel, ariaLabelledBy, name } = props;\n const handleRadioChange = (obj: RadioProps) => {\n props.onRadioGroupChange({ ...obj, checked: true });\n };\n \n // Prefer aria-labelledby when provided, fallback to aria-label\n const fieldsetProps = ariaLabelledBy\n ? { 'aria-labelledby': ariaLabelledBy }\n : ariaLabel\n ? { 'aria-label': ariaLabel }\n : {};\n \n return (\n <div data-automation-id={automationId}>\n <fieldset className={`flex flex-wrap gap-2 ${props.direction === 'column' ? 'flex-col' : 'flex-row'}`} {...fieldsetProps}>\n {props.options.map((option) => (\n <Radio key={option.value} {...option} name={name} onChange={handleRadioChange} checked={option.value === props.value} withBorder={withBorder} />\n ))}\n </fieldset>\n </div>\n );\n}\n"],"names":["RadioGroup","props","automationId","withBorder","ariaLabel","ariaLabelledBy","name","handleRadioChange","obj","onRadioGroupChange","checked","fieldsetProps","React","createElement","_extends","className","direction","options","map","option","Radio","key","value","onChange"],"mappings":";;;;;;;;;;;AA6BO,SAASA,EAAWC,GAAwB;AACjD,QAAM;AAAA,IAAEC,cAAAA,IAAe;AAAA,IAAIC,YAAAA,IAAa;AAAA,IAAMC,WAAAA;AAAAA,IAAWC,gBAAAA;AAAAA,IAAgBC,MAAAA;AAAAA,EAAAA,IAASL,GAC5EM,IAAoBA,CAACC,MAAoB;AAC7CP,IAAAA,EAAMQ,mBAAmB;AAAA,MAAE,GAAGD;AAAAA,MAAKE,SAAS;AAAA,IAAA,CAAM;AAAA,EACpD,GAGMC,IAAgBN,IAClB;AAAA,IAAE,mBAAmBA;AAAAA,EAAAA,IACrBD,IACA;AAAA,IAAE,cAAcA;AAAAA,EAAAA,IAChB,CAAA;AAEJ,SACEQ,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAK,sBAAoBX;AAAAA,EAAAA,GACvBU,gBAAAA,EAAAC,cAAA,YAAAC,EAAA;AAAA,IAAUC,WAAW,wBAAwBd,EAAMe,cAAc,WAAW,aAAa,UAAU;AAAA,EAAA,GAAQL,CAAa,GACrHV,EAAMgB,QAAQC,IAAKC,CAAAA,MAClBP,gBAAAA,EAAAC,cAACO,GAAKN,EAAA;AAAA,IAACO,KAAKF,EAAOG;AAAAA,EAAAA,GAAWH,GAAM;AAAA,IAAEb,MAAAA;AAAAA,IAAYiB,UAAUhB;AAAAA,IAAmBG,SAASS,EAAOG,UAAUrB,EAAMqB;AAAAA,IAAOnB,YAAAA;AAAAA,EAAAA,CAAuB,CAAE,CAChJ,CACO,CACP;AAET;"}
|
package/dist/index36.js
CHANGED
|
@@ -1,103 +1,77 @@
|
|
|
1
|
-
import e, { useState as
|
|
2
|
-
import { Icon as
|
|
3
|
-
import { useStableId as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
for (var n in s) ({}).hasOwnProperty.call(s, n) && (i[n] = s[n]);
|
|
1
|
+
import e, { useState as h, useEffect as E } from "react";
|
|
2
|
+
import { Icon as N } from "./index6.js";
|
|
3
|
+
import { useStableId as $ } from "./index211.js";
|
|
4
|
+
import { getRegionAttributes as I } from "./index71.js";
|
|
5
|
+
import { useAccessiblePress as _ } from "./index72.js";
|
|
6
|
+
import "./index77.js";
|
|
7
|
+
function r() {
|
|
8
|
+
return r = Object.assign ? Object.assign.bind() : function(n) {
|
|
9
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
10
|
+
var o = arguments[s];
|
|
11
|
+
for (var t in o) ({}).hasOwnProperty.call(o, t) && (n[t] = o[t]);
|
|
13
12
|
}
|
|
14
|
-
return
|
|
15
|
-
},
|
|
13
|
+
return n;
|
|
14
|
+
}, r.apply(null, arguments);
|
|
16
15
|
}
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
defaultOpen:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
disabled: r = !1,
|
|
28
|
-
automationId: h = "",
|
|
29
|
-
id: A,
|
|
30
|
-
ariaLabel: I,
|
|
31
|
-
titleTag: C
|
|
16
|
+
const j = ({
|
|
17
|
+
title: n,
|
|
18
|
+
titleTag: s = "h4",
|
|
19
|
+
content: o,
|
|
20
|
+
defaultOpen: t,
|
|
21
|
+
overflow: d,
|
|
22
|
+
titleClassName: u = "",
|
|
23
|
+
showSeparator: m = !0,
|
|
24
|
+
automationId: f = "",
|
|
25
|
+
id: p
|
|
32
26
|
}) => {
|
|
33
|
-
const [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}, [
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}), S = V({
|
|
48
|
-
titleId: c,
|
|
27
|
+
const [i, c] = h(!1);
|
|
28
|
+
E(() => {
|
|
29
|
+
c(t || !1);
|
|
30
|
+
}, [t]);
|
|
31
|
+
const a = $(p, "accordion"), l = `${a}-content`, {
|
|
32
|
+
pressProps: g,
|
|
33
|
+
role: v,
|
|
34
|
+
tabIndex: b
|
|
35
|
+
} = _({
|
|
36
|
+
onClick: () => c(!i),
|
|
37
|
+
isNative: !1
|
|
38
|
+
// Not a native button, so hook adds Enter/Space handling
|
|
39
|
+
}), x = I({
|
|
40
|
+
titleId: a,
|
|
49
41
|
isFocusable: !1
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}, /* @__PURE__ */ e.createElement("div", {
|
|
59
|
-
|
|
60
|
-
className: "se-design-accordion-src-element title"
|
|
61
|
-
}, o({
|
|
62
|
-
isOpen: t
|
|
63
|
-
}))), l === "right" && /* @__PURE__ */ e.createElement("div", {
|
|
64
|
-
className: `se-design-accordion-icon transform transition-transform duration-300 ${p()} ${r ? "opacity-30 pointer-events-none" : ""}`
|
|
65
|
-
}, /* @__PURE__ */ e.createElement(x, {
|
|
66
|
-
name: "chevron"
|
|
67
|
-
}))), j = v ? /* @__PURE__ */ e.createElement(v, {
|
|
68
|
-
className: "flex-1"
|
|
69
|
-
}, /* @__PURE__ */ e.createElement("button", {
|
|
70
|
-
id: c + "-btn",
|
|
71
|
-
onClick: g,
|
|
72
|
-
"aria-expanded": t,
|
|
73
|
-
"aria-controls": m,
|
|
74
|
-
disabled: r,
|
|
75
|
-
className: "flex items-center flex-1 w-full cursor-pointer group focus-visible:!outline-none bg-transparent border-0 p-0 text-left"
|
|
76
|
-
}, b)) : /* @__PURE__ */ e.createElement("div", a({}, y, P({
|
|
77
|
-
ariaLabel: I
|
|
78
|
-
}), {
|
|
79
|
-
role: _,
|
|
80
|
-
tabIndex: R,
|
|
81
|
-
"aria-expanded": t,
|
|
82
|
-
"aria-controls": m,
|
|
83
|
-
className: "flex items-center flex-1 cursor-pointer group focus-visible:outline-none"
|
|
84
|
-
}), b);
|
|
85
|
-
return /* @__PURE__ */ e.createElement("div", {
|
|
86
|
-
className: `se-design-accordion ${N}`,
|
|
87
|
-
"data-automation-id": h
|
|
42
|
+
});
|
|
43
|
+
return /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement("div", r({}, g, {
|
|
44
|
+
role: v,
|
|
45
|
+
tabIndex: b,
|
|
46
|
+
"aria-expanded": i,
|
|
47
|
+
"aria-controls": l,
|
|
48
|
+
className: "se-design-accordion-header flex items-center cursor-pointer group focus-visible:outline-none",
|
|
49
|
+
"data-automation-id": f
|
|
50
|
+
}), /* @__PURE__ */ e.createElement("div", {
|
|
51
|
+
className: "flex items-center gap-2 rounded group-focus-visible:[outline:var(--focus-width)_solid_var(--focus-color)] group-focus-visible:[outline-offset:var(--focus-offset)] group-focus-visible:p-[2px]"
|
|
88
52
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
89
|
-
className:
|
|
90
|
-
}, /* @__PURE__ */ e.createElement(
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
id:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
53
|
+
className: `transform transition-transform duration-300 ${i ? "rotate-90" : ""}`
|
|
54
|
+
}, /* @__PURE__ */ e.createElement(N, {
|
|
55
|
+
name: "rightSide"
|
|
56
|
+
})), /* @__PURE__ */ e.createElement(s, {
|
|
57
|
+
id: a,
|
|
58
|
+
className: `se-design-accordion-title text-[var(--color-gray-900)]] font-inter text-[18px] font-semibold leading-[24px] ${u}`
|
|
59
|
+
}, n))), /* @__PURE__ */ e.createElement("div", r({
|
|
60
|
+
id: l
|
|
61
|
+
}, x, {
|
|
62
|
+
className: `
|
|
63
|
+
se-design-accordion-content
|
|
64
|
+
overflow-${d || "hidden"}
|
|
65
|
+
transition-all
|
|
66
|
+
duration-300
|
|
67
|
+
ml-1
|
|
68
|
+
mt-[1vw]
|
|
69
|
+
${i ? "max-h-[1000vh] opacity-100 visible h-auto" : "hidden"}`
|
|
70
|
+
}), o), m && /* @__PURE__ */ e.createElement("div", {
|
|
71
|
+
className: `h-[1px] bg-[#E5E7EB] mt-[12px] ${i ? "hidden" : "block"}`
|
|
72
|
+
}));
|
|
99
73
|
};
|
|
100
74
|
export {
|
|
101
|
-
|
|
75
|
+
j as Accordion
|
|
102
76
|
};
|
|
103
77
|
//# sourceMappingURL=index36.js.map
|
package/dist/index36.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index36.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index36.js","sources":["../src/components/Accordion/index.tsx"],"sourcesContent":["import React, { FC, useEffect, useState } from 'react';\nimport { Icon } from '../Icon';\nimport { useStableId } from '../../utils/useStableId';\nimport { useAccessiblePress } from '../../utils/a11y';\nimport { getRegionAttributes } from '../../utils/a11y/regionAttributes';\n\nexport interface AccordionProps {\n title: string;\n titleTag?: 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n titleClassName?: string;\n content: React.ReactNode;\n defaultOpen?: boolean;\n showSeparator?: boolean;\n overflow?: 'hidden' | 'visible' | 'scroll' | 'auto' | undefined | string;\n automationId?: string;\n id?: string;\n}\n\nexport const Accordion: FC<AccordionProps> = ({\n title,\n titleTag: TitleTag = 'h4',\n content,\n defaultOpen,\n overflow,\n titleClassName = '',\n showSeparator = true,\n automationId = '',\n id\n}) => {\n const [isOpen, setIsOpen] = useState(false);\n \n useEffect(() => {\n setIsOpen(defaultOpen || false);\n }, [defaultOpen]);\n\n // Generate stable IDs for ARIA relationships\n const titleId = useStableId(id, 'accordion');\n const contentId = `${titleId}-content`; \n\n // Use accessible press hook for keyboard + mouse handling\n const { pressProps, role, tabIndex } = useAccessiblePress({\n onClick: () => setIsOpen(!isOpen),\n isNative: false // Not a native button, so hook adds Enter/Space handling\n });\n\n // Get region attributes for content panel\n const regionAttributes = getRegionAttributes({\n titleId,\n isFocusable: false\n });\n\n const focusVisibleClasses = 'group-focus-visible:[outline:var(--focus-width)_solid_var(--focus-color)] group-focus-visible:[outline-offset:var(--focus-offset)] group-focus-visible:p-[2px]';\n\n return (\n <div>\n <div\n {...pressProps}\n role={role}\n tabIndex={tabIndex}\n aria-expanded={isOpen}\n aria-controls={contentId}\n className=\"se-design-accordion-header flex items-center cursor-pointer group focus-visible:outline-none\"\n data-automation-id={automationId}\n >\n <div className={`flex items-center gap-2 rounded ${focusVisibleClasses}`}>\n <div \n className={`transform transition-transform duration-300 ${isOpen ? 'rotate-90' : ''}`}\n >\n <Icon name=\"rightSide\" />\n </div>\n <TitleTag\n id={titleId}\n className={`se-design-accordion-title text-[var(--color-gray-900)]] font-inter text-[18px] font-semibold leading-[24px] ${titleClassName}`}\n >\n {title}\n </TitleTag>\n </div>\n </div>\n <div\n id={contentId}\n {...regionAttributes}\n className={`\n se-design-accordion-content\n overflow-${overflow || 'hidden'}\n transition-all\n duration-300\n ml-1\n mt-[1vw]\n ${isOpen ? 'max-h-[1000vh] opacity-100 visible h-auto' : 'hidden'}`}\n >\n {content}\n </div>\n {showSeparator && <div className={`h-[1px] bg-[#E5E7EB] mt-[12px] ${!isOpen ? 'block' : 'hidden'}`}></div>}\n </div>\n );\n};\n"],"names":["Accordion","title","titleTag","TitleTag","content","defaultOpen","overflow","titleClassName","showSeparator","automationId","id","isOpen","setIsOpen","useState","useEffect","titleId","useStableId","contentId","pressProps","role","tabIndex","useAccessiblePress","onClick","isNative","regionAttributes","getRegionAttributes","isFocusable","React","createElement","_extends","className","Icon","name"],"mappings":";;;;;;;;;;;;;;;AAkBO,MAAMA,IAAgCA,CAAC;AAAA,EAC5CC,OAAAA;AAAAA,EACAC,UAAUC,IAAW;AAAA,EACrBC,SAAAA;AAAAA,EACAC,aAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,gBAAAA,IAAiB;AAAA,EACjBC,eAAAA,IAAgB;AAAA,EAChBC,cAAAA,IAAe;AAAA,EACfC,IAAAA;AACF,MAAM;AACJ,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAK;AAE1CC,EAAAA,EAAU,MAAM;AACdF,IAAAA,EAAUP,KAAe,EAAK;AAAA,EAChC,GAAG,CAACA,CAAW,CAAC;AAGhB,QAAMU,IAAUC,EAAYN,GAAI,WAAW,GACrCO,IAAY,GAAGF,CAAO,YAGtB;AAAA,IAAEG,YAAAA;AAAAA,IAAYC,MAAAA;AAAAA,IAAMC,UAAAA;AAAAA,EAAAA,IAAaC,EAAmB;AAAA,IACxDC,SAASA,MAAMV,EAAU,CAACD,CAAM;AAAA,IAChCY,UAAU;AAAA;AAAA,EAAA,CACX,GAGKC,IAAmBC,EAAoB;AAAA,IAC3CV,SAAAA;AAAAA,IACAW,aAAa;AAAA,EAAA,CACd;AAID,SACEC,gBAAAA,EAAAC,cAAA,OAAA,MACED,gBAAAA,EAAAC,cAAA,OAAAC,EAAA,CAAA,GACMX,GAAU;AAAA,IACdC,MAAAA;AAAAA,IACAC,UAAAA;AAAAA,IACA,iBAAeT;AAAAA,IACf,iBAAeM;AAAAA,IACfa,WAAU;AAAA,IACV,sBAAoBrB;AAAAA,EAAAA,CAAa,GAEjCkB,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKE,WAAW;AAAA,EAAsD,GACpEH,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IACEE,WAAW,+CAA+CnB,IAAS,cAAc,EAAE;AAAA,EAAA,GAEnFgB,gBAAAA,EAAAC,cAACG,GAAI;AAAA,IAACC,MAAK;AAAA,EAAA,CAAa,CACrB,GACLL,gBAAAA,EAAAC,cAACzB,GAAQ;AAAA,IACPO,IAAIK;AAAAA,IACJe,WAAW,+GAA+GvB,CAAc;AAAA,EAAA,GAEvIN,CACO,CACP,CACF,GACL0B,gBAAAA,EAAAC,cAAA,OAAAC,EAAA;AAAA,IACEnB,IAAIO;AAAAA,EAAAA,GACAO,GAAgB;AAAA,IACpBM,WAAW;AAAA;AAAA,mBAEAxB,KAAY,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,UAK7BK,IAAS,8CAA8C,QAAQ;AAAA,EAAA,CAAG,GAEnEP,CACE,GACJI,KAAiBmB,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKE,WAAW,kCAAmCnB,IAAmB,WAAV,OAAkB;AAAA,EAAA,CAAS,CACtG;AAET;"}
|