@grantbii/design-system 1.0.46 → 1.0.47

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.
@@ -0,0 +1,4 @@
1
+ declare const Textarea: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, {
2
+ $heightPixels?: number;
3
+ }>> & string;
4
+ export default Textarea;
@@ -0,0 +1,31 @@
1
+ import styled from "styled-components";
2
+ import { Colors } from "../foundations";
3
+ const Textarea = styled.textarea `
4
+ height: ${({ $heightPixels = 100 }) => $heightPixels}px;
5
+ padding: 12px 16px;
6
+ border-radius: 6px;
7
+
8
+ &:disabled {
9
+ background-color: ${Colors.neutral.grey4};
10
+ border: 1px solid ${Colors.neutral.grey3};
11
+ }
12
+
13
+ &:valid {
14
+ border: 1px solid ${Colors.neutral.grey3};
15
+ }
16
+
17
+ &:invalid {
18
+ border: 1px solid ${Colors.accent.red1};
19
+ }
20
+
21
+ &:focus&:valid {
22
+ border: 1px solid ${Colors.accent.blue1};
23
+ outline: 1px solid ${Colors.accent.blue1};
24
+ }
25
+
26
+ &:focus&:invalid {
27
+ border: 1px solid ${Colors.accent.red1};
28
+ outline: 1px solid ${Colors.accent.red1};
29
+ }
30
+ `;
31
+ export default Textarea;
@@ -3,3 +3,4 @@ export { default as BrandLogo } from "./BrandLogo";
3
3
  export { default as Button } from "./Button";
4
4
  export { default as LinkButton } from "./LinkButton";
5
5
  export { default as RadioButton } from "./RadioButton";
6
+ export { default as Textarea } from "./Textarea";
@@ -3,3 +3,4 @@ export { default as BrandLogo } from "./BrandLogo";
3
3
  export { default as Button } from "./Button";
4
4
  export { default as LinkButton } from "./LinkButton";
5
5
  export { default as RadioButton } from "./RadioButton";
6
+ export { default as Textarea } from "./Textarea";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grantbii/design-system",
3
- "version": "1.0.46",
3
+ "version": "1.0.47",
4
4
  "description": "Grantbii's Design System",
5
5
  "homepage": "https://design.grantbii.com",
6
6
  "repository": {
@@ -0,0 +1,7 @@
1
+ import { Textarea } from "@/.";
2
+ import { Meta, StoryObj } from "@storybook/nextjs-vite";
3
+ declare const meta: Meta<typeof Textarea>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const BasicExample: Story;
7
+ export declare const WithValidation: Story;
@@ -0,0 +1,16 @@
1
+ import { Textarea } from "@/.";
2
+ const meta = {
3
+ title: "Atoms/Textarea",
4
+ component: Textarea,
5
+ tags: ["autodocs"],
6
+ parameters: {
7
+ layout: "centered",
8
+ },
9
+ };
10
+ export default meta;
11
+ export const BasicExample = {
12
+ args: { placeholder: "Type here" },
13
+ };
14
+ export const WithValidation = {
15
+ args: { placeholder: "Must be at least 10 characters long", minLength: 10 },
16
+ };