@kumix/ui 0.4.0 → 0.4.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 (265) hide show
  1. package/README.md +15 -15
  2. package/dist/components/agents/approval-card/index.d.ts +2 -0
  3. package/dist/components/agents/approval-card/index.d.ts.map +1 -1
  4. package/dist/components/agents/approval-card/index.js +2 -0
  5. package/dist/components/agents/approval-card/index.js.map +1 -1
  6. package/dist/components/agents/citations.d.ts +14 -2
  7. package/dist/components/agents/citations.d.ts.map +1 -1
  8. package/dist/components/agents/citations.js +11 -7
  9. package/dist/components/agents/citations.js.map +1 -1
  10. package/dist/components/agents/loading-states/reasoning-text.d.ts.map +1 -1
  11. package/dist/components/agents/loading-states/reasoning-text.js +3 -0
  12. package/dist/components/agents/loading-states/reasoning-text.js.map +1 -1
  13. package/dist/components/charts/bump-chart/context.js +1 -2
  14. package/dist/components/charts/bump-chart/plot.js +1 -2
  15. package/dist/components/charts/bump-chart/point.js +1 -1
  16. package/dist/components/charts/bump-chart/series.d.ts +1 -0
  17. package/dist/components/charts/candlestick-chart/context.d.ts +79 -0
  18. package/dist/components/charts/candlestick-chart/context.d.ts.map +1 -0
  19. package/dist/components/charts/candlestick-chart/context.js +69 -0
  20. package/dist/components/charts/candlestick-chart/context.js.map +1 -0
  21. package/dist/components/charts/candlestick-chart/legend.d.ts +12 -0
  22. package/dist/components/charts/candlestick-chart/legend.d.ts.map +1 -0
  23. package/dist/components/charts/candlestick-chart/legend.js +56 -0
  24. package/dist/components/charts/candlestick-chart/legend.js.map +1 -0
  25. package/dist/components/charts/candlestick-chart/plot.d.ts +9 -0
  26. package/dist/components/charts/candlestick-chart/plot.d.ts.map +1 -0
  27. package/dist/components/charts/candlestick-chart/plot.js +218 -0
  28. package/dist/components/charts/candlestick-chart/plot.js.map +1 -0
  29. package/dist/components/charts/candlestick-chart.d.ts +18 -0
  30. package/dist/components/charts/candlestick-chart.d.ts.map +1 -0
  31. package/dist/components/charts/candlestick-chart.js +34 -0
  32. package/dist/components/charts/candlestick-chart.js.map +1 -0
  33. package/dist/components/charts/composition-chart/context.js +1 -2
  34. package/dist/components/charts/composition-chart/plot.js +1 -1
  35. package/dist/components/charts/donut-chart/center.d.ts +16 -0
  36. package/dist/components/charts/donut-chart/center.d.ts.map +1 -0
  37. package/dist/components/charts/donut-chart/center.js +78 -0
  38. package/dist/components/charts/donut-chart/center.js.map +1 -0
  39. package/dist/components/charts/donut-chart/context.d.ts +68 -0
  40. package/dist/components/charts/donut-chart/context.d.ts.map +1 -0
  41. package/dist/components/charts/donut-chart/context.js +2 -0
  42. package/dist/components/charts/donut-chart/legend.d.ts +17 -0
  43. package/dist/components/charts/donut-chart/legend.d.ts.map +1 -0
  44. package/dist/components/charts/donut-chart/legend.js +85 -0
  45. package/dist/components/charts/donut-chart/legend.js.map +1 -0
  46. package/dist/components/charts/donut-chart/plot.d.ts +10 -0
  47. package/dist/components/charts/donut-chart/plot.d.ts.map +1 -0
  48. package/dist/components/charts/donut-chart/plot.js +108 -0
  49. package/dist/components/charts/donut-chart/plot.js.map +1 -0
  50. package/dist/components/charts/donut-chart.d.ts +22 -0
  51. package/dist/components/charts/donut-chart.d.ts.map +1 -0
  52. package/dist/components/charts/donut-chart.js +37 -0
  53. package/dist/components/charts/donut-chart.js.map +1 -0
  54. package/dist/components/charts/funnel-chart.d.ts.map +1 -1
  55. package/dist/components/charts/funnel-chart.js +1 -2
  56. package/dist/components/charts/funnel-chart.js.map +1 -1
  57. package/dist/components/charts/heat-calendar/tooltip.js +1 -1
  58. package/dist/components/charts/liquidity-heatmap.js +1 -1
  59. package/dist/components/charts/order-book/depth-row.d.ts +8 -2
  60. package/dist/components/charts/order-book/depth-row.d.ts.map +1 -1
  61. package/dist/components/charts/order-book/depth-row.js +11 -3
  62. package/dist/components/charts/order-book/depth-row.js.map +1 -1
  63. package/dist/components/charts/order-book.d.ts +33 -1
  64. package/dist/components/charts/order-book.d.ts.map +1 -1
  65. package/dist/components/charts/order-book.js +92 -17
  66. package/dist/components/charts/order-book.js.map +1 -1
  67. package/dist/components/charts/price-target-fan/tooltip.js +1 -1
  68. package/dist/components/charts/returns-calendar/tooltip.js +1 -1
  69. package/dist/components/charts/status-bar/tooltip.js +1 -1
  70. package/dist/components/charts/treemap/tooltip.js +1 -1
  71. package/dist/components/charts/volume-profile/tooltip.js +1 -1
  72. package/dist/components/custom/confirm-dialog.d.ts +1 -0
  73. package/dist/components/custom/toast.d.ts +1 -0
  74. package/dist/components/motion/action-swap.d.ts.map +1 -1
  75. package/dist/components/motion/action-swap.js +3 -0
  76. package/dist/components/motion/action-swap.js.map +1 -1
  77. package/dist/components/motion/animated-sidebar.d.ts +1 -0
  78. package/dist/components/motion/attachment-upload.d.ts.map +1 -1
  79. package/dist/components/motion/attachment-upload.js +1 -2
  80. package/dist/components/motion/attachment-upload.js.map +1 -1
  81. package/dist/components/motion/availability-scheduler/copy-menu.js +1 -2
  82. package/dist/components/motion/availability-scheduler/day-row.js +2 -2
  83. package/dist/components/motion/availability-scheduler/index.js +1 -1
  84. package/dist/components/motion/bloom-menu.d.ts +1 -0
  85. package/dist/components/motion/bounce-sidebar.d.ts.map +1 -1
  86. package/dist/components/motion/bounce-sidebar.js +34 -42
  87. package/dist/components/motion/bounce-sidebar.js.map +1 -1
  88. package/dist/components/motion/button/stateful.d.ts.map +1 -1
  89. package/dist/components/motion/button/stateful.js +3 -0
  90. package/dist/components/motion/button/stateful.js.map +1 -1
  91. package/dist/components/motion/card.d.ts +44 -0
  92. package/dist/components/motion/card.d.ts.map +1 -0
  93. package/dist/components/motion/card.js +122 -0
  94. package/dist/components/motion/card.js.map +1 -0
  95. package/dist/components/motion/checkbox.d.ts +3 -1
  96. package/dist/components/motion/checkbox.d.ts.map +1 -1
  97. package/dist/components/motion/checkbox.js +18 -6
  98. package/dist/components/motion/checkbox.js.map +1 -1
  99. package/dist/components/motion/color-picker.d.ts +110 -0
  100. package/dist/components/motion/color-picker.d.ts.map +1 -0
  101. package/dist/components/motion/color-picker.js +1053 -0
  102. package/dist/components/motion/color-picker.js.map +1 -0
  103. package/dist/components/motion/color-selector.d.ts.map +1 -1
  104. package/dist/components/motion/color-selector.js +9 -2
  105. package/dist/components/motion/color-selector.js.map +1 -1
  106. package/dist/components/motion/combobox/content.d.ts +1 -0
  107. package/dist/components/motion/command-palette.js +2 -2
  108. package/dist/components/motion/command-palette.js.map +1 -1
  109. package/dist/components/motion/context-menu.d.ts +1 -0
  110. package/dist/components/motion/digit-swap.d.ts +9 -1
  111. package/dist/components/motion/digit-swap.d.ts.map +1 -1
  112. package/dist/components/motion/digit-swap.js +18 -7
  113. package/dist/components/motion/digit-swap.js.map +1 -1
  114. package/dist/components/motion/expandable-control.d.ts +1 -0
  115. package/dist/components/motion/knockout-wheel.d.ts.map +1 -1
  116. package/dist/components/motion/knockout-wheel.js +1 -2
  117. package/dist/components/motion/knockout-wheel.js.map +1 -1
  118. package/dist/components/motion/morphing-search-chips.d.ts +54 -0
  119. package/dist/components/motion/morphing-search-chips.d.ts.map +1 -0
  120. package/dist/components/motion/morphing-search-chips.js +599 -0
  121. package/dist/components/motion/morphing-search-chips.js.map +1 -0
  122. package/dist/components/motion/multi-select/content.d.ts +1 -0
  123. package/dist/components/motion/not-found/shared.d.ts +1 -0
  124. package/dist/components/motion/number-ticker.d.ts +6 -1
  125. package/dist/components/motion/number-ticker.d.ts.map +1 -1
  126. package/dist/components/motion/number-ticker.js +19 -9
  127. package/dist/components/motion/number-ticker.js.map +1 -1
  128. package/dist/components/motion/parallax.js.map +1 -1
  129. package/dist/components/motion/popover-morph.d.ts +1 -0
  130. package/dist/components/motion/popover-morph.js +3 -0
  131. package/dist/components/motion/popover-morph.js.map +1 -1
  132. package/dist/components/motion/popover.d.ts +1 -0
  133. package/dist/components/motion/prediction-market-card.js +2 -3
  134. package/dist/components/motion/prediction-market-card.js.map +1 -1
  135. package/dist/components/motion/radio.d.ts +3 -1
  136. package/dist/components/motion/radio.d.ts.map +1 -1
  137. package/dist/components/motion/radio.js +17 -5
  138. package/dist/components/motion/radio.js.map +1 -1
  139. package/dist/components/motion/scroll-progress.d.ts +1 -0
  140. package/dist/components/motion/shader-background.d.ts +1 -0
  141. package/dist/components/motion/sortable-list.d.ts +1 -0
  142. package/dist/components/motion/sortable-stack.js +1 -2
  143. package/dist/components/motion/tabs.d.ts +1 -0
  144. package/dist/components/motion/text-reveal.d.ts +1 -0
  145. package/dist/components/motion/tooltip/positioner.d.ts +8 -26
  146. package/dist/components/motion/tooltip/positioner.d.ts.map +1 -1
  147. package/dist/components/motion/tooltip/positioner.js +1 -2
  148. package/dist/components/motion/tooltip.d.ts +62 -20
  149. package/dist/components/motion/tooltip.d.ts.map +1 -1
  150. package/dist/components/motion/tooltip.js +1 -135
  151. package/dist/components/motion/wallet-card/account-avatar.js +1 -2
  152. package/dist/components/reui/alert.d.ts +1 -1
  153. package/dist/components/reui/autocomplete.d.ts +1 -1
  154. package/dist/components/reui/autocomplete.d.ts.map +1 -1
  155. package/dist/components/reui/autocomplete.js.map +1 -1
  156. package/dist/components/reui/badge.d.ts +2 -2
  157. package/dist/components/reui/color-picker.d.ts +280 -0
  158. package/dist/components/reui/color-picker.d.ts.map +1 -0
  159. package/dist/components/reui/color-picker.js +2013 -0
  160. package/dist/components/reui/color-picker.js.map +1 -0
  161. package/dist/components/reui/data-grid/data-grid-cell-selection.d.ts.map +1 -1
  162. package/dist/components/reui/data-grid/data-grid-column-header.d.ts.map +1 -1
  163. package/dist/components/reui/data-grid/data-grid-column-header.js +43 -21
  164. package/dist/components/reui/data-grid/data-grid-column-header.js.map +1 -1
  165. package/dist/components/reui/data-grid/data-grid-pagination.js +1 -1
  166. package/dist/components/reui/data-grid/data-grid-scroll-area.d.ts.map +1 -1
  167. package/dist/components/reui/data-grid/data-grid-scroll-area.js +9 -3
  168. package/dist/components/reui/data-grid/data-grid-scroll-area.js.map +1 -1
  169. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts.map +1 -1
  170. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +12 -8
  171. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js.map +1 -1
  172. package/dist/components/reui/data-grid/data-grid-table-dnd.d.ts +1 -1
  173. package/dist/components/reui/data-grid/data-grid-table-dnd.d.ts.map +1 -1
  174. package/dist/components/reui/data-grid/data-grid-table-dnd.js +52 -13
  175. package/dist/components/reui/data-grid/data-grid-table-dnd.js.map +1 -1
  176. package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts.map +1 -1
  177. package/dist/components/reui/data-grid/data-grid-table-virtual.js +35 -41
  178. package/dist/components/reui/data-grid/data-grid-table-virtual.js.map +1 -1
  179. package/dist/components/reui/data-grid/data-grid-table.d.ts +168 -5
  180. package/dist/components/reui/data-grid/data-grid-table.d.ts.map +1 -1
  181. package/dist/components/reui/data-grid/data-grid-table.js +203 -69
  182. package/dist/components/reui/data-grid/data-grid-table.js.map +1 -1
  183. package/dist/components/reui/data-grid/data-grid.d.ts +39 -0
  184. package/dist/components/reui/data-grid/data-grid.d.ts.map +1 -1
  185. package/dist/components/reui/data-grid/data-grid.js +33 -1
  186. package/dist/components/reui/data-grid/data-grid.js.map +1 -1
  187. package/dist/components/reui/date-selector.d.ts +1 -0
  188. package/dist/components/reui/date-selector.js +1 -1
  189. package/dist/components/reui/emoji-picker.d.ts +367 -0
  190. package/dist/components/reui/emoji-picker.d.ts.map +1 -0
  191. package/dist/components/reui/emoji-picker.js +1768 -0
  192. package/dist/components/reui/emoji-picker.js.map +1 -0
  193. package/dist/components/reui/event-calendar/event-calendar-i18n.d.ts.map +1 -1
  194. package/dist/components/reui/event-calendar/event-calendar-nav.js +2 -2
  195. package/dist/components/reui/file-type.d.ts +496 -0
  196. package/dist/components/reui/file-type.d.ts.map +1 -0
  197. package/dist/components/reui/file-type.js +964 -0
  198. package/dist/components/reui/file-type.js.map +1 -0
  199. package/dist/components/reui/filters/filters-advanced.d.ts +1 -0
  200. package/dist/components/reui/filters/filters-advanced.js +1 -1
  201. package/dist/components/reui/filters/filters-advanced.js.map +1 -1
  202. package/dist/components/reui/filters/filters-chip.d.ts +5 -1
  203. package/dist/components/reui/filters/filters-chip.d.ts.map +1 -1
  204. package/dist/components/reui/filters/filters-chip.js +1 -1
  205. package/dist/components/reui/filters/filters-lib.d.ts.map +1 -1
  206. package/dist/components/reui/frame.d.ts +1 -1
  207. package/dist/components/reui/frame.d.ts.map +1 -1
  208. package/dist/components/reui/frame.js.map +1 -1
  209. package/dist/components/reui/gantt/gantt-nav.js +2 -2
  210. package/dist/components/reui/icon-tile.d.ts +2 -2
  211. package/dist/components/reui/icon-tile.js +8 -7
  212. package/dist/components/reui/icon-tile.js.map +1 -1
  213. package/dist/components/reui/kanban.d.ts.map +1 -1
  214. package/dist/components/reui/kanban.js +1 -1
  215. package/dist/components/reui/kanban.js.map +1 -1
  216. package/dist/components/reui/number-field.d.ts +3 -3
  217. package/dist/components/reui/number-field.d.ts.map +1 -1
  218. package/dist/components/reui/number-field.js.map +1 -1
  219. package/dist/components/reui/rating.d.ts +1 -1
  220. package/dist/components/reui/scrollspy.d.ts +1 -0
  221. package/dist/components/reui/time-picker.js.map +1 -1
  222. package/dist/components/ui/attachment.d.ts +3 -3
  223. package/dist/components/ui/badge.d.ts +1 -1
  224. package/dist/components/ui/bubble.d.ts +1 -1
  225. package/dist/components/ui/button-group.d.ts +1 -1
  226. package/dist/components/ui/button.d.ts +2 -2
  227. package/dist/components/ui/command.d.ts.map +1 -1
  228. package/dist/components/ui/direction.js +1 -2
  229. package/dist/components/ui/empty.d.ts +1 -1
  230. package/dist/components/ui/field.d.ts +1 -1
  231. package/dist/components/ui/field.js +1 -1
  232. package/dist/components/ui/input-group.d.ts +1 -1
  233. package/dist/components/ui/item.d.ts +2 -2
  234. package/dist/components/ui/marker.d.ts +1 -1
  235. package/dist/components/ui/message-scroller.d.ts.map +1 -1
  236. package/dist/components/ui/questionnaire.d.ts.map +1 -1
  237. package/dist/components/ui/sidebar.d.ts +1 -1
  238. package/dist/components/ui/sidebar.js +1 -1
  239. package/dist/components/ui/toggle.d.ts +1 -1
  240. package/dist/context-tTdLKYNf.js +99 -0
  241. package/dist/context-tTdLKYNf.js.map +1 -0
  242. package/dist/{copy-menu-C5GaT4Z-.js → copy-menu-BXUh52bu.js} +2 -2
  243. package/dist/{copy-menu-C5GaT4Z-.js.map → copy-menu-BXUh52bu.js.map} +1 -1
  244. package/dist/hooks/use-copy-to-clipboard.d.ts +1 -0
  245. package/dist/hooks/use-hover-gesture.d.ts +1 -0
  246. package/dist/hooks/use-intersection-observer.d.ts +1 -0
  247. package/dist/hooks/use-scroll-position.d.ts +1 -0
  248. package/dist/hooks/use-slider-input.d.ts +1 -0
  249. package/dist/hooks/use-viewport.d.ts +1 -0
  250. package/dist/lib/tick-sound.d.ts +1 -0
  251. package/dist/model-NSIg2p7a.d.ts +20 -0
  252. package/dist/model-NSIg2p7a.d.ts.map +1 -0
  253. package/dist/model-_mRyI6V9.d.ts +18 -0
  254. package/dist/model-_mRyI6V9.d.ts.map +1 -0
  255. package/dist/{positioner-3mCqiebN.js → positioner-3r3cfkqT.js} +97 -33
  256. package/dist/positioner-3r3cfkqT.js.map +1 -0
  257. package/dist/tooltip-Bam5KeYe.js +535 -0
  258. package/dist/tooltip-Bam5KeYe.js.map +1 -0
  259. package/dist/use-position-DOi1gVL0.d.ts +32 -0
  260. package/dist/use-position-DOi1gVL0.d.ts.map +1 -0
  261. package/package.json +8 -8
  262. package/dist/components/motion/tooltip.js.map +0 -1
  263. package/dist/model-DfeFradZ.d.ts +0 -9
  264. package/dist/model-DfeFradZ.d.ts.map +0 -1
  265. package/dist/positioner-3mCqiebN.js.map +0 -1
@@ -0,0 +1,496 @@
1
+ import { ComponentProps, ReactNode } from "react";
2
+ import { VariantProps } from "class-variance-authority";
3
+ //#region src/components/reui/file-type.d.ts
4
+ /** The family a type belongs to. It picks the glyph and the default color. */
5
+ type FileTypeCategory = "archive" | "audio" | "code" | "design" | "document" | "empty" | "executable" | "file" | "folder" | "font" | "image" | "presentation" | "spreadsheet" | "video";
6
+ /**
7
+ * Known extensions. A format takes its brand's color (Word blue, Excel green,
8
+ * the GitHub language colors for code), else its family's, and a format with
9
+ * neither (archives, plain text, data, fonts, installers) is neutral. Every
10
+ * color is the 600 step, so the set reads as one palette with white label
11
+ * text at 3:1 or better.
12
+ */
13
+ declare const FILE_TYPE_EXTENSIONS: {
14
+ pdf: {
15
+ category: "document";
16
+ color: string;
17
+ };
18
+ doc: {
19
+ category: "document";
20
+ color: string;
21
+ };
22
+ docx: {
23
+ category: "document";
24
+ color: string;
25
+ };
26
+ odt: {
27
+ category: "document";
28
+ color: string;
29
+ };
30
+ rtf: {
31
+ category: "document";
32
+ color: string;
33
+ };
34
+ pages: {
35
+ category: "document";
36
+ color: string;
37
+ };
38
+ txt: {
39
+ category: "document";
40
+ color: string;
41
+ };
42
+ md: {
43
+ category: "document";
44
+ color: string;
45
+ };
46
+ log: {
47
+ category: "document";
48
+ color: string;
49
+ };
50
+ xls: {
51
+ category: "spreadsheet";
52
+ color: string;
53
+ };
54
+ xlsx: {
55
+ category: "spreadsheet";
56
+ color: string;
57
+ };
58
+ xlsm: {
59
+ category: "spreadsheet";
60
+ color: string;
61
+ };
62
+ ods: {
63
+ category: "spreadsheet";
64
+ color: string;
65
+ };
66
+ csv: {
67
+ category: "spreadsheet";
68
+ color: string;
69
+ };
70
+ tsv: {
71
+ category: "spreadsheet";
72
+ color: string;
73
+ };
74
+ ppt: {
75
+ category: "presentation";
76
+ color: string;
77
+ };
78
+ pptx: {
79
+ category: "presentation";
80
+ color: string;
81
+ };
82
+ odp: {
83
+ category: "presentation";
84
+ color: string;
85
+ };
86
+ key: {
87
+ category: "presentation";
88
+ color: string;
89
+ };
90
+ png: {
91
+ category: "image";
92
+ color: string;
93
+ };
94
+ jpg: {
95
+ category: "image";
96
+ color: string;
97
+ };
98
+ jpeg: {
99
+ category: "image";
100
+ color: string;
101
+ };
102
+ gif: {
103
+ category: "image";
104
+ color: string;
105
+ };
106
+ webp: {
107
+ category: "image";
108
+ color: string;
109
+ };
110
+ avif: {
111
+ category: "image";
112
+ color: string;
113
+ };
114
+ heic: {
115
+ category: "image";
116
+ color: string;
117
+ };
118
+ bmp: {
119
+ category: "image";
120
+ color: string;
121
+ };
122
+ tif: {
123
+ category: "image";
124
+ color: string;
125
+ };
126
+ tiff: {
127
+ category: "image";
128
+ color: string;
129
+ };
130
+ ico: {
131
+ category: "image";
132
+ color: string;
133
+ };
134
+ raw: {
135
+ category: "image";
136
+ color: string;
137
+ };
138
+ svg: {
139
+ category: "image";
140
+ color: string;
141
+ };
142
+ mp4: {
143
+ category: "video";
144
+ color: string;
145
+ };
146
+ mov: {
147
+ category: "video";
148
+ color: string;
149
+ };
150
+ avi: {
151
+ category: "video";
152
+ color: string;
153
+ };
154
+ mkv: {
155
+ category: "video";
156
+ color: string;
157
+ };
158
+ webm: {
159
+ category: "video";
160
+ color: string;
161
+ };
162
+ mpeg: {
163
+ category: "video";
164
+ color: string;
165
+ };
166
+ mpg: {
167
+ category: "video";
168
+ color: string;
169
+ };
170
+ wmv: {
171
+ category: "video";
172
+ color: string;
173
+ };
174
+ mp3: {
175
+ category: "audio";
176
+ color: string;
177
+ };
178
+ wav: {
179
+ category: "audio";
180
+ color: string;
181
+ };
182
+ aac: {
183
+ category: "audio";
184
+ color: string;
185
+ };
186
+ flac: {
187
+ category: "audio";
188
+ color: string;
189
+ };
190
+ ogg: {
191
+ category: "audio";
192
+ color: string;
193
+ };
194
+ m4a: {
195
+ category: "audio";
196
+ color: string;
197
+ };
198
+ aiff: {
199
+ category: "audio";
200
+ color: string;
201
+ };
202
+ js: {
203
+ category: "code";
204
+ color: string;
205
+ };
206
+ jsx: {
207
+ category: "code";
208
+ color: string;
209
+ };
210
+ mjs: {
211
+ category: "code";
212
+ color: string;
213
+ };
214
+ ts: {
215
+ category: "code";
216
+ color: string;
217
+ };
218
+ tsx: {
219
+ category: "code";
220
+ color: string;
221
+ };
222
+ html: {
223
+ category: "code";
224
+ color: string;
225
+ };
226
+ htm: {
227
+ category: "code";
228
+ color: string;
229
+ };
230
+ css: {
231
+ category: "code";
232
+ color: string;
233
+ };
234
+ scss: {
235
+ category: "code";
236
+ color: string;
237
+ };
238
+ json: {
239
+ category: "code";
240
+ color: string;
241
+ };
242
+ xml: {
243
+ category: "code";
244
+ color: string;
245
+ };
246
+ yaml: {
247
+ category: "code";
248
+ color: string;
249
+ };
250
+ yml: {
251
+ category: "code";
252
+ color: string;
253
+ };
254
+ sql: {
255
+ category: "code";
256
+ color: string;
257
+ };
258
+ py: {
259
+ category: "code";
260
+ color: string;
261
+ };
262
+ java: {
263
+ category: "code";
264
+ color: string;
265
+ };
266
+ php: {
267
+ category: "code";
268
+ color: string;
269
+ };
270
+ rb: {
271
+ category: "code";
272
+ color: string;
273
+ };
274
+ go: {
275
+ category: "code";
276
+ color: string;
277
+ };
278
+ rs: {
279
+ category: "code";
280
+ color: string;
281
+ };
282
+ c: {
283
+ category: "code";
284
+ color: string;
285
+ };
286
+ cpp: {
287
+ category: "code";
288
+ color: string;
289
+ };
290
+ h: {
291
+ category: "code";
292
+ color: string;
293
+ };
294
+ cs: {
295
+ category: "code";
296
+ color: string;
297
+ };
298
+ sh: {
299
+ category: "code";
300
+ color: string;
301
+ };
302
+ rss: {
303
+ category: "code";
304
+ color: string;
305
+ };
306
+ zip: {
307
+ category: "archive";
308
+ color: string;
309
+ };
310
+ rar: {
311
+ category: "archive";
312
+ color: string;
313
+ };
314
+ "7z": {
315
+ category: "archive";
316
+ color: string;
317
+ };
318
+ tar: {
319
+ category: "archive";
320
+ color: string;
321
+ };
322
+ gz: {
323
+ category: "archive";
324
+ color: string;
325
+ };
326
+ tgz: {
327
+ category: "archive";
328
+ color: string;
329
+ };
330
+ bz2: {
331
+ category: "archive";
332
+ color: string;
333
+ };
334
+ fig: {
335
+ category: "design";
336
+ color: string;
337
+ };
338
+ sketch: {
339
+ category: "design";
340
+ color: string;
341
+ };
342
+ psd: {
343
+ category: "design";
344
+ color: string;
345
+ };
346
+ ai: {
347
+ category: "design";
348
+ color: string;
349
+ };
350
+ eps: {
351
+ category: "design";
352
+ color: string;
353
+ };
354
+ indd: {
355
+ category: "design";
356
+ color: string;
357
+ };
358
+ aep: {
359
+ category: "design";
360
+ color: string;
361
+ };
362
+ xd: {
363
+ category: "design";
364
+ color: string;
365
+ };
366
+ exe: {
367
+ category: "executable";
368
+ color: string;
369
+ };
370
+ msi: {
371
+ category: "executable";
372
+ color: string;
373
+ };
374
+ dmg: {
375
+ category: "executable";
376
+ color: string;
377
+ };
378
+ apk: {
379
+ category: "executable";
380
+ color: string;
381
+ };
382
+ deb: {
383
+ category: "executable";
384
+ color: string;
385
+ };
386
+ iso: {
387
+ category: "executable";
388
+ color: string;
389
+ };
390
+ app: {
391
+ category: "executable";
392
+ color: string;
393
+ };
394
+ ttf: {
395
+ category: "font";
396
+ color: string;
397
+ };
398
+ otf: {
399
+ category: "font";
400
+ color: string;
401
+ };
402
+ woff: {
403
+ category: "font";
404
+ color: string;
405
+ };
406
+ woff2: {
407
+ category: "font";
408
+ color: string;
409
+ };
410
+ };
411
+ /** The families that can be passed as a `type` on their own, glyph only. */
412
+ declare const FILE_TYPE_CATEGORIES: readonly ["archive", "audio", "code", "design", "document", "empty", "executable", "folder", "font", "image", "presentation", "spreadsheet", "video"];
413
+ type FileTypeExtensionName = keyof typeof FILE_TYPE_EXTENSIONS;
414
+ /** Every type the table knows. Any other string renders as a neutral file. */
415
+ type FileTypeName = FileTypeExtensionName | (typeof FILE_TYPE_CATEGORIES)[number];
416
+ declare const FILE_TYPE_EXTENSION_NAMES: FileTypeExtensionName[];
417
+ /**
418
+ * Resolves a file name, path, URL, bare extension or MIME type to a `type`.
419
+ * A path ending in a slash is a folder; a name without an extension is an
420
+ * empty file; an unknown extension is returned as is and renders neutral.
421
+ */
422
+ declare function getFileType(value: string): FileTypeName | (string & {});
423
+ /** The family of any `type`, for grouping or filtering a file list. */
424
+ declare function getFileTypeCategory(type?: string): FileTypeCategory;
425
+ /**
426
+ * CSS variable architecture, all read from the root:
427
+ *
428
+ * --file-type-size box width and height, set by `size`
429
+ * --file-type-stroke line width; unset, 1px up to 40px, then proportional
430
+ * --file-type-border page outline in outline, light and mono; unset, 40%
431
+ * muted-foreground, 65% up to 20px
432
+ * --file-type-fill solid page; unset, the type color
433
+ * --file-type-glyph glyph, custom icon and label in solid; unset, the
434
+ * foreground
435
+ * --file-type-foreground label text, and the glyph in solid
436
+ * --file-type-radius label corners; unset, the style's own (below)
437
+ *
438
+ * The root is an inline-size container and everything inside is measured in
439
+ * `cqw` against it, so a plain Tailwind size class (`size-20`, `size-full`)
440
+ * resizes the label and stroke with the box, not just the box. The label band
441
+ * is the same shape on every type at every size (the Figma's 40px geometry in
442
+ * percent); its text is 24% of the width (9.6px at 40px), so the capitals
443
+ * fill half the band, and shrinks only when its characters would run past
444
+ * the band. `--file-type-chars` carries the length for that fit; 0.72em is a
445
+ * wide uppercase character, measured on WOFF2 and MPEG. Up to 20px the band
446
+ * grows, the text turns semibold at a third of the box (5.8px at the 18px
447
+ * mini), and the outline darkens,
448
+ * or a row icon reads as a smudge.
449
+ *
450
+ * Browsers draw text on a whole-pixel baseline, which left capitals up to
451
+ * half a pixel off center. The band's margin moves it onto that baseline
452
+ * instead (`round()` against the label's own `1cap`), so a consumer's `top-*`
453
+ * still places it; a browser without `round()` or `cap` keeps the plain
454
+ * position.
455
+ *
456
+ * The type color is the root's text color, so one `text-*` class recolors a
457
+ * type.
458
+ */
459
+ declare const fileTypeVariants: (props?: ({
460
+ size?: "sm" | "lg" | "default" | "xs" | "xl" | "mini" | null | undefined;
461
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
462
+ type FileTypeVariant = "outline" | "solid" | "light" | "mono";
463
+ type FileTypeProps = Omit<ComponentProps<"span">, "children"> & {
464
+ /**
465
+ * An extension (`"pdf"`, `".docx"`), a family (`"image"`, `"folder"`) or
466
+ * `"empty"`. Unknown extensions render as a neutral file with their label.
467
+ * Use `getFileType` to resolve a file name or MIME type.
468
+ */
469
+ type?: FileTypeName | (string & {});
470
+ /** `mono` draws every type in the theme's gray instead of its own color. */
471
+ variant?: FileTypeVariant;
472
+ /** A preset box size. A Tailwind `size-*` class in `className` overrides it. */
473
+ size?: VariantProps<typeof fileTypeVariants>["size"];
474
+ /** Replaces the extension label, for a version tag or a document code. */
475
+ label?: ReactNode;
476
+ /**
477
+ * Shows the family glyph instead of the label. A family `type` (`"image"`)
478
+ * or a type with no label shows its glyph without it.
479
+ */
480
+ glyph?: boolean;
481
+ /**
482
+ * A custom icon drawn on the page in place of the glyph and the label, in
483
+ * the glyph's color: a lock on a protected file, a link on a shortcut.
484
+ */
485
+ icon?: ReactNode;
486
+ /**
487
+ * Classes for the label badge, merged last, so its background, radius,
488
+ * padding, font and position can all be replaced. The text is a child of
489
+ * the badge: recolor it with `*:text-*`.
490
+ */
491
+ labelClassName?: string;
492
+ };
493
+ declare function FileType({ type, variant, size, label, glyph, icon, labelClassName, className, ...props }: FileTypeProps): import("react").JSX.Element;
494
+ //#endregion
495
+ export { FILE_TYPE_CATEGORIES, FILE_TYPE_EXTENSION_NAMES, FileType, type FileTypeCategory, type FileTypeName, type FileTypeProps, type FileTypeVariant, fileTypeVariants, getFileType, getFileTypeCategory };
496
+ //# sourceMappingURL=file-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-type.d.ts","names":[],"sources":["../../../src/components/reui/file-type.tsx"],"mappings":";;;;KAYK;;;;;;;;cA+EC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkHA;KAgBD,qCAAqC;;KAGrC,eAAe,gCAAgC;cAE9C,2BAAiE;;;;;;iBAuJ9D,YAAY,gBAAgB;;iBA6C5B,oBAAoB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmIvC,mBAAgB;;6CAqBrB;KAEI;KA6EA,gBAAgB,KAAK;;;;;;EAMxB,OAAO;;EAEP,UAAU;;EAEV,OAAO,oBAAoB;;EAE3B,QAAQ;;;;;EAKR;;;;;EAKA,OAAO;;;;;;EAMP;;iBAGO,WACP,MACA,SACA,MACA,OACA,OACA,MACA,gBACA,cACG,SACF,gCAAa,IAAA"}