@limetech/lime-elements 38.24.5 → 38.25.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/lime-elements.cjs.js +1 -1
  3. package/dist/cjs/limel-color-picker-palette.cjs.entry.js +84 -17
  4. package/dist/cjs/limel-color-picker-palette.cjs.entry.js.map +1 -1
  5. package/dist/cjs/limel-color-picker.cjs.entry.js +6 -7
  6. package/dist/cjs/limel-color-picker.cjs.entry.js.map +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/collection/components/color-picker/color-picker-palette.css +96 -742
  9. package/dist/collection/components/color-picker/color-picker-palette.js +96 -13
  10. package/dist/collection/components/color-picker/color-picker-palette.js.map +1 -1
  11. package/dist/collection/components/color-picker/color-picker.css +24 -40
  12. package/dist/collection/components/color-picker/color-picker.js +47 -7
  13. package/dist/collection/components/color-picker/color-picker.js.map +1 -1
  14. package/dist/collection/components/color-picker/color-picker.types.js +2 -0
  15. package/dist/collection/components/color-picker/color-picker.types.js.map +1 -0
  16. package/dist/collection/components/color-picker/swatches.js +33 -4
  17. package/dist/collection/components/color-picker/swatches.js.map +1 -1
  18. package/dist/esm/lime-elements.js +1 -1
  19. package/dist/esm/limel-color-picker-palette.entry.js +84 -17
  20. package/dist/esm/limel-color-picker-palette.entry.js.map +1 -1
  21. package/dist/esm/limel-color-picker.entry.js +7 -8
  22. package/dist/esm/limel-color-picker.entry.js.map +1 -1
  23. package/dist/esm/loader.js +1 -1
  24. package/dist/lime-elements/lime-elements.esm.js +1 -1
  25. package/dist/lime-elements/lime-elements.esm.js.map +1 -1
  26. package/dist/lime-elements/p-20c96ff3.entry.js +2 -0
  27. package/dist/lime-elements/p-20c96ff3.entry.js.map +1 -0
  28. package/dist/lime-elements/p-3d25fce1.entry.js +2 -0
  29. package/dist/lime-elements/p-3d25fce1.entry.js.map +1 -0
  30. package/dist/types/components/color-picker/color-picker-palette.d.ts +16 -2
  31. package/dist/types/components/color-picker/color-picker.d.ts +15 -1
  32. package/dist/types/components/color-picker/color-picker.types.d.ts +24 -0
  33. package/dist/types/components/color-picker/swatches.d.ts +27 -2
  34. package/dist/types/components.d.ts +38 -0
  35. package/package.json +1 -1
  36. package/dist/lime-elements/p-63f2f6b8.entry.js +0 -2
  37. package/dist/lime-elements/p-63f2f6b8.entry.js.map +0 -1
  38. package/dist/lime-elements/p-bc5bbdf6.entry.js +0 -2
  39. package/dist/lime-elements/p-bc5bbdf6.entry.js.map +0 -1
@@ -5,552 +5,6 @@
5
5
  * Nothing in this file may output any CSS
6
6
  * without being explicitly called by outside code.
7
7
  */
8
- .color-palette {
9
- display: grid;
10
- gap: 0.25rem;
11
- grid-auto-flow: column;
12
- margin: 0.75rem auto 1.25rem auto;
13
- padding: 1.25rem 0.75rem;
14
- background-color: rgb(var(--kompendium-contrast-300));
15
- border-radius: 0.1875rem;
16
- }
17
-
18
- .brightness-label,
19
- .swatch {
20
- display: flex;
21
- align-items: center;
22
- position: relative;
23
- }
24
-
25
- .swatch {
26
- border-radius: 3px;
27
- justify-content: center;
28
- color: rgba(var(--kompendium-color-white), 0.4);
29
- font-size: 1.25rem;
30
- line-height: 99%;
31
- }
32
- .swatch:after {
33
- content: "";
34
- display: block;
35
- padding-top: 100%;
36
- }
37
- .swatch.hue {
38
- font-family: "Source Code Pro", monospace;
39
- font-size: 0.75rem;
40
- position: relative;
41
- color: rgb(var(--kompendium-contrast-900));
42
- padding-top: 0.5rem;
43
- writing-mode: vertical-lr;
44
- justify-content: left;
45
- }
46
-
47
- .brightness-label {
48
- font-family: "Source Code Pro", monospace;
49
- font-size: 0.75rem;
50
- color: rgb(var(--kompendium-contrast-900));
51
- justify-content: start;
52
- }
53
-
54
- .--color-red-lighter {
55
- background-color: rgb(var(--color-red-lighter));
56
- }
57
-
58
- .--color-red-light {
59
- background-color: rgb(var(--color-red-light));
60
- }
61
-
62
- .--color-red-default {
63
- background-color: rgb(var(--color-red-default));
64
- }
65
-
66
- .--color-red-dark {
67
- background-color: rgb(var(--color-red-dark));
68
- }
69
-
70
- .--color-red-darker {
71
- background-color: rgb(var(--color-red-darker));
72
- }
73
-
74
- .--color-pink-lighter {
75
- background-color: rgb(var(--color-pink-lighter));
76
- }
77
-
78
- .--color-pink-light {
79
- background-color: rgb(var(--color-pink-light));
80
- }
81
-
82
- .--color-pink-default {
83
- background-color: rgb(var(--color-pink-default));
84
- }
85
-
86
- .--color-pink-dark {
87
- background-color: rgb(var(--color-pink-dark));
88
- }
89
-
90
- .--color-pink-darker {
91
- background-color: rgb(var(--color-pink-darker));
92
- }
93
-
94
- .--color-magenta-lighter {
95
- background-color: rgb(var(--color-magenta-lighter));
96
- }
97
-
98
- .--color-magenta-light {
99
- background-color: rgb(var(--color-magenta-light));
100
- }
101
-
102
- .--color-magenta-default {
103
- background-color: rgb(var(--color-magenta-default));
104
- }
105
-
106
- .--color-magenta-dark {
107
- background-color: rgb(var(--color-magenta-dark));
108
- }
109
-
110
- .--color-magenta-darker {
111
- background-color: rgb(var(--color-magenta-darker));
112
- }
113
-
114
- .--color-purple-lighter {
115
- background-color: rgb(var(--color-purple-lighter));
116
- }
117
-
118
- .--color-purple-light {
119
- background-color: rgb(var(--color-purple-light));
120
- }
121
-
122
- .--color-purple-default {
123
- background-color: rgb(var(--color-purple-default));
124
- }
125
-
126
- .--color-purple-dark {
127
- background-color: rgb(var(--color-purple-dark));
128
- }
129
-
130
- .--color-purple-darker {
131
- background-color: rgb(var(--color-purple-darker));
132
- }
133
-
134
- .--color-violet-lighter {
135
- background-color: rgb(var(--color-violet-lighter));
136
- }
137
-
138
- .--color-violet-light {
139
- background-color: rgb(var(--color-violet-light));
140
- }
141
-
142
- .--color-violet-default {
143
- background-color: rgb(var(--color-violet-default));
144
- }
145
-
146
- .--color-violet-dark {
147
- background-color: rgb(var(--color-violet-dark));
148
- }
149
-
150
- .--color-violet-darker {
151
- background-color: rgb(var(--color-violet-darker));
152
- }
153
-
154
- .--color-indigo-lighter {
155
- background-color: rgb(var(--color-indigo-lighter));
156
- }
157
-
158
- .--color-indigo-light {
159
- background-color: rgb(var(--color-indigo-light));
160
- }
161
-
162
- .--color-indigo-default {
163
- background-color: rgb(var(--color-indigo-default));
164
- }
165
-
166
- .--color-indigo-dark {
167
- background-color: rgb(var(--color-indigo-dark));
168
- }
169
-
170
- .--color-indigo-darker {
171
- background-color: rgb(var(--color-indigo-darker));
172
- }
173
-
174
- .--color-blue-lighter {
175
- background-color: rgb(var(--color-blue-lighter));
176
- }
177
-
178
- .--color-blue-light {
179
- background-color: rgb(var(--color-blue-light));
180
- }
181
-
182
- .--color-blue-default {
183
- background-color: rgb(var(--color-blue-default));
184
- }
185
-
186
- .--color-blue-dark {
187
- background-color: rgb(var(--color-blue-dark));
188
- }
189
-
190
- .--color-blue-darker {
191
- background-color: rgb(var(--color-blue-darker));
192
- }
193
-
194
- .--color-sky-lighter {
195
- background-color: rgb(var(--color-sky-lighter));
196
- }
197
-
198
- .--color-sky-light {
199
- background-color: rgb(var(--color-sky-light));
200
- }
201
-
202
- .--color-sky-default {
203
- background-color: rgb(var(--color-sky-default));
204
- }
205
-
206
- .--color-sky-dark {
207
- background-color: rgb(var(--color-sky-dark));
208
- }
209
-
210
- .--color-sky-darker {
211
- background-color: rgb(var(--color-sky-darker));
212
- }
213
-
214
- .--color-cyan-lighter {
215
- background-color: rgb(var(--color-cyan-lighter));
216
- }
217
-
218
- .--color-cyan-light {
219
- background-color: rgb(var(--color-cyan-light));
220
- }
221
-
222
- .--color-cyan-default {
223
- background-color: rgb(var(--color-cyan-default));
224
- }
225
-
226
- .--color-cyan-dark {
227
- background-color: rgb(var(--color-cyan-dark));
228
- }
229
-
230
- .--color-cyan-darker {
231
- background-color: rgb(var(--color-cyan-darker));
232
- }
233
-
234
- .--color-teal-lighter {
235
- background-color: rgb(var(--color-teal-lighter));
236
- }
237
-
238
- .--color-teal-light {
239
- background-color: rgb(var(--color-teal-light));
240
- }
241
-
242
- .--color-teal-default {
243
- background-color: rgb(var(--color-teal-default));
244
- }
245
-
246
- .--color-teal-dark {
247
- background-color: rgb(var(--color-teal-dark));
248
- }
249
-
250
- .--color-teal-darker {
251
- background-color: rgb(var(--color-teal-darker));
252
- }
253
-
254
- .--color-green-lighter {
255
- background-color: rgb(var(--color-green-lighter));
256
- }
257
-
258
- .--color-green-light {
259
- background-color: rgb(var(--color-green-light));
260
- }
261
-
262
- .--color-green-default {
263
- background-color: rgb(var(--color-green-default));
264
- }
265
-
266
- .--color-green-dark {
267
- background-color: rgb(var(--color-green-dark));
268
- }
269
-
270
- .--color-green-darker {
271
- background-color: rgb(var(--color-green-darker));
272
- }
273
-
274
- .--color-lime-lighter {
275
- background-color: rgb(var(--color-lime-lighter));
276
- }
277
-
278
- .--color-lime-light {
279
- background-color: rgb(var(--color-lime-light));
280
- }
281
-
282
- .--color-lime-default {
283
- background-color: rgb(var(--color-lime-default));
284
- }
285
-
286
- .--color-lime-dark {
287
- background-color: rgb(var(--color-lime-dark));
288
- }
289
-
290
- .--color-lime-darker {
291
- background-color: rgb(var(--color-lime-darker));
292
- }
293
-
294
- .--color-grass-lighter {
295
- background-color: rgb(var(--color-grass-lighter));
296
- }
297
-
298
- .--color-grass-light {
299
- background-color: rgb(var(--color-grass-light));
300
- }
301
-
302
- .--color-grass-default {
303
- background-color: rgb(var(--color-grass-default));
304
- }
305
-
306
- .--color-grass-dark {
307
- background-color: rgb(var(--color-grass-dark));
308
- }
309
-
310
- .--color-grass-darker {
311
- background-color: rgb(var(--color-grass-darker));
312
- }
313
-
314
- .--color-yellow-lighter {
315
- background-color: rgb(var(--color-yellow-lighter));
316
- }
317
-
318
- .--color-yellow-light {
319
- background-color: rgb(var(--color-yellow-light));
320
- }
321
-
322
- .--color-yellow-default {
323
- background-color: rgb(var(--color-yellow-default));
324
- }
325
-
326
- .--color-yellow-dark {
327
- background-color: rgb(var(--color-yellow-dark));
328
- }
329
-
330
- .--color-yellow-darker {
331
- background-color: rgb(var(--color-yellow-darker));
332
- }
333
-
334
- .--color-amber-lighter {
335
- background-color: rgb(var(--color-amber-lighter));
336
- }
337
-
338
- .--color-amber-light {
339
- background-color: rgb(var(--color-amber-light));
340
- }
341
-
342
- .--color-amber-default {
343
- background-color: rgb(var(--color-amber-default));
344
- }
345
-
346
- .--color-amber-dark {
347
- background-color: rgb(var(--color-amber-dark));
348
- }
349
-
350
- .--color-amber-darker {
351
- background-color: rgb(var(--color-amber-darker));
352
- }
353
-
354
- .--color-orange-lighter {
355
- background-color: rgb(var(--color-orange-lighter));
356
- }
357
-
358
- .--color-orange-light {
359
- background-color: rgb(var(--color-orange-light));
360
- }
361
-
362
- .--color-orange-default {
363
- background-color: rgb(var(--color-orange-default));
364
- }
365
-
366
- .--color-orange-dark {
367
- background-color: rgb(var(--color-orange-dark));
368
- }
369
-
370
- .--color-orange-darker {
371
- background-color: rgb(var(--color-orange-darker));
372
- }
373
-
374
- .--color-coral-lighter {
375
- background-color: rgb(var(--color-coral-lighter));
376
- }
377
-
378
- .--color-coral-light {
379
- background-color: rgb(var(--color-coral-light));
380
- }
381
-
382
- .--color-coral-default {
383
- background-color: rgb(var(--color-coral-default));
384
- }
385
-
386
- .--color-coral-dark {
387
- background-color: rgb(var(--color-coral-dark));
388
- }
389
-
390
- .--color-coral-darker {
391
- background-color: rgb(var(--color-coral-darker));
392
- }
393
-
394
- .--color-brown-lighter {
395
- background-color: rgb(var(--color-brown-lighter));
396
- }
397
-
398
- .--color-brown-light {
399
- background-color: rgb(var(--color-brown-light));
400
- }
401
-
402
- .--color-brown-default {
403
- background-color: rgb(var(--color-brown-default));
404
- }
405
-
406
- .--color-brown-dark {
407
- background-color: rgb(var(--color-brown-dark));
408
- }
409
-
410
- .--color-brown-darker {
411
- background-color: rgb(var(--color-brown-darker));
412
- }
413
-
414
- .--color-gray-lighter {
415
- background-color: rgb(var(--color-gray-lighter));
416
- }
417
-
418
- .--color-gray-light {
419
- background-color: rgb(var(--color-gray-light));
420
- }
421
-
422
- .--color-gray-default {
423
- background-color: rgb(var(--color-gray-default));
424
- }
425
-
426
- .--color-gray-dark {
427
- background-color: rgb(var(--color-gray-dark));
428
- }
429
-
430
- .--color-gray-darker {
431
- background-color: rgb(var(--color-gray-darker));
432
- }
433
-
434
- .--color-glaucous-lighter {
435
- background-color: rgb(var(--color-glaucous-lighter));
436
- }
437
-
438
- .--color-glaucous-light {
439
- background-color: rgb(var(--color-glaucous-light));
440
- }
441
-
442
- .--color-glaucous-default {
443
- background-color: rgb(var(--color-glaucous-default));
444
- }
445
-
446
- .--color-glaucous-dark {
447
- background-color: rgb(var(--color-glaucous-dark));
448
- }
449
-
450
- .--color-glaucous-darker {
451
- background-color: rgb(var(--color-glaucous-darker));
452
- }
453
-
454
- .--contrast-100 {
455
- color: rgb(var(--contrast-900));
456
- background-color: rgb(var(--contrast-100));
457
- }
458
-
459
- .--contrast-200 {
460
- color: rgb(var(--contrast-1000));
461
- background-color: rgb(var(--contrast-200));
462
- }
463
-
464
- .--contrast-300 {
465
- color: rgb(var(--contrast-1100));
466
- background-color: rgb(var(--contrast-300));
467
- }
468
-
469
- .--contrast-400 {
470
- color: rgb(var(--contrast-1200));
471
- background-color: rgb(var(--contrast-400));
472
- }
473
-
474
- .--contrast-500 {
475
- color: rgb(var(--contrast-1300));
476
- background-color: rgb(var(--contrast-500));
477
- }
478
-
479
- .--contrast-600 {
480
- color: rgb(var(--contrast-1400));
481
- background-color: rgb(var(--contrast-600));
482
- }
483
-
484
- .--contrast-700 {
485
- color: rgb(var(--contrast-1500));
486
- background-color: rgb(var(--contrast-700));
487
- }
488
-
489
- .--contrast-800 {
490
- color: rgb(var(--contrast-1600));
491
- background-color: rgb(var(--contrast-800));
492
- }
493
-
494
- .--contrast-900 {
495
- color: rgb(var(--contrast-1700));
496
- background-color: rgb(var(--contrast-900));
497
- }
498
-
499
- .--contrast-1000 {
500
- color: rgb(var(--contrast-100));
501
- background-color: rgb(var(--contrast-1000));
502
- }
503
-
504
- .--contrast-1100 {
505
- color: rgb(var(--contrast-200));
506
- background-color: rgb(var(--contrast-1100));
507
- }
508
-
509
- .--contrast-1200 {
510
- color: rgb(var(--contrast-300));
511
- background-color: rgb(var(--contrast-1200));
512
- }
513
-
514
- .--contrast-1300 {
515
- color: rgb(var(--contrast-400));
516
- background-color: rgb(var(--contrast-1300));
517
- }
518
-
519
- .--contrast-1400 {
520
- color: rgb(var(--contrast-500));
521
- background-color: rgb(var(--contrast-1400));
522
- }
523
-
524
- .--contrast-1500 {
525
- color: rgb(var(--contrast-600));
526
- background-color: rgb(var(--contrast-1500));
527
- }
528
-
529
- .--contrast-1600 {
530
- color: rgb(var(--contrast-700));
531
- background-color: rgb(var(--contrast-1600));
532
- }
533
-
534
- .--contrast-1700 {
535
- color: rgb(var(--contrast-800));
536
- background-color: rgb(var(--contrast-1700));
537
- }
538
-
539
- .--color-white {
540
- color: rgb(var(--color-black));
541
- background-color: rgb(var(--color-white));
542
- }
543
-
544
- .--color-black {
545
- color: rgb(var(--color-white));
546
- background-color: rgb(var(--color-black));
547
- }
548
-
549
- .color-palette {
550
- grid-template-rows: repeat(5, 1fr) auto;
551
- grid-template-columns: repeat(20, 1fr) auto;
552
- }
553
-
554
8
  /**
555
9
  * Note! This file is exported to `dist/scss/` in the published
556
10
  * node module, for consumer projects to import.
@@ -635,96 +89,6 @@
635
89
  * Media query mixins for responsive design based on screen width.
636
90
  * Note that these mixins do not detect the device type!
637
91
  */
638
- /**
639
- * Note! This file is exported to `dist/scss/` in the published
640
- * node module, for consumer projects to import.
641
- * That means this file cannot import from any file that isn't
642
- * also exported, keeping the same relative path.
643
- *
644
- * Or, just don't import anything, that works too.
645
- */
646
- /**
647
- * This can be used on a trigger element that opens a dropdown menu or a popover.
648
- */
649
- /**
650
- * This mixin will mask out the content that is close to
651
- * the edges of a scrollable area.
652
- * - If the scrollable content has `overflow-y`, use `vertically`
653
- * as an argument for `$direction`.
654
- - If the scrollable content has `overflow-x`, use `horizontally`
655
- * as an argument for `$direction`.
656
- *
657
- * For the visual effect to work smoothly, we need to make sure that
658
- * the size of the fade-out edge effect is the same as the
659
- * internal paddings of the scrollable area. Otherwise, content of a
660
- * scrollable area that does not have a padding will fade out before
661
- * any scrolling has been done.
662
- * This is why this mixin already adds paddings, which automatically
663
- * default to the size of the fade-out effect.
664
- * This size defaults to `1rem`, but to override the size use
665
- * `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
666
- * when `vertically` argument is set, and use
667
- * `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
668
- * when `horizontally` argument is set.
669
- * Of course you can also programmatically increase and decrease the
670
- * size of these variables for each edge, based on the amount of
671
- * scrolling that has been done by the user. In this case, make sure
672
- * to add a custom padding where the mixin is used, to override
673
- * the paddings that are automatically added by the mixin in the
674
- * compiled CSS code.
675
- */
676
- /**
677
- * This mixin will add an animated underline to the bottom of an `a` elements.
678
- * Note that you may need to add `all: unset;` –depending on your use case–
679
- * before using this mixin.
680
- */
681
- /**
682
- * This mixin creates a cross-browser font stack.
683
- * - `sans-serif` can be used for the UI of the components.
684
- * - `monospace` can be used for code.
685
- *
686
- * ⚠️ If we change the font stacks, we need to update
687
- * 1. the consumer documentation in `README.md`, and
688
- * 2. the CSS variables of `--kompendium-example-font-family`
689
- * in the `<style>` tag of `index.html`.
690
- */
691
- /**
692
- * This mixin is a hack, using old CSS syntax
693
- * to enable you to truncate a piece of text,
694
- * after a certain number of lines.
695
- */
696
- /**
697
- * This mixin will add a chessboard background pattern,
698
- * typically used to visualize transparency.
699
- */
700
- /**
701
- * Make a container resizable by the user.
702
- * This is used in the documentations and examples
703
- * of some components, to demonstrate how the component
704
- * behaves in a resizable container.
705
- */
706
- /**
707
- * The breakpoints below are used to create responsive designs
708
- * in Lime's products. Therefore, they are here to get distributed
709
- * to all components in other private repos, which rely on this `mixins`
710
- * file, to create consistent styles.
711
- *
712
- * :::important
713
- * In very rare cases you should used media queries!
714
- * Nowadays, there are many better ways of achieving responsive design
715
- * without media queries. For example, using CSS Grid, Flexbox, and their features.
716
- * :::
717
- */
718
- /**
719
- * Media query mixins for responsive design based on screen width.
720
- * Note that these mixins do not detect the device type!
721
- */
722
- /*
723
- * This file is imported into every component!
724
- *
725
- * Nothing in this file may output any CSS
726
- * without being explicitly called by outside code.
727
- */
728
92
  .picker-trigger[style="--background:lime-magenta;"]:after,
729
93
  .chosen-color-preview[style="--background:lime-magenta;"]:after {
730
94
  background-color: var(--lime-magenta);
@@ -762,149 +126,139 @@
762
126
  background-color: var(--lime-light-grey);
763
127
  }
764
128
 
765
- :host {
766
- position: relative;
767
- --popover-surface-width: 50rem;
129
+ :host(limel-color-picker-palette) {
130
+ --limel-color-palette-gap: 0.25rem;
131
+ --limel-color-palette-max-column-count: 25;
132
+ --limel-color-palette-min-width: 8rem;
133
+ box-sizing: border-box;
134
+ border-radius: 0.75rem;
135
+ display: flex;
136
+ flex-direction: column;
137
+ gap: 1rem;
138
+ padding: 0.75rem;
768
139
  }
769
140
 
770
- .color-picker {
771
- display: grid;
772
- gap: 0.25rem;
773
- grid-template-columns: auto 1fr;
141
+ *,
142
+ *:before,
143
+ :after {
144
+ box-sizing: border-box;
774
145
  }
775
146
 
776
- .picker-trigger {
777
- all: unset;
778
- border-radius: 0.5rem;
779
- transition: color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);
780
- cursor: pointer;
781
- color: var(--limel-theme-on-surface-color);
782
- background-color: var(--lime-elevated-surface-background-color);
783
- box-shadow: var(--button-shadow-normal);
784
- }
785
- .picker-trigger:hover, .picker-trigger:focus, .picker-trigger:focus-visible {
786
- will-change: color, background-color, box-shadow, transform;
787
- }
788
- .picker-trigger:hover, .picker-trigger:focus-visible {
789
- transform: translate3d(0, -0.04rem, 0);
790
- color: var(--limel-theme-on-surface-color);
791
- background-color: var(--lime-elevated-surface-background-color);
792
- box-shadow: var(--button-shadow-hovered);
793
- }
794
- .picker-trigger:active {
795
- --limel-clickable-transform-timing-function: cubic-bezier(
796
- 0.83,
797
- -0.15,
798
- 0.49,
799
- 1.16
800
- );
801
- transform: translate3d(0, 0.05rem, 0);
802
- box-shadow: var(--button-shadow-pressed);
803
- }
804
- .picker-trigger:hover, .picker-trigger:active {
805
- --limel-clickable-transition-speed: 0.2s;
806
- --limel-clickable-transform-speed: 0.16s;
807
- }
808
- .picker-trigger:focus {
809
- outline: none;
147
+ .color-picker-palette {
148
+ display: grid;
149
+ gap: var(--limel-color-palette-gap);
150
+ grid-template-columns: repeat(min(var(--color-picker-column-count), var(--limel-color-palette-max-column-count)), 1fr);
151
+ width: 100%;
152
+ max-width: 58rem;
153
+ min-width: var(--limel-color-palette-min-width);
810
154
  }
811
- .picker-trigger:focus-visible {
812
- outline: none;
813
- box-shadow: var(--shadow-depth-8-focused);
155
+
156
+ .chosen-color-name {
157
+ display: flex;
158
+ gap: 0.5rem;
814
159
  }
815
- .picker-trigger:after {
816
- box-shadow: 0 0 0 0.25rem rgb(var(--contrast-100)) inset;
160
+
161
+ limel-input-field {
162
+ flex-grow: 1;
163
+ width: min-content;
817
164
  }
818
165
 
819
- .chosen-color-preview,
820
- .picker-trigger {
821
- box-sizing: border-box;
822
- position: relative;
166
+ .chosen-color-preview {
167
+ flex-shrink: 0;
823
168
  isolation: isolate;
169
+ position: relative;
824
170
  width: 2.5rem;
825
171
  height: 2.5rem;
172
+ border: 1px solid rgba(var(--contrast-700), 0.65);
173
+ border-radius: 50%;
826
174
  }
827
- .chosen-color-preview:before, .chosen-color-preview:after,
828
- .picker-trigger:before,
829
- .picker-trigger:after {
175
+ .chosen-color-preview:before, .chosen-color-preview:after {
830
176
  content: "";
831
177
  position: absolute;
832
178
  inset: 0;
833
179
  border-radius: inherit;
834
180
  }
835
- .chosen-color-preview:before,
836
- .picker-trigger:before {
181
+ .chosen-color-preview:before {
837
182
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%208%208%27%20style%3D%27fill-rule%3Aevenodd%3B%27%3E%3Cpath%20fill%3D%27rgba(186%2C186%2C192%2C0.16)%27%20d%3D%27M0%200h4v4H0zM4%204h4v4H4z%27%2F%3E%3C%2Fsvg%3E");
838
183
  background-size: 0.5rem;
839
184
  z-index: 0;
840
185
  }
841
- .chosen-color-preview:after,
842
- .picker-trigger:after {
186
+ .chosen-color-preview:after {
843
187
  background: var(--background);
844
188
  z-index: 1;
845
189
  }
846
190
 
847
- :host([readonly]) .picker-trigger:hover, :host([readonly]) .picker-trigger:active {
848
- cursor: default;
849
- box-shadow: var(--button-shadow-normal);
850
- transform: none;
851
- }
852
-
853
- .chosen-color-input[readonly] {
854
- transform: translateX(calc( 2.5rem / 4 * -1 )) translateY(calc(2.5rem / 4));
855
- }
856
-
857
- :host {
858
- border-radius: 0.75rem;
859
- background-color: rgb(var(--kompendium-contrast-300));
860
- }
861
-
862
- .color-picker-palette {
863
- display: grid;
864
- gap: 0.25rem;
865
- grid-auto-flow: column;
866
- grid-template-columns: repeat(20, 1fr);
867
- grid-template-rows: repeat(4, 1fr) auto;
868
- margin: 1rem;
869
- }
870
-
871
- .chosen-color-name {
872
- box-sizing: border-box;
873
- padding: 1rem;
874
- display: grid;
875
- grid-template-columns: 1fr auto;
876
- gap: 0.5rem;
877
- }
878
-
879
- .chosen-color-preview {
880
- border: 1px solid rgba(var(--contrast-700), 0.65);
881
- border-radius: 50%;
882
- }
883
-
884
- .swatch:not(.hue) {
885
- border: none;
191
+ button.swatch {
192
+ all: unset;
193
+ position: relative;
194
+ display: flex;
195
+ justify-content: center;
196
+ align-items: center;
197
+ max-width: 3rem;
198
+ min-width: max(2rem, 100% / min(var(--color-picker-column-count), var(--limel-color-palette-max-column-count)) - (min(var(--color-picker-column-count), var(--limel-color-palette-max-column-count)) - 1) * var(--limel-color-palette-gap));
886
199
  aspect-ratio: 1;
887
- transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;
888
- cursor: pointer;
200
+ border-radius: 0.1875rem;
201
+ background-color: var(--limel-color-picker-swatch-color);
889
202
  }
890
- .swatch:not(.hue):focus {
203
+ button.swatch:focus {
891
204
  outline: none;
892
205
  }
893
- .swatch:not(.hue):focus-visible {
206
+ button.swatch:focus-visible {
894
207
  outline: none;
895
208
  box-shadow: var(--shadow-depth-8-focused);
896
209
  }
897
- .swatch:not(.hue):hover {
210
+ button.swatch:not([disabled]) {
211
+ transition: color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);
212
+ cursor: pointer;
213
+ color: var(--limel-theme-on-surface-color);
214
+ background-color: var(--limel-color-picker-swatch-color);
215
+ }
216
+ button.swatch:not([disabled]):hover, button.swatch:not([disabled]):focus, button.swatch:not([disabled]):focus-visible {
217
+ will-change: color, background-color, box-shadow, transform;
218
+ }
219
+ button.swatch:not([disabled]):hover, button.swatch:not([disabled]):focus-visible {
220
+ transform: translate3d(0, 0.01rem, 0);
221
+ color: var(--limel-theme-on-surface-color);
222
+ background-color: var(--limel-color-picker-swatch-color);
223
+ }
224
+ button.swatch:not([disabled]):hover {
898
225
  box-shadow: var(--button-shadow-hovered);
899
226
  }
900
- .swatch:not(.hue):active {
227
+ button.swatch:not([disabled]):active {
228
+ --limel-clickable-transform-timing-function: cubic-bezier(
229
+ 0.83,
230
+ -0.15,
231
+ 0.49,
232
+ 1.16
233
+ );
234
+ transform: translate3d(0, 0.05rem, 0);
901
235
  box-shadow: var(--button-shadow-pressed);
902
- transform: translate3d(0, 0.08rem, 0);
903
236
  }
904
- .swatch:not(.hue):focus-visible {
905
- box-shadow: var(--shadow-depth-8-focused), 0 0 0 0.25rem rgb(var(--contrast-100)) inset;
237
+ button.swatch:not([disabled]):hover, button.swatch:not([disabled]):active {
238
+ --limel-clickable-transition-speed: 0.2s;
239
+ --limel-clickable-transform-speed: 0.16s;
240
+ }
241
+ button.swatch:focus-visible {
242
+ box-shadow: var(--shadow-depth-8-focused), 0 0 0 0.125rem rgb(var(--contrast-100)) inset;
243
+ }
244
+ button.swatch[disabled] {
245
+ cursor: not-allowed;
246
+ box-shadow: 0 0 0 0.125rem rgb(var(--contrast-100), 0.6) inset;
247
+ }
248
+ button.swatch[disabled]:after {
249
+ content: "";
250
+ position: absolute;
251
+ inset: 0;
252
+ margin: auto;
253
+ width: 0.125rem;
254
+ height: 100%;
255
+ opacity: 0.6;
256
+ rotate: 45deg;
257
+ border-radius: 1rem;
258
+ background-color: rgb(var(--contrast-100));
906
259
  }
907
260
 
908
- .swatch--selected {
261
+ button.swatch--selected {
262
+ box-shadow: var(--button-shadow-inset);
909
263
  border-radius: 50%;
910
264
  }