@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
@@ -1,9 +1,9 @@
1
1
  import './css.js'
2
- import { defineComponent, useModel, computed, ref, createElementBlock, openBlock, normalizeStyle, createElementVNode, normalizeClass, unref, Fragment, renderList, createBlock } from "vue";
3
- import { O as On, N } from "../aside/index.js";
2
+ import { defineComponent, useModel, computed, shallowRef, createElementBlock, openBlock, normalizeStyle, unref, createElementVNode, normalizeClass, Fragment, renderList, createBlock } from "vue";
3
+ import { N } from "../aside/index.js";
4
4
  import { _ as _sfc_main$1 } from "../message/index.js";
5
- import { M as MESSAGE_Z_INDEX } from "../share/const/index.js";
6
5
  import { n as nanoid } from "./index.js";
6
+ import { u as useZIndex } from "../share/hook/use-z-index.js";
7
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  ...{
9
9
  name: "MessageBoxInner"
@@ -11,14 +11,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11
11
  __name: "message-box",
12
12
  props: {
13
13
  messages: {},
14
- position: {},
15
- zIndex: { default: MESSAGE_Z_INDEX },
14
+ placement: { default: "top" },
15
+ position: { default: "top" },
16
+ zIndex: {},
16
17
  root: {},
17
18
  "onUpdate:messages": {}
18
19
  },
19
20
  emits: ["close"],
20
21
  setup(__props, { expose: __expose, emit: __emit }) {
21
22
  const props = __props;
23
+ const [currentZIndex] = useZIndex("message");
22
24
  const messages = useModel(props, "messages");
23
25
  const emits = __emit;
24
26
  const clone = computed(() => {
@@ -43,7 +45,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
43
45
  }
44
46
  emits("close", id);
45
47
  };
46
- const messageRef = ref([]);
48
+ const messageRef = shallowRef([]);
47
49
  __expose({
48
50
  close: (id) => {
49
51
  var _a;
@@ -60,7 +62,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
60
62
  {
61
63
  class: "px-message-box",
62
64
  style: normalizeStyle({
63
- zIndex: props.zIndex
65
+ zIndex: props.zIndex ?? unref(currentZIndex)
64
66
  })
65
67
  },
66
68
  [
@@ -68,7 +70,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
68
70
  "div",
69
71
  {
70
72
  class: normalizeClass(["px-message-box-container", {
71
- [`px-message-box-container__${unref(On)(props.position || "top")}`]: true
73
+ [`px-message-box-container__${props.placement || props.position || "top"}`]: true
72
74
  }])
73
75
  },
74
76
  [
@@ -32,7 +32,12 @@ export type MessageOptions = {
32
32
  */
33
33
  closable?: boolean;
34
34
  /**
35
- * @property {'top' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'} [position='top']
35
+ * @property {'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'} [placement='top']
36
+ * @version 0.0.2
37
+ */
38
+ placement?: MessageBoxProps['placement'];
39
+ /**
40
+ * @property {'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'} [position='top']
36
41
  * @version 0.0.0-beta
37
42
  */
38
43
  position?: MessageBoxProps['position'];
@@ -61,12 +66,17 @@ export type MessageBoxProps = {
61
66
  */
62
67
  messages: MessageProps[];
63
68
  /**
64
- * @property {'top' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'} [position='top']
69
+ * @property {'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'} [placement='top']
70
+ * @version 0.0.2
71
+ */
72
+ placement?: 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
73
+ /**
74
+ * @property {'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'} [position='top']
65
75
  * @version 0.0.0-beta
66
76
  */
67
- position?: 'top' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
77
+ position?: 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
68
78
  /**
69
- * @property {number} [zIndex=3000]
79
+ * @property {number} [zIndex]
70
80
  * @version 0.0.0-beta
71
81
  */
72
82
  zIndex?: number;
@@ -0,0 +1,2 @@
1
+ import '../index.css'
2
+ import './index.css'
@@ -0,0 +1,57 @@
1
+ .px-option-list {
2
+ --item-size: var(--px-medium-base-size);
3
+ --px-padding-x: var(--px-interval-1);
4
+ --px-padding-group-x: var(--px-interval-2);
5
+ overflow: auto;
6
+ max-height: calc(var(--item-size) * 6);
7
+ background-color: var(--px-neutral-1);
8
+ color: var(--px-neutral-10);
9
+ list-style: none;
10
+ padding-left: 0;
11
+ margin-top: 0;
12
+ margin-bottom: 0;
13
+ }
14
+ .px-option-list-item {
15
+ overflow: hidden;
16
+ text-overflow: ellipsis;
17
+ white-space: nowrap;
18
+ height: var(--item-size);
19
+ display: flex;
20
+ align-items: center;
21
+ cursor: pointer;
22
+ transition: background-color 0.25s;
23
+ padding-left: var(--px-padding-x);
24
+ padding-right: var(--px-padding-x);
25
+ background-color: var(--px-neutral-1);
26
+ }
27
+ .px-option-list-item:hover {
28
+ background-color: var(--px-primary-1);
29
+ }
30
+ .px-option-list-item__disabled {
31
+ background-color: var(--px-neutral-1);
32
+ color: var(--px-neutral-6);
33
+ cursor: not-allowed;
34
+ }
35
+ .px-option-list-item__disabled:hover {
36
+ background-color: var(--px-neutral-1);
37
+ }
38
+ .px-option-list-item__disabled.px-option-list-item__active {
39
+ color: var(--px-primary-3);
40
+ }
41
+ .px-option-list-item__active {
42
+ color: var(--px-primary-6);
43
+ }
44
+ .px-option-list-item-group .px-option-list-item {
45
+ padding-left: var(--px-padding-group-x);
46
+ }
47
+ .px-option-list-item-group-label {
48
+ overflow: hidden;
49
+ text-overflow: ellipsis;
50
+ white-space: nowrap;
51
+ color: var(--px-neutral-9);
52
+ height: var(--item-size);
53
+ display: flex;
54
+ align-items: center;
55
+ padding-left: var(--px-padding-x);
56
+ padding-right: var(--px-padding-x);
57
+ }
@@ -0,0 +1,38 @@
1
+ import type { OptionListGroupOption, OptionListOption, OptionListProps } from './type';
2
+ declare var __VLS_1: {
3
+ option: string;
4
+ }, __VLS_3: {
5
+ option: OptionListOption | OptionListGroupOption;
6
+ }, __VLS_5: {
7
+ option: OptionListGroupOption;
8
+ }, __VLS_7: {
9
+ option: string;
10
+ }, __VLS_9: {
11
+ option: OptionListOption;
12
+ };
13
+ type __VLS_Slots = {} & {
14
+ option?: (props: typeof __VLS_1) => any;
15
+ } & {
16
+ option?: (props: typeof __VLS_3) => any;
17
+ } & {
18
+ 'group-label'?: (props: typeof __VLS_5) => any;
19
+ } & {
20
+ option?: (props: typeof __VLS_7) => any;
21
+ } & {
22
+ option?: (props: typeof __VLS_9) => any;
23
+ };
24
+ declare const __VLS_component: import("vue").DefineComponent<OptionListProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
+ select: (value: any, option: string | OptionListOption, e: MouseEvent) => any;
26
+ }, string, import("vue").PublicProps, Readonly<OptionListProps> & Readonly<{
27
+ onSelect?: ((value: any, option: string | OptionListOption, e: MouseEvent) => any) | undefined;
28
+ }>, {
29
+ options: (string | OptionListOption | OptionListGroupOption)[];
30
+ activeValues: any[];
31
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
32
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
33
+ export default _default;
34
+ type __VLS_WithSlots<T, S> = T & {
35
+ new (): {
36
+ $slots: S;
37
+ };
38
+ };
@@ -0,0 +1,169 @@
1
+ import './css.js'
2
+ import { defineComponent, createElementBlock, openBlock, Fragment, renderList, unref, normalizeClass, renderSlot, createTextVNode, toDisplayString, createElementVNode } from "vue";
3
+ import { p, d } from "../aside/index.js";
4
+ import { G as GROUP_OPTION_TYPE } from "../share/const/index.js";
5
+ const _hoisted_1 = { class: "px-option-list" };
6
+ const _hoisted_2 = ["onClick"];
7
+ const _hoisted_3 = ["onClick"];
8
+ const _hoisted_4 = {
9
+ key: 2,
10
+ class: "px-option-list-item-group"
11
+ };
12
+ const _hoisted_5 = { class: "px-option-list-item-group-label" };
13
+ const _hoisted_6 = ["onClick"];
14
+ const _hoisted_7 = ["onClick"];
15
+ const _sfc_main = /* @__PURE__ */ defineComponent({
16
+ ...{
17
+ name: "OptionList"
18
+ },
19
+ __name: "index",
20
+ props: {
21
+ options: { default: () => [] },
22
+ activeValues: { default: () => [] }
23
+ },
24
+ emits: ["select"],
25
+ setup(__props, { emit: __emit }) {
26
+ const props = __props;
27
+ const emits = __emit;
28
+ const selectHandler = (value, e) => {
29
+ emits("select", value, value, e);
30
+ };
31
+ const selectObjectHandler = (option, e) => {
32
+ if (option.disabled) {
33
+ return;
34
+ }
35
+ emits("select", option.value, option, e);
36
+ };
37
+ const getKey = (option) => {
38
+ if (p(option)) {
39
+ return option;
40
+ } else if ("type" in option && option.type === GROUP_OPTION_TYPE) {
41
+ return option.key;
42
+ } else {
43
+ return option.label;
44
+ }
45
+ };
46
+ const checkActive = (option) => {
47
+ if (!props.activeValues.length) {
48
+ return false;
49
+ }
50
+ if (p(option)) {
51
+ return props.activeValues.includes(option);
52
+ }
53
+ return props.activeValues.includes(option.value);
54
+ };
55
+ return (_ctx, _cache) => {
56
+ return openBlock(), createElementBlock("ul", _hoisted_1, [
57
+ (openBlock(true), createElementBlock(
58
+ Fragment,
59
+ null,
60
+ renderList(props.options, (item) => {
61
+ return openBlock(), createElementBlock(
62
+ Fragment,
63
+ {
64
+ key: getKey(item)
65
+ },
66
+ [
67
+ unref(p)(item) ? (openBlock(), createElementBlock("li", {
68
+ key: 0,
69
+ class: normalizeClass(["px-option-list-item", {
70
+ "px-option-list-item__active": checkActive(item)
71
+ }]),
72
+ onClick: (e) => selectHandler(item, e)
73
+ }, [
74
+ renderSlot(_ctx.$slots, "option", { option: item }, () => [
75
+ createTextVNode(
76
+ toDisplayString(item),
77
+ 1
78
+ /* TEXT */
79
+ )
80
+ ])
81
+ ], 10, _hoisted_2)) : unref(d)(item) && !("type" in item && item.type === unref(GROUP_OPTION_TYPE)) ? (openBlock(), createElementBlock("li", {
82
+ key: 1,
83
+ class: normalizeClass(["px-option-list-item", {
84
+ "px-option-list-item__disabled": item.disabled,
85
+ "px-option-list-item__active": checkActive(item)
86
+ }]),
87
+ onClick: (e) => selectObjectHandler(item, e)
88
+ }, [
89
+ renderSlot(_ctx.$slots, "option", { option: item }, () => [
90
+ createTextVNode(
91
+ toDisplayString(item.label),
92
+ 1
93
+ /* TEXT */
94
+ )
95
+ ])
96
+ ], 10, _hoisted_3)) : (openBlock(), createElementBlock("li", _hoisted_4, [
97
+ createElementVNode("div", _hoisted_5, [
98
+ renderSlot(_ctx.$slots, "group-label", { option: item }, () => [
99
+ createTextVNode(
100
+ toDisplayString(item.label),
101
+ 1
102
+ /* TEXT */
103
+ )
104
+ ])
105
+ ]),
106
+ (openBlock(true), createElementBlock(
107
+ Fragment,
108
+ null,
109
+ renderList(item.children, (child) => {
110
+ return openBlock(), createElementBlock(
111
+ Fragment,
112
+ {
113
+ key: getKey(child)
114
+ },
115
+ [
116
+ unref(p)(child) ? (openBlock(), createElementBlock("li", {
117
+ key: 0,
118
+ class: normalizeClass(["px-option-list-item", {
119
+ "px-option-list-item__active": checkActive(child)
120
+ }]),
121
+ onClick: (e) => selectHandler(child, e)
122
+ }, [
123
+ renderSlot(_ctx.$slots, "option", { option: child }, () => [
124
+ createTextVNode(
125
+ toDisplayString(child),
126
+ 1
127
+ /* TEXT */
128
+ )
129
+ ])
130
+ ], 10, _hoisted_6)) : (openBlock(), createElementBlock("li", {
131
+ key: 1,
132
+ class: normalizeClass(["px-option-list-item", {
133
+ "px-option-list-item__disabled": child.disabled,
134
+ "px-option-list-item__active": checkActive(child)
135
+ }]),
136
+ onClick: (e) => selectObjectHandler(child, e)
137
+ }, [
138
+ renderSlot(_ctx.$slots, "option", { option: child }, () => [
139
+ createTextVNode(
140
+ toDisplayString(child.label),
141
+ 1
142
+ /* TEXT */
143
+ )
144
+ ])
145
+ ], 10, _hoisted_7))
146
+ ],
147
+ 64
148
+ /* STABLE_FRAGMENT */
149
+ );
150
+ }),
151
+ 128
152
+ /* KEYED_FRAGMENT */
153
+ ))
154
+ ]))
155
+ ],
156
+ 64
157
+ /* STABLE_FRAGMENT */
158
+ );
159
+ }),
160
+ 128
161
+ /* KEYED_FRAGMENT */
162
+ ))
163
+ ]);
164
+ };
165
+ }
166
+ });
167
+ export {
168
+ _sfc_main as _
169
+ };
@@ -0,0 +1,16 @@
1
+ import type { GroupOption, Option } from '../share/type';
2
+ export interface OptionListOption extends Option<any> {
3
+ disabled?: boolean;
4
+ }
5
+ export interface OptionListGroupOption extends GroupOption {
6
+ label: string;
7
+ key: string | number | symbol;
8
+ children: (OptionListOption | string)[];
9
+ }
10
+ export type OptionListProps = {
11
+ options?: (string | OptionListOption | OptionListGroupOption)[];
12
+ activeValues?: any[];
13
+ };
14
+ export type OptionListEvent = {
15
+ select: [value: any, option: OptionListOption | string, e: MouseEvent];
16
+ };
@@ -0,0 +1 @@
1
+ import '../index.css'
@@ -0,0 +1,203 @@
1
+ import { nextTick, type VNode } from 'vue';
2
+ import type { PopoverProps } from './type';
3
+ declare const _default: import("vue").DefineComponent<PopoverProps, {
4
+ triggerContent: import("vue").ShallowRef<({
5
+ $: import("vue").ComponentInternalInstance;
6
+ $data: {};
7
+ $props: {
8
+ readonly content?: string | undefined;
9
+ readonly visible?: boolean | null | undefined;
10
+ readonly defaultVisible?: boolean | null | undefined;
11
+ readonly placement?: "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | undefined;
12
+ readonly offset?: number | undefined;
13
+ readonly variant?: "dark" | "light" | undefined;
14
+ readonly arrow?: boolean | undefined;
15
+ readonly zIndex?: number | undefined;
16
+ readonly target?: (HTMLElement | VNode | null) | undefined;
17
+ readonly root?: (HTMLElement | string) | undefined;
18
+ readonly borderRadius?: number | undefined;
19
+ readonly widthEqual?: boolean | undefined;
20
+ readonly contentStyle?: import("vue").CSSProperties | undefined;
21
+ readonly onContentMouseenter?: ((e: MouseEvent) => any) | undefined;
22
+ readonly onContentMouseleave?: ((e: MouseEvent) => any) | undefined;
23
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
24
+ $attrs: {
25
+ [x: string]: unknown;
26
+ };
27
+ $refs: {
28
+ [x: string]: unknown;
29
+ };
30
+ $slots: Readonly<{
31
+ [name: string]: import("vue").Slot<any> | undefined;
32
+ }>;
33
+ $root: import("vue").ComponentPublicInstance | null;
34
+ $parent: import("vue").ComponentPublicInstance | null;
35
+ $host: Element | null;
36
+ $emit: ((event: "contentMouseenter", e: MouseEvent) => void) & ((event: "contentMouseleave", e: MouseEvent) => void);
37
+ $el: any;
38
+ $options: import("vue").ComponentOptionsBase<Readonly<import("../popup-content/type.ts").PopupContentProps> & Readonly<{
39
+ onContentMouseenter?: ((e: MouseEvent) => any) | undefined;
40
+ onContentMouseleave?: ((e: MouseEvent) => any) | undefined;
41
+ }>, {
42
+ updateRenderState: () => void;
43
+ content: import("vue").ShallowRef<HTMLDivElement | null, HTMLDivElement | null>;
44
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
45
+ contentMouseenter: (e: MouseEvent) => any;
46
+ contentMouseleave: (e: MouseEvent) => any;
47
+ }, string, {
48
+ variant: "dark" | "light";
49
+ placement: "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
50
+ root: HTMLElement | string;
51
+ offset: number;
52
+ visible: boolean | null;
53
+ arrow: boolean;
54
+ widthEqual: boolean;
55
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
56
+ beforeCreate?: (() => void) | (() => void)[];
57
+ created?: (() => void) | (() => void)[];
58
+ beforeMount?: (() => void) | (() => void)[];
59
+ mounted?: (() => void) | (() => void)[];
60
+ beforeUpdate?: (() => void) | (() => void)[];
61
+ updated?: (() => void) | (() => void)[];
62
+ activated?: (() => void) | (() => void)[];
63
+ deactivated?: (() => void) | (() => void)[];
64
+ beforeDestroy?: (() => void) | (() => void)[];
65
+ beforeUnmount?: (() => void) | (() => void)[];
66
+ destroyed?: (() => void) | (() => void)[];
67
+ unmounted?: (() => void) | (() => void)[];
68
+ renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
69
+ renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
70
+ errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
71
+ };
72
+ $forceUpdate: () => void;
73
+ $nextTick: typeof nextTick;
74
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, ((cleanupFn: () => void) => void)]) => any : (...args: [any, any, ((cleanupFn: () => void) => void)]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
75
+ } & Readonly<{
76
+ variant: "dark" | "light";
77
+ placement: "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
78
+ root: HTMLElement | string;
79
+ offset: number;
80
+ visible: boolean | null;
81
+ arrow: boolean;
82
+ widthEqual: boolean;
83
+ }> & Omit<Readonly<import("../popup-content/type.ts").PopupContentProps> & Readonly<{
84
+ onContentMouseenter?: ((e: MouseEvent) => any) | undefined;
85
+ onContentMouseleave?: ((e: MouseEvent) => any) | undefined;
86
+ }>, "content" | ("variant" | "placement" | "root" | "offset" | "visible" | "arrow" | "widthEqual") | "updateRenderState"> & import("vue").ShallowUnwrapRef<{
87
+ updateRenderState: () => void;
88
+ content: import("vue").ShallowRef<HTMLDivElement | null, HTMLDivElement | null>;
89
+ }> & {} & import("vue").ComponentCustomProperties & {} & {
90
+ $slots: {
91
+ content?: (props: {}) => any;
92
+ };
93
+ }) | undefined, ({
94
+ $: import("vue").ComponentInternalInstance;
95
+ $data: {};
96
+ $props: {
97
+ readonly content?: string | undefined;
98
+ readonly visible?: boolean | null | undefined;
99
+ readonly defaultVisible?: boolean | null | undefined;
100
+ readonly placement?: "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | undefined;
101
+ readonly offset?: number | undefined;
102
+ readonly variant?: "dark" | "light" | undefined;
103
+ readonly arrow?: boolean | undefined;
104
+ readonly zIndex?: number | undefined;
105
+ readonly target?: (HTMLElement | VNode | null) | undefined;
106
+ readonly root?: (HTMLElement | string) | undefined;
107
+ readonly borderRadius?: number | undefined;
108
+ readonly widthEqual?: boolean | undefined;
109
+ readonly contentStyle?: import("vue").CSSProperties | undefined;
110
+ readonly onContentMouseenter?: ((e: MouseEvent) => any) | undefined;
111
+ readonly onContentMouseleave?: ((e: MouseEvent) => any) | undefined;
112
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
113
+ $attrs: {
114
+ [x: string]: unknown;
115
+ };
116
+ $refs: {
117
+ [x: string]: unknown;
118
+ };
119
+ $slots: Readonly<{
120
+ [name: string]: import("vue").Slot<any> | undefined;
121
+ }>;
122
+ $root: import("vue").ComponentPublicInstance | null;
123
+ $parent: import("vue").ComponentPublicInstance | null;
124
+ $host: Element | null;
125
+ $emit: ((event: "contentMouseenter", e: MouseEvent) => void) & ((event: "contentMouseleave", e: MouseEvent) => void);
126
+ $el: any;
127
+ $options: import("vue").ComponentOptionsBase<Readonly<import("../popup-content/type.ts").PopupContentProps> & Readonly<{
128
+ onContentMouseenter?: ((e: MouseEvent) => any) | undefined;
129
+ onContentMouseleave?: ((e: MouseEvent) => any) | undefined;
130
+ }>, {
131
+ updateRenderState: () => void;
132
+ content: import("vue").ShallowRef<HTMLDivElement | null, HTMLDivElement | null>;
133
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
134
+ contentMouseenter: (e: MouseEvent) => any;
135
+ contentMouseleave: (e: MouseEvent) => any;
136
+ }, string, {
137
+ variant: "dark" | "light";
138
+ placement: "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
139
+ root: HTMLElement | string;
140
+ offset: number;
141
+ visible: boolean | null;
142
+ arrow: boolean;
143
+ widthEqual: boolean;
144
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
145
+ beforeCreate?: (() => void) | (() => void)[];
146
+ created?: (() => void) | (() => void)[];
147
+ beforeMount?: (() => void) | (() => void)[];
148
+ mounted?: (() => void) | (() => void)[];
149
+ beforeUpdate?: (() => void) | (() => void)[];
150
+ updated?: (() => void) | (() => void)[];
151
+ activated?: (() => void) | (() => void)[];
152
+ deactivated?: (() => void) | (() => void)[];
153
+ beforeDestroy?: (() => void) | (() => void)[];
154
+ beforeUnmount?: (() => void) | (() => void)[];
155
+ destroyed?: (() => void) | (() => void)[];
156
+ unmounted?: (() => void) | (() => void)[];
157
+ renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
158
+ renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
159
+ errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
160
+ };
161
+ $forceUpdate: () => void;
162
+ $nextTick: typeof nextTick;
163
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, ((cleanupFn: () => void) => void)]) => any : (...args: [any, any, ((cleanupFn: () => void) => void)]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
164
+ } & Readonly<{
165
+ variant: "dark" | "light";
166
+ placement: "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
167
+ root: HTMLElement | string;
168
+ offset: number;
169
+ visible: boolean | null;
170
+ arrow: boolean;
171
+ widthEqual: boolean;
172
+ }> & Omit<Readonly<import("../popup-content/type.ts").PopupContentProps> & Readonly<{
173
+ onContentMouseenter?: ((e: MouseEvent) => any) | undefined;
174
+ onContentMouseleave?: ((e: MouseEvent) => any) | undefined;
175
+ }>, "content" | ("variant" | "placement" | "root" | "offset" | "visible" | "arrow" | "widthEqual") | "updateRenderState"> & import("vue").ShallowUnwrapRef<{
176
+ updateRenderState: () => void;
177
+ content: import("vue").ShallowRef<HTMLDivElement | null, HTMLDivElement | null>;
178
+ }> & {} & import("vue").ComponentCustomProperties & {} & {
179
+ $slots: {
180
+ content?: (props: {}) => any;
181
+ };
182
+ }) | undefined>;
183
+ updateRenderState: () => void;
184
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
185
+ close: (e: MouseEvent) => any;
186
+ open: (e: MouseEvent) => any;
187
+ "update:visible": (value: boolean) => any;
188
+ }, string, import("vue").PublicProps, Readonly<PopoverProps> & Readonly<{
189
+ onClose?: ((e: MouseEvent) => any) | undefined;
190
+ onOpen?: ((e: MouseEvent) => any) | undefined;
191
+ "onUpdate:visible"?: ((value: boolean) => any) | undefined;
192
+ }>, {
193
+ variant: "dark" | "light";
194
+ placement: "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
195
+ root: HTMLElement | string;
196
+ offset: number;
197
+ visible: boolean | null;
198
+ defaultVisible: boolean | null;
199
+ arrow: boolean;
200
+ widthEqual: boolean;
201
+ trigger: "hover" | "click";
202
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
203
+ export default _default;