@pixelium/web-vue 0.0.4 → 0.0.5

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 (119) hide show
  1. package/dist/index.d.ts +162 -120
  2. package/dist/pixelium-vue.cjs +1 -1
  3. package/dist/pixelium-vue.css +1 -1
  4. package/dist/pixelium-vue.js +19 -21
  5. package/dist/pixelium-vue.umd.cjs +1 -1
  6. package/es/alert/index.d.ts +3 -2
  7. package/es/alert/type.d.ts +15 -15
  8. package/es/aside/index.d.ts +3 -2
  9. package/es/auto-complete/index.d.ts +2 -1
  10. package/es/avatar/index.d.ts +3 -2
  11. package/es/back-top/index.d.ts +21 -0
  12. package/es/back-top/type.d.ts +46 -0
  13. package/es/badge/index.d.ts +3 -2
  14. package/es/badge/type.d.ts +12 -12
  15. package/es/breadcrumb/index.d.ts +12 -0
  16. package/es/breadcrumb/type.d.ts +52 -0
  17. package/es/breadcrumb-item/index.d.ts +27 -0
  18. package/es/breadcrumb-item/type.d.ts +49 -0
  19. package/es/button/index.d.ts +3 -2
  20. package/es/button-group/index.d.ts +3 -2
  21. package/es/checkbox/index.d.ts +3 -2
  22. package/es/checkbox-group/index.d.ts +3 -2
  23. package/es/col/index.d.ts +3 -2
  24. package/es/container/index.d.ts +3 -2
  25. package/es/dialog/dialog-wrapped.d.ts +9 -8
  26. package/es/dialog/dialog.d.ts +9 -8
  27. package/es/dialog/type.d.ts +58 -58
  28. package/es/divider/index.d.ts +2 -1
  29. package/es/drop-down/index.d.ts +36 -0
  30. package/es/drop-down/type.d.ts +140 -0
  31. package/es/drop-down-list/index.d.ts +10 -0
  32. package/es/drop-down-list/type.d.ts +19 -0
  33. package/es/empty/index.d.ts +3 -2
  34. package/es/footer/index.d.ts +3 -2
  35. package/es/form/index.d.ts +3 -2
  36. package/es/form-item/index.d.ts +9 -8
  37. package/es/grid/index.d.ts +3 -2
  38. package/es/grid-item/index.d.ts +3 -2
  39. package/es/header/index.d.ts +3 -2
  40. package/es/icon/index.d.ts +3 -2
  41. package/es/image/index.d.ts +3 -2
  42. package/es/index.d.ts +1 -1
  43. package/es/index.js +1 -1
  44. package/es/input/index.d.ts +7 -6
  45. package/es/input-group/index.d.ts +3 -2
  46. package/es/input-group-label/index.d.ts +3 -2
  47. package/es/input-number/index.d.ts +5 -4
  48. package/es/input-tag/index.css +1 -0
  49. package/es/input-tag/index.d.ts +13 -12
  50. package/es/link/index.d.ts +3 -2
  51. package/es/main/index.d.ts +3 -2
  52. package/es/mask/index.d.ts +2 -1
  53. package/es/menu/index.d.ts +24 -0
  54. package/es/menu/type.d.ts +145 -0
  55. package/es/menu-group/index.d.ts +16 -0
  56. package/es/menu-group/type.d.ts +19 -0
  57. package/es/menu-item/index.d.ts +26 -0
  58. package/es/menu-item/type.d.ts +44 -0
  59. package/es/message/index.d.ts +2 -1
  60. package/es/message-box/message-box-wrapped.d.ts +2 -1
  61. package/es/message-box/message-box.d.ts +2 -1
  62. package/es/option-list/index.d.ts +2 -1
  63. package/es/popconfirm/index.d.ts +2 -1
  64. package/es/popconfirm/type.d.ts +35 -35
  65. package/es/popover/index.d.ts +2 -1
  66. package/es/popup/index.d.ts +2 -1
  67. package/es/popup/use-mouse-position.d.ts +1 -0
  68. package/es/popup/util.d.ts +6 -0
  69. package/es/popup-content/index.d.ts +5 -4
  70. package/es/popup-portal/index.d.ts +5 -4
  71. package/es/popup-trigger/index.d.ts +2 -1
  72. package/es/popup-wrapper/index.d.ts +5 -4
  73. package/es/popup-wrapper/use-popup-wrapper-manager.d.ts +22 -1
  74. package/es/progress/index.d.ts +4 -3
  75. package/es/progress/type.d.ts +14 -14
  76. package/es/radio/index.d.ts +3 -2
  77. package/es/radio-group/index.d.ts +3 -2
  78. package/es/row/index.d.ts +3 -2
  79. package/es/scroll-bar/index.d.ts +40 -0
  80. package/es/scroll-bar/type.d.ts +85 -0
  81. package/es/scroll-bar/use-scroll-bar.d.ts +1 -0
  82. package/es/select/index.css +1 -1
  83. package/es/select/index.d.ts +2 -1
  84. package/es/share/hook/use-expand.d.ts +2 -0
  85. package/es/share/hook/use-hidden-measure.d.ts +1 -0
  86. package/es/share/hook/use-pixel-size.d.ts +1 -0
  87. package/es/share/util/locale.d.ts +4 -0
  88. package/es/share/util/scroll.d.ts +2 -0
  89. package/es/slider/index.d.ts +16 -15
  90. package/es/space/index.d.ts +2 -1
  91. package/es/spin/index.d.ts +6 -5
  92. package/es/submenu/index.d.ts +28 -0
  93. package/es/submenu/type.d.ts +60 -0
  94. package/es/switch/index.d.ts +3 -2
  95. package/es/table/index.d.ts +68 -0
  96. package/es/table/module/cell-span.d.ts +7 -0
  97. package/es/table/module/column.d.ts +46 -0
  98. package/es/table/module/draw.d.ts +11 -0
  99. package/es/table/module/event.d.ts +9 -0
  100. package/es/table/module/expandable.d.ts +20 -0
  101. package/es/table/module/filterable.d.ts +9 -0
  102. package/es/table/module/selection.d.ts +20 -0
  103. package/es/table/module/share.d.ts +8 -0
  104. package/es/table/module/sortable.d.ts +10 -0
  105. package/es/table/module/summary.d.ts +2 -0
  106. package/es/table/type.d.ts +733 -0
  107. package/es/tag/index.css +3 -3
  108. package/es/tag/index.d.ts +3 -2
  109. package/es/text-outline/index.d.ts +3 -2
  110. package/es/textarea/index.d.ts +5 -4
  111. package/es/theme/theme.d.ts +21 -0
  112. package/es/{share/util → theme}/theme.js +22 -22
  113. package/es/tooltip/index.d.ts +2 -1
  114. package/es/vendor.js +1 -1
  115. package/es/virtual-list/index.d.ts +2 -1
  116. package/package.json +1 -1
  117. package/es/share/hook/use-props-detect.d.ts +0 -2
  118. package/es/share/util/pixel.d.ts +0 -4
  119. package/es/share/util/theme.d.ts +0 -7
package/es/tag/index.css CHANGED
@@ -6,9 +6,6 @@
6
6
  z-index: -1;
7
7
  pointer-events: none;
8
8
  }
9
- span.px-tag {
10
- line-height: var(--px-medium-sub-base-size);
11
- }
12
9
  .px-tag {
13
10
  --tag-size: var(--px-medium-sub-size);
14
11
  --text-color: var(--px-neutral-1);
@@ -30,6 +27,7 @@ span.px-tag {
30
27
  padding-right: 8px;
31
28
  padding-left: 8px;
32
29
  font-size: 12px;
30
+ line-height: var(--px-small-sub-base-size);
33
31
  }
34
32
  .px-tag.px-tag__small .px-tag-icon-wrapper {
35
33
  height: 8px;
@@ -39,6 +37,7 @@ span.px-tag {
39
37
  padding-right: 8px;
40
38
  padding-left: 8px;
41
39
  font-size: 14px;
40
+ line-height: var(--px-medium-sub-base-size);
42
41
  }
43
42
  .px-tag.px-tag__medium .px-tag-icon-wrapper {
44
43
  height: 10px;
@@ -48,6 +47,7 @@ span.px-tag {
48
47
  padding-right: 12px;
49
48
  padding-left: 12px;
50
49
  font-size: 15px;
50
+ line-height: var(--px-large-sub-base-size);
51
51
  }
52
52
  .px-tag.px-tag__large .px-tag-icon-wrapper {
53
53
  height: 11px;
package/es/tag/index.d.ts CHANGED
@@ -3,7 +3,7 @@ declare var __VLS_1: {};
3
3
  type __VLS_Slots = {} & {
4
4
  default?: (props: typeof __VLS_1) => any;
5
5
  };
6
- declare const __VLS_component: import("vue").DefineComponent<TagProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ declare const __VLS_base: import("vue").DefineComponent<TagProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
7
  close: (e: MouseEvent) => any;
8
8
  }, string, import("vue").PublicProps, Readonly<TagProps> & Readonly<{
9
9
  onClose?: ((e: MouseEvent) => any) | undefined;
@@ -14,7 +14,8 @@ declare const __VLS_component: import("vue").DefineComponent<TagProps, {}, {}, {
14
14
  disabled: boolean;
15
15
  shape: "rect" | "round" | "default";
16
16
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
18
19
  export default _default;
19
20
  type __VLS_WithSlots<T, S> = T & {
20
21
  new (): {
@@ -3,12 +3,13 @@ declare var __VLS_1: {};
3
3
  type __VLS_Slots = {} & {
4
4
  default?: (props: typeof __VLS_1) => any;
5
5
  };
6
- declare const __VLS_component: import("vue").DefineComponent<TextOutlineProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextOutlineProps> & Readonly<{}>, {
6
+ declare const __VLS_base: import("vue").DefineComponent<TextOutlineProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextOutlineProps> & Readonly<{}>, {
7
7
  color: string;
8
8
  outlineWidth: number | string;
9
9
  autoPadding: boolean;
10
10
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
12
13
  export default _default;
13
14
  type __VLS_WithSlots<T, S> = T & {
14
15
  new (): {
@@ -1,14 +1,14 @@
1
1
  import type { TextareaExpose, TextareaProps } from './type';
2
2
  import { type Nullish } from 'parsnip-kit';
3
- declare var __VLS_9: {
3
+ declare var __VLS_8: {
4
4
  value: string | Nullish;
5
5
  count: number;
6
6
  maxLength: number | undefined;
7
7
  };
8
8
  type __VLS_Slots = {} & {
9
- count?: (props: typeof __VLS_9) => any;
9
+ count?: (props: typeof __VLS_8) => any;
10
10
  };
11
- declare const __VLS_component: import("vue").DefineComponent<TextareaProps, TextareaExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ declare const __VLS_base: import("vue").DefineComponent<TextareaProps, TextareaExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
12
  clear: (value: string) => any;
13
13
  change: (value: string, e?: Event | undefined) => any;
14
14
  blur: (e: FocusEvent) => any;
@@ -34,7 +34,8 @@ declare const __VLS_component: import("vue").DefineComponent<TextareaProps, Text
34
34
  maxRows: number;
35
35
  autoResize: boolean;
36
36
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
37
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
37
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
38
+ declare const _default: typeof __VLS_export;
38
39
  export default _default;
39
40
  type __VLS_WithSlots<T, S> = T & {
40
41
  new (): {
@@ -0,0 +1,21 @@
1
+ export declare const setThemeColor: (theme: "primary" | "success" | "warning" | "danger" | "sakura" | "neutral", color: string | {
2
+ light?: string[];
3
+ dark?: string[];
4
+ }) => void;
5
+ export declare const resetThemeColor: (theme: "primary" | "success" | "warning" | "danger" | "sakura" | "neutral") => void;
6
+ export declare const calcSizes: (pixelSize: number, borderSize: number) => {
7
+ '--px-large-size': number;
8
+ '--px-medium-size': number;
9
+ '--px-small-size': number;
10
+ '--px-large-sub-size': number;
11
+ '--px-medium-sub-size': number;
12
+ '--px-small-sub-size': number;
13
+ '--px-large-sub-base-size': number;
14
+ '--px-medium-sub-base-size': number;
15
+ '--px-small-sub-base-size': number;
16
+ '--px-large-compat-size': number;
17
+ '--px-medium-compat-size': number;
18
+ '--px-small-compat-size': number;
19
+ };
20
+ export declare const setPixelSize: (size: number, dynamicComponentSize?: boolean) => void;
21
+ export declare const resetPixelSize: () => void;
@@ -1,10 +1,10 @@
1
- import { B as y } from "../../vendor.js";
2
- import { t as inBrowser } from "./env.js";
3
- import { a as MEDIUM_BASE_SIZE, i as LARGE_BASE_SIZE, n as INTERVAL, o as SMALL_BASE_SIZE, r as INTERVAL_MINI, t as DEFAULT_PIXEL_SIZE } from "../const/style.js";
4
- import { a as rgbaColor2string, i as parseColor, t as generatePalette } from "./color.js";
5
- import { t as EventBus } from "./event-bus.js";
6
- import { n as GLOBAL_CSS_VAR_CHANGE } from "../const/event-bus-key.js";
7
- import { r as throwError } from "./console.js";
1
+ import { B as y } from "../vendor.js";
2
+ import { t as inBrowser } from "../share/util/env.js";
3
+ import { a as MEDIUM_BASE_SIZE, i as LARGE_BASE_SIZE, n as INTERVAL, o as SMALL_BASE_SIZE, r as INTERVAL_MINI, t as DEFAULT_PIXEL_SIZE } from "../share/const/style.js";
4
+ import { a as rgbaColor2string, i as parseColor, t as generatePalette } from "../share/util/color.js";
5
+ import { t as EventBus } from "../share/util/event-bus.js";
6
+ import { n as GLOBAL_CSS_VAR_CHANGE } from "../share/const/event-bus-key.js";
7
+ import { r as throwError } from "../share/util/console.js";
8
8
  const setThemeColor = (theme, color) => {
9
9
  if (!inBrowser()) return;
10
10
  const colorList = {
@@ -43,31 +43,31 @@ const resetThemeColor = (theme) => {
43
43
  }
44
44
  EventBus.emit(GLOBAL_CSS_VAR_CHANGE);
45
45
  };
46
- var calcSizes = (pixelSize) => {
46
+ const calcSizes = (pixelSize, borderSize) => {
47
47
  const mediumSize = 28 + pixelSize * 2;
48
48
  const smallSize = 20 + pixelSize * 2;
49
49
  const largeSubSize = mediumSize;
50
50
  const mediumSubSize = mediumSize - 8 - 2;
51
51
  const smallSubSize = smallSize - 8;
52
52
  return {
53
- "-px-large-size": 36 + pixelSize * 2,
54
- "-px-medium-size": mediumSize,
55
- "-px-small-size": smallSize,
56
- "-px-large-sub-size": largeSubSize,
57
- "-px-medium-sub-size": mediumSubSize,
58
- "-px-small-sub-size": smallSubSize,
59
- "-px-large-sub-base-size": largeSubSize - 2 * pixelSize,
60
- "-px-medium-sub-base-size": mediumSubSize - 2 * pixelSize,
61
- "-px-small-sub-base-size": smallSubSize - 2 * pixelSize,
62
- "-px-large-compat-size": mediumSize - 4,
63
- "-px-medium-compat-size": mediumSize - 8,
64
- "-px-small-compat-size": smallSize - 4
53
+ "--px-large-size": 36 + pixelSize * 2,
54
+ "--px-medium-size": mediumSize,
55
+ "--px-small-size": smallSize,
56
+ "--px-large-sub-size": largeSubSize,
57
+ "--px-medium-sub-size": mediumSubSize,
58
+ "--px-small-sub-size": smallSubSize,
59
+ "--px-large-sub-base-size": largeSubSize - 2 * borderSize,
60
+ "--px-medium-sub-base-size": mediumSubSize - 2 * borderSize,
61
+ "--px-small-sub-base-size": smallSubSize - 2 * borderSize,
62
+ "--px-large-compat-size": mediumSize - 4,
63
+ "--px-medium-compat-size": mediumSize - 8,
64
+ "--px-small-compat-size": smallSize - 4
65
65
  };
66
66
  };
67
- const setPixelSize = (size) => {
67
+ const setPixelSize = (size, dynamicComponentSize = false) => {
68
68
  if (!inBrowser()) return;
69
69
  document.documentElement.style.setProperty(`--px-bit`, size + "px");
70
- const sizes = calcSizes(size);
70
+ const sizes = calcSizes(dynamicComponentSize ? size : 4, size);
71
71
  Object.keys(sizes).forEach((key) => {
72
72
  document.documentElement.style.setProperty(key, sizes[key] + "px");
73
73
  });
@@ -1,5 +1,5 @@
1
1
  import type { TooltipProps } from './type';
2
- declare const _default: import("vue").DefineComponent<TooltipProps, {
2
+ declare const __VLS_export: import("vue").DefineComponent<TooltipProps, {
3
3
  readonly triggerContent: ({
4
4
  $: import("vue").ComponentInternalInstance;
5
5
  $data: {};
@@ -113,4 +113,5 @@ declare const _default: import("vue").DefineComponent<TooltipProps, {
113
113
  arrow: boolean;
114
114
  destroyOnHide: boolean;
115
115
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
116
+ declare const _default: typeof __VLS_export;
116
117
  export default _default;
package/es/vendor.js CHANGED
@@ -204,7 +204,7 @@ function Ue(n, e, t) {
204
204
  c !== void 0 && !o && (o = setTimeout(() => {
205
205
  o = void 0, n.apply(this, l);
206
206
  }, c)), !s && i && n.apply(this, l), s && clearTimeout(s), s = setTimeout(() => {
207
- o && (clearTimeout(o), o = void 0), n.apply(this, l);
207
+ o && (clearTimeout(o), o = void 0), n.apply(this, l), s = void 0;
208
208
  }, e);
209
209
  };
210
210
  }
@@ -1,5 +1,5 @@
1
1
  import type { VirtualListProps } from './type';
2
- declare const _default: import("vue").DefineComponent<VirtualListProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VirtualListProps> & Readonly<{}>, {
2
+ declare const __VLS_export: import("vue").DefineComponent<VirtualListProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VirtualListProps> & Readonly<{}>, {
3
3
  list: {
4
4
  render: import("..").ValidContent;
5
5
  key?: string | number | symbol;
@@ -8,4 +8,5 @@ declare const _default: import("vue").DefineComponent<VirtualListProps, {}, {},
8
8
  estimatedHeight: number;
9
9
  buffer: number;
10
10
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
11
12
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixelium/web-vue",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "type": "module",
5
5
  "main": "./dist/pixelium-vue.js",
6
6
  "exports": {
@@ -1,2 +0,0 @@
1
- import { type Ref } from 'vue';
2
- export declare function usePropsDetect<T extends Record<string, any>, U extends keyof T>(props: T, fields?: Array<U> | U, emptyValues?: Record<U, any>): Ref<Record<U, boolean>, Record<U, boolean>>;
@@ -1,4 +0,0 @@
1
- export declare function pixelateImage(imageSource: HTMLImageElement | string, pixelSize: number, options?: {
2
- palette?: string[];
3
- background?: string;
4
- }): Promise<string>;
@@ -1,7 +0,0 @@
1
- export declare const setThemeColor: (theme: "primary" | "success" | "warning" | "danger" | "sakura" | "neutral", color: string | {
2
- light?: string[];
3
- dark?: string[];
4
- }) => void;
5
- export declare const resetThemeColor: (theme: "primary" | "success" | "warning" | "danger" | "sakura" | "neutral") => void;
6
- export declare const setPixelSize: (size: number) => void;
7
- export declare const resetPixelSize: () => void;