yuyeon 0.0.26 → 0.0.28
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/style.css +1 -1
- package/dist/yuyeon.js +5850 -5478
- package/dist/yuyeon.umd.cjs +3 -3
- package/lib/components/alert/YAlert.mjs +41 -6
- package/lib/components/alert/YAlert.mjs.map +1 -1
- package/lib/components/alert/YAlert.scss +25 -23
- package/lib/components/button/YButton.mjs +105 -75
- package/lib/components/button/YButton.mjs.map +1 -1
- package/lib/components/button/YButton.scss +1 -0
- package/lib/components/checkbox/YCheckbox.mjs.map +1 -1
- package/lib/components/checkbox/YCheckbox.scss +48 -48
- package/lib/components/index.mjs +1 -0
- package/lib/components/index.mjs.map +1 -1
- package/lib/components/tab/YTab.mjs +55 -7
- package/lib/components/tab/YTab.mjs.map +1 -1
- package/lib/components/tab/YTab.scss +62 -0
- package/lib/components/tab/YTabs.mjs +50 -8
- package/lib/components/tab/YTabs.mjs.map +1 -1
- package/lib/components/tab/YTabs.scss +10 -0
- package/lib/components/tab/index.mjs +1 -0
- package/lib/components/tab/index.mjs.map +1 -1
- package/lib/components/tab/shared.mjs +2 -0
- package/lib/components/tab/shared.mjs.map +1 -0
- package/lib/components/tab/types.mjs +2 -0
- package/lib/components/tab/types.mjs.map +1 -0
- package/lib/components/table/YTable.scss +2 -1
- package/lib/components/toggle-button/YToggleButton.mjs +2 -0
- package/lib/components/toggle-button/YToggleButton.mjs.map +1 -0
- package/lib/components/toggle-button/index.mjs +2 -0
- package/lib/components/toggle-button/index.mjs.map +1 -0
- package/lib/components/tooltip/YTooltip.mjs +3 -3
- package/lib/components/tooltip/YTooltip.mjs.map +1 -1
- package/lib/components/tree-view/YTreeView.mjs +1 -1
- package/lib/components/tree-view/YTreeView.mjs.map +1 -1
- package/lib/components/tree-view/YTreeViewNode.mjs.map +1 -1
- package/lib/composables/choice-link.mjs +13 -0
- package/lib/composables/choice-link.mjs.map +1 -0
- package/lib/composables/choice.mjs +1 -1
- package/lib/composables/choice.mjs.map +1 -1
- package/lib/composables/communication.mjs +1 -1
- package/lib/composables/communication.mjs.map +1 -1
- package/lib/composables/index.mjs +2 -0
- package/lib/composables/index.mjs.map +1 -0
- package/lib/composables/theme/setting.mjs.map +1 -1
- package/lib/composables/vue-router.mjs +32 -0
- package/lib/composables/vue-router.mjs.map +1 -0
- package/lib/styles/_variables.scss +2 -0
- package/lib/styles/theme/dark.scss +11 -11
- package/lib/styles/theme/light.scss +11 -11
- package/lib/util/index.mjs +16 -0
- package/lib/util/index.mjs.map +1 -0
- package/lib/util/reactivity.mjs +5 -0
- package/lib/util/reactivity.mjs.map +1 -1
- package/lib/util/vue-component.mjs +24 -0
- package/lib/util/vue-component.mjs.map +1 -1
- package/package.json +11 -1
- package/types/components/button/YButton.d.ts +97 -41
- package/types/components/checkbox/YInputCheckbox.d.ts +1 -1
- package/types/components/dropdown/YDropdown.d.ts +3 -3
- package/types/components/field-input/YFieldInput.d.ts +26 -44
- package/types/components/index.d.ts +1 -0
- package/types/components/input/YInput.d.ts +16 -16
- package/types/components/layer/YLayer.d.ts +8 -8
- package/types/components/list/YList.d.ts +2 -2
- package/types/components/list/YListItem.d.ts +3 -3
- package/types/components/pagination/YPagination.d.ts +6 -6
- package/types/components/select/YSelect.d.ts +35 -53
- package/types/components/tab/YTab.d.ts +282 -7
- package/types/components/tab/YTabs.d.ts +111 -3
- package/types/components/tab/index.d.ts +1 -0
- package/types/components/tab/shared.d.ts +3 -0
- package/types/components/tab/types.d.ts +4 -0
- package/types/components/table/YDataTable.d.ts +7 -7
- package/types/components/table/YDataTableHead.d.ts +3 -3
- package/types/components/table/YDataTableRow.d.ts +3 -3
- package/types/components/table/YDataTableServer.d.ts +7 -7
- package/types/components/table/composibles/items.d.ts +1 -1
- package/types/components/table/composibles/selection.d.ts +1 -1
- package/types/components/table/composibles/sorting.d.ts +1 -1
- package/types/components/toggle-button/YToggleButton.d.ts +3 -0
- package/types/components/toggle-button/index.d.ts +1 -0
- package/types/components/tree-view/YTreeViewNode.d.ts +6 -6
- package/types/composables/choice-link.d.ts +2 -0
- package/types/composables/choice.d.ts +107 -0
- package/types/composables/dimension.d.ts +6 -6
- package/types/composables/focus.d.ts +2 -2
- package/types/composables/list-items.d.ts +1 -1
- package/types/composables/theme/index.d.ts +1 -1
- package/types/composables/vue-router.d.ts +43 -0
- package/types/shims.d.ts +6 -2
- package/types/util/collection.d.ts +1 -0
- package/types/util/frame-scheduler.d.ts +7 -0
- package/types/util/index.d.ts +15 -0
- package/types/util/reactivity.d.ts +4 -0
- package/types/util/validation.d.ts +3 -0
- package/types/util/vue-component.d.ts +8 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { withDirectives as _withDirectives, resolveDirective as _resolveDirective, createVNode as _createVNode } from "vue";
|
|
2
|
-
import { defineComponent, ref } from 'vue';
|
|
2
|
+
import { computed, defineComponent, ref } from 'vue';
|
|
3
3
|
import { useRender } from "../../composables/component.mjs";
|
|
4
4
|
import { toKebabCase } from "../../util/string.mjs";
|
|
5
5
|
import { YPlate } from "../plate/index.mjs";
|
|
@@ -14,24 +14,59 @@ const YAlertPropOptions = {
|
|
|
14
14
|
outlineColor: String
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
* # Component
|
|
17
|
+
/**
|
|
18
|
+
* # Component
|
|
19
19
|
*/
|
|
20
20
|
export const YAlert = defineComponent({
|
|
21
21
|
name: NAME,
|
|
22
22
|
props: {
|
|
23
23
|
...YAlertPropOptions
|
|
24
24
|
},
|
|
25
|
-
setup(
|
|
25
|
+
setup(props, _ref) {
|
|
26
26
|
let {
|
|
27
27
|
slots
|
|
28
28
|
} = _ref;
|
|
29
29
|
const el$ = ref();
|
|
30
|
+
const variations = computed(() => {
|
|
31
|
+
const {
|
|
32
|
+
variation
|
|
33
|
+
} = props;
|
|
34
|
+
if (variation) {
|
|
35
|
+
return variation.split(',').map(value => {
|
|
36
|
+
return value.trim();
|
|
37
|
+
}).filter(v => !!v);
|
|
38
|
+
}
|
|
39
|
+
return [];
|
|
40
|
+
});
|
|
41
|
+
const cssVariables = computed(() => {
|
|
42
|
+
const ret = {};
|
|
43
|
+
if (props.color) {
|
|
44
|
+
ret['--y-alert-surface-color'] = props.color;
|
|
45
|
+
if (variations.value.includes('filled')) {
|
|
46
|
+
ret['--y-alert-surface-opacity'] = 1;
|
|
47
|
+
} else {
|
|
48
|
+
ret['--y-alert-text-color'] = props.color;
|
|
49
|
+
}
|
|
50
|
+
if (props.textColor) {
|
|
51
|
+
ret['--y-alert-text-color'] = props.textColor;
|
|
52
|
+
}
|
|
53
|
+
if (!props.outlineColor && !props.semantic) {
|
|
54
|
+
ret['--y-alert-outline-color'] = props.color;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (props.outlineColor) {
|
|
58
|
+
ret['--y-alert-outline-color'] = props.outlineColor;
|
|
59
|
+
}
|
|
60
|
+
return ret;
|
|
61
|
+
});
|
|
30
62
|
useRender(() => _withDirectives(_createVNode("div", {
|
|
31
63
|
"ref": el$,
|
|
32
64
|
"class": [KEBAB_NAME, {
|
|
33
|
-
[`y-alert--${
|
|
34
|
-
|
|
65
|
+
[`y-alert--${props.semantic}`]: props.semantic,
|
|
66
|
+
'y-alert--filled': variations.value.includes('filled'),
|
|
67
|
+
'y-alert--outlined': variations.value.includes('outlined')
|
|
68
|
+
}],
|
|
69
|
+
"style": cssVariables.value
|
|
35
70
|
}, [_createVNode(YPlate, null, null), slots.leading && _createVNode("div", {
|
|
36
71
|
"class": ['y-alert__leading']
|
|
37
72
|
}, [slots.leading()]), _createVNode("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YAlert.mjs","names":["defineComponent","ref","useRender","toKebabCase","YPlate","NAME","KEBAB_NAME","YAlertPropOptions","semantic","String","variation","color","textColor","outlineColor","YAlert","name","props","setup","
|
|
1
|
+
{"version":3,"file":"YAlert.mjs","names":["computed","defineComponent","ref","useRender","toKebabCase","YPlate","NAME","KEBAB_NAME","YAlertPropOptions","semantic","String","variation","color","textColor","outlineColor","YAlert","name","props","setup","_ref","slots","el$","variations","split","map","value","trim","filter","v","cssVariables","ret","includes","_withDirectives","_createVNode","leading","title","default","trailing","_resolveDirective"],"sources":["../../../src/components/alert/YAlert.tsx"],"sourcesContent":["import { PropType, computed, defineComponent, ref } from 'vue';\r\n\r\nimport { useRender } from '../../composables/component';\r\nimport { toKebabCase } from '../../util/string';\r\nimport { YPlate } from '../plate';\r\n\r\nimport './YAlert.scss';\r\n\r\nconst NAME = 'YAlert';\r\nconst KEBAB_NAME = toKebabCase(NAME);\r\n\r\nconst YAlertPropOptions = {\r\n semantic: String as PropType<\r\n 'info' | 'warning' | 'success' | 'error' | string\r\n >,\r\n variation: String as PropType<'outlined' | 'filled' | string>,\r\n color: String as PropType<string>,\r\n textColor: String as PropType<string>,\r\n outlineColor: String as PropType<string>,\r\n};\r\n\r\n/**\r\n * # Component\r\n */\r\nexport const YAlert = defineComponent({\r\n name: NAME,\r\n props: {\r\n ...YAlertPropOptions,\r\n },\r\n setup(props, { slots }) {\r\n const el$ = ref<HTMLElement>();\r\n\r\n const variations = computed(() => {\r\n const { variation } = props;\r\n if (variation) {\r\n return variation\r\n .split(',')\r\n .map((value) => {\r\n return value.trim();\r\n })\r\n .filter((v) => !!v);\r\n }\r\n return [];\r\n });\r\n\r\n const cssVariables = computed(() => {\r\n const ret: Record<string, string | number> = {};\r\n\r\n if (props.color) {\r\n ret['--y-alert-surface-color'] = props.color;\r\n if (variations.value.includes('filled')) {\r\n ret['--y-alert-surface-opacity'] = 1;\r\n } else {\r\n ret['--y-alert-text-color'] = props.color;\r\n }\r\n if (props.textColor) {\r\n ret['--y-alert-text-color'] = props.textColor;\r\n }\r\n if (!props.outlineColor && !props.semantic) {\r\n ret['--y-alert-outline-color'] = props.color;\r\n }\r\n }\r\n if (props.outlineColor) {\r\n ret['--y-alert-outline-color'] = props.outlineColor;\r\n }\r\n return ret;\r\n })\r\n\r\n useRender(() => (\r\n <div\r\n ref={el$}\r\n class={[\r\n KEBAB_NAME,\r\n {\r\n [`y-alert--${props.semantic}`]: props.semantic,\r\n 'y-alert--filled': variations.value.includes('filled'),\r\n 'y-alert--outlined': variations.value.includes('outlined'),\r\n },\r\n ]}\r\n style={cssVariables.value}\r\n v-theme\r\n >\r\n <YPlate></YPlate>\r\n {slots.leading && (\r\n <div class={['y-alert__leading']}>{slots.leading()}</div>\r\n )}\r\n <div class={['y-alert__content']}>\r\n {slots.title && <div class={['y-alert__title']}>{slots.title()}</div>}\r\n {slots.default?.()}\r\n </div>\r\n {slots.trailing && (\r\n <div class={['y-alert__trailing']}>{slots.trailing()}</div>\r\n )}\r\n </div>\r\n ));\r\n },\r\n});\r\n\r\nexport type YAlert = InstanceType<typeof YAlert>;\r\n"],"mappings":";AAAA,SAAmBA,QAAQ,EAAEC,eAAe,EAAEC,GAAG,QAAQ,KAAK;AAAC,SAEtDC,SAAS;AAAA,SACTC,WAAW;AAAA,SACXC,MAAM;AAEf;AAEA,MAAMC,IAAI,GAAG,QAAQ;AACrB,MAAMC,UAAU,GAAGH,WAAW,CAACE,IAAI,CAAC;AAEpC,MAAME,iBAAiB,GAAG;EACxBC,QAAQ,EAAEC,MAET;EACDC,SAAS,EAAED,MAAkD;EAC7DE,KAAK,EAAEF,MAA0B;EACjCG,SAAS,EAAEH,MAA0B;EACrCI,YAAY,EAAEJ;AAChB,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMK,MAAM,GAAGd,eAAe,CAAC;EACpCe,IAAI,EAAEV,IAAI;EACVW,KAAK,EAAE;IACL,GAAGT;EACL,CAAC;EACDU,KAAKA,CAACD,KAAK,EAAAE,IAAA,EAAa;IAAA,IAAX;MAAEC;IAAM,CAAC,GAAAD,IAAA;IACpB,MAAME,GAAG,GAAGnB,GAAG,CAAc,CAAC;IAE9B,MAAMoB,UAAU,GAAGtB,QAAQ,CAAC,MAAM;MAChC,MAAM;QAAEW;MAAU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AAiB,EAAEa,UAAU,CAACG,KAAK,CAACM,QAAQ,CAAC,QAAQ,CAAC;QACtD,mBAAmB,EAAET,UAAU,CAACG,KAAK,CAACM,QAAQ,CAAC,UAAU;MAC3D,CAAC,CACF;MAAA,SACMF,YAAY,CAACJ;IAAK,IAAAQ,YAAA,CAAA5B,MAAA,eAIxBe,KAAK,CAACc,OAAO,IAAAD,YAAA;MAAA,SACA,CAAC,kBAAkB;IAAC,IAAGb,KAAK,CAACc,OAAO,CAAC,CAAC,EACnD,EAAAD,YAAA;MAAA,SACW,CAAC,kBAAkB;IAAC,IAC7Bb,KAAK,CAACe,KAAK,IAAAF,YAAA;MAAA,SAAgB,CAAC,gBAAgB;IAAC,IAAGb,KAAK,CAACe,KAAK,CAAC,CAAC,EAAO,EACpEf,KAAK,CAACgB,OAAO,GAAG,CAAC,IAEnBhB,KAAK,CAACiB,QAAQ,IAAAJ,YAAA;MAAA,SACD,CAAC,mBAAmB;IAAC,IAAGb,KAAK,CAACiB,QAAQ,CAAC,CAAC,EACrD,MAAAC,iBAAA,YAEJ,CAAC;EACJ;AACF,CAAC,CAAC"}
|
|
@@ -22,10 +22,12 @@
|
|
|
22
22
|
flex: 1 1;
|
|
23
23
|
min-width: 0;
|
|
24
24
|
padding-top: 2px;
|
|
25
|
+
position: relative;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
&__leading, &__trailing {
|
|
28
29
|
flex: 0 0 auto;
|
|
30
|
+
position: relative;
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
&__leading {
|
|
@@ -38,37 +40,37 @@
|
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
.y-plate {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
&:before {
|
|
44
|
+
content: '';
|
|
45
|
+
position: absolute;
|
|
46
|
+
top: 0;
|
|
47
|
+
left: 0;
|
|
48
|
+
bottom: 0;
|
|
49
|
+
right: 0;
|
|
50
|
+
background: var(--y-alert-surface-color);
|
|
51
|
+
opacity: var(--y-alert-surface-opacity);
|
|
52
|
+
}
|
|
43
53
|
}
|
|
44
54
|
|
|
45
|
-
&--
|
|
46
|
-
|
|
47
|
-
|
|
55
|
+
&--outlined {
|
|
56
|
+
.y-plate {
|
|
57
|
+
border: 1px solid var(--y-alert-outline-color);
|
|
58
|
+
}
|
|
48
59
|
}
|
|
49
60
|
|
|
50
|
-
|
|
51
|
-
--y-alert-text-color: var(--y-theme-success);
|
|
52
|
-
--y-alert-surface-color: var(--y-theme-success);
|
|
53
|
-
}
|
|
61
|
+
$semantics: ('info', 'success', 'warning', 'error');
|
|
54
62
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
63
|
+
@mixin defineSemantic($name) {
|
|
64
|
+
&--#{$name} {
|
|
65
|
+
--y-alert-text-color: var(--y-theme-#{$name});
|
|
66
|
+
--y-alert-surface-color: var(--y-theme-#{$name});
|
|
67
|
+
--y-alert-outline-color: var(--y-theme-#{$name});
|
|
68
|
+
}
|
|
58
69
|
}
|
|
59
70
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
--y-alert-surface-color: var(--y-theme-error);
|
|
71
|
+
@each $name in $semantics {
|
|
72
|
+
@include defineSemantic($name);
|
|
63
73
|
}
|
|
64
74
|
|
|
65
|
-
&--filled {
|
|
66
|
-
--y-alert-surface-opacity: 1;
|
|
67
|
-
}
|
|
68
75
|
|
|
69
|
-
&--outlined {
|
|
70
|
-
.y-plate {
|
|
71
|
-
border: 1px solid var(--y-alert-outline-color);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
76
|
}
|
|
@@ -1,17 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { withDirectives as _withDirectives, resolveDirective as _resolveDirective, createVNode as _createVNode } from "vue";
|
|
2
|
+
import { computed, defineComponent, mergeProps } from 'vue';
|
|
3
|
+
import { pressChoiceItemPropsOptions, useChoiceItem } from "../../composables/choice.mjs";
|
|
4
|
+
import { useChoiceByLink } from "../../composables/choice-link.mjs";
|
|
5
|
+
import { useRender } from "../../composables/component.mjs";
|
|
6
|
+
import { pressVueRouterPropsOptions, useLink } from "../../composables/vue-router.mjs";
|
|
2
7
|
import { PlateWave } from "../../directives/plate-wave/index.mjs";
|
|
3
8
|
import { isColorValue } from "../../util/color/index.mjs";
|
|
4
|
-
import {
|
|
9
|
+
import { propsFactory } from "../../util/vue-component.mjs";
|
|
5
10
|
import { YSpinnerRing } from "../loading/YSpinnerRing.mjs";
|
|
6
|
-
|
|
7
|
-
|
|
11
|
+
import { Y_TOGGLE_BUTTON_KEY } from "../toggle-button/index.mjs";
|
|
12
|
+
/**
|
|
13
|
+
* Style
|
|
8
14
|
*/
|
|
9
15
|
import "./YButton.scss";
|
|
10
16
|
const NAME = 'y-button';
|
|
11
17
|
export const pressYButtonProps = propsFactory({
|
|
12
18
|
loading: Boolean,
|
|
13
|
-
|
|
14
|
-
type: Boolean
|
|
19
|
+
active: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: undefined
|
|
22
|
+
},
|
|
23
|
+
injectSymbol: {
|
|
24
|
+
type: null,
|
|
25
|
+
default: Y_TOGGLE_BUTTON_KEY
|
|
15
26
|
},
|
|
16
27
|
//
|
|
17
28
|
variation: {
|
|
@@ -31,9 +42,6 @@ export const pressYButtonProps = propsFactory({
|
|
|
31
42
|
type: Boolean,
|
|
32
43
|
default: false
|
|
33
44
|
},
|
|
34
|
-
text: {
|
|
35
|
-
type: Boolean
|
|
36
|
-
},
|
|
37
45
|
//
|
|
38
46
|
color: {
|
|
39
47
|
type: String
|
|
@@ -41,108 +49,130 @@ export const pressYButtonProps = propsFactory({
|
|
|
41
49
|
noWave: {
|
|
42
50
|
type: Boolean,
|
|
43
51
|
default: false
|
|
44
|
-
}
|
|
52
|
+
},
|
|
53
|
+
...pressVueRouterPropsOptions(),
|
|
54
|
+
...pressChoiceItemPropsOptions()
|
|
45
55
|
}, 'YButton');
|
|
46
56
|
export const YButton = defineComponent({
|
|
47
57
|
name: 'YButton',
|
|
48
58
|
directives: {
|
|
49
59
|
PlateWave
|
|
50
60
|
},
|
|
51
|
-
props:
|
|
52
|
-
|
|
61
|
+
props: pressYButtonProps(),
|
|
62
|
+
emits: {
|
|
63
|
+
'choice:selected': choice => true
|
|
53
64
|
},
|
|
54
|
-
|
|
55
|
-
|
|
65
|
+
setup(props, _ref) {
|
|
66
|
+
let {
|
|
67
|
+
attrs,
|
|
68
|
+
slots
|
|
69
|
+
} = _ref;
|
|
70
|
+
const choice = useChoiceItem(props, props.injectSymbol, false);
|
|
71
|
+
const link = useLink(props, attrs);
|
|
72
|
+
useChoiceByLink(link, choice?.select);
|
|
73
|
+
const isActive = computed(() => {
|
|
74
|
+
if (props.active !== undefined) {
|
|
75
|
+
return props.active;
|
|
76
|
+
}
|
|
77
|
+
if (link.isLink.value) {
|
|
78
|
+
return link.isActive?.value;
|
|
79
|
+
}
|
|
80
|
+
return choice?.isSelected.value;
|
|
81
|
+
});
|
|
82
|
+
const variations = computed(() => {
|
|
56
83
|
const {
|
|
57
84
|
variation
|
|
58
|
-
} =
|
|
59
|
-
if (variation) {
|
|
85
|
+
} = props;
|
|
86
|
+
if (typeof variation === 'string') {
|
|
60
87
|
return variation.split(',').map(value => {
|
|
61
88
|
return value.trim();
|
|
62
89
|
});
|
|
63
90
|
}
|
|
64
91
|
return [];
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
classes() {
|
|
92
|
+
});
|
|
93
|
+
const classes = computed(() => {
|
|
68
94
|
const {
|
|
69
|
-
variations,
|
|
70
95
|
outlined,
|
|
71
96
|
rounded,
|
|
72
97
|
filled,
|
|
73
|
-
text,
|
|
74
98
|
small,
|
|
75
99
|
icon
|
|
76
|
-
} =
|
|
100
|
+
} = props;
|
|
77
101
|
return {
|
|
78
|
-
[`${NAME}--outlined`]: variations.includes('outlined') || outlined,
|
|
79
|
-
[`${NAME}--rounded`]: variations.includes('rounded') || rounded,
|
|
80
|
-
[`${NAME}--filled`]: variations.includes('filled') || filled,
|
|
81
|
-
[`${NAME}--text`]: variations.includes('text')
|
|
82
|
-
[`${NAME}--small`]: variations.includes('small') || small,
|
|
83
|
-
[`${NAME}--icon`]: variations.includes('icon') || icon,
|
|
84
|
-
[`${NAME}--color`]:
|
|
85
|
-
[`${NAME}--loading`]:
|
|
86
|
-
[`${NAME}--disabled`]:
|
|
102
|
+
[`${NAME}--outlined`]: variations.value.includes('outlined') || outlined,
|
|
103
|
+
[`${NAME}--rounded`]: variations.value.includes('rounded') || rounded,
|
|
104
|
+
[`${NAME}--filled`]: variations.value.includes('filled') || filled,
|
|
105
|
+
[`${NAME}--text`]: variations.value.includes('text'),
|
|
106
|
+
[`${NAME}--small`]: variations.value.includes('small') || small,
|
|
107
|
+
[`${NAME}--icon`]: variations.value.includes('icon') || icon,
|
|
108
|
+
[`${NAME}--color`]: props.color,
|
|
109
|
+
[`${NAME}--loading`]: props.loading,
|
|
110
|
+
[`${NAME}--disabled`]: props.disabled,
|
|
111
|
+
[`${NAME}--active`]: isActive.value
|
|
87
112
|
};
|
|
88
|
-
}
|
|
89
|
-
styles() {
|
|
113
|
+
});
|
|
114
|
+
const styles = computed(() => {
|
|
90
115
|
let {
|
|
91
116
|
color
|
|
92
|
-
} =
|
|
117
|
+
} = props;
|
|
93
118
|
let textColor;
|
|
94
119
|
if (color && !isColorValue(color)) {
|
|
95
120
|
color = `var(--y-theme-${color})`;
|
|
96
|
-
textColor = `var(--y-theme-on-${
|
|
121
|
+
textColor = `var(--y-theme-on-${props.color})`;
|
|
97
122
|
}
|
|
98
123
|
return {
|
|
99
124
|
[`--y-button__color`]: color,
|
|
100
125
|
[`--y-button__text-color`]: textColor
|
|
101
126
|
};
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
const children = [];
|
|
108
|
-
if (this.loading) {
|
|
109
|
-
children.push(h(YSpinnerRing, {
|
|
110
|
-
width: '24',
|
|
111
|
-
height: '24'
|
|
112
|
-
}));
|
|
113
|
-
}
|
|
114
|
-
children.push(defaultSlot);
|
|
115
|
-
return h('span', {
|
|
116
|
-
class: 'y-button__content'
|
|
117
|
-
}, children);
|
|
118
|
-
},
|
|
119
|
-
getClasses() {
|
|
120
|
-
return this.classes;
|
|
121
|
-
},
|
|
127
|
+
});
|
|
128
|
+
const isDisabled = computed(() => {
|
|
129
|
+
return choice?.disabled.value || props.disabled;
|
|
130
|
+
});
|
|
131
|
+
|
|
122
132
|
/// Events
|
|
123
|
-
onClick(e) {
|
|
124
|
-
e
|
|
125
|
-
|
|
133
|
+
function onClick(e) {
|
|
134
|
+
function guardEvent(e) {
|
|
135
|
+
// don't redirect with control keys
|
|
136
|
+
if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return;
|
|
137
|
+
// don't redirect when preventDefault called
|
|
138
|
+
if (e.defaultPrevented) return;
|
|
139
|
+
// don't redirect on right click
|
|
140
|
+
if (e.button !== undefined && e.button !== 0) return;
|
|
141
|
+
// don't redirect if `target="_blank"`
|
|
142
|
+
if (/\b_blank\b/i.test(attrs.target)) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
147
|
+
if (!guardEvent(e) || props.loading || isDisabled.value) {
|
|
126
148
|
return;
|
|
127
149
|
}
|
|
150
|
+
link.navigate?.(e);
|
|
151
|
+
if (e.preventDefault) e.preventDefault();
|
|
152
|
+
choice?.toggle();
|
|
128
153
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
[
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
154
|
+
useRender(() => {
|
|
155
|
+
const Tag = link.isLink.value ? 'a' : 'button';
|
|
156
|
+
return _withDirectives(_createVNode(Tag, {
|
|
157
|
+
"class": [`${NAME}`, choice?.selectedClass.value, {
|
|
158
|
+
...classes.value
|
|
159
|
+
}],
|
|
160
|
+
"href": link.href.value,
|
|
161
|
+
"style": styles.value,
|
|
162
|
+
"onClick": onClick,
|
|
163
|
+
"disabled": props.disabled ? true : undefined
|
|
164
|
+
}, {
|
|
165
|
+
default: () => [_createVNode("span", {
|
|
166
|
+
"class": ['y-button__content']
|
|
167
|
+
}, [props.loading && _createVNode(YSpinnerRing, mergeProps({
|
|
168
|
+
width: '24',
|
|
169
|
+
height: '24'
|
|
170
|
+
}), null), slots.default?.()]), slots.append?.()]
|
|
171
|
+
}), [[_resolveDirective("plate-wave"), !props.noWave && !props.loading]]);
|
|
172
|
+
});
|
|
173
|
+
return {
|
|
174
|
+
link
|
|
175
|
+
};
|
|
146
176
|
}
|
|
147
177
|
});
|
|
148
178
|
//# sourceMappingURL=YButton.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YButton.mjs","names":["defineComponent","h","withDirectives","PlateWave","isColorValue","getSlot","propsFactory","YSpinnerRing","NAME","pressYButtonProps","loading","Boolean","disabled","type","variation","String","small","icon","outlined","default","rounded","filled","text","color","noWave","YButton","name","directives","props","computed","variations","split","map","value","trim","classes","includes","styles","textColor","methods","createContent","defaultSlot","children","push","width","height","class","getClasses","onClick","e","preventDefault","render","style","undefined"],"sources":["../../../src/components/button/YButton.ts"],"sourcesContent":["import type { PropType, VNodeArrayChildren } from 'vue';\r\nimport { defineComponent, h, withDirectives } from 'vue';\r\n\r\nimport { PlateWave } from '../../directives/plate-wave';\r\nimport { isColorValue } from '../../util/color';\r\nimport { getSlot, propsFactory } from '../../util/vue-component';\r\nimport { YSpinnerRing } from '../loading/YSpinnerRing';\r\n\r\n/**\r\n * Style\r\n */\r\nimport './YButton.scss';\r\n\r\nconst NAME = 'y-button';\r\n\r\nexport const pressYButtonProps = propsFactory(\r\n {\r\n loading: Boolean,\r\n disabled: {\r\n type: Boolean,\r\n },\r\n //\r\n variation: {\r\n type: String as PropType<string>,\r\n },\r\n small: Boolean,\r\n icon: Boolean,\r\n outlined: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n rounded: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n filled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n text: {\r\n type: Boolean,\r\n },\r\n //\r\n color: {\r\n type: String,\r\n },\r\n noWave: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n 'YButton',\r\n);\r\n\r\nexport const YButton = defineComponent({\r\n name: 'YButton',\r\n directives: {\r\n PlateWave,\r\n },\r\n props: {\r\n ...pressYButtonProps(),\r\n },\r\n computed: {\r\n variations(): any[] {\r\n const { variation } = this;\r\n if (variation) {\r\n return variation.split(',').map((value) => {\r\n return value.trim();\r\n });\r\n }\r\n return [];\r\n },\r\n //\r\n classes() {\r\n const { variations, outlined, rounded, filled, text, small, icon } = this;\r\n return {\r\n [`${NAME}--outlined`]: variations.includes('outlined') || outlined,\r\n [`${NAME}--rounded`]: variations.includes('rounded') || rounded,\r\n [`${NAME}--filled`]: variations.includes('filled') || filled,\r\n [`${NAME}--text`]: variations.includes('text') || text,\r\n [`${NAME}--small`]: variations.includes('small') || small,\r\n [`${NAME}--icon`]: variations.includes('icon') || icon,\r\n [`${NAME}--color`]: this.color,\r\n [`${NAME}--loading`]: this.loading,\r\n [`${NAME}--disabled`]: this.disabled,\r\n };\r\n },\r\n styles(): Record<string, any> {\r\n let { color } = this;\r\n let textColor: string | undefined;\r\n if (color && !isColorValue(color)) {\r\n color = `var(--y-theme-${color})`;\r\n textColor = `var(--y-theme-on-${this.color})`;\r\n }\r\n return {\r\n [`--y-button__color`]: color,\r\n [`--y-button__text-color`]: textColor,\r\n };\r\n },\r\n },\r\n methods: {\r\n createContent() {\r\n const defaultSlot = getSlot(this, 'default');\r\n const children: VNodeArrayChildren = [];\r\n if (this.loading) {\r\n children.push(h(YSpinnerRing, { width: '24', height: '24' }));\r\n }\r\n children.push(defaultSlot);\r\n return h('span', { class: 'y-button__content' }, children);\r\n },\r\n getClasses() {\r\n return this.classes;\r\n },\r\n /// Events\r\n onClick(e: MouseEvent) {\r\n e.preventDefault();\r\n if (this.loading) {\r\n return;\r\n }\r\n },\r\n },\r\n render() {\r\n const { onClick, styles, noWave, loading } = this;\r\n return withDirectives(\r\n h(\r\n 'button',\r\n {\r\n class: {\r\n ...this.getClasses(),\r\n [`${NAME}`]: true,\r\n },\r\n style: styles,\r\n onClick,\r\n '^disabled': this.disabled ? true : undefined,\r\n },\r\n this.createContent(),\r\n ),\r\n [[PlateWave, !noWave && !loading]],\r\n );\r\n },\r\n});\r\n\r\nexport type YButton = InstanceType<typeof YButton>;\r\n"],"mappings":"AACA,SAASA,eAAe,EAAEC,CAAC,EAAEC,cAAc,QAAQ,KAAK;AAAC,SAEhDC,SAAS;AAAA,SACTC,YAAY;AAAA,SACZC,OAAO,EAAEC,YAAY;AAAA,SACrBC,YAAY;AAErB;AACA;AACA;AACA;AAEA,MAAMC,IAAI,GAAG,UAAU;AAEvB,OAAO,MAAMC,iBAAiB,GAAGH,YAAY,CAC3C;EACEI,OAAO,EAAEC,OAAO;EAChBC,QAAQ,EAAE;IACRC,IAAI,EAAEF;EACR,CAAC;EACD;EACAG,SAAS,EAAE;IACTD,IAAI,EAAEE;EACR,CAAC;EACDC,KAAK,EAAEL,OAAO;EACdM,IAAI,EAAEN,OAAO;EACbO,QAAQ,EAAE;IACRL,IAAI,EAAEF,OAAO;IACbQ,OAAO,EAAE;EACX,CAAC;EACDC,OAAO,EAAE;IACPP,IAAI,EAAEF,OAAO;IACbQ,OAAO,EAAE;EACX,CAAC;EACDE,MAAM,EAAE;IACNR,IAAI,EAAEF,OAAO;IACbQ,OAAO,EAAE;EACX,CAAC;EACDG,IAAI,EAAE;IACJT,IAAI,EAAEF;EACR,CAAC;EACD;EACAY,KAAK,EAAE;IACLV,IAAI,EAAEE;EACR,CAAC;EACDS,MAAM,EAAE;IACNX,IAAI,EAAEF,OAAO;IACbQ,OAAO,EAAE;EACX;AACF,C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MAAM;MAAEb,MAAM;MAAEd;IAAQ,CAAC,GAAG,IAAI;IACjD,OAAOR,cAAc,CACnBD,CAAC,CACC,QAAQ,EACR;MACE6C,KAAK,EAAE;QACL,GAAG,IAAI,CAACC,UAAU,CAAC,CAAC;QACpB,CAAE,GAAEvC,IAAK,EAAC,GAAG;MACf,CAAC;MACD4C,KAAK,EAAEf,MAAM;MACbW,OAAO;MACP,WAAW,EAAE,IAAI,CAACpC,QAAQ,GAAG,IAAI,GAAGyC;IACtC,CAAC,EACD,IAAI,CAACb,aAAa,CAAC,CACrB,CAAC,EACD,CAAC,CAACrC,SAAS,EAAE,CAACqB,MAAM,IAAI,CAACd,OAAO,CAAC,CACnC,CAAC;EACH;AACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"YButton.mjs","names":["computed","defineComponent","mergeProps","pressChoiceItemPropsOptions","useChoiceItem","useChoiceByLink","useRender","pressVueRouterPropsOptions","useLink","PlateWave","isColorValue","propsFactory","YSpinnerRing","Y_TOGGLE_BUTTON_KEY","NAME","pressYButtonProps","loading","Boolean","active","type","default","undefined","injectSymbol","variation","String","small","icon","outlined","rounded","filled","color","noWave","YButton","name","directives","props","emits","choice","setup","_ref","attrs","slots","link","select","isActive","isLink","value","isSelected","variations","split","map","trim","classes","includes","disabled","styles","textColor","isDisabled","onClick","e","guardEvent","metaKey","altKey","ctrlKey","shiftKey","defaultPrevented","button","test","target","navigate","preventDefault","toggle","Tag","_withDirectives","_createVNode","selectedClass","href","width","height","append","_resolveDirective"],"sources":["../../../src/components/button/YButton.tsx"],"sourcesContent":["import type { PropType } from 'vue';\nimport { computed, defineComponent, mergeProps } from 'vue';\n\nimport {\n pressChoiceItemPropsOptions,\n useChoiceItem,\n} from '../../composables/choice';\nimport { useChoiceByLink } from '../../composables/choice-link';\nimport { useRender } from '../../composables/component';\nimport {\n pressVueRouterPropsOptions,\n useLink,\n} from '../../composables/vue-router';\nimport { PlateWave } from '../../directives/plate-wave';\nimport { isColorValue } from '../../util/color';\nimport { propsFactory } from '../../util/vue-component';\nimport { YSpinnerRing } from '../loading/YSpinnerRing';\nimport { Y_TOGGLE_BUTTON_KEY } from '../toggle-button';\n\n/**\n * Style\n */\nimport './YButton.scss';\n\nconst NAME = 'y-button';\n\nexport const pressYButtonProps = propsFactory(\n {\n loading: Boolean,\n active: { type: Boolean, default: undefined },\n injectSymbol: { type: null, default: Y_TOGGLE_BUTTON_KEY },\n //\n variation: {\n type: String as PropType<string>,\n },\n small: Boolean,\n icon: Boolean,\n outlined: {\n type: Boolean,\n default: false,\n },\n rounded: {\n type: Boolean,\n default: false,\n },\n filled: {\n type: Boolean,\n default: false,\n },\n //\n color: {\n type: String,\n },\n noWave: {\n type: Boolean,\n default: false,\n },\n ...pressVueRouterPropsOptions(),\n ...pressChoiceItemPropsOptions(),\n },\n 'YButton',\n);\n\nexport const YButton = defineComponent({\n name: 'YButton',\n directives: {\n PlateWave,\n },\n props: pressYButtonProps(),\n emits: {\n 'choice:selected': (choice: { value: boolean }) => true,\n },\n setup(props, { attrs, slots }) {\n const choice = useChoiceItem(props, props.injectSymbol, false);\n const link = useLink(props, attrs);\n useChoiceByLink(link, choice?.select);\n\n const isActive = computed(() => {\n if (props.active !== undefined) {\n return props.active;\n }\n if (link.isLink.value) {\n return link.isActive?.value;\n }\n return choice?.isSelected.value;\n });\n\n const variations = computed(() => {\n const { variation } = props;\n if (typeof variation === 'string') {\n return variation.split(',').map((value) => {\n return value.trim();\n });\n }\n return [];\n });\n\n const classes = computed(() => {\n const { outlined, rounded, filled, small, icon } = props;\n return {\n [`${NAME}--outlined`]:\n variations.value.includes('outlined') || outlined,\n [`${NAME}--rounded`]: variations.value.includes('rounded') || rounded,\n [`${NAME}--filled`]: variations.value.includes('filled') || filled,\n [`${NAME}--text`]: variations.value.includes('text'),\n [`${NAME}--small`]: variations.value.includes('small') || small,\n [`${NAME}--icon`]: variations.value.includes('icon') || icon,\n [`${NAME}--color`]: props.color,\n [`${NAME}--loading`]: props.loading,\n [`${NAME}--disabled`]: props.disabled,\n [`${NAME}--active`]: isActive.value,\n };\n });\n\n const styles = computed(() => {\n let { color } = props;\n let textColor: string | undefined;\n if (color && !isColorValue(color)) {\n color = `var(--y-theme-${color})`;\n textColor = `var(--y-theme-on-${props.color})`;\n }\n return {\n [`--y-button__color`]: color,\n [`--y-button__text-color`]: textColor,\n };\n });\n\n const isDisabled = computed(() => {\n return choice?.disabled.value || props.disabled;\n });\n\n /// Events\n function onClick(e: MouseEvent) {\n function guardEvent(e: MouseEvent) {\n // don't redirect with control keys\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return;\n // don't redirect when preventDefault called\n if (e.defaultPrevented) return;\n // don't redirect on right click\n if (e.button !== undefined && e.button !== 0) return;\n // don't redirect if `target=\"_blank\"`\n if (/\\b_blank\\b/i.test(attrs.target as string)) {\n return;\n }\n return true;\n }\n if (!guardEvent(e) || props.loading || isDisabled.value) {\n return;\n }\n link.navigate?.(e);\n if (e.preventDefault) e.preventDefault();\n choice?.toggle();\n }\n\n useRender(() => {\n const Tag = link.isLink.value ? 'a' : 'button';\n return (\n <Tag\n class={[\n `${NAME}`,\n choice?.selectedClass.value,\n {\n ...classes.value,\n },\n ]}\n href={link.href.value}\n style={styles.value}\n onClick={onClick}\n disabled={props.disabled ? true : undefined}\n v-plate-wave={!props.noWave && !props.loading}\n >\n <span class={['y-button__content']}>\n {props.loading && (\n <YSpinnerRing\n {...mergeProps({ width: '24', height: '24' })}\n ></YSpinnerRing>\n )}\n {slots.default?.()}\n </span>\n {slots.append?.()}\n </Tag>\n );\n });\n\n return {\n link,\n };\n },\n});\n\nexport type YButton = InstanceType<typeof YButton>;\n"],"mappings":";AACA,SAASA,QAAQ,EAAEC,eAAe,EAAEC,UAAU,QAAQ,KAAK;AAAC,SAG1DC,2BAA2B,EAC3BC,aAAa;AAAA,SAENC,eAAe;AAAA,SACfC,SAAS;AAAA,SAEhBC,0BAA0B,EAC1BC,OAAO;AAAA,SAEAC,SAAS;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AAA9D,YAAA,EAENV,UAAU,CAAC;UAAE2E,KAAK,EAAE,IAAI;UAAEC,MAAM,EAAE;QAAK,CAAC,CAAC,OAEhD,EACArC,KAAK,CAACrB,OAAO,GAAG,CAAC,IAEnBqB,KAAK,CAACsC,MAAM,GAAG,CAAC;MAAA,MAAAC,iBAAA,gBAVH,CAAC7C,KAAK,CAACJ,MAAM,IAAI,CAACI,KAAK,CAACnB,OAAO;IAanD,CAAC,CAAC;IAEF,OAAO;MACL0B;IACF,CAAC;EACH;AACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YCheckbox.mjs","names":["computed","defineComponent","ref","withModifiers","useRender","getUid","YInputCheckbox","name","components","model","prop","event","emits","props","inputValue","Boolean","Array","value","String","Number","Object","label","reverse","icon","type","color","default","disabled","readonly","setup","_ref","emit","slots","focused","innerValue","counterId","toString","inputId","onFocus","e","onBlur","onClick","inputByValue","isArray","found","find","inp","undefined","classes","computedIcon","isMultipleInput","multipleInputIndex","findIndex","v","_createVNode","leading","stopPropagation","_len","arguments","length","args","_key","_len2","_key2","trailing","created","watch","handler","immediate"],"sources":["../../../src/components/checkbox/YCheckbox.tsx"],"sourcesContent":["import { PropType, computed, defineComponent, ref, withModifiers } from 'vue';\n\nimport { useRender } from '../../composables/component';\nimport { getUid } from '../../util/vue-component';\n\nimport './YCheckbox.scss';\nimport YInputCheckbox from './YInputCheckbox';\n\nexport default defineComponent({\n name: 'YCheckbox',\n components: { YInputCheckbox },\n model: {\n prop: 'inputValue',\n event: 'change',\n },\n emits: ['focus', 'blur', 'change'],\n props: {\n inputValue: [Boolean, Array] as PropType<boolean | any[]>,\n value: [String, Number, Object] as PropType<any>,\n label: String as PropType<string>,\n reverse: Boolean as PropType<boolean>,\n icon: {\n type: [Object, String] as PropType<\n { checked?: string; unchecked?: string } | string\n >,\n },\n color: {\n type: String as PropType<string>,\n default: () => 'primary',\n },\n disabled: Boolean as PropType<boolean>,\n readonly: Boolean as PropType<boolean>,\n },\n setup(props, { emit, slots }) {\n const focused = ref(false);\n const innerValue = ref(false);\n const counterId = (getUid() ?? '').toString();\n const inputId = `input-${counterId}`;\n\n function onFocus(e: FocusEvent) {\n focused.value = true;\n emit('focus', e);\n }\n\n function onBlur(e: FocusEvent) {\n focused.value = false;\n emit('blur', e);\n }\n\n function onClick(e: Event, ...args: any[]) {\n if (props.disabled || props.readonly) return;\n innerValue.value = !innerValue.value;\n emit('change', innerValue.value, e);\n }\n\n function inputByValue() {\n if (Array.isArray(props.inputValue)) {\n const found = props.inputValue?.find((inp: any) => inp === props.value);\n\n if (found !== undefined) {\n innerValue.value = true;\n } else {\n innerValue.value = false;\n }\n } else if (typeof props.inputValue === 'boolean') {\n innerValue.value = props.inputValue;\n }\n }\n\n const classes = computed<Record<string, boolean>>(() => {\n const { reverse, disabled, readonly } = props;\n return {\n 'y-checkbox': true,\n 'y-checkbox--reverse': !!reverse,\n 'y-checkbox--focused': focused.value,\n 'y-checkbox--disabled': !!disabled,\n 'y-checkbox--readonly': !!readonly,\n };\n });\n\n const computedIcon = computed<string | undefined>(() => {\n if (typeof props.icon === 'string') {\n return props.icon;\n }\n return undefined;\n });\n\n const isMultipleInput = computed<boolean>(() => {\n return Array.isArray(props.inputValue);\n });\n\n const multipleInputIndex = computed<number>(() => {\n if (!isMultipleInput.value) {\n return -1;\n }\n return (props.inputValue as any[]).findIndex(\n (v: any) => v === props.value,\n );\n });\n\n useRender(() => {\n return (\n <div class={[{...classes.value}]}>\n {slots.leading?.()}\n <div class=\"y-checkbox__slot\">\n <YInputCheckbox\n onClick={(e: Event, ...args: any[]) => {\n e.stopPropagation();\n onClick(e, ...args);\n }}\n onFocus={onFocus}\n onBlur={onBlur}\n id={counterId}\n value={innerValue.value}\n icon={computedIcon.value}\n color={props.color}\n disabled={props.disabled}\n readonly={props.readonly}\n >\n {slots.icon && {\n icon: (...args: any[]) => slots.icon?.(...args),\n }}\n </YInputCheckbox>\n <label\n onClick={withModifiers(() => {}, ['stop'])}\n class=\"y-checkbox__label\"\n for={inputId}\n >\n {slots.label ? slots.label?.() : props.label}\n </label>\n </div>\n {slots.trailing?.()}\n </div>\n );\n });\n\n return {\n innerValue,\n inputByValue,\n };\n },\n created() {\n if (Array.isArray(this.inputValue)) {\n this.inputByValue();\n } else {\n this.innerValue = !!this.inputValue;\n }\n },\n watch: {\n inputValue: {\n handler() {\n this.inputByValue();\n },\n immediate: true,\n },\n },\n});\n"],"mappings":";AAAA,SAAmBA,QAAQ,EAAEC,eAAe,EAAEC,GAAG,EAAEC,aAAa,QAAQ,KAAK;AAAC,SAErEC,SAAS;AAAA,SACTC,MAAM;AAEf;AAA0B,OACnBC,cAAc;AAErB,eAAeL,eAAe,CAAC;EAC7BM,IAAI,EAAE,WAAW;EACjBC,UAAU,EAAE;IAAEF;EAAe,CAAC;EAC9BG,KAAK,EAAE;IACLC,IAAI,EAAE,YAAY;IAClBC,KAAK,EAAE;EACT,CAAC;EACDC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC;EAClCC,KAAK,EAAE;IACLC,UAAU,EAAE,CAACC,OAAO,EAAEC,KAAK,CAA8B;IACzDC,KAAK,EAAE,CAACC,MAAM,EAAEC,MAAM,EAAEC,MAAM,CAAkB;IAChDC,KAAK,EAAEH,MAA0B;IACjCI,OAAO,EAAEP,OAA4B;IACrCQ,IAAI,EAAE;MACJC,IAAI,EAAE,CAACJ,MAAM,EAAEF,MAAM;IAGvB,CAAC;IACDO,KAAK,EAAE;MACLD,IAAI,EAAEN,MAA0B;MAChCQ,OAAO,EAAEA,CAAA,KAAM;IACjB,CAAC;IACDC,QAAQ,EAAEZ,OAA4B;IACtCa,QAAQ,EAAEb;EACZ,CAAC;EACDc,KAAKA,CAAChB,KAAK,EAAAiB,IAAA,EAAmB;IAAA,IAAjB;MAAEC,IAAI;MAAEC;IAAM,CAAC,GAAAF,IAAA;IAC1B,MAAMG,OAAO,GAAG/B,GAAG,CAAC,KAAK,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C,IAAI,CAAC4B,YAAY,CAAC,CAAC;IACrB,CAAC,MAAM;MACL,IAAI,CAACR,UAAU,GAAG,CAAC,CAAC,IAAI,CAACpB,UAAU;IACrC;EACF,CAAC;EACDoD,KAAK,EAAE;IACLpD,UAAU,EAAE;MACVqD,OAAOA,CAAA,EAAG;QACR,IAAI,CAACzB,YAAY,CAAC,CAAC;MACrB,CAAC;MACD0B,SAAS,EAAE;IACb;EACF;AACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"YCheckbox.mjs","names":["computed","defineComponent","ref","withModifiers","useRender","getUid","YInputCheckbox","name","components","model","prop","event","emits","props","inputValue","Boolean","Array","value","String","Number","Object","label","reverse","icon","type","color","default","disabled","readonly","setup","_ref","emit","slots","focused","innerValue","counterId","toString","inputId","onFocus","e","onBlur","onClick","inputByValue","isArray","found","find","inp","undefined","classes","computedIcon","isMultipleInput","multipleInputIndex","findIndex","v","_createVNode","leading","stopPropagation","_len","arguments","length","args","_key","_len2","_key2","trailing","created","watch","handler","immediate"],"sources":["../../../src/components/checkbox/YCheckbox.tsx"],"sourcesContent":["import { PropType, computed, defineComponent, ref, withModifiers } from 'vue';\r\n\r\nimport { useRender } from '../../composables/component';\r\nimport { getUid } from '../../util/vue-component';\r\n\r\nimport './YCheckbox.scss';\r\nimport YInputCheckbox from './YInputCheckbox';\r\n\r\nexport default defineComponent({\r\n name: 'YCheckbox',\r\n components: { YInputCheckbox },\r\n model: {\r\n prop: 'inputValue',\r\n event: 'change',\r\n },\r\n emits: ['focus', 'blur', 'change'],\r\n props: {\r\n inputValue: [Boolean, Array] as PropType<boolean | any[]>,\r\n value: [String, Number, Object] as PropType<any>,\r\n label: String as PropType<string>,\r\n reverse: Boolean as PropType<boolean>,\r\n icon: {\r\n type: [Object, String] as PropType<\r\n { checked?: string; unchecked?: string } | string\r\n >,\r\n },\r\n color: {\r\n type: String as PropType<string>,\r\n default: () => 'primary',\r\n },\r\n disabled: Boolean as PropType<boolean>,\r\n readonly: Boolean as PropType<boolean>,\r\n },\r\n setup(props, { emit, slots }) {\r\n const focused = ref(false);\r\n const innerValue = ref(false);\r\n const counterId = (getUid() ?? '').toString();\r\n const inputId = `input-${counterId}`;\r\n\r\n function onFocus(e: FocusEvent) {\r\n focused.value = true;\r\n emit('focus', e);\r\n }\r\n\r\n function onBlur(e: FocusEvent) {\r\n focused.value = false;\r\n emit('blur', e);\r\n }\r\n\r\n function onClick(e: Event, ...args: any[]) {\r\n if (props.disabled || props.readonly) return;\r\n innerValue.value = !innerValue.value;\r\n emit('change', innerValue.value, e);\r\n }\r\n\r\n function inputByValue() {\r\n if (Array.isArray(props.inputValue)) {\r\n const found = props.inputValue?.find((inp: any) => inp === props.value);\r\n\r\n if (found !== undefined) {\r\n innerValue.value = true;\r\n } else {\r\n innerValue.value = false;\r\n }\r\n } else if (typeof props.inputValue === 'boolean') {\r\n innerValue.value = props.inputValue;\r\n }\r\n }\r\n\r\n const classes = computed<Record<string, boolean>>(() => {\r\n const { reverse, disabled, readonly } = props;\r\n return {\r\n 'y-checkbox': true,\r\n 'y-checkbox--reverse': !!reverse,\r\n 'y-checkbox--focused': focused.value,\r\n 'y-checkbox--disabled': !!disabled,\r\n 'y-checkbox--readonly': !!readonly,\r\n };\r\n });\r\n\r\n const computedIcon = computed<string | undefined>(() => {\r\n if (typeof props.icon === 'string') {\r\n return props.icon;\r\n }\r\n return undefined;\r\n });\r\n\r\n const isMultipleInput = computed<boolean>(() => {\r\n return Array.isArray(props.inputValue);\r\n });\r\n\r\n const multipleInputIndex = computed<number>(() => {\r\n if (!isMultipleInput.value) {\r\n return -1;\r\n }\r\n return (props.inputValue as any[]).findIndex(\r\n (v: any) => v === props.value,\r\n );\r\n });\r\n\r\n useRender(() => {\r\n return (\r\n <div class={[{...classes.value}]}>\r\n {slots.leading?.()}\r\n <div class=\"y-checkbox__slot\">\r\n <YInputCheckbox\r\n onClick={(e: Event, ...args: any[]) => {\r\n e.stopPropagation();\r\n onClick(e, ...args);\r\n }}\r\n onFocus={onFocus}\r\n onBlur={onBlur}\r\n id={counterId}\r\n value={innerValue.value}\r\n icon={computedIcon.value}\r\n color={props.color}\r\n disabled={props.disabled}\r\n readonly={props.readonly}\r\n >\r\n {slots.icon && {\r\n icon: (...args: any[]) => slots.icon?.(...args),\r\n }}\r\n </YInputCheckbox>\r\n <label\r\n onClick={withModifiers(() => {}, ['stop'])}\r\n class=\"y-checkbox__label\"\r\n for={inputId}\r\n >\r\n {slots.label ? slots.label?.() : props.label}\r\n </label>\r\n </div>\r\n {slots.trailing?.()}\r\n </div>\r\n );\r\n });\r\n\r\n return {\r\n innerValue,\r\n inputByValue,\r\n };\r\n },\r\n created() {\r\n if (Array.isArray(this.inputValue)) {\r\n this.inputByValue();\r\n } else {\r\n this.innerValue = !!this.inputValue;\r\n }\r\n },\r\n watch: {\r\n inputValue: {\r\n handler() {\r\n this.inputByValue();\r\n },\r\n immediate: true,\r\n },\r\n },\r\n});\r\n"],"mappings":";AAAA,SAAmBA,QAAQ,EAAEC,eAAe,EAAEC,GAAG,EAAEC,aAAa,QAAQ,KAAK;AAAC,SAErEC,SAAS;AAAA,SACTC,MAAM;AAEf;AAA0B,OACnBC,cAAc;AAErB,eAAeL,eAAe,CAAC;EAC7BM,IAAI,EAAE,WAAW;EACjBC,UAAU,EAAE;IAAEF;EAAe,CAAC;EAC9BG,KAAK,EAAE;IACLC,IAAI,EAAE,YAAY;IAClBC,KAAK,EAAE;EACT,CAAC;EACDC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC;EAClCC,KAAK,EAAE;IACLC,UAAU,EAAE,CAACC,OAAO,EAAEC,KAAK,CAA8B;IACzDC,KAAK,EAAE,CAACC,MAAM,EAAEC,MAAM,EAAEC,MAAM,CAAkB;IAChDC,KAAK,EAAEH,MAA0B;IACjCI,OAAO,EAAEP,OAA4B;IACrCQ,IAAI,EAAE;MACJC,IAAI,EAAE,CAACJ,MAAM,EAAEF,MAAM;IAGvB,CAAC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O,IAEXL,KAAK,CAACX,KAAK,GAAGW,KAAK,CAACX,KAAK,GAAG,CAAC,GAAGR,KAAK,CAACQ,KAAK,MAG/CW,KAAK,CAACgC,QAAQ,GAAG,CAAC;IAGzB,CAAC,CAAC;IAEF,OAAO;MACL9B,UAAU;MACVQ;IACF,CAAC;EACH,CAAC;EACDuB,OAAOA,CAAA,EAAG;IACR,IAAIjD,KAAK,CAAC2B,OAAO,CAAC,IAAI,CAAC7B,UAAU,CAAC,EAAE;MAClC,IAAI,CAAC4B,YAAY,CAAC,CAAC;IACrB,CAAC,MAAM;MACL,IAAI,CAACR,UAAU,GAAG,CAAC,CAAC,IAAI,CAACpB,UAAU;IACrC;EACF,CAAC;EACDoD,KAAK,EAAE;IACLpD,UAAU,EAAE;MACVqD,OAAOA,CAAA,EAAG;QACR,IAAI,CAACzB,YAAY,CAAC,CAAC;MACrB,CAAC;MACD0B,SAAS,EAAE;IACb;EACF;AACF,CAAC,CAAC"}
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
.y-checkbox {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
|
|
5
|
-
&__slot {
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: row;
|
|
8
|
-
align-items: center;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.y-checkbox__label {
|
|
12
|
-
cursor: pointer;
|
|
13
|
-
font-weight: 400;
|
|
14
|
-
color: var(--y-theme-on-surface-variant);
|
|
15
|
-
font-size: 14px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&--reverse .y-checkbox__slot {
|
|
19
|
-
flex-direction: row-reverse;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&:not(&--reverse) .y-input--checkbox {
|
|
23
|
-
margin-right: 8px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.y-input--checkbox {
|
|
27
|
-
cursor: pointer;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&--reverse .y-input--checkbox {
|
|
31
|
-
margin-left: 8px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&--readonly,
|
|
35
|
-
&--disabled {
|
|
36
|
-
.y-checkbox__label,
|
|
37
|
-
.y-input--checkbox {
|
|
38
|
-
cursor: default;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
&--disabled {
|
|
43
|
-
.y-checkbox__slot {
|
|
44
|
-
filter: grayscale(1);
|
|
45
|
-
opacity: 0.4;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
1
|
+
.y-checkbox {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
|
|
5
|
+
&__slot {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: row;
|
|
8
|
+
align-items: center;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.y-checkbox__label {
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
font-weight: 400;
|
|
14
|
+
color: var(--y-theme-on-surface-variant);
|
|
15
|
+
font-size: 14px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&--reverse .y-checkbox__slot {
|
|
19
|
+
flex-direction: row-reverse;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:not(&--reverse) .y-input--checkbox {
|
|
23
|
+
margin-right: 8px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.y-input--checkbox {
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&--reverse .y-input--checkbox {
|
|
31
|
+
margin-left: 8px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&--readonly,
|
|
35
|
+
&--disabled {
|
|
36
|
+
.y-checkbox__label,
|
|
37
|
+
.y-input--checkbox {
|
|
38
|
+
cursor: default;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&--disabled {
|
|
43
|
+
.y-checkbox__slot {
|
|
44
|
+
filter: grayscale(1);
|
|
45
|
+
opacity: 0.4;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
package/lib/components/index.mjs
CHANGED
|
@@ -23,5 +23,6 @@ export * from "./pagination/index.mjs";
|
|
|
23
23
|
export * from "./loading/index.mjs";
|
|
24
24
|
export * from "./dropdown/index.mjs";
|
|
25
25
|
export * from "./select/index.mjs";
|
|
26
|
+
export * from "./tab/index.mjs";
|
|
26
27
|
export * from "./alert/index.mjs";
|
|
27
28
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/components/index.ts"],"sourcesContent":["export * from './app';\r\nexport * from './button';\r\nexport * from './input';\r\nexport * from './field-input';\r\nexport * from './form';\r\nexport * from './progress-bar';\r\nexport * from './card';\r\nexport * from './chip';\r\nexport * from './switch';\r\nexport * from './layer';\r\nexport * from './dialog';\r\nexport * from './snackbar';\r\nexport * from './tooltip';\r\nexport * from './transitions';\r\nexport * from './panel';\r\nexport * from './tree-view';\r\nexport * from './list';\r\nexport * from './icons';\r\nexport * from './table';\r\nexport * from './menu';\r\nexport * from './checkbox';\r\nexport * from './pagination';\r\nexport * from './loading';\r\nexport * from './dropdown';\r\nexport * from './select';\r\nexport * from './alert';\r\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/components/index.ts"],"sourcesContent":["export * from './app';\r\nexport * from './button';\r\nexport * from './input';\r\nexport * from './field-input';\r\nexport * from './form';\r\nexport * from './progress-bar';\r\nexport * from './card';\r\nexport * from './chip';\r\nexport * from './switch';\r\nexport * from './layer';\r\nexport * from './dialog';\r\nexport * from './snackbar';\r\nexport * from './tooltip';\r\nexport * from './transitions';\r\nexport * from './panel';\r\nexport * from './tree-view';\r\nexport * from './list';\r\nexport * from './icons';\r\nexport * from './table';\r\nexport * from './menu';\r\nexport * from './checkbox';\r\nexport * from './pagination';\r\nexport * from './loading';\r\nexport * from './dropdown';\r\nexport * from './select';\r\nexport * from './tab';\r\nexport * from './alert';\r\n"],"mappings":""}
|