@clayui/css 3.60.0 → 3.61.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.
@@ -113,176 +113,185 @@
113
113
  /// - Add @link to documentation
114
114
 
115
115
  @mixin clay-sticker-variant($map) {
116
- $enabled: setter(map-get($map, enabled), true);
117
-
118
- $base: map-merge(
119
- $map,
120
- (
121
- background-color:
122
- setter(map-get($map, bg), map-get($map, background-color)),
123
- height: setter(map-get($map, size), map-get($map, height)),
124
- line-height: setter(map-get($map, size), map-get($map, line-height)),
125
- width: setter(map-get($map, size), map-get($map, width)),
126
- )
127
- );
128
-
129
- $inline-item: setter(map-get($map, inline-item), ());
130
- $inline-item: map-merge(
131
- $inline-item,
132
- (
133
- font-size:
134
- setter(
135
- map-get($map, inline-item-font-size),
136
- map-get($inline-item, font-size)
137
- ),
138
- )
139
- );
140
-
141
- $outside-offset: setter(
142
- map-get($map, outside-offset),
143
- if(
144
- map-get($map, size),
145
- calc(#{math-sign(map-get($map, size))} / 2),
146
- null
147
- )
148
- );
149
-
150
- $sticker-outside: setter(map-get($map, sticker-outside), ());
151
-
152
- $sticker-outside-bottom-left: setter(
153
- map-get($sticker-outside, sticker-bottom-left),
154
- ()
155
- );
156
- $sticker-outside-bottom-left: map-merge(
157
- $sticker-outside-bottom-left,
158
- setter(map-get($map, sticker-outside-bottom-left), ())
159
- );
160
-
161
- $sticker-outside-bottom-right: setter(
162
- map-get($sticker-outside, sticker-bottom-right),
163
- ()
164
- );
165
- $sticker-outside-bottom-right: map-merge(
166
- $sticker-outside-bottom-right,
167
- setter(map-get($map, sticker-outside-bottom-right), ())
168
- );
116
+ @if (type-of($map) == 'map') {
117
+ $enabled: setter(map-get($map, enabled), true);
169
118
 
170
- $sticker-outside-top-right: setter(
171
- map-get($sticker-outside, sticker-top-right),
172
- ()
173
- );
174
- $sticker-outside-top-right: map-merge(
175
- $sticker-outside-top-right,
176
- setter(map-get($map, sticker-outside-top-right), ())
177
- );
119
+ $base: map-merge(
120
+ $map,
121
+ (
122
+ background-color:
123
+ setter(map-get($map, bg), map-get($map, background-color)),
124
+ height: setter(map-get($map, size), map-get($map, height)),
125
+ line-height:
126
+ setter(map-get($map, size), map-get($map, line-height)),
127
+ width: setter(map-get($map, size), map-get($map, width)),
128
+ )
129
+ );
178
130
 
179
- @if ($outside-offset) {
180
- $sticker-outside: map-merge(
181
- $sticker-outside,
131
+ $inline-item: setter(map-get($map, inline-item), ());
132
+ $inline-item: map-merge(
133
+ $inline-item,
182
134
  (
183
- left: $outside-offset,
184
- top: $outside-offset,
135
+ font-size:
136
+ setter(
137
+ map-get($map, inline-item-font-size),
138
+ map-get($inline-item, font-size)
139
+ ),
140
+ )
141
+ );
142
+
143
+ $outside-offset: setter(
144
+ map-get($map, outside-offset),
145
+ if(
146
+ map-get($map, size),
147
+ calc(#{math-sign(map-get($map, size))} / 2),
148
+ null
185
149
  )
186
150
  );
187
151
 
152
+ $sticker-outside: setter(map-get($map, sticker-outside), ());
153
+
154
+ $sticker-outside-bottom-left: setter(
155
+ map-get($sticker-outside, sticker-bottom-left),
156
+ ()
157
+ );
188
158
  $sticker-outside-bottom-left: map-merge(
189
159
  $sticker-outside-bottom-left,
190
- (
191
- bottom: $outside-offset,
192
- top: auto,
193
- )
160
+ setter(map-get($map, sticker-outside-bottom-left), ())
194
161
  );
195
162
 
163
+ $sticker-outside-bottom-right: setter(
164
+ map-get($sticker-outside, sticker-bottom-right),
165
+ ()
166
+ );
196
167
  $sticker-outside-bottom-right: map-merge(
197
168
  $sticker-outside-bottom-right,
198
- (
199
- bottom: $outside-offset,
200
- left: auto,
201
- right: $outside-offset,
202
- top: auto,
203
- )
169
+ setter(map-get($map, sticker-outside-bottom-right), ())
204
170
  );
205
171
 
172
+ $sticker-outside-top-right: setter(
173
+ map-get($sticker-outside, sticker-top-right),
174
+ ()
175
+ );
206
176
  $sticker-outside-top-right: map-merge(
207
177
  $sticker-outside-top-right,
208
- (
209
- left: auto,
210
- right: $outside-offset,
211
- )
178
+ setter(map-get($map, sticker-outside-top-right), ())
212
179
  );
213
- }
214
-
215
- @if ($enabled) {
216
- @include clay-css($base);
217
180
 
218
- > .inline-item {
219
- @include clay-css($inline-item);
220
-
221
- .lexicon-icon {
222
- @include clay-css(
223
- setter(map-deep-get($map, inline-item, lexicon-icon), ())
224
- );
225
- }
181
+ @if ($outside-offset) {
182
+ $sticker-outside: map-merge(
183
+ $sticker-outside,
184
+ (
185
+ left: $outside-offset,
186
+ top: $outside-offset,
187
+ )
188
+ );
189
+
190
+ $sticker-outside-bottom-left: map-merge(
191
+ $sticker-outside-bottom-left,
192
+ (
193
+ bottom: $outside-offset,
194
+ top: auto,
195
+ )
196
+ );
197
+
198
+ $sticker-outside-bottom-right: map-merge(
199
+ $sticker-outside-bottom-right,
200
+ (
201
+ bottom: $outside-offset,
202
+ left: auto,
203
+ right: $outside-offset,
204
+ top: auto,
205
+ )
206
+ );
207
+
208
+ $sticker-outside-top-right: map-merge(
209
+ $sticker-outside-top-right,
210
+ (
211
+ left: auto,
212
+ right: $outside-offset,
213
+ )
214
+ );
226
215
  }
227
216
 
228
- .lexicon-icon {
229
- @include clay-css(setter(map-get($map, lexicon-icon), ()));
230
- }
217
+ @if ($enabled) {
218
+ @include clay-css($base);
231
219
 
232
- .sticker-img {
233
- @include clay-css(setter(map-get($map, sticker-img), ()));
234
- }
235
-
236
- .sticker-overlay {
237
- @include clay-css(setter(map-get($map, sticker-overlay), ()));
238
- }
220
+ > .inline-item {
221
+ @include clay-css($inline-item);
239
222
 
240
- &.rounded {
241
- @include clay-css(setter(map-get($map, rounded), ()));
223
+ .lexicon-icon {
224
+ @include clay-css(
225
+ setter(
226
+ map-deep-get($map, inline-item, lexicon-icon),
227
+ ()
228
+ )
229
+ );
230
+ }
231
+ }
242
232
 
243
- .sticker-overlay {
244
- @include clay-css(
245
- setter(map-deep-get($map, rounded, sticker-overlay), ())
246
- );
233
+ .lexicon-icon {
234
+ @include clay-css(setter(map-get($map, lexicon-icon), ()));
247
235
  }
248
- }
249
236
 
250
- &.rounded-circle {
251
- @include clay-css(setter(map-get($map, rounded-circle), ()));
237
+ .sticker-img {
238
+ @include clay-css(setter(map-get($map, sticker-img), ()));
239
+ }
252
240
 
253
241
  .sticker-overlay {
254
- @include clay-css(
255
- setter(
256
- map-deep-get($map, rounded-circle, sticker-overlay),
257
- ()
258
- )
259
- );
242
+ @include clay-css(setter(map-get($map, sticker-overlay), ()));
260
243
  }
261
- }
262
244
 
263
- &.rounded-0 {
264
- @include clay-css(setter(map-get($map, rounded-0), ()));
245
+ &.rounded {
246
+ @include clay-css(setter(map-get($map, rounded), ()));
265
247
 
266
- .sticker-overlay {
267
- @include clay-css(
268
- setter(map-deep-get($map, rounded-0, sticker-overlay), ())
269
- );
248
+ .sticker-overlay {
249
+ @include clay-css(
250
+ setter(map-deep-get($map, rounded, sticker-overlay), ())
251
+ );
252
+ }
270
253
  }
271
- }
272
-
273
- &.sticker-outside {
274
- @include clay-css($sticker-outside);
275
254
 
276
- &.sticker-bottom-left {
277
- @include clay-css($sticker-outside-bottom-left);
255
+ &.rounded-circle {
256
+ @include clay-css(setter(map-get($map, rounded-circle), ()));
257
+
258
+ .sticker-overlay {
259
+ @include clay-css(
260
+ setter(
261
+ map-deep-get($map, rounded-circle, sticker-overlay),
262
+ ()
263
+ )
264
+ );
265
+ }
278
266
  }
279
267
 
280
- &.sticker-bottom-right {
281
- @include clay-css($sticker-outside-bottom-right);
268
+ &.rounded-0 {
269
+ @include clay-css(setter(map-get($map, rounded-0), ()));
270
+
271
+ .sticker-overlay {
272
+ @include clay-css(
273
+ setter(
274
+ map-deep-get($map, rounded-0, sticker-overlay),
275
+ ()
276
+ )
277
+ );
278
+ }
282
279
  }
283
280
 
284
- &.sticker-top-right {
285
- @include clay-css($sticker-outside-top-right);
281
+ &.sticker-outside {
282
+ @include clay-css($sticker-outside);
283
+
284
+ &.sticker-bottom-left {
285
+ @include clay-css($sticker-outside-bottom-left);
286
+ }
287
+
288
+ &.sticker-bottom-right {
289
+ @include clay-css($sticker-outside-bottom-right);
290
+ }
291
+
292
+ &.sticker-top-right {
293
+ @include clay-css($sticker-outside-top-right);
294
+ }
286
295
  }
287
296
  }
288
297
  }
@@ -189,28 +189,14 @@ $spacers: () !default;
189
189
  $spacers: map-deep-merge(
190
190
  (
191
191
  0: 0,
192
- 1: (
193
- $spacer * 0.25,
194
- ),
195
- 2: (
196
- $spacer * 0.5,
197
- ),
192
+ 1: $spacer * 0.25,
193
+ 2: $spacer * 0.5,
198
194
  3: $spacer,
199
- 4: (
200
- $spacer * 1.5,
201
- ),
202
- 5: (
203
- $spacer * 3,
204
- ),
205
- 6: (
206
- $spacer * 4.5,
207
- ),
208
- 7: (
209
- $spacer * 6,
210
- ),
211
- 8: (
212
- $spacer * 7.5,
213
- ),
195
+ 4: $spacer * 1.5,
196
+ 5: $spacer * 3,
197
+ 6: $spacer * 4.5,
198
+ 7: $spacer * 6,
199
+ 8: $spacer * 7.5,
214
200
  ),
215
201
  $spacers
216
202
  );
@@ -13,27 +13,30 @@ $loading-icon-font-size-sm: map-get($font-scale, 4) !default; // 16px
13
13
  $loading-animation: () !default;
14
14
  $loading-animation: map-deep-merge(
15
15
  (
16
- animation: loading-animation-circle 1s linear infinite,
17
16
  display: block,
18
17
  height: 1em,
19
18
  margin-left: auto,
20
19
  margin-right: auto,
20
+ overflow: hidden,
21
21
  position: relative,
22
22
  text-align: left,
23
23
  vertical-align: middle,
24
24
  width: 1em,
25
25
  before: (
26
+ animation: loading-animation-circle 1s linear infinite,
26
27
  border-radius: 50%,
27
28
  box-shadow: -0.03125em -0.375em 0 0 currentColor,
28
29
  content: '',
29
30
  height: 0.25em,
30
31
  left: 50%,
32
+ margin-left: -0.125em,
33
+ margin-top: -0.125em,
31
34
  position: absolute,
32
35
  top: 50%,
33
- transform: translate(-50%, -50%),
34
36
  width: 0.25em,
35
37
  ),
36
38
  after: (
39
+ animation: loading-animation-circle 1s linear infinite,
37
40
  background-color: currentColor,
38
41
  border-radius: 50%,
39
42
  content: '',
@@ -79,29 +79,6 @@ $sidebar-list-group-sticker-size: map-deep-merge(
79
79
 
80
80
  // Sidebar Light
81
81
 
82
- $sidebar-light: () !default;
83
- $sidebar-light: map-deep-merge(
84
- (
85
- bg: $light,
86
- border-color: $gray-300,
87
- border-left-width: 1px,
88
- color: $gray-900,
89
- dd: (
90
- clay-link: (
91
- color: $gray-900,
92
- ),
93
- ),
94
- panel-bg: $gray-200,
95
- sidebar-list-group-title: (
96
- font-size: 1rem,
97
- clay-link: (
98
- color: $gray-900,
99
- ),
100
- ),
101
- ),
102
- $sidebar-light
103
- );
104
-
105
82
  $sidebar-light-navigation-bar: () !default;
106
83
  $sidebar-light-navigation-bar: map-deep-merge(
107
84
  (
@@ -127,42 +104,144 @@ $sidebar-light-navigation-bar: map-deep-merge(
127
104
  $sidebar-light-navigation-bar
128
105
  );
129
106
 
107
+ $sidebar-light: () !default;
108
+ $sidebar-light: map-deep-merge(
109
+ (
110
+ background-color: $light,
111
+ border-color: $gray-300,
112
+ border-left-width: 1px,
113
+ color: $gray-900,
114
+ sidebar-dd: (
115
+ href: (
116
+ color: $gray-900,
117
+ ),
118
+ ),
119
+ sidebar-panel: (
120
+ background-color: $gray-200,
121
+ ),
122
+ sidebar-list-group: (
123
+ list-group-title: (
124
+ font-size: 1rem,
125
+ href: (
126
+ color: $gray-900,
127
+ ),
128
+ ),
129
+ ),
130
+ component-navigation-bar: $sidebar-light-navigation-bar,
131
+ ),
132
+ $sidebar-light
133
+ );
134
+
130
135
  // Sidebar Dark
131
136
 
132
137
  $sidebar-dark: () !default;
133
138
  $sidebar-dark: map-deep-merge(
134
139
  (
135
- bg: $dark,
140
+ background-color: $dark,
136
141
  color: $white,
137
- component-header-title: (
138
- color: inherit,
139
- clay-link: (
142
+ sidebar-header: (
143
+ component-title: (
140
144
  color: inherit,
145
+ href: (
146
+ color: inherit,
147
+ ),
141
148
  ),
142
- ),
143
- component-header-subtitle: (
144
- color: inherit,
145
- clay-link: (
149
+ component-subtitle: (
146
150
  color: inherit,
151
+ href: (
152
+ color: inherit,
153
+ ),
147
154
  ),
148
155
  ),
149
156
  close: (
150
157
  color: $secondary-l1,
151
- hover-color: $white,
158
+ hover: (
159
+ color: $white,
160
+ ),
152
161
  ),
153
- nav-nested-link: (
154
- border-radius: $border-radius,
155
- color: $secondary-l1,
156
- transition: box-shadow 0.15s ease-in-out,
157
- hover-color: $white,
158
- focus-box-shadow: $component-focus-box-shadow,
159
- focus-outline: 0,
160
- active-color: $white,
161
- disabled-box-shadow: none,
162
- disabled-color: $secondary-l1,
163
- disabled-opacity: 0.65,
164
- disabled-active-pointer-events: none,
162
+ nav-nested: (
163
+ nav-link: (
164
+ border-radius: $border-radius,
165
+ color: $secondary-l1,
166
+ transition: box-shadow 0.15s ease-in-out,
167
+ hover: (
168
+ color: $white,
169
+ ),
170
+ focus: (
171
+ box-shadow: $component-focus-box-shadow,
172
+ outline: 0,
173
+ ),
174
+ active: (
175
+ color: $white,
176
+ ),
177
+ disabled: (
178
+ box-shadow: none,
179
+ color: $secondary-l1,
180
+ opacity: 0.65,
181
+ active: (
182
+ pointer-events: none,
183
+ ),
184
+ ),
185
+ ),
165
186
  ),
166
187
  ),
167
188
  $sidebar-dark
168
189
  );
190
+
191
+ $sidebar-palette: () !default;
192
+ $sidebar-palette: map-deep-merge(
193
+ (
194
+ sidebar-light: $sidebar-light,
195
+ sidebar-dark: $sidebar-dark,
196
+ sidebar-dark-l2: (
197
+ background-color: $dark-l2,
198
+ color: $white,
199
+ sidebar-header: (
200
+ component-title: (
201
+ color: inherit,
202
+ href: (
203
+ color: inherit,
204
+ ),
205
+ ),
206
+ component-subtitle: (
207
+ color: inherit,
208
+ href: (
209
+ color: inherit,
210
+ ),
211
+ ),
212
+ ),
213
+ close: (
214
+ color: $secondary-l1,
215
+ hover: (
216
+ color: $white,
217
+ ),
218
+ ),
219
+ nav-nested: (
220
+ nav-link: (
221
+ border-radius: $border-radius,
222
+ color: $secondary-l1,
223
+ transition: box-shadow 0.15s ease-in-out,
224
+ hover: (
225
+ color: $white,
226
+ ),
227
+ focus: (
228
+ box-shadow: $component-focus-box-shadow,
229
+ outline: 0,
230
+ ),
231
+ active: (
232
+ color: $white,
233
+ ),
234
+ disabled: (
235
+ box-shadow: none,
236
+ color: $secondary-l1,
237
+ opacity: 0.65,
238
+ active: (
239
+ pointer-events: none,
240
+ ),
241
+ ),
242
+ ),
243
+ ),
244
+ ),
245
+ ),
246
+ $sidebar-palette
247
+ );