@axtec/components 0.1.8 → 0.1.10

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.
Files changed (157) hide show
  1. package/README.md +1 -0
  2. package/dist/components/AgentChat/AgentChat.d.ts +32 -0
  3. package/dist/components/AgentChat/index.d.ts +1 -0
  4. package/dist/components/AgentPanel/AgentPanel.d.ts +44 -0
  5. package/dist/components/AgentPanel/index.d.ts +1 -0
  6. package/dist/components/index.d.ts +2 -0
  7. package/dist/index.css +1 -1
  8. package/dist/index.js +161 -157
  9. package/dist/index.js.map +1 -1
  10. package/dist/index10.js +77 -99
  11. package/dist/index10.js.map +1 -1
  12. package/dist/index11.js +91 -36
  13. package/dist/index11.js.map +1 -1
  14. package/dist/index12.js +97 -75
  15. package/dist/index12.js.map +1 -1
  16. package/dist/index13.js +38 -24
  17. package/dist/index13.js.map +1 -1
  18. package/dist/index14.js +76 -16
  19. package/dist/index14.js.map +1 -1
  20. package/dist/index15.js +24 -38
  21. package/dist/index15.js.map +1 -1
  22. package/dist/index16.js +18 -72
  23. package/dist/index16.js.map +1 -1
  24. package/dist/index17.js +36 -47
  25. package/dist/index17.js.map +1 -1
  26. package/dist/index18.js +73 -13
  27. package/dist/index18.js.map +1 -1
  28. package/dist/index19.js +47 -151
  29. package/dist/index19.js.map +1 -1
  30. package/dist/index20.js +12 -17
  31. package/dist/index20.js.map +1 -1
  32. package/dist/index21.js +148 -40
  33. package/dist/index21.js.map +1 -1
  34. package/dist/index22.js +18 -50
  35. package/dist/index22.js.map +1 -1
  36. package/dist/index23.js +41 -74
  37. package/dist/index23.js.map +1 -1
  38. package/dist/index24.js +46 -216
  39. package/dist/index24.js.map +1 -1
  40. package/dist/index25.js +73 -46
  41. package/dist/index25.js.map +1 -1
  42. package/dist/index26.js +212 -70
  43. package/dist/index26.js.map +1 -1
  44. package/dist/index27.js +51 -23
  45. package/dist/index27.js.map +1 -1
  46. package/dist/index28.js +74 -74
  47. package/dist/index28.js.map +1 -1
  48. package/dist/index29.js +19 -28
  49. package/dist/index29.js.map +1 -1
  50. package/dist/index3.js +2 -2
  51. package/dist/index30.js +62 -76
  52. package/dist/index30.js.map +1 -1
  53. package/dist/index31.js +28 -55
  54. package/dist/index31.js.map +1 -1
  55. package/dist/index32.js +87 -40
  56. package/dist/index32.js.map +1 -1
  57. package/dist/index33.js +57 -45
  58. package/dist/index33.js.map +1 -1
  59. package/dist/index34.js +40 -47
  60. package/dist/index34.js.map +1 -1
  61. package/dist/index35.js +47 -27
  62. package/dist/index35.js.map +1 -1
  63. package/dist/index36.js +52 -54
  64. package/dist/index36.js.map +1 -1
  65. package/dist/index37.js +28 -49
  66. package/dist/index37.js.map +1 -1
  67. package/dist/index38.js +54 -13
  68. package/dist/index38.js.map +1 -1
  69. package/dist/index39.js +46 -79
  70. package/dist/index39.js.map +1 -1
  71. package/dist/index40.js +13 -49
  72. package/dist/index40.js.map +1 -1
  73. package/dist/index41.js +80 -17
  74. package/dist/index41.js.map +1 -1
  75. package/dist/index42.js +48 -33
  76. package/dist/index42.js.map +1 -1
  77. package/dist/index43.js +18 -17
  78. package/dist/index43.js.map +1 -1
  79. package/dist/index44.js +34 -15
  80. package/dist/index44.js.map +1 -1
  81. package/dist/index45.js +16 -89
  82. package/dist/index45.js.map +1 -1
  83. package/dist/index46.js +15 -69
  84. package/dist/index46.js.map +1 -1
  85. package/dist/index47.js +85 -116
  86. package/dist/index47.js.map +1 -1
  87. package/dist/index48.js +69 -40
  88. package/dist/index48.js.map +1 -1
  89. package/dist/index49.js +120 -42
  90. package/dist/index49.js.map +1 -1
  91. package/dist/index5.js +1 -1
  92. package/dist/index50.js +39 -55
  93. package/dist/index50.js.map +1 -1
  94. package/dist/index51.js +39 -11
  95. package/dist/index51.js.map +1 -1
  96. package/dist/index52.js +53 -62
  97. package/dist/index52.js.map +1 -1
  98. package/dist/index53.js +16 -54
  99. package/dist/index53.js.map +1 -1
  100. package/dist/index54.js +64 -36
  101. package/dist/index54.js.map +1 -1
  102. package/dist/index55.js +54 -66
  103. package/dist/index55.js.map +1 -1
  104. package/dist/index56.js +37 -22
  105. package/dist/index56.js.map +1 -1
  106. package/dist/index57.js +63 -101
  107. package/dist/index57.js.map +1 -1
  108. package/dist/index58.js +16 -67
  109. package/dist/index58.js.map +1 -1
  110. package/dist/index59.js +99 -213
  111. package/dist/index59.js.map +1 -1
  112. package/dist/index6.js +1 -1
  113. package/dist/index60.js +67 -62
  114. package/dist/index60.js.map +1 -1
  115. package/dist/index61.js +206 -224
  116. package/dist/index61.js.map +1 -1
  117. package/dist/index62.js +62 -96
  118. package/dist/index62.js.map +1 -1
  119. package/dist/index63.js +233 -33
  120. package/dist/index63.js.map +1 -1
  121. package/dist/index64.js +98 -14
  122. package/dist/index64.js.map +1 -1
  123. package/dist/index65.js +35 -59
  124. package/dist/index65.js.map +1 -1
  125. package/dist/index66.js +16 -59
  126. package/dist/index66.js.map +1 -1
  127. package/dist/index67.js +57 -72
  128. package/dist/index67.js.map +1 -1
  129. package/dist/index68.js +58 -106
  130. package/dist/index68.js.map +1 -1
  131. package/dist/index69.js +70 -43
  132. package/dist/index69.js.map +1 -1
  133. package/dist/index7.js +157 -69
  134. package/dist/index7.js.map +1 -1
  135. package/dist/index70.js +101 -40
  136. package/dist/index70.js.map +1 -1
  137. package/dist/index71.js +44 -72
  138. package/dist/index71.js.map +1 -1
  139. package/dist/index72.js +47 -53
  140. package/dist/index72.js.map +1 -1
  141. package/dist/index73.js +70 -62
  142. package/dist/index73.js.map +1 -1
  143. package/dist/index74.js +46 -28
  144. package/dist/index74.js.map +1 -1
  145. package/dist/index75.js +67 -13
  146. package/dist/index75.js.map +1 -1
  147. package/dist/index76.js +35 -2263
  148. package/dist/index76.js.map +1 -1
  149. package/dist/index77.js +17 -0
  150. package/dist/index77.js.map +1 -0
  151. package/dist/index78.js +2267 -0
  152. package/dist/index78.js.map +1 -0
  153. package/dist/index8.js +377 -70
  154. package/dist/index8.js.map +1 -1
  155. package/dist/index9.js +60 -77
  156. package/dist/index9.js.map +1 -1
  157. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3,167 +3,171 @@ import { cn as t } from "./index3.js";
3
3
  import { Accordion as a } from "./index4.js";
4
4
  import { ActionBar as x } from "./index5.js";
5
5
  import { ActionLayout as i } from "./index6.js";
6
- import { Alert as d } from "./index7.js";
7
- import { AlertBox as g } from "./index8.js";
8
- import { AlertModal as c } from "./index9.js";
9
- import { AutoComplete as b } from "./index10.js";
10
- import { Avatar as A } from "./index11.js";
11
- import { AvatarCard as C } from "./index12.js";
12
- import { AverageRating as T } from "./index13.js";
13
- import { AxtecLogo as k } from "./index14.js";
14
- import { Badge as M } from "./index15.js";
15
- import { Breadcrumbs as H } from "./index16.js";
16
- import { Button as D } from "./index17.js";
17
- import { ButtonGroup as G } from "./index18.js";
18
- import { Card as R, CardGrid as F } from "./index19.js";
19
- import { CardHeading as N } from "./index20.js";
20
- import { ChartLegend as V, StatisticsLegend as O } from "./index21.js";
21
- import { Checkbox as j } from "./index22.js";
22
- import { ConfirmModal as z } from "./index23.js";
23
- import { DatePicker as K } from "./index24.js";
24
- import { Drawer as X } from "./index25.js";
25
- import { Dropdown as Z, DropdownButton as _ } from "./index26.js";
26
- import { EmptyData as oo } from "./index27.js";
27
- import { FileUploader as eo } from "./index28.js";
28
- import { IconButton as po } from "./index29.js";
29
- import { Image as mo } from "./index30.js";
30
- import { ImageGrid as fo } from "./index31.js";
31
- import { ImageUploading as no } from "./index32.js";
32
- import { Input as go } from "./index33.js";
33
- import { LinkButton as co } from "./index34.js";
34
- import { Loader as bo } from "./index35.js";
35
- import { LoadingModal as Ao } from "./index36.js";
36
- import { LogoLoader as Co } from "./index37.js";
37
- import { MenuText as To } from "./index38.js";
38
- import { Modal as ko } from "./index39.js";
39
- import { MultiItemSelect as Mo } from "./index40.js";
40
- import { MyHomeVaultLogo as Ho } from "./index41.js";
41
- import { Notification as Do } from "./index42.js";
42
- import { OptionDivider as Go } from "./index43.js";
43
- import { PageHeading as Ro } from "./index44.js";
44
- import { Pagination as Eo } from "./index45.js";
45
- import { Panel as Uo, PanelAction as Vo, PanelBody as Oo, PanelEmptyState as Qo, PanelFooter as jo, PanelHeader as qo, PanelTitle as zo } from "./index46.js";
46
- import { PhotoLibrary as Ko } from "./index47.js";
47
- import { Pill as Xo } from "./index48.js";
48
- import { PrimaryCard as Zo } from "./index49.js";
49
- import { Progress as $o } from "./index50.js";
50
- import { QuickActions as rr } from "./index51.js";
51
- import { RadioGroup as tr } from "./index52.js";
52
- import { Rating as ar } from "./index53.js";
53
- import { Row as xr } from "./index54.js";
54
- import { ScrollableModal as ir } from "./index55.js";
55
- import { SectionHeading as dr } from "./index56.js";
56
- import { Select as gr } from "./index57.js";
57
- import { SelectionCard as cr } from "./index58.js";
58
- import { Sidebar as br, SidebarCard as sr, SidebarFooter as Ar, SidebarGroup as Pr, SidebarHeader as Cr, SidebarItem as Lr, SidebarNav as Tr, SidebarSection as Br, useSidebar as kr } from "./index59.js";
59
- import { Skeleton as Mr, SkeletonAvatar as yr, SkeletonCard as Hr, SkeletonText as vr } from "./index60.js";
60
- import { StatisticsChart as wr } from "./index61.js";
61
- import { StatusBadge as hr, StatusIndicator as Rr } from "./index62.js";
62
- import { StepList as Er } from "./index63.js";
63
- import { SubsectionHeading as Ur } from "./index64.js";
64
- import { TabView as Or } from "./index65.js";
65
- import { Table as jr } from "./index66.js";
66
- import { Tabs as zr } from "./index67.js";
67
- import { TaskList as Kr } from "./index68.js";
68
- import { Text as Xr } from "./index69.js";
69
- import { Textarea as Zr } from "./index70.js";
70
- import { Toggle as $r } from "./index71.js";
71
- import { ToggleButton as re } from "./index72.js";
72
- import { Tooltip as te } from "./index73.js";
73
- import { TrendIndicator as ae } from "./index74.js";
6
+ import { AgentChat as d } from "./index7.js";
7
+ import { AgentPanel as g } from "./index8.js";
8
+ import { Alert as c } from "./index9.js";
9
+ import { AlertBox as b } from "./index10.js";
10
+ import { AlertModal as A } from "./index11.js";
11
+ import { AutoComplete as C } from "./index12.js";
12
+ import { Avatar as T } from "./index13.js";
13
+ import { AvatarCard as k } from "./index14.js";
14
+ import { AverageRating as M } from "./index15.js";
15
+ import { AxtecLogo as H } from "./index16.js";
16
+ import { Badge as D } from "./index17.js";
17
+ import { Breadcrumbs as w } from "./index18.js";
18
+ import { Button as R } from "./index19.js";
19
+ import { ButtonGroup as E } from "./index20.js";
20
+ import { Card as U, CardGrid as V } from "./index21.js";
21
+ import { CardHeading as Q } from "./index22.js";
22
+ import { ChartLegend as q, StatisticsLegend as z } from "./index23.js";
23
+ import { Checkbox as K } from "./index24.js";
24
+ import { ConfirmModal as X } from "./index25.js";
25
+ import { DatePicker as Z } from "./index26.js";
26
+ import { Drawer as $ } from "./index27.js";
27
+ import { Dropdown as ro, DropdownButton as eo } from "./index28.js";
28
+ import { EmptyData as po } from "./index29.js";
29
+ import { FileUploader as mo } from "./index30.js";
30
+ import { IconButton as fo } from "./index31.js";
31
+ import { Image as no } from "./index32.js";
32
+ import { ImageGrid as go } from "./index33.js";
33
+ import { ImageUploading as co } from "./index34.js";
34
+ import { Input as bo } from "./index35.js";
35
+ import { LinkButton as Ao } from "./index36.js";
36
+ import { Loader as Co } from "./index37.js";
37
+ import { LoadingModal as To } from "./index38.js";
38
+ import { LogoLoader as ko } from "./index39.js";
39
+ import { MenuText as Mo } from "./index40.js";
40
+ import { Modal as Ho } from "./index41.js";
41
+ import { MultiItemSelect as Do } from "./index42.js";
42
+ import { MyHomeVaultLogo as wo } from "./index43.js";
43
+ import { Notification as Ro } from "./index44.js";
44
+ import { OptionDivider as Eo } from "./index45.js";
45
+ import { PageHeading as Uo } from "./index46.js";
46
+ import { Pagination as Oo } from "./index47.js";
47
+ import { Panel as jo, PanelAction as qo, PanelBody as zo, PanelEmptyState as Jo, PanelFooter as Ko, PanelHeader as Wo, PanelTitle as Xo } from "./index48.js";
48
+ import { PhotoLibrary as Zo } from "./index49.js";
49
+ import { Pill as $o } from "./index50.js";
50
+ import { PrimaryCard as rr } from "./index51.js";
51
+ import { Progress as tr } from "./index52.js";
52
+ import { QuickActions as ar } from "./index53.js";
53
+ import { RadioGroup as xr } from "./index54.js";
54
+ import { Rating as ir } from "./index55.js";
55
+ import { Row as dr } from "./index56.js";
56
+ import { ScrollableModal as gr } from "./index57.js";
57
+ import { SectionHeading as cr } from "./index58.js";
58
+ import { Select as br } from "./index59.js";
59
+ import { SelectionCard as Ar } from "./index60.js";
60
+ import { Sidebar as Cr, SidebarCard as Lr, SidebarFooter as Tr, SidebarGroup as Br, SidebarHeader as kr, SidebarItem as Ir, SidebarNav as Mr, SidebarSection as yr, useSidebar as Hr } from "./index61.js";
61
+ import { Skeleton as Dr, SkeletonAvatar as hr, SkeletonCard as wr, SkeletonText as Gr } from "./index62.js";
62
+ import { StatisticsChart as Fr } from "./index63.js";
63
+ import { StatusBadge as Nr, StatusIndicator as Ur } from "./index64.js";
64
+ import { StepList as Or } from "./index65.js";
65
+ import { SubsectionHeading as jr } from "./index66.js";
66
+ import { TabView as zr } from "./index67.js";
67
+ import { Table as Kr } from "./index68.js";
68
+ import { Tabs as Xr } from "./index69.js";
69
+ import { TaskList as Zr } from "./index70.js";
70
+ import { Text as $r } from "./index71.js";
71
+ import { Textarea as re } from "./index72.js";
72
+ import { Toggle as te } from "./index73.js";
73
+ import { ToggleButton as ae } from "./index74.js";
74
+ import { Tooltip as xe } from "./index75.js";
75
+ import { TrendIndicator as ie } from "./index76.js";
74
76
  export {
75
77
  a as Accordion,
76
78
  x as ActionBar,
77
79
  i as ActionLayout,
78
- d as Alert,
79
- g as AlertBox,
80
- c as AlertModal,
81
- b as AutoComplete,
82
- A as Avatar,
83
- C as AvatarCard,
84
- T as AverageRating,
85
- k as AxtecLogo,
86
- M as Badge,
87
- H as Breadcrumbs,
88
- D as Button,
89
- G as ButtonGroup,
90
- R as Card,
91
- F as CardGrid,
92
- N as CardHeading,
93
- V as ChartLegend,
94
- j as Checkbox,
95
- z as ConfirmModal,
96
- K as DatePicker,
97
- X as Drawer,
98
- Z as Dropdown,
99
- _ as DropdownButton,
100
- oo as EmptyData,
101
- eo as FileUploader,
102
- po as IconButton,
103
- mo as Image,
104
- fo as ImageGrid,
105
- no as ImageUploading,
106
- go as Input,
107
- co as LinkButton,
108
- bo as Loader,
109
- Ao as LoadingModal,
110
- Co as LogoLoader,
111
- To as MenuText,
112
- ko as Modal,
113
- Mo as MultiItemSelect,
114
- Ho as MyHomeVaultLogo,
115
- Do as Notification,
116
- Go as OptionDivider,
117
- Ro as PageHeading,
118
- Eo as Pagination,
119
- Uo as Panel,
120
- Vo as PanelAction,
121
- Oo as PanelBody,
122
- Qo as PanelEmptyState,
123
- jo as PanelFooter,
124
- qo as PanelHeader,
125
- zo as PanelTitle,
126
- Ko as PhotoLibrary,
127
- Xo as Pill,
128
- Zo as PrimaryCard,
129
- $o as Progress,
130
- rr as QuickActions,
131
- tr as RadioGroup,
132
- ar as Rating,
133
- xr as Row,
134
- ir as ScrollableModal,
135
- dr as SectionHeading,
136
- gr as Select,
137
- cr as SelectionCard,
138
- br as Sidebar,
139
- sr as SidebarCard,
140
- Ar as SidebarFooter,
141
- Pr as SidebarGroup,
142
- Cr as SidebarHeader,
143
- Lr as SidebarItem,
144
- Tr as SidebarNav,
145
- Br as SidebarSection,
146
- Mr as Skeleton,
147
- yr as SkeletonAvatar,
148
- Hr as SkeletonCard,
149
- vr as SkeletonText,
150
- wr as StatisticsChart,
151
- O as StatisticsLegend,
152
- hr as StatusBadge,
153
- Rr as StatusIndicator,
154
- Er as StepList,
155
- Ur as SubsectionHeading,
156
- Or as TabView,
157
- jr as Table,
158
- zr as Tabs,
159
- Kr as TaskList,
160
- Xr as Text,
161
- Zr as Textarea,
162
- $r as Toggle,
163
- re as ToggleButton,
164
- te as Tooltip,
165
- ae as TrendIndicator,
80
+ d as AgentChat,
81
+ g as AgentPanel,
82
+ c as Alert,
83
+ b as AlertBox,
84
+ A as AlertModal,
85
+ C as AutoComplete,
86
+ T as Avatar,
87
+ k as AvatarCard,
88
+ M as AverageRating,
89
+ H as AxtecLogo,
90
+ D as Badge,
91
+ w as Breadcrumbs,
92
+ R as Button,
93
+ E as ButtonGroup,
94
+ U as Card,
95
+ V as CardGrid,
96
+ Q as CardHeading,
97
+ q as ChartLegend,
98
+ K as Checkbox,
99
+ X as ConfirmModal,
100
+ Z as DatePicker,
101
+ $ as Drawer,
102
+ ro as Dropdown,
103
+ eo as DropdownButton,
104
+ po as EmptyData,
105
+ mo as FileUploader,
106
+ fo as IconButton,
107
+ no as Image,
108
+ go as ImageGrid,
109
+ co as ImageUploading,
110
+ bo as Input,
111
+ Ao as LinkButton,
112
+ Co as Loader,
113
+ To as LoadingModal,
114
+ ko as LogoLoader,
115
+ Mo as MenuText,
116
+ Ho as Modal,
117
+ Do as MultiItemSelect,
118
+ wo as MyHomeVaultLogo,
119
+ Ro as Notification,
120
+ Eo as OptionDivider,
121
+ Uo as PageHeading,
122
+ Oo as Pagination,
123
+ jo as Panel,
124
+ qo as PanelAction,
125
+ zo as PanelBody,
126
+ Jo as PanelEmptyState,
127
+ Ko as PanelFooter,
128
+ Wo as PanelHeader,
129
+ Xo as PanelTitle,
130
+ Zo as PhotoLibrary,
131
+ $o as Pill,
132
+ rr as PrimaryCard,
133
+ tr as Progress,
134
+ ar as QuickActions,
135
+ xr as RadioGroup,
136
+ ir as Rating,
137
+ dr as Row,
138
+ gr as ScrollableModal,
139
+ cr as SectionHeading,
140
+ br as Select,
141
+ Ar as SelectionCard,
142
+ Cr as Sidebar,
143
+ Lr as SidebarCard,
144
+ Tr as SidebarFooter,
145
+ Br as SidebarGroup,
146
+ kr as SidebarHeader,
147
+ Ir as SidebarItem,
148
+ Mr as SidebarNav,
149
+ yr as SidebarSection,
150
+ Dr as Skeleton,
151
+ hr as SkeletonAvatar,
152
+ wr as SkeletonCard,
153
+ Gr as SkeletonText,
154
+ Fr as StatisticsChart,
155
+ z as StatisticsLegend,
156
+ Nr as StatusBadge,
157
+ Ur as StatusIndicator,
158
+ Or as StepList,
159
+ jr as SubsectionHeading,
160
+ zr as TabView,
161
+ Kr as Table,
162
+ Xr as Tabs,
163
+ Zr as TaskList,
164
+ $r as Text,
165
+ re as Textarea,
166
+ te as Toggle,
167
+ ae as ToggleButton,
168
+ xe as Tooltip,
169
+ ie as TrendIndicator,
166
170
  t as cn,
167
- kr as useSidebar
171
+ Hr as useSidebar
168
172
  };
169
173
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index10.js CHANGED
@@ -1,104 +1,82 @@
1
- import { jsxs as O, jsx as d } from "react/jsx-runtime";
2
- import { useState as m, useRef as p, useEffect as h } from "react";
3
- import { cn as b } from "./index3.js";
4
- import { Input as N } from "./index33.js";
5
- const L = ({
6
- options: r,
7
- value: a,
8
- onChange: x,
9
- onSearch: s,
10
- label: y,
11
- placeholder: D,
12
- disabled: E = !1,
13
- error: I,
14
- debounceMs: g = 300,
15
- className: C
16
- }) => {
17
- const [o, i] = m(""), [w, l] = m(!1), [u, c] = m(-1), f = p(null), n = p();
18
- h(() => {
19
- const e = r.find((t) => t.value === a);
20
- e && i(e.label);
21
- }, [a, r]), h(() => (n.current && clearTimeout(n.current), n.current = setTimeout(() => {
22
- s == null || s(o);
23
- }, g), () => {
24
- n.current && clearTimeout(n.current);
25
- }), [o, g, s]), h(() => {
26
- const e = (t) => {
27
- f.current && !f.current.contains(t.target) && l(!1);
28
- };
29
- return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
30
- }, []);
31
- const v = (e) => {
32
- i(e), l(!0), c(-1);
33
- }, k = (e) => {
34
- i(e.label), x(e.value, e.label), l(!1);
35
- }, A = (e) => {
36
- if (!w) {
37
- (e.key === "ArrowDown" || e.key === "Enter") && l(!0);
38
- return;
1
+ import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
+ import { Fragment as l } from "react";
3
+ import { Transition as x, Dialog as h, TransitionChild as o, DialogPanel as f, DialogTitle as v } from "@headlessui/react";
4
+ import { cn as i } from "./index3.js";
5
+ import { Button as y } from "./index19.js";
6
+ const j = ({
7
+ isOpen: n,
8
+ onClose: c,
9
+ title: d,
10
+ message: m,
11
+ body: s,
12
+ buttons: t,
13
+ className: p
14
+ }) => /* @__PURE__ */ e(x, { show: n, as: l, children: /* @__PURE__ */ r(h, { onClose: c, className: "relative z-50", children: [
15
+ /* @__PURE__ */ e(
16
+ o,
17
+ {
18
+ as: l,
19
+ enter: "ease-out duration-300",
20
+ enterFrom: "opacity-0",
21
+ enterTo: "opacity-100",
22
+ leave: "ease-in duration-200",
23
+ leaveFrom: "opacity-100",
24
+ leaveTo: "opacity-0",
25
+ children: /* @__PURE__ */ e("div", { className: "fixed inset-0 bg-black/50", "aria-hidden": "true" })
39
26
  }
40
- switch (e.key) {
41
- case "ArrowDown":
42
- e.preventDefault(), c(
43
- (t) => t < r.length - 1 ? t + 1 : t
44
- );
45
- break;
46
- case "ArrowUp":
47
- e.preventDefault(), c((t) => t > 0 ? t - 1 : t);
48
- break;
49
- case "Enter":
50
- e.preventDefault(), u >= 0 && r[u] && k(r[u]);
51
- break;
52
- case "Escape":
53
- l(!1);
54
- break;
27
+ ),
28
+ /* @__PURE__ */ e("div", { className: "fixed inset-0 flex items-center justify-center p-4", children: /* @__PURE__ */ e(
29
+ o,
30
+ {
31
+ as: l,
32
+ enter: "ease-out duration-300",
33
+ enterFrom: "opacity-0 scale-95",
34
+ enterTo: "opacity-100 scale-100",
35
+ leave: "ease-in duration-200",
36
+ leaveFrom: "opacity-100 scale-100",
37
+ leaveTo: "opacity-0 scale-95",
38
+ children: /* @__PURE__ */ r(
39
+ f,
40
+ {
41
+ className: i(
42
+ "w-full max-w-md bg-white rounded-2xl shadow-xl overflow-hidden",
43
+ "transform transition-all",
44
+ p
45
+ ),
46
+ children: [
47
+ /* @__PURE__ */ e("div", { className: "px-6 py-4 border-b border-slate-200", children: /* @__PURE__ */ e(v, { className: "text-lg font-semibold text-slate-900 text-center", children: d }) }),
48
+ /* @__PURE__ */ r("div", { className: "px-8 py-6 text-center", children: [
49
+ /* @__PURE__ */ e("p", { className: "text-slate-700", children: m }),
50
+ s && /* @__PURE__ */ e("div", { className: "mt-4", children: s })
51
+ ] }),
52
+ /* @__PURE__ */ e(
53
+ "div",
54
+ {
55
+ className: i(
56
+ "flex px-8 py-4 border-t border-slate-200 gap-3",
57
+ t.length === 1 ? "justify-center" : "justify-between"
58
+ ),
59
+ children: t.map((a) => /* @__PURE__ */ e(
60
+ y,
61
+ {
62
+ ...a,
63
+ className: i(
64
+ t.length === 1 ? "w-full" : "flex-1",
65
+ a.className
66
+ ),
67
+ children: a.text
68
+ },
69
+ a.text
70
+ ))
71
+ }
72
+ )
73
+ ]
74
+ }
75
+ )
55
76
  }
56
- };
57
- return /* @__PURE__ */ O("div", { ref: f, className: b("relative", C), children: [
58
- /* @__PURE__ */ d(
59
- N,
60
- {
61
- label: y,
62
- value: o,
63
- onChange: (e) => v(e.target.value),
64
- onFocus: () => l(!0),
65
- onKeyDown: A,
66
- placeholder: D,
67
- disabled: E,
68
- error: I
69
- }
70
- ),
71
- w && r.length > 0 && /* @__PURE__ */ d(
72
- "ul",
73
- {
74
- className: b(
75
- "absolute z-50 w-full mt-1 py-1",
76
- "bg-white border border-slate-200 rounded-lg shadow-lg",
77
- "max-h-60 overflow-auto"
78
- ),
79
- role: "listbox",
80
- children: r.map((e, t) => /* @__PURE__ */ d(
81
- "li",
82
- {
83
- role: "option",
84
- "aria-selected": e.value === a,
85
- onClick: () => k(e),
86
- onMouseEnter: () => c(t),
87
- className: b(
88
- "px-4 py-2 cursor-pointer text-sm",
89
- "transition-colors",
90
- u === t && "bg-slate-100",
91
- e.value === a && "text-primary-500 font-medium"
92
- ),
93
- children: e.label
94
- },
95
- e.value
96
- ))
97
- }
98
- )
99
- ] });
100
- };
77
+ ) })
78
+ ] }) });
101
79
  export {
102
- L as AutoComplete
80
+ j as AlertBox
103
81
  };
104
82
  //# sourceMappingURL=index10.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index10.js","sources":["../src/components/AutoComplete/AutoComplete.tsx"],"sourcesContent":["import { useState, useEffect, useRef } from 'react'\nimport { cn } from '@/lib/utils'\nimport { Input } from '../Input/Input'\n\nexport interface AutoCompleteOption {\n value: string\n label: string\n}\n\nexport interface AutoCompleteProps {\n options: AutoCompleteOption[]\n value?: string\n onChange: (value: string, label: string) => void\n onSearch?: (query: string) => void\n label?: string\n placeholder?: string\n disabled?: boolean\n error?: string\n debounceMs?: number\n className?: string\n}\n\nexport const AutoComplete = ({\n options,\n value,\n onChange,\n onSearch,\n label,\n placeholder,\n disabled = false,\n error,\n debounceMs = 300,\n className,\n}: AutoCompleteProps) => {\n const [inputValue, setInputValue] = useState('')\n const [isOpen, setIsOpen] = useState(false)\n const [highlightedIndex, setHighlightedIndex] = useState(-1)\n const containerRef = useRef<HTMLDivElement>(null)\n const debounceRef = useRef<ReturnType<typeof setTimeout>>()\n\n // Sync input value with selected option\n useEffect(() => {\n const selectedOption = options.find((opt) => opt.value === value)\n if (selectedOption) {\n setInputValue(selectedOption.label)\n }\n }, [value, options])\n\n // Handle debounced search\n useEffect(() => {\n if (debounceRef.current) {\n clearTimeout(debounceRef.current)\n }\n\n debounceRef.current = setTimeout(() => {\n onSearch?.(inputValue)\n }, debounceMs)\n\n return () => {\n if (debounceRef.current) {\n clearTimeout(debounceRef.current)\n }\n }\n }, [inputValue, debounceMs, onSearch])\n\n // Handle click outside\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (containerRef.current && !containerRef.current.contains(event.target as Node)) {\n setIsOpen(false)\n }\n }\n\n document.addEventListener('mousedown', handleClickOutside)\n return () => document.removeEventListener('mousedown', handleClickOutside)\n }, [])\n\n const handleInputChange = (newValue: string) => {\n setInputValue(newValue)\n setIsOpen(true)\n setHighlightedIndex(-1)\n }\n\n const handleSelect = (option: AutoCompleteOption) => {\n setInputValue(option.label)\n onChange(option.value, option.label)\n setIsOpen(false)\n }\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (!isOpen) {\n if (event.key === 'ArrowDown' || event.key === 'Enter') {\n setIsOpen(true)\n }\n return\n }\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault()\n setHighlightedIndex((prev) =>\n prev < options.length - 1 ? prev + 1 : prev\n )\n break\n case 'ArrowUp':\n event.preventDefault()\n setHighlightedIndex((prev) => (prev > 0 ? prev - 1 : prev))\n break\n case 'Enter':\n event.preventDefault()\n if (highlightedIndex >= 0 && options[highlightedIndex]) {\n handleSelect(options[highlightedIndex])\n }\n break\n case 'Escape':\n setIsOpen(false)\n break\n }\n }\n\n return (\n <div ref={containerRef} className={cn('relative', className)}>\n <Input\n label={label}\n value={inputValue}\n onChange={(e) => handleInputChange(e.target.value)}\n onFocus={() => setIsOpen(true)}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n disabled={disabled}\n error={error}\n />\n\n {isOpen && options.length > 0 && (\n <ul\n className={cn(\n 'absolute z-50 w-full mt-1 py-1',\n 'bg-white border border-slate-200 rounded-lg shadow-lg',\n 'max-h-60 overflow-auto'\n )}\n role=\"listbox\"\n >\n {options.map((option, index) => (\n <li\n key={option.value}\n role=\"option\"\n aria-selected={option.value === value}\n onClick={() => handleSelect(option)}\n onMouseEnter={() => setHighlightedIndex(index)}\n className={cn(\n 'px-4 py-2 cursor-pointer text-sm',\n 'transition-colors',\n highlightedIndex === index && 'bg-slate-100',\n option.value === value && 'text-primary-500 font-medium'\n )}\n >\n {option.label}\n </li>\n ))}\n </ul>\n )}\n </div>\n )\n}\n"],"names":["AutoComplete","options","value","onChange","onSearch","label","placeholder","disabled","error","debounceMs","className","inputValue","setInputValue","useState","isOpen","setIsOpen","highlightedIndex","setHighlightedIndex","containerRef","useRef","debounceRef","useEffect","selectedOption","opt","handleClickOutside","event","handleInputChange","newValue","handleSelect","option","handleKeyDown","prev","jsxs","cn","jsx","Input","index"],"mappings":";;;;AAsBO,MAAMA,IAAe,CAAC;AAAA,EAC3B,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,OAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,WAAAC;AACF,MAAyB;AACvB,QAAM,CAACC,GAAYC,CAAa,IAAIC,EAAS,EAAE,GACzC,CAACC,GAAQC,CAAS,IAAIF,EAAS,EAAK,GACpC,CAACG,GAAkBC,CAAmB,IAAIJ,EAAS,EAAE,GACrDK,IAAeC,EAAuB,IAAI,GAC1CC,IAAcD,EAAA;AAGpB,EAAAE,EAAU,MAAM;AACd,UAAMC,IAAiBrB,EAAQ,KAAK,CAACsB,MAAQA,EAAI,UAAUrB,CAAK;AAChE,IAAIoB,KACFV,EAAcU,EAAe,KAAK;AAAA,EAEtC,GAAG,CAACpB,GAAOD,CAAO,CAAC,GAGnBoB,EAAU,OACJD,EAAY,WACd,aAAaA,EAAY,OAAO,GAGlCA,EAAY,UAAU,WAAW,MAAM;AACrC,IAAAhB,KAAA,QAAAA,EAAWO;AAAA,EACb,GAAGF,CAAU,GAEN,MAAM;AACX,IAAIW,EAAY,WACd,aAAaA,EAAY,OAAO;AAAA,EAEpC,IACC,CAACT,GAAYF,GAAYL,CAAQ,CAAC,GAGrCiB,EAAU,MAAM;AACd,UAAMG,IAAqB,CAACC,MAAsB;AAChD,MAAIP,EAAa,WAAW,CAACA,EAAa,QAAQ,SAASO,EAAM,MAAc,KAC7EV,EAAU,EAAK;A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7B,WAAWe;AAAA,QACX,aAAAxB;AAAA,QACA,UAAAC;AAAA,QACA,OAAAC;AAAA,MAAA;AAAA,IAAA;AAAA,IAGDM,KAAUb,EAAQ,SAAS,KAC1B,gBAAAiC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWD;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,QAEF,MAAK;AAAA,QAEJ,UAAAhC,EAAQ,IAAI,CAAC4B,GAAQO,MACpB,gBAAAF;AAAA,UAAC;AAAA,UAAA;AAAA,YAEC,MAAK;AAAA,YACL,iBAAeL,EAAO,UAAU3B;AAAA,YAChC,SAAS,MAAM0B,EAAaC,CAAM;AAAA,YAClC,cAAc,MAAMZ,EAAoBmB,CAAK;AAAA,YAC7C,WAAWH;AAAA,cACT;AAAA,cACA;AAAA,cACAjB,MAAqBoB,KAAS;AAAA,cAC9BP,EAAO,UAAU3B,KAAS;AAAA,YAAA;AAAA,YAG3B,UAAA2B,EAAO;AAAA,UAAA;AAAA,UAZHA,EAAO;AAAA,QAAA,CAcf;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"index10.js","sources":["../src/components/AlertBox/AlertBox.tsx"],"sourcesContent":["import { Fragment, type ReactNode } from 'react'\nimport {\n Dialog,\n DialogPanel,\n DialogTitle,\n Transition,\n TransitionChild,\n} from '@headlessui/react'\nimport { cn } from '@/lib/utils'\nimport { Button, type ButtonProps } from '../Button/Button'\n\nexport interface AlertBoxButton extends Omit<ButtonProps, 'key'> {\n text: string\n}\n\nexport interface AlertBoxProps {\n isOpen: boolean\n onClose: () => void\n title: string\n message: string\n body?: ReactNode\n buttons: AlertBoxButton[]\n className?: string\n}\n\nexport const AlertBox = ({\n isOpen,\n onClose,\n title,\n message,\n body,\n buttons,\n className,\n}: AlertBoxProps) => {\n return (\n <Transition show={isOpen} as={Fragment}>\n <Dialog onClose={onClose} className=\"relative z-50\">\n {/* Backdrop */}\n <TransitionChild\n as={Fragment}\n enter=\"ease-out duration-300\"\n enterFrom=\"opacity-0\"\n enterTo=\"opacity-100\"\n leave=\"ease-in duration-200\"\n leaveFrom=\"opacity-100\"\n leaveTo=\"opacity-0\"\n >\n <div className=\"fixed inset-0 bg-black/50\" aria-hidden=\"true\" />\n </TransitionChild>\n\n {/* Modal */}\n <div className=\"fixed inset-0 flex items-center justify-center p-4\">\n <TransitionChild\n as={Fragment}\n enter=\"ease-out duration-300\"\n enterFrom=\"opacity-0 scale-95\"\n enterTo=\"opacity-100 scale-100\"\n leave=\"ease-in duration-200\"\n leaveFrom=\"opacity-100 scale-100\"\n leaveTo=\"opacity-0 scale-95\"\n >\n <DialogPanel\n className={cn(\n 'w-full max-w-md bg-white rounded-2xl shadow-xl overflow-hidden',\n 'transform transition-all',\n className\n )}\n >\n {/* Header */}\n <div className=\"px-6 py-4 border-b border-slate-200\">\n <DialogTitle className=\"text-lg font-semibold text-slate-900 text-center\">\n {title}\n </DialogTitle>\n </div>\n\n {/* Message */}\n <div className=\"px-8 py-6 text-center\">\n <p className=\"text-slate-700\">{message}</p>\n {body && <div className=\"mt-4\">{body}</div>}\n </div>\n\n {/* Buttons */}\n <div\n className={cn(\n 'flex px-8 py-4 border-t border-slate-200 gap-3',\n buttons.length === 1 ? 'justify-center' : 'justify-between'\n )}\n >\n {buttons.map((button) => (\n <Button\n key={button.text}\n {...button}\n className={cn(\n buttons.length === 1 ? 'w-full' : 'flex-1',\n button.className\n )}\n >\n {button.text}\n </Button>\n ))}\n </div>\n </DialogPanel>\n </TransitionChild>\n </div>\n </Dialog>\n </Transition>\n )\n}\n"],"names":["AlertBox","isOpen","onClose","title","message","body","buttons","className","jsx","Transition","Fragment","jsxs","Dialog","TransitionChild","DialogPanel","cn","DialogTitle","button","Button"],"mappings":";;;;;AAyBO,MAAMA,IAAW,CAAC;AAAA,EACvB,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,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