@wpmoo/ui 1.0.0-rc.8 → 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 (94) hide show
  1. package/ASSET_LICENSE.md +1 -1
  2. package/LICENSE +28 -0
  3. package/README.md +34 -6
  4. package/certification.json +3 -2
  5. package/dist/assets/css/moo-ui.css +634 -33
  6. package/dist/assets/css/moo-ui.min.css +10 -31
  7. package/dist/assets/css/moo.css +624 -30
  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 +39 -22
  14. package/dist/js/datepicker.js +4 -3
  15. package/dist/js/datepicker.min.js +4 -3
  16. package/dist/js/moo-ui.js +160 -15402
  17. package/dist/js/moo-ui.min.js +3 -23
  18. package/dist/js/sheet.js +46 -0
  19. package/dist/js/sidebar.js +5 -4
  20. package/dist/js/slider.js +12 -47
  21. package/dist/js/state.js +76 -0
  22. package/dist/release-manifest.json +6 -6
  23. package/package.json +5 -3
  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 +6 -37
  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 +19 -0
  76. package/scss/layouts/_app.scss +5 -7
  77. package/scss/layouts/_page_grid.scss +27 -0
  78. package/scss/layouts/app/sidebar/_base.scss +0 -33
  79. package/scss/layouts/app/sidebar/_default.scss +2 -8
  80. package/scss/layouts/app/sidebar/_floating.scss +1 -9
  81. package/scss/layouts/app/sidebar/_inset.scss +5 -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 +1 -38
  88. package/scss/settings/_palette.scss +0 -42
  89. package/scss/themes/_root.scss +4 -0
  90. package/scss/themes/_standalone.scss +1 -3
  91. package/scss/themes/_theme.scss +4 -0
  92. package/scss/utilities/_background_color.scss +18 -0
  93. package/scss/utilities/_border.scss +4 -0
  94. package/dist/js/theme-prepaint.js +0 -91
@@ -1,9 +1,108 @@
1
- // Bootstrap's <legend> ships a heading-sized (1.5rem) default font-size
2
- // that .form-label doesn't reset: form-label's own font-size is null
3
- // (inherit) by default, which only works for bare <label> elements that
4
- // never had a UA font-size of their own. Reset it explicitly, the same
5
- // fix Bootstrap's own horizontal-form label class applies for the same
6
- // reason (see vendor Bootstrap's forms/labels partial).
1
+ /* Radio Group */
7
2
  .radio-group legend.form-label {
8
3
  font-size: inherit;
9
4
  }
5
+
6
+ .form-check-card {
7
+ position: relative;
8
+ padding: 0;
9
+ margin-bottom: 0;
10
+
11
+ + .form-check-card {
12
+ margin-block-start: $spacer * 0.5;
13
+ }
14
+
15
+ > .form-check-input:not(.visually-hidden) {
16
+ position: absolute;
17
+ inset-block-start: $spacer * 0.75;
18
+ inset-inline-end: $spacer * 0.75;
19
+ float: none;
20
+ margin: 0;
21
+ }
22
+
23
+ > .form-check-label {
24
+ display: flex;
25
+ align-items: center;
26
+ gap: $spacer * 0.75;
27
+ padding: $spacer * 0.75;
28
+ padding-inline-end: $spacer * 1.5 + $form-check-input-width;
29
+ border: var(--bs-border-width) solid var(--moo-border);
30
+ border-radius: var(--bs-border-radius);
31
+ color: var(--moo-foreground);
32
+ cursor: pointer;
33
+ }
34
+
35
+ &.form-check-card--no-control > .form-check-label {
36
+ padding-inline-end: $spacer * 0.75;
37
+ }
38
+
39
+ > .form-check-input:not(:disabled) ~ .form-check-label:hover,
40
+ > .form-check-input:checked ~ .form-check-label {
41
+ background-color: var(--moo-muted-surface);
42
+ }
43
+
44
+ > .form-check-input:checked ~ .form-check-label {
45
+ border-color: var(--moo-foreground);
46
+ }
47
+
48
+ > .form-check-input:checked ~ .form-check-label .form-check-card-media {
49
+ border-color: var(--moo-primary);
50
+ background-color: var(--moo-primary);
51
+ color: var(--moo-primary-foreground);
52
+ }
53
+
54
+ > .form-check-input:focus-visible ~ .form-check-label {
55
+ border-color: var(--moo-ring);
56
+ box-shadow: $form-check-input-focus-box-shadow;
57
+ }
58
+
59
+ > .form-check-input.is-invalid ~ .form-check-label {
60
+ border-color: var(--bs-form-invalid-border-color);
61
+ }
62
+
63
+ > .form-check-input.is-invalid:focus-visible ~ .form-check-label {
64
+ box-shadow: 0 0 0 var(--bs-focus-ring-width) var(--moo-form-invalid-ring-color);
65
+ }
66
+ }
67
+
68
+ .form-check-card-content {
69
+ display: flex;
70
+ flex-direction: column;
71
+ gap: $spacer * 0.25;
72
+ min-width: 0;
73
+ line-height: $line-height-sm;
74
+ overflow-wrap: anywhere;
75
+
76
+ > .form-text {
77
+ margin: 0;
78
+ font-size: $font-size-sm;
79
+ line-height: inherit;
80
+ color: $moo-form-check-card-description-color;
81
+ }
82
+ }
83
+
84
+ .form-check-card-title {
85
+ font-weight: $font-weight-medium;
86
+ }
87
+
88
+ .form-check-card-media {
89
+ display: grid;
90
+ place-items: center;
91
+ flex: 0 0 auto;
92
+ inline-size: ($font-size-base + $font-size-sm) * $line-height-sm + $spacer * 0.25;
93
+ aspect-ratio: 1;
94
+ border: var(--bs-border-width) solid var(--moo-border);
95
+ border-radius: var(--bs-border-radius-sm);
96
+ background-color: var(--moo-muted-surface);
97
+ color: var(--moo-foreground);
98
+
99
+ > span {
100
+ font-size: $font-size-sm;
101
+ font-weight: $font-weight-semibold;
102
+ }
103
+
104
+ > [data-icon] {
105
+ width: $font-size-base;
106
+ height: $font-size-base;
107
+ }
108
+ }
@@ -1,5 +1,4 @@
1
- // Shared command/search trigger composition. The host supplies the semantic
2
- // button markup and behavior; Core owns only the reusable visual contract.
1
+ /* Search Trigger */
3
2
  .search-trigger {
4
3
  width: $moo-search-trigger-width;
5
4
  max-width: 100%;
@@ -1,3 +1,4 @@
1
+ /* Select */
1
2
  .form-select {
2
3
  option,
3
4
  optgroup {
@@ -1,9 +1,4 @@
1
- // Bootstrap's own hr/.vr fake a light divider with a 25%-opacity trick
2
- // over an inherited/currentColor value (vendor/bootstrap/scss/_reboot.scss,
3
- // helpers/_vr.scss) instead of a flat border-color fill. That renders
4
- // visibly darker than --moo-border, the flat divider color already used at
5
- // full opacity everywhere else a hairline border appears and the closest
6
- // match to the reference's own flat border-token separator fill.
1
+ /* Separator */
7
2
  hr {
8
3
  opacity: 1;
9
4
  border-top: var(--bs-border-width) solid var(--moo-border);
@@ -1,32 +1,16 @@
1
- // Sheet is the Moo catalog name for Bootstrap's Offcanvas component, so this
2
- // partial retunes Bootstrap's own --bs-offcanvas-* custom properties toward
3
- // the design reference: a narrower fixed width, a quieter border tone, and
4
- // a real elevation shadow, instead of Bootstrap's own wider, shadowless
5
- // panel. Scoped to .offcanvas.sheet (see the "sheet" marker class in the
6
- // sheet() macro) rather than the bare .offcanvas Bootstrap ships, because
7
- // the Sidebar component's own mobile drawer also carries that bare class
8
- // and already sets its own --bs-offcanvas-width; a bare-class rule here
9
- // would silently win or lose depending on import order instead of losing
10
- // predictably to Sidebar's own more specific root selector.
1
+ /* Sheet */
11
2
  .offcanvas.sheet {
12
3
  --bs-offcanvas-width: 24rem;
13
4
  --bs-offcanvas-border-color: var(--moo-border);
14
- // $enable-shadows is off project-wide, which turns Bootstrap's own
15
- // box-shadow() mixin into a no-op, so this must be a literal property
16
- // consuming a shared token directly.
17
5
  box-shadow: var(--bs-box-shadow-lg);
18
6
  }
19
7
 
20
8
  .offcanvas.sheet[tabindex]:focus-visible {
21
- // Bootstrap moves focus to the open panel. Preserve its elevation instead
22
- // of letting the generic tabindex focus reset flatten the panel.
23
9
  outline: none;
24
10
  box-shadow: var(--bs-box-shadow-lg);
25
11
  }
26
12
 
27
13
  .offcanvas.sheet .offcanvas-title {
28
- // A literal size, not $font-size-base: this project's own base is 14px,
29
- // but the reference sheet title sits at a plain, un-scaled 16px regardless.
30
14
  font-size: 1rem;
31
15
  font-weight: $font-weight-medium;
32
16
  }
@@ -1,5 +1,4 @@
1
- // Bootstrap has no native sidebar, so this owned selector namespace is split
2
- // by responsibility while preserving one deterministic emission order.
1
+ /* Sidebar */
3
2
  @import "sidebar/base";
4
3
  @import "sidebar/menus";
5
4
  @import "sidebar/identity";
@@ -1,17 +1,10 @@
1
+ /* Skeleton */
1
2
  .skeleton {
2
- // Bootstrap's placeholder utility paints via currentcolor; recolor it here
3
- // (border token keeps contrast in both themes) instead of fighting bg directly.
4
3
  color: var(--moo-border);
5
4
  border-radius: var(--bs-border-radius);
6
5
  overflow: hidden;
7
6
  }
8
7
 
9
- // Bootstrap's .placeholder is inline-block with vertical-align:middle, meant
10
- // to sit inline within a line of real text it's replacing. Here it's the
11
- // sole content of a fixed-size block wrapper instead, where that inline
12
- // vertical alignment leaves a gap at the top of the wrapper and pushes the
13
- // bar's own bottom edge past it, clipped by the wrapper's overflow:hidden.
14
- // Block-level sizing removes the line-box alignment entirely.
15
8
  .skeleton > .placeholder {
16
9
  display: block;
17
10
  }
@@ -1,3 +1,4 @@
1
+ /* Slider */
1
2
  $slider-thumb-size: $form-range-thumb-width * 0.75;
2
3
  $slider-thumb-margin-top: ($progress-height - $slider-thumb-size) * 0.5;
3
4
 
@@ -114,8 +115,6 @@ $slider-thumb-margin-top: ($progress-height - $slider-thumb-size) * 0.5;
114
115
  box-shadow: 0 0 0 #{$moo-form-focus-ring-width} color-mix(in srgb, #{$moo-form-focus-ring-color} 50%, transparent);
115
116
  }
116
117
 
117
- // Safari can keep pointer-driven range focus out of :focus-visible, while
118
- // Bootstrap's native .form-range:focus thumb halo still applies.
119
118
  .slider[data-slider-pointer-focus]:not([data-slider-dragging]) .slider-input:focus::-webkit-slider-thumb {
120
119
  box-shadow: var(--bs-box-shadow-sm);
121
120
  }
@@ -1,10 +1,4 @@
1
- // The design reference's Spinner is the Lucide loader-circle icon spun with
2
- // CSS, not Bootstrap's thicker spinner-border ring — render_icon already
3
- // emits the same stroke-width and line-cap Lucide markup the reference
4
- // uses, so only sizing
5
- // and rotation are needed here. The animation name is supplied by the active
6
- // build entry: Bootstrap's spinner-border for standalone, namespaced Moo for
7
- // the scoped core.
1
+ /* Spinner */
8
2
  .spinner [data-icon] {
9
3
  width: $spacer;
10
4
  height: $spacer;
@@ -1,7 +1,4 @@
1
- // Bootstrap's .form-switch only overrides width; height still comes from
2
- // the shared $form-check-input-width (also used by Checkbox and Radio
3
- // Group), so matching the design reference's taller track needs an
4
- // explicit height here instead of a shared Bootstrap variable.
1
+ /* Switch */
5
2
  .form-switch .form-check-input {
6
3
  height: $moo-switch-height;
7
4
  }
@@ -1,6 +1,5 @@
1
+ /* Table */
1
2
  .card .table {
2
- // Keep the table surface transparent so a table composed inside a card
3
- // inherits the card's light/dark surface.
4
3
  --bs-table-bg: #{$moo-table-contained-bg};
5
4
  }
6
5
 
@@ -1,9 +1,4 @@
1
- // The reference TabsList is a segmented control: a muted rounded track with an
2
- // inset, shadowed pill marking the active tab. Bootstrap's pills nav has
3
- // no shared track and colors the active pill with $primary directly, so
4
- // this styling is scoped to the tabs-list wrapper instead of the shared
5
- // pills class — Navigation's own pills variant already owns that class
6
- // and must keep its plain Bootstrap look.
1
+ /* Tabs */
7
2
  .tabs-list {
8
3
  display: inline-flex;
9
4
  gap: $moo-tabs-list-gap;
@@ -16,17 +11,6 @@
16
11
  padding: $moo-tabs-trigger-padding-y $moo-tabs-trigger-padding-x;
17
12
  font-size: $font-size-base;
18
13
  font-weight: 500;
19
- // var(--moo-muted-foreground) on the track's own var(--moo-muted-surface)
20
- // background measures 4.40:1 in light mode, under the 4.5:1 WCAG AA
21
- // minimum for normal text (axe caught this in the certification fixture).
22
- // var(--bs-secondary-color) is not a usable substitute here -- Moo UI's
23
- // own theme sets --bs-secondary-color: var(--moo-muted-foreground)
24
- // (scss/themes/_root.scss), so it resolves to the exact same
25
- // failing color. var(--bs-secondary-text-emphasis) is a different,
26
- // untouched Bootstrap token (Moo UI does not override it) built for
27
- // accessible colored text against a tinted "subtle" surface -- the same
28
- // category of fix the Kbd contrast defect used -- and measures 5.55:1
29
- // light / 14.03:1 dark against this track's own background.
30
14
  color: var(--bs-secondary-text-emphasis);
31
15
  border-radius: var(--bs-border-radius);
32
16
  cursor: default;
@@ -104,11 +88,6 @@
104
88
  pointer-events: none;
105
89
  }
106
90
 
107
- // Bootstrap hides inactive panes with display:none, so the pane height
108
- // changes the moment a shorter or taller tab becomes active — the
109
- // surrounding page jumps to the new height on every switch. Stacking every
110
- // pane in the same grid cell sizes the row to the tallest pane once, so
111
- // switching only toggles visibility, never the container's height.
112
91
  .tab-content {
113
92
  display: grid;
114
93
  width: 100%;
@@ -126,8 +105,6 @@
126
105
  opacity: 0;
127
106
  visibility: hidden;
128
107
  pointer-events: none;
129
- // Slightly longer than Bootstrap's .15s fade so the content handoff feels
130
- // intentional without adding any positional movement.
131
108
  transition: opacity 0.16s ease, visibility 0s linear 0.16s;
132
109
  }
133
110
 
@@ -1,3 +1,4 @@
1
+ /* Textarea */
1
2
  textarea.form-control:not(.form-control-sm, .form-control-lg) {
2
3
  padding: $input-btn-padding-y-lg $input-btn-padding-x;
3
4
  }
@@ -1,6 +1,4 @@
1
- // Bootstrap owns Toast markup, lifecycle classes, placement utilities, and
2
- // autohide behavior. This partial only retunes the native surface and opts
3
- // an explicitly indexed bottom-end container into the catalog deck layout.
1
+ /* Toast */
4
2
  .toast {
5
3
  --bs-toast-border-radius: var(--bs-border-radius-lg);
6
4
  --bs-toast-border-color: var(--moo-border);
@@ -58,7 +56,6 @@
58
56
  --moo-toast-stack-enter-y: #{$moo-toast-stack-enter-y};
59
57
  }
60
58
 
61
- // Without runtime indexes, the container remains readable Bootstrap flow.
62
59
  .toast-container--stacked[data-toast-stack="deck"][data-toast-stack-active] {
63
60
  bottom: 1rem !important;
64
61
  inset-inline-end: 1rem !important;
@@ -1,6 +1,4 @@
1
- // Toggle Group uses Bootstrap's native .btn-check + label.btn contract, but
2
- // selected state should change in place instead of using the generic button
3
- // press nudge.
1
+ /* Toggle Group */
4
2
  .toggle-group > .btn:not(:disabled):not(.disabled):not([aria-disabled="true"]):active {
5
3
  transform: none;
6
4
  }
@@ -1,9 +1,4 @@
1
- // Retuned against the design reference's tooltip (bg-foreground
2
- // text-background, px-3 py-1.5, text-xs, rounded-md, fully opaque,
3
- // max-w-xs): Bootstrap's own
4
- // defaults are narrower, tighter, and dimmed to 90% opacity. All four
5
- // overrides route through Bootstrap's existing custom properties, so no new
6
- // selectors or hardcoded colors are introduced.
1
+ /* Tooltip */
7
2
  .tooltip {
8
3
  --bs-tooltip-max-width: 20rem;
9
4
  --bs-tooltip-padding-x: 0.75rem;
@@ -17,9 +12,6 @@
17
12
  line-height: 1.333;
18
13
  }
19
14
 
20
- // Popper owns the wrapper transform for placement. Animate only the bubble
21
- // surface so the tooltip opens with the reference's subtle zoom/slide without
22
- // disturbing Bootstrap positioning.
23
15
  .tooltip.fade .tooltip-inner {
24
16
  transition: transform var(--moo-tooltip-motion-duration) var(--moo-tooltip-motion-easing);
25
17
  transform: scale(var(--moo-tooltip-motion-scale));
@@ -59,12 +51,6 @@
59
51
  }
60
52
  }
61
53
 
62
- // Bootstrap's tooltip bubble is fully token-driven already (see the vendored
63
- // Bootstrap tooltip partial), so this partial only owns the plain link
64
- // trigger's own text color. Unstyled, it falls through to Bootstrap's
65
- // un-themed --bs-link-color, which reads too low-contrast on dark surfaces;
66
- // a dotted underline also reads as "hover for more info" rather than a real
67
- // navigational link.
68
54
  .tooltip-trigger {
69
55
  color: var(--moo-foreground);
70
56
  text-decoration-line: underline;
@@ -73,11 +59,6 @@
73
59
  text-underline-offset: 0.2em;
74
60
  }
75
61
 
76
- // Tooltip shortcut hints render the Kbd component's native <kbd> element.
77
- // The catalog tooltip initializer extends Bootstrap's sanitizer allowlist
78
- // with the kbd tag so it survives data-bs-html sanitization; styling comes
79
- // from the shared Kbd component and Bootstrap's own reboot. A shortcut chip
80
- // after trailing prose keeps a readable gap from the surrounding text.
81
62
  .tooltip-inner kbd {
82
63
  margin-inline-start: $kbd-padding-x;
83
64
  }
@@ -1,6 +1,3 @@
1
- // Bootstrap has no native sidebar, so this owned sidebar selector namespace
2
- // provides the inner surface and anatomy. The App layout owns the outer
3
- // <aside>, placement, width, visual variant, and collapse mode.
4
1
 
5
2
  .sidebar-inner {
6
3
  position: sticky;
@@ -84,10 +81,6 @@
84
81
  font-weight: $font-weight-medium;
85
82
  }
86
83
 
87
- // Reserve room so a long label doesn't run under the absolutely positioned
88
- // group action button (see .sidebar-group-action below). A descendant match
89
- // covers both a group action placed directly in .sidebar-group and one
90
- // nested inside .sidebar-group-content alongside the label.
91
84
  .sidebar-group:has(.sidebar-group-action) .sidebar-group-label {
92
85
  padding-inline-end: $spacer * 2.5;
93
86
  }
@@ -1,6 +1,3 @@
1
- // Collapsed-to-icon inner state (desktop). App owns the outer shell width,
2
- // rail, stacking, and responsive placement; Sidebar owns the inner content
3
- // visibility and flyout anatomy.
4
1
 
5
2
  @include media-breakpoint-up(lg) {
6
3
  [data-sidebar-state="collapsed"] .sidebar[data-collapsible="icon"] .sidebar-group-label,
@@ -18,9 +15,6 @@
18
15
  }
19
16
 
20
17
  [data-sidebar-state="collapsed"] .sidebar[data-collapsible="icon"]:has(.sidebar-menu-button[data-bs-toggle="dropdown"][aria-expanded="true"]) {
21
- // Keep the collapsed identity trigger above sticky page chrome too. This
22
- // selector is more specific than the app-root rule above and otherwise
23
- // would lower the Sidebar back to the dropdown layer.
24
18
  z-index: $zindex-fixed + 1;
25
19
  }
26
20
 
@@ -1,4 +1,3 @@
1
- // Leading brand/avatar tiles for the team switcher and user rows.
2
1
  .sidebar-brand-mark {
3
2
  display: inline-grid;
4
3
  place-items: center;
@@ -1,4 +1,3 @@
1
- // Menus ------------------------------------------------------------------
2
1
  .sidebar-menu {
3
2
  display: flex;
4
3
  flex-direction: column;
@@ -14,8 +13,6 @@
14
13
  position: relative;
15
14
  }
16
15
 
17
- // Auto-detect a trailing action so a public consumer doesn't need to
18
- // remember an extra class for the button to reserve room for it.
19
16
  .sidebar-menu-item:has(> .sidebar-menu-action) > .sidebar-menu-button {
20
17
  padding-inline-end: $spacer * 2.5;
21
18
  }
@@ -67,7 +64,6 @@
67
64
  padding: $spacer * 0.5;
68
65
  }
69
66
 
70
- // A fixed brand lockup, not an interactive control: no hover affordance.
71
67
  .sidebar-menu-button--static:hover {
72
68
  background: transparent;
73
69
  }
@@ -153,10 +149,6 @@
153
149
  .sidebar-menu-sub {
154
150
  gap: 0;
155
151
  margin: 0;
156
- // Aligns the indent line with the center of the parent disclosure
157
- // button's icon (padding-inline-start + half the icon width), so the
158
- // line reads as a continuation of the icon column above it instead of
159
- // sitting flush with the group edge.
160
152
  margin-inline-start: $spacer * 0.5 + $font-size-base * 0.5;
161
153
  padding-inline-start: $spacer * 0.5;
162
154
  border-inline-start: var(--bs-border-width) solid var(--moo-border);
@@ -193,8 +185,6 @@
193
185
  color: var(--moo-sidebar-foreground);
194
186
  }
195
187
 
196
- // Overlays the group's top-right corner, vertically centered against the
197
- // group label row ($moo group padding + half the label/button height delta).
198
188
  .sidebar-group-action {
199
189
  position: absolute;
200
190
  z-index: 1;
@@ -202,8 +192,6 @@
202
192
  inset-inline-end: $spacer * 0.5;
203
193
  }
204
194
 
205
- // Overlays the trailing edge of the menu row it belongs to, matching
206
- // .sidebar-menu-action's slot so both compose the same visual contract.
207
195
  .sidebar-menu-badge {
208
196
  position: absolute;
209
197
  inset-inline-end: $spacer * 0.25;
@@ -214,7 +202,6 @@
214
202
  pointer-events: none;
215
203
  }
216
204
 
217
- // Reserve room so a long title doesn't run under the badge.
218
205
  .sidebar-menu-item:has(> .sidebar-menu-badge) > .sidebar-menu-button {
219
206
  padding-inline-end: $spacer * 2.5;
220
207
  }
@@ -223,10 +210,6 @@
223
210
  padding-inline-end: $spacer * 2.5;
224
211
  }
225
212
 
226
- // A menu item can combine a trailing action with a badge, such as an unread
227
- // count beside a "..." overflow menu. Both default to the same trailing
228
- // slot, so shift the badge inward past the action's footprint and reserve
229
- // extra title space for the pair instead of just one accessory's width.
230
213
  .sidebar-menu-item:has(> .sidebar-menu-action) > .sidebar-menu-badge {
231
214
  inset-inline-end: $spacer * 2;
232
215
  }
@@ -1,16 +1,3 @@
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
- //
6
- // Modal waits for the real `.modal-backdrop` transition before it starts the
7
- // dialog panel. Keep that lifecycle element visually inert and animate a
8
- // pseudo-element instead: the panel and visible blur/dim can then start from
9
- // the same Bootstrap motion token, while the native backdrop is still retained
10
- // long enough to fade the visual layer out on close. Use keyframe animation
11
- // rather than a pseudo-element transition: transitionend events from a pseudo
12
- // element bubble to its originating backdrop and would make Bootstrap wait for
13
- // the visual layer before showing the panel.
14
1
  @mixin moo-overlay-backdrop-appearance {
15
2
  --#{$prefix}backdrop-opacity: var(--moo-overlay-backdrop-opacity, #{$moo-overlay-backdrop-opacity});
16
3
  opacity: 1;
@@ -22,16 +9,10 @@
22
9
  opacity: 1;
23
10
  }
24
11
 
25
- // Bootstrap reads this duration to decide when to reveal a Modal panel.
26
- // Keep entry instant; the visual transition below belongs to ::before.
27
12
  &.show {
28
13
  transition: none;
29
14
  }
30
15
 
31
- // On close, Bootstrap keeps the lifecycle layer in the DOM for this token
32
- // duration while ::before fades out. Color has no visible effect on the
33
- // empty backdrop but supplies Bootstrap's native transition lifecycle
34
- // without multiplying the pseudo-element's visual fade.
35
16
  &.fade:not(.show) {
36
17
  color: var(--bs-body-color, currentcolor);
37
18
  transition: color var(--moo-overlay-motion-duration, #{$moo-overlay-motion-duration}) ease-out;
@@ -50,9 +31,6 @@
50
31
  }
51
32
 
52
33
  @mixin moo-overlay-backdrop-shown {
53
- // Bootstrap Modal routes opacity through --bs-backdrop-opacity, but
54
- // Offcanvas 5.3 compiles the same state to a literal .5. Restate the shared
55
- // token on both native show selectors so Dialog and Sheet dim equally.
56
34
  &::before {
57
35
  animation: moo-overlay-backdrop-enter var(--moo-overlay-motion-duration, #{$moo-overlay-motion-duration}) ease-out both;
58
36
  }
@@ -104,10 +82,6 @@
104
82
  @include moo-overlay-backdrop-shown;
105
83
  }
106
84
 
107
- // Backdrops that are portaled into a resolved owner still need to outrank
108
- // Bootstrap's scoped `.fade` and `.show` rules. Entry points include this
109
- // mixin inside their single native Moo scope; the global rules above remain
110
- // available for hosts that intentionally keep Bootstrap's body-level portal.
111
85
  @mixin moo-overlay-backdrop-scoped {
112
86
  .modal-backdrop,
113
87
  .offcanvas-backdrop {
@@ -1,24 +1,8 @@
1
- // Bootstrap form labels and check/radio/switch labels sit inside clickable
2
- // control surfaces in Moo UI, so keep them from selecting text during pointer
3
- // interaction without making Field own every label selector.
4
1
  .form-label,
5
2
  .form-check-label {
6
3
  user-select: none;
7
4
  }
8
5
 
9
- // One shared focus-visible recipe for essentially every focusable surface --
10
- // border swaps to the ring color and a 3px/50%-opacity ring surrounds the
11
- // control. Matches the reference exactly, which repeats this same
12
- // identical recipe (border-ring + ring-[3px] + ring-ring/50) across buttons,
13
- // links, dialog/dropdown/popover/select triggers, tabs, and toggle-group
14
- // items as well as native form controls, rather than a different treatment
15
- // per component family. Placed ahead of the is-invalid rule below so that
16
- // invalid controls can keep the same ring width while swapping only the
17
- // color. The explicit
18
- // outline: 0 replaces the browser's own default focus ring (an amber
19
- // auto-style outline on Chromium) that would otherwise show through on any
20
- // element -- plain sidebar/nav <a> tags included -- that Bootstrap doesn't
21
- // already reset at the .btn level.
22
6
  :is(.btn, a, button, summary, [tabindex]):not(input, textarea, select):focus-visible,
23
7
  :is(.form-control, .form-select, .form-check-input):focus-visible {
24
8
  border-color: var(--moo-ring);
@@ -26,36 +10,18 @@
26
10
  box-shadow: 0 0 0 #{$moo-form-focus-ring-width} color-mix(in srgb, #{$moo-form-focus-ring-color} 50%, transparent);
27
11
  }
28
12
 
29
- // Buttons keep their hover/open treatment after pointer clicks; the ring is
30
- // reserved for keyboard focus on the resting control.
31
13
  .btn:focus-visible:hover,
32
14
  .btn.show:focus-visible {
33
15
  border-color: var(--bs-btn-hover-border-color);
34
16
  box-shadow: none;
35
17
  }
36
18
 
37
- // Mouse-triggered focus keeps the resting border and shows no ring, same
38
- // as every other interactive surface on the site (.form-check-input's own
39
- // equivalent lives in components/_checkbox.scss, next to its checked/
40
- // indeterminate border-color variants).
41
19
  .form-control:focus:not(:focus-visible),
42
20
  .form-select:focus:not(:focus-visible) {
43
21
  border-color: var(--moo-border);
44
22
  box-shadow: none;
45
23
  }
46
24
 
47
- // Bootstrap's own .page-link:focus (vendor/bootstrap/scss/_pagination.scss)
48
- // applies its background/color/outline/box-shadow on any focus, including
49
- // mouse clicks -- unlike every other control here, it was never gated
50
- // behind :focus-visible, so clicking a page number (which also makes it the
51
- // active page) showed a ring the reference only shows for keyboard focus.
52
- // The ring/outline never carries active-state meaning (Bootstrap's own
53
- // ".active > &" rule never sets box-shadow), so it's always safe to drop on
54
- // non-keyboard focus, active page included. color/bg/border only revert to
55
- // resting when the page isn't the current one, so the active page keeps its
56
- // own look while it holds mouse focus. Real keyboard focus still gets the
57
- // shared ring above, since .page-link is a <button> and already matches
58
- // that selector.
59
25
  .page-link:focus:not(:focus-visible) {
60
26
  outline: 0;
61
27
  box-shadow: none;
@@ -67,10 +33,6 @@
67
33
  border-color: var(--bs-pagination-border-color);
68
34
  }
69
35
 
70
- // Bootstrap shows validation glow only on :focus, while the reference keeps a
71
- // subtle destructive ring visible for invalid controls. Keep it on native
72
- // form-control/form-select classes so Input, Select, Field, and Combobox share
73
- // the same validation affordance.
74
36
  .form-control.is-invalid,
75
37
  .form-control.is-invalid:focus,
76
38
  .was-validated .form-control:invalid,
@@ -82,12 +44,6 @@
82
44
  box-shadow: 0 0 0 #{$moo-form-focus-ring-width} var(--moo-form-invalid-ring-color);
83
45
  }
84
46
 
85
- // .btn-check toggle buttons (Toggle Group) put focus on the hidden input,
86
- // never the visible label, so the rule above can never match them; only
87
- // variants generated through Bootstrap's button-variant mixin (real theme
88
- // colors) get a working native focus glow, so btn-ghost/outline consumers
89
- // would otherwise show no ring at all. Share the same ring here instead of
90
- // patching --bs-btn-focus-box-shadow per variant.
91
47
  .btn-check:focus:not(:focus-visible) + .btn {
92
48
  outline: 0;
93
49
  box-shadow: none;
@@ -103,15 +59,6 @@
103
59
  box-shadow: none;
104
60
  }
105
61
 
106
- // Compound controls whose native input isn't the outer visual box (Combobox's
107
- // chip row, Input Group's addon-wrapped control) need the same ring painted
108
- // on the wrapper instead of the child. Kept here rather than in each
109
- // component's own partial so every focus-ring declaration in the project
110
- // stays in one file instead of the recipe being copy-pasted per component --
111
- // component partials contract-test that their own box-shadow declarations
112
- // stick to Bootstrap's native primitives (test_catalog.py's
113
- // test_component_styles_use_bootstrap_visual_primitives), and this recipe
114
- // isn't one of those.
115
62
  .combobox-chips:focus-within {
116
63
  border-color: var(--moo-ring);
117
64
  outline: 0;
@@ -124,9 +71,6 @@
124
71
  box-shadow: 0 0 0 #{$moo-form-focus-ring-width} color-mix(in srgb, #{$moo-form-focus-ring-color} 50%, transparent);
125
72
  }
126
73
 
127
- // Validation input groups are also one visual control. Keep feedback outside the
128
- // grouped control, then paint the destructive ring on the wrapper and suppress
129
- // the child ring.
130
74
  .input-group.has-validation:not(:has(> :is(.valid-feedback, .invalid-feedback, .valid-tooltip, .invalid-tooltip))):has(> :is(.form-control, .form-select).is-invalid),
131
75
  .was-validated .input-group.has-validation:not(:has(> :is(.valid-feedback, .invalid-feedback, .valid-tooltip, .invalid-tooltip))):has(> :is(.form-control, .form-select):invalid) {
132
76
  border-color: var(--bs-form-invalid-border-color);