@varlet/ui 1.27.1 → 1.27.2
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/es/bottom-navigation/BottomNavigation.js +1 -1
- package/es/bottom-navigation/bottomNavigation.css +1 -1
- package/es/bottom-navigation/bottomNavigation.less +5 -0
- package/es/bottom-navigation/props.js +4 -0
- package/es/snackbar/style/index.js +1 -1
- package/es/snackbar/style/less.js +1 -1
- package/es/style.css +1 -1
- package/es/tabs/Tabs.js +1 -1
- package/es/tabs/props.js +4 -0
- package/es/tabs/tabs.css +1 -1
- package/es/tabs/tabs.less +6 -0
- package/es/varlet.esm.js +11 -3
- package/highlight/attributes.json +8 -0
- package/highlight/tags.json +2 -0
- package/highlight/web-types.json +19 -1
- package/lib/bottom-navigation/BottomNavigation.js +1 -1
- package/lib/bottom-navigation/bottomNavigation.css +1 -1
- package/lib/bottom-navigation/bottomNavigation.less +5 -0
- package/lib/bottom-navigation/props.js +4 -0
- package/lib/snackbar/style/index.js +1 -1
- package/lib/snackbar/style/less.js +1 -1
- package/lib/style.css +1 -1
- package/lib/tabs/Tabs.js +1 -1
- package/lib/tabs/props.js +4 -0
- package/lib/tabs/tabs.css +1 -1
- package/lib/tabs/tabs.less +6 -0
- package/package.json +4 -4
- package/types/bottomNavigation.d.ts +2 -1
- package/types/tabs.d.ts +1 -0
- package/umd/varlet.js +3 -3
package/es/tabs/Tabs.js
CHANGED
|
@@ -19,7 +19,7 @@ export function render(_ctx, _cache) {
|
|
|
19
19
|
"offset-top": _ctx.sticky ? _ctx.offsetTop : null
|
|
20
20
|
}, {
|
|
21
21
|
default: _withCtx(() => [_createElementVNode("div", _mergeProps({
|
|
22
|
-
class: _ctx.classes(_ctx.n(), 'var--box', _ctx.n("--item-" + _ctx.itemDirection), _ctx.n("--layout-" + _ctx.layoutDirection + "-padding"), [_ctx.elevation, 'var-elevation--4'], [_ctx.fixedBottom, _ctx.n('--fixed-bottom')]),
|
|
22
|
+
class: _ctx.classes(_ctx.n(), 'var--box', _ctx.n("--item-" + _ctx.itemDirection), _ctx.n("--layout-" + _ctx.layoutDirection + "-padding"), [_ctx.elevation, 'var-elevation--4'], [_ctx.fixedBottom, _ctx.n('--fixed-bottom')], [_ctx.safeArea, _ctx.n('--safe-area')]),
|
|
23
23
|
style: {
|
|
24
24
|
background: _ctx.color
|
|
25
25
|
}
|
package/es/tabs/props.js
CHANGED
package/es/tabs/tabs.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --tabs-item-horizontal-height: 44px; --tabs-item-vertical-height: 66px; --tabs-radius: 2px; --tabs-padding: 12px; --tabs-indicator-size: 2px; --tabs-indicator-background: var(--color-primary); --tabs-background: #fff;}.var-tabs { border-radius: var(--tabs-radius); background: var(--tabs-background); overflow: hidden; transition: background-color 0.25s;}.var-tabs__tab-wrap { position: relative; display: flex; height: 100%;}.var-tabs__indicator { position: absolute; z-index: 10; transition-property: width, transform; transition-duration: 0.3s;}.var-tabs--layout-horizontal { flex-direction: row;}.var-tabs--layout-horizontal-scrollable { overflow-x: auto; overflow-y: hidden;}.var-tabs--layout-horizontal-padding { padding: 0 var(--tabs-padding);}.var-tabs--layout-horizontal-indicator { left: 0; bottom: 0; height: var(--tabs-indicator-size); background: var(--tabs-indicator-background);}.var-tabs--layout-vertical { flex-direction: column;}.var-tabs--layout-vertical-scrollable { overflow-x: hidden; overflow-y: auto;}.var-tabs--layout-vertical-padding { padding: 0;}.var-tabs--layout-vertical-indicator { left: 0; top: 0; width: var(--tabs-indicator-size); background: var(--tabs-indicator-background);}.var-tabs--item-horizontal { height: var(--tabs-item-horizontal-height);}.var-tabs--item-vertical { height: var(--tabs-item-vertical-height);}.var-tabs--fixed-bottom { position: fixed; width: 100%; left: 0; bottom: 0; z-index: 99;}
|
|
1
|
+
:root { --tabs-item-horizontal-height: 44px; --tabs-item-vertical-height: 66px; --tabs-radius: 2px; --tabs-padding: 12px; --tabs-indicator-size: 2px; --tabs-indicator-background: var(--color-primary); --tabs-background: #fff;}.var-tabs { border-radius: var(--tabs-radius); background: var(--tabs-background); overflow: hidden; transition: background-color 0.25s;}.var-tabs__tab-wrap { position: relative; display: flex; height: 100%;}.var-tabs__indicator { position: absolute; z-index: 10; transition-property: width, transform; transition-duration: 0.3s;}.var-tabs--layout-horizontal { flex-direction: row;}.var-tabs--layout-horizontal-scrollable { overflow-x: auto; overflow-y: hidden;}.var-tabs--layout-horizontal-padding { padding: 0 var(--tabs-padding);}.var-tabs--layout-horizontal-indicator { left: 0; bottom: 0; height: var(--tabs-indicator-size); background: var(--tabs-indicator-background);}.var-tabs--layout-vertical { flex-direction: column;}.var-tabs--layout-vertical-scrollable { overflow-x: hidden; overflow-y: auto;}.var-tabs--layout-vertical-padding { padding: 0;}.var-tabs--layout-vertical-indicator { left: 0; top: 0; width: var(--tabs-indicator-size); background: var(--tabs-indicator-background);}.var-tabs--item-horizontal { height: var(--tabs-item-horizontal-height);}.var-tabs--item-vertical { height: var(--tabs-item-vertical-height);}.var-tabs--fixed-bottom { position: fixed; width: 100%; left: 0; bottom: 0; z-index: 99;}.var-tabs--safe-area { padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom); box-sizing: content-box !important;}
|
package/es/tabs/tabs.less
CHANGED
package/es/varlet.esm.js
CHANGED
|
@@ -2158,6 +2158,10 @@ var props$M = {
|
|
|
2158
2158
|
type: Boolean,
|
|
2159
2159
|
default: false
|
|
2160
2160
|
},
|
|
2161
|
+
safeArea: {
|
|
2162
|
+
type: Boolean,
|
|
2163
|
+
default: false
|
|
2164
|
+
},
|
|
2161
2165
|
zIndex: {
|
|
2162
2166
|
type: [Number, String],
|
|
2163
2167
|
default: 1
|
|
@@ -2230,7 +2234,7 @@ var defaultFabProps = {
|
|
|
2230
2234
|
function render$S(_ctx, _cache) {
|
|
2231
2235
|
var _component_var_button = resolveComponent("var-button");
|
|
2232
2236
|
return openBlock(), createElementBlock("div", {
|
|
2233
|
-
class: normalizeClass(_ctx.classes(_ctx.n(), [_ctx.fixed, _ctx.n("--fixed")], [_ctx.border, _ctx.n("--border")])),
|
|
2237
|
+
class: normalizeClass(_ctx.classes(_ctx.n(), [_ctx.fixed, _ctx.n("--fixed")], [_ctx.border, _ctx.n("--border")], [_ctx.safeArea, _ctx.n("--safe-area")])),
|
|
2234
2238
|
ref: "bottomNavigationDom",
|
|
2235
2239
|
style: normalizeStyle("z-index:" + _ctx.zIndex)
|
|
2236
2240
|
}, [renderSlot(_ctx.$slots, "default"), _ctx.$slots.fab ? (openBlock(), createBlock(_component_var_button, mergeProps({
|
|
@@ -15543,6 +15547,10 @@ var props$3 = {
|
|
|
15543
15547
|
type: Boolean,
|
|
15544
15548
|
default: false
|
|
15545
15549
|
},
|
|
15550
|
+
safeArea: {
|
|
15551
|
+
type: Boolean,
|
|
15552
|
+
default: false
|
|
15553
|
+
},
|
|
15546
15554
|
offsetTop: pickProps(props$s, "offsetTop"),
|
|
15547
15555
|
onClick: {
|
|
15548
15556
|
type: Function
|
|
@@ -15592,7 +15600,7 @@ function render$4(_ctx, _cache) {
|
|
|
15592
15600
|
"offset-top": _ctx.sticky ? _ctx.offsetTop : null
|
|
15593
15601
|
}, {
|
|
15594
15602
|
default: withCtx(() => [createElementVNode("div", mergeProps({
|
|
15595
|
-
class: _ctx.classes(_ctx.n(), "var--box", _ctx.n("--item-" + _ctx.itemDirection), _ctx.n("--layout-" + _ctx.layoutDirection + "-padding"), [_ctx.elevation, "var-elevation--4"], [_ctx.fixedBottom, _ctx.n("--fixed-bottom")]),
|
|
15603
|
+
class: _ctx.classes(_ctx.n(), "var--box", _ctx.n("--item-" + _ctx.itemDirection), _ctx.n("--layout-" + _ctx.layoutDirection + "-padding"), [_ctx.elevation, "var-elevation--4"], [_ctx.fixedBottom, _ctx.n("--fixed-bottom")], [_ctx.safeArea, _ctx.n("--safe-area")]),
|
|
15596
15604
|
style: {
|
|
15597
15605
|
background: _ctx.color
|
|
15598
15606
|
}
|
|
@@ -17218,9 +17226,9 @@ var skeleton = "";
|
|
|
17218
17226
|
var SkeletonSfc = "";
|
|
17219
17227
|
var slider = "";
|
|
17220
17228
|
var SliderSfc = "";
|
|
17229
|
+
var SnackbarSfc = "";
|
|
17221
17230
|
var snackbar = "";
|
|
17222
17231
|
var coreSfc = "";
|
|
17223
|
-
var SnackbarSfc = "";
|
|
17224
17232
|
var space = "";
|
|
17225
17233
|
var step = "";
|
|
17226
17234
|
var StepSfc = "";
|
|
@@ -119,6 +119,10 @@
|
|
|
119
119
|
"type": "boolean",
|
|
120
120
|
"description": "是否显示外边框 默认值:false"
|
|
121
121
|
},
|
|
122
|
+
"var-bottom-navigation/safe-area": {
|
|
123
|
+
"type": "boolean",
|
|
124
|
+
"description": "是否开启底部安全区适配 默认值:false"
|
|
125
|
+
},
|
|
122
126
|
"var-bottom-navigation/z-index": {
|
|
123
127
|
"type": "number | string",
|
|
124
128
|
"description": "元素 z-index 默认值:1"
|
|
@@ -1699,6 +1703,10 @@
|
|
|
1699
1703
|
"type": "boolean",
|
|
1700
1704
|
"description": "是否启用粘性布局 默认值:false"
|
|
1701
1705
|
},
|
|
1706
|
+
"var-tabs/safe-area": {
|
|
1707
|
+
"type": "boolean",
|
|
1708
|
+
"description": "是否开启底部安全区适配 默认值:false"
|
|
1709
|
+
},
|
|
1702
1710
|
"var-tabs/offset-top": {
|
|
1703
1711
|
"type": "string | number",
|
|
1704
1712
|
"description": "吸顶距离 默认值:0"
|
package/highlight/tags.json
CHANGED
package/highlight/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
|
-
"version": "1.27.
|
|
4
|
+
"version": "1.27.1",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -369,6 +369,15 @@
|
|
|
369
369
|
"kind": "expression"
|
|
370
370
|
}
|
|
371
371
|
},
|
|
372
|
+
{
|
|
373
|
+
"name": "safe-area",
|
|
374
|
+
"description": "是否开启底部安全区适配",
|
|
375
|
+
"default": "false",
|
|
376
|
+
"value": {
|
|
377
|
+
"type": "boolean",
|
|
378
|
+
"kind": "expression"
|
|
379
|
+
}
|
|
380
|
+
},
|
|
372
381
|
{
|
|
373
382
|
"name": "z-index",
|
|
374
383
|
"description": "元素 z-index",
|
|
@@ -5059,6 +5068,15 @@
|
|
|
5059
5068
|
"kind": "expression"
|
|
5060
5069
|
}
|
|
5061
5070
|
},
|
|
5071
|
+
{
|
|
5072
|
+
"name": "safe-area",
|
|
5073
|
+
"description": "是否开启底部安全区适配",
|
|
5074
|
+
"default": "false",
|
|
5075
|
+
"value": {
|
|
5076
|
+
"type": "boolean",
|
|
5077
|
+
"kind": "expression"
|
|
5078
|
+
}
|
|
5079
|
+
},
|
|
5062
5080
|
{
|
|
5063
5081
|
"name": "offset-top",
|
|
5064
5082
|
"description": "吸顶距离",
|
|
@@ -38,7 +38,7 @@ function render(_ctx, _cache) {
|
|
|
38
38
|
var _component_var_button = (0, _vue.resolveComponent)("var-button");
|
|
39
39
|
|
|
40
40
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
41
|
-
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), [_ctx.fixed, _ctx.n('--fixed')], [_ctx.border, _ctx.n('--border')])),
|
|
41
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), [_ctx.fixed, _ctx.n('--fixed')], [_ctx.border, _ctx.n('--border')], [_ctx.safeArea, _ctx.n('--safe-area')])),
|
|
42
42
|
ref: "bottomNavigationDom",
|
|
43
43
|
style: (0, _vue.normalizeStyle)("z-index:" + _ctx.zIndex)
|
|
44
44
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "default"), _ctx.$slots.fab ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_button, (0, _vue.mergeProps)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --bottom-navigation-height: 50px; --bottom-navigation-z-index: 1; --bottom-navigation-background-color: #fff; --bottom-navigation-border-color: #e3e3e3; --bottom-navigation-fab-offset: 4px;}.var-bottom-navigation { width: 100%; height: var(--bottom-navigation-height); display: flex; position: relative; background-color: var(--bottom-navigation-background-color); transition: background-color 250ms, border-color 250ms; -webkit-tap-highlight-color: transparent;}.var-bottom-navigation--fixed { position: fixed; left: 0; bottom: 0;}.var-bottom-navigation--border { border-top: 1px solid var(--bottom-navigation-border-color);}.var-bottom-navigation__fab[var-bottom-navigation__fab] { width: var(--bottom-navigation-height); height: var(--bottom-navigation-height); position: absolute; z-index: 2; transform: translateY(-50%); overflow: hidden; transition: right 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.var-bottom-navigation--fab-center { right: calc(50% - var(--bottom-navigation-height) / 2);}.var-bottom-navigation--fab-right { right: var(--bottom-navigation-fab-offset);}
|
|
1
|
+
:root { --bottom-navigation-height: 50px; --bottom-navigation-z-index: 1; --bottom-navigation-background-color: #fff; --bottom-navigation-border-color: #e3e3e3; --bottom-navigation-fab-offset: 4px;}.var-bottom-navigation { width: 100%; height: var(--bottom-navigation-height); display: flex; position: relative; background-color: var(--bottom-navigation-background-color); transition: background-color 250ms, border-color 250ms; -webkit-tap-highlight-color: transparent;}.var-bottom-navigation--safe-area { padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);}.var-bottom-navigation--fixed { position: fixed; left: 0; bottom: 0;}.var-bottom-navigation--border { border-top: 1px solid var(--bottom-navigation-border-color);}.var-bottom-navigation__fab[var-bottom-navigation__fab] { width: var(--bottom-navigation-height); height: var(--bottom-navigation-height); position: absolute; z-index: 2; transform: translateY(-50%); overflow: hidden; transition: right 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;}.var-bottom-navigation--fab-center { right: calc(50% - var(--bottom-navigation-height) / 2);}.var-bottom-navigation--fab-right { right: var(--bottom-navigation-fab-offset);}
|
|
@@ -21,6 +21,11 @@
|
|
|
21
21
|
transition: background-color 250ms, border-color 250ms;
|
|
22
22
|
-webkit-tap-highlight-color: transparent;
|
|
23
23
|
|
|
24
|
+
&--safe-area {
|
|
25
|
+
padding-bottom: constant(safe-area-inset-bottom); // iOS < 11.2
|
|
26
|
+
padding-bottom: env(safe-area-inset-bottom); // iOS >= 11.2
|
|
27
|
+
}
|
|
28
|
+
|
|
24
29
|
&--fixed {
|
|
25
30
|
position: fixed;
|
|
26
31
|
left: 0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
require('../../styles/common.css')
|
|
2
|
-
require('../SnackbarSfc.css')
|
|
3
2
|
require('../../styles/elevation.css')
|
|
4
3
|
require('../../loading/loading.css')
|
|
5
4
|
require('../../button/button.css')
|
|
6
5
|
require('../../icon/icon.css')
|
|
7
6
|
require('../snackbar.css')
|
|
8
7
|
require('../coreSfc.css')
|
|
8
|
+
require('../SnackbarSfc.css')
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
require('../../styles/common.less')
|
|
2
|
-
require('../SnackbarSfc.less')
|
|
3
2
|
require('../../styles/elevation.less')
|
|
4
3
|
require('../../loading/loading.less')
|
|
5
4
|
require('../../button/button.less')
|
|
6
5
|
require('../../icon/icon.less')
|
|
7
6
|
require('../snackbar.less')
|
|
8
7
|
require('../coreSfc.less')
|
|
8
|
+
require('../SnackbarSfc.less')
|