@nmorph/nmorph-ui-kit 2.2.36 → 2.2.38

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 (114) hide show
  1. package/dist/components/basic/nmorph-button/NmorphButton.vue2.js +8 -8
  2. package/dist/components/basic/nmorph-icon/NmorphIcon.vue2.js +3 -3
  3. package/dist/components/basic/nmorph-layout/NmorphLayout.vue2.js +14 -13
  4. package/dist/components/basic/nmorph-link/NmorphLink.vue2.js +1 -1
  5. package/dist/components/basic/nmorph-scroll/NmorphScroll.css +1 -0
  6. package/dist/components/basic/nmorph-scroll/NmorphScroll.vue.js +6 -4
  7. package/dist/components/basic/nmorph-scroll/NmorphScroll.vue2.js +1 -0
  8. package/dist/components/basic/nmorph-space/NmorphSpace.vue2.js +15 -19
  9. package/dist/components/data/nmorph-avatar/NmorphAvatar.css +1 -1
  10. package/dist/components/data/nmorph-avatar/NmorphAvatar.vue2.js +5 -5
  11. package/dist/components/data/nmorph-badge/NmorphBadge.vue2.js +37 -36
  12. package/dist/components/data/nmorph-calendar/NmorphCalendar.vue2.js +41 -40
  13. package/dist/components/data/nmorph-card/NmorphCard.vue2.js +19 -15
  14. package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue2.js +5 -9
  15. package/dist/components/data/nmorph-empty/NmorphEmpty.vue.js +3 -3
  16. package/dist/components/data/nmorph-empty/NmorphEmpty.vue2.js +17 -14
  17. package/dist/components/data/nmorph-image/NmorphImage.css +1 -0
  18. package/dist/components/data/nmorph-image/NmorphImage.vue.js +14 -12
  19. package/dist/components/data/nmorph-image/NmorphImage.vue2.js +3 -2
  20. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +36 -35
  21. package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +1 -1
  22. package/dist/components/data/nmorph-progress/NmorphProgress.vue2.js +19 -18
  23. package/dist/components/data/nmorph-qr-code/NmorphQRCode.vue2.js +20 -19
  24. package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue2.js +1 -1
  25. package/dist/components/data/nmorph-table/NmorphTable.vue2.js +39 -43
  26. package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.vue2.js +34 -33
  27. package/dist/components/feedback/nmorph-alert/NmorphAlert.vue2.js +1 -1
  28. package/dist/components/feedback/nmorph-callout/NmorphCallout.vue2.js +7 -6
  29. package/dist/components/feedback/nmorph-dialog/NmorphDialog.css +1 -1
  30. package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue.js +25 -20
  31. package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue2.js +37 -37
  32. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue2.js +22 -21
  33. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue2.js +26 -25
  34. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +65 -71
  35. package/dist/components/form/nmorph-checkbox/NmorphCheckbox.css +1 -1
  36. package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue2.js +30 -28
  37. package/dist/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue2.js +25 -20
  38. package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue2.js +43 -42
  39. package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue2.js +53 -40
  40. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue.js +20 -16
  41. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue2.js +113 -86
  42. package/dist/components/form/nmorph-form/NmorphForm.vue2.js +9 -9
  43. package/dist/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue2.js +33 -24
  44. package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue2.js +1 -1
  45. package/dist/components/form/nmorph-form/use-form-item-input.js +29 -8
  46. package/dist/components/form/nmorph-number-input/NmorphNumberInput.vue2.js +42 -39
  47. package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue2.js +66 -62
  48. package/dist/components/form/nmorph-radio/NmorphRadio.css +1 -1
  49. package/dist/components/form/nmorph-radio/NmorphRadio.vue2.js +1 -1
  50. package/dist/components/form/nmorph-radio-group/NmorphRadioGroup.vue2.js +24 -22
  51. package/dist/components/form/nmorph-select/NmorphSelect.css +1 -1
  52. package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +83 -81
  53. package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +4 -4
  54. package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue2.js +28 -25
  55. package/dist/components/form/nmorph-select-button/components/nmorph-select-button-item/NmorphSelectButtonItem.vue2.js +1 -1
  56. package/dist/components/form/nmorph-slider/NmorphSlider.vue2.js +51 -49
  57. package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +35 -33
  58. package/dist/components/form/nmorph-text-input/NmorphTextInput.css +1 -0
  59. package/dist/components/form/nmorph-text-input/NmorphTextInput.vue.js +5 -3
  60. package/dist/components/form/nmorph-text-input/NmorphTextInput.vue2.js +37 -35
  61. package/dist/components/form/nmorph-textarea/NmorphTextarea.vue.js +1 -1
  62. package/dist/components/form/nmorph-textarea/NmorphTextarea.vue2.js +30 -26
  63. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue.js +1 -1
  64. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +68 -66
  65. package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue2.js +1 -1
  66. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +32 -31
  67. package/dist/components/navigation/nmorph-tabs/NmorphTabs.vue2.js +1 -1
  68. package/dist/components/others/nmorph-overlay/NmorphOverlay.vue2.js +1 -1
  69. package/dist/hooks/use-common-styles.js +18 -278
  70. package/dist/hooks/use-field-validation.js +71 -42
  71. package/dist/hooks/use-form-validation.js +62 -24
  72. package/dist/hooks/use-virtual-list.js +38 -32
  73. package/dist/index.umd.js +26 -286
  74. package/dist/package.json.js +1 -1
  75. package/dist/src/components/basic/nmorph-button/NmorphButton.vue.d.ts +2 -2
  76. package/dist/src/components/basic/nmorph-link/NmorphLink.vue.d.ts +1 -1
  77. package/dist/src/components/data/nmorph-avatar/NmorphAvatar.vue.d.ts +1 -1
  78. package/dist/src/components/data/nmorph-badge/NmorphBadge.vue.d.ts +1 -1
  79. package/dist/src/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.d.ts +1 -1
  80. package/dist/src/components/data/nmorph-empty/NmorphEmpty.vue.d.ts +1 -1
  81. package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +1 -1
  82. package/dist/src/components/data/nmorph-progress/NmorphProgress.vue.d.ts +1 -1
  83. package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +1 -1
  84. package/dist/src/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.d.ts +1 -1
  85. package/dist/src/components/feedback/nmorph-callout/NmorphCallout.vue.d.ts +1 -1
  86. package/dist/src/components/feedback/nmorph-dialog/NmorphDialog.vue.d.ts +4 -4
  87. package/dist/src/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.d.ts +1 -1
  88. package/dist/src/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue.d.ts +3 -3
  89. package/dist/src/components/form/nmorph-color-picker/NmorphColorPicker.vue.d.ts +1 -1
  90. package/dist/src/components/form/nmorph-date-picker/NmorphDatePicker.vue.d.ts +3 -3
  91. package/dist/src/components/form/nmorph-file-upload/NmorphFileUpload.vue.d.ts +6 -3
  92. package/dist/src/components/form/nmorph-file-upload/types.d.ts +4 -0
  93. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue.d.ts +1 -1
  94. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue.d.ts +1 -1
  95. package/dist/src/components/form/nmorph-form/types.d.ts +15 -5
  96. package/dist/src/components/form/nmorph-form/use-form-item-input.d.ts +10 -0
  97. package/dist/src/components/form/nmorph-number-input/NmorphNumberInput.vue.d.ts +1 -1
  98. package/dist/src/components/form/nmorph-otp-input/NmorphOTPInput.vue.d.ts +1 -1
  99. package/dist/src/components/form/nmorph-radio-group/NmorphRadioGroup.vue.d.ts +3 -3
  100. package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +1 -1
  101. package/dist/src/components/form/nmorph-select-button/NmorphSelectButton.vue.d.ts +1 -1
  102. package/dist/src/components/form/nmorph-text-input/NmorphTextInput.vue.d.ts +1 -1
  103. package/dist/src/components/form/nmorph-textarea/NmorphTextarea.vue.d.ts +1 -1
  104. package/dist/src/components/form/nmorph-time-picker/NmorphTimePicker.vue.d.ts +1 -1
  105. package/dist/src/hooks/use-field-validation.d.ts +15 -0
  106. package/dist/src/hooks/use-form-validation.d.ts +5 -0
  107. package/dist/src/hooks/use-virtual-list.d.ts +6 -0
  108. package/dist/src/types/index.d.ts +2 -1
  109. package/dist/src/utils/common.d.ts +5 -0
  110. package/dist/src/utils/create-modifiers.d.ts +4 -2
  111. package/dist/style.css +1 -1
  112. package/dist/utils/common.js +9 -3
  113. package/dist/utils/create-modifiers.js +6 -6
  114. package/package.json +1 -1
@@ -28,7 +28,7 @@ const x = /* @__PURE__ */ u({
28
28
  i();
29
29
  const e = n, r = s, a = l(
30
30
  () => y({
31
- "nmorph-alert": [e.type, `${e.bordered && "bordered"}`, `${e.fill && "fill"}`]
31
+ "nmorph-alert": [e.type, e.bordered && "bordered", e.fill && "fill"]
32
32
  })
33
33
  ), d = l(() => ({
34
34
  "--nmorph-alert-close-align": e.closeIconPosition,
@@ -1,6 +1,7 @@
1
1
  import './NmorphCallout.css';
2
- import { defineComponent as l, computed as d } from "vue";
3
- const s = /* @__PURE__ */ l({
2
+ import { defineComponent as o, computed as l } from "vue";
3
+ import { toCssSize as t } from "../../../utils/common.js";
4
+ const s = /* @__PURE__ */ o({
4
5
  __name: "NmorphCallout",
5
6
  props: {
6
7
  type: { type: String, required: !1, default: "info" },
@@ -14,9 +15,9 @@ const s = /* @__PURE__ */ l({
14
15
  titleFontSize: { type: [Number, String], required: !1, default: "var(--font-size-medium)" },
15
16
  contentFontSize: { type: [Number, String], required: !1, default: "var(--font-size-extra-small)" }
16
17
  },
17
- setup(n, { expose: a }) {
18
+ setup(i, { expose: a }) {
18
19
  a();
19
- const e = n, t = (r) => typeof r == "number" ? `${r}px` : r, o = d(() => ({
20
+ const e = i, n = l(() => ({
20
21
  "--callout-padding": t(e.padding),
21
22
  "--callout-border-radius": t(e.borderRadius),
22
23
  "--callout-accent-width": t(e.accentWidth),
@@ -24,8 +25,8 @@ const s = /* @__PURE__ */ l({
24
25
  "--callout-title-font-size": t(e.titleFontSize),
25
26
  "--callout-content-font-size": t(e.contentFontSize),
26
27
  ...e.color !== void 0 && { "--callout-color": e.color }
27
- })), i = { props: e, getCssSize: t, styles: o };
28
- return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
28
+ })), r = { props: e, styles: n };
29
+ return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
29
30
  }
30
31
  });
31
32
  export {
@@ -1 +1 @@
1
- .nmorph-dialog{position:absolute;top:50%;left:50%;display:flex;flex-direction:column;box-sizing:border-box;width:var(--width);max-width:var(--nmorph-dialog-max-width, calc(100vw - 32px) );max-height:var(--nmorph-dialog-max-height, var(--nmorph-dialog-default-max-height));padding:var(--indentation-03);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);transform:translate(-50%,-50%);--width: var(--nmorph-dialog-width);--nmorph-dialog-default-max-height: calc(100vh - 32px) }@supports (height: 100dvh){.nmorph-dialog{--nmorph-dialog-default-max-height: calc(100dvh - 32px) }}.nmorph-dialog .nmorph-dialog__header{display:flex;flex:0 0 auto;justify-content:space-between;align-items:center;box-sizing:border-box;padding:var(--indentation-02);font-weight:600;font-size:var(--font-size-large);line-height:var(--line-height-loose)}.nmorph-dialog .nmorph-dialog__close-icon{flex:0 0 auto;cursor:pointer}.nmorph-dialog .nmorph-dialog__content{flex:1 1 auto;box-sizing:border-box;min-height:0;padding:var(--indentation-02);overflow:hidden auto}
1
+ .nmorph-dialog{position:absolute;top:50%;left:50%;display:flex;flex-direction:column;box-sizing:border-box;width:var(--width);max-width:var(--nmorph-dialog-max-width, calc(100vw - 32px) );max-height:var(--nmorph-dialog-max-height, var(--nmorph-dialog-default-max-height));padding:var(--indentation-03);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);transform:translate(-50%,-50%);--width: var(--nmorph-dialog-width);--nmorph-dialog-default-max-height: calc(100vh - 32px) }@supports (height: 100dvh){.nmorph-dialog{--nmorph-dialog-default-max-height: calc(100dvh - 32px) }}.nmorph-dialog .nmorph-dialog__header{display:flex;flex:0 0 auto;justify-content:space-between;align-items:center;box-sizing:border-box;padding:var(--indentation-02);font-weight:600;font-size:var(--font-size-large);line-height:var(--line-height-loose)}.nmorph-dialog .nmorph-dialog__close-icon{display:inline-flex;flex:0 0 auto;justify-content:center;align-items:center;width:32px;height:32px;padding:0;color:inherit;background:transparent;border:0;cursor:pointer}.nmorph-dialog .nmorph-dialog__content{flex:1 1 auto;box-sizing:border-box;min-height:0;padding:var(--indentation-02);overflow:hidden auto}
@@ -1,38 +1,43 @@
1
1
  import './NmorphDialog.css';
2
- import s from "./NmorphDialog.vue2.js";
3
- import { openBlock as r, createBlock as c, withCtx as a, createElementVNode as e, normalizeStyle as d, normalizeClass as t, renderSlot as i, toDisplayString as m, createElementBlock as _, createVNode as n, createCommentVNode as p } from "vue";
2
+ import c from "./NmorphDialog.vue2.js";
3
+ import { openBlock as e, createBlock as d, withCtx as a, createElementVNode as l, normalizeStyle as m, normalizeClass as _, createElementBlock as i, renderSlot as s, toDisplayString as p, createVNode as n, createCommentVNode as t } from "vue";
4
4
  /* empty css */
5
5
  import h from "../../../_virtual/_plugin-vue_export-helper.js";
6
- const f = ["aria-label"], g = { class: "nmorph-dialog__header" }, v = { class: "nmorph-dialog__title" }, k = { class: "nmorph-dialog__content" };
7
- function y(l, N, C, o, O, b) {
8
- return r(), c(o.NmorphOverlay, {
6
+ const f = ["aria-label"], g = {
7
+ key: 0,
8
+ class: "nmorph-dialog__header"
9
+ }, y = { class: "nmorph-dialog__title" }, b = ["aria-label"], k = { class: "nmorph-dialog__content" };
10
+ function v(r, C, N, o, w, x) {
11
+ return e(), d(o.NmorphOverlay, {
9
12
  show: o.isVisible,
10
13
  "z-index": o.props.zIndex,
11
14
  "close-on-escape": o.props.closeOnEscape,
12
15
  "trap-focus": "",
13
- onOnOutsideClick: o.clickOnOverlay,
16
+ onOnOutsideClick: o.overlayClickHandler,
14
17
  onOnEscapeKeydown: o.closeHandler
15
18
  }, {
16
19
  default: a(() => [
17
- e("div", {
18
- class: t(o.modifiers),
19
- style: d(o.dialogStyle),
20
+ l("div", {
21
+ class: _(o.modifiers),
22
+ style: m(o.dialogStyle),
20
23
  role: "dialog",
21
24
  "aria-modal": "true",
22
25
  "aria-label": o.props.title || void 0
23
26
  }, [
24
- e("div", g, [
25
- i(l.$slots, "header", {}, () => [
26
- e(
27
+ o.hasHeader ? (e(), i("div", g, [
28
+ s(r.$slots, "header", {}, () => [
29
+ l(
27
30
  "div",
28
- v,
29
- m(o.props.title),
31
+ y,
32
+ p(o.props.title),
30
33
  1
31
34
  /* TEXT */
32
35
  ),
33
- o.props.showClose ? (r(), _("div", {
36
+ o.props.showClose ? (e(), i("button", {
34
37
  key: 0,
35
38
  class: "nmorph-dialog__close-icon",
39
+ type: "button",
40
+ "aria-label": o.props.title ? `Close ${o.props.title}` : "Close dialog",
36
41
  onClick: o.closeHandler
37
42
  }, [
38
43
  n(o.NmorphIcon, null, {
@@ -42,11 +47,11 @@ function y(l, N, C, o, O, b) {
42
47
  _: 1
43
48
  /* STABLE */
44
49
  })
45
- ])) : p("v-if", !0)
50
+ ], 8, b)) : t("v-if", !0)
46
51
  ])
47
- ]),
48
- e("div", k, [
49
- i(l.$slots, "default")
52
+ ])) : t("v-if", !0),
53
+ l("div", k, [
54
+ s(r.$slots, "default")
50
55
  ])
51
56
  ], 14, f)
52
57
  ]),
@@ -54,7 +59,7 @@ function y(l, N, C, o, O, b) {
54
59
  /* FORWARDED */
55
60
  }, 8, ["show", "z-index", "close-on-escape"]);
56
61
  }
57
- const S = /* @__PURE__ */ h(s, [["render", y], ["__file", "/builds/ketjo/nmorph/library/src/components/feedback/nmorph-dialog/NmorphDialog.vue"]]);
62
+ const S = /* @__PURE__ */ h(c, [["render", v], ["__file", "/builds/ketjo/nmorph/library/src/components/feedback/nmorph-dialog/NmorphDialog.vue"]]);
58
63
  export {
59
64
  S as default
60
65
  };
@@ -1,10 +1,10 @@
1
1
  import './NmorphDialog.css';
2
- import { defineComponent as c, computed as s, ref as y, watch as h } from "vue";
3
- import { useModifiers as g } from "../../../utils/create-modifiers.js";
4
- import v from "../../basic/nmorph-icon/NmorphIcon.vue.js";
5
- import O from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
6
- import T from "../../../assets/icons/cross.svg.js";
7
- const C = /* @__PURE__ */ c({
2
+ import { defineComponent as g, useSlots as v, computed as r, ref as O, watch as T } from "vue";
3
+ import { useModifiers as q } from "../../../utils/create-modifiers.js";
4
+ import C from "../../basic/nmorph-icon/NmorphIcon.vue.js";
5
+ import N from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
6
+ import _ from "../../../assets/icons/cross.svg.js";
7
+ const B = /* @__PURE__ */ g({
8
8
  __name: "NmorphDialog",
9
9
  props: {
10
10
  modelValue: { type: Boolean, required: !1, default: !1 },
@@ -20,54 +20,54 @@ const C = /* @__PURE__ */ c({
20
20
  closeOnEscape: { type: Boolean, required: !1, default: !0 }
21
21
  },
22
22
  emits: ["on-close", "update:model-value"],
23
- setup(n, { expose: m, emit: d }) {
24
- m();
25
- const e = n, r = d, p = s(
26
- () => g({
23
+ setup(d, { expose: p, emit: c }) {
24
+ p();
25
+ const e = d, a = c, i = v(), f = r(
26
+ () => q({
27
27
  "nmorph-dialog": []
28
28
  })
29
- ), f = s(() => ({
29
+ ), y = r(() => ({
30
30
  "--nmorph-dialog-width": e.width,
31
31
  ...e.maxHeight && { "--nmorph-dialog-max-height": e.maxHeight }
32
- })), a = y(e.modelValue);
33
- let o = null, l = null;
34
- h(
32
+ })), h = r(() => !!(i.header || e.title || e.showClose)), u = r(() => e.closeOnOverlay && e.closeOnClickModal), s = O(e.modelValue);
33
+ let t = null, l = null;
34
+ T(
35
35
  () => e.modelValue,
36
- (t) => {
37
- t ? (l && clearTimeout(l), o = setTimeout(() => {
38
- a.value = !0;
39
- }, e.openDelay)) : (o && clearTimeout(o), l = setTimeout(() => {
40
- a.value = !1;
36
+ (o) => {
37
+ o ? (l && clearTimeout(l), t = setTimeout(() => {
38
+ s.value = !0;
39
+ }, e.openDelay)) : (t && clearTimeout(t), l = setTimeout(() => {
40
+ s.value = !1;
41
41
  }, e.closeDelay));
42
42
  },
43
43
  { immediate: !0 }
44
44
  );
45
- const i = () => {
46
- r("on-close"), o && clearTimeout(o);
47
- const t = () => {
48
- r("update:model-value", !1);
45
+ const n = () => {
46
+ a("on-close"), t && clearTimeout(t);
47
+ const o = () => {
48
+ a("update:model-value", !1);
49
49
  };
50
- e.closeDelay <= 0 ? t() : l = setTimeout(t, e.closeDelay);
51
- }, u = { props: e, emit: r, modifiers: p, dialogStyle: f, isVisible: a, get openTimeout() {
52
- return o;
53
- }, set openTimeout(t) {
54
- o = t;
50
+ e.closeDelay <= 0 ? o() : l = setTimeout(o, e.closeDelay);
51
+ }, m = { props: e, emit: a, slots: i, modifiers: f, dialogStyle: y, hasHeader: h, shouldCloseOnOverlay: u, isVisible: s, get openTimeout() {
52
+ return t;
53
+ }, set openTimeout(o) {
54
+ t = o;
55
55
  }, get closeTimeout() {
56
56
  return l;
57
- }, set closeTimeout(t) {
58
- l = t;
59
- }, closeHandler: i, clickOnOverlay: () => {
60
- e.closeOnOverlay && i();
57
+ }, set closeTimeout(o) {
58
+ l = o;
59
+ }, closeHandler: n, overlayClickHandler: () => {
60
+ u.value && n();
61
61
  }, get NmorphOverlay() {
62
- return O;
62
+ return N;
63
63
  }, get NmorphIcon() {
64
- return v;
64
+ return C;
65
65
  }, get NmorphIconCross() {
66
- return T;
66
+ return _;
67
67
  } };
68
- return Object.defineProperty(u, "__isScriptSetup", { enumerable: !1, value: !0 }), u;
68
+ return Object.defineProperty(m, "__isScriptSetup", { enumerable: !1, value: !0 }), m;
69
69
  }
70
70
  });
71
71
  export {
72
- C as default
72
+ B as default
73
73
  };
@@ -1,10 +1,11 @@
1
1
  import './NmorphDrawer.css';
2
- import { defineComponent as y, useSlots as h, computed as o } from "vue";
3
- import { useModifiers as q } from "../../../utils/create-modifiers.js";
4
- import _ from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
5
- import g from "../../basic/nmorph-icon/NmorphIcon.vue.js";
6
- import N from "../../../assets/icons/cross.svg.js";
7
- const w = /* @__PURE__ */ y({
2
+ import { defineComponent as m, useSlots as c, computed as o } from "vue";
3
+ import { useModifiers as y } from "../../../utils/create-modifiers.js";
4
+ import { toCssSize as h } from "../../../utils/common.js";
5
+ import q from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
6
+ import _ from "../../basic/nmorph-icon/NmorphIcon.vue.js";
7
+ import v from "../../../assets/icons/cross.svg.js";
8
+ const w = /* @__PURE__ */ m({
8
9
  __name: "NmorphDrawer",
9
10
  props: {
10
11
  modelValue: { type: Boolean, required: !1, default: !1 },
@@ -20,26 +21,26 @@ const w = /* @__PURE__ */ y({
20
21
  contentClass: { type: String, required: !1, default: "" }
21
22
  },
22
23
  emits: ["on-close", "update:model-value"],
23
- setup(p, { expose: u, emit: d }) {
24
- u();
25
- const e = p, r = d, l = h(), i = o(
26
- () => q({
27
- "nmorph-drawer": [e.placement, `${e.modelValue && "open"}`]
24
+ setup(a, { expose: n, emit: u }) {
25
+ n();
26
+ const e = a, r = u, t = c(), d = o(
27
+ () => y({
28
+ "nmorph-drawer": [e.placement, e.modelValue && "open"]
28
29
  })
29
- ), s = (t) => typeof t == "number" ? `${t}px` : t, f = o(() => ({
30
- "--nmorph-drawer-size": s(e.size)
31
- })), a = () => {
30
+ ), p = o(() => ({
31
+ "--nmorph-drawer-size": h(e.size)
32
+ })), l = () => {
32
33
  r("on-close"), r("update:model-value", !1);
33
- }, m = () => {
34
- e.closeOnOverlay && a();
35
- }, c = o(() => !!(l.header || e.title || e.showClose)), n = { props: e, emit: r, slots: l, modifiers: i, getCssSize: s, drawerStyle: f, closeHandler: a, overlayClickHandler: m, hasHeader: c, get NmorphIcon() {
36
- return g;
34
+ }, i = () => {
35
+ e.closeOnOverlay && l();
36
+ }, f = o(() => !!(t.header || e.title || e.showClose)), s = { props: e, emit: r, slots: t, modifiers: d, drawerStyle: p, closeHandler: l, overlayClickHandler: i, hasHeader: f, get NmorphIcon() {
37
+ return _;
37
38
  }, get NmorphIconCross() {
38
- return N;
39
+ return v;
39
40
  }, get NmorphOverlay() {
40
- return _;
41
+ return q;
41
42
  } };
42
- return Object.defineProperty(n, "__isScriptSetup", { enumerable: !1, value: !0 }), n;
43
+ return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
43
44
  }
44
45
  });
45
46
  export {
@@ -1,9 +1,10 @@
1
1
  import './NmorphTooltip.css';
2
- import { defineComponent as w, ref as r, computed as n } from "vue";
3
- import { useModifiers as S } from "../../../utils/create-modifiers.js";
4
- import { usePlacement as _ } from "../../../hooks/use-placement.js";
5
- import { useZIndex as g } from "../../../hooks/use-z-index.js";
6
- const z = /* @__PURE__ */ w({
2
+ import { defineComponent as y, ref as o, computed as r } from "vue";
3
+ import { useModifiers as w } from "../../../utils/create-modifiers.js";
4
+ import { toCssSize as i } from "../../../utils/common.js";
5
+ import { usePlacement as S } from "../../../hooks/use-placement.js";
6
+ import { useZIndex as _ } from "../../../hooks/use-z-index.js";
7
+ const z = /* @__PURE__ */ y({
7
8
  __name: "NmorphTooltip",
8
9
  props: {
9
10
  text: { type: String, required: !1, default: "" },
@@ -15,35 +16,35 @@ const z = /* @__PURE__ */ w({
15
16
  maxWidth: { type: [Number, String], required: !1, default: void 0 },
16
17
  height: { type: [Number, String], required: !1, default: void 0 }
17
18
  },
18
- setup(c, { expose: m }) {
19
- const e = c, t = r(e.forceShow), l = r(null), d = r(null), { placement: a } = _({
19
+ setup(p, { expose: m }) {
20
+ const e = p, t = o(e.forceShow), n = o(null), l = o(null), { placement: d } = S({
20
21
  initialPlacement: e.position,
21
- contentDOMElement: l,
22
- relativeElement: d
23
- }), h = n(
24
- () => S({
22
+ contentDOMElement: n,
23
+ relativeElement: l
24
+ }), c = r(
25
+ () => w({
25
26
  "nmorph-tooltip": [
26
- a.value,
27
- `${!!e.forceCoordinate?.x && !!e.forceCoordinate?.y && "force-coords"}`
27
+ d.value,
28
+ !!e.forceCoordinate?.x && !!e.forceCoordinate?.y && "force-coords"
28
29
  ]
29
30
  })
30
- ), v = () => {
31
+ ), h = () => {
31
32
  t.value = !0;
32
- }, x = () => {
33
+ }, v = () => {
33
34
  e.forceShow || (t.value = !1);
34
- }, o = (i) => typeof i == "number" ? `${i}px` : i, s = n(() => e.forceCoordinate ? "100%" : "auto"), u = g(
35
+ }, a = r(() => e.forceCoordinate ? "100%" : "auto"), u = _(
35
36
  () => t.value,
36
37
  () => e.zIndex
37
- ), y = n(() => ({
38
- "--nmorph-tooltip-width": s.value,
38
+ ), x = r(() => ({
39
+ "--nmorph-tooltip-width": a.value,
39
40
  "--nmorph-tooltip-z-index": u.value,
40
- ...e.width !== void 0 && { "--width": o(e.width) },
41
- ...e.maxWidth !== void 0 && { "--max-width": o(e.maxWidth) },
42
- ...e.height !== void 0 && { "--height": o(e.height) }
43
- })), f = r(null);
44
- m({ tooltipBody: f });
45
- const p = { props: e, showTooltip: t, tooltipDOMRef: l, slotDOMRef: d, placement: a, modifiers: h, handleMouseEnter: v, handleMouseLeave: x, getCssSize: o, rootWidth: s, zIndex: u, styles: y, tooltipBody: f };
46
- return Object.defineProperty(p, "__isScriptSetup", { enumerable: !1, value: !0 }), p;
41
+ ...e.width !== void 0 && { "--width": i(e.width) },
42
+ ...e.maxWidth !== void 0 && { "--max-width": i(e.maxWidth) },
43
+ ...e.height !== void 0 && { "--height": i(e.height) }
44
+ })), s = o(null);
45
+ m({ tooltipBody: s });
46
+ const f = { props: e, showTooltip: t, tooltipDOMRef: n, slotDOMRef: l, placement: d, modifiers: c, handleMouseEnter: h, handleMouseLeave: v, rootWidth: a, zIndex: u, styles: x, tooltipBody: s };
47
+ return Object.defineProperty(f, "__isScriptSetup", { enumerable: !1, value: !0 }), f;
47
48
  }
48
49
  });
49
50
  export {
@@ -1,14 +1,16 @@
1
1
  import './NmorphAutocomplete.css';
2
- import { defineComponent as K, ref as s, computed as t, watch as c, nextTick as Q } from "vue";
2
+ import { defineComponent as K, ref as s, computed as l, watch as c, nextTick as Q } from "vue";
3
3
  import { useModifiers as M } from "../../../utils/create-modifiers.js";
4
- import { NmorphComponentHeight as W } from "../../../types/index.js";
5
- import { useVirtualList as X } from "../../../hooks/use-virtual-list.js";
6
- import { useZIndex as ee } from "../../../hooks/use-z-index.js";
7
- import te from "../nmorph-text-input/NmorphTextInput.vue.js";
8
- import ae from "../../navigation/nmorph-dropdown/NmorphDropdown.vue.js";
9
- import le from "../../basic/nmorph-icon/NmorphIcon.vue.js";
10
- import re from "../../../assets/icons/loader.svg.js";
11
- const ve = /* @__PURE__ */ K({
4
+ import { getNmorphOptionHeight as W, toCssSize as X, resolveDomElement as Y } from "../../../utils/common.js";
5
+ import { NmorphComponentHeight as ee } from "../../../types/index.js";
6
+ import { useFormItemModel as te } from "../nmorph-form/use-form-item-input.js";
7
+ import { useVirtualList as ae } from "../../../hooks/use-virtual-list.js";
8
+ import { useZIndex as le } from "../../../hooks/use-z-index.js";
9
+ import re from "../nmorph-text-input/NmorphTextInput.vue.js";
10
+ import oe from "../../navigation/nmorph-dropdown/NmorphDropdown.vue.js";
11
+ import ue from "../../basic/nmorph-icon/NmorphIcon.vue.js";
12
+ import ne from "../../../assets/icons/loader.svg.js";
13
+ const Ie = /* @__PURE__ */ K({
12
14
  __name: "NmorphAutocomplete",
13
15
  props: {
14
16
  modelValue: { type: String, required: !1, default: "" },
@@ -30,92 +32,84 @@ const ve = /* @__PURE__ */ K({
30
32
  tabindex: { type: Number, required: !1 }
31
33
  },
32
34
  emits: ["update:model-value", "select"],
33
- setup(O, { expose: $, emit: L }) {
34
- $();
35
- const a = O, o = s(a.modelValue), p = L, T = t(
35
+ setup(O, { expose: L, emit: V }) {
36
+ L();
37
+ const t = O, p = V, { modelValue: m, updateModelValue: v } = te(
38
+ t,
39
+ (e) => p("update:model-value", e),
40
+ ""
41
+ ), o = s(m.value), A = l(
36
42
  () => M({
37
- "nmorph-autocomplete": [`${l.value && "open"}`]
43
+ "nmorph-autocomplete": [a.value && "open"]
38
44
  })
39
- ), i = s(!1), y = (e) => {
40
- i.value = e === "", o.value = e, l.value = !i.value && r.value.length > 0, u.value = 0, p("update:model-value", o.value);
41
- }, V = t({
45
+ ), i = s(!1), b = (e) => {
46
+ i.value = e === "", o.value = e, a.value = !i.value && r.value.length > 0, u.value = 0, v(o.value);
47
+ }, T = l({
42
48
  get: () => o.value,
43
- set: y
44
- }), l = s(!1), A = s(null), b = () => {
45
- i.value = !0, l.value = !1;
46
- }, r = t(() => a.list.filter((e) => Object.keys(e).some((g) => String(e[g]).toLowerCase().includes(o.value.toLowerCase())))), f = t(() => a.virtual && r.value.length > 0), x = t(() => ({
47
- basic: 30,
48
- thick: 38,
49
- thin: 22
50
- })[a.height || "basic"]), I = t(() => a.virtualItemHeight || x.value), H = t(() => a.virtualOverscan), q = t(() => a.virtualDynamicHeight), n = X(r, {
49
+ set: b
50
+ }), a = s(!1), z = s(null), x = () => {
51
+ i.value = !0, a.value = !1;
52
+ }, r = l(() => t.list.filter((e) => Object.keys(e).some((I) => String(e[I]).toLowerCase().includes(o.value.toLowerCase())))), f = l(() => t.virtual && r.value.length > 0), H = l(() => t.virtualItemHeight || W(t.height)), q = l(() => t.virtualOverscan), N = l(() => t.virtualDynamicHeight), n = ae(r, {
51
53
  enabled: f,
52
- itemHeight: I,
53
- overscan: H,
54
- dynamic: q
55
- }), z = t(() => n.virtualItems.value), B = t(() => ({
56
- height: `${n.totalHeight.value}px`
57
- })), E = t(() => ({
58
- transform: `translateY(${n.offsetTop.value}px)`
59
- })), N = (e) => typeof e == "number" ? `${e}px` : e, j = t(() => N(a.virtualMaxHeight)), u = s(0), v = t(() => r.value[u.value]), m = t(() => `${a.id || a.name || "nmorph-autocomplete"}-listbox`), w = (e) => `${m.value}-option-${e}`;
60
- c(
61
- () => a.modelValue,
62
- (e) => {
63
- e !== o.value && (o.value = e);
64
- }
65
- ), c(r, async (e) => {
66
- l.value = !i.value && o.value !== "" && e.length > 0, u.value = 0, await Q(), n.scrollToIndex(0), n.refresh();
54
+ itemHeight: H,
55
+ overscan: q,
56
+ dynamic: N
57
+ }), B = l(() => n.virtualItems.value), E = n.spacerStyle, $ = n.contentStyle, j = l(() => X(t.virtualMaxHeight)), u = s(0), h = l(() => r.value[u.value]), g = l(() => `${t.id || t.name || "nmorph-autocomplete"}-listbox`), D = (e) => `${g.value}-option-${e}`;
58
+ c(m, (e) => {
59
+ e !== o.value && (o.value = e);
60
+ }), c(r, async (e) => {
61
+ a.value = !i.value && o.value !== "" && e.length > 0, u.value = 0, await Q(), n.scrollToIndex(0), n.refresh();
67
62
  });
68
- const h = (e) => {
69
- p("select", e), o.value = e.value, p("update:model-value", o.value), setTimeout(() => {
70
- i.value = !0, l.value = !1;
63
+ const y = (e) => {
64
+ p("select", e), o.value = e.value, v(o.value), setTimeout(() => {
65
+ i.value = !0, a.value = !1;
71
66
  });
72
- }, R = (e) => {
73
- h(e);
74
- }, U = () => {
75
- i.value = !1, l.value = r.value.length > 0;
67
+ }, F = (e) => {
68
+ y(e);
69
+ }, R = () => {
70
+ i.value = !1, a.value = r.value.length > 0;
76
71
  }, d = s(!1);
77
72
  c(o, async (e) => {
78
- e !== "" && a.actionCallback && (d.value = !0, await a.actionCallback(), d.value = !1);
73
+ e !== "" && t.actionCallback && (d.value = !0, await t.actionCallback(), d.value = !1);
79
74
  }), c(d, (e) => {
80
- e && (l.value = !0);
75
+ e && (a.value = !0);
81
76
  }), c(u, (e) => {
82
77
  f.value && n.scrollToIndex(e);
83
78
  });
84
- const D = () => {
85
- r.value.length && (l.value = !0, u.value = (u.value + 1) % r.value.length);
86
- }, S = () => {
87
- r.value.length && (l.value = !0, u.value = (u.value - 1 + r.value.length) % r.value.length);
79
+ const S = () => {
80
+ r.value.length && (a.value = !0, u.value = (u.value + 1) % r.value.length);
81
+ }, w = () => {
82
+ r.value.length && (a.value = !0, u.value = (u.value - 1 + r.value.length) % r.value.length);
88
83
  }, k = () => {
89
- !l.value || !v.value || h(v.value);
90
- }, Z = (e) => {
91
- e.key === "ArrowDown" ? (e.preventDefault(), D()) : e.key === "ArrowUp" ? (e.preventDefault(), S()) : e.key === "Enter" ? (e.preventDefault(), k()) : e.key === "Escape" && (e.preventDefault(), b());
92
- }, F = t(() => ({
84
+ !a.value || !h.value || y(h.value);
85
+ }, U = (e) => {
86
+ e.key === "ArrowDown" ? (e.preventDefault(), S()) : e.key === "ArrowUp" ? (e.preventDefault(), w()) : e.key === "Enter" ? (e.preventDefault(), k()) : e.key === "Escape" && (e.preventDefault(), x());
87
+ }, Z = l(() => ({
93
88
  role: "combobox",
94
89
  "aria-autocomplete": "list",
95
- "aria-expanded": l.value,
96
- "aria-controls": m.value,
97
- "aria-activedescendant": l.value ? w(u.value) : void 0
98
- })), P = (e, g) => {
99
- const J = e instanceof Element ? e : e?.$el;
100
- n.measureElement(g, J);
101
- }, C = ee(l, () => a.zIndex), Y = t(() => ({
90
+ "aria-expanded": a.value,
91
+ "aria-controls": g.value,
92
+ "aria-activedescendant": a.value ? D(u.value) : void 0
93
+ })), P = (e, I) => {
94
+ n.measureElement(I, Y(e));
95
+ }, C = le(a, () => t.zIndex), G = l(() => ({
102
96
  "--nmorph-autocomplete-input-z-index": C.value + 1
103
- })), G = t(
97
+ })), J = l(
104
98
  () => M({
105
- nmorph: [W[a.height]]
99
+ nmorph: [ee[t.height]]
106
100
  })
107
- ), _ = { props: a, initialValue: o, emit: p, modifiers: T, userClosed: i, updateValueHandler: y, inputValue: V, open: l, nmorphAutocompleteDOMRef: A, closeHandler: b, filteredList: r, virtualEnabled: f, defaultOptionHeight: x, virtualItemHeight: I, virtualOverscan: H, virtualDynamicHeight: q, virtualList: n, virtualItems: z, virtualSpacerStyle: B, virtualContentStyle: E, getCssSize: N, virtualMaxHeight: j, currentIndex: u, activeItem: v, listboxId: m, getOptionId: w, selectItem: h, clickHandler: R, focusHandler: U, loader: d, arrowDownHandler: D, arrowUpHandler: S, enterHandler: k, keydownHandler: Z, inputAttrs: F, setVirtualItemRef: P, dropdownZIndex: C, styles: Y, optionHeightModifiers: G, get NmorphIcon() {
108
- return le;
101
+ ), _ = { props: t, emit: p, modelValue: m, updateModelValue: v, initialValue: o, modifiers: A, userClosed: i, updateValueHandler: b, inputValue: T, open: a, nmorphAutocompleteDOMRef: z, closeHandler: x, filteredList: r, virtualEnabled: f, virtualItemHeight: H, virtualOverscan: q, virtualDynamicHeight: N, virtualList: n, virtualItems: B, virtualSpacerStyle: E, virtualContentStyle: $, virtualMaxHeight: j, currentIndex: u, activeItem: h, listboxId: g, getOptionId: D, selectItem: y, clickHandler: F, focusHandler: R, loader: d, arrowDownHandler: S, arrowUpHandler: w, enterHandler: k, keydownHandler: U, inputAttrs: Z, setVirtualItemRef: P, dropdownZIndex: C, styles: G, optionHeightModifiers: J, get NmorphIcon() {
102
+ return ue;
109
103
  }, get NmorphDropdown() {
110
- return ae;
104
+ return oe;
111
105
  }, get NmorphTextInput() {
112
- return te;
113
- }, get NmorphIconLoaderDots() {
114
106
  return re;
107
+ }, get NmorphIconLoaderDots() {
108
+ return ne;
115
109
  } };
116
110
  return Object.defineProperty(_, "__isScriptSetup", { enumerable: !1, value: !0 }), _;
117
111
  }
118
112
  });
119
113
  export {
120
- ve as default
114
+ Ie as default
121
115
  };
@@ -1 +1 @@
1
- .nmorph-checkbox{--size: var(--height);display:inline-flex;align-items:center;vertical-align:middle;cursor:pointer}.nmorph-checkbox .nmorph-checkbox__content{position:relative;display:flex;justify-content:center;align-items:center}.nmorph-checkbox .nmorph-checkbox__input-wrapper{position:relative;width:var(--size);height:var(--size)}.nmorph-checkbox input{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0}.nmorph-checkbox input:focus-visible{outline:2px solid var(--nmorph-accent-color);opacity:1;scale:.95}.nmorph-checkbox .nmorph-checkbox__fake{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-checkbox .nmorph-checkbox__label,.nmorph-checkbox .nmorph-checkbox__fake span{font-weight:400;font-size:var(--font-size-small);line-height:var(--line-height-regular)}.nmorph-checkbox .nmorph-checkbox__fake-checked{position:absolute;top:50%;left:50%;width:50%;height:50%;background:var(--nmorph-accent-color);border-radius:var(--border-radius-20);transform:translate(-50%,-50%)}.nmorph-checkbox .nmorph-checkbox__label{margin-left:var(--indentation-02);line-height:1}.nmorph-checkbox .nmorph-checkbox__fake span{line-height:.8}.nmorph-checkbox.nmorph-checkbox--button .nmorph-checkbox__fake{position:relative;display:flex;justify-content:center;align-items:center;width:auto;min-width:var(--size);height:var(--size);padding:var(--indentation-03);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-checkbox.nmorph--extra-thin-component .nmorph-checkbox__label,.nmorph-checkbox.nmorph--extra-thin-component .nmorph-checkbox__fake span{font-size:var(--font-size-tiny);line-height:var(--line-height-line)}.nmorph-checkbox.nmorph--extra-thin-component.nmorph-checkbox--button .nmorph-checkbox__fake{padding:var(--indentation-02)}.nmorph-checkbox.nmorph-checkbox--checked .nmorph-checkbox__fake{background:var(--nmorph-main-color);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-checkbox.nmorph-checkbox--disabled{cursor:not-allowed;opacity:.6}
1
+ .nmorph-checkbox{--size: var(--height);--nmorph-selection-control-font-size: var(--font-size-small);--nmorph-selection-control-line-height: var(--line-height-regular);--nmorph-selection-control-inline-padding: var(--indentation-03);display:inline-flex;align-items:center;vertical-align:middle;cursor:pointer}.nmorph-checkbox.nmorph{height:auto;min-height:var(--size)}.nmorph-checkbox .nmorph-checkbox__content{position:relative;display:flex;justify-content:center;align-items:center;min-height:var(--size)}.nmorph-checkbox .nmorph-checkbox__input-wrapper{position:relative;width:var(--size);height:var(--size)}.nmorph-checkbox input{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0}.nmorph-checkbox input:focus-visible{outline:2px solid var(--nmorph-accent-color);opacity:1;scale:.95}.nmorph-checkbox .nmorph-checkbox__fake{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-checkbox .nmorph-checkbox__label,.nmorph-checkbox .nmorph-checkbox__fake span{font-weight:400;font-size:var(--nmorph-selection-control-font-size);line-height:var(--nmorph-selection-control-line-height)}.nmorph-checkbox .nmorph-checkbox__fake-checked{position:absolute;top:50%;left:50%;width:50%;height:50%;background:var(--nmorph-accent-color);border-radius:var(--border-radius-20);transform:translate(-50%,-50%)}.nmorph-checkbox .nmorph-checkbox__label{margin-left:var(--indentation-02);line-height:1}.nmorph-checkbox .nmorph-checkbox__fake span{line-height:.8}.nmorph-checkbox.nmorph-checkbox--button .nmorph-checkbox__fake{position:relative;display:flex;justify-content:center;align-items:center;width:auto;min-width:var(--size);height:var(--size);padding:var(--nmorph-selection-control-inline-padding);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-checkbox.nmorph--extra-thin-component{--nmorph-selection-control-font-size: var(--font-size-tiny);--nmorph-selection-control-line-height: var(--line-height-line);--nmorph-selection-control-inline-padding: var(--indentation-02)}.nmorph-checkbox.nmorph--thin-component{--nmorph-selection-control-font-size: var(--font-size-extra-small)}.nmorph-checkbox.nmorph--basic-component{--nmorph-selection-control-font-size: var(--font-size-small)}.nmorph-checkbox.nmorph--thick-component{--nmorph-selection-control-font-size: var(--font-size-base)}.nmorph-checkbox.nmorph-checkbox--checked .nmorph-checkbox__fake{background:var(--nmorph-main-color);box-shadow:inset var(--base-shadow-width) var(--base-shadow-width) var(--base-shadow-blur) var(--nmorph-dark-shade-color),inset calc(-1 * var(--base-shadow-width)) calc(-1 * var(--base-shadow-width)) var(--base-shadow-blur) var(--nmorph-light-shade-color)}.nmorph-checkbox.nmorph-checkbox--disabled{cursor:not-allowed;opacity:.6}