-
Notifications
You must be signed in to change notification settings - Fork 78
/
Copy pathcombobox-item.scss
154 lines (128 loc) · 2.97 KB
/
combobox-item.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
@include base-component();
.scale--s {
@apply text-n2h;
--calcite-combobox-item-spacing-unit-s: theme("spacing.1");
--calcite-combobox-item-spacing-unit-l: theme("spacing.2");
--calcite-combobox-item-selector-icon-size: theme("spacing.4");
--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size-xs);
}
.scale--m {
@apply text-n1h;
--calcite-combobox-item-spacing-unit-s: theme("spacing[1.5]");
--calcite-combobox-item-spacing-unit-l: theme("spacing.3");
--calcite-combobox-item-selector-icon-size: theme("spacing.4");
--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size-sm);
}
.scale--l {
@apply text-0h;
--calcite-combobox-item-spacing-unit-s: theme("spacing[2.5]");
--calcite-combobox-item-spacing-unit-l: theme("spacing.4");
--calcite-combobox-item-selector-icon-size: theme("spacing.6");
--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size);
}
.container {
--calcite-combobox-item-indent-value: calc(
var(--calcite-combobox-item-spacing-unit-l) * var(--calcite-combobox-item-spacing-indent-multiplier)
);
}
:host(:focus) {
@apply shadow-none;
}
@include disabled();
:host,
ul {
@apply m-0 flex flex-col p-0;
}
:host(:focus),
ul:focus {
@apply outline-none;
}
.label {
@apply text-color-3
focus-base
relative
box-border
flex
w-full
min-w-full
cursor-pointer
items-center
no-underline
duration-150
ease-in-out;
@include word-break();
justify-content: space-around;
gap: var(--calcite-combobox-item-spacing-unit-l);
padding-block: var(--calcite-combobox-item-spacing-unit-s);
padding-inline-end: var(--calcite-combobox-item-spacing-unit-l);
padding-inline-start: var(--calcite-combobox-item-indent-value);
}
:host([disabled]) .label {
@apply cursor-default;
}
// selected state
.label--selected {
@apply text-color-1;
.title {
@apply font-medium;
}
}
.label--active {
@apply focus-inset;
}
.label:hover,
.label:active {
@apply text-color-1
bg-foreground-2
no-underline
shadow-none;
}
.label:active {
background-color: var(--calcite-color-foreground-3);
}
.icon {
@apply inline-flex
opacity-0
duration-150
ease-in-out;
color: theme("borderColor.color.1");
}
.icon--custom {
margin-block-start: -1px;
}
.icon--selected {
@apply text-color-1;
}
.label--selected .icon {
@apply opacity-100;
color: theme("backgroundColor.brand");
}
.center-content {
display: flex;
flex-direction: column;
flex-grow: 1;
padding-block: 0;
}
.description {
font-size: var(--calcite-internal-combobox-item-description-font-size);
}
:host([selected]),
:host(:hover) {
.description {
color: var(--calcite-color-text-2);
}
}
.short-text {
color: var(--calcite-color-text-3);
white-space: nowrap;
}
.title {
color: var(--calcite-color-text-1);
}
.title,
.description,
.short-text {
line-height: var(--calcite-font-line-height-relative-snug);
}
@include item-hidden();
@include text-highlight-item();