@taiv/ui 1.15.0 → 2.0.0

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 (393) hide show
  1. package/dist/assets/assets.d.ts +12 -1
  2. package/dist/assets/assets.d.ts.map +1 -1
  3. package/dist/assets/assets.js +22 -16
  4. package/dist/assets/brand/taiv-favicon-dark.png +0 -0
  5. package/dist/assets/brand/taiv-favicon-light.png +0 -0
  6. package/dist/assets/brand/taiv-icon-black.svg +10 -0
  7. package/dist/assets/brand/taiv-icon-dark.svg +17 -0
  8. package/dist/assets/brand/taiv-icon-white.svg +17 -0
  9. package/dist/assets/brand/taiv-logo-black.svg +16 -0
  10. package/dist/assets/brand/taiv-logo-dark.svg +23 -0
  11. package/dist/assets/brand/taiv-logo-old.svg +1 -0
  12. package/dist/assets/brand/taiv-logo-purple.svg +16 -0
  13. package/dist/assets/brand/taiv-logo-white.svg +23 -0
  14. package/dist/assets/icons.d.ts +1 -1
  15. package/dist/assets/icons.d.ts.map +1 -1
  16. package/dist/assets/icons.js +57 -53
  17. package/dist/assets/index.d.ts +3 -0
  18. package/dist/assets/index.d.ts.map +1 -0
  19. package/dist/assets/index.js +2 -0
  20. package/dist/components/Data/BigCalendar/BigCalendar.d.ts +26 -0
  21. package/dist/components/Data/BigCalendar/BigCalendar.d.ts.map +1 -0
  22. package/dist/components/Data/BigCalendar/BigCalendar.js +54 -0
  23. package/dist/components/Data/BigCalendar/BigCalendar.stories.d.ts +8 -0
  24. package/dist/components/Data/BigCalendar/BigCalendar.stories.d.ts.map +1 -0
  25. package/dist/components/Data/BigCalendar/BigCalendar.stories.js +77 -0
  26. package/dist/components/Data/Calendar/Calendar.d.ts +102 -0
  27. package/dist/components/Data/Calendar/Calendar.d.ts.map +1 -0
  28. package/dist/components/Data/Calendar/Calendar.js +671 -0
  29. package/dist/components/Data/Calendar/Calendar.stories.d.ts +10 -0
  30. package/dist/components/Data/Calendar/Calendar.stories.d.ts.map +1 -0
  31. package/dist/components/Data/Calendar/Calendar.stories.js +87 -0
  32. package/dist/components/Data/MediaPill/MediaPill.d.ts +27 -0
  33. package/dist/components/Data/MediaPill/MediaPill.d.ts.map +1 -0
  34. package/dist/components/Data/MediaPill/MediaPill.js +53 -0
  35. package/dist/components/Data/MediaPill/MediaPill.stories.d.ts +10 -0
  36. package/dist/components/Data/MediaPill/MediaPill.stories.d.ts.map +1 -0
  37. package/dist/components/Data/MediaPill/MediaPill.stories.js +51 -0
  38. package/dist/components/Info/Avatar/Avatar.d.ts +9 -0
  39. package/dist/components/Info/Avatar/Avatar.d.ts.map +1 -0
  40. package/dist/components/Info/Avatar/Avatar.js +36 -0
  41. package/dist/components/Info/Avatar/Avatar.stories.d.ts +9 -0
  42. package/dist/components/Info/Avatar/Avatar.stories.d.ts.map +1 -0
  43. package/dist/components/Info/Avatar/Avatar.stories.js +78 -0
  44. package/dist/components/Info/Badge/Badge.stories.d.ts.map +1 -1
  45. package/dist/components/Info/Badge/Badge.stories.js +21 -6
  46. package/dist/components/Info/Badge/sizes.d.ts +10 -10
  47. package/dist/components/Info/Badge/sizes.js +16 -16
  48. package/dist/components/Info/Badge/variants.d.ts +4 -4
  49. package/dist/components/Info/Badge/variants.d.ts.map +1 -1
  50. package/dist/components/Info/Badge/variants.js +26 -13
  51. package/dist/components/Info/Drawer/Drawer.d.ts +24 -0
  52. package/dist/components/Info/Drawer/Drawer.d.ts.map +1 -0
  53. package/dist/components/Info/Drawer/Drawer.js +44 -0
  54. package/dist/components/Info/Drawer/Drawer.stories.d.ts +10 -0
  55. package/dist/components/Info/Drawer/Drawer.stories.d.ts.map +1 -0
  56. package/dist/components/Info/Drawer/Drawer.stories.js +47 -0
  57. package/dist/components/Info/HoverCard/HoverCard.d.ts +16 -0
  58. package/dist/components/Info/HoverCard/HoverCard.d.ts.map +1 -0
  59. package/dist/components/Info/HoverCard/HoverCard.js +26 -0
  60. package/dist/components/Info/HoverCard/HoverCard.stories.d.ts +11 -0
  61. package/dist/components/Info/HoverCard/HoverCard.stories.d.ts.map +1 -0
  62. package/dist/components/Info/HoverCard/HoverCard.stories.js +86 -0
  63. package/dist/components/Info/HoverCard/HoverCardMenuItem.d.ts +12 -0
  64. package/dist/components/Info/HoverCard/HoverCardMenuItem.d.ts.map +1 -0
  65. package/dist/components/Info/HoverCard/HoverCardMenuItem.js +22 -0
  66. package/dist/components/Info/Indicator/Indicator.d.ts +3 -0
  67. package/dist/components/Info/Indicator/Indicator.d.ts.map +1 -0
  68. package/dist/components/Info/Indicator/Indicator.js +1 -0
  69. package/dist/components/Info/Indicator/Indicator.stories.d.ts +11 -0
  70. package/dist/components/Info/Indicator/Indicator.stories.d.ts.map +1 -0
  71. package/dist/components/Info/Indicator/Indicator.stories.js +123 -0
  72. package/dist/components/Info/InfoCard/InfoCard.d.ts +2 -2
  73. package/dist/components/Info/InfoCard/InfoCard.d.ts.map +1 -1
  74. package/dist/components/Info/InfoCard/InfoCard.js +5 -5
  75. package/dist/components/Info/MobileDrawer/MobileDrawer.d.ts +30 -0
  76. package/dist/components/Info/MobileDrawer/MobileDrawer.d.ts.map +1 -0
  77. package/dist/components/Info/MobileDrawer/MobileDrawer.js +52 -0
  78. package/dist/components/Info/MobileDrawer/MobileDrawer.stories.d.ts +9 -0
  79. package/dist/components/Info/MobileDrawer/MobileDrawer.stories.d.ts.map +1 -0
  80. package/dist/components/Info/MobileDrawer/MobileDrawer.stories.js +38 -0
  81. package/dist/components/Info/Modals/FormModal/FormModal.d.ts +17 -1
  82. package/dist/components/Info/Modals/FormModal/FormModal.d.ts.map +1 -1
  83. package/dist/components/Info/Modals/FormModal/FormModal.js +30 -12
  84. package/dist/components/Info/Modals/FormModalV2/FormModalV2.d.ts +60 -0
  85. package/dist/components/Info/Modals/FormModalV2/FormModalV2.d.ts.map +1 -0
  86. package/dist/components/Info/Modals/FormModalV2/FormModalV2.js +96 -0
  87. package/dist/components/Info/Modals/Modal/Modal.d.ts.map +1 -1
  88. package/dist/components/Info/Modals/Modal/Modal.js +9 -1
  89. package/dist/components/Info/Modals/variants.d.ts +61 -41
  90. package/dist/components/Info/Modals/variants.d.ts.map +1 -1
  91. package/dist/components/Info/Modals/variants.js +58 -38
  92. package/dist/components/Info/Notifications/Notifications.stories.d.ts +1 -0
  93. package/dist/components/Info/Notifications/Notifications.stories.d.ts.map +1 -1
  94. package/dist/components/Info/Notifications/Notifications.stories.js +31 -0
  95. package/dist/components/Info/Notifications/variants.d.ts +25 -19
  96. package/dist/components/Info/Notifications/variants.d.ts.map +1 -1
  97. package/dist/components/Info/Notifications/variants.js +30 -24
  98. package/dist/components/Info/ResponsiveDrawer/ResponsiveDrawer.d.ts +37 -0
  99. package/dist/components/Info/ResponsiveDrawer/ResponsiveDrawer.d.ts.map +1 -0
  100. package/dist/components/Info/ResponsiveDrawer/ResponsiveDrawer.js +17 -0
  101. package/dist/components/Info/ResponsiveDrawer/ResponsiveDrawer.stories.d.ts +7 -0
  102. package/dist/components/Info/ResponsiveDrawer/ResponsiveDrawer.stories.d.ts.map +1 -0
  103. package/dist/components/Info/ResponsiveDrawer/ResponsiveDrawer.stories.js +26 -0
  104. package/dist/components/Info/Tooltips/InfoTooltip/InfoTooltip.d.ts +1 -1
  105. package/dist/components/Info/Tooltips/InfoTooltip/InfoTooltip.d.ts.map +1 -1
  106. package/dist/components/Info/Tooltips/InfoTooltip/InfoTooltip.js +9 -3
  107. package/dist/components/Info/Tooltips/Popover/Popover.d.ts +16 -0
  108. package/dist/components/Info/Tooltips/Popover/Popover.d.ts.map +1 -0
  109. package/dist/components/Info/Tooltips/Popover/Popover.js +32 -0
  110. package/dist/components/Info/Tooltips/Tooltip/Tooltip.d.ts +5 -1
  111. package/dist/components/Info/Tooltips/Tooltip/Tooltip.d.ts.map +1 -1
  112. package/dist/components/Info/Tooltips/Tooltip/Tooltip.js +10 -8
  113. package/dist/components/Inputs/Buttons/Button/Button.d.ts +3 -1
  114. package/dist/components/Inputs/Buttons/Button/Button.d.ts.map +1 -1
  115. package/dist/components/Inputs/Buttons/Button/Button.js +38 -5
  116. package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts +1 -0
  117. package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts.map +1 -1
  118. package/dist/components/Inputs/Buttons/Button/Button.stories.js +105 -79
  119. package/dist/components/Inputs/Buttons/IconButton/IconButton.d.ts +7 -2
  120. package/dist/components/Inputs/Buttons/IconButton/IconButton.d.ts.map +1 -1
  121. package/dist/components/Inputs/Buttons/IconButton/IconButton.js +35 -11
  122. package/dist/components/Inputs/Buttons/IconButton/IconButton.stories.d.ts +1 -0
  123. package/dist/components/Inputs/Buttons/IconButton/IconButton.stories.d.ts.map +1 -1
  124. package/dist/components/Inputs/Buttons/IconButton/IconButton.stories.js +100 -74
  125. package/dist/components/Inputs/Buttons/IconButton/sizes.d.ts +15 -0
  126. package/dist/components/Inputs/Buttons/IconButton/sizes.d.ts.map +1 -1
  127. package/dist/components/Inputs/Buttons/IconButton/sizes.js +3 -0
  128. package/dist/components/Inputs/Buttons/shared/variants.d.ts +399 -164
  129. package/dist/components/Inputs/Buttons/shared/variants.d.ts.map +1 -1
  130. package/dist/components/Inputs/Buttons/shared/variants.js +353 -143
  131. package/dist/components/Inputs/ColorPickerTrigger/ColorPickerTrigger.d.ts +40 -0
  132. package/dist/components/Inputs/ColorPickerTrigger/ColorPickerTrigger.d.ts.map +1 -0
  133. package/dist/components/Inputs/ColorPickerTrigger/ColorPickerTrigger.js +139 -0
  134. package/dist/components/Inputs/ColorPickerTrigger/ColorPickerTrigger.stories.d.ts +13 -0
  135. package/dist/components/Inputs/ColorPickerTrigger/ColorPickerTrigger.stories.d.ts.map +1 -0
  136. package/dist/components/Inputs/ColorPickerTrigger/ColorPickerTrigger.stories.js +75 -0
  137. package/dist/components/Inputs/ColorSwatch/ColorSwatch.d.ts +27 -0
  138. package/dist/components/Inputs/ColorSwatch/ColorSwatch.d.ts.map +1 -0
  139. package/dist/components/Inputs/ColorSwatch/ColorSwatch.js +46 -0
  140. package/dist/components/Inputs/Controls/DaysOfWeek/DaysOfWeek.d.ts +32 -0
  141. package/dist/components/Inputs/Controls/DaysOfWeek/DaysOfWeek.d.ts.map +1 -0
  142. package/dist/components/Inputs/Controls/DaysOfWeek/DaysOfWeek.js +92 -0
  143. package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.d.ts +11 -8
  144. package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  145. package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.js +20 -12
  146. package/dist/components/Inputs/Controls/Toggle/Toggle.d.ts +25 -11
  147. package/dist/components/Inputs/Controls/Toggle/Toggle.d.ts.map +1 -1
  148. package/dist/components/Inputs/Controls/Toggle/Toggle.js +67 -20
  149. package/dist/components/Inputs/Controls/Toggle/Toggle.stories.d.ts +1 -0
  150. package/dist/components/Inputs/Controls/Toggle/Toggle.stories.d.ts.map +1 -1
  151. package/dist/components/Inputs/Controls/Toggle/Toggle.stories.js +86 -69
  152. package/dist/components/Inputs/Dates/DatePicker/DatePicker.d.ts.map +1 -1
  153. package/dist/components/Inputs/Dates/DatePicker/DatePicker.js +23 -7
  154. package/dist/components/Inputs/Dates/DateTimePicker/DateTimePicker.d.ts +12 -0
  155. package/dist/components/Inputs/Dates/DateTimePicker/DateTimePicker.d.ts.map +1 -0
  156. package/dist/components/Inputs/Dates/DateTimePicker/DateTimePicker.js +87 -0
  157. package/dist/components/Inputs/Dates/DateTimePicker/DateTimePicker.stories.d.ts +13 -0
  158. package/dist/components/Inputs/Dates/DateTimePicker/DateTimePicker.stories.d.ts.map +1 -0
  159. package/dist/components/Inputs/Dates/DateTimePicker/DateTimePicker.stories.js +239 -0
  160. package/dist/components/Inputs/Dates/TimeInput/TimeInput.d.ts +19 -0
  161. package/dist/components/Inputs/Dates/TimeInput/TimeInput.d.ts.map +1 -0
  162. package/dist/components/Inputs/Dates/TimeInput/TimeInput.js +51 -0
  163. package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.d.ts.map +1 -1
  164. package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.js +8 -1
  165. package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.d.ts +2 -2
  166. package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.d.ts.map +1 -1
  167. package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.js +76 -57
  168. package/dist/components/Inputs/Dropdowns/Select/Select.d.ts.map +1 -1
  169. package/dist/components/Inputs/Dropdowns/Select/Select.js +5 -3
  170. package/dist/components/Inputs/Dropzone/Dropzone.d.ts +23 -0
  171. package/dist/components/Inputs/Dropzone/Dropzone.d.ts.map +1 -0
  172. package/dist/components/Inputs/Dropzone/Dropzone.js +44 -0
  173. package/dist/components/Inputs/Dropzone/Dropzone.stories.d.ts +12 -0
  174. package/dist/components/Inputs/Dropzone/Dropzone.stories.d.ts.map +1 -0
  175. package/dist/components/Inputs/Dropzone/Dropzone.stories.js +114 -0
  176. package/dist/components/Inputs/TextInputs/NumberInput/NumberInput.d.ts.map +1 -1
  177. package/dist/components/Inputs/TextInputs/NumberInput/NumberInput.js +4 -1
  178. package/dist/components/Inputs/TextInputs/NumberInput/ResponsiveNumberInput.d.ts +46 -0
  179. package/dist/components/Inputs/TextInputs/NumberInput/ResponsiveNumberInput.d.ts.map +1 -0
  180. package/dist/components/Inputs/TextInputs/NumberInput/ResponsiveNumberInput.js +60 -0
  181. package/dist/components/Layout/Accordion/Accordion.d.ts +16 -0
  182. package/dist/components/Layout/Accordion/Accordion.d.ts.map +1 -0
  183. package/dist/components/Layout/Accordion/Accordion.js +63 -0
  184. package/dist/components/Layout/Accordion/Accordion.stories.d.ts +11 -0
  185. package/dist/components/Layout/Accordion/Accordion.stories.d.ts.map +1 -0
  186. package/dist/components/Layout/Accordion/Accordion.stories.js +148 -0
  187. package/dist/components/Layout/AutoGrid/AutoGrid.d.ts +20 -5
  188. package/dist/components/Layout/AutoGrid/AutoGrid.d.ts.map +1 -1
  189. package/dist/components/Layout/AutoGrid/AutoGrid.js +51 -3
  190. package/dist/components/Layout/AutoGrid/AutoGrid.stories.d.ts +1 -0
  191. package/dist/components/Layout/AutoGrid/AutoGrid.stories.d.ts.map +1 -1
  192. package/dist/components/Layout/AutoGrid/AutoGrid.stories.js +39 -29
  193. package/dist/components/Layout/BottomActionBar/BottomActionBar.d.ts +40 -0
  194. package/dist/components/Layout/BottomActionBar/BottomActionBar.d.ts.map +1 -0
  195. package/dist/components/Layout/BottomActionBar/BottomActionBar.js +79 -0
  196. package/dist/components/Layout/BottomActionBar/BottomActionBar.stories.d.ts +10 -0
  197. package/dist/components/Layout/BottomActionBar/BottomActionBar.stories.d.ts.map +1 -0
  198. package/dist/components/Layout/BottomActionBar/BottomActionBar.stories.js +102 -0
  199. package/dist/components/Layout/Card/Card.d.ts +1 -1
  200. package/dist/components/Layout/Card/Card.d.ts.map +1 -1
  201. package/dist/components/Layout/Container/Container.d.ts +3 -0
  202. package/dist/components/Layout/Container/Container.d.ts.map +1 -0
  203. package/dist/components/Layout/Container/Container.js +1 -0
  204. package/dist/components/Layout/Container/Container.stories.d.ts +8 -0
  205. package/dist/components/Layout/Container/Container.stories.d.ts.map +1 -0
  206. package/dist/components/Layout/Container/Container.stories.js +52 -0
  207. package/dist/components/Layout/DataState/DataState.d.ts +34 -0
  208. package/dist/components/Layout/DataState/DataState.d.ts.map +1 -0
  209. package/dist/components/Layout/DataState/DataState.js +22 -0
  210. package/dist/components/Layout/DataState/DataState.stories.d.ts +11 -0
  211. package/dist/components/Layout/DataState/DataState.stories.d.ts.map +1 -0
  212. package/dist/components/Layout/DataState/DataState.stories.js +38 -0
  213. package/dist/components/Layout/Divider/Divider.d.ts.map +1 -1
  214. package/dist/components/Layout/Divider/Divider.js +4 -2
  215. package/dist/components/Layout/Group/Group.d.ts +1 -1
  216. package/dist/components/Layout/Group/Group.d.ts.map +1 -1
  217. package/dist/components/Layout/Loader/Loader.d.ts +1 -1
  218. package/dist/components/Layout/Loader/Loader.d.ts.map +1 -1
  219. package/dist/components/Layout/Loader/Loader.js +3 -2
  220. package/dist/components/Layout/Navbar/Navbar.d.ts +15 -0
  221. package/dist/components/Layout/Navbar/Navbar.d.ts.map +1 -0
  222. package/dist/components/Layout/Navbar/Navbar.js +20 -0
  223. package/dist/components/Layout/Navbar/Navbar.stories.d.ts +9 -0
  224. package/dist/components/Layout/Navbar/Navbar.stories.d.ts.map +1 -0
  225. package/dist/components/Layout/Navbar/Navbar.stories.js +98 -0
  226. package/dist/components/Layout/Page/Page.d.ts +13 -0
  227. package/dist/components/Layout/Page/Page.d.ts.map +1 -0
  228. package/dist/components/Layout/Page/Page.js +13 -0
  229. package/dist/components/Layout/Pagination/Pagination.d.ts +23 -0
  230. package/dist/components/Layout/Pagination/Pagination.d.ts.map +1 -0
  231. package/dist/components/Layout/Pagination/Pagination.js +53 -0
  232. package/dist/components/Layout/Pagination/Pagination.stories.d.ts +10 -0
  233. package/dist/components/Layout/Pagination/Pagination.stories.d.ts.map +1 -0
  234. package/dist/components/Layout/Pagination/Pagination.stories.js +76 -0
  235. package/dist/components/Layout/ScrollArea/ScrollArea.d.ts +3 -0
  236. package/dist/components/Layout/ScrollArea/ScrollArea.d.ts.map +1 -0
  237. package/dist/components/Layout/ScrollArea/ScrollArea.js +1 -0
  238. package/dist/components/Layout/ScrollArea/ScrollArea.stories.d.ts +8 -0
  239. package/dist/components/Layout/ScrollArea/ScrollArea.stories.d.ts.map +1 -0
  240. package/dist/components/Layout/ScrollArea/ScrollArea.stories.js +62 -0
  241. package/dist/components/Layout/Tabs/Tabs.d.ts +16 -5
  242. package/dist/components/Layout/Tabs/Tabs.d.ts.map +1 -1
  243. package/dist/components/Layout/Tabs/Tabs.js +53 -18
  244. package/dist/components/Layout/Tabs/Tabs.stories.d.ts.map +1 -1
  245. package/dist/components/Layout/Tabs/Tabs.stories.js +39 -39
  246. package/dist/components/Layout/VirtualGrid/VirtualGrid.d.ts +63 -0
  247. package/dist/components/Layout/VirtualGrid/VirtualGrid.d.ts.map +1 -0
  248. package/dist/components/Layout/VirtualGrid/VirtualGrid.js +159 -0
  249. package/dist/components/Misc/Burger/Burger.d.ts +6 -0
  250. package/dist/components/Misc/Burger/Burger.d.ts.map +1 -0
  251. package/dist/components/Misc/Burger/Burger.js +7 -0
  252. package/dist/components/Misc/Burger/Burger.stories.d.ts +10 -0
  253. package/dist/components/Misc/Burger/Burger.stories.d.ts.map +1 -0
  254. package/dist/components/Misc/Burger/Burger.stories.js +86 -0
  255. package/dist/components/Misc/Carousel/Carousel.d.ts +32 -0
  256. package/dist/components/Misc/Carousel/Carousel.d.ts.map +1 -0
  257. package/dist/components/Misc/Carousel/Carousel.js +16 -0
  258. package/dist/components/Misc/DragHandle/DragHandle.d.ts +19 -0
  259. package/dist/components/Misc/DragHandle/DragHandle.d.ts.map +1 -0
  260. package/dist/components/Misc/DragHandle/DragHandle.js +39 -0
  261. package/dist/components/Misc/DragHandle/DragHandle.stories.d.ts +9 -0
  262. package/dist/components/Misc/DragHandle/DragHandle.stories.d.ts.map +1 -0
  263. package/dist/components/Misc/DragHandle/DragHandle.stories.js +54 -0
  264. package/dist/components/Misc/FAB/FAB.d.ts +54 -0
  265. package/dist/components/Misc/FAB/FAB.d.ts.map +1 -0
  266. package/dist/components/Misc/FAB/FAB.js +53 -0
  267. package/dist/components/Misc/FAB/FAB.stories.d.ts +10 -0
  268. package/dist/components/Misc/FAB/FAB.stories.d.ts.map +1 -0
  269. package/dist/components/Misc/FAB/FAB.stories.js +100 -0
  270. package/dist/components/Misc/FloatingToolbar/FloatingToolbar.d.ts +50 -0
  271. package/dist/components/Misc/FloatingToolbar/FloatingToolbar.d.ts.map +1 -0
  272. package/dist/components/Misc/FloatingToolbar/FloatingToolbar.js +40 -0
  273. package/dist/components/Misc/FloatingToolbar/FloatingToolbar.stories.d.ts +9 -0
  274. package/dist/components/Misc/FloatingToolbar/FloatingToolbar.stories.d.ts.map +1 -0
  275. package/dist/components/Misc/FloatingToolbar/FloatingToolbar.stories.js +53 -0
  276. package/dist/components/Misc/HoverAction/HoverAction.d.ts +50 -0
  277. package/dist/components/Misc/HoverAction/HoverAction.d.ts.map +1 -0
  278. package/dist/components/Misc/HoverAction/HoverAction.js +61 -0
  279. package/dist/components/Misc/HoverAction/HoverAction.stories.d.ts +12 -0
  280. package/dist/components/Misc/HoverAction/HoverAction.stories.d.ts.map +1 -0
  281. package/dist/components/Misc/HoverAction/HoverAction.stories.js +96 -0
  282. package/dist/components/Misc/IconBadge/IconBadge.d.ts.map +1 -1
  283. package/dist/components/Misc/IconBadge/IconBadge.js +8 -6
  284. package/dist/components/Misc/Image/Image.d.ts +3 -0
  285. package/dist/components/Misc/Image/Image.d.ts.map +1 -0
  286. package/dist/components/Misc/Image/Image.js +1 -0
  287. package/dist/components/Misc/Image/Image.stories.d.ts +11 -0
  288. package/dist/components/Misc/Image/Image.stories.d.ts.map +1 -0
  289. package/dist/components/Misc/Image/Image.stories.js +63 -0
  290. package/dist/components/Misc/Kbd/Kbd.d.ts +6 -0
  291. package/dist/components/Misc/Kbd/Kbd.d.ts.map +1 -0
  292. package/dist/components/Misc/Kbd/Kbd.js +16 -0
  293. package/dist/components/Misc/Kbd/Kbd.stories.d.ts +9 -0
  294. package/dist/components/Misc/Kbd/Kbd.stories.d.ts.map +1 -0
  295. package/dist/components/Misc/Kbd/Kbd.stories.js +52 -0
  296. package/dist/components/Misc/Menu/Menu.d.ts +17 -0
  297. package/dist/components/Misc/Menu/Menu.d.ts.map +1 -0
  298. package/dist/components/Misc/Menu/Menu.js +52 -0
  299. package/dist/components/Misc/OverflowFade/OverflowFade.d.ts +42 -0
  300. package/dist/components/Misc/OverflowFade/OverflowFade.d.ts.map +1 -0
  301. package/dist/components/Misc/OverflowFade/OverflowFade.js +110 -0
  302. package/dist/components/Misc/OverflowFade/OverflowFade.stories.d.ts +11 -0
  303. package/dist/components/Misc/OverflowFade/OverflowFade.stories.d.ts.map +1 -0
  304. package/dist/components/Misc/OverflowFade/OverflowFade.stories.js +112 -0
  305. package/dist/components/Misc/Picker/Picker.d.ts +62 -0
  306. package/dist/components/Misc/Picker/Picker.d.ts.map +1 -0
  307. package/dist/components/Misc/Picker/Picker.js +111 -0
  308. package/dist/components/Misc/Picker/Picker.stories.d.ts +14 -0
  309. package/dist/components/Misc/Picker/Picker.stories.d.ts.map +1 -0
  310. package/dist/components/Misc/Picker/Picker.stories.js +154 -0
  311. package/dist/components/Misc/SelectableObject/SelectableObject.d.ts +38 -0
  312. package/dist/components/Misc/SelectableObject/SelectableObject.d.ts.map +1 -0
  313. package/dist/components/Misc/SelectableObject/SelectableObject.js +70 -0
  314. package/dist/components/Misc/SelectableObject/SelectableObject.stories.d.ts +11 -0
  315. package/dist/components/Misc/SelectableObject/SelectableObject.stories.d.ts.map +1 -0
  316. package/dist/components/Misc/SelectableObject/SelectableObject.stories.js +84 -0
  317. package/dist/components/Misc/SelectionToolbar/SelectionToolbar.d.ts +26 -0
  318. package/dist/components/Misc/SelectionToolbar/SelectionToolbar.d.ts.map +1 -0
  319. package/dist/components/Misc/SelectionToolbar/SelectionToolbar.js +41 -0
  320. package/dist/components/Misc/SelectionToolbar/SelectionToolbar.stories.d.ts +10 -0
  321. package/dist/components/Misc/SelectionToolbar/SelectionToolbar.stories.d.ts.map +1 -0
  322. package/dist/components/Misc/SelectionToolbar/SelectionToolbar.stories.js +48 -0
  323. package/dist/components/Misc/Stepper/Step.stories.d.ts +118 -118
  324. package/dist/components/Misc/Stepper/variants.d.ts +1 -1
  325. package/dist/components/Misc/Timeline/Timeline.d.ts +18 -0
  326. package/dist/components/Misc/Timeline/Timeline.d.ts.map +1 -0
  327. package/dist/components/Misc/Timeline/Timeline.js +38 -0
  328. package/dist/components/Misc/Timeline/Timeline.stories.d.ts +8 -0
  329. package/dist/components/Misc/Timeline/Timeline.stories.d.ts.map +1 -0
  330. package/dist/components/Misc/Timeline/Timeline.stories.js +54 -0
  331. package/dist/components/Typography/InlineEditableText/InlineEditableText.d.ts +35 -0
  332. package/dist/components/Typography/InlineEditableText/InlineEditableText.d.ts.map +1 -0
  333. package/dist/components/Typography/InlineEditableText/InlineEditableText.js +112 -0
  334. package/dist/components/Typography/InlineEditableText/InlineEditableText.stories.d.ts +11 -0
  335. package/dist/components/Typography/InlineEditableText/InlineEditableText.stories.d.ts.map +1 -0
  336. package/dist/components/Typography/InlineEditableText/InlineEditableText.stories.js +48 -0
  337. package/dist/components/index.d.ts +148 -66
  338. package/dist/components/index.d.ts.map +1 -1
  339. package/dist/components/index.js +110 -68
  340. package/dist/constants/colors.d.ts +117 -91
  341. package/dist/constants/colors.d.ts.map +1 -1
  342. package/dist/constants/colors.js +56 -43
  343. package/dist/constants/font.d.ts +4 -4
  344. package/dist/constants/font.js +2 -2
  345. package/dist/hooks/index.d.ts +9 -1
  346. package/dist/hooks/index.d.ts.map +1 -1
  347. package/dist/hooks/index.js +7 -1
  348. package/dist/hooks/useConfirmationModal.d.ts.map +1 -1
  349. package/dist/hooks/useConfirmationModal.js +20 -1
  350. package/dist/hooks/useDisclosure.d.ts +11 -0
  351. package/dist/hooks/useDisclosure.d.ts.map +1 -0
  352. package/dist/hooks/useDisclosure.js +10 -0
  353. package/dist/hooks/useHeadroom.d.ts +18 -0
  354. package/dist/hooks/useHeadroom.d.ts.map +1 -0
  355. package/dist/hooks/useHeadroom.js +17 -0
  356. package/dist/hooks/useInfoModal.d.ts.map +1 -1
  357. package/dist/hooks/useInfoModal.js +13 -1
  358. package/dist/hooks/useMediaQuery.d.ts +1 -0
  359. package/dist/hooks/useMediaQuery.d.ts.map +1 -1
  360. package/dist/hooks/useMediaQuery.js +1 -0
  361. package/dist/hooks/useNotifications.d.ts +39 -7
  362. package/dist/hooks/useNotifications.d.ts.map +1 -1
  363. package/dist/hooks/useNotifications.js +108 -5
  364. package/dist/hooks/usePagination.d.ts +11 -0
  365. package/dist/hooks/usePagination.d.ts.map +1 -0
  366. package/dist/hooks/usePagination.js +2 -0
  367. package/dist/hooks/useScrollLock.d.ts +21 -0
  368. package/dist/hooks/useScrollLock.d.ts.map +1 -0
  369. package/dist/hooks/useScrollLock.js +20 -0
  370. package/dist/index.d.ts +5 -5
  371. package/dist/index.js +5 -5
  372. package/dist/styles/iosInputZoomFix.d.ts +31 -0
  373. package/dist/styles/iosInputZoomFix.d.ts.map +1 -0
  374. package/dist/styles/iosInputZoomFix.js +135 -0
  375. package/dist/utils/bytes.d.ts +10 -0
  376. package/dist/utils/bytes.d.ts.map +1 -0
  377. package/dist/utils/bytes.js +17 -0
  378. package/dist/utils/datetime.d.ts +18 -0
  379. package/dist/utils/datetime.d.ts.map +1 -0
  380. package/dist/utils/datetime.js +42 -0
  381. package/dist/utils/duration.d.ts +17 -0
  382. package/dist/utils/duration.d.ts.map +1 -0
  383. package/dist/utils/duration.js +30 -0
  384. package/dist/utils/index.d.ts +8 -2
  385. package/dist/utils/index.d.ts.map +1 -1
  386. package/dist/utils/index.js +7 -2
  387. package/dist/utils/sort.d.ts +44 -0
  388. package/dist/utils/sort.d.ts.map +1 -0
  389. package/dist/utils/sort.js +53 -0
  390. package/dist/utils/string.d.ts +22 -0
  391. package/dist/utils/string.d.ts.map +1 -0
  392. package/dist/utils/string.js +25 -0
  393. package/package.json +26 -2
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ /**
3
+ * iOS Safari auto-zooms when a focused form input has font-size < 16px AND
4
+ * the page's viewport allows zoom (`maximum-scale > 1`). Both conditions
5
+ * must hold; iOS evaluates them at focus time. We sidestep the zoom by
6
+ * temporarily setting `maximum-scale=1` on the viewport meta while the
7
+ * user is interacting with a text input, then restoring whatever was
8
+ * there before. The page's normal pinch-to-zoom remains available
9
+ * everywhere else.
10
+ *
11
+ * Why the viewport-swap approach over a CSS bump to 16px on mobile inputs:
12
+ * this preserves the toolkit's input typography exactly. No visual change
13
+ * at any breakpoint.
14
+ *
15
+ * **Why `pointerdown` and not `focusin`:** iOS commits the auto-zoom
16
+ * decision when focus is committed to the element, which happens BEFORE
17
+ * the DOM `focusin` event fires in our listener. Setting the viewport
18
+ * inside `focusin` is too late — iOS has already evaluated and queued
19
+ * the zoom animation. Listening on `pointerdown` (capture phase) lets
20
+ * us write the new viewport meta before the browser commits focus.
21
+ * `pointerdown` covers both touch and mouse uniformly.
22
+ *
23
+ * Composability with other viewport tweaks (e.g. `useEditorViewport` on
24
+ * the slide editor route): we capture the viewport content at lock time,
25
+ * not at module load. So whatever state the page is in when the user
26
+ * taps an input — default, slide-editor-locked, future overrides — is
27
+ * what we restore on blur. Setup-time capture would have stale state and
28
+ * clobber other modules that lock the viewport for their own reasons.
29
+ */
30
+ const VIEWPORT_FOCUSED = 'width=device-width, initial-scale=1, maximum-scale=1';
31
+ const setupIosInputZoomFix = () => {
32
+ // No-op on the server.
33
+ if (typeof document === 'undefined')
34
+ return;
35
+ const meta = document.querySelector('meta[name="viewport"]');
36
+ if (!meta)
37
+ return;
38
+ // Idempotency: a flag on the meta so HMR / multiple imports don't stack
39
+ // listeners. Using a DOM marker rather than a module-scoped boolean
40
+ // because side-effect imports can be re-evaluated by some bundler
41
+ // configurations during dev.
42
+ const ATTACHED = 'data-taiv-ios-zoom-fix';
43
+ if (meta.getAttribute(ATTACHED) === 'true')
44
+ return;
45
+ meta.setAttribute(ATTACHED, 'true');
46
+ // Per-focus snapshot. Captured on focusin, restored on focusout. Stored
47
+ // outside the listeners so paired events share state. `null` when no
48
+ // text input is currently focused.
49
+ let snapshot = null;
50
+ const isTextEntry = (target) => {
51
+ if (!(target instanceof HTMLElement))
52
+ return false;
53
+ const tag = target.tagName;
54
+ if (tag === 'TEXTAREA' || tag === 'SELECT')
55
+ return true;
56
+ if (tag !== 'INPUT')
57
+ return false;
58
+ // Excludes button-like input types that don't trigger iOS's auto-zoom
59
+ // (checkbox, radio, file, button, submit, etc.).
60
+ const type = target.type;
61
+ return (type !== 'checkbox' &&
62
+ type !== 'radio' &&
63
+ type !== 'button' &&
64
+ type !== 'submit' &&
65
+ type !== 'reset' &&
66
+ type !== 'file' &&
67
+ type !== 'image' &&
68
+ type !== 'hidden' &&
69
+ type !== 'range' &&
70
+ type !== 'color');
71
+ };
72
+ // `pointerdown` fires before the browser commits focus, so the viewport
73
+ // meta is in place by the time iOS evaluates whether to auto-zoom.
74
+ // Capture phase ensures we run before any consumer's pointerdown handlers
75
+ // that might call `stopPropagation()`. `passive: true` keeps scrolling
76
+ // smooth — we only read `target` and write the meta, never preventDefault.
77
+ //
78
+ // Resolving the input from `e.target` is two-step:
79
+ // 1. `closest('input, textarea, select')` walks up to the nearest
80
+ // input ancestor — handles direct taps on the input itself.
81
+ // 2. If no ancestor input, walk up to a Mantine input wrapper and
82
+ // look INSIDE for the input. Mantine renders trigger affordances
83
+ // (chevron, clear button, search icon) as siblings of the input
84
+ // under a shared wrapper; tapping those would otherwise miss the
85
+ // lock because the input is a sibling, not an ancestor. This case
86
+ // matters most for `<Select>` — the chevron and the input both
87
+ // live under `.mantine-Input-wrapper`, and the chevron tap is
88
+ // what programmatically focuses the input → iOS zooms without
89
+ // our lock unless we catch the wrapper-level tap.
90
+ document.addEventListener('pointerdown', (e) => {
91
+ const target = e.target;
92
+ if (!(target instanceof Element))
93
+ return;
94
+ let field = target.closest('input, textarea, select');
95
+ if (!field) {
96
+ const wrapper = target.closest('.mantine-Input-wrapper, .mantine-InputWrapper-root');
97
+ if (wrapper) {
98
+ field = wrapper.querySelector('input, textarea, select');
99
+ }
100
+ }
101
+ if (!isTextEntry(field))
102
+ return;
103
+ // Only snapshot if we don't already have one — avoids overwriting on
104
+ // rapid pointerdown sequences (e.g. tap-and-drag) before focusout
105
+ // has a chance to clean up.
106
+ if (snapshot === null) {
107
+ snapshot = meta.getAttribute('content');
108
+ }
109
+ meta.setAttribute('content', VIEWPORT_FOCUSED);
110
+ }, { capture: true, passive: true });
111
+ // Restore on blur. focusout bubbles, focus does not — using focusout
112
+ // means a single document-level listener catches every input.
113
+ //
114
+ // Deferred restore (rAF), not synchronous: when the user taps straight
115
+ // from one text input to another, iOS fires focusout(A) BEFORE focusin(B),
116
+ // and `document.activeElement` is transiently `<body>` during the handoff.
117
+ // Restoring synchronously here would unlock the viewport in that gap —
118
+ // iOS then re-evaluates at focus-commit on B and zooms anyway. Deferring
119
+ // one frame lets focus settle, then we restore only if focus has truly
120
+ // left all text entries. If it landed on another input, we keep the lock
121
+ // and the original snapshot intact until focus leaves text entry for good.
122
+ document.addEventListener('focusout', (e) => {
123
+ if (!isTextEntry(e.target))
124
+ return;
125
+ requestAnimationFrame(() => {
126
+ if (snapshot === null)
127
+ return;
128
+ if (isTextEntry(document.activeElement))
129
+ return;
130
+ meta.setAttribute('content', snapshot);
131
+ snapshot = null;
132
+ });
133
+ });
134
+ };
135
+ setupIosInputZoomFix();
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Compact human-readable byte size: "512 B", "1.4 KB", "9.2 MB", "1.30 GB".
3
+ *
4
+ * Uses 1024 as the conversion base (binary), which matches what most
5
+ * file-system / asset-store consumers display. KB and MB precision is one
6
+ * decimal, GB precision is two decimals — matches the intuition that bigger
7
+ * units deserve finer granularity for the same screen footprint.
8
+ */
9
+ export declare const formatBytes: (n: number) => string;
10
+ //# sourceMappingURL=bytes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bytes.d.ts","sourceRoot":"","sources":["../../src/utils/bytes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,GAAI,GAAG,MAAM,KAAG,MAKvC,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Compact human-readable byte size: "512 B", "1.4 KB", "9.2 MB", "1.30 GB".
3
+ *
4
+ * Uses 1024 as the conversion base (binary), which matches what most
5
+ * file-system / asset-store consumers display. KB and MB precision is one
6
+ * decimal, GB precision is two decimals — matches the intuition that bigger
7
+ * units deserve finer granularity for the same screen footprint.
8
+ */
9
+ export const formatBytes = (n) => {
10
+ if (n < 1024)
11
+ return `${n} B`;
12
+ if (n < 1024 * 1024)
13
+ return `${(n / 1024).toFixed(1)} KB`;
14
+ if (n < 1024 * 1024 * 1024)
15
+ return `${(n / 1024 / 1024).toFixed(1)} MB`;
16
+ return `${(n / 1024 / 1024 / 1024).toFixed(2)} GB`;
17
+ };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Compact "time-since" string with minute/hour granularity. Past-only —
3
+ * use this for "edited 5m ago", "uploaded 12h ago" style metadata where
4
+ * the value will never be in the future. Near-now and slightly-future
5
+ * inputs (clock skew) collapse to 'just now'.
6
+ *
7
+ * @param input The timestamp to describe.
8
+ * @param reference The "now" to measure against. Defaults to the current
9
+ * time; pass an explicit value to make output deterministic
10
+ * in tests.
11
+ *
12
+ * @example
13
+ * formatRelativeTime(thirtySecondsAgo) // 'just now'
14
+ * formatRelativeTime(twelveHoursAgo) // '12h ago'
15
+ * formatRelativeTime(threeWeeksAgo) // '3w ago'
16
+ */
17
+ export declare const formatRelativeTime: (input: string | number | Date, reference?: string | number | Date) => string;
18
+ //# sourceMappingURL=datetime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetime.d.ts","sourceRoot":"","sources":["../../src/utils/datetime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,kBAAkB,GAC7B,OAAO,MAAM,GAAG,MAAM,GAAG,IAAI,EAC7B,YAAW,MAAM,GAAG,MAAM,GAAG,IAAiB,KAC7C,MAqBF,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Compact "time-since" string with minute/hour granularity. Past-only —
3
+ * use this for "edited 5m ago", "uploaded 12h ago" style metadata where
4
+ * the value will never be in the future. Near-now and slightly-future
5
+ * inputs (clock skew) collapse to 'just now'.
6
+ *
7
+ * @param input The timestamp to describe.
8
+ * @param reference The "now" to measure against. Defaults to the current
9
+ * time; pass an explicit value to make output deterministic
10
+ * in tests.
11
+ *
12
+ * @example
13
+ * formatRelativeTime(thirtySecondsAgo) // 'just now'
14
+ * formatRelativeTime(twelveHoursAgo) // '12h ago'
15
+ * formatRelativeTime(threeWeeksAgo) // '3w ago'
16
+ */
17
+ export const formatRelativeTime = (input, reference = new Date()) => {
18
+ const targetMs = input instanceof Date ? input.getTime() : new Date(input).getTime();
19
+ const refMs = reference instanceof Date ? reference.getTime() : new Date(reference).getTime();
20
+ if (Number.isNaN(targetMs) || Number.isNaN(refMs))
21
+ return '';
22
+ const diffSeconds = Math.floor((refMs - targetMs) / 1000);
23
+ if (diffSeconds < 60)
24
+ return 'just now';
25
+ const minutes = Math.floor(diffSeconds / 60);
26
+ if (minutes < 60)
27
+ return `${minutes}m ago`;
28
+ const hours = Math.floor(minutes / 60);
29
+ if (hours < 24)
30
+ return `${hours}h ago`;
31
+ const days = Math.floor(hours / 24);
32
+ if (days < 7)
33
+ return `${days}d ago`;
34
+ const weeks = Math.floor(days / 7);
35
+ if (weeks < 5)
36
+ return `${weeks}w ago`;
37
+ const months = Math.floor(days / 30);
38
+ if (months < 12)
39
+ return `${months}mo ago`;
40
+ const years = Math.floor(days / 365);
41
+ return `${years}y ago`;
42
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Compact human-readable duration: "5.3s", "2m 35s", "1h 20m", "3h".
3
+ *
4
+ * Input is in **seconds** (not milliseconds). Callers should guard against
5
+ * zero, negative, NaN, and Infinity before calling — this function does not
6
+ * clamp or default those values.
7
+ *
8
+ * Precision rules:
9
+ * - Sub-60s: one decimal place ("5.3s") — fine grain matters for short clips.
10
+ * - 60s and above: whole seconds only, sub-second precision dropped ("2m 35s").
11
+ *
12
+ * No day unit — hours are the largest unit ("25h"). Suitable for content
13
+ * durations (slides, playlists, video clips) where values above a few hours
14
+ * are not expected.
15
+ */
16
+ export declare const formatDuration: (seconds: number) => string;
17
+ //# sourceMappingURL=duration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duration.d.ts","sourceRoot":"","sources":["../../src/utils/duration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,GAAI,SAAS,MAAM,KAAG,MAiBhD,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Compact human-readable duration: "5.3s", "2m 35s", "1h 20m", "3h".
3
+ *
4
+ * Input is in **seconds** (not milliseconds). Callers should guard against
5
+ * zero, negative, NaN, and Infinity before calling — this function does not
6
+ * clamp or default those values.
7
+ *
8
+ * Precision rules:
9
+ * - Sub-60s: one decimal place ("5.3s") — fine grain matters for short clips.
10
+ * - 60s and above: whole seconds only, sub-second precision dropped ("2m 35s").
11
+ *
12
+ * No day unit — hours are the largest unit ("25h"). Suitable for content
13
+ * durations (slides, playlists, video clips) where values above a few hours
14
+ * are not expected.
15
+ */
16
+ export const formatDuration = (seconds) => {
17
+ if (seconds < 60) {
18
+ const rounded = Math.round(seconds * 10) / 10;
19
+ return `${rounded}s`;
20
+ }
21
+ const totalSeconds = Math.round(seconds);
22
+ const m = Math.floor(totalSeconds / 60);
23
+ const s = totalSeconds % 60;
24
+ if (m >= 60) {
25
+ const h = Math.floor(m / 60);
26
+ const remainingM = m % 60;
27
+ return remainingM > 0 ? `${h}h ${remainingM}m` : `${h}h`;
28
+ }
29
+ return s > 0 ? `${m}m ${s}s` : `${m}m`;
30
+ };
@@ -1,3 +1,9 @@
1
- export { getOptionLabel, getOptionByValue, getCascadingOptionLabel } from './select';
2
- export { getChartFormatter, aggregateDataByDate } from './charts';
1
+ export { formatBytes } from './bytes';
2
+ export { aggregateDataByDate, getChartFormatter } from './charts';
3
+ export { formatRelativeTime } from './datetime';
4
+ export { formatDuration } from './duration';
5
+ export { getCascadingOptionLabel, getOptionByValue, getOptionLabel, } from './select';
6
+ export type { SortDirection } from './sort';
7
+ export { byDate, byNumber, byString, sortBy, sortByCreated, sortByName, sortByUpdated, } from './sort';
8
+ export { pluralize, quantify } from './string';
3
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,cAAc,GACf,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EACL,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,aAAa,EACb,UAAU,EACV,aAAa,GACd,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC"}
@@ -1,2 +1,7 @@
1
- export { getOptionLabel, getOptionByValue, getCascadingOptionLabel } from './select';
2
- export { getChartFormatter, aggregateDataByDate } from './charts';
1
+ export { formatBytes } from './bytes';
2
+ export { aggregateDataByDate, getChartFormatter } from './charts';
3
+ export { formatRelativeTime } from './datetime';
4
+ export { formatDuration } from './duration';
5
+ export { getCascadingOptionLabel, getOptionByValue, getOptionLabel, } from './select';
6
+ export { byDate, byNumber, byString, sortBy, sortByCreated, sortByName, sortByUpdated, } from './sort';
7
+ export { pluralize, quantify } from './string';
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Reusable sort helpers. Two layers:
3
+ *
4
+ * 1. Convenience verbs (`sortByName`, `sortByCreated`, `sortByUpdated`) for the
5
+ * shared fields most domain objects carry. Callsites pass a list + direction
6
+ * and never write a comparator: `sortByUpdated(slides, 'desc')`.
7
+ *
8
+ * 2. Comparator primitives (`byString`, `byNumber`, `byDate`) + a non-mutating
9
+ * `sortBy(items, ...comparators)` for fields the verbs don't cover (e.g.
10
+ * `byNumber(p => p.slides.length)`) or multi-key sorts with tiebreakers.
11
+ *
12
+ * All comparators centralize the fiddly bits once: nullish coalescing, a pinned
13
+ * `'en'` locale for stable string ordering across browsers/OSes, and Date
14
+ * parsing with a NaN guard (unparseable / missing dates sort as epoch 0).
15
+ */
16
+ export type SortDirection = 'asc' | 'desc';
17
+ type DateLike = string | number | Date | null | undefined;
18
+ export declare const byString: <T>(get: (item: T) => string | null | undefined, dir?: SortDirection) => (a: T, b: T) => number;
19
+ export declare const byNumber: <T>(get: (item: T) => number | null | undefined, dir?: SortDirection) => (a: T, b: T) => number;
20
+ export declare const byDate: <T>(get: (item: T) => DateLike, dir?: SortDirection) => (a: T, b: T) => number;
21
+ export declare const sortBy: <T>(items: readonly T[], ...comparators: Array<(a: T, b: T) => number>) => T[];
22
+ /** Sort by display name. Resolves `name → title → label` so it covers both
23
+ * domain objects and `Select`-style `{ value, label }` options. */
24
+ export declare const sortByName: <T extends {
25
+ name?: string | null;
26
+ title?: string | null;
27
+ label?: string | null;
28
+ }>(items: readonly T[], dir?: SortDirection) => T[];
29
+ /** Sort by creation time. Resolves `created → createdAt`. */
30
+ export declare const sortByCreated: <T extends {
31
+ created?: DateLike;
32
+ createdAt?: DateLike;
33
+ }>(items: readonly T[], dir?: SortDirection) => T[];
34
+ /** Sort by last-updated time. Resolves `edited → updated → updatedAt`, falling
35
+ * back to `created → createdAt` so never-edited items still sort sensibly. */
36
+ export declare const sortByUpdated: <T extends {
37
+ edited?: DateLike;
38
+ updated?: DateLike;
39
+ updatedAt?: DateLike;
40
+ created?: DateLike;
41
+ createdAt?: DateLike;
42
+ }>(items: readonly T[], dir?: SortDirection) => T[];
43
+ export {};
44
+ //# sourceMappingURL=sort.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../../src/utils/sort.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,CAAC;AAE3C,KAAK,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;AAsB1D,eAAO,MAAM,QAAQ,GAClB,CAAC,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,MAAK,aAAqB,MAC1E,GAAG,CAAC,EAAE,GAAG,CAAC,KAAG,MACiC,CAAC;AAElD,eAAO,MAAM,QAAQ,GAClB,CAAC,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,MAAK,aAAqB,MAC1E,GAAG,CAAC,EAAE,GAAG,CAAC,KAAG,MACkC,CAAC;AAEnD,eAAO,MAAM,MAAM,GAChB,CAAC,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,QAAQ,EAAE,MAAK,aAAqB,MACzD,GAAG,CAAC,EAAE,GAAG,CAAC,KAAG,MACoC,CAAC;AAMrD,eAAO,MAAM,MAAM,GAAI,CAAC,EACtB,OAAO,SAAS,CAAC,EAAE,EACnB,GAAG,aAAa,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC,KAC5C,CAAC,EAOA,CAAC;AAIL;oEACoE;AACpE,eAAO,MAAM,UAAU,GACrB,CAAC,SAAS;IACR,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,EAED,OAAO,SAAS,CAAC,EAAE,EACnB,MAAK,aAAqB,KACzB,CAAC,EAAuE,CAAC;AAE5E,6DAA6D;AAC7D,eAAO,MAAM,aAAa,GACxB,CAAC,SAAS;IAAE,OAAO,CAAC,EAAE,QAAQ,CAAC;IAAC,SAAS,CAAC,EAAE,QAAQ,CAAA;CAAE,EAEtD,OAAO,SAAS,CAAC,EAAE,EACnB,MAAK,aAAqB,KACzB,CAAC,EAAiE,CAAC;AAEtE;+EAC+E;AAC/E,eAAO,MAAM,aAAa,GACxB,CAAC,SAAS;IACR,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,SAAS,CAAC,EAAE,QAAQ,CAAC;CACtB,EAED,OAAO,SAAS,CAAC,EAAE,EACnB,MAAK,aAAqB,KACzB,CAAC,EAOD,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Reusable sort helpers. Two layers:
3
+ *
4
+ * 1. Convenience verbs (`sortByName`, `sortByCreated`, `sortByUpdated`) for the
5
+ * shared fields most domain objects carry. Callsites pass a list + direction
6
+ * and never write a comparator: `sortByUpdated(slides, 'desc')`.
7
+ *
8
+ * 2. Comparator primitives (`byString`, `byNumber`, `byDate`) + a non-mutating
9
+ * `sortBy(items, ...comparators)` for fields the verbs don't cover (e.g.
10
+ * `byNumber(p => p.slides.length)`) or multi-key sorts with tiebreakers.
11
+ *
12
+ * All comparators centralize the fiddly bits once: nullish coalescing, a pinned
13
+ * `'en'` locale for stable string ordering across browsers/OSes, and Date
14
+ * parsing with a NaN guard (unparseable / missing dates sort as epoch 0).
15
+ */
16
+ const dirSign = (dir) => (dir === 'desc' ? -1 : 1);
17
+ const toTime = (v) => {
18
+ if (v == null)
19
+ return 0;
20
+ const t = v instanceof Date ? v.getTime() : new Date(v).getTime();
21
+ return Number.isFinite(t) ? t : 0;
22
+ };
23
+ // Case-insensitive, locale-stable. Pinned to 'en' rather than the runtime
24
+ // default so ordering is identical across browsers/OSes (Turkish-i, German-ß,
25
+ // etc. otherwise diverge).
26
+ const compareStrings = (a, b) => (a !== null && a !== void 0 ? a : '').localeCompare(b !== null && b !== void 0 ? b : '', 'en', { sensitivity: 'base' });
27
+ // ── Comparator primitives ──────────────────────────────────────────────────
28
+ // Each takes an accessor + direction and returns a comparator. Compose them
29
+ // with `sortBy` for custom fields, multi-key sorts, or tiebreakers.
30
+ export const byString = (get, dir = 'asc') => (a, b) => dirSign(dir) * compareStrings(get(a), get(b));
31
+ export const byNumber = (get, dir = 'asc') => (a, b) => { var _a, _b; return dirSign(dir) * (((_a = get(a)) !== null && _a !== void 0 ? _a : 0) - ((_b = get(b)) !== null && _b !== void 0 ? _b : 0)); };
32
+ export const byDate = (get, dir = 'asc') => (a, b) => dirSign(dir) * (toTime(get(a)) - toTime(get(b)));
33
+ // ── Non-mutating, multi-key sort ─────────────────────────────────────────────
34
+ // Returns a new array. Comparators are applied in order; the first non-zero
35
+ // result wins, so trailing comparators act as tiebreakers:
36
+ // sortBy(users, byBoolean(u => u.isSelf, 'desc'), byString(u => u.name))
37
+ export const sortBy = (items, ...comparators) => [...items].sort((a, b) => {
38
+ for (const cmp of comparators) {
39
+ const result = cmp(a, b);
40
+ if (result !== 0)
41
+ return result;
42
+ }
43
+ return 0;
44
+ });
45
+ // ── Convenience verbs for common shared fields ───────────────────────────────
46
+ /** Sort by display name. Resolves `name → title → label` so it covers both
47
+ * domain objects and `Select`-style `{ value, label }` options. */
48
+ export const sortByName = (items, dir = 'asc') => sortBy(items, byString((i) => { var _a, _b; return (_b = (_a = i.name) !== null && _a !== void 0 ? _a : i.title) !== null && _b !== void 0 ? _b : i.label; }, dir));
49
+ /** Sort by creation time. Resolves `created → createdAt`. */
50
+ export const sortByCreated = (items, dir = 'asc') => sortBy(items, byDate((i) => { var _a; return (_a = i.created) !== null && _a !== void 0 ? _a : i.createdAt; }, dir));
51
+ /** Sort by last-updated time. Resolves `edited → updated → updatedAt`, falling
52
+ * back to `created → createdAt` so never-edited items still sort sensibly. */
53
+ export const sortByUpdated = (items, dir = 'asc') => sortBy(items, byDate((i) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = i.edited) !== null && _a !== void 0 ? _a : i.updated) !== null && _b !== void 0 ? _b : i.updatedAt) !== null && _c !== void 0 ? _c : i.created) !== null && _d !== void 0 ? _d : i.createdAt; }, dir));
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Returns the singular form when `count` is 1, otherwise the plural.
3
+ * If no explicit plural is provided, appends `s` to the singular.
4
+ *
5
+ * @example
6
+ * pluralize('item', 1) // 'item'
7
+ * pluralize('item', 3) // 'items'
8
+ * pluralize('child', 2, 'children') // 'children'
9
+ */
10
+ export declare const pluralize: (word: string, count: number, plural?: string) => string;
11
+ /**
12
+ * Like {@link pluralize}, but prefixes the count — the common "{n} things"
13
+ * phrasing. Forwards the optional custom plural.
14
+ *
15
+ * @example
16
+ * quantify('item', 1) // '1 item'
17
+ * quantify('item', 3) // '3 items'
18
+ * quantify('item', 0) // '0 items'
19
+ * quantify('subcategory', 2, 'subcategories') // '2 subcategories'
20
+ */
21
+ export declare const quantify: (word: string, count: number, plural?: string) => string;
22
+ //# sourceMappingURL=string.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/utils/string.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,GACpB,MAAM,MAAM,EACZ,OAAO,MAAM,EACb,SAAS,MAAM,KACd,MAGF,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,QAAQ,GACnB,MAAM,MAAM,EACZ,OAAO,MAAM,EACb,SAAS,MAAM,KACd,MAAsD,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Returns the singular form when `count` is 1, otherwise the plural.
3
+ * If no explicit plural is provided, appends `s` to the singular.
4
+ *
5
+ * @example
6
+ * pluralize('item', 1) // 'item'
7
+ * pluralize('item', 3) // 'items'
8
+ * pluralize('child', 2, 'children') // 'children'
9
+ */
10
+ export const pluralize = (word, count, plural) => {
11
+ if (count === 1)
12
+ return word;
13
+ return plural !== null && plural !== void 0 ? plural : `${word}s`;
14
+ };
15
+ /**
16
+ * Like {@link pluralize}, but prefixes the count — the common "{n} things"
17
+ * phrasing. Forwards the optional custom plural.
18
+ *
19
+ * @example
20
+ * quantify('item', 1) // '1 item'
21
+ * quantify('item', 3) // '3 items'
22
+ * quantify('item', 0) // '0 items'
23
+ * quantify('subcategory', 2, 'subcategories') // '2 subcategories'
24
+ */
25
+ export const quantify = (word, count, plural) => `${count} ${pluralize(word, count, plural)}`;
package/package.json CHANGED
@@ -2,13 +2,30 @@
2
2
  "author": "Taiv",
3
3
  "dependencies": {
4
4
  "@emotion/react": "^11.14.0",
5
+ "@mantine/carousel": "^6.0.22",
5
6
  "@mantine/core": "^6.0.0",
6
7
  "@mantine/dates": "^6.0.22",
8
+ "@mantine/dropzone": "^6.0.22",
9
+ "@mantine/form": "^6.0.22",
7
10
  "@mantine/hooks": "^6.0.0",
8
11
  "@mantine/modals": "^6.0.0",
9
12
  "@mantine/notifications": "^6.0.0",
13
+ "@preact/signals": "^2.0.2",
14
+ "@schedule-x/calendar": "^2.36.0",
15
+ "@schedule-x/current-time": "^2.36.0",
16
+ "@schedule-x/drag-and-drop": "^2.36.0",
17
+ "@schedule-x/events-service": "^2.36.0",
18
+ "@schedule-x/react": "^2.36.0",
19
+ "@schedule-x/resize": "^2.36.0",
20
+ "@schedule-x/theme-default": "^2.36.0",
10
21
  "@tabler/icons-react": "^3.41.1",
22
+ "@types/react-big-calendar": "^0.33.2",
11
23
  "dayjs": "^1.11.18",
24
+ "embla-carousel-autoplay": "^7.1.0",
25
+ "embla-carousel-react": "^7.1.0",
26
+ "preact": "^10.19.2",
27
+ "react-big-calendar": "^0.38.9",
28
+ "react-virtuoso": "^4.18.7",
12
29
  "recharts": "^2.8.0"
13
30
  },
14
31
  "description": "Taiv's web UI Toolkit built on Mantine v6",
@@ -25,6 +42,12 @@
25
42
  },
26
43
  "exports": {
27
44
  ".": "./dist/components/index.js",
45
+ "./assets": {
46
+ "default": "./dist/assets/index.js",
47
+ "import": "./dist/assets/index.js",
48
+ "types": "./dist/assets/index.d.ts"
49
+ },
50
+ "./assets/*": "./dist/assets/*",
28
51
  "./constants": "./dist/constants/index.js",
29
52
  "./hooks": "./dist/hooks/index.js",
30
53
  "./types": "./dist/types/index.js",
@@ -50,8 +73,9 @@
50
73
  "biome:check:path": "biome check",
51
74
  "biome:fix": "biome check --write src",
52
75
  "biome:fix:path": "biome check --write",
53
- "build": "tsc",
76
+ "build": "tsc && npm run build:assets",
54
77
  "build-storybook": "storybook build",
78
+ "build:assets": "mkdir -p dist/assets/brand && cp -R src/assets/brand/. dist/assets/brand/",
55
79
  "clean": "rm -rf dist",
56
80
  "dev": "npm link && tsc --watch",
57
81
  "format": "biome check --linter-enabled=false --assist-enabled=false src",
@@ -61,5 +85,5 @@
61
85
  "storybook": "storybook dev -p 6006"
62
86
  },
63
87
  "types": "dist/index.d.ts",
64
- "version": "1.15.0"
88
+ "version": "2.0.0"
65
89
  }