@nmorph/nmorph-ui-kit 3.0.0 → 3.0.1

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,6 +1,6 @@
1
1
  import './NmorphMediaTile.css';
2
- import c from "./NmorphMediaTile.vue2.js";
3
- import { openBlock as e, createElementBlock as r, normalizeClass as d, withDirectives as p, createElementVNode as n, vShow as _, createBlock as m, withCtx as l, createVNode as a, toDisplayString as s, createCommentVNode as i, renderSlot as h } from "vue";
2
+ import m from "./NmorphMediaTile.vue2.js";
3
+ import { openBlock as e, createElementBlock as r, normalizeClass as d, withDirectives as c, createElementVNode as p, vShow as _, createBlock as n, withCtx as s, createVNode as a, toDisplayString as l, createCommentVNode as i, renderSlot as h } from "vue";
4
4
  /* empty css */
5
5
  import f from "../../../_virtual/_plugin-vue_export-helper.js";
6
6
  const v = ["src", "muted", "autoplay", "playsinline"], y = {
@@ -15,7 +15,10 @@ const v = ["src", "muted", "autoplay", "playsinline"], y = {
15
15
  }, b = {
16
16
  key: 4,
17
17
  class: "nmorph-media-tile__error-text"
18
- }, I = { class: "nmorph-media-tile__status" }, S = {
18
+ }, I = {
19
+ key: 1,
20
+ class: "nmorph-media-tile__status"
21
+ }, S = {
19
22
  key: 0,
20
23
  class: "nmorph-media-tile__status-item",
21
24
  "aria-label": "Microphone muted"
@@ -32,14 +35,14 @@ const v = ["src", "muted", "autoplay", "playsinline"], y = {
32
35
  class: "nmorph-media-tile__status-item",
33
36
  "aria-label": "Pinned"
34
37
  };
35
- function x(t, M, w, o, T, B) {
38
+ function x(t, w, M, o, T, B) {
36
39
  return e(), r(
37
40
  "div",
38
41
  {
39
42
  class: d(o.modifiers)
40
43
  },
41
44
  [
42
- p(n("video", {
45
+ c(p("video", {
43
46
  ref: "videoRef",
44
47
  class: "nmorph-media-tile__video",
45
48
  src: o.props.src || void 0,
@@ -50,47 +53,48 @@ function x(t, M, w, o, T, B) {
50
53
  [_, o.hasVideo && !o.props.loading]
51
54
  ]),
52
55
  o.props.showFallback && (!o.hasVideo || o.props.loading) ? (e(), r("div", y, [
53
- o.props.loading ? (e(), m(o.NmorphIcon, {
56
+ o.props.loading ? (e(), n(o.NmorphIcon, {
54
57
  key: 0,
55
58
  class: "nmorph-media-tile__loader",
56
59
  size: "large"
57
60
  }, {
58
- default: l(() => [
61
+ default: s(() => [
59
62
  a(o.NmorphIconLoaderDots)
60
63
  ]),
61
64
  _: 1
62
65
  /* STABLE */
63
- })) : o.props.avatarSrc ? (e(), m(o.NmorphAvatar, {
66
+ })) : o.props.avatarSrc ? (e(), n(o.NmorphAvatar, {
64
67
  key: 1,
65
68
  src: o.props.avatarSrc,
66
69
  name: o.props.name,
67
- size: 72
70
+ size: 72,
71
+ design: "plain"
68
72
  }, null, 8, ["src", "name"])) : (e(), r(
69
73
  "div",
70
74
  k,
71
- s(o.fallbackLabel),
75
+ l(o.fallbackLabel),
72
76
  1
73
77
  /* TEXT */
74
78
  )),
75
79
  o.props.name ? (e(), r(
76
80
  "span",
77
81
  N,
78
- s(o.props.name),
82
+ l(o.props.name),
79
83
  1
80
84
  /* TEXT */
81
85
  )) : i("v-if", !0),
82
86
  o.props.error && o.props.errorText ? (e(), r(
83
87
  "span",
84
88
  b,
85
- s(o.props.errorText),
89
+ l(o.props.errorText),
86
90
  1
87
91
  /* TEXT */
88
92
  )) : i("v-if", !0)
89
93
  ])) : i("v-if", !0),
90
- n("div", I, [
94
+ o.props.showStatus ? (e(), r("div", I, [
91
95
  o.props.micMuted ? (e(), r("span", S, [
92
96
  a(o.NmorphIcon, { size: "small" }, {
93
- default: l(() => [
97
+ default: s(() => [
94
98
  a(o.NmorphIconMic)
95
99
  ]),
96
100
  _: 1
@@ -99,7 +103,7 @@ function x(t, M, w, o, T, B) {
99
103
  ])) : i("v-if", !0),
100
104
  o.props.videoOff ? (e(), r("span", g, [
101
105
  a(o.NmorphIcon, { size: "small" }, {
102
- default: l(() => [
106
+ default: s(() => [
103
107
  a(o.NmorphIconVideo)
104
108
  ]),
105
109
  _: 1
@@ -108,7 +112,7 @@ function x(t, M, w, o, T, B) {
108
112
  ])) : i("v-if", !0),
109
113
  o.props.screenSharing ? (e(), r("span", z, [
110
114
  a(o.NmorphIcon, { size: "small" }, {
111
- default: l(() => [
115
+ default: s(() => [
112
116
  a(o.NmorphIconShare)
113
117
  ]),
114
118
  _: 1
@@ -117,21 +121,21 @@ function x(t, M, w, o, T, B) {
117
121
  ])) : i("v-if", !0),
118
122
  o.props.pinned ? (e(), r("span", V, [
119
123
  a(o.NmorphIcon, { size: "small" }, {
120
- default: l(() => [
124
+ default: s(() => [
121
125
  a(o.NmorphIconPin)
122
126
  ]),
123
127
  _: 1
124
128
  /* STABLE */
125
129
  })
126
130
  ])) : i("v-if", !0)
127
- ]),
131
+ ])) : i("v-if", !0),
128
132
  h(t.$slots, "overlay")
129
133
  ],
130
134
  2
131
135
  /* CLASS */
132
136
  );
133
137
  }
134
- const P = /* @__PURE__ */ f(c, [["render", x], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-media-tile/NmorphMediaTile.vue"]]);
138
+ const P = /* @__PURE__ */ f(m, [["render", x], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-media-tile/NmorphMediaTile.vue"]]);
135
139
  export {
136
140
  P as default
137
141
  };
@@ -1,14 +1,14 @@
1
1
  import './NmorphMediaTile.css';
2
- import { defineComponent as u, ref as p, computed as o, watch as c } from "vue";
2
+ import { defineComponent as d, ref as p, computed as o, watch as c } from "vue";
3
3
  import { useModifiers as m } from "../../../utils/create-modifiers.js";
4
4
  import h from "../../../assets/icons/share.svg.js";
5
5
  import y from "../../../assets/icons/pin.svg.js";
6
6
  import g from "../../../assets/icons/mic.svg.js";
7
7
  import q from "../../basic/nmorph-icon/NmorphIcon.vue.js";
8
- import v from "../nmorph-avatar/NmorphAvatar.vue.js";
9
- import B from "../../../assets/icons/video.svg.js";
8
+ import B from "../nmorph-avatar/NmorphAvatar.vue.js";
9
+ import v from "../../../assets/icons/video.svg.js";
10
10
  import N from "../../../assets/icons/loader.svg.js";
11
- const L = /* @__PURE__ */ u({
11
+ const x = /* @__PURE__ */ d({
12
12
  __name: "NmorphMediaTile",
13
13
  props: {
14
14
  src: { type: String, required: !1, default: "" },
@@ -22,6 +22,7 @@ const L = /* @__PURE__ */ u({
22
22
  avatarSrc: { type: String, required: !1, default: "" },
23
23
  loading: { type: Boolean, required: !1, default: !1 },
24
24
  showFallback: { type: Boolean, required: !1, default: !0 },
25
+ showStatus: { type: Boolean, required: !1, default: !0 },
25
26
  micMuted: { type: Boolean, required: !1, default: !1 },
26
27
  videoOff: { type: Boolean, required: !1, default: !1 },
27
28
  screenSharing: { type: Boolean, required: !1, default: !1 },
@@ -33,7 +34,7 @@ const L = /* @__PURE__ */ u({
33
34
  },
34
35
  setup(l, { expose: i }) {
35
36
  const e = l, r = p(null), n = o(() => !!((e.src || e.srcObject) && !e.videoOff && !e.error)), t = o(
36
- () => e.name.split(/\s+/).filter(Boolean).slice(0, 2).map((d) => d[0]?.toUpperCase()).join("")
37
+ () => e.name.split(/\s+/).filter(Boolean).slice(0, 2).map((u) => u[0]?.toUpperCase()).join("")
37
38
  ), f = o(() => t.value || e.name || "?"), s = o(
38
39
  () => m({
39
40
  "nmorph-media-tile": [
@@ -57,7 +58,7 @@ const L = /* @__PURE__ */ u({
57
58
  { immediate: !0, flush: "post" }
58
59
  ), i({ videoRef: r });
59
60
  const a = { props: e, videoRef: r, hasVideo: n, initials: t, fallbackLabel: f, modifiers: s, get NmorphAvatar() {
60
- return v;
61
+ return B;
61
62
  }, get NmorphIcon() {
62
63
  return q;
63
64
  }, get NmorphIconLoaderDots() {
@@ -69,11 +70,11 @@ const L = /* @__PURE__ */ u({
69
70
  }, get NmorphIconShare() {
70
71
  return h;
71
72
  }, get NmorphIconVideo() {
72
- return B;
73
+ return v;
73
74
  } };
74
75
  return Object.defineProperty(a, "__isScriptSetup", { enumerable: !1, value: !0 }), a;
75
76
  }
76
77
  });
77
78
  export {
78
- L as default
79
+ x as default
79
80
  };
@@ -1 +1 @@
1
- .nmorph-select-button{--nmorph-private-select-button-track-padding: 4px;--nmorph-private-select-button-item-size: calc( var(--nmorph-private-control-height) - var(--nmorph-private-select-button-track-padding) * 2 );--nmorph-private-select-button-item-font-size: var(--nmorph-private-control-font-size);--nmorph-private-select-button-item-line-height: var(--nmorph-private-control-line-height);display:inline-flex;align-items:center;width:fit-content;padding:var(--nmorph-private-select-button-track-padding);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color);transition:background-color ease-in-out var(--transition-02),border-color ease-in-out var(--transition-02),box-shadow ease-in-out var(--transition-02)}.nmorph-select-button.nmorph-select-button--disabled{cursor:not-allowed;opacity:.6}.nmorph-select-button.nmorph-select-button--fill{width:100%}.nmorph-select-button.nmorph-select-button--fill>.nmorph-select-button-item{flex:1 1 0;min-width:0}
1
+ .nmorph-select-button{--nmorph-private-select-button-padding: max(3px, calc(var(--nmorph-private-control-height) * .1333));--nmorph-private-select-button-item-height: calc( var(--nmorph-private-control-height) - var(--nmorph-private-select-button-padding) * 2 );display:inline-flex;align-items:center;width:fit-content;padding:var(--nmorph-private-select-button-padding);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color);transition:background-color ease-in-out var(--transition-02),border-color ease-in-out var(--transition-02),box-shadow ease-in-out var(--transition-02)}.nmorph-select-button.nmorph-select-button--disabled{cursor:not-allowed;opacity:.6}.nmorph-select-button.nmorph-select-button--fill{width:100%}.nmorph-select-button.nmorph-select-button--fill>.nmorph-select-button-item{flex:1 1 0;min-width:0}
@@ -1,20 +1,17 @@
1
1
  import './NmorphSelectButton.css';
2
- import { defineComponent as h, ref as b, watch as S, computed as s, provide as d } from "vue";
3
- import { useModifiers as g } from "../../../utils/create-modifiers.js";
4
- import { createCssVariables as y, createCssSizeVariables as v } from "../../../utils/common.js";
5
- import { useFormItemModel as q } from "../nmorph-form/use-form-item-input.js";
6
- import { NmorphComponentThickness as _ } from "../../../types/common.types.js";
7
- import k from "./components/nmorph-select-button-item/NmorphSelectButtonItem.vue.js";
8
- const F = /* @__PURE__ */ h({
2
+ import { defineComponent as h, ref as b, watch as y, computed as n, provide as u } from "vue";
3
+ import { useModifiers as S } from "../../../utils/create-modifiers.js";
4
+ import { createCssSizeVariables as q } from "../../../utils/common.js";
5
+ import { useFormItemModel as _ } from "../nmorph-form/use-form-item-input.js";
6
+ import { NmorphComponentThickness as g } from "../../../types/common.types.js";
7
+ import v from "./components/nmorph-select-button-item/NmorphSelectButtonItem.vue.js";
8
+ const I = /* @__PURE__ */ h({
9
9
  __name: "NmorphSelectButton",
10
10
  props: {
11
11
  modelValue: { type: String, required: !1, default: "" },
12
12
  options: { type: Array, required: !1, default: () => [] },
13
13
  fill: { type: Boolean, required: !1, default: !1 },
14
- trackPadding: { type: [Number, String], required: !1, default: void 0 },
15
- itemSize: { type: [Number, String], required: !1, default: void 0 },
16
- itemFontSize: { type: String, required: !1, default: void 0 },
17
- itemLineHeight: { type: String, required: !1, default: void 0 },
14
+ customThickness: { type: [Number, String], required: !1, default: void 0 },
18
15
  id: { type: String, required: !1 },
19
16
  name: { type: String, required: !1 },
20
17
  autocomplete: { type: String, required: !1 },
@@ -23,40 +20,35 @@ const F = /* @__PURE__ */ h({
23
20
  tabindex: { type: Number, required: !1 }
24
21
  },
25
22
  emits: ["update:model-value"],
26
- setup(u, { expose: m, emit: p }) {
23
+ setup(d, { expose: m, emit: p }) {
27
24
  m();
28
- const e = u, a = p, { modelValue: i, updateModelValue: l } = q(
25
+ const e = d, l = p, { modelValue: o, updateModelValue: s } = _(
29
26
  e,
30
- (t) => a("update:model-value", t),
27
+ (t) => l("update:model-value", t),
31
28
  ""
32
- ), r = b(i.value);
33
- S(i, (t) => {
29
+ ), r = b(o.value);
30
+ y(o, (t) => {
34
31
  r.value = t;
35
32
  });
36
- const f = s(
37
- () => g({
38
- nmorph: [_[e.thickness]],
33
+ const f = n(
34
+ () => S({
35
+ nmorph: [g[e.thickness]],
39
36
  "nmorph-select-button": [e.disabled && "disabled", e.fill && "fill", e.thickness]
40
37
  })
41
- ), c = s(() => ({
42
- ...v({
43
- "--nmorph-private-select-button-track-padding": e.trackPadding,
44
- "--nmorph-private-select-button-item-size": e.itemSize
45
- }),
46
- ...y({
47
- "--nmorph-private-select-button-item-font-size": e.itemFontSize,
48
- "--nmorph-private-select-button-item-line-height": e.itemLineHeight
38
+ ), c = n(() => ({
39
+ ...q({
40
+ "--nmorph-private-control-height": e.customThickness
49
41
  })
50
- })), o = (t) => {
51
- e.disabled || (r.value = t, l(t));
42
+ })), i = (t) => {
43
+ e.disabled || (r.value = t, s(t));
52
44
  };
53
- d("select-button-selected-value", r), d("select-button-change-handler", o);
54
- const n = { props: e, emit: a, modelValue: i, updateModelValue: l, initialValue: r, modifiers: f, styles: c, changeHandler: o, get NmorphSelectButtonItem() {
55
- return k;
45
+ u("select-button-selected-value", r), u("select-button-change-handler", i);
46
+ const a = { props: e, emit: l, modelValue: o, updateModelValue: s, initialValue: r, modifiers: f, styles: c, changeHandler: i, get NmorphSelectButtonItem() {
47
+ return v;
56
48
  } };
57
- return Object.defineProperty(n, "__isScriptSetup", { enumerable: !1, value: !0 }), n;
49
+ return Object.defineProperty(a, "__isScriptSetup", { enumerable: !1, value: !0 }), a;
58
50
  }
59
51
  });
60
52
  export {
61
- F as default
53
+ I as default
62
54
  };
@@ -1 +1 @@
1
- .nmorph-select-button-item{display:inline-flex;justify-content:center;align-items:center;height:var(--nmorph-private-select-button-item-size);padding:0 var(--indentation-04);font-size:var(--nmorph-private-select-button-item-font-size);line-height:var(--nmorph-private-select-button-item-line-height);border-radius:var(--default-border-radius);transform:translateY(0);cursor:pointer;opacity:.45;transition:color ease-in-out var(--transition-02),background-color ease-in-out var(--transition-02),box-shadow ease-in-out var(--transition-02),opacity ease-in-out var(--transition-02),transform ease-in-out var(--transition-01)}.nmorph-select-button-item input{position:absolute;width:0;height:0;opacity:0;pointer-events:none}.nmorph-select-button-item:focus-visible{outline:2px solid var(--nmorph-accent-color);outline-offset:2px}.nmorph-select-button-item:not(.nmorph-select-button-item--disabled):hover{opacity:.72}.nmorph-select-button-item:not(.nmorph-select-button-item--disabled):active{transform:translateY(1px)}.nmorph-select-button-item .nmorph-select-button-item__content{min-width:0;transform:translateY(var(--nmorph-private-control-text-offset-y))}.nmorph-select-button-item.nmorph-select-button-item--checked{background:var(--nmorph-main-color);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);opacity:1}.nmorph-select-button-item.nmorph-select-button-item--checked:hover{opacity:1}.nmorph-select-button-item.nmorph-select-button-item--disabled{cursor:not-allowed;opacity:.6}
1
+ .nmorph-select-button-item{display:inline-flex;justify-content:center;align-items:center;height:var(--nmorph-private-select-button-item-height);padding:0 var(--indentation-04);font-size:var(--nmorph-private-control-font-size);line-height:var(--nmorph-private-control-line-height);border-radius:var(--default-border-radius);transform:translateY(0);cursor:pointer;opacity:.45;transition:color ease-in-out var(--transition-02),background-color ease-in-out var(--transition-02),box-shadow ease-in-out var(--transition-02),opacity ease-in-out var(--transition-02),transform ease-in-out var(--transition-01)}.nmorph-select-button-item input{position:absolute;width:0;height:0;opacity:0;pointer-events:none}.nmorph-select-button-item:focus-visible{outline:2px solid var(--nmorph-accent-color);outline-offset:2px}.nmorph-select-button-item:not(.nmorph-select-button-item--disabled):hover{opacity:.72}.nmorph-select-button-item:not(.nmorph-select-button-item--disabled):active{transform:translateY(1px)}.nmorph-select-button-item .nmorph-select-button-item__content{min-width:0;transform:translateY(var(--nmorph-private-control-text-offset-y))}.nmorph-select-button-item.nmorph-select-button-item--checked{background:var(--nmorph-main-color);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);opacity:1}.nmorph-select-button-item.nmorph-select-button-item--checked:hover{opacity:1}.nmorph-select-button-item.nmorph-select-button-item--disabled{cursor:not-allowed;opacity:.6}