@meistrari/tela-build 1.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 (295) hide show
  1. package/README.md +75 -0
  2. package/app.config.ts +73 -0
  3. package/components/tela/animated/animated-calculating-number.vue +16 -0
  4. package/components/tela/animated/animated-number.mdx +248 -0
  5. package/components/tela/animated/animated-number.stories.ts +52 -0
  6. package/components/tela/animated/animated-number.vue +23 -0
  7. package/components/tela/animated/animated-text.vue +124 -0
  8. package/components/tela/animated/animated-value.vue +68 -0
  9. package/components/tela/avatar/avatar.mdx +117 -0
  10. package/components/tela/avatar/avatar.stories.ts +62 -0
  11. package/components/tela/avatar/avatar.vue +71 -0
  12. package/components/tela/avatar/group/avatar-group.stories.ts +78 -0
  13. package/components/tela/avatar/group/avatar-group.vue +46 -0
  14. package/components/tela/badge/badge.mdx +154 -0
  15. package/components/tela/badge/badge.stories.ts +82 -0
  16. package/components/tela/badge/badge.vue +41 -0
  17. package/components/tela/button/button.mdx +155 -0
  18. package/components/tela/button/button.stories.ts +202 -0
  19. package/components/tela/button/button.vue +107 -0
  20. package/components/tela/card.vue +30 -0
  21. package/components/tela/chart/chart-bar.vue +58 -0
  22. package/components/tela/chat/chat.mdx +268 -0
  23. package/components/tela/chat/chat.stories.ts +253 -0
  24. package/components/tela/chat/command/index.vue +41 -0
  25. package/components/tela/chat/command/mention/index.vue +138 -0
  26. package/components/tela/chat/index.vue +112 -0
  27. package/components/tela/chat/pure-text-input/chat-text-input.vue +190 -0
  28. package/components/tela/chat/text-input/chat-text-input.stories.ts +128 -0
  29. package/components/tela/chat/text-input/index.vue +217 -0
  30. package/components/tela/chat/text-message/chat-text-message.stories.ts +138 -0
  31. package/components/tela/chat/text-message/index.vue +355 -0
  32. package/components/tela/chat/types.ts +19 -0
  33. package/components/tela/checkbox/checkbox-card.vue +30 -0
  34. package/components/tela/checkbox/checkbox.mdx +164 -0
  35. package/components/tela/checkbox/checkbox.stories.ts +104 -0
  36. package/components/tela/checkbox/checkbox.vue +43 -0
  37. package/components/tela/collapsible/Collapsible.vue +15 -0
  38. package/components/tela/collapsible/CollapsibleContent.vue +59 -0
  39. package/components/tela/collapsible/CollapsibleTrigger.vue +12 -0
  40. package/components/tela/collapsible/collapsible.mdx +157 -0
  41. package/components/tela/collapsible-section/collapsible-section.mdx +180 -0
  42. package/components/tela/collapsible-section/collapsible-section.stories.ts +53 -0
  43. package/components/tela/collapsible-section/collapsible-section.vue +51 -0
  44. package/components/tela/collapsible-section-with-actions.vue +98 -0
  45. package/components/tela/combobox/combobox-anchor.vue +24 -0
  46. package/components/tela/combobox/combobox-empty.vue +19 -0
  47. package/components/tela/combobox/combobox-group.vue +24 -0
  48. package/components/tela/combobox/combobox-indicator.vue +22 -0
  49. package/components/tela/combobox/combobox-input.vue +31 -0
  50. package/components/tela/combobox/combobox-item.vue +28 -0
  51. package/components/tela/combobox/combobox-label.vue +24 -0
  52. package/components/tela/combobox/combobox-list.vue +90 -0
  53. package/components/tela/combobox/combobox-module-selector.vue +366 -0
  54. package/components/tela/combobox/combobox-root.vue +15 -0
  55. package/components/tela/combobox/combobox-trigger.vue +12 -0
  56. package/components/tela/combobox/combobox.mdx +285 -0
  57. package/components/tela/combobox/combobox.stories.ts +232 -0
  58. package/components/tela/combobox/combobox.vue +497 -0
  59. package/components/tela/command/command-dialog.vue +22 -0
  60. package/components/tela/command/command-empty.vue +25 -0
  61. package/components/tela/command/command-group.vue +46 -0
  62. package/components/tela/command/command-input.vue +38 -0
  63. package/components/tela/command/command-item.vue +78 -0
  64. package/components/tela/command/command-list.vue +78 -0
  65. package/components/tela/command/command-separator.vue +23 -0
  66. package/components/tela/command/command-shortcut.vue +13 -0
  67. package/components/tela/command/command.vue +88 -0
  68. package/components/tela/command/dialog-base.vue +15 -0
  69. package/components/tela/command/dialog-content.vue +50 -0
  70. package/components/tela/command/utils.ts +15 -0
  71. package/components/tela/complex-table/complex-table-cell.stories.ts +145 -0
  72. package/components/tela/complex-table/complex-table-cell.vue +45 -0
  73. package/components/tela/complex-table/complex-table-header-cell.stories.ts +103 -0
  74. package/components/tela/complex-table/complex-table-header-cell.vue +48 -0
  75. package/components/tela/complex-table/complex-table-header.stories.ts +89 -0
  76. package/components/tela/complex-table/complex-table-header.vue +70 -0
  77. package/components/tela/complex-table/complex-table-row.vue +199 -0
  78. package/components/tela/complex-table/complex-table-virtualized.vue +326 -0
  79. package/components/tela/complex-table/complex-table.stories.ts +358 -0
  80. package/components/tela/complex-table/complex-table.vue +237 -0
  81. package/components/tela/complex-table/composables/table-common.ts +93 -0
  82. package/components/tela/complex-table/composables/table-selection.ts +87 -0
  83. package/components/tela/complex-table/composables/virtual-scroll.ts +252 -0
  84. package/components/tela/complex-table/styles/table-shared.css +170 -0
  85. package/components/tela/complex-table/types.ts +63 -0
  86. package/components/tela/complex-table/utils.ts +35 -0
  87. package/components/tela/confirm-button/confirm-button.vue +137 -0
  88. package/components/tela/confirmation-modal/confirmation-modal.vue +72 -0
  89. package/components/tela/copy-button.vue +86 -0
  90. package/components/tela/date-range-picker.vue +221 -0
  91. package/components/tela/dialog/dialog.mdx +170 -0
  92. package/components/tela/dialog/dialog.vue +182 -0
  93. package/components/tela/disabled-area.vue +16 -0
  94. package/components/tela/disclaimer/disclaimer.mdx +238 -0
  95. package/components/tela/disclaimer/disclaimer.stories.ts +196 -0
  96. package/components/tela/disclaimer/disclaimer.vue +125 -0
  97. package/components/tela/dropdown-menu/DropdownMenu.vue +121 -0
  98. package/components/tela/dropdown-menu/DropdownMenuCheckboxItem.vue +40 -0
  99. package/components/tela/dropdown-menu/DropdownMenuContent.vue +75 -0
  100. package/components/tela/dropdown-menu/DropdownMenuGroup.vue +12 -0
  101. package/components/tela/dropdown-menu/DropdownMenuItem.vue +137 -0
  102. package/components/tela/dropdown-menu/DropdownMenuLabel.vue +26 -0
  103. package/components/tela/dropdown-menu/DropdownMenuRadioGroup.vue +18 -0
  104. package/components/tela/dropdown-menu/DropdownMenuRadioItem.vue +40 -0
  105. package/components/tela/dropdown-menu/DropdownMenuRoot.vue +15 -0
  106. package/components/tela/dropdown-menu/DropdownMenuSeparator.vue +21 -0
  107. package/components/tela/dropdown-menu/DropdownMenuShortcut.vue +14 -0
  108. package/components/tela/dropdown-menu/DropdownMenuSub.vue +18 -0
  109. package/components/tela/dropdown-menu/DropdownMenuSubContent.vue +30 -0
  110. package/components/tela/dropdown-menu/DropdownMenuSubTrigger.vue +35 -0
  111. package/components/tela/dropdown-menu/DropdownMenuTrigger.vue +14 -0
  112. package/components/tela/dropdown-menu/dropdown-menu.mdx +265 -0
  113. package/components/tela/dropdown-menu/dropdown-menu.stories.ts +156 -0
  114. package/components/tela/expandable-input.vue +96 -0
  115. package/components/tela/file-drop.vue +37 -0
  116. package/components/tela/file-upload/file-upload.mdx +189 -0
  117. package/components/tela/file-upload/file-upload.stories.ts +48 -0
  118. package/components/tela/file-upload/file-upload.vue +205 -0
  119. package/components/tela/filters/checkbox-filter.stories.ts +218 -0
  120. package/components/tela/filters/checkbox-filter.vue +165 -0
  121. package/components/tela/filters/date-filter.stories.ts +258 -0
  122. package/components/tela/filters/date-filter.vue +200 -0
  123. package/components/tela/filters/user-filter.stories.ts +344 -0
  124. package/components/tela/filters/user-filter.vue +271 -0
  125. package/components/tela/hover-card/hover-card.mdx +221 -0
  126. package/components/tela/hover-card/hover-card.stories.ts +87 -0
  127. package/components/tela/hover-card/hover-card.vue +61 -0
  128. package/components/tela/icon/custom.vue +319 -0
  129. package/components/tela/icon/spinner.vue +12 -0
  130. package/components/tela/icon-button/icon-button.vue +114 -0
  131. package/components/tela/icon.vue +37 -0
  132. package/components/tela/initials.vue +28 -0
  133. package/components/tela/inline-input.vue +77 -0
  134. package/components/tela/input/input.mdx +182 -0
  135. package/components/tela/input/input.stories.ts +153 -0
  136. package/components/tela/input/tela-input.vue +240 -0
  137. package/components/tela/kbd/kbd-return.vue +6 -0
  138. package/components/tela/kbd/kbd.mdx +238 -0
  139. package/components/tela/kbd/kbd.vue +18 -0
  140. package/components/tela/label/label.mdx +121 -0
  141. package/components/tela/label/label.stories.ts +37 -0
  142. package/components/tela/label/label.vue +25 -0
  143. package/components/tela/link-decoration/link-decoration.vue +19 -0
  144. package/components/tela/live-label.vue +32 -0
  145. package/components/tela/long-press-button.vue +98 -0
  146. package/components/tela/menubar/menubar-content.vue +77 -0
  147. package/components/tela/menubar/menubar-item.vue +32 -0
  148. package/components/tela/menubar/menubar-label.vue +14 -0
  149. package/components/tela/menubar/menubar-menu.vue +12 -0
  150. package/components/tela/menubar/menubar-root.vue +30 -0
  151. package/components/tela/menubar/menubar-separator.vue +17 -0
  152. package/components/tela/menubar/menubar-shortcut.vue +14 -0
  153. package/components/tela/menubar/menubar-sub-content.vue +36 -0
  154. package/components/tela/menubar/menubar-sub-trigger.vue +28 -0
  155. package/components/tela/menubar/menubar-sub.vue +20 -0
  156. package/components/tela/menubar/menubar-trigger.vue +27 -0
  157. package/components/tela/menubar/menubar.vue +298 -0
  158. package/components/tela/modal/modal.mdx +145 -0
  159. package/components/tela/modal/modal.vue +242 -0
  160. package/components/tela/multiple-select/multiple-select.mdx +274 -0
  161. package/components/tela/multiple-select/multiple-select.stories.ts +325 -0
  162. package/components/tela/multiple-select/multiple-select.vue +666 -0
  163. package/components/tela/pane.vue +110 -0
  164. package/components/tela/popover/popover-content.vue +48 -0
  165. package/components/tela/popover/popover-trigger.vue +12 -0
  166. package/components/tela/popover/popover.mdx +239 -0
  167. package/components/tela/popover/popover.stories.ts +150 -0
  168. package/components/tela/popover/popover.vue +15 -0
  169. package/components/tela/popover-list/popover-list-nested.vue +104 -0
  170. package/components/tela/popover-list/popover-list.stories.ts +330 -0
  171. package/components/tela/popover-list/popover-list.vue +191 -0
  172. package/components/tela/radio-button.vue +66 -0
  173. package/components/tela/radio-group/radio-group-item.vue +40 -0
  174. package/components/tela/radio-group/radio-group-root.vue +26 -0
  175. package/components/tela/radio-group/radio-group.mdx +78 -0
  176. package/components/tela/radio-group/radio-group.stories.ts +106 -0
  177. package/components/tela/radio-group/radio-group.vue +23 -0
  178. package/components/tela/range-calendar.stories.ts +110 -0
  179. package/components/tela/range-calendar.vue +109 -0
  180. package/components/tela/scroll-area/scroll-area.mdx +183 -0
  181. package/components/tela/scroll-area/scroll-area.vue +30 -0
  182. package/components/tela/scroll-area/scroll-bar.vue +31 -0
  183. package/components/tela/segment-toggle.stories.ts +114 -0
  184. package/components/tela/segment-toggle.vue +66 -0
  185. package/components/tela/select-menu/select-menu-content.vue +106 -0
  186. package/components/tela/select-menu/select-menu-down-button.vue +20 -0
  187. package/components/tela/select-menu/select-menu-group.vue +16 -0
  188. package/components/tela/select-menu/select-menu-item.vue +40 -0
  189. package/components/tela/select-menu/select-menu-root.vue +15 -0
  190. package/components/tela/select-menu/select-menu-trigger.vue +34 -0
  191. package/components/tela/select-menu/select-menu-up-button.vue +20 -0
  192. package/components/tela/select-menu/select-menu-value.vue +12 -0
  193. package/components/tela/select-menu/select-menu.mdx +221 -0
  194. package/components/tela/select-menu/select-menu.stories.ts +91 -0
  195. package/components/tela/select-menu/select-menu.vue +165 -0
  196. package/components/tela/selector/selector.vue +47 -0
  197. package/components/tela/sheet/sheet-close.vue +12 -0
  198. package/components/tela/sheet/sheet-content.vue +57 -0
  199. package/components/tela/sheet/sheet-description.vue +23 -0
  200. package/components/tela/sheet/sheet-footer.vue +18 -0
  201. package/components/tela/sheet/sheet-header.vue +15 -0
  202. package/components/tela/sheet/sheet-root.vue +18 -0
  203. package/components/tela/sheet/sheet-title.vue +23 -0
  204. package/components/tela/sheet/sheet-trigger.vue +12 -0
  205. package/components/tela/sheet/sheet.client.vue +150 -0
  206. package/components/tela/sheet/sheet.mdx +176 -0
  207. package/components/tela/sheet/sheet.stories.ts +201 -0
  208. package/components/tela/sheet/variants.ts +22 -0
  209. package/components/tela/side-sheet/side-sheet.mdx +131 -0
  210. package/components/tela/side-sheet/side-sheet.stories.ts +134 -0
  211. package/components/tela/side-sheet/side-sheet.vue +106 -0
  212. package/components/tela/skeleton/skeleton.mdx +165 -0
  213. package/components/tela/skeleton/skeleton.stories.ts +35 -0
  214. package/components/tela/skeleton/skeleton.vue +45 -0
  215. package/components/tela/skeleton-icon.vue +24 -0
  216. package/components/tela/span.vue +24 -0
  217. package/components/tela/star-button.vue +70 -0
  218. package/components/tela/status/status-lean.vue +30 -0
  219. package/components/tela/status/status.mdx +187 -0
  220. package/components/tela/status/status.stories.ts +160 -0
  221. package/components/tela/status/status.vue +420 -0
  222. package/components/tela/status-bar/status-bar.mdx +178 -0
  223. package/components/tela/status-bar/status-bar.stories.ts +64 -0
  224. package/components/tela/status-bar/status-bar.vue +56 -0
  225. package/components/tela/status-bar/types.ts +5 -0
  226. package/components/tela/switch/switch.mdx +118 -0
  227. package/components/tela/switch/switch.stories.ts +80 -0
  228. package/components/tela/switch/switch.vue +56 -0
  229. package/components/tela/table/table-body.vue +13 -0
  230. package/components/tela/table/table-caption.vue +13 -0
  231. package/components/tela/table/table-cell.vue +20 -0
  232. package/components/tela/table/table-empty.vue +37 -0
  233. package/components/tela/table/table-footer.vue +13 -0
  234. package/components/tela/table/table-head.vue +13 -0
  235. package/components/tela/table/table-header.vue +13 -0
  236. package/components/tela/table/table-row.vue +13 -0
  237. package/components/tela/table/table.mdx +230 -0
  238. package/components/tela/table/table.stories.ts +384 -0
  239. package/components/tela/table/table.vue +15 -0
  240. package/components/tela/tabs/tabs-content.vue +20 -0
  241. package/components/tela/tabs/tabs-indicator.vue +22 -0
  242. package/components/tela/tabs/tabs-list.vue +23 -0
  243. package/components/tela/tabs/tabs-root.vue +15 -0
  244. package/components/tela/tabs/tabs-trigger.vue +27 -0
  245. package/components/tela/tabs/tabs.mdx +138 -0
  246. package/components/tela/tabs/tabs.stories.ts +72 -0
  247. package/components/tela/tabs/tabs.vue +61 -0
  248. package/components/tela/tags/tags-select.mdx +318 -0
  249. package/components/tela/tags/tags-select.stories.ts +47 -0
  250. package/components/tela/tags/tags-select.vue +637 -0
  251. package/components/tela/tags/tags.mdx +151 -0
  252. package/components/tela/tags/tags.stories.ts +118 -0
  253. package/components/tela/tags/tags.vue +112 -0
  254. package/components/tela/textarea/textarea.mdx +102 -0
  255. package/components/tela/textarea/textarea.stories.ts +50 -0
  256. package/components/tela/textarea/textarea.vue +34 -0
  257. package/components/tela/toggle-group.vue +91 -0
  258. package/components/tela/tooltip/tooltip-content.vue +45 -0
  259. package/components/tela/tooltip/tooltip-provider.vue +12 -0
  260. package/components/tela/tooltip/tooltip-root.vue +15 -0
  261. package/components/tela/tooltip/tooltip-trigger.vue +12 -0
  262. package/components/tela/tooltip/tooltip.mdx +196 -0
  263. package/components/tela/tooltip/tooltip.stories.ts +200 -0
  264. package/components/tela/tooltip/tooltip.vue +91 -0
  265. package/components/tela/tooltip-group/tooltip-group-trigger.vue +92 -0
  266. package/components/tela/tooltip-group/tooltip-group.mdx +236 -0
  267. package/components/tela/tooltip-group/tooltip-group.stories.ts +465 -0
  268. package/components/tela/tooltip-group/tooltip-group.vue +35 -0
  269. package/components/tela/transparent-input.vue +151 -0
  270. package/components/tela/variable-icon.vue +28 -0
  271. package/components/tela/variable-input.vue +77 -0
  272. package/components/tela/wide-button/wide-button.vue +40 -0
  273. package/components.json +18 -0
  274. package/composables/status-toast.ts +67 -0
  275. package/css/reset.css +386 -0
  276. package/css/text.css +22 -0
  277. package/lib/doc-generator.ts +903 -0
  278. package/lib/extractors/volar-extract.ts +186 -0
  279. package/lib/type-resolver.ts +402 -0
  280. package/lib/utils.ts +6 -0
  281. package/modules/tela-build-docs/index.ts +139 -0
  282. package/nuxt.config.ts +80 -0
  283. package/package.json +84 -0
  284. package/plugins/test-id.ts +7 -0
  285. package/tsconfig.json +7 -0
  286. package/types/custom-icon.ts +1 -0
  287. package/types/index.ts +2 -0
  288. package/types/status.ts +1 -0
  289. package/unocss.config.ts +89 -0
  290. package/utils/component-utils.ts +30 -0
  291. package/utils/design-tokens.ts +431 -0
  292. package/utils/fold.ts +8 -0
  293. package/utils/select-menu.ts +10 -0
  294. package/utils/status.ts +1 -0
  295. package/utils/without-keys.ts +34 -0
@@ -0,0 +1,238 @@
1
+ import { Meta, ArgTypes } from '@storybook/blocks';
2
+
3
+ <Meta title="Utility/Kbd" />
4
+
5
+ # TelaKbd
6
+
7
+ A keyboard key component for displaying keyboard shortcuts or hotkeys. Styled to look like physical keyboard keys. Useful for documentation, help text, and keyboard shortcut displays.
8
+
9
+ ## Props
10
+
11
+ ```typescript
12
+ type KbdProps = {
13
+ class?: string
14
+ }
15
+ ```
16
+
17
+ ## Examples
18
+
19
+ ### Basic Usage
20
+
21
+ ```vue
22
+ <p>
23
+ Press <TelaKbd>Enter</TelaKbd> to submit
24
+ </p>
25
+ ```
26
+
27
+ ### Keyboard Shortcuts
28
+
29
+ ```vue
30
+ <div class="space-y-2">
31
+ <div>
32
+ <TelaKbd>Ctrl</TelaKbd> + <TelaKbd>C</TelaKbd> - Copy
33
+ </div>
34
+ <div>
35
+ <TelaKbd>Ctrl</TelaKbd> + <TelaKbd>V</TelaKbd> - Paste
36
+ </div>
37
+ <div>
38
+ <TelaKbd>Ctrl</TelaKbd> + <TelaKbd>Z</TelaKbd> - Undo
39
+ </div>
40
+ </div>
41
+ ```
42
+
43
+ ### Common Keys
44
+
45
+ ```vue
46
+ <div class="flex flex-wrap gap-2">
47
+ <TelaKbd>Enter</TelaKbd>
48
+ <TelaKbd>Esc</TelaKbd>
49
+ <TelaKbd>Tab</TelaKbd>
50
+ <TelaKbd>Space</TelaKbd>
51
+ <TelaKbd>Shift</TelaKbd>
52
+ <TelaKbd>Ctrl</TelaKbd>
53
+ <TelaKbd>Alt</TelaKbd>
54
+ <TelaKbd>⌘</TelaKbd>
55
+ </div>
56
+ ```
57
+
58
+ ### Arrow Keys
59
+
60
+ ```vue
61
+ <div class="flex gap-2">
62
+ <TelaKbd>↑</TelaKbd>
63
+ <TelaKbd>↓</TelaKbd>
64
+ <TelaKbd>←</TelaKbd>
65
+ <TelaKbd>→</TelaKbd>
66
+ </div>
67
+ ```
68
+
69
+ ### Function Keys
70
+
71
+ ```vue
72
+ <div class="flex gap-2">
73
+ <TelaKbd>F1</TelaKbd>
74
+ <TelaKbd>F2</TelaKbd>
75
+ <TelaKbd>F3</TelaKbd>
76
+ <TelaKbd>F4</TelaKbd>
77
+ <TelaKbd>F5</TelaKbd>
78
+ </div>
79
+ ```
80
+
81
+ ### In Help Text
82
+
83
+ ```vue
84
+ <div class="space-y-3">
85
+ <div class="flex items-center justify-between">
86
+ <span>Save document</span>
87
+ <div>
88
+ <TelaKbd>⌘</TelaKbd> + <TelaKbd>S</TelaKbd>
89
+ </div>
90
+ </div>
91
+
92
+ <div class="flex items-center justify-between">
93
+ <span>Open file</span>
94
+ <div>
95
+ <TelaKbd>⌘</TelaKbd> + <TelaKbd>O</TelaKbd>
96
+ </div>
97
+ </div>
98
+
99
+ <div class="flex items-center justify-between">
100
+ <span>Search</span>
101
+ <div>
102
+ <TelaKbd>⌘</TelaKbd> + <TelaKbd>F</TelaKbd>
103
+ </div>
104
+ </div>
105
+ </div>
106
+ ```
107
+
108
+ ### Combination Shortcuts
109
+
110
+ ```vue
111
+ <p>
112
+ Press <TelaKbd>Ctrl</TelaKbd> + <TelaKbd>Shift</TelaKbd> + <TelaKbd>P</TelaKbd> to open command palette
113
+ </p>
114
+ ```
115
+
116
+ ### Platform-Specific
117
+
118
+ ```vue
119
+ <script setup>
120
+ const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0
121
+ const cmdKey = isMac ? '⌘' : 'Ctrl'
122
+ </script>
123
+
124
+ <template>
125
+ <p>
126
+ Press <TelaKbd>{{ cmdKey }}</TelaKbd> + <TelaKbd>C</TelaKbd> to copy
127
+ </p>
128
+ </template>
129
+ ```
130
+
131
+ ### In Tooltips
132
+
133
+ ```vue
134
+ <TelaTooltip>
135
+ <TelaButton>Save</TelaButton>
136
+ <template #content>
137
+ Save <TelaKbd>⌘</TelaKbd><TelaKbd>S</TelaKbd>
138
+ </template>
139
+ </TelaTooltip>
140
+ ```
141
+
142
+ ### Keyboard Shortcut Guide
143
+
144
+ ```vue
145
+ <div class="p-6 bg-white rounded shadow">
146
+ <h3 class="text-lg font-semibold mb-4">Keyboard Shortcuts</h3>
147
+
148
+ <div class="space-y-3">
149
+ <div class="flex items-center justify-between py-2 border-b">
150
+ <span>Save</span>
151
+ <div class="flex gap-1">
152
+ <TelaKbd>Ctrl</TelaKbd>
153
+ <span>+</span>
154
+ <TelaKbd>S</TelaKbd>
155
+ </div>
156
+ </div>
157
+
158
+ <div class="flex items-center justify-between py-2 border-b">
159
+ <span>Undo</span>
160
+ <div class="flex gap-1">
161
+ <TelaKbd>Ctrl</TelaKbd>
162
+ <span>+</span>
163
+ <TelaKbd>Z</TelaKbd>
164
+ </div>
165
+ </div>
166
+
167
+ <div class="flex items-center justify-between py-2 border-b">
168
+ <span>Redo</span>
169
+ <div class="flex gap-1">
170
+ <TelaKbd>Ctrl</TelaKbd>
171
+ <span>+</span>
172
+ <TelaKbd>Shift</TelaKbd>
173
+ <span>+</span>
174
+ <TelaKbd>Z</TelaKbd>
175
+ </div>
176
+ </div>
177
+ </div>
178
+ </div>
179
+ ```
180
+
181
+ ## Common Key Names
182
+
183
+ ### Modifier Keys
184
+ - `Ctrl` - Control key
185
+ - `Shift` - Shift key
186
+ - `Alt` - Alt key
187
+ - `⌘` or `Cmd` - Command key (Mac)
188
+ - `⌥` or `Option` - Option key (Mac)
189
+
190
+ ### Special Keys
191
+ - `Enter` or `Return`
192
+ - `Esc` or `Escape`
193
+ - `Tab`
194
+ - `Space` or `Spacebar`
195
+ - `Backspace`
196
+ - `Delete` or `Del`
197
+
198
+ ### Arrow Keys
199
+ - `↑` - Up
200
+ - `↓` - Down
201
+ - `←` - Left
202
+ - `→` - Right
203
+
204
+ ### Function Keys
205
+ - `F1` through `F12`
206
+
207
+ ## Features
208
+
209
+ - **Styled Keys**: Looks like physical keyboard keys
210
+ - **Inline Display**: Works inline with text
211
+ - **Custom Styling**: Accepts custom classes
212
+ - **Semantic**: Uses `<kbd>` HTML element
213
+ - **Accessible**: Screen reader friendly
214
+
215
+ ## Use Cases
216
+
217
+ - **Documentation**: Show keyboard shortcuts
218
+ - **Help Text**: Explain keyboard controls
219
+ - **Tooltips**: Display shortcuts in tooltips
220
+ - **Command Palettes**: Show available shortcuts
221
+ - **Tutorials**: Teach keyboard navigation
222
+ - **Game Controls**: Display game controls
223
+
224
+ ## Best Practices
225
+
226
+ 1. **Use Actual Keys**: Show the real key names
227
+ 2. **Platform Awareness**: Show correct keys for platform
228
+ 3. **Combine with +**: Use + between multiple keys
229
+ 4. **Be Consistent**: Use same format throughout app
230
+ 5. **Provide Context**: Explain what the shortcut does
231
+
232
+ ## Accessibility
233
+
234
+ - Uses semantic `<kbd>` element
235
+ - Screen readers announce as keyboard input
236
+ - Clear visual distinction from normal text
237
+ - Sufficient color contrast
238
+
@@ -0,0 +1,18 @@
1
+ <script setup lang="ts">
2
+ defineProps<{
3
+ icon?: string
4
+ }>()
5
+ </script>
6
+
7
+ <template>
8
+ <span
9
+ text="12px #3F4650"
10
+ bg="gray-200"
11
+ rounded-6px
12
+ :class="icon ? 'w-20px h-20px' : 'px-4px'"
13
+ h-16px flex items-center justify-center
14
+ >
15
+ <TelaIcon v-if="icon" :name="icon" class="h-14px! w-14px!" />
16
+ <slot v-else />
17
+ </span>
18
+ </template>
@@ -0,0 +1,121 @@
1
+ import { Meta, Canvas, ArgTypes } from '@storybook/blocks';
2
+ import * as LabelStories from './label.stories.ts';
3
+
4
+ <Meta of={LabelStories} />
5
+
6
+ # TelaLabel
7
+
8
+ A simple, accessible label component for form inputs and other interactive elements. Provides consistent styling and supports disabled states through group and peer variants.
9
+
10
+ ## Examples
11
+
12
+ ### Default
13
+
14
+ <Canvas of={LabelStories.Default} />
15
+
16
+ ### Basic Usage
17
+
18
+ ```vue
19
+ <script setup>
20
+ import { ref } from 'vue'
21
+
22
+ const email = ref('')
23
+ </script>
24
+
25
+ <template>
26
+ <div>
27
+ <TelaLabel for="email">Email Address</TelaLabel>
28
+ <input id="email" v-model="email" type="email" />
29
+ </div>
30
+ </template>
31
+ ```
32
+
33
+ ### With Input Field
34
+
35
+ ```vue
36
+ <template>
37
+ <div>
38
+ <TelaLabel for="username">Username</TelaLabel>
39
+ <TelaInput id="username" v-model="username" placeholder="Enter username" />
40
+ </div>
41
+ </template>
42
+ ```
43
+
44
+ ### With Custom Styling
45
+
46
+ ```vue
47
+ <template>
48
+ <TelaLabel class="text-blue-600 text-lg" for="custom">
49
+ Custom Styled Label
50
+ </TelaLabel>
51
+ </template>
52
+ ```
53
+
54
+ ### Disabled State (with group)
55
+
56
+ ```vue
57
+ <template>
58
+ <div class="group" data-disabled="true">
59
+ <TelaLabel for="disabled-input">Disabled Field</TelaLabel>
60
+ <input id="disabled-input" disabled />
61
+ </div>
62
+ </template>
63
+ ```
64
+
65
+ ### With Peer Disabled
66
+
67
+ ```vue
68
+ <template>
69
+ <div>
70
+ <input id="peer-disabled" class="peer" disabled />
71
+ <TelaLabel for="peer-disabled">This label will be disabled</TelaLabel>
72
+ </div>
73
+ </template>
74
+ ```
75
+
76
+ ## Props
77
+
78
+ <ArgTypes />
79
+
80
+ ```typescript
81
+ type LabelProps = {
82
+ for?: string
83
+ class?: string
84
+ // Additional LabelProps from reka-ui
85
+ }
86
+ ```
87
+
88
+ ## Features
89
+
90
+ - **Accessible**: Proper label-input association with `for` attribute
91
+ - **Consistent Styling**: Uses heading-h5-semibold typography and primary text color
92
+ - **Disabled States**: Automatically handles disabled styling via group and peer selectors
93
+ - **Customizable**: Supports custom classes for flexible styling
94
+ - **Slot-based Content**: Use default slot for label content
95
+ - **Framework Integration**: Built on top of reka-ui Label primitive
96
+
97
+ ## Styling
98
+
99
+ The component includes built-in styles:
100
+ - **Typography**: `heading-h5-semibold` font style
101
+ - **Color**: `text-primary` for consistent theming
102
+ - **Select**: `select-none` prevents text selection
103
+ - **Disabled**: Automatically reduces opacity to 50% when disabled
104
+ - **Pointer Events**: Disables pointer events when disabled
105
+
106
+ ## Accessibility
107
+
108
+ - Uses semantic `<label>` element via reka-ui
109
+ - Proper association with form controls via `for` attribute
110
+ - Disabled state properly conveyed with reduced opacity
111
+ - Non-selectable text prevents accidental selection
112
+ - Cursor states managed for disabled inputs
113
+
114
+ ## Best Practices
115
+
116
+ 1. **Always associate with inputs**: Use the `for` attribute to link labels with their inputs
117
+ 2. **Use descriptive text**: Labels should clearly describe the associated input
118
+ 3. **Group with inputs**: Place labels logically with their form controls
119
+ 4. **Handle disabled states**: Use group or peer patterns for consistent disabled styling
120
+ 5. **Custom classes**: Add custom classes for specific design needs while maintaining base styles
121
+
@@ -0,0 +1,37 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3'
2
+
3
+ import TelaLabel from './label.vue'
4
+
5
+ const meta: Meta<typeof TelaLabel> = {
6
+ title: 'Core/Label',
7
+ component: TelaLabel,
8
+ parameters: {
9
+ layout: 'centered',
10
+ docs: {
11
+ description: {
12
+ component: 'A simple, accessible label component for form inputs and other interactive elements. Provides consistent styling and supports disabled states through group and peer variants.',
13
+ },
14
+ },
15
+ },
16
+ argTypes: {
17
+ for: {
18
+ control: 'text',
19
+ description: 'The ID of the form element the label is associated with. Used for accessibility.',
20
+ },
21
+ class: {
22
+ control: 'text',
23
+ description: 'Custom CSS classes to apply to the label element.',
24
+ },
25
+ },
26
+ }
27
+
28
+ export default meta
29
+
30
+ type Story = StoryObj<typeof meta>
31
+
32
+ export const Default: Story = {
33
+ render: () => ({
34
+ components: { TelaLabel },
35
+ template: '<TelaLabel>Label</TelaLabel>',
36
+ }),
37
+ }
@@ -0,0 +1,25 @@
1
+ <script setup lang="ts">
2
+ import { Label } from 'reka-ui'
3
+ import { reactiveOmit } from '@vueuse/core'
4
+ import type { LabelProps } from 'reka-ui'
5
+ import type { HTMLAttributes } from 'vue'
6
+
7
+ const props = defineProps<LabelProps & { class?: HTMLAttributes['class'] }>()
8
+
9
+ const delegatedProps = reactiveOmit(props, 'class')
10
+ </script>
11
+
12
+ <template>
13
+ <Label
14
+ data-slot="label"
15
+ v-bind="delegatedProps"
16
+ :class="
17
+ cn(
18
+ 'w-fit heading-h5-semibold text-primary select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
19
+ props.class,
20
+ )
21
+ "
22
+ >
23
+ <slot />
24
+ </Label>
25
+ </template>
@@ -0,0 +1,19 @@
1
+ <script setup lang="ts">
2
+ const props = defineProps<{
3
+ class?: string
4
+ href?: string
5
+ }>()
6
+ </script>
7
+
8
+ <template>
9
+ <a
10
+ v-if="props.href"
11
+ :href="props.href"
12
+ :class="cn('text-gray-900 underline underline-offset-3px', props.class)"
13
+ >
14
+ <slot />
15
+ </a>
16
+ <span v-else :class="cn('text-gray-900 underline underline-offset-3px', props.class)">
17
+ <slot />
18
+ </span>
19
+ </template>
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <div flex="~" rounded-6px items-center w-52px h-24px px-8px py-4px bg="gray-100">
3
+ <span body-12-semibold text="emerald-600" mr-4px>
4
+ Live
5
+ </span>
6
+ <div relative w-12px h-12px>
7
+ <div
8
+ w-12px h-12px absolute rounded-full bg="positive" flex items-center justify-center opacity-20
9
+ class="blink top-1/2 translate-y--1/2 left-1/2 translate-x--1/2"
10
+ />
11
+ <div
12
+ w-6px absolute h-6px rounded-full bg="positive"
13
+ class="top-1/2 translate-y--1/2 left-1/2 translate-x--1/2"
14
+ />
15
+ </div>
16
+ </div>
17
+ </template>
18
+
19
+ <style scoped>
20
+ .blink {
21
+ animation: blink 0.8s linear infinite;
22
+ }
23
+
24
+ @keyframes blink {
25
+ 0% {
26
+ opacity: 0;
27
+ }
28
+ 100% {
29
+ opacity: 0.3;
30
+ }
31
+ }
32
+ </style>
@@ -0,0 +1,98 @@
1
+ <!--
2
+ This a long pressable button, that fills a progress
3
+ fill until the action is executed
4
+ -->
5
+ <script lang="ts" setup>
6
+ // Roz approves this ↓
7
+ import type { ButtonProps } from '../tela/button/button.vue'
8
+
9
+ const props = defineProps<ButtonProps & {
10
+ duration: number
11
+ }>()
12
+ const emit = defineEmits(['success'])
13
+
14
+ const element = ref<HTMLElement>()
15
+ const progress = ref(0)
16
+ onLongPress(element, () => {
17
+ if (props.loading)
18
+ return
19
+
20
+ emit('success')
21
+ setTimeout(() => {
22
+ progress.value = 0
23
+ }, 100)
24
+ }, { delay: props.duration, modifiers: { stop: true } })
25
+
26
+ function onMouseDown(e: Event) {
27
+ if (props.loading)
28
+ return
29
+
30
+ progress.value = 100
31
+ e.preventDefault()
32
+ }
33
+
34
+ function onMouseUp(e: Event) {
35
+ if (props.loading)
36
+ return
37
+
38
+ progress.value = 0
39
+ e.preventDefault()
40
+ }
41
+
42
+ const transitionStyle = computed(() => {
43
+ return {
44
+ 'transition-duration': `${progress.value ? props.duration : 200}ms`,
45
+ 'transition-timing-function': 'cubic-bezier(0,-0.04, 0.28, 0.94)',
46
+ }
47
+ })
48
+
49
+ const buttonProps = computed(() => {
50
+ const { duration, ...resolvedProps } = props
51
+ return resolvedProps as ButtonProps
52
+ })
53
+ </script>
54
+
55
+ <template>
56
+ <TelaButton
57
+ ref="element"
58
+ :style="{
59
+ ...transitionStyle,
60
+ }"
61
+ relative
62
+ z-2
63
+ overflow-hidden
64
+ v-bind="buttonProps"
65
+ rounded
66
+ @mousedown.stop="onMouseDown"
67
+ @mouseup.stop="onMouseUp"
68
+ @mouseleave.stop="onMouseUp"
69
+ @touchstart.stop.passive="onMouseDown"
70
+ @touchend.stop="onMouseUp"
71
+ >
72
+ <div
73
+ absolute top-0 bottom-0 left-0 transition-all
74
+ class="bg-#CCF0DF"
75
+ :style="{
76
+ width: `${loading ? 100 : progress}%`,
77
+ ...transitionStyle,
78
+ }"
79
+ />
80
+
81
+ <template #leading>
82
+ <TelaIcon v-if="loading" name="i-ph-circle-notch" relative z-1 animate-spin />
83
+ <TelaIcon v-else-if="icon" :name="icon" relative z-1 />
84
+ </template>
85
+
86
+ <span v-if="$slots.default" relative z-1 body-12-semibold text="gray-900" tracking-tight>
87
+ <slot />
88
+ </span>
89
+ </TelaButton>
90
+ </template>
91
+
92
+ <style scoped>
93
+ button {
94
+ -webkit-user-select: none;
95
+ -moz-user-select: none;
96
+ user-select: none;
97
+ }
98
+ </style>../../../application
@@ -0,0 +1,77 @@
1
+ <script setup lang="ts">
2
+ import type { MenubarContentProps } from 'reka-ui'
3
+ import type { HTMLAttributes } from 'vue'
4
+ import { reactiveOmit } from '@vueuse/core'
5
+ import {
6
+ MenubarContent,
7
+ MenubarPortal,
8
+ useForwardProps,
9
+ } from 'reka-ui'
10
+ import { cn } from '@/lib/utils'
11
+
12
+ const props = withDefaults(
13
+ defineProps<MenubarContentProps & { class?: HTMLAttributes['class'] }>(),
14
+ {
15
+ align: 'start',
16
+ alignOffset: 0,
17
+ sideOffset: 8,
18
+ },
19
+ )
20
+
21
+ const delegatedProps = reactiveOmit(props, 'class')
22
+
23
+ const forwardedProps = useForwardProps(delegatedProps)
24
+ </script>
25
+
26
+ <template>
27
+ <MenubarPortal>
28
+ <MenubarContent
29
+ v-bind="forwardedProps"
30
+ :class="
31
+ cn(
32
+ 'MenubarContent z-50 min-w-60 overflow-hidden rounded-2xl border-[0.5px] border-gray-300 bg-white-1000 p-1 shadow-sm',
33
+ props.class,
34
+ )
35
+ "
36
+ >
37
+ <slot />
38
+ </MenubarContent>
39
+ </MenubarPortal>
40
+ </template>
41
+
42
+ <style>
43
+ .MenubarContent {
44
+ transform-origin: var(--reka-menubar-content-transform-origin);
45
+
46
+ &[data-state="open"] {
47
+ animation: slideDownAndFade 0.12s ease-out forwards;
48
+ }
49
+
50
+ &[data-state="closed"] {
51
+ animation: slideUpAndFade 0.12s ease-out forwards;
52
+ animation-delay: 0s;
53
+ }
54
+ }
55
+
56
+ @keyframes slideDownAndFade {
57
+ from {
58
+ opacity: 0;
59
+ transform: translateY(2px) scale(0.97);
60
+ }
61
+ to {
62
+ opacity: 1;
63
+ transform: scale(1);
64
+ }
65
+ }
66
+
67
+ @keyframes slideUpAndFade {
68
+ from {
69
+ opacity: 1;
70
+ transform: translateY(0) scale(1);
71
+ }
72
+ to {
73
+ opacity: 0;
74
+ transform: translateY(-2px) scale(0.97);
75
+ }
76
+ }
77
+ </style>
@@ -0,0 +1,32 @@
1
+ <script setup lang="ts">
2
+ import type { MenubarItemEmits, MenubarItemProps } from 'reka-ui'
3
+ import type { HTMLAttributes } from 'vue'
4
+ import { reactiveOmit } from '@vueuse/core'
5
+ import {
6
+ MenubarItem,
7
+
8
+ useForwardPropsEmits,
9
+ } from 'reka-ui'
10
+ import { cn } from '@/lib/utils'
11
+
12
+ const props = defineProps<MenubarItemProps & { class?: HTMLAttributes['class'], inset?: boolean }>()
13
+
14
+ const emits = defineEmits<MenubarItemEmits>()
15
+
16
+ const delegatedProps = reactiveOmit(props, 'class')
17
+
18
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
19
+ </script>
20
+
21
+ <template>
22
+ <MenubarItem
23
+ v-bind="forwarded"
24
+ :class="cn(
25
+ 'relative flex cursor-pointer select-none items-center rounded-xl px-3 py-1.5 text-body-14-medium font-460 outline-none focus:bg-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-40',
26
+ inset && 'pl-8',
27
+ props.class,
28
+ )"
29
+ >
30
+ <slot />
31
+ </MenubarItem>
32
+ </template>