elements-kit 0.4.0 → 0.4.1

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.
@@ -441,3 +441,107 @@
441
441
  box-shadow: inset 0 0 0 1px var(--gray-a6);
442
442
  background-color: var(--gray-a2);
443
443
  }
444
+
445
+ .x-button:where(:not([data-variant="ghost"])) :where(svg) {
446
+ opacity: .9;
447
+ }
448
+
449
+ .x-button:where([data-variant="ghost"]) {
450
+ padding: var(--button-ghost-padding-y) var(--button-ghost-padding-x);
451
+ --margin-top: 0px;
452
+ --margin-right: 0px;
453
+ --margin-bottom: 0px;
454
+ --margin-left: 0px;
455
+ --margin-top-override: calc(var(--margin-top) - var(--button-ghost-padding-y));
456
+ --margin-right-override: calc(var(--margin-right) - var(--button-ghost-padding-x));
457
+ --margin-bottom-override: calc(var(--margin-bottom) - var(--button-ghost-padding-y));
458
+ --margin-left-override: calc(var(--margin-left) - var(--button-ghost-padding-x));
459
+ }
460
+
461
+ :where(.x-button:where([data-variant="ghost"])) > * {
462
+ --margin-top-override: initial;
463
+ --margin-right-override: initial;
464
+ --margin-bottom-override: initial;
465
+ --margin-left-override: initial;
466
+ }
467
+
468
+ .x-button:where([data-variant="ghost"]) {
469
+ margin: var(--margin-top-override) var(--margin-right-override)
470
+ var(--margin-bottom-override) var(--margin-left-override);
471
+ }
472
+
473
+ .x-button:where([data-size="1"]) {
474
+ gap: var(--space-1);
475
+ font-size: var(--font-size-1);
476
+ line-height: var(--line-height-1);
477
+ letter-spacing: var(--letter-spacing-1);
478
+ }
479
+
480
+ .x-button:where([data-size="1"]):where(:not([data-variant="ghost"])) {
481
+ padding-left: var(--space-2);
482
+ padding-right: var(--space-2);
483
+ }
484
+
485
+ .x-button:where([data-size="1"]):where([data-variant="ghost"]) {
486
+ gap: var(--space-1);
487
+ --button-ghost-padding-x: var(--space-2);
488
+ --button-ghost-padding-y: var(--space-1);
489
+ }
490
+
491
+ .x-button:where([data-size="2"]) {
492
+ gap: var(--space-2);
493
+ font-size: var(--font-size-2);
494
+ line-height: var(--line-height-2);
495
+ letter-spacing: var(--letter-spacing-2);
496
+ }
497
+
498
+ .x-button:where([data-size="2"]):where(:not([data-variant="ghost"])) {
499
+ padding-left: var(--space-3);
500
+ padding-right: var(--space-3);
501
+ }
502
+
503
+ .x-button:where([data-size="2"]):where([data-variant="ghost"]) {
504
+ gap: var(--space-1);
505
+ --button-ghost-padding-x: var(--space-2);
506
+ --button-ghost-padding-y: var(--space-1);
507
+ }
508
+
509
+ .x-button:where([data-size="3"]) {
510
+ gap: var(--space-3);
511
+ font-size: var(--font-size-3);
512
+ line-height: var(--line-height-3);
513
+ letter-spacing: var(--letter-spacing-3);
514
+ }
515
+
516
+ .x-button:where([data-size="3"]):where(:not([data-variant="ghost"])) {
517
+ padding-left: var(--space-4);
518
+ padding-right: var(--space-4);
519
+ }
520
+
521
+ .x-button:where([data-size="3"]):where([data-variant="ghost"]) {
522
+ gap: var(--space-2);
523
+ --button-ghost-padding-x: var(--space-3);
524
+ --button-ghost-padding-y: calc(var(--space-1) * 1.5);
525
+ }
526
+
527
+ .x-button:where([data-size="4"]) {
528
+ gap: var(--space-3);
529
+ font-size: var(--font-size-4);
530
+ line-height: var(--line-height-4);
531
+ letter-spacing: var(--letter-spacing-4);
532
+ }
533
+
534
+ .x-button:where([data-size="4"]):where(:not([data-variant="ghost"])) {
535
+ padding-left: var(--space-5);
536
+ padding-right: var(--space-5);
537
+ }
538
+
539
+ .x-button:where([data-size="4"]):where([data-variant="ghost"]) {
540
+ gap: var(--space-2);
541
+ --button-ghost-padding-x: var(--space-4);
542
+ --button-ghost-padding-y: var(--space-2);
543
+ }
544
+
545
+ .x-button:where(:not([data-variant="ghost"])) {
546
+ font-weight: var(--font-weight-medium);
547
+ }
@@ -1,3 +1,7 @@
1
+ :where(:root) {
2
+ --scaling: 1;
3
+ }
4
+
1
5
  :where([data-scaling="90%"]) {
2
6
  --scaling: .9;
3
7
  }
@@ -0,0 +1,197 @@
1
+ .unset:where(body, blockquote, dl, dd, figure, p) {
2
+ margin: 0;
3
+ }
4
+
5
+ .unset:where(address, b, cite, code, dfn, em, i, kbd, q, samp, small, strong, var) {
6
+ font: unset;
7
+ }
8
+
9
+ .unset:where(h1, h2, h3, h4, h5, h6) {
10
+ font: unset;
11
+ margin: 0;
12
+ }
13
+
14
+ .unset:where(a) {
15
+ all: unset;
16
+ -webkit-tap-highlight-color: transparent;
17
+ }
18
+
19
+ .unset:where(button, select, [type="button"], [type="image"], [type="reset"], [type="submit"], [type="checkbox"], [type="color"], [type="radio"], [type="range"]) {
20
+ all: unset;
21
+ text-indent: initial;
22
+ -webkit-tap-highlight-color: transparent;
23
+ font-style: normal;
24
+ font-weight: normal;
25
+ display: inline-block;
26
+ }
27
+
28
+ .unset:where(label) {
29
+ -webkit-tap-highlight-color: transparent;
30
+ }
31
+
32
+ .unset:where(select) {
33
+ text-align: start;
34
+ font-style: normal;
35
+ font-weight: normal;
36
+ }
37
+
38
+ .unset:where(textarea, input:not([type="button"], [type="image"], [type="reset"], [type="submit"], [type="checkbox"], [type="color"], [type="radio"], [type="range"])) {
39
+ all: unset;
40
+ text-align: start;
41
+ width: -webkit-fill-available;
42
+ width: -moz-available;
43
+ width: stretch;
44
+ text-indent: initial;
45
+ -webkit-tap-highlight-color: transparent;
46
+ cursor: text;
47
+ white-space: pre-wrap;
48
+ font-style: normal;
49
+ font-weight: normal;
50
+ display: block;
51
+ }
52
+
53
+ .unset:where(:focus) {
54
+ outline: none;
55
+ }
56
+
57
+ .unset::placeholder {
58
+ color: unset;
59
+ opacity: unset;
60
+ -webkit-user-select: none;
61
+ user-select: none;
62
+ }
63
+
64
+ .unset:where(table) {
65
+ all: unset;
66
+ text-indent: initial;
67
+ display: table;
68
+ }
69
+
70
+ .unset:where(caption) {
71
+ text-align: inherit;
72
+ }
73
+
74
+ .unset:where(td) {
75
+ padding: 0;
76
+ }
77
+
78
+ .unset:where(th) {
79
+ font-weight: unset;
80
+ text-align: inherit;
81
+ padding: 0;
82
+ }
83
+
84
+ .unset:where(abbr, acronym) {
85
+ text-decoration: none;
86
+ }
87
+
88
+ .unset:where(canvas, object, picture, summary) {
89
+ display: block;
90
+ }
91
+
92
+ .unset:where(del, s) {
93
+ -webkit-text-decoration: unset;
94
+ text-decoration: unset;
95
+ }
96
+
97
+ .unset:where(fieldset, hr) {
98
+ all: unset;
99
+ display: block;
100
+ }
101
+
102
+ .unset:where(legend) {
103
+ cursor: default;
104
+ border: none;
105
+ padding: 0;
106
+ }
107
+
108
+ .unset:where(li) {
109
+ text-align: unset;
110
+ display: block;
111
+ }
112
+
113
+ .unset:where(ol, ul) {
114
+ margin: 0;
115
+ padding: 0;
116
+ list-style: none;
117
+ }
118
+
119
+ .unset:where(iframe) {
120
+ width: -webkit-fill-available;
121
+ width: -moz-available;
122
+ border: none;
123
+ width: stretch;
124
+ display: block;
125
+ }
126
+
127
+ .unset:where(ins, u) {
128
+ text-decoration: none;
129
+ }
130
+
131
+ .unset:where(img) {
132
+ max-width: 100%;
133
+ display: block;
134
+ }
135
+
136
+ .unset:where(svg) {
137
+ flex-shrink: 0;
138
+ max-width: 100%;
139
+ display: block;
140
+ }
141
+
142
+ .unset:where(mark) {
143
+ all: unset;
144
+ }
145
+
146
+ .unset:where(pre) {
147
+ font: unset;
148
+ margin: unset;
149
+ }
150
+
151
+ .unset:where(q):before, .unset:where(q):after {
152
+ content: "";
153
+ }
154
+
155
+ .unset:where(sub, sup) {
156
+ font: unset;
157
+ vertical-align: unset;
158
+ }
159
+
160
+ .unset:where(details) ::marker {
161
+ content: none;
162
+ }
163
+
164
+ .unset:where(summary)::marker {
165
+ content: none;
166
+ }
167
+
168
+ .unset:where(video) {
169
+ width: -webkit-fill-available;
170
+ width: -moz-available;
171
+ width: stretch;
172
+ display: block;
173
+ }
174
+
175
+ .unset:where(:any-link) {
176
+ cursor: var(--cursor-link);
177
+ }
178
+
179
+ .unset:where(button) {
180
+ cursor: var(--cursor-button);
181
+ }
182
+
183
+ .unset:where(:disabled, [data-disabled]) {
184
+ cursor: var(--cursor-disabled);
185
+ }
186
+
187
+ .unset:where(input[type="checkbox"]) {
188
+ cursor: var(--cursor-checkbox);
189
+ }
190
+
191
+ .unset:where(input[type="radio"]) {
192
+ cursor: var(--cursor-radio);
193
+ }
194
+
195
+ .unset, .unset:before, .unset:after {
196
+ box-sizing: border-box;
197
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "elements-kit",
3
3
  "type": "module",
4
- "version": "0.4.0",
4
+ "version": "0.4.1",
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",