ep-craft 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/dist/components/button/EpButton.vue.d.ts +7 -7
  2. package/dist/components/button/button.d.ts +4 -4
  3. package/dist/components/button/index.d.ts +2 -4
  4. package/dist/components/button/index.js +4 -6
  5. package/dist/index.css +1 -2
  6. package/dist/resolver.js +9 -12
  7. package/package.json +4 -2
  8. package/theme-chalk/src/affix.scss +7 -0
  9. package/theme-chalk/src/alert.scss +115 -0
  10. package/theme-chalk/src/anchor-link.scss +45 -0
  11. package/theme-chalk/src/anchor.scss +93 -0
  12. package/theme-chalk/src/aside.scss +8 -0
  13. package/theme-chalk/src/autocomplete.scss +95 -0
  14. package/theme-chalk/src/avatar-group.scss +25 -0
  15. package/theme-chalk/src/avatar.scss +55 -0
  16. package/theme-chalk/src/backtop.scss +29 -0
  17. package/theme-chalk/src/badge.scss +58 -0
  18. package/theme-chalk/src/base.scss +3 -0
  19. package/theme-chalk/src/breadcrumb-item.scss +58 -0
  20. package/theme-chalk/src/breadcrumb.scss +9 -0
  21. package/theme-chalk/src/button-group.scss +133 -0
  22. package/theme-chalk/src/button.scss +374 -0
  23. package/theme-chalk/src/calendar.scss +94 -0
  24. package/theme-chalk/src/card.scss +49 -0
  25. package/theme-chalk/src/carousel-item.scss +58 -0
  26. package/theme-chalk/src/carousel.scss +195 -0
  27. package/theme-chalk/src/cascader-panel.scss +150 -0
  28. package/theme-chalk/src/cascader.scss +289 -0
  29. package/theme-chalk/src/check-tag.scss +60 -0
  30. package/theme-chalk/src/checkbox-button.scss +142 -0
  31. package/theme-chalk/src/checkbox-group.scss +7 -0
  32. package/theme-chalk/src/checkbox.scss +300 -0
  33. package/theme-chalk/src/col.scss +56 -0
  34. package/theme-chalk/src/collapse-item.scss +72 -0
  35. package/theme-chalk/src/collapse-transition.scss +1 -0
  36. package/theme-chalk/src/collapse.scss +29 -0
  37. package/theme-chalk/src/color/index.scss +20 -0
  38. package/theme-chalk/src/color-picker-panel.scss +294 -0
  39. package/theme-chalk/src/color-picker.scss +165 -0
  40. package/theme-chalk/src/common/popup.scss +47 -0
  41. package/theme-chalk/src/common/transition.scss +125 -0
  42. package/theme-chalk/src/common/var.scss +1748 -0
  43. package/theme-chalk/src/config-provider.scss +0 -0
  44. package/theme-chalk/src/container.scss +14 -0
  45. package/theme-chalk/src/dark/css-vars.scss +45 -0
  46. package/theme-chalk/src/dark/var.scss +224 -0
  47. package/theme-chalk/src/date-picker/date-picker.scss +121 -0
  48. package/theme-chalk/src/date-picker/date-range-picker.scss +165 -0
  49. package/theme-chalk/src/date-picker/date-table.scss +164 -0
  50. package/theme-chalk/src/date-picker/month-table.scss +112 -0
  51. package/theme-chalk/src/date-picker/picker-panel.scss +152 -0
  52. package/theme-chalk/src/date-picker/picker.scss +217 -0
  53. package/theme-chalk/src/date-picker/time-picker.scss +90 -0
  54. package/theme-chalk/src/date-picker/time-range-picker.scss +33 -0
  55. package/theme-chalk/src/date-picker/time-spinner.scss +115 -0
  56. package/theme-chalk/src/date-picker/utils.scss +14 -0
  57. package/theme-chalk/src/date-picker/year-table.scss +108 -0
  58. package/theme-chalk/src/date-picker-panel.scss +34 -0
  59. package/theme-chalk/src/date-picker.scss +0 -0
  60. package/theme-chalk/src/descriptions-item.scss +77 -0
  61. package/theme-chalk/src/descriptions.scss +151 -0
  62. package/theme-chalk/src/dialog.scss +207 -0
  63. package/theme-chalk/src/display.scss +12 -0
  64. package/theme-chalk/src/divider.scss +48 -0
  65. package/theme-chalk/src/drawer.scss +251 -0
  66. package/theme-chalk/src/dropdown-item.scss +0 -0
  67. package/theme-chalk/src/dropdown-menu.scss +0 -0
  68. package/theme-chalk/src/dropdown.scss +208 -0
  69. package/theme-chalk/src/empty.scss +49 -0
  70. package/theme-chalk/src/footer.scss +12 -0
  71. package/theme-chalk/src/form-item.scss +246 -0
  72. package/theme-chalk/src/form.scss +28 -0
  73. package/theme-chalk/src/header.scss +12 -0
  74. package/theme-chalk/src/icon.scss +41 -0
  75. package/theme-chalk/src/image-viewer.scss +161 -0
  76. package/theme-chalk/src/image.scss +49 -0
  77. package/theme-chalk/src/index.scss +116 -0
  78. package/theme-chalk/src/infinite-scroll.scss +0 -0
  79. package/theme-chalk/src/input-number.scss +192 -0
  80. package/theme-chalk/src/input-otp.scss +191 -0
  81. package/theme-chalk/src/input-tag.scss +249 -0
  82. package/theme-chalk/src/input.scss +541 -0
  83. package/theme-chalk/src/link.scss +90 -0
  84. package/theme-chalk/src/loading.scss +104 -0
  85. package/theme-chalk/src/main.scss +14 -0
  86. package/theme-chalk/src/mention.scss +88 -0
  87. package/theme-chalk/src/menu-item-group.scss +0 -0
  88. package/theme-chalk/src/menu-item.scss +0 -0
  89. package/theme-chalk/src/menu.scss +376 -0
  90. package/theme-chalk/src/message-box.scss +220 -0
  91. package/theme-chalk/src/message.scss +123 -0
  92. package/theme-chalk/src/mixins/_button.scss +240 -0
  93. package/theme-chalk/src/mixins/_col.scss +41 -0
  94. package/theme-chalk/src/mixins/_var.scss +67 -0
  95. package/theme-chalk/src/mixins/config.scss +5 -0
  96. package/theme-chalk/src/mixins/function.scss +99 -0
  97. package/theme-chalk/src/mixins/mixins.scss +257 -0
  98. package/theme-chalk/src/mixins/utils.scss +39 -0
  99. package/theme-chalk/src/notification.scss +109 -0
  100. package/theme-chalk/src/option-group.scss +33 -0
  101. package/theme-chalk/src/option.scss +71 -0
  102. package/theme-chalk/src/overlay.scss +17 -0
  103. package/theme-chalk/src/page-header.scss +60 -0
  104. package/theme-chalk/src/pagination.scss +235 -0
  105. package/theme-chalk/src/popconfirm.scss +17 -0
  106. package/theme-chalk/src/popover.scss +61 -0
  107. package/theme-chalk/src/popper.scss +117 -0
  108. package/theme-chalk/src/progress.scss +179 -0
  109. package/theme-chalk/src/radio-button.scss +165 -0
  110. package/theme-chalk/src/radio-group.scss +9 -0
  111. package/theme-chalk/src/radio.scss +220 -0
  112. package/theme-chalk/src/rate.scss +121 -0
  113. package/theme-chalk/src/reset.scss +99 -0
  114. package/theme-chalk/src/result.scss +57 -0
  115. package/theme-chalk/src/row.scss +34 -0
  116. package/theme-chalk/src/scrollbar.scss +97 -0
  117. package/theme-chalk/src/segmented.scss +186 -0
  118. package/theme-chalk/src/select-dropdown-v2.scss +1 -0
  119. package/theme-chalk/src/select-dropdown.scss +57 -0
  120. package/theme-chalk/src/select-v2.scss +4 -0
  121. package/theme-chalk/src/select.scss +269 -0
  122. package/theme-chalk/src/skeleton-item.scss +83 -0
  123. package/theme-chalk/src/skeleton.scss +44 -0
  124. package/theme-chalk/src/slider.scss +212 -0
  125. package/theme-chalk/src/space.scss +20 -0
  126. package/theme-chalk/src/spinner.scss +43 -0
  127. package/theme-chalk/src/splitter-panel.scss +8 -0
  128. package/theme-chalk/src/splitter.scss +148 -0
  129. package/theme-chalk/src/statistic.scss +35 -0
  130. package/theme-chalk/src/step.scss +320 -0
  131. package/theme-chalk/src/steps.scss +22 -0
  132. package/theme-chalk/src/sub-menu.scss +0 -0
  133. package/theme-chalk/src/switch.scss +294 -0
  134. package/theme-chalk/src/tab-pane.scss +0 -0
  135. package/theme-chalk/src/table-column.scss +100 -0
  136. package/theme-chalk/src/table-v2.scss +239 -0
  137. package/theme-chalk/src/table.scss +698 -0
  138. package/theme-chalk/src/tabs.scss +699 -0
  139. package/theme-chalk/src/tag.scss +195 -0
  140. package/theme-chalk/src/text.scss +51 -0
  141. package/theme-chalk/src/time-picker.scss +5 -0
  142. package/theme-chalk/src/time-select.scss +37 -0
  143. package/theme-chalk/src/timeline-item.scss +135 -0
  144. package/theme-chalk/src/timeline.scss +101 -0
  145. package/theme-chalk/src/tooltip.scss +0 -0
  146. package/theme-chalk/src/tour.scss +187 -0
  147. package/theme-chalk/src/transfer.scss +201 -0
  148. package/theme-chalk/src/tree-select.scss +41 -0
  149. package/theme-chalk/src/tree.scss +134 -0
  150. package/theme-chalk/src/upload.scss +660 -0
  151. package/theme-chalk/src/var.scss +87 -0
  152. package/theme-chalk/src/virtual-list.scss +40 -0
  153. package/dist/components/button/EpButton.vue.js +0 -171
  154. package/dist/components/button/EpButton2.vue.js +0 -4
  155. package/dist/components/button/button.js +0 -95
  156. package/dist/node_modules/@ctrl/tinycolor/dist/module/conversion.js +0 -134
  157. package/dist/node_modules/@ctrl/tinycolor/dist/module/css-color-names.js +0 -153
  158. package/dist/node_modules/@ctrl/tinycolor/dist/module/format-input.js +0 -77
  159. package/dist/node_modules/@ctrl/tinycolor/dist/module/index.js +0 -354
  160. package/dist/node_modules/@ctrl/tinycolor/dist/module/util.js +0 -32
@@ -0,0 +1,87 @@
1
+ // CSS3 var
2
+ @use 'common/var' as *;
3
+ @use 'mixins/var' as *;
4
+ @use 'mixins/mixins' as *;
5
+
6
+ // for better performance do not dynamically change the root variable if you really
7
+ // do not need that, since this could introduce recalculation overhead for rendering.
8
+ // https://lisilinhart.info/posts/css-variables-performance/
9
+
10
+ // common
11
+ :root {
12
+ @include set-css-var-value('color-white', $color-white);
13
+ @include set-css-var-value('color-black', $color-black);
14
+
15
+ // get rgb
16
+ @each $type in (primary, success, warning, danger, error, info) {
17
+ @include set-css-color-rgb($type);
18
+ }
19
+
20
+ // Typography
21
+ @include set-component-css-var('font-size', $font-size);
22
+ @include set-component-css-var('font-family', $font-family);
23
+
24
+ @include set-css-var-value('font-weight-primary', 500);
25
+ @include set-css-var-value('font-line-height-primary', 24px);
26
+
27
+ // z-index --el-index-#{$type}
28
+ @include set-component-css-var('index', $z-index);
29
+
30
+ // --el-border-radius-#{$type}
31
+ @include set-component-css-var('border-radius', $border-radius);
32
+
33
+ // Transition
34
+ // refer to this website to get the bezier motion function detail
35
+ // https://cubic-bezier.com/#p1,p2,p3,p4 (change px as your function parameter)
36
+ @include set-component-css-var('transition-duration', $transition-duration);
37
+
38
+ @include set-component-css-var('transition-function', $transition-function);
39
+ @include set-component-css-var('transition', $transition);
40
+
41
+ // common component size
42
+ @include set-component-css-var('component-size', $common-component-size);
43
+ }
44
+
45
+ // for light
46
+ :root {
47
+ color-scheme: light;
48
+
49
+ // --el-color-#{$type}
50
+ // --el-color-#{$type}-light-{$i}
51
+ @each $type in (primary, success, warning, danger, error, info) {
52
+ @include set-css-color-type($colors, $type);
53
+ }
54
+
55
+ // color-scheme
56
+ // Background --el-bg-color-#{$type}
57
+ @include set-component-css-var('bg-color', $bg-color);
58
+ // --el-text-color-#{$type}
59
+ @include set-component-css-var('text-color', $text-color);
60
+ // --el-border-color-#{$type}
61
+ @include set-component-css-var('border-color', $border-color);
62
+ // Fill --el-fill-color-#{$type}
63
+ @include set-component-css-var('fill-color', $fill-color);
64
+
65
+ // Box-shadow
66
+ // --el-box-shadow-#{$type}
67
+ @include set-component-css-var('box-shadow', $box-shadow);
68
+ // Disable base
69
+ @include set-component-css-var('disabled', $disabled);
70
+
71
+ // overlay & mask
72
+ @include set-component-css-var('overlay-color', $overlay-color);
73
+ @include set-component-css-var('mask-color', $mask-color);
74
+
75
+ // Border
76
+ @include set-css-var-value('border-width', $border-width);
77
+ @include set-css-var-value('border-style', $border-style);
78
+ @include set-css-var-value('border-color-hover', $border-color-hover);
79
+ @include set-css-var-value(
80
+ 'border',
81
+ getCssVar('border-width') getCssVar('border-style')
82
+ getCssVar('border-color')
83
+ );
84
+
85
+ // Svg
86
+ @include css-var-from-global('svg-monochrome-grey', 'border-color');
87
+ }
@@ -0,0 +1,40 @@
1
+ @use 'mixins/mixins' as *;
2
+ @use 'common/var' as *;
3
+
4
+ @mixin showScrollbar {
5
+ @include b(virtual-scrollbar) {
6
+ opacity: 1;
7
+ }
8
+ }
9
+
10
+ @include b(vl) {
11
+ @include e(wrapper) {
12
+ position: relative;
13
+ &:hover {
14
+ @include showScrollbar();
15
+ }
16
+ &.always-on {
17
+ @include showScrollbar();
18
+ }
19
+ }
20
+ }
21
+
22
+ .#{$namespace}-vl__window {
23
+ scrollbar-width: none;
24
+ &::-webkit-scrollbar {
25
+ display: none;
26
+ }
27
+ }
28
+ @include b(virtual-scrollbar) {
29
+ opacity: 0;
30
+ transition: opacity 340ms ease-out;
31
+ &.always-on {
32
+ opacity: 1;
33
+ }
34
+ }
35
+
36
+ @include b(vg) {
37
+ @include e(wrapper) {
38
+ position: relative;
39
+ }
40
+ }
@@ -1,171 +0,0 @@
1
- import { defineComponent as Z, useSlots as j, inject as G, computed as a, ref as oo, Text as eo, openBlock as d, createBlock as m, resolveDynamicComponent as C, mergeProps as to, withCtx as x, createElementBlock as T, Fragment as ro, renderSlot as _, unref as N, normalizeClass as K, createCommentVNode as A } from "vue";
2
- import { ElIcon as lo } from "element-plus/es/components/icon/index.mjs";
3
- import { useFormSize as no, useFormDisabled as ao } from "element-plus/es/components/form/src/hooks/use-form-common-props.mjs";
4
- import { useFormItem as so } from "element-plus/es/components/form/src/hooks/use-form-item.mjs";
5
- import { useGlobalConfig as io } from "element-plus/es/components/config-provider/src/hooks/use-global-config.mjs";
6
- import { buttonGroupContextKey as co } from "element-plus/es/components/button/src/constants.mjs";
7
- import { buttonEmits as uo, buttonProps as po } from "./button.js";
8
- import { TinyColor as vo } from "../../node_modules/@ctrl/tinycolor/dist/module/index.js";
9
- const b = "ep", k = "button", So = /* @__PURE__ */ Z({
10
- name: "EpButton",
11
- __name: "EpButton",
12
- props: po,
13
- emits: uo,
14
- setup(U, { expose: q, emit: H }) {
15
- const w = lo, e = U, J = H, h = j(), L = (o = "") => o ? `${b}-${k}-${o}` : `${b}-${k}`, B = (o) => o ? `${b}-${k}--${o}` : "", i = (o, r = !0) => o && r ? `is-${o}` : "", l = (o) => `--${b}-${k}-${o}`, g = (o) => `--${b}-${o}`, y = (o) => {
16
- const r = {};
17
- for (const n in o) o[n] && (r[`--${b}-${k}-${n}`] = o[n]);
18
- return r;
19
- }, u = G(co, void 0), p = io("button"), { form: S } = so(), I = no(a(() => u == null ? void 0 : u.size)), c = ao(), E = oo(), z = a(
20
- () => {
21
- var o;
22
- return e.type || (u == null ? void 0 : u.type) || ((o = p.value) == null ? void 0 : o.type) || "";
23
- }
24
- ), M = a(
25
- () => {
26
- var o;
27
- return e.autoInsertSpace ?? ((o = p.value) == null ? void 0 : o.autoInsertSpace) ?? !1;
28
- }
29
- ), F = a(() => {
30
- var o;
31
- return e.plain ?? ((o = p.value) == null ? void 0 : o.plain) ?? !1;
32
- }), O = a(() => {
33
- var o;
34
- return e.round ?? ((o = p.value) == null ? void 0 : o.round) ?? !1;
35
- }), V = a(() => {
36
- var o;
37
- return e.text ?? ((o = p.value) == null ? void 0 : o.text) ?? !1;
38
- }), Q = a(() => {
39
- var o;
40
- return e.dashed ?? ((o = p.value) == null ? void 0 : o.dashed) ?? !1;
41
- }), R = a(() => e.tag === "button" ? {
42
- ariaDisabled: c.value || e.loading,
43
- disabled: c.value || e.loading,
44
- autofocus: e.autofocus,
45
- type: e.nativeType
46
- } : {}), D = a(() => {
47
- var r;
48
- const o = (r = h.default) == null ? void 0 : r.call(h);
49
- if (M.value && (o == null ? void 0 : o.length) === 1) {
50
- const n = o[0];
51
- if ((n == null ? void 0 : n.type) === eo) {
52
- const t = n.children;
53
- return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(t.trim());
54
- }
55
- }
56
- return !1;
57
- }), W = (o) => {
58
- if (c.value || e.loading) {
59
- o.stopPropagation();
60
- return;
61
- }
62
- e.nativeType === "reset" && (S == null || S.resetFields()), J("click", o);
63
- };
64
- function s(o, r = 20) {
65
- return o.mix("#141414", r).toString();
66
- }
67
- const X = a(() => {
68
- let o = {}, r = e.color;
69
- if (r) {
70
- const n = r.match(/var\((.*?)\)/);
71
- n && (r = window.getComputedStyle(window.document.documentElement).getPropertyValue(n[1]));
72
- const t = new vo(r), v = e.dark ? t.tint(20).toString() : s(t, 20);
73
- if (F.value)
74
- o = y({
75
- "bg-color": e.dark ? s(t, 90) : t.tint(90).toString(),
76
- "text-color": r,
77
- "border-color": e.dark ? s(t, 50) : t.tint(50).toString(),
78
- "hover-text-color": `var(${g("color-white")})`,
79
- "hover-bg-color": r,
80
- "hover-border-color": r,
81
- "active-bg-color": v,
82
- "active-text-color": `var(${g("color-white")})`,
83
- "active-border-color": v
84
- }), c.value && (o[l("disabled-bg-color")] = e.dark ? s(t, 90) : t.tint(90).toString(), o[l("disabled-text-color")] = e.dark ? s(t, 50) : t.tint(50).toString(), o[l("disabled-border-color")] = e.dark ? s(t, 80) : t.tint(80).toString());
85
- else if (e.link || V.value) {
86
- const f = e.dark ? s(t, 30) : t.tint(30).toString();
87
- if (o = y({
88
- "text-color": r,
89
- "hover-text-color": f,
90
- "active-text-color": v
91
- }), e.link && (o[l("hover-link-text-color")] = f, o[l("active-color")] = v), c.value) {
92
- const $ = e.dark ? s(t, 50) : t.tint(50).toString();
93
- o[l("disabled-bg-color")] = "transparent", o[l("disabled-text-color")] = $, o[l("disabled-border-color")] = "transparent";
94
- }
95
- } else {
96
- const f = e.dark ? s(t, 30) : t.tint(30).toString(), $ = t.isDark() ? `var(${g("color-white")})` : `var(${g("color-black")})`;
97
- if (o = y({
98
- "bg-color": r,
99
- "text-color": $,
100
- "border-color": r,
101
- "hover-bg-color": f,
102
- "hover-text-color": $,
103
- "hover-border-color": f,
104
- "active-bg-color": v,
105
- "active-border-color": v
106
- }), c.value) {
107
- const P = e.dark ? s(t, 50) : t.tint(50).toString();
108
- o[l("disabled-bg-color")] = P, o[l("disabled-text-color")] = e.dark ? "rgba(255, 255, 255, 0.5)" : `var(${g("color-white")})`, o[l("disabled-border-color")] = P;
109
- }
110
- }
111
- }
112
- return o;
113
- }), Y = a(() => [
114
- L(),
115
- B(z.value),
116
- B(I.value),
117
- i("disabled", c.value),
118
- i("loading", e.loading),
119
- i("plain", F.value),
120
- i("round", O.value),
121
- i("circle", e.circle),
122
- i("text", V.value),
123
- i("dashed", Q.value),
124
- i("link", e.link),
125
- i("has-bg", e.bg)
126
- ]);
127
- return q({
128
- ref: E,
129
- size: I,
130
- type: z,
131
- disabled: c,
132
- shouldAddSpace: D
133
- }), (o, r) => (d(), m(C(o.tag), to({
134
- ref_key: "_ref",
135
- ref: E
136
- }, R.value, {
137
- class: Y.value,
138
- style: X.value,
139
- onClick: W
140
- }), {
141
- default: x(() => [
142
- o.loading ? (d(), T(ro, { key: 0 }, [
143
- o.$slots.loading ? _(o.$slots, "loading", { key: 0 }) : (d(), m(N(w), {
144
- key: 1,
145
- class: K("is-loading")
146
- }, {
147
- default: x(() => [
148
- (d(), m(C(o.loadingIcon)))
149
- ]),
150
- _: 1
151
- }))
152
- ], 64)) : o.icon || o.$slots.icon ? (d(), m(N(w), { key: 1 }, {
153
- default: x(() => [
154
- o.icon ? (d(), m(C(o.icon), { key: 0 })) : _(o.$slots, "icon", { key: 1 })
155
- ]),
156
- _: 3
157
- })) : A("", !0),
158
- o.$slots.default ? (d(), T("span", {
159
- key: 2,
160
- class: K({ "ep-button__text--expand": D.value })
161
- }, [
162
- _(o.$slots, "default")
163
- ], 2)) : A("", !0)
164
- ]),
165
- _: 3
166
- }, 16, ["class", "style"]));
167
- }
168
- });
169
- export {
170
- So as default
171
- };
@@ -1,4 +0,0 @@
1
- import f from "./EpButton.vue.js";
2
- export {
3
- f as default
4
- };
@@ -1,95 +0,0 @@
1
- import { Loading as e } from "@element-plus/icons-vue";
2
- const o = [
3
- "default",
4
- "primary",
5
- "success",
6
- "warning",
7
- "info",
8
- "danger",
9
- "text",
10
- ""
11
- ], n = ["button", "submit", "reset"], l = {
12
- /** 按钮尺寸 */
13
- size: {
14
- type: String,
15
- values: ["", "large", "default", "small"]
16
- },
17
- /** 是否禁用 */
18
- disabled: {
19
- type: Boolean,
20
- default: void 0
21
- },
22
- /** 按钮类型 */
23
- type: {
24
- type: String,
25
- values: o,
26
- default: ""
27
- },
28
- /** 图标组件 */
29
- icon: {
30
- type: [String, Object, Function]
31
- },
32
- /** 原生 button 类型 */
33
- nativeType: {
34
- type: String,
35
- values: n,
36
- default: "button"
37
- },
38
- /** 是否为加载中状态 */
39
- loading: Boolean,
40
- /** 自定义加载中图标组件 */
41
- loadingIcon: {
42
- type: [String, Object, Function],
43
- default: () => e
44
- },
45
- /** 是否为朴素按钮 */
46
- plain: {
47
- type: Boolean,
48
- default: void 0
49
- },
50
- /** 是否为文字按钮 */
51
- text: {
52
- type: Boolean,
53
- default: void 0
54
- },
55
- /** 是否为链接按钮 */
56
- link: Boolean,
57
- /** 文字按钮背景色是否常亮 */
58
- bg: Boolean,
59
- /** 原生 autofocus */
60
- autofocus: Boolean,
61
- /** 是否为圆角按钮 */
62
- round: {
63
- type: Boolean,
64
- default: void 0
65
- },
66
- /** 是否为圆形按钮 */
67
- circle: Boolean,
68
- /** 是否为虚线按钮 */
69
- dashed: {
70
- type: Boolean,
71
- default: void 0
72
- },
73
- /** 自定义按钮颜色,自动计算 hover 和 active 颜色 */
74
- color: String,
75
- /** 暗黑模式,将 color 自动转换为暗黑模式颜色 */
76
- dark: Boolean,
77
- /** 是否在两个中文字符之间自动插入空格 */
78
- autoInsertSpace: {
79
- type: Boolean,
80
- default: void 0
81
- },
82
- /** 自定义元素标签 */
83
- tag: {
84
- type: [String, Object],
85
- default: "button"
86
- }
87
- }, i = {
88
- click: (t) => t instanceof MouseEvent
89
- };
90
- export {
91
- i as buttonEmits,
92
- n as buttonNativeTypes,
93
- l as buttonProps,
94
- o as buttonTypes
95
- };
@@ -1,134 +0,0 @@
1
- import { bound01 as i, pad2 as h } from "./util.js";
2
- function T(n, o, t) {
3
- return {
4
- r: i(n, 255) * 255,
5
- g: i(o, 255) * 255,
6
- b: i(t, 255) * 255
7
- };
8
- }
9
- function g(n, o, t) {
10
- n = i(n, 255), o = i(o, 255), t = i(t, 255);
11
- const e = Math.max(n, o, t), c = Math.min(n, o, t);
12
- let r = 0, a = 0;
13
- const s = (e + c) / 2;
14
- if (e === c)
15
- a = 0, r = 0;
16
- else {
17
- const u = e - c;
18
- switch (a = s > 0.5 ? u / (2 - e - c) : u / (e + c), e) {
19
- case n:
20
- r = (o - t) / u + (o < t ? 6 : 0);
21
- break;
22
- case o:
23
- r = (t - n) / u + 2;
24
- break;
25
- case t:
26
- r = (n - o) / u + 4;
27
- break;
28
- }
29
- r /= 6;
30
- }
31
- return { h: r, s: a, l: s };
32
- }
33
- function M(n, o, t) {
34
- return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? n + (o - n) * (6 * t) : t < 1 / 2 ? o : t < 2 / 3 ? n + (o - n) * (2 / 3 - t) * 6 : n;
35
- }
36
- function k(n, o, t) {
37
- let e, c, r;
38
- if (n = i(n, 360), o = i(o, 100), t = i(t, 100), o === 0)
39
- c = t, r = t, e = t;
40
- else {
41
- const a = t < 0.5 ? t * (1 + o) : t + o - t * o, s = 2 * t - a;
42
- e = M(s, a, n + 1 / 3), c = M(s, a, n), r = M(s, a, n - 1 / 3);
43
- }
44
- return { r: e * 255, g: c * 255, b: r * 255 };
45
- }
46
- function l(n, o, t) {
47
- n = i(n, 255), o = i(o, 255), t = i(t, 255);
48
- const e = Math.max(n, o, t), c = Math.min(n, o, t);
49
- let r = 0;
50
- const a = e, s = e - c, u = e === 0 ? 0 : s / e;
51
- if (e === c)
52
- r = 0;
53
- else {
54
- switch (e) {
55
- case n:
56
- r = (o - t) / s + (o < t ? 6 : 0);
57
- break;
58
- case o:
59
- r = (t - n) / s + 2;
60
- break;
61
- case t:
62
- r = (n - o) / s + 4;
63
- break;
64
- }
65
- r /= 6;
66
- }
67
- return { h: r, s: u, v: a };
68
- }
69
- function H(n, o, t) {
70
- n = i(n, 360) * 6, o = i(o, 100), t = i(t, 100);
71
- const e = Math.floor(n), c = n - e, r = t * (1 - o), a = t * (1 - c * o), s = t * (1 - (1 - c) * o), u = e % 6, f = [t, a, r, r, s, t][u], m = [s, t, t, a, r, r][u], d = [r, r, s, t, t, a][u];
72
- return { r: f * 255, g: m * 255, b: d * 255 };
73
- }
74
- function S(n, o, t, e) {
75
- const c = [
76
- h(Math.round(n).toString(16)),
77
- h(Math.round(o).toString(16)),
78
- h(Math.round(t).toString(16))
79
- ];
80
- return e && c[0].startsWith(c[0].charAt(1)) && c[1].startsWith(c[1].charAt(1)) && c[2].startsWith(c[2].charAt(1)) ? c[0].charAt(0) + c[1].charAt(0) + c[2].charAt(0) : c.join("");
81
- }
82
- function W(n, o, t, e, c) {
83
- const r = [
84
- h(Math.round(n).toString(16)),
85
- h(Math.round(o).toString(16)),
86
- h(Math.round(t).toString(16)),
87
- h(x(e))
88
- ];
89
- return c && r[0].startsWith(r[0].charAt(1)) && r[1].startsWith(r[1].charAt(1)) && r[2].startsWith(r[2].charAt(1)) && r[3].startsWith(r[3].charAt(1)) ? r[0].charAt(0) + r[1].charAt(0) + r[2].charAt(0) + r[3].charAt(0) : r.join("");
90
- }
91
- function p(n, o, t, e) {
92
- const c = n / 100, r = o / 100, a = t / 100, s = e / 100, u = 255 * (1 - c) * (1 - s), f = 255 * (1 - r) * (1 - s), m = 255 * (1 - a) * (1 - s);
93
- return { r: u, g: f, b: m };
94
- }
95
- function y(n, o, t) {
96
- let e = 1 - n / 255, c = 1 - o / 255, r = 1 - t / 255, a = Math.min(e, c, r);
97
- return a === 1 ? (e = 0, c = 0, r = 0) : (e = (e - a) / (1 - a) * 100, c = (c - a) / (1 - a) * 100, r = (r - a) / (1 - a) * 100), a *= 100, {
98
- c: Math.round(e),
99
- m: Math.round(c),
100
- y: Math.round(r),
101
- k: Math.round(a)
102
- };
103
- }
104
- function x(n) {
105
- return Math.round(parseFloat(n) * 255).toString(16);
106
- }
107
- function C(n) {
108
- return A(n) / 255;
109
- }
110
- function A(n) {
111
- return parseInt(n, 16);
112
- }
113
- function R(n) {
114
- return {
115
- r: n >> 16,
116
- g: (n & 65280) >> 8,
117
- b: n & 255
118
- };
119
- }
120
- export {
121
- p as cmykToRgb,
122
- x as convertDecimalToHex,
123
- C as convertHexToDecimal,
124
- k as hslToRgb,
125
- H as hsvToRgb,
126
- R as numberInputToObject,
127
- A as parseIntFromHex,
128
- y as rgbToCmyk,
129
- S as rgbToHex,
130
- g as rgbToHsl,
131
- l as rgbToHsv,
132
- T as rgbToRgb,
133
- W as rgbaToHex
134
- };
@@ -1,153 +0,0 @@
1
- const e = {
2
- aliceblue: "#f0f8ff",
3
- antiquewhite: "#faebd7",
4
- aqua: "#00ffff",
5
- aquamarine: "#7fffd4",
6
- azure: "#f0ffff",
7
- beige: "#f5f5dc",
8
- bisque: "#ffe4c4",
9
- black: "#000000",
10
- blanchedalmond: "#ffebcd",
11
- blue: "#0000ff",
12
- blueviolet: "#8a2be2",
13
- brown: "#a52a2a",
14
- burlywood: "#deb887",
15
- cadetblue: "#5f9ea0",
16
- chartreuse: "#7fff00",
17
- chocolate: "#d2691e",
18
- coral: "#ff7f50",
19
- cornflowerblue: "#6495ed",
20
- cornsilk: "#fff8dc",
21
- crimson: "#dc143c",
22
- cyan: "#00ffff",
23
- darkblue: "#00008b",
24
- darkcyan: "#008b8b",
25
- darkgoldenrod: "#b8860b",
26
- darkgray: "#a9a9a9",
27
- darkgreen: "#006400",
28
- darkgrey: "#a9a9a9",
29
- darkkhaki: "#bdb76b",
30
- darkmagenta: "#8b008b",
31
- darkolivegreen: "#556b2f",
32
- darkorange: "#ff8c00",
33
- darkorchid: "#9932cc",
34
- darkred: "#8b0000",
35
- darksalmon: "#e9967a",
36
- darkseagreen: "#8fbc8f",
37
- darkslateblue: "#483d8b",
38
- darkslategray: "#2f4f4f",
39
- darkslategrey: "#2f4f4f",
40
- darkturquoise: "#00ced1",
41
- darkviolet: "#9400d3",
42
- deeppink: "#ff1493",
43
- deepskyblue: "#00bfff",
44
- dimgray: "#696969",
45
- dimgrey: "#696969",
46
- dodgerblue: "#1e90ff",
47
- firebrick: "#b22222",
48
- floralwhite: "#fffaf0",
49
- forestgreen: "#228b22",
50
- fuchsia: "#ff00ff",
51
- gainsboro: "#dcdcdc",
52
- ghostwhite: "#f8f8ff",
53
- goldenrod: "#daa520",
54
- gold: "#ffd700",
55
- gray: "#808080",
56
- green: "#008000",
57
- greenyellow: "#adff2f",
58
- grey: "#808080",
59
- honeydew: "#f0fff0",
60
- hotpink: "#ff69b4",
61
- indianred: "#cd5c5c",
62
- indigo: "#4b0082",
63
- ivory: "#fffff0",
64
- khaki: "#f0e68c",
65
- lavenderblush: "#fff0f5",
66
- lavender: "#e6e6fa",
67
- lawngreen: "#7cfc00",
68
- lemonchiffon: "#fffacd",
69
- lightblue: "#add8e6",
70
- lightcoral: "#f08080",
71
- lightcyan: "#e0ffff",
72
- lightgoldenrodyellow: "#fafad2",
73
- lightgray: "#d3d3d3",
74
- lightgreen: "#90ee90",
75
- lightgrey: "#d3d3d3",
76
- lightpink: "#ffb6c1",
77
- lightsalmon: "#ffa07a",
78
- lightseagreen: "#20b2aa",
79
- lightskyblue: "#87cefa",
80
- lightslategray: "#778899",
81
- lightslategrey: "#778899",
82
- lightsteelblue: "#b0c4de",
83
- lightyellow: "#ffffe0",
84
- lime: "#00ff00",
85
- limegreen: "#32cd32",
86
- linen: "#faf0e6",
87
- magenta: "#ff00ff",
88
- maroon: "#800000",
89
- mediumaquamarine: "#66cdaa",
90
- mediumblue: "#0000cd",
91
- mediumorchid: "#ba55d3",
92
- mediumpurple: "#9370db",
93
- mediumseagreen: "#3cb371",
94
- mediumslateblue: "#7b68ee",
95
- mediumspringgreen: "#00fa9a",
96
- mediumturquoise: "#48d1cc",
97
- mediumvioletred: "#c71585",
98
- midnightblue: "#191970",
99
- mintcream: "#f5fffa",
100
- mistyrose: "#ffe4e1",
101
- moccasin: "#ffe4b5",
102
- navajowhite: "#ffdead",
103
- navy: "#000080",
104
- oldlace: "#fdf5e6",
105
- olive: "#808000",
106
- olivedrab: "#6b8e23",
107
- orange: "#ffa500",
108
- orangered: "#ff4500",
109
- orchid: "#da70d6",
110
- palegoldenrod: "#eee8aa",
111
- palegreen: "#98fb98",
112
- paleturquoise: "#afeeee",
113
- palevioletred: "#db7093",
114
- papayawhip: "#ffefd5",
115
- peachpuff: "#ffdab9",
116
- peru: "#cd853f",
117
- pink: "#ffc0cb",
118
- plum: "#dda0dd",
119
- powderblue: "#b0e0e6",
120
- purple: "#800080",
121
- rebeccapurple: "#663399",
122
- red: "#ff0000",
123
- rosybrown: "#bc8f8f",
124
- royalblue: "#4169e1",
125
- saddlebrown: "#8b4513",
126
- salmon: "#fa8072",
127
- sandybrown: "#f4a460",
128
- seagreen: "#2e8b57",
129
- seashell: "#fff5ee",
130
- sienna: "#a0522d",
131
- silver: "#c0c0c0",
132
- skyblue: "#87ceeb",
133
- slateblue: "#6a5acd",
134
- slategray: "#708090",
135
- slategrey: "#708090",
136
- snow: "#fffafa",
137
- springgreen: "#00ff7f",
138
- steelblue: "#4682b4",
139
- tan: "#d2b48c",
140
- teal: "#008080",
141
- thistle: "#d8bfd8",
142
- tomato: "#ff6347",
143
- turquoise: "#40e0d0",
144
- violet: "#ee82ee",
145
- wheat: "#f5deb3",
146
- white: "#ffffff",
147
- whitesmoke: "#f5f5f5",
148
- yellow: "#ffff00",
149
- yellowgreen: "#9acd32"
150
- };
151
- export {
152
- e as names
153
- };