wave-ui 3.27.2 → 4.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/dist/types/types/$waveui.d.ts +21 -1
- package/dist/types/types/colors.d.ts +2 -0
- package/dist/types/types/components/WAccordion.d.ts +99 -6
- package/dist/types/types/components/WAutocomplete.d.ts +437 -0
- package/dist/types/types/components/WBreadcrumbs.d.ts +7 -0
- package/dist/types/types/components/WButton.d.ts +7 -0
- package/dist/types/types/components/WCheckbox.d.ts +34 -0
- package/dist/types/types/components/WCheckboxes.d.ts +30 -0
- package/dist/types/types/components/WInput.d.ts +34 -0
- package/dist/types/types/components/WList.d.ts +7 -0
- package/dist/types/types/components/WMenu.d.ts +12 -6
- package/dist/types/types/components/WRadio.d.ts +34 -0
- package/dist/types/types/components/WRadios.d.ts +30 -0
- package/dist/types/types/components/WScrollable.d.ts +143 -0
- package/dist/types/types/components/WScrollable.js +2 -0
- package/dist/types/types/components/WSelect.d.ts +34 -0
- package/dist/types/types/components/WSwitch.d.ts +34 -0
- package/dist/types/types/components/WTable.d.ts +7 -0
- package/dist/types/types/components/WTabs.d.ts +7 -0
- package/dist/types/types/components/WTag.d.ts +7 -0
- package/dist/types/types/components/WTooltip.d.ts +20 -7
- package/dist/types/types/components/WTransitions.d.ts +104 -0
- package/dist/types/types/components/WTransitions.js +2 -0
- package/dist/types/types/components/WTree.d.ts +7 -0
- package/dist/types/types/components/index.d.ts +3 -1
- package/dist/wave-ui.cjs.js +3 -3
- package/dist/wave-ui.css +1 -1
- package/dist/wave-ui.esm.js +2190 -1350
- package/dist/wave-ui.umd.js +3 -3
- package/package.json +6 -6
- package/src/wave-ui/components/index.js +0 -1
- package/src/wave-ui/components/transitions/w-transition-bounce.vue +2 -1
- package/src/wave-ui/components/transitions/w-transition-expand.vue +3 -2
- package/src/wave-ui/components/transitions/w-transition-fade.vue +2 -1
- package/src/wave-ui/components/transitions/w-transition-scale-fade.vue +2 -1
- package/src/wave-ui/components/transitions/w-transition-scale.vue +2 -1
- package/src/wave-ui/components/transitions/w-transition-slide-fade.vue +2 -1
- package/src/wave-ui/components/transitions/w-transition-slide.vue +2 -1
- package/src/wave-ui/components/transitions/w-transition-twist.vue +2 -1
- package/src/wave-ui/components/w-accordion/index.vue +15 -6
- package/src/wave-ui/components/w-accordion/item.vue +71 -26
- package/src/wave-ui/components/w-alert.vue +27 -29
- package/src/wave-ui/components/w-autocomplete.vue +626 -192
- package/src/wave-ui/components/w-badge.vue +54 -53
- package/src/wave-ui/components/w-breadcrumbs.vue +20 -11
- package/src/wave-ui/components/w-button/button.vue +36 -24
- package/src/wave-ui/components/w-button/index.vue +6 -5
- package/src/wave-ui/components/w-card.vue +8 -7
- package/src/wave-ui/components/w-checkbox.vue +31 -11
- package/src/wave-ui/components/w-checkboxes.vue +21 -3
- package/src/wave-ui/components/w-confirm.vue +22 -22
- package/src/wave-ui/components/w-dialog.vue +1 -1
- package/src/wave-ui/components/w-divider.vue +5 -5
- package/src/wave-ui/components/w-drawer.vue +3 -3
- package/src/wave-ui/components/w-form-element.vue +2 -2
- package/src/wave-ui/components/w-icon.vue +12 -14
- package/src/wave-ui/components/w-image.vue +1 -1
- package/src/wave-ui/components/w-input.vue +43 -25
- package/src/wave-ui/components/w-list.vue +23 -12
- package/src/wave-ui/components/w-menu.vue +57 -55
- package/src/wave-ui/components/w-notification.vue +4 -4
- package/src/wave-ui/components/w-progress.vue +6 -7
- package/src/wave-ui/components/w-radio.vue +32 -7
- package/src/wave-ui/components/w-radios.vue +28 -3
- package/src/wave-ui/components/w-rating.vue +7 -9
- package/src/wave-ui/components/w-scrollable.vue +670 -97
- package/src/wave-ui/components/w-select.vue +119 -101
- package/src/wave-ui/components/w-slider.vue +26 -26
- package/src/wave-ui/components/w-spinner.vue +5 -7
- package/src/wave-ui/components/w-switch.vue +71 -47
- package/src/wave-ui/components/w-table.vue +69 -36
- package/src/wave-ui/components/w-tabs/index.vue +31 -24
- package/src/wave-ui/components/w-tag.vue +49 -38
- package/src/wave-ui/components/w-textarea.vue +22 -22
- package/src/wave-ui/components/w-timeline.vue +6 -6
- package/src/wave-ui/components/w-toolbar.vue +8 -8
- package/src/wave-ui/components/w-tooltip.vue +30 -25
- package/src/wave-ui/components/w-tree.vue +35 -16
- package/src/wave-ui/core.js +11 -1
- package/src/wave-ui/mixins/detachable.js +98 -43
- package/src/wave-ui/mixins/ripple.js +39 -0
- package/src/wave-ui/scss/_base.scss +82 -17
- package/src/wave-ui/scss/_colors.scss +6 -75
- package/src/wave-ui/scss/_layout.scss +39 -47
- package/src/wave-ui/scss/_ripple.scss +37 -0
- package/src/wave-ui/scss/_transitions.scss +19 -19
- package/src/wave-ui/scss/_typography.scss +8 -9
- package/src/wave-ui/scss/index.scss +1 -0
- package/src/wave-ui/scss/variables/_mixins.scss +24 -25
- package/src/wave-ui/scss/variables/_variables.scss +4 -151
- package/src/wave-ui/utils/colors.js +7 -4
- package/src/wave-ui/utils/config.js +5 -4
- package/src/wave-ui/utils/dynamic-css.js +42 -20
- package/src/wave-ui/utils/ripple.js +72 -0
- package/src/wave-ui/utils/wave-ripple-directive.js +40 -0
- package/dist/types/types/components/WApp.d.ts +0 -83
- package/src/wave-ui/components/w-app.vue +0 -24
- /package/dist/types/types/components/{WApp.js → WAutocomplete.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wave-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "A UI framework for Vue.js 3 (and 2) with only the bright side. :sunny:",
|
|
5
5
|
"author": "Antoni Andre <antoniandre.web@gmail.com>",
|
|
6
6
|
"homepage": "https://antoniandre.github.io/wave-ui",
|
|
@@ -50,13 +50,13 @@
|
|
|
50
50
|
],
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@babel/core": "^7.29.0",
|
|
53
|
-
"@biomejs/biome": "^2.4.
|
|
53
|
+
"@biomejs/biome": "^2.4.13",
|
|
54
54
|
"@faker-js/faker": "^10.4.0",
|
|
55
55
|
"@mdi/font": "^7.4.47",
|
|
56
56
|
"@tsconfig/recommended": "^1.0.13",
|
|
57
57
|
"@vitejs/plugin-vue": "^6.0.6",
|
|
58
58
|
"autoprefixer": "^10.5.0",
|
|
59
|
-
"axios": "^1.15.
|
|
59
|
+
"axios": "^1.15.2",
|
|
60
60
|
"font-awesome": "^4.7.0",
|
|
61
61
|
"globals": "^17.5.0",
|
|
62
62
|
"gsap": "^3.15.0",
|
|
@@ -69,10 +69,10 @@
|
|
|
69
69
|
"simple-syntax-highlighter": "^3.1.1",
|
|
70
70
|
"splitpanes": "^4.0.4",
|
|
71
71
|
"typescript": "^6.0.3",
|
|
72
|
-
"vite": "^8.0.
|
|
72
|
+
"vite": "^8.0.10",
|
|
73
73
|
"vite-svg-loader": "^5.1.1",
|
|
74
|
-
"vue": "^3.5.
|
|
75
|
-
"vue-router": "^5.0.
|
|
74
|
+
"vue": "^3.5.33",
|
|
75
|
+
"vue-router": "^5.0.6",
|
|
76
76
|
"vueperslides": "^3.6.0",
|
|
77
77
|
"vuex": "^4.1.0"
|
|
78
78
|
},
|
|
@@ -2,7 +2,6 @@ export { default as WAccordion } from './w-accordion/index.vue'
|
|
|
2
2
|
export { default as WAccordionItem } from './w-accordion/item.vue'
|
|
3
3
|
export { default as WAlert } from './w-alert.vue'
|
|
4
4
|
export { default as WAutocomplete } from './w-autocomplete.vue'
|
|
5
|
-
export { default as WApp } from './w-app.vue'
|
|
6
5
|
export { default as WBadge } from './w-badge.vue'
|
|
7
6
|
export { default as WBreadcrumbs } from './w-breadcrumbs.vue'
|
|
8
7
|
export { default as WButton } from './w-button/index.vue'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
transition(
|
|
3
3
|
name="expand"
|
|
4
|
-
mode="
|
|
4
|
+
:mode="mode"
|
|
5
5
|
:css="false"
|
|
6
6
|
@before-appear="beforeAppear"
|
|
7
7
|
@appear="appear"
|
|
@@ -22,7 +22,8 @@ export default {
|
|
|
22
22
|
props: {
|
|
23
23
|
x: { type: Boolean },
|
|
24
24
|
y: { type: Boolean },
|
|
25
|
-
duration: { type: Number, default: 250 }
|
|
25
|
+
duration: { type: Number, default: 250 },
|
|
26
|
+
mode: { type: String, default: 'out-in' }
|
|
26
27
|
},
|
|
27
28
|
|
|
28
29
|
data: () => ({
|
|
@@ -45,13 +45,17 @@
|
|
|
45
45
|
</template>
|
|
46
46
|
|
|
47
47
|
<script>
|
|
48
|
+
import { computed } from 'vue'
|
|
48
49
|
import { objectifyClasses } from '../../utils/index'
|
|
49
50
|
import { consoleError } from '../../utils/console'
|
|
51
|
+
import RippleMixin from '../../mixins/ripple'
|
|
50
52
|
import WAccordionItem from './item.vue'
|
|
51
53
|
|
|
52
54
|
export default {
|
|
53
55
|
name: 'w-accordion',
|
|
54
56
|
|
|
57
|
+
mixins: [RippleMixin],
|
|
58
|
+
|
|
55
59
|
props: {
|
|
56
60
|
modelValue: { type: Array },
|
|
57
61
|
color: { type: String },
|
|
@@ -65,6 +69,7 @@ export default {
|
|
|
65
69
|
itemClass: { type: [String, Array, Object] },
|
|
66
70
|
titleClass: { type: [String, Array, Object] },
|
|
67
71
|
contentClass: { type: [String, Array, Object] },
|
|
72
|
+
expandedClass: { type: [String, Array, Object] },
|
|
68
73
|
expandIcon: { type: [String, Boolean], default: 'wi-triangle-down' },
|
|
69
74
|
expandIconRight: { type: Boolean },
|
|
70
75
|
expandIconRotate90: { type: Boolean },
|
|
@@ -86,15 +91,17 @@ export default {
|
|
|
86
91
|
// All provided to the WAccordionItem, not passed as prop since it could be used externally.
|
|
87
92
|
provide () {
|
|
88
93
|
return {
|
|
89
|
-
titleClasses: this.titleClasses,
|
|
90
|
-
contentClasses: this.contentClasses,
|
|
94
|
+
titleClasses: computed(() => this.titleClasses),
|
|
95
|
+
contentClasses: computed(() => this.contentClasses),
|
|
96
|
+
expandedClass: computed(() => this.expandedClass),
|
|
91
97
|
onItemToggle: this.onItemToggle,
|
|
92
98
|
onEndOfCollapse: this.onEndOfCollapse,
|
|
93
99
|
getOriginalItem: this.getOriginalItem,
|
|
94
100
|
options: this.$props,
|
|
95
101
|
registerItem: this.registerItem,
|
|
96
102
|
unregisterItem: this.unregisterItem,
|
|
97
|
-
getAccordionItem: this.getAccordionItem
|
|
103
|
+
getAccordionItem: this.getAccordionItem,
|
|
104
|
+
getAccordionNoRipple: () => this.noRipple
|
|
98
105
|
}
|
|
99
106
|
},
|
|
100
107
|
|
|
@@ -112,7 +119,7 @@ export default {
|
|
|
112
119
|
|
|
113
120
|
// Detect if the accordion items are directly provided through slot using WAccordionItem.
|
|
114
121
|
accordionItemsProvided () {
|
|
115
|
-
return this.$slots.default?.()?.some(item => item?.type?.name)
|
|
122
|
+
return this.$slots.default?.()?.some(item => item?.type?.name === 'w-accordion-item')
|
|
116
123
|
},
|
|
117
124
|
|
|
118
125
|
accordionClasses () {
|
|
@@ -129,7 +136,9 @@ export default {
|
|
|
129
136
|
},
|
|
130
137
|
|
|
131
138
|
itemClasses () {
|
|
132
|
-
|
|
139
|
+
const classes = [this.itemClass]
|
|
140
|
+
if (this.expandedClass) classes.push(this.expandedClass)
|
|
141
|
+
return objectifyClasses(classes)
|
|
133
142
|
},
|
|
134
143
|
|
|
135
144
|
titleClasses () {
|
|
@@ -213,6 +222,6 @@ export default {
|
|
|
213
222
|
|
|
214
223
|
@include themeable;
|
|
215
224
|
|
|
216
|
-
&--shadow {box-shadow:
|
|
225
|
+
&--shadow {box-shadow: var(--w-box-shadow);}
|
|
217
226
|
}
|
|
218
227
|
</style>
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
.w-accordion__item(:class="itemClasses" :aria-expanded="accordionItem._expanded ? 'true' : 'false'")
|
|
3
3
|
.w-accordion__item-title(
|
|
4
4
|
@click="!accordionItem._disabled && toggleItem(accordionItem, $event)"
|
|
5
|
+
@pointerdown="onAccordionTitlePointerDown"
|
|
5
6
|
@focus="$emit('focus', (accordionItem))"
|
|
6
7
|
@keypress.enter="!accordionItem._disabled && toggleItem(accordionItem, $event)"
|
|
7
8
|
:tabindex="!accordionItem._disabled && 0"
|
|
8
|
-
:class="
|
|
9
|
+
:class="accordionTitleClasses")
|
|
9
10
|
//- Expand icon on left.
|
|
10
11
|
w-button.w-accordion__expand-icon(
|
|
11
12
|
v-if="options.expandIcon && !options.expandIconRight"
|
|
@@ -44,11 +45,19 @@
|
|
|
44
45
|
:item="accordionItem"
|
|
45
46
|
:class="contentClasses")
|
|
46
47
|
slot(
|
|
48
|
+
v-if="$slots.content"
|
|
47
49
|
name="content"
|
|
48
50
|
:item="getOriginalItem(accordionItem)"
|
|
49
51
|
:expanded="accordionItem._expanded"
|
|
50
52
|
:index="accordionItem._index + 1")
|
|
51
53
|
div(v-html="accordionItem[options.itemContentKey]")
|
|
54
|
+
slot(
|
|
55
|
+
v-else
|
|
56
|
+
name="default"
|
|
57
|
+
:item="getOriginalItem(accordionItem)"
|
|
58
|
+
:expanded="accordionItem._expanded"
|
|
59
|
+
:index="accordionItem._index + 1")
|
|
60
|
+
div(v-html="accordionItem[options.itemContentKey]")
|
|
52
61
|
w-transition-expand(
|
|
53
62
|
v-else
|
|
54
63
|
y
|
|
@@ -61,20 +70,32 @@
|
|
|
61
70
|
:item="accordionItem"
|
|
62
71
|
:class="contentClasses")
|
|
63
72
|
slot(
|
|
73
|
+
v-if="$slots.content"
|
|
64
74
|
name="content"
|
|
65
75
|
:item="getOriginalItem(accordionItem)"
|
|
66
76
|
:expanded="accordionItem._expanded"
|
|
67
77
|
:index="accordionItem._index + 1")
|
|
68
78
|
div(v-html="accordionItem[options.itemContentKey]")
|
|
79
|
+
slot(
|
|
80
|
+
v-else
|
|
81
|
+
name="default"
|
|
82
|
+
:item="getOriginalItem(accordionItem)"
|
|
83
|
+
:expanded="accordionItem._expanded"
|
|
84
|
+
:index="accordionItem._index + 1")
|
|
85
|
+
div(v-html="accordionItem[options.itemContentKey]")
|
|
69
86
|
</template>
|
|
70
87
|
|
|
71
88
|
<script>
|
|
72
89
|
import { useId } from 'vue'
|
|
90
|
+
import RippleMixin from '../../mixins/ripple'
|
|
91
|
+
import { isRippleEnabled } from '../../utils/ripple'
|
|
73
92
|
import AccordionContent from './accordion-content.vue'
|
|
74
93
|
|
|
75
94
|
export default {
|
|
76
95
|
name: 'w-accordion-item',
|
|
77
96
|
|
|
97
|
+
mixins: [RippleMixin],
|
|
98
|
+
|
|
78
99
|
setup () {
|
|
79
100
|
return { accordionItemUid: useId() }
|
|
80
101
|
},
|
|
@@ -88,21 +109,41 @@ export default {
|
|
|
88
109
|
disabled: { type: Boolean }
|
|
89
110
|
},
|
|
90
111
|
|
|
91
|
-
inject:
|
|
92
|
-
'options',
|
|
93
|
-
'titleClasses',
|
|
94
|
-
'contentClasses',
|
|
95
|
-
'
|
|
96
|
-
'
|
|
97
|
-
'
|
|
98
|
-
'
|
|
99
|
-
'
|
|
100
|
-
'
|
|
101
|
-
|
|
112
|
+
inject: {
|
|
113
|
+
options: { from: 'options' },
|
|
114
|
+
titleClasses: { from: 'titleClasses' },
|
|
115
|
+
contentClasses: { from: 'contentClasses' },
|
|
116
|
+
expandedClass: { from: 'expandedClass' },
|
|
117
|
+
onItemToggle: { from: 'onItemToggle' },
|
|
118
|
+
onEndOfCollapse: { from: 'onEndOfCollapse' },
|
|
119
|
+
getOriginalItem: { from: 'getOriginalItem' },
|
|
120
|
+
getAccordionItem: { from: 'getAccordionItem' },
|
|
121
|
+
registerItem: { from: 'registerItem' },
|
|
122
|
+
unregisterItem: { from: 'unregisterItem' },
|
|
123
|
+
getAccordionNoRipple: { from: 'getAccordionNoRipple', default: () => undefined }
|
|
124
|
+
},
|
|
102
125
|
|
|
103
126
|
emits: ['focus'],
|
|
104
127
|
|
|
105
128
|
computed: {
|
|
129
|
+
/** Per-item noRipple override, else parent `w-accordion` noRipple, else global config. */
|
|
130
|
+
rippleActive () {
|
|
131
|
+
let resolvedNoRipple
|
|
132
|
+
if (typeof this.noRipple === 'boolean') resolvedNoRipple = this.noRipple
|
|
133
|
+
else {
|
|
134
|
+
const p = this.getAccordionNoRipple?.()
|
|
135
|
+
resolvedNoRipple = typeof p === 'boolean' ? p : undefined
|
|
136
|
+
}
|
|
137
|
+
return isRippleEnabled(resolvedNoRipple ? false : undefined, this.$waveui)
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
accordionTitleClasses () {
|
|
141
|
+
return {
|
|
142
|
+
...this.titleClasses,
|
|
143
|
+
'w-ripple': this.rippleActive
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
|
|
106
147
|
accordionItem: {
|
|
107
148
|
get () {
|
|
108
149
|
return this.getAccordionItem(this.accordionItemUid)
|
|
@@ -113,12 +154,19 @@ export default {
|
|
|
113
154
|
return {
|
|
114
155
|
'w-accordion__item--expanded': this.accordionItem._expanded,
|
|
115
156
|
'w-accordion__item--disabled': this.accordionItem._disabled,
|
|
116
|
-
[this.accordionItem[this.options.itemColorKey]]: this.accordionItem[this.options.itemColorKey]
|
|
157
|
+
[this.accordionItem[this.options.itemColorKey]]: this.accordionItem[this.options.itemColorKey],
|
|
158
|
+
[this.expandedClass]: this.accordionItem._expanded
|
|
117
159
|
}
|
|
118
160
|
}
|
|
119
161
|
},
|
|
120
162
|
|
|
121
163
|
methods: {
|
|
164
|
+
onAccordionTitlePointerDown (e) {
|
|
165
|
+
if (this.accordionItem._disabled) return
|
|
166
|
+
if (e.target.closest?.('.w-accordion__expand-icon')) return
|
|
167
|
+
this.onRipple(e)
|
|
168
|
+
},
|
|
169
|
+
|
|
122
170
|
toggleItem (item, e) {
|
|
123
171
|
item._expanded = !item._expanded
|
|
124
172
|
|
|
@@ -151,13 +199,11 @@ export default {
|
|
|
151
199
|
</script>
|
|
152
200
|
|
|
153
201
|
<style lang="scss">
|
|
154
|
-
@use "sass:math";
|
|
155
|
-
|
|
156
202
|
.w-accordion__item {position: relative;}
|
|
157
203
|
|
|
158
204
|
button.w-accordion__expand-icon {color: color-mix(in srgb, var(--w-base-color) 40%, transparent);}
|
|
159
205
|
.w-accordion__expand-icon {
|
|
160
|
-
margin-right:
|
|
206
|
+
margin-right: var(--w-base-increment);
|
|
161
207
|
|
|
162
208
|
.w-accordion--rotate-icon & {@include default-transition;}
|
|
163
209
|
&--rotate90 {transform: rotate(-90deg);}
|
|
@@ -171,11 +217,11 @@ button.w-accordion__expand-icon {color: color-mix(in srgb, var(--w-base-color) 4
|
|
|
171
217
|
position: relative;
|
|
172
218
|
display: flex;
|
|
173
219
|
align-items: center;
|
|
174
|
-
font-size:
|
|
175
|
-
padding:
|
|
220
|
+
font-size: round(nearest, calc(1.2 * var(--w-base-font-size)), 1px);
|
|
221
|
+
padding: var(--w-base-increment);
|
|
176
222
|
user-select: none;
|
|
177
223
|
cursor: pointer;
|
|
178
|
-
border-top:
|
|
224
|
+
border-top: var(--w-border);
|
|
179
225
|
-webkit-tap-highlight-color: transparent;
|
|
180
226
|
|
|
181
227
|
.w-accordion__item--disabled & {
|
|
@@ -183,7 +229,7 @@ button.w-accordion__expand-icon {color: color-mix(in srgb, var(--w-base-color) 4
|
|
|
183
229
|
opacity: 0.6;
|
|
184
230
|
-webkit-tap-highlight-color: transparent;
|
|
185
231
|
}
|
|
186
|
-
.w-accordion--no-icon &, .w-accordion--icon-right & {padding-left:
|
|
232
|
+
.w-accordion--no-icon &, .w-accordion--icon-right & {padding-left: calc(var(--w-base-increment) * 3);}
|
|
187
233
|
|
|
188
234
|
.w-accordion__item:first-child & {border-top-color: transparent;}
|
|
189
235
|
|
|
@@ -191,18 +237,17 @@ button.w-accordion__expand-icon {color: color-mix(in srgb, var(--w-base-color) 4
|
|
|
191
237
|
content: '';
|
|
192
238
|
position: absolute;
|
|
193
239
|
inset: 0;
|
|
194
|
-
background-color:
|
|
195
|
-
|
|
196
|
-
transition: $fast-transition-duration;
|
|
240
|
+
background-color: transparent;
|
|
241
|
+
transition: background-color var(--w-transition-duration-fast);
|
|
197
242
|
pointer-events: none;
|
|
198
243
|
}
|
|
199
244
|
|
|
200
|
-
&:focus:before, &:hover:before {
|
|
201
|
-
&:active:before {
|
|
245
|
+
&:focus:before, &:hover:before {background-color: color-mix(in srgb, currentColor 3%, transparent);}
|
|
246
|
+
&:active:before {background-color: color-mix(in srgb, currentColor 5%, transparent);}
|
|
202
247
|
.w-accordion__item--disabled &:before {display: none;}
|
|
203
248
|
}
|
|
204
249
|
|
|
205
250
|
.w-accordion__item-content {
|
|
206
|
-
padding: (
|
|
251
|
+
padding: calc(var(--w-base-increment) * 2) calc(var(--w-base-increment) * 3);
|
|
207
252
|
}
|
|
208
253
|
</style>
|
|
@@ -131,15 +131,13 @@ export default {
|
|
|
131
131
|
</script>
|
|
132
132
|
|
|
133
133
|
<style lang="scss">
|
|
134
|
-
@use "sass:math";
|
|
135
|
-
|
|
136
134
|
.w-alert {
|
|
137
135
|
position: relative;
|
|
138
|
-
margin-top:
|
|
139
|
-
margin-bottom:
|
|
140
|
-
padding:
|
|
141
|
-
font-size:
|
|
142
|
-
border-radius:
|
|
136
|
+
margin-top: calc(var(--w-base-increment) * 4);
|
|
137
|
+
margin-bottom: calc(var(--w-base-increment) * 4);
|
|
138
|
+
padding: calc(var(--w-base-increment) * 2);
|
|
139
|
+
font-size: var(--w-base-font-size);
|
|
140
|
+
border-radius: var(--w-border-radius);
|
|
143
141
|
border: 0 solid currentColor;
|
|
144
142
|
|
|
145
143
|
@include themeable;
|
|
@@ -154,10 +152,10 @@ export default {
|
|
|
154
152
|
&--tile {border-radius: 0;}
|
|
155
153
|
&--round {
|
|
156
154
|
border-radius: 99em;
|
|
157
|
-
padding-left:
|
|
158
|
-
padding-right:
|
|
155
|
+
padding-left: calc(var(--w-base-increment) * 3);
|
|
156
|
+
padding-right: calc(var(--w-base-increment) * 3);
|
|
159
157
|
}
|
|
160
|
-
&--shadow {box-shadow:
|
|
158
|
+
&--shadow {box-shadow: var(--w-box-shadow);}
|
|
161
159
|
&--one-border, &--plain {border: transparent;}
|
|
162
160
|
|
|
163
161
|
// Before for the border, after for the background color.
|
|
@@ -171,33 +169,33 @@ export default {
|
|
|
171
169
|
|
|
172
170
|
// Single side border.
|
|
173
171
|
// ------------------------------------------------------
|
|
174
|
-
&--border-left {padding-left:
|
|
175
|
-
&--border-right {padding-right:
|
|
176
|
-
&--border-top {padding-top:
|
|
177
|
-
&--border-bottom {padding-bottom:
|
|
172
|
+
&--border-left {padding-left: calc(var(--w-base-increment) * 3);}
|
|
173
|
+
&--border-right {padding-right: calc(var(--w-base-increment) * 3);}
|
|
174
|
+
&--border-top {padding-top: calc(var(--w-base-increment) * 3);}
|
|
175
|
+
&--border-bottom {padding-bottom: calc(var(--w-base-increment) * 3);}
|
|
178
176
|
|
|
179
177
|
&--one-border:before {content: '';opacity: 0.3;}
|
|
180
178
|
&--border-left:before {
|
|
181
179
|
right: auto;
|
|
182
|
-
width:
|
|
180
|
+
width: var(--w-base-increment);
|
|
183
181
|
border-top-left-radius: inherit;
|
|
184
182
|
border-bottom-left-radius: inherit;
|
|
185
183
|
}
|
|
186
184
|
&--border-right:before {
|
|
187
185
|
left: auto;
|
|
188
|
-
width:
|
|
186
|
+
width: var(--w-base-increment);
|
|
189
187
|
border-top-right-radius: inherit;
|
|
190
188
|
border-bottom-right-radius: inherit;
|
|
191
189
|
}
|
|
192
190
|
&--border-top:before {
|
|
193
191
|
bottom: auto;
|
|
194
|
-
height:
|
|
192
|
+
height: var(--w-base-increment);
|
|
195
193
|
border-top-left-radius: inherit;
|
|
196
194
|
border-top-right-radius: inherit;
|
|
197
195
|
}
|
|
198
196
|
&--border-bottom:before {
|
|
199
197
|
top: auto;
|
|
200
|
-
height:
|
|
198
|
+
height: var(--w-base-increment);
|
|
201
199
|
border-bottom-left-radius: inherit;
|
|
202
200
|
border-bottom-right-radius: inherit;
|
|
203
201
|
}
|
|
@@ -215,15 +213,15 @@ export default {
|
|
|
215
213
|
// ------------------------------------------------------
|
|
216
214
|
&__dismiss.w-button {
|
|
217
215
|
align-self: flex-start;
|
|
218
|
-
margin-left:
|
|
219
|
-
margin-top:
|
|
220
|
-
margin-right:
|
|
216
|
+
margin-left: calc(var(--w-base-increment) * 2);
|
|
217
|
+
margin-top: calc(var(--w-base-increment) * -0.5);
|
|
218
|
+
margin-right: calc(var(--w-base-increment) * -0.5);
|
|
221
219
|
}
|
|
222
220
|
|
|
223
221
|
& &__icon {
|
|
224
222
|
opacity: 0.9;
|
|
225
223
|
align-self: flex-start;
|
|
226
|
-
margin-right:
|
|
224
|
+
margin-right: calc(var(--w-base-increment) * 2);
|
|
227
225
|
font-size: 1.3em;
|
|
228
226
|
}
|
|
229
227
|
&--has-icon &__content {flex-grow: 1;}
|
|
@@ -238,18 +236,18 @@ export default {
|
|
|
238
236
|
z-index: 1;
|
|
239
237
|
transform: translateX(-50%);
|
|
240
238
|
border: 1px solid color-mix(in srgb, var(--w-base-bg-color) 70%, transparent);
|
|
241
|
-
background-color:
|
|
239
|
+
background-color: var(--w-base-bg-color);
|
|
242
240
|
}
|
|
243
241
|
&--icon-outside &__icon:before {transform: scale(1.05);}
|
|
244
242
|
|
|
245
|
-
&--icon-outside &__content {padding-left:
|
|
243
|
+
&--icon-outside &__content {padding-left: calc(var(--w-base-increment) * 3);}
|
|
246
244
|
|
|
247
245
|
// Sizes.
|
|
248
246
|
// ------------------------------------------------------
|
|
249
|
-
&.size--xs {padding-top:
|
|
250
|
-
&.size--sm {padding-top:
|
|
251
|
-
&.size--md {padding-top:
|
|
252
|
-
&.size--lg {padding-top:
|
|
253
|
-
&.size--xl {padding-top:
|
|
247
|
+
&.size--xs {padding-top: var(--w-base-increment);padding-bottom: var(--w-base-increment);}
|
|
248
|
+
&.size--sm {padding-top: var(--w-base-increment);padding-bottom: var(--w-base-increment);}
|
|
249
|
+
&.size--md {padding-top: calc(var(--w-base-increment) * 2);padding-bottom: calc(var(--w-base-increment) * 2);}
|
|
250
|
+
&.size--lg {padding-top: calc(var(--w-base-increment) * 3);padding-bottom: calc(var(--w-base-increment) * 2.5);}
|
|
251
|
+
&.size--xl {padding-top: calc(var(--w-base-increment) * 3);padding-bottom: calc(var(--w-base-increment) * 3);}
|
|
254
252
|
}
|
|
255
253
|
</style>
|