@revikornmann/muka-ui 0.49.0 → 0.50.1

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 (71) hide show
  1. package/cli/templates/agents-block.md +16 -0
  2. package/dist/cjs/components/AppShell/AppShell.css +36 -10
  3. package/dist/cjs/components/BottomBar/BottomBar.css +2 -0
  4. package/dist/cjs/components/Dialog/Dialog.css +38 -0
  5. package/dist/cjs/components/DocumentViewer/DocumentViewer.css +22 -0
  6. package/dist/cjs/components/Drawer/Drawer.css +43 -0
  7. package/dist/cjs/components/Page/Page.css +57 -0
  8. package/dist/cjs/components/Page/Page.js +31 -0
  9. package/dist/cjs/components/Page/Page.js.map +1 -0
  10. package/dist/cjs/components/Page/index.js +6 -0
  11. package/dist/cjs/components/Page/index.js.map +1 -0
  12. package/dist/cjs/components/SiteHeader/SiteHeader.css +104 -0
  13. package/dist/cjs/components/SiteHeader/SiteHeader.js +34 -0
  14. package/dist/cjs/components/SiteHeader/SiteHeader.js.map +1 -0
  15. package/dist/cjs/components/SiteHeader/index.js +6 -0
  16. package/dist/cjs/components/SiteHeader/index.js.map +1 -0
  17. package/dist/cjs/components/Toast/Toast.css +12 -10
  18. package/dist/cjs/components/View/View.css +12 -0
  19. package/dist/cjs/components/index.js +7 -3
  20. package/dist/cjs/components/index.js.map +1 -1
  21. package/dist/esm/components/AppShell/AppShell.css +36 -10
  22. package/dist/esm/components/BottomBar/BottomBar.css +2 -0
  23. package/dist/esm/components/Dialog/Dialog.css +38 -0
  24. package/dist/esm/components/DocumentViewer/DocumentViewer.css +22 -0
  25. package/dist/esm/components/Drawer/Drawer.css +43 -0
  26. package/dist/esm/components/Page/Page.css +57 -0
  27. package/dist/esm/components/Page/Page.js +27 -0
  28. package/dist/esm/components/Page/Page.js.map +1 -0
  29. package/dist/esm/components/Page/index.js +2 -0
  30. package/dist/esm/components/Page/index.js.map +1 -0
  31. package/dist/esm/components/SiteHeader/SiteHeader.css +104 -0
  32. package/dist/esm/components/SiteHeader/SiteHeader.js +30 -0
  33. package/dist/esm/components/SiteHeader/SiteHeader.js.map +1 -0
  34. package/dist/esm/components/SiteHeader/index.js +2 -0
  35. package/dist/esm/components/SiteHeader/index.js.map +1 -0
  36. package/dist/esm/components/Toast/Toast.css +12 -10
  37. package/dist/esm/components/View/View.css +12 -0
  38. package/dist/esm/components/index.js +2 -0
  39. package/dist/esm/components/index.js.map +1 -1
  40. package/dist/styles/components/AppShell.css +36 -10
  41. package/dist/styles/components/BottomBar.css +2 -0
  42. package/dist/styles/components/ControlBar.css +72 -0
  43. package/dist/styles/components/Dialog.css +38 -0
  44. package/dist/styles/components/DocumentViewer.css +22 -0
  45. package/dist/styles/components/Drawer.css +43 -0
  46. package/dist/styles/components/Page.css +57 -0
  47. package/dist/styles/components/SiteHeader.css +104 -0
  48. package/dist/styles/components/TablePagination.css +199 -0
  49. package/dist/styles/components/Toast.css +12 -10
  50. package/dist/styles/components/TopBar.css +225 -43
  51. package/dist/styles/components/View.css +12 -0
  52. package/dist/styles/index.css +2145 -1651
  53. package/dist/styles/muka-dark.css +2145 -1651
  54. package/dist/styles/muka-light.css +2145 -1651
  55. package/dist/styles/wireframe-dark.css +2145 -1651
  56. package/dist/styles/wireframe-light.css +2145 -1651
  57. package/dist/types/components/Page/Page.d.ts +38 -0
  58. package/dist/types/components/Page/Page.d.ts.map +1 -0
  59. package/dist/types/components/Page/index.d.ts +3 -0
  60. package/dist/types/components/Page/index.d.ts.map +1 -0
  61. package/dist/types/components/SiteHeader/SiteHeader.d.ts +43 -0
  62. package/dist/types/components/SiteHeader/SiteHeader.d.ts.map +1 -0
  63. package/dist/types/components/SiteHeader/index.d.ts +3 -0
  64. package/dist/types/components/SiteHeader/index.d.ts.map +1 -0
  65. package/dist/types/components/index.d.ts +2 -0
  66. package/dist/types/components/index.d.ts.map +1 -1
  67. package/docs/consumers/README.md +1 -0
  68. package/docs/consumers/devices.md +59 -0
  69. package/docs/consumers/setup-instructions.md +7 -0
  70. package/package.json +1 -1
  71. package/skills/setup-muka/SKILL.md +9 -0
@@ -1,72 +1,254 @@
1
- /* ControlBar Component Styles */
1
+ /* TopBar Component Styles */
2
2
 
3
3
  /*
4
- * Sizing is driven by `--cb-*` custom properties set per tier. Base (small)
5
- * values live on `.muka-controlbar`; the large tier flips them — either
6
- * responsively (no `size` prop, scoped with `:not([data-size])`, large at
7
- * 1024px+ to track the TopBar large tier) or forced via `[data-size="…"]`.
8
- * Size affects the bar's own box only; `--controlbar-content-radius` is exposed
9
- * for consumers to apply to nested fields.
4
+ * Sizing is driven by a batch of `--tb-*` custom properties set per tier.
5
+ * The base (small) values live on `.muka-topbar`; the medium/large tiers flip
6
+ * the same vars. Tiers are applied either responsively (when no `size` prop is
7
+ * set, scoped with `:not([data-size])`) or forced via `[data-size="…"]`.
10
8
  */
11
- .muka-controlbar {
9
+ .muka-topbar {
12
10
  display: flex;
13
- justify-content: center;
14
- background-color: var(--controlbar-color-background);
11
+ flex-direction: column;
12
+ align-items: stretch;
13
+ background-color: var(--topbar-color-background);
15
14
  width: 100%;
15
+ box-shadow: var(--shadow-level2);
16
16
 
17
17
  /* ─── Small tier (base) ─── */
18
- --cb-padding-x: var(--controlbar-padding-x-sm);
19
- --cb-padding-bottom: var(--controlbar-padding-bottom-sm);
20
- --cb-max-width: var(--controlbar-max-width-sm);
21
- --cb-gap: var(--controlbar-gap-sm);
22
- --controlbar-content-radius: var(--controlbar-content-radius-sm);
18
+ --tb-height: var(--topbar-height-sm);
19
+ --tb-pad: var(--topbar-padding-x-sm);
20
+ /* Three-column grid (leading | title | trailing): the equal 1fr side columns
21
+ keep the title centered, and since each side column is at least as wide
22
+ as its content, wide (text) actions shrink and truncate the title instead
23
+ of overlapping it. */
24
+ --tb-container-display: grid;
25
+ --tb-title-align: center;
26
+ --tb-title-font-family: var(--text-heading-xs-fontFamily);
27
+ --tb-title-font-weight: var(--text-heading-xs-fontWeight);
28
+ --tb-title-font-size: var(--text-heading-xs-fontSize);
29
+ --tb-title-line-height: var(--text-heading-xs-lineHeight);
30
+ --tb-title-letter-spacing: var(--text-heading-xs-letterSpacing);
31
+ --tb-breadcrumb-display: none;
32
+ --tb-pad-y: 0;
33
+ }
23
34
 
24
- padding: 0 var(--cb-padding-x) var(--cb-padding-bottom);
35
+ /* ─── Medium tier ─── */
36
+ @media (min-width: 768px) {
37
+ .muka-topbar:not([data-size]) {
38
+ --tb-height: var(--topbar-height-md);
39
+ --tb-pad: var(--topbar-padding-x-md);
40
+ --tb-title-font-family: var(--text-heading-md-fontFamily);
41
+ --tb-title-font-weight: var(--text-heading-md-fontWeight);
42
+ --tb-title-font-size: var(--text-heading-md-fontSize);
43
+ --tb-title-line-height: var(--text-heading-md-lineHeight);
44
+ --tb-title-letter-spacing: var(--text-heading-md-letterSpacing);
45
+ }
25
46
  }
26
47
 
27
- /* ─── Large tier ─── */
48
+ .muka-topbar[data-size='md'] {
49
+ --tb-height: var(--topbar-height-md);
50
+ --tb-pad: var(--topbar-padding-x-md);
51
+ --tb-title-font-family: var(--text-heading-md-fontFamily);
52
+ --tb-title-font-weight: var(--text-heading-md-fontWeight);
53
+ --tb-title-font-size: var(--text-heading-md-fontSize);
54
+ --tb-title-line-height: var(--text-heading-md-lineHeight);
55
+ --tb-title-letter-spacing: var(--text-heading-md-letterSpacing);
56
+ }
57
+
58
+ /* ─── Large tier: left-aligned title, breadcrumb row ─── */
28
59
  @media (min-width: 1024px) {
29
- .muka-controlbar:not([data-size]) {
30
- --cb-padding-x: var(--controlbar-padding-x-lg);
31
- --cb-padding-bottom: var(--controlbar-padding-bottom-lg);
32
- --cb-max-width: var(--controlbar-max-width-lg);
33
- --cb-gap: var(--controlbar-gap-lg);
34
- --controlbar-content-radius: var(--controlbar-content-radius-lg);
60
+ .muka-topbar:not([data-size]):not([data-max-size='md']) {
61
+ --tb-height: var(--topbar-height-lg);
62
+ --tb-pad: var(--topbar-padding-x-lg);
63
+ --tb-pad-y: var(--spacing-4);
64
+ --tb-container-display: flex;
65
+ --tb-title-align: left;
66
+ --tb-title-font-family: var(--text-heading-md-fontFamily);
67
+ --tb-title-font-weight: var(--text-heading-md-fontWeight);
68
+ --tb-title-font-size: var(--text-heading-md-fontSize);
69
+ --tb-title-line-height: var(--text-heading-md-lineHeight);
70
+ --tb-title-letter-spacing: var(--text-heading-md-letterSpacing);
71
+ --tb-breadcrumb-display: flex;
35
72
  }
36
73
  }
37
74
 
38
- .muka-controlbar[data-size='lg'] {
39
- --cb-padding-x: var(--controlbar-padding-x-lg);
40
- --cb-padding-bottom: var(--controlbar-padding-bottom-lg);
41
- --cb-max-width: var(--controlbar-max-width-lg);
42
- --cb-gap: var(--controlbar-gap-lg);
43
- --controlbar-content-radius: var(--controlbar-content-radius-lg);
75
+ .muka-topbar[data-size='lg'] {
76
+ --tb-height: var(--topbar-height-lg);
77
+ --tb-pad: var(--topbar-padding-x-lg);
78
+ --tb-pad-y: var(--spacing-4);
79
+ --tb-container-display: flex;
80
+ --tb-title-align: left;
81
+ --tb-title-font-family: var(--text-heading-md-fontFamily);
82
+ --tb-title-font-weight: var(--text-heading-md-fontWeight);
83
+ --tb-title-font-size: var(--text-heading-md-fontSize);
84
+ --tb-title-line-height: var(--text-heading-md-lineHeight);
85
+ --tb-title-letter-spacing: var(--text-heading-md-letterSpacing);
86
+ --tb-breadcrumb-display: flex;
87
+ }
88
+
89
+ /* Push content below the iOS notch / status bar. Opt out via disableSafeArea. */
90
+ .muka-topbar:not(.muka-topbar--no-safe-area) {
91
+ padding-top: env(safe-area-inset-top);
44
92
  }
45
93
 
46
- /* Contents are capped at the tier max-width and centered, so they don't
47
- stretch full-width on larger viewports while the bar background stays edge-to-edge. */
48
- .muka-controlbar__content {
94
+ /* ─── Drag Handle (draggable variant) ─────────────────── */
95
+
96
+ .muka-topbar__drag-handle-container {
49
97
  display: flex;
98
+ flex-direction: column;
50
99
  align-items: center;
51
- gap: var(--cb-gap);
52
- width: 100%;
53
- max-width: var(--cb-max-width);
100
+ padding: var(--topbar-drag-handle-padding-y) 0;
101
+ }
102
+
103
+ .muka-topbar__drag-handle {
104
+ width: var(--topbar-drag-handle-width);
105
+ height: var(--topbar-drag-handle-height);
106
+ background-color: var(--topbar-drag-handle-color);
107
+ border-radius: var(--topbar-drag-handle-radius);
108
+ }
109
+
110
+ /* ─── Breadcrumb (large tier, stacked above the title) ── */
111
+
112
+ .muka-topbar__breadcrumb {
113
+ display: var(--tb-breadcrumb-display);
114
+ align-items: center;
115
+ }
116
+
117
+ /* ─── Container (the bar itself) ──────────────────────── */
118
+
119
+ .muka-topbar__container {
120
+ position: relative;
121
+ display: var(--tb-container-display);
122
+ grid-template-columns: 1fr auto 1fr;
123
+ align-items: center;
124
+ min-height: var(--tb-height);
125
+ padding: var(--tb-pad-y) var(--tb-pad);
126
+ }
127
+
128
+ /* Inset content on iPhone landscape with notch / iPad with curved corners. */
129
+ .muka-topbar:not(.muka-topbar--no-safe-area) .muka-topbar__container {
130
+ padding-left: max(var(--tb-pad), env(safe-area-inset-left));
131
+ padding-right: max(var(--tb-pad), env(safe-area-inset-right));
54
132
  }
55
133
 
56
- /* ─── Justification variants ─────────────────────────── */
134
+ /* ─── Leading slot ────────────────────────────────────── */
57
135
 
58
- .muka-controlbar--justify-start .muka-controlbar__content {
59
- justify-content: flex-start;
136
+ .muka-topbar__leading {
137
+ grid-column: 1;
138
+ justify-self: start;
139
+ flex-shrink: 0;
140
+ /* Text actions keep their width; the title is what truncates. */
141
+ white-space: nowrap;
142
+ z-index: 1;
60
143
  }
61
144
 
62
- .muka-controlbar--justify-center .muka-controlbar__content {
145
+ /* Large tier with a breadcrumb replaces the back button with the breadcrumb. */
146
+ @media (min-width: 1024px) {
147
+ .muka-topbar:not([data-size]):not([data-max-size='md']):has(.muka-topbar__breadcrumb) .muka-topbar__leading {
148
+ display: none;
149
+ }
150
+ }
151
+
152
+ .muka-topbar[data-size='lg']:has(.muka-topbar__breadcrumb) .muka-topbar__leading {
153
+ display: none;
154
+ }
155
+
156
+ /* ─── Heading (breadcrumb + title) ────────────────────── */
157
+
158
+ /* Base/sm/md: transparent wrapper so the title is the center grid item and
159
+ the breadcrumb stays hidden. */
160
+ .muka-topbar__heading {
161
+ display: contents;
162
+ }
163
+
164
+ /* Large tier: a tight column with the breadcrumb stacked above the title. */
165
+ @media (min-width: 1024px) {
166
+ .muka-topbar:not([data-size]):not([data-max-size='md']) .muka-topbar__heading {
167
+ display: flex;
168
+ flex-direction: column;
169
+ justify-content: center;
170
+ gap: var(--spacing-1);
171
+ flex: 1 1 0%;
172
+ min-width: 0;
173
+ }
174
+ }
175
+
176
+ .muka-topbar[data-size='lg'] .muka-topbar__heading {
177
+ display: flex;
178
+ flex-direction: column;
63
179
  justify-content: center;
180
+ gap: var(--spacing-1);
181
+ flex: 1 1 0%;
182
+ min-width: 0;
64
183
  }
65
184
 
66
- .muka-controlbar--justify-end .muka-controlbar__content {
67
- justify-content: flex-end;
185
+ /* ─── Title ───────────────────────────────────────────── */
186
+
187
+ .muka-topbar__title {
188
+ grid-column: 2;
189
+ min-width: 0;
190
+ overflow: hidden;
191
+ text-overflow: ellipsis;
192
+ white-space: nowrap;
193
+ text-align: var(--tb-title-align);
194
+ color: var(--topbar-color-foreground);
195
+ font-family: var(--tb-title-font-family);
196
+ font-weight: var(--tb-title-font-weight);
197
+ font-size: var(--tb-title-font-size);
198
+ line-height: var(--tb-title-line-height);
199
+ letter-spacing: var(--tb-title-letter-spacing);
200
+ margin: 0;
68
201
  }
69
202
 
70
- .muka-controlbar--justify-between .muka-controlbar__content {
71
- justify-content: space-between;
203
+ /* ─── Trailing slot ───────────────────────────────────── */
204
+
205
+ .muka-topbar__trailing {
206
+ grid-column: 3;
207
+ justify-self: end;
208
+ display: flex;
209
+ align-items: center;
210
+ margin-left: auto;
211
+ flex-shrink: 0;
212
+ white-space: nowrap;
213
+ z-index: 1;
214
+ }
215
+
216
+ .muka-topbar__trailing-action {
217
+ flex-shrink: 0;
218
+ }
219
+
220
+ /* ─── Icon-only actions: md in the small tier ────────── */
221
+
222
+ /* Below 768px (the small tier), `lg` icon-only action buttons in the
223
+ leading/trailing slots render at the `md` button size (40px). The medium and
224
+ large tiers keep `lg` (48px), per the TopBar design. Scoped to the action
225
+ slots so ControlBar buttons are unaffected. */
226
+ @media (max-width: 767.98px) {
227
+ .muka-topbar:not([data-size]) :is(.muka-topbar__leading, .muka-topbar__trailing-action) .muka-button--icon-only.muka-button--lg {
228
+ width: 40px;
229
+ min-height: 40px;
230
+ border-radius: var(--button-radius-md);
231
+ }
232
+
233
+ .muka-topbar:not([data-size]) :is(.muka-topbar__leading, .muka-topbar__trailing-action) .muka-button--icon-only.muka-button--lg .muka-button__icon {
234
+ width: var(--button-icon-md);
235
+ height: var(--button-icon-md);
236
+ }
237
+ }
238
+
239
+ .muka-topbar[data-size='sm'] :is(.muka-topbar__leading, .muka-topbar__trailing-action) .muka-button--icon-only.muka-button--lg {
240
+ width: 40px;
241
+ min-height: 40px;
242
+ border-radius: var(--button-radius-md);
243
+ }
244
+
245
+ .muka-topbar[data-size='sm'] :is(.muka-topbar__leading, .muka-topbar__trailing-action) .muka-button--icon-only.muka-button--lg .muka-button__icon {
246
+ width: var(--button-icon-md);
247
+ height: var(--button-icon-md);
248
+ }
249
+
250
+ /* ─── ControlBar slot ────────────────────────────────── */
251
+
252
+ .muka-topbar__controlbar {
253
+ width: 100%;
72
254
  }
@@ -66,6 +66,18 @@
66
66
  /* Grow on short content so the sticky footer is pushed to the bottom rather
67
67
  than floating mid-screen. */
68
68
  flex: 1 0 auto;
69
+ /* Keep content clear of the notch in landscape (0 everywhere else). The
70
+ large tier below replaces this with its section padding. */
71
+ padding-left: env(safe-area-inset-left, 0px);
72
+ padding-right: env(safe-area-inset-right, 0px);
73
+ }
74
+
75
+ /* Home indicator: the body pads for it only when nothing inside does. A
76
+ BottomBar pads itself, whether it sits in the footer slot or in the content
77
+ (a chat composer pinned under a message list), so the body must not do it
78
+ twice; doing so left a strip of body colour under the bar. */
79
+ .muka-view__body:not(:has(.muka-view__footer, .muka-bottombar:not(.muka-bottombar--no-safe-area))) {
80
+ padding-bottom: env(safe-area-inset-bottom, 0px);
69
81
  }
70
82
 
71
83
  @media (min-width: 1024px) {