@helpscout/ui-kit-react 0.1.0 → 0.1.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.
- package/dist/lib/components/input/input.d.ts +16 -0
- package/dist/lib/components/input/input.d.ts.map +1 -0
- package/dist/lib/components/input/input.test.d.ts +2 -0
- package/dist/lib/components/input/input.test.d.ts.map +1 -0
- package/dist/lib/components/numberfield/numberfield.d.ts +8 -0
- package/dist/lib/components/numberfield/numberfield.d.ts.map +1 -0
- package/dist/lib/components/numberfield/numberfield.test.d.ts +2 -0
- package/dist/lib/components/numberfield/numberfield.test.d.ts.map +1 -0
- package/dist/lib/components/text/text.d.ts +1 -1
- package/dist/lib/components/text/text.utils.d.ts +1 -1
- package/dist/lib/components/text-field/text-field.d.ts +20 -0
- package/dist/lib/components/text-field/text-field.d.ts.map +1 -0
- package/dist/lib/components/text-field/text-field.test.d.ts +2 -0
- package/dist/lib/components/text-field/text-field.test.d.ts.map +1 -0
- package/dist/lib/components/validation-alert/validation-alert.d.ts +15 -0
- package/dist/lib/components/validation-alert/validation-alert.d.ts.map +1 -0
- package/dist/lib/components/validation-alert/validation-alert.test.d.ts +2 -0
- package/dist/lib/components/validation-alert/validation-alert.test.d.ts.map +1 -0
- package/dist/lib/ui-kit-react.d.ts +5 -0
- package/dist/lib/ui-kit-react.d.ts.map +1 -1
- package/dist/prop-types.json +1970 -115
- package/dist/ui-kit-react.css +1 -1
- package/dist/ui-kit-react.js +13017 -10851
- package/dist/ui-kit-react.umd.cjs +53 -53
- package/package.json +13 -13
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { type InputProps as RACInputProps } from "react-aria-components";
|
|
3
|
+
declare const inputStyles: (props?: ({
|
|
4
|
+
state?: "success" | "warning" | "error" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export type InputVariantProps = VariantProps<typeof inputStyles>;
|
|
7
|
+
export interface InputProps extends RACInputProps {
|
|
8
|
+
/** Changes the appearance of the input to indicate an error, success, or warning state. */
|
|
9
|
+
state?: InputVariantProps["state"];
|
|
10
|
+
}
|
|
11
|
+
export declare function Input({ className, disabled, state, ...props }: InputProps): JSX.Element;
|
|
12
|
+
export declare namespace Input {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../lib/components/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAGL,KAAK,UAAU,IAAI,aAAa,EACjC,MAAM,uBAAuB,CAAC;AA6B/B,QAAA,MAAM,WAAW;;8EAQf,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,OAAO,WAAW,CAAC,CAAC;AAEjE,MAAM,WAAW,UAAW,SAAQ,aAAa;IAC/C,2FAA2F;IAC3F,KAAK,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;CACpC;AAED,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CAiB1B;yBAtBe,KAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.test.d.ts","sourceRoot":"","sources":["../../../../lib/components/input/input.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type NumberFieldProps as RCANumberFieldProps } from "react-aria-components";
|
|
2
|
+
export interface NumberFieldProps extends RCANumberFieldProps {
|
|
3
|
+
}
|
|
4
|
+
export declare function NumberField({ className, ...props }: NumberFieldProps): JSX.Element;
|
|
5
|
+
export declare namespace NumberField {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=numberfield.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numberfield.d.ts","sourceRoot":"","sources":["../../../../lib/components/numberfield/numberfield.tsx"],"names":[],"mappings":"AAGA,OAAO,EAOL,KAAK,gBAAgB,IAAI,mBAAmB,EAC7C,MAAM,uBAAuB,CAAC;AAY/B,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;CAAG;AAEhE,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CA4BhC;yBA/Be,WAAW"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numberfield.test.d.ts","sourceRoot":"","sources":["../../../../lib/components/numberfield/numberfield.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
declare const textStyles: (props?: ({
|
|
3
|
-
tone?: "default" | "success" | "warning" | "error" | "critical" | "
|
|
3
|
+
tone?: "default" | "success" | "warning" | "error" | "critical" | "disabled" | "headline" | "dark" | "light" | "info" | null | undefined;
|
|
4
4
|
variant?: "heading-lg" | "heading-md" | "body-md-strong" | "body-md" | "body-sm" | null | undefined;
|
|
5
5
|
visuallyHidden?: boolean | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TextProps } from "./text";
|
|
2
2
|
export declare const mapPropDefaults: ({ as, variant, tone, }: Pick<TextProps, "as" | "variant" | "tone">) => {
|
|
3
3
|
variant: "heading-lg" | "heading-md" | "body-md-strong" | "body-md" | "body-sm";
|
|
4
|
-
tone: "default" | "success" | "warning" | "error" | "critical" | "
|
|
4
|
+
tone: "default" | "success" | "warning" | "error" | "critical" | "disabled" | "headline" | "dark" | "light" | "info";
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=text.utils.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type TextFieldProps as RACTextFieldProps } from "react-aria-components";
|
|
2
|
+
export interface TextFieldProps extends Omit<RACTextFieldProps, "isInvalid"> {
|
|
3
|
+
/** The label for the input. */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Shows a description under the label. */
|
|
6
|
+
description?: string;
|
|
7
|
+
/** Controls if the textfield is disabled. */
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
/** Shows a placeholder in the input. */
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
/** Shows a validation message under the input. */
|
|
12
|
+
validationMessage?: string;
|
|
13
|
+
/** Changes the appearance of the text field. */
|
|
14
|
+
validationState?: "error" | "success" | "warning";
|
|
15
|
+
}
|
|
16
|
+
export declare function TextField({ label, description, isRequired, placeholder, validationMessage, validationState, ...props }: TextFieldProps): JSX.Element;
|
|
17
|
+
export declare namespace TextField {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=text-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../../../lib/components/text-field/text-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,IAAI,iBAAiB,EACzC,MAAM,uBAAuB,CAAC;AAQ/B,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,iBAAiB,EAAE,WAAW,CAAC;IAC1E,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,kDAAkD;IAClD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,gDAAgD;IAChD,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;CACnD;AAED,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,WAAW,EACX,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,GAAG,KAAK,EACT,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAyB9B;yBAjCe,SAAS"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-field.test.d.ts","sourceRoot":"","sources":["../../../../lib/components/text-field/text-field.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
declare const validationAlertStyles: (props?: ({
|
|
3
|
+
state?: "success" | "warning" | "error" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export type ValidationAlertVariantProps = VariantProps<typeof validationAlertStyles>;
|
|
6
|
+
export interface ValidationAlertProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
/** Changes the appearance of the alert to indicate an error, success, or warning state. */
|
|
8
|
+
state?: ValidationAlertVariantProps["state"];
|
|
9
|
+
}
|
|
10
|
+
export declare function ValidationAlert({ children, className, state, ...props }: ValidationAlertProps): JSX.Element | null;
|
|
11
|
+
export declare namespace ValidationAlert {
|
|
12
|
+
var displayName: string;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=validation-alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-alert.d.ts","sourceRoot":"","sources":["../../../../lib/components/validation-alert/validation-alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,qBAAqB;;8EAQzB,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,YAAY,CACpD,OAAO,qBAAqB,CAC7B,CAAC;AAEF,MAAM,WAAW,oBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,2FAA2F;IAC3F,KAAK,CAAC,EAAE,2BAA2B,CAAC,OAAO,CAAC,CAAC;CAC9C;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,oBAAoB,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAa3C;yBAlBe,eAAe"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-alert.test.d.ts","sourceRoot":"","sources":["../../../../lib/components/validation-alert/validation-alert.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export { Badge, type BadgeProps, type BadgeVariantProps, } from "./components/badge/badge";
|
|
2
2
|
export { Button, type ButtonProps, type ButtonVariantProps, } from "./components/button/button";
|
|
3
3
|
export { Theme, type ThemeProps } from "./components/theme/theme";
|
|
4
|
+
export { Input, type InputProps, type InputVariantProps, } from "./components/input/input";
|
|
4
5
|
export { Label, LabelDescription, LabelGroup, type LabelProps, type LabelVariantProps, type LabelDescriptionProps, type LabelGroupProps, } from "./components/label/label";
|
|
5
6
|
export { Link, type LinkProps, type LinkVariantProps, } from "./components/link/link";
|
|
6
7
|
export { Text, type TextProps, type TextVariantProps, } from "./components/text/text";
|
|
8
|
+
export { TextField, type TextFieldProps, } from "./components/text-field/text-field";
|
|
7
9
|
export { Thumbnail, type ThumbnailProps, type ThumbnailVariantProps, } from "./components/thumbnail/thumbnail";
|
|
10
|
+
export { useFocusRing } from "./hooks/useFocusRing/useFocusRing";
|
|
11
|
+
export { ValidationAlert, type ValidationAlertProps, type ValidationAlertVariantProps, } from "./components/validation-alert/validation-alert";
|
|
12
|
+
export { NumberField, type NumberFieldProps, } from "./components/numberfield/numberfield";
|
|
8
13
|
//# sourceMappingURL=ui-kit-react.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-kit-react.d.ts","sourceRoot":"","sources":["../../lib/ui-kit-react.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,KAAK,UAAU,EACf,KAAK,iBAAiB,GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,kBAAkB,GACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,KAAK,EACL,gBAAgB,EAChB,UAAU,EACV,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,IAAI,EACJ,KAAK,SAAS,EACd,KAAK,gBAAgB,GACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,IAAI,EACJ,KAAK,SAAS,EACd,KAAK,gBAAgB,GACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,qBAAqB,GAC3B,MAAM,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"ui-kit-react.d.ts","sourceRoot":"","sources":["../../lib/ui-kit-react.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,KAAK,UAAU,EACf,KAAK,iBAAiB,GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,kBAAkB,GACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,KAAK,EACL,KAAK,UAAU,EACf,KAAK,iBAAiB,GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,KAAK,EACL,gBAAgB,EAChB,UAAU,EACV,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,IAAI,EACJ,KAAK,SAAS,EACd,KAAK,gBAAgB,GACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,IAAI,EACJ,KAAK,SAAS,EACd,KAAK,gBAAgB,GACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,SAAS,EACT,KAAK,cAAc,GACpB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,qBAAqB,GAC3B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EACL,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,GACjC,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,sCAAsC,CAAC"}
|