-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add generated types * chore: remove prop-types peer-dep & declarations * jsx preserve * feat: expose component prop types as export * fix: `Group.displayName` type
- Loading branch information
1 parent
4a4523a
commit f254352
Showing
30 changed files
with
429 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.fixture.js | ||
*.mock.js | ||
*.spec.js | ||
*.test.jsx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export default function composeData(values: ComposedData, element: HTMLButtonElement | HTMLFieldSetElement | HTMLInputElement | HTMLObjectElement | HTMLOutputElement | HTMLSelectElement | HTMLTextAreaElement, i: Int, collection: HTMLFormControlsCollection): ComposedData; | ||
export namespace FIELD_TAGS { | ||
let FIELDSET: "fieldset"; | ||
let INPUT: "input"; | ||
let SELECT: "select"; | ||
let TEXTAREA: "textarea"; | ||
} | ||
export type Int = number; | ||
export type ComposedData = { | ||
[k: string]: string | number | boolean | (string | number)[] | FileList | ComposedData | null | undefined; | ||
}; | ||
export type FieldTag = (typeof FIELD_TAGS)[keyof typeof FIELD_TAGS]; | ||
//# sourceMappingURL=composeData.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export default function deepDiff(oldVals: any, newVals: any, delta?: Record<string, never>): import('./composeData.js').ComposedData; | ||
//# sourceMappingURL=deepDiff.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
declare function Button({ appearance, children: label, className, fluid, icon: Icon, type, variant, ...others }: ButtonProps & import("react").BaseHTMLAttributes<any>): JSX.Element; | ||
declare namespace Button { | ||
let displayName: "Form5Button"; | ||
namespace APPEARANCES { | ||
let AFFIRMING: "affirming"; | ||
let BASIC: "basic"; | ||
let DANGER: "danger"; | ||
let PRIMARY: "primary"; | ||
let WARNING: "warning"; | ||
} | ||
namespace TYPES { | ||
let BUTTON: "button"; | ||
let RESET: "reset"; | ||
let SUBMIT: "submit"; | ||
} | ||
namespace VARIANTS { | ||
let CTA: "cta"; | ||
let GLYPH: "glyph"; | ||
} | ||
function Group({ className, ...props }: import("../Group/Group.jsx").GroupProps & import("react").HTMLAttributes<HTMLElement>): JSX.Element; | ||
} | ||
export default Button; | ||
export { styles as buttonClasses }; | ||
export type React = typeof import("react"); | ||
export type ButtonProps = { | ||
appearance?: Appearance | undefined; | ||
disabled?: boolean | undefined; | ||
children?: React.ReactNode; | ||
fluid?: boolean | undefined; | ||
icon?: React.ReactNode; | ||
type?: "button" | "reset" | "submit" | undefined; | ||
variant?: Variant | undefined; | ||
}; | ||
export type Appearance = (typeof Button.APPEARANCES)[keyof typeof Button.APPEARANCES]; | ||
export type Type = (typeof Button.TYPES)[keyof typeof Button.TYPES]; | ||
export type Variant = (typeof Button.VARIANTS)[keyof typeof Button.VARIANTS]; | ||
//# sourceMappingURL=Button.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
declare function Field({ appearance, arrangement, as: Tag, className, fluid, id, label, name, onBlur, onChange, options, readOnly, required, type, variant, ...others }: FieldProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'>): JSX.Element; | ||
declare namespace Field { | ||
let displayName: "Form5Field"; | ||
namespace ARRANGEMENTS { | ||
let COMPACT: "compact"; | ||
let INLINE: "inline"; | ||
let STACKED: "stacked"; | ||
let STAND_ALONE: "stand-alone"; | ||
} | ||
namespace VARIANTS { | ||
let CTA: "cta"; | ||
let GLYPH: "glyph"; | ||
let TOGGLE: "toggle"; | ||
} | ||
} | ||
export default Field; | ||
export { styles as inputClasses }; | ||
export type React = typeof import("react"); | ||
export type FieldProps = { | ||
appearance?: import("../Button/Button.jsx").Appearance | undefined; | ||
arrangement?: Arrangement | undefined; | ||
as?: import("react").ElementType<any> | undefined; | ||
fluid?: boolean | undefined; | ||
label: React.ReactNode; | ||
name: HTMLInputElement['name']; | ||
onBlur?: ((event: React.FocusEvent<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>) => void) | undefined; | ||
onChange?: ((change: { | ||
id: string; | ||
name: string; | ||
value: boolean | number | string; | ||
}, event: React.ChangeEvent<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>) => void) | undefined; | ||
options?: Record<string, import("react").ReactNode> | undefined; | ||
variant?: Variant | undefined; | ||
}; | ||
export type Arrangement = (typeof Field.ARRANGEMENTS)[keyof typeof Field.ARRANGEMENTS]; | ||
export type Variant = (typeof Field.VARIANTS)[keyof typeof Field.VARIANTS]; | ||
//# sourceMappingURL=Field.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.