@stack-spot/portal-components 2.25.4 → 2.26.0-beta.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.
package/CHANGELOG.md CHANGED
@@ -1,24 +1,78 @@
1
1
  # Changelog
2
2
 
3
+ <<<<<<< HEAD
4
+ ## [2.26.0-beta.1](https://github.com/stack-spot/portal-commons/compare/portal-components-beta@v2.25.4-beta.1...portal-components-beta@v2.26.0-beta.1) (2025-08-19)
5
+
6
+
7
+ ### Features
8
+
9
+ * InfoMaintenanceBanner ([#1404](https://github.com/stack-spot/portal-commons/issues/1404)) ([d36bec1](https://github.com/stack-spot/portal-commons/commit/d36bec16c87882ec6d7fc18bbb9e59e0fb8aad16))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * adjusts accessibility file insert ([#1379](https://github.com/stack-spot/portal-commons/issues/1379)) ([753ad4e](https://github.com/stack-spot/portal-commons/commit/753ad4ea5ce01e0f4bcee15c08229ceb8e8dc02d))
15
+ * banner warning ([#1408](https://github.com/stack-spot/portal-commons/issues/1408)) ([9275385](https://github.com/stack-spot/portal-commons/commit/927538519908b87469c5ac2351eace94087cb4bb))
16
+ * inconsistent hide button beta ([98c0025](https://github.com/stack-spot/portal-commons/commit/98c00256a8b54c03d91265170de83f73197048db))
17
+ * maintenance banner ([#1406](https://github.com/stack-spot/portal-commons/issues/1406)) ([41c5258](https://github.com/stack-spot/portal-commons/commit/41c52588c7ab4377da31e79cf4e31b17b7b714c0))
18
+ * Removed sx props banner warning ([#1418](https://github.com/stack-spot/portal-commons/issues/1418)) ([6fbbe2c](https://github.com/stack-spot/portal-commons/commit/6fbbe2c0ae6157cf7c6908af6d49b1dc7e5686a6))
19
+ * type banner warning sx ([#1410](https://github.com/stack-spot/portal-commons/issues/1410)) ([c91b6e7](https://github.com/stack-spot/portal-commons/commit/c91b6e792107246b9025aad010ab3a1ee9f5855a))
20
+
21
+ ## [2.25.4-beta.1](https://github.com/stack-spot/portal-commons/compare/portal-components-beta@v2.25.3-beta.1...portal-components-beta@v2.25.4-beta.1) (2025-08-14)
22
+ =======
23
+ ## [2.25.5](https://github.com/stack-spot/portal-commons/compare/portal-components@v2.25.4...portal-components@v2.25.5) (2025-08-15)
24
+ >>>>>>> fix-1779-inconsistent-hide-button
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ <<<<<<< HEAD
30
+ * accessibility file insert ([bed8848](https://github.com/stack-spot/portal-commons/commit/bed88484c27169aaf60840945b99bdd87cdc0cff))
31
+
32
+ ## [2.25.3-beta.1](https://github.com/stack-spot/portal-commons/compare/portal-components-beta@v2.25.2-beta.1...portal-components-beta@v2.25.3-beta.1) (2025-08-13)
33
+ =======
34
+ * adjusts accessibility file insert ([#1379](https://github.com/stack-spot/portal-commons/issues/1379)) ([753ad4e](https://github.com/stack-spot/portal-commons/commit/753ad4ea5ce01e0f4bcee15c08229ceb8e8dc02d))
35
+
3
36
  ## [2.25.4](https://github.com/stack-spot/portal-commons/compare/portal-components@v2.25.3...portal-components@v2.25.4) (2025-08-15)
37
+ >>>>>>> fix-1779-inconsistent-hide-button
4
38
 
5
39
 
6
40
  ### Bug Fixes
7
41
 
42
+ <<<<<<< HEAD
43
+ * adjusts css ([#1393](https://github.com/stack-spot/portal-commons/issues/1393)) ([579f358](https://github.com/stack-spot/portal-commons/commit/579f35899c21b071d0aaebfdc200b93080278ed5))
44
+
45
+ ## [2.25.2-beta.1](https://github.com/stack-spot/portal-commons/compare/portal-components-beta@v2.25.1-beta.1...portal-components-beta@v2.25.2-beta.1) (2025-08-13)
46
+ =======
8
47
  * Removed sx props banner warning ([#1418](https://github.com/stack-spot/portal-commons/issues/1418)) ([6fbbe2c](https://github.com/stack-spot/portal-commons/commit/6fbbe2c0ae6157cf7c6908af6d49b1dc7e5686a6))
9
48
 
10
49
  ## [2.25.3](https://github.com/stack-spot/portal-commons/compare/portal-components@v2.25.2...portal-components@v2.25.3) (2025-08-15)
50
+ >>>>>>> fix-1779-inconsistent-hide-button
11
51
 
12
52
 
13
53
  ### Bug Fixes
14
54
 
55
+ <<<<<<< HEAD
56
+ * 2988 accessibility file insert ([#1380](https://github.com/stack-spot/portal-commons/issues/1380)) ([cb7d176](https://github.com/stack-spot/portal-commons/commit/cb7d1761a6eef04d05b2627711d04a9d33f54a46))
57
+ * adjusts accessibility file insert ([#1387](https://github.com/stack-spot/portal-commons/issues/1387)) ([29ceb74](https://github.com/stack-spot/portal-commons/commit/29ceb74d95f46dcba1f51b184bfb919fffbf8136))
58
+ * error messages ([#1283](https://github.com/stack-spot/portal-commons/issues/1283)) ([6a186ef](https://github.com/stack-spot/portal-commons/commit/6a186ef47b90b94a6b0861b8042ddd90062c3d95))
59
+
60
+ ## [2.25.1-beta.1](https://github.com/stack-spot/portal-commons/compare/portal-components-beta@v2.25.0-beta.1...portal-components-beta@v2.25.1-beta.1) (2025-07-28)
61
+ =======
15
62
  * type banner warning sx ([#1410](https://github.com/stack-spot/portal-commons/issues/1410)) ([c91b6e7](https://github.com/stack-spot/portal-commons/commit/c91b6e792107246b9025aad010ab3a1ee9f5855a))
16
63
 
17
64
  ## [2.25.2](https://github.com/stack-spot/portal-commons/compare/portal-components@v2.25.1...portal-components@v2.25.2) (2025-08-15)
65
+ >>>>>>> fix-1779-inconsistent-hide-button
18
66
 
19
67
 
20
68
  ### Bug Fixes
21
69
 
70
+ <<<<<<< HEAD
71
+ * Adds Secure attribute to cookies for HTTPS ([#1114](https://github.com/stack-spot/portal-commons/issues/1114)) ([18e06fb](https://github.com/stack-spot/portal-commons/commit/18e06fbe08b1c89e2d554295627298c4723c99c6))
72
+ * adjusts error messages in Ai ([#1274](https://github.com/stack-spot/portal-commons/issues/1274)) ([09aad8b](https://github.com/stack-spot/portal-commons/commit/09aad8b3cf8538d14455203be201beec03716d51))
73
+ * error messages ([#1305](https://github.com/stack-spot/portal-commons/issues/1305)) ([18b41bd](https://github.com/stack-spot/portal-commons/commit/18b41bdbcaa648ce736c66e6118edb353dd9a7c3))
74
+ * reviewing error messages in ai ([#1270](https://github.com/stack-spot/portal-commons/issues/1270)) ([5de8012](https://github.com/stack-spot/portal-commons/commit/5de8012538c22f0fd061233154619afcd4b589a5))
75
+ =======
22
76
  * banner warning ([#1408](https://github.com/stack-spot/portal-commons/issues/1408)) ([9275385](https://github.com/stack-spot/portal-commons/commit/927538519908b87469c5ac2351eace94087cb4bb))
23
77
 
24
78
  ## [2.25.1](https://github.com/stack-spot/portal-commons/compare/portal-components@v2.25.0...portal-components@v2.25.1) (2025-08-14)
@@ -34,6 +88,7 @@
34
88
  ### Features
35
89
 
36
90
  * InfoMaintenanceBanner ([#1404](https://github.com/stack-spot/portal-commons/issues/1404)) ([d36bec1](https://github.com/stack-spot/portal-commons/commit/d36bec16c87882ec6d7fc18bbb9e59e0fb8aad16))
91
+ >>>>>>> fix-1779-inconsistent-hide-button
37
92
 
38
93
  ## [2.24.3](https://github.com/stack-spot/portal-commons/compare/portal-components@v2.24.2...portal-components@v2.24.3) (2025-07-22)
39
94
 
@@ -0,0 +1,32 @@
1
+ .accordion-chevron {
2
+ transition: transform 0.3s ease;
3
+ }
4
+
5
+ .accordion-chevron[data-state='open'] {
6
+ transform: rotate(180deg);
7
+ }
8
+
9
+ .accordion-content {
10
+ max-height: max-content;
11
+ height: 0;
12
+ overflow: hidden;
13
+ transition: all 0.3s ease;
14
+ }
15
+
16
+ .accordion-content[data-state='open'] {
17
+ height: var(--accordion-content-height);
18
+ overflow: inherit;
19
+ }
20
+
21
+ .accordion-content[data-state='closed'] {
22
+ padding-top: 0;
23
+ padding-bottom: 0;
24
+ }
25
+
26
+ .accordion-content hr {
27
+ visibility: hidden;
28
+ }
29
+
30
+ .accordion-content[data-state='open'] hr {
31
+ visibility: visible;
32
+ }
@@ -0,0 +1,219 @@
1
+ import { SxProp } from '@citric/core';
2
+ import React, { PropsWithChildren } from 'react';
3
+ import './accordion.css';
4
+ export type AccordionSize = 'none' | 'sm' | 'md' | 'lg';
5
+ interface AccordionProps extends PropsWithChildren<React.HTMLAttributes<HTMLDivElement>> {
6
+ /**
7
+ * Determines if only one (`'single'`) or multiple (`'multiple'`) items can be open at once.
8
+ * Defaults to `'single'`.
9
+ */
10
+ type?: 'single' | 'multiple';
11
+ /**
12
+ * The value of the items whose contents are expanded when the accordion is initially rendered. Use
13
+ * `defaultValue` if you do not need to control the state of an accordion.
14
+ */
15
+ value?: string | string[];
16
+ /**
17
+ * The value(s) of the item(s) that should be open by default.
18
+ */
19
+ defaultValue?: string | string[];
20
+ /**
21
+ * Callback function that is called when the value changes.
22
+ * Receives the current open item(s) as a string or an array of strings.
23
+ */
24
+ onValueChange?: (value: string | string[]) => void;
25
+ /**
26
+ * If true, the item is disabled and cannot be interacted with.
27
+ * Defaults to false.
28
+ */
29
+ disabled?: boolean;
30
+ /**
31
+ * The size of the accordion (`'sm'`, `'md'`, `'lg'`). Defaults to `'md'`.
32
+ * This affects the padding and spacing of the accordion items.
33
+ */
34
+ size?: AccordionSize;
35
+ /**
36
+ * Optional style overrides for the accordion component.
37
+ */
38
+ sx?: SxProp;
39
+ /**
40
+ * The gap between accordion items.
41
+ */
42
+ gap?: string;
43
+ }
44
+ /**
45
+ * Accordion component for displaying collapsible content panels.
46
+ *
47
+ * @remarks
48
+ * The `Accordion` component provides a flexible and accessible way to display content in expandable/collapsible panels.
49
+ * It supports both single and multiple item expansion modes, customizable sizes, and can be disabled.
50
+ *
51
+ * @example
52
+ * ```tsx
53
+ * import { Accordion, AccordionItem, AccordionHeader, AccordionTrigger, AccordionContent } from './Accordion';
54
+ *
55
+ * function ExampleAccordion() {
56
+ * return (
57
+ * <Accordion type="multiple" defaultValue={['item1']} size="md">
58
+ * <AccordionItem value="item1">
59
+ * <AccordionHeader>
60
+ * <AccordionTrigger>
61
+ * Section 1
62
+ * </AccordionTrigger>
63
+ * </AccordionHeader>
64
+ * <AccordionContent>
65
+ * <p>This is the content of section 1.</p>
66
+ * </AccordionContent>
67
+ * </AccordionItem>
68
+ * <AccordionItem value="item2">
69
+ * <AccordionHeader>
70
+ * <AccordionTrigger>
71
+ * Section 2
72
+ * </AccordionTrigger>
73
+ * </AccordionHeader>
74
+ * <AccordionContent>
75
+ * <p>This is the content of section 2.</p>
76
+ * </AccordionContent>
77
+ * </AccordionItem>
78
+ * </Accordion>
79
+ * )
80
+ * }
81
+ * ```
82
+ *
83
+ * @param type - Determines if only one (`'single'`) or multiple (`'multiple'`) items can be open at once. Default is `'single'`.
84
+ * @param value - The currently open item(s) in the accordion. Can be a single string or an array of strings.
85
+ * @param defaultValue - The value(s) of the item(s) that should be open by default.
86
+ * @param disabled - If true, disables all accordion items.
87
+ * @param size - The size of the accordion (`'sm'`, `'md'`, `'lg'`). Default is `'md'`.
88
+ * @param sx - Optional style overrides for the accordion component.
89
+ * @param children - The AccordionItem components to be rendered inside the Accordion.
90
+ * @param gap - The gap between accordion items. Default is `'8px'`.
91
+ */
92
+ export declare const Accordion: ({ type, value, defaultValue, onValueChange, children, disabled, size, sx, gap, ...props }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
93
+ interface AccordionItemProps extends PropsWithChildren<React.HTMLAttributes<HTMLDivElement>> {
94
+ /**
95
+ * The unique value identifying this accordion item.
96
+ * This value is used to control the open/closed state of the item.
97
+ */
98
+ value: string;
99
+ /**
100
+ * If true, the item is disabled and cannot be interacted with.
101
+ * Defaults to false.
102
+ */
103
+ disabled?: boolean;
104
+ /**
105
+ * If true, the entire item is clickable to toggle its open/closed state.
106
+ * Defaults to true.
107
+ */
108
+ fullyClickable?: boolean;
109
+ /**
110
+ * Optional style overrides for the item component.
111
+ */
112
+ sx?: SxProp;
113
+ }
114
+ /**
115
+ * Represents a single item within an Accordion component.
116
+ *
117
+ * @param value - The unique value identifying this accordion item.
118
+ * @param children - The content to be rendered inside the accordion item.
119
+ * @param fullyClickable - If true, the entire item is clickable to toggle its open/closed state.
120
+ * @param disabled - If true, disables this accordion item.
121
+ * @param sx - Optional style overrides for the item component.
122
+ * @param props - Additional props to be spread onto the Card component.
123
+ *
124
+ * @remarks
125
+ * This component uses context to determine its open/closed state and whether it is disabled.
126
+ * It provides its state and identifiers to its children via context.
127
+ */
128
+ export declare const AccordionItem: ({ value, children, disabled, sx, fullyClickable, ...props }: AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
129
+ interface AccordionHeaderProps extends PropsWithChildren, React.HTMLAttributes<HTMLDivElement> {
130
+ /**
131
+ * Optional style overrides for the header component.
132
+ */
133
+ sx?: SxProp;
134
+ /**
135
+ * Optional style overrides for the text component when children is a string.
136
+ */
137
+ sxText?: SxProp;
138
+ }
139
+ /**
140
+ * Renders the header section of an Accordion item.
141
+ *
142
+ * This component displays its children inside a header. If the children are a string,
143
+ * it wraps them in a text component with heading appearance and applies appropriate styles.
144
+ * If the Accordion item is disabled, the header text will have a 'not-allowed' cursor and
145
+ * the `aria-disabled` attribute will be set.
146
+ *
147
+ * @param children - The content to display inside the header. If a string, it will be styled as a heading.
148
+ * @param sx - Optional style overrides for the header component.
149
+ * @param sxText - Optional style overrides for the text component when children is a string.
150
+ * @param props - Additional props to be spread onto the header component.
151
+ *
152
+ * @returns The rendered Accordion header.
153
+ */
154
+ export declare const AccordionHeader: ({ children, sx, sxText, ...props }: AccordionHeaderProps) => import("react/jsx-runtime").JSX.Element;
155
+ /**
156
+ * Renders the chevron down icon for an accordion item, indicating its open or closed state.
157
+ *
158
+ * - If the accordion item is fully clickable (`fullyClickable` is true),
159
+ * the icon is rendered directly and clicking anywhere on the item toggles its state.
160
+ * - If not fully clickable, the icon is wrapped in an `IconButton` that handles toggling the item's state when clicked.
161
+ *
162
+ * @returns The rendered chevron down icon.
163
+ */
164
+ export declare function AccordionChevronDownIcon(): import("react/jsx-runtime").JSX.Element;
165
+ interface AccordionTriggerProps extends React.HTMLAttributes<HTMLButtonElement>, PropsWithChildren {
166
+ /**
167
+ * Determines the alignment of the trigger content. Defaults to `'right'`.
168
+ * Accepts `'right'` or `'left'` for alignment.
169
+ */
170
+ position?: 'left' | 'right';
171
+ /**
172
+ * Option style overrides for the trigger button.
173
+ */
174
+ sx?: SxProp;
175
+ }
176
+ /**
177
+ * AccordionTrigger is a button component used to control the expansion and collapse of an accordion item.
178
+ *
179
+ * @param children - The content to display inside the trigger. If only one child is provided,
180
+ * an AccordionChevronDownIcon is appended automatically.
181
+ * @param position - Determines the alignment of the trigger content.
182
+ * Defaults to `'right'`. Accepts `'right'` or `'left'` for alignment.
183
+ * @param onClick - Optional click handler invoked when the trigger is clicked, after toggling the accordion item.
184
+ * @param sx - Optional style overrides for the trigger button.
185
+ * @param props - Additional props passed to the underlying Button component.
186
+ *
187
+ * @remarks
188
+ * - The trigger is disabled if either the accordion or the item is disabled.
189
+ * - Accessibility attributes (`aria-disabled`, `aria-controls`, `aria-expanded`) are set for better screen reader support.
190
+ * - The trigger toggles the open state of the associated accordion item via context.
191
+ */
192
+ export declare const AccordionTrigger: ({ children, position, onClick, sx, ...props }: AccordionTriggerProps) => import("react/jsx-runtime").JSX.Element;
193
+ interface AccordionContentProps extends PropsWithChildren, React.HTMLAttributes<HTMLDivElement> {
194
+ /**
195
+ * Optional style overrides for the content component.
196
+ */
197
+ sx?: SxProp;
198
+ /**
199
+ * If true, a `Divider` is rendered above the content. Default is true.
200
+ */
201
+ divider?: boolean;
202
+ }
203
+ /**
204
+ * Renders the content area of an accordion item.
205
+ *
206
+ * This component displays its children inside a content container,
207
+ * and manages accessibility attributes such as `aria-hidden`, `aria-expanded`,
208
+ * and `aria-labelledby` based on the accordion item's open state.
209
+ *
210
+ * @param children - The content to be displayed within the accordion panel.
211
+ * @param sx - Optional style overrides for the content component.
212
+ * @param divider - If true, a `Divider` is rendered above the content. Default is true.
213
+ * @param props - Additional props to be spread onto the content component.
214
+ *
215
+ * @returns The rendered accordion content, visible only when the accordion item is open.
216
+ */
217
+ export declare const AccordionContent: ({ children, sx, divider, ...props }: AccordionContentProps) => import("react/jsx-runtime").JSX.Element;
218
+ export {};
219
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @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IACzB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa,GAAI,6DAO3B,kBAAkB,4CAapB,CAAA;AAMD,UAAU,oBACR,SAAQ,iBAAiB,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC/D;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,GAAI,oCAK7B,oBAAoB,4CAkBtB,CAAA;AAMD;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,4CAYvC;AAMD,UAAU,qBACR,SAAQ,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAC7C,iBAAiB;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,GAAI,+CAM9B,qBAAqB,4CAsCvB,CAAA;AAMD,UAAU,qBACR,SAAQ,iBAAiB,EACvB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACtC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,GAAI,qCAK9B,qBAAqB,4CA+BvB,CAAA"}
@@ -0,0 +1,275 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Button, Divider, IconBox, Text } from '@citric/core';
3
+ import { ChevronDown } from '@citric/icons';
4
+ import { Card, CardContent, CardHeader, IconButton } from '@citric/ui';
5
+ import React, { useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from 'react';
6
+ import './accordion.css';
7
+ const ACCORDION_SIZES = {
8
+ none: 0,
9
+ sm: 2,
10
+ md: 4,
11
+ lg: 8,
12
+ };
13
+ function getState(state) {
14
+ return state ? 'open' : 'closed';
15
+ }
16
+ const AccordionContext = React.createContext({
17
+ openItems: [],
18
+ toggleItem: () => { },
19
+ type: 'single',
20
+ disabled: false,
21
+ size: 'md',
22
+ });
23
+ const AccordionItemContext = React.createContext({
24
+ value: undefined,
25
+ open: false,
26
+ disabled: false,
27
+ triggerId: undefined,
28
+ fullyClickable: true,
29
+ });
30
+ /* -------------------------------------------------------------------------------------------------
31
+ * Hooks
32
+ * -----------------------------------------------------------------------------------------------*/
33
+ const useAccordionContext = () => React.useContext(AccordionContext);
34
+ const useAccordionItemContext = () => React.useContext(AccordionItemContext);
35
+ /* -------------------------------------------------------------------------------------------------
36
+ * Styles
37
+ * -----------------------------------------------------------------------------------------------*/
38
+ const styles = {
39
+ accordion: {
40
+ width: '100%',
41
+ display: 'flex',
42
+ flexDirection: 'column',
43
+ padding: 0,
44
+ },
45
+ header: {
46
+ display: 'flex',
47
+ flexDirection: 'row',
48
+ flexWrap: 'nowrap',
49
+ alignItems: 'center',
50
+ justifyContent: 'space-between',
51
+ flex: 1,
52
+ padding: 0,
53
+ },
54
+ trigger: {
55
+ border: 'none',
56
+ ':hover': {
57
+ border: 'none',
58
+ },
59
+ color: 'light.contrastText',
60
+ width: '100%',
61
+ display: 'flex',
62
+ alignItems: 'center',
63
+ },
64
+ item: {
65
+ padding: 0,
66
+ border: 'none',
67
+ },
68
+ content: {
69
+ pt: 0,
70
+ border: 'none',
71
+ },
72
+ };
73
+ /**
74
+ * Accordion component for displaying collapsible content panels.
75
+ *
76
+ * @remarks
77
+ * The `Accordion` component provides a flexible and accessible way to display content in expandable/collapsible panels.
78
+ * It supports both single and multiple item expansion modes, customizable sizes, and can be disabled.
79
+ *
80
+ * @example
81
+ * ```tsx
82
+ * import { Accordion, AccordionItem, AccordionHeader, AccordionTrigger, AccordionContent } from './Accordion';
83
+ *
84
+ * function ExampleAccordion() {
85
+ * return (
86
+ * <Accordion type="multiple" defaultValue={['item1']} size="md">
87
+ * <AccordionItem value="item1">
88
+ * <AccordionHeader>
89
+ * <AccordionTrigger>
90
+ * Section 1
91
+ * </AccordionTrigger>
92
+ * </AccordionHeader>
93
+ * <AccordionContent>
94
+ * <p>This is the content of section 1.</p>
95
+ * </AccordionContent>
96
+ * </AccordionItem>
97
+ * <AccordionItem value="item2">
98
+ * <AccordionHeader>
99
+ * <AccordionTrigger>
100
+ * Section 2
101
+ * </AccordionTrigger>
102
+ * </AccordionHeader>
103
+ * <AccordionContent>
104
+ * <p>This is the content of section 2.</p>
105
+ * </AccordionContent>
106
+ * </AccordionItem>
107
+ * </Accordion>
108
+ * )
109
+ * }
110
+ * ```
111
+ *
112
+ * @param type - Determines if only one (`'single'`) or multiple (`'multiple'`) items can be open at once. Default is `'single'`.
113
+ * @param value - The currently open item(s) in the accordion. Can be a single string or an array of strings.
114
+ * @param defaultValue - The value(s) of the item(s) that should be open by default.
115
+ * @param disabled - If true, disables all accordion items.
116
+ * @param size - The size of the accordion (`'sm'`, `'md'`, `'lg'`). Default is `'md'`.
117
+ * @param sx - Optional style overrides for the accordion component.
118
+ * @param children - The AccordionItem components to be rendered inside the Accordion.
119
+ * @param gap - The gap between accordion items. Default is `'8px'`.
120
+ */
121
+ export const Accordion = ({ type = 'single', value, defaultValue = [], onValueChange, children, disabled = false, size = 'md', sx = {}, gap = '8px', ...props }) => {
122
+ const [openItems, setOpenItems] = useState(defaultValue === undefined ? [] : Array.isArray(defaultValue) ? defaultValue : [defaultValue]);
123
+ const handleItemSingle = React.useCallback((itemValue) => setOpenItems((prevValue = []) => prevValue.includes(itemValue) ? [] : [itemValue]), [setOpenItems]);
124
+ const handleItemMultiple = React.useCallback((itemValue) => setOpenItems((prevValue = []) => prevValue.includes(itemValue) ?
125
+ prevValue.filter((value) => value !== itemValue) :
126
+ [...prevValue, itemValue]), [setOpenItems]);
127
+ const toggleItem = useCallback((value) => {
128
+ if (type === 'single') {
129
+ handleItemSingle(value);
130
+ }
131
+ else {
132
+ handleItemMultiple(value);
133
+ }
134
+ }, [handleItemMultiple, handleItemSingle, type]);
135
+ useEffect(() => {
136
+ onValueChange?.(openItems);
137
+ }, [openItems, onValueChange]);
138
+ useEffect(() => {
139
+ if (typeof value === 'string' || Array.isArray(value)) {
140
+ setOpenItems(Array.isArray(value) ? value : [value]);
141
+ }
142
+ }, [value]);
143
+ return (_jsx(AccordionContext.Provider, { value: { openItems, toggleItem, type, disabled, size }, children: _jsx(Box, { role: "accordion", sx: { ...styles.accordion, gap, ...sx }, ...props, children: children }) }));
144
+ };
145
+ /**
146
+ * Represents a single item within an Accordion component.
147
+ *
148
+ * @param value - The unique value identifying this accordion item.
149
+ * @param children - The content to be rendered inside the accordion item.
150
+ * @param fullyClickable - If true, the entire item is clickable to toggle its open/closed state.
151
+ * @param disabled - If true, disables this accordion item.
152
+ * @param sx - Optional style overrides for the item component.
153
+ * @param props - Additional props to be spread onto the Card component.
154
+ *
155
+ * @remarks
156
+ * This component uses context to determine its open/closed state and whether it is disabled.
157
+ * It provides its state and identifiers to its children via context.
158
+ */
159
+ export const AccordionItem = ({ value, children, disabled = false, sx = {}, fullyClickable = true, ...props }) => {
160
+ const accordionContext = useAccordionContext();
161
+ const triggerId = ['trigger', useId()].join('-');
162
+ const open = (value && accordionContext.openItems.includes(value)) || false;
163
+ const isDisabled = disabled || accordionContext.disabled;
164
+ return (_jsx(AccordionItemContext.Provider, { value: { value, open, triggerId, fullyClickable, disabled: isDisabled }, children: _jsx(Card, { id: `accordion-item-${value}`, sx: { ...styles.item, ...sx }, ...props, children: children }) }));
165
+ };
166
+ /**
167
+ * Renders the header section of an Accordion item.
168
+ *
169
+ * This component displays its children inside a header. If the children are a string,
170
+ * it wraps them in a text component with heading appearance and applies appropriate styles.
171
+ * If the Accordion item is disabled, the header text will have a 'not-allowed' cursor and
172
+ * the `aria-disabled` attribute will be set.
173
+ *
174
+ * @param children - The content to display inside the header. If a string, it will be styled as a heading.
175
+ * @param sx - Optional style overrides for the header component.
176
+ * @param sxText - Optional style overrides for the text component when children is a string.
177
+ * @param props - Additional props to be spread onto the header component.
178
+ *
179
+ * @returns The rendered Accordion header.
180
+ */
181
+ export const AccordionHeader = ({ children, sx = {}, sxText = {}, ...props }) => {
182
+ const { disabled, value } = useAccordionItemContext();
183
+ return (_jsx(CardHeader, { id: `accordion-header-${value}`, sx: { ...styles.header, ...sx }, ...props, children: children && typeof children === 'string' ? (_jsx(Text, { appearance: "h4", w: 12, "aria-disabled": disabled, sx: { cursor: disabled ? 'not-allowed' : 'pointer', ...sxText }, children: children })) : (children) }));
184
+ };
185
+ /* -------------------------------------------------------------------------------------------------
186
+ * AccordionChevronDownIcon
187
+ * -----------------------------------------------------------------------------------------------*/
188
+ /**
189
+ * Renders the chevron down icon for an accordion item, indicating its open or closed state.
190
+ *
191
+ * - If the accordion item is fully clickable (`fullyClickable` is true),
192
+ * the icon is rendered directly and clicking anywhere on the item toggles its state.
193
+ * - If not fully clickable, the icon is wrapped in an `IconButton` that handles toggling the item's state when clicked.
194
+ *
195
+ * @returns The rendered chevron down icon.
196
+ */
197
+ export function AccordionChevronDownIcon() {
198
+ const accordionContext = useAccordionContext();
199
+ const accordionItemContext = useAccordionItemContext();
200
+ const { open, value, fullyClickable = true } = accordionItemContext;
201
+ const handleClick = (e) => {
202
+ e.stopPropagation();
203
+ e.preventDefault();
204
+ accordionContext.toggleItem(value || '');
205
+ };
206
+ const icon = _jsx(IconBox, { "data-state": getState(open), className: "accordion-chevron", children: _jsx(ChevronDown, {}) }, "chevron");
207
+ return fullyClickable ? icon : _jsx(IconButton, { sx: { border: 'none', p: 0 }, size: "xs", onClick: handleClick, children: icon });
208
+ }
209
+ /**
210
+ * AccordionTrigger is a button component used to control the expansion and collapse of an accordion item.
211
+ *
212
+ * @param children - The content to display inside the trigger. If only one child is provided,
213
+ * an AccordionChevronDownIcon is appended automatically.
214
+ * @param position - Determines the alignment of the trigger content.
215
+ * Defaults to `'right'`. Accepts `'right'` or `'left'` for alignment.
216
+ * @param onClick - Optional click handler invoked when the trigger is clicked, after toggling the accordion item.
217
+ * @param sx - Optional style overrides for the trigger button.
218
+ * @param props - Additional props passed to the underlying Button component.
219
+ *
220
+ * @remarks
221
+ * - The trigger is disabled if either the accordion or the item is disabled.
222
+ * - Accessibility attributes (`aria-disabled`, `aria-controls`, `aria-expanded`) are set for better screen reader support.
223
+ * - The trigger toggles the open state of the associated accordion item via context.
224
+ */
225
+ export const AccordionTrigger = ({ children, position = 'right', onClick, sx, ...props }) => {
226
+ const accordionContext = useAccordionContext();
227
+ const accordionItemContext = useAccordionItemContext();
228
+ const { value, disabled, triggerId, fullyClickable = true } = accordionItemContext;
229
+ const handleClick = (e) => {
230
+ e.stopPropagation();
231
+ e.preventDefault();
232
+ accordionContext.toggleItem(value || '');
233
+ onClick && onClick(e);
234
+ };
235
+ const hasChildren = React.Children.count(children) >= 2;
236
+ const content = hasChildren ? [children] : [children, _jsx(AccordionChevronDownIcon, {}, "chevron-down")];
237
+ const isDisabled = disabled || accordionContext.disabled;
238
+ return (_jsx(Button, { as: fullyClickable ? 'button' : 'div', id: triggerId, "aria-disabled": isDisabled, "aria-controls": `accordion-content-${value}`, "aria-expanded": accordionItemContext.open, onClick: fullyClickable ? handleClick : undefined, disabled: isDisabled, appearance: "text", colorScheme: "light", sx: {
239
+ ...styles.trigger,
240
+ padding: ACCORDION_SIZES[accordionContext.size],
241
+ cursor: isDisabled ? 'not-allowed' : fullyClickable ? 'pointer' : 'default',
242
+ justifyContent: position === 'right' ? 'space-between' : 'flex-start',
243
+ ...sx,
244
+ }, ...props, children: position === 'right' ? content : content.reverse() }));
245
+ };
246
+ const ACCORDION_CONTENT_HEIGHT = '--accordion-content-height';
247
+ /**
248
+ * Renders the content area of an accordion item.
249
+ *
250
+ * This component displays its children inside a content container,
251
+ * and manages accessibility attributes such as `aria-hidden`, `aria-expanded`,
252
+ * and `aria-labelledby` based on the accordion item's open state.
253
+ *
254
+ * @param children - The content to be displayed within the accordion panel.
255
+ * @param sx - Optional style overrides for the content component.
256
+ * @param divider - If true, a `Divider` is rendered above the content. Default is true.
257
+ * @param props - Additional props to be spread onto the content component.
258
+ *
259
+ * @returns The rendered accordion content, visible only when the accordion item is open.
260
+ */
261
+ export const AccordionContent = ({ children, sx = {}, divider = true, ...props }) => {
262
+ const accordionContext = useAccordionContext();
263
+ const accordionItemContext = useAccordionItemContext();
264
+ const { open, triggerId, value } = accordionItemContext;
265
+ const ref = useRef(null);
266
+ useLayoutEffect(() => {
267
+ if (!ref.current)
268
+ return;
269
+ if (!ref.current.style.getPropertyValue(ACCORDION_CONTENT_HEIGHT)) {
270
+ ref.current.style.setProperty(ACCORDION_CONTENT_HEIGHT, `${ref.current.scrollHeight}px`);
271
+ }
272
+ }, [ref.current, open]);
273
+ return (_jsxs(CardContent, { ref: ref, id: `accordion-content-${value}`, sx: { padding: ACCORDION_SIZES[accordionContext.size], ...styles.content, ...sx }, "data-state": getState(open), "aria-hidden": !open, "aria-expanded": open, "aria-labelledby": triggerId, className: "accordion-content", role: "region", tabIndex: open ? 0 : -1, ...props, children: [divider && _jsx(Divider, { pb: ACCORDION_SIZES[accordionContext.size] }), children] }));
274
+ };
275
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Accordion/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAkB,IAAI,EAAE,MAAM,cAAc,CAAA;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACtE,OAAO,KAAK,EAAE,EAAqB,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,eA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H,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAwFD;;;;GAIG;AACH,eAAO,MAAM,cAAc,GACzB,2FAAoG,KAAK,4CAqI1G,CAAA"}
1
+ {"version":3,"file":"FadingOverflow.d.ts","sourceRoot":"","sources":["../../src/components/FadingOverflow.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAKxE,KAAK,IAAI,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;AAC/C,KAAK,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAA;AAErD,UAAU,KAAM,SAAQ,SAAS;IAC/B;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;OAGG;IACH,uCAAuC,CAAC,EAAE,OAAO,CAAC;IAClD;;;;;OAKG;IACH,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAwFD;;;;GAIG;AACH,eAAO,MAAM,cAAc,GACzB,2FAAoG,KAAK,4CAuI1G,CAAA"}