nuxt-glorious 1.2.3-9 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/module.d.mts +38 -1
- package/dist/module.d.ts +38 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +37 -33
- package/dist/runtime/assets/style/components/alert.css +20 -5
- package/dist/runtime/assets/style/components/avatar.css +21 -18
- package/dist/runtime/assets/style/components/button.css +198 -0
- package/dist/runtime/assets/style/components/checkbox.css +24 -24
- package/dist/runtime/assets/style/components/drawer.css +14 -18
- package/dist/runtime/assets/style/components/file.css +102 -33
- package/dist/runtime/assets/style/components/input.css +103 -23
- package/dist/runtime/assets/style/components/loading.css +43 -0
- package/dist/runtime/assets/style/components/radio.css +27 -27
- package/dist/runtime/assets/style/components/select.css +24 -19
- package/dist/runtime/assets/style/components/textarea.css +35 -35
- package/dist/runtime/assets/style/mixin.css +0 -0
- package/dist/runtime/components/G/Alert.vue +8 -28
- package/dist/runtime/components/G/Avatar.vue +5 -73
- package/dist/runtime/components/G/Breadcrumb.vue +7 -25
- package/dist/runtime/components/G/Button.vue +10 -152
- package/dist/runtime/components/G/Checkbox.vue +8 -124
- package/dist/runtime/components/G/CountDown.vue +33 -44
- package/dist/runtime/components/G/Drawer.vue +12 -101
- package/dist/runtime/components/G/Dropdown.vue +16 -11
- package/dist/runtime/components/G/ErrorText.vue +6 -11
- package/dist/runtime/components/G/File.vue +25 -117
- package/dist/runtime/components/G/Icon.vue +125 -0
- package/dist/runtime/components/G/Input.vue +28 -229
- package/dist/runtime/components/G/Loading.vue +4 -21
- package/dist/runtime/components/G/Modal.vue +13 -145
- package/dist/runtime/components/G/Paginate.vue +8 -44
- package/dist/runtime/components/G/Radio.vue +12 -163
- package/dist/runtime/components/G/Rating.vue +3 -30
- package/dist/runtime/components/G/Select.vue +7 -110
- package/dist/runtime/components/G/Switch.vue +5 -82
- package/dist/runtime/components/G/Tab.vue +6 -30
- package/dist/runtime/components/G/Table.vue +11 -131
- package/dist/runtime/components/G/textarea.vue +14 -119
- package/dist/runtime/components/G/timeline.vue +3 -59
- package/dist/runtime/components/helper.d.ts +2 -0
- package/dist/runtime/components/helper.mjs +25 -0
- package/dist/runtime/components/props/Alert.d.ts +8 -0
- package/dist/runtime/components/props/Alert.mjs +4 -0
- package/dist/runtime/components/props/Avatar.d.ts +12 -0
- package/dist/runtime/components/props/Avatar.mjs +9 -0
- package/dist/runtime/components/props/Breadcrumb.d.ts +26 -0
- package/dist/runtime/components/props/Breadcrumb.mjs +11 -0
- package/dist/runtime/components/props/Button.d.ts +47 -0
- package/dist/runtime/components/props/Button.mjs +14 -0
- package/dist/runtime/components/props/CheckBox.d.ts +23 -0
- package/dist/runtime/components/props/CheckBox.mjs +7 -0
- package/dist/runtime/components/props/CountDown.d.ts +7 -0
- package/dist/runtime/components/props/CountDown.mjs +6 -0
- package/dist/runtime/components/props/Drawer.d.ts +8 -0
- package/dist/runtime/components/props/Drawer.mjs +7 -0
- package/dist/runtime/components/props/ErrorText.d.ts +8 -0
- package/dist/runtime/components/props/ErrorText.mjs +4 -0
- package/dist/runtime/components/props/File.d.ts +28 -0
- package/dist/runtime/components/props/File.mjs +9 -0
- package/dist/runtime/components/props/Icon.d.ts +23 -0
- package/dist/runtime/components/props/Icon.mjs +7 -0
- package/dist/runtime/components/props/Input.d.ts +91 -0
- package/dist/runtime/components/props/Input.mjs +50 -0
- package/dist/runtime/components/props/Loading.d.ts +18 -0
- package/dist/runtime/components/props/Loading.mjs +6 -0
- package/dist/runtime/components/props/Modal.d.ts +48 -0
- package/dist/runtime/components/props/Modal.mjs +38 -0
- package/dist/runtime/components/props/Paginate.d.ts +18 -0
- package/dist/runtime/components/props/Paginate.mjs +17 -0
- package/dist/runtime/components/props/Radio.d.ts +33 -0
- package/dist/runtime/components/props/Radio.mjs +9 -0
- package/dist/runtime/components/props/Select.d.ts +61 -0
- package/dist/runtime/components/props/Select.mjs +23 -0
- package/dist/runtime/components/props/Switch.d.ts +13 -0
- package/dist/runtime/components/props/Switch.mjs +5 -0
- package/dist/runtime/components/props/Tab.d.ts +21 -0
- package/dist/runtime/components/props/Tab.mjs +7 -0
- package/dist/runtime/components/props/Table.d.ts +49 -0
- package/dist/runtime/components/props/Table.mjs +19 -0
- package/dist/runtime/components/props/Textarea.d.ts +38 -0
- package/dist/runtime/components/props/Textarea.mjs +14 -0
- package/dist/runtime/components/props/Timeline.d.ts +11 -0
- package/dist/runtime/components/props/Timeline.mjs +7 -0
- package/dist/runtime/components/props/common/index.d.ts +161 -0
- package/dist/runtime/components/props/common/index.mjs +147 -0
- package/dist/runtime/composables/useGloriousCore.d.ts +1 -1
- package/dist/runtime/composables/useGloriousCore.mjs +1 -1
- package/dist/runtime/composables/useGloriousFetch.mjs +0 -1
- package/dist/runtime/middlewares/AuthStrategy.mjs +1 -5
- package/dist/runtime/stores/GloriousStore.d.ts +0 -2
- package/dist/runtime/stores/GloriousStore.mjs +0 -20
- package/dist/types.d.mts +2 -10
- package/dist/types.d.ts +2 -10
- package/package.json +1 -1
- package/dist/runtime/assets/style/components/buttons.css +0 -107
- package/dist/runtime/components/G/BottomNavigation.vue +0 -3
- package/dist/runtime/components/G/Icon/index.vue +0 -143
@@ -1,48 +1,19 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
default: true,
|
6
|
-
type: [Boolean, String, Object],
|
7
|
-
},
|
8
|
-
color: {
|
9
|
-
required: false,
|
10
|
-
default: "green",
|
11
|
-
type: String as () => "orange" | "blue" | "gray" | "red" | "green",
|
12
|
-
},
|
13
|
-
size: {
|
14
|
-
required: false,
|
15
|
-
default: "md",
|
16
|
-
type: String as () => "xl" | "lg" | "md" | "sm" | "xs",
|
17
|
-
},
|
18
|
-
disabled: {
|
19
|
-
required: false,
|
20
|
-
default: false,
|
21
|
-
type: Boolean,
|
22
|
-
},
|
23
|
-
name: {
|
24
|
-
required: true,
|
25
|
-
type: String,
|
26
|
-
},
|
27
|
-
value: {
|
28
|
-
required: false,
|
29
|
-
default: "",
|
30
|
-
type: String,
|
31
|
-
},
|
32
|
-
checked: {
|
33
|
-
required: false,
|
34
|
-
type: Boolean,
|
35
|
-
},
|
36
|
-
});
|
2
|
+
import _props from '../props/Radio'
|
3
|
+
const props = defineProps(_props)
|
4
|
+
const modelValue = defineModel()
|
37
5
|
|
38
|
-
const
|
39
|
-
|
40
|
-
|
41
|
-
|
6
|
+
const inputFunction = (event: Event) => {
|
7
|
+
const target = event.currentTarget as HTMLInputElement
|
8
|
+
modelValue.value = target.checked
|
9
|
+
}
|
42
10
|
</script>
|
43
11
|
|
44
12
|
<template>
|
45
|
-
<label
|
13
|
+
<label
|
14
|
+
class="glorious-radio"
|
15
|
+
:class="[props.color, `size-${props.size}`]"
|
16
|
+
>
|
46
17
|
<input
|
47
18
|
:name="props.name"
|
48
19
|
type="radio"
|
@@ -55,126 +26,4 @@ const inputFunction = (event: any) =>
|
|
55
26
|
</label>
|
56
27
|
</template>
|
57
28
|
|
58
|
-
<style
|
59
|
-
.glorious-radio {
|
60
|
-
@apply block relative cursor-pointer;
|
61
|
-
}
|
62
|
-
.glorious-radio > input {
|
63
|
-
@apply hidden;
|
64
|
-
}
|
65
|
-
.glorious-radio > input:checked ~ div {
|
66
|
-
@apply border-none;
|
67
|
-
}
|
68
|
-
.glorious-radio > input:checked ~ div:after {
|
69
|
-
content: "";
|
70
|
-
@apply block w-1 h-1 bg-white rounded-full;
|
71
|
-
}
|
72
|
-
.glorious-radio > input:disabled ~ div {
|
73
|
-
@apply cursor-not-allowed;
|
74
|
-
}
|
75
|
-
.glorious-radio > div:last-child {
|
76
|
-
@apply border border-gray-500 rounded-full bg-white left-0 top-0 absolute hover:shadow-lg;
|
77
|
-
}
|
78
|
-
.glorious-radio > div:last-child > div:first-child {
|
79
|
-
@apply hidden;
|
80
|
-
}
|
81
|
-
.glorious-radio > div:last-child:after {
|
82
|
-
@apply absolute hidden right-0 top-0 left-0 bottom-0 m-auto w-10 h-10 bg-white rounded-full;
|
83
|
-
}
|
84
|
-
.glorious-radio.orange > input:checked ~ div {
|
85
|
-
@apply bg-orange-500;
|
86
|
-
}
|
87
|
-
.glorious-radio.blue > input:checked ~ div {
|
88
|
-
@apply bg-blue-500;
|
89
|
-
}
|
90
|
-
.glorious-radio.gray > input:checked ~ div {
|
91
|
-
@apply bg-gray-500;
|
92
|
-
}
|
93
|
-
.glorious-radio.red > input:checked ~ div {
|
94
|
-
@apply bg-red-500;
|
95
|
-
}
|
96
|
-
.glorious-radio.green > input:checked ~ div {
|
97
|
-
@apply bg-green-500;
|
98
|
-
}
|
99
|
-
.glorious-radio.size-5xl {
|
100
|
-
@apply w-[46px] h-[46px];
|
101
|
-
}
|
102
|
-
.glorious-radio.size-5xl > div:last-child {
|
103
|
-
@apply w-[46px] h-[46px];
|
104
|
-
}
|
105
|
-
.glorious-radio.size-5xl > input:checked ~ div:after {
|
106
|
-
@apply w-[36px] h-[36px];
|
107
|
-
}
|
108
|
-
.glorious-radio.size-4xl {
|
109
|
-
@apply w-[42px] h-[42px];
|
110
|
-
}
|
111
|
-
.glorious-radio.size-4xl > div:last-child {
|
112
|
-
@apply w-[42px] h-[42px];
|
113
|
-
}
|
114
|
-
.glorious-radio.size-4xl > input:checked ~ div:after {
|
115
|
-
@apply w-[32px] h-[32px];
|
116
|
-
}
|
117
|
-
.glorious-radio.size-3xl {
|
118
|
-
@apply w-[38px] h-[38px];
|
119
|
-
}
|
120
|
-
.glorious-radio.size-3xl > div:last-child {
|
121
|
-
@apply w-[38px] h-[38px];
|
122
|
-
}
|
123
|
-
.glorious-radio.size-3xl > input:checked ~ div:after {
|
124
|
-
@apply w-[28px] h-[28px];
|
125
|
-
}
|
126
|
-
.glorious-radio.size-2xl {
|
127
|
-
@apply w-[34px] h-[34px];
|
128
|
-
}
|
129
|
-
.glorious-radio.size-2xl > div:last-child {
|
130
|
-
@apply w-[34px] h-[34px];
|
131
|
-
}
|
132
|
-
.glorious-radio.size-2xl > input:checked ~ div:after {
|
133
|
-
@apply w-[24px] h-[24px];
|
134
|
-
}
|
135
|
-
.glorious-radio.size-xl {
|
136
|
-
@apply w-[30px] h-[30px];
|
137
|
-
}
|
138
|
-
.glorious-radio.size-xl > div:last-child {
|
139
|
-
@apply w-[30px] h-[30px];
|
140
|
-
}
|
141
|
-
.glorious-radio.size-xl > input:checked ~ div:after {
|
142
|
-
@apply w-[20px] h-[20px];
|
143
|
-
}
|
144
|
-
.glorious-radio.size-lg {
|
145
|
-
@apply w-[26px] h-[26px];
|
146
|
-
}
|
147
|
-
.glorious-radio.size-lg > div:last-child {
|
148
|
-
@apply w-[26px] h-[26px];
|
149
|
-
}
|
150
|
-
.glorious-radio.size-lg > input:checked ~ div:after {
|
151
|
-
@apply w-[16px] h-[16px];
|
152
|
-
}
|
153
|
-
.glorious-radio.size-md {
|
154
|
-
@apply w-[22px] h-[22px];
|
155
|
-
}
|
156
|
-
.glorious-radio.size-md > div:last-child {
|
157
|
-
@apply w-[22px] h-[22px];
|
158
|
-
}
|
159
|
-
.glorious-radio.size-md > input:checked ~ div:after {
|
160
|
-
@apply w-[12px] h-[12px];
|
161
|
-
}
|
162
|
-
.glorious-radio.size-sm {
|
163
|
-
@apply w-[18px] h-[18px];
|
164
|
-
}
|
165
|
-
.glorious-radio.size-sm > div:last-child {
|
166
|
-
@apply w-[18px] h-[18px];
|
167
|
-
}
|
168
|
-
.glorious-radio.size-sm > input:checked ~ div:after {
|
169
|
-
@apply w-[8px] h-[8px];
|
170
|
-
}
|
171
|
-
.glorious-radio.size-xs {
|
172
|
-
@apply w-[14px] h-[14px];
|
173
|
-
}
|
174
|
-
.glorious-radio.size-xs > div:last-child {
|
175
|
-
@apply w-[14px] h-[14px];
|
176
|
-
}
|
177
|
-
.glorious-radio.size-xs > input:checked ~ div:after {
|
178
|
-
@apply w-[4px] h-[4px];
|
179
|
-
}
|
180
|
-
</style>
|
29
|
+
<style lang="scss" src="../../assets/style/components/radio.scss" />
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
|
-
const
|
2
|
+
const modelValue = defineModel()
|
3
3
|
const computeModelValue = (event: Event) => {
|
4
4
|
const target = event.target as HTMLInputElement
|
5
|
-
|
5
|
+
modelValue.value = target.value
|
6
6
|
}
|
7
7
|
|
8
8
|
const id = useId()
|
@@ -27,31 +27,4 @@ const value = [5, 4, 3, 2, 1]
|
|
27
27
|
</div>
|
28
28
|
</template>
|
29
29
|
|
30
|
-
<style scoped
|
31
|
-
@charset "UTF-8";
|
32
|
-
.rating {
|
33
|
-
display: inline-block;
|
34
|
-
}
|
35
|
-
|
36
|
-
.rating input {
|
37
|
-
display: none;
|
38
|
-
}
|
39
|
-
|
40
|
-
.rating label {
|
41
|
-
float: right;
|
42
|
-
cursor: pointer;
|
43
|
-
transition: color 0.3s;
|
44
|
-
}
|
45
|
-
|
46
|
-
.rating label:before {
|
47
|
-
content: "★";
|
48
|
-
font-size: 30px;
|
49
|
-
}
|
50
|
-
|
51
|
-
.rating input:checked ~ label,
|
52
|
-
.rating label:hover,
|
53
|
-
.rating label:hover ~ label {
|
54
|
-
color: #ffd700;
|
55
|
-
transition: color 0.3s;
|
56
|
-
}
|
57
|
-
</style>
|
30
|
+
<style scoped lang="scss" src="../../assets/style/components/rating.scss" />
|
@@ -1,62 +1,14 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
2
|
import { ref, watch } from '#imports'
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
const props: any = defineProps({
|
8
|
-
modelValue: {
|
9
|
-
required: false,
|
10
|
-
default: null,
|
11
|
-
type: [String, Number],
|
12
|
-
},
|
13
|
-
options: {
|
14
|
-
required: true,
|
15
|
-
default: [],
|
16
|
-
type: Array<selectOptionsInterface>,
|
17
|
-
},
|
18
|
-
color: {
|
19
|
-
required: false,
|
20
|
-
default: 'primary',
|
21
|
-
type: String,
|
22
|
-
},
|
23
|
-
size: {
|
24
|
-
required: false,
|
25
|
-
default: 'md',
|
26
|
-
type: String,
|
27
|
-
},
|
28
|
-
title: {
|
29
|
-
required: false,
|
30
|
-
default: '',
|
31
|
-
type: String,
|
32
|
-
},
|
33
|
-
error: {
|
34
|
-
required: false,
|
35
|
-
default: '|',
|
36
|
-
type: String,
|
37
|
-
},
|
38
|
-
disabled: {
|
39
|
-
required: false,
|
40
|
-
default: false,
|
41
|
-
type: Boolean,
|
42
|
-
},
|
43
|
-
placeholder: {
|
44
|
-
required: false,
|
45
|
-
default: '',
|
46
|
-
type: String,
|
47
|
-
},
|
48
|
-
displayTextKey: {
|
49
|
-
required: false,
|
50
|
-
default: 'text',
|
51
|
-
type: String,
|
52
|
-
},
|
53
|
-
})
|
3
|
+
import _props from '../props/Select'
|
4
|
+
|
5
|
+
const props: any = defineProps(_props)
|
6
|
+
const modelValue = defineModel()
|
54
7
|
const selectValue: any = ref(null)
|
55
|
-
const emits = defineEmits(['update:modelValue'])
|
56
8
|
watch(
|
57
9
|
() => selectValue.value,
|
58
10
|
() => {
|
59
|
-
|
11
|
+
modelValue.value = selectValue.value
|
60
12
|
}
|
61
13
|
)
|
62
14
|
|
@@ -69,7 +21,7 @@ watch(
|
|
69
21
|
}
|
70
22
|
)
|
71
23
|
|
72
|
-
|
24
|
+
modelValue.value = null
|
73
25
|
selectValue.value = null
|
74
26
|
</script>
|
75
27
|
|
@@ -103,59 +55,4 @@ selectValue.value = null
|
|
103
55
|
</div>
|
104
56
|
</template>
|
105
57
|
|
106
|
-
<style
|
107
|
-
.xl.glorious-select-orange, .xl.glorious-select-blue, .xl.glorious-select-gray, .xl.glorious-select-red, .xl.glorious-select-primary {
|
108
|
-
@apply py-[0.657rem];
|
109
|
-
}
|
110
|
-
.lg.glorious-select-orange, .lg.glorious-select-blue, .lg.glorious-select-gray, .lg.glorious-select-red, .lg.glorious-select-primary {
|
111
|
-
@apply py-[0.532rem];
|
112
|
-
}
|
113
|
-
.md.glorious-select-orange, .md.glorious-select-blue, .md.glorious-select-gray, .md.glorious-select-red, .md.glorious-select-primary {
|
114
|
-
@apply py-[0.407rem];
|
115
|
-
}
|
116
|
-
.sm.glorious-select-orange, .sm.glorious-select-blue, .sm.glorious-select-gray, .sm.glorious-select-red, .sm.glorious-select-primary {
|
117
|
-
@apply py-[0.282rem];
|
118
|
-
}
|
119
|
-
.xsm.glorious-select-orange, .xsm.glorious-select-blue, .xsm.glorious-select-gray, .xsm.glorious-select-red, .xsm.glorious-select-primary {
|
120
|
-
@apply py-[0.157rem];
|
121
|
-
}
|
122
|
-
|
123
|
-
.glorious-select-orange:focus-visible, .glorious-select-blue:focus-visible, .glorious-select-gray:focus-visible, .glorious-select-red:focus-visible, .glorious-select-primary:focus-visible {
|
124
|
-
@apply outline-none ring-2;
|
125
|
-
}
|
126
|
-
|
127
|
-
.glorious-select-primary {
|
128
|
-
@apply rounded-md ring-1 ring-green-500 px-3 text-gray-500 text-[14px];
|
129
|
-
}
|
130
|
-
.glorious-select-primary:disabled {
|
131
|
-
@apply cursor-not-allowed;
|
132
|
-
}
|
133
|
-
|
134
|
-
.glorious-select-red {
|
135
|
-
@apply rounded-md ring-1 ring-red-500 px-3;
|
136
|
-
}
|
137
|
-
.glorious-select-red:disabled {
|
138
|
-
@apply cursor-not-allowed;
|
139
|
-
}
|
140
|
-
|
141
|
-
.glorious-select-gray {
|
142
|
-
@apply rounded-md ring-1 ring-gray-500 px-3;
|
143
|
-
}
|
144
|
-
.glorious-select-gray:disabled {
|
145
|
-
@apply cursor-not-allowed;
|
146
|
-
}
|
147
|
-
|
148
|
-
.glorious-select-blue {
|
149
|
-
@apply rounded-md ring-1 ring-blue-500 px-3;
|
150
|
-
}
|
151
|
-
.glorious-select-blue:disabled {
|
152
|
-
@apply cursor-not-allowed;
|
153
|
-
}
|
154
|
-
|
155
|
-
.glorious-select-orange {
|
156
|
-
@apply rounded-md ring-1 ring-orange-500 px-3;
|
157
|
-
}
|
158
|
-
.glorious-select-orange:disabled {
|
159
|
-
@apply cursor-not-allowed;
|
160
|
-
}
|
161
|
-
</style>
|
58
|
+
<style lang="scss" src="../../assets/style/components/select.scss" />
|
@@ -1,26 +1,11 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
|
-
|
3
|
-
modelValue: {
|
4
|
-
required: false,
|
5
|
-
default: true,
|
6
|
-
type: Boolean,
|
7
|
-
},
|
8
|
-
checked: {
|
9
|
-
required: false,
|
10
|
-
default: false,
|
11
|
-
type: Boolean,
|
12
|
-
},
|
13
|
-
color: {
|
14
|
-
required: false,
|
15
|
-
default: 'green',
|
16
|
-
type: String as () => 'orange' | 'blue' | 'gray' | 'red' | 'green',
|
17
|
-
},
|
18
|
-
})
|
2
|
+
import _props from '../props/Switch'
|
19
3
|
|
20
|
-
const
|
4
|
+
const props = defineProps(_props)
|
5
|
+
const modelValue = defineModel()
|
21
6
|
const input = (e: Event) => {
|
22
7
|
const target = e.target as HTMLInputElement
|
23
|
-
|
8
|
+
modelValue.value = target.checked
|
24
9
|
}
|
25
10
|
</script>
|
26
11
|
|
@@ -40,66 +25,4 @@ const input = (e: Event) => {
|
|
40
25
|
</div>
|
41
26
|
</template>
|
42
27
|
|
43
|
-
<style
|
44
|
-
.switch {
|
45
|
-
direction: ltr;
|
46
|
-
--button-width: 3em;
|
47
|
-
--button-height: 1.5em;
|
48
|
-
--toggle-diameter: 1em;
|
49
|
-
--button-toggle-offset: calc(
|
50
|
-
(var(--button-height) - var(--toggle-diameter)) / 2
|
51
|
-
);
|
52
|
-
--toggle-shadow-offset: 10px;
|
53
|
-
--toggle-wider: 3em;
|
54
|
-
}
|
55
|
-
.switch-slider {
|
56
|
-
@apply bg-gray-300;
|
57
|
-
display: inline-block;
|
58
|
-
width: var(--button-width);
|
59
|
-
height: var(--button-height);
|
60
|
-
border-radius: calc(var(--button-height) / 2);
|
61
|
-
position: relative;
|
62
|
-
transition: 0.3s all ease-in-out;
|
63
|
-
}
|
64
|
-
.switch-slider::after {
|
65
|
-
content: "";
|
66
|
-
display: inline-block;
|
67
|
-
width: var(--toggle-diameter);
|
68
|
-
height: var(--toggle-diameter);
|
69
|
-
background-color: #fff;
|
70
|
-
border-radius: calc(var(--toggle-diameter) / 2);
|
71
|
-
position: absolute;
|
72
|
-
top: var(--button-toggle-offset);
|
73
|
-
transform: translateX(var(--button-toggle-offset));
|
74
|
-
box-shadow: var(--toggle-shadow-offset) 0 calc(var(--toggle-shadow-offset) * 4) rgba(0, 0, 0, 0.1);
|
75
|
-
transition: 0.3s all ease-in-out;
|
76
|
-
}
|
77
|
-
.switch.color-orange input[type=checkbox]:checked + .switch-slider {
|
78
|
-
background-color: theme("colors.orange.500");
|
79
|
-
}
|
80
|
-
.switch.color-blue input[type=checkbox]:checked + .switch-slider {
|
81
|
-
background-color: theme("colors.blue.500");
|
82
|
-
}
|
83
|
-
.switch.color-gray input[type=checkbox]:checked + .switch-slider {
|
84
|
-
background-color: theme("colors.gray.500");
|
85
|
-
}
|
86
|
-
.switch.color-red input[type=checkbox]:checked + .switch-slider {
|
87
|
-
background-color: theme("colors.red.500");
|
88
|
-
}
|
89
|
-
.switch.color-green input[type=checkbox]:checked + .switch-slider {
|
90
|
-
background-color: theme("colors.green.500");
|
91
|
-
}
|
92
|
-
.switch input[type=checkbox]:checked + .switch-slider::after {
|
93
|
-
transform: translateX(calc(var(--button-width) - var(--toggle-diameter) - var(--button-toggle-offset)));
|
94
|
-
box-shadow: calc(var(--toggle-shadow-offset) * -1) 0 calc(var(--toggle-shadow-offset) * 4) rgba(0, 0, 0, 0.1);
|
95
|
-
}
|
96
|
-
.switch input[type=checkbox] {
|
97
|
-
display: none;
|
98
|
-
}
|
99
|
-
.switch input[type=checkbox]:active + .switch-slider::after {
|
100
|
-
width: var(--toggle-wider);
|
101
|
-
}
|
102
|
-
.switch input[type=checkbox]:checked:active + .switch-slider::after {
|
103
|
-
transform: translateX(calc(var(--button-width) - var(--toggle-wider) - var(--button-toggle-offset)));
|
104
|
-
}
|
105
|
-
</style>
|
28
|
+
<style lang="scss" src="../../assets/style/components/switch.scss" />
|
@@ -1,23 +1,9 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
key: string
|
6
|
-
}
|
7
|
-
const props = defineProps({
|
8
|
-
items: {
|
9
|
-
required: true,
|
10
|
-
default: [],
|
11
|
-
type: Array<itemsType>,
|
12
|
-
},
|
13
|
-
modelValue: {
|
14
|
-
required: true,
|
15
|
-
type: String,
|
16
|
-
},
|
17
|
-
})
|
18
|
-
const emits = defineEmits(['update:modelValue'])
|
2
|
+
import _props from '../props/Tab'
|
3
|
+
const props: any = defineProps(_props)
|
4
|
+
const modelValue = defineModel()
|
19
5
|
const tabClicked: any = (key: string, event: any) => {
|
20
|
-
|
6
|
+
modelValue.value = key
|
21
7
|
Array.from(event.currentTarget.parentElement.parentElement.children).map(
|
22
8
|
(item: any) => item.children[0].classList.remove('active')
|
23
9
|
)
|
@@ -65,7 +51,7 @@ const scrollPrevious = (event: Event) => {
|
|
65
51
|
<div class="glorious-tab relative">
|
66
52
|
<div
|
67
53
|
@click="scrollNext($event)"
|
68
|
-
class="bg-green-700 absolute right-0 h-full top-0 w-8 justify-center items-center rounded-r-lg hidden cursor-
|
54
|
+
class="bg-green-700 absolute right-0 h-full top-0 w-8 justify-center items-center rounded-r-lg hidden cursor-pointer"
|
69
55
|
>
|
70
56
|
<GIcon
|
71
57
|
name="glorious-arrow"
|
@@ -104,14 +90,4 @@ const scrollPrevious = (event: Event) => {
|
|
104
90
|
</div>
|
105
91
|
</template>
|
106
92
|
|
107
|
-
<style
|
108
|
-
.glorious-tab {
|
109
|
-
@apply flex justify-between bg-green-100 rounded-lg gap-3 w-max max-w-full shadow-md;
|
110
|
-
}
|
111
|
-
.glorious-tab div > div > button {
|
112
|
-
@apply text-gray-700 text-[14px] hover:bg-green-200 hover:text-gray-800 cursor-pointer px-2 py-1 rounded-lg;
|
113
|
-
}
|
114
|
-
.glorious-tab div > div > button.active {
|
115
|
-
@apply font-bold text-white bg-green-700;
|
116
|
-
}
|
117
|
-
</style>
|
93
|
+
<style lang="scss" src="../../assets/style/components/tab.scss" />
|
@@ -1,34 +1,6 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
|
-
|
3
|
-
|
4
|
-
required: false,
|
5
|
-
default: 'blue',
|
6
|
-
type: String as () => 'orange' | 'blue' | 'gray' | 'red' | 'green',
|
7
|
-
},
|
8
|
-
header: {
|
9
|
-
required: true,
|
10
|
-
type: Object,
|
11
|
-
},
|
12
|
-
body: {
|
13
|
-
required: true,
|
14
|
-
type: Array<Object>,
|
15
|
-
default: [],
|
16
|
-
},
|
17
|
-
loading: {
|
18
|
-
required: false,
|
19
|
-
default: false,
|
20
|
-
type: Boolean,
|
21
|
-
},
|
22
|
-
loadingOption: {
|
23
|
-
required: false,
|
24
|
-
default: {
|
25
|
-
color: 'green',
|
26
|
-
},
|
27
|
-
type: {
|
28
|
-
color: String,
|
29
|
-
},
|
30
|
-
},
|
31
|
-
})
|
2
|
+
import _props from '../props/Table'
|
3
|
+
const props = defineProps(_props)
|
32
4
|
</script>
|
33
5
|
|
34
6
|
<template>
|
@@ -76,107 +48,15 @@ const props = defineProps({
|
|
76
48
|
>
|
77
49
|
<GLoading :color="props.loadingOption.color" />
|
78
50
|
</div>
|
51
|
+
<div
|
52
|
+
class="flex justify-center mt-3"
|
53
|
+
v-if="!props.loading && props.body.length === 0"
|
54
|
+
>
|
55
|
+
<div class="bg-white shadow p-2 rounded w-max">
|
56
|
+
<span> {{ props.emptyText }} </span>
|
57
|
+
</div>
|
58
|
+
</div>
|
79
59
|
</div>
|
80
60
|
</template>
|
81
61
|
|
82
|
-
<style
|
83
|
-
.glorious-table {
|
84
|
-
@apply overflow-x-auto;
|
85
|
-
}
|
86
|
-
.glorious-table.color-orange > table > thead {
|
87
|
-
@apply rounded-t-md overflow-hidden;
|
88
|
-
}
|
89
|
-
.glorious-table.color-orange > table > thead > tr > th:first-child {
|
90
|
-
@apply rounded-r-lg bg-orange-400;
|
91
|
-
}
|
92
|
-
.glorious-table.color-orange > table > thead > tr > th {
|
93
|
-
@apply bg-orange-400;
|
94
|
-
}
|
95
|
-
.glorious-table.color-orange > table > thead > tr > th:last-child {
|
96
|
-
@apply rounded-l-lg bg-orange-400;
|
97
|
-
}
|
98
|
-
.glorious-table.color-orange > table > tbody > tr:nth-child(even) {
|
99
|
-
@apply bg-orange-50;
|
100
|
-
}
|
101
|
-
.glorious-table.color-orange > table > tbody > tr > td {
|
102
|
-
@apply px-4 py-2 text-center;
|
103
|
-
}
|
104
|
-
.glorious-table.color-blue > table > thead {
|
105
|
-
@apply rounded-t-md overflow-hidden;
|
106
|
-
}
|
107
|
-
.glorious-table.color-blue > table > thead > tr > th:first-child {
|
108
|
-
@apply rounded-r-lg bg-blue-400;
|
109
|
-
}
|
110
|
-
.glorious-table.color-blue > table > thead > tr > th {
|
111
|
-
@apply bg-blue-400;
|
112
|
-
}
|
113
|
-
.glorious-table.color-blue > table > thead > tr > th:last-child {
|
114
|
-
@apply rounded-l-lg bg-blue-400;
|
115
|
-
}
|
116
|
-
.glorious-table.color-blue > table > tbody > tr:nth-child(even) {
|
117
|
-
@apply bg-blue-50;
|
118
|
-
}
|
119
|
-
.glorious-table.color-blue > table > tbody > tr > td {
|
120
|
-
@apply px-4 py-2 text-center;
|
121
|
-
}
|
122
|
-
.glorious-table.color-gray > table > thead {
|
123
|
-
@apply rounded-t-md overflow-hidden;
|
124
|
-
}
|
125
|
-
.glorious-table.color-gray > table > thead > tr > th:first-child {
|
126
|
-
@apply rounded-r-lg bg-gray-400;
|
127
|
-
}
|
128
|
-
.glorious-table.color-gray > table > thead > tr > th {
|
129
|
-
@apply bg-gray-400;
|
130
|
-
}
|
131
|
-
.glorious-table.color-gray > table > thead > tr > th:last-child {
|
132
|
-
@apply rounded-l-lg bg-gray-400;
|
133
|
-
}
|
134
|
-
.glorious-table.color-gray > table > tbody > tr:nth-child(even) {
|
135
|
-
@apply bg-gray-50;
|
136
|
-
}
|
137
|
-
.glorious-table.color-gray > table > tbody > tr > td {
|
138
|
-
@apply px-4 py-2 text-center;
|
139
|
-
}
|
140
|
-
.glorious-table.color-red > table > thead {
|
141
|
-
@apply rounded-t-md overflow-hidden;
|
142
|
-
}
|
143
|
-
.glorious-table.color-red > table > thead > tr > th:first-child {
|
144
|
-
@apply rounded-r-lg bg-red-400;
|
145
|
-
}
|
146
|
-
.glorious-table.color-red > table > thead > tr > th {
|
147
|
-
@apply bg-red-400;
|
148
|
-
}
|
149
|
-
.glorious-table.color-red > table > thead > tr > th:last-child {
|
150
|
-
@apply rounded-l-lg bg-red-400;
|
151
|
-
}
|
152
|
-
.glorious-table.color-red > table > tbody > tr:nth-child(even) {
|
153
|
-
@apply bg-red-50;
|
154
|
-
}
|
155
|
-
.glorious-table.color-red > table > tbody > tr > td {
|
156
|
-
@apply px-4 py-2 text-center;
|
157
|
-
}
|
158
|
-
.glorious-table.color-green > table > thead {
|
159
|
-
@apply rounded-t-md overflow-hidden;
|
160
|
-
}
|
161
|
-
.glorious-table.color-green > table > thead > tr > th:first-child {
|
162
|
-
@apply rounded-r-lg bg-green-400;
|
163
|
-
}
|
164
|
-
.glorious-table.color-green > table > thead > tr > th {
|
165
|
-
@apply bg-green-400;
|
166
|
-
}
|
167
|
-
.glorious-table.color-green > table > thead > tr > th:last-child {
|
168
|
-
@apply rounded-l-lg bg-green-400;
|
169
|
-
}
|
170
|
-
.glorious-table.color-green > table > tbody > tr:nth-child(even) {
|
171
|
-
@apply bg-green-50;
|
172
|
-
}
|
173
|
-
.glorious-table.color-green > table > tbody > tr > td {
|
174
|
-
@apply px-4 py-2 text-center;
|
175
|
-
}
|
176
|
-
.glorious-table > table {
|
177
|
-
@apply w-full;
|
178
|
-
}
|
179
|
-
.glorious-table > table > thead > tr > th {
|
180
|
-
@apply px-4 py-2 text-center;
|
181
|
-
}
|
182
|
-
</style>
|
62
|
+
<style lang="scss" src="../../assets/style/components/table.scss" />
|