@wpmoo/ui 1.0.0-rc.6 → 1.0.0-rc.7

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 (46) hide show
  1. package/ASSET_LICENSE.md +1 -1
  2. package/README.md +4 -4
  3. package/certification.json +1 -1
  4. package/dist/assets/css/moo-ui.css +7742 -8126
  5. package/dist/assets/css/moo-ui.min.css +2 -2
  6. package/dist/assets/css/moo.css +242 -290
  7. package/dist/assets/css/moo.min.css +2 -2
  8. package/dist/js/chart.js +57 -5
  9. package/dist/js/chart.min.js +3 -3
  10. package/dist/js/combobox.js +1 -1
  11. package/dist/js/context-menu.js +1 -1
  12. package/dist/js/datatable.js +114 -213
  13. package/dist/js/datepicker.js +79 -37
  14. package/dist/js/datepicker.min.js +2 -2
  15. package/dist/js/moo-ui.js +168 -51
  16. package/dist/js/moo-ui.min.js +3 -3
  17. package/dist/js/sidebar.js +121 -174
  18. package/dist/js/slider.js +1 -1
  19. package/package.json +8 -8
  20. package/scss/components/_alert.scss +1 -2
  21. package/scss/components/_card.scss +5 -5
  22. package/scss/components/_close_button.scss +8 -3
  23. package/scss/components/_dialog.scss +16 -0
  24. package/scss/components/_dropdown.scss +2 -7
  25. package/scss/components/_switch.scss +13 -5
  26. package/scss/components/_tabs.scss +1 -1
  27. package/scss/components/sidebar/_collapsed.scss +20 -23
  28. package/scss/components/sidebar/_inset.scss +14 -44
  29. package/scss/components/sidebar/_layout.scss +86 -11
  30. package/scss/foundations/_backdrop.scss +128 -0
  31. package/scss/foundations/_scope.scss +5 -0
  32. package/scss/mixins/_banner.scss +3 -0
  33. package/scss/moo-core.scss +6 -34
  34. package/scss/moo-ui.scss +6 -6
  35. package/scss/settings/_bootstrap_overrides.scss +4 -0
  36. package/scss/settings/_component_variables.scss +6 -1
  37. package/scss/settings/_options.scss +2 -0
  38. package/scss/settings/_palette.scss +1 -1
  39. package/scss/themes/_forms.scss +15 -0
  40. package/scss/themes/_root.scss +16 -0
  41. package/scss/themes/_standalone.scss +5 -0
  42. package/scss/themes/{_scoped_core.scss → _theme.scss} +1 -0
  43. package/scss/foundations/_core_state_layer.scss +0 -25
  44. package/scss/foundations/_overlay_backdrop.scss +0 -19
  45. package/scss/themes/_standalone_root.scss +0 -119
  46. /package/scss/foundations/{_core_global_primitives.scss → _globals.scss} +0 -0
@@ -4,6 +4,10 @@ $btn-box-shadow: none !default;
4
4
  $btn-focus-box-shadow: none !default;
5
5
  $btn-active-box-shadow: none !default;
6
6
 
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
+ $enable-cssgrid: true !default;
10
+
7
11
  // Bootstrap validation icons are background images injected by the native
8
12
  // validation mixin. Reference-style invalid fields use border/ring + error text
9
13
  // without a trailing status glyph, so disable the Bootstrap icon branch at the
@@ -305,9 +305,14 @@ $moo-form-focus-ring-color: var(--moo-ring) !default;
305
305
  // backdrops. Bootstrap exposes separate .modal-backdrop and
306
306
  // .offcanvas-backdrop selectors; Moo keeps their visual treatment aligned via
307
307
  // one token set instead of per-component backdrop rules.
308
+ // Bootstrap defaults both native panels to .3s; retain that default while
309
+ // exposing one runtime duration token for the panel and its backdrop.
310
+ $moo-overlay-motion-duration: .3s !default;
311
+ $modal-transition: transform var(--moo-overlay-motion-duration, #{$moo-overlay-motion-duration}) ease-out !default;
312
+ $offcanvas-transition-duration: var(--moo-overlay-motion-duration, #{$moo-overlay-motion-duration}) !default;
308
313
  $moo-overlay-backdrop-opacity: 1 !default;
309
314
  $moo-overlay-backdrop-bg: color-mix(in srgb, #0a0a0a 10%, transparent) !default;
310
- $moo-overlay-backdrop-filter: blur(8px) !default;
315
+ $moo-overlay-backdrop-filter: blur(6px) !default;
311
316
 
312
317
  // A quieter elevation scale and the extra radius step, applied UI-wide through
313
318
  // Bootstrap's own scales so every component consumes one shared primitive.
@@ -0,0 +1,2 @@
1
+ $enable-dark-mode: false;
2
+ $moo-spinner-animation-name: moo-spinner-rotate;
@@ -112,7 +112,7 @@ $moo-sidebar-dark: #1c1c1f !default;
112
112
  $moo-input-bg-dark: color-mix(in srgb, $moo-muted-surface-dark 50%, $moo-surface-dark) !default;
113
113
 
114
114
  // Bootstrap root variables consumed by the scoped core build. Define them
115
- // here so themes/_scoped_core.scss can emit Bootstrap's root contract without
115
+ // here so themes/_theme.scss can emit Bootstrap's root contract without
116
116
  // hardcoded consumer-side literals.
117
117
  $body-tertiary-color: #a1a1aa !default;
118
118
  $body-tertiary-bg: $light !default;
@@ -0,0 +1,15 @@
1
+ :scope[data-bs-theme="light"] .form-select {
2
+ --#{$prefix}form-select-bg-img: #{escape-svg($form-select-indicator)};
3
+ }
4
+
5
+ :scope[data-bs-theme="dark"] .form-select {
6
+ --#{$prefix}form-select-bg-img: #{escape-svg($form-select-indicator-dark)};
7
+ }
8
+
9
+ :scope[data-bs-theme="light"] .form-switch .form-check-input:not(:checked):not(:focus) {
10
+ --#{$prefix}form-switch-bg: #{escape-svg($form-switch-bg-image)};
11
+ }
12
+
13
+ :scope[data-bs-theme="dark"] .form-switch .form-check-input:not(:checked):not(:focus) {
14
+ --#{$prefix}form-switch-bg: #{escape-svg($form-switch-bg-image-dark)};
15
+ }
@@ -0,0 +1,16 @@
1
+ .moo-ui[data-bs-theme] {
2
+ @include moo-core-scales;
3
+ @include moo-core-shared;
4
+ }
5
+
6
+ .moo-ui[data-bs-theme="light"] {
7
+ @include moo-core-light;
8
+ }
9
+
10
+ .moo-ui[data-bs-theme="dark"] {
11
+ @include moo-core-dark;
12
+ }
13
+
14
+ .moo-ui[data-bs-theme][dir="rtl"] {
15
+ direction: rtl;
16
+ }
@@ -0,0 +1,5 @@
1
+ // A complete document places its resolved owner directly inside body. The
2
+ // owner, rather than body, supplies the viewport-sized foreground surface.
3
+ body > .moo-ui[data-bs-theme] {
4
+ min-block-size: 100dvh;
5
+ }
@@ -77,6 +77,7 @@ $moo-theme-colors-border-subtle-dark: (
77
77
  }
78
78
 
79
79
  @mixin moo-core-shared {
80
+ --moo-overlay-motion-duration: #{$moo-overlay-motion-duration};
80
81
  --moo-overlay-backdrop-opacity: #{$moo-overlay-backdrop-opacity};
81
82
  --moo-overlay-backdrop-bg: #{$moo-overlay-backdrop-bg};
82
83
  --moo-overlay-backdrop-filter: #{$moo-overlay-backdrop-filter};
@@ -1,25 +0,0 @@
1
- :where(html, body)[data-bs-theme="dark"] .moo-ui:not([data-bs-theme]) .form-select,
2
- .moo-ui[data-bs-theme="dark"] .form-select {
3
- --#{$prefix}form-select-bg-img: #{escape-svg($form-select-indicator-dark)};
4
- }
5
-
6
- :where(html, body)[data-bs-theme="dark"] .moo-ui:not([data-bs-theme]) .form-switch .form-check-input:not(:checked):not(:focus),
7
- .moo-ui[data-bs-theme="dark"] .form-switch .form-check-input:not(:checked):not(:focus) {
8
- --#{$prefix}form-switch-bg: #{escape-svg($form-switch-bg-image-dark)};
9
- }
10
-
11
- :where(html, body)[data-bs-theme="dark"] .moo-ui:not([data-bs-theme]) .form-switch .form-check-input:checked,
12
- .moo-ui[data-bs-theme="dark"] .form-switch .form-check-input:checked {
13
- --#{$prefix}form-switch-bg: #{escape-svg($moo-switch-checked-bg-image-dark)};
14
-
15
- background-color: var(--moo-primary);
16
- border-color: var(--moo-primary);
17
- filter: none;
18
- }
19
-
20
- :where(html, body)[data-bs-theme="dark"] .moo-ui:not([data-bs-theme]) .form-switch .form-check-input:focus:active:not(:checked),
21
- :where(html, body)[data-bs-theme="dark"] .moo-ui:not([data-bs-theme]) .form-switch .form-check-input:focus:not(:focus-visible):not(:checked),
22
- .moo-ui[data-bs-theme="dark"] .form-switch .form-check-input:focus:active:not(:checked),
23
- .moo-ui[data-bs-theme="dark"] .form-switch .form-check-input:focus:not(:focus-visible):not(:checked) {
24
- --#{$prefix}form-switch-bg: #{escape-svg($form-switch-bg-image-dark)};
25
- }
@@ -1,19 +0,0 @@
1
- // Bootstrap owns the overlay lifecycle for Dialog / Alert Dialog (Modal) and
2
- // Sheet (Offcanvas). Moo only retunes the native backdrop appearance through a
3
- // shared token primitive, so every opening surface gets the same treatment
4
- // without component-specific backdrop selectors.
5
- .modal-backdrop,
6
- .offcanvas-backdrop {
7
- --#{$prefix}backdrop-opacity: var(--moo-overlay-backdrop-opacity, #{$moo-overlay-backdrop-opacity});
8
- background-color: var(--moo-overlay-backdrop-bg, #{$moo-overlay-backdrop-bg});
9
- -webkit-backdrop-filter: var(--moo-overlay-backdrop-filter, #{$moo-overlay-backdrop-filter});
10
- backdrop-filter: var(--moo-overlay-backdrop-filter, #{$moo-overlay-backdrop-filter});
11
- }
12
-
13
- .modal-backdrop.show,
14
- .offcanvas-backdrop.show {
15
- // Bootstrap Modal routes opacity through --bs-backdrop-opacity, but
16
- // Offcanvas 5.3 compiles the same state to a literal .5. Restate the shared
17
- // token on both native show selectors so Dialog and Sheet dim equally.
18
- opacity: var(--moo-overlay-backdrop-opacity, #{$moo-overlay-backdrop-opacity});
19
- }
@@ -1,119 +0,0 @@
1
- :root {
2
- --moo-overlay-backdrop-opacity: #{$moo-overlay-backdrop-opacity};
3
- --moo-overlay-backdrop-bg: #{$moo-overlay-backdrop-bg};
4
- --moo-overlay-backdrop-filter: #{$moo-overlay-backdrop-filter};
5
- --moo-input-group-border-radius: #{$moo-input-group-border-radius};
6
- --moo-disabled-control-opacity: #{$moo-disabled-control-opacity};
7
- --moo-sidebar-foreground: var(--moo-foreground);
8
- --moo-sidebar-accent: var(--moo-muted-surface);
9
- --moo-sidebar-border: var(--moo-border);
10
- --moo-chart-1: #{$moo-chart-1};
11
- --moo-chart-2: #{$moo-chart-2};
12
- --moo-chart-3: #{$moo-chart-3};
13
- --moo-chart-4: #{$moo-chart-4};
14
- --moo-chart-5: #{$moo-chart-5};
15
- }
16
-
17
- :root,
18
- [data-bs-theme="light"] {
19
- --moo-surface: #{$moo-surface};
20
- --moo-muted-surface: #{$moo-muted-surface};
21
- --moo-border: #{$moo-border};
22
- --moo-primary: #{$moo-primary};
23
- --moo-primary-foreground: #{$moo-primary-foreground};
24
- --moo-foreground: #{$moo-foreground};
25
- --moo-muted-foreground: #{$moo-muted-foreground};
26
- --moo-disabled-foreground: #{$moo-disabled-foreground};
27
- --moo-ring: #{$moo-ring};
28
- --moo-destructive: #{$moo-destructive};
29
- --moo-destructive-surface: #{$moo-destructive-surface};
30
- --moo-destructive-surface-hover: #{$moo-destructive-surface-hover};
31
- --moo-destructive-foreground: #{$moo-destructive-foreground};
32
- --moo-form-invalid-ring-color: #{$moo-form-invalid-ring-color};
33
- --moo-warning: #{$moo-warning};
34
- --moo-warning-surface: #{$moo-warning-surface};
35
- --moo-warning-surface-hover: #{$moo-warning-surface-hover};
36
- --moo-warning-foreground: #{$moo-warning-foreground};
37
- --moo-success: #{$moo-success};
38
- --moo-success-surface: #{$moo-success-surface};
39
- --moo-success-surface-hover: #{$moo-success-surface-hover};
40
- --moo-success-foreground: #{$moo-success-foreground};
41
- --moo-info: #{$moo-info};
42
- --moo-info-surface: #{$moo-info-surface};
43
- --moo-info-surface-hover: #{$moo-info-surface-hover};
44
- --moo-info-foreground: #{$moo-info-foreground};
45
- --moo-sidebar: #{$moo-sidebar};
46
- --bs-body-color: var(--moo-foreground);
47
- --bs-body-color-rgb: #{to-rgb($moo-foreground)};
48
- --bs-heading-color: var(--moo-foreground);
49
- --bs-secondary-color: var(--moo-muted-foreground);
50
- // Bootstrap computes its own dark-mode --bs-body-bg/-secondary-bg/
51
- // -tertiary-bg independently of this file (see vendor/bootstrap/scss/
52
- // _root.scss's [data-bs-theme="dark"] block), the same way it did for the
53
- // --bs-body-color trio above before this bridge existed. The scoped Odoo
54
- // core build already ties every one of these to the shared --moo-*
55
- // palette (scss/themes/_scoped_core.scss's moo-core-light/dark mixins);
56
- // mirror that here so both entrypoints render the same background, not
57
- // two independently-computed gray scales that happen to agree in light
58
- // mode and diverge in dark (this is what caused the catalog shell's body
59
- // background to sit only ~7 units of contrast from its own Kbd chips
60
- // instead of the ~15 they're tuned for).
61
- --bs-body-bg: var(--moo-surface);
62
- --bs-body-bg-rgb: #{to-rgb($moo-surface)};
63
- --bs-secondary-bg: var(--moo-muted-surface);
64
- --bs-secondary-bg-rgb: #{to-rgb($moo-muted-surface)};
65
- --bs-border-color: var(--moo-border);
66
- --bs-tertiary-bg: #{$body-tertiary-bg};
67
- --bs-tertiary-bg-rgb: #{to-rgb($body-tertiary-bg)};
68
- --bs-tertiary-color: #{$body-tertiary-color};
69
- --bs-tertiary-color-rgb: #{to-rgb($body-tertiary-color)};
70
- --bs-form-invalid-color: var(--moo-destructive);
71
- --bs-form-invalid-border-color: #{$moo-form-invalid-border-color};
72
- }
73
-
74
- [data-bs-theme="dark"] {
75
- --moo-surface: #{$moo-surface-dark};
76
- --moo-muted-surface: #{$moo-muted-surface-dark};
77
- --moo-border: #{$moo-border-dark};
78
- --moo-primary: #{$moo-primary-dark};
79
- --moo-primary-foreground: #{$moo-primary-foreground-dark};
80
- --moo-foreground: #{$moo-foreground-dark};
81
- --moo-muted-foreground: #{$moo-muted-foreground-dark};
82
- --moo-disabled-foreground: #{$moo-disabled-foreground-dark};
83
- --moo-ring: #{$moo-ring-dark};
84
- --moo-destructive: #{$moo-destructive-dark};
85
- --moo-destructive-surface: #{$moo-destructive-surface-dark};
86
- --moo-destructive-surface-hover: #{$moo-destructive-surface-hover-dark};
87
- --moo-destructive-foreground: #{$moo-destructive-foreground-dark};
88
- --moo-form-invalid-ring-color: #{$moo-form-invalid-ring-color-dark};
89
- --moo-warning: #{$moo-warning-dark};
90
- --moo-warning-surface: #{$moo-warning-surface-dark};
91
- --moo-warning-surface-hover: #{$moo-warning-surface-hover-dark};
92
- --moo-warning-foreground: #{$moo-warning-foreground-dark};
93
- --moo-success: #{$moo-success-dark};
94
- --moo-success-surface: #{$moo-success-surface-dark};
95
- --moo-success-surface-hover: #{$moo-success-surface-hover-dark};
96
- --moo-success-foreground: #{$moo-success-foreground-dark};
97
- --moo-info: #{$moo-info-dark};
98
- --moo-info-surface: #{$moo-info-surface-dark};
99
- --moo-info-surface-hover: #{$moo-info-surface-hover-dark};
100
- --moo-info-foreground: #{$moo-info-foreground-dark};
101
- --moo-sidebar: #{$moo-sidebar-dark};
102
- --moo-input-bg: #{$moo-input-bg-dark};
103
- --bs-body-color: var(--moo-foreground);
104
- --bs-body-color-rgb: #{to-rgb($moo-foreground-dark)};
105
- --bs-heading-color: var(--moo-foreground);
106
- --bs-secondary-color: var(--moo-muted-foreground);
107
- // See the light block's matching comment above.
108
- --bs-body-bg: var(--moo-surface);
109
- --bs-body-bg-rgb: #{to-rgb($moo-surface-dark)};
110
- --bs-secondary-bg: var(--moo-muted-surface);
111
- --bs-secondary-bg-rgb: #{to-rgb($moo-muted-surface-dark)};
112
- --bs-border-color: var(--moo-border);
113
- --bs-tertiary-bg: #{$body-tertiary-bg-dark};
114
- --bs-tertiary-bg-rgb: #{to-rgb($body-tertiary-bg-dark)};
115
- --bs-tertiary-color: #{$body-tertiary-color-dark};
116
- --bs-tertiary-color-rgb: #{to-rgb($body-tertiary-color-dark)};
117
- --bs-form-invalid-color: var(--moo-destructive);
118
- --bs-form-invalid-border-color: #{$moo-form-invalid-border-color-dark};
119
- }