@e1011/es-kit 1.0.234 → 1.1.0
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/dist/hooks/esm/index.css +83 -9
- package/dist/hooks/index.css +83 -9
- package/dist/lib/cjs/index.css +74 -0
- package/dist/lib/cjs/src/core/ui/components/field/Field.js +1 -1
- package/dist/lib/cjs/src/core/ui/components/field/Field.js.map +1 -1
- package/dist/lib/cjs/src/core/ui/components/field/field.module.scss.js +2 -0
- package/dist/lib/cjs/src/core/ui/components/field/field.module.scss.js.map +1 -0
- package/dist/lib/cjs/src/index.js +1 -1
- package/dist/lib/esm/index.css +74 -0
- package/dist/lib/esm/src/core/ui/components/field/Field.js +1 -1
- package/dist/lib/esm/src/core/ui/components/field/Field.js.map +1 -1
- package/dist/lib/esm/src/core/ui/components/field/field.module.scss.js +2 -0
- package/dist/lib/esm/src/core/ui/components/field/field.module.scss.js.map +1 -0
- package/dist/lib/esm/src/index.js +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/core/ui/components/container/index.d.ts +0 -2
- package/dist/types/src/core/ui/components/container/index.d.ts.map +1 -1
- package/dist/types/src/core/ui/components/field/Field.d.ts +2 -3
- package/dist/types/src/core/ui/components/field/Field.d.ts.map +1 -1
- package/dist/types/src/core/utils/appState/peregrineMQ/peregrineMQ.stories.d.ts +4 -0
- package/dist/types/src/core/utils/appState/peregrineMQ/peregrineMQ.stories.d.ts.map +1 -0
- package/dist/types/src/core/utils/appState/store/store.stories.d.ts +4 -0
- package/dist/types/src/core/utils/appState/store/store.stories.d.ts.map +1 -0
- package/dist/ui/esm/index.css +74 -0
- package/dist/ui/esm/src/core/ui/components/field/Field.js +1 -1
- package/dist/ui/esm/src/core/ui/components/field/Field.js.map +1 -1
- package/dist/ui/esm/src/core/ui/components/field/field.module.scss.js +2 -0
- package/dist/ui/esm/src/core/ui/components/field/field.module.scss.js.map +1 -0
- package/dist/ui/esm/src/core/ui/index.js +1 -1
- package/dist/ui/index.css +74 -0
- package/dist/ui/src/core/ui/components/field/Field.js +1 -1
- package/dist/ui/src/core/ui/components/field/Field.js.map +1 -1
- package/dist/ui/src/core/ui/components/field/field.module.scss.js +2 -0
- package/dist/ui/src/core/ui/components/field/field.module.scss.js.map +1 -0
- package/dist/ui/src/core/ui/index.js +1 -1
- package/dist/utils/esm/index.css +83 -9
- package/dist/utils/index.css +83 -9
- package/package.json +2 -6
- package/dist/lib/cjs/src/core/ui/components/container/Flex.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/container/Flex.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/container/Placeholder.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/container/Placeholder.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/container/Flex.js +0 -2
- package/dist/lib/esm/src/core/ui/components/container/Flex.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/container/Placeholder.js +0 -2
- package/dist/lib/esm/src/core/ui/components/container/Placeholder.js.map +0 -1
- package/dist/types/src/core/ui/components/container/Flex.d.ts +0 -41
- package/dist/types/src/core/ui/components/container/Flex.d.ts.map +0 -1
- package/dist/types/src/core/ui/components/container/Placeholder.d.ts +0 -11
- package/dist/types/src/core/ui/components/container/Placeholder.d.ts.map +0 -1
- package/dist/ui/esm/src/core/ui/components/container/Flex.js +0 -2
- package/dist/ui/esm/src/core/ui/components/container/Flex.js.map +0 -1
- package/dist/ui/esm/src/core/ui/components/container/Placeholder.js +0 -2
- package/dist/ui/esm/src/core/ui/components/container/Placeholder.js.map +0 -1
- package/dist/ui/src/core/ui/components/container/Flex.js +0 -2
- package/dist/ui/src/core/ui/components/container/Flex.js.map +0 -1
- package/dist/ui/src/core/ui/components/container/Placeholder.js +0 -2
- package/dist/ui/src/core/ui/components/container/Placeholder.js.map +0 -1
package/dist/hooks/esm/index.css
CHANGED
|
@@ -47,15 +47,6 @@
|
|
|
47
47
|
width: var(--height);
|
|
48
48
|
height: var(--width);
|
|
49
49
|
}
|
|
50
|
-
.errorBoundary-module_errorBoundary__gk9ps {
|
|
51
|
-
background: #EFEFEF;
|
|
52
|
-
width: 100%;
|
|
53
|
-
height: 100%;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.errorBoundary-module_StyledIcon__IYHiU {
|
|
57
|
-
margin-right: 10px;
|
|
58
|
-
}
|
|
59
50
|
.CollapsibleContainer-module_collapsible-container__u0Jmm {
|
|
60
51
|
transform-origin: 0% 0%;
|
|
61
52
|
opacity: 0;
|
|
@@ -89,6 +80,89 @@
|
|
|
89
80
|
max-width: var(--prop-value);
|
|
90
81
|
opacity: 1;
|
|
91
82
|
}
|
|
83
|
+
.field-module_field__UfKm3 {
|
|
84
|
+
opacity: 1;
|
|
85
|
+
pointer-events: auto;
|
|
86
|
+
flex: 1 1 auto;
|
|
87
|
+
width: 100%;
|
|
88
|
+
/* Chrome, Safari, Edge, Opera */
|
|
89
|
+
/* Firefox */
|
|
90
|
+
}
|
|
91
|
+
.field-module_field__UfKm3.field-module_disabled__4aFNw {
|
|
92
|
+
opacity: 0.5;
|
|
93
|
+
pointer-events: none;
|
|
94
|
+
}
|
|
95
|
+
@media (min-width: 400px) {
|
|
96
|
+
.field-module_field__UfKm3 {
|
|
97
|
+
flex: 1;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
.field-module_field__UfKm3 .field-module_label__pJCHG {
|
|
101
|
+
font-size: 0.8rem !important;
|
|
102
|
+
font-weight: normal;
|
|
103
|
+
}
|
|
104
|
+
.field-module_field__UfKm3 .field-module_help__8psM4 {
|
|
105
|
+
text-align: left;
|
|
106
|
+
}
|
|
107
|
+
.field-module_field__UfKm3 .field-module_mainControl__RIMTe {
|
|
108
|
+
flex: 1;
|
|
109
|
+
border-radius: 6px;
|
|
110
|
+
box-shadow: 0 0 6px 1px rgba(0, 0, 0, 0.06);
|
|
111
|
+
will-change: box-shadow;
|
|
112
|
+
transition: box-shadow 250ms ease-in-out;
|
|
113
|
+
}
|
|
114
|
+
.field-module_field__UfKm3 .field-module_mainControl__RIMTe:hover {
|
|
115
|
+
box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
|
|
116
|
+
}
|
|
117
|
+
.field-module_field__UfKm3 button {
|
|
118
|
+
box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
|
|
119
|
+
}
|
|
120
|
+
.field-module_field__UfKm3 .field-module_select__-wfDp {
|
|
121
|
+
width: 100%;
|
|
122
|
+
flex: 1;
|
|
123
|
+
}
|
|
124
|
+
.field-module_field__UfKm3 .field-module_select__-wfDp::after {
|
|
125
|
+
border-color: #000000 !important;
|
|
126
|
+
}
|
|
127
|
+
.field-module_field__UfKm3 .field-module_icon__6vSNr.field-module_is-action__pf8ZC {
|
|
128
|
+
cursor: pointer;
|
|
129
|
+
pointer-events: initial !important;
|
|
130
|
+
}
|
|
131
|
+
.field-module_field__UfKm3 input::-webkit-outer-spin-button,
|
|
132
|
+
.field-module_field__UfKm3 input::-webkit-inner-spin-button {
|
|
133
|
+
-webkit-appearance: none;
|
|
134
|
+
margin: 0;
|
|
135
|
+
}
|
|
136
|
+
.field-module_field__UfKm3 input[type=number] {
|
|
137
|
+
-moz-appearance: textfield;
|
|
138
|
+
}
|
|
139
|
+
.field-module_field__UfKm3 .field-module_input__v-872[type=date]::-webkit-calendar-picker-indicator {
|
|
140
|
+
opacity: 0;
|
|
141
|
+
-webkit-appearance: none;
|
|
142
|
+
position: absolute;
|
|
143
|
+
left: 0;
|
|
144
|
+
top: 0;
|
|
145
|
+
width: 40px;
|
|
146
|
+
height: 100%;
|
|
147
|
+
margin: 0;
|
|
148
|
+
padding: 0;
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
}
|
|
151
|
+
.field-module_field__UfKm3 textarea {
|
|
152
|
+
resize: none;
|
|
153
|
+
}
|
|
154
|
+
.field-module_field__UfKm3 label {
|
|
155
|
+
text-align: left;
|
|
156
|
+
}
|
|
157
|
+
.errorBoundary-module_errorBoundary__gk9ps {
|
|
158
|
+
background: #EFEFEF;
|
|
159
|
+
width: 100%;
|
|
160
|
+
height: 100%;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.errorBoundary-module_StyledIcon__IYHiU {
|
|
164
|
+
margin-right: 10px;
|
|
165
|
+
}
|
|
92
166
|
.layoutBox-module_layout-box__ZIID8 {
|
|
93
167
|
display: flex;
|
|
94
168
|
position: relative;
|
package/dist/hooks/index.css
CHANGED
|
@@ -47,15 +47,6 @@
|
|
|
47
47
|
width: var(--height);
|
|
48
48
|
height: var(--width);
|
|
49
49
|
}
|
|
50
|
-
.errorBoundary-module_errorBoundary__gk9ps {
|
|
51
|
-
background: #EFEFEF;
|
|
52
|
-
width: 100%;
|
|
53
|
-
height: 100%;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.errorBoundary-module_StyledIcon__IYHiU {
|
|
57
|
-
margin-right: 10px;
|
|
58
|
-
}
|
|
59
50
|
.CollapsibleContainer-module_collapsible-container__u0Jmm {
|
|
60
51
|
transform-origin: 0% 0%;
|
|
61
52
|
opacity: 0;
|
|
@@ -89,6 +80,89 @@
|
|
|
89
80
|
max-width: var(--prop-value);
|
|
90
81
|
opacity: 1;
|
|
91
82
|
}
|
|
83
|
+
.field-module_field__UfKm3 {
|
|
84
|
+
opacity: 1;
|
|
85
|
+
pointer-events: auto;
|
|
86
|
+
flex: 1 1 auto;
|
|
87
|
+
width: 100%;
|
|
88
|
+
/* Chrome, Safari, Edge, Opera */
|
|
89
|
+
/* Firefox */
|
|
90
|
+
}
|
|
91
|
+
.field-module_field__UfKm3.field-module_disabled__4aFNw {
|
|
92
|
+
opacity: 0.5;
|
|
93
|
+
pointer-events: none;
|
|
94
|
+
}
|
|
95
|
+
@media (min-width: 400px) {
|
|
96
|
+
.field-module_field__UfKm3 {
|
|
97
|
+
flex: 1;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
.field-module_field__UfKm3 .field-module_label__pJCHG {
|
|
101
|
+
font-size: 0.8rem !important;
|
|
102
|
+
font-weight: normal;
|
|
103
|
+
}
|
|
104
|
+
.field-module_field__UfKm3 .field-module_help__8psM4 {
|
|
105
|
+
text-align: left;
|
|
106
|
+
}
|
|
107
|
+
.field-module_field__UfKm3 .field-module_mainControl__RIMTe {
|
|
108
|
+
flex: 1;
|
|
109
|
+
border-radius: 6px;
|
|
110
|
+
box-shadow: 0 0 6px 1px rgba(0, 0, 0, 0.06);
|
|
111
|
+
will-change: box-shadow;
|
|
112
|
+
transition: box-shadow 250ms ease-in-out;
|
|
113
|
+
}
|
|
114
|
+
.field-module_field__UfKm3 .field-module_mainControl__RIMTe:hover {
|
|
115
|
+
box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
|
|
116
|
+
}
|
|
117
|
+
.field-module_field__UfKm3 button {
|
|
118
|
+
box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
|
|
119
|
+
}
|
|
120
|
+
.field-module_field__UfKm3 .field-module_select__-wfDp {
|
|
121
|
+
width: 100%;
|
|
122
|
+
flex: 1;
|
|
123
|
+
}
|
|
124
|
+
.field-module_field__UfKm3 .field-module_select__-wfDp::after {
|
|
125
|
+
border-color: #000000 !important;
|
|
126
|
+
}
|
|
127
|
+
.field-module_field__UfKm3 .field-module_icon__6vSNr.field-module_is-action__pf8ZC {
|
|
128
|
+
cursor: pointer;
|
|
129
|
+
pointer-events: initial !important;
|
|
130
|
+
}
|
|
131
|
+
.field-module_field__UfKm3 input::-webkit-outer-spin-button,
|
|
132
|
+
.field-module_field__UfKm3 input::-webkit-inner-spin-button {
|
|
133
|
+
-webkit-appearance: none;
|
|
134
|
+
margin: 0;
|
|
135
|
+
}
|
|
136
|
+
.field-module_field__UfKm3 input[type=number] {
|
|
137
|
+
-moz-appearance: textfield;
|
|
138
|
+
}
|
|
139
|
+
.field-module_field__UfKm3 .field-module_input__v-872[type=date]::-webkit-calendar-picker-indicator {
|
|
140
|
+
opacity: 0;
|
|
141
|
+
-webkit-appearance: none;
|
|
142
|
+
position: absolute;
|
|
143
|
+
left: 0;
|
|
144
|
+
top: 0;
|
|
145
|
+
width: 40px;
|
|
146
|
+
height: 100%;
|
|
147
|
+
margin: 0;
|
|
148
|
+
padding: 0;
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
}
|
|
151
|
+
.field-module_field__UfKm3 textarea {
|
|
152
|
+
resize: none;
|
|
153
|
+
}
|
|
154
|
+
.field-module_field__UfKm3 label {
|
|
155
|
+
text-align: left;
|
|
156
|
+
}
|
|
157
|
+
.errorBoundary-module_errorBoundary__gk9ps {
|
|
158
|
+
background: #EFEFEF;
|
|
159
|
+
width: 100%;
|
|
160
|
+
height: 100%;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.errorBoundary-module_StyledIcon__IYHiU {
|
|
164
|
+
margin-right: 10px;
|
|
165
|
+
}
|
|
92
166
|
.layoutBox-module_layout-box__ZIID8 {
|
|
93
167
|
display: flex;
|
|
94
168
|
position: relative;
|
package/dist/lib/cjs/index.css
CHANGED
|
@@ -137,6 +137,80 @@
|
|
|
137
137
|
max-width: var(--prop-value);
|
|
138
138
|
opacity: 1;
|
|
139
139
|
}
|
|
140
|
+
.field-module_field__UfKm3 {
|
|
141
|
+
opacity: 1;
|
|
142
|
+
pointer-events: auto;
|
|
143
|
+
flex: 1 1 auto;
|
|
144
|
+
width: 100%;
|
|
145
|
+
/* Chrome, Safari, Edge, Opera */
|
|
146
|
+
/* Firefox */
|
|
147
|
+
}
|
|
148
|
+
.field-module_field__UfKm3.field-module_disabled__4aFNw {
|
|
149
|
+
opacity: 0.5;
|
|
150
|
+
pointer-events: none;
|
|
151
|
+
}
|
|
152
|
+
@media (min-width: 400px) {
|
|
153
|
+
.field-module_field__UfKm3 {
|
|
154
|
+
flex: 1;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
.field-module_field__UfKm3 .field-module_label__pJCHG {
|
|
158
|
+
font-size: 0.8rem !important;
|
|
159
|
+
font-weight: normal;
|
|
160
|
+
}
|
|
161
|
+
.field-module_field__UfKm3 .field-module_help__8psM4 {
|
|
162
|
+
text-align: left;
|
|
163
|
+
}
|
|
164
|
+
.field-module_field__UfKm3 .field-module_mainControl__RIMTe {
|
|
165
|
+
flex: 1;
|
|
166
|
+
border-radius: 6px;
|
|
167
|
+
box-shadow: 0 0 6px 1px rgba(0, 0, 0, 0.06);
|
|
168
|
+
will-change: box-shadow;
|
|
169
|
+
transition: box-shadow 250ms ease-in-out;
|
|
170
|
+
}
|
|
171
|
+
.field-module_field__UfKm3 .field-module_mainControl__RIMTe:hover {
|
|
172
|
+
box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
|
|
173
|
+
}
|
|
174
|
+
.field-module_field__UfKm3 button {
|
|
175
|
+
box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
|
|
176
|
+
}
|
|
177
|
+
.field-module_field__UfKm3 .field-module_select__-wfDp {
|
|
178
|
+
width: 100%;
|
|
179
|
+
flex: 1;
|
|
180
|
+
}
|
|
181
|
+
.field-module_field__UfKm3 .field-module_select__-wfDp::after {
|
|
182
|
+
border-color: #000000 !important;
|
|
183
|
+
}
|
|
184
|
+
.field-module_field__UfKm3 .field-module_icon__6vSNr.field-module_is-action__pf8ZC {
|
|
185
|
+
cursor: pointer;
|
|
186
|
+
pointer-events: initial !important;
|
|
187
|
+
}
|
|
188
|
+
.field-module_field__UfKm3 input::-webkit-outer-spin-button,
|
|
189
|
+
.field-module_field__UfKm3 input::-webkit-inner-spin-button {
|
|
190
|
+
-webkit-appearance: none;
|
|
191
|
+
margin: 0;
|
|
192
|
+
}
|
|
193
|
+
.field-module_field__UfKm3 input[type=number] {
|
|
194
|
+
-moz-appearance: textfield;
|
|
195
|
+
}
|
|
196
|
+
.field-module_field__UfKm3 .field-module_input__v-872[type=date]::-webkit-calendar-picker-indicator {
|
|
197
|
+
opacity: 0;
|
|
198
|
+
-webkit-appearance: none;
|
|
199
|
+
position: absolute;
|
|
200
|
+
left: 0;
|
|
201
|
+
top: 0;
|
|
202
|
+
width: 40px;
|
|
203
|
+
height: 100%;
|
|
204
|
+
margin: 0;
|
|
205
|
+
padding: 0;
|
|
206
|
+
cursor: pointer;
|
|
207
|
+
}
|
|
208
|
+
.field-module_field__UfKm3 textarea {
|
|
209
|
+
resize: none;
|
|
210
|
+
}
|
|
211
|
+
.field-module_field__UfKm3 label {
|
|
212
|
+
text-align: left;
|
|
213
|
+
}
|
|
140
214
|
.divider-module_divider-line__6CesR {
|
|
141
215
|
position: relative;
|
|
142
216
|
display: block;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),t=require("
|
|
1
|
+
"use strict";var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),a=require("../../../utils/helpers/ui.js"),l=require("./field.module.scss.js");let n=()=>"#000000";let o=t.memo((function(){return React.createElement("span",null)}));const s=t.memo((function(t){let{options:a,value:l,inputRef:n,...o}=t;return React.createElement("div",{className:"select"},React.createElement("select",e.extends({},o,{ref:n,defaultValue:l}),a?.map((e=>React.createElement("option",{key:`${JSON.stringify(e)}`,value:"object"==typeof e?e?.value:e},"object"==typeof e?e?.label:e)))))})),c=t.memo((e=>t.createElement("textarea",e)));c.displayName="TextAreaComponent";const r=t.memo((e=>t.createElement("input",e)));r.displayName="InputComponent";const i=t.memo((i=>{let{label:m,name:u,type:p="text",value:d,defaultValue:f,placeholder:h,inputRef:R,error:N,disabled:C,userDisabled:E,withoutComponent:g,helpTextInfo:v,helpText:b,children:y,iconLeft:x,iconRight:k,addon:I,className:F,onChange:j,onChangeInner:q,onBlur:B,onFocus:D,rightIconClick:w,leftIconClick:T,options:V,style:$,...K}=i,L=r;y||"textarea"!==p||(L=c);const S=t.useCallback((e=>{E?e?.preventDefault?.():D&&D(e)}),[E,D]),_=t.useCallback((e=>{E||(q&&e?.target?(e.target.value=q(e.target.value),j&&j(e)):j&&j(e))}),[q,j,E]),A=t.useMemo((()=>void 0===d?{defaultValue:f}:{value:d}),[d,f]);return React.createElement("div",{className:a.classNames(l.default.field,(C||E)&&l.default.disable,F),style:$},React.createElement("label",{htmlFor:u,className:"label"},m),React.createElement("div",{className:"field "+(I?"has-addons":"")},React.createElement("div",{className:`control mainControl ${x&&!g?"has-icons-left":""} ${k?"has-icons-right":""}`},!g&&(y||"select"!==p&&!V?!y&&React.createElement(L,e.extends({name:u,id:u,ref:R,className:"input "+(N?"is-danger":""),type:p,placeholder:h},A,{onChange:_,onBlur:B,onFocus:S,onKeyDown:S,autoComplete:"off",disabled:C},K)):React.createElement(s,e.extends({name:u,id:u,inputRef:R,className:"input "+(N?"is-danger":""),type:"select",placeholder:h,value:d,options:V,onChange:j,onBlur:B,onFocus:S,onKeyDown:S,autoComplete:"off",disabled:C},K))),x&&!g&&React.createElement("span",{className:"iconLeft icon is-small is-left "+(T?"is-action":""),onClick:T},React.createElement(o,{iconName:x,color:n})),k&&React.createElement("span",{className:"iconRight icon is-small is-right "+(w?"is-action":""),onClick:w},React.createElement(o,{iconName:k,color:n})),y&&y),I&&I),v&&React.createElement("p",{className:"help"},v),b&&React.createElement("p",{className:"help "+(N?"is-danger":"")},b))}));i.displayName="Field",exports.Field=i,exports.Select=s,exports.setIconColor=e=>{n=e},exports.setIconComponent=e=>{o=e};
|
|
2
2
|
//# sourceMappingURL=Field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.js","sources":["../../../../../../../../src/core/ui/components/field/Field.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable jsx-a11y/no-static-element-interactions */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\nimport { FC, ReactNode, memo, useMemo, useCallback, PropsWithChildren } from 'react'\nimport styled from 'styled-components'\n\nimport type { FieldError, IconComponentType } from './types'\n\nlet iconColor: string | (() => string) = () => '#000000'\n\nexport const setIconColor = (color: string | (() => string)): void => {\n iconColor = color\n}\n\nlet IconComponent: IconComponentType = memo(function IconComponent() { return <span /> })\n\nexport const setIconComponent = (component: IconComponentType): void => {\n IconComponent = component\n}\n\nexport type FileWrapperProps = PropsWithChildren<unknown> & {\n className?: string\n error?: boolean\n disabled?: boolean\n userDisabled?: boolean\n css?: string\n}\n\nexport const FieldWrapper: FC<FileWrapperProps> = styled.div<FileWrapperProps>`\n opacity: ${({ disabled, userDisabled }): number => (disabled || userDisabled ? 0.5 : 1)};\n pointer-events: ${({ disabled, userDisabled }): string => (disabled || userDisabled ? 'none' : 'auto')};\n flex: 1 1 auto;\n width: 100%;\n @media (min-width: 400px) {\n flex: 1;\n }\n .label {\n font-size: 0.8rem !important;\n font-weight: normal;\n }\n\n .help {\n text-align: left;\n }\n\n .mainControl {\n flex: 1;\n border-radius: 6px;\n box-shadow: 0 0 6px 1px rgba(0, 0, 0, 0.06);\n will-change: box-shadow;\n transition: box-shadow 250ms ease-in-out;\n &:hover {\n box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);\n }\n }\n button {\n box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);\n }\n .select {\n width: 100%;\n flex: 1;\n &::after {\n border-color: #000000 !important;\n }\n }\n\n .icon {\n &.is-action {\n cursor: pointer;\n pointer-events: initial !important;\n }\n }\n\n /* Chrome, Safari, Edge, Opera */\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n /* Firefox */\n input[type=number] {\n -moz-appearance: textfield;\n }\n\n .input[type=date]::-webkit-calendar-picker-indicator {\n opacity:0;\n -webkit-appearance: none;\n position: absolute;\n left: 0;\n top: 0;\n width: 40px;\n height: 100%;\n margin: 0;\n padding: 0;\n cursor: pointer;\n }\n\n textarea {\n resize: none;\n }\n`\n\ntype EventType = { target: any; type?: any } & Partial<Event>\nexport interface FieldProps {\n label?: string\n name?: string\n type?: string\n min?: number | string | Date | any\n max?: number | string | Date | any\n value?: string | number | readonly string[] | undefined\n defaultValue?: string | number | readonly string[] | undefined\n placeholder?: string\n inputRef?: ReactHookFormRef\n error?: boolean\n errors?: FieldError\n disabled?: boolean\n userDisabled?: boolean\n helpTextInfo?: string\n helpText?: string\n iconLeft?: string\n iconRight?: string\n withoutComponent?: boolean\n addon?: ReactNode\n children?: ReactNode\n className?: string\n onChange?: (event?: EventType) => unknown\n // TODO, rename... something like changeHandler or valueDecorator\n onChangeInner?: (value: string | number) => string | number\n onBlur?: (event?: EventType) => void\n onFocus?: (event?: EventType | undefined) => void\n rightIconClick?: (event?: EventType) => void\n leftIconClick?: (event?: EventType) => void\n options?: any[] | null\n creatable?: boolean\n async?: boolean\n css?: string\n [key: string]: any\n}\n\ninterface SelectProps extends FieldProps {\n id?: string\n}\n\ntype OptionObj = { label: string | number | undefined; value: string | number | undefined }\ntype Option = OptionObj | string | number\n\nexport const Select: FC<SelectProps>\n= memo<SelectProps>(\n function Select({ options, value, inputRef, ...props }: SelectProps) {\n return (\n <div className='select'>\n <select {...props} ref={inputRef} defaultValue={value}>\n {options?.map((option: Option) => (\n <option\n key={`${JSON.stringify(option)}`}\n value={typeof option === 'object' ? (option as OptionObj)?.value : option}\n >\n {typeof option === 'object' ? (option as OptionObj)?.label : option}\n </option>\n ))}\n </select>\n </div>\n )\n },\n)\n\nconst InputComponent = styled.input``\nconst TextAreaComponent = styled.textarea``\nconst StyledFieldLabel = styled.label`\n text-align: left;\n`\n\nexport const Field: FC<FieldProps> = memo<FieldProps>(({\n label,\n name,\n type = 'text',\n value,\n defaultValue,\n placeholder,\n inputRef,\n error,\n disabled,\n userDisabled,\n withoutComponent,\n helpTextInfo,\n helpText,\n children,\n iconLeft,\n iconRight,\n addon,\n className,\n onChange,\n onChangeInner,\n onBlur,\n onFocus,\n rightIconClick,\n leftIconClick,\n options,\n css,\n ...props\n}: FieldProps) => {\n let Component: FC<any> = InputComponent\n\n if (!children && type === 'textarea') {\n Component = TextAreaComponent\n }\n const handleFocus = useCallback((event: Event | EventType | undefined) => {\n if (userDisabled) {\n event?.preventDefault?.()\n } else {\n onFocus && onFocus(event)\n }\n }, [userDisabled, onFocus])\n\n const handleChange = useCallback((event: { target: { value: string } }) => {\n if (userDisabled) {\n return\n }\n if (onChangeInner && event?.target) {\n // eslint-disable-next-line no-param-reassign\n event.target.value = onChangeInner((event.target.value as string)) as string\n onChange && onChange(event as EventType)\n } else {\n onChange && onChange(event as EventType)\n }\n }, [onChangeInner, onChange, userDisabled])\n\n const valueProps = useMemo(() => {\n if (value === undefined) {\n return { defaultValue }\n }\n return { value }\n }, [value, defaultValue])\n\n return (\n <FieldWrapper\n className={`field ${className}`}\n error={error}\n disabled={disabled}\n userDisabled={userDisabled}\n css={css}\n >\n <StyledFieldLabel htmlFor={name} className='label'>{label}</StyledFieldLabel>\n <div className={`field ${addon ? 'has-addons' : ''}`}>\n <div\n className={`control mainControl ${iconLeft && !withoutComponent\n ? 'has-icons-left' : ''} ${iconRight ? 'has-icons-right' : ''}`}\n >\n {!withoutComponent && ((!children && (type === 'select' || options))\n ? (\n <Select\n name={name}\n id={name}\n inputRef={inputRef}\n className={`input ${error ? 'is-danger' : ''}`}\n type='select'\n placeholder={placeholder}\n value={value}\n options={options}\n // TODO also handle change but value versus event.target.value issue\n onChange={onChange}\n onBlur={onBlur}\n onFocus={handleFocus}\n onKeyDown={handleFocus}\n autoComplete='off'\n disabled={disabled}\n {...props}\n />\n )\n : (\n !children && (\n <Component\n name={name}\n id={name}\n ref={inputRef}\n className={`input ${error ? 'is-danger' : ''}`}\n type={type}\n placeholder={placeholder}\n {...valueProps}\n onChange={handleChange}\n onBlur={onBlur}\n onFocus={handleFocus}\n onKeyDown={handleFocus}\n autoComplete='off'\n disabled={disabled}\n {...props}\n />\n )))}\n\n {iconLeft && !withoutComponent && (\n <span\n className={`iconLeft icon is-small is-left ${leftIconClick ? 'is-action' : ''}`}\n onClick={leftIconClick}\n >\n <IconComponent\n iconName={iconLeft}\n color={iconColor}\n />\n </span>\n )}\n {iconRight && (\n <span\n className={`iconRight icon is-small is-right ${rightIconClick ? 'is-action' : ''}`}\n onClick={rightIconClick}\n >\n <IconComponent\n iconName={iconRight}\n color={iconColor}\n />\n </span>\n )}\n {children && children}\n </div>\n {addon && addon}\n </div>\n {helpTextInfo && <p className='help'>{helpTextInfo}</p>}\n {helpText && <p className={`help ${error ? 'is-danger' : ''}`}>{helpText}</p>}\n </FieldWrapper>\n )\n})\n\nField.displayName = 'Field'\n"],"names":["iconColor","IconComponent","memo","React","createElement","setIconComponent","FieldWrapper","styled","div","withConfig","displayName","componentId","_ref","disabled","userDisabled","_ref2","_StyledFieldWrapper","default","p","$_css","Select","_ref3","options","value","inputRef","props","className","_extends","ref","defaultValue","map","option","key","JSON","stringify","label","InputComponent","input","TextAreaComponent","textarea","StyledFieldLabel","Field","_ref4","name","type","placeholder","error","withoutComponent","helpTextInfo","helpText","children","iconLeft","iconRight","addon","onChange","onChangeInner","onBlur","onFocus","rightIconClick","leftIconClick","css","Component","handleFocus","useCallback","event","preventDefault","handleChange","target","valueProps","useMemo","undefined","htmlFor","id","onKeyDown","autoComplete","onClick","iconName","color","component"],"mappings":"mMAQA,IAAIA,EAAqCA,IAAM,UAM/C,IAAIC,EAAmCC,EAAAA,MAAK,WAA2B,OAAOC,MAAAC,cAAA,OAAA,KAAS,IAE1EC,MAYAC,EAAqCC,EAAAA,QAAOC,IAAGC,WAAA,CAAAC,YAAA,sBAAAC,YAAA,eAAVJ,CAAU,CAAA,WAAA,mBAAA,61BAC/CK,IAAA,IAACC,SAAEA,EAAQC,aAAEA,GAAcF,EAAA,OAAcC,GAAYC,EAAe,GAAM,CAAC,IACpEC,IAAA,IAACF,SAAEA,EAAQC,aAAEA,GAAcC,EAAA,OAAcF,GAAYC,EAAe,OAAS,MAAM,IAuEtG,IAAAE,EAAAT,EAAAU,QAAAX,GAAAG,WAAA,CAAAC,YAAA,6BAAAC,YAAA,eAAAJ,CAAA,CAAA,GAAA,KAAAW,GAAAA,EAAAC,QA8CM,MAAMC,EACXlB,EAAIA,M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MAAAC,cAAA,OAAA,CACEsB,UAAW,mCAAkCiC,EAAgB,YAAc,IAC3EgB,QAAShB,GAETxD,MAAAC,cAACH,EAAa,CACZ2E,SAAUzB,EACV0B,MAAO7E,KAIZoD,GACCjD,MAAAC,cAAA,OAAA,CACEsB,UAAW,qCAAoCgC,EAAiB,YAAc,IAC9EiB,QAASjB,GAETvD,MAAAC,cAACH,EAAa,CACZ2E,SAAUxB,EACVyB,MAAO7E,KAIZkD,GAAYA,GAEdG,GAASA,GAEXL,GAAgB7C,MAAAC,cAAA,IAAA,CAAGsB,UAAU,QAAQsB,GACrCC,GAAY9C,MAAAC,cAAA,IAAA,CAAGsB,UAAW,SAAQoB,EAAQ,YAAc,KAAOG,GACnD,IAInBR,EAAM/B,YAAc,qFAxTSmE,IAC3B7E,EAAY6E,CAAK,2BAKcC,IAC/B7E,EAAgB6E,CAAS"}
|
|
1
|
+
{"version":3,"file":"Field.js","sources":["../../../../../../../../src/core/ui/components/field/Field.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable jsx-a11y/no-static-element-interactions */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\nimport { FC, ReactNode, memo, useMemo, useCallback, PropsWithChildren, CSSProperties, createElement } from 'react'\n\nimport { classNames } from '../../../utils/helpers/ui'\n\nimport classes from './field.module.scss'\nimport type { FieldError, IconComponentType } from './types'\n\nlet iconColor: string | (() => string) = () => '#000000'\n\nexport const setIconColor = (color: string | (() => string)): void => {\n iconColor = color\n}\n\nlet IconComponent: IconComponentType = memo(function IconComponent() { return <span /> })\n\nexport const setIconComponent = (component: IconComponentType): void => {\n IconComponent = component\n}\n\nexport type FileWrapperProps = PropsWithChildren<unknown> & {\n className?: string\n error?: boolean\n disabled?: boolean\n userDisabled?: boolean\n css?: string\n}\n\ntype EventType = { target: any; type?: any } & Partial<Event>\nexport interface FieldProps {\n label?: string\n name?: string\n type?: string\n min?: number | string | Date | any\n max?: number | string | Date | any\n value?: string | number | readonly string[] | undefined\n defaultValue?: string | number | readonly string[] | undefined\n placeholder?: string\n inputRef?: ReactHookFormRef\n error?: boolean\n errors?: FieldError\n disabled?: boolean\n userDisabled?: boolean\n helpTextInfo?: string\n helpText?: string\n iconLeft?: string\n iconRight?: string\n withoutComponent?: boolean\n addon?: ReactNode\n children?: ReactNode\n className?: string\n onChange?: (event?: EventType) => unknown\n // TODO, rename... something like changeHandler or valueDecorator\n onChangeInner?: (value: string | number) => string | number\n onBlur?: (event?: EventType) => void\n onFocus?: (event?: EventType | undefined) => void\n rightIconClick?: (event?: EventType) => void\n leftIconClick?: (event?: EventType) => void\n options?: any[] | null\n creatable?: boolean\n async?: boolean\n style?: CSSProperties\n [key: string]: any\n}\n\ninterface SelectProps extends FieldProps {\n id?: string\n}\n\ntype OptionObj = { label: string | number | undefined; value: string | number | undefined }\ntype Option = OptionObj | string | number\n\nexport const Select: FC<SelectProps>\n= memo<SelectProps>(\n function Select({ options, value, inputRef, ...props }: SelectProps) {\n return (\n <div className='select'>\n <select {...props} ref={inputRef} defaultValue={value}>\n {options?.map((option: Option) => (\n <option\n key={`${JSON.stringify(option)}`}\n value={typeof option === 'object' ? (option as OptionObj)?.value : option}\n >\n {typeof option === 'object' ? (option as OptionObj)?.label : option}\n </option>\n ))}\n </select>\n </div>\n )\n },\n)\nconst TextAreaComponent = memo((props) => createElement('textarea', props))\n\nTextAreaComponent.displayName = 'TextAreaComponent'\n\nconst InputComponent = memo((props) => createElement('input', props))\n\nInputComponent.displayName = 'InputComponent'\n\nexport const Field: FC<FieldProps> = memo<FieldProps>(({\n label,\n name,\n type = 'text',\n value,\n defaultValue,\n placeholder,\n inputRef,\n error,\n disabled,\n userDisabled,\n withoutComponent,\n helpTextInfo,\n helpText,\n children,\n iconLeft,\n iconRight,\n addon,\n className,\n onChange,\n onChangeInner,\n onBlur,\n onFocus,\n rightIconClick,\n leftIconClick,\n options,\n style,\n ...props\n}: FieldProps) => {\n let Component: FC<any> = InputComponent\n\n if (!children && type === 'textarea') {\n Component = TextAreaComponent\n }\n const handleFocus = useCallback((event: Event | EventType | undefined) => {\n if (userDisabled) {\n event?.preventDefault?.()\n } else {\n onFocus && onFocus(event)\n }\n }, [userDisabled, onFocus])\n\n const handleChange = useCallback((event: { target: { value: string } }) => {\n if (userDisabled) {\n return\n }\n if (onChangeInner && event?.target) {\n // eslint-disable-next-line no-param-reassign\n event.target.value = onChangeInner((event.target.value as string)) as string\n onChange && onChange(event as EventType)\n } else {\n onChange && onChange(event as EventType)\n }\n }, [onChangeInner, onChange, userDisabled])\n\n const valueProps = useMemo(() => {\n if (value === undefined) {\n return { defaultValue }\n }\n return { value }\n }, [value, defaultValue])\n\n return (\n <div\n className={classNames(\n classes.field,\n (disabled || userDisabled) && classes.disable,\n className,\n )}\n // TODO fix\n // error={error}\n style={style}\n >\n <label htmlFor={name} className='label'>{label}</label>\n <div className={`field ${addon ? 'has-addons' : ''}`}>\n <div\n className={`control mainControl ${iconLeft && !withoutComponent\n ? 'has-icons-left' : ''} ${iconRight ? 'has-icons-right' : ''}`}\n >\n {!withoutComponent && ((!children && (type === 'select' || options))\n ? (\n <Select\n name={name}\n id={name}\n inputRef={inputRef}\n className={`input ${error ? 'is-danger' : ''}`}\n type='select'\n placeholder={placeholder}\n value={value}\n options={options}\n // TODO also handle change but value versus event.target.value issue\n onChange={onChange}\n onBlur={onBlur}\n onFocus={handleFocus}\n onKeyDown={handleFocus}\n autoComplete='off'\n disabled={disabled}\n {...props}\n />\n )\n : (\n !children && (\n <Component\n name={name}\n id={name}\n ref={inputRef}\n className={`input ${error ? 'is-danger' : ''}`}\n type={type}\n placeholder={placeholder}\n {...valueProps}\n onChange={handleChange}\n onBlur={onBlur}\n onFocus={handleFocus}\n onKeyDown={handleFocus}\n autoComplete='off'\n disabled={disabled}\n {...props}\n />\n )))}\n\n {iconLeft && !withoutComponent && (\n <span\n className={`iconLeft icon is-small is-left ${leftIconClick ? 'is-action' : ''}`}\n onClick={leftIconClick}\n >\n <IconComponent\n iconName={iconLeft}\n color={iconColor}\n />\n </span>\n )}\n {iconRight && (\n <span\n className={`iconRight icon is-small is-right ${rightIconClick ? 'is-action' : ''}`}\n onClick={rightIconClick}\n >\n <IconComponent\n iconName={iconRight}\n color={iconColor}\n />\n </span>\n )}\n {children && children}\n </div>\n {addon && addon}\n </div>\n {helpTextInfo && <p className='help'>{helpTextInfo}</p>}\n {helpText && <p className={`help ${error ? 'is-danger' : ''}`}>{helpText}</p>}\n </div>\n )\n})\n\nField.displayName = 'Field'\n"],"names":["iconColor","IconComponent","memo","React","createElement","setIconComponent","Select","_ref","options","value","inputRef","props","className","_extends","ref","defaultValue","map","option","key","JSON","stringify","label","TextAreaComponent","displayName","InputComponent","Field","_ref2","name","type","placeholder","error","disabled","userDisabled","withoutComponent","helpTextInfo","helpText","children","iconLeft","iconRight","addon","onChange","onChangeInner","onBlur","onFocus","rightIconClick","leftIconClick","style","Component","handleFocus","useCallback","event","preventDefault","handleChange","target","valueProps","useMemo","undefined","classNames","classes","default","field","disable","htmlFor","id","onKeyDown","autoComplete","onClick","iconName","color","component"],"mappings":"oLAUA,IAAIA,EAAqCA,IAAM,UAM/C,IAAIC,EAAmCC,EAAAA,MAAK,WAA2B,OAAOC,MAAAC,cAAA,OAAA,KAAS,IAE1EC,MAwDAC,EACXJ,EAAIA,MACJ,SAAeK,GAAsD,IAArDC,QAAEA,EAAOC,MAAEA,EAAKC,SAAEA,KAAaC,GAAoBJ,EACjE,OACEJ,MAAAC,cAAA,MAAA,CAAKQ,UAAU,UACbT,MAAAC,cAAAS,SAAAA,EAAAA,WAAYF,EAAK,CAAEG,IAAKJ,EAAUK,aAAcN,IAC7CD,GAASQ,KAAKC,GACbd,MAAAC,cAAA,SAAA,CACEc,IAAK,GAAGC,KAAKC,UAAUH,KACvBR,MAAyB,iBAAXQ,EAAuBA,GAAsBR,MAAQQ,GAEhD,iBAAXA,EAAuBA,GAAsBI,MAAQJ,MAMzE,IAEIK,EAAoBpB,EAAIA,MAAES,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EAAgBoE,CAAS"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.default={field:"field-module_field__UfKm3",disabled:"field-module_disabled__4aFNw",label:"field-module_label__pJCHG",help:"field-module_help__8psM4",mainControl:"field-module_mainControl__RIMTe",select:"field-module_select__-wfDp",icon:"field-module_icon__6vSNr","is-action":"field-module_is-action__pf8ZC",input:"field-module_input__v-872"};
|
|
2
|
+
//# sourceMappingURL=field.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("./core/hooks/useApi.js"),r=require("./core/hooks/useToggle.js"),t=require("./core/hooks/useOutsideClick.js"),o=require("./core/hooks/useResize.js"),s=require("./core/hooks/useClassNames.js"),i=require("./core/hooks/useParseProps.js"),a=require("./core/hooks/useThemePreference.js"),
|
|
1
|
+
"use strict";var e=require("./core/hooks/useApi.js"),r=require("./core/hooks/useToggle.js"),t=require("./core/hooks/useOutsideClick.js"),o=require("./core/hooks/useResize.js"),s=require("./core/hooks/useClassNames.js"),i=require("./core/hooks/useParseProps.js"),a=require("./core/hooks/useThemePreference.js"),n=require("./core/utils/helpers/birthnumber.validator.js"),p=require("./core/utils/helpers/birthnumberCZSKvalidator.js"),l=require("./core/utils/helpers/fileValidator.js"),u=require("./core/utils/helpers/date.js"),c=require("./core/utils/helpers/deviceInfo.js"),x=require("./core/utils/helpers/emailMatcher.js"),m=require("./core/utils/helpers/file.js"),d=require("./core/utils/helpers/objectOperations.js"),C=require("./core/utils/helpers/other.js"),h=require("./core/utils/helpers/textValueOperations.js"),j=require("./core/utils/helpers/valueOperations.js"),T=require("./core/utils/helpers/cancelableDelayedFunction.js"),v=require("./core/utils/helpers/ui.js"),S=require("./core/utils/keyExtractor.js"),y=require("./core/utils/date.js"),g=require("./core/utils/webComponents/webComponent.utils.js"),b=require("./core/utils/appState/store/store.vanillajs.js"),q=require("./core/utils/appState/store/store.vanillajs.templates.js"),f=require("./core/utils/appState/store/useStore.react.js"),F=require("./core/constants/ui.constants.js"),z=require("./core/ui/utils/style.js"),D=require("./core/ui/components/container/layoutBox/LayoutBox.js"),I=require("./core/ui/components/container/layoutBox/layoutBox.types.js"),L=require("./core/ui/components/container/lazyComponent/LazyComponent.js"),B=require("./core/ui/components/container/CollapsibleContainer.js"),E=require("./core/ui/components/container/ResizableContainer.js"),P=require("./core/ui/components/error/ErrorBoundary.js"),V=require("./core/ui/components/field/Field.js"),N=require("./core/ui/components/dividers/DividerLine.js"),O=require("./core/ui/components/icon/IconBase.js"),k=require("./core/ui/components/icon/Icon.js"),R=require("./core/ui/components/icon/IconWC.js"),A=require("./core/ui/components/molecules/layouts/FlowLayout.js");exports.useApi=e.useApi,exports.useToggle=r.useToggle,exports.outsideClickHandler=t.outsideClickHandler,exports.useOutsideClick=t.useOutsideClick,exports.useResize=o.useResize,exports.useClassNames=s.useClassNames,exports.useParseProps=i.useParseProps,exports.getBaseThemes=a.getBaseThemes,exports.observeThemePreference=a.observeThemePreference,exports.setTHemeClassNames=a.setTHemeClassNames,exports.switchColorTheme=a.switchColorTheme,exports.updateColorTheme=a.updateColorTheme,exports.useThemePreference=a.useThemePreference,exports.isBirthNumberValid=n.isBirthNumberValid,exports.getMatch=p.getMatch,exports.isValidFormat=p.isValidFormat,exports.isValidModulo11=p.isValidModulo11,exports.parse=p.parse,exports.regex=p.regex,exports.parseCSVdata=l.parseCSVdata,exports.validateCSVFile=l.validateCSVFile,exports.validateCSVlines=l.validateCSVlines,exports.validateJSONFile=l.validateJSONFile,exports.validateLineCellTrimmed=l.validateLineCellTrimmed,exports.validateLineNumColumns=l.validateLineNumColumns,exports.validateSDFFile=l.validateSDFFile,exports.DATE_FORMAT=u.DATE_FORMAT,exports.formatDateToTimestamp=u.formatDateToTimestamp,exports.getDate=u.getDate,exports.getDeviceId=c.getDeviceId,exports.emailMatch=x.emailMatch,exports.emailMatcher=x.emailMatcher,exports.regexBuilder=x.regexBuilder,exports.cleanCsvLines=m.cleanCsvLines,exports.formatFilePath=m.formatFilePath,exports.arrayToObjectTree=d.arrayToObjectTree,exports.chunkArray=d.chunkArray,exports.duplicatesInArray=d.duplicatesInArray,exports.formatJsonString=d.formatJsonString,exports.formatObj=d.formatObj,exports.formatObj2=d.formatObj2,exports.debounce=C.debounce,exports.delay=C.delay,exports.memoize=C.memoize,exports.memoizeComplex=C.memoizeComplex,exports.memoizer=C.memoizer,exports.nestedTernary=C.nestedTernary,exports.escapeRegExp=h.escapeRegExp,exports.fileNameExt=h.fileNameExt,exports.findStringInText=h.findStringInText,exports.normalizeString=h.normalizeString,exports.removeWhitespaces=h.removeWhitespaces,exports.sanitizeId=h.sanitizeId,exports.sanitizePathId=h.sanitizePathId,exports.toLowerCase=h.toLowerCase,exports.toUpperCase=h.toUpperCase,exports.truncateText=h.truncateText,exports.Operation=j.Operation,exports.decrementValue=j.decrementValue,exports.incerementValue=j.incerementValue,exports.numberDefined=j.numberDefined,exports.numberOperation=j.numberOperation,exports.restrictNumberInLimits=j.restrictNumberInLimits,exports.setValue=j.setValue,exports.cancelableSetInterval=T.cancelableSetInterval,exports.cancelableSetTimeout=T.cancelableSetTimeout,exports.anchorClick=v.anchorClick,exports.classNames=v.classNames,exports.generateId=v.generateId,exports.mapSerReplacer=v.mapSerReplacer,exports.noop=v.noop,exports.parseProps=v.parseProps,exports.keyExtractor=S.keyExtractor,exports.keyExtractorFunction=S.keyExtractorFunction,exports.dateRangeFormat=y.dateRangeFormat,exports.getDateTime=y.getDateTime,exports.getTimeFromNow=y.getTimeFromNow,exports.getTimeFromNowOriginal=y.getTimeFromNowOriginal,exports.getTimeTo=y.getTimeTo,exports.ced=g.ced,exports.createResolveAttribute=g.createResolveAttribute,exports.customElementDefine=g.customElementDefine,exports.resolveAttributes=g.resolveAttributes,exports.createStore=b.createStore,exports.createDataStore=q.createDataStore,exports.useStore=f.useStore,exports.useStoreApi=f.useStoreApi,exports.EventName=F.EventName,exports.calculateColors=z.calculateColors,exports.calculatePercColor=z.calculatePercColor,exports.convertHex=z.convertHex,exports.convertRGB=z.convertRGB,Object.defineProperty(exports,"defaultFontSize",{enumerable:!0,get:function(){return z.defaultFontSize}}),exports.pxToRem=z.pxToRem,exports.resolveStyleValue=z.resolveStyleValue,exports.setDefaultFontSize=z.setDefaultFontSize,exports.toHex=z.toHex,exports.LayoutBox=D.LayoutBox,exports.LayoutDirection=I.LayoutDirection,exports.LazyComponent=L.LazyComponent,exports.PendingBoundary=L.PendingBoundary,exports.createLazyModule=L.createLazyModule,exports.createLazyModuleWithStore=L.createLazyModuleWithStore,exports.wrapPromise=L.wrapPromise,exports.CollapsibleContainer=B.CollapsibleContainer,exports.ResizableContainer=E.ResizableContainer,exports.DefaultErrorComponent=P.DefaultErrorComponent,exports.ErrorBoundary=P.ErrorBoundary,exports.Field=V.Field,exports.Select=V.Select,exports.setIconColor=V.setIconColor,exports.setIconComponent=V.setIconComponent,exports.DividerHorizontal=N.DividerHorizontal,exports.DividerLine=N.DividerLine,exports.DividerVertical=N.DividerVertical,exports.IconBase=O.IconBase,exports.Icon=k.Icon,exports.ESIcon=R.ESIcon,exports.ESIconBase=R.ESIconBase,exports.FlowLayout=A.FlowLayout;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/lib/esm/index.css
CHANGED
|
@@ -137,6 +137,80 @@
|
|
|
137
137
|
max-width: var(--prop-value);
|
|
138
138
|
opacity: 1;
|
|
139
139
|
}
|
|
140
|
+
.field-module_field__UfKm3 {
|
|
141
|
+
opacity: 1;
|
|
142
|
+
pointer-events: auto;
|
|
143
|
+
flex: 1 1 auto;
|
|
144
|
+
width: 100%;
|
|
145
|
+
/* Chrome, Safari, Edge, Opera */
|
|
146
|
+
/* Firefox */
|
|
147
|
+
}
|
|
148
|
+
.field-module_field__UfKm3.field-module_disabled__4aFNw {
|
|
149
|
+
opacity: 0.5;
|
|
150
|
+
pointer-events: none;
|
|
151
|
+
}
|
|
152
|
+
@media (min-width: 400px) {
|
|
153
|
+
.field-module_field__UfKm3 {
|
|
154
|
+
flex: 1;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
.field-module_field__UfKm3 .field-module_label__pJCHG {
|
|
158
|
+
font-size: 0.8rem !important;
|
|
159
|
+
font-weight: normal;
|
|
160
|
+
}
|
|
161
|
+
.field-module_field__UfKm3 .field-module_help__8psM4 {
|
|
162
|
+
text-align: left;
|
|
163
|
+
}
|
|
164
|
+
.field-module_field__UfKm3 .field-module_mainControl__RIMTe {
|
|
165
|
+
flex: 1;
|
|
166
|
+
border-radius: 6px;
|
|
167
|
+
box-shadow: 0 0 6px 1px rgba(0, 0, 0, 0.06);
|
|
168
|
+
will-change: box-shadow;
|
|
169
|
+
transition: box-shadow 250ms ease-in-out;
|
|
170
|
+
}
|
|
171
|
+
.field-module_field__UfKm3 .field-module_mainControl__RIMTe:hover {
|
|
172
|
+
box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
|
|
173
|
+
}
|
|
174
|
+
.field-module_field__UfKm3 button {
|
|
175
|
+
box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
|
|
176
|
+
}
|
|
177
|
+
.field-module_field__UfKm3 .field-module_select__-wfDp {
|
|
178
|
+
width: 100%;
|
|
179
|
+
flex: 1;
|
|
180
|
+
}
|
|
181
|
+
.field-module_field__UfKm3 .field-module_select__-wfDp::after {
|
|
182
|
+
border-color: #000000 !important;
|
|
183
|
+
}
|
|
184
|
+
.field-module_field__UfKm3 .field-module_icon__6vSNr.field-module_is-action__pf8ZC {
|
|
185
|
+
cursor: pointer;
|
|
186
|
+
pointer-events: initial !important;
|
|
187
|
+
}
|
|
188
|
+
.field-module_field__UfKm3 input::-webkit-outer-spin-button,
|
|
189
|
+
.field-module_field__UfKm3 input::-webkit-inner-spin-button {
|
|
190
|
+
-webkit-appearance: none;
|
|
191
|
+
margin: 0;
|
|
192
|
+
}
|
|
193
|
+
.field-module_field__UfKm3 input[type=number] {
|
|
194
|
+
-moz-appearance: textfield;
|
|
195
|
+
}
|
|
196
|
+
.field-module_field__UfKm3 .field-module_input__v-872[type=date]::-webkit-calendar-picker-indicator {
|
|
197
|
+
opacity: 0;
|
|
198
|
+
-webkit-appearance: none;
|
|
199
|
+
position: absolute;
|
|
200
|
+
left: 0;
|
|
201
|
+
top: 0;
|
|
202
|
+
width: 40px;
|
|
203
|
+
height: 100%;
|
|
204
|
+
margin: 0;
|
|
205
|
+
padding: 0;
|
|
206
|
+
cursor: pointer;
|
|
207
|
+
}
|
|
208
|
+
.field-module_field__UfKm3 textarea {
|
|
209
|
+
resize: none;
|
|
210
|
+
}
|
|
211
|
+
.field-module_field__UfKm3 label {
|
|
212
|
+
text-align: left;
|
|
213
|
+
}
|
|
140
214
|
.divider-module_divider-line__6CesR {
|
|
141
215
|
position: relative;
|
|
142
216
|
display: block;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{extends as e}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import
|
|
1
|
+
import{extends as e}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{memo as t,useCallback as a,useMemo as l,createElement as n}from"react";import{classNames as o}from"../../../utils/helpers/ui.js";import c from"./field.module.scss.js";let s=()=>"#000000";const i=e=>{s=e};let r=t((function(){return React.createElement("span",null)}));const m=e=>{r=e},p=t((function(t){let{options:a,value:l,inputRef:n,...o}=t;return React.createElement("div",{className:"select"},React.createElement("select",e({},o,{ref:n,defaultValue:l}),a?.map((e=>React.createElement("option",{key:`${JSON.stringify(e)}`,value:"object"==typeof e?e?.value:e},"object"==typeof e?e?.label:e)))))})),u=t((e=>n("textarea",e)));u.displayName="TextAreaComponent";const d=t((e=>n("input",e)));d.displayName="InputComponent";const f=t((t=>{let{label:n,name:i,type:m="text",value:f,defaultValue:h,placeholder:R,inputRef:N,error:g,disabled:E,userDisabled:v,withoutComponent:y,helpTextInfo:C,helpText:b,children:x,iconLeft:j,iconRight:k,addon:F,className:I,onChange:B,onChangeInner:D,onBlur:w,onFocus:T,rightIconClick:V,leftIconClick:$,options:K,style:L,..._}=t,A=d;x||"textarea"!==m||(A=u);const H=a((e=>{v?e?.preventDefault?.():T&&T(e)}),[v,T]),J=a((e=>{v||(D&&e?.target?(e.target.value=D(e.target.value),B&&B(e)):B&&B(e))}),[D,B,v]),O=l((()=>void 0===f?{defaultValue:h}:{value:f}),[f,h]);return React.createElement("div",{className:o(c.field,(E||v)&&c.disable,I),style:L},React.createElement("label",{htmlFor:i,className:"label"},n),React.createElement("div",{className:"field "+(F?"has-addons":"")},React.createElement("div",{className:`control mainControl ${j&&!y?"has-icons-left":""} ${k?"has-icons-right":""}`},!y&&(x||"select"!==m&&!K?!x&&React.createElement(A,e({name:i,id:i,ref:N,className:"input "+(g?"is-danger":""),type:m,placeholder:R},O,{onChange:J,onBlur:w,onFocus:H,onKeyDown:H,autoComplete:"off",disabled:E},_)):React.createElement(p,e({name:i,id:i,inputRef:N,className:"input "+(g?"is-danger":""),type:"select",placeholder:R,value:f,options:K,onChange:B,onBlur:w,onFocus:H,onKeyDown:H,autoComplete:"off",disabled:E},_))),j&&!y&&React.createElement("span",{className:"iconLeft icon is-small is-left "+($?"is-action":""),onClick:$},React.createElement(r,{iconName:j,color:s})),k&&React.createElement("span",{className:"iconRight icon is-small is-right "+(V?"is-action":""),onClick:V},React.createElement(r,{iconName:k,color:s})),x&&x),F&&F),C&&React.createElement("p",{className:"help"},C),b&&React.createElement("p",{className:"help "+(g?"is-danger":"")},b))}));f.displayName="Field";export{f as Field,p as Select,i as setIconColor,m as setIconComponent};
|
|
2
2
|
//# sourceMappingURL=Field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.js","sources":["../../../../../../../../src/core/ui/components/field/Field.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable jsx-a11y/no-static-element-interactions */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\nimport { FC, ReactNode, memo, useMemo, useCallback, PropsWithChildren } from 'react'\nimport styled from 'styled-components'\n\nimport type { FieldError, IconComponentType } from './types'\n\nlet iconColor: string | (() => string) = () => '#000000'\n\nexport const setIconColor = (color: string | (() => string)): void => {\n iconColor = color\n}\n\nlet IconComponent: IconComponentType = memo(function IconComponent() { return <span /> })\n\nexport const setIconComponent = (component: IconComponentType): void => {\n IconComponent = component\n}\n\nexport type FileWrapperProps = PropsWithChildren<unknown> & {\n className?: string\n error?: boolean\n disabled?: boolean\n userDisabled?: boolean\n css?: string\n}\n\nexport const FieldWrapper: FC<FileWrapperProps> = styled.div<FileWrapperProps>`\n opacity: ${({ disabled, userDisabled }): number => (disabled || userDisabled ? 0.5 : 1)};\n pointer-events: ${({ disabled, userDisabled }): string => (disabled || userDisabled ? 'none' : 'auto')};\n flex: 1 1 auto;\n width: 100%;\n @media (min-width: 400px) {\n flex: 1;\n }\n .label {\n font-size: 0.8rem !important;\n font-weight: normal;\n }\n\n .help {\n text-align: left;\n }\n\n .mainControl {\n flex: 1;\n border-radius: 6px;\n box-shadow: 0 0 6px 1px rgba(0, 0, 0, 0.06);\n will-change: box-shadow;\n transition: box-shadow 250ms ease-in-out;\n &:hover {\n box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);\n }\n }\n button {\n box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);\n }\n .select {\n width: 100%;\n flex: 1;\n &::after {\n border-color: #000000 !important;\n }\n }\n\n .icon {\n &.is-action {\n cursor: pointer;\n pointer-events: initial !important;\n }\n }\n\n /* Chrome, Safari, Edge, Opera */\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n /* Firefox */\n input[type=number] {\n -moz-appearance: textfield;\n }\n\n .input[type=date]::-webkit-calendar-picker-indicator {\n opacity:0;\n -webkit-appearance: none;\n position: absolute;\n left: 0;\n top: 0;\n width: 40px;\n height: 100%;\n margin: 0;\n padding: 0;\n cursor: pointer;\n }\n\n textarea {\n resize: none;\n }\n`\n\ntype EventType = { target: any; type?: any } & Partial<Event>\nexport interface FieldProps {\n label?: string\n name?: string\n type?: string\n min?: number | string | Date | any\n max?: number | string | Date | any\n value?: string | number | readonly string[] | undefined\n defaultValue?: string | number | readonly string[] | undefined\n placeholder?: string\n inputRef?: ReactHookFormRef\n error?: boolean\n errors?: FieldError\n disabled?: boolean\n userDisabled?: boolean\n helpTextInfo?: string\n helpText?: string\n iconLeft?: string\n iconRight?: string\n withoutComponent?: boolean\n addon?: ReactNode\n children?: ReactNode\n className?: string\n onChange?: (event?: EventType) => unknown\n // TODO, rename... something like changeHandler or valueDecorator\n onChangeInner?: (value: string | number) => string | number\n onBlur?: (event?: EventType) => void\n onFocus?: (event?: EventType | undefined) => void\n rightIconClick?: (event?: EventType) => void\n leftIconClick?: (event?: EventType) => void\n options?: any[] | null\n creatable?: boolean\n async?: boolean\n css?: string\n [key: string]: any\n}\n\ninterface SelectProps extends FieldProps {\n id?: string\n}\n\ntype OptionObj = { label: string | number | undefined; value: string | number | undefined }\ntype Option = OptionObj | string | number\n\nexport const Select: FC<SelectProps>\n= memo<SelectProps>(\n function Select({ options, value, inputRef, ...props }: SelectProps) {\n return (\n <div className='select'>\n <select {...props} ref={inputRef} defaultValue={value}>\n {options?.map((option: Option) => (\n <option\n key={`${JSON.stringify(option)}`}\n value={typeof option === 'object' ? (option as OptionObj)?.value : option}\n >\n {typeof option === 'object' ? (option as OptionObj)?.label : option}\n </option>\n ))}\n </select>\n </div>\n )\n },\n)\n\nconst InputComponent = styled.input``\nconst TextAreaComponent = styled.textarea``\nconst StyledFieldLabel = styled.label`\n text-align: left;\n`\n\nexport const Field: FC<FieldProps> = memo<FieldProps>(({\n label,\n name,\n type = 'text',\n value,\n defaultValue,\n placeholder,\n inputRef,\n error,\n disabled,\n userDisabled,\n withoutComponent,\n helpTextInfo,\n helpText,\n children,\n iconLeft,\n iconRight,\n addon,\n className,\n onChange,\n onChangeInner,\n onBlur,\n onFocus,\n rightIconClick,\n leftIconClick,\n options,\n css,\n ...props\n}: FieldProps) => {\n let Component: FC<any> = InputComponent\n\n if (!children && type === 'textarea') {\n Component = TextAreaComponent\n }\n const handleFocus = useCallback((event: Event | EventType | undefined) => {\n if (userDisabled) {\n event?.preventDefault?.()\n } else {\n onFocus && onFocus(event)\n }\n }, [userDisabled, onFocus])\n\n const handleChange = useCallback((event: { target: { value: string } }) => {\n if (userDisabled) {\n return\n }\n if (onChangeInner && event?.target) {\n // eslint-disable-next-line no-param-reassign\n event.target.value = onChangeInner((event.target.value as string)) as string\n onChange && onChange(event as EventType)\n } else {\n onChange && onChange(event as EventType)\n }\n }, [onChangeInner, onChange, userDisabled])\n\n const valueProps = useMemo(() => {\n if (value === undefined) {\n return { defaultValue }\n }\n return { value }\n }, [value, defaultValue])\n\n return (\n <FieldWrapper\n className={`field ${className}`}\n error={error}\n disabled={disabled}\n userDisabled={userDisabled}\n css={css}\n >\n <StyledFieldLabel htmlFor={name} className='label'>{label}</StyledFieldLabel>\n <div className={`field ${addon ? 'has-addons' : ''}`}>\n <div\n className={`control mainControl ${iconLeft && !withoutComponent\n ? 'has-icons-left' : ''} ${iconRight ? 'has-icons-right' : ''}`}\n >\n {!withoutComponent && ((!children && (type === 'select' || options))\n ? (\n <Select\n name={name}\n id={name}\n inputRef={inputRef}\n className={`input ${error ? 'is-danger' : ''}`}\n type='select'\n placeholder={placeholder}\n value={value}\n options={options}\n // TODO also handle change but value versus event.target.value issue\n onChange={onChange}\n onBlur={onBlur}\n onFocus={handleFocus}\n onKeyDown={handleFocus}\n autoComplete='off'\n disabled={disabled}\n {...props}\n />\n )\n : (\n !children && (\n <Component\n name={name}\n id={name}\n ref={inputRef}\n className={`input ${error ? 'is-danger' : ''}`}\n type={type}\n placeholder={placeholder}\n {...valueProps}\n onChange={handleChange}\n onBlur={onBlur}\n onFocus={handleFocus}\n onKeyDown={handleFocus}\n autoComplete='off'\n disabled={disabled}\n {...props}\n />\n )))}\n\n {iconLeft && !withoutComponent && (\n <span\n className={`iconLeft icon is-small is-left ${leftIconClick ? 'is-action' : ''}`}\n onClick={leftIconClick}\n >\n <IconComponent\n iconName={iconLeft}\n color={iconColor}\n />\n </span>\n )}\n {iconRight && (\n <span\n className={`iconRight icon is-small is-right ${rightIconClick ? 'is-action' : ''}`}\n onClick={rightIconClick}\n >\n <IconComponent\n iconName={iconRight}\n color={iconColor}\n />\n </span>\n )}\n {children && children}\n </div>\n {addon && addon}\n </div>\n {helpTextInfo && <p className='help'>{helpTextInfo}</p>}\n {helpText && <p className={`help ${error ? 'is-danger' : ''}`}>{helpText}</p>}\n </FieldWrapper>\n )\n})\n\nField.displayName = 'Field'\n"],"names":["iconColor","setIconColor","color","IconComponent","memo","React","createElement","setIconComponent","component","FieldWrapper","styled","div","withConfig","displayName","componentId","_ref","disabled","userDisabled","_ref2","_StyledFieldWrapper","p","$_css","Select","_ref3","options","value","inputRef","props","className","_extends","ref","defaultValue","map","option","key","JSON","stringify","label","InputComponent","input","TextAreaComponent","textarea","StyledFieldLabel","Field","_ref4","name","type","placeholder","error","withoutComponent","helpTextInfo","helpText","children","iconLeft","iconRight","addon","onChange","onChangeInner","onBlur","onFocus","rightIconClick","leftIconClick","css","Component","handleFocus","useCallback","event","preventDefault","handleChange","target","valueProps","useMemo","undefined","htmlFor","id","onKeyDown","autoComplete","onClick","iconName"],"mappings":"2KAQA,IAAIA,EAAqCA,IAAM,UAElCC,MAAAA,EAAgBC,IAC3BF,EAAYE,CAAK,EAGnB,IAAIC,EAAmCC,GAAK,WAA2B,OAAOC,MAAAC,cAAA,OAAA,KAAS,IAE1EC,MAAAA,EAAoBC,IAC/BL,EAAgBK,CAAS,EAWdC,EAAqCC,EAAOC,IAAGC,WAAA,CAAAC,YAAA,sBAAAC,YAAA,eAAVJ,CAAU,CAAA,WAAA,mBAAA,61BAC/CK,IAAA,IAACC,SAAEA,EAAQC,aAAE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ACJnB,SAAUA,EACVE,UAAW,UAASoB,EAAQ,YAAc,IAC1CF,KAAK,SACLC,YAAaA,EACbtB,MAAOA,EACPD,QAASA,EAETgC,SAAUA,EACVE,OAAQA,EACRC,QAASK,EACTW,UAAWX,EACXY,aAAa,MACb5D,SAAUA,GACNW,KAuBT0B,IAAaJ,GACZ5C,MAAAC,cAAA,OAAA,CACEsB,UAAW,mCAAkCiC,EAAgB,YAAc,IAC3EgB,QAAShB,GAETxD,MAAAC,cAACH,EAAa,CACZ2E,SAAUzB,EACVnD,MAAOF,KAIZsD,GACCjD,MAAAC,cAAA,OAAA,CACEsB,UAAW,qCAAoCgC,EAAiB,YAAc,IAC9EiB,QAASjB,GAETvD,MAAAC,cAACH,EAAa,CACZ2E,SAAUxB,EACVpD,MAAOF,KAIZoD,GAAYA,GAEdG,GAASA,GAEXL,GAAgB7C,MAAAC,cAAA,IAAA,CAAGsB,UAAU,QAAQsB,GACrCC,GAAY9C,MAAAC,cAAA,IAAA,CAAGsB,UAAW,SAAQoB,EAAQ,YAAc,KAAOG,GACnD,IAInBR,EAAM9B,YAAc"}
|
|
1
|
+
{"version":3,"file":"Field.js","sources":["../../../../../../../../src/core/ui/components/field/Field.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable jsx-a11y/no-static-element-interactions */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\nimport { FC, ReactNode, memo, useMemo, useCallback, PropsWithChildren, CSSProperties, createElement } from 'react'\n\nimport { classNames } from '../../../utils/helpers/ui'\n\nimport classes from './field.module.scss'\nimport type { FieldError, IconComponentType } from './types'\n\nlet iconColor: string | (() => string) = () => '#000000'\n\nexport const setIconColor = (color: string | (() => string)): void => {\n iconColor = color\n}\n\nlet IconComponent: IconComponentType = memo(function IconComponent() { return <span /> })\n\nexport const setIconComponent = (component: IconComponentType): void => {\n IconComponent = component\n}\n\nexport type FileWrapperProps = PropsWithChildren<unknown> & {\n className?: string\n error?: boolean\n disabled?: boolean\n userDisabled?: boolean\n css?: string\n}\n\ntype EventType = { target: any; type?: any } & Partial<Event>\nexport interface FieldProps {\n label?: string\n name?: string\n type?: string\n min?: number | string | Date | any\n max?: number | string | Date | any\n value?: string | number | readonly string[] | undefined\n defaultValue?: string | number | readonly string[] | undefined\n placeholder?: string\n inputRef?: ReactHookFormRef\n error?: boolean\n errors?: FieldError\n disabled?: boolean\n userDisabled?: boolean\n helpTextInfo?: string\n helpText?: string\n iconLeft?: string\n iconRight?: string\n withoutComponent?: boolean\n addon?: ReactNode\n children?: ReactNode\n className?: string\n onChange?: (event?: EventType) => unknown\n // TODO, rename... something like changeHandler or valueDecorator\n onChangeInner?: (value: string | number) => string | number\n onBlur?: (event?: EventType) => void\n onFocus?: (event?: EventType | undefined) => void\n rightIconClick?: (event?: EventType) => void\n leftIconClick?: (event?: EventType) => void\n options?: any[] | null\n creatable?: boolean\n async?: boolean\n style?: CSSProperties\n [key: string]: any\n}\n\ninterface SelectProps extends FieldProps {\n id?: string\n}\n\ntype OptionObj = { label: string | number | undefined; value: string | number | undefined }\ntype Option = OptionObj | string | number\n\nexport const Select: FC<SelectProps>\n= memo<SelectProps>(\n function Select({ options, value, inputRef, ...props }: SelectProps) {\n return (\n <div className='select'>\n <select {...props} ref={inputRef} defaultValue={value}>\n {options?.map((option: Option) => (\n <option\n key={`${JSON.stringify(option)}`}\n value={typeof option === 'object' ? (option as OptionObj)?.value : option}\n >\n {typeof option === 'object' ? (option as OptionObj)?.label : option}\n </option>\n ))}\n </select>\n </div>\n )\n },\n)\nconst TextAreaComponent = memo((props) => createElement('textarea', props))\n\nTextAreaComponent.displayName = 'TextAreaComponent'\n\nconst InputComponent = memo((props) => createElement('input', props))\n\nInputComponent.displayName = 'InputComponent'\n\nexport const Field: FC<FieldProps> = memo<FieldProps>(({\n label,\n name,\n type = 'text',\n value,\n defaultValue,\n placeholder,\n inputRef,\n error,\n disabled,\n userDisabled,\n withoutComponent,\n helpTextInfo,\n helpText,\n children,\n iconLeft,\n iconRight,\n addon,\n className,\n onChange,\n onChangeInner,\n onBlur,\n onFocus,\n rightIconClick,\n leftIconClick,\n options,\n style,\n ...props\n}: FieldProps) => {\n let Component: FC<any> = InputComponent\n\n if (!children && type === 'textarea') {\n Component = TextAreaComponent\n }\n const handleFocus = useCallback((event: Event | EventType | undefined) => {\n if (userDisabled) {\n event?.preventDefault?.()\n } else {\n onFocus && onFocus(event)\n }\n }, [userDisabled, onFocus])\n\n const handleChange = useCallback((event: { target: { value: string } }) => {\n if (userDisabled) {\n return\n }\n if (onChangeInner && event?.target) {\n // eslint-disable-next-line no-param-reassign\n event.target.value = onChangeInner((event.target.value as string)) as string\n onChange && onChange(event as EventType)\n } else {\n onChange && onChange(event as EventType)\n }\n }, [onChangeInner, onChange, userDisabled])\n\n const valueProps = useMemo(() => {\n if (value === undefined) {\n return { defaultValue }\n }\n return { value }\n }, [value, defaultValue])\n\n return (\n <div\n className={classNames(\n classes.field,\n (disabled || userDisabled) && classes.disable,\n className,\n )}\n // TODO fix\n // error={error}\n style={style}\n >\n <label htmlFor={name} className='label'>{label}</label>\n <div className={`field ${addon ? 'has-addons' : ''}`}>\n <div\n className={`control mainControl ${iconLeft && !withoutComponent\n ? 'has-icons-left' : ''} ${iconRight ? 'has-icons-right' : ''}`}\n >\n {!withoutComponent && ((!children && (type === 'select' || options))\n ? (\n <Select\n name={name}\n id={name}\n inputRef={inputRef}\n className={`input ${error ? 'is-danger' : ''}`}\n type='select'\n placeholder={placeholder}\n value={value}\n options={options}\n // TODO also handle change but value versus event.target.value issue\n onChange={onChange}\n onBlur={onBlur}\n onFocus={handleFocus}\n onKeyDown={handleFocus}\n autoComplete='off'\n disabled={disabled}\n {...props}\n />\n )\n : (\n !children && (\n <Component\n name={name}\n id={name}\n ref={inputRef}\n className={`input ${error ? 'is-danger' : ''}`}\n type={type}\n placeholder={placeholder}\n {...valueProps}\n onChange={handleChange}\n onBlur={onBlur}\n onFocus={handleFocus}\n onKeyDown={handleFocus}\n autoComplete='off'\n disabled={disabled}\n {...props}\n />\n )))}\n\n {iconLeft && !withoutComponent && (\n <span\n className={`iconLeft icon is-small is-left ${leftIconClick ? 'is-action' : ''}`}\n onClick={leftIconClick}\n >\n <IconComponent\n iconName={iconLeft}\n color={iconColor}\n />\n </span>\n )}\n {iconRight && (\n <span\n className={`iconRight icon is-small is-right ${rightIconClick ? 'is-action' : ''}`}\n onClick={rightIconClick}\n >\n <IconComponent\n iconName={iconRight}\n color={iconColor}\n />\n </span>\n )}\n {children && children}\n </div>\n {addon && addon}\n </div>\n {helpTextInfo && <p className='help'>{helpTextInfo}</p>}\n {helpText && <p className={`help ${error ? 'is-danger' : ''}`}>{helpText}</p>}\n </div>\n )\n})\n\nField.displayName = 'Field'\n"],"names":["iconColor","setIconColor","color","IconComponent","memo","React","createElement","setIconComponent","component","Select","_ref","options","value","inputRef","props","className","_extends","ref","defaultValue","map","option","key","JSON","stringify","label","TextAreaComponent","displayName","InputComponent","Field","_ref2","name","type","placeholder","error","disabled","userDisabled","withoutComponent","helpTextInfo","helpText","children","iconLeft","iconRight","addon","onChange","onChangeInner","onBlur","onFocus","rightIconClick","leftIconClick","style","Component","handleFocus","useCallback","event","preventDefault","handleChange","target","valueProps","useMemo","undefined","classNames","classes","field","disable","htmlFor","id","onKeyDown","autoComplete","onClick","iconName"],"mappings":"6PAUA,IAAIA,EAAqCA,IAAM,UAElCC,MAAAA,EAAgBC,IAC3BF,EAAYE,CAAK,EAGnB,IAAIC,EAAmCC,GAAK,WAA2B,OAAOC,MAAAC,cAAA,OAAA,KAAS,IAE1EC,MAAAA,EAAoBC,IAC/BL,EAAgBK,CAAS,EAuDdC,EACXL,GACA,SAAeM,GAAsD,IAArDC,QAAEA,EAAOC,MAAEA,EAAKC,SAAEA,KAAaC,GAAoBJ,EACjE,OACEL,MAAAC,cAAA,MAAA,CAAKS,UAAU,UACbV,MAAAC,cAAAU,SAAAA,KAAYF,EAAK,CAAEG,IAAKJ,EAAUK,aAAcN,IAC7CD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EAAQ,YAAc,KAAOK,GAC5D,IAIVV,EAAMF,YAAc"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e={field:"field-module_field__UfKm3",disabled:"field-module_disabled__4aFNw",label:"field-module_label__pJCHG",help:"field-module_help__8psM4",mainControl:"field-module_mainControl__RIMTe",select:"field-module_select__-wfDp",icon:"field-module_icon__6vSNr","is-action":"field-module_is-action__pf8ZC",input:"field-module_input__v-872"};export{e as default};
|
|
2
|
+
//# sourceMappingURL=field.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|