@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,502 @@
1
+ # IconButton
2
+
3
+ A versatile icon button component built with Vue 3 Composition API and TypeScript. The IconButton component provides multiple visual styles, sizes, and states with built-in animations and accessibility features.
4
+
5
+ ## Installation/Import
6
+
7
+ ```typescript
8
+ import { IconButton } from "@umbra-ui/core";
9
+ import type { IconKey } from "@umbra-ui/icons";
10
+ ```
11
+
12
+ **Dependencies:**
13
+
14
+ - Vue 3.x
15
+ - @umbra-ui/icons (for icon components and types)
16
+
17
+ ## Basic Usage
18
+
19
+ ```vue
20
+ <script setup lang="ts">
21
+ import { IconButton } from "@umbra-ui/core";
22
+
23
+ const handleClick = (event: MouseEvent) => {
24
+ console.log("Icon button clicked!", event);
25
+ };
26
+ </script>
27
+
28
+ <template>
29
+ <IconButton
30
+ icon-name="heart"
31
+ button-style="primary"
32
+ button-type="round"
33
+ @click="handleClick"
34
+ />
35
+ </template>
36
+ ```
37
+
38
+ ## Props
39
+
40
+ | Prop Name | Type | Required | Default | Description |
41
+ | ------------- | -------------------------------------------------------- | -------- | ----------- | ------------------------------------ |
42
+ | `iconName` | `IconKey` | No | `"heart"` | Name of the icon to display |
43
+ | `buttonType` | `"round" \| "square" \| "plain"` | No | `"round"` | Visual style variant of the button |
44
+ | `buttonStyle` | `"primary" \| "secondary" \| "tertiary" \| "quaternary"` | No | `"primary"` | Color scheme for the button |
45
+ | `state` | `"normal" \| "active" \| "disabled"` | No | `"normal"` | Current state of the button |
46
+ | `buttonSize` | `number` | No | `16` | Size of the icon in pixels |
47
+ | `tooltip` | `string \| TooltipConfig` | No | - | Tooltip text or configuration object |
48
+
49
+ ### Button Types
50
+
51
+ - **`round`**: Circular button with rounded background
52
+ - **`square`**: Square button with rounded corners
53
+ - **`plain`**: Minimal button with no background, just the icon
54
+
55
+ ### Button Styles
56
+
57
+ - **`primary`**: Blue color scheme (default)
58
+ - **`secondary`**: Light gray color scheme
59
+ - **`tertiary`**: Very light gray color scheme
60
+ - **`quaternary`**: Lightest gray color scheme
61
+
62
+ ### Available Icons
63
+
64
+ The component supports all icons from the `@umbra-ui/icons` package. Common icons include:
65
+
66
+ - `heart`, `star`, `bookmark`, `share`, `download`, `upload`
67
+ - `edit`, `delete`, `add`, `remove`, `close`, `check`
68
+ - `arrow-left`, `arrow-right`, `arrow-up`, `arrow-down`
69
+ - `search`, `filter`, `settings`, `menu`, `user`
70
+ - And many more...
71
+
72
+ ## Events
73
+
74
+ | Event Name | Payload Type | Description |
75
+ | -------------- | ------------------------------------ | ------------------------------------- |
76
+ | `update:state` | `"normal" \| "active" \| "disabled"` | Emitted when the button state changes |
77
+ | `click` | `MouseEvent` | Emitted when the button is clicked |
78
+
79
+ ### Event Examples
80
+
81
+ ```vue
82
+ <script setup lang="ts">
83
+ import { ref } from "vue";
84
+ import { IconButton } from "@umbra-ui/core";
85
+
86
+ const buttonState = ref<"normal" | "active" | "disabled">("normal");
87
+
88
+ const handleClick = (event: MouseEvent) => {
89
+ console.log("Button clicked at:", event.clientX, event.clientY);
90
+ };
91
+
92
+ const handleStateChange = (newState: "normal" | "active" | "disabled") => {
93
+ console.log("Button state changed to:", newState);
94
+ buttonState.value = newState;
95
+ };
96
+ </script>
97
+
98
+ <template>
99
+ <IconButton
100
+ icon-name="heart"
101
+ :state="buttonState"
102
+ @click="handleClick"
103
+ @update:state="handleStateChange"
104
+ />
105
+ </template>
106
+ ```
107
+
108
+ ## Slots
109
+
110
+ This component does not use slots. The icon content is controlled via the `iconName` prop.
111
+
112
+ ## Exposed Methods/Refs
113
+
114
+ This component does not expose any methods or refs via `defineExpose`.
115
+
116
+ ## CSS Customization
117
+
118
+ The IconButton component uses CSS custom properties that can be overridden to customize the appearance:
119
+
120
+ ### Color Variables
121
+
122
+ ```css
123
+ /* IconButton background colors */
124
+ --iconbutton-primary-bg: #0090ff;
125
+ --iconbutton-primary-hover-bg: #0588f0;
126
+ --iconbutton-secondary-bg: #ffffff;
127
+ --iconbutton-secondary-hover-bg: #fcfcfc;
128
+ --iconbutton-tertiary-bg: #f9f9f9;
129
+ --iconbutton-tertiary-hover-bg: #f0f0f0;
130
+ --iconbutton-quaternary-bg: #f0f0f0;
131
+ --iconbutton-quaternary-hover-bg: #e8e8e8;
132
+
133
+ /* IconButton border colors */
134
+ --iconbutton-primary-border: rgba(0, 0, 0, 0.25);
135
+ --iconbutton-primary-hover-border: rgba(0, 0, 0, 0.5);
136
+ --iconbutton-secondary-border: #d9d9d9;
137
+ --iconbutton-secondary-hover-border: #8b8d98;
138
+ --iconbutton-tertiary-border: #d9d9d9;
139
+ --iconbutton-tertiary-hover-border: #9b9ea6;
140
+ --iconbutton-quaternary-border: #d9d9d9;
141
+ --iconbutton-quaternary-hover-border: #b2b5bd;
142
+
143
+ /* IconButton plain colors */
144
+ --iconbutton-plain-primary: #0090ff;
145
+ --iconbutton-plain-secondary: #374151;
146
+ --iconbutton-plain-tertiary: #8d8d8d;
147
+ --iconbutton-plain-quaternary: #cecece;
148
+
149
+ /* Icon colors */
150
+ --iconbutton-icon-color: #8d8d8d;
151
+ --iconbutton-icon-primary-color: #ffffff;
152
+
153
+ /* State variables */
154
+ --iconbutton-active-opacity: 0.8;
155
+ --iconbutton-disabled-opacity: 0.5;
156
+ ```
157
+
158
+ ### Custom Styling Example
159
+
160
+ ```vue
161
+ <template>
162
+ <IconButton
163
+ icon-name="heart"
164
+ button-style="primary"
165
+ class="custom-icon-button"
166
+ />
167
+ </template>
168
+
169
+ <style>
170
+ .custom-icon-button {
171
+ --iconbutton-primary-bg: #ff6b6b;
172
+ --iconbutton-primary-hover-bg: #ff5252;
173
+ --iconbutton-icon-primary-color: #ffffff;
174
+ }
175
+ </style>
176
+ ```
177
+
178
+ ## Examples
179
+
180
+ ### Different Button Types
181
+
182
+ ```vue
183
+ <script setup lang="ts">
184
+ import { IconButton } from "@umbra-ui/core";
185
+ </script>
186
+
187
+ <template>
188
+ <div class="button-examples">
189
+ <IconButton icon-name="heart" button-type="round" />
190
+ <IconButton icon-name="star" button-type="square" />
191
+ <IconButton icon-name="bookmark" button-type="plain" />
192
+ </div>
193
+ </template>
194
+
195
+ <style module>
196
+ .button-examples {
197
+ display: flex;
198
+ gap: 1rem;
199
+ align-items: center;
200
+ }
201
+ </style>
202
+ ```
203
+
204
+ ### Different Button Styles
205
+
206
+ ```vue
207
+ <script setup lang="ts">
208
+ import { IconButton } from "@umbra-ui/core";
209
+ </script>
210
+
211
+ <template>
212
+ <div class="style-examples">
213
+ <IconButton icon-name="heart" button-style="primary" />
214
+ <IconButton icon-name="star" button-style="secondary" />
215
+ <IconButton icon-name="bookmark" button-style="tertiary" />
216
+ <IconButton icon-name="share" button-style="quaternary" />
217
+ </div>
218
+ </template>
219
+
220
+ <style module>
221
+ .style-examples {
222
+ display: flex;
223
+ gap: 1rem;
224
+ align-items: center;
225
+ }
226
+ </style>
227
+ ```
228
+
229
+ ### Different Sizes
230
+
231
+ ```vue
232
+ <script setup lang="ts">
233
+ import { IconButton } from "@umbra-ui/core";
234
+ </script>
235
+
236
+ <template>
237
+ <div class="size-examples">
238
+ <IconButton icon-name="heart" :button-size="12" />
239
+ <IconButton icon-name="star" :button-size="16" />
240
+ <IconButton icon-name="bookmark" :button-size="20" />
241
+ <IconButton icon-name="share" :button-size="24" />
242
+ </div>
243
+ </template>
244
+
245
+ <style module>
246
+ .size-examples {
247
+ display: flex;
248
+ gap: 1rem;
249
+ align-items: center;
250
+ }
251
+ </style>
252
+ ```
253
+
254
+ ### Button States and Event Handling
255
+
256
+ ```vue
257
+ <script setup lang="ts">
258
+ import { ref } from "vue";
259
+ import { IconButton } from "@umbra-ui/core";
260
+
261
+ const likeState = ref<"normal" | "active" | "disabled">("normal");
262
+ const likeCount = ref(0);
263
+
264
+ const handleLike = (event: MouseEvent) => {
265
+ likeCount.value++;
266
+ console.log(`Liked ${likeCount.value} times`);
267
+
268
+ // Simulate loading state
269
+ likeState.value = "active";
270
+ setTimeout(() => {
271
+ likeState.value = "normal";
272
+ }, 1000);
273
+ };
274
+
275
+ const toggleDisabled = () => {
276
+ likeState.value = likeState.value === "disabled" ? "normal" : "disabled";
277
+ };
278
+ </script>
279
+
280
+ <template>
281
+ <div class="state-examples">
282
+ <div class="like-section">
283
+ <IconButton
284
+ icon-name="heart"
285
+ :state="likeState"
286
+ button-style="primary"
287
+ @click="handleLike"
288
+ />
289
+ <span>{{ likeCount }} likes</span>
290
+ </div>
291
+
292
+ <IconButton
293
+ icon-name="settings"
294
+ button-style="secondary"
295
+ @click="toggleDisabled"
296
+ />
297
+ </div>
298
+ </template>
299
+
300
+ <style module>
301
+ .state-examples {
302
+ display: flex;
303
+ gap: 2rem;
304
+ align-items: center;
305
+ }
306
+
307
+ .like-section {
308
+ display: flex;
309
+ align-items: center;
310
+ gap: 0.5rem;
311
+ }
312
+ </style>
313
+ ```
314
+
315
+ ### Action Bar
316
+
317
+ ```vue
318
+ <script setup lang="ts">
319
+ import { ref } from "vue";
320
+ import { IconButton } from "@umbra-ui/core";
321
+
322
+ const isBookmarked = ref(false);
323
+ const isLiked = ref(false);
324
+ const isShared = ref(false);
325
+
326
+ const toggleBookmark = () => {
327
+ isBookmarked.value = !isBookmarked.value;
328
+ };
329
+
330
+ const toggleLike = () => {
331
+ isLiked.value = !isLiked.value;
332
+ };
333
+
334
+ const handleShare = () => {
335
+ isShared.value = true;
336
+ setTimeout(() => {
337
+ isShared.value = false;
338
+ }, 1000);
339
+ };
340
+ </script>
341
+
342
+ <template>
343
+ <div class="action-bar">
344
+ <IconButton
345
+ :icon-name="isBookmarked ? 'bookmark-filled' : 'bookmark'"
346
+ :button-style="isBookmarked ? 'primary' : 'secondary'"
347
+ @click="toggleBookmark"
348
+ />
349
+
350
+ <IconButton
351
+ :icon-name="isLiked ? 'heart-filled' : 'heart'"
352
+ :button-style="isLiked ? 'primary' : 'secondary'"
353
+ @click="toggleLike"
354
+ />
355
+
356
+ <IconButton
357
+ icon-name="share"
358
+ :state="isShared ? 'active' : 'normal'"
359
+ button-style="secondary"
360
+ @click="handleShare"
361
+ />
362
+
363
+ <IconButton icon-name="download" button-style="tertiary" />
364
+ </div>
365
+ </template>
366
+
367
+ <style module>
368
+ .action-bar {
369
+ display: flex;
370
+ gap: 0.5rem;
371
+ align-items: center;
372
+ padding: 1rem;
373
+ background-color: #f5f5f5;
374
+ border-radius: 0.5rem;
375
+ }
376
+ </style>
377
+ ```
378
+
379
+ ### With Tooltips
380
+
381
+ ```vue
382
+ <script setup lang="ts">
383
+ import { IconButton } from "@umbra-ui/core";
384
+ </script>
385
+
386
+ <template>
387
+ <div class="tooltip-examples">
388
+ <IconButton icon-name="heart" tooltip="Add to favorites" />
389
+
390
+ <IconButton
391
+ icon-name="share"
392
+ :tooltip="{
393
+ content: 'Share this item',
394
+ placement: 'top',
395
+ delay: 500,
396
+ }"
397
+ />
398
+
399
+ <IconButton icon-name="settings" tooltip="Open settings" />
400
+ </div>
401
+ </template>
402
+
403
+ <style module>
404
+ .tooltip-examples {
405
+ display: flex;
406
+ gap: 1rem;
407
+ align-items: center;
408
+ }
409
+ </style>
410
+ ```
411
+
412
+ ### Navigation Icons
413
+
414
+ ```vue
415
+ <script setup lang="ts">
416
+ import { ref } from "vue";
417
+ import { IconButton } from "@umbra-ui/core";
418
+
419
+ const currentPage = ref(1);
420
+ const totalPages = ref(10);
421
+
422
+ const goToPrevious = () => {
423
+ if (currentPage.value > 1) {
424
+ currentPage.value--;
425
+ }
426
+ };
427
+
428
+ const goToNext = () => {
429
+ if (currentPage.value < totalPages.value) {
430
+ currentPage.value++;
431
+ }
432
+ };
433
+
434
+ const goToFirst = () => {
435
+ currentPage.value = 1;
436
+ };
437
+
438
+ const goToLast = () => {
439
+ currentPage.value = totalPages.value;
440
+ };
441
+ </script>
442
+
443
+ <template>
444
+ <div class="navigation">
445
+ <IconButton
446
+ icon-name="chevron-double-left"
447
+ button-style="secondary"
448
+ :state="currentPage === 1 ? 'disabled' : 'normal'"
449
+ @click="goToFirst"
450
+ />
451
+
452
+ <IconButton
453
+ icon-name="chevron-left"
454
+ button-style="secondary"
455
+ :state="currentPage === 1 ? 'disabled' : 'normal'"
456
+ @click="goToPrevious"
457
+ />
458
+
459
+ <span class="page-info"> {{ currentPage }} of {{ totalPages }} </span>
460
+
461
+ <IconButton
462
+ icon-name="chevron-right"
463
+ button-style="secondary"
464
+ :state="currentPage === totalPages ? 'disabled' : 'normal'"
465
+ @click="goToNext"
466
+ />
467
+
468
+ <IconButton
469
+ icon-name="chevron-double-right"
470
+ button-style="secondary"
471
+ :state="currentPage === totalPages ? 'disabled' : 'normal'"
472
+ @click="goToLast"
473
+ />
474
+ </div>
475
+ </template>
476
+
477
+ <style module>
478
+ .navigation {
479
+ display: flex;
480
+ align-items: center;
481
+ gap: 0.5rem;
482
+ }
483
+
484
+ .page-info {
485
+ margin: 0 1rem;
486
+ font-weight: 500;
487
+ }
488
+ </style>
489
+ ```
490
+
491
+ ## Notes
492
+
493
+ - The button includes smooth hover animations with scale transforms
494
+ - Active state shows a circular animation using the `CircleAnimOutlineIcon`
495
+ - Disabled state applies grayscale filter and prevents pointer events
496
+ - All color schemes support both light and dark themes
497
+ - The component is fully accessible with proper ARIA attributes
498
+ - Plain buttons have different hover behavior (scale 1.15 instead of 1.05)
499
+ - Icon size is controlled via the `buttonSize` prop in pixels
500
+ - The component automatically handles icon loading from the icons package
501
+ - Tooltips are supported for better user experience
502
+ - The component supports all icons available in the `@umbra-ui/icons` package
@@ -0,0 +1,89 @@
1
+ /* Light theme using Colors */
2
+ :root {
3
+ /* IconButton background colors */
4
+ --iconbutton-primary-bg: #0090ff; /* blue9 - same as button primary */
5
+ --iconbutton-primary-hover-bg: #0588f0; /* blue10 - same as button primary hover */
6
+ --iconbutton-secondary-bg: #ffffff; /* gray5 - light background for light mode */
7
+ --iconbutton-secondary-hover-bg: #fcfcfc; /* gray6 - light hover for light mode */
8
+ --iconbutton-tertiary-bg: #f9f9f9; /* gray3 - lighter background for light mode */
9
+ --iconbutton-tertiary-hover-bg: #f0f0f0; /* gray4 - lighter hover for light mode */
10
+ --iconbutton-quaternary-bg: #f0f0f0; /* gray2 - lightest background for light mode */
11
+ --iconbutton-quaternary-hover-bg: #e8e8e8; /* gray3 - lightest hover for light mode */
12
+
13
+ /* IconButton border colors */
14
+ --iconbutton-primary-border: rgba(0, 0, 0, 0.25);
15
+ --iconbutton-primary-hover-border: rgba(
16
+ 0,
17
+ 0,
18
+ 0,
19
+ 0.5
20
+ ); /* Original dark mode value */
21
+ --iconbutton-secondary-border: #d9d9d9; /* gray8 - light border for light mode */
22
+ --iconbutton-secondary-hover-border: #8b8d98; /* gray9 - light hover border */
23
+ --iconbutton-tertiary-border: #d9d9d9; /* gray7 - lighter border for light mode */
24
+ --iconbutton-tertiary-hover-border: #9b9ea6; /* gray8 - lighter hover border */
25
+ --iconbutton-quaternary-border: #d9d9d9; /* gray6 - lightest border for light mode */
26
+ --iconbutton-quaternary-hover-border: #b2b5bd; /* gray7 - lightest hover border */
27
+
28
+ /* IconButton plain colors */
29
+ --iconbutton-plain-primary: #0090ff; /* blue9 - same as button primary */
30
+ --iconbutton-plain-secondary: #374151;
31
+ --iconbutton-plain-tertiary: #8d8d8d;
32
+ --iconbutton-plain-quaternary: #cecece;
33
+
34
+ /* Icon colors */
35
+ --iconbutton-icon-color: #8d8d8d;
36
+ --iconbutton-icon-primary-color: #ffffff; /* white - for primary buttons */
37
+
38
+ /* State colors */
39
+ --iconbutton-active-opacity: 0.8;
40
+ --iconbutton-disabled-opacity: 0.5;
41
+ }
42
+
43
+ /* Dark theme */
44
+ .dark,
45
+ .dark-theme {
46
+ /* IconButton background colors */
47
+ --iconbutton-primary-bg: #0090ff; /* blue9 - same as button primary */
48
+ --iconbutton-primary-hover-bg: #1a9eff; /* Original dark mode value */
49
+ --iconbutton-secondary-bg: #484848; /* Original dark mode value */
50
+ --iconbutton-secondary-hover-bg: #5a5a5a; /* Original dark mode value */
51
+ --iconbutton-tertiary-bg: #313131; /* Original dark mode value */
52
+ --iconbutton-tertiary-hover-bg: #484848; /* Original dark mode value */
53
+ --iconbutton-quaternary-bg: #222222; /* Original dark mode value */
54
+ --iconbutton-quaternary-hover-bg: #313131; /* Original dark mode value */
55
+
56
+ /* IconButton border colors */
57
+ --iconbutton-primary-border: rgba(
58
+ 255,
59
+ 255,
60
+ 255,
61
+ 0.25
62
+ ); /* Original dark mode value */
63
+ --iconbutton-primary-hover-border: rgba(
64
+ 255,
65
+ 255,
66
+ 255,
67
+ 0.5
68
+ ); /* Original dark mode value */
69
+ --iconbutton-secondary-border: #606060; /* Original dark mode value */
70
+ --iconbutton-secondary-hover-border: #606060; /* Original dark mode value */
71
+ --iconbutton-tertiary-border: #3a3a3a; /* Original dark mode value */
72
+ --iconbutton-tertiary-hover-border: #606060; /* Original dark mode value */
73
+ --iconbutton-quaternary-border: #2a2a2a; /* Original dark mode value */
74
+ --iconbutton-quaternary-hover-border: #3a3a3a; /* Original dark mode value */
75
+
76
+ /* IconButton plain colors */
77
+ --iconbutton-plain-primary: #0090ff; /* blue9 - same as button primary */
78
+ --iconbutton-plain-secondary: #eeeeee; /* Original dark mode value */
79
+ --iconbutton-plain-tertiary: #b4b4b4; /* Original dark mode value */
80
+ --iconbutton-plain-quaternary: #7b7b7b; /* Original dark mode value */
81
+
82
+ /* Icon colors */
83
+ --iconbutton-icon-color: #ffffff; /* white - for filled buttons */
84
+ --iconbutton-icon-primary-color: #ffffff; /* white - for primary buttons */
85
+
86
+ /* State colors */
87
+ --iconbutton-active-opacity: 0.8;
88
+ --iconbutton-disabled-opacity: 0.5;
89
+ }