@helpscout/ui-kit-react 0.1.4 → 0.1.5

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.
@@ -2,14 +2,19 @@
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  import { type InputProps as RACInputProps } from "react-aria-components";
4
4
  declare const inputStyles: (props?: ({
5
+ align?: "left" | "right" | null | undefined;
5
6
  state?: "success" | "warning" | "error" | null | undefined;
6
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
8
  export type InputVariantProps = VariantProps<typeof inputStyles>;
8
9
  export interface InputProps extends RACInputProps {
10
+ /** Change the alignment of the input text. */
11
+ align?: InputVariantProps["align"];
12
+ /** Render the input with a prefix. */
13
+ prefix?: string;
9
14
  /** Changes the appearance of the input to indicate an error, success, or warning state. */
10
15
  state?: InputVariantProps["state"];
11
16
  }
12
- export declare function Input({ className, disabled, state, ...props }: InputProps): JSX.Element;
17
+ export declare function Input({ className, align, disabled, prefix, state, ...props }: InputProps): JSX.Element;
13
18
  export declare namespace Input {
14
19
  var displayName: string;
15
20
  }
@@ -1 +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"}
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;AA+B/B,QAAA,MAAM,WAAW;;;8EAYf,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,OAAO,WAAW,CAAC,CAAC;AAEjE,MAAM,WAAW,UAAW,SAAQ,aAAa;IAC/C,8CAA8C;IAC9C,KAAK,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAEnC,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,2FAA2F;IAC3F,KAAK,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;CACpC;AAED,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,KAAc,EACd,QAAQ,EACR,MAAM,EACN,KAAK,EACL,GAAG,KAAK,EACT,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CAsB1B;yBA7Be,KAAK"}
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import { type MenuItemProps as MenuItemRACProps, MenuTrigger } from "react-aria-components";
3
+ interface MenuProps {
4
+ /** Optional class name to apply to the menu. */
5
+ className?: string;
6
+ /** The children to render in the menu. */
7
+ children: React.ReactNode;
8
+ /** Optional array of keys to disable. */
9
+ disabledKeys?: Array<string | number>;
10
+ /** Handler that is called when an item is selected. */
11
+ onAction: (key: string | number) => void;
12
+ }
13
+ declare function Menu({ className, ...props }: MenuProps): import("react/jsx-runtime").JSX.Element;
14
+ interface MenuItemProps extends MenuItemRACProps {
15
+ /** Whether the menu item is disabled. */
16
+ isDisabled?: boolean;
17
+ }
18
+ declare function MenuItem({ className, isDisabled, ...props }: MenuItemProps): import("react/jsx-runtime").JSX.Element;
19
+ export { Menu, MenuItem, MenuTrigger, type MenuProps };
20
+ //# sourceMappingURL=menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../lib/components/menu/menu.tsx"],"names":[],"mappings":";AACA,OAAO,EAEL,KAAK,aAAa,IAAI,gBAAgB,EAEtC,WAAW,EAEZ,MAAM,uBAAuB,CAAC;AAI/B,UAAU,SAAS;IACjB,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,0CAA0C;IAC1C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B,yCAAyC;IACzC,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAEtC,uDAAuD;IACvD,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,2CAM/C;AAED,UAAU,aAAc,SAAQ,gBAAgB;IAC9C,yCAAyC;IACzC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,2CAWnE;AAED,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=menu.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu.test.d.ts","sourceRoot":"","sources":["../../../../lib/components/menu/menu.test.tsx"],"names":[],"mappings":""}
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  declare const textStyles: (props?: ({
4
- tone?: "default" | "success" | "warning" | "error" | "critical" | "disabled" | "headline" | "dark" | "light" | "info" | null | undefined;
5
- variant?: "heading-lg" | "heading-md" | "body-md-strong" | "body-md" | "body-sm" | null | undefined;
4
+ tone?: "default" | "success" | "warning" | "error" | "critical" | "headline" | "dark" | "light" | "disabled" | "info" | null | undefined;
5
+ variant?: "heading-md" | "heading-lg" | "body-md-strong" | "body-md" | "body-sm" | null | undefined;
6
6
  visuallyHidden?: boolean | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  export type TextVariantProps = VariantProps<typeof textStyles>;
@@ -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
- variant: "heading-lg" | "heading-md" | "body-md-strong" | "body-md" | "body-sm";
4
- tone: "default" | "success" | "warning" | "error" | "critical" | "disabled" | "headline" | "dark" | "light" | "info";
3
+ variant: "heading-md" | "heading-lg" | "body-md-strong" | "body-md" | "body-sm";
4
+ tone: "default" | "success" | "warning" | "error" | "critical" | "headline" | "dark" | "light" | "disabled" | "info";
5
5
  };
6
6
  //# sourceMappingURL=text.utils.d.ts.map
@@ -1,6 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { type TextFieldProps as RACTextFieldProps } from "react-aria-components";
3
+ import { type InputProps } from "../input/input";
3
4
  export interface TextFieldProps extends Omit<RACTextFieldProps, "isInvalid"> {
5
+ /** Change the alignment of the input text. */
6
+ align?: InputProps["align"];
4
7
  /** The label for the input. */
5
8
  label?: string;
6
9
  /** Shows a description under the label. */
@@ -9,6 +12,8 @@ export interface TextFieldProps extends Omit<RACTextFieldProps, "isInvalid"> {
9
12
  isDisabled?: boolean;
10
13
  /** Shows a placeholder in the input. */
11
14
  placeholder?: string;
15
+ /** Render the input with a prefix. */
16
+ prefix?: InputProps["prefix"];
12
17
  /** Shows a validation message under the input. */
13
18
  validationMessage?: string;
14
19
  /** Changes the appearance of the text field. */
@@ -1 +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"}
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;AAI/B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAIxD,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,iBAAiB,EAAE,WAAW,CAAC;IAC1E,8CAA8C;IAC9C,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAE5B,+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,sCAAsC;IACtC,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAE9B,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,CA2B9B;yBAnCe,SAAS"}
@@ -2,18 +2,19 @@ export { Badge, type BadgeProps, type BadgeVariantProps, } from "./components/ba
2
2
  export { Button, type ButtonProps, type ButtonVariantProps, } from "./components/button/button";
3
3
  export { ButtonGroup, ButtonGroupItem, type ButtonGroupProps, type ButtonGroupItemProps, } from "./components/button-group/button-group";
4
4
  export { Divider, type DividerProps } from "./components/divider/divider";
5
- export { Theme, type ThemeProps } from "./components/theme/theme";
5
+ export { Icon, type IconProps, type IconVariantProps, } from "./components/icon/icon";
6
6
  export { Input, type InputProps, type InputVariantProps, } from "./components/input/input";
7
7
  export { Label, LabelDescription, LabelGroup, type LabelProps, type LabelVariantProps, type LabelDescriptionProps, type LabelGroupProps, } from "./components/label/label";
8
8
  export { Link, type LinkProps, type LinkVariantProps, } from "./components/link/link";
9
- export { Icon, type IconProps, type IconVariantProps, } from "./components/icon/icon";
9
+ export { List, ListItem, type ListProps, type ListVariantProps, } from "./components/list/list";
10
+ export { Menu, MenuItem, MenuTrigger, type MenuProps, } from "./components/menu/menu";
10
11
  export { NumberField, type NumberFieldProps, } from "./components/number-field/number-field";
11
12
  export { Text, type TextProps, type TextVariantProps, } from "./components/text/text";
12
13
  export { TextArea, type TextAreaProps, type TextAreaVariantProps, } from "./components/text-area/text-area";
13
14
  export { TextAreaField, type TextAreaFieldProps, } from "./components/text-area-field/text-area-field";
14
15
  export { TextField, type TextFieldProps, } from "./components/text-field/text-field";
16
+ export { Theme, type ThemeProps } from "./components/theme/theme";
15
17
  export { Thumbnail, type ThumbnailProps, type ThumbnailVariantProps, } from "./components/thumbnail/thumbnail";
16
- export { List, ListItem, type ListProps, type ListVariantProps, } from "./components/list/list";
17
18
  export { useFocusRing } from "./hooks/useFocusRing/useFocusRing";
18
19
  export { ValidationAlert, type ValidationAlertProps, type ValidationAlertVariantProps, } from "./components/validation-alert/validation-alert";
19
20
  //# 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,EACL,WAAW,EACX,eAAe,EACf,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,GAC1B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC1E,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,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,IAAI,EACJ,KAAK,SAAS,EACd,KAAK,gBAAgB,GACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,oBAAoB,GAC1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,aAAa,EACb,KAAK,kBAAkB,GACxB,MAAM,8CAA8C,CAAC;AACtD,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,EACL,IAAI,EACJ,QAAQ,EACR,KAAK,SAAS,EACd,KAAK,gBAAgB,GACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EACL,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,GACjC,MAAM,gDAAgD,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,EACL,WAAW,EACX,eAAe,EACf,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,GAC1B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EACL,IAAI,EACJ,KAAK,SAAS,EACd,KA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