@solar-taro/ui-sun 1.1.1 → 1.1.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.
package/index9.js CHANGED
@@ -1,60 +1,28 @@
1
- import { defineComponent as l, renderSlot as s, createElementVNode as a, mergeProps as f, withModifiers as p, normalizeClass as i, normalizeStyle as u, openBlock as d, createElementBlock as c } from "vue";
2
- const n = s, t = a, v = f, m = p, y = i, g = u, w = d, S = c, x = { class: "sun-popover-trigger" }, k = /* @__PURE__ */ l({
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: {
5
- /** 是否显示 */
6
- show: {
7
- type: Boolean,
8
- default: void 0
9
- },
10
- /** popover的横轴位置:left,right,start,end,center */
11
- x: {
12
- type: String,
13
- default: "left"
14
- },
15
- /** popover的纵轴位置:top,bottom,start,end,center */
16
- y: {
17
- type: String,
18
- default: "center"
19
- },
20
- /** 横轴偏移度 */
21
- offsetX: {
22
- type: String,
23
- default: "7.5rpx"
24
- },
25
- /** 纵轴偏移度 */
26
- offsetY: {
27
- type: String,
28
- default: "7.5rpx"
29
- },
30
- /** popover背景 */
31
- bg: {
32
- type: String,
33
- default: "#fff"
34
- },
35
- /** popover文字颜色 */
36
- color: {
37
- type: String,
38
- default: "#000"
39
- }
40
- },
41
- setup(e) {
42
- return (o, r) => (w(), S("view", {
43
- class: y(["sun-popover", [{ "sun-popover-show": e.show }, `sun-popover-x-${e.x}`, `sun-popover-y-${e.y}`]]),
44
- style: g({ "--popover-x-offset": e.offsetX, "--popover-y-offset": e.offsetY, "--popover-background": e.bg }),
45
- onTap: m(($) => !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
46
18
  }, [
47
- t("view", x, [
48
- n(o.$slots, "default")
49
- ]),
50
- t("view", v(o.$attrs, {
51
- class: "sun-popover-container",
52
- style: { color: e.color }
53
- }), [
54
- r[0] || (r[0] = t("view", { class: "sun-popover-arrow" }, null, -1)),
55
- n(o.$slots, "content")
56
- ], 16)
57
- ], 38));
19
+ o("view", v, [
20
+ a(n.$slots, "default"),
21
+ o("view", b, [
22
+ a(n.$slots, "center")
23
+ ])
24
+ ])
25
+ ]));
58
26
  }
59
27
  });
60
28
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solar-taro/ui-sun",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",
package/typing.d.ts ADDED
@@ -0,0 +1 @@
1
+ export type Color = 'primary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | 'secondary';