nuance-ui 0.1.4 → 0.1.6

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 (150) hide show
  1. package/README.md +6 -0
  2. package/dist/module.json +1 -1
  3. package/dist/runtime/components/action-icon/action-icon-group.d.vue.ts +1 -1
  4. package/dist/runtime/components/action-icon/action-icon-group.vue +3 -1
  5. package/dist/runtime/components/action-icon/action-icon-group.vue.d.ts +1 -1
  6. package/dist/runtime/components/action-icon/action-icon-section.d.vue.ts +1 -1
  7. package/dist/runtime/components/action-icon/action-icon-section.vue +3 -1
  8. package/dist/runtime/components/action-icon/action-icon-section.vue.d.ts +1 -1
  9. package/dist/runtime/components/action-icon/action-icon.vue +1 -1
  10. package/dist/runtime/components/app-shell/app-shell-section.d.vue.ts +1 -1
  11. package/dist/runtime/components/app-shell/app-shell-section.vue +3 -1
  12. package/dist/runtime/components/app-shell/app-shell-section.vue.d.ts +1 -1
  13. package/dist/runtime/components/app-shell/app-shell.d.vue.ts +1 -1
  14. package/dist/runtime/components/app-shell/app-shell.vue +3 -1
  15. package/dist/runtime/components/app-shell/app-shell.vue.d.ts +1 -1
  16. package/dist/runtime/components/background-image.d.vue.ts +1 -1
  17. package/dist/runtime/components/background-image.vue +3 -1
  18. package/dist/runtime/components/background-image.vue.d.ts +1 -1
  19. package/dist/runtime/components/button/button-group.d.vue.ts +1 -1
  20. package/dist/runtime/components/button/button-group.vue +3 -1
  21. package/dist/runtime/components/button/button-group.vue.d.ts +1 -1
  22. package/dist/runtime/components/button/button.d.vue.ts +1 -1
  23. package/dist/runtime/components/button/button.vue +3 -1
  24. package/dist/runtime/components/button/button.vue.d.ts +1 -1
  25. package/dist/runtime/components/button/unstyled-button.d.vue.ts +3 -2
  26. package/dist/runtime/components/button/unstyled-button.vue +3 -2
  27. package/dist/runtime/components/button/unstyled-button.vue.d.ts +3 -2
  28. package/dist/runtime/components/card/card-section.d.vue.ts +1 -1
  29. package/dist/runtime/components/card/card-section.vue +3 -1
  30. package/dist/runtime/components/card/card-section.vue.d.ts +1 -1
  31. package/dist/runtime/components/card/card.d.vue.ts +1 -1
  32. package/dist/runtime/components/card/card.vue +6 -1
  33. package/dist/runtime/components/card/card.vue.d.ts +1 -1
  34. package/dist/runtime/components/checkbox/checkbox-group.d.vue.ts +1 -1
  35. package/dist/runtime/components/checkbox/checkbox-group.vue +9 -1
  36. package/dist/runtime/components/checkbox/checkbox-group.vue.d.ts +1 -1
  37. package/dist/runtime/components/checkbox/checkbox.d.vue.ts +1 -1
  38. package/dist/runtime/components/checkbox/checkbox.vue +11 -2
  39. package/dist/runtime/components/checkbox/checkbox.vue.d.ts +1 -1
  40. package/dist/runtime/components/checkbox/lib/card.context.d.ts +1 -1
  41. package/dist/runtime/components/checkbox/lib/card.context.js +3 -4
  42. package/dist/runtime/components/checkbox/lib/group.context.d.ts +1 -1
  43. package/dist/runtime/components/checkbox/lib/group.context.js +3 -4
  44. package/dist/runtime/components/chip/chip.vue +2 -2
  45. package/dist/runtime/components/combobox/combobox-empty.d.vue.ts +1 -1
  46. package/dist/runtime/components/combobox/combobox-empty.vue +5 -2
  47. package/dist/runtime/components/combobox/combobox-empty.vue.d.ts +1 -1
  48. package/dist/runtime/components/combobox/combobox-group.d.vue.ts +1 -1
  49. package/dist/runtime/components/combobox/combobox-group.vue +2 -0
  50. package/dist/runtime/components/combobox/combobox-group.vue.d.ts +1 -1
  51. package/dist/runtime/components/combobox/combobox-option-list.d.vue.ts +1 -1
  52. package/dist/runtime/components/combobox/combobox-option-list.vue +3 -1
  53. package/dist/runtime/components/combobox/combobox-option-list.vue.d.ts +1 -1
  54. package/dist/runtime/components/combobox/combobox-option.d.vue.ts +1 -1
  55. package/dist/runtime/components/combobox/combobox-option.vue +2 -0
  56. package/dist/runtime/components/combobox/combobox-option.vue.d.ts +1 -1
  57. package/dist/runtime/components/combobox/combobox-root.d.vue.ts +1 -1
  58. package/dist/runtime/components/combobox/combobox-root.vue +14 -1
  59. package/dist/runtime/components/combobox/combobox-root.vue.d.ts +1 -1
  60. package/dist/runtime/components/container.d.vue.ts +1 -1
  61. package/dist/runtime/components/container.vue +3 -1
  62. package/dist/runtime/components/container.vue.d.ts +1 -1
  63. package/dist/runtime/components/dialog/dialog-header.d.vue.ts +1 -1
  64. package/dist/runtime/components/dialog/dialog-header.vue +5 -2
  65. package/dist/runtime/components/dialog/dialog-header.vue.d.ts +1 -1
  66. package/dist/runtime/components/dialog/dialog-root.d.vue.ts +1 -1
  67. package/dist/runtime/components/dialog/dialog-root.vue +3 -1
  68. package/dist/runtime/components/dialog/dialog-root.vue.d.ts +1 -1
  69. package/dist/runtime/components/dialog/dialog-title.d.vue.ts +1 -1
  70. package/dist/runtime/components/dialog/dialog-title.vue +16 -1
  71. package/dist/runtime/components/dialog/dialog-title.vue.d.ts +1 -1
  72. package/dist/runtime/components/drawer/drawer-header.d.vue.ts +1 -1
  73. package/dist/runtime/components/drawer/drawer-header.vue +4 -1
  74. package/dist/runtime/components/drawer/drawer-header.vue.d.ts +1 -1
  75. package/dist/runtime/components/drawer/drawer-root.d.vue.ts +2 -1
  76. package/dist/runtime/components/drawer/drawer-root.vue +11 -1
  77. package/dist/runtime/components/drawer/drawer-root.vue.d.ts +2 -1
  78. package/dist/runtime/components/drawer/drawer-title.d.vue.ts +1 -1
  79. package/dist/runtime/components/drawer/drawer-title.vue +16 -1
  80. package/dist/runtime/components/drawer/drawer-title.vue.d.ts +1 -1
  81. package/dist/runtime/components/input/input.d.vue.ts +1 -1
  82. package/dist/runtime/components/input/input.vue +11 -0
  83. package/dist/runtime/components/input/input.vue.d.ts +1 -1
  84. package/dist/runtime/components/input/lib/input-wrapper.context.d.ts +2 -2
  85. package/dist/runtime/components/input/lib/input-wrapper.context.js +4 -5
  86. package/dist/runtime/components/input/number-input.d.vue.ts +1 -1
  87. package/dist/runtime/components/input/number-input.vue +7 -1
  88. package/dist/runtime/components/input/number-input.vue.d.ts +1 -1
  89. package/dist/runtime/components/input/password-input.vue +5 -1
  90. package/dist/runtime/components/input/text-input.d.vue.ts +6 -6
  91. package/dist/runtime/components/input/text-input.vue +8 -4
  92. package/dist/runtime/components/input/text-input.vue.d.ts +6 -6
  93. package/dist/runtime/components/input/ui/input-base.d.vue.ts +4 -3
  94. package/dist/runtime/components/input/ui/input-base.vue +8 -7
  95. package/dist/runtime/components/input/ui/input-base.vue.d.ts +4 -3
  96. package/dist/runtime/components/input/ui/input-inline.d.vue.ts +1 -1
  97. package/dist/runtime/components/input/ui/input-inline.vue +3 -1
  98. package/dist/runtime/components/input/ui/input-inline.vue.d.ts +1 -1
  99. package/dist/runtime/components/input/ui/input-wrapper.d.vue.ts +2 -2
  100. package/dist/runtime/components/input/ui/input-wrapper.vue +16 -6
  101. package/dist/runtime/components/input/ui/input-wrapper.vue.d.ts +2 -2
  102. package/dist/runtime/components/link/link-button.d.vue.ts +1 -1
  103. package/dist/runtime/components/link/link-button.vue +18 -1
  104. package/dist/runtime/components/link/link-button.vue.d.ts +1 -1
  105. package/dist/runtime/components/link/link.d.vue.ts +1 -1
  106. package/dist/runtime/components/link/link.vue +17 -1
  107. package/dist/runtime/components/link/link.vue.d.ts +1 -1
  108. package/dist/runtime/components/modal/modal-header.d.vue.ts +1 -1
  109. package/dist/runtime/components/modal/modal-header.vue +4 -1
  110. package/dist/runtime/components/modal/modal-header.vue.d.ts +1 -1
  111. package/dist/runtime/components/modal/modal-root.d.vue.ts +2 -1
  112. package/dist/runtime/components/modal/modal-root.vue +11 -1
  113. package/dist/runtime/components/modal/modal-root.vue.d.ts +2 -1
  114. package/dist/runtime/components/modal/modal-title.d.vue.ts +1 -1
  115. package/dist/runtime/components/modal/modal-title.vue +16 -1
  116. package/dist/runtime/components/modal/modal-title.vue.d.ts +1 -1
  117. package/dist/runtime/components/nav-link/nav-link.d.vue.ts +1 -1
  118. package/dist/runtime/components/nav-link/nav-link.vue +2 -0
  119. package/dist/runtime/components/nav-link/nav-link.vue.d.ts +1 -1
  120. package/dist/runtime/components/paper.d.vue.ts +1 -1
  121. package/dist/runtime/components/paper.vue +3 -1
  122. package/dist/runtime/components/paper.vue.d.ts +1 -1
  123. package/dist/runtime/components/select/select.d.vue.ts +5 -2
  124. package/dist/runtime/components/select/select.vue +13 -1
  125. package/dist/runtime/components/select/select.vue.d.ts +5 -2
  126. package/dist/runtime/components/tabs/tabs-list.d.vue.ts +1 -1
  127. package/dist/runtime/components/tabs/tabs-list.vue +3 -1
  128. package/dist/runtime/components/tabs/tabs-list.vue.d.ts +1 -1
  129. package/dist/runtime/components/tabs/tabs-panel.d.vue.ts +1 -1
  130. package/dist/runtime/components/tabs/tabs-panel.vue +3 -1
  131. package/dist/runtime/components/tabs/tabs-panel.vue.d.ts +1 -1
  132. package/dist/runtime/components/tabs/tabs-root.d.vue.ts +1 -1
  133. package/dist/runtime/components/tabs/tabs-root.vue +3 -1
  134. package/dist/runtime/components/tabs/tabs-root.vue.d.ts +1 -1
  135. package/dist/runtime/components/text.d.vue.ts +1 -1
  136. package/dist/runtime/components/text.vue +3 -1
  137. package/dist/runtime/components/text.vue.d.ts +1 -1
  138. package/dist/runtime/components/textarea.d.vue.ts +1 -1
  139. package/dist/runtime/components/textarea.vue +15 -2
  140. package/dist/runtime/components/textarea.vue.d.ts +1 -1
  141. package/dist/runtime/components/title.d.vue.ts +1 -1
  142. package/dist/runtime/components/title.vue +13 -1
  143. package/dist/runtime/components/title.vue.d.ts +1 -1
  144. package/dist/runtime/components/visually-hidden/visually-hidden-input.d.vue.ts +1 -1
  145. package/dist/runtime/components/visually-hidden/visually-hidden-input.vue +4 -1
  146. package/dist/runtime/components/visually-hidden/visually-hidden-input.vue.d.ts +1 -1
  147. package/dist/runtime/components/visually-hidden/visually-hidden.d.vue.ts +1 -1
  148. package/dist/runtime/components/visually-hidden/visually-hidden.vue +3 -1
  149. package/dist/runtime/components/visually-hidden/visually-hidden.vue.d.ts +1 -1
  150. package/package.json +2 -2
package/README.md CHANGED
@@ -15,6 +15,12 @@ yarn add nuance-ui
15
15
  pnpm add nuance-ui
16
16
  ```
17
17
 
18
+ ### Install modules
19
+
20
+ ```bash
21
+ npx nuxt module add color-mode icon
22
+ ```
23
+
18
24
  ## Quick Start
19
25
 
20
26
  Add `nuance-ui` to the `modules` section of your `nuxt.config.ts`:
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^4.0.0"
6
6
  },
7
- "version": "0.1.4",
7
+ "version": "0.1.6",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
@@ -1,5 +1,5 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
- export interface ActionIconGroupProps extends /* @vue-ignore */ BoxProps {
2
+ export interface ActionIconGroupProps extends BoxProps {
3
3
  orientation?: 'horizontal' | 'vertical';
4
4
  }
5
5
  declare var __VLS_6: {};
@@ -2,7 +2,9 @@
2
2
  import Box from "../box.vue";
3
3
  import css from "./action-icon.module.css";
4
4
  const { mod, orientation = "horizontal", is } = defineProps({
5
- orientation: { type: String, required: false }
5
+ orientation: { type: String, required: false },
6
+ is: { type: null, required: false },
7
+ mod: { type: [Object, Array, null], required: false }
6
8
  });
7
9
  </script>
8
10
 
@@ -1,5 +1,5 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
- export interface ActionIconGroupProps extends /* @vue-ignore */ BoxProps {
2
+ export interface ActionIconGroupProps extends BoxProps {
3
3
  orientation?: 'horizontal' | 'vertical';
4
4
  }
5
5
  declare var __VLS_6: {};
@@ -1,6 +1,6 @@
1
1
  import type { NuanceColor, NuanceRadius, NuanceSize, UiKitGradient } from '@nui/types';
2
2
  import type { BoxProps } from '../box.vue.js';
3
- export interface ActionIconSectionProps extends /* @vue-ignore */ BoxProps {
3
+ export interface ActionIconSectionProps extends BoxProps {
4
4
  size?: NuanceSize | `compact-${NuanceSize}`;
5
5
  variant?: 'filled' | 'light' | 'outline' | 'subtle' | 'default' | 'gradient';
6
6
  gradient?: UiKitGradient;
@@ -18,7 +18,9 @@ const {
18
18
  gradient: { type: Object, required: false },
19
19
  loading: { type: Boolean, required: false },
20
20
  color: { type: null, required: false },
21
- radius: { type: [String, Number], required: false }
21
+ radius: { type: [String, Number], required: false },
22
+ is: { type: null, required: false },
23
+ mod: { type: [Object, Array, null], required: false }
22
24
  });
23
25
  const style = computed(() => useStyleResolver((theme) => {
24
26
  const {
@@ -1,6 +1,6 @@
1
1
  import type { NuanceColor, NuanceRadius, NuanceSize, UiKitGradient } from '@nui/types';
2
2
  import type { BoxProps } from '../box.vue.js';
3
- export interface ActionIconSectionProps extends /* @vue-ignore */ BoxProps {
3
+ export interface ActionIconSectionProps extends BoxProps {
4
4
  size?: NuanceSize | `compact-${NuanceSize}`;
5
5
  variant?: 'filled' | 'light' | 'outline' | 'subtle' | 'default' | 'gradient';
6
6
  gradient?: UiKitGradient;
@@ -23,7 +23,7 @@ const {
23
23
  color: { type: null, required: false },
24
24
  radius: { type: [String, Number], required: false },
25
25
  classes: { type: Object, required: false },
26
- mod: { type: null, required: false },
26
+ mod: { type: [Object, Array, null], required: false },
27
27
  icon: { type: String, required: false }
28
28
  });
29
29
  const style = computed(() => useStyleResolver((theme) => {
@@ -1,5 +1,5 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
- export interface AppShellSectionProps extends /* @vue-ignore */ BoxProps {
2
+ export interface AppShellSectionProps extends BoxProps {
3
3
  /** Determines whether the section should take all available space, `false` by default */
4
4
  grow?: boolean;
5
5
  }
@@ -1,7 +1,9 @@
1
1
  <script setup>
2
2
  import Box from "../box.vue";
3
3
  const { is = "section", mod, grow } = defineProps({
4
- grow: { type: Boolean, required: false }
4
+ grow: { type: Boolean, required: false },
5
+ is: { type: null, required: false },
6
+ mod: { type: [Object, Array, null], required: false }
5
7
  });
6
8
  </script>
7
9
 
@@ -1,5 +1,5 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
- export interface AppShellSectionProps extends /* @vue-ignore */ BoxProps {
2
+ export interface AppShellSectionProps extends BoxProps {
3
3
  /** Determines whether the section should take all available space, `false` by default */
4
4
  grow?: boolean;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
- export interface AppShellProps extends /* @vue-ignore */ BoxProps {
2
+ export interface AppShellProps extends BoxProps {
3
3
  /** AppShellNavbar collapsed state. Required if you use AppShellNavbar component. */
4
4
  navbar?: boolean;
5
5
  /** AppShellAside collapsed state. Required if you use AppShellAside component. */
@@ -15,7 +15,9 @@ const {
15
15
  header: { type: Boolean, required: false },
16
16
  footer: { type: Boolean, required: false },
17
17
  layout: { type: String, required: false },
18
- withBorder: { type: Boolean, required: false }
18
+ withBorder: { type: Boolean, required: false },
19
+ is: { type: null, required: false },
20
+ mod: { type: [Object, Array, null], required: false }
19
21
  });
20
22
  const style = computed(() => ({
21
23
  "--app-shell-navbar-transform": navbar ? "translateX(calc(-1 * var(--app-shell-navbar-width)))" : void 0,
@@ -1,5 +1,5 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
- export interface AppShellProps extends /* @vue-ignore */ BoxProps {
2
+ export interface AppShellProps extends BoxProps {
3
3
  /** AppShellNavbar collapsed state. Required if you use AppShellNavbar component. */
4
4
  navbar?: boolean;
5
5
  /** AppShellAside collapsed state. Required if you use AppShellAside component. */
@@ -1,6 +1,6 @@
1
1
  import type { NuanceRadius } from '@nui/types';
2
2
  import type { BoxProps } from './box.vue.js';
3
- export interface BackgroundImageProps extends /* @vue-ignore */ BoxProps {
3
+ export interface BackgroundImageProps extends BoxProps {
4
4
  radius?: NuanceRadius | string;
5
5
  /** Image url */
6
6
  src: string;
@@ -4,7 +4,9 @@ import { computed } from "vue";
4
4
  import Box from "./box.vue";
5
5
  const { radius, src, ...rest } = defineProps({
6
6
  radius: { type: [String, Number], required: false },
7
- src: { type: String, required: true }
7
+ src: { type: String, required: true },
8
+ is: { type: null, required: false },
9
+ mod: { type: [Object, Array, null], required: false }
8
10
  });
9
11
  const style = computed(() => ({
10
12
  "--bi-radius": radius ? getRadius(radius) : void 0,
@@ -1,6 +1,6 @@
1
1
  import type { NuanceRadius } from '@nui/types';
2
2
  import type { BoxProps } from './box.vue.js';
3
- export interface BackgroundImageProps extends /* @vue-ignore */ BoxProps {
3
+ export interface BackgroundImageProps extends BoxProps {
4
4
  radius?: NuanceRadius | string;
5
5
  /** Image url */
6
6
  src: string;
@@ -1,5 +1,5 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
- export interface ButtonGroupProps extends /* @vue-ignore */ BoxProps {
2
+ export interface ButtonGroupProps extends BoxProps {
3
3
  orientation?: 'horizontal' | 'vertical';
4
4
  }
5
5
  declare var __VLS_6: {};
@@ -2,7 +2,9 @@
2
2
  import Box from "../box.vue";
3
3
  import css from "./button.module.css";
4
4
  const { is, mod, orientation = "horizontal" } = defineProps({
5
- orientation: { type: String, required: false }
5
+ orientation: { type: String, required: false },
6
+ is: { type: null, required: false },
7
+ mod: { type: [Object, Array, null], required: false }
6
8
  });
7
9
  </script>
8
10
 
@@ -1,5 +1,5 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
- export interface ButtonGroupProps extends /* @vue-ignore */ BoxProps {
2
+ export interface ButtonGroupProps extends BoxProps {
3
3
  orientation?: 'horizontal' | 'vertical';
4
4
  }
5
5
  declare var __VLS_6: {};
@@ -1,7 +1,7 @@
1
1
  import type { NuanceColor, NuanceRadius, NuanceSize, UiKitGradient } from '@nui/types';
2
2
  import type { HTMLAttributes } from 'vue';
3
3
  import type { BoxProps } from '../box.vue.js';
4
- export interface ButtonProps extends /* @vue-ignore */ BoxProps {
4
+ export interface ButtonProps extends BoxProps {
5
5
  size?: NuanceSize | `compact-${NuanceSize}`;
6
6
  variant?: 'filled' | 'light' | 'outline' | 'subtle' | 'default' | 'gradient' | 'gradient-outline';
7
7
  gradient?: UiKitGradient;
@@ -30,7 +30,9 @@ const {
30
30
  leftSectionPE: { type: null, required: false },
31
31
  leftSectionProps: { type: Object, required: false },
32
32
  rightSectionPE: { type: null, required: false },
33
- rightSectionProps: { type: Object, required: false }
33
+ rightSectionProps: { type: Object, required: false },
34
+ is: { type: null, required: false },
35
+ mod: { type: [Object, Array, null], required: false }
34
36
  });
35
37
  const style = computed(() => useStyleResolver((theme) => {
36
38
  const {
@@ -1,7 +1,7 @@
1
1
  import type { NuanceColor, NuanceRadius, NuanceSize, UiKitGradient } from '@nui/types';
2
2
  import type { HTMLAttributes } from 'vue';
3
3
  import type { BoxProps } from '../box.vue.js';
4
- export interface ButtonProps extends /* @vue-ignore */ BoxProps {
4
+ export interface ButtonProps extends BoxProps {
5
5
  size?: NuanceSize | `compact-${NuanceSize}`;
6
6
  variant?: 'filled' | 'light' | 'outline' | 'subtle' | 'default' | 'gradient' | 'gradient-outline';
7
7
  gradient?: UiKitGradient;
@@ -1,11 +1,12 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
2
  import type { InputBaseProps } from '../input/index.js';
3
- type __VLS_Props = InputBaseProps & Omit<BoxProps, 'is'>;
3
+ interface UnstyledButtonProps extends InputBaseProps, BoxProps {
4
+ }
4
5
  declare var __VLS_6: {};
5
6
  type __VLS_Slots = {} & {
6
7
  default?: (props: typeof __VLS_6) => any;
7
8
  };
8
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_base: import("vue").DefineComponent<UnstyledButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<UnstyledButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
10
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
11
  declare const _default: typeof __VLS_export;
11
12
  export default _default;
@@ -1,14 +1,15 @@
1
1
  <script setup>
2
2
  import Box from "../box.vue";
3
- const props = defineProps({
3
+ const { is = "button", ...props } = defineProps({
4
4
  readonly: { type: Boolean, required: false },
5
5
  disabled: { type: Boolean, required: false },
6
+ is: { type: null, required: false },
6
7
  mod: { type: [Object, Array, null], required: false }
7
8
  });
8
9
  </script>
9
10
 
10
11
  <template>
11
- <Box is='button' v-bind='props' :class='$style.root' type='button'>
12
+ <Box :is v-bind='props' :class='$style.root' type='button'>
12
13
  <slot />
13
14
  </Box>
14
15
  </template>
@@ -1,11 +1,12 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
2
  import type { InputBaseProps } from '../input/index.js';
3
- type __VLS_Props = InputBaseProps & Omit<BoxProps, 'is'>;
3
+ interface UnstyledButtonProps extends InputBaseProps, BoxProps {
4
+ }
4
5
  declare var __VLS_6: {};
5
6
  type __VLS_Slots = {} & {
6
7
  default?: (props: typeof __VLS_6) => any;
7
8
  };
8
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_base: import("vue").DefineComponent<UnstyledButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<UnstyledButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
10
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
11
  declare const _default: typeof __VLS_export;
11
12
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
- export interface CardSectionProps extends /* @vue-ignore */ BoxProps {
2
+ export interface CardSectionProps extends BoxProps {
3
3
  withBorder?: boolean;
4
4
  /** Determines whether the section should inherit padding from the parent `UiCard`, `false` by default */
5
5
  inheritPadding?: boolean;
@@ -3,7 +3,9 @@ import Box from "../box.vue";
3
3
  import css from "./card.module.css";
4
4
  const { is = "section", mod, inheritPadding, withBorder } = defineProps({
5
5
  withBorder: { type: Boolean, required: false },
6
- inheritPadding: { type: Boolean, required: false }
6
+ inheritPadding: { type: Boolean, required: false },
7
+ is: { type: null, required: false },
8
+ mod: { type: [Object, Array, null], required: false }
7
9
  });
8
10
  </script>
9
11
 
@@ -1,5 +1,5 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
- export interface CardSectionProps extends /* @vue-ignore */ BoxProps {
2
+ export interface CardSectionProps extends BoxProps {
3
3
  withBorder?: boolean;
4
4
  /** Determines whether the section should inherit padding from the parent `UiCard`, `false` by default */
5
5
  inheritPadding?: boolean;
@@ -1,6 +1,6 @@
1
1
  import type { NuanceSpacing } from '@nui/types';
2
2
  import type { PaperProps } from '../paper.vue.js';
3
- export interface CardProps extends /* @vue-ignore */ PaperProps {
3
+ export interface CardProps extends PaperProps {
4
4
  padding?: NuanceSpacing;
5
5
  }
6
6
  declare var __VLS_6: {};
@@ -4,7 +4,12 @@ import { computed } from "vue";
4
4
  import Paper from "../paper.vue";
5
5
  import css from "./card.module.css";
6
6
  const { padding, is = "article", ...rest } = defineProps({
7
- padding: { type: [String, Number], required: false }
7
+ padding: { type: [String, Number], required: false },
8
+ shadow: { type: String, required: false },
9
+ radius: { type: [String, Number], required: false },
10
+ withBorder: { type: Boolean, required: false },
11
+ is: { type: null, required: false },
12
+ mod: { type: [Object, Array, null], required: false }
8
13
  });
9
14
  const style = computed(() => ({
10
15
  "--card-padding": getSpacing(padding)
@@ -1,6 +1,6 @@
1
1
  import type { NuanceSpacing } from '@nui/types';
2
2
  import type { PaperProps } from '../paper.vue.js';
3
- export interface CardProps extends /* @vue-ignore */ PaperProps {
3
+ export interface CardProps extends PaperProps {
4
4
  padding?: NuanceSpacing;
5
5
  }
6
6
  declare var __VLS_6: {};
@@ -1,6 +1,6 @@
1
1
  import type { NuanceSize } from '@nui/types';
2
2
  import type { InputWrapperProps } from '../input/index.js';
3
- export interface CheckboxGroupProps extends /* @vue-ignore */ Omit<InputWrapperProps, 'resize' | 'multiline' | 'id'> {
3
+ export interface CheckboxGroupProps extends Omit<InputWrapperProps, 'resize' | 'multiline' | 'id' | 'size'> {
4
4
  name: string;
5
5
  size?: NuanceSize;
6
6
  }
@@ -5,7 +5,15 @@ import VisuallyHiddenInput from "../visually-hidden/visually-hidden-input.vue";
5
5
  import { useProvideCheckboxGroup } from "./lib/group.context";
6
6
  const { size, name, ...rest } = defineProps({
7
7
  name: { type: String, required: true },
8
- size: { type: String, required: false }
8
+ size: { type: String, required: false },
9
+ error: { type: String, required: false },
10
+ description: { type: String, required: false },
11
+ label: { type: String, required: false },
12
+ required: { type: Boolean, required: false },
13
+ radius: { type: String, required: false },
14
+ variant: { type: String, required: false },
15
+ leftSectionPE: { type: null, required: false },
16
+ rightSectionPE: { type: null, required: false }
9
17
  });
10
18
  const value = defineModel({ type: Array, ...{ default: [] } });
11
19
  const id = useId();
@@ -1,6 +1,6 @@
1
1
  import type { NuanceSize } from '@nui/types';
2
2
  import type { InputWrapperProps } from '../input/index.js';
3
- export interface CheckboxGroupProps extends /* @vue-ignore */ Omit<InputWrapperProps, 'resize' | 'multiline' | 'id'> {
3
+ export interface CheckboxGroupProps extends Omit<InputWrapperProps, 'resize' | 'multiline' | 'id' | 'size'> {
4
4
  name: string;
5
5
  size?: NuanceSize;
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import type { NuanceColor, NuanceSize } from '@nui/types';
2
2
  import type { InlineInputProps } from '../input/index.js';
3
- export interface CheckboxProps extends /* @vue-ignore */ Omit<InlineInputProps, 'id'> {
3
+ export interface CheckboxProps extends Omit<InlineInputProps, 'id'> {
4
4
  color?: NuanceColor;
5
5
  iconColor?: NuanceColor;
6
6
  variant?: 'filled' | 'outline';
@@ -21,7 +21,14 @@ const {
21
21
  radius: { type: String, required: false },
22
22
  size: { type: String, required: false },
23
23
  indeterminate: { type: Boolean, required: false },
24
- value: { type: String, required: false }
24
+ value: { type: String, required: false },
25
+ label: { type: String, required: false },
26
+ description: { type: String, required: false },
27
+ error: { type: String, required: false },
28
+ disabled: { type: Boolean, required: false, skipCheck: true },
29
+ labelPosition: { type: String, required: false },
30
+ is: { type: null, required: false },
31
+ mod: { type: [Object, Array, null], required: false }
25
32
  });
26
33
  const id = useId();
27
34
  const modelValue = defineModel({ type: Boolean });
@@ -54,7 +61,7 @@ const style = computed(() => useStyleResolver((theme) => {
54
61
  type='checkbox'
55
62
  :class='$style.input'
56
63
  :disabled='rest.disabled'
57
- @click='value ? ctx?.onUpdate?.(value) ?? toggle() : toggle()'
64
+ @change='() => value && ctx ? ctx.onUpdate(value) : toggle()'
58
65
  >
59
66
 
60
67
  <slot name='icon' :indeterminate='indeterminate' :class='$style.icon'>
@@ -92,6 +99,8 @@ const style = computed(() => useStyleResolver((theme) => {
92
99
  }
93
100
 
94
101
  .input {
102
+ cursor: pointer;
103
+
95
104
  display: block;
96
105
 
97
106
  width: var(--checkbox-size);
@@ -1,6 +1,6 @@
1
1
  import type { NuanceColor, NuanceSize } from '@nui/types';
2
2
  import type { InlineInputProps } from '../input/index.js';
3
- export interface CheckboxProps extends /* @vue-ignore */ Omit<InlineInputProps, 'id'> {
3
+ export interface CheckboxProps extends Omit<InlineInputProps, 'id'> {
4
4
  color?: NuanceColor;
5
5
  iconColor?: NuanceColor;
6
6
  variant?: 'filled' | 'outline';
@@ -4,4 +4,4 @@ export interface CheckboxCardState {
4
4
  onUpdate: () => void;
5
5
  }
6
6
  export declare const useProvideCheckboxCard: (props: CheckboxCardState) => CheckboxCardState;
7
- export declare const useCheckboxCardState: () => CheckboxCardState;
7
+ export declare const useCheckboxCardState: () => CheckboxCardState | undefined;
@@ -1,8 +1,7 @@
1
- import { createStrictInjection } from "@nui/helpers";
1
+ import { createInjectionState } from "@vueuse/core";
2
2
  const injectionKey = Symbol("CheckboxCard");
3
- const [useProvide, useState] = createStrictInjection((props) => props, {
4
- injectionKey,
5
- name: "CheckboxCard"
3
+ const [useProvide, useState] = createInjectionState((props) => props, {
4
+ injectionKey
6
5
  });
7
6
  export const useProvideCheckboxCard = useProvide;
8
7
  export const useCheckboxCardState = useState;
@@ -13,4 +13,4 @@ export declare const useCheckboxGroupState: () => {
13
13
  value: ModelRef<string[]>;
14
14
  size: NuanceSize | undefined;
15
15
  onUpdate: (newValue: string) => number | string[];
16
- };
16
+ } | undefined;
@@ -1,6 +1,6 @@
1
- import { createStrictInjection } from "@nui/helpers";
1
+ import { createInjectionState } from "@vueuse/core";
2
2
  const injectionKey = Symbol("CheckboxGroup");
3
- const [useProvide, useState] = createStrictInjection(({ value, size }) => {
3
+ const [useProvide, useState] = createInjectionState(({ value, size }) => {
4
4
  const onUpdate = (newValue) => {
5
5
  if (value.value.includes(newValue))
6
6
  return value.value = value.value.filter((i) => i !== newValue);
@@ -8,8 +8,7 @@ const [useProvide, useState] = createStrictInjection(({ value, size }) => {
8
8
  };
9
9
  return { value, size, onUpdate };
10
10
  }, {
11
- injectionKey,
12
- name: "CheckboxGroup"
11
+ injectionKey
13
12
  });
14
13
  export const useProvideCheckboxGroup = useProvide;
15
14
  export const useCheckboxGroupState = useState;
@@ -5,7 +5,7 @@ import { computed, useId } from "vue";
5
5
  import Box from "../box.vue";
6
6
  import { useChipGroupState, useChipState } from "./lib";
7
7
  const {
8
- id: _id,
8
+ id: uid,
9
9
  color,
10
10
  size = "sm",
11
11
  radius = "xl",
@@ -27,7 +27,7 @@ const {
27
27
  hideIcon: { type: Boolean, required: false },
28
28
  disabled: { type: Boolean, required: false }
29
29
  });
30
- const id = _id || useId();
30
+ const id = uid || useId();
31
31
  const modelValue = defineModel({ type: Boolean, ...{ default: false } });
32
32
  const ctx = useChipGroupState();
33
33
  const { checked, onUpdate } = useChipState(ctx, modelValue, value);
@@ -1,5 +1,5 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
- export interface ComboboxEmptyProps extends /* @vue-ignore */ Omit<BoxProps, 'is'> {
2
+ export interface ComboboxEmptyProps extends BoxProps {
3
3
  }
4
4
  declare var __VLS_6: {};
5
5
  type __VLS_Slots = {} & {
@@ -1,11 +1,14 @@
1
1
  <script setup>
2
2
  import Box from "../box.vue";
3
3
  import css from "./combobox.module.css";
4
- const { mod } = defineProps({});
4
+ const { is, mod } = defineProps({
5
+ is: { type: null, required: false },
6
+ mod: { type: [Object, Array, null], required: false }
7
+ });
5
8
  </script>
6
9
 
7
10
  <template>
8
- <Box :mod :class='css.empty'>
11
+ <Box :is :mod :class='css.empty'>
9
12
  <slot />
10
13
  </Box>
11
14
  </template>
@@ -1,5 +1,5 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
- export interface ComboboxEmptyProps extends /* @vue-ignore */ Omit<BoxProps, 'is'> {
2
+ export interface ComboboxEmptyProps extends BoxProps {
3
3
  }
4
4
  declare var __VLS_6: {};
5
5
  type __VLS_Slots = {} & {
@@ -1,6 +1,6 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
2
  import type { ComboboxItem, ComboboxItemExt, ComboboxItemGroup, ComboboxItemProps } from './types/index.js';
3
- export interface ComboboxGroupProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends /* @vue-ignore */ Omit<BoxProps, 'is'>, ComboboxItemProps {
3
+ export interface ComboboxGroupProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends BoxProps, ComboboxItemProps {
4
4
  /** Group label */
5
5
  label?: string;
6
6
  data: ComboboxItemGroup<Value, Ext>;
@@ -14,6 +14,8 @@ const {
14
14
  } = defineProps({
15
15
  label: { type: String, required: false },
16
16
  data: { type: Object, required: true },
17
+ is: { type: null, required: false },
18
+ mod: { type: [Object, Array, null], required: false },
17
19
  withCheckIcon: { type: Boolean, required: false },
18
20
  checkIcon: { type: String, required: false },
19
21
  iconPosition: { type: String, required: false }
@@ -1,6 +1,6 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
2
  import type { ComboboxItem, ComboboxItemExt, ComboboxItemGroup, ComboboxItemProps } from './types/index.js';
3
- export interface ComboboxGroupProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends /* @vue-ignore */ Omit<BoxProps, 'is'>, ComboboxItemProps {
3
+ export interface ComboboxGroupProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends BoxProps, ComboboxItemProps {
4
4
  /** Group label */
5
5
  label?: string;
6
6
  data: ComboboxItemGroup<Value, Ext>;
@@ -1,5 +1,5 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
- export interface ComboboxOptionListProps extends /* @vue-ignore */ Omit<BoxProps, 'is'> {
2
+ export interface ComboboxOptionListProps extends BoxProps {
3
3
  /** Id of the element that labels the options list */
4
4
  labelledBy?: string;
5
5
  }
@@ -2,7 +2,9 @@
2
2
  import Box from "../box.vue";
3
3
  import css from "./combobox.module.css";
4
4
  const { labelledBy, mod } = defineProps({
5
- labelledBy: { type: String, required: false }
5
+ labelledBy: { type: String, required: false },
6
+ is: { type: null, required: false },
7
+ mod: { type: [Object, Array, null], required: false }
6
8
  });
7
9
  </script>
8
10
 
@@ -1,5 +1,5 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
- export interface ComboboxOptionListProps extends /* @vue-ignore */ Omit<BoxProps, 'is'> {
2
+ export interface ComboboxOptionListProps extends BoxProps {
3
3
  /** Id of the element that labels the options list */
4
4
  labelledBy?: string;
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import type { BoxProps } from '../box.vue.js';
2
2
  import type { ComboboxItem, ComboboxItemExt, ComboboxItemProps } from './types/index.js';
3
- export interface ComboboxOptionProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends /* @vue-ignore */ Omit<BoxProps, 'is'>, ComboboxItemProps {
3
+ export interface ComboboxOptionProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends BoxProps, ComboboxItemProps {
4
4
  data: ComboboxItem<Value, Ext>;
5
5
  checked: boolean;
6
6
  selected?: boolean;
@@ -16,6 +16,8 @@ const {
16
16
  data: { type: Object, required: true },
17
17
  checked: { type: Boolean, required: true },
18
18
  selected: { type: Boolean, required: false },
19
+ is: { type: null, required: false },
20
+ mod: { type: [Object, Array, null], required: false },
19
21
  withCheckIcon: { type: Boolean, required: false },
20
22
  checkIcon: { type: String, required: false },
21
23
  iconPosition: { type: String, required: false }