@local-logic/design-system 0.7.17 → 0.7.18
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/components/Button/index.d.ts +1 -0
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Form/Root/Button/index.d.ts +9 -0
- package/dist/components/Form/Root/Button/index.d.ts.map +1 -0
- package/dist/components/Form/Root/Input/index.d.ts +16 -0
- package/dist/components/Form/Root/Input/index.d.ts.map +1 -0
- package/dist/components/Form/Root/Input/index.stories.d.ts +6 -0
- package/dist/components/Form/Root/Input/index.stories.d.ts.map +1 -0
- package/dist/components/Form/Root/Input/styles.d.ts +6 -0
- package/dist/components/Form/Root/Input/styles.d.ts.map +1 -0
- package/dist/components/Form/Root/Search/index.d.ts +17 -0
- package/dist/components/Form/Root/Search/index.d.ts.map +1 -0
- package/dist/components/Form/Root/Search/index.stories.d.ts +6 -0
- package/dist/components/Form/Root/Search/index.stories.d.ts.map +1 -0
- package/dist/components/Form/Root/Search/styles.d.ts +4 -0
- package/dist/components/Form/Root/Search/styles.d.ts.map +1 -0
- package/dist/components/Form/Root/SearchAndSelect/index.d.ts +29 -0
- package/dist/components/Form/Root/SearchAndSelect/index.d.ts.map +1 -0
- package/dist/components/Form/Root/SearchAndSelect/index.stories.d.ts +12 -0
- package/dist/components/Form/Root/SearchAndSelect/index.stories.d.ts.map +1 -0
- package/dist/components/Form/Root/SearchAndSelect/styles.d.ts +9 -0
- package/dist/components/Form/Root/SearchAndSelect/styles.d.ts.map +1 -0
- package/dist/components/Form/Root/Textarea/index.d.ts +14 -0
- package/dist/components/Form/Root/Textarea/index.d.ts.map +1 -0
- package/dist/components/Form/Root/Textarea/index.stories.d.ts +6 -0
- package/dist/components/Form/Root/Textarea/index.stories.d.ts.map +1 -0
- package/dist/components/Form/Root/Textarea/styles.d.ts +7 -0
- package/dist/components/Form/Root/Textarea/styles.d.ts.map +1 -0
- package/dist/components/Form/Root/context.d.ts +11 -0
- package/dist/components/Form/Root/context.d.ts.map +1 -0
- package/dist/components/Form/Root/index.d.ts +9 -0
- package/dist/components/Form/Root/index.d.ts.map +1 -0
- package/dist/components/Form/Root/styles.d.ts +3 -0
- package/dist/components/Form/Root/styles.d.ts.map +1 -0
- package/dist/components/Form/Root/types.d.ts +13 -0
- package/dist/components/Form/Root/types.d.ts.map +1 -0
- package/dist/components/Form/index.d.ts +3 -0
- package/dist/components/Form/index.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +8361 -1381
- package/dist/index.umd.js +138 -29
- package/dist/style.css +1 -1
- package/package.json +5 -2
|
@@ -4,6 +4,7 @@ export interface ButtonProps {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
variant?: "primary" | "secondary" | "ghost";
|
|
6
6
|
size?: "small" | "medium" | "large";
|
|
7
|
+
type?: "button" | "submit" | "reset";
|
|
7
8
|
prefixIcon?: React.ReactElement;
|
|
8
9
|
suffixIcon?: React.ReactElement;
|
|
9
10
|
inverse?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;IAC5C,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,UAAU,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAChC,UAAU,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CACtD;AAED,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;IAC5C,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,UAAU,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAChC,UAAU,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CACtD;AAED,eAAO,MAAM,MAAM,uFA8ClB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Button as ButtonComponent } from '../../../Button';
|
|
3
|
+
type ButtonProps = Parameters<typeof ButtonComponent>[0] & {
|
|
4
|
+
disableOnSubmit?: boolean;
|
|
5
|
+
disableOnNotDirty?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare function Button({ disableOnSubmit, disableOnNotDirty, isDisabled, ...rest }: ButtonProps): React.JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Root/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGhE,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,GAAG;IACzD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,wBAAgB,MAAM,CAAC,EAAE,eAAe,EAAE,iBAAiB,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW,qBAuC9F"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Icon as IconType } from '@phosphor-icons/react';
|
|
3
|
+
export declare function Input({ name, label, type, isDisabled, maxLength, prefixIcon: PrefixIcon, suffixIcon: SuffixIcon, className, onChange, onFocus, onBlur, }: {
|
|
4
|
+
name: string;
|
|
5
|
+
label: string;
|
|
6
|
+
type?: "text" | "number";
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
maxLength?: number;
|
|
9
|
+
prefixIcon?: IconType;
|
|
10
|
+
suffixIcon?: IconType;
|
|
11
|
+
className?: string;
|
|
12
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
13
|
+
onFocus?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
14
|
+
onBlur?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Root/Input/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAQ9D,wBAAgB,KAAK,CAAC,EACpB,IAAI,EACJ,KAAK,EACL,IAAa,EACb,UAAU,EACV,SAAe,EACf,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,SAAS,EACT,QAAQ,EACR,OAAO,EACP,MAAM,GACP,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC5D,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC3D,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC3D,qBA6DA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { Form } from '../../index';
|
|
3
|
+
declare const _default: Meta<typeof Form.Root>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const All: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../types').RootProps>;
|
|
6
|
+
//# sourceMappingURL=index.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Root/Input/index.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAW,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAIjD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;wBAK9B,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC;AAH3B,wBAG4B;AAkB5B,eAAO,MAAM,GAAG,wHAAoB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const container = "flex flex-col relative w-full cursor-text";
|
|
2
|
+
export declare const field = "\n peer transition-all grow\n px-4 pt-4 pb-2 border border-solid rounded outline-none\n border-gray-200 bg-white text-base-black text-base\n placeholder:text-transparent\n\n focus:border-primary-100\n hover:bg-gray-25\n disabled:text-gray-200\n\n data-[has-error=true]:border-feedback-danger-200\n data-[is-loading=true]:animate-pulse\n data-[has-prefix-icon=true]:pl-10\n";
|
|
3
|
+
export declare const label = "\n text-xs text-gray-400 ml-4\n absolute top-3 origin-top-left\n scale-75 duration-300\n\n transform\n -translate-y-1\n \n peer-placeholder-shown:text-base\n peer-placeholder-shown:scale-100\n peer-placeholder-shown:translate-y-0\n peer-focus:scale-75\n peer-focus:text-xs\n peer-focus:-translate-y-1\n peer-data-[has-prefix-icon=true]:mx-10\n";
|
|
4
|
+
export declare const prefixIcon = "\n h-4 w-4\n absolute left-4 top-1/2 -translate-y-1/2\n";
|
|
5
|
+
export declare const suffixIcon = "\n h-4 w-4\n absolute right-4 top-1/2 -translate-y-1/2\n";
|
|
6
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Root/Input/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,8CAA8C,CAAC;AAErE,eAAO,MAAM,KAAK,mYAajB,CAAC;AAEF,eAAO,MAAM,KAAK,yWAejB,CAAC;AAEF,eAAO,MAAM,UAAU,8DAGtB,CAAC;AAEF,eAAO,MAAM,UAAU,+DAGtB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Icon as IconType } from '@phosphor-icons/react';
|
|
3
|
+
export type SearchProps = {
|
|
4
|
+
name: string;
|
|
5
|
+
label: string;
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
maxLength?: number;
|
|
9
|
+
prefixIcon?: IconType;
|
|
10
|
+
suffixIcon?: IconType;
|
|
11
|
+
className?: string;
|
|
12
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
13
|
+
onFocus?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
14
|
+
onBlur?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
+
};
|
|
16
|
+
export declare function Search({ name, label, isLoading, isDisabled, maxLength, prefixIcon: PrefixIcon, suffixIcon: SuffixIcon, className, onChange, onFocus, onBlur, }: SearchProps): React.JSX.Element;
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Root/Search/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAsB,KAAK,IAAI,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAOlF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC5D,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC3D,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC3D,CAAC;AAEF,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,KAAK,EACL,SAAS,EACT,UAAU,EACV,SAAe,EACf,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,SAAS,EACT,QAAQ,EACR,OAAO,EACP,MAAM,GACP,EAAE,WAAW,qBAyCb"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { Form } from '../../index';
|
|
3
|
+
declare const _default: Meta<typeof Form.Root>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Primary: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../types').RootProps>;
|
|
6
|
+
//# sourceMappingURL=index.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Root/Search/index.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAW,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAIjD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;wBAK9B,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC;AAH3B,wBAG4B;AAY5B,eAAO,MAAM,OAAO,wHAAoB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const closeButton = "\n border-0 p-0 cursor-pointer\n absolute top-1/2 -translate-y-1/2\nright-4 bg-transparent\n";
|
|
2
|
+
export declare const icon = "\n h-4 w-4 \n";
|
|
3
|
+
export declare const loader = "\n animate-spin h-4 w-4\n absolute top-4 right-9 \n";
|
|
4
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Root/Search/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,mGAIvB,CAAC;AACF,eAAO,MAAM,IAAI,mBAEhB,CAAC;AACF,eAAO,MAAM,MAAM,0DAGlB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Icon as IconType } from '@phosphor-icons/react';
|
|
3
|
+
export type Option<T> = {
|
|
4
|
+
value: T;
|
|
5
|
+
label: string | React.JSX.Element;
|
|
6
|
+
key: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Unfortunately, we can't use radix select or dropdown because they require a trigger and
|
|
10
|
+
* it doesn't work very well with an input field. There seems to be some traction to eventually
|
|
11
|
+
* have a "combobox" which is essentially what we're doing here.
|
|
12
|
+
*/
|
|
13
|
+
export declare function SearchAndSelect<T>({ name, label, options, selectedLabel, isLoading, isDisabled, maxLength, prefixIcon: PrefixIcon, suffixIcon: SuffixIcon, className, onChange, onFocus, onBlur, onSelect, }: {
|
|
14
|
+
name: string;
|
|
15
|
+
label: string;
|
|
16
|
+
options?: Option<T>[];
|
|
17
|
+
selectedLabel?: string;
|
|
18
|
+
isLoading?: boolean;
|
|
19
|
+
isDisabled?: boolean;
|
|
20
|
+
maxLength?: number;
|
|
21
|
+
prefixIcon?: IconType;
|
|
22
|
+
suffixIcon?: IconType;
|
|
23
|
+
className?: string;
|
|
24
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
25
|
+
onFocus?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
26
|
+
onBlur?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
27
|
+
onSelect?: (value: T) => void;
|
|
28
|
+
}): React.JSX.Element;
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Root/SearchAndSelect/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,KAAK,IAAI,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAO9D,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI;IAAE,KAAK,EAAE,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AACrF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,EACjC,IAAI,EACJ,KAAK,EACL,OAAY,EACZ,aAAa,EACb,SAAS,EACT,UAAU,EACV,SAAe,EACf,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,SAAS,EACT,QAAQ,EACR,OAAO,EACP,MAAM,EACN,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC5D,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC3D,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC1D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;CAC/B,qBAsFA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { Form } from '../../index';
|
|
3
|
+
import * as Yup from "yup";
|
|
4
|
+
declare const _default: Meta<typeof Form.Root>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const ValidationSchema: Yup.ObjectSchema<{
|
|
7
|
+
searchAndSelect: string | undefined;
|
|
8
|
+
}, Yup.AnyObject, {
|
|
9
|
+
searchAndSelect: undefined;
|
|
10
|
+
}, "">;
|
|
11
|
+
export declare const Primary: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../types').RootProps>;
|
|
12
|
+
//# sourceMappingURL=index.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Root/SearchAndSelect/index.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAW,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;wBAK9B,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC;AAH3B,wBAG4B;AAE5B,eAAO,MAAM,gBAAgB;;;;MAE3B,CAAC;AAiBH,eAAO,MAAM,OAAO,wHAAoB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const container = "relative";
|
|
2
|
+
export declare const results = "relative";
|
|
3
|
+
export declare const list = "\n absolute top-0 left-0 right-0\n list-none px-0 py-1 mt-1\n rounded-lg overflow-hidden\n bg-white shadow-multi-2sm rounded-lg \n";
|
|
4
|
+
export declare const item = "\n py-2.5 px-4 cursor-pointer transition-all\n bg-white hover:bg-primary-10 hover:font-medium hover:text-black\n";
|
|
5
|
+
export declare const closeButton = "\n border-0 p-0 cursor-pointer\n absolute top-1/2 -translate-y-1/2\nright-4 bg-transparent\n";
|
|
6
|
+
export declare const icon = "\n h-4 w-4 \n";
|
|
7
|
+
export declare const loader = "\n animate-spin h-4 w-4\n absolute top-4 right-9 \n";
|
|
8
|
+
export declare const selected = "\n absolute top-0 left-0 right-0 bottom-0\n px-4 flex items-center pointer-events-none\n text-gray-800\n";
|
|
9
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Root/SearchAndSelect/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,aAAa,CAAC;AACpC,eAAO,MAAM,OAAO,aAAa,CAAC;AAClC,eAAO,MAAM,IAAI,2IAKhB,CAAC;AACF,eAAO,MAAM,IAAI,uHAGhB,CAAC;AACF,eAAO,MAAM,WAAW,mGAIvB,CAAC;AACF,eAAO,MAAM,IAAI,mBAEhB,CAAC;AACF,eAAO,MAAM,MAAM,0DAGlB,CAAC;AACF,eAAO,MAAM,QAAQ,gHAIpB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Icon as IconType } from '@phosphor-icons/react';
|
|
3
|
+
export declare function Textarea({ name, label, isDisabled, maxLength, rows, grow, prefixIcon: PrefixIcon, className, onChange, }: {
|
|
4
|
+
name: string;
|
|
5
|
+
label: string;
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
maxLength?: number;
|
|
8
|
+
rows?: number;
|
|
9
|
+
grow?: boolean;
|
|
10
|
+
prefixIcon?: IconType;
|
|
11
|
+
className?: string;
|
|
12
|
+
onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
13
|
+
}): React.JSX.Element;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Root/Textarea/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,OAAO,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAQ9D,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,KAAK,EACL,UAAU,EACV,SAAS,EACT,IAAQ,EACR,IAAW,EACX,UAAU,EAAE,UAAU,EACtB,SAAS,EACT,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;CAChE,qBAyEA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { Form } from '../../index';
|
|
3
|
+
declare const _default: Meta<typeof Form.Root>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Primary: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../types').RootProps>;
|
|
6
|
+
//# sourceMappingURL=index.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Root/Textarea/index.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAW,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;wBAK9B,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC;AAH3B,wBAG4B;AAY5B,eAAO,MAAM,OAAO,wHAAoB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const container = "flex flex-col relative w-full cursor-text";
|
|
2
|
+
export declare const buffer = "\n flex transition-all grow resize-none\n px-4 pt-6 pb-1.5 border border-solid rounded outline-none\n border-gray-200 bg-white text-black\n\n focus-within:border-primary-100\n hover:bg-gray-25\n disabled:text-gray-200\n\n data-[has-error=true]:border-feedback-danger-200\n data-[is-loading=true]:animate-pulse\n data-[has-prefix-icon=true]:pl-10\n data-[has-max-length=true]:pb-10\n";
|
|
3
|
+
export declare const field = "\n p-0 relative peer text-sm placeholder:text-transparent bg-transparent\n max-h-56 min-h-14 w-full border-0 appearance-none\n focus:outline-none resize-none\n";
|
|
4
|
+
export declare const label = "\n text-sm\ttext-gray-400\n absolute top-4 origin-top-left\n scale-75 duration-300\n\n transform\n -translate-y-2\n\n peer-placeholder-shown:text-base\n peer-placeholder-shown:scale-100\n peer-placeholder-shown:translate-y-0\n peer-focus:text-sm\n peer-focus:scale-75\n peer-focus:-translate-y-2\n peer-data-[has-prefix-icon=true]:mx-10\n";
|
|
5
|
+
export declare const prefixIcon = "\n h-4 w-4\n absolute left-4 top-1/2 -translate-y-1/2\n";
|
|
6
|
+
export declare const wordCount = "\n text-sm text-gray-400\n absolute bottom-3.5 right-8 origin-bottom-right\n";
|
|
7
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Root/Textarea/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,8CAA8C,CAAC;AAErE,eAAO,MAAM,MAAM,6YAalB,CAAC;AAEF,eAAO,MAAM,KAAK,uKAIjB,CAAC;AAEF,eAAO,MAAM,KAAK,mWAejB,CAAC;AAEF,eAAO,MAAM,UAAU,8DAGtB,CAAC;AAEF,eAAO,MAAM,SAAS,mFAGrB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type NavigationEvent = React.MouseEventHandler<HTMLButtonElement>;
|
|
3
|
+
export type DefaultContext = {
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
isForcedDirty?: boolean;
|
|
6
|
+
onNavigationEvent: (event: NavigationEvent) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const RootElementContext: React.Context<DefaultContext>;
|
|
9
|
+
declare const useRootElement: () => DefaultContext;
|
|
10
|
+
export { useRootElement, RootElementContext };
|
|
11
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/Root/context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;AACzE,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;CACrD,CAAC;AAEF,QAAA,MAAM,kBAAkB,+BAA4D,CAAC;AACrF,QAAA,MAAM,cAAc,sBAAuC,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { RootProps } from './types';
|
|
3
|
+
export declare function Root({ isLoading, enableReinitialize, initialValues, validationSchema, isForcedDirty, onSubmit, className, children, }: RootProps): React.JSX.Element;
|
|
4
|
+
export { Button } from './Button';
|
|
5
|
+
export { Input } from './Input';
|
|
6
|
+
export { Textarea } from './Textarea';
|
|
7
|
+
export { Search } from './Search';
|
|
8
|
+
export { SearchAndSelect, type Option } from './SearchAndSelect';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/Root/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIzC,wBAAgB,IAAI,CAAC,EACnB,SAAiB,EACjB,kBAAyB,EACzB,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,SAAS,EACT,QAAQ,GACT,EAAE,SAAS,qBAmCX;AAGD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/Root/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,WAAW,CAAC;AAClC,eAAO,MAAM,KAAK,oDAAoD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FormikValues } from 'formik';
|
|
2
|
+
import { ObjectSchema } from 'yup';
|
|
3
|
+
export type RootProps = {
|
|
4
|
+
initialValues: FormikValues;
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
enableReinitialize?: boolean;
|
|
7
|
+
validationSchema?: ObjectSchema<FormikValues>;
|
|
8
|
+
isForcedDirty?: boolean;
|
|
9
|
+
onSubmit?: (values: FormikValues) => Promise<unknown>;
|
|
10
|
+
className?: string;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/Root/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AAExC,MAAM,MAAM,SAAS,GAAG;IACtB,aAAa,EAAE,YAAY,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,gBAAgB,CAAC,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;IAC9C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,YAAY,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,YAAY,CAAC;AAEpB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,YAAY,CAAC;AAEpB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC"}
|