@okam/stack-ui 1.19.1 → 1.20.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/components/Accordion/components/AccordionItem.d.ts +3 -0
- package/components/Accordion/components/AriaAccordionItem.d.ts +3 -0
- package/components/Accordion/hooks/useAccordionState.d.ts +10 -0
- package/components/Accordion/interface.d.ts +20 -8
- package/index.d.ts +3 -0
- package/index.js +14 -9
- package/index.mjs +3760 -2660
- package/package.json +1 -1
- package/providers/Accordion/index.d.ts +4 -0
- package/providers/Accordion/interface.d.ts +12 -0
- package/providers/CheckboxGroup/interface.d.ts +2 -1
- package/theme/Accordion/index.d.ts +13 -32
- package/transitions/AccordionTransition.d.ts +4 -0
- package/transitions/RenderWithOpacity.d.ts +3 -6
- package/types/components.d.ts +4 -0
package/package.json
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { TAccordionContext, TAccordionProviderProps } from './interface';
|
|
3
|
+
export declare const useAccordionCtx: () => TAccordionContext, AccordionProvider: import("react").Provider<TAccordionContext | undefined>;
|
|
4
|
+
export declare function AccordionContextProvider(props: TAccordionProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { TreeState } from 'react-stately';
|
|
3
|
+
import type { TAccordionItemProps, TAccordionProps } from '../../components/Accordion/interface';
|
|
4
|
+
type TAccordion = NonNullable<Pick<TAccordionProps, 'TransitionAnimation'>>;
|
|
5
|
+
export interface TAccordionProviderProps extends TAccordion {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
state: TreeState<TAccordionItemProps>;
|
|
8
|
+
}
|
|
9
|
+
export type TAccordionContext = TAccordion & {
|
|
10
|
+
state: TreeState<TAccordionItemProps>;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { CheckboxGroupProps } from 'react-stately';
|
|
2
|
+
import type { CheckboxGroupProps, CheckboxGroupState } from 'react-stately';
|
|
3
3
|
export interface TCheckboxGroupContext extends CheckboxGroupProps {
|
|
4
4
|
children: React.ReactNode;
|
|
5
|
+
state: CheckboxGroupState;
|
|
5
6
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TToken } from '../../providers/Theme/interface';
|
|
1
2
|
export declare const accordionContainer: import("tailwind-variants").TVReturnType<{
|
|
2
3
|
textAlign: {
|
|
3
4
|
center: "text-center";
|
|
@@ -164,64 +165,36 @@ export declare const accordionIcon: import("tailwind-variants").TVReturnType<{
|
|
|
164
165
|
};
|
|
165
166
|
}>, unknown, unknown, undefined>>;
|
|
166
167
|
export declare const accordionRegion: import("tailwind-variants").TVReturnType<{
|
|
167
|
-
isOpen: {
|
|
168
|
-
true: "pb-8 pt-3 grid-rows-[1fr]";
|
|
169
|
-
false: "";
|
|
170
|
-
};
|
|
171
168
|
textAlign: {
|
|
172
169
|
center: "grid-cols-[3rem_1fr_3rem] px-6 text-center";
|
|
173
170
|
left: "grid-cols-[1fr_3rem] text-left";
|
|
174
171
|
};
|
|
175
|
-
}, undefined, "font-body text-inherit
|
|
176
|
-
isOpen: {
|
|
177
|
-
true: "pb-8 pt-3 grid-rows-[1fr]";
|
|
178
|
-
false: "";
|
|
179
|
-
};
|
|
172
|
+
}, undefined, "\n font-body \n text-inherit\n h-auto\n grid\n ", import("tailwind-variants/dist/config").TVConfig<{
|
|
180
173
|
textAlign: {
|
|
181
174
|
center: "grid-cols-[3rem_1fr_3rem] px-6 text-center";
|
|
182
175
|
left: "grid-cols-[1fr_3rem] text-left";
|
|
183
176
|
};
|
|
184
177
|
}, {
|
|
185
|
-
isOpen: {
|
|
186
|
-
true: "pb-8 pt-3 grid-rows-[1fr]";
|
|
187
|
-
false: "";
|
|
188
|
-
};
|
|
189
178
|
textAlign: {
|
|
190
179
|
center: "grid-cols-[3rem_1fr_3rem] px-6 text-center";
|
|
191
180
|
left: "grid-cols-[1fr_3rem] text-left";
|
|
192
181
|
};
|
|
193
182
|
}>, {
|
|
194
|
-
isOpen: {
|
|
195
|
-
true: "pb-8 pt-3 grid-rows-[1fr]";
|
|
196
|
-
false: "";
|
|
197
|
-
};
|
|
198
183
|
textAlign: {
|
|
199
184
|
center: "grid-cols-[3rem_1fr_3rem] px-6 text-center";
|
|
200
185
|
left: "grid-cols-[1fr_3rem] text-left";
|
|
201
186
|
};
|
|
202
187
|
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
203
|
-
isOpen: {
|
|
204
|
-
true: "pb-8 pt-3 grid-rows-[1fr]";
|
|
205
|
-
false: "";
|
|
206
|
-
};
|
|
207
188
|
textAlign: {
|
|
208
189
|
center: "grid-cols-[3rem_1fr_3rem] px-6 text-center";
|
|
209
190
|
left: "grid-cols-[1fr_3rem] text-left";
|
|
210
191
|
};
|
|
211
|
-
}, undefined, "font-body text-inherit
|
|
212
|
-
isOpen: {
|
|
213
|
-
true: "pb-8 pt-3 grid-rows-[1fr]";
|
|
214
|
-
false: "";
|
|
215
|
-
};
|
|
192
|
+
}, undefined, "\n font-body \n text-inherit\n h-auto\n grid\n ", import("tailwind-variants/dist/config").TVConfig<{
|
|
216
193
|
textAlign: {
|
|
217
194
|
center: "grid-cols-[3rem_1fr_3rem] px-6 text-center";
|
|
218
195
|
left: "grid-cols-[1fr_3rem] text-left";
|
|
219
196
|
};
|
|
220
197
|
}, {
|
|
221
|
-
isOpen: {
|
|
222
|
-
true: "pb-8 pt-3 grid-rows-[1fr]";
|
|
223
|
-
false: "";
|
|
224
|
-
};
|
|
225
198
|
textAlign: {
|
|
226
199
|
center: "grid-cols-[3rem_1fr_3rem] px-6 text-center";
|
|
227
200
|
left: "grid-cols-[1fr_3rem] text-left";
|
|
@@ -232,7 +205,7 @@ export declare const accordionContent: import("tailwind-variants").TVReturnType<
|
|
|
232
205
|
center: "col-start-2";
|
|
233
206
|
left: "";
|
|
234
207
|
};
|
|
235
|
-
}, undefined, "overflow-hidden", import("tailwind-variants/dist/config").TVConfig<{
|
|
208
|
+
}, undefined, "overflow-hidden flex flex-col gap-2 items-start", import("tailwind-variants/dist/config").TVConfig<{
|
|
236
209
|
textAlign: {
|
|
237
210
|
center: "col-start-2";
|
|
238
211
|
left: "";
|
|
@@ -252,7 +225,7 @@ export declare const accordionContent: import("tailwind-variants").TVReturnType<
|
|
|
252
225
|
center: "col-start-2";
|
|
253
226
|
left: "";
|
|
254
227
|
};
|
|
255
|
-
}, undefined, "overflow-hidden", import("tailwind-variants/dist/config").TVConfig<{
|
|
228
|
+
}, undefined, "overflow-hidden flex flex-col gap-2 items-start", import("tailwind-variants/dist/config").TVConfig<{
|
|
256
229
|
textAlign: {
|
|
257
230
|
center: "col-start-2";
|
|
258
231
|
left: "";
|
|
@@ -263,3 +236,11 @@ export declare const accordionContent: import("tailwind-variants").TVReturnType<
|
|
|
263
236
|
left: "";
|
|
264
237
|
};
|
|
265
238
|
}>, unknown, unknown, undefined>>;
|
|
239
|
+
export declare const accordionTheme: {
|
|
240
|
+
container: (props: TToken) => string;
|
|
241
|
+
button: (props: TToken) => string;
|
|
242
|
+
title: (props: TToken) => string;
|
|
243
|
+
icon: (props: TToken) => string;
|
|
244
|
+
region: (props: TToken) => string;
|
|
245
|
+
content: (props: TToken) => string;
|
|
246
|
+
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
}
|
|
6
|
-
declare const RenderWithOpacity: ({ isVisible, children }: TProps) => JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { TTransition } from '../types/components';
|
|
3
|
+
declare const RenderWithOpacity: ({ isVisible, children, themeName, tokens, customTheme }: TTransition) => JSX.Element;
|
|
7
4
|
export default RenderWithOpacity;
|
package/types/components.d.ts
CHANGED
|
@@ -19,5 +19,9 @@ export type TReactHookForm = {
|
|
|
19
19
|
pattern?: string | undefined;
|
|
20
20
|
validation?: object;
|
|
21
21
|
};
|
|
22
|
+
export interface TTransition extends TDefaultComponent {
|
|
23
|
+
isVisible: boolean;
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
}
|
|
22
26
|
export type Nullable<T> = T | undefined | null;
|
|
23
27
|
export type Maybe<T> = T | null;
|