orio-ui 1.17.0 → 1.18.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 (51) hide show
  1. package/README.md +6 -6
  2. package/dist/module.json +1 -1
  3. package/dist/runtime/components/Badge.d.vue.ts +2 -0
  4. package/dist/runtime/components/Badge.vue +13 -4
  5. package/dist/runtime/components/Badge.vue.d.ts +2 -0
  6. package/dist/runtime/components/Button.d.vue.ts +2 -1
  7. package/dist/runtime/components/Button.vue +11 -5
  8. package/dist/runtime/components/Button.vue.d.ts +2 -1
  9. package/dist/runtime/components/CheckBox.d.vue.ts +2 -1
  10. package/dist/runtime/components/CheckBox.vue +11 -3
  11. package/dist/runtime/components/CheckBox.vue.d.ts +2 -1
  12. package/dist/runtime/components/ControlElement.vue +6 -2
  13. package/dist/runtime/components/Icon.d.vue.ts +0 -1
  14. package/dist/runtime/components/Icon.vue +7 -14
  15. package/dist/runtime/components/Icon.vue.d.ts +0 -1
  16. package/dist/runtime/components/Input.d.vue.ts +2 -2
  17. package/dist/runtime/components/Input.vue +9 -4
  18. package/dist/runtime/components/Input.vue.d.ts +2 -2
  19. package/dist/runtime/components/NavButton.d.vue.ts +2 -1
  20. package/dist/runtime/components/NavButton.vue +11 -5
  21. package/dist/runtime/components/NavButton.vue.d.ts +2 -1
  22. package/dist/runtime/components/NumberInput/Horizontal.d.vue.ts +1 -1
  23. package/dist/runtime/components/NumberInput/Horizontal.vue +7 -1
  24. package/dist/runtime/components/NumberInput/Horizontal.vue.d.ts +1 -1
  25. package/dist/runtime/components/NumberInput/Vertical.d.vue.ts +1 -1
  26. package/dist/runtime/components/NumberInput/Vertical.vue +7 -1
  27. package/dist/runtime/components/NumberInput/Vertical.vue.d.ts +1 -1
  28. package/dist/runtime/components/NumberInput/index.d.vue.ts +3 -2
  29. package/dist/runtime/components/NumberInput/index.vue +23 -3
  30. package/dist/runtime/components/NumberInput/index.vue.d.ts +3 -2
  31. package/dist/runtime/components/Popover.d.vue.ts +22 -51
  32. package/dist/runtime/components/Popover.vue +37 -65
  33. package/dist/runtime/components/Popover.vue.d.ts +22 -51
  34. package/dist/runtime/components/RadioButton.d.vue.ts +3 -2
  35. package/dist/runtime/components/RadioButton.vue +12 -5
  36. package/dist/runtime/components/RadioButton.vue.d.ts +3 -2
  37. package/dist/runtime/components/Selector.d.vue.ts +3 -2
  38. package/dist/runtime/components/Selector.vue +68 -10
  39. package/dist/runtime/components/Selector.vue.d.ts +3 -2
  40. package/dist/runtime/components/SwitchButton.d.vue.ts +2 -1
  41. package/dist/runtime/components/SwitchButton.vue +10 -2
  42. package/dist/runtime/components/SwitchButton.vue.d.ts +2 -1
  43. package/dist/runtime/components/Textarea.d.vue.ts +2 -1
  44. package/dist/runtime/components/Textarea.vue +10 -7
  45. package/dist/runtime/components/Textarea.vue.d.ts +2 -1
  46. package/dist/runtime/components/gallery/Carousel.vue +1 -1
  47. package/dist/runtime/components/view/Text.d.vue.ts +1 -1
  48. package/dist/runtime/components/view/Text.vue.d.ts +1 -1
  49. package/dist/runtime/composables/useListKeyboard.d.ts +19 -0
  50. package/dist/runtime/composables/useListKeyboard.js +59 -0
  51. package/package.json +4 -2
package/README.md CHANGED
@@ -8,12 +8,12 @@ A delightful, lightweight component library for Nuxt 3+ applications. Built with
8
8
 
9
9
  ## Features
10
10
 
11
- ✨ **26 Components** - Beautiful, accessible components ready to use
11
+ ✨ **31 Components** - Beautiful, accessible components ready to use
12
12
  🎨 **Themeable** - 5 built-in accent themes with light/dark mode support
13
13
  🚀 **Auto-imported** - Works seamlessly with Nuxt's auto-import system
14
14
  📦 **Tree-shakeable** - Only bundle what you use
15
15
  🎯 **TypeScript** - Fully typed for great developer experience
16
- 🧪 **Tested** - 240+ unit tests for reliability
16
+ 🧪 **Tested** - 29 test suites for reliability
17
17
  📱 **Responsive** - Mobile-first design approach
18
18
  ♿ **Accessible** - ARIA-compliant components
19
19
 
@@ -66,7 +66,7 @@ function handleClick() {
66
66
 
67
67
  ## What's Included
68
68
 
69
- ### Components (26)
69
+ ### Components (31)
70
70
 
71
71
  #### Form Controls
72
72
 
@@ -112,7 +112,7 @@ function handleClick() {
112
112
 
113
113
  - **Upload** - File upload component
114
114
 
115
- ### Composables (8)
115
+ ### Composables (10)
116
116
 
117
117
  - **useTheme** - Theme and color mode management
118
118
  - **useModal** - Modal state with animation origin tracking
@@ -187,8 +187,8 @@ npm run docs:dev
187
187
  orio-ui/
188
188
  ├── src/
189
189
  │ ├── runtime/
190
- │ │ ├── components/ # 26 Vue components
191
- │ │ ├── composables/ # 8 composables
190
+ │ │ ├── components/ # 31 Vue components
191
+ │ │ ├── composables/ # 10 composables
192
192
  │ │ ├── assets/css/ # Theme CSS files
193
193
  │ │ └── utils/ # Icon registry
194
194
  │ └── module.ts # Nuxt Module definition
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0 || ^4.0.0"
6
6
  },
7
- "version": "1.17.0",
7
+ "version": "1.18.1",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
@@ -2,6 +2,7 @@ export type BadgeVariant = "danger" | "alert" | "primary" | "grey";
2
2
  interface Props {
3
3
  variant?: BadgeVariant;
4
4
  pill?: boolean;
5
+ hidden?: boolean;
5
6
  }
6
7
  declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
7
8
  type __VLS_Slots = {} & {
@@ -14,6 +15,7 @@ type __VLS_Slots = {} & {
14
15
  declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
15
16
  variant: BadgeVariant;
16
17
  pill: boolean;
18
+ hidden: boolean;
17
19
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
20
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
21
  declare const _default: typeof __VLS_export;
@@ -2,7 +2,8 @@
2
2
  import { useSlots, computed } from "vue";
3
3
  const props = defineProps({
4
4
  variant: { type: String, required: false, default: "primary" },
5
- pill: { type: Boolean, required: false, default: false }
5
+ pill: { type: Boolean, required: false, default: false },
6
+ hidden: { type: Boolean, required: false, default: false }
6
7
  });
7
8
  const slots = useSlots();
8
9
  const hasWrapping = computed(() => !!slots.wrapping);
@@ -13,15 +14,23 @@ const isDot = computed(() => !hasDefaultContent.value);
13
14
  <template>
14
15
  <div v-if="hasWrapping" class="badge-wrapper">
15
16
  <slot name="wrapping" />
16
- <span class="badge positioned" :class="[variant, { pill, dot: isDot }]">
17
+ <span
18
+ v-if="!hidden"
19
+ class="badge positioned"
20
+ :class="[variant, { pill, dot: isDot }]"
21
+ >
17
22
  <slot />
18
23
  </span>
19
24
  </div>
20
- <span v-else class="badge" :class="[variant, { pill, dot: isDot }]">
25
+ <span
26
+ v-else-if="!hidden"
27
+ class="badge"
28
+ :class="[variant, { pill, dot: isDot }]"
29
+ >
21
30
  <slot />
22
31
  </span>
23
32
  </template>
24
33
 
25
34
  <style scoped>
26
- .badge-wrapper{display:inline-flex;position:relative}.badge{align-items:center;border:1px solid transparent;border-radius:var(--border-radius-sm);display:inline-flex;font-size:var(--font-sm);font-weight:600;justify-content:center;padding:.125rem .35rem;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.badge.positioned{position:absolute;right:.5rem;top:.5rem;transform:translate(50%,-50%)}.badge.pill{border-radius:var(--border-radius-pill)}.badge.dot{border-radius:50%;height:.5rem;min-height:.5rem;min-width:.5rem;padding:0;width:.5rem}.badge.primary{background-color:var(--color-accent);border-color:var(--color-accent);color:var(--color-accent-ink)}.badge.danger{background-color:var(--color-danger);border-color:var(--color-danger);color:var(--color-danger-ink)}.badge.alert{background-color:var(--color-alert);border-color:var(--color-alert);color:var(--color-alert-ink)}.badge.grey{background-color:var(--color-surface);border-color:var(--color-border);color:var(--color-muted)}
35
+ .badge-wrapper{display:inline-flex;position:relative}.badge{align-items:center;border:1px solid transparent;border-radius:var(--border-radius-sm);display:inline-flex;font-size:var(--font-sm);font-weight:600;justify-content:center;padding:.125rem .35rem;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.badge.positioned{position:absolute;right:15%;top:15%;transform:translate(50%,-50%)}.badge.pill{border-radius:var(--border-radius-pill)}.badge.dot{border-radius:50%;height:.5rem;min-height:.5rem;min-width:.5rem;padding:0;width:.5rem}.badge.primary{background-color:var(--color-accent);border-color:var(--color-accent);color:var(--color-accent-ink)}.badge.danger{background-color:var(--color-danger);border-color:var(--color-danger);color:var(--color-danger-ink)}.badge.alert{background-color:var(--color-alert);border-color:var(--color-alert);color:var(--color-alert-ink)}.badge.grey{background-color:var(--color-surface);border-color:var(--color-border);color:var(--color-muted)}
27
36
  </style>
@@ -2,6 +2,7 @@ export type BadgeVariant = "danger" | "alert" | "primary" | "grey";
2
2
  interface Props {
3
3
  variant?: BadgeVariant;
4
4
  pill?: boolean;
5
+ hidden?: boolean;
5
6
  }
6
7
  declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
7
8
  type __VLS_Slots = {} & {
@@ -14,6 +15,7 @@ type __VLS_Slots = {} & {
14
15
  declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
15
16
  variant: BadgeVariant;
16
17
  pill: boolean;
18
+ hidden: boolean;
17
19
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
20
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
21
  declare const _default: typeof __VLS_export;
@@ -1,4 +1,5 @@
1
- interface Props {
1
+ import type { ControlProps } from "./ControlElement.vue.js";
2
+ interface Props extends ControlProps {
2
3
  variant?: "primary" | "secondary" | "subdued";
3
4
  icon?: string;
4
5
  loading?: boolean;
@@ -1,13 +1,19 @@
1
1
  <script setup>
2
- import { computed, toRefs, useAttrs, useSlots } from "vue";
2
+ import { computed, toRefs, useSlots } from "vue";
3
3
  const props = defineProps({
4
4
  variant: { type: String, required: false, default: "primary" },
5
5
  icon: { type: String, required: false },
6
6
  loading: { type: Boolean, required: false },
7
- disabled: { type: Boolean, required: false }
7
+ disabled: { type: Boolean, required: false },
8
+ appearance: { type: String, required: false },
9
+ error: { type: [String, null], required: false },
10
+ group: { type: Boolean, required: false },
11
+ id: { type: String, required: false },
12
+ label: { type: String, required: false },
13
+ layout: { type: String, required: false },
14
+ size: { type: String, required: false }
8
15
  });
9
16
  const { loading, disabled } = toRefs(props);
10
- const attrs = useAttrs();
11
17
  const slots = useSlots();
12
18
  const isIconOnly = computed(() => {
13
19
  const hasIcon = !!props.icon || !!slots.icon;
@@ -32,9 +38,9 @@ function onMouseleave(event) {
32
38
  </script>
33
39
 
34
40
  <template>
35
- <orio-control-element>
41
+ <orio-control-element v-bind="props">
36
42
  <button
37
- v-bind="attrs"
43
+ v-bind="$attrs"
38
44
  :class="[variant, 'gradient-hover', { 'icon-only': isIconOnly }]"
39
45
  :disabled
40
46
  @click="click"
@@ -1,4 +1,5 @@
1
- interface Props {
1
+ import type { ControlProps } from "./ControlElement.vue.js";
2
+ interface Props extends ControlProps {
2
3
  variant?: "primary" | "secondary" | "subdued";
3
4
  icon?: string;
4
5
  loading?: boolean;
@@ -1,4 +1,5 @@
1
- export interface CheckBoxProps {
1
+ import type { ControlProps } from "./ControlElement.vue.js";
2
+ export interface CheckBoxProps extends ControlProps {
2
3
  checkedIcon?: string;
3
4
  uncheckedIcon?: string;
4
5
  }
@@ -1,19 +1,27 @@
1
1
  <script setup>
2
2
  const modelValue = defineModel({ type: Boolean, ...{ required: false } });
3
- defineProps({
3
+ const props = defineProps({
4
4
  checkedIcon: { type: String, required: false },
5
- uncheckedIcon: { type: String, required: false }
5
+ uncheckedIcon: { type: String, required: false },
6
+ appearance: { type: String, required: false },
7
+ error: { type: [String, null], required: false },
8
+ group: { type: Boolean, required: false },
9
+ id: { type: String, required: false },
10
+ label: { type: String, required: false },
11
+ layout: { type: String, required: false },
12
+ size: { type: String, required: false }
6
13
  });
7
14
  </script>
8
15
 
9
16
  <template>
10
- <orio-control-element class="checkbox">
17
+ <orio-control-element v-bind="props" class="checkbox">
11
18
  <label class="checkbox-label">
12
19
  <input
13
20
  v-model="modelValue"
14
21
  type="checkbox"
15
22
  class="checkbox-input"
16
23
  tabindex="-1"
24
+ v-bind="$attrs"
17
25
  />
18
26
  <span
19
27
  class="checkbox-box"
@@ -1,4 +1,5 @@
1
- export interface CheckBoxProps {
1
+ import type { ControlProps } from "./ControlElement.vue.js";
2
+ export interface CheckBoxProps extends ControlProps {
2
3
  checkedIcon?: string;
3
4
  uncheckedIcon?: string;
4
5
  }
@@ -1,5 +1,6 @@
1
1
  <script setup>
2
2
  import { useId } from "vue";
3
+ defineOptions({ inheritAttrs: false });
3
4
  const props = defineProps({
4
5
  appearance: { type: String, required: false, default: "normal" },
5
6
  error: { type: [String, null], required: false, default: null },
@@ -15,7 +16,10 @@ const props = defineProps({
15
16
  <div
16
17
  class="control"
17
18
  :class="[appearance, layout, `size-${size}`, { 'has-error': error, group }]"
18
- v-bind="group ? { role: 'group', 'aria-labelledby': id } : {}"
19
+ v-bind="{
20
+ ...$attrs,
21
+ ...group ? { role: 'group', ...label ? { 'aria-labelledby': id } : {} } : {}
22
+ }"
19
23
  >
20
24
  <component
21
25
  :is="group ? 'span' : 'label'"
@@ -26,7 +30,7 @@ const props = defineProps({
26
30
  {{ label }}
27
31
  </component>
28
32
  <div class="control-group">
29
- <div class="slot-wrapper" v-bind="$attrs">
33
+ <div class="slot-wrapper">
30
34
  <slot :id />
31
35
  </div>
32
36
  <span v-if="error" class="control-error">{{ error }}</span>
@@ -6,7 +6,6 @@ export interface IconProps {
6
6
  }
7
7
  declare const __VLS_export: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {
8
8
  color: string;
9
- size: string | number;
10
9
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
10
  declare const _default: typeof __VLS_export;
12
11
  export default _default;
@@ -3,31 +3,24 @@ import { computed } from "vue";
3
3
  import { iconRegistry } from "../utils/icon-registry";
4
4
  const props = defineProps({
5
5
  name: { type: null, required: true },
6
- size: { type: [String, Number], required: false, default: "1em" },
6
+ size: { type: [String, Number], required: false },
7
7
  color: { type: String, required: false, default: "currentColor" }
8
8
  });
9
9
  const iconSvg = computed(() => iconRegistry[props.name] || "");
10
- const sizeValue = computed(
11
- () => typeof props.size === "number" ? `${props.size}px` : props.size
12
- );
10
+ const sizeValue = computed(() => {
11
+ if (props.size == null) return void 0;
12
+ return typeof props.size === "number" ? `${props.size}px` : props.size;
13
+ });
13
14
  </script>
14
15
 
15
16
  <template>
16
17
  <span
17
18
  class="orio-icon"
18
- :style="{
19
- width: sizeValue,
20
- height: sizeValue,
21
- color,
22
- display: 'inline-flex',
23
- alignItems: 'center',
24
- justifyContent: 'center',
25
- flexShrink: 0
26
- }"
19
+ :style="{ color, width: sizeValue, height: sizeValue }"
27
20
  v-html="iconSvg"
28
21
  />
29
22
  </template>
30
23
 
31
24
  <style scoped>
32
- .orio-icon{align-items:center;display:inline-flex;flex-shrink:0;justify-content:center}.orio-icon :deep(svg){fill:currentColor;height:100%;width:100%}
25
+ .orio-icon{align-items:center;display:inline-flex;flex-shrink:0;height:var(--control-icon-size,1.5em);justify-content:center;width:var(--control-icon-size,1.5em)}.orio-icon :deep(svg){fill:currentColor;height:100%;width:100%}
33
26
  </style>
@@ -6,7 +6,6 @@ export interface IconProps {
6
6
  }
7
7
  declare const __VLS_export: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {
8
8
  color: string;
9
- size: string | number;
10
9
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
10
  declare const _default: typeof __VLS_export;
12
11
  export default _default;
@@ -1,6 +1,6 @@
1
- import type { ControlLayout } from "./ControlElement.vue.js";
1
+ import type { ControlLayout, ControlProps } from "./ControlElement.vue.js";
2
2
  export type InputLayout = ControlLayout | "inner";
3
- interface Props {
3
+ interface Props extends Omit<ControlProps, "layout"> {
4
4
  layout?: InputLayout;
5
5
  }
6
6
  type __VLS_Props = Props;
@@ -1,6 +1,12 @@
1
1
  <script setup>
2
- defineProps({
3
- layout: { type: String, required: false, default: "vertical" }
2
+ const props = defineProps({
3
+ layout: { type: String, required: false, default: "vertical" },
4
+ appearance: { type: String, required: false },
5
+ error: { type: [String, null], required: false },
6
+ group: { type: Boolean, required: false },
7
+ id: { type: String, required: false },
8
+ label: { type: String, required: false },
9
+ size: { type: String, required: false }
4
10
  });
5
11
  const modelValue = defineModel({ type: String, ...{ default: "" } });
6
12
  </script>
@@ -8,7 +14,7 @@ const modelValue = defineModel({ type: String, ...{ default: "" } });
8
14
  <template>
9
15
  <orio-control-element
10
16
  v-slot="{ id }"
11
- v-bind="$attrs"
17
+ v-bind="props"
12
18
  :layout="layout === 'inner' ? 'vertical' : layout"
13
19
  :class="{ inner: layout === 'inner' }"
14
20
  >
@@ -66,7 +72,6 @@ input {
66
72
  .inner :deep(.control-label) {
67
73
  position: absolute;
68
74
  z-index: 1;
69
- pointer-events: none;
70
75
  left: var(--control-px);
71
76
  top: var(--control-label-block-start);
72
77
  color: var(--color-muted);
@@ -1,6 +1,6 @@
1
- import type { ControlLayout } from "./ControlElement.vue.js";
1
+ import type { ControlLayout, ControlProps } from "./ControlElement.vue.js";
2
2
  export type InputLayout = ControlLayout | "inner";
3
- interface Props {
3
+ interface Props extends Omit<ControlProps, "layout"> {
4
4
  layout?: InputLayout;
5
5
  }
6
6
  type __VLS_Props = Props;
@@ -1,4 +1,5 @@
1
- interface Props {
1
+ import type { ControlProps } from "./ControlElement.vue.js";
2
+ interface Props extends ControlProps {
2
3
  icon?: string;
3
4
  disabled?: boolean;
4
5
  active?: boolean;
@@ -1,12 +1,18 @@
1
1
  <script setup>
2
- import { computed, toRefs, useAttrs, useSlots } from "vue";
2
+ import { computed, toRefs, useSlots } from "vue";
3
3
  const props = defineProps({
4
4
  icon: { type: String, required: false },
5
5
  disabled: { type: Boolean, required: false },
6
- active: { type: Boolean, required: false, default: false }
6
+ active: { type: Boolean, required: false, default: false },
7
+ appearance: { type: String, required: false },
8
+ error: { type: [String, null], required: false },
9
+ group: { type: Boolean, required: false },
10
+ id: { type: String, required: false },
11
+ label: { type: String, required: false },
12
+ layout: { type: String, required: false },
13
+ size: { type: String, required: false }
7
14
  });
8
15
  const { disabled, active } = toRefs(props);
9
- const attrs = useAttrs();
10
16
  const slots = useSlots();
11
17
  const isIconOnly = computed(() => {
12
18
  const hasIcon = !!props.icon || !!slots.icon;
@@ -21,9 +27,9 @@ function click(event) {
21
27
  </script>
22
28
 
23
29
  <template>
24
- <orio-control-element>
30
+ <orio-control-element v-bind="props">
25
31
  <button
26
- v-bind="attrs"
32
+ v-bind="$attrs"
27
33
  :class="{ 'icon-only': isIconOnly, active }"
28
34
  :disabled
29
35
  :aria-current="active ? 'page' : void 0"
@@ -1,4 +1,5 @@
1
- interface Props {
1
+ import type { ControlProps } from "./ControlElement.vue.js";
2
+ interface Props extends ControlProps {
2
3
  icon?: string;
3
4
  disabled?: boolean;
4
5
  active?: boolean;
@@ -9,8 +9,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
9
9
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
10
10
  "onUpdate:modelValue"?: ((value: number) => any) | undefined;
11
11
  }>, {
12
- disabled: boolean;
13
12
  layout: import("../Input.vue.js").InputLayout;
13
+ disabled: boolean;
14
14
  step: number;
15
15
  min: number;
16
16
  max: number;
@@ -6,7 +6,13 @@ defineProps({
6
6
  max: { type: Number, required: false, default: void 0 },
7
7
  step: { type: Number, required: false, default: 1 },
8
8
  decimalPlaces: { type: Number, required: false, default: 0 },
9
- disabled: { type: Boolean, required: false, default: false }
9
+ disabled: { type: Boolean, required: false, default: false },
10
+ appearance: { type: String, required: false },
11
+ error: { type: [String, null], required: false },
12
+ group: { type: Boolean, required: false },
13
+ id: { type: String, required: false },
14
+ label: { type: String, required: false },
15
+ size: { type: String, required: false }
10
16
  });
11
17
  const modelValue = defineModel({ type: Number, ...{ default: 0 } });
12
18
  const { pressAndHold, stop } = usePressAndHold();
@@ -9,8 +9,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
9
9
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
10
10
  "onUpdate:modelValue"?: ((value: number) => any) | undefined;
11
11
  }>, {
12
- disabled: boolean;
13
12
  layout: import("../Input.vue.js").InputLayout;
13
+ disabled: boolean;
14
14
  step: number;
15
15
  min: number;
16
16
  max: number;
@@ -9,8 +9,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
9
9
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
10
10
  "onUpdate:modelValue"?: ((value: number) => any) | undefined;
11
11
  }>, {
12
- disabled: boolean;
13
12
  layout: import("../Input.vue.js").InputLayout;
13
+ disabled: boolean;
14
14
  step: number;
15
15
  min: number;
16
16
  max: number;
@@ -6,7 +6,13 @@ defineProps({
6
6
  max: { type: Number, required: false, default: void 0 },
7
7
  step: { type: Number, required: false, default: 1 },
8
8
  decimalPlaces: { type: Number, required: false, default: 0 },
9
- disabled: { type: Boolean, required: false, default: false }
9
+ disabled: { type: Boolean, required: false, default: false },
10
+ appearance: { type: String, required: false },
11
+ error: { type: [String, null], required: false },
12
+ group: { type: Boolean, required: false },
13
+ id: { type: String, required: false },
14
+ label: { type: String, required: false },
15
+ size: { type: String, required: false }
10
16
  });
11
17
  const modelValue = defineModel({ type: Number, ...{ default: 0 } });
12
18
  const { pressAndHold, stop } = usePressAndHold();
@@ -9,8 +9,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
9
9
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
10
10
  "onUpdate:modelValue"?: ((value: number) => any) | undefined;
11
11
  }>, {
12
- disabled: boolean;
13
12
  layout: import("../Input.vue.js").InputLayout;
13
+ disabled: boolean;
14
14
  step: number;
15
15
  min: number;
16
16
  max: number;
@@ -1,5 +1,6 @@
1
+ import type { ControlProps } from "../ControlElement.vue.js";
1
2
  import type { InputLayout } from "../Input.vue.js";
2
- export interface NumberInputProps {
3
+ export interface NumberInputProps extends Omit<ControlProps, "layout"> {
3
4
  layout?: InputLayout;
4
5
  min?: number;
5
6
  max?: number;
@@ -28,8 +29,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
28
29
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
29
30
  "onUpdate:modelValue"?: ((value: number) => any) | undefined;
30
31
  }>, {
31
- disabled: boolean;
32
32
  layout: InputLayout;
33
+ disabled: boolean;
33
34
  step: number;
34
35
  min: number;
35
36
  max: number;
@@ -6,7 +6,13 @@ const props = defineProps({
6
6
  max: { type: Number, required: false, default: void 0 },
7
7
  step: { type: Number, required: false, default: 1 },
8
8
  decimalPlaces: { type: Number, required: false, default: 0 },
9
- disabled: { type: Boolean, required: false, default: false }
9
+ disabled: { type: Boolean, required: false, default: false },
10
+ appearance: { type: String, required: false },
11
+ error: { type: [String, null], required: false },
12
+ group: { type: Boolean, required: false },
13
+ id: { type: String, required: false },
14
+ label: { type: String, required: false },
15
+ size: { type: String, required: false }
10
16
  });
11
17
  const { min, max, step, decimalPlaces } = toRefs(props);
12
18
  const modelValue = defineModel({ type: Number, ...{ default: 0 } });
@@ -36,6 +42,17 @@ const isAtMax = computed(
36
42
  const isAtMin = computed(
37
43
  () => Number.isFinite(min.value) && modelValue.value <= min.value
38
44
  );
45
+ const controlProps = computed(() => {
46
+ const {
47
+ min: _min,
48
+ max: _max,
49
+ step: _step,
50
+ decimalPlaces: _decimalPlaces,
51
+ disabled: _disabled,
52
+ ...rest
53
+ } = props;
54
+ return rest;
55
+ });
39
56
  const slotExpose = computed(() => ({
40
57
  increase,
41
58
  decrease,
@@ -47,7 +64,7 @@ const slotExpose = computed(() => ({
47
64
  <template>
48
65
  <orio-control-element
49
66
  v-slot="{ id }"
50
- v-bind="$attrs"
67
+ v-bind="controlProps"
51
68
  :layout="layout === 'inner' ? 'vertical' : layout"
52
69
  :class="{ inner: layout === 'inner' }"
53
70
  >
@@ -58,6 +75,10 @@ const slotExpose = computed(() => ({
58
75
  v-model="modelValue"
59
76
  type="number"
60
77
  class="number-input"
78
+ :disabled
79
+ :min
80
+ :max
81
+ :step
61
82
  @blur="onBlur"
62
83
  />
63
84
  <div class="controls">
@@ -117,7 +138,6 @@ input[type=number] {
117
138
  .inner :deep(.control-label) {
118
139
  position: absolute;
119
140
  z-index: 1;
120
- pointer-events: none;
121
141
  left: var(--control-px);
122
142
  top: var(--control-label-block-start);
123
143
  color: var(--color-muted);
@@ -1,5 +1,6 @@
1
+ import type { ControlProps } from "../ControlElement.vue.js";
1
2
  import type { InputLayout } from "../Input.vue.js";
2
- export interface NumberInputProps {
3
+ export interface NumberInputProps extends Omit<ControlProps, "layout"> {
3
4
  layout?: InputLayout;
4
5
  min?: number;
5
6
  max?: number;
@@ -28,8 +29,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
28
29
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
29
30
  "onUpdate:modelValue"?: ((value: number) => any) | undefined;
30
31
  }>, {
31
- disabled: boolean;
32
32
  layout: InputLayout;
33
+ disabled: boolean;
33
34
  step: number;
34
35
  min: number;
35
36
  max: number;