independer-design-system 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +100 -0
- package/dist/module.d.mts +6 -0
- package/dist/module.json +12 -0
- package/dist/module.mjs +35 -0
- package/dist/runtime/assets/images/checkbox.svg +3 -0
- package/dist/runtime/assets/style.css +1 -0
- package/dist/runtime/components/Button.d.vue.ts +40 -0
- package/dist/runtime/components/Button.vue +110 -0
- package/dist/runtime/components/Button.vue.d.ts +40 -0
- package/dist/runtime/components/ButtonToggle.d.vue.ts +17 -0
- package/dist/runtime/components/ButtonToggle.vue +40 -0
- package/dist/runtime/components/ButtonToggle.vue.d.ts +17 -0
- package/dist/runtime/components/Dialog.d.vue.ts +52 -0
- package/dist/runtime/components/Dialog.vue +116 -0
- package/dist/runtime/components/Dialog.vue.d.ts +52 -0
- package/dist/runtime/components/Form/Checkbox.d.vue.ts +46 -0
- package/dist/runtime/components/Form/Checkbox.vue +93 -0
- package/dist/runtime/components/Form/Checkbox.vue.d.ts +46 -0
- package/dist/runtime/components/Form/Input.d.vue.ts +65 -0
- package/dist/runtime/components/Form/Input.vue +131 -0
- package/dist/runtime/components/Form/Input.vue.d.ts +65 -0
- package/dist/runtime/components/Form/Label.d.vue.ts +51 -0
- package/dist/runtime/components/Form/Label.vue +44 -0
- package/dist/runtime/components/Form/Label.vue.d.ts +51 -0
- package/dist/runtime/components/Form/Radio.d.vue.ts +50 -0
- package/dist/runtime/components/Form/Radio.vue +112 -0
- package/dist/runtime/components/Form/Radio.vue.d.ts +50 -0
- package/dist/runtime/components/Form/Row.d.vue.ts +31 -0
- package/dist/runtime/components/Form/Row.vue +37 -0
- package/dist/runtime/components/Form/Row.vue.d.ts +31 -0
- package/dist/runtime/components/Form/Select.d.vue.ts +45 -0
- package/dist/runtime/components/Form/Select.vue +90 -0
- package/dist/runtime/components/Form/Select.vue.d.ts +45 -0
- package/dist/runtime/components/Form/Tabs.d.vue.ts +38 -0
- package/dist/runtime/components/Form/Tabs.vue +75 -0
- package/dist/runtime/components/Form/Tabs.vue.d.ts +38 -0
- package/dist/runtime/components/Form/Textarea.d.vue.ts +83 -0
- package/dist/runtime/components/Form/Textarea.vue +120 -0
- package/dist/runtime/components/Form/Textarea.vue.d.ts +83 -0
- package/dist/runtime/components/Modal.d.vue.ts +59 -0
- package/dist/runtime/components/Modal.vue +158 -0
- package/dist/runtime/components/Modal.vue.d.ts +59 -0
- package/dist/runtime/components/Pill.d.vue.ts +24 -0
- package/dist/runtime/components/Pill.vue +37 -0
- package/dist/runtime/components/Pill.vue.d.ts +24 -0
- package/dist/runtime/plugin.d.ts +2 -0
- package/dist/runtime/plugin.js +4 -0
- package/dist/runtime/public/assets/logo-full.svg +19 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/types.d.mts +7 -0
- package/package.json +62 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<label
|
|
3
|
+
class="radio group flex py-3 cursor-pointer"
|
|
4
|
+
:for="id"
|
|
5
|
+
>
|
|
6
|
+
<input
|
|
7
|
+
:id="id"
|
|
8
|
+
:ref="name"
|
|
9
|
+
class="sr-only peer"
|
|
10
|
+
type="radio"
|
|
11
|
+
:name="name"
|
|
12
|
+
:value="value"
|
|
13
|
+
:checked="value === modelValue || checked"
|
|
14
|
+
:disabled="disabled"
|
|
15
|
+
@change="emit('update:modelValue', $event.target.value)"
|
|
16
|
+
@focus="emit('focus', $event)"
|
|
17
|
+
>
|
|
18
|
+
<div
|
|
19
|
+
class="
|
|
20
|
+
radio-icon
|
|
21
|
+
relative
|
|
22
|
+
block
|
|
23
|
+
w-6
|
|
24
|
+
h-6
|
|
25
|
+
mr-2
|
|
26
|
+
border border-grey
|
|
27
|
+
rounded-xl
|
|
28
|
+
transition-all
|
|
29
|
+
ease-out
|
|
30
|
+
shrink-0
|
|
31
|
+
bg-white
|
|
32
|
+
hover:border-grey-dark
|
|
33
|
+
group-hover:border-grey-dark
|
|
34
|
+
peer-focus:border-green peer-focus:ring-4
|
|
35
|
+
ring-green/40
|
|
36
|
+
peer-checked:border-green
|
|
37
|
+
peer-checked:hover:border-green-dark
|
|
38
|
+
group-hover:peer-checked:border-green-dark
|
|
39
|
+
group-hover:peer-checked:after:bg-green-dark
|
|
40
|
+
peer-checked:after:absolute
|
|
41
|
+
peer-checked:after:content-['']
|
|
42
|
+
peer-checked:after:w-3
|
|
43
|
+
peer-checked:after:h-3
|
|
44
|
+
peer-checked:after:mt-[0.3125rem]
|
|
45
|
+
peer-checked:after:ml-[0.3125rem]
|
|
46
|
+
peer-checked:after:rounded-xl
|
|
47
|
+
peer-checked:after:transition-all
|
|
48
|
+
peer-checked:after:bg-green
|
|
49
|
+
peer-disabled:bg-grey-light
|
|
50
|
+
peer-disabled:border-grey
|
|
51
|
+
peer-disabled:after:bg-grey
|
|
52
|
+
peer-disabled:cursor-not-allowed
|
|
53
|
+
peer-disabled:hover:border-grey
|
|
54
|
+
peer-disabled:hover:after:bg-grey
|
|
55
|
+
"
|
|
56
|
+
/>
|
|
57
|
+
|
|
58
|
+
<div class="flex flex-col w-full">
|
|
59
|
+
<div
|
|
60
|
+
class="flex"
|
|
61
|
+
:class="{ 'flex-col tablet:flex-row': price }"
|
|
62
|
+
>
|
|
63
|
+
<span :class="{ 'text-grey-dark': disabled }">{{ label }}</span>
|
|
64
|
+
|
|
65
|
+
<Icon
|
|
66
|
+
v-if="tooltip"
|
|
67
|
+
name="eva:info-outline"
|
|
68
|
+
class="ml-2 cursor-pointer text-grey-dark"
|
|
69
|
+
/>
|
|
70
|
+
|
|
71
|
+
<IndPill
|
|
72
|
+
v-if="advice"
|
|
73
|
+
:label="adviceLabel"
|
|
74
|
+
/>
|
|
75
|
+
|
|
76
|
+
<div
|
|
77
|
+
v-if="number"
|
|
78
|
+
class="ml-auto text-grey-dark"
|
|
79
|
+
>{{ number }}</div>
|
|
80
|
+
<div
|
|
81
|
+
v-if="price && value === modelValue"
|
|
82
|
+
class="ml-0 tablet:ml-auto text-grey-dark"
|
|
83
|
+
>{{ price }}</div>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
<slot />
|
|
87
|
+
</div>
|
|
88
|
+
</label>
|
|
89
|
+
</template>
|
|
90
|
+
|
|
91
|
+
<script setup>
|
|
92
|
+
const emit = defineEmits(["update:modelValue", "focus"]);
|
|
93
|
+
defineProps({
|
|
94
|
+
id: String,
|
|
95
|
+
name: String,
|
|
96
|
+
label: String,
|
|
97
|
+
value: [String, Boolean],
|
|
98
|
+
modelValue: [String, Boolean],
|
|
99
|
+
checked: Boolean,
|
|
100
|
+
disabled: Boolean,
|
|
101
|
+
advice: Boolean,
|
|
102
|
+
adviceLabel: String,
|
|
103
|
+
tooltip: Boolean,
|
|
104
|
+
number: String,
|
|
105
|
+
price: String,
|
|
106
|
+
semibold: Boolean
|
|
107
|
+
});
|
|
108
|
+
</script>
|
|
109
|
+
|
|
110
|
+
<style>
|
|
111
|
+
@reference "../../assets/style.css";.radio:focus,.radio:hover{@apply border-grey}
|
|
112
|
+
</style>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
4
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
|
+
$slots: S;
|
|
6
|
+
});
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
id: StringConstructor;
|
|
9
|
+
name: StringConstructor;
|
|
10
|
+
label: StringConstructor;
|
|
11
|
+
value: (StringConstructor | BooleanConstructor)[];
|
|
12
|
+
modelValue: (StringConstructor | BooleanConstructor)[];
|
|
13
|
+
checked: BooleanConstructor;
|
|
14
|
+
disabled: BooleanConstructor;
|
|
15
|
+
advice: BooleanConstructor;
|
|
16
|
+
adviceLabel: StringConstructor;
|
|
17
|
+
tooltip: BooleanConstructor;
|
|
18
|
+
number: StringConstructor;
|
|
19
|
+
price: StringConstructor;
|
|
20
|
+
semibold: BooleanConstructor;
|
|
21
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
|
+
focus: (...args: any[]) => void;
|
|
23
|
+
"update:modelValue": (...args: any[]) => void;
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
|
+
id: StringConstructor;
|
|
26
|
+
name: StringConstructor;
|
|
27
|
+
label: StringConstructor;
|
|
28
|
+
value: (StringConstructor | BooleanConstructor)[];
|
|
29
|
+
modelValue: (StringConstructor | BooleanConstructor)[];
|
|
30
|
+
checked: BooleanConstructor;
|
|
31
|
+
disabled: BooleanConstructor;
|
|
32
|
+
advice: BooleanConstructor;
|
|
33
|
+
adviceLabel: StringConstructor;
|
|
34
|
+
tooltip: BooleanConstructor;
|
|
35
|
+
number: StringConstructor;
|
|
36
|
+
price: StringConstructor;
|
|
37
|
+
semibold: BooleanConstructor;
|
|
38
|
+
}>> & Readonly<{
|
|
39
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
|
40
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
41
|
+
}>, {
|
|
42
|
+
disabled: boolean;
|
|
43
|
+
checked: boolean;
|
|
44
|
+
advice: boolean;
|
|
45
|
+
tooltip: boolean;
|
|
46
|
+
semibold: boolean;
|
|
47
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
48
|
+
type __VLS_Slots = {
|
|
49
|
+
default?: ((props: {}) => any) | undefined;
|
|
50
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
4
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
|
+
$slots: S;
|
|
6
|
+
});
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
last: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
grid: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
last: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
grid: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
}>> & Readonly<{}>, {
|
|
26
|
+
grid: boolean;
|
|
27
|
+
last: boolean;
|
|
28
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
29
|
+
type __VLS_Slots = {
|
|
30
|
+
default?: ((props: {}) => any) | undefined;
|
|
31
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class=""
|
|
4
|
+
:class="[margin, grid]"
|
|
5
|
+
>
|
|
6
|
+
<slot />
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup>
|
|
11
|
+
import { computed } from "vue";
|
|
12
|
+
defineOptions({
|
|
13
|
+
name: "IndFormRow"
|
|
14
|
+
});
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
last: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false
|
|
19
|
+
},
|
|
20
|
+
grid: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const margin = computed(() => {
|
|
26
|
+
return {
|
|
27
|
+
"mb-6": !props.last,
|
|
28
|
+
"!mb-0": props.last
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
const grid = computed(() => {
|
|
32
|
+
return {
|
|
33
|
+
"": !props.grid,
|
|
34
|
+
"grid grid-cols-2 gap-4 desktop:grid-cols-4 desktop:gap-6": props.grid
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
</script>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
4
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
|
+
$slots: S;
|
|
6
|
+
});
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
last: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
grid: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
last: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
grid: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
}>> & Readonly<{}>, {
|
|
26
|
+
grid: boolean;
|
|
27
|
+
last: boolean;
|
|
28
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
29
|
+
type __VLS_Slots = {
|
|
30
|
+
default?: ((props: {}) => any) | undefined;
|
|
31
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
name: StringConstructor;
|
|
5
|
+
label: StringConstructor;
|
|
6
|
+
options: ArrayConstructor;
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
disabled: BooleanConstructor;
|
|
12
|
+
labelClasses: StringConstructor;
|
|
13
|
+
leadingIcon: StringConstructor;
|
|
14
|
+
defaultOption: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
error: StringConstructor;
|
|
19
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
+
blur: (...args: any[]) => void;
|
|
21
|
+
"update:modelValue": (...args: any[]) => void;
|
|
22
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
name: StringConstructor;
|
|
24
|
+
label: StringConstructor;
|
|
25
|
+
options: ArrayConstructor;
|
|
26
|
+
modelValue: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
disabled: BooleanConstructor;
|
|
31
|
+
labelClasses: StringConstructor;
|
|
32
|
+
leadingIcon: StringConstructor;
|
|
33
|
+
defaultOption: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
error: StringConstructor;
|
|
38
|
+
}>> & Readonly<{
|
|
39
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
40
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
41
|
+
}>, {
|
|
42
|
+
disabled: boolean;
|
|
43
|
+
modelValue: string;
|
|
44
|
+
defaultOption: string;
|
|
45
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<IndFormLabel
|
|
4
|
+
v-if="label"
|
|
5
|
+
:name="name"
|
|
6
|
+
:label="label"
|
|
7
|
+
:label-classes="labelClasses"
|
|
8
|
+
/>
|
|
9
|
+
<div class="relative">
|
|
10
|
+
<Icon
|
|
11
|
+
v-if="leadingIcon"
|
|
12
|
+
:name="leadingIcon"
|
|
13
|
+
class="absolute ml-3 mt-3 text-grey-darker"
|
|
14
|
+
/>
|
|
15
|
+
|
|
16
|
+
<select
|
|
17
|
+
:id="name"
|
|
18
|
+
class="
|
|
19
|
+
block
|
|
20
|
+
py-[0.6875rem]
|
|
21
|
+
px-3
|
|
22
|
+
w-full
|
|
23
|
+
bg-white
|
|
24
|
+
border border-grey
|
|
25
|
+
rounded-lg
|
|
26
|
+
transition-all
|
|
27
|
+
ease-out
|
|
28
|
+
hover:border-grey-dark
|
|
29
|
+
focus:border-purple focus:ring-1 focus:outline-none
|
|
30
|
+
ring-purple
|
|
31
|
+
appearance-none
|
|
32
|
+
disabled:bg-grey-light disabled:hover:border-grey
|
|
33
|
+
"
|
|
34
|
+
:name="name"
|
|
35
|
+
:disabled="disabled"
|
|
36
|
+
:value="modelValue"
|
|
37
|
+
:class="{ 'border-red-800': error, 'pl-10': leadingIcon }"
|
|
38
|
+
@change="emit('update:modelValue', $event.target.value)"
|
|
39
|
+
@blur="emit('blur', $event)"
|
|
40
|
+
>
|
|
41
|
+
<option
|
|
42
|
+
disabled
|
|
43
|
+
value=""
|
|
44
|
+
>
|
|
45
|
+
{{ defaultOption }}
|
|
46
|
+
</option>
|
|
47
|
+
|
|
48
|
+
<option
|
|
49
|
+
v-for="option in options"
|
|
50
|
+
:key="option.value"
|
|
51
|
+
:value="option.value"
|
|
52
|
+
>
|
|
53
|
+
{{ option.label }}
|
|
54
|
+
</option>
|
|
55
|
+
</select>
|
|
56
|
+
|
|
57
|
+
<Icon
|
|
58
|
+
name="eva:arrow-ios-downward-outline"
|
|
59
|
+
class="absolute bottom-3 right-3 pointer-events-none text-purple"
|
|
60
|
+
/>
|
|
61
|
+
</div>
|
|
62
|
+
<div
|
|
63
|
+
v-if="error"
|
|
64
|
+
class="mt-1 text-red-800"
|
|
65
|
+
>
|
|
66
|
+
{{ error }}
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<script setup>
|
|
72
|
+
const emit = defineEmits(["update:modelValue", "blur"]);
|
|
73
|
+
defineProps({
|
|
74
|
+
name: String,
|
|
75
|
+
label: String,
|
|
76
|
+
options: Array,
|
|
77
|
+
modelValue: {
|
|
78
|
+
type: String,
|
|
79
|
+
default: ""
|
|
80
|
+
},
|
|
81
|
+
disabled: Boolean,
|
|
82
|
+
labelClasses: String,
|
|
83
|
+
leadingIcon: String,
|
|
84
|
+
defaultOption: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: "Kies"
|
|
87
|
+
},
|
|
88
|
+
error: String
|
|
89
|
+
});
|
|
90
|
+
</script>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
name: StringConstructor;
|
|
5
|
+
label: StringConstructor;
|
|
6
|
+
options: ArrayConstructor;
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
disabled: BooleanConstructor;
|
|
12
|
+
labelClasses: StringConstructor;
|
|
13
|
+
leadingIcon: StringConstructor;
|
|
14
|
+
defaultOption: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
error: StringConstructor;
|
|
19
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
+
blur: (...args: any[]) => void;
|
|
21
|
+
"update:modelValue": (...args: any[]) => void;
|
|
22
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
name: StringConstructor;
|
|
24
|
+
label: StringConstructor;
|
|
25
|
+
options: ArrayConstructor;
|
|
26
|
+
modelValue: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
disabled: BooleanConstructor;
|
|
31
|
+
labelClasses: StringConstructor;
|
|
32
|
+
leadingIcon: StringConstructor;
|
|
33
|
+
defaultOption: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
error: StringConstructor;
|
|
38
|
+
}>> & Readonly<{
|
|
39
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
40
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
41
|
+
}>, {
|
|
42
|
+
disabled: boolean;
|
|
43
|
+
modelValue: string;
|
|
44
|
+
defaultOption: string;
|
|
45
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
id: StringConstructor;
|
|
5
|
+
name: StringConstructor;
|
|
6
|
+
label: StringConstructor;
|
|
7
|
+
value: StringConstructor;
|
|
8
|
+
inputmode: StringConstructor;
|
|
9
|
+
pattern: StringConstructor;
|
|
10
|
+
checked: BooleanConstructor;
|
|
11
|
+
disabled: BooleanConstructor;
|
|
12
|
+
advice: BooleanConstructor;
|
|
13
|
+
options: ArrayConstructor;
|
|
14
|
+
modelValue: StringConstructor;
|
|
15
|
+
largeTitle: BooleanConstructor;
|
|
16
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
"update:modelValue": (...args: any[]) => void;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
id: StringConstructor;
|
|
20
|
+
name: StringConstructor;
|
|
21
|
+
label: StringConstructor;
|
|
22
|
+
value: StringConstructor;
|
|
23
|
+
inputmode: StringConstructor;
|
|
24
|
+
pattern: StringConstructor;
|
|
25
|
+
checked: BooleanConstructor;
|
|
26
|
+
disabled: BooleanConstructor;
|
|
27
|
+
advice: BooleanConstructor;
|
|
28
|
+
options: ArrayConstructor;
|
|
29
|
+
modelValue: StringConstructor;
|
|
30
|
+
largeTitle: BooleanConstructor;
|
|
31
|
+
}>> & Readonly<{
|
|
32
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
disabled: boolean;
|
|
35
|
+
checked: boolean;
|
|
36
|
+
advice: boolean;
|
|
37
|
+
largeTitle: boolean;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex gap-1 p-1 bg-white border border-grey rounded-lg hover:border-grey-dark transition-all">
|
|
3
|
+
<label
|
|
4
|
+
v-for="option in options"
|
|
5
|
+
:key="option.id || option.value"
|
|
6
|
+
class="relative flex w-1/2 cursor-pointer"
|
|
7
|
+
:for="option.id"
|
|
8
|
+
>
|
|
9
|
+
<input
|
|
10
|
+
:id="option.id"
|
|
11
|
+
:ref="option.name"
|
|
12
|
+
class="sr-only peer"
|
|
13
|
+
type="radio"
|
|
14
|
+
:name="option.name"
|
|
15
|
+
:value="option.value"
|
|
16
|
+
:checked="option.value === modelValue"
|
|
17
|
+
:disabled="option.disabled"
|
|
18
|
+
@change="emit('update:modelValue', $event.target.value)"
|
|
19
|
+
>
|
|
20
|
+
<div
|
|
21
|
+
class="
|
|
22
|
+
relative
|
|
23
|
+
flex
|
|
24
|
+
w-full
|
|
25
|
+
p-2
|
|
26
|
+
px-1
|
|
27
|
+
rounded
|
|
28
|
+
transition-all
|
|
29
|
+
ease-out
|
|
30
|
+
duration-500
|
|
31
|
+
bg-white
|
|
32
|
+
peer-focus:border-purple peer-focus:ring-1
|
|
33
|
+
ring-purple
|
|
34
|
+
peer-checked:bg-purple
|
|
35
|
+
peer-checked:!text-white
|
|
36
|
+
peer-disabled:bg-white
|
|
37
|
+
peer-disabled:!text-grey-dark
|
|
38
|
+
peer-disabled:cursor-not-allowed
|
|
39
|
+
peer-disabled:hover:bg-white
|
|
40
|
+
peer-checked:hover:bg-purple
|
|
41
|
+
hover:bg-black/20
|
|
42
|
+
"
|
|
43
|
+
>
|
|
44
|
+
<div class="w-full text-center">
|
|
45
|
+
<div
|
|
46
|
+
class="tab font-semibold"
|
|
47
|
+
:class="{ ' tablet:text-xl': largeTitle }"
|
|
48
|
+
>{{ option.label }}</div>
|
|
49
|
+
<div
|
|
50
|
+
v-if="option.description"
|
|
51
|
+
class="text-sm"
|
|
52
|
+
>{{ option.description }}</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</label>
|
|
56
|
+
</div>
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<script setup>
|
|
60
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
61
|
+
defineProps({
|
|
62
|
+
id: String,
|
|
63
|
+
name: String,
|
|
64
|
+
label: String,
|
|
65
|
+
value: String,
|
|
66
|
+
inputmode: String,
|
|
67
|
+
pattern: String,
|
|
68
|
+
checked: Boolean,
|
|
69
|
+
disabled: Boolean,
|
|
70
|
+
advice: Boolean,
|
|
71
|
+
options: Array,
|
|
72
|
+
modelValue: String,
|
|
73
|
+
largeTitle: Boolean
|
|
74
|
+
});
|
|
75
|
+
</script>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
id: StringConstructor;
|
|
5
|
+
name: StringConstructor;
|
|
6
|
+
label: StringConstructor;
|
|
7
|
+
value: StringConstructor;
|
|
8
|
+
inputmode: StringConstructor;
|
|
9
|
+
pattern: StringConstructor;
|
|
10
|
+
checked: BooleanConstructor;
|
|
11
|
+
disabled: BooleanConstructor;
|
|
12
|
+
advice: BooleanConstructor;
|
|
13
|
+
options: ArrayConstructor;
|
|
14
|
+
modelValue: StringConstructor;
|
|
15
|
+
largeTitle: BooleanConstructor;
|
|
16
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
"update:modelValue": (...args: any[]) => void;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
id: StringConstructor;
|
|
20
|
+
name: StringConstructor;
|
|
21
|
+
label: StringConstructor;
|
|
22
|
+
value: StringConstructor;
|
|
23
|
+
inputmode: StringConstructor;
|
|
24
|
+
pattern: StringConstructor;
|
|
25
|
+
checked: BooleanConstructor;
|
|
26
|
+
disabled: BooleanConstructor;
|
|
27
|
+
advice: BooleanConstructor;
|
|
28
|
+
options: ArrayConstructor;
|
|
29
|
+
modelValue: StringConstructor;
|
|
30
|
+
largeTitle: BooleanConstructor;
|
|
31
|
+
}>> & Readonly<{
|
|
32
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
disabled: boolean;
|
|
35
|
+
checked: boolean;
|
|
36
|
+
advice: boolean;
|
|
37
|
+
largeTitle: boolean;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
name: StringConstructor;
|
|
5
|
+
label: StringConstructor;
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
tooltip: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
modelValue: (StringConstructor | NumberConstructor)[];
|
|
12
|
+
inputmode: StringConstructor;
|
|
13
|
+
pattern: StringConstructor;
|
|
14
|
+
min: StringConstructor;
|
|
15
|
+
autocomplete: StringConstructor;
|
|
16
|
+
leadingIcon: StringConstructor;
|
|
17
|
+
trailingIcon: StringConstructor;
|
|
18
|
+
disabled: BooleanConstructor;
|
|
19
|
+
steps: BooleanConstructor;
|
|
20
|
+
description: StringConstructor;
|
|
21
|
+
descriptionTop: StringConstructor;
|
|
22
|
+
placeholder: StringConstructor;
|
|
23
|
+
labelClasses: StringConstructor;
|
|
24
|
+
error: StringConstructor;
|
|
25
|
+
mask: {
|
|
26
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
rows: {
|
|
30
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
31
|
+
default: number;
|
|
32
|
+
};
|
|
33
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
34
|
+
input: (...args: any[]) => void;
|
|
35
|
+
blur: (...args: any[]) => void;
|
|
36
|
+
focus: (...args: any[]) => void;
|
|
37
|
+
"update:modelValue": (...args: any[]) => void;
|
|
38
|
+
"step-up": (...args: any[]) => void;
|
|
39
|
+
"step-down": (...args: any[]) => void;
|
|
40
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
41
|
+
name: StringConstructor;
|
|
42
|
+
label: StringConstructor;
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
tooltip: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
modelValue: (StringConstructor | NumberConstructor)[];
|
|
49
|
+
inputmode: StringConstructor;
|
|
50
|
+
pattern: StringConstructor;
|
|
51
|
+
min: StringConstructor;
|
|
52
|
+
autocomplete: StringConstructor;
|
|
53
|
+
leadingIcon: StringConstructor;
|
|
54
|
+
trailingIcon: StringConstructor;
|
|
55
|
+
disabled: BooleanConstructor;
|
|
56
|
+
steps: BooleanConstructor;
|
|
57
|
+
description: StringConstructor;
|
|
58
|
+
descriptionTop: StringConstructor;
|
|
59
|
+
placeholder: StringConstructor;
|
|
60
|
+
labelClasses: StringConstructor;
|
|
61
|
+
error: StringConstructor;
|
|
62
|
+
mask: {
|
|
63
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
rows: {
|
|
67
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
68
|
+
default: number;
|
|
69
|
+
};
|
|
70
|
+
}>> & Readonly<{
|
|
71
|
+
onInput?: ((...args: any[]) => any) | undefined;
|
|
72
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
73
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
|
74
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
75
|
+
"onStep-up"?: ((...args: any[]) => any) | undefined;
|
|
76
|
+
"onStep-down"?: ((...args: any[]) => any) | undefined;
|
|
77
|
+
}>, {
|
|
78
|
+
disabled: boolean;
|
|
79
|
+
mask: string | Record<string, any>;
|
|
80
|
+
tooltip: boolean;
|
|
81
|
+
steps: boolean;
|
|
82
|
+
rows: string | number;
|
|
83
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|