commerce-toolkit 0.0.0 → 0.0.3
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/README.md +152 -0
- package/dist/components/accordion/accordion.d.ts +38 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -0
- package/dist/components/accordion/index.d.ts +7 -0
- package/dist/components/accordion/index.d.ts.map +1 -0
- package/dist/components/accordion/primitives/accordion-content.d.ts +5 -0
- package/dist/components/accordion/primitives/accordion-content.d.ts.map +1 -0
- package/dist/components/accordion/primitives/accordion-item.d.ts +5 -0
- package/dist/components/accordion/primitives/accordion-item.d.ts.map +1 -0
- package/dist/components/accordion/primitives/accordion-provider.d.ts +13 -0
- package/dist/components/accordion/primitives/accordion-provider.d.ts.map +1 -0
- package/dist/components/accordion/primitives/accordion-root.d.ts +5 -0
- package/dist/components/accordion/primitives/accordion-root.d.ts.map +1 -0
- package/dist/components/accordion/primitives/accordion-trigger.d.ts +5 -0
- package/dist/components/accordion/primitives/accordion-trigger.d.ts.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +776 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +29 -0
- package/package.json +134 -8
- package/tailwind.preset.js +233 -0
package/README.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Commerce Toolkit
|
|
2
|
+
|
|
3
|
+
A collection of modern, accessible commerce UI components built with React, TypeScript, and Tailwind CSS.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- React 18+ or 19+
|
|
8
|
+
- Tailwind CSS 3+
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install commerce-toolkit
|
|
14
|
+
# or
|
|
15
|
+
yarn add commerce-toolkit
|
|
16
|
+
# or
|
|
17
|
+
pnpm add commerce-toolkit
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Install the optional Tailwind plugins (recommended):
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install -D @tailwindcss/container-queries @tailwindcss/typography tailwindcss-animate
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Setup
|
|
27
|
+
|
|
28
|
+
### 1. Configure Tailwind
|
|
29
|
+
|
|
30
|
+
Add the Commerce Toolkit preset and content path to your `tailwind.config.js`:
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
import commerceToolkit from 'commerce-toolkit/tailwind';
|
|
34
|
+
|
|
35
|
+
export default {
|
|
36
|
+
presets: [commerceToolkit],
|
|
37
|
+
content: [
|
|
38
|
+
'./src/**/*.{js,ts,jsx,tsx}',
|
|
39
|
+
'./node_modules/commerce-toolkit/dist/**/*.{js,mjs}', // Add this line
|
|
40
|
+
],
|
|
41
|
+
// ... your other config
|
|
42
|
+
};
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 2. Import Base Styles
|
|
46
|
+
|
|
47
|
+
Import the CSS variables in your JavaScript/TypeScript (recommended):
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
// app/layout.tsx (Next.js) or main.tsx (Vite/React)
|
|
51
|
+
import 'commerce-toolkit/styles';
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Or if importing in CSS, it must come **before** the Tailwind directives:
|
|
55
|
+
|
|
56
|
+
```css
|
|
57
|
+
/* app.css or globals.css */
|
|
58
|
+
@import 'commerce-toolkit/styles';
|
|
59
|
+
|
|
60
|
+
@tailwind base;
|
|
61
|
+
@tailwind components;
|
|
62
|
+
@tailwind utilities;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 3. Use Components
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
import { Button } from 'commerce-toolkit';
|
|
69
|
+
|
|
70
|
+
function App() {
|
|
71
|
+
return (
|
|
72
|
+
<div>
|
|
73
|
+
<Button variant="primary">Click me</Button>
|
|
74
|
+
<Button variant="secondary" size="small">
|
|
75
|
+
Small Button
|
|
76
|
+
</Button>
|
|
77
|
+
</div>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Using Tailwind Utilities
|
|
83
|
+
|
|
84
|
+
Once configured, you can use all the custom Tailwind utilities from Commerce Toolkit:
|
|
85
|
+
|
|
86
|
+
```tsx
|
|
87
|
+
<div className="bg-primary text-background">
|
|
88
|
+
<h1 className="text-foreground font-heading">Hello World</h1>
|
|
89
|
+
<p className="text-contrast-400">This uses the design system colors!</p>
|
|
90
|
+
</div>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Available color utilities:**
|
|
94
|
+
|
|
95
|
+
- `bg-primary`, `text-primary`, `border-primary`
|
|
96
|
+
- `bg-accent`, `text-accent`, etc.
|
|
97
|
+
- `bg-success`, `bg-error`, `bg-warning`, `bg-info`
|
|
98
|
+
- `bg-background`, `bg-foreground`
|
|
99
|
+
- `bg-contrast-100` through `bg-contrast-500`
|
|
100
|
+
|
|
101
|
+
And many more custom utilities for typography, animations, and effects.
|
|
102
|
+
|
|
103
|
+
## Customization
|
|
104
|
+
|
|
105
|
+
Override CSS variables to customize the design system:
|
|
106
|
+
|
|
107
|
+
```css
|
|
108
|
+
/* app/globals.css */
|
|
109
|
+
@import 'commerce-toolkit/styles';
|
|
110
|
+
|
|
111
|
+
@tailwind base;
|
|
112
|
+
@tailwind components;
|
|
113
|
+
@tailwind utilities;
|
|
114
|
+
|
|
115
|
+
:root {
|
|
116
|
+
--primary: 220 100% 50%; /* HSL: hue saturation lightness */
|
|
117
|
+
--foreground: 0 0% 7%;
|
|
118
|
+
--background: 0 0% 100%;
|
|
119
|
+
/* ... override any variables */
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Recommended:** Import styles in JavaScript and override variables in CSS:
|
|
124
|
+
|
|
125
|
+
```tsx
|
|
126
|
+
// app/layout.tsx
|
|
127
|
+
import 'commerce-toolkit/styles';
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
```css
|
|
131
|
+
/* app/globals.css */
|
|
132
|
+
@tailwind base;
|
|
133
|
+
@tailwind components;
|
|
134
|
+
@tailwind utilities;
|
|
135
|
+
|
|
136
|
+
:root {
|
|
137
|
+
--primary: 220 100% 50%;
|
|
138
|
+
/* ... your custom values */
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Documentation
|
|
143
|
+
|
|
144
|
+
For detailed component documentation, examples, and interactive demos, visit our [Storybook](#) (coming soon).
|
|
145
|
+
|
|
146
|
+
## TypeScript
|
|
147
|
+
|
|
148
|
+
Full TypeScript support with included type definitions.
|
|
149
|
+
|
|
150
|
+
## License
|
|
151
|
+
|
|
152
|
+
MIT
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import * as AccordionPrimitive from '@/components/accordion';
|
|
3
|
+
interface AccordionItemData {
|
|
4
|
+
title: string;
|
|
5
|
+
content: ReactNode;
|
|
6
|
+
value?: string;
|
|
7
|
+
}
|
|
8
|
+
export type AccordionProps = AccordionPrimitive.RootProps & {
|
|
9
|
+
colorScheme?: 'light' | 'dark';
|
|
10
|
+
items: AccordionItemData[];
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* This component supports various CSS variables for theming. Here's a comprehensive list, along
|
|
14
|
+
* with their default values:
|
|
15
|
+
*
|
|
16
|
+
* ```css
|
|
17
|
+
* :root {
|
|
18
|
+
* --accordion-focus: var(--primary);
|
|
19
|
+
* --acordion-light-offset: var(--background);
|
|
20
|
+
* --accordion-light-title-text: var(--contrast-400);
|
|
21
|
+
* --accordion-light-title-text-hover: var(--foreground);
|
|
22
|
+
* --accordion-light-title-icon: var(--contrast-500);
|
|
23
|
+
* --accordion-light-title-icon-hover: var(--foreground);
|
|
24
|
+
* --accordion-light-content-text: var(--foreground);
|
|
25
|
+
* --acordion-dark-offset: var(--foreground);
|
|
26
|
+
* --accordion-dark-title-text: var(--contrast-200);
|
|
27
|
+
* --accordion-dark-title-text-hover: var(--background);
|
|
28
|
+
* --accordion-dark-title-icon: var(--contrast-200);
|
|
29
|
+
* --accordion-dark-title-icon-hover: var(--background);
|
|
30
|
+
* --accordion-dark-content-text: var(--background);
|
|
31
|
+
* --accordion-title-font-family: var(--font-family-mono);
|
|
32
|
+
* --accordion-content-font-family: var(--font-family-body);
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare function Accordion({ colorScheme, items, ...props }: AccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAE7D,UAAU,iBAAiB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,cAAc,GAAG,kBAAkB,CAAC,SAAS,GAAG;IAC1D,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC/B,KAAK,EAAE,iBAAiB,EAAE,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,SAAS,CAAC,EAAE,WAAqB,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,2CAanF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Accordion, type AccordionProps } from '@/components/accordion/accordion';
|
|
2
|
+
export { AccordionItem as Item, type AccordionItemProps as ItemProps, } from '@/components/accordion/primitives/accordion-item';
|
|
3
|
+
export { AccordionRoot as Root, type AccordionRootProps as RootProps, } from '@/components/accordion/primitives/accordion-root';
|
|
4
|
+
export { AccordionContent as Content, type AccordionContentProps as ContentProps, } from '@/components/accordion/primitives/accordion-content';
|
|
5
|
+
export { AccordionTrigger as Trigger, type AccordionTriggerProps as TriggerProps, } from '@/components/accordion/primitives/accordion-trigger';
|
|
6
|
+
export { AccordionProvider as Provider, useAccordionContext, type AccordionProviderProps as ProviderProps, } from '@/components/accordion/primitives/accordion-provider';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/accordion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EACL,aAAa,IAAI,IAAI,EACrB,KAAK,kBAAkB,IAAI,SAAS,GACrC,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EACL,aAAa,IAAI,IAAI,EACrB,KAAK,kBAAkB,IAAI,SAAS,GACrC,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EACL,gBAAgB,IAAI,OAAO,EAC3B,KAAK,qBAAqB,IAAI,YAAY,GAC3C,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EACL,gBAAgB,IAAI,OAAO,EAC3B,KAAK,qBAAqB,IAAI,YAAY,GAC3C,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EACL,iBAAiB,IAAI,QAAQ,EAC7B,mBAAmB,EACnB,KAAK,sBAAsB,IAAI,aAAa,GAC7C,MAAM,sDAAsD,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
export type AccordionContentProps = ComponentProps<typeof AccordionPrimitive.Content>;
|
|
4
|
+
export declare function AccordionContent({ children, ...props }: AccordionContentProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
//# sourceMappingURL=accordion-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion-content.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/primitives/accordion-content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAGhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,CAAC;AAEtF,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,2CA+B7E"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
export type AccordionItemProps = ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>;
|
|
4
|
+
export declare function AccordionItem({ children, className, ...props }: AccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
//# sourceMappingURL=accordion-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion-item.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/primitives/accordion-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAEhE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAItD,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAE1F,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAmBlF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
interface AccordionContext {
|
|
3
|
+
colorScheme: 'light' | 'dark';
|
|
4
|
+
}
|
|
5
|
+
export declare const AccordionContext: import("react").Context<AccordionContext | undefined>;
|
|
6
|
+
export interface AccordionProviderProps {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
colorScheme?: 'light' | 'dark';
|
|
9
|
+
}
|
|
10
|
+
export declare function AccordionProvider({ children, colorScheme }: AccordionProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function useAccordionContext(): AccordionContext;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=accordion-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion-provider.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/primitives/accordion-provider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,UAAU,gBAAgB;IACxB,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,gBAAgB,uDAAyD,CAAC;AAEvF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAChC;AAED,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,WAAqB,EAAE,EAAE,sBAAsB,2CAE5F;AAED,wBAAgB,mBAAmB,qBAQlC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
export type AccordionRootProps = ComponentProps<typeof AccordionPrimitive.Root>;
|
|
4
|
+
export declare function AccordionRoot({ ...props }: AccordionRootProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
//# sourceMappingURL=accordion-root.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion-root.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/primitives/accordion-root.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAEhF,wBAAgB,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAE7D"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
export type AccordionTriggerProps = ComponentProps<typeof AccordionPrimitive.Trigger>;
|
|
4
|
+
export declare function AccordionTrigger({ children, ...props }: AccordionTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
//# sourceMappingURL=accordion-trigger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion-trigger.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/primitives/accordion-trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAEhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,CAAC;AAEtF,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,2CAyD7E"}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),v=require("react");require("react-dom");function xe(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const i=xe(v);function Ce({colorScheme:e="light",items:t,...n}){return l.jsx(at,{colorScheme:e,children:l.jsx(ct,{...n,children:t.map((o,r)=>l.jsxs(rt,{value:o.title,children:[l.jsx(st,{children:o.title}),l.jsx(it,{children:o.content})]},r))})})}function U(e,t=[]){let n=[];function o(c,a){const s=i.createContext(a),d=n.length;n=[...n,a];const u=f=>{const{scope:C,children:g,...A}=f,x=C?.[e]?.[d]||s,h=i.useMemo(()=>A,Object.values(A));return l.jsx(x.Provider,{value:h,children:g})};u.displayName=c+"Provider";function p(f,C){const g=C?.[e]?.[d]||s,A=i.useContext(g);if(A)return A;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${c}\``)}return[u,p]}const r=()=>{const c=n.map(a=>i.createContext(a));return function(s){const d=s?.[e]||c;return i.useMemo(()=>({[`__scope${e}`]:{...s,[e]:d}}),[s,d])}};return r.scopeName=e,[o,be(r,...t)]}function be(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(c){const a=o.reduce((s,{useScope:d,scopeName:u})=>{const f=d(c)[`__scope${u}`];return{...s,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Y(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Z(...e){return t=>{let n=!1;const o=e.map(r=>{const c=Y(r,t);return!n&&typeof c=="function"&&(n=!0),c});if(n)return()=>{for(let r=0;r<o.length;r++){const c=o[r];typeof c=="function"?c():Y(e[r],null)}}}}function P(...e){return i.useCallback(Z(...e),e)}function L(e){const t=Ae(e),n=i.forwardRef((o,r)=>{const{children:c,...a}=o,s=i.Children.toArray(c),d=s.find(Ne);if(d){const u=d.props.children,p=s.map(f=>f===d?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return l.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,p):null})}return l.jsx(t,{...a,ref:r,children:c})});return n.displayName=`${e}.Slot`,n}function Ae(e){const t=i.forwardRef((n,o)=>{const{children:r,...c}=n;if(i.isValidElement(r)){const a=Ie(r),s=Re(c,r.props);return r.type!==i.Fragment&&(s.ref=o?Z(o,a):a),i.cloneElement(r,s)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ye=Symbol("radix.slottable");function Ne(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ye}function Re(e,t){const n={...t};for(const o in t){const r=e[o],c=t[o];/^on[A-Z]/.test(o)?r&&c?n[o]=(...s)=>{const d=c(...s);return r(...s),d}:r&&(n[o]=r):o==="style"?n[o]={...r,...c}:o==="className"&&(n[o]=[r,c].filter(Boolean).join(" "))}return{...e,...n}}function Ie(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Se(e){const t=e+"CollectionProvider",[n,o]=U(t),[r,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=x=>{const{scope:h,children:y}=x,m=v.useRef(null),b=v.useRef(new Map).current;return l.jsx(r,{scope:h,itemMap:b,collectionRef:m,children:y})};a.displayName=t;const s=e+"CollectionSlot",d=L(s),u=v.forwardRef((x,h)=>{const{scope:y,children:m}=x,b=c(s,y),N=P(h,b.collectionRef);return l.jsx(d,{ref:N,children:m})});u.displayName=s;const p=e+"CollectionItemSlot",f="data-radix-collection-item",C=L(p),g=v.forwardRef((x,h)=>{const{scope:y,children:m,...b}=x,N=v.useRef(null),S=P(h,N),I=c(p,y);return v.useEffect(()=>(I.itemMap.set(N,{ref:N,...b}),()=>void I.itemMap.delete(N))),l.jsx(C,{[f]:"",ref:S,children:m})});g.displayName=p;function A(x){const h=c(e+"CollectionConsumer",x);return v.useCallback(()=>{const m=h.collectionRef.current;if(!m)return[];const b=Array.from(m.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((I,D)=>b.indexOf(I.ref.current)-b.indexOf(D.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:u,ItemSlot:g},A,o]}function J(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var w=globalThis?.document?i.useLayoutEffect:()=>{},Pe=i[" useInsertionEffect ".trim().toString()]||w;function F({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,c,a]=we({defaultProp:t,onChange:n}),s=e!==void 0,d=s?e:r;{const p=i.useRef(e!==void 0);i.useEffect(()=>{const f=p.current;f!==s&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=s},[s,o])}const u=i.useCallback(p=>{if(s){const f=Ee(p)?p(e):p;f!==e&&a.current?.(f)}else c(p)},[s,e,c,a]);return[d,u]}function we({defaultProp:e,onChange:t}){const[n,o]=i.useState(e),r=i.useRef(n),c=i.useRef(t);return Pe(()=>{c.current=t},[t]),i.useEffect(()=>{r.current!==n&&(c.current?.(n),r.current=n)},[n,r]),[n,o,c]}function Ee(e){return typeof e=="function"}var _e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_=_e.reduce((e,t)=>{const n=L(`Primitive.${t}`),o=i.forwardRef((r,c)=>{const{asChild:a,...s}=r,d=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(d,{...s,ref:c})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function je(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var Q=e=>{const{present:t,children:n}=e,o=Oe(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),c=P(o.ref,Me(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:c}):null};Q.displayName="Presence";function Oe(e){const[t,n]=i.useState(),o=i.useRef(null),r=i.useRef(e),c=i.useRef("none"),a=e?"mounted":"unmounted",[s,d]=je(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=j(o.current);c.current=s==="mounted"?u:"none"},[s]),w(()=>{const u=o.current,p=r.current;if(p!==e){const C=c.current,g=j(u);e?d("MOUNT"):g==="none"||u?.display==="none"?d("UNMOUNT"):d(p&&C!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,d]),w(()=>{if(t){let u;const p=t.ownerDocument.defaultView??window,f=g=>{const x=j(o.current).includes(CSS.escape(g.animationName));if(g.target===t&&x&&(d("ANIMATION_END"),!r.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",u=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},C=g=>{g.target===t&&(c.current=j(o.current))};return t.addEventListener("animationstart",C),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{p.clearTimeout(u),t.removeEventListener("animationstart",C),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:i.useCallback(u=>{o.current=u?getComputedStyle(u):null,n(u)},[])}}function j(e){return e?.animationName||"none"}function Me(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Te=i[" useId ".trim().toString()]||(()=>{}),ke=0;function X(e){const[t,n]=i.useState(Te());return w(()=>{n(o=>o??String(ke++))},[e]),t?`radix-${t}`:""}var M="Collapsible",[De,ee]=U(M),[$e,W]=De(M),te=i.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:o,defaultOpen:r,disabled:c,onOpenChange:a,...s}=e,[d,u]=F({prop:o,defaultProp:r??!1,onChange:a,caller:M});return l.jsx($e,{scope:n,disabled:c,contentId:X(),open:d,onOpenToggle:i.useCallback(()=>u(p=>!p),[u]),children:l.jsx(_.div,{"data-state":B(d),"data-disabled":c?"":void 0,...s,ref:t})})});te.displayName=M;var ne="CollapsibleTrigger",oe=i.forwardRef((e,t)=>{const{__scopeCollapsible:n,...o}=e,r=W(ne,n);return l.jsx(_.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":B(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...o,ref:t,onClick:J(e.onClick,r.onOpenToggle)})});oe.displayName=ne;var H="CollapsibleContent",re=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=W(H,e.__scopeCollapsible);return l.jsx(Q,{present:n||r.open,children:({present:c})=>l.jsx(Le,{...o,ref:t,present:c})})});re.displayName=H;var Le=i.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:o,children:r,...c}=e,a=W(H,n),[s,d]=i.useState(o),u=i.useRef(null),p=P(t,u),f=i.useRef(0),C=f.current,g=i.useRef(0),A=g.current,x=a.open||s,h=i.useRef(x),y=i.useRef(void 0);return i.useEffect(()=>{const m=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(m)},[]),w(()=>{const m=u.current;if(m){y.current=y.current||{transitionDuration:m.style.transitionDuration,animationName:m.style.animationName},m.style.transitionDuration="0s",m.style.animationName="none";const b=m.getBoundingClientRect();f.current=b.height,g.current=b.width,h.current||(m.style.transitionDuration=y.current.transitionDuration,m.style.animationName=y.current.animationName),d(o)}},[a.open,o]),l.jsx(_.div,{"data-state":B(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!x,...c,ref:p,style:{"--radix-collapsible-content-height":C?`${C}px`:void 0,"--radix-collapsible-content-width":A?`${A}px`:void 0,...e.style},children:x&&r})});function B(e){return e?"open":"closed"}var Ve=te,Ue=oe,Fe=re,We=i.createContext(void 0);function He(e){const t=i.useContext(We);return e||t||"ltr"}var R="Accordion",Be=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[q,qe,Ge]=Se(R),[T]=U(R,[Ge,ee]),G=ee(),ce=v.forwardRef((e,t)=>{const{type:n,...o}=e,r=o,c=o;return l.jsx(q.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?l.jsx(Ze,{...c,ref:t}):l.jsx(Ye,{...r,ref:t})})});ce.displayName=R;var[ie,Ke]=T(R),[se,ze]=T(R,{collapsible:!1}),Ye=v.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},collapsible:c=!1,...a}=e,[s,d]=F({prop:n,defaultProp:o??"",onChange:r,caller:R});return l.jsx(ie,{scope:e.__scopeAccordion,value:v.useMemo(()=>s?[s]:[],[s]),onItemOpen:d,onItemClose:v.useCallback(()=>c&&d(""),[c,d]),children:l.jsx(se,{scope:e.__scopeAccordion,collapsible:c,children:l.jsx(ae,{...a,ref:t})})})}),Ze=v.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},...c}=e,[a,s]=F({prop:n,defaultProp:o??[],onChange:r,caller:R}),d=v.useCallback(p=>s((f=[])=>[...f,p]),[s]),u=v.useCallback(p=>s((f=[])=>f.filter(C=>C!==p)),[s]);return l.jsx(ie,{scope:e.__scopeAccordion,value:a,onItemOpen:d,onItemClose:u,children:l.jsx(se,{scope:e.__scopeAccordion,collapsible:!0,children:l.jsx(ae,{...c,ref:t})})})}),[Je,k]=T(R),ae=v.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:o,dir:r,orientation:c="vertical",...a}=e,s=v.useRef(null),d=P(s,t),u=qe(n),f=He(r)==="ltr",C=J(e.onKeyDown,g=>{if(!Be.includes(g.key))return;const A=g.target,x=u().filter($=>!$.ref.current?.disabled),h=x.findIndex($=>$.ref.current===A),y=x.length;if(h===-1)return;g.preventDefault();let m=h;const b=0,N=y-1,S=()=>{m=h+1,m>N&&(m=b)},I=()=>{m=h-1,m<b&&(m=N)};switch(g.key){case"Home":m=b;break;case"End":m=N;break;case"ArrowRight":c==="horizontal"&&(f?S():I());break;case"ArrowDown":c==="vertical"&&S();break;case"ArrowLeft":c==="horizontal"&&(f?I():S());break;case"ArrowUp":c==="vertical"&&I();break}const D=m%y;x[D].ref.current?.focus()});return l.jsx(Je,{scope:n,disabled:o,direction:r,orientation:c,children:l.jsx(q.Slot,{scope:n,children:l.jsx(_.div,{...a,"data-orientation":c,ref:d,onKeyDown:o?void 0:C})})})}),O="AccordionItem",[Qe,K]=T(O),le=v.forwardRef((e,t)=>{const{__scopeAccordion:n,value:o,...r}=e,c=k(O,n),a=Ke(O,n),s=G(n),d=X(),u=o&&a.value.includes(o)||!1,p=c.disabled||e.disabled;return l.jsx(Qe,{scope:n,open:u,disabled:p,triggerId:d,children:l.jsx(Ve,{"data-orientation":c.orientation,"data-state":ve(u),...s,...r,ref:t,disabled:p,open:u,onOpenChange:f=>{f?a.onItemOpen(o):a.onItemClose(o)}})})});le.displayName=O;var de="AccordionHeader",ue=v.forwardRef((e,t)=>{const{__scopeAccordion:n,...o}=e,r=k(R,n),c=K(de,n);return l.jsx(_.h3,{"data-orientation":r.orientation,"data-state":ve(c.open),"data-disabled":c.disabled?"":void 0,...o,ref:t})});ue.displayName=de;var V="AccordionTrigger",fe=v.forwardRef((e,t)=>{const{__scopeAccordion:n,...o}=e,r=k(R,n),c=K(V,n),a=ze(V,n),s=G(n);return l.jsx(q.ItemSlot,{scope:n,children:l.jsx(Ue,{"aria-disabled":c.open&&!a.collapsible||void 0,"data-orientation":r.orientation,id:c.triggerId,...s,...o,ref:t})})});fe.displayName=V;var pe="AccordionContent",me=v.forwardRef((e,t)=>{const{__scopeAccordion:n,...o}=e,r=k(R,n),c=K(pe,n),a=G(n);return l.jsx(Fe,{role:"region","aria-labelledby":c.triggerId,"data-orientation":r.orientation,...a,...o,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});me.displayName=pe;function ve(e){return e?"open":"closed"}var Xe=ce,et=le,tt=ue,nt=fe,ot=me;function ge(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=ge(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function E(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=ge(e))&&(o&&(o+=" "),o+=t);return o}function rt({children:e,className:t,...n}){const{colorScheme:o}=z();return l.jsx(et,{className:E("focus:outline-2 has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-[var(--accordion-focus,hsl(var(--primary)))] has-[:focus-visible]:ring-offset-4",{light:"ring-offset-[var(--acordion-light-offset,hsl(var(--background)))]",dark:"ring-offset-[var(--acordion-dark-offset,hsl(var(--foreground)))]"}[o],t),"data-slot":"accordion-item",...n,children:e})}function ct({...e}){return l.jsx(Xe,{"data-slot":"accordion-root",...e})}function it({children:e,...t}){const{colorScheme:n}=z(),[o,r]=v.useState(!1);return v.useEffect(()=>{r(!0)},[]),l.jsx(ot,{className:E("overflow-hidden",o&&"data-[state=closed]:animate-collapse data-[state=open]:animate-expand"),...t,children:l.jsx("div",{className:E("py-3 text-base font-[var(--accordion-content-font-family,var(--font-family-body))] font-light leading-normal",{light:"text-[var(--accordion-light-content-text,hsl(var(--foreground)))]",dark:"text-[var(--accordion-dark-content-text,hsl(var(--background)))]"}[n]),children:e})})}function st({children:e,...t}){const{colorScheme:n}=z();return l.jsx(tt,{children:l.jsxs(nt,{className:"group flex w-full cursor-pointer items-start gap-8 border-none py-3 text-start focus:outline-none @md:py-4","data-slot":"accordion-trigger",...t,children:[l.jsx("div",{className:E("flex-1 select-none text-sm font-[var(--accordion-title-font-family,var(--font-family-mono))] font-normal uppercase transition-colors duration-300 ease-out",{light:"text-[var(--accordion-light-title-text,hsl(var(--contrast-400)))] group-hover:text-[var(--accordion-light-title-text-hover,hsl(var(--foreground)))]",dark:"text-[var(--accordion-dark-title-text,hsl(var(--contrast-200)))] group-hover:text-[var(--accordion-dark-title-text-hover,hsl(var(--background)))]"}[n]),children:e}),l.jsxs("svg",{className:E("mt-1 shrink-0 [&>line]:origin-center [&>line]:transition [&>line]:duration-300 [&>line]:ease-out",{light:"stroke-[var(--accordion-light-title-icon,hsl(var(--contrast-500)))] group-hover:stroke-[var(--accordion-light-title-icon-hover,hsl(var(--foreground)))]",dark:"stroke-[var(--accordion-dark-title-icon,hsl(var(--contrast-200)))] group-hover:stroke-[var(--accordion-dark-title-icon-hover,hsl(var(--background)))]"}[n]),"data-slot":"accordion-chevron",viewBox:"0 0 10 10",width:16,children:[l.jsx("line",{className:"group-data-[state=open]:-translate-y-[3px] group-data-[state=open]:-rotate-90",strokeLinecap:"round",x1:2,x2:5,y1:2,y2:5}),l.jsx("line",{className:"group-data-[state=open]:-translate-y-[3px] group-data-[state=open]:rotate-90",strokeLinecap:"round",x1:8,x2:5,y1:2,y2:5})]})]})})}const he=v.createContext(void 0);function at({children:e,colorScheme:t="light"}){return l.jsx(he,{value:{colorScheme:t},children:e})}function z(){const e=v.useContext(he);if(e===void 0)throw new Error("useAccordionContext must be used within an AccordionProvider");return e}exports.Accordion=Ce;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/components/accordion/accordion.tsx","../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-collection@1.1.7_@types+react-dom@19.2.2_@types+react@19.2.2__@types+react@19_k2fjofhzujhv5hwvt4rfkjvvre/node_modules/@radix-ui/react-collection/dist/index.mjs","../node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.2_@types+react@19.2.2__@types+react@19._bvylq7i3abu4hbpi6ukh4as6qa/node_modules/@radix-ui/react-primitive/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-presence@1.1.5_@types+react-dom@19.2.2_@types+react@19.2.2__@types+react@19.2_rg5yyfyy4s5drnz7lbyqdnomsm/node_modules/@radix-ui/react-presence/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-id/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-collapsible@1.1.12_@types+react-dom@19.2.2_@types+react@19.2.2__@types+react@_5wh3wn4mb6wukeaw22ryera4jq/node_modules/@radix-ui/react-collapsible/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-direction/dist/index.mjs","../node_modules/.pnpm/@radix-ui+react-accordion@1.2.12_@types+react-dom@19.2.2_@types+react@19.2.2__@types+react@19_ypscna4y3y4no7anhyuspcgzt4/node_modules/@radix-ui/react-accordion/dist/index.mjs","../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs","../src/components/accordion/primitives/accordion-item.tsx","../src/components/accordion/primitives/accordion-root.tsx","../src/components/accordion/primitives/accordion-content.tsx","../src/components/accordion/primitives/accordion-trigger.tsx","../src/components/accordion/primitives/accordion-provider.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport * as AccordionPrimitive from '@/components/accordion';\n\ninterface AccordionItemData {\n title: string;\n content: ReactNode;\n value?: string;\n}\n\nexport type AccordionProps = AccordionPrimitive.RootProps & {\n colorScheme?: 'light' | 'dark';\n items: AccordionItemData[];\n};\n\n/**\n * This component supports various CSS variables for theming. Here's a comprehensive list, along\n * with their default values:\n *\n * ```css\n * :root {\n * --accordion-focus: var(--primary);\n * --acordion-light-offset: var(--background);\n * --accordion-light-title-text: var(--contrast-400);\n * --accordion-light-title-text-hover: var(--foreground);\n * --accordion-light-title-icon: var(--contrast-500);\n * --accordion-light-title-icon-hover: var(--foreground);\n * --accordion-light-content-text: var(--foreground);\n * --acordion-dark-offset: var(--foreground);\n * --accordion-dark-title-text: var(--contrast-200);\n * --accordion-dark-title-text-hover: var(--background);\n * --accordion-dark-title-icon: var(--contrast-200);\n * --accordion-dark-title-icon-hover: var(--background);\n * --accordion-dark-content-text: var(--background);\n * --accordion-title-font-family: var(--font-family-mono);\n * --accordion-content-font-family: var(--font-family-body);\n * }\n * ```\n */\nexport function Accordion({ colorScheme = 'light', items, ...props }: AccordionProps) {\n return (\n <AccordionPrimitive.Provider colorScheme={colorScheme}>\n <AccordionPrimitive.Root {...props}>\n {items.map((item, index) => (\n <AccordionPrimitive.Item key={index} value={item.title}>\n <AccordionPrimitive.Trigger>{item.title}</AccordionPrimitive.Trigger>\n <AccordionPrimitive.Content>{item.content}</AccordionPrimitive.Content>\n </AccordionPrimitive.Item>\n ))}\n </AccordionPrimitive.Root>\n </AccordionPrimitive.Provider>\n );\n}\n","// packages/react/context/src/create-context.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/collection-legacy.tsx\nimport React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createCollection(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }\n );\n const CollectionProvider = (props) => {\n const { scope, children } = props;\n const ref = React.useRef(null);\n const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;\n return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...itemData });\n return () => void context.itemMap.delete(ref);\n });\n return /* @__PURE__ */ jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useCollection(scope) {\n const context = useCollectionContext(name + \"CollectionConsumer\", scope);\n const getItems = React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n return getItems;\n }\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n createCollectionScope\n ];\n}\n\n// src/collection.tsx\nimport React2 from \"react\";\nimport { createContextScope as createContextScope2 } from \"@radix-ui/react-context\";\nimport { useComposedRefs as useComposedRefs2 } from \"@radix-ui/react-compose-refs\";\nimport { createSlot as createSlot2 } from \"@radix-ui/react-slot\";\n\n// src/ordered-dictionary.ts\nvar __instanciated = /* @__PURE__ */ new WeakMap();\nvar OrderedDict = class _OrderedDict extends Map {\n #keys;\n constructor(entries) {\n super(entries);\n this.#keys = [...super.keys()];\n __instanciated.set(this, true);\n }\n set(key, value) {\n if (__instanciated.get(this)) {\n if (this.has(key)) {\n this.#keys[this.#keys.indexOf(key)] = key;\n } else {\n this.#keys.push(key);\n }\n }\n super.set(key, value);\n return this;\n }\n insert(index, key, value) {\n const has = this.has(key);\n const length = this.#keys.length;\n const relativeIndex = toSafeInteger(index);\n let actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n const safeIndex = actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {\n this.set(key, value);\n return this;\n }\n const size = this.size + (has ? 0 : 1);\n if (relativeIndex < 0) {\n actualIndex++;\n }\n const keys = [...this.#keys];\n let nextValue;\n let shouldSkip = false;\n for (let i = actualIndex; i < size; i++) {\n if (actualIndex === i) {\n let nextKey = keys[i];\n if (keys[i] === key) {\n nextKey = keys[i + 1];\n }\n if (has) {\n this.delete(key);\n }\n nextValue = this.get(nextKey);\n this.set(key, value);\n } else {\n if (!shouldSkip && keys[i - 1] === key) {\n shouldSkip = true;\n }\n const currentKey = keys[shouldSkip ? i : i - 1];\n const currentValue = nextValue;\n nextValue = this.get(currentKey);\n this.delete(currentKey);\n this.set(currentKey, currentValue);\n }\n }\n return this;\n }\n with(index, key, value) {\n const copy = new _OrderedDict(this);\n copy.insert(index, key, value);\n return copy;\n }\n before(key) {\n const index = this.#keys.indexOf(key) - 1;\n if (index < 0) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position before the given key.\n */\n setBefore(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index, newKey, value);\n }\n after(key) {\n let index = this.#keys.indexOf(key);\n index = index === -1 || index === this.size - 1 ? -1 : index + 1;\n if (index === -1) {\n return void 0;\n }\n return this.entryAt(index);\n }\n /**\n * Sets a new key-value pair at the position after the given key.\n */\n setAfter(key, newKey, value) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index + 1, newKey, value);\n }\n first() {\n return this.entryAt(0);\n }\n last() {\n return this.entryAt(-1);\n }\n clear() {\n this.#keys = [];\n return super.clear();\n }\n delete(key) {\n const deleted = super.delete(key);\n if (deleted) {\n this.#keys.splice(this.#keys.indexOf(key), 1);\n }\n return deleted;\n }\n deleteAt(index) {\n const key = this.keyAt(index);\n if (key !== void 0) {\n return this.delete(key);\n }\n return false;\n }\n at(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return this.get(key);\n }\n }\n entryAt(index) {\n const key = at(this.#keys, index);\n if (key !== void 0) {\n return [key, this.get(key)];\n }\n }\n indexOf(key) {\n return this.#keys.indexOf(key);\n }\n keyAt(index) {\n return at(this.#keys, index);\n }\n from(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.at(dest);\n }\n keyFrom(key, offset) {\n const index = this.indexOf(key);\n if (index === -1) {\n return void 0;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.keyAt(dest);\n }\n find(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return entry;\n }\n index++;\n }\n return void 0;\n }\n findIndex(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return index;\n }\n index++;\n }\n return -1;\n }\n filter(predicate, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n entries.push(entry);\n }\n index++;\n }\n return new _OrderedDict(entries);\n }\n map(callbackfn, thisArg) {\n const entries = [];\n let index = 0;\n for (const entry of this) {\n entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index, this])]);\n index++;\n }\n return new _OrderedDict(entries);\n }\n reduce(...args) {\n const [callbackfn, initialValue] = args;\n let index = 0;\n let accumulator = initialValue ?? this.at(0);\n for (const entry of this) {\n if (index === 0 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n index++;\n }\n return accumulator;\n }\n reduceRight(...args) {\n const [callbackfn, initialValue] = args;\n let accumulator = initialValue ?? this.at(-1);\n for (let index = this.size - 1; index >= 0; index--) {\n const entry = this.at(index);\n if (index === this.size - 1 && args.length === 1) {\n accumulator = entry;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n }\n return accumulator;\n }\n toSorted(compareFn) {\n const entries = [...this.entries()].sort(compareFn);\n return new _OrderedDict(entries);\n }\n toReversed() {\n const reversed = new _OrderedDict();\n for (let index = this.size - 1; index >= 0; index--) {\n const key = this.keyAt(index);\n const element = this.get(key);\n reversed.set(key, element);\n }\n return reversed;\n }\n toSpliced(...args) {\n const entries = [...this.entries()];\n entries.splice(...args);\n return new _OrderedDict(entries);\n }\n slice(start, end) {\n const result = new _OrderedDict();\n let stop = this.size - 1;\n if (start === void 0) {\n return result;\n }\n if (start < 0) {\n start = start + this.size;\n }\n if (end !== void 0 && end > 0) {\n stop = end - 1;\n }\n for (let index = start; index <= stop; index++) {\n const key = this.keyAt(index);\n const element = this.get(key);\n result.set(key, element);\n }\n return result;\n }\n every(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (!Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return false;\n }\n index++;\n }\n return true;\n }\n some(predicate, thisArg) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return true;\n }\n index++;\n }\n return false;\n }\n};\nfunction at(array, index) {\n if (\"at\" in Array.prototype) {\n return Array.prototype.at.call(array, index);\n }\n const actualIndex = toSafeIndex(array, index);\n return actualIndex === -1 ? void 0 : array[actualIndex];\n}\nfunction toSafeIndex(array, index) {\n const length = array.length;\n const relativeIndex = toSafeInteger(index);\n const actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n return actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n}\nfunction toSafeInteger(number) {\n return number !== number || number === 0 ? 0 : Math.trunc(number);\n}\n\n// src/collection.tsx\nimport { jsx as jsx2 } from \"react/jsx-runtime\";\nfunction createCollection2(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope2(PROVIDER_NAME);\n const [CollectionContextProvider, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n {\n collectionElement: null,\n collectionRef: { current: null },\n collectionRefObject: { current: null },\n itemMap: new OrderedDict(),\n setItemMap: () => void 0\n }\n );\n const CollectionProvider = ({ state, ...props }) => {\n return state ? /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state }) : /* @__PURE__ */ jsx2(CollectionInit, { ...props });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const CollectionInit = (props) => {\n const state = useInitCollection();\n return /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state });\n };\n CollectionInit.displayName = PROVIDER_NAME + \"Init\";\n const CollectionProviderImpl = (props) => {\n const { scope, children, state } = props;\n const ref = React2.useRef(null);\n const [collectionElement, setCollectionElement] = React2.useState(\n null\n );\n const composeRefs = useComposedRefs2(ref, setCollectionElement);\n const [itemMap, setItemMap] = state;\n React2.useEffect(() => {\n if (!collectionElement) return;\n const observer = getChildListObserver(() => {\n });\n observer.observe(collectionElement, {\n childList: true,\n subtree: true\n });\n return () => {\n observer.disconnect();\n };\n }, [collectionElement]);\n return /* @__PURE__ */ jsx2(\n CollectionContextProvider,\n {\n scope,\n itemMap,\n setItemMap,\n collectionRef: composeRefs,\n collectionRefObject: ref,\n collectionElement,\n children\n }\n );\n };\n CollectionProviderImpl.displayName = PROVIDER_NAME + \"Impl\";\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot2(COLLECTION_SLOT_NAME);\n const CollectionSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx2(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot2(ITEM_SLOT_NAME);\n const CollectionItemSlot = React2.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React2.useRef(null);\n const [element, setElement] = React2.useState(null);\n const composedRefs = useComposedRefs2(forwardedRef, ref, setElement);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n const { setItemMap } = context;\n const itemDataRef = React2.useRef(itemData);\n if (!shallowEqual(itemDataRef.current, itemData)) {\n itemDataRef.current = itemData;\n }\n const memoizedItemData = itemDataRef.current;\n React2.useEffect(() => {\n const itemData2 = memoizedItemData;\n setItemMap((map) => {\n if (!element) {\n return map;\n }\n if (!map.has(element)) {\n map.set(element, { ...itemData2, element });\n return map.toSorted(sortByDocumentPosition);\n }\n return map.set(element, { ...itemData2, element }).toSorted(sortByDocumentPosition);\n });\n return () => {\n setItemMap((map) => {\n if (!element || !map.has(element)) {\n return map;\n }\n map.delete(element);\n return new OrderedDict(map);\n });\n };\n }, [element, memoizedItemData, setItemMap]);\n return /* @__PURE__ */ jsx2(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useInitCollection() {\n return React2.useState(new OrderedDict());\n }\n function useCollection(scope) {\n const { itemMap } = useCollectionContext(name + \"CollectionConsumer\", scope);\n return itemMap;\n }\n const functions = {\n createCollectionScope,\n useCollection,\n useInitCollection\n };\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n functions\n ];\n}\nfunction shallowEqual(a, b) {\n if (a === b) return true;\n if (typeof a !== \"object\" || typeof b !== \"object\") return false;\n if (a == null || b == null) return false;\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n for (const key of keysA) {\n if (!Object.prototype.hasOwnProperty.call(b, key)) return false;\n if (a[key] !== b[key]) return false;\n }\n return true;\n}\nfunction isElementPreceding(a, b) {\n return !!(b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING);\n}\nfunction sortByDocumentPosition(a, b) {\n return !a[1].element || !b[1].element ? 0 : isElementPreceding(a[1].element, b[1].element) ? -1 : 1;\n}\nfunction getChildListObserver(callback) {\n const observer = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === \"childList\") {\n callback();\n return;\n }\n }\n });\n return observer;\n}\nexport {\n createCollection,\n createCollection2 as unstable_createCollection\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nfunction getOwnerWindow(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access window outside of the DOM\");\n }\n return element?.ownerDocument?.defaultView ?? window;\n}\nfunction getOwnerDocument(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access document outside of the DOM\");\n }\n return element?.ownerDocument ?? document;\n}\nfunction getActiveElement(node, activeDescendant = false) {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n return null;\n }\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n if (activeDescendant) {\n const id = activeElement.getAttribute(\"aria-activedescendant\");\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n return activeElement;\n}\nfunction isFrame(element) {\n return element.tagName === \"IFRAME\";\n}\nexport {\n canUseDOM,\n composeEventHandlers,\n getActiveElement,\n getOwnerDocument,\n getOwnerWindow,\n isFrame\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-layout-effect/src/use-layout-effect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n","// src/use-controllable-state.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useInsertionEffect = React[\" useInsertionEffect \".trim().toString()] || useLayoutEffect;\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n },\n caller\n}) {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange\n });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n if (true) {\n const isControlledRef = React.useRef(prop !== void 0);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value2 !== prop) {\n onChangeRef.current?.(value2);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n return [value, setValue, onChangeRef];\n}\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n\n// src/use-controllable-state-reducer.tsx\nimport * as React2 from \"react\";\nimport { useEffectEvent } from \"@radix-ui/react-use-effect-event\";\nvar SYNC_STATE = Symbol(\"RADIX:SYNC_STATE\");\nfunction useControllableStateReducer(reducer, userArgs, initialArg, init) {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== void 0;\n const onChange = useEffectEvent(onChangeProp);\n if (true) {\n const isControlledRef = React2.useRef(controlledState !== void 0);\n React2.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const args = [{ ...initialArg, state: defaultProp }];\n if (init) {\n args.push(init);\n }\n const [internalState, dispatch] = React2.useReducer(\n (state2, action) => {\n if (action.type === SYNC_STATE) {\n return { ...state2, state: action.state };\n }\n const next = reducer(state2, action);\n if (isControlled && !Object.is(next.state, state2.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n const uncontrolledState = internalState.state;\n const prevValueRef = React2.useRef(uncontrolledState);\n React2.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [onChange, uncontrolledState, prevValueRef, isControlled]);\n const state = React2.useMemo(() => {\n const isControlled2 = controlledState !== void 0;\n if (isControlled2) {\n return { ...internalState, state: controlledState };\n }\n return internalState;\n }, [internalState, controlledState]);\n React2.useEffect(() => {\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n return [state, dispatch];\n}\nexport {\n useControllableState,\n useControllableStateReducer\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/id/src/id.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useReactId = React[\" useId \".trim().toString()] || (() => void 0);\nvar count = 0;\nfunction useId(deterministicId) {\n const [id, setId] = React.useState(useReactId());\n useLayoutEffect(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : \"\");\n}\nexport {\n useId\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/collapsible.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar COLLAPSIBLE_NAME = \"Collapsible\";\nvar [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);\nvar [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);\nvar Collapsible = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeCollapsible,\n open: openProp,\n defaultOpen,\n disabled,\n onOpenChange,\n ...collapsibleProps\n } = props;\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: COLLAPSIBLE_NAME\n });\n return /* @__PURE__ */ jsx(\n CollapsibleProvider,\n {\n scope: __scopeCollapsible,\n disabled,\n contentId: useId(),\n open,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(open),\n \"data-disabled\": disabled ? \"\" : void 0,\n ...collapsibleProps,\n ref: forwardedRef\n }\n )\n }\n );\n }\n);\nCollapsible.displayName = COLLAPSIBLE_NAME;\nvar TRIGGER_NAME = \"CollapsibleTrigger\";\nvar CollapsibleTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeCollapsible, ...triggerProps } = props;\n const context = useCollapsibleContext(TRIGGER_NAME, __scopeCollapsible);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-controls\": context.contentId,\n \"aria-expanded\": context.open || false,\n \"data-state\": getState(context.open),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n disabled: context.disabled,\n ...triggerProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nCollapsibleTrigger.displayName = TRIGGER_NAME;\nvar CONTENT_NAME = \"CollapsibleContent\";\nvar CollapsibleContent = React.forwardRef(\n (props, forwardedRef) => {\n const { forceMount, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, props.__scopeCollapsible);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ jsx(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });\n }\n);\nCollapsibleContent.displayName = CONTENT_NAME;\nvar CollapsibleContentImpl = React.forwardRef((props, forwardedRef) => {\n const { __scopeCollapsible, present, children, ...contentProps } = props;\n const context = useCollapsibleContext(CONTENT_NAME, __scopeCollapsible);\n const [isPresent, setIsPresent] = React.useState(present);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const heightRef = React.useRef(0);\n const height = heightRef.current;\n const widthRef = React.useRef(0);\n const width = widthRef.current;\n const isOpen = context.open || isPresent;\n const isMountAnimationPreventedRef = React.useRef(isOpen);\n const originalStylesRef = React.useRef(void 0);\n React.useEffect(() => {\n const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);\n return () => cancelAnimationFrame(rAF);\n }, []);\n useLayoutEffect(() => {\n const node = ref.current;\n if (node) {\n originalStylesRef.current = originalStylesRef.current || {\n transitionDuration: node.style.transitionDuration,\n animationName: node.style.animationName\n };\n node.style.transitionDuration = \"0s\";\n node.style.animationName = \"none\";\n const rect = node.getBoundingClientRect();\n heightRef.current = rect.height;\n widthRef.current = rect.width;\n if (!isMountAnimationPreventedRef.current) {\n node.style.transitionDuration = originalStylesRef.current.transitionDuration;\n node.style.animationName = originalStylesRef.current.animationName;\n }\n setIsPresent(present);\n }\n }, [context.open, present]);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n id: context.contentId,\n hidden: !isOpen,\n ...contentProps,\n ref: composedRefs,\n style: {\n [`--radix-collapsible-content-height`]: height ? `${height}px` : void 0,\n [`--radix-collapsible-content-width`]: width ? `${width}px` : void 0,\n ...props.style\n },\n children: isOpen && children\n }\n );\n});\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root = Collapsible;\nvar Trigger = CollapsibleTrigger;\nvar Content = CollapsibleContent;\nexport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n Content,\n Root,\n Trigger,\n createCollapsibleScope\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/direction/src/direction.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DirectionContext = React.createContext(void 0);\nvar DirectionProvider = (props) => {\n const { dir, children } = props;\n return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });\n};\nfunction useDirection(localDir) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || \"ltr\";\n}\nvar Provider = DirectionProvider;\nexport {\n DirectionProvider,\n Provider,\n useDirection\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/accordion.tsx\nimport React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\nimport { createCollapsibleScope } from \"@radix-ui/react-collapsible\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ACCORDION_NAME = \"Accordion\";\nvar ACCORDION_KEYS = [\"Home\", \"End\", \"ArrowDown\", \"ArrowUp\", \"ArrowLeft\", \"ArrowRight\"];\nvar [Collection, useCollection, createCollectionScope] = createCollection(ACCORDION_NAME);\nvar [createAccordionContext, createAccordionScope] = createContextScope(ACCORDION_NAME, [\n createCollectionScope,\n createCollapsibleScope\n]);\nvar useCollapsibleScope = createCollapsibleScope();\nvar Accordion = React.forwardRef(\n (props, forwardedRef) => {\n const { type, ...accordionProps } = props;\n const singleProps = accordionProps;\n const multipleProps = accordionProps;\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeAccordion, children: type === \"multiple\" ? /* @__PURE__ */ jsx(AccordionImplMultiple, { ...multipleProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(AccordionImplSingle, { ...singleProps, ref: forwardedRef }) });\n }\n);\nAccordion.displayName = ACCORDION_NAME;\nvar [AccordionValueProvider, useAccordionValueContext] = createAccordionContext(ACCORDION_NAME);\nvar [AccordionCollapsibleProvider, useAccordionCollapsibleContext] = createAccordionContext(\n ACCORDION_NAME,\n { collapsible: false }\n);\nvar AccordionImplSingle = React.forwardRef(\n (props, forwardedRef) => {\n const {\n value: valueProp,\n defaultValue,\n onValueChange = () => {\n },\n collapsible = false,\n ...accordionSingleProps\n } = props;\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? \"\",\n onChange: onValueChange,\n caller: ACCORDION_NAME\n });\n return /* @__PURE__ */ jsx(\n AccordionValueProvider,\n {\n scope: props.__scopeAccordion,\n value: React.useMemo(() => value ? [value] : [], [value]),\n onItemOpen: setValue,\n onItemClose: React.useCallback(() => collapsible && setValue(\"\"), [collapsible, setValue]),\n children: /* @__PURE__ */ jsx(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible, children: /* @__PURE__ */ jsx(AccordionImpl, { ...accordionSingleProps, ref: forwardedRef }) })\n }\n );\n }\n);\nvar AccordionImplMultiple = React.forwardRef((props, forwardedRef) => {\n const {\n value: valueProp,\n defaultValue,\n onValueChange = () => {\n },\n ...accordionMultipleProps\n } = props;\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? [],\n onChange: onValueChange,\n caller: ACCORDION_NAME\n });\n const handleItemOpen = React.useCallback(\n (itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),\n [setValue]\n );\n const handleItemClose = React.useCallback(\n (itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)),\n [setValue]\n );\n return /* @__PURE__ */ jsx(\n AccordionValueProvider,\n {\n scope: props.__scopeAccordion,\n value,\n onItemOpen: handleItemOpen,\n onItemClose: handleItemClose,\n children: /* @__PURE__ */ jsx(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible: true, children: /* @__PURE__ */ jsx(AccordionImpl, { ...accordionMultipleProps, ref: forwardedRef }) })\n }\n );\n});\nvar [AccordionImplProvider, useAccordionContext] = createAccordionContext(ACCORDION_NAME);\nvar AccordionImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAccordion, disabled, dir, orientation = \"vertical\", ...accordionProps } = props;\n const accordionRef = React.useRef(null);\n const composedRefs = useComposedRefs(accordionRef, forwardedRef);\n const getItems = useCollection(__scopeAccordion);\n const direction = useDirection(dir);\n const isDirectionLTR = direction === \"ltr\";\n const handleKeyDown = composeEventHandlers(props.onKeyDown, (event) => {\n if (!ACCORDION_KEYS.includes(event.key)) return;\n const target = event.target;\n const triggerCollection = getItems().filter((item) => !item.ref.current?.disabled);\n const triggerIndex = triggerCollection.findIndex((item) => item.ref.current === target);\n const triggerCount = triggerCollection.length;\n if (triggerIndex === -1) return;\n event.preventDefault();\n let nextIndex = triggerIndex;\n const homeIndex = 0;\n const endIndex = triggerCount - 1;\n const moveNext = () => {\n nextIndex = triggerIndex + 1;\n if (nextIndex > endIndex) {\n nextIndex = homeIndex;\n }\n };\n const movePrev = () => {\n nextIndex = triggerIndex - 1;\n if (nextIndex < homeIndex) {\n nextIndex = endIndex;\n }\n };\n switch (event.key) {\n case \"Home\":\n nextIndex = homeIndex;\n break;\n case \"End\":\n nextIndex = endIndex;\n break;\n case \"ArrowRight\":\n if (orientation === \"horizontal\") {\n if (isDirectionLTR) {\n moveNext();\n } else {\n movePrev();\n }\n }\n break;\n case \"ArrowDown\":\n if (orientation === \"vertical\") {\n moveNext();\n }\n break;\n case \"ArrowLeft\":\n if (orientation === \"horizontal\") {\n if (isDirectionLTR) {\n movePrev();\n } else {\n moveNext();\n }\n }\n break;\n case \"ArrowUp\":\n if (orientation === \"vertical\") {\n movePrev();\n }\n break;\n }\n const clampedIndex = nextIndex % triggerCount;\n triggerCollection[clampedIndex].ref.current?.focus();\n });\n return /* @__PURE__ */ jsx(\n AccordionImplProvider,\n {\n scope: __scopeAccordion,\n disabled,\n direction: dir,\n orientation,\n children: /* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...accordionProps,\n \"data-orientation\": orientation,\n ref: composedRefs,\n onKeyDown: disabled ? void 0 : handleKeyDown\n }\n ) })\n }\n );\n }\n);\nvar ITEM_NAME = \"AccordionItem\";\nvar [AccordionItemProvider, useAccordionItemContext] = createAccordionContext(ITEM_NAME);\nvar AccordionItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAccordion, value, ...accordionItemProps } = props;\n const accordionContext = useAccordionContext(ITEM_NAME, __scopeAccordion);\n const valueContext = useAccordionValueContext(ITEM_NAME, __scopeAccordion);\n const collapsibleScope = useCollapsibleScope(__scopeAccordion);\n const triggerId = useId();\n const open = value && valueContext.value.includes(value) || false;\n const disabled = accordionContext.disabled || props.disabled;\n return /* @__PURE__ */ jsx(\n AccordionItemProvider,\n {\n scope: __scopeAccordion,\n open,\n disabled,\n triggerId,\n children: /* @__PURE__ */ jsx(\n CollapsiblePrimitive.Root,\n {\n \"data-orientation\": accordionContext.orientation,\n \"data-state\": getState(open),\n ...collapsibleScope,\n ...accordionItemProps,\n ref: forwardedRef,\n disabled,\n open,\n onOpenChange: (open2) => {\n if (open2) {\n valueContext.onItemOpen(value);\n } else {\n valueContext.onItemClose(value);\n }\n }\n }\n )\n }\n );\n }\n);\nAccordionItem.displayName = ITEM_NAME;\nvar HEADER_NAME = \"AccordionHeader\";\nvar AccordionHeader = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAccordion, ...headerProps } = props;\n const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);\n const itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion);\n return /* @__PURE__ */ jsx(\n Primitive.h3,\n {\n \"data-orientation\": accordionContext.orientation,\n \"data-state\": getState(itemContext.open),\n \"data-disabled\": itemContext.disabled ? \"\" : void 0,\n ...headerProps,\n ref: forwardedRef\n }\n );\n }\n);\nAccordionHeader.displayName = HEADER_NAME;\nvar TRIGGER_NAME = \"AccordionTrigger\";\nvar AccordionTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAccordion, ...triggerProps } = props;\n const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);\n const itemContext = useAccordionItemContext(TRIGGER_NAME, __scopeAccordion);\n const collapsibleContext = useAccordionCollapsibleContext(TRIGGER_NAME, __scopeAccordion);\n const collapsibleScope = useCollapsibleScope(__scopeAccordion);\n return /* @__PURE__ */ jsx(Collection.ItemSlot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsx(\n CollapsiblePrimitive.Trigger,\n {\n \"aria-disabled\": itemContext.open && !collapsibleContext.collapsible || void 0,\n \"data-orientation\": accordionContext.orientation,\n id: itemContext.triggerId,\n ...collapsibleScope,\n ...triggerProps,\n ref: forwardedRef\n }\n ) });\n }\n);\nAccordionTrigger.displayName = TRIGGER_NAME;\nvar CONTENT_NAME = \"AccordionContent\";\nvar AccordionContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAccordion, ...contentProps } = props;\n const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);\n const itemContext = useAccordionItemContext(CONTENT_NAME, __scopeAccordion);\n const collapsibleScope = useCollapsibleScope(__scopeAccordion);\n return /* @__PURE__ */ jsx(\n CollapsiblePrimitive.Content,\n {\n role: \"region\",\n \"aria-labelledby\": itemContext.triggerId,\n \"data-orientation\": accordionContext.orientation,\n ...collapsibleScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n [\"--radix-accordion-content-height\"]: \"var(--radix-collapsible-content-height)\",\n [\"--radix-accordion-content-width\"]: \"var(--radix-collapsible-content-width)\",\n ...props.style\n }\n }\n );\n }\n);\nAccordionContent.displayName = CONTENT_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Accordion;\nvar Item = AccordionItem;\nvar Header = AccordionHeader;\nvar Trigger2 = AccordionTrigger;\nvar Content2 = AccordionContent;\nexport {\n Accordion,\n AccordionContent,\n AccordionHeader,\n AccordionItem,\n AccordionTrigger,\n Content2 as Content,\n Header,\n Item,\n Root2 as Root,\n Trigger2 as Trigger,\n createAccordionScope\n};\n//# sourceMappingURL=index.mjs.map\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","import * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport { clsx } from 'clsx';\nimport type { ComponentPropsWithoutRef } from 'react';\n\nimport { useAccordionContext } from '@/components/accordion';\n\nexport type AccordionItemProps = ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>;\n\nexport function AccordionItem({ children, className, ...props }: AccordionItemProps) {\n const { colorScheme } = useAccordionContext();\n\n return (\n <AccordionPrimitive.Item\n className={clsx(\n 'focus:outline-2 has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-[var(--accordion-focus,hsl(var(--primary)))] has-[:focus-visible]:ring-offset-4',\n {\n light: 'ring-offset-[var(--acordion-light-offset,hsl(var(--background)))]',\n dark: 'ring-offset-[var(--acordion-dark-offset,hsl(var(--foreground)))]',\n }[colorScheme],\n className,\n )}\n data-slot=\"accordion-item\"\n {...props}\n >\n {children}\n </AccordionPrimitive.Item>\n );\n}\n","import * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport type { ComponentProps } from 'react';\n\nexport type AccordionRootProps = ComponentProps<typeof AccordionPrimitive.Root>;\n\nexport function AccordionRoot({ ...props }: AccordionRootProps) {\n return <AccordionPrimitive.Root data-slot=\"accordion-root\" {...props} />;\n}\n","import * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport { clsx } from 'clsx';\nimport { useEffect, useState } from 'react';\nimport type { ComponentProps } from 'react';\n\nimport { useAccordionContext } from '@/components/accordion';\n\nexport type AccordionContentProps = ComponentProps<typeof AccordionPrimitive.Content>;\n\nexport function AccordionContent({ children, ...props }: AccordionContentProps) {\n const { colorScheme } = useAccordionContext();\n\n const [isMounted, setIsMounted] = useState(false);\n\n useEffect(() => {\n setIsMounted(true);\n }, []);\n\n return (\n <AccordionPrimitive.Content\n className={clsx(\n 'overflow-hidden',\n // We need to delay the animation until the component is mounted to avoid the animation from being triggered when the component is first rendered.\n isMounted && 'data-[state=closed]:animate-collapse data-[state=open]:animate-expand',\n )}\n {...props}\n >\n <div\n className={clsx(\n 'py-3 text-base font-[var(--accordion-content-font-family,var(--font-family-body))] font-light leading-normal',\n {\n light: 'text-[var(--accordion-light-content-text,hsl(var(--foreground)))]',\n dark: 'text-[var(--accordion-dark-content-text,hsl(var(--background)))]',\n }[colorScheme],\n )}\n >\n {children}\n </div>\n </AccordionPrimitive.Content>\n );\n}\n","import * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport { clsx } from 'clsx';\nimport type { ComponentProps } from 'react';\n\nimport { useAccordionContext } from '@/components/accordion';\n\nexport type AccordionTriggerProps = ComponentProps<typeof AccordionPrimitive.Trigger>;\n\nexport function AccordionTrigger({ children, ...props }: AccordionTriggerProps) {\n const { colorScheme } = useAccordionContext();\n\n return (\n <AccordionPrimitive.Header>\n <AccordionPrimitive.Trigger\n className=\"group flex w-full cursor-pointer items-start gap-8 border-none py-3 text-start focus:outline-none @md:py-4\"\n data-slot=\"accordion-trigger\"\n {...props}\n >\n <div\n className={clsx(\n 'flex-1 select-none text-sm font-[var(--accordion-title-font-family,var(--font-family-mono))] font-normal uppercase transition-colors duration-300 ease-out',\n {\n light:\n 'text-[var(--accordion-light-title-text,hsl(var(--contrast-400)))] group-hover:text-[var(--accordion-light-title-text-hover,hsl(var(--foreground)))]',\n dark: 'text-[var(--accordion-dark-title-text,hsl(var(--contrast-200)))] group-hover:text-[var(--accordion-dark-title-text-hover,hsl(var(--background)))]',\n }[colorScheme],\n )}\n >\n {children}\n </div>\n <svg\n className={clsx(\n 'mt-1 shrink-0 [&>line]:origin-center [&>line]:transition [&>line]:duration-300 [&>line]:ease-out',\n {\n light:\n 'stroke-[var(--accordion-light-title-icon,hsl(var(--contrast-500)))] group-hover:stroke-[var(--accordion-light-title-icon-hover,hsl(var(--foreground)))]',\n dark: 'stroke-[var(--accordion-dark-title-icon,hsl(var(--contrast-200)))] group-hover:stroke-[var(--accordion-dark-title-icon-hover,hsl(var(--background)))]',\n }[colorScheme],\n )}\n data-slot=\"accordion-chevron\"\n viewBox=\"0 0 10 10\"\n width={16}\n >\n {/* Left Line of Chevron */}\n <line\n className=\"group-data-[state=open]:-translate-y-[3px] group-data-[state=open]:-rotate-90\"\n strokeLinecap=\"round\"\n x1={2}\n x2={5}\n y1={2}\n y2={5}\n />\n {/* Right Line of Chevron */}\n <line\n className=\"group-data-[state=open]:-translate-y-[3px] group-data-[state=open]:rotate-90\"\n strokeLinecap=\"round\"\n x1={8}\n x2={5}\n y1={2}\n y2={5}\n />\n </svg>\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n );\n}\n","'use client';\n\nimport { createContext, useContext } from 'react';\nimport type { ReactNode } from 'react';\n\ninterface AccordionContext {\n colorScheme: 'light' | 'dark';\n}\n\nexport const AccordionContext = createContext<AccordionContext | undefined>(undefined);\n\nexport interface AccordionProviderProps {\n children: ReactNode;\n colorScheme?: 'light' | 'dark';\n}\n\nexport function AccordionProvider({ children, colorScheme = 'light' }: AccordionProviderProps) {\n return <AccordionContext value={{ colorScheme }}>{children}</AccordionContext>;\n}\n\nexport function useAccordionContext() {\n const context = useContext(AccordionContext);\n\n if (context === undefined) {\n throw new Error('useAccordionContext must be used within an AccordionProvider');\n }\n\n return context;\n}\n"],"names":["Accordion","colorScheme","items","props","jsx","AccordionPrimitive.Provider","AccordionPrimitive.Root","item","index","jsxs","AccordionPrimitive.Item","AccordionPrimitive.Trigger","AccordionPrimitive.Content","createContextScope","scopeName","createContextScopeDeps","defaultContexts","createContext3","rootComponentName","defaultContext","BaseContext","React","Provider","scope","children","context","Context","value","useContext2","consumerName","createScope","scopeContexts","contexts","composeContextScopes","scopes","baseScope","scopeHooks","createScope2","overrideScopes","nextScopes","nextScopes2","useScope","currentScope","setRef","ref","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","useComposedRefs","createSlot","ownerName","SlotClone","createSlotClone","Slot2","forwardedRef","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","childrenRef","getElementRef","props2","mergeProps","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","mayWarn","createCollection","name","PROVIDER_NAME","createCollectionContext","createCollectionScope","CollectionProviderImpl","useCollectionContext","CollectionProvider","itemMap","COLLECTION_SLOT_NAME","CollectionSlotImpl","CollectionSlot","composedRefs","ITEM_SLOT_NAME","ITEM_DATA_ATTR","CollectionItemSlotImpl","CollectionItemSlot","itemData","useCollection","collectionNode","orderedNodes","a","b","composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event","useLayoutEffect2","useInsertionEffect","useLayoutEffect","useControllableState","prop","defaultProp","onChange","caller","uncontrolledProp","setUncontrolledProp","onChangeRef","useUncontrolledState","isControlled","isControlledRef","wasControlled","setValue","nextValue","value2","isFunction","prevValueRef","NODES","Primitive","primitive","Slot","Node","asChild","primitiveProps","Comp","useStateMachine","initialState","machine","state","Presence","present","presence","usePresence","React2","setNode","stylesRef","prevPresentRef","prevAnimationNameRef","send","currentAnimationName","getAnimationName","styles","wasPresent","prevAnimationName","timeoutId","ownerWindow","handleAnimationEnd","isCurrentAnimation","currentFillMode","handleAnimationStart","node2","useReactId","count","useId","deterministicId","id","setId","reactId","COLLAPSIBLE_NAME","createCollapsibleContext","createCollapsibleScope","CollapsibleProvider","useCollapsibleContext","Collapsible","__scopeCollapsible","openProp","defaultOpen","disabled","onOpenChange","collapsibleProps","open","setOpen","prevOpen","getState","TRIGGER_NAME","CollapsibleTrigger","triggerProps","CONTENT_NAME","CollapsibleContent","forceMount","contentProps","CollapsibleContentImpl","isPresent","setIsPresent","heightRef","height","widthRef","width","isOpen","isMountAnimationPreventedRef","originalStylesRef","rAF","rect","Root","Trigger","Content","DirectionContext","useDirection","localDir","globalDir","ACCORDION_NAME","ACCORDION_KEYS","Collection","createAccordionContext","useCollapsibleScope","type","accordionProps","singleProps","multipleProps","AccordionImplMultiple","AccordionImplSingle","AccordionValueProvider","useAccordionValueContext","AccordionCollapsibleProvider","useAccordionCollapsibleContext","valueProp","defaultValue","onValueChange","collapsible","accordionSingleProps","AccordionImpl","accordionMultipleProps","handleItemOpen","itemValue","prevValue","handleItemClose","AccordionImplProvider","useAccordionContext","__scopeAccordion","dir","orientation","accordionRef","getItems","isDirectionLTR","handleKeyDown","target","triggerCollection","triggerIndex","triggerCount","nextIndex","homeIndex","endIndex","moveNext","movePrev","clampedIndex","ITEM_NAME","AccordionItemProvider","useAccordionItemContext","AccordionItem","accordionItemProps","accordionContext","valueContext","collapsibleScope","triggerId","CollapsiblePrimitive.Root","open2","HEADER_NAME","AccordionHeader","headerProps","itemContext","AccordionTrigger","collapsibleContext","CollapsiblePrimitive.Trigger","AccordionContent","CollapsiblePrimitive.Content","Root2","Item","Header","Trigger2","Content2","r","f","n","o","clsx","className","AccordionRoot","isMounted","setIsMounted","useState","useEffect","AccordionPrimitive.Header","AccordionContext","createContext","AccordionProvider","useContext"],"mappings":"ybAuCO,SAASA,GAAU,CAAE,YAAAC,EAAc,QAAS,MAAAC,EAAO,GAAGC,GAAyB,CACpF,OACEC,EAAAA,IAACC,GAAA,CAA4B,YAAAJ,EAC3B,SAAAG,EAAAA,IAACE,GAAA,CAAyB,GAAGH,EAC1B,WAAM,IAAI,CAACI,EAAMC,IAChBC,EAAAA,KAACC,GAAA,CAAoC,MAAOH,EAAK,MAC/C,SAAA,CAAAH,EAAAA,IAACO,GAAA,CAA4B,SAAAJ,EAAK,KAAA,CAAM,EACxCH,EAAAA,IAACQ,GAAA,CAA4B,WAAK,OAAA,CAAQ,CAAA,CAAA,EAFdJ,CAG9B,CACD,CAAA,CACH,EACF,CAEJ,CCjCA,SAASK,EAAmBC,EAAWC,EAAyB,GAAI,CAClE,IAAIC,EAAkB,CAAA,EACtB,SAASC,EAAeC,EAAmBC,EAAgB,CACzD,MAAMC,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3,4,5,6,7,8,9,10,11,12,13,14]}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC"}
|