@varlet/ui 1.27.0 → 1.27.3

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.
@@ -24,7 +24,7 @@ export function render(_ctx, _cache) {
24
24
  var _component_var_button = _resolveComponent("var-button");
25
25
 
26
26
  return _openBlock(), _createElementBlock("div", {
27
- class: _normalizeClass(_ctx.classes(_ctx.n(), [_ctx.fixed, _ctx.n('--fixed')], [_ctx.border, _ctx.n('--border')])),
27
+ class: _normalizeClass(_ctx.classes(_ctx.n(), [_ctx.fixed, _ctx.n('--fixed')], [_ctx.border, _ctx.n('--border')], [_ctx.safeArea, _ctx.n('--safe-area')])),
28
28
  ref: "bottomNavigationDom",
29
29
  style: _normalizeStyle("z-index:" + _ctx.zIndex)
30
30
  }, [_renderSlot(_ctx.$slots, "default"), _ctx.$slots.fab ? (_openBlock(), _createBlock(_component_var_button, _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;
@@ -11,6 +11,10 @@ export var props = {
11
11
  type: Boolean,
12
12
  default: false
13
13
  },
14
+ safeArea: {
15
+ type: Boolean,
16
+ default: false
17
+ },
14
18
  zIndex: {
15
19
  type: [Number, String],
16
20
  default: 1