se-design 1.0.90-dev.0 → 1.0.90
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/index.d.ts +2 -0
- package/dist/index.js +132 -130
- 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 +1 -1
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +1 -1
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +1 -1
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +2 -2
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +1 -1
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +2 -2
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +2 -2
- 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 +1 -1
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +1 -1
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +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 +2 -2
- 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 +1 -1
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +1 -1
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +1 -1
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +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 +2 -2
- 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 +1 -1
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +1 -1
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +1 -1
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +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 +1 -1
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +2 -2
- 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 +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/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 +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 +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 +1 -1
- 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 +2 -2
- 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 +149 -9
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +8 -5
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +5 -42
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +40 -18
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +24 -0
- package/dist/index209.js.map +1 -0
- package/dist/index21.js +17 -32
- package/dist/index21.js.map +1 -1
- package/dist/index216.js +24 -68
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +75 -0
- package/dist/index217.js.map +1 -0
- package/dist/index22.js +33 -66
- package/dist/index22.js.map +1 -1
- package/dist/{index223.js → index224.js} +1 -1
- package/dist/{index223.js.map → index224.js.map} +1 -1
- package/dist/{index225.js → index226.js} +1 -1
- package/dist/{index225.js.map → index226.js.map} +1 -1
- package/dist/index23.js +62 -83
- package/dist/index23.js.map +1 -1
- package/dist/{index233.js → index234.js} +1 -1
- package/dist/{index233.js.map → index234.js.map} +1 -1
- package/dist/{index236.js → index237.js} +1 -1
- package/dist/{index236.js.map → index237.js.map} +1 -1
- package/dist/index24.js +85 -21
- package/dist/index24.js.map +1 -1
- package/dist/index246.js +169 -3
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +7 -0
- package/dist/index247.js.map +1 -0
- package/dist/index249.js +18 -9
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +19 -401
- package/dist/index25.js.map +1 -1
- package/dist/index250.js +9 -9
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +9 -4
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +5 -170
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +170 -11
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +11 -6
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +5 -5
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +5 -37
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +38 -2
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +2 -8
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +7 -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 +324 -47
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +50 -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 +65 -82
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +89 -48
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +51 -7
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +7 -4
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +4 -51
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +52 -2
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +2 -2
- package/dist/index27.js +48 -23
- package/dist/index27.js.map +1 -1
- package/dist/index270.js +5 -0
- package/dist/index270.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 +95 -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 +48 -109
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +104 -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 +195 -35
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +34 -32
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +34 -147
- package/dist/index49.js.map +1 -1
- package/dist/index50.js +130 -67
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +78 -453
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +459 -96
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +98 -43
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +40 -35
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +33 -87
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +88 -159
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +157 -143
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +149 -33
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +33 -86
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +125 -125
- package/dist/index60.js +80 -113
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +114 -73
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +73 -147
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +146 -312
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +317 -46
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +45 -142
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +144 -12
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +10 -53
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +52 -110
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +111 -17
- package/dist/index69.js.map +1 -1
- package/dist/index7.js +2 -2
- package/dist/index70.js +17 -64
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +64 -25
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +24 -105
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +104 -58
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +60 -19
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +18 -168
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +171 -18
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +17 -10
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +11 -5
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +5 -62
- package/dist/index79.js.map +1 -1
- package/dist/index80.js +58 -23
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +25 -9
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +14 -0
- package/dist/index82.js.map +1 -0
- package/dist/index84.js +2 -2
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +2 -2
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +2 -2
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +2 -2
- 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 +4 -4
- 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/index215.js +0 -31
- package/dist/index215.js.map +0 -1
- package/dist/index245.js +0 -173
- package/dist/index245.js.map +0 -1
- package/dist/index248.js +0 -22
- package/dist/index248.js.map +0 -1
- package/dist/index83.js +0 -5
- package/dist/index83.js.map +0 -1
package/dist/index33.js
CHANGED
|
@@ -1,79 +1,101 @@
|
|
|
1
|
-
import e
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
import e from "react";
|
|
2
|
+
import { Button as N } from "./index4.js";
|
|
3
|
+
import { Badge as I } from "./index10.js";
|
|
4
|
+
import { Icon as g } from "./index6.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
const t = {
|
|
7
|
+
widgetCtn: "flex flex-col gap-[2px] align-center border border-[var(--color-gray-200)] rounded-[12px] w-[385px]",
|
|
8
|
+
widgetImageCtn: "cursor-pointer",
|
|
9
|
+
descriptionCtn: "p-4 flex flex-col",
|
|
10
|
+
widgetTitle: "text-[var(--color-gray-900)] mt-[4px] mb-[8px]",
|
|
11
|
+
widgetDescription: "text-[var(--color-gray-700)] mb-[4px]",
|
|
12
|
+
widgetLinkCta: "text-[var(--color-blue-500)] cursor-pointer hover:text-[var(--color-blue-600)]",
|
|
13
|
+
widgetButtonCta: "self-start",
|
|
14
|
+
widgetBadge: "w-fit",
|
|
15
|
+
webinarInfoCtn: "flex flex-col gap-2",
|
|
16
|
+
webinarSpeaker: "text-[var(--color-gray-700)]",
|
|
17
|
+
webinarDate: "text-[var(--color-gray-700)]",
|
|
18
|
+
webinarDescriptionInfo: "flex gap-2",
|
|
19
|
+
webinarTimeInfo: "flex gap-2",
|
|
20
|
+
requestFeatureCtn: "flex gap-[12px]",
|
|
21
|
+
requestFeatureImageCtn: "w-[48px] h-[48px] border border-[var(--color-gray-200)] rounded-[50%] flex items-center flex-shrink-0 bg-[var(--color-red-50)]",
|
|
22
|
+
requestFeatureDescriptionCtn: "flex flex-col"
|
|
23
|
+
}, B = ({
|
|
24
|
+
widgetClassName: d = "",
|
|
25
|
+
widgetType: a = "general",
|
|
26
|
+
widgetTitle: r = "",
|
|
27
|
+
widgetDescription: l = "",
|
|
28
|
+
widgetImage: p,
|
|
29
|
+
hasImage: x = !1,
|
|
30
|
+
hasButtonCta: n = !1,
|
|
31
|
+
hasLinkCta: i = !1,
|
|
32
|
+
ctaText: o = "",
|
|
33
|
+
hasBadge: f = !1,
|
|
34
|
+
badgeText: w = "",
|
|
35
|
+
buttonBgColor: u = "secondary",
|
|
36
|
+
onCtaClick: b,
|
|
37
|
+
onWidgetClick: v,
|
|
38
|
+
webinarDateInfo: c,
|
|
39
|
+
webinarSpeaker: s
|
|
40
|
+
}) => {
|
|
41
|
+
const E = f && /* @__PURE__ */ e.createElement(I, {
|
|
42
|
+
label: w,
|
|
43
|
+
className: t.widgetBadge,
|
|
44
|
+
bgColor: "var(--color-yellow-50)",
|
|
45
|
+
textColor: "var(--color-yellow-400)",
|
|
46
|
+
fontWeight: "normal"
|
|
47
|
+
}), m = (i || n) && /* @__PURE__ */ e.createElement(e.Fragment, null, i && /* @__PURE__ */ e.createElement("span", {
|
|
48
|
+
className: t.widgetLinkCta
|
|
49
|
+
}, o), n && /* @__PURE__ */ e.createElement(N, {
|
|
50
|
+
type: u,
|
|
51
|
+
size: "md",
|
|
52
|
+
label: o,
|
|
53
|
+
className: `${t.widgetButtonCta} mt-[4px]`,
|
|
54
|
+
onClick: b
|
|
55
|
+
})), C = x && /* @__PURE__ */ e.createElement("div", {
|
|
56
|
+
className: `${t.widgetImageCtn} widget-image-ctn`
|
|
57
|
+
}, /* @__PURE__ */ e.createElement("img", {
|
|
58
|
+
src: p,
|
|
59
|
+
alt: "widget-image"
|
|
60
|
+
}));
|
|
35
61
|
return /* @__PURE__ */ e.createElement("div", {
|
|
36
|
-
className:
|
|
37
|
-
onClick:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
62
|
+
className: `${t.widgetCtn} ${d} widget-ctn`,
|
|
63
|
+
onClick: v
|
|
64
|
+
}, a !== "general" && C, /* @__PURE__ */ e.createElement("div", {
|
|
65
|
+
className: t.descriptionCtn
|
|
66
|
+
}, a !== "general" && E, a !== "request-feature" && /* @__PURE__ */ e.createElement("span", {
|
|
67
|
+
className: `${t.widgetTitle} widget-title`
|
|
68
|
+
}, r), ["promotion", "general"].includes(a) && /* @__PURE__ */ e.createElement("span", {
|
|
69
|
+
className: `${t.widgetDescription} widget-description`
|
|
70
|
+
}, l), a === "webinar" && /* @__PURE__ */ e.createElement("div", {
|
|
71
|
+
className: t.webinarInfoCtn
|
|
72
|
+
}, s && /* @__PURE__ */ e.createElement("div", {
|
|
73
|
+
className: `${t.webinarDescriptionInfo} align-baseline`
|
|
74
|
+
}, /* @__PURE__ */ e.createElement(g, {
|
|
75
|
+
name: "people",
|
|
76
|
+
className: "relative top-[2px]"
|
|
77
|
+
}), /* @__PURE__ */ e.createElement("span", {
|
|
78
|
+
className: t.webinarSpeaker
|
|
79
|
+
}, s)), c && /* @__PURE__ */ e.createElement("div", {
|
|
80
|
+
className: `${t.webinarTimeInfo} align-baseline mb-[4px]`
|
|
81
|
+
}, /* @__PURE__ */ e.createElement(g, {
|
|
82
|
+
name: "clock",
|
|
83
|
+
className: "relative top-[2px]"
|
|
84
|
+
}), /* @__PURE__ */ e.createElement("span", {
|
|
85
|
+
className: t.webinarDate
|
|
86
|
+
}, c))), a === "request-feature" ? /* @__PURE__ */ e.createElement("div", {
|
|
87
|
+
className: t.requestFeatureCtn
|
|
43
88
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
44
|
-
className:
|
|
45
|
-
|
|
46
|
-
|
|
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
|
|
89
|
+
className: t.requestFeatureImageCtn
|
|
90
|
+
}), /* @__PURE__ */ e.createElement("div", {
|
|
91
|
+
className: t.requestFeatureDescriptionCtn
|
|
62
92
|
}, /* @__PURE__ */ e.createElement("span", {
|
|
63
|
-
className:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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));
|
|
75
|
-
}
|
|
93
|
+
className: `${t.widgetTitle} widget-title`
|
|
94
|
+
}, r), /* @__PURE__ */ e.createElement("span", {
|
|
95
|
+
className: `${t.widgetDescription} widget-description`
|
|
96
|
+
}, l), m)) : m));
|
|
97
|
+
};
|
|
76
98
|
export {
|
|
77
|
-
|
|
99
|
+
B as Widget
|
|
78
100
|
};
|
|
79
101
|
//# sourceMappingURL=index33.js.map
|
package/dist/index33.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index33.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index33.js","sources":["../src/components/Widget/index.tsx"],"sourcesContent":["import React, { FC } from \"react\";\nimport { Map } from \"../../utils/common.types\";\nimport { Button } from \"../Button\";\nimport { Badge } from \"../Badge\";\nimport { Icon } from \"../Icon\";\nimport \"./style.scss\";\n\nexport interface WidgetProps {\n widgetClassName?: string;\n widgetType?: \"promotion\" | \"webinar\" | \"request-feature\" | \"general\";\n widgetTitle?: string;\n hasBadge?: boolean;\n webinarSpeaker?: string;\n badgeText?: string;\n widgetDescription?: string;\n webinarDateInfo?: string;\n hasImage?: boolean;\n widgetImage?: string;\n hasButtonCta?: boolean;\n buttonBgColor?: 'primary' | 'secondary';\n hasLinkCta?: boolean;\n ctaText?: string;\n onCtaClick?: () => void;\n onWidgetClick?: () => void;\n}\n\nconst className: Map = {\n widgetCtn: 'flex flex-col gap-[2px] align-center border border-[var(--color-gray-200)] rounded-[12px] w-[385px]',\n widgetImageCtn: 'cursor-pointer',\n descriptionCtn: 'p-4 flex flex-col',\n widgetTitle: 'text-[var(--color-gray-900)] mt-[4px] mb-[8px]',\n widgetDescription: 'text-[var(--color-gray-700)] mb-[4px]',\n widgetLinkCta: 'text-[var(--color-blue-500)] cursor-pointer hover:text-[var(--color-blue-600)]',\n widgetButtonCta: 'self-start',\n widgetBadge: 'w-fit',\n webinarInfoCtn: 'flex flex-col gap-2',\n webinarSpeaker: 'text-[var(--color-gray-700)]',\n webinarDate: 'text-[var(--color-gray-700)]',\n webinarDescriptionInfo: 'flex gap-2',\n webinarTimeInfo: 'flex gap-2',\n requestFeatureCtn: 'flex gap-[12px]',\n requestFeatureImageCtn: 'w-[48px] h-[48px] border border-[var(--color-gray-200)] rounded-[50%] flex items-center flex-shrink-0 bg-[var(--color-red-50)]',\n requestFeatureDescriptionCtn: 'flex flex-col',\n};\n\nexport const Widget: FC<WidgetProps> = ({\n widgetClassName = \"\",\n widgetType = 'general',\n widgetTitle = \"\",\n widgetDescription = \"\",\n widgetImage,\n hasImage = false,\n hasButtonCta = false,\n hasLinkCta = false,\n ctaText = \"\",\n hasBadge = false,\n badgeText = \"\",\n buttonBgColor = 'secondary',\n onCtaClick,\n onWidgetClick,\n webinarDateInfo,\n webinarSpeaker,\n}) => {\n\n const renderBadge = hasBadge && (\n <Badge\n label={badgeText}\n className={className.widgetBadge}\n bgColor=\"var(--color-yellow-50)\"\n textColor=\"var(--color-yellow-400)\"\n fontWeight=\"normal\"\n />\n );\n\n const renderCTA = (hasLinkCta || hasButtonCta) && (\n <React.Fragment>\n {hasLinkCta && <span className={className.widgetLinkCta}>{ctaText}</span>}\n {hasButtonCta && <Button type={buttonBgColor} size=\"md\" label={ctaText} className={`${className.widgetButtonCta} mt-[4px]`} onClick={onCtaClick} />}\n </React.Fragment>\n );\n\n const renderImage = hasImage && (\n <div className={`${className.widgetImageCtn} widget-image-ctn`}>\n <img src={widgetImage} alt=\"widget-image\"/>\n </div>\n );\n\n return (\n <div className={`${className.widgetCtn} ${widgetClassName} widget-ctn`} onClick={onWidgetClick}>\n {widgetType !== \"general\" && renderImage}\n <div className={className.descriptionCtn}>\n {widgetType !== \"general\" && renderBadge}\n {widgetType !== \"request-feature\" && <span className={`${className.widgetTitle} widget-title`}>{widgetTitle}</span>}\n\n {([\"promotion\", \"general\"].includes(widgetType)) && (\n <span className={`${className.widgetDescription} widget-description`}>{widgetDescription}</span>\n )}\n\n {widgetType === \"webinar\" && (\n <div className={className.webinarInfoCtn}>\n {webinarSpeaker && (\n <div className={`${className.webinarDescriptionInfo} align-baseline`}>\n <Icon name=\"people\" className=\"relative top-[2px]\" />\n <span className={className.webinarSpeaker}>{webinarSpeaker}</span>\n </div>\n )}\n {webinarDateInfo && (\n <div className={`${className.webinarTimeInfo} align-baseline mb-[4px]`}>\n <Icon name=\"clock\" className=\"relative top-[2px]\" />\n <span className={className.webinarDate}>{webinarDateInfo}</span>\n </div>\n )}\n </div>\n )}\n\n {widgetType === \"request-feature\" ? (\n <div className={className.requestFeatureCtn}>\n <div className={className.requestFeatureImageCtn} />\n <div className={className.requestFeatureDescriptionCtn}>\n <span className={`${className.widgetTitle} widget-title`}>{widgetTitle}</span>\n <span className={`${className.widgetDescription} widget-description`}>{widgetDescription}</span>\n {renderCTA}\n </div>\n </div>\n ) : (\n renderCTA\n )}\n </div>\n </div>\n );\n};\n\nexport default Widget;"],"names":["React__default","Button","Badge","Icon","className","widgetCtn","widgetImageCtn","descriptionCtn","widgetTitle","widgetDescription","widgetLinkCta","widgetButtonCta","widgetBadge","webinarInfoCtn","webinarSpeaker","webinarDate","webinarDescriptionInfo","webinarTimeInfo","requestFeatureCtn","requestFeatureImageCtn","requestFeatureDescriptionCtn","Widget","widgetClassName","widgetType","widgetImage","hasImage","hasButtonCta","hasLinkCta","ctaText","hasBadge","badgeText","buttonBgColor","onCtaClick","onWidgetClick","webinarDateInfo","renderBadge","React","createElement","label","bgColor","textColor","fontWeight","renderCTA","Fragment","type","size","onClick","renderImage","src","alt","includes","name"],"mappings":"AA0BA,OAAAA,OAAA;AAAA,SAAA,UAAAC,SAAA;AAAA,SAAA,SAAAC,SAAA;AAAA,SAAA,QAAAC,SAAA;AAAA,OAAA;AAAA,MAAMC,IAAiB;AAAA,EACrBC,WAAW;AAAA,EACXC,gBAAgB;AAAA,EAChBC,gBAAgB;AAAA,EAChBC,aAAa;AAAA,EACbC,mBAAmB;AAAA,EACnBC,eAAe;AAAA,EACfC,iBAAiB;AAAA,EACjBC,aAAa;AAAA,EACbC,gBAAgB;AAAA,EAChBC,gBAAgB;AAAA,EAChBC,aAAa;AAAA,EACbC,wBAAwB;AAAA,EACxBC,iBAAiB;AAAA,EACjBC,mBAAmB;AAAA,EACnBC,wBAAwB;AAAA,EACxBC,8BAA8B;AAChC,GAEaC,IAA0BA,CAAC;AAAA,EACtCC,iBAAAA,IAAkB;AAAA,EAClBC,YAAAA,IAAa;AAAA,EACbf,aAAAA,IAAc;AAAA,EACdC,mBAAAA,IAAoB;AAAA,EACpBe,aAAAA;AAAAA,EACAC,UAAAA,IAAW;AAAA,EACXC,cAAAA,IAAe;AAAA,EACfC,YAAAA,IAAa;AAAA,EACbC,SAAAA,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GA,EAAUI,WAAW;AAAA,EAAA,GAAkBA,CAAkB,GAC7E4B,gBAAAA,EAAAC,cAAA,QAAA;AAAA,IAAMjC,WAAW,GAAGA,EAAUK,iBAAiB;AAAA,EAAA,GAAwBA,CAAwB,GAC9FiC,CACE,CACF,IAELA,CAEC,CACF;AAET;"}
|
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 "./index207.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":";;AAyBO,SAASA,EAAMC,GAAmB;AACvC,QAAM;AAAA,IACJC,OAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,UAAAA;AAAAA,IACAC,MAAAA;AAAAA,IACAC,UAAAA;AAAAA,IACAC,OAAAA;AAAAA,IACAC,qBAAAA,IAAsB;AAAA,IACtBC,yBAAAA,IAA0B;AAAA,IAC1BC,cAAAA,IAAe;AAAA,IACfC,SAAAA,IAAU;AAAA,IACVC,YAAAA,IAAa;AAAA,IACbC,SAAAA;AAAAA,IACAC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,IACV,iBAAenB;AAAAA,IACfoB,SAASL;AAAAA,IACTvB,UAAUwB;AAAAA,EAAAA,CACX,GACDV,gBAAAA,EAAAY,cAAA,SAAA;AAAA,IACEQ,SAASvB;AAAAA,IACTgB,WAAW,GAAGjC,EAAMyC,cAAc,6BAA6B,EAAE,GAC/DrC,IAAW,uBAAuB,gBAAgB;AAAA,IAEpD,sBAAmB;AAAA,IACnB8B,SAASR;AAAAA,EAAAA,GAETN,gBAAAA,EAAAY,cAAA,QAAA;AAAA,IACEC,WAAW,wCAAwCzB,CAAmB;AAAA,IACtE2B,OAAO;AAAA,MAAEO,UAAU;AAAA,MAAQC,YAAY;AAAA,IAAA;AAAA,EAAM,GAE5C1C,CACG,CACD,CACJ,GACJE,KAAWU,KACVO,gBAAAA,EAAAY,cAAA,OAAA;AAAA,IAAKC,WAAU;AAAA,IAAyCC,SAAUP,CAAAA,MAAMA,EAAEC,gBAAAA;AAAAA,EAAgB,GACvFf,GACE,GAENb,EAAMyC,eACLrB,gBAAAA,EAAAY,cAAA,QAAA;AAAA,IACEC,WAAW,oDACTjC,EAAM4C,WAAW,UAAU5C,EAAM4C,QAAQ,MAAM,YAAY;AAAA,IAE7D,sBAAmB;AAAA,EAAA,GAElB5C,EAAMyC,WACH,CAEL;AAET;"}
|
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;"}
|