@carbon/element-styles 0.2.0-rc.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/LICENSE +201 -0
- package/README.md +281 -0
- package/package.json +40 -0
- package/src/_config.scss +8 -0
- package/src/elements/_heading/index.scss +27 -0
- package/src/elements/_input/index.scss +92 -0
- package/src/elements/_labelled-input/index.scss +143 -0
- package/src/elements/_layer/index.scss +78 -0
- package/src/elements/abbreviation/index.scss +31 -0
- package/src/elements/address/index.scss +31 -0
- package/src/elements/anchor/index.scss +50 -0
- package/src/elements/block-quotation/index.scss +63 -0
- package/src/elements/body/index.scss +30 -0
- package/src/elements/bold-text/index.scss +27 -0
- package/src/elements/button/index.scss +235 -0
- package/src/elements/checkbox/index.scss +76 -0
- package/src/elements/code/index.scss +34 -0
- package/src/elements/combo-box/index.scss +68 -0
- package/src/elements/date-input/index.scss +47 -0
- package/src/elements/date-time-input/index.scss +47 -0
- package/src/elements/deleted-text/index.scss +33 -0
- package/src/elements/description-list/index.scss +42 -0
- package/src/elements/details/index.scss +85 -0
- package/src/elements/dialog/index.scss +211 -0
- package/src/elements/fieldset/index.scss +41 -0
- package/src/elements/file-input/index.scss +84 -0
- package/src/elements/footer/index.scss +34 -0
- package/src/elements/header-navigation/index.scss +125 -0
- package/src/elements/heading-level-1/index.scss +30 -0
- package/src/elements/heading-level-2/index.scss +30 -0
- package/src/elements/heading-level-3/index.scss +30 -0
- package/src/elements/heading-level-4/index.scss +30 -0
- package/src/elements/heading-level-5/index.scss +30 -0
- package/src/elements/heading-level-6/index.scss +30 -0
- package/src/elements/horizontal-rule/index.scss +41 -0
- package/src/elements/inline-loading/index.scss +70 -0
- package/src/elements/inline-quotation/index.scss +28 -0
- package/src/elements/inserted-text/index.scss +34 -0
- package/src/elements/italic-text/index.scss +27 -0
- package/src/elements/keyboard-input/index.scss +34 -0
- package/src/elements/label/index.scss +52 -0
- package/src/elements/main/index.scss +32 -0
- package/src/elements/marked-text/index.scss +33 -0
- package/src/elements/menu/index.scss +106 -0
- package/src/elements/number-input/index.scss +37 -0
- package/src/elements/ordered-list/index.scss +50 -0
- package/src/elements/paragraph/index.scss +30 -0
- package/src/elements/password-input/index.scss +38 -0
- package/src/elements/popover/index.scss +71 -0
- package/src/elements/preformatted/index.scss +43 -0
- package/src/elements/progress-bar/index.scss +86 -0
- package/src/elements/radio-button/index.scss +67 -0
- package/src/elements/range-input/index.scss +76 -0
- package/src/elements/search-input/index.scss +47 -0
- package/src/elements/select/index.scss +71 -0
- package/src/elements/side-navigation/index.scss +141 -0
- package/src/elements/small-text/index.scss +31 -0
- package/src/elements/table/index.scss +131 -0
- package/src/elements/tabs/index.scss +214 -0
- package/src/elements/text-area/index.scss +43 -0
- package/src/elements/text-input/index.scss +40 -0
- package/src/elements/tile/index.scss +72 -0
- package/src/elements/time-input/index.scss +47 -0
- package/src/elements/toggle/index.scss +106 -0
- package/src/elements/tooltip/index.scss +44 -0
- package/src/elements/tree-view/index.scss +127 -0
- package/src/elements/unordered-list/index.scss +46 -0
- package/src/index.scss +10 -0
- package/src/layout/_density.scss +27 -0
- package/src/layout/_mode.scss +349 -0
- package/src/layout/_size.scss +54 -0
- package/src/layout/index.scss +10 -0
- package/src/prebuilt/editorial.scss +94 -0
- package/src/prebuilt/expressive.scss +153 -0
- package/src/prebuilt/productive.scss +153 -0
- package/src/utilities/_carbon.scss +96 -0
- package/src/utilities/_icons.scss +111 -0
- package/src/utilities/_tokens.scss +35 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
|
|
10
|
+
@use '@carbon/styles/scss/theme';
|
|
11
|
+
@use '@carbon/styles/scss/spacing';
|
|
12
|
+
@use '@carbon/styles/scss/utilities/focus-outline';
|
|
13
|
+
@use '@carbon/styles/scss/components/button/tokens' as carbon-button;
|
|
14
|
+
|
|
15
|
+
@use '../../layout';
|
|
16
|
+
|
|
17
|
+
$config: () !default;
|
|
18
|
+
|
|
19
|
+
$-default-config: (
|
|
20
|
+
selector: 'label:has(input[type="file"])',
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
/// @group file-input
|
|
24
|
+
/// @param {Map} config [()]
|
|
25
|
+
/// @param {Selector} config.selector ['label:has(input[type="file"])']
|
|
26
|
+
@mixin styles($config: $config) {
|
|
27
|
+
$props: map.deep-merge($-default-config, $config);
|
|
28
|
+
|
|
29
|
+
#{map.get($props, 'selector')} {
|
|
30
|
+
@include layout.mode--heading-compact;
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
row-gap: spacing.$spacing-03;
|
|
34
|
+
|
|
35
|
+
& input[type="file"]:focus {
|
|
36
|
+
outline: none;
|
|
37
|
+
box-shadow: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
& input[type="file"]:focus::file-selector-button {
|
|
41
|
+
outline: 0.125rem solid theme.$focus;
|
|
42
|
+
outline-offset: -0.125rem;
|
|
43
|
+
box-shadow: inset 0 0 0 0.1875rem theme.$layer-background;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
& input[type="file"]::file-selector-button {
|
|
47
|
+
@include layout.mode--body-compact;
|
|
48
|
+
appearance: none;
|
|
49
|
+
border: none;
|
|
50
|
+
box-shadow: none;
|
|
51
|
+
border-radius: 0;
|
|
52
|
+
text-align: start;
|
|
53
|
+
background-color: carbon-button.$button-primary;
|
|
54
|
+
color: theme.$text-on-color;
|
|
55
|
+
block-size: layout.$size--block-size;
|
|
56
|
+
padding-block-start: layout.$size--padding-block-start;
|
|
57
|
+
padding-block-end: layout.$size--padding-block-end;
|
|
58
|
+
padding-inline-start: layout.$density--padding;
|
|
59
|
+
padding-inline-end: calc(layout.$density--padding + 1rem + layout.$density--padding);
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
transition: background-color layout.$mode--transition-duration layout.$mode--transition-timing-function;
|
|
62
|
+
|
|
63
|
+
&:hover {
|
|
64
|
+
background-color: carbon-button.$button-primary-hover;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:active {
|
|
68
|
+
background-color: carbon-button.$button-primary-active;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&:has([disabled]) {
|
|
73
|
+
color: theme.$text-disabled;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
& input[type="file"]:disabled::file-selector-button,
|
|
77
|
+
& input[type="file"]:disabled::file-selector-button:hover,
|
|
78
|
+
& input[type="file"]:disabled::file-selector-button:active {
|
|
79
|
+
cursor: not-allowed;
|
|
80
|
+
background-color: carbon-button.$button-disabled;
|
|
81
|
+
color: theme.$text-on-color-disabled;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
|
|
10
|
+
@use '@carbon/styles/scss/theme';
|
|
11
|
+
@use '@carbon/styles/scss/spacing';
|
|
12
|
+
|
|
13
|
+
@use '../../layout';
|
|
14
|
+
|
|
15
|
+
$config: () !default;
|
|
16
|
+
|
|
17
|
+
$-default-config: (
|
|
18
|
+
selector: 'main + footer',
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
/// @group footer
|
|
22
|
+
/// @param {Map} config [()]
|
|
23
|
+
/// @param {Selector} config.selector ['main + footer']
|
|
24
|
+
@mixin styles($config: $config) {
|
|
25
|
+
$props: map.deep-merge($-default-config, $config);
|
|
26
|
+
|
|
27
|
+
#{map.get($props, 'selector')} {
|
|
28
|
+
@include layout.mode--body-compact;
|
|
29
|
+
color: theme.$text-secondary;
|
|
30
|
+
border-block-start: 0.0625rem solid theme.$border-subtle;
|
|
31
|
+
padding-inline: spacing.$spacing-07;
|
|
32
|
+
padding-block: layout.$density--padding;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
|
|
10
|
+
@use '@carbon/styles/scss/spacing';
|
|
11
|
+
@use '@carbon/styles/scss/theme';
|
|
12
|
+
@use '@carbon/styles/scss/utilities/focus-outline';
|
|
13
|
+
|
|
14
|
+
@use '../../layout';
|
|
15
|
+
|
|
16
|
+
$config: () !default;
|
|
17
|
+
|
|
18
|
+
$-default-config: (
|
|
19
|
+
selector: 'body > header:first-child',
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
/// @group header-navigation
|
|
23
|
+
/// @param {Map} config [()]
|
|
24
|
+
/// @param {Selector} config.selector ['body > header:first-child']
|
|
25
|
+
@mixin styles($config: $config) {
|
|
26
|
+
$props: map.deep-merge($-default-config, $config);
|
|
27
|
+
|
|
28
|
+
#{map.get($props, 'selector')} {
|
|
29
|
+
position: sticky;
|
|
30
|
+
inset-block-start: 0;
|
|
31
|
+
z-index: 9999;
|
|
32
|
+
inline-size: 100%;
|
|
33
|
+
block-size: layout.$size--block-size;
|
|
34
|
+
background-color: theme.$layer-background;
|
|
35
|
+
border-block-end: 0.0625rem solid theme.$border-subtle;
|
|
36
|
+
align-items: center;
|
|
37
|
+
display: flex;
|
|
38
|
+
|
|
39
|
+
& > nav {
|
|
40
|
+
flex-shrink: 0;
|
|
41
|
+
display: flex;
|
|
42
|
+
block-size: 100%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
& > nav ul {
|
|
46
|
+
position: relative;
|
|
47
|
+
margin: 0;
|
|
48
|
+
padding: 0;
|
|
49
|
+
list-style: none;
|
|
50
|
+
block-size: 100%;
|
|
51
|
+
display: flex;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
& > nav ul li {
|
|
55
|
+
@include layout.mode--body-compact;
|
|
56
|
+
padding: 0;
|
|
57
|
+
margin: 0;
|
|
58
|
+
block-size: 100%;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
& > nav ul li a {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
text-decoration: none;
|
|
65
|
+
color: theme.$text-secondary;
|
|
66
|
+
block-size: 100%;
|
|
67
|
+
padding-inline: layout.$density--padding;
|
|
68
|
+
transition-property: color, background-color;
|
|
69
|
+
transition-duration: layout.$mode--transition-duration;
|
|
70
|
+
transition-timing-function: layout.$mode--transition-timing-function;
|
|
71
|
+
|
|
72
|
+
&:hover {
|
|
73
|
+
background-color: theme.$layer-hover;
|
|
74
|
+
color: theme.$text-primary;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&:active {
|
|
78
|
+
background-color: theme.$layer-hover;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&:focus {
|
|
82
|
+
@include focus-outline.focus-outline('outline');
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
& > nav ul li a[aria-current="page"] {
|
|
87
|
+
color: theme.$text-primary;
|
|
88
|
+
box-shadow: inset 0 -0.25rem 0 0 theme.$border-interactive;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
& > nav a:first-child {
|
|
92
|
+
@include layout.mode--body-compact;
|
|
93
|
+
color: theme.$text-primary;
|
|
94
|
+
text-decoration: none;
|
|
95
|
+
padding-inline: layout.$density--padding;
|
|
96
|
+
block-size: 100%;
|
|
97
|
+
display: inline-flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
column-gap: spacing.$spacing-02;
|
|
100
|
+
|
|
101
|
+
&:focus {
|
|
102
|
+
@include focus-outline.focus-outline('outline');
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
& > nav a:first-child + ul {
|
|
107
|
+
margin-inline-start: layout.$density--padding;
|
|
108
|
+
padding-inline-start: layout.$density--padding;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
& > nav a:first-child + ul::before {
|
|
112
|
+
content: '';
|
|
113
|
+
display: block;
|
|
114
|
+
inline-size: 0.0625rem;
|
|
115
|
+
inset-inline-start: -0.0625rem;
|
|
116
|
+
position: absolute;
|
|
117
|
+
inset-block: spacing.$spacing-04;
|
|
118
|
+
background-color: theme.$border-subtle;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
& + nav {
|
|
122
|
+
inset-block-start: layout.$size--block-size;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
|
|
10
|
+
@use '../_heading';
|
|
11
|
+
|
|
12
|
+
@use '../../layout';
|
|
13
|
+
|
|
14
|
+
$config: () !default;
|
|
15
|
+
|
|
16
|
+
$-default-config: (
|
|
17
|
+
selector: 'h1',
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
/// @group heading-level-1
|
|
21
|
+
/// @param {Map} config [()]
|
|
22
|
+
/// @param {Selector} config.selector ['h1']
|
|
23
|
+
@mixin styles($config: $config) {
|
|
24
|
+
$props: map.deep-merge($-default-config, $config);
|
|
25
|
+
|
|
26
|
+
#{map.get($props, 'selector')} {
|
|
27
|
+
@include heading.styles;
|
|
28
|
+
@include layout.mode--heading-level-1;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
|
|
10
|
+
@use '../_heading';
|
|
11
|
+
|
|
12
|
+
@use '../../layout';
|
|
13
|
+
|
|
14
|
+
$config: () !default;
|
|
15
|
+
|
|
16
|
+
$-default-config: (
|
|
17
|
+
selector: 'h2',
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
/// @group heading-level-2
|
|
21
|
+
/// @param {Map} config [()]
|
|
22
|
+
/// @param {Selector} config.selector ['h2']
|
|
23
|
+
@mixin styles($config: $config) {
|
|
24
|
+
$props: map.deep-merge($-default-config, $config);
|
|
25
|
+
|
|
26
|
+
#{map.get($props, 'selector')} {
|
|
27
|
+
@include heading.styles;
|
|
28
|
+
@include layout.mode--heading-level-2;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
|
|
10
|
+
@use '../_heading';
|
|
11
|
+
|
|
12
|
+
@use '../../layout';
|
|
13
|
+
|
|
14
|
+
$config: () !default;
|
|
15
|
+
|
|
16
|
+
$-default-config: (
|
|
17
|
+
selector: 'h3',
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
/// @group heading-level-3
|
|
21
|
+
/// @param {Map} config [()]
|
|
22
|
+
/// @param {Selector} config.selector ['h3']
|
|
23
|
+
@mixin styles($config: $config) {
|
|
24
|
+
$props: map.deep-merge($-default-config, $config);
|
|
25
|
+
|
|
26
|
+
#{map.get($props, 'selector')} {
|
|
27
|
+
@include heading.styles;
|
|
28
|
+
@include layout.mode--heading-level-3;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
|
|
10
|
+
@use '../_heading';
|
|
11
|
+
|
|
12
|
+
@use '../../layout';
|
|
13
|
+
|
|
14
|
+
$config: () !default;
|
|
15
|
+
|
|
16
|
+
$-default-config: (
|
|
17
|
+
selector: 'h4',
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
/// @group heading-level-4
|
|
21
|
+
/// @param {Map} config [()]
|
|
22
|
+
/// @param {Selector} config.selector ['h4']
|
|
23
|
+
@mixin styles($config: $config) {
|
|
24
|
+
$props: map.deep-merge($-default-config, $config);
|
|
25
|
+
|
|
26
|
+
#{map.get($props, 'selector')} {
|
|
27
|
+
@include heading.styles;
|
|
28
|
+
@include layout.mode--heading-level-4;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
|
|
10
|
+
@use '../_heading';
|
|
11
|
+
|
|
12
|
+
@use '../../layout';
|
|
13
|
+
|
|
14
|
+
$config: () !default;
|
|
15
|
+
|
|
16
|
+
$-default-config: (
|
|
17
|
+
selector: 'h5',
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
/// @group heading-level-5
|
|
21
|
+
/// @param {Map} config [()]
|
|
22
|
+
/// @param {Selector} config.selector ['h5']
|
|
23
|
+
@mixin styles($config: $config) {
|
|
24
|
+
$props: map.deep-merge($-default-config, $config);
|
|
25
|
+
|
|
26
|
+
#{map.get($props, 'selector')} {
|
|
27
|
+
@include heading.styles;
|
|
28
|
+
@include layout.mode--heading-level-5;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
|
|
10
|
+
@use '../_heading';
|
|
11
|
+
|
|
12
|
+
@use '../../layout';
|
|
13
|
+
|
|
14
|
+
$config: () !default;
|
|
15
|
+
|
|
16
|
+
$-default-config: (
|
|
17
|
+
selector: 'h6',
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
/// @group heading-level-6
|
|
21
|
+
/// @param {Map} config [()]
|
|
22
|
+
/// @param {Selector} config.selector ['h6']
|
|
23
|
+
@mixin styles($config: $config) {
|
|
24
|
+
$props: map.deep-merge($-default-config, $config);
|
|
25
|
+
|
|
26
|
+
#{map.get($props, 'selector')} {
|
|
27
|
+
@include heading.styles;
|
|
28
|
+
@include layout.mode--heading-level-6;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
|
|
10
|
+
@use '@carbon/styles/scss/theme';
|
|
11
|
+
|
|
12
|
+
@use '../../layout';
|
|
13
|
+
|
|
14
|
+
$config: () !default;
|
|
15
|
+
|
|
16
|
+
$-default-config: (
|
|
17
|
+
selector: 'hr',
|
|
18
|
+
kind: 'subtle',
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
/// @group horizontal-rule
|
|
22
|
+
/// @param {Map} config [()]
|
|
23
|
+
/// @param {Selector} config.selector ['hr']
|
|
24
|
+
/// @param {'subtle' | 'strong'} config.kind ['subtle']
|
|
25
|
+
@mixin styles($config: $config) {
|
|
26
|
+
$props: map.deep-merge($-default-config, $config);
|
|
27
|
+
|
|
28
|
+
#{map.get($props, 'selector')} {
|
|
29
|
+
border: none;
|
|
30
|
+
block-size: 0.0625rem;
|
|
31
|
+
margin-block: layout.$mode--margin-block;
|
|
32
|
+
|
|
33
|
+
@if map.get($props, 'kind') == 'subtle' {
|
|
34
|
+
background-color: theme.$border-subtle;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@if map.get($props, 'kind') == 'strong' {
|
|
38
|
+
background-color: theme.$border-strong;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
|
|
10
|
+
@use '@carbon/styles/scss/config' as carbon-config;
|
|
11
|
+
@use '@carbon/styles/scss/theme';
|
|
12
|
+
@use '@carbon/styles/scss/spacing';
|
|
13
|
+
@use '@carbon/styles/scss/motion';
|
|
14
|
+
|
|
15
|
+
@use '../../config';
|
|
16
|
+
@use '../../layout';
|
|
17
|
+
|
|
18
|
+
$config: () !default;
|
|
19
|
+
|
|
20
|
+
$-default-config: (
|
|
21
|
+
selector: '[aria-live="polite"][aria-busy="true"]:empty',
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
$-size: 1rem;
|
|
25
|
+
$-stroke-width: 0.125rem;
|
|
26
|
+
|
|
27
|
+
/// @group inline-loading
|
|
28
|
+
/// @param {Map} config [()]
|
|
29
|
+
/// @param {Selector} config.selector ['[aria-live="polite"][aria-busy="true"]:empty']
|
|
30
|
+
@mixin styles($config: $config) {
|
|
31
|
+
$props: map.deep-merge($-default-config, $config);
|
|
32
|
+
|
|
33
|
+
#{map.get($props, 'selector')} {
|
|
34
|
+
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
column-gap: spacing.$spacing-03;
|
|
38
|
+
|
|
39
|
+
&::before {
|
|
40
|
+
content: '';
|
|
41
|
+
display: inline-block;
|
|
42
|
+
block-size: calc($-size - $-stroke-width * 2);
|
|
43
|
+
inline-size: calc($-size - $-stroke-width * 2);
|
|
44
|
+
border-radius: 50%;
|
|
45
|
+
border: $-stroke-width solid theme.$layer-accent;
|
|
46
|
+
border-block-end-color: theme.$border-interactive;
|
|
47
|
+
border-inline-end-color: theme.$border-interactive;
|
|
48
|
+
animation-name: #{carbon-config.$prefix}--#{config.$prefix}--inline-loading--spinner;
|
|
49
|
+
animation-duration: motion.$duration-slow-02;
|
|
50
|
+
animation-timing-function: linear;
|
|
51
|
+
animation-iteration-count: infinite;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&::after {
|
|
55
|
+
@include layout.mode--body-compact;
|
|
56
|
+
content: 'Loading';
|
|
57
|
+
color: theme.$text-secondary;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@keyframes #{carbon-config.$prefix}--#{config.$prefix}--inline-loading--spinner {
|
|
61
|
+
0% {
|
|
62
|
+
rotate: 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
100% {
|
|
66
|
+
rotate: 360deg;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
|
|
10
|
+
@use '../../layout';
|
|
11
|
+
|
|
12
|
+
$config: () !default;
|
|
13
|
+
|
|
14
|
+
$-default-config: (
|
|
15
|
+
selector: 'q',
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
/// @group inline-quotation
|
|
19
|
+
/// @param {Map} config [()]
|
|
20
|
+
/// @param {Selector} config.selector ['q']
|
|
21
|
+
@mixin styles($config: $config) {
|
|
22
|
+
$props: map.deep-merge($-default-config, $config);
|
|
23
|
+
|
|
24
|
+
#{map.get($props, 'selector')} {
|
|
25
|
+
quotes: auto;
|
|
26
|
+
font-style: italic;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
|
|
10
|
+
@use '@carbon/styles/scss/spacing';
|
|
11
|
+
@use '@carbon/styles/scss/components/tag/tokens' as tag-tokens;
|
|
12
|
+
|
|
13
|
+
@use '../../layout';
|
|
14
|
+
|
|
15
|
+
$config: () !default;
|
|
16
|
+
|
|
17
|
+
$-default-config: (
|
|
18
|
+
selector: 'ins',
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
/// @group inserted-text
|
|
22
|
+
/// @param {Map} config [()]
|
|
23
|
+
/// @param {Selector} config.selector ['ins']
|
|
24
|
+
@mixin styles($config: $config) {
|
|
25
|
+
$props: map.deep-merge($-default-config, $config);
|
|
26
|
+
|
|
27
|
+
#{map.get($props, 'selector')} {
|
|
28
|
+
padding-inline: spacing.$spacing-01;
|
|
29
|
+
background-color: tag-tokens.$tag-background-green;
|
|
30
|
+
color: tag-tokens.$tag-color-green;
|
|
31
|
+
text-decoration: underline;
|
|
32
|
+
text-decoration-style: dashed;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
|
|
10
|
+
@use '../../layout';
|
|
11
|
+
|
|
12
|
+
$config: () !default;
|
|
13
|
+
|
|
14
|
+
$-default-config: (
|
|
15
|
+
selector: 'i, em',
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
/// @group italic-text
|
|
19
|
+
/// @param {Map} config [()]
|
|
20
|
+
/// @param {Selector} config.selector ['i, em']
|
|
21
|
+
@mixin styles($config: $config) {
|
|
22
|
+
$props: map.deep-merge($-default-config, $config);
|
|
23
|
+
|
|
24
|
+
#{map.get($props, 'selector')} {
|
|
25
|
+
font-style: italic;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
|
|
10
|
+
@use '@carbon/styles/scss/theme';
|
|
11
|
+
@use '@carbon/styles/scss/spacing';
|
|
12
|
+
|
|
13
|
+
@use '../../layout';
|
|
14
|
+
|
|
15
|
+
$config: () !default;
|
|
16
|
+
|
|
17
|
+
$-default-config: (
|
|
18
|
+
selector: 'kbd',
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
/// @group keyboard-input
|
|
22
|
+
/// @param {Map} config [()]
|
|
23
|
+
/// @param {Selector} config.selector ['kbd']
|
|
24
|
+
@mixin styles($config: $config) {
|
|
25
|
+
$props: map.deep-merge($-default-config, $config);
|
|
26
|
+
|
|
27
|
+
#{map.get($props, 'selector')} {
|
|
28
|
+
@include layout.mode--code;
|
|
29
|
+
background-color: transparent;
|
|
30
|
+
outline: 0.0625rem solid theme.$border-subtle;
|
|
31
|
+
border-radius: 0.125rem;
|
|
32
|
+
padding-inline: spacing.$spacing-02;
|
|
33
|
+
}
|
|
34
|
+
}
|