rappel-ui 1.0.0
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/cjs/_virtual/_plugin-vue_export-helper.js +1 -0
- package/cjs/components/button/index.d.ts +33 -0
- package/cjs/components/button/index.js +1 -0
- package/cjs/components/button/src/button.d.ts +3 -0
- package/cjs/components/button/src/button.vue.js +1 -0
- package/cjs/components/button/src/button.vue2.js +1 -0
- package/cjs/components/button/src/constants.d.ts +4 -0
- package/cjs/components/button/src/constants.js +1 -0
- package/cjs/components/button/src/types.d.ts +16 -0
- package/cjs/components/button/style/css.d.ts +0 -0
- package/cjs/components/button/style/index.d.ts +0 -0
- package/cjs/components/colors/index.d.ts +7 -0
- package/cjs/components/colors/index.js +1 -0
- package/cjs/components/colors/src/colors.vue.js +1 -0
- package/cjs/components/colors/src/colors.vue2.js +1 -0
- package/cjs/components/colors/src/neutral-color.css +1 -0
- package/cjs/components/colors/src/neutral-color.vue.js +1 -0
- package/cjs/components/colors/src/neutral-color.vue2.js +1 -0
- package/cjs/components/colors/src/primary-color.css +1 -0
- package/cjs/components/colors/src/primary-color.vue.js +1 -0
- package/cjs/components/colors/src/primary-color.vue2.js +1 -0
- package/cjs/components/colors/src/secondary-color.css +1 -0
- package/cjs/components/colors/src/secondary-color.vue.js +1 -0
- package/cjs/components/colors/src/secondary-color.vue2.js +1 -0
- package/cjs/components/index.d.ts +4 -0
- package/cjs/components/index.js +1 -0
- package/cjs/components/input/index.d.ts +25 -0
- package/cjs/components/input/index.js +1 -0
- package/cjs/components/input/src/input.vue.js +1 -0
- package/cjs/components/input/src/input.vue2.js +1 -0
- package/cjs/components/tabs/index.d.ts +20 -0
- package/cjs/components/tabs/index.js +1 -0
- package/cjs/components/tabs/src/tabs.vue.js +1 -0
- package/cjs/composables/index.d.ts +6 -0
- package/cjs/composables/use-namespace/index.d.ts +12 -0
- package/cjs/composables/use-namespace/index.js +1 -0
- package/cjs/composables/useDateFormat.d.ts +7 -0
- package/cjs/composables/useDateFormat.js +1 -0
- package/cjs/composables/useDraggable.d.ts +10 -0
- package/cjs/composables/useDraggable.js +1 -0
- package/cjs/composables/useOnceFn.d.ts +24 -0
- package/cjs/composables/useOnceFn.js +1 -0
- package/cjs/composables/useTimeNodes.d.ts +3 -0
- package/cjs/composables/useTimeNodes.js +1 -0
- package/cjs/composables/useWaterFallLayout.d.ts +10 -0
- package/cjs/composables/useWaterFallLayout.js +1 -0
- package/cjs/constants/index.d.ts +1 -0
- package/cjs/constants/svgLoading.d.ts +2 -0
- package/cjs/constants/svgLoading.js +36 -0
- package/cjs/directives/index.d.ts +3 -0
- package/cjs/directives/vDraggable.d.ts +2 -0
- package/cjs/directives/vDraggable.js +1 -0
- package/cjs/directives/vResizable.d.ts +14 -0
- package/cjs/directives/vResizable.js +21 -0
- package/cjs/directives/vSvgLoading.d.ts +4 -0
- package/cjs/directives/vSvgLoading.js +1 -0
- package/cjs/index.d.ts +86 -0
- package/cjs/index.js +1 -0
- package/cjs/package.json.js +1 -0
- package/cjs/purple-ui/index.d.ts +1 -0
- package/cjs/purple-ui/resolver.d.ts +2 -0
- package/cjs/purple-ui/resolver.js +1 -0
- package/cjs/theme-chalk/src/base.css +1 -0
- package/cjs/theme-chalk/src/button.css +1 -0
- package/cjs/utils/index.d.ts +2 -0
- package/cjs/utils/util.d.ts +143 -0
- package/cjs/utils/util.js +3 -0
- package/cjs/utils/vue/index.d.ts +17 -0
- package/cjs/utils/vue/index.js +1 -0
- package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/components/button/index.d.ts +33 -0
- package/es/components/button/index.mjs +6 -0
- package/es/components/button/src/button.d.ts +3 -0
- package/es/components/button/src/button.vue.mjs +74 -0
- package/es/components/button/src/button.vue2.mjs +4 -0
- package/es/components/button/src/constants.d.ts +4 -0
- package/es/components/button/src/constants.mjs +5 -0
- package/es/components/button/src/types.d.ts +16 -0
- package/es/components/button/style/css.d.ts +0 -0
- package/es/components/button/style/index.d.ts +0 -0
- package/es/components/colors/index.d.ts +7 -0
- package/es/components/colors/index.mjs +16 -0
- package/es/components/colors/src/colors.vue.mjs +21 -0
- package/es/components/colors/src/colors.vue2.mjs +4 -0
- package/es/components/colors/src/neutral-color.css +1 -0
- package/es/components/colors/src/neutral-color.vue.mjs +7 -0
- package/es/components/colors/src/neutral-color.vue2.mjs +195 -0
- package/es/components/colors/src/primary-color.css +1 -0
- package/es/components/colors/src/primary-color.vue.mjs +7 -0
- package/es/components/colors/src/primary-color.vue2.mjs +33 -0
- package/es/components/colors/src/secondary-color.css +1 -0
- package/es/components/colors/src/secondary-color.vue.mjs +7 -0
- package/es/components/colors/src/secondary-color.vue2.mjs +54 -0
- package/es/components/index.d.ts +4 -0
- package/es/components/index.mjs +20 -0
- package/es/components/input/index.d.ts +25 -0
- package/es/components/input/index.mjs +6 -0
- package/es/components/input/src/input.vue.mjs +15 -0
- package/es/components/input/src/input.vue2.mjs +4 -0
- package/es/components/tabs/index.d.ts +20 -0
- package/es/components/tabs/index.mjs +6 -0
- package/es/components/tabs/src/tabs.vue.mjs +17 -0
- package/es/composables/index.d.ts +6 -0
- package/es/composables/use-namespace/index.d.ts +12 -0
- package/es/composables/use-namespace/index.mjs +21 -0
- package/es/composables/useDateFormat.d.ts +7 -0
- package/es/composables/useDateFormat.mjs +20 -0
- package/es/composables/useDraggable.d.ts +10 -0
- package/es/composables/useDraggable.mjs +55 -0
- package/es/composables/useOnceFn.d.ts +24 -0
- package/es/composables/useOnceFn.mjs +32 -0
- package/es/composables/useTimeNodes.d.ts +3 -0
- package/es/composables/useTimeNodes.mjs +24 -0
- package/es/composables/useWaterFallLayout.d.ts +10 -0
- package/es/composables/useWaterFallLayout.mjs +51 -0
- package/es/constants/index.d.ts +1 -0
- package/es/constants/svgLoading.d.ts +2 -0
- package/es/constants/svgLoading.mjs +39 -0
- package/es/directives/index.d.ts +3 -0
- package/es/directives/vDraggable.d.ts +2 -0
- package/es/directives/vDraggable.mjs +13 -0
- package/es/directives/vResizable.d.ts +14 -0
- package/es/directives/vResizable.mjs +136 -0
- package/es/directives/vSvgLoading.d.ts +4 -0
- package/es/directives/vSvgLoading.mjs +48 -0
- package/es/index.d.ts +86 -0
- package/es/index.mjs +76 -0
- package/es/package.json.mjs +4 -0
- package/es/purple-ui/index.d.ts +1 -0
- package/es/purple-ui/resolver.d.ts +2 -0
- package/es/purple-ui/resolver.mjs +18 -0
- package/es/theme-chalk/src/base.css +1 -0
- package/es/theme-chalk/src/button.css +1 -0
- package/es/utils/index.d.ts +2 -0
- package/es/utils/util.d.ts +143 -0
- package/es/utils/util.mjs +151 -0
- package/es/utils/vue/index.d.ts +17 -0
- package/es/utils/vue/index.mjs +36 -0
- package/global.d.ts +7 -0
- package/package.json +65 -0
- package/theme-chalk/base.css +148 -0
- package/theme-chalk/css-vars/_button.css +35 -0
- package/theme-chalk/css-vars/_colors.css +51 -0
- package/theme-chalk/function/_button.css +35 -0
- package/theme-chalk/function/index.css +35 -0
- package/theme-chalk/index.css +560 -0
- package/theme-chalk/mixins/_button.css +35 -0
- package/theme-chalk/mixins/index.css +35 -0
- package/theme-chalk/pu-button.css +446 -0
- package/theme-chalk/root-vars.css +132 -0
- package/theme-chalk/src/base.scss +30 -0
- package/theme-chalk/src/button.scss +104 -0
- package/theme-chalk/src/common/_function.scss +46 -0
- package/theme-chalk/src/css-vars/_button.scss +47 -0
- package/theme-chalk/src/css-vars/_colors.scss +82 -0
- package/theme-chalk/src/css-vars/_namespace.scss +12 -0
- package/theme-chalk/src/function/_button.scss +2 -0
- package/theme-chalk/src/function/index.scss +155 -0
- package/theme-chalk/src/index.scss +2 -0
- package/theme-chalk/src/mixins/_button.scss +140 -0
- package/theme-chalk/src/mixins/index.scss +25 -0
- package/theme-chalk/src/root-vars.scss +13 -0
- package/umd/index.js +59 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@charset "UTF-8";.pu-button{display:inline-flex;align-items:center;justify-content:center;text-align:center;cursor:pointer;white-space:nowrap;box-sizing:border-box;transition:all .3s ease;-webkit-user-select:none;user-select:none;outline:none;vertical-align:middle;height:32px;line-height:1;-webkit-appearance:none;appearance:none;position:relative;padding:8px 16px;border-radius:4px;border-width:1px;border-style:solid;background-color:var(--pu-button-bgcolor);color:var(--pu-button-color);border-color:var(--pu-button-border-color)}.pu-button__content{display:inline-flex;align-items:center}@keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.pu-button__loading{animation:rotating 2s linear infinite}.pu-button__loading+*{margin-left:4px}.pu-button__icon{margin-right:4px;width:1em;height:1em}.pu-button.is-link{padding:2px;height:auto;border-color:var(--pu-color-fill-transparent);background-color:var(--pu-color-fill-transparent);text-decoration:underline}.pu-button.is-plain:hover:not(.is-disabled){border-color:var(--pu-color-primary-base);background-color:var(--pu-color-fill-blank)}.pu-button.is-round{border-radius:20px}.pu-button.is-circle{width:32px;border-radius:50%;padding:8px}.pu-button:active:not(.is-disabled){transform:scale(.97);transition:transform 0s ease}.pu-button:focus-visible{outline:none}.pu-button+.pu-button{margin-left:10px}.pu-button{--pu-button-bgcolor: var(--pu-color-fill-blank);--pu-button-color: var(--pu-color-text-secondary);--pu-button-border-color: var(--pu-color-border-base)}.pu-button:hover:not(.is-disabled){--pu-button-bgcolor: var(--pu-color-primary-shade-1);--pu-button-color: var(--pu-color-primary-base);--pu-button-border-color: var(--pu-color-primary-shade-4)}.pu-button.is-disabled{cursor:not-allowed;background-color:var(--pu-color-fill-blank);border-color:var(--pu-color-border-base);color:var(--pu-color-text-disabled)}.pu-button.is-link{--pu-button-color: var(--pu-color-text-secondary)}.pu-button.is-link:hover:not(.is-disabled){--pu-button-color: var(--pu-color-primary-base);--pu-button-bgcolor: transparent;--pu-button-border-color: transparent}.pu-button.is-link.is-disabled{background-color:var(--pu-color-fill-blank);border-color:var(--pu-color-fill-blank);color:var(--pu-color-text-disabled)}.pu-button.is-loading:before{z-index:1;content:"";position:absolute;inset:-1px;pointer-events:none;border-radius:inherit;background-color:#ffffff80}.pu-button--primary{--pu-button-bgcolor: var(--pu-color-primary-base);--pu-button-color: var(--pu-color-text-lightest);--pu-button-border-color: var(--pu-color-primary-base)}.pu-button--primary:hover:not(.is-disabled){--pu-button-bgcolor: var(--pu-color-primary-hover);--pu-button-color: var(--pu-color-text-lightest);--pu-button-border-color: var(--pu-color-primary-hover)}.pu-button--primary.is-disabled{cursor:not-allowed;background-color:var(--pu-color-primary-shade-4);border-color:var(--pu-color-primary-shade-4);color:var(--pu-color-fill-blank)}.pu-button--primary.is-link{--pu-button-color: var(--pu-color-primary-base)}.pu-button--primary.is-link:hover:not(.is-disabled){--pu-button-color: var(--pu-color-primary-hover);--pu-button-bgcolor: transparent;--pu-button-border-color: transparent}.pu-button--primary.is-link.is-disabled{background-color:var(--pu-color-fill-blank);border-color:var(--pu-color-fill-blank);color:var(--pu-color-primary-shade-4)}.pu-button--primary.is-plain{background-color:var(--pu-color-primary-shade-1);color:var(--pu-color-primary-base);border-color:var(--pu-color-primary-shade-6)}.pu-button--primary.is-plain:hover:not(.is-disabled){color:var(--pu-color-fill-blank);background-color:var(--pu-color-primary-base);border-color:var(--pu-color-primary-base)}.pu-button--primary.is-plain.is-disabled{background-color:var(--pu-color-primary-shade-1);color:var(--pu-color-primary-shade-4);border-color:var(--pu-color-primary-shade-4)}.pu-button--primary.is-loading:before{z-index:1;content:"";position:absolute;inset:-1px;pointer-events:none;border-radius:inherit;background-color:#ffffff80}.pu-button--success{--pu-button-bgcolor: var(--pu-color-success-base);--pu-button-color: var(--pu-color-text-lightest);--pu-button-border-color: var(--pu-color-success-base)}.pu-button--success:hover:not(.is-disabled){--pu-button-bgcolor: var(--pu-color-success-hover);--pu-button-color: var(--pu-color-text-lightest);--pu-button-border-color: var(--pu-color-success-hover)}.pu-button--success.is-disabled{cursor:not-allowed;background-color:var(--pu-color-success-shade-4);border-color:var(--pu-color-success-shade-4);color:var(--pu-color-fill-blank)}.pu-button--success.is-link{--pu-button-color: var(--pu-color-success-base)}.pu-button--success.is-link:hover:not(.is-disabled){--pu-button-color: var(--pu-color-success-hover);--pu-button-bgcolor: transparent;--pu-button-border-color: transparent}.pu-button--success.is-link.is-disabled{background-color:var(--pu-color-fill-blank);border-color:var(--pu-color-fill-blank);color:var(--pu-color-success-shade-4)}.pu-button--success.is-plain{background-color:var(--pu-color-success-shade-1);color:var(--pu-color-success-base);border-color:var(--pu-color-success-shade-6)}.pu-button--success.is-plain:hover:not(.is-disabled){color:var(--pu-color-fill-blank);background-color:var(--pu-color-success-base);border-color:var(--pu-color-success-base)}.pu-button--success.is-plain.is-disabled{background-color:var(--pu-color-success-shade-1);color:var(--pu-color-success-shade-4);border-color:var(--pu-color-success-shade-4)}.pu-button--success.is-loading:before{z-index:1;content:"";position:absolute;inset:-1px;pointer-events:none;border-radius:inherit;background-color:#ffffff80}.pu-button--danger{--pu-button-bgcolor: var(--pu-color-danger-base);--pu-button-color: var(--pu-color-text-lightest);--pu-button-border-color: var(--pu-color-danger-base)}.pu-button--danger:hover:not(.is-disabled){--pu-button-bgcolor: var(--pu-color-danger-hover);--pu-button-color: var(--pu-color-text-lightest);--pu-button-border-color: var(--pu-color-danger-hover)}.pu-button--danger.is-disabled{cursor:not-allowed;background-color:var(--pu-color-danger-shade-4);border-color:var(--pu-color-danger-shade-4);color:var(--pu-color-fill-blank)}.pu-button--danger.is-link{--pu-button-color: var(--pu-color-danger-base)}.pu-button--danger.is-link:hover:not(.is-disabled){--pu-button-color: var(--pu-color-danger-hover);--pu-button-bgcolor: transparent;--pu-button-border-color: transparent}.pu-button--danger.is-link.is-disabled{background-color:var(--pu-color-fill-blank);border-color:var(--pu-color-fill-blank);color:var(--pu-color-danger-shade-4)}.pu-button--danger.is-plain{background-color:var(--pu-color-danger-shade-1);color:var(--pu-color-danger-base);border-color:var(--pu-color-danger-shade-6)}.pu-button--danger.is-plain:hover:not(.is-disabled){color:var(--pu-color-fill-blank);background-color:var(--pu-color-danger-base);border-color:var(--pu-color-danger-base)}.pu-button--danger.is-plain.is-disabled{background-color:var(--pu-color-danger-shade-1);color:var(--pu-color-danger-shade-4);border-color:var(--pu-color-danger-shade-4)}.pu-button--danger.is-loading:before{z-index:1;content:"";position:absolute;inset:-1px;pointer-events:none;border-radius:inherit;background-color:#ffffff80}.pu-button--warning{--pu-button-bgcolor: var(--pu-color-warning-base);--pu-button-color: var(--pu-color-text-lightest);--pu-button-border-color: var(--pu-color-warning-base)}.pu-button--warning:hover:not(.is-disabled){--pu-button-bgcolor: var(--pu-color-warning-hover);--pu-button-color: var(--pu-color-text-lightest);--pu-button-border-color: var(--pu-color-warning-hover)}.pu-button--warning.is-disabled{cursor:not-allowed;background-color:var(--pu-color-warning-shade-4);border-color:var(--pu-color-warning-shade-4);color:var(--pu-color-fill-blank)}.pu-button--warning.is-link{--pu-button-color: var(--pu-color-warning-base)}.pu-button--warning.is-link:hover:not(.is-disabled){--pu-button-color: var(--pu-color-warning-hover);--pu-button-bgcolor: transparent;--pu-button-border-color: transparent}.pu-button--warning.is-link.is-disabled{background-color:var(--pu-color-fill-blank);border-color:var(--pu-color-fill-blank);color:var(--pu-color-warning-shade-4)}.pu-button--warning.is-plain{background-color:var(--pu-color-warning-shade-1);color:var(--pu-color-warning-base);border-color:var(--pu-color-warning-shade-6)}.pu-button--warning.is-plain:hover:not(.is-disabled){color:var(--pu-color-fill-blank);background-color:var(--pu-color-warning-base);border-color:var(--pu-color-warning-base)}.pu-button--warning.is-plain.is-disabled{background-color:var(--pu-color-warning-shade-1);color:var(--pu-color-warning-shade-4);border-color:var(--pu-color-warning-shade-4)}.pu-button--warning.is-loading:before{z-index:1;content:"";position:absolute;inset:-1px;pointer-events:none;border-radius:inherit;background-color:#ffffff80}.pu-button--info{--pu-button-bgcolor: var(--pu-color-info-base);--pu-button-color: var(--pu-color-text-lightest);--pu-button-border-color: var(--pu-color-info-base)}.pu-button--info:hover:not(.is-disabled){--pu-button-bgcolor: var(--pu-color-info-hover);--pu-button-color: var(--pu-color-text-lightest);--pu-button-border-color: var(--pu-color-info-hover)}.pu-button--info.is-disabled{cursor:not-allowed;background-color:var(--pu-color-info-shade-4);border-color:var(--pu-color-info-shade-4);color:var(--pu-color-fill-blank)}.pu-button--info.is-link{--pu-button-color: var(--pu-color-info-base)}.pu-button--info.is-link:hover:not(.is-disabled){--pu-button-color: var(--pu-color-info-hover);--pu-button-bgcolor: transparent;--pu-button-border-color: transparent}.pu-button--info.is-link.is-disabled{background-color:var(--pu-color-fill-blank);border-color:var(--pu-color-fill-blank);color:var(--pu-color-info-shade-4)}.pu-button--info.is-plain{background-color:var(--pu-color-info-shade-1);color:var(--pu-color-info-base);border-color:var(--pu-color-info-shade-6)}.pu-button--info.is-plain:hover:not(.is-disabled){color:var(--pu-color-fill-blank);background-color:var(--pu-color-info-base);border-color:var(--pu-color-info-base)}.pu-button--info.is-plain.is-disabled{background-color:var(--pu-color-info-shade-1);color:var(--pu-color-info-shade-4);border-color:var(--pu-color-info-shade-4)}.pu-button--info.is-loading:before{z-index:1;content:"";position:absolute;inset:-1px;pointer-events:none;border-radius:inherit;background-color:#ffffff80}.pu-button--large{padding:12px 20px}.pu-button--{padding:8px 16px}.pu-button--small{padding:6px 12px}.pu-button--mini{padding:4px 8px}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 将对象转换为 FormData 对象
|
|
3
|
+
* @param { Object } params 要转换的对象
|
|
4
|
+
* @returns 转换后的 FormData 对象
|
|
5
|
+
*/
|
|
6
|
+
export declare function paramsToFormData(params: Record<string, any>): FormData;
|
|
7
|
+
/**
|
|
8
|
+
* 设置URLSearchParams对象并返回新的URL字符串
|
|
9
|
+
* @param { string } urlString - URL字符串
|
|
10
|
+
* @param { Object } params - 要设置的参数对象
|
|
11
|
+
* @returns { string }设置参数后的新的URL字符串
|
|
12
|
+
*/
|
|
13
|
+
export declare function setURLSearchParams(urlString: string, params: Record<string, any>): string;
|
|
14
|
+
/**
|
|
15
|
+
* 合并URL字符串
|
|
16
|
+
* @param { string[] } ...urls 可变参数: URL字符串参数
|
|
17
|
+
* @returns { string } 合并后的URL字符串
|
|
18
|
+
*/
|
|
19
|
+
export declare function joinURLs(...urls: string[]): string;
|
|
20
|
+
/**
|
|
21
|
+
* 深度拷贝
|
|
22
|
+
* @param arr
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
export declare function deepClone(arr: any[]): any[] | null;
|
|
26
|
+
/**
|
|
27
|
+
* 自动将文件大小转换成合适的带单位大小
|
|
28
|
+
* @param byte {number} - 文件大小(B)
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
export declare function autoCalcFileSize(byte: number): string;
|
|
32
|
+
/**
|
|
33
|
+
* 根据编码读取txt文件
|
|
34
|
+
* @param file {File} - 文件对象
|
|
35
|
+
* @param encode {string} - 编码格式
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
export declare function readTxtFile(file: File, encode: string): Promise<string>;
|
|
39
|
+
/**
|
|
40
|
+
* 用不同编码读取txt文件
|
|
41
|
+
* @param file {File} - 文件对象
|
|
42
|
+
* @param encodes {string[]} - 编码格式数组
|
|
43
|
+
* @returns
|
|
44
|
+
*/
|
|
45
|
+
export declare function readTxtByEncodes(file: File, encodes?: string[]): Promise<string>;
|
|
46
|
+
/**
|
|
47
|
+
* 将以逗号或者换行符分隔的字符串转为只用逗号分隔的字符串――去除空格和重复逗号
|
|
48
|
+
* @param str {string} - 以逗号或者换行符分隔的字符串
|
|
49
|
+
*/
|
|
50
|
+
export declare function lineBreakToComma(str: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* 单例模式函数
|
|
53
|
+
* @param {Function} fn - 要执行的函数 / class类
|
|
54
|
+
*/
|
|
55
|
+
export declare function singleton(fn: (...args: unknown[]) => unknown): unknown;
|
|
56
|
+
/**
|
|
57
|
+
* 函数重载
|
|
58
|
+
* @example
|
|
59
|
+
* const overload = createOverload()
|
|
60
|
+
* overload.add('string', (arg: string) => { console.log('string', arg) })
|
|
61
|
+
* overload.add('number','string', (arg1: number, arg2: string) => { console.log('number,string', arg1, arg2) })
|
|
62
|
+
* @returns {Function} 重载函数
|
|
63
|
+
*/
|
|
64
|
+
export declare function createOverload(): {
|
|
65
|
+
(...args: any[]): any;
|
|
66
|
+
add(...args: any[]): void;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* 平铺数据构建树结构
|
|
70
|
+
* @param data {Array} - 数据源
|
|
71
|
+
* @param props {Object} - 属性映射
|
|
72
|
+
* @returns {Array} - 树结构
|
|
73
|
+
*/
|
|
74
|
+
export declare function buildTree(data: any[], props?: {
|
|
75
|
+
label: string;
|
|
76
|
+
value: string;
|
|
77
|
+
children: string;
|
|
78
|
+
parentId: string;
|
|
79
|
+
}): any[];
|
|
80
|
+
/**
|
|
81
|
+
* 计算半透明颜色与白色背景混合后的等效不透明颜色值
|
|
82
|
+
* @param hexColor 原始十六进制颜色值 (例如 '#7e69dc')
|
|
83
|
+
* @param opacity 透明度值 (0-1之间,默认为0.9)
|
|
84
|
+
* @returns 等效的不透明颜色值 (十六进制格式)
|
|
85
|
+
*/
|
|
86
|
+
export declare function getEqualOpacityColor(hexColor: string, opacity?: number): string;
|
|
87
|
+
/**
|
|
88
|
+
* 将颜色向黑色靠近(变暗)
|
|
89
|
+
* @param hexColor 原始十六进制颜色值 (例如 '#7e69dc')
|
|
90
|
+
* @param factor 混合因子 (0-1, 0表示完全不改变,1表示完全变为黑色)
|
|
91
|
+
* @returns 调整后的颜色值
|
|
92
|
+
*/
|
|
93
|
+
export declare function darkenColor(hexColor: string, factor?: number): string;
|
|
94
|
+
/**
|
|
95
|
+
* @description 创建层次颜色数组,包含一个变暗的颜色和多个不同透明度的颜色
|
|
96
|
+
* @param baseColor - 基础颜色的十六进制字符串 (例如 '#7e69dc')
|
|
97
|
+
* @param darkeness - 变暗程度,默认为0.15,取值范围为0-1,0表示不变,1表示完全变为黑色
|
|
98
|
+
* @param opacitySteps - 透明度数组,默认为 [0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1]
|
|
99
|
+
* @returns 层次颜色数组
|
|
100
|
+
*/
|
|
101
|
+
export declare function createColors(baseColor: string, darkeness?: number, opacitySteps?: number[]): string[];
|
|
102
|
+
/**
|
|
103
|
+
* @description 判断对象是否具有指定的键.
|
|
104
|
+
*
|
|
105
|
+
* @param { Record<string, unknown> } obj - 待判断的对象.
|
|
106
|
+
* @param { string } key - 待判断的键.
|
|
107
|
+
* @returns { boolean } - 是否具有指定的键
|
|
108
|
+
*/
|
|
109
|
+
export declare function hasOwnProperty(obj: Record<string, unknown>, key: string): boolean;
|
|
110
|
+
/**
|
|
111
|
+
* @description 判断对象是否为普通对象.
|
|
112
|
+
*
|
|
113
|
+
* @param { unknown } obj - 待判断的对象.
|
|
114
|
+
* @returns { boolean } - 是否为普通对象
|
|
115
|
+
*/
|
|
116
|
+
export declare function isPlainObject(obj: unknown): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* @description 删除对象中的指定键.
|
|
119
|
+
*
|
|
120
|
+
* @param { Record<string, unknown> } obj - 目标对象.
|
|
121
|
+
* @param { string[] } keys - 要删除的键/键数组.
|
|
122
|
+
* @returns { Record<string, unknown> } - 删除键后的新对象
|
|
123
|
+
*/
|
|
124
|
+
export declare function deleteKeys<T extends Record<string, unknown>, K extends keyof T>(obj: T, keys: K[] | K): Omit<T, K>;
|
|
125
|
+
/**
|
|
126
|
+
* @description 数组深度扁平化,支持数组子元素为基本类型、对象、数组.
|
|
127
|
+
*
|
|
128
|
+
* @param { Record<string, unknown>[] } arr - 目标数组.
|
|
129
|
+
* @param { string } key - 拍平的键.
|
|
130
|
+
* @returns { Record<string, unknown>[] } - 拍平后的数组
|
|
131
|
+
*/
|
|
132
|
+
export declare function flatArr<T extends Record<string, unknown>, K extends keyof T>(arr: T[], key?: K): T[];
|
|
133
|
+
/**
|
|
134
|
+
* @description 删除对象中的空值.
|
|
135
|
+
*
|
|
136
|
+
* @param { Record<string, unknown> } obj - 目标对象.
|
|
137
|
+
* @param { unknown[] } emptyValues - 空值数组 (默认为 ['', undefined, null],支持数组和对象的空值判断['', undefined,
|
|
138
|
+
* null, {}, [], false, 0])
|
|
139
|
+
* @returns { Partial<T> | T } - 删除空值后的新对象
|
|
140
|
+
*/
|
|
141
|
+
export declare function omitEmptyKeys<T extends Record<string, unknown> & {
|
|
142
|
+
length?: never;
|
|
143
|
+
}>(obj: T, emptyValues?: unknown[]): Partial<T> | T;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function O(n){const e=new FormData;for(const t in n)e.append(t,n[t]);return e}function m(n,e){const t=new URL(n),c=new URLSearchParams(t.search);for(const r in e)!["",void 0,null].includes(e[r])&&c.set(r,e[r]);return t.search=c.toString(),t.href}function S(...n){let e=n[0];for(let t=1;t<n.length;t++)e[e.length-1]==="/"&&n[t][0]==="/"?e+=n[t].slice(1):e[e.length-1]==="/"||n[t][0]==="/"?e+=n[t]:e+="/"+n[t];return e}function b(n){try{return JSON.parse(JSON.stringify(n))}catch{return null}}function P(n){const e=["B","KB","MB","GB","TB"];let t=0,c=e[0];for(;n>=1024&&t<e.length-1;)n/=1024,t++,c=e[t];const r=n.toString(),o=r.indexOf(".");return n=o===-1?n:parseFloat(r.substring(0,o+3)),`${n}${c}}`}function d(n,e){return new Promise((t,c)=>{const r=new FileReader;r.onload=o=>{t(o.target?.result)},r.onerror=o=>{c(o)},r.readAsText(n,e)})}async function T(n,e=["UTF-8","GBK","GB2312"]){for(const t of e){const c=await d(n,t);if(!(c&&c.indexOf("�")>-1))return c}return""}function A(n){if(!n)return"";let e="";return n.includes(",")?e=n.replace(/,/g,","):n.includes(`\r
|
|
2
|
+
`)?e=n.replace(/\r\n/g,","):n.includes(`
|
|
3
|
+
`)?e=n.replace(/\n/g,","):n.includes("\r")?e=n.replace(/\r/g,","):n.includes("↵")&&(e=n.replace(/↵/g,",")),e.replace(/,+/g,",").replace(/^,|,$/g,"").replace(/\s+/g,"")}function B(n){let e;const t=new Proxy(n,{construct(c,r){return e||(e=Reflect.construct(c,r),e)}});return t.prototype.constructor=t,t}function E(){const n=new Map;function e(...t){const c=t.map(o=>typeof o).join(","),r=n.get(c);if(!r)throw new Error("没有找到对应的实现");return r.apply(this,t)}return e.add=function(...t){const c=t.pop();if(typeof c!="function")throw new Error("最后一个参数必须是函数");const r=t.join(",");n.set(r,c)},e}function M(n,e={label:"label",value:"value",children:"children",parentId:"parentId"}){const t=[],c=new WeakMap;return n.forEach(r=>{r.label=r[e.label],r.value=r[e.value],r.children=[],c.set(r[e.value],r)}),n.forEach(r=>{const o=c.get(r[e.parentId]);o?o.children.push(r):t.push(r)}),t}function p(n,e=1){n=n.replace("#","");const t=parseInt(n.substring(0,2),16),c=parseInt(n.substring(2,4),16),r=parseInt(n.substring(4,6),16),o={r:255,g:255,b:255},u=Math.round(t*e+o.r*(1-e)),l=Math.round(c*e+o.g*(1-e)),s=Math.round(r*e+o.b*(1-e)),a=w=>w.toString(16).padStart(2,"0");return`#${a(u)}${a(l)}${a(s)}`}function g(n,e=.15){n=n.replace("#",""),n.length===3&&(n=n.split("").map(a=>a+a).join(""));const t=parseInt(n.substring(0,2),16),c=parseInt(n.substring(2,4),16),r=parseInt(n.substring(4,6),16),o=Math.round(t*(1-e)),u=Math.round(c*(1-e)),l=Math.round(r*(1-e)),s=a=>Math.round(a).toString(16).padStart(2,"0");return`#${s(o)}${s(u)}${s(l)}`}function R(n,e=.15,t=[.9,.8,.7,.6,.5,.4,.3,.2,.1]){return[g(n,e)].concat(t.map(c=>p(n,c)))}function h(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function i(n){return n!==null&&typeof n=="object"&&Object.getPrototypeOf(n)===Object.prototype}function y(n,e){if(!n||!e||!i(n))return n;const t={...n};return(Array.isArray(e)?e:[e]).forEach(c=>{Reflect.deleteProperty(t,c)}),t}function f(n,e="children"){return!n||!Array.isArray(n)?[]:n.reduce((t,c)=>Array.isArray(c)?t.concat(f(c,e)):c&&i(c)&&c[e]?t.concat(y(c,[e]),f(c[e],e)):t.concat(c),[])}function F(n,e=["",void 0,null]){if(!n||!i(n))return n;const t={},c=r=>e.some(o=>Array.isArray(o)&&Array.isArray(r)?o.length===0&&r.length===0:i(o)&&i(r)?Object.keys(o).length===0&&Object.keys(r).length===0:o===r);for(const r in n)h(n,r)&&(c(n[r])||(t[r]=n[r]));return t}exports.autoCalcFileSize=P;exports.buildTree=M;exports.createColors=R;exports.createOverload=E;exports.darkenColor=g;exports.deepClone=b;exports.deleteKeys=y;exports.flatArr=f;exports.getEqualOpacityColor=p;exports.hasOwnProperty=h;exports.isPlainObject=i;exports.joinURLs=S;exports.lineBreakToComma=A;exports.omitEmptyKeys=F;exports.paramsToFormData=O;exports.readTxtByEncodes=T;exports.readTxtFile=d;exports.setURLSearchParams=m;exports.singleton=B;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
export declare const INSTALLED_KEY: unique symbol;
|
|
3
|
+
declare module 'vue' {
|
|
4
|
+
interface App {
|
|
5
|
+
[INSTALLED_KEY]?: boolean;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export declare const withInstall: <T extends Record<string, any>, E extends Record<string, any>>(main: T, extra?: E) => T;
|
|
9
|
+
export declare function withMultiInstall<T extends Record<string, any>>(compEntries: T): T;
|
|
10
|
+
export declare function createGlobalInstaller(comps?: {
|
|
11
|
+
install: (app: App) => void;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}[]): {
|
|
14
|
+
install: (app: App) => void;
|
|
15
|
+
version: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function toLowerCase(input: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../package.json.js"),o=Symbol("INSTALLED_KEY"),a=(t,n)=>{if(t.install=e=>{e.component(t.name,t)},n)for(const[e,l]of Object.entries(n))t[e]=l,l.install=r=>{r.component(l.name,l)};return t};function c(t){return Object.values(t).forEach(n=>{n.install=e=>{e.component(n.name,n)}}),t}function i(t=[]){return{install:e=>{e[o]||(e[o]=!0,t.forEach(l=>e.use(l)))},version:s.version}}function u(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().replace(/\s+/g,"-")}exports.INSTALLED_KEY=o;exports.createGlobalInstaller=i;exports.toLowerCase=u;exports.withInstall=a;exports.withMultiInstall=c;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { default as Button } from './src/button.vue';
|
|
2
|
+
export * from './src/types';
|
|
3
|
+
export { Button as PuButton };
|
|
4
|
+
declare const _default: {
|
|
5
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('.').ButtonProps> & Readonly<{
|
|
6
|
+
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
7
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
8
|
+
click: (evt: MouseEvent) => any;
|
|
9
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLButtonElement, import('vue').ComponentProvideOptions, {
|
|
10
|
+
P: {};
|
|
11
|
+
B: {};
|
|
12
|
+
D: {};
|
|
13
|
+
C: {};
|
|
14
|
+
M: {};
|
|
15
|
+
Defaults: {};
|
|
16
|
+
}, Readonly<import('.').ButtonProps> & Readonly<{
|
|
17
|
+
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, {}>;
|
|
19
|
+
__isFragment?: never;
|
|
20
|
+
__isTeleport?: never;
|
|
21
|
+
__isSuspense?: never;
|
|
22
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('.').ButtonProps> & Readonly<{
|
|
23
|
+
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
24
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
25
|
+
click: (evt: MouseEvent) => any;
|
|
26
|
+
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
27
|
+
$slots: {
|
|
28
|
+
loading?(_: {}): any;
|
|
29
|
+
icon?(_: {}): any;
|
|
30
|
+
default?(_: {}): any;
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { defineComponent as k, useAttrs as B, computed as z, createElementBlock as i, openBlock as o, mergeProps as C, withModifiers as h, unref as n, renderSlot as d, createElementVNode as v, createCommentVNode as c, normalizeClass as u } from "vue";
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { buttonTypes as I, buttonSizes as N } from "./constants.mjs";
|
|
5
|
+
import { useNamespace as P } from "../../../composables/use-namespace/index.mjs";
|
|
6
|
+
const T = ["type", "disabled"], A = /* @__PURE__ */ k({
|
|
7
|
+
name: "PuButton",
|
|
8
|
+
__name: "button",
|
|
9
|
+
props: {
|
|
10
|
+
type: { default: "" },
|
|
11
|
+
size: { default: "default" },
|
|
12
|
+
plain: { type: Boolean, default: !1 },
|
|
13
|
+
round: { type: Boolean, default: !1 },
|
|
14
|
+
circle: { type: Boolean, default: !1 },
|
|
15
|
+
disabled: { type: Boolean, default: !1 },
|
|
16
|
+
icon: { default: "" },
|
|
17
|
+
loading: { type: Boolean, default: !1 },
|
|
18
|
+
loadingIcon: { default: "" },
|
|
19
|
+
text: { type: Boolean, default: !1 },
|
|
20
|
+
link: { type: Boolean, default: !1 },
|
|
21
|
+
nativeType: { default: "button" }
|
|
22
|
+
},
|
|
23
|
+
emits: ["click"],
|
|
24
|
+
setup(e, { emit: f }) {
|
|
25
|
+
const m = f, { n: r, nm: s, ns: a, is: t } = P("button"), y = B(), b = z(() => [
|
|
26
|
+
r(""),
|
|
27
|
+
e.type && I.includes(e.type) ? s("", e.type) : "",
|
|
28
|
+
e.size !== "default" && N.includes(e.size) ? s("", e.size) : "",
|
|
29
|
+
t("text", e.text),
|
|
30
|
+
t("link", e.link),
|
|
31
|
+
t("plain", e.plain),
|
|
32
|
+
t("round", e.round),
|
|
33
|
+
t("circle", e.circle),
|
|
34
|
+
t("loading", e.loading),
|
|
35
|
+
t("disabled", e.disabled)
|
|
36
|
+
]);
|
|
37
|
+
function g(l) {
|
|
38
|
+
if (e.disabled || e.loading) {
|
|
39
|
+
l.preventDefault(), l.stopImmediatePropagation();
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
m("click", l);
|
|
43
|
+
}
|
|
44
|
+
return (l, $) => (o(), i("button", C({
|
|
45
|
+
class: b.value,
|
|
46
|
+
type: e.nativeType,
|
|
47
|
+
disabled: e.disabled || e.loading,
|
|
48
|
+
onClick: h(g, ["stop"])
|
|
49
|
+
}, n(y)), [
|
|
50
|
+
d(l.$slots, "loading", {}, () => [
|
|
51
|
+
e.loading ? (o(), i("i", {
|
|
52
|
+
key: 0,
|
|
53
|
+
class: u([n(a)("", "loading"), e.loadingIcon]),
|
|
54
|
+
"aria-hidden": "true"
|
|
55
|
+
}, null, 2)) : c("", !0)
|
|
56
|
+
]),
|
|
57
|
+
d(l.$slots, "icon", {}, () => [
|
|
58
|
+
e.icon ? (o(), i("i", {
|
|
59
|
+
key: 0,
|
|
60
|
+
class: u([n(a)("", "icon"), e.icon]),
|
|
61
|
+
"aria-hidden": "true"
|
|
62
|
+
}, null, 2)) : c("", !0)
|
|
63
|
+
]),
|
|
64
|
+
v("span", {
|
|
65
|
+
class: u([n(a)("", "content")])
|
|
66
|
+
}, [
|
|
67
|
+
d(l.$slots, "default")
|
|
68
|
+
], 2)
|
|
69
|
+
], 16, T));
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
export {
|
|
73
|
+
A as default
|
|
74
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const buttonTypes: readonly ["primary", "success", "warning", "danger", "info", ""];
|
|
2
|
+
declare const buttonSizes: readonly ["mini", "small", "default", "large"];
|
|
3
|
+
declare const buttonNativeTypes: readonly ["button", "submit", "reset"];
|
|
4
|
+
export { buttonTypes, buttonSizes, buttonNativeTypes };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { buttonTypes, buttonSizes, buttonNativeTypes } from './constants';
|
|
2
|
+
interface ButtonProps {
|
|
3
|
+
type?: (typeof buttonTypes)[number];
|
|
4
|
+
size?: (typeof buttonSizes)[number];
|
|
5
|
+
plain?: boolean;
|
|
6
|
+
round?: boolean;
|
|
7
|
+
circle?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
icon?: string;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
loadingIcon?: string;
|
|
12
|
+
text?: boolean;
|
|
13
|
+
link?: boolean;
|
|
14
|
+
nativeType?: (typeof buttonNativeTypes)[number];
|
|
15
|
+
}
|
|
16
|
+
export type { ButtonProps };
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as Colors } from './src/colors.vue';
|
|
2
|
+
import { default as PrimaryColor } from './src/primary-color.vue';
|
|
3
|
+
import { default as SecondaryColor } from './src/secondary-color.vue';
|
|
4
|
+
import { default as NeutralColor } from './src/neutral-color.vue';
|
|
5
|
+
export { Colors as PuColors, PrimaryColor as PuPrimaryColor, SecondaryColor as PuSecondaryColor, NeutralColor as PuNeutralColor };
|
|
6
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { withInstall as o } from "../../utils/vue/index.mjs";
|
|
2
|
+
import r from "./src/colors.vue.mjs";
|
|
3
|
+
import m from "./src/primary-color.vue.mjs";
|
|
4
|
+
import a from "./src/secondary-color.vue.mjs";
|
|
5
|
+
import l from "./src/neutral-color.vue.mjs";
|
|
6
|
+
o(r, {
|
|
7
|
+
PrimaryColor: m,
|
|
8
|
+
SecondaryColor: a,
|
|
9
|
+
NeutralColor: l
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
r as PuColors,
|
|
13
|
+
l as PuNeutralColor,
|
|
14
|
+
m as PuPrimaryColor,
|
|
15
|
+
a as PuSecondaryColor
|
|
16
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as l, createElementBlock as t, openBlock as n, Fragment as m, createElementVNode as o, createVNode as e } from "vue";
|
|
2
|
+
import u from "./primary-color.vue.mjs";
|
|
3
|
+
import a from "./secondary-color.vue.mjs";
|
|
4
|
+
import p from "./neutral-color.vue.mjs";
|
|
5
|
+
const N = /* @__PURE__ */ l({
|
|
6
|
+
name: "PuColors",
|
|
7
|
+
__name: "colors",
|
|
8
|
+
setup(i) {
|
|
9
|
+
return (f, r) => (n(), t(m, null, [
|
|
10
|
+
r[0] || (r[0] = o("h2", null, "Primary 主色", -1)),
|
|
11
|
+
e(u),
|
|
12
|
+
r[1] || (r[1] = o("h2", null, "Secondary 状态色", -1)),
|
|
13
|
+
e(a),
|
|
14
|
+
r[2] || (r[2] = o("h2", null, "Neutral 文本、边框、背景色", -1)),
|
|
15
|
+
e(p)
|
|
16
|
+
], 64));
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
N as default
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@charset "UTF-8";.text-colors[data-v-c3bcd835]{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem}.text-colors .shade[data-v-c3bcd835]{border-radius:4px;overflow:hidden;margin-bottom:1rem;height:7rem;padding:1rem}.text-colors .shade.border-blocks[data-v-c3bcd835]{display:flex;justify-content:space-between}.text-colors .shade.border-blocks .content[data-v-c3bcd835]{border-radius:50%;margin-left:1rem;background-color:#fff;height:5rem;width:5rem;display:flex;justify-content:center;align-items:center;flex-shrink:0}.checkerboard-bg[data-v-c3bcd835]{background-color:#fff;background-image:linear-gradient(45deg,#ededf0 25%,transparent 25%),linear-gradient(-45deg,#ededf0 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ededf0 75%),linear-gradient(-45deg,transparent 75%,#ededf0 75%);background-size:22px 22px;background-position:0 0,0 11px,11px -11px,-11px 0px}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { defineComponent as x, createElementBlock as e, openBlock as t, Fragment as a, renderList as d, createElementVNode as l, normalizeStyle as n, normalizeClass as i, createCommentVNode as k, toDisplayString as f } from "vue";
|
|
2
|
+
import { getEqualOpacityColor as r } from "../../../utils/util.mjs";
|
|
3
|
+
const b = { class: "text-colors" }, B = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "content"
|
|
6
|
+
}, F = /* @__PURE__ */ x({
|
|
7
|
+
name: "PuNeutralColor",
|
|
8
|
+
__name: "neutral-color",
|
|
9
|
+
setup(h) {
|
|
10
|
+
const s = [
|
|
11
|
+
{
|
|
12
|
+
shades: [
|
|
13
|
+
{
|
|
14
|
+
color: "#000000",
|
|
15
|
+
text: "Darkest Text",
|
|
16
|
+
textcolor: "#fff"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
color: "#303131",
|
|
20
|
+
text: "Base Text",
|
|
21
|
+
textcolor: "#fff"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
color: "#606062",
|
|
25
|
+
text: "Secondary Text",
|
|
26
|
+
textcolor: "#fff"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
color: "#909093",
|
|
30
|
+
text: "Neutral Text",
|
|
31
|
+
textcolor: "#fff"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
color: "#b2b2b6",
|
|
35
|
+
text: "Placeholder Text",
|
|
36
|
+
textcolor: "#fff"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
color: "#cdcdd1",
|
|
40
|
+
text: "Disabled Text",
|
|
41
|
+
textcolor: "#fff"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
shades: [
|
|
47
|
+
{
|
|
48
|
+
color: "#c3c3cb",
|
|
49
|
+
text: "Darker Border",
|
|
50
|
+
extraclass: "border-blocks"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
color: "#d0d0d8",
|
|
54
|
+
text: "Dark Border",
|
|
55
|
+
extraclass: "border-blocks"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
color: "#dbdbe0",
|
|
59
|
+
text: "Base Border",
|
|
60
|
+
extraclass: "border-blocks"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
color: "#e4e4e8",
|
|
64
|
+
text: "Light Border",
|
|
65
|
+
extraclass: "border-blocks"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
color: "#ededef",
|
|
69
|
+
text: "Lighter Border",
|
|
70
|
+
extraclass: "border-blocks"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
color: "#efeff3",
|
|
74
|
+
text: "Extra-Light Border",
|
|
75
|
+
extraclass: "border-blocks"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
color: r("#937bff", 0.4),
|
|
79
|
+
text: "Primary Alpha 40% Border",
|
|
80
|
+
extraclass: "border-blocks"
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
shades: [
|
|
86
|
+
{
|
|
87
|
+
color: "#d7d7dc",
|
|
88
|
+
text: "Darker Fill Background"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
color: "#e8e8ec",
|
|
92
|
+
text: "Dark Fill Background"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
color: "#ededf0",
|
|
96
|
+
text: "Base Fill Background"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
color: "#f1f1f4",
|
|
100
|
+
text: "Light Fill Background"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
color: "#f6f6f7",
|
|
104
|
+
text: "Lighter Fill Background"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
color: "#f8f8f9",
|
|
108
|
+
text: "Extra-light Fill Background"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
color: "#f7f7fb",
|
|
112
|
+
text: "Theme Fill Background"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
color: "#ffffff",
|
|
116
|
+
text: "Blank Fill Background",
|
|
117
|
+
bordercolor: r("#937bff", 0.4)
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
color: "transparent",
|
|
121
|
+
text: "Transparent Fill Background",
|
|
122
|
+
extraclass: "checkerboard-bg"
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
shades: [
|
|
128
|
+
{
|
|
129
|
+
color: r("#937bff", 0.9),
|
|
130
|
+
textcolor: "#fff",
|
|
131
|
+
text: "Primary Alpha 90% Fill Background"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
color: r("#937bff", 0.8),
|
|
135
|
+
textcolor: "#fff",
|
|
136
|
+
text: "Primary Alpha 80% Fill Background"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
color: r("#937bff", 0.7),
|
|
140
|
+
text: "Primary Alpha 70% Fill Background"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
color: r("#937bff", 0.6),
|
|
144
|
+
text: "Primary Alpha 60% Fill Background"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
color: r("#937bff", 0.5),
|
|
148
|
+
text: "Primary Alpha 50% Fill Background"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
color: r("#937bff", 0.4),
|
|
152
|
+
text: "Primary Alpha 40% Fill Background"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
color: r("#937bff", 0.3),
|
|
156
|
+
text: "Primary Alpha 30% Fill Background"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
color: r("#937bff", 0.2),
|
|
160
|
+
text: "Primary Alpha 20% Fill Background"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
color: r("#937bff", 0.1),
|
|
164
|
+
text: "Primary Alpha 10% Fill Background"
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
];
|
|
169
|
+
return (g, u) => (t(), e("div", b, [
|
|
170
|
+
(t(), e(a, null, d(s, (c) => l("div", {
|
|
171
|
+
class: "panel",
|
|
172
|
+
key: c.shades[0].color
|
|
173
|
+
}, [
|
|
174
|
+
(t(!0), e(a, null, d(c.shades, (o) => (t(), e("div", {
|
|
175
|
+
class: i(["shade", [o?.extraclass]]),
|
|
176
|
+
style: n({
|
|
177
|
+
"background-color": o.color,
|
|
178
|
+
color: o?.textcolor,
|
|
179
|
+
border: o?.bordercolor ? "1px solid " + o.bordercolor : "none"
|
|
180
|
+
}),
|
|
181
|
+
key: o.text
|
|
182
|
+
}, [
|
|
183
|
+
l("div", null, [
|
|
184
|
+
l("div", null, f(o.text), 1),
|
|
185
|
+
l("div", null, f(o.color.toUpperCase()), 1)
|
|
186
|
+
]),
|
|
187
|
+
o.extraclass ? (t(), e("div", B, "#FFFFFF")) : k("", !0)
|
|
188
|
+
], 6))), 128))
|
|
189
|
+
])), 64))
|
|
190
|
+
]));
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
export {
|
|
194
|
+
F as default
|
|
195
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.theme-colors[data-v-7bd7347b]{width:60rem;border-radius:4px;overflow:hidden;color:#fff}.theme-colors .base[data-v-7bd7347b]{color:#fff;height:6rem;box-shadow:10px 10px;padding:1rem}.theme-colors .shades[data-v-7bd7347b]{display:flex;align-items:center;flex-wrap:nowrap}.theme-colors .shades .shade[data-v-7bd7347b]{flex:1;height:3.2rem;padding:.2rem}
|