@nmorph/nmorph-ui-kit 3.0.13 → 3.0.15

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.
@@ -16,9 +16,9 @@ const $ = {
16
16
  black: "#000000",
17
17
  overlay: "#00000095"
18
18
  }, V = {
19
- darkShade: "#c8c9ca",
19
+ darkShade: "#c4c8ca",
20
20
  main: "#e9ecec",
21
- lightShade: "#fdfdfd",
21
+ lightShade: "#fcfcfc",
22
22
  text: "#687b9e",
23
23
  scrollThumb: "#687b9e",
24
24
  accent: "#4a90e2",
@@ -27,9 +27,9 @@ const $ = {
27
27
  semiContrastText: "#8a9dc0",
28
28
  contrastText: "#b4c4de"
29
29
  }, F = {
30
- darkShade: "#0f1112",
30
+ darkShade: "#131415",
31
31
  main: "#1c1f21",
32
- lightShade: "#292d30",
32
+ lightShade: "#242728",
33
33
  text: "#778288",
34
34
  scrollThumb: "#778288",
35
35
  accent: "#006cb6",
@@ -48,7 +48,7 @@ const $ = {
48
48
  darkShadeGeneratorCoefficient: -45,
49
49
  lightShadeGeneratorCoefficient: 45,
50
50
  other: {
51
- baseShadowWidth: "3.5px",
51
+ baseShadowWidth: "2px",
52
52
  baseShadowBlurCoefficient: "2"
53
53
  }
54
54
  }, U = (r) => /^#[0-9A-Fa-f]{6}$/.test(r), L = (r) => {
@@ -64,8 +64,8 @@ const $ = {
64
64
  }, y = (r, e) => {
65
65
  let n = parseInt(r.substring(1, 3), 16), a = parseInt(r.substring(3, 5), 16), s = parseInt(r.substring(5, 7), 16);
66
66
  n = Math.round(n * (1 + e / 100)), a = Math.round(a * (1 + e / 100)), s = Math.round(s * (1 + e / 100)), n = Math.min(255, Math.max(0, n)), a = Math.min(255, Math.max(0, a)), s = Math.min(255, Math.max(0, s));
67
- const i = n.toString(16).padStart(2, "0"), c = a.toString(16).padStart(2, "0"), l = s.toString(16).padStart(2, "0");
68
- return `#${i}${c}${l}`;
67
+ const c = n.toString(16).padStart(2, "0"), i = a.toString(16).padStart(2, "0"), d = s.toString(16).padStart(2, "0");
68
+ return `#${c}${i}${d}`;
69
69
  }, G = (r) => ({
70
70
  themes: r?.themes ?? C.themes,
71
71
  defaultTheme: r?.defaultTheme ?? C.defaultTheme,
@@ -87,14 +87,14 @@ const $ = {
87
87
  name: `--nmorph-${E(e)}-color`,
88
88
  color: n
89
89
  })), P = (r, e) => {
90
- const n = (i) => i.map((c) => `${c.name}: ${c.color};`).join(" "), a = Object.entries(e).map(([i, c]) => `--${E(i)}: ${c};`).join(" "), s = [];
91
- return Object.entries(r).forEach(([i, c]) => {
92
- const l = x($);
93
- if (i === "common") s.push(n(A(l, c)));
90
+ const n = (c) => c.map((i) => `${i.name}: ${i.color};`).join(" "), a = Object.entries(e).map(([c, i]) => `--${E(c)}: ${i};`).join(" "), s = [];
91
+ return Object.entries(r).forEach(([c, i]) => {
92
+ const d = x($);
93
+ if (c === "common") s.push(n(A(d, i)));
94
94
  else {
95
95
  const S = `
96
- &[${T}='${i}'] {
97
- ${n(c)}
96
+ &[${T}='${c}'] {
97
+ ${n(i)}
98
98
  }
99
99
  `;
100
100
  s.push(S);
@@ -109,8 +109,8 @@ const $ = {
109
109
  const e = {};
110
110
  return Object.entries(r.themes).forEach(([n, a]) => {
111
111
  e[n] = [];
112
- const s = !!a.darkShade, i = !!a.lightShade;
113
- !!a.main && !s && !i && a.main && (e[n] = x(N(r, a.main))), e[n] = [...e[n], ...x(a)];
112
+ const s = !!a.darkShade, c = !!a.lightShade;
113
+ !!a.main && !s && !c && a.main && (e[n] = x(N(r, a.main))), e[n] = [...e[n], ...x(a)];
114
114
  }), e;
115
115
  }, J = (r) => {
116
116
  const e = G(r);
@@ -133,7 +133,7 @@ const $ = {
133
133
  }, s = (o) => Object.entries(o).filter(([, t]) => typeof t == "string").map(([t, h]) => ({
134
134
  name: `--nmorph-${E(t)}-color`,
135
135
  color: h
136
- })), i = (o, t) => {
136
+ })), c = (o, t) => {
137
137
  const h = (f) => f.map((u) => `${u.name}: ${u.color};`).join(" "), m = Object.entries(t).map(([f, u]) => `--${E(f)}: ${u};`).join(" "), b = [];
138
138
  return Object.entries(o).forEach(([f, u]) => {
139
139
  const k = s($);
@@ -152,20 +152,20 @@ const $ = {
152
152
  ${m}
153
153
  }
154
154
  `;
155
- }, c = (o) => {
155
+ }, i = (o) => {
156
156
  const t = {};
157
157
  return Object.entries(o).forEach(([h, m]) => {
158
158
  t[h] = [];
159
159
  const b = !!m.darkShade, f = !!m.lightShade;
160
160
  !!m.main && !b && !f && m.main && (t[h] = a(m.main)), t[h] = [...t[h], ...s(m)];
161
161
  }), t;
162
- }, l = typeof document < "u", S = H(e.defaultTheme);
163
- let g = c(e.themes), d = null;
164
- l && (d = document.getElementById("nmorph-theme-styles"), d || (d = document.createElement("style"), d.id = "nmorph-theme-styles", d.type = "text/css", document.head.appendChild(d)), d.innerHTML = i(g, e.other));
162
+ }, d = typeof document < "u", S = H(e.defaultTheme);
163
+ let g = i(e.themes), l = null;
164
+ d && (l = document.getElementById("nmorph-theme-styles"), l || (l = document.createElement("style"), l.id = "nmorph-theme-styles", l.type = "text/css", document.head.appendChild(l)), l.innerHTML = c(g, e.other));
165
165
  const D = () => {
166
- g = c(e.themes), d && (d.innerHTML = i(g, e.other));
166
+ g = i(e.themes), l && (l.innerHTML = c(g, e.other));
167
167
  }, p = (o) => {
168
- S.value = o, l && (document.documentElement.setAttribute(T, S.value), !(typeof localStorage > "u") && (e.saveCurrentThemeToLS ? localStorage.setItem(T, o) : localStorage.removeItem(T)));
168
+ S.value = o, d && (document.documentElement.setAttribute(T, S.value), !(typeof localStorage > "u") && (e.saveCurrentThemeToLS ? localStorage.setItem(T, o) : localStorage.removeItem(T)));
169
169
  }, M = (o, t) => {
170
170
  const h = t.main && !t.darkShade && !t.lightShade ? n(t.main) : {};
171
171
  e.themes[o] = { ...e.themes[o], ...t, ...h }, D();
@@ -175,7 +175,7 @@ const $ = {
175
175
  const o = document.documentElement.getAttribute(T), t = typeof localStorage < "u" ? localStorage.getItem(T) : null, h = t ? g[t] : void 0, m = o ? g[o] : void 0;
176
176
  return e.saveCurrentThemeToLS && t && h ? t : o && m ? o : S.value;
177
177
  };
178
- l ? document.documentElement.hasAttribute(T) ? window.requestAnimationFrame(() => p(v())) : p(v()) : p(S.value);
178
+ d ? document.documentElement.hasAttribute(T) ? window.requestAnimationFrame(() => p(v())) : p(v()) : p(S.value);
179
179
  const j = e;
180
180
  return {
181
181
  setTheme: p,
@@ -1,4 +1,4 @@
1
- const a = "3.0.13", e = {
1
+ const a = "3.0.15", e = {
2
2
  version: a
3
3
  };
4
4
  export {
@@ -17,6 +17,7 @@ declare const _default: DefineComponent<INmorphMediaGalleryProps, {}, {}, {}, {}
17
17
  "onUpdate:active-index"?: (value: number) => any;
18
18
  onFullscreen?: (item: NmorphMediaGalleryItem, index: number) => any;
19
19
  }>, {
20
+ design: "nmorph" | "plain";
20
21
  modelValue: boolean;
21
22
  height: string | number;
22
23
  zIndex: number;
@@ -1,4 +1,4 @@
1
- import { NmorphCSSProperties } from '../../../types';
1
+ import { NmorphCSSProperties, NmorphElementDesignType } from '../../../types';
2
2
  export type NmorphMediaGalleryFit = 'cover' | 'contain';
3
3
  export type NmorphMediaGalleryTriggerLayout = 'grid' | 'natural' | 'mosaic';
4
4
  export type NmorphMediaGalleryVideoPreload = 'none' | 'metadata' | 'auto';
@@ -28,6 +28,7 @@ export type NmorphMediaGalleryItem = (INmorphMediaGalleryItemBase & {
28
28
  });
29
29
  export interface INmorphMediaGalleryProps {
30
30
  modelValue?: boolean;
31
+ design?: NmorphElementDesignType;
31
32
  items: NmorphMediaGalleryItem[];
32
33
  initialIndex?: number;
33
34
  activeIndex?: number;