design-system-next 2.11.15 → 2.11.17
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/dist/design-system-next.es.js +6255 -6111
- package/dist/design-system-next.es.js.gz +0 -0
- package/dist/design-system-next.umd.js +12 -12
- package/dist/design-system-next.umd.js.gz +0 -0
- package/dist/main.css +1 -1
- package/dist/main.css.gz +0 -0
- package/dist/package.json.d.ts +1 -1
- package/package.json +1 -1
- package/src/App.vue +1 -49
- package/src/assets/scripts/border-radius.ts +15 -15
- package/src/assets/scripts/colors.ts +134 -134
- package/src/assets/scripts/max-width.ts +11 -11
- package/src/assets/scripts/spacing.ts +23 -23
- package/src/assets/scripts/utilities.ts +15 -15
- package/src/components/accordion/accordion.ts +43 -43
- package/src/components/accordion/use-accordion.ts +43 -43
- package/src/components/avatar/avatar.ts +64 -64
- package/src/components/badge/badge.ts +43 -43
- package/src/components/banner/banner.ts +20 -20
- package/src/components/button/button.ts +72 -72
- package/src/components/button/button.vue +15 -15
- package/src/components/calendar/calendar.ts +89 -89
- package/src/components/card/card.ts +52 -52
- package/src/components/checkbox/checkbox.ts +45 -45
- package/src/components/chips/chips.ts +95 -95
- package/src/components/collapsible/collapsible.ts +21 -21
- package/src/components/collapsible/collapsible.vue +27 -27
- package/src/components/date-picker/__tests__/date-picker.test.ts +112 -112
- package/src/components/date-picker/date-picker.ts +157 -157
- package/src/components/date-picker/date-range-picker/date-range-picker.vue +1 -0
- package/src/components/dropdown/__tests__/dropdown-fixes.spec.ts +106 -106
- package/src/components/dropdown/__tests__/dropdown-value-types.spec.ts +213 -213
- package/src/components/dropdown/fix-multi-number.ts +92 -92
- package/src/components/dropdown/use-dropdown.ts +488 -488
- package/src/components/empty-state/empty-state.ts +50 -50
- package/src/components/file-upload/file-upload.ts +87 -87
- package/src/components/floating-action/floating-action.ts +12 -12
- package/src/components/input/input-contact-number/input-contact-number.ts +83 -83
- package/src/components/input/input-email/input-email.vue +17 -17
- package/src/components/input/input-password/use-input-password.ts +19 -19
- package/src/components/input/input-search/input-search.vue +13 -13
- package/src/components/input/input-url/input-url.vue +20 -20
- package/src/components/input/input-username/input-username.vue +17 -17
- package/src/components/input/input.vue +72 -72
- package/src/components/list/ladderized-list/ladderized-list.ts +39 -39
- package/src/components/list/list.vue +30 -20
- package/src/components/list/use-list.ts +1 -0
- package/src/components/logo/logo.ts +43 -43
- package/src/components/logo/logo.vue +14 -14
- package/src/components/logo/use-logo.ts +41 -41
- package/src/components/lozenge/lozenge.ts +61 -61
- package/src/components/modal/modal.ts +45 -45
- package/src/components/progress-bar/progress-bar.ts +39 -39
- package/src/components/radio/radio.ts +42 -42
- package/src/components/select/select.ts +144 -144
- package/src/components/sidenav/sidenav.ts +173 -173
- package/src/components/sidepanel/sidepanel.ts +100 -100
- package/src/components/sidepanel/sidepanel.vue +55 -55
- package/src/components/sidepanel/stacking-sidepanel/stacking-sidepanel.ts +16 -16
- package/src/components/sidepanel/stacking-sidepanel/stacking-sidepanel.vue +39 -39
- package/src/components/slider/slider.ts +38 -38
- package/src/components/snackbar/snack/snack.ts +71 -71
- package/src/components/snackbar/use-snackbar.ts +34 -34
- package/src/components/status/status.ts +19 -19
- package/src/components/status/status.vue +13 -13
- package/src/components/stepper/step/step.ts +47 -47
- package/src/components/stepper/stepper.ts +47 -47
- package/src/components/stepper/stepper.vue +34 -34
- package/src/components/switch/switch.ts +42 -42
- package/src/components/table/table-actions/table-actions.ts +42 -42
- package/src/components/table/table-actions/table-actions.vue +40 -40
- package/src/components/table/table-chips-title/table-chips-title.ts +27 -27
- package/src/components/table/table-chips-title/table-chips-title.vue +32 -32
- package/src/components/table/table-chips-title/use-table-chips-title.ts +22 -22
- package/src/components/table/table-lozenge-title/table-lozenge-title.ts +23 -23
- package/src/components/table/table-lozenge-title/table-lozenge-title.vue +26 -26
- package/src/components/table/table-lozenge-title/use-table-lozenge-title.ts +21 -21
- package/src/components/table/table-pagination/table-pagination.ts +63 -63
- package/src/components/table/table-pagination/table-pagination.vue +72 -72
- package/src/components/table/table.ts +173 -173
- package/src/components/tabs/tabs.ts +43 -43
- package/src/components/textarea/textarea.ts +72 -72
- package/src/components/textarea/textarea.vue +45 -45
- package/src/components/time-picker/time-picker.ts +69 -69
- package/src/components/tooltip/tooltip.ts +46 -46
- package/src/components/tooltip/use-tooltip.ts +13 -13
- package/src/examples/dropdown-number-multi-select.vue +76 -76
- package/src/stores/useSnackbarStore.ts +44 -44
- package/src/vite-env.d.ts +6 -0
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import type { PropType, ExtractPropTypes, Component } from 'vue';
|
|
2
|
-
|
|
3
|
-
export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
|
|
4
|
-
|
|
5
|
-
type List = {
|
|
6
|
-
label: string;
|
|
7
|
-
icon?: string;
|
|
8
|
-
iconFill?: Component;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const tabsPropTypes = {
|
|
13
|
-
/**
|
|
14
|
-
* @description Tabs List,
|
|
15
|
-
* option list: label, icon, iconFill, disabled
|
|
16
|
-
*/
|
|
17
|
-
list: {
|
|
18
|
-
type: Array<List>,
|
|
19
|
-
default: () => [],
|
|
20
|
-
},
|
|
21
|
-
/**
|
|
22
|
-
* @description Tabs Type (underlined, not underlined)
|
|
23
|
-
*/
|
|
24
|
-
underlined: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
default: false,
|
|
27
|
-
},
|
|
28
|
-
/**
|
|
29
|
-
* @description Active Tab
|
|
30
|
-
*/
|
|
31
|
-
activeTab: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: '',
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const tabsEmitTypes = {
|
|
38
|
-
tabIndex: (index: number): index is number => typeof index === 'number',
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export type TabsPropTypes = ExtractPropTypes<typeof tabsPropTypes>;
|
|
42
|
-
|
|
43
|
-
export type TabsEmitTypes = typeof tabsEmitTypes;
|
|
1
|
+
import type { PropType, ExtractPropTypes, Component } from 'vue';
|
|
2
|
+
|
|
3
|
+
export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
|
|
4
|
+
|
|
5
|
+
type List = {
|
|
6
|
+
label: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
iconFill?: Component;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const tabsPropTypes = {
|
|
13
|
+
/**
|
|
14
|
+
* @description Tabs List,
|
|
15
|
+
* option list: label, icon, iconFill, disabled
|
|
16
|
+
*/
|
|
17
|
+
list: {
|
|
18
|
+
type: Array<List>,
|
|
19
|
+
default: () => [],
|
|
20
|
+
},
|
|
21
|
+
/**
|
|
22
|
+
* @description Tabs Type (underlined, not underlined)
|
|
23
|
+
*/
|
|
24
|
+
underlined: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false,
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* @description Active Tab
|
|
30
|
+
*/
|
|
31
|
+
activeTab: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: '',
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const tabsEmitTypes = {
|
|
38
|
+
tabIndex: (index: number): index is number => typeof index === 'number',
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type TabsPropTypes = ExtractPropTypes<typeof tabsPropTypes>;
|
|
42
|
+
|
|
43
|
+
export type TabsEmitTypes = typeof tabsEmitTypes;
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
import type { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
-
|
|
3
|
-
export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
|
|
4
|
-
|
|
5
|
-
export const textAreaPropTypes = {
|
|
6
|
-
id: {
|
|
7
|
-
type: String,
|
|
8
|
-
default: '',
|
|
9
|
-
},
|
|
10
|
-
modelValue: {
|
|
11
|
-
type: String,
|
|
12
|
-
default: '',
|
|
13
|
-
},
|
|
14
|
-
label: {
|
|
15
|
-
type: String,
|
|
16
|
-
default: '',
|
|
17
|
-
},
|
|
18
|
-
placeholder: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: '',
|
|
21
|
-
},
|
|
22
|
-
active: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: false,
|
|
25
|
-
},
|
|
26
|
-
disabled: {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
default: false,
|
|
29
|
-
},
|
|
30
|
-
readonly: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
default: false,
|
|
33
|
-
},
|
|
34
|
-
error: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: false,
|
|
37
|
-
},
|
|
38
|
-
minLength: {
|
|
39
|
-
type: Number,
|
|
40
|
-
},
|
|
41
|
-
maxLength: {
|
|
42
|
-
type: Number,
|
|
43
|
-
},
|
|
44
|
-
rows: {
|
|
45
|
-
type: Number,
|
|
46
|
-
default: 4,
|
|
47
|
-
},
|
|
48
|
-
displayHelper: {
|
|
49
|
-
type: Boolean,
|
|
50
|
-
default: false,
|
|
51
|
-
},
|
|
52
|
-
helperIcon: {
|
|
53
|
-
type: String,
|
|
54
|
-
default: null,
|
|
55
|
-
},
|
|
56
|
-
helperText: {
|
|
57
|
-
type: String,
|
|
58
|
-
default: '',
|
|
59
|
-
},
|
|
60
|
-
hasCounter: {
|
|
61
|
-
type: Boolean,
|
|
62
|
-
default: false,
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export const textAreaEmitTypes = {
|
|
67
|
-
'update:modelValue': (value: string) => typeof value === 'string',
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export type TextAreaEmitTypes = { 'update:modelValue': typeof textAreaEmitTypes };
|
|
71
|
-
|
|
72
|
-
export type TextAreaPropTypes = ExtractPropTypes<typeof textAreaPropTypes>;
|
|
1
|
+
import type { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
+
|
|
3
|
+
export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
|
|
4
|
+
|
|
5
|
+
export const textAreaPropTypes = {
|
|
6
|
+
id: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: '',
|
|
9
|
+
},
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: '',
|
|
13
|
+
},
|
|
14
|
+
label: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: '',
|
|
17
|
+
},
|
|
18
|
+
placeholder: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: '',
|
|
21
|
+
},
|
|
22
|
+
active: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false,
|
|
25
|
+
},
|
|
26
|
+
disabled: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: false,
|
|
29
|
+
},
|
|
30
|
+
readonly: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: false,
|
|
33
|
+
},
|
|
34
|
+
error: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: false,
|
|
37
|
+
},
|
|
38
|
+
minLength: {
|
|
39
|
+
type: Number,
|
|
40
|
+
},
|
|
41
|
+
maxLength: {
|
|
42
|
+
type: Number,
|
|
43
|
+
},
|
|
44
|
+
rows: {
|
|
45
|
+
type: Number,
|
|
46
|
+
default: 4,
|
|
47
|
+
},
|
|
48
|
+
displayHelper: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false,
|
|
51
|
+
},
|
|
52
|
+
helperIcon: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: null,
|
|
55
|
+
},
|
|
56
|
+
helperText: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: '',
|
|
59
|
+
},
|
|
60
|
+
hasCounter: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: false,
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const textAreaEmitTypes = {
|
|
67
|
+
'update:modelValue': (value: string) => typeof value === 'string',
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export type TextAreaEmitTypes = { 'update:modelValue': typeof textAreaEmitTypes };
|
|
71
|
+
|
|
72
|
+
export type TextAreaPropTypes = ExtractPropTypes<typeof textAreaPropTypes>;
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="textareaClasses.wrapperClasses">
|
|
3
|
-
<label v-if="label" :for="id" :class="textareaClasses.labelClasses">{{ label }}</label>
|
|
4
|
-
<textarea
|
|
5
|
-
v-bind="$attrs"
|
|
6
|
-
:id="props.id"
|
|
7
|
-
:class="textareaClasses.textAreaClasses"
|
|
8
|
-
:rows="rows"
|
|
9
|
-
:placeholder="placeholder"
|
|
10
|
-
:value="modelValue"
|
|
11
|
-
:minlength="props.minLength"
|
|
12
|
-
:maxlength="props.maxLength"
|
|
13
|
-
:readonly="readonly"
|
|
14
|
-
:disabled="props.disabled"
|
|
15
|
-
@input="onInput"
|
|
16
|
-
></textarea>
|
|
17
|
-
|
|
18
|
-
<div :class="textareaClasses.slotWrapperClasses">
|
|
19
|
-
<div v-if="props.displayHelper" :class="textareaClasses.helperClasses">
|
|
20
|
-
<slot name="helperMessage">
|
|
21
|
-
<Icon v-if="props.helperIcon" :icon="props.helperIcon" width="20px" height="20px" />
|
|
22
|
-
<span>{{ props.helperText }}</span>
|
|
23
|
-
</slot>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<div v-if="props.hasCounter && props.maxLength" :class="textareaClasses.helperClasses">
|
|
27
|
-
<slot name="counter">
|
|
28
|
-
<span>{{ `${modelValue.length}/${props.maxLength}` }}</span>
|
|
29
|
-
</slot>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</template>
|
|
34
|
-
|
|
35
|
-
<script lang="ts" setup>
|
|
36
|
-
import { Icon } from '@iconify/vue';
|
|
37
|
-
|
|
38
|
-
import { textAreaPropTypes, textAreaEmitTypes } from './textarea';
|
|
39
|
-
import { useTextArea } from './use-textarea';
|
|
40
|
-
|
|
41
|
-
const props = defineProps(textAreaPropTypes);
|
|
42
|
-
const emit = defineEmits(textAreaEmitTypes);
|
|
43
|
-
|
|
44
|
-
const { onInput, textareaClasses } = useTextArea(props, emit);
|
|
45
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="textareaClasses.wrapperClasses">
|
|
3
|
+
<label v-if="label" :for="id" :class="textareaClasses.labelClasses">{{ label }}</label>
|
|
4
|
+
<textarea
|
|
5
|
+
v-bind="$attrs"
|
|
6
|
+
:id="props.id"
|
|
7
|
+
:class="textareaClasses.textAreaClasses"
|
|
8
|
+
:rows="rows"
|
|
9
|
+
:placeholder="placeholder"
|
|
10
|
+
:value="modelValue"
|
|
11
|
+
:minlength="props.minLength"
|
|
12
|
+
:maxlength="props.maxLength"
|
|
13
|
+
:readonly="readonly"
|
|
14
|
+
:disabled="props.disabled"
|
|
15
|
+
@input="onInput"
|
|
16
|
+
></textarea>
|
|
17
|
+
|
|
18
|
+
<div :class="textareaClasses.slotWrapperClasses">
|
|
19
|
+
<div v-if="props.displayHelper" :class="textareaClasses.helperClasses">
|
|
20
|
+
<slot name="helperMessage">
|
|
21
|
+
<Icon v-if="props.helperIcon" :icon="props.helperIcon" width="20px" height="20px" />
|
|
22
|
+
<span>{{ props.helperText }}</span>
|
|
23
|
+
</slot>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div v-if="props.hasCounter && props.maxLength" :class="textareaClasses.helperClasses">
|
|
27
|
+
<slot name="counter">
|
|
28
|
+
<span>{{ `${modelValue.length}/${props.maxLength}` }}</span>
|
|
29
|
+
</slot>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script lang="ts" setup>
|
|
36
|
+
import { Icon } from '@iconify/vue';
|
|
37
|
+
|
|
38
|
+
import { textAreaPropTypes, textAreaEmitTypes } from './textarea';
|
|
39
|
+
import { useTextArea } from './use-textarea';
|
|
40
|
+
|
|
41
|
+
const props = defineProps(textAreaPropTypes);
|
|
42
|
+
const emit = defineEmits(textAreaEmitTypes);
|
|
43
|
+
|
|
44
|
+
const { onInput, textareaClasses } = useTextArea(props, emit);
|
|
45
|
+
</script>
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import type { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
-
|
|
3
|
-
export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
|
|
4
|
-
|
|
5
|
-
export const timePickerPropTypes = {
|
|
6
|
-
modelValue: {
|
|
7
|
-
type: String,
|
|
8
|
-
required: true,
|
|
9
|
-
},
|
|
10
|
-
label: {
|
|
11
|
-
type: String,
|
|
12
|
-
default: '',
|
|
13
|
-
},
|
|
14
|
-
error: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
default: false,
|
|
17
|
-
},
|
|
18
|
-
disabled: {
|
|
19
|
-
type: Boolean,
|
|
20
|
-
default: false,
|
|
21
|
-
},
|
|
22
|
-
/**
|
|
23
|
-
* @description Interval in minutes
|
|
24
|
-
*/
|
|
25
|
-
interval: {
|
|
26
|
-
type: Number,
|
|
27
|
-
default: 30,
|
|
28
|
-
},
|
|
29
|
-
/**
|
|
30
|
-
* @description '24' for 24-hour format, '12' for 12-hour format
|
|
31
|
-
*/
|
|
32
|
-
format: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: '24',
|
|
35
|
-
},
|
|
36
|
-
/**
|
|
37
|
-
* @description disable user to type
|
|
38
|
-
*/
|
|
39
|
-
disableTyping: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
default: false,
|
|
42
|
-
},
|
|
43
|
-
/**
|
|
44
|
-
* @description disable user to type
|
|
45
|
-
*/
|
|
46
|
-
fullWidth: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: false,
|
|
49
|
-
},
|
|
50
|
-
helperText: {
|
|
51
|
-
type: String,
|
|
52
|
-
default: '',
|
|
53
|
-
},
|
|
54
|
-
placeholder: {
|
|
55
|
-
type: String,
|
|
56
|
-
default: '',
|
|
57
|
-
},
|
|
58
|
-
id: {
|
|
59
|
-
type: String,
|
|
60
|
-
default: 'time-picker',
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
export const timePickerEmitTypes = {
|
|
64
|
-
'update:modelValue': (evt: MouseEvent): evt is MouseEvent => evt instanceof MouseEvent,
|
|
65
|
-
};
|
|
66
|
-
export type TimePickerEmitTypes = {
|
|
67
|
-
'update:modelValue': string;
|
|
68
|
-
};
|
|
69
|
-
export type TimePickerPropTypes = ExtractPropTypes<typeof timePickerPropTypes>;
|
|
1
|
+
import type { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
+
|
|
3
|
+
export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
|
|
4
|
+
|
|
5
|
+
export const timePickerPropTypes = {
|
|
6
|
+
modelValue: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
label: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: '',
|
|
13
|
+
},
|
|
14
|
+
error: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false,
|
|
17
|
+
},
|
|
18
|
+
disabled: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false,
|
|
21
|
+
},
|
|
22
|
+
/**
|
|
23
|
+
* @description Interval in minutes
|
|
24
|
+
*/
|
|
25
|
+
interval: {
|
|
26
|
+
type: Number,
|
|
27
|
+
default: 30,
|
|
28
|
+
},
|
|
29
|
+
/**
|
|
30
|
+
* @description '24' for 24-hour format, '12' for 12-hour format
|
|
31
|
+
*/
|
|
32
|
+
format: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: '24',
|
|
35
|
+
},
|
|
36
|
+
/**
|
|
37
|
+
* @description disable user to type
|
|
38
|
+
*/
|
|
39
|
+
disableTyping: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false,
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* @description disable user to type
|
|
45
|
+
*/
|
|
46
|
+
fullWidth: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: false,
|
|
49
|
+
},
|
|
50
|
+
helperText: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: '',
|
|
53
|
+
},
|
|
54
|
+
placeholder: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: '',
|
|
57
|
+
},
|
|
58
|
+
id: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: 'time-picker',
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
export const timePickerEmitTypes = {
|
|
64
|
+
'update:modelValue': (evt: MouseEvent): evt is MouseEvent => evt instanceof MouseEvent,
|
|
65
|
+
};
|
|
66
|
+
export type TimePickerEmitTypes = {
|
|
67
|
+
'update:modelValue': string;
|
|
68
|
+
};
|
|
69
|
+
export type TimePickerPropTypes = ExtractPropTypes<typeof timePickerPropTypes>;
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import type { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
-
|
|
3
|
-
export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
|
|
4
|
-
|
|
5
|
-
const PLACEMENTS = [
|
|
6
|
-
'top',
|
|
7
|
-
'top-start',
|
|
8
|
-
'top-end',
|
|
9
|
-
'bottom',
|
|
10
|
-
'bottom-start',
|
|
11
|
-
'bottom-end',
|
|
12
|
-
'left',
|
|
13
|
-
'left-start',
|
|
14
|
-
'left-end',
|
|
15
|
-
'right',
|
|
16
|
-
'right-start',
|
|
17
|
-
'right-end',
|
|
18
|
-
] as const;
|
|
19
|
-
|
|
20
|
-
export const tooltipPropTypes = {
|
|
21
|
-
/**
|
|
22
|
-
* @description Tooltip Label
|
|
23
|
-
*/
|
|
24
|
-
text: {
|
|
25
|
-
type: String,
|
|
26
|
-
default: '',
|
|
27
|
-
},
|
|
28
|
-
/**
|
|
29
|
-
* @description Tooltip Placement
|
|
30
|
-
*/
|
|
31
|
-
placement: {
|
|
32
|
-
type: String,
|
|
33
|
-
validator: (value: (typeof PLACEMENTS)[number]) => PLACEMENTS.includes(value),
|
|
34
|
-
default: 'top',
|
|
35
|
-
},
|
|
36
|
-
hasMaxWidth: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: true,
|
|
39
|
-
},
|
|
40
|
-
fitContent: {
|
|
41
|
-
type: Boolean,
|
|
42
|
-
default: true
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export type TooltipPropTypes = ExtractPropTypes<typeof tooltipPropTypes>;
|
|
1
|
+
import type { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
+
|
|
3
|
+
export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
|
|
4
|
+
|
|
5
|
+
const PLACEMENTS = [
|
|
6
|
+
'top',
|
|
7
|
+
'top-start',
|
|
8
|
+
'top-end',
|
|
9
|
+
'bottom',
|
|
10
|
+
'bottom-start',
|
|
11
|
+
'bottom-end',
|
|
12
|
+
'left',
|
|
13
|
+
'left-start',
|
|
14
|
+
'left-end',
|
|
15
|
+
'right',
|
|
16
|
+
'right-start',
|
|
17
|
+
'right-end',
|
|
18
|
+
] as const;
|
|
19
|
+
|
|
20
|
+
export const tooltipPropTypes = {
|
|
21
|
+
/**
|
|
22
|
+
* @description Tooltip Label
|
|
23
|
+
*/
|
|
24
|
+
text: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: '',
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* @description Tooltip Placement
|
|
30
|
+
*/
|
|
31
|
+
placement: {
|
|
32
|
+
type: String,
|
|
33
|
+
validator: (value: (typeof PLACEMENTS)[number]) => PLACEMENTS.includes(value),
|
|
34
|
+
default: 'top',
|
|
35
|
+
},
|
|
36
|
+
hasMaxWidth: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: true,
|
|
39
|
+
},
|
|
40
|
+
fitContent: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: true
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export type TooltipPropTypes = ExtractPropTypes<typeof tooltipPropTypes>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ref } from 'vue';
|
|
2
|
-
|
|
3
|
-
import { Placement } from 'floating-vue';
|
|
4
|
-
|
|
5
|
-
import { TooltipPropTypes } from './tooltip';
|
|
6
|
-
|
|
7
|
-
export const useTooltip = (props: TooltipPropTypes) => {
|
|
8
|
-
const placement = ref(props.placement as Placement);
|
|
9
|
-
|
|
10
|
-
return {
|
|
11
|
-
placement,
|
|
12
|
-
};
|
|
13
|
-
};
|
|
1
|
+
import { ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
import { Placement } from 'floating-vue';
|
|
4
|
+
|
|
5
|
+
import { TooltipPropTypes } from './tooltip';
|
|
6
|
+
|
|
7
|
+
export const useTooltip = (props: TooltipPropTypes) => {
|
|
8
|
+
const placement = ref(props.placement as Placement);
|
|
9
|
+
|
|
10
|
+
return {
|
|
11
|
+
placement,
|
|
12
|
+
};
|
|
13
|
+
};
|