@rinzai/zen 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/button/Button.stories.d.ts +4 -0
  2. package/dist/button/Button.stories.d.ts.map +1 -0
  3. package/dist/button/index.d.ts +21 -0
  4. package/dist/button/index.d.ts.map +1 -0
  5. package/dist/component/Component.stories.d.ts +5 -0
  6. package/dist/component/Component.stories.d.ts.map +1 -0
  7. package/dist/component/index.d.ts +16 -0
  8. package/dist/component/index.d.ts.map +1 -0
  9. package/dist/container/Container.stories.d.ts +21 -0
  10. package/dist/container/Container.stories.d.ts.map +1 -0
  11. package/dist/container/index.d.ts +4 -0
  12. package/dist/container/index.d.ts.map +1 -0
  13. package/dist/index.d.ts +4 -3
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/toggle/Toggle.Stories.d.ts +4 -0
  16. package/dist/toggle/Toggle.Stories.d.ts.map +1 -0
  17. package/dist/toggle/index.d.ts +6 -0
  18. package/dist/toggle/index.d.ts.map +1 -0
  19. package/dist/utils/cva.d.ts +30 -0
  20. package/dist/utils/cva.d.ts.map +1 -0
  21. package/dist/utils/cx.d.ts +5 -0
  22. package/dist/utils/cx.d.ts.map +1 -0
  23. package/dist/zen.es.js +502 -1376
  24. package/dist/zen.umd.js +16 -38
  25. package/package.json +73 -76
  26. package/dist/Container/Container.d.ts +0 -5
  27. package/dist/Container/Container.d.ts.map +0 -1
  28. package/dist/Container/index.d.ts +0 -2
  29. package/dist/Container/index.d.ts.map +0 -1
  30. package/dist/HTML/HTML.d.ts +0 -4
  31. package/dist/HTML/HTML.d.ts.map +0 -1
  32. package/dist/HTML/HTML.types.d.ts +0 -15
  33. package/dist/HTML/HTML.types.d.ts.map +0 -1
  34. package/dist/HTML/index.d.ts +0 -2
  35. package/dist/HTML/index.d.ts.map +0 -1
  36. package/dist/Text/Text.d.ts +0 -5
  37. package/dist/Text/Text.d.ts.map +0 -1
  38. package/dist/Text/Text.types.d.ts +0 -20
  39. package/dist/Text/Text.types.d.ts.map +0 -1
  40. package/dist/Text/index.d.ts +0 -2
  41. package/dist/Text/index.d.ts.map +0 -1
  42. package/dist/utils/Commons.d.ts +0 -16
  43. package/dist/utils/Commons.d.ts.map +0 -1
@@ -0,0 +1,4 @@
1
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, import("./index").ButtonProps>;
2
+ export default _default;
3
+ export declare const Primary: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("./index").ButtonProps>;
4
+ //# sourceMappingURL=Button.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../packages/button/Button.stories.tsx"],"names":[],"mappings":";AAIA,wBAEwB;AAGxB,eAAO,MAAM,OAAO,8HAAoB,CAAA"}
@@ -0,0 +1,21 @@
1
+ import { BaseProps } from '../component';
2
+ import { VariantProps } from '../utils/cva';
3
+ declare const Button: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
4
+ declare const ButtonStyles: (props?: ({
5
+ variant?: "link" | "muted" | "primary" | "secondary" | "destructive" | null | undefined;
6
+ size?: "small" | "medium" | "large" | null | undefined;
7
+ rounded?: "none" | "sm" | "md" | "lg" | "xl" | "full" | null | undefined;
8
+ } & ({
9
+ class: import("../utils/cx").ClassValue;
10
+ className?: undefined;
11
+ } | {
12
+ class?: undefined;
13
+ className: import("../utils/cx").ClassValue;
14
+ } | {
15
+ class?: undefined;
16
+ className?: undefined;
17
+ })) | undefined) => string;
18
+ export interface ButtonProps extends BaseProps<'button'>, VariantProps<typeof ButtonStyles> {
19
+ }
20
+ export default Button;
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/button/index.tsx"],"names":[],"mappings":"AAAA,OAAkB,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAM,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAEjD,QAAA,MAAM,MAAM,UAAW,WAAW,4CAOjC,CAAA;AACD,QAAA,MAAM,YAAY;;;;;;;;;;;;;0BA4BhB,CAAA;AAEF,MAAM,WAAW,WAAY,SAAQ,SAAS,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC,OAAO,YAAY,CAAC;CAC1F;AAED,eAAe,MAAM,CAAA"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, Omit<import("./index").BaseProps<React.ElementType<any, keyof React.JSX.IntrinsicElements>>, "ref"> & React.RefAttributes<unknown>>;
3
+ export default _default;
4
+ export declare const Primary: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, Omit<import("./index").BaseProps<React.ElementType<any, keyof React.JSX.IntrinsicElements>>, "ref"> & React.RefAttributes<unknown>>;
5
+ //# sourceMappingURL=Component.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Component.stories.d.ts","sourceRoot":"","sources":["../../packages/component/Component.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;;AAIzB,wBAG2B;AAK3B,eAAO,MAAM,OAAO,mOAAoB,CAAA"}
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ declare const Component: import("react").ForwardRefExoticComponent<Omit<BaseProps<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>>, "ref"> & import("react").RefAttributes<unknown>>;
3
+ export default Component;
4
+ type TagProp<Tag extends React.ElementType> = {
5
+ tag?: Tag;
6
+ };
7
+ type PropsToOmit<Tag extends React.ElementType, P> = keyof (TagProp<Tag> & P);
8
+ type PolyMorphicProps<Tag extends React.ElementType, Props = object> = React.PropsWithChildren<Props & TagProp<Tag>> & Omit<React.ComponentPropsWithoutRef<Tag>, PropsToOmit<Tag, Props>>;
9
+ type BasePropWithRef<Tag extends React.ElementType, Props = object> = PolyMorphicProps<Tag, Props> & {
10
+ ref?: BaseRef<Tag>;
11
+ };
12
+ export type BaseRef<Tag extends React.ElementType> = React.ComponentPropsWithRef<Tag>['ref'];
13
+ export type BaseProps<Tag extends React.ElementType> = BasePropWithRef<Tag, {
14
+ visible?: boolean;
15
+ }>;
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/component/index.tsx"],"names":[],"mappings":";AAEA,QAAA,MAAM,SAAS,2LAed,CAAA;AACD,eAAe,SAAS,CAAA;AAExB,KAAK,OAAO,CAAC,GAAG,SAAS,KAAK,CAAC,WAAW,IAAI;IAC1C,GAAG,CAAC,EAAE,GAAG,CAAA;CACZ,CAAA;AAED,KAAK,WAAW,CAAC,GAAG,SAAS,KAAK,CAAC,WAAW,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;AAE7E,KAAK,gBAAgB,CAAC,GAAG,SAAS,KAAK,CAAC,WAAW,EAAE,KAAK,GAAG,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,GAChH,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAA;AAEtE,KAAK,eAAe,CAAC,GAAG,SAAS,KAAK,CAAC,WAAW,EAAE,KAAK,GAAG,MAAM,IAAI,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG;IACjG,GAAG,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,OAAO,CAAC,GAAG,SAAS,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAA;AAE5F,MAAM,MAAM,SAAS,CAAC,GAAG,SAAS,KAAK,CAAC,WAAW,IAAI,eAAe,CAAC,GAAG,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAAA"}
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, {
3
+ visible?: boolean | undefined;
4
+ } & {
5
+ tag?: "div" | undefined;
6
+ } & {
7
+ children?: React.ReactNode;
8
+ } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "tag" | "visible"> & {
9
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
10
+ }>;
11
+ export default _default;
12
+ export declare const Primary: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, {
13
+ visible?: boolean | undefined;
14
+ } & {
15
+ tag?: "div" | undefined;
16
+ } & {
17
+ children?: React.ReactNode;
18
+ } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "tag" | "visible"> & {
19
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
20
+ }>;
21
+ //# sourceMappingURL=Container.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Container.stories.d.ts","sourceRoot":"","sources":["../../packages/container/Container.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;;;;;;;;;;AAIzB,wBAG2B;AAK3B,eAAO,MAAM,OAAO;;;;;;;;EAAoB,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { BaseProps } from '../component';
2
+ declare const Container: (props: BaseProps<'div'>) => import("react/jsx-runtime").JSX.Element;
3
+ export default Container;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/container/index.tsx"],"names":[],"mappings":"AAAA,OAAkB,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAA;AAGnD,QAAA,MAAM,SAAS,UAAW,UAAU,KAAK,CAAC,4CAIzC,CAAA;AACD,eAAe,SAAS,CAAA"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- export { default as Container } from './Container';
2
- export { default as HTML } from './HTML';
3
- export { default as Text } from './Text';
1
+ export { default as Button } from './button';
2
+ export { default as Component } from './component';
3
+ export { default as Container } from './container';
4
+ export { default as Toggle } from './toggle';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../packages/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,aAAa,CAAA;AAChD,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,aAAa,CAAA;AAChD,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,UAAU,CAAA"}
@@ -0,0 +1,4 @@
1
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, import("./index").ToggleProps>;
2
+ export default _default;
3
+ export declare const Primary: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("./index").ToggleProps>;
4
+ //# sourceMappingURL=Toggle.Stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toggle.Stories.d.ts","sourceRoot":"","sources":["../../packages/toggle/Toggle.Stories.tsx"],"names":[],"mappings":";AAKA,wBAEwB;AAKxB,eAAO,MAAM,OAAO,8HAAoB,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { BaseProps } from '../component';
2
+ export interface ToggleProps extends Omit<BaseProps<"input">, "onChange"> {
3
+ onChange: (e: boolean) => void;
4
+ }
5
+ export default function Toggle(props: ToggleProps): import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/toggle/index.tsx"],"names":[],"mappings":"AACA,OAAkB,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAGpD,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC;IACrE,QAAQ,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAClC;AAED,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,2CA8BhD"}
@@ -0,0 +1,30 @@
1
+ import { ClassValue } from '../utils/cx';
2
+ type ClassProp = {
3
+ class: ClassValue;
4
+ className?: never;
5
+ } | {
6
+ class?: never;
7
+ className: ClassValue;
8
+ } | {
9
+ class?: never;
10
+ className?: never;
11
+ };
12
+ type OmitUndefined<T> = T extends undefined ? never : T;
13
+ type StringToBoolean<T> = T extends "true" | "false" ? boolean : T;
14
+ export type VariantProps<Component extends (...args: any) => any> = Omit<OmitUndefined<Parameters<Component>[0]>, "class" | "className">;
15
+ type ConfigSchema = Record<string, Record<string, ClassValue>>;
16
+ type ConfigVariants<T extends ConfigSchema> = {
17
+ [Variant in keyof T]?: StringToBoolean<keyof T[Variant]> | null | undefined;
18
+ };
19
+ type ConfigVariantsMulti<T extends ConfigSchema> = {
20
+ [Variant in keyof T]?: StringToBoolean<keyof T[Variant]> | StringToBoolean<keyof T[Variant]>[] | undefined;
21
+ };
22
+ type Config<T> = T extends ConfigSchema ? {
23
+ variants?: T;
24
+ defaultVariants?: ConfigVariants<T>;
25
+ compoundVariants?: (T extends ConfigSchema ? (ConfigVariants<T> | ConfigVariantsMulti<T>) & ClassProp : ClassProp)[];
26
+ } : never;
27
+ type Props<T> = T extends ConfigSchema ? ConfigVariants<T> & ClassProp : ClassProp;
28
+ export declare const cva: <T>(base?: ClassValue, config?: Config<T> | undefined) => (props?: Props<T> | undefined) => string;
29
+ export {};
30
+ //# sourceMappingURL=cva.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cva.d.ts","sourceRoot":"","sources":["../../packages/utils/cva.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAM,MAAM,eAAe,CAAC;AAE/C,KAAK,SAAS,GACR;IACF,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,KAAK,CAAC;CACrB,GACK;IACF,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,SAAS,EAAE,UAAU,CAAC;CACzB,GACK;IACF,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,SAAS,CAAC,EAAE,KAAK,CAAC;CACrB,CAAC;AACF,KAAK,aAAa,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACxD,KAAK,eAAe,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,CAAC,CAAC;AAEnE,MAAM,MAAM,YAAY,CAAC,SAAS,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,IAAI,IAAI,CACpE,aAAa,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,EACvC,OAAO,GAAG,WAAW,CACxB,CAAC;AAQF,KAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AAE/D,KAAK,cAAc,CAAC,CAAC,SAAS,YAAY,IAAI;KACzC,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS;CAC9E,CAAC;AACF,KAAK,mBAAmB,CAAC,CAAC,SAAS,YAAY,IAAI;KAC9C,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,GAAG,SAAS;CAC7G,CAAC;AAEF,KAAK,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,YAAY,GACjC;IACE,QAAQ,CAAC,EAAE,CAAC,CAAC;IACb,eAAe,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IACpC,gBAAgB,CAAC,EAAE,CAAC,CAAC,SAAS,YAAY,GACpC,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,GACxD,SAAS,CAAC,EAAE,CAAC;CACtB,GACC,KAAK,CAAC;AAEZ,KAAK,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,YAAY,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,SAAS,CAAC;AAEnF,eAAO,MAAM,GAAG,aACD,UAAU,6EAoDhB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const cx: (...args: ClassValue[]) => string;
2
+ export type ClassValue = ClassArray | ClassDictionary | string | number | null | boolean | undefined;
3
+ export type ClassDictionary = Record<string, any>;
4
+ export type ClassArray = ClassValue[];
5
+ //# sourceMappingURL=cx.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cx.d.ts","sourceRoot":"","sources":["../../packages/utils/cx.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE,YAAa,UAAU,EAAE,KAAE,MAezC,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO,GAAG,SAAS,CAAC;AACrG,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAClD,MAAM,MAAM,UAAU,GAAG,UAAU,EAAE,CAAC"}