@geektech/geek-ui
Advanced tools
Comparing version 0.3.1 to 0.4.1
@@ -1,2 +0,2 @@ | ||
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, renderSlot, onMounted, ref, createBlock, createCommentVNode, watch, toRefs, Teleport, withDirectives, createElementVNode, createVNode, Transition, withCtx, vShow, createTextVNode, toDisplayString, Fragment, renderList, vModelText, normalizeStyle, reactive, provide, watchEffect, onBeforeUnmount, inject, getCurrentInstance, useSlots } from "vue"; | ||
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, renderSlot, onMounted, ref, createBlock, createCommentVNode, watch, toRefs, Teleport, unref, withDirectives, createElementVNode, createVNode, Transition, withCtx, vShow, createTextVNode, toDisplayString, Fragment, renderList, vModelText, normalizeStyle, reactive, provide, watchEffect, onBeforeUnmount, inject, getCurrentInstance, useSlots } from "vue"; | ||
const colProps = { | ||
@@ -36,2 +36,3 @@ span: { | ||
} | ||
const COMPONENT$j = "g-col"; | ||
const _sfc_main$j = /* @__PURE__ */ defineComponent({ | ||
@@ -42,8 +43,7 @@ __name: "col", | ||
const props = __props; | ||
const COMPONENT = "g-col"; | ||
const classes = computed(() => { | ||
const { span, offset, xs, sm, md, lg, xl, xxl } = props; | ||
const result = { | ||
[`${COMPONENT}-${span}`]: !xs && !sm && !md && !lg && !xl && !xxl, | ||
[`${COMPONENT}-offset-${offset}`]: offset && offset > 0 | ||
[`${COMPONENT$j}-${span}`]: !xs && !sm && !md && !lg && !xl && !xxl, | ||
[`${COMPONENT$j}-offset-${offset}`]: offset && offset > 0 | ||
}; | ||
@@ -54,3 +54,3 @@ const screenList = { xs, sm, md, lg, xl, xxl }; | ||
if (screenValue && isNumber(screenValue)) { | ||
result[`${COMPONENT}-${screen}-${screenValue}`] = true; | ||
result[`${COMPONENT$j}-${screen}-${screenValue}`] = true; | ||
} | ||
@@ -62,3 +62,3 @@ }); | ||
return openBlock(), createElementBlock("div", { | ||
class: normalizeClass([COMPONENT, unref(classes)]) | ||
class: normalizeClass([COMPONENT$j, classes.value]) | ||
}, [ | ||
@@ -75,6 +75,6 @@ renderSlot(_ctx.$slots, "default") | ||
}; | ||
const COMPONENT$i = "g-row"; | ||
const _sfc_main$i = /* @__PURE__ */ defineComponent({ | ||
__name: "row", | ||
setup(__props) { | ||
const COMPONENT = "g-row"; | ||
onMounted(() => { | ||
@@ -84,3 +84,3 @@ }); | ||
return openBlock(), createElementBlock("div", { | ||
class: normalizeClass(COMPONENT) | ||
class: normalizeClass(COMPONENT$i) | ||
}, [ | ||
@@ -98,14 +98,14 @@ renderSlot(_ctx.$slots, "default") | ||
const _hoisted_1$7 = ["disabled"]; | ||
const COMPONENT$h = "g-button"; | ||
const _sfc_main$h = /* @__PURE__ */ defineComponent({ | ||
__name: "button", | ||
props: { | ||
type: null, | ||
type: {}, | ||
disabled: { type: Boolean } | ||
}, | ||
setup(__props) { | ||
const COMPONENT = "g-button"; | ||
return (_ctx, _cache) => { | ||
return openBlock(), createElementBlock("button", { | ||
class: normalizeClass([COMPONENT, `${COMPONENT}-${__props.type || (__props.disabled ? "disabled" : "normal")}`]), | ||
disabled: __props.disabled | ||
class: normalizeClass([COMPONENT$h, `${COMPONENT$h}-${_ctx.type || (_ctx.disabled ? "disabled" : "normal")}`]), | ||
disabled: _ctx.disabled | ||
}, [ | ||
@@ -126,2 +126,3 @@ renderSlot(_ctx.$slots, "default") | ||
const _hoisted_4$1 = { key: 3 }; | ||
const COMPONENT$g = "g-text"; | ||
const _sfc_main$g = /* @__PURE__ */ defineComponent({ | ||
@@ -137,14 +138,13 @@ __name: "text", | ||
setup(__props) { | ||
const COMPONENT = "g-text"; | ||
return (_ctx, _cache) => { | ||
return openBlock(), createElementBlock("span", { | ||
class: normalizeClass([COMPONENT, __props.disabled ? `${COMPONENT}-disabled` : ""]) | ||
class: normalizeClass([COMPONENT$g, _ctx.disabled ? `${COMPONENT$g}-disabled` : ""]) | ||
}, [ | ||
__props.code ? (openBlock(), createElementBlock("code", _hoisted_1$6, [ | ||
_ctx.code ? (openBlock(), createElementBlock("code", _hoisted_1$6, [ | ||
renderSlot(_ctx.$slots, "default") | ||
])) : __props.underline ? (openBlock(), createElementBlock("u", _hoisted_2$4, [ | ||
])) : _ctx.underline ? (openBlock(), createElementBlock("u", _hoisted_2$4, [ | ||
renderSlot(_ctx.$slots, "default") | ||
])) : __props.del ? (openBlock(), createElementBlock("del", _hoisted_3$3, [ | ||
])) : _ctx.del ? (openBlock(), createElementBlock("del", _hoisted_3$3, [ | ||
renderSlot(_ctx.$slots, "default") | ||
])) : __props.strong ? (openBlock(), createElementBlock("strong", _hoisted_4$1, [ | ||
])) : _ctx.strong ? (openBlock(), createElementBlock("strong", _hoisted_4$1, [ | ||
renderSlot(_ctx.$slots, "default") | ||
@@ -161,12 +161,12 @@ ])) : renderSlot(_ctx.$slots, "default", { key: 4 }) | ||
}; | ||
const COMPONENT$f = "g-icon"; | ||
const _sfc_main$f = /* @__PURE__ */ defineComponent({ | ||
__name: "icon", | ||
props: { | ||
name: null | ||
name: {} | ||
}, | ||
setup(__props) { | ||
const COMPONENT = "g-icon"; | ||
return (_ctx, _cache) => { | ||
return openBlock(), createElementBlock("i", { | ||
class: normalizeClass([COMPONENT, `${COMPONENT}-${__props.name}`]) | ||
class: normalizeClass([COMPONENT$f, `${COMPONENT$f}-${_ctx.name}`]) | ||
}, null, 2); | ||
@@ -182,2 +182,3 @@ }; | ||
const _hoisted_1$5 = ["disabled"]; | ||
const COMPONENT$e = "g-tag"; | ||
const _sfc_main$e = /* @__PURE__ */ defineComponent({ | ||
@@ -192,3 +193,2 @@ __name: "tag", | ||
setup(__props, { emit }) { | ||
const COMPONENT = "g-tag"; | ||
const visible = ref(true); | ||
@@ -202,7 +202,7 @@ const handleClose = (ev) => { | ||
key: 0, | ||
class: normalizeClass(COMPONENT), | ||
disabled: __props.disabled | ||
class: normalizeClass(COMPONENT$e), | ||
disabled: _ctx.disabled | ||
}, [ | ||
renderSlot(_ctx.$slots, "default"), | ||
__props.closable ? (openBlock(), createBlock(_sfc_main$f, { | ||
_ctx.closable ? (openBlock(), createBlock(_sfc_main$f, { | ||
key: 0, | ||
@@ -318,2 +318,3 @@ name: "close", | ||
}; | ||
const COMPONENT$d = "g-modal"; | ||
const _sfc_main$d = /* @__PURE__ */ defineComponent({ | ||
@@ -325,3 +326,2 @@ __name: "modal", | ||
const props = __props; | ||
const COMPONENT = "g-modal"; | ||
const { popupContainer } = toRefs(props); | ||
@@ -352,3 +352,3 @@ const _visible = ref(props.defaultVisible); | ||
withDirectives(createElementVNode("div", { | ||
class: normalizeClass(`${COMPONENT}-container`) | ||
class: normalizeClass(`${COMPONENT$d}-container`) | ||
}, [ | ||
@@ -363,5 +363,5 @@ createVNode(Transition, { | ||
ref: "maskRef", | ||
class: normalizeClass(`${COMPONENT}-mask`) | ||
class: normalizeClass(`${COMPONENT$d}-mask`) | ||
}, null, 2)), [ | ||
[vShow, unref(computedVisible)] | ||
[vShow, computedVisible.value] | ||
]) : createCommentVNode("", true) | ||
@@ -377,11 +377,11 @@ ]), | ||
withDirectives(createElementVNode("div", { | ||
class: normalizeClass(`${COMPONENT}-wrapper`) | ||
class: normalizeClass(`${COMPONENT$d}-wrapper`) | ||
}, [ | ||
_ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("div", { | ||
key: 0, | ||
class: normalizeClass(`${COMPONENT}-header`) | ||
class: normalizeClass(`${COMPONENT$d}-header`) | ||
}, [ | ||
_ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("div", { | ||
key: 0, | ||
class: normalizeClass(`${COMPONENT}-title`) | ||
class: normalizeClass(`${COMPONENT$d}-title`) | ||
}, [ | ||
@@ -394,3 +394,3 @@ renderSlot(_ctx.$slots, "title", {}, () => [ | ||
key: 1, | ||
class: normalizeClass(`${COMPONENT}-close-button`), | ||
class: normalizeClass(`${COMPONENT$d}-close-button`), | ||
onClick: handleCancel | ||
@@ -402,3 +402,3 @@ }, [ | ||
createElementVNode("div", { | ||
class: normalizeClass(`${COMPONENT}-content`) | ||
class: normalizeClass(`${COMPONENT$d}-content`) | ||
}, [ | ||
@@ -408,3 +408,3 @@ renderSlot(_ctx.$slots, "default") | ||
createElementVNode("div", { | ||
class: normalizeClass(`${COMPONENT}-footer`) | ||
class: normalizeClass(`${COMPONENT$d}-footer`) | ||
}, [ | ||
@@ -433,3 +433,3 @@ renderSlot(_ctx.$slots, "footer", {}, () => [ | ||
], 2), [ | ||
[vShow, unref(computedVisible)] | ||
[vShow, computedVisible.value] | ||
]) | ||
@@ -440,3 +440,3 @@ ]), | ||
], 2), [ | ||
[vShow, unref(computedVisible)] | ||
[vShow, computedVisible.value] | ||
]) | ||
@@ -482,2 +482,3 @@ ], 8, ["to"]); | ||
const _hoisted_6 = /* @__PURE__ */ createElementVNode("span", { class: "desc" }, "\u9875", -1); | ||
const COMPONENT$c = "g-pagination"; | ||
const _sfc_main$c = /* @__PURE__ */ defineComponent({ | ||
@@ -489,3 +490,2 @@ __name: "pagination", | ||
const props = __props; | ||
const COMPONENT = "g-pagination"; | ||
const currentPage = ref(props.current); | ||
@@ -561,5 +561,5 @@ const pageLength = computed(() => { | ||
return (_ctx, _cache) => { | ||
return unref(pageLength) > 1 ? (openBlock(), createElementBlock("div", { | ||
return pageLength.value > 1 ? (openBlock(), createElementBlock("div", { | ||
key: 0, | ||
class: normalizeClass(COMPONENT) | ||
class: normalizeClass(COMPONENT$c) | ||
}, [ | ||
@@ -573,3 +573,3 @@ createElementVNode("div", _hoisted_1$4, [ | ||
], 2), | ||
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(pagers), (item, index2) => { | ||
(openBlock(true), createElementBlock(Fragment, null, renderList(pagers.value, (item, index2) => { | ||
return openBlock(), createElementBlock(Fragment, { | ||
@@ -590,3 +590,3 @@ key: item.page | ||
createElementVNode("div", { | ||
class: normalizeClass(["page-item page-item--next", { "page-item--disabled": currentPage.value == unref(pageLength) }]), | ||
class: normalizeClass(["page-item page-item--next", { "page-item--disabled": currentPage.value == pageLength.value }]), | ||
onClick: _cache[1] || (_cache[1] = ($event) => next()) | ||
@@ -629,10 +629,10 @@ }, [ | ||
}; | ||
const COMPONENT$b = "g-scrollbar-box"; | ||
const _sfc_main$b = /* @__PURE__ */ defineComponent({ | ||
__name: "scrollbar-box", | ||
props: { | ||
height: null, | ||
width: null | ||
height: {}, | ||
width: {} | ||
}, | ||
setup(__props) { | ||
const COMPONENT = "g-scrollbar-box"; | ||
onMounted(() => { | ||
@@ -642,6 +642,6 @@ }); | ||
return openBlock(), createElementBlock("div", { | ||
class: normalizeClass(COMPONENT), | ||
class: normalizeClass(COMPONENT$b), | ||
style: normalizeStyle({ | ||
height: __props.height ? `${__props.height}px` : "", | ||
width: __props.width ? `${__props.width}px` : "" | ||
height: _ctx.height ? `${_ctx.height}px` : "", | ||
width: _ctx.width ? `${_ctx.width}px` : "" | ||
}) | ||
@@ -682,2 +682,3 @@ }, [ | ||
})(IndicatorPosition || {}); | ||
const COMPONENT$a = "g-carousel-arrow"; | ||
const _sfc_main$a = /* @__PURE__ */ defineComponent({ | ||
@@ -692,3 +693,2 @@ __name: "carousel-arrow", | ||
const props = __props; | ||
const COMPONENT = "g-carousel-arrow"; | ||
const previousIconName = computed(() => props.direction === Direction.Horizontal ? "left" : "top"); | ||
@@ -704,3 +704,3 @@ const nextIconName = computed(() => props.direction === Direction.Horizontal ? "right" : "bottom"); | ||
return { | ||
[`${COMPONENT}-hover`]: props.arrowInMode === ArrowInMode.Hover | ||
[`${COMPONENT$a}-hover`]: props.arrowInMode === ArrowInMode.Hover | ||
}; | ||
@@ -711,9 +711,9 @@ }); | ||
createVNode(unref(_sfc_main$f), { | ||
class: normalizeClass([COMPONENT, unref(cls)]), | ||
name: unref(previousIconName), | ||
class: normalizeClass([COMPONENT$a, cls.value]), | ||
name: previousIconName.value, | ||
onClick: onPreviousClick | ||
}, null, 8, ["class", "name"]), | ||
createVNode(unref(_sfc_main$f), { | ||
class: normalizeClass([COMPONENT, unref(cls)]), | ||
name: unref(nextIconName), | ||
class: normalizeClass([COMPONENT$a, cls.value]), | ||
name: nextIconName.value, | ||
onClick: onNextClick | ||
@@ -727,2 +727,3 @@ }, null, 8, ["class", "name"]) | ||
const _hoisted_1$3 = ["onClick"]; | ||
const COMPONENT$9 = "g-carousel-indicator"; | ||
const _sfc_main$9 = /* @__PURE__ */ defineComponent({ | ||
@@ -738,3 +739,2 @@ __name: "carousel-indicator", | ||
const props = __props; | ||
const COMPONENT = "g-carousel-indicator"; | ||
const onSelect = (index2) => { | ||
@@ -747,11 +747,11 @@ if (index2 !== props.activeIndex) { | ||
return openBlock(), createElementBlock("div", { | ||
class: normalizeClass([COMPONENT, `${COMPONENT}-${props.position}`]) | ||
class: normalizeClass([COMPONENT$9, `${COMPONENT$9}-${props.position}`]) | ||
}, [ | ||
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.count, (n, index2) => { | ||
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.count, (n, index2) => { | ||
return openBlock(), createElementBlock("span", { | ||
key: index2, | ||
class: normalizeClass([ | ||
`${COMPONENT}-item`, | ||
`${COMPONENT$9}-item`, | ||
{ | ||
[`${COMPONENT}-item-active`]: index2 === __props.activeIndex | ||
[`${COMPONENT$9}-item-active`]: index2 === _ctx.activeIndex | ||
} | ||
@@ -768,2 +768,3 @@ ]), | ||
const carouselInjectionKey = Symbol("carousel"); | ||
const COMPONENT$8 = "g-carousel"; | ||
const _sfc_main$8 = /* @__PURE__ */ defineComponent({ | ||
@@ -787,3 +788,2 @@ __name: "carousel", | ||
const props = __props; | ||
const COMPONENT = "g-carousel"; | ||
const carousel = ref(); | ||
@@ -899,3 +899,3 @@ const components2 = ref([]); | ||
ref: carousel, | ||
class: normalizeClass(COMPONENT), | ||
class: normalizeClass(COMPONENT$8), | ||
onMouseenter: onStop, | ||
@@ -906,3 +906,3 @@ onMouseleave: onStart | ||
ref: "carouselWrap", | ||
class: normalizeClass([`${COMPONENT}-slide`, `${COMPONENT}-${__props.direction}`, `${COMPONENT}-${slideDirection.value}`]), | ||
class: normalizeClass([`${COMPONENT$8}-slide`, `${COMPONENT$8}-${_ctx.direction}`, `${COMPONENT$8}-${slideDirection.value}`]), | ||
onMouseenter: onStop, | ||
@@ -913,14 +913,14 @@ onMouseleave: onStart | ||
], 34), | ||
unref(hasArrow) ? (openBlock(), createBlock(_sfc_main$a, { | ||
hasArrow.value ? (openBlock(), createBlock(_sfc_main$a, { | ||
key: 0, | ||
direction: __props.direction, | ||
"arrow-in-mode": __props.arrowInMode, | ||
direction: _ctx.direction, | ||
"arrow-in-mode": _ctx.arrowInMode, | ||
onPreviousClick, | ||
onNextClick | ||
}, null, 8, ["direction", "arrow-in-mode"])) : createCommentVNode("", true), | ||
unref(hasIndicator) ? (openBlock(), createBlock(_sfc_main$9, { | ||
hasIndicator.value ? (openBlock(), createBlock(_sfc_main$9, { | ||
key: 1, | ||
count: unref(count), | ||
count: count.value, | ||
"active-index": currentIndex.value, | ||
position: __props.indicatorPosition, | ||
position: _ctx.indicatorPosition, | ||
onSelect | ||
@@ -933,6 +933,6 @@ }, null, 8, ["count", "active-index", "position"])) : createCommentVNode("", true) | ||
const carousel_vue_vue_type_style_index_0_lang = ""; | ||
const COMPONENT$7 = "g-carousel-item"; | ||
const _sfc_main$7 = /* @__PURE__ */ defineComponent({ | ||
__name: "carousel-item", | ||
setup(__props) { | ||
const COMPONENT = "g-carousel-item"; | ||
const context = inject(carouselInjectionKey, {}); | ||
@@ -948,7 +948,7 @@ const instance = getCurrentInstance(); | ||
return { | ||
[`${COMPONENT}-prev`]: index2.value === previousIndex, | ||
[`${COMPONENT}-next`]: index2.value === nextIndex, | ||
[`${COMPONENT}-current`]: isCurrent.value, | ||
[`${COMPONENT}-slide-in`]: animationName === AnimationName.Slide && isCurrent.value, | ||
[`${COMPONENT}-slide-out`]: animationName === AnimationName.Slide && index2.value === previousIndex | ||
[`${COMPONENT$7}-prev`]: index2.value === previousIndex, | ||
[`${COMPONENT$7}-next`]: index2.value === nextIndex, | ||
[`${COMPONENT$7}-current`]: isCurrent.value, | ||
[`${COMPONENT$7}-slide-in`]: animationName === AnimationName.Slide && isCurrent.value, | ||
[`${COMPONENT$7}-slide-out`]: animationName === AnimationName.Slide && index2.value === previousIndex | ||
}; | ||
@@ -975,4 +975,4 @@ }); | ||
return openBlock(), createElementBlock("div", { | ||
class: normalizeClass([COMPONENT, unref(carouselDynamicClass)]), | ||
style: normalizeStyle(unref(style)) | ||
class: normalizeClass([COMPONENT$7, carouselDynamicClass.value]), | ||
style: normalizeStyle(style.value) | ||
}, [ | ||
@@ -993,6 +993,6 @@ renderSlot(_ctx.$slots, "default") | ||
}; | ||
const COMPONENT$6 = "g-timeline"; | ||
const _sfc_main$6 = /* @__PURE__ */ defineComponent({ | ||
__name: "timeline", | ||
setup(__props) { | ||
const COMPONENT = "g-timeline"; | ||
onMounted(() => { | ||
@@ -1002,3 +1002,3 @@ }); | ||
return openBlock(), createElementBlock("div", { | ||
class: normalizeClass(COMPONENT) | ||
class: normalizeClass(COMPONENT$6) | ||
}, [ | ||
@@ -1014,40 +1014,40 @@ renderSlot(_ctx.$slots, "default") | ||
const _hoisted_3$1 = ["innerHTML"]; | ||
const COMPONENT$5 = "g-timeline-item"; | ||
const _sfc_main$5 = /* @__PURE__ */ defineComponent({ | ||
__name: "timeline-item", | ||
props: { | ||
title: null, | ||
time: null, | ||
content: null | ||
title: {}, | ||
time: {}, | ||
content: {} | ||
}, | ||
setup(__props) { | ||
const COMPONENT = "g-timeline-item"; | ||
return (_ctx, _cache) => { | ||
return openBlock(), createElementBlock("div", { | ||
class: normalizeClass(COMPONENT) | ||
class: normalizeClass(COMPONENT$5) | ||
}, [ | ||
createElementVNode("div", { | ||
class: normalizeClass(`${COMPONENT}-line-wrap`) | ||
class: normalizeClass(`${COMPONENT$5}-line-wrap`) | ||
}, [ | ||
createElementVNode("div", { | ||
class: normalizeClass(`${COMPONENT}-line-wrap-dot`) | ||
class: normalizeClass(`${COMPONENT$5}-line-wrap-dot`) | ||
}, null, 2), | ||
createElementVNode("div", { | ||
class: normalizeClass(`${COMPONENT}-line-wrap-line`) | ||
class: normalizeClass(`${COMPONENT$5}-line-wrap-line`) | ||
}, null, 2) | ||
], 2), | ||
createElementVNode("div", { | ||
class: normalizeClass(`${COMPONENT}-content-wrap`) | ||
class: normalizeClass(`${COMPONENT$5}-content-wrap`) | ||
}, [ | ||
createElementVNode("div", { | ||
class: normalizeClass(`${COMPONENT}-content-wrap-header`) | ||
class: normalizeClass(`${COMPONENT$5}-content-wrap-header`) | ||
}, [ | ||
createElementVNode("div", { | ||
class: normalizeClass(`${COMPONENT}-content-wrap-header-time`) | ||
class: normalizeClass(`${COMPONENT$5}-content-wrap-header-time`) | ||
}, [ | ||
useSlots().time ? renderSlot(_ctx.$slots, "time", { key: 0 }) : (openBlock(), createElementBlock("span", _hoisted_1$2, toDisplayString(__props.time), 1)) | ||
useSlots().time ? renderSlot(_ctx.$slots, "time", { key: 0 }) : (openBlock(), createElementBlock("span", _hoisted_1$2, toDisplayString(_ctx.time), 1)) | ||
], 2), | ||
createElementVNode("div", { | ||
class: normalizeClass(`${COMPONENT}-content-wrap-header-title`) | ||
class: normalizeClass(`${COMPONENT$5}-content-wrap-header-title`) | ||
}, [ | ||
useSlots().title ? renderSlot(_ctx.$slots, "title", { key: 0 }) : (openBlock(), createElementBlock("span", _hoisted_2$2, toDisplayString(__props.title), 1)) | ||
useSlots().title ? renderSlot(_ctx.$slots, "title", { key: 0 }) : (openBlock(), createElementBlock("span", _hoisted_2$2, toDisplayString(_ctx.title), 1)) | ||
], 2) | ||
@@ -1057,4 +1057,4 @@ ], 2), | ||
key: 1, | ||
class: normalizeClass(`${COMPONENT}-content-wrap-content`), | ||
innerHTML: __props.content | ||
class: normalizeClass(`${COMPONENT$5}-content-wrap-content`), | ||
innerHTML: _ctx.content | ||
}, null, 10, _hoisted_3$1)) | ||
@@ -1075,9 +1075,9 @@ ], 2) | ||
}; | ||
const COMPONENT$4 = "g-loading"; | ||
const _sfc_main$4 = /* @__PURE__ */ defineComponent({ | ||
__name: "loading", | ||
setup(__props) { | ||
const COMPONENT = "g-loading"; | ||
return (_ctx, _cache) => { | ||
return openBlock(), createBlock(unref(_sfc_main$f), { | ||
class: normalizeClass([COMPONENT]), | ||
class: normalizeClass([COMPONENT$4]), | ||
name: "loading" | ||
@@ -1111,2 +1111,3 @@ }, null, 8, ["class"]); | ||
}; | ||
const COMPONENT$3 = "g-progress-line"; | ||
const _sfc_main$3 = /* @__PURE__ */ defineComponent({ | ||
@@ -1117,12 +1118,11 @@ __name: "line", | ||
const props = __props; | ||
const COMPONENT = "g-progress-line"; | ||
return (_ctx, _cache) => { | ||
return openBlock(), createElementBlock("div", { | ||
class: normalizeClass(`${COMPONENT}-wrapper`) | ||
class: normalizeClass(`${COMPONENT$3}-wrapper`) | ||
}, [ | ||
createElementVNode("div", { | ||
class: normalizeClass(COMPONENT) | ||
class: normalizeClass(COMPONENT$3) | ||
}, [ | ||
createElementVNode("div", { | ||
class: normalizeClass(`${COMPONENT}-bar`), | ||
class: normalizeClass(`${COMPONENT$3}-bar`), | ||
style: normalizeStyle({ | ||
@@ -1162,2 +1162,3 @@ width: `${props.percent * 100}%`, | ||
const _hoisted_3 = ["cx", "cy", "r", "stroke-width"]; | ||
const COMPONENT$2 = "g-progress-circle"; | ||
const _sfc_main$2 = /* @__PURE__ */ defineComponent({ | ||
@@ -1168,3 +1169,2 @@ __name: "circle", | ||
const props = __props; | ||
const COMPONENT = "g-progress-circle"; | ||
const mergedWidth = computed(() => { | ||
@@ -1179,14 +1179,14 @@ var _a; | ||
return openBlock(), createElementBlock("div", { | ||
class: normalizeClass(`${COMPONENT}-wrapper`) | ||
class: normalizeClass(`${COMPONENT$2}-wrapper`) | ||
}, [ | ||
(openBlock(), createElementBlock("svg", { | ||
viewBox: `0 0 ${unref(mergedWidth)} ${unref(mergedWidth)}`, | ||
class: normalizeClass(`${COMPONENT}-svg`) | ||
viewBox: `0 0 ${mergedWidth.value} ${mergedWidth.value}`, | ||
class: normalizeClass(`${COMPONENT$2}-svg`) | ||
}, [ | ||
createElementVNode("circle", { | ||
class: normalizeClass(COMPONENT), | ||
class: normalizeClass(COMPONENT$2), | ||
fill: "none", | ||
cx: unref(center), | ||
cy: unref(center), | ||
r: unref(radius), | ||
cx: center.value, | ||
cy: center.value, | ||
r: radius.value, | ||
"stroke-width": props.strokeWidth, | ||
@@ -1198,12 +1198,12 @@ style: normalizeStyle({ | ||
createElementVNode("circle", { | ||
class: normalizeClass(`${COMPONENT}-bar`), | ||
class: normalizeClass(`${COMPONENT$2}-bar`), | ||
fill: "none", | ||
cx: unref(center), | ||
cy: unref(center), | ||
r: unref(radius), | ||
cx: center.value, | ||
cy: center.value, | ||
r: radius.value, | ||
"stroke-width": props.strokeWidth, | ||
style: normalizeStyle({ | ||
stroke: props.color, | ||
strokeDasharray: unref(perimeter), | ||
strokeDashoffset: (props.percent >= 1 ? 0 : 1 - props.percent) * unref(perimeter) | ||
strokeDasharray: perimeter.value, | ||
strokeDashoffset: (props.percent >= 1 ? 0 : 1 - props.percent) * perimeter.value | ||
}) | ||
@@ -1241,2 +1241,3 @@ }, null, 14, _hoisted_3) | ||
}; | ||
const COMPONENT$1 = "g-progress"; | ||
const _sfc_main$1 = /* @__PURE__ */ defineComponent({ | ||
@@ -1247,6 +1248,5 @@ __name: "progress", | ||
const props = __props; | ||
const COMPONENT = "g-progress"; | ||
return (_ctx, _cache) => { | ||
return openBlock(), createElementBlock("div", { | ||
class: normalizeClass(COMPONENT) | ||
class: normalizeClass(COMPONENT$1) | ||
}, [ | ||
@@ -1281,2 +1281,3 @@ props.type === "line" ? (openBlock(), createBlock(_sfc_main$3, { | ||
const _hoisted_2 = ["rowspan", "colspan"]; | ||
const COMPONENT = "g-table"; | ||
const _sfc_main = /* @__PURE__ */ defineComponent({ | ||
@@ -1292,3 +1293,2 @@ __name: "table", | ||
const props = __props; | ||
const COMPONENT = "g-table"; | ||
const pushRow = (original, rows, dinks) => { | ||
@@ -1382,6 +1382,6 @@ const cols = []; | ||
createElementVNode("thead", { | ||
class: normalizeClass(__props.headerSticky ? `${COMPONENT}-header-sticky` : ""), | ||
style: normalizeStyle({ top: `${__props.headerStickyTop}px` }) | ||
class: normalizeClass(_ctx.headerSticky ? `${COMPONENT}-header-sticky` : ""), | ||
style: normalizeStyle({ top: `${_ctx.headerStickyTop}px` }) | ||
}, [ | ||
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(headerRows), (cols, index2) => { | ||
(openBlock(true), createElementBlock(Fragment, null, renderList(headerRows.value, (cols, index2) => { | ||
return openBlock(), createElementBlock("tr", { key: index2 }, [ | ||
@@ -1400,8 +1400,8 @@ (openBlock(true), createElementBlock(Fragment, null, renderList(cols, (col) => { | ||
createElementVNode("tbody", null, [ | ||
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.data, (dataRow, rowIndex) => { | ||
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.data, (dataRow, rowIndex) => { | ||
return openBlock(), createElementBlock("tr", { key: rowIndex }, [ | ||
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(headerKeys), (key, colIndex) => { | ||
(openBlock(true), createElementBlock(Fragment, null, renderList(headerKeys.value, (key, colIndex) => { | ||
var _a, _b; | ||
return openBlock(), createElementBlock(Fragment, null, [ | ||
!unref(removedCells).includes(`${rowIndex}-${colIndex}`) ? (openBlock(), createElementBlock("td", { | ||
!removedCells.value.includes(`${rowIndex}-${colIndex}`) ? (openBlock(), createElementBlock("td", { | ||
key, | ||
@@ -1408,0 +1408,0 @@ rowspan: (_a = dataRow[`${key}-row-span`]) != null ? _a : 1, |
{ | ||
"name": "@geektech/geek-ui", | ||
"version": "0.3.1", | ||
"version": "0.4.1", | ||
"type": "module", | ||
@@ -50,3 +50,4 @@ "main": "dist/index.js", | ||
"vite": "^3.0.0", | ||
"vitepress": "1.0.0-alpha.61", | ||
"vite-plugin-dts": "^3.6.0", | ||
"vitepress": "1.0.0-rc.20", | ||
"vitest": "^0.31.1", | ||
@@ -53,0 +54,0 @@ "vue-tsc": "^0.38.4" |
246656
52
9543
24