@sequencing/design-system 0.0.34 → 0.0.36

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.
@@ -1,25 +1,25 @@
1
1
  import React, { PropsWithChildren } from "react";
2
- /**
3
- * Interface to customize the Link component
4
- *
5
- * @param {string=} hint - The hint to be displayed when hovering over the button
6
- * @param {"next"|"react"} behavior - Should it act like a React or a NextJs link
7
- * @param {"primary"|"secondary"|"outlined"} variant - Controls the look and feel of the button
8
- * @param {string} customClass - A class to be added for further customization
9
- * @param {Function} onClick - Called when a click is performed. The HTML event will be sent to this function
10
- *
11
- */
12
2
  export interface LinkProps {
13
- hint?: string;
3
+ /** Custom css class to customize the stylings */
14
4
  customClass?: string;
5
+ /** The hint to be displayed when hovering over the link */
6
+ hint?: string;
7
+ /**
8
+ * The look and feel of the link.
9
+ * Default: ``primary``
10
+ */
15
11
  variant?: "primary" | "secondary";
12
+ /** Called when a click is performed. The HTML event will be sent to this function.
13
+ * Use it to navigate the user to a different page.
14
+ */
16
15
  onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
17
16
  }
18
17
  /**
19
18
  * The Link component is used to render an anchor to navigate between SPA pages.
20
- * It supports both NextJs and React frameworks through the property ``behavior``.
21
- *
22
- * @param {LinkProps} props - Props to customize the Button component, see {@link LinkProps} for more info
19
+ * To support the different frameworks we have in our repo (React, NextJs, Gatsby),
20
+ * this component is just a wrapper around an HTML anchor and the navigation should be
21
+ * handle by the developer using the```onClick`` callback. Passed ``children`` will be
22
+ * rendered inside the anchor tag.
23
23
  *
24
24
  */
25
25
  declare const Link: ({ hint, children, customClass, variant, onClick, }: PropsWithChildren<LinkProps>) => React.JSX.Element;
@@ -10,18 +10,26 @@ import React, { PropsWithChildren } from "react";
10
10
  *
11
11
  */
12
12
  export interface TextFieldProps {
13
- value?: string;
14
- variant?: "primary";
15
- placeholder?: string;
13
+ /** Custom css class to customize the stylings */
16
14
  customClass?: string;
15
+ /** Placeholder when there's no text in the field */
16
+ placeholder?: string;
17
+ /** If ``true``, a small button will appear at the right side of the text field
18
+ * to clear its contents
19
+ */
17
20
  showClearButton?: boolean;
21
+ /** Text to render in the field */
22
+ value?: string;
23
+ /**
24
+ * The look and feel of the link.
25
+ * Default: ``primary``
26
+ */
27
+ variant?: "primary";
28
+ /** Callback called when the text is updated */
18
29
  onChange?: (value: string) => void;
19
30
  }
20
31
  /**
21
- * The Link component is used to render an anchor to navigate between SPA pages.
22
- * It supports both NextJs and React frameworks through the property ``behavior``.
23
- *
24
- * @param {TextFieldProps} props - Props to customize the Button component, see {@link TextFieldProps} for more info
32
+ * The Text Field component renders a simple input field with SDS stylings applied.
25
33
  *
26
34
  */
27
35
  declare const TextField: ({ value, customClass, placeholder, showClearButton, variant, onChange, }: PropsWithChildren<TextFieldProps>) => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sequencing/design-system",
3
- "version": "0.0.34",
3
+ "version": "0.0.36",
4
4
  "private": false,
5
5
  "description": "Sequencing Design System",
6
6
  "publishConfig": {