@accelint/design-system 1.1.4 → 1.1.5

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 (34) hide show
  1. package/dist/components/button/button.css.d.ts +24 -24
  2. package/dist/components/checkbox/checkbox.css.d.ts +23 -23
  3. package/dist/components/chip/chip.css.d.ts +18 -18
  4. package/dist/components/combo-box/combo-box.css.d.ts +9 -9
  5. package/dist/components/date-field/date-field.css.d.ts +17 -17
  6. package/dist/components/date-input/date-input.css.d.ts +25 -25
  7. package/dist/components/dialog/dialog.css.d.ts +15 -15
  8. package/dist/components/drawer/drawer.css.d.ts +16 -16
  9. package/dist/components/group/group.css.d.ts +7 -7
  10. package/dist/components/icon/icon.css.d.ts +9 -9
  11. package/dist/components/input/input.css.d.ts +20 -20
  12. package/dist/components/menu/menu.css.d.ts +42 -42
  13. package/dist/components/number-field/number-field.css.d.ts +11 -11
  14. package/dist/components/options/options.css.d.ts +44 -44
  15. package/dist/components/picker/picker.css.d.ts +18 -18
  16. package/dist/components/popover/popover.css.d.ts +12 -12
  17. package/dist/components/query-builder/query-builder.css.d.ts +53 -53
  18. package/dist/components/radio/radio.css.d.ts +22 -22
  19. package/dist/components/search-field/search-field.css.d.ts +9 -9
  20. package/dist/components/select/select.css.d.ts +12 -12
  21. package/dist/components/slider/slider.css.d.ts +27 -27
  22. package/dist/components/switch/switch.css.d.ts +16 -16
  23. package/dist/components/tabs/tabs.css.d.ts +25 -25
  24. package/dist/components/text-field/text-field.css.d.ts +8 -8
  25. package/dist/components/textarea/textarea.css.d.ts +22 -22
  26. package/dist/components/time-field/time-field.css.d.ts +17 -17
  27. package/dist/components/tooltip/tooltip.css.d.ts +11 -11
  28. package/dist/components/tree/tree.css.d.ts +45 -45
  29. package/dist/ladle/actions.js.map +1 -1
  30. package/dist/styles/theme.css.d.ts +200 -200
  31. package/dist/test/setup.js +141 -19
  32. package/dist/test/setup.js.map +1 -1
  33. package/dist/utils/css/index.d.ts +1 -1
  34. package/package.json +3 -3
@@ -3,8 +3,7 @@ import redent from 'redent.js';
3
3
  import { parse } from '@adobe/css-tools.js';
4
4
  import { computeAccessibleDescription, computeAccessibleName } from 'dom-accessibility-api.js';
5
5
  import { roles, elementRoles, roleElements } from 'aria-query.js';
6
- import chalk from 'chalk.js';
7
- import isEqualWith from 'lodash/isEqualWith.js';
6
+ import pico from 'picocolors.js';
8
7
  import escape from 'css.escape.js';
9
8
  import * as React from 'react';
10
9
  import * as DeprecatedReactTestUtils from 'react-dom/test-utils';
@@ -23,9 +22,11 @@ import { parseSingleStack } from '@vitest/utils/source-map.js';
23
22
  import { fn, spyOn, mocks, isMockFunction } from '@vitest/spy.js';
24
23
  import 'expect-type.js';
25
24
 
26
- // ../node_modules/.pnpm/@testing-library+jest-dom@6.6.3/node_modules/@testing-library/jest-dom/dist/matchers.mjs
25
+ // ../node_modules/.pnpm/@testing-library+jest-dom@6.9.1/node_modules/@testing-library/jest-dom/dist/matchers.mjs
27
26
  var matchers_exports = {};
28
27
  __export(matchers_exports, {
28
+ toAppearAfter: () => toAppearAfter,
29
+ toAppearBefore: () => toAppearBefore,
29
30
  toBeChecked: () => toBeChecked,
30
31
  toBeDisabled: () => toBeDisabled,
31
32
  toBeEmpty: () => toBeEmpty,
@@ -35,6 +36,8 @@ __export(matchers_exports, {
35
36
  toBeInTheDocument: () => toBeInTheDocument,
36
37
  toBeInvalid: () => toBeInvalid,
37
38
  toBePartiallyChecked: () => toBePartiallyChecked,
39
+ toBePartiallyPressed: () => toBePartiallyPressed,
40
+ toBePressed: () => toBePressed,
38
41
  toBeRequired: () => toBeRequired,
39
42
  toBeValid: () => toBeValid,
40
43
  toBeVisible: () => toBeVisible,
@@ -233,11 +236,11 @@ function toSentence(array2, { wordConnector = ", ", lastWordConnector = " and "
233
236
  array2.length > 1 ? lastWordConnector : ""
234
237
  );
235
238
  }
236
- function compareArraysAsSet(arr1, arr2) {
237
- if (Array.isArray(arr1) && Array.isArray(arr2)) {
238
- return [...new Set(arr1)].every((v) => new Set(arr2).has(v));
239
+ function compareAsSet(val1, val2) {
240
+ if (Array.isArray(val1) && Array.isArray(val2)) {
241
+ return [...new Set(val1)].every((v) => new Set(val2).has(v));
239
242
  }
240
- return void 0;
243
+ return val1 === val2;
241
244
  }
242
245
  function toBeInTheDOM(element, container) {
243
246
  deprecate(
@@ -781,7 +784,7 @@ function expectedDiff(diffFn, expected, computedStyles) {
781
784
  {}
782
785
  );
783
786
  const diffOutput = diffFn(printoutStyles(expected), printoutStyles(received));
784
- return diffOutput.replace(`${chalk.red("+ Received")}
787
+ return diffOutput.replace(`${pico.red("+ Received")}
785
788
  `, "");
786
789
  }
787
790
  function toHaveStyle(htmlElement, css) {
@@ -879,7 +882,7 @@ function toHaveFormValues(formElement, expectedValues) {
879
882
  const formValues = getAllFormValues(formElement);
880
883
  return {
881
884
  pass: Object.entries(expectedValues).every(
882
- ([name, expectedValue]) => isEqualWith(formValues[name], expectedValue, compareArraysAsSet)
885
+ ([name, expectedValue]) => compareAsSet(formValues[name], expectedValue)
883
886
  ),
884
887
  message: () => {
885
888
  const to = this.isNot ? "not to" : "to";
@@ -1125,7 +1128,7 @@ function toHaveValue(htmlElement, expectedValue) {
1125
1128
  receivedTypedValue = `${receivedValue} (${typeof receivedValue})`;
1126
1129
  }
1127
1130
  return {
1128
- pass: expectsValue ? isEqualWith(receivedValue, expectedValue, compareArraysAsSet) : Boolean(receivedValue),
1131
+ pass: expectsValue ? compareAsSet(receivedValue, expectedValue) : Boolean(receivedValue),
1129
1132
  message: () => {
1130
1133
  const to = this.isNot ? "not to" : "to";
1131
1134
  const matcher = this.utils.matcherHint(
@@ -1406,7 +1409,7 @@ function toHaveSelection(htmlElement, expectedSelection) {
1406
1409
  }
1407
1410
  const receivedSelection = getSelection(htmlElement);
1408
1411
  return {
1409
- pass: expectsSelection ? isEqualWith(receivedSelection, expectedSelection, compareArraysAsSet) : Boolean(receivedSelection),
1412
+ pass: expectsSelection ? compareAsSet(receivedSelection, expectedSelection) : Boolean(receivedSelection),
1410
1413
  message: () => {
1411
1414
  const to = this.isNot ? "not to" : "to";
1412
1415
  const matcher = this.utils.matcherHint(
@@ -1425,6 +1428,125 @@ function toHaveSelection(htmlElement, expectedSelection) {
1425
1428
  }
1426
1429
  };
1427
1430
  }
1431
+ function toBePressed(element) {
1432
+ checkHtmlElement(element, toBePressed, this);
1433
+ const roles3 = (element.getAttribute("role") || "").split(" ").map((role) => role.trim());
1434
+ const isButton = element.tagName.toLowerCase() === "button" || element.tagName.toLowerCase() === "input" && element.type === "button" || roles3.includes("button");
1435
+ const pressedAttribute = element.getAttribute("aria-pressed");
1436
+ const isValidAriaElement = pressedAttribute === "true" || pressedAttribute === "false";
1437
+ if (!isButton || !isValidAriaElement) {
1438
+ return {
1439
+ pass: false,
1440
+ message: () => `Only button or input with type="button" or element with role="button" and a valid aria-pressed attribute can be used with .toBePressed()`
1441
+ };
1442
+ }
1443
+ const isPressed = pressedAttribute === "true";
1444
+ return {
1445
+ pass: isButton && isPressed,
1446
+ message: () => {
1447
+ const matcher = this.utils.matcherHint(
1448
+ `${this.isNot ? ".not" : ""}.toBePressed`,
1449
+ "element",
1450
+ ""
1451
+ );
1452
+ return getMessage(
1453
+ this,
1454
+ matcher,
1455
+ `Expected element to have`,
1456
+ `aria-pressed="${this.isNot ? "false" : "true"}"`,
1457
+ `Received`,
1458
+ `aria-pressed="${pressedAttribute}"`
1459
+ );
1460
+ }
1461
+ };
1462
+ }
1463
+ function toBePartiallyPressed(element) {
1464
+ checkHtmlElement(element, toBePartiallyPressed, this);
1465
+ const roles3 = (element.getAttribute("role") || "").split(" ").map((role) => role.trim());
1466
+ const isButton = element.tagName.toLowerCase() === "button" || element.tagName.toLowerCase() === "input" && element.type === "button" || roles3.includes("button");
1467
+ const pressedAttribute = element.getAttribute("aria-pressed");
1468
+ const isValidAriaElement = pressedAttribute === "true" || pressedAttribute === "false" || pressedAttribute === "mixed";
1469
+ if (!isButton || !isValidAriaElement) {
1470
+ return {
1471
+ pass: false,
1472
+ message: () => `Only button or input with type="button" or element with role="button" and a valid aria-pressed attribute can be used with .toBePartiallyPressed()`
1473
+ };
1474
+ }
1475
+ const isPartiallyPressed = pressedAttribute === "mixed";
1476
+ return {
1477
+ pass: isButton && isPartiallyPressed,
1478
+ message: () => {
1479
+ const to = this.isNot ? "not to" : "to";
1480
+ const matcher = this.utils.matcherHint(
1481
+ `${this.isNot ? ".not" : ""}.toBePartiallyPressed`,
1482
+ "element",
1483
+ ""
1484
+ );
1485
+ return getMessage(
1486
+ this,
1487
+ matcher,
1488
+ `Expected element ${to} have`,
1489
+ `aria-pressed="mixed"`,
1490
+ `Received`,
1491
+ `aria-pressed="${pressedAttribute}"`
1492
+ );
1493
+ }
1494
+ };
1495
+ }
1496
+ var DOCUMENT_POSITION_DISCONNECTED = 1;
1497
+ var DOCUMENT_POSITION_PRECEDING = 2;
1498
+ var DOCUMENT_POSITION_FOLLOWING = 4;
1499
+ var DOCUMENT_POSITION_CONTAINS = 8;
1500
+ var DOCUMENT_POSITION_CONTAINED_BY = 16;
1501
+ var DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32;
1502
+ var DOCUMENT_POSITIONS_STRINGS = {
1503
+ [DOCUMENT_POSITION_DISCONNECTED]: "Node.DOCUMENT_POSITION_DISCONNECTED",
1504
+ [DOCUMENT_POSITION_PRECEDING]: "Node.DOCUMENT_POSITION_PRECEDING",
1505
+ [DOCUMENT_POSITION_FOLLOWING]: "Node.DOCUMENT_POSITION_FOLLOWING",
1506
+ [DOCUMENT_POSITION_CONTAINS]: "Node.DOCUMENT_POSITION_CONTAINS",
1507
+ [DOCUMENT_POSITION_CONTAINED_BY]: "Node.DOCUMENT_POSITION_CONTAINED_BY",
1508
+ [DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC]: "Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC"
1509
+ };
1510
+ function makeDocumentPositionErrorString(documentPosition) {
1511
+ if (documentPosition in DOCUMENT_POSITIONS_STRINGS) {
1512
+ return `${DOCUMENT_POSITIONS_STRINGS[documentPosition]} (${documentPosition})`;
1513
+ }
1514
+ return `Unknown document position (${documentPosition})`;
1515
+ }
1516
+ function checkToAppear(methodName, targetDocumentPosition) {
1517
+ return function(element, secondElement) {
1518
+ checkHtmlElement(element, toAppearBefore, this);
1519
+ checkHtmlElement(secondElement, toAppearBefore, this);
1520
+ const documentPosition = element.compareDocumentPosition(secondElement);
1521
+ const pass = documentPosition === targetDocumentPosition;
1522
+ return {
1523
+ pass,
1524
+ message: () => {
1525
+ return [
1526
+ this.utils.matcherHint(
1527
+ `${this.isNot ? ".not" : ""}.${methodName}`,
1528
+ "element",
1529
+ "secondElement"
1530
+ ),
1531
+ "",
1532
+ `Received: ${makeDocumentPositionErrorString(documentPosition)}`
1533
+ ].join("\n");
1534
+ }
1535
+ };
1536
+ };
1537
+ }
1538
+ function toAppearBefore(element, secondElement) {
1539
+ return checkToAppear("toAppearBefore", DOCUMENT_POSITION_FOLLOWING).apply(
1540
+ this,
1541
+ [element, secondElement]
1542
+ );
1543
+ }
1544
+ function toAppearAfter(element, secondElement) {
1545
+ return checkToAppear("toAppearAfter", DOCUMENT_POSITION_PRECEDING).apply(
1546
+ this,
1547
+ [element, secondElement]
1548
+ );
1549
+ }
1428
1550
  function escapeHTML(str) {
1429
1551
  return str.replace(/</g, "&lt;").replace(/>/g, "&gt;");
1430
1552
  }
@@ -1518,14 +1640,14 @@ function createDOMElementFilter(filterNode) {
1518
1640
  }
1519
1641
  };
1520
1642
  }
1521
- var chalk2 = null;
1643
+ var picocolors = null;
1522
1644
  var readFileSync = null;
1523
1645
  var codeFrameColumns = null;
1524
1646
  try {
1525
1647
  const nodeRequire = module && module.require;
1526
1648
  readFileSync = nodeRequire.call(module, "fs").readFileSync;
1527
1649
  codeFrameColumns = nodeRequire.call(module, "@babel/code-frame").codeFrameColumns;
1528
- chalk2 = nodeRequire.call(module, "chalk");
1650
+ picocolors = nodeRequire.call(module, "picocolors");
1529
1651
  } catch {
1530
1652
  }
1531
1653
  function getCodeFrame(frame) {
@@ -1549,7 +1671,7 @@ function getCodeFrame(frame) {
1549
1671
  highlightCode: true,
1550
1672
  linesBelow: 0
1551
1673
  });
1552
- return chalk2.dim(frameLocation) + "\n" + codeFrame + "\n";
1674
+ return picocolors.dim(frameLocation) + "\n" + codeFrame + "\n";
1553
1675
  }
1554
1676
  function getUserCodeFrame() {
1555
1677
  if (!readFileSync || !codeFrameColumns) {
@@ -2777,8 +2899,8 @@ var queryAllByRole = function(container, role, _temp) {
2777
2899
  }
2778
2900
  }
2779
2901
  if (expanded !== void 0) {
2780
- var _allRoles$get10;
2781
- if (((_allRoles$get10 = roles.get(role)) == null ? void 0 : _allRoles$get10.props["aria-expanded"]) === void 0) {
2902
+ var _allRoles$get0;
2903
+ if (((_allRoles$get0 = roles.get(role)) == null ? void 0 : _allRoles$get0.props["aria-expanded"]) === void 0) {
2782
2904
  throw new Error('"aria-expanded" is not supported on role "' + role + '".');
2783
2905
  }
2784
2906
  }
@@ -3877,7 +3999,7 @@ typeof document !== "undefined" && document.body ? getQueriesForElement(document
3877
3999
  return helpers;
3878
4000
  }, initialValue);
3879
4001
 
3880
- // ../node_modules/.pnpm/@testing-library+react@16.3.0_@testing-library+dom@10.4.0_@types+react-dom@19.2.3_@type_4f36caec69ec7efad7b676e805da57e4/node_modules/@testing-library/react/dist/@testing-library/react.esm.js
4002
+ // ../node_modules/.pnpm/@testing-library+react@16.3.0_@testing-library+dom@10.4.1_@types+react-dom@19.0.0_@type_2cdadb9aaf9a026f45fcc74be32c5467/node_modules/@testing-library/react/dist/@testing-library/react.esm.js
3881
4003
  var reactAct = typeof React.act === "function" ? React.act : DeprecatedReactTestUtils.act;
3882
4004
  function getGlobalThis() {
3883
4005
  if (typeof globalThis !== "undefined") {
@@ -4081,13 +4203,13 @@ async function waitForImportsToResolve() {
4081
4203
  await waitForImportsToResolve();
4082
4204
  }
4083
4205
 
4084
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@24.10.1_jsdom@25.0.1_msw@2.12.1_@types+node@24.10.1_typescript@5.9.3_/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js
4206
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@24.10.1_jsdom@25.0.1_msw@2.12.4_@types+node@24.10.1_typescript@5.9.3_/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js
4085
4207
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
4086
4208
  function getDefaultExportFromCjs(x) {
4087
4209
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
4088
4210
  }
4089
4211
 
4090
- // ../node_modules/.pnpm/vitest@2.1.9_@types+node@24.10.1_jsdom@25.0.1_msw@2.12.1_@types+node@24.10.1_typescript@5.9.3_/node_modules/vitest/dist/chunks/date.W2xKR2qe.js
4212
+ // ../node_modules/.pnpm/vitest@2.1.9_@types+node@24.10.1_jsdom@25.0.1_msw@2.12.4_@types+node@24.10.1_typescript@5.9.3_/node_modules/vitest/dist/chunks/date.W2xKR2qe.js
4091
4213
  var RealDate = Date;
4092
4214
  var now = null;
4093
4215
  var MockDate = class _MockDate extends RealDate {