@wpmoo/ui 1.0.0-rc.9 → 1.0.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 (93) hide show
  1. package/ASSET_LICENSE.md +1 -1
  2. package/LICENSE +28 -0
  3. package/README.md +31 -3
  4. package/certification.json +2 -1
  5. package/dist/assets/css/moo-ui.css +381 -22
  6. package/dist/assets/css/moo-ui.min.css +10 -31
  7. package/dist/assets/css/moo.css +373 -21
  8. package/dist/assets/css/moo.min.css +10 -32
  9. package/dist/js/chart.js +23 -21
  10. package/dist/js/chart.min.js +5 -5
  11. package/dist/js/combobox.js +18 -65
  12. package/dist/js/context-menu.js +16 -68
  13. package/dist/js/datatable.js +38 -21
  14. package/dist/js/datepicker.js +3 -2
  15. package/dist/js/datepicker.min.js +4 -3
  16. package/dist/js/moo-ui.js +158 -15400
  17. package/dist/js/moo-ui.min.js +3 -23
  18. package/dist/js/sheet.js +46 -0
  19. package/dist/js/sidebar.js +3 -2
  20. package/dist/js/slider.js +12 -47
  21. package/dist/js/state.js +15 -41
  22. package/dist/release-manifest.json +4 -4
  23. package/package.json +3 -1
  24. package/scss/_components.scss +2 -2
  25. package/scss/_config.scss +15 -21
  26. package/scss/_settings.scss +0 -3
  27. package/scss/components/_accordion.scss +1 -12
  28. package/scss/components/_alert.scss +1 -12
  29. package/scss/components/_avatar.scss +1 -16
  30. package/scss/components/_badge.scss +1 -0
  31. package/scss/components/_breadcrumb.scss +1 -12
  32. package/scss/components/_button.scss +1 -29
  33. package/scss/components/_button_group.scss +1 -25
  34. package/scss/components/_card.scss +1 -29
  35. package/scss/components/_checkbox.scss +1 -38
  36. package/scss/components/_close_button.scss +1 -9
  37. package/scss/components/_collapsible.scss +1 -0
  38. package/scss/components/_combobox.scss +1 -6
  39. package/scss/components/_context-menu.scss +1 -11
  40. package/scss/components/_datatable.scss +46 -85
  41. package/scss/components/_datepicker.scss +1 -0
  42. package/scss/components/_dialog.scss +1 -14
  43. package/scss/components/_dropdown.scss +5 -51
  44. package/scss/components/_field.scss +1 -40
  45. package/scss/components/_input.scss +1 -5
  46. package/scss/components/_input_group.scss +1 -51
  47. package/scss/components/_kbd.scss +1 -0
  48. package/scss/components/_menubar.scss +1 -0
  49. package/scss/components/_navigation.scss +76 -6
  50. package/scss/components/_pagination.scss +1 -13
  51. package/scss/components/_popover.scss +1 -22
  52. package/scss/components/_progress.scss +1 -3
  53. package/scss/components/_radio_group.scss +105 -6
  54. package/scss/components/_search_trigger.scss +1 -2
  55. package/scss/components/_select.scss +1 -0
  56. package/scss/components/_separator.scss +1 -6
  57. package/scss/components/_sheet.scss +1 -17
  58. package/scss/components/_sidebar.scss +1 -2
  59. package/scss/components/_skeleton.scss +1 -8
  60. package/scss/components/_slider.scss +1 -2
  61. package/scss/components/_spinner.scss +1 -7
  62. package/scss/components/_switch.scss +1 -4
  63. package/scss/components/_table.scss +1 -2
  64. package/scss/components/_tabs.scss +1 -24
  65. package/scss/components/_textarea.scss +1 -0
  66. package/scss/components/_toast.scss +1 -4
  67. package/scss/components/_toggle_group.scss +1 -3
  68. package/scss/components/_tooltip.scss +1 -20
  69. package/scss/components/sidebar/_base.scss +0 -7
  70. package/scss/components/sidebar/_collapsed.scss +0 -6
  71. package/scss/components/sidebar/_identity.scss +0 -1
  72. package/scss/components/sidebar/_menus.scss +0 -17
  73. package/scss/foundations/_backdrop.scss +0 -26
  74. package/scss/foundations/_focus.scss +0 -56
  75. package/scss/foundations/_scope.scss +14 -0
  76. package/scss/layouts/_app.scss +0 -6
  77. package/scss/layouts/_page_grid.scss +0 -3
  78. package/scss/layouts/app/sidebar/_base.scss +0 -33
  79. package/scss/layouts/app/sidebar/_default.scss +0 -6
  80. package/scss/layouts/app/sidebar/_floating.scss +0 -11
  81. package/scss/layouts/app/sidebar/_inset.scss +0 -2
  82. package/scss/mixins/_banner.scss +9 -3
  83. package/scss/moo-core.scss +3 -6
  84. package/scss/moo-ui.scss +9 -5
  85. package/scss/settings/_bootstrap_overrides.scss +0 -8
  86. package/scss/settings/_component_variables.scss +4 -266
  87. package/scss/settings/_forms.scss +0 -37
  88. package/scss/settings/_palette.scss +0 -42
  89. package/scss/themes/_root.scss +3 -0
  90. package/scss/themes/_standalone.scss +0 -2
  91. package/scss/themes/_theme.scss +3 -2
  92. package/scss/utilities/_background_color.scss +18 -0
  93. package/scss/utilities/_border.scss +4 -0
@@ -1,13 +1,27 @@
1
1
  @scope (.moo-ui) to (:where(.moo-ui[data-bs-theme="light"], .moo-ui[data-bs-theme="dark"])) {
2
2
  @import "../components";
3
+ /* Focus and keyboard navigation */
3
4
  @import "../foundations/focus";
5
+ /* Utilities */
6
+ @import "../utilities/border";
4
7
  @import "../utilities/scroll_fade";
8
+ /* Application layout */
5
9
  @import "../layouts/app";
6
10
  @import "../layouts/page_grid";
11
+ /* Form themes */
7
12
  @import "../themes/forms";
13
+ /* Overlay backdrops */
8
14
  @include moo-overlay-backdrop-scoped;
15
+ /* Typography */
9
16
  :where(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
10
17
  .display-1, .display-2, .display-3, .display-4, .display-5, .display-6) {
11
18
  font-family: var(--moo-heading-font-family, var(--bs-body-font-family));
12
19
  }
20
+ :is(small, .small) {
21
+ font-size: var(--moo-small-font-size);
22
+ }
23
+ p {
24
+ margin-top: var(--moo-paragraph-margin-top);
25
+ margin-bottom: var(--moo-paragraph-margin-bottom);
26
+ }
13
27
  }
@@ -1,5 +1,3 @@
1
- // Application layout owns the shell and page geometry.
2
- // It is intentionally separate from component surfaces such as Sidebar.
3
1
 
4
2
  @import "app/sidebar/base";
5
3
  @import "app/sidebar/default";
@@ -36,10 +34,6 @@
36
34
  flex: 0 0 auto;
37
35
  }
38
36
 
39
- // The page main region owns the space between the optional header and footer.
40
- // Keep the Bootstrap rail as the flex column too, so app previews and real
41
- // shells can give their caller content a full-height surface without adding
42
- // layout-specific height values.
43
37
  .wrapper[data-layout="app"] > [data-slot="page"] > main {
44
38
  display: flex;
45
39
  min-height: 0;
@@ -1,10 +1,7 @@
1
- // Opt-in Bootstrap row geometry keyed to the usable Moo Page rail, not the
2
- // viewport or the optional Sidebar state. The rail itself is the query owner.
3
1
  [data-page-container] {
4
2
  container: moo-page / inline-size;
5
3
  }
6
4
 
7
- // Keep the compact branch usable in browsers without container queries.
8
5
  [data-page-container] [data-page-show-from] {
9
6
  display: none !important;
10
7
  }
@@ -1,5 +1,3 @@
1
- // Shared App-owned Sidebar shell geometry. Sidebar's component partials own
2
- // only the inner surface and navigation anatomy.
3
1
 
4
2
  .sidebar {
5
3
  --moo-sidebar-width: #{$moo-sidebar-width};
@@ -10,7 +8,6 @@
10
8
  color: var(--moo-sidebar-foreground);
11
9
  }
12
10
 
13
- // Rail: a thin toggle strip straddling the Sidebar's inline-end edge.
14
11
  .sidebar-rail {
15
12
  position: absolute;
16
13
  inset-block: 0;
@@ -24,8 +21,6 @@
24
21
  cursor: pointer;
25
22
  }
26
23
 
27
- // Read the Sidebar's computed direction so this remains valid inside the
28
- // resolved-owner @scope as well as under a full-document html[dir] owner.
29
24
  .sidebar:dir(rtl) .sidebar-rail {
30
25
  transform: translateX(-50%);
31
26
  }
@@ -50,17 +45,11 @@
50
45
  max-height: 100%;
51
46
  }
52
47
 
53
- // The outer shell owns stacking, collapse width, and the contained-shell
54
- // geometry. Inner collapsed content remains in components/sidebar/_collapsed.
55
48
  @include media-breakpoint-up(lg) {
56
49
  .sidebar {
57
50
  position: relative;
58
51
  }
59
52
 
60
- // `offcanvas` is a collapsible mode, not a visual Sidebar variant. On
61
- // desktop the App keeps the shell in normal flow and uses the shared App
62
- // state attribute to collapse the column; below lg Bootstrap's native
63
- // Offcanvas plugin continues to own the drawer transition.
64
53
  .sidebar.offcanvas-lg[data-collapsible="offcanvas"] {
65
54
  visibility: visible;
66
55
  transform: none;
@@ -75,16 +64,9 @@
75
64
 
76
65
  .wrapper[data-layout="app"]:has([data-sidebar-dropdown-positioned] > .dropdown-menu.show) > .sidebar {
77
66
  position: relative;
78
- // Catalog page headers are sticky at $zindex-fixed. The Sidebar root must
79
- // sit above that page-level stacking context while an identity menu is
80
- // open, otherwise the workspace menu is painted underneath the header
81
- // even though the menu itself is fixed and has dropdown z-index.
82
67
  z-index: $zindex-fixed + 1;
83
68
  }
84
69
 
85
- // The sticky inner surface is its own stacking context. Elevate that
86
- // context while an identity menu is open so the rail's hover indicator
87
- // remains behind the fixed dropdown instead of painting across it.
88
70
  .wrapper[data-layout="app"]:has([data-sidebar-dropdown-positioned] > .dropdown-menu.show) > .sidebar > .sidebar-inner {
89
71
  z-index: $zindex-fixed + 1;
90
72
  }
@@ -99,19 +81,4 @@
99
81
  .sidebar-rail {
100
82
  display: none;
101
83
  }
102
-
103
- .wrapper[data-layout="app"][data-shell-mode="contained"] .sidebar {
104
- position: relative;
105
- inset: auto;
106
- flex: 0 0 auto;
107
- width: 100%;
108
- height: auto;
109
- visibility: visible;
110
- transform: none;
111
- }
112
-
113
- .wrapper[data-layout="app"][data-shell-mode="contained"] .sidebar-inner {
114
- height: auto;
115
- max-height: none;
116
- }
117
84
  }
@@ -1,8 +1,5 @@
1
- // Attached Sidebar variants keep a divider at the shell edge; Inset does not.
2
1
 
3
2
  .sidebar[data-side="left"]:not([data-variant="inset"]) .sidebar-inner {
4
- // `side` is a physical placement contract. Keep the divider on the
5
- // Sidebar/Page boundary when the document direction is RTL as well.
6
3
  border-right: var(--bs-border-width) solid var(--moo-sidebar-border);
7
4
  }
8
5
 
@@ -10,9 +7,6 @@
10
7
  order: 1;
11
8
  }
12
9
 
13
- // `side` is a physical placement contract. `:dir()` reads the wrapper's
14
- // computed direction inside the owner scope, whether it comes from html for a
15
- // document owner or from an embedded owner's own dir attribute.
16
10
  .wrapper[data-layout="app"]:dir(rtl) > .sidebar[data-side="left"] {
17
11
  order: 1;
18
12
  }
@@ -1,10 +1,5 @@
1
- // Floating App Sidebar variant: the shell detaches the inner surface from
2
- // the viewport edge with a margin, border, radius, and shadow.
3
1
 
4
2
  @include media-breakpoint-up(lg) {
5
- // Enable shell motion only after Sidebar has restored its initial state.
6
- // Hosts that hydrate after first paint must not animate the correction from
7
- // their server/default state to the persisted state.
8
3
  :where(.wrapper[data-layout="app"][data-sidebar-ready]) > .sidebar {
9
4
  transition: flex-basis 0.2s ease, width 0.2s ease;
10
5
  }
@@ -24,12 +19,6 @@
24
19
  max-height: calc(100% - #{$spacer});
25
20
  }
26
21
 
27
- // At icon-rail width the detached card reads as floating mostly through
28
- // elevation and breathing room, since the margin/border alone are hard to
29
- // read at the base icon width; step up to Bootstrap's base shadow scale
30
- // (still a shared token, no new value) and widen the column by the same
31
- // margin the card's sides consume, so the icon rail itself keeps its full
32
- // width instead of shrinking.
33
22
  .wrapper[data-layout="app"][data-sidebar-state="collapsed"] .sidebar[data-variant="floating"][data-collapsible="icon"] {
34
23
  flex-basis: calc(var(--moo-sidebar-width-icon) + #{$spacer});
35
24
  width: calc(var(--moo-sidebar-width-icon) + #{$spacer});
@@ -1,5 +1,3 @@
1
- // Inset App variant: the App shell owns the background and makes the Page a
2
- // sibling inset surface. Sidebar keeps only its inner navigation anatomy.
3
1
 
4
2
  @include media-breakpoint-up(lg) {
5
3
  .wrapper[data-layout="app"]:has(> .sidebar[data-variant="inset"]) {
@@ -1,3 +1,9 @@
1
- @import "bootstrap/scss/mixins/banner";
2
-
3
- @include bsBanner("");
1
+ /*!
2
+ * Moo UI v1.0.0 (https://wpmoo.org/)
3
+ * Copyright 2026 WPMoo Authors
4
+ * Licensed under MIT (https://github.com/wpmoo-org/ui/blob/main/LICENSE)
5
+ *
6
+ * Bootstrap v5.3.3 (https://getbootstrap.com/)
7
+ * Copyright 2011-2024 The Bootstrap Authors
8
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
9
+ */
@@ -1,9 +1,4 @@
1
- /*!
2
- * Moo UI core
3
- * Copyright (c) 2026 WPMoo (wpmoo.org)
4
- * Includes Bootstrap 5.3.3 component output
5
- * SPDX-License-Identifier: MIT
6
- */
1
+ @import "mixins/banner";
7
2
  @import "settings/options";
8
3
  @import "bootstrap/scss/functions";
9
4
  @import "settings";
@@ -13,7 +8,9 @@
13
8
  @import "bootstrap/scss/mixins";
14
9
  @import "bootstrap/scss/utilities";
15
10
  @import "themes/theme";
11
+ /* Global styles */
16
12
  @import "foundations/globals";
17
13
  @import "foundations/backdrop";
14
+ /* Theme tokens */
18
15
  @import "themes/root";
19
16
  @import "foundations/scope";
package/scss/moo-ui.scss CHANGED
@@ -1,7 +1,7 @@
1
- @import "settings";
2
1
  @import "mixins/banner";
2
+ @import "settings";
3
3
 
4
- // Bootstrap configuration
4
+ /* Bootstrap configuration */
5
5
  @import "bootstrap/scss/functions";
6
6
  @import "bootstrap/scss/variables";
7
7
  @import "bootstrap/scss/variables-dark";
@@ -10,13 +10,16 @@
10
10
  @import "bootstrap/scss/utilities";
11
11
  @import "themes/theme";
12
12
 
13
- // Bootstrap layout and standalone-only components
13
+ /* Bootstrap layout and standalone-only components */
14
14
  @import "bootstrap/scss/root";
15
+ /* Theme tokens */
15
16
  @import "themes/root";
16
17
  @import "themes/standalone";
18
+ /* Base styles and typography */
17
19
  @import "bootstrap/scss/reboot";
18
20
  @import "bootstrap/scss/type";
19
21
  @import "bootstrap/scss/images";
22
+ /* Containers and grid */
20
23
  @import "bootstrap/scss/containers";
21
24
  @import "bootstrap/scss/grid";
22
25
  @import "bootstrap/scss/forms/form-range";
@@ -29,7 +32,7 @@
29
32
  @import "bootstrap/scss/spinners";
30
33
  @import "bootstrap/scss/placeholders";
31
34
 
32
- // Bootstrap helpers
35
+ /* Bootstrap helpers */
33
36
  @import "bootstrap/scss/helpers/clearfix";
34
37
  @import "bootstrap/scss/helpers/colored-links";
35
38
  @import "bootstrap/scss/helpers/focus-ring";
@@ -42,7 +45,8 @@
42
45
  @import "bootstrap/scss/helpers/text-truncation";
43
46
  @import "bootstrap/scss/helpers/vr";
44
47
 
45
- // Bootstrap utilities
48
+ /* Bootstrap utilities */
49
+ @import "utilities/background_color";
46
50
  @import "bootstrap/scss/utilities/api";
47
51
 
48
52
  @import "utilities/scroll_fade_primitives";
@@ -1,15 +1,7 @@
1
- // Moo buttons use a subtle transform for the pressed state, so Bootstrap's
2
- // native inset shadow press effect is disabled at the source.
3
1
  $btn-box-shadow: none !default;
4
2
  $btn-focus-box-shadow: none !default;
5
3
  $btn-active-box-shadow: none !default;
6
4
 
7
- // Keep Bootstrap's CSS Grid utility layer available alongside the Flexbox
8
- // grid so native .grid and .g-col-* markup works in Moo UI hosts.
9
5
  $enable-cssgrid: true !default;
10
6
 
11
- // Bootstrap validation icons are background images injected by the native
12
- // validation mixin. Reference-style invalid fields use border/ring + error text
13
- // without a trailing status glyph, so disable the Bootstrap icon branch at the
14
- // source while keeping .is-invalid/.invalid-feedback behavior.
15
7
  $enable-validation-icons: false !default;