@cregis/ui 0.0.2 → 0.0.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/dist/{components/index.css → index.css} +1 -1
- package/dist/{components/index.es.js → index.es.js} +48 -38
- package/dist/{components/index.umd.js → index.umd.js} +1 -1
- package/dist/types/index.d.ts +6 -0
- package/package.json +12 -5
- /package/dist/{components/types → types}/button/Button.vue.d.ts +0 -0
- /package/dist/{components/types → types}/button/button.d.ts +0 -0
- /package/dist/{components/types → types}/button/index.d.ts +0 -0
- /package/dist/{components/types/index.d.ts → types/components.d.ts} +0 -0
- /package/dist/{components/types → types}/icon/index.d.ts +0 -0
- /package/dist/{components/types → types}/icon/static/ButtonLoading.d.ts +0 -0
- /package/dist/{components/types → types}/icon/static/ButtonLoading.vue.d.ts +0 -0
- /package/dist/{components/types → types}/icon/static/index.d.ts +0 -0
- /package/dist/{components/types → types}/utils/install.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type="button"]),input:where([type="reset"]),input:where([type="submit"]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden="until-found"])){display:none}.static{position:static}.block{display:block}.flex{display:flex}.shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.rounded-full{border-radius:9999px}.border{border-width:1px}.loading[data-v-93822f14]{animation:rotate 2s linear infinite}.cgbtn_fit[data-v-
|
|
1
|
+
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type="button"]),input:where([type="reset"]),input:where([type="submit"]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden="until-found"])){display:none}.static{position:static}.block{display:block}.flex{display:flex}.shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.rounded-full{border-radius:9999px}.border{border-width:1px}.loading[data-v-93822f14]{animation:rotate 2s linear infinite}.cgbtn_fit[data-v-46f714f8]{width:-moz-fit-content;width:fit-content}.cgbtn_full[data-v-46f714f8]{width:100%}.cgbtn_primary[data-v-46f714f8]{background-color:var(--cregis-bg-dark);color:var(--cregis-text-white);cursor:default}.cgbtn_primary[data-v-46f714f8]:active{color:var(--cregis-text-white-60)!important}.cgbtn_primary.cgbtn_primary-disabled[data-v-46f714f8]{cursor:not-allowed!important;color:var(--cregis-text-btn-primary-disabled)!important;background-color:var(--cregis-bg-dark-20)!important}.cgbtn_primary.cgbtn_primary-disabled[data-v-46f714f8]:active{color:var(--cregis-text-white)!important}.cgbtn_cancel[data-v-46f714f8]{background-color:var(--cregis-bg-dark-10);color:var(--cregis-text-100);cursor:default}.cgbtn_cancel[data-v-46f714f8]:active{color:var(--cregis-text-60)!important}.cgbtn_cancel.cgbtn_cancel-disabled[data-v-46f714f8]{cursor:not-allowed!important;color:var(--cregis-text-20)!important;background-color:var(--cregis-bg-dark-10)!important}.cgbtn_cancel.cgbtn_cancel-disabled[data-v-46f714f8]:active{color:var(--cregis-text-20)!important}.cgbtn_failure[data-v-46f714f8]{background-color:var(--cregis-failure);color:var(--cregis-white);cursor:default}.cgbtn_failure[data-v-46f714f8]:active{color:var(--cregis-white-60)!important}.cgbtn_failure.cgbtn_failure-disabled[data-v-46f714f8]{cursor:not-allowed!important;color:var(--cregis-white)!important;background-color:var(--cregis-failure-20)!important}.cgbtn_failure.cgbtn_failure-disabled[data-v-46f714f8]:active{color:var(--cregis-white)!important}.cgbtn_success[data-v-46f714f8]{background-color:var(--cregis-success-10);color:var(--cregis-success);cursor:default}.cgbtn_success[data-v-46f714f8]:hover{color:var(--cregis-white);background-color:var(--cregis-success)}.cgbtn_success[data-v-46f714f8]:active{color:var(--cregis-white-60);background-color:var(--cregis-success)}.cgbtn_success.cgbtn_success-disabled[data-v-46f714f8]{cursor:not-allowed!important;color:var(--cregis-success-40)!important;background-color:var(--cregis-success-10)!important}.cgbtn_success.cgbtn_success-disabled[data-v-46f714f8]:active{color:var(--cregis-success-40)!important}.cgbtn_hollow[data-v-46f714f8]{color:var(--cregis-text-100);cursor:default;border:.5px solid;border-color:var(--cregis-text-100)}.cgbtn_hollow[data-v-46f714f8]:hover{color:var(--cregis-text-white);background-color:var(--cregis-bg-dark);border-color:transparent}.cgbtn_hollow[data-v-46f714f8]:active{color:var(--cregis-text-white-60);background-color:var(--cregis-bg-dark);border-color:transparent}.cgbtn_hollow.cgbtn_hollow-disabled[data-v-46f714f8]{cursor:not-allowed!important;color:var(--cregis-text-20)!important;background-color:transparent!important;border-color:var(--cregis-text-100)!important}.cgbtn_tint[data-v-46f714f8]{color:var(--cregis-text-100);cursor:default;border:.5px solid;border-color:var(--cregis-text-20)}.cgbtn_tint[data-v-46f714f8]:hover{color:var(--cregis-text-white);background-color:var(--cregis-bg-dark);border-color:transparent}.cgbtn_tint[data-v-46f714f8]:active{color:var(--cregis-text-white-60);background-color:var(--cregis-bg-dark);border-color:transparent}.cgbtn_tint.cgbtn_tint-disabled[data-v-46f714f8]{cursor:not-allowed!important;color:var(--cregis-text-20)!important;background-color:transparent!important;border-color:var(--cregis-text-20)!important}.cgbtn_text[data-v-46f714f8]{background-color:transparent;color:var(--cregis-success);cursor:default}.cgbtn_text[data-v-46f714f8]:active{color:var(--cregis-success)!important;background-color:var(--cregis-bg-dark-10)}.cgbtn_text.cgbtn_text-disabled[data-v-46f714f8]{cursor:not-allowed!important;color:var(--cregis-success-40)!important;background-color:transparent!important}.cgbtn_text.cgbtn_text-disabled[data-v-46f714f8]:active{color:var(--cregis-success-40)!important}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
3
|
-
if (
|
|
4
|
-
for (const s of [
|
|
5
|
-
|
|
1
|
+
import { defineComponent as c, openBlock as a, createElementBlock as u, createStaticVNode as C, computed as l, normalizeClass as b, normalizeStyle as h, withModifiers as L, createBlock as y, renderSlot as v } from "vue";
|
|
2
|
+
const w = (e, t) => {
|
|
3
|
+
if (e.install = (n) => {
|
|
4
|
+
for (const s of [e, ...Object.values(t != null ? t : {})])
|
|
5
|
+
n.component(s.name, s);
|
|
6
6
|
}, t)
|
|
7
|
-
for (const [
|
|
8
|
-
n
|
|
9
|
-
return
|
|
10
|
-
},
|
|
7
|
+
for (const [n, s] of Object.entries(t))
|
|
8
|
+
e[n] = s;
|
|
9
|
+
return e;
|
|
10
|
+
}, k = ["width", "height"], B = /* @__PURE__ */ c({
|
|
11
11
|
__name: "ButtonLoading",
|
|
12
12
|
props: {
|
|
13
13
|
size: { default: "20px" }
|
|
14
14
|
},
|
|
15
|
-
setup(
|
|
16
|
-
return (t,
|
|
15
|
+
setup(e) {
|
|
16
|
+
return (t, n) => (a(), u("svg", {
|
|
17
17
|
class: "shrink-0 loading",
|
|
18
18
|
width: t.size,
|
|
19
19
|
height: t.size,
|
|
@@ -21,17 +21,18 @@ const v = (n, t) => {
|
|
|
21
21
|
version: "1.1",
|
|
22
22
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23
23
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
]), 8,
|
|
24
|
+
}, n[0] || (n[0] = [
|
|
25
|
+
C('<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" data-v-93822f14><g transform="translate(-804.000000, -497.000000)" data-v-93822f14><g transform="translate(804.000000, 497.000000)" data-v-93822f14><rect x="0" y="0" width="20" height="20" data-v-93822f14></rect><path d="M10,13.7 C10.345178,13.7 10.625,13.979822 10.625,14.325 L10.625,14.325 L10.625,18.125 C10.625,18.470178 10.345178,18.75 10,18.75 C9.65482203,18.75 9.375,18.470178 9.375,18.125 L9.375,14.325 C9.375,13.979822 9.65482203,13.7 10,13.7 Z M13.5125,12.65 L16.1875,15.325 C16.3669713,15.478764 16.4443618,15.7206094 16.3875,15.95 C16.3327452,16.1789698 16.1539698,16.3577452 15.925,16.4125 C15.6956094,16.4693618 15.453764,16.3919713 15.3,16.2125 L12.625,13.5375 C12.3987859,13.2969062 12.3987859,12.9218438 12.625,12.68125 L12.625,12.68125 C12.7381332,12.5587031 12.895554,12.4864573 13.0622346,12.4805883 C13.2289152,12.4747192 13.3910276,12.5357138 13.5125,12.65 L13.5125,12.65 Z M7.34375,12.65 L7.34375,12.65 C7.56996411,12.8905938 7.56996411,13.2656562 7.34375,13.50625 L4.69375,16.1875 C4.53998596,16.3669713 4.29814063,16.4443618 4.06875,16.3875 C3.83978025,16.3327452 3.66100478,16.1539698 3.60625,15.925 C3.54938821,15.6956094 3.62677871,15.453764 3.80625,15.3 L6.48125,12.625 C6.72435097,12.3965823 7.10398479,12.3993333 7.34375,12.63125 L7.34375,12.65 Z M5.675,9.375 C6.02017797,9.375 6.3,9.65482203 6.3,10 C6.3,10.345178 6.02017797,10.625 5.675,10.625 L1.875,10.625 C1.52982203,10.625 1.25,10.345178 1.25,10 C1.25,9.65482203 1.52982203,9.375 1.875,9.375 L5.675,9.375 Z M18.125,9.375 C18.470178,9.375 18.75,9.65482203 18.75,10 C18.75,10.345178 18.470178,10.625 18.125,10.625 L14.325,10.625 C13.979822,10.625 13.7,10.345178 13.7,10 C13.7,9.65482203 13.979822,9.375 14.325,9.375 L18.125,9.375 Z M16.1875,3.8125 C16.4298272,4.05627341 16.4298272,4.44997659 16.1875,4.69375 L13.5125,7.36875 C13.2668846,7.51421102 12.9539246,7.47477298 12.7520758,7.27292421 C12.550227,7.07107544 12.510789,6.75811544 12.65625,6.5125 L15.30625,3.8125 C15.5500234,3.57017275 15.9437266,3.57017275 16.1875,3.8125 Z M4.69375,3.8125 L7.36875,6.4875 C7.5933706,6.62052723 7.711649,6.87915044 7.66536703,7.13607189 C7.61908505,7.39299335 7.41799335,7.59408505 7.16107189,7.64036703 C6.90415044,7.686649 6.64552723,7.5683706 6.5125,7.34375 L3.8125,4.69375 C3.6001395,4.44577483 3.61441733,4.07612864 3.84527299,3.84527299 C4.07612864,3.61441733 4.44577483,3.6001395 4.69375,3.8125 Z M10,1.25 C10.345178,1.25 10.625,1.52982203 10.625,1.875 L10.625,2.5 L10.625,2.5 L10.625,5.675 C10.625,6.02017797 10.345178,6.3 10,6.3 C9.65482203,6.3 9.375,6.02017797 9.375,5.675 L9.375,5.675 L9.375,5 L9.375,5 L9.375,1.875 C9.375,1.52982203 9.65482203,1.25 10,1.25 Z" fill="currentColor" fill-rule="nonzero" data-v-93822f14></path></g></g></g>', 1)
|
|
26
|
+
]), 8, k));
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
for (const [s,
|
|
32
|
-
|
|
33
|
-
return
|
|
34
|
-
},
|
|
29
|
+
const f = (e, t) => {
|
|
30
|
+
const n = e.__vccOpts || e;
|
|
31
|
+
for (const [s, i] of t)
|
|
32
|
+
n[s] = i;
|
|
33
|
+
return n;
|
|
34
|
+
}, z = /* @__PURE__ */ f(B, [["__scopeId", "data-v-93822f14"]]), M = ["disabled"], x = /* @__PURE__ */ c({
|
|
35
|
+
name: "CgButton",
|
|
35
36
|
__name: "Button",
|
|
36
37
|
props: {
|
|
37
38
|
loading: { type: Boolean, default: !1 },
|
|
@@ -42,8 +43,8 @@ const g = (n, t) => {
|
|
|
42
43
|
fit: { type: Boolean, default: !1 }
|
|
43
44
|
},
|
|
44
45
|
emits: ["click"],
|
|
45
|
-
setup(
|
|
46
|
-
const t =
|
|
46
|
+
setup(e) {
|
|
47
|
+
const t = e, n = {
|
|
47
48
|
minimum: {
|
|
48
49
|
height: "1.25rem"
|
|
49
50
|
},
|
|
@@ -73,7 +74,7 @@ const g = (n, t) => {
|
|
|
73
74
|
paddingLeft: "2rem",
|
|
74
75
|
paddingRight: "2rem"
|
|
75
76
|
}
|
|
76
|
-
},
|
|
77
|
+
}, i = {
|
|
77
78
|
primary: "cgbtn_primary-disabled",
|
|
78
79
|
cancel: "cgbtn_cancel-disabled",
|
|
79
80
|
failure: "cgbtn_failure-disabled",
|
|
@@ -81,14 +82,14 @@ const g = (n, t) => {
|
|
|
81
82
|
text: "cgbtn_text-disabled",
|
|
82
83
|
hollow: "cgbtn_hollow-disabled",
|
|
83
84
|
tint: "cgbtn_tint-disabled"
|
|
84
|
-
},
|
|
85
|
-
() => t.disabled ?
|
|
86
|
-
),
|
|
87
|
-
() => Object.assign({},
|
|
85
|
+
}, g = l(
|
|
86
|
+
() => t.disabled ? i[t.type] : ""
|
|
87
|
+
), p = l(() => t.fit ? "cgbtn_fit" : "cgbtn_full"), _ = l(
|
|
88
|
+
() => Object.assign({}, n[t.size], {
|
|
88
89
|
...t.width ? { width: t.width } : {},
|
|
89
90
|
...t.fit ? s[t.size] : {}
|
|
90
91
|
})
|
|
91
|
-
),
|
|
92
|
+
), m = l(() => {
|
|
92
93
|
switch (t.type) {
|
|
93
94
|
case "primary":
|
|
94
95
|
return "cgbtn_primary";
|
|
@@ -108,20 +109,29 @@ const g = (n, t) => {
|
|
|
108
109
|
return "cgbtn_primary";
|
|
109
110
|
}
|
|
110
111
|
});
|
|
111
|
-
return (
|
|
112
|
-
class:
|
|
113
|
-
style: h(
|
|
114
|
-
disabled:
|
|
115
|
-
onClick:
|
|
112
|
+
return (o, r) => (a(), u("button", {
|
|
113
|
+
class: b(["flex shrink-0 justify-center items-center rounded-full font-13", [m.value, p.value, g.value]]),
|
|
114
|
+
style: h(_.value),
|
|
115
|
+
disabled: o.disabled,
|
|
116
|
+
onClick: r[0] || (r[0] = L((S) => !o.loading && o.$emit("click"), ["stop"]))
|
|
116
117
|
}, [
|
|
117
|
-
|
|
118
|
+
o.loading ? (a(), y(z, {
|
|
118
119
|
key: 0,
|
|
119
120
|
size: "1rem"
|
|
120
|
-
})) :
|
|
121
|
-
], 14,
|
|
121
|
+
})) : v(o.$slots, "default", { key: 1 }, void 0, !0)
|
|
122
|
+
], 14, M));
|
|
122
123
|
}
|
|
123
124
|
});
|
|
124
|
-
const Z = /* @__PURE__ */
|
|
125
|
+
const Z = /* @__PURE__ */ f(x, [["__scopeId", "data-v-46f714f8"]]), j = w(Z), d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
126
|
+
__proto__: null,
|
|
127
|
+
CgButton: j
|
|
128
|
+
}, Symbol.toStringTag, { value: "Module" })), O = (e) => {
|
|
129
|
+
for (const t of Object.keys(d))
|
|
130
|
+
e.component(t, d[t]);
|
|
131
|
+
}, I = {
|
|
132
|
+
install: O
|
|
133
|
+
};
|
|
125
134
|
export {
|
|
126
|
-
|
|
135
|
+
I as default,
|
|
136
|
+
O as install
|
|
127
137
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(o,
|
|
1
|
+
(function(o,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(o=typeof globalThis<"u"?globalThis:o||self,t(o.CregisUI={},o.Vue))})(this,function(o,t){"use strict";const B="",u=(n,e)=>{if(n.install=s=>{for(const i of[n,...Object.values(e!=null?e:{})])s.component(i.name,i)},e)for(const[s,i]of Object.entries(e))n[s]=i;return n},p=["width","height"],g=t.defineComponent({__name:"ButtonLoading",props:{size:{default:"20px"}},setup(n){return(e,s)=>(t.openBlock(),t.createElementBlock("svg",{class:"shrink-0 loading",width:e.size,height:e.size,viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},s[0]||(s[0]=[t.createStaticVNode('<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" data-v-93822f14><g transform="translate(-804.000000, -497.000000)" data-v-93822f14><g transform="translate(804.000000, 497.000000)" data-v-93822f14><rect x="0" y="0" width="20" height="20" data-v-93822f14></rect><path d="M10,13.7 C10.345178,13.7 10.625,13.979822 10.625,14.325 L10.625,14.325 L10.625,18.125 C10.625,18.470178 10.345178,18.75 10,18.75 C9.65482203,18.75 9.375,18.470178 9.375,18.125 L9.375,14.325 C9.375,13.979822 9.65482203,13.7 10,13.7 Z M13.5125,12.65 L16.1875,15.325 C16.3669713,15.478764 16.4443618,15.7206094 16.3875,15.95 C16.3327452,16.1789698 16.1539698,16.3577452 15.925,16.4125 C15.6956094,16.4693618 15.453764,16.3919713 15.3,16.2125 L12.625,13.5375 C12.3987859,13.2969062 12.3987859,12.9218438 12.625,12.68125 L12.625,12.68125 C12.7381332,12.5587031 12.895554,12.4864573 13.0622346,12.4805883 C13.2289152,12.4747192 13.3910276,12.5357138 13.5125,12.65 L13.5125,12.65 Z M7.34375,12.65 L7.34375,12.65 C7.56996411,12.8905938 7.56996411,13.2656562 7.34375,13.50625 L4.69375,16.1875 C4.53998596,16.3669713 4.29814063,16.4443618 4.06875,16.3875 C3.83978025,16.3327452 3.66100478,16.1539698 3.60625,15.925 C3.54938821,15.6956094 3.62677871,15.453764 3.80625,15.3 L6.48125,12.625 C6.72435097,12.3965823 7.10398479,12.3993333 7.34375,12.63125 L7.34375,12.65 Z M5.675,9.375 C6.02017797,9.375 6.3,9.65482203 6.3,10 C6.3,10.345178 6.02017797,10.625 5.675,10.625 L1.875,10.625 C1.52982203,10.625 1.25,10.345178 1.25,10 C1.25,9.65482203 1.52982203,9.375 1.875,9.375 L5.675,9.375 Z M18.125,9.375 C18.470178,9.375 18.75,9.65482203 18.75,10 C18.75,10.345178 18.470178,10.625 18.125,10.625 L14.325,10.625 C13.979822,10.625 13.7,10.345178 13.7,10 C13.7,9.65482203 13.979822,9.375 14.325,9.375 L18.125,9.375 Z M16.1875,3.8125 C16.4298272,4.05627341 16.4298272,4.44997659 16.1875,4.69375 L13.5125,7.36875 C13.2668846,7.51421102 12.9539246,7.47477298 12.7520758,7.27292421 C12.550227,7.07107544 12.510789,6.75811544 12.65625,6.5125 L15.30625,3.8125 C15.5500234,3.57017275 15.9437266,3.57017275 16.1875,3.8125 Z M4.69375,3.8125 L7.36875,6.4875 C7.5933706,6.62052723 7.711649,6.87915044 7.66536703,7.13607189 C7.61908505,7.39299335 7.41799335,7.59408505 7.16107189,7.64036703 C6.90415044,7.686649 6.64552723,7.5683706 6.5125,7.34375 L3.8125,4.69375 C3.6001395,4.44577483 3.61441733,4.07612864 3.84527299,3.84527299 C4.07612864,3.61441733 4.44577483,3.6001395 4.69375,3.8125 Z M10,1.25 C10.345178,1.25 10.625,1.52982203 10.625,1.875 L10.625,2.5 L10.625,2.5 L10.625,5.675 C10.625,6.02017797 10.345178,6.3 10,6.3 C9.65482203,6.3 9.375,6.02017797 9.375,5.675 L9.375,5.675 L9.375,5 L9.375,5 L9.375,1.875 C9.375,1.52982203 9.65482203,1.25 10,1.25 Z" fill="currentColor" fill-rule="nonzero" data-v-93822f14></path></g></g></g>',1)]),8,p))}}),v="",d=(n,e)=>{const s=n.__vccOpts||n;for(const[i,a]of e)s[i]=a;return s},m=d(g,[["__scopeId","data-v-93822f14"]]),_=["disabled"],C=t.defineComponent({name:"CgButton",__name:"Button",props:{loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},width:{},size:{default:"small"},type:{default:"primary"},fit:{type:Boolean,default:!1}},emits:["click"],setup(n){const e=n,s={minimum:{height:"1.25rem"},small:{height:"1.5rem"},middle:{height:"1.75rem"},large:{height:"2.5rem"}},i={minimum:{paddingLeft:"8px",paddingRight:"8px"},small:{paddingLeft:"1rem",paddingRight:"1rem"},middle:{paddingLeft:"1rem",paddingRight:"1rem"},large:{paddingLeft:"2rem",paddingRight:"2rem"}},a={primary:"cgbtn_primary-disabled",cancel:"cgbtn_cancel-disabled",failure:"cgbtn_failure-disabled",success:"cgbtn_success-disabled",text:"cgbtn_text-disabled",hollow:"cgbtn_hollow-disabled",tint:"cgbtn_tint-disabled"},y=t.computed(()=>e.disabled?a[e.type]:""),L=t.computed(()=>e.fit?"cgbtn_fit":"cgbtn_full"),w=t.computed(()=>Object.assign({},s[e.size],{...e.width?{width:e.width}:{},...e.fit?i[e.size]:{}})),k=t.computed(()=>{switch(e.type){case"primary":return"cgbtn_primary";case"cancel":return"cgbtn_cancel";case"failure":return"cgbtn_failure";case"success":return"cgbtn_success";case"text":return"cgbtn_text";case"hollow":return"cgbtn_hollow";case"tint":return"cgbtn_tint";default:return"cgbtn_primary"}});return(l,f)=>(t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["flex shrink-0 justify-center items-center rounded-full font-13",[k.value,L.value,y.value]]),style:t.normalizeStyle(w.value),disabled:l.disabled,onClick:f[0]||(f[0]=t.withModifiers(j=>!l.loading&&l.$emit("click"),["stop"]))},[l.loading?(t.openBlock(),t.createBlock(m,{key:0,size:"1rem"})):t.renderSlot(l.$slots,"default",{key:1},void 0,!0)],14,_))}}),z="",b=u(d(C,[["__scopeId","data-v-46f714f8"]])),c=Object.freeze(Object.defineProperty({__proto__:null,CgButton:b},Symbol.toStringTag,{value:"Module"})),r=n=>{for(const e of Object.keys(c))n.component(e,c[e])},h={install:r};o.default=h,o.install=r,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cregis/ui",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"main": "dist/
|
|
5
|
-
"module": "dist/
|
|
6
|
-
"
|
|
3
|
+
"version": "0.0.4",
|
|
4
|
+
"main": "dist/index.umd.js",
|
|
5
|
+
"module": "dist/index.es.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/types/index.d.ts",
|
|
9
|
+
"import": "./dist/index.es.js",
|
|
10
|
+
"require": "./dist/index.umd.js"
|
|
11
|
+
},
|
|
12
|
+
"./style": "./dist/index.css"
|
|
13
|
+
},
|
|
7
14
|
"files": [
|
|
8
|
-
"dist
|
|
15
|
+
"dist"
|
|
9
16
|
],
|
|
10
17
|
"publishConfig": {
|
|
11
18
|
"access": "public"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|