@xto/core 1.0.3 → 1.1.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.
@@ -88,7 +88,7 @@ function O(t) {
88
88
  document.removeEventListener("keydown", e);
89
89
  });
90
90
  }
91
- function F(t, e) {
91
+ function T(t, e) {
92
92
  let s = null;
93
93
  const n = () => {
94
94
  s && (s.disconnect(), s = null);
@@ -104,7 +104,7 @@ function F(t, e) {
104
104
  { immediate: !0 }
105
105
  ), i(n);
106
106
  }
107
- function I(t, e = {
107
+ function F(t, e = {
108
108
  attributes: !0,
109
109
  childList: !0,
110
110
  subtree: !0
@@ -120,7 +120,7 @@ function I(t, e = {
120
120
  n == null || n.disconnect();
121
121
  });
122
122
  }
123
- function M(t, e) {
123
+ function I(t, e) {
124
124
  const s = () => {
125
125
  const n = t.value;
126
126
  if (n && n !== window) {
@@ -137,7 +137,7 @@ function M(t, e) {
137
137
  (n = t.value) == null || n.removeEventListener("scroll", s);
138
138
  });
139
139
  }
140
- function T(t, e) {
140
+ function M(t, e) {
141
141
  const s = l(!1), n = () => {
142
142
  s.value = !0, e == null || e(!0);
143
143
  }, u = () => {
@@ -156,34 +156,50 @@ function T(t, e) {
156
156
  focused: s
157
157
  };
158
158
  }
159
- function R(t, e, s = {
159
+ function D(t, e, s = {
160
160
  threshold: 0
161
161
  }) {
162
162
  let n = null;
163
163
  c(
164
164
  t,
165
165
  (u) => {
166
- n && n.disconnect(), u && typeof IntersectionObserver < "u" && (n = new IntersectionObserver((o) => {
167
- const r = o[0];
168
- e(r.isIntersecting);
169
- }, s), n.observe(u));
166
+ n && n.disconnect(), u && typeof IntersectionObserver < "u" && (n = new IntersectionObserver(
167
+ (o) => {
168
+ const r = o[0];
169
+ e(r.isIntersecting);
170
+ },
171
+ s
172
+ ), n.observe(u));
170
173
  },
171
174
  { immediate: !0 }
172
175
  ), i(() => {
173
176
  n == null || n.disconnect();
174
177
  });
175
178
  }
179
+ function R(t = 300) {
180
+ let e = null;
181
+ const s = (u) => {
182
+ n(), e = setTimeout(u, t);
183
+ }, n = () => {
184
+ e && (clearTimeout(e), e = null);
185
+ };
186
+ return i(n), {
187
+ execute: s,
188
+ cancel: n
189
+ };
190
+ }
176
191
  export {
177
192
  y as useClickOutside,
178
- I as useDOMObserver,
193
+ F as useDOMObserver,
194
+ R as useDelayedAction,
179
195
  p as useDisabled,
180
196
  O as useEscape,
181
- T as useFocus,
182
- R as useIntersectionObserver,
197
+ M as useFocus,
198
+ D as useIntersectionObserver,
183
199
  E as useLoading,
184
200
  L as useModel,
185
- F as useResize,
186
- M as useScroll,
201
+ T as useResize,
202
+ I as useScroll,
187
203
  w as useToggle,
188
204
  b as useVisible
189
205
  };
package/es/index.mjs CHANGED
@@ -1,77 +1,114 @@
1
- import { cssVarPrefix as o, defaultThemeConfig as n, generateCSSVars as t, generateColorPalette as r, sizeMap as i } from "./theme/index.mjs";
2
- import { b as d, block as p, coerceToArray as u, compose as l, constant as x, createNamespace as c, debounce as I, deepClone as m, deepMerge as Z, defaultNamespace as g, defaultTo as f, drawerZIndex as T, e as b, element as C, getType as y, getZIndexList as M, identity as N, is as O, isBrowser as P, isDefined as h, isEmpty as v, isFalse as D, isNil as S, isNull as w, isPlainObject as L, isSupportTouch as V, isTrue as k, isType as z, isUndefined as E, loadingZIndex as F, m as j, messageZIndex as A, modalZIndex as B, modifier as R, nextDrawerZIndex as U, nextLoadingZIndex as q, nextMessageZIndex as G, nextModalZIndex as H, nextPopoverZIndex as J, nextTooltipZIndex as K, noop as Q, once as W, pipe as X, popoverZIndex as Y, popupManage as _, resetZIndex as $, state as ee, throttle as se, tooltipZIndex as oe, tryCatch as ne, unary as te, useClass as re, useComponentPrefix as ie, useNamespace as ae, useZIndex as de } from "./utils/index.mjs";
3
- import { useClickOutside as ue, useDOMObserver as le, useDisabled as xe, useEscape as ce, useFocus as Ie, useIntersectionObserver as me, useLoading as Ze, useModel as ge, useResize as fe, useScroll as Te, useToggle as be, useVisible as Ce } from "./hooks/index.mjs";
1
+ import { applyCSSVars as n, applyDarkTheme as t, cssVarPrefix as i, darkCSSVars as r, defaultThemeConfig as a, generateCSSVars as d, generateColorPalette as x, getComponentSize as l, hexToRgb as p, mixColor as u, removeCSSVars as c, removeDarkTheme as m, rgbToHex as I, sizeMap as g } from "./theme/index.mjs";
2
+ import { b as C, block as S, classNames as b, coerceToArray as f, compose as T, constant as y, createNamespace as h, debounce as D, deepClone as M, deepMerge as v, defaultNamespace as N, defaultTo as O, drawerZIndex as P, dropdownZIndex as V, e as k, element as w, flatten as A, get as z, getCurrentZIndex as E, getType as F, getZIndexList as L, identity as R, is as j, isAndroid as B, isArray as q, isBoolean as H, isBrowser as U, isDate as W, isDefined as G, isEmpty as J, isFalse as K, isFunction as Q, isIOS as X, isMobile as Y, isNil as _, isNull as $, isNumber as ee, isObject as se, isPlainObject as oe, isPromise as ne, isRegExp as te, isString as ie, isSupportTouch as re, isTrue as ae, isType as de, isUndefined as xe, isWechat as le, loadingZIndex as pe, m as ue, messageZIndex as ce, modalZIndex as me, modifier as Ie, nextDrawerZIndex as ge, nextDropdownZIndex as Ze, nextLoadingZIndex as Ce, nextMessageZIndex as Se, nextModalZIndex as be, nextPopoverZIndex as fe, nextSelectZIndex as Te, nextTooltipZIndex as ye, noop as he, once as De, pipe as Me, popoverZIndex as ve, popupManage as Ne, resetZIndex as Oe, selectZIndex as Pe, set as Ve, shortId as ke, state as we, throttle as Ae, tooltipZIndex as ze, tryCatch as Ee, unary as Fe, unique as Le, useClass as Re, useComponentPrefix as je, useNamespace as Be, useZIndex as qe, uuid as He } from "./utils/index.mjs";
3
+ import { useClickOutside as We, useDOMObserver as Ge, useDelayedAction as Je, useDisabled as Ke, useEscape as Qe, useFocus as Xe, useIntersectionObserver as Ye, useLoading as _e, useModel as $e, useResize as es, useScroll as ss, useToggle as os, useVisible as ns } from "./hooks/index.mjs";
4
+ const e = "1.0.0";
4
5
  export {
5
- d as b,
6
- p as block,
7
- u as coerceToArray,
8
- l as compose,
9
- x as constant,
10
- c as createNamespace,
11
- o as cssVarPrefix,
12
- I as debounce,
13
- m as deepClone,
14
- Z as deepMerge,
15
- g as defaultNamespace,
16
- n as defaultThemeConfig,
17
- f as defaultTo,
18
- T as drawerZIndex,
19
- b as e,
20
- C as element,
21
- t as generateCSSVars,
22
- r as generateColorPalette,
23
- y as getType,
24
- M as getZIndexList,
25
- N as identity,
26
- O as is,
27
- P as isBrowser,
28
- h as isDefined,
29
- v as isEmpty,
30
- D as isFalse,
31
- S as isNil,
32
- w as isNull,
33
- L as isPlainObject,
34
- V as isSupportTouch,
35
- k as isTrue,
36
- z as isType,
37
- E as isUndefined,
38
- F as loadingZIndex,
39
- j as m,
40
- A as messageZIndex,
41
- B as modalZIndex,
42
- R as modifier,
43
- U as nextDrawerZIndex,
44
- q as nextLoadingZIndex,
45
- G as nextMessageZIndex,
46
- H as nextModalZIndex,
47
- J as nextPopoverZIndex,
48
- K as nextTooltipZIndex,
49
- Q as noop,
50
- W as once,
51
- X as pipe,
52
- Y as popoverZIndex,
53
- _ as popupManage,
54
- $ as resetZIndex,
55
- i as sizeMap,
56
- ee as state,
57
- se as throttle,
58
- oe as tooltipZIndex,
59
- ne as tryCatch,
60
- te as unary,
61
- re as useClass,
62
- ue as useClickOutside,
63
- ie as useComponentPrefix,
64
- le as useDOMObserver,
65
- xe as useDisabled,
66
- ce as useEscape,
67
- Ie as useFocus,
68
- me as useIntersectionObserver,
69
- Ze as useLoading,
70
- ge as useModel,
71
- ae as useNamespace,
72
- fe as useResize,
73
- Te as useScroll,
74
- be as useToggle,
75
- Ce as useVisible,
76
- de as useZIndex
6
+ n as applyCSSVars,
7
+ t as applyDarkTheme,
8
+ C as b,
9
+ S as block,
10
+ b as classNames,
11
+ f as coerceToArray,
12
+ T as compose,
13
+ y as constant,
14
+ h as createNamespace,
15
+ i as cssVarPrefix,
16
+ r as darkCSSVars,
17
+ D as debounce,
18
+ M as deepClone,
19
+ v as deepMerge,
20
+ N as defaultNamespace,
21
+ a as defaultThemeConfig,
22
+ O as defaultTo,
23
+ P as drawerZIndex,
24
+ V as dropdownZIndex,
25
+ k as e,
26
+ w as element,
27
+ A as flatten,
28
+ d as generateCSSVars,
29
+ x as generateColorPalette,
30
+ z as get,
31
+ l as getComponentSize,
32
+ E as getCurrentZIndex,
33
+ F as getType,
34
+ L as getZIndexList,
35
+ p as hexToRgb,
36
+ R as identity,
37
+ j as is,
38
+ B as isAndroid,
39
+ q as isArray,
40
+ H as isBoolean,
41
+ U as isBrowser,
42
+ W as isDate,
43
+ G as isDefined,
44
+ J as isEmpty,
45
+ K as isFalse,
46
+ Q as isFunction,
47
+ X as isIOS,
48
+ Y as isMobile,
49
+ _ as isNil,
50
+ $ as isNull,
51
+ ee as isNumber,
52
+ se as isObject,
53
+ oe as isPlainObject,
54
+ ne as isPromise,
55
+ te as isRegExp,
56
+ ie as isString,
57
+ re as isSupportTouch,
58
+ ae as isTrue,
59
+ de as isType,
60
+ xe as isUndefined,
61
+ le as isWechat,
62
+ pe as loadingZIndex,
63
+ ue as m,
64
+ ce as messageZIndex,
65
+ u as mixColor,
66
+ me as modalZIndex,
67
+ Ie as modifier,
68
+ ge as nextDrawerZIndex,
69
+ Ze as nextDropdownZIndex,
70
+ Ce as nextLoadingZIndex,
71
+ Se as nextMessageZIndex,
72
+ be as nextModalZIndex,
73
+ fe as nextPopoverZIndex,
74
+ Te as nextSelectZIndex,
75
+ ye as nextTooltipZIndex,
76
+ he as noop,
77
+ De as once,
78
+ Me as pipe,
79
+ ve as popoverZIndex,
80
+ Ne as popupManage,
81
+ c as removeCSSVars,
82
+ m as removeDarkTheme,
83
+ Oe as resetZIndex,
84
+ I as rgbToHex,
85
+ Pe as selectZIndex,
86
+ Ve as set,
87
+ ke as shortId,
88
+ g as sizeMap,
89
+ we as state,
90
+ Ae as throttle,
91
+ ze as tooltipZIndex,
92
+ Ee as tryCatch,
93
+ Fe as unary,
94
+ Le as unique,
95
+ Re as useClass,
96
+ We as useClickOutside,
97
+ je as useComponentPrefix,
98
+ Ge as useDOMObserver,
99
+ Je as useDelayedAction,
100
+ Ke as useDisabled,
101
+ Qe as useEscape,
102
+ Xe as useFocus,
103
+ Ye as useIntersectionObserver,
104
+ _e as useLoading,
105
+ $e as useModel,
106
+ Be as useNamespace,
107
+ es as useResize,
108
+ ss as useScroll,
109
+ os as useToggle,
110
+ ns as useVisible,
111
+ qe as useZIndex,
112
+ He as uuid,
113
+ e as version
77
114
  };
@@ -1,4 +1,4 @@
1
- const g = {
1
+ const y = {
2
2
  mode: "light",
3
3
  primary: "#409eff",
4
4
  success: "#67c23a",
@@ -6,60 +6,180 @@ const g = {
6
6
  danger: "#f56c6c",
7
7
  info: "#909399",
8
8
  size: "default"
9
- }, u = {
9
+ }, f = {
10
10
  large: 40,
11
11
  default: 32,
12
12
  small: 24
13
- };
14
- function h(r, e = 10) {
15
- const o = [], n = r.startsWith("#"), f = r.startsWith("rgb");
16
- let s, a, c;
17
- if (n) {
18
- const t = r.slice(1);
19
- s = parseInt(t.slice(0, 2), 16), a = parseInt(t.slice(2, 4), 16), c = parseInt(t.slice(4, 6), 16);
20
- } else if (f) {
21
- const t = r.match(/\d+/g);
22
- if (t)
23
- s = Number(t[0]), a = Number(t[1]), c = Number(t[2]);
13
+ }, k = (e) => f[e];
14
+ function z(e, r = 10) {
15
+ const t = [], l = e.startsWith("#"), n = e.startsWith("rgb");
16
+ let c, s, i;
17
+ if (l) {
18
+ const a = e.slice(1);
19
+ c = parseInt(a.slice(0, 2), 16), s = parseInt(a.slice(2, 4), 16), i = parseInt(a.slice(4, 6), 16);
20
+ } else if (n) {
21
+ const a = e.match(/\d+/g);
22
+ if (a)
23
+ c = Number(a[0]), s = Number(a[1]), i = Number(a[2]);
24
24
  else
25
- return o;
25
+ return t;
26
26
  } else
27
- return o;
28
- const i = 100 / (e + 1);
29
- for (let t = 1; t <= e; t++) {
30
- const l = 1 - i * t / 100, $ = Math.round(s + (255 - s) * l), d = Math.round(a + (255 - a) * l), p = Math.round(c + (255 - c) * l);
31
- o.push(`rgb(${$}, ${d}, ${p})`);
27
+ return t;
28
+ const p = 100 / (r + 1);
29
+ for (let a = 1; a <= r; a++) {
30
+ const d = 1 - p * a / 100, g = Math.round(c + (255 - c) * d), x = Math.round(s + (255 - s) * d), u = Math.round(i + (255 - i) * d);
31
+ t.push(`rgb(${g}, ${x}, ${u})`);
32
32
  }
33
- return o;
33
+ return t;
34
34
  }
35
- const b = "--xto";
36
- function m(r) {
37
- const e = b;
35
+ const $ = (e) => {
36
+ const r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
37
+ return r ? {
38
+ r: parseInt(r[1], 16),
39
+ g: parseInt(r[2], 16),
40
+ b: parseInt(r[3], 16)
41
+ } : null;
42
+ }, h = (e, r, t) => "#" + [e, r, t].map((l) => l.toString(16).padStart(2, "0")).join(""), C = (e, r, t = 0.5) => {
43
+ const l = $(e), n = $(r);
44
+ if (!l || !n) return e;
45
+ const c = Math.round(l.r * (1 - t) + n.r * t), s = Math.round(l.g * (1 - t) + n.g * t), i = Math.round(l.b * (1 - t) + n.b * t);
46
+ return h(c, s, i);
47
+ }, o = "--xto";
48
+ function m(e) {
49
+ const r = o;
38
50
  return {
39
- [`${e}-color-primary`]: r.primary,
40
- [`${e}-color-success`]: r.success,
41
- [`${e}-color-warning`]: r.warning,
42
- [`${e}-color-danger`]: r.danger,
43
- [`${e}-color-info`]: r.info,
44
- [`${e}-color-text`]: "#303133",
45
- [`${e}-color-text-placeholder`]: "#a8abb2",
46
- [`${e}-color-text-disabled`]: "#c0c4cc",
47
- [`${e}-border-color`]: "#dcdfe6",
48
- [`${e}-border-color-light`]: "#e4e7ed",
49
- [`${e}-border-color-lighter`]: "#ebeef5",
50
- [`${e}-fill-color`]: "#f5f7fa",
51
- [`${e}-fill-color-light`]: "#fafafa",
52
- [`${e}-bg-color`]: "#ffffff",
53
- [`${e}-bg-color-page`]: "#f2f3f5",
54
- [`${e}-bg-color-overlay`]: "#ffffff",
55
- [`${e}-font-size`]: r.size === "large" ? "15px" : r.size === "small" ? "13px" : "14px",
56
- [`${e}-component-size`]: `${u[r.size]}px`
51
+ // 颜色
52
+ [`${r}-color-primary`]: e.primary,
53
+ [`${r}-color-success`]: e.success,
54
+ [`${r}-color-warning`]: e.warning,
55
+ [`${r}-color-danger`]: e.danger,
56
+ [`${r}-color-info`]: e.info,
57
+ // 文本颜色
58
+ [`${r}-color-text-primary`]: "#303133",
59
+ [`${r}-color-text-regular`]: "#606266",
60
+ [`${r}-color-text-secondary`]: "#909399",
61
+ [`${r}-color-text-placeholder`]: "#a8abb2",
62
+ [`${r}-color-text-disabled`]: "#c0c4cc",
63
+ // 边框颜色
64
+ [`${r}-border-color`]: "#dcdfe6",
65
+ [`${r}-border-color-light`]: "#e4e7ed",
66
+ [`${r}-border-color-lighter`]: "#ebeef5",
67
+ [`${r}-border-color-extra-light`]: "#f2f6fc",
68
+ [`${r}-border-color-dark`]: "#d4d4d4",
69
+ [`${r}-border-color-darker`]: "#c0c4cc",
70
+ // 填充颜色
71
+ [`${r}-fill-color`]: "#f5f7fa",
72
+ [`${r}-fill-color-light`]: "#fafafa",
73
+ [`${r}-fill-color-lighter`]: "#fafafa",
74
+ [`${r}-fill-color-extra-light`]: "#fafafa",
75
+ [`${r}-fill-color-dark`]: "#ebedf0",
76
+ [`${r}-fill-color-darker`]: "#e6e8eb",
77
+ [`${r}-fill-color-blank`]: "#ffffff",
78
+ // 背景颜色
79
+ [`${r}-bg-color`]: "#ffffff",
80
+ [`${r}-bg-color-page`]: "#f2f3f5",
81
+ [`${r}-bg-color-overlay`]: "#ffffff",
82
+ // 字体
83
+ [`${r}-font-family`]: "'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif",
84
+ [`${r}-font-size-extra-small`]: "12px",
85
+ [`${r}-font-size-small`]: "13px",
86
+ [`${r}-font-size-base`]: "14px",
87
+ [`${r}-font-size-medium`]: "16px",
88
+ [`${r}-font-size-large`]: "18px",
89
+ [`${r}-font-size-extra-large`]: "20px",
90
+ // 行高
91
+ [`${r}-line-height-extra-small`]: "1.4",
92
+ [`${r}-line-height-small`]: "1.5",
93
+ [`${r}-line-height-base`]: "1.6",
94
+ [`${r}-line-height-medium`]: "1.7",
95
+ [`${r}-line-height-large`]: "1.8",
96
+ [`${r}-line-height-extra-large`]: "1.9",
97
+ // 圆角
98
+ [`${r}-border-radius-base`]: "4px",
99
+ [`${r}-border-radius-small`]: "2px",
100
+ [`${r}-border-radius-large`]: "8px",
101
+ [`${r}-border-radius-round`]: "20px",
102
+ [`${r}-border-radius-circle`]: "100%",
103
+ // 阴影
104
+ [`${r}-box-shadow-base`]: "0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)",
105
+ [`${r}-box-shadow-light`]: "0 2px 12px 0 rgba(0, 0, 0, 0.1)",
106
+ [`${r}-box-shadow-lighter`]: "0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24)",
107
+ [`${r}-box-shadow-dark`]: "0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",
108
+ // 组件尺寸
109
+ [`${r}-component-size`]: `${f[e.size]}px`,
110
+ [`${r}-component-size-large`]: `${f.large}px`,
111
+ [`${r}-component-size-small`]: `${f.small}px`,
112
+ // 动画
113
+ [`${r}-transition-duration`]: "0.3s",
114
+ [`${r}-transition-duration-fast`]: "0.2s",
115
+ [`${r}-transition-function`]: "cubic-bezier(0.645, 0.045, 0.355, 1)"
57
116
  };
58
117
  }
118
+ function D(e) {
119
+ const r = m(e), t = document.documentElement;
120
+ Object.entries(r).forEach(([l, n]) => {
121
+ t.style.setProperty(l, n);
122
+ });
123
+ }
124
+ function E() {
125
+ const r = document.documentElement.style;
126
+ for (let t = r.length - 1; t >= 0; t--) {
127
+ const l = r[t];
128
+ l.startsWith(o) && r.removeProperty(l);
129
+ }
130
+ }
131
+ const b = {
132
+ // 文本颜色
133
+ [`${o}-color-text-primary`]: "#E5EAF3",
134
+ [`${o}-color-text-regular`]: "#CFD3DC",
135
+ [`${o}-color-text-secondary`]: "#A3A6AD",
136
+ [`${o}-color-text-placeholder`]: "#8D9099",
137
+ [`${o}-color-text-disabled`]: "#6C6E72",
138
+ // 边框颜色
139
+ [`${o}-border-color`]: "#4C4D4F",
140
+ [`${o}-border-color-light`]: "#414243",
141
+ [`${o}-border-color-lighter`]: "#363637",
142
+ [`${o}-border-color-extra-light`]: "#2B2B2C",
143
+ [`${o}-border-color-dark`]: "#58585B",
144
+ [`${o}-border-color-darker`]: "#6B6B6E",
145
+ // 填充颜色
146
+ [`${o}-fill-color`]: "#303032",
147
+ [`${o}-fill-color-light`]: "#262727",
148
+ [`${o}-fill-color-lighter`]: "#1D1D1D",
149
+ [`${o}-fill-color-extra-light`]: "#191919",
150
+ [`${o}-fill-color-dark`]: "#363637",
151
+ [`${o}-fill-color-darker`]: "#3E3E3F",
152
+ [`${o}-fill-color-blank`]: "#141414",
153
+ // 背景颜色
154
+ [`${o}-bg-color`]: "#141414",
155
+ [`${o}-bg-color-page`]: "#0a0a0a",
156
+ [`${o}-bg-color-overlay`]: "#1D1D1D"
157
+ };
158
+ function S() {
159
+ const e = document.documentElement;
160
+ Object.entries(b).forEach(([r, t]) => {
161
+ e.style.setProperty(r, t);
162
+ });
163
+ }
164
+ function v() {
165
+ const e = document.documentElement;
166
+ Object.keys(b).forEach((r) => {
167
+ e.style.removeProperty(r);
168
+ });
169
+ }
59
170
  export {
60
- b as cssVarPrefix,
61
- g as defaultThemeConfig,
171
+ D as applyCSSVars,
172
+ S as applyDarkTheme,
173
+ o as cssVarPrefix,
174
+ b as darkCSSVars,
175
+ y as defaultThemeConfig,
62
176
  m as generateCSSVars,
63
- h as generateColorPalette,
64
- u as sizeMap
177
+ z as generateColorPalette,
178
+ k as getComponentSize,
179
+ $ as hexToRgb,
180
+ C as mixColor,
181
+ E as removeCSSVars,
182
+ v as removeDarkTheme,
183
+ h as rgbToHex,
184
+ f as sizeMap
65
185
  };
@@ -1,150 +1,226 @@
1
- import { computed as _, getCurrentInstance as A } from "vue";
2
- const p = "x", I = "is-", $ = (e) => p + "-" + e, l = $, j = (e, t) => `${$(e)}__${t}`, R = j, w = (e, t, n) => `${$(e)}${t ? `__${t}` : ""}--${n}`, S = w, U = (e, t) => t ? `${I}${e}` : "", O = (e, t) => t === !1 ? "" : `${I}${e}`;
3
- function q(e) {
4
- const t = e || p, n = (i = "") => t ? `${t}-${i}` : i;
1
+ import { computed as w, getCurrentInstance as j } from "vue";
2
+ const l = "x", I = "is-", g = (e) => l + "-" + e, y = g, O = (e, t) => `${g(e)}__${t}`, W = O, _ = (e, t, n) => `${g(e)}${t ? `__${t}` : ""}--${n}`, G = _, H = (e, t) => t ? `${I}${e}` : "", C = (e, t) => t === !1 ? "" : `${I}${e}`;
3
+ function J(e) {
4
+ const t = e || l, n = (i = "") => t ? `${t}-${i}` : i;
5
5
  return {
6
6
  b: n,
7
- e: (i) => (x) => `${n(x)}__${i}`,
8
- m: (i) => (x) => `${n(x)}--${i}`,
9
- em: (i, x) => (h) => `${n(h)}__${i}--${x}`,
10
- is: O
7
+ e: (i) => (a) => `${n(a)}__${i}`,
8
+ m: (i) => (a) => `${n(a)}--${i}`,
9
+ em: (i, a) => ($) => `${n($)}__${i}--${a}`,
10
+ is: C
11
11
  };
12
12
  }
13
- function G(e) {
14
- const t = p, n = `${t}-${e}`, s = (o = "") => o ? `${n}-${o}` : n, r = (o) => o ? `${n}__${o}` : "";
13
+ function K(e) {
14
+ const t = l, n = `${t}-${e}`, s = (r = "") => r ? `${n}-${r}` : n, o = (r) => r ? `${n}__${r}` : "";
15
15
  return {
16
16
  namespace: t,
17
17
  prefix: n,
18
18
  b: s,
19
- e: r,
20
- m: (o) => o ? `${n}--${o}` : "",
21
- be: (o, c) => s(o) + (c ? `__${c}` : ""),
22
- bm: (o, c) => s(o) + (c ? `--${c}` : ""),
23
- em: (o, c) => r(o) + (c ? `--${c}` : ""),
24
- is: (o, c) => c === !1 ? "" : `${I}${o}`
19
+ e: o,
20
+ m: (r) => r ? `${n}--${r}` : "",
21
+ be: (r, u) => s(r) + (u ? `__${u}` : ""),
22
+ bm: (r, u) => s(r) + (u ? `--${u}` : ""),
23
+ em: (r, u) => o(r) + (u ? `--${u}` : ""),
24
+ is: (r, u) => u === !1 ? "" : `${I}${r}`
25
25
  };
26
26
  }
27
- function H() {
27
+ function Q() {
28
28
  var n;
29
- const e = A(), t = ((n = e == null ? void 0 : e.type) == null ? void 0 : n.name) || "";
29
+ const e = j(), t = ((n = e == null ? void 0 : e.type) == null ? void 0 : n.name) || "";
30
30
  return {
31
- prefix: p,
31
+ prefix: l,
32
32
  name: t
33
33
  };
34
34
  }
35
- function J(e, t) {
35
+ function X(e, t) {
36
36
  return {
37
- classList: _(() => {
37
+ classList: w(() => {
38
38
  const s = [];
39
- return t && s.push(l(t)), e.size && s.push(l(t) + `--${e.size}`), e.type && s.push(l(t) + `--${e.type}`), e.disabled && s.push("is-disabled"), e.loading && s.push("is-loading"), s;
39
+ return t && s.push(y(t)), e.size && s.push(y(t) + `--${e.size}`), e.type && s.push(y(t) + `--${e.type}`), e.disabled && s.push("is-disabled"), e.loading && s.push("is-loading"), s;
40
40
  })
41
41
  };
42
42
  }
43
- let d = 2e3;
44
- const y = [], f = () => ({
43
+ function L(...e) {
44
+ const t = [];
45
+ return e.forEach((n) => {
46
+ if (n)
47
+ if (typeof n == "string")
48
+ t.push(n);
49
+ else if (Array.isArray(n)) {
50
+ const s = L(...n);
51
+ s && t.push(s);
52
+ } else typeof n == "object" && Object.entries(n).forEach(([s, o]) => {
53
+ o && t.push(s);
54
+ });
55
+ }), t.join(" ");
56
+ }
57
+ let x = 2e3;
58
+ const h = [], d = () => ({
45
59
  get current() {
46
- return d;
60
+ return x;
47
61
  },
48
- next: () => (d = d + 1, y.push(d), d),
62
+ next: () => (x = x + 1, h.push(x), x),
49
63
  set: (t) => {
50
- d = t;
64
+ x = t;
51
65
  }
52
- }), T = 2e3, C = 1990, L = 1999, P = 2e3, M = 2e3, V = 2e3, K = () => f().next() + T, N = () => f().next() + C, Q = () => f().next() + L, W = () => f().next() + P, X = () => f().next() + M, Y = () => f().next() + V, k = {
66
+ }), T = 2e3, M = 1990, S = 1999, D = 2e3, E = 2e3, P = 2e3, N = 2e3, R = 2e3, Y = () => d().next() + T, k = () => d().next() + M, v = () => d().next() + S, ee = () => d().next() + D, te = () => d().next() + E, ne = () => d().next() + P, se = () => d().next() + N, oe = () => d().next() + R, re = {
67
+ /** 当前 z-index */
53
68
  zIndex: 2e3,
69
+ /**
70
+ * 获取下一个 z-index
71
+ * @returns z-index 值
72
+ */
54
73
  next() {
55
74
  return this.zIndex = this.zIndex + 1, this.zIndex;
75
+ },
76
+ /**
77
+ * 重置 z-index
78
+ */
79
+ reset() {
80
+ this.zIndex = 2e3;
56
81
  }
57
- }, v = () => {
58
- d = 2e3, y.length = 0;
59
- }, ee = () => [...y], g = (e) => e === void 0, Z = (e) => e === null, m = (e) => g(e) || Z(e), te = (e) => e === !0, ne = (e) => e === !1, se = (e) => Array.isArray(e) || typeof e == "string" ? e.length === 0 : typeof e == "object" && e !== null ? Object.keys(e).length === 0 : m(e), oe = (e) => !m(e), re = (e) => (t) => e(t), ce = (e) => () => e, ie = (e, t) => m(e) ? t : e, ue = (e) => Array.isArray(e) ? e : [e], D = (e) => Z(e) ? "null" : g(e) ? "undefined" : Object.prototype.toString.call(e).slice(8, -1).toLowerCase(), de = (e, t) => D(e) === t, a = (e) => {
82
+ }, ce = () => {
83
+ x = 2e3, h.length = 0;
84
+ }, ie = () => [...h], ue = () => x, z = (e) => e === void 0, Z = (e) => e === null, m = (e) => z(e) || Z(e), xe = (e) => e === !0, de = (e) => e === !1, ae = (e) => Array.isArray(e) || typeof e == "string" ? e.length === 0 : typeof e == "object" && e !== null ? Object.keys(e).length === 0 : m(e), fe = (e) => !m(e), pe = (e) => typeof e == "number" && !isNaN(e), le = (e) => typeof e == "string", ye = (e) => typeof e == "boolean", V = (e) => typeof e == "function", Ie = Array.isArray, B = (e) => e !== null && typeof e == "object", f = (e) => {
60
85
  if (e === null || typeof e != "object") return !1;
61
86
  const t = Object.getPrototypeOf(e);
62
87
  return t === Object.prototype || t === null;
63
- }, z = (e, ...t) => {
88
+ }, ge = (e) => B(e) && V(e.then), he = (e) => e instanceof Date, me = (e) => e instanceof RegExp, F = (e) => Z(e) ? "null" : z(e) ? "undefined" : Object.prototype.toString.call(e).slice(8, -1).toLowerCase(), $e = (e, t) => F(e) === t, be = (e) => (t) => e(t), Ae = (e) => () => e, ze = (e, t) => m(e) ? t : e, Ze = () => {
89
+ }, we = (e) => e, je = (...e) => (t) => e.reduceRight((n, s) => s(n), t), Oe = (...e) => (t) => e.reduce((n, s) => s(n), t), _e = (e) => {
90
+ let t = !1, n;
91
+ return (...s) => (t || (t = !0, n = e(...s)), n);
92
+ }, Ce = (e, t) => {
93
+ try {
94
+ return e();
95
+ } catch (n) {
96
+ return typeof t == "function" ? t(n) : void 0;
97
+ }
98
+ }, Le = (e) => Array.isArray(e) ? e : [e], Te = (e) => [...new Set(e)], Me = (e) => e.reduce((t, n) => t.concat(Array.isArray(n) ? n : [n]), []), b = (e, ...t) => {
64
99
  if (!t.length) return e;
65
100
  const n = t.shift();
66
- return a(e) && a(n) && Object.keys(n).forEach((s) => {
67
- const r = e[s], u = n[s];
68
- Array.isArray(r) && Array.isArray(u) ? e[s] = r.concat(u) : a(r) && a(u) ? e[s] = z(r, u) : e[s] = u;
69
- }), z(e, ...t);
70
- }, b = (e) => Array.isArray(e) ? e.map(b) : a(e) ? Object.fromEntries(
71
- Object.entries(e).map(([t, n]) => [t, b(n)])
72
- ) : e, xe = (e, t = 300) => {
101
+ return f(e) && f(n) && Object.keys(n).forEach((s) => {
102
+ const o = e[s], c = n[s];
103
+ Array.isArray(o) && Array.isArray(c) ? e[s] = o.concat(c) : f(o) && f(c) ? e[s] = b(o, c) : e[s] = c;
104
+ }), b(e, ...t);
105
+ }, A = (e) => Array.isArray(e) ? e.map(A) : f(e) ? Object.fromEntries(
106
+ Object.entries(e).map(([t, n]) => [t, A(n)])
107
+ ) : e, Se = (e, t, n) => {
108
+ const s = Array.isArray(t) ? t : t.split(".");
109
+ let o = e;
110
+ for (const c of s) {
111
+ if (o == null)
112
+ return n;
113
+ o = o[c];
114
+ }
115
+ return o === void 0 ? n : o;
116
+ }, De = (e, t, n) => {
117
+ const s = Array.isArray(t) ? t : t.split(".");
118
+ let o = e;
119
+ for (let c = 0; c < s.length - 1; c++) {
120
+ const i = s[c];
121
+ i in o || (o[i] = {}), o = o[i];
122
+ }
123
+ o[s[s.length - 1]] = n;
124
+ }, Ee = (e, t = 300) => {
73
125
  let n = null;
74
126
  return (...s) => {
75
127
  n && clearTimeout(n), n = setTimeout(() => e(...s), t);
76
128
  };
77
- }, fe = (e, t = 300) => {
129
+ }, Pe = (e, t = 300) => {
78
130
  let n = 0;
79
131
  return (...s) => {
80
- const r = Date.now();
81
- r - n >= t && (n = r, e(...s));
132
+ const o = Date.now();
133
+ o - n >= t && (n = o, e(...s));
82
134
  };
83
- }, ae = (e) => {
84
- let t = !1, n;
85
- return (...s) => (t || (t = !0, n = e(...s)), n);
86
- }, pe = () => {
87
- }, le = (e) => e, Ie = (...e) => (t) => e.reduceRight((n, s) => s(n), t), $e = (...e) => (t) => e.reduce((n, s) => s(n), t), ye = (e, t) => {
88
- try {
89
- return e();
90
- } catch (n) {
91
- return typeof t == "function" ? t(n) : void 0;
92
- }
93
- }, E = typeof window < "u", me = E && "ontouchstart" in window;
135
+ }, p = typeof window < "u", Ne = p && "ontouchstart" in window, Re = p && /mobile|android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()), Ve = p && /iphone|ipad|ipod/i.test(navigator.userAgent.toLowerCase()), Be = p && /android/i.test(navigator.userAgent.toLowerCase()), Fe = p && /micromessenger/i.test(navigator.userAgent.toLowerCase()), qe = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => {
136
+ const t = Math.random() * 16 | 0;
137
+ return (e === "x" ? t : t & 3 | 8).toString(16);
138
+ }), Ue = (e = 8) => {
139
+ const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
140
+ let n = "";
141
+ for (let s = 0; s < e; s++)
142
+ n += t.charAt(Math.floor(Math.random() * t.length));
143
+ return n;
144
+ };
94
145
  export {
95
- l as b,
96
- $ as block,
97
- ue as coerceToArray,
98
- Ie as compose,
99
- ce as constant,
100
- q as createNamespace,
101
- xe as debounce,
102
- b as deepClone,
103
- z as deepMerge,
104
- p as defaultNamespace,
105
- ie as defaultTo,
106
- M as drawerZIndex,
107
- R as e,
108
- j as element,
109
- D as getType,
110
- ee as getZIndexList,
111
- le as identity,
112
- O as is,
113
- E as isBrowser,
114
- oe as isDefined,
115
- se as isEmpty,
116
- ne as isFalse,
146
+ y as b,
147
+ g as block,
148
+ L as classNames,
149
+ Le as coerceToArray,
150
+ je as compose,
151
+ Ae as constant,
152
+ J as createNamespace,
153
+ Ee as debounce,
154
+ A as deepClone,
155
+ b as deepMerge,
156
+ l as defaultNamespace,
157
+ ze as defaultTo,
158
+ E as drawerZIndex,
159
+ R as dropdownZIndex,
160
+ W as e,
161
+ O as element,
162
+ Me as flatten,
163
+ Se as get,
164
+ ue as getCurrentZIndex,
165
+ F as getType,
166
+ ie as getZIndexList,
167
+ we as identity,
168
+ C as is,
169
+ Be as isAndroid,
170
+ Ie as isArray,
171
+ ye as isBoolean,
172
+ p as isBrowser,
173
+ he as isDate,
174
+ fe as isDefined,
175
+ ae as isEmpty,
176
+ de as isFalse,
177
+ V as isFunction,
178
+ Ve as isIOS,
179
+ Re as isMobile,
117
180
  m as isNil,
118
181
  Z as isNull,
119
- a as isPlainObject,
120
- me as isSupportTouch,
121
- te as isTrue,
122
- de as isType,
123
- g as isUndefined,
124
- L as loadingZIndex,
125
- S as m,
126
- C as messageZIndex,
182
+ pe as isNumber,
183
+ B as isObject,
184
+ f as isPlainObject,
185
+ ge as isPromise,
186
+ me as isRegExp,
187
+ le as isString,
188
+ Ne as isSupportTouch,
189
+ xe as isTrue,
190
+ $e as isType,
191
+ z as isUndefined,
192
+ Fe as isWechat,
193
+ S as loadingZIndex,
194
+ G as m,
195
+ M as messageZIndex,
127
196
  T as modalZIndex,
128
- w as modifier,
129
- X as nextDrawerZIndex,
130
- Q as nextLoadingZIndex,
131
- N as nextMessageZIndex,
132
- K as nextModalZIndex,
133
- W as nextPopoverZIndex,
134
- Y as nextTooltipZIndex,
135
- pe as noop,
136
- ae as once,
137
- $e as pipe,
138
- P as popoverZIndex,
139
- k as popupManage,
140
- v as resetZIndex,
141
- U as state,
142
- fe as throttle,
143
- V as tooltipZIndex,
144
- ye as tryCatch,
145
- re as unary,
146
- J as useClass,
147
- H as useComponentPrefix,
148
- G as useNamespace,
149
- f as useZIndex
197
+ _ as modifier,
198
+ te as nextDrawerZIndex,
199
+ oe as nextDropdownZIndex,
200
+ v as nextLoadingZIndex,
201
+ k as nextMessageZIndex,
202
+ Y as nextModalZIndex,
203
+ ee as nextPopoverZIndex,
204
+ se as nextSelectZIndex,
205
+ ne as nextTooltipZIndex,
206
+ Ze as noop,
207
+ _e as once,
208
+ Oe as pipe,
209
+ D as popoverZIndex,
210
+ re as popupManage,
211
+ ce as resetZIndex,
212
+ N as selectZIndex,
213
+ De as set,
214
+ Ue as shortId,
215
+ H as state,
216
+ Pe as throttle,
217
+ P as tooltipZIndex,
218
+ Ce as tryCatch,
219
+ be as unary,
220
+ Te as unique,
221
+ X as useClass,
222
+ Q as useComponentPrefix,
223
+ K as useNamespace,
224
+ d as useZIndex,
225
+ qe as uuid
150
226
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),c=t=>typeof t=="number",d=t=>typeof t=="string",a=t=>typeof t=="boolean";function v(t=!1){const e=u.ref(t);return{value:e,toggle:o=>{a(o)?e.value=o:e.value=!e.value},setTrue:()=>{e.value=!0},setFalse:()=>{e.value=!1}}}function f(t,e,s="modelValue",n){return u.computed({get(){const o=t[s];return c(o)||d(o)?o:o??n},set(o){e(`update:${s}`,o)}})}function m(t=!1){const e=u.ref(t);return{visible:e,show:()=>{e.value=!0},hide:()=>{e.value=!1},toggle:()=>{e.value=!e.value}}}function g(t=!1){const e=u.ref(t);return{disabled:e,enable:()=>{e.value=!1},disable:()=>{e.value=!0}}}function b(t=!1){const e=u.ref(t);return{loading:e,setLoading:n=>{e.value=n},start:()=>{e.value=!0},end:()=>{e.value=!1}}}function h(t,e){const s=n=>{t.value&&!t.value.contains(n.target)&&e()};u.onMounted(()=>{document.addEventListener("click",s)}),u.onUnmounted(()=>{document.removeEventListener("click",s)})}function w(t){const e=s=>{s.key==="Escape"&&t()};u.onMounted(()=>{document.addEventListener("keydown",e)}),u.onUnmounted(()=>{document.removeEventListener("keydown",e)})}function L(t,e){let s=null;const n=()=>{s&&(s.disconnect(),s=null)};u.watch(t,i=>{n(),i&&(s=new ResizeObserver(o=>{const{width:r,height:l}=o[0].contentRect;e(r,l)}),s.observe(i))},{immediate:!0}),u.onUnmounted(n)}function p(t,e={attributes:!0,childList:!0,subtree:!0},s){let n=null;u.watch(t,i=>{n&&n.disconnect(),i&&(n=new MutationObserver(s),n.observe(i,e))},{immediate:!0}),u.onUnmounted(()=>{n==null||n.disconnect()})}function E(t,e){const s=()=>{const n=t.value;if(n&&n!==window){const{scrollTop:i,scrollLeft:o}=n;e(i,o)}else e(window.scrollY,window.scrollX)};u.onMounted(()=>{var n;(n=t.value)==null||n.addEventListener("scroll",s,{passive:!0})}),u.onUnmounted(()=>{var n;(n=t.value)==null||n.removeEventListener("scroll",s)})}function O(t,e){const s=u.ref(!1),n=()=>{s.value=!0,e==null||e(!0)},i=()=>{s.value=!1,e==null||e(!1)};return u.watch(t,o=>{o==null||o.addEventListener("focus",n),o==null||o.addEventListener("blur",i)},{immediate:!0}),u.onUnmounted(()=>{var o,r;(o=t.value)==null||o.removeEventListener("focus",n),(r=t.value)==null||r.removeEventListener("blur",i)}),{focused:s}}function y(t,e,s={threshold:0}){let n=null;u.watch(t,i=>{n&&n.disconnect(),i&&typeof IntersectionObserver<"u"&&(n=new IntersectionObserver(o=>{const r=o[0];e(r.isIntersecting)},s),n.observe(i))},{immediate:!0}),u.onUnmounted(()=>{n==null||n.disconnect()})}exports.useClickOutside=h;exports.useDOMObserver=p;exports.useDisabled=g;exports.useEscape=w;exports.useFocus=O;exports.useIntersectionObserver=y;exports.useLoading=b;exports.useModel=f;exports.useResize=L;exports.useScroll=E;exports.useToggle=v;exports.useVisible=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),c=t=>typeof t=="number",d=t=>typeof t=="string",a=t=>typeof t=="boolean";function v(t=!1){const e=u.ref(t);return{value:e,toggle:o=>{a(o)?e.value=o:e.value=!e.value},setTrue:()=>{e.value=!0},setFalse:()=>{e.value=!1}}}function f(t,e,s="modelValue",n){return u.computed({get(){const o=t[s];return c(o)||d(o)?o:o??n},set(o){e(`update:${s}`,o)}})}function m(t=!1){const e=u.ref(t);return{visible:e,show:()=>{e.value=!0},hide:()=>{e.value=!1},toggle:()=>{e.value=!e.value}}}function g(t=!1){const e=u.ref(t);return{disabled:e,enable:()=>{e.value=!1},disable:()=>{e.value=!0}}}function b(t=!1){const e=u.ref(t);return{loading:e,setLoading:n=>{e.value=n},start:()=>{e.value=!0},end:()=>{e.value=!1}}}function h(t,e){const s=n=>{t.value&&!t.value.contains(n.target)&&e()};u.onMounted(()=>{document.addEventListener("click",s)}),u.onUnmounted(()=>{document.removeEventListener("click",s)})}function w(t){const e=s=>{s.key==="Escape"&&t()};u.onMounted(()=>{document.addEventListener("keydown",e)}),u.onUnmounted(()=>{document.removeEventListener("keydown",e)})}function L(t,e){let s=null;const n=()=>{s&&(s.disconnect(),s=null)};u.watch(t,i=>{n(),i&&(s=new ResizeObserver(o=>{const{width:r,height:l}=o[0].contentRect;e(r,l)}),s.observe(i))},{immediate:!0}),u.onUnmounted(n)}function p(t,e={attributes:!0,childList:!0,subtree:!0},s){let n=null;u.watch(t,i=>{n&&n.disconnect(),i&&(n=new MutationObserver(s),n.observe(i,e))},{immediate:!0}),u.onUnmounted(()=>{n==null||n.disconnect()})}function E(t,e){const s=()=>{const n=t.value;if(n&&n!==window){const{scrollTop:i,scrollLeft:o}=n;e(i,o)}else e(window.scrollY,window.scrollX)};u.onMounted(()=>{var n;(n=t.value)==null||n.addEventListener("scroll",s,{passive:!0})}),u.onUnmounted(()=>{var n;(n=t.value)==null||n.removeEventListener("scroll",s)})}function O(t,e){const s=u.ref(!1),n=()=>{s.value=!0,e==null||e(!0)},i=()=>{s.value=!1,e==null||e(!1)};return u.watch(t,o=>{o==null||o.addEventListener("focus",n),o==null||o.addEventListener("blur",i)},{immediate:!0}),u.onUnmounted(()=>{var o,r;(o=t.value)==null||o.removeEventListener("focus",n),(r=t.value)==null||r.removeEventListener("blur",i)}),{focused:s}}function y(t,e,s={threshold:0}){let n=null;u.watch(t,i=>{n&&n.disconnect(),i&&typeof IntersectionObserver<"u"&&(n=new IntersectionObserver(o=>{const r=o[0];e(r.isIntersecting)},s),n.observe(i))},{immediate:!0}),u.onUnmounted(()=>{n==null||n.disconnect()})}function M(t=300){let e=null;const s=i=>{n(),e=setTimeout(i,t)},n=()=>{e&&(clearTimeout(e),e=null)};return u.onUnmounted(n),{execute:s,cancel:n}}exports.useClickOutside=h;exports.useDOMObserver=p;exports.useDelayedAction=M;exports.useDisabled=g;exports.useEscape=w;exports.useFocus=O;exports.useIntersectionObserver=y;exports.useLoading=b;exports.useModel=f;exports.useResize=L;exports.useScroll=E;exports.useToggle=v;exports.useVisible=m;
package/lib/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./theme/index.cjs"),e=require("./utils/index.cjs"),s=require("./hooks/index.cjs");exports.cssVarPrefix=n.cssVarPrefix;exports.defaultThemeConfig=n.defaultThemeConfig;exports.generateCSSVars=n.generateCSSVars;exports.generateColorPalette=n.generateColorPalette;exports.sizeMap=n.sizeMap;exports.b=e.b;exports.block=e.block;exports.coerceToArray=e.coerceToArray;exports.compose=e.compose;exports.constant=e.constant;exports.createNamespace=e.createNamespace;exports.debounce=e.debounce;exports.deepClone=e.deepClone;exports.deepMerge=e.deepMerge;exports.defaultNamespace=e.defaultNamespace;exports.defaultTo=e.defaultTo;exports.drawerZIndex=e.drawerZIndex;exports.e=e.e;exports.element=e.element;exports.getType=e.getType;exports.getZIndexList=e.getZIndexList;exports.identity=e.identity;exports.is=e.is;exports.isBrowser=e.isBrowser;exports.isDefined=e.isDefined;exports.isEmpty=e.isEmpty;exports.isFalse=e.isFalse;exports.isNil=e.isNil;exports.isNull=e.isNull;exports.isPlainObject=e.isPlainObject;exports.isSupportTouch=e.isSupportTouch;exports.isTrue=e.isTrue;exports.isType=e.isType;exports.isUndefined=e.isUndefined;exports.loadingZIndex=e.loadingZIndex;exports.m=e.m;exports.messageZIndex=e.messageZIndex;exports.modalZIndex=e.modalZIndex;exports.modifier=e.modifier;exports.nextDrawerZIndex=e.nextDrawerZIndex;exports.nextLoadingZIndex=e.nextLoadingZIndex;exports.nextMessageZIndex=e.nextMessageZIndex;exports.nextModalZIndex=e.nextModalZIndex;exports.nextPopoverZIndex=e.nextPopoverZIndex;exports.nextTooltipZIndex=e.nextTooltipZIndex;exports.noop=e.noop;exports.once=e.once;exports.pipe=e.pipe;exports.popoverZIndex=e.popoverZIndex;exports.popupManage=e.popupManage;exports.resetZIndex=e.resetZIndex;exports.state=e.state;exports.throttle=e.throttle;exports.tooltipZIndex=e.tooltipZIndex;exports.tryCatch=e.tryCatch;exports.unary=e.unary;exports.useClass=e.useClass;exports.useComponentPrefix=e.useComponentPrefix;exports.useNamespace=e.useNamespace;exports.useZIndex=e.useZIndex;exports.useClickOutside=s.useClickOutside;exports.useDOMObserver=s.useDOMObserver;exports.useDisabled=s.useDisabled;exports.useEscape=s.useEscape;exports.useFocus=s.useFocus;exports.useIntersectionObserver=s.useIntersectionObserver;exports.useLoading=s.useLoading;exports.useModel=s.useModel;exports.useResize=s.useResize;exports.useScroll=s.useScroll;exports.useToggle=s.useToggle;exports.useVisible=s.useVisible;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./theme/index.cjs"),e=require("./utils/index.cjs"),n=require("./hooks/index.cjs"),o="1.0.0";exports.applyCSSVars=s.applyCSSVars;exports.applyDarkTheme=s.applyDarkTheme;exports.cssVarPrefix=s.cssVarPrefix;exports.darkCSSVars=s.darkCSSVars;exports.defaultThemeConfig=s.defaultThemeConfig;exports.generateCSSVars=s.generateCSSVars;exports.generateColorPalette=s.generateColorPalette;exports.getComponentSize=s.getComponentSize;exports.hexToRgb=s.hexToRgb;exports.mixColor=s.mixColor;exports.removeCSSVars=s.removeCSSVars;exports.removeDarkTheme=s.removeDarkTheme;exports.rgbToHex=s.rgbToHex;exports.sizeMap=s.sizeMap;exports.b=e.b;exports.block=e.block;exports.classNames=e.classNames;exports.coerceToArray=e.coerceToArray;exports.compose=e.compose;exports.constant=e.constant;exports.createNamespace=e.createNamespace;exports.debounce=e.debounce;exports.deepClone=e.deepClone;exports.deepMerge=e.deepMerge;exports.defaultNamespace=e.defaultNamespace;exports.defaultTo=e.defaultTo;exports.drawerZIndex=e.drawerZIndex;exports.dropdownZIndex=e.dropdownZIndex;exports.e=e.e;exports.element=e.element;exports.flatten=e.flatten;exports.get=e.get;exports.getCurrentZIndex=e.getCurrentZIndex;exports.getType=e.getType;exports.getZIndexList=e.getZIndexList;exports.identity=e.identity;exports.is=e.is;exports.isAndroid=e.isAndroid;exports.isArray=e.isArray;exports.isBoolean=e.isBoolean;exports.isBrowser=e.isBrowser;exports.isDate=e.isDate;exports.isDefined=e.isDefined;exports.isEmpty=e.isEmpty;exports.isFalse=e.isFalse;exports.isFunction=e.isFunction;exports.isIOS=e.isIOS;exports.isMobile=e.isMobile;exports.isNil=e.isNil;exports.isNull=e.isNull;exports.isNumber=e.isNumber;exports.isObject=e.isObject;exports.isPlainObject=e.isPlainObject;exports.isPromise=e.isPromise;exports.isRegExp=e.isRegExp;exports.isString=e.isString;exports.isSupportTouch=e.isSupportTouch;exports.isTrue=e.isTrue;exports.isType=e.isType;exports.isUndefined=e.isUndefined;exports.isWechat=e.isWechat;exports.loadingZIndex=e.loadingZIndex;exports.m=e.m;exports.messageZIndex=e.messageZIndex;exports.modalZIndex=e.modalZIndex;exports.modifier=e.modifier;exports.nextDrawerZIndex=e.nextDrawerZIndex;exports.nextDropdownZIndex=e.nextDropdownZIndex;exports.nextLoadingZIndex=e.nextLoadingZIndex;exports.nextMessageZIndex=e.nextMessageZIndex;exports.nextModalZIndex=e.nextModalZIndex;exports.nextPopoverZIndex=e.nextPopoverZIndex;exports.nextSelectZIndex=e.nextSelectZIndex;exports.nextTooltipZIndex=e.nextTooltipZIndex;exports.noop=e.noop;exports.once=e.once;exports.pipe=e.pipe;exports.popoverZIndex=e.popoverZIndex;exports.popupManage=e.popupManage;exports.resetZIndex=e.resetZIndex;exports.selectZIndex=e.selectZIndex;exports.set=e.set;exports.shortId=e.shortId;exports.state=e.state;exports.throttle=e.throttle;exports.tooltipZIndex=e.tooltipZIndex;exports.tryCatch=e.tryCatch;exports.unary=e.unary;exports.unique=e.unique;exports.useClass=e.useClass;exports.useComponentPrefix=e.useComponentPrefix;exports.useNamespace=e.useNamespace;exports.useZIndex=e.useZIndex;exports.uuid=e.uuid;exports.useClickOutside=n.useClickOutside;exports.useDOMObserver=n.useDOMObserver;exports.useDelayedAction=n.useDelayedAction;exports.useDisabled=n.useDisabled;exports.useEscape=n.useEscape;exports.useFocus=n.useFocus;exports.useIntersectionObserver=n.useIntersectionObserver;exports.useLoading=n.useLoading;exports.useModel=n.useModel;exports.useResize=n.useResize;exports.useScroll=n.useScroll;exports.useToggle=n.useToggle;exports.useVisible=n.useVisible;exports.version=o;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b={mode:"light",primary:"#409eff",success:"#67c23a",warning:"#e6a23c",danger:"#f56c6c",info:"#909399",size:"default"},n={large:40,default:32,small:24};function h(r,e=10){const o=[],i=r.startsWith("#"),d=r.startsWith("rgb");let s,a,l;if(i){const t=r.slice(1);s=parseInt(t.slice(0,2),16),a=parseInt(t.slice(2,4),16),l=parseInt(t.slice(4,6),16)}else if(d){const t=r.match(/\d+/g);if(t)s=Number(t[0]),a=Number(t[1]),l=Number(t[2]);else return o}else return o;const g=100/(e+1);for(let t=1;t<=e;t++){const c=1-g*t/100,u=Math.round(s+(255-s)*c),$=Math.round(a+(255-a)*c),p=Math.round(l+(255-l)*c);o.push(`rgb(${u}, ${$}, ${p})`)}return o}const f="--xto";function m(r){const e=f;return{[`${e}-color-primary`]:r.primary,[`${e}-color-success`]:r.success,[`${e}-color-warning`]:r.warning,[`${e}-color-danger`]:r.danger,[`${e}-color-info`]:r.info,[`${e}-color-text`]:"#303133",[`${e}-color-text-placeholder`]:"#a8abb2",[`${e}-color-text-disabled`]:"#c0c4cc",[`${e}-border-color`]:"#dcdfe6",[`${e}-border-color-light`]:"#e4e7ed",[`${e}-border-color-lighter`]:"#ebeef5",[`${e}-fill-color`]:"#f5f7fa",[`${e}-fill-color-light`]:"#fafafa",[`${e}-bg-color`]:"#ffffff",[`${e}-bg-color-page`]:"#f2f3f5",[`${e}-bg-color-overlay`]:"#ffffff",[`${e}-font-size`]:r.size==="large"?"15px":r.size==="small"?"13px":"14px",[`${e}-component-size`]:`${n[r.size]}px`}}exports.cssVarPrefix=f;exports.defaultThemeConfig=b;exports.generateCSSVars=m;exports.generateColorPalette=h;exports.sizeMap=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y={mode:"light",primary:"#409eff",success:"#67c23a",warning:"#e6a23c",danger:"#f56c6c",info:"#909399",size:"default"},f={large:40,default:32,small:24},S=e=>f[e];function C(e,r=10){const t=[],a=e.startsWith("#"),n=e.startsWith("rgb");let s,c,i;if(a){const l=e.slice(1);s=parseInt(l.slice(0,2),16),c=parseInt(l.slice(2,4),16),i=parseInt(l.slice(4,6),16)}else if(n){const l=e.match(/\d+/g);if(l)s=Number(l[0]),c=Number(l[1]),i=Number(l[2]);else return t}else return t;const x=100/(r+1);for(let l=1;l<=r;l++){const d=1-x*l/100,u=Math.round(s+(255-s)*d),m=Math.round(c+(255-c)*d),h=Math.round(i+(255-i)*d);t.push(`rgb(${u}, ${m}, ${h})`)}return t}const $=e=>{const r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return r?{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}:null},p=(e,r,t)=>"#"+[e,r,t].map(a=>a.toString(16).padStart(2,"0")).join(""),k=(e,r,t=.5)=>{const a=$(e),n=$(r);if(!a||!n)return e;const s=Math.round(a.r*(1-t)+n.r*t),c=Math.round(a.g*(1-t)+n.g*t),i=Math.round(a.b*(1-t)+n.b*t);return p(s,c,i)},o="--xto";function b(e){const r=o;return{[`${r}-color-primary`]:e.primary,[`${r}-color-success`]:e.success,[`${r}-color-warning`]:e.warning,[`${r}-color-danger`]:e.danger,[`${r}-color-info`]:e.info,[`${r}-color-text-primary`]:"#303133",[`${r}-color-text-regular`]:"#606266",[`${r}-color-text-secondary`]:"#909399",[`${r}-color-text-placeholder`]:"#a8abb2",[`${r}-color-text-disabled`]:"#c0c4cc",[`${r}-border-color`]:"#dcdfe6",[`${r}-border-color-light`]:"#e4e7ed",[`${r}-border-color-lighter`]:"#ebeef5",[`${r}-border-color-extra-light`]:"#f2f6fc",[`${r}-border-color-dark`]:"#d4d4d4",[`${r}-border-color-darker`]:"#c0c4cc",[`${r}-fill-color`]:"#f5f7fa",[`${r}-fill-color-light`]:"#fafafa",[`${r}-fill-color-lighter`]:"#fafafa",[`${r}-fill-color-extra-light`]:"#fafafa",[`${r}-fill-color-dark`]:"#ebedf0",[`${r}-fill-color-darker`]:"#e6e8eb",[`${r}-fill-color-blank`]:"#ffffff",[`${r}-bg-color`]:"#ffffff",[`${r}-bg-color-page`]:"#f2f3f5",[`${r}-bg-color-overlay`]:"#ffffff",[`${r}-font-family`]:"'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif",[`${r}-font-size-extra-small`]:"12px",[`${r}-font-size-small`]:"13px",[`${r}-font-size-base`]:"14px",[`${r}-font-size-medium`]:"16px",[`${r}-font-size-large`]:"18px",[`${r}-font-size-extra-large`]:"20px",[`${r}-line-height-extra-small`]:"1.4",[`${r}-line-height-small`]:"1.5",[`${r}-line-height-base`]:"1.6",[`${r}-line-height-medium`]:"1.7",[`${r}-line-height-large`]:"1.8",[`${r}-line-height-extra-large`]:"1.9",[`${r}-border-radius-base`]:"4px",[`${r}-border-radius-small`]:"2px",[`${r}-border-radius-large`]:"8px",[`${r}-border-radius-round`]:"20px",[`${r}-border-radius-circle`]:"100%",[`${r}-box-shadow-base`]:"0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)",[`${r}-box-shadow-light`]:"0 2px 12px 0 rgba(0, 0, 0, 0.1)",[`${r}-box-shadow-lighter`]:"0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24)",[`${r}-box-shadow-dark`]:"0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",[`${r}-component-size`]:`${f[e.size]}px`,[`${r}-component-size-large`]:`${f.large}px`,[`${r}-component-size-small`]:`${f.small}px`,[`${r}-transition-duration`]:"0.3s",[`${r}-transition-duration-fast`]:"0.2s",[`${r}-transition-function`]:"cubic-bezier(0.645, 0.045, 0.355, 1)"}}function z(e){const r=b(e),t=document.documentElement;Object.entries(r).forEach(([a,n])=>{t.style.setProperty(a,n)})}function D(){const r=document.documentElement.style;for(let t=r.length-1;t>=0;t--){const a=r[t];a.startsWith(o)&&r.removeProperty(a)}}const g={[`${o}-color-text-primary`]:"#E5EAF3",[`${o}-color-text-regular`]:"#CFD3DC",[`${o}-color-text-secondary`]:"#A3A6AD",[`${o}-color-text-placeholder`]:"#8D9099",[`${o}-color-text-disabled`]:"#6C6E72",[`${o}-border-color`]:"#4C4D4F",[`${o}-border-color-light`]:"#414243",[`${o}-border-color-lighter`]:"#363637",[`${o}-border-color-extra-light`]:"#2B2B2C",[`${o}-border-color-dark`]:"#58585B",[`${o}-border-color-darker`]:"#6B6B6E",[`${o}-fill-color`]:"#303032",[`${o}-fill-color-light`]:"#262727",[`${o}-fill-color-lighter`]:"#1D1D1D",[`${o}-fill-color-extra-light`]:"#191919",[`${o}-fill-color-dark`]:"#363637",[`${o}-fill-color-darker`]:"#3E3E3F",[`${o}-fill-color-blank`]:"#141414",[`${o}-bg-color`]:"#141414",[`${o}-bg-color-page`]:"#0a0a0a",[`${o}-bg-color-overlay`]:"#1D1D1D"};function E(){const e=document.documentElement;Object.entries(g).forEach(([r,t])=>{e.style.setProperty(r,t)})}function v(){const e=document.documentElement;Object.keys(g).forEach(r=>{e.style.removeProperty(r)})}exports.applyCSSVars=z;exports.applyDarkTheme=E;exports.cssVarPrefix=o;exports.darkCSSVars=g;exports.defaultThemeConfig=y;exports.generateCSSVars=b;exports.generateColorPalette=C;exports.getComponentSize=S;exports.hexToRgb=$;exports.mixColor=k;exports.removeCSSVars=D;exports.removeDarkTheme=v;exports.rgbToHex=p;exports.sizeMap=f;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("vue"),l="x",Z="is-",I=e=>l+"-"+e,f=I,w=(e,n)=>`${I(e)}__${n}`,S=w,_=(e,n,t)=>`${I(e)}${n?`__${n}`:""}--${t}`,V=_,E=(e,n)=>n?`${Z}${e}`:"",j=(e,n)=>n===!1?"":`${Z}${e}`;function B(e){const n=e||l,t=(i="")=>n?`${n}-${i}`:i;return{b:t,e:i=>a=>`${t(a)}__${i}`,m:i=>a=>`${t(a)}--${i}`,em:(i,a)=>z=>`${t(z)}__${i}--${a}`,is:j}}function F(e){const n=l,t=`${n}-${e}`,s=(o="")=>o?`${t}-${o}`:t,r=o=>o?`${t}__${o}`:"";return{namespace:n,prefix:t,b:s,e:r,m:o=>o?`${t}--${o}`:"",be:(o,c)=>s(o)+(c?`__${c}`:""),bm:(o,c)=>s(o)+(c?`--${c}`:""),em:(o,c)=>r(o)+(c?`--${c}`:""),is:(o,c)=>c===!1?"":`${Z}${o}`}}function U(){var t;const e=T.getCurrentInstance(),n=((t=e==null?void 0:e.type)==null?void 0:t.name)||"";return{prefix:l,name:n}}function q(e,n){return{classList:T.computed(()=>{const s=[];return n&&s.push(f(n)),e.size&&s.push(f(n)+`--${e.size}`),e.type&&s.push(f(n)+`--${e.type}`),e.disabled&&s.push("is-disabled"),e.loading&&s.push("is-loading"),s})}}let d=2e3;const g=[],x=()=>({get current(){return d},next:()=>(d=d+1,g.push(d),d),set:n=>{d=n}}),A=2e3,O=1990,C=1999,M=2e3,P=2e3,L=2e3,R=()=>x().next()+A,G=()=>x().next()+O,H=()=>x().next()+C,J=()=>x().next()+M,K=()=>x().next()+P,Q=()=>x().next()+L,W={zIndex:2e3,next(){return this.zIndex=this.zIndex+1,this.zIndex}},X=()=>{d=2e3,g.length=0},Y=()=>[...g],b=e=>e===void 0,h=e=>e===null,y=e=>b(e)||h(e),k=e=>e===!0,v=e=>e===!1,ee=e=>Array.isArray(e)||typeof e=="string"?e.length===0:typeof e=="object"&&e!==null?Object.keys(e).length===0:y(e),ne=e=>!y(e),te=e=>n=>e(n),se=e=>()=>e,oe=(e,n)=>y(e)?n:e,re=e=>Array.isArray(e)?e:[e],D=e=>h(e)?"null":b(e)?"undefined":Object.prototype.toString.call(e).slice(8,-1).toLowerCase(),ce=(e,n)=>D(e)===n,p=e=>{if(e===null||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);return n===Object.prototype||n===null},m=(e,...n)=>{if(!n.length)return e;const t=n.shift();return p(e)&&p(t)&&Object.keys(t).forEach(s=>{const r=e[s],u=t[s];Array.isArray(r)&&Array.isArray(u)?e[s]=r.concat(u):p(r)&&p(u)?e[s]=m(r,u):e[s]=u}),m(e,...n)},$=e=>Array.isArray(e)?e.map($):p(e)?Object.fromEntries(Object.entries(e).map(([n,t])=>[n,$(t)])):e,ie=(e,n=300)=>{let t=null;return(...s)=>{t&&clearTimeout(t),t=setTimeout(()=>e(...s),n)}},ue=(e,n=300)=>{let t=0;return(...s)=>{const r=Date.now();r-t>=n&&(t=r,e(...s))}},de=e=>{let n=!1,t;return(...s)=>(n||(n=!0,t=e(...s)),t)},xe=()=>{},ae=e=>e,pe=(...e)=>n=>e.reduceRight((t,s)=>s(t),n),le=(...e)=>n=>e.reduce((t,s)=>s(t),n),fe=(e,n)=>{try{return e()}catch(t){return typeof n=="function"?n(t):void 0}},N=typeof window<"u",Ie=N&&"ontouchstart"in window;exports.b=f;exports.block=I;exports.coerceToArray=re;exports.compose=pe;exports.constant=se;exports.createNamespace=B;exports.debounce=ie;exports.deepClone=$;exports.deepMerge=m;exports.defaultNamespace=l;exports.defaultTo=oe;exports.drawerZIndex=P;exports.e=S;exports.element=w;exports.getType=D;exports.getZIndexList=Y;exports.identity=ae;exports.is=j;exports.isBrowser=N;exports.isDefined=ne;exports.isEmpty=ee;exports.isFalse=v;exports.isNil=y;exports.isNull=h;exports.isPlainObject=p;exports.isSupportTouch=Ie;exports.isTrue=k;exports.isType=ce;exports.isUndefined=b;exports.loadingZIndex=C;exports.m=V;exports.messageZIndex=O;exports.modalZIndex=A;exports.modifier=_;exports.nextDrawerZIndex=K;exports.nextLoadingZIndex=H;exports.nextMessageZIndex=G;exports.nextModalZIndex=R;exports.nextPopoverZIndex=J;exports.nextTooltipZIndex=Q;exports.noop=xe;exports.once=de;exports.pipe=le;exports.popoverZIndex=M;exports.popupManage=W;exports.resetZIndex=X;exports.state=E;exports.throttle=ue;exports.tooltipZIndex=L;exports.tryCatch=fe;exports.unary=te;exports.useClass=q;exports.useComponentPrefix=U;exports.useNamespace=F;exports.useZIndex=x;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("vue"),f="x",Z="is-",y=e=>f+"-"+e,I=y,j=(e,t)=>`${y(e)}__${t}`,q=j,T=(e,t,n)=>`${y(e)}${t?`__${t}`:""}--${n}`,V=T,U=(e,t)=>t?`${Z}${e}`:"",C=(e,t)=>t===!1?"":`${Z}${e}`;function W(e){const t=e||f,n=(c="")=>t?`${t}-${c}`:c;return{b:n,e:c=>a=>`${n(a)}__${c}`,m:c=>a=>`${n(a)}--${c}`,em:(c,a)=>z=>`${n(z)}__${c}--${a}`,is:C}}function k(e){const t=f,n=`${t}-${e}`,s=(r="")=>r?`${n}-${r}`:n,o=r=>r?`${n}__${r}`:"";return{namespace:t,prefix:n,b:s,e:o,m:r=>r?`${n}--${r}`:"",be:(r,u)=>s(r)+(u?`__${u}`:""),bm:(r,u)=>s(r)+(u?`--${u}`:""),em:(r,u)=>o(r)+(u?`--${u}`:""),is:(r,u)=>u===!1?"":`${Z}${r}`}}function G(){var n;const e=w.getCurrentInstance(),t=((n=e==null?void 0:e.type)==null?void 0:n.name)||"";return{prefix:f,name:t}}function H(e,t){return{classList:w.computed(()=>{const s=[];return t&&s.push(I(t)),e.size&&s.push(I(t)+`--${e.size}`),e.type&&s.push(I(t)+`--${e.type}`),e.disabled&&s.push("is-disabled"),e.loading&&s.push("is-loading"),s})}}function O(...e){const t=[];return e.forEach(n=>{if(n)if(typeof n=="string")t.push(n);else if(Array.isArray(n)){const s=O(...n);s&&t.push(s)}else typeof n=="object"&&Object.entries(n).forEach(([s,o])=>{o&&t.push(s)})}),t.join(" ")}let x=2e3;const b=[],d=()=>({get current(){return x},next:()=>(x=x+1,b.push(x),x),set:t=>{x=t}}),M=2e3,S=1990,L=1999,_=2e3,N=2e3,P=2e3,D=2e3,E=2e3,J=()=>d().next()+M,K=()=>d().next()+S,Q=()=>d().next()+L,X=()=>d().next()+_,Y=()=>d().next()+N,v=()=>d().next()+P,ee=()=>d().next()+D,te=()=>d().next()+E,ne={zIndex:2e3,next(){return this.zIndex=this.zIndex+1,this.zIndex},reset(){this.zIndex=2e3}},se=()=>{x=2e3,b.length=0},oe=()=>[...b],re=()=>x,$=e=>e===void 0,A=e=>e===null,g=e=>$(e)||A(e),ie=e=>e===!0,ce=e=>e===!1,ue=e=>Array.isArray(e)||typeof e=="string"?e.length===0:typeof e=="object"&&e!==null?Object.keys(e).length===0:g(e),de=e=>!g(e),xe=e=>typeof e=="number"&&!isNaN(e),ae=e=>typeof e=="string",pe=e=>typeof e=="boolean",B=e=>typeof e=="function",le=Array.isArray,F=e=>e!==null&&typeof e=="object",p=e=>{if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},fe=e=>F(e)&&B(e.then),Ie=e=>e instanceof Date,ye=e=>e instanceof RegExp,R=e=>A(e)?"null":$(e)?"undefined":Object.prototype.toString.call(e).slice(8,-1).toLowerCase(),ge=(e,t)=>R(e)===t,me=e=>t=>e(t),he=e=>()=>e,Ze=(e,t)=>g(e)?t:e,be=()=>{},$e=e=>e,Ae=(...e)=>t=>e.reduceRight((n,s)=>s(n),t),ze=(...e)=>t=>e.reduce((n,s)=>s(n),t),we=e=>{let t=!1,n;return(...s)=>(t||(t=!0,n=e(...s)),n)},je=(e,t)=>{try{return e()}catch(n){return typeof t=="function"?t(n):void 0}},Te=e=>Array.isArray(e)?e:[e],Ce=e=>[...new Set(e)],Oe=e=>e.reduce((t,n)=>t.concat(Array.isArray(n)?n:[n]),[]),m=(e,...t)=>{if(!t.length)return e;const n=t.shift();return p(e)&&p(n)&&Object.keys(n).forEach(s=>{const o=e[s],i=n[s];Array.isArray(o)&&Array.isArray(i)?e[s]=o.concat(i):p(o)&&p(i)?e[s]=m(o,i):e[s]=i}),m(e,...t)},h=e=>Array.isArray(e)?e.map(h):p(e)?Object.fromEntries(Object.entries(e).map(([t,n])=>[t,h(n)])):e,Me=(e,t,n)=>{const s=Array.isArray(t)?t:t.split(".");let o=e;for(const i of s){if(o==null)return n;o=o[i]}return o===void 0?n:o},Se=(e,t,n)=>{const s=Array.isArray(t)?t:t.split(".");let o=e;for(let i=0;i<s.length-1;i++){const c=s[i];c in o||(o[c]={}),o=o[c]}o[s[s.length-1]]=n},Le=(e,t=300)=>{let n=null;return(...s)=>{n&&clearTimeout(n),n=setTimeout(()=>e(...s),t)}},_e=(e,t=300)=>{let n=0;return(...s)=>{const o=Date.now();o-n>=t&&(n=o,e(...s))}},l=typeof window<"u",Ne=l&&"ontouchstart"in window,Pe=l&&/mobile|android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),De=l&&/iphone|ipad|ipod/i.test(navigator.userAgent.toLowerCase()),Ee=l&&/android/i.test(navigator.userAgent.toLowerCase()),Be=l&&/micromessenger/i.test(navigator.userAgent.toLowerCase()),Fe=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)}),Re=(e=8)=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let n="";for(let s=0;s<e;s++)n+=t.charAt(Math.floor(Math.random()*t.length));return n};exports.b=I;exports.block=y;exports.classNames=O;exports.coerceToArray=Te;exports.compose=Ae;exports.constant=he;exports.createNamespace=W;exports.debounce=Le;exports.deepClone=h;exports.deepMerge=m;exports.defaultNamespace=f;exports.defaultTo=Ze;exports.drawerZIndex=N;exports.dropdownZIndex=E;exports.e=q;exports.element=j;exports.flatten=Oe;exports.get=Me;exports.getCurrentZIndex=re;exports.getType=R;exports.getZIndexList=oe;exports.identity=$e;exports.is=C;exports.isAndroid=Ee;exports.isArray=le;exports.isBoolean=pe;exports.isBrowser=l;exports.isDate=Ie;exports.isDefined=de;exports.isEmpty=ue;exports.isFalse=ce;exports.isFunction=B;exports.isIOS=De;exports.isMobile=Pe;exports.isNil=g;exports.isNull=A;exports.isNumber=xe;exports.isObject=F;exports.isPlainObject=p;exports.isPromise=fe;exports.isRegExp=ye;exports.isString=ae;exports.isSupportTouch=Ne;exports.isTrue=ie;exports.isType=ge;exports.isUndefined=$;exports.isWechat=Be;exports.loadingZIndex=L;exports.m=V;exports.messageZIndex=S;exports.modalZIndex=M;exports.modifier=T;exports.nextDrawerZIndex=Y;exports.nextDropdownZIndex=te;exports.nextLoadingZIndex=Q;exports.nextMessageZIndex=K;exports.nextModalZIndex=J;exports.nextPopoverZIndex=X;exports.nextSelectZIndex=ee;exports.nextTooltipZIndex=v;exports.noop=be;exports.once=we;exports.pipe=ze;exports.popoverZIndex=_;exports.popupManage=ne;exports.resetZIndex=se;exports.selectZIndex=D;exports.set=Se;exports.shortId=Re;exports.state=U;exports.throttle=_e;exports.tooltipZIndex=P;exports.tryCatch=je;exports.unary=me;exports.unique=Ce;exports.useClass=H;exports.useComponentPrefix=G;exports.useNamespace=k;exports.useZIndex=d;exports.uuid=Fe;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xto/core",
3
- "version": "1.0.3",
3
+ "version": "1.1.0",
4
4
  "description": "Xto Core - Theme, hooks, utils and types",
5
5
  "homepage": "https://jinguchu.github.io/xto-ui/",
6
6
  "repository": {