@mijn-ui/react-accordion 0.4.2 → 0.5.0
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/dist/index.d.ts +75 -14
- package/dist/index.js +26 -4
- package/dist/metafile-esm.json +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -9,10 +9,11 @@ import * as RadixAccordion from '@radix-ui/react-accordion';
|
|
|
9
9
|
|
|
10
10
|
declare const accordionStyles: tailwind_variants.TVReturnType<{
|
|
11
11
|
variant: {
|
|
12
|
-
|
|
12
|
+
outline: {
|
|
13
13
|
item: string;
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
plain: {};
|
|
16
|
+
solid: {
|
|
16
17
|
base: string;
|
|
17
18
|
};
|
|
18
19
|
splitted: {
|
|
@@ -26,6 +27,23 @@ declare const accordionStyles: tailwind_variants.TVReturnType<{
|
|
|
26
27
|
content: string;
|
|
27
28
|
};
|
|
28
29
|
};
|
|
30
|
+
size: {
|
|
31
|
+
sm: {
|
|
32
|
+
trigger: string;
|
|
33
|
+
content: string;
|
|
34
|
+
contentWrapper: string;
|
|
35
|
+
};
|
|
36
|
+
md: {
|
|
37
|
+
trigger: string;
|
|
38
|
+
content: string;
|
|
39
|
+
contentWrapper: string;
|
|
40
|
+
};
|
|
41
|
+
lg: {
|
|
42
|
+
trigger: string;
|
|
43
|
+
content: string;
|
|
44
|
+
contentWrapper: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
29
47
|
}, {
|
|
30
48
|
base: string;
|
|
31
49
|
item: string;
|
|
@@ -36,10 +54,11 @@ declare const accordionStyles: tailwind_variants.TVReturnType<{
|
|
|
36
54
|
content: string;
|
|
37
55
|
}, undefined, {
|
|
38
56
|
variant: {
|
|
39
|
-
|
|
57
|
+
outline: {
|
|
40
58
|
item: string;
|
|
41
59
|
};
|
|
42
|
-
|
|
60
|
+
plain: {};
|
|
61
|
+
solid: {
|
|
43
62
|
base: string;
|
|
44
63
|
};
|
|
45
64
|
splitted: {
|
|
@@ -53,6 +72,23 @@ declare const accordionStyles: tailwind_variants.TVReturnType<{
|
|
|
53
72
|
content: string;
|
|
54
73
|
};
|
|
55
74
|
};
|
|
75
|
+
size: {
|
|
76
|
+
sm: {
|
|
77
|
+
trigger: string;
|
|
78
|
+
content: string;
|
|
79
|
+
contentWrapper: string;
|
|
80
|
+
};
|
|
81
|
+
md: {
|
|
82
|
+
trigger: string;
|
|
83
|
+
content: string;
|
|
84
|
+
contentWrapper: string;
|
|
85
|
+
};
|
|
86
|
+
lg: {
|
|
87
|
+
trigger: string;
|
|
88
|
+
content: string;
|
|
89
|
+
contentWrapper: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
56
92
|
}, {
|
|
57
93
|
base: string;
|
|
58
94
|
item: string;
|
|
@@ -63,10 +99,11 @@ declare const accordionStyles: tailwind_variants.TVReturnType<{
|
|
|
63
99
|
content: string;
|
|
64
100
|
}, tailwind_variants.TVReturnType<{
|
|
65
101
|
variant: {
|
|
66
|
-
|
|
102
|
+
outline: {
|
|
67
103
|
item: string;
|
|
68
104
|
};
|
|
69
|
-
|
|
105
|
+
plain: {};
|
|
106
|
+
solid: {
|
|
70
107
|
base: string;
|
|
71
108
|
};
|
|
72
109
|
splitted: {
|
|
@@ -80,6 +117,23 @@ declare const accordionStyles: tailwind_variants.TVReturnType<{
|
|
|
80
117
|
content: string;
|
|
81
118
|
};
|
|
82
119
|
};
|
|
120
|
+
size: {
|
|
121
|
+
sm: {
|
|
122
|
+
trigger: string;
|
|
123
|
+
content: string;
|
|
124
|
+
contentWrapper: string;
|
|
125
|
+
};
|
|
126
|
+
md: {
|
|
127
|
+
trigger: string;
|
|
128
|
+
content: string;
|
|
129
|
+
contentWrapper: string;
|
|
130
|
+
};
|
|
131
|
+
lg: {
|
|
132
|
+
trigger: string;
|
|
133
|
+
content: string;
|
|
134
|
+
contentWrapper: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
83
137
|
}, {
|
|
84
138
|
base: string;
|
|
85
139
|
item: string;
|
|
@@ -97,29 +151,36 @@ declare const useAccordionStyles: (unstyledOverride?: boolean) => {
|
|
|
97
151
|
classNames: _mijn_ui_react_core.SlotsToClasses<"base" | "item" | "triggerWrapper" | "trigger" | "icon" | "contentWrapper" | "content"> | undefined;
|
|
98
152
|
isUnstyled: boolean | undefined;
|
|
99
153
|
base: (slotProps?: ({
|
|
100
|
-
variant?: "
|
|
154
|
+
variant?: "outline" | "plain" | "solid" | "splitted" | "subtle" | undefined;
|
|
155
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
101
156
|
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
|
|
102
157
|
item: (slotProps?: ({
|
|
103
|
-
variant?: "
|
|
158
|
+
variant?: "outline" | "plain" | "solid" | "splitted" | "subtle" | undefined;
|
|
159
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
104
160
|
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
|
|
105
161
|
triggerWrapper: (slotProps?: ({
|
|
106
|
-
variant?: "
|
|
162
|
+
variant?: "outline" | "plain" | "solid" | "splitted" | "subtle" | undefined;
|
|
163
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
107
164
|
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
|
|
108
165
|
trigger: (slotProps?: ({
|
|
109
|
-
variant?: "
|
|
166
|
+
variant?: "outline" | "plain" | "solid" | "splitted" | "subtle" | undefined;
|
|
167
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
110
168
|
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
|
|
111
169
|
icon: (slotProps?: ({
|
|
112
|
-
variant?: "
|
|
170
|
+
variant?: "outline" | "plain" | "solid" | "splitted" | "subtle" | undefined;
|
|
171
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
113
172
|
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
|
|
114
173
|
contentWrapper: (slotProps?: ({
|
|
115
|
-
variant?: "
|
|
174
|
+
variant?: "outline" | "plain" | "solid" | "splitted" | "subtle" | undefined;
|
|
175
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
116
176
|
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
|
|
117
177
|
content: (slotProps?: ({
|
|
118
|
-
variant?: "
|
|
178
|
+
variant?: "outline" | "plain" | "solid" | "splitted" | "subtle" | undefined;
|
|
179
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
119
180
|
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
|
|
120
181
|
};
|
|
121
182
|
type AccordionProps = React.ComponentPropsWithRef<typeof RadixAccordion.Root> & AccordionVariantProps & AccordionBaseProps;
|
|
122
|
-
declare const Accordion: ({ className, classNames, unstyled, variant, ...props }: AccordionProps) => react_jsx_runtime.JSX.Element;
|
|
183
|
+
declare const Accordion: ({ className, classNames, unstyled, variant, size, ...props }: AccordionProps) => react_jsx_runtime.JSX.Element;
|
|
123
184
|
type AccordionItemProps = React.ComponentPropsWithRef<typeof RadixAccordion.Item> & {
|
|
124
185
|
unstyled?: boolean;
|
|
125
186
|
};
|
package/dist/index.js
CHANGED
|
@@ -23,12 +23,15 @@ var accordionStyles = tv({
|
|
|
23
23
|
},
|
|
24
24
|
variants: {
|
|
25
25
|
variant: {
|
|
26
|
-
|
|
26
|
+
// Figma-aligned intents
|
|
27
|
+
outline: {
|
|
27
28
|
item: "border-b"
|
|
28
29
|
},
|
|
29
|
-
|
|
30
|
+
plain: {},
|
|
31
|
+
solid: {
|
|
30
32
|
base: "py-2 px-4 bg-bg-secondary rounded-lg border divide-y divide-y-outline-default"
|
|
31
33
|
},
|
|
34
|
+
// Additional variants
|
|
32
35
|
splitted: {
|
|
33
36
|
base: "space-y-1.5",
|
|
34
37
|
item: "bg-bg-secondary px-4 rounded-lg border border-outline-default"
|
|
@@ -39,10 +42,28 @@ var accordionStyles = tv({
|
|
|
39
42
|
trigger: "bg-bg-secondary px-4",
|
|
40
43
|
content: "p-4 bg-bg-tertiary"
|
|
41
44
|
}
|
|
45
|
+
},
|
|
46
|
+
size: {
|
|
47
|
+
sm: {
|
|
48
|
+
trigger: "py-2 text-xs",
|
|
49
|
+
content: "text-xs",
|
|
50
|
+
contentWrapper: "text-xs"
|
|
51
|
+
},
|
|
52
|
+
md: {
|
|
53
|
+
trigger: "py-4 text-sm",
|
|
54
|
+
content: "text-sm",
|
|
55
|
+
contentWrapper: "text-sm"
|
|
56
|
+
},
|
|
57
|
+
lg: {
|
|
58
|
+
trigger: "py-5 text-base",
|
|
59
|
+
content: "text-base",
|
|
60
|
+
contentWrapper: "text-base"
|
|
61
|
+
}
|
|
42
62
|
}
|
|
43
63
|
},
|
|
44
64
|
defaultVariants: {
|
|
45
|
-
variant: "
|
|
65
|
+
variant: "outline",
|
|
66
|
+
size: "md"
|
|
46
67
|
}
|
|
47
68
|
});
|
|
48
69
|
var [AccordionProvider, useAccordionContext] = createContext({
|
|
@@ -60,9 +81,10 @@ var Accordion = ({
|
|
|
60
81
|
classNames,
|
|
61
82
|
unstyled = false,
|
|
62
83
|
variant,
|
|
84
|
+
size,
|
|
63
85
|
...props
|
|
64
86
|
}) => {
|
|
65
|
-
const styles = accordionStyles({ variant });
|
|
87
|
+
const styles = accordionStyles({ variant, size });
|
|
66
88
|
const { base } = createTVUnstyledSlots({ base: styles.base }, unstyled);
|
|
67
89
|
return /* @__PURE__ */ jsx(AccordionProvider, { value: { classNames, unstyled, styles }, children: /* @__PURE__ */ jsx(
|
|
68
90
|
RadixAccordion.Root,
|
package/dist/metafile-esm.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/accordion.tsx":{"bytes":
|
|
1
|
+
{"inputs":{"src/accordion.tsx":{"bytes":7151,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@mijn-ui/react-core","kind":"import-statement","external":true},{"path":"@mijn-ui/shared-icons","kind":"import-statement","external":true},{"path":"@radix-ui/react-accordion","kind":"import-statement","external":true},{"path":"tailwind-variants","kind":"import-statement","external":true},{"path":"react/jsx-runtime","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":28,"imports":[{"path":"src/accordion.tsx","kind":"import-statement","original":"./accordion"}],"format":"esm"}},"outputs":{"dist/index.js":{"imports":[{"path":"@mijn-ui/react-core","kind":"import-statement","external":true},{"path":"@mijn-ui/shared-icons","kind":"import-statement","external":true},{"path":"@radix-ui/react-accordion","kind":"import-statement","external":true},{"path":"tailwind-variants","kind":"import-statement","external":true},{"path":"react/jsx-runtime","kind":"import-statement","external":true}],"exports":["Accordion","AccordionContent","AccordionItem","AccordionTrigger","accordionStyles","useAccordionStyles"],"entryPoint":"src/index.ts","inputs":{"src/accordion.tsx":{"bytesInOutput":4707},"src/index.ts":{"bytesInOutput":0}},"bytes":4865}}}
|