@nmorph/nmorph-ui-kit 2.2.29 → 2.2.31

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.
@@ -1 +1 @@
1
- .nmorph-badge{position:relative;display:inline-block;height:fit-content;--nmorph-badge-dot-size: 4px;--nmorph-badge-ribbon-height: 24px;--nmorph-badge-ribbon-corner-size: 62px;--nmorph-badge-ribbon-width: 116px;--nmorph-badge-ribbon-offset-x: 0px;--nmorph-badge-ribbon-offset-y: 0px}.nmorph-badge .nmorph-badge__container{position:absolute;display:inline-flex;justify-content:center;align-items:center;background:var(--nmorph-badge-color);border-radius:var(--default-border-radius);opacity:1}.nmorph-badge.nmorph-badge--tag{position:static;display:inline-flex}.nmorph-badge .nmorph-badge__container--tag{position:static}.nmorph-badge .nmorph-badge__content{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;min-width:calc(1em * var(--line-height-regular) + 4px);padding:2px 4px;color:var(--nmorph-light-shade-color);font-size:var(--font-size-base);line-height:var(--line-height-regular);text-align:center}.nmorph-badge.nmorph-badge--tiny .nmorph-badge__content{font-size:var(--font-size-tiny)}.nmorph-badge.nmorph-badge--extra-small .nmorph-badge__content{font-size:var(--font-size-extra-small)}.nmorph-badge .nmorph-badge__container--hidden{opacity:0}.nmorph-badge .nmorph-badge__ribbon-frame{position:absolute;inset:0;overflow:hidden;border-radius:var(--default-border-radius);pointer-events:none}.nmorph-badge .nmorph-badge__ribbon-corner{position:absolute;width:var(--nmorph-badge-ribbon-corner-size);height:var(--nmorph-badge-ribbon-corner-size)}.nmorph-badge .nmorph-badge__container--ribbon{top:50%;left:50%;width:var(--nmorph-badge-ribbon-width);height:var(--nmorph-badge-ribbon-height);border-radius:0;box-shadow:var(--nmorph-shadow-outset)}.nmorph-badge .nmorph-badge__container--ribbon .nmorph-badge__content{width:100%;min-width:0;height:100%;padding:0 var(--indentation-03);overflow:hidden;font-weight:600;font-size:var(--font-size-extra-small);line-height:1;white-space:nowrap;text-overflow:ellipsis}.nmorph-badge .nmorph-badge__ribbon-corner--top-left{top:var(--nmorph-badge-ribbon-offset-y);left:var(--nmorph-badge-ribbon-offset-x)}.nmorph-badge .nmorph-badge__ribbon-corner--top-left .nmorph-badge__container--ribbon{transform:translate(-50%,-50%) rotate(-45deg)}.nmorph-badge .nmorph-badge__ribbon-corner--top-right{top:var(--nmorph-badge-ribbon-offset-y);right:var(--nmorph-badge-ribbon-offset-x)}.nmorph-badge .nmorph-badge__ribbon-corner--top-right .nmorph-badge__container--ribbon{transform:translate(-50%,-50%) rotate(45deg)}.nmorph-badge .nmorph-badge__ribbon-corner--bottom-left{bottom:var(--nmorph-badge-ribbon-offset-y);left:var(--nmorph-badge-ribbon-offset-x)}.nmorph-badge .nmorph-badge__ribbon-corner--bottom-left .nmorph-badge__container--ribbon{transform:translate(-50%,-50%) rotate(45deg)}.nmorph-badge .nmorph-badge__ribbon-corner--bottom-right{right:var(--nmorph-badge-ribbon-offset-x);bottom:var(--nmorph-badge-ribbon-offset-y)}.nmorph-badge .nmorph-badge__ribbon-corner--bottom-right .nmorph-badge__container--ribbon{transform:translate(-50%,-50%) rotate(-45deg)}.nmorph-badge .nmorph-badge__dot{width:var(--nmorph-badge-dot-size);height:var(--nmorph-badge-dot-size);border-radius:var(--border-radius-circular)}.nmorph-badge.nmorph-badge--tiny{--nmorph-badge-dot-size: 3px;--nmorph-badge-ribbon-height: 18px;--nmorph-badge-ribbon-corner-size: 50px;--nmorph-badge-ribbon-width: 92px}.nmorph-badge.nmorph-badge--extra-small{--nmorph-badge-dot-size: 4px;--nmorph-badge-ribbon-height: 20px;--nmorph-badge-ribbon-corner-size: 56px;--nmorph-badge-ribbon-width: 104px}
1
+ .nmorph-badge{position:relative;display:inline-block;height:fit-content;--nmorph-badge-dot-size: 4px;--nmorph-badge-ribbon-height: 24px;--nmorph-badge-ribbon-corner-size: 62px;--nmorph-badge-ribbon-width: 116px;--nmorph-badge-ribbon-offset-x: 0px;--nmorph-badge-ribbon-offset-y: 0px}.nmorph-badge .nmorph-badge__container{position:absolute;display:inline-flex;justify-content:center;align-items:center;background:var(--nmorph-badge-color);border-radius:var(--default-border-radius);opacity:1}.nmorph-badge.nmorph-badge--tag{position:static;display:inline-flex}.nmorph-badge .nmorph-badge__container--tag{position:static}.nmorph-badge .nmorph-badge__content{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;min-width:calc(1em * var(--line-height-regular) + 4px);padding:2px 4px;color:var(--nmorph-light-shade-color);font-size:var(--font-size-base);line-height:var(--line-height-regular);text-align:center}.nmorph-badge.nmorph-badge--tiny .nmorph-badge__content{font-size:var(--font-size-tiny)}.nmorph-badge.nmorph-badge--extra-small .nmorph-badge__content{font-size:var(--font-size-extra-small)}.nmorph-badge .nmorph-badge__container--hidden{opacity:0}.nmorph-badge .nmorph-badge__ribbon-frame{position:absolute;inset:0;overflow:hidden;border-radius:var(--default-border-radius);pointer-events:none}.nmorph-badge .nmorph-badge__ribbon-corner{position:absolute;width:var(--nmorph-badge-ribbon-corner-size);height:var(--nmorph-badge-ribbon-corner-size)}.nmorph-badge .nmorph-badge__container--ribbon{top:50%;left:50%;width:var(--nmorph-badge-ribbon-width);height:var(--nmorph-badge-ribbon-height);border-radius:calc(var(--nmorph-badge-ribbon-height) / 2);box-shadow:var(--nmorph-shadow-outset)}.nmorph-badge .nmorph-badge__container--ribbon .nmorph-badge__content{width:100%;min-width:0;height:100%;padding:0 var(--indentation-03);overflow:hidden;font-weight:600;font-size:var(--font-size-extra-small);line-height:1;white-space:nowrap;text-overflow:ellipsis}.nmorph-badge .nmorph-badge__ribbon-corner--top-left{top:var(--nmorph-badge-ribbon-offset-y);left:var(--nmorph-badge-ribbon-offset-x)}.nmorph-badge .nmorph-badge__ribbon-corner--top-left .nmorph-badge__container--ribbon{transform:translate(-50%,-50%) rotate(-45deg)}.nmorph-badge .nmorph-badge__ribbon-corner--top-right{top:var(--nmorph-badge-ribbon-offset-y);right:var(--nmorph-badge-ribbon-offset-x)}.nmorph-badge .nmorph-badge__ribbon-corner--top-right .nmorph-badge__container--ribbon{transform:translate(-50%,-50%) rotate(45deg)}.nmorph-badge .nmorph-badge__ribbon-corner--bottom-left{bottom:var(--nmorph-badge-ribbon-offset-y);left:var(--nmorph-badge-ribbon-offset-x)}.nmorph-badge .nmorph-badge__ribbon-corner--bottom-left .nmorph-badge__container--ribbon{transform:translate(-50%,-50%) rotate(45deg)}.nmorph-badge .nmorph-badge__ribbon-corner--bottom-right{right:var(--nmorph-badge-ribbon-offset-x);bottom:var(--nmorph-badge-ribbon-offset-y)}.nmorph-badge .nmorph-badge__ribbon-corner--bottom-right .nmorph-badge__container--ribbon{transform:translate(-50%,-50%) rotate(-45deg)}.nmorph-badge .nmorph-badge__ribbon-corner--flat{width:var(--nmorph-badge-ribbon-width);height:var(--nmorph-badge-ribbon-height)}.nmorph-badge .nmorph-badge__ribbon-corner--flat .nmorph-badge__container--ribbon{position:relative;top:auto;left:auto;transform:none}.nmorph-badge .nmorph-badge__dot{width:var(--nmorph-badge-dot-size);height:var(--nmorph-badge-dot-size);border-radius:var(--border-radius-circular)}.nmorph-badge.nmorph-badge--tiny{--nmorph-badge-dot-size: 3px;--nmorph-badge-ribbon-height: 18px;--nmorph-badge-ribbon-corner-size: 50px;--nmorph-badge-ribbon-width: 92px}.nmorph-badge.nmorph-badge--extra-small{--nmorph-badge-dot-size: 4px;--nmorph-badge-ribbon-height: 20px;--nmorph-badge-ribbon-corner-size: 56px;--nmorph-badge-ribbon-width: 104px}
@@ -1,13 +1,14 @@
1
1
  import './NmorphBadge.css';
2
- import { defineComponent as N, computed as t, ref as b, onMounted as I, watch as T, nextTick as V } from "vue";
2
+ import { defineComponent as C, computed as t, ref as b, onMounted as N, watch as I, nextTick as V } from "vue";
3
3
  import { useModifiers as p } from "../../../utils/create-modifiers.js";
4
- const F = /* @__PURE__ */ N({
4
+ const F = /* @__PURE__ */ C({
5
5
  __name: "NmorphBadge",
6
6
  props: {
7
7
  value: { type: [Number, String], required: !1, default: void 0 },
8
8
  max: { type: Number, required: !1, default: 99 },
9
9
  type: { type: String, required: !1, default: "default" },
10
10
  ribbonCorner: { type: String, required: !1, default: "top-right" },
11
+ ribbonTilt: { type: Boolean, required: !1, default: !0 },
11
12
  isDot: { type: Boolean, required: !1, default: !1 },
12
13
  isTag: { type: Boolean, required: !1, default: !1 },
13
14
  hidden: { type: Boolean, required: !1, default: !1 },
@@ -21,13 +22,13 @@ const F = /* @__PURE__ */ N({
21
22
  },
22
23
  setup(m, { expose: g }) {
23
24
  g();
24
- const e = m, o = t(() => e.type !== "default" ? e.type : e.isDot ? "dot" : e.isTag ? "tag" : "default"), c = t(() => o.value === "dot"), n = t(() => o.value === "tag"), a = t(() => o.value === "ribbon"), h = t(
25
+ const e = m, o = t(() => e.type !== "default" ? e.type : e.isDot ? "dot" : e.isTag ? "tag" : "default"), c = t(() => o.value === "dot"), n = t(() => o.value === "tag"), r = t(() => o.value === "ribbon"), h = t(
25
26
  () => p({
26
27
  "nmorph-badge": [
27
28
  `${e.hidden && "hidden"}`,
28
29
  `${n.value && "tag"}`,
29
- `${a.value && "ribbon"}`,
30
- `${a.value && `ribbon-${e.ribbonCorner}`}`,
30
+ `${r.value && "ribbon"}`,
31
+ `${r.value && `ribbon-${e.ribbonCorner}`}`,
31
32
  e.size
32
33
  ]
33
34
  })
@@ -36,40 +37,48 @@ const F = /* @__PURE__ */ N({
36
37
  "nmorph-badge__container": [
37
38
  `${e.hidden && "hidden"}`,
38
39
  `${n.value && "tag"}`,
39
- `${a.value && "ribbon"}`,
40
- `${a.value && `ribbon-${e.ribbonCorner}`}`
40
+ `${r.value && "ribbon"}`,
41
+ `${r.value && `ribbon-${e.ribbonCorner}`}`
41
42
  ]
42
43
  })
43
44
  ), $ = t(
44
45
  () => p({
45
- "nmorph-badge__ribbon-corner": [`${e.ribbonCorner}`]
46
+ "nmorph-badge__ribbon-corner": [`${e.ribbonCorner}`, `${!e.ribbonTilt && "flat"}`]
46
47
  })
47
48
  ), q = t(() => typeof Number(e.value) == "number" && Number(e.value) > e.max ? `${e.max}+` : e.value), v = t(() => e.hideOnFalsyValue && !e.value), _ = t(() => (c.value || e.value !== void 0) && !v.value), u = t(() => {
48
- const r = `${(s?.value / 2 + e.offsetX) * -1}px`, C = `${(d?.value / 2 + e.offsetY) * -1}px`;
49
+ const a = `${(s?.value / 2 + e.offsetX) * -1}px`, B = `${(d?.value / 2 + e.offsetY) * -1}px`;
49
50
  return {
50
- x: r,
51
- y: C
51
+ x: a,
52
+ y: B
52
53
  };
53
- }), z = t(() => n.value || a.value ? {
54
+ }), z = t(() => n.value || r.value ? {
54
55
  zIndex: e.zIndex
55
56
  } : {
56
57
  right: u.value.x,
57
58
  top: u.value.y,
58
59
  zIndex: e.zIndex
59
- }), i = (r) => typeof r == "number" ? `${r}px` : r, l = b(null), s = b(0), d = b(0), S = t(() => ({
60
+ }), i = (a) => typeof a == "number" ? `${a}px` : a, l = b(null), s = b(0), d = b(0), S = t(() => ({
60
61
  "--nmorph-badge-color": e.color,
61
62
  ...e.offsetX !== 0 && { "--nmorph-badge-ribbon-offset-x": i(e.offsetX) },
62
63
  ...e.offsetY !== 0 && { "--nmorph-badge-ribbon-offset-y": i(e.offsetY) }
63
64
  })), f = async () => {
64
- await V(), !(!l.value || n.value || a.value) && (s.value = l.value.clientWidth, d.value = l.value.clientHeight);
65
- }, B = t(() => ({
65
+ await V(), !(!l.value || n.value || r.value) && (s.value = l.value.clientWidth, d.value = l.value.clientHeight);
66
+ }, T = t(() => ({
66
67
  zIndex: e.zIndex
67
68
  }));
68
- I(f), T(
69
- () => [e.value, e.max, o.value, e.ribbonCorner, e.size, e.hideOnFalsyValue],
69
+ N(f), I(
70
+ () => [
71
+ e.value,
72
+ e.max,
73
+ o.value,
74
+ e.ribbonCorner,
75
+ e.ribbonTilt,
76
+ e.size,
77
+ e.hideOnFalsyValue
78
+ ],
70
79
  f
71
80
  );
72
- const y = { props: e, resolvedType: o, isDotType: c, isTagType: n, isRibbon: a, modifiers: h, containerModifiers: x, ribbonCornerModifiers: $, displayValue: q, shouldHideOnFalsyValue: v, shouldShowBadge: _, appliedOffset: u, containerStyle: z, getCssSize: i, badge: l, badgeWidth: s, badgeHeight: d, styles: S, updateBadgeSize: f, ribbonFrameStyle: B };
81
+ const y = { props: e, resolvedType: o, isDotType: c, isTagType: n, isRibbon: r, modifiers: h, containerModifiers: x, ribbonCornerModifiers: $, displayValue: q, shouldHideOnFalsyValue: v, shouldShowBadge: _, appliedOffset: u, containerStyle: z, getCssSize: i, badge: l, badgeWidth: s, badgeHeight: d, styles: S, updateBadgeSize: f, ribbonFrameStyle: T };
73
82
  return Object.defineProperty(y, "__isScriptSetup", { enumerable: !1, value: !0 }), y;
74
83
  }
75
84
  });
@@ -1 +1 @@
1
- .nmorph-callout{--callout-color: var(--nmorph-accent-color);position:relative;padding:8px 12px;overflow:hidden;border-radius:4px}.nmorph-callout:before{position:absolute;top:0;left:0;width:3px;height:100%;background:var(--callout-color);content:""}.nmorph-callout:after{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--callout-color);opacity:.2;content:""}.nmorph-callout.nmorph-callout--warning{--callout-color: var(--nmorph-warn-color)}.nmorph-callout.nmorph-callout--success{--callout-color: var(--nmorph-success-color)}.nmorph-callout.nmorph-callout--error{--callout-color: var(--nmorph-error-color)}.nmorph-callout .nmorph-callout__title{margin-bottom:8px;font-weight:600;font-size:var(--font-size-medium);line-height:var(--line-height-loose)}.nmorph-callout .nmorph-callout__title,.nmorph-callout .nmorph-callout__content{position:relative;z-index:1}.nmorph-callout .nmorph-callout__content{font-weight:400;font-size:var(--font-size-extra-small);line-height:var(--line-height-regular);white-space:pre-wrap}
1
+ .nmorph-callout{--callout-color: var(--nmorph-accent-color);--callout-padding: var(--indentation-03) var(--indentation-04);--callout-border-radius: var(--default-border-radius);--callout-accent-width: var(--indentation-02);--callout-title-gap: var(--indentation-03);--callout-title-font-size: var(--font-size-medium);--callout-content-font-size: var(--font-size-extra-small);position:relative;padding:var(--callout-padding);overflow:hidden;border-radius:var(--callout-border-radius)}.nmorph-callout:before{position:absolute;top:0;left:0;width:var(--callout-accent-width);height:100%;background:var(--callout-color);content:""}.nmorph-callout:after{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--callout-color);opacity:.2;content:""}.nmorph-callout.nmorph-callout--warning{--callout-color: var(--nmorph-warn-color)}.nmorph-callout.nmorph-callout--success{--callout-color: var(--nmorph-success-color)}.nmorph-callout.nmorph-callout--error{--callout-color: var(--nmorph-error-color)}.nmorph-callout .nmorph-callout__title{margin-bottom:var(--callout-title-gap);font-weight:600;font-size:var(--callout-title-font-size);line-height:var(--line-height-loose)}.nmorph-callout .nmorph-callout__title,.nmorph-callout .nmorph-callout__content{position:relative;z-index:1}.nmorph-callout .nmorph-callout__content{font-weight:400;font-size:var(--callout-content-font-size);line-height:var(--line-height-regular);white-space:pre-wrap}
@@ -1,21 +1,33 @@
1
1
  import './NmorphCallout.css';
2
- import { defineComponent as n, computed as p } from "vue";
3
- const i = /* @__PURE__ */ n({
2
+ import { defineComponent as l, computed as d } from "vue";
3
+ const s = /* @__PURE__ */ l({
4
4
  __name: "NmorphCallout",
5
5
  props: {
6
6
  type: { type: String, required: !1, default: "info" },
7
7
  title: { type: String, required: !1, default: "" },
8
8
  content: { type: String, required: !0 },
9
- color: { type: String, required: !1, default: void 0 }
9
+ color: { type: String, required: !1, default: void 0 },
10
+ padding: { type: [Number, String], required: !1, default: "var(--indentation-03) var(--indentation-04)" },
11
+ borderRadius: { type: [Number, String], required: !1, default: "var(--default-border-radius)" },
12
+ accentWidth: { type: [Number, String], required: !1, default: "var(--indentation-02)" },
13
+ titleGap: { type: [Number, String], required: !1, default: "var(--indentation-03)" },
14
+ titleFontSize: { type: [Number, String], required: !1, default: "var(--font-size-medium)" },
15
+ contentFontSize: { type: [Number, String], required: !1, default: "var(--font-size-extra-small)" }
10
16
  },
11
- setup(r, { expose: o }) {
12
- o();
13
- const e = r, l = p(() => ({
17
+ setup(n, { expose: a }) {
18
+ a();
19
+ const e = n, t = (r) => typeof r == "number" ? `${r}px` : r, o = d(() => ({
20
+ "--callout-padding": t(e.padding),
21
+ "--callout-border-radius": t(e.borderRadius),
22
+ "--callout-accent-width": t(e.accentWidth),
23
+ "--callout-title-gap": t(e.titleGap),
24
+ "--callout-title-font-size": t(e.titleFontSize),
25
+ "--callout-content-font-size": t(e.contentFontSize),
14
26
  ...e.color !== void 0 && { "--callout-color": e.color }
15
- })), t = { props: e, styles: l };
16
- return Object.defineProperty(t, "__isScriptSetup", { enumerable: !1, value: !0 }), t;
27
+ })), i = { props: e, getCssSize: t, styles: o };
28
+ return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
17
29
  }
18
30
  });
19
31
  export {
20
- i as default
32
+ s as default
21
33
  };
@@ -1 +1 @@
1
- .nmorph-file-upload .nmorph-file-upload__trigger{position:relative}.nmorph-file-upload input{display:none}.nmorph-file-upload .nmorph-file-upload__list{margin-top:var(--indentation-03)}.nmorph-file-upload .nmorph-file-upload__file{display:flex;gap:var(--indentation-02);align-items:center;box-sizing:border-box;min-width:0;margin-bottom:var(--indentation-02);padding:var(--indentation-02) var(--indentation-03);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-file-upload .nmorph-file-upload__file>.nmorph-image-preview{flex:0 0 auto}.nmorph-file-upload .nmorph-file-upload__file-info{display:flex;flex:1 1 auto;gap:var(--indentation-02);align-items:center;min-width:0}.nmorph-file-upload .nmorph-file-upload__file-info>.nmorph-icon{flex:0 0 auto}.nmorph-file-upload .nmorph-file-upload__file-name{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.nmorph-file-upload .nmorph-file-upload__remove-file{flex:0 0 auto}
1
+ .nmorph-file-upload{box-sizing:border-box;width:100%;min-width:0}.nmorph-file-upload .nmorph-file-upload__trigger{position:relative}.nmorph-file-upload input{display:none}.nmorph-file-upload .nmorph-file-upload__list{width:100%;min-width:0;margin-top:var(--indentation-03)}.nmorph-file-upload .nmorph-file-upload__list>div{box-sizing:border-box;width:100%;min-width:0}.nmorph-file-upload .nmorph-file-upload__file{display:flex;gap:var(--indentation-02);align-items:center;box-sizing:border-box;width:100%;min-width:0;max-width:100%;margin-bottom:var(--indentation-02);padding:var(--indentation-02) var(--indentation-03);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-file-upload .nmorph-file-upload__file>.nmorph-image-preview{flex:0 0 auto}.nmorph-file-upload .nmorph-file-upload__file-info{display:flex;flex:1 1 auto;gap:var(--indentation-02);align-items:center;min-width:0;overflow:hidden}.nmorph-file-upload .nmorph-file-upload__file-info>.nmorph-icon{flex:0 0 auto}.nmorph-file-upload .nmorph-file-upload__file-name{display:block;flex:1 1 auto;min-width:0;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.nmorph-file-upload .nmorph-file-upload__remove-file{flex:0 0 auto}