@leonardaustin/ui 0.25.0 → 0.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/README.md +11 -0
  2. package/dist/components/app-shell/AppShell.d.ts +3 -3
  3. package/dist/components/app-shell/AppShell.js +82 -0
  4. package/dist/components/app-shell/AuthLayout.d.ts +3 -3
  5. package/dist/components/app-shell/AuthLayout.js +16 -0
  6. package/dist/components/app-shell/BackLink.d.ts +3 -3
  7. package/dist/components/app-shell/BackLink.js +19 -0
  8. package/dist/components/app-shell/BottomNav.d.ts +3 -2
  9. package/dist/components/app-shell/BottomNav.js +37 -0
  10. package/dist/components/app-shell/Breadcrumbs.d.ts +3 -2
  11. package/dist/components/app-shell/Breadcrumbs.js +46 -0
  12. package/dist/components/app-shell/CommandPalette.d.ts +3 -2
  13. package/dist/components/app-shell/CommandPalette.js +119 -0
  14. package/dist/components/app-shell/MobileDrawer.d.ts +3 -3
  15. package/dist/components/app-shell/MobileDrawer.js +128 -0
  16. package/dist/components/app-shell/Sidebar.d.ts +3 -3
  17. package/dist/components/app-shell/Sidebar.js +355 -0
  18. package/dist/components/app-shell/ThemeMenu.d.ts +3 -2
  19. package/dist/components/app-shell/ThemeMenu.js +273 -0
  20. package/dist/components/app-shell/TopBar.d.ts +3 -3
  21. package/dist/components/app-shell/TopBar.js +129 -0
  22. package/dist/components/app-shell/commandPaletteEvents.js +16 -0
  23. package/dist/components/app-shell/navigation.js +21 -0
  24. package/dist/components/app-shell/themeMenuEvents.js +7 -0
  25. package/dist/components/charts/AreaChart.d.ts +4 -3
  26. package/dist/components/charts/AreaChart.js +217 -0
  27. package/dist/components/charts/BarChart.d.ts +4 -3
  28. package/dist/components/charts/BarChart.js +91 -0
  29. package/dist/components/charts/DonutChart.d.ts +4 -3
  30. package/dist/components/charts/DonutChart.js +172 -0
  31. package/dist/components/charts/RadarChart.d.ts +4 -3
  32. package/dist/components/charts/RadarChart.js +142 -0
  33. package/dist/components/charts/RadialBarChart.d.ts +4 -3
  34. package/dist/components/charts/RadialBarChart.js +219 -0
  35. package/dist/components/charts/SparkLine.d.ts +4 -3
  36. package/dist/components/charts/SparkLine.js +39 -0
  37. package/dist/components/charts/StackedBarChart.d.ts +4 -3
  38. package/dist/components/charts/StackedBarChart.js +249 -0
  39. package/dist/components/charts/VerticalBarChart.d.ts +4 -3
  40. package/dist/components/charts/VerticalBarChart.js +143 -0
  41. package/dist/components/charts/chartUtils.js +68 -0
  42. package/dist/components/tables/ColumnPicker.d.ts +3 -3
  43. package/dist/components/tables/ColumnPicker.js +59 -0
  44. package/dist/components/tables/Pagination.d.ts +3 -3
  45. package/dist/components/tables/Pagination.js +56 -0
  46. package/dist/components/tables/ResourceTable.d.ts +3 -3
  47. package/dist/components/tables/ResourceTable.js +88 -0
  48. package/dist/components/tables/Table.js +95 -0
  49. package/dist/components/tables/sortRows.js +11 -0
  50. package/dist/components/ui/Accordion.d.ts +2 -1
  51. package/dist/components/ui/Accordion.js +35 -0
  52. package/dist/components/ui/Alert.d.ts +3 -2
  53. package/dist/components/ui/Alert.js +51 -0
  54. package/dist/components/ui/AttachmentList.d.ts +5 -5
  55. package/dist/components/ui/AttachmentList.js +90 -0
  56. package/dist/components/ui/AudioPlayer.d.ts +5 -2
  57. package/dist/components/ui/AudioPlayer.js +447 -0
  58. package/dist/components/ui/AuthCard.d.ts +3 -3
  59. package/dist/components/ui/AuthCard.js +39 -0
  60. package/dist/components/ui/AuthorByline.d.ts +3 -3
  61. package/dist/components/ui/AuthorByline.js +23 -0
  62. package/dist/components/ui/Avatar.d.ts +3 -2
  63. package/dist/components/ui/Avatar.js +36 -0
  64. package/dist/components/ui/Badge.d.ts +3 -2
  65. package/dist/components/ui/Badge.js +47 -0
  66. package/dist/components/ui/Button.d.ts +3 -3
  67. package/dist/components/ui/Button.js +83 -0
  68. package/dist/components/ui/Calendar.d.ts +3 -3
  69. package/dist/components/ui/Calendar.js +344 -0
  70. package/dist/components/ui/CalendarGrid.d.ts +3 -2
  71. package/dist/components/ui/CalendarGrid.js +136 -0
  72. package/dist/components/ui/Card.d.ts +6 -5
  73. package/dist/components/ui/Card.js +53 -0
  74. package/dist/components/ui/CharacterCount.d.ts +3 -3
  75. package/dist/components/ui/CharacterCount.js +27 -0
  76. package/dist/components/ui/Checkbox.d.ts +10 -8
  77. package/dist/components/ui/Checkbox.js +52 -0
  78. package/dist/components/ui/CodeInput.d.ts +7 -4
  79. package/dist/components/ui/CodeInput.js +97 -0
  80. package/dist/components/ui/Combobox.d.ts +8 -6
  81. package/dist/components/ui/Combobox.js +213 -0
  82. package/dist/components/ui/CopyButton.d.ts +1 -1
  83. package/dist/components/ui/CopyButton.js +57 -0
  84. package/dist/components/ui/DangerZone.d.ts +3 -3
  85. package/dist/components/ui/DangerZone.js +23 -0
  86. package/dist/components/ui/DatePartsInput.d.ts +6 -4
  87. package/dist/components/ui/DatePartsInput.js +138 -0
  88. package/dist/components/ui/DatePicker.d.ts +9 -4
  89. package/dist/components/ui/DatePicker.js +84 -0
  90. package/dist/components/ui/DateRangePicker.d.ts +7 -4
  91. package/dist/components/ui/DateRangePicker.js +143 -0
  92. package/dist/components/ui/DateTimePicker.d.ts +7 -4
  93. package/dist/components/ui/DateTimePicker.js +267 -0
  94. package/dist/components/ui/DetailPanel.d.ts +3 -3
  95. package/dist/components/ui/DetailPanel.js +183 -0
  96. package/dist/components/ui/Dialog.d.ts +3 -3
  97. package/dist/components/ui/Dialog.js +411 -0
  98. package/dist/components/ui/DialogActions.d.ts +3 -3
  99. package/dist/components/ui/DialogActions.js +35 -0
  100. package/dist/components/ui/Disclosure.d.ts +3 -3
  101. package/dist/components/ui/Disclosure.js +45 -0
  102. package/dist/components/ui/DividerLabel.d.ts +3 -3
  103. package/dist/components/ui/DividerLabel.js +20 -0
  104. package/dist/components/ui/DropdownMenu.d.ts +3 -3
  105. package/dist/components/ui/DropdownMenu.js +229 -0
  106. package/dist/components/ui/EmptyState.d.ts +3 -3
  107. package/dist/components/ui/EmptyState.js +31 -0
  108. package/dist/components/ui/ErrorBoundary.js +46 -0
  109. package/dist/components/ui/FieldContext.js +8 -0
  110. package/dist/components/ui/Fieldset.d.ts +2 -2
  111. package/dist/components/ui/Fieldset.js +39 -0
  112. package/dist/components/ui/FilterButton.d.ts +4 -7
  113. package/dist/components/ui/FilterButton.js +17 -0
  114. package/dist/components/ui/FilterDropdown.d.ts +4 -4
  115. package/dist/components/ui/FilterDropdown.js +18 -0
  116. package/dist/components/ui/FormField.d.ts +4 -4
  117. package/dist/components/ui/FormField.js +68 -0
  118. package/dist/components/ui/Grid.d.ts +1 -1
  119. package/dist/components/ui/Grid.js +19 -0
  120. package/dist/components/ui/GridItem.d.ts +1 -1
  121. package/dist/components/ui/GridItem.js +16 -0
  122. package/dist/components/ui/Inline.d.ts +1 -1
  123. package/dist/components/ui/Inline.js +24 -0
  124. package/dist/components/ui/Kbd.d.ts +3 -2
  125. package/dist/components/ui/Kbd.js +13 -0
  126. package/dist/components/ui/ListItemLink.d.ts +3 -3
  127. package/dist/components/ui/ListItemLink.js +44 -0
  128. package/dist/components/ui/LoadingSpinner.d.ts +3 -2
  129. package/dist/components/ui/LoadingSpinner.js +19 -0
  130. package/dist/components/ui/MessageBubble.d.ts +2 -2
  131. package/dist/components/ui/MessageBubble.js +41 -0
  132. package/dist/components/ui/MetadataGrid.d.ts +5 -3
  133. package/dist/components/ui/MetadataGrid.js +76 -0
  134. package/dist/components/ui/MetricCard.d.ts +3 -3
  135. package/dist/components/ui/MetricCard.js +51 -0
  136. package/dist/components/ui/NavTabs.d.ts +2 -2
  137. package/dist/components/ui/NavTabs.js +29 -0
  138. package/dist/components/ui/OAuthButton.d.ts +2 -2
  139. package/dist/components/ui/OAuthButton.js +55 -0
  140. package/dist/components/ui/OverlineLabel.d.ts +3 -3
  141. package/dist/components/ui/OverlineLabel.js +13 -0
  142. package/dist/components/ui/PageHeader.d.ts +3 -3
  143. package/dist/components/ui/PageHeader.js +33 -0
  144. package/dist/components/ui/PageSection.d.ts +3 -3
  145. package/dist/components/ui/PageSection.js +31 -0
  146. package/dist/components/ui/PaginationBar.d.ts +3 -3
  147. package/dist/components/ui/PaginationBar.js +62 -0
  148. package/dist/components/ui/PasswordInput.d.ts +3 -3
  149. package/dist/components/ui/PasswordInput.js +62 -0
  150. package/dist/components/ui/PasswordRequirements.d.ts +3 -2
  151. package/dist/components/ui/PasswordRequirements.js +34 -0
  152. package/dist/components/ui/Popover.d.ts +3 -3
  153. package/dist/components/ui/Popover.js +53 -0
  154. package/dist/components/ui/ProfileHeader.d.ts +3 -3
  155. package/dist/components/ui/ProfileHeader.js +54 -0
  156. package/dist/components/ui/ProgressBar.d.ts +3 -3
  157. package/dist/components/ui/ProgressBar.js +42 -0
  158. package/dist/components/ui/ProseContent.d.ts +3 -3
  159. package/dist/components/ui/ProseContent.js +13 -0
  160. package/dist/components/ui/QrCode.d.ts +3 -3
  161. package/dist/components/ui/QrCode.js +47 -0
  162. package/dist/components/ui/Radio.d.ts +9 -6
  163. package/dist/components/ui/Radio.js +58 -0
  164. package/dist/components/ui/RadioPill.d.ts +7 -4
  165. package/dist/components/ui/RadioPill.js +53 -0
  166. package/dist/components/ui/ReorderList.d.ts +3 -3
  167. package/dist/components/ui/ReorderList.js +123 -0
  168. package/dist/components/ui/SearchInput.d.ts +7 -5
  169. package/dist/components/ui/SearchInput.js +49 -0
  170. package/dist/components/ui/SectionHeader.d.ts +3 -3
  171. package/dist/components/ui/SectionHeader.js +13 -0
  172. package/dist/components/ui/Select.d.ts +4 -4
  173. package/dist/components/ui/Select.js +117 -0
  174. package/dist/components/ui/SelectDropdown.d.ts +8 -3
  175. package/dist/components/ui/SelectDropdown.js +206 -0
  176. package/dist/components/ui/SettingRow.d.ts +5 -5
  177. package/dist/components/ui/SettingRow.js +25 -0
  178. package/dist/components/ui/SideSheet.d.ts +3 -3
  179. package/dist/components/ui/SideSheet.js +164 -0
  180. package/dist/components/ui/Skeleton.d.ts +3 -3
  181. package/dist/components/ui/Skeleton.js +18 -0
  182. package/dist/components/ui/Slider.d.ts +11 -6
  183. package/dist/components/ui/Slider.js +58 -0
  184. package/dist/components/ui/SplitPaneLayout.d.ts +5 -5
  185. package/dist/components/ui/SplitPaneLayout.js +22 -0
  186. package/dist/components/ui/Stack.d.ts +1 -1
  187. package/dist/components/ui/Stack.js +18 -0
  188. package/dist/components/ui/StatusDot.d.ts +3 -2
  189. package/dist/components/ui/StatusDot.js +24 -0
  190. package/dist/components/ui/StepProgress.d.ts +3 -2
  191. package/dist/components/ui/StepProgress.js +33 -0
  192. package/dist/components/ui/Tabs.d.ts +5 -5
  193. package/dist/components/ui/Tabs.js +63 -0
  194. package/dist/components/ui/TextInput.d.ts +4 -4
  195. package/dist/components/ui/TextInput.js +57 -0
  196. package/dist/components/ui/Textarea.d.ts +3 -3
  197. package/dist/components/ui/Textarea.js +59 -0
  198. package/dist/components/ui/ThemePreview.d.ts +3 -3
  199. package/dist/components/ui/ThemePreview.js +28 -0
  200. package/dist/components/ui/TimeInput.d.ts +7 -6
  201. package/dist/components/ui/TimeInput.js +22 -0
  202. package/dist/components/ui/Timeline.d.ts +3 -2
  203. package/dist/components/ui/Timeline.js +29 -0
  204. package/dist/components/ui/Toast.js +121 -0
  205. package/dist/components/ui/Toggle.d.ts +5 -3
  206. package/dist/components/ui/Toggle.js +34 -0
  207. package/dist/components/ui/Toolbar.d.ts +3 -3
  208. package/dist/components/ui/Toolbar.js +70 -0
  209. package/dist/components/ui/Tooltip.js +91 -0
  210. package/dist/components/ui/TranscriptLine.d.ts +3 -3
  211. package/dist/components/ui/TranscriptLine.js +40 -0
  212. package/dist/components/ui/UploadDropzone.d.ts +3 -5
  213. package/dist/components/ui/UploadDropzone.js +55 -0
  214. package/dist/components/ui/badgeColors.js +5 -0
  215. package/dist/components/ui/calendar/AgendaView.js +140 -0
  216. package/dist/components/ui/calendar/MonthView.js +321 -0
  217. package/dist/components/ui/calendar/TimeGrid.js +501 -0
  218. package/dist/components/ui/calendar/TimelineView.js +311 -0
  219. package/dist/components/ui/calendar/context.js +10 -0
  220. package/dist/components/ui/calendar/items.js +152 -0
  221. package/dist/components/ui/calendar/types.js +38 -0
  222. package/dist/components/ui/calendar/useGridInteraction.js +393 -0
  223. package/dist/components/ui/useFieldControl.d.ts +1 -1
  224. package/dist/components/ui/useFieldControl.js +17 -0
  225. package/dist/config/theme.js +219 -0
  226. package/dist/core.css +2933 -0
  227. package/dist/hooks/useAnchoredPopup.js +162 -0
  228. package/dist/hooks/useApplyTheme.js +16 -0
  229. package/dist/hooks/useControllableState.d.ts +14 -0
  230. package/dist/hooks/useControllableState.js +10 -0
  231. package/dist/hooks/useDismiss.js +24 -0
  232. package/dist/hooks/useFocusTrap.js +42 -0
  233. package/dist/hooks/useOverlayStack.js +23 -0
  234. package/dist/hooks/usePopover.js +47 -0
  235. package/dist/hooks/usePortalContainer.js +14 -0
  236. package/dist/hooks/useSettings.js +8 -0
  237. package/dist/hooks/useTheme.js +8 -0
  238. package/dist/hooks/useTypeahead.js +19 -0
  239. package/dist/index.js +133 -12884
  240. package/dist/lib/anchorPlacement.js +75 -0
  241. package/dist/lib/calendar.js +666 -0
  242. package/dist/lib/cn.js +228 -0
  243. package/dist/lib/codeInput.js +51 -0
  244. package/dist/lib/dateParts.js +31 -0
  245. package/dist/lib/dialogDrag.js +45 -0
  246. package/dist/lib/dialogResize.js +47 -0
  247. package/dist/lib/formatDate.js +29 -0
  248. package/dist/lib/formatMediaTime.js +7 -0
  249. package/dist/lib/layout.js +29 -0
  250. package/dist/lib/math.js +6 -0
  251. package/dist/lib/mergeRefs.d.ts +6 -0
  252. package/dist/lib/mergeRefs.js +17 -0
  253. package/dist/lib/months.js +30 -0
  254. package/dist/lib/overlayStack.js +47 -0
  255. package/dist/lib/panelResize.js +8 -0
  256. package/dist/lib/passwordRequirements.js +23 -0
  257. package/dist/lib/qrCode.js +570 -0
  258. package/dist/lib/tones.js +104 -0
  259. package/dist/lib/typeahead.js +31 -0
  260. package/dist/providers/ControlSizeContext.js +9 -0
  261. package/dist/providers/ControlSizeProvider.js +11 -0
  262. package/dist/providers/SettingsContext.js +53 -0
  263. package/dist/providers/SettingsProvider.js +249 -0
  264. package/dist/providers/ThemeContext.js +5 -0
  265. package/dist/providers/ThemeProvider.js +17 -0
  266. package/dist/providers/accentColors.js +75 -0
  267. package/dist/providers/themeClasses.d.ts +1 -0
  268. package/dist/providers/themeClasses.js +20 -0
  269. package/dist/styles.css +228 -176
  270. package/dist/themes/cyber-brutal-dark.css +53 -0
  271. package/dist/themes/cyber-brutal-light.css +75 -0
  272. package/dist/themes/glass-dark.css +217 -0
  273. package/dist/themes/glass-light.css +215 -0
  274. package/dist/themes/hashi.css +66 -0
  275. package/dist/themes/light-inverted.css +32 -0
  276. package/dist/themes/light.css +1 -0
  277. package/dist/themes/monokai.css +51 -0
  278. package/dist/themes/solarized.css +55 -0
  279. package/package.json +3 -1
@@ -0,0 +1,570 @@
1
+ //#region src/lib/qrCode.ts
2
+ var e = class extends RangeError {
3
+ constructor() {
4
+ super("Text is too long to encode as a QR code"), this.name = "QrCapacityError";
5
+ }
6
+ }, t = {
7
+ L: 0,
8
+ M: 1,
9
+ Q: 2,
10
+ H: 3
11
+ }, n = {
12
+ L: 1,
13
+ M: 0,
14
+ Q: 3,
15
+ H: 2
16
+ }, r = [
17
+ [
18
+ -1,
19
+ 7,
20
+ 10,
21
+ 15,
22
+ 20,
23
+ 26,
24
+ 18,
25
+ 20,
26
+ 24,
27
+ 30,
28
+ 18,
29
+ 20,
30
+ 24,
31
+ 26,
32
+ 30,
33
+ 22,
34
+ 24,
35
+ 28,
36
+ 30,
37
+ 28,
38
+ 28,
39
+ 28,
40
+ 28,
41
+ 30,
42
+ 30,
43
+ 26,
44
+ 28,
45
+ 30,
46
+ 30,
47
+ 30,
48
+ 30,
49
+ 30,
50
+ 30,
51
+ 30,
52
+ 30,
53
+ 30,
54
+ 30,
55
+ 30,
56
+ 30,
57
+ 30,
58
+ 30
59
+ ],
60
+ [
61
+ -1,
62
+ 10,
63
+ 16,
64
+ 26,
65
+ 18,
66
+ 24,
67
+ 16,
68
+ 18,
69
+ 22,
70
+ 22,
71
+ 26,
72
+ 30,
73
+ 22,
74
+ 22,
75
+ 24,
76
+ 24,
77
+ 28,
78
+ 28,
79
+ 26,
80
+ 26,
81
+ 26,
82
+ 26,
83
+ 28,
84
+ 28,
85
+ 28,
86
+ 28,
87
+ 28,
88
+ 28,
89
+ 28,
90
+ 28,
91
+ 28,
92
+ 28,
93
+ 28,
94
+ 28,
95
+ 28,
96
+ 28,
97
+ 28,
98
+ 28,
99
+ 28,
100
+ 28,
101
+ 28
102
+ ],
103
+ [
104
+ -1,
105
+ 13,
106
+ 22,
107
+ 18,
108
+ 26,
109
+ 18,
110
+ 24,
111
+ 18,
112
+ 22,
113
+ 20,
114
+ 24,
115
+ 28,
116
+ 26,
117
+ 24,
118
+ 20,
119
+ 30,
120
+ 24,
121
+ 28,
122
+ 28,
123
+ 26,
124
+ 30,
125
+ 28,
126
+ 30,
127
+ 30,
128
+ 30,
129
+ 30,
130
+ 28,
131
+ 30,
132
+ 30,
133
+ 30,
134
+ 30,
135
+ 30,
136
+ 30,
137
+ 30,
138
+ 30,
139
+ 30,
140
+ 30,
141
+ 30,
142
+ 30,
143
+ 30,
144
+ 30
145
+ ],
146
+ [
147
+ -1,
148
+ 17,
149
+ 28,
150
+ 22,
151
+ 16,
152
+ 22,
153
+ 28,
154
+ 26,
155
+ 26,
156
+ 24,
157
+ 28,
158
+ 24,
159
+ 28,
160
+ 22,
161
+ 24,
162
+ 24,
163
+ 30,
164
+ 28,
165
+ 28,
166
+ 26,
167
+ 28,
168
+ 30,
169
+ 24,
170
+ 30,
171
+ 30,
172
+ 30,
173
+ 30,
174
+ 30,
175
+ 30,
176
+ 30,
177
+ 30,
178
+ 30,
179
+ 30,
180
+ 30,
181
+ 30,
182
+ 30,
183
+ 30,
184
+ 30,
185
+ 30,
186
+ 30,
187
+ 30
188
+ ]
189
+ ], i = [
190
+ [
191
+ -1,
192
+ 1,
193
+ 1,
194
+ 1,
195
+ 1,
196
+ 1,
197
+ 2,
198
+ 2,
199
+ 2,
200
+ 2,
201
+ 4,
202
+ 4,
203
+ 4,
204
+ 4,
205
+ 4,
206
+ 6,
207
+ 6,
208
+ 6,
209
+ 6,
210
+ 7,
211
+ 8,
212
+ 8,
213
+ 9,
214
+ 9,
215
+ 10,
216
+ 12,
217
+ 12,
218
+ 12,
219
+ 13,
220
+ 14,
221
+ 15,
222
+ 16,
223
+ 17,
224
+ 18,
225
+ 19,
226
+ 19,
227
+ 20,
228
+ 21,
229
+ 22,
230
+ 24,
231
+ 25
232
+ ],
233
+ [
234
+ -1,
235
+ 1,
236
+ 1,
237
+ 1,
238
+ 2,
239
+ 2,
240
+ 4,
241
+ 4,
242
+ 4,
243
+ 5,
244
+ 5,
245
+ 5,
246
+ 8,
247
+ 9,
248
+ 9,
249
+ 10,
250
+ 10,
251
+ 11,
252
+ 13,
253
+ 14,
254
+ 16,
255
+ 17,
256
+ 17,
257
+ 18,
258
+ 20,
259
+ 21,
260
+ 23,
261
+ 25,
262
+ 26,
263
+ 28,
264
+ 29,
265
+ 31,
266
+ 33,
267
+ 35,
268
+ 37,
269
+ 38,
270
+ 40,
271
+ 43,
272
+ 45,
273
+ 47,
274
+ 49
275
+ ],
276
+ [
277
+ -1,
278
+ 1,
279
+ 1,
280
+ 2,
281
+ 2,
282
+ 4,
283
+ 4,
284
+ 6,
285
+ 6,
286
+ 8,
287
+ 8,
288
+ 8,
289
+ 10,
290
+ 12,
291
+ 16,
292
+ 12,
293
+ 17,
294
+ 16,
295
+ 18,
296
+ 21,
297
+ 20,
298
+ 23,
299
+ 23,
300
+ 25,
301
+ 27,
302
+ 29,
303
+ 34,
304
+ 34,
305
+ 35,
306
+ 38,
307
+ 40,
308
+ 43,
309
+ 45,
310
+ 48,
311
+ 51,
312
+ 53,
313
+ 56,
314
+ 59,
315
+ 62,
316
+ 65,
317
+ 68
318
+ ],
319
+ [
320
+ -1,
321
+ 1,
322
+ 1,
323
+ 2,
324
+ 4,
325
+ 4,
326
+ 4,
327
+ 5,
328
+ 6,
329
+ 8,
330
+ 8,
331
+ 11,
332
+ 11,
333
+ 16,
334
+ 16,
335
+ 18,
336
+ 16,
337
+ 19,
338
+ 21,
339
+ 25,
340
+ 25,
341
+ 25,
342
+ 34,
343
+ 30,
344
+ 32,
345
+ 35,
346
+ 37,
347
+ 40,
348
+ 42,
349
+ 45,
350
+ 48,
351
+ 51,
352
+ 54,
353
+ 57,
354
+ 60,
355
+ 63,
356
+ 66,
357
+ 70,
358
+ 74,
359
+ 77,
360
+ 81
361
+ ]
362
+ ];
363
+ function a(e) {
364
+ let t = (16 * e + 128) * e + 64;
365
+ if (e >= 2) {
366
+ let n = Math.floor(e / 7) + 2;
367
+ t -= (25 * n - 10) * n - 55, e >= 7 && (t -= 36);
368
+ }
369
+ return t;
370
+ }
371
+ function o(e, n) {
372
+ let o = t[n];
373
+ return Math.floor(a(e) / 8) - r[o][e] * i[o][e];
374
+ }
375
+ function s(e) {
376
+ if (e === 1) return [];
377
+ let t = Math.floor(e / 7) + 2, n = Math.floor((e * 8 + t * 3 + 5) / (t * 4 - 4)) * 2, r = [6];
378
+ for (let i = e * 4 + 17 - 7; r.length < t; i -= n) r.splice(1, 0, i);
379
+ return r;
380
+ }
381
+ function c(e, t) {
382
+ let n = 0;
383
+ for (let r = 7; r >= 0; r--) n = n << 1 ^ (n >>> 7) * 285, n ^= (t >>> r & 1) * e;
384
+ return n;
385
+ }
386
+ function l(e) {
387
+ let t = Array(e).fill(0);
388
+ t[e - 1] = 1;
389
+ let n = 1;
390
+ for (let r = 0; r < e; r++) {
391
+ for (let e = 0; e < t.length; e++) t[e] = c(t[e], n), e + 1 < t.length && (t[e] ^= t[e + 1]);
392
+ n = c(n, 2);
393
+ }
394
+ return t;
395
+ }
396
+ function u(e, t) {
397
+ let n = Array(t.length).fill(0);
398
+ for (let r of e) {
399
+ let e = r ^ n.shift();
400
+ n.push(0), t.forEach((t, r) => {
401
+ n[r] ^= c(t, e);
402
+ });
403
+ }
404
+ return n;
405
+ }
406
+ function d(e, t, n) {
407
+ let r = o(t, n) * 8, i = [], a = (e, t) => {
408
+ for (let n = t - 1; n >= 0; n--) i.push(e >>> n & 1);
409
+ };
410
+ a(4, 4), a(e.length, t <= 9 ? 8 : 16);
411
+ for (let t of e) a(t, 8);
412
+ a(0, Math.min(4, r - i.length)), a(0, (8 - i.length % 8) % 8);
413
+ for (let e = 236; i.length < r; e ^= 253) a(e, 8);
414
+ let s = [];
415
+ for (let e = 0; e < i.length; e += 8) s.push(i.slice(e, e + 8).reduce((e, t) => e << 1 | t));
416
+ return s;
417
+ }
418
+ function f(e, n, o) {
419
+ let s = t[o], c = i[s][n], d = r[s][n], f = Math.floor(a(n) / 8), p = c - f % c, m = Math.floor(f / c), h = l(d), g = [];
420
+ for (let t = 0, n = 0; t < c; t++) {
421
+ let r = m - d + (t < p ? 0 : 1), i = e.slice(n, n + r);
422
+ n += r;
423
+ let a = u(i, h);
424
+ t < p && i.push(0), g.push(i.concat(a));
425
+ }
426
+ let _ = [];
427
+ for (let e = 0; e < g[0].length; e++) g.forEach((t, n) => {
428
+ (e !== m - d || n >= p) && _.push(t[e]);
429
+ });
430
+ return _;
431
+ }
432
+ var p = class {
433
+ size;
434
+ modules;
435
+ isFunction;
436
+ constructor(e) {
437
+ this.size = e, this.modules = Array.from({ length: e }, () => Array(e).fill(!1)), this.isFunction = Array.from({ length: e }, () => Array(e).fill(!1));
438
+ }
439
+ setFunction(e, t, n) {
440
+ this.modules[t][e] = n, this.isFunction[t][e] = !0;
441
+ }
442
+ };
443
+ function m(e, t) {
444
+ let { size: n } = e;
445
+ for (let t = 0; t < n; t++) e.setFunction(6, t, t % 2 == 0), e.setFunction(t, 6, t % 2 == 0);
446
+ for (let [t, r] of [
447
+ [3, 3],
448
+ [n - 4, 3],
449
+ [3, n - 4]
450
+ ]) for (let i = -4; i <= 4; i++) for (let a = -4; a <= 4; a++) {
451
+ let o = t + a, s = r + i;
452
+ if (o < 0 || o >= n || s < 0 || s >= n) continue;
453
+ let c = Math.max(Math.abs(a), Math.abs(i));
454
+ e.setFunction(o, s, c !== 2 && c !== 4);
455
+ }
456
+ let r = s(t), i = r.length - 1;
457
+ r.forEach((t, n) => {
458
+ r.forEach((r, a) => {
459
+ if (!(n === 0 && a === 0 || n === 0 && a === i || n === i && a === 0)) for (let n = -2; n <= 2; n++) for (let i = -2; i <= 2; i++) e.setFunction(t + i, r + n, Math.max(Math.abs(i), Math.abs(n)) !== 1);
460
+ });
461
+ }), h(e, "M", 0), g(e, t);
462
+ }
463
+ function h(e, t, r) {
464
+ let i = n[t] << 3 | r, a = i;
465
+ for (let e = 0; e < 10; e++) a = a << 1 ^ (a >>> 9) * 1335;
466
+ let o = (i << 10 | a) ^ 21522, s = (e) => (o >>> e & 1) != 0, { size: c } = e;
467
+ for (let t = 0; t <= 5; t++) e.setFunction(8, t, s(t));
468
+ e.setFunction(8, 7, s(6)), e.setFunction(8, 8, s(7)), e.setFunction(7, 8, s(8));
469
+ for (let t = 9; t < 15; t++) e.setFunction(14 - t, 8, s(t));
470
+ for (let t = 0; t < 8; t++) e.setFunction(c - 1 - t, 8, s(t));
471
+ for (let t = 8; t < 15; t++) e.setFunction(8, c - 15 + t, s(t));
472
+ e.setFunction(8, c - 8, !0);
473
+ }
474
+ function g(e, t) {
475
+ if (t < 7) return;
476
+ let n = t;
477
+ for (let e = 0; e < 12; e++) n = n << 1 ^ (n >>> 11) * 7973;
478
+ let r = t << 12 | n;
479
+ for (let t = 0; t < 18; t++) {
480
+ let n = (r >>> t & 1) != 0, i = e.size - 11 + t % 3, a = Math.floor(t / 3);
481
+ e.setFunction(i, a, n), e.setFunction(a, i, n);
482
+ }
483
+ }
484
+ function _(e, t) {
485
+ let { size: n } = e, r = 0;
486
+ for (let i = n - 1; i >= 1; i -= 2) {
487
+ i === 6 && (i = 5);
488
+ let a = (i + 1 & 2) == 0;
489
+ for (let o = 0; o < n; o++) {
490
+ let s = a ? n - 1 - o : o;
491
+ for (let n = 0; n < 2; n++) {
492
+ let a = i - n;
493
+ e.isFunction[s][a] || r >= t.length * 8 || (e.modules[s][a] = (t[r >>> 3] >>> 7 - (r & 7) & 1) != 0, r++);
494
+ }
495
+ }
496
+ }
497
+ }
498
+ var v = [
499
+ (e, t) => (e + t) % 2 == 0,
500
+ (e, t) => t % 2 == 0,
501
+ (e) => e % 3 == 0,
502
+ (e, t) => (e + t) % 3 == 0,
503
+ (e, t) => (Math.floor(e / 3) + Math.floor(t / 2)) % 2 == 0,
504
+ (e, t) => e * t % 2 + e * t % 3 == 0,
505
+ (e, t) => (e * t % 2 + e * t % 3) % 2 == 0,
506
+ (e, t) => ((e + t) % 2 + e * t % 3) % 2 == 0
507
+ ];
508
+ function y(e, t) {
509
+ for (let n = 0; n < e.size; n++) for (let r = 0; r < e.size; r++) !e.isFunction[n][r] && v[t](r, n) && (e.modules[n][r] = !e.modules[n][r]);
510
+ }
511
+ var b = [[
512
+ !0,
513
+ !1,
514
+ !0,
515
+ !0,
516
+ !0,
517
+ !1,
518
+ !0,
519
+ !1,
520
+ !1,
521
+ !1,
522
+ !1
523
+ ], [
524
+ !1,
525
+ !1,
526
+ !1,
527
+ !1,
528
+ !0,
529
+ !1,
530
+ !0,
531
+ !0,
532
+ !0,
533
+ !1,
534
+ !0
535
+ ]];
536
+ function x(e) {
537
+ let t = e.length, n = (t, n, r) => r ? e[t][n] : e[n][t], r = 0;
538
+ for (let e of [!1, !0]) for (let i = 0; i < t; i++) {
539
+ let a = 1;
540
+ for (let o = 1; o <= t; o++) o < t && n(o, i, e) === n(o - 1, i, e) ? a++ : (a >= 5 && (r += 3 + (a - 5)), a = 1);
541
+ for (let a = 0; a + 11 <= t; a++) for (let t of b) t.every((t, r) => n(a + r, i, e) === t) && (r += 40);
542
+ }
543
+ for (let n = 0; n < t - 1; n++) for (let i = 0; i < t - 1; i++) {
544
+ let t = e[n][i];
545
+ t === e[n][i + 1] && t === e[n + 1][i] && t === e[n + 1][i + 1] && (r += 3);
546
+ }
547
+ let i = e.reduce((e, t) => e + t.filter(Boolean).length, 0) * 100 / (t * t);
548
+ return r += Math.floor(Math.abs(i - 50) / 5) * 10, r;
549
+ }
550
+ function S(n, r = "M") {
551
+ if (!Object.hasOwn(t, r)) throw RangeError(`Invalid QR error correction level "${r}"; expected L, M, Q or H`);
552
+ let i = new TextEncoder().encode(n), a = 1;
553
+ for (; a <= 40 && !(4 + (a <= 9 ? 8 : 16) + i.length * 8 <= o(a, r) * 8); a++);
554
+ if (a > 40) throw new e();
555
+ let s = f(d(i, a, r), a, r), c = new p(a * 4 + 17);
556
+ m(c, a), _(c, s);
557
+ let l = 0, u = Infinity;
558
+ for (let e = 0; e < 8; e++) {
559
+ y(c, e), h(c, r, e);
560
+ let t = x(c.modules);
561
+ t < u && (u = t, l = e), y(c, e);
562
+ }
563
+ return y(c, l), h(c, r, l), {
564
+ size: c.size,
565
+ version: a,
566
+ modules: c.modules
567
+ };
568
+ }
569
+ //#endregion
570
+ export { e as QrCapacityError, S as encodeQrCode };
@@ -0,0 +1,104 @@
1
+ //#region src/lib/tones.ts
2
+ var e = {
3
+ success: "green",
4
+ warning: "yellow",
5
+ danger: "red",
6
+ info: "blue",
7
+ neutral: "gray"
8
+ }, t = {
9
+ green: {
10
+ soft: "bg-green-muted text-green-fg",
11
+ outline: "border-green text-green-fg",
12
+ fill: "bg-green-muted",
13
+ dot: "bg-green",
14
+ text: "text-green-fg",
15
+ border: "border-green/30"
16
+ },
17
+ yellow: {
18
+ soft: "bg-yellow-muted text-yellow-fg",
19
+ outline: "border-yellow text-yellow-fg",
20
+ fill: "bg-yellow-muted",
21
+ dot: "bg-yellow",
22
+ text: "text-yellow-fg",
23
+ border: "border-yellow/30"
24
+ },
25
+ red: {
26
+ soft: "bg-red-muted text-red-fg",
27
+ outline: "border-red text-red-fg",
28
+ fill: "bg-red-muted",
29
+ dot: "bg-red",
30
+ text: "text-red-fg",
31
+ border: "border-red/30"
32
+ },
33
+ blue: {
34
+ soft: "bg-blue-muted text-blue-fg",
35
+ outline: "border-blue text-blue-fg",
36
+ fill: "bg-blue-muted",
37
+ dot: "bg-blue",
38
+ text: "text-blue-fg",
39
+ border: "border-blue/30"
40
+ },
41
+ purple: {
42
+ soft: "bg-purple-muted text-purple-fg",
43
+ outline: "border-purple text-purple-fg",
44
+ fill: "bg-purple-muted",
45
+ dot: "bg-purple",
46
+ text: "text-purple-fg",
47
+ border: "border-purple/30"
48
+ },
49
+ teal: {
50
+ soft: "bg-teal-muted text-teal-fg",
51
+ outline: "border-teal text-teal-fg",
52
+ fill: "bg-teal-muted",
53
+ dot: "bg-teal",
54
+ text: "text-teal-fg",
55
+ border: "border-teal/30"
56
+ },
57
+ rose: {
58
+ soft: "bg-rose-muted text-rose-fg",
59
+ outline: "border-rose text-rose-fg",
60
+ fill: "bg-rose-muted",
61
+ dot: "bg-rose",
62
+ text: "text-rose-fg",
63
+ border: "border-rose/30"
64
+ },
65
+ gray: {
66
+ soft: "bg-bg-hover text-text-secondary",
67
+ outline: "border-border text-text-secondary",
68
+ fill: "bg-bg-hover",
69
+ dot: "bg-text-tertiary",
70
+ text: "text-text-tertiary",
71
+ border: "border-border"
72
+ },
73
+ accent: {
74
+ soft: "bg-accent-muted text-accent-fg",
75
+ outline: "border-accent text-accent-fg",
76
+ fill: "bg-accent-muted",
77
+ dot: "bg-accent",
78
+ text: "text-accent-fg",
79
+ border: "border-accent/30"
80
+ }
81
+ }, n = (e) => ({
82
+ soft: `bg-${e}-muted text-${e}-fg`,
83
+ outline: `border-${e} text-${e}-fg`,
84
+ fill: `bg-${e}-muted`,
85
+ dot: `bg-${e}`,
86
+ text: `text-${e}-fg`,
87
+ border: `border-${e}/30`
88
+ }), r = {
89
+ success: n("success"),
90
+ warning: n("warning"),
91
+ danger: n("danger"),
92
+ info: n("info")
93
+ };
94
+ function i(n) {
95
+ return typeof n == "string" && (Object.prototype.hasOwnProperty.call(t, n) || Object.prototype.hasOwnProperty.call(e, n));
96
+ }
97
+ function a(t) {
98
+ return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : t;
99
+ }
100
+ function o(e) {
101
+ return Object.prototype.hasOwnProperty.call(r, e) ? r[e] : t[a(e)];
102
+ }
103
+ //#endregion
104
+ export { i as isTone, e as semanticTones, o as toneClasses, a as toneColor, t as tones };
@@ -0,0 +1,31 @@
1
+ var e = {
2
+ text: "",
3
+ at: 0
4
+ };
5
+ function t() {
6
+ return performance.now();
7
+ }
8
+ function n(e) {
9
+ return e.key.length !== 1 || e.metaKey ? !1 : e.ctrlKey && e.altKey && e.getModifierState?.("AltGraph") ? !0 : !e.ctrlKey && !e.altKey;
10
+ }
11
+ function r(e, t) {
12
+ return e.text !== "" && t - e.at <= 500;
13
+ }
14
+ function i(e, t, n) {
15
+ return {
16
+ text: r(e, n) ? e.text + t : t,
17
+ at: n
18
+ };
19
+ }
20
+ function a(e, t, n, r) {
21
+ let i = e.length;
22
+ if (i === 0 || r === "") return -1;
23
+ let a = Array.from(r.toLocaleLowerCase()), o = a.every((e) => e === a[0]), s = o ? a[0] : a.join(""), c = o ? n + 1 : Math.max(n, 0);
24
+ for (let n = 0; n < i; n++) {
25
+ let r = ((c + n) % i + i) % i;
26
+ if (!t(r) && e[r].trim().toLocaleLowerCase().startsWith(s)) return r;
27
+ }
28
+ return -1;
29
+ }
30
+ //#endregion
31
+ export { e as EMPTY_TYPEAHEAD, i as appendTypeahead, a as findTypeaheadMatch, r as isTypeaheadActive, n as isTypeaheadKey, t as typeaheadNow };
@@ -0,0 +1,9 @@
1
+ import { createContext as e, useContext as t } from "react";
2
+ //#region src/providers/ControlSizeContext.ts
3
+ var n = e("compact");
4
+ function r(e) {
5
+ let r = t(n);
6
+ return e ?? r;
7
+ }
8
+ //#endregion
9
+ export { n as ControlSizeContext, r as useControlSize };
@@ -0,0 +1,11 @@
1
+ import { ControlSizeContext as e } from "./ControlSizeContext.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ //#region src/providers/ControlSizeProvider.tsx
4
+ function n({ size: n, children: r }) {
5
+ return /* @__PURE__ */ t(e.Provider, {
6
+ value: n,
7
+ children: r
8
+ });
9
+ }
10
+ //#endregion
11
+ export { n as ControlSizeProvider };