@ultraviolet/ui 3.7.1 → 3.8.1

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 (124) hide show
  1. package/dist/components/Alert/styles.css.d.ts +1 -1
  2. package/dist/components/Avatar/index.d.ts.map +1 -1
  3. package/dist/components/Avatar/index.js +45 -41
  4. package/dist/components/Avatar/styles.css.js +1 -0
  5. package/dist/components/Avatar/variables.css.js +0 -1
  6. package/dist/components/Banner/index.d.ts.map +1 -1
  7. package/dist/components/Banner/index.js +1 -1
  8. package/dist/components/Banner/styles.css.d.ts +1 -1
  9. package/dist/components/BarStack/styles.css.js +1 -1
  10. package/dist/components/Button/index.d.ts +41 -22
  11. package/dist/components/Button/index.d.ts.map +1 -1
  12. package/dist/components/Button/index.js +18 -10
  13. package/dist/components/Checkbox/index.d.ts +1 -1
  14. package/dist/components/Checkbox/index.d.ts.map +1 -1
  15. package/dist/components/Checkbox/index.js +44 -38
  16. package/dist/components/Checkbox/styles.css.js +0 -1
  17. package/dist/components/Chip/index.d.ts +1 -1
  18. package/dist/components/DateInput/helpersLocale.d.ts.map +1 -1
  19. package/dist/components/DateInput/helpersLocale.js +8 -5
  20. package/dist/components/Dialog/constants.d.ts +1 -1
  21. package/dist/components/Dialog/index.d.ts +20 -5
  22. package/dist/components/Dialog/index.d.ts.map +1 -1
  23. package/dist/components/Drawer/styles.css.d.ts +1 -1
  24. package/dist/components/EmptyState/index.d.ts.map +1 -1
  25. package/dist/components/EmptyState/index.js +10 -1
  26. package/dist/components/EmptyState/styles.css.d.ts +1 -1
  27. package/dist/components/EmptyState/styles.css.d.ts.map +1 -1
  28. package/dist/components/ExpandableCard/index.d.ts.map +1 -1
  29. package/dist/components/ExpandableCard/index.js +28 -20
  30. package/dist/components/FileInput/components/List.d.ts.map +1 -1
  31. package/dist/components/FileInput/components/List.js +15 -2
  32. package/dist/components/FileInput/index.d.ts.map +1 -1
  33. package/dist/components/GlobalAlert/GlobalAlertLink.d.ts +3 -1
  34. package/dist/components/GlobalAlert/GlobalAlertLink.d.ts.map +1 -1
  35. package/dist/components/GlobalAlert/index.d.ts +61 -1
  36. package/dist/components/GlobalAlert/index.d.ts.map +1 -1
  37. package/dist/components/Link/index.d.ts +23 -2
  38. package/dist/components/Link/index.d.ts.map +1 -1
  39. package/dist/components/Link/index.js +26 -14
  40. package/dist/components/List/HeaderCell.d.ts.map +1 -1
  41. package/dist/components/List/HeaderCell.js +3 -1
  42. package/dist/components/List/ListContext.d.ts.map +1 -1
  43. package/dist/components/List/ListContext.js +3 -1
  44. package/dist/components/List/Row.d.ts.map +1 -1
  45. package/dist/components/List/Row.js +14 -5
  46. package/dist/components/List/SkeletonRows.d.ts.map +1 -1
  47. package/dist/components/List/SkeletonRows.js +0 -1
  48. package/dist/components/List/styles.css.d.ts +1 -0
  49. package/dist/components/List/styles.css.d.ts.map +1 -1
  50. package/dist/components/List/styles.css.js +4 -1
  51. package/dist/components/List/variables.css.js +1 -1
  52. package/dist/components/Menu/helpers.d.ts +1 -1
  53. package/dist/components/Menu/index.d.ts +1 -1
  54. package/dist/components/Meter/index.d.ts.map +1 -1
  55. package/dist/components/Meter/index.js +43 -40
  56. package/dist/components/Modal/components/Dialog.d.ts.map +1 -1
  57. package/dist/components/Modal/components/Dialog.js +10 -1
  58. package/dist/components/NumberInput/styles.css.d.ts +1 -1
  59. package/dist/components/Pagination/styles.css.d.ts +2 -2
  60. package/dist/components/Popup/styles.css.js +0 -1
  61. package/dist/components/Popup/variables.css.js +1 -0
  62. package/dist/components/ProgressBar/styles.css.d.ts +1 -1
  63. package/dist/components/ProgressBar/styles.css.js +0 -1
  64. package/dist/components/ProgressBar/variables.css.js +1 -0
  65. package/dist/components/Radio/index.js +22 -22
  66. package/dist/components/Row/styles.css.d.ts +44 -44
  67. package/dist/components/SelectInput/components/Dropdown.d.ts.map +1 -1
  68. package/dist/components/SelectInput/components/Dropdown.js +52 -56
  69. package/dist/components/SelectInput/components/selectBar.css.d.ts +1 -1
  70. package/dist/components/SelectableCard/IllustrationContainer.d.ts +8 -0
  71. package/dist/components/SelectableCard/IllustrationContainer.d.ts.map +1 -0
  72. package/dist/components/SelectableCard/IllustrationContainer.js +66 -0
  73. package/dist/components/SelectableCard/MultiStateInput.d.ts +3 -0
  74. package/dist/components/SelectableCard/MultiStateInput.d.ts.map +1 -0
  75. package/dist/components/SelectableCard/MultiStateInput.js +94 -0
  76. package/dist/components/SelectableCard/SelectableCard.d.ts +7 -0
  77. package/dist/components/SelectableCard/SelectableCard.d.ts.map +1 -0
  78. package/dist/components/SelectableCard/SelectableCard.js +165 -0
  79. package/dist/components/SelectableCard/index.d.ts +1 -33
  80. package/dist/components/SelectableCard/index.d.ts.map +1 -1
  81. package/dist/components/SelectableCard/types.d.ts +32 -0
  82. package/dist/components/SelectableCard/types.d.ts.map +1 -0
  83. package/dist/components/SelectableCardGroup/index.js +1 -1
  84. package/dist/components/SelectableCardOptionGroup/components/Option.js +1 -1
  85. package/dist/components/Separator/index.d.ts.map +1 -1
  86. package/dist/components/Separator/index.js +1 -0
  87. package/dist/components/Skeleton/Donut.d.ts.map +1 -1
  88. package/dist/components/Skeleton/Donut.js +12 -9
  89. package/dist/components/Slider/styles.css.d.ts +1 -1
  90. package/dist/components/Stack/styles.css.d.ts +46 -46
  91. package/dist/components/Stepper/styles.css.d.ts +1 -1
  92. package/dist/components/SwitchButton/Option.js +1 -1
  93. package/dist/components/SwitchButton/index.d.ts.map +1 -1
  94. package/dist/components/SwitchButton/index.js +7 -4
  95. package/dist/components/SwitchButton/styles.css.d.ts +2 -2
  96. package/dist/components/SwitchButton/styles.css.d.ts.map +1 -1
  97. package/dist/components/Table/HeaderRow.d.ts.map +1 -1
  98. package/dist/components/Table/HeaderRow.js +22 -25
  99. package/dist/components/Table/SkeletonRows.d.ts.map +1 -1
  100. package/dist/components/Table/SkeletonRows.js +4 -13
  101. package/dist/components/Tabs/index.d.ts +2 -2
  102. package/dist/components/TextInput/index.d.ts.map +1 -1
  103. package/dist/components/TextInput/index.js +6 -1
  104. package/dist/components/TextInput/styles.css.d.ts +1 -1
  105. package/dist/components/TextInput/styles.css.d.ts.map +1 -1
  106. package/dist/components/Toggle/index.d.ts +2 -7
  107. package/dist/components/Toggle/index.d.ts.map +1 -1
  108. package/dist/components/Toggle/index.js +13 -1
  109. package/dist/components/Tooltip/index.d.ts +1 -1
  110. package/dist/components/UnitInput/index.d.ts.map +1 -1
  111. package/dist/components/UnitInput/index.js +2 -1
  112. package/dist/components/UnitInput/styles.css.d.ts +2 -2
  113. package/dist/components/VerificationCode/styles.css.d.ts +1 -1
  114. package/dist/components/compositions/OptionSelector/__mock__/resources.d.ts.map +1 -1
  115. package/dist/components/compositions/OptionSelector/index.js +1 -1
  116. package/dist/index.js +3 -2
  117. package/dist/theme/ThemeProvider.d.ts.map +1 -1
  118. package/dist/theme/ThemeProvider.js +46 -4
  119. package/dist/theme/index.d.ts +3 -2
  120. package/dist/theme/index.d.ts.map +1 -1
  121. package/dist/theme/index.js +1 -2
  122. package/dist/ui.css +1 -1
  123. package/package.json +3 -3
  124. package/dist/components/SelectableCard/index.js +0 -232
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectInput/components/Dropdown.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAEV,cAAc,EAId,SAAS,EACT,SAAS,EAEV,MAAM,OAAO,CAAA;AAYd,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AA8BnC,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,SAAS,CAAA;IACnB,UAAU,EAAE,SAAS,CAAA;IACrB,oBAAoB,EAAE,KAAK,GAAG,QAAQ,CAAA;IACtC,UAAU,EAAE,OAAO,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,CAAC,CAAC,aAAa,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC,GAAG,SAAS,CAAA;IAC/D,SAAS,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IAC3C,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAA;IACvC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IAClC,aAAa,CAAC,EAAE,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,CAAC,CAAA;IACrD,YAAY,CAAC,EAAE,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC,cAAc,CAAC,CAAA;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAC3C,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,CAAA;CACpE,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,SAAS,CAAA;IACrB,oBAAoB,EAAE,KAAK,GAAG,QAAQ,CAAA;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAA;IACvC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAC3C,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,CAAA;IACnE,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAkuBD,eAAO,MAAM,QAAQ,GAAI,wNAkBtB,aAAa,4CA2Mf,CAAA"}
1
+ {"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectInput/components/Dropdown.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAEV,cAAc,EAId,SAAS,EACT,SAAS,EAEV,MAAM,OAAO,CAAA;AAYd,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AA8BnC,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,SAAS,CAAA;IACnB,UAAU,EAAE,SAAS,CAAA;IACrB,oBAAoB,EAAE,KAAK,GAAG,QAAQ,CAAA;IACtC,UAAU,EAAE,OAAO,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,CAAC,CAAC,aAAa,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC,GAAG,SAAS,CAAA;IAC/D,SAAS,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IAC3C,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAA;IACvC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IAClC,aAAa,CAAC,EAAE,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,CAAC,CAAA;IACrD,YAAY,CAAC,EAAE,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC,cAAc,CAAC,CAAA;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAC3C,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,CAAA;CACpE,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,SAAS,CAAA;IACrB,oBAAoB,EAAE,KAAK,GAAG,QAAQ,CAAA;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAA;IACvC,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAC3C,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,CAAA;IACnE,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAguBD,eAAO,MAAM,QAAQ,GAAI,wNAkBtB,aAAa,4CA2Mf,CAAA"}
@@ -510,63 +510,59 @@ const CreateDropdown = ({
510
510
  {
511
511
  className: dropdownGroupWrapper,
512
512
  id: selectAllGroup ? "items" : void 0,
513
- children: group ? (
514
- // biome-ignore lint/a11y/noInteractiveElementToNoninteractiveRole: to fix
515
- /* @__PURE__ */ jsx(
516
- "button",
517
- {
518
- className: cn(
519
- selectAllGroup ? dropdownGroupSelectable : "",
520
- dropdownGroup
521
- ),
522
- "data-selectgroup": selectAllGroup,
523
- "data-testid": `group-${index}`,
524
- onClick: () => selectAllGroup ? handleSelectGroup(group) : null,
525
- onKeyDown: (event) => {
526
- if ([" ", "Enter"].includes(event.key)) {
527
- event.preventDefault();
528
- handleSelectGroup(group);
529
- }
530
- },
531
- role: "group",
532
- tabIndex: selectAllGroup ? 0 : -1,
533
- type: "button",
534
- children: selectAllGroup ? /* @__PURE__ */ jsx(
535
- Checkbox,
536
- {
537
- checked: selectedData.selectedGroups.includes(
538
- group
539
- ),
540
- className: dropdownCheckbox,
541
- "data-testid": "select-group",
542
- disabled: false,
543
- onChange: () => selectAllGroup ? handleSelectGroup(group) : null,
544
- tabIndex: -1,
545
- value: group,
546
- children: /* @__PURE__ */ jsx(
547
- Text,
548
- {
549
- as: "span",
550
- placement: "left",
551
- sentiment: "neutral",
552
- variant: "caption",
553
- children: group.toUpperCase()
554
- }
555
- )
556
- }
557
- ) : /* @__PURE__ */ jsx(
558
- Text,
559
- {
560
- as: "span",
561
- placement: "left",
562
- sentiment: "neutral",
563
- variant: "caption",
564
- children: group.toUpperCase()
565
- }
566
- )
513
+ children: group ? /* @__PURE__ */ jsx(
514
+ "button",
515
+ {
516
+ className: cn(
517
+ selectAllGroup ? dropdownGroupSelectable : "",
518
+ dropdownGroup
519
+ ),
520
+ "data-selectgroup": selectAllGroup,
521
+ "data-testid": `group-${index}`,
522
+ onClick: () => selectAllGroup ? handleSelectGroup(group) : null,
523
+ onKeyDown: (event) => {
524
+ if ([" ", "Enter"].includes(event.key)) {
525
+ event.preventDefault();
526
+ handleSelectGroup(group);
527
+ }
567
528
  },
568
- group
569
- )
529
+ tabIndex: selectAllGroup ? 0 : -1,
530
+ type: "button",
531
+ children: selectAllGroup ? /* @__PURE__ */ jsx(
532
+ Checkbox,
533
+ {
534
+ checked: selectedData.selectedGroups.includes(
535
+ group
536
+ ),
537
+ className: dropdownCheckbox,
538
+ "data-testid": "select-group",
539
+ disabled: false,
540
+ onChange: () => selectAllGroup ? handleSelectGroup(group) : null,
541
+ tabIndex: -1,
542
+ value: group,
543
+ children: /* @__PURE__ */ jsx(
544
+ Text,
545
+ {
546
+ as: "span",
547
+ placement: "left",
548
+ sentiment: "neutral",
549
+ variant: "caption",
550
+ children: group.toUpperCase()
551
+ }
552
+ )
553
+ }
554
+ ) : /* @__PURE__ */ jsx(
555
+ Text,
556
+ {
557
+ as: "span",
558
+ placement: "left",
559
+ sentiment: "neutral",
560
+ variant: "caption",
561
+ children: group.toUpperCase()
562
+ }
563
+ )
564
+ },
565
+ group
570
566
  ) : null
571
567
  }
572
568
  ) : null,
@@ -1,6 +1,6 @@
1
1
  export declare const maxWidthTag: `var(--${string})`;
2
2
  export declare const minWidthTag: `var(--${string})`;
3
- export declare const selectbarState: Record<"large" | "small", string>;
3
+ export declare const selectbarState: Record<"small" | "large", string>;
4
4
  export declare const selectinputPlaceholder: string;
5
5
  export declare const selectBarBase: string;
6
6
  export declare const selectBar: import("@vanilla-extract/recipes").RuntimeFn<{
@@ -0,0 +1,8 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { SelectableCardProps } from './types';
3
+ export declare const IllustrationContainer: ({ children: subChildren, productIcon, illustration, }: {
4
+ children: ReactNode;
5
+ productIcon: SelectableCardProps["productIcon"];
6
+ illustration: SelectableCardProps["illustration"];
7
+ }) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
8
+ //# sourceMappingURL=IllustrationContainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IllustrationContainer.d.ts","sourceRoot":"","sources":["../../../src/components/SelectableCard/IllustrationContainer.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAElD,eAAO,MAAM,qBAAqB,GAAI,uDAInC;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,WAAW,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAA;IAC/C,YAAY,EAAE,mBAAmB,CAAC,cAAc,CAAC,CAAA;CAClD,4UAoEA,CAAA"}
@@ -0,0 +1,66 @@
1
+ "use client";
2
+ import { jsxs, jsx } from "react/jsx-runtime";
3
+ import * as ProductIcon from "@ultraviolet/icons/product";
4
+ import { useTheme } from "@ultraviolet/themes";
5
+ import { useState, useEffect } from "react";
6
+ import { Stack } from "../Stack/index.js";
7
+ import { illustrationSelectableCard, divSelectableCard, imageSelectableCard } from "./styles.css.js";
8
+ const IllustrationContainer = ({
9
+ children: subChildren,
10
+ productIcon,
11
+ illustration
12
+ }) => {
13
+ const theme = useTheme();
14
+ const [svgContent, setSvgContent] = useState(null);
15
+ const ProductIconUsed = productIcon ? (
16
+ // biome-ignore lint/performance/noDynamicNamespaceImportAccess: to fix
17
+ ProductIcon[`${productIcon.charAt(0).toUpperCase() + productIcon.slice(1)}ProductIcon`]
18
+ ) : null;
19
+ useEffect(() => {
20
+ if (illustration?.endsWith(".svg")) {
21
+ fetch(illustration).then((response) => response.text()).then((svg) => {
22
+ const updatedSvg = svg.replace(
23
+ /fill="[^"]*"/g,
24
+ `fill="${theme.colors.neutral.backgroundStronger}"`
25
+ ).replace(/width="[^"]*"/g, `width="220px"`).replace(/height="[^"]*"/g, `height="220px"`);
26
+ setSvgContent(updatedSvg);
27
+ }).catch(() => null);
28
+ }
29
+ });
30
+ if (ProductIconUsed || illustration) {
31
+ return /* @__PURE__ */ jsxs(
32
+ Stack,
33
+ {
34
+ alignItems: "stretch",
35
+ direction: "row",
36
+ flex: 1,
37
+ justifyContent: "space-between",
38
+ width: "100%",
39
+ children: [
40
+ /* @__PURE__ */ jsx(Stack, { className: illustrationSelectableCard, children: subChildren }),
41
+ /* @__PURE__ */ jsx(Stack, { justifyContent: "center", children: ProductIconUsed ? /* @__PURE__ */ jsx(ProductIconUsed, { size: "large" }) : null }),
42
+ illustration ? /* @__PURE__ */ jsx("div", { className: divSelectableCard, children: illustration.endsWith(".svg") && svgContent ? /* @__PURE__ */ jsx(
43
+ "div",
44
+ {
45
+ className: imageSelectableCard,
46
+ dangerouslySetInnerHTML: { __html: svgContent }
47
+ }
48
+ ) : /* @__PURE__ */ jsx(
49
+ "img",
50
+ {
51
+ alt: "illustration",
52
+ className: imageSelectableCard,
53
+ height: 220,
54
+ src: illustration,
55
+ width: 220
56
+ }
57
+ ) }) : null
58
+ ]
59
+ }
60
+ );
61
+ }
62
+ return subChildren;
63
+ };
64
+ export {
65
+ IllustrationContainer
66
+ };
@@ -0,0 +1,3 @@
1
+ import type { MultiStateProps } from './types';
2
+ export declare const MultiStateInput: ({ checked, disabled, id, label, "aria-label": ariaLabel, innerRef, isError, name, onBlur, onChange, onFocus, type, value, }: MultiStateProps) => import("react/jsx-runtime").JSX.Element | null;
3
+ //# sourceMappingURL=MultiStateInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiStateInput.d.ts","sourceRoot":"","sources":["../../../src/components/SelectableCard/MultiStateInput.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,eAAO,MAAM,eAAe,GAAI,6HAc7B,eAAe,mDA4EjB,CAAA"}
@@ -0,0 +1,94 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Checkbox } from "../Checkbox/index.js";
3
+ import { Radio } from "../Radio/index.js";
4
+ import { Toggle } from "../Toggle/index.js";
5
+ import { selectableElementSelectableCard } from "./styles.css.js";
6
+ const MultiStateInput = ({
7
+ checked,
8
+ disabled,
9
+ id,
10
+ label,
11
+ "aria-label": ariaLabel,
12
+ innerRef,
13
+ isError,
14
+ name,
15
+ onBlur,
16
+ onChange,
17
+ onFocus,
18
+ type,
19
+ value
20
+ }) => {
21
+ if (!type) {
22
+ return null;
23
+ }
24
+ if (type === "checkbox") {
25
+ const labelProps = label ? { "aria-label": void 0, children: label } : { "aria-label": ariaLabel };
26
+ return /* @__PURE__ */ jsx(
27
+ Checkbox,
28
+ {
29
+ checked,
30
+ className: selectableElementSelectableCard,
31
+ "data-error": isError,
32
+ disabled,
33
+ error: isError,
34
+ id,
35
+ name,
36
+ onBlur,
37
+ onChange,
38
+ onFocus,
39
+ ref: innerRef,
40
+ tabIndex: -1,
41
+ value,
42
+ ...labelProps
43
+ }
44
+ );
45
+ }
46
+ if (type === "radio") {
47
+ const labelProps = label ? { label } : { "aria-label": ariaLabel };
48
+ return /* @__PURE__ */ jsx(
49
+ Radio,
50
+ {
51
+ checked,
52
+ className: selectableElementSelectableCard,
53
+ "data-error": isError,
54
+ disabled,
55
+ error: isError,
56
+ id,
57
+ name,
58
+ onBlur,
59
+ onChange,
60
+ onFocus,
61
+ ref: innerRef,
62
+ tabIndex: -1,
63
+ value,
64
+ ...labelProps
65
+ }
66
+ );
67
+ }
68
+ if (type === "toggle") {
69
+ const labelProps = label ? { label } : { "aria-label": ariaLabel };
70
+ return /* @__PURE__ */ jsx(
71
+ Toggle,
72
+ {
73
+ checked,
74
+ className: selectableElementSelectableCard,
75
+ "data-error": isError,
76
+ disabled,
77
+ error: isError,
78
+ id,
79
+ name,
80
+ onBlur,
81
+ onChange,
82
+ onFocus,
83
+ ref: innerRef,
84
+ tabIndex: -1,
85
+ value,
86
+ ...labelProps
87
+ }
88
+ );
89
+ }
90
+ return null;
91
+ };
92
+ export {
93
+ MultiStateInput
94
+ };
@@ -0,0 +1,7 @@
1
+ import type { SelectableCardProps } from './types';
2
+ /**
3
+ * SelectableCard is a component that can be used to create a radio or checkbox card.
4
+ * It can be used to create a list of selectable items or a single selectable item.
5
+ */
6
+ export declare const SelectableCard: import("react").ForwardRefExoticComponent<SelectableCardProps & import("react").RefAttributes<HTMLDivElement>>;
7
+ //# sourceMappingURL=SelectableCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectableCard.d.ts","sourceRoot":"","sources":["../../../src/components/SelectableCard/SelectableCard.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAGlD;;;GAGG;AACH,eAAO,MAAM,cAAc,gHAyL1B,CAAA"}
@@ -0,0 +1,165 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { cn } from "@ultraviolet/utils";
4
+ import { assignInlineVars } from "@vanilla-extract/dynamic";
5
+ import { forwardRef, useRef, useMemo, useCallback } from "react";
6
+ import { Stack } from "../Stack/index.js";
7
+ import { Tooltip } from "../Tooltip/index.js";
8
+ import { IllustrationContainer } from "./IllustrationContainer.js";
9
+ import { MultiStateInput } from "./MultiStateInput.js";
10
+ import { stackSelectableCard, indentedCard, containerSelectableCard, labelContainerSelectableCardLabel, labelContainerSelectableCardNoLabel } from "./styles.css.js";
11
+ import { widthSelectable, labelDisplay, inputDisplay } from "./variables.css.js";
12
+ const SelectableCard = forwardRef(
13
+ ({
14
+ name,
15
+ value,
16
+ onChange,
17
+ showTick = false,
18
+ type = "radio",
19
+ checked = false,
20
+ disabled = false,
21
+ children,
22
+ className,
23
+ isError,
24
+ onFocus,
25
+ onBlur,
26
+ tooltip,
27
+ id,
28
+ label,
29
+ "data-testid": dataTestId,
30
+ productIcon,
31
+ illustration,
32
+ "aria-label": ariaLabel,
33
+ style,
34
+ indented = true
35
+ }, ref) => {
36
+ const innerRef = useRef(null);
37
+ const childrenRef = useRef(null);
38
+ const image = useMemo(() => {
39
+ if (illustration) {
40
+ return "illustration";
41
+ }
42
+ if (productIcon) {
43
+ return "icon";
44
+ }
45
+ return "none";
46
+ }, [illustration, productIcon]);
47
+ const ParentContainer = useCallback(
48
+ ({ children: subChildren }) => {
49
+ if (tooltip) {
50
+ return /* @__PURE__ */ jsx(Stack, { flex: 1, children: /* @__PURE__ */ jsx(Tooltip, { containerFullHeight: true, text: tooltip, children: subChildren }) });
51
+ }
52
+ return /* @__PURE__ */ jsx(Tooltip, { children: subChildren });
53
+ },
54
+ [tooltip]
55
+ );
56
+ const onKeyDown = useCallback(
57
+ (event) => {
58
+ if (event.key === " " && innerRef?.current) {
59
+ event.preventDefault();
60
+ innerRef.current.click();
61
+ }
62
+ },
63
+ [innerRef]
64
+ );
65
+ const isComplexChildren = ["function", "array", "object"].includes(
66
+ typeof children
67
+ );
68
+ const onClickContainer = useCallback(
69
+ (event) => {
70
+ if (innerRef.current && !disabled) {
71
+ const inputElement = innerRef.current;
72
+ const labelElement = document.querySelector(
73
+ `label[for="${inputElement.id}"]`
74
+ );
75
+ const targetNode = event.target;
76
+ if (!(inputElement.contains(targetNode) || labelElement?.contains(targetNode))) {
77
+ inputElement.click();
78
+ }
79
+ }
80
+ },
81
+ [disabled]
82
+ );
83
+ return /* @__PURE__ */ jsx(ParentContainer, { children: /* @__PURE__ */ jsx(
84
+ Stack,
85
+ {
86
+ alignItems: "flex-start",
87
+ className: cn(
88
+ className,
89
+ containerSelectableCard({
90
+ cursor: (type === "checkbox" || type === "toggle") && isComplexChildren ? "default" : "custom",
91
+ image
92
+ }),
93
+ label ? labelContainerSelectableCardLabel : labelContainerSelectableCardNoLabel
94
+ ),
95
+ "data-checked": checked,
96
+ "data-disabled": disabled,
97
+ "data-error": isError,
98
+ "data-testid": dataTestId,
99
+ "data-type": type,
100
+ direction: label ? "column" : "row",
101
+ flex: 1,
102
+ gap: 0.5,
103
+ onClick: (type === "checkbox" || type === "toggle") && isComplexChildren ? void 0 : onClickContainer,
104
+ onKeyDown,
105
+ ref,
106
+ role: "button",
107
+ style: {
108
+ ...assignInlineVars({
109
+ [inputDisplay]: showTick ? "inline" : "none",
110
+ [labelDisplay]: showTick || label ? "inline" : "none",
111
+ [widthSelectable]: label ? "100%" : "auto"
112
+ }),
113
+ ...style
114
+ },
115
+ tabIndex: disabled ? void 0 : 0,
116
+ children: /* @__PURE__ */ jsxs(
117
+ IllustrationContainer,
118
+ {
119
+ illustration,
120
+ productIcon,
121
+ children: [
122
+ /* @__PURE__ */ jsx(
123
+ MultiStateInput,
124
+ {
125
+ "aria-label": ariaLabel,
126
+ checked,
127
+ "data-error": isError,
128
+ disabled,
129
+ id,
130
+ innerRef,
131
+ isError,
132
+ label,
133
+ name,
134
+ onBlur,
135
+ onChange,
136
+ onFocus,
137
+ type,
138
+ value
139
+ }
140
+ ),
141
+ children ? /* @__PURE__ */ jsx(
142
+ Stack,
143
+ {
144
+ className: cn(
145
+ stackSelectableCard,
146
+ !!label && showTick && indented ? indentedCard : void 0
147
+ ),
148
+ "data-has-default-cursor": (type === "checkbox" || type === "toggle") && isComplexChildren,
149
+ "data-has-label": !!label && showTick,
150
+ onKeyDown: (event) => event.stopPropagation(),
151
+ ref: childrenRef,
152
+ width: "100%",
153
+ children: typeof children === "function" ? children({ checked, disabled }) : children
154
+ }
155
+ ) : null
156
+ ]
157
+ }
158
+ )
159
+ }
160
+ ) });
161
+ }
162
+ );
163
+ export {
164
+ SelectableCard
165
+ };
@@ -1,34 +1,2 @@
1
- import * as ProductIcon from '@ultraviolet/icons/product';
2
- import type { ChangeEventHandler, CSSProperties, FocusEventHandler, ReactNode } from 'react';
3
- import type { LabelProp, PascalToCamelCaseWithoutSuffix } from '../../types';
4
- export type SelectableCardProps = {
5
- name?: string;
6
- children?: (({ disabled, checked, }: Pick<SelectableCardProps, 'checked' | 'disabled'>) => ReactNode) | ReactNode;
7
- value: string | number;
8
- onChange: ChangeEventHandler<HTMLInputElement>;
9
- showTick?: boolean;
10
- type?: 'radio' | 'checkbox';
11
- disabled?: boolean;
12
- checked?: boolean;
13
- className?: string;
14
- isError?: boolean;
15
- onFocus?: FocusEventHandler<HTMLInputElement>;
16
- onBlur?: FocusEventHandler<HTMLInputElement>;
17
- id?: string;
18
- tooltip?: string;
19
- 'data-testid'?: string;
20
- style?: CSSProperties;
21
- indented?: boolean;
22
- } & ({
23
- illustration?: string;
24
- productIcon?: never;
25
- } | {
26
- productIcon?: PascalToCamelCaseWithoutSuffix<keyof typeof ProductIcon, 'ProductIcon'>;
27
- illustration?: never;
28
- }) & LabelProp;
29
- /**
30
- * SelectableCard is a component that can be used to create a radio or checkbox card.
31
- * It can be used to create a list of selectable items or a single selectable item.
32
- */
33
- export declare const SelectableCard: import("react").ForwardRefExoticComponent<SelectableCardProps & import("react").RefAttributes<HTMLDivElement>>;
1
+ export { SelectableCard } from './SelectableCard';
34
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SelectableCard/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,WAAW,MAAM,4BAA4B,CAAA;AAIzD,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EAIjB,SAAS,EACV,MAAM,OAAO,CAAA;AASd,OAAO,KAAK,EAAE,SAAS,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAA;AAkB5E,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EACL,CAAC,CAAC,EACA,QAAQ,EACR,OAAO,GACR,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,UAAU,CAAC,KAAK,SAAS,CAAC,GACnE,SAAS,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,QAAQ,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAA;IAC7C,MAAM,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAA;IAC5C,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,GAAG,CACA;IACE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,KAAK,CAAA;CACpB,GACD;IACE,WAAW,CAAC,EAAE,8BAA8B,CAC1C,MAAM,OAAO,WAAW,EACxB,aAAa,CACd,CAAA;IACD,YAAY,CAAC,EAAE,KAAK,CAAA;CACrB,CACJ,GACC,SAAS,CAAA;AAEX;;;GAGG;AACH,eAAO,MAAM,cAAc,gHAkR1B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SelectableCard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA"}
@@ -0,0 +1,32 @@
1
+ import type * as ProductIcon from '@ultraviolet/icons/product';
2
+ import type { ChangeEventHandler, CSSProperties, FocusEventHandler, ReactNode, RefObject } from 'react';
3
+ import type { LabelProp, PascalToCamelCaseWithoutSuffix } from '../../types';
4
+ export type SelectableCardProps = {
5
+ name?: string;
6
+ children?: (({ disabled, checked, }: Pick<SelectableCardProps, 'checked' | 'disabled'>) => ReactNode) | ReactNode;
7
+ value: string | number;
8
+ onChange: ChangeEventHandler<HTMLInputElement>;
9
+ showTick?: boolean;
10
+ type?: 'radio' | 'checkbox' | 'toggle';
11
+ disabled?: boolean;
12
+ checked?: boolean;
13
+ className?: string;
14
+ isError?: boolean;
15
+ onFocus?: FocusEventHandler<HTMLInputElement>;
16
+ onBlur?: FocusEventHandler<HTMLInputElement>;
17
+ id?: string;
18
+ tooltip?: string;
19
+ 'data-testid'?: string;
20
+ style?: CSSProperties;
21
+ indented?: boolean;
22
+ } & ({
23
+ illustration?: string;
24
+ productIcon?: never;
25
+ } | {
26
+ productIcon?: PascalToCamelCaseWithoutSuffix<keyof typeof ProductIcon, 'ProductIcon'>;
27
+ illustration?: never;
28
+ }) & LabelProp;
29
+ export type MultiStateProps = Pick<SelectableCardProps, 'type' | 'checked' | 'isError' | 'id' | 'disabled' | 'onFocus' | 'label' | 'aria-label' | 'onChange' | 'name' | 'showTick' | 'onBlur' | 'value'> & {
30
+ innerRef: RefObject<HTMLInputElement | null>;
31
+ };
32
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/SelectableCard/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,WAAW,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,SAAS,EACT,SAAS,EACV,MAAM,OAAO,CAAA;AAEd,OAAO,KAAK,EAAE,SAAS,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAA;AAE5E,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EACL,CAAC,CAAC,EACA,QAAQ,EACR,OAAO,GACR,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,UAAU,CAAC,KAAK,SAAS,CAAC,GACnE,SAAS,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,QAAQ,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAA;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAA;IAC7C,MAAM,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAA;IAC5C,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,GAAG,CACA;IACE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,KAAK,CAAA;CACpB,GACD;IACE,WAAW,CAAC,EAAE,8BAA8B,CAC1C,MAAM,OAAO,WAAW,EACxB,aAAa,CACd,CAAA;IACD,YAAY,CAAC,EAAE,KAAK,CAAA;CACrB,CACJ,GACC,SAAS,CAAA;AAEX,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,mBAAmB,EACjB,MAAM,GACN,SAAS,GACT,SAAS,GACT,IAAI,GACJ,UAAU,GACV,SAAS,GACT,OAAO,GACP,YAAY,GACZ,UAAU,GACV,MAAM,GACN,UAAU,GACV,QAAQ,GACR,OAAO,CACV,GAAG;IACF,QAAQ,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;CAC7C,CAAA"}
@@ -4,10 +4,10 @@ import { cn } from "@ultraviolet/utils";
4
4
  import { useMemo, createContext, useContext } from "react";
5
5
  import { Label } from "../Label/index.js";
6
6
  import { Row } from "../Row/index.js";
7
- import { SelectableCard } from "../SelectableCard/index.js";
8
7
  import { Stack } from "../Stack/index.js";
9
8
  import { Text } from "../Text/index.js";
10
9
  import { selectableCardGroupFieldSet } from "./styles.css.js";
10
+ import { SelectableCard } from "../SelectableCard/SelectableCard.js";
11
11
  const SelectableCardGroupContext = createContext(void 0);
12
12
  const CardSelectableCard = ({
13
13
  value,
@@ -3,12 +3,12 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { cn } from "@ultraviolet/utils";
4
4
  import { useId } from "react";
5
5
  import { Label } from "../../Label/index.js";
6
- import { SelectableCard } from "../../SelectableCard/index.js";
7
6
  import { SelectInput } from "../../SelectInput/index.js";
8
7
  import { Stack } from "../../Stack/index.js";
9
8
  import { useSelectableCardOptionGroup } from "../Provider.js";
10
9
  import { optionFullHeight, optionPadded, optionSelectInput, optionSelectInputDisabled, optionSelectInputError, selectableCard } from "../styles.css.js";
11
10
  import { Image } from "./Image.js";
11
+ import { SelectableCard } from "../../SelectableCard/SelectableCard.js";
12
12
  const Option = ({
13
13
  value,
14
14
  label,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Separator/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAGrD,KAAK,cAAc,GAAG;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,GAAG,iBAAiB,CAAA;AAErB;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,6FAQvB,cAAc,4CAkCd,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Separator/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAGrD,KAAK,cAAc,GAAG;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,GAAG,iBAAiB,CAAA;AAErB;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,6FAQvB,cAAc,4CAmCd,CAAA"}
@@ -13,6 +13,7 @@ const Separator = ({
13
13
  style
14
14
  }) => children ? (
15
15
  // biome-ignore lint/a11y/useFocusableInteractive: to fix
16
+ // biome-ignore lint/a11y/useSemanticElements: cannot have a separator inside a separator
16
17
  /* @__PURE__ */ jsxs(
17
18
  "div",
18
19
  {
@@ -1 +1 @@
1
- {"version":3,"file":"Donut.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/Donut.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,KAAK,+CAyBjB,CAAA"}
1
+ {"version":3,"file":"Donut.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/Donut.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,KAAK,+CA0BjB,CAAA"}
@@ -3,15 +3,18 @@ import { jsxs, jsx } from "react/jsx-runtime";
3
3
  import { Line } from "./Line.js";
4
4
  import { donutSkeletonContainer, donutSkeletonSvg, donutSkeletonCircle, CIRCLE_SIZE, donutSkeletonLineList } from "./stylesVariants.css.js";
5
5
  const Donut = () => /* @__PURE__ */ jsxs("div", { className: donutSkeletonContainer, children: [
6
- /* @__PURE__ */ jsx("svg", { className: donutSkeletonSvg, children: /* @__PURE__ */ jsx(
7
- "circle",
8
- {
9
- className: donutSkeletonCircle,
10
- cx: `${CIRCLE_SIZE / 2}rem`,
11
- cy: `${CIRCLE_SIZE / 2}rem`,
12
- r: "90"
13
- }
14
- ) }),
6
+ /* @__PURE__ */ jsxs("svg", { className: donutSkeletonSvg, children: [
7
+ /* @__PURE__ */ jsx("title", { children: "donut skeleton" }),
8
+ /* @__PURE__ */ jsx(
9
+ "circle",
10
+ {
11
+ className: donutSkeletonCircle,
12
+ cx: `${CIRCLE_SIZE / 2}rem`,
13
+ cy: `${CIRCLE_SIZE / 2}rem`,
14
+ r: "90"
15
+ }
16
+ )
17
+ ] }),
15
18
  /* @__PURE__ */ jsxs("ul", { className: donutSkeletonLineList, children: [
16
19
  /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Line, {}) }),
17
20
  /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Line, {}) }),