@local-logic/design-system 0.7.21 → 0.7.22

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,11 @@
1
+ import { default as React } from 'react';
2
+ export declare function Checkbox({ name, label, className, fieldClassName, isDisabled, onChange, onFocus, }: {
3
+ name: string;
4
+ label?: string | React.ReactNode;
5
+ className?: string;
6
+ fieldClassName?: string;
7
+ isDisabled?: boolean;
8
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
9
+ onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
10
+ }): React.JSX.Element;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Root/Checkbox/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,KAAK,EACL,SAAS,EACT,cAAc,EACd,UAAU,EACV,QAAQ,EACR,OAAO,GACR,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC5D,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC3D,qBAmCA"}
@@ -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<import('yup').AnyObject>>;
6
+ //# sourceMappingURL=index.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Root/Checkbox/index.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAW,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;wBAK9B,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC;AAH3B,wBAG4B;AAQ5B,eAAO,MAAM,GAAG,iJAAoB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const container = "\n group/checkbox\n data-[is-disabled=true]:pointer-events-none\n data-[is-disabled=true]:cursor-default\n";
2
+ export declare const checkbox = "\n w-5 h-5 rounded-md bg-white\n peer relative shrink-0\n appearance-none\n border border-neutral-400\n hover:border-base-black\n group-hover/checkbox:border-base-black\n \n checked:bg-primary-100\n checked:border-0\n checked:hover:bg-primary-200\n\n disabled:border-neutral-300\n disabled:checked:bg-neutral-300\n";
3
+ export declare const label = "\n text-sm text-neutral-400 font-normal\n\n group-hover/checkbox:text-base-black\n group-hover/checkbox:font-medium\n\n peer-checked:hover:text-base-black\n group-data-[is-disabled=true]/checkbox:text-neutral-300\n\n flex gap-2 cursor-pointer\n";
4
+ export declare const icon = "absolute w-4 h-4 ml-0.5 mt-0.5 hidden peer-checked:block fill-white";
5
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/Root/Checkbox/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,kHAIrB,CAAC;AAEF,eAAO,MAAM,QAAQ,4UAcpB,CAAC;AAEF,eAAO,MAAM,KAAK,+PAUjB,CAAC;AAEF,eAAO,MAAM,IAAI,wEAAwE,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { Meta } from '@storybook/react';
2
2
  import { Form } from '../../index';
3
+ import * as Yup from "yup";
3
4
  declare const _default: Meta<typeof Form.Root>;
4
5
  export default _default;
5
- export declare const All: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../types').RootProps>;
6
+ export declare const All: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../types').RootProps<Yup.AnyObject>>;
6
7
  //# sourceMappingURL=index.stories.d.ts.map
@@ -1 +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"}
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;AACjD,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAG3B,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;wBAK9B,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC;AAH3B,wBAG4B;AAkB5B,eAAO,MAAM,GAAG,uIAAoB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  export declare const container = "flex flex-col relative w-full cursor-text";
2
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 px-4 ml-1 w-[125%]\n absolute top-3 origin-top-left text-ellipsis overflow-hidden\n scale-75 duration-300 text-nowrap\n transform -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-placeholder-shown:w-full\n\n peer-focus:scale-75\n peer-focus:text-xs\n peer-focus:-translate-y-1\n peer-focus:w-[125%]\n peer-focus:ml-1\n\n peer-placeholder-shown:peer-data-[has-prefix-icon=true]:ml-6\n peer-placeholder-shown:peer-data-[has-prefix-icon=true]:translate-y-0\n peer-placeholder-shown:peer-data-[has-prefix-icon=true]:w-[calc(100%-24px)]\n\n peer-data-[has-prefix-icon=true]:ml-7\n peer-data-[has-prefix-icon=true]:w-[calc(125%-24px)]\n\n peer-focus:peer-data-[has-prefix-icon=true]:ml-7\n peer-focus:peer-data-[has-prefix-icon=true]:-translate-y-1\n peer-focus:peer-data-[has-prefix-icon=true]:w-[calc(125%-24px)]\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";
3
+ export declare const label = "\n text-xs text-gray-400 px-4 ml-1 w-[125%]\n absolute top-3 origin-top-left text-ellipsis overflow-hidden\n scale-75 duration-300 text-nowrap\n transform -translate-y-1\n \n peer-placeholder-shown:text-base\n peer-placeholder-shown:scale-100\n peer-placeholder-shown:w-full\n peer-placeholder-shown:-translate-y-0\n\n peer-focus:scale-75\n peer-focus:text-xs\n peer-focus:w-[125%]\n peer-focus:ml-1\n peer-focus:-translate-y-1\n\n peer-placeholder-shown:peer-data-[has-prefix-icon=true]:ml-6\n peer-placeholder-shown:peer-data-[has-prefix-icon=true]:w-[calc(100%-24px)]\n\n peer-data-[has-prefix-icon=true]:ml-7\n peer-data-[has-prefix-icon=true]:w-[calc(125%-24px)]\n\n peer-focus:peer-data-[has-prefix-icon=true]:ml-7\n peer-focus:peer-data-[has-prefix-icon=true]:w-[calc(125%-24px)]\n";
4
+ export declare const prefixIcon = "h-4 w-4 absolute left-4 top-1/2 -translate-y-1/2";
5
+ export declare const suffixIcon = "h-4 w-4 absolute right-4 top-1/2 -translate-y-1/2";
6
6
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +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,m7BA2BjB,CAAC;AAEF,eAAO,MAAM,UAAU,8DAGtB,CAAC;AAEF,eAAO,MAAM,UAAU,+DAGtB,CAAC"}
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,6yBAyBjB,CAAC;AAEF,eAAO,MAAM,UAAU,qDAAqD,CAAC;AAE7E,eAAO,MAAM,UAAU,sDAAsD,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { Meta } from '@storybook/react';
2
2
  import { Form } from '../../index';
3
+ import * as Yup from "yup";
3
4
  declare const _default: Meta<typeof Form.Root>;
4
5
  export default _default;
5
- export declare const Primary: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../types').RootProps>;
6
+ export declare const Primary: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../types').RootProps<Yup.AnyObject>>;
6
7
  //# sourceMappingURL=index.stories.d.ts.map
@@ -1 +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"}
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;AACjD,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAG3B,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;wBAK9B,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC;AAH3B,wBAG4B;AAY5B,eAAO,MAAM,OAAO,uIAAoB,CAAC"}
@@ -8,5 +8,5 @@ export declare const ValidationSchema: Yup.ObjectSchema<{
8
8
  }, Yup.AnyObject, {
9
9
  searchAndSelect: undefined;
10
10
  }, "">;
11
- export declare const Primary: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../types').RootProps>;
11
+ export declare const Primary: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../types').RootProps<Yup.AnyObject>>;
12
12
  //# sourceMappingURL=index.stories.d.ts.map
@@ -1 +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;AAEjD,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;AA4CH,eAAO,MAAM,OAAO,wHAAoB,CAAC"}
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;AAEjD,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;AA4CH,eAAO,MAAM,OAAO,uIAAoB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { Meta } from '@storybook/react';
2
2
  import { Form } from '../../index';
3
+ import * as Yup from "yup";
3
4
  declare const _default: Meta<typeof Form.Root>;
4
5
  export default _default;
5
- export declare const Primary: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../types').RootProps>;
6
+ export declare const Primary: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('../types').RootProps<Yup.AnyObject>>;
6
7
  //# sourceMappingURL=index.stories.d.ts.map
@@ -1 +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"}
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;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;AAY5B,eAAO,MAAM,OAAO,uIAAoB,CAAC"}
@@ -1,9 +1,11 @@
1
1
  import { default as React } from 'react';
2
+ import { AnyObject } from 'yup';
2
3
  import { RootProps } from './types';
3
- export declare function Root({ isLoading, enableReinitialize, initialValues, validationSchema, isForcedDirty, onSubmit, className, children, }: RootProps): React.JSX.Element;
4
+ export declare function Root<T extends AnyObject>({ isLoading, enableReinitialize, initialValues, validationSchema, isForcedDirty, onSubmit, className, children, }: RootProps<T>): React.JSX.Element;
4
5
  export { Button } from './Button';
5
6
  export { Input } from './Input';
6
7
  export { Textarea } from './Textarea';
7
8
  export { Search } from './Search';
9
+ export { Checkbox } from './Checkbox';
8
10
  export { SearchAndSelect, type Option } from './SearchAndSelect';
9
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/Root/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIzC,wBAAgB,IAAI,CAAC,CAAC,SAAS,SAAS,EAAE,EACxC,SAAiB,EACjB,kBAAyB,EACzB,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,SAAS,EACT,QAAQ,GACT,EAAE,SAAS,CAAC,CAAC,CAAC,qBAmCd;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,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1,12 +1,11 @@
1
- import { FormikValues } from 'formik';
2
- import { ObjectSchema } from 'yup';
3
- export type RootProps = {
4
- initialValues: FormikValues;
1
+ import { AnyObject, ObjectSchema } from 'yup';
2
+ export type RootProps<T extends AnyObject> = {
3
+ initialValues: T;
5
4
  isLoading?: boolean;
6
5
  enableReinitialize?: boolean;
7
- validationSchema?: ObjectSchema<FormikValues>;
6
+ validationSchema?: ObjectSchema<T>;
8
7
  isForcedDirty?: boolean;
9
- onSubmit?: (values: FormikValues) => Promise<unknown>;
8
+ onSubmit?: (values: T) => Promise<unknown>;
10
9
  className?: string;
11
10
  children?: React.ReactNode;
12
11
  };
@@ -1 +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"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/Root/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AAEnD,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,SAAS,IAAI;IAC3C,aAAa,EAAE,CAAC,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,gBAAgB,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACnC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC"}