@sakura-ui/forms 0.2.1 → 0.2.2-beta.1

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 (31) hide show
  1. package/dist/index.cjs.js +148 -44
  2. package/dist/index.es.js +2244 -708
  3. package/dist/types/components/Checkbox.d.ts +5 -3
  4. package/dist/types/components/Checkbox.d.ts.map +1 -1
  5. package/dist/types/components/FieldsetControl.d.ts +10 -8
  6. package/dist/types/components/FieldsetControl.d.ts.map +1 -1
  7. package/dist/types/components/FileInput.d.ts +5 -3
  8. package/dist/types/components/FileInput.d.ts.map +1 -1
  9. package/dist/types/components/Input.d.ts +5 -3
  10. package/dist/types/components/Input.d.ts.map +1 -1
  11. package/dist/types/components/LabelControl.d.ts +9 -7
  12. package/dist/types/components/LabelControl.d.ts.map +1 -1
  13. package/dist/types/components/Radio.d.ts +5 -3
  14. package/dist/types/components/Radio.d.ts.map +1 -1
  15. package/dist/types/components/Select.d.ts +5 -3
  16. package/dist/types/components/Select.d.ts.map +1 -1
  17. package/dist/types/components/Textarea.d.ts +4 -2
  18. package/dist/types/components/Textarea.d.ts.map +1 -1
  19. package/dist/types/components/controlled/CheckboxGroup.d.ts +12 -10
  20. package/dist/types/components/controlled/CheckboxGroup.d.ts.map +1 -1
  21. package/dist/types/components/controlled/RadioGroup.d.ts +13 -11
  22. package/dist/types/components/controlled/RadioGroup.d.ts.map +1 -1
  23. package/dist/types/components/index.d.ts +8 -8
  24. package/dist/types/components/index.d.ts.map +1 -1
  25. package/dist/types/components/inputStyle.d.ts +1 -1
  26. package/dist/types/components/inputStyle.d.ts.map +1 -1
  27. package/dist/types/index.d.ts +0 -1
  28. package/dist/types/index.d.ts.map +1 -1
  29. package/package.json +12 -9
  30. package/dist/types/utils/class.d.ts +0 -2
  31. package/dist/types/utils/class.d.ts.map +0 -1
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  import { type InputSize } from './inputStyle';
3
- export interface CheckboxProps extends Omit<React.ComponentPropsWithRef<'input'>, 'size'> {
4
- size?: InputSize;
3
+ export declare namespace Checkbox {
4
+ interface Props extends Omit<React.ComponentPropsWithRef<'input'>, 'size'> {
5
+ size?: InputSize;
6
+ }
5
7
  }
6
- export declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
8
+ export declare const Checkbox: React.ForwardRefExoticComponent<Omit<Checkbox.Props, "ref"> & React.RefAttributes<HTMLInputElement>>;
7
9
  //# sourceMappingURL=Checkbox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EACL,KAAK,SAAS,EAIf,MAAM,cAAc,CAAA;AAErB,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1D,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED,eAAO,MAAM,QAAQ,qGA+EpB,CAAA"}
1
+ {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EACL,KAAK,SAAS,EAIf,MAAM,cAAc,CAAA;AAErB,yBAAiB,QAAQ,CAAC;IACxB,UAAiB,KACf,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAC1D,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB;CACF;AAED,eAAO,MAAM,QAAQ,sGA4EpB,CAAA"}
@@ -1,11 +1,13 @@
1
1
  import React from 'react';
2
- export interface FieldsetControlProps extends React.ComponentPropsWithRef<'fieldset'> {
3
- labelText: string;
4
- helperText?: string;
5
- errorMessage?: string;
6
- isInvalid?: boolean;
7
- isRequired?: boolean;
8
- direction?: 'flex-col' | 'flex-row';
2
+ export declare namespace FieldsetControl {
3
+ interface Props extends React.ComponentPropsWithRef<'fieldset'> {
4
+ labelText: string;
5
+ helperText?: string;
6
+ errorMessage?: string;
7
+ isInvalid?: boolean;
8
+ isRequired?: boolean;
9
+ direction?: 'flex-col' | 'flex-row';
10
+ }
9
11
  }
10
- export declare const FieldsetControl: React.ForwardRefExoticComponent<Omit<FieldsetControlProps, "ref"> & React.RefAttributes<HTMLFieldSetElement>>;
12
+ export declare const FieldsetControl: React.ForwardRefExoticComponent<Omit<FieldsetControl.Props, "ref"> & React.RefAttributes<HTMLFieldSetElement>>;
11
13
  //# sourceMappingURL=FieldsetControl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldsetControl.d.ts","sourceRoot":"","sources":["../../../src/components/FieldsetControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,WAAW,oBACf,SAAQ,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC;IAC/C,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,UAAU,GAAG,UAAU,CAAA;CACpC;AAED,eAAO,MAAM,eAAe,+GA4D1B,CAAA"}
1
+ {"version":3,"file":"FieldsetControl.d.ts","sourceRoot":"","sources":["../../../src/components/FieldsetControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,yBAAiB,eAAe,CAAC;IAC/B,UAAiB,KAAM,SAAQ,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC;QACpE,SAAS,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,SAAS,CAAC,EAAE,OAAO,CAAA;QACnB,UAAU,CAAC,EAAE,OAAO,CAAA;QACpB,SAAS,CAAC,EAAE,UAAU,GAAG,UAAU,CAAA;KACpC;CACF;AAED,eAAO,MAAM,eAAe,gHAwD1B,CAAA"}
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  import { InputSize } from './inputStyle';
3
- export interface FileInputProps extends Omit<React.ComponentPropsWithRef<'input'>, 'size'> {
4
- size?: InputSize;
3
+ export declare namespace FileInput {
4
+ interface Props extends Omit<React.ComponentPropsWithRef<'input'>, 'size'> {
5
+ size?: InputSize;
6
+ }
5
7
  }
6
- export declare const FileInput: React.ForwardRefExoticComponent<Omit<FileInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
8
+ export declare const FileInput: React.ForwardRefExoticComponent<Omit<FileInput.Props, "ref"> & React.RefAttributes<HTMLInputElement>>;
7
9
  //# sourceMappingURL=FileInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../../src/components/FileInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1D,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED,eAAO,MAAM,SAAS,sGAwFrB,CAAA"}
1
+ {"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../../src/components/FileInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,yBAAiB,SAAS,CAAC;IACzB,UAAiB,KACf,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAC1D,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB;CACF;AAED,eAAO,MAAM,SAAS,uGAuFrB,CAAA"}
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  import { type InputSize } from './inputStyle';
3
- export interface InputProps extends Omit<React.ComponentPropsWithRef<'input'>, 'size'> {
4
- size?: InputSize;
3
+ export declare namespace Input {
4
+ interface Props extends Omit<React.ComponentPropsWithRef<'input'>, 'size'> {
5
+ size?: InputSize;
6
+ }
5
7
  }
6
- export declare const Input: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
8
+ export declare const Input: React.ForwardRefExoticComponent<Omit<Input.Props, "ref"> & React.RefAttributes<HTMLInputElement>>;
7
9
  //# sourceMappingURL=Input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EACL,KAAK,SAAS,EAGf,MAAM,cAAc,CAAA;AAErB,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1D,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED,eAAO,MAAM,KAAK,kGA0BjB,CAAA"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EACL,KAAK,SAAS,EAGf,MAAM,cAAc,CAAA;AAErB,yBAAiB,KAAK,CAAC;IACrB,UAAiB,KACf,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAC1D,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB;CACF;AAED,eAAO,MAAM,KAAK,mGA0BjB,CAAA"}
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
- export interface LabelControlProps extends React.ComponentPropsWithRef<'label'> {
3
- labelText: string;
4
- helperText?: string;
5
- errorMessage?: string;
6
- isInvalid?: boolean;
7
- isRequired?: boolean;
2
+ export declare namespace LabelControl {
3
+ interface Props extends React.ComponentPropsWithRef<'label'> {
4
+ labelText: string;
5
+ helperText?: string;
6
+ errorMessage?: string;
7
+ isInvalid?: boolean;
8
+ isRequired?: boolean;
9
+ }
8
10
  }
9
- export declare const LabelControl: React.ForwardRefExoticComponent<Omit<LabelControlProps, "ref"> & React.RefAttributes<HTMLLabelElement>>;
11
+ export declare const LabelControl: React.ForwardRefExoticComponent<Omit<LabelControl.Props, "ref"> & React.RefAttributes<HTMLLabelElement>>;
10
12
  //# sourceMappingURL=LabelControl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LabelControl.d.ts","sourceRoot":"","sources":["../../../src/components/LabelControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,WAAW,iBACf,SAAQ,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC;IAC5C,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,eAAO,MAAM,YAAY,yGA+DvB,CAAA"}
1
+ {"version":3,"file":"LabelControl.d.ts","sourceRoot":"","sources":["../../../src/components/LabelControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,yBAAiB,YAAY,CAAC;IAC5B,UAAiB,KAAM,SAAQ,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC;QACjE,SAAS,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,SAAS,CAAC,EAAE,OAAO,CAAA;QACnB,UAAU,CAAC,EAAE,OAAO,CAAA;KACrB;CACF;AAED,eAAO,MAAM,YAAY,0GA4DvB,CAAA"}
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  import { type InputSize } from './inputStyle';
3
- export interface RadioProps extends Omit<React.ComponentPropsWithRef<'input'>, 'size'> {
4
- size?: InputSize;
3
+ export declare namespace Radio {
4
+ interface Props extends Omit<React.ComponentPropsWithRef<'input'>, 'size'> {
5
+ size?: InputSize;
6
+ }
5
7
  }
6
- export declare const Radio: React.ForwardRefExoticComponent<Omit<RadioProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
8
+ export declare const Radio: React.ForwardRefExoticComponent<Omit<Radio.Props, "ref"> & React.RefAttributes<HTMLInputElement>>;
7
9
  //# sourceMappingURL=Radio.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/components/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EACL,KAAK,SAAS,EAIf,MAAM,cAAc,CAAA;AAErB,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1D,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED,eAAO,MAAM,KAAK,kGAmEjB,CAAA"}
1
+ {"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/components/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EACL,KAAK,SAAS,EAIf,MAAM,cAAc,CAAA;AAErB,yBAAiB,KAAK,CAAC;IACrB,UAAiB,KACf,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAC1D,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB;CACF;AAED,eAAO,MAAM,KAAK,mGAiEjB,CAAA"}
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  import { type InputSize } from './inputStyle';
3
- export interface SelectProps extends Omit<React.ComponentPropsWithRef<'select'>, 'size'> {
4
- size?: InputSize;
3
+ export declare namespace Select {
4
+ interface Props extends Omit<React.ComponentPropsWithRef<'select'>, 'size'> {
5
+ size?: InputSize;
6
+ }
5
7
  }
6
- export declare const Select: React.ForwardRefExoticComponent<Omit<SelectProps, "ref"> & React.RefAttributes<HTMLSelectElement>>;
8
+ export declare const Select: React.ForwardRefExoticComponent<Omit<Select.Props, "ref"> & React.RefAttributes<HTMLSelectElement>>;
7
9
  //# sourceMappingURL=Select.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EACL,KAAK,SAAS,EAGf,MAAM,cAAc,CAAA;AAErB,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3D,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED,eAAO,MAAM,MAAM,oGA8DlB,CAAA"}
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EACL,KAAK,SAAS,EAGf,MAAM,cAAc,CAAA;AAErB,yBAAiB,MAAM,CAAC;IACtB,UAAiB,KACf,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAC3D,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB;CACF;AAED,eAAO,MAAM,MAAM,qGA8DlB,CAAA"}
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
- export interface TextareaProps extends React.ComponentPropsWithRef<'textarea'> {
2
+ export declare namespace Textarea {
3
+ interface Props extends React.ComponentPropsWithRef<'textarea'> {
4
+ }
3
5
  }
4
- export declare const Textarea: React.ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
6
+ export declare const Textarea: React.ForwardRefExoticComponent<Omit<Textarea.Props, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
5
7
  //# sourceMappingURL=Textarea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,WAAW,aACf,SAAQ,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC;CAAG;AAEpD,eAAO,MAAM,QAAQ,wGA+DpB,CAAA"}
1
+ {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,yBAAiB,QAAQ,CAAC;IACxB,UAAiB,KAAM,SAAQ,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC;KAAG;CAC1E;AAED,eAAO,MAAM,QAAQ,yGA4DpB,CAAA"}
@@ -1,15 +1,17 @@
1
1
  import React from 'react';
2
2
  import type { InputItem } from './InputItem';
3
3
  import type { InputSize } from '../inputStyle';
4
- export interface CheckboxGroupProps extends Omit<React.ComponentPropsWithRef<'fieldset'>, 'onChange'> {
5
- items: InputItem[];
6
- onChange: React.ChangeEventHandler<HTMLInputElement>;
7
- labelText: string;
8
- helperText?: string;
9
- errorMessage?: string;
10
- isInvalid?: boolean;
11
- isRequired?: boolean;
12
- size?: InputSize;
4
+ export declare namespace CheckboxGroup {
5
+ interface Props extends Omit<React.ComponentPropsWithRef<'fieldset'>, 'onChange'> {
6
+ items: InputItem[];
7
+ onChange: React.ChangeEventHandler<HTMLInputElement>;
8
+ labelText: string;
9
+ helperText?: string;
10
+ errorMessage?: string;
11
+ isInvalid?: boolean;
12
+ isRequired?: boolean;
13
+ size?: InputSize;
14
+ }
13
15
  }
14
- export declare const CheckboxGroup: React.ForwardRefExoticComponent<Omit<CheckboxGroupProps, "ref"> & React.RefAttributes<HTMLFieldSetElement>>;
16
+ export declare const CheckboxGroup: React.ForwardRefExoticComponent<Omit<CheckboxGroup.Props, "ref"> & React.RefAttributes<HTMLFieldSetElement>>;
15
17
  //# sourceMappingURL=CheckboxGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/controlled/CheckboxGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;IACjE,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,QAAQ,EAAE,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;IACpD,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED,eAAO,MAAM,aAAa,6GA0CxB,CAAA"}
1
+ {"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/controlled/CheckboxGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,yBAAiB,aAAa,CAAC;IAC7B,UAAiB,KACf,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;QACjE,KAAK,EAAE,SAAS,EAAE,CAAA;QAClB,QAAQ,EAAE,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;QACpD,SAAS,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,SAAS,CAAC,EAAE,OAAO,CAAA;QACnB,UAAU,CAAC,EAAE,OAAO,CAAA;QACpB,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB;CACF;AAED,eAAO,MAAM,aAAa,8GA0CxB,CAAA"}
@@ -1,16 +1,18 @@
1
1
  import React from 'react';
2
2
  import type { InputItem } from './InputItem';
3
3
  import type { InputSize } from '../inputStyle';
4
- export interface RadioGroupProps extends Omit<React.ComponentPropsWithRef<'fieldset'>, 'onChange'> {
5
- items: InputItem[];
6
- onChange: React.ChangeEventHandler<HTMLInputElement>;
7
- labelText: string;
8
- helperText?: string;
9
- errorMessage?: string;
10
- isInvalid?: boolean;
11
- isRequired?: boolean;
12
- defaultValue?: string;
13
- size?: InputSize;
4
+ export declare namespace RadioGroup {
5
+ interface Props extends Omit<React.ComponentPropsWithRef<'fieldset'>, 'onChange'> {
6
+ items: InputItem[];
7
+ onChange: React.ChangeEventHandler<HTMLInputElement>;
8
+ labelText: string;
9
+ helperText?: string;
10
+ errorMessage?: string;
11
+ isInvalid?: boolean;
12
+ isRequired?: boolean;
13
+ defaultValue?: string;
14
+ size?: InputSize;
15
+ }
14
16
  }
15
- export declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupProps, "ref"> & React.RefAttributes<HTMLFieldSetElement>>;
17
+ export declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroup.Props, "ref"> & React.RefAttributes<HTMLFieldSetElement>>;
16
18
  //# sourceMappingURL=RadioGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/controlled/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;IACjE,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,QAAQ,EAAE,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;IACpD,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED,eAAO,MAAM,UAAU,0GA4CrB,CAAA"}
1
+ {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/controlled/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,yBAAiB,UAAU,CAAC;IAC1B,UAAiB,KACf,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;QACjE,KAAK,EAAE,SAAS,EAAE,CAAA;QAClB,QAAQ,EAAE,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;QACpD,SAAS,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,SAAS,CAAC,EAAE,OAAO,CAAA;QACnB,UAAU,CAAC,EAAE,OAAO,CAAA;QACpB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB;CACF;AAED,eAAO,MAAM,UAAU,2GA4CrB,CAAA"}
@@ -1,9 +1,9 @@
1
- export { Checkbox, type CheckboxProps } from './Checkbox';
2
- export { Radio, type RadioProps } from './Radio';
3
- export { Select, type SelectProps } from './Select';
4
- export { FileInput, type FileInputProps } from './FileInput';
5
- export { Input, type InputProps } from './Input';
6
- export { Textarea, type TextareaProps } from './Textarea';
7
- export { LabelControl, type LabelControlProps } from './LabelControl';
8
- export { FieldsetControl, type FieldsetControlProps } from './FieldsetControl';
1
+ export { Checkbox } from './Checkbox';
2
+ export { Radio } from './Radio';
3
+ export { Select } from './Select';
4
+ export { FileInput } from './FileInput';
5
+ export { Input } from './Input';
6
+ export { Textarea } from './Textarea';
7
+ export { LabelControl } from './LabelControl';
8
+ export { FieldsetControl } from './FieldsetControl';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACrE,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA"}
@@ -1,5 +1,5 @@
1
1
  export type InputSize = 'lg' | 'md' | 'sm';
2
- export declare const borderedInputBaseStyles = "\n bg-white\n border\n border-solid\n border-sumi-900\n outline-offset-2\n focus:outline\n focus:outline-2\n focus:outline-wood-500\n disabled:bg-transparent\n disabled:text-sumi-500\n disabled:border-sumi-500\n aria-invalid:border-sun-800\n";
2
+ export declare const borderedInputBaseStyles = "\n bg-white\n border\n border-solid\n border-sumi-900\n disabled:bg-transparent\n disabled:text-sumi-500\n disabled:border-sumi-500\n aria-invalid:border-sun-800\n \n \n focus-visible:outline\n focus-visible:outline-4\n focus-visible:outline-black\n focus-visible:ring-yellow-300\n \n focus-visible:outline-offset-[calc(2/16*1rem)]\n focus-visible:ring-[calc(2/16*1rem)]\n \n";
3
3
  export declare const borderedInputSizeStyles: {
4
4
  [key in InputSize]: string;
5
5
  };
@@ -1 +1 @@
1
- {"version":3,"file":"inputStyle.d.ts","sourceRoot":"","sources":["../../../src/components/inputStyle.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAE1C,eAAO,MAAM,uBAAuB,kQAanC,CAAA;AAGD,eAAO,MAAM,uBAAuB,EAAE;KAAG,GAAG,IAAI,SAAS,GAAG,MAAM;CAwBjE,CAAA;AAED,eAAO,MAAM,yBAAyB,yFAMrC,CAAA;AAGD,eAAO,MAAM,yBAAyB,EAAE;KAAG,GAAG,IAAI,SAAS,GAAG,MAAM;CAsBnE,CAAA;AAGD,eAAO,MAAM,UAAU,EAAE;KAAG,GAAG,IAAI,SAAS,GAAG,MAAM;CAIpD,CAAA"}
1
+ {"version":3,"file":"inputStyle.d.ts","sourceRoot":"","sources":["../../../src/components/inputStyle.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAE1C,eAAO,MAAM,uBAAuB,4ZAUnC,CAAA;AAGD,eAAO,MAAM,uBAAuB,EAAE;KAAG,GAAG,IAAI,SAAS,GAAG,MAAM;CAwBjE,CAAA;AAED,eAAO,MAAM,yBAAyB,yFAMrC,CAAA;AAGD,eAAO,MAAM,yBAAyB,EAAE;KAAG,GAAG,IAAI,SAAS,GAAG,MAAM;CAsBnE,CAAA;AAGD,eAAO,MAAM,UAAU,EAAE;KAAG,GAAG,IAAI,SAAS,GAAG,MAAM;CAIpD,CAAA"}
@@ -1,4 +1,3 @@
1
1
  export { Checkbox, Radio, Select, FileInput, Input, Textarea, LabelControl, FieldsetControl } from './components';
2
- export type { CheckboxProps, RadioProps, SelectProps, FileInputProps, InputProps, TextareaProps, LabelControlProps, FieldsetControlProps } from './components';
3
2
  export { CheckboxGroup, RadioGroup } from './components/controlled';
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,eAAe,EAChB,MAAM,cAAc,CAAA;AAErB,YAAY,EACV,aAAa,EACb,UAAU,EACV,WAAW,EACX,cAAc,EACd,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,eAAe,EAChB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sakura-ui/forms",
3
- "version": "0.2.1",
3
+ "version": "0.2.2-beta.1",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "glassonion1",
@@ -38,21 +38,24 @@
38
38
  "build:types": "tsc && tsc-alias",
39
39
  "test": "vitest"
40
40
  },
41
+ "dependencies": {
42
+ "@sakura-ui/helper": "workspace:*"
43
+ },
41
44
  "peerDependencies": {
42
45
  "react": "^18.2.0",
43
46
  "react-dom": "^18.2.0",
44
- "tailwindcss": "^3.2.7"
47
+ "tailwindcss": "^3.4.5"
45
48
  },
46
49
  "devDependencies": {
47
50
  "@testing-library/jest-dom": "^6.4.5",
48
51
  "@testing-library/react": "^16.0.0",
49
- "@types/react": "^18.3.3",
50
- "@types/react-dom": "^18.3.0",
51
- "autoprefixer": "^10.4.19",
52
+ "@types/react": "catalog:",
53
+ "@types/react-dom": "catalog:",
54
+ "autoprefixer": "catalog:",
52
55
  "happy-dom": "^14.12.0",
53
- "postcss": "^8.4.38",
54
- "react": "^18.3.1",
55
- "react-dom": "^18.3.1",
56
- "tailwindcss": "^3.4.3"
56
+ "postcss": "catalog:",
57
+ "react": "catalog:",
58
+ "react-dom": "catalog:",
59
+ "tailwindcss": "catalog:"
57
60
  }
58
61
  }
@@ -1,2 +0,0 @@
1
- export declare const cx: (...classNames: any[]) => string;
2
- //# sourceMappingURL=class.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"class.d.ts","sourceRoot":"","sources":["../../../src/utils/class.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,EAAE,kBAAmB,GAAG,EAAE,WAAyC,CAAA"}