@cck-ui/core 0.34.0 → 0.35.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 (29) hide show
  1. package/cjs/components/color-swatch/color-swatch.cjs +439 -0
  2. package/cjs/components/color-swatch/color-swatch.cjs.map +1 -0
  3. package/cjs/components/color-swatch/color-swatch.module.cjs +13 -0
  4. package/cjs/components/color-swatch/color-swatch.module.cjs.map +1 -0
  5. package/cjs/components/color-swatch/color-swatch.utils.cjs +12 -0
  6. package/cjs/components/color-swatch/color-swatch.utils.cjs.map +1 -0
  7. package/cjs/components/color-swatch/index.cjs +14 -0
  8. package/cjs/components/color-swatch/index.cjs.map +1 -0
  9. package/cjs/index.cjs +72 -69
  10. package/cjs/index.cjs.map +1 -1
  11. package/esm/components/color-swatch/color-swatch.mjs +439 -0
  12. package/esm/components/color-swatch/color-swatch.mjs.map +1 -0
  13. package/esm/components/color-swatch/color-swatch.module.mjs +13 -0
  14. package/esm/components/color-swatch/color-swatch.module.mjs.map +1 -0
  15. package/esm/components/color-swatch/color-swatch.utils.mjs +13 -0
  16. package/esm/components/color-swatch/color-swatch.utils.mjs.map +1 -0
  17. package/esm/components/color-swatch/index.mjs +11 -0
  18. package/esm/components/color-swatch/index.mjs.map +1 -0
  19. package/esm/index.mjs +3 -1
  20. package/esm/index.mjs.map +1 -1
  21. package/lib/components/color-swatch/color-swatch.types.d.ts +29 -0
  22. package/lib/components/color-swatch/color-swatch.utils.d.ts +7 -0
  23. package/lib/components/color-swatch/index.d.ts +6 -0
  24. package/lib/components/index.d.ts +1 -0
  25. package/package.json +1 -1
  26. package/styles/color-swatch.css +71 -0
  27. package/styles/color-swatch.layer.css +72 -0
  28. package/styles.css +187 -115
  29. package/styles.layer.css +187 -115
@@ -0,0 +1,71 @@
1
+ .m_c2451869 {
2
+ --cs-size: calc(1.75rem * var(--c-scale));
3
+ --cs-radius: calc(62.5rem * var(--c-scale));
4
+
5
+ -webkit-tap-highlight-color: transparent;
6
+ border: none;
7
+ appearance: none;
8
+ display: block;
9
+ line-height: 1;
10
+ position: relative;
11
+ width: var(--cs-size);
12
+ height: var(--cs-size);
13
+ min-width: var(--cs-size);
14
+ min-height: var(--cs-size);
15
+ border-radius: var(--cs-radius);
16
+ color: inherit;
17
+ text-decoration: none;
18
+ }
19
+
20
+ [data-c-color-scheme='light'] .m_c2451869 {
21
+ --alpha-overlay-color: var(--c-color-gray-3);
22
+ --alpha-overlay-bg: var(--c-color-white);
23
+ }
24
+
25
+ [data-c-color-scheme='dark'] .m_c2451869 {
26
+ --alpha-overlay-color: var(--c-color-dark-4);
27
+ --alpha-overlay-bg: var(--c-color-dark-7);
28
+ }
29
+
30
+ .m_169647f4 {
31
+ position: absolute;
32
+ inset: 0;
33
+ border-radius: var(--cs-radius);
34
+ }
35
+
36
+ .m_1528cf69 {
37
+ position: absolute;
38
+ inset: 0;
39
+ border-radius: var(--cs-radius);
40
+ z-index: 1;
41
+ box-shadow:
42
+ rgba(0, 0, 0, 0.1) 0 0 0 calc(0.0625rem * var(--c-scale)) inset,
43
+ rgb(0, 0, 0, 0.15) 0 0 calc(0.25rem * var(--c-scale)) inset;
44
+ }
45
+
46
+ .m_25d7a599 {
47
+ position: absolute;
48
+ inset: 0;
49
+ border-radius: var(--cs-radius);
50
+ background-size: calc(0.5rem * var(--c-scale)) calc(0.5rem * var(--c-scale));
51
+ background-position:
52
+ 0 0,
53
+ 0 calc(0.25rem * var(--c-scale)),
54
+ calc(0.25rem * var(--c-scale)) calc(-0.25rem * var(--c-scale)),
55
+ calc(-0.25rem * var(--c-scale)) 0;
56
+ background-image:
57
+ linear-gradient(45deg, var(--alpha-overlay-color) 25%, transparent 25%),
58
+ linear-gradient(-45deg, var(--alpha-overlay-color) 25%, transparent 25%),
59
+ linear-gradient(45deg, transparent 75%, var(--alpha-overlay-color) 75%),
60
+ linear-gradient(-45deg, var(--alpha-overlay-bg) 75%, var(--alpha-overlay-color) 75%);
61
+ }
62
+
63
+ .m_5065cf6a {
64
+ position: absolute;
65
+ inset: 0;
66
+ border-radius: var(--cs-radius);
67
+ z-index: 2;
68
+ display: flex;
69
+ align-items: center;
70
+ justify-content: center;
71
+ }
@@ -0,0 +1,72 @@
1
+ @layer cck {.m_c2451869 {
2
+ --cs-size: calc(1.75rem * var(--c-scale));
3
+ --cs-radius: calc(62.5rem * var(--c-scale));
4
+
5
+ -webkit-tap-highlight-color: transparent;
6
+ border: none;
7
+ appearance: none;
8
+ display: block;
9
+ line-height: 1;
10
+ position: relative;
11
+ width: var(--cs-size);
12
+ height: var(--cs-size);
13
+ min-width: var(--cs-size);
14
+ min-height: var(--cs-size);
15
+ border-radius: var(--cs-radius);
16
+ color: inherit;
17
+ text-decoration: none;
18
+ }
19
+
20
+ [data-c-color-scheme='light'] .m_c2451869 {
21
+ --alpha-overlay-color: var(--c-color-gray-3);
22
+ --alpha-overlay-bg: var(--c-color-white);
23
+ }
24
+
25
+ [data-c-color-scheme='dark'] .m_c2451869 {
26
+ --alpha-overlay-color: var(--c-color-dark-4);
27
+ --alpha-overlay-bg: var(--c-color-dark-7);
28
+ }
29
+
30
+ .m_169647f4 {
31
+ position: absolute;
32
+ inset: 0;
33
+ border-radius: var(--cs-radius);
34
+ }
35
+
36
+ .m_1528cf69 {
37
+ position: absolute;
38
+ inset: 0;
39
+ border-radius: var(--cs-radius);
40
+ z-index: 1;
41
+ box-shadow:
42
+ rgba(0, 0, 0, 0.1) 0 0 0 calc(0.0625rem * var(--c-scale)) inset,
43
+ rgb(0, 0, 0, 0.15) 0 0 calc(0.25rem * var(--c-scale)) inset;
44
+ }
45
+
46
+ .m_25d7a599 {
47
+ position: absolute;
48
+ inset: 0;
49
+ border-radius: var(--cs-radius);
50
+ background-size: calc(0.5rem * var(--c-scale)) calc(0.5rem * var(--c-scale));
51
+ background-position:
52
+ 0 0,
53
+ 0 calc(0.25rem * var(--c-scale)),
54
+ calc(0.25rem * var(--c-scale)) calc(-0.25rem * var(--c-scale)),
55
+ calc(-0.25rem * var(--c-scale)) 0;
56
+ background-image:
57
+ linear-gradient(45deg, var(--alpha-overlay-color) 25%, transparent 25%),
58
+ linear-gradient(-45deg, var(--alpha-overlay-color) 25%, transparent 25%),
59
+ linear-gradient(45deg, transparent 75%, var(--alpha-overlay-color) 75%),
60
+ linear-gradient(-45deg, var(--alpha-overlay-bg) 75%, var(--alpha-overlay-color) 75%);
61
+ }
62
+
63
+ .m_5065cf6a {
64
+ position: absolute;
65
+ inset: 0;
66
+ border-radius: var(--cs-radius);
67
+ z-index: 2;
68
+ display: flex;
69
+ align-items: center;
70
+ justify-content: center;
71
+ }
72
+ }
package/styles.css CHANGED
@@ -714,6 +714,121 @@ fieldset:disabled .c-active:active {
714
714
  display: -webkit-box;
715
715
  }
716
716
 
717
+ .m_a4a0a883 {
718
+ --paper-radius: var(--c-radius-default);
719
+
720
+ outline: 0;
721
+ -webkit-tap-heighlight-color: transparent;
722
+ display: block;
723
+ touch-action: manipulation;
724
+ text-decoration: none;
725
+ border-radius: var(--paper-radius);
726
+ box-shadow: var(--paper-shadow);
727
+ background-color: var(--c-color-body);
728
+ }
729
+
730
+ [data-c-color-scheme='light'] .m_a4a0a883 {
731
+ --paper-border-color: var(--c-color-gray-3);
732
+ }
733
+
734
+ [data-c-color-scheme='dark'] .m_a4a0a883 {
735
+ --paper-border-color: var(--c-color-dark-4);
736
+ }
737
+
738
+ .m_a4a0a883:where([data-with-border]) {
739
+ border: calc(0.0625rem * var(--c-scale)) solid var(--paper-border-color);
740
+ }
741
+
742
+ .m_6ea3917f {
743
+ --card-padding: var(--c-spacing-md);
744
+
745
+ position: relative;
746
+ overflow: hidden;
747
+ display: flex;
748
+ padding: var(--card-padding);
749
+ color: var(--c-color-text);
750
+ }
751
+
752
+ .m_6ea3917f:where([data-orientation='horizontal']) {
753
+ flex-direction: row;
754
+ }
755
+
756
+ .m_6ea3917f:where([data-orientation='vertical']) {
757
+ flex-direction: column;
758
+ }
759
+
760
+ :where([data-c-color-scheme='light']) .m_6ea3917f {
761
+ background-color: var(--c-color-white);
762
+ }
763
+
764
+ :where([data-c-color-scheme='dark']) .m_6ea3917f {
765
+ background-color: var(--c-color-dark-6);
766
+ }
767
+
768
+ .m_4fcecd28 {
769
+ display: block;
770
+ margin-inline: calc(var(--card-padding) * -1);
771
+ }
772
+
773
+ :where([data-c-color-scheme='light']) .m_4fcecd28 {
774
+ --border-color: var(--c-color-gray-3);
775
+ }
776
+
777
+ :where([data-c-color-scheme='dark']) .m_4fcecd28 {
778
+ --border-color: var(--c-color-dark-4);
779
+ }
780
+
781
+ .m_4fcecd28:where([data-orientation='vertical']):first-child {
782
+ margin-top: calc(var(--card-padding) * -1);
783
+ border-top: none !important;
784
+ }
785
+
786
+ .m_4fcecd28:where([data-orientation='vertical']):last-child {
787
+ margin-bottom: calc(var(--card-padding) * -1);
788
+ border-bottom: none !important;
789
+ }
790
+
791
+ .m_4fcecd28:where([data-orientation='vertical'])[data-inherit-padding] {
792
+ padding-inline: var(--card-padding);
793
+ }
794
+
795
+ .m_4fcecd28:where([data-orientation='vertical'])[data-with-border] {
796
+ border-top: 1px solid var(--border-color);
797
+ border-bottom: 1px solid var(--border-color);
798
+ }
799
+
800
+ .m_4fcecd28:where([data-orientation='vertical']) + .m_4fcecd28:where([data-orientation='vertical']) {
801
+ border-top: none !important;
802
+ }
803
+
804
+ .m_4fcecd28:where([data-orientation='horizontal']) {
805
+ margin-block: calc(var(--card-padding) * -1);
806
+ margin-inline: 0;
807
+ }
808
+
809
+ .m_4fcecd28:where([data-orientation='horizontal']):first-child {
810
+ margin-inline-start: calc(var(--card-padding) * -1);
811
+ border-inline-start: none !important;
812
+ }
813
+
814
+ .m_4fcecd28:where([data-orientation='horizontal']):last-child {
815
+ margin-inline-end: calc(var(--card-padding) * -1);
816
+ border-inline-end: none !important;
817
+ }
818
+
819
+ .m_4fcecd28:where([data-orientation='horizontal'])[data-inherit-padding] {
820
+ padding-block: var(--card-padding);
821
+ }
822
+
823
+ .m_4fcecd28:where([data-orientation='horizontal'])[data-with-border] {
824
+ border-inline-start: 1px solid var(--border-color);
825
+ border-inline-end: 1px solid var(--border-color);
826
+ }
827
+
828
+ .m_4fcecd28:where([data-orientation='horizontal']) + .m_4fcecd28:where([data-orientation='horizontal']) {
829
+ border-inline-start: none !important;
830
+ }
831
+
717
832
  .m_537a2afc {
718
833
  background-color: transparent;
719
834
  cursor: pointer;
@@ -1587,96 +1702,6 @@ fieldset:disabled .c-active:active {
1587
1702
  transform: translateY(calc(var(--burger-size) / -3)) rotate(-45deg);
1588
1703
  }
1589
1704
 
1590
- .m_6ea3917f {
1591
- --card-padding: var(--c-spacing-md);
1592
-
1593
- position: relative;
1594
- overflow: hidden;
1595
- display: flex;
1596
- padding: var(--card-padding);
1597
- color: var(--c-color-text);
1598
- }
1599
-
1600
- .m_6ea3917f:where([data-orientation='horizontal']) {
1601
- flex-direction: row;
1602
- }
1603
-
1604
- .m_6ea3917f:where([data-orientation='vertical']) {
1605
- flex-direction: column;
1606
- }
1607
-
1608
- :where([data-c-color-scheme='light']) .m_6ea3917f {
1609
- background-color: var(--c-color-white);
1610
- }
1611
-
1612
- :where([data-c-color-scheme='dark']) .m_6ea3917f {
1613
- background-color: var(--c-color-dark-6);
1614
- }
1615
-
1616
- .m_4fcecd28 {
1617
- display: block;
1618
- margin-inline: calc(var(--card-padding) * -1);
1619
- }
1620
-
1621
- :where([data-c-color-scheme='light']) .m_4fcecd28 {
1622
- --border-color: var(--c-color-gray-3);
1623
- }
1624
-
1625
- :where([data-c-color-scheme='dark']) .m_4fcecd28 {
1626
- --border-color: var(--c-color-dark-4);
1627
- }
1628
-
1629
- .m_4fcecd28:where([data-orientation='vertical']):first-child {
1630
- margin-top: calc(var(--card-padding) * -1);
1631
- border-top: none !important;
1632
- }
1633
-
1634
- .m_4fcecd28:where([data-orientation='vertical']):last-child {
1635
- margin-bottom: calc(var(--card-padding) * -1);
1636
- border-bottom: none !important;
1637
- }
1638
-
1639
- .m_4fcecd28:where([data-orientation='vertical'])[data-inherit-padding] {
1640
- padding-inline: var(--card-padding);
1641
- }
1642
-
1643
- .m_4fcecd28:where([data-orientation='vertical'])[data-with-border] {
1644
- border-top: 1px solid var(--border-color);
1645
- border-bottom: 1px solid var(--border-color);
1646
- }
1647
-
1648
- .m_4fcecd28:where([data-orientation='vertical']) + .m_4fcecd28:where([data-orientation='vertical']) {
1649
- border-top: none !important;
1650
- }
1651
-
1652
- .m_4fcecd28:where([data-orientation='horizontal']) {
1653
- margin-block: calc(var(--card-padding) * -1);
1654
- margin-inline: 0;
1655
- }
1656
-
1657
- .m_4fcecd28:where([data-orientation='horizontal']):first-child {
1658
- margin-inline-start: calc(var(--card-padding) * -1);
1659
- border-inline-start: none !important;
1660
- }
1661
-
1662
- .m_4fcecd28:where([data-orientation='horizontal']):last-child {
1663
- margin-inline-end: calc(var(--card-padding) * -1);
1664
- border-inline-end: none !important;
1665
- }
1666
-
1667
- .m_4fcecd28:where([data-orientation='horizontal'])[data-inherit-padding] {
1668
- padding-block: var(--card-padding);
1669
- }
1670
-
1671
- .m_4fcecd28:where([data-orientation='horizontal'])[data-with-border] {
1672
- border-inline-start: 1px solid var(--border-color);
1673
- border-inline-end: 1px solid var(--border-color);
1674
- }
1675
-
1676
- .m_4fcecd28:where([data-orientation='horizontal']) + .m_4fcecd28:where([data-orientation='horizontal']) {
1677
- border-inline-start: none !important;
1678
- }
1679
-
1680
1705
  .m_e0e8435a {
1681
1706
  display: flex;
1682
1707
  align-items: center;
@@ -1746,6 +1771,78 @@ fieldset:disabled .c-active:active {
1746
1771
  }
1747
1772
  }
1748
1773
 
1774
+ .m_c2451869 {
1775
+ --cs-size: calc(1.75rem * var(--c-scale));
1776
+ --cs-radius: calc(62.5rem * var(--c-scale));
1777
+
1778
+ -webkit-tap-highlight-color: transparent;
1779
+ border: none;
1780
+ appearance: none;
1781
+ display: block;
1782
+ line-height: 1;
1783
+ position: relative;
1784
+ width: var(--cs-size);
1785
+ height: var(--cs-size);
1786
+ min-width: var(--cs-size);
1787
+ min-height: var(--cs-size);
1788
+ border-radius: var(--cs-radius);
1789
+ color: inherit;
1790
+ text-decoration: none;
1791
+ }
1792
+
1793
+ [data-c-color-scheme='light'] .m_c2451869 {
1794
+ --alpha-overlay-color: var(--c-color-gray-3);
1795
+ --alpha-overlay-bg: var(--c-color-white);
1796
+ }
1797
+
1798
+ [data-c-color-scheme='dark'] .m_c2451869 {
1799
+ --alpha-overlay-color: var(--c-color-dark-4);
1800
+ --alpha-overlay-bg: var(--c-color-dark-7);
1801
+ }
1802
+
1803
+ .m_169647f4 {
1804
+ position: absolute;
1805
+ inset: 0;
1806
+ border-radius: var(--cs-radius);
1807
+ }
1808
+
1809
+ .m_1528cf69 {
1810
+ position: absolute;
1811
+ inset: 0;
1812
+ border-radius: var(--cs-radius);
1813
+ z-index: 1;
1814
+ box-shadow:
1815
+ rgba(0, 0, 0, 0.1) 0 0 0 calc(0.0625rem * var(--c-scale)) inset,
1816
+ rgb(0, 0, 0, 0.15) 0 0 calc(0.25rem * var(--c-scale)) inset;
1817
+ }
1818
+
1819
+ .m_25d7a599 {
1820
+ position: absolute;
1821
+ inset: 0;
1822
+ border-radius: var(--cs-radius);
1823
+ background-size: calc(0.5rem * var(--c-scale)) calc(0.5rem * var(--c-scale));
1824
+ background-position:
1825
+ 0 0,
1826
+ 0 calc(0.25rem * var(--c-scale)),
1827
+ calc(0.25rem * var(--c-scale)) calc(-0.25rem * var(--c-scale)),
1828
+ calc(-0.25rem * var(--c-scale)) 0;
1829
+ background-image:
1830
+ linear-gradient(45deg, var(--alpha-overlay-color) 25%, transparent 25%),
1831
+ linear-gradient(-45deg, var(--alpha-overlay-color) 25%, transparent 25%),
1832
+ linear-gradient(45deg, transparent 75%, var(--alpha-overlay-color) 75%),
1833
+ linear-gradient(-45deg, var(--alpha-overlay-bg) 75%, var(--alpha-overlay-color) 75%);
1834
+ }
1835
+
1836
+ .m_5065cf6a {
1837
+ position: absolute;
1838
+ inset: 0;
1839
+ border-radius: var(--cs-radius);
1840
+ z-index: 2;
1841
+ display: flex;
1842
+ align-items: center;
1843
+ justify-content: center;
1844
+ }
1845
+
1749
1846
  .m_b03efeae {
1750
1847
  --container-size-xs: calc(33.75rem * var(--c-scale));
1751
1848
  --container-size-sm: calc(45rem * var(--c-scale));
@@ -2147,31 +2244,6 @@ fieldset:disabled .c-active:active {
2147
2244
  animation: m_1309882b 1.2s linear infinite;
2148
2245
  }
2149
2246
 
2150
- .m_a4a0a883 {
2151
- --paper-radius: var(--c-radius-default);
2152
-
2153
- outline: 0;
2154
- -webkit-tap-heighlight-color: transparent;
2155
- display: block;
2156
- touch-action: manipulation;
2157
- text-decoration: none;
2158
- border-radius: var(--paper-radius);
2159
- box-shadow: var(--paper-shadow);
2160
- background-color: var(--c-color-body);
2161
- }
2162
-
2163
- [data-c-color-scheme='light'] .m_a4a0a883 {
2164
- --paper-border-color: var(--c-color-gray-3);
2165
- }
2166
-
2167
- [data-c-color-scheme='dark'] .m_a4a0a883 {
2168
- --paper-border-color: var(--c-color-dark-4);
2169
- }
2170
-
2171
- .m_a4a0a883:where([data-with-border]) {
2172
- border: calc(0.0625rem * var(--c-scale)) solid var(--paper-border-color);
2173
- }
2174
-
2175
2247
  .m_6f2f9f44 {
2176
2248
  --scp-filled-segment-color: var(--c-primary-color-filled);
2177
2249
  --scp-transition-duration: 0ms;