@nilloq/ouds-web 0.1.6 → 0.1.7

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 (113) hide show
  1. package/README.md +17 -115
  2. package/dist/{alert-bsnEmrzb.js → alert-B4w3fDHo.js} +2 -2
  3. package/dist/{alert-By364Om4.js → alert-Chns046l.js} +1 -1
  4. package/dist/alert.js +1 -1
  5. package/dist/{badge-fffoaFuZ.js → badge-CDpWg-AO.js} +1 -1
  6. package/dist/badge.js +1 -1
  7. package/dist/{button-BUziAVbu.js → button-rgIJZsYq.js} +1 -1
  8. package/dist/button.js +1 -1
  9. package/dist/checkbox-D7TFFuw3.js +196 -0
  10. package/dist/checkbox-DfYlHYR2.js +155 -0
  11. package/dist/checkbox.js +1 -1
  12. package/dist/chip-B3v4pWZD.js +92 -0
  13. package/dist/chip-DGfqitrQ.js +115 -0
  14. package/dist/chip.js +2 -0
  15. package/dist/{control-item-slots-BNXNsI1e.js → control-item-slots-BDoeNuk4.js} +5 -2
  16. package/dist/{control-item-slots-XV8Gjvf1.js → control-item-slots-Ddp7c8w8.js} +4 -1
  17. package/dist/elements-alert.js +1 -1
  18. package/dist/elements-badge.js +1 -1
  19. package/dist/elements-button.js +1 -1
  20. package/dist/elements-checkbox.js +1 -1
  21. package/dist/elements-chip.js +2 -0
  22. package/dist/elements-modal.js +1 -1
  23. package/dist/elements-radio.js +1 -1
  24. package/dist/elements-select.js +1 -1
  25. package/dist/elements-switch.js +1 -1
  26. package/dist/elements-tag.js +1 -1
  27. package/dist/elements-text-area.js +1 -1
  28. package/dist/elements-text-input.js +1 -1
  29. package/dist/elements.js +14 -13
  30. package/dist/index.js +13 -12
  31. package/dist/{modal-IEXNB8St.js → modal-BAvMVUIE.js} +2 -2
  32. package/dist/{modal-CHjaB_yR.js → modal-BnT5Kxjg.js} +1 -1
  33. package/dist/modal.js +1 -1
  34. package/dist/radio-CDq4r1_L.js +155 -0
  35. package/dist/radio-TaYThYkI.js +199 -0
  36. package/dist/radio.js +1 -1
  37. package/dist/{runtime-dom.esm-bundler-BeOO_l6v.js → runtime-dom.esm-bundler-DLryEdgJ.js} +1 -1
  38. package/dist/select--O3jL-En.js +134 -0
  39. package/dist/select-NiIx8bVD.js +191 -0
  40. package/dist/select.js +1 -1
  41. package/dist/switch-BmxLKPbL.js +179 -0
  42. package/dist/switch-D5N-j5F7.js +140 -0
  43. package/dist/switch.js +1 -1
  44. package/dist/{tag-BdB0YDBJ.js → tag-BvOt0v-c.js} +1 -1
  45. package/dist/tag.js +1 -1
  46. package/dist/text-area-BdmAyh3N.js +163 -0
  47. package/dist/text-area-BgYNtAMx.js +107 -0
  48. package/dist/text-area.js +1 -1
  49. package/dist/text-input-DgFIuIOA.js +235 -0
  50. package/dist/text-input-i559HVOP.js +163 -0
  51. package/dist/text-input.js +1 -1
  52. package/dist/types/chip.d.ts +1 -0
  53. package/dist/types/components/alert/Alert.vue.d.ts +3 -3
  54. package/dist/types/components/badge/Badge.vue.d.ts +1 -1
  55. package/dist/types/components/button/Button.vue.d.ts +1 -1
  56. package/dist/types/components/checkbox/Checkbox.vue.d.ts +4 -15
  57. package/dist/types/components/checkbox/VueCheckbox.vue.d.ts +9 -3
  58. package/dist/types/components/checkbox/checkbox.types.d.ts +16 -0
  59. package/dist/types/components/chip/Chip.vue.d.ts +38 -0
  60. package/dist/types/components/chip/VueChip.vue.d.ts +32 -0
  61. package/dist/types/components/chip/chip.context.d.ts +2 -0
  62. package/dist/types/components/chip/chip.types.d.ts +27 -0
  63. package/dist/types/components/modal/Modal.vue.d.ts +8 -8
  64. package/dist/types/components/radio/Radio.vue.d.ts +2 -17
  65. package/dist/types/components/radio/VueRadio.vue.d.ts +8 -6
  66. package/dist/types/components/radio/radio.types.d.ts +16 -0
  67. package/dist/types/components/select/Select.vue.d.ts +2 -19
  68. package/dist/types/components/select/VueSelect.vue.d.ts +9 -3
  69. package/dist/types/components/select/select.types.d.ts +18 -0
  70. package/dist/types/components/shared/control-item-slots.d.ts +1 -0
  71. package/dist/types/components/switch/Switch.vue.d.ts +2 -14
  72. package/dist/types/components/switch/VueSwitch.vue.d.ts +9 -3
  73. package/dist/types/components/switch/switch.types.d.ts +13 -0
  74. package/dist/types/components/tag/Tag.vue.d.ts +1 -1
  75. package/dist/types/components/text-area/TextArea.vue.d.ts +2 -16
  76. package/dist/types/components/text-area/VueTextArea.vue.d.ts +9 -3
  77. package/dist/types/components/text-area/text-area.types.d.ts +15 -0
  78. package/dist/types/components/text-input/TextInput.vue.d.ts +2 -19
  79. package/dist/types/components/text-input/VueTextInput.vue.d.ts +9 -3
  80. package/dist/types/components/text-input/text-input.types.d.ts +25 -0
  81. package/dist/types/elements/chip.d.ts +4 -0
  82. package/dist/types/elements/index.d.ts +2 -0
  83. package/dist/types/vue/checkbox.d.ts +1 -1
  84. package/dist/types/vue/chip.d.ts +2 -0
  85. package/dist/types/vue/index.d.ts +8 -6
  86. package/dist/types/vue/radio.d.ts +1 -1
  87. package/dist/types/vue/select.d.ts +1 -1
  88. package/dist/types/vue/switch.d.ts +1 -1
  89. package/dist/types/vue/text-area.d.ts +1 -1
  90. package/dist/types/vue/text-input.d.ts +1 -1
  91. package/dist/vue-alert.js +1 -1
  92. package/dist/vue-checkbox.js +1 -1
  93. package/dist/vue-chip.js +2 -0
  94. package/dist/vue-modal.js +1 -1
  95. package/dist/vue-radio.js +1 -1
  96. package/dist/vue-select.js +1 -1
  97. package/dist/vue-switch.js +1 -1
  98. package/dist/vue-text-area.js +1 -1
  99. package/dist/vue-text-input.js +1 -1
  100. package/dist/vue.js +10 -9
  101. package/package.json +15 -2
  102. package/dist/checkbox-PAgQqiIw.js +0 -145
  103. package/dist/checkbox-g6cqR6wz.js +0 -170
  104. package/dist/radio-Cmrtred_.js +0 -147
  105. package/dist/radio-CqVqsZ7n.js +0 -175
  106. package/dist/select-Bpou1HIY.js +0 -167
  107. package/dist/select-CWjTpHGb.js +0 -126
  108. package/dist/switch-CFv0JUeq.js +0 -132
  109. package/dist/switch-DEYsTCw5.js +0 -157
  110. package/dist/text-area-DkjEGpHg.js +0 -99
  111. package/dist/text-area-DqBoz2_d.js +0 -139
  112. package/dist/text-input-DnWjB1vE.js +0 -207
  113. package/dist/text-input-DxzwRS2R.js +0 -157
@@ -1,21 +1,4 @@
1
- type __VLS_Props = {
2
- label?: string;
3
- placeholder?: string;
4
- helperText?: string;
5
- errorText?: string;
6
- helperLink?: string;
7
- helperLinkHref?: string;
8
- suffix?: string;
9
- value?: string;
10
- type?: string;
11
- outlined?: boolean;
12
- disabled?: boolean;
13
- readonly?: boolean;
14
- required?: boolean;
15
- invalid?: boolean;
16
- maxWidth?: boolean;
17
- loading?: boolean;
18
- };
1
+ import type { TextInputProps } from "./text-input.types.js";
19
2
  declare const __VLS_template: () => {
20
3
  __VLS_Slots: {
21
4
  'leading-icon'?: (props: {}) => any;
@@ -34,7 +17,7 @@ declare const __VLS_template: () => {
34
17
  };
35
18
  };
36
19
  type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
37
- declare const __VLS_base: import("@vue/runtime-core").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
20
+ declare const __VLS_base: import("vue").DefineComponent<TextInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
38
21
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
39
22
  declare const _default: typeof __VLS_export;
40
23
  export default _default;
@@ -1,6 +1,12 @@
1
+ import type { InputHTMLAttributes } from "vue";
2
+ import type { TextInputProps } from "./text-input.types.js";
3
+ interface Props extends Omit<InputHTMLAttributes, keyof TextInputProps>, Omit<TextInputProps, "value"> {
4
+ }
5
+ type __VLS_Props = Props;
1
6
  type __VLS_ModelProps = {
2
7
  modelValue?: string;
3
8
  };
9
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
4
10
  declare const __VLS_template: () => {
5
11
  __VLS_Slots: {
6
12
  label?: (props: {}) => any;
@@ -19,15 +25,15 @@ declare const __VLS_template: () => {
19
25
  };
20
26
  };
21
27
  type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
22
- declare const __VLS_base: import("@vue/runtime-core").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
28
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
23
29
  input: (event: Event) => any;
24
30
  change: (event: Event) => any;
25
31
  "update:modelValue": (value: string) => any;
26
- }, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
32
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
27
33
  onInput?: ((event: Event) => any) | undefined;
28
34
  onChange?: ((event: Event) => any) | undefined;
29
35
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
30
- }>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
36
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
31
37
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
32
38
  declare const _default: typeof __VLS_export;
33
39
  export default _default;
@@ -1,3 +1,26 @@
1
+ export interface TextInputProps {
2
+ prefix?: string;
3
+ label?: string;
4
+ placeholder?: string;
5
+ helperText?: string;
6
+ errorText?: string;
7
+ helperLink?: string;
8
+ helperLinkHref?: string;
9
+ /** Hidden screen-reader text between the helper link and field label. Defaults to "on". */
10
+ helperLinkAria?: string;
11
+ suffix?: string;
12
+ value?: string;
13
+ type?: string;
14
+ outlined?: boolean;
15
+ disabled?: boolean;
16
+ readonly?: boolean;
17
+ required?: boolean;
18
+ invalid?: boolean;
19
+ maxWidth?: boolean;
20
+ loading?: boolean;
21
+ /** Screen-reader loading announcement. Defaults to "Loading". */
22
+ loadingText?: string;
23
+ }
1
24
  export type TextInputElement = HTMLElement & {
2
25
  id: string;
3
26
  label: string;
@@ -6,6 +29,7 @@ export type TextInputElement = HTMLElement & {
6
29
  errorText: string;
7
30
  helperLink: string;
8
31
  helperLinkHref: string;
32
+ helperLinkAria: string;
9
33
  prefix: string;
10
34
  suffix: string;
11
35
  value: string;
@@ -17,6 +41,7 @@ export type TextInputElement = HTMLElement & {
17
41
  invalid: boolean;
18
42
  maxWidth: boolean;
19
43
  loading: boolean;
44
+ loadingText: string;
20
45
  };
21
46
  export type TextInputConstructor = CustomElementConstructor & {
22
47
  new (initialProps?: Partial<TextInputElement>): TextInputElement;
@@ -0,0 +1,4 @@
1
+ import type { ChipConstructor } from "../components/chip/chip.types.js";
2
+ export type * from "../components/chip/chip.types.js";
3
+ export declare const OudsChip: ChipConstructor;
4
+ export declare function defineOudsChip(): void;
@@ -4,6 +4,7 @@ export * from "../components/alert/alert.options.js";
4
4
  export { OudsBadge, defineOudsBadge } from "./badge.js";
5
5
  export { OudsButton, defineOudsButton } from "./button.js";
6
6
  export { OudsTag, defineOudsTag } from "./tag.js";
7
+ export { OudsChip, defineOudsChip } from "./chip.js";
7
8
  export { OudsSelect, defineOudsSelect } from "./select.js";
8
9
  export { OudsCheckbox, defineOudsCheckbox } from "./checkbox.js";
9
10
  export { OudsRadio, defineOudsRadio } from "./radio.js";
@@ -13,6 +14,7 @@ export { OudsTextArea, defineOudsTextArea } from "./text-area.js";
13
14
  export type * from "../components/badge/badge.types.js";
14
15
  export type * from "../components/button/button.types.js";
15
16
  export type * from "../components/tag/tag.types.js";
17
+ export type * from "../components/chip/chip.types.js";
16
18
  export type * from "../components/select/select.types.js";
17
19
  export type * from "../components/checkbox/checkbox.types.js";
18
20
  export type * from "../components/radio/radio.types.js";
@@ -1,2 +1,2 @@
1
1
  export { default as OudsCheckbox } from "../components/checkbox/VueCheckbox.vue";
2
- export type { CheckboxElement } from "../components/checkbox/checkbox.types.js";
2
+ export type { CheckboxElement, CheckboxProps } from "../components/checkbox/checkbox.types.js";
@@ -0,0 +1,2 @@
1
+ export { default as OudsChip } from "../components/chip/VueChip.vue";
2
+ export type * from "../components/chip/chip.types.js";
@@ -2,6 +2,7 @@ export * from "./alert.js";
2
2
  export { OudsBadge } from "./badge.js";
3
3
  export { OudsButton } from "./button.js";
4
4
  export { OudsTag } from "./tag.js";
5
+ export { OudsChip } from "./chip.js";
5
6
  export { OudsSelect } from "./select.js";
6
7
  export { OudsCheckbox } from "./checkbox.js";
7
8
  export { OudsRadio } from "./radio.js";
@@ -11,12 +12,13 @@ export { OudsTextArea } from "./text-area.js";
11
12
  export type { BadgeElement, BadgeVariant, BadgeSize } from "./badge.js";
12
13
  export type { ButtonElement, ButtonVariant } from "./button.js";
13
14
  export type { TagElement, TagVariant } from "./tag.js";
14
- export type { SelectElement } from "../components/select/select.types.js";
15
- export type { CheckboxElement } from "../components/checkbox/checkbox.types.js";
16
- export type { RadioElement } from "../components/radio/radio.types.js";
17
- export type { SwitchElement } from "../components/switch/switch.types.js";
18
- export type { TextInputElement } from "../components/text-input/text-input.types.js";
19
- export type { TextAreaElement } from "../components/text-area/text-area.types.js";
15
+ export type { ChipElement, ChipVariant, ChipInputType, ChipProps } from "./chip.js";
16
+ export type { SelectElement, SelectProps } from "../components/select/select.types.js";
17
+ export type { CheckboxElement, CheckboxProps } from "../components/checkbox/checkbox.types.js";
18
+ export type { RadioElement, RadioProps } from "../components/radio/radio.types.js";
19
+ export type { SwitchElement, SwitchProps } from "../components/switch/switch.types.js";
20
+ export type { TextInputElement, TextInputProps, } from "../components/text-input/text-input.types.js";
21
+ export type { TextAreaElement, TextAreaProps } from "../components/text-area/text-area.types.js";
20
22
  export * from "../components/badge/badge.options.js";
21
23
  export * from "../components/button/button.options.js";
22
24
  export * from "../components/tag/tag.options.js";
@@ -1,2 +1,2 @@
1
1
  export { default as OudsRadio } from "../components/radio/VueRadio.vue";
2
- export type { RadioElement } from "../components/radio/radio.types.js";
2
+ export type { RadioElement, RadioProps } from "../components/radio/radio.types.js";
@@ -1,2 +1,2 @@
1
1
  export { default as OudsSelect } from "../components/select/VueSelect.vue";
2
- export type { SelectElement } from "../components/select/select.types.js";
2
+ export type { SelectElement, SelectProps } from "../components/select/select.types.js";
@@ -1,2 +1,2 @@
1
1
  export { default as OudsSwitch } from "../components/switch/VueSwitch.vue";
2
- export type { SwitchElement } from "../components/switch/switch.types.js";
2
+ export type { SwitchElement, SwitchProps } from "../components/switch/switch.types.js";
@@ -1,2 +1,2 @@
1
1
  export { default as OudsTextArea } from "../components/text-area/VueTextArea.vue";
2
- export type { TextAreaElement } from "../components/text-area/text-area.types.js";
2
+ export type { TextAreaElement, TextAreaProps } from "../components/text-area/text-area.types.js";
@@ -1,2 +1,2 @@
1
1
  export { default as OudsTextInput } from "../components/text-input/VueTextInput.vue";
2
- export type { TextInputElement } from "../components/text-input/text-input.types.js";
2
+ export type { TextInputElement, TextInputProps, } from "../components/text-input/text-input.types.js";
package/dist/vue-alert.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./alert-By364Om4.js";
1
+ import { n as e, t } from "./alert-Chns046l.js";
2
2
  export { e as OudsAlert, t as alertVariants };
@@ -1,2 +1,2 @@
1
- import { t as e } from "./checkbox-g6cqR6wz.js";
1
+ import { t as e } from "./checkbox-D7TFFuw3.js";
2
2
  export { e as OudsCheckbox };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./chip-DGfqitrQ.js";
2
+ export { e as OudsChip };
package/dist/vue-modal.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as e, n as t, r as n, t as r } from "./modal-CHjaB_yR.js";
1
+ import { i as e, n as t, r as n, t as r } from "./modal-BnT5Kxjg.js";
2
2
  export { e as OudsModal, r as modalSizes, t as modalTypes, n as modalVariants };
package/dist/vue-radio.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as e } from "./radio-CqVqsZ7n.js";
1
+ import { t as e } from "./radio-TaYThYkI.js";
2
2
  export { e as OudsRadio };
@@ -1,2 +1,2 @@
1
- import { t as e } from "./select-Bpou1HIY.js";
1
+ import { t as e } from "./select-NiIx8bVD.js";
2
2
  export { e as OudsSelect };
@@ -1,2 +1,2 @@
1
- import { t as e } from "./switch-DEYsTCw5.js";
1
+ import { t as e } from "./switch-BmxLKPbL.js";
2
2
  export { e as OudsSwitch };
@@ -1,2 +1,2 @@
1
- import { t as e } from "./text-area-DqBoz2_d.js";
1
+ import { t as e } from "./text-area-BdmAyh3N.js";
2
2
  export { e as OudsTextArea };
@@ -1,2 +1,2 @@
1
- import { t as e } from "./text-input-DnWjB1vE.js";
1
+ import { t as e } from "./text-input-DgFIuIOA.js";
2
2
  export { e as OudsTextInput };
package/dist/vue.js CHANGED
@@ -1,12 +1,13 @@
1
- import { n as e, t } from "./alert-By364Om4.js";
1
+ import { n as e, t } from "./alert-Chns046l.js";
2
2
  import { n, r, t as i } from "./badge-yaFEZnEW.js";
3
3
  import { a, i as o, n as s, r as c, t as l } from "./button-nN1Pcwm6.js";
4
4
  import { n as u, r as d, t as f } from "./tag-Un7w0uDf.js";
5
- import { t as p } from "./select-Bpou1HIY.js";
6
- import { t as m } from "./checkbox-g6cqR6wz.js";
7
- import { t as h } from "./radio-CqVqsZ7n.js";
8
- import { t as g } from "./switch-DEYsTCw5.js";
9
- import { t as _ } from "./text-input-DnWjB1vE.js";
10
- import { t as v } from "./text-area-DqBoz2_d.js";
11
- import { i as y, n as b, r as x, t as S } from "./modal-CHjaB_yR.js";
12
- export { e as OudsAlert, r as OudsBadge, a as OudsButton, m as OudsCheckbox, y as OudsModal, h as OudsRadio, p as OudsSelect, g as OudsSwitch, d as OudsTag, v as OudsTextArea, _ as OudsTextInput, t as alertVariants, i as badgeSizes, n as badgeVariants, l as buttonNavigations, s as buttonSizes, c as buttonTypes, o as buttonVariants, S as modalSizes, b as modalTypes, x as modalVariants, f as tagSizes, u as tagVariants };
5
+ import { t as p } from "./chip-DGfqitrQ.js";
6
+ import { t as m } from "./select-NiIx8bVD.js";
7
+ import { t as h } from "./checkbox-D7TFFuw3.js";
8
+ import { t as g } from "./radio-TaYThYkI.js";
9
+ import { t as _ } from "./switch-BmxLKPbL.js";
10
+ import { t as v } from "./text-input-DgFIuIOA.js";
11
+ import { t as y } from "./text-area-BdmAyh3N.js";
12
+ import { i as b, n as x, r as S, t as C } from "./modal-BnT5Kxjg.js";
13
+ export { e as OudsAlert, r as OudsBadge, a as OudsButton, h as OudsCheckbox, p as OudsChip, b as OudsModal, g as OudsRadio, m as OudsSelect, _ as OudsSwitch, d as OudsTag, y as OudsTextArea, v as OudsTextInput, t as alertVariants, i as badgeSizes, n as badgeVariants, l as buttonNavigations, s as buttonSizes, c as buttonTypes, o as buttonVariants, C as modalSizes, x as modalTypes, S as modalVariants, f as tagSizes, u as tagVariants };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nilloq/ouds-web",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Vue components and framework-independent custom elements styled with OUDS Web.",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -25,6 +25,10 @@
25
25
  "types": "./dist/types/tag.d.ts",
26
26
  "import": "./dist/tag.js"
27
27
  },
28
+ "./chip": {
29
+ "types": "./dist/types/chip.d.ts",
30
+ "import": "./dist/chip.js"
31
+ },
28
32
  "./select": {
29
33
  "types": "./dist/types/select.d.ts",
30
34
  "import": "./dist/select.js"
@@ -61,6 +65,10 @@
61
65
  "types": "./dist/types/elements/tag.d.ts",
62
66
  "import": "./dist/elements-tag.js"
63
67
  },
68
+ "./components/chip": {
69
+ "types": "./dist/types/elements/chip.d.ts",
70
+ "import": "./dist/elements-chip.js"
71
+ },
64
72
  "./components/select": {
65
73
  "types": "./dist/types/elements/select.d.ts",
66
74
  "import": "./dist/elements-select.js"
@@ -97,6 +105,10 @@
97
105
  "types": "./dist/types/vue/tag.d.ts",
98
106
  "import": "./dist/vue-tag.js"
99
107
  },
108
+ "./vue/chip": {
109
+ "types": "./dist/types/vue/chip.d.ts",
110
+ "import": "./dist/vue-chip.js"
111
+ },
100
112
  "./vue/select": {
101
113
  "types": "./dist/types/vue/select.d.ts",
102
114
  "import": "./dist/vue-select.js"
@@ -163,11 +175,12 @@
163
175
  "access": "public"
164
176
  },
165
177
  "scripts": {
166
- "build": "vp build && vp build --config vite.vue.config.ts && vue-tsc --declaration --emitDeclarationOnly --noEmit false --outDir dist/types",
178
+ "build": "vp build && vp build --config vite.vue.config.ts && vue-tsc --declaration --emitDeclarationOnly --noEmit false --outDir dist/types --moduleResolution bundler --module esnext",
167
179
  "dev": "vp build --watch",
168
180
  "playground": "vp run build && vp dev --config playground/vite.config.ts",
169
181
  "test": "vp test",
170
182
  "check": "vp check && vue-tsc --noEmit",
183
+ "check:types": "vp run build && vue-tsc --noEmit -p tests/types/tsconfig.json",
171
184
  "prepublishOnly": "vp run build",
172
185
  "prepare": "vp config && vp run build"
173
186
  },
@@ -1,145 +0,0 @@
1
- import { A as e, M as t, O as n, T as r, a as i, b as a, c as o, d as s, f as c, g as l, j as u, k as d, l as f, o as p, p as m, s as h, t as g, u as _, v, w as y, x as b, y as x } from "./runtime-dom.esm-bundler-BeOO_l6v.js";
2
- import { n as S, t as C } from "./control-item-slots-BNXNsI1e.js";
3
- //#region src/components/checkbox/checkbox.context.ts
4
- var w = Symbol("ouds-checkbox-element-id"), T = { class: "control-item-assets-container" }, E = [
5
- "id",
6
- "value",
7
- "checked",
8
- "disabled",
9
- "required",
10
- "aria-describedby",
11
- "aria-invalid"
12
- ], D = [
13
- "id",
14
- "aria-checked",
15
- "aria-labelledby",
16
- "aria-describedby",
17
- "aria-invalid"
18
- ], O = { class: "control-item-text-container" }, k = ["id"], A = {
19
- key: 0,
20
- class: "control-item-assets-container"
21
- }, j = /* @__PURE__ */ s({
22
- inheritAttrs: !1,
23
- __name: "Checkbox",
24
- props: {
25
- label: { default: "Checkbox" },
26
- description: { default: "" },
27
- value: { default: "" },
28
- checked: {
29
- type: Boolean,
30
- default: !1
31
- },
32
- disabled: {
33
- type: Boolean,
34
- default: !1
35
- },
36
- required: {
37
- type: Boolean,
38
- default: !1
39
- },
40
- divider: {
41
- type: Boolean,
42
- default: !1
43
- },
44
- indeterminate: {
45
- type: Boolean,
46
- default: !1
47
- },
48
- readonly: {
49
- type: Boolean,
50
- default: !1
51
- },
52
- invalid: {
53
- type: Boolean,
54
- default: !1
55
- },
56
- reverse: {
57
- type: Boolean,
58
- default: !1
59
- },
60
- maxWidth: {
61
- type: Boolean,
62
- default: !1
63
- }
64
- },
65
- setup(s) {
66
- let g = a(), C = d(() => g.id), j = n(), M = b(), N = c(w, void 0), P = S(N !== void 0), F = d(() => N ? `${C.value || N}-input` : C.value || `ouds-checkbox-${M}`), I = d(() => `${F.value}-label`), L = d(() => `${F.value}-description`);
67
- function R() {
68
- let e = [g["aria-describedby"]];
69
- return (s.description || P("description")) && e.push(L.value), e.filter(Boolean).join(" ") || void 0;
70
- }
71
- function z() {
72
- return [g["aria-labelledby"], I.value].filter(Boolean).join(" ");
73
- }
74
- let B = i(() => ["checkbox-item", {
75
- "control-item-divider": s.divider,
76
- "control-item-reverse": s.reverse,
77
- "component-max-width": s.maxWidth
78
- }]);
79
- return y(() => {
80
- j.value && "indeterminate" in j.value && (j.value.indeterminate = s.indeterminate);
81
- }), (n, i) => (l(), f("div", { class: u(B.value) }, [
82
- p("div", T, [s.readonly ? (l(), f("span", m({
83
- key: 1,
84
- ref_key: "input",
85
- ref: j
86
- }, e(g), {
87
- id: F.value,
88
- class: "control-item-indicator",
89
- role: "checkbox",
90
- "aria-readonly": "true",
91
- "aria-disabled": "true",
92
- tabindex: "0",
93
- "aria-checked": s.indeterminate ? "mixed" : s.checked,
94
- "aria-labelledby": z(),
95
- "aria-describedby": R(),
96
- "aria-invalid": s.invalid || e(g)["aria-invalid"]
97
- }), null, 16, D)) : (l(), f("input", m({
98
- key: 0,
99
- ref_key: "input",
100
- ref: j
101
- }, e(g), {
102
- id: F.value,
103
- class: "control-item-indicator",
104
- type: "checkbox",
105
- value: s.value,
106
- checked: s.checked,
107
- disabled: s.disabled,
108
- required: s.required,
109
- "aria-describedby": R(),
110
- "aria-invalid": s.invalid || e(g)["aria-invalid"]
111
- }), null, 16, E))]),
112
- p("div", O, [(l(), h(x(s.readonly ? "span" : "label"), {
113
- id: I.value,
114
- class: u(["control-item-label", { "is-required": s.required }]),
115
- for: s.readonly ? void 0 : F.value
116
- }, {
117
- default: r(() => [v(n.$slots, "label", {}, () => [_(t(s.label), 1)])]),
118
- _: 3
119
- }, 8, [
120
- "id",
121
- "class",
122
- "for"
123
- ])), s.description || e(P)("description") ? (l(), f("p", {
124
- key: 0,
125
- id: L.value,
126
- class: "control-item-description"
127
- }, [v(n.$slots, "description", {}, () => [_(t(s.description), 1)])], 8, k)) : o("", !0)]),
128
- e(P)("asset") ? (l(), f("div", A, [v(n.$slots, "asset")])) : o("", !0)
129
- ], 2));
130
- }
131
- }), M = 0, N = g(j, {
132
- shadowRoot: !1,
133
- configureApp(e) {
134
- e.provide(w, `ouds-checkbox-element-${M++}`);
135
- }
136
- }), P = class extends N {
137
- connectedCallback() {
138
- C(this), super.connectedCallback();
139
- }
140
- };
141
- function F() {
142
- typeof customElements < "u" && (customElements.get("ouds-checkbox") || customElements.define("ouds-checkbox", P));
143
- }
144
- //#endregion
145
- export { F as n, P as t };
@@ -1,170 +0,0 @@
1
- import { t as e } from "./control-item-slots-XV8Gjvf1.js";
2
- import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createSlots as o, createTextVNode as s, defineComponent as c, inject as l, mergeModels as u, mergeProps as d, normalizeClass as f, openBlock as p, ref as m, renderSlot as h, resolveDynamicComponent as g, toDisplayString as _, toRef as v, unref as y, useAttrs as b, useId as x, useModel as S, watchEffect as C, withCtx as w } from "vue";
3
- //#region src/components/checkbox/checkbox.context.ts
4
- var T = Symbol("ouds-checkbox-element-id"), E = { class: "control-item-assets-container" }, D = [
5
- "id",
6
- "value",
7
- "checked",
8
- "disabled",
9
- "required",
10
- "aria-describedby",
11
- "aria-invalid"
12
- ], O = [
13
- "id",
14
- "aria-checked",
15
- "aria-labelledby",
16
- "aria-describedby",
17
- "aria-invalid"
18
- ], k = { class: "control-item-text-container" }, A = ["id"], j = {
19
- key: 0,
20
- class: "control-item-assets-container"
21
- }, M = /* @__PURE__ */ c({
22
- inheritAttrs: !1,
23
- __name: "Checkbox",
24
- props: {
25
- label: { default: "Checkbox" },
26
- description: { default: "" },
27
- value: { default: "" },
28
- checked: {
29
- type: Boolean,
30
- default: !1
31
- },
32
- disabled: {
33
- type: Boolean,
34
- default: !1
35
- },
36
- required: {
37
- type: Boolean,
38
- default: !1
39
- },
40
- divider: {
41
- type: Boolean,
42
- default: !1
43
- },
44
- indeterminate: {
45
- type: Boolean,
46
- default: !1
47
- },
48
- readonly: {
49
- type: Boolean,
50
- default: !1
51
- },
52
- invalid: {
53
- type: Boolean,
54
- default: !1
55
- },
56
- reverse: {
57
- type: Boolean,
58
- default: !1
59
- },
60
- maxWidth: {
61
- type: Boolean,
62
- default: !1
63
- }
64
- },
65
- setup(o) {
66
- let c = b(), u = v(() => c.id), S = m(), M = x(), N = l(T, void 0), P = e(N !== void 0), F = v(() => N ? `${u.value || N}-input` : u.value || `ouds-checkbox-${M}`), I = v(() => `${F.value}-label`), L = v(() => `${F.value}-description`);
67
- function R() {
68
- let e = [c["aria-describedby"]];
69
- return (o.description || P("description")) && e.push(L.value), e.filter(Boolean).join(" ") || void 0;
70
- }
71
- function z() {
72
- return [c["aria-labelledby"], I.value].filter(Boolean).join(" ");
73
- }
74
- let B = t(() => ["checkbox-item", {
75
- "control-item-divider": o.divider,
76
- "control-item-reverse": o.reverse,
77
- "component-max-width": o.maxWidth
78
- }]);
79
- return C(() => {
80
- S.value && "indeterminate" in S.value && (S.value.indeterminate = o.indeterminate);
81
- }), (e, t) => (p(), i("div", { class: f(B.value) }, [
82
- a("div", E, [o.readonly ? (p(), i("span", d({
83
- key: 1,
84
- ref_key: "input",
85
- ref: S
86
- }, y(c), {
87
- id: F.value,
88
- class: "control-item-indicator",
89
- role: "checkbox",
90
- "aria-readonly": "true",
91
- "aria-disabled": "true",
92
- tabindex: "0",
93
- "aria-checked": o.indeterminate ? "mixed" : o.checked,
94
- "aria-labelledby": z(),
95
- "aria-describedby": R(),
96
- "aria-invalid": o.invalid || y(c)["aria-invalid"]
97
- }), null, 16, O)) : (p(), i("input", d({
98
- key: 0,
99
- ref_key: "input",
100
- ref: S
101
- }, y(c), {
102
- id: F.value,
103
- class: "control-item-indicator",
104
- type: "checkbox",
105
- value: o.value,
106
- checked: o.checked,
107
- disabled: o.disabled,
108
- required: o.required,
109
- "aria-describedby": R(),
110
- "aria-invalid": o.invalid || y(c)["aria-invalid"]
111
- }), null, 16, D))]),
112
- a("div", k, [(p(), n(g(o.readonly ? "span" : "label"), {
113
- id: I.value,
114
- class: f(["control-item-label", { "is-required": o.required }]),
115
- for: o.readonly ? void 0 : F.value
116
- }, {
117
- default: w(() => [h(e.$slots, "label", {}, () => [s(_(o.label), 1)])]),
118
- _: 3
119
- }, 8, [
120
- "id",
121
- "class",
122
- "for"
123
- ])), o.description || y(P)("description") ? (p(), i("p", {
124
- key: 0,
125
- id: L.value,
126
- class: "control-item-description"
127
- }, [h(e.$slots, "description", {}, () => [s(_(o.description), 1)])], 8, A)) : r("", !0)]),
128
- y(P)("asset") ? (p(), i("div", j, [h(e.$slots, "asset")])) : r("", !0)
129
- ], 2));
130
- }
131
- }), N = /* @__PURE__ */ c({
132
- inheritAttrs: !1,
133
- __name: "VueCheckbox",
134
- props: {
135
- modelValue: {
136
- type: Boolean,
137
- default: !1
138
- },
139
- modelModifiers: {}
140
- },
141
- emits: /*@__PURE__*/ u(["change"], ["update:modelValue"]),
142
- setup(e, { emit: t }) {
143
- let r = S(e, "modelValue"), i = t;
144
- function a(e) {
145
- r.value = e.target.checked, i("change", e);
146
- }
147
- return (e, t) => (p(), n(M, d(e.$attrs, {
148
- checked: r.value,
149
- onChange: a
150
- }), o({ _: 2 }, [
151
- e.$slots.label ? {
152
- name: "label",
153
- fn: w(() => [h(e.$slots, "label")]),
154
- key: "0"
155
- } : void 0,
156
- e.$slots.asset ? {
157
- name: "asset",
158
- fn: w(() => [h(e.$slots, "asset")]),
159
- key: "1"
160
- } : void 0,
161
- e.$slots.description ? {
162
- name: "description",
163
- fn: w(() => [h(e.$slots, "description")]),
164
- key: "2"
165
- } : void 0
166
- ]), 1040, ["checked"]));
167
- }
168
- });
169
- //#endregion
170
- export { N as t };