@xelto.npm/xc2-lib 0.0.46 → 0.0.47

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/cjs/index.js CHANGED
@@ -42060,7 +42060,7 @@ const styledRootConfig = {
42060
42060
  const StyledInput = styled(Input, styledRootConfig)('');
42061
42061
  const StyledOutlinedInput = styled(OutlinedInput, styledRootConfig)('');
42062
42062
  const StyledFilledInput = styled(FilledInput, styledRootConfig)('');
42063
- const Select = /*#__PURE__*/React__namespace.forwardRef(function Select(inProps, ref) {
42063
+ const Select$1 = /*#__PURE__*/React__namespace.forwardRef(function Select(inProps, ref) {
42064
42064
  const props = useThemeProps({
42065
42065
  name: 'MuiSelect',
42066
42066
  props: inProps
@@ -42150,7 +42150,7 @@ const Select = /*#__PURE__*/React__namespace.forwardRef(function Select(inProps,
42150
42150
  }, other))
42151
42151
  });
42152
42152
  });
42153
- process.env.NODE_ENV !== "production" ? Select.propTypes /* remove-proptypes */ = {
42153
+ process.env.NODE_ENV !== "production" ? Select$1.propTypes /* remove-proptypes */ = {
42154
42154
  // ----------------------------- Warning --------------------------------
42155
42155
  // | These PropTypes are generated from the TypeScript type definitions |
42156
42156
  // | To update them edit the d.ts file and run "yarn proptypes" |
@@ -42297,7 +42297,7 @@ process.env.NODE_ENV !== "production" ? Select.propTypes /* remove-proptypes */
42297
42297
  */
42298
42298
  variant: propTypes.exports.oneOf(['filled', 'outlined', 'standard'])
42299
42299
  } : void 0;
42300
- Select.muiName = 'Select';
42300
+ Select$1.muiName = 'Select';
42301
42301
 
42302
42302
  function getTextFieldUtilityClass(slot) {
42303
42303
  return generateUtilityClass('MuiTextField', slot);
@@ -42469,7 +42469,7 @@ const TextField$1 = /*#__PURE__*/React__namespace.forwardRef(function TextField(
42469
42469
  id: inputLabelId
42470
42470
  }, InputLabelProps, {
42471
42471
  children: label
42472
- })), select ? /*#__PURE__*/jsxRuntime.exports.jsx(Select, _extends$1b({
42472
+ })), select ? /*#__PURE__*/jsxRuntime.exports.jsx(Select$1, _extends$1b({
42473
42473
  "aria-describedby": helperTextId,
42474
42474
  id: id,
42475
42475
  labelId: inputLabelId,
@@ -72222,7 +72222,7 @@ const TablePaginationSelectLabel = styled('p', {
72222
72222
  }) => _extends$1b({}, theme.typography.body2, {
72223
72223
  flexShrink: 0
72224
72224
  }));
72225
- const TablePaginationSelect = styled(Select, {
72225
+ const TablePaginationSelect = styled(Select$1, {
72226
72226
  name: 'MuiTablePagination',
72227
72227
  slot: 'Select',
72228
72228
  overridesResolver: (props, styles) => _extends$1b({
@@ -81451,6 +81451,192 @@ var TextField = function (_a) {
81451
81451
  } })));
81452
81452
  };
81453
81453
 
81454
+ var StyledAutocomplete = styled(Autocomplete)(function (_a) {
81455
+ return ({
81456
+ width: '100%',
81457
+ '& label': {
81458
+ zIndex: 0,
81459
+ color: theme.mainPallete.primary.placeholderText,
81460
+ transform: 'translate(20px,15px) scale(1)',
81461
+ '&.Mui-focused, &[data-shrink="true"]': {
81462
+ color: theme.mainPallete.primary.blue,
81463
+ transform: 'translate(15px,-10px) scale(0.75)',
81464
+ },
81465
+ '&.Mui-disabled': {
81466
+ color: theme.mainPallete.primary.placeholderText,
81467
+ },
81468
+ },
81469
+ '& label, .MuiOutlinedInput-root': {
81470
+ fontSize: 21,
81471
+ fontWeight: theme.fontWeight.regular,
81472
+ fontFamily: theme.fontFamily,
81473
+ },
81474
+ '.MuiOutlinedInput-root': {
81475
+ color: theme.mainPallete.primary.blue,
81476
+ padding: '7.5px 75px 7.5px 20px !important',
81477
+ borderRadius: 7,
81478
+ '&.Mui-focused': {
81479
+ '.MuiOutlinedInput-notchedOutline': {
81480
+ borderColor: theme.mainPallete.primary.blue,
81481
+ },
81482
+ },
81483
+ '.MuiOutlinedInput-notchedOutline': {
81484
+ borderColor: theme.mainPallete.primary.blue,
81485
+ },
81486
+ '&.Mui-disabled fieldset': {
81487
+ borderColor: theme.mainPallete.primary.placeholderText,
81488
+ },
81489
+ '&.MuiInputBase-adornedStart': {
81490
+ paddingTop: 13,
81491
+ paddingBottom: 13
81492
+ },
81493
+ },
81494
+ 'div.MuiAutocomplete-endAdornment': {
81495
+ top: 'calc(50% - 17px)',
81496
+ right: '20px !important',
81497
+ 'button': {
81498
+ padding: 0,
81499
+ transition: 'transform 0.15s linear',
81500
+ '&[aria-label="Close"]': {
81501
+ transform: 'rotateX(180deg)'
81502
+ }
81503
+ },
81504
+ '.MuiAutocomplete-clearIndicator': {
81505
+ marginRight: '4px !important',
81506
+ color: theme.mainPallete.primary.blue
81507
+ },
81508
+ 'svg': {
81509
+ width: 26,
81510
+ height: 26,
81511
+ }
81512
+ },
81513
+ '@media(min-width: 720px)': {
81514
+ '& label': {
81515
+ transform: 'translate(20px,17px) scale(1)',
81516
+ '&.Mui-focused, &[data-shrink="true"]': {
81517
+ transform: 'translate(14px,-14px) scale(0.75)',
81518
+ },
81519
+ },
81520
+ '& label, .MuiOutlinedInput-root': {
81521
+ fontSize: 26,
81522
+ },
81523
+ '.MuiOutlinedInput-root': {
81524
+ padding: '11.5px 75px 11.5px 20px !important',
81525
+ },
81526
+ 'div.MuiAutocomplete-endAdornment': {
81527
+ top: 'calc(50% - 22px)',
81528
+ '.MuiAutocomplete-clearIndicator': {
81529
+ marginRight: '8px !important',
81530
+ },
81531
+ 'svg': {
81532
+ width: 30,
81533
+ height: 30,
81534
+ }
81535
+ },
81536
+ },
81537
+ '@media(min-width: 1024px)': {
81538
+ '& label': {
81539
+ transform: 'translate(20px,11px) scale(1)',
81540
+ '&.Mui-focused, &[data-shrink="true"]': {
81541
+ transform: 'translate(15px,-9px) scale(0.75)'
81542
+ },
81543
+ },
81544
+ '& label, .MuiOutlinedInput-root': {
81545
+ fontSize: 16,
81546
+ },
81547
+ '.MuiOutlinedInput-root': {
81548
+ padding: '3.5px 65px 3.5px 20px !important',
81549
+ },
81550
+ 'div.MuiAutocomplete-endAdornment': {
81551
+ top: 'calc(50% - 13px)',
81552
+ '.MuiAutocomplete-clearIndicator': {
81553
+ marginRight: '2px !important',
81554
+ },
81555
+ 'svg': {
81556
+ width: 22,
81557
+ height: 22,
81558
+ }
81559
+ },
81560
+ },
81561
+ });
81562
+ });
81563
+ var StyledWrapper = styled('div', {
81564
+ shouldForwardProp: function (prop) { return prop !== "fluid"; }
81565
+ })(function (_a) {
81566
+ var fluid = _a.fluid;
81567
+ return ({
81568
+ display: 'flex',
81569
+ alignItems: 'center',
81570
+ width: fluid === true ? '100%' : 'min(100%, 368px)',
81571
+ '@media (min-width: 720px) and (max-width: 1023px)': {
81572
+ width: fluid === true ? '100%' : 'min(100%, 468px)',
81573
+ },
81574
+ '@media (min-width: 1024px)': {
81575
+ width: fluid === true ? '100%' : 'min(100%, 268px)',
81576
+ },
81577
+ });
81578
+ });
81579
+ var StyledPaper = styled(Paper)(function (_a) { return ({
81580
+ border: '2px solid #293072',
81581
+ borderRadius: '7px !important',
81582
+ translate: '0 -1.5px',
81583
+ '.MuiAutocomplete-listbox': {
81584
+ fontSize: 21,
81585
+ margin: '16px 8px !important',
81586
+ fontWeight: theme.fontWeight.regular,
81587
+ fontFamily: theme.fontFamily,
81588
+ color: theme.mainPallete.primary.blue,
81589
+ padding: '0 !important',
81590
+ '&::-webkit-scrollbar': __assign({}, theme.scrollbar),
81591
+ '@media(min-width: 720px)': {
81592
+ fontSize: 26,
81593
+ },
81594
+ '@media(min-width: 1024px)': {
81595
+ fontSize: 16,
81596
+ }
81597
+ },
81598
+ '.MuiAutocomplete-option': {
81599
+ padding: '6px 14px !important',
81600
+ '@media(min-width: 720px)': {
81601
+ padding: '9px 14px !important',
81602
+ },
81603
+ '@media(min-width: 1024px)': {
81604
+ padding: '3px 14px !important',
81605
+ }
81606
+ },
81607
+ '.MuiAutocomplete-noOptions': {
81608
+ fontWeight: theme.fontWeight.regular,
81609
+ fontFamily: theme.fontFamily,
81610
+ color: theme.mainPallete.primary.placeholderText + '!important',
81611
+ },
81612
+ }); });
81613
+ var Select = function (_a) {
81614
+ var _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.label, label = _c === void 0 ? 'Select' : _c, _d = _a.withRefresh, withRefresh = _d === void 0 ? false : _d, _e = _a.fluid, fluid = _e === void 0 ? false : _e, _f = _a.placeholder, placeholder = _f === void 0 ? '' : _f; _a.onRefreshClick; var _h = _a.options, options = _h === void 0 ? [] : _h, _j = _a.value, value = _j === void 0 ? null : _j, _k = _a.onChange, onChange = _k === void 0 ? null : _k, _l = _a.forwardedRef, forwardedRef = _l === void 0 ? null : _l, _m = _a.noOptionsText, noOptionsText = _m === void 0 ? "" : _m, props = __rest(_a, ["disabled", "label", "withRefresh", "fluid", "placeholder", "onRefreshClick", "options", "value", "onChange", "forwardedRef", "noOptionsText"]);
81615
+ var _o = React__namespace.useState(360), deg = _o[0], SetDeg = _o[1];
81616
+ var flag = false;
81617
+ var onRefresh = function (target) {
81618
+ if (flag)
81619
+ return;
81620
+ if (!target)
81621
+ return;
81622
+ var targetAsHTMLElement = target;
81623
+ targetAsHTMLElement.style.transform = "rotate(".concat(deg, "deg)");
81624
+ SetDeg(deg + 360);
81625
+ flag = true;
81626
+ setTimeout(function () {
81627
+ flag = false;
81628
+ }, 300);
81629
+ };
81630
+ return (jsxRuntime.exports.jsxs(StyledWrapper, __assign({ fluid: fluid, ref: forwardedRef }, { children: [jsxRuntime.exports.jsx(StyledAutocomplete, __assign({}, props, { disabled: disabled, options: options, value: value,
81631
+ // @ts-ignore
81632
+ onChange: onChange, popupIcon: jsxRuntime.exports.jsx(Icon$1, { iconName: "icon_ui_chevron_down", color: disabled ? 'disabled' : 'red-navy', style: { display: 'flex' } }), PaperComponent: StyledPaper, renderInput: function (params) { return jsxRuntime.exports.jsx(TextField$1, __assign({}, params, { label: label, placeholder: placeholder })); }, noOptionsText: noOptionsText })), withRefresh ? jsxRuntime.exports.jsx(Icon$1, { iconName: 'icon_wf_refresh', style: { display: 'flex' }, onClick: function (e) {
81633
+ var target = e.target;
81634
+ if (onRefresh) {
81635
+ onRefresh(target.parentNode);
81636
+ }
81637
+ } }) : null] })));
81638
+ };
81639
+
81454
81640
  exports.AppTile = AppTileComponent;
81455
81641
  exports.BottomBar = BottomBarComponent;
81456
81642
  exports.BottomInfoBar = BottomInfoBar;
@@ -81461,6 +81647,7 @@ exports.Icon = Icon$1;
81461
81647
  exports.IconButton = IconButtonComponent;
81462
81648
  exports.Illustration = Illustration;
81463
81649
  exports.Logo = Logo;
81650
+ exports.Select = Select;
81464
81651
  exports.TextField = TextField;
81465
81652
  exports.Typography = TypographyComponent;
81466
81653
  //# sourceMappingURL=index.js.map