@awes-io/ui 2.42.0 → 2.42.1
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.42.1](https://github.com/awes-io/client/compare/@awes-io/ui@2.42.0...@awes-io/ui@2.42.1) (2022-02-10)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* locked prop for fixed button ([9e2067a](https://github.com/awes-io/client/commit/9e2067ae0abbbfe766f6ea63d9c2cc26940c90b1))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [2.42.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.41.0...@awes-io/ui@2.42.0) (2022-02-01)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
letter-spacing: 0.09375rem;
|
|
13
13
|
text-transform: uppercase;
|
|
14
14
|
|
|
15
|
-
background-color: rgba(var(--btn-bg), 1);
|
|
15
|
+
background-color: rgba(var(--btn-bg), var(--btn-bg-opacity, 1));
|
|
16
16
|
color: rgba(var(--btn-fg), 1);
|
|
17
17
|
|
|
18
18
|
box-shadow: 0px 0.25rem 0.5rem rgba(var(--btn-bg), 0.2);
|
|
@@ -35,6 +35,32 @@
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
&__lock {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
|
|
43
|
+
position: absolute;
|
|
44
|
+
inset: 0;
|
|
45
|
+
|
|
46
|
+
span {
|
|
47
|
+
background-color: var(--c-surface);
|
|
48
|
+
color: var(--c-on-surface);
|
|
49
|
+
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
border-radius: 50%;
|
|
54
|
+
|
|
55
|
+
padding: 0.32em;
|
|
56
|
+
font-size: 1.2em;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&--locked {
|
|
61
|
+
position: relative;
|
|
62
|
+
}
|
|
63
|
+
|
|
38
64
|
&:hover {
|
|
39
65
|
background-image: linear-gradient(rgba(var(--btn-fg), 0.15), rgba(var(--btn-fg), 0.15));
|
|
40
66
|
}
|
|
@@ -46,4 +72,10 @@
|
|
|
46
72
|
&:focus-visible {
|
|
47
73
|
outline: theme('focusOutline');
|
|
48
74
|
}
|
|
75
|
+
|
|
76
|
+
&[disabled] {
|
|
77
|
+
--btn-bg-opacity: 0.5 !important;
|
|
78
|
+
cursor: not-allowed !important;
|
|
79
|
+
user-select: none !important;
|
|
80
|
+
}
|
|
49
81
|
}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
:is="_linkComponent"
|
|
4
4
|
v-bind="_linkAttrs"
|
|
5
5
|
:style="buttonStyle"
|
|
6
|
+
:disabled="_linkAttrs.disabled || locked"
|
|
7
|
+
:class="{ 'aw-button-fixed--locked': locked }"
|
|
6
8
|
class="aw-button-fixed"
|
|
7
9
|
v-on="$listeners"
|
|
8
10
|
>
|
|
@@ -16,6 +18,15 @@
|
|
|
16
18
|
<slot name="icon">
|
|
17
19
|
<AwIcon :name="icon" size="24" class="flex-shrink-0" />
|
|
18
20
|
</slot>
|
|
21
|
+
<span
|
|
22
|
+
v-if="locked"
|
|
23
|
+
class="aw-button-fixed__lock"
|
|
24
|
+
v-tooltip="lockedTooltip"
|
|
25
|
+
>
|
|
26
|
+
<span>
|
|
27
|
+
<AwIconSystemMono name="lock" />
|
|
28
|
+
</span>
|
|
29
|
+
</span>
|
|
19
30
|
</Component>
|
|
20
31
|
</template>
|
|
21
32
|
|
package/mixins/button.js
CHANGED
|
@@ -56,7 +56,7 @@ i18nOptions.messages = mergeDeepRight(messages, i18nOptions.messages || {})
|
|
|
56
56
|
const beforeListeners = new Map()
|
|
57
57
|
const afterListeners = new Map()
|
|
58
58
|
|
|
59
|
-
export default async ({ app }) => {
|
|
59
|
+
export default async ({ app, $axios }) => {
|
|
60
60
|
const locales = langOptions.locales.slice().map(locale => {
|
|
61
61
|
if (isType('String', locale)) {
|
|
62
62
|
return { code: locale }
|
|
@@ -157,6 +157,9 @@ export default async ({ app }) => {
|
|
|
157
157
|
app.i18n.setLocale = async locale => {
|
|
158
158
|
const oldLocale = app.i18n.locale
|
|
159
159
|
|
|
160
|
+
// Update Accept-Language header
|
|
161
|
+
$axios.defaults.headers.common['Accept-Language'] = locale
|
|
162
|
+
|
|
160
163
|
for (const beforeListener of beforeListeners.keys()) {
|
|
161
164
|
await beforeListener(locale, oldLocale)
|
|
162
165
|
}
|
|
@@ -179,6 +182,11 @@ export default async ({ app }) => {
|
|
|
179
182
|
}
|
|
180
183
|
}
|
|
181
184
|
|
|
185
|
+
/**
|
|
186
|
+
* Set Accept-Language header
|
|
187
|
+
*/
|
|
188
|
+
$axios.defaults.headers.common['Accept-Language'] = app.i18n.locale
|
|
189
|
+
|
|
182
190
|
/**
|
|
183
191
|
* Set language on init
|
|
184
192
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awes-io/ui",
|
|
3
|
-
"version": "2.42.
|
|
3
|
+
"version": "2.42.1",
|
|
4
4
|
"description": "User Interface (UI) components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
"vue-template-compiler": "^2.6.10",
|
|
125
125
|
"webfonts-generator": "^0.4.0"
|
|
126
126
|
},
|
|
127
|
-
"gitHead": "
|
|
127
|
+
"gitHead": "a996a162c0bc3e471c6f021c861329d3ae2552eb"
|
|
128
128
|
}
|