@geotab/zenith 3.0.0-beta.2 → 3.0.0-beta.3

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,7 +2,7 @@ import * as React from "react";
2
2
  import { TButton, THTMLButtonType } from "./buttonType";
3
3
  import "./button.less";
4
4
  import { IZenComponentProps } from "../commonHelpers/zenComponent";
5
- import { RefObject } from "react";
5
+ import { Ref } from "react";
6
6
  export interface IButton extends IZenComponentProps {
7
7
  id?: string;
8
8
  title?: string;
@@ -19,7 +19,7 @@ export interface IButton extends IZenComponentProps {
19
19
  htmlType?: THTMLButtonType;
20
20
  target?: React.HTMLAttributeAnchorTarget;
21
21
  rel?: string;
22
- ref?: RefObject<HTMLButtonElement | null>;
22
+ ref?: Ref<HTMLButtonElement | null>;
23
23
  }
24
24
  export declare const Button: {
25
25
  ({ className, type, disabled, id, title, onClick, onMouseOver, onMouseOut, onMouseDown, onMouseUp, onKeyDown, onKeyUp, children, link, target, htmlType, rel, ref, ...other }: IButton): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,8 @@
1
- import React, { RefCallback, RefObject } from "react";
1
+ import React from "react";
2
2
  import "./formField.less";
3
3
  export interface IFormField {
4
4
  className?: string;
5
5
  inputClassName?: string;
6
- ref?: RefObject<HTMLElement | null> | RefCallback<HTMLElement | null>;
7
6
  error?: string;
8
7
  assistive?: string;
9
8
  counter?: string;
@@ -1,4 +1,4 @@
1
- import { RefCallback, RefObject } from "react";
1
+ import { Ref } from "react";
2
2
  import { IListState } from "../selectList/selectList";
3
3
  import { ISelectListItem } from "../selectList/selectListItem";
4
4
  import "./selectRaw.less";
@@ -15,7 +15,7 @@ export interface ISelectRaw extends IZenComponentProps {
15
15
  forceSelection?: boolean;
16
16
  isError?: boolean;
17
17
  onChange?: (id: string | undefined) => void;
18
- ref?: RefObject<HTMLDivElement | null> | RefCallback<HTMLDivElement | null>;
18
+ ref?: Ref<HTMLDivElement | null>;
19
19
  }
20
20
  export interface ISelectStateRaw extends IListState {
21
21
  expanded: boolean;
@@ -1,9 +1,7 @@
1
- import { RefObject } from "react";
2
1
  import { TFormFieldComponentProps } from "../formField/formField";
3
2
  import { ITextInputRaw } from "../textInputRaw/textInputRaw";
4
3
  type TFormInput = TFormFieldComponentProps<ITextInputRaw>;
5
- export interface ITextInput extends Omit<TFormInput, "counter" | "ref"> {
6
- ref?: RefObject<HTMLInputElement | null>;
4
+ export interface ITextInput extends Omit<TFormInput, "counter"> {
7
5
  }
8
6
  export declare const TextInput: {
9
7
  ({ maxLength, ...props }: ITextInput): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import "./textInputRaw.less";
3
3
  import { IZenComponentProps } from "../commonHelpers/zenComponent";
4
- import { RefCallback, RefObject } from "react";
4
+ import { Ref } from "react";
5
5
  export interface ITextInputRaw extends IZenComponentProps {
6
6
  id?: string;
7
7
  value: string;
@@ -20,6 +20,6 @@ export interface ITextInputRaw extends IZenComponentProps {
20
20
  ariaLabelledby?: string;
21
21
  ariaLabel?: string;
22
22
  autoFocus?: boolean;
23
- ref?: RefObject<HTMLInputElement | null> | RefCallback<HTMLInputElement | null>;
23
+ ref?: Ref<HTMLInputElement | null>;
24
24
  }
25
25
  export declare const TextInputRaw: (props: ITextInputRaw) => import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import "../textInputRaw/textInputRaw.less";
3
3
  import { IZenComponentProps } from "../commonHelpers/zenComponent";
4
4
  import "./textareaRaw.less";
5
- import { RefCallback, RefObject } from "react";
5
+ import { Ref } from "react";
6
6
  export interface ITextareaRaw extends IZenComponentProps {
7
7
  id?: string;
8
8
  value: string;
@@ -19,7 +19,7 @@ export interface ITextareaRaw extends IZenComponentProps {
19
19
  ariaLabel?: string;
20
20
  resize?: boolean;
21
21
  readonly?: boolean;
22
- ref?: RefObject<HTMLTextAreaElement | null> | RefCallback<HTMLTextAreaElement | null>;
22
+ ref?: Ref<HTMLTextAreaElement | null>;
23
23
  }
24
24
  export declare const TextareaRaw: {
25
25
  ({ id, rows, maxLength, className, value, resize, readonly, placeholder, disabled, isError, ariaLabel, ariaLabelledby, onChange, onKeyDown, onFocus, onBlur, ref }: ITextareaRaw): import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { TButton, THTMLButtonType } from "./buttonType";
3
3
  import "./button.less";
4
4
  import { IZenComponentProps } from "../commonHelpers/zenComponent";
5
- import { RefObject } from "react";
5
+ import { Ref } from "react";
6
6
  export interface IButton extends IZenComponentProps {
7
7
  id?: string;
8
8
  title?: string;
@@ -19,7 +19,7 @@ export interface IButton extends IZenComponentProps {
19
19
  htmlType?: THTMLButtonType;
20
20
  target?: React.HTMLAttributeAnchorTarget;
21
21
  rel?: string;
22
- ref?: RefObject<HTMLButtonElement | null>;
22
+ ref?: Ref<HTMLButtonElement | null>;
23
23
  }
24
24
  export declare const Button: {
25
25
  ({ className, type, disabled, id, title, onClick, onMouseOver, onMouseOut, onMouseDown, onMouseUp, onKeyDown, onKeyUp, children, link, target, htmlType, rel, ref, ...other }: IButton): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,8 @@
1
- import React, { RefCallback, RefObject } from "react";
1
+ import React from "react";
2
2
  import "./formField.less";
3
3
  export interface IFormField {
4
4
  className?: string;
5
5
  inputClassName?: string;
6
- ref?: RefObject<HTMLElement | null> | RefCallback<HTMLElement | null>;
7
6
  error?: string;
8
7
  assistive?: string;
9
8
  counter?: string;
@@ -1,4 +1,4 @@
1
- import { RefCallback, RefObject } from "react";
1
+ import { Ref } from "react";
2
2
  import { IListState } from "../selectList/selectList";
3
3
  import { ISelectListItem } from "../selectList/selectListItem";
4
4
  import "./selectRaw.less";
@@ -15,7 +15,7 @@ export interface ISelectRaw extends IZenComponentProps {
15
15
  forceSelection?: boolean;
16
16
  isError?: boolean;
17
17
  onChange?: (id: string | undefined) => void;
18
- ref?: RefObject<HTMLDivElement | null> | RefCallback<HTMLDivElement | null>;
18
+ ref?: Ref<HTMLDivElement | null>;
19
19
  }
20
20
  export interface ISelectStateRaw extends IListState {
21
21
  expanded: boolean;
@@ -1,9 +1,7 @@
1
- import { RefObject } from "react";
2
1
  import { TFormFieldComponentProps } from "../formField/formField";
3
2
  import { ITextInputRaw } from "../textInputRaw/textInputRaw";
4
3
  type TFormInput = TFormFieldComponentProps<ITextInputRaw>;
5
- export interface ITextInput extends Omit<TFormInput, "counter" | "ref"> {
6
- ref?: RefObject<HTMLInputElement | null>;
4
+ export interface ITextInput extends Omit<TFormInput, "counter"> {
7
5
  }
8
6
  export declare const TextInput: {
9
7
  ({ maxLength, ...props }: ITextInput): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import "./textInputRaw.less";
3
3
  import { IZenComponentProps } from "../commonHelpers/zenComponent";
4
- import { RefCallback, RefObject } from "react";
4
+ import { Ref } from "react";
5
5
  export interface ITextInputRaw extends IZenComponentProps {
6
6
  id?: string;
7
7
  value: string;
@@ -20,6 +20,6 @@ export interface ITextInputRaw extends IZenComponentProps {
20
20
  ariaLabelledby?: string;
21
21
  ariaLabel?: string;
22
22
  autoFocus?: boolean;
23
- ref?: RefObject<HTMLInputElement | null> | RefCallback<HTMLInputElement | null>;
23
+ ref?: Ref<HTMLInputElement | null>;
24
24
  }
25
25
  export declare const TextInputRaw: (props: ITextInputRaw) => import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import "../textInputRaw/textInputRaw.less";
3
3
  import { IZenComponentProps } from "../commonHelpers/zenComponent";
4
4
  import "./textareaRaw.less";
5
- import { RefCallback, RefObject } from "react";
5
+ import { Ref } from "react";
6
6
  export interface ITextareaRaw extends IZenComponentProps {
7
7
  id?: string;
8
8
  value: string;
@@ -19,7 +19,7 @@ export interface ITextareaRaw extends IZenComponentProps {
19
19
  ariaLabel?: string;
20
20
  resize?: boolean;
21
21
  readonly?: boolean;
22
- ref?: RefObject<HTMLTextAreaElement | null> | RefCallback<HTMLTextAreaElement | null>;
22
+ ref?: Ref<HTMLTextAreaElement | null>;
23
23
  }
24
24
  export declare const TextareaRaw: {
25
25
  ({ id, rows, maxLength, className, value, resize, readonly, placeholder, disabled, isError, ariaLabel, ariaLabelledby, onChange, onKeyDown, onFocus, onBlur, ref }: ITextareaRaw): import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geotab/zenith",
3
- "version": "3.0.0-beta.2",
3
+ "version": "3.0.0-beta.3",
4
4
  "description": "Zenith components library on React",
5
5
  "main": "dist/index.js",
6
6
  "types": "esm/index.d.ts",
@@ -11,6 +11,9 @@
11
11
  "**/react-chartjs/dateAdapter.ts",
12
12
  "**/react-chartjs/dateAdapter.js"
13
13
  ],
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
14
17
  "scripts": {
15
18
  "test": "npm run clean && npm run test-build && jest",
16
19
  "start": "npm run storybook --loglevel verbose",
@@ -36,9 +39,6 @@
36
39
  "build-storybook": "storybook build && npm run build-ai-mdx",
37
40
  "clean": "rm -rf ./dist && rm -rf ./esm && rm -rf ./jest-coverage"
38
41
  },
39
- "publishConfig": {
40
- "access": "public"
41
- },
42
42
  "author": "",
43
43
  "license": "SEE LICENSE IN LICENSE.txt",
44
44
  "devDependencies": {