@mistriwork/ui 1.0.0-rc.58 → 1.0.0-rc.59

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 (122) hide show
  1. package/README.md +46 -12
  2. package/dist/Avatar.js +3 -3
  3. package/dist/Button.d.ts +4 -14
  4. package/dist/Button.js +26 -13
  5. package/dist/Carousel.d.ts +6 -5
  6. package/dist/Carousel.js +58 -67
  7. package/dist/Choices.d.ts +2 -9
  8. package/dist/Choices.js +127 -64
  9. package/dist/DateField.d.ts +9 -4
  10. package/dist/DateField.js +102 -119
  11. package/dist/Drawer.d.ts +1 -19
  12. package/dist/Drawer.js +8 -9
  13. package/dist/DropMenu.d.ts +8 -21
  14. package/dist/DropMenu.js +84 -30
  15. package/dist/Dropdown.d.ts +9 -8
  16. package/dist/Dropdown.js +69 -65
  17. package/dist/Field.d.ts +2 -1
  18. package/dist/Field.js +12 -18
  19. package/dist/FileField.d.ts +3 -10
  20. package/dist/FileField.js +12 -9
  21. package/dist/FormParts.d.ts +17 -10
  22. package/dist/FormParts.js +26 -41
  23. package/dist/HeroBlocks.d.ts +7 -3
  24. package/dist/HeroBlocks.js +11 -6
  25. package/dist/Modal.d.ts +6 -17
  26. package/dist/Modal.js +90 -21
  27. package/dist/Pagination.d.ts +1 -12
  28. package/dist/Pagination.js +17 -3
  29. package/dist/Popover.d.ts +1 -15
  30. package/dist/Popover.js +10 -15
  31. package/dist/Resizable.d.ts +3 -21
  32. package/dist/Resizable.js +14 -91
  33. package/dist/ScrollArea.d.ts +4 -2
  34. package/dist/ScrollArea.js +11 -11
  35. package/dist/Select.d.ts +1 -6
  36. package/dist/Select.js +16 -7
  37. package/dist/SensitiveField.d.ts +1 -8
  38. package/dist/SensitiveField.js +6 -4
  39. package/dist/Slider.d.ts +1 -5
  40. package/dist/Slider.js +13 -5
  41. package/dist/Switch.d.ts +1 -11
  42. package/dist/Switch.js +10 -9
  43. package/dist/Tabs.d.ts +3 -3
  44. package/dist/Tabs.js +3 -3
  45. package/dist/TextArea.d.ts +4 -6
  46. package/dist/TextArea.js +14 -5
  47. package/dist/TextField.d.ts +5 -9
  48. package/dist/TextField.js +67 -9
  49. package/dist/Tooltip.d.ts +1 -21
  50. package/dist/Tooltip.js +13 -31
  51. package/dist/Typeahead.d.ts +15 -18
  52. package/dist/Typeahead.js +151 -86
  53. package/dist/UiKit.d.ts +63 -4
  54. package/dist/UiKit.js +46 -5
  55. package/dist/behaviors/DaysParts.js +28 -0
  56. package/dist/behaviors/EditableParts.js +21 -0
  57. package/dist/behaviors/PickParts.js +30 -0
  58. package/dist/behaviors/ScrubParts.js +21 -0
  59. package/dist/behaviors/SortableParts.js +32 -0
  60. package/dist/behaviors/SpansParts.js +12 -0
  61. package/dist/behaviors/TransferParts.js +37 -0
  62. package/dist/behaviors/TurnsParts.js +31 -0
  63. package/dist/behaviors/WidthsParts.js +27 -0
  64. package/dist/behaviors/days.js +216 -0
  65. package/dist/behaviors/dress.js +86 -0
  66. package/dist/behaviors/editable.js +104 -0
  67. package/dist/behaviors/heard.js +22 -0
  68. package/dist/behaviors/index.d.ts +310 -0
  69. package/dist/behaviors/index.js +44 -0
  70. package/dist/behaviors/pick.js +158 -0
  71. package/dist/behaviors/scrub.js +152 -0
  72. package/dist/behaviors/sortable.js +170 -0
  73. package/dist/behaviors/spans.js +240 -0
  74. package/dist/behaviors/testing.js +48 -0
  75. package/dist/behaviors/transfer.js +202 -0
  76. package/dist/behaviors/turns.js +106 -0
  77. package/dist/behaviors/widths.js +150 -0
  78. package/dist/behaviors.css +309 -0
  79. package/dist/changeDetails.d.ts +4 -8
  80. package/dist/changeDetails.js +0 -6
  81. package/dist/conformance.js +107 -1
  82. package/dist/controls.css +36 -0
  83. package/dist/fieldFrame.d.ts +2 -15
  84. package/dist/fieldFrame.js +1 -17
  85. package/dist/index.d.ts +6 -5
  86. package/dist/index.js +6 -5
  87. package/dist/internal/Frame.d.ts +6 -0
  88. package/dist/internal/Frame.js +25 -0
  89. package/dist/internal/HelpTip.d.ts +5 -0
  90. package/dist/internal/HelpTip.js +37 -0
  91. package/dist/internal/layers.d.ts +21 -0
  92. package/dist/internal/layers.js +66 -0
  93. package/dist/internal/popups.d.ts +12 -10
  94. package/dist/internal/popups.js +18 -14
  95. package/dist/internal/told.d.ts +14 -0
  96. package/dist/internal/told.js +20 -0
  97. package/dist/internal/uiKitContext.js +6 -4
  98. package/dist/preferences.css +2 -3
  99. package/dist/style.css +5 -16
  100. package/dist/styles/extras.css +461 -0
  101. package/dist/styles/forms.css +346 -0
  102. package/dist/styles/guard.css +114 -0
  103. package/dist/styles/kit-fields.css +181 -0
  104. package/dist/styles/kit-parts.css +130 -0
  105. package/dist/styles/kit.css +558 -0
  106. package/dist/styles/layers.css +4 -0
  107. package/dist/styles/looks.css +374 -0
  108. package/dist/styles/m-tokens.css +173 -0
  109. package/dist/styles/overlays.css +107 -0
  110. package/dist/styles/parts.css +456 -0
  111. package/dist/styles/screens.css +76 -0
  112. package/dist/styles/ui-sdk.css +1635 -0
  113. package/dist/tokens.css +15 -4
  114. package/dist/uiKitSlots.d.ts +1 -1
  115. package/dist/uiKitSlots.js +18 -2
  116. package/package.json +13 -11
  117. package/dist/forms.css +0 -225
  118. package/dist/hero.css +0 -23
  119. package/dist/internal/anchor.d.ts +0 -19
  120. package/dist/internal/anchor.js +0 -52
  121. package/dist/primitives.css +0 -200
  122. package/dist/standalone.css +0 -478
@@ -0,0 +1,130 @@
1
+ /* What the page parts in rest.tsx wear that the library's stylesheet does not have: the help tip now that it is a
2
+ note and not a popover, a row of columns given its own template, and the carousel that is drawn here by hand. */
3
+ @layer m-components {
4
+ /* More about a field: a small round button beside the label. The note it opens is UI SDK's tooltip, so the
5
+ button is that tooltip's trigger. */
6
+ [data-slot='tooltip-trigger'][data-kind='help-tip'] {
7
+ display: inline-grid;
8
+ place-items: center;
9
+ width: 1.125rem;
10
+ height: 1.125rem;
11
+ min-width: 0;
12
+ padding: 0;
13
+ border: 1px solid var(--m-line-control);
14
+ border-radius: 999px;
15
+ background: var(--m-raised);
16
+ box-shadow: none;
17
+ color: var(--m-ink-muted);
18
+ font-size: 0.6875rem;
19
+ font-weight: 600;
20
+ vertical-align: middle;
21
+ cursor: pointer;
22
+
23
+ & svg {
24
+ width: 0.6875rem;
25
+ height: 0.6875rem;
26
+ }
27
+
28
+ &:hover,
29
+ &[aria-expanded='true'] {
30
+ background: var(--m-accent-soft);
31
+ color: var(--m-accent-ink);
32
+ }
33
+ }
34
+
35
+ /* A sentence or two to read, not a word to glance at: the surface of a popover and room for its lines, where a
36
+ tooltip is a dark chip of one. */
37
+ [data-slot='tooltip-content'][data-kind='help-tip'] {
38
+ max-width: 18rem;
39
+ padding: var(--m-space-3h) var(--m-space-4);
40
+ border: 1px solid var(--ui-border);
41
+ border-radius: calc(var(--ui-radius) * 1.5);
42
+ background: var(--ui-background);
43
+ box-shadow: var(--ui-shadow);
44
+ color: var(--m-ink-muted);
45
+ font-size: var(--ui-font-size);
46
+ line-height: var(--m-leading);
47
+ }
48
+
49
+ /* The caller's own column list. Under a width where two fields cannot stand side by side the row is one
50
+ column, whatever the list says. */
51
+ [data-slot='columns'][data-kind='template'] {
52
+ grid-template-columns: var(--form-columns);
53
+ align-items: start;
54
+
55
+ @media (max-width: 22rem) {
56
+ grid-template-columns: minmax(0, 1fr);
57
+ }
58
+ }
59
+
60
+ /* The carousel's slides stand edge to edge on a track that is moved a whole slide at a time, so no gap may
61
+ stand between them. The move is shown only to a reader who has not asked for stillness; the rest get a cut. */
62
+ section[data-slot='carousel'] {
63
+ /* As wide as where it stands, as mistri's is: the base sheet centres a carousel and caps it. */
64
+ align-items: stretch;
65
+ max-width: none;
66
+ min-width: 0;
67
+
68
+ &:focus {
69
+ outline: none;
70
+ }
71
+
72
+ & [data-slot='carousel-content'] {
73
+ gap: 0;
74
+ }
75
+
76
+ & :is([data-slot='carousel-previous'], [data-slot='carousel-next']) {
77
+ display: inline-grid;
78
+ place-items: center;
79
+ height: calc(var(--ui-spacing) * 8);
80
+ border: 0;
81
+ background: transparent;
82
+ color: var(--m-ink-muted);
83
+ cursor: pointer;
84
+
85
+ &:hover:not(:disabled) {
86
+ background: var(--m-raised);
87
+ color: var(--m-ink);
88
+ }
89
+
90
+ &:disabled {
91
+ opacity: 0.4;
92
+ cursor: not-allowed;
93
+ }
94
+
95
+ &:focus-visible {
96
+ outline: 2px solid var(--m-accent);
97
+ outline-offset: 2px;
98
+ }
99
+ }
100
+
101
+ & [data-slot='carousel-indicator']:focus-visible {
102
+ outline: 2px solid var(--m-accent);
103
+ outline-offset: 2px;
104
+ }
105
+
106
+ @media (prefers-reduced-motion: no-preference) {
107
+ & [data-slot='carousel-content'] {
108
+ transition: transform var(--m-enter) var(--m-ease-out);
109
+ }
110
+ }
111
+ }
112
+
113
+ /* The landing's badge: a few words over the heading, in the accent's quiet tint so it reads as a note on the
114
+ page and never as a button. As wide as its words, wherever it stands. */
115
+ [data-slot='badge'][data-kind='hero'] {
116
+ align-self: flex-start;
117
+ justify-self: start;
118
+ width: fit-content;
119
+ height: auto;
120
+ padding: var(--m-space-2) var(--m-space-4);
121
+ background: var(--m-accent-soft);
122
+ color: var(--m-ink);
123
+ font-size: var(--m-size-sm);
124
+ font-weight: var(--m-weight-medium);
125
+
126
+ & svg {
127
+ color: var(--m-accent-ink);
128
+ }
129
+ }
130
+ }
@@ -0,0 +1,558 @@
1
+ /* What the kit's slots wear beyond UI SDK's own stylesheet: the parts mistri's props ask for that the library's
2
+ fields do not have (a mark in the box, a reserved problem line, a help tip, a readout over a slider). */
3
+ @layer m-components {
4
+ [data-slot='field-head'] {
5
+ display: flex;
6
+ align-items: baseline;
7
+ gap: 0.375rem;
8
+
9
+ &[data-kind='visually-hidden'] {
10
+ position: absolute;
11
+ width: 1px;
12
+ height: 1px;
13
+ overflow: hidden;
14
+ clip-path: inset(50%);
15
+ white-space: nowrap;
16
+ }
17
+ }
18
+
19
+ [data-slot='field-required'] {
20
+ color: var(--m-critical);
21
+ font-weight: 600;
22
+ }
23
+
24
+ /* The problem's line, kept while it is empty, so a problem that arrives moves nothing below it: the line is set at
25
+ the problem's own size, or it is a line of the field's larger text and the problem, arriving, pulls up what is
26
+ under it. */
27
+ [data-slot='field-reserve'] {
28
+ min-height: 1.5em;
29
+ margin: 0;
30
+ font-size: calc(var(--ui-font-size) - 0.0625rem);
31
+ }
32
+
33
+ [data-slot='field']:has(> [data-slot='field-reserve'], > div > [data-slot='field-reserve']) [data-slot='field-error'] {
34
+ min-height: 1.5em;
35
+ }
36
+
37
+ [data-slot='popover-trigger'][data-kind='help-tip'] {
38
+ width: 1.125rem;
39
+ height: 1.125rem;
40
+ padding: 0;
41
+ border: 1px solid var(--m-line-control);
42
+ border-radius: 999px;
43
+ box-shadow: none;
44
+ color: var(--m-ink-muted);
45
+ font-size: 0.6875rem;
46
+ font-weight: 600;
47
+ }
48
+
49
+ [data-slot='field-box'] {
50
+ position: relative;
51
+ display: flex;
52
+ align-items: center;
53
+ width: 100%;
54
+
55
+ & [data-slot='input'] {
56
+ width: 100%;
57
+ }
58
+
59
+ &[data-has-mark] [data-slot='input'] {
60
+ padding-inline-end: 2rem;
61
+ }
62
+ }
63
+
64
+ /* The mark is drawn here unless a picture is lent: a check in the good tone. */
65
+ [data-slot='field-mark'] {
66
+ position: absolute;
67
+ inset-inline-end: 0.625rem;
68
+ display: grid;
69
+ place-items: center;
70
+ width: 1rem;
71
+ height: 1rem;
72
+ color: var(--m-good);
73
+ pointer-events: none;
74
+
75
+ &:empty::before {
76
+ width: 100%;
77
+ height: 100%;
78
+ background: currentColor;
79
+ mask: var(--ui-icon-check) center / contain no-repeat;
80
+ content: '';
81
+ }
82
+ }
83
+
84
+ [data-slot='field-with-action'] {
85
+ display: flex;
86
+ align-items: center;
87
+ gap: 0.5rem;
88
+
89
+ & [data-slot='field-box'] {
90
+ flex: 1;
91
+ }
92
+ }
93
+
94
+ [data-slot='field-note'] {
95
+ display: flex;
96
+ align-items: center;
97
+ gap: 0.375rem;
98
+ margin: 0;
99
+ color: var(--m-ink-muted);
100
+ font-size: 0.75rem;
101
+ }
102
+
103
+ [data-slot='field'].consent [data-slot='field-label'] {
104
+ font-weight: 400;
105
+ line-height: 1.5;
106
+ }
107
+
108
+ [data-slot='button'][data-block] {
109
+ width: 100%;
110
+ }
111
+
112
+ [data-slot='button'][data-busy] {
113
+ cursor: progress;
114
+ opacity: 0.72;
115
+ }
116
+
117
+ [data-slot='switch-row'] {
118
+ display: inline-flex;
119
+ align-items: flex-start;
120
+ gap: 0.625rem;
121
+ min-width: 0;
122
+
123
+ & [data-slot='switch'] {
124
+ flex: none;
125
+ margin: 0;
126
+ }
127
+ }
128
+
129
+ [data-slot='switch-copy'] {
130
+ display: flex;
131
+ flex-direction: column;
132
+ gap: 0.125rem;
133
+
134
+ & label {
135
+ font-weight: 550;
136
+ cursor: pointer;
137
+ }
138
+ }
139
+
140
+ [data-slot='switch-description'] {
141
+ color: var(--m-ink-muted);
142
+ }
143
+
144
+ [data-slot='slider-readout'] {
145
+ font-size: 1.25rem;
146
+ font-weight: 650;
147
+ letter-spacing: var(--m-track-title);
148
+ font-variant-numeric: tabular-nums;
149
+ }
150
+
151
+ [data-slot='slider-ends'] {
152
+ display: flex;
153
+ justify-content: space-between;
154
+ color: var(--m-ink-subtle);
155
+ font-size: 0.75rem;
156
+ font-variant-numeric: tabular-nums;
157
+ }
158
+
159
+ /* The cards of a choice, whichever group holds them. A radio covers its card; a checkbox stands at its end. */
160
+ [data-slot='radio-group'][data-kind='cards'] {
161
+ grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
162
+
163
+ &[data-fit='pair'] {
164
+ grid-template-columns: repeat(2, minmax(0, 9rem));
165
+ }
166
+
167
+ /* Cards whose words run long stand one under another, each the column's width. */
168
+ &[data-fit='stack'] {
169
+ grid-template-columns: minmax(0, 1fr);
170
+ }
171
+
172
+ /* A few short words: each a pick as wide as its word and as tall as a field, in a row that wraps. */
173
+ &[data-fit='row'] {
174
+ display: flex;
175
+ flex-flow: row wrap;
176
+
177
+ & [data-slot='choice'] {
178
+ flex-direction: row;
179
+ align-items: center;
180
+ justify-content: center;
181
+ min-height: var(--control-h);
182
+ padding: 0 var(--m-space-4);
183
+ }
184
+
185
+ }
186
+
187
+ /* A pick, in a row or one of a pair, is a button with a word on it: the chosen one says so in its weight as
188
+ well as its edge and wash, which on a field that is its own fill were a hairline's difference. */
189
+ &:is([data-fit='row'], [data-fit='pair']) {
190
+ & [data-slot='choice'] {
191
+ font-weight: var(--m-weight-regular);
192
+ }
193
+
194
+ & [data-slot='choice-label'] {
195
+ font-weight: inherit;
196
+ }
197
+
198
+ & [data-slot='choice']:has([data-slot='radio'][data-checked]) {
199
+ font-weight: var(--m-weight-bold);
200
+ }
201
+ }
202
+ }
203
+
204
+ [data-slot='choice-icon'] {
205
+ display: grid;
206
+ color: var(--m-ink-muted);
207
+ }
208
+
209
+ /* A date's text and its calendar button are one box, as a unit beside a number is. */
210
+ [data-slot='date-field'] {
211
+ display: flex;
212
+ align-items: center;
213
+ width: 100%;
214
+ /* The box is the field: the height, the edge and the fill every field has (./parts.css). At least that
215
+ height, and not exactly it: where a form gives its inputs more room, the box grows round the input. */
216
+ box-sizing: border-box;
217
+ height: auto;
218
+ min-height: var(--control-h);
219
+ border: var(--control-border-w) solid var(--ui-input);
220
+ border-radius: var(--ui-radius);
221
+ background: var(--field-fill);
222
+
223
+ &:focus-within {
224
+ border-color: var(--ui-ring-border);
225
+ outline: 2px solid var(--ui-ring);
226
+ outline-offset: 1px;
227
+ }
228
+
229
+ &:has([aria-invalid='true']) {
230
+ border-color: var(--ui-destructive);
231
+ }
232
+
233
+ & [data-slot='input'] {
234
+ flex: 1;
235
+ align-self: stretch;
236
+ min-width: 0;
237
+ height: auto;
238
+ /* The box's edge is the input's own where a form sizes its inputs with their edge counted in. */
239
+ margin-block: calc(-1 * var(--control-border-w));
240
+ border: 0;
241
+ background: transparent;
242
+ outline: none;
243
+ font-variant-numeric: tabular-nums;
244
+ }
245
+
246
+ /* A date and a time's clock: the platform's own control inside the box, ruled off from the text. */
247
+ & > [data-slot='date-field-time'] {
248
+ flex: none;
249
+ align-self: stretch;
250
+ padding-inline: calc(var(--ui-spacing) * 2);
251
+ border: 0;
252
+ border-inline-start: 1px solid var(--ui-input);
253
+ background: transparent;
254
+ color: inherit;
255
+ font: inherit;
256
+ font-variant-numeric: tabular-nums;
257
+ outline: none;
258
+ }
259
+
260
+ & > [data-slot='popover-trigger'] {
261
+ flex: none;
262
+ width: calc(var(--ui-spacing) * 6.5);
263
+ height: calc(var(--ui-spacing) * 6.5);
264
+ margin-inline-end: calc(var(--ui-spacing) * 0.5);
265
+ padding: 0;
266
+ }
267
+ }
268
+
269
+ [data-slot='popover-content'][data-kind='calendar'] {
270
+ padding: 0.75rem;
271
+
272
+ /* The popover is the calendar's frame; a second edge inside it would be a box in a box. */
273
+ & [data-slot='calendar'] {
274
+ padding: 0;
275
+ border: 0;
276
+ }
277
+
278
+ /* The calendar's foot is a bar in a popup, not at a form's end: it stays where it is drawn, on the popup's own
279
+ ground, with only the rule over it. */
280
+ & [data-slot='action-bar'] {
281
+ position: static;
282
+ justify-content: space-between;
283
+ margin-block-start: 0.5rem;
284
+ padding: 0.5rem 0 0;
285
+ border-block-start: 1px solid var(--m-line);
286
+ background: none;
287
+ }
288
+ }
289
+
290
+ [data-slot='dropdown'] {
291
+ display: inline-flex;
292
+ max-width: 100%;
293
+
294
+ [data-slot='field'] > & {
295
+ display: flex;
296
+ width: 100%;
297
+
298
+ & [data-slot='select-trigger'] {
299
+ flex: 1;
300
+ justify-content: space-between;
301
+ }
302
+ }
303
+ }
304
+
305
+ [data-slot='select-value'][data-placeholder] {
306
+ color: var(--m-ink-muted);
307
+ }
308
+
309
+ [data-slot='option-label'] {
310
+ flex: 1;
311
+ }
312
+
313
+ [data-slot='option-detail'] {
314
+ color: var(--m-ink-subtle);
315
+ font-size: 0.75rem;
316
+ }
317
+
318
+ [data-slot='option-badge'] {
319
+ padding-inline: 0.375rem;
320
+ border: 1px solid var(--m-line-strong);
321
+ border-radius: 999px;
322
+ color: var(--m-ink-muted);
323
+ font-size: 0.6875rem;
324
+ }
325
+
326
+ [data-slot='select-item'][data-tone='good'] [data-slot='option-label'] {
327
+ color: var(--m-good);
328
+ }
329
+ [data-slot='select-item'][data-tone='warn'] [data-slot='option-label'] {
330
+ color: var(--m-warning);
331
+ }
332
+ [data-slot='select-item'][data-tone='bad'] [data-slot='option-label'] {
333
+ color: var(--m-critical);
334
+ }
335
+ [data-slot='select-item'][data-tone='info'] [data-slot='option-label'] {
336
+ color: var(--m-info);
337
+ }
338
+
339
+ [data-slot='swatches'] {
340
+ display: inline-flex;
341
+ gap: 2px;
342
+
343
+ & span {
344
+ width: 0.625rem;
345
+ height: 0.625rem;
346
+ border-radius: 2px;
347
+ }
348
+ }
349
+
350
+ /* Nothing matches: the message stands where the list would have, a status and not a list. */
351
+ [data-slot='autocomplete-content'][data-kind='empty'] {
352
+ z-index: 60;
353
+ box-sizing: border-box;
354
+ padding: 0.5rem 0.75rem;
355
+ border-radius: var(--m-radius);
356
+ background: var(--m-surface);
357
+ box-shadow: var(--m-shadow-pop);
358
+ color: var(--m-ink-muted);
359
+ }
360
+
361
+ /* Previous and Next say their words, in the caller's language, so the drawn chevrons step aside. */
362
+ :is([data-slot='pagination-previous'], [data-slot='pagination-next'])[data-kind='words'] {
363
+ width: auto;
364
+ padding-inline: calc(var(--ui-spacing) * 2.5);
365
+
366
+ &::before,
367
+ &::after {
368
+ content: none;
369
+ }
370
+ }
371
+
372
+ [data-slot='pagination-list'] {
373
+ flex-wrap: wrap;
374
+ }
375
+
376
+ /* Page buttons on one row. Where the room is too narrow for the whole run (a card, a phone) the row keeps the
377
+ steps and the current page, rather than wrapping its tail onto a line of its own ("… 9 Next"). */
378
+ [data-slot='pagination'] {
379
+ container-type: inline-size;
380
+ }
381
+
382
+ @container (max-width: 36rem) {
383
+ [data-slot='pagination-item']:has(> [data-slot='pagination-link']:not([aria-current='page']), > [data-slot='pagination-ellipsis']) {
384
+ display: none;
385
+ }
386
+ }
387
+
388
+ a[data-slot='button'] {
389
+ text-decoration: none;
390
+ }
391
+
392
+ [data-slot='tabs-panel'][data-kind='kit'] {
393
+ padding-block-start: 0.75rem;
394
+ }
395
+
396
+ [data-slot='avatar'][data-size='md'] {
397
+ width: 2.25rem;
398
+ height: 2.25rem;
399
+ font-size: 0.8125rem;
400
+ }
401
+
402
+ [data-slot='avatar'][data-size='lg'] {
403
+ width: 3rem;
404
+ height: 3rem;
405
+ font-size: 1rem;
406
+ }
407
+
408
+ [data-slot='avatar'][data-size='sm'] {
409
+ width: 1.75rem;
410
+ height: 1.75rem;
411
+ font-size: 0.6875rem;
412
+ }
413
+
414
+ /* A dialog that leaves a sliver of the page around it on a phone reads as a mistake, so it takes the screen. */
415
+ [data-slot='dialog-content'][data-kind='modal'] {
416
+ border-radius: calc(var(--m-radius) + 4px);
417
+
418
+ &[data-fullscreen='always'] {
419
+ inset: 0;
420
+ width: 100%;
421
+ height: 100dvh;
422
+ max-height: none;
423
+ border: 0;
424
+ border-radius: 0;
425
+ }
426
+ }
427
+
428
+ /* The cross a dialog is closed by (Modal's `closeLabel`): in the box's top corner, a square the size a hand finds
429
+ with the mark at a size it is seen at, quiet until it is pointed at. It is the box's last child, so the first
430
+ Tab goes to the question and not to the way out. */
431
+ [data-slot='dialog-content'] > [data-slot='dialog-close'][data-part='cross'] {
432
+ position: absolute;
433
+ top: var(--m-space-3);
434
+ right: var(--m-space-3);
435
+ display: grid;
436
+ place-items: center;
437
+ width: 1.75rem;
438
+ height: 1.75rem;
439
+ min-height: 0;
440
+ padding: 0;
441
+ border: 0;
442
+ border-radius: var(--m-radius);
443
+ background: none;
444
+ color: var(--m-ink-muted);
445
+ font-size: calc(1.25rem * var(--type-k, 1));
446
+ line-height: 1;
447
+ cursor: pointer;
448
+
449
+ &:hover:not(:disabled) {
450
+ color: var(--m-ink);
451
+ background: var(--m-raised);
452
+ }
453
+
454
+ &:disabled {
455
+ opacity: 0.45;
456
+ cursor: not-allowed;
457
+ }
458
+ }
459
+
460
+ /* The box's title keeps clear of it. */
461
+ [data-slot='dialog-content']:has(> [data-slot='dialog-close'][data-part='cross']) :is(h1, h2, h3):first-child {
462
+ padding-inline-end: 2rem;
463
+ }
464
+
465
+ @media (max-width: 640px) {
466
+ [data-slot='dialog-content'][data-kind='modal'][data-fullscreen='mobile'] {
467
+ inset: 0;
468
+ width: 100%;
469
+ height: 100dvh;
470
+ max-height: none;
471
+ border: 0;
472
+ border-radius: 0;
473
+ }
474
+ }
475
+
476
+ [data-slot='drawer-content'][data-kind='sheet'] [data-slot='drawer-title'] {
477
+ margin: 0;
478
+ }
479
+
480
+ /* What a caller puts in a drawer is its own; it is only kept apart, a field's gap between each. */
481
+ [data-slot='drawer-content'][data-kind='sheet'] [data-slot='sheet-body'] {
482
+ display: flex;
483
+ flex-direction: column;
484
+ gap: 1rem;
485
+
486
+ & > p {
487
+ margin: 0;
488
+ }
489
+ }
490
+ }
491
+
492
+ /* `buttonClass`: the button's dress by class, for an element that must stay what it is and cannot be a
493
+ `ButtonLink` (kit/rest.tsx). The same tokens and sizes as the button's own. */
494
+ @layer m-parts {
495
+ .ui-button {
496
+ display: inline-flex;
497
+ align-items: center;
498
+ justify-content: center;
499
+ gap: var(--m-space-2h);
500
+ height: calc(var(--m-unit) * 8);
501
+ padding-inline: var(--m-space-4);
502
+ border: 1px solid var(--m-line-control);
503
+ border-radius: var(--m-radius-control, var(--m-radius));
504
+ background: var(--m-surface);
505
+ color: var(--m-ink);
506
+ font: inherit;
507
+ font-weight: var(--m-weight-medium);
508
+ text-decoration: none;
509
+ white-space: nowrap;
510
+ cursor: pointer;
511
+
512
+ &:hover {
513
+ background: var(--m-raised);
514
+ }
515
+
516
+ &:focus-visible {
517
+ outline: 2px solid var(--ui-ring);
518
+ outline-offset: 2px;
519
+ }
520
+ }
521
+
522
+ .ui-button-primary {
523
+ border-color: var(--m-primary);
524
+ background: var(--m-primary);
525
+ color: var(--m-on-primary);
526
+
527
+ &:hover {
528
+ background: color-mix(in oklab, var(--m-primary) 88%, var(--m-surface));
529
+ }
530
+ }
531
+
532
+ .ui-button-quiet {
533
+ border-color: transparent;
534
+ background: none;
535
+ }
536
+
537
+ .ui-button-danger {
538
+ border-color: var(--m-critical);
539
+ background: var(--m-critical);
540
+ color: var(--m-surface);
541
+ }
542
+
543
+ .ui-button-compact {
544
+ height: calc(var(--m-unit) * 6.5);
545
+ padding-inline: var(--m-space-3);
546
+ font-size: var(--m-size-xs);
547
+ }
548
+
549
+ .ui-button-large {
550
+ height: calc(var(--m-unit) * 10);
551
+ padding-inline: var(--m-space-5);
552
+ }
553
+
554
+ .ui-button-block {
555
+ display: flex;
556
+ width: 100%;
557
+ }
558
+ }
@@ -0,0 +1,4 @@
1
+ /* UI SDK's layers, in order. Inside an App they are named within mistri's `components` layer, so a look, a theme
2
+ and `structure` still stand over all of them. The last, `m-own`, takes the dress off a part its caller dresses
3
+ (`data-own`), so it has to stand over every other. */
4
+ @layer m-guest, ui-sdk, m-tokens, m-parts, m-components, m-looks, m-own;