@pixelium/web-vue 0.0.1-beta → 0.0.2

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 (199) hide show
  1. package/README.md +21 -10
  2. package/README.zh.md +21 -10
  3. package/dist/icon-pa.d.ts +490 -0
  4. package/dist/index.d.ts +1586 -10
  5. package/dist/pixelium-vue-icon-pa.cjs +1 -0
  6. package/dist/pixelium-vue-icon-pa.css +1 -0
  7. package/dist/pixelium-vue-icon-pa.js +10143 -0
  8. package/dist/pixelium-vue-icon-pa.umd.cjs +1 -0
  9. package/dist/pixelium-vue.cjs +12 -1
  10. package/dist/pixelium-vue.css +1 -1
  11. package/dist/pixelium-vue.js +5368 -1093
  12. package/dist/pixelium-vue.umd.cjs +12 -1
  13. package/es/aside/css.js +1 -1
  14. package/es/aside/index.js +60 -13
  15. package/es/auto-complete/css.js +2 -0
  16. package/es/auto-complete/draw.d.ts +2 -0
  17. package/es/auto-complete/draw.js +52 -0
  18. package/es/auto-complete/index.css +123 -0
  19. package/es/auto-complete/index.d.ts +35 -0
  20. package/es/auto-complete/index.js +402 -0
  21. package/es/auto-complete/type.d.ts +192 -0
  22. package/es/button/css.js +1 -1
  23. package/es/button/draw.d.ts +1 -2
  24. package/es/button/draw.js +105 -123
  25. package/es/button/index.css +24 -14
  26. package/es/button/index.js +70 -121
  27. package/es/button-group/css.js +1 -1
  28. package/es/button-group/index.d.ts +0 -1
  29. package/es/button-group/index.js +11 -37
  30. package/es/button-group/type.d.ts +1 -1
  31. package/es/col/css.js +1 -1
  32. package/es/col/index.d.ts +2 -2
  33. package/es/container/css.js +1 -1
  34. package/es/divider/css.js +1 -1
  35. package/es/empty/css.js +2 -0
  36. package/es/empty/index.css +19 -0
  37. package/es/empty/index.d.ts +17 -0
  38. package/es/empty/index.js +73 -0
  39. package/es/empty/type.d.ts +19 -0
  40. package/es/footer/css.js +1 -1
  41. package/es/grid/css.js +1 -1
  42. package/es/grid/index.js +5 -1
  43. package/es/grid-item/css.js +1 -1
  44. package/es/grid-item/index.d.ts +1 -1
  45. package/es/grid-item/index.js +7 -3
  46. package/es/header/css.js +1 -1
  47. package/es/icon/css.js +1 -1
  48. package/es/icon/index.css +0 -3
  49. package/es/icon/index.js +1 -1
  50. package/es/icons/css-pa.js +2 -0
  51. package/es/icons/icon-hn.js +1 -1
  52. package/es/icons/icon-pa.css +9 -0
  53. package/es/icons/icon-pa.d.ts +490 -0
  54. package/es/icons/icon-pa.js +17449 -0
  55. package/es/index.css +22 -8
  56. package/es/index.d.ts +18 -1
  57. package/es/index.js +63 -2
  58. package/es/input/css.js +2 -0
  59. package/es/input/draw.d.ts +2 -0
  60. package/es/input/draw.js +52 -0
  61. package/es/input/index.css +138 -0
  62. package/es/input/index.d.ts +50 -0
  63. package/es/input/index.js +432 -0
  64. package/es/input/type.d.ts +175 -0
  65. package/es/input-group/css.js +2 -0
  66. package/es/input-group/index.css +24 -0
  67. package/es/input-group/index.d.ts +17 -0
  68. package/es/input-group/index.js +40 -0
  69. package/es/input-group/type.d.ts +30 -0
  70. package/es/input-group-label/css.js +2 -0
  71. package/es/input-group-label/draw.d.ts +2 -0
  72. package/es/input-group-label/draw.js +52 -0
  73. package/es/input-group-label/index.css +50 -0
  74. package/es/input-group-label/index.d.ts +16 -0
  75. package/es/input-group-label/index.js +129 -0
  76. package/es/input-group-label/type.d.ts +30 -0
  77. package/es/input-number/css.js +2 -0
  78. package/es/input-number/draw.d.ts +2 -0
  79. package/es/input-number/draw.js +52 -0
  80. package/es/input-number/index.css +161 -0
  81. package/es/input-number/index.d.ts +47 -0
  82. package/es/input-number/index.js +543 -0
  83. package/es/input-number/type.d.ts +183 -0
  84. package/es/input-tag/css.js +2 -0
  85. package/es/input-tag/draw.d.ts +2 -0
  86. package/es/input-tag/draw.js +49 -0
  87. package/es/input-tag/index.css +133 -0
  88. package/es/input-tag/index.d.ts +73 -0
  89. package/es/input-tag/index.js +474 -0
  90. package/es/input-tag/type.d.ts +212 -0
  91. package/es/link/css.js +1 -1
  92. package/es/link/index.css +2 -5
  93. package/es/link/index.js +10 -6
  94. package/es/main/css.js +1 -1
  95. package/es/mask/css.js +2 -0
  96. package/es/mask/index.css +17 -0
  97. package/es/mask/index.d.ts +8 -0
  98. package/es/mask/index.js +117 -0
  99. package/es/mask/type.d.ts +27 -0
  100. package/es/message/css.js +1 -1
  101. package/es/message/index.css +26 -26
  102. package/es/message/index.d.ts +1 -1
  103. package/es/message/index.js +22 -50
  104. package/es/message-box/css.js +1 -1
  105. package/es/message-box/index.js +40 -30
  106. package/es/message-box/message-box-wrapped.d.ts +0 -1
  107. package/es/message-box/message-box-wrapped.js +2 -2
  108. package/es/message-box/message-box.d.ts +2 -1
  109. package/es/message-box/message-box.js +10 -8
  110. package/es/message-box/type.d.ts +14 -4
  111. package/es/option-list/css.js +2 -0
  112. package/es/option-list/index.css +57 -0
  113. package/es/option-list/index.d.ts +38 -0
  114. package/es/option-list/index.js +169 -0
  115. package/es/option-list/type.d.ts +16 -0
  116. package/es/popover/css.js +1 -0
  117. package/es/popover/index.d.ts +203 -0
  118. package/es/popover/index.js +240 -0
  119. package/es/popover/type.d.ts +100 -0
  120. package/es/popup-content/css.js +2 -0
  121. package/es/popup-content/draw.d.ts +6 -0
  122. package/es/popup-content/draw.js +151 -0
  123. package/es/popup-content/index.css +99 -0
  124. package/es/popup-content/index.d.ts +30 -0
  125. package/es/popup-content/index.js +1578 -0
  126. package/es/popup-content/type.d.ts +20 -0
  127. package/es/popup-trigger/css.js +1 -0
  128. package/es/popup-trigger/index.d.ts +22 -0
  129. package/es/popup-trigger/index.js +97 -0
  130. package/es/popup-trigger/type.d.ts +9 -0
  131. package/es/row/css.js +1 -1
  132. package/es/select/css.js +2 -0
  133. package/es/select/draw.d.ts +2 -0
  134. package/es/select/draw.js +52 -0
  135. package/es/select/index.css +152 -0
  136. package/es/select/index.d.ts +44 -0
  137. package/es/select/index.js +674 -0
  138. package/es/select/type.d.ts +252 -0
  139. package/es/share/const/event-bus-key.d.ts +4 -0
  140. package/es/share/const/event-bus-key.js +10 -0
  141. package/es/share/const/index.d.ts +4 -0
  142. package/es/share/const/index.js +11 -2
  143. package/es/share/const/provide-key.d.ts +3 -0
  144. package/es/share/const/provide-key.js +8 -0
  145. package/es/share/hook/use-click-outside-listener.d.ts +4 -0
  146. package/es/share/hook/use-click-outside-listener.js +44 -0
  147. package/es/share/hook/use-composition.d.ts +5 -0
  148. package/es/share/hook/use-composition.js +17 -0
  149. package/es/share/hook/use-controlled-mode.d.ts +6 -0
  150. package/es/share/hook/use-controlled-mode.js +25 -0
  151. package/es/share/hook/use-dark-mode.js +11 -3
  152. package/es/share/hook/use-index-of-children.d.ts +2 -1
  153. package/es/share/hook/use-index-of-children.js +25 -35
  154. package/es/share/hook/use-resize-observer.js +1 -1
  155. package/es/share/hook/use-textarea-height.d.ts +5 -0
  156. package/es/share/hook/use-textarea-height.js +116 -0
  157. package/es/share/hook/use-watch-global-css-var.d.ts +1 -0
  158. package/es/share/hook/use-watch-global-css-var.js +19 -0
  159. package/es/share/hook/use-z-index.d.ts +6 -0
  160. package/es/share/hook/use-z-index.js +32 -0
  161. package/es/share/type/index.d.ts +9 -1
  162. package/es/share/util/color.js +4 -2
  163. package/es/share/util/common.d.ts +5 -0
  164. package/es/share/util/common.js +71 -0
  165. package/es/share/util/event-bus.d.ts +1 -0
  166. package/es/share/util/event-bus.js +20 -0
  167. package/es/share/util/plot.d.ts +15 -2
  168. package/es/share/util/plot.js +200 -30
  169. package/es/share/util/render.d.ts +1 -0
  170. package/es/share/util/render.js +10 -2
  171. package/es/share/util/theme.js +23 -4
  172. package/es/space/css.js +1 -1
  173. package/es/space/index.css +5 -0
  174. package/es/space/index.js +2 -2
  175. package/es/spin/css.js +2 -0
  176. package/es/spin/index.css +66 -0
  177. package/es/spin/index.d.ts +24 -0
  178. package/es/spin/index.js +104 -0
  179. package/es/spin/type.d.ts +54 -0
  180. package/es/tag/css.js +2 -0
  181. package/es/tag/draw.d.ts +6 -0
  182. package/es/tag/draw.js +135 -0
  183. package/es/tag/index.css +372 -0
  184. package/es/tag/index.d.ts +23 -0
  185. package/es/tag/index.js +193 -0
  186. package/es/tag/type.d.ts +58 -0
  187. package/es/textarea/css.js +2 -0
  188. package/es/textarea/draw.d.ts +2 -0
  189. package/es/textarea/draw.js +13 -0
  190. package/es/textarea/index.css +108 -0
  191. package/es/textarea/index.d.ts +49 -0
  192. package/es/textarea/index.js +267 -0
  193. package/es/textarea/type.d.ts +169 -0
  194. package/es/tooltip/css.js +1 -0
  195. package/es/tooltip/index.d.ts +20 -0
  196. package/es/tooltip/index.js +228 -0
  197. package/es/tooltip/type.d.ts +77 -0
  198. package/package.json +17 -3
  199. package/es/icons/{css.js → css-hn.js} +1 -1
package/es/index.css CHANGED
@@ -470,17 +470,28 @@
470
470
 
471
471
  /* lib/share/style/layout.css */
472
472
  :root {
473
- --px-large-size: 40px;
474
- --px-medium-size: 32px;
475
- --px-small-size: 24px;
476
473
  --px-bit: 4px;
474
+ --px-large-base-size: 36px;
475
+ --px-medium-base-size: 28px;
476
+ --px-small-base-size: 20px;
477
+ --px-large-size: calc(var(--px-large-base-size) + var(--px-bit) * 2);
478
+ --px-medium-size: calc(var(--px-medium-base-size) + var(--px-bit) * 2);
479
+ --px-small-size: calc(var(--px-small-base-size) + var(--px-bit) * 2);
477
480
  --px-line-height: 1.5;
478
481
  --px-medium-font-size: 14px;
479
- --px-large-font-size: 16px;
482
+ --px-large-font-size: 15px;
480
483
  --px-small-font-size: 12px;
481
- --px-medium-interval: 8px;
482
- --px-large-interval: 12px;
483
- --px-small-interval: 4px;
484
+ --px-interval-1: 4px;
485
+ --px-interval-2: 8px;
486
+ --px-interval-3: 12px;
487
+ --px-interval-4: 16px;
488
+ --px-interval-5: 20px;
489
+ --px-interval-6: 24px;
490
+ --px-interval-7: 28px;
491
+ --px-interval-8: 32px;
492
+ --px-interval-9: 36px;
493
+ --px-interval-10: 40px;
494
+ --px-font: "Fusion Pixel Zh_hans", sans-serif;
484
495
  }
485
496
 
486
497
  /* lib/share/style/animation.css */
@@ -492,10 +503,13 @@
492
503
  transform: rotate(-360deg);
493
504
  }
494
505
  }
506
+ .px-animation__loading {
507
+ animation: px-icon-spin 1s linear infinite;
508
+ }
495
509
 
496
510
  /* lib/share/style/index.css */
497
511
  .pixelium {
498
- font-family: "Fusion Pixel Zh_hans", sans-serif;
512
+ font-family: var(--px-font);
499
513
  line-height: var(--px-line-height);
500
514
  font-size: var(--px-medium-font-size);
501
515
  }
package/es/index.d.ts CHANGED
@@ -18,13 +18,27 @@ import Footer from './footer/index.ts';
18
18
  import { setThemeColor } from './share/util/theme.ts';
19
19
  import { useThemeMode } from './share/hook/use-theme-mode.ts';
20
20
  import Icon from './icon/index.ts';
21
+ import Input from './input/index.ts';
22
+ import InputNumber from './input-number/index.ts';
23
+ import Textarea from './textarea/index.ts';
24
+ import Tag from './tag/index.ts';
25
+ import InputGroup from './input-group/index.ts';
26
+ import InputGroupLabel from './input-group-label/index.ts';
27
+ import InputTag from './input-tag/index.ts';
28
+ import Tooltip from './tooltip/index.ts';
29
+ import Popover from './popover/index.ts';
30
+ import Empty from './empty/index.ts';
31
+ import AutoComplete from './auto-complete/index.ts';
32
+ import Mask from './mask/index.ts';
33
+ import Spin from './spin/index.ts';
34
+ import Select from './select/index.ts';
21
35
  declare const install: (app: App, options?: {
22
36
  prefix: string;
23
37
  attachToApp?: boolean;
24
38
  attachToWindow?: boolean;
25
39
  }) => void;
26
40
  export { install };
27
- export { Button, ButtonGroup, Link, MessageBox, Message, Row, Col, Divider, setThemeColor, Space, Grid, GridItem, Container, Main, Aside, Header, Footer, useThemeMode, Icon };
41
+ export { Button, ButtonGroup, Link, MessageBox, Message, Row, Col, Divider, setThemeColor, Space, Grid, GridItem, Container, Main, Aside, Header, Footer, useThemeMode, Icon, Input, InputNumber, Textarea, InputGroup, InputGroupLabel, Tag, InputTag, Tooltip, Popover, Empty, AutoComplete, Mask, Spin, Select };
28
42
  declare const _default: {
29
43
  install: (app: App, options?: {
30
44
  prefix: string;
@@ -33,3 +47,6 @@ declare const _default: {
33
47
  }) => void;
34
48
  };
35
49
  export default _default;
50
+ export type { Option, GroupOption, NumberOrPercentage, ValidContent, ValidVNodeContent, ValueWithDeviceWidth } from './share/type/index.ts';
51
+ export type { AutoCompleteOption, AutoCompleteGroupOption } from './auto-complete/type.ts';
52
+ export type { SelectOption, SelectGroupOption } from './select/type.ts';
package/es/index.js CHANGED
@@ -19,11 +19,58 @@ import { s } from "./share/util/theme.js";
19
19
  import { u as useThemeMode } from "./share/hook/use-theme-mode.js";
20
20
  import { _ as _sfc_main$f } from "./icon/index.js";
21
21
  import { i as inBrowser } from "./share/util/env.js";
22
- const components = [_sfc_main, _sfc_main$1, _sfc_main$2, _sfc_main$3, _sfc_main$4, _sfc_main$5, _sfc_main$6, _sfc_main$7, _sfc_main$8, _sfc_main$9, _sfc_main$a, _sfc_main$b, _sfc_main$c, _sfc_main$d, _sfc_main$e, _sfc_main$f];
22
+ import { _ as _sfc_main$g } from "./input/index.js";
23
+ import { _ as _sfc_main$h } from "./input-number/index.js";
24
+ import { _ as _sfc_main$i } from "./textarea/index.js";
25
+ import { _ as _sfc_main$l } from "./tag/index.js";
26
+ import { _ as _sfc_main$j } from "./input-group/index.js";
27
+ import { _ as _sfc_main$k } from "./input-group-label/index.js";
28
+ import { _ as _sfc_main$m } from "./input-tag/index.js";
29
+ import { _ as _sfc_main$n } from "./tooltip/index.js";
30
+ import { _ as _sfc_main$o } from "./popover/index.js";
31
+ import { _ as _sfc_main$p } from "./empty/index.js";
32
+ import { _ as _sfc_main$q } from "./auto-complete/index.js";
33
+ import { _ as _sfc_main$r } from "./mask/index.js";
34
+ import { _ as _sfc_main$s } from "./spin/index.js";
35
+ import { _ as _sfc_main$t } from "./select/index.js";
36
+ const components = [
37
+ _sfc_main,
38
+ _sfc_main$1,
39
+ _sfc_main$2,
40
+ _sfc_main$3,
41
+ _sfc_main$4,
42
+ _sfc_main$5,
43
+ _sfc_main$6,
44
+ _sfc_main$7,
45
+ _sfc_main$8,
46
+ _sfc_main$9,
47
+ _sfc_main$a,
48
+ _sfc_main$b,
49
+ _sfc_main$c,
50
+ _sfc_main$d,
51
+ _sfc_main$e,
52
+ _sfc_main$f,
53
+ _sfc_main$g,
54
+ _sfc_main$h,
55
+ _sfc_main$i,
56
+ _sfc_main$j,
57
+ _sfc_main$k,
58
+ _sfc_main$l,
59
+ _sfc_main$m,
60
+ _sfc_main$n,
61
+ _sfc_main$o,
62
+ _sfc_main$p,
63
+ _sfc_main$q,
64
+ _sfc_main$r,
65
+ _sfc_main$s,
66
+ _sfc_main$t
67
+ ];
23
68
  const defaultPrefix = "Px";
24
69
  const install = (app, options = { prefix: defaultPrefix }) => {
25
70
  components.forEach((component) => {
26
- component.name && app.component(options.prefix + component.name, component);
71
+ if (component.name) {
72
+ app.component(options.prefix + component.name, component);
73
+ }
27
74
  });
28
75
  if (options.attachToApp !== false) {
29
76
  app.config.globalProperties.PixeliumVue = {
@@ -40,22 +87,36 @@ const index = {
40
87
  };
41
88
  export {
42
89
  _sfc_main$c as Aside,
90
+ _sfc_main$q as AutoComplete,
43
91
  _sfc_main as Button,
44
92
  _sfc_main$1 as ButtonGroup,
45
93
  _sfc_main$5 as Col,
46
94
  _sfc_main$a as Container,
47
95
  _sfc_main$6 as Divider,
96
+ _sfc_main$p as Empty,
48
97
  _sfc_main$e as Footer,
49
98
  _sfc_main$8 as Grid,
50
99
  _sfc_main$9 as GridItem,
51
100
  _sfc_main$d as Header,
52
101
  _sfc_main$f as Icon,
102
+ _sfc_main$g as Input,
103
+ _sfc_main$j as InputGroup,
104
+ _sfc_main$k as InputGroupLabel,
105
+ _sfc_main$h as InputNumber,
106
+ _sfc_main$m as InputTag,
53
107
  _sfc_main$2 as Link,
54
108
  _sfc_main$b as Main,
109
+ _sfc_main$r as Mask,
55
110
  message as Message,
56
111
  _sfc_main$3 as MessageBox,
112
+ _sfc_main$o as Popover,
57
113
  _sfc_main$4 as Row,
114
+ _sfc_main$t as Select,
58
115
  _sfc_main$7 as Space,
116
+ _sfc_main$s as Spin,
117
+ _sfc_main$l as Tag,
118
+ _sfc_main$i as Textarea,
119
+ _sfc_main$n as Tooltip,
59
120
  index as default,
60
121
  install,
61
122
  s as setThemeColor,
@@ -0,0 +1,2 @@
1
+ import '../index.css'
2
+ import './index.css'
@@ -0,0 +1,2 @@
1
+ import type { RgbaColor } from '../share/type';
2
+ export declare const drawBorder: (ctx: CanvasRenderingContext2D, width: number, height: number, center: [number, number][], borderRadius: number[], rad: [number, number][], borderColor: RgbaColor, pixelSize: number, inner: boolean, first: boolean, last: boolean) => void;
@@ -0,0 +1,52 @@
1
+ import { d as drawCircle } from "../share/util/plot.js";
2
+ import { r as rgbaColor2string } from "../share/util/color.js";
3
+ const drawBorder = (ctx, width, height, center, borderRadius, rad, borderColor, pixelSize, inner, first, last) => {
4
+ ctx.fillStyle = rgbaColor2string(borderColor);
5
+ for (let i = 0; i < 4; i++) {
6
+ if (borderRadius[i] <= pixelSize) {
7
+ continue;
8
+ }
9
+ if (i === 1 || i === 2 ? inner && last || !inner : true) {
10
+ drawCircle(
11
+ ctx,
12
+ center[i][0],
13
+ center[i][1],
14
+ borderRadius[i],
15
+ rad[i][0],
16
+ rad[i][1],
17
+ pixelSize
18
+ );
19
+ }
20
+ }
21
+ if (center[1][0] + pixelSize > center[0][0]) {
22
+ ctx.fillRect(center[0][0], 0, center[1][0] - center[0][0] + pixelSize, pixelSize);
23
+ }
24
+ if (center[2][1] + pixelSize > center[1][1] && (inner && last || !inner)) {
25
+ ctx.fillRect(
26
+ width - pixelSize,
27
+ center[1][1],
28
+ pixelSize,
29
+ center[2][1] - center[1][1] + pixelSize
30
+ );
31
+ }
32
+ if (center[3][0] < center[2][0] + pixelSize) {
33
+ ctx.fillRect(
34
+ center[3][0],
35
+ height - pixelSize,
36
+ center[2][0] - center[3][0] + pixelSize,
37
+ pixelSize
38
+ );
39
+ }
40
+ if (center[3][1] + pixelSize > center[0][1] && !(inner && !first)) {
41
+ ctx.fillRect(0, center[0][1], pixelSize, center[3][1] - center[0][1] + pixelSize);
42
+ }
43
+ if (inner && !first) {
44
+ ctx.fillRect(pixelSize / 2, 0, pixelSize / 2, height);
45
+ }
46
+ if (inner && !last) {
47
+ ctx.fillRect(width - 2 * pixelSize - 1, 0, pixelSize, height);
48
+ }
49
+ };
50
+ export {
51
+ drawBorder as d
52
+ };
@@ -0,0 +1,138 @@
1
+ div.px-input {
2
+ font-size: var(--text-size);
3
+ }
4
+ .px-input {
5
+ --input-size: var(--px-medium-size);
6
+ --px-medium-padding-x: var(--px-interval-2);
7
+ --px-large-padding-x: var(--px-interval-3);
8
+ --px-small-padding-x: var(--px-interval-2);
9
+ --padding-x-size: var(--px-medium-padding-x);
10
+ --text-size: var(--px-medium-font-size);
11
+ z-index: 0;
12
+ position: relative;
13
+ background-color: transparent;
14
+ border-color: transparent;
15
+ border-width: var(--px-bit);
16
+ border-style: solid;
17
+ color: var(--px-neutral-10);
18
+ display: flex;
19
+ padding: 0 var(--padding-x-size);
20
+ box-sizing: border-box;
21
+ height: var(--input-size);
22
+ cursor: text;
23
+ }
24
+ .px-input__inner {
25
+ padding-right: calc(var(--padding-x-size) + 1px + 1 * var(--px-bit));
26
+ }
27
+ .px-input__inner:last-child {
28
+ padding-right: var(--padding-x-size);
29
+ }
30
+ .px-input-inner {
31
+ height: 100%;
32
+ border: 0;
33
+ background-color: transparent;
34
+ box-sizing: border-box;
35
+ width: 100%;
36
+ font-size: var(--text-size);
37
+ line-height: var(--px-line-height);
38
+ font-family: var(--px-font);
39
+ padding: 0;
40
+ }
41
+ .px-input-inner:focus-visible {
42
+ outline-color: var(--px-neutral-10);
43
+ outline-offset: var(--px-bit);
44
+ }
45
+ .px-input-inner:disabled {
46
+ color: var(--px-neutral-10);
47
+ }
48
+ .px-input-inner::placeholder {
49
+ color: var(--px-neutral-8);
50
+ opacity: 1;
51
+ }
52
+ .px-input__large {
53
+ --padding-x-size: var(--px-large-padding-x);
54
+ --text-size: var(--px-large-font-size);
55
+ --input-size: var(--px-large-size);
56
+ }
57
+ .px-input__small {
58
+ --padding-x-size: var(--px-small-padding-x);
59
+ --input-size: var(--px-small-size);
60
+ --text-size: var(--px-small-font-size);
61
+ }
62
+ .px-input__disabled {
63
+ cursor: not-allowed;
64
+ }
65
+ .px-input__disabled .px-input-inner:disabled {
66
+ cursor: not-allowed;
67
+ color: var(--px-neutral-8);
68
+ }
69
+ .px-input-count-wrapper,
70
+ .px-input-prefix-wrapper,
71
+ .px-input-suffix-wrapper,
72
+ .px-input-loading-wrapper,
73
+ .px-input-close-wrapper,
74
+ .px-input-password-wrapper {
75
+ flex-shrink: 0;
76
+ display: flex;
77
+ align-items: center;
78
+ }
79
+ .px-input-prefix-wrapper {
80
+ margin-right: var(--px-interval-2);
81
+ }
82
+ .px-input-count-wrapper,
83
+ .px-input-suffix-wrapper,
84
+ .px-input-loading-wrapper,
85
+ .px-input-close-wrapper,
86
+ .px-input-password-wrapper {
87
+ margin-left: var(--px-interval-2);
88
+ }
89
+ .px-input-close-wrapper .px-input-icon-placeholder {
90
+ width: var(--text-size);
91
+ height: var(--text-size);
92
+ }
93
+ .px-input-close-wrapper .px-input-icon {
94
+ width: var(--text-size);
95
+ height: var(--text-size);
96
+ cursor: pointer;
97
+ fill: var(--px-neutral-8);
98
+ transition: 0.25s;
99
+ }
100
+ .px-input-close-wrapper .px-input-icon:hover {
101
+ fill: var(--px-neutral-7);
102
+ }
103
+ .px-input-close-wrapper .px-input-icon:active {
104
+ fill: var(--px-neutral-9);
105
+ }
106
+ .px-input-password-wrapper .px-input-icon {
107
+ width: var(--text-size);
108
+ height: var(--text-size);
109
+ cursor: pointer;
110
+ fill: var(--px-neutral-8);
111
+ transition: 0.25s;
112
+ }
113
+ .px-input-password-wrapper .px-input-icon:hover {
114
+ fill: var(--px-primary-6);
115
+ }
116
+ .px-input-password-wrapper .px-input-icon:active {
117
+ fill: var(--px-neutral-9);
118
+ }
119
+ .px-input-loading-wrapper .px-input-icon {
120
+ width: var(--text-size);
121
+ height: var(--text-size);
122
+ fill: var(--px-primary-6);
123
+ }
124
+ .px-input-prefix-wrapper,
125
+ .px-input-suffix-wrapper {
126
+ color: var(--px-neutral-10);
127
+ }
128
+ .px-input-count-wrapper {
129
+ color: var(--px-neutral-8);
130
+ }
131
+ .px-input-canvas {
132
+ position: absolute;
133
+ top: 50%;
134
+ left: 50%;
135
+ transform: translate(-50%, -50%);
136
+ z-index: -1;
137
+ pointer-events: none;
138
+ }
@@ -0,0 +1,50 @@
1
+ import type { InputProps } from './type';
2
+ declare var __VLS_1: {}, __VLS_27: {
3
+ value: any;
4
+ count: any;
5
+ maxLength: number | undefined;
6
+ }, __VLS_34: {};
7
+ type __VLS_Slots = {} & {
8
+ prefix?: (props: typeof __VLS_1) => any;
9
+ } & {
10
+ count?: (props: typeof __VLS_27) => any;
11
+ } & {
12
+ suffix?: (props: typeof __VLS_34) => any;
13
+ };
14
+ declare const __VLS_component: import("vue").DefineComponent<InputProps, {
15
+ focus: () => void;
16
+ blur: () => void;
17
+ clear: () => Promise<void>;
18
+ select: () => void;
19
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
+ input: (value: string, e: Event) => any;
21
+ change: (value: string, e?: Event | undefined) => any;
22
+ clear: (value: string) => any;
23
+ blur: (e: FocusEvent) => any;
24
+ focus: (e: FocusEvent) => any;
25
+ "update:modelValue": (value: string) => any;
26
+ }, string, import("vue").PublicProps, Readonly<InputProps> & Readonly<{
27
+ onInput?: ((value: string, e: Event) => any) | undefined;
28
+ onChange?: ((value: string, e?: Event | undefined) => any) | undefined;
29
+ onClear?: ((value: string) => any) | undefined;
30
+ onBlur?: ((e: FocusEvent) => any) | undefined;
31
+ onFocus?: ((e: FocusEvent) => any) | undefined;
32
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
33
+ }>, {
34
+ shape: "default" | "round";
35
+ size: "medium" | "large" | "small";
36
+ disabled: boolean;
37
+ loading: boolean;
38
+ password: boolean;
39
+ readonly: boolean;
40
+ clearable: boolean;
41
+ showCount: boolean;
42
+ status: "success" | "warning" | "error" | "normal";
43
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
44
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
45
+ export default _default;
46
+ type __VLS_WithSlots<T, S> = T & {
47
+ new (): {
48
+ $slots: S;
49
+ };
50
+ };