zartui 3.2.2 → 3.2.4
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/action-sheet/ActionSheet.d.ts +1 -1
- package/es/action-sheet/ActionSheet.mjs +2 -3
- package/es/action-sheet/index.css +1 -1
- package/es/dialog/Dialog.d.ts +6 -6
- package/es/dialog/Dialog.mjs +4 -4
- package/es/dialog/index.d.ts +4 -4
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/switch/Switch.mjs +5 -1
- package/es/switch/index.css +1 -1
- package/es/tabs/Tabs.mjs +6 -2
- package/es/tabs/index.css +1 -1
- package/lib/action-sheet/ActionSheet.d.ts +1 -1
- package/lib/action-sheet/ActionSheet.js +2 -3
- package/lib/action-sheet/index.css +1 -1
- package/lib/dialog/Dialog.d.ts +6 -6
- package/lib/dialog/Dialog.js +4 -4
- package/lib/dialog/index.d.ts +4 -4
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/switch/Switch.js +5 -1
- package/lib/switch/index.css +1 -1
- package/lib/tabs/Tabs.js +6 -2
- package/lib/tabs/index.css +1 -1
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +18 -11
- package/lib/zartui.es.js +18 -11
- package/lib/zartui.js +18 -11
- package/lib/zartui.min.js +1 -1
- package/package.json +5 -5
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -182,7 +182,7 @@ __reExport(stdin_exports, require("./timeline"), module.exports);
|
|
|
182
182
|
__reExport(stdin_exports, require("./toast"), module.exports);
|
|
183
183
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
|
184
184
|
__reExport(stdin_exports, require("./video"), module.exports);
|
|
185
|
-
const version = "3.2.
|
|
185
|
+
const version = "3.2.4";
|
|
186
186
|
function install(app) {
|
|
187
187
|
const components = [
|
|
188
188
|
import_action_sheet.ActionSheet,
|
package/lib/switch/Switch.js
CHANGED
|
@@ -84,6 +84,9 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
84
84
|
fontSize: (0, import_utils.addUnit)(size),
|
|
85
85
|
backgroundColor: checked ? activeColor : inactiveColor
|
|
86
86
|
};
|
|
87
|
+
const nodeStyle = {
|
|
88
|
+
fontSize: (0, import_utils.addUnit)(size)
|
|
89
|
+
};
|
|
87
90
|
return (0, import_vue.createVNode)("div", {
|
|
88
91
|
"role": "switch",
|
|
89
92
|
"class": bem({
|
|
@@ -96,7 +99,8 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
96
99
|
"aria-checked": checked,
|
|
97
100
|
"onClick": onClick
|
|
98
101
|
}, [(0, import_vue.createVNode)("div", {
|
|
99
|
-
"class": bem("node")
|
|
102
|
+
"class": bem("node"),
|
|
103
|
+
"style": nodeStyle
|
|
100
104
|
}, [renderLoading()]), (_a = slots.background) == null ? void 0 : _a.call(slots)]);
|
|
101
105
|
};
|
|
102
106
|
}
|
package/lib/switch/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-switch-font-size: 28px;--zt-switch-width:calc(1.5em + 12px);--zt-switch-height: 1em;--zt-switch-shadow: inset 2px 2px 4px 1px rgba(0, 0, 0, .15);--zt-switch-node-size:
|
|
1
|
+
:root{--zt-switch-font-size: 28px;--zt-switch-width:calc(1.5em + 12px);--zt-switch-height: 1em;--zt-switch-shadow: inset 2px 2px 4px 1px rgba(0, 0, 0, .15);--zt-switch-node-size:calc(1em - 8px);--zt-switch-node-background: var(--zt-gray-00);--zt-switch-node-on-background: var(--zt-gray-00);--zt-switch-node-border: 1px solid #ffffff99;--zt-switch-node-on-border: var(--zt-switch-node-border);--zt-switch-node-shadow: 0px 0px 4px 2px rgba(0, 0, 0, .15);--zt-switch-node-on-shadow: -2px 2px 4px 0 rgba(45, 75, 115, .4);--zt-switch-background: var(--zt-gray-40);--zt-switch-on-background: var(--zt-primary-color);--zt-switch-duration: var(--zt-duration-base);--zt-switch-disabled-opacity: var(--zt-disabled-opacity)}:root[zt-theme-size=large]{--zt-switch-font-size: 34px}.zt-switch{position:relative;display:inline-block;box-sizing:content-box;width:var(--zt-switch-width);height:var(--zt-switch-height);font-size:var(--zt-switch-font-size);background:var(--zt-switch-background);border-radius:var(--zt-switch-node-size);cursor:pointer;transition:background-color var(--zt-switch-duration)}.zt-switch__node{position:absolute;top:4px;left:4px;width:var(--zt-switch-node-size);height:var(--zt-switch-node-size);font-size:inherit;background:var(--zt-switch-node-background);border-radius:100%;transition:transform var(--zt-switch-duration) cubic-bezier(.3,1.05,.4,1.05)}.zt-switch__loading{top:25%;left:25%;width:50%;height:50%;line-height:1}.zt-switch--on{background:var(--zt-switch-on-background)}.zt-switch--on .zt-switch__node{left:-2px;background:var(--zt-switch-node-on-background);transform:translate(calc(var(--zt-switch-width) - var(--zt-switch-node-size) - 4px))}.zt-switch--on .zt-switch__loading{color:var(--zt-switch-on-background)}.zt-switch--disabled{cursor:not-allowed;opacity:var(--zt-switch-disabled-opacity)}.zt-switch--loading{cursor:default}.zt-theme-dark{--zt-switch-shadow: inset 4px 4px 8px 0 #0f1923;--zt-switch-background: #202d39;--zt-switch-on-shadow: inset 2px 2px 4px 0 #2d4b7366;--zt-switch-node-background: linear-gradient(135deg, #0e1824 0%, #24364b 100%);--zt-switch-node-on-background: linear-gradient(135deg, #dce1eb 0%, #ffffff 100%);--zt-switch-node-border: 1px solid rgba(255, 255, 255, .08);--zt-switch-node-on-border: 1px solid rgba(255, 255, 255, .6);--zt-switch-node-shadow: 0 0 5px 0 rgba(0, 12, 24, .8)}
|
package/lib/tabs/Tabs.js
CHANGED
|
@@ -145,6 +145,12 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
145
145
|
}
|
|
146
146
|
return 0;
|
|
147
147
|
});
|
|
148
|
+
(0, import_vue.watch)(() => titleRefs.value, () => {
|
|
149
|
+
if (navRef.value && scrollable.value) {
|
|
150
|
+
state.showLeftOverlay = Math.floor(navRef.value.scrollLeft) > 0;
|
|
151
|
+
state.showRightOverlay = hasScrollToEnd(navRef.value);
|
|
152
|
+
}
|
|
153
|
+
});
|
|
148
154
|
const scrollIntoView = (immediate) => {
|
|
149
155
|
const nav = navRef.value;
|
|
150
156
|
const titles = titleRefs.value;
|
|
@@ -321,7 +327,6 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
321
327
|
"class": bem("indicator-left")
|
|
322
328
|
}, [(0, import_vue.createVNode)(import_icon.Icon, {
|
|
323
329
|
"name": "back",
|
|
324
|
-
"size": "16",
|
|
325
330
|
"class": bem("icon-indicator-left")
|
|
326
331
|
}, null)]);
|
|
327
332
|
}
|
|
@@ -333,7 +338,6 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
333
338
|
"class": bem("indicator-right")
|
|
334
339
|
}, [(0, import_vue.createVNode)(import_icon.Icon, {
|
|
335
340
|
"name": "arrow-right",
|
|
336
|
-
"size": "16",
|
|
337
341
|
"class": bem("icon-indicator-right")
|
|
338
342
|
}, null)]);
|
|
339
343
|
}
|
package/lib/tabs/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-tab-active-text-color: var(--zt-text-color);--zt-tab-disabled-text-color: var(--zt-text-color-3);--zt-tab-active-opacity: .2;--zt-tabs-default-color: var(--zt-primary-color);--zt-tabs-line-height: 44px;--zt-tabs-line-bottom: 16px;--zt-tabs-card-height: 32px;--zt-tabs-bottom-bar-width: 12px;--zt-tabs-bottom-bar-height: 2px;--zt-tabs-bottom-bar-color: var(--zt-primary-color);--zt-tabs-bottom-bar-radius: 2px;--zt-tabs-nav-background: var(--zt-background);--zt-tab-text-color: var(--zt-gray-40);--zt-tabs-overlay-left-background: linear-gradient(90deg, #ffffff 0%, rgba(245, 250, 255, 0) 100%);--zt-tabs-overlay-right-background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%)}.zt-tab{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 var(--zt-padding-md);color:var(--zt-tab-text-color);font-size:var(--zt-font-size-lg);line-height:var(--zt-line-height-md);cursor:pointer}.zt-tab--active{color:var(--zt-tab-active-text-color);font-weight:var(--zt-font-bold)}.zt-tab--active:active{opacity:var(--zt-tab-active-opacity)}.zt-tab--disabled{color:var(--zt-tab-disabled-text-color);cursor:not-allowed;font-size:var(--zt-font-size-md)}.zt-tab--grow{flex:1 0 auto;padding:0 var(--zt-padding-sm)}.zt-tab--shrink{flex:none;padding:0 var(--zt-padding-xs)}.zt-tab--card{color:var(--zt-tabs-default-color)}.zt-tab--card.zt-tab--active{color:var(--zt-white);background-color:var(--zt-tabs-default-color)}.zt-tab--card--disabled{color:var(--zt-tab-disabled-text-color)}.zt-tab__title{flex:1;display:flex;align-items:center;justify-content:center}.zt-tab__text--ellipsis{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.zt-tab__text-wrapper,.zt-tabs{position:relative}.zt-tabs__wrap{overflow:hidden;position:relative}.zt-tabs__wrap--page-top{position:fixed}.zt-tabs__wrap--content-bottom{top:auto;bottom:0}.zt-tabs__overlay-left,.zt-tabs__overlay-right{position:absolute;top:0;width:var(--zt-tabs-line-height);height:var(--zt-tabs-line-height);pointer-events:none}.zt-tabs__overlay-left{left:0;background:var(--zt-tabs-overlay-left-background)}.zt-tabs__overlay-right{right:0;background:var(--zt-tabs-overlay-right-background)}.zt-tabs__indicator-left{position:absolute;left:0;top:0;width:35px;height:44px;background:var(--zt-tabs-nav-background)}.zt-tabs__indicator-right{position:absolute;right:0;top:0;width:35px;height:44px;background:var(--zt-tabs-nav-background)}.zt-tabs__icon-indicator-left{position:absolute;top:12px;left:12px;color:var(--zt-gray-40)}.zt-tabs__icon-indicator-right{position:absolute;top:12px;right:12px;color:var(--zt-gray-40)}.zt-tabs__nav{position:relative;display:flex;justify-content:flex-start;background-color:var(--zt-tabs-nav-background);-webkit-user-select:none;-moz-user-select:none;user-select:none}.zt-tabs__nav--complete{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.zt-tabs__nav--complete::-webkit-scrollbar{display:none}.zt-tabs__nav--line{box-sizing:content-box;height:100%;padding-bottom:var(--zt-tabs-line-bottom)}.zt-tabs__nav--line.zt-tabs__nav--shrink .zt-tab,.zt-tabs__nav--line.zt-tabs__nav--complete .zt-tab{flex:1 0 auto;padding:0 var(--zt-padding-sm)}.zt-tabs__nav--line.zt-tabs__nav--shrink .zt-tabs__nav,.zt-tabs__nav--line.zt-tabs__nav--complete .zt-tabs__nav{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.zt-tabs__nav--line.zt-tabs__nav--shrink .zt-tabs__nav::-webkit-scrollbar,.zt-tabs__nav--line.zt-tabs__nav--complete .zt-tabs__nav::-webkit-scrollbar{display:none}.zt-tabs__nav--card.zt-tabs__nav--shrink{display:inline-flex}.zt-tabs__line{position:absolute;bottom:var(--zt-tabs-line-bottom);left:0;z-index:1;width:var(--zt-tabs-bottom-bar-width);height:var(--zt-tabs-bottom-bar-height);background:var(--zt-tabs-bottom-bar-color);border-radius:var(--zt-tabs-bottom-bar-radius)}.zt-tabs__track{position:relative;display:flex;width:100%;height:100%;will-change:left}.zt-tabs__content--animated{overflow:hidden}.zt-tabs--line .zt-tabs__wrap{height:var(--zt-tabs-line-height)}.zt-tabs--card>.zt-tabs__wrap{height:var(--zt-tabs-card-height);display:flex;justify-content:center}.zt-theme-dark{--zt-tabs-overlay-left-background: linear-gradient(90deg, #0f1923 0%, rgba(15, 25, 35, 0) 100%);--zt-tabs-overlay-right-background: linear-gradient(90deg, rgba(15, 25, 35, 0) 3%, #0f1923 100%)}
|
|
1
|
+
:root{--zt-tab-active-text-color: var(--zt-text-color);--zt-tab-disabled-text-color: var(--zt-text-color-3);--zt-tab-active-opacity: .2;--zt-tabs-default-color: var(--zt-primary-color);--zt-tabs-line-height: 44px;--zt-tabs-line-bottom: 16px;--zt-tabs-card-height: 32px;--zt-tabs-bottom-bar-width: 12px;--zt-tabs-bottom-bar-height: 2px;--zt-tabs-bottom-bar-color: var(--zt-primary-color);--zt-tabs-bottom-bar-radius: 2px;--zt-tabs-nav-background: var(--zt-background);--zt-tab-text-color: var(--zt-gray-40);--zt-tabs-overlay-left-background: linear-gradient(90deg, #ffffff 0%, rgba(245, 250, 255, 0) 100%);--zt-tabs-overlay-right-background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%)}.zt-tab{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 var(--zt-padding-md);color:var(--zt-tab-text-color);font-size:var(--zt-font-size-lg);line-height:var(--zt-line-height-md);cursor:pointer}.zt-tab--active{color:var(--zt-tab-active-text-color);font-weight:var(--zt-font-bold)}.zt-tab--active:active{opacity:var(--zt-tab-active-opacity)}.zt-tab--disabled{color:var(--zt-tab-disabled-text-color);cursor:not-allowed;font-size:var(--zt-font-size-md)}.zt-tab--grow{flex:1 0 auto;padding:0 var(--zt-padding-sm)}.zt-tab--shrink{flex:none;padding:0 var(--zt-padding-xs)}.zt-tab--card{color:var(--zt-tabs-default-color)}.zt-tab--card.zt-tab--active{color:var(--zt-white);background-color:var(--zt-tabs-default-color)}.zt-tab--card--disabled{color:var(--zt-tab-disabled-text-color)}.zt-tab__title{flex:1;display:flex;align-items:center;justify-content:center}.zt-tab__text--ellipsis{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.zt-tab__text-wrapper,.zt-tabs{position:relative}.zt-tabs__wrap{overflow:hidden;position:relative}.zt-tabs__wrap--page-top{position:fixed}.zt-tabs__wrap--content-bottom{top:auto;bottom:0}.zt-tabs__overlay-left,.zt-tabs__overlay-right{position:absolute;top:0;width:var(--zt-tabs-line-height);height:var(--zt-tabs-line-height);pointer-events:none}.zt-tabs__overlay-left{left:0;background:var(--zt-tabs-overlay-left-background)}.zt-tabs__overlay-right{right:0;background:var(--zt-tabs-overlay-right-background)}.zt-tabs__indicator-left{position:absolute;left:0;top:0;width:35px;height:44px;background:var(--zt-tabs-nav-background)}.zt-tabs__indicator-right{position:absolute;right:0;top:0;width:35px;height:44px;background:var(--zt-tabs-nav-background)}.zt-tabs__icon-indicator-left{position:absolute;top:12px;left:12px;color:var(--zt-gray-40);font-size:var(--zt-font-size-lg)}.zt-tabs__icon-indicator-right{position:absolute;top:12px;right:12px;color:var(--zt-gray-40);font-size:var(--zt-font-size-lg)}.zt-tabs__nav{position:relative;display:flex;justify-content:flex-start;background-color:var(--zt-tabs-nav-background);-webkit-user-select:none;-moz-user-select:none;user-select:none}.zt-tabs__nav--complete{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.zt-tabs__nav--complete::-webkit-scrollbar{display:none}.zt-tabs__nav--line{box-sizing:content-box;height:100%;padding-bottom:var(--zt-tabs-line-bottom)}.zt-tabs__nav--line.zt-tabs__nav--shrink .zt-tab,.zt-tabs__nav--line.zt-tabs__nav--complete .zt-tab{flex:1 0 auto;padding:0 var(--zt-padding-sm)}.zt-tabs__nav--line.zt-tabs__nav--shrink .zt-tabs__nav,.zt-tabs__nav--line.zt-tabs__nav--complete .zt-tabs__nav{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.zt-tabs__nav--line.zt-tabs__nav--shrink .zt-tabs__nav::-webkit-scrollbar,.zt-tabs__nav--line.zt-tabs__nav--complete .zt-tabs__nav::-webkit-scrollbar{display:none}.zt-tabs__nav--card.zt-tabs__nav--shrink{display:inline-flex}.zt-tabs__line{position:absolute;bottom:var(--zt-tabs-line-bottom);left:0;z-index:1;width:var(--zt-tabs-bottom-bar-width);height:var(--zt-tabs-bottom-bar-height);background:var(--zt-tabs-bottom-bar-color);border-radius:var(--zt-tabs-bottom-bar-radius)}.zt-tabs__track{position:relative;display:flex;width:100%;height:100%;will-change:left}.zt-tabs__content--animated{overflow:hidden}.zt-tabs--line .zt-tabs__wrap{height:var(--zt-tabs-line-height)}.zt-tabs--card>.zt-tabs__wrap{height:var(--zt-tabs-card-height);display:flex;justify-content:center}.zt-theme-dark{--zt-tabs-overlay-left-background: linear-gradient(90deg, #0f1923 0%, rgba(15, 25, 35, 0) 100%);--zt-tabs-overlay-right-background: linear-gradient(90deg, rgba(15, 25, 35, 0) 3%, #0f1923 100%)}
|