@rossigee/clarity-ui 18.2.1-fixed
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 +29 -0
- package/STYLES.md +1796 -0
- package/accordion/_accordion.clarity.scss +81 -0
- package/accordion/_properties.accordion.scss +45 -0
- package/accordion/_variables.accordion.scss +91 -0
- package/button/_buttons.clarity.scss +374 -0
- package/button/_mixins.buttons.scss +232 -0
- package/button/_properties.buttons.scss +325 -0
- package/button/_properties.toggles.scss +35 -0
- package/button/_variables.buttons.scss +843 -0
- package/button/_variables.toggles.scss +41 -0
- package/button/button-group/_button-group.clarity.scss +193 -0
- package/clr-ui.css +31728 -0
- package/clr-ui.css.map +1 -0
- package/clr-ui.min.css +52 -0
- package/clr-ui.min.css.map +1 -0
- package/collapsible-panel/_mixins.collapsible-panel.scss +189 -0
- package/collapsible-panel/_properties.collapsible-panel.scss +42 -0
- package/collapsible-panel/_variables.collapsible-panel.scss +40 -0
- package/data/_mixins.tables.scss +111 -0
- package/data/_properties.tables.scss +62 -0
- package/data/_tables.clarity.scss +120 -0
- package/data/_variables.tables.scss +42 -0
- package/data/datagrid/_datagrid.clarity.scss +1753 -0
- package/data/datagrid/_mixins.datagrid.scss +102 -0
- package/data/datagrid/_properties.datagrid.scss +90 -0
- package/data/datagrid/_variables.datagrid.scss +96 -0
- package/data/stack-view/_properties.stack-view.scss +50 -0
- package/data/stack-view/_stack-view.clarity.scss +267 -0
- package/data/stack-view/_variables.stack-view.scss +32 -0
- package/data/tree-view/_properties.tree-view.scss +41 -0
- package/data/tree-view/_tree-view.clarity.scss +281 -0
- package/data/tree-view/_variables.tree-view.scss +51 -0
- package/emphasis/alert/_alert.clarity.scss +467 -0
- package/emphasis/alert/_mixins.alert.scss +96 -0
- package/emphasis/alert/_properties.alert.scss +183 -0
- package/emphasis/alert/_variables.alert.scss +502 -0
- package/emphasis/badge/_badges.clarity.scss +61 -0
- package/emphasis/badge/_mixins.bades.scss +34 -0
- package/emphasis/badge/_properties.badges.scss +82 -0
- package/emphasis/badge/_variables.badges.scss +160 -0
- package/emphasis/label/_labels.clarity.scss +175 -0
- package/emphasis/label/_mixins.label.scss +76 -0
- package/emphasis/label/_properties.label.scss +105 -0
- package/emphasis/label/_variables.label.scss +181 -0
- package/forms/combobox/_combobox.clarity.scss +322 -0
- package/forms/combobox/_properties.combobox.scss +45 -0
- package/forms/combobox/_variables.combobox.scss +32 -0
- package/forms/datepicker/_datepicker.clarity.scss +259 -0
- package/forms/datepicker/_mixins.datepicker.scss +90 -0
- package/forms/datepicker/_properties.datepicker.scss +46 -0
- package/forms/datepicker/_variables.datepicker.scss +74 -0
- package/forms/styles/_checkbox.clarity.scss +193 -0
- package/forms/styles/_containers.clarity.scss +228 -0
- package/forms/styles/_datalist.clarity.scss +47 -0
- package/forms/styles/_file-input.clarity.scss +134 -0
- package/forms/styles/_file.clarity.scss +52 -0
- package/forms/styles/_form.clarity.scss +87 -0
- package/forms/styles/_input-group.clarity.scss +118 -0
- package/forms/styles/_input.clarity.scss +78 -0
- package/forms/styles/_mixins.forms.scss +173 -0
- package/forms/styles/_number-input.clarity.scss +58 -0
- package/forms/styles/_password.clarity.scss +26 -0
- package/forms/styles/_properties.forms.scss +121 -0
- package/forms/styles/_radio.clarity.scss +120 -0
- package/forms/styles/_range.clarity.scss +124 -0
- package/forms/styles/_select.clarity.scss +178 -0
- package/forms/styles/_textarea.clarity.scss +77 -0
- package/forms/styles/_toggles.clarity.scss +209 -0
- package/forms/styles/_variables.forms.scss +128 -0
- package/icon/icon.component.scss +242 -0
- package/image/_icons.clarity.scss +101 -0
- package/image/_images.clarity.scss +42 -0
- package/image/_mixins.images.scss +11 -0
- package/layout/_card.clarity.scss +311 -0
- package/layout/_login.clarity.scss +240 -0
- package/layout/_properties.card.scss +36 -0
- package/layout/_properties.login.scss +32 -0
- package/layout/_variables.card.scss +23 -0
- package/layout/_variables.login.scss +22 -0
- package/layout/breadcrumbs/_breadcrumbs.clarity.scss +60 -0
- package/layout/breadcrumbs/_properties.breadcrumbs.scss +18 -0
- package/layout/breadcrumbs/_variables.breadcrumbs.scss +11 -0
- package/layout/grid/_grid.scss +23 -0
- package/layout/grid/grid/_grid.scss +39 -0
- package/layout/grid/mixins/_breakpoint.scss +83 -0
- package/layout/grid/mixins/_clearfix.scss +13 -0
- package/layout/grid/mixins/_grid-framework.scss +91 -0
- package/layout/grid/mixins/_grid.scss +39 -0
- package/layout/grid/utilities/_align.scss +30 -0
- package/layout/grid/utilities/_clearfix.scss +12 -0
- package/layout/grid/utilities/_display.scss +18 -0
- package/layout/grid/utilities/_flex.scss +222 -0
- package/layout/grid/utilities/_float.scss +26 -0
- package/layout/grid/utilities/_visibility.scss +60 -0
- package/layout/main-container/_layout.clarity.scss +87 -0
- package/layout/main-container/_properties.header.scss +39 -0
- package/layout/main-container/_variables.header.scss +32 -0
- package/layout/nav/_header.clarity.scss +40 -0
- package/layout/nav/_links.clarity.scss +84 -0
- package/layout/nav/_mixins.header.scss +332 -0
- package/layout/nav/_mixins.responsive-nav.scss +75 -0
- package/layout/nav/_nav.clarity.scss +100 -0
- package/layout/nav/_properties.nav.scss +27 -0
- package/layout/nav/_properties.responsive-nav.scss +23 -0
- package/layout/nav/_properties.subnav.scss +19 -0
- package/layout/nav/_responsive-nav.clarity.scss +488 -0
- package/layout/nav/_subnav.clarity.scss +48 -0
- package/layout/nav/_variables.nav.scss +13 -0
- package/layout/nav/_variables.responsive-nav.scss +28 -0
- package/layout/nav/_variables.subnav.scss +21 -0
- package/layout/tabs/_mixins.tabs.scss +41 -0
- package/layout/tabs/_properties.tabs.scss +25 -0
- package/layout/tabs/_tabs.clarity.scss +110 -0
- package/layout/tabs/_variables.tabs.scss +17 -0
- package/layout/vertical-nav/_mixins.vertical-nav.scss +52 -0
- package/layout/vertical-nav/_properties.vertical-nav.scss +73 -0
- package/layout/vertical-nav/_variables.vertical-nav.scss +52 -0
- package/layout/vertical-nav/_vertical-nav.clarity.scss +469 -0
- package/main.scss +14 -0
- package/modal/_modal.clarity.scss +362 -0
- package/modal/_properties.modal.scss +45 -0
- package/modal/_variables.modal.scss +38 -0
- package/package.json +15 -0
- package/popover/common/_popover.clarity.scss +28 -0
- package/popover/dropdown/_dropdown.clarity.scss +326 -0
- package/popover/dropdown/_menu-mixins.clarity.scss +132 -0
- package/popover/dropdown/_properties.dropdown.scss +50 -0
- package/popover/dropdown/_variables.dropdown.scss +36 -0
- package/popover/signpost/_properties.signpost.scss +34 -0
- package/popover/signpost/_signposts.clarity.scss +414 -0
- package/popover/signpost/_variables.signpost.scss +21 -0
- package/popover/tooltip/_mixins.tooltip.scss +186 -0
- package/popover/tooltip/_properties.tooltip.scss +28 -0
- package/popover/tooltip/_tooltips.clarity.scss +122 -0
- package/popover/tooltip/_variables.tooltip.scss +20 -0
- package/progress/progress-bars/_progress-bars.clarity.scss +616 -0
- package/progress/progress-bars/_properties.progress-bars.scss +24 -0
- package/progress/progress-bars/_variables.progress-bars.scss +15 -0
- package/progress/progress-bars/utils/_mixins.clarity.scss +18 -0
- package/progress/spinner/_mixins.spinner.scss +30 -0
- package/progress/spinner/_properties.spinner.scss +37 -0
- package/progress/spinner/_spinner.clarity.scss +148 -0
- package/progress/spinner/_variables.spinner.scss +25 -0
- package/stepper/_properties.stepper.scss +29 -0
- package/stepper/_stepper.clarity.scss +184 -0
- package/stepper/_variables.stepper.scss +13 -0
- package/styles/_a11y.scss +14 -0
- package/styles/_close.clarity.scss +60 -0
- package/styles/_components.clarity.scss +183 -0
- package/styles/_mixins.scss +478 -0
- package/styles/_normalize.scss +292 -0
- package/styles/_reboot.clarity.scss +374 -0
- package/styles/_variables.clarity.scss +139 -0
- package/styles/core/base/base.element.scss +97 -0
- package/styles/core/global.scss +12 -0
- package/styles/core/layout/_alignments.scss +18 -0
- package/styles/core/layout/_container.scss +29 -0
- package/styles/core/layout/_display.scss +58 -0
- package/styles/core/layout/_optimize.scss +60 -0
- package/styles/core/layout/_shadow-dom.scss +47 -0
- package/styles/core/layout/_spacing.scss +31 -0
- package/styles/core/layout/_type-grid.scss +66 -0
- package/styles/core/layout/_type-horizontal.scss +33 -0
- package/styles/core/layout/_type-vertical.scss +26 -0
- package/styles/core/layout/mixins/_mixins.alignment.scss +35 -0
- package/styles/core/layout/mixins/_mixins.display.scss +23 -0
- package/styles/core/layout/mixins/_mixins.grid.scss +105 -0
- package/styles/core/layout/mixins/_mixins.scss +106 -0
- package/styles/core/layout/mixins/_mixins.shadow-dom.scss +106 -0
- package/styles/core/layout/mixins/_mixins.type-horizontal.scss +113 -0
- package/styles/core/layout/mixins/_mixins.type-vertical.scss +108 -0
- package/styles/core/module.layout.scss +22 -0
- package/styles/core/module.reset.scss +48 -0
- package/styles/core/module.typography.scss +9 -0
- package/styles/core/theme.dark.scss +266 -0
- package/styles/core/theme.high-contrast.scss +42 -0
- package/styles/core/theme.low-motion.scss +20 -0
- package/styles/core/tokens/_alias-interaction.scss +59 -0
- package/styles/core/tokens/_alias-object-background.scss +14 -0
- package/styles/core/tokens/_alias-object-border.scss +21 -0
- package/styles/core/tokens/_alias-object-container.scss +20 -0
- package/styles/core/tokens/_alias-object-opacity.scss +15 -0
- package/styles/core/tokens/_alias-object-shadow.scss +17 -0
- package/styles/core/tokens/_alias-status.scss +34 -0
- package/styles/core/tokens/_alias-typography.scss +101 -0
- package/styles/core/tokens/_alias-utility.scss +38 -0
- package/styles/core/tokens/_alias-viz-colors.scss +170 -0
- package/styles/core/tokens/_global-animation.scss +32 -0
- package/styles/core/tokens/_global-colors.scss +249 -0
- package/styles/core/tokens/_global-space.scss +52 -0
- package/styles/core/tokens/_internal-scale.scss +14 -0
- package/styles/core/tokens/_properties.tokens.scss +21 -0
- package/styles/core/tokens/_variables.tokens.scss +770 -0
- package/styles/core/typography/_legacy-typography.scss +328 -0
- package/styles/core/typography/_mixins.typography.scss +18 -0
- package/styles/core/typography/_typography.scss +321 -0
- package/styles/variables/_properties.density.scss +223 -0
- package/styles/variables/_properties.global.scss +51 -0
- package/styles/variables/_properties.layout.scss +21 -0
- package/styles/variables/_properties.scss +11 -0
- package/styles/variables/_properties.typography.scss +164 -0
- package/styles/variables/_variables.density.scss +114 -0
- package/styles/variables/_variables.global.scss +82 -0
- package/styles/variables/_variables.layout.scss +37 -0
- package/styles/variables/_variables.scss +11 -0
- package/styles/variables/_variables.typography.scss +156 -0
- package/timeline/_properties.timeline.scss +38 -0
- package/timeline/_timeline.clarity.scss +172 -0
- package/timeline/_variables.timeline.scss +29 -0
- package/typography/_code.scss +36 -0
- package/typography/_font-metropolis.scss +45 -0
- package/typography/_lists.scss +81 -0
- package/typography/_typography.scss +322 -0
- package/utils/animations/_animations.clarity.scss +44 -0
- package/utils/animations/_mixins.animations.scss +33 -0
- package/wizard/_properties.wizard.scss +53 -0
- package/wizard/_variables.wizard.scss +58 -0
- package/wizard/_wizard.clarity.scss +688 -0
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
|
|
3
|
+
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
4
|
+
* This software is released under MIT license.
|
|
5
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
@use 'sass:meta';
|
|
10
|
+
@use '../../styles/mixins';
|
|
11
|
+
@use '../../styles/variables/variables.global';
|
|
12
|
+
@use 'variables.signpost' as signpost-variables;
|
|
13
|
+
@use '../../styles/variables/variables.density' as density;
|
|
14
|
+
@use '../../styles/core/tokens/variables.tokens' as tokens;
|
|
15
|
+
|
|
16
|
+
@include meta.load-css('properties.signpost');
|
|
17
|
+
@include mixins.exports('signpost.clarity') {
|
|
18
|
+
$clr-signpost-pointer-size-negative: calc(-1 * signpost-variables.$clr-signpost-pointer-size);
|
|
19
|
+
|
|
20
|
+
.signpost {
|
|
21
|
+
display: inline-block;
|
|
22
|
+
|
|
23
|
+
&:hover {
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.signpost-action:not(.close) {
|
|
28
|
+
margin: 0;
|
|
29
|
+
padding: 0;
|
|
30
|
+
border-width: 0;
|
|
31
|
+
color: signpost-variables.$clr-signpost-action-color;
|
|
32
|
+
|
|
33
|
+
cds-icon,
|
|
34
|
+
clr-icon {
|
|
35
|
+
&:not([size]) {
|
|
36
|
+
@include mixins.equilateral(density.$clr-base-icon-size-l);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
color: signpost-variables.$clr-signpost-action-color;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
cds-icon:hover,
|
|
43
|
+
clr-icon:hover,
|
|
44
|
+
&:hover {
|
|
45
|
+
color: signpost-variables.$clr-signpost-action-hover-color;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&.active cds-icon,
|
|
49
|
+
&.active clr-icon,
|
|
50
|
+
&.active {
|
|
51
|
+
color: signpost-variables.$clr-signpost-action-active-color;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.signpost-trigger {
|
|
57
|
+
margin: 0;
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.signpost-content {
|
|
62
|
+
background-color: transparent;
|
|
63
|
+
min-width: mixins.baselinePx(216);
|
|
64
|
+
max-width: mixins.baselinePx(360);
|
|
65
|
+
min-height: tokens.$cds-global-space-12;
|
|
66
|
+
max-height: mixins.baselinePx(504);
|
|
67
|
+
display: inline-block;
|
|
68
|
+
position: relative;
|
|
69
|
+
z-index: map.get(variables.$clr-layers, tooltips);
|
|
70
|
+
|
|
71
|
+
&:hover {
|
|
72
|
+
cursor: default;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.popover-pointer {
|
|
76
|
+
@include mixins.equilateral(0);
|
|
77
|
+
|
|
78
|
+
position: absolute;
|
|
79
|
+
|
|
80
|
+
&::before {
|
|
81
|
+
content: '';
|
|
82
|
+
|
|
83
|
+
@include mixins.equilateral(0);
|
|
84
|
+
|
|
85
|
+
position: absolute;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.signpost-content-header button {
|
|
90
|
+
line-height: 0;
|
|
91
|
+
|
|
92
|
+
@include mixins.min-equilateral(density.$clr-base-icon-size-s);
|
|
93
|
+
|
|
94
|
+
cds-icon:not([size]),
|
|
95
|
+
clr-icon:not([size]) {
|
|
96
|
+
@include mixins.min-equilateral(density.$clr-base-icon-size-s);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.signpost-content-header {
|
|
102
|
+
display: flex;
|
|
103
|
+
justify-content: flex-end;
|
|
104
|
+
gap: density.$clr-base-gap-xs;
|
|
105
|
+
width: 100%;
|
|
106
|
+
background-color: inherit;
|
|
107
|
+
top: 0;
|
|
108
|
+
border-radius: signpost-variables.$clr-signpost-border-radius;
|
|
109
|
+
|
|
110
|
+
.signpost-title {
|
|
111
|
+
@include mixins.generate-typography-token('ColumnHeader-11-SB-CPT');
|
|
112
|
+
|
|
113
|
+
margin-right: auto;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.signpost-wrap {
|
|
118
|
+
// bottom padding difference split between `wrap` and `content-body` because of #1503 (CDE-2225)
|
|
119
|
+
// Wrap have (offset-xl - 1px), Body have 1px;
|
|
120
|
+
$wrap-bottom-padding: calc(density.$clr-base-vertical-offset-xl - tokens.$cds-global-space-1);
|
|
121
|
+
|
|
122
|
+
gap: density.$clr-base-gap-s;
|
|
123
|
+
padding: density.$clr-base-vertical-offset-xl density.$clr-base-horizontal-offset-xl $wrap-bottom-padding;
|
|
124
|
+
border: tokens.$cds-alias-object-border-width-100 solid signpost-variables.$clr-signpost-content-border-color;
|
|
125
|
+
border-radius: signpost-variables.$clr-signpost-border-radius;
|
|
126
|
+
background-color: signpost-variables.$clr-signpost-content-bg-color;
|
|
127
|
+
z-index: map.get(variables.$clr-layers, tooltips);
|
|
128
|
+
position: relative;
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-direction: column;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.signpost-content-body {
|
|
134
|
+
padding-bottom: tokens.$cds-global-space-1;
|
|
135
|
+
color: signpost-variables.$clr-signpost-content-color;
|
|
136
|
+
text-align: left;
|
|
137
|
+
max-height: mixins.baselinePx(450);
|
|
138
|
+
overflow-y: auto;
|
|
139
|
+
|
|
140
|
+
@include mixins.generate-typography-token('BODY-14-RG-CPT');
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.clr-signpost-container.top-left,
|
|
144
|
+
.clr-signpost-container.top-middle,
|
|
145
|
+
.clr-signpost-container.top-right {
|
|
146
|
+
.popover-pointer {
|
|
147
|
+
border-top: signpost-variables.$clr-signpost-pointer-border;
|
|
148
|
+
bottom: $clr-signpost-pointer-size-negative;
|
|
149
|
+
|
|
150
|
+
&::before {
|
|
151
|
+
border-top: signpost-variables.$clr-signpost-pointer-pseudo-border;
|
|
152
|
+
bottom: tokens.$cds-global-space-2;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.clr-signpost-container.top-left {
|
|
158
|
+
.signpost-wrap {
|
|
159
|
+
border-bottom-right-radius: 0; // Turn off rounded corner here
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.popover-pointer {
|
|
163
|
+
border-left: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
164
|
+
right: calc(-1 * tokens.$cds-global-space-1);
|
|
165
|
+
|
|
166
|
+
&::before {
|
|
167
|
+
border-left: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
168
|
+
right: tokens.$cds-global-space-1;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.clr-signpost-container.top-middle {
|
|
174
|
+
.popover-pointer {
|
|
175
|
+
border-right: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
176
|
+
left: 50%;
|
|
177
|
+
|
|
178
|
+
&::before {
|
|
179
|
+
border-right: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
180
|
+
left: tokens.$cds-global-space-1;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.clr-signpost-container.top-right {
|
|
186
|
+
.signpost-wrap {
|
|
187
|
+
border-bottom-left-radius: 0; // Turn off rounded corner here
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.popover-pointer {
|
|
191
|
+
border-right: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
192
|
+
left: calc(-1 * tokens.$cds-global-space-1);
|
|
193
|
+
|
|
194
|
+
&::before {
|
|
195
|
+
border-right: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
196
|
+
left: tokens.$cds-global-space-1;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
// End top-*
|
|
201
|
+
|
|
202
|
+
/***
|
|
203
|
+
The signpost is below the icon top-{HORIZONTAL_POSITION}
|
|
204
|
+
*/
|
|
205
|
+
|
|
206
|
+
.clr-signpost-container.bottom-left,
|
|
207
|
+
.clr-signpost-container.bottom-middle,
|
|
208
|
+
.clr-signpost-container.bottom,
|
|
209
|
+
.clr-signpost-container.bottom-right {
|
|
210
|
+
.popover-pointer {
|
|
211
|
+
border-bottom: signpost-variables.$clr-signpost-pointer-border;
|
|
212
|
+
top: $clr-signpost-pointer-size-negative;
|
|
213
|
+
|
|
214
|
+
&::before {
|
|
215
|
+
border-bottom: signpost-variables.$clr-signpost-pointer-pseudo-border;
|
|
216
|
+
top: tokens.$cds-global-space-2;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.clr-signpost-container.bottom-left {
|
|
222
|
+
.signpost-wrap {
|
|
223
|
+
border-top-right-radius: 0; // Turn off rounded corners here
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.popover-pointer {
|
|
227
|
+
border-left: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
228
|
+
right: calc(-1 * tokens.$cds-global-space-1);
|
|
229
|
+
|
|
230
|
+
&::before {
|
|
231
|
+
border-left: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
232
|
+
right: tokens.$cds-global-space-1;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.clr-signpost-container.bottom,
|
|
238
|
+
.clr-signpost-container.bottom-middle {
|
|
239
|
+
.popover-pointer {
|
|
240
|
+
border-right: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
241
|
+
left: 50%;
|
|
242
|
+
|
|
243
|
+
&::before {
|
|
244
|
+
border-right: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
245
|
+
right: calc($clr-signpost-pointer-size-negative - tokens.$cds-global-space-1);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.clr-signpost-container.bottom-right {
|
|
251
|
+
.signpost-wrap {
|
|
252
|
+
border-top-left-radius: 0; // Turn off rounded corners here
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.popover-pointer {
|
|
256
|
+
border-right: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
257
|
+
left: calc(-1 * tokens.$cds-global-space-1);
|
|
258
|
+
|
|
259
|
+
&::before {
|
|
260
|
+
border-right: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
261
|
+
left: tokens.$cds-global-space-1;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
// End bottom-*
|
|
266
|
+
|
|
267
|
+
/***
|
|
268
|
+
The signpost is on the left side of the icon left-{VERTICAL_POSITION}
|
|
269
|
+
*/
|
|
270
|
+
|
|
271
|
+
.clr-signpost-container.left-top,
|
|
272
|
+
.clr-signpost-container.left-middle,
|
|
273
|
+
.clr-signpost-container.left,
|
|
274
|
+
.clr-signpost-container.left-bottom {
|
|
275
|
+
.popover-pointer {
|
|
276
|
+
border-left: signpost-variables.$clr-signpost-pointer-border;
|
|
277
|
+
right: $clr-signpost-pointer-size-negative;
|
|
278
|
+
|
|
279
|
+
&::before {
|
|
280
|
+
border-left: signpost-variables.$clr-signpost-pointer-pseudo-border;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.clr-signpost-container.left-top {
|
|
286
|
+
.signpost-wrap {
|
|
287
|
+
border-bottom-right-radius: 0; // Turn off rounded corners here
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.popover-pointer {
|
|
291
|
+
border-top: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
292
|
+
bottom: calc(-1 * tokens.$cds-global-space-1);
|
|
293
|
+
|
|
294
|
+
&::before {
|
|
295
|
+
border-top: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
296
|
+
top: calc($clr-signpost-pointer-size-negative - tokens.$cds-global-space-1);
|
|
297
|
+
right: tokens.$cds-global-space-2;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.clr-signpost-container.left-middle,
|
|
303
|
+
.clr-signpost-container.left {
|
|
304
|
+
.popover-pointer {
|
|
305
|
+
border-bottom: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
306
|
+
top: 50%;
|
|
307
|
+
|
|
308
|
+
&::before {
|
|
309
|
+
border-bottom: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
310
|
+
top: tokens.$cds-global-space-1;
|
|
311
|
+
left: calc($clr-signpost-pointer-size-negative - tokens.$cds-global-space-2);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.clr-signpost-container.left-bottom {
|
|
317
|
+
.signpost-wrap {
|
|
318
|
+
border-top-right-radius: 0; // Turn off rounded corners here
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.popover-pointer {
|
|
322
|
+
border-bottom: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
323
|
+
top: calc(-1 * tokens.$cds-global-space-1);
|
|
324
|
+
|
|
325
|
+
&::before {
|
|
326
|
+
border-bottom: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
327
|
+
top: tokens.$cds-global-space-1;
|
|
328
|
+
left: calc($clr-signpost-pointer-size-negative - tokens.$cds-global-space-2);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
// End left-*
|
|
333
|
+
|
|
334
|
+
/***
|
|
335
|
+
The signpost is on the right side of the icon right-{VERTICAL_POSITION}
|
|
336
|
+
*/
|
|
337
|
+
|
|
338
|
+
.clr-signpost-container.right-top,
|
|
339
|
+
.clr-signpost-container.right-middle,
|
|
340
|
+
.clr-signpost-container.right-bottom {
|
|
341
|
+
.popover-pointer {
|
|
342
|
+
border-right: signpost-variables.$clr-signpost-pointer-border;
|
|
343
|
+
left: $clr-signpost-pointer-size-negative;
|
|
344
|
+
|
|
345
|
+
&::before {
|
|
346
|
+
border-right: signpost-variables.$clr-signpost-pointer-pseudo-border;
|
|
347
|
+
left: tokens.$cds-global-space-2;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.clr-signpost-container.right-top {
|
|
353
|
+
.signpost-wrap {
|
|
354
|
+
border-bottom-left-radius: 0; // turn off rounded corner here
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.popover-pointer {
|
|
358
|
+
border-top: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
359
|
+
bottom: calc(-1 * tokens.$cds-global-space-1);
|
|
360
|
+
|
|
361
|
+
&::before {
|
|
362
|
+
border-top: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
363
|
+
top: calc($clr-signpost-pointer-size-negative - tokens.$cds-global-space-1);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.clr-signpost-container.right-middle {
|
|
369
|
+
.popover-pointer {
|
|
370
|
+
border-bottom: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
371
|
+
top: 50%;
|
|
372
|
+
|
|
373
|
+
&::before {
|
|
374
|
+
border-bottom: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
375
|
+
top: tokens.$cds-global-space-1;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.clr-signpost-container.right-bottom {
|
|
381
|
+
.signpost-wrap {
|
|
382
|
+
border-top-left-radius: 0; // turn off rounded corner here
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.popover-pointer {
|
|
386
|
+
border-bottom: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
387
|
+
top: calc(-1 * tokens.$cds-global-space-1);
|
|
388
|
+
|
|
389
|
+
&::before {
|
|
390
|
+
border-bottom: signpost-variables.$clr-signpost-pointer-invisible-border;
|
|
391
|
+
top: tokens.$cds-global-space-1;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/***
|
|
397
|
+
TODO: Create a general mix-in for the popover-pointer that can
|
|
398
|
+
1. Accomadate all 12 positions
|
|
399
|
+
2. Unification for the nomenclature between components
|
|
400
|
+
(if possible, I know they all use slightly different terms)
|
|
401
|
+
3. Be used across Tooltips, Signposts (Do we also want it for Dropdowns)
|
|
402
|
+
4. What's up with the namespacing here? Usually we use `clr-*` to denote
|
|
403
|
+
Clarity components but we aren't doing that in signposts. We should
|
|
404
|
+
consider it.
|
|
405
|
+
*/
|
|
406
|
+
|
|
407
|
+
/* NOTE:
|
|
408
|
+
signposts need precise pixels for some measurements due to the design
|
|
409
|
+
Hence the 1px and 2px values you'll see.
|
|
410
|
+
|
|
411
|
+
I've tested the calcs while resizing the base font-size for the rem
|
|
412
|
+
measurements and they appear to hold up well.
|
|
413
|
+
*/
|
|
414
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
|
|
3
|
+
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
4
|
+
* This software is released under MIT license.
|
|
5
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
6
|
+
*/
|
|
7
|
+
// Usage: ../signpost/_signpost.clarity.scss
|
|
8
|
+
$clr-signpost-content-color: var(--clr-signpost-content-color) !default;
|
|
9
|
+
$clr-signpost-content-bg-color: var(--clr-signpost-content-bg-color) !default;
|
|
10
|
+
$clr-signpost-content-border-color: var(--clr-signpost-content-border-color) !default;
|
|
11
|
+
|
|
12
|
+
$clr-signpost-action-color: var(--clr-signpost-action-color) !default;
|
|
13
|
+
$clr-signpost-action-hover-color: var(--clr-signpost-action-hover-color) !default;
|
|
14
|
+
$clr-signpost-action-active-color: var(--clr-signpost-action-active-color) !default;
|
|
15
|
+
|
|
16
|
+
$clr-signpost-border-radius: var(--clr-signpost-border-radius) !default;
|
|
17
|
+
|
|
18
|
+
$clr-signpost-pointer-size: var(--clr-signpost-pointer-size) !default;
|
|
19
|
+
$clr-signpost-pointer-border: var(--clr-signpost-pointer-border) !default;
|
|
20
|
+
$clr-signpost-pointer-invisible-border: var(--clr-signpost-pointer-invisible-border) !default;
|
|
21
|
+
$clr-signpost-pointer-pseudo-border: var(--clr-signpost-pointer-pseudo-border) !default;
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
|
|
3
|
+
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
4
|
+
* This software is released under MIT license.
|
|
5
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
@use 'sass:list';
|
|
10
|
+
@use '../../styles/core/tokens/variables.tokens' as tokens;
|
|
11
|
+
@use '../../styles/mixins';
|
|
12
|
+
@use '../../styles/variables/variables.global';
|
|
13
|
+
@use 'variables.tooltip' as tooltip-variables;
|
|
14
|
+
@use '../../styles/variables/variables.density' as density;
|
|
15
|
+
|
|
16
|
+
$tooltip-configs: (
|
|
17
|
+
'top-right': (
|
|
18
|
+
top,
|
|
19
|
+
right,
|
|
20
|
+
),
|
|
21
|
+
'top-left': (
|
|
22
|
+
top,
|
|
23
|
+
left,
|
|
24
|
+
),
|
|
25
|
+
'bottom-right': (
|
|
26
|
+
bottom,
|
|
27
|
+
right,
|
|
28
|
+
),
|
|
29
|
+
'bottom-left': (
|
|
30
|
+
bottom,
|
|
31
|
+
left,
|
|
32
|
+
),
|
|
33
|
+
'right': (
|
|
34
|
+
right,
|
|
35
|
+
null,
|
|
36
|
+
),
|
|
37
|
+
'left': (
|
|
38
|
+
left,
|
|
39
|
+
null,
|
|
40
|
+
),
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
@mixin generate-tooltip-styles($isCss: true) {
|
|
44
|
+
$prefix: '';
|
|
45
|
+
|
|
46
|
+
@if $isCss {
|
|
47
|
+
$prefix: 'tooltip-';
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@each $name, $args in $tooltip-configs {
|
|
51
|
+
// Destructure arguments
|
|
52
|
+
$dirA: list.nth($args, 1);
|
|
53
|
+
$dirB: list.nth($args, 2);
|
|
54
|
+
|
|
55
|
+
// Generate Selector
|
|
56
|
+
&.#{$prefix}#{$name} > .tooltip-content {
|
|
57
|
+
// Logic: If second direction exists, it's vertical. Otherwise, horizontal.
|
|
58
|
+
@if $dirB {
|
|
59
|
+
@include vertical-tooltip-generator($dirA, $dirB, $isCss);
|
|
60
|
+
} @else {
|
|
61
|
+
@include horizontal-tooltip-generator($dirA, $isCss);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
@mixin tooltip-sizes {
|
|
67
|
+
&.tooltip-xs > .tooltip-content,
|
|
68
|
+
.tooltip-content.tooltip-xs {
|
|
69
|
+
width: tokens.$cds-global-space-14;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&.tooltip-sm > .tooltip-content,
|
|
73
|
+
.tooltip-content.tooltip-sm {
|
|
74
|
+
width: mixins.baselinePx(120);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&.tooltip-md > .tooltip-content,
|
|
78
|
+
.tooltip-content.tooltip-md {
|
|
79
|
+
width: mixins.baselinePx(240);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&.tooltip-lg > .tooltip-content,
|
|
83
|
+
.tooltip-content.tooltip-lg {
|
|
84
|
+
width: mixins.baselinePx(360);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
@mixin common-tooltip-styles {
|
|
88
|
+
margin: 0; //Resetting any margin that might be applied to span/div elements inside forms
|
|
89
|
+
width: mixins.baselinePx(240);
|
|
90
|
+
border-radius: tooltip-variables.$clr-tooltip-border-radius;
|
|
91
|
+
padding: density.$clr-base-vertical-offset-l density.$clr-base-horizontal-offset-l;
|
|
92
|
+
color: tooltip-variables.$clr-tooltip-color;
|
|
93
|
+
background-color: tooltip-variables.$clr-tooltip-background-color;
|
|
94
|
+
|
|
95
|
+
@include mixins.generate-typography-token(
|
|
96
|
+
'BODY-14-RG-CPT',
|
|
97
|
+
(
|
|
98
|
+
font-weight: tooltip-variables.$clr-tooltip-font-weight,
|
|
99
|
+
)
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
@mixin common-tooltip-content-styles {
|
|
103
|
+
//Both visibility and opacity are needed. Opacity handles the transition.
|
|
104
|
+
//And visibility makes sure that the user cant select the text in the tooltip-content
|
|
105
|
+
//when hidden
|
|
106
|
+
visibility: hidden;
|
|
107
|
+
opacity: 0;
|
|
108
|
+
transition: opacity 0.3s linear;
|
|
109
|
+
white-space: normal;
|
|
110
|
+
z-index: map.get(variables.$clr-layers, tooltips);
|
|
111
|
+
|
|
112
|
+
// This allows a user to hover their mouse over the tooltip to stop it from hiding
|
|
113
|
+
&::after {
|
|
114
|
+
position: absolute;
|
|
115
|
+
inset: -20px;
|
|
116
|
+
content: '';
|
|
117
|
+
// make sure this is underneath the tooltip so that user can use their mouse to select text
|
|
118
|
+
z-index: -1;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// color overrides for components and HTML elements
|
|
122
|
+
li {
|
|
123
|
+
color: inherit;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
@mixin vertical-tooltip-generator($dirA: top, $dirB: right, $plain: false) {
|
|
127
|
+
$oppA: map.get(mixins.$opp-directions, $dirA);
|
|
128
|
+
$oppB: map.get(mixins.$opp-directions, $dirB);
|
|
129
|
+
|
|
130
|
+
@include common-tooltip-styles;
|
|
131
|
+
|
|
132
|
+
@if $plain {
|
|
133
|
+
position: absolute;
|
|
134
|
+
#{$dirA}: auto;
|
|
135
|
+
#{$oppA}: 100%;
|
|
136
|
+
#{$oppB}: 50%;
|
|
137
|
+
#{$dirB}: auto;
|
|
138
|
+
margin-#{$oppA}: tooltip-variables.$clr-tooltip-adjusted-margin;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
border-#{$oppA}-#{$oppB}-radius: 0;
|
|
142
|
+
|
|
143
|
+
&::before {
|
|
144
|
+
content: '';
|
|
145
|
+
position: absolute;
|
|
146
|
+
pointer-events: none;
|
|
147
|
+
#{$oppB}: 0;
|
|
148
|
+
#{$dirA}: auto;
|
|
149
|
+
#{$dirB}: auto;
|
|
150
|
+
#{$oppA}: calc(-1 * #{tooltip-variables.$clr-tooltip-arrow-height});
|
|
151
|
+
border-#{$oppB}: tooltip-variables.$clr-tooltip-arrow-height solid tooltip-variables.$clr-tooltip-background-color;
|
|
152
|
+
border-#{$dirA}: tooltip-variables.$clr-tooltip-arrow-width solid tooltip-variables.$clr-tooltip-background-color;
|
|
153
|
+
border-#{$oppA}: tooltip-variables.$clr-tooltip-arrow-width solid transparent;
|
|
154
|
+
border-#{$dirB}: tooltip-variables.$clr-tooltip-arrow-width solid transparent;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
@mixin horizontal-tooltip-generator($dirA: right, $plain: false) {
|
|
158
|
+
$oppA: map.get(mixins.$opp-directions, $dirA);
|
|
159
|
+
|
|
160
|
+
@include common-tooltip-styles;
|
|
161
|
+
|
|
162
|
+
@if $plain {
|
|
163
|
+
position: absolute;
|
|
164
|
+
#{$dirA}: auto;
|
|
165
|
+
#{$oppA}: 100%;
|
|
166
|
+
top: 50%;
|
|
167
|
+
bottom: auto;
|
|
168
|
+
margin-#{$oppA}: tooltip-variables.$clr-tooltip-adjusted-margin;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
border-top-#{$oppA}-radius: 0;
|
|
172
|
+
|
|
173
|
+
&::before {
|
|
174
|
+
content: '';
|
|
175
|
+
position: absolute;
|
|
176
|
+
pointer-events: none;
|
|
177
|
+
top: 0;
|
|
178
|
+
bottom: auto;
|
|
179
|
+
#{$dirA}: auto;
|
|
180
|
+
#{$oppA}: calc(-1 * #{tooltip-variables.$clr-tooltip-arrow-width});
|
|
181
|
+
border-top: tooltip-variables.$clr-tooltip-arrow-height solid tooltip-variables.$clr-tooltip-background-color;
|
|
182
|
+
border-#{$dirA}: tooltip-variables.$clr-tooltip-arrow-width solid tooltip-variables.$clr-tooltip-background-color;
|
|
183
|
+
border-bottom: tooltip-variables.$clr-tooltip-arrow-height solid transparent;
|
|
184
|
+
border-#{$oppA}: tooltip-variables.$clr-tooltip-arrow-width solid transparent;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
|
|
3
|
+
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
4
|
+
* This software is released under MIT license.
|
|
5
|
+
* The full license information can be found in LICENSE in the root directory of this project.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@use '../../styles/mixins';
|
|
9
|
+
@use '../../styles/variables/variables.density' as density;
|
|
10
|
+
@use '../../styles/core/tokens/variables.tokens' as tokens;
|
|
11
|
+
|
|
12
|
+
@include mixins.exports('tooltip.properties') {
|
|
13
|
+
@include mixins.root-or-host() {
|
|
14
|
+
// Usage: ../popover/tooltip/_tooltips.clarity.scss
|
|
15
|
+
--clr-tooltip-font-weight: #{tokens.$cds-alias-typography-body-font-weight};
|
|
16
|
+
|
|
17
|
+
&,
|
|
18
|
+
& [clr-density] {
|
|
19
|
+
--clr-tooltip-border-radius: #{density.$clr-base-border-radius-s};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&,
|
|
23
|
+
& [cds-theme] {
|
|
24
|
+
--clr-tooltip-background-color: #{tokens.$cds-alias-object-interaction-color-active};
|
|
25
|
+
--clr-tooltip-color: #{tokens.$cds-alias-typography-color-100};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|