se-design 1.0.59 → 1.0.61-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/colors.css +2 -2
- package/dist/assets/icons/checkbox-disabled-minus.svg +1 -1
- package/dist/assets/icons/checkbox-disabled-tick.svg +1 -1
- package/dist/assets/icons/checkbox-fill.svg +1 -1
- package/dist/assets/icons/checkbox-hover-fill.svg +2 -2
- package/dist/assets/icons/sort-asc.svg +3 -4
- package/dist/assets/icons/sort-desc.svg +2 -3
- package/dist/assets/style.css +1 -1
- package/dist/components/AutoCompleteInput/index.d.ts +37 -7
- package/dist/components/DropdownWithInputTags/index.d.ts +7 -1
- package/dist/components/Header/index.d.ts +1 -0
- package/dist/components/OTPInput/index.d.ts +1 -0
- package/dist/components/PhoneInput/index.d.ts +19 -0
- package/dist/components/RadioGroup/index.d.ts +17 -0
- package/dist/components/SidebarOverlay/index.d.ts +4 -0
- package/dist/components/SkipLinksBar/index.d.ts +11 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.js +124 -120
- package/dist/index.js.map +1 -1
- package/dist/index10.js +56 -46
- package/dist/index10.js.map +1 -1
- package/dist/index100.js +2 -2
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +2 -2
- 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 +2 -2
- 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 +48 -18
- package/dist/index11.js.map +1 -1
- package/dist/index110.js +1 -1
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +1 -1
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +2 -2
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +1 -1
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +1 -1
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +2 -2
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +2 -2
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +2 -2
- 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 +20 -11
- package/dist/index12.js.map +1 -1
- package/dist/index120.js +1 -1
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +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 +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 +1 -1
- package/dist/index129.js.map +1 -1
- package/dist/index13.js +15 -9
- package/dist/index13.js.map +1 -1
- package/dist/index130.js +1 -1
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +1 -1
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +1 -1
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +1 -1
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +2 -2
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +2 -2
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +2 -2
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +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 +2 -2
- package/dist/index139.js.map +1 -1
- package/dist/index14.js +10 -202
- package/dist/index14.js.map +1 -1
- package/dist/index140.js +2 -2
- 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 +1 -1
- 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 +216 -59
- package/dist/index15.js.map +1 -1
- package/dist/index150.js +1 -1
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +1 -1
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +1 -1
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +1 -1
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +1 -1
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +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 +60 -84
- 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 +2 -2
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +1 -1
- 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 +2 -2
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +1 -1
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +2 -2
- package/dist/index169.js.map +1 -1
- package/dist/index17.js +80 -274
- 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 +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 +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 +2 -2
- package/dist/index179.js.map +1 -1
- package/dist/index18.js +281 -11
- package/dist/index18.js.map +1 -1
- package/dist/index180.js +2 -149
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +2 -6
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +149 -5
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +12 -0
- package/dist/index183.js.map +1 -0
- package/dist/index184.js +9 -0
- package/dist/index184.js.map +1 -0
- package/dist/index185.js +4 -23
- package/dist/index185.js.map +1 -1
- package/dist/index188.js +27 -0
- package/dist/index188.js.map +1 -0
- package/dist/index189.js +60 -21
- package/dist/index189.js.map +1 -1
- package/dist/index19.js +12 -31
- package/dist/index19.js.map +1 -1
- package/dist/index191.js +87 -0
- package/dist/index191.js.map +1 -0
- package/dist/index193.js +26 -0
- package/dist/index193.js.map +1 -0
- package/dist/index20.js +32 -56
- package/dist/index20.js.map +1 -1
- package/dist/{index197.js → index201.js} +1 -1
- package/dist/{index197.js.map → index201.js.map} +1 -1
- package/dist/{index205.js → index209.js} +1 -1
- package/dist/{index205.js.map → index209.js.map} +1 -1
- package/dist/index21.js +53 -75
- package/dist/index21.js.map +1 -1
- package/dist/{index207.js → index211.js} +1 -1
- package/dist/{index207.js.map → index211.js.map} +1 -1
- package/dist/{index208.js → index212.js} +2 -2
- package/dist/{index208.js.map → index212.js.map} +1 -1
- package/dist/index22.js +77 -21
- package/dist/index22.js.map +1 -1
- package/dist/index222.js +3 -9
- package/dist/index222.js.map +1 -1
- package/dist/index224.js +56 -167
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +54 -11
- package/dist/index225.js.map +1 -1
- package/dist/index227.js +18 -5
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +9 -5
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +8 -36
- package/dist/index229.js.map +1 -1
- package/dist/index23.js +19 -190
- package/dist/index23.js.map +1 -1
- package/dist/index230.js +5 -2
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +170 -8
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +11 -327
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +5 -49
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +6 -2
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +35 -73
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +2 -93
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +5 -49
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +326 -7
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +49 -4
- package/dist/index239.js.map +1 -1
- package/dist/index24.js +217 -44
- package/dist/index24.js.map +1 -1
- package/dist/index240.js +2 -52
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +76 -2
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +93 -2
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +55 -0
- package/dist/index243.js.map +1 -0
- package/dist/index244.js +11 -0
- package/dist/index244.js.map +1 -0
- package/dist/index245.js +8 -0
- package/dist/index245.js.map +1 -0
- package/dist/index246.js +55 -0
- package/dist/index246.js.map +1 -0
- package/dist/index247.js +5 -0
- package/dist/index247.js.map +1 -0
- package/dist/index248.js +5 -0
- package/dist/index248.js.map +1 -0
- package/dist/index25.js +48 -18
- package/dist/index25.js.map +1 -1
- package/dist/index26.js +16 -80
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +82 -79
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +80 -130
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +131 -55
- package/dist/index29.js.map +1 -1
- package/dist/index3.js +2 -2
- package/dist/index30.js +53 -97
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +99 -61
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +59 -32
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +40 -71
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +68 -41
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +45 -57
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +54 -230
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +281 -70
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +68 -80
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +82 -32
- package/dist/index39.js.map +1 -1
- package/dist/index40.js +26 -44
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +45 -67
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +65 -49
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +49 -89
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +141 -93
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +189 -35
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +34 -29
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +31 -147
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +138 -45
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +52 -373
- package/dist/index49.js.map +1 -1
- package/dist/index5.js +116 -115
- package/dist/index5.js.map +1 -1
- package/dist/index50.js +375 -63
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +65 -38
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +35 -35
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +35 -82
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +81 -159
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +157 -135
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +149 -29
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +29 -86
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +80 -113
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +114 -56
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +32 -51
- package/dist/index6.js.map +1 -1
- package/dist/index60.js +56 -147
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +146 -312
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +317 -44
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +43 -139
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +140 -12
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +10 -42
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +44 -5
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +18 -8
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +8 -0
- package/dist/index68.js.map +1 -0
- package/dist/index69.js +9 -2
- package/dist/index69.js.map +1 -1
- package/dist/index7.js +47 -81
- package/dist/index7.js.map +1 -1
- package/dist/index71.js +1 -1
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +1 -1
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +2 -2
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +1 -1
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +1 -1
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +1 -1
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +1 -1
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +1 -1
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +1 -1
- package/dist/index79.js.map +1 -1
- package/dist/index8.js +86 -26
- package/dist/index8.js.map +1 -1
- package/dist/index80.js +1 -1
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +1 -1
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +1 -1
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +1 -1
- 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 +23 -59
- package/dist/index9.js.map +1 -1
- package/dist/index90.js +1 -1
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +1 -1
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +1 -1
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +1 -1
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +1 -1
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +2 -2
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +2 -2
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +2 -2
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +2 -2
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +1 -1
- package/dist/index99.js.map +1 -1
- package/package.json +3 -2
- package/dist/index186.js +0 -65
- package/dist/index186.js.map +0 -1
- package/dist/index218.js +0 -7
- package/dist/index218.js.map +0 -1
- package/dist/index220.js +0 -62
- package/dist/index220.js.map +0 -1
- package/dist/index221.js +0 -13
- package/dist/index221.js.map +0 -1
- package/dist/index223.js +0 -8
- package/dist/index223.js.map +0 -1
- package/dist/index70.js +0 -5
- package/dist/index70.js.map +0 -1
package/dist/index30.js
CHANGED
|
@@ -1,102 +1,58 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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: g = "",
|
|
25
|
-
widgetType: a = "general",
|
|
26
|
-
widgetTitle: r = "",
|
|
27
|
-
widgetDescription: l = "",
|
|
28
|
-
widgetImage: p,
|
|
29
|
-
hasImage: f = !1,
|
|
30
|
-
hasButtonCta: n = !1,
|
|
31
|
-
hasLinkCta: i = !1,
|
|
32
|
-
ctaText: o = "",
|
|
33
|
-
hasBadge: x = !1,
|
|
34
|
-
badgeText: w = "",
|
|
35
|
-
buttonBgColor: u = "secondary",
|
|
36
|
-
onCtaClick: b,
|
|
37
|
-
onWidgetClick: v,
|
|
38
|
-
webinarDateInfo: c,
|
|
39
|
-
webinarSpeaker: s
|
|
1
|
+
import o from "react";
|
|
2
|
+
import { Icon as h } from "./index5.js";
|
|
3
|
+
const c = {
|
|
4
|
+
pageNavigation: "px-[6px] flex items-center justify-center disabled:opacity-50 hover:cursor-pointer",
|
|
5
|
+
pageItem: "px-[6px] text-sm flex items-center justify-center rounded border hover:cursor-pointer"
|
|
6
|
+
}, E = ({
|
|
7
|
+
currentPage: t,
|
|
8
|
+
itemsPerPage: l,
|
|
9
|
+
totalItems: r,
|
|
10
|
+
onPageChange: p,
|
|
11
|
+
mobileView: m = !1
|
|
40
12
|
}) => {
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
}
|
|
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
|
|
88
|
-
}, /* @__PURE__ */ e.createElement("div", {
|
|
89
|
-
className: t.requestFeatureImageCtn
|
|
90
|
-
}), /* @__PURE__ */ e.createElement("div", {
|
|
91
|
-
className: t.requestFeatureDescriptionCtn
|
|
92
|
-
}, /* @__PURE__ */ e.createElement("span", {
|
|
93
|
-
className: `${t.widgetTitle} widget-title`
|
|
94
|
-
}, r), /* @__PURE__ */ e.createElement("span", {
|
|
95
|
-
className: `${t.widgetDescription} widget-description`
|
|
96
|
-
}, l), m)) : m));
|
|
13
|
+
const n = Math.ceil(r / l), d = 1, f = n, x = (t - 1) * l + 1, u = Math.min(t * l, r), v = u < r, g = t > 1, b = () => {
|
|
14
|
+
const e = [], a = (s) => /* @__PURE__ */ o.createElement("span", {
|
|
15
|
+
key: s,
|
|
16
|
+
onClick: () => p(s),
|
|
17
|
+
className: `${c.pageItem} ${t === s ? "bg-[var(--color-gray-100)] border-[var(--color-gray-300)]" : "border-[var(--color-gray-200)] hover:bg-[var(--color-gray-50)]"}`,
|
|
18
|
+
"data-automation-id": `page-number-${s}`
|
|
19
|
+
}, s), i = (s) => /* @__PURE__ */ o.createElement("span", {
|
|
20
|
+
key: s,
|
|
21
|
+
className: "w-5 h-5 text-sm rounded border border-[var(--color-gray-200)] flex items-end justify-center"
|
|
22
|
+
}, "...");
|
|
23
|
+
if (m)
|
|
24
|
+
return e.push(a(t)), e;
|
|
25
|
+
if (t <= 3) {
|
|
26
|
+
for (let s = 1; s <= Math.min(3, n); s++)
|
|
27
|
+
e.push(a(s));
|
|
28
|
+
n > 3 && (e.push(i("ellipsis-end")), e.push(a(n)));
|
|
29
|
+
} else t >= n - 2 ? (e.push(a(d)), e.push(i("ellipsis-start")), e.push(a(n - 2)), e.push(a(n - 1)), e.push(a(n))) : (e.push(a(d)), e.push(i("ellipsis-start")), e.push(a(t - 1)), e.push(a(t)), e.push(a(t + 1)), e.push(i("ellipsis-end")), e.push(a(f)));
|
|
30
|
+
return e;
|
|
31
|
+
};
|
|
32
|
+
return /* @__PURE__ */ o.createElement("div", {
|
|
33
|
+
className: "flex items-center gap-1 font-normal",
|
|
34
|
+
"data-automation-id": "pagination-container"
|
|
35
|
+
}, /* @__PURE__ */ o.createElement("span", {
|
|
36
|
+
className: "text-sm text-[var(--color-gray-700)] mr-1",
|
|
37
|
+
"data-automation-id": "pagination-items-info"
|
|
38
|
+
}, `${m ? "" : "Showing "}${x}-${u} of ${r}`), /* @__PURE__ */ o.createElement("span", {
|
|
39
|
+
onClick: () => g && p(t - 1),
|
|
40
|
+
className: `${c.pageNavigation}`,
|
|
41
|
+
"data-automation-id": "pagination-previous-button"
|
|
42
|
+
}, /* @__PURE__ */ o.createElement(h, {
|
|
43
|
+
name: "next",
|
|
44
|
+
className: "rotate-180 transition-transform stroke-[var(--color-gray-600)]"
|
|
45
|
+
})), /* @__PURE__ */ o.createElement("div", {
|
|
46
|
+
className: "flex items-center gap-1"
|
|
47
|
+
}, b()), /* @__PURE__ */ o.createElement("span", {
|
|
48
|
+
onClick: () => v && p(t + 1),
|
|
49
|
+
className: `${c.pageNavigation}`,
|
|
50
|
+
"data-automation-id": "pagination-next-button"
|
|
51
|
+
}, /* @__PURE__ */ o.createElement(h, {
|
|
52
|
+
name: "next"
|
|
53
|
+
})));
|
|
97
54
|
};
|
|
98
55
|
export {
|
|
99
|
-
|
|
100
|
-
B as default
|
|
56
|
+
E as Pagination
|
|
101
57
|
};
|
|
102
58
|
//# sourceMappingURL=index30.js.map
|
package/dist/index30.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index30.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index30.js","sources":["../src/components/Pagination/index.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Icon } from 'components/Icon';\n\ninterface PaginationProps {\n currentPage: number;\n itemsPerPage: number;\n totalItems: number;\n onPageChange: (page: number) => void;\n mobileView?: boolean;\n}\n\nconst paginationClassNames = {\n pageNavigation: \"px-[6px] flex items-center justify-center disabled:opacity-50 hover:cursor-pointer\",\n pageItem: \"px-[6px] text-sm flex items-center justify-center rounded border hover:cursor-pointer\"\n}\n\nexport const Pagination: React.FC<PaginationProps> = ({ currentPage, itemsPerPage, totalItems, onPageChange, mobileView = false }) => {\n const totalPages = Math.ceil(totalItems / itemsPerPage);\n const firstPage = 1;\n const lastPage = totalPages;\n const startItem = (currentPage - 1) * itemsPerPage + 1;\n const endItem = Math.min(currentPage * itemsPerPage, totalItems);\n const hasNextPage = endItem < totalItems;\n const hasPrevPage = currentPage > 1;\n\n const renderPageNumbers = () => {\n const pages = [];\n\n const renderPageNumber = (pageNum: number) => {\n return (\n <span\n key={pageNum}\n onClick={() => onPageChange(pageNum)}\n className={`${paginationClassNames.pageItem} ${currentPage === pageNum ? 'bg-[var(--color-gray-100)] border-[var(--color-gray-300)]' : 'border-[var(--color-gray-200)] hover:bg-[var(--color-gray-50)]'}`}\n data-automation-id={`page-number-${pageNum}`}\n >\n {pageNum}\n </span>\n );\n };\n\n const renderEllipsis = (key: string) => {\n return (\n <span key={key} className=\"w-5 h-5 text-sm rounded border border-[var(--color-gray-200)] flex items-end justify-center\">\n ...\n </span>\n );\n };\n if(mobileView) {\n pages.push(renderPageNumber(currentPage));\n\n return pages;\n }\n if (currentPage <= 3) {\n for (let i = 1; i <= Math.min(3, totalPages); i++) {\n pages.push(renderPageNumber(i));\n }\n\n if (totalPages > 3) {\n pages.push(renderEllipsis(\"ellipsis-end\"));\n pages.push(renderPageNumber(totalPages));\n }\n } else if (currentPage >= totalPages - 2) {\n pages.push(renderPageNumber(firstPage));\n pages.push(renderEllipsis(\"ellipsis-start\"));\n pages.push(renderPageNumber(totalPages - 2));\n pages.push(renderPageNumber(totalPages - 1));\n pages.push(renderPageNumber(totalPages));\n } else {\n pages.push(renderPageNumber(firstPage));\n pages.push(renderEllipsis(\"ellipsis-start\"));\n pages.push(renderPageNumber(currentPage - 1));\n pages.push(renderPageNumber(currentPage));\n pages.push(renderPageNumber(currentPage + 1));\n pages.push(renderEllipsis(\"ellipsis-end\"));\n pages.push(renderPageNumber(lastPage));\n }\n\n return pages;\n };\n\n return (\n <div className=\"flex items-center gap-1 font-normal\" data-automation-id=\"pagination-container\">\n <span className=\"text-sm text-[var(--color-gray-700)] mr-1\" data-automation-id=\"pagination-items-info\">\n {`${mobileView ? \"\" : \"Showing \"}${startItem}-${endItem} of ${totalItems}`}\n </span>\n <span\n onClick={() => hasPrevPage && onPageChange(currentPage - 1)}\n className={`${paginationClassNames.pageNavigation}`}\n data-automation-id=\"pagination-previous-button\"\n >\n <Icon name=\"next\" className=\"rotate-180 transition-transform stroke-[var(--color-gray-600)]\" />\n </span>\n {/* Render page numbers */}\n <div className=\"flex items-center gap-1\">{renderPageNumbers()}</div>\n <span\n onClick={() => hasNextPage && onPageChange(currentPage + 1)}\n className={`${paginationClassNames.pageNavigation}`}\n data-automation-id=\"pagination-next-button\"\n >\n <Icon name=\"next\" />\n </span>\n </div>\n );\n};\n"],"names":["React__default","Icon","paginationClassNames","pageNavigation","pageItem","Pagination","currentPage","itemsPerPage","totalItems","onPageChange","mobileView","totalPages","Math","ceil","firstPage","lastPage","startItem","endItem","min","hasNextPage","hasPrevPage","renderPageNumbers","pages","renderPageNumber","pageNum","React","createElement","key","onClick","className","renderEllipsis","push","i","name"],"mappings":"AAYA,OAAAA,OAAA;AAAA,SAAA,QAAAC,SAAA;AAAA,MAAMC,IAAuB;AAAA,EAC3BC,gBAAgB;AAAA,EAChBC,UAAU;AACZ,GAEaC,IAAwCA,CAAC;AAAA,EAAEC,aAAAA;AAAAA,EAAaC,cAAAA;AAAAA,EAAcC,YAAAA;AAAAA,EAAYC,cAAAA;AAAAA,EAAcC,YAAAA,IAAa;AAAM,MAAM;AACpI,QAAMC,IAAaC,KAAKC,KAAKL,IAAaD,CAAY,GAChDO,IAAY,GACZC,IAAWJ,GACXK,KAAaV,IAAc,KAAKC,IAAe,GAC/CU,IAAUL,KAAKM,IAAIZ,IAAcC,GAAcC,CAAU,GACzDW,IAAcF,IAAUT,GACxBY,IAAcd,IAAc,GAE5Be,IAAoBA,MAAM;AAC9B,UAAMC,IAAQ,CAAA,GAERC,IAAmBA,CAACC,MAEtBC,gBAAAA,EAAAC,cAAA,QAAA;AAAA,MACEC,KAAKH;AAAAA,MACLI,SAASA,MAAMnB,EAAae,CAAO;AAAA,MACnCK,WAAW,GAAG3B,EAAqBE,QAAQ,IAAIE,MAAgBkB,IAAU,8DAA8D,gEAAgE;AAAA,MACvM,sBAAoB,eAAeA,CAAO;AAAA,IAAA,GAEzCA,CACG,GAIJM,IAAiBA,CAACH,MA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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
1
|
+
import e from "react";
|
|
2
|
+
import { Button as N } from "./index3.js";
|
|
3
|
+
import { Badge as I } from "./index9.js";
|
|
4
|
+
import { Icon as d } from "./index5.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: g = "",
|
|
25
|
+
widgetType: a = "general",
|
|
26
|
+
widgetTitle: r = "",
|
|
27
|
+
widgetDescription: l = "",
|
|
28
|
+
widgetImage: p,
|
|
29
|
+
hasImage: f = !1,
|
|
30
|
+
hasButtonCta: n = !1,
|
|
31
|
+
hasLinkCta: i = !1,
|
|
32
|
+
ctaText: o = "",
|
|
33
|
+
hasBadge: x = !1,
|
|
34
|
+
badgeText: w = "",
|
|
35
|
+
buttonBgColor: u = "secondary",
|
|
36
|
+
onCtaClick: b,
|
|
37
|
+
onWidgetClick: v,
|
|
38
|
+
webinarDateInfo: c,
|
|
39
|
+
webinarSpeaker: s
|
|
40
|
+
}) => {
|
|
41
|
+
const E = x && /* @__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 = f && /* @__PURE__ */ e.createElement("div", {
|
|
56
|
+
className: `${t.widgetImageCtn} widget-image-ctn`
|
|
57
|
+
}, /* @__PURE__ */ e.createElement("img", {
|
|
58
|
+
src: p,
|
|
59
|
+
alt: "widget-image"
|
|
60
|
+
}));
|
|
61
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
62
|
+
className: `${t.widgetCtn} ${g} 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(d, {
|
|
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(d, {
|
|
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
|
|
88
|
+
}, /* @__PURE__ */ e.createElement("div", {
|
|
89
|
+
className: t.requestFeatureImageCtn
|
|
90
|
+
}), /* @__PURE__ */ e.createElement("div", {
|
|
91
|
+
className: t.requestFeatureDescriptionCtn
|
|
92
|
+
}, /* @__PURE__ */ e.createElement("span", {
|
|
93
|
+
className: `${t.widgetTitle} widget-title`
|
|
94
|
+
}, r), /* @__PURE__ */ e.createElement("span", {
|
|
95
|
+
className: `${t.widgetDescription} widget-description`
|
|
96
|
+
}, l), m)) : m));
|
|
97
|
+
};
|
|
61
98
|
export {
|
|
62
|
-
|
|
99
|
+
B as Widget,
|
|
100
|
+
B as default
|
|
63
101
|
};
|
|
64
102
|
//# sourceMappingURL=index31.js.map
|
package/dist/index31.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index31.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index31.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,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AAA,IAAKjC,WAAWA,EAAUe;AAAAA,EAAAA,CAAyB,GACnDiB,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKjC,WAAWA,EAAUgB;AAAAA,EAAAA,GACxBgB,gBAAAA,EAAAC,cAAA,QAAA;AAAA,IAAMjC,WAAW,GAAGA,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/index32.js
CHANGED
|
@@ -1,37 +1,64 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
function l() {
|
|
4
|
-
return l = Object.assign ? Object.assign.bind() : function(e) {
|
|
5
|
-
for (var a = 1; a < arguments.length; a++) {
|
|
6
|
-
var t = arguments[a];
|
|
7
|
-
for (var n in t) ({}).hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
8
|
-
}
|
|
9
|
-
return e;
|
|
10
|
-
}, l.apply(null, arguments);
|
|
11
|
-
}
|
|
12
|
-
function d(e) {
|
|
1
|
+
import a, { useRef as b } from "react";
|
|
2
|
+
function w(e) {
|
|
13
3
|
const {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
4
|
+
label: d,
|
|
5
|
+
value: o,
|
|
6
|
+
checked: r,
|
|
7
|
+
disabled: t,
|
|
8
|
+
name: c,
|
|
9
|
+
onChange: l,
|
|
10
|
+
width: s,
|
|
11
|
+
radioLabelClassName: m = "",
|
|
12
|
+
radioContainerClassName: u = "",
|
|
13
|
+
automationId: x = "",
|
|
14
|
+
bgColor: f = "var(--color-white)",
|
|
15
|
+
withBorder: h = !0,
|
|
16
|
+
content: i
|
|
17
|
+
} = e, n = b(null);
|
|
18
|
+
return /* @__PURE__ */ a.createElement("div", {
|
|
19
|
+
className: `se-design-radio-container flex flex-col justify-center items-start gap-2 ${t ? "cursor-not-allowed" : "cursor-pointer"} ${h ? `border ${r ? "border-[#1088E7]" : "border-[#C9D4E3]"} p-4` : ""} rounded-[6px] transition-colors duration-300 ${t ? "opacity-50" : ""} ${u}`,
|
|
20
|
+
onClick: () => n.current?.click(),
|
|
21
|
+
style: {
|
|
22
|
+
width: s || "auto",
|
|
23
|
+
backgroundColor: f
|
|
24
|
+
},
|
|
25
|
+
"data-automation-id": x
|
|
26
|
+
}, /* @__PURE__ */ a.createElement("div", {
|
|
27
|
+
className: "flex items-center gap-[0.625rem]",
|
|
28
|
+
"data-automation-id": "radio-field-content"
|
|
29
|
+
}, /* @__PURE__ */ a.createElement("input", {
|
|
30
|
+
ref: n,
|
|
31
|
+
type: "radio",
|
|
32
|
+
id: o,
|
|
33
|
+
name: c,
|
|
34
|
+
value: o,
|
|
35
|
+
checked: r,
|
|
36
|
+
disabled: t,
|
|
37
|
+
className: "radio-field-input cursor-pointer accent-[#1088E7] disabled:cursor-not-allowed disabled:opacity-50 text-[var(--color-blue-500)] w-[14px] h-[14px] p-[3px]",
|
|
38
|
+
onChange: () => {
|
|
39
|
+
l && l({
|
|
40
|
+
...e,
|
|
41
|
+
checked: !0
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}), /* @__PURE__ */ a.createElement("label", {
|
|
45
|
+
htmlFor: o,
|
|
46
|
+
className: `${e.helperLabel ? "flex flex-col gap-[6px]" : ""} ${t ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
47
|
+
"data-automation-id": "radio-field-label"
|
|
48
|
+
}, /* @__PURE__ */ a.createElement("span", {
|
|
49
|
+
className: `text-sm text-[var(--color-gray-800)] ${m} `,
|
|
50
|
+
style: {
|
|
51
|
+
fontSize: "16px",
|
|
52
|
+
fontWeight: "400"
|
|
53
|
+
}
|
|
54
|
+
}, d))), r && i && /* @__PURE__ */ a.createElement("div", {
|
|
55
|
+
className: "radio-child-content pl-[1.5rem] w-full"
|
|
56
|
+
}, i()), e.helperLabel && /* @__PURE__ */ a.createElement("span", {
|
|
57
|
+
className: `text-sm font-normal text-[var(--color-gray-600)] ${e.maxWidth ? `max-w-[${e.maxWidth}]` : "max-w-full"} break-words whitespace-normal`,
|
|
58
|
+
"data-automation-id": "radio-field-helper-text"
|
|
59
|
+
}, e.helperLabel));
|
|
33
60
|
}
|
|
34
61
|
export {
|
|
35
|
-
|
|
62
|
+
w as Radio
|
|
36
63
|
};
|
|
37
64
|
//# sourceMappingURL=index32.js.map
|
package/dist/index32.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index32.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index32.js","sources":["../src/components/Radio/index.tsx"],"sourcesContent":["import React, { useRef } from 'react';\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\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 } = props;\n const radioRef = useRef<HTMLInputElement>(null);\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 ${checked ? 'border-[#1088E7]' : 'border-[#C9D4E3]'} p-4` : ''\n } rounded-[6px] transition-colors duration-300 ${disabled ? 'opacity-50' : ''} ${radioContainerClassName}`}\n onClick={() => radioRef.current?.click()}\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={value}\n name={name}\n value={value}\n checked={checked}\n disabled={disabled}\n className=\"radio-field-input cursor-pointer accent-[#1088E7] disabled:cursor-not-allowed disabled:opacity-50 text-[var(--color-blue-500)] w-[14px] h-[14px] p-[3px]\"\n onChange={() => {\n onChange && onChange({ ...props, checked: true });\n }}\n />\n <label\n htmlFor={value}\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 >\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 && <div className=\"radio-child-content pl-[1.5rem] w-full\">{content()}</div>}\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","radioRef","useRef","React","createElement","className","onClick","current","click","style","backgroundColor","ref","type","id","htmlFor","helperLabel","fontSize","fontWeight","maxWidth"],"mappings":";AAoBO,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,qBAA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