elements-kit 0.10.0 → 0.10.2
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.
package/README.md
CHANGED
|
@@ -227,20 +227,22 @@ customElements.define("x-counter", CounterElement);
|
|
|
227
227
|
|
|
228
228
|
### Typed JSX for custom elements
|
|
229
229
|
|
|
230
|
-
Register the tag and augment
|
|
230
|
+
Register the tag and augment `ElementsKit.CustomElementRegistry` in the global namespace — JSX infers the full prop shape (attributes, events, slots, children) from the class itself.
|
|
231
231
|
|
|
232
232
|
```ts
|
|
233
233
|
import { defineElement } from "elements-kit/custom-elements";
|
|
234
234
|
|
|
235
235
|
defineElement("x-counter", CounterElement);
|
|
236
236
|
|
|
237
|
-
declare
|
|
238
|
-
|
|
239
|
-
|
|
237
|
+
declare global {
|
|
238
|
+
namespace ElementsKit {
|
|
239
|
+
interface CustomElementRegistry {
|
|
240
|
+
"x-counter": typeof CounterElement;
|
|
241
|
+
}
|
|
240
242
|
}
|
|
241
243
|
}
|
|
242
244
|
|
|
243
|
-
// Now `<x-counter count={5} />` is fully typed
|
|
245
|
+
// Now `<x-counter count={5} />` is fully typed.
|
|
244
246
|
```
|
|
245
247
|
|
|
246
248
|
See [Types](docs/src/content/docs/elements/types.mdx) for the full set of prop-inference helpers.
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
--seg-track-radius: max(var(--radius-2), var(--radius-pill));
|
|
14
14
|
--seg-indicator-radius: max(.5px,
|
|
15
15
|
calc(var(--seg-track-radius) - var(--seg-inset)));
|
|
16
|
+
--seg-indicator-bg: var(--color-background);
|
|
16
17
|
border-radius: var(--seg-track-radius);
|
|
17
18
|
border: 0;
|
|
18
19
|
grid-auto-columns: minmax(0, 1fr);
|
|
@@ -25,6 +26,10 @@
|
|
|
25
26
|
position: relative;
|
|
26
27
|
}
|
|
27
28
|
|
|
29
|
+
:is(.dark, .dark-theme) :where(.x-segmented-control:not(.light, .light-theme)), :is(.dark, .dark-theme):where(.x-segmented-control:not(.light, .light-theme)) {
|
|
30
|
+
--seg-indicator-bg: var(--base-color-a3);
|
|
31
|
+
}
|
|
32
|
+
|
|
28
33
|
.x-segmented-control > label {
|
|
29
34
|
justify-content: center;
|
|
30
35
|
align-items: center;
|
|
@@ -101,7 +106,7 @@
|
|
|
101
106
|
content: "";
|
|
102
107
|
inset: var(--seg-inset);
|
|
103
108
|
z-index: -1;
|
|
104
|
-
background-color: var(--
|
|
109
|
+
background-color: var(--seg-indicator-bg);
|
|
105
110
|
border-radius: var(--seg-indicator-radius);
|
|
106
111
|
box-shadow: 0 0 0 .5px var(--base-color-a3),
|
|
107
112
|
0 1px 2px var(--base-color-a4);
|
|
@@ -130,7 +135,7 @@
|
|
|
130
135
|
bottom: var(--seg-inset);
|
|
131
136
|
left: anchor(--x-seg-active left);
|
|
132
137
|
right: anchor(--x-seg-active right);
|
|
133
|
-
background-color: var(--
|
|
138
|
+
background-color: var(--seg-indicator-bg);
|
|
134
139
|
border-radius: var(--seg-indicator-radius);
|
|
135
140
|
width: auto;
|
|
136
141
|
box-shadow: 0 0 0 .5px var(--base-color-a3),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "elements-kit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.10.
|
|
4
|
+
"version": "0.10.2",
|
|
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",
|