@wpmoo/ui 1.0.0-rc.3 → 1.0.0-rc.4

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 (82) hide show
  1. package/ASSET_LICENSE.md +3 -1
  2. package/README.md +51 -123
  3. package/certification.json +14 -2
  4. package/dist/assets/css/moo-ui.css +55 -15
  5. package/dist/assets/css/moo-ui.min.css +3 -3
  6. package/dist/assets/css/moo.css +49 -15
  7. package/dist/assets/css/moo.min.css +3 -3
  8. package/dist/js/chart.js +1 -1
  9. package/dist/js/chart.min.js +1 -1
  10. package/dist/js/combobox.js +71 -18
  11. package/dist/js/context-menu.js +1 -1
  12. package/dist/js/datatable.js +1 -1
  13. package/dist/js/datepicker.js +1 -1
  14. package/dist/js/datepicker.min.js +1 -1
  15. package/dist/js/moo-ui.js +18950 -0
  16. package/dist/js/moo-ui.min.js +27 -0
  17. package/dist/js/sidebar.js +1 -1
  18. package/dist/js/slider.js +1 -1
  19. package/package.json +12 -4
  20. package/scss/_components.scss +73 -0
  21. package/scss/_settings.scss +8 -0
  22. package/scss/components/_accordion.scss +59 -0
  23. package/scss/components/_alert.scss +94 -0
  24. package/scss/components/_avatar.scss +154 -0
  25. package/scss/components/_badge.scss +33 -0
  26. package/scss/components/_breadcrumb.scss +130 -0
  27. package/scss/components/_button.scss +228 -0
  28. package/scss/components/_button_group.scss +51 -0
  29. package/scss/components/_card.scss +142 -0
  30. package/scss/components/_checkbox.scss +115 -0
  31. package/scss/components/_close_button.scss +59 -0
  32. package/scss/components/_collapsible.scss +43 -0
  33. package/scss/components/_combobox.scss +258 -0
  34. package/scss/components/_context-menu.scss +28 -0
  35. package/scss/components/_datatable.scss +1082 -0
  36. package/scss/components/_datepicker.scss +236 -0
  37. package/scss/components/_dialog.scss +66 -0
  38. package/scss/components/_dropdown.scss +202 -0
  39. package/scss/components/_field.scss +125 -0
  40. package/scss/components/_input.scss +35 -0
  41. package/scss/components/_input_group.scss +201 -0
  42. package/scss/components/_kbd.scss +10 -0
  43. package/scss/components/_menubar.scss +16 -0
  44. package/scss/components/_navigation.scss +41 -0
  45. package/scss/components/_pagination.scss +70 -0
  46. package/scss/components/_popover.scss +47 -0
  47. package/scss/components/_progress.scss +7 -0
  48. package/scss/components/_radio_group.scss +9 -0
  49. package/scss/components/_select.scss +7 -0
  50. package/scss/components/_separator.scss +15 -0
  51. package/scss/components/_sheet.scss +32 -0
  52. package/scss/components/_sidebar.scss +7 -0
  53. package/scss/components/_skeleton.scss +17 -0
  54. package/scss/components/_slider.scss +214 -0
  55. package/scss/components/_spinner.scss +17 -0
  56. package/scss/components/_switch.scss +25 -0
  57. package/scss/components/_table.scss +7 -0
  58. package/scss/components/_tabs.scss +139 -0
  59. package/scss/components/_textarea.scss +7 -0
  60. package/scss/components/_toast.scss +119 -0
  61. package/scss/components/_toggle_group.scss +19 -0
  62. package/scss/components/_tooltip.scss +83 -0
  63. package/scss/components/sidebar/_collapsed.scss +187 -0
  64. package/scss/components/sidebar/_identity.scss +72 -0
  65. package/scss/components/sidebar/_inset.scss +59 -0
  66. package/scss/components/sidebar/_layout.scss +176 -0
  67. package/scss/components/sidebar/_menus.scss +236 -0
  68. package/scss/foundations/_core_global_primitives.scss +5 -0
  69. package/scss/foundations/_core_state_layer.scss +25 -0
  70. package/scss/foundations/_focus.scss +139 -0
  71. package/scss/foundations/_overlay_backdrop.scss +19 -0
  72. package/scss/moo-core.scss +47 -0
  73. package/scss/moo-ui.scss +50 -0
  74. package/scss/settings/_bootstrap_overrides.scss +11 -0
  75. package/scss/settings/_component_variables.scss +479 -0
  76. package/scss/settings/_forms.scss +65 -0
  77. package/scss/settings/_palette.scss +132 -0
  78. package/scss/themes/_scoped_core.scss +239 -0
  79. package/scss/themes/_standalone_root.scss +117 -0
  80. package/scss/utilities/_scroll_fade.scss +193 -0
  81. package/scss/utilities/_scroll_fade_primitives.scss +43 -0
  82. package/THIRD_PARTY_NOTICES.md +0 -53
@@ -0,0 +1,479 @@
1
+ // Static component geometry belongs on Bootstrap's own Sass knobs. Bootstrap
2
+ // then emits the matching --bs-* consumption variables for each component.
3
+ $nav-link-padding-y: 0.375rem !default;
4
+ $nav-link-padding-x: 0.75rem !default;
5
+ $dropdown-min-width: 8rem !default;
6
+ $dropdown-padding-x: 0.25rem !default;
7
+ $dropdown-padding-y: 0.25rem !default;
8
+ $dropdown-item-padding-y: 0.25rem !default;
9
+ $dropdown-item-padding-x: 0.375rem !default;
10
+ $dropdown-header-padding-x: $dropdown-item-padding-x !default;
11
+ // Bootstrap has no Combobox component. The Basic pass uses Bootstrap's input
12
+ // height and dropdown menu surface, but the reference control widths,
13
+ // item line-height, and secondary-row size have no Bootstrap knob, so they
14
+ // live on component Sass knobs.
15
+ $moo-combobox-width: 12.5rem !default;
16
+ $moo-combobox-multiple-width: $moo-combobox-width * 1.6 !default;
17
+ $moo-combobox-menu-max-height: $input-height * 8 !default;
18
+ $moo-combobox-option-line-height: 1.25rem !default;
19
+ $moo-combobox-description-font-size: 0.75rem !default;
20
+ // Badge, Kbd, and the Pagination icon-square baseline all share the
21
+ // reference's 20px chip primitive (Tailwind h-5); one knob keeps them in
22
+ // sync instead of repeating the literal across three unrelated component
23
+ // files.
24
+ $moo-chip-height: 1.25rem !default;
25
+ // Bootstrap defaults badges to relative em sizing so they scale inside
26
+ // headings/buttons. Moo badges are standalone status chips, and the reference
27
+ // uses a fixed 20px chip with 12px/16px label metrics; keep that geometry on
28
+ // Bootstrap's own badge Sass knobs before the component selector centers it.
29
+ $badge-font-size: 0.75rem !default;
30
+ $badge-font-weight: 500 !default;
31
+ $badge-padding-y: 0.125rem !default;
32
+ $badge-padding-x: 0.5rem !default;
33
+ $badge-border-radius: var(--bs-border-radius-pill) !default;
34
+ $badge-border-color: transparent !default;
35
+ // The reference sizes its kbd chip via a fixed 20px height + flex centering
36
+ // (Tailwind h-5/min-w-5), not padding math, so $kbd-padding-y drops to 0 --
37
+ // components/_kbd.scss sets that fixed height directly. $kbd-padding-x
38
+ // matches the reference's px-1 (4px) horizontal inset.
39
+ $kbd-padding-y: 0 !default;
40
+ $kbd-padding-x: 0.25rem !default;
41
+ $kbd-font-size: 0.75rem !default;
42
+ // var(--bs-secondary-color) on var(--bs-secondary-bg) fails WCAG 2 AA
43
+ // contrast at this font-size (axe measured 4.07:1 light / 4.48:1 dark
44
+ // against the 4.5:1 minimum for normal text), so this keeps the darker
45
+ // text-emphasis token from that fix. The background moved to
46
+ // --moo-muted-surface (the same token .btn-ghost's hover fill uses) to
47
+ // match the reference's borderless filled-chip look instead of Bootstrap's
48
+ // near-white "subtle" background + border combination; computed against
49
+ // --bs-secondary-text-emphasis that's still 5.55:1 light / 14.03:1 dark,
50
+ // comfortably above the 4.5:1 minimum.
51
+ $kbd-color: var(--bs-secondary-text-emphasis) !default;
52
+ $kbd-bg: var(--moo-muted-surface) !default;
53
+ // references/bootstrap/5.3.3/scss/_variables.scss:1739-1740 defines only
54
+ // $code-color/$code-font-size for <code> — no background/padding/radius
55
+ // token, unlike <kbd> which gets $kbd-bg/$kbd-padding-*/$kbd-color at
56
+ // lines 1742-1746 of the same file. Inline code in catalog prose still
57
+ // wants that same "chip" affordance, so this is its own private token
58
+ // pair (reusing the same underlying Bootstrap surface/text custom
59
+ // properties kbd happens to use, not the $kbd-* Sass variables
60
+ // themselves) rather than coupling a semantically different element to
61
+ // <kbd>'s own knobs.
62
+ $moo-code-padding-y: 0.125rem !default;
63
+ $moo-code-padding-x: 0.375rem !default;
64
+ // var(--bs-secondary-color) on this chip's own var(--moo-muted-surface)
65
+ // background measures 4.40:1 in light mode, under the 4.5:1 WCAG AA
66
+ // minimum for normal text — the same defect the Tabs trigger and Kbd
67
+ // contrast fixes hit against this exact background/alias combination
68
+ // (Moo UI's theme sets --bs-secondary-color: var(--moo-muted-foreground),
69
+ // so it resolves to the same failing color; see scss/components/_tabs.scss).
70
+ // var(--bs-secondary-text-emphasis) is the untouched Bootstrap token built
71
+ // for accessible text on a tinted surface, and measures 5.55:1 light /
72
+ // 14.03:1 dark against this same background.
73
+ $moo-code-color: var(--bs-secondary-text-emphasis) !default;
74
+
75
+ // Matches the reference's inline-code background (#f5f5f5) far more
76
+ // closely than any --bs-*-bg step; --moo-muted-surface (#f4f4f5) is
77
+ // effectively the same value.
78
+ $moo-code-bg: var(--moo-muted-surface) !default;
79
+ // The reference breadcrumb uses a chevron divider; Bootstrap's own default is "/".
80
+ $breadcrumb-divider: quote(">") !default;
81
+ $breadcrumb-divider-flipped: quote("<") !default;
82
+ // Shared pressed-state movement for button-like controls. Bootstrap's inset
83
+ // active shadow is disabled in _bootstrap_overrides.scss, so components that
84
+ // present as buttons share this tiny physical press instead.
85
+ $moo-control-active-translate-y: 0.5px !default;
86
+ // The reference pagination items sit separated with no border, ghost-hover, and
87
+ // only the active page gets a bordered box; Bootstrap's default is a fully
88
+ // bordered, edge-to-edge connected strip. A positive margin-start switches
89
+ // Bootstrap's own pagination.scss out of connected-border mode.
90
+ $pagination-margin-start: 0.25rem !default;
91
+ $pagination-padding-y: 0 !default;
92
+ $pagination-padding-x: 0 !default;
93
+ // The icon-square baseline in components/_pagination.scss used to add
94
+ // var(--bs-pagination-padding-y) * 2 to reach the reference's hit target,
95
+ // but $pagination-padding-y is zeroed above so real content padding could
96
+ // move onto explicit content-aware rules instead (see components/
97
+ // _pagination.scss's [aria-label]:has(...) selectors). Bootstrap's own
98
+ // padding-y token no longer carries that space, so this knob preserves the
99
+ // square's total inset independently instead of falling back to a literal.
100
+ $moo-pagination-square-inset: 0.625rem !default;
101
+ $pagination-font-size: 0.875rem !default;
102
+ $pagination-border-radius: var(--bs-border-radius-lg) !default;
103
+ $pagination-color: var(--moo-muted-foreground) !default;
104
+ $pagination-bg: transparent !default;
105
+ $pagination-border-color: transparent !default;
106
+ $pagination-hover-color: var(--bs-body-color) !default;
107
+ $pagination-hover-bg: color-mix(in srgb, var(--moo-muted-surface) 50%, transparent) !default;
108
+ $pagination-hover-border-color: transparent !default;
109
+ $pagination-focus-bg: color-mix(in srgb, var(--moo-muted-surface) 50%, transparent) !default;
110
+ $pagination-active-color: var(--bs-body-color) !default;
111
+ $pagination-active-bg: color-mix(in srgb, var(--moo-muted-surface) 50%, transparent) !default;
112
+ $pagination-active-border-color: var(--moo-border) !default;
113
+ $pagination-disabled-color: var(--moo-disabled-foreground) !default;
114
+ $pagination-disabled-bg: transparent !default;
115
+ $pagination-disabled-border-color: transparent !default;
116
+ // The reference progress track is a slim 4px bar; Bootstrap's default is 1rem.
117
+ $progress-height: 0.25rem !default;
118
+ $progress-bar-color: var(--moo-primary-foreground) !default;
119
+ $progress-bar-bg: var(--moo-primary) !default;
120
+ // Bootstrap's checkbox/radio default is 1em which follows the parent
121
+ // font-size (14px here). The reference uses a fixed 16px (size-4), so
122
+ // pin the width to 1rem to match 1:1 regardless of context font-size.
123
+ $form-check-input-width: 1rem !default;
124
+ // Bootstrap derives this as $form-check-input-width + .5em, but mixing
125
+ // rem and em in Sass arithmetic fails to compile; restate it in rem.
126
+ $form-check-padding-start: 1.5rem !default;
127
+ // The reference switch track is chubbier than Bootstrap's default: 32x18.4px
128
+ // versus Bootstrap's 2em x 1em (a flatter 2:1 shape). $form-switch-width is
129
+ // Bootstrap's own customization point, but there is no matching height
130
+ // variable — .form-switch inherits its height from the same
131
+ // $form-check-input-width Checkbox and Radio Group use, so a dedicated
132
+ // height lives on a private knob instead of resizing every .form-check
133
+ // control. The Switch component partial consumes it directly.
134
+ $form-switch-width: 2rem !default;
135
+ // Bootstrap derives padding-start as $form-switch-width + .5em, but mixing
136
+ // rem and em in Sass arithmetic fails to compile; restate it in rem to
137
+ // keep the same proportional gap Bootstrap's own default uses.
138
+ $form-switch-padding-start: 2.5rem !default;
139
+ $moo-switch-height: 1.15rem !default;
140
+ // Bootstrap's dark unchecked switch thumb is separate from its checked
141
+ // thumb. The checked dark state needs the opposite pair (light track,
142
+ // dark thumb), so the component owns that SVG as its own compile-time knob.
143
+ $moo-switch-checked-bg-image-dark: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3' fill='#{$moo-primary-foreground-dark}'/></svg>") !default;
144
+ // The reference accordion trigger stays fully neutral when expanded (only an
145
+ // underline on hover); Bootstrap's default tints the expanded trigger with
146
+ // $primary-bg-subtle / $primary-text-emphasis. Referencing the resting
147
+ // --bs-accordion-bg/-color custom properties (rather than the Sass
148
+ // variables, which settings.scss loads before Bootstrap defines
149
+ // them) matches the trigger's own resting look so expanding an item
150
+ // changes nothing but the chevron and revealed content.
151
+ $accordion-button-active-bg: var(--bs-accordion-bg) !default;
152
+ $accordion-button-active-color: var(--bs-accordion-color) !default;
153
+ // Bootstrap's pills nav has no shared-track concept, so the segmented
154
+ // control's track padding/gap and trigger padding have no Bootstrap
155
+ // variable to override — they are private knobs instead of literals in
156
+ // the component partial. Values match the reference's 3px track padding,
157
+ // 2px item gap, and 2px/12px trigger padding.
158
+ $moo-tabs-list-padding: 0.1875rem !default;
159
+ $moo-tabs-list-gap: 0.125rem !default;
160
+ $moo-tabs-content-gap: 0.75rem !default;
161
+ $moo-tabs-trigger-padding-y: 0.125rem !default;
162
+ $moo-tabs-trigger-padding-x: 0.75rem !default;
163
+
164
+ // Bootstrap's own spacer scale has no 2px/3px step, so the Menubar row's
165
+ // tight track padding/gap around its triggers (verified against the live
166
+ // reference) are private knobs rather than a "gap-1"/"p-1" utility.
167
+ $moo-menubar-gap: 0.125rem !default;
168
+ $moo-menubar-padding: 0.1875rem !default;
169
+ $card-spacer-y: 0 !default;
170
+ $card-spacer-x: 1.5rem !default;
171
+ $card-cap-padding-y: $card-spacer-y !default;
172
+ $card-cap-padding-x: $card-spacer-x !default;
173
+ $card-title-font-size: 1rem !default;
174
+ $card-title-letter-spacing: -0.01em !default;
175
+ // The reference card exposes one --moo-card-spacing rhythm for section gaps
176
+ // and the inline inset of header/body/footer, defaulting to the 16px step of
177
+ // Bootstrap's own spacer scale; the size="sm" variant drops to 12px. This is
178
+ // a private consumption token because Bootstrap's card has no single
179
+ // variable that covers both the vertical section gap and the horizontal
180
+ // inset of every part. Literal values, not $spacer math: this file compiles
181
+ // before Bootstrap's own variables (including $spacer) are defined.
182
+ $moo-card-spacing: 1rem !default;
183
+ $moo-card-spacing-sm: 0.75rem !default;
184
+
185
+ // Card surface and border blends: mix the muted surface over the base surface
186
+ // (and foreground over a transparent base) so cards keep a subtle tint that
187
+ // tracks the runtime theme without hardcoding a color.
188
+ $moo-card-bg-mix: 5% !default;
189
+ $moo-card-bg-mix-dark: 30% !default;
190
+ $moo-card-border-mix: 10% !default;
191
+ $moo-card-border-mix-base: transparent !default;
192
+
193
+ // Bootstrap exposes one card-cap background for both headers and footers, but
194
+ // the reference needs no header fill and a separately tuned footer surface.
195
+ // Keep that scoped gap on Moo card knobs, derived from runtime surface tokens
196
+ // so theme changes still flow through Bootstrap's card variables.
197
+ $moo-card-footer-bg: color-mix(in srgb, var(--bs-secondary-bg) 20%, var(--bs-body-bg)) !default;
198
+ $moo-card-footer-bg-dark: color-mix(in srgb, var(--bs-secondary-bg) 50%, var(--bs-body-bg)) !default;
199
+
200
+ // Bootstrap's own $table-th-font-weight defaults to null, leaving <th>
201
+ // at the browser's bold UA default; the reference renders both header
202
+ // cells and the emphasized first body column (a <th scope="row">) at a
203
+ // medium weight instead, verified against the live reference. Restated
204
+ // as a literal rather than referencing Bootstrap's own
205
+ // $font-weight-medium (500), since this file compiles before
206
+ // Bootstrap's own variables exist.
207
+ $table-th-font-weight: 500 !default;
208
+
209
+ // Bootstrap has no native avatar component. Keep unmatched static values as
210
+ // compile-time Sass knobs; exact shared typography reuses Bootstrap variables.
211
+ $avatar-size: 2rem !default;
212
+ $avatar-size-sm: $avatar-size * 0.75 !default;
213
+ $avatar-size-lg: $avatar-size * 1.25 !default;
214
+ $avatar-font-size-sm: 0.75rem !default;
215
+ $avatar-font-size-lg: 1rem !default;
216
+ $avatar-line-height: 1 !default;
217
+ // Verified against the live reference: a 32px avatar group overlaps by 8px
218
+ // and a plain AvatarBadge renders a 10px mark with a 2px page-background
219
+ // ring painted outside the mark.
220
+ $avatar-group-overlap: -0.5rem !default;
221
+ $avatar-badge-dot-size: 0.625rem !default;
222
+ $avatar-badge-icon-size: $avatar-badge-dot-size !default;
223
+ $avatar-badge-icon-glyph-size: 0.5rem !default;
224
+ $avatar-badge-ring-width: 2px !default;
225
+ $avatar-group-ring-width: 2px !default;
226
+ $avatar-badge-ring-shadow: 0 0 0 $avatar-badge-ring-width var(--bs-body-bg) !default;
227
+ $avatar-group-ring-shadow: 0 0 0 $avatar-group-ring-width var(--bs-body-bg) !default;
228
+ // Bootstrap's tooltip plugin has no motion-timing tokens (its own source
229
+ // hardcodes the transition in tooltip.scss); the reference's subtle
230
+ // zoom/slide open is scoped to Moo's tooltip surface, so the four motion
231
+ // steps are private component knobs rather than global Bootstrap values.
232
+ $moo-tooltip-motion-duration: 150ms !default;
233
+ $moo-tooltip-motion-easing: cubic-bezier(0.16, 1, 0.3, 1) !default;
234
+ $moo-tooltip-motion-scale: 0.95 !default;
235
+ $moo-tooltip-motion-translate: 0.25rem !default;
236
+
237
+ $btn-font-weight: 500 !default;
238
+ $btn-font-size: 0.875rem !default;
239
+ $btn-line-height: 1.25rem !default;
240
+ $btn-focus-width: 0.2rem !default;
241
+ $moo-spinner-animation-name: spinner-border !default;
242
+
243
+ // Size-scale fonts flow through Bootstrap's own variables so the
244
+ // .btn-group-sm/-lg extend chains inherit them without re-declaration.
245
+ $btn-font-size-sm: 0.8rem !default;
246
+ $btn-font-size-lg: 0.875rem !default;
247
+
248
+ // Button heights emerge from Bootstrap's own padding and line-height scale:
249
+ // 32px default, 28px small, and 36px large. The custom xs class follows the
250
+ // same box model in the component layer.
251
+ $btn-padding-y: 0.3125rem !default;
252
+ $btn-padding-x: 0.625rem !default;
253
+ $btn-padding-y-sm: 0.3125rem !default;
254
+ $btn-padding-x-sm: 0.625rem !default;
255
+ $btn-padding-y-lg: 0.4375rem !default;
256
+ $btn-padding-x-lg: 0.625rem !default;
257
+ // Icon-only buttons are squares whose side equals the token-driven button
258
+ // height (line-height + 2*padding-y + 2*border), matching sibling text
259
+ // buttons. Bootstrap exposes no single icon-button size knob; the side is a
260
+ // runtime calc over the --bs-btn-* consumption variables so size variants
261
+ // (xs/sm/lg) resolve their own box, backed here by a private Sass knob.
262
+ $moo-btn-icon-size: calc(
263
+ var(--bs-btn-line-height) +
264
+ var(--bs-btn-padding-y) * 2 +
265
+ var(--bs-btn-border-width) * 2
266
+ ) !default;
267
+
268
+ // Bootstrap's close button already exposes Sass knobs for its content-box icon
269
+ // and padding. Keep the native glyph slightly lighter than Bootstrap's default
270
+ // while the padding preserves the 24px reference hit target.
271
+ $btn-close-width: 0.75rem !default;
272
+ $btn-close-height: $btn-close-width !default;
273
+ $btn-close-padding-x: 0.34375rem !default;
274
+ $btn-close-padding-y: $btn-close-padding-x !default;
275
+ $btn-close-opacity: 1 !default;
276
+ $btn-close-hover-opacity: $btn-close-opacity !default;
277
+ $btn-close-focus-opacity: $btn-close-opacity !default;
278
+ $btn-close-disabled-opacity: $moo-disabled-control-opacity !default;
279
+ $moo-close-button-border-color: transparent !default;
280
+ // Bootstrap's close button ships a filled-path X glyph; the reference uses a
281
+ // thinner Lucide-style stroke icon instead. .btn-close::before consumes this
282
+ // through mask + currentColor (scss/components/_close_button.scss), so only
283
+ // the SVG's alpha shape ever paints -- the stroke color itself never
284
+ // renders -- but the design gate still requires every component custom
285
+ // property to trace to a token source, so bind it through $black the same
286
+ // way the switch's dark bg-image binds through $moo-primary-foreground-dark.
287
+ $moo-close-button-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='#{$black}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M18 6 6 18'/><path d='m6 6 12 12'/></svg>") !default;
288
+
289
+ // Shared focus primitive: a thin 2px ring. Components consume
290
+ // --bs-focus-ring-width; only the ring color is a runtime theme token.
291
+ $focus-ring-width: 2px !default;
292
+
293
+ // The reference's own form-control focus ring is 3px, one size up from the
294
+ // 2px ring the rest of the system uses on buttons/links/custom surfaces.
295
+ // Input, Textarea, Select, Checkbox, Radio, and Switch all share this wider
296
+ // ring so the reference's exact focus recipe carries over unmodified.
297
+ $moo-form-focus-ring-width: 3px !default;
298
+ // Same --moo-ring value the width above pairs with, aliased under a name
299
+ // the shared-primitive design gate recognizes as a color reference (see
300
+ // approved_shared_value's shadow-token check in tests/test_design_gates.py).
301
+ $moo-form-focus-ring-color: var(--moo-ring) !default;
302
+
303
+ // Shared overlay primitive for Bootstrap's native Modal and Offcanvas
304
+ // backdrops. Bootstrap exposes separate .modal-backdrop and
305
+ // .offcanvas-backdrop selectors; Moo keeps their visual treatment aligned via
306
+ // one token set instead of per-component backdrop rules.
307
+ $moo-overlay-backdrop-opacity: 1 !default;
308
+ $moo-overlay-backdrop-bg: color-mix(in srgb, var(--bs-black) 10%, transparent) !default;
309
+ $moo-overlay-backdrop-filter: blur(8px) !default;
310
+
311
+ // A quieter elevation scale and the extra radius step, applied UI-wide through
312
+ // Bootstrap's own scales so every component consumes one shared primitive.
313
+ $box-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !default;
314
+ $box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1) !default;
315
+ $box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1) !default;
316
+
317
+ $border-radius-xl: 0.75rem !default;
318
+
319
+ // Bootstrap has no sidebar primitive, so the app-shell geometry lives on
320
+ // dedicated Sass knobs. The Sidebar component surfaces these as
321
+ // --moo-sidebar-width / --moo-sidebar-width-icon consumption variables.
322
+ $moo-sidebar-width: 16rem !default;
323
+ $moo-sidebar-width-icon: 3rem !default;
324
+
325
+ // Bootstrap's dropdown-item has no bordered icon-container concept, so the
326
+ // Team Switcher-style icon box geometry lives on a dedicated Sass knob.
327
+ // Border color/radius still ride Bootstrap consumption values.
328
+ $moo-dropdown-item-icon-size: 1.5rem !default;
329
+
330
+ // The Sidebar header/footer dropdown menus (team switcher, account menu)
331
+ // intentionally overflow past the sidebar edge into the content column,
332
+ // matching the design reference's min-w-56. Bootstrap's shared
333
+ // $dropdown-min-width stays the default for every other dropdown in the
334
+ // product; this is a sidebar-scoped floor, not a global change.
335
+ $moo-dropdown-sidebar-min-width: 14rem !default;
336
+
337
+ // Bootstrap has no --bs-form-check-input-border-radius custom property to
338
+ // consume at runtime (only the compile-time $form-check-input-border-radius
339
+ // Sass default, which this settings layer loads before Bootstrap defines),
340
+ // so the checkbox-style menu-item indicator shared by Dropdown, Menubar,
341
+ // Context Menu, and Data Table needs its own scoped knob to reuse
342
+ // Checkbox's exact corner radius. Restated as .25em to match Bootstrap's
343
+ // own $form-check-input-border-radius default.
344
+ $moo-dropdown-item-check-border-radius: .25em !default;
345
+
346
+ // Field has no matching Bootstrap component of its own, so its spacing
347
+ // scale and legend sizing live on dedicated Sass knobs instead of
348
+ // per-instance utility classes. Changing spacing/type for every Field
349
+ // usage means changing the token here; a specific form that needs a
350
+ // one-off deviation reaches for Bootstrap's own utility classes (gap-3,
351
+ // mb-4, ...) instead, the same way plain Bootstrap forms already do.
352
+ // Literal values, not $spacer math: this file compiles before Bootstrap's
353
+ // own variables (including $spacer) are defined.
354
+ // - field-gap: inside one field (label / control / description / error)
355
+ // - field-form-gap: between direct children in a composed form
356
+ // - field-group-gap: between sibling fields, fieldsets, and separators
357
+ // inside a field_group()
358
+ // - field-fieldset-gap: between a fieldset's direct building blocks
359
+ // (its legend/description header, field groups, lone fields)
360
+ // - field-fieldset-sibling-gap: between consecutive fieldsets in one form
361
+ $moo-field-gap: 0.5rem !default;
362
+ $moo-field-group-gap: 1.25rem !default;
363
+ $moo-field-switch-gap: $moo-field-group-gap !default;
364
+ $moo-field-form-gap: $moo-field-group-gap !default;
365
+ $moo-field-fieldset-gap: 1rem !default;
366
+ $moo-field-fieldset-sibling-gap: $moo-field-group-gap !default;
367
+ $moo-field-legend-font-size: 1rem !default;
368
+ $moo-field-legend-margin-bottom: 0.375rem !default;
369
+ $moo-field-separator-opacity: 0.1 !default;
370
+
371
+ // Datepicker is a Moo-owned reference-style composition around Bootstrap button
372
+ // primitives; Bootstrap ships no datepicker core component, so trigger/popover
373
+ // geometry is Moo-owned.
374
+ $moo-datepicker-width: 17.5rem !default;
375
+ $moo-datepicker-popover-offset: 0.375rem !default;
376
+
377
+ // The calendar grid geometry (day size, gap, padding, preset spacing, day
378
+ // radii, focus ring) is also Moo-owned: Bootstrap has no calendar primitive
379
+ // that could carry these values, so each is exposed as a !default knob.
380
+ $moo-datepicker-day-size: 2rem !default;
381
+ $moo-datepicker-gap: 0.25rem !default;
382
+ $moo-datepicker-padding: 0.75rem !default;
383
+ $moo-datepicker-preset-gap: 0.375rem !default;
384
+ $moo-datepicker-day-border-radius: var(--bs-border-radius-sm) !default;
385
+ $moo-datepicker-day-range-joined-border-radius: 0 !default;
386
+ $moo-datepicker-day-focus-ring-shadow: 0 0 0 #{$moo-form-focus-ring-width} color-mix(in srgb, #{$moo-form-focus-ring-color} 50%, transparent) !default;
387
+
388
+ // Bootstrap has no floating/overlay toolbar primitive, so the Data Table
389
+ // bulk-actions bar's hover affordance (the whole bar scaling up slightly,
390
+ // not a per-button state) has no Bootstrap knob to consume. Exposed as a
391
+ // scoped, consumer-overridable knob: set to 1 to turn the effect off, or
392
+ // raise it for a more pronounced zoom.
393
+ $moo-datatable-bulk-actions-hover-scale: 1.02 !default;
394
+ // The selection bulk-actions bar is a fixed-position overlay surface; its
395
+ // backdrop blur strength has no Bootstrap equivalent to consume.
396
+ $moo-datatable-bulk-actions-backdrop-blur: 8px !default;
397
+
398
+ // Fixed shell footers need to lift the floating selection bar above their
399
+ // chrome. Keep the default component position unchanged while giving host
400
+ // surfaces a scoped override hook.
401
+ $moo-datatable-bulk-actions-bottom: 1rem !default;
402
+ // Bootstrap has no Data Table layout/card primitive, so these scoped knobs
403
+ // describe the generated table/card frames without becoming global widths.
404
+ $moo-datatable-min-width: 48rem !default;
405
+ $moo-datatable-release-review-min-width: 64rem !default;
406
+ $moo-datatable-card-min-width: 20rem !default;
407
+ $moo-datatable-card-label-width: 7rem !default;
408
+ // Sticky row-action cells need just enough opaque surface for the trigger;
409
+ // this fade prevents the pinned cell from reading as a dominant blank column.
410
+ $moo-datatable-actions-cell-fade-width: 1.25rem !default;
411
+ // Bootstrap has no Data Table frame-header or layout-toggle row primitive, so
412
+ // these scoped knobs align Moo's table/card header controls to Bootstrap inputs.
413
+ $moo-datatable-frame-header-min-height: 2.78125rem !default;
414
+ // Bootstrap's checkbox width variable is not available while Moo settings
415
+ // are aggregated, so keep Data Table's select inset derived from Moo's compact
416
+ // checkbox box and Bootstrap's default 1px frame border. Now matches the
417
+ // global $form-check-input-width (1rem / 16px) set above.
418
+ $moo-datatable-select-checkbox-size: 1rem !default;
419
+ // Bootstrap has no --bs-form-check-input-border-radius custom property to
420
+ // consume here either, same gap as the checkbox size above, this time for
421
+ // the facet dropdown's own checkbox-style indicator (datatable_facet_item(),
422
+ // which can't reuse the shared .dropdown-item-check__indicator markup).
423
+ // Scoped to Data Table since it can't reference Dropdown's private knob
424
+ // across files; restated as .25em to match Bootstrap's own
425
+ // $form-check-input-border-radius default so the facet dropdown reads as
426
+ // the same control as the shared indicator and the real Checkbox.
427
+ $moo-datatable-facet-item-border-radius: .25em !default;
428
+ // Keep the select-all checkbox inset visually even with the table/card header's
429
+ // vertical breathing while accounting for the framed wrapper border.
430
+ $moo-datatable-select-cell-inset: ($moo-datatable-frame-header-min-height - $moo-datatable-select-checkbox-size) * 0.5 - 0.0625rem !default;
431
+ // Bootstrap has no knob for reconciling a native table-cell checkbox baseline
432
+ // with a flex-aligned card header checkbox, so this scoped 0.75px nudge keeps
433
+ // their visual boxes on the same y-axis when switching between list/card view.
434
+ $moo-datatable-table-select-all-offset-y: 0.046875rem !default;
435
+ $moo-datatable-toolbar-control-height: calc(#{$input-height} + var(--bs-border-width) * 2) !default;
436
+ $moo-datatable-icon-label-gap: 0.5rem !default;
437
+ // Bootstrap dropdowns have no scoped Data Table filter-picker width token; the
438
+ // compact root list and longer option drill-down each need their own knob.
439
+ $moo-datatable-search-filter-menu-width: 12.5rem !default;
440
+ $moo-datatable-search-filter-options-menu-width: 17rem !default;
441
+ $moo-datatable-facet-menu-min-width: 12.5rem !default;
442
+ $moo-datatable-facet-trigger-font-size: $btn-font-size-sm !default;
443
+ $moo-datatable-facet-trigger-min-height: 2rem !default;
444
+ // A viewport-relative cap (100vh - offset) assumes the menu opens near the
445
+ // top of the screen; Popper can anchor it much lower, letting it overflow
446
+ // the viewport anyway. A fixed cap sized to a row count -- the same
447
+ // rows-per-screen convention Combobox's own long menu already uses -- stays
448
+ // correct regardless of where the trigger sits on the page, and keeps a
449
+ // long option list (e.g. every row owner) from crowding the whole screen.
450
+ // Shared by both the inline facet dropdown and the filter-picker's
451
+ // drill-down option list, so the two present the same row count.
452
+ $moo-datatable-facet-item-height: 2rem !default;
453
+ $moo-datatable-facet-options-max-height: $moo-datatable-facet-item-height * 10 !default;
454
+ // Bootstrap has no thin scrollbar utility. Keep the primitive shared and let
455
+ // Data Table inherit it unless a consumer needs a component-specific override.
456
+ $moo-scrollbar-thin-size: 0.375rem !default;
457
+ $moo-datatable-scrollbar-size: $moo-scrollbar-thin-size !default;
458
+ $moo-datatable-page-size-trigger-min-width: 3.25rem !default;
459
+ $moo-datatable-page-size-menu-min-width: 4rem !default;
460
+ // Catalog preview chrome: maximum width of the full-bleed release-review
461
+ // preview pages that host the Data Table block.
462
+ $moo-datatable-preview-shell-max-width: 82rem !default;
463
+
464
+ // Bootstrap Toast has no deck gap, peek, scale-step, or slide-in timing knobs.
465
+ // Keep the stacked catalog presentation on scoped Sass settings so the runtime
466
+ // can consume the same values through the Toast container.
467
+ $moo-toast-status-icon-size: 1rem !default;
468
+ $moo-toast-status-icon-gap: .5rem !default;
469
+ // Bootstrap Toast has no deck gap, peek, scale-step, or slide-in timing knobs.
470
+ // Keep the indexed deck presentation on Bootstrap-scoped Sass settings so the
471
+ // runtime can consume the same values through the Toast container.
472
+ $moo-toast-stack-gap: .75rem !default;
473
+ $moo-toast-stack-peek: .75rem !default;
474
+ $moo-toast-stack-scale-step: .1 !default;
475
+ $moo-toast-stack-min-scale: .5 !default;
476
+ $moo-toast-stack-enter-y: 150% !default;
477
+ $moo-toast-stack-transition-duration: .5s !default;
478
+ $moo-toast-stack-height-transition-duration: .15s !default;
479
+ $moo-toast-stack-transition-timing-function: cubic-bezier(.22, 1, .36, 1) !default;
@@ -0,0 +1,65 @@
1
+ // Bootstrap's form-control consumes these values directly. Keep the native
2
+ // Sass contract, but give text controls the same quiet surface and compact
3
+ // geometry as the design reference.
4
+ $input-padding-y: 0.25rem !default;
5
+ $input-padding-x: 0.625rem !default;
6
+ $input-height: 2rem !default;
7
+ $input-line-height: 1.4285714286 !default;
8
+ $input-bg: var(--moo-input-bg, transparent) !default;
9
+ $input-border-color: var(--moo-border) !default;
10
+ $input-border-radius: 0.625rem !default;
11
+ $input-placeholder-color: var(--bs-tertiary-color) !default;
12
+ $input-focus-bg: var(--moo-input-bg, transparent) !default;
13
+ // Bootstrap leaves disabled text-control foregrounds null by default
14
+ // (vendor/bootstrap/scss/_variables.scss), which lets real values inherit the
15
+ // normal input color. Use Moo's disabled foreground token so disabled values
16
+ // stay quieter than ordinary secondary text across form-control and form-select.
17
+ $input-disabled-color: var(--moo-disabled-foreground) !default;
18
+ $form-select-disabled-color: $input-disabled-color !default;
19
+ // Disabled controls need the whole affordance to fade, including native select
20
+ // arrows and Moo-owned trailing icons, so opacity is a shared state token.
21
+ $moo-disabled-control-opacity: 0.5 !default;
22
+ // Bootstrap's own $input-disabled-bg defaults to the opaque $secondary-bg
23
+ // (vendor/bootstrap/scss/_variables.scss), which reads much darker/heavier
24
+ // than the disabled reference: a faint translucent tint over the input
25
+ // border color, not a solid fill. Bootstrap exposes no subtler disabled
26
+ // surface token, so this stays on the existing $input-border-color knob at
27
+ // low opacity instead of a new private --moo-* token.
28
+ $input-disabled-bg: color-mix(in srgb, var(--moo-border) 40%, transparent) !default;
29
+ // Bootstrap's own $form-file-button-hover-bg defaults to --bs-secondary-bg,
30
+ // which is nearly identical to $form-file-button-bg (--bs-tertiary-bg) in
31
+ // both themes, so hovering the file input's button gives almost no visible
32
+ // feedback. Point the hover state at the existing border token instead of
33
+ // introducing a new one; it stays distinct from the button's resting bg in
34
+ // both light and dark theme blocks (vendor/bootstrap/scss/forms/_form-control.scss).
35
+ $form-file-button-hover-bg: var(--moo-border) !default;
36
+ $form-text-margin-top: 0.5rem !default;
37
+ $form-check-input-focus-border: var(--moo-border) !default;
38
+ // Native checkbox/radio/switch controls have a very small focus target. Keep
39
+ // Bootstrap's form-check glow contract, but make the visible keyboard ring
40
+ // strong enough to clear the 3:1 focus-indicator contrast target on white and
41
+ // dark surfaces.
42
+ $form-check-input-focus-box-shadow: 0 0 0 var(--bs-focus-ring-width) color-mix(in srgb, var(--moo-ring) 50%, transparent) !default;
43
+ // Bootstrap's native checked/range controls consume Sass variables rather
44
+ // than component CSS variables. Point those Sass defaults at Moo's runtime
45
+ // primary token so Theme color previews update checkboxes, radios, switches,
46
+ // and range thumbs without replacing Bootstrap's markup contract.
47
+ $form-check-input-checked-bg-color: var(--moo-primary) !default;
48
+ $form-check-input-checked-border-color: var(--moo-primary) !default;
49
+ $form-check-input-indeterminate-bg-color: var(--moo-primary) !default;
50
+ $form-check-input-indeterminate-border-color: var(--moo-primary) !default;
51
+ $moo-form-checkmark-border-width: 0 0.14em 0.14em 0 !default;
52
+ $moo-form-check-indeterminate-bg-size: 62% 14% !default;
53
+ $moo-form-check-indeterminate-bg-position: center !default;
54
+ $form-range-thumb-bg: var(--moo-primary) !default;
55
+ $form-range-thumb-active-bg: color-mix(in srgb, var(--moo-primary) 85%, var(--moo-surface)) !default;
56
+ // Moo promotes Bootstrap input groups from separate child borders to one
57
+ // compound border. Bootstrap has no parent input-group radius knob, so the
58
+ // default parent radius lives here while .rounded-pill can still opt into
59
+ // Bootstrap's native pill radius utility.
60
+ $moo-input-group-border-radius: var(--bs-border-radius-lg) !default;
61
+ // Input group addons (text, buttons) share the exact input surface so the
62
+ // whole group reads as one compound control, not a row of mismatched tiles.
63
+ // Bootstrap defaults addons to --bs-tertiary-bg; Moo ties them to $input-bg
64
+ // so light-mode transparent inputs and dark-mode --moo-input-bg stay aligned.
65
+ $input-group-addon-bg: $input-bg !default;