@ostack.tech/ui 1.3.0 → 1.3.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 (47) hide show
  1. package/dist/chunks/{en-Czf-_HZt.js → en-MXAz48KY.js} +2 -1
  2. package/dist/chunks/{en-Czf-_HZt.js.map → en-MXAz48KY.js.map} +1 -1
  3. package/dist/locales/en-GB.js +1 -1
  4. package/dist/locales/en-US.js +1 -1
  5. package/dist/locales/fr-FR.js +1 -0
  6. package/dist/locales/fr-FR.js.map +1 -1
  7. package/dist/locales/pt-PT.js +1 -0
  8. package/dist/locales/pt-PT.js.map +1 -1
  9. package/dist/ostack-ui.css +88 -83
  10. package/dist/ostack-ui.js +1120 -1022
  11. package/dist/ostack-ui.js.map +1 -1
  12. package/package.json +1 -1
  13. package/scss/components/Calendar/_Calendar-variables.scss +1 -1
  14. package/scss/components/Calendar/_Calendar.scss +15 -16
  15. package/scss/components/ControlAddon/_ControlAddon.scss +3 -5
  16. package/scss/components/DataTable/_DataTable.scss +7 -2
  17. package/scss/components/DropdownMenu/_DropdownMenu.scss +1 -1
  18. package/scss/components/Feedback/_Feedback.scss +2 -0
  19. package/scss/components/Field/_Field.scss +0 -1
  20. package/scss/components/HelperText/_HelperText.scss +2 -1
  21. package/scss/components/Input/_Input.scss +1 -1
  22. package/scss/components/Label/_Label.scss +1 -0
  23. package/scss/components/Link/_Link.scss +1 -1
  24. package/scss/components/Root/_Root.scss +1 -1
  25. package/scss/components/Stack/_Stack.scss +1 -1
  26. package/scss/components/Table/_Table.scss +23 -9
  27. package/scss/components/Tabs/_Tabs.scss +2 -2
  28. package/scss/scss/helpers/_margin-utils.scss +13 -11
  29. package/scss/scss/helpers/_padding-utils.scss +13 -11
  30. package/scss/scss/helpers/_sizing-utils.scss +19 -17
  31. package/scss/scss/helpers/_text-utils.scss +19 -17
  32. package/scss/scss/helpers/_visually-hidden.scss +1 -1
  33. package/scss/scss/utils/_button-reset.scss +1 -1
  34. package/types/components/Form/FormError.d.ts +1 -1
  35. package/types/components/Keybinds/KeyPress.d.ts +3 -3
  36. package/types/components/Keybinds/Keybind.d.ts +2 -2
  37. package/types/components/Keybinds/Keybinds.d.ts +1 -1
  38. package/types/components/Printer/Printer.d.ts +1 -1
  39. package/types/components/Printer/PrinterContentContext.d.ts +4 -16
  40. package/types/components/Printer/PrinterContext.d.ts +1 -2
  41. package/types/components/Printer/index.d.ts +1 -1
  42. package/types/components/Printer/usePrintClassNames.d.ts +6 -2
  43. package/types/components/Table/TableContext.d.ts +2 -0
  44. package/types/components/Table/columnUtils.d.ts +4 -0
  45. package/types/index.d.ts +1 -0
  46. package/types/utils/useIntersectionObserver.d.ts +6 -2
  47. package/types/utils/useResizeObserver.d.ts +6 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ostack.tech/ui",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Accessible React component library.",
5
5
  "homepage": "https://ui.ostack.tech/",
6
6
  "license": "Apache-2.0",
@@ -36,7 +36,7 @@ $calendar-header-button-hover-background-color: rgba(0, 0, 0, 0.1) !default;
36
36
  $calendar-header-button-active-background-color: rgba(0, 0, 0, 0.2) !default;
37
37
 
38
38
  // Select
39
- $calendar-select-padding-x: spacing(2.5) !default;
39
+ $calendar-select-padding-x: spacing(2) !default;
40
40
 
41
41
  // Select arrow
42
42
  $calendar-select-arrow-color: rgba(255, 255, 255, 0.8) !default;
@@ -84,7 +84,7 @@
84
84
  background-color: $calendar-header-button-background-color;
85
85
  outline-color: $calendar-header-button-focus-outline-color;
86
86
 
87
- &:is(:hover, :focus):not(:active):not(:disabled) {
87
+ &:is(:hover, :focus):not(:active, :disabled) {
88
88
  background-color: $calendar-header-button-hover-background-color !important;
89
89
  }
90
90
  &:active:not(:disabled) {
@@ -111,7 +111,7 @@
111
111
  &[data-focused]:not([data-disabled]) {
112
112
  box-shadow: 0 0 0 2px $calendar-header-button-focus-outline-color;
113
113
  }
114
- &:is(:hover, [data-focused]):not([data-disabled]):not([data-state="open"]) {
114
+ &:is(:hover, [data-focused]):not([data-disabled], [data-state="open"]) {
115
115
  background-color: $calendar-header-button-hover-background-color !important;
116
116
  }
117
117
  &[data-state="open"] {
@@ -184,13 +184,12 @@
184
184
  }
185
185
  }
186
186
 
187
- &:not(&--outside):not(&--selected:not(&--range-middle)):not(&--disabled)
187
+ &:not(&--outside, &--selected:not(&--range-middle), &--disabled)
188
188
  &-inner:is(button):is(:hover, :focus) {
189
189
  background-color: $calendar-day-inner-hover-background-color;
190
190
  }
191
191
 
192
- &:not(&--outside):not(&--selected:not(&--range-middle)):not(&--disabled)
193
- &-inner:is(button):active {
192
+ &:not(&--outside, &--selected:not(&--range-middle), &--disabled) &-inner:is(button):active {
194
193
  background-color: $calendar-day-inner-active-background-color;
195
194
  }
196
195
 
@@ -203,7 +202,7 @@
203
202
  opacity: $calendar-day-inner-disabled-opacity;
204
203
  }
205
204
 
206
- &--selected:not(&--outside):not(&--range-middle) &-inner {
205
+ &--selected:not(&--outside, &--range-middle) &-inner {
207
206
  background-color: $calendar-day-inner-selected-background-color;
208
207
  color: $calendar-day-inner-selected-color;
209
208
 
@@ -217,7 +216,7 @@
217
216
  }
218
217
  }
219
218
 
220
- &--today:not(&--outside):not(&--selected:not(&--range-middle)) &-inner:not(:focus-visible) {
219
+ &--today:not(&--outside, &--selected:not(&--range-middle)) &-inner:not(:focus-visible) {
221
220
  border: $calendar-day-inner-today-border-width solid $calendar-day-inner-today-border-color;
222
221
  }
223
222
 
@@ -263,11 +262,11 @@
263
262
  background-color: $calendar-range-background-color;
264
263
  }
265
264
 
266
- &--range-start:not(&--range-end):not(&--outside) &-inner::before {
265
+ &--range-start:not(&--range-end, &--outside) &-inner::before {
267
266
  left: calc($calendar-day-inner-size / 2);
268
267
  }
269
268
 
270
- &--range-end:not(&--range-start):not(&--outside) &-inner::before {
269
+ &--range-end:not(&--range-start, &--outside) &-inner::before {
271
270
  right: calc($calendar-day-inner-size / 2);
272
271
  }
273
272
 
@@ -293,29 +292,29 @@
293
292
  border-image-slice: $calendar-range-focus-border-image-slice;
294
293
  }
295
294
 
296
- &--focused-range-start:not(&--focused-range-end):not(&--outside) &-inner::after {
295
+ &--focused-range-start:not(&--focused-range-end, &--outside) &-inner::after {
297
296
  left: calc($calendar-day-inner-size / 2);
298
297
  }
299
298
 
300
- &--focused-range-end:not(&--focused-range-start):not(&--outside) &-inner::after {
299
+ &--focused-range-end:not(&--focused-range-start, &--outside) &-inner::after {
301
300
  right: calc($calendar-day-inner-size / 2);
302
301
  }
303
302
 
304
303
  :is(&--focused-range-start:not(&--range-start), &--focused-range-end:not(&--range-end)):not(
305
- &--disabled
306
- ):not(&--outside)
304
+ &--disabled,
305
+ &--outside
306
+ )
307
307
  &-inner {
308
308
  border: $calendar-range-border-width $calendar-range-focus-border-style
309
309
  $calendar-range-focus-border-color;
310
310
  background-color: $calendar-range-background-color;
311
311
  }
312
312
 
313
- &--focused-range-start:not(&--range-start):not(&--today):not(&--disabled):not(&--outside)
314
- &-inner {
313
+ &--focused-range-start:not(&--range-start, &--today, &--disabled, &--outside) &-inner {
315
314
  border-right-color: transparent;
316
315
  }
317
316
 
318
- &--focused-range-end:not(&--range-end):not(&--today):not(&--disabled):not(&--outside) &-inner {
317
+ &--focused-range-end:not(&--range-end, &--today, &--disabled, &--outside) &-inner {
319
318
  border-left-color: transparent;
320
319
  }
321
320
  }
@@ -105,7 +105,7 @@
105
105
  }
106
106
 
107
107
  // Muted style
108
- &[data-muted]:not(button):not(:any-link) {
108
+ &[data-muted]:not(button, :any-link) {
109
109
  opacity: $control-disabled-opacity;
110
110
  }
111
111
 
@@ -197,9 +197,7 @@
197
197
 
198
198
  &:is(:any-link, button) {
199
199
  // Button - Hover
200
- &:hover:not(:disabled):not([data-disabled]):not(:active):not([data-active]):not(
201
- [data-state="open"]
202
- ) {
200
+ &:hover:not(:disabled, [data-disabled], :active, [data-active], [data-state="open"]) {
203
201
  @include declare-var(
204
202
  --#{$prefix}control-addon-background-color,
205
203
  map.get($control-addon-button-hover-background-color-by-variant, $variant)
@@ -223,7 +221,7 @@
223
221
  }
224
222
 
225
223
  // Button - Active
226
- &:is(:active, [data-active]):not(:disabled):not([data-disabled]),
224
+ &:is(:active, [data-active]):not(:disabled, [data-disabled]),
227
225
  &[data-state="open"] {
228
226
  @include declare-var(
229
227
  --#{$prefix}control-addon-background-color,
@@ -2,6 +2,7 @@
2
2
  @use "../ControlCode/ControlCode-variables" as *;
3
3
  @use "../../scss/base-variables" as *;
4
4
  @use "../../scss/utils/breakpoints" as *;
5
+ @use "../../scss/utils/declare-var" as *;
5
6
  @use "../../scss/utils/spacing" as *;
6
7
  @use "../../scss/utils/transition" as *;
7
8
  @use "../../scss/utils/maybe-important" as *;
@@ -13,6 +14,10 @@
13
14
  flex-wrap: wrap;
14
15
  align-items: center;
15
16
 
17
+ @media print {
18
+ display: block;
19
+ }
20
+
16
21
  // Empty message
17
22
  &__empty-message {
18
23
  color: $data-table-empty-message-color;
@@ -21,7 +26,7 @@
21
26
  // When in scrolled mode, the virtualization component uses mock rows
22
27
  &__row[data-last-row] {
23
28
  & > #{$data-table}__cell {
24
- border-bottom-width: 0 !important;
29
+ @include declare-var(--#{$prefix}table-cell-border-bottom-width, 0px !important);
25
30
  }
26
31
  }
27
32
 
@@ -95,7 +100,7 @@
95
100
  margin-top: var(--#{$prefix}mt, $data-table-child-gap-y);
96
101
  margin-bottom: var(--#{$prefix}mb, 0);
97
102
  }
98
- & > *:not(&__content-container):not(:first-child) {
103
+ & > *:not(&__content-container, :first-child) {
99
104
  margin-left: var(--#{$prefix}ml, $data-table-child-gap-x);
100
105
  }
101
106
  & > &__content-container + * {
@@ -24,7 +24,7 @@
24
24
  }
25
25
 
26
26
  :is(&__item, &__checkbox-item, &__radio-item)
27
- #{$menu-list-item-action}:not(a):not(:disabled, [data-disabled]) {
27
+ #{$menu-list-item-action}:not(a, :disabled, [data-disabled]) {
28
28
  cursor: $menu-item-button-cursor;
29
29
  }
30
30
 
@@ -9,6 +9,7 @@
9
9
  font-weight: var(--#{$prefix}font-weight, $feedback-font-weight);
10
10
  }
11
11
  color: $feedback-color;
12
+ break-before: avoid;
12
13
 
13
14
  @if $feedback-text-align == right {
14
15
  :not(.#{$prefix}checkbox__root, .#{$prefix}checkbox-group, .#{$prefix}radio-group) ~ & {
@@ -46,6 +47,7 @@
46
47
  margin-top: var(--#{$prefix}mt, 0);
47
48
  margin-bottom: var(--#{$prefix}mb, 0);
48
49
  padding: 0;
50
+ break-before: avoid;
49
51
 
50
52
  &:empty {
51
53
  display: none;
@@ -3,7 +3,6 @@
3
3
 
4
4
  .#{$prefix}field {
5
5
  width: var(--#{$prefix}w, 100%);
6
- break-inside: avoid;
7
6
 
8
7
  // Add spacing to labels and codes
9
8
  & > :is(.#{$prefix}control-code, .#{$prefix}label__container) {
@@ -8,9 +8,10 @@
8
8
  font-weight: var(--#{$prefix}font-weight, $helper-text-font-weight);
9
9
  }
10
10
  color: $helper-text-color;
11
+ break-before: avoid;
11
12
 
12
13
  @if $helper-text-text-align == right {
13
- :not(.#{$prefix}checkbox__root):not(.#{$prefix}checkbox-group):not(.#{$prefix}radio-group) + & {
14
+ :not(.#{$prefix}checkbox__root, .#{$prefix}checkbox-group, .#{$prefix}radio-group) + & {
14
15
  text-align: var(--#{$prefix}text-align, $helper-text-text-align);
15
16
  }
16
17
  }
@@ -93,7 +93,7 @@
93
93
  var(--#{$prefix}control-padding-y) * 2
94
94
  );
95
95
 
96
- &:not(:disabled):not([readonly]) {
96
+ &:not(:disabled, [readonly]) {
97
97
  cursor: $input-file-cursor;
98
98
  }
99
99
 
@@ -29,6 +29,7 @@
29
29
  min-width: 0;
30
30
  display: inline-flex;
31
31
  align-items: center;
32
+ break-after: avoid;
32
33
  }
33
34
 
34
35
  &__required-icon-container {
@@ -52,7 +52,7 @@
52
52
  }
53
53
 
54
54
  // Button
55
- &:is(button):not(:any-link) {
55
+ &:is(button, :any-link) {
56
56
  text-transform: $link-button-text-transform;
57
57
  color: $link-button-color;
58
58
  text-decoration-line: $link-button-text-decoration-line;
@@ -86,7 +86,7 @@
86
86
  }
87
87
  }
88
88
 
89
- li:not([class]):not(:first-child) {
89
+ li:not([class], :first-child) {
90
90
  margin-top: $root-list-item-margin-y;
91
91
  }
92
92
  }
@@ -29,7 +29,7 @@
29
29
  );
30
30
 
31
31
  // Handle margins of non-stack children
32
- & > :not(style) + :not(style):not(&) {
32
+ & > :not(style) + :not(style, &) {
33
33
  margin: calc(var(--#{$prefix}mt, 0px) + var(--#{$prefix}stack-child-mt))
34
34
  calc(var(--#{$prefix}mr, 0px) + var(--#{$prefix}stack-child-mr))
35
35
  calc(var(--#{$prefix}mb, 0px) + var(--#{$prefix}stack-child-mb))
@@ -23,6 +23,10 @@
23
23
  display: flex;
24
24
  flex-direction: column;
25
25
  align-items: $table-container-align-items;
26
+
27
+ @media print {
28
+ display: block;
29
+ }
26
30
  }
27
31
 
28
32
  &__caption {
@@ -46,7 +50,8 @@
46
50
  overflow: auto;
47
51
 
48
52
  @media print {
49
- overflow: unset;
53
+ display: block;
54
+ overflow: clip;
50
55
  min-width: 100%;
51
56
  width: min-content;
52
57
  }
@@ -345,15 +350,21 @@
345
350
  }
346
351
 
347
352
  // Add borders to rows
348
- & > &__head > &__row > &__cell,
349
353
  &__row:not(:last-child) > &__cell {
350
- border-bottom-width: $table-cell-border-width;
354
+ @include declare-var(--#{$prefix}table-cell-border-bottom-width, $table-cell-border-width);
351
355
  }
352
356
 
353
357
  // Bottom border of table head rows
354
358
  & > &__head > &__row > &__cell {
355
- border-bottom: var(--#{$prefix}table-head-border-width) solid
356
- var(--#{$prefix}table-head-border-color, var(--#{$prefix}table-cell-border-color));
359
+ @include declare-var(
360
+ --#{$prefix}table-cell-border-bottom-width,
361
+ var(--#{$prefix}table-head-border-width)
362
+ );
363
+ border-bottom-style: solid;
364
+ border-bottom-color: var(
365
+ --#{$prefix}table-head-border-color,
366
+ var(--#{$prefix}table-cell-border-color)
367
+ );
357
368
  }
358
369
 
359
370
  // Top-border of table foot
@@ -374,9 +385,12 @@
374
385
  font-weight: var(--#{$prefix}table-cell-font-weight);
375
386
  text-transform: var(--#{$prefix}table-cell-text-transform);
376
387
 
388
+ @include declare-var(--#{$prefix}table-cell-border-bottom-width, 0px);
377
389
  @include declare-var(--#{$prefix}table-cell-border-color, $table-cell-border-color);
378
- border: 0 var(--#{$prefix}table-cell-border-style, solid)
379
- var(--#{$prefix}table-cell-border-color);
390
+ border-width: 0;
391
+ border-bottom-width: var(--#{$prefix}table-cell-border-bottom-width, 0px);
392
+ border-style: var(--#{$prefix}table-cell-border-style, solid);
393
+ border-color: var(--#{$prefix}table-cell-border-color);
380
394
  background-color: var(--#{$prefix}table-cell-background-color, $table-cell-background-color);
381
395
  color: var(--#{$prefix}table-cell-color);
382
396
 
@@ -389,7 +403,7 @@
389
403
 
390
404
  // Framed styles
391
405
  &[data-framed] {
392
- .#{$prefix}table__head &:not([data-left-most-column]):not(:first-child),
406
+ .#{$prefix}table__head &:not([data-left-most-column], :first-child),
393
407
  .#{$prefix}table > .#{$prefix}table__row > &:not(:first-child),
394
408
  .#{$prefix}table > .#{$prefix}table__body > .#{$prefix}table__row > &:not(:first-child) {
395
409
  border-left-width: $table-cell-framed-border-width;
@@ -422,7 +436,7 @@
422
436
  position: absolute;
423
437
  top: 0;
424
438
  width: $table-cell-stuck-shadow-size;
425
- height: calc(100% + $table-cell-border-width);
439
+ height: calc(100% + var(--#{$prefix}table-cell-border-bottom-width));
426
440
  }
427
441
  }
428
442
 
@@ -209,7 +209,7 @@
209
209
  }
210
210
 
211
211
  // Tab inner - Hover
212
- &:hover:not(:disabled):not(:active):not([data-state="active"]) {
212
+ &:hover:not(:disabled, :active, [data-state="active"]) {
213
213
  @include declare-var(
214
214
  --#{$prefix}tabs-tab-inner-background-color,
215
215
  map.get($tabs-tab-inner-hover-background-color-by-variant, $variant)
@@ -281,7 +281,7 @@
281
281
  }
282
282
 
283
283
  // Tab inner - Open + Hover
284
- &:hover:not(:disabled):not(:active) {
284
+ &:hover:not(:disabled, :active) {
285
285
  @include declare-var(
286
286
  --#{$prefix}tabs-tab-inner-background-color,
287
287
  map.get($tabs-tab-inner-open-hover-background-color-by-variant, $variant)
@@ -18,18 +18,20 @@
18
18
  )
19
19
  );
20
20
 
21
- [data-has-mt] {
22
- margin-top: var(--#{$prefix}mt);
23
- }
21
+ :is(.#{$prefix}root, .#{$prefix}root *) {
22
+ &[data-has-mt] {
23
+ margin-top: var(--#{$prefix}mt);
24
+ }
24
25
 
25
- [data-has-mr] {
26
- margin-right: var(--#{$prefix}mr);
27
- }
26
+ &[data-has-mr] {
27
+ margin-right: var(--#{$prefix}mr);
28
+ }
28
29
 
29
- [data-has-mb] {
30
- margin-bottom: var(--#{$prefix}mb);
31
- }
30
+ &[data-has-mb] {
31
+ margin-bottom: var(--#{$prefix}mb);
32
+ }
32
33
 
33
- [data-has-ml] {
34
- margin-left: var(--#{$prefix}ml);
34
+ &[data-has-ml] {
35
+ margin-left: var(--#{$prefix}ml);
36
+ }
35
37
  }
@@ -18,18 +18,20 @@
18
18
  )
19
19
  );
20
20
 
21
- [data-has-pt] {
22
- padding-top: var(--#{$prefix}pt);
23
- }
21
+ :is(.#{$prefix}root, .#{$prefix}root *) {
22
+ &[data-has-pt] {
23
+ padding-top: var(--#{$prefix}pt);
24
+ }
24
25
 
25
- [data-has-pr] {
26
- padding-right: var(--#{$prefix}pr);
27
- }
26
+ &[data-has-pr] {
27
+ padding-right: var(--#{$prefix}pr);
28
+ }
28
29
 
29
- [data-has-pb] {
30
- padding-bottom: var(--#{$prefix}pb);
31
- }
30
+ &[data-has-pb] {
31
+ padding-bottom: var(--#{$prefix}pb);
32
+ }
32
33
 
33
- [data-has-pl] {
34
- padding-left: var(--#{$prefix}pl);
34
+ &[data-has-pl] {
35
+ padding-left: var(--#{$prefix}pl);
36
+ }
35
37
  }
@@ -20,26 +20,28 @@
20
20
  )
21
21
  );
22
22
 
23
- [data-has-w] {
24
- width: var(--#{$prefix}w);
25
- }
23
+ :is(.#{$prefix}root, .#{$prefix}root *) {
24
+ &[data-has-w] {
25
+ width: var(--#{$prefix}w);
26
+ }
26
27
 
27
- [data-has-min-w] {
28
- min-width: var(--#{$prefix}min-w);
29
- }
28
+ &[data-has-min-w] {
29
+ min-width: var(--#{$prefix}min-w);
30
+ }
30
31
 
31
- [data-has-max-w] {
32
- max-width: var(--#{$prefix}max-w);
33
- }
32
+ &[data-has-max-w] {
33
+ max-width: var(--#{$prefix}max-w);
34
+ }
34
35
 
35
- [data-has-h] {
36
- height: var(--#{$prefix}h);
37
- }
36
+ &[data-has-h] {
37
+ height: var(--#{$prefix}h);
38
+ }
38
39
 
39
- [data-has-min-h] {
40
- min-height: var(--#{$prefix}min-h);
41
- }
40
+ &[data-has-min-h] {
41
+ min-height: var(--#{$prefix}min-h);
42
+ }
42
43
 
43
- [data-has-max-h] {
44
- max-height: var(--#{$prefix}max-h);
44
+ &[data-has-max-h] {
45
+ max-height: var(--#{$prefix}max-h);
46
+ }
45
47
  }
@@ -19,25 +19,27 @@
19
19
  )
20
20
  );
21
21
 
22
- [data-text-truncate] {
23
- text-overflow: ellipsis;
24
- white-space: nowrap;
25
- overflow: hidden;
26
- }
22
+ :is(.#{$prefix}root, .#{$prefix}root *) {
23
+ &[data-text-truncate] {
24
+ text-overflow: ellipsis;
25
+ white-space: nowrap;
26
+ overflow: hidden;
27
+ }
27
28
 
28
- [data-has-text-size] {
29
- font-size: var(--#{$prefix}font-size);
30
- line-height: var(--#{$prefix}line-height);
31
- }
29
+ &[data-has-text-size] {
30
+ font-size: var(--#{$prefix}font-size);
31
+ line-height: var(--#{$prefix}line-height);
32
+ }
32
33
 
33
- [data-has-text-align] {
34
- text-align: var(--#{$prefix}text-align);
35
- }
34
+ &[data-has-text-align] {
35
+ text-align: var(--#{$prefix}text-align);
36
+ }
36
37
 
37
- [data-has-font-weight] {
38
- font-weight: var(--#{$prefix}font-weight);
39
- }
38
+ &[data-has-font-weight] {
39
+ font-weight: var(--#{$prefix}font-weight);
40
+ }
40
41
 
41
- [data-has-text-wrap] {
42
- text-wrap: var(--#{$prefix}text-wrap);
42
+ &[data-has-text-wrap] {
43
+ text-wrap: var(--#{$prefix}text-wrap);
44
+ }
43
45
  }
@@ -5,7 +5,7 @@
5
5
 
6
6
  // Hide content visually while keeping it accessible to assistive technologies
7
7
  .#{$prefix}visually-hidden,
8
- .#{$prefix}visually-hidden-focusable:not(:focus):not(:focus-within) {
8
+ .#{$prefix}visually-hidden-focusable:not(:focus, :focus-within) {
9
9
  width: 1px !important;
10
10
  height: 1px !important;
11
11
  padding: 0 !important;
@@ -7,7 +7,7 @@
7
7
  -webkit-user-select: none;
8
8
  user-select: none;
9
9
 
10
- &:not(:disabled):not([data-disabled]) {
10
+ &:not(:disabled, [data-disabled]) {
11
11
  cursor: $button-cursor;
12
12
  }
13
13
 
@@ -1,4 +1,4 @@
1
- import type { ReactNode } from "react";
1
+ import { type ReactNode } from "react";
2
2
  import type { FormErrorDisplayMode, FormNativeErrorMessages } from "./Form.tsx";
3
3
  /** Properties of the form error component. */
4
4
  export interface FormErrorProps {
@@ -1,7 +1,7 @@
1
- import type { ReactNode } from "react";
1
+ import { type ReactNode } from "react";
2
2
  import type { KeybindsProps } from "./Keybinds.tsx";
3
- export interface KeyPressProps extends Pick<KeybindsProps, "keySymbols" | "keyLabels"> {
3
+ export interface KeyPressProps extends Pick<KeybindsProps, "keysSeparatorLabel" | "keySymbols" | "keyLabels"> {
4
4
  /** Key press. */
5
5
  keyPress: string[];
6
6
  }
7
- export declare function KeyPress({ keyPress, keySymbols, keyLabels }: KeyPressProps): ReactNode;
7
+ export declare function KeyPress({ keyPress, keysSeparatorLabel, keySymbols, keyLabels, }: KeyPressProps): ReactNode;
@@ -1,7 +1,7 @@
1
1
  import { type ReactNode } from "react";
2
2
  import type { KeybindsProps } from "./Keybinds.tsx";
3
- export interface KeybindProps extends Pick<KeybindsProps, "keyPressesSeparatorLabel" | "keySymbols" | "keyLabels"> {
3
+ export interface KeybindProps extends Pick<KeybindsProps, "keyPressesSeparatorLabel" | "keysSeparatorLabel" | "keySymbols" | "keyLabels"> {
4
4
  /** Keybind. */
5
5
  keybind: string[][];
6
6
  }
7
- export declare function Keybind({ keybind, keyPressesSeparatorLabel: keyPressesSeparatorLabelProp, keySymbols, keyLabels, }: KeybindProps): ReactNode;
7
+ export declare function Keybind({ keybind, keyPressesSeparatorLabel, keysSeparatorLabel, keySymbols, keyLabels, }: KeybindProps): ReactNode;
@@ -17,4 +17,4 @@ export interface KeybindsProps extends UseMarginPropsOptions, Omit<ComponentProp
17
17
  keyLabels?: Record<string, ReactNode>;
18
18
  }
19
19
  /** Component which visually renders [`tinykeys`](https://jamiebuilds.github.io/tinykeys) keybinds. */
20
- export declare function Keybinds({ keybinds: keybindsProp, limit, keybindsSeparatorLabel: keybindsSeparatorLabelProp, keyPressesSeparatorLabel, keySymbols, keyLabels, className, style, ...otherProps }: KeybindsProps): import("react").JSX.Element | null;
20
+ export declare function Keybinds({ keybinds, limit, keybindsSeparatorLabel: keybindsSeparatorLabelProp, keyPressesSeparatorLabel: keyPressesSeparatorLabelProp, keysSeparatorLabel: keysSeparatorLabelProp, keySymbols, keyLabels, className, style, ...otherProps }: KeybindsProps): import("react").JSX.Element | null;
@@ -100,7 +100,7 @@ export interface PrinterProps extends PrintOptions {
100
100
  * to a hidden `<iframe>` which is then printed by the browser.
101
101
  *
102
102
  * Content being printed is aware of the fact that it is being printed and can adapt its appearance
103
- * accordingly. Use the `usePrinting` and `useStartPrintingTask` hooks to control the printing
103
+ * accordingly. Use the `usePrinting` and `usePrintingTask` hooks to control the printing
104
104
  * behaviour.
105
105
  *
106
106
  * Built on top of the [`react-to-print`](https://github.com/MatthewHerbst/react-to-print) package.
@@ -1,8 +1,7 @@
1
1
  /** Value of the printer content context. */
2
2
  export interface PrinterContextValue {
3
3
  printing: boolean;
4
- startPrintingTask?: () => void;
5
- finishPrintingTask?: () => void;
4
+ startPrintingTask?: () => () => void;
6
5
  }
7
6
  /** Printer content context. */
8
7
  export declare const PrinterContentContext: import("react").Context<PrinterContextValue>;
@@ -18,20 +17,9 @@ export declare function usePrinterContentContext(): PrinterContextValue;
18
17
  * > **Note:** This hook **can** be called outside the printer context.
19
18
  */
20
19
  export declare function usePrinting(): boolean;
21
- /** Options for the `useStartPrintingTask` hook. */
22
- export interface UseStartPrintingTaskOptions {
23
- /**
24
- * Whether to enable the printing task.
25
- *
26
- * @default true
27
- */
28
- enabled?: boolean;
29
- }
30
20
  /**
31
- * Marks a printing task as having started and returns a function that should be called when it
32
- * finishes. The printer will wait for any ongoing printing tasks before printing.
21
+ * Prevents printing from happening while `pending` is `true`.
33
22
  *
34
- * > **Note:** This hook **can** be called outside the printer context, in which case
35
- * > starting/finishing printing tasks will be no-ops but **won't** fail.
23
+ * > **Note:** This hook **can** be called outside the printer context, in which case it is a no-op.
36
24
  */
37
- export declare function useStartPrintingTask({ enabled, }?: UseStartPrintingTaskOptions): () => void;
25
+ export declare function usePrintingTask(pending: boolean): void;
@@ -9,8 +9,7 @@ interface PrinterContextValue {
9
9
  triggerRef: RefObject<HTMLButtonElement | null>;
10
10
  contentRef: RefObject<Element | Text | null>;
11
11
  print: (options?: PrintOptions) => Promise<void>;
12
- startPrintingTask: () => void;
13
- finishPrintingTask: () => void;
12
+ startPrintingTask: () => () => void;
14
13
  }
15
14
  /** Printer context. */
16
15
  export declare const PrinterContext: import("react").Context<PrinterContextValue | null>;