@fusion.dev/helix 0.54.0 → 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/custom-elements.json +180 -156
  2. package/dist/avatar/root/avatar-root.css.js +1 -1
  3. package/dist/avatar/root/avatar-root.d.ts +5 -1
  4. package/dist/bar-chart/root/bar-chart-root.css.js +19 -19
  5. package/dist/carousel/root/carousel-root.css.js +18 -18
  6. package/dist/carousel/root/carousel-root.d.ts +22 -15
  7. package/dist/checkbox/root/checkbox-root.css.js +20 -11
  8. package/dist/checkbox/root/checkbox-root.d.ts +19 -7
  9. package/dist/checkbox/root/checkbox-root.js +1 -1
  10. package/dist/description-list/root/description-list-root.d.ts +6 -3
  11. package/dist/dialog/root/dialog-root.css.js +3 -3
  12. package/dist/dialog/root/dialog-root.d.ts +24 -16
  13. package/dist/dialog/root/dialog-root.js +3 -3
  14. package/dist/flex/root/flex-root.css.js +8 -12
  15. package/dist/flex/root/flex-root.d.ts +23 -4
  16. package/dist/flex/root/flex-root.js +4 -4
  17. package/dist/grid/root/grid-root.css.js +3 -7
  18. package/dist/grid/root/grid-root.d.ts +14 -2
  19. package/dist/grid/root/grid-root.js +2 -2
  20. package/dist/image/root/image-root.css.js +1 -1
  21. package/dist/image/root/image-root.d.ts +7 -6
  22. package/dist/image/root/image-root.js +2 -6
  23. package/dist/megamenu/root/megamenu-root.css.js +6 -6
  24. package/dist/orb/root/orb-root.d.ts +8 -1
  25. package/dist/progress/root/progress-root.d.ts +2 -2
  26. package/dist/radio/root/radio-root.css.js +22 -12
  27. package/dist/radio/root/radio-root.d.ts +36 -14
  28. package/dist/radio/root/radio-root.js +3 -0
  29. package/dist/rating/root/rating-root.css.js +2 -2
  30. package/dist/rating/root/rating-root.d.ts +17 -12
  31. package/dist/rating/root/rating-root.js +1 -1
  32. package/dist/select/root/select-root.d.ts +5 -5
  33. package/dist/table/column/table-column.css.js +4 -4
  34. package/package.json +6 -6
  35. package/types/jsx.d.ts +1139 -487
  36. package/types/vue.d.ts +347 -136
@@ -23,7 +23,7 @@ overflow: hidden;
23
23
  --_avatar-size: var(--avatar-size, var(--helix-size-avatar-lg));
24
24
  }
25
25
 
26
- :host([shape="square"]) {
26
+ :host([shape="rounded"]) {
27
27
  border-radius: var(--helix-radii-md);
28
28
  }
29
29
 
@@ -26,8 +26,12 @@ import type { CSSResultGroup } from 'lit';
26
26
  export declare class HelixAvatar extends HelixHeadlessAvatar {
27
27
  /**
28
28
  * Whether the avatar is a circle or a rounded square.
29
+ *
30
+ * `rounded` and not `square`, which is the sharp-cornered pole of the same
31
+ * axis and what `QrCode` draws with it. This corner is `radii-md`, so the word
32
+ * for it is the one the registry already has.
29
33
  */
30
- shape?: 'circle' | 'square';
34
+ shape?: 'circle' | 'rounded';
31
35
  /**
32
36
  * Edge length of the avatar.
33
37
  */
@@ -31,7 +31,7 @@ clip-path: inset(var(--_bar-chart-foot, 0) round var(--_bar-chart-corners));
31
31
  fill: var(--_bar-chart-series);
32
32
  }
33
33
 
34
- :host([direction="horizontal"]) [part="bar"] {
34
+ :host([orientation="horizontal"]) [part="bar"] {
35
35
  --_bar-chart-corners: 0 var(--bar-chart-bar-radius, 2px) var(--bar-chart-bar-radius, 2px) 0;
36
36
  --_bar-chart-base: 0 0 0 calc(var(--bar-chart-bar-stroke, var(--helix-border-thick)) / 2);
37
37
  }
@@ -51,27 +51,27 @@ text-overflow: ellipsis;
51
51
  white-space: nowrap;
52
52
  }
53
53
 
54
- :host([direction="horizontal"]) {
54
+ :host([orientation="horizontal"]) {
55
55
  grid-template-columns: auto 1fr;
56
56
  }
57
57
 
58
- :host([direction="horizontal"]) [part="labels"] {
58
+ :host([orientation="horizontal"]) [part="labels"] {
59
59
  grid-column: 1;
60
60
  grid-row: 1;
61
61
  }
62
62
 
63
- :host([direction="horizontal"]) [part="plot"] {
63
+ :host([orientation="horizontal"]) [part="plot"] {
64
64
  grid-column: 2;
65
65
  grid-row: 1;
66
66
  }
67
67
 
68
- :host([direction="horizontal"]) [part="labels"] {
68
+ :host([orientation="horizontal"]) [part="labels"] {
69
69
  grid-auto-columns: auto;
70
70
  grid-auto-flow: row;
71
71
  grid-auto-rows: 1fr;
72
72
  }
73
73
 
74
- :host([direction="horizontal"]) [part="label"] {
74
+ :host([orientation="horizontal"]) [part="label"] {
75
75
  align-self: center;
76
76
  text-align: end;
77
77
  }
@@ -98,12 +98,12 @@ y var(--helix-duration-normal) var(--helix-easing-decelerate);
98
98
  }
99
99
 
100
100
  @starting-style {
101
- :host(:not([direction="horizontal"])) [part="bar"] {
101
+ :host(:not([orientation="horizontal"])) [part="bar"] {
102
102
  height: 0;
103
103
  y: 100;
104
104
  }
105
105
 
106
- :host([direction="horizontal"]) [part="bar"] {
106
+ :host([orientation="horizontal"]) [part="bar"] {
107
107
  width: 0;
108
108
  }
109
109
  }
@@ -166,27 +166,27 @@ grid-column: 2;
166
166
  grid-row: 2;
167
167
  }
168
168
 
169
- :host([direction="horizontal"][secondary]) {
169
+ :host([orientation="horizontal"][secondary]) {
170
170
  grid-template-columns: auto 1fr;
171
171
  grid-template-rows: auto 1fr auto;
172
172
  }
173
173
 
174
- :host([direction="horizontal"][secondary]) [part="axis"][data-axis="secondary"] {
174
+ :host([orientation="horizontal"][secondary]) [part="axis"][data-axis="secondary"] {
175
175
  grid-column: 2;
176
176
  grid-row: 1;
177
177
  }
178
178
 
179
- :host([direction="horizontal"][secondary]) [part="labels"] {
179
+ :host([orientation="horizontal"][secondary]) [part="labels"] {
180
180
  grid-column: 1;
181
181
  grid-row: 2;
182
182
  }
183
183
 
184
- :host([direction="horizontal"][secondary]) [part="plot"] {
184
+ :host([orientation="horizontal"][secondary]) [part="plot"] {
185
185
  grid-column: 2;
186
186
  grid-row: 2;
187
187
  }
188
188
 
189
- :host([direction="horizontal"][secondary]) [part="axis"][data-axis="primary"] {
189
+ :host([orientation="horizontal"][secondary]) [part="axis"][data-axis="primary"] {
190
190
  grid-column: 2;
191
191
  grid-row: 3;
192
192
  }
@@ -199,11 +199,11 @@ pointer-events: none;
199
199
  position: relative;
200
200
  }
201
201
 
202
- :host(:not([direction="horizontal"])) [part="axis"] {
202
+ :host(:not([orientation="horizontal"])) [part="axis"] {
203
203
  inline-size: var(--bar-chart-axis, 3ch);
204
204
  }
205
205
 
206
- :host([direction="horizontal"]) [part="axis"] {
206
+ :host([orientation="horizontal"]) [part="axis"] {
207
207
  block-size: 1lh;
208
208
  }
209
209
 
@@ -211,20 +211,20 @@ block-size: 1lh;
211
211
  position: absolute;
212
212
  }
213
213
 
214
- :host(:not([direction="horizontal"])) [part="tick"] {
214
+ :host(:not([orientation="horizontal"])) [part="tick"] {
215
215
  inset-inline-end: 0;
216
216
  translate: 0 -50%;
217
217
  }
218
218
 
219
- :host([direction="horizontal"]) [part="tick"] {
219
+ :host([orientation="horizontal"]) [part="tick"] {
220
220
  translate: -50% 0;
221
221
  }
222
222
 
223
- :host([direction="horizontal"]:dir(rtl)) [part="tick"] {
223
+ :host([orientation="horizontal"]:dir(rtl)) [part="tick"] {
224
224
  translate: 50% 0;
225
225
  }
226
226
 
227
- :host(:not([direction="horizontal"])) [part="axis"][data-axis="secondary"] [part="tick"] {
227
+ :host(:not([orientation="horizontal"])) [part="axis"][data-axis="secondary"] [part="tick"] {
228
228
  inset-inline-end: auto;
229
229
  inset-inline-start: 0;
230
230
  }
@@ -50,18 +50,18 @@ padding-inline: var(--_carousel-bleed);
50
50
  }
51
51
  }
52
52
 
53
- :host([indicator-placement="block-start"]) [part="indicators"] {
53
+ :host([indicator-placement="top"]) [part="indicators"] {
54
54
  grid-area: 1 / 2;
55
55
  padding-block: var(--helix-space-none) var(--helix-space-sm);
56
56
  }
57
57
 
58
- :host([controls-placement="block-start"]) [part="controls"] {
58
+ :host([controls-placement="top"]) [part="controls"] {
59
59
  grid-area: 1 / 2;
60
60
  padding-block: var(--helix-space-none) var(--helix-space-sm);
61
61
  }
62
62
 
63
- :host([indicator-placement="inline-start"]) [part="indicators"],
64
- :host([indicator-placement="inline-end"]) [part="indicators"] {
63
+ :host([indicator-placement="start"]) [part="indicators"],
64
+ :host([indicator-placement="end"]) [part="indicators"] {
65
65
  align-self: var(--_carousel-indicators-along);
66
66
  flex-direction: column;
67
67
  justify-self: center;
@@ -69,8 +69,8 @@ padding-block-start: var(--helix-space-none);
69
69
  padding-inline: var(--helix-space-none);
70
70
  }
71
71
 
72
- :host([controls-placement="inline-start"]) [part="controls"],
73
- :host([controls-placement="inline-end"]) [part="controls"] {
72
+ :host([controls-placement="start"]) [part="controls"],
73
+ :host([controls-placement="end"]) [part="controls"] {
74
74
  align-self: var(--_carousel-controls-along);
75
75
  flex-direction: column;
76
76
  justify-self: center;
@@ -78,13 +78,13 @@ padding-block-start: var(--helix-space-none);
78
78
  padding-inline: var(--helix-space-none);
79
79
  }
80
80
 
81
- :host([indicator-placement="inline-start"]) [part="indicators"],
82
- :host([indicator-placement="inline-end"]) [part="indicators"] {
81
+ :host([indicator-placement="start"]) [part="indicators"],
82
+ :host([indicator-placement="end"]) [part="indicators"] {
83
83
  --_carousel-indicators-along: center;
84
84
  }
85
85
 
86
- :host([controls-placement="inline-start"]) [part="controls"],
87
- :host([controls-placement="inline-end"]) [part="controls"],
86
+ :host([controls-placement="start"]) [part="controls"],
87
+ :host([controls-placement="end"]) [part="controls"],
88
88
  :host([controls-placement="overlay"]) [part="controls"] {
89
89
  --_carousel-controls-along: center;
90
90
  }
@@ -113,22 +113,22 @@ padding-inline: var(--helix-space-none);
113
113
  --_carousel-controls-along: end;
114
114
  }
115
115
 
116
- :host([indicator-placement="inline-start"]) [part="indicators"] {
116
+ :host([indicator-placement="start"]) [part="indicators"] {
117
117
  grid-area: 2 / 1;
118
118
  padding-inline-end: var(--helix-space-sm);
119
119
  }
120
120
 
121
- :host([controls-placement="inline-start"]) [part="controls"] {
121
+ :host([controls-placement="start"]) [part="controls"] {
122
122
  grid-area: 2 / 1;
123
123
  padding-inline-end: var(--helix-space-sm);
124
124
  }
125
125
 
126
- :host([indicator-placement="inline-end"]) [part="indicators"] {
126
+ :host([indicator-placement="end"]) [part="indicators"] {
127
127
  grid-area: 2 / 3;
128
128
  padding-inline-start: var(--helix-space-sm);
129
129
  }
130
130
 
131
- :host([controls-placement="inline-end"]) [part="controls"] {
131
+ :host([controls-placement="end"]) [part="controls"] {
132
132
  grid-area: 2 / 3;
133
133
  padding-inline-start: var(--helix-space-sm);
134
134
  }
@@ -261,15 +261,15 @@ background-color: var(--helix-color-primary);
261
261
  inline-size: var(--helix-space-lg);
262
262
  }
263
263
 
264
- :host([indicator-placement="inline-start"]) [part~="indicator"],
265
- :host([indicator-placement="inline-end"]) [part~="indicator"] {
264
+ :host([indicator-placement="start"]) [part~="indicator"],
265
+ :host([indicator-placement="end"]) [part~="indicator"] {
266
266
  transition:
267
267
  background-color var(--_carousel-indicator-motion),
268
268
  block-size var(--_carousel-indicator-motion);
269
269
  }
270
270
 
271
- :host([indicator-placement="inline-start"]) [part~="indicator"][data-current],
272
- :host([indicator-placement="inline-end"]) [part~="indicator"][data-current] {
271
+ :host([indicator-placement="start"]) [part~="indicator"][data-current],
272
+ :host([indicator-placement="end"]) [part~="indicator"][data-current] {
273
273
  block-size: var(--helix-space-lg);
274
274
  inline-size: var(--helix-space-xs);
275
275
  }
@@ -40,9 +40,9 @@ export declare class HelixCarousel extends HelixHeadlessCarousel {
40
40
  * Which side of the slides the arrows sit on.
41
41
  *
42
42
  * The same four sides as `indicatorPlacement` and the same default, so a
43
- * carousel that moves only one of them keeps the other where it was.
44
- * `inline-start` or `inline-end` stacks the arrows into a column, which is
45
- * what a vertical track usually wants.
43
+ * carousel that moves only one of them keeps the other where it was. `start`
44
+ * or `end` stacks the arrows into a column, which is what a vertical track
45
+ * usually wants.
46
46
  *
47
47
  * `overlay` puts them on the slides, at the track's own edges, which is what a
48
48
  * full-bleed carousel wants: the slide is the page and the controls are on it
@@ -56,7 +56,7 @@ export declare class HelixCarousel extends HelixHeadlessCarousel {
56
56
  * follow from it. These two placements are the whole of where a carousel's
57
57
  * chrome can go.
58
58
  */
59
- controlsPlacement?: 'block-end' | 'block-start' | 'inline-end' | 'inline-start' | 'overlay';
59
+ controlsPlacement?: 'start' | 'end' | 'top' | 'bottom' | 'overlay';
60
60
  /**
61
61
  * Where along that side the dots sit.
62
62
  *
@@ -72,8 +72,9 @@ export declare class HelixCarousel extends HelixHeadlessCarousel {
72
72
  * is a column and the same question is `align-self`. A consumer should not
73
73
  * have to know which of those two words their edge wanted.
74
74
  *
75
- * Logical, like the placement: `start` is the left in English and the right in
76
- * Arabic on a horizontal run, and the top on a vertical one.
75
+ * Logical, like the placement's own `start` and `end`: `start` is the left in
76
+ * English and the right in Arabic on a horizontal run, and the top on a
77
+ * vertical one.
77
78
  *
78
79
  * Unset splits the row, dots to the start and arrows to the end, which is
79
80
  * what keeps two items in one grid cell from landing on each other. Beside the
@@ -86,20 +87,26 @@ export declare class HelixCarousel extends HelixHeadlessCarousel {
86
87
  /**
87
88
  * Which side of the slides the dots sit on.
88
89
  *
89
- * Unset is `block-end`, under them. `block-start` puts them above,
90
- * `inline-start` and `inline-end` beside, where a run of dots becomes a
91
- * column.
90
+ * Unset is `bottom`, under them. `top` puts them above, `start` and `end`
91
+ * beside, where a run of dots becomes a column.
92
92
  *
93
- * **The sides of the content, not positions along a bar**, and logical names
94
- * rather than `top`/`left`: an `inline-start` carousel should put its dots on
95
- * the right in Arabic without being told.
93
+ * **The sides of the content, not positions along a bar.** `start` and `end`
94
+ * are the logical ones and they are logical because that axis flips: a
95
+ * carousel with its dots at the start should put them on the right in Arabic
96
+ * without being told. `top` and `bottom` are the block edges, which flip in
97
+ * no writing mode this library draws for, so the plain word is the honest one
98
+ * and `block-start` would be jargon standing in for it.
96
99
  *
97
- * Independent of `controlsPlacement`. Both default to the block end, where
98
- * they share the row and split it, dots to the start and arrows to the end,
100
+ * **`Drawer` and `Toast` say it in exactly these four words**, and one
101
+ * vocabulary across the three is worth more than each family's own: a
102
+ * consumer who has placed a drawer knows where a carousel's dots go.
103
+ *
104
+ * Independent of `controlsPlacement`. Both default to the bottom, where they
105
+ * share the row and split it, dots to the start and arrows to the end,
99
106
  * arrived at by two defaults rather than by a rule about the pair, so moving
100
107
  * one leaves the other alone.
101
108
  */
102
- indicatorPlacement?: 'block-end' | 'block-start' | 'inline-end' | 'inline-start';
109
+ indicatorPlacement?: 'start' | 'end' | 'top' | 'bottom';
103
110
  static styles: CSSResultGroup;
104
111
  }
105
112
  declare global {
@@ -105,11 +105,11 @@ border-color: var(--helix-color-danger);
105
105
  display: none;
106
106
  }
107
107
 
108
- :host([variant="card"]) {
108
+ :host(:is([separation="filled"], [separation="outlined"])) {
109
109
  display: block;
110
110
  }
111
111
 
112
- :host([variant="card"]) [part="field"] {
112
+ :host(:is([separation="filled"], [separation="outlined"])) [part="field"] {
113
113
  align-items: start;
114
114
  background-color: var(--checkbox-card-background-color, var(--helix-color-surface));
115
115
  border: var(--helix-border-thin) solid
@@ -124,30 +124,39 @@ background-color var(--helix-duration-fast) var(--helix-easing-standard),
124
124
  border-color var(--helix-duration-fast) var(--helix-easing-standard);
125
125
  }
126
126
 
127
- :host(:not(:disabled)[variant="card"]) [part="field"]:hover {
127
+ :host([separation="filled"]) [part="field"] {
128
+ border-color: transparent;
129
+ }
130
+
131
+ :host(:not(:disabled):is([separation="filled"], [separation="outlined"])) [part="field"]:hover {
128
132
  border-color: var(--helix-color-foreground-muted);
129
133
  }
130
134
 
131
- :host([variant="card"]:state(checked)) [part="field"] {
135
+ :host(:is([separation="filled"], [separation="outlined"]):state(checked)) [part="field"] {
132
136
  background-color: var(--helix-color-surface-raised);
133
137
  border-color: var(--helix-color-primary);
134
138
  box-shadow: 0 0 0 var(--helix-border-thick) var(--helix-color-primary);
135
139
  }
136
140
 
137
- :host([variant="card"]) [part="field"]:has([part="control"]:focus-visible) {
141
+ :host(:is([separation="filled"], [separation="outlined"]))
142
+ [part="field"]:has([part="control"]:focus-visible) {
138
143
  outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
139
144
  outline-offset: var(--helix-size-focus-offset);
140
145
  }
141
146
 
142
- :host([variant="card"]) [part="control"]:focus-visible {
147
+ :host(:is([separation="filled"], [separation="outlined"])) [part="control"]:focus-visible {
143
148
  outline: none;
144
149
  }
145
150
 
146
- :host([variant="card"]) [part="box"] {
147
- margin-block-start: calc(
148
- (var(--helix-text-sm) * var(--helix-leading-tight) - var(--_checkbox-size)) /
149
- 2
150
- );
151
+ :host(:is([separation="filled"], [separation="outlined"])) [part="label"] {
152
+ font-size: var(--helix-text-md);
153
+ line-height: var(--helix-leading-normal);
154
+ }
155
+
156
+ :host(:is([separation="filled"], [separation="outlined"])) [part="box"] {
157
+ font-size: var(--helix-text-md);
158
+ line-height: var(--helix-leading-normal);
159
+ min-block-size: 1lh;
151
160
  }
152
161
 
153
162
  @media print {
@@ -30,20 +30,32 @@ import type { CSSResultGroup } from 'lit';
30
30
  export declare class HelixCheckbox extends HelixHeadlessCheckbox {
31
31
  static styles: CSSResultGroup;
32
32
  /**
33
- * How the choice presents itself.
33
+ * Where the choice's own surface ends.
34
34
  *
35
- * - `plain` is the default and is never written: a box beside its words,
35
+ * The question `separation` asks everywhere else, asked of one option, so it
36
+ * is that word: what these values pick is a surface, and `plain` is already
37
+ * the registry's own word for the answer this family used it for. `Radio`
38
+ * takes the same three for the same reason.
39
+ *
40
+ * - `plain` is the resting one and is never written: a box beside its words,
36
41
  * which is what a list of choices should be almost always.
37
- * - `card` puts it in a bounded surface, for options that need room to
42
+ * - `outlined` puts it in a bounded surface, for options that need room to
38
43
  * explain themselves: a description, an icon, a price. It is the half a
39
44
  * `data-card` link cannot do, because a link reports no value and belongs
40
45
  * to no group, so a card that is genuinely an answer has to be this.
46
+ * - `filled` is that same card on a ground of its own with no edge, which is
47
+ * what a column of options wants where a hairline around every one of them
48
+ * is a grid of lines rather than a set of answers.
49
+ *
50
+ * **`elevated` is the one value of the axis this family does not take.** A
51
+ * raised choice competes with a dialog: the top layer is where a thing that
52
+ * interrupts you lives, and an option in a form is not one of those.
41
53
  *
42
- * The box stays in both. A card whose only marker was its own border would
43
- * ask a reader to compare surfaces across a row to find the answer, and would
44
- * leave nothing for a high-contrast display.
54
+ * The box stays in all of them. A card whose only marker was its own border
55
+ * would ask a reader to compare surfaces across a row to find the answer, and
56
+ * would leave nothing for a high-contrast display.
45
57
  */
46
- variant?: 'plain' | 'card';
58
+ separation?: 'filled' | 'outlined' | 'plain';
47
59
  }
48
60
  declare global {
49
61
  interface HTMLElementTagNameMap {
@@ -15,7 +15,7 @@ let HelixCheckbox = class HelixCheckbox extends HelixHeadlessCheckbox {
15
15
  };
16
16
  __decorate([
17
17
  property({ reflect: true })
18
- ], HelixCheckbox.prototype, "variant", void 0);
18
+ ], HelixCheckbox.prototype, "separation", void 0);
19
19
  HelixCheckbox = __decorate([
20
20
  customElement('helix-checkbox')
21
21
  ], HelixCheckbox);
@@ -37,9 +37,12 @@ export declare class HelixDescriptionList extends HelixHeadlessDescriptionList {
37
37
  * width so a column of numbers lines up by its digits. Only with
38
38
  * `direction="row"`: stacked, a label and its value share one edge already.
39
39
  *
40
- * Flex's word for the same thing, and a grid rather than a flex row
41
- * underneath, so the labels still share one column while the values share an
42
- * end.
40
+ * Flex's value for the same idea, under a shorter name than Flex's own:
41
+ * there it is `justify-content`, the CSS property it sets, and here the
42
+ * underlying layout is a grid handing an edge down to each item as a custom
43
+ * property, so the labels still share one column while the values share an
44
+ * end. Naming a property this does not set after it would be the wrong kind
45
+ * of precision.
43
46
  */
44
47
  justify?: 'between';
45
48
  /**
@@ -164,15 +164,15 @@ display: block;
164
164
  inline-size: var(--dialog-icon-size, calc(var(--helix-size-icon-lg) * 2));
165
165
  }
166
166
 
167
- :host([align="center"]) [part="dialog"] {
167
+ :host([text-align="center"]) [part="dialog"] {
168
168
  text-align: center;
169
169
  }
170
170
 
171
- :host([align="center"]) ::slotted([slot="footer"]) {
171
+ :host([text-align="center"]) ::slotted([slot="footer"]) {
172
172
  justify-content: center;
173
173
  }
174
174
 
175
- :host([align="center"]) ::slotted([slot="icon"]) {
175
+ :host([text-align="center"]) ::slotted([slot="icon"]) {
176
176
  margin-inline: auto;
177
177
  }
178
178
 
@@ -29,19 +29,6 @@ import type { CSSResultGroup } from 'lit';
29
29
  * floating surface sits over content nobody can predict, so it keeps a lift by default.
30
30
  */
31
31
  export declare class HelixDialog extends HelixHeadlessDialog {
32
- /**
33
- * Which way the panel's contents read.
34
- *
35
- * One property for the whole panel rather than one per region. The regions are
36
- * never mixed in practice: a dialog that asks a short question centers its
37
- * mark, its title, its sentence and its buttons together, and a dialog holding
38
- * a form runs all four from the start. Three properties would be three ways to
39
- * write the same two arrangements, and a fourth way to get one of them wrong.
40
- *
41
- * Unset is `start` and stays unset, so a reflected default cannot appear on a
42
- * host whose server output never had it.
43
- */
44
- align?: 'center' | 'start';
45
32
  /**
46
33
  * How wide the panel is allowed to be.
47
34
  *
@@ -59,11 +46,32 @@ export declare class HelixDialog extends HelixHeadlessDialog {
59
46
  * rule's own test is whether two of them sitting together could legitimately
60
47
  * differ, and it is answering "a ragged row is unwritable". Two dialogs never
61
48
  * sit together. One is on screen at a time, in the top layer, and it is the
62
- * region rather than a control in one, which is the same reason `Avatar` and
63
- * `Spinner` keep theirs. Not `appearance`, which says how a thing reads
64
- * rather than how wide it is.
49
+ * region rather than a control in one, which is the other half of the axis's
50
+ * domain: the rest of it is pictures, which are not controls either. Not
51
+ * `appearance`, which says how a thing reads rather than how wide it is.
65
52
  */
66
53
  size?: 'sm' | 'md' | 'lg' | 'full';
54
+ /**
55
+ * Which way the panel's contents read.
56
+ *
57
+ * **Text alignment, and the name says so.** `Flex` and `Grid` ask the CSS
58
+ * box-alignment question, where things sit in a container, and they are named
59
+ * for the properties they mirror; this one is `text-align` on a panel of
60
+ * prose, and `Table.Column` answers the same question under the same name.
61
+ * One word for both questions is how a consumer who learned it on a layout
62
+ * writes it here and gets no error, a value a component does not have leaving
63
+ * the default in place and looking deliberate.
64
+ *
65
+ * One property for the whole panel rather than one per region. The regions are
66
+ * never mixed in practice: a dialog that asks a short question centers its
67
+ * mark, its title, its sentence and its buttons together, and a dialog holding
68
+ * a form runs all four from the start. Three properties would be three ways to
69
+ * write the same two arrangements, and a fourth way to get one of them wrong.
70
+ *
71
+ * Unset is `start` and stays unset, so a reflected default cannot appear on a
72
+ * host whose server output never had it.
73
+ */
74
+ textAlign?: 'center' | 'start';
67
75
  static styles: CSSResultGroup;
68
76
  }
69
77
  declare global {
@@ -11,12 +11,12 @@ import { styles } from './dialog-root.css.js';
11
11
  let HelixDialog = class HelixDialog extends HelixHeadlessDialog {
12
12
  static { this.styles = styles; }
13
13
  };
14
- __decorate([
15
- property({ reflect: true })
16
- ], HelixDialog.prototype, "align", void 0);
17
14
  __decorate([
18
15
  property({ reflect: true })
19
16
  ], HelixDialog.prototype, "size", void 0);
17
+ __decorate([
18
+ property({ attribute: 'text-align', reflect: true })
19
+ ], HelixDialog.prototype, "textAlign", void 0);
20
20
  HelixDialog = __decorate([
21
21
  customElement('helix-dialog')
22
22
  ], HelixDialog);
@@ -43,33 +43,29 @@ gap: var(--helix-space-2xl);
43
43
  gap: var(--helix-space-3xl);
44
44
  }
45
45
 
46
- :host([align]) {
47
- text-align: inherit;
48
- }
49
-
50
- :host([align="start"]) {
46
+ :host([align-items="start"]) {
51
47
  align-items: flex-start;
52
48
  }
53
- :host([align="center"]) {
49
+ :host([align-items="center"]) {
54
50
  align-items: center;
55
51
  }
56
- :host([align="end"]) {
52
+ :host([align-items="end"]) {
57
53
  align-items: flex-end;
58
54
  }
59
- :host([align="baseline"]) {
55
+ :host([align-items="baseline"]) {
60
56
  align-items: baseline;
61
57
  }
62
58
 
63
- :host([justify="center"]) {
59
+ :host([justify-content="center"]) {
64
60
  justify-content: center;
65
61
  }
66
- :host([justify="end"]) {
62
+ :host([justify-content="end"]) {
67
63
  justify-content: flex-end;
68
64
  }
69
- :host([justify="between"]) {
65
+ :host([justify-content="between"]) {
70
66
  justify-content: space-between;
71
67
  }
72
- :host([justify="around"]) {
68
+ :host([justify-content="around"]) {
73
69
  justify-content: space-around;
74
70
  }
75
71
 
@@ -28,9 +28,24 @@ import type { CSSResultGroup, TemplateResult } from 'lit';
28
28
  */
29
29
  export declare class HelixFlex extends HelixElement {
30
30
  /**
31
- * Alignment across the direction.
31
+ * Alignment across the direction, which is `align-items`.
32
+ *
33
+ * **Named for the CSS property it sets, because it is that property.** A flex
34
+ * container is the one place where the box-alignment words are already the
35
+ * reader's, so a shorter name would be a second vocabulary for something they
36
+ * can already say, and `align` alone is the word four other families use for
37
+ * four other questions: `Dialog` and `Table.Column` mean `text-align` by it.
38
+ *
39
+ * **It also keeps the name out of the browser's way.** `align` is a legacy
40
+ * HTML presentational attribute mapped to `text-align` on any element that
41
+ * carries one, this one included: measured, an invented tag with
42
+ * `align="center"` computes centered text too, so it is nothing to do with
43
+ * being a known element. A row that carried it therefore centered the text
44
+ * inside every field in it, through a hint no rule here declares and none can
45
+ * see, and the fix is a name the platform has no opinion about rather than a
46
+ * guard against the hint.
32
47
  */
33
- align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
48
+ alignItems?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
34
49
  /**
35
50
  * Whether items run across or down.
36
51
  */
@@ -44,9 +59,13 @@ export declare class HelixFlex extends HelixElement {
44
59
  */
45
60
  inline: boolean;
46
61
  /**
47
- * Distribution along the direction.
62
+ * Distribution along the direction, which is `justify-content`.
63
+ *
64
+ * Named for the property it sets, the way `alignItems` is. `between` and
65
+ * `around` drop the `space-` prefix and nothing else does, because those two
66
+ * are the only values whose CSS spelling is two words.
48
67
  */
49
- justify?: 'start' | 'center' | 'end' | 'between' | 'around';
68
+ justifyContent?: 'start' | 'center' | 'end' | 'between' | 'around';
50
69
  /**
51
70
  * Whether items wrap onto more lines.
52
71
  */
@@ -20,8 +20,8 @@ let HelixFlex = class HelixFlex extends HelixElement {
20
20
  static { this.styles = styles; }
21
21
  };
22
22
  __decorate([
23
- property({ reflect: true })
24
- ], HelixFlex.prototype, "align", void 0);
23
+ property({ attribute: 'align-items', reflect: true })
24
+ ], HelixFlex.prototype, "alignItems", void 0);
25
25
  __decorate([
26
26
  property({ reflect: true })
27
27
  ], HelixFlex.prototype, "direction", void 0);
@@ -32,8 +32,8 @@ __decorate([
32
32
  property({ reflect: true, type: Boolean })
33
33
  ], HelixFlex.prototype, "inline", void 0);
34
34
  __decorate([
35
- property({ reflect: true })
36
- ], HelixFlex.prototype, "justify", void 0);
35
+ property({ attribute: 'justify-content', reflect: true })
36
+ ], HelixFlex.prototype, "justifyContent", void 0);
37
37
  __decorate([
38
38
  property({ reflect: true, type: Boolean })
39
39
  ], HelixFlex.prototype, "wrap", void 0);