@solar-taro/ui-sun 1.6.5 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/accordion/index.vue.d.ts +22 -16
  3. package/chip/index.vue.d.ts +15 -36
  4. package/circular-progress/index.vue.d.ts +4 -30
  5. package/fab/fab-group.vue.d.ts +9 -3
  6. package/fab/fab.vue.d.ts +9 -3
  7. package/fab/index.scss +11 -3
  8. package/icon/index.scss +4 -3
  9. package/icon/index.vue.d.ts +3 -22
  10. package/index.d.ts +3 -0
  11. package/index.js +32 -26
  12. package/index10.js +24 -33
  13. package/index11.js +33 -75
  14. package/index12.js +75 -19
  15. package/index13.js +19 -49
  16. package/index14.js +46 -141
  17. package/index15.js +142 -27
  18. package/index16.js +29 -21
  19. package/index17.js +18 -21
  20. package/index18.js +42 -11
  21. package/index19.js +21 -26
  22. package/index20.js +11 -118
  23. package/index21.js +33 -10
  24. package/index22.js +123 -10
  25. package/index23.js +12 -8
  26. package/index24.js +10 -2
  27. package/index25.js +10 -2
  28. package/index26.js +10 -2
  29. package/index28.js +1 -1
  30. package/index29.js +1 -1
  31. package/index31.js +1 -1
  32. package/index32.js +1 -1
  33. package/index33.js +1 -1
  34. package/index34.js +1 -1
  35. package/index35.js +1 -1
  36. package/index36.js +1 -1
  37. package/index38.js +1 -1
  38. package/index39.js +1 -1
  39. package/index40.js +1 -1
  40. package/index41.js +1 -1
  41. package/index42.js +1 -1
  42. package/index43.js +2 -526
  43. package/index44.js +2 -3
  44. package/index45.js +2 -66
  45. package/index46.js +2 -12
  46. package/index47.js +2 -25
  47. package/index48.js +526 -14
  48. package/index49.js +3 -5
  49. package/index50.js +66 -26
  50. package/index51.js +12 -2
  51. package/index52.js +25 -506
  52. package/index53.js +14 -79
  53. package/index54.js +4 -69
  54. package/index55.js +24 -67
  55. package/index56.js +2 -543
  56. package/index57.js +506 -2
  57. package/index58.js +79 -2
  58. package/index59.js +70 -2
  59. package/index60.js +68 -3
  60. package/index61.js +543 -2
  61. package/index62.js +2 -4
  62. package/index64.js +2 -2
  63. package/index65.js +4 -2
  64. package/index66.js +2 -48
  65. package/index67.js +4 -82
  66. package/index69.js +2 -2
  67. package/index7.js +7 -9
  68. package/index70.js +2 -2
  69. package/index71.js +48 -2
  70. package/index72.js +84 -0
  71. package/index73.js +4 -0
  72. package/index74.js +4 -0
  73. package/index75.js +4 -0
  74. package/index76.js +4 -0
  75. package/index8.js +29 -17
  76. package/index9.js +19 -25
  77. package/item/index.d.ts +1 -0
  78. package/item/index.scss +40 -0
  79. package/item/index.vue.d.ts +26 -0
  80. package/lazy-render/index.vue.d.ts +13 -29
  81. package/list-header/index.scss +1 -1
  82. package/list-header/index.vue.d.ts +9 -3
  83. package/navbar/index.vue.d.ts +10 -4
  84. package/package.json +2 -2
  85. package/page-header/index.d.ts +1 -0
  86. package/page-header/index.scss +5 -0
  87. package/page-header/index.vue.d.ts +17 -0
  88. package/plugin.d.ts +0 -1
  89. package/popover/index.scss +1 -0
  90. package/popover/index.vue.d.ts +24 -41
  91. package/qrcode/index.vue.d.ts +6 -31
  92. package/segment/injection.d.ts +0 -1
  93. package/segment/segment-btn.vue.d.ts +12 -16
  94. package/segment/segment.vue.d.ts +16 -20
  95. package/slider-captcha/index.vue.d.ts +7 -36
  96. package/spinner/index.scss +1 -0
  97. package/spinner/index.vue.d.ts +14 -33
  98. package/sudoku/sudoku-item.vue.d.ts +9 -3
  99. package/sudoku/sudoku.vue.d.ts +9 -3
  100. package/tabbar/index.d.ts +1 -0
  101. package/tabbar/index.scss +74 -0
  102. package/tabbar/index.vue.d.ts +38 -0
  103. package/table/_table.scss +1 -1
  104. package/table/table-cell.vue.d.ts +13 -24
  105. package/table/table-row.vue.d.ts +12 -17
  106. package/table/table.vue.d.ts +17 -43
  107. package/virtual-scroll/index.vue.d.ts +35 -74
package/CHANGELOG.md CHANGED
@@ -1,3 +1,34 @@
1
+ # 2.0.0 (2025-11-13)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **ui-sun/fab:** add hover effects and adjust border-radius for improved UI
6
+ - **ui-sun:** add item and tabbar components
7
+ - **ui-sun/virtual-scroll:** enhance type safety
8
+
9
+ ### 🩹 Fixes
10
+
11
+ - **ui-sun/icon:** change display property to inline-block for better layout
12
+ - **ui-sun/list-header:** update padding for improved layout
13
+ - **ui-sun/spinner:** ensure text is centered
14
+ - **ui-sun/fab:** correct button dimensions to 56px
15
+
16
+ ### ❤️ Thank You
17
+
18
+ - HyperLife1119
19
+
20
+ ## 1.6.5 (2025-11-10)
21
+
22
+ ### 🚀 Features
23
+
24
+ - **ui-sun/qrcode:** add rendered event
25
+ - **ui-sun/qrcode:** expose getDataURL funtion
26
+ - **ui-sun:** add qrcode component
27
+
28
+ ### ❤️ Thank You
29
+
30
+ - HyperLife1119
31
+
1
32
  ## 1.6.4 (2025-11-05)
2
33
 
3
34
  This was a version bump only for ui-sun to align it with other projects, there were no code changes.
@@ -1,22 +1,28 @@
1
+ type __VLS_Props = {
2
+ disabled?: boolean;
3
+ };
1
4
  declare function toggle(): void;
5
+ type __VLS_PublicProps = {
6
+ 'expanded'?: boolean;
7
+ } & __VLS_Props;
2
8
  declare function __VLS_template(): {
3
- default?(_: {}): any;
4
- content?(_: {
5
- toggle: typeof toggle;
6
- }): any;
7
- };
8
- declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
9
- expanded: import('vue').PropType<boolean>;
10
- disabled: {
11
- type: import('vue').PropType<boolean>;
9
+ attrs: Partial<{}>;
10
+ slots: {
11
+ default?(_: {}): any;
12
+ content?(_: {
13
+ toggle: typeof toggle;
14
+ }): any;
12
15
  };
13
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
14
- expanded: import('vue').PropType<boolean>;
15
- disabled: {
16
- type: import('vue').PropType<boolean>;
17
- };
18
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
19
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
16
+ refs: {};
17
+ rootEl: SVGViewElement;
18
+ };
19
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
+ "update:expanded": (value: boolean) => any;
22
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
23
+ "onUpdate:expanded"?: ((value: boolean) => any) | undefined;
24
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, SVGViewElement>;
25
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
26
  export default _default;
21
27
  type __VLS_WithTemplateSlots<T, S> = T & {
22
28
  new (): {
@@ -1,45 +1,24 @@
1
1
  import { Color } from '../typing';
2
-
2
+ type __VLS_Props = {
3
+ type?: 'solid' | 'translucent' | 'outline';
4
+ size?: 'small' | 'default' | 'large';
5
+ color: Color;
6
+ };
3
7
  declare function __VLS_template(): {
4
- default?(_: {}): any;
8
+ attrs: Partial<{}>;
9
+ slots: {
10
+ default?(_: {}): any;
11
+ };
12
+ refs: {};
13
+ rootEl: SVGViewElement;
5
14
  };
6
- declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
7
- type?: "solid" | "translucent" | "outline";
8
- size?: "small" | "default" | "large";
9
- color: Color;
10
- }>, {
11
- type: string;
12
- size: string;
13
- }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
14
- type?: "solid" | "translucent" | "outline";
15
- size?: "small" | "default" | "large";
16
- color: Color;
17
- }>, {
18
- type: string;
19
- size: string;
20
- }>>> & Readonly<{}>, {
15
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
21
17
  type: "solid" | "translucent" | "outline";
22
18
  size: "small" | "default" | "large";
23
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
24
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
19
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, SVGViewElement>;
20
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
25
21
  export default _default;
26
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
27
- type __VLS_TypePropsToRuntimeProps<T> = {
28
- [K in keyof T]-?: {} extends Pick<T, K> ? {
29
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
30
- } : {
31
- type: import('vue').PropType<T[K]>;
32
- required: true;
33
- };
34
- };
35
- type __VLS_WithDefaults<P, D> = {
36
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
37
- default: D[K];
38
- }> : P[K];
39
- };
40
- type __VLS_Prettify<T> = {
41
- [K in keyof T]: T[K];
42
- } & {};
43
22
  type __VLS_WithTemplateSlots<T, S> = T & {
44
23
  new (): {
45
24
  $slots: S;
@@ -1,37 +1,11 @@
1
1
  import { Color } from '../typing';
2
-
3
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ type __VLS_Props = {
4
3
  value: number;
5
4
  size: string;
6
5
  strokeWidth: string;
7
6
  color?: Color;
8
- }>, {
9
- color: string;
10
- }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
11
- value: number;
12
- size: string;
13
- strokeWidth: string;
14
- color?: Color;
15
- }>, {
16
- color: string;
17
- }>>> & Readonly<{}>, {
7
+ };
8
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
18
9
  color: Color;
19
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
10
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, SVGViewElement>;
20
11
  export default _default;
21
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
22
- type __VLS_TypePropsToRuntimeProps<T> = {
23
- [K in keyof T]-?: {} extends Pick<T, K> ? {
24
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
25
- } : {
26
- type: import('vue').PropType<T[K]>;
27
- required: true;
28
- };
29
- };
30
- type __VLS_WithDefaults<P, D> = {
31
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
32
- default: D[K];
33
- }> : P[K];
34
- };
35
- type __VLS_Prettify<T> = {
36
- [K in keyof T]: T[K];
37
- } & {};
@@ -1,6 +1,12 @@
1
1
  declare function __VLS_template(): {
2
- default?(_: {}): any;
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ rootEl: SVGViewElement;
3
8
  };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
4
10
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
11
  offsetY: {
6
12
  type: (NumberConstructor | StringConstructor)[];
@@ -13,8 +19,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
13
19
  };
14
20
  }>> & Readonly<{}>, {
15
21
  offsetY: string | number;
16
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
17
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
22
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, SVGViewElement>;
23
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
18
24
  export default _default;
19
25
  type __VLS_WithTemplateSlots<T, S> = T & {
20
26
  new (): {
package/fab/fab.vue.d.ts CHANGED
@@ -1,8 +1,14 @@
1
1
  declare function __VLS_template(): {
2
- default?(_: {}): any;
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ rootEl: SVGViewElement;
3
8
  };
4
- declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
5
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, SVGViewElement>;
11
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
6
12
  export default _default;
7
13
  type __VLS_WithTemplateSlots<T, S> = T & {
8
14
  new (): {
package/fab/index.scss CHANGED
@@ -3,14 +3,22 @@
3
3
  flex-direction: column;
4
4
  justify-content: center;
5
5
  align-items: center;
6
- width: 54px;
7
- height: 54px;
8
- border-radius: 20px;
6
+ width: 56px;
7
+ height: 56px;
8
+ border-radius: 18px;
9
+ box-shadow:
10
+ 0 10px 15px -3px rgb(0 0 0 / 0.1),
11
+ 0 4px 6px -4px rgb(0 0 0 / 0.1);
12
+ transition: transform ease-out 0.2s;
9
13
 
10
14
  &:not(:last-child) {
11
15
  margin-bottom: 10px;
12
16
  }
13
17
 
18
+ &.hover {
19
+ transform: scale(1.1);
20
+ }
21
+
14
22
  &-group {
15
23
  position: fixed;
16
24
  right: calc(15px + var(--safe-right));
package/icon/index.scss CHANGED
@@ -1,9 +1,10 @@
1
1
  @use "./ionicon";
2
2
 
3
3
  .sun-icon {
4
- display: inline;
4
+ display: inline-block;
5
5
  contain: strict;
6
- color: currentColor;
7
- font-size: 1em;
6
+ line-height: 1;
7
+ height: 1em;
8
+ width: 1em;
8
9
  box-sizing: content-box;
9
10
  }
@@ -1,24 +1,5 @@
1
- declare function __VLS_template(): {
2
- default?(_: {}): any;
3
- };
4
- declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
5
- name: string;
6
- }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
1
+ type __VLS_Props = {
7
2
  name: string;
8
- }>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
9
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
10
- export default _default;
11
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
12
- type __VLS_TypePropsToRuntimeProps<T> = {
13
- [K in keyof T]-?: {} extends Pick<T, K> ? {
14
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
15
- } : {
16
- type: import('vue').PropType<T[K]>;
17
- required: true;
18
- };
19
- };
20
- type __VLS_WithTemplateSlots<T, S> = T & {
21
- new (): {
22
- $slots: S;
23
- };
24
3
  };
4
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, SVGViewElement>;
5
+ export default _default;
package/index.d.ts CHANGED
@@ -3,9 +3,11 @@ export * from './chip';
3
3
  export * from './circular-progress';
4
4
  export * from './fab';
5
5
  export * from './icon';
6
+ export * from './item';
6
7
  export * from './lazy-render';
7
8
  export * from './list-header';
8
9
  export * from './navbar';
10
+ export * from './page-header';
9
11
  export * from './plugin';
10
12
  export * from './popover';
11
13
  export * from './qrcode';
@@ -13,5 +15,6 @@ export * from './segment';
13
15
  export * from './slider-captcha';
14
16
  export * from './spinner';
15
17
  export * from './sudoku';
18
+ export * from './tabbar';
16
19
  export * from './table';
17
20
  export * from './virtual-scroll';
package/index.js CHANGED
@@ -1,46 +1,52 @@
1
- import { SolarSun as o } from "./index2.js";
1
+ import { SolarSun as a } from "./index2.js";
2
2
  import { default as t } from "./index3.js";
3
3
  import { default as f } from "./index4.js";
4
4
  import { default as S } from "./index5.js";
5
- import { default as d } from "./index6.js";
5
+ import { default as l } from "./index6.js";
6
6
  import { default as m } from "./index7.js";
7
7
  import { default as x } from "./index8.js";
8
- import { default as i } from "./index9.js";
9
- import { default as C } from "./index10.js";
8
+ import { default as c } from "./index9.js";
9
+ import { default as g } from "./index10.js";
10
10
  import { default as T } from "./index11.js";
11
- import { default as k } from "./index12.js";
12
- import { default as F } from "./index13.js";
13
- import { default as L } from "./index14.js";
14
- import { default as R } from "./index15.js";
15
- import { default as y } from "./index16.js";
16
- import { default as A } from "./index17.js";
17
- import { default as G } from "./index18.js";
11
+ import { default as P } from "./index12.js";
12
+ import { default as k } from "./index13.js";
13
+ import { default as F } from "./index14.js";
14
+ import { default as L } from "./index15.js";
15
+ import { default as w } from "./index16.js";
16
+ import { default as z } from "./index17.js";
17
+ import { default as B } from "./index18.js";
18
18
  import { default as N } from "./index19.js";
19
19
  import { default as V } from "./index20.js";
20
20
  import { default as q } from "./index21.js";
21
21
  import { default as E } from "./index22.js";
22
22
  import { default as K } from "./index23.js";
23
+ import { default as O } from "./index24.js";
24
+ import { default as W } from "./index25.js";
25
+ import { default as Y } from "./index26.js";
23
26
  export {
24
- o as SolarSun,
27
+ a as SolarSun,
25
28
  t as SunAccordion,
26
29
  f as SunChip,
27
30
  S as SunCircularProgress,
28
- q as SunFab,
29
- d as SunFabGroup,
31
+ K as SunFab,
32
+ l as SunFabGroup,
30
33
  m as SunIcon,
31
- x as SunLazyRender,
32
- E as SunListHeader,
33
- i as SunNavbar,
34
- C as SunPopover,
35
- T as SunQrcode,
34
+ x as SunItem,
35
+ c as SunLazyRender,
36
+ O as SunListHeader,
37
+ g as SunNavbar,
38
+ W as SunPageHeader,
39
+ T as SunPopover,
40
+ P as SunQrcode,
36
41
  F as SunSegment,
37
42
  k as SunSegmentBtn,
38
43
  L as SunSliderCaptcha,
39
- R as SunSpinner,
40
- y as SunSudoku,
41
- K as SunSudokuItem,
42
- N as SunTb,
43
- A as SunTbCell,
44
- G as SunTbRow,
45
- V as SunVirtualScroll
44
+ w as SunSpinner,
45
+ z as SunSudoku,
46
+ Y as SunSudokuItem,
47
+ B as SunTabbar,
48
+ q as SunTb,
49
+ N as SunTbCell,
50
+ V as SunTbRow,
51
+ E as SunVirtualScroll
46
52
  };
package/index10.js CHANGED
@@ -1,39 +1,30 @@
1
- import { defineComponent as m, mergeModels as d, useModel as v, computed as t, renderSlot as w, createElementVNode as g, mergeProps as k, withModifiers as y, normalizeClass as $, normalizeStyle as h, openBlock as b, createElementBlock as B } from "vue";
2
- const p = w, n = g, M = k, z = y, E = $, S = h, C = b, N = B, T = /* @__PURE__ */ m({
1
+ import { defineComponent as i, renderSlot as d, createElementVNode as s, openBlock as c, createElementBlock as l } from "vue";
2
+ import { withPixel as t } from "@solar-kit/core";
3
+ import { getNavbarRect as p } from "@solar-taro/core";
4
+ const a = d, o = s, g = c, m = l, v = { class: "sun-navbar-inner" }, b = { class: "sun-navbar-center" }, k = /* @__PURE__ */ i({
3
5
  __name: "index",
4
- props: /* @__PURE__ */ d({
5
- placement: {},
6
- offset: { default: "6px" },
7
- background: { default: "rgba(0, 0, 0, 0.5)" },
8
- color: { default: "#fff" }
9
- }, {
10
- show: { type: Boolean },
11
- showModifiers: {}
12
- }),
13
- emits: ["update:show"],
14
- setup(r) {
15
- const o = r, l = v(r, "show"), a = t(() => ["left", "right"].includes(o.placement[0])), u = t(() => ["top", "bottom"].includes(o.placement[1])), f = t(() => a.value ? o.offset : "0px"), i = t(() => u.value ? o.offset : "0px");
16
- return (e, s) => (C(), N("view", {
17
- class: E(["sun-popover", [{ "sun-popover-show": l.value }, `sun-popover-x-${e.placement[0]}`, `sun-popover-y-${e.placement[1]}`]]),
18
- style: S({ "--popover-x-offset": f.value, "--popover-y-offset": i.value, "--popover-background": e.background }),
19
- onTap: z((c) => !1, ["stop"])
6
+ setup(_) {
7
+ const e = p(), r = {
8
+ "--navbar-height": t(e.height),
9
+ "--navbar-content-height": t(e.buttonHeight),
10
+ "--navbar-padding-top": t(e.paddingTop),
11
+ "--navbar-padding-bottom": t(e.paddingBottom),
12
+ "--navbar-padding-left": t(e.paddingLeft),
13
+ "--navbar-padding-right": t(e.paddingRight)
14
+ };
15
+ return (n, h) => (g(), m("view", {
16
+ class: "sun-navbar",
17
+ style: r
20
18
  }, [
21
- n("view", {
22
- class: "sun-popover-trigger",
23
- onTap: s[0] || (s[0] = (c) => l.value = !l.value)
24
- }, [
25
- p(e.$slots, "default")
26
- ], 32),
27
- n("view", M(e.$attrs, {
28
- class: "sun-popover-container",
29
- style: { color: e.color }
30
- }), [
31
- s[1] || (s[1] = n("view", { class: "sun-popover-arrow" }, null, -1)),
32
- p(e.$slots, "content")
33
- ], 16)
34
- ], 38));
19
+ o("view", v, [
20
+ a(n.$slots, "default"),
21
+ o("view", b, [
22
+ a(n.$slots, "center")
23
+ ])
24
+ ])
25
+ ]));
35
26
  }
36
27
  });
37
28
  export {
38
- T as default
29
+ k as default
39
30
  };
package/index11.js CHANGED
@@ -1,81 +1,39 @@
1
- import { defineComponent as C, watch as I, onMounted as L, onUnmounted as M, createElementVNode as k, unref as w, openBlock as z, createElementBlock as R } from "vue";
2
- import { createSelectorQuery as y, getWindowInfo as Q, previewImage as S } from "@tarojs/taro";
3
- import { QrCode as U, QrCodeEcc as a } from "./index43.js";
4
- const h = k, A = w, B = z, D = R;
5
- let T = 1;
6
- const N = /* @__PURE__ */ C({
1
+ import { defineComponent as m, mergeModels as d, useModel as v, computed as t, renderSlot as w, createElementVNode as g, mergeProps as k, withModifiers as y, normalizeClass as $, normalizeStyle as h, openBlock as b, createElementBlock as B } from "vue";
2
+ const p = w, n = g, M = k, z = y, E = $, S = h, C = b, N = B, T = /* @__PURE__ */ m({
7
3
  __name: "index",
8
- props: {
9
- value: {},
10
- color: { default: "#000000" },
11
- backgroundColor: { default: "transparent" },
12
- level: { default: "M" }
13
- },
14
- emits: ["rendered"],
15
- setup(m, { expose: v, emit: g }) {
16
- let n, i, l, s = !1;
17
- const u = `sun-qrcode-captcha-${T++}`, x = {
18
- L: a.LOW,
19
- M: a.MEDIUM,
20
- Q: a.QUARTILE,
21
- H: a.HIGH
22
- }, _ = g, c = m;
23
- v({
24
- getDataURL: p
25
- });
26
- function d() {
27
- setTimeout(() => {
28
- y().select(`#${u}`).fields({ node: !0, size: !0 }).exec(([{ node: t, width: e, height: r }]) => {
29
- if (s) return;
30
- if (!r || !e)
31
- return d();
32
- const o = Q().pixelRatio;
33
- n = t, l = n.getContext("2d"), i = e, n.width = e * o, n.height = r * o, l.scale(o, o), f();
34
- });
35
- }, 50);
36
- }
37
- function f() {
38
- const t = U.encodeText(c.value, x[c.level]), e = i / (t.size + 2);
39
- l.fillStyle = c.backgroundColor, l.fillRect(0, 0, n.width, n.height), l.fillStyle = c.color;
40
- for (let r = 0; r < t.size; r++)
41
- for (let o = 0; o < t.size; o++)
42
- t.getModule(o, r) && l.fillRect(
43
- o * e + e,
44
- // +moduleSize 留出边距
45
- r * e + e,
46
- e,
47
- e
48
- );
49
- _("rendered");
50
- }
51
- function p() {
52
- return n.toDataURL("image/png", 1);
53
- }
54
- function E() {
55
- const t = p();
56
- S({
57
- current: t,
58
- urls: [t]
59
- });
60
- }
61
- return I(() => c.value, () => {
62
- l && f();
63
- }), L(() => {
64
- d();
65
- }), M(() => {
66
- s = !0;
67
- }), (t, e) => (B(), D("view", {
68
- class: "sun-qrcode",
69
- onTap: e[0] || (e[0] = (r) => A(n) && E())
4
+ props: /* @__PURE__ */ d({
5
+ placement: {},
6
+ offset: { default: "6px" },
7
+ background: { default: "rgba(0, 0, 0, 0.5)" },
8
+ color: { default: "#fff" }
9
+ }, {
10
+ show: { type: Boolean },
11
+ showModifiers: {}
12
+ }),
13
+ emits: ["update:show"],
14
+ setup(r) {
15
+ const o = r, l = v(r, "show"), a = t(() => ["left", "right"].includes(o.placement[0])), u = t(() => ["top", "bottom"].includes(o.placement[1])), f = t(() => a.value ? o.offset : "0px"), i = t(() => u.value ? o.offset : "0px");
16
+ return (e, s) => (C(), N("view", {
17
+ class: E(["sun-popover", [{ "sun-popover-show": l.value }, `sun-popover-x-${e.placement[0]}`, `sun-popover-y-${e.placement[1]}`]]),
18
+ style: S({ "--popover-x-offset": f.value, "--popover-y-offset": i.value, "--popover-background": e.background }),
19
+ onTap: z((c) => !1, ["stop"])
70
20
  }, [
71
- h("canvas", {
72
- id: u,
73
- type: "2d",
74
- class: "sun-slider-captcha-canvas"
75
- })
76
- ], 32));
21
+ n("view", {
22
+ class: "sun-popover-trigger",
23
+ onTap: s[0] || (s[0] = (c) => l.value = !l.value)
24
+ }, [
25
+ p(e.$slots, "default")
26
+ ], 32),
27
+ n("view", M(e.$attrs, {
28
+ class: "sun-popover-container",
29
+ style: { color: e.color }
30
+ }), [
31
+ s[1] || (s[1] = n("view", { class: "sun-popover-arrow" }, null, -1)),
32
+ p(e.$slots, "content")
33
+ ], 16)
34
+ ], 38));
77
35
  }
78
36
  });
79
37
  export {
80
- N as default
38
+ T as default
81
39
  };