@nmorph/nmorph-ui-kit 2.2.45 → 2.2.47

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 (39) hide show
  1. package/dist/assets/icons/forward.svg.js +11 -7
  2. package/dist/assets/icons/reply.svg.js +9 -5
  3. package/dist/components/basic/nmorph-icon/NmorphIcon.css +1 -1
  4. package/dist/components/basic/nmorph-link/NmorphLink.vue.js +46 -34
  5. package/dist/components/data/nmorph-emoji-picker/NmorphEmojiPicker.css +1 -1
  6. package/dist/components/data/nmorph-emoji-picker/NmorphEmojiPicker.vue.js +42 -40
  7. package/dist/components/feedback/nmorph-callout/NmorphCallout.css +1 -1
  8. package/dist/components/feedback/nmorph-callout/NmorphCallout.vue.js +66 -28
  9. package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.css +1 -1
  10. package/dist/components/providers/nmorph-notification-provider/NmorphNotificationProvider.vue.js +81 -47
  11. package/dist/emoji/base.js +77 -0
  12. package/dist/emoji/index.d.ts +2 -0
  13. package/dist/emoji/index.js +16 -0
  14. package/dist/emoji/locales/en.js +41 -0
  15. package/dist/emoji/locales/ru.js +41 -0
  16. package/dist/emoji/locales/zh.js +41 -0
  17. package/dist/index.es.js +861 -855
  18. package/dist/index.umd.js +27 -27
  19. package/dist/package.json.js +1 -1
  20. package/dist/src/components/basic/nmorph-link/NmorphLink.vue.d.ts +7 -0
  21. package/dist/src/components/basic/nmorph-link/types.d.ts +7 -0
  22. package/dist/src/components/data/nmorph-audio-preview/NmorphAudioPreview.vue.d.ts +2 -2
  23. package/dist/src/components/data/nmorph-emoji-picker/NmorphEmojiPicker.vue.d.ts +1 -0
  24. package/dist/src/components/data/nmorph-emoji-picker/types.d.ts +1 -0
  25. package/dist/src/components/data/nmorph-empty/NmorphEmpty.vue.d.ts +1 -1
  26. package/dist/src/components/data/nmorph-file-card/NmorphFileCard.vue.d.ts +2 -2
  27. package/dist/src/components/data/nmorph-video-preview/NmorphVideoPreview.vue.d.ts +2 -2
  28. package/dist/src/components/feedback/nmorph-callout/NmorphCallout.vue.d.ts +17 -3
  29. package/dist/src/components/feedback/nmorph-callout/types.d.ts +12 -1
  30. package/dist/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.d.ts +2 -2
  31. package/dist/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue.d.ts +2 -2
  32. package/dist/src/emoji/base.d.ts +20 -0
  33. package/dist/src/emoji/index.d.ts +8 -0
  34. package/dist/src/emoji/locales/en.d.ts +3 -0
  35. package/dist/src/emoji/locales/ru.d.ts +3 -0
  36. package/dist/src/emoji/locales/zh.d.ts +3 -0
  37. package/dist/src/main.d.ts +1 -0
  38. package/dist/style.css +1 -1
  39. package/package.json +17 -1
@@ -1,18 +1,22 @@
1
- import { openBlock as t, createElementBlock as o, createElementVNode as n } from "vue";
2
- const r = {
1
+ import { openBlock as o, createElementBlock as r, createElementVNode as t } from "vue";
2
+ const n = {
3
3
  xmlns: "http://www.w3.org/2000/svg",
4
4
  viewBox: "0 0 1024 1024"
5
5
  };
6
- function l(c, e) {
7
- return t(), o("svg", r, [...e[0] || (e[0] = [
8
- n("path", {
6
+ function l(s, e) {
7
+ return o(), r("svg", n, [...e[0] || (e[0] = [
8
+ t("path", {
9
9
  fill: "none",
10
+ stroke: "currentColor",
11
+ "stroke-linecap": "round",
12
+ "stroke-linejoin": "round",
13
+ "stroke-width": "72",
10
14
  d: "m576 288 224 224-224 224m192-224H480c-154.667 0-256 101.333-256 256"
11
15
  }, null, -1)
12
16
  ])]);
13
17
  }
14
- const m = { render: l };
18
+ const c = { render: l };
15
19
  export {
16
- m as default,
20
+ c as default,
17
21
  l as render
18
22
  };
@@ -1,12 +1,16 @@
1
- import { openBlock as t, createElementBlock as n, createElementVNode as o } from "vue";
2
- const r = {
1
+ import { openBlock as o, createElementBlock as r, createElementVNode as t } from "vue";
2
+ const n = {
3
3
  xmlns: "http://www.w3.org/2000/svg",
4
4
  viewBox: "0 0 1024 1024"
5
5
  };
6
- function l(c, e) {
7
- return t(), n("svg", r, [...e[0] || (e[0] = [
8
- o("path", {
6
+ function l(s, e) {
7
+ return o(), r("svg", n, [...e[0] || (e[0] = [
8
+ t("path", {
9
9
  fill: "none",
10
+ stroke: "currentColor",
11
+ "stroke-linecap": "round",
12
+ "stroke-linejoin": "round",
13
+ "stroke-width": "72",
10
14
  d: "M448 288 224 512l224 224M256 512h288c154.667 0 256 101.333 256 256"
11
15
  }, null, -1)
12
16
  ])]);
@@ -1 +1 @@
1
- .nmorph-icon,.nmorph-icon .nmorph-icon__content{display:flex;justify-content:center;align-items:center;width:var(--width);min-width:var(--width);height:var(--height);min-height:var(--height)}.nmorph-icon svg{width:100%;height:100%;fill:var(--color);stroke-width:0}.nmorph-icon path{stroke:var(--color)}.nmorph-icon.nmorph-icon--small{--width: 14px;--height: 14px}.nmorph-icon.nmorph-icon--medium{--width: 20px;--height: 20px}.nmorph-icon.nmorph-icon--large{--width: 32px;--height: 32px}.nmorph-icon{--color: var(--nmorph-icon-color, var(--nmorph-text-color))}
1
+ .nmorph-icon,.nmorph-icon .nmorph-icon__content{display:flex;justify-content:center;align-items:center;width:var(--width);min-width:var(--width);height:var(--height);min-height:var(--height)}.nmorph-icon svg{width:100%;height:100%;fill:var(--color)}.nmorph-icon path[stroke],.nmorph-icon path[stroke-width],.nmorph-icon path[fill=none],.nmorph-icon rect[stroke],.nmorph-icon rect[stroke-width],.nmorph-icon rect[fill=none],.nmorph-icon line[stroke],.nmorph-icon line[stroke-width],.nmorph-icon polyline[stroke],.nmorph-icon polyline[stroke-width],.nmorph-icon polygon[stroke],.nmorph-icon polygon[stroke-width]{stroke:var(--color)}.nmorph-icon.nmorph-icon--small{--width: 14px;--height: 14px}.nmorph-icon.nmorph-icon--medium{--width: 20px;--height: 20px}.nmorph-icon.nmorph-icon--large{--width: 32px;--height: 32px}.nmorph-icon{--color: var(--nmorph-icon-color, var(--nmorph-text-color))}
@@ -1,73 +1,85 @@
1
1
  import './NmorphLink.css';
2
- import { defineComponent as y, useSlots as k, computed as l, openBlock as t, createElementBlock as v, normalizeStyle as C, normalizeClass as g, createElementVNode as x, renderSlot as a, createBlock as s, unref as i, withCtx as d, resolveDynamicComponent as $, createCommentVNode as p, createTextVNode as B, toDisplayString as b } from "vue";
3
- import { useModifiers as S } from "../../../utils/create-modifiers.js";
4
- import { createCssVariables as V } from "../../../utils/common.js";
5
- import * as w from "../nmorph-icon/NmorphIcons.js";
6
- import { NmorphColor as I } from "../../../types/common.types.js";
7
- import f from "../nmorph-icon/NmorphIcon.vue.js";
2
+ import { defineComponent as k, useSlots as _, computed as r, openBlock as t, createElementBlock as C, normalizeStyle as w, normalizeClass as b, createElementVNode as x, normalizeProps as B, guardReactiveProps as $, renderSlot as i, createBlock as n, unref as s, withCtx as f, resolveDynamicComponent as P, createCommentVNode as p, createTextVNode as S, toDisplayString as L } from "vue";
3
+ import { useModifiers as V } from "../../../utils/create-modifiers.js";
4
+ import { createCssVariables as z } from "../../../utils/common.js";
5
+ import * as I from "../nmorph-icon/NmorphIcons.js";
6
+ import { NmorphLinkTarget as T } from "./types.js";
7
+ import { NmorphColor as A } from "../../../types/common.types.js";
8
+ import m from "../nmorph-icon/NmorphIcon.vue.js";
8
9
  /* empty css */
9
- const z = ["href", "target"], P = /* @__PURE__ */ y({
10
+ const F = /* @__PURE__ */ k({
10
11
  __name: "NmorphLink",
11
12
  props: {
12
- type: { default: I.accent },
13
+ type: { default: A.accent },
13
14
  underline: { type: Boolean, default: !1 },
14
15
  href: { default: "" },
15
16
  text: { default: "" },
16
17
  target: { default: "self" },
18
+ rel: { default: void 0 },
19
+ referrerpolicy: { default: void 0 },
20
+ referrerPolicy: { default: void 0 },
21
+ download: { type: [String, Boolean], default: void 0 },
22
+ ariaLabel: { default: void 0 },
23
+ title: { default: void 0 },
17
24
  disabled: { type: Boolean, default: !1 },
18
25
  color: { default: void 0 },
19
26
  iconName: { default: void 0 }
20
27
  },
21
- setup(c) {
22
- const e = c, u = k(), r = w, h = (o) => o.split(/[-_\s]+/).filter(Boolean).map((n) => `${n.charAt(0).toUpperCase()}${n.slice(1)}`).join(""), m = l(() => {
28
+ setup(d) {
29
+ const e = d, u = _(), l = I, h = (o) => o.split(/[-_\s]+/).filter(Boolean).map((a) => `${a.charAt(0).toUpperCase()}${a.slice(1)}`).join(""), c = r(() => {
23
30
  if (e.iconName)
24
- return e.iconName in r ? r[e.iconName] : r[`NmorphIcon${h(e.iconName)}`];
25
- }), N = l(
26
- () => S({
31
+ return e.iconName in l ? l[e.iconName] : l[`NmorphIcon${h(e.iconName)}`];
32
+ }), v = r(
33
+ () => V({
27
34
  "nmorph-link": [e.type, e.underline && "underline", e.disabled && "disabled"]
28
35
  })
29
- ), _ = l(
30
- () => V({
36
+ ), y = r(
37
+ () => z({
31
38
  "--link-color": e.color
32
39
  })
33
- );
34
- return (o, n) => (t(), v("div", {
35
- class: g(N.value),
36
- style: C(_.value)
40
+ ), N = r(() => T[e.target] ?? e.target), g = r(() => ({
41
+ href: e.href,
42
+ target: N.value,
43
+ rel: e.rel,
44
+ referrerpolicy: e.referrerpolicy ?? e.referrerPolicy,
45
+ download: e.download === !0 ? "" : e.download === !1 ? void 0 : e.download,
46
+ "aria-label": e.ariaLabel,
47
+ title: e.title
48
+ }));
49
+ return (o, a) => (t(), C("div", {
50
+ class: b(v.value),
51
+ style: w(y.value)
37
52
  }, [
38
- x("a", {
39
- href: e.href,
40
- target: e.target
41
- }, [
42
- a(o.$slots, "prepend"),
43
- m.value ? (t(), s(i(f), {
53
+ x("a", B($(g.value)), [
54
+ i(o.$slots, "prepend"),
55
+ c.value ? (t(), n(s(m), {
44
56
  key: 0,
45
57
  class: "nmorph-link__icon",
46
58
  width: "10px",
47
59
  height: "10px"
48
60
  }, {
49
- default: d(() => [
50
- (t(), s($(m.value)))
61
+ default: f(() => [
62
+ (t(), n(P(c.value)))
51
63
  ]),
52
64
  _: 1
53
65
  })) : p("", !0),
54
- B(" " + b(c.text) + " ", 1),
55
- i(u).icon ? (t(), s(i(f), {
66
+ S(" " + L(d.text) + " ", 1),
67
+ s(u).icon ? (t(), n(s(m), {
56
68
  key: 1,
57
69
  class: "nmorph-link__icon",
58
70
  width: "10px",
59
71
  height: "10px"
60
72
  }, {
61
- default: d(() => [
62
- a(o.$slots, "icon")
73
+ default: f(() => [
74
+ i(o.$slots, "icon")
63
75
  ]),
64
76
  _: 3
65
77
  })) : p("", !0),
66
- a(o.$slots, "default")
67
- ], 8, z)
78
+ i(o.$slots, "default")
79
+ ], 16)
68
80
  ], 6));
69
81
  }
70
82
  });
71
83
  export {
72
- P as default
84
+ F as default
73
85
  };
@@ -1 +1 @@
1
- .nmorph-emoji-picker{--nmorph-emoji-picker-width: 300px;--nmorph-emoji-picker-height: 260px;--nmorph-emoji-picker-columns: 8;--nmorph-emoji-picker-cell-size: 32px;--nmorph-emoji-picker-toggle-size: 28px;--nmorph-emoji-picker-scrollbar-size: 6px;--nmorph-emoji-picker-hover-background: color-mix(in srgb, var(--nmorph-text-color) 8%, transparent);--nmorph-emoji-picker-active-background: color-mix(in srgb, var(--nmorph-text-color) 12%, var(--nmorph-main-color));--nmorph-emoji-picker-focus-ring: color-mix(in srgb, var(--nmorph-text-color) 24%, transparent);--nmorph-emoji-picker-toggle-inset: calc(var(--indentation-02) + 2px);--nmorph-emoji-picker-toggle-reserve: calc( var(--nmorph-emoji-picker-toggle-size) + var(--nmorph-emoji-picker-toggle-inset) + var(--indentation-02) );position:relative;box-sizing:border-box;width:min(100%,var(--nmorph-emoji-picker-width));min-width:0;color:var(--nmorph-text-color);font:inherit}.nmorph-emoji-picker .nmorph-emoji-picker__compact,.nmorph-emoji-picker .nmorph-emoji-picker__panel{box-sizing:border-box;width:100%;background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--nmorph-shadow-inset)}.nmorph-emoji-picker .nmorph-emoji-picker__compact{display:flex;gap:var(--indentation-02);align-items:center;min-height:48px;padding:var(--indentation-02)}.nmorph-emoji-picker .nmorph-emoji-picker__quick-list{display:flex;flex:1 1 auto;gap:4px;min-width:0}.nmorph-emoji-picker .nmorph-emoji-picker__quick-button,.nmorph-emoji-picker .nmorph-emoji-picker__category,.nmorph-emoji-picker .nmorph-emoji-picker__emoji{margin:0;color:inherit;font:inherit;background:transparent;border:0;box-shadow:none;cursor:pointer;appearance:none}.nmorph-emoji-picker .nmorph-emoji-picker__quick-button:disabled,.nmorph-emoji-picker .nmorph-emoji-picker__category:disabled,.nmorph-emoji-picker .nmorph-emoji-picker__emoji:disabled{cursor:not-allowed;opacity:.5}.nmorph-emoji-picker .nmorph-emoji-picker__quick-button:focus,.nmorph-emoji-picker .nmorph-emoji-picker__category:focus,.nmorph-emoji-picker .nmorph-emoji-picker__emoji:focus{outline:none}.nmorph-emoji-picker .nmorph-emoji-picker__quick-button:focus-visible,.nmorph-emoji-picker .nmorph-emoji-picker__category:focus-visible,.nmorph-emoji-picker .nmorph-emoji-picker__emoji:focus-visible{box-shadow:var(--nmorph-shadow-inset),0 0 0 1px var(--nmorph-emoji-picker-focus-ring)}.nmorph-emoji-picker .nmorph-emoji-picker__quick-button,.nmorph-emoji-picker .nmorph-emoji-picker__emoji{display:inline-flex;flex:0 0 var(--nmorph-emoji-picker-cell-size);justify-content:center;align-items:center;width:var(--nmorph-emoji-picker-cell-size);height:var(--nmorph-emoji-picker-cell-size);padding:0;font-size:20px;line-height:1;border-radius:var(--default-border-radius)}.nmorph-emoji-picker .nmorph-emoji-picker__quick-button:hover:not(:disabled),.nmorph-emoji-picker .nmorph-emoji-picker__emoji:hover:not(:disabled){background:var(--nmorph-emoji-picker-hover-background)}.nmorph-emoji-picker .nmorph-emoji-picker__toggle-button{position:absolute;top:var(--nmorph-emoji-picker-toggle-inset);right:var(--nmorph-emoji-picker-toggle-inset);z-index:2;width:var(--nmorph-emoji-picker-toggle-size);min-width:var(--nmorph-emoji-picker-toggle-size);height:var(--nmorph-emoji-picker-toggle-size);min-height:var(--nmorph-emoji-picker-toggle-size);color:var(--nmorph-semi-contrast-text-color);--height: var(--nmorph-emoji-picker-toggle-size);--size: var(--nmorph-emoji-picker-toggle-size);--nmorph-selection-control-inline-padding: 0;--color: currentColor}.nmorph-emoji-picker .nmorph-emoji-picker__toggle-button .nmorph-checkbox__content,.nmorph-emoji-picker .nmorph-emoji-picker__toggle-button .nmorph-checkbox__fake{width:var(--nmorph-emoji-picker-toggle-size);min-width:var(--nmorph-emoji-picker-toggle-size);height:var(--nmorph-emoji-picker-toggle-size);min-height:var(--nmorph-emoji-picker-toggle-size)}.nmorph-emoji-picker .nmorph-emoji-picker__toggle-button .nmorph-checkbox__fake{padding:0;color:currentColor}.nmorph-emoji-picker .nmorph-emoji-picker__toggle-button .nmorph-icon{--color: currentColor}.nmorph-emoji-picker .nmorph-emoji-picker__toggle-button input:focus-visible{outline:none;opacity:0;scale:1}.nmorph-emoji-picker .nmorph-emoji-picker__toggle-button input:focus-visible+.nmorph-checkbox__fake{outline:1px solid var(--nmorph-emoji-picker-focus-ring);outline-offset:1px}.nmorph-emoji-picker .nmorph-emoji-picker__toggle-button:hover:not(.nmorph-checkbox--disabled){color:var(--nmorph-text-color);--color: var(--nmorph-text-color)}.nmorph-emoji-picker .nmorph-emoji-picker__toggle-button:hover:not(.nmorph-checkbox--disabled) .nmorph-icon{--color: var(--nmorph-text-color)}.nmorph-emoji-picker .nmorph-emoji-picker__button-label{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;white-space:nowrap;clip-path:inset(50%)}.nmorph-emoji-picker .nmorph-emoji-picker__panel{display:flex;flex-direction:column;height:var(--nmorph-emoji-picker-height);min-height:180px;max-height:min(60vh,var(--nmorph-emoji-picker-height));padding:var(--indentation-02);overflow:hidden}.nmorph-emoji-picker .nmorph-emoji-picker__toolbar{display:flex;flex:0 0 auto;gap:var(--indentation-02);align-items:center;min-width:0;padding:2px}.nmorph-emoji-picker.nmorph-emoji-picker--collapsible .nmorph-emoji-picker__compact,.nmorph-emoji-picker.nmorph-emoji-picker--collapsible .nmorph-emoji-picker__toolbar{padding-right:var(--nmorph-emoji-picker-toggle-reserve)}.nmorph-emoji-picker .nmorph-emoji-picker__search{flex:1 1 auto;min-width:0}.nmorph-emoji-picker .nmorph-emoji-picker__categories{display:flex;flex:0 0 auto;gap:4px;align-items:flex-start;min-width:0;margin:var(--indentation-02) 0;padding:0 2px}.nmorph-emoji-picker .nmorph-emoji-picker__categories .nmorph-scroll__bar--horizontal{right:2px;left:2px}.nmorph-emoji-picker .nmorph-emoji-picker__category{display:inline-flex;flex:0 0 auto;justify-content:center;align-items:center;max-width:120px;min-height:28px;padding:0 10px;overflow:hidden;color:var(--nmorph-semi-contrast-text-color);font-size:var(--font-size-extra-small);line-height:var(--line-height-regular);white-space:nowrap;text-overflow:ellipsis;border-radius:var(--default-border-radius)}.nmorph-emoji-picker .nmorph-emoji-picker__category:hover:not(:disabled){color:var(--nmorph-text-color);background:var(--nmorph-emoji-picker-hover-background)}.nmorph-emoji-picker .nmorph-emoji-picker__category.nmorph-emoji-picker__category--active{color:var(--nmorph-text-color);background:var(--nmorph-emoji-picker-active-background);box-shadow:var(--nmorph-shadow-inset)}.nmorph-emoji-picker .nmorph-emoji-picker__body{flex:1 1 auto;min-height:0}.nmorph-emoji-picker .nmorph-emoji-picker__body-content{box-sizing:border-box;min-height:100%;padding:2px}.nmorph-emoji-picker .nmorph-emoji-picker__section{display:grid;gap:4px}.nmorph-emoji-picker .nmorph-emoji-picker__section+.nmorph-emoji-picker__section{margin-top:var(--indentation-02)}.nmorph-emoji-picker .nmorph-emoji-picker__section-title{padding:0 4px;color:var(--nmorph-semi-contrast-text-color);font-weight:600;font-size:var(--font-size-extra-small);line-height:var(--line-height-regular)}.nmorph-emoji-picker .nmorph-emoji-picker__grid{display:grid;grid-template-columns:repeat(var(--nmorph-emoji-picker-columns),minmax(0,1fr));gap:2px}.nmorph-emoji-picker .nmorph-emoji-picker__emoji{width:100%;min-width:0}.nmorph-emoji-picker .nmorph-emoji-picker__emoji-symbol{display:block;line-height:1}.nmorph-emoji-picker .nmorph-emoji-picker__empty{display:grid;gap:var(--indentation-02);place-items:center;min-height:100%;padding:var(--indentation-04);color:var(--nmorph-semi-contrast-text-color);text-align:center;--color: currentColor}.nmorph-emoji-picker.nmorph-emoji-picker--disabled{opacity:.65}
1
+ .nmorph-emoji-picker{--nmorph-emoji-picker-width: 300px;--nmorph-emoji-picker-height: 260px;--nmorph-emoji-picker-columns: 8;--nmorph-emoji-picker-cell-size: 32px;--nmorph-emoji-picker-toggle-size: 28px;--nmorph-emoji-picker-scrollbar-size: 6px;--nmorph-emoji-picker-hover-background: color-mix(in srgb, var(--nmorph-text-color) 8%, transparent);--nmorph-emoji-picker-active-background: color-mix(in srgb, var(--nmorph-text-color) 12%, var(--nmorph-main-color));--nmorph-emoji-picker-focus-ring: color-mix(in srgb, var(--nmorph-text-color) 24%, transparent);--nmorph-emoji-picker-toggle-inset: calc(var(--indentation-02) + 2px);--nmorph-emoji-picker-toggle-reserve: calc( var(--nmorph-emoji-picker-toggle-size) + var(--nmorph-emoji-picker-toggle-inset) + var(--indentation-02) );position:relative;box-sizing:border-box;width:min(100%,var(--nmorph-emoji-picker-width));min-width:0;color:var(--nmorph-text-color);font:inherit}.nmorph-emoji-picker .nmorph-emoji-picker__compact,.nmorph-emoji-picker .nmorph-emoji-picker__panel{box-sizing:border-box;width:100%;background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--nmorph-shadow-inset)}.nmorph-emoji-picker .nmorph-emoji-picker__compact{display:flex;gap:var(--indentation-02);align-items:center;min-height:48px;padding:var(--indentation-02)}.nmorph-emoji-picker .nmorph-emoji-picker__quick-list{display:flex;flex:1 1 auto;gap:4px;min-width:0}.nmorph-emoji-picker .nmorph-emoji-picker__quick-button,.nmorph-emoji-picker .nmorph-emoji-picker__category,.nmorph-emoji-picker .nmorph-emoji-picker__emoji{margin:0;color:inherit;font:inherit;background:transparent;border:0;box-shadow:none;cursor:pointer;appearance:none}.nmorph-emoji-picker .nmorph-emoji-picker__quick-button:disabled,.nmorph-emoji-picker .nmorph-emoji-picker__category:disabled,.nmorph-emoji-picker .nmorph-emoji-picker__emoji:disabled{cursor:not-allowed;opacity:.5}.nmorph-emoji-picker .nmorph-emoji-picker__quick-button:focus,.nmorph-emoji-picker .nmorph-emoji-picker__category:focus,.nmorph-emoji-picker .nmorph-emoji-picker__emoji:focus{outline:none}.nmorph-emoji-picker .nmorph-emoji-picker__quick-button:focus-visible,.nmorph-emoji-picker .nmorph-emoji-picker__category:focus-visible,.nmorph-emoji-picker .nmorph-emoji-picker__emoji:focus-visible{box-shadow:var(--nmorph-shadow-inset),0 0 0 1px var(--nmorph-emoji-picker-focus-ring)}.nmorph-emoji-picker .nmorph-emoji-picker__quick-button,.nmorph-emoji-picker .nmorph-emoji-picker__emoji{display:inline-flex;flex:0 0 var(--nmorph-emoji-picker-cell-size);justify-content:center;align-items:center;width:var(--nmorph-emoji-picker-cell-size);height:var(--nmorph-emoji-picker-cell-size);padding:0;font-size:20px;line-height:1;border-radius:var(--default-border-radius)}.nmorph-emoji-picker .nmorph-emoji-picker__quick-button:hover:not(:disabled),.nmorph-emoji-picker .nmorph-emoji-picker__emoji:hover:not(:disabled){background:var(--nmorph-emoji-picker-hover-background)}.nmorph-emoji-picker .nmorph-emoji-picker__toggle-button{position:absolute;top:var(--nmorph-emoji-picker-toggle-inset);right:var(--nmorph-emoji-picker-toggle-inset);z-index:2;width:var(--nmorph-emoji-picker-toggle-size);min-width:var(--nmorph-emoji-picker-toggle-size);height:var(--nmorph-emoji-picker-toggle-size);min-height:var(--nmorph-emoji-picker-toggle-size);color:var(--nmorph-semi-contrast-text-color);--height: var(--nmorph-emoji-picker-toggle-size);--size: var(--nmorph-emoji-picker-toggle-size);--nmorph-selection-control-inline-padding: 0;--color: currentColor}.nmorph-emoji-picker .nmorph-emoji-picker__toggle-button .nmorph-checkbox__content,.nmorph-emoji-picker .nmorph-emoji-picker__toggle-button .nmorph-checkbox__fake{width:var(--nmorph-emoji-picker-toggle-size);min-width:var(--nmorph-emoji-picker-toggle-size);height:var(--nmorph-emoji-picker-toggle-size);min-height:var(--nmorph-emoji-picker-toggle-size)}.nmorph-emoji-picker .nmorph-emoji-picker__toggle-button .nmorph-checkbox__fake{padding:0;color:currentColor}.nmorph-emoji-picker .nmorph-emoji-picker__toggle-button .nmorph-icon{--color: currentColor}.nmorph-emoji-picker .nmorph-emoji-picker__toggle-button input:focus-visible{outline:none;opacity:0;scale:1}.nmorph-emoji-picker .nmorph-emoji-picker__toggle-button input:focus-visible+.nmorph-checkbox__fake{outline:1px solid var(--nmorph-emoji-picker-focus-ring);outline-offset:1px}.nmorph-emoji-picker .nmorph-emoji-picker__toggle-button:hover:not(.nmorph-checkbox--disabled){color:var(--nmorph-text-color);--color: var(--nmorph-text-color)}.nmorph-emoji-picker .nmorph-emoji-picker__toggle-button:hover:not(.nmorph-checkbox--disabled) .nmorph-icon{--color: var(--nmorph-text-color)}.nmorph-emoji-picker .nmorph-emoji-picker__button-label{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;white-space:nowrap;clip-path:inset(50%)}.nmorph-emoji-picker .nmorph-emoji-picker__panel{display:flex;flex-direction:column;height:var(--nmorph-emoji-picker-height);min-height:180px;max-height:min(60vh,var(--nmorph-emoji-picker-height));padding:var(--indentation-02);overflow:hidden}.nmorph-emoji-picker.nmorph-emoji-picker--hide-shadow .nmorph-emoji-picker__panel{box-shadow:none}.nmorph-emoji-picker .nmorph-emoji-picker__toolbar{display:flex;flex:0 0 auto;gap:var(--indentation-02);align-items:center;min-width:0;padding:2px}.nmorph-emoji-picker.nmorph-emoji-picker--collapsible .nmorph-emoji-picker__compact,.nmorph-emoji-picker.nmorph-emoji-picker--collapsible .nmorph-emoji-picker__toolbar{padding-right:var(--nmorph-emoji-picker-toggle-reserve)}.nmorph-emoji-picker .nmorph-emoji-picker__search{flex:1 1 auto;min-width:0}.nmorph-emoji-picker .nmorph-emoji-picker__categories{display:flex;flex:0 0 auto;gap:4px;align-items:flex-start;min-width:0;margin:var(--indentation-02) 0;padding:0 2px}.nmorph-emoji-picker .nmorph-emoji-picker__categories .nmorph-scroll__bar--horizontal{right:2px;left:2px}.nmorph-emoji-picker .nmorph-emoji-picker__category{display:inline-flex;flex:0 0 auto;justify-content:center;align-items:center;max-width:120px;min-height:32px;padding:0 10px;overflow:hidden;color:var(--nmorph-semi-contrast-text-color);font-size:var(--font-size-extra-small);line-height:var(--line-height-regular);white-space:nowrap;text-overflow:ellipsis;border-radius:var(--default-border-radius)}.nmorph-emoji-picker .nmorph-emoji-picker__category:hover:not(:disabled){color:var(--nmorph-text-color);background:var(--nmorph-emoji-picker-hover-background)}.nmorph-emoji-picker .nmorph-emoji-picker__category.nmorph-emoji-picker__category--active{color:var(--nmorph-text-color);background:var(--nmorph-emoji-picker-active-background);box-shadow:var(--nmorph-shadow-inset)}.nmorph-emoji-picker .nmorph-emoji-picker__body{flex:1 1 auto;min-height:0}.nmorph-emoji-picker .nmorph-emoji-picker__body-content{box-sizing:border-box;min-height:100%;padding:2px}.nmorph-emoji-picker .nmorph-emoji-picker__section{display:grid;gap:4px}.nmorph-emoji-picker .nmorph-emoji-picker__section+.nmorph-emoji-picker__section{margin-top:var(--indentation-02)}.nmorph-emoji-picker .nmorph-emoji-picker__section-title{padding:0 4px;color:var(--nmorph-semi-contrast-text-color);font-weight:600;font-size:var(--font-size-extra-small);line-height:var(--line-height-regular)}.nmorph-emoji-picker .nmorph-emoji-picker__grid{display:grid;grid-template-columns:repeat(var(--nmorph-emoji-picker-columns),minmax(0,1fr));gap:2px}.nmorph-emoji-picker .nmorph-emoji-picker__emoji{width:100%;min-width:0}.nmorph-emoji-picker .nmorph-emoji-picker__emoji-symbol{display:block;line-height:1}.nmorph-emoji-picker .nmorph-emoji-picker__empty{display:grid;gap:var(--indentation-02);place-items:center;min-height:100%;padding:var(--indentation-04);color:var(--nmorph-semi-contrast-text-color);text-align:center;--color: currentColor}.nmorph-emoji-picker.nmorph-emoji-picker--disabled{opacity:.65}
@@ -1,5 +1,5 @@
1
1
  import './NmorphEmojiPicker.css';
2
- import { defineComponent as we, ref as S, computed as s, watch as Q, openBlock as c, createElementBlock as d, normalizeStyle as Se, normalizeClass as J, createBlock as le, unref as f, withModifiers as Ce, withCtx as v, createVNode as k, createElementVNode as L, toDisplayString as E, createCommentVNode as W, Fragment as O, renderList as $, nextTick as Ae } from "vue";
2
+ import { defineComponent as Ee, ref as S, computed as s, watch as Q, openBlock as c, createElementBlock as d, normalizeStyle as Se, normalizeClass as J, createBlock as le, unref as b, withModifiers as Ce, withCtx as v, createVNode as k, createElementVNode as L, toDisplayString as w, createCommentVNode as W, Fragment as O, renderList as $, nextTick as Ae } from "vue";
3
3
  import { useModifiers as Ke } from "../../../utils/create-modifiers.js";
4
4
  import { createCssSizeVariables as Me } from "../../../utils/common.js";
5
5
  import Ne from "../../form/nmorph-checkbox/NmorphCheckbox.vue.js";
@@ -22,7 +22,7 @@ const $e = ["lang"], Ve = { class: "nmorph-emoji-picker__button-label" }, qe = [
22
22
  }, Ue = { class: "nmorph-emoji-picker__grid" }, Qe = ["aria-label", "title", "disabled", "onFocus", "onClick"], Je = { class: "nmorph-emoji-picker__emoji-symbol" }, We = {
23
23
  key: 1,
24
24
  class: "nmorph-emoji-picker__empty"
25
- }, uo = /* @__PURE__ */ we({
25
+ }, uo = /* @__PURE__ */ Ee({
26
26
  __name: "NmorphEmojiPicker",
27
27
  props: {
28
28
  language: { default: "en" },
@@ -33,11 +33,12 @@ const $e = ["lang"], Ve = { class: "nmorph-emoji-picker__button-label" }, qe = [
33
33
  width: { default: "300px" },
34
34
  height: { default: "260px" },
35
35
  columns: { default: 8 },
36
- disabled: { type: Boolean, default: !1 }
36
+ disabled: { type: Boolean, default: !1 },
37
+ hideShadow: { type: Boolean, default: !1 }
37
38
  },
38
39
  emits: ["select", "expand", "collapse"],
39
40
  setup(ie, { emit: se }) {
40
- const l = ie, V = se, q = S(""), b = S(l.initialExpanded), y = S(""), C = S(0), Z = S(null), ce = {
41
+ const l = ie, V = se, q = S(""), f = S(l.initialExpanded), y = S(""), C = S(0), Z = S(null), ce = {
41
42
  searchPlaceholder: "Search emoji",
42
43
  searchLabel: "Search emoji",
43
44
  quickLabel: "Frequent emoji",
@@ -98,20 +99,20 @@ const $e = ["lang"], Ve = { class: "nmorph-emoji-picker__button-label" }, qe = [
98
99
  }, me = (e, o, r, t, n) => {
99
100
  const a = M(e);
100
101
  if (!a) return null;
101
- const i = _(e) ? e : {}, p = de(i, o, t), m = g(i, ["annotation", "label", "name", "description"]) || a, h = A(i.tags || i.keywords || i.aliases || i.shortcodes), z = K(i, ["order", "sortOrder", "sort_order", "index"], n), U = i.skinToneVariants || i.skins || i.variants, B = pe(U).filter((I) => I.emoji !== a), w = p.key || o, ne = p.label || r || w, Ee = G(
102
+ const i = _(e) ? e : {}, p = de(i, o, t), m = g(i, ["annotation", "label", "name", "description"]) || a, h = A(i.tags || i.keywords || i.aliases || i.shortcodes), z = K(i, ["order", "sortOrder", "sort_order", "index"], n), U = i.skinToneVariants || i.skins || i.variants, B = pe(U).filter((I) => I.emoji !== a), E = p.key || o, ne = p.label || r || E, we = G(
102
103
  [a, m, ne, ...h, ...B.map((I) => I.annotation || I.emoji)].filter(Boolean).join(" ")
103
104
  );
104
105
  return {
105
- key: `${w}-${z}-${a}`,
106
+ key: `${E}-${z}-${a}`,
106
107
  emoji: a,
107
108
  annotation: m,
108
109
  tags: h,
109
- groupKey: w,
110
+ groupKey: E,
110
111
  groupLabel: ne,
111
112
  groupSort: p.sort,
112
113
  order: z,
113
114
  skinToneVariants: B,
114
- searchText: Ee
115
+ searchText: we
115
116
  };
116
117
  }, D = (e) => {
117
118
  if (!(!_(e) || ue(e)))
@@ -133,7 +134,7 @@ const $e = ["lang"], Ve = { class: "nmorph-emoji-picker__button-label" }, qe = [
133
134
  return;
134
135
  }
135
136
  const m = _(n) ? n : {}, h = g(m, ["group", "category", "name", "label"]) || a, z = g(m, ["label", "name", "title", "groupLabel", "categoryLabel"]) || h, U = K(m, ["order", "groupOrder", "categoryOrder"], i);
136
- p.forEach((B, w) => r(B, h, z, U, w));
137
+ p.forEach((B, E) => r(B, h, z, U, E));
137
138
  };
138
139
  if (Array.isArray(e))
139
140
  e.forEach((n, a) => {
@@ -156,10 +157,10 @@ const $e = ["lang"], Ve = { class: "nmorph-emoji-picker__button-label" }, qe = [
156
157
  })), oe = s(() => ({
157
158
  ...l.i18n?.categories || {},
158
159
  ...l.i18n?.categoryLabels || {}
159
- })), j = s(() => he(l.dataSource)), be = s(() => {
160
+ })), j = s(() => he(l.dataSource)), fe = s(() => {
160
161
  const e = /* @__PURE__ */ new Map();
161
162
  return j.value.forEach((o) => e.set(o.emoji, o.annotation || o.emoji)), e;
162
- }), T = s(() => Array.from(new Set(l.quickList.map((e) => e.trim()).filter(Boolean)))), re = s(() => !b.value && T.value.length > 0), x = s(() => G(q.value)), N = s(() => {
163
+ }), T = s(() => Array.from(new Set(l.quickList.map((e) => e.trim()).filter(Boolean)))), re = s(() => !f.value && T.value.length > 0), x = s(() => G(q.value)), N = s(() => {
163
164
  const e = /* @__PURE__ */ new Map();
164
165
  return j.value.forEach((o) => {
165
166
  e.has(o.groupKey) || e.set(o.groupKey, {
@@ -182,14 +183,14 @@ const $e = ["lang"], Ve = { class: "nmorph-emoji-picker__button-label" }, qe = [
182
183
  ), Q(
183
184
  () => l.initialExpanded,
184
185
  (e) => {
185
- b.value = e;
186
+ f.value = e;
186
187
  }
187
188
  ), Q([x, y], () => {
188
189
  C.value = 0;
189
190
  });
190
- const fe = s(() => x.value ? j.value.filter((e) => e.searchText.includes(x.value)) : y.value ? j.value.filter((e) => e.groupKey === y.value) : j.value), F = s(() => {
191
+ const be = s(() => x.value ? j.value.filter((e) => e.searchText.includes(x.value)) : y.value ? j.value.filter((e) => e.groupKey === y.value) : j.value), F = s(() => {
191
192
  const e = /* @__PURE__ */ new Map();
192
- return fe.value.forEach((o) => {
193
+ return be.value.forEach((o) => {
193
194
  const r = oe.value[o.groupKey] || o.groupLabel, t = e.get(o.groupKey) || {
194
195
  key: o.groupKey,
195
196
  label: r,
@@ -203,9 +204,10 @@ const $e = ["lang"], Ve = { class: "nmorph-emoji-picker__button-label" }, qe = [
203
204
  () => Ke({
204
205
  "nmorph-emoji-picker": [
205
206
  re.value && "compact",
206
- b.value && "expanded",
207
+ f.value && "expanded",
207
208
  H.value && "collapsible",
208
209
  l.disabled && "disabled",
210
+ l.hideShadow && "hide-shadow",
209
211
  !j.value.length && "empty"
210
212
  ]
211
213
  })
@@ -215,12 +217,12 @@ const $e = ["lang"], Ve = { class: "nmorph-emoji-picker__button-label" }, qe = [
215
217
  "--nmorph-emoji-picker-height": l.height
216
218
  }),
217
219
  "--nmorph-emoji-picker-columns": Math.max(1, Math.floor(l.columns))
218
- })), te = (e) => be.value.get(e) || e, ae = (e) => {
220
+ })), te = (e) => fe.value.get(e) || e, ae = (e) => {
219
221
  l.disabled || V("select", e);
220
222
  }, ve = () => {
221
- l.disabled || (b.value = !0, V("expand"));
223
+ l.disabled || (f.value = !0, V("expand"));
222
224
  }, je = () => {
223
- l.disabled || !H.value || (b.value = !1, V("collapse"));
225
+ l.disabled || !H.value || (f.value = !1, V("collapse"));
224
226
  }, xe = (e) => {
225
227
  if (e) {
226
228
  ve();
@@ -247,24 +249,24 @@ const $e = ["lang"], Ve = { class: "nmorph-emoji-picker__button-label" }, qe = [
247
249
  style: Se(_e.value),
248
250
  lang: l.language
249
251
  }, [
250
- H.value ? (c(), le(f(Ne), {
252
+ H.value ? (c(), le(b(Ne), {
251
253
  key: 0,
252
- class: J(["nmorph-emoji-picker__toggle-button nmorph-emoji-picker__expand-button", { "nmorph-emoji-picker__collapse-button": b.value }]),
254
+ class: J(["nmorph-emoji-picker__toggle-button nmorph-emoji-picker__expand-button", { "nmorph-emoji-picker__collapse-button": f.value }]),
253
255
  design: "button",
254
- "model-value": b.value,
255
- "aria-label": b.value ? u.value.collapseLabel : u.value.expandLabel,
256
- title: b.value ? u.value.collapseLabel : u.value.expandLabel,
256
+ "model-value": f.value,
257
+ "aria-label": f.value ? u.value.collapseLabel : u.value.expandLabel,
258
+ title: f.value ? u.value.collapseLabel : u.value.expandLabel,
257
259
  disabled: l.disabled,
258
- onClick: o[0] || (o[0] = Ce((r) => xe(!b.value), ["prevent"]))
260
+ onClick: o[0] || (o[0] = Ce((r) => xe(!f.value), ["prevent"]))
259
261
  }, {
260
262
  label: v(() => [
261
- k(f(X), { size: "small" }, {
263
+ k(b(X), { size: "small" }, {
262
264
  default: v(() => [
263
- k(f(ze))
265
+ k(b(ze))
264
266
  ]),
265
267
  _: 1
266
268
  }),
267
- L("span", Ve, E(b.value ? u.value.collapseLabel : u.value.expandLabel), 1)
269
+ L("span", Ve, w(f.value ? u.value.collapseLabel : u.value.expandLabel), 1)
268
270
  ]),
269
271
  _: 1
270
272
  }, 8, ["class", "model-value", "aria-label", "title", "disabled"])) : W("", !0),
@@ -274,7 +276,7 @@ const $e = ["lang"], Ve = { class: "nmorph-emoji-picker__button-label" }, qe = [
274
276
  role: "group",
275
277
  "aria-label": u.value.quickLabel
276
278
  }, [
277
- k(f(Y), {
279
+ k(b(Y), {
278
280
  class: "nmorph-emoji-picker__quick-list",
279
281
  height: "calc(var(--nmorph-emoji-picker-cell-size) + var(--nmorph-emoji-picker-scrollbar-size))",
280
282
  "max-height": "calc(var(--nmorph-emoji-picker-cell-size) + var(--nmorph-emoji-picker-scrollbar-size))",
@@ -292,13 +294,13 @@ const $e = ["lang"], Ve = { class: "nmorph-emoji-picker__button-label" }, qe = [
292
294
  title: te(r),
293
295
  disabled: l.disabled,
294
296
  onClick: (t) => ae(r)
295
- }, E(r), 9, De))), 128))
297
+ }, w(r), 9, De))), 128))
296
298
  ]),
297
299
  _: 1
298
300
  })
299
301
  ], 8, qe)) : (c(), d("div", Te, [
300
302
  L("div", Fe, [
301
- k(f(Be), {
303
+ k(b(Be), {
302
304
  modelValue: q.value,
303
305
  "onUpdate:modelValue": o[1] || (o[1] = (r) => q.value = r),
304
306
  class: "nmorph-emoji-picker__search",
@@ -311,9 +313,9 @@ const $e = ["lang"], Ve = { class: "nmorph-emoji-picker__button-label" }, qe = [
311
313
  }
312
314
  }, {
313
315
  "prepend-icon": v(() => [
314
- k(f(X), { size: "small" }, {
316
+ k(b(X), { size: "small" }, {
315
317
  default: v(() => [
316
- k(f(Ie))
318
+ k(b(Ie))
317
319
  ]),
318
320
  _: 1
319
321
  })
@@ -321,7 +323,7 @@ const $e = ["lang"], Ve = { class: "nmorph-emoji-picker__button-label" }, qe = [
321
323
  _: 1
322
324
  }, 8, ["modelValue", "placeholder", "disabled", "input-attrs"])
323
325
  ]),
324
- N.value.length && !x.value ? (c(), le(f(Y), {
326
+ N.value.length && !x.value ? (c(), le(b(Y), {
325
327
  key: 0,
326
328
  class: "nmorph-emoji-picker__categories",
327
329
  height: "40px",
@@ -343,11 +345,11 @@ const $e = ["lang"], Ve = { class: "nmorph-emoji-picker__button-label" }, qe = [
343
345
  "aria-selected": r.key === y.value,
344
346
  disabled: l.disabled,
345
347
  onClick: (t) => y.value = r.key
346
- }, E(r.label), 11, Re))), 128))
348
+ }, w(r.label), 11, Re))), 128))
347
349
  ]),
348
350
  _: 1
349
351
  }, 8, ["aria-label"])) : W("", !0),
350
- k(f(Y), {
352
+ k(b(Y), {
351
353
  class: "nmorph-emoji-picker__body",
352
354
  height: "100%",
353
355
  "max-height": "100%",
@@ -368,7 +370,7 @@ const $e = ["lang"], Ve = { class: "nmorph-emoji-picker__button-label" }, qe = [
368
370
  key: r.key,
369
371
  class: "nmorph-emoji-picker__section"
370
372
  }, [
371
- x.value ? (c(), d("div", Pe, E(r.label), 1)) : W("", !0),
373
+ x.value ? (c(), d("div", Pe, w(r.label), 1)) : W("", !0),
372
374
  L("div", Ue, [
373
375
  (c(!0), d(O, null, $(r.items, (t) => (c(), d("button", {
374
376
  key: t.key,
@@ -380,17 +382,17 @@ const $e = ["lang"], Ve = { class: "nmorph-emoji-picker__button-label" }, qe = [
380
382
  onFocus: (n) => C.value = R.value.findIndex((a) => a.key === t.key),
381
383
  onClick: (n) => ae(t.emoji)
382
384
  }, [
383
- L("span", Je, E(t.emoji), 1)
385
+ L("span", Je, w(t.emoji), 1)
384
386
  ], 40, Qe))), 128))
385
387
  ])
386
388
  ]))), 128)) : (c(), d("div", We, [
387
- k(f(X), null, {
389
+ k(b(X), null, {
388
390
  default: v(() => [
389
- k(f(Oe))
391
+ k(b(Oe))
390
392
  ]),
391
393
  _: 1
392
394
  }),
393
- L("span", null, E(u.value.noResults), 1)
395
+ L("span", null, w(u.value.noResults), 1)
394
396
  ]))
395
397
  ], 40, He)
396
398
  ]),
@@ -1 +1 @@
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
+ .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;display:block;padding:var(--callout-padding);overflow:hidden;color:inherit;text-decoration:none;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,15 +1,26 @@
1
1
  import './NmorphCallout.css';
2
- import { defineComponent as n, computed as i, openBlock as e, createElementBlock as o, normalizeStyle as r, normalizeClass as c, toDisplayString as d, createCommentVNode as s, createElementVNode as u } from "vue";
3
- import { createCssVariables as p, createCssSizeVariables as m } from "../../../utils/common.js";
4
- const f = {
2
+ import { defineComponent as v, useSlots as m, computed as t, openBlock as a, createBlock as h, resolveDynamicComponent as _, mergeProps as y, withCtx as g, createElementBlock as r, renderSlot as n, createTextVNode as b, toDisplayString as z, createCommentVNode as S } from "vue";
3
+ import { createCssVariables as k, createCssSizeVariables as C } from "../../../utils/common.js";
4
+ const w = {
5
5
  key: 0,
6
6
  class: "nmorph-callout__title"
7
- }, _ = ["innerHTML"], S = /* @__PURE__ */ n({
7
+ }, B = {
8
+ key: 1,
9
+ class: "nmorph-callout__content"
10
+ }, F = ["innerHTML"], $ = /* @__PURE__ */ v({
8
11
  __name: "NmorphCallout",
9
12
  props: {
10
13
  type: { default: "info" },
11
14
  title: { default: "" },
12
- content: {},
15
+ content: { default: "" },
16
+ as: { default: "div" },
17
+ href: { default: void 0 },
18
+ target: { default: void 0 },
19
+ rel: { default: void 0 },
20
+ referrerpolicy: { default: void 0 },
21
+ referrerPolicy: { default: void 0 },
22
+ download: { type: [String, Boolean], default: void 0 },
23
+ ariaLabel: { default: void 0 },
13
24
  color: { default: void 0 },
14
25
  padding: { default: "var(--indentation-03) var(--indentation-04)" },
15
26
  borderRadius: { default: "var(--default-border-radius)" },
@@ -18,32 +29,59 @@ const f = {
18
29
  titleFontSize: { default: "var(--font-size-medium)" },
19
30
  contentFontSize: { default: "var(--font-size-extra-small)" }
20
31
  },
21
- setup(a) {
22
- const t = a, l = i(() => ({
23
- ...m({
24
- "--callout-padding": t.padding,
25
- "--callout-border-radius": t.borderRadius,
26
- "--callout-accent-width": t.accentWidth,
27
- "--callout-title-gap": t.titleGap,
28
- "--callout-title-font-size": t.titleFontSize,
29
- "--callout-content-font-size": t.contentFontSize
32
+ setup(d) {
33
+ const i = {
34
+ self: "_self",
35
+ blank: "_blank",
36
+ parent: "_parent",
37
+ top: "_top"
38
+ }, e = d, o = m(), s = t(() => ({
39
+ ...C({
40
+ "--callout-padding": e.padding,
41
+ "--callout-border-radius": e.borderRadius,
42
+ "--callout-accent-width": e.accentWidth,
43
+ "--callout-title-gap": e.titleGap,
44
+ "--callout-title-font-size": e.titleFontSize,
45
+ "--callout-content-font-size": e.contentFontSize
30
46
  }),
31
- ...p({
32
- "--callout-color": t.color
47
+ ...k({
48
+ "--callout-color": e.color
33
49
  })
34
- }));
35
- return (v, h) => (e(), o("div", {
36
- class: c(["nmorph-callout", `nmorph-callout--${t.type}`]),
37
- style: r(l.value)
38
- }, [
39
- t.title ? (e(), o("div", f, d(t.title), 1)) : s("", !0),
40
- u("div", {
41
- class: "nmorph-callout__content",
42
- innerHTML: t.content
43
- }, null, 8, _)
44
- ], 6));
50
+ })), c = t(() => {
51
+ if (e.target)
52
+ return e.target in i ? i[e.target] : e.target;
53
+ }), u = t(() => e.as !== "a" ? {} : {
54
+ href: e.href,
55
+ target: c.value,
56
+ rel: e.rel,
57
+ referrerpolicy: e.referrerpolicy ?? e.referrerPolicy,
58
+ download: e.download === !0 ? "" : e.download === !1 ? void 0 : e.download,
59
+ "aria-label": e.ariaLabel
60
+ }), f = t(() => !!(o.header || o.title || e.title)), p = t(() => !!o.default);
61
+ return (l, L) => (a(), h(_(e.as), y({
62
+ class: ["nmorph-callout", `nmorph-callout--${e.type}`],
63
+ style: s.value
64
+ }, u.value), {
65
+ default: g(() => [
66
+ f.value ? (a(), r("div", w, [
67
+ n(l.$slots, "header", {}, () => [
68
+ n(l.$slots, "title", {}, () => [
69
+ b(z(e.title), 1)
70
+ ])
71
+ ])
72
+ ])) : S("", !0),
73
+ p.value ? (a(), r("div", B, [
74
+ n(l.$slots, "default")
75
+ ])) : (a(), r("div", {
76
+ key: 2,
77
+ class: "nmorph-callout__content",
78
+ innerHTML: e.content
79
+ }, null, 8, F))
80
+ ]),
81
+ _: 3
82
+ }, 16, ["class", "style"]));
45
83
  }
46
84
  });
47
85
  export {
48
- S as default
86
+ $ as default
49
87
  };
@@ -1 +1 @@
1
- .nmorph-notification-provider{position:fixed;inset:0;width:100vw;height:100vh;pointer-events:none}.nmorph-notification-provider .nmorph-notification-provider__notification{width:fit-content;height:fit-content;margin:1rem;transition:transform .5s ease,opacity .5s ease-in-out;pointer-events:all}.nmorph-notification-provider .nmorph-notification-provider__list{position:fixed;display:flex;flex-direction:column;width:fit-content;max-width:100vw;pointer-events:none}.nmorph-notification-provider .nmorph-notification-move{transition:transform .5s ease}.nmorph-notification-provider .nmorph-notification-provider__list--top-left{top:0;left:0;align-items:flex-start}.nmorph-notification-provider .nmorph-notification-provider__list--top-right{top:0;right:0;align-items:flex-end}.nmorph-notification-provider .nmorph-notification-provider__list--bottom-left{bottom:0;left:0;align-items:flex-start}.nmorph-notification-provider .nmorph-notification-provider__list--bottom-right{right:0;bottom:0;align-items:flex-end}.nmorph-notification-provider .nmorph-notification-provider__list--top-center{top:0;left:50%;align-items:center;transform:translate(-50%)}.nmorph-notification-provider .nmorph-notification-provider__list--bottom-center{bottom:0;left:50%;align-items:center;transform:translate(-50%)}.nmorph-notification-provider .nmorph-notification-provider__list--top-left .nmorph-notification-enter-active,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-left .nmorph-notification-enter-active,.nmorph-notification-provider .nmorph-notification-provider__list--top-right .nmorph-notification-enter-active,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-right .nmorph-notification-enter-active,.nmorph-notification-provider .nmorph-notification-provider__list--top-center .nmorph-notification-enter-active,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-center .nmorph-notification-enter-active,.nmorph-notification-provider .nmorph-notification-provider__list--top-left .nmorph-notification-leave-active,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-left .nmorph-notification-leave-active,.nmorph-notification-provider .nmorph-notification-provider__list--top-right .nmorph-notification-leave-active,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-right .nmorph-notification-leave-active,.nmorph-notification-provider .nmorph-notification-provider__list--top-center .nmorph-notification-leave-active,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-center .nmorph-notification-leave-active{transition:transform .5s ease,opacity .5s ease-in-out}.nmorph-notification-provider .nmorph-notification-provider__list--top-left .nmorph-notification-enter-from,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-left .nmorph-notification-enter-from{transform:translate(-100%)}.nmorph-notification-provider .nmorph-notification-provider__list--top-right .nmorph-notification-enter-from,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-right .nmorph-notification-enter-from{transform:translate(100%)}.nmorph-notification-provider .nmorph-notification-provider__list--top-center .nmorph-notification-enter-from{transform:translateY(-100%)}.nmorph-notification-provider .nmorph-notification-provider__list--bottom-center .nmorph-notification-enter-from{transform:translateY(100%)}.nmorph-notification-provider .nmorph-notification-provider__list--top-left .nmorph-notification-leave-to,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-left .nmorph-notification-leave-to{transform:translate(-100%)}.nmorph-notification-provider .nmorph-notification-provider__list--top-right .nmorph-notification-leave-to,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-right .nmorph-notification-leave-to{transform:translate(100%)}.nmorph-notification-provider .nmorph-notification-provider__list--top-center .nmorph-notification-leave-to{transform:translateY(-100%)}.nmorph-notification-provider .nmorph-notification-provider__list--bottom-center .nmorph-notification-leave-to{transform:translateY(100%)}.nmorph-notification-provider .nmorph-notification-enter-from{opacity:0}.nmorph-notification-provider .nmorph-notification-enter-to{transform:translate(0);opacity:1}.nmorph-notification-provider .nmorph-notification-leave-active{overflow:hidden}.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-icon{--color: var(--nmorph-text-color);display:flex;align-items:center;width:var(--width);min-width:var(--width);height:var(--height);min-height:var(--height)}.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-icon--small{--width: 14px;--height: 14px}.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-icon--medium{--width: 20px;--height: 20px}.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-icon--large{--width: 32px;--height: 32px}.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-icon__content{display:flex;justify-content:center;align-items:center;width:var(--width);min-width:var(--width);height:var(--height);min-height:var(--height);overflow:hidden}.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-alert__close .nmorph-icon,.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-alert__content,.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-alert__content-title{--color: var(--nmorph-white-color)}.nmorph-notification-provider .nmorph-notification-leave-active.nmorph-alert--success .nmorph-alert__icon .nmorph-icon{--color: var(--nmorph-success-color)}.nmorph-notification-provider .nmorph-notification-leave-active.nmorph-alert--error .nmorph-alert__icon .nmorph-icon{--color: var(--nmorph-error-color)}.nmorph-notification-provider .nmorph-notification-leave-active.nmorph-alert--warning .nmorph-alert__icon .nmorph-icon{--color: var(--nmorph-warn-color)}.nmorph-notification-provider .nmorph-notification-leave-active.nmorph-alert--info .nmorph-alert__icon .nmorph-icon{--color: var(--nmorph-info-color)}.nmorph-notification-provider .nmorph-notification-leave-active svg{width:100%;height:100%;fill:var(--color);stroke-width:0}.nmorph-notification-provider .nmorph-notification-leave-active path{stroke:var(--color)}.nmorph-notification-provider .nmorph-notification-leave-to{opacity:0;pointer-events:none}.nmorph-notification-provider .nmorph-notification-provider__list--top-left .nmorph-notification-provider__notification--closing,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-left .nmorph-notification-provider__notification--closing{position:absolute;transform:translate(-100%);opacity:0;pointer-events:none}.nmorph-notification-provider .nmorph-notification-provider__list--top-right .nmorph-notification-provider__notification--closing,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-right .nmorph-notification-provider__notification--closing{position:absolute;transform:translate(100%);opacity:0;pointer-events:none}.nmorph-notification-provider .nmorph-notification-provider__list--top-center .nmorph-notification-provider__notification--closing{position:absolute;transform:translateY(-100%);opacity:0;pointer-events:none}.nmorph-notification-provider .nmorph-notification-provider__list--bottom-center .nmorph-notification-provider__notification--closing{position:absolute;transform:translateY(100%);opacity:0;pointer-events:none}
1
+ .nmorph-notification-provider{position:fixed;inset:0;width:100vw;height:100vh;pointer-events:none}.nmorph-notification-provider .nmorph-notification-provider__notification{position:relative;width:fit-content;height:fit-content;margin:1rem;overflow:hidden;border-radius:var(--default-border-radius);transition:transform .5s ease,opacity .5s ease-in-out;pointer-events:all}.nmorph-notification-provider .nmorph-notification-provider__notification--with-duration .nmorph-alert{padding-bottom:calc(var(--indentation-03) + 12px)}.nmorph-notification-provider .nmorph-notification-provider__duration{position:absolute;right:var(--indentation-04);bottom:var(--indentation-02);left:var(--indentation-04);display:flex;gap:var(--indentation-02);align-items:center;color:var(--nmorph-white-color);pointer-events:none}.nmorph-notification-provider .nmorph-notification-provider__duration-track{flex:1 1 auto;min-width:20px;height:3px;overflow:hidden;background:color-mix(in srgb,currentColor 20%,transparent);border-radius:999px}.nmorph-notification-provider .nmorph-notification-provider__duration-bar{display:block;width:100%;height:100%;background:currentColor;border-radius:inherit;transform-origin:left center;opacity:.72;animation:nmorph-notification-provider-duration var(--nmorph-notification-provider-duration) linear forwards}.nmorph-notification-provider .nmorph-notification-provider__duration-value{flex:0 0 auto;color:currentColor;font-size:var(--font-size-extra-small);line-height:1;opacity:.72}.nmorph-notification-provider .nmorph-notification-provider__list{position:fixed;display:flex;flex-direction:column;width:fit-content;max-width:100vw;pointer-events:none}.nmorph-notification-provider .nmorph-notification-move{transition:transform .5s ease}.nmorph-notification-provider .nmorph-notification-provider__list--top-left{top:0;left:0;align-items:flex-start}.nmorph-notification-provider .nmorph-notification-provider__list--top-right{top:0;right:0;align-items:flex-end}.nmorph-notification-provider .nmorph-notification-provider__list--bottom-left{bottom:0;left:0;align-items:flex-start}.nmorph-notification-provider .nmorph-notification-provider__list--bottom-right{right:0;bottom:0;align-items:flex-end}.nmorph-notification-provider .nmorph-notification-provider__list--top-center{top:0;left:50%;align-items:center;transform:translate(-50%)}.nmorph-notification-provider .nmorph-notification-provider__list--bottom-center{bottom:0;left:50%;align-items:center;transform:translate(-50%)}.nmorph-notification-provider .nmorph-notification-provider__list--top-left .nmorph-notification-enter-active,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-left .nmorph-notification-enter-active,.nmorph-notification-provider .nmorph-notification-provider__list--top-right .nmorph-notification-enter-active,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-right .nmorph-notification-enter-active,.nmorph-notification-provider .nmorph-notification-provider__list--top-center .nmorph-notification-enter-active,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-center .nmorph-notification-enter-active,.nmorph-notification-provider .nmorph-notification-provider__list--top-left .nmorph-notification-leave-active,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-left .nmorph-notification-leave-active,.nmorph-notification-provider .nmorph-notification-provider__list--top-right .nmorph-notification-leave-active,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-right .nmorph-notification-leave-active,.nmorph-notification-provider .nmorph-notification-provider__list--top-center .nmorph-notification-leave-active,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-center .nmorph-notification-leave-active{transition:transform .5s ease,opacity .5s ease-in-out}.nmorph-notification-provider .nmorph-notification-provider__list--top-left .nmorph-notification-enter-from,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-left .nmorph-notification-enter-from{transform:translate(-100%)}.nmorph-notification-provider .nmorph-notification-provider__list--top-right .nmorph-notification-enter-from,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-right .nmorph-notification-enter-from{transform:translate(100%)}.nmorph-notification-provider .nmorph-notification-provider__list--top-center .nmorph-notification-enter-from{transform:translateY(-100%)}.nmorph-notification-provider .nmorph-notification-provider__list--bottom-center .nmorph-notification-enter-from{transform:translateY(100%)}.nmorph-notification-provider .nmorph-notification-provider__list--top-left .nmorph-notification-leave-to,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-left .nmorph-notification-leave-to{transform:translate(-100%)}.nmorph-notification-provider .nmorph-notification-provider__list--top-right .nmorph-notification-leave-to,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-right .nmorph-notification-leave-to{transform:translate(100%)}.nmorph-notification-provider .nmorph-notification-provider__list--top-center .nmorph-notification-leave-to{transform:translateY(-100%)}.nmorph-notification-provider .nmorph-notification-provider__list--bottom-center .nmorph-notification-leave-to{transform:translateY(100%)}.nmorph-notification-provider .nmorph-notification-enter-from{opacity:0}.nmorph-notification-provider .nmorph-notification-enter-to{transform:translate(0);opacity:1}.nmorph-notification-provider .nmorph-notification-leave-active{overflow:hidden}.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-icon{--color: var(--nmorph-text-color);display:flex;align-items:center;width:var(--width);min-width:var(--width);height:var(--height);min-height:var(--height)}.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-icon--small{--width: 14px;--height: 14px}.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-icon--medium{--width: 20px;--height: 20px}.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-icon--large{--width: 32px;--height: 32px}.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-icon__content{display:flex;justify-content:center;align-items:center;width:var(--width);min-width:var(--width);height:var(--height);min-height:var(--height);overflow:hidden}.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-alert__close .nmorph-icon,.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-alert__content,.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-alert__content-title{--color: var(--nmorph-white-color)}.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-alert--success .nmorph-alert__icon .nmorph-icon{--color: var(--nmorph-success-color)}.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-alert--error .nmorph-alert__icon .nmorph-icon{--color: var(--nmorph-error-color)}.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-alert--warning .nmorph-alert__icon .nmorph-icon{--color: var(--nmorph-warn-color)}.nmorph-notification-provider .nmorph-notification-leave-active .nmorph-alert--info .nmorph-alert__icon .nmorph-icon{--color: var(--nmorph-info-color)}.nmorph-notification-provider .nmorph-notification-leave-active svg{width:100%;height:100%;fill:var(--color);stroke-width:0}.nmorph-notification-provider .nmorph-notification-leave-active path{stroke:var(--color)}.nmorph-notification-provider .nmorph-notification-leave-to{opacity:0;pointer-events:none}.nmorph-notification-provider .nmorph-notification-provider__list--top-left .nmorph-notification-provider__notification--closing,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-left .nmorph-notification-provider__notification--closing{position:absolute;transform:translate(-100%);opacity:0;pointer-events:none}.nmorph-notification-provider .nmorph-notification-provider__list--top-right .nmorph-notification-provider__notification--closing,.nmorph-notification-provider .nmorph-notification-provider__list--bottom-right .nmorph-notification-provider__notification--closing{position:absolute;transform:translate(100%);opacity:0;pointer-events:none}.nmorph-notification-provider .nmorph-notification-provider__list--top-center .nmorph-notification-provider__notification--closing{position:absolute;transform:translateY(-100%);opacity:0;pointer-events:none}.nmorph-notification-provider .nmorph-notification-provider__list--bottom-center .nmorph-notification-provider__notification--closing{position:absolute;transform:translateY(100%);opacity:0;pointer-events:none}@keyframes nmorph-notification-provider-duration{0%{transform:scaleX(1)}to{transform:scaleX(0)}}