se-design 1.0.88 → 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/Tabs/index.d.ts +1 -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 -146
- 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/index45.js
CHANGED
|
@@ -1,150 +1,61 @@
|
|
|
1
|
-
import e, { useState as
|
|
1
|
+
import e, { useState as d, useEffect as h } from "react";
|
|
2
|
+
import { Icon as r } from "./index6.js";
|
|
2
3
|
/* empty css */
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
disabled: t = !1,
|
|
21
|
-
maxLength: a,
|
|
22
|
-
tag: F = "input",
|
|
23
|
-
error: l = !1,
|
|
24
|
-
errorMessage: R,
|
|
25
|
-
label: p,
|
|
26
|
-
placeholder: j,
|
|
27
|
-
suggestions: c = [],
|
|
28
|
-
onSelect: E,
|
|
29
|
-
renderOption: d,
|
|
30
|
-
optionClassName: A,
|
|
31
|
-
automationId: B = "",
|
|
32
|
-
ariaLabel: $,
|
|
33
|
-
ariaLabelledBy: O,
|
|
34
|
-
ariaDescribedBy: V,
|
|
35
|
-
..._
|
|
4
|
+
const t = {
|
|
5
|
+
toastBarCtn: "min-h-[48px] fixed top-0 w-full flex items-center justify-center z-[1020] pr-[44px]",
|
|
6
|
+
success: "var(--color-green-500)",
|
|
7
|
+
error: "var(--color-red-500)",
|
|
8
|
+
info: "var(--color-gray-700)",
|
|
9
|
+
toastMessageCtn: "flex items-center gap-2",
|
|
10
|
+
toastMessage: "text-[var(--color-white)] text-center word-break",
|
|
11
|
+
closeIconCtn: "absolute right-[12px] cursor-pointer hover:bg-white/20 rounded-full p-1 focus-visible:!outline-2 focus-visible:!outline-[var(--color-white)] focus-visible:!outline-offset-2"
|
|
12
|
+
}, x = ({
|
|
13
|
+
toastBarCtnClassName: a = "",
|
|
14
|
+
type: o,
|
|
15
|
+
message: c = "",
|
|
16
|
+
shouldAutoClose: l = !1,
|
|
17
|
+
delay: i = 5e3,
|
|
18
|
+
onClose: n = () => {
|
|
19
|
+
},
|
|
20
|
+
containerStyle: m = {}
|
|
36
21
|
}) => {
|
|
37
|
-
const [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (h(-1), i(n), !d)
|
|
56
|
-
if (n === "")
|
|
57
|
-
b([...c]);
|
|
58
|
-
else {
|
|
59
|
-
const I = c?.filter((m) => typeof m == "object" && m?.label?.toLowerCase().includes(n?.toLowerCase() ?? ""));
|
|
60
|
-
b([...I]);
|
|
61
|
-
}
|
|
62
|
-
}, [i, c, d, h]);
|
|
63
|
-
Y(() => {
|
|
64
|
-
b([...c]);
|
|
65
|
-
}, [c]);
|
|
66
|
-
const T = () => {
|
|
67
|
-
g(!0);
|
|
68
|
-
}, U = () => {
|
|
69
|
-
s.length > 0 && g(!0);
|
|
70
|
-
}, W = () => {
|
|
71
|
-
i(""), h(-1), N.current?.focus();
|
|
72
|
-
}, X = ee({
|
|
73
|
-
ariaLabelledBy: O,
|
|
74
|
-
internalLabelId: p ? y : void 0,
|
|
75
|
-
ariaLabel: $,
|
|
76
|
-
ariaDescribedBy: l ? C : V
|
|
77
|
-
});
|
|
78
|
-
return /* @__PURE__ */ e.createElement("div", u({
|
|
79
|
-
className: "main-container-autocomplete-se-design",
|
|
80
|
-
ref: H,
|
|
81
|
-
"data-automation-id": B
|
|
82
|
-
}, K), p && /* @__PURE__ */ e.createElement("span", {
|
|
83
|
-
id: y,
|
|
84
|
-
className: `label-container ${t ? "label-container-disabled" : ""}`
|
|
85
|
-
}, p), /* @__PURE__ */ e.createElement("div", {
|
|
86
|
-
className: "input-container-wrapper"
|
|
87
|
-
}, /* @__PURE__ */ e.createElement("div", {
|
|
88
|
-
className: "input-wrapper",
|
|
22
|
+
const [u, f] = d(!0);
|
|
23
|
+
h(() => {
|
|
24
|
+
if (l) {
|
|
25
|
+
const v = setTimeout(() => {
|
|
26
|
+
s();
|
|
27
|
+
}, i);
|
|
28
|
+
return () => clearTimeout(v);
|
|
29
|
+
}
|
|
30
|
+
}, []);
|
|
31
|
+
const s = () => {
|
|
32
|
+
setTimeout(() => {
|
|
33
|
+
f(!1), setTimeout(() => {
|
|
34
|
+
n?.();
|
|
35
|
+
}, 300);
|
|
36
|
+
}, 300);
|
|
37
|
+
};
|
|
38
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
39
|
+
className: `se-design-toast-bar ${a} ${t.toastBarCtn} ${u ? "show" : "hide"}`,
|
|
89
40
|
style: {
|
|
90
|
-
|
|
41
|
+
background: t[o],
|
|
42
|
+
...m
|
|
91
43
|
}
|
|
92
|
-
}, /* @__PURE__ */ e.createElement(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
disabled: t,
|
|
101
|
-
className: `${l ? "input-container-error" : "input-container-default"} ${t ? "input-container-disabled" : ""} ${s.length > 0 || o ? "with-icon" : ""} ${s.length > 0 && o ? "with-icons" : ""}`,
|
|
102
|
-
maxLength: a,
|
|
103
|
-
placeholder: j,
|
|
104
|
-
"aria-invalid": l || void 0,
|
|
105
|
-
...X,
|
|
106
|
-
..._
|
|
107
|
-
}), o && /* @__PURE__ */ e.createElement(x, {
|
|
44
|
+
}, /* @__PURE__ */ e.createElement("div", {
|
|
45
|
+
className: t.toastMessageCtn
|
|
46
|
+
}, /* @__PURE__ */ e.createElement(r, {
|
|
47
|
+
name: o === "info" ? "info" : o === "error" ? "stop" : "checked-circle",
|
|
48
|
+
stroke: "var(--color-white)"
|
|
49
|
+
}), /* @__PURE__ */ e.createElement("span", {
|
|
50
|
+
className: t.toastMessage
|
|
51
|
+
}, c)), /* @__PURE__ */ e.createElement(r, {
|
|
108
52
|
name: "close",
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
onClick:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}), s.length > 0 && /* @__PURE__ */ e.createElement(x, {
|
|
115
|
-
name: "chevron",
|
|
116
|
-
rotation: v ? "180" : "0",
|
|
117
|
-
className: "input-icon-chevron",
|
|
118
|
-
stroke: t ? "var(--color-gray-600)" : "",
|
|
119
|
-
"aria-hidden": "true"
|
|
120
|
-
})), v && s.length > 0 && /* @__PURE__ */ e.createElement("div", u({}, q, {
|
|
121
|
-
"aria-label": p || $ || "Suggestions",
|
|
122
|
-
className: "suggestions-list",
|
|
123
|
-
"data-automation-id": "autocomplete-suggestions-list"
|
|
124
|
-
}), s.map((r, n) => {
|
|
125
|
-
const I = G(n, !1), m = J === n;
|
|
126
|
-
return /* @__PURE__ */ e.createElement("div", u({
|
|
127
|
-
key: n
|
|
128
|
-
}, I, {
|
|
129
|
-
className: `${A || "suggestion-item"} ${m ? `suggestion-item-highlighted${L ? " suggestion-item-keyboard-highlight" : ""}` : ""}`,
|
|
130
|
-
onClick: () => w(r),
|
|
131
|
-
onMouseEnter: () => h(n),
|
|
132
|
-
"data-automation-id": `autocomplete-suggestion-item-${n}`
|
|
133
|
-
}), d ? d(r, {
|
|
134
|
-
isHighlighted: m,
|
|
135
|
-
index: n
|
|
136
|
-
}) : r.label);
|
|
137
|
-
}))), (l || a) && /* @__PURE__ */ e.createElement("div", {
|
|
138
|
-
className: `${l ? "error-and-max-word" : "max-word-container"} ${t ? "disabled" : ""}`
|
|
139
|
-
}, l && /* @__PURE__ */ e.createElement("div", {
|
|
140
|
-
id: C,
|
|
141
|
-
className: "error-message",
|
|
142
|
-
role: "alert"
|
|
143
|
-
}, R), a && /* @__PURE__ */ e.createElement("div", {
|
|
144
|
-
className: "max-word"
|
|
145
|
-
}, o.length, "/", a)));
|
|
146
|
-
});
|
|
53
|
+
stroke: "var(--color-white)",
|
|
54
|
+
className: t.closeIconCtn,
|
|
55
|
+
onClick: s
|
|
56
|
+
}));
|
|
57
|
+
};
|
|
147
58
|
export {
|
|
148
|
-
|
|
59
|
+
x as ToastBar
|
|
149
60
|
};
|
|
150
61
|
//# sourceMappingURL=index45.js.map
|
package/dist/index45.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index45.js","sources":["../src/components/AutoCompleteInput/index.tsx"],"sourcesContent":["import React, { useEffect, useRef, useCallback, useState } from 'react';\nimport './style.scss';\nimport { Icon } from '../Icon';\nimport { useStableId } from '../../utils/useStableId';\nimport { getA11yNameAttributes, useCombobox } from '../../utils/a11y';\n\nexport interface AutoCompleteInputProps {\n value: string;\n disabled?: boolean;\n maxLength?: number;\n /** Called when the user types in the input. Not called on suggestion selection. */\n onChange: (value: string) => void;\n tag?: string;\n error?: boolean;\n errorMessage?: string;\n label?: string;\n placeholder?: string;\n /**\n * Suggestion items. Default rendering expects { label, value } shape.\n * When renderOption is provided, any shape is accepted.\n */\n suggestions?: any[];\n /**\n * Called when a suggestion is selected (click or Enter key).\n * Receives the full item object from the suggestions array.\n */\n onSelect?: (item: any) => void;\n /**\n * Render custom content for each suggestion option. The component handles the option wrapper\n * (ARIA props, highlight, click, keyboard navigation). You only provide the inner content.\n */\n renderOption?: (suggestion: any, context: { isHighlighted: boolean; index: number }) => React.ReactNode;\n /**\n * Custom CSS class for option elements. Replaces the default 'suggestion-item' class.\n * Useful with renderOption to apply custom styling to option wrappers.\n */\n optionClassName?: string;\n automationId?: string;\n /**\n * Accessible label for the input. Used when no visible label is provided.\n */\n ariaLabel?: string;\n /**\n * ID(s) of element(s) that label this input. Takes precedence over ariaLabel.\n */\n ariaLabelledBy?: string;\n /**\n * ID(s) of element(s) providing additional description.\n */\n ariaDescribedBy?: string;\n}\n\nexport const AutoCompleteInput: React.FC<AutoCompleteInputProps> = React.memo(\n ({\n value,\n onChange,\n disabled = false,\n maxLength,\n tag = 'input',\n error = false,\n errorMessage,\n label,\n placeholder,\n suggestions = [],\n onSelect,\n renderOption,\n optionClassName,\n automationId = '',\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n ...props\n }) => {\n const [filteredSuggestions, setFilteredSuggestions] = useState<any[]>([...suggestions]);\n const [isSuggestionBoxVisible, setSuggestionBoxVisible] = useState<boolean>(false);\n const containerRef = useRef<HTMLDivElement>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n\n // Generate stable unique IDs per instance so label, input, listbox, and error never share IDs (HTML/ARIA require unique ids).\n const instanceId = useStableId(undefined, 'autocomplete');\n const inputId = `${instanceId}-input`;\n const listboxId = `${instanceId}-listbox`;\n const labelId = `${instanceId}-label`;\n const errorId = `${instanceId}-error`;\n\n const handleSelectSuggestion = useCallback(\n (item: any) => {\n setSuggestionBoxVisible(false);\n onSelect?.(item);\n },\n [onSelect]\n );\n\n // Use the comprehensive useCombobox hook\n const {\n containerProps,\n inputProps: comboboxInputProps,\n listboxProps,\n getOptionProps,\n highlightedIndex,\n setHighlightedIndex,\n isKeyboardFocused\n } = useCombobox<any>({\n items: filteredSuggestions,\n isOpen: isSuggestionBoxVisible,\n onOpenChange: setSuggestionBoxVisible,\n onSelect: handleSelectSuggestion,\n listboxId\n });\n\n const handleInputChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const inputValue = e.target.value;\n setHighlightedIndex(-1); // Reset highlight on input change\n onChange(inputValue);\n\n // Internal filtering for default rendering (when no renderOption, component manages filtering)\n if (!renderOption) {\n if (inputValue === '') {\n setFilteredSuggestions([...suggestions]);\n } else {\n const filtered = suggestions?.filter(\n (suggestion) =>\n typeof suggestion === 'object' &&\n suggestion?.label?.toLowerCase().includes(inputValue?.toLowerCase() ?? '')\n );\n setFilteredSuggestions([...filtered]);\n }\n }\n },\n [onChange, suggestions, renderOption, setHighlightedIndex]\n );\n\n useEffect(() => {\n setFilteredSuggestions([...suggestions]);\n }, [suggestions]);\n\n const handleInputClick = () => {\n setSuggestionBoxVisible(true);\n };\n\n const handleInputFocus = () => {\n if (filteredSuggestions.length > 0) {\n setSuggestionBoxVisible(true);\n }\n };\n\n const handleClearInput = () => {\n onChange('');\n setHighlightedIndex(-1);\n inputRef.current?.focus();\n };\n\n // Build ARIA name attributes: when ariaLabel is provided use it (e.g. \"Signer 1 name\"); otherwise use visible label or ariaLabelledBy\n const a11yNameProps = getA11yNameAttributes({\n ariaLabelledBy,\n internalLabelId: label ? labelId : undefined,\n ariaLabel,\n ariaDescribedBy: error ? errorId : ariaDescribedBy\n });\n\n return (\n <div \n className=\"main-container-autocomplete-se-design\" \n ref={containerRef} \n data-automation-id={automationId}\n {...containerProps}\n >\n {label && (\n <span\n id={labelId}\n className={`label-container ${disabled ? 'label-container-disabled' : ''}`}\n >\n {label}\n </span>\n )}\n <div className=\"input-container-wrapper\">\n <div className=\"input-wrapper\" style={{ pointerEvents: disabled ? 'none' : 'auto' }}>\n {React.createElement(tag, {\n ref: inputRef,\n id: inputId,\n value: value,\n onChange: handleInputChange,\n onClick: handleInputClick,\n onFocus: handleInputFocus,\n ...comboboxInputProps,\n disabled,\n className: `${error ? 'input-container-error' : 'input-container-default'} ${disabled ? 'input-container-disabled' : ''} ${filteredSuggestions.length > 0 || value ? 'with-icon' : ''} ${filteredSuggestions.length > 0 && value ? 'with-icons' : ''}`,\n maxLength,\n placeholder,\n 'aria-invalid': error || undefined,\n ...a11yNameProps,\n ...props\n })}\n {value && (\n <Icon\n name=\"close\"\n className=\"input-icon-close\"\n size={15}\n onClick={handleClearInput}\n stroke={disabled ? 'var(--color-gray-600)' : ''}\n ariaLabel=\"Clear input\"\n />\n )}\n {filteredSuggestions.length > 0 && (\n <Icon\n name=\"chevron\"\n rotation={isSuggestionBoxVisible ? '180' : '0'}\n className=\"input-icon-chevron\"\n stroke={disabled ? 'var(--color-gray-600)' : ''}\n aria-hidden=\"true\"\n />\n )}\n </div>\n {isSuggestionBoxVisible && filteredSuggestions.length > 0 && (\n <div\n {...listboxProps}\n aria-label={label || ariaLabel || 'Suggestions'}\n className=\"suggestions-list\"\n data-automation-id=\"autocomplete-suggestions-list\"\n >\n {filteredSuggestions.map((suggestion, index) => {\n const optionProps = getOptionProps(index, false);\n const isHighlighted = highlightedIndex === index;\n return (\n <div\n key={index}\n {...optionProps}\n className={`${optionClassName || 'suggestion-item'} ${isHighlighted ? `suggestion-item-highlighted${isKeyboardFocused ? ' suggestion-item-keyboard-highlight' : ''}` : ''}`}\n onClick={() => handleSelectSuggestion(suggestion)}\n onMouseEnter={() => setHighlightedIndex(index)}\n data-automation-id={`autocomplete-suggestion-item-${index}`}\n >\n {renderOption\n ? renderOption(suggestion, { isHighlighted, index })\n : suggestion.label}\n </div>\n );\n })}\n </div>\n )}\n </div>\n {(error || maxLength) && (\n <div className={`${error ? 'error-and-max-word' : 'max-word-container'} ${disabled ? 'disabled' : ''}`}>\n {error && (\n <div id={errorId} className=\"error-message\" role=\"alert\">\n {errorMessage}\n </div>\n )}\n {maxLength && (\n <div className=\"max-word\">\n {value.length}/{maxLength}\n </div>\n )}\n </div>\n )}\n </div>\n );\n }\n);\n"],"names":["AutoCompleteInput","React","memo","value","onChange","disabled","maxLength","tag","error","errorMessage","label","placeholder","suggestions","onSelect","renderOption","optionClassName","automationId","ariaLabel","ariaLabelledBy","ariaDescribedBy","props","filteredSuggestions","setFilteredSuggestions","useState","isSuggestionBoxVisible","setSuggestionBoxVisible","containerRef","useRef","inputRef","instanceId","useStableId","undefined","inputId","listboxId","labelId","errorId","handleSelectSuggestion","useCallback","item","containerProps","inputProps","comboboxInputProps","listboxProps","getOptionProps","highlightedIndex","setHighlightedIndex","isKeyboardFocused","useCombobox","items","isOpen","onOpenChange","handleInputChange","e","inputValue","target","filtered","filter","suggestion","toLowerCase","includes","useEffect","handleInputClick","handleInputFocus","length","handleClearInput","current","focus","a11yNameProps","getA11yNameAttributes","internalLabelId","createElement","_extends","className","ref","id","style","pointerEvents","onClick","onFocus","Icon","name","size","stroke","rotation","map","index","optionProps","isHighlighted","key","onMouseEnter","role"],"mappings":";;;;;;;;;;;;;;;;AAoDO,MAAMA,KAAsDC,gBAAAA,EAAMC,KACvE,CAAC;AAAA,EACCC,OAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,UAAAA,IAAW;AAAA,EACXC,WAAAA;AAAAA,EACAC,KAAAA,IA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DnD,EAAoB+D,IAAI,CAAC3B,GAAY4B,MAAU;AAC9C,UAAMC,IAAc3C,EAAe0C,GAAO,EAAK,GACzCE,IAAgB3C,MAAqByC;AAC3C,WACEpF,gBAAAA,EAAAqE,cAAA,OAAAC,EAAA;AAAA,MACEiB,KAAKH;AAAAA,IAAAA,GACDC,GAAW;AAAA,MACfd,WAAW,GAAGzD,KAAmB,iBAAiB,IAAIwE,IAAgB,8BAA8BzC,IAAoB,wCAAwC,EAAE,KAAK,EAAE;AAAA,MACzK+B,SAASA,MAAMzC,EAAuBqB,CAAU;AAAA,MAChDgC,cAAcA,MAAM5C,EAAoBwC,CAAK;AAAA,MAC7C,sBAAoB,gCAAgCA,CAAK;AAAA,IAAA,CAAG,GAE3DvE,IACGA,EAAa2C,GAAY;AAAA,MAAE8B,eAAAA;AAAAA,MAAeF,OAAAA;AAAAA,IAAAA,CAAO,IACjD5B,EAAW/C,KACZ;AAAA,EAET,CAAC,CACE,CAEJ,IACHF,KAASF,MACTL,gBAAAA,EAAAqE,cAAA,OAAA;AAAA,IAAKE,WAAW,GAAGhE,IAAQ,uBAAuB,oBAAoB,IAAIH,IAAW,aAAa,EAAE;AAAA,EAAA,GACjGG,KACCP,gBAAAA,EAAAqE,cAAA,OAAA;AAAA,IAAKI,IAAIvC;AAAAA,IAASqC,WAAU;AAAA,IAAgBkB,MAAK;AAAA,EAAA,GAC9CjF,CACE,GAENH,KACCL,gBAAAA,EAAAqE,cAAA,OAAA;AAAA,IAAKE,WAAU;AAAA,EAAA,GACZrE,EAAM4D,QAAO,KAAEzD,CACb,CAEJ,CAEJ;AAET,CACF;"}
|
|
1
|
+
{"version":3,"file":"index45.js","sources":["../src/components/ToastBar/index.tsx"],"sourcesContent":["import React, { FC, useEffect, useState } from \"react\";\nimport { Map } from \"../../utils/common.types\";\nimport { Icon } from \"../Icon\";\nimport \"./style.scss\";\n\nexport interface ToastBarProps {\n toastBarCtnClassName?: string;\n type: \"success\" | \"error\" | \"info\";\n message: string;\n shouldAutoClose?: boolean;\n delay?: number;\n onClose?: () => void;\n containerStyle?: React.CSSProperties;\n}\n\nconst classNames: Map = {\n toastBarCtn: \"min-h-[48px] fixed top-0 w-full flex items-center justify-center z-[1020] pr-[44px]\",\n success: \"var(--color-green-500)\",\n error: \"var(--color-red-500)\",\n info: \"var(--color-gray-700)\",\n toastMessageCtn: \"flex items-center gap-2\",\n toastMessage: \"text-[var(--color-white)] text-center word-break\",\n closeIconCtn: \"absolute right-[12px] cursor-pointer hover:bg-white/20 rounded-full p-1 focus-visible:!outline-2 focus-visible:!outline-[var(--color-white)] focus-visible:!outline-offset-2\",\n};\n\nexport const ToastBar: FC<ToastBarProps> = ({\n toastBarCtnClassName = \"\",\n type,\n message = \"\",\n shouldAutoClose = false,\n delay = 5000,\n onClose = () => {},\n containerStyle = {}\n}) => {\n const [visible, setVisible] = useState(true);\n\n useEffect(() => {\n if (shouldAutoClose) {\n const timer = setTimeout(() => {\n handleClose();\n }, delay);\n return () => clearTimeout(timer);\n }\n }, []);\n\n const handleClose = () => {\n setTimeout(() => {\n setVisible(false);\n setTimeout(() => {\n onClose?.();\n }, 300);\n }, 300);\n };\n\n return (\n <div\n className={`se-design-toast-bar ${toastBarCtnClassName} ${classNames.toastBarCtn} ${visible ? \"show\" : \"hide\"}`}\n style={{ background: classNames[type], ...containerStyle }}\n >\n <div className={classNames.toastMessageCtn} >\n <Icon name={type === \"info\" ? \"info\" : type === \"error\" ? \"stop\" : \"checked-circle\"} stroke={'var(--color-white)'} />\n <span className={classNames.toastMessage}>{message}</span>\n </div>\n <Icon name=\"close\" stroke={'var(--color-white)'} className={classNames.closeIconCtn} onClick={handleClose} />\n </div>\n );\n};"],"names":["React__default","useState","useEffect","Icon","classNames","toastBarCtn","success","error","info","toastMessageCtn","toastMessage","closeIconCtn","ToastBar","toastBarCtnClassName","type","message","shouldAutoClose","delay","onClose","containerStyle","visible","setVisible","timer","setTimeout","handleClose","clearTimeout","React","createElement","className","style","background","name","stroke","onClick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A,EAAAC,cAACxB,GAAI;AAAA,IAAC4B,MAAMjB,MAAS,SAAS,SAASA,MAAS,UAAU,SAAS;AAAA,IAAkBkB,QAAQ;AAAA,EAAA,CAAuB,GACpHN,gBAAAA,EAAAC,cAAA,QAAA;AAAA,IAAMC,WAAWxB,EAAWM;AAAAA,EAAAA,GAAeK,CAAc,CACtD,GACLW,gBAAAA,EAAAC,cAACxB,GAAI;AAAA,IAAC4B,MAAK;AAAA,IAAQC,QAAQ;AAAA,IAAsBJ,WAAWxB,EAAWO;AAAAA,IAAcsB,SAAST;AAAAA,EAAAA,CAAc,CACzG;AAET;"}
|
package/dist/index46.js
CHANGED
|
@@ -1,201 +1,150 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e, { useState as k, useRef as S, useCallback as P, useEffect as Y } from "react";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import "./
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
for (var u in r) ({}).hasOwnProperty.call(r, u) && (i[u] = r[u]);
|
|
3
|
+
import { Icon as x } from "./index6.js";
|
|
4
|
+
import { useStableId as Z } from "./index207.js";
|
|
5
|
+
import { getA11yNameAttributes as ee } from "./index82.js";
|
|
6
|
+
import "./index73.js";
|
|
7
|
+
import { useCombobox as te } from "./index69.js";
|
|
8
|
+
function u() {
|
|
9
|
+
return u = Object.assign ? Object.assign.bind() : function(o) {
|
|
10
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
11
|
+
var t = arguments[i];
|
|
12
|
+
for (var a in t) ({}).hasOwnProperty.call(t, a) && (o[a] = t[a]);
|
|
14
13
|
}
|
|
15
|
-
return
|
|
16
|
-
},
|
|
14
|
+
return o;
|
|
15
|
+
}, u.apply(null, arguments);
|
|
17
16
|
}
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
const ce = /* @__PURE__ */ e.memo(({
|
|
18
|
+
value: o,
|
|
19
|
+
onChange: i,
|
|
20
|
+
disabled: t = !1,
|
|
21
|
+
maxLength: a,
|
|
22
|
+
tag: F = "input",
|
|
23
|
+
error: l = !1,
|
|
24
|
+
errorMessage: R,
|
|
25
|
+
label: p,
|
|
26
|
+
placeholder: j,
|
|
27
|
+
suggestions: c = [],
|
|
28
|
+
onSelect: E,
|
|
29
|
+
renderOption: d,
|
|
30
|
+
optionClassName: A,
|
|
31
|
+
automationId: B = "",
|
|
32
|
+
ariaLabel: $,
|
|
33
|
+
ariaLabelledBy: O,
|
|
34
|
+
ariaDescribedBy: V,
|
|
35
|
+
..._
|
|
32
36
|
}) => {
|
|
33
|
-
const [
|
|
34
|
-
|
|
35
|
-
}, []),
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}, D = f(n);
|
|
58
|
-
P(() => {
|
|
59
|
-
let e = null;
|
|
60
|
-
return D.current && !n && m.current && (e = requestAnimationFrame(() => {
|
|
61
|
-
F.current?.focus();
|
|
62
|
-
})), D.current && !n && (m.current = !1), D.current = n, () => {
|
|
63
|
-
e !== null && cancelAnimationFrame(e);
|
|
64
|
-
};
|
|
65
|
-
}, [n]), P(() => {
|
|
66
|
-
d && (A(d.countryCode), R(d.number));
|
|
67
|
-
}, [d]), P(() => {
|
|
68
|
-
let e = null;
|
|
69
|
-
return n && (e = requestAnimationFrame(() => {
|
|
70
|
-
O.current?.focus();
|
|
71
|
-
})), () => {
|
|
72
|
-
e !== null && cancelAnimationFrame(e);
|
|
73
|
-
};
|
|
74
|
-
}, [n]);
|
|
75
|
-
const re = (e) => {
|
|
76
|
-
const o = e.replace(/\D/g, "");
|
|
77
|
-
R(o), l(o);
|
|
78
|
-
}, S = g(() => {
|
|
79
|
-
a || y((e) => !e);
|
|
80
|
-
}, [a]), ae = g((e) => {
|
|
81
|
-
if (!a)
|
|
82
|
-
switch (e.key) {
|
|
83
|
-
case "Enter":
|
|
84
|
-
case " ":
|
|
85
|
-
e.preventDefault(), S();
|
|
86
|
-
break;
|
|
87
|
-
case "ArrowDown":
|
|
88
|
-
e.preventDefault(), n || y(!0);
|
|
89
|
-
break;
|
|
37
|
+
const [s, b] = k([...c]), [v, g] = k(!1), H = S(null), N = S(null), f = Z(void 0, "autocomplete"), z = `${f}-input`, D = `${f}-listbox`, y = `${f}-label`, C = `${f}-error`, w = P((r) => {
|
|
38
|
+
g(!1), E?.(r);
|
|
39
|
+
}, [E]), {
|
|
40
|
+
containerProps: K,
|
|
41
|
+
inputProps: M,
|
|
42
|
+
listboxProps: q,
|
|
43
|
+
getOptionProps: G,
|
|
44
|
+
highlightedIndex: J,
|
|
45
|
+
setHighlightedIndex: h,
|
|
46
|
+
isKeyboardFocused: L
|
|
47
|
+
} = te({
|
|
48
|
+
items: s,
|
|
49
|
+
isOpen: v,
|
|
50
|
+
onOpenChange: g,
|
|
51
|
+
onSelect: w,
|
|
52
|
+
listboxId: D
|
|
53
|
+
}), Q = P((r) => {
|
|
54
|
+
const n = r.target.value;
|
|
55
|
+
if (h(-1), i(n), !d)
|
|
56
|
+
if (n === "")
|
|
57
|
+
b([...c]);
|
|
58
|
+
else {
|
|
59
|
+
const I = c?.filter((m) => typeof m == "object" && m?.label?.toLowerCase().includes(n?.toLowerCase() ?? ""));
|
|
60
|
+
b([...I]);
|
|
90
61
|
}
|
|
91
|
-
}, [
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
62
|
+
}, [i, c, d, h]);
|
|
63
|
+
Y(() => {
|
|
64
|
+
b([...c]);
|
|
65
|
+
}, [c]);
|
|
66
|
+
const T = () => {
|
|
67
|
+
g(!0);
|
|
68
|
+
}, U = () => {
|
|
69
|
+
s.length > 0 && g(!0);
|
|
70
|
+
}, W = () => {
|
|
71
|
+
i(""), h(-1), N.current?.focus();
|
|
72
|
+
}, X = ee({
|
|
73
|
+
ariaLabelledBy: O,
|
|
74
|
+
internalLabelId: p ? y : void 0,
|
|
75
|
+
ariaLabel: $,
|
|
76
|
+
ariaDescribedBy: l ? C : V
|
|
77
|
+
});
|
|
78
|
+
return /* @__PURE__ */ e.createElement("div", u({
|
|
79
|
+
className: "main-container-autocomplete-se-design",
|
|
80
|
+
ref: H,
|
|
81
|
+
"data-automation-id": B
|
|
82
|
+
}, K), p && /* @__PURE__ */ e.createElement("span", {
|
|
83
|
+
id: y,
|
|
84
|
+
className: `label-container ${t ? "label-container-disabled" : ""}`
|
|
85
|
+
}, p), /* @__PURE__ */ e.createElement("div", {
|
|
86
|
+
className: "input-container-wrapper"
|
|
87
|
+
}, /* @__PURE__ */ e.createElement("div", {
|
|
88
|
+
className: "input-wrapper",
|
|
89
|
+
style: {
|
|
90
|
+
pointerEvents: t ? "none" : "auto"
|
|
106
91
|
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
className: "
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
"
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}, /* @__PURE__ */
|
|
130
|
-
src: `https://flagcdn.com/${E?.code.toLowerCase()}.svg`,
|
|
131
|
-
alt: "",
|
|
132
|
-
"aria-hidden": "true",
|
|
133
|
-
width: "16"
|
|
134
|
-
}), /* @__PURE__ */ t.createElement("span", null, E?.dial_code), /* @__PURE__ */ t.createElement(H, {
|
|
92
|
+
}, /* @__PURE__ */ e.createElement(F, {
|
|
93
|
+
ref: N,
|
|
94
|
+
id: z,
|
|
95
|
+
value: o,
|
|
96
|
+
onChange: Q,
|
|
97
|
+
onClick: T,
|
|
98
|
+
onFocus: U,
|
|
99
|
+
...M,
|
|
100
|
+
disabled: t,
|
|
101
|
+
className: `${l ? "input-container-error" : "input-container-default"} ${t ? "input-container-disabled" : ""} ${s.length > 0 || o ? "with-icon" : ""} ${s.length > 0 && o ? "with-icons" : ""}`,
|
|
102
|
+
maxLength: a,
|
|
103
|
+
placeholder: j,
|
|
104
|
+
"aria-invalid": l || void 0,
|
|
105
|
+
...X,
|
|
106
|
+
..._
|
|
107
|
+
}), o && /* @__PURE__ */ e.createElement(x, {
|
|
108
|
+
name: "close",
|
|
109
|
+
className: "input-icon-close",
|
|
110
|
+
size: 15,
|
|
111
|
+
onClick: W,
|
|
112
|
+
stroke: t ? "var(--color-gray-600)" : "",
|
|
113
|
+
ariaLabel: "Clear input"
|
|
114
|
+
}), s.length > 0 && /* @__PURE__ */ e.createElement(x, {
|
|
135
115
|
name: "chevron",
|
|
136
|
-
|
|
116
|
+
rotation: v ? "180" : "0",
|
|
117
|
+
className: "input-icon-chevron",
|
|
118
|
+
stroke: t ? "var(--color-gray-600)" : "",
|
|
137
119
|
"aria-hidden": "true"
|
|
138
|
-
})), /* @__PURE__ */
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
"
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
}, /* @__PURE__ */ t.createElement(H, {
|
|
160
|
-
name: "search",
|
|
161
|
-
className: "search-icon",
|
|
162
|
-
"aria-hidden": "true"
|
|
163
|
-
}), /* @__PURE__ */ t.createElement("input", c({
|
|
164
|
-
ref: O
|
|
165
|
-
}, Z, {
|
|
166
|
-
type: "text",
|
|
167
|
-
placeholder: "Search countries",
|
|
168
|
-
className: "phone-input-container-se-design-country-code-list-item-input",
|
|
169
|
-
onChange: oe,
|
|
170
|
-
value: Q,
|
|
171
|
-
"aria-label": "Search countries",
|
|
172
|
-
"data-automation-id": "country-code-search-input"
|
|
173
|
-
}))), w.length > 0 ? w.map((e, o) => {
|
|
174
|
-
const _ = te(o, e.dial_code === v);
|
|
175
|
-
return /* @__PURE__ */ t.createElement("div", c({
|
|
176
|
-
key: e.code
|
|
177
|
-
}, _, {
|
|
178
|
-
className: `phone-input-container-se-design-country-code-list-item ${ne === o ? "highlighted" : ""} ${e.dial_code === v ? "selected" : ""}`,
|
|
179
|
-
onClick: () => {
|
|
180
|
-
m.current = !0, I(e.dial_code);
|
|
181
|
-
},
|
|
182
|
-
onMouseEnter: () => q(o)
|
|
183
|
-
}), /* @__PURE__ */ t.createElement("img", {
|
|
184
|
-
src: `https://flagcdn.com/${e.code.toLowerCase()}.svg`,
|
|
185
|
-
alt: "",
|
|
186
|
-
"aria-hidden": "true",
|
|
187
|
-
width: "16"
|
|
188
|
-
}), /* @__PURE__ */ t.createElement("span", null, e.name), /* @__PURE__ */ t.createElement("span", null, "(", e.dial_code, ")"));
|
|
189
|
-
}) : /* @__PURE__ */ t.createElement("div", {
|
|
190
|
-
className: "phone-input-container-se-design-country-code-list-item-no-results",
|
|
191
|
-
role: "status"
|
|
192
|
-
}, "No results found"))), r && /* @__PURE__ */ t.createElement("div", {
|
|
193
|
-
id: K,
|
|
120
|
+
})), v && s.length > 0 && /* @__PURE__ */ e.createElement("div", u({}, q, {
|
|
121
|
+
"aria-label": p || $ || "Suggestions",
|
|
122
|
+
className: "suggestions-list",
|
|
123
|
+
"data-automation-id": "autocomplete-suggestions-list"
|
|
124
|
+
}), s.map((r, n) => {
|
|
125
|
+
const I = G(n, !1), m = J === n;
|
|
126
|
+
return /* @__PURE__ */ e.createElement("div", u({
|
|
127
|
+
key: n
|
|
128
|
+
}, I, {
|
|
129
|
+
className: `${A || "suggestion-item"} ${m ? `suggestion-item-highlighted${L ? " suggestion-item-keyboard-highlight" : ""}` : ""}`,
|
|
130
|
+
onClick: () => w(r),
|
|
131
|
+
onMouseEnter: () => h(n),
|
|
132
|
+
"data-automation-id": `autocomplete-suggestion-item-${n}`
|
|
133
|
+
}), d ? d(r, {
|
|
134
|
+
isHighlighted: m,
|
|
135
|
+
index: n
|
|
136
|
+
}) : r.label);
|
|
137
|
+
}))), (l || a) && /* @__PURE__ */ e.createElement("div", {
|
|
138
|
+
className: `${l ? "error-and-max-word" : "max-word-container"} ${t ? "disabled" : ""}`
|
|
139
|
+
}, l && /* @__PURE__ */ e.createElement("div", {
|
|
140
|
+
id: C,
|
|
194
141
|
className: "error-message",
|
|
195
142
|
role: "alert"
|
|
196
|
-
},
|
|
197
|
-
|
|
143
|
+
}, R), a && /* @__PURE__ */ e.createElement("div", {
|
|
144
|
+
className: "max-word"
|
|
145
|
+
}, o.length, "/", a)));
|
|
146
|
+
});
|
|
198
147
|
export {
|
|
199
|
-
|
|
148
|
+
ce as AutoCompleteInput
|
|
200
149
|
};
|
|
201
150
|
//# sourceMappingURL=index46.js.map
|