@trackunit/react-components 0.0.115 → 0.0.118

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.
@@ -35,8 +35,8 @@ export interface CardProps extends CommonProps {
35
35
  onMouseLeave?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
36
36
  }
37
37
  /**
38
- * The Card component is a container for ui elements, and is the main component of the modal.
39
- * To get the most out of the Card use it in combination with the CardHeader, CardBody and CardFooter.
38
+ * The Card component is a container for UI elements, and is the main component of the modal.
39
+ * To get the most out of the Card, use it in combination with the CardHeader, CardBody and CardFooter.
40
40
  *
41
41
  * @param {CardProps} props - The props for the Card component
42
42
  * @returns {JSX.Element} Card component
@@ -41,7 +41,9 @@ export interface IconProps extends CommonProps {
41
41
  style?: Record<string, string>;
42
42
  }
43
43
  /**
44
- * The Icon component is ued to display an Icon.
44
+ * - The Icon component is used to display an Icon.
45
+ * - Icons are semantic vector graphics that adds character and improves the visual appeal of elements when combined with.
46
+ * - All the [HeroIcons](https://heroicons.dev/) as well as custom TrackUnit icons are available.
45
47
  *
46
48
  * @param {IconProps} props - The props for the Icon component
47
49
  * @returns {JSX.Element} Icon component
@@ -2,6 +2,7 @@ import * as React from "react";
2
2
  import { CommonProps } from "../../common";
3
3
  import { FormGroupProps } from "../FormGroup/FormGroup";
4
4
  import { TextAreaProps } from "../TextArea/TextArea";
5
+ import "../TextArea/TextArea.css";
5
6
  declare type FormGroupExposedProps = Pick<FormGroupProps, "label" | "tip" | "helpText" | "helpAddon">;
6
7
  export interface TextAreaFieldProps extends TextAreaProps, FormGroupExposedProps, CommonProps {
7
8
  /**
package/index.css CHANGED
@@ -163,6 +163,31 @@
163
163
  }
164
164
  }
165
165
 
166
+ .tu-textarea {
167
+ @apply tu-input-base
168
+ block
169
+ overflow-auto
170
+ appearance-none
171
+ px-3
172
+ py-2
173
+ bg-transparent
174
+ text-base
175
+ text-slate-900
176
+ placeholder-slate-400
177
+ focus-visible:outline-none
178
+ w-full
179
+ h-20
180
+ transition;
181
+
182
+ &--invalid {
183
+ @apply tu-input--invalid;
184
+ }
185
+
186
+ &--disabled {
187
+ @apply tu-input--disabled;
188
+ }
189
+ }
190
+
166
191
  /* CSS related to the toggle component */
167
192
  .tu-toggle {
168
193
  @apply rounded-full
package/index.js CHANGED
@@ -341,7 +341,9 @@ const IconSizeClassMap = {
341
341
 
342
342
  };
343
343
  /**
344
- * The Icon component is ued to display an Icon.
344
+ * - The Icon component is used to display an Icon.
345
+ * - Icons are semantic vector graphics that adds character and improves the visual appeal of elements when combined with.
346
+ * - All the [HeroIcons](https://heroicons.dev/) as well as custom TrackUnit icons are available.
345
347
  *
346
348
  * @param {IconProps} props - The props for the Icon component
347
349
  * @returns {JSX.Element} Icon component
@@ -681,7 +683,7 @@ const Alert = ({
681
683
  });
682
684
  React.useEffect(() => {
683
685
  if (autoScroll) {
684
- ref && ref.current && ref.current.scrollIntoView();
686
+ ref && ref.current && ref.current.scrollIntoView && ref.current.scrollIntoView();
685
687
  }
686
688
  }, [ref, autoScroll]);
687
689
  return jsxs(Container$7, Object.assign({
@@ -958,8 +960,8 @@ const InputContainer = tw.div`
958
960
 
959
961
  const ROLE_CARD = "region";
960
962
  /**
961
- * The Card component is a container for ui elements, and is the main component of the modal.
962
- * To get the most out of the Card use it in combination with the CardHeader, CardBody and CardFooter.
963
+ * The Card component is a container for UI elements, and is the main component of the modal.
964
+ * To get the most out of the Card, use it in combination with the CardHeader, CardBody and CardFooter.
963
965
  *
964
966
  * @param {CardProps} props - The props for the Card component
965
967
  * @returns {JSX.Element} Card component
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "0.0.115",
3
+ "version": "0.0.118",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "dependencies": {