@coreui/coreui 5.5.0 → 5.6.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/LICENSE +1 -1
- package/README.md +5 -3
- package/dist/css/coreui-grid.css +2 -2
- package/dist/css/coreui-grid.css.map +1 -1
- package/dist/css/coreui-grid.min.css +2 -2
- package/dist/css/coreui-grid.min.css.map +1 -1
- package/dist/css/coreui-grid.rtl.css +2 -2
- package/dist/css/coreui-grid.rtl.css.map +1 -1
- package/dist/css/coreui-grid.rtl.min.css +2 -2
- package/dist/css/coreui-grid.rtl.min.css.map +1 -1
- package/dist/css/coreui-reboot.css +11 -2
- package/dist/css/coreui-reboot.css.map +1 -1
- package/dist/css/coreui-reboot.min.css +3 -3
- package/dist/css/coreui-reboot.min.css.map +1 -1
- package/dist/css/coreui-reboot.rtl.css +11 -2
- package/dist/css/coreui-reboot.rtl.css.map +1 -1
- package/dist/css/coreui-reboot.rtl.min.css +3 -3
- package/dist/css/coreui-reboot.rtl.min.css.map +1 -1
- package/dist/css/coreui-utilities.css +11 -2
- package/dist/css/coreui-utilities.css.map +1 -1
- package/dist/css/coreui-utilities.min.css +3 -3
- package/dist/css/coreui-utilities.min.css.map +1 -1
- package/dist/css/coreui-utilities.rtl.css +11 -2
- package/dist/css/coreui-utilities.rtl.css.map +1 -1
- package/dist/css/coreui-utilities.rtl.min.css +3 -3
- package/dist/css/coreui-utilities.rtl.min.css.map +1 -1
- package/dist/css/coreui.css +337 -2
- package/dist/css/coreui.css.map +1 -1
- package/dist/css/coreui.min.css +3 -3
- package/dist/css/coreui.min.css.map +1 -1
- package/dist/css/coreui.rtl.css +332 -2
- package/dist/css/coreui.rtl.css.map +1 -1
- package/dist/css/coreui.rtl.min.css +3 -3
- package/dist/css/coreui.rtl.min.css.map +1 -1
- package/dist/css/themes/bootstrap/bootstrap.css +337 -2
- package/dist/css/themes/bootstrap/bootstrap.css.map +1 -1
- package/dist/css/themes/bootstrap/bootstrap.min.css +3 -3
- package/dist/css/themes/bootstrap/bootstrap.min.css.map +1 -1
- package/dist/css/themes/bootstrap/bootstrap.rtl.css +332 -2
- package/dist/css/themes/bootstrap/bootstrap.rtl.css.map +1 -1
- package/dist/css/themes/bootstrap/bootstrap.rtl.min.css +3 -3
- package/dist/css/themes/bootstrap/bootstrap.rtl.min.css.map +1 -1
- package/dist/js/bootstrap.bundle.js +874 -60
- package/dist/js/bootstrap.bundle.js.map +1 -1
- package/dist/js/bootstrap.bundle.min.js +3 -3
- package/dist/js/bootstrap.bundle.min.js.map +1 -1
- package/dist/js/bootstrap.esm.js +873 -53
- package/dist/js/bootstrap.esm.js.map +1 -1
- package/dist/js/bootstrap.esm.min.js +3 -3
- package/dist/js/bootstrap.esm.min.js.map +1 -1
- package/dist/js/bootstrap.js +874 -52
- package/dist/js/bootstrap.js.map +1 -1
- package/dist/js/bootstrap.min.js +3 -3
- package/dist/js/bootstrap.min.js.map +1 -1
- package/dist/js/coreui.bundle.js +874 -60
- package/dist/js/coreui.bundle.js.map +1 -1
- package/dist/js/coreui.bundle.min.js +3 -3
- package/dist/js/coreui.bundle.min.js.map +1 -1
- package/dist/js/coreui.esm.js +873 -53
- package/dist/js/coreui.esm.js.map +1 -1
- package/dist/js/coreui.esm.min.js +3 -3
- package/dist/js/coreui.esm.min.js.map +1 -1
- package/dist/js/coreui.js +874 -52
- package/dist/js/coreui.js.map +1 -1
- package/dist/js/coreui.min.js +3 -3
- package/dist/js/coreui.min.js.map +1 -1
- package/js/dist/alert.js +2 -2
- package/js/dist/base-component.js +3 -3
- package/js/dist/base-component.js.map +1 -1
- package/js/dist/button.js +2 -2
- package/js/dist/carousel.js +2 -2
- package/js/dist/chip-input.js +528 -0
- package/js/dist/chip-input.js.map +1 -0
- package/js/dist/chip.js +322 -0
- package/js/dist/chip.js.map +1 -0
- package/js/dist/collapse.js +2 -2
- package/js/dist/dom/data.js +2 -2
- package/js/dist/dom/event-handler.js +2 -2
- package/js/dist/dom/manipulator.js +2 -2
- package/js/dist/dom/selector-engine.js +2 -2
- package/js/dist/dropdown.js +2 -2
- package/js/dist/modal.js +2 -2
- package/js/dist/navigation.js +2 -2
- package/js/dist/offcanvas.js +2 -2
- package/js/dist/popover.js +2 -2
- package/js/dist/scrollspy.js +2 -2
- package/js/dist/sidebar.js +2 -2
- package/js/dist/tab.js +2 -2
- package/js/dist/toast.js +2 -2
- package/js/dist/tooltip.js +2 -2
- package/js/dist/util/backdrop.js +2 -2
- package/js/dist/util/component-functions.js +2 -2
- package/js/dist/util/config.js +2 -2
- package/js/dist/util/focustrap.js +2 -2
- package/js/dist/util/index.js +2 -2
- package/js/dist/util/sanitizer.js +2 -2
- package/js/dist/util/scrollbar.js +2 -2
- package/js/dist/util/swipe.js +2 -2
- package/js/dist/util/template-factory.js +2 -2
- package/js/index.esm.js +2 -0
- package/js/index.umd.js +4 -0
- package/js/src/base-component.js +1 -1
- package/js/src/chip-input.js +595 -0
- package/js/src/chip.js +365 -0
- package/package.json +20 -20
- package/scss/_banner.scss +2 -2
- package/scss/_chip.import.scss +1 -0
- package/scss/_chip.scss +261 -0
- package/scss/_forms.scss +1 -0
- package/scss/_maps.scss +14 -0
- package/scss/_root.scss +5 -0
- package/scss/coreui.scss +1 -0
- package/scss/forms/_chip-input.import.scss +1 -0
- package/scss/forms/_chip-input.scss +109 -0
- package/scss/mixins/_chip.scss +14 -0
- package/scss/mixins/_focus-ring.scss +9 -0
package/scss/_chip.scss
ADDED
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "mixins/border-radius" as *;
|
|
3
|
+
@use "mixins/chip" as *;
|
|
4
|
+
@use "mixins/focus-ring" as *;
|
|
5
|
+
@use "mixins/transition" as *;
|
|
6
|
+
@use "variables" as *;
|
|
7
|
+
|
|
8
|
+
// scss-docs-start chip-variables
|
|
9
|
+
$chip-font-size: .875rem !default;
|
|
10
|
+
$chip-font-weight: $font-weight-normal !default;
|
|
11
|
+
$chip-height: 1.75rem !default;
|
|
12
|
+
$chip-padding-x: .625rem !default;
|
|
13
|
+
$chip-gap: .3125rem !default;
|
|
14
|
+
$chip-border-radius: var(--#{$prefix}border-radius-pill) !default;
|
|
15
|
+
$chip-icon-size: 1rem !default;
|
|
16
|
+
$chip-img-size: 1.25rem !default;
|
|
17
|
+
$chip-img-border-radius: 50% !default;
|
|
18
|
+
$chip-remove-size: 1rem !default;
|
|
19
|
+
$chip-remove-opacity: .65 !default;
|
|
20
|
+
$chip-remove-hover-opacity: 1 !default;
|
|
21
|
+
$chip-transition: background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out, color .15s ease-in-out !default;
|
|
22
|
+
|
|
23
|
+
$chip-color: var(--#{$prefix}body-color) !default;
|
|
24
|
+
$chip-bg: var(--#{$prefix}secondary-bg) !default;
|
|
25
|
+
$chip-border-width: var(--#{$prefix}border-width) !default;
|
|
26
|
+
$chip-border-color: transparent !default;
|
|
27
|
+
|
|
28
|
+
$chip-active-color: rgba($white, .87) !default;
|
|
29
|
+
$chip-active-bg: var(--#{$prefix}primary) !default;
|
|
30
|
+
$chip-active-border-color: transparent !default;
|
|
31
|
+
|
|
32
|
+
$chip-hover-color: $chip-color !default;
|
|
33
|
+
$chip-hover-bg: color-mix(in srgb, var(--#{$prefix}secondary-bg) 95%, #000) !default;
|
|
34
|
+
$chip-hover-border-color: transparent !default;
|
|
35
|
+
|
|
36
|
+
$chip-font-size-sm: .75rem !default;
|
|
37
|
+
$chip-height-sm: 1.5rem !default;
|
|
38
|
+
$chip-padding-x-sm: .625rem !default;
|
|
39
|
+
$chip-gap-sm: .25rem !default;
|
|
40
|
+
$chip-icon-size-sm: .875rem !default;
|
|
41
|
+
$chip-img-size-sm: 1rem !default;
|
|
42
|
+
$chip-remove-size-sm: .875rem !default;
|
|
43
|
+
|
|
44
|
+
$chip-font-size-lg: 1rem !default;
|
|
45
|
+
$chip-height-lg: 2rem !default;
|
|
46
|
+
$chip-padding-x-lg: .75rem !default;
|
|
47
|
+
$chip-gap-lg: .375rem !default;
|
|
48
|
+
$chip-icon-size-lg: 1.25rem !default;
|
|
49
|
+
$chip-img-size-lg: 1.5rem !default;
|
|
50
|
+
$chip-remove-size-lg: 1.25rem !default;
|
|
51
|
+
// scss-docs-end chip-variables
|
|
52
|
+
|
|
53
|
+
.chip {
|
|
54
|
+
// scss-docs-start chip-css-vars
|
|
55
|
+
--#{$prefix}chip-height: #{$chip-height};
|
|
56
|
+
--#{$prefix}chip-padding-x: #{$chip-padding-x};
|
|
57
|
+
--#{$prefix}chip-gap: #{$chip-gap};
|
|
58
|
+
--#{$prefix}chip-font-size: #{$chip-font-size};
|
|
59
|
+
--#{$prefix}chip-font-weight: #{$chip-font-weight};
|
|
60
|
+
--#{$prefix}chip-border-radius: #{$chip-border-radius};
|
|
61
|
+
--#{$prefix}chip-img-size: #{$chip-img-size};
|
|
62
|
+
--#{$prefix}chip-img-border-radius: #{$chip-img-border-radius};
|
|
63
|
+
--#{$prefix}chip-icon-size: #{$chip-icon-size};
|
|
64
|
+
--#{$prefix}chip-remove-size: #{$chip-remove-size};
|
|
65
|
+
--#{$prefix}chip-remove-opacity: #{$chip-remove-opacity};
|
|
66
|
+
--#{$prefix}chip-remove-hover-opacity: #{$chip-remove-hover-opacity};
|
|
67
|
+
--#{$prefix}chip-transition: #{$chip-transition};
|
|
68
|
+
|
|
69
|
+
--#{$prefix}chip-color: var(--#{$prefix}text-emphasis, #{$chip-color});
|
|
70
|
+
--#{$prefix}chip-bg: var(--#{$prefix}bg-subtle, #{$chip-bg});
|
|
71
|
+
--#{$prefix}chip-border-width: #{$chip-border-width};
|
|
72
|
+
--#{$prefix}chip-border-color: #{$chip-border-color};
|
|
73
|
+
|
|
74
|
+
--#{$prefix}chip-active-color: var(--#{$prefix}contrast, #{$chip-active-color});
|
|
75
|
+
--#{$prefix}chip-active-bg: var(--#{$prefix}color, #{$chip-active-bg});
|
|
76
|
+
--#{$prefix}chip-active-border-color: #{$chip-active-border-color};
|
|
77
|
+
|
|
78
|
+
--#{$prefix}chip-hover-color: var(--#{$prefix}contrast, #{$chip-hover-color});
|
|
79
|
+
--#{$prefix}chip-hover-bg: var(--#{$prefix}color, #{$chip-hover-bg});
|
|
80
|
+
--#{$prefix}chip-hover-border-color: #{$chip-hover-border-color};
|
|
81
|
+
// scss-docs-end chip-css-vars
|
|
82
|
+
|
|
83
|
+
display: inline-flex;
|
|
84
|
+
gap: var(--#{$prefix}chip-gap);
|
|
85
|
+
align-items: center;
|
|
86
|
+
height: var(--#{$prefix}chip-height);
|
|
87
|
+
padding-inline: var(--#{$prefix}chip-padding-x);
|
|
88
|
+
font-size: var(--#{$prefix}chip-font-size);
|
|
89
|
+
font-weight: var(--#{$prefix}chip-font-weight);
|
|
90
|
+
color: var(--#{$prefix}chip-color);
|
|
91
|
+
text-decoration: none;
|
|
92
|
+
white-space: nowrap;
|
|
93
|
+
vertical-align: middle;
|
|
94
|
+
background-color: var(--#{$prefix}chip-bg);
|
|
95
|
+
border: var(--#{$prefix}chip-border-width) solid var(--#{$prefix}chip-border-color);
|
|
96
|
+
@include border-radius(var(--#{$prefix}chip-border-radius));
|
|
97
|
+
@include transition(var(--#{$prefix}chip-transition));
|
|
98
|
+
|
|
99
|
+
&.active {
|
|
100
|
+
color: var(--#{$prefix}chip-active-color);
|
|
101
|
+
background-color: var(--#{$prefix}chip-active-bg);
|
|
102
|
+
border-color: var(--#{$prefix}chip-active-border-color);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&.disabled,
|
|
106
|
+
&:disabled {
|
|
107
|
+
pointer-events: none;
|
|
108
|
+
opacity: .65;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&:focus-visible {
|
|
112
|
+
@include focus-ring();
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.avatar {
|
|
116
|
+
--#{$prefix}avatar-width: var(--#{$prefix}chip-img-size);
|
|
117
|
+
--#{$prefix}avatar-height: var(--#{$prefix}chip-img-size);
|
|
118
|
+
|
|
119
|
+
font-size: inherit;
|
|
120
|
+
|
|
121
|
+
&:first-child {
|
|
122
|
+
margin-inline-start: -.375rem;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.chip-outline {
|
|
128
|
+
// scss-docs-start chip-outline-css-vars
|
|
129
|
+
--#{$prefix}chip-color: var(--#{$prefix}color, var(--#{$prefix}body-color));
|
|
130
|
+
--#{$prefix}chip-bg: transparent;
|
|
131
|
+
--#{$prefix}chip-border-color: var(--#{$prefix}color, var(--#{$prefix}border-color));
|
|
132
|
+
--#{$prefix}chip-hover-bg: var(--#{$prefix}bg-subtle, #{$chip-hover-bg});
|
|
133
|
+
--#{$prefix}chip-hover-color: var(--#{$prefix}text-emphasis, #{$chip-color});
|
|
134
|
+
--#{$prefix}chip-hover-border-color: var(--#{$prefix}color, var(--#{$prefix}border-color));
|
|
135
|
+
--#{$prefix}chip-active-bg: var(--#{$prefix}color, #{$chip-active-bg});
|
|
136
|
+
--#{$prefix}chip-active-color: var(--#{$prefix}contrast, #{$chip-active-color});
|
|
137
|
+
// scss-docs-end chip-outline-css-vars
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.chip-clickable {
|
|
141
|
+
cursor: pointer;
|
|
142
|
+
|
|
143
|
+
&:hover {
|
|
144
|
+
color: var(--#{$prefix}chip-hover-color);
|
|
145
|
+
background-color: var(--#{$prefix}chip-hover-bg);
|
|
146
|
+
border-color: var(--#{$prefix}chip-hover-border-color);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&.active:hover {
|
|
150
|
+
color: var(--#{$prefix}chip-active-color);
|
|
151
|
+
background-color: var(--#{$prefix}chip-active-bg);
|
|
152
|
+
opacity: .9;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.chip-img {
|
|
157
|
+
width: var(--#{$prefix}chip-img-size);
|
|
158
|
+
height: var(--#{$prefix}chip-img-size);
|
|
159
|
+
@include border-radius(var(--#{$prefix}chip-img-border-radius));
|
|
160
|
+
|
|
161
|
+
&:first-child {
|
|
162
|
+
margin-inline-start: -.375rem;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.chip-icon {
|
|
167
|
+
display: flex;
|
|
168
|
+
flex-shrink: 0;
|
|
169
|
+
align-items: center;
|
|
170
|
+
justify-content: center;
|
|
171
|
+
margin-inline-start: calc(var(--#{$prefix}chip-gap) * -.25); // stylelint-disable-line function-disallowed-list
|
|
172
|
+
|
|
173
|
+
> svg {
|
|
174
|
+
display: block; // Prevents baseline alignment issues
|
|
175
|
+
width: var(--#{$prefix}chip-icon-size);
|
|
176
|
+
height: var(--#{$prefix}chip-icon-size);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
> img {
|
|
180
|
+
width: var(--#{$prefix}chip-icon-size);
|
|
181
|
+
height: var(--#{$prefix}chip-icon-size);
|
|
182
|
+
object-fit: cover;
|
|
183
|
+
@include border-radius(var(--#{$prefix}chip-img-border-radius));
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.chip-remove {
|
|
188
|
+
display: flex;
|
|
189
|
+
flex-shrink: 0;
|
|
190
|
+
align-items: center;
|
|
191
|
+
justify-content: center;
|
|
192
|
+
width: var(--#{$prefix}chip-min-height);
|
|
193
|
+
height: var(--#{$prefix}chip-min-height);
|
|
194
|
+
padding: 0;
|
|
195
|
+
margin-inline-end: calc(var(--#{$prefix}chip-padding-x) * -.25); // stylelint-disable-line function-disallowed-list
|
|
196
|
+
color: inherit;
|
|
197
|
+
cursor: pointer;
|
|
198
|
+
background: transparent;
|
|
199
|
+
border: 0;
|
|
200
|
+
opacity: var(--#{$prefix}chip-remove-opacity);
|
|
201
|
+
@include transition(opacity .15s ease-in-out);
|
|
202
|
+
|
|
203
|
+
&:hover {
|
|
204
|
+
opacity: var(--#{$prefix}chip-remove-hover-opacity);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
&:focus-visible {
|
|
208
|
+
outline: 0;
|
|
209
|
+
opacity: 1;
|
|
210
|
+
@include focus-ring();
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
> svg {
|
|
214
|
+
display: block; // Prevents baseline alignment issues
|
|
215
|
+
width: var(--#{$prefix}chip-remove-size);
|
|
216
|
+
height: var(--#{$prefix}chip-remove-size);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
//
|
|
221
|
+
// Chip sizes
|
|
222
|
+
//
|
|
223
|
+
|
|
224
|
+
.chip-lg,
|
|
225
|
+
.chip-input-lg .chip {
|
|
226
|
+
@include chip-size(
|
|
227
|
+
$chip-height-lg,
|
|
228
|
+
$chip-padding-x-lg,
|
|
229
|
+
$chip-gap-lg,
|
|
230
|
+
$chip-font-size-lg,
|
|
231
|
+
$chip-icon-size-lg,
|
|
232
|
+
$chip-img-size-lg,
|
|
233
|
+
$chip-remove-size-lg
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.chip-sm,
|
|
238
|
+
.chip-input-sm .chip {
|
|
239
|
+
@include chip-size(
|
|
240
|
+
$chip-height-sm,
|
|
241
|
+
$chip-padding-x-sm,
|
|
242
|
+
$chip-gap-sm,
|
|
243
|
+
$chip-font-size-sm,
|
|
244
|
+
$chip-icon-size-sm,
|
|
245
|
+
$chip-img-size-sm,
|
|
246
|
+
$chip-remove-size-sm
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// scss-docs-start chip-modifiers
|
|
251
|
+
@each $state in map.keys($theme-colors) {
|
|
252
|
+
.chip-#{$state} {
|
|
253
|
+
--#{$prefix}bg-subtle: var(--#{$prefix}#{$state}-bg-subtle);
|
|
254
|
+
--#{$prefix}color: var(--#{$prefix}#{$state});
|
|
255
|
+
--#{$prefix}color-rgb: var(--#{$prefix}#{$state}-rgb);
|
|
256
|
+
--#{$prefix}contrast: var(--#{$prefix}#{$state}-contrast);
|
|
257
|
+
--#{$prefix}text-emphasis: var(--#{$prefix}#{$state}-text-emphasis);
|
|
258
|
+
--#{$prefix}focus-ring-color: rgba(var(--#{$prefix}#{$state}-rgb), var(--#{$prefix}focus-ring-opacity));
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
// scss-docs-end chip-modifiers
|
package/scss/_forms.scss
CHANGED
package/scss/_maps.scss
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use "sass:map";
|
|
2
2
|
@use "functions/color" as *;
|
|
3
|
+
@use "functions/color-contrast" as *;
|
|
3
4
|
@use "functions/maps" as *;
|
|
4
5
|
@use "functions/to-rgb" as *;
|
|
5
6
|
@use "variables" as *;
|
|
@@ -52,6 +53,19 @@ $theme-colors-border-subtle: (
|
|
|
52
53
|
) !default;
|
|
53
54
|
// scss-docs-end theme-border-subtle-map
|
|
54
55
|
|
|
56
|
+
// scss-docs-start theme-contrast-map
|
|
57
|
+
$theme-colors-contrast: (
|
|
58
|
+
"primary": color-contrast($primary),
|
|
59
|
+
"secondary": color-contrast($secondary),
|
|
60
|
+
"success": color-contrast($success),
|
|
61
|
+
"info": color-contrast($info),
|
|
62
|
+
"warning": color-contrast($warning),
|
|
63
|
+
"danger": color-contrast($danger),
|
|
64
|
+
"light": color-contrast($light),
|
|
65
|
+
"dark": color-contrast($dark),
|
|
66
|
+
) !default;
|
|
67
|
+
// scss-docs-end theme-contrast-map
|
|
68
|
+
|
|
55
69
|
$theme-colors-rgb-dark: null !default;
|
|
56
70
|
$theme-colors-text-dark: null !default;
|
|
57
71
|
$theme-colors-bg-subtle-dark: null !default;
|
package/scss/_root.scss
CHANGED
|
@@ -43,6 +43,10 @@
|
|
|
43
43
|
--#{$prefix}#{$color}-border-subtle: #{$value};
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
@each $color, $value in $theme-colors-contrast {
|
|
47
|
+
--#{$prefix}#{$color}-contrast: #{$value};
|
|
48
|
+
}
|
|
49
|
+
|
|
46
50
|
--#{$prefix}white-rgb: #{to-rgb($white)};
|
|
47
51
|
--#{$prefix}black-rgb: #{to-rgb($black)};
|
|
48
52
|
|
|
@@ -154,6 +158,7 @@
|
|
|
154
158
|
--#{$prefix}focus-ring-width: #{$focus-ring-width};
|
|
155
159
|
--#{$prefix}focus-ring-opacity: #{$focus-ring-opacity};
|
|
156
160
|
--#{$prefix}focus-ring-color: #{$focus-ring-color};
|
|
161
|
+
--#{$prefix}focus-ring-blur: #{$focus-ring-blur};
|
|
157
162
|
// scss-docs-end root-focus-variables
|
|
158
163
|
|
|
159
164
|
// scss-docs-start root-form-validation-variables
|
package/scss/coreui.scss
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@forward "chip-input";
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
@use "../mixins/border-radius" as *;
|
|
2
|
+
@use "../mixins/box-shadow" as *;
|
|
3
|
+
@use "../mixins/focus-ring" as *;
|
|
4
|
+
@use "../mixins/transition" as *;
|
|
5
|
+
@use "../vendor/rfs" as *;
|
|
6
|
+
@use "../variables" as *;
|
|
7
|
+
|
|
8
|
+
// scss-docs-start chip-input-variables
|
|
9
|
+
$chip-input-min-height: $input-height !default;
|
|
10
|
+
$chip-input-padding-y: .25rem !default;
|
|
11
|
+
$chip-input-padding-x: .75rem !default;
|
|
12
|
+
$chip-input-font-size: $input-font-size !default;
|
|
13
|
+
$chip-input-bg: var(--#{$prefix}body-bg) !default;
|
|
14
|
+
$chip-input-color: var(--#{$prefix}body-color) !default;
|
|
15
|
+
$chip-input-border-width: var(--#{$prefix}border-width) !default;
|
|
16
|
+
$chip-input-border-color: var(--#{$prefix}border-color) !default;
|
|
17
|
+
$chip-input-border-radius: var(--#{$prefix}border-radius) !default;
|
|
18
|
+
$chip-input-gap: .375rem !default;
|
|
19
|
+
$chip-input-transition: $input-transition !default;
|
|
20
|
+
|
|
21
|
+
$chip-input-min-height-sm: $input-height-sm !default;
|
|
22
|
+
$chip-input-padding-y-sm: .125rem !default;
|
|
23
|
+
$chip-input-padding-x-sm: .5rem !default;
|
|
24
|
+
$chip-input-font-size-sm: $input-font-size-sm !default;
|
|
25
|
+
$chip-input-border-radius-sm: var(--#{$prefix}border-radius-sm) !default;
|
|
26
|
+
$chip-input-gap-sm: .125rem !default;
|
|
27
|
+
|
|
28
|
+
$chip-input-min-height-lg: $input-height-lg !default;
|
|
29
|
+
$chip-input-padding-y-lg: .375rem !default;
|
|
30
|
+
$chip-input-padding-x-lg: 1rem !default;
|
|
31
|
+
$chip-input-font-size-lg: $input-font-size-lg !default;
|
|
32
|
+
$chip-input-border-radius-lg: var(--#{$prefix}border-radius-lg) !default;
|
|
33
|
+
$chip-input-gap-lg: .5rem !default;
|
|
34
|
+
// scss-docs-end chip-input-variables
|
|
35
|
+
|
|
36
|
+
.chip-input {
|
|
37
|
+
// scss-docs-start chip-input-css-vars
|
|
38
|
+
--#{$prefix}chip-input-min-height: #{$chip-input-min-height};
|
|
39
|
+
--#{$prefix}chip-input-padding-y: #{$chip-input-padding-y};
|
|
40
|
+
--#{$prefix}chip-input-padding-x: #{$chip-input-padding-x};
|
|
41
|
+
--#{$prefix}chip-input-font-size: #{$chip-input-font-size};
|
|
42
|
+
--#{$prefix}chip-input-bg: #{$chip-input-bg};
|
|
43
|
+
--#{$prefix}chip-input-color: #{$chip-input-color};
|
|
44
|
+
--#{$prefix}chip-input-border-width: #{$chip-input-border-width};
|
|
45
|
+
--#{$prefix}chip-input-border-color: #{$chip-input-border-color};
|
|
46
|
+
--#{$prefix}chip-input-border-radius: #{$chip-input-border-radius};
|
|
47
|
+
--#{$prefix}chip-input-gap: #{$chip-input-gap};
|
|
48
|
+
--#{$prefix}chip-input-transition: #{$chip-input-transition};
|
|
49
|
+
// scss-docs-end chip-input-css-vars
|
|
50
|
+
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-wrap: wrap;
|
|
53
|
+
gap: var(--#{$prefix}chip-input-gap);
|
|
54
|
+
align-items: center;
|
|
55
|
+
min-height: var(--#{$prefix}chip-input-min-height);
|
|
56
|
+
padding: var(--#{$prefix}chip-input-padding-y) var(--#{$prefix}chip-input-padding-x);
|
|
57
|
+
@include font-size(var(--#{$prefix}chip-input-font-size));
|
|
58
|
+
color: var(--#{$prefix}chip-input-color);
|
|
59
|
+
background-color: var(--#{$prefix}chip-input-bg);
|
|
60
|
+
border: var(--#{$prefix}chip-input-border-width) solid var(--#{$prefix}chip-input-border-color);
|
|
61
|
+
@include border-radius(var(--#{$prefix}chip-input-border-radius), 0);
|
|
62
|
+
@include transition(var(--#{$prefix}chip-input-transition));
|
|
63
|
+
|
|
64
|
+
// Focus state when ghost input is focused
|
|
65
|
+
&:focus-within {
|
|
66
|
+
border-color: $input-focus-border-color;
|
|
67
|
+
@include focus-ring();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Disabled state
|
|
71
|
+
&.disabled {
|
|
72
|
+
background-color: $input-disabled-bg;
|
|
73
|
+
opacity: 1;
|
|
74
|
+
|
|
75
|
+
> .chip {
|
|
76
|
+
opacity: .65;
|
|
77
|
+
|
|
78
|
+
.chip-dismiss {
|
|
79
|
+
pointer-events: none;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.chip-input-field {
|
|
86
|
+
flex: 1 1 auto;
|
|
87
|
+
margin: 0;
|
|
88
|
+
border: 0;
|
|
89
|
+
outline: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Sizing variants
|
|
93
|
+
.chip-input-lg {
|
|
94
|
+
--#{$prefix}chip-input-min-height: #{$chip-input-min-height-lg};
|
|
95
|
+
--#{$prefix}chip-input-padding-y: #{$chip-input-padding-y-lg};
|
|
96
|
+
--#{$prefix}chip-input-padding-x: #{$chip-input-padding-x-lg};
|
|
97
|
+
--#{$prefix}chip-input-border-radius: #{$chip-input-border-radius-lg};
|
|
98
|
+
--#{$prefix}chip-input-font-size: #{$chip-input-font-size-lg};
|
|
99
|
+
--#{$prefix}chip-input-gap: #{$chip-input-gap-lg};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.chip-input-sm {
|
|
103
|
+
--#{$prefix}chip-input-min-height: #{$chip-input-min-height-sm};
|
|
104
|
+
--#{$prefix}chip-input-padding-y: #{$chip-input-padding-y-sm};
|
|
105
|
+
--#{$prefix}chip-input-padding-x: #{$chip-input-padding-x-sm};
|
|
106
|
+
--#{$prefix}chip-input-border-radius: #{$chip-input-border-radius-sm};
|
|
107
|
+
--#{$prefix}chip-input-font-size: #{$chip-input-font-size-sm};
|
|
108
|
+
--#{$prefix}chip-input-gap: #{$chip-input-gap-sm};
|
|
109
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@use "../vendor/rfs" as *;
|
|
2
|
+
@use "../variables" as *;
|
|
3
|
+
|
|
4
|
+
// scss-docs-start chip-mixin
|
|
5
|
+
@mixin chip-size($height, $padding-x, $chip-gap, $font-size, $img-size, $icon-size, $dismiss-size) {
|
|
6
|
+
--#{$prefix}chip-height: #{$height};
|
|
7
|
+
--#{$prefix}chip-padding-x: #{$padding-x};
|
|
8
|
+
--#{$prefix}chip-gap: #{$chip-gap};
|
|
9
|
+
@include rfs($font-size, --#{$prefix}chip-font-size);
|
|
10
|
+
--#{$prefix}chip-img-size: #{$img-size};
|
|
11
|
+
--#{$prefix}chip-icon-size: #{$icon-size};
|
|
12
|
+
--#{$prefix}chip-dismiss-size: #{$dismiss-size};
|
|
13
|
+
}
|
|
14
|
+
// scss-docs-end chip-mixin
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@use "../variables" as *;
|
|
2
|
+
|
|
3
|
+
@mixin focus-ring($color: null) {
|
|
4
|
+
@if $color != null {
|
|
5
|
+
--#{$prefix}focus-ring-color: #{$color};
|
|
6
|
+
}
|
|
7
|
+
outline: 0;
|
|
8
|
+
box-shadow: 0 0 var(--#{$prefix}focus-ring-blur) var(--#{$prefix}focus-ring-width) var(--#{$prefix}focus-ring-color);
|
|
9
|
+
}
|