carbon-components-svelte 0.110.0 → 0.110.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/_structured-list-input-focusable.scss +75 -0
- package/css/all.css +1 -1
- package/css/all.scss +1 -0
- package/css/g10.css +1 -1
- package/css/g10.scss +1 -0
- package/css/g100.css +1 -1
- package/css/g100.scss +1 -0
- package/css/g80.css +1 -1
- package/css/g80.scss +1 -0
- package/css/g90.css +1 -1
- package/css/g90.scss +1 -0
- package/css/white.css +1 -1
- package/css/white.scss +1 -0
- package/package.json +1 -1
- package/src/Checkbox/Checkbox.svelte +18 -0
- package/src/Checkbox/Checkbox.svelte.d.ts +17 -0
- package/src/ComposedModal/ComposedModal.svelte +10 -1
- package/src/ComposedModal/ComposedModal.svelte.d.ts +1 -0
- package/src/ComposedModal/ModalHeader.svelte +4 -1
- package/src/DataTable/DataTable.svelte +7 -2
- package/src/DatePicker/DatePicker.svelte +5 -0
- package/src/DatePicker/createCalendar.js +29 -0
- package/src/MultiSelect/MultiSelect.svelte +3 -0
- package/src/Select/Select.svelte +5 -1
- package/src/StructuredList/StructuredList.svelte +2 -2
- package/src/StructuredList/StructuredListBody.svelte +9 -1
- package/src/StructuredList/StructuredListCell.svelte +6 -1
- package/src/StructuredList/StructuredListHead.svelte +8 -1
- package/src/StructuredList/StructuredListInput.svelte +31 -15
- package/src/StructuredList/StructuredListInput.svelte.d.ts +6 -0
- package/src/StructuredList/StructuredListRow.svelte +10 -41
- package/src/StructuredList/StructuredListRow.svelte.d.ts +4 -2
- package/src/Tabs/Tab.svelte +0 -1
- package/src/Tile/SelectableTile.svelte +9 -35
- package/src/Tooltip/Tooltip.svelte +1 -1
- package/src/Tooltip/Tooltip.svelte.d.ts +1 -1
- package/src/UIShell/HeaderSearch.svelte +7 -3
- package/src/node_modules/.cache/sveld/parse-cache.json +1 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
@import "carbon-components/scss/globals/scss/vars";
|
|
2
|
+
@import "carbon-components/scss/globals/scss/helper-mixins";
|
|
3
|
+
@import "carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/import-once/import-once";
|
|
4
|
+
|
|
5
|
+
// Carbon's base `.bx--structured-list-input` is `display: none`, which
|
|
6
|
+
// worked when the row's own <label> carried the radio/checkbox role and
|
|
7
|
+
// tabindex. Now that the label is a plain wrapper (role isn't allowed on
|
|
8
|
+
// <label>) and the native input is the focusable, checkbox/radio-shaped
|
|
9
|
+
// control, it must stay in the tab order and accessibility tree -- visually
|
|
10
|
+
// hidden the same way SelectableTile's input is, instead of display: none.
|
|
11
|
+
//
|
|
12
|
+
// The input renders as a sibling of the row's `.bx--structured-list-td`
|
|
13
|
+
// cells (inside the CSS-table `.bx--structured-list-row`). Any non-`none`
|
|
14
|
+
// display value on that raw sibling -- regardless of position -- makes the
|
|
15
|
+
// browser's table auto-layout allocate it an oversized anonymous column,
|
|
16
|
+
// opening a visible gap between cells. Giving the wrapper an explicit
|
|
17
|
+
// `display: table-cell` makes it a real, correctly-sized column instead of
|
|
18
|
+
// an anonymous one. Native radio/checkbox inputs can't take `table-cell`
|
|
19
|
+
// display themselves (browsers force them back to `inline-block`), so the
|
|
20
|
+
// wrapper carries the table-cell display; the clipping that hides the input
|
|
21
|
+
// stays on the input itself, since a table-cell box is stretched to the
|
|
22
|
+
// row's height regardless of its own `height`, which would defeat a 1px
|
|
23
|
+
// clip applied to the wrapper.
|
|
24
|
+
@mixin structured-list-input-focusable {
|
|
25
|
+
.#{$prefix}--structured-list-input-wrapper {
|
|
26
|
+
display: table-cell;
|
|
27
|
+
position: relative;
|
|
28
|
+
width: 1px;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.#{$prefix}--structured-list-input {
|
|
33
|
+
display: inline-block;
|
|
34
|
+
@include hidden;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.#{$prefix}--structured-list-row:focus-within {
|
|
38
|
+
@include focus-outline("outline");
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Under `border-collapse: collapse`, every column's top border is
|
|
42
|
+
// resolved independently against the column above it. Carbon's hover
|
|
43
|
+
// rule below only adds `border-top` to `.bx--structured-list-td`
|
|
44
|
+
// cells, so the wrapper's column -- lacking that border -- resolves
|
|
45
|
+
// to a different edge than its neighbors, showing as a 1px seam right
|
|
46
|
+
// where the wrapper sits. Giving the wrapper the identical
|
|
47
|
+
// conditional border keeps every column's top edge resolving the same
|
|
48
|
+
// way, hover or not.
|
|
49
|
+
.#{$prefix}--structured-list--selection
|
|
50
|
+
.#{$prefix}--structured-list-row:hover:not(.#{$prefix}--structured-list-row--header-row)
|
|
51
|
+
> .#{$prefix}--structured-list-input-wrapper {
|
|
52
|
+
border-top: 1px solid $ui-01;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Carbon's base CSS fills the selection icon via
|
|
56
|
+
// `.bx--structured-list-input:checked + .bx--structured-list-td`, an
|
|
57
|
+
// adjacent-sibling selector that requires the input to be a direct
|
|
58
|
+
// sibling of the cell. Wrapping the input for the table-layout fix above
|
|
59
|
+
// breaks that adjacency. `:has()` would restore it, but it's unsupported
|
|
60
|
+
// at the Svelte 5 browser baseline (Safari 14, Chrome 87 -- see
|
|
61
|
+
// _datepicker.scss), so instead StructuredListInput mirrors `checked`
|
|
62
|
+
// onto the wrapper itself, keeping the same adjacent-sibling shape.
|
|
63
|
+
.#{$prefix}--structured-list-input-wrapper--checked
|
|
64
|
+
+ .#{$prefix}--structured-list-row
|
|
65
|
+
.#{$prefix}--structured-list-svg,
|
|
66
|
+
.#{$prefix}--structured-list-input-wrapper--checked
|
|
67
|
+
+ .#{$prefix}--structured-list-td
|
|
68
|
+
.#{$prefix}--structured-list-svg {
|
|
69
|
+
fill: $icon-01;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@include exports("structured-list-input-focusable") {
|
|
74
|
+
@include structured-list-input-focusable;
|
|
75
|
+
}
|