nve-designsystem 3.1.0 → 3.3.0

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 (197) hide show
  1. package/chunks/chunk.2PCBEMQZ.js +163 -226
  2. package/chunks/chunk.36O46B5H.js +15 -15
  3. package/chunks/chunk.4TUIT776.js +78 -96
  4. package/chunks/chunk.5JY5FUCG.js +965 -1245
  5. package/chunks/chunk.5P45LHIX.js +668 -96
  6. package/chunks/chunk.6CTB5ZDJ.js +107 -100
  7. package/chunks/chunk.B4BZKR24.js +29 -39
  8. package/chunks/chunk.D5YQDJ7X.js +122 -166
  9. package/chunks/chunk.EA437WHD.js +5 -5
  10. package/chunks/chunk.GI7VDIWX.js +14 -15
  11. package/chunks/chunk.GMYPQTFK.js +18 -20
  12. package/chunks/chunk.HVTXQL7M.js +191 -215
  13. package/chunks/chunk.IKV4VH3T.js +18 -16
  14. package/chunks/chunk.IVVHNXMC.js +26 -27
  15. package/chunks/chunk.JHOXTQXA.js +65 -74
  16. package/chunks/chunk.JXOKFADN.js +63 -90
  17. package/chunks/chunk.K7JGTRV7.js +24 -23
  18. package/chunks/chunk.KPLQLAWP.js +132 -147
  19. package/chunks/chunk.LD4M4QGE.js +61 -74
  20. package/chunks/chunk.MSKEYBDI.js +53 -71
  21. package/chunks/chunk.NYIIDP5N.js +39 -45
  22. package/chunks/chunk.RWUUFNUL.js +91 -114
  23. package/chunks/chunk.SAPQLUO4.js +249 -228
  24. package/chunks/chunk.SI4ACBFK.js +139 -5
  25. package/chunks/chunk.TP2GB2HO.js +361 -460
  26. package/chunks/chunk.UDWRA64J.js +185 -223
  27. package/chunks/chunk.URTPIBTY.js +119 -151
  28. package/chunks/chunk.VESXC477.js +63 -66
  29. package/chunks/chunk.XA43ZQPC.js +198 -313
  30. package/chunks/chunk.XQ2OKYYA.js +25 -26
  31. package/chunks/chunk.XZNBUGX7.js +6 -6
  32. package/chunks/chunk.YHLNUJ7P.js +93 -116
  33. package/chunks/chunk.ZH2AND3P.js +340 -399
  34. package/chunks/chunk.ZL53POKZ.js +61 -156
  35. package/chunks/chunk.js +20 -0
  36. package/chunks/class-map.js +49 -45
  37. package/chunks/decorate.js +105 -0
  38. package/chunks/directive-helpers.js +5 -7
  39. package/chunks/if-defined.js +5 -5
  40. package/chunks/lit.js +525 -0
  41. package/chunks/live.js +24 -24
  42. package/chunks/nve-alert.component.js +163 -0
  43. package/chunks/nve-carousel-item.component.js +36 -0
  44. package/chunks/nve-carousel.component.js +41 -0
  45. package/chunks/nve-checkbox-group.component.js +114 -0
  46. package/chunks/nve-checkbox.component.js +28 -0
  47. package/chunks/nve-dialog.component.js +39 -0
  48. package/chunks/nve-divider.component.js +23 -0
  49. package/chunks/nve-drawer.component.js +40 -0
  50. package/chunks/nve-dropdown.component.js +83 -0
  51. package/chunks/nve-input.component.js +80 -0
  52. package/chunks/nve-label.component.js +89 -0
  53. package/chunks/nve-menu-item.component.js +35 -0
  54. package/chunks/nve-menu.component.js +17 -0
  55. package/chunks/nve-option.component.js +27 -0
  56. package/chunks/nve-popup.component.js +15 -0
  57. package/chunks/nve-radio-button.component.js +20 -0
  58. package/chunks/nve-radio-group.component.js +78 -0
  59. package/chunks/nve-radio.component.js +18 -0
  60. package/chunks/nve-select.component.js +58 -0
  61. package/chunks/nve-skeleton.component.js +20 -0
  62. package/chunks/nve-spinner.component.js +23 -0
  63. package/chunks/nve-tooltip.component.js +20 -0
  64. package/chunks/nve-warning-level.component.js +57 -0
  65. package/chunks/ref.js +75 -84
  66. package/chunks/shoelace.js +10006 -0
  67. package/chunks/static-html.js +27 -0
  68. package/chunks/unsafe-html.js +24 -20
  69. package/chunks/updateInvalidProperty.js +7 -7
  70. package/chunks/watch.js +20 -20
  71. package/components/nve-accordion/nve-accordion.component.js +24 -30
  72. package/components/nve-accordion-item/nve-accordion-item.component.js +30 -64
  73. package/components/nve-accordion-item/nve-accordion-item.styles.js +5 -5
  74. package/components/nve-alert/nve-alert.component.js +2 -227
  75. package/components/nve-alert/nve-alert.styles.js +45 -27
  76. package/components/nve-badge/nve-badge.component.js +41 -45
  77. package/components/nve-badge/nve-badge.styles.js +33 -31
  78. package/components/nve-button/nve-button.component.d.ts +110 -10
  79. package/components/nve-button/nve-button.component.js +146 -39
  80. package/components/nve-button/nve-button.styles.js +214 -157
  81. package/components/nve-carousel/nve-carousel.component.js +2 -47
  82. package/components/nve-carousel/nve-carousel.styles.js +6 -6
  83. package/components/nve-carousel-item/nve-carousel-item.component.js +2 -40
  84. package/components/nve-carousel-item/nve-carousel-item.styles.js +5 -5
  85. package/components/nve-carousel-thumbnail/nve-carousel-thumbnail.component.js +44 -54
  86. package/components/nve-carousel-thumbnail/nve-carousel-thumbnail.styles.js +5 -5
  87. package/components/nve-checkbox/nve-checkbox.component.js +2 -34
  88. package/components/nve-checkbox/nve-checkbox.styles.js +7 -7
  89. package/components/nve-checkbox-group/nve-checkbox-group.component.js +2 -152
  90. package/components/nve-checkbox-group/nve-checkbox-group.styles.js +5 -5
  91. package/components/nve-combobox/nve-combobox.component.js +222 -440
  92. package/components/nve-combobox/nve-combobox.styles.js +6 -6
  93. package/components/nve-darkmode-switch/nve-darkmode-switch.component.js +32 -38
  94. package/components/nve-dialog/nve-dialog-styles.js +6 -6
  95. package/components/nve-dialog/nve-dialog.component.js +2 -54
  96. package/components/nve-divider/nve-divider.component.js +2 -30
  97. package/components/nve-drawer/nve-drawer.component.js +2 -44
  98. package/components/nve-drawer/nve-drawer.styles.js +6 -6
  99. package/components/nve-dropdown/nve-dropdown.component.js +2 -79
  100. package/components/nve-dropdown/nve-dropdown.styles.js +5 -5
  101. package/components/nve-heading/nve-heading.component.d.ts +29 -0
  102. package/components/nve-heading/nve-heading.component.js +45 -0
  103. package/components/nve-heading/nve-heading.styles.d.ts +2 -0
  104. package/components/nve-heading/nve-heading.styles.js +41 -0
  105. package/components/nve-icon/nve-icon.component.js +145 -164
  106. package/components/nve-icon/nve-icon.styles.js +11 -6
  107. package/components/nve-icon/offline-icons.js +16 -13
  108. package/components/nve-input/nve-input.component.js +2 -100
  109. package/components/nve-input/nve-input.styles.js +5 -5
  110. package/components/nve-label/nve-label.component.js +2 -115
  111. package/components/nve-label/nve-label.styles.js +5 -5
  112. package/components/nve-link-card/nve-link-card.component.d.ts +5 -2
  113. package/components/nve-link-card/nve-link-card.component.js +44 -80
  114. package/components/nve-link-card/nve-link-card.styles.js +71 -66
  115. package/components/nve-menu/nve-menu.component.js +2 -22
  116. package/components/nve-menu/nve-menu.styles.js +5 -5
  117. package/components/nve-menu-item/nve-menu-item.component.js +2 -43
  118. package/components/nve-menu-item/nve-menu-item.styles.js +7 -7
  119. package/components/nve-message-card/nve-message-card.component.js +61 -91
  120. package/components/nve-message-card/nve-message-card.styles.js +24 -27
  121. package/components/nve-navigation-card/nve-navigation-card.component.d.ts +52 -0
  122. package/components/nve-navigation-card/nve-navigation-card.component.js +60 -0
  123. package/components/nve-navigation-card/nve-navigation-card.styles.d.ts +2 -0
  124. package/components/nve-navigation-card/nve-navigation-card.styles.js +112 -0
  125. package/components/nve-option/nve-option.component.js +2 -41
  126. package/components/nve-option/nve-option.styles.js +5 -5
  127. package/components/nve-paragraph/nve-paragraph.component.d.ts +26 -0
  128. package/components/nve-paragraph/nve-paragraph.component.js +26 -0
  129. package/components/nve-paragraph/nve-paragraph.styles.d.ts +2 -0
  130. package/components/nve-paragraph/nve-paragraph.styles.js +105 -0
  131. package/components/nve-popup/nve-popup.component.js +2 -22
  132. package/components/nve-radio/nve-radio.component.js +2 -23
  133. package/components/nve-radio/nve-radio.styles.js +5 -5
  134. package/components/nve-radio-button/nve-radio-button.component.js +2 -25
  135. package/components/nve-radio-button/nve-radio-button.styles.js +5 -5
  136. package/components/nve-radio-group/nve-radio-group.component.js +2 -119
  137. package/components/nve-radio-group/nve-radio-group.styles.js +5 -5
  138. package/components/nve-relative-time/nve-relative-time.component.js +21 -56
  139. package/components/nve-relative-time/nve-relative-time.styles.js +5 -5
  140. package/components/nve-select/nve-select.component.js +2 -80
  141. package/components/nve-select/nve-select.styles.js +6 -6
  142. package/components/nve-skeleton/nve-skeleton.component.js +2 -27
  143. package/components/nve-skeleton/nve-skeleton.styles.js +5 -5
  144. package/components/nve-spinner/nve-spinner.component.js +2 -31
  145. package/components/nve-stepper/nve-step/nve-step.component.js +113 -173
  146. package/components/nve-stepper/nve-step/nve-step.styles.js +12 -12
  147. package/components/nve-stepper/nve-stepper-mobile.component.js +37 -49
  148. package/components/nve-stepper/nve-stepper-mobile.styles.js +7 -7
  149. package/components/nve-stepper/nve-stepper.component.js +94 -139
  150. package/components/nve-stepper/nve-stepper.styles.js +5 -5
  151. package/components/nve-switch/nve-switch.component.js +75 -107
  152. package/components/nve-switch/nve-switch.styles.js +7 -7
  153. package/components/nve-tab/nve-tab.component.js +30 -42
  154. package/components/nve-tab/nve-tab.styles.js +7 -7
  155. package/components/nve-tab-group/nve-tab-group.component.js +180 -260
  156. package/components/nve-tab-group/nve-tab-group.styles.js +5 -5
  157. package/components/nve-tab-panel/nve-tab-panel.component.js +21 -31
  158. package/components/nve-tab-panel/nve-tab-panel.styles.js +5 -5
  159. package/components/nve-tag/nve-tag.component.d.ts +3 -3
  160. package/components/nve-tag/nve-tag.component.js +71 -72
  161. package/components/nve-tag/nve-tag.styles.js +23 -22
  162. package/components/nve-textarea/nve-textarea.component.d.ts +3 -1
  163. package/components/nve-textarea/nve-textarea.component.js +112 -173
  164. package/components/nve-textarea/nve-textarea.styles.js +10 -5
  165. package/components/nve-tooltip/nve-tooltip.component.js +2 -30
  166. package/components/nve-tooltip/nve-tooltip.styles.js +5 -5
  167. package/components/nve-warning-level/nve-warning-level.component.js +2 -78
  168. package/components/nve-warning-level/nve-warning-level.styles.js +7 -7
  169. package/css/global.css +13 -55
  170. package/css/nve.css +1048 -393
  171. package/css/nve_dark.css +406 -305
  172. package/css/rme.css +1050 -395
  173. package/css/rme_dark.css +408 -307
  174. package/css/shoelace-styles.css +539 -0
  175. package/css/varsom.css +1046 -391
  176. package/css/varsom_dark.css +404 -303
  177. package/custom-elements.json +2905 -12389
  178. package/fonts/LICENSE.txt +37 -0
  179. package/fonts/SourceSans3-VariableFont_wght.woff2 +0 -0
  180. package/interfaces/NveComponent.interface.js +0 -1
  181. package/nve-designsystem.d.ts +5 -0
  182. package/nve-designsystem.js +46 -86
  183. package/package.json +26 -8
  184. package/registerIcons/systemLibraryCustomization.js +23 -91
  185. package/vite-env.d.js +0 -1
  186. package/chunks/chunk.3RPBFEDE.js +0 -162
  187. package/chunks/chunk.JCXLDPQF.js +0 -225
  188. package/chunks/chunk.JQBT7BOV.js +0 -8446
  189. package/chunks/chunk.MAQXLKQ7.js +0 -598
  190. package/chunks/lit-element.js +0 -508
  191. package/chunks/property.js +0 -37
  192. package/chunks/query.js +0 -13
  193. package/chunks/state.js +0 -7
  194. package/chunks/static.js +0 -26
  195. package/nve-designsystem.css +0 -1
  196. package/vscode.css-custom-data.json +0 -621
  197. package/vscode.html-custom-data.json +0 -2354
@@ -1,47 +1,41 @@
1
- var a = class {
2
- constructor(t, ...e) {
3
- this.slotNames = [], this.handleSlotChange = (o) => {
4
- const s = o.target;
5
- (this.slotNames.includes("[default]") && !s.name || s.name && this.slotNames.includes(s.name)) && this.host.requestUpdate();
6
- }, (this.host = t).addController(this), this.slotNames = e;
7
- }
8
- hasDefaultSlot() {
9
- return [...this.host.childNodes].some((t) => {
10
- if (t.nodeType === t.TEXT_NODE && t.textContent.trim() !== "")
11
- return !0;
12
- if (t.nodeType === t.ELEMENT_NODE) {
13
- const e = t;
14
- if (e.tagName.toLowerCase() === "sl-visually-hidden")
15
- return !1;
16
- if (!e.hasAttribute("slot"))
17
- return !0;
18
- }
19
- return !1;
20
- });
21
- }
22
- hasNamedSlot(t) {
23
- return this.host.querySelector(`:scope > [slot="${t}"]`) !== null;
24
- }
25
- test(t) {
26
- return t === "[default]" ? this.hasDefaultSlot() : this.hasNamedSlot(t);
27
- }
28
- hostConnected() {
29
- this.host.shadowRoot.addEventListener("slotchange", this.handleSlotChange);
30
- }
31
- hostDisconnected() {
32
- this.host.shadowRoot.removeEventListener("slotchange", this.handleSlotChange);
33
- }
1
+ //#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.NYIIDP5N.js
2
+ var e = class {
3
+ constructor(e, ...t) {
4
+ this.slotNames = [], this.handleSlotChange = (e) => {
5
+ let t = e.target;
6
+ (this.slotNames.includes("[default]") && !t.name || t.name && this.slotNames.includes(t.name)) && this.host.requestUpdate();
7
+ }, (this.host = e).addController(this), this.slotNames = t;
8
+ }
9
+ hasDefaultSlot() {
10
+ return [...this.host.childNodes].some((e) => {
11
+ if (e.nodeType === e.TEXT_NODE && e.textContent.trim() !== "") return !0;
12
+ if (e.nodeType === e.ELEMENT_NODE) {
13
+ let t = e;
14
+ if (t.tagName.toLowerCase() === "sl-visually-hidden") return !1;
15
+ if (!t.hasAttribute("slot")) return !0;
16
+ }
17
+ return !1;
18
+ });
19
+ }
20
+ hasNamedSlot(e) {
21
+ return this.host.querySelector(`:scope > [slot="${e}"]`) !== null;
22
+ }
23
+ test(e) {
24
+ return e === "[default]" ? this.hasDefaultSlot() : this.hasNamedSlot(e);
25
+ }
26
+ hostConnected() {
27
+ this.host.shadowRoot.addEventListener("slotchange", this.handleSlotChange);
28
+ }
29
+ hostDisconnected() {
30
+ this.host.shadowRoot.removeEventListener("slotchange", this.handleSlotChange);
31
+ }
34
32
  };
35
- function n(t) {
36
- if (!t)
37
- return "";
38
- const e = t.assignedNodes({ flatten: !0 });
39
- let o = "";
40
- return [...e].forEach((s) => {
41
- s.nodeType === Node.TEXT_NODE && (o += s.textContent);
42
- }), o;
33
+ function t(e) {
34
+ if (!e) return "";
35
+ let t = e.assignedNodes({ flatten: !0 }), n = "";
36
+ return [...t].forEach((e) => {
37
+ e.nodeType === Node.TEXT_NODE && (n += e.textContent);
38
+ }), n;
43
39
  }
44
- export {
45
- a as H,
46
- n as g
47
- };
40
+ //#endregion
41
+ export { t as n, e as t };
@@ -1,13 +1,12 @@
1
- import { i as g } from "./lit-element.js";
2
- import { S as y } from "./chunk.YHLNUJ7P.js";
3
- import { c as v, d as i, S as $ } from "./chunk.4TUIT776.js";
4
- import { e as k } from "./class-map.js";
5
- import { i as f, u as x } from "./static.js";
6
- import { o as l } from "./if-defined.js";
7
- import { n } from "./property.js";
8
- import { r as S } from "./state.js";
9
- import { e as B } from "./query.js";
10
- var _ = g`
1
+ import { u as e } from "./lit.js";
2
+ import { a as t, o as n, r } from "./decorate.js";
3
+ import { n as i, r as a, t as o } from "./chunk.4TUIT776.js";
4
+ import { t as s } from "./chunk.YHLNUJ7P.js";
5
+ import { t as c } from "./class-map.js";
6
+ import { t as l } from "./if-defined.js";
7
+ import { r as u, t as d } from "./static-html.js";
8
+ //#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.6I2T3DLI.js
9
+ var f = e`
11
10
  :host {
12
11
  display: inline-block;
13
12
  color: var(--sl-color-neutral-600);
@@ -54,48 +53,45 @@ var _ = g`
54
53
  .icon-button__icon {
55
54
  pointer-events: none;
56
55
  }
57
- `, e = class extends $ {
58
- constructor() {
59
- super(...arguments), this.hasFocus = !1, this.label = "", this.disabled = !1;
60
- }
61
- handleBlur() {
62
- this.hasFocus = !1, this.emit("sl-blur");
63
- }
64
- handleFocus() {
65
- this.hasFocus = !0, this.emit("sl-focus");
66
- }
67
- handleClick(t) {
68
- this.disabled && (t.preventDefault(), t.stopPropagation());
69
- }
70
- /** Simulates a click on the icon button. */
71
- click() {
72
- this.button.click();
73
- }
74
- /** Sets focus on the icon button. */
75
- focus(t) {
76
- this.button.focus(t);
77
- }
78
- /** Removes focus from the icon button. */
79
- blur() {
80
- this.button.blur();
81
- }
82
- render() {
83
- const t = !!this.href, o = t ? f`a` : f`button`;
84
- return x`
85
- <${o}
56
+ `, p = class extends o {
57
+ constructor() {
58
+ super(...arguments), this.hasFocus = !1, this.label = "", this.disabled = !1;
59
+ }
60
+ handleBlur() {
61
+ this.hasFocus = !1, this.emit("sl-blur");
62
+ }
63
+ handleFocus() {
64
+ this.hasFocus = !0, this.emit("sl-focus");
65
+ }
66
+ handleClick(e) {
67
+ this.disabled && (e.preventDefault(), e.stopPropagation());
68
+ }
69
+ click() {
70
+ this.button.click();
71
+ }
72
+ focus(e) {
73
+ this.button.focus(e);
74
+ }
75
+ blur() {
76
+ this.button.blur();
77
+ }
78
+ render() {
79
+ let e = !!this.href, t = e ? d`a` : d`button`;
80
+ return u`
81
+ <${t}
86
82
  part="base"
87
- class=${k({
88
- "icon-button": !0,
89
- "icon-button--disabled": !t && this.disabled,
90
- "icon-button--focused": this.hasFocus
91
- })}
92
- ?disabled=${l(t ? void 0 : this.disabled)}
93
- type=${l(t ? void 0 : "button")}
94
- href=${l(t ? this.href : void 0)}
95
- target=${l(t ? this.target : void 0)}
96
- download=${l(t ? this.download : void 0)}
97
- rel=${l(t && this.target ? "noreferrer noopener" : void 0)}
98
- role=${l(t ? void 0 : "button")}
83
+ class=${c({
84
+ "icon-button": !0,
85
+ "icon-button--disabled": !e && this.disabled,
86
+ "icon-button--focused": this.hasFocus
87
+ })}
88
+ ?disabled=${l(e ? void 0 : this.disabled)}
89
+ type=${l(e ? void 0 : "button")}
90
+ href=${l(e ? this.href : void 0)}
91
+ target=${l(e ? this.target : void 0)}
92
+ download=${l(e ? this.download : void 0)}
93
+ rel=${l(e && this.target ? "noreferrer noopener" : void 0)}
94
+ role=${l(e ? void 0 : "button")}
99
95
  aria-disabled=${this.disabled ? "true" : "false"}
100
96
  aria-label="${this.label}"
101
97
  tabindex=${this.disabled ? "-1" : "0"}
@@ -110,74 +106,55 @@ var _ = g`
110
106
  src=${l(this.src)}
111
107
  aria-hidden="true"
112
108
  ></sl-icon>
113
- </${o}>
109
+ </${t}>
114
110
  `;
115
- }
111
+ }
116
112
  };
117
- e.styles = [v, _];
118
- e.dependencies = { "sl-icon": y };
119
- i([
120
- B(".icon-button")
121
- ], e.prototype, "button", 2);
122
- i([
123
- S()
124
- ], e.prototype, "hasFocus", 2);
125
- i([
126
- n()
127
- ], e.prototype, "name", 2);
128
- i([
129
- n()
130
- ], e.prototype, "library", 2);
131
- i([
132
- n()
133
- ], e.prototype, "src", 2);
134
- i([
135
- n()
136
- ], e.prototype, "href", 2);
137
- i([
138
- n()
139
- ], e.prototype, "target", 2);
140
- i([
141
- n()
142
- ], e.prototype, "download", 2);
143
- i([
144
- n()
145
- ], e.prototype, "label", 2);
146
- i([
147
- n({ type: Boolean, reflect: !0 })
148
- ], e.prototype, "disabled", 2);
149
- function E(t, o) {
150
- return {
151
- top: Math.round(t.getBoundingClientRect().top - o.getBoundingClientRect().top),
152
- left: Math.round(t.getBoundingClientRect().left - o.getBoundingClientRect().left)
153
- };
113
+ p.styles = [i, f], p.dependencies = { "sl-icon": s }, a([r(".icon-button")], p.prototype, "button", 2), a([t()], p.prototype, "hasFocus", 2), a([n()], p.prototype, "name", 2), a([n()], p.prototype, "library", 2), a([n()], p.prototype, "src", 2), a([n()], p.prototype, "href", 2), a([n()], p.prototype, "target", 2), a([n()], p.prototype, "download", 2), a([n()], p.prototype, "label", 2), a([n({
114
+ type: Boolean,
115
+ reflect: !0
116
+ })], p.prototype, "disabled", 2);
117
+ //#endregion
118
+ //#region .pnpm/@shoelace-style+shoelace@2.20.1_@floating-ui+utils@0.2.11_@types+react@19.2.15/node_modules/@shoelace-style/shoelace/dist/chunks/chunk.RWUUFNUL.js
119
+ function m(e, t) {
120
+ return {
121
+ top: Math.round(e.getBoundingClientRect().top - t.getBoundingClientRect().top),
122
+ left: Math.round(e.getBoundingClientRect().left - t.getBoundingClientRect().left)
123
+ };
154
124
  }
155
- var d = /* @__PURE__ */ new Set();
156
- function w() {
157
- const t = document.documentElement.clientWidth;
158
- return Math.abs(window.innerWidth - t);
125
+ var h = /* @__PURE__ */ new Set();
126
+ function g() {
127
+ let e = document.documentElement.clientWidth;
128
+ return Math.abs(window.innerWidth - e);
159
129
  }
160
- function C() {
161
- const t = Number(getComputedStyle(document.body).paddingRight.replace(/px/, ""));
162
- return isNaN(t) || !t ? 0 : t;
130
+ function _() {
131
+ let e = Number(getComputedStyle(document.body).paddingRight.replace(/px/, ""));
132
+ return isNaN(e) || !e ? 0 : e;
163
133
  }
164
- function M(t) {
165
- if (d.add(t), !document.documentElement.classList.contains("sl-scroll-lock")) {
166
- const o = w() + C();
167
- let s = getComputedStyle(document.documentElement).scrollbarGutter;
168
- (!s || s === "auto") && (s = "stable"), o < 2 && (s = ""), document.documentElement.style.setProperty("--sl-scroll-lock-gutter", s), document.documentElement.classList.add("sl-scroll-lock"), document.documentElement.style.setProperty("--sl-scroll-lock-size", `${o}px`);
169
- }
134
+ function v(e) {
135
+ if (h.add(e), !document.documentElement.classList.contains("sl-scroll-lock")) {
136
+ let e = g() + _(), t = getComputedStyle(document.documentElement).scrollbarGutter;
137
+ (!t || t === "auto") && (t = "stable"), e < 2 && (t = ""), document.documentElement.style.setProperty("--sl-scroll-lock-gutter", t), document.documentElement.classList.add("sl-scroll-lock"), document.documentElement.style.setProperty("--sl-scroll-lock-size", `${e}px`);
138
+ }
170
139
  }
171
- function N(t) {
172
- d.delete(t), d.size === 0 && (document.documentElement.classList.remove("sl-scroll-lock"), document.documentElement.style.removeProperty("--sl-scroll-lock-size"));
140
+ function y(e) {
141
+ h.delete(e), h.size === 0 && (document.documentElement.classList.remove("sl-scroll-lock"), document.documentElement.style.removeProperty("--sl-scroll-lock-size"));
173
142
  }
174
- function G(t, o, s = "vertical", r = "smooth") {
175
- const u = E(t, o), c = u.top + o.scrollTop, a = u.left + o.scrollLeft, p = o.scrollLeft, h = o.scrollLeft + o.offsetWidth, b = o.scrollTop, m = o.scrollTop + o.offsetHeight;
176
- (s === "horizontal" || s === "both") && (a < p ? o.scrollTo({ left: a, behavior: r }) : a + t.clientWidth > h && o.scrollTo({ left: a - o.offsetWidth + t.clientWidth, behavior: r })), (s === "vertical" || s === "both") && (c < b ? o.scrollTo({ top: c, behavior: r }) : c + t.clientHeight > m && o.scrollTo({ top: c - o.offsetHeight + t.clientHeight, behavior: r }));
143
+ function b(e, t, n = "vertical", r = "smooth") {
144
+ let i = m(e, t), a = i.top + t.scrollTop, o = i.left + t.scrollLeft, s = t.scrollLeft, c = t.scrollLeft + t.offsetWidth, l = t.scrollTop, u = t.scrollTop + t.offsetHeight;
145
+ (n === "horizontal" || n === "both") && (o < s ? t.scrollTo({
146
+ left: o,
147
+ behavior: r
148
+ }) : o + e.clientWidth > c && t.scrollTo({
149
+ left: o - t.offsetWidth + e.clientWidth,
150
+ behavior: r
151
+ })), (n === "vertical" || n === "both") && (a < l ? t.scrollTo({
152
+ top: a,
153
+ behavior: r
154
+ }) : a + e.clientHeight > u && t.scrollTo({
155
+ top: a - t.offsetHeight + e.clientHeight,
156
+ behavior: r
157
+ }));
177
158
  }
178
- export {
179
- e as S,
180
- M as l,
181
- G as s,
182
- N as u
183
- };
159
+ //#endregion
160
+ export { p as i, b as n, y as r, v as t };