@snolui/vue 1.0.0 → 1.0.2

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.
@@ -0,0 +1,18 @@
1
+ export interface SnolBarChartDatasetItem {
2
+ label: string;
3
+ backgroundColor: string;
4
+ data: number[];
5
+ borderRadius?: number;
6
+ borderSkipped?: boolean | string;
7
+ barThickness?: number;
8
+ maxBarThickness?: number;
9
+ }
10
+ export interface SnolBarChartProps {
11
+ title: string;
12
+ datasets: SnolBarChartDatasetItem[];
13
+ years?: any;
14
+ defaultYear?: number;
15
+ months?: string[];
16
+ optionValue?: string;
17
+ optionLabel?: string;
18
+ }
@@ -0,0 +1,8 @@
1
+ import { SnolCheckboxProps } from './type.ts';
2
+ declare const __VLS_export: import('vue').DefineComponent<SnolCheckboxProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SnolCheckboxProps> & Readonly<{}>, {
3
+ radius: "none" | "sm" | "md" | "lg" | "full";
4
+ size: "sm" | "md" | "lg";
5
+ color: "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "error";
6
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import { CheckboxProps } from 'primevue';
2
+ export type SnolCheckboxItems = {
3
+ label: string;
4
+ value: any;
5
+ name?: string;
6
+ }[];
7
+ export interface SnolCheckboxProps extends /* @vue-ignore */ Omit<CheckboxProps, 'size'> {
8
+ label?: string;
9
+ required?: boolean;
10
+ invalid?: boolean;
11
+ description?: string;
12
+ errorMessage?: string;
13
+ items?: SnolCheckboxItems;
14
+ isVertical?: boolean;
15
+ radius?: 'none' | 'sm' | 'md' | 'lg' | 'full';
16
+ size?: 'sm' | 'md' | 'lg';
17
+ color?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'error';
18
+ class?: string;
19
+ }
@@ -17,3 +17,6 @@ export { default as Popover } from './popover/Popover.vue';
17
17
  export { default as Avatar } from './avatar/Avatar.vue';
18
18
  export { default as Loading } from './loading/Loading.vue';
19
19
  export { default as Progress } from './progress/Progress.vue';
20
+ export { default as RadioGroup } from './radio-group/RadioGroup.vue';
21
+ export { default as Checkbox } from './checkbox/Checkbox.vue';
22
+ export { default as User } from './user/User.vue';
@@ -1,8 +1,18 @@
1
1
  import { LoadingProps } from './type.ts';
2
- declare const __VLS_export: import('vue').DefineComponent<LoadingProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<LoadingProps> & Readonly<{}>, {
2
+ declare var __VLS_1: {};
3
+ type __VLS_Slots = {} & {
4
+ loading?: (props: typeof __VLS_1) => any;
5
+ };
6
+ declare const __VLS_base: import('vue').DefineComponent<LoadingProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<LoadingProps> & Readonly<{}>, {
3
7
  size: "sm" | "md" | "lg";
4
- variant: "spinner" | "wave" | "dots";
8
+ variant: "spinner" | "wave" | "dots" | "overlay";
5
9
  color: "primary" | "secondary" | "success" | "warning" | "danger" | "black" | "white";
6
10
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
12
  declare const _default: typeof __VLS_export;
8
13
  export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -1,7 +1,7 @@
1
1
  export interface LoadingProps {
2
2
  size?: "sm" | "md" | "lg";
3
3
  color?: "primary" | "secondary" | "success" | "warning" | "danger" | "black" | "white";
4
- variant?: "spinner" | "wave" | "dots";
4
+ variant?: "spinner" | "wave" | "dots" | "overlay";
5
5
  label?: string;
6
6
  className?: string;
7
7
  }
@@ -0,0 +1,7 @@
1
+ import { SnolRadioProps } from './type';
2
+ declare const __VLS_export: import('vue').DefineComponent<SnolRadioProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SnolRadioProps> & Readonly<{}>, {
3
+ color: "primary" | "secondary" | "success" | "warning" | "danger" | "info" | "error";
4
+ groupName: string;
5
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,17 @@
1
+ export type SnolRadioItems = {
2
+ label: string;
3
+ value: number;
4
+ };
5
+ export interface SnolRadioProps {
6
+ label?: string;
7
+ required?: boolean;
8
+ invalid?: boolean;
9
+ description?: string;
10
+ errorMessage?: string;
11
+ items?: SnolRadioItems[];
12
+ groupName: string;
13
+ optionLabel?: string;
14
+ optionValue?: string;
15
+ isVertical?: boolean;
16
+ color?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'error';
17
+ }
@@ -0,0 +1,10 @@
1
+ import { UserProps } from './type.ts';
2
+ declare const __VLS_export: import('vue').DefineComponent<UserProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<UserProps> & Readonly<{}>, {
3
+ radius: "none" | "sm" | "md" | "lg" | "full";
4
+ size: "sm" | "md" | "lg";
5
+ color: "primary" | "secondary" | "success" | "warning" | "danger" | "info" | "error";
6
+ isBordered: boolean;
7
+ isDisabled: boolean;
8
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,16 @@
1
+ export interface UserProps {
2
+ avatar: string;
3
+ name: string;
4
+ description: string;
5
+ size?: "sm" | "md" | "lg";
6
+ radius?: "none" | "sm" | "md" | "lg" | "full";
7
+ color?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info' | 'error';
8
+ isBordered?: boolean;
9
+ isDisabled?: boolean;
10
+ classNames?: {
11
+ root?: string;
12
+ avatar?: string;
13
+ name?: string;
14
+ description?: string;
15
+ };
16
+ }
@@ -0,0 +1,18 @@
1
+ export interface SnolMessages {
2
+ [locale: string]: {
3
+ [key: string]: string;
4
+ };
5
+ }
6
+ export interface SnolLocaleOptions {
7
+ locale?: string;
8
+ messages?: SnolMessages;
9
+ }
10
+ export declare function setupSnolLocale(options?: SnolLocaleOptions): void;
11
+ export declare function useSnolLocale(): {
12
+ t: (key: string) => string;
13
+ locale: {
14
+ locale: string;
15
+ messages: SnolMessages;
16
+ };
17
+ setLocale: (locale: string) => void;
18
+ };
package/dist/index.d.ts CHANGED
@@ -4,12 +4,13 @@ import { useVuelidate } from '@vuelidate/core';
4
4
  import { default as axios } from 'axios';
5
5
  import { configureApi } from './lib/config';
6
6
  import { ApiAxios } from './lib/ApiAxios.ts';
7
+ import { useSnolLocale } from './config/local.ts';
7
8
  import { default as SnolUI } from './plugin';
8
9
  import { useToast, Toast as SnolToast } from 'primevue';
9
- import { Button as SnolButton, Icon as SnolIcon, Chip as SnolChip, Card as SnolCard, Tag as SnolTag, InputNumber as SnolInputNumber, InputNumberGroup as SnolInputNumberGroup, InputText as SnolInputText, InputTextGroup as SnolInputTextGroup, Textarea as SnolTextarea, Otp as SnolOtp, Select as SnolSelect, MultiSelect as SnolMultiSelect, Typography as SnolTypography, DatePicker as SnolDatePicker, Popover as SnolPopover, Avatar as SnolAvatar, Loading as SnolLoading } from './components';
10
+ import { Button as SnolButton, Icon as SnolIcon, Chip as SnolChip, Card as SnolCard, Tag as SnolTag, InputNumber as SnolInputNumber, InputNumberGroup as SnolInputNumberGroup, InputText as SnolInputText, InputTextGroup as SnolInputTextGroup, Textarea as SnolTextarea, Otp as SnolOtp, Select as SnolSelect, MultiSelect as SnolMultiSelect, Typography as SnolTypography, DatePicker as SnolDatePicker, Popover as SnolPopover, Avatar as SnolAvatar, Loading as SnolLoading, Progress as SnolProgress, RadioGroup as SnolRadioGroup, Checkbox as SnolCheckbox, User as SnolUser } from './components';
10
11
  export * from './composables';
11
12
  export * from './plugin';
12
- export { SnolButton, SnolIcon, SnolChip, SnolCard, SnolTag, SnolInputNumber, SnolInputNumberGroup, SnolInputText, SnolInputTextGroup, SnolTextarea, SnolOtp, SnolSelect, SnolMultiSelect, SnolTypography, SnolDatePicker, SnolPopover, SnolAvatar, SnolLoading, axios, configureApi, ApiAxios, Md5, required, helpers, useVuelidate, SnolToast, useToast, };
13
+ export { SnolButton, SnolIcon, SnolChip, SnolCard, SnolTag, SnolInputNumber, SnolInputNumberGroup, SnolInputText, SnolInputTextGroup, SnolTextarea, SnolOtp, SnolSelect, SnolMultiSelect, SnolTypography, SnolDatePicker, SnolPopover, SnolAvatar, SnolLoading, SnolProgress, SnolRadioGroup, SnolCheckbox, SnolUser, useSnolLocale, axios, configureApi, ApiAxios, Md5, required, helpers, useVuelidate, SnolToast, useToast, };
13
14
  declare module "vue" {
14
15
  interface GlobalComponents {
15
16
  SnolButton: typeof import("./components/button/Button.vue")["default"];
@@ -31,6 +32,9 @@ declare module "vue" {
31
32
  SnolAvatar: typeof import("./components/avatar/Avatar.vue")["default"];
32
33
  SnolLoading: typeof import("./components/loading/Loading.vue")["default"];
33
34
  SnolProgress: typeof import("./components/progress/Progress.vue")["default"];
35
+ SnolRadioGroup: typeof import("./components/radio-group/RadioGroup.vue")["default"];
36
+ SnolCheckbox: typeof import("./components/checkbox/Checkbox.vue")["default"];
37
+ SnolUser: typeof import("./components/user/User.vue")["default"];
34
38
  }
35
39
  }
36
40
  export default SnolUI;
package/dist/plugin.d.ts CHANGED
@@ -18,12 +18,18 @@ export interface SnolUIOptions {
18
18
  primevue?: boolean;
19
19
  ripple?: boolean;
20
20
  preset?: boolean;
21
+ locale?: string;
22
+ messages?: {
23
+ [locale: string]: {
24
+ [key: string]: string;
25
+ };
26
+ };
21
27
  theme?: {
22
28
  colors?: {
23
29
  light?: ThemeColors;
24
30
  dark?: ThemeColors;
25
31
  };
26
- layout?: ThemeLayout;
32
+ components?: ThemeLayout;
27
33
  };
28
34
  }
29
35
  declare const SnolUI: Plugin;