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.
Files changed (148) hide show
  1. package/dist/{benchmark.CX_oY03V-CSLAXL5f.mjs → benchmark.CX_oY03V-CsUg-gW0.mjs} +32 -1
  2. package/dist/{element-D6xVuWdX.mjs → element-DGuUvJM4.mjs} +1 -1
  3. package/dist/for.mjs +2 -2
  4. package/dist/integrations/react.mjs +2 -2
  5. package/dist/jsx-runtime/index.d.mts +1 -1
  6. package/dist/jsx-runtime/index.mjs +1 -1
  7. package/dist/{lib-Dkc7cV5F.mjs → lib-Cg8fI7K5.mjs} +0 -31
  8. package/dist/render.mjs +1 -1
  9. package/dist/{scope-CnEvL9Nd.mjs → scope-De6rSJvq.mjs} +1 -1
  10. package/dist/signals/index.mjs +1 -1
  11. package/dist/{test.BmQO5GaM-Ddz9cDxc.mjs → test.BmQO5GaM-ZC2MPXQb.mjs} +1 -100
  12. package/dist/ui/accordion/accordion.css +10 -10
  13. package/dist/ui/alert/alert.css +6 -6
  14. package/dist/ui/badge/badge.css +17 -17
  15. package/dist/ui/button/button.css +33 -33
  16. package/dist/ui/checkbox/checkbox.css +5 -5
  17. package/dist/ui/code/code.css +16 -16
  18. package/dist/ui/link/link.css +3 -3
  19. package/dist/ui/marketing/marketing.css +2 -2
  20. package/dist/ui/progress/progress.css +4 -4
  21. package/dist/ui/radio/radio.css +5 -5
  22. package/dist/ui/segmented-control/segmented-control.css +5 -5
  23. package/dist/ui/select/select.css +6 -6
  24. package/dist/ui/slider/slider.css +4 -4
  25. package/dist/ui/styles/accent/amber.css +30 -0
  26. package/dist/ui/styles/accent/base.css +30 -0
  27. package/dist/ui/styles/accent/blue.css +30 -0
  28. package/dist/ui/styles/accent/bronze.css +30 -0
  29. package/dist/ui/styles/accent/brown.css +30 -0
  30. package/dist/ui/styles/accent/crimson.css +30 -0
  31. package/dist/ui/styles/accent/cyan.css +30 -0
  32. package/dist/ui/styles/accent/error.css +30 -0
  33. package/dist/ui/styles/accent/gold.css +30 -0
  34. package/dist/ui/styles/accent/grass.css +30 -0
  35. package/dist/ui/styles/accent/green.css +30 -0
  36. package/dist/ui/styles/accent/indigo.css +30 -0
  37. package/dist/ui/styles/accent/info.css +30 -0
  38. package/dist/ui/styles/accent/iris.css +30 -0
  39. package/dist/ui/styles/accent/jade.css +30 -0
  40. package/dist/ui/styles/accent/lime.css +30 -0
  41. package/dist/ui/styles/accent/mint.css +30 -0
  42. package/dist/ui/styles/accent/orange.css +30 -0
  43. package/dist/ui/styles/accent/pink.css +30 -0
  44. package/dist/ui/styles/accent/plum.css +30 -0
  45. package/dist/ui/styles/accent/purple.css +30 -0
  46. package/dist/ui/styles/accent/red.css +30 -0
  47. package/dist/ui/styles/accent/ruby.css +30 -0
  48. package/dist/ui/styles/accent/sky.css +30 -0
  49. package/dist/ui/styles/accent/success.css +30 -0
  50. package/dist/ui/styles/accent/teal.css +30 -0
  51. package/dist/ui/styles/accent/tomato.css +30 -0
  52. package/dist/ui/styles/accent/violet.css +30 -0
  53. package/dist/ui/styles/accent/warning.css +30 -0
  54. package/dist/ui/styles/accent/yellow.css +30 -0
  55. package/dist/ui/styles/base/neutral.css +30 -0
  56. package/dist/ui/styles/palette/neutral.css +127 -0
  57. package/dist/ui/styles/theme.css +25 -25
  58. package/dist/ui/switch/switch.css +7 -7
  59. package/dist/ui/text-input/text-input.css +10 -10
  60. package/dist/ui/toggle/toggle.css +7 -7
  61. package/dist/utilities/_observe.mjs +1 -1
  62. package/dist/utilities/active-element.mjs +1 -1
  63. package/dist/utilities/active-element.test.mjs +2 -2
  64. package/dist/utilities/async.mjs +1 -1
  65. package/dist/utilities/async.test.mjs +3 -3
  66. package/dist/utilities/context.mjs +1 -1
  67. package/dist/utilities/context.test.mjs +3 -3
  68. package/dist/utilities/debounced.mjs +1 -1
  69. package/dist/utilities/debounced.test.mjs +3 -3
  70. package/dist/utilities/dom-lifecycle.bench.mjs +1 -1
  71. package/dist/utilities/dom-lifecycle.mjs +1 -1
  72. package/dist/utilities/dom-lifecycle.test.mjs +2 -2
  73. package/dist/utilities/element-rect.mjs +1 -1
  74. package/dist/utilities/element-rect.test.mjs +3 -3
  75. package/dist/utilities/element-scroll.test.mjs +3 -3
  76. package/dist/utilities/event-driven.mjs +1 -1
  77. package/dist/utilities/event-listener.mjs +1 -1
  78. package/dist/utilities/event-listener.test.mjs +3 -3
  79. package/dist/utilities/focus-within.mjs +1 -1
  80. package/dist/utilities/focus-within.test.mjs +3 -3
  81. package/dist/utilities/hover.mjs +1 -1
  82. package/dist/utilities/hover.test.mjs +3 -3
  83. package/dist/utilities/intersection-observer.test.mjs +3 -3
  84. package/dist/utilities/interval.mjs +1 -1
  85. package/dist/utilities/interval.test.mjs +3 -3
  86. package/dist/utilities/location.mjs +1 -1
  87. package/dist/utilities/location.test.mjs +2 -2
  88. package/dist/utilities/long-press.test.mjs +3 -3
  89. package/dist/utilities/media-devices.mjs +1 -1
  90. package/dist/utilities/media-devices.test.mjs +3 -3
  91. package/dist/utilities/media-player.test.mjs +3 -3
  92. package/dist/utilities/media-query.mjs +1 -1
  93. package/dist/utilities/mutation-observer.test.mjs +3 -3
  94. package/dist/utilities/network.mjs +1 -1
  95. package/dist/utilities/network.test.mjs +2 -2
  96. package/dist/utilities/on-click-outside.test.mjs +3 -3
  97. package/dist/utilities/orientation.mjs +1 -1
  98. package/dist/utilities/previous.mjs +1 -1
  99. package/dist/utilities/previous.test.mjs +3 -3
  100. package/dist/utilities/promise.mjs +1 -1
  101. package/dist/utilities/promise.test.mjs +3 -3
  102. package/dist/utilities/retry.mjs +1 -1
  103. package/dist/utilities/retry.test.mjs +3 -3
  104. package/dist/utilities/routing.mjs +1 -1
  105. package/dist/utilities/routing.test.mjs +2 -2
  106. package/dist/utilities/search-params.test.mjs +3 -3
  107. package/dist/utilities/ssr.test.mjs +2 -2
  108. package/dist/utilities/storage.test.mjs +3 -3
  109. package/dist/utilities/throttled.mjs +1 -1
  110. package/dist/utilities/throttled.test.mjs +3 -3
  111. package/dist/utilities/timeout.mjs +1 -1
  112. package/dist/utilities/timeout.test.mjs +3 -3
  113. package/dist/utilities/window-focus.mjs +1 -1
  114. package/dist/utilities/window-size.mjs +1 -1
  115. package/dist/utilities/window-size.test.mjs +2 -2
  116. package/package.json +1 -1
  117. package/dist/ui/styles/base/gray.css +0 -30
  118. package/dist/ui/styles/colors/amber.css +0 -30
  119. package/dist/ui/styles/colors/base.css +0 -30
  120. package/dist/ui/styles/colors/blue.css +0 -30
  121. package/dist/ui/styles/colors/bronze.css +0 -30
  122. package/dist/ui/styles/colors/brown.css +0 -30
  123. package/dist/ui/styles/colors/crimson.css +0 -30
  124. package/dist/ui/styles/colors/cyan.css +0 -30
  125. package/dist/ui/styles/colors/error.css +0 -30
  126. package/dist/ui/styles/colors/gold.css +0 -30
  127. package/dist/ui/styles/colors/grass.css +0 -30
  128. package/dist/ui/styles/colors/green.css +0 -30
  129. package/dist/ui/styles/colors/indigo.css +0 -30
  130. package/dist/ui/styles/colors/info.css +0 -30
  131. package/dist/ui/styles/colors/iris.css +0 -30
  132. package/dist/ui/styles/colors/jade.css +0 -30
  133. package/dist/ui/styles/colors/lime.css +0 -30
  134. package/dist/ui/styles/colors/mint.css +0 -30
  135. package/dist/ui/styles/colors/orange.css +0 -30
  136. package/dist/ui/styles/colors/pink.css +0 -30
  137. package/dist/ui/styles/colors/plum.css +0 -30
  138. package/dist/ui/styles/colors/purple.css +0 -30
  139. package/dist/ui/styles/colors/red.css +0 -30
  140. package/dist/ui/styles/colors/ruby.css +0 -30
  141. package/dist/ui/styles/colors/sky.css +0 -30
  142. package/dist/ui/styles/colors/success.css +0 -30
  143. package/dist/ui/styles/colors/teal.css +0 -30
  144. package/dist/ui/styles/colors/tomato.css +0 -30
  145. package/dist/ui/styles/colors/violet.css +0 -30
  146. package/dist/ui/styles/colors/warning.css +0 -30
  147. package/dist/ui/styles/colors/yellow.css +0 -30
  148. 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-Dkc7cV5F.mjs";
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-Dkc7cV5F.mjs";
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-D6xVuWdX.mjs";
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-Dkc7cV5F.mjs";
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-CnEvL9Nd.mjs";
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, 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 };
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 };
@@ -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-DGuUvJM4.mjs";
2
2
  //#region src/jsx-runtime/fragment.ts
3
3
  /**
4
4
  * Used by the JSX transform for `<>...</>` fragments.
@@ -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
@@ -1,4 +1,4 @@
1
- import { t as scope } from "./scope-CnEvL9Nd.mjs";
1
+ import { t as scope } from "./scope-De6rSJvq.mjs";
2
2
  //#region src/render.ts
3
3
  /**
4
4
  * Mount a node into `target` with a scoped lifetime.
@@ -1,4 +1,4 @@
1
- import { c as effectScope, g as untracked } from "./lib-Dkc7cV5F.mjs";
1
+ import { c as effectScope, g as untracked } from "./lib-Cg8fI7K5.mjs";
2
2
  //#region src/signals/scope.ts
3
3
  /**
4
4
  * Run `setup` inside a fresh `effectScope`. Returns `[result, stop]`.
@@ -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-Dkc7cV5F.mjs";
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-CSLAXL5f.mjs";
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(--color-11);
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(--color-a2);
121
- --accordion-summary-bg: var(--color-a2);
122
- --accordion-summary-hover-bg: var(--color-a3);
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(--color-a2);
128
- --accordion-summary-bg: var(--color-a2);
129
- --accordion-summary-hover-bg: var(--color-a3);
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(--color-a11);
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(--color-12);
161
+ color: var(--accent-12);
162
162
  }
163
163
  }
164
164
 
165
165
  .x-accordion:where([data-variant="borderless"][open]) > summary {
166
- color: var(--color-12);
166
+ color: var(--accent-12);
167
167
  }
168
168
 
169
169
  .x-accordion:where([data-variant="borderless"])::details-content {
@@ -1,7 +1,7 @@
1
1
  .x-alert {
2
2
  box-sizing: border-box;
3
3
  text-align: left;
4
- color: var(--color-a11);
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(--color-12);
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(--color-a3);
67
+ background-color: var(--accent-a3);
68
68
  }
69
69
 
70
70
  .x-alert:where([data-variant="surface"]) {
71
- background-color: var(--color-a2);
72
- box-shadow: inset 0 0 0 1px var(--color-a6);
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(--color-a7);
76
+ box-shadow: inset 0 0 0 1px var(--accent-a7);
77
77
  }
@@ -38,51 +38,51 @@
38
38
  }
39
39
 
40
40
  .x-badge:where([data-variant="solid"]) {
41
- background-color: var(--color-9);
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(--color-7);
47
- color: var(--color-12);
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(--color-12);
52
- color: var(--color-1);
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(--color-a11);
57
- color: var(--color-1);
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(--color-a6);
63
- color: var(--color-a11);
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(--color-12);
67
+ color: var(--accent-12);
68
68
  }
69
69
 
70
70
  .x-badge:where([data-variant="soft"]) {
71
- background-color: var(--color-a3);
72
- color: var(--color-a11);
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(--color-12);
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(--color-a8);
81
- color: var(--color-a11);
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(--color-a7),
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(--color-12);
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(--color-9);
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(--color-10);
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(--color-10);
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(--color-10);
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(--color-a4);
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(--color-12);
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(--color-12);
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(--color-12);
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(--color-12);
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(--color-a11);
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(--color-12);
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(--color-a3);
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(--color-8);
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(--color-a4);
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(--color-a4);
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(--color-a5);
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(--color-a3);
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(--color-a3);
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(--color-a4);
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(--color-a8);
195
- color: var(--color-a11);
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(--color-a2);
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(--color-a2);
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(--color-a3);
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(--color-a7),
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(--color-12);
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(--color-a7);
232
- color: var(--color-a11);
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(--color-a8);
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(--color-a8);
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(--color-a3);
247
- box-shadow: inset 0 0 0 1px var(--color-a8);
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(--color-12);
256
+ color: var(--accent-12);
257
257
  }
258
258
 
259
259
  .x-button:where([data-variant="surface"]):where([data-disabled]) {