@wpmoo/ui 0.9.0 → 1.0.0-rc.10

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 (99) hide show
  1. package/ASSET_LICENSE.md +4 -2
  2. package/LICENSE +28 -0
  3. package/README.md +105 -100
  4. package/certification.json +25 -3
  5. package/dist/assets/css/moo-ui.css +14005 -12457
  6. package/dist/assets/css/moo-ui.min.css +10 -28
  7. package/dist/assets/css/moo.css +2606 -902
  8. package/dist/assets/css/moo.min.css +10 -29
  9. package/dist/js/chart.js +15312 -0
  10. package/dist/js/chart.min.js +27 -0
  11. package/dist/js/combobox.js +129 -85
  12. package/dist/js/context-menu.js +35 -66
  13. package/dist/js/datatable.js +390 -188
  14. package/dist/js/datepicker.js +1197 -0
  15. package/dist/js/datepicker.min.js +7 -0
  16. package/dist/js/moo-ui.js +3947 -0
  17. package/dist/js/moo-ui.min.js +7 -0
  18. package/dist/js/sheet.js +46 -0
  19. package/dist/js/sidebar.js +190 -172
  20. package/dist/js/slider.js +289 -0
  21. package/dist/js/state.js +76 -0
  22. package/dist/release-manifest.json +24 -0
  23. package/package.json +39 -9
  24. package/scss/_components.scss +70 -0
  25. package/scss/_config.scss +18 -0
  26. package/scss/_settings.scss +5 -0
  27. package/scss/components/_accordion.scss +54 -0
  28. package/scss/components/_alert.scss +82 -0
  29. package/scss/components/_avatar.scss +139 -0
  30. package/scss/components/_badge.scss +34 -0
  31. package/scss/components/_breadcrumb.scss +119 -0
  32. package/scss/components/_button.scss +200 -0
  33. package/scss/components/_button_group.scss +57 -0
  34. package/scss/components/_card.scss +114 -0
  35. package/scss/components/_checkbox.scss +78 -0
  36. package/scss/components/_close_button.scss +56 -0
  37. package/scss/components/_collapsible.scss +44 -0
  38. package/scss/components/_combobox.scss +253 -0
  39. package/scss/components/_context-menu.scss +18 -0
  40. package/scss/components/_datatable.scss +1067 -0
  41. package/scss/components/_datepicker.scss +237 -0
  42. package/scss/components/_dialog.scss +69 -0
  43. package/scss/components/_dropdown.scss +201 -0
  44. package/scss/components/_field.scss +94 -0
  45. package/scss/components/_input.scss +31 -0
  46. package/scss/components/_input_group.scss +151 -0
  47. package/scss/components/_kbd.scss +11 -0
  48. package/scss/components/_menubar.scss +17 -0
  49. package/scss/components/_navigation.scss +36 -0
  50. package/scss/components/_pagination.scss +58 -0
  51. package/scss/components/_popover.scss +26 -0
  52. package/scss/components/_progress.scss +5 -0
  53. package/scss/components/_radio_group.scss +108 -0
  54. package/scss/components/_search_trigger.scss +61 -0
  55. package/scss/components/_select.scss +8 -0
  56. package/scss/components/_separator.scss +10 -0
  57. package/scss/components/_sheet.scss +16 -0
  58. package/scss/components/_sidebar.scss +5 -0
  59. package/scss/components/_skeleton.scss +10 -0
  60. package/scss/components/_slider.scss +213 -0
  61. package/scss/components/_spinner.scss +11 -0
  62. package/scss/components/_switch.scss +30 -0
  63. package/scss/components/_table.scss +12 -0
  64. package/scss/components/_tabs.scss +116 -0
  65. package/scss/components/_textarea.scss +8 -0
  66. package/scss/components/_toast.scss +116 -0
  67. package/scss/components/_toggle_group.scss +17 -0
  68. package/scss/components/_tooltip.scss +64 -0
  69. package/scss/components/sidebar/_base.scss +86 -0
  70. package/scss/components/sidebar/_collapsed.scss +112 -0
  71. package/scss/components/sidebar/_identity.scss +71 -0
  72. package/scss/components/sidebar/_menus.scss +219 -0
  73. package/scss/foundations/_backdrop.scss +102 -0
  74. package/scss/foundations/_focus.scss +83 -0
  75. package/scss/foundations/_globals.scss +5 -0
  76. package/scss/foundations/_scope.scss +26 -0
  77. package/scss/layouts/_app.scss +75 -0
  78. package/scss/layouts/_page_grid.scss +27 -0
  79. package/scss/layouts/app/sidebar/_base.scss +84 -0
  80. package/scss/layouts/app/sidebar/_default.scss +20 -0
  81. package/scss/layouts/app/sidebar/_floating.scss +36 -0
  82. package/scss/layouts/app/sidebar/_inset.scss +32 -0
  83. package/scss/mixins/_banner.scss +9 -0
  84. package/scss/moo-core.scss +16 -0
  85. package/scss/moo-ui.scss +54 -0
  86. package/scss/settings/_bootstrap_overrides.scss +7 -0
  87. package/scss/settings/_component_variables.scss +244 -0
  88. package/scss/settings/_forms.scss +28 -0
  89. package/scss/settings/_options.scss +2 -0
  90. package/scss/settings/_palette.scss +90 -0
  91. package/scss/themes/_forms.scss +15 -0
  92. package/scss/themes/_root.scss +20 -0
  93. package/scss/themes/_standalone.scss +3 -0
  94. package/scss/themes/_theme.scss +244 -0
  95. package/scss/utilities/_background_color.scss +18 -0
  96. package/scss/utilities/_scroll_fade.scss +193 -0
  97. package/scss/utilities/_scroll_fade_primitives.scss +43 -0
  98. package/scss/_facade-settings.scss +0 -51
  99. package/scss/settings/_facade_public.scss +0 -23
@@ -0,0 +1,289 @@
1
+ /*!
2
+ * Moo UI slider.js v1.0.0-rc.10 (https://wpmoo.org/)
3
+ * Copyright 2026 WPMoo Authors
4
+ * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
+ */
6
+
7
+ const instances = /* @__PURE__ */ new WeakMap();
8
+ function asNumber(value, fallback) {
9
+ const number = Number(value);
10
+ return Number.isFinite(number) ? number : fallback;
11
+ }
12
+ function inputMinimum(input) {
13
+ return asNumber(input.min, 0);
14
+ }
15
+ function inputMaximum(input) {
16
+ return asNumber(input.max, 100);
17
+ }
18
+ function inputStep(input) {
19
+ if (!input.step || input.step === "any") {
20
+ return 1;
21
+ }
22
+ const step = Number(input.step);
23
+ return Number.isFinite(step) && step > 0 ? step : 1;
24
+ }
25
+ function clamp(value, min, max) {
26
+ return Math.min(Math.max(value, min), max);
27
+ }
28
+ function decimalPlaces(value) {
29
+ const text = String(value);
30
+ if (!text.includes(".")) {
31
+ return 0;
32
+ }
33
+ return text.split(".").at(-1).length;
34
+ }
35
+ function snapToStep(value, input) {
36
+ const min = inputMinimum(input);
37
+ const max = inputMaximum(input);
38
+ if (input.step === "any") {
39
+ return Number(clamp(value, min, max).toFixed(4));
40
+ }
41
+ const step = inputStep(input);
42
+ const snapped = min + Math.round((value - min) / step) * step;
43
+ const precision = Math.max(decimalPlaces(step), decimalPlaces(min));
44
+ return clamp(Number(snapped.toFixed(precision)), min, max);
45
+ }
46
+ function valuePercent(input) {
47
+ const min = inputMinimum(input);
48
+ const max = inputMaximum(input);
49
+ if (max <= min) {
50
+ return 0;
51
+ }
52
+ return (asNumber(input.value, min) - min) / (max - min) * 100;
53
+ }
54
+ function displayValue(input) {
55
+ return input.value || String(inputMinimum(input));
56
+ }
57
+ class MooSlider {
58
+ static getInstance(element) {
59
+ return element?.nodeType === 1 ? instances.get(element) || null : null;
60
+ }
61
+ static getOrCreateInstance(element, config = {}) {
62
+ return MooSlider.getInstance(element) || new MooSlider(element, config);
63
+ }
64
+ constructor(element, config = {}) {
65
+ if (element?.nodeType !== 1 || !element.matches("[data-slider]")) {
66
+ throw new TypeError("MooSlider requires a [data-slider] root element.");
67
+ }
68
+ const existing = instances.get(element);
69
+ if (existing) {
70
+ return existing;
71
+ }
72
+ this._element = element;
73
+ this._document = element.ownerDocument;
74
+ this._window = this._document.defaultView;
75
+ this._config = { ...config };
76
+ this._listeners = [];
77
+ this._dragListeners = [];
78
+ this._draggingInput = null;
79
+ this._disposed = false;
80
+ this._inputs = Array.from(
81
+ element.querySelectorAll(':scope input[type="range"][data-slider-input]')
82
+ );
83
+ this._track = element.querySelector("[data-slider-track]");
84
+ this._output = element.querySelector("[data-slider-output]");
85
+ if (this._inputs.length < 1 || this._inputs.length > 2) {
86
+ throw new TypeError("MooSlider requires one or two native range inputs.");
87
+ }
88
+ if (!this._track) {
89
+ throw new TypeError("MooSlider requires a [data-slider-track] element.");
90
+ }
91
+ instances.set(element, this);
92
+ this._bindEvents();
93
+ this._sync();
94
+ }
95
+ dispose() {
96
+ if (this._disposed) return;
97
+ this._disposed = true;
98
+ this._clearDragListeners();
99
+ this._clearPointerFocus();
100
+ this._listeners.forEach(({ target, type, handler, options }) => {
101
+ target.removeEventListener(type, handler, options);
102
+ });
103
+ this._listeners = [];
104
+ if (instances.get(this._element) === this) {
105
+ instances.delete(this._element);
106
+ }
107
+ }
108
+ _listen(target, type, handler, options) {
109
+ if (!target) {
110
+ return;
111
+ }
112
+ target.addEventListener(type, handler, options);
113
+ this._listeners.push({ target, type, handler, options });
114
+ }
115
+ _listenDuringDrag(target, type, handler, options) {
116
+ if (!target) {
117
+ return;
118
+ }
119
+ target.addEventListener(type, handler, options);
120
+ this._dragListeners.push({ target, type, handler, options });
121
+ }
122
+ _clearDragListeners() {
123
+ this._dragListeners.forEach(({ target, type, handler, options }) => {
124
+ target.removeEventListener(type, handler, options);
125
+ });
126
+ this._dragListeners = [];
127
+ this._draggingInput = null;
128
+ this._element.removeAttribute("data-slider-dragging");
129
+ }
130
+ _bindEvents() {
131
+ this._inputs.forEach((input) => {
132
+ this._listen(input, "input", () => this._sync(input));
133
+ this._listen(input, "change", () => {
134
+ this._sync(input);
135
+ this._trigger("change");
136
+ });
137
+ this._listen(input, "keydown", () => this._clearPointerFocus());
138
+ this._listen(input, "focusout", () => this._clearPointerFocus());
139
+ });
140
+ const forms = new Set(
141
+ this._inputs.map((input) => input.form || input.closest?.("form")).filter(Boolean)
142
+ );
143
+ forms.forEach((form) => {
144
+ this._listen(form, "reset", () => {
145
+ this._window.setTimeout(() => this._sync(), 0);
146
+ });
147
+ });
148
+ this._listen(this._track, "pointerdown", (event) => this._handleTrackPointer(event));
149
+ }
150
+ _trigger(name) {
151
+ this._element.dispatchEvent(
152
+ new this._window.CustomEvent(`${name}.moo.slider`, {
153
+ bubbles: true
154
+ })
155
+ );
156
+ }
157
+ _isRange() {
158
+ return this._inputs.length === 2;
159
+ }
160
+ _sync(changedInput = null) {
161
+ if (this._isRange()) {
162
+ const [startInput, endInput] = this._inputs;
163
+ const start = asNumber(startInput.value, inputMinimum(startInput));
164
+ const end = asNumber(endInput.value, inputMaximum(endInput));
165
+ if (start > end) {
166
+ if (changedInput === endInput) {
167
+ endInput.value = startInput.value;
168
+ } else {
169
+ startInput.value = endInput.value;
170
+ }
171
+ }
172
+ this._writeFill(valuePercent(startInput), valuePercent(endInput));
173
+ this._writeOutput(`${displayValue(startInput)} - ${displayValue(endInput)}`);
174
+ this._syncAria(startInput);
175
+ this._syncAria(endInput);
176
+ return;
177
+ }
178
+ const input = this._inputs[0];
179
+ this._writeFill(0, valuePercent(input));
180
+ this._writeOutput(displayValue(input));
181
+ this._syncAria(input);
182
+ }
183
+ _syncAria(input) {
184
+ input.setAttribute("aria-valuemin", String(inputMinimum(input)));
185
+ input.setAttribute("aria-valuemax", String(inputMaximum(input)));
186
+ input.setAttribute("aria-valuenow", displayValue(input));
187
+ }
188
+ _writeFill(start, end) {
189
+ const clampedStart = clamp(start, 0, 100);
190
+ const clampedEnd = clamp(end, 0, 100);
191
+ this._element.style.setProperty("--moo-slider-start", `${Math.min(clampedStart, clampedEnd)}%`);
192
+ this._element.style.setProperty("--moo-slider-end", `${Math.max(clampedStart, clampedEnd)}%`);
193
+ }
194
+ _writeOutput(value) {
195
+ if (this._output) {
196
+ this._output.textContent = value;
197
+ }
198
+ }
199
+ _handleTrackPointer(event) {
200
+ if (event.button !== void 0 && event.button !== 0) {
201
+ return;
202
+ }
203
+ const enabledInputs = this._inputs.filter((input) => !input.disabled);
204
+ if (!enabledInputs.length) {
205
+ return;
206
+ }
207
+ event.preventDefault?.();
208
+ const percent = this._pointerPercent(event);
209
+ const target = this._nearestInput(percent * 100, enabledInputs);
210
+ this._setPointerFocus();
211
+ this._startDrag(target, event);
212
+ this._setInputFromPointer(target, event);
213
+ }
214
+ _setPointerFocus() {
215
+ this._element.setAttribute("data-slider-pointer-focus", "true");
216
+ }
217
+ _clearPointerFocus() {
218
+ this._element.removeAttribute("data-slider-pointer-focus");
219
+ }
220
+ _startDrag(input, event) {
221
+ this._clearDragListeners();
222
+ this._draggingInput = input;
223
+ this._element.setAttribute("data-slider-dragging", "true");
224
+ this._track.setPointerCapture?.(event.pointerId);
225
+ const pointerId = event.pointerId;
226
+ const samePointer = (nextEvent) => pointerId === void 0 || nextEvent.pointerId === pointerId;
227
+ const onMove = (moveEvent) => {
228
+ if (!samePointer(moveEvent) || this._draggingInput !== input) {
229
+ return;
230
+ }
231
+ moveEvent.preventDefault?.();
232
+ this._setInputFromPointer(input, moveEvent);
233
+ };
234
+ const onEnd = (endEvent) => {
235
+ if (!samePointer(endEvent) || this._draggingInput !== input) {
236
+ return;
237
+ }
238
+ endEvent.preventDefault?.();
239
+ this._setInputFromPointer(input, endEvent, false);
240
+ input.dispatchEvent(new this._window.Event("change", { bubbles: true }));
241
+ this._track.releasePointerCapture?.(pointerId);
242
+ this._clearDragListeners();
243
+ };
244
+ this._listenDuringDrag(this._document, "pointermove", onMove);
245
+ this._listenDuringDrag(this._document, "pointerup", onEnd);
246
+ this._listenDuringDrag(this._document, "pointercancel", onEnd);
247
+ }
248
+ _setInputFromPointer(input, event, emitInput = true) {
249
+ const percent = this._pointerPercent(event);
250
+ const min = inputMinimum(input);
251
+ const max = inputMaximum(input);
252
+ input.value = String(snapToStep(min + percent * (max - min), input));
253
+ input.focus({ preventScroll: true });
254
+ this._sync(input);
255
+ if (emitInput) {
256
+ input.dispatchEvent(new this._window.Event("input", { bubbles: true }));
257
+ }
258
+ }
259
+ _pointerPercent(event) {
260
+ const rect = this._track.getBoundingClientRect();
261
+ const orientation = this._element.dataset.sliderOrientation || "horizontal";
262
+ if (orientation === "vertical") {
263
+ return clamp((rect.bottom - event.clientY) / (rect.height || 1), 0, 1);
264
+ }
265
+ return this._horizontalPointerPercent(event, rect);
266
+ }
267
+ _horizontalPointerPercent(event, rect) {
268
+ const direction = this._window.getComputedStyle?.(this._element).direction;
269
+ const offset = direction === "rtl" ? rect.right - event.clientX : event.clientX - rect.left;
270
+ return clamp(offset / (rect.width || 1), 0, 1);
271
+ }
272
+ _nearestInput(percent, inputs) {
273
+ if (inputs.length === 1) {
274
+ return inputs[0];
275
+ }
276
+ const [startInput, endInput] = inputs;
277
+ const startPercent = valuePercent(startInput);
278
+ const endPercent = valuePercent(endInput);
279
+ const startDistance = Math.abs(startPercent - percent);
280
+ const endDistance = Math.abs(endPercent - percent);
281
+ if (startDistance === endDistance) {
282
+ return percent >= startPercent ? endInput : startInput;
283
+ }
284
+ return endDistance < startDistance ? endInput : startInput;
285
+ }
286
+ }
287
+ export {
288
+ MooSlider as default
289
+ };
@@ -0,0 +1,76 @@
1
+ /*!
2
+ * Moo UI state.js v1.0.0-rc.10 (https://wpmoo.org/)
3
+ * Copyright 2026 WPMoo Authors
4
+ * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
+ */
6
+
7
+ (() => {
8
+ const ownerDocument = typeof document === "undefined" ? null : document;
9
+ const owner = ownerDocument?.currentScript?.parentElement;
10
+ if (!owner) return;
11
+ const view = ownerDocument?.defaultView || (typeof window === "undefined" ? null : window);
12
+ if (owner.matches?.('.moo-ui[data-bs-theme="light"], .moo-ui[data-bs-theme="dark"]')) {
13
+ const body = ownerDocument?.body;
14
+ const documentOwner = owner.dataset?.mooDocumentOwner === "true" && owner.parentElement === body && owner === body?.firstElementChild;
15
+ const normalizeDirection = (value) => value === "ltr" || value === "rtl" ? value : null;
16
+ const ownerDirection = normalizeDirection(
17
+ owner.getAttribute?.("dir") || owner.dir
18
+ );
19
+ const documentDirection = normalizeDirection(
20
+ ownerDocument?.documentElement?.getAttribute?.("dir") || ownerDocument?.documentElement?.dir
21
+ );
22
+ owner.__mooStateBaseline = {
23
+ theme: owner.dataset.bsTheme === "dark" ? "dark" : "light",
24
+ direction: documentOwner ? documentDirection || "ltr" : ownerDirection
25
+ };
26
+ const readPreference = (axis, allowed) => {
27
+ const dataKey = axis === "theme" ? "mooThemeKey" : "mooDirectionKey";
28
+ const explicit = owner.dataset?.[dataKey]?.trim();
29
+ const key2 = explicit || (documentOwner ? `moo:${axis}` : null);
30
+ if (!key2) return null;
31
+ try {
32
+ const value = view?.localStorage?.getItem(key2);
33
+ return allowed.includes(value) ? value : null;
34
+ } catch (_) {
35
+ return null;
36
+ }
37
+ };
38
+ const systemPrefersDark = () => {
39
+ try {
40
+ const matchMedia = view?.matchMedia;
41
+ if (typeof matchMedia !== "function") return null;
42
+ return Boolean(
43
+ matchMedia.call(view, "(prefers-color-scheme: dark)")?.matches
44
+ );
45
+ } catch (_) {
46
+ return null;
47
+ }
48
+ };
49
+ try {
50
+ const storedTheme = readPreference("theme", ["light", "dark", "system"]);
51
+ const mediaPrefersDark = storedTheme === "system" ? systemPrefersDark() : null;
52
+ const resolvedTheme = storedTheme === "dark" ? "dark" : storedTheme === "light" ? "light" : storedTheme === "system" && mediaPrefersDark !== null ? mediaPrefersDark ? "dark" : "light" : owner.dataset.bsTheme === "dark" ? "dark" : "light";
53
+ owner.dataset.bsTheme = resolvedTheme;
54
+ const storedDirection = readPreference("direction", ["ltr", "rtl"]);
55
+ if (storedDirection) {
56
+ if (documentOwner) ownerDocument.documentElement.dir = storedDirection;
57
+ else owner.dir = storedDirection;
58
+ }
59
+ } finally {
60
+ owner.dataset.mooState = "ready";
61
+ }
62
+ return;
63
+ }
64
+ if (!owner.matches?.('[data-slot="sidebar-wrapper"][data-sidebar-key]')) return;
65
+ const key = owner.dataset?.sidebarKey;
66
+ if (!key) return;
67
+ try {
68
+ const state = view?.localStorage?.getItem(`moo-sidebar:${key}`);
69
+ if (state === "expanded" || state === "collapsed") {
70
+ owner.dataset.sidebarState = state;
71
+ }
72
+ } catch (_) {
73
+ } finally {
74
+ owner.dataset.sidebarStateReady = "";
75
+ }
76
+ })();
@@ -0,0 +1,24 @@
1
+ {
2
+ "artifacts": [
3
+ {
4
+ "export": "./moo.css",
5
+ "path": "dist/assets/css/moo.css",
6
+ "sha256": "a24b8fc1ac488788f9b0206a8c750023d1d081e7c47a8e08f5e8fdb3633a3d9f"
7
+ },
8
+ {
9
+ "export": "./moo-ui.css",
10
+ "path": "dist/assets/css/moo-ui.css",
11
+ "sha256": "87ad4b43a37f9fc488eafd145c905b7bd2d0e4be00ef482f11427509a0021a99"
12
+ },
13
+ {
14
+ "export": "./state.js",
15
+ "path": "dist/js/state.js",
16
+ "sha256": "b9b26d2e547e93f8a805254d9a8b9273c0dbee3cd4729a8620e8b0906d1a13f2"
17
+ }
18
+ ],
19
+ "package": {
20
+ "name": "@wpmoo/ui",
21
+ "version": "1.0.0-rc.10"
22
+ },
23
+ "schemaVersion": 1
24
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wpmoo/ui",
3
- "version": "0.9.0",
3
+ "version": "1.0.0-rc.10",
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)",
@@ -15,9 +15,13 @@
15
15
  "private": false,
16
16
  "type": "module",
17
17
  "scripts": {
18
- "build": ".venv/bin/python build.py",
19
- "dev": ".venv/bin/python dev.py",
20
- "test": ".venv/bin/python -m unittest discover -s tests -v",
18
+ "build": ".venv/bin/python3 build.py",
19
+ "dev": ".venv/bin/python3 dev.py",
20
+ "test": ".venv/bin/python3 scripts/run-test-tier.py run release",
21
+ "test:quick": ".venv/bin/python3 scripts/run-test-tier.py run quick",
22
+ "test:browser-smoke": ".venv/bin/python3 scripts/run-test-tier.py run browser-smoke",
23
+ "test:browser-full": ".venv/bin/python3 scripts/run-test-tier.py run browser-full",
24
+ "test:release": ".venv/bin/python3 scripts/run-test-tier.py run release",
21
25
  "deploy": "wrangler deploy",
22
26
  "preview": "wrangler dev"
23
27
  },
@@ -27,11 +31,25 @@
27
31
  "./moo-ui.min.css": "./dist/assets/css/moo-ui.min.css",
28
32
  "./moo.css": "./dist/assets/css/moo.css",
29
33
  "./moo.min.css": "./dist/assets/css/moo.min.css",
34
+ "./moo-ui.js": "./dist/js/moo-ui.js",
35
+ "./moo-ui.min.js": "./dist/js/moo-ui.min.js",
30
36
  "./combobox.js": "./dist/js/combobox.js",
31
37
  "./sidebar.js": "./dist/js/sidebar.js",
32
38
  "./context-menu.js": "./dist/js/context-menu.js",
33
39
  "./datatable.js": "./dist/js/datatable.js",
34
- "./scss/facade-settings": "./scss/_facade-settings.scss",
40
+ "./slider.js": "./dist/js/slider.js",
41
+ "./sheet.js": "./dist/js/sheet.js",
42
+ "./chart.js": "./dist/js/chart.js",
43
+ "./chart.min.js": "./dist/js/chart.min.js",
44
+ "./datepicker.js": "./dist/js/datepicker.js",
45
+ "./datepicker.min.js": "./dist/js/datepicker.min.js",
46
+ "./state.js": "./dist/js/state.js",
47
+ "./release-manifest.json": "./dist/release-manifest.json",
48
+ "./scss/config": "./scss/_config.scss",
49
+ "./scss/moo-ui": "./scss/moo-ui.scss",
50
+ "./scss/moo-core": "./scss/moo-core.scss",
51
+ "./scss/components": "./scss/_components.scss",
52
+ "./scss/settings": "./scss/_settings.scss",
35
53
  "./certification.json": "./certification.json",
36
54
  "./package.json": "./package.json"
37
55
  },
@@ -40,12 +58,22 @@
40
58
  "dist/assets/css/moo-ui.min.css",
41
59
  "dist/assets/css/moo.css",
42
60
  "dist/assets/css/moo.min.css",
61
+ "dist/js/moo-ui.js",
62
+ "dist/js/moo-ui.min.js",
43
63
  "dist/js/combobox.js",
44
64
  "dist/js/sidebar.js",
45
65
  "dist/js/context-menu.js",
46
66
  "dist/js/datatable.js",
47
- "scss/_facade-settings.scss",
48
- "scss/settings/_facade_public.scss",
67
+ "dist/js/slider.js",
68
+ "dist/js/sheet.js",
69
+ "dist/js/chart.js",
70
+ "dist/js/chart.min.js",
71
+ "dist/js/datepicker.js",
72
+ "dist/js/datepicker.min.js",
73
+ "dist/js/state.js",
74
+ "dist/release-manifest.json",
75
+ "scss/*.scss",
76
+ "scss/**/*.scss",
49
77
  "certification.json",
50
78
  "README.md",
51
79
  "LICENSE",
@@ -74,7 +102,9 @@
74
102
  "access": "public"
75
103
  },
76
104
  "devDependencies": {
77
- "axe-core": "4.12.1",
78
- "wrangler": "^4.112.0"
105
+ "axe-core": "4.13.0",
106
+ "chart.js": "4.5.1",
107
+ "esbuild": "0.28.2",
108
+ "wrangler": "^4.120.0"
79
109
  }
80
110
  }
@@ -0,0 +1,70 @@
1
+ /* Bootstrap Components */
2
+ @import "bootstrap/scss/tables";
3
+ @import "bootstrap/scss/forms/labels";
4
+ @import "bootstrap/scss/forms/form-text";
5
+ @import "bootstrap/scss/forms/form-control";
6
+ @import "bootstrap/scss/forms/form-select";
7
+ @import "bootstrap/scss/forms/form-check";
8
+ @import "bootstrap/scss/forms/input-group";
9
+ @import "bootstrap/scss/forms/validation";
10
+ @import "bootstrap/scss/buttons";
11
+ @import "bootstrap/scss/dropdown";
12
+ @import "bootstrap/scss/button-group";
13
+ @import "bootstrap/scss/nav";
14
+ @import "bootstrap/scss/card";
15
+ @import "bootstrap/scss/accordion";
16
+ @import "bootstrap/scss/breadcrumb";
17
+ @import "bootstrap/scss/pagination";
18
+ @import "bootstrap/scss/badge";
19
+ @import "bootstrap/scss/alert";
20
+ @import "bootstrap/scss/close";
21
+ @import "bootstrap/scss/toasts";
22
+ @import "bootstrap/scss/modal";
23
+ @import "bootstrap/scss/tooltip";
24
+ @import "bootstrap/scss/popover";
25
+ @import "bootstrap/scss/offcanvas";
26
+ @import "bootstrap/scss/helpers/color-bg";
27
+
28
+ /* Moo Components */
29
+ @import "components/kbd";
30
+ @import "components/input";
31
+ @import "components/textarea";
32
+ @import "components/select";
33
+ @import "components/input_group";
34
+ @import "components/button";
35
+ @import "components/search_trigger";
36
+ @import "components/close_button";
37
+ @import "components/button_group";
38
+ @import "components/toggle_group";
39
+ @import "components/card";
40
+ @import "components/table";
41
+ @import "components/dropdown";
42
+ @import "components/menubar";
43
+ @import "components/avatar";
44
+ @import "components/navigation";
45
+ @import "components/skeleton";
46
+ @import "components/sidebar";
47
+ @import "components/alert";
48
+ @import "components/breadcrumb";
49
+ @import "components/pagination";
50
+ @import "components/badge";
51
+ @import "components/progress";
52
+ @import "components/slider";
53
+ @import "components/separator";
54
+ @import "components/checkbox";
55
+ @import "components/radio_group";
56
+ @import "components/switch";
57
+ @import "components/spinner";
58
+ @import "components/accordion";
59
+ @import "components/tabs";
60
+ @import "components/collapsible";
61
+ @import "components/tooltip";
62
+ @import "components/popover";
63
+ @import "components/dialog";
64
+ @import "components/sheet";
65
+ @import "components/toast";
66
+ @import "components/field";
67
+ @import "components/datepicker";
68
+ @import "components/combobox";
69
+ @import "components/context-menu";
70
+ @import "components/datatable";
@@ -0,0 +1,18 @@
1
+
2
+ $primary: #171717 !default;
3
+ $secondary: #f4f4f5 !default;
4
+ $success: #047857 !default;
5
+ $info: #0369a1 !default;
6
+ $warning: #b45309 !default;
7
+ $danger: #e7000b !default;
8
+ $light: #fafafa !default;
9
+ $dark: #18181b !default;
10
+
11
+ $body-color: #18181b !default;
12
+ $body-bg: #fff !default;
13
+ $font-size-base: 0.875rem !default;
14
+
15
+ $border-color: #e4e4e7 !default;
16
+ $border-radius: 0.5rem !default;
17
+ $border-radius-sm: 0.375rem !default;
18
+ $border-radius-lg: 0.625rem !default;
@@ -0,0 +1,5 @@
1
+ @import "config";
2
+ @import "settings/palette";
3
+ @import "settings/forms";
4
+ @import "settings/component_variables";
5
+ @import "settings/bootstrap_overrides";
@@ -0,0 +1,54 @@
1
+ /* Accordion */
2
+ .accordion-button::after {
3
+ content: none;
4
+ }
5
+
6
+ .accordion-button [data-icon] {
7
+ position: absolute;
8
+ inset-inline-end: var(--bs-accordion-btn-padding-x);
9
+ top: 50%;
10
+ width: 1rem;
11
+ height: 1rem;
12
+ flex-shrink: 0;
13
+ pointer-events: none;
14
+ transform: translateY(-50%);
15
+ transition: $accordion-icon-transition;
16
+ transform-origin: center;
17
+ }
18
+
19
+ .accordion-button:not(.collapsed) [data-icon] {
20
+ transform: translateY(-50%) $accordion-icon-transform;
21
+ }
22
+
23
+ .accordion-flush .accordion-button {
24
+ text-align: start;
25
+ }
26
+
27
+ .accordion-button:hover {
28
+ text-decoration: underline;
29
+ }
30
+
31
+ .accordion-button:disabled {
32
+ color: var(--moo-disabled-foreground);
33
+ opacity: var(--moo-disabled-control-opacity);
34
+ pointer-events: none;
35
+ }
36
+
37
+ .accordion-button:disabled:hover {
38
+ text-decoration: none;
39
+ }
40
+
41
+ .accordion-flush {
42
+ --bs-accordion-btn-padding-x: 0;
43
+ --bs-accordion-btn-padding-y: #{$spacer * 0.625};
44
+ --bs-accordion-body-padding-x: 0;
45
+ --bs-accordion-body-padding-y: #{$spacer * 0.625};
46
+ }
47
+
48
+ .accordion-flush .accordion-button {
49
+ font-weight: $font-weight-medium;
50
+ }
51
+
52
+ .card .accordion {
53
+ --bs-accordion-bg: #{$moo-accordion-contained-bg};
54
+ }