@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.
Files changed (32) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/index.js +102 -232
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/esm/components/css.js +88 -225
  5. package/dist/esm/components/css.js.map +1 -1
  6. package/dist/esm/fields/field-combobox.js +1 -1
  7. package/dist/esm/fields/field-combobox.js.map +1 -1
  8. package/dist/esm/forms/combobox/combobox-combobox.js +1 -0
  9. package/dist/esm/forms/combobox/combobox-combobox.js.map +1 -1
  10. package/dist/esm/forms/combobox/combobox.js +10 -4
  11. package/dist/esm/forms/combobox/combobox.js.map +1 -1
  12. package/dist/esm/forms/custom-select/custom-select.js.map +1 -1
  13. package/dist/esm/forms/form/form.js +3 -2
  14. package/dist/esm/forms/form/form.js.map +1 -1
  15. package/dist/esm/forms/form-tester/form-tester.js.map +1 -1
  16. package/dist/types/components/css.d.ts +6 -2
  17. package/dist/types/components/css.d.ts.map +1 -1
  18. package/dist/types/forms/combobox/combobox-combobox.d.ts.map +1 -1
  19. package/dist/types/forms/combobox/combobox.d.ts.map +1 -1
  20. package/dist/types/forms/form/form.d.ts.map +1 -1
  21. package/dist/types/forms/form-tester/form-tester.d.ts +3 -3
  22. package/dist/types/forms/form-tester/form-tester.d.ts.map +1 -1
  23. package/package.json +1 -1
  24. package/src/components/css.ts +90 -227
  25. package/src/fields/field-combobox.tsx +1 -1
  26. package/src/forms/combobox/combobox-combobox.tsx +1 -0
  27. package/src/forms/combobox/combobox.tsx +10 -4
  28. package/src/forms/custom-select/custom-select.tsx +1 -1
  29. package/src/forms/form/form.tsx +3 -3
  30. package/src/forms/form-tester/form-tester.tsx +8 -8
  31. package/src/theme/global.vars.scss +220 -220
  32. 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
- 'alignContent': 'align-content',
204
- 'alignItems': 'align-items',
205
- 'alignSelf': 'align-self',
206
- /*
207
- "animation": "animation",
208
- "animationDelay": "animation-delay",
209
- "animationDirection": "animation-direction",
210
- "animationDuration": "animation-duration",
211
- "animationFillMode": "animation-fill-mode",
212
- "animationIterationCount": "animation-iteration-count",
213
- "animationName": "animation-name",
214
- "animationPlayState": "animation-play-state",
215
- "animationTimingFunction": "animation-timing-function",
216
- */
217
- 'aspectRatio': 'aspect-ratio',
218
- /*
219
- "backfaceVisibility": "backface-visibility",
220
- */
221
- 'background': 'background',
222
- /*
223
- "backgroundAttachment": "background-attachment",
224
- "backgroundClip": "background-clip",
225
- */
226
- 'backgroundColor': 'background-color',
227
- /*
228
- "backgroundImage": "background-image",
229
- "backgroundOrigin": "background-origin",
230
- "backgroundPosition": "background-position",
231
- "backgroundRepeat": "background-repeat",
232
- "backgroundSize": "background-size",
233
- */
234
- 'border': 'border',
235
- 'borderBottom': 'border-bottom',
236
- /*
237
- "borderBottomColor": "border-bottom-color",
238
- "borderBottomLeftRadius": "border-bottom-left-radius",
239
- "borderBottomRightRadius": "border-bottom-right-radius",
240
- "borderBottomStyle": "border-bottom-style",
241
- "borderBottomWidth": "border-bottom-width",
242
- "borderCollapse": "border-collapse",
243
- "borderColor": "border-color",
244
- "borderImage": "border-image",
245
- "borderImageOutset": "border-image-outset",
246
- "borderImageRepeat": "border-image-repeat",
247
- "borderImageSlice": "border-image-slice",
248
- "borderImageSource": "border-image-source",
249
- "borderImageWidth": "border-image-width",
250
- */
251
- 'borderLeft': 'border-left',
252
- /*
253
- "borderLeftColor": "border-left-color",
254
- "borderLeftStyle": "border-left-style",
255
- "borderLeftWidth": "border-left-width",
256
- */
257
- 'borderRadius': 'border-radius',
258
- 'borderRight': 'border-right',
259
- /*
260
- "borderRightColor": "border-right-color",
261
- "borderRightStyle": "border-right-style",
262
- "borderRightWidth": "border-right-width",
263
- "borderSpacing": "border-spacing",
264
- "borderStyle": "border-style",
265
- */
266
- 'borderTop': 'border-top',
267
- /*
268
- "borderTopColor": "border-top-color",
269
- "borderTopLeftRadius": "border-top-left-radius",
270
- "borderTopRightRadius": "border-top-right-radius",
271
- "borderTopStyle": "border-top-style",
272
- "borderTopWidth": "border-top-width",
273
- "borderWidth": "border-width",
274
- */
275
- 'bottom': 'bottom',
276
- 'boxShadow': 'box-shadow',
277
- /*
278
- "boxSizing": "box-sizing",
279
- "captionSide": "caption-side",
280
- "clear": "clear",
281
- */
282
- 'clip': 'clip',
283
- 'color': 'color',
284
- 'columnCount': 'column-count',
285
- 'columnFill': 'column-fill',
286
- 'columnGap': 'column-gap',
287
- 'columnRule': 'column-rule',
288
- /*
289
- "columnRuleColor": "column-rule-color",
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
- setInnerValue(Array.isArray(selectedValue) ? selectedValue[0] : selectedValue);
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)