@windstream/react-shared-components 0.0.18 → 0.0.21

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.
Files changed (140) hide show
  1. package/dist/contentful/index.esm.js +1 -1
  2. package/dist/contentful/index.esm.js.map +1 -1
  3. package/dist/contentful/index.js +1 -1
  4. package/dist/contentful/index.js.map +1 -1
  5. package/dist/core.d.ts +34 -6
  6. package/dist/index.d.ts +33 -5
  7. package/dist/index.esm.js +5 -5
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/index.js +5 -5
  10. package/dist/index.js.map +1 -1
  11. package/dist/styles.css +1 -1
  12. package/dist/utils/index.esm.js.map +1 -1
  13. package/dist/utils/index.js.map +1 -1
  14. package/package.json +1 -1
  15. package/src/components/accordion/Accordion.stories.tsx +16 -11
  16. package/src/components/accordion/index.tsx +19 -8
  17. package/src/components/accordion/types.ts +8 -9
  18. package/src/components/alert-card/AlertCard.stories.tsx +4 -5
  19. package/src/components/alert-card/index.tsx +6 -9
  20. package/src/components/alert-card/types.ts +9 -9
  21. package/src/components/brand-button/BrandButton.stories.tsx +8 -10
  22. package/src/components/brand-button/helpers.ts +8 -8
  23. package/src/components/brand-button/index.tsx +28 -27
  24. package/src/components/brand-button/types.ts +6 -8
  25. package/src/components/button/Button.stories.tsx +6 -6
  26. package/src/components/button/index.tsx +3 -1
  27. package/src/components/button/types.ts +14 -14
  28. package/src/components/call-button/CallButton.stories.tsx +1 -1
  29. package/src/components/call-button/index.tsx +3 -4
  30. package/src/components/call-button/types.ts +1 -0
  31. package/src/components/checkbox/Checkbox.stories.tsx +6 -7
  32. package/src/components/checkbox/index.tsx +17 -7
  33. package/src/components/checkbox/types.ts +19 -16
  34. package/src/components/checklist/Checklist.stories.tsx +1 -2
  35. package/src/components/checklist/index.tsx +12 -6
  36. package/src/components/checklist/types.ts +5 -5
  37. package/src/components/collapse/Collapse.stories.tsx +18 -19
  38. package/src/components/collapse/index.tsx +1 -1
  39. package/src/components/collapse/types.ts +4 -4
  40. package/src/components/divider/Divider.stories.tsx +16 -17
  41. package/src/components/divider/index.tsx +2 -3
  42. package/src/components/divider/type.ts +2 -2
  43. package/src/components/image/Image.stories.tsx +113 -0
  44. package/src/components/image/index.tsx +22 -0
  45. package/src/components/image/types.ts +28 -0
  46. package/src/components/input/Input.stories.tsx +13 -46
  47. package/src/components/input/index.tsx +16 -15
  48. package/src/components/input/types.ts +1 -1
  49. package/src/components/link/Link.stories.tsx +1 -1
  50. package/src/components/link/index.tsx +1 -2
  51. package/src/components/link/types.ts +25 -25
  52. package/src/components/list/List.stories.tsx +1 -1
  53. package/src/components/list/index.tsx +86 -86
  54. package/src/components/list/list-item/index.tsx +36 -36
  55. package/src/components/list/list-item/types.ts +13 -13
  56. package/src/components/list/types.ts +29 -29
  57. package/src/components/material-icon/MaterialIcon.stories.tsx +1 -1
  58. package/src/components/material-icon/constants.ts +1 -1
  59. package/src/components/material-icon/index.tsx +44 -44
  60. package/src/components/material-icon/types.ts +31 -31
  61. package/src/components/modal/Modal.stories.tsx +9 -9
  62. package/src/components/modal/index.tsx +8 -14
  63. package/src/components/modal/types.ts +1 -1
  64. package/src/components/radio-button/RadioButton.stories.tsx +7 -7
  65. package/src/components/radio-button/index.tsx +11 -9
  66. package/src/components/radio-button/types.ts +18 -19
  67. package/src/components/see-more/SeeMore.stories.tsx +14 -15
  68. package/src/components/see-more/index.tsx +33 -29
  69. package/src/components/see-more/types.ts +3 -3
  70. package/src/components/select/Select.stories.tsx +3 -2
  71. package/src/components/select/index.tsx +15 -17
  72. package/src/components/select/types.ts +2 -1
  73. package/src/components/select-plan-button/SelectPlanButton.stories.tsx +20 -12
  74. package/src/components/select-plan-button/index.tsx +28 -20
  75. package/src/components/select-plan-button/types.ts +1 -1
  76. package/src/components/skeleton/Skeleton.stories.tsx +9 -10
  77. package/src/components/skeleton/index.tsx +61 -61
  78. package/src/components/skeleton/types.ts +3 -3
  79. package/src/components/spinner/Spinner.stories.tsx +1 -1
  80. package/src/components/spinner/index.tsx +1 -1
  81. package/src/components/spinner/types.ts +4 -4
  82. package/src/components/text/Text.stories.tsx +35 -16
  83. package/src/components/text/index.tsx +2 -5
  84. package/src/components/text/types.ts +45 -45
  85. package/src/components/tooltip/Tooltip.stories.tsx +15 -16
  86. package/src/components/tooltip/index.tsx +1 -5
  87. package/src/components/tooltip/types.ts +4 -4
  88. package/src/components/view-cart-button/ViewCartButton.stories.tsx +23 -12
  89. package/src/components/view-cart-button/index.tsx +11 -6
  90. package/src/components/view-cart-button/types.ts +1 -1
  91. package/src/contentful/blocks/accordion/Accordion.stories.tsx +23 -0
  92. package/src/contentful/blocks/accordion/index.tsx +11 -1
  93. package/src/contentful/blocks/accordion/types.ts +1 -1
  94. package/src/contentful/blocks/button/Button.stories.tsx +40 -0
  95. package/src/contentful/blocks/button/index.tsx +15 -14
  96. package/src/contentful/blocks/button/types.ts +17 -17
  97. package/src/contentful/blocks/callout/Callout.stories.tsx +23 -0
  98. package/src/contentful/blocks/callout/index.tsx +9 -1
  99. package/src/contentful/blocks/callout/types.ts +1 -1
  100. package/src/contentful/blocks/cards/Cards.stories.tsx +23 -0
  101. package/src/contentful/blocks/cards/index.tsx +7 -1
  102. package/src/contentful/blocks/cards/types.ts +1 -1
  103. package/src/contentful/blocks/carousel/Carousel.stories.tsx +23 -0
  104. package/src/contentful/blocks/carousel/index.tsx +7 -1
  105. package/src/contentful/blocks/carousel/types.ts +1 -1
  106. package/src/contentful/blocks/cta-callout/CtaCallout.stories.tsx +46 -0
  107. package/src/contentful/blocks/cta-callout/index.tsx +5 -5
  108. package/src/contentful/blocks/cta-callout/types.ts +16 -16
  109. package/src/contentful/blocks/floating-banner/FloatingBanner.stories.tsx +23 -0
  110. package/src/contentful/blocks/floating-banner/index.tsx +6 -2
  111. package/src/contentful/blocks/floating-banner/types.ts +1 -1
  112. package/src/contentful/blocks/footer/Footer.stories.tsx +30 -0
  113. package/src/contentful/blocks/footer/index.tsx +8 -7
  114. package/src/contentful/blocks/footer/types.ts +7 -6
  115. package/src/contentful/blocks/image-promo-bar/ImagePromoBar.stories.tsx +23 -0
  116. package/src/contentful/blocks/image-promo-bar/index.tsx +2 -1
  117. package/src/contentful/blocks/image-promo-bar/types.ts +28 -28
  118. package/src/contentful/blocks/modal/Modal.stories.tsx +23 -0
  119. package/src/contentful/blocks/modal/index.tsx +8 -2
  120. package/src/contentful/blocks/modal/types.ts +1 -1
  121. package/src/contentful/blocks/navigation/Navigation.stories.tsx +23 -0
  122. package/src/contentful/blocks/navigation/index.tsx +6 -2
  123. package/src/contentful/blocks/navigation/types.ts +1 -1
  124. package/src/contentful/blocks/primary-hero/PrimaryHero.stories.tsx +23 -0
  125. package/src/contentful/blocks/primary-hero/index.tsx +4 -3
  126. package/src/contentful/blocks/primary-hero/types.ts +29 -29
  127. package/src/contentful/blocks/shape-background-wrapper/ShapeBackgroundWrapper.stories.tsx +26 -0
  128. package/src/contentful/blocks/shape-background-wrapper/index.tsx +107 -106
  129. package/src/contentful/blocks/shape-background-wrapper/types.ts +24 -23
  130. package/src/contentful/blocks/text/Text.stories.tsx +23 -0
  131. package/src/contentful/blocks/text/index.tsx +7 -1
  132. package/src/contentful/blocks/text/types.ts +1 -1
  133. package/src/contentful/index.ts +1 -1
  134. package/src/hooks/use-body-scroll-lock.ts +2 -1
  135. package/src/index.ts +14 -2
  136. package/src/setupTests.ts +46 -46
  137. package/src/stories/DocsTemplate.tsx +0 -2
  138. package/src/styles/globals.css +162 -162
  139. package/src/types/global.d.ts +9 -9
  140. package/src/utils/index.ts +34 -34
@@ -1,6 +1,6 @@
1
1
  import { Divider } from "./index";
2
- import { DocsPage } from "@shared/stories/DocsTemplate";
3
2
 
3
+ import { DocsPage } from "@shared/stories/DocsTemplate";
4
4
  import type { Meta, StoryObj } from "@storybook/react";
5
5
 
6
6
  const meta: Meta<typeof Divider> = {
@@ -37,7 +37,7 @@ export const Default: Story = {
37
37
  // Horizontal divider
38
38
  export const Horizontal: Story = {
39
39
  render: () => (
40
- <div className="w-full max-w-md space-y-4">
40
+ <div className="max-w-md w-full space-y-4">
41
41
  <p className="body2 text-text">Content above the divider</p>
42
42
  <Divider />
43
43
  <p className="body2 text-text">Content below the divider</p>
@@ -57,8 +57,8 @@ export const CustomStyling: Story = {
57
57
  args: {
58
58
  className: "h-0.5 bg-border-brand",
59
59
  },
60
- render: (args) => (
61
- <div className="w-full max-w-md space-y-4">
60
+ render: args => (
61
+ <div className="max-w-md w-full space-y-4">
62
62
  <p className="body2 text-text">Content above</p>
63
63
  <Divider {...args} />
64
64
  <p className="body2 text-text">Content below</p>
@@ -69,19 +69,19 @@ export const CustomStyling: Story = {
69
69
  // Multiple dividers
70
70
  export const Multiple: Story = {
71
71
  render: () => (
72
- <div className="w-full max-w-md space-y-4">
72
+ <div className="max-w-md w-full space-y-4">
73
73
  <div>
74
- <h3 className="subheading1 text-text mb-2">Section 1</h3>
74
+ <h3 className="subheading1 mb-2 text-text">Section 1</h3>
75
75
  <p className="body2 text-text">Content for section 1</p>
76
76
  </div>
77
77
  <Divider />
78
78
  <div>
79
- <h3 className="subheading1 text-text mb-2">Section 2</h3>
79
+ <h3 className="subheading1 mb-2 text-text">Section 2</h3>
80
80
  <p className="body2 text-text">Content for section 2</p>
81
81
  </div>
82
82
  <Divider />
83
83
  <div>
84
- <h3 className="subheading1 text-text mb-2">Section 3</h3>
84
+ <h3 className="subheading1 mb-2 text-text">Section 3</h3>
85
85
  <p className="body2 text-text">Content for section 3</p>
86
86
  </div>
87
87
  </div>
@@ -98,7 +98,7 @@ export const Multiple: Story = {
98
98
  // In list
99
99
  export const InList: Story = {
100
100
  render: () => (
101
- <div className="w-full max-w-md space-y-0 border border-border-default rounded">
101
+ <div className="max-w-md border-border-default w-full space-y-0 rounded border">
102
102
  <div className="p-4">
103
103
  <p className="body2 text-text">List item 1</p>
104
104
  </div>
@@ -126,8 +126,8 @@ export const Thick: Story = {
126
126
  args: {
127
127
  className: "h-1 bg-border-default",
128
128
  },
129
- render: (args) => (
130
- <div className="w-full max-w-md space-y-4">
129
+ render: args => (
130
+ <div className="max-w-md w-full space-y-4">
131
131
  <p className="body2 text-text">Content above</p>
132
132
  <Divider {...args} />
133
133
  <p className="body2 text-text">Content below</p>
@@ -140,8 +140,8 @@ export const Colored: Story = {
140
140
  args: {
141
141
  className: "h-0.5 bg-border-brand",
142
142
  },
143
- render: (args) => (
144
- <div className="w-full max-w-md space-y-4">
143
+ render: args => (
144
+ <div className="max-w-md w-full space-y-4">
145
145
  <p className="body2 text-text">Content above</p>
146
146
  <Divider {...args} />
147
147
  <p className="body2 text-text">Content below</p>
@@ -152,7 +152,7 @@ export const Colored: Story = {
152
152
  // All variants showcase
153
153
  export const AllVariants: Story = {
154
154
  render: () => (
155
- <div className="w-full max-w-2xl space-y-8">
155
+ <div className="max-w-2xl w-full space-y-8">
156
156
  <div>
157
157
  <h3 className="mb-3 text-lg font-semibold">Default Divider</h3>
158
158
  <div className="space-y-4">
@@ -173,13 +173,13 @@ export const AllVariants: Story = {
173
173
  <h3 className="mb-3 text-lg font-semibold">Thick Divider</h3>
174
174
  <div className="space-y-4">
175
175
  <p className="body2 text-text">Content above</p>
176
- <Divider className="h-1 bg-border-default" />
176
+ <Divider className="bg-border-default h-1" />
177
177
  <p className="body2 text-text">Content below</p>
178
178
  </div>
179
179
  </div>
180
180
  <div>
181
181
  <h3 className="mb-3 text-lg font-semibold">In List</h3>
182
- <div className="border border-border-default rounded">
182
+ <div className="border-border-default rounded border">
183
183
  <div className="p-4">
184
184
  <p className="body2 text-text">Item 1</p>
185
185
  </div>
@@ -203,4 +203,3 @@ export const AllVariants: Story = {
203
203
  },
204
204
  },
205
205
  };
206
-
@@ -1,16 +1,15 @@
1
1
  import React from "react";
2
+ import { DividerProps } from "./type";
2
3
 
3
4
  import { cx } from "@shared/utils";
4
5
 
5
- import { DividerProps } from "./type";
6
-
7
6
  export const Divider: React.FC<DividerProps> = (props: DividerProps) => {
8
7
  const { className, ...rest } = props;
9
8
 
10
9
  return (
11
10
  <div
12
11
  className={cx(
13
- "bg-bg-surface-tertiary-active h-[1px] border-t-0 opacity-100",
12
+ "h-[1px] border-t-0 bg-bg-surface-tertiary-active opacity-100",
14
13
  className
15
14
  )}
16
15
  {...rest}
@@ -1,3 +1,3 @@
1
1
  export type DividerProps = {
2
- className?: string;
3
- } & React.HTMLAttributes<HTMLDivElement>;
2
+ className?: string;
3
+ } & React.HTMLAttributes<HTMLDivElement>;
@@ -0,0 +1,113 @@
1
+ import { forwardRef } from "react";
2
+ import { Image } from "./index";
3
+ import type { ImageComponentProps } from "./types";
4
+
5
+ import { DocsPage } from "@shared/stories/DocsTemplate";
6
+ import type { Meta, StoryObj } from "@storybook/react";
7
+
8
+ const meta: Meta<typeof Image> = {
9
+ title: "Components/Image",
10
+ component: Image,
11
+ tags: ["autodocs"],
12
+ parameters: {
13
+ layout: "centered",
14
+ docs: {
15
+ page: DocsPage,
16
+ description: {
17
+ component:
18
+ "A reusable image component that renders a native img by default. Pass the `as` prop with a custom component (e.g. next/image) to use Next.js Image or another image component.",
19
+ },
20
+ },
21
+ },
22
+ argTypes: {
23
+ src: {
24
+ control: { type: "text" },
25
+ description: "Image source URL",
26
+ },
27
+ alt: {
28
+ control: { type: "text" },
29
+ description:
30
+ "Alt text (required for accessibility; use empty string for decorative images)",
31
+ },
32
+ width: {
33
+ control: { type: "number" },
34
+ description: "Image width",
35
+ },
36
+ height: {
37
+ control: { type: "number" },
38
+ description: "Image height",
39
+ },
40
+ className: {
41
+ control: { type: "text" },
42
+ description: "Custom CSS classes",
43
+ },
44
+ loading: {
45
+ control: { type: "select" },
46
+ options: ["lazy", "eager"],
47
+ description: "Loading behavior",
48
+ },
49
+ as: {
50
+ description:
51
+ "Custom component to render (e.g. next/image). In a Next.js app: import Image from 'next/image' then use <Image as={Image} src={...} alt={...} width={...} height={...} />",
52
+ control: false,
53
+ },
54
+ },
55
+ args: {
56
+ src: "https://placehold.co/400x300",
57
+ alt: "Placeholder image",
58
+ },
59
+ };
60
+
61
+ export default meta;
62
+ type Story = StoryObj<typeof meta>;
63
+
64
+ export const Default: Story = {
65
+ args: {},
66
+ };
67
+
68
+ export const WithDimensions: Story = {
69
+ args: {
70
+ src: "https://placehold.co/300x200",
71
+ alt: "Image with explicit dimensions",
72
+ width: 300,
73
+ height: 200,
74
+ },
75
+ };
76
+
77
+ export const WithClassName: Story = {
78
+ args: {
79
+ src: "https://placehold.co/400x300",
80
+ alt: "Styled image",
81
+ className: "rounded-lg object-cover shadow-md",
82
+ width: 400,
83
+ height: 300,
84
+ },
85
+ };
86
+
87
+ /** Mock component to demonstrate the `as` prop. In a Next.js app, pass next/image: <Image as={NextImage} ... /> */
88
+ const MockImageComponent = forwardRef<HTMLImageElement, ImageComponentProps>(
89
+ (props, ref) => <img ref={ref} {...props} />
90
+ );
91
+ MockImageComponent.displayName = "MockImageComponent";
92
+
93
+ export const WithCustomComponent: Story = {
94
+ render: args => (
95
+ <Image
96
+ {...args}
97
+ as={MockImageComponent}
98
+ src="https://placehold.co/350x150"
99
+ alt="Rendered via custom component (as prop)"
100
+ width={350}
101
+ height={150}
102
+ className="rounded border-2 border-dashed border-gray-300"
103
+ />
104
+ ),
105
+ parameters: {
106
+ docs: {
107
+ description: {
108
+ story:
109
+ "Use the `as` prop to render with a custom component. In Next.js, pass the Image component from next/image for optimized images.",
110
+ },
111
+ },
112
+ },
113
+ };
@@ -0,0 +1,22 @@
1
+ import { forwardRef } from "react";
2
+
3
+ import type { ImageProps } from "@shared/components/image/types";
4
+ import { cx } from "@shared/utils";
5
+
6
+ export const Image = forwardRef<HTMLImageElement, ImageProps>(
7
+ ({ as: ImageComponent, className = "", ...rest }, ref) => {
8
+ const combinedClassName = cx(className);
9
+
10
+ if (ImageComponent) {
11
+ return (
12
+ <ImageComponent ref={ref} className={combinedClassName} {...rest} />
13
+ );
14
+ }
15
+
16
+ return <img ref={ref} className={combinedClassName} {...rest} />;
17
+ }
18
+ );
19
+
20
+ Image.displayName = "Image";
21
+
22
+ export type { ImageProps, ImageComponentProps } from "./types";
@@ -0,0 +1,28 @@
1
+ import type { ComponentType, ImgHTMLAttributes } from "react";
2
+
3
+ /**
4
+ * Props passed to the custom image component when using the `as` prop.
5
+ * Covers native img attributes plus optional Next.js Image props (fill, sizes, priority, etc.).
6
+ */
7
+ export interface ImageComponentProps
8
+ extends Omit<ImgHTMLAttributes<HTMLImageElement>, "alt"> {
9
+ /** Image source URL */
10
+ src: string;
11
+ /** Alt text (required for accessibility; use "" for decorative images) */
12
+ alt: string;
13
+ /** Optional; used by Next.js Image when using fill layout */
14
+ fill?: boolean;
15
+ /** Optional; used by Next.js Image for responsive sizes */
16
+ sizes?: string;
17
+ /** Optional; used by Next.js Image for priority loading */
18
+ priority?: boolean;
19
+ /** Optional; used by Next.js Image for blur placeholder */
20
+ placeholder?: "blur" | "empty";
21
+ /** Optional; used by Next.js Image for quality (1–100) */
22
+ quality?: number;
23
+ }
24
+
25
+ export interface ImageProps extends ImageComponentProps {
26
+ /** Custom component to render instead of native img (e.g. next/image) */
27
+ as?: ComponentType<ImageComponentProps>;
28
+ }
@@ -1,6 +1,6 @@
1
1
  import { Input } from "./index";
2
- import { DocsPage } from "@shared/stories/DocsTemplate";
3
2
 
3
+ import { DocsPage } from "@shared/stories/DocsTemplate";
4
4
  import type { Meta, StoryObj } from "@storybook/react";
5
5
 
6
6
  const meta: Meta<typeof Input> = {
@@ -116,27 +116,15 @@ export const Error: Story = {
116
116
  // Different sizes
117
117
  export const Sizes: Story = {
118
118
  render: () => (
119
- <div className="w-full max-w-md space-y-4">
119
+ <div className="max-w-md w-full space-y-4">
120
120
  <div>
121
- <Input
122
- size="slim"
123
- placeholder="Slim input"
124
- label="Slim Size"
125
- />
121
+ <Input size="slim" placeholder="Slim input" label="Slim Size" />
126
122
  </div>
127
123
  <div>
128
- <Input
129
- size="medium"
130
- placeholder="Medium input"
131
- label="Medium Size"
132
- />
124
+ <Input size="medium" placeholder="Medium input" label="Medium Size" />
133
125
  </div>
134
126
  <div>
135
- <Input
136
- size="large"
137
- placeholder="Large input"
138
- label="Large Size"
139
- />
127
+ <Input size="large" placeholder="Large input" label="Large Size" />
140
128
  </div>
141
129
  </div>
142
130
  ),
@@ -201,7 +189,7 @@ export const Disabled: Story = {
201
189
  // Different states
202
190
  export const States: Story = {
203
191
  render: () => (
204
- <div className="w-full max-w-md space-y-4">
192
+ <div className="max-w-md w-full space-y-4">
205
193
  <div>
206
194
  <Input
207
195
  label="Default State"
@@ -210,18 +198,10 @@ export const States: Story = {
210
198
  />
211
199
  </div>
212
200
  <div>
213
- <Input
214
- label="Hover State"
215
- placeholder="Hover over me"
216
- state="hover"
217
- />
201
+ <Input label="Hover State" placeholder="Hover over me" state="hover" />
218
202
  </div>
219
203
  <div>
220
- <Input
221
- label="Focus State"
222
- placeholder="Focus on me"
223
- state="focus"
224
- />
204
+ <Input label="Focus State" placeholder="Focus on me" state="focus" />
225
205
  </div>
226
206
  <div>
227
207
  <Input
@@ -263,17 +243,9 @@ export const Phone: Story = {
263
243
  // Form example
264
244
  export const FormExample: Story = {
265
245
  render: () => (
266
- <form className="w-full max-w-md space-y-4">
267
- <Input
268
- label="First Name"
269
- placeholder="Enter your first name"
270
- required
271
- />
272
- <Input
273
- label="Last Name"
274
- placeholder="Enter your last name"
275
- required
276
- />
246
+ <form className="max-w-md w-full space-y-4">
247
+ <Input label="First Name" placeholder="Enter your first name" required />
248
+ <Input label="Last Name" placeholder="Enter your last name" required />
277
249
  <Input
278
250
  label="Email"
279
251
  placeholder="Enter your email"
@@ -287,11 +259,7 @@ export const FormExample: Story = {
287
259
  suffixIconName="visibility"
288
260
  required
289
261
  />
290
- <Input
291
- label="Phone Number"
292
- placeholder="(555) 123-4567"
293
- type="tel"
294
- />
262
+ <Input label="Phone Number" placeholder="(555) 123-4567" type="tel" />
295
263
  </form>
296
264
  ),
297
265
  parameters: {
@@ -306,7 +274,7 @@ export const FormExample: Story = {
306
274
  // All variants showcase
307
275
  export const AllVariants: Story = {
308
276
  render: () => (
309
- <div className="w-full max-w-2xl space-y-6">
277
+ <div className="max-w-2xl w-full space-y-6">
310
278
  <div>
311
279
  <h3 className="mb-3 text-lg font-semibold">Sizes</h3>
312
280
  <div className="space-y-3">
@@ -355,4 +323,3 @@ export const AllVariants: Story = {
355
323
  },
356
324
  },
357
325
  };
358
-
@@ -6,10 +6,11 @@ import {
6
6
  useCallback,
7
7
  useState,
8
8
  } from "react";
9
- import { cx } from "@shared/utils";
9
+ import { InputFieldProps, InputProps } from "./types";
10
+
10
11
  import { MaterialIcon } from "@shared/components/material-icon";
11
12
  import { Text } from "@shared/components/text";
12
- import { InputFieldProps, InputProps } from "./types";
13
+ import { cx } from "@shared/utils";
13
14
 
14
15
  export const InputField: ForwardRefRenderFunction<
15
16
  HTMLInputElement,
@@ -64,13 +65,11 @@ export const InputField: ForwardRefRenderFunction<
64
65
  };
65
66
 
66
67
  const togglePasswordVisibility = useCallback<
67
- MouseEventHandler<HTMLDivElement>
68
- >(e => {
69
- e.stopPropagation();
70
- setInputType(prevType =>
71
- prevType === "password" ? "text" : "password"
72
- );
73
- }, []);
68
+ MouseEventHandler<HTMLDivElement>
69
+ >(e => {
70
+ e.stopPropagation();
71
+ setInputType(prevType => (prevType === "password" ? "text" : "password"));
72
+ }, []);
74
73
 
75
74
  return (
76
75
  <div className="relative">
@@ -87,15 +86,19 @@ export const InputField: ForwardRefRenderFunction<
87
86
 
88
87
  <div
89
88
  className={cx(
90
- "relative flex w-80 flex-row items-center rounded-xl border border-input-border bg-input-bg-surface overflow-hidden",
89
+ "relative flex w-80 flex-row items-center overflow-hidden rounded-xl border border-input-border bg-input-bg-surface",
91
90
  sizeClasses[size || "medium"],
92
91
  containerClassName,
93
- (isHovered || effectiveState === "hover") && !isFocused && effectiveState !== "error" && "border-input-border-hover",
92
+ (isHovered || effectiveState === "hover") &&
93
+ !isFocused &&
94
+ effectiveState !== "error" &&
95
+ "border-input-border-hover",
94
96
  (isFocused ||
95
97
  effectiveState === "focus" ||
96
98
  effectiveState === "active") &&
97
99
  "border-input-border-selected outline outline-1 outline-input-border-selected",
98
- effectiveState === "error" && "border-input-border-critical outline outline-1 outline-input-border-critical"
100
+ effectiveState === "error" &&
101
+ "border-input-border-critical outline outline-1 outline-input-border-critical"
99
102
  )}
100
103
  >
101
104
  {prefixIconName ? (
@@ -165,9 +168,7 @@ export const InputField: ForwardRefRenderFunction<
165
168
  );
166
169
  };
167
170
 
168
- export const Input = forwardRef<HTMLInputElement, InputFieldProps>(
169
- InputField
170
- );
171
+ export const Input = forwardRef<HTMLInputElement, InputFieldProps>(InputField);
171
172
 
172
173
  Input.displayName = "Input";
173
174
 
@@ -34,4 +34,4 @@ export type InputFieldProps = Omit<
34
34
  prefixIconClassName?: string;
35
35
  loading?: boolean;
36
36
  hasError?: boolean;
37
- };
37
+ };
@@ -1,6 +1,6 @@
1
1
  import { Link } from "./index";
2
- import { DocsPage } from "@shared/stories/DocsTemplate";
3
2
 
3
+ import { DocsPage } from "@shared/stories/DocsTemplate";
4
4
  import type { Meta, StoryObj } from "@storybook/react";
5
5
 
6
6
  const meta: Meta<typeof Link> = {
@@ -26,8 +26,7 @@ export const Link = forwardRef<HTMLAnchorElement, LinkProps>(
26
26
  "transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2";
27
27
 
28
28
  const variantClasses = {
29
- default:
30
- "text-text underline",
29
+ default: "text-text underline",
31
30
  };
32
31
 
33
32
  const stateClasses = [
@@ -1,25 +1,25 @@
1
- import {
2
- type AnchorHTMLAttributes,
3
- type CSSProperties,
4
- type MouseEvent,
5
- type ReactNode,
6
- } from "react";
7
-
8
- export interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
9
- /** Content to render inside the link */
10
- children: ReactNode;
11
- /** URL to navigate to */
12
- href?: string;
13
- /** Custom className for the link */
14
- className?: string;
15
- /** Click handler function */
16
- onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
17
- /** Additional styling options */
18
- variant?: "default" | "unstyled";
19
- /** Custom styles */
20
- style?: CSSProperties;
21
- /** External link behavior - opens in new tab */
22
- external?: boolean;
23
- /** Disable the link */
24
- disabled?: boolean;
25
- }
1
+ import {
2
+ type AnchorHTMLAttributes,
3
+ type CSSProperties,
4
+ type MouseEvent,
5
+ type ReactNode,
6
+ } from "react";
7
+
8
+ export interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
9
+ /** Content to render inside the link */
10
+ children: ReactNode;
11
+ /** URL to navigate to */
12
+ href?: string;
13
+ /** Custom className for the link */
14
+ className?: string;
15
+ /** Click handler function */
16
+ onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
17
+ /** Additional styling options */
18
+ variant?: "default" | "unstyled";
19
+ /** Custom styles */
20
+ style?: CSSProperties;
21
+ /** External link behavior - opens in new tab */
22
+ external?: boolean;
23
+ /** Disable the link */
24
+ disabled?: boolean;
25
+ }
@@ -1,6 +1,6 @@
1
1
  import { List, ListItem } from "./index";
2
- import { DocsPage } from "@shared/stories/DocsTemplate";
3
2
 
3
+ import { DocsPage } from "@shared/stories/DocsTemplate";
4
4
  import type { Meta, StoryObj } from "@storybook/react";
5
5
 
6
6
  const meta: Meta<typeof List> = {