@egov3/system-design 1.0.15 → 1.0.16
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.
- package/.github/workflows/publish.yml +4 -1
- package/__tests__/{baseComponents → components}/InputField.test.tsx +7 -7
- package/index.tsx +2 -2
- package/package.json +1 -1
- package/src/{baseComponents → components}/InputField/index.tsx +1 -1
- package/src/{baseComponents → components}/index.tsx +1 -1
- package/src/stories/components/Button.stories.tsx +4 -4
- package/tsconfig.json +10 -2
- /package/src/{baseComponents → components}/InputField/InputField.module.scss +0 -0
|
@@ -27,6 +27,9 @@ jobs:
|
|
|
27
27
|
- name: Install dependencies
|
|
28
28
|
run: yarn install
|
|
29
29
|
|
|
30
|
+
- name: Build project
|
|
31
|
+
run: yarn build
|
|
32
|
+
|
|
30
33
|
- name: Increment version
|
|
31
34
|
run: yarn version --patch --no-git-tag-version
|
|
32
35
|
|
|
@@ -40,7 +43,7 @@ jobs:
|
|
|
40
43
|
run: |
|
|
41
44
|
git ls-remote https://Zhassulan-Baigozha:${{ secrets.PERSONAL_TOKEN }}@github.com/Zhassulan-Baigozha/egov3-design.git
|
|
42
45
|
env:
|
|
43
|
-
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
|
|
46
|
+
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
|
|
44
47
|
|
|
45
48
|
- name: Commit updated package.json
|
|
46
49
|
run: |
|
|
@@ -2,12 +2,12 @@ import React from "react";
|
|
|
2
2
|
import { render, fireEvent } from "@testing-library/react";
|
|
3
3
|
import "@testing-library/jest-dom";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Components } from "~components";
|
|
6
6
|
|
|
7
7
|
describe("InputField", () => {
|
|
8
8
|
it("(1) Should render without crashing", () => {
|
|
9
9
|
const { getByPlaceholderText } = render(
|
|
10
|
-
<InputField
|
|
10
|
+
<Components.InputField
|
|
11
11
|
id={"testRenderId"}
|
|
12
12
|
labelText={""}
|
|
13
13
|
ariaLabel={"test ariaLabel"}
|
|
@@ -19,7 +19,7 @@ describe("InputField", () => {
|
|
|
19
19
|
it("(2) Should render with the correct placeholder", () => {
|
|
20
20
|
const placeholder = "Enter text";
|
|
21
21
|
const { getByPlaceholderText } = render(
|
|
22
|
-
<InputField
|
|
22
|
+
<Components.InputField
|
|
23
23
|
id={"testPlaceholderId"}
|
|
24
24
|
labelText={""}
|
|
25
25
|
ariaLabel={"test ariaLabel"}
|
|
@@ -33,7 +33,7 @@ describe("InputField", () => {
|
|
|
33
33
|
const onFocus = jest.fn();
|
|
34
34
|
const onBlur = jest.fn();
|
|
35
35
|
const { getByPlaceholderText } = render(
|
|
36
|
-
<InputField
|
|
36
|
+
<Components.InputField
|
|
37
37
|
id={"testOnBlurId"}
|
|
38
38
|
labelText={""}
|
|
39
39
|
ariaLabel={"test ariaLabel"}
|
|
@@ -52,7 +52,7 @@ describe("InputField", () => {
|
|
|
52
52
|
it("(4) Should render inputLeftIcon if provided", () => {
|
|
53
53
|
const leftIcon = <span data-testid="left-icon">Icon</span>;
|
|
54
54
|
const { getByTestId } = render(
|
|
55
|
-
<InputField
|
|
55
|
+
<Components.InputField
|
|
56
56
|
id={"testLeftId"}
|
|
57
57
|
labelText={""}
|
|
58
58
|
ariaLabel={"test ariaLabel"}
|
|
@@ -66,7 +66,7 @@ describe("InputField", () => {
|
|
|
66
66
|
const onChange = jest.fn();
|
|
67
67
|
const value = "test value";
|
|
68
68
|
const { getByPlaceholderText, getByTestId } = render(
|
|
69
|
-
<InputField
|
|
69
|
+
<Components.InputField
|
|
70
70
|
id={"testId"}
|
|
71
71
|
labelText={""}
|
|
72
72
|
ariaLabel={"test ariaLabel"}
|
|
@@ -87,7 +87,7 @@ describe("InputField", () => {
|
|
|
87
87
|
|
|
88
88
|
it("(6) Should apply focused class on focus", () => {
|
|
89
89
|
const { getByPlaceholderText, container } = render(
|
|
90
|
-
<InputField
|
|
90
|
+
<Components.InputField
|
|
91
91
|
id={"testFocusedId"}
|
|
92
92
|
labelText={""}
|
|
93
93
|
ariaLabel={"test ariaLabel"}
|
package/index.tsx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Components } from "./src/components";
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { Components };
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ import { ClearIcon } from "~svg";
|
|
|
9
9
|
|
|
10
10
|
export type TOtpType = "OTP" | "TEXT";
|
|
11
11
|
|
|
12
|
-
interface IInputFieldProps {
|
|
12
|
+
export interface IInputFieldProps {
|
|
13
13
|
onFocus?: () => void;
|
|
14
14
|
onBlur?: () => void;
|
|
15
15
|
onEnterPress?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { fn } from "@storybook/test";
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { Components } from "~components";
|
|
5
5
|
|
|
6
6
|
const meta = {
|
|
7
|
-
title: "
|
|
8
|
-
component: Button,
|
|
7
|
+
title: "Components/Button",
|
|
8
|
+
component: Components.Button,
|
|
9
9
|
parameters: {
|
|
10
10
|
layout: "centered",
|
|
11
11
|
},
|
|
@@ -14,7 +14,7 @@ const meta = {
|
|
|
14
14
|
args: {
|
|
15
15
|
onClick: fn(),
|
|
16
16
|
},
|
|
17
|
-
} satisfies Meta<typeof Button>;
|
|
17
|
+
} satisfies Meta<typeof Components.Button>;
|
|
18
18
|
|
|
19
19
|
export default meta;
|
|
20
20
|
type Story = StoryObj<typeof meta>;
|
package/tsconfig.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"baseUrl": "./",
|
|
8
8
|
"paths": {
|
|
9
9
|
"~utils/*": ["./src/utils/*"],
|
|
10
|
-
"~
|
|
10
|
+
"~components": ["./src/components/index"],
|
|
11
11
|
"~svg": ["./src/svg/index"]
|
|
12
12
|
},
|
|
13
13
|
"lib": ["dom", "dom.iterable", "esnext"],
|
|
@@ -25,6 +25,14 @@
|
|
|
25
25
|
"incremental": true,
|
|
26
26
|
"plugins": [{ "name": "next" }]
|
|
27
27
|
},
|
|
28
|
-
"include": [
|
|
28
|
+
"include": [
|
|
29
|
+
"src",
|
|
30
|
+
"next-env.d.ts",
|
|
31
|
+
"**/*.ts",
|
|
32
|
+
"**/*.tsx",
|
|
33
|
+
"**/*.css",
|
|
34
|
+
".next/types/**/*.ts",
|
|
35
|
+
"@types"
|
|
36
|
+
],
|
|
29
37
|
"exclude": ["node_modules", "__tests__", "src/stories", "dist"]
|
|
30
38
|
}
|
|
File without changes
|