nuance-ui 0.2.16 → 0.2.17

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/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^4.0.0"
6
6
  },
7
- "version": "0.2.16",
7
+ "version": "0.2.17",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
@@ -33,9 +33,9 @@ type __VLS_Slots = {} & {
33
33
  icon?: (props: typeof __VLS_14) => any;
34
34
  };
35
35
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
36
- "update:modelValue": (value: boolean | "indeterminate") => any;
36
+ "update:modelValue": (value: boolean | "indeterminate" | undefined) => any;
37
37
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
38
- "onUpdate:modelValue"?: ((value: boolean | "indeterminate") => any) | undefined;
38
+ "onUpdate:modelValue"?: ((value: boolean | "indeterminate" | undefined) => any) | undefined;
39
39
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
40
40
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
41
41
  declare const _default: typeof __VLS_export;
@@ -33,7 +33,7 @@ const {
33
33
  is: { type: null, required: false },
34
34
  mod: { type: [Object, Array, null], required: false }
35
35
  });
36
- const modelValue = defineModel({ type: [Boolean, String], ...{ default: false } });
36
+ const modelValue = defineModel({ type: [Boolean, String] });
37
37
  const ctx = useCheckboxGroupState();
38
38
  const checked = computed({
39
39
  get: () => {
@@ -33,9 +33,9 @@ type __VLS_Slots = {} & {
33
33
  icon?: (props: typeof __VLS_14) => any;
34
34
  };
35
35
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
36
- "update:modelValue": (value: boolean | "indeterminate") => any;
36
+ "update:modelValue": (value: boolean | "indeterminate" | undefined) => any;
37
37
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
38
- "onUpdate:modelValue"?: ((value: boolean | "indeterminate") => any) | undefined;
38
+ "onUpdate:modelValue"?: ((value: boolean | "indeterminate" | undefined) => any) | undefined;
39
39
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
40
40
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
41
41
  declare const _default: typeof __VLS_export;
@@ -39,9 +39,9 @@ type __VLS_Slots = {} & {
39
39
  description?: (props: typeof __VLS_32) => any;
40
40
  };
41
41
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
42
- "update:modelValue": (value: boolean) => any;
42
+ "update:modelValue": (value: boolean | undefined) => any;
43
43
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
44
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
44
+ "onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
45
45
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
46
46
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
47
47
  declare const _default: typeof __VLS_export;
@@ -46,7 +46,7 @@ const {
46
46
  const uuid = computed(() => id ?? useId());
47
47
  const ctx = useSwitchGroupState();
48
48
  const size = computed(() => _size ?? ctx?.size);
49
- const modelValue = defineModel({ type: Boolean, ...{ default: false } });
49
+ const modelValue = defineModel({ type: Boolean });
50
50
  const checked = computed({
51
51
  get: () => {
52
52
  if (ctx && value !== void 0)
@@ -39,9 +39,9 @@ type __VLS_Slots = {} & {
39
39
  description?: (props: typeof __VLS_32) => any;
40
40
  };
41
41
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
42
- "update:modelValue": (value: boolean) => any;
42
+ "update:modelValue": (value: boolean | undefined) => any;
43
43
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
44
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
44
+ "onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
45
45
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
46
46
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
47
47
  declare const _default: typeof __VLS_export;
@@ -1,6 +1,7 @@
1
1
  import type { CheckboxProps } from '../components/checkbox/checkbox.vue.js';
2
2
  import type { FieldBaseProps } from './types.js';
3
- export interface CheckboxFieldProps extends Omit<CheckboxProps, 'error'>, FieldBaseProps<boolean> {
3
+ export interface CheckboxFieldProps extends Omit<CheckboxProps, 'error'>, Omit<FieldBaseProps<boolean>, 'initialValue'> {
4
+ checked?: true;
4
5
  }
5
6
  declare var __VLS_11: {
6
7
  class: string;
@@ -5,10 +5,11 @@ const {
5
5
  name,
6
6
  rules,
7
7
  validateOn = "change",
8
- initialValue,
8
+ checked: initialValue,
9
9
  controlled = true,
10
10
  ...props
11
11
  } = defineProps({
12
+ checked: { type: Boolean, required: false },
12
13
  id: { type: String, required: false },
13
14
  color: { type: null, required: false },
14
15
  iconColor: { type: null, required: false },
@@ -27,17 +28,18 @@ const {
27
28
  name: { type: String, required: true },
28
29
  controlled: { type: Boolean, required: false },
29
30
  rules: { type: null, required: false },
30
- validateOn: { type: String, required: false },
31
- initialValue: { type: Boolean, required: false }
31
+ validateOn: { type: String, required: false }
32
32
  });
33
33
  const {
34
- value,
34
+ checked,
35
35
  errorMessage,
36
36
  handleChange
37
37
  } = useField(() => name, rules, {
38
+ type: "checkbox",
38
39
  validateOnValueUpdate: false,
39
40
  validateOnMount: false,
40
- initialValue,
41
+ checkedValue: true,
42
+ initialValue: initialValue || void 0,
41
43
  controlled
42
44
  });
43
45
  </script>
@@ -45,7 +47,7 @@ const {
45
47
  <template>
46
48
  <Checkbox
47
49
  v-bind='props'
48
- :model-value='value'
50
+ v-model='checked'
49
51
  :error='errorMessage'
50
52
  @update:model-value='handleChange($event, validateOn === "change" || !!errorMessage)'
51
53
  >
@@ -1,6 +1,7 @@
1
1
  import type { CheckboxProps } from '../components/checkbox/checkbox.vue.js';
2
2
  import type { FieldBaseProps } from './types.js';
3
- export interface CheckboxFieldProps extends Omit<CheckboxProps, 'error'>, FieldBaseProps<boolean> {
3
+ export interface CheckboxFieldProps extends Omit<CheckboxProps, 'error'>, Omit<FieldBaseProps<boolean>, 'initialValue'> {
4
+ checked?: true;
4
5
  }
5
6
  declare var __VLS_11: {
6
7
  class: string;
@@ -41,7 +41,7 @@ const {
41
41
  <template>
42
42
  <CheckboxGroup
43
43
  v-bind='props'
44
- :model-value='value ?? []'
44
+ v-model='value'
45
45
  :error='errorMessage'
46
46
  @update:model-value='handleChange($event, validateOn === "change" || !!errorMessage)'
47
47
  >
@@ -61,7 +61,7 @@ const {
61
61
  <template>
62
62
  <DatePicker
63
63
  v-bind='props'
64
- :model-value='value'
64
+ v-model='value'
65
65
  :error='errorMessage'
66
66
  @update:model-value='handleChange($event, validateOn === "change" || !!errorMessage)'
67
67
  >
@@ -49,7 +49,7 @@ const {
49
49
  <template>
50
50
  <DateTimePicker
51
51
  v-bind='props'
52
- :model-value='value'
52
+ v-model='value'
53
53
  :error='errorMessage'
54
54
  @update:model-value='handleChange($event, validateOn === "change" || !!errorMessage)'
55
55
  >
@@ -47,7 +47,7 @@ const {
47
47
  <template>
48
48
  <EmailInput
49
49
  v-bind='props'
50
- :model-value='value'
50
+ v-model='value'
51
51
  :error='errorMessage'
52
52
  :name
53
53
  @update:model-value='handleChange($event, !!errorMessage)'
@@ -48,7 +48,7 @@ const {
48
48
  <template>
49
49
  <NumberInput
50
50
  v-bind='props'
51
- :model-value='value'
51
+ v-model='value'
52
52
  :error='errorMessage'
53
53
  :name
54
54
  :min
@@ -47,7 +47,7 @@ const {
47
47
  <template>
48
48
  <PasswordInput
49
49
  v-bind='props'
50
- :model-value='value'
50
+ v-model='value'
51
51
  :error='errorMessage'
52
52
  :name
53
53
  @update:model-value='handleChange($event, !!errorMessage)'
@@ -54,7 +54,7 @@ const {
54
54
  <template>
55
55
  <Select
56
56
  v-bind='props'
57
- :model-value='value'
57
+ v-model='value'
58
58
  :error='errorMessage'
59
59
  @update:model-value='handleChange($event, !!errorMessage)'
60
60
  @blur='handleBlur($event, validateOn === "blur")'
@@ -1,6 +1,7 @@
1
1
  import type { SwitchProps } from '../components/switch/switch.vue.js';
2
2
  import type { FieldBaseProps } from './types.js';
3
- export interface SwitchFieldProps extends Omit<SwitchProps, 'error' | 'name'>, FieldBaseProps<boolean> {
3
+ export interface SwitchFieldProps extends Omit<SwitchProps, 'error' | 'name'>, Omit<FieldBaseProps<boolean>, 'initialValue'> {
4
+ checked?: true;
4
5
  }
5
6
  declare var __VLS_11: {}, __VLS_14: {}, __VLS_17: {
6
7
  error: string | undefined;
@@ -5,10 +5,11 @@ const {
5
5
  name,
6
6
  rules,
7
7
  validateOn = "change",
8
- initialValue,
9
8
  controlled = true,
9
+ checked: initialValue,
10
10
  ...props
11
11
  } = defineProps({
12
+ checked: { type: Boolean, required: false },
12
13
  id: { type: String, required: false },
13
14
  value: { type: String, required: false },
14
15
  offLabel: { type: String, required: false },
@@ -29,17 +30,18 @@ const {
29
30
  name: { type: String, required: true },
30
31
  controlled: { type: Boolean, required: false },
31
32
  rules: { type: null, required: false },
32
- validateOn: { type: String, required: false },
33
- initialValue: { type: Boolean, required: false }
33
+ validateOn: { type: String, required: false }
34
34
  });
35
35
  const {
36
- value,
36
+ checked,
37
37
  errorMessage,
38
38
  handleChange
39
39
  } = useField(() => name, rules, {
40
+ type: "checkbox",
40
41
  validateOnValueUpdate: false,
41
42
  validateOnMount: false,
42
- initialValue,
43
+ checkedValue: true,
44
+ initialValue: initialValue || void 0,
43
45
  controlled
44
46
  });
45
47
  </script>
@@ -47,7 +49,7 @@ const {
47
49
  <template>
48
50
  <Switch
49
51
  v-bind='props'
50
- :model-value='value'
52
+ v-model='checked'
51
53
  :error='errorMessage'
52
54
  @update:model-value='handleChange($event, validateOn === "change" || !!errorMessage)'
53
55
  >
@@ -1,6 +1,7 @@
1
1
  import type { SwitchProps } from '../components/switch/switch.vue.js';
2
2
  import type { FieldBaseProps } from './types.js';
3
- export interface SwitchFieldProps extends Omit<SwitchProps, 'error' | 'name'>, FieldBaseProps<boolean> {
3
+ export interface SwitchFieldProps extends Omit<SwitchProps, 'error' | 'name'>, Omit<FieldBaseProps<boolean>, 'initialValue'> {
4
+ checked?: true;
4
5
  }
5
6
  declare var __VLS_11: {}, __VLS_14: {}, __VLS_17: {
6
7
  error: string | undefined;
@@ -41,7 +41,7 @@ const {
41
41
  <template>
42
42
  <SwitchGroup
43
43
  v-bind='props'
44
- :model-value='value ?? []'
44
+ v-model='value'
45
45
  :error='errorMessage'
46
46
  @update:model-value='handleChange($event, validateOn === "change" || !!errorMessage)'
47
47
  >
@@ -47,7 +47,7 @@ const {
47
47
  <template>
48
48
  <TextInput
49
49
  v-bind='props'
50
- :model-value='value'
50
+ v-model='value'
51
51
  :error='errorMessage'
52
52
  :name
53
53
  @update:model-value='handleChange($event, !!errorMessage)'
@@ -46,7 +46,7 @@ const {
46
46
  <template>
47
47
  <Textarea
48
48
  v-bind='props'
49
- :model-value='value'
49
+ v-model='value'
50
50
  :error='errorMessage'
51
51
  :name
52
52
  @update:model-value='handleChange($event, !!errorMessage)'
@@ -57,7 +57,7 @@ const {
57
57
  <template>
58
58
  <TimePicker
59
59
  v-bind='props'
60
- :model-value='value'
60
+ v-model='value'
61
61
  :error='errorMessage'
62
62
  @update:model-value='handleChange($event, validateOn === "change" || !!errorMessage)'
63
63
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuance-ui",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "description": "A modern Vue UI library inspired by the best of the React ecosystem.",
5
5
  "repository": {
6
6
  "type": "git",