@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.
- package/README.md +21 -65
- package/dist/App.vue.d.ts +2 -0
- package/dist/components/ActionIcon/ActionIcon.vue.d.ts +88 -0
- package/dist/components/ActionIcon/index.d.ts +2 -0
- package/dist/components/ActionIcon/types.d.ts +36 -0
- package/dist/components/Alert/Alert.vue.d.ts +94 -0
- package/dist/components/Alert/index.d.ts +4 -0
- package/dist/components/Alert/types.d.ts +30 -0
- package/dist/components/Avatar/Avatar.vue.d.ts +106 -0
- package/dist/components/Avatar/AvatarGroup.vue.d.ts +76 -0
- package/dist/components/Avatar/index.d.ts +5 -0
- package/dist/components/Avatar/types.d.ts +58 -0
- package/dist/components/Avatar/utils.d.ts +9 -0
- package/dist/components/Badge/Badge.vue.d.ts +109 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Badge/types.d.ts +35 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.vue.d.ts +80 -0
- package/dist/components/Breadcrumbs/index.d.ts +3 -0
- package/dist/components/Breadcrumbs/types.d.ts +23 -0
- package/dist/components/Button/Button.vue.d.ts +85 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Button/types.d.ts +40 -0
- package/dist/components/Card/Card.vue.d.ts +187 -0
- package/dist/components/Card/CardSection.vue.d.ts +55 -0
- package/dist/components/Card/index.d.ts +4 -0
- package/dist/components/Card/types.d.ts +27 -0
- package/dist/components/Checkbox/Checkbox.vue.d.ts +94 -0
- package/dist/components/Checkbox/index.d.ts +4 -0
- package/dist/components/Checkbox/types.d.ts +20 -0
- package/dist/components/Chip/Chip.vue.d.ts +108 -0
- package/dist/components/Chip/index.d.ts +4 -0
- package/dist/components/Chip/types.d.ts +48 -0
- package/dist/components/ClientExtensionDemo/index.d.ts +1 -0
- package/dist/components/ClientExtensionDemo.vue.d.ts +2 -0
- package/dist/components/Collapsible/Collapsible.vue.d.ts +77 -0
- package/dist/components/Collapsible/index.d.ts +4 -0
- package/dist/components/Collapsible/types.d.ts +9 -0
- package/dist/components/Dialog/Dialog.vue.d.ts +151 -0
- package/dist/components/Dialog/index.d.ts +4 -0
- package/dist/components/Dialog/types.d.ts +28 -0
- package/dist/components/Drawer/Drawer.vue.d.ts +134 -0
- package/dist/components/Drawer/index.d.ts +4 -0
- package/dist/components/Drawer/types.d.ts +61 -0
- package/dist/components/Dropdown/Dropdown.vue.d.ts +131 -0
- package/dist/components/Dropdown/DropdownItem.vue.d.ts +64 -0
- package/dist/components/Dropdown/index.d.ts +7 -0
- package/dist/components/Dropdown/types.d.ts +41 -0
- package/dist/components/DropdownMenu/DropdownMenu.vue.d.ts +109 -0
- package/dist/components/DropdownMenu/index.d.ts +3 -0
- package/dist/components/HoverCard/HoverCard.vue.d.ts +104 -0
- package/dist/components/HoverCard/HoverCardTarget.vue.d.ts +49 -0
- package/dist/components/HoverCard/index.d.ts +384 -0
- package/dist/components/HoverCard/types.d.ts +40 -0
- package/dist/components/HoverCard/useHoverCard.d.ts +20 -0
- package/dist/components/Icon/Icon.vue.d.ts +15 -0
- package/dist/components/Icon/index.d.ts +4 -0
- package/dist/components/Icon/types.d.ts +12 -0
- package/dist/components/Indicator/Indicator.vue.d.ts +129 -0
- package/dist/components/Indicator/index.d.ts +2 -0
- package/dist/components/Indicator/types.d.ts +29 -0
- package/dist/components/ListItem/ListItem.vue.d.ts +64 -0
- package/dist/components/ListItem/index.d.ts +6 -0
- package/dist/components/ListItem/types.d.ts +7 -0
- package/dist/components/Loader/Loader.vue.d.ts +65 -0
- package/dist/components/Loader/index.d.ts +2 -0
- package/dist/components/Loader/types.d.ts +16 -0
- package/dist/components/Loader/variants/BarsLoader.vue.d.ts +35 -0
- package/dist/components/Loader/variants/DotsLoader.vue.d.ts +35 -0
- package/dist/components/Loader/variants/OvalLoader.vue.d.ts +39 -0
- package/dist/components/Modal/MessageBoxConfirm.vue.d.ts +275 -0
- package/dist/components/Modal/MessageBoxOk.vue.d.ts +207 -0
- package/dist/components/Modal/Modal.vue.d.ts +475 -0
- package/dist/components/Modal/directive.d.ts +14 -0
- package/dist/components/Modal/index.d.ts +7 -0
- package/dist/components/Modal/plugin.d.ts +59 -0
- package/dist/components/Modal/types.d.ts +75 -0
- package/dist/components/Pagination/Pagination.vue.d.ts +84 -0
- package/dist/components/Pagination/index.d.ts +3 -0
- package/dist/components/Pagination/types.d.ts +32 -0
- package/dist/components/Pill/Pill.vue.d.ts +84 -0
- package/dist/components/Pill/index.d.ts +2 -0
- package/dist/components/Pill/types.d.ts +21 -0
- package/dist/components/Popover/Popover.vue.d.ts +192 -0
- package/dist/components/Popover/index.d.ts +4 -0
- package/dist/components/Popover/types.d.ts +65 -0
- package/dist/components/Progress/Progress.vue.d.ts +138 -0
- package/dist/components/Progress/index.d.ts +4 -0
- package/dist/components/Progress/types.d.ts +44 -0
- package/dist/components/Radio/Radio.vue.d.ts +99 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Radio/types.d.ts +53 -0
- package/dist/components/RangeSlider/RangeSlider.vue.d.ts +175 -0
- package/dist/components/RangeSlider/index.d.ts +2 -0
- package/dist/components/RangeSlider/types.d.ts +115 -0
- package/dist/components/SearchInput/index.d.ts +2 -0
- package/dist/components/SearchInput/types.d.ts +52 -0
- package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts +97 -0
- package/dist/components/SegmentedControl/index.d.ts +4 -0
- package/dist/components/SegmentedControl/types.d.ts +55 -0
- package/dist/components/Select/Select.vue.d.ts +123 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Select/types.d.ts +22 -0
- package/dist/components/Slider/Slider.vue.d.ts +164 -0
- package/dist/components/Slider/index.d.ts +3 -0
- package/dist/components/Slider/types.d.ts +145 -0
- package/dist/components/SplitButton/SplitButton.vue.d.ts +105 -0
- package/dist/components/SplitButton/index.d.ts +2 -0
- package/dist/components/SplitButton/types.d.ts +22 -0
- package/dist/components/Switch/Switch.vue.d.ts +117 -0
- package/dist/components/Switch/index.d.ts +4 -0
- package/dist/components/Switch/types.d.ts +55 -0
- package/dist/components/Tabs/Tabs.vue.d.ts +78 -0
- package/dist/components/Tabs/TabsList.vue.d.ts +52 -0
- package/dist/components/Tabs/TabsPanel.vue.d.ts +38 -0
- package/dist/components/Tabs/TabsTab.vue.d.ts +108 -0
- package/dist/components/Tabs/index.d.ts +5 -0
- package/dist/components/Tabs/types.d.ts +69 -0
- package/dist/components/TextInput/index.d.ts +2 -0
- package/dist/components/TextInput/types.d.ts +47 -0
- package/dist/components/Textarea/index.d.ts +2 -0
- package/dist/components/Textarea/types.d.ts +54 -0
- package/dist/components/ThemeProvider/ThemeProvider.vue.d.ts +88 -0
- package/dist/components/ThemeProvider/index.d.ts +1 -0
- package/dist/components/ThemeToggle/ThemeToggle.vue.d.ts +46 -0
- package/dist/components/ThemeToggle/index.d.ts +1 -0
- package/dist/components/Toast/CustomToast.vue.d.ts +50 -0
- package/dist/components/Toast/Toast.vue.d.ts +154 -0
- package/dist/components/Toast/index.d.ts +7 -0
- package/dist/components/Toast/plugin.d.ts +70 -0
- package/dist/components/Toast/types.d.ts +93 -0
- package/dist/components/index.d.ts +32 -0
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/useDropdown.d.ts +23 -0
- package/dist/composables/useTheme.d.ts +189 -0
- package/dist/composables/useThemeContext.d.ts +193 -0
- package/dist/composables/useThemeMode.d.ts +21 -0
- package/dist/directives/click-away/index.d.ts +2 -0
- package/dist/index.d.ts +47 -6937
- package/dist/index.js +15634 -13820
- package/dist/index.umd.cjs +1623 -1620
- package/dist/main.d.ts +0 -0
- package/dist/style.css +1 -1
- package/dist/theme/darkMode.d.ts +17 -0
- package/dist/theme/extensions.d.ts +50 -0
- package/dist/theme/generator.d.ts +31 -0
- package/dist/theme/tailwind.d.ts +10 -0
- package/dist/theme/types.d.ts +47 -0
- package/dist/types/common.d.ts +14 -0
- package/dist/types/index.d.ts +70 -0
- package/dist/utils/colors.d.ts +89 -0
- package/dist/utils/forms.d.ts +35 -0
- package/dist/utils/position.d.ts +11 -0
- package/dist/utils/radius.d.ts +2 -0
- package/dist/utils/shadows.d.ts +9 -0
- package/dist/utils/sizes.d.ts +7 -0
- package/dist/utils/states.d.ts +28 -0
- package/package.json +7 -11
- package/theme.css +243 -0
- package/dist/tailwind-151a5d8c.js +0 -2261
- package/dist/tailwind-e7334431.cjs +0 -66
- package/dist/tailwind.d.ts +0 -107
- package/dist/tailwind.js +0 -12
- package/dist/tailwind.umd.cjs +0 -1
package/README.md
CHANGED
|
@@ -1,90 +1,46 @@
|
|
|
1
1
|
# ContentStudio Design System
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Vue component library and theme tooling for ContentStudio.
|
|
4
4
|
|
|
5
|
-
##
|
|
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
|
-
|
|
15
|
+
Import the compiled component styles and the components you need:
|
|
28
16
|
|
|
29
17
|
```ts
|
|
30
|
-
import
|
|
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
|
-
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
import { Button } from '@contentstudio/ui';
|
|
26
|
+
```css
|
|
27
|
+
@import "tailwindcss";
|
|
28
|
+
@import "@contentstudio/ui/theme.css";
|
|
47
29
|
```
|
|
48
30
|
|
|
49
|
-
|
|
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
|
-
|
|
33
|
+
### Runtime Theme Updates
|
|
71
34
|
|
|
72
|
-
|
|
35
|
+
The compiled component CSS already includes the default runtime variables. To override them dynamically:
|
|
73
36
|
|
|
74
|
-
|
|
75
|
-
|
|
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
|
-
|
|
40
|
+
const palette = generatePalette({ primary: '#ff0066' })
|
|
41
|
+
applyTheme(palette)
|
|
42
|
+
```
|
|
87
43
|
|
|
88
|
-
|
|
44
|
+
If you are using SSR, generate and inline the variables during rendering to avoid FOUC.
|
|
89
45
|
|
|
90
|
-
|
|
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,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,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,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;
|