@inntechcorp/it-design 2.0.73 → 2.0.77

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,241 @@
1
+ .defaultInput {
2
+ height: 100%;
3
+ }
4
+
5
+ .floatingInput {
6
+ font-size: 13px;
7
+ color: rgba(0, 0, 0, 0.8509803922);
8
+ caret-color: rgba(0, 0, 0, 0.8509803922);
9
+ }
10
+
11
+ /* --------------------------------- */
12
+ .floatingInput::placeholder {
13
+ color: rgba(0, 0, 0, 0);
14
+ }
15
+
16
+ .floatingInput:disabled:not(.floatingInput[data-locked=true]) {
17
+ opacity: 0.5;
18
+ }
19
+
20
+ .floatingInput:disabled :not(.floatingInput[data-locked=true]) {
21
+ opacity: 0.5;
22
+ }
23
+
24
+ .floatingLabel {
25
+ display: block;
26
+ position: relative;
27
+ max-height: 0;
28
+ font-weight: 500;
29
+ pointer-events: none;
30
+ font-size: 16px;
31
+ }
32
+
33
+ .floatingLabel::before {
34
+ color: rgba(0, 0, 0, 0.6);
35
+ content: attr(data-content);
36
+ display: inline-block;
37
+ filter: blur(0);
38
+ backface-visibility: hidden;
39
+ transform-origin: left top;
40
+ transition: transform 0.2s ease-out;
41
+ position: relative;
42
+ }
43
+
44
+ .floatingInput:placeholder-shown + .floatingLabel::before {
45
+ transform: translate3d(0, -32px, 0) scale3d(0.8, 0.8, 1);
46
+ font-smooth: always;
47
+ -webkit-font-smoothing: antialiased;
48
+ }
49
+
50
+ .floatingLabel::before,
51
+ .floatingInput:focus + .floatingLabel::before {
52
+ transform: translate3d(0, -40px, 0) scale3d(0.8, 0.8, 1);
53
+ }
54
+
55
+ .floatingInput:focus + .floatingLabel::before {
56
+ color: rgba(0, 0, 0, 0.6);
57
+ }
58
+
59
+ .floatingInputinput:-webkit-autofill, .floatingInputinput:-webkit-autofill:focus, .floatingInputinput:-webkit-autofill:hover {
60
+ -webkit-text-fill-color: #3496fa !important;
61
+ -webkit-box-shadow: 0 0 0 30px #151d3d inset !important;
62
+ }
63
+
64
+ .arrow {
65
+ transition: all 0.25s ease-out;
66
+ margin-left: auto;
67
+ transform: rotate(0deg);
68
+ width: 20px;
69
+ height: 20px;
70
+ fill: rgba(255, 255, 255, 0.6);
71
+ }
72
+
73
+ .arrowNormal {
74
+ margin-left: auto;
75
+ transform: rotate(-90deg);
76
+ }
77
+
78
+ .arrowOpen {
79
+ transform: rotate(-180deg);
80
+ fill: #ffffff;
81
+ }
82
+
83
+ .icon {
84
+ margin-right: 8px;
85
+ height: 22px;
86
+ width: 22px;
87
+ color: rgba(255, 255, 255, 0.6);
88
+ font-size: 22px;
89
+ display: flex;
90
+ align-items: center;
91
+ }
92
+
93
+ .menu {
94
+ background-color: #050A20;
95
+ border-radius: 0 5px 5px 5px;
96
+ overflow: hidden;
97
+ position: absolute;
98
+ z-index: 2;
99
+ box-shadow: 0px 20px 20px rgba(0, 0, 0, 0.25);
100
+ transform-origin: 50% 1%;
101
+ transform-box: fill-box;
102
+ transition-timing-function: cubic-bezier(0.75, -0.5, 0, 1.25);
103
+ }
104
+ .menu ul {
105
+ min-width: max-content;
106
+ }
107
+
108
+ .bodyWrapper {
109
+ height: 300px;
110
+ }
111
+
112
+ .bodyWrapperLong {
113
+ height: 300px;
114
+ }
115
+
116
+ .bottom {
117
+ top: 100%;
118
+ }
119
+
120
+ .left {
121
+ left: 0;
122
+ }
123
+
124
+ /* -------------------------------- */
125
+ .menuEnter {
126
+ opacity: 0;
127
+ height: 50px;
128
+ }
129
+
130
+ .menuEnterActive {
131
+ opacity: 1;
132
+ height: 300px;
133
+ transition: height 150ms ease-out;
134
+ }
135
+
136
+ .menuExit {
137
+ opacity: 1;
138
+ }
139
+
140
+ .menuExitActive {
141
+ opacity: 0;
142
+ height: 300px;
143
+ transition: height 150ms ease-out;
144
+ }
145
+
146
+ /* -------------------------------- */
147
+ .menuEnterActiveLong {
148
+ opacity: 1;
149
+ height: 300px;
150
+ transition: height 150ms ease-out;
151
+ }
152
+
153
+ .menuExitActiveLong {
154
+ opacity: 0;
155
+ height: 300px;
156
+ transition: height 150ms ease-out;
157
+ }
158
+
159
+ .option {
160
+ display: flex;
161
+ align-items: center;
162
+ cursor: pointer;
163
+ min-width: max-content;
164
+ padding: 10px 30px 10px 15px;
165
+ }
166
+ .option:not(:last-child) {
167
+ margin-bottom: 1px;
168
+ }
169
+ .option:hover {
170
+ background-color: rgba(29, 38, 73, 0.5019607843);
171
+ }
172
+
173
+ .selected .single, .selected .option span {
174
+ color: #ffffff;
175
+ }
176
+
177
+ .single, .option span {
178
+ color: rgba(255, 255, 255, 0.6666666667);
179
+ font-weight: 400;
180
+ font-size: 12px;
181
+ line-height: 12px;
182
+ white-space: nowrap;
183
+ }
184
+
185
+ .container {
186
+ display: flex;
187
+ align-items: center;
188
+ cursor: pointer;
189
+ user-select: none;
190
+ }
191
+
192
+ .label {
193
+ display: flex;
194
+ align-items: center;
195
+ position: relative;
196
+ }
197
+ .label span {
198
+ font-size: 12px;
199
+ font-weight: 400;
200
+ color: rgba(255, 255, 255, 0.6);
201
+ line-height: 1.2;
202
+ margin-left: 10px;
203
+ }
204
+
205
+ .checkmark {
206
+ height: 20px;
207
+ width: 20px;
208
+ border-radius: 6px;
209
+ background-color: #1D2649;
210
+ transition: background-color 0.25sn ease-out;
211
+ display: flex;
212
+ justify-content: center;
213
+ align-items: center;
214
+ }
215
+ .checkmark svg {
216
+ fill: #ffffff;
217
+ visibility: hidden;
218
+ }
219
+
220
+ .check {
221
+ background-color: #3396FB;
222
+ }
223
+ .check svg {
224
+ visibility: visible;
225
+ animation: bounce 0.5s;
226
+ }
227
+
228
+ @keyframes bounce {
229
+ 0% {
230
+ transform: scale(0.2) rotate(4deg);
231
+ }
232
+ 50% {
233
+ transform: scale(1.2) rotate(-2deg);
234
+ }
235
+ 75% {
236
+ transform: scale(0.9) rotate(1deg);
237
+ }
238
+ 100% {
239
+ transform: scale(1) rotate(0deg);
240
+ }
241
+ }
@@ -0,0 +1,241 @@
1
+ .defaultInput {
2
+ height: 100%;
3
+ }
4
+
5
+ .floatingInput {
6
+ font-size: 13px;
7
+ color: rgba(0, 0, 0, 0.8509803922);
8
+ caret-color: rgba(0, 0, 0, 0.8509803922);
9
+ }
10
+
11
+ /* --------------------------------- */
12
+ .floatingInput::placeholder {
13
+ color: rgba(0, 0, 0, 0);
14
+ }
15
+
16
+ .floatingInput:disabled:not(.floatingInput[data-locked=true]) {
17
+ opacity: 0.5;
18
+ }
19
+
20
+ .floatingInput:disabled :not(.floatingInput[data-locked=true]) {
21
+ opacity: 0.5;
22
+ }
23
+
24
+ .floatingLabel {
25
+ display: block;
26
+ position: relative;
27
+ max-height: 0;
28
+ font-weight: 500;
29
+ pointer-events: none;
30
+ font-size: 16px;
31
+ }
32
+
33
+ .floatingLabel::before {
34
+ color: rgba(0, 0, 0, 0.6);
35
+ content: attr(data-content);
36
+ display: inline-block;
37
+ filter: blur(0);
38
+ backface-visibility: hidden;
39
+ transform-origin: left top;
40
+ transition: transform 0.2s ease-out;
41
+ position: relative;
42
+ }
43
+
44
+ .floatingInput:placeholder-shown + .floatingLabel::before {
45
+ transform: translate3d(0, -32px, 0) scale3d(0.8, 0.8, 1);
46
+ font-smooth: always;
47
+ -webkit-font-smoothing: antialiased;
48
+ }
49
+
50
+ .floatingLabel::before,
51
+ .floatingInput:focus + .floatingLabel::before {
52
+ transform: translate3d(0, -40px, 0) scale3d(0.8, 0.8, 1);
53
+ }
54
+
55
+ .floatingInput:focus + .floatingLabel::before {
56
+ color: rgba(0, 0, 0, 0.6);
57
+ }
58
+
59
+ .floatingInputinput:-webkit-autofill, .floatingInputinput:-webkit-autofill:focus, .floatingInputinput:-webkit-autofill:hover {
60
+ -webkit-text-fill-color: #3496fa !important;
61
+ -webkit-box-shadow: 0 0 0 30px #151d3d inset !important;
62
+ }
63
+
64
+ .arrow {
65
+ transition: all 0.25s ease-out;
66
+ margin-left: auto;
67
+ transform: rotate(0deg);
68
+ width: 20px;
69
+ height: 20px;
70
+ fill: rgba(255, 255, 255, 0.6);
71
+ }
72
+
73
+ .arrowNormal {
74
+ margin-left: auto;
75
+ transform: rotate(-90deg);
76
+ }
77
+
78
+ .arrowOpen {
79
+ transform: rotate(-180deg);
80
+ fill: #ffffff;
81
+ }
82
+
83
+ .icon {
84
+ margin-right: 8px;
85
+ height: 22px;
86
+ width: 22px;
87
+ color: rgba(255, 255, 255, 0.6);
88
+ font-size: 22px;
89
+ display: flex;
90
+ align-items: center;
91
+ }
92
+
93
+ .option {
94
+ display: flex;
95
+ align-items: center;
96
+ cursor: pointer;
97
+ min-width: max-content;
98
+ padding: 10px 30px 10px 15px;
99
+ }
100
+ .option:not(:last-child) {
101
+ margin-bottom: 1px;
102
+ }
103
+ .option:hover {
104
+ background-color: rgba(29, 38, 73, 0.5019607843);
105
+ }
106
+
107
+ .selected .single, .selected .option span {
108
+ color: #ffffff;
109
+ }
110
+
111
+ .single, .option span {
112
+ color: rgba(255, 255, 255, 0.6666666667);
113
+ font-weight: 400;
114
+ font-size: 12px;
115
+ line-height: 12px;
116
+ white-space: nowrap;
117
+ }
118
+
119
+ .menu {
120
+ background-color: #050A20;
121
+ border-radius: 0 5px 5px 5px;
122
+ overflow: hidden;
123
+ position: absolute;
124
+ z-index: 2;
125
+ box-shadow: 0px 20px 20px rgba(0, 0, 0, 0.25);
126
+ transform-origin: 50% 1%;
127
+ transform-box: fill-box;
128
+ transition-timing-function: cubic-bezier(0.75, -0.5, 0, 1.25);
129
+ }
130
+ .menu ul {
131
+ min-width: max-content;
132
+ }
133
+
134
+ .bodyWrapper {
135
+ height: 300px;
136
+ }
137
+
138
+ .bodyWrapperLong {
139
+ height: 300px;
140
+ }
141
+
142
+ .bottom {
143
+ top: 100%;
144
+ }
145
+
146
+ .left {
147
+ left: 0;
148
+ }
149
+
150
+ /* -------------------------------- */
151
+ .menuEnter {
152
+ opacity: 0;
153
+ height: 50px;
154
+ }
155
+
156
+ .menuEnterActive {
157
+ opacity: 1;
158
+ height: 300px;
159
+ transition: height 150ms ease-out;
160
+ }
161
+
162
+ .menuExit {
163
+ opacity: 1;
164
+ }
165
+
166
+ .menuExitActive {
167
+ opacity: 0;
168
+ height: 300px;
169
+ transition: height 150ms ease-out;
170
+ }
171
+
172
+ /* -------------------------------- */
173
+ .menuEnterActiveLong {
174
+ opacity: 1;
175
+ height: 300px;
176
+ transition: height 150ms ease-out;
177
+ }
178
+
179
+ .menuExitActiveLong {
180
+ opacity: 0;
181
+ height: 300px;
182
+ transition: height 150ms ease-out;
183
+ }
184
+
185
+ .container {
186
+ display: flex;
187
+ align-items: center;
188
+ cursor: pointer;
189
+ user-select: none;
190
+ }
191
+
192
+ .label {
193
+ display: flex;
194
+ align-items: center;
195
+ position: relative;
196
+ }
197
+ .label span {
198
+ font-size: 12px;
199
+ font-weight: 400;
200
+ color: rgba(255, 255, 255, 0.6);
201
+ line-height: 1.2;
202
+ margin-left: 10px;
203
+ }
204
+
205
+ .checkmark {
206
+ height: 20px;
207
+ width: 20px;
208
+ border-radius: 6px;
209
+ background-color: #1D2649;
210
+ transition: background-color 0.25sn ease-out;
211
+ display: flex;
212
+ justify-content: center;
213
+ align-items: center;
214
+ }
215
+ .checkmark svg {
216
+ fill: #ffffff;
217
+ visibility: hidden;
218
+ }
219
+
220
+ .check {
221
+ background-color: #3396FB;
222
+ }
223
+ .check svg {
224
+ visibility: visible;
225
+ animation: bounce 0.5s;
226
+ }
227
+
228
+ @keyframes bounce {
229
+ 0% {
230
+ transform: scale(0.2) rotate(4deg);
231
+ }
232
+ 50% {
233
+ transform: scale(1.2) rotate(-2deg);
234
+ }
235
+ 75% {
236
+ transform: scale(0.9) rotate(1deg);
237
+ }
238
+ 100% {
239
+ transform: scale(1) rotate(0deg);
240
+ }
241
+ }
@@ -1,17 +1,26 @@
1
1
  export declare const getImageSizeBySize: (size: string) => {
2
- width: string;
3
- height: string;
2
+ width: number;
3
+ height: number;
4
+ };
5
+ export declare const getArrowSizeBySize: (size: string) => {
6
+ width: number;
7
+ height: number;
4
8
  };
5
9
  export declare const getOptionSizeBySize: (size: string) => {
6
10
  padding: string;
7
- height: string;
11
+ height: number;
8
12
  };
9
13
  export declare const getSelectSizeBySize: (size: string) => {
10
- padding: string;
11
- height: string;
14
+ padding: {
15
+ top: string;
16
+ right: string;
17
+ bottom: string;
18
+ left: string;
19
+ };
20
+ height: number;
12
21
  };
13
22
  export declare const getFontSizeBySize: (size: string) => {
14
- fontSize: string;
15
- lineHeight: string;
16
- fontWeight: string;
23
+ fontSize: number;
24
+ lineHeight: number;
25
+ fontWeight: number;
17
26
  };
@@ -1,3 +1,3 @@
1
1
  import { SelectToggleProps } from '../../index';
2
- declare const Toggle: ({ id, label, value, errorMessage, isOpen, locked, labelType, placeholder, icon, image, size, selected, onChange }: SelectToggleProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const Toggle: ({ id, label, value, errorMessage, isOpen, locked, disabled, showSearch, labelType, placeholder, icon, image, size, selected, onFocus, onBlur }: SelectToggleProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Toggle;
@@ -1,9 +1,18 @@
1
+ /// <reference types="react" />
2
+ export type SingleLabelRefObject = {
3
+ setFocus: () => void;
4
+ };
1
5
  type SingleLabelProps = {
2
6
  id?: string;
3
7
  value: string | number | [];
4
- label: string | number | [];
5
- placeholder: string | number;
8
+ label: string;
9
+ placeholder: string;
6
10
  size: string;
11
+ isOpen: boolean;
12
+ showSearch: boolean;
13
+ disabled: boolean;
14
+ onFocus: () => void;
15
+ onBlur: () => void;
7
16
  };
8
- declare const SingleLabel: ({ id, value, label, placeholder, size }: SingleLabelProps) => import("react/jsx-runtime").JSX.Element;
17
+ declare const SingleLabel: import("react").ForwardRefExoticComponent<SingleLabelProps & import("react").RefAttributes<SingleLabelRefObject>>;
9
18
  export default SingleLabel;
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  declare const Wrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
- declare const InputWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
4
- declare const Label: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
5
- $size: string;
3
+ declare const InputWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {
4
+ $preventInteractions?: boolean | undefined;
6
5
  }>> & string;
7
- export { Wrapper, Label, InputWrapper };
6
+ export { Wrapper, InputWrapper };
@@ -2,5 +2,5 @@ import { ChildrenProps } from "types/ChildrenProps";
2
2
  import "./index.scss";
3
3
  declare const StoryRoot: ({ children }: {
4
4
  children: ChildrenProps;
5
- }) => import("react/jsx-runtime").JSX.Element;
5
+ }) => ChildrenProps;
6
6
  export default StoryRoot;
@@ -5,7 +5,7 @@ export type SelectProps = {
5
5
  id?: string;
6
6
  defaultValue?: string | number;
7
7
  value?: string | number;
8
- label?: string | number;
8
+ label?: string;
9
9
  position?: string;
10
10
  direction?: string;
11
11
  mode?: string;
@@ -16,6 +16,7 @@ export type SelectProps = {
16
16
  icon?: string;
17
17
  image?: string;
18
18
  disabled?: boolean;
19
+ showSearch?: boolean;
19
20
  locked?: boolean;
20
21
  floating?: boolean;
21
22
  children?: ReactElement<SelectOptionProps> | Array<ReactElement<SelectOptionProps>> | ChildrenProps;
@@ -24,17 +25,21 @@ export type SelectProps = {
24
25
  };
25
26
  export type SelectToggleProps = {
26
27
  id?: string;
27
- label: string | number | [];
28
+ label: string;
28
29
  value: string | number | [];
29
30
  errorMessage: string;
30
31
  isOpen: boolean;
32
+ showSearch: boolean;
31
33
  locked: boolean;
34
+ disabled: boolean;
32
35
  labelType: string;
33
36
  placeholder: string;
34
37
  icon: string;
35
38
  image: string;
36
39
  size: ITDSize;
37
40
  selected: SelectOptionProps;
41
+ onFocus: () => void;
42
+ onBlur: () => void;
38
43
  onChange: (open: boolean) => void;
39
44
  };
40
45
  export type SelectVariant = "default" | "solid" | "filled" | "outline" | "custom";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inntechcorp/it-design",
3
- "version": "2.0.73",
3
+ "version": "2.0.77",
4
4
  "description": "All in one Design library for desktop applications.",
5
5
  "author": "Inn.Tech",
6
6
  "license": "ISC",
@@ -99,13 +99,12 @@
99
99
  "dts-bundle-generator": "^9.5.1",
100
100
  "eslint-plugin-storybook": "0.8.0",
101
101
  "esm": "^3.2.25",
102
- "glob": "10.4.1",
103
102
  "less-loader": "12.2.0",
104
103
  "postcss-custom-properties": "13.3.10",
105
104
  "postcss-import": "16.1.0",
106
105
  "postcss-nesting": "12.1.5",
107
106
  "postcss-normalize": "^10.0.1",
108
- "postcss-preset-env": "9.5.14",
107
+ "postcss-preset-env": "^9.5.16",
109
108
  "react-app-rewired": "^2.2.1",
110
109
  "rollup": "4.18.0",
111
110
  "rollup-plugin-copy": "^3.5.0",
@@ -115,6 +114,7 @@
115
114
  "rollup-plugin-node-globals": "^1.4.0",
116
115
  "rollup-plugin-peer-deps-external": "^2.2.4",
117
116
  "rollup-plugin-postcss": "^4.0.2",
117
+ "rollup-plugin-scss": "^4.0.0",
118
118
  "rollup-plugin-sourcemaps": "^0.6.3",
119
119
  "rollup-plugin-styles": "4.0.0",
120
120
  "rollup-plugin-terser": "^7.0.2",
@@ -125,6 +125,7 @@
125
125
  "tslib": "^2.5.0",
126
126
  "typescript": "5.4.5",
127
127
  "vite": "5.2.12",
128
+ "vite-plugin-css-injected-by-js": "^3.5.1",
128
129
  "vite-plugin-dts": "^3.9.1",
129
130
  "vite-plugin-lib-inject-css": "2.1.1",
130
131
  "vite-plugin-node-polyfills": "0.22.0",