elements-kit 0.12.1 → 0.14.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.
@@ -0,0 +1,116 @@
1
+ .x-toggle {
2
+ justify-content: center;
3
+ align-items: center;
4
+ gap: var(--space-2);
5
+ vertical-align: top;
6
+ height: var(--toggle-height);
7
+ padding: 0 var(--toggle-padding-inline);
8
+ border-radius: max(var(--toggle-radius), var(--radius-pill));
9
+ font-family: var(--default-font-family);
10
+ font-size: var(--toggle-font-size);
11
+ text-align: center;
12
+ -webkit-user-select: none;
13
+ user-select: none;
14
+ cursor: var(--cursor-button);
15
+ flex-shrink: 0;
16
+ font-weight: 500;
17
+ line-height: 1;
18
+ transition: background-color .12s ease-out, box-shadow .12s ease-out, color .12s ease-out;
19
+ display: inline-flex;
20
+ }
21
+
22
+ .x-toggle > input {
23
+ opacity: 0;
24
+ pointer-events: none;
25
+ width: 0;
26
+ height: 0;
27
+ position: absolute;
28
+ }
29
+
30
+ .x-toggle:where(:focus-within) {
31
+ outline: 2px solid var(--focus-8);
32
+ outline-offset: 1px;
33
+ }
34
+
35
+ .x-toggle:where(:has(input:disabled)) {
36
+ opacity: .6;
37
+ pointer-events: none;
38
+ cursor: var(--cursor-disabled);
39
+ }
40
+
41
+ .x-toggle:where([data-size="1"]) {
42
+ --toggle-height: var(--space-5);
43
+ --toggle-padding-inline: var(--space-2);
44
+ --toggle-radius: var(--radius-1);
45
+ --toggle-font-size: var(--font-size-1);
46
+ }
47
+
48
+ .x-toggle:where(:not([data-size]), [data-size="2"]) {
49
+ --toggle-height: var(--space-6);
50
+ --toggle-padding-inline: var(--space-3);
51
+ --toggle-radius: var(--radius-2);
52
+ --toggle-font-size: var(--font-size-2);
53
+ }
54
+
55
+ .x-toggle:where([data-size="3"]) {
56
+ --toggle-height: var(--space-7);
57
+ --toggle-padding-inline: var(--space-4);
58
+ --toggle-radius: var(--radius-3);
59
+ --toggle-font-size: var(--font-size-3);
60
+ }
61
+
62
+ .x-toggle:where([data-icon]) {
63
+ aspect-ratio: 1;
64
+ min-width: 0;
65
+ padding-inline: 0;
66
+ }
67
+
68
+ .x-toggle:where(:not([data-variant]), [data-variant="surface"]) {
69
+ box-shadow: inset 0 0 0 1px var(--base-color-a5);
70
+ color: var(--base-color-a11);
71
+ background-color: #0000;
72
+ font-weight: 500;
73
+ }
74
+
75
+ @media (hover: hover) {
76
+ .x-toggle:where(:not([data-variant]), [data-variant="surface"]):where(:hover) {
77
+ background-color: var(--base-color-a2);
78
+ }
79
+ }
80
+
81
+ .x-toggle:where(:not([data-variant]), [data-variant="surface"]):where(:has(input:checked)) {
82
+ background-color: var(--color-a4);
83
+ box-shadow: inset 0 0 0 1px var(--color-a8);
84
+ color: var(--color-a12, var(--color-12));
85
+ font-weight: 600;
86
+ }
87
+
88
+ @media (hover: hover) {
89
+ .x-toggle:where(:not([data-variant]), [data-variant="surface"]):where(:has(input:checked):hover) {
90
+ background-color: var(--color-a5);
91
+ }
92
+ }
93
+
94
+ .x-toggle:where([data-variant="soft"]) {
95
+ background-color: var(--base-color-a3);
96
+ color: var(--base-color-a11);
97
+ font-weight: 500;
98
+ }
99
+
100
+ @media (hover: hover) {
101
+ .x-toggle:where([data-variant="soft"]):where(:hover) {
102
+ background-color: var(--base-color-a4);
103
+ }
104
+ }
105
+
106
+ .x-toggle:where([data-variant="soft"]):where(:has(input:checked)) {
107
+ background-color: var(--color-a4);
108
+ color: var(--color-a12, var(--color-12));
109
+ font-weight: 600;
110
+ }
111
+
112
+ @media (hover: hover) {
113
+ .x-toggle:where([data-variant="soft"]):where(:has(input:checked):hover) {
114
+ background-color: var(--color-a6);
115
+ }
116
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "elements-kit",
3
3
  "type": "module",
4
- "version": "0.12.1",
4
+ "version": "0.14.0",
5
5
  "description": "A lightweight reactive UI library that transforms native HTMLElements into reactive components with signals. Ideal for framework-agnostic applications and web components.",
6
6
  "keywords": [
7
7
  "webcomponents",