@wavv/ui 2.2.2-alpha.4 → 2.2.2-alpha.6

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 (230) hide show
  1. package/build/assets/icons/CaretDown.js +18 -0
  2. package/build/assets/icons/CaretUp.js +18 -0
  3. package/build/assets/icons/Checkbox.js +15 -0
  4. package/build/assets/icons/CheckboxOff.js +15 -0
  5. package/build/assets/icons/CheckboxPartial.js +15 -0
  6. package/build/assets/icons/Dialpad.js +18 -0
  7. package/build/assets/icons/Exclamation.js +25 -0
  8. package/build/assets/icons/Phone.js +13 -0
  9. package/build/assets/icons/PhoneAdd.js +21 -0
  10. package/build/assets/icons/PhoneBlocked.js +22 -0
  11. package/build/assets/icons/PhoneCallback.js +21 -0
  12. package/build/assets/icons/PhoneEnd.js +28 -0
  13. package/build/assets/icons/PhoneForward.js +22 -0
  14. package/build/assets/icons/PhoneHistory.js +21 -0
  15. package/build/assets/icons/PhoneHold.js +22 -0
  16. package/build/assets/icons/PhoneIncoming.js +22 -0
  17. package/build/assets/icons/PhoneMissed.js +22 -0
  18. package/build/assets/icons/PhoneTalk.js +22 -0
  19. package/build/assets/icons/PhoneTransfer.js +21 -0
  20. package/build/assets/icons/RadioButton.js +22 -0
  21. package/build/assets/icons/RadioButtonOff.js +15 -0
  22. package/build/assets/icons/Record.js +18 -0
  23. package/build/assets/icons/Screenshot.js +39 -0
  24. package/build/assets/icons/ShieldWavv.js +30 -0
  25. package/build/assets/icons/Spotify.js +15 -0
  26. package/build/assets/icons/SubArrow.js +16 -0
  27. package/build/assets/icons/ToggleOff.js +15 -0
  28. package/build/assets/icons/ToggleOn.js +15 -0
  29. package/build/assets/icons/TransferCancel.js +60 -0
  30. package/build/components/Accordion/Accordion.js +26 -0
  31. package/build/components/Accordion/Header.js +86 -0
  32. package/build/components/Accordion/Item.js +25 -0
  33. package/build/components/Accordion/Panel.js +64 -0
  34. package/build/components/Accordion/index.js +2 -0
  35. package/build/components/Audio.js +248 -0
  36. package/build/components/BarChart.js +123 -0
  37. package/build/components/Button/Button.js +258 -0
  38. package/build/components/Button/ButtonLoader.js +20 -0
  39. package/build/components/Button/ButtonTypes.js +0 -0
  40. package/build/components/Button/Group.js +58 -0
  41. package/build/components/Button/index.js +2 -0
  42. package/build/components/Calendar.js +49 -0
  43. package/build/components/CalendarParts/CalendarContainerStyles.js +15 -0
  44. package/build/components/CalendarParts/CalendarContent.js +138 -0
  45. package/build/components/CalendarParts/CalendarHeader.js +146 -0
  46. package/build/components/CalendarParts/useMinMax.js +23 -0
  47. package/build/components/CalendarParts/utils.js +6 -0
  48. package/build/components/ChartHelpers.js +121 -0
  49. package/build/components/Checkbox.js +85 -0
  50. package/build/components/Code/Code.js +117 -0
  51. package/build/components/Code/Copy.js +50 -0
  52. package/build/components/Code/Endpoint.js +82 -0
  53. package/build/components/Code/index.js +3 -0
  54. package/build/components/ComboBox.js +190 -0
  55. package/build/components/CommandMenu/CommandItem.js +32 -0
  56. package/build/components/CommandMenu/CommandMenu.js +136 -0
  57. package/build/components/CommandMenu/CommandOptions.js +24 -0
  58. package/build/components/CommandMenu/CommandSection.js +19 -0
  59. package/build/components/CommandMenu/index.js +2 -0
  60. package/build/components/DateRangeSelect.js +359 -0
  61. package/build/components/DocTable.js +32 -0
  62. package/build/components/Dot.js +60 -0
  63. package/build/components/DraftEditor.js +188 -0
  64. package/build/components/Dropdown.js +130 -0
  65. package/build/components/DropdownMenu.js +131 -0
  66. package/build/components/DropdownMenuParts/Menu.js +6 -0
  67. package/build/components/DropdownMenuParts/MenuItem.js +54 -0
  68. package/build/components/DropdownMenuParts/MenuOptions.js +47 -0
  69. package/build/components/DropdownMenuParts/MenuSection.js +14 -0
  70. package/build/components/DropdownSelect.js +171 -0
  71. package/build/components/DynamicIcon.js +49 -0
  72. package/build/components/Editor/Editor.js +356 -0
  73. package/build/components/Editor/EditorStyles.js +259 -0
  74. package/build/components/Editor/MergeFieldExtension.js +110 -0
  75. package/build/components/Editor/RichTextToolbar.js +515 -0
  76. package/build/components/Editor/editorUtils.js +213 -0
  77. package/build/components/Editor/index.js +3 -0
  78. package/build/components/Ellipsis.js +22 -0
  79. package/build/components/Focusable.js +20 -0
  80. package/build/components/Form.js +68 -0
  81. package/build/components/FormControl.js +72 -0
  82. package/build/components/Grid.js +53 -0
  83. package/build/components/Icon/Icon.js +89 -0
  84. package/build/components/Icon/customIcons.js +48 -0
  85. package/build/components/Icon/icons.js +145 -0
  86. package/build/components/Icon/index.js +3 -0
  87. package/build/components/ImageViewer.js +142 -0
  88. package/build/components/InlineCode.js +10 -0
  89. package/build/components/InputHelpers.js +106 -0
  90. package/build/components/Inputs/DatePicker.js +111 -0
  91. package/build/components/Inputs/DateRangePicker.js +166 -0
  92. package/build/components/Inputs/InlineInput.js +71 -0
  93. package/build/components/Inputs/NumberInput.js +117 -0
  94. package/build/components/Inputs/PhoneInput.js +96 -0
  95. package/build/components/Inputs/SearchInput.js +84 -0
  96. package/build/components/Inputs/TextArea.js +164 -0
  97. package/build/components/Inputs/TextInput.js +74 -0
  98. package/build/components/Inputs/TimeInput.js +74 -0
  99. package/build/components/Inputs/helpers/AriaButton.js +19 -0
  100. package/build/components/Inputs/helpers/DateSegment.js +22 -0
  101. package/build/components/Inputs/helpers/Description.js +11 -0
  102. package/build/components/Inputs/helpers/ErrorMessage.js +11 -0
  103. package/build/components/Inputs/helpers/Input.js +6 -0
  104. package/build/components/Inputs/helpers/InputContainerStyles.js +78 -0
  105. package/build/components/Inputs/helpers/InputMessage.js +30 -0
  106. package/build/components/Inputs/helpers/InputStyles.js +43 -0
  107. package/build/components/Inputs/helpers/Label.js +42 -0
  108. package/build/components/Inputs/helpers/LabelWrapper.js +14 -0
  109. package/build/components/Inputs/helpers/PickerToggle.js +7 -0
  110. package/build/components/Inputs/helpers/TextArea.js +8 -0
  111. package/build/components/Inputs/helpers/filterPastedText.js +9 -0
  112. package/build/components/Inputs/helpers/handlePaste.js +12 -0
  113. package/build/components/Inputs/helpers/isAcceptable.js +7 -0
  114. package/build/components/Inputs/helpers/useDynamicWidth.js +39 -0
  115. package/build/components/Inputs/helpers/useInputFocus.js +19 -0
  116. package/build/components/Label.js +42 -0
  117. package/build/components/LineChart.js +80 -0
  118. package/build/components/ListBoxParts/GridListItem.js +34 -0
  119. package/build/components/ListBoxParts/ListBoxItem.js +32 -0
  120. package/build/components/ListBoxParts/ListOptions.js +45 -0
  121. package/build/components/ListHelpers/GridListHeader.js +14 -0
  122. package/build/components/ListHelpers/GridListSection.js +14 -0
  123. package/build/components/ListHelpers/ItemHeaderBody.js +36 -0
  124. package/build/components/ListHelpers/ListHeader.js +14 -0
  125. package/build/components/ListHelpers/ListItemStyles.js +52 -0
  126. package/build/components/ListHelpers/ListRootStyles.js +14 -0
  127. package/build/components/ListHelpers/ListSection.js +14 -0
  128. package/build/components/ListHelpers/ListStyles.js +29 -0
  129. package/build/components/Menu.js +159 -0
  130. package/build/components/Message.js +107 -0
  131. package/build/components/MessageHr.js +32 -0
  132. package/build/components/Modal.js +212 -0
  133. package/build/components/MotionPopover.js +39 -0
  134. package/build/components/MultiSelect/MultiSelect.js +263 -0
  135. package/build/components/MultiSelect/SearchDropdown.js +155 -0
  136. package/build/components/MultiSelect/index.js +2 -0
  137. package/build/components/OptionHelpers/Container.js +34 -0
  138. package/build/components/OptionHelpers/Item.js +59 -0
  139. package/build/components/OptionHelpers/types.js +0 -0
  140. package/build/components/Pagination.js +121 -0
  141. package/build/components/PieChart.js +40 -0
  142. package/build/components/Popover.js +40 -0
  143. package/build/components/PortalScope.js +8 -0
  144. package/build/components/Progress/CirclePercent.js +56 -0
  145. package/build/components/Progress/Progress.js +59 -0
  146. package/build/components/Progress/index.js +3 -0
  147. package/build/components/Radio.js +45 -0
  148. package/build/components/RangeCalendar.js +60 -0
  149. package/build/components/Select.js +162 -0
  150. package/build/components/Slider.js +50 -0
  151. package/build/components/Spinner.js +70 -0
  152. package/build/components/Table/Body.js +49 -0
  153. package/build/components/Table/Cell.js +63 -0
  154. package/build/components/Table/Check.js +35 -0
  155. package/build/components/Table/Column.js +129 -0
  156. package/build/components/Table/ColumnSort.js +26 -0
  157. package/build/components/Table/Header.js +64 -0
  158. package/build/components/Table/Resizer.js +25 -0
  159. package/build/components/Table/Row.js +84 -0
  160. package/build/components/Table/SortCaret.js +24 -0
  161. package/build/components/Table/Table.js +88 -0
  162. package/build/components/Table/contentStyles.js +20 -0
  163. package/build/components/Table/context.js +4 -0
  164. package/build/components/Table/index.js +2 -0
  165. package/build/components/Table/types.js +0 -0
  166. package/build/components/Tabs.js +151 -0
  167. package/build/components/Tag.js +71 -0
  168. package/build/components/Toggle.js +59 -0
  169. package/build/components/ToggleButton/ToggleButton.js +104 -0
  170. package/build/components/ToggleButton/ToggleButtonGroup.js +36 -0
  171. package/build/components/ToggleButton/context.js +8 -0
  172. package/build/components/ToggleButton/index.js +3 -0
  173. package/build/components/Tooltip.js +136 -0
  174. package/build/components/TransferList.js +234 -0
  175. package/build/components/Tree/Tree.js +69 -0
  176. package/build/components/Tree/TreeContext.js +3 -0
  177. package/build/components/Tree/TreeItem.js +93 -0
  178. package/build/components/Tree/index.js +2 -0
  179. package/build/components/UnstyledButton.js +8 -0
  180. package/build/components/Waveform.js +243 -0
  181. package/build/components/draftUtils.js +193 -0
  182. package/build/components/helpers/getIcon.js +28 -0
  183. package/build/components/helpers/getPopPosition.js +20 -0
  184. package/build/components/helpers/isPropAllowed.js +3 -0
  185. package/build/components/helpers/mergePadding.js +47 -0
  186. package/build/components/helpers/styledProps.js +34 -0
  187. package/build/components/typeDefs/elementTypes.js +0 -0
  188. package/build/components/typeDefs/inputTypes.js +0 -0
  189. package/build/components/typeDefs/selectionTypes.js +0 -0
  190. package/build/components/typeDefs/tagTypes.js +0 -0
  191. package/build/components/types.js +0 -0
  192. package/build/global-styles/GlobalStorybookStyles.js +108 -0
  193. package/build/global-styles/ResetStyles.js +33 -0
  194. package/build/global-styles/ScrollbarStyles.js +26 -0
  195. package/build/global-styles/ToastStyles.js +66 -0
  196. package/build/global-styles/index.js +4 -0
  197. package/build/hooks/index.js +9 -0
  198. package/build/hooks/useConfirm.js +91 -0
  199. package/build/hooks/useControlledOpenState.js +22 -0
  200. package/build/hooks/useCopy.js +28 -0
  201. package/build/hooks/useElementObserver.js +6 -0
  202. package/build/hooks/useEventListener.js +19 -0
  203. package/build/hooks/useOnClickOutside.js +21 -0
  204. package/build/hooks/usePrevious.js +12 -0
  205. package/build/hooks/useSelectAll.js +60 -0
  206. package/build/hooks/useWindowSize.js +25 -0
  207. package/build/index.js +79 -12348
  208. package/build/theme/ThemeTypes.js +0 -0
  209. package/build/theme/common/button.js +33 -0
  210. package/build/theme/common/common.js +38 -0
  211. package/build/theme/common/index.js +4 -0
  212. package/build/theme/core/colors.js +77 -0
  213. package/build/theme/core/dark/dark.js +457 -0
  214. package/build/theme/core/dark/darkScale.js +36 -0
  215. package/build/theme/core/light/light.js +456 -0
  216. package/build/theme/core/light/lightScale.js +35 -0
  217. package/build/theme/eighties/colors.js +78 -0
  218. package/build/theme/eighties/dark/dark.js +457 -0
  219. package/build/theme/eighties/dark/darkScale.js +36 -0
  220. package/build/theme/eighties/light/light.js +456 -0
  221. package/build/theme/eighties/light/lightScale.js +35 -0
  222. package/build/theme/index.js +28 -0
  223. package/build/utils/chunk.js +13 -0
  224. package/build/utils/copyToClipboard.js +29 -0
  225. package/build/utils/flattenListOptions.js +4 -0
  226. package/build/utils/formatDate.js +55 -0
  227. package/build/utils/index.js +6 -0
  228. package/build/utils/numberWithCommas.js +3 -0
  229. package/build/utils/range.js +11 -0
  230. package/package.json +6 -2
@@ -0,0 +1,456 @@
1
+ import common, { button as index_js_button } from "../../common/index.js";
2
+ import colors from "../colors.js";
3
+ import lightScale from "./lightScale.js";
4
+ const white = '#FFFFFF';
5
+ const light_light = {
6
+ ...common,
7
+ ...lightScale,
8
+ name: 'light',
9
+ button: {
10
+ ...index_js_button,
11
+ primary: {
12
+ color: {
13
+ default: white,
14
+ hover: white,
15
+ active: white
16
+ },
17
+ outlineColor: {
18
+ default: lightScale.scale10,
19
+ hover: lightScale.scale10,
20
+ active: lightScale.scale10
21
+ },
22
+ background: {
23
+ default: colors.brand,
24
+ hover: colors.brandShade1,
25
+ active: colors.brandShade2
26
+ },
27
+ outlineBackground: {
28
+ default: colors.brandTint0,
29
+ hover: colors.brandTint1,
30
+ active: colors.brandTint2
31
+ },
32
+ border: {
33
+ default: colors.brand,
34
+ hover: colors.brandShade1,
35
+ active: colors.brandShade2
36
+ },
37
+ divider: lightScale.scale2
38
+ },
39
+ secondary: {
40
+ color: {
41
+ default: lightScale.scale10,
42
+ hover: lightScale.scale10,
43
+ active: lightScale.scale10
44
+ },
45
+ outlineColor: {
46
+ default: lightScale.scale10,
47
+ hover: lightScale.scale10,
48
+ active: lightScale.scale10
49
+ },
50
+ background: {
51
+ default: lightScale.scale1,
52
+ hover: lightScale.scale2,
53
+ active: lightScale.scale3
54
+ },
55
+ outlineBackground: {
56
+ default: lightScale.scale1,
57
+ hover: lightScale.scale2,
58
+ active: lightScale.scale3
59
+ },
60
+ border: {
61
+ default: lightScale.scale2,
62
+ hover: lightScale.scale2,
63
+ active: lightScale.scale2
64
+ },
65
+ divider: lightScale.scale2
66
+ },
67
+ positive: {
68
+ color: {
69
+ default: white,
70
+ hover: white,
71
+ active: white
72
+ },
73
+ outlineColor: {
74
+ default: lightScale.scale10,
75
+ hover: lightScale.scale10,
76
+ active: lightScale.scale10
77
+ },
78
+ background: {
79
+ default: colors.success,
80
+ hover: colors.successShade1,
81
+ active: colors.successShade2
82
+ },
83
+ outlineBackground: {
84
+ default: colors.successTint0,
85
+ hover: colors.successTint1,
86
+ active: colors.successTint2
87
+ },
88
+ border: {
89
+ default: colors.success,
90
+ hover: colors.successShade1,
91
+ active: colors.successShade2
92
+ },
93
+ divider: lightScale.scale2
94
+ },
95
+ negative: {
96
+ color: {
97
+ default: white,
98
+ hover: white,
99
+ active: white
100
+ },
101
+ outlineColor: {
102
+ default: lightScale.scale10,
103
+ hover: lightScale.scale10,
104
+ active: lightScale.scale10
105
+ },
106
+ background: {
107
+ default: colors.error,
108
+ hover: colors.errorShade1,
109
+ active: colors.errorShade2
110
+ },
111
+ outlineBackground: {
112
+ default: colors.errorTint0,
113
+ hover: colors.errorTint1,
114
+ active: colors.errorTint2
115
+ },
116
+ border: {
117
+ default: colors.error,
118
+ hover: colors.errorShade1,
119
+ active: colors.errorShade2
120
+ },
121
+ divider: lightScale.scale2
122
+ },
123
+ caution: {
124
+ color: {
125
+ default: white,
126
+ hover: white,
127
+ active: white
128
+ },
129
+ outlineColor: {
130
+ default: lightScale.scale10,
131
+ hover: lightScale.scale10,
132
+ active: lightScale.scale10
133
+ },
134
+ background: {
135
+ default: colors.warning,
136
+ hover: colors.warningShade1,
137
+ active: colors.warningShade2
138
+ },
139
+ outlineBackground: {
140
+ default: colors.warningTint0,
141
+ hover: colors.warningTint1,
142
+ active: colors.warningTint2
143
+ },
144
+ border: {
145
+ default: colors.warning,
146
+ hover: colors.warningShade1,
147
+ active: colors.warningShade2
148
+ },
149
+ divider: lightScale.scale2
150
+ },
151
+ subtle: {
152
+ color: {
153
+ default: colors.brand,
154
+ hover: colors.brand,
155
+ active: colors.brand
156
+ },
157
+ outlineColor: {
158
+ default: colors.brand,
159
+ hover: colors.brand,
160
+ active: colors.brand
161
+ },
162
+ secondaryColor: {
163
+ default: lightScale.scale10,
164
+ hover: lightScale.scale10,
165
+ active: lightScale.scale10
166
+ },
167
+ positiveColor: {
168
+ default: colors.success,
169
+ hover: colors.success,
170
+ active: colors.success
171
+ },
172
+ negativeColor: {
173
+ default: colors.error,
174
+ hover: colors.error,
175
+ active: colors.error
176
+ },
177
+ cautionColor: {
178
+ default: colors.warning,
179
+ hover: colors.warning,
180
+ active: colors.warning
181
+ },
182
+ background: {
183
+ default: 'transparent',
184
+ hover: lightScale.scale1,
185
+ active: lightScale.scale2
186
+ },
187
+ outlineBackground: {
188
+ default: 'transparent',
189
+ hover: lightScale.scale1,
190
+ active: lightScale.scale2
191
+ },
192
+ border: {
193
+ default: 'transparent',
194
+ hover: lightScale.scale2,
195
+ active: lightScale.scale2
196
+ },
197
+ divider: lightScale.scale2
198
+ },
199
+ link: {
200
+ color: {
201
+ default: colors.brand,
202
+ hover: colors.brandShade1,
203
+ active: colors.brandShade2
204
+ },
205
+ outlineColor: {
206
+ default: colors.brand,
207
+ hover: colors.brandShade1,
208
+ active: colors.brandShade2
209
+ },
210
+ secondaryColor: {
211
+ default: lightScale.scale8,
212
+ hover: lightScale.scale9,
213
+ active: lightScale.scale10
214
+ },
215
+ positiveColor: {
216
+ default: colors.success,
217
+ hover: colors.successShade1,
218
+ active: colors.successShade2
219
+ },
220
+ negativeColor: {
221
+ default: colors.error,
222
+ hover: colors.errorShade1,
223
+ active: colors.errorShade2
224
+ },
225
+ cautionColor: {
226
+ default: colors.warning,
227
+ hover: colors.warningShade1,
228
+ active: colors.warningShade2
229
+ },
230
+ background: {
231
+ default: 'transparent',
232
+ hover: 'transparent',
233
+ active: 'transparent'
234
+ },
235
+ outlineBackground: {
236
+ default: 'transparent',
237
+ hover: 'transparent',
238
+ active: 'transparent'
239
+ },
240
+ border: {
241
+ default: 'transparent',
242
+ hover: 'transparent',
243
+ active: 'transparent'
244
+ },
245
+ divider: 'transparent'
246
+ },
247
+ disabled: {
248
+ color: {
249
+ default: lightScale.scale4,
250
+ hover: lightScale.scale4,
251
+ active: lightScale.scale4
252
+ },
253
+ outlineColor: {
254
+ default: lightScale.scale4,
255
+ hover: lightScale.scale4,
256
+ active: lightScale.scale4
257
+ },
258
+ background: {
259
+ default: lightScale.scale1,
260
+ hover: lightScale.scale1,
261
+ active: lightScale.scale1
262
+ },
263
+ outlineBackground: {
264
+ default: lightScale.scale0,
265
+ hover: lightScale.scale0,
266
+ active: lightScale.scale0
267
+ },
268
+ border: {
269
+ default: lightScale.scale1,
270
+ hover: lightScale.scale1,
271
+ active: lightScale.scale1
272
+ },
273
+ divider: lightScale.scale1
274
+ },
275
+ color: {
276
+ default: white
277
+ }
278
+ },
279
+ calendar: {
280
+ background: {
281
+ container: colors.contrast10,
282
+ hover: lightScale.scale1,
283
+ active: colors.brand,
284
+ activeHover: colors.brandShade1,
285
+ activeRange: colors.brandTint4
286
+ },
287
+ color: {
288
+ disabled: lightScale.scale4,
289
+ default: lightScale.scale10,
290
+ active: colors.contrast10,
291
+ current: colors.brand,
292
+ outside: lightScale.scale6,
293
+ weekday: lightScale.scale8,
294
+ monthYear: lightScale.scale8,
295
+ iconDefault: lightScale.scale6,
296
+ iconDisabled: lightScale.scale2,
297
+ iconHover: lightScale.scale10
298
+ }
299
+ },
300
+ defaultBorder: `1px solid ${lightScale.scale1}`,
301
+ formControl: {
302
+ color: {
303
+ default: lightScale.scale8,
304
+ hover: lightScale.scale10,
305
+ active: colors.brand,
306
+ activeHover: colors.brandShade1,
307
+ disabled: lightScale.scale4
308
+ }
309
+ },
310
+ input: {
311
+ borderRadius: 4,
312
+ background: {
313
+ default: lightScale.scale0,
314
+ hover: lightScale.scale1,
315
+ focused: lightScale.scale1,
316
+ disabled: lightScale.scale0,
317
+ invalid: colors.errorTint2,
318
+ invalidHover: colors.errorTint1
319
+ },
320
+ color: {
321
+ default: lightScale.scale10,
322
+ disabled: lightScale.scale4,
323
+ placeholder: lightScale.scale6,
324
+ description: lightScale.scale6,
325
+ descriptionError: colors.error
326
+ },
327
+ borderColor: {
328
+ default: lightScale.scale6,
329
+ hover: lightScale.scale8,
330
+ focused: colors.brand,
331
+ disabled: lightScale.scale4,
332
+ error: colors.error
333
+ },
334
+ labelColor: {
335
+ default: lightScale.scale8,
336
+ hover: lightScale.scale8,
337
+ filled: lightScale.scale6,
338
+ focused: colors.brand,
339
+ disabled: lightScale.scale4
340
+ }
341
+ },
342
+ menu: {
343
+ background: white
344
+ },
345
+ menuItem: {
346
+ borderColor: colors.brand,
347
+ background: {
348
+ active: lightScale.scale0,
349
+ hover: lightScale.scale1,
350
+ inactive: 'transparent'
351
+ },
352
+ color: {
353
+ active: lightScale.scale10,
354
+ hover: lightScale.scale10,
355
+ inactive: lightScale.scale6
356
+ }
357
+ },
358
+ modal: {
359
+ background: colors.contrast10,
360
+ color: {
361
+ header: lightScale.scale10,
362
+ body: lightScale.scale6
363
+ }
364
+ },
365
+ options: {
366
+ background: colors.contrast10,
367
+ backdropFilter: void 0
368
+ },
369
+ optionItem: {
370
+ background: {
371
+ hover: lightScale.scale0,
372
+ active: lightScale.scale1,
373
+ inactive: 'transparent'
374
+ },
375
+ color: {
376
+ active: lightScale.scale10,
377
+ inactive: lightScale.scale10,
378
+ accent: colors.brand
379
+ }
380
+ },
381
+ table: {
382
+ color: {
383
+ header: lightScale.scale6,
384
+ body: lightScale.scale10
385
+ },
386
+ backgroundLevel: {
387
+ 0: lightScale.background0,
388
+ 1: lightScale.background1,
389
+ 2: lightScale.background2,
390
+ 3: lightScale.background3,
391
+ 4: lightScale.background4,
392
+ 5: lightScale.background5
393
+ },
394
+ borderColor: lightScale.scale1
395
+ },
396
+ tag: {
397
+ default: {
398
+ background: lightScale.scale1,
399
+ backgroundHover: lightScale.scale2,
400
+ backgroundDisabled: lightScale.scale0
401
+ },
402
+ error: {
403
+ background: colors.errorTint2,
404
+ backgroundHover: colors.error,
405
+ backgroundDisabled: colors.errorTint1
406
+ },
407
+ success: {
408
+ background: colors.successTint2,
409
+ backgroundHover: colors.success,
410
+ backgroundDisabled: colors.successTint1
411
+ },
412
+ warning: {
413
+ background: colors.warningTint2,
414
+ backgroundHover: colors.warning,
415
+ backgroundDisabled: colors.warningTint1
416
+ }
417
+ },
418
+ toast: {
419
+ color: lightScale.scale10,
420
+ background: {
421
+ default: '#FFE6F5',
422
+ info: '#E0F9FF',
423
+ success: '#E4FFE0',
424
+ warning: '#FFF5CC',
425
+ error: '#FFD6E0'
426
+ },
427
+ border: {
428
+ default: lightScale.scale8,
429
+ info: colors.brand,
430
+ success: colors.success,
431
+ warning: colors.warning,
432
+ error: colors.error
433
+ }
434
+ },
435
+ toggle: {
436
+ slider: colors.contrast10
437
+ },
438
+ tooltip: {
439
+ background: '#FFF',
440
+ color: {
441
+ default: lightScale.scale10,
442
+ subtext: lightScale.scale6
443
+ }
444
+ },
445
+ editor: {
446
+ highlight: {
447
+ yellow: colors.alert,
448
+ blue: colors.brandDarkShade1,
449
+ red: colors.error,
450
+ green: colors.success,
451
+ orange: colors.warning
452
+ }
453
+ }
454
+ };
455
+ const light = light_light;
456
+ export { light as default };
@@ -0,0 +1,35 @@
1
+ import colors from "../colors.js";
2
+ const scale0 = colors.grayscale0;
3
+ const scale1 = colors.grayscale1;
4
+ const scale2 = colors.grayscale2;
5
+ const scale3 = colors.grayscale3;
6
+ const scale4 = colors.grayscale4;
7
+ const scale5 = colors.grayscale5;
8
+ const scale6 = colors.grayscale6;
9
+ const scale7 = colors.grayscale7;
10
+ const scale8 = colors.grayscale8;
11
+ const scale9 = colors.grayscale9;
12
+ const scale10 = colors.grayscale10;
13
+ const lightScale = {
14
+ scale0,
15
+ scale1,
16
+ scale2,
17
+ scale3,
18
+ scale4,
19
+ scale5,
20
+ scale6,
21
+ scale7,
22
+ scale8,
23
+ scale9,
24
+ scale10,
25
+ accent: colors.brand,
26
+ accentShade: colors.brandShade1,
27
+ background0: '#FFFDF2',
28
+ background1: '#F0EEE3',
29
+ background2: '#E1E5DC',
30
+ background3: '#D2D8CF',
31
+ background4: '#C3CBC2',
32
+ background5: '#B4BEB5'
33
+ };
34
+ const light_lightScale = lightScale;
35
+ export { light_lightScale as default };
@@ -0,0 +1,28 @@
1
+ import dark from "./core/dark/dark.js";
2
+ import light from "./core/light/light.js";
3
+ const theme = {
4
+ light: light,
5
+ dark: dark
6
+ };
7
+ const lib_theme = theme;
8
+ const themeClasses = [
9
+ 'light',
10
+ 'dark'
11
+ ];
12
+ const themeOptions = [
13
+ {
14
+ id: 'light',
15
+ value: 'Light',
16
+ classes: [
17
+ 'light'
18
+ ]
19
+ },
20
+ {
21
+ id: 'dark',
22
+ value: 'Dark',
23
+ classes: [
24
+ 'dark'
25
+ ]
26
+ }
27
+ ];
28
+ export { lib_theme as default, themeClasses, themeOptions };
@@ -0,0 +1,13 @@
1
+ const chunk_chunk = (array, chunkLength)=>{
2
+ const copy = [
3
+ ...array
4
+ ];
5
+ const chunkArray = [];
6
+ while(copy.length > 0){
7
+ const subArray = copy.splice(0, chunkLength);
8
+ chunkArray.push(subArray);
9
+ }
10
+ return chunkArray;
11
+ };
12
+ const chunk = chunk_chunk;
13
+ export { chunk as default };
@@ -0,0 +1,29 @@
1
+ const legacyCopy = (text)=>{
2
+ try {
3
+ const textArea = document.createElement('textarea');
4
+ textArea.value = text;
5
+ textArea.setAttribute('readonly', '');
6
+ textArea.style.position = 'fixed';
7
+ textArea.style.top = '0';
8
+ textArea.style.left = '0';
9
+ textArea.style.opacity = '0';
10
+ document.body.appendChild(textArea);
11
+ textArea.select();
12
+ textArea.setSelectionRange(0, text.length);
13
+ const successful = document.execCommand('copy');
14
+ document.body.removeChild(textArea);
15
+ if (!successful) console.error('Failed to copy text to clipboard');
16
+ } catch (_) {
17
+ console.error('Failed to copy text to clipboard');
18
+ }
19
+ };
20
+ const copyToClipboard_copyToClipboard = (text)=>{
21
+ if ('undefined' == typeof window || 'undefined' == typeof document) return;
22
+ const canUseModernApi = 'undefined' != typeof navigator && navigator.clipboard && 'function' == typeof navigator.clipboard.writeText;
23
+ if (canUseModernApi) return void navigator.clipboard.writeText(text).catch(()=>{
24
+ legacyCopy(text);
25
+ });
26
+ legacyCopy(text);
27
+ };
28
+ const copyToClipboard = copyToClipboard_copyToClipboard;
29
+ export { copyToClipboard as default };
@@ -0,0 +1,4 @@
1
+ const isListSection = (item)=>'object' == typeof item && null !== item && 'options' in item;
2
+ const flattenListOptions = (options)=>options.flatMap((item)=>isListSection(item) ? item.options : item);
3
+ const utils_flattenListOptions = flattenListOptions;
4
+ export { utils_flattenListOptions as default };
@@ -0,0 +1,55 @@
1
+ import { differenceInMinutes, differenceInWeeks, format, isFuture, isThisYear, isToday, isTomorrow, isYesterday } from "date-fns";
2
+ const formatDate = (value, option)=>{
3
+ if (!value) return '';
4
+ const date = new Date(value);
5
+ let timeSpec = option;
6
+ let lowercase = false;
7
+ if ('object' == typeof option) {
8
+ timeSpec = option.time;
9
+ lowercase = !!option.lowercase;
10
+ }
11
+ const onlyTime = 'onlyTime' === timeSpec || false;
12
+ const withTime = 'withTime' === timeSpec || false;
13
+ const relative = 'relative' === timeSpec || false;
14
+ const now = new Date();
15
+ const dayName = format(date, 'EEEE');
16
+ const outsideWeek = format(date, 'MMM d');
17
+ const fullDate = format(date, 'MMM d, y');
18
+ const time = format(date, 'h:mm aaa');
19
+ const thisYear = isThisYear(date);
20
+ const future = isFuture(date);
21
+ const today = isToday(date);
22
+ const yesterday = isYesterday(date);
23
+ const tomorrow = isTomorrow(date);
24
+ const diffMin = differenceInMinutes(now, date);
25
+ const diffWeeks = differenceInWeeks(now, date);
26
+ const withinMin = diffMin >= -10 && diffMin <= 10;
27
+ const withTimeString = withTime || relative ? `, ${time}` : '';
28
+ const final = (dateString)=>{
29
+ if (lowercase) {
30
+ const lowercaseWords = [
31
+ 'Just',
32
+ 'Yesterday',
33
+ 'Today',
34
+ 'Tomorrow'
35
+ ];
36
+ const toLower = lowercaseWords.some((word)=>dateString.includes(word));
37
+ return toLower ? dateString.toLowerCase() : dateString;
38
+ }
39
+ return dateString;
40
+ };
41
+ if (onlyTime) return final(time);
42
+ if (relative) {
43
+ if (0 === diffMin) return final('Just now');
44
+ if (withinMin) return final(future ? `Today, in ${-1 * diffMin} min.` : `${diffMin} min. ago`);
45
+ if (today) return final(future ? `Today${withTimeString}` : time);
46
+ }
47
+ if (today) return final(`Today${withTimeString}`);
48
+ if (yesterday) return final(`Yesterday${withTimeString}`);
49
+ if (tomorrow) return final(`Tomorrow${withTimeString}`);
50
+ if (0 === diffWeeks && !future) return final(`${dayName}${withTimeString}`);
51
+ if (thisYear) return final(`${outsideWeek}${withTimeString}`);
52
+ return final(`${fullDate}${withTimeString}`);
53
+ };
54
+ const utils_formatDate = formatDate;
55
+ export { utils_formatDate as default };
@@ -0,0 +1,6 @@
1
+ import chunk from "./chunk.js";
2
+ import copyToClipboard from "./copyToClipboard.js";
3
+ import formatDate from "./formatDate.js";
4
+ import numberWithCommas from "./numberWithCommas.js";
5
+ import range from "./range.js";
6
+ export { chunk, copyToClipboard, formatDate, numberWithCommas, range };
@@ -0,0 +1,3 @@
1
+ const numberWithCommas = (number)=>number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
2
+ const utils_numberWithCommas = numberWithCommas;
3
+ export { utils_numberWithCommas as default };
@@ -0,0 +1,11 @@
1
+ function range(from, to, step = 1) {
2
+ let i = to ? from : 0;
3
+ const end = to || from;
4
+ const numbers = [];
5
+ while(i <= end){
6
+ numbers.push(i);
7
+ i += step;
8
+ }
9
+ return numbers;
10
+ }
11
+ export { range as default };
package/package.json CHANGED
@@ -1,12 +1,16 @@
1
1
  {
2
2
  "name": "@wavv/ui",
3
- "version": "2.2.2-alpha.4",
3
+ "version": "2.2.2-alpha.6",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./build/index.d.ts",
8
8
  "import": "./build/index.js"
9
9
  },
10
+ "./*": {
11
+ "types": "./build/*.d.ts",
12
+ "import": "./build/*.js"
13
+ },
10
14
  "./theme.css": "./build/tailwind/theme.css"
11
15
  },
12
16
  "types": "./build/index.d.ts",
@@ -37,13 +41,13 @@
37
41
  "@tiptap/pm": "^3.8.0",
38
42
  "@tiptap/react": "^3.8.0",
39
43
  "@tiptap/starter-kit": "^3.8.0",
40
- "aveta": "^1.5.2",
41
44
  "cmdk": "^1.1.1",
42
45
  "date-fns": "^4.1.0",
43
46
  "draft-js": "^0.11.7",
44
47
  "es-toolkit": "^1.41.0",
45
48
  "libphonenumber-js": "^1.12.25",
46
49
  "lucide-react": "^0.548.0",
50
+ "millify": "^6.1.0",
47
51
  "polished": "^4.1.4",
48
52
  "prism-react-renderer": "^2.4.1",
49
53
  "react-aria": "3.44.0",