@umbra.ui/core 0.1.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 (272) hide show
  1. package/dist/components/controls/Dropdown/types.d.ts +5 -0
  2. package/dist/components/controls/Dropdown/types.d.ts.map +1 -0
  3. package/dist/components/controls/Dropdown/types.js +1 -0
  4. package/dist/components/controls/SegmentedControl/types.d.ts +6 -0
  5. package/dist/components/controls/SegmentedControl/types.d.ts.map +1 -0
  6. package/dist/components/controls/SegmentedControl/types.js +1 -0
  7. package/dist/components/dialogs/Alert/types.d.ts +7 -0
  8. package/dist/components/dialogs/Alert/types.d.ts.map +1 -0
  9. package/dist/components/dialogs/Alert/types.js +1 -0
  10. package/dist/components/dialogs/Toast/types.d.ts +34 -0
  11. package/dist/components/dialogs/Toast/types.d.ts.map +1 -0
  12. package/dist/components/dialogs/Toast/types.js +10 -0
  13. package/dist/components/dialogs/Toast/useToast.d.ts +36 -0
  14. package/dist/components/dialogs/Toast/useToast.d.ts.map +1 -0
  15. package/dist/components/dialogs/Toast/useToast.js +90 -0
  16. package/dist/components/indicators/Tooltip/tooltip.d.ts +3 -0
  17. package/dist/components/indicators/Tooltip/tooltip.d.ts.map +1 -0
  18. package/dist/components/indicators/Tooltip/tooltip.js +33 -0
  19. package/dist/components/indicators/Tooltip/types.d.ts +14 -0
  20. package/dist/components/indicators/Tooltip/types.d.ts.map +1 -0
  21. package/dist/components/indicators/Tooltip/types.js +1 -0
  22. package/dist/components/indicators/Tooltip/useTooltip.d.ts +18 -0
  23. package/dist/components/indicators/Tooltip/useTooltip.d.ts.map +1 -0
  24. package/dist/components/indicators/Tooltip/useTooltip.js +57 -0
  25. package/dist/components/inputs/Tags/tag-bar-styles.d.ts +14 -0
  26. package/dist/components/inputs/Tags/tag-bar-styles.d.ts.map +1 -0
  27. package/dist/components/inputs/Tags/tag-bar-styles.js +313 -0
  28. package/dist/components/inputs/Tags/types.d.ts +93 -0
  29. package/dist/components/inputs/Tags/types.d.ts.map +1 -0
  30. package/dist/components/inputs/Tags/types.js +216 -0
  31. package/dist/components/inputs/search/types.d.ts +9 -0
  32. package/dist/components/inputs/search/types.d.ts.map +1 -0
  33. package/dist/components/inputs/search/types.js +1 -0
  34. package/dist/components/navigation/adaptive/types.d.ts +16 -0
  35. package/dist/components/navigation/adaptive/types.d.ts.map +1 -0
  36. package/dist/components/navigation/adaptive/types.js +1 -0
  37. package/dist/components/navigation/adaptive/useAdaptiveLayout.d.ts +27 -0
  38. package/dist/components/navigation/adaptive/useAdaptiveLayout.d.ts.map +1 -0
  39. package/dist/components/navigation/adaptive/useAdaptiveLayout.js +40 -0
  40. package/dist/components/navigation/adaptive/useBreakpoints.d.ts +6 -0
  41. package/dist/components/navigation/adaptive/useBreakpoints.d.ts.map +1 -0
  42. package/dist/components/navigation/adaptive/useBreakpoints.js +37 -0
  43. package/dist/components/navigation/adaptive/useContainerMonitor.d.ts +93 -0
  44. package/dist/components/navigation/adaptive/useContainerMonitor.d.ts.map +1 -0
  45. package/dist/components/navigation/adaptive/useContainerMonitor.js +145 -0
  46. package/dist/components/navigation/adaptive/useViewAnimation.d.ts +31 -0
  47. package/dist/components/navigation/adaptive/useViewAnimation.d.ts.map +1 -0
  48. package/dist/components/navigation/adaptive/useViewAnimation.js +591 -0
  49. package/dist/components/navigation/adaptive/useViewResize.d.ts +52 -0
  50. package/dist/components/navigation/adaptive/useViewResize.d.ts.map +1 -0
  51. package/dist/components/navigation/adaptive/useViewResize.js +146 -0
  52. package/dist/components/navigation/navstack/useNavigationStack.d.ts +25 -0
  53. package/dist/components/navigation/navstack/useNavigationStack.d.ts.map +1 -0
  54. package/dist/components/navigation/navstack/useNavigationStack.js +133 -0
  55. package/dist/components/navigation/slideover/useSlideoverController.d.ts +20 -0
  56. package/dist/components/navigation/slideover/useSlideoverController.d.ts.map +1 -0
  57. package/dist/components/navigation/slideover/useSlideoverController.js +267 -0
  58. package/dist/components/navigation/splitview/useSplitViewController.d.ts +20 -0
  59. package/dist/components/navigation/splitview/useSplitViewController.d.ts.map +1 -0
  60. package/dist/components/navigation/splitview/useSplitViewController.js +325 -0
  61. package/dist/components/navigation/tabcontroller/types.d.ts +21 -0
  62. package/dist/components/navigation/tabcontroller/types.d.ts.map +1 -0
  63. package/dist/components/navigation/tabcontroller/types.js +1 -0
  64. package/dist/components/navigation/tabcontroller/useTabController.d.ts +5 -0
  65. package/dist/components/navigation/tabcontroller/useTabController.d.ts.map +1 -0
  66. package/dist/components/navigation/tabcontroller/useTabController.js +10 -0
  67. package/dist/components/navigation/types.d.ts +8 -0
  68. package/dist/components/navigation/types.d.ts.map +1 -0
  69. package/dist/components/navigation/types.js +1 -0
  70. package/dist/components/pickers/CollectionPicker/types.d.ts +11 -0
  71. package/dist/components/pickers/CollectionPicker/types.d.ts.map +1 -0
  72. package/dist/components/pickers/CollectionPicker/types.js +1 -0
  73. package/dist/components/pickers/ColorPicker/colors.d.ts +13 -0
  74. package/dist/components/pickers/ColorPicker/colors.d.ts.map +1 -0
  75. package/dist/components/pickers/ColorPicker/colors.js +266 -0
  76. package/dist/components/pickers/FilePicker/types.d.ts +10 -0
  77. package/dist/components/pickers/FilePicker/types.d.ts.map +1 -0
  78. package/dist/components/pickers/FilePicker/types.js +1 -0
  79. package/dist/index.d.ts +91 -0
  80. package/dist/index.d.ts.map +1 -0
  81. package/dist/index.js +196 -0
  82. package/dist/theme.d.ts +73 -0
  83. package/dist/theme.d.ts.map +1 -0
  84. package/dist/theme.js +279 -0
  85. package/dist/themes/blank.d.ts +7 -0
  86. package/dist/themes/blank.d.ts.map +1 -0
  87. package/dist/themes/blank.js +543 -0
  88. package/dist/themes/crimson-dark.d.ts +4 -0
  89. package/dist/themes/crimson-dark.d.ts.map +1 -0
  90. package/dist/themes/crimson-dark.js +552 -0
  91. package/dist/themes/cyan-light.d.ts +4 -0
  92. package/dist/themes/cyan-light.d.ts.map +1 -0
  93. package/dist/themes/cyan-light.js +552 -0
  94. package/dist/themes/dark.d.ts +4 -0
  95. package/dist/themes/dark.d.ts.map +1 -0
  96. package/dist/themes/dark.js +551 -0
  97. package/dist/themes/gold-dark.d.ts +4 -0
  98. package/dist/themes/gold-dark.d.ts.map +1 -0
  99. package/dist/themes/gold-dark.js +552 -0
  100. package/dist/themes/grass-dark.d.ts +4 -0
  101. package/dist/themes/grass-dark.d.ts.map +1 -0
  102. package/dist/themes/grass-dark.js +552 -0
  103. package/dist/themes/indigo.d.ts +4 -0
  104. package/dist/themes/indigo.d.ts.map +1 -0
  105. package/dist/themes/indigo.js +552 -0
  106. package/dist/themes/light.d.ts +4 -0
  107. package/dist/themes/light.d.ts.map +1 -0
  108. package/dist/themes/light.js +551 -0
  109. package/dist/themes/orange-dark.d.ts +4 -0
  110. package/dist/themes/orange-dark.d.ts.map +1 -0
  111. package/dist/themes/orange-dark.js +551 -0
  112. package/dist/themes/orange-light.d.ts +4 -0
  113. package/dist/themes/orange-light.d.ts.map +1 -0
  114. package/dist/themes/orange-light.js +551 -0
  115. package/package.json +62 -0
  116. package/src/components/controls/Button/Button.vue +417 -0
  117. package/src/components/controls/Button/README.md +348 -0
  118. package/src/components/controls/Button/theme.css +200 -0
  119. package/src/components/controls/Checkbox/Checkbox.vue +164 -0
  120. package/src/components/controls/Checkbox/README.md +441 -0
  121. package/src/components/controls/Checkbox/theme.css +36 -0
  122. package/src/components/controls/Dropdown/Dropdown.vue +476 -0
  123. package/src/components/controls/Dropdown/README.md +370 -0
  124. package/src/components/controls/Dropdown/theme.css +50 -0
  125. package/src/components/controls/Dropdown/types.ts +6 -0
  126. package/src/components/controls/IconButton/IconButton.vue +267 -0
  127. package/src/components/controls/IconButton/README.md +502 -0
  128. package/src/components/controls/IconButton/theme.css +89 -0
  129. package/src/components/controls/Radio/README.md +591 -0
  130. package/src/components/controls/Radio/Radio.vue +89 -0
  131. package/src/components/controls/Radio/theme.css +14 -0
  132. package/src/components/controls/RangeSlider/README.md +608 -0
  133. package/src/components/controls/RangeSlider/RangeSlider.vue +535 -0
  134. package/src/components/controls/RangeSlider/theme.css +80 -0
  135. package/src/components/controls/SegmentedControl/README.md +587 -0
  136. package/src/components/controls/SegmentedControl/SegmentedControl.vue +284 -0
  137. package/src/components/controls/SegmentedControl/theme.css +60 -0
  138. package/src/components/controls/SegmentedControl/types.ts +5 -0
  139. package/src/components/controls/Slider/README.md +627 -0
  140. package/src/components/controls/Slider/Slider.vue +260 -0
  141. package/src/components/controls/Slider/theme.css +74 -0
  142. package/src/components/controls/Stepper/README.md +601 -0
  143. package/src/components/controls/Stepper/Stepper.vue +103 -0
  144. package/src/components/controls/Stepper/theme.css +53 -0
  145. package/src/components/controls/Switch/README.md +667 -0
  146. package/src/components/controls/Switch/Switch.vue +127 -0
  147. package/src/components/controls/Switch/theme.css +42 -0
  148. package/src/components/dialogs/Alert/Alert.vue +218 -0
  149. package/src/components/dialogs/Alert/README.md +450 -0
  150. package/src/components/dialogs/Alert/theme.css +44 -0
  151. package/src/components/dialogs/Alert/types.ts +11 -0
  152. package/src/components/dialogs/Toast/README.md +522 -0
  153. package/src/components/dialogs/Toast/Toast.vue +296 -0
  154. package/src/components/dialogs/Toast/ToastContainer.vue +330 -0
  155. package/src/components/dialogs/Toast/theme.css +44 -0
  156. package/src/components/dialogs/Toast/types.ts +46 -0
  157. package/src/components/dialogs/Toast/useToast.ts +127 -0
  158. package/src/components/indicators/ProgressBar/ProgressBar.vue +98 -0
  159. package/src/components/indicators/ProgressBar/README.md +744 -0
  160. package/src/components/indicators/ProgressBar/theme.css +36 -0
  161. package/src/components/indicators/Tooltip/README.md +723 -0
  162. package/src/components/indicators/Tooltip/TooltipProvider.vue +142 -0
  163. package/src/components/indicators/Tooltip/theme.css +18 -0
  164. package/src/components/indicators/Tooltip/tooltip.ts +48 -0
  165. package/src/components/indicators/Tooltip/types.ts +15 -0
  166. package/src/components/indicators/Tooltip/useTooltip.ts +71 -0
  167. package/src/components/inputs/AutogrowTextView/AutogrowTextView.vue +110 -0
  168. package/src/components/inputs/AutogrowTextView/README.md +643 -0
  169. package/src/components/inputs/AutogrowTextView/theme.css +28 -0
  170. package/src/components/inputs/InputCard/InputCard.vue +600 -0
  171. package/src/components/inputs/InputCard/README.md +636 -0
  172. package/src/components/inputs/InputEmail/InputEmail.vue +698 -0
  173. package/src/components/inputs/InputEmail/README.md +764 -0
  174. package/src/components/inputs/InputNumber/InputNumber.vue +300 -0
  175. package/src/components/inputs/InputNumber/README.md +749 -0
  176. package/src/components/inputs/InputPhone/InputPhone.vue +645 -0
  177. package/src/components/inputs/InputPhone/README.md +636 -0
  178. package/src/components/inputs/InputSecure/InputSecure.vue +646 -0
  179. package/src/components/inputs/InputSecure/README.md +771 -0
  180. package/src/components/inputs/InputText/InputText.vue +225 -0
  181. package/src/components/inputs/InputText/README.md +844 -0
  182. package/src/components/inputs/OTP/OTP.vue +349 -0
  183. package/src/components/inputs/OTP/README.md +736 -0
  184. package/src/components/inputs/OTP/theme.css +50 -0
  185. package/src/components/inputs/StringCapture/README.md +718 -0
  186. package/src/components/inputs/StringCapture/StringCapture.vue +315 -0
  187. package/src/components/inputs/StringCapture/theme.css +86 -0
  188. package/src/components/inputs/Tags/README.md +897 -0
  189. package/src/components/inputs/Tags/TagBar.vue +793 -0
  190. package/src/components/inputs/Tags/TagCreation.vue +219 -0
  191. package/src/components/inputs/Tags/TagPicker.vue +380 -0
  192. package/src/components/inputs/Tags/tag-bar-styles.ts +354 -0
  193. package/src/components/inputs/Tags/theme.css +121 -0
  194. package/src/components/inputs/Tags/types.ts +346 -0
  195. package/src/components/inputs/search/README.md +759 -0
  196. package/src/components/inputs/search/SearchBar.vue +394 -0
  197. package/src/components/inputs/search/SearchResults.vue +310 -0
  198. package/src/components/inputs/search/theme.css +187 -0
  199. package/src/components/inputs/search/types.ts +8 -0
  200. package/src/components/inputs/theme.css +102 -0
  201. package/src/components/menus/ActionMenu/ActionMenu.vue +383 -0
  202. package/src/components/menus/ActionMenu/README.md +825 -0
  203. package/src/components/menus/ActionMenu/theme.css +93 -0
  204. package/src/components/models/Popover/Popover.vue +551 -0
  205. package/src/components/models/Popover/README.md +885 -0
  206. package/src/components/models/Popover/theme.css +52 -0
  207. package/src/components/models/Sheet/README.md +1159 -0
  208. package/src/components/models/Sheet/Sheet.vue +465 -0
  209. package/src/components/models/Sheet/theme.css +72 -0
  210. package/src/components/models/Sidebar/README.md +1228 -0
  211. package/src/components/models/Sidebar/Sidebar.vue +480 -0
  212. package/src/components/models/Sidebar/theme.css +90 -0
  213. package/src/components/navigation/adaptive/AdaptiveLayout.vue +779 -0
  214. package/src/components/navigation/adaptive/AdaptiveLayoutBreadcrumbs.vue +192 -0
  215. package/src/components/navigation/adaptive/AdaptiveLayoutMenuButton.vue +149 -0
  216. package/src/components/navigation/adaptive/README.md +768 -0
  217. package/src/components/navigation/adaptive/types.ts +19 -0
  218. package/src/components/navigation/adaptive/useAdaptiveLayout.ts +89 -0
  219. package/src/components/navigation/adaptive/useBreakpoints.ts +41 -0
  220. package/src/components/navigation/adaptive/useContainerMonitor.ts +214 -0
  221. package/src/components/navigation/adaptive/useViewAnimation.ts +721 -0
  222. package/src/components/navigation/adaptive/useViewResize.ts +211 -0
  223. package/src/components/navigation/navstack/NavigationStack.vue +180 -0
  224. package/src/components/navigation/navstack/README.md +994 -0
  225. package/src/components/navigation/navstack/useNavigationStack.ts +164 -0
  226. package/src/components/navigation/slideover/README.md +1275 -0
  227. package/src/components/navigation/slideover/SlideoverController.vue +287 -0
  228. package/src/components/navigation/slideover/useSlideoverController.ts +320 -0
  229. package/src/components/navigation/splitview/README.md +1115 -0
  230. package/src/components/navigation/splitview/SplitViewController.vue +176 -0
  231. package/src/components/navigation/splitview/useSplitViewController.ts +388 -0
  232. package/src/components/navigation/tabcontroller/README.md +919 -0
  233. package/src/components/navigation/tabcontroller/TabController.vue +307 -0
  234. package/src/components/navigation/tabcontroller/TabItem.vue +57 -0
  235. package/src/components/navigation/tabcontroller/types.ts +24 -0
  236. package/src/components/navigation/tabcontroller/useTabController.ts +18 -0
  237. package/src/components/navigation/theme.css +91 -0
  238. package/src/components/navigation/types.ts +7 -0
  239. package/src/components/pickers/CollectionPicker/CollectionPicker.vue +398 -0
  240. package/src/components/pickers/CollectionPicker/README.md +1115 -0
  241. package/src/components/pickers/CollectionPicker/theme.css +14 -0
  242. package/src/components/pickers/CollectionPicker/types.ts +11 -0
  243. package/src/components/pickers/ColorPicker/ColorPicker.vue +376 -0
  244. package/src/components/pickers/ColorPicker/README.md +1439 -0
  245. package/src/components/pickers/ColorPicker/colors.ts +299 -0
  246. package/src/components/pickers/ColorPicker/theme.css +32 -0
  247. package/src/components/pickers/DatePicker/DatePicker.vue +660 -0
  248. package/src/components/pickers/DatePicker/README.md +1195 -0
  249. package/src/components/pickers/DatePicker/theme.css +22 -0
  250. package/src/components/pickers/FilePicker/FilePicker.vue +534 -0
  251. package/src/components/pickers/FilePicker/README.md +1542 -0
  252. package/src/components/pickers/FilePicker/theme.css +48 -0
  253. package/src/components/pickers/FilePicker/types.ts +10 -0
  254. package/src/components/pickers/IconPicker/IconPicker.vue +327 -0
  255. package/src/components/pickers/IconPicker/README.md +1161 -0
  256. package/src/components/pickers/IconPicker/theme.css +28 -0
  257. package/src/components/pickers/theme.css +82 -0
  258. package/src/components/views/MarkdownViewer/MarkdownViewer.vue +442 -0
  259. package/src/components/views/MarkdownViewer/README.md +833 -0
  260. package/src/components/views/MarkdownViewer/theme.css +130 -0
  261. package/src/index.ts +263 -0
  262. package/src/theme.ts +378 -0
  263. package/src/themes/crimson-dark.ts +556 -0
  264. package/src/themes/cyan-light.ts +556 -0
  265. package/src/themes/dark.ts +557 -0
  266. package/src/themes/gold-dark.ts +556 -0
  267. package/src/themes/grass-dark.ts +556 -0
  268. package/src/themes/indigo.ts +556 -0
  269. package/src/themes/light.ts +557 -0
  270. package/src/themes/orange-dark.ts +557 -0
  271. package/src/themes/orange-light.ts +557 -0
  272. package/src/vue.d.ts +45 -0
@@ -0,0 +1,744 @@
1
+ # ProgressBar
2
+
3
+ A flexible progress bar component built with Vue 3 Composition API and TypeScript. The ProgressBar component provides visual feedback for loading states, completion percentages, and progress tracking with customizable styles, colors, and dimensions.
4
+
5
+ ## Installation/Import
6
+
7
+ ```typescript
8
+ import { ProgressBar } from "@umbra-ui/core";
9
+ ```
10
+
11
+ **Dependencies:**
12
+
13
+ - Vue 3.x
14
+
15
+ ## Basic Usage
16
+
17
+ ```vue
18
+ <script setup lang="ts">
19
+ import { ref } from "vue";
20
+ import { ProgressBar } from "@umbra-ui/core";
21
+
22
+ const progress = ref(45);
23
+
24
+ const updateProgress = (newProgress: number) => {
25
+ progress.value = newProgress;
26
+ };
27
+ </script>
28
+
29
+ <template>
30
+ <div>
31
+ <ProgressBar :progress="progress" @update:progress="updateProgress" />
32
+
33
+ <button @click="updateProgress(75)">Set to 75%</button>
34
+ </div>
35
+ </template>
36
+ ```
37
+
38
+ ## Props
39
+
40
+ | Prop Name | Type | Required | Default | Description |
41
+ | --------------- | ------------------------------------- | -------- | ----------------------------------------------- | ------------------------------------------------- |
42
+ | `progress` | `number` | No | `0` | Progress percentage (0-100) |
43
+ | `barType` | `"default" \| "capsule" \| "capline"` | No | `"default"` | Visual style variant of the progress bar |
44
+ | `trackColor` | `string` | No | `"var(--progressbar-track-default)"` | Background color of the progress track |
45
+ | `progressColor` | `string` | No | `"var(--progressbar-progress-default)"` | Color of the progress fill |
46
+ | `height` | `string` | No | `"6px"` (default) or `"12px"` (capsule/capline) | Height of the progress bar in pixels or CSS units |
47
+
48
+ ## Events
49
+
50
+ | Event Name | Payload Type | Description |
51
+ | ----------------- | ------------ | -------------------------------------------------------------- |
52
+ | `update:progress` | `number` | Emitted when the progress value changes, returns the new value |
53
+
54
+ ## Slots
55
+
56
+ This component does not use slots.
57
+
58
+ ## Exposed Methods/Refs
59
+
60
+ This component does not expose any methods or refs.
61
+
62
+ ## CSS Customization
63
+
64
+ The ProgressBar component uses CSS custom properties for easy theming and customization:
65
+
66
+ ```css
67
+ /* ProgressBar track colors */
68
+ --progressbar-track-default: #f0f2f4;
69
+ --progressbar-track-capline: transparent;
70
+
71
+ /* ProgressBar progress colors */
72
+ --progressbar-progress-default: #0090ff;
73
+
74
+ /* ProgressBar border colors */
75
+ --progressbar-border-capline: #0090ff;
76
+ --progressbar-border-progress: white;
77
+
78
+ /* ProgressBar text colors */
79
+ --progressbar-text-default: #1a1d23;
80
+ --progressbar-text-capline: #1a1d23;
81
+ ```
82
+
83
+ ## Examples
84
+
85
+ ### Different Bar Types
86
+
87
+ ```vue
88
+ <script setup lang="ts">
89
+ import { ref } from "vue";
90
+ import { ProgressBar } from "@umbra-ui/core";
91
+
92
+ const progress = ref(60);
93
+ </script>
94
+
95
+ <template>
96
+ <div class="progress-examples">
97
+ <div class="progress-group">
98
+ <label>Default Style</label>
99
+ <ProgressBar barType="default" :progress="progress" />
100
+ </div>
101
+
102
+ <div class="progress-group">
103
+ <label>Capsule Style</label>
104
+ <ProgressBar barType="capsule" :progress="progress" />
105
+ </div>
106
+
107
+ <div class="progress-group">
108
+ <label>Capline Style</label>
109
+ <ProgressBar barType="capline" :progress="progress" />
110
+ </div>
111
+ </div>
112
+ </template>
113
+
114
+ <style module>
115
+ .progress-examples {
116
+ display: flex;
117
+ flex-direction: column;
118
+ gap: 1rem;
119
+ }
120
+
121
+ .progress-group {
122
+ display: flex;
123
+ flex-direction: column;
124
+ gap: 0.5rem;
125
+ }
126
+
127
+ label {
128
+ font-weight: 500;
129
+ color: #333;
130
+ }
131
+ </style>
132
+ ```
133
+
134
+ ### Custom Colors
135
+
136
+ ```vue
137
+ <script setup lang="ts">
138
+ import { ref } from "vue";
139
+ import { ProgressBar } from "@umbra-ui/core";
140
+
141
+ const progress = ref(75);
142
+ </script>
143
+
144
+ <template>
145
+ <div class="color-examples">
146
+ <div class="progress-group">
147
+ <label>Red Progress</label>
148
+ <ProgressBar
149
+ :progress="progress"
150
+ progressColor="#ff4444"
151
+ trackColor="#ffe6e6"
152
+ />
153
+ </div>
154
+
155
+ <div class="progress-group">
156
+ <label>Green Progress</label>
157
+ <ProgressBar
158
+ :progress="progress"
159
+ progressColor="#44ff44"
160
+ trackColor="#e6ffe6"
161
+ />
162
+ </div>
163
+
164
+ <div class="progress-group">
165
+ <label>Purple Progress</label>
166
+ <ProgressBar
167
+ :progress="progress"
168
+ progressColor="#8844ff"
169
+ trackColor="#f0e6ff"
170
+ />
171
+ </div>
172
+ </div>
173
+ </template>
174
+
175
+ <style module>
176
+ .color-examples {
177
+ display: flex;
178
+ flex-direction: column;
179
+ gap: 1rem;
180
+ }
181
+
182
+ .progress-group {
183
+ display: flex;
184
+ flex-direction: column;
185
+ gap: 0.5rem;
186
+ }
187
+
188
+ label {
189
+ font-weight: 500;
190
+ color: #333;
191
+ }
192
+ </style>
193
+ ```
194
+
195
+ ### Different Heights
196
+
197
+ ```vue
198
+ <script setup lang="ts">
199
+ import { ref } from "vue";
200
+ import { ProgressBar } from "@umbra-ui/core";
201
+
202
+ const progress = ref(50);
203
+ </script>
204
+
205
+ <template>
206
+ <div class="height-examples">
207
+ <div class="progress-group">
208
+ <label>Thin (4px)</label>
209
+ <ProgressBar :progress="progress" height="4px" />
210
+ </div>
211
+
212
+ <div class="progress-group">
213
+ <label>Default (6px)</label>
214
+ <ProgressBar :progress="progress" height="6px" />
215
+ </div>
216
+
217
+ <div class="progress-group">
218
+ <label>Medium (12px)</label>
219
+ <ProgressBar :progress="progress" height="12px" />
220
+ </div>
221
+
222
+ <div class="progress-group">
223
+ <label>Large (20px)</label>
224
+ <ProgressBar :progress="progress" height="20px" />
225
+ </div>
226
+ </div>
227
+ </template>
228
+
229
+ <style module>
230
+ .height-examples {
231
+ display: flex;
232
+ flex-direction: column;
233
+ gap: 1rem;
234
+ }
235
+
236
+ .progress-group {
237
+ display: flex;
238
+ flex-direction: column;
239
+ gap: 0.5rem;
240
+ }
241
+
242
+ label {
243
+ font-weight: 500;
244
+ color: #333;
245
+ }
246
+ </style>
247
+ ```
248
+
249
+ ### File Upload Progress
250
+
251
+ ```vue
252
+ <script setup lang="ts">
253
+ import { ref } from "vue";
254
+ import { ProgressBar } from "@umbra-ui/core";
255
+
256
+ const uploadProgress = ref(0);
257
+ const isUploading = ref(false);
258
+
259
+ const simulateUpload = async () => {
260
+ isUploading.value = true;
261
+ uploadProgress.value = 0;
262
+
263
+ for (let i = 0; i <= 100; i += 10) {
264
+ await new Promise((resolve) => setTimeout(resolve, 200));
265
+ uploadProgress.value = i;
266
+ }
267
+
268
+ isUploading.value = false;
269
+ };
270
+ </script>
271
+
272
+ <template>
273
+ <div class="upload-example">
274
+ <h3>File Upload</h3>
275
+
276
+ <div class="upload-area">
277
+ <p>Click to upload a file</p>
278
+ <button @click="simulateUpload" :disabled="isUploading">
279
+ {{ isUploading ? "Uploading..." : "Upload File" }}
280
+ </button>
281
+ </div>
282
+
283
+ <div v-if="isUploading || uploadProgress > 0" class="progress-section">
284
+ <div class="progress-info">
285
+ <span>Upload Progress</span>
286
+ <span>{{ uploadProgress }}%</span>
287
+ </div>
288
+ <ProgressBar
289
+ :progress="uploadProgress"
290
+ barType="capsule"
291
+ progressColor="#30a46c"
292
+ trackColor="#e6f7e6"
293
+ height="8px"
294
+ />
295
+ </div>
296
+ </div>
297
+ </template>
298
+
299
+ <style module>
300
+ .upload-example {
301
+ max-width: 400px;
302
+ padding: 1.5rem;
303
+ border: 1px solid #e0e0e0;
304
+ border-radius: 8px;
305
+ }
306
+
307
+ .upload-area {
308
+ text-align: center;
309
+ padding: 2rem;
310
+ border: 2px dashed #ccc;
311
+ border-radius: 8px;
312
+ margin-bottom: 1rem;
313
+ }
314
+
315
+ .progress-section {
316
+ margin-top: 1rem;
317
+ }
318
+
319
+ .progress-info {
320
+ display: flex;
321
+ justify-content: space-between;
322
+ margin-bottom: 0.5rem;
323
+ font-size: 0.9rem;
324
+ color: #666;
325
+ }
326
+
327
+ button {
328
+ padding: 0.5rem 1rem;
329
+ background-color: #007bff;
330
+ color: white;
331
+ border: none;
332
+ border-radius: 4px;
333
+ cursor: pointer;
334
+ }
335
+
336
+ button:disabled {
337
+ background-color: #ccc;
338
+ cursor: not-allowed;
339
+ }
340
+ </style>
341
+ ```
342
+
343
+ ### Loading States
344
+
345
+ ```vue
346
+ <script setup lang="ts">
347
+ import { ref } from "vue";
348
+ import { ProgressBar } from "@umbra-ui/core";
349
+
350
+ const loadingProgress = ref(0);
351
+ const isLoading = ref(false);
352
+
353
+ const startLoading = () => {
354
+ isLoading.value = true;
355
+ loadingProgress.value = 0;
356
+
357
+ const interval = setInterval(() => {
358
+ if (loadingProgress.value < 90) {
359
+ loadingProgress.value += Math.random() * 10;
360
+ }
361
+ }, 200);
362
+
363
+ // Simulate completion
364
+ setTimeout(() => {
365
+ clearInterval(interval);
366
+ loadingProgress.value = 100;
367
+ setTimeout(() => {
368
+ isLoading.value = false;
369
+ loadingProgress.value = 0;
370
+ }, 500);
371
+ }, 3000);
372
+ };
373
+ </script>
374
+
375
+ <template>
376
+ <div class="loading-example">
377
+ <h3>Loading States</h3>
378
+
379
+ <button @click="startLoading" :disabled="isLoading">
380
+ {{ isLoading ? "Loading..." : "Start Loading" }}
381
+ </button>
382
+
383
+ <div v-if="isLoading" class="loading-section">
384
+ <div class="loading-info">
385
+ <span>Loading data...</span>
386
+ <span>{{ Math.round(loadingProgress) }}%</span>
387
+ </div>
388
+ <ProgressBar
389
+ :progress="loadingProgress"
390
+ barType="default"
391
+ progressColor="#5b5bd6"
392
+ trackColor="#f0f0ff"
393
+ height="6px"
394
+ />
395
+ </div>
396
+ </div>
397
+ </template>
398
+
399
+ <style module>
400
+ .loading-example {
401
+ max-width: 400px;
402
+ padding: 1.5rem;
403
+ border: 1px solid #e0e0e0;
404
+ border-radius: 8px;
405
+ }
406
+
407
+ .loading-section {
408
+ margin-top: 1rem;
409
+ }
410
+
411
+ .loading-info {
412
+ display: flex;
413
+ justify-content: space-between;
414
+ margin-bottom: 0.5rem;
415
+ font-size: 0.9rem;
416
+ color: #666;
417
+ }
418
+
419
+ button {
420
+ padding: 0.5rem 1rem;
421
+ background-color: #5b5bd6;
422
+ color: white;
423
+ border: none;
424
+ border-radius: 4px;
425
+ cursor: pointer;
426
+ }
427
+
428
+ button:disabled {
429
+ background-color: #ccc;
430
+ cursor: not-allowed;
431
+ }
432
+ </style>
433
+ ```
434
+
435
+ ### Form Completion
436
+
437
+ ```vue
438
+ <script setup lang="ts">
439
+ import { ref, computed } from "vue";
440
+ import { ProgressBar } from "@umbra-ui/core";
441
+
442
+ const formData = ref({
443
+ name: "",
444
+ email: "",
445
+ phone: "",
446
+ address: "",
447
+ preferences: "",
448
+ });
449
+
450
+ const completionPercentage = computed(() => {
451
+ const fields = Object.keys(formData.value);
452
+ const completedFields = fields.filter(
453
+ (field) =>
454
+ formData.value[field as keyof typeof formData.value].trim() !== ""
455
+ );
456
+ return Math.round((completedFields.length / fields.length) * 100);
457
+ });
458
+ </script>
459
+
460
+ <template>
461
+ <div class="form-example">
462
+ <h3>Form Completion</h3>
463
+
464
+ <div class="completion-section">
465
+ <div class="completion-info">
466
+ <span>Form Progress</span>
467
+ <span>{{ completionPercentage }}%</span>
468
+ </div>
469
+ <ProgressBar
470
+ :progress="completionPercentage"
471
+ barType="capsule"
472
+ progressColor="#30a46c"
473
+ trackColor="#e6f7e6"
474
+ height="8px"
475
+ />
476
+ </div>
477
+
478
+ <form class="form">
479
+ <div class="form-group">
480
+ <label>Name</label>
481
+ <input
482
+ v-model="formData.name"
483
+ type="text"
484
+ placeholder="Enter your name"
485
+ />
486
+ </div>
487
+
488
+ <div class="form-group">
489
+ <label>Email</label>
490
+ <input
491
+ v-model="formData.email"
492
+ type="email"
493
+ placeholder="Enter your email"
494
+ />
495
+ </div>
496
+
497
+ <div class="form-group">
498
+ <label>Phone</label>
499
+ <input
500
+ v-model="formData.phone"
501
+ type="tel"
502
+ placeholder="Enter your phone"
503
+ />
504
+ </div>
505
+
506
+ <div class="form-group">
507
+ <label>Address</label>
508
+ <input
509
+ v-model="formData.address"
510
+ type="text"
511
+ placeholder="Enter your address"
512
+ />
513
+ </div>
514
+
515
+ <div class="form-group">
516
+ <label>Preferences</label>
517
+ <textarea
518
+ v-model="formData.preferences"
519
+ placeholder="Enter your preferences"
520
+ ></textarea>
521
+ </div>
522
+ </form>
523
+ </div>
524
+ </template>
525
+
526
+ <style module>
527
+ .form-example {
528
+ max-width: 500px;
529
+ padding: 1.5rem;
530
+ border: 1px solid #e0e0e0;
531
+ border-radius: 8px;
532
+ }
533
+
534
+ .completion-section {
535
+ margin-bottom: 1.5rem;
536
+ padding: 1rem;
537
+ background-color: #f8f9fa;
538
+ border-radius: 6px;
539
+ }
540
+
541
+ .completion-info {
542
+ display: flex;
543
+ justify-content: space-between;
544
+ margin-bottom: 0.5rem;
545
+ font-weight: 500;
546
+ color: #333;
547
+ }
548
+
549
+ .form {
550
+ display: flex;
551
+ flex-direction: column;
552
+ gap: 1rem;
553
+ }
554
+
555
+ .form-group {
556
+ display: flex;
557
+ flex-direction: column;
558
+ gap: 0.5rem;
559
+ }
560
+
561
+ label {
562
+ font-weight: 500;
563
+ color: #333;
564
+ }
565
+
566
+ input,
567
+ textarea {
568
+ padding: 0.5rem;
569
+ border: 1px solid #ddd;
570
+ border-radius: 4px;
571
+ font-size: 1rem;
572
+ }
573
+
574
+ textarea {
575
+ min-height: 80px;
576
+ resize: vertical;
577
+ }
578
+ </style>
579
+ ```
580
+
581
+ ### Multi-Step Progress
582
+
583
+ ```vue
584
+ <script setup lang="ts">
585
+ import { ref, computed } from "vue";
586
+ import { ProgressBar } from "@umbra-ui/core";
587
+
588
+ const currentStep = ref(1);
589
+ const totalSteps = 5;
590
+
591
+ const stepProgress = computed(() => {
592
+ return (currentStep.value / totalSteps) * 100;
593
+ });
594
+
595
+ const nextStep = () => {
596
+ if (currentStep.value < totalSteps) {
597
+ currentStep.value++;
598
+ }
599
+ };
600
+
601
+ const prevStep = () => {
602
+ if (currentStep.value > 1) {
603
+ currentStep.value--;
604
+ }
605
+ };
606
+
607
+ const resetSteps = () => {
608
+ currentStep.value = 1;
609
+ };
610
+ </script>
611
+
612
+ <template>
613
+ <div class="multistep-example">
614
+ <h3>Multi-Step Process</h3>
615
+
616
+ <div class="step-progress">
617
+ <div class="step-info">
618
+ <span>Step {{ currentStep }} of {{ totalSteps }}</span>
619
+ <span>{{ Math.round(stepProgress) }}%</span>
620
+ </div>
621
+ <ProgressBar
622
+ :progress="stepProgress"
623
+ barType="capline"
624
+ progressColor="#0090ff"
625
+ trackColor="transparent"
626
+ height="12px"
627
+ />
628
+ </div>
629
+
630
+ <div class="step-content">
631
+ <h4>Step {{ currentStep }}: {{ getStepTitle(currentStep) }}</h4>
632
+ <p>{{ getStepDescription(currentStep) }}</p>
633
+ </div>
634
+
635
+ <div class="step-controls">
636
+ <button @click="prevStep" :disabled="currentStep === 1">Previous</button>
637
+ <button @click="nextStep" :disabled="currentStep === totalSteps">
638
+ Next
639
+ </button>
640
+ <button @click="resetSteps">Reset</button>
641
+ </div>
642
+ </div>
643
+ </template>
644
+
645
+ <script setup lang="ts">
646
+ const getStepTitle = (step: number) => {
647
+ const titles = [
648
+ "Welcome",
649
+ "Personal Information",
650
+ "Preferences",
651
+ "Review",
652
+ "Complete",
653
+ ];
654
+ return titles[step - 1] || "Unknown Step";
655
+ };
656
+
657
+ const getStepDescription = (step: number) => {
658
+ const descriptions = [
659
+ "Welcome to our setup process. Let's get started!",
660
+ "Please provide your personal information.",
661
+ "Configure your preferences and settings.",
662
+ "Review all the information you've provided.",
663
+ "Congratulations! You've completed the setup.",
664
+ ];
665
+ return descriptions[step - 1] || "No description available.";
666
+ };
667
+ </script>
668
+
669
+ <style module>
670
+ .multistep-example {
671
+ max-width: 500px;
672
+ padding: 1.5rem;
673
+ border: 1px solid #e0e0e0;
674
+ border-radius: 8px;
675
+ }
676
+
677
+ .step-progress {
678
+ margin-bottom: 1.5rem;
679
+ padding: 1rem;
680
+ background-color: #f8f9fa;
681
+ border-radius: 6px;
682
+ }
683
+
684
+ .step-info {
685
+ display: flex;
686
+ justify-content: space-between;
687
+ margin-bottom: 0.5rem;
688
+ font-weight: 500;
689
+ color: #333;
690
+ }
691
+
692
+ .step-content {
693
+ margin-bottom: 1.5rem;
694
+ padding: 1rem;
695
+ background-color: #f8f9fa;
696
+ border-radius: 6px;
697
+ }
698
+
699
+ .step-content h4 {
700
+ margin: 0 0 0.5rem 0;
701
+ color: #333;
702
+ }
703
+
704
+ .step-content p {
705
+ margin: 0;
706
+ color: #666;
707
+ }
708
+
709
+ .step-controls {
710
+ display: flex;
711
+ gap: 0.5rem;
712
+ justify-content: center;
713
+ }
714
+
715
+ button {
716
+ padding: 0.5rem 1rem;
717
+ background-color: #007bff;
718
+ color: white;
719
+ border: none;
720
+ border-radius: 4px;
721
+ cursor: pointer;
722
+ }
723
+
724
+ button:disabled {
725
+ background-color: #ccc;
726
+ cursor: not-allowed;
727
+ }
728
+
729
+ button:not(:disabled):hover {
730
+ background-color: #0056b3;
731
+ }
732
+ </style>
733
+ ```
734
+
735
+ ## Notes
736
+
737
+ - The component automatically clamps progress values between 0 and 100
738
+ - Progress text is only displayed when the height is 20px or greater
739
+ - The component includes smooth transitions for progress changes
740
+ - Different bar types have different default heights and styling
741
+ - The component supports both light and dark themes through CSS custom properties
742
+ - The progress bar is fully accessible and supports screen readers
743
+ - Custom colors can be applied to both the track and progress fill
744
+ - The component uses CSS custom properties for easy theming and customization