@inntechcorp/it-design 2.0.73 → 2.0.76

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,286 @@
1
+ .root *, .root :after, .root :before {
2
+ box-sizing: border-box;
3
+ -webkit-font-smoothing: antialiased;
4
+ font-family: "Inter", sans-serif;
5
+ font-size: 14px;
6
+ font-weight: 400;
7
+ }
8
+ .root button, .root input, .root optgroup, .root select, .root textarea, .root input::placeholder, .root textarea::placeholder {
9
+ font-family: inherit;
10
+ font-feature-settings: inherit;
11
+ font-variation-settings: inherit;
12
+ font-size: 100%;
13
+ font-weight: inherit;
14
+ line-height: inherit;
15
+ color: inherit;
16
+ margin: 0;
17
+ padding: 0;
18
+ text-transform: none;
19
+ }
20
+ .root [role=button], .root button {
21
+ cursor: pointer;
22
+ }
23
+ .root input {
24
+ background: transparent;
25
+ border: none;
26
+ }
27
+ .root [type=button], .root [type=reset], .root [type=submit], .root button {
28
+ background-color: transparent;
29
+ background-image: none;
30
+ }
31
+ .root a {
32
+ cursor: pointer;
33
+ color: #029CFD;
34
+ text-decoration: none;
35
+ }
36
+ .root a:hover {
37
+ color: #0083d4;
38
+ }
39
+ .root strong {
40
+ font-weight: 600;
41
+ }
42
+ .root input:focus-visible {
43
+ outline: none;
44
+ }
45
+
46
+ .defaultInput {
47
+ height: 100%;
48
+ }
49
+
50
+ .floatingInput {
51
+ font-size: 13px;
52
+ color: rgba(0, 0, 0, 0.8509803922);
53
+ caret-color: rgba(0, 0, 0, 0.8509803922);
54
+ }
55
+
56
+ /* --------------------------------- */
57
+ .floatingInput::placeholder {
58
+ color: rgba(0, 0, 0, 0);
59
+ }
60
+
61
+ .floatingInput:disabled:not(.floatingInput[data-locked=true]) {
62
+ opacity: 0.5;
63
+ }
64
+
65
+ .floatingInput:disabled :not(.floatingInput[data-locked=true]) {
66
+ opacity: 0.5;
67
+ }
68
+
69
+ .floatingLabel {
70
+ display: block;
71
+ position: relative;
72
+ max-height: 0;
73
+ font-weight: 500;
74
+ pointer-events: none;
75
+ font-size: 16px;
76
+ }
77
+
78
+ .floatingLabel::before {
79
+ color: rgba(0, 0, 0, 0.6);
80
+ content: attr(data-content);
81
+ display: inline-block;
82
+ filter: blur(0);
83
+ backface-visibility: hidden;
84
+ transform-origin: left top;
85
+ transition: transform 0.2s ease-out;
86
+ position: relative;
87
+ }
88
+
89
+ .floatingInput:placeholder-shown + .floatingLabel::before {
90
+ transform: translate3d(0, -32px, 0) scale3d(0.8, 0.8, 1);
91
+ font-smooth: always;
92
+ -webkit-font-smoothing: antialiased;
93
+ }
94
+
95
+ .floatingLabel::before,
96
+ .floatingInput:focus + .floatingLabel::before {
97
+ transform: translate3d(0, -40px, 0) scale3d(0.8, 0.8, 1);
98
+ }
99
+
100
+ .floatingInput:focus + .floatingLabel::before {
101
+ color: rgba(0, 0, 0, 0.6);
102
+ }
103
+
104
+ .floatingInputinput:-webkit-autofill, .floatingInputinput:-webkit-autofill:focus, .floatingInputinput:-webkit-autofill:hover {
105
+ -webkit-text-fill-color: #3496fa !important;
106
+ -webkit-box-shadow: 0 0 0 30px #151d3d inset !important;
107
+ }
108
+
109
+ .arrow {
110
+ transition: all 0.25s ease-out;
111
+ margin-left: auto;
112
+ transform: rotate(0deg);
113
+ width: 20px;
114
+ height: 20px;
115
+ fill: rgba(255, 255, 255, 0.6);
116
+ }
117
+
118
+ .arrowNormal {
119
+ margin-left: auto;
120
+ transform: rotate(-90deg);
121
+ }
122
+
123
+ .arrowOpen {
124
+ transform: rotate(-180deg);
125
+ fill: #ffffff;
126
+ }
127
+
128
+ .icon {
129
+ margin-right: 8px;
130
+ height: 22px;
131
+ width: 22px;
132
+ color: rgba(255, 255, 255, 0.6);
133
+ font-size: 22px;
134
+ display: flex;
135
+ align-items: center;
136
+ }
137
+
138
+ .menu {
139
+ background-color: #050A20;
140
+ border-radius: 0 5px 5px 5px;
141
+ overflow: hidden;
142
+ position: absolute;
143
+ z-index: 2;
144
+ box-shadow: 0px 20px 20px rgba(0, 0, 0, 0.25);
145
+ transform-origin: 50% 1%;
146
+ transform-box: fill-box;
147
+ transition-timing-function: cubic-bezier(0.75, -0.5, 0, 1.25);
148
+ }
149
+ .menu ul {
150
+ min-width: max-content;
151
+ }
152
+
153
+ .bodyWrapper {
154
+ height: 300px;
155
+ }
156
+
157
+ .bodyWrapperLong {
158
+ height: 300px;
159
+ }
160
+
161
+ .bottom {
162
+ top: 100%;
163
+ }
164
+
165
+ .left {
166
+ left: 0;
167
+ }
168
+
169
+ /* -------------------------------- */
170
+ .menuEnter {
171
+ opacity: 0;
172
+ height: 50px;
173
+ }
174
+
175
+ .menuEnterActive {
176
+ opacity: 1;
177
+ height: 300px;
178
+ transition: height 150ms ease-out;
179
+ }
180
+
181
+ .menuExit {
182
+ opacity: 1;
183
+ }
184
+
185
+ .menuExitActive {
186
+ opacity: 0;
187
+ height: 300px;
188
+ transition: height 150ms ease-out;
189
+ }
190
+
191
+ /* -------------------------------- */
192
+ .menuEnterActiveLong {
193
+ opacity: 1;
194
+ height: 300px;
195
+ transition: height 150ms ease-out;
196
+ }
197
+
198
+ .menuExitActiveLong {
199
+ opacity: 0;
200
+ height: 300px;
201
+ transition: height 150ms ease-out;
202
+ }
203
+
204
+ .option {
205
+ display: flex;
206
+ align-items: center;
207
+ cursor: pointer;
208
+ min-width: max-content;
209
+ padding: 10px 30px 10px 15px;
210
+ }
211
+ .option:not(:last-child) {
212
+ margin-bottom: 1px;
213
+ }
214
+ .option:hover {
215
+ background-color: rgba(29, 38, 73, 0.5019607843);
216
+ }
217
+
218
+ .selected .single, .selected .option span {
219
+ color: #ffffff;
220
+ }
221
+
222
+ .single, .option span {
223
+ color: rgba(255, 255, 255, 0.6666666667);
224
+ font-weight: 400;
225
+ font-size: 12px;
226
+ line-height: 12px;
227
+ white-space: nowrap;
228
+ }
229
+
230
+ .container {
231
+ display: flex;
232
+ align-items: center;
233
+ cursor: pointer;
234
+ user-select: none;
235
+ }
236
+
237
+ .label {
238
+ display: flex;
239
+ align-items: center;
240
+ position: relative;
241
+ }
242
+ .label span {
243
+ font-size: 12px;
244
+ font-weight: 400;
245
+ color: rgba(255, 255, 255, 0.6);
246
+ line-height: 1.2;
247
+ margin-left: 10px;
248
+ }
249
+
250
+ .checkmark {
251
+ height: 20px;
252
+ width: 20px;
253
+ border-radius: 6px;
254
+ background-color: #1D2649;
255
+ transition: background-color 0.25sn ease-out;
256
+ display: flex;
257
+ justify-content: center;
258
+ align-items: center;
259
+ }
260
+ .checkmark svg {
261
+ fill: #ffffff;
262
+ visibility: hidden;
263
+ }
264
+
265
+ .check {
266
+ background-color: #3396FB;
267
+ }
268
+ .check svg {
269
+ visibility: visible;
270
+ animation: bounce 0.5s;
271
+ }
272
+
273
+ @keyframes bounce {
274
+ 0% {
275
+ transform: scale(0.2) rotate(4deg);
276
+ }
277
+ 50% {
278
+ transform: scale(1.2) rotate(-2deg);
279
+ }
280
+ 75% {
281
+ transform: scale(0.9) rotate(1deg);
282
+ }
283
+ 100% {
284
+ transform: scale(1) rotate(0deg);
285
+ }
286
+ }
@@ -0,0 +1,286 @@
1
+ .root *, .root :after, .root :before {
2
+ box-sizing: border-box;
3
+ -webkit-font-smoothing: antialiased;
4
+ font-family: "Inter", sans-serif;
5
+ font-size: 14px;
6
+ font-weight: 400;
7
+ }
8
+ .root button, .root input, .root optgroup, .root select, .root textarea, .root input::placeholder, .root textarea::placeholder {
9
+ font-family: inherit;
10
+ font-feature-settings: inherit;
11
+ font-variation-settings: inherit;
12
+ font-size: 100%;
13
+ font-weight: inherit;
14
+ line-height: inherit;
15
+ color: inherit;
16
+ margin: 0;
17
+ padding: 0;
18
+ text-transform: none;
19
+ }
20
+ .root [role=button], .root button {
21
+ cursor: pointer;
22
+ }
23
+ .root input {
24
+ background: transparent;
25
+ border: none;
26
+ }
27
+ .root [type=button], .root [type=reset], .root [type=submit], .root button {
28
+ background-color: transparent;
29
+ background-image: none;
30
+ }
31
+ .root a {
32
+ cursor: pointer;
33
+ color: #029CFD;
34
+ text-decoration: none;
35
+ }
36
+ .root a:hover {
37
+ color: #0083d4;
38
+ }
39
+ .root strong {
40
+ font-weight: 600;
41
+ }
42
+ .root input:focus-visible {
43
+ outline: none;
44
+ }
45
+
46
+ .defaultInput {
47
+ height: 100%;
48
+ }
49
+
50
+ .floatingInput {
51
+ font-size: 13px;
52
+ color: rgba(0, 0, 0, 0.8509803922);
53
+ caret-color: rgba(0, 0, 0, 0.8509803922);
54
+ }
55
+
56
+ /* --------------------------------- */
57
+ .floatingInput::placeholder {
58
+ color: rgba(0, 0, 0, 0);
59
+ }
60
+
61
+ .floatingInput:disabled:not(.floatingInput[data-locked=true]) {
62
+ opacity: 0.5;
63
+ }
64
+
65
+ .floatingInput:disabled :not(.floatingInput[data-locked=true]) {
66
+ opacity: 0.5;
67
+ }
68
+
69
+ .floatingLabel {
70
+ display: block;
71
+ position: relative;
72
+ max-height: 0;
73
+ font-weight: 500;
74
+ pointer-events: none;
75
+ font-size: 16px;
76
+ }
77
+
78
+ .floatingLabel::before {
79
+ color: rgba(0, 0, 0, 0.6);
80
+ content: attr(data-content);
81
+ display: inline-block;
82
+ filter: blur(0);
83
+ backface-visibility: hidden;
84
+ transform-origin: left top;
85
+ transition: transform 0.2s ease-out;
86
+ position: relative;
87
+ }
88
+
89
+ .floatingInput:placeholder-shown + .floatingLabel::before {
90
+ transform: translate3d(0, -32px, 0) scale3d(0.8, 0.8, 1);
91
+ font-smooth: always;
92
+ -webkit-font-smoothing: antialiased;
93
+ }
94
+
95
+ .floatingLabel::before,
96
+ .floatingInput:focus + .floatingLabel::before {
97
+ transform: translate3d(0, -40px, 0) scale3d(0.8, 0.8, 1);
98
+ }
99
+
100
+ .floatingInput:focus + .floatingLabel::before {
101
+ color: rgba(0, 0, 0, 0.6);
102
+ }
103
+
104
+ .floatingInputinput:-webkit-autofill, .floatingInputinput:-webkit-autofill:focus, .floatingInputinput:-webkit-autofill:hover {
105
+ -webkit-text-fill-color: #3496fa !important;
106
+ -webkit-box-shadow: 0 0 0 30px #151d3d inset !important;
107
+ }
108
+
109
+ .option {
110
+ display: flex;
111
+ align-items: center;
112
+ cursor: pointer;
113
+ min-width: max-content;
114
+ padding: 10px 30px 10px 15px;
115
+ }
116
+ .option:not(:last-child) {
117
+ margin-bottom: 1px;
118
+ }
119
+ .option:hover {
120
+ background-color: rgba(29, 38, 73, 0.5019607843);
121
+ }
122
+
123
+ .selected .single, .selected .option span {
124
+ color: #ffffff;
125
+ }
126
+
127
+ .single, .option span {
128
+ color: rgba(255, 255, 255, 0.6666666667);
129
+ font-weight: 400;
130
+ font-size: 12px;
131
+ line-height: 12px;
132
+ white-space: nowrap;
133
+ }
134
+
135
+ .menu {
136
+ background-color: #050A20;
137
+ border-radius: 0 5px 5px 5px;
138
+ overflow: hidden;
139
+ position: absolute;
140
+ z-index: 2;
141
+ box-shadow: 0px 20px 20px rgba(0, 0, 0, 0.25);
142
+ transform-origin: 50% 1%;
143
+ transform-box: fill-box;
144
+ transition-timing-function: cubic-bezier(0.75, -0.5, 0, 1.25);
145
+ }
146
+ .menu ul {
147
+ min-width: max-content;
148
+ }
149
+
150
+ .bodyWrapper {
151
+ height: 300px;
152
+ }
153
+
154
+ .bodyWrapperLong {
155
+ height: 300px;
156
+ }
157
+
158
+ .bottom {
159
+ top: 100%;
160
+ }
161
+
162
+ .left {
163
+ left: 0;
164
+ }
165
+
166
+ /* -------------------------------- */
167
+ .menuEnter {
168
+ opacity: 0;
169
+ height: 50px;
170
+ }
171
+
172
+ .menuEnterActive {
173
+ opacity: 1;
174
+ height: 300px;
175
+ transition: height 150ms ease-out;
176
+ }
177
+
178
+ .menuExit {
179
+ opacity: 1;
180
+ }
181
+
182
+ .menuExitActive {
183
+ opacity: 0;
184
+ height: 300px;
185
+ transition: height 150ms ease-out;
186
+ }
187
+
188
+ /* -------------------------------- */
189
+ .menuEnterActiveLong {
190
+ opacity: 1;
191
+ height: 300px;
192
+ transition: height 150ms ease-out;
193
+ }
194
+
195
+ .menuExitActiveLong {
196
+ opacity: 0;
197
+ height: 300px;
198
+ transition: height 150ms ease-out;
199
+ }
200
+
201
+ .arrow {
202
+ transition: all 0.25s ease-out;
203
+ margin-left: auto;
204
+ transform: rotate(0deg);
205
+ width: 20px;
206
+ height: 20px;
207
+ fill: rgba(255, 255, 255, 0.6);
208
+ }
209
+
210
+ .arrowNormal {
211
+ margin-left: auto;
212
+ transform: rotate(-90deg);
213
+ }
214
+
215
+ .arrowOpen {
216
+ transform: rotate(-180deg);
217
+ fill: #ffffff;
218
+ }
219
+
220
+ .icon {
221
+ margin-right: 8px;
222
+ height: 22px;
223
+ width: 22px;
224
+ color: rgba(255, 255, 255, 0.6);
225
+ font-size: 22px;
226
+ display: flex;
227
+ align-items: center;
228
+ }
229
+
230
+ .container {
231
+ display: flex;
232
+ align-items: center;
233
+ cursor: pointer;
234
+ user-select: none;
235
+ }
236
+
237
+ .label {
238
+ display: flex;
239
+ align-items: center;
240
+ position: relative;
241
+ }
242
+ .label span {
243
+ font-size: 12px;
244
+ font-weight: 400;
245
+ color: rgba(255, 255, 255, 0.6);
246
+ line-height: 1.2;
247
+ margin-left: 10px;
248
+ }
249
+
250
+ .checkmark {
251
+ height: 20px;
252
+ width: 20px;
253
+ border-radius: 6px;
254
+ background-color: #1D2649;
255
+ transition: background-color 0.25sn ease-out;
256
+ display: flex;
257
+ justify-content: center;
258
+ align-items: center;
259
+ }
260
+ .checkmark svg {
261
+ fill: #ffffff;
262
+ visibility: hidden;
263
+ }
264
+
265
+ .check {
266
+ background-color: #3396FB;
267
+ }
268
+ .check svg {
269
+ visibility: visible;
270
+ animation: bounce 0.5s;
271
+ }
272
+
273
+ @keyframes bounce {
274
+ 0% {
275
+ transform: scale(0.2) rotate(4deg);
276
+ }
277
+ 50% {
278
+ transform: scale(1.2) rotate(-2deg);
279
+ }
280
+ 75% {
281
+ transform: scale(0.9) rotate(1deg);
282
+ }
283
+ 100% {
284
+ transform: scale(1) rotate(0deg);
285
+ }
286
+ }
@@ -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.76",
4
4
  "description": "All in one Design library for desktop applications.",
5
5
  "author": "Inn.Tech",
6
6
  "license": "ISC",
@@ -115,6 +115,7 @@
115
115
  "rollup-plugin-node-globals": "^1.4.0",
116
116
  "rollup-plugin-peer-deps-external": "^2.2.4",
117
117
  "rollup-plugin-postcss": "^4.0.2",
118
+ "rollup-plugin-scss": "^4.0.0",
118
119
  "rollup-plugin-sourcemaps": "^0.6.3",
119
120
  "rollup-plugin-styles": "4.0.0",
120
121
  "rollup-plugin-terser": "^7.0.2",