@cregis/ui 0.0.4 → 0.1.1

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/README.md CHANGED
@@ -1,46 +1,5 @@
1
- # cregis-ui
2
-
3
- This template should help get you started developing with Vue 3 in Vite.
4
-
5
- ## Recommended IDE Setup
6
-
7
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
8
-
9
- ## Type Support for `.vue` Imports in TS
10
-
11
- TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
12
-
13
- If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
14
-
15
- 1. Disable the built-in TypeScript Extension
16
- 1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
17
- 2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
18
- 2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
19
-
20
- ## Customize configuration
21
-
22
- See [Vite Configuration Reference](https://vitejs.dev/config/).
23
-
24
- ## Project Setup
25
-
26
- ```sh
27
- npm install
28
- ```
29
-
30
- ### Compile and Hot-Reload for Development
31
-
32
- ```sh
33
- npm run dev
34
- ```
35
-
36
- ### Type-Check, Compile and Minify for Production
37
-
38
- ```sh
39
- npm run build
40
- ```
41
-
42
- ### Lint with [ESLint](https://eslint.org/)
43
-
44
- ```sh
45
- npm run lint
46
- ```
1
+ # Vue 3 + TypeScript + Vite
2
+
3
+ This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
+
5
+ Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
@@ -0,0 +1,28 @@
1
+ import { defineComponent as o, inject as r, onMounted as b, watch as m, onUnmounted as s } from "vue";
2
+ const i = Symbol("TABS_KEY"), T = /* @__PURE__ */ o({
3
+ name: "TabPane",
4
+ __name: "TabPane",
5
+ props: {
6
+ label: {},
7
+ name: {}
8
+ },
9
+ setup(a) {
10
+ const e = a, n = r(i);
11
+ if (!n) throw new Error("TabPane must be used within Tabs");
12
+ return b(() => {
13
+ n.registerTab({ label: e.label, name: e.name });
14
+ }), m(
15
+ () => e.label,
16
+ (t) => {
17
+ n.unregisterTab(e.name), n.registerTab({ label: t, name: e.name });
18
+ }
19
+ ), s(() => {
20
+ n.unregisterTab(e.name);
21
+ }), () => {
22
+ };
23
+ }
24
+ });
25
+ export {
26
+ i as TABS_KEY,
27
+ T as TabPane
28
+ };
Binary file
package/dist/index.css CHANGED
@@ -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-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
+ :root{--system-brand: display-p3 .1216 .7647 .3529;--system-error: display-p3 .8431 .2745 .1765;--system-decor: display-p3 .0078 .1765 .051;--same-black: 2 3 4;--same-white: 255 255 255;--foreground-face: 255 255 255;--foreground-base: 2 3 4;--module-line: 235 236 237;--page: 255 255 255}.dark{--system-brand: display-p3 .1216 .7647 .3529;--system-error: display-p3 .8431 .2745 .1765;--system-decor: display-p3 1 1 1;--same-black: 2 3 4;--same-white: 255 255 255;--foreground-face: 2 3 4;--foreground-base: 255 255 255;--module-line: 0 0 0;--page: 30 33 35}/*! minireset.css v0.0.6 | MIT License | github.com/jgthms/minireset.css */html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}ul{list-style:none}button,input,select{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}:root{--material-vibrant-brand-primary: color(var(--system-brand) / 1);--material-opaque-card-moderate: rgb(var(--foreground-base) / .05);--material-foreground-face-primary: rgb(var(--foreground-face) / 1);--material-foreground-face-quaternary: rgb(var(--foreground-face) / .2);--material-foreground-base-primary: rgb(var(--foreground-base) / 1);--material-foreground-base-secondary: rgb(var(--foreground-base) / .6);--material-foreground-base-quaternary: rgb(var(--foreground-base) / .2);--material-vibrant-error-primary: color(var(--system-error) / 1);--material-decor-primary: color(var(--system-decor) / 1);--material-same-white: rgb(var(--same-white) / 1);--material-opaque-hide: rgb(var(--foreground-base) / 0);--text-base-primary: rgb(var(--foreground-base) / 1);--text-base-secondary: rgb(var(--foreground-base) / .6);--text-base-tertiary: rgb(var(--foreground-base) / .4);--text-base-quaternary: rgb(var(--foreground-base) / .2);--text-face-primary: rgb(var(--foreground-face) / 1);--text-face-secondary: rgb(var(--foreground-face) / .6);--text-same-white: rgb(var(--same-white) / 1);--text-same-white-tap: rgb(var(--same-white) / .6);--text-same-black: rgb(var(--same-black) / 1);--text-same-black-tap: rgb(var(--same-black) / .6);--text-brand-tap: color(var(--system-brand) / .6);--text-brand-40: color(var(--system-brand) / .4);--text-brand-disabled: color(var(--system-brand) / .2);--text-error-tap: color(var(--system-error) / .6);--line-border-deep: rgb(var(--foreground-base) / .18);--line-module: rgb(var(--module-line) / 1);--event-hover-secondary: rgb(var(--foreground-base) / .05);--event-hover-tertiary: rgb(var(--page) / 1);--event-focus-secondary: rgb(var(--foreground-base) / .07)}.dark{--material-opaque-card-moderate: rgb(var(--foreground-base) / .07);--event-hover-secondary: rgb(var(--foreground-base) / .07);--event-focus-secondary: rgb(var(--foreground-base) / .1)}.cregis-input{width:100%;position:relative;display:inline-flex;font-size:15px;line-height:22px;box-sizing:border-box;vertical-align:middle;caret-color:var(--text-base-primary)}.cregis-input.is-disabled{cursor:not-allowed}.cregis-input.is-disabled .cregis-input__inner{color:var(--text-base-quaternary);cursor:not-allowed}.cregis-input__wrapper{position:relative;display:inline-flex;flex-grow:1;align-items:center;justify-content:center;padding:0 12px;background-color:var(--material-opaque-card-moderate);border-radius:6px;border:2px solid transparent}.cregis-input__wrapper.is-focus{border:2px solid var(--material-vibrant-brand-primary);border-radius:6px;background-color:var(--material-foreground-face-quaternary)}.cregis-input__wrapper.is-focus .cregis-input__inner::placeholder{color:var(--text-base-quaternary)}.cregis-input__inner{width:100%;min-width:20px;-webkit-appearance:none;font-size:inherit;padding:0;outline:none;border:none;background:none;box-sizing:border-box;color:var(--text-base-primary)}.cregis-input__inner::placeholder{color:var(--text-base-tertiary)}.cregis-input__inner::-webkit-outer-spin-button,.cregis-input__inner::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.cregis-input--small{height:32px}.cregis-input--medium{height:40px}.cregis-input--large{height:48px}.cregis-input__unit{color:var(--text-base-primary)}.cregis-input__prefix,.cregis-input__suffix{display:inline-flex;white-space:nowrap;flex-shrink:0;flex-wrap:nowrap;height:100%;text-align:center;align-items:center}.cregis-input__prefix>:first-child{margin-left:0!important}.cregis-input__prefix>:last-child{margin-right:8px!important}.cregis-input__suffix>:first-child{margin-left:8px!important}.cregis-input__suffix>:last-child{margin-right:0!important}.cregis-input__clear-button svg g path{fill:var(--material-foreground-base-secondary)}.cregis-input__clear-button:hover svg g path{fill:var(--material-foreground-base-primary)}.cregis-input__clear-button:active svg g path{fill:var(--material-foreground-base-secondary)}.cregis-textarea{position:relative}.cregis-textarea.is-disabled .cregis-textarea__wrapper{color:var(--text-base-quaternary);cursor:not-allowed}.cregis-textarea__wrapper{resize:none;position:relative;display:block;padding:12px;background-color:var(--material-opaque-card-moderate);border-radius:6px;border:2px solid transparent;box-sizing:border-box;width:100%;font-size:inherit;font-family:inherit;background-image:none;-webkit-appearance:none;caret-color:var(--text-base-primary);color:var(--text-base-primary)}.cregis-textarea__wrapper:focus{outline:none;border:2px solid var(--material-vibrant-brand-primary)}.cregis-textarea__wrapper:focus::placeholder{color:var(--text-base-quaternary)}.cregis-textarea__wrapper::placeholder{color:var(--text-base-tertiary)}.cregis-textarea__buttons{position:absolute;bottom:10px;left:12px;display:flex;gap:16px}.cregis-textarea__button{font-size:12px;font-weight:500;cursor:default;color:var(--material-vibrant-brand-primary)}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cregis-button{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;text-align:center;box-sizing:border-box;outline:none;transition:.1s;font-weight:500;-webkit-user-select:none;user-select:none;vertical-align:middle;-webkit-appearance:none;color:var(--text-same-white);background-color:var(--material-vibrant-brand-primary);border:1px solid var(--material-vibrant-brand-primary);font-size:13px;border-radius:30px}.cregis-button:active{color:var(--text-same-white-tap)}.cregis-button.is-plain{color:var(--material-vibrant-brand-primary);background-color:var(--material-opaque-hide)}.cregis-button.is-plain:hover{color:var(--text-same-white);background-color:var(--material-vibrant-brand-primary)}.cregis-button.is-plain:active{color:var(--text-same-white-tap)}.cregis-button.is-text{color:var(--material-vibrant-brand-primary);background-color:var(--material-opaque-hide);border-color:transparent}.cregis-button.is-text:hover{background-color:var(--event-hover-secondary)}.cregis-button.is-text:active{color:var(--text-brand-tap)}.cregis-button.is-block{width:100%}:is(.cregis-button.is-plain.is-loading,.cregis-button.is-text.is-loading):hover{background-color:var(--material-opaque-hide)}.cregis-button .loading{animation:rotate 2s linear infinite}.cregis-button.is-affix{gap:4px}.cregis-button.is-affix svg g path{stroke:var(--text-same-white)}.cregis-button.is-affix span{color:var(--text-same-white)}.cregis-button.is-affix:active svg g path{stroke:var(--text-same-white-tap)}.cregis-button.is-affix:active span{color:var(--text-same-white-tap)}.cregis-button.is-affix.is-disabled span{color:var(--text-base-quaternary)}.cregis-button--secondary{background-color:var(--material-opaque-card-moderate);border-color:transparent;color:var(--text-base-primary)}.cregis-button--secondary:active{color:var(--text-base-secondary)}.cregis-button--secondary.is-plain{border:.5px solid var(--line-border-deep);color:var(--text-base-primary)}.cregis-button--secondary.is-plain:hover{border:.5px solid transparent;color:var(--text-base-primary);background-color:var(--material-opaque-card-moderate)}.cregis-button--secondary.is-plain.is-plain.is-loading{border:.5px solid var(--line-border-deep)}.cregis-button--secondary.is-plain:active{color:var(--text-base-secondary)}.cregis-button--secondary.is-text{color:var(--text-base-primary)}.cregis-button--secondary.is-text:active{color:var(--text-base-secondary)}.cregis-button--danger{background-color:var(--material-vibrant-error-primary);border-color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-plain{color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-plain:hover{background-color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-text{color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-text:active{color:var(--text-error-tap)}.cregis-button--foreground{background-color:var(--material-decor-primary);border-color:var(--material-decor-primary);color:var(--text-face-primary)}.cregis-button--foreground:active{color:var(--text-face-secondary)}.cregis-button--foreground.is-plain{color:var(--material-decor-primary)}.cregis-button--foreground.is-plain:hover{color:var(--text-face-primary);background-color:var(--material-decor-primary)}.cregis-button--foreground.is-plain:active{color:var(--text-face-secondary)}.cregis-button--sameWhite{background-color:var(--material-same-white);border-color:transparent;color:var(--text-same-black)}.cregis-button--sameWhite:active{color:var(--text-same-black-tap)}.cregis-button--large{padding:0 20px;height:40px;font-size:15px;line-height:22px}.cregis-button--medium{padding:0 16px;height:32px;font-size:13px;line-height:18px}.cregis-button--small{padding:0 12px;height:24px;font-size:13px;line-height:18px}.cregis-button--extraSmall{padding:0 12px;height:20px;font-size:12px;line-height:16px}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled{color:var(--text-base-quaternary);background-color:var(--material-opaque-card-moderate);border-color:transparent;cursor:not-allowed}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled svg g path{stroke:var(--material-foreground-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled:active svg g path{stroke:var(--material-foreground-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-plain.is-disabled{border:.5px solid var(--line-border-deep);background-color:var(--material-opaque-hide)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-plain.is-disabled:hover{color:var(--text-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-text.is-disabled{background-color:var(--material-opaque-hide);border-color:transparent}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-text.is-disabled:active{color:var(--text-base-quaternary)}.cregis-button__link{border:none;border-bottom:1px dashed var(--material-opaque-hide);background-color:var(--material-opaque-hide);color:var(--material-vibrant-brand-primary);font-weight:500;padding:0}.cregis-button__link:hover{border-bottom:1px dashed var(--text-brand-40)}.cregis-button__link:active{border-bottom:1px dashed var(--text-brand-disabled);color:var(--text-brand-tap)}.cregis-button__link.is-disabled{color:var(--text-base-quaternary);border-color:transparent;cursor:not-allowed}.cregis-button__link--foreground{color:var(--text-base-primary)}.cregis-button__link--foreground:hover{border-bottom:1px dashed var(--text-base-tertiary)}.cregis-button__link--foreground:active{border-bottom:1px dashed var(--text-base-quaternary);color:var(--text-base-secondary)}.cregis-button__link--foreground.is-disabled{color:var(--text-base-quaternary);border-color:transparent}.cregis-button__link--large{font-size:15px}.cregis-button__link--medium{font-size:13px}.cregis-button__link--small,.cregis-button__link--extraSmall{font-size:12px}.cregis-button__icon-wrapper{display:flex;flex-direction:column;align-items:center}.cregis-button__icon{display:flex;justify-content:center;align-items:center;border-color:transparent;background-color:var(--material-opaque-hide);padding:0;border-radius:6px}.cregis-button__icon svg g path{stroke:var(--material-foreground-base-secondary)}.cregis-button__icon:hover{background-color:var(--event-hover-secondary)}.cregis-button__icon:hover svg g path{stroke:var(--material-foreground-base-primary)}.cregis-button__icon:active{background-color:var(--event-focus-secondary)}.cregis-button__icon:active svg g path{stroke:var(--material-foreground-base-secondary)}.cregis-button__icon.is-disabled{cursor:not-allowed}.cregis-button__icon.is-disabled svg g path{stroke:var(--material-foreground-base-quaternary)}.cregis-button__icon.is-disabled:hover{background-color:var(--material-opaque-hide)}.cregis-button__icon--rectangle.cregis-button__icon--large{width:36px;height:28px}.cregis-button__icon--rectangle.cregis-button__icon--medium{width:32px;height:24px}.cregis-button__icon--rectangle.cregis-button__icon--small,.cregis-button__icon--rectangle.cregis-button__icon--extraSmall{width:26px;height:20px}:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--large{width:28px;height:28px}:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--medium{width:24px;height:24px}:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--small,:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--extraSmall{width:20px;height:20px}.cregis-button__icon--circle{border-radius:50%}.cregis-button__icon--professional{width:32px;height:24px}.cregis-button__icon-text{font-size:11px;line-height:14px;font-weight:500;color:var(--text-base-secondary)}.cregis-button__icon-text.is-disabled{cursor:not-allowed;color:var(--text-base-quaternary)}.cregis-checkbox__wrapper{width:fit-content;display:flex;align-items:center;gap:8px;cursor:default;-webkit-user-select:none;user-select:none}.cregis-checkbox{width:16px;height:16px;border:1px solid var(--line-border-deep);border-radius:4px;display:flex;align-items:center;justify-content:center}.cregis-checkbox svg{visibility:hidden}.cregis-checkbox:hover svg{color:var(--line-border-deep);visibility:visible}.cregis-checkbox.is-checked,.cregis-checkbox.is-indeterminate{border:1px solid var(--material-vibrant-brand-primary)!important;background-color:var(--material-vibrant-brand-primary)!important}:is(.cregis-checkbox.is-checked,.cregis-checkbox.is-indeterminate) svg{visibility:visible!important;color:var(--material-same-white)}.cregis-checkbox.is-circle{border-radius:50%}.cregis-checkbox.is-disabled{cursor:not-allowed;background-color:var(--material-opaque-card-moderate)}.cregis-checkbox.is-disabled:hover svg{visibility:hidden}.cregis-checkbox.is-checked.is-disabled{opacity:.6}.cregis-checkbox__label{font-size:15px;font-weight:500;color:var(--text-base-secondary)}.cregis-checkbox__label.is-disabled{cursor:not-allowed}.cregis-checkbox--indeterminate{width:8px;height:1.5px;border-radius:1px;background-color:var(--material-same-white)}.cregis-radio__wrapper{width:fit-content;display:flex;align-items:center;gap:8px;cursor:default;-webkit-user-select:none;user-select:none}.cregis-radio{width:16px;height:16px;border:1px solid var(--line-border-deep);border-radius:50%;display:flex;align-items:center;justify-content:center}.cregis-radio:hover .cregis-radio__inner{visibility:visible}.cregis-radio.is-checked{border:1px solid var(--material-vibrant-brand-primary)!important;background-color:var(--material-vibrant-brand-primary)!important}.cregis-radio.is-checked .cregis-radio__inner{visibility:visible!important;background-color:var(--text-same-white)}.cregis-radio.is-disabled{cursor:not-allowed;background-color:var(--material-opaque-card-moderate)}.cregis-radio.is-disabled:hover .cregis-radio__inner{visibility:hidden}.cregis-radio.is-checked.is-disabled{opacity:.6}.cregis-radio__inner{width:6px;height:6px;border-radius:50%;background-color:var(--material-foreground-base-quaternary);visibility:hidden}.cregis-radio__label{font-size:15px;font-weight:500;color:var(--text-base-secondary)}.cregis-radio__label.is-disabled{cursor:not-allowed}.cregis-divider{display:flex;align-items:center}.cregis-divider--horizontal{flex-direction:row}.cregis-divider--vertical{flex-direction:column}.cregis-tabs{display:flex;gap:16px;width:fit-content;height:29px;font-size:13px;font-weight:500;color:var(--text-base-primary);cursor:default}.cregis-tabs__item{border-bottom:2px solid var(--material-opaque-hide);transition:color .2s ease,border-color .2s ease}.cregis-tabs__item.is-active{color:var(--material-vibrant-brand-primary);border-bottom:2px solid var(--material-vibrant-brand-primary)}.cregis-tabs--large{height:33px;font-size:15px}.cregis-tabs--small{height:28px;font-size:12px}.cregis-tabs--card{height:28px;background-color:var(--material-opaque-card-moderate);border-radius:14px;padding:3px;font-size:12px;gap:6px}.cregis-tabs--card.cregis-tabs--large{height:32px;border-radius:16px}.cregis-tabs--card.cregis-tabs--small{height:24px;border-radius:12px}.cregis-tabs--card .cregis-tabs__item{display:flex;align-items:center;justify-content:center;border:none;padding:0 6px}.cregis-tabs--card .cregis-tabs__item.is-active{color:var(--text-base-primary);background-color:var(--event-hover-tertiary)}
@@ -1,6 +1,118 @@
1
- import { App } from 'vue';
2
- export declare const install: (app: App) => void;
3
- declare const _default: {
4
- install: (app: App) => void;
5
- };
6
- export default _default;
1
+ import { Component } from 'vue';
2
+ import { ComponentOptionsMixin } from 'vue';
3
+ import { ComponentProvideOptions } from 'vue';
4
+ import { CSSProperties } from 'vue';
5
+ import { DefineComponent } from 'vue';
6
+ import { InjectionKey } from 'vue';
7
+ import { PublicProps } from 'vue';
8
+ import { Ref } from 'vue';
9
+
10
+ export declare interface ButtonProps {
11
+ type?: ButtonType;
12
+ size?: ButtonSize;
13
+ plain?: boolean;
14
+ text?: boolean;
15
+ disabled?: boolean;
16
+ loading?: boolean;
17
+ block?: boolean;
18
+ link?: boolean;
19
+ icon?: Component;
20
+ iconType?: IconButtonType;
21
+ iconText?: string;
22
+ affix?: boolean;
23
+ }
24
+
25
+ export declare type ButtonSize = 'extraSmall' | 'small' | 'medium' | 'large';
26
+
27
+ export declare type ButtonType = 'primary' | 'secondary' | 'danger' | 'foreground' | 'sameWhite';
28
+
29
+ export declare interface CheckboxEmits {
30
+ (e: 'update:modelValue', value: boolean | number): void;
31
+ (e: 'change', value: boolean | number): void;
32
+ }
33
+
34
+ export declare interface CheckboxProps {
35
+ modelValue: boolean | number;
36
+ label?: string;
37
+ disabled?: boolean;
38
+ circle?: boolean;
39
+ indeterminate?: boolean;
40
+ }
41
+
42
+ export declare interface DividerProps {
43
+ direction?: 'horizontal' | 'vertical';
44
+ borderStyle?: 'solid' | 'dashed' | 'dotted';
45
+ lineThickness?: string;
46
+ color?: string;
47
+ margin?: string | [string, string];
48
+ length?: string;
49
+ }
50
+
51
+ export declare type IconButtonType = 'rectangle' | 'square' | 'circle' | 'professional';
52
+
53
+ export declare interface InputEmits {
54
+ (e: 'update:modelValue', value: StringOrNumber): void;
55
+ (e: 'input', value: StringOrNumber): void;
56
+ (e: 'change', value: StringOrNumber): void;
57
+ (e: 'focus', value: FocusEvent): void;
58
+ (e: 'blur', value: FocusEvent): void;
59
+ (e: 'clear'): void;
60
+ }
61
+
62
+ export declare interface InputProps {
63
+ type?: 'text' | 'number' | 'textarea';
64
+ modelValue: StringOrNumber;
65
+ size?: 'small' | 'medium' | 'large';
66
+ width?: string;
67
+ placeholder?: string;
68
+ disabled?: boolean;
69
+ clearable?: boolean;
70
+ inputStyle?: CSSProperties;
71
+ unit?: string;
72
+ rows?: number;
73
+ }
74
+
75
+ export declare interface RadioEmits {
76
+ (e: 'update:modelValue', value: RadioValue): void;
77
+ (e: 'change', value: RadioValue): void;
78
+ }
79
+
80
+ export declare interface RadioProps {
81
+ modelValue: RadioValue;
82
+ value: RadioValue;
83
+ label?: string;
84
+ disabled?: boolean;
85
+ }
86
+
87
+ export declare type RadioValue = boolean | string | number;
88
+
89
+ declare type StringOrNumber = string | number;
90
+
91
+ export declare const TabPane: DefineComponent<TabPaneProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<TabPaneProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
92
+
93
+ export declare interface TabPaneProps {
94
+ label: string;
95
+ name: string | number;
96
+ }
97
+
98
+ export declare const TABS_KEY: InjectionKey<TabsContext>;
99
+
100
+ export declare interface TabsContext {
101
+ activeName: Ref<string | number>;
102
+ registerTab: (pane: TabPaneProps) => void;
103
+ unregisterTab: (name: string | number) => void;
104
+ }
105
+
106
+ export declare interface TabsEmits {
107
+ (e: 'update:modelValue', name: string | number): void;
108
+ }
109
+
110
+ export declare type TabSize = 'small' | 'medium' | 'large';
111
+
112
+ export declare interface TabsProps {
113
+ modelValue: string | number;
114
+ type?: 'default' | 'card';
115
+ size?: TabSize;
116
+ }
117
+
118
+ export { }
@@ -0,0 +1 @@
1
+ (function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n.CregisUI={},n.Vue))})(this,(function(n,e){"use strict";const o=Symbol("TABS_KEY"),i=e.defineComponent({name:"TabPane",__name:"TabPane",props:{label:{},name:{}},setup(s){const t=s,a=e.inject(o);if(!a)throw new Error("TabPane must be used within Tabs");return e.onMounted(()=>{a.registerTab({label:t.label,name:t.name})}),e.watch(()=>t.label,r=>{a.unregisterTab(t.name),a.registerTab({label:r,name:t.name})}),e.onUnmounted(()=>{a.unregisterTab(t.name)}),()=>{}}});n.TABS_KEY=o,n.TabPane=i,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}));
@@ -0,0 +1 @@
1
+ :root{--system-brand: display-p3 .1216 .7647 .3529;--system-error: display-p3 .8431 .2745 .1765;--system-decor: display-p3 .0078 .1765 .051;--same-black: 2 3 4;--same-white: 255 255 255;--foreground-face: 255 255 255;--foreground-base: 2 3 4;--module-line: 235 236 237;--page: 255 255 255}.dark{--system-brand: display-p3 .1216 .7647 .3529;--system-error: display-p3 .8431 .2745 .1765;--system-decor: display-p3 1 1 1;--same-black: 2 3 4;--same-white: 255 255 255;--foreground-face: 2 3 4;--foreground-base: 255 255 255;--module-line: 0 0 0;--page: 30 33 35}/*! minireset.css v0.0.6 | MIT License | github.com/jgthms/minireset.css */html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}ul{list-style:none}button,input,select{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}:root{--material-vibrant-brand-primary: color(var(--system-brand) / 1);--material-opaque-card-moderate: rgb(var(--foreground-base) / .05);--material-foreground-face-primary: rgb(var(--foreground-face) / 1);--material-foreground-face-quaternary: rgb(var(--foreground-face) / .2);--material-foreground-base-primary: rgb(var(--foreground-base) / 1);--material-foreground-base-secondary: rgb(var(--foreground-base) / .6);--material-foreground-base-quaternary: rgb(var(--foreground-base) / .2);--material-vibrant-error-primary: color(var(--system-error) / 1);--material-decor-primary: color(var(--system-decor) / 1);--material-same-white: rgb(var(--same-white) / 1);--material-opaque-hide: rgb(var(--foreground-base) / 0);--text-base-primary: rgb(var(--foreground-base) / 1);--text-base-secondary: rgb(var(--foreground-base) / .6);--text-base-tertiary: rgb(var(--foreground-base) / .4);--text-base-quaternary: rgb(var(--foreground-base) / .2);--text-face-primary: rgb(var(--foreground-face) / 1);--text-face-secondary: rgb(var(--foreground-face) / .6);--text-same-white: rgb(var(--same-white) / 1);--text-same-white-tap: rgb(var(--same-white) / .6);--text-same-black: rgb(var(--same-black) / 1);--text-same-black-tap: rgb(var(--same-black) / .6);--text-brand-tap: color(var(--system-brand) / .6);--text-brand-40: color(var(--system-brand) / .4);--text-brand-disabled: color(var(--system-brand) / .2);--text-error-tap: color(var(--system-error) / .6);--line-border-deep: rgb(var(--foreground-base) / .18);--line-module: rgb(var(--module-line) / 1);--event-hover-secondary: rgb(var(--foreground-base) / .05);--event-hover-tertiary: rgb(var(--page) / 1);--event-focus-secondary: rgb(var(--foreground-base) / .07)}.dark{--material-opaque-card-moderate: rgb(var(--foreground-base) / .07);--event-hover-secondary: rgb(var(--foreground-base) / .07);--event-focus-secondary: rgb(var(--foreground-base) / .1)}.cregis-input{width:100%;position:relative;display:inline-flex;font-size:15px;line-height:22px;box-sizing:border-box;vertical-align:middle;caret-color:var(--text-base-primary)}.cregis-input.is-disabled{cursor:not-allowed}.cregis-input.is-disabled .cregis-input__inner{color:var(--text-base-quaternary);cursor:not-allowed}.cregis-input__wrapper{position:relative;display:inline-flex;flex-grow:1;align-items:center;justify-content:center;padding:0 12px;background-color:var(--material-opaque-card-moderate);border-radius:6px;border:2px solid transparent}.cregis-input__wrapper.is-focus{border:2px solid var(--material-vibrant-brand-primary);border-radius:6px;background-color:var(--material-foreground-face-quaternary)}.cregis-input__wrapper.is-focus .cregis-input__inner::placeholder{color:var(--text-base-quaternary)}.cregis-input__inner{width:100%;min-width:20px;-webkit-appearance:none;font-size:inherit;padding:0;outline:none;border:none;background:none;box-sizing:border-box;color:var(--text-base-primary)}.cregis-input__inner::placeholder{color:var(--text-base-tertiary)}.cregis-input__inner::-webkit-outer-spin-button,.cregis-input__inner::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.cregis-input--small{height:32px}.cregis-input--medium{height:40px}.cregis-input--large{height:48px}.cregis-input__unit{color:var(--text-base-primary)}.cregis-input__prefix,.cregis-input__suffix{display:inline-flex;white-space:nowrap;flex-shrink:0;flex-wrap:nowrap;height:100%;text-align:center;align-items:center}.cregis-input__prefix>:first-child{margin-left:0!important}.cregis-input__prefix>:last-child{margin-right:8px!important}.cregis-input__suffix>:first-child{margin-left:8px!important}.cregis-input__suffix>:last-child{margin-right:0!important}.cregis-input__clear-button svg g path{fill:var(--material-foreground-base-secondary)}.cregis-input__clear-button:hover svg g path{fill:var(--material-foreground-base-primary)}.cregis-input__clear-button:active svg g path{fill:var(--material-foreground-base-secondary)}.cregis-textarea{position:relative}.cregis-textarea.is-disabled .cregis-textarea__wrapper{color:var(--text-base-quaternary);cursor:not-allowed}.cregis-textarea__wrapper{resize:none;position:relative;display:block;padding:12px;background-color:var(--material-opaque-card-moderate);border-radius:6px;border:2px solid transparent;box-sizing:border-box;width:100%;font-size:inherit;font-family:inherit;background-image:none;-webkit-appearance:none;caret-color:var(--text-base-primary);color:var(--text-base-primary)}.cregis-textarea__wrapper:focus{outline:none;border:2px solid var(--material-vibrant-brand-primary)}.cregis-textarea__wrapper:focus::placeholder{color:var(--text-base-quaternary)}.cregis-textarea__wrapper::placeholder{color:var(--text-base-tertiary)}.cregis-textarea__buttons{position:absolute;bottom:10px;left:12px;display:flex;gap:16px}.cregis-textarea__button{font-size:12px;font-weight:500;cursor:default;color:var(--material-vibrant-brand-primary)}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cregis-button{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;text-align:center;box-sizing:border-box;outline:none;transition:.1s;font-weight:500;-webkit-user-select:none;user-select:none;vertical-align:middle;-webkit-appearance:none;color:var(--text-same-white);background-color:var(--material-vibrant-brand-primary);border:1px solid var(--material-vibrant-brand-primary);font-size:13px;border-radius:30px}.cregis-button:active{color:var(--text-same-white-tap)}.cregis-button.is-plain{color:var(--material-vibrant-brand-primary);background-color:var(--material-opaque-hide)}.cregis-button.is-plain:hover{color:var(--text-same-white);background-color:var(--material-vibrant-brand-primary)}.cregis-button.is-plain:active{color:var(--text-same-white-tap)}.cregis-button.is-text{color:var(--material-vibrant-brand-primary);background-color:var(--material-opaque-hide);border-color:transparent}.cregis-button.is-text:hover{background-color:var(--event-hover-secondary)}.cregis-button.is-text:active{color:var(--text-brand-tap)}.cregis-button.is-block{width:100%}:is(.cregis-button.is-plain.is-loading,.cregis-button.is-text.is-loading):hover{background-color:var(--material-opaque-hide)}.cregis-button .loading{animation:rotate 2s linear infinite}.cregis-button.is-affix{gap:4px}.cregis-button.is-affix svg g path{stroke:var(--text-same-white)}.cregis-button.is-affix span{color:var(--text-same-white)}.cregis-button.is-affix:active svg g path{stroke:var(--text-same-white-tap)}.cregis-button.is-affix:active span{color:var(--text-same-white-tap)}.cregis-button.is-affix.is-disabled span{color:var(--text-base-quaternary)}.cregis-button--secondary{background-color:var(--material-opaque-card-moderate);border-color:transparent;color:var(--text-base-primary)}.cregis-button--secondary:active{color:var(--text-base-secondary)}.cregis-button--secondary.is-plain{border:.5px solid var(--line-border-deep);color:var(--text-base-primary)}.cregis-button--secondary.is-plain:hover{border:.5px solid transparent;color:var(--text-base-primary);background-color:var(--material-opaque-card-moderate)}.cregis-button--secondary.is-plain.is-plain.is-loading{border:.5px solid var(--line-border-deep)}.cregis-button--secondary.is-plain:active{color:var(--text-base-secondary)}.cregis-button--secondary.is-text{color:var(--text-base-primary)}.cregis-button--secondary.is-text:active{color:var(--text-base-secondary)}.cregis-button--danger{background-color:var(--material-vibrant-error-primary);border-color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-plain{color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-plain:hover{background-color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-text{color:var(--material-vibrant-error-primary)}.cregis-button--danger.is-text:active{color:var(--text-error-tap)}.cregis-button--foreground{background-color:var(--material-decor-primary);border-color:var(--material-decor-primary);color:var(--text-face-primary)}.cregis-button--foreground:active{color:var(--text-face-secondary)}.cregis-button--foreground.is-plain{color:var(--material-decor-primary)}.cregis-button--foreground.is-plain:hover{color:var(--text-face-primary);background-color:var(--material-decor-primary)}.cregis-button--foreground.is-plain:active{color:var(--text-face-secondary)}.cregis-button--sameWhite{background-color:var(--material-same-white);border-color:transparent;color:var(--text-same-black)}.cregis-button--sameWhite:active{color:var(--text-same-black-tap)}.cregis-button--large{padding:0 20px;height:40px;font-size:15px;line-height:22px}.cregis-button--medium{padding:0 16px;height:32px;font-size:13px;line-height:18px}.cregis-button--small{padding:0 12px;height:24px;font-size:13px;line-height:18px}.cregis-button--extraSmall{padding:0 12px;height:20px;font-size:12px;line-height:16px}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled{color:var(--text-base-quaternary);background-color:var(--material-opaque-card-moderate);border-color:transparent;cursor:not-allowed}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled svg g path{stroke:var(--material-foreground-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-disabled:active svg g path{stroke:var(--material-foreground-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-plain.is-disabled{border:.5px solid var(--line-border-deep);background-color:var(--material-opaque-hide)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-plain.is-disabled:hover{color:var(--text-base-quaternary)}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-text.is-disabled{background-color:var(--material-opaque-hide);border-color:transparent}:is(.cregis-button,.cregis-button--secondary,.cregis-button--danger,.cregis-button--foreground,.cregis-button--sameWhite).is-text.is-disabled:active{color:var(--text-base-quaternary)}.cregis-button__link{border:none;border-bottom:1px dashed var(--material-opaque-hide);background-color:var(--material-opaque-hide);color:var(--material-vibrant-brand-primary);font-weight:500;padding:0}.cregis-button__link:hover{border-bottom:1px dashed var(--text-brand-40)}.cregis-button__link:active{border-bottom:1px dashed var(--text-brand-disabled);color:var(--text-brand-tap)}.cregis-button__link.is-disabled{color:var(--text-base-quaternary);border-color:transparent;cursor:not-allowed}.cregis-button__link--foreground{color:var(--text-base-primary)}.cregis-button__link--foreground:hover{border-bottom:1px dashed var(--text-base-tertiary)}.cregis-button__link--foreground:active{border-bottom:1px dashed var(--text-base-quaternary);color:var(--text-base-secondary)}.cregis-button__link--foreground.is-disabled{color:var(--text-base-quaternary);border-color:transparent}.cregis-button__link--large{font-size:15px}.cregis-button__link--medium{font-size:13px}.cregis-button__link--small,.cregis-button__link--extraSmall{font-size:12px}.cregis-button__icon-wrapper{display:flex;flex-direction:column;align-items:center}.cregis-button__icon{display:flex;justify-content:center;align-items:center;border-color:transparent;background-color:var(--material-opaque-hide);padding:0;border-radius:6px}.cregis-button__icon svg g path{stroke:var(--material-foreground-base-secondary)}.cregis-button__icon:hover{background-color:var(--event-hover-secondary)}.cregis-button__icon:hover svg g path{stroke:var(--material-foreground-base-primary)}.cregis-button__icon:active{background-color:var(--event-focus-secondary)}.cregis-button__icon:active svg g path{stroke:var(--material-foreground-base-secondary)}.cregis-button__icon.is-disabled{cursor:not-allowed}.cregis-button__icon.is-disabled svg g path{stroke:var(--material-foreground-base-quaternary)}.cregis-button__icon.is-disabled:hover{background-color:var(--material-opaque-hide)}.cregis-button__icon--rectangle.cregis-button__icon--large{width:36px;height:28px}.cregis-button__icon--rectangle.cregis-button__icon--medium{width:32px;height:24px}.cregis-button__icon--rectangle.cregis-button__icon--small,.cregis-button__icon--rectangle.cregis-button__icon--extraSmall{width:26px;height:20px}:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--large{width:28px;height:28px}:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--medium{width:24px;height:24px}:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--small,:is(.cregis-button__icon--square,.cregis-button__icon--circle).cregis-button__icon--extraSmall{width:20px;height:20px}.cregis-button__icon--circle{border-radius:50%}.cregis-button__icon--professional{width:32px;height:24px}.cregis-button__icon-text{font-size:11px;line-height:14px;font-weight:500;color:var(--text-base-secondary)}.cregis-button__icon-text.is-disabled{cursor:not-allowed;color:var(--text-base-quaternary)}.cregis-checkbox__wrapper{width:fit-content;display:flex;align-items:center;gap:8px;cursor:default;-webkit-user-select:none;user-select:none}.cregis-checkbox{width:16px;height:16px;border:1px solid var(--line-border-deep);border-radius:4px;display:flex;align-items:center;justify-content:center}.cregis-checkbox svg{visibility:hidden}.cregis-checkbox:hover svg{color:var(--line-border-deep);visibility:visible}.cregis-checkbox.is-checked,.cregis-checkbox.is-indeterminate{border:1px solid var(--material-vibrant-brand-primary)!important;background-color:var(--material-vibrant-brand-primary)!important}:is(.cregis-checkbox.is-checked,.cregis-checkbox.is-indeterminate) svg{visibility:visible!important;color:var(--material-same-white)}.cregis-checkbox.is-circle{border-radius:50%}.cregis-checkbox.is-disabled{cursor:not-allowed;background-color:var(--material-opaque-card-moderate)}.cregis-checkbox.is-disabled:hover svg{visibility:hidden}.cregis-checkbox.is-checked.is-disabled{opacity:.6}.cregis-checkbox__label{font-size:15px;font-weight:500;color:var(--text-base-secondary)}.cregis-checkbox__label.is-disabled{cursor:not-allowed}.cregis-checkbox--indeterminate{width:8px;height:1.5px;border-radius:1px;background-color:var(--material-same-white)}.cregis-radio__wrapper{width:fit-content;display:flex;align-items:center;gap:8px;cursor:default;-webkit-user-select:none;user-select:none}.cregis-radio{width:16px;height:16px;border:1px solid var(--line-border-deep);border-radius:50%;display:flex;align-items:center;justify-content:center}.cregis-radio:hover .cregis-radio__inner{visibility:visible}.cregis-radio.is-checked{border:1px solid var(--material-vibrant-brand-primary)!important;background-color:var(--material-vibrant-brand-primary)!important}.cregis-radio.is-checked .cregis-radio__inner{visibility:visible!important;background-color:var(--text-same-white)}.cregis-radio.is-disabled{cursor:not-allowed;background-color:var(--material-opaque-card-moderate)}.cregis-radio.is-disabled:hover .cregis-radio__inner{visibility:hidden}.cregis-radio.is-checked.is-disabled{opacity:.6}.cregis-radio__inner{width:6px;height:6px;border-radius:50%;background-color:var(--material-foreground-base-quaternary);visibility:hidden}.cregis-radio__label{font-size:15px;font-weight:500;color:var(--text-base-secondary)}.cregis-radio__label.is-disabled{cursor:not-allowed}.cregis-divider{display:flex;align-items:center}.cregis-divider--horizontal{flex-direction:row}.cregis-divider--vertical{flex-direction:column}.cregis-tabs{display:flex;gap:16px;width:fit-content;height:29px;font-size:13px;font-weight:500;color:var(--text-base-primary);cursor:default}.cregis-tabs__item{border-bottom:2px solid var(--material-opaque-hide);transition:color .2s ease,border-color .2s ease}.cregis-tabs__item.is-active{color:var(--material-vibrant-brand-primary);border-bottom:2px solid var(--material-vibrant-brand-primary)}.cregis-tabs--large{height:33px;font-size:15px}.cregis-tabs--small{height:28px;font-size:12px}.cregis-tabs--card{height:28px;background-color:var(--material-opaque-card-moderate);border-radius:14px;padding:3px;font-size:12px;gap:6px}.cregis-tabs--card.cregis-tabs--large{height:32px;border-radius:16px}.cregis-tabs--card.cregis-tabs--small{height:24px;border-radius:12px}.cregis-tabs--card .cregis-tabs__item{display:flex;align-items:center;justify-content:center;border:none;padding:0 6px}.cregis-tabs--card .cregis-tabs__item.is-active{color:var(--text-base-primary);background-color:var(--event-hover-tertiary)}
Binary file
package/package.json CHANGED
@@ -1,57 +1,79 @@
1
- {
2
- "name": "@cregis/ui",
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
- },
14
- "files": [
15
- "dist"
16
- ],
17
- "publishConfig": {
18
- "access": "public"
19
- },
20
- "scripts": {
21
- "dev": "vite",
22
- "build": "run-p type-check build-only",
23
- "preview": "vite preview --port 4173",
24
- "build-only": "vite build",
25
- "build:components": "vue-tsc -b && vite build --config vite.components.config.ts",
26
- "type-check": "vue-tsc --noEmit",
27
- "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
28
- },
29
- "dependencies": {
30
- "@cregis/color": "^0.0.3"
31
- },
32
- "devDependencies": {
33
- "@rushstack/eslint-patch": "^1.1.4",
34
- "@types/node": "^16.11.56",
35
- "@vitejs/plugin-vue": "^3.0.3",
36
- "@vitejs/plugin-vue-jsx": "^2.0.1",
37
- "@vue/eslint-config-prettier": "^7.0.0",
38
- "@vue/eslint-config-typescript": "^11.0.0",
39
- "@vue/tsconfig": "^0.1.3",
40
- "eslint": "^8.22.0",
41
- "eslint-plugin-vue": "^9.3.0",
42
- "less": "^4.2.2",
43
- "npm-run-all": "^4.1.5",
44
- "prettier": "^2.7.1",
45
- "tailwindcss": "3",
46
- "typescript": "~5.7.2",
47
- "vite": "^3.0.9",
48
- "vite-plugin-dts": "^4.5.3",
49
- "vue-tsc": "^2.2.4",
50
- "autoprefixer": "^10.4.21",
51
- "pinia": "^2.0.21",
52
- "vue-router": "^4.1.5"
53
- },
54
- "peerDependencies": {
55
- "vue": "^3.2.0"
56
- }
57
- }
1
+ {
2
+ "name": "@cregis/ui",
3
+ "private": false,
4
+ "version": "0.1.1",
5
+ "type": "module",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "sideEffects": [
10
+ "dist/index.css"
11
+ ],
12
+ "main": "./dist/umd/cregis-ui.umd.cjs",
13
+ "module": "./dist/es/cregis-ui.js",
14
+ "types": "./dist/types/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/types/index.d.ts",
18
+ "import": "./dist/es/cregis-ui.js",
19
+ "require": "./dist/umd/cregis-ui.umd.cjs"
20
+ },
21
+ "./dist/": {
22
+ "import": "./dist/",
23
+ "require": "./dist/"
24
+ }
25
+ },
26
+ "scripts": {
27
+ "dev": "vite --host",
28
+ "build": "npm run build-only && npm run move-style",
29
+ "build-only": "run-p build-es build-umd",
30
+ "build-umd": "vite build --config vite.umd.config.ts",
31
+ "build-es": "vite build --config vite.es.config.ts",
32
+ "move-style": "move-file dist/es/index.css dist/index.css",
33
+ "preview": "vite preview",
34
+ "prepare": "husky install"
35
+ },
36
+ "peerDependencies": {
37
+ "@cregis/icon": "^0.1.10",
38
+ "vue": "^3.5.0"
39
+ },
40
+ "devDependencies": {
41
+ "@commitlint/cli": "^20.1.0",
42
+ "@commitlint/config-conventional": "^20.0.0",
43
+ "@cregis/icon": "^0.1.14",
44
+ "@rushstack/eslint-patch": "^1.14.1",
45
+ "@types/node": "^24.6.0",
46
+ "@vitejs/plugin-vue": "^6.0.1",
47
+ "@vue/eslint-config-typescript": "^14.6.0",
48
+ "@vue/tsconfig": "^0.8.1",
49
+ "husky": "^9.1.7",
50
+ "lint-staged": "^16.2.6",
51
+ "move-file-cli": "^3.0.0",
52
+ "npm-run-all": "^4.1.5",
53
+ "prettier": "^3.6.2",
54
+ "stylelint": "^16.25.0",
55
+ "stylelint-config-standard": "^39.0.1",
56
+ "typescript": "~5.9.3",
57
+ "vite": "^7.1.7",
58
+ "vite-plugin-dts": "^4.5.4",
59
+ "vue": "^3.5.24",
60
+ "vue-tsc": "^3.1.0"
61
+ },
62
+ "husky": {
63
+ "hooks": {
64
+ "pre-commit": "lint-staged",
65
+ "commit-msg": "commitlint --config .commitlintrc.cjs -E HUSKY_GIT_PARAMS"
66
+ }
67
+ },
68
+ "lint-staged": {
69
+ "*.{ts,tsx,js,jsx}": [
70
+ "eslint --config .eslintrc.cjs"
71
+ ],
72
+ "*.{css,less,scss}": [
73
+ "stylelint --config .stylelintrc.cjs"
74
+ ],
75
+ "*.{ts,tsx,js,json,html,yml,css,less,scss,md}": [
76
+ "prettier --write"
77
+ ]
78
+ }
79
+ }
package/dist/index.es.js DELETED
@@ -1,137 +0,0 @@
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
- }, t)
7
- for (const [n, s] of Object.entries(t))
8
- e[n] = s;
9
- return e;
10
- }, k = ["width", "height"], B = /* @__PURE__ */ c({
11
- __name: "ButtonLoading",
12
- props: {
13
- size: { default: "20px" }
14
- },
15
- setup(e) {
16
- return (t, n) => (a(), u("svg", {
17
- class: "shrink-0 loading",
18
- width: t.size,
19
- height: t.size,
20
- viewBox: "0 0 20 20",
21
- version: "1.1",
22
- xmlns: "http://www.w3.org/2000/svg",
23
- "xmlns:xlink": "http://www.w3.org/1999/xlink"
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
- }
28
- });
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",
36
- __name: "Button",
37
- props: {
38
- loading: { type: Boolean, default: !1 },
39
- disabled: { type: Boolean, default: !1 },
40
- width: {},
41
- size: { default: "small" },
42
- type: { default: "primary" },
43
- fit: { type: Boolean, default: !1 }
44
- },
45
- emits: ["click"],
46
- setup(e) {
47
- const t = e, n = {
48
- minimum: {
49
- height: "1.25rem"
50
- },
51
- small: {
52
- height: "1.5rem"
53
- },
54
- middle: {
55
- height: "1.75rem"
56
- },
57
- large: {
58
- height: "2.5rem"
59
- }
60
- }, s = {
61
- minimum: {
62
- paddingLeft: "8px",
63
- paddingRight: "8px"
64
- },
65
- small: {
66
- paddingLeft: "1rem",
67
- paddingRight: "1rem"
68
- },
69
- middle: {
70
- paddingLeft: "1rem",
71
- paddingRight: "1rem"
72
- },
73
- large: {
74
- paddingLeft: "2rem",
75
- paddingRight: "2rem"
76
- }
77
- }, i = {
78
- primary: "cgbtn_primary-disabled",
79
- cancel: "cgbtn_cancel-disabled",
80
- failure: "cgbtn_failure-disabled",
81
- success: "cgbtn_success-disabled",
82
- text: "cgbtn_text-disabled",
83
- hollow: "cgbtn_hollow-disabled",
84
- tint: "cgbtn_tint-disabled"
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], {
89
- ...t.width ? { width: t.width } : {},
90
- ...t.fit ? s[t.size] : {}
91
- })
92
- ), m = l(() => {
93
- switch (t.type) {
94
- case "primary":
95
- return "cgbtn_primary";
96
- case "cancel":
97
- return "cgbtn_cancel";
98
- case "failure":
99
- return "cgbtn_failure";
100
- case "success":
101
- return "cgbtn_success";
102
- case "text":
103
- return "cgbtn_text";
104
- case "hollow":
105
- return "cgbtn_hollow";
106
- case "tint":
107
- return "cgbtn_tint";
108
- default:
109
- return "cgbtn_primary";
110
- }
111
- });
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"]))
117
- }, [
118
- o.loading ? (a(), y(z, {
119
- key: 0,
120
- size: "1rem"
121
- })) : v(o.$slots, "default", { key: 1 }, void 0, !0)
122
- ], 14, M));
123
- }
124
- });
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
- };
134
- export {
135
- I as default,
136
- O as install
137
- };
package/dist/index.umd.js DELETED
@@ -1 +0,0 @@
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"}})});
@@ -1,28 +0,0 @@
1
- import { Props } from './button';
2
- declare function __VLS_template(): {
3
- attrs: Partial<{}>;
4
- slots: {
5
- default?(_: {}): any;
6
- };
7
- refs: {};
8
- rootEl: HTMLButtonElement;
9
- };
10
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
- declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
- click: (...args: any[]) => void;
13
- }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
14
- onClick?: ((...args: any[]) => any) | undefined;
15
- }>, {
16
- size: "minimum" | "small" | "middle" | "large";
17
- type: "primary" | "cancel" | "failure" | "success" | "text" | "hollow" | "tint";
18
- loading: boolean;
19
- disabled: boolean;
20
- fit: boolean;
21
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
22
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
23
- export default _default;
24
- type __VLS_WithTemplateSlots<T, S> = T & {
25
- new (): {
26
- $slots: S;
27
- };
28
- };
@@ -1,8 +0,0 @@
1
- export interface Props {
2
- loading?: boolean;
3
- disabled?: boolean;
4
- width?: string;
5
- size?: "minimum" | "small" | "middle" | "large";
6
- type?: "primary" | "cancel" | "failure" | "success" | "text" | "hollow" | "tint";
7
- fit?: boolean;
8
- }
@@ -1,7 +0,0 @@
1
- import { SFCWithInstall } from '../utils/install';
2
- import { default as Button } from './Button.vue';
3
- type ButtonInstance = InstanceType<typeof Button> & unknown;
4
- export * from './button';
5
- export declare const CgButton: SFCWithInstall<typeof Button>;
6
- export default CgButton;
7
- export type { ButtonInstance };
@@ -1,2 +0,0 @@
1
- export * from './button';
2
- export * from './icon';
@@ -1 +0,0 @@
1
- export * from './static';
@@ -1,2 +0,0 @@
1
- import { default as ButtonLoading } from './ButtonLoading.vue';
2
- export { ButtonLoading };
@@ -1,7 +0,0 @@
1
- interface Props {
2
- size?: string;
3
- }
4
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
5
- size: string;
6
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, SVGSVGElement>;
7
- export default _default;
@@ -1 +0,0 @@
1
- export * from './ButtonLoading.vue';
@@ -1,10 +0,0 @@
1
- import { AppContext, Directive, Plugin } from 'vue';
2
- export type SFCWithInstall<T> = T & Plugin;
3
- export type SFCInstallWithContext<T> = SFCWithInstall<T> & {
4
- _context: AppContext | null;
5
- };
6
- export declare const NOOP: () => void;
7
- export declare const withInstall: <T, E extends Record<string, any>>(main: T, extra?: E) => SFCWithInstall<T> & E;
8
- export declare const withInstallFunction: <T>(fn: T, name: string) => SFCInstallWithContext<T>;
9
- export declare const withInstallDirective: <T extends Directive>(directive: T, name: string) => SFCWithInstall<T>;
10
- export declare const withNoopInstall: <T>(component: T) => SFCWithInstall<T>;