@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.
@@ -0,0 +1 @@
1
+ export { default } from './Select';
@@ -10,3 +10,4 @@ export { default as BottomInfoBar } from "./bottomInfoBar";
10
10
  export { default as Checkbox } from "./checkbox";
11
11
  export { default as DatePicker } from "./Inputs/datepicker";
12
12
  export { default as TextField } from "./Inputs/textfield";
13
+ export { default as Select } from "./Inputs/select";
package/dist/esm/index.js CHANGED
@@ -42040,7 +42040,7 @@ const styledRootConfig = {
42040
42040
  const StyledInput = styled(Input, styledRootConfig)('');
42041
42041
  const StyledOutlinedInput = styled(OutlinedInput, styledRootConfig)('');
42042
42042
  const StyledFilledInput = styled(FilledInput, styledRootConfig)('');
42043
- const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
42043
+ const Select$1 = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
42044
42044
  const props = useThemeProps({
42045
42045
  name: 'MuiSelect',
42046
42046
  props: inProps
@@ -42130,7 +42130,7 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
42130
42130
  }, other))
42131
42131
  });
42132
42132
  });
42133
- process.env.NODE_ENV !== "production" ? Select.propTypes /* remove-proptypes */ = {
42133
+ process.env.NODE_ENV !== "production" ? Select$1.propTypes /* remove-proptypes */ = {
42134
42134
  // ----------------------------- Warning --------------------------------
42135
42135
  // | These PropTypes are generated from the TypeScript type definitions |
42136
42136
  // | To update them edit the d.ts file and run "yarn proptypes" |
@@ -42277,7 +42277,7 @@ process.env.NODE_ENV !== "production" ? Select.propTypes /* remove-proptypes */
42277
42277
  */
42278
42278
  variant: propTypes.exports.oneOf(['filled', 'outlined', 'standard'])
42279
42279
  } : void 0;
42280
- Select.muiName = 'Select';
42280
+ Select$1.muiName = 'Select';
42281
42281
 
42282
42282
  function getTextFieldUtilityClass(slot) {
42283
42283
  return generateUtilityClass('MuiTextField', slot);
@@ -42449,7 +42449,7 @@ const TextField$1 = /*#__PURE__*/React.forwardRef(function TextField(inProps, re
42449
42449
  id: inputLabelId
42450
42450
  }, InputLabelProps, {
42451
42451
  children: label
42452
- })), select ? /*#__PURE__*/jsxRuntime.exports.jsx(Select, _extends$1b({
42452
+ })), select ? /*#__PURE__*/jsxRuntime.exports.jsx(Select$1, _extends$1b({
42453
42453
  "aria-describedby": helperTextId,
42454
42454
  id: id,
42455
42455
  labelId: inputLabelId,
@@ -72202,7 +72202,7 @@ const TablePaginationSelectLabel = styled('p', {
72202
72202
  }) => _extends$1b({}, theme.typography.body2, {
72203
72203
  flexShrink: 0
72204
72204
  }));
72205
- const TablePaginationSelect = styled(Select, {
72205
+ const TablePaginationSelect = styled(Select$1, {
72206
72206
  name: 'MuiTablePagination',
72207
72207
  slot: 'Select',
72208
72208
  overridesResolver: (props, styles) => _extends$1b({
@@ -81431,5 +81431,191 @@ var TextField = function (_a) {
81431
81431
  } })));
81432
81432
  };
81433
81433
 
81434
- export { AppTileComponent as AppTile, BottomBarComponent as BottomBar, BottomInfoBar, CustomButtonComponent as Button, CheckboxComponent as Checkbox, DatePicker, Icon$1 as Icon, IconButtonComponent as IconButton, Illustration, Logo, TextField, TypographyComponent as Typography };
81434
+ var StyledAutocomplete = styled(Autocomplete)(function (_a) {
81435
+ return ({
81436
+ width: '100%',
81437
+ '& label': {
81438
+ zIndex: 0,
81439
+ color: theme.mainPallete.primary.placeholderText,
81440
+ transform: 'translate(20px,15px) scale(1)',
81441
+ '&.Mui-focused, &[data-shrink="true"]': {
81442
+ color: theme.mainPallete.primary.blue,
81443
+ transform: 'translate(15px,-10px) scale(0.75)',
81444
+ },
81445
+ '&.Mui-disabled': {
81446
+ color: theme.mainPallete.primary.placeholderText,
81447
+ },
81448
+ },
81449
+ '& label, .MuiOutlinedInput-root': {
81450
+ fontSize: 21,
81451
+ fontWeight: theme.fontWeight.regular,
81452
+ fontFamily: theme.fontFamily,
81453
+ },
81454
+ '.MuiOutlinedInput-root': {
81455
+ color: theme.mainPallete.primary.blue,
81456
+ padding: '7.5px 75px 7.5px 20px !important',
81457
+ borderRadius: 7,
81458
+ '&.Mui-focused': {
81459
+ '.MuiOutlinedInput-notchedOutline': {
81460
+ borderColor: theme.mainPallete.primary.blue,
81461
+ },
81462
+ },
81463
+ '.MuiOutlinedInput-notchedOutline': {
81464
+ borderColor: theme.mainPallete.primary.blue,
81465
+ },
81466
+ '&.Mui-disabled fieldset': {
81467
+ borderColor: theme.mainPallete.primary.placeholderText,
81468
+ },
81469
+ '&.MuiInputBase-adornedStart': {
81470
+ paddingTop: 13,
81471
+ paddingBottom: 13
81472
+ },
81473
+ },
81474
+ 'div.MuiAutocomplete-endAdornment': {
81475
+ top: 'calc(50% - 17px)',
81476
+ right: '20px !important',
81477
+ 'button': {
81478
+ padding: 0,
81479
+ transition: 'transform 0.15s linear',
81480
+ '&[aria-label="Close"]': {
81481
+ transform: 'rotateX(180deg)'
81482
+ }
81483
+ },
81484
+ '.MuiAutocomplete-clearIndicator': {
81485
+ marginRight: '4px !important',
81486
+ color: theme.mainPallete.primary.blue
81487
+ },
81488
+ 'svg': {
81489
+ width: 26,
81490
+ height: 26,
81491
+ }
81492
+ },
81493
+ '@media(min-width: 720px)': {
81494
+ '& label': {
81495
+ transform: 'translate(20px,17px) scale(1)',
81496
+ '&.Mui-focused, &[data-shrink="true"]': {
81497
+ transform: 'translate(14px,-14px) scale(0.75)',
81498
+ },
81499
+ },
81500
+ '& label, .MuiOutlinedInput-root': {
81501
+ fontSize: 26,
81502
+ },
81503
+ '.MuiOutlinedInput-root': {
81504
+ padding: '11.5px 75px 11.5px 20px !important',
81505
+ },
81506
+ 'div.MuiAutocomplete-endAdornment': {
81507
+ top: 'calc(50% - 22px)',
81508
+ '.MuiAutocomplete-clearIndicator': {
81509
+ marginRight: '8px !important',
81510
+ },
81511
+ 'svg': {
81512
+ width: 30,
81513
+ height: 30,
81514
+ }
81515
+ },
81516
+ },
81517
+ '@media(min-width: 1024px)': {
81518
+ '& label': {
81519
+ transform: 'translate(20px,11px) scale(1)',
81520
+ '&.Mui-focused, &[data-shrink="true"]': {
81521
+ transform: 'translate(15px,-9px) scale(0.75)'
81522
+ },
81523
+ },
81524
+ '& label, .MuiOutlinedInput-root': {
81525
+ fontSize: 16,
81526
+ },
81527
+ '.MuiOutlinedInput-root': {
81528
+ padding: '3.5px 65px 3.5px 20px !important',
81529
+ },
81530
+ 'div.MuiAutocomplete-endAdornment': {
81531
+ top: 'calc(50% - 13px)',
81532
+ '.MuiAutocomplete-clearIndicator': {
81533
+ marginRight: '2px !important',
81534
+ },
81535
+ 'svg': {
81536
+ width: 22,
81537
+ height: 22,
81538
+ }
81539
+ },
81540
+ },
81541
+ });
81542
+ });
81543
+ var StyledWrapper = styled('div', {
81544
+ shouldForwardProp: function (prop) { return prop !== "fluid"; }
81545
+ })(function (_a) {
81546
+ var fluid = _a.fluid;
81547
+ return ({
81548
+ display: 'flex',
81549
+ alignItems: 'center',
81550
+ width: fluid === true ? '100%' : 'min(100%, 368px)',
81551
+ '@media (min-width: 720px) and (max-width: 1023px)': {
81552
+ width: fluid === true ? '100%' : 'min(100%, 468px)',
81553
+ },
81554
+ '@media (min-width: 1024px)': {
81555
+ width: fluid === true ? '100%' : 'min(100%, 268px)',
81556
+ },
81557
+ });
81558
+ });
81559
+ var StyledPaper = styled(Paper)(function (_a) { return ({
81560
+ border: '2px solid #293072',
81561
+ borderRadius: '7px !important',
81562
+ translate: '0 -1.5px',
81563
+ '.MuiAutocomplete-listbox': {
81564
+ fontSize: 21,
81565
+ margin: '16px 8px !important',
81566
+ fontWeight: theme.fontWeight.regular,
81567
+ fontFamily: theme.fontFamily,
81568
+ color: theme.mainPallete.primary.blue,
81569
+ padding: '0 !important',
81570
+ '&::-webkit-scrollbar': __assign({}, theme.scrollbar),
81571
+ '@media(min-width: 720px)': {
81572
+ fontSize: 26,
81573
+ },
81574
+ '@media(min-width: 1024px)': {
81575
+ fontSize: 16,
81576
+ }
81577
+ },
81578
+ '.MuiAutocomplete-option': {
81579
+ padding: '6px 14px !important',
81580
+ '@media(min-width: 720px)': {
81581
+ padding: '9px 14px !important',
81582
+ },
81583
+ '@media(min-width: 1024px)': {
81584
+ padding: '3px 14px !important',
81585
+ }
81586
+ },
81587
+ '.MuiAutocomplete-noOptions': {
81588
+ fontWeight: theme.fontWeight.regular,
81589
+ fontFamily: theme.fontFamily,
81590
+ color: theme.mainPallete.primary.placeholderText + '!important',
81591
+ },
81592
+ }); });
81593
+ var Select = function (_a) {
81594
+ 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"]);
81595
+ var _o = React.useState(360), deg = _o[0], SetDeg = _o[1];
81596
+ var flag = false;
81597
+ var onRefresh = function (target) {
81598
+ if (flag)
81599
+ return;
81600
+ if (!target)
81601
+ return;
81602
+ var targetAsHTMLElement = target;
81603
+ targetAsHTMLElement.style.transform = "rotate(".concat(deg, "deg)");
81604
+ SetDeg(deg + 360);
81605
+ flag = true;
81606
+ setTimeout(function () {
81607
+ flag = false;
81608
+ }, 300);
81609
+ };
81610
+ return (jsxRuntime.exports.jsxs(StyledWrapper, __assign({ fluid: fluid, ref: forwardedRef }, { children: [jsxRuntime.exports.jsx(StyledAutocomplete, __assign({}, props, { disabled: disabled, options: options, value: value,
81611
+ // @ts-ignore
81612
+ 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) {
81613
+ var target = e.target;
81614
+ if (onRefresh) {
81615
+ onRefresh(target.parentNode);
81616
+ }
81617
+ } }) : null] })));
81618
+ };
81619
+
81620
+ export { AppTileComponent as AppTile, BottomBarComponent as BottomBar, BottomInfoBar, CustomButtonComponent as Button, CheckboxComponent as Checkbox, DatePicker, Icon$1 as Icon, IconButtonComponent as IconButton, Illustration, Logo, Select, TextField, TypographyComponent as Typography };
81435
81621
  //# sourceMappingURL=index.js.map