@unabridged/midwest 0.23.3 → 0.24.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.
- package/app/assets/javascript/midwest/index.ts +4 -0
- package/app/assets/javascript/midwest.js +576 -8
- package/app/assets/javascript/midwest.js.map +1 -1
- package/app/assets/stylesheets/midwest/dark-mode.css +51 -1
- package/app/assets/stylesheets/midwest/form-group.css +5 -5
- package/app/assets/stylesheets/midwest/tailwind.css +101 -6
- package/app/assets/stylesheets/midwest/tokens.css +108 -0
- package/app/assets/stylesheets/midwest/utilities.css +20 -20
- package/app/assets/stylesheets/midwest.css +2 -2
- package/app/assets/stylesheets/midwest.tailwind.css +24 -1
- package/config/tailwind.theme.css +59 -0
- package/config/tailwind.theme.js +6 -2
- package/dist/css/midwest.css +2 -2
- package/dist/javascript/collection/app/assets/javascript/midwest/index.js +4 -0
- package/dist/javascript/collection/app/assets/javascript/midwest/index.js.map +1 -1
- package/dist/javascript/collection/app/components/midwest/command_palette_component/command_palette_component_controller.js +66 -8
- package/dist/javascript/collection/app/components/midwest/command_palette_component/command_palette_component_controller.js.map +1 -1
- package/dist/javascript/collection/app/components/midwest/panorama_component/panorama_component_controller.js +296 -0
- package/dist/javascript/collection/app/components/midwest/panorama_component/panorama_component_controller.js.map +1 -0
- package/dist/javascript/collection/app/components/midwest/playlist_component/playlist_component_controller.js +220 -0
- package/dist/javascript/collection/app/components/midwest/playlist_component/playlist_component_controller.js.map +1 -0
- package/dist/javascript/midwest.js +576 -8
- package/dist/javascript/midwest.js.map +1 -1
- package/package.json +6 -6
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
html.dark {
|
|
7
|
-
@apply bg-gray-12 text-gray-2
|
|
7
|
+
@apply bg-gray-12! text-gray-2!;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
h1, h2, h3, h4, h5, h6, label, p {
|
|
@@ -14,4 +14,54 @@
|
|
|
14
14
|
p {
|
|
15
15
|
@apply text-gray-10 dark:text-gray-2;
|
|
16
16
|
}
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
* Bare-element palette — light/dark defaults for common HTML elements that
|
|
20
|
+
* no component owns. Every selector is scoped with :not([class]) so a Midwest
|
|
21
|
+
* component (which always carries a class) is never affected; this only
|
|
22
|
+
* reaches raw markup, e.g. content inside a prose region.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/* Text selection highlight */
|
|
26
|
+
::selection {
|
|
27
|
+
@apply bg-theme-2 text-theme-12;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.dark ::selection {
|
|
31
|
+
@apply bg-theme-8 text-theme-0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Horizontal rule / divider */
|
|
35
|
+
hr:not([class]) {
|
|
36
|
+
@apply border-0 border-t border-gray-2 dark:border-gray-9;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Bare links */
|
|
40
|
+
a:not([class]) {
|
|
41
|
+
@apply text-theme-7 dark:text-theme-4 underline underline-offset-2;
|
|
42
|
+
|
|
43
|
+
&:hover { @apply text-theme-8 dark:text-theme-3; }
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Inline code and keyboard keys */
|
|
47
|
+
code:not([class]),
|
|
48
|
+
kbd:not([class]) {
|
|
49
|
+
@apply rounded px-1 py-0.5 text-[0.9em] bg-gray-1 text-gray-11 dark:bg-gray-10 dark:text-gray-2;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Blockquote */
|
|
53
|
+
blockquote:not([class]) {
|
|
54
|
+
@apply border-l-4 border-gray-2 dark:border-gray-9 pl-4 text-gray-9 dark:text-gray-3;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Bare tables */
|
|
58
|
+
table:not([class]) {
|
|
59
|
+
:is(th, td) {
|
|
60
|
+
@apply border-b border-gray-2 dark:border-gray-9;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
thead th {
|
|
64
|
+
@apply text-gray-11 dark:text-gray-1;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
17
67
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
@layer midwest.form-group {
|
|
1
|
+
@layer midwest.components.form-group {
|
|
2
2
|
.midwest-form-group {
|
|
3
3
|
@apply flex flex-col;
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
.midwest-form-group__top, .midwest-form-group__bottom {
|
|
6
6
|
@apply flex w-full justify-between gap-1 flex-wrap;
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
|
|
9
|
+
.midwest-form-group__top {
|
|
10
10
|
@apply mb-1;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
.midwest-form-group__bottom {
|
|
14
14
|
@apply mt-1;
|
|
15
15
|
|
|
16
16
|
&[hidden] {
|
|
@@ -1,7 +1,102 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Tailwind CSS v4 engine setup for Midwest.
|
|
3
|
+
*
|
|
4
|
+
* Replaces the old JS `tailwind.config.js` (v4 is CSS-first). The standalone
|
|
5
|
+
* tailwindcss-ruby binary bundles the first-party plugins, so `@plugin` needs
|
|
6
|
+
* no npm dependency. Colours are declared in `@theme` (required — v4's `@apply`
|
|
7
|
+
* is strict and errors on undeclared utilities); their values reference the
|
|
8
|
+
* `--*-channels` custom properties from color-system.css, so runtime theming
|
|
9
|
+
* (`.theme-green`, opacity modifiers) keeps working.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/* Tailwind's own layers, imported granularly so the `midwest` cascade layer can
|
|
13
|
+
be slotted between `components` and `utilities` (see midwest.tailwind.css). */
|
|
14
|
+
@import "tailwindcss/theme.css" layer(midwest.tailwindcss.theme);
|
|
15
|
+
|
|
16
|
+
/* Preflight goes into the plain `base` layer — the SAME one the `@plugin`
|
|
17
|
+
directives (forms/typography) emit their addBase into. This keeps the
|
|
18
|
+
canonical v4 order WITHIN base (preflight first, then the plugins' resets),
|
|
19
|
+
and lets the whole `base` layer be ordered ahead of Midwest's component
|
|
20
|
+
layers in midwest.tailwind.css. If preflight lived in a `midwest.*` sublayer
|
|
21
|
+
it couldn't be interleaved between the plugins' `base` and the midwest
|
|
22
|
+
component layers (a nested layer is anchored as one block), which is what
|
|
23
|
+
broke checkbox :checked fills / input border-radius. */
|
|
24
|
+
@import "tailwindcss/preflight.css" layer(base);
|
|
25
|
+
@import "tailwindcss/utilities.css" layer(midwest.tailwindcss.utilities);
|
|
26
|
+
|
|
27
|
+
/* First-party plugins are embedded in the standalone binary — no node_modules. */
|
|
28
|
+
@plugin "@tailwindcss/forms";
|
|
29
|
+
@plugin "@tailwindcss/typography";
|
|
4
30
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
31
|
+
/* Class-based dark mode (was `darkMode: "class"`), matching `.dark` on <html>. */
|
|
32
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
33
|
+
|
|
34
|
+
/* Content sources (was the JS `content` array). Paths are relative to this file. */
|
|
35
|
+
@source "../../components/**/*.{rb,erb,haml}";
|
|
36
|
+
@source "../../helpers/**/*.rb";
|
|
37
|
+
@source "../../views/**/*.{erb,haml}";
|
|
38
|
+
@source "../../javascript/**/*.js";
|
|
39
|
+
@source "../../**/*.svg";
|
|
40
|
+
@source "../../../demo/app/previews/**/*.{rb,erb,haml}";
|
|
41
|
+
@source "../../../demo/app/views/**/*.haml";
|
|
42
|
+
|
|
43
|
+
/* Colour utilities generated in ERB loops (e.g. `13.times`) are invisible to the
|
|
44
|
+
content scanner. This replaces the JS `safelist` regex. */
|
|
45
|
+
@source inline("{bg,text,border,ring,outline}-{theme,complement,gray}-{0,1,2,3,4,5,6,7,8,9,10,11,12}");
|
|
46
|
+
|
|
47
|
+
/* Restrict the palette to Midwest's colours (was `theme.colors`, which replaced
|
|
48
|
+
the default palette). `--color-*: initial` clears Tailwind's defaults first.
|
|
49
|
+
`inline` is ESSENTIAL: it inlines each colour's value into the generated
|
|
50
|
+
utilities (e.g. `.bg-theme-6 { background: rgb(var(--theme-6-channels)) }`)
|
|
51
|
+
so the channel var resolves at the *consuming element*. Without it v4 would
|
|
52
|
+
resolve the channels once at :root, breaking element/section-scoped theming
|
|
53
|
+
like `<section class="theme-teal">` or a presence dot's `theme-green`. */
|
|
54
|
+
@theme inline {
|
|
55
|
+
/* stylelint-disable-next-line custom-property-pattern -- v4 namespace reset */
|
|
56
|
+
--color-*: initial;
|
|
57
|
+
--font-sans: "Inter var", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
|
|
58
|
+
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
59
|
+
--color-transparent: transparent;
|
|
60
|
+
--color-current: currentcolor;
|
|
61
|
+
--color-black: #000;
|
|
62
|
+
--color-white: #fff;
|
|
63
|
+
--color-theme-0: rgb(var(--theme-0-channels));
|
|
64
|
+
--color-theme-1: rgb(var(--theme-1-channels));
|
|
65
|
+
--color-theme-2: rgb(var(--theme-2-channels));
|
|
66
|
+
--color-theme-3: rgb(var(--theme-3-channels));
|
|
67
|
+
--color-theme-4: rgb(var(--theme-4-channels));
|
|
68
|
+
--color-theme-5: rgb(var(--theme-5-channels));
|
|
69
|
+
--color-theme-6: rgb(var(--theme-6-channels));
|
|
70
|
+
--color-theme-7: rgb(var(--theme-7-channels));
|
|
71
|
+
--color-theme-8: rgb(var(--theme-8-channels));
|
|
72
|
+
--color-theme-9: rgb(var(--theme-9-channels));
|
|
73
|
+
--color-theme-10: rgb(var(--theme-10-channels));
|
|
74
|
+
--color-theme-11: rgb(var(--theme-11-channels));
|
|
75
|
+
--color-theme-12: rgb(var(--theme-12-channels));
|
|
76
|
+
--color-complement-0: rgb(var(--complement-0-channels));
|
|
77
|
+
--color-complement-1: rgb(var(--complement-1-channels));
|
|
78
|
+
--color-complement-2: rgb(var(--complement-2-channels));
|
|
79
|
+
--color-complement-3: rgb(var(--complement-3-channels));
|
|
80
|
+
--color-complement-4: rgb(var(--complement-4-channels));
|
|
81
|
+
--color-complement-5: rgb(var(--complement-5-channels));
|
|
82
|
+
--color-complement-6: rgb(var(--complement-6-channels));
|
|
83
|
+
--color-complement-7: rgb(var(--complement-7-channels));
|
|
84
|
+
--color-complement-8: rgb(var(--complement-8-channels));
|
|
85
|
+
--color-complement-9: rgb(var(--complement-9-channels));
|
|
86
|
+
--color-complement-10: rgb(var(--complement-10-channels));
|
|
87
|
+
--color-complement-11: rgb(var(--complement-11-channels));
|
|
88
|
+
--color-complement-12: rgb(var(--complement-12-channels));
|
|
89
|
+
--color-gray-0: rgb(var(--gray-0-channels));
|
|
90
|
+
--color-gray-1: rgb(var(--gray-1-channels));
|
|
91
|
+
--color-gray-2: rgb(var(--gray-2-channels));
|
|
92
|
+
--color-gray-3: rgb(var(--gray-3-channels));
|
|
93
|
+
--color-gray-4: rgb(var(--gray-4-channels));
|
|
94
|
+
--color-gray-5: rgb(var(--gray-5-channels));
|
|
95
|
+
--color-gray-6: rgb(var(--gray-6-channels));
|
|
96
|
+
--color-gray-7: rgb(var(--gray-7-channels));
|
|
97
|
+
--color-gray-8: rgb(var(--gray-8-channels));
|
|
98
|
+
--color-gray-9: rgb(var(--gray-9-channels));
|
|
99
|
+
--color-gray-10: rgb(var(--gray-10-channels));
|
|
100
|
+
--color-gray-11: rgb(var(--gray-11-channels));
|
|
101
|
+
--color-gray-12: rgb(var(--gray-12-channels));
|
|
102
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Midwest design tokens — the single source of truth for the system's
|
|
3
|
+
* non-colour primitives (spacing, radius, elevation, motion, typography,
|
|
4
|
+
* z-index, breakpoints).
|
|
5
|
+
*
|
|
6
|
+
* These custom properties are the canonical values. `Midwest::Tokens` parses
|
|
7
|
+
* this file at runtime, so the Ruby API, the MCP `get_design_tokens` tool, and
|
|
8
|
+
* the `tokens:export` CLI can never drift from what components actually render
|
|
9
|
+
* — the same contract `color-system.css` has with `Midwest::Theme`.
|
|
10
|
+
*
|
|
11
|
+
* Colours are intentionally NOT here: they have their own generated scales and
|
|
12
|
+
* runtime theming story in `color-system.css`. `Midwest::Tokens` folds them in
|
|
13
|
+
* by delegating to `Midwest::Theme`.
|
|
14
|
+
*
|
|
15
|
+
* Naming: `--{category}-{step}`. Steps use a t-shirt scale (xs … 3xl) so they
|
|
16
|
+
* map onto the component option vocabulary (`size:`, `padding:`) and read
|
|
17
|
+
* cleanly in a theme-builder UI. All length tokens are in `rem`, so they scale
|
|
18
|
+
* with the responsive root font-size in `responsive-system.css`.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
@layer midwest.tokens {
|
|
22
|
+
:root {
|
|
23
|
+
/* SPACING — 4px base at the 16px root; md (1rem) is the system default. */
|
|
24
|
+
--space-none: 0;
|
|
25
|
+
--space-3xs: 0.125rem; /* 2px */
|
|
26
|
+
--space-2xs: 0.25rem; /* 4px */
|
|
27
|
+
--space-xs: 0.5rem; /* 8px */
|
|
28
|
+
--space-sm: 0.75rem; /* 12px */
|
|
29
|
+
--space-md: 1rem; /* 16px */
|
|
30
|
+
--space-lg: 1.5rem; /* 24px */
|
|
31
|
+
--space-xl: 2rem; /* 32px */
|
|
32
|
+
--space-2xl: 3rem; /* 48px */
|
|
33
|
+
--space-3xl: 4rem; /* 64px */
|
|
34
|
+
|
|
35
|
+
/* BORDER RADIUS */
|
|
36
|
+
--radius-none: 0;
|
|
37
|
+
--radius-sm: 0.25rem;
|
|
38
|
+
--radius-md: 0.5rem;
|
|
39
|
+
--radius-lg: 0.75rem;
|
|
40
|
+
--radius-xl: 1rem;
|
|
41
|
+
--radius-full: 9999px;
|
|
42
|
+
|
|
43
|
+
/* ELEVATION — shadow ramp. Literal black so the ramp is dark-mode neutral. */
|
|
44
|
+
--shadow-none: none;
|
|
45
|
+
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 5%);
|
|
46
|
+
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 10%), 0 2px 4px -2px rgb(0 0 0 / 10%);
|
|
47
|
+
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 10%), 0 4px 6px -4px rgb(0 0 0 / 10%);
|
|
48
|
+
--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 10%), 0 8px 10px -6px rgb(0 0 0 / 10%);
|
|
49
|
+
|
|
50
|
+
/* MOTION — durations and easings. Values match existing component usage. */
|
|
51
|
+
--duration-fast: 150ms;
|
|
52
|
+
--duration-base: 200ms;
|
|
53
|
+
--duration-slow: 350ms;
|
|
54
|
+
--duration-slower: 500ms;
|
|
55
|
+
--ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
|
|
56
|
+
--ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
57
|
+
--ease-out: cubic-bezier(0, 0, 0.2, 1);
|
|
58
|
+
--ease-emphasized: cubic-bezier(0.2, 0, 0, 1);
|
|
59
|
+
|
|
60
|
+
/* TYPOGRAPHY — sizes mirror the Tailwind text-* ramp (rem). */
|
|
61
|
+
--font-family-sans: "Inter var", ui-sans-serif, system-ui, sans-serif;
|
|
62
|
+
--font-family-mono: ui-monospace, "SF Mono", "Cascadia Code", "Fira Code", monospace;
|
|
63
|
+
--font-size-xs: 0.75rem;
|
|
64
|
+
--font-size-sm: 0.875rem;
|
|
65
|
+
--font-size-md: 1rem;
|
|
66
|
+
--font-size-lg: 1.125rem;
|
|
67
|
+
--font-size-xl: 1.25rem;
|
|
68
|
+
--font-size-2xl: 1.5rem;
|
|
69
|
+
--font-size-3xl: 1.875rem;
|
|
70
|
+
--font-size-4xl: 2.25rem;
|
|
71
|
+
--font-size-5xl: 3rem;
|
|
72
|
+
--font-size-6xl: 3.75rem;
|
|
73
|
+
--font-weight-normal: 400;
|
|
74
|
+
--font-weight-medium: 500;
|
|
75
|
+
--font-weight-semibold: 600;
|
|
76
|
+
--font-weight-bold: 700;
|
|
77
|
+
--leading-none: 1;
|
|
78
|
+
--leading-tight: 1.25;
|
|
79
|
+
--leading-snug: 1.375;
|
|
80
|
+
--leading-normal: 1.5;
|
|
81
|
+
--leading-relaxed: 1.625;
|
|
82
|
+
--tracking-tight: -0.01em;
|
|
83
|
+
--tracking-normal: 0.02em;
|
|
84
|
+
--tracking-wide: 0.05em;
|
|
85
|
+
--tracking-wider: 0.1em;
|
|
86
|
+
|
|
87
|
+
/* Z-INDEX — named stacking order. `max` matches the legacy 999999 sentinel. */
|
|
88
|
+
--z-base: 0;
|
|
89
|
+
--z-raised: 10;
|
|
90
|
+
--z-dropdown: 1000;
|
|
91
|
+
--z-sticky: 1100;
|
|
92
|
+
--z-overlay: 1200;
|
|
93
|
+
--z-modal: 1300;
|
|
94
|
+
--z-popover: 1400;
|
|
95
|
+
--z-toast: 1500;
|
|
96
|
+
--z-tooltip: 1600;
|
|
97
|
+
--z-max: 999999;
|
|
98
|
+
|
|
99
|
+
/* BREAKPOINTS — mirror the responsive root font-size steps. Exposed for JS,
|
|
100
|
+
* container queries, and documentation; CSS media queries use the literals. */
|
|
101
|
+
--breakpoint-xs: 400px;
|
|
102
|
+
--breakpoint-sm: 600px;
|
|
103
|
+
--breakpoint-md: 800px;
|
|
104
|
+
--breakpoint-lg: 1000px;
|
|
105
|
+
--breakpoint-xl: 1200px;
|
|
106
|
+
--breakpoint-2xl: 1400px;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
@
|
|
1
|
+
@layer midwest.utilities {
|
|
2
|
+
.layer-children {
|
|
3
|
+
display: grid;
|
|
4
|
+
grid-template-columns: auto;
|
|
5
|
+
grid-template-rows: auto;
|
|
6
|
+
}
|
|
2
7
|
|
|
3
|
-
.layer-children {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
+
.layer-children > * {
|
|
9
|
+
grid-column: 1;
|
|
10
|
+
grid-row: 1;
|
|
11
|
+
}
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
+
html,
|
|
14
|
+
body {
|
|
15
|
+
height: 100%;
|
|
16
|
+
}
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
+
main {
|
|
19
|
+
height: 100%;
|
|
20
|
+
}
|
|
18
21
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
[hidden] {
|
|
24
|
-
display: none !important;
|
|
22
|
+
[hidden] {
|
|
23
|
+
display: none !important;
|
|
24
|
+
}
|
|
25
25
|
}
|