@seed-design/lynx-react 0.4.1 → 0.5.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 (96) hide show
  1. package/lib/components/Accordion/Accordion.d.ts +56 -0
  2. package/lib/components/Accordion/Accordion.d.ts.map +1 -0
  3. package/lib/components/Accordion/Accordion.jsx +210 -0
  4. package/lib/components/Accordion/Accordion.namespace.d.ts +2 -0
  5. package/lib/components/Accordion/Accordion.namespace.d.ts.map +1 -0
  6. package/lib/components/Accordion/Accordion.namespace.js +17 -0
  7. package/lib/components/Accordion/index.d.ts +3 -0
  8. package/lib/components/Accordion/index.d.ts.map +1 -0
  9. package/lib/components/ActionButton/ActionButton.jsx +6 -6
  10. package/lib/components/AppBar/AppBar.jsx +1 -1
  11. package/lib/components/Badge/Badge.jsx +1 -1
  12. package/lib/components/BottomSheet/BottomSheet.d.ts.map +1 -1
  13. package/lib/components/BottomSheet/BottomSheet.jsx +6 -3
  14. package/lib/components/Box/Box.jsx +1 -1
  15. package/lib/components/Callout/Callout.d.ts +32 -0
  16. package/lib/components/Callout/Callout.d.ts.map +1 -0
  17. package/lib/components/Callout/Callout.jsx +113 -0
  18. package/lib/components/Callout/Callout.namespace.d.ts +2 -0
  19. package/lib/components/Callout/Callout.namespace.d.ts.map +1 -0
  20. package/lib/components/Callout/Callout.namespace.js +13 -0
  21. package/lib/components/Callout/index.d.ts +3 -0
  22. package/lib/components/Callout/index.d.ts.map +1 -0
  23. package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
  24. package/lib/components/Checkbox/Checkbox.jsx +36 -5
  25. package/lib/components/Chip/Chip.d.ts +66 -0
  26. package/lib/components/Chip/Chip.d.ts.map +1 -0
  27. package/lib/components/Chip/Chip.jsx +159 -0
  28. package/lib/components/Chip/Chip.namespace.d.ts +2 -0
  29. package/lib/components/Chip/Chip.namespace.d.ts.map +1 -0
  30. package/lib/components/Chip/Chip.namespace.js +16 -0
  31. package/lib/components/Chip/index.d.ts +3 -0
  32. package/lib/components/Chip/index.d.ts.map +1 -0
  33. package/lib/components/Divider/Divider.d.ts +31 -0
  34. package/lib/components/Divider/Divider.d.ts.map +1 -0
  35. package/lib/components/Divider/Divider.jsx +26 -0
  36. package/lib/components/Divider/index.d.ts +2 -0
  37. package/lib/components/Divider/index.d.ts.map +1 -0
  38. package/lib/components/Field/Field.jsx +1 -1
  39. package/lib/components/Icon/Icon.jsx +2 -2
  40. package/lib/components/ProgressCircle/ProgressCircle.jsx +2 -2
  41. package/lib/components/RadioGroup/RadioGroup.jsx +2 -2
  42. package/lib/components/Stack/Stack.jsx +1 -1
  43. package/lib/components/Switch/Switch.jsx +2 -2
  44. package/lib/components/Tabs/Tabs.d.ts +59 -0
  45. package/lib/components/Tabs/Tabs.d.ts.map +1 -0
  46. package/lib/components/Tabs/Tabs.jsx +419 -0
  47. package/lib/components/Tabs/Tabs.namespace.d.ts +2 -0
  48. package/lib/components/Tabs/Tabs.namespace.d.ts.map +1 -0
  49. package/lib/components/Tabs/Tabs.namespace.js +14 -0
  50. package/lib/components/Tabs/Tabs.utils.d.ts +18 -0
  51. package/lib/components/Tabs/Tabs.utils.d.ts.map +1 -0
  52. package/lib/components/Tabs/Tabs.utils.js +37 -0
  53. package/lib/components/Tabs/index.d.ts +3 -0
  54. package/lib/components/Tabs/index.d.ts.map +1 -0
  55. package/lib/components/TagGroup/TagGroup.jsx +2 -2
  56. package/lib/components/Text/Text.jsx +2 -2
  57. package/lib/components/TextField/TextField.jsx +2 -2
  58. package/lib/components/index.d.ts +5 -0
  59. package/lib/components/index.d.ts.map +1 -1
  60. package/lib/hooks/useIconColor.d.ts +2 -1
  61. package/lib/hooks/useIconColor.d.ts.map +1 -1
  62. package/lib/hooks/useIconColor.js +29 -5
  63. package/lib/hooks/usePressTap.d.ts.map +1 -1
  64. package/lib/hooks/usePressTap.js +1 -0
  65. package/lib/index.js +14 -5
  66. package/lib/utils/create-slot-recipe-context.jsx +1 -1
  67. package/package.json +2 -2
  68. package/src/components/Accordion/Accordion.namespace.ts +22 -0
  69. package/src/components/Accordion/Accordion.test.tsx +129 -0
  70. package/src/components/Accordion/Accordion.tsx +453 -0
  71. package/src/components/Accordion/index.ts +24 -0
  72. package/src/components/BottomSheet/BottomSheet.test.tsx +24 -0
  73. package/src/components/BottomSheet/BottomSheet.tsx +14 -2
  74. package/src/components/Callout/Callout.namespace.ts +14 -0
  75. package/src/components/Callout/Callout.test.tsx +188 -0
  76. package/src/components/Callout/Callout.tsx +272 -0
  77. package/src/components/Callout/index.ts +16 -0
  78. package/src/components/Checkbox/Checkbox.test.tsx +176 -0
  79. package/src/components/Checkbox/Checkbox.tsx +36 -2
  80. package/src/components/Chip/Chip.namespace.ts +20 -0
  81. package/src/components/Chip/Chip.test.tsx +113 -0
  82. package/src/components/Chip/Chip.tsx +373 -0
  83. package/src/components/Chip/index.ts +22 -0
  84. package/src/components/Divider/Divider.test.tsx +73 -0
  85. package/src/components/Divider/Divider.tsx +76 -0
  86. package/src/components/Divider/index.ts +1 -0
  87. package/src/components/Icon/Icon.test.tsx +129 -0
  88. package/src/components/Tabs/Tabs.namespace.ts +16 -0
  89. package/src/components/Tabs/Tabs.test.tsx +221 -0
  90. package/src/components/Tabs/Tabs.tsx +727 -0
  91. package/src/components/Tabs/Tabs.utils.ts +56 -0
  92. package/src/components/Tabs/index.ts +2 -0
  93. package/src/components/index.ts +5 -0
  94. package/src/hooks/useIconColor.ts +43 -5
  95. package/src/hooks/usePressTap.test.ts +13 -0
  96. package/src/hooks/usePressTap.ts +1 -0
package/lib/index.js CHANGED
@@ -1,11 +1,14 @@
1
+ import { useControllableState } from "./hooks/useControllableState.js";
1
2
  import { usePressTap } from "./hooks/usePressTap.js";
2
3
  import { createSlotRecipeContext } from "./utils/create-slot-recipe-context.jsx";
3
- import { capitalize, resolveRecipeToken } from "./utils/resolve-recipe-token.js";
4
+ import { useIconColor } from "./hooks/useIconColor.js";
4
5
  import { useSafeArea } from "./hooks/useSafeArea.js";
6
+ import { Icon, PrefixIcon, SuffixIcon } from "./components/Icon/Icon.jsx";
7
+ import { AccordionBody, AccordionContent, AccordionDescription, AccordionHeader, AccordionItem, AccordionPrefix, AccordionRoot, AccordionSuffixIcon, AccordionTitle, AccordionTrigger } from "./components/Accordion/Accordion.jsx";
8
+ import { Accordion_namespace_exports } from "./components/Accordion/Accordion.namespace.js";
9
+ import { capitalize, resolveRecipeToken } from "./utils/resolve-recipe-token.js";
5
10
  import { ProgressCircleRange, ProgressCircleRoot } from "./components/ProgressCircle/ProgressCircle.jsx";
6
11
  import { ProgressCircle_namespace_exports } from "./components/ProgressCircle/ProgressCircle.namespace.js";
7
- import { useIconColor } from "./hooks/useIconColor.js";
8
- import { Icon, PrefixIcon, SuffixIcon } from "./components/Icon/Icon.jsx";
9
12
  import { ActionButton } from "./components/ActionButton/ActionButton.jsx";
10
13
  import { AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSlot, AppBarSubtitle, AppBarTitle } from "./components/AppBar/AppBar.jsx";
11
14
  import { AppBar_namespace_exports } from "./components/AppBar/AppBar.namespace.js";
@@ -13,10 +16,14 @@ import { Badge } from "./components/Badge/Badge.jsx";
13
16
  import { Box } from "./components/Box/Box.jsx";
14
17
  import { BottomSheetBackdrop, BottomSheetBody, BottomSheetContent, BottomSheetDescription, BottomSheetFooter, BottomSheetHandle, BottomSheetHeader, BottomSheetPositioner, BottomSheetRoot, BottomSheetTitle, BottomSheetTrigger } from "./components/BottomSheet/BottomSheet.jsx";
15
18
  import { BottomSheet_namespace_exports } from "./components/BottomSheet/BottomSheet.namespace.js";
16
- import { useControllableState } from "./hooks/useControllableState.js";
19
+ import { CalloutCloseButton, CalloutContent, CalloutDescription, CalloutLink, CalloutRoot, CalloutTitle } from "./components/Callout/Callout.jsx";
20
+ import { Callout_namespace_exports } from "./components/Callout/Callout.namespace.js";
17
21
  import { splitMultipleVariantsProps } from "./utils/split-multiple-variants-props.js";
18
22
  import { CheckboxControl, CheckboxGroup, CheckboxIndicator, CheckboxLabel, CheckboxRoot } from "./components/Checkbox/Checkbox.jsx";
19
23
  import { Checkbox_namespace_exports } from "./components/Checkbox/Checkbox.namespace.js";
24
+ import { ChipButton, ChipLabel, ChipPrefixAvatar, ChipPrefixIcon, ChipRadioItem, ChipRadioRoot, ChipRoot, ChipSuffixIcon, ChipToggle } from "./components/Chip/Chip.jsx";
25
+ import { Chip_namespace_exports } from "./components/Chip/Chip.namespace.js";
26
+ import { Divider } from "./components/Divider/Divider.jsx";
20
27
  import { FieldCharacterCount, FieldDescription, FieldErrorMessage, FieldFooter, FieldHeader, FieldIndicatorText, FieldLabel, FieldRequiredIndicator, FieldRoot } from "./components/Field/Field.jsx";
21
28
  import { Field_namespace_exports } from "./components/Field/Field.namespace.js";
22
29
  import { KeyboardAvoidingScrollView } from "./components/KeyboardAvoidingScrollView/KeyboardAvoidingScrollView.jsx";
@@ -25,6 +32,8 @@ import { RadioGroup_namespace_exports } from "./components/RadioGroup/RadioGroup
25
32
  import { HStack, VStack } from "./components/Stack/Stack.jsx";
26
33
  import { SwitchControl, SwitchLabel, SwitchRoot, SwitchThumb } from "./components/Switch/Switch.jsx";
27
34
  import { Switch_namespace_exports } from "./components/Switch/Switch.namespace.js";
35
+ import { TabsCarousel, TabsCarouselCamera, TabsContent, TabsIndicator, TabsList, TabsRoot, TabsTrigger } from "./components/Tabs/Tabs.jsx";
36
+ import { Tabs_namespace_exports } from "./components/Tabs/Tabs.namespace.js";
28
37
  import { TagGroupItem, TagGroupItemLabel, TagGroupRoot } from "./components/TagGroup/TagGroup.jsx";
29
38
  import { TagGroup_namespace_exports } from "./components/TagGroup/TagGroup.namespace.js";
30
39
  import { Text } from "./components/Text/Text.jsx";
@@ -33,4 +42,4 @@ import { useTextFieldWithGraphemes } from "./components/TextField/useTextFieldWi
33
42
  import { TextField_namespace_exports } from "./components/TextField/TextField.namespace.js";
34
43
  import { getSeedClassName } from "./utils/get-seed-class-name.js";
35
44
  import { useSeedClassName } from "./hooks/useSeedClassName.js";
36
- export { ActionButton, AppBar_namespace_exports as AppBar, AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSlot, AppBarSubtitle, AppBarTitle, Badge, BottomSheet_namespace_exports as BottomSheet, BottomSheetBackdrop, BottomSheetBody, BottomSheetContent, BottomSheetDescription, BottomSheetFooter, BottomSheetHandle, BottomSheetHeader, BottomSheetPositioner, BottomSheetRoot, BottomSheetTitle, BottomSheetTrigger, Box, Checkbox_namespace_exports as Checkbox, CheckboxControl, CheckboxGroup, CheckboxIndicator, CheckboxLabel, CheckboxRoot, Field_namespace_exports as Field, FieldCharacterCount, FieldDescription, FieldErrorMessage, FieldFooter, FieldHeader, FieldIndicatorText, FieldLabel, FieldRequiredIndicator, FieldRoot, HStack, Icon, KeyboardAvoidingScrollView, PrefixIcon, ProgressCircle_namespace_exports as ProgressCircle, ProgressCircleRange, ProgressCircleRoot, RadioGroup_namespace_exports as RadioGroup, RadioGroupItem, RadioGroupItemControl, RadioGroupItemIndicator, RadioGroupItemLabel, RadioGroupRoot, SuffixIcon, Switch_namespace_exports as Switch, SwitchControl, SwitchLabel, SwitchRoot, SwitchThumb, TagGroup_namespace_exports as TagGroup, TagGroupItem, TagGroupItemLabel, TagGroupRoot, Text, TextField_namespace_exports as TextField, TextFieldInput, TextFieldPrefixIcon, TextFieldPrefixText, TextFieldRoot, TextFieldSuffixIcon, TextFieldSuffixText, TextFieldTextarea, VStack, capitalize, createSlotRecipeContext, getSeedClassName, resolveRecipeToken, splitMultipleVariantsProps, useControllableState, useIconColor, usePressTap, useSafeArea, useSeedClassName, useTextFieldWithGraphemes };
45
+ export { Accordion_namespace_exports as Accordion, AccordionBody, AccordionContent, AccordionDescription, AccordionHeader, AccordionItem, AccordionPrefix, AccordionRoot, AccordionSuffixIcon, AccordionTitle, AccordionTrigger, ActionButton, AppBar_namespace_exports as AppBar, AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSlot, AppBarSubtitle, AppBarTitle, Badge, BottomSheet_namespace_exports as BottomSheet, BottomSheetBackdrop, BottomSheetBody, BottomSheetContent, BottomSheetDescription, BottomSheetFooter, BottomSheetHandle, BottomSheetHeader, BottomSheetPositioner, BottomSheetRoot, BottomSheetTitle, BottomSheetTrigger, Box, Callout_namespace_exports as Callout, CalloutCloseButton, CalloutContent, CalloutDescription, CalloutLink, CalloutRoot, CalloutTitle, Checkbox_namespace_exports as Checkbox, CheckboxControl, CheckboxGroup, CheckboxIndicator, CheckboxLabel, CheckboxRoot, Chip_namespace_exports as Chip, ChipButton, ChipLabel, ChipPrefixAvatar, ChipPrefixIcon, ChipRadioItem, ChipRadioRoot, ChipRoot, ChipSuffixIcon, ChipToggle, Divider, Field_namespace_exports as Field, FieldCharacterCount, FieldDescription, FieldErrorMessage, FieldFooter, FieldHeader, FieldIndicatorText, FieldLabel, FieldRequiredIndicator, FieldRoot, HStack, Icon, KeyboardAvoidingScrollView, PrefixIcon, ProgressCircle_namespace_exports as ProgressCircle, ProgressCircleRange, ProgressCircleRoot, RadioGroup_namespace_exports as RadioGroup, RadioGroupItem, RadioGroupItemControl, RadioGroupItemIndicator, RadioGroupItemLabel, RadioGroupRoot, SuffixIcon, Switch_namespace_exports as Switch, SwitchControl, SwitchLabel, SwitchRoot, SwitchThumb, Tabs_namespace_exports as Tabs, TabsCarousel, TabsCarouselCamera, TabsContent, TabsIndicator, TabsList, TabsRoot, TabsTrigger, TagGroup_namespace_exports as TagGroup, TagGroupItem, TagGroupItemLabel, TagGroupRoot, Text, TextField_namespace_exports as TextField, TextFieldInput, TextFieldPrefixIcon, TextFieldPrefixText, TextFieldRoot, TextFieldSuffixIcon, TextFieldSuffixText, TextFieldTextarea, VStack, capitalize, createSlotRecipeContext, getSeedClassName, resolveRecipeToken, splitMultipleVariantsProps, useControllableState, useIconColor, usePressTap, useSafeArea, useSeedClassName, useTextFieldWithGraphemes };
@@ -1,5 +1,5 @@
1
- import clsx from "clsx";
2
1
  import { createContext, forwardRef, useContext } from "@lynx-js/react";
2
+ import clsx from "clsx";
3
3
  //#region src/utils/create-slot-recipe-context.tsx
4
4
  function assertNotIntrinsicComponent(Component, caller) {
5
5
  if (typeof Component !== "string") return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seed-design/lynx-react",
3
- "version": "0.4.1",
3
+ "version": "0.5.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/daangn/seed-design.git",
@@ -39,7 +39,7 @@
39
39
  "devDependencies": {
40
40
  "@lynx-js/react": "^0.117.0",
41
41
  "@lynx-js/types": "^3.7.0",
42
- "@seed-design/lynx-css": "0.8.1",
42
+ "@seed-design/lynx-css": "0.9.1",
43
43
  "@testing-library/jest-dom": "^6.9.1",
44
44
  "jsdom": "^29.0.2",
45
45
  "preact": "npm:@lynx-js/internal-preact@10.28.4-ee7bb26",
@@ -0,0 +1,22 @@
1
+ export {
2
+ AccordionBody as Body,
3
+ AccordionContent as Content,
4
+ AccordionDescription as Description,
5
+ AccordionHeader as Header,
6
+ AccordionItem as Item,
7
+ AccordionPrefix as Prefix,
8
+ AccordionRoot as Root,
9
+ AccordionSuffixIcon as SuffixIcon,
10
+ AccordionTitle as Title,
11
+ AccordionTrigger as Trigger,
12
+ type AccordionBodyProps as BodyProps,
13
+ type AccordionContentProps as ContentProps,
14
+ type AccordionDescriptionProps as DescriptionProps,
15
+ type AccordionHeaderProps as HeaderProps,
16
+ type AccordionItemProps as ItemProps,
17
+ type AccordionPrefixProps as PrefixProps,
18
+ type AccordionRootProps as RootProps,
19
+ type AccordionSuffixIconProps as SuffixIconProps,
20
+ type AccordionTitleProps as TitleProps,
21
+ type AccordionTriggerProps as TriggerProps,
22
+ } from "./Accordion";
@@ -0,0 +1,129 @@
1
+ import "@testing-library/jest-dom";
2
+ import { act, fireEvent, render } from "@lynx-js/react/testing-library";
3
+ import type * as React from "@lynx-js/react";
4
+ import { describe, expect, it, vi } from "vitest";
5
+
6
+ import { Accordion } from "./index";
7
+
8
+ function getRenderedRoot() {
9
+ const root = elementTree.root;
10
+
11
+ if (!root) {
12
+ throw new Error("Expected Lynx render root to exist.");
13
+ }
14
+
15
+ return root;
16
+ }
17
+
18
+ function TestAccordion(props: React.ComponentProps<typeof Accordion.Root> = {}) {
19
+ return (
20
+ <Accordion.Root {...props}>
21
+ <Accordion.Item value="first">
22
+ <Accordion.Header>
23
+ <Accordion.Trigger className="first-trigger" accessibility-label="첫 번째">
24
+ <Accordion.Body>
25
+ <Accordion.Title>첫 번째</Accordion.Title>
26
+ </Accordion.Body>
27
+ </Accordion.Trigger>
28
+ </Accordion.Header>
29
+ <Accordion.Content className="first-content">
30
+ <text>첫 번째 내용</text>
31
+ </Accordion.Content>
32
+ </Accordion.Item>
33
+ <Accordion.Item value="second">
34
+ <Accordion.Header>
35
+ <Accordion.Trigger className="second-trigger" accessibility-label="두 번째">
36
+ <Accordion.Body>
37
+ <Accordion.Title>두 번째</Accordion.Title>
38
+ </Accordion.Body>
39
+ </Accordion.Trigger>
40
+ </Accordion.Header>
41
+ <Accordion.Content>
42
+ <text>두 번째 내용</text>
43
+ </Accordion.Content>
44
+ </Accordion.Item>
45
+ </Accordion.Root>
46
+ );
47
+ }
48
+
49
+ describe("Accordion", () => {
50
+ it("opens and closes an item in uncontrolled mode", () => {
51
+ render(<TestAccordion />);
52
+
53
+ const trigger = getRenderedRoot().querySelector<HTMLElement>(".first-trigger");
54
+ const pressedOverlay = trigger?.querySelector<HTMLElement>(".seed-accordion__pressedOverlay");
55
+ expect(trigger).not.toBeNull();
56
+ expect(pressedOverlay).not.toBeNull();
57
+ expect(pressedOverlay).toHaveAttribute("accessibility-elements-hidden", "true");
58
+ expect(trigger).toHaveAttribute("accessibility-value", "접힘");
59
+
60
+ fireEvent.tap(trigger as HTMLElement);
61
+ expect(trigger).toHaveAttribute("accessibility-value", "펼쳐짐");
62
+
63
+ fireEvent.tap(trigger as HTMLElement);
64
+ expect(trigger).toHaveAttribute("accessibility-value", "접힘");
65
+ });
66
+
67
+ it("transitions content between zero and its measured height", () => {
68
+ render(<TestAccordion defaultValues={["first"]} />);
69
+
70
+ const root = getRenderedRoot();
71
+ const trigger = root.querySelector<HTMLElement>(".first-trigger");
72
+ const content = root.querySelector<HTMLElement>(".first-content");
73
+ const contentInner = content?.querySelector<HTMLElement>(".seed-accordion__contentInner");
74
+
75
+ expect(content).not.toBeNull();
76
+ expect(contentInner).not.toBeNull();
77
+ expect(content).toHaveStyle({ height: "0px" });
78
+
79
+ act(() => {
80
+ fireEvent.layoutchange(contentInner as HTMLElement, { height: 84 });
81
+ });
82
+
83
+ expect(content).toHaveStyle({ height: "84px" });
84
+
85
+ fireEvent.tap(trigger as HTMLElement);
86
+ expect(content).toHaveStyle({ height: "0px" });
87
+ });
88
+
89
+ it("keeps one item open by default and supports multiple mode", () => {
90
+ render(<TestAccordion multiple defaultValues={["first"]} />);
91
+
92
+ const root = getRenderedRoot();
93
+ const first = root.querySelector<HTMLElement>(".first-trigger");
94
+ const second = root.querySelector<HTMLElement>(".second-trigger");
95
+
96
+ expect(first).toHaveAttribute("accessibility-value", "펼쳐짐");
97
+ expect(second).toHaveAttribute("accessibility-value", "접힘");
98
+
99
+ fireEvent.tap(second as HTMLElement);
100
+ expect(first).toHaveAttribute("accessibility-value", "펼쳐짐");
101
+ expect(second).toHaveAttribute("accessibility-value", "펼쳐짐");
102
+ });
103
+
104
+ it("reports controlled value changes without mutating the rendered state", () => {
105
+ const onValuesChange = vi.fn();
106
+ render(<TestAccordion values={[]} onValuesChange={onValuesChange} />);
107
+
108
+ const trigger = getRenderedRoot().querySelector<HTMLElement>(".first-trigger");
109
+ fireEvent.tap(trigger as HTMLElement);
110
+
111
+ expect(onValuesChange).toHaveBeenCalledWith(["first"]);
112
+ expect(trigger).toHaveAttribute("accessibility-value", "접힘");
113
+ });
114
+
115
+ it("ignores tap when the root is disabled", () => {
116
+ const onValuesChange = vi.fn();
117
+ render(<TestAccordion disabled onValuesChange={onValuesChange} />);
118
+
119
+ const trigger = getRenderedRoot().querySelector<HTMLElement>(".first-trigger");
120
+ fireEvent.tap(trigger as HTMLElement);
121
+
122
+ expect(onValuesChange).not.toHaveBeenCalled();
123
+ expect(trigger).toHaveAttribute("accessibility-traits", "disabled");
124
+ expect(getRenderedRoot().querySelector(".first-content")).toHaveAttribute(
125
+ "accessibility-elements-hidden",
126
+ "true",
127
+ );
128
+ });
129
+ });