@wishket/design-system 0.4.0 → 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.
@@ -0,0 +1,3 @@
1
+ import { TextInputProps } from './TextInput.types';
2
+ declare const TextInput: ({ type, name, value, variant, placeholder, lable, startIcon, endIcon, maxLength, supportMessage, measure, isError, errorMessage, disabled, testId, onChange, }: TextInputProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default TextInput;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import TextInput from './TextInput';
3
+ import { TextInputProps } from './TextInput.types';
4
+ declare const meta: Meta<typeof TextInput>;
5
+ export default meta;
6
+ type Story = StoryObj<TextInputProps>;
7
+ export declare const Default: Story;
@@ -0,0 +1,32 @@
1
+ import { ComponentPropsWithRef } from 'react';
2
+ type variant = 'default' | 'lable' | 'lable_fixed';
3
+ export interface TextInputProps extends ComponentPropsWithRef<'input'> {
4
+ variant?: variant;
5
+ lable?: string;
6
+ isError?: boolean;
7
+ startIcon?: string;
8
+ endIcon?: string;
9
+ supportMessage?: string;
10
+ measure?: string;
11
+ errorMessage?: string;
12
+ testId?: string;
13
+ }
14
+ export interface InputContainerProps extends ComponentPropsWithRef<'input'> {
15
+ variant: variant;
16
+ lable?: string;
17
+ isFocused?: boolean;
18
+ isError?: boolean;
19
+ }
20
+ export interface LabelContainerProps extends InputContainerProps {
21
+ startIcon?: string;
22
+ endIcon?: string;
23
+ measure?: string;
24
+ }
25
+ export interface SupportContainerProps {
26
+ isError?: boolean;
27
+ errorMessage?: string;
28
+ supportMessage?: string;
29
+ currentLength?: number;
30
+ maxLength?: number;
31
+ }
32
+ export {};
@@ -0,0 +1,2 @@
1
+ import TextInput from './TextInput';
2
+ export default TextInput;
@@ -0,0 +1,6 @@
1
+ interface IconProps {
2
+ name: string;
3
+ className?: string;
4
+ }
5
+ export declare const Icon: ({ name, className }: IconProps) => import("react/jsx-runtime").JSX.Element | undefined;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ import { InputContainerProps } from '../TextInput.types';
2
+ declare const InputContainer: ({ type, name, value, lable, maxLength, placeholder, variant, disabled, isFocused, isError, onChange, onFocus, onBlur, }: InputContainerProps) => import("react/jsx-runtime").JSX.Element | undefined;
3
+ export default InputContainer;
@@ -0,0 +1,3 @@
1
+ import { LabelContainerProps } from '../TextInput.types';
2
+ declare const LabelContainer: ({ type, name, value, variant, lable, placeholder, startIcon, endIcon, maxLength, measure, isFocused, isError, onBlur, onFocus, disabled, onChange, }: LabelContainerProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default LabelContainer;
@@ -0,0 +1,3 @@
1
+ import { InputContainerProps } from '../TextInput.types';
2
+ declare const PasswordContainer: ({ type, name, value, lable, maxLength, placeholder, variant, disabled, isFocused, isError, onChange, onFocus, onBlur, }: InputContainerProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default PasswordContainer;
@@ -0,0 +1,3 @@
1
+ import { SupportContainerProps } from '../TextInput.types';
2
+ declare const SupportContainer: ({ isError, errorMessage, supportMessage, currentLength, maxLength, }: SupportContainerProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default SupportContainer;
@@ -0,0 +1,3 @@
1
+ export { default as LabelContainer } from './LabelContainer';
2
+ export { default as PasswordContainer } from './PasswordContainer';
3
+ export { default as SupportContainer } from './SupportContainer';
@@ -6,3 +6,4 @@ export { default as ProductIcon } from './ProductIcon';
6
6
  export { default as Radio } from './Radio';
7
7
  export { default as Button } from './Button';
8
8
  export { default as LoadingIndicator } from './LoadingIndicator';
9
+ export { default as TextInput } from './TextInput';
@@ -0,0 +1,10 @@
1
+ import { ModalRootProps } from './Modal.types';
2
+ export interface ModalProps extends ModalRootProps {
3
+ isPreventClose?: boolean;
4
+ }
5
+ declare const Modal: {
6
+ Root: ({ children, hasBackground, isPreventClose, size, }: ModalRootProps) => import("react/jsx-runtime").JSX.Element;
7
+ Trigger: ({ children, testId }: import("./Modal.types").ModalTriggerProps) => import("react/jsx-runtime").JSX.Element;
8
+ Content: ({ children, testId, role, className, }: import("./Modal.types").ModalContentProps) => import("react/jsx-runtime").JSX.Element;
9
+ };
10
+ export default Modal;
@@ -0,0 +1,4 @@
1
+ import { ModalContentProps, ModalRootProps, ModalTriggerProps } from './Modal.types';
2
+ export declare const Root: ({ children, hasBackground, isPreventClose, size, }: ModalRootProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const Trigger: ({ children, testId }: ModalTriggerProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const Content: ({ children, testId, role, className, }: ModalContentProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { ModalRootProps } from './Modal.types';
3
+ import Modal from '.';
4
+ declare const meta: {
5
+ title: string;
6
+ component: ({ children, ...rest }: ModalRootProps) => import("react/jsx-runtime").JSX.Element;
7
+ argTypes: {
8
+ hasBackground: {
9
+ control: string;
10
+ };
11
+ isPreventClose: {
12
+ control: string;
13
+ };
14
+ size: {
15
+ options: string[];
16
+ control: string;
17
+ };
18
+ };
19
+ };
20
+ export default meta;
21
+ type Story = StoryObj<typeof Modal.Root>;
22
+ export declare const Default: Story;
@@ -0,0 +1,23 @@
1
+ import { ReactNode } from 'react';
2
+ export interface ModalRootProps {
3
+ children: ReactNode;
4
+ hasBackground?: boolean;
5
+ isPreventClose?: boolean;
6
+ size?: 'sm' | 'md' | 'lg';
7
+ }
8
+ export interface ModalTriggerProps {
9
+ setOpen?: () => void;
10
+ children?: ReactNode;
11
+ testId?: string;
12
+ }
13
+ export interface ModalBackgroundProps {
14
+ isOpen?: boolean;
15
+ hasBackground?: boolean;
16
+ testId?: string;
17
+ }
18
+ export interface ModalContentProps {
19
+ children?: ReactNode;
20
+ testId?: string;
21
+ role?: string;
22
+ className?: string;
23
+ }
@@ -0,0 +1 @@
1
+ export { default as usePreventScroll } from './usePreventScroll';
@@ -0,0 +1,2 @@
1
+ declare const usePreventScroll: (isOpen?: boolean) => void;
2
+ export default usePreventScroll;
@@ -0,0 +1,2 @@
1
+ import Modal from './Modal';
2
+ export default Modal;
@@ -0,0 +1 @@
1
+ export { default as Modal } from './Modal';
@@ -10,7 +10,7 @@ module.exports = {
10
10
  screens: {
11
11
  mobile: '360px',
12
12
  tablet: '720px',
13
- desktop: '980px',
13
+ desktop: '960px',
14
14
  },
15
15
  extend: {
16
16
  gridAutoColumns: {
@@ -125,6 +125,14 @@ module.exports = {
125
125
  'w-secondary': '#2E6BAA',
126
126
  'y-primary': '#6B16EE',
127
127
  },
128
+ boxShadow: {
129
+ 'graysmall': '0px 1px 4px 0px rgba(0, 0, 0, 0.12)',
130
+ 'graymedium': '0px 2px 8px 0px rgba(0, 0, 0, 0.16)',
131
+ 'bluegray': '0px 1px 4px 0px rgba(230, 235, 240, 0.80)',
132
+ 'cyan': '0px 2px 8px 0px rgba(59, 163, 199, 0.32)',
133
+ 'indigo': '0px 2px 8px 0px rgba(46, 107, 170, 0.32)',
134
+ 'violet': '0px 2px 8px 0px rgba(107, 22, 238, 0.32)',
135
+ },
128
136
  backgroundImage: {
129
137
  'gradient-cyan-0': 'linear-gradient(0deg, #5db6d4 0%, #369cc2 100%)',
130
138
  'gradient-violet-0': 'linear-gradient(0deg, #8e2de2 0%, #5a00db 100%)',
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './Components/Atoms';
2
2
  export * from './Components/Molecules';
3
+ export * from './Components/Organisms';