@inntechcorp/it-design 2.0.140 → 2.0.142

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
+ .option {
65
+ display: flex;
66
+ align-items: center;
67
+ cursor: pointer;
68
+ min-width: max-content;
69
+ padding: 10px 30px 10px 15px;
70
+ }
71
+ .option:not(:last-child) {
72
+ margin-bottom: 1px;
73
+ }
74
+ .option:hover {
75
+ background-color: rgba(29, 38, 73, 0.5019607843);
76
+ }
77
+
78
+ .selected .single, .selected .option span {
79
+ color: #ffffff;
80
+ }
81
+
82
+ .single, .option span {
83
+ color: rgba(255, 255, 255, 0.6666666667);
84
+ font-weight: 400;
85
+ font-size: 12px;
86
+ line-height: 12px;
87
+ white-space: nowrap;
88
+ }
89
+
90
+ .menu {
91
+ background-color: #050A20;
92
+ border-radius: 0 5px 5px 5px;
93
+ overflow: hidden;
94
+ position: absolute;
95
+ z-index: 2;
96
+ box-shadow: 0px 20px 20px rgba(0, 0, 0, 0.25);
97
+ transform-origin: 50% 1%;
98
+ transform-box: fill-box;
99
+ transition-timing-function: cubic-bezier(0.75, -0.5, 0, 1.25);
100
+ }
101
+ .menu ul {
102
+ min-width: max-content;
103
+ }
104
+
105
+ .bodyWrapper {
106
+ height: 300px;
107
+ }
108
+
109
+ .bodyWrapperLong {
110
+ height: 300px;
111
+ }
112
+
113
+ .bottom {
114
+ top: 100%;
115
+ }
116
+
117
+ .left {
118
+ left: 0;
119
+ }
120
+
121
+ /* -------------------------------- */
122
+ .menuEnter {
123
+ opacity: 0;
124
+ height: 50px;
125
+ }
126
+
127
+ .menuEnterActive {
128
+ opacity: 1;
129
+ height: 300px;
130
+ transition: height 150ms ease-out;
131
+ }
132
+
133
+ .menuExit {
134
+ opacity: 1;
135
+ }
136
+
137
+ .menuExitActive {
138
+ opacity: 0;
139
+ height: 300px;
140
+ transition: height 150ms ease-out;
141
+ }
142
+
143
+ /* -------------------------------- */
144
+ .menuEnterActiveLong {
145
+ opacity: 1;
146
+ height: 300px;
147
+ transition: height 150ms ease-out;
148
+ }
149
+
150
+ .menuExitActiveLong {
151
+ opacity: 0;
152
+ height: 300px;
153
+ transition: height 150ms ease-out;
154
+ }
155
+
156
+ .arrow {
157
+ transition: all 0.25s ease-out;
158
+ margin-left: auto;
159
+ transform: rotate(0deg);
160
+ width: 20px;
161
+ height: 20px;
162
+ fill: rgba(255, 255, 255, 0.6);
163
+ }
164
+
165
+ .arrowNormal {
166
+ margin-left: auto;
167
+ transform: rotate(-90deg);
168
+ }
169
+
170
+ .arrowOpen {
171
+ transform: rotate(-180deg);
172
+ fill: #ffffff;
173
+ }
174
+
175
+ .icon {
176
+ margin-right: 8px;
177
+ height: 22px;
178
+ width: 22px;
179
+ color: rgba(255, 255, 255, 0.6);
180
+ font-size: 22px;
181
+ display: flex;
182
+ align-items: center;
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
+ }
@@ -6,5 +6,4 @@ type SelectSubComponentProps = {
6
6
  };
7
7
  type SelectComponentProps = ForwardRefExoticComponent<PropsWithoutRef<SelectProps> & RefAttributes<ITDImperativeFuncProps>> & SelectSubComponentProps;
8
8
  declare const Select: SelectComponentProps;
9
- export { Option };
10
9
  export default Select;
@@ -1,7 +1,7 @@
1
1
  import { ChildrenProps } from 'types/ChildrenProps';
2
2
  import { SelectValue } from 'types/SelectProps';
3
3
  type MenuProps = {
4
- defaultValue?: SelectValue | SelectValue[];
4
+ defaultValue?: SelectValue | null;
5
5
  position: string;
6
6
  direction: string;
7
7
  multi: boolean;
@@ -1,17 +1,17 @@
1
1
  /// <reference types="react" />
2
- import { ChildrenProps } from 'types/ChildrenProps';
3
2
  import { SelectValue } from 'types/SelectProps';
4
- type OptionsRefProps = {
5
- getValue: () => SelectValue;
6
- };
7
- type OptionsProps = {
8
- icon?: string;
3
+ import { ChildrenProps } from 'types/ChildrenProps';
4
+ export type OptionsTypeProps = {
5
+ icon?: ChildrenProps;
9
6
  image?: string;
7
+ label?: ChildrenProps;
10
8
  value?: SelectValue;
11
9
  multi?: boolean;
12
- checked?: false;
13
- onChange?: (value: SelectValue, checked: boolean, children: ChildrenProps) => null;
14
- children?: ChildrenProps;
10
+ checked?: boolean;
11
+ onChange?: (value: SelectValue, checked: boolean, label: ChildrenProps) => null;
15
12
  };
16
- declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<OptionsProps & import("react").RefAttributes<OptionsRefProps>>>;
13
+ declare const _default: import("react").MemoExoticComponent<{
14
+ ({ multi, checked, icon, image, value, onChange, label }: OptionsTypeProps): import("react/jsx-runtime").JSX.Element;
15
+ displayName: string;
16
+ }>;
17
17
  export default _default;
@@ -1,3 +1,3 @@
1
1
  import { SelectToggleProps } from '../../index';
2
- declare const Toggle: ({ id, label, value, errorMessage, isOpen, locked, disabled, showSearch, labelType, placeholder, size, selected, icon, image, onFocus, onBlur, onShow, onFilter }: SelectToggleProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const Toggle: ({ id, errorMessage, isOpen, locked, disabled, showSearch, labelType, size, placeholder, value, label, icon, image, onFocus, onBlur, onShow, onFilter }: SelectToggleProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Toggle;
@@ -1,10 +1,11 @@
1
1
  import { SelectValue } from 'types/SelectProps';
2
+ import { ChildrenProps } from 'types/ChildrenProps';
2
3
  type FloatingLabelProps = {
3
4
  id?: string;
4
- value: SelectValue;
5
- label: SelectValue;
5
+ value?: SelectValue | null;
6
+ label?: ChildrenProps;
6
7
  placeholder: string;
7
8
  size: string;
8
9
  };
9
- declare const FloatingLabel: ({ id, value, label, placeholder, size }: FloatingLabelProps) => import("react/jsx-runtime").JSX.Element;
10
+ declare const FloatingLabel: ({ id, size, value, label, placeholder }: FloatingLabelProps) => import("react/jsx-runtime").JSX.Element;
10
11
  export default FloatingLabel;
@@ -1,13 +1,14 @@
1
1
  /// <reference types="react" />
2
2
  import { SelectValue } from 'types/SelectProps';
3
+ import { ChildrenProps } from 'types/ChildrenProps';
3
4
  export type SingleLabelRefObject = {
4
5
  setFocus: () => void;
5
6
  };
6
7
  type SingleLabelProps = {
7
8
  id?: string;
8
- value: SelectValue;
9
- label: string;
10
- placeholder: string;
9
+ value?: SelectValue | null;
10
+ label?: ChildrenProps;
11
+ placeholder?: string;
11
12
  size: string;
12
13
  isOpen: boolean;
13
14
  showSearch: boolean;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- type Element = string | JSX.Element | undefined;
2
+ type Element = string | number | JSX.Element | undefined;
3
3
  export type ChildrenProps = Element | Element[] | null;
4
4
  export {};
@@ -1,11 +1,11 @@
1
- import { CSSProperties, ReactElement } from "react";
2
- import { ChildrenProps } from "./ChildrenProps";
1
+ import { CSSProperties } from "react";
3
2
  import { ITDSize } from "../index";
3
+ import { ChildrenProps } from "./ChildrenProps";
4
4
  export type SelectProps = {
5
5
  id?: string;
6
- defaultValue?: SelectValue | SelectValue[];
7
- value?: SelectValue | SelectValue[];
8
- label?: string;
6
+ defaultValue?: SelectValue;
7
+ value?: SelectValue;
8
+ label?: ChildrenProps;
9
9
  position?: SelectPosition;
10
10
  direction?: SelectDirection;
11
11
  multi?: boolean;
@@ -20,15 +20,16 @@ export type SelectProps = {
20
20
  locked?: boolean;
21
21
  floating?: boolean;
22
22
  style?: CSSProperties;
23
- children?: ReactElement<SelectOptionProps> | Array<ReactElement<SelectOptionProps>> | ChildrenProps;
23
+ options?: SelectOptionProps[];
24
24
  onChange?: ((value: SelectValue) => void) | null;
25
25
  onUpdate?: ((value: SelectValue, update?: boolean, validation?: boolean) => void) | null;
26
26
  };
27
27
  export type SelectToggleProps = {
28
28
  id?: string;
29
- label: string;
30
- value?: SelectValue;
29
+ label?: ChildrenProps;
30
+ value?: SelectValue | null;
31
31
  errorMessage: string;
32
+ multi: boolean;
32
33
  isOpen: boolean;
33
34
  showSearch: boolean;
34
35
  locked: boolean;
@@ -38,18 +39,20 @@ export type SelectToggleProps = {
38
39
  icon?: string;
39
40
  image?: string;
40
41
  size: ITDSize;
41
- selected: SelectOptionProps;
42
42
  onFocus: () => void;
43
43
  onBlur: () => void;
44
44
  onShow: (value: boolean) => void;
45
45
  onFilter: (value: string) => void;
46
46
  onChange: (open: boolean) => void;
47
47
  };
48
- export type SelectValue = string | number | any[];
48
+ export type SelectOptionProps = {
49
+ label: ChildrenProps;
50
+ value: SelectValue;
51
+ icon?: ChildrenProps;
52
+ image?: string;
53
+ disabled?: boolean;
54
+ };
55
+ export type SelectValue = string | number | (string | number)[];
49
56
  export type SelectVariant = "default" | "solid" | "filled" | "outline" | "custom";
50
57
  export type SelectPosition = "top" | "bottom";
51
58
  export type SelectDirection = "right" | "left";
52
- export type SelectOptionProps = {
53
- value: string;
54
- children: string;
55
- };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inntechcorp/it-design",
3
- "version": "2.0.140",
3
+ "version": "2.0.142",
4
4
  "description": "All in one Design library for web applications.",
5
5
  "author": "Inn.Tech",
6
6
  "license": "ISC",