@indielayer/ui 1.0.0 → 1.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 (147) hide show
  1. package/README.md +2 -2
  2. package/lib/common/icons.d.ts +15 -0
  3. package/lib/common/utils.d.ts +32 -0
  4. package/lib/components/alert/Alert.theme.d.ts +8 -0
  5. package/lib/components/alert/Alert.vue.d.ts +31 -0
  6. package/lib/components/alert/__tests__/Alert.spec.d.ts +1 -0
  7. package/lib/components/avatar/Avatar.theme.d.ts +8 -0
  8. package/lib/components/avatar/Avatar.vue.d.ts +46 -0
  9. package/lib/components/avatar/__tests__/Avatar.spec.d.ts +1 -0
  10. package/lib/components/badge/Badge.theme.d.ts +8 -0
  11. package/lib/components/badge/Badge.vue.d.ts +74 -0
  12. package/lib/components/badge/__tests__/Badge.spec.d.ts +1 -0
  13. package/lib/components/breadcrumbs/Breadcrumbs.theme.d.ts +8 -0
  14. package/lib/components/breadcrumbs/Breadcrumbs.vue.d.ts +41 -0
  15. package/lib/components/breadcrumbs/__tests__/Breadcrumbs.spec.d.ts +1 -0
  16. package/lib/components/button/Button.theme.d.ts +10 -0
  17. package/lib/components/button/Button.vue.d.ts +81 -0
  18. package/lib/components/button/ButtonGroup.theme.d.ts +6 -0
  19. package/lib/components/button/ButtonGroup.vue.d.ts +52 -0
  20. package/lib/components/button/__tests__/ Button.spec.d.ts +1 -0
  21. package/lib/components/button/__tests__/ ButtonGroup.spec.d.ts +1 -0
  22. package/lib/components/card/Card.theme.d.ts +7 -0
  23. package/lib/components/card/Card.vue.d.ts +17 -0
  24. package/lib/components/card/__tests__/Card.spec.d.ts +1 -0
  25. package/lib/components/checkbox/Checkbox.theme.d.ts +11 -0
  26. package/lib/components/checkbox/Checkbox.vue.d.ts +77 -0
  27. package/lib/components/checkbox/__tests__/Checkbox.spec.d.ts +1 -0
  28. package/lib/components/collapse/Collapse.theme.d.ts +9 -0
  29. package/lib/components/collapse/Collapse.vue.d.ts +40 -0
  30. package/lib/components/collapse/__tests__/Collapse.spec.d.ts +1 -0
  31. package/lib/components/container/Container.theme.d.ts +6 -0
  32. package/lib/components/container/Container.vue.d.ts +14 -0
  33. package/lib/components/container/__tests__/Container.spec.d.ts +1 -0
  34. package/lib/components/divider/Divider.theme.d.ts +9 -0
  35. package/lib/components/divider/Divider.vue.d.ts +10 -0
  36. package/lib/components/divider/__tests__/Divider.spec.d.ts +1 -0
  37. package/lib/components/drawer/Drawer.theme.d.ts +7 -0
  38. package/lib/components/drawer/Drawer.vue.d.ts +61 -0
  39. package/lib/components/drawer/__tests__/Drawer.spec.d.ts +1 -0
  40. package/lib/components/form/Form.theme.d.ts +6 -0
  41. package/lib/components/form/Form.vue.d.ts +48 -0
  42. package/lib/components/form/__tests__/Form.spec.d.ts +1 -0
  43. package/lib/components/helpers/InputError.d.ts +8 -0
  44. package/lib/components/icon/Icon.theme.d.ts +7 -0
  45. package/lib/components/icon/Icon.vue.d.ts +36 -0
  46. package/lib/components/icon/__tests__/Icon.spec.d.ts +1 -0
  47. package/lib/components/image/Image.theme.d.ts +6 -0
  48. package/lib/components/image/Image.vue.d.ts +6 -0
  49. package/lib/components/image/__tests__/Image.spec.d.ts +1 -0
  50. package/lib/components/index.d.ts +45 -0
  51. package/lib/components/input/Input.theme.d.ts +11 -0
  52. package/lib/components/input/Input.vue.d.ts +119 -0
  53. package/lib/components/input/__tests__/Input.spec.d.ts +1 -0
  54. package/lib/components/link/Link.theme.d.ts +8 -0
  55. package/lib/components/link/Link.vue.d.ts +34 -0
  56. package/lib/components/link/__tests__/Link.spec.d.ts +1 -0
  57. package/lib/components/menu/Menu.theme.d.ts +6 -0
  58. package/lib/components/menu/Menu.vue.d.ts +65 -0
  59. package/lib/components/menu/MenuItem.theme.d.ts +8 -0
  60. package/lib/components/menu/MenuItem.vue.d.ts +89 -0
  61. package/lib/components/menu/__tests__/Menu.spec.d.ts +1 -0
  62. package/lib/components/menu/__tests__/MenuItem.spec.d.ts +1 -0
  63. package/lib/components/modal/Modal.theme.d.ts +13 -0
  64. package/lib/components/modal/Modal.vue.d.ts +29 -0
  65. package/lib/components/modal/__tests__/Modal.spec.d.ts +1 -0
  66. package/lib/components/notifications/Notifications.theme.d.ts +8 -0
  67. package/lib/components/notifications/Notifications.vue.d.ts +91 -0
  68. package/lib/components/notifications/__tests__/Notifications.spec.d.ts +1 -0
  69. package/lib/components/pagination/Pagination.theme.d.ts +9 -0
  70. package/lib/components/pagination/Pagination.vue.d.ts +49 -0
  71. package/lib/components/pagination/PaginationItem.theme.d.ts +7 -0
  72. package/lib/components/pagination/PaginationItem.vue.d.ts +33 -0
  73. package/lib/components/pagination/__tests__/Pagination.spec.d.ts +1 -0
  74. package/lib/components/pagination/__tests__/PaginationItem.spec.d.ts +1 -0
  75. package/lib/components/popover/Popover.theme.d.ts +7 -0
  76. package/lib/components/popover/Popover.vue.d.ts +64 -0
  77. package/lib/components/popover/PopoverContainer.theme.d.ts +6 -0
  78. package/lib/components/popover/PopoverContainer.vue.d.ts +14 -0
  79. package/lib/components/popover/__tests__/Popover.spec.d.ts +1 -0
  80. package/lib/components/popover/__tests__/PopoverContainer.spec.d.ts +1 -0
  81. package/lib/components/progress/Progress.theme.d.ts +10 -0
  82. package/lib/components/progress/Progress.vue.d.ts +40 -0
  83. package/lib/components/progress/__tests__/Progress.spec.d.ts +1 -0
  84. package/lib/components/radio/Radio.theme.d.ts +12 -0
  85. package/lib/components/radio/Radio.vue.d.ts +78 -0
  86. package/lib/components/radio/__tests__/Radio.spec.d.ts +1 -0
  87. package/lib/components/scroll/Scroll.theme.d.ts +6 -0
  88. package/lib/components/scroll/Scroll.vue.d.ts +23 -0
  89. package/lib/components/scroll/__tests__/Scroll.spec.d.ts +1 -0
  90. package/lib/components/select/Select.theme.d.ts +13 -0
  91. package/lib/components/select/Select.vue.d.ts +80 -0
  92. package/lib/components/select/__tests__/Select.spec.d.ts +1 -0
  93. package/lib/components/skeleton/Skeleton.theme.d.ts +6 -0
  94. package/lib/components/skeleton/Skeleton.vue.d.ts +14 -0
  95. package/lib/components/skeleton/__tests__/Skeleton.spec.d.ts +1 -0
  96. package/lib/components/slider/Slider.theme.d.ts +10 -0
  97. package/lib/components/slider/Slider.vue.d.ts +87 -0
  98. package/lib/components/slider/__tests__/Slider.spec.d.ts +1 -0
  99. package/lib/components/spacer/Spacer.d.ts +2 -0
  100. package/lib/components/spacer/__tests__/Spacer.spec.d.ts +1 -0
  101. package/lib/components/spinner/Spinner.vue.d.ts +25 -0
  102. package/lib/components/spinner/__tests__/Spinner.spec.d.ts +1 -0
  103. package/lib/components/tab/Tab.theme.d.ts +9 -0
  104. package/lib/components/tab/Tab.vue.d.ts +43 -0
  105. package/lib/components/tab/TabGroup.theme.d.ts +10 -0
  106. package/lib/components/tab/TabGroup.vue.d.ts +57 -0
  107. package/lib/components/tab/__tests__/Tab.spec.d.ts +1 -0
  108. package/lib/components/tab/__tests__/TabGroup.spec.d.ts +1 -0
  109. package/lib/components/table/Table.theme.d.ts +8 -0
  110. package/lib/components/table/Table.vue.d.ts +78 -0
  111. package/lib/components/table/TableBody.d.ts +2 -0
  112. package/lib/components/table/TableCell.theme.d.ts +7 -0
  113. package/lib/components/table/TableCell.vue.d.ts +33 -0
  114. package/lib/components/table/TableHead.d.ts +2 -0
  115. package/lib/components/table/TableHeader.vue.d.ts +33 -0
  116. package/lib/components/table/TableRow.vue.d.ts +23 -0
  117. package/lib/components/table/__tests__/Table.spec.d.ts +1 -0
  118. package/lib/components/tag/Tag.theme.d.ts +9 -0
  119. package/lib/components/tag/Tag.vue.d.ts +45 -0
  120. package/lib/components/tag/__tests__/Tag.spec.d.ts +1 -0
  121. package/lib/components/textarea/Textarea.theme.d.ts +10 -0
  122. package/lib/components/textarea/Textarea.vue.d.ts +100 -0
  123. package/lib/components/textarea/__tests__/Textarea.spec.d.ts +1 -0
  124. package/lib/components/toggle/Toggle.theme.d.ts +11 -0
  125. package/lib/components/toggle/Toggle.vue.d.ts +78 -0
  126. package/lib/components/toggle/__tests__/Toggle.spec.d.ts +1 -0
  127. package/lib/components/tooltip/Tooltip.theme.d.ts +11 -0
  128. package/lib/components/tooltip/Tooltip.vue.d.ts +2 -0
  129. package/lib/components/tooltip/__tests__/Tooltip.spec.d.ts +1 -0
  130. package/lib/composables/colors-utils.d.ts +7 -0
  131. package/lib/composables/colors.d.ts +30 -0
  132. package/lib/composables/common.d.ts +15 -0
  133. package/lib/composables/css.d.ts +6 -0
  134. package/lib/composables/index.d.ts +7 -0
  135. package/lib/composables/inputtable.d.ts +37 -0
  136. package/lib/composables/interactive.d.ts +15 -0
  137. package/lib/composables/keys.d.ts +8 -0
  138. package/lib/composables/notifications.d.ts +1 -0
  139. package/lib/composables/theme.d.ts +20 -0
  140. package/lib/create.d.ts +13 -0
  141. package/lib/index.cjs.js +1 -1
  142. package/lib/index.d.ts +6 -0
  143. package/lib/index.es.js +2 -2
  144. package/lib/install.d.ts +4 -0
  145. package/lib/version.d.ts +2 -0
  146. package/package.json +1 -1
  147. package/src/version.ts +1 -1
@@ -0,0 +1,11 @@
1
+ import type { ThemeParams } from '../../composables/theme';
2
+ declare const _default: {
3
+ classes: {
4
+ wrapper: string;
5
+ label: ({ props }: ThemeParams) => string;
6
+ buttonWrapper: ({ props }: ThemeParams) => string;
7
+ button: ({ props }: ThemeParams) => string;
8
+ };
9
+ styles: ({ colors, props, css }: ThemeParams) => Record<string, string>;
10
+ };
11
+ export default _default;
@@ -0,0 +1,78 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ id: StringConstructor;
3
+ label: StringConstructor;
4
+ helper: StringConstructor;
5
+ glow: BooleanConstructor;
6
+ modelValue: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
7
+ name: StringConstructor;
8
+ readonly: BooleanConstructor;
9
+ required: BooleanConstructor;
10
+ validateOnInput: {
11
+ readonly type: BooleanConstructor;
12
+ readonly default: true;
13
+ };
14
+ error: StringConstructor;
15
+ rules: {
16
+ readonly type: ArrayConstructor;
17
+ readonly default: () => never[];
18
+ };
19
+ disabled: BooleanConstructor;
20
+ loading: BooleanConstructor;
21
+ color: {
22
+ readonly type: StringConstructor;
23
+ readonly default: string | undefined;
24
+ };
25
+ size: {
26
+ readonly type: import("vue").PropType<import("../../composables/common").Size>;
27
+ readonly default: "md";
28
+ readonly validator: (value: string) => boolean;
29
+ };
30
+ }, {
31
+ focus: () => void | undefined;
32
+ blur: () => void | undefined;
33
+ reset: () => void;
34
+ validate: (val: any) => boolean;
35
+ setError: (val: string) => void;
36
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
37
+ id: StringConstructor;
38
+ label: StringConstructor;
39
+ helper: StringConstructor;
40
+ glow: BooleanConstructor;
41
+ modelValue: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
42
+ name: StringConstructor;
43
+ readonly: BooleanConstructor;
44
+ required: BooleanConstructor;
45
+ validateOnInput: {
46
+ readonly type: BooleanConstructor;
47
+ readonly default: true;
48
+ };
49
+ error: StringConstructor;
50
+ rules: {
51
+ readonly type: ArrayConstructor;
52
+ readonly default: () => never[];
53
+ };
54
+ disabled: BooleanConstructor;
55
+ loading: BooleanConstructor;
56
+ color: {
57
+ readonly type: StringConstructor;
58
+ readonly default: string | undefined;
59
+ };
60
+ size: {
61
+ readonly type: import("vue").PropType<import("../../composables/common").Size>;
62
+ readonly default: "md";
63
+ readonly validator: (value: string) => boolean;
64
+ };
65
+ }>> & {
66
+ [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
67
+ }, {
68
+ readonly: boolean;
69
+ size: import("../../composables/common").Size;
70
+ required: boolean;
71
+ glow: boolean;
72
+ color: string;
73
+ disabled: boolean;
74
+ loading: boolean;
75
+ validateOnInput: boolean;
76
+ rules: unknown[];
77
+ }>;
78
+ export default _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { ThemeParams } from '../../composables/theme';
2
+ declare const _default: {
3
+ classes: {
4
+ wrapper: string;
5
+ label: ({ props }: ThemeParams) => string;
6
+ buttonWrapper: ({ props }: ThemeParams) => string;
7
+ button: ({ props }: ThemeParams) => string;
8
+ };
9
+ styles: ({ colors, props, css }: ThemeParams) => Record<string, string>;
10
+ };
11
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { Tone, ColorLibrary } from './colors';
2
+ export declare const setOpacity: (color: string, opacity: number) => string;
3
+ export declare const isValidColor: (color: string) => boolean;
4
+ export declare const colorShade: (color: string, percentage: number) => string;
5
+ export declare const shades: Tone[];
6
+ export declare const indielayerColors: string[];
7
+ export declare const tailwindColors: ColorLibrary;
@@ -0,0 +1,30 @@
1
+ export declare type Tone = '50' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
2
+ export interface ColorPalette {
3
+ 50: string;
4
+ 100: string;
5
+ 200: string;
6
+ 300: string;
7
+ 400: string;
8
+ 500: string;
9
+ 600: string;
10
+ 700: string;
11
+ 800: string;
12
+ 900: string;
13
+ }
14
+ export declare type ColorLibrary = Record<string, ColorPalette>;
15
+ export interface ColorsProps {
16
+ color?: string;
17
+ }
18
+ export interface ColorComposition {
19
+ getPalette: (color: string) => ColorPalette;
20
+ getColorOpacity: (color: string, opacity: number) => string;
21
+ }
22
+ export declare const useColors: {
23
+ (): ColorComposition;
24
+ props(defaultColor?: string | undefined): {
25
+ readonly color: {
26
+ readonly type: StringConstructor;
27
+ readonly default: string | undefined;
28
+ };
29
+ };
30
+ };
@@ -0,0 +1,15 @@
1
+ import type { PropType } from 'vue';
2
+ export declare type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | undefined;
3
+ export declare const useCommon: {
4
+ (): void;
5
+ props(): {
6
+ readonly size: {
7
+ readonly type: PropType<Size>;
8
+ readonly default: "md";
9
+ readonly validator: (value: string) => boolean;
10
+ };
11
+ };
12
+ validators(): {
13
+ size: string[];
14
+ };
15
+ };
@@ -0,0 +1,6 @@
1
+ export interface CSSComposition {
2
+ get: (name: string, value: string, theme?: string, modifier?: string) => string;
3
+ variable: (name: string, theme?: string, modifier?: string) => string;
4
+ variables: (object: Record<string, string | object>, theme?: string, modifier?: string) => Record<string, string>;
5
+ }
6
+ export declare const useCSS: (namespace?: string | undefined) => CSSComposition;
@@ -0,0 +1,7 @@
1
+ export * from './keys';
2
+ export * from './common';
3
+ export * from './colors';
4
+ export * from './css';
5
+ export * from './inputtable';
6
+ export * from './interactive';
7
+ export * from './notifications';
@@ -0,0 +1,37 @@
1
+ import type { Ref, PropType } from 'vue';
2
+ export interface XFormInputMethods {
3
+ focus: () => void;
4
+ validate: (val: any) => boolean;
5
+ setError: (val: string) => void;
6
+ }
7
+ export declare const useInputtable: {
8
+ (props: any, { focus, emit, withListeners }: {
9
+ focus: () => void;
10
+ emit: any;
11
+ withListeners?: boolean | undefined;
12
+ }): {
13
+ isFirstValidation: Ref<boolean>;
14
+ errorInternal: any;
15
+ isInsideForm: any;
16
+ inputListeners: {};
17
+ reset: () => void;
18
+ validate: (val: any) => boolean;
19
+ setError: (val: string) => void;
20
+ };
21
+ emits(withListeners?: boolean): string[];
22
+ props(): {
23
+ readonly modelValue: PropType<string | number | boolean | object | any[] | undefined>;
24
+ readonly name: StringConstructor;
25
+ readonly readonly: BooleanConstructor;
26
+ readonly required: BooleanConstructor;
27
+ readonly validateOnInput: {
28
+ readonly type: BooleanConstructor;
29
+ readonly default: true;
30
+ };
31
+ readonly error: StringConstructor;
32
+ readonly rules: {
33
+ readonly type: ArrayConstructor;
34
+ readonly default: () => never[];
35
+ };
36
+ };
37
+ };
@@ -0,0 +1,15 @@
1
+ import type { Ref } from 'vue';
2
+ export interface InteractiveProps {
3
+ disabled?: boolean;
4
+ loading?: boolean;
5
+ }
6
+ export declare const useInteractive: {
7
+ (el: Ref<HTMLElement | null>): {
8
+ focus: () => void | undefined;
9
+ blur: () => void | undefined;
10
+ };
11
+ props(): {
12
+ readonly disabled: BooleanConstructor;
13
+ readonly loading: BooleanConstructor;
14
+ };
15
+ };
@@ -0,0 +1,8 @@
1
+ import type { InjectionKey } from 'vue';
2
+ export declare const injectTabKey: InjectionKey<any>;
3
+ export declare const injectFormKey: InjectionKey<any>;
4
+ export declare const injectThemeKey: InjectionKey<any>;
5
+ export declare const injectIconsKey: InjectionKey<any>;
6
+ export declare const injectColorsKey: InjectionKey<any>;
7
+ export declare const injectButtonGroupKey: InjectionKey<any>;
8
+ export declare const injectNotificationKey: InjectionKey<any>;
@@ -0,0 +1 @@
1
+ export declare const useNotifications: (key?: string | symbol | undefined) => any;
@@ -0,0 +1,20 @@
1
+ import { type StyleValue } from 'vue';
2
+ import { type ColorComposition } from './colors';
3
+ import { type CSSComposition } from './css';
4
+ import type { Slots } from 'vue';
5
+ export declare type ThemeParams = {
6
+ props: any;
7
+ slots: Slots;
8
+ colors: ColorComposition;
9
+ css: CSSComposition;
10
+ rtl?: boolean;
11
+ data?: any;
12
+ };
13
+ export declare const useTheme: (namespace: string, defaultTheme: any, props: any, data?: any) => {
14
+ classPrefix: import("vue").ComputedRef<any>;
15
+ className: import("vue").ComputedRef<string>;
16
+ colors: ColorComposition;
17
+ classes: import("vue").ComputedRef<any>;
18
+ styles: import("vue").ComputedRef<StyleValue>;
19
+ css: CSSComposition;
20
+ };
@@ -0,0 +1,13 @@
1
+ import type { App } from 'vue';
2
+ import type { ColorLibrary } from './composables/colors';
3
+ export declare type IndielayerUIOptions = {
4
+ prefix?: string;
5
+ components?: any;
6
+ colors?: ColorLibrary;
7
+ icons?: any;
8
+ theme?: any;
9
+ };
10
+ declare const create: (createOptions?: IndielayerUIOptions) => {
11
+ install: (app: App, installOptions?: IndielayerUIOptions) => void;
12
+ };
13
+ export default create;