@carbon/styles 1.57.0-rc.0 → 1.58.0-rc.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.
- package/css/styles.css +14 -0
- package/css/styles.min.css +1 -1
- package/package.json +9 -9
- package/scss/components/dialog/_dialog.scss +155 -0
- package/scss/components/dialog/_index.scss +11 -0
- package/scss/components/pagination/_pagination.scss +5 -0
- package/scss/components/structured-list/_structured-list.scss +13 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/styles",
|
|
3
3
|
"description": "Styles for the Carbon Design System",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.58.0-rc.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@carbon/colors": "^11.22.0
|
|
44
|
-
"@carbon/feature-flags": "^0.20.0
|
|
45
|
-
"@carbon/grid": "^11.23.0
|
|
46
|
-
"@carbon/layout": "^11.22.0
|
|
47
|
-
"@carbon/motion": "^11.18.0
|
|
48
|
-
"@carbon/themes": "^11.35.0
|
|
49
|
-
"@carbon/type": "^11.27.0
|
|
43
|
+
"@carbon/colors": "^11.22.0",
|
|
44
|
+
"@carbon/feature-flags": "^0.20.0",
|
|
45
|
+
"@carbon/grid": "^11.23.0",
|
|
46
|
+
"@carbon/layout": "^11.22.0",
|
|
47
|
+
"@carbon/motion": "^11.18.0",
|
|
48
|
+
"@carbon/themes": "^11.35.0",
|
|
49
|
+
"@carbon/type": "^11.27.0",
|
|
50
50
|
"@ibm/plex": "6.0.0-next.6",
|
|
51
51
|
"@ibm/telemetry-js": "^1.5.0"
|
|
52
52
|
},
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"scss/**/*.css",
|
|
69
69
|
"css/**/*.css"
|
|
70
70
|
],
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "23f19271f964a10a9fbc4616a43b05f5cc14e7d1"
|
|
72
72
|
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright IBM Corp. 2014, 2024
|
|
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:list';
|
|
9
|
+
@use '../button';
|
|
10
|
+
@use '../../config' as *;
|
|
11
|
+
@use '../../breakpoint' as *;
|
|
12
|
+
@use '../../motion' as *;
|
|
13
|
+
@use '../../spacing' as *;
|
|
14
|
+
@use '../../theme' as *;
|
|
15
|
+
@use '../../type' as *;
|
|
16
|
+
@use '../../utilities/ai-gradient' as *;
|
|
17
|
+
@use '../../utilities/convert';
|
|
18
|
+
@use '../../utilities/component-reset';
|
|
19
|
+
@use '../../utilities/focus-outline' as *;
|
|
20
|
+
@use '../../utilities/high-contrast-mode' as *;
|
|
21
|
+
@use '../../utilities/z-index' as *;
|
|
22
|
+
|
|
23
|
+
/// Dialog styles
|
|
24
|
+
/// @access public
|
|
25
|
+
/// @group dialog
|
|
26
|
+
@mixin dialog {
|
|
27
|
+
.#{$prefix}--dialog {
|
|
28
|
+
/* size */
|
|
29
|
+
padding: 0;
|
|
30
|
+
border: 1px solid $border-subtle-01;
|
|
31
|
+
background-color: $layer;
|
|
32
|
+
color: $text-primary;
|
|
33
|
+
inline-size: 48rem;
|
|
34
|
+
max-block-size: 50%;
|
|
35
|
+
max-inline-size: 100%;
|
|
36
|
+
opacity: 0;
|
|
37
|
+
transform: translateY(calc(-1 * #{$spacing-06}));
|
|
38
|
+
|
|
39
|
+
/** opening and closing is used in as allow-discrete is not currently supported wide enough
|
|
40
|
+
* https://caniuse.com/mdn-css_properties_display_is_transitionable
|
|
41
|
+
*/
|
|
42
|
+
transition: opacity $duration-moderate-02 motion(exit, expressive),
|
|
43
|
+
transform $duration-moderate-02 motion(exit, expressive),
|
|
44
|
+
overlay $duration-moderate-02 motion(exit, expressive) allow-discrete,
|
|
45
|
+
display $duration-moderate-02 motion(exit, expressive) allow-discrete;
|
|
46
|
+
|
|
47
|
+
@media (prefers-reduced-motion) {
|
|
48
|
+
transition: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@include breakpoint(md) {
|
|
52
|
+
max-inline-size: 84%;
|
|
53
|
+
}
|
|
54
|
+
@include breakpoint(lg) {
|
|
55
|
+
max-inline-size: 72%;
|
|
56
|
+
}
|
|
57
|
+
@include breakpoint(xlg) {
|
|
58
|
+
max-inline-size: 64%;
|
|
59
|
+
}
|
|
60
|
+
@include breakpoint(xlg) {
|
|
61
|
+
max-inline-size: 60%;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&[open] {
|
|
65
|
+
opacity: 1;
|
|
66
|
+
transform: translateY(0);
|
|
67
|
+
|
|
68
|
+
transition: opacity $duration-moderate-02 motion(entrance, expressive),
|
|
69
|
+
transform $duration-moderate-02 motion(entrance, expressive),
|
|
70
|
+
overlay $duration-moderate-02 motion(entrance, expressive)
|
|
71
|
+
allow-discrete,
|
|
72
|
+
display $duration-moderate-02 motion(entrance, expressive)
|
|
73
|
+
allow-discrete;
|
|
74
|
+
|
|
75
|
+
@media (prefers-reduced-motion) {
|
|
76
|
+
transition: none;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** starting style also not supported widely
|
|
81
|
+
* https://caniuse.com/mdn-css_at-rules_starting-style
|
|
82
|
+
*/
|
|
83
|
+
/* Before-open state */
|
|
84
|
+
/* Needs to be after the previous dialog[open] rule to take effect,
|
|
85
|
+
as the specificity is the same */
|
|
86
|
+
/* stylelint-disable-next-line scss/at-rule-no-unknown */
|
|
87
|
+
@starting-style {
|
|
88
|
+
&[open] {
|
|
89
|
+
opacity: 0;
|
|
90
|
+
transform: translateY(calc(-1 * #{$spacing-06}));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.#{$prefix}--dialog__header {
|
|
96
|
+
position: relative;
|
|
97
|
+
overflow: visible;
|
|
98
|
+
inline-size: 100%;
|
|
99
|
+
min-block-size: $spacing-09;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.#{$prefix}--dialog__content {
|
|
103
|
+
padding: $spacing-05;
|
|
104
|
+
block-size: 100%;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.#{$prefix}--dialog--modal {
|
|
108
|
+
border: 1px solid transparent;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* Transition the :backdrop when the dialog modal is promoted to the top layer */
|
|
112
|
+
.#{$prefix}--dialog::backdrop {
|
|
113
|
+
background-color: $overlay;
|
|
114
|
+
opacity: 0;
|
|
115
|
+
/* opening and closing is used in as allow-discrete is not currently supported wide enough
|
|
116
|
+
* https://caniuse.com/mdn-css_properties_display_is_transitionable
|
|
117
|
+
*/
|
|
118
|
+
transition: background-color $duration-moderate-02
|
|
119
|
+
motion(entrance, expressive),
|
|
120
|
+
opacity $duration-moderate-02 motion(entrance, expressive);
|
|
121
|
+
|
|
122
|
+
@media (prefers-reduced-motion) {
|
|
123
|
+
transition: none;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.#{$prefix}--dialog[open]::backdrop {
|
|
128
|
+
opacity: 1;
|
|
129
|
+
|
|
130
|
+
transition: background-color $duration-moderate-02 motion(exit, expressive),
|
|
131
|
+
opacity $duration-moderate-02 motion(exit, expressive);
|
|
132
|
+
|
|
133
|
+
@media (prefers-reduced-motion) {
|
|
134
|
+
transition: none;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/** starting style also not supported widely
|
|
139
|
+
* https://caniuse.com/mdn-css_at-rules_starting-style
|
|
140
|
+
*/
|
|
141
|
+
/* This starting-style rule cannot be nested inside the above selector
|
|
142
|
+
because the nesting selector cannot represent pseudo-elements. */
|
|
143
|
+
/* stylelint-disable-next-line scss/at-rule-no-unknown */
|
|
144
|
+
@starting-style {
|
|
145
|
+
.#{$prefix}--dialog[open]::backdrop {
|
|
146
|
+
opacity: 0;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.#{$prefix}--dialog__header-controls {
|
|
151
|
+
position: absolute;
|
|
152
|
+
inset-block-start: 0;
|
|
153
|
+
inset-inline-end: 0;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
@@ -174,6 +174,11 @@
|
|
|
174
174
|
margin-inline-start: 1rem;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
+
.#{$prefix}--pagination__right
|
|
178
|
+
.#{$prefix}--pagination__text.#{$prefix}--pagination__page-text.#{$prefix}--pagination__unknown-pages-text {
|
|
179
|
+
margin-inline-end: $spacing-05;
|
|
180
|
+
}
|
|
181
|
+
|
|
177
182
|
.#{$prefix}--pagination__right .#{$prefix}--pagination__text:empty {
|
|
178
183
|
margin: 0;
|
|
179
184
|
}
|
|
@@ -209,8 +209,12 @@
|
|
|
209
209
|
.#{$prefix}--structured-list-svg {
|
|
210
210
|
fill: transparent;
|
|
211
211
|
}
|
|
212
|
+
.#{$prefix}--structured-list--selection
|
|
213
|
+
.#{$prefix}--structured-list-td:last-child {
|
|
214
|
+
inline-size: $spacing-07;
|
|
215
|
+
padding-inline-start: 0;
|
|
216
|
+
}
|
|
212
217
|
}
|
|
213
|
-
|
|
214
218
|
@if (
|
|
215
219
|
enabled('enable-v12-structured-list-visible-icons') or
|
|
216
220
|
$enable-v12-structured-list-visible-icons
|
|
@@ -268,4 +272,12 @@
|
|
|
268
272
|
margin-block-start: $spacing-01;
|
|
269
273
|
vertical-align: top;
|
|
270
274
|
}
|
|
275
|
+
|
|
276
|
+
.#{$prefix}--structured-list--selection
|
|
277
|
+
.#{$prefix}--structured-list-td:first-child:has(
|
|
278
|
+
.#{$prefix}--structured-list__icon
|
|
279
|
+
) {
|
|
280
|
+
inline-size: $spacing-07;
|
|
281
|
+
padding-inline-end: 0;
|
|
282
|
+
}
|
|
271
283
|
}
|