@fpkit/acss 0.5.4 → 0.5.6

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 (158) hide show
  1. package/libs/chunk-PWVRDQ3R.js +8 -0
  2. package/libs/chunk-PWVRDQ3R.js.map +1 -0
  3. package/libs/chunk-SVS4MX3U.cjs +31 -0
  4. package/libs/chunk-SVS4MX3U.cjs.map +1 -0
  5. package/libs/{icons-2f29127c.d.ts → icons-31ace3de.d.ts} +87 -81
  6. package/libs/icons.cjs +2 -2
  7. package/libs/icons.d.cts +1 -1
  8. package/libs/icons.d.ts +1 -1
  9. package/libs/icons.js +1 -1
  10. package/libs/index.cjs +42 -42
  11. package/libs/index.cjs.map +1 -1
  12. package/libs/index.d.cts +59 -29
  13. package/libs/index.d.ts +59 -29
  14. package/libs/index.js +7 -7
  15. package/libs/index.js.map +1 -1
  16. package/package.json +4 -3
  17. package/src/components/README.mdx +84 -0
  18. package/src/components/alert/README.mdx +86 -0
  19. package/src/components/alert/alert.mdx +74 -0
  20. package/src/components/alert/alert.scss +80 -0
  21. package/src/components/alert/alert.stories.tsx +132 -0
  22. package/src/components/alert/alert.tsx +154 -0
  23. package/src/components/alert/elements/README.mdx +77 -0
  24. package/src/components/alert/elements/dismiss-button.stories.tsx +31 -0
  25. package/src/components/alert/elements/dismiss-button.tsx +28 -0
  26. package/src/components/badge/badge.mdx +124 -0
  27. package/src/components/badge/badge.scss +4 -4
  28. package/src/components/badge/badge.stories.tsx +21 -23
  29. package/src/components/breadcrumbs/breadcrumb.scss +2 -2
  30. package/src/components/breadcrumbs/breadcrumb.stories.tsx +42 -47
  31. package/src/components/buttons/button.scss +41 -15
  32. package/src/components/buttons/button.stories.tsx +8 -1
  33. package/src/components/buttons/button.test.tsx +72 -72
  34. package/src/components/cards/card.stories.tsx +15 -15
  35. package/src/components/details/details.scss +26 -6
  36. package/src/components/details/details.stories.tsx +33 -30
  37. package/src/components/details/details.tsx +17 -17
  38. package/src/components/dialog/README.mdx +187 -0
  39. package/src/components/dialog/dialog-modal.stories.tsx +113 -0
  40. package/src/components/dialog/dialog-modal.tsx +111 -0
  41. package/src/components/dialog/dialog.scss +76 -0
  42. package/src/components/dialog/dialog.stories.tsx +116 -0
  43. package/src/components/dialog/dialog.tsx +128 -0
  44. package/src/components/dialog/hooks/useClickOutside.ts +33 -0
  45. package/src/components/dialog/views/README.mdx +182 -0
  46. package/src/components/dialog/views/dialog-footer.tsx +45 -0
  47. package/src/components/dialog/views/dialog-header.stories.tsx +42 -0
  48. package/src/components/dialog/views/dialog-header.tsx +61 -0
  49. package/src/components/form/form.stories.tsx +16 -16
  50. package/src/components/form/input.stories.tsx +62 -62
  51. package/src/components/form/select.stories.tsx +22 -15
  52. package/src/components/heading/heading.stories.tsx +32 -33
  53. package/src/components/heading/heading.tsx +1 -1
  54. package/src/components/icons/components/add.tsx +14 -14
  55. package/src/components/icons/components/alert-solid.tsx +36 -0
  56. package/src/components/icons/components/alert-square-solid.tsx +36 -0
  57. package/src/components/icons/components/info-solid.tsx +40 -0
  58. package/src/components/icons/components/info.tsx +36 -0
  59. package/src/components/icons/components/question-solid.tsx +36 -0
  60. package/src/components/icons/components/success-solid.tsx +36 -0
  61. package/src/components/icons/components/svg.tsx +0 -1
  62. package/src/components/icons/components/warn-solid.tsx +36 -0
  63. package/src/components/icons/icon.scss +1 -3
  64. package/src/components/icons/icon.stories.tsx +87 -78
  65. package/src/components/icons/icon.tsx +57 -52
  66. package/src/components/icons/index.ts +36 -29
  67. package/src/components/icons/types.ts +1 -1
  68. package/src/components/images/figure.stories.tsx +13 -13
  69. package/src/components/images/img.stories.tsx +12 -12
  70. package/src/components/link/link.stories.tsx +32 -35
  71. package/src/components/link/link.tsx +27 -14
  72. package/src/components/list/list.stories.tsx +16 -16
  73. package/src/components/modal/dialog.tsx +13 -12
  74. package/src/components/modal/modal.tsx +28 -30
  75. package/src/components/nav/nav.stories.tsx +25 -24
  76. package/src/components/popover/popover.stories.tsx +17 -18
  77. package/src/components/progress/progress.stories.tsx +14 -20
  78. package/src/components/tag/tag.stories.tsx +17 -18
  79. package/src/components/text/text.stories.tsx +28 -29
  80. package/src/components/text-to-speech/TextToSpeech.stories.tsx +100 -101
  81. package/src/components/ui.tsx +28 -25
  82. package/src/decorators/instructions.tsx +44 -0
  83. package/src/hooks/useDialogClickHandler.ts +26 -0
  84. package/src/index.scss +23 -22
  85. package/src/index.ts +31 -30
  86. package/src/patterns/page/page-header.stories.tsx +17 -21
  87. package/src/sass/_globals.scss +14 -32
  88. package/src/sass/_styles.scss +2 -1
  89. package/src/sass/styles/_colors.scss +13 -0
  90. package/src/styles/alert/alert.css +68 -0
  91. package/src/styles/alert/alert.css.map +1 -0
  92. package/src/styles/badge/badge.css +3 -3
  93. package/src/styles/breadcrumbs/breadcrumb.css +1 -1
  94. package/src/styles/buttons/button.css +25 -2
  95. package/src/styles/buttons/button.css.map +1 -1
  96. package/src/styles/details/details.css +19 -4
  97. package/src/styles/details/details.css.map +1 -1
  98. package/src/styles/dialog/dialog.css +76 -0
  99. package/src/styles/dialog/dialog.css.map +1 -0
  100. package/src/styles/icons/icon.css +1 -3
  101. package/src/styles/icons/icon.css.map +1 -1
  102. package/src/styles/index.css +213 -60
  103. package/src/styles/index.css.map +1 -1
  104. package/libs/chunk-TBM2QIVT.js +0 -8
  105. package/libs/chunk-TBM2QIVT.js.map +0 -1
  106. package/libs/chunk-VAH6X2DZ.cjs +0 -31
  107. package/libs/chunk-VAH6X2DZ.cjs.map +0 -1
  108. package/libs/components/badge/badge.css +0 -1
  109. package/libs/components/badge/badge.css.map +0 -1
  110. package/libs/components/badge/badge.min.css +0 -3
  111. package/libs/components/breadcrumbs/breadcrumb.css +0 -1
  112. package/libs/components/breadcrumbs/breadcrumb.css.map +0 -1
  113. package/libs/components/breadcrumbs/breadcrumb.min.css +0 -3
  114. package/libs/components/buttons/button.css +0 -1
  115. package/libs/components/buttons/button.css.map +0 -1
  116. package/libs/components/buttons/button.min.css +0 -3
  117. package/libs/components/cards/card-style.css +0 -1
  118. package/libs/components/cards/card-style.css.map +0 -1
  119. package/libs/components/cards/card-style.min.css +0 -3
  120. package/libs/components/cards/card.css +0 -1
  121. package/libs/components/cards/card.css.map +0 -1
  122. package/libs/components/cards/card.min.css +0 -3
  123. package/libs/components/details/details.css +0 -1
  124. package/libs/components/details/details.css.map +0 -1
  125. package/libs/components/details/details.min.css +0 -3
  126. package/libs/components/form/form.css +0 -1
  127. package/libs/components/form/form.css.map +0 -1
  128. package/libs/components/form/form.min.css +0 -3
  129. package/libs/components/icons/icon.css +0 -1
  130. package/libs/components/icons/icon.css.map +0 -1
  131. package/libs/components/icons/icon.min.css +0 -3
  132. package/libs/components/images/img.css +0 -1
  133. package/libs/components/images/img.css.map +0 -1
  134. package/libs/components/images/img.min.css +0 -3
  135. package/libs/components/layout/landmarks.css +0 -1
  136. package/libs/components/layout/landmarks.css.map +0 -1
  137. package/libs/components/layout/landmarks.min.css +0 -3
  138. package/libs/components/link/link.css +0 -1
  139. package/libs/components/link/link.css.map +0 -1
  140. package/libs/components/link/link.min.css +0 -3
  141. package/libs/components/nav/nav.css +0 -1
  142. package/libs/components/nav/nav.css.map +0 -1
  143. package/libs/components/nav/nav.min.css +0 -3
  144. package/libs/components/progress/progress.css +0 -1
  145. package/libs/components/progress/progress.css.map +0 -1
  146. package/libs/components/progress/progress.min.css +0 -3
  147. package/libs/components/styles/index.css +0 -1
  148. package/libs/components/styles/index.css.map +0 -1
  149. package/libs/components/styles/index.min.css +0 -3
  150. package/libs/components/tag/tag.css +0 -1
  151. package/libs/components/tag/tag.css.map +0 -1
  152. package/libs/components/tag/tag.min.css +0 -3
  153. package/libs/components/text-to-speech/text-to-speech.css +0 -1
  154. package/libs/components/text-to-speech/text-to-speech.css.map +0 -1
  155. package/libs/components/text-to-speech/text-to-speech.min.css +0 -3
  156. package/libs/index.css +0 -1
  157. package/libs/index.css.map +0 -1
  158. package/src/components/readme.stories.mdx +0 -7
@@ -0,0 +1,42 @@
1
+ import { StoryObj, Meta } from "@storybook/react";
2
+ import { within, expect } from "@storybook/test";
3
+
4
+ import DialogHeader from "./dialog-header";
5
+
6
+ const meta: Meta<typeof DialogHeader> = {
7
+ title: "FP.REACT Components/Dialog/Views/DialogHeader",
8
+ component: DialogHeader,
9
+ parameters: {
10
+ layout: "centered",
11
+ actions: { argTypesRegex: "^on.*" },
12
+ docs: {
13
+ description: {
14
+ component:
15
+ "DialogHeader component - A header component for dialog/modal windows that displays a title and optional close button.",
16
+ },
17
+ },
18
+ },
19
+ args: {
20
+ children: "Dialog Header",
21
+ },
22
+ } as Meta;
23
+
24
+ export default meta;
25
+ type Story = StoryObj<typeof DialogHeader>;
26
+
27
+ export const Default: Story = {
28
+ args: {
29
+ dialogTitle: "Default Dialog ",
30
+ },
31
+ play: async ({ canvasElement }) => {
32
+ const canvas = within(canvasElement);
33
+ expect(canvas.getByText(/default dialog/i)).toBeInTheDocument();
34
+ },
35
+ } as Story;
36
+
37
+ export const WithCloseButton: Story = {
38
+ args: {
39
+ dialogTitle: "Dialog Header with Close",
40
+ onClose: () => {},
41
+ },
42
+ } as Story;
@@ -0,0 +1,61 @@
1
+ import React from "react";
2
+ import UI from "#components/ui";
3
+ import Heading from "#components/heading/heading";
4
+ import Button from "#components/buttons/button";
5
+ import Icon from "#components/icons/icon";
6
+
7
+ export type DialogHeaderProps = {
8
+ dialogTitle: string;
9
+ onClick: () => void;
10
+ } & React.ComponentProps<typeof Heading>;
11
+
12
+ /**
13
+ * DialogHeader component displays the header section of a dialog with a title and close button.
14
+ *
15
+ * @component
16
+ * @param {Object} props - Component props
17
+ * @param {string} props.dialogTitle - The title text to display in the dialog header
18
+ * @param {() => void} props.onClick - Callback function triggered when close button is clicked
19
+ * @param {string} [props.type='h3'] - Heading type/level to use for the title
20
+ * @returns {JSX.Element} A dialog header with title and close button
21
+ *
22
+ * @example
23
+ * ```jsx
24
+ * <DialogHeader
25
+ * dialogTitle="Confirm Action"
26
+ * onClick={() => setIsOpen(false)}
27
+ * type="h2"
28
+ * />
29
+ * ```
30
+ */
31
+
32
+ const DialogHeader = ({
33
+ dialogTitle,
34
+ onClick,
35
+ type = "h3",
36
+ }: DialogHeaderProps): JSX.Element => {
37
+ const handleClose = () => {
38
+ onClick();
39
+ };
40
+ return (
41
+ <UI as="div" classes="dialog-header">
42
+ <Heading type={type} className="dialog-title">
43
+ {dialogTitle || "Dialog"}
44
+ </Heading>
45
+ <Button
46
+ type="button"
47
+ onClick={handleClose}
48
+ className="dialog-close"
49
+ aria-label="Close dialog"
50
+ data-btn="icon"
51
+ >
52
+ <Icon>
53
+ <Icon.Remove size={16} />
54
+ </Icon>
55
+ </Button>
56
+ </UI>
57
+ );
58
+ };
59
+
60
+ export default React.memo(DialogHeader);
61
+ DialogHeader.displayName = "DialogHeader";
@@ -1,28 +1,28 @@
1
- import { StoryObj, Meta } from '@storybook/react'
2
- import { within, expect } from '@storybook/test'
1
+ import { StoryObj, Meta } from "@storybook/react";
2
+ import { within, expect } from "@storybook/test";
3
3
 
4
-
5
- import Form from './form'
6
- import './form.scss'
4
+ import Form from "./form";
5
+ import "./form.scss";
7
6
 
8
7
  const meta: Meta<typeof Form> = {
9
- title: 'FP.REACT Forms/Examples',
8
+ title: "FP.REACT Forms/Examples",
9
+ tags: ["beta"],
10
10
  component: Form,
11
11
  parameters: {
12
12
  docs: {
13
13
  description: {
14
- component: 'Form description here...',
14
+ component: "Form description here...",
15
15
  },
16
16
  },
17
17
  },
18
18
  args: {
19
- children: 'Link',
20
- name: 'my-form',
19
+ children: "Link",
20
+ name: "my-form",
21
21
  },
22
- } as Story
22
+ } as Story;
23
23
 
24
- export default meta
25
- type Story = StoryObj<typeof Form>
24
+ export default meta;
25
+ type Story = StoryObj<typeof Form>;
26
26
 
27
27
  export const FormComponent: Story = {
28
28
  args: {
@@ -42,8 +42,8 @@ export const FormComponent: Story = {
42
42
  ),
43
43
  },
44
44
  play: async ({ canvasElement }) => {
45
- const canvas = within(canvasElement)
46
- const form = canvas.getByRole('form')
47
- await expect(form).toBeInTheDocument()
45
+ const canvas = within(canvasElement);
46
+ const form = canvas.getByRole("form");
47
+ await expect(form).toBeInTheDocument();
48
48
  },
49
- } as Story
49
+ } as Story;
@@ -1,13 +1,13 @@
1
- import { StoryObj, Meta } from '@storybook/react'
2
- import { within, userEvent, expect } from '@storybook/test'
1
+ import { StoryObj, Meta } from "@storybook/react";
2
+ import { within, userEvent, expect } from "@storybook/test";
3
3
 
4
-
5
- import Input from './inputs'
6
- import './form.scss'
4
+ import Input from "./inputs";
5
+ import "./form.scss";
7
6
 
8
7
  const meta: Meta<typeof Input> = {
9
- title: 'FP.REACT Forms/Inputs',
8
+ title: "FP.REACT Forms/Inputs",
10
9
  component: Input,
10
+ tags: ["rc"],
11
11
  args: {},
12
12
  parameters: {
13
13
  docs: {
@@ -17,18 +17,18 @@ const meta: Meta<typeof Input> = {
17
17
  },
18
18
  },
19
19
  },
20
- } as Story
20
+ } as Story;
21
21
 
22
- export default meta
23
- type Story = StoryObj<typeof Input>
22
+ export default meta;
23
+ type Story = StoryObj<typeof Input>;
24
24
 
25
25
  export const InputComponent: Story = {
26
26
  args: {},
27
27
  play: async ({ canvasElement }) => {
28
- const canvas = within(canvasElement)
29
- expect(canvas.getByRole('textbox')).toBeInTheDocument()
28
+ const canvas = within(canvasElement);
29
+ expect(canvas.getByRole("textbox")).toBeInTheDocument();
30
30
  },
31
- }
31
+ };
32
32
 
33
33
  //required input story
34
34
  export const RequiredInput: Story = {
@@ -41,32 +41,32 @@ export const RequiredInput: Story = {
41
41
  },
42
42
  },
43
43
  args: {
44
- type: 'text',
44
+ type: "text",
45
45
  required: true,
46
- placeholder: 'This Field is required (placeholder)',
46
+ placeholder: "This Field is required (placeholder)",
47
47
  },
48
48
 
49
49
  play: async ({ canvasElement }) => {
50
- const canvas = within(canvasElement)
51
- const input = canvas.getByRole('textbox')
52
- expect(input).toBeRequired()
50
+ const canvas = within(canvasElement);
51
+ const input = canvas.getByRole("textbox");
52
+ expect(input).toBeRequired();
53
53
 
54
- await userEvent.type(input, 'test')
55
- expect(input).toBeValid()
54
+ await userEvent.type(input, "test");
55
+ expect(input).toBeValid();
56
56
 
57
- await userEvent.clear(input)
57
+ await userEvent.clear(input);
58
58
 
59
- userEvent.type(input, '\n')
60
- expect(input).toBeInvalid()
59
+ userEvent.type(input, "\n");
60
+ expect(input).toBeInvalid();
61
61
  },
62
- } as Story
62
+ } as Story;
63
63
 
64
64
  export const DefaultRequired: Story = {
65
65
  args: {
66
- type: 'text',
66
+ type: "text",
67
67
  required: true,
68
68
  },
69
- } as Story
69
+ } as Story;
70
70
 
71
71
  export const InputDisabled: Story = {
72
72
  parameters: {
@@ -78,78 +78,78 @@ export const InputDisabled: Story = {
78
78
  },
79
79
  },
80
80
  args: {
81
- type: 'text',
81
+ type: "text",
82
82
  isDisabled: true,
83
83
  },
84
- } as Story
84
+ } as Story;
85
85
 
86
86
  export const EmailInput: Story = {
87
87
  args: {
88
- type: 'email',
88
+ type: "email",
89
89
  },
90
90
  play: async ({ canvasElement }) => {
91
- const canvas = within(canvasElement)
92
- const input = canvas.getByRole('textbox')
93
- expect(input).toHaveAttribute('type', 'email')
91
+ const canvas = within(canvasElement);
92
+ const input = canvas.getByRole("textbox");
93
+ expect(input).toHaveAttribute("type", "email");
94
94
 
95
- await userEvent.type(input, 'test@example.com')
96
- expect(input).toHaveValue('test@example.com')
95
+ await userEvent.type(input, "test@example.com");
96
+ expect(input).toHaveValue("test@example.com");
97
97
  },
98
- } as Story
98
+ } as Story;
99
99
 
100
100
  export const PasswordInput: Story = {
101
101
  args: {
102
- type: 'password',
102
+ type: "password",
103
103
  },
104
104
  play: async ({ canvasElement }) => {
105
- const canvas = within(canvasElement)
106
- const input = canvas.getByPlaceholderText(/password/i)
107
- expect(input).toHaveAttribute('type', 'password')
105
+ const canvas = within(canvasElement);
106
+ const input = canvas.getByPlaceholderText(/password/i);
107
+ expect(input).toHaveAttribute("type", "password");
108
108
 
109
- await userEvent.type(input, 'password')
110
- expect(input).toHaveValue('password')
109
+ await userEvent.type(input, "password");
110
+ expect(input).toHaveValue("password");
111
111
  },
112
- } as Story
112
+ } as Story;
113
113
 
114
114
  export const SearchInput: Story = {
115
115
  args: {
116
- type: 'search',
116
+ type: "search",
117
117
  },
118
118
  play: async ({ canvasElement }) => {
119
- const canvas = within(canvasElement)
120
- const input = canvas.getByRole('searchbox')
121
- expect(input).toHaveAttribute('type', 'search')
119
+ const canvas = within(canvasElement);
120
+ const input = canvas.getByRole("searchbox");
121
+ expect(input).toHaveAttribute("type", "search");
122
122
 
123
- await userEvent.type(input, 'search term')
124
- expect(input).toHaveValue('search term')
123
+ await userEvent.type(input, "search term");
124
+ expect(input).toHaveValue("search term");
125
125
  },
126
- } as Story
126
+ } as Story;
127
127
 
128
128
  export const TelInput: Story = {
129
129
  args: {
130
- type: 'tel',
130
+ type: "tel",
131
131
  },
132
132
  play: async ({ canvasElement }) => {
133
- const canvas = within(canvasElement)
134
- const input = canvas.getByRole('textbox')
135
- expect(input).toHaveAttribute('type', 'tel')
133
+ const canvas = within(canvasElement);
134
+ const input = canvas.getByRole("textbox");
135
+ expect(input).toHaveAttribute("type", "tel");
136
136
 
137
- await userEvent.type(input, '1234567890')
138
- expect(input).toHaveValue('1234567890')
137
+ await userEvent.type(input, "1234567890");
138
+ expect(input).toHaveValue("1234567890");
139
139
  },
140
- } as Story
140
+ } as Story;
141
141
 
142
142
  // URL text input story
143
143
  export const UrlInput: Story = {
144
144
  args: {
145
- type: 'url',
145
+ type: "url",
146
146
  },
147
147
  play: async ({ canvasElement }) => {
148
- const canvas = within(canvasElement)
149
- const input = canvas.getByRole('textbox')
150
- expect(input).toHaveAttribute('type', 'url')
148
+ const canvas = within(canvasElement);
149
+ const input = canvas.getByRole("textbox");
150
+ expect(input).toHaveAttribute("type", "url");
151
151
 
152
- await userEvent.type(input, 'https://example.com')
153
- expect(input).toHaveValue('https://example.com')
152
+ await userEvent.type(input, "https://example.com");
153
+ expect(input).toHaveValue("https://example.com");
154
154
  },
155
- } as Story
155
+ } as Story;
@@ -1,21 +1,20 @@
1
- import { StoryObj, Meta } from '@storybook/react'
2
- import { within, userEvent, screen } from '@storybook/test'
1
+ import { StoryObj, Meta } from "@storybook/react";
2
+ import { within, expect } from "@storybook/test";
3
3
 
4
-
5
- import Select from './select'
6
- import React from 'react'
4
+ import Select from "./select";
5
+ import React from "react";
7
6
  const meta: Meta<typeof Select> = {
8
- title: 'FP.REACT Forms/Select',
7
+ title: "FP.REACT Forms/Select",
8
+ tags: ["rc"],
9
9
  component: Select,
10
10
  parameters: {
11
11
  docs: {
12
12
  description: {
13
- component: 'Base select/Combobox component',
13
+ component: "Base select/Combobox component",
14
14
  },
15
15
  },
16
16
  },
17
17
  args: {
18
- // @ts-ignore
19
18
  children: (
20
19
  <>
21
20
  <Select.Option selectValue="value" selectLabel="Option 1" />
@@ -24,15 +23,23 @@ const meta: Meta<typeof Select> = {
24
23
  </>
25
24
  ),
26
25
  },
27
- } as Story
26
+ } as Story;
28
27
 
29
- export default meta
30
- type Story = StoryObj<typeof Select>
28
+ export default meta;
29
+ type Story = StoryObj<typeof Select>;
31
30
 
32
31
  export const SelectComponent: Story = {
33
- args: {},
32
+ args: {
33
+ children: (
34
+ <>
35
+ <Select.Option selectValue="value" selectLabel="Option 1" />
36
+ <Select.Option selectValue="value" selectLabel="Option 2" />
37
+ <Select.Option selectValue="value" selectLabel="Option 3" />
38
+ </>
39
+ ),
40
+ },
34
41
  play: async ({ canvasElement }) => {
35
- // const canvas = within(canvasElement)
36
- // expect(canvas.getByRole('combobox')).toBeInTheDocument()
42
+ const canvas = within(canvasElement);
43
+ expect(canvas.getByRole("combobox")).toBeInTheDocument();
37
44
  },
38
- }
45
+ } as Story;
@@ -1,75 +1,74 @@
1
- import { StoryObj, Meta } from '@storybook/react'
2
- import { within, expect } from '@storybook/test'
1
+ import { StoryObj, Meta } from "@storybook/react";
2
+ import { within, expect } from "@storybook/test";
3
3
 
4
-
5
- import Heading from './heading'
4
+ import Heading from "./heading";
6
5
 
7
6
  const meta: Meta<typeof Heading> = {
8
- title: 'FP.REACT Components/Heading',
7
+ title: "FP.REACT Components/Heading",
9
8
  component: Heading,
9
+ tags: ["version:1.0.0"],
10
10
  parameters: {
11
- actions: { argTypesRegex: '^on.*' },
11
+ actions: { argTypesRegex: "^on.*" },
12
12
  docs: {
13
13
  description: {
14
- component: 'Heading description here...',
14
+ component: "Heading description here...",
15
15
  },
16
16
  },
17
17
  },
18
18
  args: {
19
- // @ts-ignore
20
- children: 'Default title',
19
+ children: "Default title",
21
20
  },
22
- } as Story
21
+ } as Story;
23
22
 
24
- export default meta
25
- type Story = StoryObj<typeof Heading>
23
+ export default meta;
24
+ type Story = StoryObj<typeof Heading>;
26
25
 
27
26
  export const HeadingComponent: Story = {
28
27
  args: {},
29
28
  play: async ({ canvasElement }) => {
30
- const canvas = within(canvasElement)
31
- expect(canvas.getByText(/default title/i)).toBeInTheDocument()
29
+ const canvas = within(canvasElement);
30
+ expect(canvas.getByText(/default title/i)).toBeInTheDocument();
32
31
  },
33
- }
32
+ };
34
33
 
35
34
  export const HeadingOne: Story = {
36
35
  args: {
37
- type: 'h1',
38
- children: 'Heading One',
36
+ type: "h1",
37
+ children: "Heading One",
39
38
  },
40
- } as Story
39
+ } as Story;
41
40
 
42
41
  export const HeadingTwo: Story = {
43
42
  args: {
44
- type: 'h2',
45
- children: 'Heading Two',
43
+ type: "h2",
44
+ children: "Heading Two",
46
45
  },
47
- } as Story
46
+ } as Story;
48
47
 
49
48
  export const HeadingThree: Story = {
50
49
  args: {
51
- type: 'h3',
52
- children: 'Heading Three',
50
+ type: "h3",
51
+ children: "Heading Three",
53
52
  },
54
- } as Story
53
+ } as Story;
55
54
 
56
55
  export const HeadingFour: Story = {
57
56
  args: {
58
- type: 'h4',
59
- children: 'Heading Four',
57
+ type: "h4",
58
+ children: "Heading Four",
60
59
  },
61
- } as Story
60
+ } as Story;
62
61
 
63
62
  export const HeadingFive: Story = {
64
63
  args: {
65
- type: 'h5',
66
- children: 'Heading Five',
64
+ type: "h5",
65
+ children: "Heading Five",
67
66
  },
68
- } as Story
67
+ } as Story;
69
68
 
70
69
  export const HeadingSix: Story = {
71
70
  args: {
72
- type: 'h6',
73
- children: 'Heading Six',
71
+ type: "h6",
72
+ children: "Heading Six",
74
73
  },
75
- } as Story
74
+ } as Story;
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import UI from '#components/ui'
3
-
3
+ import { type } from 'os'
4
4
 
5
5
  export type TitleProps = {
6
6
  children: React.ReactNode
@@ -1,12 +1,12 @@
1
- import * as React from 'react'
1
+ import * as React from "react";
2
2
 
3
- import { IconProps } from '../types'
4
- import Svg from './svg'
3
+ import { IconProps } from "../types";
4
+ import Svg from "./svg";
5
5
 
6
6
  const defaultStyles = {
7
7
  ...Svg.styles,
8
- fill: 'currentColor',
9
- }
8
+ fill: "currentColor",
9
+ };
10
10
 
11
11
  /**
12
12
  * Add Icon component
@@ -16,14 +16,14 @@ const defaultStyles = {
16
16
  * @returns {JSX.Element} - Rendered component
17
17
  */
18
18
  export const Add = ({
19
- fill = 'currentColor',
19
+ fill = "gray",
20
20
  size = 24,
21
- role = 'img',
22
- alt = 'Add icon',
21
+ role = "img",
22
+ alt = "Add icon",
23
23
  ...props
24
24
  }: Pick<
25
25
  IconProps,
26
- 'strokeColor' | 'fill' | 'styles' | 'size' | 'role' | 'alt'
26
+ "strokeColor" | "fill" | "styles" | "size" | "role" | "alt"
27
27
  >): JSX.Element => {
28
28
  return (
29
29
  <Svg size={size} role={role} alt={alt} {...props}>
@@ -34,9 +34,9 @@ export const Add = ({
34
34
  />
35
35
  </g>
36
36
  </Svg>
37
- )
38
- }
37
+ );
38
+ };
39
39
 
40
- export default Add
41
- Add.styles = defaultStyles
42
- Add.displayName = 'Add'
40
+ export default Add;
41
+ Add.styles = defaultStyles;
42
+ Add.displayName = "Add";
@@ -0,0 +1,36 @@
1
+ import * as React from "react";
2
+
3
+ import { IconProps } from "../types";
4
+ import Svg from "./svg";
5
+
6
+ /**
7
+ * Add Icon component
8
+ * @param {string} fill - Icon fill color (default: 'currentColor')
9
+ * @param {string} size - Icon size (default: '24')
10
+ * @param {IconProps} props - Other icon properties
11
+ * @returns {JSX.Element} - Rendered component
12
+ */
13
+ export const AlertSolid = ({
14
+ fill = "currentColor",
15
+ size = 24,
16
+ role = "img",
17
+ alt = "Add icon",
18
+ ...props
19
+ }: Pick<
20
+ IconProps,
21
+ "strokeColor" | "fill" | "styles" | "size" | "role" | "alt"
22
+ >): JSX.Element => {
23
+ return (
24
+ <Svg size={size} role={role} alt={alt} {...props}>
25
+ <g fill={fill}>
26
+ <path
27
+ d="M23.707,6.736,17.263.293A1,1,0,0,0,16.556,0H7.444a1,1,0,0,0-.707.293L.293,6.736A1,1,0,0,0,0,7.443v9.114a1,1,0,0,0,.293.707l6.444,6.443A1,1,0,0,0,7.444,24h9.112a1,1,0,0,0,.707-.293l6.444-6.443A1,1,0,0,0,24,16.557V7.443A1,1,0,0,0,23.707,6.736ZM13.645,5,13,14H11l-.608-9ZM12,20a2,2,0,1,1,2-2A2,2,0,0,1,12,20Z"
28
+ fill={fill}
29
+ />
30
+ </g>
31
+ </Svg>
32
+ );
33
+ };
34
+
35
+ export default AlertSolid;
36
+ AlertSolid.displayName = "AlertSolid";
@@ -0,0 +1,36 @@
1
+ import * as React from "react";
2
+
3
+ import { IconProps } from "../types";
4
+ import Svg from "./svg";
5
+
6
+ /**
7
+ * Add Icon component
8
+ * @param {string} fill - Icon fill color (default: 'currentColor')
9
+ * @param {string} size - Icon size (default: '24')
10
+ * @param {IconProps} props - Other icon properties
11
+ * @returns {JSX.Element} - Rendered component
12
+ */
13
+ export const AlertSquareSolid = ({
14
+ fill = "currentColor",
15
+ size = 24,
16
+ role = "img",
17
+ alt = "Add icon",
18
+ ...props
19
+ }: Pick<
20
+ IconProps,
21
+ "strokeColor" | "fill" | "styles" | "size" | "role" | "alt"
22
+ >): JSX.Element => {
23
+ return (
24
+ <Svg size={size} role={role} alt={alt} {...props}>
25
+ <g fill={fill}>
26
+ <path
27
+ d="M20,1H4c-1.654,0-3,1.346-3,3V20c0,1.654,1.346,3,3,3H20c1.654,0,3-1.346,3-3V4c0-1.654-1.346-3-3-3ZM11,7c0-.553,.448-1,1-1s1,.447,1,1v6c0,.553-.448,1-1,1s-1-.447-1-1V7Zm1,11.5c-.69,0-1.25-.56-1.25-1.25s.56-1.25,1.25-1.25,1.25,.56,1.25,1.25-.56,1.25-1.25,1.25Z"
28
+ fill={fill}
29
+ ></path>
30
+ </g>
31
+ </Svg>
32
+ );
33
+ };
34
+
35
+ export default AlertSquareSolid;
36
+ AlertSquareSolid.displayName = "AlertSquareSolid";