@contentstudio/ui 0.2.23 → 0.2.24-rc.23

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 (163) hide show
  1. package/README.md +21 -65
  2. package/dist/App.vue.d.ts +2 -0
  3. package/dist/components/ActionIcon/ActionIcon.vue.d.ts +88 -0
  4. package/dist/components/ActionIcon/index.d.ts +2 -0
  5. package/dist/components/ActionIcon/types.d.ts +36 -0
  6. package/dist/components/Alert/Alert.vue.d.ts +94 -0
  7. package/dist/components/Alert/index.d.ts +4 -0
  8. package/dist/components/Alert/types.d.ts +30 -0
  9. package/dist/components/Avatar/Avatar.vue.d.ts +106 -0
  10. package/dist/components/Avatar/AvatarGroup.vue.d.ts +76 -0
  11. package/dist/components/Avatar/index.d.ts +5 -0
  12. package/dist/components/Avatar/types.d.ts +58 -0
  13. package/dist/components/Avatar/utils.d.ts +9 -0
  14. package/dist/components/Badge/Badge.vue.d.ts +109 -0
  15. package/dist/components/Badge/index.d.ts +2 -0
  16. package/dist/components/Badge/types.d.ts +35 -0
  17. package/dist/components/Breadcrumbs/Breadcrumbs.vue.d.ts +80 -0
  18. package/dist/components/Breadcrumbs/index.d.ts +3 -0
  19. package/dist/components/Breadcrumbs/types.d.ts +23 -0
  20. package/dist/components/Button/Button.vue.d.ts +85 -0
  21. package/dist/components/Button/index.d.ts +2 -0
  22. package/dist/components/Button/types.d.ts +40 -0
  23. package/dist/components/Card/Card.vue.d.ts +187 -0
  24. package/dist/components/Card/CardSection.vue.d.ts +55 -0
  25. package/dist/components/Card/index.d.ts +4 -0
  26. package/dist/components/Card/types.d.ts +27 -0
  27. package/dist/components/Checkbox/Checkbox.vue.d.ts +94 -0
  28. package/dist/components/Checkbox/index.d.ts +4 -0
  29. package/dist/components/Checkbox/types.d.ts +20 -0
  30. package/dist/components/Chip/Chip.vue.d.ts +108 -0
  31. package/dist/components/Chip/index.d.ts +4 -0
  32. package/dist/components/Chip/types.d.ts +48 -0
  33. package/dist/components/ClientExtensionDemo/index.d.ts +1 -0
  34. package/dist/components/ClientExtensionDemo.vue.d.ts +2 -0
  35. package/dist/components/Collapsible/Collapsible.vue.d.ts +77 -0
  36. package/dist/components/Collapsible/index.d.ts +4 -0
  37. package/dist/components/Collapsible/types.d.ts +9 -0
  38. package/dist/components/Dialog/Dialog.vue.d.ts +151 -0
  39. package/dist/components/Dialog/index.d.ts +4 -0
  40. package/dist/components/Dialog/types.d.ts +28 -0
  41. package/dist/components/Drawer/Drawer.vue.d.ts +134 -0
  42. package/dist/components/Drawer/index.d.ts +4 -0
  43. package/dist/components/Drawer/types.d.ts +61 -0
  44. package/dist/components/Dropdown/Dropdown.vue.d.ts +131 -0
  45. package/dist/components/Dropdown/DropdownItem.vue.d.ts +64 -0
  46. package/dist/components/Dropdown/index.d.ts +7 -0
  47. package/dist/components/Dropdown/types.d.ts +41 -0
  48. package/dist/components/DropdownMenu/DropdownMenu.vue.d.ts +109 -0
  49. package/dist/components/DropdownMenu/index.d.ts +3 -0
  50. package/dist/components/HoverCard/HoverCard.vue.d.ts +104 -0
  51. package/dist/components/HoverCard/HoverCardTarget.vue.d.ts +49 -0
  52. package/dist/components/HoverCard/index.d.ts +384 -0
  53. package/dist/components/HoverCard/types.d.ts +40 -0
  54. package/dist/components/HoverCard/useHoverCard.d.ts +20 -0
  55. package/dist/components/Icon/Icon.vue.d.ts +15 -0
  56. package/dist/components/Icon/index.d.ts +4 -0
  57. package/dist/components/Icon/types.d.ts +12 -0
  58. package/dist/components/Indicator/Indicator.vue.d.ts +129 -0
  59. package/dist/components/Indicator/index.d.ts +2 -0
  60. package/dist/components/Indicator/types.d.ts +29 -0
  61. package/dist/components/ListItem/ListItem.vue.d.ts +64 -0
  62. package/dist/components/ListItem/index.d.ts +6 -0
  63. package/dist/components/ListItem/types.d.ts +7 -0
  64. package/dist/components/Loader/Loader.vue.d.ts +65 -0
  65. package/dist/components/Loader/index.d.ts +2 -0
  66. package/dist/components/Loader/types.d.ts +16 -0
  67. package/dist/components/Loader/variants/BarsLoader.vue.d.ts +35 -0
  68. package/dist/components/Loader/variants/DotsLoader.vue.d.ts +35 -0
  69. package/dist/components/Loader/variants/OvalLoader.vue.d.ts +39 -0
  70. package/dist/components/Modal/MessageBoxConfirm.vue.d.ts +275 -0
  71. package/dist/components/Modal/MessageBoxOk.vue.d.ts +207 -0
  72. package/dist/components/Modal/Modal.vue.d.ts +475 -0
  73. package/dist/components/Modal/directive.d.ts +14 -0
  74. package/dist/components/Modal/index.d.ts +7 -0
  75. package/dist/components/Modal/plugin.d.ts +59 -0
  76. package/dist/components/Modal/types.d.ts +75 -0
  77. package/dist/components/Pagination/Pagination.vue.d.ts +84 -0
  78. package/dist/components/Pagination/index.d.ts +3 -0
  79. package/dist/components/Pagination/types.d.ts +32 -0
  80. package/dist/components/Pill/Pill.vue.d.ts +84 -0
  81. package/dist/components/Pill/index.d.ts +2 -0
  82. package/dist/components/Pill/types.d.ts +21 -0
  83. package/dist/components/Popover/Popover.vue.d.ts +192 -0
  84. package/dist/components/Popover/index.d.ts +4 -0
  85. package/dist/components/Popover/types.d.ts +65 -0
  86. package/dist/components/Progress/Progress.vue.d.ts +138 -0
  87. package/dist/components/Progress/index.d.ts +4 -0
  88. package/dist/components/Progress/types.d.ts +44 -0
  89. package/dist/components/Radio/Radio.vue.d.ts +99 -0
  90. package/dist/components/Radio/index.d.ts +2 -0
  91. package/dist/components/Radio/types.d.ts +53 -0
  92. package/dist/components/RangeSlider/RangeSlider.vue.d.ts +175 -0
  93. package/dist/components/RangeSlider/index.d.ts +2 -0
  94. package/dist/components/RangeSlider/types.d.ts +115 -0
  95. package/dist/components/SearchInput/index.d.ts +2 -0
  96. package/dist/components/SearchInput/types.d.ts +52 -0
  97. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts +97 -0
  98. package/dist/components/SegmentedControl/index.d.ts +4 -0
  99. package/dist/components/SegmentedControl/types.d.ts +55 -0
  100. package/dist/components/Select/Select.vue.d.ts +123 -0
  101. package/dist/components/Select/index.d.ts +2 -0
  102. package/dist/components/Select/types.d.ts +22 -0
  103. package/dist/components/Slider/Slider.vue.d.ts +164 -0
  104. package/dist/components/Slider/index.d.ts +3 -0
  105. package/dist/components/Slider/types.d.ts +145 -0
  106. package/dist/components/SplitButton/SplitButton.vue.d.ts +105 -0
  107. package/dist/components/SplitButton/index.d.ts +2 -0
  108. package/dist/components/SplitButton/types.d.ts +22 -0
  109. package/dist/components/Switch/Switch.vue.d.ts +117 -0
  110. package/dist/components/Switch/index.d.ts +4 -0
  111. package/dist/components/Switch/types.d.ts +55 -0
  112. package/dist/components/Tabs/Tabs.vue.d.ts +78 -0
  113. package/dist/components/Tabs/TabsList.vue.d.ts +52 -0
  114. package/dist/components/Tabs/TabsPanel.vue.d.ts +38 -0
  115. package/dist/components/Tabs/TabsTab.vue.d.ts +108 -0
  116. package/dist/components/Tabs/index.d.ts +5 -0
  117. package/dist/components/Tabs/types.d.ts +69 -0
  118. package/dist/components/TextInput/index.d.ts +2 -0
  119. package/dist/components/TextInput/types.d.ts +47 -0
  120. package/dist/components/Textarea/index.d.ts +2 -0
  121. package/dist/components/Textarea/types.d.ts +54 -0
  122. package/dist/components/ThemeProvider/ThemeProvider.vue.d.ts +88 -0
  123. package/dist/components/ThemeProvider/index.d.ts +1 -0
  124. package/dist/components/ThemeToggle/ThemeToggle.vue.d.ts +46 -0
  125. package/dist/components/ThemeToggle/index.d.ts +1 -0
  126. package/dist/components/Toast/CustomToast.vue.d.ts +50 -0
  127. package/dist/components/Toast/Toast.vue.d.ts +154 -0
  128. package/dist/components/Toast/index.d.ts +7 -0
  129. package/dist/components/Toast/plugin.d.ts +70 -0
  130. package/dist/components/Toast/types.d.ts +93 -0
  131. package/dist/components/index.d.ts +32 -0
  132. package/dist/composables/index.d.ts +1 -0
  133. package/dist/composables/useDropdown.d.ts +23 -0
  134. package/dist/composables/useTheme.d.ts +189 -0
  135. package/dist/composables/useThemeContext.d.ts +193 -0
  136. package/dist/composables/useThemeMode.d.ts +21 -0
  137. package/dist/directives/click-away/index.d.ts +2 -0
  138. package/dist/index.d.ts +47 -6937
  139. package/dist/index.js +15634 -13820
  140. package/dist/index.umd.cjs +1623 -1620
  141. package/dist/main.d.ts +0 -0
  142. package/dist/style.css +1 -1
  143. package/dist/theme/darkMode.d.ts +17 -0
  144. package/dist/theme/extensions.d.ts +50 -0
  145. package/dist/theme/generator.d.ts +31 -0
  146. package/dist/theme/tailwind.d.ts +10 -0
  147. package/dist/theme/types.d.ts +47 -0
  148. package/dist/types/common.d.ts +14 -0
  149. package/dist/types/index.d.ts +70 -0
  150. package/dist/utils/colors.d.ts +89 -0
  151. package/dist/utils/forms.d.ts +35 -0
  152. package/dist/utils/position.d.ts +11 -0
  153. package/dist/utils/radius.d.ts +2 -0
  154. package/dist/utils/shadows.d.ts +9 -0
  155. package/dist/utils/sizes.d.ts +7 -0
  156. package/dist/utils/states.d.ts +28 -0
  157. package/package.json +7 -11
  158. package/theme.css +243 -0
  159. package/dist/tailwind-151a5d8c.js +0 -2261
  160. package/dist/tailwind-e7334431.cjs +0 -66
  161. package/dist/tailwind.d.ts +0 -107
  162. package/dist/tailwind.js +0 -12
  163. package/dist/tailwind.umd.cjs +0 -1
package/README.md CHANGED
@@ -1,90 +1,46 @@
1
1
  # ContentStudio Design System
2
2
 
3
- Welcome to the ContentStudio Design System, a collection of reusable components built with Vue.js, TypeScript, and Tailwind CSS. This design system is designed to provide a consistent and flexible foundation for building modern web applications.
3
+ Vue component library and theme tooling for ContentStudio.
4
4
 
5
- ## Installation
5
+ ## Local Development
6
6
 
7
- To get started with the design system, follow these steps:
8
-
9
- 1. Install dependencies using pnpm:
10
7
  ```bash
11
8
  pnpm install
12
- ```
13
-
14
- 2. Start the development environment:
15
- ```bash
16
- # Watch for changes and rebuild
17
9
  pnpm build:watch
18
-
19
- # Run documentation site
20
10
  pnpm dev:docs
21
11
  ```
22
12
 
23
- ## Usage
24
-
25
- ### Dynamic theming
13
+ ## Package Usage
26
14
 
27
- Load the default theme variables automatically (already included in the compiled `style.css`). To override them at runtime, call the theme generator:
15
+ Import the compiled component styles and the components you need:
28
16
 
29
17
  ```ts
30
- import { generatePalette, applyTheme } from '@contentstudio/ui'
31
-
32
- // create your palette (change primary brand color, etc.)
33
- const palette = generatePalette({ primary: '#ff0066' })
34
-
35
- // apply CSS variables to :root
36
- applyTheme(palette)
18
+ import '@contentstudio/ui/dist/style.css'
19
+ import { Button } from '@contentstudio/ui'
37
20
  ```
38
21
 
39
- If you are using Nuxt/SSR, compute the palette on the server and inline the generated variables in a `<style>` tag during rendering to avoid FOUC.
40
-
22
+ ### Tailwind v4 Consumer Setup
41
23
 
24
+ For consumer-generated CSTU utilities like `bg-cstu-primary-500`, import the package theme adapter in your app CSS:
42
25
 
43
- Import the components you need in your Vue.js application:
44
-
45
- ```javascript
46
- import { Button } from '@contentstudio/ui';
26
+ ```css
27
+ @import "tailwindcss";
28
+ @import "@contentstudio/ui/theme.css";
47
29
  ```
48
30
 
49
- ## Components
50
-
51
- - **Button**: A versatile button component that supports various styles, sizes, and states.
52
- - **Input**: A customizable input field component.
53
- - **Select**: A dropdown select component.
54
- - **Checkbox**: A simple checkbox component.
55
- - **Radio**: A radio button component.
56
-
57
- ## Utilities
58
-
59
- The design system provides several utility modules to help maintain consistency across your application:
60
-
61
- - **Colors**: Color palette and theme management utilities
62
- - **Forms**: Form-related utilities for handling inputs and validation
63
- - **Position**: Utilities for handling element positioning
64
- - **Radius**: Border radius presets and utilities
65
- - **Sizes**: Size-related utilities and constants
66
- - **States**: Component state management utilities
67
-
68
- For detailed documentation on each utility, refer to the [Utilities Documentation](docs/utilities.md).
31
+ This is the primary integration path for Tailwind v4 consumers.
69
32
 
70
- ## Missing Components Checklist
33
+ ### Runtime Theme Updates
71
34
 
72
- To enhance the design system, consider adding the following components:
35
+ The compiled component CSS already includes the default runtime variables. To override them dynamically:
73
36
 
74
- - [ ] **Modal**: A component for displaying modals and dialogs.
75
- - [ ] **Tooltip**: A component for displaying tooltips on hover or focus.
76
- - [ ] **Accordion**: A collapsible panel component.
77
- - [ ] **Tabs**: A tabbed navigation component.
78
- - [ ] **Slider**: A component for selecting a value from a range.
79
- - [ ] **Date Picker**: A component for selecting dates.
80
- - [ ] **Avatar**: A component for displaying user avatars.
81
- - [ ] **Breadcrumbs**: A component for displaying navigation breadcrumbs.
82
- - [ ] **Pagination**: A component for navigating through paginated content.
83
-
84
- ## Contributing
37
+ ```ts
38
+ import { generatePalette, applyTheme } from '@contentstudio/ui'
85
39
 
86
- Contributions are welcome! Please read the [contributing guidelines](CONTRIBUTING.md) before making a contribution.
40
+ const palette = generatePalette({ primary: '#ff0066' })
41
+ applyTheme(palette)
42
+ ```
87
43
 
88
- ## License
44
+ If you are using SSR, generate and inline the variables during rendering to avoid FOUC.
89
45
 
90
- This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.
46
+ Tailwind integration is CSS-first in v4. Consumer apps should use `@contentstudio/ui/theme.css`, not a JS Tailwind config adapter.
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,88 @@
1
+ import { ComponentSize, ComponentRadius, ButtonVariant, ThemeColor } from '../../types/common';
2
+ import { LoaderProps } from '../Loader/types';
3
+ interface Props {
4
+ /** Determines whether Loader component should be displayed instead of the children */
5
+ loading?: boolean;
6
+ /** Props added to the Loader component (only visible when loading prop is set) */
7
+ loaderProps?: LoaderProps;
8
+ /** Controls width and height of the button */
9
+ size?: ComponentSize;
10
+ /** Color variant of the button */
11
+ color?: ThemeColor;
12
+ /** Border radius value */
13
+ radius?: ComponentRadius;
14
+ /** Gradient data used when variant="gradient" */
15
+ gradient?: {
16
+ from: string;
17
+ to: string;
18
+ deg?: number;
19
+ };
20
+ /** Sets disabled and data-disabled attributes on the button element */
21
+ disabled?: boolean;
22
+ /** Icon name from Lucide icons library */
23
+ iconName?: string;
24
+ /** Style variant */
25
+ variant?: ButtonVariant;
26
+ /** Additional CSS class names */
27
+ class?: string;
28
+ /** Click event handler */
29
+ onClick?: (event: MouseEvent) => void;
30
+ }
31
+ declare function __VLS_template(): {
32
+ slots: {
33
+ default?(_: {}): any;
34
+ };
35
+ refs: {};
36
+ attrs: Partial<{}>;
37
+ };
38
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
39
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
40
+ size: string;
41
+ variant: string;
42
+ color: string;
43
+ radius: string;
44
+ loading: boolean;
45
+ disabled: boolean;
46
+ }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
47
+ click: (event: MouseEvent) => void;
48
+ }, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
49
+ size: string;
50
+ variant: string;
51
+ color: string;
52
+ radius: string;
53
+ loading: boolean;
54
+ disabled: boolean;
55
+ }>>> & {
56
+ onClick?: ((event: MouseEvent) => any) | undefined;
57
+ }, {
58
+ disabled: boolean;
59
+ variant: ButtonVariant;
60
+ color: ThemeColor;
61
+ size: ComponentSize;
62
+ radius: ComponentRadius;
63
+ loading: boolean;
64
+ }>;
65
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
66
+ export default _default;
67
+ type __VLS_WithDefaults<P, D> = {
68
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
69
+ default: D[K];
70
+ }> : P[K];
71
+ };
72
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
73
+ type __VLS_TypePropsToOption<T> = {
74
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
75
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
76
+ } : {
77
+ type: import('vue').PropType<T[K]>;
78
+ required: true;
79
+ };
80
+ };
81
+ type __VLS_WithTemplateSlots<T, S> = T & {
82
+ new (): {
83
+ $slots: S;
84
+ };
85
+ };
86
+ type __VLS_PrettifyLocal<T> = {
87
+ [K in keyof T]: T[K];
88
+ } & {};
@@ -0,0 +1,2 @@
1
+ export { default as ActionIcon } from './ActionIcon.vue';
2
+ export * from './types';
@@ -0,0 +1,36 @@
1
+ import { LoaderProps } from '../Loader/types';
2
+ import { ComponentSize, ComponentRadius, ButtonVariant, ThemeColor } from '../../types/common';
3
+ export type ActionIconVariant = ButtonVariant;
4
+ export type ActionIconSize = ComponentSize;
5
+ export interface ActionIconProps {
6
+ /** Determines whether Loader component should be displayed instead of the children */
7
+ loading?: boolean;
8
+ /** Props added to the Loader component (only visible when loading prop is set) */
9
+ loaderProps?: LoaderProps;
10
+ /** Controls width and height of the button */
11
+ size?: ActionIconSize;
12
+ /** Color variant of the button */
13
+ color?: ThemeColor;
14
+ /** Border radius value */
15
+ radius?: ComponentRadius;
16
+ /** Gradient data used when variant="gradient" */
17
+ gradient?: {
18
+ from: string;
19
+ to: string;
20
+ deg?: number;
21
+ };
22
+ /** Sets disabled and data-disabled attributes on the button element */
23
+ disabled?: boolean;
24
+ /** Icon name from Lucide icons library */
25
+ iconName?: string;
26
+ /** Style variant */
27
+ variant?: ActionIconVariant;
28
+ /** Additional CSS class names */
29
+ class?: string;
30
+ /** Click event handler */
31
+ onClick?: (event: MouseEvent) => void;
32
+ }
33
+ export interface ActionIconEmits {
34
+ /** Click event */
35
+ click: [event: MouseEvent];
36
+ }
@@ -0,0 +1,94 @@
1
+ declare function __VLS_template(): {
2
+ slots: {
3
+ icon?(_: {}): any;
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ attrs: Partial<{}>;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
11
+ title?: string;
12
+ message?: string;
13
+ variant?: "filled" | "outline" | "light" | "gradient";
14
+ color?: "primary" | "secondary" | "success" | "warning" | "danger" | "info" | "dark" | "light";
15
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
16
+ radius?: "none" | "sm" | "md" | "lg" | "xl" | "full";
17
+ closable?: boolean;
18
+ onClose?: () => void;
19
+ disabled?: boolean;
20
+ loading?: boolean;
21
+ valid?: boolean;
22
+ invalid?: boolean;
23
+ }>, {
24
+ variant: string;
25
+ color: string;
26
+ size: string;
27
+ radius: string;
28
+ closable: boolean;
29
+ disabled: boolean;
30
+ loading: boolean;
31
+ valid: undefined;
32
+ invalid: undefined;
33
+ }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
34
+ close: () => void;
35
+ }, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
36
+ title?: string;
37
+ message?: string;
38
+ variant?: "filled" | "outline" | "light" | "gradient";
39
+ color?: "primary" | "secondary" | "success" | "warning" | "danger" | "info" | "dark" | "light";
40
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
41
+ radius?: "none" | "sm" | "md" | "lg" | "xl" | "full";
42
+ closable?: boolean;
43
+ onClose?: () => void;
44
+ disabled?: boolean;
45
+ loading?: boolean;
46
+ valid?: boolean;
47
+ invalid?: boolean;
48
+ }>, {
49
+ variant: string;
50
+ color: string;
51
+ size: string;
52
+ radius: string;
53
+ closable: boolean;
54
+ disabled: boolean;
55
+ loading: boolean;
56
+ valid: undefined;
57
+ invalid: undefined;
58
+ }>>> & {
59
+ onClose?: (() => any) | undefined;
60
+ }, {
61
+ disabled: boolean;
62
+ variant: "filled" | "outline" | "light" | "gradient";
63
+ color: "primary" | "secondary" | "success" | "warning" | "danger" | "info" | "dark" | "light";
64
+ size: "xs" | "sm" | "md" | "lg" | "xl";
65
+ radius: "none" | "sm" | "md" | "lg" | "xl" | "full";
66
+ loading: boolean;
67
+ invalid: boolean;
68
+ closable: boolean;
69
+ valid: boolean;
70
+ }>;
71
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
72
+ export default _default;
73
+ type __VLS_WithDefaults<P, D> = {
74
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
75
+ default: D[K];
76
+ }> : P[K];
77
+ };
78
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
79
+ type __VLS_TypePropsToOption<T> = {
80
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
81
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
82
+ } : {
83
+ type: import('vue').PropType<T[K]>;
84
+ required: true;
85
+ };
86
+ };
87
+ type __VLS_WithTemplateSlots<T, S> = T & {
88
+ new (): {
89
+ $slots: S;
90
+ };
91
+ };
92
+ type __VLS_PrettifyLocal<T> = {
93
+ [K in keyof T]: T[K];
94
+ } & {};
@@ -0,0 +1,4 @@
1
+ import { default as Alert } from './Alert.vue';
2
+ export { Alert };
3
+ export * from './types';
4
+ export default Alert;
@@ -0,0 +1,30 @@
1
+ import { ComponentSize } from '../../types/common';
2
+ import { ColorVariant, VariantType } from '../../utils/colors';
3
+ export interface AlertProps {
4
+ /** Title of the alert */
5
+ title?: string;
6
+ /** Main content of the alert */
7
+ message?: string;
8
+ /** Icon to display */
9
+ icon?: string;
10
+ /** Alert variant */
11
+ variant?: VariantType;
12
+ /** Color of the alert */
13
+ color?: ColorVariant;
14
+ /** Size of the alert */
15
+ size?: ComponentSize;
16
+ /** Whether to show close button */
17
+ closable?: boolean;
18
+ /** Callback when alert is closed */
19
+ onClose?: () => void;
20
+ /** Whether the alert is disabled */
21
+ disabled?: boolean;
22
+ /** Whether the alert is in loading state */
23
+ loading?: boolean;
24
+ /** Whether the alert is in valid state */
25
+ valid?: boolean;
26
+ /** Whether the alert is in invalid state */
27
+ invalid?: boolean;
28
+ /** Custom classes */
29
+ class?: string;
30
+ }
@@ -0,0 +1,106 @@
1
+ import { ColorVariant, VariantType } from '../../utils/colors';
2
+ import { Radius } from '../../utils/radius';
3
+ type AvatarSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl';
4
+ type AvatarVariant = VariantType | 'transparent';
5
+ interface AvatarProps {
6
+ /** Width and height of the avatar */
7
+ size?: AvatarSize | string | number;
8
+ /** Border radius of the avatar */
9
+ radius?: Radius;
10
+ /**
11
+ * Color of the avatar
12
+ * Can be a predefined color variant or a custom CSS color
13
+ */
14
+ color?: string;
15
+ /** Gradient configuration when variant is gradient */
16
+ gradient?: {
17
+ from: ColorVariant;
18
+ to: ColorVariant;
19
+ deg?: number;
20
+ };
21
+ /** Image source URL */
22
+ src?: string | null;
23
+ /** Image alt text and placeholder title */
24
+ alt?: string;
25
+ /** Additional image attributes */
26
+ imageProps?: Record<string, any>;
27
+ /** Avatar placeholder content */
28
+ children?: any;
29
+ /** Determines whether text color should depend on background-color */
30
+ autoContrast?: boolean;
31
+ /** User name for generating initials when src is not available */
32
+ name?: string;
33
+ /** Colors used for autogenerated initials */
34
+ allowedInitialsColors?: ColorVariant[];
35
+ /** Component variant */
36
+ variant?: AvatarVariant;
37
+ /** HTML element or component to render as */
38
+ component?: string | object;
39
+ /** Enable hover effect (scale and shadow) */
40
+ hover?: boolean;
41
+ /** Custom CSS classes to apply to the avatar */
42
+ customClasses?: string | string[];
43
+ }
44
+ declare function __VLS_template(): {
45
+ slots: {
46
+ default?(_: {}): any;
47
+ };
48
+ refs: {};
49
+ attrs: Partial<{}>;
50
+ };
51
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
52
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<AvatarProps>, {
53
+ size: string;
54
+ radius: string;
55
+ color: string;
56
+ variant: VariantType;
57
+ autoContrast: boolean;
58
+ src: null;
59
+ component: string;
60
+ hover: boolean;
61
+ customClasses: string;
62
+ }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<AvatarProps>, {
63
+ size: string;
64
+ radius: string;
65
+ color: string;
66
+ variant: VariantType;
67
+ autoContrast: boolean;
68
+ src: null;
69
+ component: string;
70
+ hover: boolean;
71
+ customClasses: string;
72
+ }>>>, {
73
+ hover: boolean;
74
+ variant: AvatarVariant;
75
+ color: string;
76
+ size: AvatarSize | string | number;
77
+ radius: Radius;
78
+ autoContrast: boolean;
79
+ src: string | null;
80
+ customClasses: string | string[];
81
+ component: string | object;
82
+ }>;
83
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
84
+ export default _default;
85
+ type __VLS_WithDefaults<P, D> = {
86
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
87
+ default: D[K];
88
+ }> : P[K];
89
+ };
90
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
91
+ type __VLS_TypePropsToOption<T> = {
92
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
93
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
94
+ } : {
95
+ type: import('vue').PropType<T[K]>;
96
+ required: true;
97
+ };
98
+ };
99
+ type __VLS_WithTemplateSlots<T, S> = T & {
100
+ new (): {
101
+ $slots: S;
102
+ };
103
+ };
104
+ type __VLS_PrettifyLocal<T> = {
105
+ [K in keyof T]: T[K];
106
+ } & {};
@@ -0,0 +1,76 @@
1
+ import { ColorVariant } from '../../utils/colors';
2
+ interface AvatarGroupProps {
3
+ /** Spacing between avatars (sm, md, lg) */
4
+ spacing?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number;
5
+ /** Gap between avatars in the group */
6
+ gap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | string | number;
7
+ /** Outline width for avatars in the group */
8
+ outlineWidth?: 'none' | 'thin' | 'normal' | 'medium' | 'thick' | string | number;
9
+ /** Outline color for avatars in the group */
10
+ outlineColor?: ColorVariant | string;
11
+ /** Outline offset for avatars in the group */
12
+ outlineOffset?: 'none' | 'inset' | 'small' | 'medium' | 'large' | string | number;
13
+ /** Custom CSS classes to apply to the avatar group */
14
+ customClasses?: string | string[];
15
+ /** Maximum number of avatars to show before displaying a count */
16
+ max?: number;
17
+ /** Enable hover effect on avatars in the group */
18
+ hover?: boolean;
19
+ }
20
+ declare function __VLS_template(): {
21
+ slots: {
22
+ default?(_: {}): any;
23
+ };
24
+ refs: {};
25
+ attrs: Partial<{}>;
26
+ };
27
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
28
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<AvatarGroupProps>, {
29
+ spacing: string;
30
+ gap: string;
31
+ outlineWidth: string;
32
+ outlineColor: string;
33
+ outlineOffset: string;
34
+ hover: boolean;
35
+ customClasses: string;
36
+ }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<AvatarGroupProps>, {
37
+ spacing: string;
38
+ gap: string;
39
+ outlineWidth: string;
40
+ outlineColor: string;
41
+ outlineOffset: string;
42
+ hover: boolean;
43
+ customClasses: string;
44
+ }>>>, {
45
+ hover: boolean;
46
+ gap: "none" | "xs" | "sm" | "md" | "lg" | string | number;
47
+ outlineColor: ColorVariant | string;
48
+ outlineOffset: "none" | "inset" | "small" | "medium" | "large" | string | number;
49
+ outlineWidth: "none" | "thin" | "normal" | "medium" | "thick" | string | number;
50
+ customClasses: string | string[];
51
+ spacing: "xs" | "sm" | "md" | "lg" | "xl" | number;
52
+ }>;
53
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
54
+ export default _default;
55
+ type __VLS_WithDefaults<P, D> = {
56
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
57
+ default: D[K];
58
+ }> : P[K];
59
+ };
60
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
61
+ type __VLS_TypePropsToOption<T> = {
62
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
63
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
64
+ } : {
65
+ type: import('vue').PropType<T[K]>;
66
+ required: true;
67
+ };
68
+ };
69
+ type __VLS_WithTemplateSlots<T, S> = T & {
70
+ new (): {
71
+ $slots: S;
72
+ };
73
+ };
74
+ type __VLS_PrettifyLocal<T> = {
75
+ [K in keyof T]: T[K];
76
+ } & {};
@@ -0,0 +1,5 @@
1
+ import { default as Avatar } from './Avatar.vue';
2
+ import { default as AvatarGroup } from './AvatarGroup.vue';
3
+ export { Avatar, AvatarGroup };
4
+ export * from './types';
5
+ export * from './utils';
@@ -0,0 +1,58 @@
1
+ import { Radius } from '../../utils/radius';
2
+ import { ColorVariant, VariantType } from '../../utils/colors';
3
+ export type AvatarVariant = VariantType | 'transparent';
4
+ export type AvatarSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl';
5
+ export interface AvatarProps {
6
+ /** Width and height of the avatar */
7
+ size?: AvatarSize | string | number;
8
+ /** Border radius of the avatar */
9
+ radius?: Radius;
10
+ /** Color of the avatar */
11
+ color?: ColorVariant | 'initials';
12
+ /** Gradient configuration when variant is gradient */
13
+ gradient?: {
14
+ from: ColorVariant;
15
+ to: ColorVariant;
16
+ deg?: number;
17
+ };
18
+ /** Image source URL */
19
+ src?: string | null;
20
+ /** Image alt text and placeholder title */
21
+ alt?: string;
22
+ /** Additional image attributes */
23
+ imageProps?: Record<string, any>;
24
+ /** Avatar placeholder content */
25
+ children?: any;
26
+ /** Determines whether text color should depend on background-color */
27
+ autoContrast?: boolean;
28
+ /** User name for generating initials when src is not available */
29
+ name?: string;
30
+ /** Colors used for autogenerated initials */
31
+ allowedInitialsColors?: ColorVariant[];
32
+ /** Component variant */
33
+ variant?: AvatarVariant;
34
+ /** HTML element or component to render as */
35
+ component?: string | object;
36
+ /** Enable hover effect (scale and shadow) */
37
+ hover?: boolean;
38
+ /** Custom CSS classes to apply to the avatar */
39
+ customClasses?: string | string[];
40
+ }
41
+ export interface AvatarGroupProps {
42
+ /** Spacing between avatars (sm, md, lg) */
43
+ spacing?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number;
44
+ /** Gap between avatars in the group */
45
+ gap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | string | number;
46
+ /** Outline width for avatars in the group */
47
+ outlineWidth?: 'none' | 'thin' | 'normal' | 'medium' | 'thick' | string | number;
48
+ /** Outline color for avatars in the group */
49
+ outlineColor?: ColorVariant | string;
50
+ /** Outline offset for avatars in the group */
51
+ outlineOffset?: 'none' | 'inset' | 'small' | 'medium' | 'large' | string | number;
52
+ /** Custom CSS classes to apply to the avatar group */
53
+ customClasses?: string | string[];
54
+ /** Maximum number of avatars to show before displaying a count */
55
+ max?: number;
56
+ /** Enable hover effect on avatars in the group */
57
+ hover?: boolean;
58
+ }
@@ -0,0 +1,9 @@
1
+ import { ColorVariant } from '../../utils/colors';
2
+ /**
3
+ * Generates a color from a string (name) using a simple hash function
4
+ */
5
+ export declare function getInitialsColor(name: string, allowedColors?: ColorVariant[]): ColorVariant;
6
+ /**
7
+ * Extracts initials from a name string
8
+ */
9
+ export declare function getInitials(name: string): string;