@mtn-ui/components 0.0.3 → 0.0.6

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.
@@ -1 +1 @@
1
- .mtn-action-group-wrapper[data-v-6a4e52d6]{width:100%;position:relative;display:inline-block}.mtn-action-group-measure[data-v-6a4e52d6]{position:absolute;top:0;left:0;visibility:hidden;pointer-events:none;display:flex;white-space:nowrap}.measure-item[data-v-6a4e52d6]{padding:0 16px;font-size:14px}.mtn-action-group-container[data-v-6a4e52d6]{display:flex;align-items:center}
1
+ @source "./**/*.{vue,ts,js,tsx,jsx}";.mtn-action-group-wrapper[data-v-6a4e52d6]{width:100%;position:relative;display:inline-block}.mtn-action-group-measure[data-v-6a4e52d6]{position:absolute;top:0;left:0;visibility:hidden;pointer-events:none;display:flex;white-space:nowrap}.measure-item[data-v-6a4e52d6]{padding:0 16px;font-size:14px}.mtn-action-group-container[data-v-6a4e52d6]{display:flex;align-items:center}.mtn-color-picker[data-v-95fc5ac1]{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}.mtn-color-picker__trigger[data-v-95fc5ac1]{position:relative;display:inline-block;border-radius:4px;overflow:hidden;border:1px solid var(--color-border-base, #dcdfe6);cursor:pointer}.mtn-color-picker--small .mtn-color-picker__trigger[data-v-95fc5ac1]{width:24px;height:24px}.mtn-color-picker--middle .mtn-color-picker__trigger[data-v-95fc5ac1]{width:32px;height:32px}.mtn-color-picker--large .mtn-color-picker__trigger[data-v-95fc5ac1]{width:40px;height:40px}.mtn-color-picker__native[data-v-95fc5ac1]{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer;border:none;padding:0}.mtn-color-picker__native[data-v-95fc5ac1]:disabled{cursor:not-allowed}.mtn-color-picker__swatch[data-v-95fc5ac1]{display:block;width:100%;height:100%;border-radius:2px}.mtn-color-picker__hex[data-v-95fc5ac1]{width:90px;padding:4px 8px;font-size:12px;font-family:ui-monospace,monospace;border:1px solid var(--color-border-base, #dcdfe6);border-radius:4px;outline:none}.mtn-color-picker__hex[data-v-95fc5ac1]:focus{border-color:var(--color-primary, #409eff);box-shadow:0 0 0 2px #409eff33}.mtn-color-picker__hex[data-v-95fc5ac1]:disabled{background:var(--color-bg-base, #f5f7fa);cursor:not-allowed}.mtn-color-picker--small .mtn-color-picker__hex[data-v-95fc5ac1]{padding:2px 6px;font-size:11px;width:72px}.mtn-color-picker--large .mtn-color-picker__hex[data-v-95fc5ac1]{padding:6px 10px;font-size:14px;width:100px}.mtn-color-picker__apply[data-v-95fc5ac1]{padding:4px 12px;font-size:12px;color:var(--color-primary, #409eff);background:transparent;border:1px solid var(--color-primary, #409eff);border-radius:4px;cursor:pointer;transition:all .2s}.mtn-color-picker__apply[data-v-95fc5ac1]:hover:not(:disabled){color:#fff;background:var(--color-primary, #409eff)}.mtn-color-picker__apply[data-v-95fc5ac1]:disabled{opacity:.5;cursor:not-allowed}.mtn-color-picker--small .mtn-color-picker__apply[data-v-95fc5ac1]{padding:2px 8px;font-size:11px}.mtn-color-picker--large .mtn-color-picker__apply[data-v-95fc5ac1]{padding:6px 16px;font-size:14px}
@@ -0,0 +1,48 @@
1
+ import { ColorPickerProps } from './types';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ColorPickerProps>, {
4
+ modelValue: string;
5
+ disabled: boolean;
6
+ showHexInput: boolean;
7
+ showThemeApply: boolean;
8
+ size: string;
9
+ debounceMs: number;
10
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
+ "update:modelValue": (value: string) => void;
12
+ change: (value: string) => void;
13
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ColorPickerProps>, {
14
+ modelValue: string;
15
+ disabled: boolean;
16
+ showHexInput: boolean;
17
+ showThemeApply: boolean;
18
+ size: string;
19
+ debounceMs: number;
20
+ }>>> & Readonly<{
21
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
22
+ onChange?: ((value: string) => any) | undefined;
23
+ }>, {
24
+ size: "small" | "middle" | "large";
25
+ disabled: boolean;
26
+ debounceMs: number;
27
+ modelValue: string;
28
+ showHexInput: boolean;
29
+ showThemeApply: boolean;
30
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
31
+ export default _default;
32
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
33
+ type __VLS_TypePropsToRuntimeProps<T> = {
34
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
35
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
36
+ } : {
37
+ type: import('vue').PropType<T[K]>;
38
+ required: true;
39
+ };
40
+ };
41
+ type __VLS_WithDefaults<P, D> = {
42
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
43
+ default: D[K];
44
+ }> : P[K];
45
+ };
46
+ type __VLS_Prettify<T> = {
47
+ [K in keyof T]: T[K];
48
+ } & {};
@@ -0,0 +1,2 @@
1
+ export { default as ColorPicker } from './ColorPicker';
2
+ export type { ColorPickerProps } from './types';
@@ -0,0 +1,33 @@
1
+ /**
2
+ * 择色器组件属性
3
+ */
4
+ export interface ColorPickerProps {
5
+ /**
6
+ * 当前颜色(受控,hex 如 #409eff)
7
+ */
8
+ modelValue?: string;
9
+ /**
10
+ * 是否禁用
11
+ */
12
+ disabled?: boolean;
13
+ /**
14
+ * 是否显示十六进制输入框
15
+ * @default true
16
+ */
17
+ showHexInput?: boolean;
18
+ /**
19
+ * 是否显示「应用到主题」按钮(需配合 @mtn-ui/utils 的 setThemePrimary)
20
+ * @default false
21
+ */
22
+ showThemeApply?: boolean;
23
+ /**
24
+ * 尺寸
25
+ * @default 'middle'
26
+ */
27
+ size?: 'small' | 'middle' | 'large';
28
+ /**
29
+ * 原生选色条/取色盘变更时的防抖延迟(毫秒),仅对拖拽选色生效,hex 输入框不受影响
30
+ * @default 150
31
+ */
32
+ debounceMs?: number;
33
+ }
@@ -8,6 +8,8 @@ export * from './confirm-button';
8
8
  export type * from './confirm-button/types';
9
9
  export * from './delete-button';
10
10
  export type * from './delete-button/types';
11
+ export * from './color-picker';
12
+ export type * from './color-picker/types';
11
13
  export type * from './button/types';
12
14
  /**
13
15
  * MTN UI Vue Plugin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mtn-ui/components",
3
- "version": "0.0.3",
3
+ "version": "0.0.6",
4
4
  "description": "MTN UI Components",
5
5
  "type": "module",
6
6
  "main": "./dist/index/index.js",
@@ -77,7 +77,10 @@
77
77
  "vue-tsc": "^2.0.0"
78
78
  },
79
79
  "dependencies": {
80
- "@mtn-ui/utils": "0.0.3"
80
+ "class-variance-authority": "^0.7.1",
81
+ "clsx": "^2.1.1",
82
+ "tailwind-merge": "^3.4.0",
83
+ "@mtn-ui/utils": "0.0.5"
81
84
  },
82
85
  "scripts": {
83
86
  "build": "vite build",