@teammodlr/ui-kit 2.0.20 → 2.0.22
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/lib/__storybook__/argTypes.d.ts +40 -40
- package/lib/__storybook__/createStory.d.ts +8 -8
- package/lib/__storybook__/index.d.ts +2 -2
- package/lib/components/avatar/Avatar.vue.d.ts +56 -56
- package/lib/components/avatar/style/Avatar.css.d.ts +9 -9
- package/lib/components/avatar/style/index.d.ts +1 -1
- package/lib/components/avatargroup/AvatarGroup.vue.d.ts +49 -49
- package/lib/components/avatargroup/style/AvatarGroup.css.d.ts +2 -2
- package/lib/components/avatargroup/style/index.d.ts +1 -1
- package/lib/components/avatargroup/symbol.d.ts +13 -13
- package/lib/components/badge/Badge.vue.d.ts +30 -30
- package/lib/components/badge/style/Badge.css.d.ts +4 -4
- package/lib/components/badge/style/index.d.ts +1 -1
- package/lib/components/breadcrumb/Breadcrumb.vue.d.ts +34 -34
- package/lib/components/breadcrumb/BreadcrumbItem.vue.d.ts +29 -29
- package/lib/components/breadcrumb/style/Breadcrumb.css.d.ts +4 -4
- package/lib/components/breadcrumb/style/index.d.ts +1 -1
- package/lib/components/breadcrumb/symbol.d.ts +13 -13
- package/lib/components/button/Button.vue.d.ts +141 -141
- package/lib/components/button/style/Button.css.d.ts +25 -25
- package/lib/components/button/style/index.d.ts +1 -1
- package/lib/components/buttongroup/ButtonGroup.vue.d.ts +18 -18
- package/lib/components/buttongroup/style/ButtonGroup.css.d.ts +2 -2
- package/lib/components/buttongroup/style/index.d.ts +1 -1
- package/lib/components/buttongroup/symbol.d.ts +6 -6
- package/lib/components/checkbox/Checkbox.vue.d.ts +94 -94
- package/lib/components/checkbox/style/Checkbox.css.d.ts +16 -16
- package/lib/components/checkbox/style/index.d.ts +1 -1
- package/lib/components/colorpicker/ColorPicker.vue.d.ts +77 -77
- package/lib/components/colorpicker/style/ColorPicker.css.d.ts +10 -10
- package/lib/components/colorpicker/style/index.d.ts +1 -1
- package/lib/components/colorpicker/utils.d.ts +16 -16
- package/lib/components/dropdown/Dropdown.vue.d.ts +122 -115
- package/lib/components/dropdown/DropdownItem.vue.d.ts +78 -78
- package/lib/components/dropdown/DropdownList.vue.d.ts +5 -5
- package/lib/components/dropdown/DropdownSeperator.vue.d.ts +4 -4
- package/lib/components/dropdown/DropdownWrapper.vue.d.ts +2 -2
- package/lib/components/dropdown/hooks.d.ts +2 -2
- package/lib/components/dropdown/style/Dropdown.css.d.ts +6 -6
- package/lib/components/dropdown/style/index.d.ts +1 -1
- package/lib/components/dropdown/symbol.d.ts +6 -6
- package/lib/components/form/Form.vue.d.ts +75 -75
- package/lib/components/form/style/Form.css.d.ts +4 -4
- package/lib/components/form/style/index.d.ts +2 -2
- package/lib/components/form/symbol.d.ts +9 -9
- package/lib/components/image/Image.vue.d.ts +50 -50
- package/lib/components/index.d.ts +40 -39
- package/lib/components/input/Input.vue.d.ts +142 -142
- package/lib/components/input/style/Input.css.d.ts +23 -23
- package/lib/components/input/style/index.d.ts +1 -1
- package/lib/components/link/Link.vue.d.ts +51 -51
- package/lib/components/messageprovider/Message.vue.d.ts +73 -73
- package/lib/components/messageprovider/MessageProvider.vue.d.ts +52 -52
- package/lib/components/messageprovider/style/Message.css.d.ts +12 -12
- package/lib/components/messageprovider/style/index.d.ts +1 -1
- package/lib/components/messageprovider/types.d.ts +29 -29
- package/lib/components/messageprovider/useMessage.d.ts +2 -2
- package/lib/components/modal/Modal.vue.d.ts +52 -52
- package/lib/components/modal/style/Modal.css.d.ts +21 -21
- package/lib/components/modal/style/index.d.ts +1 -1
- package/lib/components/pagination/Pagination.vue.d.ts +75 -75
- package/lib/components/pagination/style/Pagination.css.d.ts +10 -10
- package/lib/components/pagination/style/index.d.ts +1 -1
- package/lib/components/radio/Radio.vue.d.ts +85 -85
- package/lib/components/radio/style/Checkbox.css.d.ts +16 -16
- package/lib/components/radio/style/index.d.ts +1 -1
- package/lib/components/radiobutton/RadioButton.vue.d.ts +98 -98
- package/lib/components/radiobutton/style/RadioButton.css.d.ts +14 -14
- package/lib/components/radiobutton/style/index.d.ts +1 -1
- package/lib/components/radiobuttongroup/RadioButtonGroup.vue.d.ts +48 -48
- package/lib/components/radiobuttongroup/style/RadioButtonGroup.css.d.ts +3 -3
- package/lib/components/radiobuttongroup/style/index.d.ts +1 -1
- package/lib/components/radiobuttongroup/symbol.d.ts +9 -9
- package/lib/components/select/Select.vue.d.ts +194 -194
- package/lib/components/select/style/Select.css.d.ts +31 -31
- package/lib/components/select/style/index.d.ts +1 -1
- package/lib/components/skeleton/Skeleton.vue.d.ts +33 -33
- package/lib/components/skeleton/style/Skeleton.css.d.ts +8 -8
- package/lib/components/skeleton/style/index.d.ts +2 -2
- package/lib/components/slider/Slider.vue.d.ts +32 -32
- package/lib/components/slider/style/Slider.css.d.ts +4 -4
- package/lib/components/slider/style/index.d.ts +1 -1
- package/lib/components/tab/Tab.vue.d.ts +41 -41
- package/lib/components/tab/TabGroup.vue.d.ts +43 -43
- package/lib/components/table/Table.vue.d.ts +62 -62
- package/lib/components/table/TableBody.vue.d.ts +2 -2
- package/lib/components/table/TableCell.vue.d.ts +2 -2
- package/lib/components/table/TableHead.vue.d.ts +30 -30
- package/lib/components/table/TableHeadRow.vue.d.ts +2 -2
- package/lib/components/table/TableRow.vue.d.ts +2 -2
- package/lib/components/table/style/Table.css.d.ts +4 -4
- package/lib/components/table/style/index.d.ts +1 -1
- package/lib/components/table/types/index.d.ts +6 -6
- package/lib/components/tag/Tag.vue.d.ts +44 -44
- package/lib/components/tag/style/Tag.css.d.ts +11 -11
- package/lib/components/tag/style/index.d.ts +1 -1
- package/lib/components/textarea/TextArea.vue.d.ts +137 -0
- package/lib/components/textarea/style/TextArea.css.d.ts +19 -0
- package/lib/components/textarea/style/index.d.ts +1 -0
- package/lib/components/tooltip/Tooltip.vue.d.ts +71 -71
- package/lib/components/tooltip/style/Tooltip.css.d.ts +10 -10
- package/lib/components/tooltip/style/index.d.ts +1 -1
- package/lib/components/transfer/Transfer.vue.d.ts +67 -67
- package/lib/components/transfer/style/Transfer.css.d.ts +7 -7
- package/lib/components/transfer/style/index.d.ts +1 -1
- package/lib/components/virtualscroll/VirtualScroll.vue.d.ts +73 -73
- package/lib/components/virtualscroll/style/VirtualScroll.css.d.ts +1 -1
- package/lib/components/virtualscroll/style/index.d.ts +1 -1
- package/lib/composables/element.d.ts +2 -2
- package/lib/composables/index.d.ts +3 -3
- package/lib/composables/useCachedUid.d.ts +13 -13
- package/lib/composables/useEventListener.d.ts +1 -1
- package/lib/composables/useInput.d.ts +36 -36
- package/lib/composables/useInteractive.d.ts +15 -15
- package/lib/composables/useIsServer.d.ts +1 -1
- package/lib/composables/useMount.d.ts +13 -13
- package/lib/composables/usePopper.d.ts +31 -31
- package/lib/composables/useZIndex.d.ts +8 -8
- package/lib/create.d.ts +9 -9
- package/lib/index.cjs.js +4 -4
- package/lib/index.d.ts +5 -5
- package/lib/index.es.js +2271 -2108
- package/lib/install.d.ts +4 -4
- package/lib/style.css +1 -1
- package/lib/styles/theme.css.d.ts +167 -167
- package/lib/styles/typography.css.d.ts +22 -22
- package/lib/types/props.d.ts +3 -3
- package/package.json +1 -1
- package/src/components/avatargroup/AvatarGroup.vue +71 -71
- package/src/components/avatargroup/symbol.ts +16 -16
- package/src/components/breadcrumb/BreadcrumbItem.vue +72 -72
- package/src/components/breadcrumb/style/Breadcrumb.css.ts +39 -39
- package/src/components/breadcrumb/symbol.ts +16 -16
- package/src/components/button/Button.vue +203 -203
- package/src/components/buttongroup/ButtonGroup.vue +36 -36
- package/src/components/buttongroup/symbol.ts +7 -7
- package/src/components/colorpicker/ColorPicker.vue +2 -2
- package/src/components/dropdown/Dropdown.vue +10 -5
- package/src/components/dropdown/DropdownItem.vue +134 -134
- package/src/components/dropdown/DropdownSeperator.vue +22 -22
- package/src/components/dropdown/symbol.ts +7 -7
- package/src/components/form/style/Form.css.ts +22 -22
- package/src/components/form/style/index.ts +1 -1
- package/src/components/form/symbol.ts +10 -10
- package/src/components/index.ts +2 -1
- package/src/components/modal/examples/index.ts +2 -2
- package/src/components/pagination/Pagination.vue +229 -229
- package/src/components/pagination/examples/basic.vue +17 -17
- package/src/components/pagination/examples/index.stories.ts +14 -14
- package/src/components/pagination/style/Pagination.css.ts +87 -87
- package/src/components/pagination/style/index.ts +1 -1
- package/src/components/radiobutton/RadioButton.vue +131 -131
- package/src/components/radiobutton/style/RadioButton.css.ts +183 -183
- package/src/components/radiobutton/style/index.ts +1 -1
- package/src/components/radiobuttongroup/RadioButtonGroup.vue +74 -74
- package/src/components/radiobuttongroup/style/RadioButtonGroup.css.ts +36 -36
- package/src/components/radiobuttongroup/symbol.ts +10 -10
- package/src/components/skeleton/Skeleton.vue +55 -55
- package/src/components/skeleton/style/Skeleton.css.ts +56 -56
- package/src/components/skeleton/style/index.ts +1 -1
- package/src/components/table/style/Table.css.ts +80 -80
- package/src/components/textarea/TextArea.css +173 -0
- package/src/components/textarea/TextArea.vue +181 -0
- package/src/components/textarea/examples/basic.vue +8 -0
- package/src/components/textarea/examples/index.stories.ts +18 -0
- package/src/components/textarea/examples/index.ts +1 -0
- package/src/components/textarea/style/TextArea.css.ts +190 -0
- package/src/components/textarea/style/index.ts +1 -0
- package/src/components/tooltip/style/Tooltip.css.ts +91 -91
- package/src/components/tooltip/style/index.ts +1 -1
- package/src/components/transfer/Transfer.vue +143 -143
- package/src/components/transfer/examples/basic.vue +20 -20
- package/src/components/transfer/examples/index.stories.ts +15 -15
- package/src/components/transfer/examples/index.ts +1 -1
- package/src/components/transfer/style/Transfer.css.ts +67 -67
- package/src/components/transfer/style/index.ts +1 -1
- package/src/composables/index.ts +2 -2
- package/src/composables/useInteractive.ts +19 -19
- package/src/composables/useZIndex.ts +30 -30
- package/src/examples/cards/cards.stories.ts +9 -9
- package/src/examples/cards/sidebar.vue +262 -262
- package/src/styles/theme.css.ts +170 -170
|
@@ -1,134 +1,134 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component :is="computedType" :href="href" ref="wrapper" :class="computedWrapperClasses" role="menuitem" tabindex="0" @click="handleSelect" v-bind="$attrs">
|
|
3
|
-
<div v-if="hasIconLeft" :class="style.menuItemIcon">
|
|
4
|
-
<slot name="icon-left" />
|
|
5
|
-
</div>
|
|
6
|
-
<div :class="style.menuItemText">
|
|
7
|
-
<slot />
|
|
8
|
-
</div>
|
|
9
|
-
<!-- <div v-if="hotkey" class="m-dropdown__hotkeys">
|
|
10
|
-
<template v-for="key in hotkey.split('+')">
|
|
11
|
-
<kbd>{{ key }}</kbd>
|
|
12
|
-
</template>
|
|
13
|
-
</div> -->
|
|
14
|
-
<div v-if="hasIconRight" :class="style.menuItemIcon">
|
|
15
|
-
<slot name="icon-right" />
|
|
16
|
-
</div>
|
|
17
|
-
</component>
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<script lang="ts">
|
|
21
|
-
import {computed, defineComponent, inject, type PropType, ref, toRef} from 'vue';
|
|
22
|
-
import {useLabel} from './hooks';
|
|
23
|
-
import * as style from "./style";
|
|
24
|
-
|
|
25
|
-
export default defineComponent({
|
|
26
|
-
name: "DropdownItem",
|
|
27
|
-
props: {
|
|
28
|
-
label: {
|
|
29
|
-
type: [String, Number],
|
|
30
|
-
default: null
|
|
31
|
-
},
|
|
32
|
-
disabled: {
|
|
33
|
-
type: Boolean,
|
|
34
|
-
default: false
|
|
35
|
-
},
|
|
36
|
-
reference: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: false
|
|
39
|
-
},
|
|
40
|
-
onSelect: {
|
|
41
|
-
type: Function as PropType<(label: string | number) => void>,
|
|
42
|
-
default: () => { }
|
|
43
|
-
},
|
|
44
|
-
hotkey: {
|
|
45
|
-
type: String,
|
|
46
|
-
default: null
|
|
47
|
-
},
|
|
48
|
-
description: {
|
|
49
|
-
type: String,
|
|
50
|
-
default: null
|
|
51
|
-
},
|
|
52
|
-
href: {
|
|
53
|
-
type: String,
|
|
54
|
-
default: null
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
emits: [],
|
|
58
|
-
setup(props, { slots }) {
|
|
59
|
-
const parentSelect = inject('dropdown-select', null);
|
|
60
|
-
// const state = inject(DROPDOWN_STATE, null);
|
|
61
|
-
// const keys = useMagicKeys({
|
|
62
|
-
// passive: false,
|
|
63
|
-
// onEventFired: (event) => {
|
|
64
|
-
|
|
65
|
-
// // only fire when the dropdown is open
|
|
66
|
-
// if (state?.isOpen.value) {
|
|
67
|
-
// event.preventDefault();
|
|
68
|
-
// }
|
|
69
|
-
// }
|
|
70
|
-
// });
|
|
71
|
-
|
|
72
|
-
const hasIconLeft = computed(() => !!(slots['icon-left']));
|
|
73
|
-
const hasIconRight = computed(() => !!(slots['icon-right']));
|
|
74
|
-
|
|
75
|
-
const wrapper = ref(null);
|
|
76
|
-
const label = toRef(props, 'label')
|
|
77
|
-
const isReference = ref(props.reference)
|
|
78
|
-
const currentLabel = useLabel(label, wrapper)
|
|
79
|
-
function handleSelect() {
|
|
80
|
-
if (props.disabled || isReference.value) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
if (typeof parentSelect === 'function') {
|
|
85
|
-
// @ts-ignore
|
|
86
|
-
parentSelect([currentLabel.value!]);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
props.onSelect(currentLabel.value!);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// const isOpen = computed(() => {
|
|
93
|
-
// return state?.isOpen.value;
|
|
94
|
-
// });
|
|
95
|
-
|
|
96
|
-
const computedWrapperClasses = computed(() => {
|
|
97
|
-
return [
|
|
98
|
-
style.menuItem
|
|
99
|
-
]
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
const computedType = computed(() => {
|
|
103
|
-
if (props.href) {
|
|
104
|
-
return 'a';
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return 'li';
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
// onMounted(() => {
|
|
111
|
-
// if (props.hotkey) {
|
|
112
|
-
// const combination = keys[props.hotkey];
|
|
113
|
-
|
|
114
|
-
// whenever(combination, (v) => {
|
|
115
|
-
// if (v && isOpen.value) {
|
|
116
|
-
// handleSelect();
|
|
117
|
-
// }
|
|
118
|
-
// })
|
|
119
|
-
// }
|
|
120
|
-
// })
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
return {
|
|
124
|
-
wrapper,
|
|
125
|
-
hasIconLeft,
|
|
126
|
-
hasIconRight,
|
|
127
|
-
handleSelect,
|
|
128
|
-
computedWrapperClasses,
|
|
129
|
-
style,
|
|
130
|
-
computedType
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
})
|
|
134
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<component :is="computedType" :href="href" ref="wrapper" :class="computedWrapperClasses" role="menuitem" tabindex="0" @click="handleSelect" v-bind="$attrs">
|
|
3
|
+
<div v-if="hasIconLeft" :class="style.menuItemIcon">
|
|
4
|
+
<slot name="icon-left" />
|
|
5
|
+
</div>
|
|
6
|
+
<div :class="style.menuItemText">
|
|
7
|
+
<slot />
|
|
8
|
+
</div>
|
|
9
|
+
<!-- <div v-if="hotkey" class="m-dropdown__hotkeys">
|
|
10
|
+
<template v-for="key in hotkey.split('+')">
|
|
11
|
+
<kbd>{{ key }}</kbd>
|
|
12
|
+
</template>
|
|
13
|
+
</div> -->
|
|
14
|
+
<div v-if="hasIconRight" :class="style.menuItemIcon">
|
|
15
|
+
<slot name="icon-right" />
|
|
16
|
+
</div>
|
|
17
|
+
</component>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script lang="ts">
|
|
21
|
+
import {computed, defineComponent, inject, type PropType, ref, toRef} from 'vue';
|
|
22
|
+
import {useLabel} from './hooks';
|
|
23
|
+
import * as style from "./style";
|
|
24
|
+
|
|
25
|
+
export default defineComponent({
|
|
26
|
+
name: "DropdownItem",
|
|
27
|
+
props: {
|
|
28
|
+
label: {
|
|
29
|
+
type: [String, Number],
|
|
30
|
+
default: null
|
|
31
|
+
},
|
|
32
|
+
disabled: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false
|
|
35
|
+
},
|
|
36
|
+
reference: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false
|
|
39
|
+
},
|
|
40
|
+
onSelect: {
|
|
41
|
+
type: Function as PropType<(label: string | number) => void>,
|
|
42
|
+
default: () => { }
|
|
43
|
+
},
|
|
44
|
+
hotkey: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: null
|
|
47
|
+
},
|
|
48
|
+
description: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: null
|
|
51
|
+
},
|
|
52
|
+
href: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: null
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
emits: [],
|
|
58
|
+
setup(props, { slots }) {
|
|
59
|
+
const parentSelect = inject('dropdown-select', null);
|
|
60
|
+
// const state = inject(DROPDOWN_STATE, null);
|
|
61
|
+
// const keys = useMagicKeys({
|
|
62
|
+
// passive: false,
|
|
63
|
+
// onEventFired: (event) => {
|
|
64
|
+
|
|
65
|
+
// // only fire when the dropdown is open
|
|
66
|
+
// if (state?.isOpen.value) {
|
|
67
|
+
// event.preventDefault();
|
|
68
|
+
// }
|
|
69
|
+
// }
|
|
70
|
+
// });
|
|
71
|
+
|
|
72
|
+
const hasIconLeft = computed(() => !!(slots['icon-left']));
|
|
73
|
+
const hasIconRight = computed(() => !!(slots['icon-right']));
|
|
74
|
+
|
|
75
|
+
const wrapper = ref(null);
|
|
76
|
+
const label = toRef(props, 'label')
|
|
77
|
+
const isReference = ref(props.reference)
|
|
78
|
+
const currentLabel = useLabel(label, wrapper)
|
|
79
|
+
function handleSelect() {
|
|
80
|
+
if (props.disabled || isReference.value) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (typeof parentSelect === 'function') {
|
|
85
|
+
// @ts-ignore
|
|
86
|
+
parentSelect([currentLabel.value!]);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
props.onSelect(currentLabel.value!);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// const isOpen = computed(() => {
|
|
93
|
+
// return state?.isOpen.value;
|
|
94
|
+
// });
|
|
95
|
+
|
|
96
|
+
const computedWrapperClasses = computed(() => {
|
|
97
|
+
return [
|
|
98
|
+
style.menuItem
|
|
99
|
+
]
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
const computedType = computed(() => {
|
|
103
|
+
if (props.href) {
|
|
104
|
+
return 'a';
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return 'li';
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
// onMounted(() => {
|
|
111
|
+
// if (props.hotkey) {
|
|
112
|
+
// const combination = keys[props.hotkey];
|
|
113
|
+
|
|
114
|
+
// whenever(combination, (v) => {
|
|
115
|
+
// if (v && isOpen.value) {
|
|
116
|
+
// handleSelect();
|
|
117
|
+
// }
|
|
118
|
+
// })
|
|
119
|
+
// }
|
|
120
|
+
// })
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
return {
|
|
124
|
+
wrapper,
|
|
125
|
+
hasIconLeft,
|
|
126
|
+
hasIconRight,
|
|
127
|
+
handleSelect,
|
|
128
|
+
computedWrapperClasses,
|
|
129
|
+
style,
|
|
130
|
+
computedType
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
})
|
|
134
|
+
</script>
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<li :class="computedClasses"></li>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script lang="ts">
|
|
6
|
-
import {computed, defineComponent} from "vue";
|
|
7
|
-
import * as style from "./style";
|
|
8
|
-
|
|
9
|
-
export default defineComponent({
|
|
10
|
-
name: "DropdownSeperator",
|
|
11
|
-
setup() {
|
|
12
|
-
const computedClasses = computed(() => {
|
|
13
|
-
return [
|
|
14
|
-
style.menuSeperator
|
|
15
|
-
]
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
return {
|
|
19
|
-
computedClasses
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
})
|
|
1
|
+
<template>
|
|
2
|
+
<li :class="computedClasses"></li>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script lang="ts">
|
|
6
|
+
import {computed, defineComponent} from "vue";
|
|
7
|
+
import * as style from "./style";
|
|
8
|
+
|
|
9
|
+
export default defineComponent({
|
|
10
|
+
name: "DropdownSeperator",
|
|
11
|
+
setup() {
|
|
12
|
+
const computedClasses = computed(() => {
|
|
13
|
+
return [
|
|
14
|
+
style.menuSeperator
|
|
15
|
+
]
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
computedClasses
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
23
|
</script>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {InjectionKey} from "vue";
|
|
2
|
-
|
|
3
|
-
export interface DropdownState {
|
|
4
|
-
handleSelect: (labels: string[]) => void;
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
}
|
|
7
|
-
|
|
1
|
+
import type {InjectionKey} from "vue";
|
|
2
|
+
|
|
3
|
+
export interface DropdownState {
|
|
4
|
+
handleSelect: (labels: string[]) => void;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
8
|
export const DROPDOWN_STATE: InjectionKey<DropdownState> = Symbol('DROPDOWN_STATE');
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {createVar, globalKeyframes, globalStyle, style} from "@vanilla-extract/css";
|
|
2
|
-
import {themeVars} from "../../../styles/theme.css";
|
|
3
|
-
|
|
4
|
-
const borderRadiuses = {
|
|
5
|
-
xs: '2px',
|
|
6
|
-
sm: '3px',
|
|
7
|
-
md: '4px',
|
|
8
|
-
lg: '6px',
|
|
9
|
-
xl: '8px',
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const vars = {
|
|
13
|
-
spacing: createVar(),
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const base = style({
|
|
17
|
-
vars: {
|
|
18
|
-
[vars.spacing]: themeVars.space[4]
|
|
19
|
-
},
|
|
20
|
-
display: "flex",
|
|
21
|
-
flexDirection: "column",
|
|
22
|
-
gap: vars.spacing,
|
|
1
|
+
import {createVar, globalKeyframes, globalStyle, style} from "@vanilla-extract/css";
|
|
2
|
+
import {themeVars} from "../../../styles/theme.css";
|
|
3
|
+
|
|
4
|
+
const borderRadiuses = {
|
|
5
|
+
xs: '2px',
|
|
6
|
+
sm: '3px',
|
|
7
|
+
md: '4px',
|
|
8
|
+
lg: '6px',
|
|
9
|
+
xl: '8px',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const vars = {
|
|
13
|
+
spacing: createVar(),
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const base = style({
|
|
17
|
+
vars: {
|
|
18
|
+
[vars.spacing]: themeVars.space[4]
|
|
19
|
+
},
|
|
20
|
+
display: "flex",
|
|
21
|
+
flexDirection: "column",
|
|
22
|
+
gap: vars.spacing,
|
|
23
23
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {assignInlineVars} from '@vanilla-extract/dynamic';
|
|
1
|
+
export {assignInlineVars} from '@vanilla-extract/dynamic';
|
|
2
2
|
export * from './Form.css';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type {InjectionKey} from "vue";
|
|
2
|
-
|
|
3
|
-
export interface FormState {
|
|
4
|
-
add: (name: string, focus: () => void, validate: () => boolean, setError: (error: string) => void) => void;
|
|
5
|
-
remove: (name: string) => void;
|
|
6
|
-
insideForm: boolean,
|
|
7
|
-
disabled: boolean,
|
|
8
|
-
loading: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
1
|
+
import type {InjectionKey} from "vue";
|
|
2
|
+
|
|
3
|
+
export interface FormState {
|
|
4
|
+
add: (name: string, focus: () => void, validate: () => boolean, setError: (error: string) => void) => void;
|
|
5
|
+
remove: (name: string) => void;
|
|
6
|
+
insideForm: boolean,
|
|
7
|
+
disabled: boolean,
|
|
8
|
+
loading: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
11
|
export const FORM_STATE: InjectionKey<FormState> = Symbol('FORM_STATE');
|
package/src/components/index.ts
CHANGED
|
@@ -36,4 +36,5 @@ export { default as MModal } from './modal/Modal.vue';
|
|
|
36
36
|
export { default as MColorPicker } from './colorpicker/ColorPicker.vue';
|
|
37
37
|
export { default as MSlider } from './slider/Slider.vue';
|
|
38
38
|
export { default as MMessageProvider } from './messageprovider/MessageProvider.vue';
|
|
39
|
-
export { default as MTransfer } from './transfer/Transfer.vue';
|
|
39
|
+
export { default as MTransfer } from './transfer/Transfer.vue';
|
|
40
|
+
export { default as MTextArea } from './textarea/TextArea.vue';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as MModalBasic } from './basic.vue';
|
|
2
|
-
export { default as MModalForm } from './modal-form.vue';
|
|
1
|
+
export { default as MModalBasic } from './basic.vue';
|
|
2
|
+
export { default as MModalForm } from './modal-form.vue';
|