@websolutespa/bom-mixer-ui 1.9.0 → 1.9.2
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/CHANGELOG.md +14 -0
- package/dist/cjs/index.js +102 -232
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/css.js +88 -225
- package/dist/esm/components/css.js.map +1 -1
- package/dist/esm/fields/field-combobox.js +1 -1
- package/dist/esm/fields/field-combobox.js.map +1 -1
- package/dist/esm/forms/combobox/combobox-combobox.js +1 -0
- package/dist/esm/forms/combobox/combobox-combobox.js.map +1 -1
- package/dist/esm/forms/combobox/combobox.js +10 -4
- package/dist/esm/forms/combobox/combobox.js.map +1 -1
- package/dist/esm/forms/custom-select/custom-select.js.map +1 -1
- package/dist/esm/forms/form/form.js +3 -2
- package/dist/esm/forms/form/form.js.map +1 -1
- package/dist/esm/forms/form-tester/form-tester.js.map +1 -1
- package/dist/types/components/css.d.ts +6 -2
- package/dist/types/components/css.d.ts.map +1 -1
- package/dist/types/forms/combobox/combobox-combobox.d.ts.map +1 -1
- package/dist/types/forms/combobox/combobox.d.ts.map +1 -1
- package/dist/types/forms/form/form.d.ts.map +1 -1
- package/dist/types/forms/form-tester/form-tester.d.ts +3 -3
- package/dist/types/forms/form-tester/form-tester.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/css.ts +90 -227
- package/src/fields/field-combobox.tsx +1 -1
- package/src/forms/combobox/combobox-combobox.tsx +1 -0
- package/src/forms/combobox/combobox.tsx +10 -4
- package/src/forms/custom-select/custom-select.tsx +1 -1
- package/src/forms/form/form.tsx +3 -3
- package/src/forms/form-tester/form-tester.tsx +8 -8
- package/src/theme/global.vars.scss +220 -220
- package/src/theme/global.vars.ts +650 -650
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @websolutespa/bom-mixer-ui
|
|
2
2
|
|
|
3
|
+
## 1.9.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Added: StyledComponent css props
|
|
8
|
+
|
|
9
|
+
## 1.9.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Modified: FieldCombobox, Combobox, FormTester, Form
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
- @websolutespa/bom-mixer-forms@1.9.1
|
|
16
|
+
|
|
3
17
|
## 1.9.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -199,232 +199,95 @@ function getFontVariantResponsive(props, callback) {
|
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
+
// : Partial<Record<keyof CSSProperties, string>>
|
|
202
203
|
const CssObj = {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
"columnRuleStyle": "column-rule-style",
|
|
291
|
-
"columnRuleWidth": "column-rule-width",
|
|
292
|
-
*/
|
|
293
|
-
'columnSpan': 'column-span',
|
|
294
|
-
'columnWidth': 'column-width',
|
|
295
|
-
'columns': 'columns',
|
|
296
|
-
/*
|
|
297
|
-
'content': 'content',
|
|
298
|
-
"counterIncrement": "counter-increment",
|
|
299
|
-
"counterReset": "counter-reset",
|
|
300
|
-
*/
|
|
301
|
-
'cursor': 'cursor',
|
|
302
|
-
'direction': 'direction',
|
|
303
|
-
'display': 'display',
|
|
304
|
-
/*
|
|
305
|
-
"emptyCells": "empty-cells",
|
|
306
|
-
*/
|
|
307
|
-
'flex': 'flex',
|
|
308
|
-
'flexBasis': 'flex-basis',
|
|
309
|
-
'flexDirection': 'flex-direction',
|
|
310
|
-
'flexFlow': 'flex-flow',
|
|
311
|
-
'flexGrow': 'flex-grow',
|
|
312
|
-
'flexShrink': 'flex-shrink',
|
|
313
|
-
'flexWrap': 'flex-wrap',
|
|
314
|
-
'float': 'float',
|
|
315
|
-
/*
|
|
316
|
-
"font": "font",
|
|
317
|
-
"fontFamily": "font-family",
|
|
318
|
-
*/
|
|
319
|
-
'fontSize': 'font-size',
|
|
320
|
-
/*
|
|
321
|
-
"fontSizeAdjust": "font-size-adjust",
|
|
322
|
-
"fontStretch": "font-stretch",
|
|
323
|
-
"fontVariant": "font-variant",
|
|
324
|
-
*/
|
|
325
|
-
'fontStyle': 'font-style',
|
|
326
|
-
'fontWeight': 'font-weight',
|
|
327
|
-
'gap': 'gap',
|
|
328
|
-
'grid': 'grid',
|
|
329
|
-
'gridAutoColumns': 'grid-auto-columns',
|
|
330
|
-
'gridColumnEnd': 'grid-column-end',
|
|
331
|
-
'gridColumnStart': 'grid-column-start',
|
|
332
|
-
'gridTemplate': 'grid-template',
|
|
333
|
-
'gridTemplateColumns': 'grid-template-columns',
|
|
334
|
-
'height': 'height',
|
|
335
|
-
'inset': 'inset',
|
|
336
|
-
'justifyContent': 'justify-content',
|
|
337
|
-
'left': 'left',
|
|
338
|
-
'letterSpacing': 'letter-spacing',
|
|
339
|
-
'lineHeight': 'line-height',
|
|
340
|
-
/*
|
|
341
|
-
"listStyle": "list-style",
|
|
342
|
-
"listStyleImage": "list-style-image",
|
|
343
|
-
"listStylePosition": "list-style-position",
|
|
344
|
-
"listStyleType": "list-style-type",
|
|
345
|
-
*/
|
|
346
|
-
'margin': 'margin',
|
|
347
|
-
'marginBottom': 'margin-bottom',
|
|
348
|
-
'marginLeft': 'margin-left',
|
|
349
|
-
'marginRight': 'margin-right',
|
|
350
|
-
'marginTop': 'margin-top',
|
|
351
|
-
'maxHeight': 'max-height',
|
|
352
|
-
'maxWidth': 'max-width',
|
|
353
|
-
'minHeight': 'min-height',
|
|
354
|
-
'minWidth': 'min-width',
|
|
355
|
-
'opacity': 'opacity',
|
|
356
|
-
'order': 'order',
|
|
357
|
-
'outline': 'outline',
|
|
358
|
-
/*
|
|
359
|
-
"outlineColor": "outline-color",
|
|
360
|
-
"outlineOffset": "outline-offset",
|
|
361
|
-
"outlineStyle": "outline-style",
|
|
362
|
-
"outlineWidth": "outline-width",
|
|
363
|
-
*/
|
|
364
|
-
'overflow': 'overflow',
|
|
365
|
-
'overflowX': 'overflow-x',
|
|
366
|
-
'overflowY': 'overflow-y',
|
|
367
|
-
'padding': 'padding',
|
|
368
|
-
'paddingBottom': 'padding-bottom',
|
|
369
|
-
'paddingLeft': 'padding-left',
|
|
370
|
-
'paddingRight': 'padding-right',
|
|
371
|
-
'paddingTop': 'padding-top',
|
|
372
|
-
/*
|
|
373
|
-
"pageBreakAfter": "page-break-after",
|
|
374
|
-
"pageBreakBefore": "page-break-before",
|
|
375
|
-
"pageBreakInside": "page-break-inside",
|
|
376
|
-
"perspective": "perspective",
|
|
377
|
-
"perspectiveOrigin": "perspective-origin",
|
|
378
|
-
*/
|
|
379
|
-
'position': 'position',
|
|
380
|
-
/*
|
|
381
|
-
"quotes": "quotes",
|
|
382
|
-
"resize": "resize",
|
|
383
|
-
*/
|
|
384
|
-
'right': 'right',
|
|
385
|
-
'rowGap': 'row-gap',
|
|
386
|
-
/*
|
|
387
|
-
"tabSize": "tab-size",
|
|
388
|
-
"tableLayout": "table-layout",
|
|
389
|
-
*/
|
|
390
|
-
'textAlign': 'text-align',
|
|
391
|
-
/*
|
|
392
|
-
"textAlignLast": "text-align-last",
|
|
393
|
-
*/
|
|
394
|
-
'textDecoration': 'text-decoration',
|
|
395
|
-
/*
|
|
396
|
-
"textDecorationColor": "text-decoration-color",
|
|
397
|
-
"textDecorationLine": "text-decoration-line",
|
|
398
|
-
"textDecorationStyle": "text-decoration-style",
|
|
399
|
-
"textIndent": "text-indent",
|
|
400
|
-
"textJustify": "text-justify",
|
|
401
|
-
"textOverflow": "text-overflow",
|
|
402
|
-
"textShadow": "text-shadow",
|
|
403
|
-
*/
|
|
404
|
-
'textTransform': 'text-transform',
|
|
405
|
-
'top': 'top',
|
|
406
|
-
'transform': 'transform',
|
|
407
|
-
/*
|
|
408
|
-
"transformOrigin": "transform-origin",
|
|
409
|
-
"transformStyle": "transform-style",
|
|
410
|
-
*/
|
|
411
|
-
'transition': 'transition',
|
|
412
|
-
/*
|
|
413
|
-
"transitionDelay": "transition-delay",
|
|
414
|
-
"transitionDuration": "transition-duration",
|
|
415
|
-
"transitionProperty": "transition-property",
|
|
416
|
-
"transitionTimingFunction": "transition-timing-function",
|
|
417
|
-
"verticalAlign": "vertical-align",
|
|
418
|
-
*/
|
|
419
|
-
'visibility': 'visibility',
|
|
420
|
-
'whiteSpace': 'white-space',
|
|
421
|
-
'width': 'width',
|
|
422
|
-
/*
|
|
423
|
-
"wordBreak": "word-break",
|
|
424
|
-
"wordSpacing": "word-spacing",
|
|
425
|
-
"wordWrap": "word-wrap",
|
|
426
|
-
*/
|
|
427
|
-
'zIndex': 'z-index'
|
|
204
|
+
alignContent: 'align-content',
|
|
205
|
+
alignItems: 'align-items',
|
|
206
|
+
alignSelf: 'align-self',
|
|
207
|
+
aspectRatio: 'aspect-ratio',
|
|
208
|
+
background: 'background',
|
|
209
|
+
backgroundColor: 'background-color',
|
|
210
|
+
border: 'border',
|
|
211
|
+
borderBottom: 'border-bottom',
|
|
212
|
+
borderLeft: 'border-left',
|
|
213
|
+
borderRadius: 'border-radius',
|
|
214
|
+
borderRight: 'border-right',
|
|
215
|
+
borderTop: 'border-top',
|
|
216
|
+
bottom: 'bottom',
|
|
217
|
+
boxShadow: 'box-shadow',
|
|
218
|
+
clip: 'clip',
|
|
219
|
+
color: 'color',
|
|
220
|
+
columnCount: 'column-count',
|
|
221
|
+
columnFill: 'column-fill',
|
|
222
|
+
columnGap: 'column-gap',
|
|
223
|
+
columnRule: 'column-rule',
|
|
224
|
+
columns: 'columns',
|
|
225
|
+
columnSpan: 'column-span',
|
|
226
|
+
columnWidth: 'column-width',
|
|
227
|
+
cursor: 'cursor',
|
|
228
|
+
direction: 'direction',
|
|
229
|
+
display: 'display',
|
|
230
|
+
flex: 'flex',
|
|
231
|
+
flexBasis: 'flex-basis',
|
|
232
|
+
flexDirection: 'flex-direction',
|
|
233
|
+
flexFlow: 'flex-flow',
|
|
234
|
+
flexGrow: 'flex-grow',
|
|
235
|
+
flexShrink: 'flex-shrink',
|
|
236
|
+
flexWrap: 'flex-wrap',
|
|
237
|
+
float: 'float',
|
|
238
|
+
fontSize: 'font-size',
|
|
239
|
+
fontStyle: 'font-style',
|
|
240
|
+
fontWeight: 'font-weight',
|
|
241
|
+
gap: 'gap',
|
|
242
|
+
grid: 'grid',
|
|
243
|
+
gridAutoColumns: 'grid-auto-columns',
|
|
244
|
+
gridColumnEnd: 'grid-column-end',
|
|
245
|
+
gridColumnStart: 'grid-column-start',
|
|
246
|
+
gridTemplate: 'grid-template',
|
|
247
|
+
gridTemplateColumns: 'grid-template-columns',
|
|
248
|
+
height: 'height',
|
|
249
|
+
inset: 'inset',
|
|
250
|
+
justifyContent: 'justify-content',
|
|
251
|
+
left: 'left',
|
|
252
|
+
letterSpacing: 'letter-spacing',
|
|
253
|
+
lineHeight: 'line-height',
|
|
254
|
+
margin: 'margin',
|
|
255
|
+
marginBottom: 'margin-bottom',
|
|
256
|
+
marginLeft: 'margin-left',
|
|
257
|
+
marginRight: 'margin-right',
|
|
258
|
+
marginTop: 'margin-top',
|
|
259
|
+
maxHeight: 'max-height',
|
|
260
|
+
maxWidth: 'max-width',
|
|
261
|
+
minHeight: 'min-height',
|
|
262
|
+
minWidth: 'min-width',
|
|
263
|
+
opacity: 'opacity',
|
|
264
|
+
order: 'order',
|
|
265
|
+
outline: 'outline',
|
|
266
|
+
overflow: 'overflow',
|
|
267
|
+
overflowX: 'overflow-x',
|
|
268
|
+
overflowY: 'overflow-y',
|
|
269
|
+
padding: 'padding',
|
|
270
|
+
paddingBlock: 'padding-block',
|
|
271
|
+
paddingBottom: 'padding-bottom',
|
|
272
|
+
paddingInline: 'padding-inline',
|
|
273
|
+
paddingLeft: 'padding-left',
|
|
274
|
+
paddingRight: 'padding-right',
|
|
275
|
+
paddingTop: 'padding-top',
|
|
276
|
+
placeContent: 'place-content',
|
|
277
|
+
pointerEvents: 'pointer-events',
|
|
278
|
+
position: 'position',
|
|
279
|
+
right: 'right',
|
|
280
|
+
rowGap: 'row-gap',
|
|
281
|
+
textAlign: 'text-align',
|
|
282
|
+
textDecoration: 'text-decoration',
|
|
283
|
+
textTransform: 'text-transform',
|
|
284
|
+
top: 'top',
|
|
285
|
+
transform: 'transform',
|
|
286
|
+
transition: 'transition',
|
|
287
|
+
visibility: 'visibility',
|
|
288
|
+
whiteSpace: 'white-space',
|
|
289
|
+
width: 'width',
|
|
290
|
+
zIndex: 'z-index'
|
|
428
291
|
};
|
|
429
292
|
const CssMap = new Map(Object.entries(CssObj));
|
|
430
293
|
/*
|
|
@@ -9381,10 +9244,16 @@ function Combobox$1(_a) {
|
|
|
9381
9244
|
}, [innerValue, outerValue]);
|
|
9382
9245
|
React.useEffect(() => {
|
|
9383
9246
|
const selectedValue = outerToInnerValue(outerSelectedValue);
|
|
9384
|
-
// console.log('Combobox', selectedValue, innerSelectedValue);
|
|
9385
9247
|
if (innerSelectedValue !== selectedValue) {
|
|
9386
|
-
|
|
9248
|
+
// const value = Array.isArray(selectedValue) ? selectedValue[0] : selectedValue;
|
|
9249
|
+
// setInnerValue(value);
|
|
9387
9250
|
setInnerSelectedValue(selectedValue);
|
|
9251
|
+
if (selectedValue) {
|
|
9252
|
+
setInnerValue(Array.isArray(selectedValue) ? selectedValue[0] : selectedValue);
|
|
9253
|
+
} else {
|
|
9254
|
+
setInnerValue('');
|
|
9255
|
+
}
|
|
9256
|
+
// console.log('Combobox', innerSelectedValue, selectedValue);
|
|
9388
9257
|
}
|
|
9389
9258
|
}, [innerSelectedValue, outerSelectedValue]);
|
|
9390
9259
|
const onBlur_ = event => {
|
|
@@ -9419,11 +9288,11 @@ function Combobox$1(_a) {
|
|
|
9419
9288
|
const globalVariants = useVariants('combobox', comboboxVariants);
|
|
9420
9289
|
variants = variants || globalVariants;
|
|
9421
9290
|
return jsxRuntime.jsx(Ariakit__namespace.ComboboxProvider, Object.assign({
|
|
9422
|
-
value: innerValue,
|
|
9423
9291
|
defaultValue: defaultValue,
|
|
9292
|
+
value: innerValue,
|
|
9424
9293
|
setValue: onSetValue,
|
|
9425
|
-
selectedValue: innerSelectedValue,
|
|
9426
9294
|
defaultSelectedValue: defaultSelectedValue,
|
|
9295
|
+
selectedValue: innerSelectedValue,
|
|
9427
9296
|
setSelectedValue: onSetSelectedValue
|
|
9428
9297
|
}, props, {
|
|
9429
9298
|
children: jsxRuntime.jsx(ComboboxContext.Provider, {
|
|
@@ -9541,6 +9410,7 @@ const ComboboxCombobox = /*#__PURE__*/React.forwardRef(function ComboboxCombobox
|
|
|
9541
9410
|
const onBlur = () => {
|
|
9542
9411
|
// store.setValue(Array.isArray(selectedValue) ? selectedValue[0] : selectedValue);
|
|
9543
9412
|
};
|
|
9413
|
+
// console.log('selectedValue', selectedValue);
|
|
9544
9414
|
const classNames = bomCore.getClassNames('combobox__combobox', {
|
|
9545
9415
|
empty: isEmptyValue(selectedValue)
|
|
9546
9416
|
}, className);
|
|
@@ -10611,10 +10481,10 @@ const Form = /*#__PURE__*/React.forwardRef((_a, ref) => {
|
|
|
10611
10481
|
React.useEffect(() => {
|
|
10612
10482
|
if (form) {
|
|
10613
10483
|
const onChange = value => {
|
|
10614
|
-
console.log('FormComponent.onChange', form.state);
|
|
10484
|
+
// console.log('FormComponent.onChange', form.state);
|
|
10615
10485
|
if (innerRef.current !== null) {
|
|
10616
10486
|
const formElement = innerRef.current;
|
|
10617
|
-
Object.entries(form.state).forEach(_ref => {
|
|
10487
|
+
Object.entries(bomMixerForms.mapState_(form.state)).forEach(_ref => {
|
|
10618
10488
|
let [k, v] = _ref;
|
|
10619
10489
|
formElement.classList.toggle(k, v);
|
|
10620
10490
|
});
|
|
@@ -12677,7 +12547,7 @@ function FieldCombobox(_ref) {
|
|
|
12677
12547
|
const onChange = option => {
|
|
12678
12548
|
setValue(option);
|
|
12679
12549
|
};
|
|
12680
|
-
console.log('FieldCombobox', control.value);
|
|
12550
|
+
// console.log('FieldCombobox', control.value);
|
|
12681
12551
|
return state.flags.hidden ? jsxRuntime.jsx("input", {
|
|
12682
12552
|
type: "hidden",
|
|
12683
12553
|
value: bomMixerForms.valueToString(state.value)
|