@egov3/system-design 1.0.25 → 1.0.29

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 (114) hide show
  1. package/README.md +984 -1
  2. package/dist/cjs/components/Button/Button.d.ts +6 -0
  3. package/dist/cjs/components/Button/Button.stories.d.ts +6 -0
  4. package/dist/cjs/components/Button/Button.test.d.ts +1 -0
  5. package/dist/cjs/components/Button/index.d.ts +1 -0
  6. package/dist/cjs/components/index.d.ts +4 -0
  7. package/dist/cjs/index.d.ts +1 -0
  8. package/dist/cjs/index.js +2825 -0
  9. package/dist/cjs/index.js.map +1 -0
  10. package/dist/cjs/stories/Button.d.ts +28 -0
  11. package/dist/cjs/stories/Button.stories.d.ts +8 -0
  12. package/dist/cjs/stories/Header.d.ts +9 -0
  13. package/dist/cjs/stories/Header.stories.d.ts +6 -0
  14. package/dist/cjs/stories/Page.d.ts +9 -0
  15. package/dist/cjs/stories/Page.stories.d.ts +6 -0
  16. package/dist/esm/components/Button/Button.d.ts +6 -0
  17. package/dist/esm/components/Button/Button.stories.d.ts +6 -0
  18. package/dist/esm/components/Button/Button.test.d.ts +1 -0
  19. package/dist/esm/components/Button/index.d.ts +1 -0
  20. package/dist/esm/components/index.d.ts +4 -0
  21. package/dist/esm/index.d.ts +12 -0
  22. package/dist/esm/index.js +2821 -0
  23. package/dist/esm/index.js.map +1 -0
  24. package/dist/esm/stories/Button.d.ts +28 -0
  25. package/dist/esm/stories/Button.stories.d.ts +8 -0
  26. package/dist/esm/stories/Header.d.ts +9 -0
  27. package/dist/esm/stories/Header.stories.d.ts +6 -0
  28. package/dist/esm/stories/Page.d.ts +9 -0
  29. package/dist/esm/stories/Page.stories.d.ts +6 -0
  30. package/package.json +51 -76
  31. package/.github/workflows/publish.yml +0 -61
  32. package/@types/scss-modules.d.ts +0 -5
  33. package/__tests__/components/InputField.test.tsx +0 -101
  34. package/index.d.ts +0 -7
  35. package/index.d.ts.map +0 -1
  36. package/index.js +0 -5
  37. package/index.tsx +0 -4
  38. package/jest.config.d.ts +0 -3
  39. package/jest.config.d.ts.map +0 -1
  40. package/jest.config.js +0 -46
  41. package/jest.config.ts +0 -45
  42. package/jest.setup.d.ts +0 -2
  43. package/jest.setup.d.ts.map +0 -1
  44. package/jest.setup.js +0 -4
  45. package/jest.setup.ts +0 -2
  46. package/public/NationalEmblem.webp +0 -0
  47. package/public/favicon.ico +0 -0
  48. package/public/fonts/Inter-Regular.ttf +0 -0
  49. package/public/img/Circled-1.svg +0 -11
  50. package/public/img/Circled-2.svg +0 -11
  51. package/public/img/Circled-3.svg +0 -11
  52. package/public/img/Mobile-chat.svg +0 -12
  53. package/public/img/accessibility-1.svg +0 -3
  54. package/public/img/account-1.svg +0 -3
  55. package/public/img/bg/Auth-bg.webp +0 -0
  56. package/public/img/bg/Autumn-bg.webp +0 -0
  57. package/public/img/bg/Msg-bg.webp +0 -0
  58. package/public/img/bg/Spring-bg.webp +0 -0
  59. package/public/img/bg/Summer-bg.webp +0 -0
  60. package/public/img/bg/Winter-bg.webp +0 -0
  61. package/public/img/car.svg +0 -3
  62. package/public/img/egov-logo.png +0 -0
  63. package/public/img/language-1.svg +0 -5
  64. package/public/img/logo.svg +0 -7
  65. package/src/app/page.d.ts +0 -1
  66. package/src/app/page.d.ts.map +0 -1
  67. package/src/app/page.js +0 -1
  68. package/src/app/page.tsx +0 -0
  69. package/src/components/InputField/InputField.module.scss +0 -57
  70. package/src/components/InputField/index.d.ts +0 -20
  71. package/src/components/InputField/index.d.ts.map +0 -1
  72. package/src/components/InputField/index.js +0 -60
  73. package/src/components/InputField/index.tsx +0 -108
  74. package/src/components/index.d.ts +0 -4
  75. package/src/components/index.d.ts.map +0 -1
  76. package/src/components/index.js +0 -5
  77. package/src/components/index.tsx +0 -3
  78. package/src/stories/CardWrapperItem.tsx +0 -29
  79. package/src/stories/Configure.tsx +0 -494
  80. package/src/stories/assets/accessibility.png +0 -0
  81. package/src/stories/assets/accessibility.svg +0 -5
  82. package/src/stories/assets/addon-library.png +0 -0
  83. package/src/stories/assets/assets.png +0 -0
  84. package/src/stories/assets/avif-test-image.avif +0 -0
  85. package/src/stories/assets/context.png +0 -0
  86. package/src/stories/assets/discord.svg +0 -15
  87. package/src/stories/assets/docs.png +0 -0
  88. package/src/stories/assets/figma-plugin.png +0 -0
  89. package/src/stories/assets/github.svg +0 -3
  90. package/src/stories/assets/share.png +0 -0
  91. package/src/stories/assets/styling.png +0 -0
  92. package/src/stories/assets/testing.png +0 -0
  93. package/src/stories/assets/theming.png +0 -0
  94. package/src/stories/assets/tutorials.svg +0 -12
  95. package/src/stories/assets/youtube.svg +0 -4
  96. package/src/stories/components/Button.stories.tsx +0 -127
  97. package/src/styles/colors.module.scss +0 -42
  98. package/src/styles/globals.scss +0 -43
  99. package/src/styles/structure.module.scss +0 -60
  100. package/src/styles/typography.module.scss +0 -120
  101. package/src/svg/ClearIcon.d.ts +0 -5
  102. package/src/svg/ClearIcon.d.ts.map +0 -1
  103. package/src/svg/ClearIcon.js +0 -12
  104. package/src/svg/ClearIcon.tsx +0 -26
  105. package/src/svg/index.d.ts +0 -3
  106. package/src/svg/index.d.ts.map +0 -1
  107. package/src/svg/index.js +0 -5
  108. package/src/svg/index.tsx +0 -3
  109. package/src/utils/ClassNamesFn.d.ts +0 -2
  110. package/src/utils/ClassNamesFn.d.ts.map +0 -1
  111. package/src/utils/ClassNamesFn.js +0 -5
  112. package/src/utils/ClassNamesFn.tsx +0 -2
  113. package/tsconfig.json +0 -39
  114. package/tsconfig.tsbuildinfo +0 -1
@@ -1,57 +0,0 @@
1
- @import '/src/styles/colors.module';
2
- @import '/src/styles/typography.module';
3
-
4
- .inputContainer {
5
- display: flex;
6
- align-items: center;
7
- background-color: $Surface-Surface-1;
8
- border-radius: 8px;
9
- padding: 12px 16px;
10
- }
11
-
12
- .inputContainerLabeled {
13
- display: block;
14
- background-color: $Surface-Surface-1;
15
- border-radius: 8px;
16
- padding: 12px 16px;
17
-
18
- label {
19
- color: $Text-Secondary;
20
- }
21
- }
22
-
23
- .input {
24
- width: 100%;
25
- border: none;
26
- background-color: $Surface-Surface-1;
27
-
28
- &:active,
29
- &:focus {
30
- outline: none;
31
- }
32
-
33
- &::placeholder {
34
- color: $Text-Disabled-color;
35
- }
36
-
37
- &::-webkit-inner-spin-button,
38
- &::-webkit-outer-spin-button {
39
- -webkit-appearance: none;
40
- margin: 0;
41
- }
42
- }
43
-
44
- .clearIcon {
45
- cursor: pointer;
46
- }
47
-
48
- .input--onfocus {
49
- background-color: $Surface-Surface-3-color;
50
- .input {
51
- background-color: $Surface-Surface-3-color;
52
- }
53
- }
54
-
55
- .input-text {
56
- @include Body1Regular;
57
- }
@@ -1,20 +0,0 @@
1
- import React, { HTMLInputTypeAttribute } from "react";
2
- export type TOtpType = "OTP" | "TEXT";
3
- export interface IInputFieldProps {
4
- onFocus?: () => void;
5
- onBlur?: () => void;
6
- onEnterPress?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
7
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
8
- value?: string;
9
- placeholder?: string;
10
- className?: string;
11
- style?: React.CSSProperties;
12
- isClearable?: boolean;
13
- inputLeftIcon?: JSX.Element;
14
- type?: HTMLInputTypeAttribute;
15
- id: string;
16
- labelText?: string;
17
- ariaLabel: string;
18
- }
19
- export declare const InputField: ({ onFocus, onBlur, onChange, onEnterPress, value, inputLeftIcon, placeholder, className, style, isClearable, type, id, labelText, ariaLabel, }: IInputFieldProps) => React.ReactNode;
20
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,sBAAsB,EAAY,MAAM,OAAO,CAAC;AAOhE,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;AAEtC,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACtE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC5B,IAAI,CAAC,EAAE,sBAAsB,CAAC;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,UAAU,mJAepB,gBAAgB,KAAG,KAAK,CAAC,SAgE3B,CAAC"}
@@ -1,60 +0,0 @@
1
- "use strict";
2
- "use client";
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || function (mod) {
20
- if (mod && mod.__esModule) return mod;
21
- var result = {};
22
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
- __setModuleDefault(result, mod);
24
- return result;
25
- };
26
- var __importDefault = (this && this.__importDefault) || function (mod) {
27
- return (mod && mod.__esModule) ? mod : { "default": mod };
28
- };
29
- Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.InputField = void 0;
31
- const jsx_runtime_1 = require("react/jsx-runtime");
32
- const react_1 = __importStar(require("react"));
33
- const ClassNamesFn_1 = require("~utils/ClassNamesFn");
34
- const InputField_module_scss_1 = __importDefault(require("./InputField.module.scss"));
35
- const _svg_1 = require("~svg");
36
- const InputField = ({ onFocus, onBlur, onChange, onEnterPress, value = "", inputLeftIcon, placeholder = "", className = "", style, isClearable = false, type = "text", id, labelText = "", ariaLabel = "", }) => {
37
- const [focused, setFocused] = (0, react_1.useState)(false);
38
- return ((0, jsx_runtime_1.jsxs)("div", { "data-testid": "InputField_MAIN", className: (0, ClassNamesFn_1.ClassNamesFn)(InputField_module_scss_1.default[labelText.length ? "inputContainerLabeled" : "inputContainer"], className, focused ? InputField_module_scss_1.default[`input--onfocus`] : undefined, InputField_module_scss_1.default[`input-${type === null || type === void 0 ? void 0 : type.toLocaleLowerCase()}`]), style: style, children: [labelText.length > 0 && ((0, jsx_runtime_1.jsx)("label", { htmlFor: id, "data-testid": "InputField_LABEL", children: labelText })), inputLeftIcon, (0, jsx_runtime_1.jsx)("input", { "data-testid": "InputField_INPUT", "aria-label": ariaLabel, id: id, type: type, className: InputField_module_scss_1.default.input, placeholder: placeholder, "aria-placeholder": placeholder, onFocus: () => {
39
- setFocused(true);
40
- if (onFocus) {
41
- onFocus();
42
- }
43
- }, onBlur: () => {
44
- setFocused(false);
45
- if (onBlur) {
46
- onBlur();
47
- }
48
- }, onChange: onChange, onKeyDown: (event) => {
49
- if (onEnterPress && event.key === "Enter") {
50
- onEnterPress(event);
51
- }
52
- }, value: value, readOnly: !onChange }), isClearable && value && ((0, jsx_runtime_1.jsx)(_svg_1.ClearIcon, { fill: "red", pathFill: "#758393", className: InputField_module_scss_1.default.clearIcon, onClick: () => {
53
- if (onChange) {
54
- onChange({
55
- target: { value: "" },
56
- });
57
- }
58
- } }))] }));
59
- };
60
- exports.InputField = InputField;
@@ -1,108 +0,0 @@
1
- "use client";
2
-
3
- import React, { HTMLInputTypeAttribute, useState } from "react";
4
-
5
- import { ClassNamesFn } from "~utils/ClassNamesFn";
6
-
7
- import styles from "./InputField.module.scss";
8
- import { ClearIcon } from "~svg";
9
-
10
- export type TOtpType = "OTP" | "TEXT";
11
-
12
- export interface IInputFieldProps {
13
- onFocus?: () => void;
14
- onBlur?: () => void;
15
- onEnterPress?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
16
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
17
- value?: string;
18
- placeholder?: string;
19
- className?: string;
20
- style?: React.CSSProperties;
21
- isClearable?: boolean;
22
- inputLeftIcon?: JSX.Element;
23
- type?: HTMLInputTypeAttribute;
24
- id: string;
25
- labelText?: string;
26
- ariaLabel: string;
27
- }
28
-
29
- export const InputField = ({
30
- onFocus,
31
- onBlur,
32
- onChange,
33
- onEnterPress,
34
- value = "",
35
- inputLeftIcon,
36
- placeholder = "",
37
- className = "",
38
- style,
39
- isClearable = false,
40
- type = "text",
41
- id,
42
- labelText = "",
43
- ariaLabel = "",
44
- }: IInputFieldProps): React.ReactNode => {
45
- const [focused, setFocused] = useState<boolean>(false);
46
- return (
47
- <div
48
- data-testid="InputField_MAIN"
49
- className={ClassNamesFn(
50
- styles[labelText.length ? "inputContainerLabeled" : "inputContainer"],
51
- className,
52
- focused ? styles[`input--onfocus`] : undefined,
53
- styles[`input-${type?.toLocaleLowerCase()}`]
54
- )}
55
- style={style}
56
- >
57
- {labelText.length > 0 && (
58
- <label htmlFor={id} data-testid="InputField_LABEL">
59
- {labelText}
60
- </label>
61
- )}
62
- {inputLeftIcon}
63
- <input
64
- data-testid="InputField_INPUT"
65
- aria-label={ariaLabel}
66
- id={id}
67
- type={type}
68
- className={styles.input}
69
- placeholder={placeholder}
70
- aria-placeholder={placeholder}
71
- onFocus={() => {
72
- setFocused(true);
73
- if (onFocus) {
74
- onFocus();
75
- }
76
- }}
77
- onBlur={() => {
78
- setFocused(false);
79
- if (onBlur) {
80
- onBlur();
81
- }
82
- }}
83
- onChange={onChange}
84
- onKeyDown={(event: React.KeyboardEvent<HTMLInputElement>) => {
85
- if (onEnterPress && event.key === "Enter") {
86
- onEnterPress(event);
87
- }
88
- }}
89
- value={value}
90
- readOnly={!onChange}
91
- />
92
- {isClearable && value && (
93
- <ClearIcon
94
- fill="red"
95
- pathFill="#758393"
96
- className={styles.clearIcon}
97
- onClick={() => {
98
- if (onChange) {
99
- onChange({
100
- target: { value: "" },
101
- } as React.ChangeEvent<HTMLInputElement>);
102
- }
103
- }}
104
- />
105
- )}
106
- </div>
107
- );
108
- };
@@ -1,4 +0,0 @@
1
- export declare const Components: {
2
- InputField: ({ onFocus, onBlur, onChange, onEnterPress, value, inputLeftIcon, placeholder, className, style, isClearable, type, id, labelText, ariaLabel, }: import("./InputField").IInputFieldProps) => React.ReactNode;
3
- };
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU;;CAAiB,CAAC"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Components = void 0;
4
- const InputField_1 = require("./InputField");
5
- exports.Components = { InputField: InputField_1.InputField };
@@ -1,3 +0,0 @@
1
- import { InputField } from "./InputField";
2
-
3
- export const Components = { InputField };
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
-
3
- export const CardWrapperItem = ({
4
- children,
5
- }: {
6
- children: React.ReactNode;
7
- }) => (
8
- <div
9
- style={{
10
- display: 'flex',
11
- justifyContent: 'center',
12
- minHeight: '100px',
13
- }}
14
- >
15
- <div
16
- style={{
17
- backgroundColor: 'bisque',
18
- padding: '9px',
19
- display: 'flex',
20
- width: '80%',
21
- flexDirection: 'column',
22
- borderRadius: '20px',
23
- justifyContent: 'center',
24
- }}
25
- >
26
- {children}
27
- </div>
28
- </div>
29
- );