@nmorph/nmorph-ui-kit 2.2.43 → 2.2.45

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 (52) hide show
  1. package/dist/assets/icons/burger.svg.js +5 -5
  2. package/dist/assets/icons/download.svg.js +5 -5
  3. package/dist/assets/icons/open.svg.js +2 -2
  4. package/dist/assets/icons/search.svg.js +1 -1
  5. package/dist/assets/icons/smile.svg.js +4 -4
  6. package/dist/components/basic/nmorph-button/NmorphButton.vue.js +16 -16
  7. package/dist/components/basic/nmorph-scroll/NmorphScroll.css +1 -1
  8. package/dist/components/basic/nmorph-scroll/NmorphScroll.vue.js +179 -74
  9. package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.css +1 -0
  10. package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.vue.js +207 -0
  11. package/dist/components/data/nmorph-audio-preview/NmorphAudioPreview.vue3.js +6 -0
  12. package/dist/components/data/nmorph-emoji-picker/NmorphEmojiPicker.css +1 -0
  13. package/dist/components/data/nmorph-emoji-picker/NmorphEmojiPicker.vue.js +405 -0
  14. package/dist/components/data/nmorph-emoji-picker/NmorphEmojiPicker.vue3.js +6 -0
  15. package/dist/components/data/nmorph-file-card/NmorphFileCard.css +1 -0
  16. package/dist/components/data/nmorph-file-card/NmorphFileCard.vue.js +124 -0
  17. package/dist/components/data/nmorph-file-card/NmorphFileCard.vue3.js +6 -0
  18. package/dist/components/data/nmorph-media-tile/NmorphMediaTile.vue.js +8 -8
  19. package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.css +1 -0
  20. package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.vue.js +147 -0
  21. package/dist/components/data/nmorph-video-preview/NmorphVideoPreview.vue3.js +6 -0
  22. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.css +1 -1
  23. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue.js +154 -125
  24. package/dist/components/form/nmorph-file-upload/types.js +9 -9
  25. package/dist/hooks/use-common-styles.js +92 -12
  26. package/dist/index.es.js +861 -849
  27. package/dist/index.umd.js +108 -28
  28. package/dist/package.json.js +1 -1
  29. package/dist/src/components/basic/nmorph-scroll/NmorphScroll.vue.d.ts +1 -0
  30. package/dist/src/components/data/index.d.ts +8 -0
  31. package/dist/src/components/data/nmorph-audio-preview/NmorphAudioPreview.vue.d.ts +38 -0
  32. package/dist/src/components/data/nmorph-audio-preview/types.d.ts +20 -0
  33. package/dist/src/components/data/nmorph-calendar/NmorphCalendar.vue.d.ts +1 -1
  34. package/dist/src/components/data/nmorph-emoji-picker/NmorphEmojiPicker.vue.d.ts +25 -0
  35. package/dist/src/components/data/nmorph-emoji-picker/types.d.ts +51 -0
  36. package/dist/src/components/data/nmorph-file-card/NmorphFileCard.vue.d.ts +30 -0
  37. package/dist/src/components/data/nmorph-file-card/types.d.ts +18 -0
  38. package/dist/src/components/data/nmorph-media-tile/NmorphMediaTile.vue.d.ts +1 -1
  39. package/dist/src/components/data/nmorph-video-preview/NmorphVideoPreview.vue.d.ts +41 -0
  40. package/dist/src/components/data/nmorph-video-preview/types.d.ts +27 -0
  41. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/NmorphYearMonthPicker.vue.d.ts +1 -1
  42. package/dist/src/components/form/nmorph-file-upload/NmorphFileUpload.vue.d.ts +1 -1
  43. package/dist/src/components/form/nmorph-file-upload/types.d.ts +4 -0
  44. package/dist/src/components/form/nmorph-number-input/NmorphNumberInput.vue.d.ts +1 -1
  45. package/dist/src/components/form/nmorph-slider/NmorphSlider.vue.d.ts +1 -1
  46. package/dist/src/components/form/nmorph-text-input/NmorphTextInput.vue.d.ts +1 -1
  47. package/dist/src/components/form/nmorph-textarea/NmorphTextarea.vue.d.ts +1 -1
  48. package/dist/src/components/navigation/nmorph-backtop/NmorphBacktop.vue.d.ts +1 -1
  49. package/dist/src/utils/file-types.d.ts +8 -1
  50. package/dist/style.css +1 -1
  51. package/dist/utils/file-types.js +28 -21
  52. package/package.json +23 -24
@@ -1,27 +1,31 @@
1
1
  import './NmorphFileUpload.css';
2
- import { defineComponent as Z, computed as F, inject as ee, ref as R, watch as te, onBeforeUnmount as oe, openBlock as d, createElementBlock as g, normalizeStyle as le, normalizeClass as ie, createElementVNode as f, unref as n, renderSlot as ae, createVNode as v, TransitionGroup as re, withCtx as I, Fragment as ne, renderList as se, createBlock as T, createCommentVNode as U, resolveDynamicComponent as de, toDisplayString as me } from "vue";
3
- import { useModifiers as ce } from "../../../utils/create-modifiers.js";
4
- import { createCssSizeVariables as pe } from "../../../utils/common.js";
5
- import { getFileAcceptValue as ue, getFileTypeCandidates as A, isKnownFileType as h, isFileAllowedByTypes as fe, getFileExtension as ve } from "../../../utils/file-types.js";
6
- import { useI18n as he } from "vue-i18n";
2
+ import { defineComponent as ee, computed as x, inject as te, ref as R, watch as oe, onBeforeUnmount as le, openBlock as r, createElementBlock as c, normalizeStyle as ie, normalizeClass as ne, createElementVNode as u, unref as l, renderSlot as ae, createVNode as m, TransitionGroup as se, withCtx as F, Fragment as T, renderList as re, toDisplayString as $, createBlock as V, createCommentVNode as me } from "vue";
3
+ import { useModifiers as de } from "../../../utils/create-modifiers.js";
4
+ import { createCssSizeVariables as ce } from "../../../utils/common.js";
5
+ import { getFileAcceptValue as ue, isImageFile as N, isVideoFile as pe, isAudioFile as fe, getFileExtension as P, isFileAllowedByTypes as he } from "../../../utils/file-types.js";
6
+ import { useI18n as ve } from "vue-i18n";
7
7
  import { useFormItemInput as _e, useFormItemModel as ye } from "../nmorph-form/use-form-item-input.js";
8
- import B from "../../basic/nmorph-button/NmorphButton.vue.js";
8
+ import A from "../../basic/nmorph-button/NmorphButton.vue.js";
9
9
  /* empty css */
10
- import Fe from "../../data/nmorph-image-preview/NmorphImagePreview.vue.js";
10
+ import xe from "../../data/nmorph-image-preview/NmorphImagePreview.vue.js";
11
11
  /* empty css */
12
- import ge from "../../basic/nmorph-icon/NmorphIcon.vue.js";
12
+ import S from "../../basic/nmorph-icon/NmorphIcon.vue.js";
13
13
  /* empty css */
14
- import xe from "../../../assets/icons/doc.svg.js";
15
- import be from "../../../assets/icons/audio.svg.js";
16
- import we from "../../../assets/icons/archive.svg.js";
17
- import { NmorphImageResolution as L, NmorphAudioResolution as Ce, NmorphVideoResolution as Ie, NmorphArchiveResolution as Ne } from "./types.js";
18
- import Ve from "../../../assets/icons/cross.svg.js";
19
- import ke from "../../../assets/icons/image.svg.js";
20
- import Re from "../../../assets/icons/video.svg.js";
21
- const Te = { class: "nmorph-file-upload__trigger" }, Ue = ["id", "name", "autocomplete", "tabindex", "multiple", "disabled", "accept"], Ae = {
14
+ import Fe from "../../data/nmorph-video-preview/NmorphVideoPreview.vue.js";
15
+ /* empty css */
16
+ import ge from "../../data/nmorph-audio-preview/NmorphAudioPreview.vue.js";
17
+ /* empty css */
18
+ import be from "../../data/nmorph-file-card/NmorphFileCard.vue.js";
19
+ /* empty css */
20
+ import z from "../../../assets/icons/image.svg.js";
21
+ import we from "../../../assets/icons/cross.svg.js";
22
+ const ke = { class: "nmorph-file-upload__trigger" }, Ve = ["id", "name", "autocomplete", "tabindex", "multiple", "disabled", "accept"], Ce = {
22
23
  key: 0,
23
24
  class: "nmorph-file-upload__list"
24
- }, Be = { class: "nmorph-file-upload__file-info" }, Le = { class: "nmorph-file-upload__file-name" }, We = { class: "nmorph-file-upload__remove-file" }, tt = /* @__PURE__ */ Z({
25
+ }, Ie = { class: "nmorph-file-upload__file-info" }, Be = { class: "nmorph-file-upload__file-name" }, Re = {
26
+ key: 1,
27
+ class: "nmorph-file-upload__file-info"
28
+ }, Te = { class: "nmorph-file-upload__file-name" }, $e = { class: "nmorph-file-upload__remove-file" }, Ye = /* @__PURE__ */ ee({
25
29
  __name: "NmorphFileUpload",
26
30
  props: {
27
31
  id: {},
@@ -39,151 +43,176 @@ const Te = { class: "nmorph-file-upload__trigger" }, Ue = ["id", "name", "autoco
39
43
  fileNameWidth: { default: void 0 }
40
44
  },
41
45
  emits: ["update:model-value", "on-unsupported-file-type-error", "on-file-validation-error"],
42
- setup(W, { expose: P, emit: S }) {
43
- const { t: D } = he(), l = W, x = S, E = F(() => l.buttonText ? l.buttonText : D("selectFile")), { id: _, name: M, autocomplete: $, tabindex: O } = _e(l), { modelValue: N, updateModelValue: j } = ye(
44
- l,
45
- (e) => x("update:model-value", e),
46
+ setup(E, { expose: L, emit: M }) {
47
+ const { t: U } = ve(), o = E, g = M, D = x(() => o.buttonText ? o.buttonText : U("selectFile")), { id: _, name: O, autocomplete: W, tabindex: j } = _e(o), { modelValue: C, updateModelValue: G } = ye(
48
+ o,
49
+ (e) => g("update:model-value", e),
46
50
  []
47
- ), b = ee("form-data", void 0), z = (e) => {
48
- const t = A(e);
49
- return e.type.toLowerCase().startsWith("image/") || t.some((o) => h(o, L));
50
- }, G = F(() => ue(l.allowedTypes)), K = (e) => {
51
- const t = A(e);
52
- let o = xe;
53
- return (e.type.toLowerCase().startsWith("image/") || t.some((i) => h(i, L))) && (o = ke), (e.type.toLowerCase().startsWith("audio/") || t.some((i) => h(i, Ce))) && (o = be), (e.type.toLowerCase().startsWith("video/") || t.some((i) => h(i, Ie))) && (o = Re), t.some((i) => h(i, Ne)) && (o = we), o;
54
- }, m = R(null), r = R([...N.value]), c = /* @__PURE__ */ new Set(), w = () => {
55
- const e = m.value;
51
+ ), b = te("form-data", void 0), q = x(() => ue(o.allowedTypes)), H = (e) => o.photoWithPreview && N(e), p = R(null), s = R([...C.value]), f = /* @__PURE__ */ new Set(), w = () => {
52
+ const e = p.value;
56
53
  e && (e.value = "");
57
- }, C = (e) => {
58
- c.has(e) && (URL.revokeObjectURL(e), c.delete(e));
59
- }, V = (e) => {
60
- const t = new Set(e.map((o) => o.previewUrl));
61
- Array.from(c).forEach((o) => {
62
- t.has(o) || C(o);
63
- });
64
54
  }, k = (e) => {
65
- const t = [...e];
66
- r.value = t, j(t);
67
- }, q = (e) => {
68
- const t = b?.validateField(_.value, e);
55
+ f.has(e) && (URL.revokeObjectURL(e), f.delete(e));
56
+ }, I = (e) => {
57
+ const i = new Set(e.map((t) => t.previewUrl));
58
+ Array.from(f).forEach((t) => {
59
+ i.has(t) || k(t);
60
+ });
61
+ }, B = (e) => {
62
+ const i = [...e];
63
+ s.value = i, G(i);
64
+ }, J = (e) => {
65
+ const i = b?.validateField(_.value, e);
69
66
  return {
70
- valid: t?.valid.value ?? !0,
71
- errors: t?.errors.value ?? []
67
+ valid: i?.valid.value ?? !0,
68
+ errors: i?.errors.value ?? []
72
69
  };
73
- }, H = () => {
74
- l.disabled || !m.value || m.value.click();
75
- }, J = (e) => {
76
- if (l.disabled) return;
77
- const t = e.target, o = Array.from(t.files || []), i = l.multiple ? o : o.slice(0, 1), s = [];
78
- if (i.forEach((a) => {
79
- if (!fe(a, l.allowedTypes)) {
80
- x("on-unsupported-file-type-error", a.type || ve(a.name) || a.name);
70
+ }, K = () => {
71
+ o.disabled || !p.value || p.value.click();
72
+ }, Q = (e) => {
73
+ if (o.disabled) return;
74
+ const i = e.target, t = Array.from(i.files || []), a = o.multiple ? t : t.slice(0, 1), d = [];
75
+ if (a.forEach((n) => {
76
+ if (!he(n, o.allowedTypes)) {
77
+ g("on-unsupported-file-type-error", n.type || P(n.name) || n.name);
81
78
  return;
82
79
  }
83
- const p = l.multiple ? [...r.value.map((y) => y.data), ...s, a] : [a], u = q(p);
84
- if (!u.valid) {
85
- x("on-file-validation-error", { file: a, errors: u.errors });
80
+ const h = o.multiple ? [...s.value.map((y) => y.data), ...d, n] : [n], v = J(h);
81
+ if (!v.valid) {
82
+ g("on-file-validation-error", { file: n, errors: v.errors });
86
83
  return;
87
84
  }
88
- s.push(a);
89
- }), w(), s.length > 0) {
90
- const a = s.map((u) => {
91
- const y = URL.createObjectURL(u);
92
- return c.add(y), { data: u, previewUrl: y };
93
- }), p = l.multiple ? [...r.value, ...a] : a;
94
- V(p), k(p), b?.validateField(_.value, p);
85
+ d.push(n);
86
+ }), w(), d.length > 0) {
87
+ const n = d.map((v) => {
88
+ const y = URL.createObjectURL(v);
89
+ return f.add(y), { data: v, previewUrl: y };
90
+ }), h = o.multiple ? [...s.value, ...n] : n;
91
+ I(h), B(h), b?.validateField(_.value, h);
95
92
  }
96
- }, Q = (e) => {
97
- if (l.disabled) return;
98
- const t = r.value.findIndex((o) => o.data.name === e);
99
- if (t !== -1) {
100
- const o = r.value[t];
101
- C(o.previewUrl), w();
102
- const i = r.value.filter((s, a) => a !== t);
103
- k(i), b?.validateField(_.value, i);
93
+ }, X = (e) => {
94
+ if (o.disabled) return;
95
+ const i = s.value.findIndex((t) => t.data.name === e);
96
+ if (i !== -1) {
97
+ const t = s.value[i];
98
+ k(t.previewUrl), w();
99
+ const a = s.value.filter((d, n) => n !== i);
100
+ B(a), b?.validateField(_.value, a);
104
101
  }
105
102
  };
106
- te(
107
- N,
103
+ oe(
104
+ C,
108
105
  (e) => {
109
- const t = [...e];
110
- V(t), r.value = t, t.length === 0 && w();
106
+ const i = [...e];
107
+ I(i), s.value = i, i.length === 0 && w();
111
108
  },
112
109
  { deep: !0 }
113
- ), oe(() => {
114
- Array.from(c).forEach((e) => C(e));
115
- }), P({ inputDOMRef: m });
116
- const X = F(
117
- () => ce({
118
- "nmorph-file-upload": [l.disabled && "disabled", l.compact && "compact", `layout-${l.layout}`]
110
+ ), le(() => {
111
+ Array.from(f).forEach((e) => k(e));
112
+ }), L({ inputDOMRef: p });
113
+ const Y = x(
114
+ () => de({
115
+ "nmorph-file-upload": [o.disabled && "disabled", o.compact && "compact", `layout-${o.layout}`]
119
116
  })
120
- ), Y = F(
121
- () => pe({
122
- "--nmorph-file-upload-name-width": l.fileNameWidth
117
+ ), Z = x(
118
+ () => ce({
119
+ "--nmorph-file-upload-name-width": o.fileNameWidth
123
120
  })
124
121
  );
125
- return (e, t) => (d(), g("div", {
126
- class: ie(X.value),
127
- style: le(Y.value)
122
+ return (e, i) => (r(), c("div", {
123
+ class: ne(Y.value),
124
+ style: ie(Z.value)
128
125
  }, [
129
- f("div", Te, [
130
- f("input", {
131
- id: n(_),
126
+ u("div", ke, [
127
+ u("input", {
128
+ id: l(_),
132
129
  ref_key: "inputDOMRef",
133
- ref: m,
134
- name: n(M),
135
- autocomplete: n($),
136
- tabindex: n(O),
130
+ ref: p,
131
+ name: l(O),
132
+ autocomplete: l(W),
133
+ tabindex: l(j),
137
134
  type: "file",
138
- multiple: l.multiple,
139
- disabled: l.disabled,
140
- accept: G.value,
135
+ multiple: o.multiple,
136
+ disabled: o.disabled,
137
+ accept: q.value,
141
138
  class: "nmorph-native-input",
142
- onChange: J
143
- }, null, 40, Ue),
139
+ onChange: Q
140
+ }, null, 40, Ve),
144
141
  ae(e.$slots, "trigger", {}, () => [
145
- v(n(B), {
146
- text: E.value,
142
+ m(l(A), {
143
+ text: D.value,
147
144
  fill: "",
148
- disabled: l.disabled,
149
- onClick: H
145
+ disabled: o.disabled,
146
+ onClick: K
150
147
  }, null, 8, ["text", "disabled"])
151
148
  ])
152
149
  ]),
153
- r.value.length > 0 ? (d(), g("div", Ae, [
154
- v(re, {
150
+ s.value.length > 0 ? (r(), c("div", Ce, [
151
+ m(se, {
155
152
  name: "list",
156
153
  tag: "div"
157
154
  }, {
158
- default: I(() => [
159
- (d(!0), g(ne, null, se(r.value, ({ data: o, previewUrl: i }) => (d(), g("div", {
160
- key: o.name,
155
+ default: F(() => [
156
+ (r(!0), c(T, null, re(s.value, ({ data: t, previewUrl: a }) => (r(), c("div", {
157
+ key: t.name,
161
158
  class: "nmorph-file-upload__file"
162
159
  }, [
163
- l.photoWithPreview && z(o) ? (d(), T(n(Fe), {
164
- key: 0,
165
- src: i
166
- }, null, 8, ["src"])) : U("", !0),
167
- f("div", Be, [
168
- v(n(ge), {
160
+ H(t) ? (r(), c(T, { key: 0 }, [
161
+ m(l(xe), { src: a }, null, 8, ["src"]),
162
+ u("div", Ie, [
163
+ m(l(S), {
164
+ width: "14px",
165
+ height: "17px"
166
+ }, {
167
+ default: F(() => [
168
+ m(l(z))
169
+ ]),
170
+ _: 1
171
+ }),
172
+ u("span", Be, $(t.name), 1)
173
+ ])
174
+ ], 64)) : l(N)(t) ? (r(), c("div", Re, [
175
+ m(l(S), {
169
176
  width: "14px",
170
177
  height: "17px"
171
178
  }, {
172
- default: I(() => [
173
- (d(), T(de(K(o))))
179
+ default: F(() => [
180
+ m(l(z))
174
181
  ]),
175
- _: 2
176
- }, 1024),
177
- f("span", Le, me(o.name), 1)
178
- ]),
179
- f("div", We, [
180
- v(n(B), {
182
+ _: 1
183
+ }),
184
+ u("span", Te, $(t.name), 1)
185
+ ])) : l(pe)(t) ? (r(), V(l(Fe), {
186
+ key: 2,
187
+ src: a,
188
+ name: t.name,
189
+ "download-href": a,
190
+ compact: "",
191
+ controls: ""
192
+ }, null, 8, ["src", "name", "download-href"])) : l(fe)(t) ? (r(), V(l(ge), {
193
+ key: 3,
194
+ src: a,
195
+ name: t.name,
196
+ "download-href": a,
197
+ compact: ""
198
+ }, null, 8, ["src", "name", "download-href"])) : (r(), V(l(be), {
199
+ key: 4,
200
+ name: t.name,
201
+ "mime-type": t.type,
202
+ size: t.size,
203
+ extension: l(P)(t.name),
204
+ "preview-src": a,
205
+ "download-href": a,
206
+ compact: ""
207
+ }, null, 8, ["name", "mime-type", "size", "extension", "preview-src", "download-href"])),
208
+ u("div", $e, [
209
+ m(l(A), {
181
210
  height: "thin",
182
211
  "style-type": "transparent",
183
- onClick: (s) => Q(o.name)
212
+ onClick: (d) => X(t.name)
184
213
  }, {
185
- "icon-only": I(() => [
186
- v(n(Ve))
214
+ "icon-only": F(() => [
215
+ m(l(we))
187
216
  ]),
188
217
  _: 1
189
218
  }, 8, ["onClick"])
@@ -192,10 +221,10 @@ const Te = { class: "nmorph-file-upload__trigger" }, Ue = ["id", "name", "autoco
192
221
  ]),
193
222
  _: 1
194
223
  })
195
- ])) : U("", !0)
224
+ ])) : me("", !0)
196
225
  ], 6));
197
226
  }
198
227
  });
199
228
  export {
200
- tt as default
229
+ Ye as default
201
230
  };
@@ -1,5 +1,5 @@
1
1
  var p = /* @__PURE__ */ ((a) => (a.jpeg = "image/jpeg", a.jpg = "image/jpg", a.png = "image/png", a.gif = "image/gif", a["svg-xml"] = "image/svg+xml", a.webp = "image/webp", a))(p || {});
2
- const d = {
2
+ const g = {
3
3
  mp4: "video/mp4",
4
4
  webm: "video/webm",
5
5
  "video-ogg": "video/ogg",
@@ -8,19 +8,19 @@ const d = {
8
8
  */
9
9
  "wideo-ogg": "video/ogg"
10
10
  };
11
- var e = /* @__PURE__ */ ((a) => (a.mpeg = "audio/mpeg", a["audio-ogg"] = "audio/ogg", a.wav = "audio/wav", a))(e || {}), i = /* @__PURE__ */ ((a) => (a.pdf = "application/pdf", a.msword = "application/msword", a.docx = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", a.xlsx = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", a.pptx = "application/vnd.openxmlformats-officedocument.presentationml.presentation", a.json = "application/json", a.xml = "application/xml", a))(i || {}), g = /* @__PURE__ */ ((a) => (a.zip = "application/zip", a.rar = "application/x-rar-compressed", a["7z"] = "application/x-7z-compressed", a))(g || {});
11
+ var i = /* @__PURE__ */ ((a) => (a.mpeg = "audio/mpeg", a["audio-ogg"] = "audio/ogg", a.wav = "audio/wav", a))(i || {}), e = /* @__PURE__ */ ((a) => (a.pdf = "application/pdf", a.msword = "application/msword", a.docx = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", a.xls = "application/vnd.ms-excel", a.xlsx = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", a.ppt = "application/vnd.ms-powerpoint", a.pptx = "application/vnd.openxmlformats-officedocument.presentationml.presentation", a.json = "application/json", a.xml = "application/xml", a))(e || {}), d = /* @__PURE__ */ ((a) => (a.zip = "application/zip", a.rar = "application/x-rar-compressed", a["7z"] = "application/x-7z-compressed", a))(d || {});
12
12
  const n = {
13
13
  ...p,
14
- ...d,
15
- ...e,
14
+ ...g,
16
15
  ...i,
17
- ...g
16
+ ...e,
17
+ ...d
18
18
  };
19
19
  export {
20
- g as NmorphArchiveResolution,
21
- e as NmorphAudioResolution,
22
- i as NmorphDocResolution,
20
+ d as NmorphArchiveResolution,
21
+ i as NmorphAudioResolution,
22
+ e as NmorphDocResolution,
23
23
  p as NmorphImageResolution,
24
- d as NmorphVideoResolution,
24
+ g as NmorphVideoResolution,
25
25
  n as resolution
26
26
  };
@@ -1,18 +1,18 @@
1
- import { nmorphCombined as s, nmorphInset as t, nmorphOutset as h, title1 as l, title2 as d, title3 as c, title4 as b, body1 as a, body2 as p, body3 as e, body4 as m } from "../utils/theme-style.js";
1
+ import { nmorphCombined as s, nmorphInset as r, nmorphOutset as h, title1 as l, title2 as d, title3 as c, title4 as b, body1 as e, body2 as p, body3 as a, body4 as m } from "../utils/theme-style.js";
2
2
  const u = {
3
3
  "nmorph-body-4": m,
4
- "nmorph-body-3": e,
4
+ "nmorph-body-3": a,
5
5
  "nmorph-body-2": p,
6
- "nmorph-body-1": a,
6
+ "nmorph-body-1": e,
7
7
  "nmorph-title-4": b,
8
8
  "nmorph-title-3": c,
9
9
  "nmorph-title-2": d,
10
10
  "nmorph-title-1": l,
11
11
  "nmorph--shadow-outset": h,
12
- "nmorph--shadow-inset": t,
12
+ "nmorph--shadow-inset": r,
13
13
  "nmorph--shadow-combined": s
14
14
  }, w = () => {
15
- let r = `
15
+ let t = `
16
16
  :root {
17
17
  --font-size-tiny: 10px;
18
18
  --font-size-extra-small: 12px;
@@ -112,7 +112,7 @@ const u = {
112
112
  width: auto;
113
113
  font-family: Helvetica, Roboto, Arial, sans-serif;
114
114
 
115
- ${a()}
115
+ ${e()}
116
116
  }
117
117
 
118
118
  h1 {
@@ -262,9 +262,89 @@ const u = {
262
262
  .nmorph-scroll {
263
263
  --thumb-color: var(--nmorph-scroll-thumb-color, var(--nmorph-text-color));
264
264
 
265
+ position: relative;
266
+ overflow: hidden;
265
267
  color-scheme: var(--nmorph-scroll-color-scheme, light);
266
- scrollbar-color: var(--thumb-color) transparent;
267
- scrollbar-width: thin;
268
+ }
269
+
270
+ .nmorph-scroll__viewport {
271
+ width: 100%;
272
+ height: 100%;
273
+ box-sizing: border-box;
274
+ display: inherit;
275
+ flex-direction: inherit;
276
+ flex-wrap: inherit;
277
+ align-content: inherit;
278
+ align-items: inherit;
279
+ justify-content: inherit;
280
+ gap: inherit;
281
+ grid-auto-flow: inherit;
282
+ grid-template-columns: inherit;
283
+ grid-template-rows: inherit;
284
+ color-scheme: inherit;
285
+ scrollbar-width: none;
286
+ -ms-overflow-style: none;
287
+ }
288
+
289
+ .nmorph-scroll__viewport::-webkit-scrollbar {
290
+ display: none;
291
+ width: 0;
292
+ height: 0;
293
+ background: transparent;
294
+ }
295
+
296
+ .nmorph-scroll__bar {
297
+ position: absolute;
298
+ z-index: 1;
299
+ border-radius: var(--border-radius-40);
300
+ background: transparent;
301
+ ${r()}
302
+ opacity: 0.78;
303
+ transition:
304
+ opacity ease-in-out 0.16s,
305
+ background-color ease-in-out 0.16s;
306
+ touch-action: none;
307
+ }
308
+
309
+ .nmorph-scroll__bar--vertical {
310
+ top: 0;
311
+ right: 0;
312
+ width: var(--bar-width);
313
+ }
314
+
315
+ .nmorph-scroll__bar--horizontal {
316
+ right: 0;
317
+ bottom: 0;
318
+ left: 0;
319
+ height: var(--bar-height);
320
+ }
321
+
322
+ .nmorph-scroll__thumb {
323
+ position: absolute;
324
+ top: 0;
325
+ left: 0;
326
+ border-radius: var(--border-radius-40);
327
+ background-color: var(--thumb-color);
328
+ cursor: pointer;
329
+ transition: background-color ease-in-out 0.16s;
330
+ touch-action: none;
331
+ }
332
+
333
+ .nmorph-scroll__thumb--vertical {
334
+ width: 100%;
335
+ }
336
+
337
+ .nmorph-scroll__thumb--horizontal {
338
+ height: 100%;
339
+ }
340
+
341
+ .nmorph-scroll--show-bars .nmorph-scroll__bar,
342
+ .nmorph-scroll__bar:hover {
343
+ opacity: 1;
344
+ }
345
+
346
+ .nmorph-scroll--dragging .nmorph-scroll__thumb {
347
+ cursor: grabbing;
268
348
  }
269
349
 
270
350
  .nmorph-scroll::-webkit-scrollbar {
@@ -298,7 +378,7 @@ const u = {
298
378
 
299
379
  .nmorph-scroll::-webkit-scrollbar-track {
300
380
  border-radius: var(--border-radius-40);
301
- ${t()}
381
+ ${r()}
302
382
  }
303
383
 
304
384
  .nmorph-scroll::-webkit-scrollbar-thumb {
@@ -335,7 +415,7 @@ const u = {
335
415
  }
336
416
 
337
417
  .nmorph--thin-component.nmorph-native-input {
338
- ${e()}
418
+ ${a()}
339
419
  }
340
420
 
341
421
  .nmorph-native-input:focus {
@@ -410,12 +490,12 @@ const u = {
410
490
 
411
491
  `;
412
492
  for (const [n, i] of Object.entries(u))
413
- r += `
493
+ t += `
414
494
  .${n} {
415
495
  ${i()}
416
496
  }
417
497
  `;
418
- return r;
498
+ return t;
419
499
  }, g = () => {
420
500
  if (typeof document > "u" || document.getElementById("nmorph-common-styles")) return;
421
501
  const o = document.createElement("style");