linear-react-components-ui 2.2.0-beta.10 → 2.2.0-beta.11

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 (75) hide show
  1. package/lib/assets/styles/datepicker2.css +11 -81
  2. package/lib/inputs/select/Dropdown.js +1 -11
  3. package/lib/inputs/select/Dropdown.js.map +1 -1
  4. package/lib/inputs/select/multiple/index.js +2 -5
  5. package/lib/inputs/select/multiple/index.js.map +1 -1
  6. package/lib/inputs/select/simple/index.js +2 -5
  7. package/lib/inputs/select/simple/index.js.map +1 -1
  8. package/lib/inputs/select/types.d.ts +2 -3
  9. package/lib/inputs/types.d.ts +1 -2
  10. package/lib/inputs2/date/{hooks/useCalendarPosition.d.ts → base/constants.d.ts} +1 -1
  11. package/lib/inputs2/date/base/constants.js +69 -0
  12. package/lib/inputs2/date/base/constants.js.map +1 -0
  13. package/lib/inputs2/date/datefield/base.js +214 -691
  14. package/lib/inputs2/date/datefield/base.js.map +1 -1
  15. package/lib/inputs2/date/datefield/calendarbox.d.ts +6 -0
  16. package/lib/inputs2/date/datefield/calendarbox.js +228 -0
  17. package/lib/inputs2/date/datefield/calendarbox.js.map +1 -0
  18. package/lib/inputs2/date/datefield/triggers.js +4 -4
  19. package/lib/inputs2/date/datefield/triggers.js.map +1 -1
  20. package/lib/inputs2/date/datefield/types.d.ts +12 -5
  21. package/lib/inputs2/date/dateperiodfield/base.js +809 -694
  22. package/lib/inputs2/date/dateperiodfield/base.js.map +1 -1
  23. package/lib/inputs2/date/dateperiodfield/calendarbox.d.ts +6 -0
  24. package/lib/inputs2/date/dateperiodfield/calendarbox.js +282 -0
  25. package/lib/inputs2/date/dateperiodfield/calendarbox.js.map +1 -0
  26. package/lib/inputs2/date/dateperiodfield/triggers.js +9 -21
  27. package/lib/inputs2/date/dateperiodfield/triggers.js.map +1 -1
  28. package/lib/inputs2/date/dateperiodfield/types.d.ts +23 -13
  29. package/lib/inputs2/date/helpers.d.ts +4 -44
  30. package/lib/inputs2/date/helpers.js +4 -200
  31. package/lib/inputs2/date/helpers.js.map +1 -1
  32. package/lib/inputs2/date/types.d.ts +1 -22
  33. package/lib/inputs2/date/types.js.map +1 -1
  34. package/lib/inputs2/selectfield/base.js +33 -16
  35. package/lib/inputs2/selectfield/base.js.map +1 -1
  36. package/lib/inputs2/selectfield/context.d.ts +1 -0
  37. package/lib/inputs2/selectfield/context.js.map +1 -1
  38. package/lib/inputs2/selectfield/item.js +52 -50
  39. package/lib/inputs2/selectfield/item.js.map +1 -1
  40. package/lib/inputs2/selectfield/listbox.d.ts +1 -2
  41. package/lib/inputs2/selectfield/listbox.js +0 -10
  42. package/lib/inputs2/selectfield/listbox.js.map +1 -1
  43. package/lib/inputs2/selectfield/types.d.ts +3 -5
  44. package/lib/inputs2/selectfield/types.js.map +1 -1
  45. package/lib/node_modules/lodash/lodash.js +2 -2
  46. package/lib/node_modules/lodash/lodash.js.map +1 -1
  47. package/lib/panel/Content.js +82 -28
  48. package/lib/panel/Content.js.map +1 -1
  49. package/lib/panel/Default.d.ts +1 -1
  50. package/lib/panel/Default.js +54 -60
  51. package/lib/panel/Default.js.map +1 -1
  52. package/lib/panel/helpers.js +16 -1
  53. package/lib/panel/helpers.js.map +1 -1
  54. package/lib/panel/types.d.ts +6 -3
  55. package/package.json +1 -1
  56. package/lib/hooks/useScrollEndReached/index.d.ts +0 -8
  57. package/lib/hooks/useScrollEndReached/index.js +0 -69
  58. package/lib/hooks/useScrollEndReached/index.js.map +0 -1
  59. package/lib/hooks/useScrollEndReached/types.d.ts +0 -7
  60. package/lib/inputs2/date/calendarbox.d.ts +0 -23
  61. package/lib/inputs2/date/calendarbox.js +0 -254
  62. package/lib/inputs2/date/calendarbox.js.map +0 -1
  63. package/lib/inputs2/date/hooks/useCalendarPosition.js +0 -93
  64. package/lib/inputs2/date/hooks/useCalendarPosition.js.map +0 -1
  65. package/lib/inputs2/date/hooks/useDateCalendarState.d.ts +0 -14
  66. package/lib/inputs2/date/hooks/useDateCalendarState.js +0 -250
  67. package/lib/inputs2/date/hooks/useDateCalendarState.js.map +0 -1
  68. package/lib/inputs2/date/hooks/useDateMask.d.ts +0 -22
  69. package/lib/inputs2/date/hooks/useDateMask.js +0 -143
  70. package/lib/inputs2/date/hooks/useDateMask.js.map +0 -1
  71. package/lib/inputs2/date/timeselector.d.ts +0 -17
  72. package/lib/inputs2/date/timeselector.js +0 -226
  73. package/lib/inputs2/date/timeselector.js.map +0 -1
  74. package/lib/node_modules/moment/dist/locale/pt-br.js +0 -54
  75. package/lib/node_modules/moment/dist/locale/pt-br.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"listbox.js","sources":["../../../src/lib/inputs2/selectfield/listbox.tsx"],"sourcesContent":["import _ from 'lodash';\nimport { ComponentProps, CSSProperties, forwardRef, useEffect, useRef, useState } from 'react';\nimport { UseScrollEndReachedParams } from 'src/lib/hooks/useScrollEndReached/types';\nimport { useScrollEndReached } from '../../hooks/useScrollEndReached';\nimport { Search } from './search';\nimport { useSelectFieldContext } from './context';\n\ninterface SelectFieldListBoxProps extends ComponentProps<'div'>, UseScrollEndReachedParams {\n dropdownMaxWidth?: number;\n}\n\nconst MAX_HEIGHT = ((27 * 15) + 1); // 27px de height do list item * 15 itens máximos na exibição + 1px de borda listbox.\nconst ListBox = forwardRef<HTMLDivElement, SelectFieldListBoxProps>((props, ref) => {\n const {\n children, dropdownMaxWidth, onEndReached, onEndReachedThreshold, itemsCount, ...rest\n } = props;\n const {\n listBoxOpen, valueSelect, selectFieldId, selectContainerRef, notFoundFilterLabel,\n searchOnDropdown, isMultipleWithCheckboxes,\n } = useSelectFieldContext();\n\n const [listBoxStyles, setListBoxStyles] = useState<CSSProperties>({});\n const [filterResultIsEmpty, setFilterResultIsEmpty] = useState(false);\n const listBoxRef = useRef<HTMLUListElement>(null);\n const shouldBeShowSearchInput = searchOnDropdown || isMultipleWithCheckboxes;\n\n requestAnimationFrame(() => {\n const hasChildrenElementsInUL = (listBoxRef.current?.childNodes);\n const liElementsFiltered = (listBoxRef.current?.querySelectorAll(\n 'li[data-state-filtered=\"true\"]',\n ) ?? []) as HTMLLIElement[];\n const filterIsEmpty = !_.isEmpty(hasChildrenElementsInUL) && _.isEmpty(liElementsFiltered);\n setFilterResultIsEmpty(filterIsEmpty);\n });\n\n useEffect(() => {\n const updatePosition = () => {\n const selectPositionOnScreen = selectContainerRef.current?.getBoundingClientRect();\n if (selectPositionOnScreen) {\n const { top, left, width, height } = selectPositionOnScreen;\n const spaceBelow = window.innerHeight - (top + height);\n const spaceAbove = top;\n const shouldOpenUp = spaceBelow < MAX_HEIGHT && spaceAbove > spaceBelow;\n\n const styles: CSSProperties = {\n left: left + window.scrollX,\n minWidth: dropdownMaxWidth ?? width,\n };\n\n if (shouldOpenUp) {\n styles.bottom = window.innerHeight - top - window.scrollY;\n styles.maxHeight = Math.min(MAX_HEIGHT, spaceAbove);\n } else {\n styles.top = top + height + window.scrollY;\n styles.maxHeight = Math.min(MAX_HEIGHT, spaceBelow);\n }\n\n setListBoxStyles(styles);\n }\n };\n\n if (listBoxOpen) {\n updatePosition();\n window.addEventListener('resize', updatePosition);\n window.addEventListener('scroll', updatePosition, true);\n }\n\n return () => {\n window.removeEventListener('resize', updatePosition);\n window.removeEventListener('scroll', updatePosition, true);\n };\n }, [listBoxOpen, valueSelect, selectContainerRef]);\n\n useScrollEndReached({\n elementRef: listBoxRef,\n onEndReached,\n onEndReachedThreshold,\n itemsCount,\n });\n\n return (\n <div\n ref={ref}\n style={listBoxStyles}\n aria-expanded={listBoxOpen}\n className=\"select-field-listbox\"\n data-testid=\"test-select-field-listbox\"\n data-dropdown-max-width={dropdownMaxWidth}\n {...rest}>\n {shouldBeShowSearchInput && (<Search />)}\n <ul\n id={selectFieldId}\n role=\"listbox\"\n ref={listBoxRef}>\n {children}\n {filterResultIsEmpty && (\n <li\n tabIndex={-1}\n aria-disabled={true}\n aria-label={notFoundFilterLabel}\n key=\"not-found-values\"\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n role=\"option\"\n id=\"not-found-values\"\n className=\"not-found-values\"\n onClick={(event) => { event.preventDefault(); }}\n onMouseDown={(event) => { event.preventDefault(); }}>\n {notFoundFilterLabel}\n </li>\n )}\n </ul>\n </div>\n );\n});\n\nListBox.displayName = 'SelectListBox';\nexport { ListBox };\nexport type { SelectFieldListBoxProps };\n"],"names":["MAX_HEIGHT","ListBox","forwardRef","props","ref","children","dropdownMaxWidth","onEndReached","onEndReachedThreshold","itemsCount","rest","listBoxOpen","valueSelect","selectFieldId","selectContainerRef","notFoundFilterLabel","searchOnDropdown","isMultipleWithCheckboxes","useSelectFieldContext","listBoxStyles","setListBoxStyles","useState","filterResultIsEmpty","setFilterResultIsEmpty","listBoxRef","useRef","shouldBeShowSearchInput","requestAnimationFrame","hasChildrenElementsInUL","current","childNodes","liElementsFiltered","querySelectorAll","filterIsEmpty","_","isEmpty","useEffect","updatePosition","selectPositionOnScreen","getBoundingClientRect","top","left","width","height","spaceBelow","window","innerHeight","spaceAbove","shouldOpenUp","styles","scrollX","minWidth","bottom","scrollY","maxHeight","Math","min","addEventListener","removeEventListener","useScrollEndReached","elementRef","event","preventDefault","displayName"],"mappings":";;;;;;AAWA,MAAMA,aAAe,KAAK,KAAM;AAChC,MAAMC,UAAUC,WAAoD,CAACC,OAAOC,QAAQ;AAClF,QAAM;AAAA,IACJC;AAAAA,IAAUC;AAAAA,IAAkBC;AAAAA,IAAcC;AAAAA,IAAuBC;AAAAA,IAAY,GAAGC;AAAAA,EAAAA,IAC9EP;AACJ,QAAM;AAAA,IACJQ;AAAAA,IAAaC;AAAAA,IAAaC;AAAAA,IAAeC;AAAAA,IAAoBC;AAAAA,IAC7DC;AAAAA,IAAkBC;AAAAA,EAAAA,IAChBC,sBAAAA;AAEJ,QAAM,CAACC,eAAeC,gBAAgB,IAAIC,SAAwB,CAAA,CAAE;AACpE,QAAM,CAACC,qBAAqBC,sBAAsB,IAAIF,SAAS,KAAK;AACpE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AOa,oBAAoB,UAAUrB,gBAAgB,IAAI;AAAA,IAC3D;AAAA,EACF,GAAG,CAAC1B,aAAaC,aAAaE,kBAAkB,CAAC;AAEjD6C,sBAAoB;AAAA,IAClBC,YAAYpC;AAAAA,IACZjB;AAAAA,IACAC;AAAAA,IACAC;AAAAA,EAAAA,CACD;AAED,SACE,qBAAC,OAAA,EACC,KACA,OAAOU,eACP,iBAAeR,aACf,WAAU,wBACV,eAAY,6BACZ,2BAAyBL,kBACzB,GAAII,MACHgB,UAAAA;AAAAA,IAAAA,+CAA6B,QAAA,EAAM;AAAA,yBACnC,MAAA,EACC,IAAIb,eACJ,MAAK,WACL,KAAKW,YACJnB,UAAAA;AAAAA,MAAAA;AAAAA,MACAiB,uBACC;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAU;AAAA,UACV,iBAAe;AAAA,UACf,cAAYP;AAAAA,UAGZ,MAAK;AAAA,UACL,IAAG;AAAA,UACH,WAAU;AAAA,UACV,SAAU8C,CAAAA,UAAU;AAAEA,kBAAMC,eAAAA;AAAAA,UAAkB;AAAA,UAC9C,aAAcD,CAAAA,YAAU;AAAEA,oBAAMC,eAAAA;AAAAA,UAAkB;AAAA,UACjD/C,UAAAA;AAAAA,QAAAA;AAAAA,QAPG;AAAA,MAAA;AAAA,IAQN,EAAA,CAEJ;AAAA,EAAA,GACF;AAEJ,CAAC;AAEDd,QAAQ8D,cAAc;"}
1
+ {"version":3,"file":"listbox.js","sources":["../../../src/lib/inputs2/selectfield/listbox.tsx"],"sourcesContent":["import _ from 'lodash';\nimport { ComponentProps, CSSProperties, forwardRef, useEffect, useRef, useState } from 'react';\nimport { Search } from './search';\nimport { useSelectFieldContext } from './context';\n\ninterface SelectFieldListBoxProps extends ComponentProps<'div'> {\n dropdownMaxWidth?: number;\n}\n\nconst MAX_HEIGHT = ((27 * 15) + 1); // 27px de height do list item * 15 itens máximos na exibição + 1px de borda listbox.\nconst ListBox = forwardRef<HTMLDivElement, SelectFieldListBoxProps>((props, ref) => {\n const { children, dropdownMaxWidth, ...rest } = props;\n const {\n listBoxOpen, valueSelect, selectFieldId, selectContainerRef, notFoundFilterLabel,\n searchOnDropdown, isMultipleWithCheckboxes,\n } = useSelectFieldContext();\n\n const [listBoxStyles, setListBoxStyles] = useState<CSSProperties>({});\n const [filterResultIsEmpty, setFilterResultIsEmpty] = useState(false);\n const listBoxRef = useRef<HTMLUListElement>(null);\n const shouldBeShowSearchInput = searchOnDropdown || isMultipleWithCheckboxes;\n\n requestAnimationFrame(() => {\n const hasChildrenElementsInUL = (listBoxRef.current?.childNodes);\n const liElementsFiltered = (listBoxRef.current?.querySelectorAll(\n 'li[data-state-filtered=\"true\"]',\n ) ?? []) as HTMLLIElement[];\n const filterIsEmpty = !_.isEmpty(hasChildrenElementsInUL) && _.isEmpty(liElementsFiltered);\n setFilterResultIsEmpty(filterIsEmpty);\n });\n\n useEffect(() => {\n const updatePosition = () => {\n const selectPositionOnScreen = selectContainerRef.current?.getBoundingClientRect();\n if (selectPositionOnScreen) {\n const { top, left, width, height } = selectPositionOnScreen;\n const spaceBelow = window.innerHeight - (top + height);\n const spaceAbove = top;\n const shouldOpenUp = spaceBelow < MAX_HEIGHT && spaceAbove > spaceBelow;\n\n const styles: CSSProperties = {\n left: left + window.scrollX,\n minWidth: dropdownMaxWidth ?? width,\n };\n\n if (shouldOpenUp) {\n styles.bottom = window.innerHeight - top - window.scrollY;\n styles.maxHeight = Math.min(MAX_HEIGHT, spaceAbove);\n } else {\n styles.top = top + height + window.scrollY;\n styles.maxHeight = Math.min(MAX_HEIGHT, spaceBelow);\n }\n\n setListBoxStyles(styles);\n }\n };\n\n if (listBoxOpen) {\n updatePosition();\n window.addEventListener('resize', updatePosition);\n window.addEventListener('scroll', updatePosition, true);\n }\n\n return () => {\n window.removeEventListener('resize', updatePosition);\n window.removeEventListener('scroll', updatePosition, true);\n };\n }, [listBoxOpen, valueSelect, selectContainerRef]);\n\n return (\n <div\n ref={ref}\n style={listBoxStyles}\n aria-expanded={listBoxOpen}\n className=\"select-field-listbox\"\n data-testid=\"test-select-field-listbox\"\n data-dropdown-max-width={dropdownMaxWidth}\n {...rest}>\n {shouldBeShowSearchInput && (<Search />)}\n <ul\n id={selectFieldId}\n role=\"listbox\"\n ref={listBoxRef}>\n {children}\n {filterResultIsEmpty && (\n <li\n tabIndex={-1}\n aria-disabled={true}\n aria-label={notFoundFilterLabel}\n key=\"not-found-values\"\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n role=\"option\"\n id=\"not-found-values\"\n className=\"not-found-values\"\n onClick={(event) => { event.preventDefault(); }}\n onMouseDown={(event) => { event.preventDefault(); }}>\n {notFoundFilterLabel}\n </li>\n )}\n </ul>\n </div>\n );\n});\n\nListBox.displayName = 'SelectListBox';\nexport { ListBox };\nexport type { SelectFieldListBoxProps };\n"],"names":["MAX_HEIGHT","ListBox","forwardRef","props","ref","children","dropdownMaxWidth","rest","listBoxOpen","valueSelect","selectFieldId","selectContainerRef","notFoundFilterLabel","searchOnDropdown","isMultipleWithCheckboxes","useSelectFieldContext","listBoxStyles","setListBoxStyles","useState","filterResultIsEmpty","setFilterResultIsEmpty","listBoxRef","useRef","shouldBeShowSearchInput","requestAnimationFrame","hasChildrenElementsInUL","current","childNodes","liElementsFiltered","querySelectorAll","filterIsEmpty","_","isEmpty","useEffect","updatePosition","selectPositionOnScreen","getBoundingClientRect","top","left","width","height","spaceBelow","window","innerHeight","spaceAbove","shouldOpenUp","styles","scrollX","minWidth","bottom","scrollY","maxHeight","Math","min","addEventListener","removeEventListener","event","preventDefault","displayName"],"mappings":";;;;;AASA,MAAMA,aAAe,KAAK,KAAM;AAChC,MAAMC,UAAUC,WAAoD,CAACC,OAAOC,QAAQ;AAClF,QAAM;AAAA,IAAEC;AAAAA,IAAUC;AAAAA,IAAkB,GAAGC;AAAAA,EAAAA,IAASJ;AAChD,QAAM;AAAA,IACJK;AAAAA,IAAaC;AAAAA,IAAaC;AAAAA,IAAeC;AAAAA,IAAoBC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AAa;AACf0B,qBAAAA;AACAQ,aAAOY,iBAAiB,UAAUpB,cAAc;AAChDQ,aAAOY,iBAAiB,UAAUpB,gBAAgB,IAAI;AAAA,IACxD;AAEA,WAAO,MAAM;AACXQ,aAAOa,oBAAoB,UAAUrB,cAAc;AACnDQ,aAAOa,oBAAoB,UAAUrB,gBAAgB,IAAI;AAAA,IAC3D;AAAA,EACF,GAAG,CAAC1B,aAAaC,aAAaE,kBAAkB,CAAC;AAEjD,SACE,qBAAC,OAAA,EACC,KACA,OAAOK,eACP,iBAAeR,aACf,WAAU,wBACV,eAAY,6BACZ,2BAAyBF,kBACzB,GAAIC,MACHgB,UAAAA;AAAAA,IAAAA,+CAA6B,QAAA,EAAM;AAAA,yBACnC,MAAA,EACC,IAAIb,eACJ,MAAK,WACL,KAAKW,YACJhB,UAAAA;AAAAA,MAAAA;AAAAA,MACAc,uBACC;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAU;AAAA,UACV,iBAAe;AAAA,UACf,cAAYP;AAAAA,UAGZ,MAAK;AAAA,UACL,IAAG;AAAA,UACH,WAAU;AAAA,UACV,SAAU4C,CAAAA,UAAU;AAAEA,kBAAMC,eAAAA;AAAAA,UAAkB;AAAA,UAC9C,aAAcD,CAAAA,YAAU;AAAEA,oBAAMC,eAAAA;AAAAA,UAAkB;AAAA,UACjD7C,UAAAA;AAAAA,QAAAA;AAAAA,QAPG;AAAA,MAAA;AAAA,IAQN,EAAA,CAEJ;AAAA,EAAA,GACF;AAEJ,CAAC;AAEDX,QAAQyD,cAAc;"}
@@ -1,5 +1,4 @@
1
- import { ChangeEvent, ComponentPropsWithoutRef } from 'react';
2
- import { UseScrollEndReachedParams } from 'src/lib/hooks/useScrollEndReached/types';
1
+ import { ComponentPropsWithoutRef } from 'react';
3
2
  import { TextAlign } from '../../@types/Align';
4
3
  import { ColorTheme } from '../../@types/ColorStyles';
5
4
  import { ITooltipCommonProps } from '../../tooltip/types';
@@ -24,10 +23,9 @@ export interface SelectFieldInputProps extends SelectFieldInputBaseProps {
24
23
  permissionAttr?: PermissionAttr;
25
24
  onDeniedActions?: OnDenied;
26
25
  }
27
- export interface SelectFieldInputBaseProps extends InputHTMLProps, ITooltipCommonProps, UseScrollEndReachedParams {
26
+ export interface SelectFieldInputBaseProps extends InputHTMLProps, ITooltipCommonProps {
28
27
  skeletonize?: boolean;
29
28
  undigitable?: boolean;
30
- externalSearch?: boolean;
31
29
  showClearButton?: boolean;
32
30
  searchOnDropdown?: boolean;
33
31
  openDropdownOnFocus?: boolean;
@@ -49,7 +47,7 @@ export interface SelectFieldInputBaseProps extends InputHTMLProps, ITooltipCommo
49
47
  themePopover?: ColorTheme;
50
48
  popoverAlign?: Extract<Position, 'left' | 'right'>;
51
49
  dropdownAlignButton?: Extract<Position, 'left' | 'right'>;
52
- onSearch?: (event?: ChangeEvent<HTMLInputElement>) => void;
50
+ onRemoteSearch?: (value: string) => void;
53
51
  multiple?: keyof typeof MultipleVariantEnum;
54
52
  dropdownMaxWidth?: number;
55
53
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sources":["../../../src/lib/inputs2/selectfield/types.ts"],"sourcesContent":["import { ChangeEvent, type ComponentPropsWithoutRef } from 'react';\nimport { UseScrollEndReachedParams } from 'src/lib/hooks/useScrollEndReached/types';\nimport type { TextAlign } from '../../@types/Align';\nimport type { ColorTheme } from '../../@types/ColorStyles';\nimport type { ITooltipCommonProps } from '../../tooltip/types';\nimport type { Position, HintPosition } from '../../@types/Position';\nimport type { OnDenied, PermissionAttr } from '../../@types/PermissionAttr';\n\nexport enum MultipleVariantEnum { default = 'default', checkboxes = 'checkboxes' }\nexport enum Keys {\n escape = 'Escape',\n arrowDown = 'ArrowDown',\n arrowUp = 'ArrowUp',\n enter = 'Enter',\n backspace = 'Backspace',\n delete = 'Delete',\n spaceBar = ' '\n}\ntype InputHTMLProps = Omit<ComponentPropsWithoutRef<'input'>, 'multiple' | 'type'>;\n\nexport interface SelectFieldInputProps extends SelectFieldInputBaseProps {\n gridLayout?: string;\n permissionAttr?: PermissionAttr;\n onDeniedActions?: OnDenied;\n}\n\nexport interface SelectFieldInputBaseProps \n extends InputHTMLProps, ITooltipCommonProps, UseScrollEndReachedParams {\n skeletonize?: boolean;\n undigitable?: boolean;\n externalSearch?: boolean;\n showClearButton?: boolean;\n searchOnDropdown?: boolean;\n openDropdownOnFocus?: boolean;\n value?: any;\n label?: string;\n errors?: string[];\n striped?: boolean;\n hint?: string;\n notFoundFilterLabel?: string;\n customClass?: string;\n customClassLabel?: string;\n customClassWrapper?: string;\n searchInputPlaceholder?: string;\n customClassInputContainer?: string;\n multipleInputLabelEmpty?: string;\n multipleInputLabelManySelection?: string;\n textAlign?: TextAlign;\n hintPosition?: HintPosition;\n themePopover?: ColorTheme;\n popoverAlign?: Extract<Position, 'left' | 'right'>;\n dropdownAlignButton?: Extract<Position, 'left' | 'right'>;\n onSearch?: (event?: ChangeEvent<HTMLInputElement>) => void;\n multiple?: keyof typeof MultipleVariantEnum;\n dropdownMaxWidth?: number;\n}\n"],"names":["MultipleVariantEnum","default","checkboxes","Keys","escape","arrowDown","arrowUp","enter","backspace","delete","spaceBar"],"mappings":"AAQO,IAAKA,wCAAAA,yBAAL;AAA2BC,uBAAAA,SAAAA,IAAU;AAAWC,uBAAAA,YAAAA,IAAa;AAAxDF,SAAAA;AAAAA,GAAAA,uBAAAA,CAAAA,CAAAA;AACL,IAAKG,yBAAAA,UAAL;AACLC,QAAAA,QAAAA,IAAS;AACTC,QAAAA,WAAAA,IAAY;AACZC,QAAAA,SAAAA,IAAU;AACVC,QAAAA,OAAAA,IAAQ;AACRC,QAAAA,WAAAA,IAAY;AACZC,QAAAA,QAAAA,IAAS;AACTC,QAAAA,UAAAA,IAAW;AAPDP,SAAAA;AAAAA,GAAAA,QAAAA,CAAAA,CAAAA;"}
1
+ {"version":3,"file":"types.js","sources":["../../../src/lib/inputs2/selectfield/types.ts"],"sourcesContent":["import { type ComponentPropsWithoutRef } from 'react';\nimport type { TextAlign } from '../../@types/Align';\nimport type { ColorTheme } from '../../@types/ColorStyles';\nimport type { ITooltipCommonProps } from '../../tooltip/types';\nimport type { Position, HintPosition } from '../../@types/Position';\nimport type { OnDenied, PermissionAttr } from '../../@types/PermissionAttr';\n\nexport enum MultipleVariantEnum { default = 'default', checkboxes = 'checkboxes' }\nexport enum Keys {\n escape = 'Escape',\n arrowDown = 'ArrowDown',\n arrowUp = 'ArrowUp',\n enter = 'Enter',\n backspace = 'Backspace',\n delete = 'Delete',\n spaceBar = ' '\n}\ntype InputHTMLProps = Omit<ComponentPropsWithoutRef<'input'>, 'multiple' | 'type'>;\n\nexport interface SelectFieldInputProps extends SelectFieldInputBaseProps {\n gridLayout?: string;\n permissionAttr?: PermissionAttr;\n onDeniedActions?: OnDenied;\n}\n\nexport interface SelectFieldInputBaseProps extends InputHTMLProps, ITooltipCommonProps {\n skeletonize?: boolean;\n undigitable?: boolean;\n showClearButton?: boolean;\n searchOnDropdown?: boolean;\n openDropdownOnFocus?: boolean;\n value?: any;\n label?: string;\n errors?: string[];\n striped?: boolean;\n hint?: string;\n notFoundFilterLabel?: string;\n customClass?: string;\n customClassLabel?: string;\n customClassWrapper?: string;\n searchInputPlaceholder?: string;\n customClassInputContainer?: string;\n multipleInputLabelEmpty?: string;\n multipleInputLabelManySelection?: string;\n textAlign?: TextAlign;\n hintPosition?: HintPosition;\n themePopover?: ColorTheme;\n popoverAlign?: Extract<Position, 'left' | 'right'>;\n dropdownAlignButton?: Extract<Position, 'left' | 'right'>;\n onRemoteSearch?: (value: string) => void;\n multiple?: keyof typeof MultipleVariantEnum;\n dropdownMaxWidth?: number;\n}\n"],"names":["MultipleVariantEnum","default","checkboxes","Keys","escape","arrowDown","arrowUp","enter","backspace","delete","spaceBar"],"mappings":"AAOO,IAAKA,wCAAAA,yBAAL;AAA2BC,uBAAAA,SAAAA,IAAU;AAAWC,uBAAAA,YAAAA,IAAa;AAAxDF,SAAAA;AAAAA,GAAAA,uBAAAA,CAAAA,CAAAA;AACL,IAAKG,yBAAAA,UAAL;AACLC,QAAAA,QAAAA,IAAS;AACTC,QAAAA,WAAAA,IAAY;AACZC,QAAAA,SAAAA,IAAU;AACVC,QAAAA,OAAAA,IAAQ;AACRC,QAAAA,WAAAA,IAAY;AACZC,QAAAA,QAAAA,IAAS;AACTC,QAAAA,UAAAA,IAAW;AAPDP,SAAAA;AAAAA,GAAAA,QAAAA,CAAAA,CAAAA;"}
@@ -13,7 +13,7 @@ var hasRequiredLodash;
13
13
  function requireLodash() {
14
14
  if (hasRequiredLodash) return lodash$1.exports;
15
15
  hasRequiredLodash = 1;
16
- (function(module, exports) {
16
+ (function(module, exports$1) {
17
17
  (function() {
18
18
  var undefined$1;
19
19
  var VERSION = "4.17.21";
@@ -341,7 +341,7 @@ function requireLodash() {
341
341
  var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
342
342
  var freeSelf = typeof self == "object" && self && self.Object === Object && self;
343
343
  var root = freeGlobal || freeSelf || Function("return this")();
344
- var freeExports = exports && !exports.nodeType && exports;
344
+ var freeExports = exports$1 && !exports$1.nodeType && exports$1;
345
345
  var freeModule = freeExports && true && module && !module.nodeType && module;
346
346
  var moduleExports = freeModule && freeModule.exports === freeExports;
347
347
  var freeProcess = moduleExports && freeGlobal.process;