elements-kit 0.11.0 → 0.12.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,62 @@
1
+ .x-arrow {
2
+ --arrow-direction: 1;
3
+ vertical-align: -.125em;
4
+ width: 1em;
5
+ height: 1em;
6
+ color: inherit;
7
+ transform: scaleX(var(--arrow-direction)) translateX(0);
8
+ flex-shrink: 0;
9
+ transition: transform .2s;
10
+ display: inline-block;
11
+ position: relative;
12
+ }
13
+
14
+ [dir="rtl"] .x-arrow, .x-arrow[dir="rtl"] {
15
+ --arrow-direction: -1;
16
+ }
17
+
18
+ .x-arrow:before {
19
+ content: "";
20
+ background-color: currentColor;
21
+ position: absolute;
22
+ inset: 0;
23
+ -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z'/></svg>");
24
+ mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='black' d='M7.28033 3.21967C6.98744 2.92678 6.51256 2.92678 6.21967 3.21967C5.92678 3.51256 5.92678 3.98744 6.21967 4.28033L7.28033 3.21967ZM11 8L11.5303 8.53033C11.8232 8.23744 11.8232 7.76256 11.5303 7.46967L11 8ZM6.21967 11.7197C5.92678 12.0126 5.92678 12.4874 6.21967 12.7803C6.51256 13.0732 6.98744 13.0732 7.28033 12.7803L6.21967 11.7197ZM6.21967 4.28033L10.4697 8.53033L11.5303 7.46967L7.28033 3.21967L6.21967 4.28033ZM10.4697 7.46967L6.21967 11.7197L7.28033 12.7803L11.5303 8.53033L10.4697 7.46967Z'/></svg>");
25
+ -webkit-mask-position: center;
26
+ mask-position: center;
27
+ -webkit-mask-size: 100% 100%;
28
+ mask-size: 100% 100%;
29
+ -webkit-mask-repeat: no-repeat;
30
+ mask-repeat: no-repeat;
31
+ }
32
+
33
+ .x-arrow:after {
34
+ content: "";
35
+ clip-path: inset(0 0 0 100%);
36
+ background-color: currentColor;
37
+ transition: clip-path .2s;
38
+ position: absolute;
39
+ inset: 0;
40
+ -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' d='M1.75 8H11'/></svg>");
41
+ mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' d='M1.75 8H11'/></svg>");
42
+ -webkit-mask-position: center;
43
+ mask-position: center;
44
+ -webkit-mask-size: 100% 100%;
45
+ mask-size: 100% 100%;
46
+ -webkit-mask-repeat: no-repeat;
47
+ mask-repeat: no-repeat;
48
+ }
49
+
50
+ :where(:hover) > .x-arrow, :where(:focus-visible) > .x-arrow {
51
+ transform: scaleX(var(--arrow-direction)) translateX(.25em);
52
+ }
53
+
54
+ :where(:hover) > .x-arrow:after, :where(:focus-visible) > .x-arrow:after {
55
+ clip-path: inset(0);
56
+ }
57
+
58
+ @media (prefers-reduced-motion: reduce) {
59
+ .x-arrow, .x-arrow:after {
60
+ transition: none;
61
+ }
62
+ }
@@ -128,11 +128,11 @@
128
128
  .x-text-input:where(:has( > input)) {
129
129
  box-sizing: border-box;
130
130
  height: var(--text-input-height);
131
- padding: var(--text-input-border-width);
132
131
  border-radius: var(--text-input-border-radius);
133
132
  cursor: text;
134
133
  flex-direction: row;
135
134
  align-items: stretch;
135
+ padding: 0;
136
136
  display: flex;
137
137
  }
138
138
 
@@ -184,11 +184,11 @@
184
184
  .x-text-input:where(:has( > textarea)) {
185
185
  box-sizing: border-box;
186
186
  min-height: var(--text-input-min-height);
187
- padding: var(--text-input-border-width);
188
187
  border-radius: var(--text-input-border-radius);
189
188
  cursor: text;
190
189
  flex-direction: column;
191
190
  align-items: stretch;
191
+ padding: 0;
192
192
  display: flex;
193
193
  }
194
194
 
@@ -235,22 +235,6 @@
235
235
  display: flex;
236
236
  }
237
237
 
238
- .x-text-input:where(:has( > input)) > :where(:not(input, textarea)):where(:has( ~ input)) {
239
- margin-left: calc(var(--text-input-border-width) * -1);
240
- }
241
-
242
- .x-text-input:where(:has( > input)) > input ~ :where(:not(input, textarea)) {
243
- margin-right: calc(var(--text-input-border-width) * -1);
244
- }
245
-
246
- .x-text-input:where(:has( > textarea)) > :where(:not(input, textarea)):where(:has( ~ textarea)) {
247
- margin-top: calc(var(--text-input-border-width) * -1);
248
- }
249
-
250
- .x-text-input:where(:has( > textarea)) > textarea ~ :where(:not(input, textarea)) {
251
- margin-bottom: calc(var(--text-input-border-width) * -1);
252
- }
253
-
254
238
  .x-text-input:where([data-size="1"]) {
255
239
  --text-input-height: var(--space-5);
256
240
  --text-input-min-height: var(--space-8);
@@ -323,9 +307,8 @@
323
307
  --text-input-border-width: 1px;
324
308
  --text-input-selection-color: var(--focus-a5);
325
309
  --text-input-focus-color: var(--focus-8);
326
- background-clip: content-box;
327
310
  background-color: var(--color-surface);
328
- box-shadow: inset 0 0 0 var(--text-input-border-width) var(--base-color-a7);
311
+ border: var(--text-input-border-width) solid var(--base-color-a7);
329
312
  color: var(--base-color-12);
330
313
  }
331
314
 
@@ -399,5 +382,5 @@
399
382
  }
400
383
 
401
384
  .x-text-input:where(:not([data-variant="soft"])):where(:has( > :is(input, textarea):is(:disabled, :read-only))) {
402
- box-shadow: inset 0 0 0 var(--text-input-border-width) var(--base-color-a6);
385
+ border-color: var(--base-color-a6);
403
386
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "elements-kit",
3
3
  "type": "module",
4
- "version": "0.11.0",
4
+ "version": "0.12.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",