elements-kit 0.15.0 → 0.17.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.
- package/dist/{benchmark.CX_oY03V-CSLAXL5f.mjs → benchmark.CX_oY03V-CsUg-gW0.mjs} +32 -1
- package/dist/{element-D6xVuWdX.mjs → element-DGuUvJM4.mjs} +1 -1
- package/dist/for.mjs +2 -2
- package/dist/integrations/react.mjs +2 -2
- package/dist/jsx-runtime/index.d.mts +1 -1
- package/dist/jsx-runtime/index.mjs +1 -1
- package/dist/{lib-Dkc7cV5F.mjs → lib-Cg8fI7K5.mjs} +0 -31
- package/dist/render.mjs +1 -1
- package/dist/{scope-CnEvL9Nd.mjs → scope-De6rSJvq.mjs} +1 -1
- package/dist/signals/index.mjs +1 -1
- package/dist/{test.BmQO5GaM-Ddz9cDxc.mjs → test.BmQO5GaM-ZC2MPXQb.mjs} +1 -100
- package/dist/ui/accordion/accordion.css +10 -10
- package/dist/ui/alert/alert.css +6 -6
- package/dist/ui/badge/badge.css +17 -17
- package/dist/ui/button/button.css +33 -33
- package/dist/ui/checkbox/checkbox.css +5 -5
- package/dist/ui/code/code.css +16 -16
- package/dist/ui/link/link.css +3 -3
- package/dist/ui/marketing/marketing.css +2 -2
- package/dist/ui/progress/progress.css +4 -4
- package/dist/ui/radio/radio.css +5 -5
- package/dist/ui/segmented-control/segmented-control.css +5 -5
- package/dist/ui/select/select.css +6 -6
- package/dist/ui/slider/slider.css +4 -4
- package/dist/ui/styles/accent/amber.css +30 -0
- package/dist/ui/styles/accent/base.css +30 -0
- package/dist/ui/styles/accent/blue.css +30 -0
- package/dist/ui/styles/accent/bronze.css +30 -0
- package/dist/ui/styles/accent/brown.css +30 -0
- package/dist/ui/styles/accent/crimson.css +30 -0
- package/dist/ui/styles/accent/cyan.css +30 -0
- package/dist/ui/styles/accent/error.css +30 -0
- package/dist/ui/styles/accent/gold.css +30 -0
- package/dist/ui/styles/accent/grass.css +30 -0
- package/dist/ui/styles/accent/green.css +30 -0
- package/dist/ui/styles/accent/indigo.css +30 -0
- package/dist/ui/styles/accent/info.css +30 -0
- package/dist/ui/styles/accent/iris.css +30 -0
- package/dist/ui/styles/accent/jade.css +30 -0
- package/dist/ui/styles/accent/lime.css +30 -0
- package/dist/ui/styles/accent/mint.css +30 -0
- package/dist/ui/styles/accent/orange.css +30 -0
- package/dist/ui/styles/accent/pink.css +30 -0
- package/dist/ui/styles/accent/plum.css +30 -0
- package/dist/ui/styles/accent/purple.css +30 -0
- package/dist/ui/styles/accent/red.css +30 -0
- package/dist/ui/styles/accent/ruby.css +30 -0
- package/dist/ui/styles/accent/sky.css +30 -0
- package/dist/ui/styles/accent/success.css +30 -0
- package/dist/ui/styles/accent/teal.css +30 -0
- package/dist/ui/styles/accent/tomato.css +30 -0
- package/dist/ui/styles/accent/violet.css +30 -0
- package/dist/ui/styles/accent/warning.css +30 -0
- package/dist/ui/styles/accent/yellow.css +30 -0
- package/dist/ui/styles/base/neutral.css +30 -0
- package/dist/ui/styles/palette/neutral.css +127 -0
- package/dist/ui/styles/theme.css +25 -25
- package/dist/ui/switch/switch.css +7 -7
- package/dist/ui/text-input/text-input.css +10 -10
- package/dist/ui/toggle/toggle.css +7 -7
- package/dist/utilities/_observe.mjs +1 -1
- package/dist/utilities/active-element.mjs +1 -1
- package/dist/utilities/active-element.test.mjs +2 -2
- package/dist/utilities/async.mjs +1 -1
- package/dist/utilities/async.test.mjs +3 -3
- package/dist/utilities/context.mjs +1 -1
- package/dist/utilities/context.test.mjs +3 -3
- package/dist/utilities/debounced.mjs +1 -1
- package/dist/utilities/debounced.test.mjs +3 -3
- package/dist/utilities/dom-lifecycle.bench.mjs +1 -1
- package/dist/utilities/dom-lifecycle.mjs +1 -1
- package/dist/utilities/dom-lifecycle.test.mjs +2 -2
- package/dist/utilities/element-rect.mjs +1 -1
- package/dist/utilities/element-rect.test.mjs +3 -3
- package/dist/utilities/element-scroll.test.mjs +3 -3
- package/dist/utilities/event-driven.mjs +1 -1
- package/dist/utilities/event-listener.mjs +1 -1
- package/dist/utilities/event-listener.test.mjs +3 -3
- package/dist/utilities/focus-within.mjs +1 -1
- package/dist/utilities/focus-within.test.mjs +3 -3
- package/dist/utilities/hover.mjs +1 -1
- package/dist/utilities/hover.test.mjs +3 -3
- package/dist/utilities/intersection-observer.test.mjs +3 -3
- package/dist/utilities/interval.mjs +1 -1
- package/dist/utilities/interval.test.mjs +3 -3
- package/dist/utilities/location.mjs +1 -1
- package/dist/utilities/location.test.mjs +2 -2
- package/dist/utilities/long-press.test.mjs +3 -3
- package/dist/utilities/media-devices.mjs +1 -1
- package/dist/utilities/media-devices.test.mjs +3 -3
- package/dist/utilities/media-player.test.mjs +3 -3
- package/dist/utilities/media-query.mjs +1 -1
- package/dist/utilities/mutation-observer.test.mjs +3 -3
- package/dist/utilities/network.mjs +1 -1
- package/dist/utilities/network.test.mjs +2 -2
- package/dist/utilities/on-click-outside.test.mjs +3 -3
- package/dist/utilities/orientation.mjs +1 -1
- package/dist/utilities/previous.mjs +1 -1
- package/dist/utilities/previous.test.mjs +3 -3
- package/dist/utilities/promise.mjs +1 -1
- package/dist/utilities/promise.test.mjs +3 -3
- package/dist/utilities/retry.mjs +1 -1
- package/dist/utilities/retry.test.mjs +3 -3
- package/dist/utilities/routing.mjs +1 -1
- package/dist/utilities/routing.test.mjs +2 -2
- package/dist/utilities/search-params.test.mjs +3 -3
- package/dist/utilities/ssr.test.mjs +2 -2
- package/dist/utilities/storage.test.mjs +3 -3
- package/dist/utilities/throttled.mjs +1 -1
- package/dist/utilities/throttled.test.mjs +3 -3
- package/dist/utilities/timeout.mjs +1 -1
- package/dist/utilities/timeout.test.mjs +3 -3
- package/dist/utilities/window-focus.mjs +1 -1
- package/dist/utilities/window-size.mjs +1 -1
- package/dist/utilities/window-size.test.mjs +2 -2
- package/package.json +1 -1
- package/dist/ui/styles/base/gray.css +0 -30
- package/dist/ui/styles/colors/amber.css +0 -30
- package/dist/ui/styles/colors/base.css +0 -30
- package/dist/ui/styles/colors/blue.css +0 -30
- package/dist/ui/styles/colors/bronze.css +0 -30
- package/dist/ui/styles/colors/brown.css +0 -30
- package/dist/ui/styles/colors/crimson.css +0 -30
- package/dist/ui/styles/colors/cyan.css +0 -30
- package/dist/ui/styles/colors/error.css +0 -30
- package/dist/ui/styles/colors/gold.css +0 -30
- package/dist/ui/styles/colors/grass.css +0 -30
- package/dist/ui/styles/colors/green.css +0 -30
- package/dist/ui/styles/colors/indigo.css +0 -30
- package/dist/ui/styles/colors/info.css +0 -30
- package/dist/ui/styles/colors/iris.css +0 -30
- package/dist/ui/styles/colors/jade.css +0 -30
- package/dist/ui/styles/colors/lime.css +0 -30
- package/dist/ui/styles/colors/mint.css +0 -30
- package/dist/ui/styles/colors/orange.css +0 -30
- package/dist/ui/styles/colors/pink.css +0 -30
- package/dist/ui/styles/colors/plum.css +0 -30
- package/dist/ui/styles/colors/purple.css +0 -30
- package/dist/ui/styles/colors/red.css +0 -30
- package/dist/ui/styles/colors/ruby.css +0 -30
- package/dist/ui/styles/colors/sky.css +0 -30
- package/dist/ui/styles/colors/success.css +0 -30
- package/dist/ui/styles/colors/teal.css +0 -30
- package/dist/ui/styles/colors/tomato.css +0 -30
- package/dist/ui/styles/colors/violet.css +0 -30
- package/dist/ui/styles/colors/warning.css +0 -30
- package/dist/ui/styles/colors/yellow.css +0 -30
- package/dist/ui/styles/palette/gray.css +0 -127
|
@@ -4099,6 +4099,14 @@ function afterEach(fn, timeout) {
|
|
|
4099
4099
|
};
|
|
4100
4100
|
return getCurrentSuite().on("afterEach", withTimeout(wrapper, timeout ?? getDefaultHookTimeout(), true, /* @__PURE__ */ new Error("STACK_TRACE_ERROR"), abortIfTimeout));
|
|
4101
4101
|
}
|
|
4102
|
+
createTestHook("onTestFailed", (test, handler, timeout) => {
|
|
4103
|
+
test.onFailed ||= [];
|
|
4104
|
+
test.onFailed.push(withTimeout(handler, timeout ?? getDefaultHookTimeout(), true, /* @__PURE__ */ new Error("STACK_TRACE_ERROR"), abortIfTimeout));
|
|
4105
|
+
});
|
|
4106
|
+
createTestHook("onTestFinished", (test, handler, timeout) => {
|
|
4107
|
+
test.onFinished ||= [];
|
|
4108
|
+
test.onFinished.push(withTimeout(handler, timeout ?? getDefaultHookTimeout(), true, /* @__PURE__ */ new Error("STACK_TRACE_ERROR"), abortIfTimeout));
|
|
4109
|
+
});
|
|
4102
4110
|
/**
|
|
4103
4111
|
* Registers a callback function that wraps around all tests within the current suite.
|
|
4104
4112
|
* The callback receives a `runSuite` function that must be called to run the suite's tests.
|
|
@@ -4198,6 +4206,14 @@ function withSuiteFixtures(suiteHook, fn, context, stackTraceError, contextIndex
|
|
|
4198
4206
|
})();
|
|
4199
4207
|
};
|
|
4200
4208
|
}
|
|
4209
|
+
function createTestHook(name, handler) {
|
|
4210
|
+
return (fn, timeout) => {
|
|
4211
|
+
assertTypes(fn, `"${name}" callback`, ["function"]);
|
|
4212
|
+
const current = getCurrentTest();
|
|
4213
|
+
if (!current) throw new Error(`Hook ${name}() can only be called inside a test`);
|
|
4214
|
+
return handler(current, fn, timeout);
|
|
4215
|
+
};
|
|
4216
|
+
}
|
|
4201
4217
|
function findTestFileStackTrace(testFilePath, error) {
|
|
4202
4218
|
const lines = error.split("\n").slice(1);
|
|
4203
4219
|
for (const line of lines) {
|
|
@@ -4926,7 +4942,7 @@ function makeTimeoutError(isHook, timeout, stackTraceError) {
|
|
|
4926
4942
|
}
|
|
4927
4943
|
globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
|
|
4928
4944
|
globalThis.performance ? globalThis.performance.now.bind(globalThis.performance) : Date.now;
|
|
4929
|
-
Date.now;
|
|
4945
|
+
const unixNow = Date.now;
|
|
4930
4946
|
const { clearTimeout, setTimeout: setTimeout$1 } = getSafeTimers();
|
|
4931
4947
|
const packs = /* @__PURE__ */ new Map();
|
|
4932
4948
|
const eventsPacks = [];
|
|
@@ -4953,6 +4969,21 @@ async function finishSendTasksUpdate(runner) {
|
|
|
4953
4969
|
sendTasksUpdate(runner);
|
|
4954
4970
|
await Promise.all(pendingTasksUpdates);
|
|
4955
4971
|
}
|
|
4972
|
+
function throttle(fn, ms) {
|
|
4973
|
+
let last = 0;
|
|
4974
|
+
let pendingCall;
|
|
4975
|
+
return function call(...args) {
|
|
4976
|
+
const now = unixNow();
|
|
4977
|
+
if (now - last > ms) {
|
|
4978
|
+
last = now;
|
|
4979
|
+
clearTimeout(pendingCall);
|
|
4980
|
+
pendingCall = void 0;
|
|
4981
|
+
return fn.apply(this, args);
|
|
4982
|
+
}
|
|
4983
|
+
pendingCall ??= setTimeout$1(() => call.bind(this)(...args), ms);
|
|
4984
|
+
};
|
|
4985
|
+
}
|
|
4986
|
+
throttle(sendTasksUpdate, 100);
|
|
4956
4987
|
/**
|
|
4957
4988
|
* @experimental
|
|
4958
4989
|
* @advanced
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as effectScope, g as untracked, p as onCleanup, s as effect } from "./lib-
|
|
1
|
+
import { c as effectScope, g as untracked, p as onCleanup, s as effect } from "./lib-Cg8fI7K5.mjs";
|
|
2
2
|
import "./polyfill-CdZVCxdo.mjs";
|
|
3
3
|
import { isReactive, resolveProps } from "./signals/index.mjs";
|
|
4
4
|
import { on } from "./utilities/event-listener.mjs";
|
package/dist/for.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as effectScope, g as untracked, h as trigger, m as signal, p as onCleanup, s as effect } from "./lib-
|
|
1
|
+
import { c as effectScope, g as untracked, h as trigger, m as signal, p as onCleanup, s as effect } from "./lib-Cg8fI7K5.mjs";
|
|
2
2
|
import "./signals/index.mjs";
|
|
3
|
-
import { n as disposeElement } from "./element-
|
|
3
|
+
import { n as disposeElement } from "./element-DGuUvJM4.mjs";
|
|
4
4
|
//#region src/for.ts
|
|
5
5
|
/**
|
|
6
6
|
* Keyed list renderer. See {@link ForProps} for prop details.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { m as signal, s as effect } from "../lib-
|
|
1
|
+
import { m as signal, s as effect } from "../lib-Cg8fI7K5.mjs";
|
|
2
2
|
import "../signals/index.mjs";
|
|
3
|
-
import { t as scope } from "../scope-
|
|
3
|
+
import { t as scope } from "../scope-De6rSJvq.mjs";
|
|
4
4
|
import { useEffect, useMemo, useRef, useSyncExternalStore } from "react";
|
|
5
5
|
//#region src/integrations/react.ts
|
|
6
6
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
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";
|
|
2
|
-
export { Attrs,
|
|
2
|
+
export { Attrs, Child, Component, ComponentClass, ComponentFn, ComponentInstance, ComponentProps, ElementProps, Fragment, JSX, MaybeReactive, MaybeReactiveProps, Props, PropsTarget, RawProps, ReactiveProps, Require, ResolveProps, SlotProps, createElement as h, createElement as jsx, createElement as jsxDEV, createElement as jsxs };
|
|
@@ -295,27 +295,12 @@ const COMPUTED = Symbol("computed");
|
|
|
295
295
|
const EFFECT = Symbol("effect");
|
|
296
296
|
const EFFECT_SCOPE = Symbol("effectScope");
|
|
297
297
|
const { link, unlink, propagate, checkDirty, shallowPropagate } = createReactiveSystem({
|
|
298
|
-
/**
|
|
299
|
-
* Called by the graph engine when a Mutable+Dirty node needs to recompute.
|
|
300
|
-
* Dispatches by tagged property:
|
|
301
|
-
*
|
|
302
|
-
* - `'getter' in node` → computed: delegate to `updateComputed`.
|
|
303
|
-
* - `'currentValue' in node` → signal: delegate to `updateSignal`.
|
|
304
|
-
* - else → effectScope: mark `Mutable` and report
|
|
305
|
-
* "changed", so any parent effect re-evaluates as if the scope itself
|
|
306
|
-
* propagated.
|
|
307
|
-
*/
|
|
308
298
|
update(node) {
|
|
309
299
|
if ("getter" in node) return updateComputed(node);
|
|
310
300
|
if ("currentValue" in node) return updateSignal(node);
|
|
311
301
|
node.flags = 1;
|
|
312
302
|
return true;
|
|
313
303
|
},
|
|
314
|
-
/**
|
|
315
|
-
* Called when an effect node is notified that one of its deps is dirty.
|
|
316
|
-
* Inserts the effect into the flush queue in dependency order (parents
|
|
317
|
-
* before children) so that effects always run in topological order.
|
|
318
|
-
*/
|
|
319
304
|
notify(effect) {
|
|
320
305
|
let insertIndex = queuedLength;
|
|
321
306
|
let firstInsertedIndex = insertIndex;
|
|
@@ -332,22 +317,6 @@ const { link, unlink, propagate, checkDirty, shallowPropagate } = createReactive
|
|
|
332
317
|
queued[insertIndex] = left;
|
|
333
318
|
}
|
|
334
319
|
},
|
|
335
|
-
/**
|
|
336
|
-
* Called when a dep node loses its last subscriber.
|
|
337
|
-
*
|
|
338
|
-
* Dispatch by tagged property:
|
|
339
|
-
*
|
|
340
|
-
* - **computed** (`'getter' in node`): if it had deps, reset to Dirty so
|
|
341
|
-
* it recomputes lazily if a new subscriber appears later. Cleanups
|
|
342
|
-
* registered via {@link onCleanup} during the previous run are flushed
|
|
343
|
-
* (outside any tracking context). Child effects/scopes created in the
|
|
344
|
-
* getter are released in LIFO order via {@link disposeAllDepsInReverse}.
|
|
345
|
-
* - **signal** (`'currentValue' in node`): no-op. Signals stay live so a
|
|
346
|
-
* future subscriber can read the latest value.
|
|
347
|
-
* - **effect** (`'fn' in node`): cascade-dispose via `effectOper`
|
|
348
|
-
* (children first, then own cleanup).
|
|
349
|
-
* - **effectScope** (else): cascade-dispose via `effectScopeOper`.
|
|
350
|
-
*/
|
|
351
320
|
unwatched(node) {
|
|
352
321
|
if ("getter" in node) {
|
|
353
322
|
const c = node;
|
package/dist/render.mjs
CHANGED
package/dist/signals/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as batch, c as effectScope, d as isEffectScope, f as isSignal, g as untracked, h as trigger, i as SIGNAL, l as isComputed, m as signal, n as EFFECT, o as computed, p as onCleanup, r as EFFECT_SCOPE, s as effect, t as COMPUTED, u as isEffect } from "../lib-
|
|
1
|
+
import { a as batch, c as effectScope, d as isEffectScope, f as isSignal, g as untracked, h as trigger, i as SIGNAL, l as isComputed, m as signal, n as EFFECT, o as computed, p as onCleanup, r as EFFECT_SCOPE, s as effect, t as COMPUTED, u as isEffect } from "../lib-Cg8fI7K5.mjs";
|
|
2
2
|
import "../polyfill-CdZVCxdo.mjs";
|
|
3
3
|
//#region src/signals/index.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as plugins, C as getCallLastIndex, D as ordinal, E as noop, O as stringify, S as createSimpleStackTrace, T as isObject, _ as getSafeTimers, a as waitForImportsToResolve, b as printDiffOrStringify, d as getNames, g as delay, h as parseSingleStack, i as resetModules, j as y, k as format, m as parseErrorStacktrace, n as getWorkerState, r as isChildProcess, u as getCurrentTest, v as processError, w as getType, x as assertTypes, y as diff } from "./benchmark.CX_oY03V-
|
|
1
|
+
import { A as plugins, C as getCallLastIndex, D as ordinal, E as noop, O as stringify, S as createSimpleStackTrace, T as isObject, _ as getSafeTimers, a as waitForImportsToResolve, b as printDiffOrStringify, d as getNames, g as delay, h as parseSingleStack, i as resetModules, j as y, k as format, m as parseErrorStacktrace, n as getWorkerState, r as isChildProcess, u as getCurrentTest, v as processError, w as getType, x as assertTypes, y as diff } from "./benchmark.CX_oY03V-CsUg-gW0.mjs";
|
|
2
2
|
//#region node_modules/.pnpm/@vitest+spy@4.1.3/node_modules/@vitest/spy/dist/index.js
|
|
3
3
|
function isMockFunction(fn) {
|
|
4
4
|
return typeof fn === "function" && "_isMockFunction" in fn && fn._isMockFunction === true;
|
|
@@ -997,115 +997,16 @@ function inspect(value, opts = {}) {
|
|
|
997
997
|
}
|
|
998
998
|
__name(inspect, "inspect");
|
|
999
999
|
var config = {
|
|
1000
|
-
/**
|
|
1001
|
-
* ### config.includeStack
|
|
1002
|
-
*
|
|
1003
|
-
* User configurable property, influences whether stack trace
|
|
1004
|
-
* is included in Assertion error message. Default of false
|
|
1005
|
-
* suppresses stack trace in the error message.
|
|
1006
|
-
*
|
|
1007
|
-
* chai.config.includeStack = true; // enable stack on error
|
|
1008
|
-
*
|
|
1009
|
-
* @param {boolean}
|
|
1010
|
-
* @public
|
|
1011
|
-
*/
|
|
1012
1000
|
includeStack: false,
|
|
1013
|
-
/**
|
|
1014
|
-
* ### config.showDiff
|
|
1015
|
-
*
|
|
1016
|
-
* User configurable property, influences whether or not
|
|
1017
|
-
* the `showDiff` flag should be included in the thrown
|
|
1018
|
-
* AssertionErrors. `false` will always be `false`; `true`
|
|
1019
|
-
* will be true when the assertion has requested a diff
|
|
1020
|
-
* be shown.
|
|
1021
|
-
*
|
|
1022
|
-
* @param {boolean}
|
|
1023
|
-
* @public
|
|
1024
|
-
*/
|
|
1025
1001
|
showDiff: true,
|
|
1026
|
-
/**
|
|
1027
|
-
* ### config.truncateThreshold
|
|
1028
|
-
*
|
|
1029
|
-
* User configurable property, sets length threshold for actual and
|
|
1030
|
-
* expected values in assertion errors. If this threshold is exceeded, for
|
|
1031
|
-
* example for large data structures, the value is replaced with something
|
|
1032
|
-
* like `[ Array(3) ]` or `{ Object (prop1, prop2) }`.
|
|
1033
|
-
*
|
|
1034
|
-
* Set it to zero if you want to disable truncating altogether.
|
|
1035
|
-
*
|
|
1036
|
-
* This is especially userful when doing assertions on arrays: having this
|
|
1037
|
-
* set to a reasonable large value makes the failure messages readily
|
|
1038
|
-
* inspectable.
|
|
1039
|
-
*
|
|
1040
|
-
* chai.config.truncateThreshold = 0; // disable truncating
|
|
1041
|
-
*
|
|
1042
|
-
* @param {number}
|
|
1043
|
-
* @public
|
|
1044
|
-
*/
|
|
1045
1002
|
truncateThreshold: 40,
|
|
1046
|
-
/**
|
|
1047
|
-
* ### config.useProxy
|
|
1048
|
-
*
|
|
1049
|
-
* User configurable property, defines if chai will use a Proxy to throw
|
|
1050
|
-
* an error when a non-existent property is read, which protects users
|
|
1051
|
-
* from typos when using property-based assertions.
|
|
1052
|
-
*
|
|
1053
|
-
* Set it to false if you want to disable this feature.
|
|
1054
|
-
*
|
|
1055
|
-
* chai.config.useProxy = false; // disable use of Proxy
|
|
1056
|
-
*
|
|
1057
|
-
* This feature is automatically disabled regardless of this config value
|
|
1058
|
-
* in environments that don't support proxies.
|
|
1059
|
-
*
|
|
1060
|
-
* @param {boolean}
|
|
1061
|
-
* @public
|
|
1062
|
-
*/
|
|
1063
1003
|
useProxy: true,
|
|
1064
|
-
/**
|
|
1065
|
-
* ### config.proxyExcludedKeys
|
|
1066
|
-
*
|
|
1067
|
-
* User configurable property, defines which properties should be ignored
|
|
1068
|
-
* instead of throwing an error if they do not exist on the assertion.
|
|
1069
|
-
* This is only applied if the environment Chai is running in supports proxies and
|
|
1070
|
-
* if the `useProxy` configuration setting is enabled.
|
|
1071
|
-
* By default, `then` and `inspect` will not throw an error if they do not exist on the
|
|
1072
|
-
* assertion object because the `.inspect` property is read by `util.inspect` (for example, when
|
|
1073
|
-
* using `console.log` on the assertion object) and `.then` is necessary for promise type-checking.
|
|
1074
|
-
*
|
|
1075
|
-
* // By default these keys will not throw an error if they do not exist on the assertion object
|
|
1076
|
-
* chai.config.proxyExcludedKeys = ['then', 'inspect'];
|
|
1077
|
-
*
|
|
1078
|
-
* @param {Array}
|
|
1079
|
-
* @public
|
|
1080
|
-
*/
|
|
1081
1004
|
proxyExcludedKeys: [
|
|
1082
1005
|
"then",
|
|
1083
1006
|
"catch",
|
|
1084
1007
|
"inspect",
|
|
1085
1008
|
"toJSON"
|
|
1086
1009
|
],
|
|
1087
|
-
/**
|
|
1088
|
-
* ### config.deepEqual
|
|
1089
|
-
*
|
|
1090
|
-
* User configurable property, defines which a custom function to use for deepEqual
|
|
1091
|
-
* comparisons.
|
|
1092
|
-
* By default, the function used is the one from the `deep-eql` package without custom comparator.
|
|
1093
|
-
*
|
|
1094
|
-
* // use a custom comparator
|
|
1095
|
-
* chai.config.deepEqual = (expected, actual) => {
|
|
1096
|
-
* return chai.util.eql(expected, actual, {
|
|
1097
|
-
* comparator: (expected, actual) => {
|
|
1098
|
-
* // for non number comparison, use the default behavior
|
|
1099
|
-
* if(typeof expected !== 'number') return null;
|
|
1100
|
-
* // allow a difference of 10 between compared numbers
|
|
1101
|
-
* return typeof actual === 'number' && Math.abs(actual - expected) < 10
|
|
1102
|
-
* }
|
|
1103
|
-
* })
|
|
1104
|
-
* };
|
|
1105
|
-
*
|
|
1106
|
-
* @param {Function}
|
|
1107
|
-
* @public
|
|
1108
|
-
*/
|
|
1109
1010
|
deepEqual: null
|
|
1110
1011
|
};
|
|
1111
1012
|
function inspect2(obj, showHidden, depth, colors) {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
padding: var(--accordion-summary-padding-block)
|
|
37
37
|
var(--accordion-summary-padding-inline);
|
|
38
38
|
font-size: var(--accordion-font-size);
|
|
39
|
-
color: var(--
|
|
39
|
+
color: var(--accent-11);
|
|
40
40
|
-webkit-user-select: none;
|
|
41
41
|
user-select: none;
|
|
42
42
|
font-weight: 500;
|
|
@@ -117,16 +117,16 @@
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
.x-accordion:where([data-variant="soft"]) {
|
|
120
|
-
background-color: var(--
|
|
121
|
-
--accordion-summary-bg: var(--
|
|
122
|
-
--accordion-summary-hover-bg: var(--
|
|
120
|
+
background-color: var(--accent-a2);
|
|
121
|
+
--accordion-summary-bg: var(--accent-a2);
|
|
122
|
+
--accordion-summary-hover-bg: var(--accent-a3);
|
|
123
123
|
--accordion-body-bg: transparent;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
:where(.dark, .dark-theme) .x-accordion:where([data-variant="soft"]) {
|
|
127
|
-
background-color: var(--
|
|
128
|
-
--accordion-summary-bg: var(--
|
|
129
|
-
--accordion-summary-hover-bg: var(--
|
|
127
|
+
background-color: var(--accent-a2);
|
|
128
|
+
--accordion-summary-bg: var(--accent-a2);
|
|
129
|
+
--accordion-summary-hover-bg: var(--accent-a3);
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
.x-accordion:where(:not([data-variant]), [data-variant="surface"]) + .x-accordion:where(:not([data-variant]), [data-variant="surface"]) {
|
|
@@ -151,19 +151,19 @@
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
.x-accordion:where([data-variant="borderless"]) > summary {
|
|
154
|
-
color: var(--
|
|
154
|
+
color: var(--accent-a11);
|
|
155
155
|
padding-inline: 0;
|
|
156
156
|
transition: background-color .12s ease-out, color .12s ease-out;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
@media (hover: hover) {
|
|
160
160
|
.x-accordion:where([data-variant="borderless"]) > summary:where(:hover) {
|
|
161
|
-
color: var(--
|
|
161
|
+
color: var(--accent-12);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
.x-accordion:where([data-variant="borderless"][open]) > summary {
|
|
166
|
-
color: var(--
|
|
166
|
+
color: var(--accent-12);
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
.x-accordion:where([data-variant="borderless"])::details-content {
|
package/dist/ui/alert/alert.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.x-alert {
|
|
2
2
|
box-sizing: border-box;
|
|
3
3
|
text-align: left;
|
|
4
|
-
color: var(--
|
|
4
|
+
color: var(--accent-a11);
|
|
5
5
|
grid-template-columns: auto 1fr;
|
|
6
6
|
justify-content: flex-start;
|
|
7
7
|
align-items: flex-start;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.x-alert:where([data-high-contrast]) {
|
|
12
|
-
color: var(--
|
|
12
|
+
color: var(--accent-12);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.x-alert-icon {
|
|
@@ -64,14 +64,14 @@
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.x-alert:where(:not([data-variant="surface"], [data-variant="outline"])) {
|
|
67
|
-
background-color: var(--
|
|
67
|
+
background-color: var(--accent-a3);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
.x-alert:where([data-variant="surface"]) {
|
|
71
|
-
background-color: var(--
|
|
72
|
-
box-shadow: inset 0 0 0 1px var(--
|
|
71
|
+
background-color: var(--accent-a2);
|
|
72
|
+
box-shadow: inset 0 0 0 1px var(--accent-a6);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.x-alert:where([data-variant="outline"]) {
|
|
76
|
-
box-shadow: inset 0 0 0 1px var(--
|
|
76
|
+
box-shadow: inset 0 0 0 1px var(--accent-a7);
|
|
77
77
|
}
|
package/dist/ui/badge/badge.css
CHANGED
|
@@ -38,51 +38,51 @@
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.x-badge:where([data-variant="solid"]) {
|
|
41
|
-
background-color: var(--
|
|
41
|
+
background-color: var(--accent-9);
|
|
42
42
|
color: var(--accent-contrast);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.x-badge:where([data-variant="solid"])::selection {
|
|
46
|
-
background-color: var(--
|
|
47
|
-
color: var(--
|
|
46
|
+
background-color: var(--accent-7);
|
|
47
|
+
color: var(--accent-12);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.x-badge:where([data-variant="solid"]):where([data-high-contrast]) {
|
|
51
|
-
background-color: var(--
|
|
52
|
-
color: var(--
|
|
51
|
+
background-color: var(--accent-12);
|
|
52
|
+
color: var(--accent-1);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.x-badge:where([data-variant="solid"]):where([data-high-contrast])::selection {
|
|
56
|
-
background-color: var(--
|
|
57
|
-
color: var(--
|
|
56
|
+
background-color: var(--accent-a11);
|
|
57
|
+
color: var(--accent-1);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
.x-badge:where([data-variant="surface"]) {
|
|
61
61
|
background-color: var(--accent-surface);
|
|
62
|
-
box-shadow: inset 0 0 0 1px var(--
|
|
63
|
-
color: var(--
|
|
62
|
+
box-shadow: inset 0 0 0 1px var(--accent-a6);
|
|
63
|
+
color: var(--accent-a11);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.x-badge:where([data-variant="surface"]):where([data-high-contrast]) {
|
|
67
|
-
color: var(--
|
|
67
|
+
color: var(--accent-12);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
.x-badge:where([data-variant="soft"]) {
|
|
71
|
-
background-color: var(--
|
|
72
|
-
color: var(--
|
|
71
|
+
background-color: var(--accent-a3);
|
|
72
|
+
color: var(--accent-a11);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.x-badge:where([data-variant="soft"]):where([data-high-contrast]) {
|
|
76
|
-
color: var(--
|
|
76
|
+
color: var(--accent-12);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.x-badge:where([data-variant="outline"]) {
|
|
80
|
-
box-shadow: inset 0 0 0 1px var(--
|
|
81
|
-
color: var(--
|
|
80
|
+
box-shadow: inset 0 0 0 1px var(--accent-a8);
|
|
81
|
+
color: var(--accent-a11);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
.x-badge:where([data-variant="outline"]):where([data-high-contrast]) {
|
|
85
|
-
box-shadow: inset 0 0 0 1px var(--
|
|
85
|
+
box-shadow: inset 0 0 0 1px var(--accent-a7),
|
|
86
86
|
inset 0 0 0 1px var(--base-color-a11);
|
|
87
|
-
color: var(--
|
|
87
|
+
color: var(--accent-12);
|
|
88
88
|
}
|
|
@@ -65,28 +65,28 @@
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.x-button:where([data-variant="solid"]) {
|
|
68
|
-
background-color: var(--
|
|
68
|
+
background-color: var(--accent-9);
|
|
69
69
|
color: var(--accent-contrast);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
@media (hover: hover) {
|
|
73
73
|
.x-button:where([data-variant="solid"]):where(:hover) {
|
|
74
|
-
background-color: var(--
|
|
74
|
+
background-color: var(--accent-10);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
.x-button:where([data-variant="solid"]):where([data-state="open"]) {
|
|
79
|
-
background-color: var(--
|
|
79
|
+
background-color: var(--accent-10);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
.x-button:where([data-variant="solid"]):where(:active:not([data-state="open"])) {
|
|
83
|
-
background-color: var(--
|
|
83
|
+
background-color: var(--accent-10);
|
|
84
84
|
filter: var(--base-button-solid-active-filter);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
@media (pointer: coarse) {
|
|
88
88
|
.x-button:where([data-variant="solid"]):where(:active:not([data-state="open"])) {
|
|
89
|
-
outline: .5em solid var(--
|
|
89
|
+
outline: .5em solid var(--accent-a4);
|
|
90
90
|
outline-offset: 0;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -97,24 +97,24 @@
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
.x-button:where([data-variant="solid"]):where([data-high-contrast]) {
|
|
100
|
-
background-color: var(--
|
|
100
|
+
background-color: var(--accent-12);
|
|
101
101
|
color: var(--base-color-1);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
@media (hover: hover) {
|
|
105
105
|
.x-button:where([data-variant="solid"]):where([data-high-contrast]):where(:hover) {
|
|
106
|
-
background-color: var(--
|
|
106
|
+
background-color: var(--accent-12);
|
|
107
107
|
filter: var(--base-button-solid-high-contrast-hover-filter);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
.x-button:where([data-variant="solid"]):where([data-high-contrast]):where([data-state="open"]) {
|
|
112
|
-
background-color: var(--
|
|
112
|
+
background-color: var(--accent-12);
|
|
113
113
|
filter: var(--base-button-solid-high-contrast-hover-filter);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
.x-button:where([data-variant="solid"]):where([data-high-contrast]):where(:active:not([data-state="open"])) {
|
|
117
|
-
background-color: var(--
|
|
117
|
+
background-color: var(--accent-12);
|
|
118
118
|
filter: var(--base-button-solid-high-contrast-active-filter);
|
|
119
119
|
}
|
|
120
120
|
|
|
@@ -126,11 +126,11 @@
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
.x-button:where([data-variant="soft"], [data-variant="text"], [data-variant="borderless"]) {
|
|
129
|
-
color: var(--
|
|
129
|
+
color: var(--accent-a11);
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
.x-button:where([data-variant="soft"], [data-variant="text"], [data-variant="borderless"]):where([data-high-contrast]) {
|
|
133
|
-
color: var(--
|
|
133
|
+
color: var(--accent-12);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
.x-button:where([data-variant="soft"], [data-variant="text"], [data-variant="borderless"]):where([data-disabled]) {
|
|
@@ -139,26 +139,26 @@
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
.x-button:where([data-variant="soft"]) {
|
|
142
|
-
background-color: var(--
|
|
142
|
+
background-color: var(--accent-a3);
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
.x-button:where([data-variant="soft"]):where(:focus-visible) {
|
|
146
|
-
outline: 2px solid var(--
|
|
146
|
+
outline: 2px solid var(--accent-8);
|
|
147
147
|
outline-offset: -1px;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
@media (hover: hover) {
|
|
151
151
|
.x-button:where([data-variant="soft"]):where(:hover) {
|
|
152
|
-
background-color: var(--
|
|
152
|
+
background-color: var(--accent-a4);
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
.x-button:where([data-variant="soft"]):where([data-state="open"]) {
|
|
157
|
-
background-color: var(--
|
|
157
|
+
background-color: var(--accent-a4);
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
.x-button:where([data-variant="soft"]):where(:active:not([data-state="open"])) {
|
|
161
|
-
background-color: var(--
|
|
161
|
+
background-color: var(--accent-a5);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
.x-button:where([data-variant="soft"]):where([data-disabled]) {
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
|
|
169
169
|
@media (hover: hover) {
|
|
170
170
|
.x-button:where([data-variant="text"], [data-variant="borderless"]):where(:hover) {
|
|
171
|
-
background-color: var(--
|
|
171
|
+
background-color: var(--accent-a3);
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
|
|
@@ -178,11 +178,11 @@
|
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
.x-button:where([data-variant="text"], [data-variant="borderless"]):where([data-state="open"]) {
|
|
181
|
-
background-color: var(--
|
|
181
|
+
background-color: var(--accent-a3);
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
.x-button:where([data-variant="text"], [data-variant="borderless"]):where(:active:not([data-state="open"])) {
|
|
185
|
-
background-color: var(--
|
|
185
|
+
background-color: var(--accent-a4);
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
.x-button:where([data-variant="text"], [data-variant="borderless"]):where([data-disabled]) {
|
|
@@ -191,22 +191,22 @@
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
.x-button:where([data-variant="outline"]) {
|
|
194
|
-
box-shadow: inset 0 0 0 1px var(--
|
|
195
|
-
color: var(--
|
|
194
|
+
box-shadow: inset 0 0 0 1px var(--accent-a8);
|
|
195
|
+
color: var(--accent-a11);
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
@media (hover: hover) {
|
|
199
199
|
.x-button:where([data-variant="outline"]):where(:hover) {
|
|
200
|
-
background-color: var(--
|
|
200
|
+
background-color: var(--accent-a2);
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
.x-button:where([data-variant="outline"]):where([data-state="open"]) {
|
|
205
|
-
background-color: var(--
|
|
205
|
+
background-color: var(--accent-a2);
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
.x-button:where([data-variant="outline"]):where(:active:not([data-state="open"])) {
|
|
209
|
-
background-color: var(--
|
|
209
|
+
background-color: var(--accent-a3);
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
.x-button:where([data-variant="outline"]):where(:focus-visible) {
|
|
@@ -215,9 +215,9 @@
|
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
.x-button:where([data-variant="outline"]):where([data-high-contrast]) {
|
|
218
|
-
box-shadow: inset 0 0 0 1px var(--
|
|
218
|
+
box-shadow: inset 0 0 0 1px var(--accent-a7),
|
|
219
219
|
inset 0 0 0 1px var(--base-color-a11);
|
|
220
|
-
color: var(--
|
|
220
|
+
color: var(--accent-12);
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
.x-button:where([data-variant="outline"]):where([data-disabled]) {
|
|
@@ -228,23 +228,23 @@
|
|
|
228
228
|
|
|
229
229
|
.x-button:where([data-variant="surface"]) {
|
|
230
230
|
background-color: var(--accent-surface);
|
|
231
|
-
box-shadow: inset 0 0 0 1px var(--
|
|
232
|
-
color: var(--
|
|
231
|
+
box-shadow: inset 0 0 0 1px var(--accent-a7);
|
|
232
|
+
color: var(--accent-a11);
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
@media (hover: hover) {
|
|
236
236
|
.x-button:where([data-variant="surface"]):where(:hover) {
|
|
237
|
-
box-shadow: inset 0 0 0 1px var(--
|
|
237
|
+
box-shadow: inset 0 0 0 1px var(--accent-a8);
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
.x-button:where([data-variant="surface"]):where([data-state="open"]) {
|
|
242
|
-
box-shadow: inset 0 0 0 1px var(--
|
|
242
|
+
box-shadow: inset 0 0 0 1px var(--accent-a8);
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
.x-button:where([data-variant="surface"]):where(:active:not([data-state="open"])) {
|
|
246
|
-
background-color: var(--
|
|
247
|
-
box-shadow: inset 0 0 0 1px var(--
|
|
246
|
+
background-color: var(--accent-a3);
|
|
247
|
+
box-shadow: inset 0 0 0 1px var(--accent-a8);
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
.x-button:where([data-variant="surface"]):where(:focus-visible) {
|
|
@@ -253,7 +253,7 @@
|
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
.x-button:where([data-variant="surface"]):where([data-high-contrast]) {
|
|
256
|
-
color: var(--
|
|
256
|
+
color: var(--accent-12);
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
.x-button:where([data-variant="surface"]):where([data-disabled]) {
|