@dynatrace/strato-components 1.9.1 → 1.11.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/README.md +11 -6
- package/buttons/button/Button.css +18 -18
- package/buttons/button/Button.d.ts +2 -3
- package/buttons/button/Button.sty.js +4 -4
- package/content/progress/ProgressBar.css +72 -72
- package/content/progress/ProgressBar.js +2 -1
- package/content/progress/ProgressBar.sty.js +5 -5
- package/content/progress/ProgressBarIcon.css +2 -2
- package/content/progress/ProgressBarIcon.sty.js +1 -1
- package/content/progress/ProgressBarLabel.css +3 -3
- package/content/progress/ProgressBarLabel.sty.js +1 -1
- package/content/progress/ProgressBarValue.css +5 -5
- package/content/progress/ProgressBarValue.sty.js +1 -1
- package/content/progress/ProgressCircle.css +40 -40
- package/content/progress/ProgressCircle.js +2 -1
- package/content/progress/ProgressCircle.sty.js +5 -5
- package/content/skeleton/Skeleton.css +7 -7
- package/content/skeleton/Skeleton.sty.js +1 -1
- package/core/components/app-root/AppRoot.css +28 -125
- package/core/hooks/useId.d.ts +24 -0
- package/core/hooks/useId.js +31 -0
- package/core/index.d.ts +1 -0
- package/core/index.js +3 -1
- package/core/styles/focusRing.css +61 -61
- package/core/styles/focusRing.sty.js +2 -2
- package/core/styles/useFocusRing.js +2 -2
- package/core/utils/colorUtils.css +60 -60
- package/core/utils/colorUtils.sty.js +2 -2
- package/esm/buttons/button/Button.css +18 -18
- package/esm/buttons/button/Button.js.map +2 -2
- package/esm/buttons/button/Button.sty.js +4 -4
- package/esm/buttons/button/Button.sty.js.map +2 -2
- package/esm/content/progress/ProgressBar.css +72 -72
- package/esm/content/progress/ProgressBar.js +1 -1
- package/esm/content/progress/ProgressBar.js.map +2 -2
- package/esm/content/progress/ProgressBar.sty.js +5 -5
- package/esm/content/progress/ProgressBar.sty.js.map +2 -2
- package/esm/content/progress/ProgressBarIcon.css +2 -2
- package/esm/content/progress/ProgressBarIcon.sty.js +1 -1
- package/esm/content/progress/ProgressBarIcon.sty.js.map +1 -1
- package/esm/content/progress/ProgressBarLabel.css +3 -3
- package/esm/content/progress/ProgressBarLabel.sty.js +1 -1
- package/esm/content/progress/ProgressBarLabel.sty.js.map +2 -2
- package/esm/content/progress/ProgressBarValue.css +5 -5
- package/esm/content/progress/ProgressBarValue.sty.js +1 -1
- package/esm/content/progress/ProgressBarValue.sty.js.map +2 -2
- package/esm/content/progress/ProgressCircle.css +40 -40
- package/esm/content/progress/ProgressCircle.js +2 -1
- package/esm/content/progress/ProgressCircle.js.map +2 -2
- package/esm/content/progress/ProgressCircle.sty.js +5 -5
- package/esm/content/progress/ProgressCircle.sty.js.map +2 -2
- package/esm/content/skeleton/Skeleton.css +7 -7
- package/esm/content/skeleton/Skeleton.sty.js +1 -1
- package/esm/content/skeleton/Skeleton.sty.js.map +2 -2
- package/esm/core/components/app-root/AppRoot.css +28 -125
- package/esm/core/hooks/useId.js +12 -0
- package/esm/core/hooks/useId.js.map +7 -0
- package/esm/core/index.js +3 -1
- package/esm/core/index.js.map +2 -2
- package/esm/core/styles/focusRing.css +61 -61
- package/esm/core/styles/focusRing.sty.js +2 -2
- package/esm/core/styles/focusRing.sty.js.map +2 -2
- package/esm/core/styles/useFocusRing.js +2 -2
- package/esm/core/styles/useFocusRing.js.map +2 -2
- package/esm/core/utils/colorUtils.css +60 -60
- package/esm/core/utils/colorUtils.sty.js +2 -2
- package/esm/core/utils/colorUtils.sty.js.map +2 -2
- package/esm/layouts/container/Container.css +5 -5
- package/esm/layouts/container/Container.js +5 -3
- package/esm/layouts/container/Container.js.map +2 -2
- package/esm/layouts/container/Container.sty.js +1 -1
- package/esm/layouts/container/Container.sty.js.map +1 -1
- package/esm/layouts/divider/Divider.css +6 -6
- package/esm/layouts/divider/Divider.sty.js +1 -1
- package/esm/layouts/divider/Divider.sty.js.map +2 -2
- package/esm/layouts/surface/Surface.css +39 -39
- package/esm/layouts/surface/Surface.sty.js +2 -2
- package/esm/layouts/surface/Surface.sty.js.map +2 -2
- package/esm/layouts/surface/variables.sty.js +1 -1
- package/esm/layouts/surface/variables.sty.js.map +1 -1
- package/esm/styles/colorUtils.css +60 -60
- package/esm/styles/colorUtils.sty.js +2 -2
- package/esm/styles/colorUtils.sty.js.map +2 -2
- package/esm/styles/container.css +47 -47
- package/esm/styles/container.sty.js +2 -2
- package/esm/styles/container.sty.js.map +2 -2
- package/esm/styles/ellipsis.css +1 -1
- package/esm/styles/ellipsis.sty.js +1 -1
- package/esm/styles/ellipsis.sty.js.map +1 -1
- package/esm/styles/field.css +153 -153
- package/esm/styles/field.sty.js +2 -2
- package/esm/styles/field.sty.js.map +2 -2
- package/esm/styles/sprinkles.css +262 -262
- package/esm/styles/sprinkles.sty.js +1 -1
- package/esm/styles/sprinkles.sty.js.map +2 -2
- package/esm/styles/textStyle.css +8 -8
- package/esm/styles/textStyle.sty.js +1 -1
- package/esm/styles/textStyle.sty.js.map +2 -2
- package/esm/typography/block-quote/Blockquote.css +2 -2
- package/esm/typography/block-quote/Blockquote.js.map +2 -2
- package/esm/typography/block-quote/Blockquote.sty.js +1 -1
- package/esm/typography/block-quote/Blockquote.sty.js.map +1 -1
- package/esm/typography/code/Code.css +2 -2
- package/esm/typography/code/Code.js.map +2 -2
- package/esm/typography/code/Code.sty.js +1 -1
- package/esm/typography/code/Code.sty.js.map +1 -1
- package/esm/typography/emphasis/Emphasis.css +1 -1
- package/esm/typography/emphasis/Emphasis.js.map +2 -2
- package/esm/typography/emphasis/Emphasis.sty.js +1 -1
- package/esm/typography/emphasis/Emphasis.sty.js.map +1 -1
- package/esm/typography/external-link/ExternalLink.css +5 -5
- package/esm/typography/external-link/ExternalLink.js +2 -4
- package/esm/typography/external-link/ExternalLink.js.map +2 -2
- package/esm/typography/external-link/ExternalLink.sty.js +1 -1
- package/esm/typography/external-link/ExternalLink.sty.js.map +1 -1
- package/esm/typography/heading/Heading.css +7 -7
- package/esm/typography/heading/Heading.js.map +2 -2
- package/esm/typography/heading/Heading.sty.js +1 -1
- package/esm/typography/heading/Heading.sty.js.map +2 -2
- package/esm/typography/highlight/Highlight.css +2 -2
- package/esm/typography/highlight/Highlight.js.map +2 -2
- package/esm/typography/highlight/Highlight.sty.js +2 -2
- package/esm/typography/highlight/Highlight.sty.js.map +1 -1
- package/esm/typography/link/Link.css +3 -6
- package/esm/typography/link/Link.js +9 -8
- package/esm/typography/link/Link.js.map +2 -2
- package/esm/typography/link/Link.sty.js +2 -2
- package/esm/typography/link/Link.sty.js.map +2 -2
- package/esm/typography/list/List.css +4 -4
- package/esm/typography/list/List.sty.js +2 -2
- package/esm/typography/list/List.sty.js.map +1 -1
- package/esm/typography/paragraph/Paragraph.css +3 -3
- package/esm/typography/paragraph/Paragraph.js.map +2 -2
- package/esm/typography/paragraph/Paragraph.sty.js +1 -1
- package/esm/typography/paragraph/Paragraph.sty.js.map +2 -2
- package/esm/typography/strikethrough/Strikethrough.css +1 -1
- package/esm/typography/strikethrough/Strikethrough.js.map +2 -2
- package/esm/typography/strikethrough/Strikethrough.sty.js +1 -1
- package/esm/typography/strikethrough/Strikethrough.sty.js.map +1 -1
- package/esm/typography/strong/Strong.css +1 -1
- package/esm/typography/strong/Strong.js.map +2 -2
- package/esm/typography/strong/Strong.sty.js +1 -1
- package/esm/typography/strong/Strong.sty.js.map +1 -1
- package/esm/typography/text/Text.css +3 -3
- package/esm/typography/text/Text.sty.js +1 -1
- package/esm/typography/text/Text.sty.js.map +2 -2
- package/esm/typography/text-ellipsis/TextEllipsis.css +6 -6
- package/esm/typography/text-ellipsis/TextEllipsis.sty.js +2 -2
- package/esm/typography/text-ellipsis/TextEllipsis.sty.js.map +2 -2
- package/layouts/container/Container.css +5 -5
- package/layouts/container/Container.d.ts +2 -1
- package/layouts/container/Container.js +4 -3
- package/layouts/container/Container.sty.js +1 -1
- package/layouts/divider/Divider.css +6 -6
- package/layouts/divider/Divider.sty.js +1 -1
- package/layouts/surface/Surface.css +39 -39
- package/layouts/surface/Surface.sty.js +2 -2
- package/layouts/surface/variables.sty.js +1 -1
- package/package.json +3 -3
- package/styles/colorUtils.css +60 -60
- package/styles/colorUtils.sty.js +2 -2
- package/styles/container.css +47 -47
- package/styles/container.sty.js +2 -2
- package/styles/ellipsis.css +1 -1
- package/styles/ellipsis.sty.js +1 -1
- package/styles/field.css +153 -153
- package/styles/field.sty.js +2 -2
- package/styles/sprinkles.css +262 -262
- package/styles/sprinkles.sty.js +1 -1
- package/styles/textStyle.css +8 -8
- package/styles/textStyle.sty.js +1 -1
- package/typography/block-quote/Blockquote.css +2 -2
- package/typography/block-quote/Blockquote.d.ts +3 -1
- package/typography/block-quote/Blockquote.sty.js +1 -1
- package/typography/code/Code.css +2 -2
- package/typography/code/Code.d.ts +3 -1
- package/typography/code/Code.sty.js +1 -1
- package/typography/emphasis/Emphasis.css +1 -1
- package/typography/emphasis/Emphasis.d.ts +3 -1
- package/typography/emphasis/Emphasis.sty.js +1 -1
- package/typography/external-link/ExternalLink.css +5 -5
- package/typography/external-link/ExternalLink.d.ts +3 -1
- package/typography/external-link/ExternalLink.js +2 -2
- package/typography/external-link/ExternalLink.sty.js +1 -1
- package/typography/heading/Heading.css +7 -7
- package/typography/heading/Heading.d.ts +4 -1
- package/typography/heading/Heading.sty.js +1 -1
- package/typography/highlight/Highlight.css +2 -2
- package/typography/highlight/Highlight.d.ts +2 -1
- package/typography/highlight/Highlight.sty.js +2 -2
- package/typography/link/Link.css +3 -6
- package/typography/link/Link.d.ts +4 -1
- package/typography/link/Link.js +9 -6
- package/typography/link/Link.sty.d.ts +1 -1
- package/typography/link/Link.sty.js +2 -2
- package/typography/list/List.css +4 -4
- package/typography/list/List.sty.js +2 -2
- package/typography/paragraph/Paragraph.css +3 -3
- package/typography/paragraph/Paragraph.d.ts +3 -1
- package/typography/paragraph/Paragraph.sty.js +1 -1
- package/typography/strikethrough/Strikethrough.css +1 -1
- package/typography/strikethrough/Strikethrough.d.ts +3 -1
- package/typography/strikethrough/Strikethrough.sty.js +1 -1
- package/typography/strong/Strong.css +1 -1
- package/typography/strong/Strong.d.ts +3 -1
- package/typography/strong/Strong.sty.js +1 -1
- package/typography/text/Text.css +3 -3
- package/typography/text/Text.sty.js +1 -1
- package/typography/text-ellipsis/TextEllipsis.css +6 -6
- package/typography/text-ellipsis/TextEllipsis.sty.js +2 -2
|
@@ -59,15 +59,7 @@
|
|
|
59
59
|
font-weight: 400;
|
|
60
60
|
font-display: swap;
|
|
61
61
|
src: url(https://dt-cdn.net/fonts/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2) format('woff2');
|
|
62
|
-
unicode-range: U+0100-024F;
|
|
63
|
-
unicode-range: U+0259;
|
|
64
|
-
unicode-range: U+1E00-1EFF;
|
|
65
|
-
unicode-range: U+2020;
|
|
66
|
-
unicode-range: U+20A0-20AB;
|
|
67
|
-
unicode-range: U+20AD-20CF;
|
|
68
|
-
unicode-range: U+2113;
|
|
69
|
-
unicode-range: U+2C60-2C7F;
|
|
70
|
-
unicode-range: U+A720-A7FF;
|
|
62
|
+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
71
63
|
font-family: Roboto;
|
|
72
64
|
}
|
|
73
65
|
@font-face {
|
|
@@ -75,23 +67,7 @@
|
|
|
75
67
|
font-weight: 400;
|
|
76
68
|
font-display: swap;
|
|
77
69
|
src: url(https://dt-cdn.net/fonts/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2) format('woff2');
|
|
78
|
-
unicode-range: U+0000-00FF;
|
|
79
|
-
unicode-range: U+0131;
|
|
80
|
-
unicode-range: U+0152-0153;
|
|
81
|
-
unicode-range: U+02BB-02BC;
|
|
82
|
-
unicode-range: U+02C6;
|
|
83
|
-
unicode-range: U+02DA;
|
|
84
|
-
unicode-range: U+02DC;
|
|
85
|
-
unicode-range: U+2000-206F;
|
|
86
|
-
unicode-range: U+2074;
|
|
87
|
-
unicode-range: U+20AC;
|
|
88
|
-
unicode-range: U+2122;
|
|
89
|
-
unicode-range: U+2191;
|
|
90
|
-
unicode-range: U+2193;
|
|
91
|
-
unicode-range: U+2212;
|
|
92
|
-
unicode-range: U+2215;
|
|
93
|
-
unicode-range: U+FEFF;
|
|
94
|
-
unicode-range: U+FFFD;
|
|
70
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
95
71
|
font-family: Roboto;
|
|
96
72
|
}
|
|
97
73
|
@font-face {
|
|
@@ -99,15 +75,7 @@
|
|
|
99
75
|
font-weight: 500;
|
|
100
76
|
font-display: swap;
|
|
101
77
|
src: url(https://dt-cdn.net/fonts/KFOlCnqEu92Fr1MmEU9fChc4AMP6lbBP.woff2) format('woff2');
|
|
102
|
-
unicode-range: U+0100-024F;
|
|
103
|
-
unicode-range: U+0259;
|
|
104
|
-
unicode-range: U+1E00-1EFF;
|
|
105
|
-
unicode-range: U+2020;
|
|
106
|
-
unicode-range: U+20A0-20AB;
|
|
107
|
-
unicode-range: U+20AD-20CF;
|
|
108
|
-
unicode-range: U+2113;
|
|
109
|
-
unicode-range: U+2C60-2C7F;
|
|
110
|
-
unicode-range: U+A720-A7FF;
|
|
78
|
+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
111
79
|
font-family: Roboto;
|
|
112
80
|
}
|
|
113
81
|
@font-face {
|
|
@@ -115,23 +83,7 @@
|
|
|
115
83
|
font-weight: 500;
|
|
116
84
|
font-display: swap;
|
|
117
85
|
src: url(https://dt-cdn.net/fonts/KFOlCnqEu92Fr1MmEU9fBBc4AMP6lQ.woff2) format('woff2');
|
|
118
|
-
unicode-range: U+0000-00FF;
|
|
119
|
-
unicode-range: U+0131;
|
|
120
|
-
unicode-range: U+0152-0153;
|
|
121
|
-
unicode-range: U+02BB-02BC;
|
|
122
|
-
unicode-range: U+02C6;
|
|
123
|
-
unicode-range: U+02DA;
|
|
124
|
-
unicode-range: U+02DC;
|
|
125
|
-
unicode-range: U+2000-206F;
|
|
126
|
-
unicode-range: U+2074;
|
|
127
|
-
unicode-range: U+20AC;
|
|
128
|
-
unicode-range: U+2122;
|
|
129
|
-
unicode-range: U+2191;
|
|
130
|
-
unicode-range: U+2193;
|
|
131
|
-
unicode-range: U+2212;
|
|
132
|
-
unicode-range: U+2215;
|
|
133
|
-
unicode-range: U+FEFF;
|
|
134
|
-
unicode-range: U+FFFD;
|
|
86
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
135
87
|
font-family: Roboto;
|
|
136
88
|
}
|
|
137
89
|
@font-face {
|
|
@@ -139,15 +91,7 @@
|
|
|
139
91
|
font-weight: 400;
|
|
140
92
|
font-display: swap;
|
|
141
93
|
src: url(https://dt-cdn.net/fonts/L0xTDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vrtSM1J-gEPT5Ese6hmHSZ0me8iUI0lkQ.woff2) format('woff2');
|
|
142
|
-
unicode-range: U+0100-024F;
|
|
143
|
-
unicode-range: U+0259;
|
|
144
|
-
unicode-range: U+1E00-1EFF;
|
|
145
|
-
unicode-range: U+2020;
|
|
146
|
-
unicode-range: U+20A0-20AB;
|
|
147
|
-
unicode-range: U+20AD-20CF;
|
|
148
|
-
unicode-range: U+2113;
|
|
149
|
-
unicode-range: U+2C60-2C7F;
|
|
150
|
-
unicode-range: U+A720-A7FF;
|
|
94
|
+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
151
95
|
font-family: Roboto Mono;
|
|
152
96
|
}
|
|
153
97
|
@font-face {
|
|
@@ -155,23 +99,7 @@
|
|
|
155
99
|
font-weight: 400;
|
|
156
100
|
font-display: swap;
|
|
157
101
|
src: url(https://dt-cdn.net/fonts/L0xTDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vrtSM1J-gEPT5Ese6hmHSh0me8iUI0.woff2) format('woff2');
|
|
158
|
-
unicode-range: U+0000-00FF;
|
|
159
|
-
unicode-range: U+0131;
|
|
160
|
-
unicode-range: U+0152-0153;
|
|
161
|
-
unicode-range: U+02BB-02BC;
|
|
162
|
-
unicode-range: U+02C6;
|
|
163
|
-
unicode-range: U+02DA;
|
|
164
|
-
unicode-range: U+02DC;
|
|
165
|
-
unicode-range: U+2000-206F;
|
|
166
|
-
unicode-range: U+2074;
|
|
167
|
-
unicode-range: U+20AC;
|
|
168
|
-
unicode-range: U+2122;
|
|
169
|
-
unicode-range: U+2191;
|
|
170
|
-
unicode-range: U+2193;
|
|
171
|
-
unicode-range: U+2212;
|
|
172
|
-
unicode-range: U+2215;
|
|
173
|
-
unicode-range: U+FEFF;
|
|
174
|
-
unicode-range: U+FFFD;
|
|
102
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
175
103
|
font-family: Roboto Mono;
|
|
176
104
|
}
|
|
177
105
|
@font-face {
|
|
@@ -179,15 +107,7 @@
|
|
|
179
107
|
font-weight: 500;
|
|
180
108
|
font-display: swap;
|
|
181
109
|
src: url(https://dt-cdn.net/fonts/L0xTDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vrtSM1J-gEPT5Ese6hmHSZ0me8iUI0lkQ.woff2) format('woff2');
|
|
182
|
-
unicode-range: U+0100-024F;
|
|
183
|
-
unicode-range: U+0259;
|
|
184
|
-
unicode-range: U+1E00-1EFF;
|
|
185
|
-
unicode-range: U+2020;
|
|
186
|
-
unicode-range: U+20A0-20AB;
|
|
187
|
-
unicode-range: U+20AD-20CF;
|
|
188
|
-
unicode-range: U+2113;
|
|
189
|
-
unicode-range: U+2C60-2C7F;
|
|
190
|
-
unicode-range: U+A720-A7FF;
|
|
110
|
+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
191
111
|
font-family: Roboto Mono;
|
|
192
112
|
}
|
|
193
113
|
@font-face {
|
|
@@ -195,23 +115,7 @@
|
|
|
195
115
|
font-weight: 500;
|
|
196
116
|
font-display: swap;
|
|
197
117
|
src: url(https://dt-cdn.net/fonts/L0xTDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vrtSM1J-gEPT5Ese6hmHSh0me8iUI0.woff2) format('woff2');
|
|
198
|
-
unicode-range: U+0000-00FF;
|
|
199
|
-
unicode-range: U+0131;
|
|
200
|
-
unicode-range: U+0152-0153;
|
|
201
|
-
unicode-range: U+02BB-02BC;
|
|
202
|
-
unicode-range: U+02C6;
|
|
203
|
-
unicode-range: U+02DA;
|
|
204
|
-
unicode-range: U+02DC;
|
|
205
|
-
unicode-range: U+2000-206F;
|
|
206
|
-
unicode-range: U+2074;
|
|
207
|
-
unicode-range: U+20AC;
|
|
208
|
-
unicode-range: U+2122;
|
|
209
|
-
unicode-range: U+2191;
|
|
210
|
-
unicode-range: U+2193;
|
|
211
|
-
unicode-range: U+2212;
|
|
212
|
-
unicode-range: U+2215;
|
|
213
|
-
unicode-range: U+FEFF;
|
|
214
|
-
unicode-range: U+FFFD;
|
|
118
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
215
119
|
font-family: Roboto Mono;
|
|
216
120
|
}
|
|
217
121
|
:root {
|
|
@@ -219,12 +123,12 @@
|
|
|
219
123
|
--dt-borders-style-dashed: dashed;
|
|
220
124
|
--dt-borders-width-default: 1px;
|
|
221
125
|
--dt-borders-width-emphasized: 2px;
|
|
222
|
-
--dt-borders-radius-surface-subdued:
|
|
223
|
-
--dt-borders-radius-surface-default:
|
|
224
|
-
--dt-borders-radius-container-subdued:
|
|
225
|
-
--dt-borders-radius-container-default:
|
|
226
|
-
--dt-borders-radius-field-subdued:
|
|
227
|
-
--dt-borders-radius-field-default:
|
|
126
|
+
--dt-borders-radius-surface-subdued: 9px;
|
|
127
|
+
--dt-borders-radius-surface-default: 12px;
|
|
128
|
+
--dt-borders-radius-container-subdued: 6px;
|
|
129
|
+
--dt-borders-radius-container-default: 9px;
|
|
130
|
+
--dt-borders-radius-field-subdued: 3px;
|
|
131
|
+
--dt-borders-radius-field-default: 6px;
|
|
228
132
|
--dt-borders-radius-field-emphasized: 9999px;
|
|
229
133
|
--dt-box-shadows-surface-flat-rest: 0px 0px 0px 1px #2d2e4e0d;
|
|
230
134
|
--dt-box-shadows-surface-flat-hover: 0px 0px 0px 1px #2d2e4e08, 0px 1px 2px #2d2e4e0d, 0px 4px 8px -2px #2d2e4e12;
|
|
@@ -1048,12 +952,12 @@
|
|
|
1048
952
|
--dt-borders-style-dashed: dashed;
|
|
1049
953
|
--dt-borders-width-default: 1px;
|
|
1050
954
|
--dt-borders-width-emphasized: 2px;
|
|
1051
|
-
--dt-borders-radius-surface-subdued:
|
|
1052
|
-
--dt-borders-radius-surface-default:
|
|
1053
|
-
--dt-borders-radius-container-subdued:
|
|
1054
|
-
--dt-borders-radius-container-default:
|
|
1055
|
-
--dt-borders-radius-field-subdued:
|
|
1056
|
-
--dt-borders-radius-field-default:
|
|
955
|
+
--dt-borders-radius-surface-subdued: 9px;
|
|
956
|
+
--dt-borders-radius-surface-default: 12px;
|
|
957
|
+
--dt-borders-radius-container-subdued: 6px;
|
|
958
|
+
--dt-borders-radius-container-default: 9px;
|
|
959
|
+
--dt-borders-radius-field-subdued: 3px;
|
|
960
|
+
--dt-borders-radius-field-default: 6px;
|
|
1057
961
|
--dt-borders-radius-field-emphasized: 9999px;
|
|
1058
962
|
--dt-box-shadows-surface-flat-rest: 0px 0px 0px 1px #f0f0f514;
|
|
1059
963
|
--dt-box-shadows-surface-flat-hover: 0px 0px 0px 1px #f0f0f514, 0px 1px 2px #112, 0px 4px 8px #112c;
|
|
@@ -1912,12 +1816,12 @@ body {
|
|
|
1912
1816
|
--dt-borders-style-dashed: dashed;
|
|
1913
1817
|
--dt-borders-width-default: 1px;
|
|
1914
1818
|
--dt-borders-width-emphasized: 2px;
|
|
1915
|
-
--dt-borders-radius-surface-subdued:
|
|
1916
|
-
--dt-borders-radius-surface-default:
|
|
1917
|
-
--dt-borders-radius-container-subdued:
|
|
1918
|
-
--dt-borders-radius-container-default:
|
|
1919
|
-
--dt-borders-radius-field-subdued:
|
|
1920
|
-
--dt-borders-radius-field-default:
|
|
1819
|
+
--dt-borders-radius-surface-subdued: 9px;
|
|
1820
|
+
--dt-borders-radius-surface-default: 12px;
|
|
1821
|
+
--dt-borders-radius-container-subdued: 6px;
|
|
1822
|
+
--dt-borders-radius-container-default: 9px;
|
|
1823
|
+
--dt-borders-radius-field-subdued: 3px;
|
|
1824
|
+
--dt-borders-radius-field-default: 6px;
|
|
1921
1825
|
--dt-borders-radius-field-emphasized: 9999px;
|
|
1922
1826
|
--dt-box-shadows-surface-flat-rest: 0px 0px 0px 1px #2d2e4e0d;
|
|
1923
1827
|
--dt-box-shadows-surface-flat-hover: 0px 0px 0px 1px #2d2e4e08, 0px 1px 2px #2d2e4e0d, 0px 4px 8px -2px #2d2e4e12;
|
|
@@ -2737,8 +2641,7 @@ body {
|
|
|
2737
2641
|
}
|
|
2738
2642
|
}
|
|
2739
2643
|
@supports (-moz-appearance:none) {
|
|
2740
|
-
|
|
2741
|
-
scrollbar-color: var(--dt-colors-
|
|
2742
|
-
scrollbar-width: thin;
|
|
2644
|
+
* {
|
|
2645
|
+
scrollbar-color: var(--dt-colors-border-neutral-default, #dadbe4) transparent;
|
|
2743
2646
|
}
|
|
2744
2647
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useMemo, useId as useReactId } from "react";
|
|
2
|
+
function useId() {
|
|
3
|
+
const id = useReactId();
|
|
4
|
+
const sanitizedId = useMemo(() => {
|
|
5
|
+
return id.replace(":", "\xAB").replace(":", "\xBB");
|
|
6
|
+
}, [id]);
|
|
7
|
+
return sanitizedId;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
useId
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=useId.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/core/hooks/useId.ts"],
|
|
4
|
+
"sourcesContent": ["// The one place where we actually need to use this import.\n// eslint-disable-next-line no-restricted-imports\nimport { useMemo, useId as useReactId } from 'react';\n\n/**\n * Custom hook to generate a sanitized react useId for use in DOM selectors.\n *\n * React's `useId()` may return IDs containing colons (e.g., `:r1:`), which are valid in HTML\n * but **not valid CSS identifiers**. This can cause issues when using `querySelector` or when\n * libraries like `nwsapi` attempt to parse selectors, especially in test environments like jest\n * with jsdom.\n *\n * This hook replaces colons with a safe, reversible encoding (`\u00AB` and `\u00BB`) to ensure the ID\n * remains unique and usable in CSS selectors. The characters are chosen to be the same as in the\n * react 19.2+ implementation.\n *\n * Background:\n * - React previously used colons in generated IDs to avoid collisions.\n * - This caused parsing errors in selector engines like `nwsapi` when used in test environments.\n * - React addressed this in [facebook/react#32001](https://github.com/facebook/react/pull/32001) in React 19.2+.\n *\n * This hook provides a workaround for environments still using older React versions or needing\n * compatibility with selector engines that strictly enforce CSS syntax.\n *\n * @returns A sanitized ID string safe for use in `querySelector` and CSS selectors.\n * @public\n */\nexport function useId() {\n const id = useReactId();\n\n const sanitizedId = useMemo(() => {\n return id.replace(':', '\\u00AB').replace(':', '\\u00BB');\n }, [id]);\n\n return sanitizedId;\n}\n"],
|
|
5
|
+
"mappings": "AAEA,SAAS,SAAS,SAAS,kBAAkB;AAyBtC,SAAS,QAAQ;AACtB,QAAM,KAAK,WAAW;AAEtB,QAAM,cAAc,QAAQ,MAAM;AAChC,WAAO,GAAG,QAAQ,KAAK,MAAQ,EAAE,QAAQ,KAAK,MAAQ;AAAA,EACxD,GAAG,CAAC,EAAE,CAAC;AAEP,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/esm/core/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
mergeProps
|
|
18
18
|
} from "./utils/merge-props.js";
|
|
19
19
|
import { useAriaLabelingProps } from "./hooks/useAriaLabelingProps.js";
|
|
20
|
+
import { useId } from "./hooks/useId.js";
|
|
20
21
|
import { useSafeForwardProps } from "./hooks/useSafeForwardProps.js";
|
|
21
22
|
import { canReceiveDefaultTextFormat } from "./utils/can-receive-default-text-format.js";
|
|
22
23
|
import { parseBoolean } from "./utils/parse-boolean.js";
|
|
@@ -36,6 +37,7 @@ export {
|
|
|
36
37
|
useAriaLabelingProps as _useAriaLabelingProps,
|
|
37
38
|
useFocusContext as _useFocusContext,
|
|
38
39
|
useSafeForwardProps as _useSafeForwardProps,
|
|
39
|
-
useCurrentTheme
|
|
40
|
+
useCurrentTheme,
|
|
41
|
+
useId
|
|
40
42
|
};
|
|
41
43
|
//# sourceMappingURL=index.js.map
|
package/esm/core/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/core/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { AppRoot, type AppRootProps } from './components/app-root/AppRoot.js';\nexport {\n FocusScope,\n type FocusScopeProps,\n} from './components/focus-scope/FocusScope.js';\n\nexport { type FocusContextProps as _FocusContextProps } from './contexts/FocusContext.js';\n\nexport { useCurrentTheme } from './hooks/useCurrentTheme.js';\nexport { useFocusContext as _useFocusContext } from './hooks/useFocusContext.js';\nexport {\n FocusProvider as _FocusProvider,\n type Modality as _Modality,\n} from './providers/FocusProvider.js';\nexport type { MaskingProps } from './types/masking-props.js';\nexport type { DataTestId } from './types/data-props.js';\nexport type { StylingProps } from './types/styling-props.js';\nexport type { WithChildren } from './types/with-children.js';\nexport type {\n PolymorphOwnProps,\n PolymorphProps,\n PolymorphicComponentProps,\n} from './types/polymorph.js';\nexport { attemptFocus as _attemptFocus } from './utils/focus-management/attempt-focus.js';\nexport { focusFirstDescendant as _focusFirstDescendant } from './utils/focus-management/focus-first-descendant.js';\nexport { getFirstFocusableChild as _getFirstFocusableChild } from './utils/focus-management/get-first-focusable-child.js';\nexport { getLastFocusableChild as _getLastFocusableChild } from './utils/focus-management/get-last-focusable-child.js';\nexport { isFocusable as _isFocusable } from './utils/focus-management/is-focusable.js';\nexport { isBrowser as _isBrowser } from './utils/isBrowser.js';\nexport {\n mergeProps as _mergeProps,\n type NullToObject as _NullToObject,\n type TupleTypes as _TupleTypes,\n type UnionToIntersection as _UnionToIntersection,\n} from './utils/merge-props.js';\nexport { type _HeadingLevel, type _HeadingTag } from './types/heading.js';\nexport { useAriaLabelingProps as _useAriaLabelingProps } from './hooks/useAriaLabelingProps.js';\nexport { useSafeForwardProps as _useSafeForwardProps } from './hooks/useSafeForwardProps.js';\nexport type { UseSafeForwardReturnProps as _UseSafeForwardReturnProps } from './hooks/useSafeForwardProps.js';\nexport type {\n AriaDisabledProps,\n AriaLabelingProps,\n} from './types/a11y-props.js';\nexport type { DOMProps } from './types/dom.js';\nexport { canReceiveDefaultTextFormat as _canReceiveDefaultTextFormat } from './utils/can-receive-default-text-format.js';\nexport { parseBoolean as _parseBoolean } from './utils/parse-boolean.js';\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,eAAkC;AAC3C;AAAA,EACE;AAAA,OAEK;AAIP,SAAS,uBAAuB;AAChC,SAA4B,uBAAwB;AACpD;AAAA,EACmB;AAAA,OAEZ;AAUP,SAAyB,oBAAqB;AAC9C,SAAiC,4BAA6B;AAC9D,SAAmC,8BAA+B;AAClE,SAAkC,6BAA8B;AAChE,SAAwB,mBAAoB;AAC5C,SAAsB,iBAAkB;AACxC;AAAA,EACgB;AAAA,OAIT;AAEP,SAAiC,4BAA6B;AAC9D,SAAgC,2BAA4B;AAO5D,SAAwC,mCAAoC;AAC5E,SAAyB,oBAAqB;",
|
|
4
|
+
"sourcesContent": ["export { AppRoot, type AppRootProps } from './components/app-root/AppRoot.js';\nexport {\n FocusScope,\n type FocusScopeProps,\n} from './components/focus-scope/FocusScope.js';\n\nexport { type FocusContextProps as _FocusContextProps } from './contexts/FocusContext.js';\n\nexport { useCurrentTheme } from './hooks/useCurrentTheme.js';\nexport { useFocusContext as _useFocusContext } from './hooks/useFocusContext.js';\nexport {\n FocusProvider as _FocusProvider,\n type Modality as _Modality,\n} from './providers/FocusProvider.js';\nexport type { MaskingProps } from './types/masking-props.js';\nexport type { DataTestId } from './types/data-props.js';\nexport type { StylingProps } from './types/styling-props.js';\nexport type { WithChildren } from './types/with-children.js';\nexport type {\n PolymorphOwnProps,\n PolymorphProps,\n PolymorphicComponentProps,\n} from './types/polymorph.js';\nexport { attemptFocus as _attemptFocus } from './utils/focus-management/attempt-focus.js';\nexport { focusFirstDescendant as _focusFirstDescendant } from './utils/focus-management/focus-first-descendant.js';\nexport { getFirstFocusableChild as _getFirstFocusableChild } from './utils/focus-management/get-first-focusable-child.js';\nexport { getLastFocusableChild as _getLastFocusableChild } from './utils/focus-management/get-last-focusable-child.js';\nexport { isFocusable as _isFocusable } from './utils/focus-management/is-focusable.js';\nexport { isBrowser as _isBrowser } from './utils/isBrowser.js';\nexport {\n mergeProps as _mergeProps,\n type NullToObject as _NullToObject,\n type TupleTypes as _TupleTypes,\n type UnionToIntersection as _UnionToIntersection,\n} from './utils/merge-props.js';\nexport { type _HeadingLevel, type _HeadingTag } from './types/heading.js';\nexport { useAriaLabelingProps as _useAriaLabelingProps } from './hooks/useAriaLabelingProps.js';\nexport { useId } from './hooks/useId.js';\nexport { useSafeForwardProps as _useSafeForwardProps } from './hooks/useSafeForwardProps.js';\nexport type { UseSafeForwardReturnProps as _UseSafeForwardReturnProps } from './hooks/useSafeForwardProps.js';\nexport type {\n AriaDisabledProps,\n AriaLabelingProps,\n} from './types/a11y-props.js';\nexport type { DOMProps } from './types/dom.js';\nexport { canReceiveDefaultTextFormat as _canReceiveDefaultTextFormat } from './utils/can-receive-default-text-format.js';\nexport { parseBoolean as _parseBoolean } from './utils/parse-boolean.js';\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,eAAkC;AAC3C;AAAA,EACE;AAAA,OAEK;AAIP,SAAS,uBAAuB;AAChC,SAA4B,uBAAwB;AACpD;AAAA,EACmB;AAAA,OAEZ;AAUP,SAAyB,oBAAqB;AAC9C,SAAiC,4BAA6B;AAC9D,SAAmC,8BAA+B;AAClE,SAAkC,6BAA8B;AAChE,SAAwB,mBAAoB;AAC5C,SAAsB,iBAAkB;AACxC;AAAA,EACgB;AAAA,OAIT;AAEP,SAAiC,4BAA6B;AAC9D,SAAS,aAAa;AACtB,SAAgC,2BAA4B;AAO5D,SAAwC,mCAAoC;AAC5E,SAAyB,oBAAqB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
._z2r50s3-1-
|
|
1
|
+
._z2r50s3-1-11-0 {
|
|
2
2
|
outline: none;
|
|
3
3
|
}
|
|
4
|
-
._z2r50s3-1-
|
|
4
|
+
._z2r50s3-1-11-0:focus-visible {
|
|
5
5
|
outline: none;
|
|
6
6
|
}
|
|
7
|
-
._z2r50s4-1-
|
|
8
|
-
border-radius: var(--dt-borders-radius-field-subdued,
|
|
9
|
-
box-shadow: inset 0 0 0 var(--dt-borders-width-default, 1px) var(--_z2r50s0-1-
|
|
10
|
-
background-color: var(--_z2r50s2-1-
|
|
7
|
+
._z2r50s4-1-11-0 {
|
|
8
|
+
border-radius: var(--dt-borders-radius-field-subdued, 3px);
|
|
9
|
+
box-shadow: inset 0 0 0 var(--dt-borders-width-default, 1px) var(--_z2r50s0-1-11-0);
|
|
10
|
+
background-color: var(--_z2r50s2-1-11-0);
|
|
11
11
|
}
|
|
12
|
-
._z2r50s5-1-
|
|
13
|
-
box-shadow: inset 0 0 0 var(--dt-borders-width-emphasized, 2px) var(--_z2r50s0-1-
|
|
12
|
+
._z2r50s5-1-11-0._z2r50s5-1-11-0 {
|
|
13
|
+
box-shadow: inset 0 0 0 var(--dt-borders-width-emphasized, 2px) var(--_z2r50s0-1-11-0), inset 0 0 0 calc(var(--dt-borders-width-emphasized, 2px) + 1px) var(--_z2r50s1-1-11-0);
|
|
14
14
|
}
|
|
15
|
-
._z2r50s6-1-
|
|
16
|
-
--_z2r50s0-1-
|
|
17
|
-
--_z2r50s1-1-
|
|
18
|
-
--_z2r50s2-1-
|
|
15
|
+
._z2r50s6-1-11-0 {
|
|
16
|
+
--_z2r50s0-1-11-0: var(--dt-colors-border-neutral-accent, #595a7d);
|
|
17
|
+
--_z2r50s1-1-11-0: var(--dt-colors-border-neutral-default, #dadbe4);
|
|
18
|
+
--_z2r50s2-1-11-0: var(--dt-colors-background-field-neutral-emphasized, #e4e5eb);
|
|
19
19
|
}
|
|
20
|
-
._z2r50s7-1-
|
|
21
|
-
--_z2r50s0-1-
|
|
22
|
-
--_z2r50s1-1-
|
|
23
|
-
--_z2r50s2-1-
|
|
20
|
+
._z2r50s7-1-11-0 {
|
|
21
|
+
--_z2r50s0-1-11-0: var(--dt-colors-border-primary-accent, #464cce);
|
|
22
|
+
--_z2r50s1-1-11-0: var(--dt-colors-border-primary-default, #d5dbf6);
|
|
23
|
+
--_z2r50s2-1-11-0: var(--dt-colors-background-field-primary-emphasized, #e1e5f7);
|
|
24
24
|
}
|
|
25
|
-
._z2r50s8-1-
|
|
26
|
-
--_z2r50s0-1-
|
|
27
|
-
--_z2r50s1-1-
|
|
28
|
-
--_z2r50s2-1-
|
|
25
|
+
._z2r50s8-1-11-0 {
|
|
26
|
+
--_z2r50s0-1-11-0: var(--dt-colors-border-success-accent, #2d6761);
|
|
27
|
+
--_z2r50s1-1-11-0: var(--dt-colors-border-success-default, #d3dedd);
|
|
28
|
+
--_z2r50s2-1-11-0: var(--dt-colors-background-field-success-emphasized, #e0e7e6);
|
|
29
29
|
}
|
|
30
|
-
._z2r50s9-1-
|
|
31
|
-
--_z2r50s0-1-
|
|
32
|
-
--_z2r50s1-1-
|
|
33
|
-
--_z2r50s2-1-
|
|
30
|
+
._z2r50s9-1-11-0 {
|
|
31
|
+
--_z2r50s0-1-11-0: var(--dt-colors-border-warning-accent, #855400);
|
|
32
|
+
--_z2r50s1-1-11-0: var(--dt-colors-border-warning-default, #f9ebdb);
|
|
33
|
+
--_z2r50s2-1-11-0: var(--dt-colors-background-field-warning-emphasized, #f9f0e5);
|
|
34
34
|
}
|
|
35
|
-
._z2r50sa-1-
|
|
36
|
-
--_z2r50s0-1-
|
|
37
|
-
--_z2r50s1-1-
|
|
38
|
-
--_z2r50s2-1-
|
|
35
|
+
._z2r50sa-1-11-0 {
|
|
36
|
+
--_z2r50s0-1-11-0: var(--dt-colors-border-critical-accent, #bb0731);
|
|
37
|
+
--_z2r50s1-1-11-0: var(--dt-colors-border-critical-default, #f6d6d5);
|
|
38
|
+
--_z2r50s2-1-11-0: var(--dt-colors-background-field-critical-emphasized, #f8e1e1);
|
|
39
39
|
}
|
|
40
|
-
._z2r50sb-1-
|
|
40
|
+
._z2r50sb-1-11-0:focus-within {
|
|
41
41
|
outline: none;
|
|
42
42
|
}
|
|
43
|
-
._z2r50sc-1-
|
|
44
|
-
border-radius: var(--dt-borders-radius-field-subdued,
|
|
45
|
-
box-shadow: inset 0 0 0 var(--dt-borders-width-default, 1px) var(--_z2r50s0-1-
|
|
46
|
-
background-color: var(--_z2r50s2-1-
|
|
47
|
-
}
|
|
48
|
-
._z2r50sd-1-
|
|
49
|
-
box-shadow: inset 0 0 0 var(--dt-borders-width-emphasized, 2px) var(--_z2r50s0-1-
|
|
50
|
-
}
|
|
51
|
-
._z2r50se-1-
|
|
52
|
-
--_z2r50s0-1-
|
|
53
|
-
--_z2r50s1-1-
|
|
54
|
-
--_z2r50s2-1-
|
|
55
|
-
}
|
|
56
|
-
._z2r50sf-1-
|
|
57
|
-
--_z2r50s0-1-
|
|
58
|
-
--_z2r50s1-1-
|
|
59
|
-
--_z2r50s2-1-
|
|
60
|
-
}
|
|
61
|
-
._z2r50sg-1-
|
|
62
|
-
--_z2r50s0-1-
|
|
63
|
-
--_z2r50s1-1-
|
|
64
|
-
--_z2r50s2-1-
|
|
65
|
-
}
|
|
66
|
-
._z2r50sh-1-
|
|
67
|
-
--_z2r50s0-1-
|
|
68
|
-
--_z2r50s1-1-
|
|
69
|
-
--_z2r50s2-1-
|
|
70
|
-
}
|
|
71
|
-
._z2r50si-1-
|
|
72
|
-
--_z2r50s0-1-
|
|
73
|
-
--_z2r50s1-1-
|
|
74
|
-
--_z2r50s2-1-
|
|
43
|
+
._z2r50sc-1-11-0:focus-within {
|
|
44
|
+
border-radius: var(--dt-borders-radius-field-subdued, 3px);
|
|
45
|
+
box-shadow: inset 0 0 0 var(--dt-borders-width-default, 1px) var(--_z2r50s0-1-11-0);
|
|
46
|
+
background-color: var(--_z2r50s2-1-11-0);
|
|
47
|
+
}
|
|
48
|
+
._z2r50sd-1-11-0:focus-within {
|
|
49
|
+
box-shadow: inset 0 0 0 var(--dt-borders-width-emphasized, 2px) var(--_z2r50s0-1-11-0), inset 0 0 0 calc(var(--dt-borders-width-emphasized, 2px) + 1px) var(--_z2r50s1-1-11-0);
|
|
50
|
+
}
|
|
51
|
+
._z2r50se-1-11-0 {
|
|
52
|
+
--_z2r50s0-1-11-0: var(--dt-colors-border-neutral-accent, #595a7d);
|
|
53
|
+
--_z2r50s1-1-11-0: var(--dt-colors-border-neutral-default, #dadbe4);
|
|
54
|
+
--_z2r50s2-1-11-0: var(--dt-colors-background-field-neutral-emphasized, #e4e5eb);
|
|
55
|
+
}
|
|
56
|
+
._z2r50sf-1-11-0 {
|
|
57
|
+
--_z2r50s0-1-11-0: var(--dt-colors-border-primary-accent, #464cce);
|
|
58
|
+
--_z2r50s1-1-11-0: var(--dt-colors-border-primary-default, #d5dbf6);
|
|
59
|
+
--_z2r50s2-1-11-0: var(--dt-colors-background-field-primary-emphasized, #e1e5f7);
|
|
60
|
+
}
|
|
61
|
+
._z2r50sg-1-11-0 {
|
|
62
|
+
--_z2r50s0-1-11-0: var(--dt-colors-border-success-accent, #2d6761);
|
|
63
|
+
--_z2r50s1-1-11-0: var(--dt-colors-border-success-default, #d3dedd);
|
|
64
|
+
--_z2r50s2-1-11-0: var(--dt-colors-background-field-success-emphasized, #e0e7e6);
|
|
65
|
+
}
|
|
66
|
+
._z2r50sh-1-11-0 {
|
|
67
|
+
--_z2r50s0-1-11-0: var(--dt-colors-border-warning-accent, #855400);
|
|
68
|
+
--_z2r50s1-1-11-0: var(--dt-colors-border-warning-default, #f9ebdb);
|
|
69
|
+
--_z2r50s2-1-11-0: var(--dt-colors-background-field-warning-emphasized, #f9f0e5);
|
|
70
|
+
}
|
|
71
|
+
._z2r50si-1-11-0 {
|
|
72
|
+
--_z2r50s0-1-11-0: var(--dt-colors-border-critical-accent, #bb0731);
|
|
73
|
+
--_z2r50s1-1-11-0: var(--dt-colors-border-critical-default, #f6d6d5);
|
|
74
|
+
--_z2r50s2-1-11-0: var(--dt-colors-background-field-critical-emphasized, #f8e1e1);
|
|
75
75
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./focusRing.css";
|
|
2
2
|
import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3
|
-
var focusRingCSS = _7a468({ defaultClassName: "_z2r50s3-1-
|
|
4
|
-
var focusRingFocusWithinCSS = _7a468({ defaultClassName: "_z2r50sb-1-
|
|
3
|
+
var focusRingCSS = _7a468({ defaultClassName: "_z2r50s3-1-11-0", variantClassNames: { minimal: { true: "_z2r50s4-1-11-0", false: "_z2r50s5-1-11-0" }, variant: { neutral: "_z2r50s6-1-11-0", primary: "_z2r50s7-1-11-0", success: "_z2r50s8-1-11-0", warning: "_z2r50s9-1-11-0", critical: "_z2r50sa-1-11-0" } }, defaultVariants: {}, compoundVariants: [] });
|
|
4
|
+
var focusRingFocusWithinCSS = _7a468({ defaultClassName: "_z2r50sb-1-11-0", variantClassNames: { minimal: { true: "_z2r50sc-1-11-0", false: "_z2r50sd-1-11-0" }, variant: { neutral: "_z2r50se-1-11-0", primary: "_z2r50sf-1-11-0", success: "_z2r50sg-1-11-0", warning: "_z2r50sh-1-11-0", critical: "_z2r50si-1-11-0" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5
5
|
export {
|
|
6
6
|
focusRingCSS,
|
|
7
7
|
focusRingFocusWithinCSS
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/core/styles/focusRing.css.ts"],
|
|
4
|
-
"sourcesContent": ["import './focusRing.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var focusRingCSS = _7a468({defaultClassName:'_z2r50s3-1-
|
|
5
|
-
"mappings": "AAAA,OAAO;AACP,SAAS,mBAAmB,cAAc;AACnC,IAAI,eAAe,OAAO,EAAC,kBAAiB,
|
|
4
|
+
"sourcesContent": ["import './focusRing.css';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var focusRingCSS = _7a468({defaultClassName:'_z2r50s3-1-11-0',variantClassNames:{minimal:{true:'_z2r50s4-1-11-0',false:'_z2r50s5-1-11-0'},variant:{neutral:'_z2r50s6-1-11-0',primary:'_z2r50s7-1-11-0',success:'_z2r50s8-1-11-0',warning:'_z2r50s9-1-11-0',critical:'_z2r50sa-1-11-0'}},defaultVariants:{},compoundVariants:[]});\nexport var focusRingFocusWithinCSS = _7a468({defaultClassName:'_z2r50sb-1-11-0',variantClassNames:{minimal:{true:'_z2r50sc-1-11-0',false:'_z2r50sd-1-11-0'},variant:{neutral:'_z2r50se-1-11-0',primary:'_z2r50sf-1-11-0',success:'_z2r50sg-1-11-0',warning:'_z2r50sh-1-11-0',critical:'_z2r50si-1-11-0'}},defaultVariants:{},compoundVariants:[]});"],
|
|
5
|
+
"mappings": "AAAA,OAAO;AACP,SAAS,mBAAmB,cAAc;AACnC,IAAI,eAAe,OAAO,EAAC,kBAAiB,mBAAkB,mBAAkB,EAAC,SAAQ,EAAC,MAAK,mBAAkB,OAAM,kBAAiB,GAAE,SAAQ,EAAC,SAAQ,mBAAkB,SAAQ,mBAAkB,SAAQ,mBAAkB,SAAQ,mBAAkB,UAAS,kBAAiB,EAAC,GAAE,iBAAgB,CAAC,GAAE,kBAAiB,CAAC,EAAC,CAAC;AAC/T,IAAI,0BAA0B,OAAO,EAAC,kBAAiB,mBAAkB,mBAAkB,EAAC,SAAQ,EAAC,MAAK,mBAAkB,OAAM,kBAAiB,GAAE,SAAQ,EAAC,SAAQ,mBAAkB,SAAQ,mBAAkB,SAAQ,mBAAkB,SAAQ,mBAAkB,UAAS,kBAAiB,EAAC,GAAE,iBAAgB,CAAC,GAAE,kBAAiB,CAAC,EAAC,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
useState
|
|
5
5
|
} from "react";
|
|
6
6
|
import { focusRingCSS, focusRingFocusWithinCSS } from "./focusRing.sty.js";
|
|
7
|
-
import {
|
|
7
|
+
import { useFocusContext } from "../hooks/useFocusContext.js";
|
|
8
8
|
function useFocusRing(props = {}) {
|
|
9
9
|
const {
|
|
10
10
|
variant = "neutral",
|
|
@@ -14,7 +14,7 @@ function useFocusRing(props = {}) {
|
|
|
14
14
|
disabled = false
|
|
15
15
|
} = props;
|
|
16
16
|
const [isFocused, setIsFocused] = useState(false);
|
|
17
|
-
const { modality } =
|
|
17
|
+
const { modality } = useFocusContext();
|
|
18
18
|
useEffect(() => {
|
|
19
19
|
if (disabled) {
|
|
20
20
|
setIsFocused(false);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/core/styles/useFocusRing.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n type FocusEvent as ReactFocusEvent,\n type FocusEventHandler,\n useCallback,\n useEffect,\n useState,\n} from 'react';\n\nimport { focusRingCSS, focusRingFocusWithinCSS } from './focusRing.sty.js';\nimport {
|
|
5
|
-
"mappings": "AAAA;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,cAAc,+BAA+B;AACtD,SAAS,
|
|
4
|
+
"sourcesContent": ["import {\n type FocusEvent as ReactFocusEvent,\n type FocusEventHandler,\n useCallback,\n useEffect,\n useState,\n} from 'react';\n\nimport { focusRingCSS, focusRingFocusWithinCSS } from './focusRing.sty.js';\nimport { useFocusContext } from '../hooks/useFocusContext.js';\n\n/** @internal */\nexport type VariantType =\n | 'neutral'\n | 'primary'\n | 'success'\n | 'warning'\n | 'critical';\n/** @internal */\nexport type UseFocusRingProps = {\n /**\n * A minimal focus outline is available for smaller content elements like links. This variant is applied when set to true.\n * @defaultValue false\n */\n isMinimal?: boolean;\n\n /**\n * Whether or not the modality should be ignored, so that the focus ring is also present if users clicks the element (not just by tabbing to it).\n * @defaultValue false\n */\n ignoreModality?: boolean;\n\n /**\n * The styling variant of the element.\n * @defaultValue neutral\n */\n variant?: VariantType;\n\n /**\n * Apply the focus ring styling if an embedded element gains the focus\n */\n focusWithin?: boolean;\n\n /**\n * Whether the element is disabled. If disabled changes to true, the focus will be removed.\n */\n disabled?: boolean;\n};\n\nexport type FocusRingProps = {\n /** The focus styles that depend on modality. */\n focusClassName: string;\n /** Focus handlers used to manage the focus state. Must be applied to the element that receives the focus.*/\n focusProps: {\n onFocus: (e: ReactFocusEvent) => void;\n onBlur: (e: ReactFocusEvent) => void;\n };\n /** Whether or not the element got focus via keyboard. */\n isFocusVisible: boolean;\n};\n\n/**\n * Custom hook used to determine focus styling depending on modality.\n * Returns the css classes (vanilla) that can be applied to the component in order to show the correct focus outline.\n * @internal\n */\nexport function useFocusRing(props: UseFocusRingProps = {}): FocusRingProps {\n const {\n variant = 'neutral',\n ignoreModality = false,\n isMinimal = false,\n focusWithin = false,\n disabled = false,\n } = props;\n const [isFocused, setIsFocused] = useState(false);\n const { modality } = useFocusContext();\n\n useEffect(() => {\n if (disabled) {\n setIsFocused(false);\n }\n }, [disabled]);\n\n const onBlur = useCallback<FocusEventHandler>((e) => {\n // trigger only when the self element is unfocused (stopPropagation)\n if (e.currentTarget === e.target) {\n setIsFocused(false);\n }\n }, []);\n\n const onFocus = useCallback<FocusEventHandler>((e) => {\n // trigger only when the self element is focused (stopPropagation)\n if (e.currentTarget === e.target) {\n setIsFocused(true);\n }\n }, []);\n\n const focusProps = {\n onFocus,\n onBlur,\n };\n\n if (\n ((ignoreModality || modality === 'keyboard') && isFocused) ||\n focusWithin\n ) {\n if (isMinimal) {\n return {\n focusClassName: focusWithin\n ? focusRingFocusWithinCSS({ minimal: true, variant })\n : focusRingCSS({ minimal: true, variant }),\n isFocusVisible: !focusWithin,\n focusProps,\n };\n }\n\n return {\n focusClassName: focusWithin\n ? focusRingFocusWithinCSS({ minimal: false, variant })\n : focusRingCSS({ minimal: false, variant }),\n isFocusVisible: !focusWithin,\n focusProps,\n };\n }\n\n return {\n focusClassName: focusWithin ? focusRingFocusWithinCSS() : focusRingCSS(),\n isFocusVisible: false,\n focusProps,\n };\n}\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,cAAc,+BAA+B;AACtD,SAAS,uBAAuB;AAyDzB,SAAS,aAAa,QAA2B,CAAC,GAAmB;AAC1E,QAAM;AAAA,IACJ,UAAU;AAAA,IACV,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,WAAW;AAAA,EACb,IAAI;AACJ,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAChD,QAAM,EAAE,SAAS,IAAI,gBAAgB;AAErC,YAAU,MAAM;AACd,QAAI,UAAU;AACZ,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,QAAQ,CAAC;AAEb,QAAM,SAAS,YAA+B,CAAC,MAAM;AAEnD,QAAI,EAAE,kBAAkB,EAAE,QAAQ;AAChC,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,QAAM,UAAU,YAA+B,CAAC,MAAM;AAEpD,QAAI,EAAE,kBAAkB,EAAE,QAAQ;AAChC,mBAAa,IAAI;AAAA,IACnB;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,QAAM,aAAa;AAAA,IACjB;AAAA,IACA;AAAA,EACF;AAEA,OACI,kBAAkB,aAAa,eAAe,aAChD,aACA;AACA,QAAI,WAAW;AACb,aAAO;AAAA,QACL,gBAAgB,cACZ,wBAAwB,EAAE,SAAS,MAAM,QAAQ,CAAC,IAClD,aAAa,EAAE,SAAS,MAAM,QAAQ,CAAC;AAAA,QAC3C,gBAAgB,CAAC;AAAA,QACjB;AAAA,MACF;AAAA,IACF;AAEA,WAAO;AAAA,MACL,gBAAgB,cACZ,wBAAwB,EAAE,SAAS,OAAO,QAAQ,CAAC,IACnD,aAAa,EAAE,SAAS,OAAO,QAAQ,CAAC;AAAA,MAC5C,gBAAgB,CAAC;AAAA,MACjB;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AAAA,IACL,gBAAgB,cAAc,wBAAwB,IAAI,aAAa;AAAA,IACvE,gBAAgB;AAAA,IAChB;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|