@wpmoo/ui 2.0.0 → 2.1.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.
package/dist/js/chart.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI chart.js v2.0.0 (https://wpmoo.org/)
2
+ * Moo UI chart.js v2.1.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI chart.min.js v2.0.0 (https://wpmoo.org/)
2
+ * Moo UI chart.min.js v2.1.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI combobox.js v2.0.0 (https://wpmoo.org/)
2
+ * Moo UI combobox.js v2.1.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI context-menu.js v2.0.0 (https://wpmoo.org/)
2
+ * Moo UI context-menu.js v2.1.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI datatable.js v2.0.0 (https://wpmoo.org/)
2
+ * Moo UI datatable.js v2.1.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI datepicker.js v2.0.0 (https://wpmoo.org/)
2
+ * Moo UI datepicker.js v2.1.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI datepicker.min.js v2.0.0 (https://wpmoo.org/)
2
+ * Moo UI datepicker.min.js v2.1.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI floating-panel.js v2.0.0 (https://wpmoo.org/)
2
+ * Moo UI floating-panel.js v2.1.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
package/dist/js/moo-ui.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI moo-ui.js v2.0.0 (https://wpmoo.org/)
2
+ * Moo UI moo-ui.js v2.1.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI moo-ui.min.js v2.0.0 (https://wpmoo.org/)
2
+ * Moo UI moo-ui.min.js v2.1.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI overlay-scrollbar.js v2.0.0 (https://wpmoo.org/)
2
+ * Moo UI overlay-scrollbar.js v2.1.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
@@ -1,10 +1,18 @@
1
1
  /*!
2
- * Moo UI password-requirements.js v2.0.0 (https://wpmoo.org/)
2
+ * Moo UI password-requirements.js v2.1.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
6
6
 
7
7
  const instances = /* @__PURE__ */ new WeakMap();
8
+ const MESSAGES = {
9
+ met: "\u2713 %s",
10
+ missing: "\u2014 %s",
11
+ remaining: "Remaining: %s",
12
+ complete: "Shown checks met. Final validation happens on submit.",
13
+ analysis: "Host password analysis must pass."
14
+ };
15
+ const format = (message, value) => message.replace("%s", () => String(value));
8
16
  function strip(value, characters) {
9
17
  const points = Array.from(value);
10
18
  let start = 0;
@@ -45,10 +53,11 @@ class PasswordRequirements {
45
53
  const confirmation = configuration.confirmation && document.getElementById(configuration.confirmation);
46
54
  const localControl = (node) => node?.matches('input[type="password"]') && node.closest(".moo-ui") === owner && node.form === element.closest("form");
47
55
  const policy = configuration.policy;
48
- if (!owner || !localControl(input) || configuration.confirmation && (!localControl(confirmation) || confirmation === input) || policy?.version !== 3 || !Number.isInteger(policy.minlength) || policy.minlength < 1 || !Number.isInteger(policy.maxlength) || policy.maxlength < policy.minlength || policy.maxlength > 128 || !Array.isArray(policy.rules) || !policy.rules.length || policy.rules.some((rule) => !["length", "case", "number", "symbol", "maximum"].includes(rule.key) || typeof rule.label !== "string" || rule.warning !== void 0 && typeof rule.warning !== "boolean") || new Set(policy.rules.map((rule) => rule.key)).size !== policy.rules.length || !["length", "maximum"].every((key) => policy.rules.some((rule) => rule.key === key)) || typeof policy.whitespace !== "string" || options.analyze !== void 0 && typeof options.analyze !== "function") {
56
+ if (!owner || !localControl(input) || configuration.confirmation && (!localControl(confirmation) || confirmation === input) || policy?.version !== 3 || !Number.isInteger(policy.minlength) || policy.minlength < 1 || !Number.isInteger(policy.maxlength) || policy.maxlength < policy.minlength || policy.maxlength > 128 || !Array.isArray(policy.rules) || !policy.rules.length || policy.rules.some((rule) => !["length", "case", "number", "symbol", "maximum"].includes(rule.key) || typeof rule.label !== "string" || rule.warning !== void 0 && typeof rule.warning !== "boolean") || new Set(policy.rules.map((rule) => rule.key)).size !== policy.rules.length || !["length", "maximum"].every((key) => policy.rules.some((rule) => rule.key === key)) || typeof policy.whitespace !== "string" || options.analyze !== void 0 && typeof options.analyze !== "function" || options.messages !== void 0 && (!options.messages || typeof options.messages !== "object" || Object.entries(options.messages).some(([key, value]) => !Object.hasOwn(MESSAGES, key) || typeof value !== "string"))) {
49
57
  throw new TypeError("PasswordRequirements requires same-owner controls and a versioned public policy.");
50
58
  }
51
59
  this._element = element;
60
+ const messages = { ...MESSAGES, ...options.messages };
52
61
  this._initialReady = element.getAttribute("data-requirements-ready");
53
62
  this._originals = /* @__PURE__ */ new Map();
54
63
  this._listeners = [];
@@ -137,7 +146,7 @@ class PasswordRequirements {
137
146
  lastTitle = title;
138
147
  };
139
148
  const show = (node, label, met, warning = false, active = Boolean(input.value)) => {
140
- node.textContent = warning ? label : (met ? "\u2713 " : "\u2014 ") + label;
149
+ node.textContent = warning ? label : format(met ? messages.met : messages.missing, label);
141
150
  node.hidden = warning && (!active || met);
142
151
  node.classList.toggle("text-body", !warning && met);
143
152
  node.classList.toggle("text-danger", warning);
@@ -161,7 +170,7 @@ class PasswordRequirements {
161
170
  }
162
171
  if (options.analyze) states.push({
163
172
  key: "analysis",
164
- label: "Host password analysis must pass.",
173
+ label: messages.analysis,
165
174
  met: Boolean(analysis?.met),
166
175
  warning: true
167
176
  });
@@ -180,7 +189,7 @@ class PasswordRequirements {
180
189
  );
181
190
  const missing = states.filter((state) => !state.met).length;
182
191
  const warnings = states.filter((state) => state.warning && !state.met).map((state) => state.label).join(" ");
183
- const summaryText = !input.value ? this._originals.get(summary).text : missing ? `Remaining: ${missing} ${warnings}`.trim() : "Shown checks met. Final validation happens on submit.";
192
+ const summaryText = !input.value ? this._originals.get(summary).text : missing ? `${format(messages.remaining, missing)} ${warnings}`.trim() : messages.complete;
184
193
  if (summary.textContent !== summaryText) summary.textContent = summaryText;
185
194
  options.onChange?.(states.map(({ key, met }) => ({ key, met: Boolean(input.value) && met })), Boolean(input.value), analysis?.score ?? null);
186
195
  updateSubmit(states);
package/dist/js/sheet.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI sheet.js v2.0.0 (https://wpmoo.org/)
2
+ * Moo UI sheet.js v2.1.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI sidebar.js v2.0.0 (https://wpmoo.org/)
2
+ * Moo UI sidebar.js v2.1.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
package/dist/js/slider.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI slider.js v2.0.0 (https://wpmoo.org/)
2
+ * Moo UI slider.js v2.1.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
package/dist/js/state.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI state.js v2.0.0 (https://wpmoo.org/)
2
+ * Moo UI state.js v2.1.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI table-of-contents.js v2.0.0 (https://wpmoo.org/)
2
+ * Moo UI table-of-contents.js v2.1.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
package/dist/js/toc.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI toc.js v2.0.0 (https://wpmoo.org/)
2
+ * Moo UI toc.js v2.1.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  */
@@ -3,22 +3,22 @@
3
3
  {
4
4
  "export": "./moo.css",
5
5
  "path": "dist/assets/css/moo.css",
6
- "sha256": "d11bbace049bdcc51c609e7c3cfc255aa51cd8ae0ca67861abe632b5403d48d0"
6
+ "sha256": "b59eab8eb8321379f5995c831b17de2984cb90711dbe4fb4cf6ddc879962cb59"
7
7
  },
8
8
  {
9
9
  "export": "./moo-ui.css",
10
10
  "path": "dist/assets/css/moo-ui.css",
11
- "sha256": "9cecb108344be63165a063e6a088657f7714ea7305aa0cc0e85e58474066f154"
11
+ "sha256": "2a898c1c05759626168d736cd999a9abc26ebc675e47187e70b5e0d84d91b85e"
12
12
  },
13
13
  {
14
14
  "export": "./state.js",
15
15
  "path": "dist/js/state.js",
16
- "sha256": "58307028fc5f06a83620a335f2de13fea3ad3959b6a9f9794d0d443b43b48acd"
16
+ "sha256": "d02e78a71a624a0c8d36f33efc4b5a4fa0d2ac49b329e53994c20ff60c386713"
17
17
  }
18
18
  ],
19
19
  "package": {
20
20
  "name": "@wpmoo/ui",
21
- "version": "2.0.0"
21
+ "version": "2.1.0"
22
22
  },
23
23
  "schemaVersion": 1
24
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wpmoo/ui",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Bootstrap markup. shadcn feel. A frontend-framework-free component system for server-rendered apps.",
5
5
  "license": "MIT",
6
6
  "author": "WPMoo (https://wpmoo.org)",
@@ -20,6 +20,12 @@
20
20
  border-radius: var(--bs-border-radius-xl);
21
21
  }
22
22
 
23
+ .wrapper[data-layout="app"][data-shell-mode="document"] {
24
+ height: auto;
25
+ min-height: 100svh;
26
+ overflow: visible;
27
+ }
28
+
23
29
  .wrapper[data-layout="app"] > [data-slot="page"] {
24
30
  display: flex;
25
31
  min-width: 0;
@@ -75,6 +81,10 @@
75
81
  overflow-y: auto;
76
82
  }
77
83
 
84
+ .wrapper[data-layout="app"][data-shell-mode="document"] > [data-slot="page"] > main {
85
+ overflow: visible;
86
+ }
87
+
78
88
  .wrapper[data-layout="app"] > [data-slot="page"] > main > :is(
79
89
  .container,
80
90
  .container-sm,
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Moo UI v2.0.0 (https://wpmoo.org/)
2
+ * Moo UI v2.1.0 (https://wpmoo.org/)
3
3
  * Copyright 2026 WPMoo Authors
4
4
  * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
5
  *
@@ -1,7 +1,8 @@
1
1
  $white: #fff !default;
2
2
  $black: #0a0a0a !default;
3
3
 
4
- $headings-font-weight: 600 !default;
4
+ $moo-heading-font-weight: 600 !default;
5
+ $headings-font-weight: var(--moo-heading-font-weight, #{$moo-heading-font-weight}) !default;
5
6
  $lead-font-size: 1.125rem !default;
6
7
  $lead-font-weight: 400 !default;
7
8
  $display-font-sizes: (
@@ -92,6 +92,7 @@ $moo-theme-colors-border-subtle-dark: (
92
92
  --moo-chart-4: #{$moo-chart-4};
93
93
  --moo-chart-5: #{$moo-chart-5};
94
94
  --moo-heading-font-family: var(--#{$prefix}body-font-family);
95
+ --moo-heading-font-weight: #{$moo-heading-font-weight};
95
96
  --moo-small-font-size: #{$moo-small-font-size};
96
97
  --moo-paragraph-margin-top: #{$moo-paragraph-margin-top};
97
98
  --moo-paragraph-margin-bottom: #{$paragraph-margin-bottom};