react-restyle-components 0.2.50 → 0.2.51

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.
@@ -1 +1 @@
1
- {"version":3,"file":"auto-complete-filter-single-select-multiple-fields-display.component.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.tsx"],"names":[],"mappings":"AAIA,OAAO,wBAAwB,CAAC;AAIhC,UAAU,qDAAqD;IAC7D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,GAAG,CAAC;IACV,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;IAC9B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;CAC7B;AAED,eAAO,MAAM,gDAAgD,+HAa1D,qDAAqD,4CA4LvD,CAAC"}
1
+ {"version":3,"file":"auto-complete-filter-single-select-multiple-fields-display.component.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.tsx"],"names":[],"mappings":"AAIA,OAAO,wBAAwB,CAAC;AAEhC,UAAU,qDAAqD;IAC7D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,GAAG,CAAC;IACV,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;IAC9B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;CAC7B;AAED,eAAO,MAAM,gDAAgD,+HAa1D,qDAAqD,4CA6JvD,CAAC"}
@@ -3,8 +3,6 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import { useState, useEffect, useRef } from 'react';
4
4
  import { Icon } from '../../atoms/icons/icons.component';
5
5
  import '../../../tc.module.css';
6
- import s from '../../../tc.module.css';
7
- import { cn } from '../../../core-utils';
8
6
  export const AutoCompleteFilterSingleSelectMultiFieldsDisplay = ({ disable = false, loader = false, displayValue = '', placeholder = 'Search...', data, hasError = false, className, posstion = 'absolute', keyboard = 'text', onFilter, onSelect, onBlur, }) => {
9
7
  const [value, setValue] = useState(displayValue);
10
8
  const [options, setOptions] = useState(data.list);
@@ -57,33 +55,34 @@ export const AutoCompleteFilterSingleSelectMultiFieldsDisplay = ({ disable = fal
57
55
  }
58
56
  }
59
57
  };
60
- return (_jsx(_Fragment, { children: _jsxs("div", { ref: wrapperRef, className: cn(s['w-full'], s['relative']), children: [_jsxs("div", { className: cn(s['flex'], s['items-center'], s['leading-4'], s['p-2'], s['focus:outline-none'], s['focus:ring'], s['w-full'], s['shadow-sm'], s['sm:text-base'], s['border-2'], hasError ? s['border-red'] : s['border-gray-300'], s['rounded-md'], s['dark:text-black']), children: [_jsx("input", { placeholder: placeholder, type: keyboard, value: value, className: cn(className, s['w-full'], s['focus:outline-none'], s['bg-none'], s['dark:text-black']), onKeyUp: onKeyUp, onChange: onChange, onClick: () => setIsListOpen(true), disabled: disable, onMouseDown: () => setValue(''), onBlur: (e) => onBlur && onBlur(e), onKeyDown: onKeyDown }), isListOpen ? (_jsx(Icon, { nameIcon: "FaChevronUp", propsIcon: {
58
+ return (_jsx(_Fragment, { children: _jsxs("div", { ref: wrapperRef, className: "w-full relative", children: [_jsxs("div", { className: `flex items-center leading-4 p-2 focus:outline-none focus:ring w-full shadow-sm sm:text-base border-2 ${hasError ? 'border-red' : 'border-gray-300'} rounded-md dark:text-black`, children: [_jsx("input", { placeholder: placeholder, type: keyboard, value: value, className: `${className} w-full focus:outline-none bg-none dark:text-black`, onKeyUp: onKeyUp, onChange: onChange, onClick: () => setIsListOpen(true), disabled: disable, onMouseDown: () => setValue(''), onBlur: (e) => onBlur && onBlur(e), onKeyDown: onKeyDown }), isListOpen ? (_jsx(Icon, { nameIcon: "FaChevronUp", propsIcon: {
61
59
  color: '#000000',
62
60
  size: 22,
63
61
  } })) : (_jsx(Icon, { nameIcon: "FaChevronDown", propsIcon: {
64
62
  color: '#000000',
65
63
  size: 22,
66
64
  } }))] }), options && isListOpen
67
- ? options.length > 0 && (_jsx("div", { className: cn(s['mt-1'], s['absolute'], s['w-full'], s['bg-gray-100'], s['p-2'], s['rounded-sm']), style: {
65
+ ? options.length > 0 && (_jsx("div", { className: `mt-1 absolute w-full bg-gray-100 p-2 rounded-sm `, style: {
68
66
  zIndex: 500,
69
- }, children: _jsx("ul", { children: options?.map((item, index) => (_jsxs("li", { className: cn(s['text-gray-400'], s['flex'], s['items-center']), onClick: () => {
67
+ }, children: _jsx("ul", { children: options?.map((item, index) => (_jsx("li", { className: "text-gray-400 flex items-center", onClick: () => {
70
68
  setValue(data.displayKey
71
69
  .map((key) => `${item[key]}`)
72
70
  .join(' - '));
73
71
  setIsListOpen(false);
74
72
  onSelect && onSelect(item);
75
- }, children: [' ', _jsx("label", { className: cn(s['ml-2'], s['mt-1'], s['text-black']), style: {
76
- textOverflow: 'ellipsis',
77
- minWidth: 0,
78
- overflow: 'hidden',
79
- maxWidth: '334px',
80
- whiteSpace: 'nowrap',
81
- }, title: data.displayKey
82
- .map((key) => item[key])
83
- .join(' - '), children: data.displayKey
84
- .map((key) => `${item[key]}
85
- `)
86
- .filter(Boolean)
87
- .join(' - ') })] }, index))) }) }))
73
+ }, children: _jsx("label", { className: "ml-2 mt-1 text-black", style: {
74
+ textOverflow: 'ellipsis',
75
+ minWidth: 0,
76
+ overflow: 'hidden',
77
+ maxWidth: '334px',
78
+ whiteSpace: 'nowrap',
79
+ }, title: data.displayKey
80
+ .map((key) => item[key])
81
+ .join(' - '), children: data.displayKey
82
+ .map((key) => {
83
+ item[key];
84
+ })
85
+ .filter((value) => value !== null && value !== undefined)
86
+ .join(' - ') }) }, index))) }) }))
88
87
  : null] }) }));
89
88
  };
@@ -30,7 +30,6 @@
30
30
  } .ml-4 { margin-left: 1rem;
31
31
  } .ml-6 { margin-left: 1.5rem;
32
32
  } .mr-1 { margin-right: 0.25rem;
33
- } .mr-2 { margin-right: 0.5rem;
34
33
  } .mr-3 { margin-right: 0.75rem;
35
34
  } .mt-0 { margin-top: 0px;
36
35
  } .mt-1 { margin-top: 0.25rem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-restyle-components",
3
- "version": "0.2.50",
3
+ "version": "0.2.51",
4
4
  "private": false,
5
5
  "description": "Easy use restyle components",
6
6
  "author": {