elements-kit 0.18.1 → 0.18.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.
Files changed (36) hide show
  1. package/dist/{element-D6xVuWdX.mjs → element-xQwq4ulc.mjs} +1 -0
  2. package/dist/for.d.mts +1 -1
  3. package/dist/for.mjs +1 -1
  4. package/dist/{infer-DGtBn6Nm.d.mts → infer-B7T5hi_D.d.mts} +1 -1
  5. package/dist/integrations/react.d.mts +1 -1
  6. package/dist/jsx-runtime/index.d.mts +1 -1
  7. package/dist/jsx-runtime/index.mjs +1 -1
  8. package/dist/signals/index.d.mts +1 -1
  9. package/dist/ui/button/button.css +7 -7
  10. package/dist/ui/styles/unset.css +14 -0
  11. package/dist/utilities/active-element.d.mts +1 -1
  12. package/dist/utilities/async.d.mts +1 -1
  13. package/dist/utilities/debounced.d.mts +1 -1
  14. package/dist/utilities/element-rect.d.mts +1 -1
  15. package/dist/utilities/element-scroll.d.mts +1 -1
  16. package/dist/utilities/event-driven.d.mts +1 -1
  17. package/dist/utilities/event-listener.d.mts +1 -1
  18. package/dist/utilities/focus-within.d.mts +1 -1
  19. package/dist/utilities/hover.d.mts +1 -1
  20. package/dist/utilities/interval.d.mts +1 -1
  21. package/dist/utilities/location.d.mts +1 -1
  22. package/dist/utilities/media-devices.d.mts +1 -1
  23. package/dist/utilities/media-player.d.mts +1 -1
  24. package/dist/utilities/media-query.d.mts +1 -1
  25. package/dist/utilities/network.d.mts +1 -1
  26. package/dist/utilities/orientation.d.mts +1 -1
  27. package/dist/utilities/previous.d.mts +1 -1
  28. package/dist/utilities/promise.d.mts +1 -1
  29. package/dist/utilities/routing.d.mts +1 -1
  30. package/dist/utilities/search-params.d.mts +1 -1
  31. package/dist/utilities/storage.d.mts +1 -1
  32. package/dist/utilities/throttled.d.mts +1 -1
  33. package/dist/utilities/timeout.d.mts +1 -1
  34. package/dist/utilities/window-focus.d.mts +1 -1
  35. package/dist/utilities/window-size.d.mts +1 -1
  36. package/package.json +9 -2
@@ -296,6 +296,7 @@ function mountStatic(el, list, kind) {
296
296
  const buffer = acquireFragment();
297
297
  let disposers = null;
298
298
  if (kind === 1) for (const c of list) {
299
+ if (c == null || c === false || c === true) continue;
299
300
  const node = c;
300
301
  const dispose = node[Symbol.dispose];
301
302
  if (dispose) (disposers ??= []).push(dispose);
package/dist/for.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { i as Props, s as Require } from "./infer-DGtBn6Nm.mjs";
1
+ import { i as Props, s as Require } from "./infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/for.d.ts
4
4
  type KeyFn<T> = (item: T, index: number) => string | number;
package/dist/for.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { c as effectScope, g as untracked, h as trigger, m as signal, p as onCleanup, s as effect } from "./lib-Dkc7cV5F.mjs";
2
2
  import "./signals/index.mjs";
3
- import { n as disposeElement } from "./element-D6xVuWdX.mjs";
3
+ import { n as disposeElement } from "./element-xQwq4ulc.mjs";
4
4
  //#region src/for.ts
5
5
  /**
6
6
  * Keyed list renderer. See {@link ForProps} for prop details.
@@ -448,7 +448,7 @@ declare namespace JSX$1 {
448
448
  ref?: (el: Element) => void;
449
449
  }
450
450
  export type LibraryManagedAttributes<C, P> = ResolveProps<C, P>;
451
- type RegisteredElements = { [K in keyof CustomElementRegistry]: CustomElementRegistry[K] extends AnyElementCtor ? WithJsxNamespaces<MaybeReactiveProps<ElementProps<CustomElementRegistry[K]>>, InstanceType<CustomElementRegistry[K]>> : never };
451
+ type RegisteredElements = { [K in keyof CustomElementRegistry]: CustomElementRegistry[K] extends infer C extends AnyElementCtor ? WithJsxNamespaces<MaybeReactiveProps<ElementProps<C>>, InstanceType<C>> : never };
452
452
  export type IntrinsicElements = { [K in keyof JSX.IntrinsicElements]: WithJsxNamespaces<JSX.IntrinsicElements[K], IntrinsicElementOf<JSX.IntrinsicElements[K]>> & (IntrinsicElementOf<JSX.IntrinsicElements[K]> extends SVGElement ? SvgNamespaceAttrs : {}) } & RegisteredElements;
453
453
  export {};
454
454
  }
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/integrations/react.d.ts
4
4
  /**
@@ -1,2 +1,2 @@
1
- import { U as createElement, _ as SlotProps, a as RawProps, b as MaybeReactive, c as ResolveProps, d as ComponentClass, f as ComponentFn, g as JSX, h as Attrs, i as Props, l as Child, m as PropsTarget, n as ElementProps, o as ReactiveProps, p as ComponentInstance, r as MaybeReactiveProps, s as Require, t as ComponentProps, u as Component, v as Fragment } from "../infer-DGtBn6Nm.mjs";
1
+ import { U as createElement, _ as SlotProps, a as RawProps, b as MaybeReactive, c as ResolveProps, d as ComponentClass, f as ComponentFn, g as JSX, h as Attrs, i as Props, l as Child, m as PropsTarget, n as ElementProps, o as ReactiveProps, p as ComponentInstance, r as MaybeReactiveProps, s as Require, t as ComponentProps, u as Component, v as Fragment } from "../infer-B7T5hi_D.mjs";
2
2
  export { Attrs, type Child, type Component, type ComponentClass, type ComponentFn, type ComponentInstance, type ComponentProps, type ElementProps, Fragment, JSX, type MaybeReactive, type MaybeReactiveProps, type Props, type PropsTarget, type RawProps, type ReactiveProps, type Require, type ResolveProps, SlotProps, createElement as h, createElement as jsx, createElement as jsxDEV, createElement as jsxs };
@@ -1,4 +1,4 @@
1
- import { r as mountChild, t as createElement } from "../element-D6xVuWdX.mjs";
1
+ import { r as mountChild, t as createElement } from "../element-xQwq4ulc.mjs";
2
2
  //#region src/jsx-runtime/fragment.ts
3
3
  /**
4
4
  * Used by the JSX transform for `<>...</>` fragments.
@@ -1,2 +1,2 @@
1
- import { A as SIGNAL, B as signal, C as isReactive, D as COMPUTED, E as resolveProps, F as isComputed, H as untracked, I as isEffect, L as isEffectScope, M as computed, N as effect, O as EFFECT, P as effectScope, R as isSignal, S as Updater, T as resolve, V as trigger, b as MaybeReactive, j as batch, k as EFFECT_SCOPE, w as reactive, x as Signal, y as Computed, z as onCleanup } from "../infer-DGtBn6Nm.mjs";
1
+ import { A as SIGNAL, B as signal, C as isReactive, D as COMPUTED, E as resolveProps, F as isComputed, H as untracked, I as isEffect, L as isEffectScope, M as computed, N as effect, O as EFFECT, P as effectScope, R as isSignal, S as Updater, T as resolve, V as trigger, b as MaybeReactive, j as batch, k as EFFECT_SCOPE, w as reactive, x as Signal, y as Computed, z as onCleanup } from "../infer-B7T5hi_D.mjs";
2
2
  export { COMPUTED, Computed, EFFECT, EFFECT_SCOPE, MaybeReactive, SIGNAL, Signal, Updater, batch, computed, effect, effectScope, isComputed, isEffect, isEffectScope, isReactive, isSignal, onCleanup, reactive, resolve, resolveProps, signal, trigger, untracked };
@@ -11,7 +11,7 @@
11
11
  display: inline-flex;
12
12
  }
13
13
 
14
- .x-button:where([data-disabled]) {
14
+ .x-button:where([data-disabled], :disabled) {
15
15
  --spinner-opacity: 1;
16
16
  }
17
17
 
@@ -118,7 +118,7 @@
118
118
  filter: var(--base-button-solid-high-contrast-active-filter);
119
119
  }
120
120
 
121
- .x-button:where([data-variant="solid"]):where([data-disabled]) {
121
+ .x-button:where([data-variant="solid"]):where([data-disabled], :disabled) {
122
122
  color: var(--neutral-a8);
123
123
  background-color: var(--neutral-a3);
124
124
  filter: none;
@@ -133,7 +133,7 @@
133
133
  color: var(--accent-12);
134
134
  }
135
135
 
136
- .x-button:where([data-variant="soft"], [data-variant="text"], [data-variant="borderless"]):where([data-disabled]) {
136
+ .x-button:where([data-variant="soft"], [data-variant="text"], [data-variant="borderless"]):where([data-disabled], :disabled) {
137
137
  color: var(--neutral-a8);
138
138
  background-color: var(--neutral-a3);
139
139
  }
@@ -161,7 +161,7 @@
161
161
  background-color: var(--accent-a5);
162
162
  }
163
163
 
164
- .x-button:where([data-variant="soft"]):where([data-disabled]) {
164
+ .x-button:where([data-variant="soft"]):where([data-disabled], :disabled) {
165
165
  color: var(--neutral-a8);
166
166
  background-color: var(--neutral-a3);
167
167
  }
@@ -185,7 +185,7 @@
185
185
  background-color: var(--accent-a4);
186
186
  }
187
187
 
188
- .x-button:where([data-variant="text"], [data-variant="borderless"]):where([data-disabled]) {
188
+ .x-button:where([data-variant="text"], [data-variant="borderless"]):where([data-disabled], :disabled) {
189
189
  color: var(--neutral-a8);
190
190
  background-color: #0000;
191
191
  }
@@ -220,7 +220,7 @@
220
220
  color: var(--accent-12);
221
221
  }
222
222
 
223
- .x-button:where([data-variant="outline"]):where([data-disabled]) {
223
+ .x-button:where([data-variant="outline"]):where([data-disabled], :disabled) {
224
224
  color: var(--neutral-a8);
225
225
  box-shadow: inset 0 0 0 1px var(--neutral-a7);
226
226
  background-color: #0000;
@@ -256,7 +256,7 @@
256
256
  color: var(--accent-12);
257
257
  }
258
258
 
259
- .x-button:where([data-variant="surface"]):where([data-disabled]) {
259
+ .x-button:where([data-variant="surface"]):where([data-disabled], :disabled) {
260
260
  color: var(--neutral-a8);
261
261
  box-shadow: inset 0 0 0 1px var(--neutral-a6);
262
262
  background-color: var(--neutral-a2);
@@ -29,6 +29,20 @@
29
29
  -webkit-tap-highlight-color: transparent;
30
30
  }
31
31
 
32
+ .unset:where(dialog, [popover]) {
33
+ box-sizing: border-box;
34
+ background: none;
35
+ border: 0;
36
+ outline: none;
37
+ max-width: none;
38
+ max-height: none;
39
+ margin: 0;
40
+ padding: 0;
41
+ position: fixed;
42
+ inset: auto;
43
+ overflow: visible;
44
+ }
45
+
32
46
  .unset:where(select) {
33
47
  text-align: start;
34
48
  font-style: normal;
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/active-element.d.ts
4
4
  declare const activeElement: Computed<Element | null>;
@@ -1,4 +1,4 @@
1
- import { b as MaybeReactive } from "../infer-DGtBn6Nm.mjs";
1
+ import { b as MaybeReactive } from "../infer-B7T5hi_D.mjs";
2
2
  import { ComputedPromise } from "./promise.mjs";
3
3
 
4
4
  //#region src/utilities/async.d.ts
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/debounced.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/element-rect.d.ts
4
4
  type RectResult = {
@@ -1,4 +1,4 @@
1
- import { x as Signal } from "../infer-DGtBn6Nm.mjs";
1
+ import { x as Signal } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/element-scroll.d.ts
4
4
  type ElementScrollResult = {
@@ -1,4 +1,4 @@
1
- import { x as Signal, y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { x as Signal, y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/event-driven.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/event-listener.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/focus-within.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/hover.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/interval.d.ts
4
4
  type IntervalResult = {
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/location.d.ts
4
4
  type LocationResult = {
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/media-devices.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { x as Signal, y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { x as Signal, y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/media-player.d.ts
4
4
  type MediaPlayerResult<T extends HTMLMediaElement> = {
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/media-query.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/network.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/orientation.d.ts
4
4
  type OrientationResult = {
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/previous.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/promise.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/routing.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/search-params.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { x as Signal } from "../infer-DGtBn6Nm.mjs";
1
+ import { x as Signal } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/storage.d.ts
4
4
  type StorageOptions<T> = {
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/throttled.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/timeout.d.ts
4
4
  type TimeoutResult = {
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/window-focus.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { y as Computed } from "../infer-DGtBn6Nm.mjs";
1
+ import { y as Computed } from "../infer-B7T5hi_D.mjs";
2
2
 
3
3
  //#region src/utilities/window-size.d.ts
4
4
  type WindowSizeResult = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "elements-kit",
3
3
  "type": "module",
4
- "version": "0.18.1",
4
+ "version": "0.18.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",
@@ -89,11 +89,18 @@
89
89
  "import": "./dist/utilities/*.mjs",
90
90
  "types": "./dist/utilities/*.d.mts"
91
91
  },
92
+ "./ui/overlay": {
93
+ "source": "./src/ui/overlay/gestures.ts",
94
+ "import": "./dist/ui/overlay/gestures.mjs",
95
+ "types": "./dist/ui/overlay/gestures.d.mts"
96
+ },
92
97
  "./ui/*": "./dist/ui/*"
93
98
  },
94
99
  "scripts": {
95
100
  "build": "tsdown",
96
- "build:docs": "pnpm build && pnpm --filter elements-kit-docs build",
101
+ "build:docs": "pnpm build && pnpm --filter elements-kit-docs build && pnpm build:storybook && rm -rf docs/dist/storybook && cp -R storybook/storybook-static docs/dist/storybook",
102
+ "build:storybook": "pnpm --filter elements-kit-storybook build",
103
+ "storybook": "pnpm --filter elements-kit-storybook dev",
97
104
  "watch": "tsdown -w",
98
105
  "test": "vitest run",
99
106
  "test:watch": "vitest"