renusify 2.5.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/app/index.vue +74 -22
- package/components/app/toast/index.vue +76 -71
- package/components/app/toast/toast.vue +62 -44
- package/components/avatar/index.vue +208 -84
- package/components/button/buttonConfirm.vue +53 -26
- package/components/button/buttonGroup.js +0 -2
- package/components/button/buttonGroup.vue +310 -62
- package/components/button/index.vue +584 -100
- package/components/calendar/index.js +0 -2
- package/components/calendar/index.vue +326 -262
- package/components/calendar/month.vue +64 -55
- package/components/calendar/year.vue +30 -25
- package/components/card/index.vue +139 -59
- package/components/codeEditor/highlightCss.vue +38 -39
- package/components/codeEditor/highlightHtml.vue +64 -64
- package/components/codeEditor/highlightJs.vue +37 -38
- package/components/codeEditor/index.vue +129 -79
- package/components/codeEditor/run.vue +225 -39
- package/components/codeEditor/useCodeFormatter.js +150 -0
- package/components/confirm/index.vue +140 -81
- package/components/container/col.vue +5 -4
- package/components/container/divider.vue +28 -19
- package/components/container/index.vue +34 -15
- package/components/container/row.vue +26 -9
- package/components/container/spacer.vue +2 -4
- package/components/container/style.scss +3 -0
- package/components/content/index.vue +49 -32
- package/components/cropper/index.vue +401 -244
- package/components/float/index.vue +542 -415
- package/components/form/addressInput/index.vue +184 -109
- package/components/form/camInput/index.vue +370 -244
- package/components/form/checkInput/index.vue +138 -71
- package/components/form/checkboxInput/index.vue +87 -47
- package/components/form/colorInput/Alpha.vue +81 -83
- package/components/form/colorInput/Hue.vue +91 -68
- package/components/form/colorInput/Preview.vue +43 -47
- package/components/form/colorInput/Saturation.vue +101 -86
- package/components/form/colorInput/index.vue +72 -40
- package/components/form/colorInput/picker.vue +111 -106
- package/components/form/colorInput/useColor.js +153 -0
- package/components/form/dateInput/index.vue +691 -356
- package/components/form/dateInput/month.vue +63 -54
- package/components/form/dateInput/year.vue +35 -25
- package/components/form/fileInput/index.js +0 -1
- package/components/form/fileInput/index.vue +263 -106
- package/components/form/fileInput/single.vue +323 -164
- package/components/form/groupInput/index.vue +199 -101
- package/components/form/index.vue +189 -83
- package/components/form/input/index.vue +416 -377
- package/components/form/jsonInput/JsonView.vue +54 -56
- package/components/form/jsonInput/index.vue +247 -165
- package/components/form/maskInput/index.vue +252 -132
- package/components/form/numberInput/index.js +0 -1
- package/components/form/numberInput/index.vue +226 -117
- package/components/form/passwordInput/index.js +2 -1
- package/components/form/passwordInput/index.vue +269 -102
- package/components/form/radioInput/index.vue +143 -72
- package/components/form/rangeInput/index.vue +280 -167
- package/components/form/ratingInput/index.vue +57 -57
- package/components/form/selectInput/index.js +1 -3
- package/components/form/selectInput/index.vue +584 -296
- package/components/form/switchInput/index.vue +73 -59
- package/components/form/telInput/index.js +0 -1
- package/components/form/telInput/index.vue +238 -135
- package/components/form/textArea/index.vue +72 -35
- package/components/form/textEditor/index.vue +739 -0
- package/components/form/{text-editor → textEditor}/style.scss +8 -16
- package/components/form/textInput/index.vue +54 -32
- package/components/form/timeInput/index.vue +83 -56
- package/components/form/timeInput/range.vue +116 -95
- package/components/form/timeInput/timepicker.vue +382 -449
- package/components/form/uniqueInput/index.vue +105 -48
- package/components/form/unitInput/index.vue +139 -84
- package/components/formCreator/index.js +0 -1
- package/components/formCreator/index.vue +314 -148
- package/components/highlight/index.vue +41 -25
- package/components/highlight/style.scss +2 -2
- package/components/highlight/{mixin.js → useHighlight.js} +181 -160
- package/components/icon/index.vue +79 -33
- package/components/img/index.vue +249 -147
- package/components/img/preview.vue +180 -198
- package/components/img/svgImg.vue +42 -39
- package/components/index.js +5 -20
- package/components/infinite/index.js +1 -2
- package/components/infinite/index.vue +248 -66
- package/components/map/index.vue +428 -261
- package/components/map/route.vue +794 -487
- package/components/map/select.vue +118 -58
- package/components/menu/index.vue +201 -91
- package/components/meta/meta.js +26 -3
- package/components/modal/index.vue +383 -158
- package/components/notify/index.vue +204 -86
- package/components/notify/notification.vue +38 -55
- package/components/progress/circle.vue +189 -70
- package/components/progress/line.vue +266 -46
- package/components/searchBox/index.js +1 -3
- package/components/searchBox/index.vue +194 -101
- package/components/skeleton/index.vue +45 -20
- package/components/slider/index.vue +318 -156
- package/components/swiper/index.vue +254 -106
- package/components/table/crud/footer.vue +77 -53
- package/components/table/crud/header.vue +71 -72
- package/components/table/crud/index.vue +631 -401
- package/components/table/index.vue +721 -278
- package/components/timeAgo/index.vue +145 -96
- package/components/tour/index.vue +338 -235
- package/components/tree/index.vue +235 -89
- package/components/tree/tree-element.vue +107 -106
- package/directive/animate/index.js +77 -0
- package/directive/clickOutSide/index.js +98 -0
- package/directive/drag/index.js +153 -0
- package/directive/index.js +11 -13
- package/directive/intersect/index.js +263 -0
- package/directive/mask/index.js +67 -0
- package/directive/parallax/index.js +78 -0
- package/directive/ripple/index.js +14 -0
- package/directive/scroll/index.js +244 -0
- package/directive/sortable/index.js +274 -0
- package/directive/title/index.js +75 -0
- package/directive/touch/index.js +268 -0
- package/index.js +10 -8
- package/package.json +5 -2
- package/plugins/validation/Validate.js +88 -79
- package/scripts/generate-docs.mjs +226 -0
- package/scripts/menu.mjs +240 -0
- package/scripts/parser.mjs +1086 -0
- package/style/_index.scss +7 -0
- package/style/app.scss +13 -65
- package/style/colors.scss +5 -22
- package/style/functions/index.scss +8 -0
- package/style/mixins/index.scss +17 -5
- package/style/variables/base.scss +154 -175
- package/style/variables/color.scss +0 -12
- package/style/variables/utilities.scss +0 -180
- package/tools/helper.js +0 -8
- package/tools/icons.js +6 -1
- package/tools/root.js +71 -0
- package/components/app/style.scss +0 -41
- package/components/app/toast/style.scss +0 -20
- package/components/avatar/style.scss +0 -32
- package/components/bar/bottomNav.js +0 -1
- package/components/bar/bottomNav.vue +0 -28
- package/components/bar/bottomNavigationCircle.js +0 -2
- package/components/bar/bottomNavigationCircle.vue +0 -99
- package/components/bar/scss/bottomNav.scss +0 -67
- package/components/bar/scss/toolbar.scss +0 -174
- package/components/bar/toolbar/index.js +0 -8
- package/components/bar/toolbar/index.vue +0 -35
- package/components/bar/toolbar/laptop.vue +0 -33
- package/components/bar/toolbar/menuChilds.vue +0 -41
- package/components/bar/toolbar/menuLaptop.vue +0 -41
- package/components/bar/toolbar/menuMob.vue +0 -39
- package/components/bar/toolbar/mixin.js +0 -43
- package/components/bar/toolbar/mobile.vue +0 -34
- package/components/breadcrumb/bredcrumbItem.vue +0 -39
- package/components/breadcrumb/index.js +0 -3
- package/components/breadcrumb/index.vue +0 -71
- package/components/breadcrumb/style.scss +0 -51
- package/components/button/style.scss +0 -411
- package/components/card/style.scss +0 -86
- package/components/chart/chart.js +0 -1
- package/components/chart/chart.vue +0 -69
- package/components/chart/worldMap.js +0 -2
- package/components/chart/worldMap.vue +0 -1112
- package/components/chat/MessageList.vue +0 -163
- package/components/chat/chatInput.vue +0 -150
- package/components/chat/chatMsg.vue +0 -276
- package/components/chat/index.js +0 -11
- package/components/chat/index.vue +0 -113
- package/components/chip/index.js +0 -3
- package/components/chip/index.vue +0 -77
- package/components/chip/style.scss +0 -199
- package/components/codeEditor/mixin.js +0 -145
- package/components/countdown/index.js +0 -1
- package/components/countdown/index.vue +0 -105
- package/components/form/colorInput/mixin.js +0 -132
- package/components/form/fileInput/file.js +0 -148
- package/components/form/telInput/assets/flags.png +0 -0
- package/components/form/telInput/assets/flags@2x.png +0 -0
- package/components/form/text-editor/index.vue +0 -710
- package/components/icon/style.scss +0 -17
- package/components/infinite/div.js +0 -6
- package/components/infinite/div.vue +0 -193
- package/components/infinite/page.js +0 -3
- package/components/infinite/page.vue +0 -105
- package/components/list/index.js +0 -3
- package/components/list/index.vue +0 -122
- package/components/list/style.scss +0 -66
- package/components/message/index.js +0 -4
- package/components/message/index.vue +0 -40
- package/components/modal/style.scss +0 -146
- package/components/nestable/NestableItem.vue +0 -307
- package/components/nestable/editable.js +0 -44
- package/components/nestable/index.js +0 -1
- package/components/nestable/index.vue +0 -226
- package/components/nestable/methods.js +0 -416
- package/components/progress/style.scss +0 -229
- package/components/table/style.scss +0 -338
- package/components/tabs/index.js +0 -3
- package/components/tabs/index.vue +0 -151
- package/components/timeline/index.js +0 -6
- package/components/timeline/index.vue +0 -76
- package/directive/resize/index.js +0 -30
- package/directive/skeleton/index.js +0 -27
- package/directive/skeleton/style.scss +0 -37
- package/plugins/request/Request.js +0 -68
- package/style/animation.scss +0 -94
- package/style/style.scss +0 -8
- package/tools/rootable.js +0 -75
- /package/components/form/{text-editor → textEditor}/index.js +0 -0
- /package/components/form/{text-editor → textEditor}/preview.js +0 -0
- /package/components/form/{text-editor → textEditor}/preview.vue +0 -0
|
@@ -1,119 +1,603 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<component
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
<component
|
|
3
|
+
:is="route.tag"
|
|
4
|
+
v-ripple="!disabled && !loading"
|
|
5
|
+
:aria-busy="loading"
|
|
6
|
+
:aria-disabled="disabled || loading"
|
|
7
|
+
:aria-label="ariaLabel"
|
|
8
|
+
:class="buttonClasses"
|
|
9
|
+
:disabled="disabled || loading"
|
|
10
|
+
:type="type"
|
|
11
|
+
v-bind="computedAttributes"
|
|
12
|
+
@click="handleClick"
|
|
13
|
+
>
|
|
14
|
+
<span class="btn-content">
|
|
15
|
+
<!-- Default slot for button content
|
|
16
|
+
@example Click Me-->
|
|
17
|
+
<slot/>
|
|
18
18
|
|
|
19
|
+
<span
|
|
20
|
+
v-if="label"
|
|
21
|
+
:class="labelClass"
|
|
22
|
+
class="label d-flex v-center h-center px-1 overflow-hidden"
|
|
23
|
+
>
|
|
24
|
+
<transition mode="out-in" name="counter-up">
|
|
25
|
+
<span :key="label">{{ label }}</span>
|
|
26
|
+
</transition>
|
|
19
27
|
</span>
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
</span>
|
|
29
|
+
|
|
30
|
+
<span v-if="loading" class="btn-loader">
|
|
31
|
+
<r-progress-circle
|
|
32
|
+
:size="loaderSize"
|
|
33
|
+
indeterminate
|
|
34
|
+
width="2"
|
|
35
|
+
/>
|
|
36
|
+
</span>
|
|
22
37
|
</component>
|
|
23
38
|
</template>
|
|
24
39
|
|
|
25
|
-
<script>
|
|
26
|
-
import '
|
|
27
|
-
import {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
type: String,
|
|
39
|
-
default: 'button'
|
|
40
|
-
},
|
|
41
|
-
size: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: 'default',
|
|
44
|
-
validator: function (value) {
|
|
45
|
-
return ['x-small', 'small', 'default', 'large', 'x-large'].indexOf(value) !== -1
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
label: [String, Number],
|
|
49
|
-
labelClass: [String, Array, Object],
|
|
50
|
-
block: Boolean,
|
|
51
|
-
depressed: Boolean,
|
|
52
|
-
outlined: Boolean,
|
|
53
|
-
rounded: Boolean,
|
|
54
|
-
icon: Boolean,
|
|
55
|
-
fab: Boolean,
|
|
56
|
-
text: Boolean,
|
|
57
|
-
tile: Boolean,
|
|
58
|
-
disabled: Boolean,
|
|
59
|
-
readonly: Boolean,
|
|
60
|
-
loading: Boolean
|
|
40
|
+
<script setup>
|
|
41
|
+
import {computed, useAttrs, inject} from 'vue'
|
|
42
|
+
import {useRootable} from '../../tools/root.js'
|
|
43
|
+
|
|
44
|
+
// Props
|
|
45
|
+
const props = defineProps({
|
|
46
|
+
/**
|
|
47
|
+
* The HTML tag to use for the button
|
|
48
|
+
* @values button, a, router-link, etc.
|
|
49
|
+
*/
|
|
50
|
+
tag: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: 'button'
|
|
61
53
|
},
|
|
62
|
-
computed: {
|
|
63
|
-
att() {
|
|
64
|
-
let res = {}
|
|
65
|
-
if (this.href) {
|
|
66
|
-
res['href'] = this.route.data.attrs.href
|
|
67
|
-
}
|
|
68
54
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
55
|
+
/**
|
|
56
|
+
* The type attribute for the button element
|
|
57
|
+
* @values button, submit, reset
|
|
58
|
+
*/
|
|
59
|
+
type: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: 'button',
|
|
62
|
+
validator: value => ['button', 'submit', 'reset'].includes(value)
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The size of the button
|
|
67
|
+
* @values xs, sm, md, lg, xl,xxl
|
|
68
|
+
*/
|
|
69
|
+
size: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: 'md',
|
|
72
|
+
validator: value => ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].includes(value)
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Text or number to display as a label on the button
|
|
77
|
+
*/
|
|
78
|
+
label: [String, Number],
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Additional CSS classes for the label
|
|
82
|
+
*/
|
|
83
|
+
labelClass: [String, Array, Object],
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Makes the button expand to full width
|
|
87
|
+
*/
|
|
88
|
+
block: Boolean,
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Removes the button's elevation
|
|
92
|
+
*/
|
|
93
|
+
depressed: Boolean,
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Outlined button style
|
|
97
|
+
*/
|
|
98
|
+
outlined: Boolean,
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Rounded button style
|
|
102
|
+
*/
|
|
103
|
+
rounded: Boolean,
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Icon button style
|
|
107
|
+
*/
|
|
108
|
+
icon: Boolean,
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* FAB (Floating Action Button) style
|
|
112
|
+
*/
|
|
113
|
+
fab: Boolean,
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Text button style
|
|
117
|
+
*/
|
|
118
|
+
text: Boolean,
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Removes border-radius
|
|
122
|
+
*/
|
|
123
|
+
tile: Boolean,
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Disables the button
|
|
127
|
+
*/
|
|
128
|
+
disabled: Boolean,
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Makes the button read-only
|
|
132
|
+
*/
|
|
133
|
+
readonly: Boolean,
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Shows loading state
|
|
137
|
+
*/
|
|
138
|
+
loading: Boolean,
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Custom aria-label for accessibility
|
|
142
|
+
*/
|
|
143
|
+
ariaLabel: {type: String, default: 'btn'},
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Active class for router-link
|
|
147
|
+
*/
|
|
148
|
+
activeClass: String,
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Exact active class for router-link
|
|
152
|
+
*/
|
|
153
|
+
exactActiveClass: String,
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Enables link styling
|
|
157
|
+
*/
|
|
158
|
+
link: Boolean,
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* URL for link button
|
|
162
|
+
*/
|
|
163
|
+
href: [String, Object],
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Route location for vue-router
|
|
167
|
+
*/
|
|
168
|
+
to: [String, Object],
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Target attribute for links
|
|
172
|
+
*/
|
|
173
|
+
target: String,
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
// Emits
|
|
177
|
+
const emit = defineEmits([
|
|
178
|
+
/**
|
|
179
|
+
* Emitted when button is clicked
|
|
180
|
+
* @param {Event} event - Click event
|
|
181
|
+
*/
|
|
182
|
+
'click'
|
|
183
|
+
])
|
|
184
|
+
|
|
185
|
+
// Inject and composables
|
|
186
|
+
const $r = inject('renusify').$r
|
|
187
|
+
const attrs = useAttrs()
|
|
188
|
+
const {route} = useRootable(props, attrs)
|
|
189
|
+
|
|
190
|
+
// Your existing computed properties and methods...
|
|
191
|
+
const computedAttributes = computed(() => {
|
|
192
|
+
const computedAttrs = {...attrs}
|
|
193
|
+
|
|
194
|
+
if (route.value.data.attrs.href) {
|
|
195
|
+
computedAttrs.href = route.value.data.attrs.href
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if (props.target) {
|
|
199
|
+
computedAttrs.target = props.target
|
|
200
|
+
computedAttrs.rel = 'noreferrer'
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
if (props.to) {
|
|
204
|
+
computedAttrs.to = props.to
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
return computedAttrs
|
|
208
|
+
})
|
|
209
|
+
|
|
210
|
+
const buttonClasses = computed(() => {
|
|
211
|
+
const prefix = $r.prefix
|
|
212
|
+
const classes = [
|
|
213
|
+
`${prefix}btn`,
|
|
214
|
+
`size-${props.size}`
|
|
215
|
+
]
|
|
216
|
+
|
|
217
|
+
// Style classes
|
|
218
|
+
if (!props.depressed && !props.text && !props.outlined && !props.disabled) {
|
|
219
|
+
classes.push('btn-contained')
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
if (props.depressed) classes.push('btn-depressed')
|
|
223
|
+
if (props.outlined) classes.push('btn-outlined')
|
|
224
|
+
if (props.text) classes.push('btn-text')
|
|
225
|
+
if (props.tile) classes.push('btn-tile')
|
|
226
|
+
if (props.rounded) classes.push('btn-rounded')
|
|
227
|
+
|
|
228
|
+
// Shape classes
|
|
229
|
+
if (props.icon) {
|
|
230
|
+
classes.push('btn-round', 'btn-icon')
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (props.fab) {
|
|
234
|
+
classes.push('btn-round', 'btn-fab')
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// State classes
|
|
238
|
+
if (props.loading) classes.push('btn-loading')
|
|
239
|
+
if (props.block) classes.push('btn-block')
|
|
240
|
+
if (props.disabled) classes.push('btn-disabled')
|
|
241
|
+
if (props.readonly) classes.push('btn-readonly')
|
|
242
|
+
|
|
243
|
+
return classes
|
|
244
|
+
})
|
|
245
|
+
|
|
246
|
+
const loaderSize = computed(() => {
|
|
247
|
+
return props.size === 'x-small' ? '15' : '23'
|
|
248
|
+
})
|
|
249
|
+
|
|
250
|
+
// Methods
|
|
251
|
+
/**
|
|
252
|
+
* Handles button click event
|
|
253
|
+
* @param {Event} event - Click event
|
|
254
|
+
*/
|
|
255
|
+
const handleClick = (event) => {
|
|
256
|
+
if (props.disabled || props.loading) {
|
|
257
|
+
event.preventDefault()
|
|
258
|
+
return
|
|
259
|
+
}
|
|
260
|
+
emit('click', event)
|
|
261
|
+
}
|
|
262
|
+
</script>
|
|
263
|
+
|
|
264
|
+
<style lang="scss">
|
|
265
|
+
@use "sass:map";
|
|
266
|
+
@use "sass:math";
|
|
267
|
+
@use "../../style" as *;
|
|
268
|
+
|
|
269
|
+
$btn-sizes: (
|
|
270
|
+
'xs': 1.5rem, // 24px - 6 units
|
|
271
|
+
'sm': 2rem, // 32px - 8 units
|
|
272
|
+
'md': 2.5rem, // 40px - 10 units
|
|
273
|
+
'lg': 2.75rem, // 44px - 11 units
|
|
274
|
+
'xl': 3.25rem, // 52px - 13 units
|
|
275
|
+
'xxl': 3.75rem, // 60px - 15 units
|
|
276
|
+
) !default;
|
|
277
|
+
|
|
278
|
+
$btn-font-sizes: (
|
|
279
|
+
'xs': 0.625rem, // 10px
|
|
280
|
+
'sm': 0.75rem, // 12px
|
|
281
|
+
'md': 0.875rem, // 14px
|
|
282
|
+
'lg': 1rem, // 16px
|
|
283
|
+
'xl': 1.125rem, // 18px
|
|
284
|
+
'xxl': 1.25rem, // 20px
|
|
285
|
+
) !default;
|
|
286
|
+
|
|
287
|
+
$fab-sizes: (
|
|
288
|
+
'xs': 2rem, // 32px
|
|
289
|
+
'sm': 2.5rem, // 40px
|
|
290
|
+
'md': 3rem, // 48px
|
|
291
|
+
'lg': 3.5rem, // 56px
|
|
292
|
+
'xl': 4rem, // 64px
|
|
293
|
+
'xxl': 4.5rem, // 72px
|
|
294
|
+
) !default;
|
|
295
|
+
|
|
296
|
+
$fab-icon-sizes: (
|
|
297
|
+
'xs': 1rem, // 16px
|
|
298
|
+
'sm': 1.25rem, // 20px
|
|
299
|
+
'md': 1.5rem, // 24px
|
|
300
|
+
'lg': 1.75rem, // 28px
|
|
301
|
+
'xl': 2rem, // 32px
|
|
302
|
+
'xxl': 2.25rem, // 36px
|
|
303
|
+
) !default;
|
|
304
|
+
|
|
305
|
+
@mixin button-size($size) {
|
|
306
|
+
$height: map.get($btn-sizes, $size);
|
|
307
|
+
$font-size: map.get($btn-font-sizes, $size);
|
|
308
|
+
@if not $height {
|
|
309
|
+
$height: map.get($btn-sizes, 'default');
|
|
310
|
+
}
|
|
311
|
+
@if not $font-size {
|
|
312
|
+
$font-size: map.get($btn-font-sizes, 'default');
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
height: $height;
|
|
316
|
+
padding: 0 math.div($height, 2);
|
|
317
|
+
font-size: $font-size;
|
|
318
|
+
border-radius: math.div($height, 10);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.#{$prefix}btn {
|
|
322
|
+
align-items: center;
|
|
323
|
+
cursor: pointer;
|
|
324
|
+
display: inline-flex;
|
|
325
|
+
flex: 0 0 auto;
|
|
326
|
+
justify-content: center;
|
|
327
|
+
max-width: 100%;
|
|
328
|
+
outline: 0;
|
|
329
|
+
position: relative;
|
|
330
|
+
text-decoration: none;
|
|
331
|
+
text-transform: uppercase;
|
|
332
|
+
transition-duration: 0.28s;
|
|
333
|
+
transition-property: box-shadow, transform, opacity;
|
|
334
|
+
transition-timing-function: map.get($transition, 'fast-out-slow-in');
|
|
335
|
+
user-select: none;
|
|
336
|
+
vertical-align: middle;
|
|
337
|
+
white-space: nowrap;
|
|
338
|
+
color: inherit;
|
|
339
|
+
|
|
340
|
+
// Default background and text color
|
|
341
|
+
&:not(.btn-text):not(.btn-outlined) {
|
|
342
|
+
background-color: var(--color-sheet-container-low);
|
|
343
|
+
color: var(--color-on-sheet);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// States
|
|
347
|
+
@include states();
|
|
348
|
+
|
|
349
|
+
// Disabled state
|
|
350
|
+
&.btn-disabled {
|
|
351
|
+
@include disable-states();
|
|
352
|
+
|
|
353
|
+
&:not(.btn-text):not(.btn-outlined) {
|
|
354
|
+
background-color: var(--color-#{map-metro-get($states, 'disabled','state','color')}) !important;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
&.btn-text, &.btn-outlined {
|
|
358
|
+
&::before {
|
|
359
|
+
opacity: 0 !important;
|
|
91
360
|
}
|
|
92
|
-
|
|
93
|
-
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// Readonly state
|
|
365
|
+
&.btn-readonly {
|
|
366
|
+
pointer-events: none;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
// Loading state
|
|
370
|
+
&.btn-loading {
|
|
371
|
+
pointer-events: none;
|
|
372
|
+
transition: none;
|
|
373
|
+
cursor: none;
|
|
374
|
+
|
|
375
|
+
.btn-content {
|
|
376
|
+
opacity: 0;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// Ripple effect overlay
|
|
381
|
+
&:before {
|
|
382
|
+
border-radius: inherit;
|
|
383
|
+
bottom: 0;
|
|
384
|
+
color: inherit;
|
|
385
|
+
content: '';
|
|
386
|
+
left: 0;
|
|
387
|
+
opacity: 0;
|
|
388
|
+
pointer-events: none;
|
|
389
|
+
position: absolute;
|
|
390
|
+
right: 0;
|
|
391
|
+
top: 0;
|
|
392
|
+
transition: opacity 0.2s map.get($transition, 'ease-in-out');
|
|
393
|
+
background-color: currentColor;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
// Size variations for regular buttons
|
|
397
|
+
&:not(.btn-round) {
|
|
398
|
+
@each $name, $size in $btn-sizes {
|
|
399
|
+
&.size-#{$name} {
|
|
400
|
+
@include button-size($name);
|
|
94
401
|
}
|
|
95
|
-
|
|
96
|
-
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// Icon color inheritance
|
|
406
|
+
> .btn-content .#{$prefix}icon {
|
|
407
|
+
color: inherit;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
// Vertical orientation
|
|
411
|
+
&.vertical {
|
|
412
|
+
.btn-content {
|
|
413
|
+
writing-mode: tb-rl;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
// Button content container
|
|
419
|
+
.btn-content {
|
|
420
|
+
align-items: center;
|
|
421
|
+
color: inherit;
|
|
422
|
+
display: flex;
|
|
423
|
+
flex: 1 0 auto;
|
|
424
|
+
justify-content: inherit;
|
|
425
|
+
line-height: normal;
|
|
426
|
+
|
|
427
|
+
.label {
|
|
428
|
+
position: absolute;
|
|
429
|
+
flex-wrap: nowrap;
|
|
430
|
+
top: -10px;
|
|
431
|
+
right: 0;
|
|
432
|
+
border-radius: 10px 10px 10px 0;
|
|
433
|
+
height: 21px;
|
|
434
|
+
min-width: 20px;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
// Loader overlay
|
|
439
|
+
.btn-loader {
|
|
440
|
+
align-items: center;
|
|
441
|
+
display: flex;
|
|
442
|
+
height: 100%;
|
|
443
|
+
justify-content: center;
|
|
444
|
+
left: 0;
|
|
445
|
+
position: absolute;
|
|
446
|
+
top: 0;
|
|
447
|
+
width: 100%;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
// Hover, focus, and active states for contained buttons
|
|
451
|
+
&:not(.btn-text):not(.btn-outlined) {
|
|
452
|
+
&.btn-active:before {
|
|
453
|
+
opacity: 0.18;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
&:hover:before {
|
|
457
|
+
opacity: 0.08;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
&:focus:before {
|
|
461
|
+
opacity: 0.24;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
// Button width variations
|
|
466
|
+
&.btn-block {
|
|
467
|
+
display: flex;
|
|
468
|
+
flex: 1 0 auto;
|
|
469
|
+
min-width: 100% !important;
|
|
470
|
+
width: auto;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
// Button elevation variations
|
|
474
|
+
&.btn-contained {
|
|
475
|
+
@include elevation('sm');
|
|
476
|
+
|
|
477
|
+
&:after {
|
|
478
|
+
@include elevation('md');
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
&:active {
|
|
482
|
+
@include elevation('lg');
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
&.btn-depressed {
|
|
487
|
+
box-shadow: none !important;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
// Icon and FAB specific styles
|
|
492
|
+
&.btn-icon,
|
|
493
|
+
&.btn-fab {
|
|
494
|
+
min-height: 0;
|
|
495
|
+
min-width: 0;
|
|
496
|
+
padding: 0;
|
|
497
|
+
|
|
498
|
+
@each $name, $size in $fab-icon-sizes {
|
|
499
|
+
&.size-#{$name} {
|
|
500
|
+
.#{$prefix}icon {
|
|
501
|
+
height: #{$size};
|
|
502
|
+
font-size: #{$size};
|
|
503
|
+
width: #{$size};
|
|
504
|
+
|
|
505
|
+
svg {
|
|
506
|
+
height: #{$size};
|
|
507
|
+
width: #{$size};
|
|
508
|
+
}
|
|
509
|
+
}
|
|
97
510
|
}
|
|
98
|
-
|
|
99
|
-
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
&.btn-icon {
|
|
515
|
+
@each $name, $size in $btn-sizes {
|
|
516
|
+
&.size-#{$name} {
|
|
517
|
+
height: #{$size};
|
|
518
|
+
width: #{$size};
|
|
100
519
|
}
|
|
101
|
-
|
|
102
|
-
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
&.btn-fab {
|
|
524
|
+
&.btn-contained {
|
|
525
|
+
@include elevation('md');
|
|
526
|
+
|
|
527
|
+
&:after {
|
|
528
|
+
@include elevation('lg');
|
|
103
529
|
}
|
|
104
|
-
|
|
105
|
-
|
|
530
|
+
|
|
531
|
+
&:active {
|
|
532
|
+
@include elevation('xl');
|
|
106
533
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
&.btn-fixed,
|
|
537
|
+
&.btn-absolute {
|
|
538
|
+
z-index: 4;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
@each $name, $size in $fab-sizes {
|
|
542
|
+
&.size-#{$name} {
|
|
543
|
+
height: #{$size};
|
|
544
|
+
width: #{$size};
|
|
545
|
+
|
|
546
|
+
&.btn-absolute {
|
|
547
|
+
&.btn-bottom {
|
|
548
|
+
bottom: #{math.div($size, -2)};
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
&.btn-top {
|
|
552
|
+
top: #{math.div($size, -2)};
|
|
553
|
+
}
|
|
554
|
+
}
|
|
110
555
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
// Button style variations
|
|
560
|
+
&.btn-outlined {
|
|
561
|
+
border: 1px solid var(--color-border-low);
|
|
562
|
+
|
|
563
|
+
&:before {
|
|
564
|
+
border-radius: 0;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
&.btn-outlined,
|
|
569
|
+
&.btn-round {
|
|
570
|
+
.btn-content {
|
|
571
|
+
.#{$prefix}icon {
|
|
572
|
+
color: currentColor;
|
|
114
573
|
}
|
|
115
|
-
return c
|
|
116
574
|
}
|
|
117
575
|
}
|
|
576
|
+
|
|
577
|
+
&.btn-outlined,
|
|
578
|
+
&.btn-text {
|
|
579
|
+
background-color: transparent;
|
|
580
|
+
color: inherit;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
&.btn-round,
|
|
584
|
+
&.btn-rounded {
|
|
585
|
+
&:before {
|
|
586
|
+
border-radius: inherit;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
&.btn-round {
|
|
591
|
+
border-radius: 50%;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
&.btn-rounded {
|
|
595
|
+
border-radius: 2rem !important;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
&.btn-tile {
|
|
599
|
+
border-radius: 0 !important;
|
|
600
|
+
}
|
|
118
601
|
}
|
|
119
|
-
</
|
|
602
|
+
</style>
|
|
603
|
+
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export * as rCalendar from './index.vue'
|
|
2
|
-
export * as rCalendarMonthTab from './month.vue'
|
|
3
|
-
export * as rCalendarYearTab from './year.vue'
|
|
4
2
|
export * as l_container from '../container/index.js'
|
|
5
3
|
export * as l_row from '../container/row.js'
|
|
6
4
|
export * as l_col from '../container/col.js'
|