@returnless/focus-ui 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +23 -0
  3. package/dist/focus-ui.es.js +33 -0
  4. package/dist/types/components/Accordion/Accordion.vue.d.ts +32 -0
  5. package/dist/types/components/Accordion/AccordionItem.vue.d.ts +2 -0
  6. package/dist/types/components/Accordion/index.d.ts +2 -0
  7. package/dist/types/components/index.d.ts +1 -0
  8. package/dist/types/index.d.ts +7 -0
  9. package/package.json +53 -0
  10. package/src/build-utils/generate-component-meta.ts +76 -0
  11. package/src/build-utils/update-component-list.js +31 -0
  12. package/src/build-utils/update-component-list.ts +32 -0
  13. package/src/components/Accordion/Accordion.vue +20 -0
  14. package/src/components/Accordion/AccordionContent.vue +14 -0
  15. package/src/components/Accordion/AccordionItem.vue +18 -0
  16. package/src/components/Accordion/AccordionTrigger.vue +35 -0
  17. package/src/components/Accordion/README.md +56 -0
  18. package/src/components/Accordion/index.ts +4 -0
  19. package/src/components/Alert/Alert.vue +55 -0
  20. package/src/components/Alert/AlertDescription.vue +8 -0
  21. package/src/components/Alert/AlertTitle.vue +11 -0
  22. package/src/components/Alert/DismissableAlertButton.vue +34 -0
  23. package/src/components/Alert/README.md +121 -0
  24. package/src/components/Alert/index.ts +3 -0
  25. package/src/components/AlertDialog/AlertDialog.vue +45 -0
  26. package/src/components/AlertDialog/AlertDialogActionButton.vue +9 -0
  27. package/src/components/AlertDialog/AlertDialogCancelButton.vue +15 -0
  28. package/src/components/AlertDialog/AlertDialogContent.vue +8 -0
  29. package/src/components/AlertDialog/AlertDialogDescription.vue +11 -0
  30. package/src/components/AlertDialog/AlertDialogFooter.vue +11 -0
  31. package/src/components/AlertDialog/AlertDialogHeader.vue +8 -0
  32. package/src/components/AlertDialog/AlertDialogTitle.vue +7 -0
  33. package/src/components/AlertDialog/README.md +85 -0
  34. package/src/components/AlertDialog/index.ts +8 -0
  35. package/src/components/Avatar/Avatar.vue +78 -0
  36. package/src/components/Avatar/README.md +122 -0
  37. package/src/components/Avatar/index.ts +1 -0
  38. package/src/components/Badge/Badge.vue +51 -0
  39. package/src/components/Badge/BadgeContent.vue +9 -0
  40. package/src/components/Badge/BadgeIcon.vue +7 -0
  41. package/src/components/Badge/README.md +131 -0
  42. package/src/components/Badge/index.ts +3 -0
  43. package/src/components/Button/Button.vue +63 -0
  44. package/src/components/Button/ButtonContent.vue +7 -0
  45. package/src/components/Button/ButtonIcon.vue +7 -0
  46. package/src/components/Button/README.md +228 -0
  47. package/src/components/Button/index.ts +3 -0
  48. package/src/components/ButtonGroup/ButtonGroup.vue +7 -0
  49. package/src/components/ButtonGroup/README.md +42 -0
  50. package/src/components/ButtonGroup/index.ts +1 -0
  51. package/src/components/Card/Card.vue +7 -0
  52. package/src/components/Card/CardDescription.vue +11 -0
  53. package/src/components/Card/CardFooter.vue +7 -0
  54. package/src/components/Card/CardHeader.vue +7 -0
  55. package/src/components/Card/CardSection.vue +7 -0
  56. package/src/components/Card/CardTitle.vue +8 -0
  57. package/src/components/Card/README.md +69 -0
  58. package/src/components/Card/index.ts +6 -0
  59. package/src/components/CategoryBar/CategoryBar.vue +25 -0
  60. package/src/components/CategoryBar/CategoryBarItem.vue +34 -0
  61. package/src/components/CategoryBar/README.md +17 -0
  62. package/src/components/CategoryBar/index.ts +2 -0
  63. package/src/components/Checkbox/Checkbox.vue +49 -0
  64. package/src/components/Checkbox/README.md +82 -0
  65. package/src/components/Checkbox/index.ts +1 -0
  66. package/src/components/Collapsible/README.md +25 -0
  67. package/src/components/DataTable/README.md +56 -0
  68. package/src/components/DatePicker/DatePicker.vue +140 -0
  69. package/src/components/DatePicker/DatePickerCard.vue +9 -0
  70. package/src/components/DatePicker/README.md +59 -0
  71. package/src/components/DatePicker/index.ts +2 -0
  72. package/src/components/DescriptionList/DescriptionList.vue +18 -0
  73. package/src/components/DescriptionList/DescriptionListDescription.vue +8 -0
  74. package/src/components/DescriptionList/DescriptionListItem.vue +21 -0
  75. package/src/components/DescriptionList/DescriptionListTerm.vue +11 -0
  76. package/src/components/DescriptionList/README.md +159 -0
  77. package/src/components/DescriptionList/index.ts +4 -0
  78. package/src/components/EmptyState/EmptyState.vue +13 -0
  79. package/src/components/EmptyState/EmptyStateActions.vue +11 -0
  80. package/src/components/EmptyState/EmptyStateContent.vue +7 -0
  81. package/src/components/EmptyState/EmptyStateDescription.vue +11 -0
  82. package/src/components/EmptyState/EmptyStateTitle.vue +7 -0
  83. package/src/components/EmptyState/README.md +102 -0
  84. package/src/components/EmptyState/index.ts +5 -0
  85. package/src/components/Feed/Feed.vue +7 -0
  86. package/src/components/Feed/FeedItem.vue +16 -0
  87. package/src/components/Feed/FeedItemBlock.vue +8 -0
  88. package/src/components/Feed/FeedItemDateIndicator.vue +11 -0
  89. package/src/components/Feed/FeedItemIcon.vue +26 -0
  90. package/src/components/Feed/FeedItemSimple.vue +8 -0
  91. package/src/components/Feed/README.md +115 -0
  92. package/src/components/Feed/index.ts +6 -0
  93. package/src/components/Form/Form.vue +30 -0
  94. package/src/components/Form/README.md +52 -0
  95. package/src/components/Form/index.ts +1 -0
  96. package/src/components/FormLayout/FormLayout.vue +7 -0
  97. package/src/components/FormLayout/README.md +59 -0
  98. package/src/components/FormLayout/index.ts +1 -0
  99. package/src/components/InputLabel/InputLabel.vue +32 -0
  100. package/src/components/InputLabel/index.ts +1 -0
  101. package/src/components/Link/Link.vue +38 -0
  102. package/src/components/Link/README.md +119 -0
  103. package/src/components/Link/index.ts +1 -0
  104. package/src/components/MetricCard/MetricCard.vue +11 -0
  105. package/src/components/MetricCard/MetricCardHeader.vue +7 -0
  106. package/src/components/MetricCard/MetricCardLabel.vue +9 -0
  107. package/src/components/MetricCard/MetricCardSection.vue +11 -0
  108. package/src/components/MetricCard/MetricCardValue.vue +8 -0
  109. package/src/components/MetricCard/README.md +53 -0
  110. package/src/components/MetricCard/index.ts +5 -0
  111. package/src/components/Navigation/Navigation.vue +8 -0
  112. package/src/components/Navigation/NavigationItem.vue +43 -0
  113. package/src/components/Navigation/NavigationSection.vue +27 -0
  114. package/src/components/Navigation/README.md +88 -0
  115. package/src/components/Navigation/index.ts +3 -0
  116. package/src/components/Page/Page.vue +38 -0
  117. package/src/components/Page/PageDescription.vue +11 -0
  118. package/src/components/Page/PageHeader.vue +34 -0
  119. package/src/components/Page/PageTitle.vue +9 -0
  120. package/src/components/Page/README.md +220 -0
  121. package/src/components/Page/index.ts +4 -0
  122. package/src/components/Pagination/Pagination.vue +8 -0
  123. package/src/components/Pagination/PaginationNextButton.vue +10 -0
  124. package/src/components/Pagination/PaginationPreviousButton.vue +10 -0
  125. package/src/components/Pagination/README.md +45 -0
  126. package/src/components/Pagination/index.ts +3 -0
  127. package/src/components/PinInput/PinInput.vue +169 -0
  128. package/src/components/PinInput/README.md +35 -0
  129. package/src/components/PinInput/index.ts +1 -0
  130. package/src/components/Popover/README.md +51 -0
  131. package/src/components/ProgressBar/ProgressBar.vue +33 -0
  132. package/src/components/ProgressBar/ProgressBarIndicator.vue +7 -0
  133. package/src/components/ProgressBar/README.md +98 -0
  134. package/src/components/ProgressBar/index.ts +2 -0
  135. package/src/components/RadioButton/README.md +111 -0
  136. package/src/components/RadioButton/RadioButton.vue +48 -0
  137. package/src/components/RadioButton/index.ts +1 -0
  138. package/src/components/Select/README.md +74 -0
  139. package/src/components/Select/Select.vue +91 -0
  140. package/src/components/Select/SelectGroup.vue +12 -0
  141. package/src/components/Select/SelectOption.vue +12 -0
  142. package/src/components/Select/index.ts +3 -0
  143. package/src/components/Separator/README.md +35 -0
  144. package/src/components/Separator/Separator.vue +7 -0
  145. package/src/components/Separator/index.ts +1 -0
  146. package/src/components/Spinner/README.md +53 -0
  147. package/src/components/Spinner/Spinner.vue +58 -0
  148. package/src/components/Spinner/index.ts +1 -0
  149. package/src/components/StatusIndicator/README.md +51 -0
  150. package/src/components/StatusIndicator/StatusIndicator.vue +38 -0
  151. package/src/components/StatusIndicator/index.ts +1 -0
  152. package/src/components/Tabs/README.md +53 -0
  153. package/src/components/Tabs/TabTrigger.vue +43 -0
  154. package/src/components/Tabs/Tabs.vue +13 -0
  155. package/src/components/Tabs/index.ts +2 -0
  156. package/src/components/Tag/README.md +27 -0
  157. package/src/components/TextField/README.md +317 -0
  158. package/src/components/TextField/TextField.vue +115 -0
  159. package/src/components/TextField/TextFieldPasswordIcon.vue +28 -0
  160. package/src/components/TextField/TextFieldSearchIcon.vue +11 -0
  161. package/src/components/TextField/index.ts +1 -0
  162. package/src/components/TextStyle/README.md +39 -0
  163. package/src/components/TextStyle/TextStyle.vue +24 -0
  164. package/src/components/TextStyle/index.ts +1 -0
  165. package/src/components/Toast/DismissToastAction.vue +34 -0
  166. package/src/components/Toast/README.md +167 -0
  167. package/src/components/Toast/Toast.vue +39 -0
  168. package/src/components/Toast/ToastGroup.vue +9 -0
  169. package/src/components/Toast/index.ts +2 -0
  170. package/src/components/Toggle/README.md +66 -0
  171. package/src/components/Toggle/Toggle.vue +86 -0
  172. package/src/components/Toggle/index.ts +1 -0
  173. package/src/components/Tooltip/README.md +51 -0
  174. package/src/components/Tooltip/Tooltip.vue +50 -0
  175. package/src/components/Tooltip/index.ts +1 -0
  176. package/src/components/TopBar/README.md +43 -0
  177. package/src/components/TopBar/TopBar.vue +7 -0
  178. package/src/components/TopBar/TopBarLogo.vue +8 -0
  179. package/src/components/TopBar/TopBarNavigation.vue +7 -0
  180. package/src/components/TopBar/TopBarNavigationItem.vue +13 -0
  181. package/src/components/TopBar/TopBarSearch.vue +15 -0
  182. package/src/components/TopBar/TopBarUserMenu.vue +20 -0
  183. package/src/components/TopBar/index.ts +6 -0
  184. package/src/components/VisuallyHidden/README.md +19 -0
  185. package/src/components/VisuallyHidden/VisuallyHidden.vue +25 -0
  186. package/src/components/VisuallyHidden/index.ts +1 -0
  187. package/src/components/index.ts +141 -0
  188. package/src/composables/index.ts +7 -0
  189. package/src/composables/useTailwindColor.ts +17 -0
  190. package/src/composables/useTheme.ts +29 -0
  191. package/src/composables/useToastNotifications.ts +55 -0
  192. package/src/composables/useUniqueId.ts +5 -0
  193. package/src/index.css +20 -0
  194. package/src/index.ts +12 -0
@@ -0,0 +1,20 @@
1
+ <script lang="ts" setup>
2
+ import { Avatar } from '../Avatar';
3
+ import { ChevronDownIcon } from '@heroicons/vue/16/solid';
4
+ import { useTheme } from '../../composables';
5
+ </script>
6
+
7
+ <template>
8
+ <button
9
+ class="flex items-center rounded border px-3 py-2 shadow-sm space-x-2 hover:bg-slate-100"
10
+ :class="useTheme('focus')"
11
+ >
12
+ <Avatar
13
+ size="xs"
14
+ name="demo user"
15
+ initials="DU"
16
+ />
17
+ <p>demo@app.com</p>
18
+ <ChevronDownIcon class="h-4 w-4" />
19
+ </button>
20
+ </template>
@@ -0,0 +1,6 @@
1
+ export { default as TopBar } from './TopBar.vue';
2
+ export { default as TopBarLogo } from './TopBarLogo.vue';
3
+ export { default as TopBarNavigation } from './TopBarNavigation.vue';
4
+ export { default as TopBarNavigationItem } from './TopBarNavigationItem.vue';
5
+ export { default as TopBarSearch } from './TopBarSearch.vue';
6
+ export { default as TopBarUserMenu } from './TopBarUserMenu.vue';
@@ -0,0 +1,19 @@
1
+ # Visually Hidden
2
+
3
+ Use when an element needs to be available to assistive technology (for example, a screen reader) but otherwise hidden.
4
+
5
+ ## Best practices
6
+
7
+ Visually hidden should:
8
+
9
+ - Not be used if semantic markup can make content understandable to people using assistive technologies.
10
+ - Be used to provide extra context when semantic markup isn't enough.
11
+ - Be used on any content that is normally present but is being omitted.
12
+ - Make sense in context when used with a screen reader.
13
+
14
+ ## Accessibility
15
+
16
+ The visually hidden component styles text so that it’s not visible, but it is available to assistive technologies like
17
+ screen readers and other text to speech programs.
18
+
19
+ The component shouldn’t be used to hide interactive content.
@@ -0,0 +1,25 @@
1
+ <script lang="ts" setup></script>
2
+
3
+ <template>
4
+ <span :class="$style.visuallyHidden">
5
+ <slot />
6
+ </span>
7
+ </template>
8
+
9
+ <style lang="css" module>
10
+ /**
11
+ * styles referenced from GOV.UK design system
12
+ * https://github.com/h5bp/main.css/issues/12#issuecomment-451965809
13
+ */
14
+ .visuallyHidden {
15
+ position: absolute !important;
16
+ width: 1px !important;
17
+ height: 1px !important;
18
+ margin: 0 !important;
19
+ padding: 0 !important;
20
+ overflow: hidden !important;
21
+ clip-path: inset(50%) !important;
22
+ border: 0 !important;
23
+ white-space: nowrap !important;
24
+ }
25
+ </style>
@@ -0,0 +1 @@
1
+ export { default as VisuallyHidden } from './VisuallyHidden.vue';
@@ -0,0 +1,141 @@
1
+ export {
2
+ Accordion,
3
+ AccordionContent,
4
+ AccordionItem,
5
+ AccordionTrigger,
6
+ } from './Accordion';
7
+
8
+ export { Alert, AlertDescription, AlertTitle } from './Alert';
9
+
10
+ export {
11
+ AlertDialog,
12
+ AlertDialogActionButton,
13
+ AlertDialogCancelButton,
14
+ AlertDialogContent,
15
+ AlertDialogDescription,
16
+ AlertDialogFooter,
17
+ AlertDialogHeader,
18
+ AlertDialogTitle,
19
+ } from './AlertDialog';
20
+
21
+ export { Avatar } from './Avatar';
22
+
23
+ export { Badge, BadgeContent, BadgeIcon } from './Badge';
24
+
25
+ export { Button, ButtonContent, ButtonIcon } from './Button';
26
+
27
+ export { ButtonGroup } from './ButtonGroup';
28
+
29
+ export {
30
+ Card,
31
+ CardSection,
32
+ CardDescription,
33
+ CardFooter,
34
+ CardHeader,
35
+ CardTitle,
36
+ } from './Card';
37
+
38
+ export { CategoryBar, CategoryBarItem } from './CategoryBar';
39
+
40
+ export { Checkbox } from './Checkbox';
41
+
42
+ export {
43
+ DatePicker,
44
+ DatePickerCard,
45
+ } from './DatePicker';
46
+
47
+ export {
48
+ DescriptionList,
49
+ DescriptionListDescription,
50
+ DescriptionListItem,
51
+ DescriptionListTerm,
52
+ } from './DescriptionList';
53
+
54
+ export {
55
+ EmptyState,
56
+ EmptyStateActions,
57
+ EmptyStateContent,
58
+ EmptyStateDescription,
59
+ EmptyStateTitle,
60
+ } from './EmptyState';
61
+
62
+ export {
63
+ Feed,
64
+ FeedItem,
65
+ FeedItemBlock,
66
+ FeedItemDateIndicator,
67
+ FeedItemIcon,
68
+ FeedItemSimple,
69
+ } from './Feed';
70
+
71
+ export { Form } from './Form';
72
+
73
+ export { FormLayout } from './FormLayout';
74
+
75
+ export { InputLabel } from './InputLabel';
76
+
77
+ export { Link } from './Link';
78
+
79
+ export {
80
+ MetricCard,
81
+ MetricCardHeader,
82
+ MetricCardLabel,
83
+ MetricCardSection,
84
+ MetricCardValue,
85
+ } from './MetricCard';
86
+
87
+ export {
88
+ Navigation,
89
+ NavigationItem,
90
+ NavigationSection,
91
+ } from './Navigation';
92
+
93
+ export {
94
+ Page,
95
+ PageDescription,
96
+ PageHeader,
97
+ PageTitle,
98
+ } from './Page';
99
+
100
+ export {
101
+ Pagination,
102
+ PaginationNextButton,
103
+ PaginationPreviousButton,
104
+ } from './Pagination';
105
+
106
+ export { PinInput } from './PinInput';
107
+
108
+ export { ProgressBar, ProgressBarIndicator } from './ProgressBar';
109
+
110
+ export { RadioButton } from './RadioButton';
111
+
112
+ export { Select, SelectGroup, SelectOption } from './Select';
113
+
114
+ export { Separator } from './Separator';
115
+
116
+ export { Spinner } from './Spinner';
117
+
118
+ export { StatusIndicator } from './StatusIndicator';
119
+
120
+ export { Tabs, TabTrigger } from './Tabs';
121
+
122
+ export { TextField } from './TextField';
123
+
124
+ export { TextStyle } from './TextStyle';
125
+
126
+ export { Toast, ToastGroup } from './Toast';
127
+
128
+ export { Toggle } from './Toggle';
129
+
130
+ export { Tooltip } from './Tooltip';
131
+
132
+ export {
133
+ TopBar,
134
+ TopBarLogo,
135
+ TopBarNavigation,
136
+ TopBarNavigationItem,
137
+ TopBarSearch,
138
+ TopBarUserMenu,
139
+ } from './TopBar';
140
+
141
+ export { VisuallyHidden } from './VisuallyHidden';
@@ -0,0 +1,7 @@
1
+ export { type TailwindColor, useTailwindColor } from './useTailwindColor';
2
+
3
+ export { useTheme } from './useTheme';
4
+
5
+ export { useToastNotifications } from './useToastNotifications';
6
+
7
+ export { useUniqueId } from './useUniqueId';
@@ -0,0 +1,17 @@
1
+ import colors from 'tailwindcss/colors';
2
+
3
+ type TailwindColorMap = typeof colors;
4
+
5
+ export type TailwindColor = keyof {
6
+ [K in keyof TailwindColorMap as TailwindColorMap[K] extends object ? K : never]: TailwindColorMap[K];
7
+ };
8
+
9
+ type TailwindVariant<T extends TailwindColor> = keyof TailwindColorMap[T];
10
+
11
+ export function useTailwindColor<T extends TailwindColor>(color: T, variant: TailwindVariant<T> & string): TailwindColorMap[T][TailwindVariant<T>] {
12
+ if (!colors[color]) {
13
+ throw new Error(`Color '${color}' does not exist in the Tailwind CSS color palette.`);
14
+ }
15
+
16
+ return colors[color][variant];
17
+ }
@@ -0,0 +1,29 @@
1
+ const themeValues = {
2
+ focus: {
3
+ default: [
4
+ 'focus:border-brand-500',
5
+ 'focus:ring-brand-100',
6
+ 'focus:ring-2',
7
+ ],
8
+ },
9
+
10
+ focusWithin: {
11
+ default: [
12
+ 'focus-within:border-brand-500',
13
+ 'focus-within:ring-brand-100',
14
+ 'focus-within:ring-2',
15
+ ],
16
+ },
17
+ };
18
+
19
+ type ThemeValues = typeof themeValues;
20
+
21
+ export function useTheme<T extends keyof ThemeValues>(value: T | Array<T>, variant: keyof ThemeValues[T] = 'default'): string | string[] {
22
+ if (Array.isArray(value)) {
23
+ return value
24
+ .map((v) => useTheme(v, variant))
25
+ .join(' ');
26
+ }
27
+
28
+ return themeValues[value][variant] as string[];
29
+ }
@@ -0,0 +1,55 @@
1
+ import { ref } from 'vue';
2
+ import { useEventBus } from '@vueuse/core';
3
+ import { useUniqueId } from './useUniqueId';
4
+
5
+ export interface ToastNotification {
6
+ id: string;
7
+ message: string;
8
+ }
9
+
10
+ interface useToastNotification {
11
+ toastNotifications: any;
12
+ initializeNotificationHandlers: any;
13
+ closeToastNotification: any;
14
+ emitToastNotificationEvent: any;
15
+ emitToastNotificationEvents: any;
16
+ }
17
+
18
+ export function useToastNotifications(): useToastNotification {
19
+ const toastNotifications = ref<ToastNotification[]>([]);
20
+ const eventBus = useEventBus<ToastNotification>('toastNotifications');
21
+
22
+ function initializeNotificationHandlers(): void {
23
+ eventBus.on(function (event: ToastNotification): void {
24
+ toastNotifications.value.push(event);
25
+ });
26
+ }
27
+
28
+ function closeToastNotification(toastNotification: ToastNotification): void {
29
+ toastNotifications.value = toastNotifications.value.filter((notification: ToastNotification): boolean => {
30
+ return notification.id !== toastNotification.id;
31
+ });
32
+ }
33
+
34
+ function emitToastNotificationEvent(toastNotification: Omit<ToastNotification, 'id'>): void {
35
+ (toastNotification as ToastNotification).id = useUniqueId('toast-notification');
36
+
37
+ eventBus.emit(toastNotification as ToastNotification);
38
+ }
39
+
40
+ function emitToastNotificationEvents(toastNotifications: Omit<ToastNotification, 'id'>[]): void {
41
+ toastNotifications.forEach((toastNotification: ToastNotification): void => {
42
+ (toastNotification as ToastNotification).id = useUniqueId('toast');
43
+
44
+ emitToastNotificationEvent(toastNotification);
45
+ });
46
+ }
47
+
48
+ return {
49
+ toastNotifications,
50
+ initializeNotificationHandlers,
51
+ closeToastNotification,
52
+ emitToastNotificationEvent,
53
+ emitToastNotificationEvents,
54
+ };
55
+ }
@@ -0,0 +1,5 @@
1
+ let id = 0;
2
+
3
+ export function useUniqueId(prefix = 'id'): string {
4
+ return `${prefix}-${++id}`;
5
+ }
package/src/index.css ADDED
@@ -0,0 +1,20 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ [type="checkbox"]:checked {
6
+ background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
7
+ }
8
+
9
+ [type="radio"]:checked {
10
+ background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
11
+ }
12
+
13
+ [type="checkbox"]:checked,
14
+ [type="radio"]:checked {
15
+ background-color: currentColor;
16
+ background-position: center;
17
+ background-repeat: no-repeat;
18
+ background-size: 100% 100%;
19
+ border-color: transparent;
20
+ }
package/src/index.ts ADDED
@@ -0,0 +1,12 @@
1
+ import { App } from 'vue';
2
+ import * as components from './components';
3
+
4
+ function install(app: App) {
5
+ for (const key in components) {
6
+ app.component(key, components[key]);
7
+ }
8
+ }
9
+
10
+ export default { install };
11
+
12
+ export * from './components';