@registrucentras/rc-ses-react-components 2.0.0-rc.0 → 2.0.0-rc.1

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 (84) hide show
  1. package/README.md +5 -1
  2. package/dist/assets/icons/CaretUpBoldIcon.d.ts +3 -0
  3. package/dist/assets/icons/CaretUpIcon.d.ts +3 -0
  4. package/dist/assets/icons/ListIcon.d.ts +3 -0
  5. package/dist/assets/icons/MinusIcon.d.ts +3 -0
  6. package/dist/assets/icons/NotePencilIcon.d.ts +3 -0
  7. package/dist/assets/icons/PlusIcon.d.ts +3 -0
  8. package/dist/assets/icons/TrashIcon.d.ts +3 -0
  9. package/dist/assets/icons/UserIcon.d.ts +3 -0
  10. package/dist/components/common/AdvancedList/components/AdvancedListItem/AdvancedListItem.types.d.ts +106 -0
  11. package/dist/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemLeading.d.ts +12 -0
  12. package/dist/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemTrailing.d.ts +7 -0
  13. package/dist/components/common/AdvancedList/components/AdvancedListItem/hooks/usePrefersReducedMotion.d.ts +2 -0
  14. package/dist/components/common/AdvancedList/components/AdvancedListItem/index.d.ts +4 -0
  15. package/dist/components/common/AdvancedList/index.d.ts +11 -0
  16. package/dist/components/common/Button/index.d.ts +13 -3
  17. package/dist/components/common/SelectableCardList/components/SelectableCardListItem.d.ts +4 -1
  18. package/dist/components/common/SelectableCardList/index.d.ts +4 -1
  19. package/dist/components/common/Tooltip/index.d.ts +20 -0
  20. package/dist/library/icons.d.ts +9 -1
  21. package/dist/library/index.d.ts +5 -0
  22. package/dist/library/types.d.ts +2 -1
  23. package/dist/registrucentras-rc-ses-react-components.cjs +1 -1
  24. package/dist/registrucentras-rc-ses-react-components.js +4107 -3246
  25. package/dist/stories/components/actions/Button.stories.d.ts +4 -3
  26. package/dist/stories/components/display/AdvancedList.stories.d.ts +32 -0
  27. package/dist/stories/components/display/AdvancedListItem.stories.d.ts +33 -0
  28. package/dist/stories/components/display/SelectableCardList.stories.d.ts +8 -1
  29. package/dist/stories/components/display/Tooltip.stories.d.ts +48 -0
  30. package/dist/stories/components/inputs/DatePicker.stories.d.ts +23 -0
  31. package/dist/stories/components/loaders/LoadingSpinner.stories.d.ts +3 -3
  32. package/dist/stories/components/overlays/Dialog.stories.d.ts +6 -0
  33. package/dist/stories/components/overlays/Popover.stories.d.ts +12 -0
  34. package/dist/stories/theme/ThemedMuiComponents.stories.d.ts +25 -0
  35. package/dist/theme/light/MuiTooltip.d.ts +3 -0
  36. package/dist/theme/motion.d.ts +16 -0
  37. package/package.json +2 -1
  38. package/src/assets/icons/CaretUpBoldIcon.tsx +17 -0
  39. package/src/assets/icons/CaretUpIcon.tsx +9 -0
  40. package/src/assets/icons/ListIcon.tsx +17 -0
  41. package/src/assets/icons/MinusIcon.tsx +9 -0
  42. package/src/assets/icons/NotePencilIcon.tsx +9 -0
  43. package/src/assets/icons/PlusIcon.tsx +9 -0
  44. package/src/assets/icons/TrashIcon.tsx +23 -0
  45. package/src/assets/icons/UserIcon.tsx +17 -0
  46. package/src/components/common/AdvancedList/components/AdvancedListItem/AdvancedListItem.types.ts +100 -0
  47. package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemLeading.tsx +224 -0
  48. package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemTrailing.tsx +263 -0
  49. package/src/components/common/AdvancedList/components/AdvancedListItem/hooks/usePrefersReducedMotion.test.ts +80 -0
  50. package/src/components/common/AdvancedList/components/AdvancedListItem/hooks/usePrefersReducedMotion.ts +28 -0
  51. package/src/components/common/AdvancedList/components/AdvancedListItem/index.test.tsx +631 -0
  52. package/src/components/common/AdvancedList/components/AdvancedListItem/index.tsx +332 -0
  53. package/src/components/common/AdvancedList/index.test.tsx +97 -0
  54. package/src/components/common/AdvancedList/index.tsx +52 -0
  55. package/src/components/common/Button/index.tsx +15 -1
  56. package/src/components/common/ListWithIcons/components/ListWithIconsItem.tsx +7 -5
  57. package/src/components/common/SelectableCardList/components/SelectableCardListItem.test.tsx +50 -0
  58. package/src/components/common/SelectableCardList/components/SelectableCardListItem.tsx +34 -0
  59. package/src/components/common/SelectableCardList/index.test.tsx +56 -2
  60. package/src/components/common/SelectableCardList/index.tsx +29 -10
  61. package/src/components/common/Tooltip/index.test.tsx +85 -0
  62. package/src/components/common/Tooltip/index.tsx +168 -0
  63. package/src/components/form/inputs/Select/index.test.tsx +102 -0
  64. package/src/components/form/inputs/Select/index.tsx +105 -52
  65. package/src/i18n/namespaces/common/en.json +14 -0
  66. package/src/i18n/namespaces/common/lt.json +14 -0
  67. package/src/library/icons.ts +16 -0
  68. package/src/library/index.ts +5 -0
  69. package/src/library/types.ts +2 -0
  70. package/src/setupTests.ts +7 -1
  71. package/src/stories/components/display/AdvancedList.stories.tsx +529 -0
  72. package/src/stories/components/display/AdvancedListItem.stories.tsx +653 -0
  73. package/src/stories/components/display/SelectableCardList.stories.tsx +19 -0
  74. package/src/stories/components/display/Tooltip.stories.tsx +67 -0
  75. package/src/stories/components/inputs/DatePicker.stories.tsx +36 -1
  76. package/src/stories/components/inputs/Select.stories.tsx +38 -2
  77. package/src/stories/components/overlays/Dialog.stories.tsx +34 -0
  78. package/src/stories/components/overlays/Popover.stories.tsx +65 -0
  79. package/src/stories/theme/ThemedMuiComponents.stories.tsx +177 -0
  80. package/src/theme/light/MuiAutocomplete.ts +3 -1
  81. package/src/theme/light/MuiInputBase.ts +4 -0
  82. package/src/theme/light/MuiTooltip.ts +40 -0
  83. package/src/theme/light/index.tsx +2 -0
  84. package/src/theme/motion.tsx +10 -0
@@ -53,19 +53,22 @@ type Props = Pick<TControllerProps, ImmediateControllerProps> &
53
53
  }
54
54
 
55
55
  function RcSesSelect(props: Props) {
56
- const [inputValue, setInputValue] = React.useState('')
57
56
  const [dropdownSearchValue, setDropdownSearchValue] = React.useState('')
58
57
  const [open, setOpen] = React.useState(false)
59
58
  const dropdownSearchOptionValue = '__dropdown-search-option__'
59
+ // rem widths reserved at the end of the input for the clear and dropdown adornments
60
+ const reservedSingleEndAdornmentWidth = 2
61
+ const reservedMultipleTagsEndAdornmentWidth = 2.2
62
+ const reservedMultipleWithCounterEndAdornmentWidth = 3
60
63
  const wrapperRef = React.useRef<HTMLDivElement>(null)
61
64
 
62
65
  const {
63
66
  multiple = false,
64
67
  clearable,
65
- limitTags = 1,
66
68
  control,
67
69
  errors,
68
70
  label,
71
+ limitTags,
69
72
  loading,
70
73
  onInputChange,
71
74
  options,
@@ -82,6 +85,7 @@ function RcSesSelect(props: Props) {
82
85
  const { disabled, name } = fieldProps
83
86
 
84
87
  const id = useMemo(() => fieldProps.id ?? uuidv4(), [fieldProps.id])
88
+ const selectedValueId = useMemo(() => `rc-ses-select-single-value-${id}`, [id])
85
89
 
86
90
  const {
87
91
  field: { onChange, value },
@@ -104,6 +108,20 @@ function RcSesSelect(props: Props) {
104
108
  return options.find((o) => o.value === value) ?? null
105
109
  }, [value, options, multiple])
106
110
 
111
+ const selectedSingleLabel =
112
+ !multiple && resolvedValue && !Array.isArray(resolvedValue) ? resolvedValue.label : ''
113
+
114
+ const selectedTagCount =
115
+ multiple && Array.isArray(resolvedValue) ? resolvedValue.length : 0
116
+ const hasLimitTagCounter =
117
+ multiple && (limitTags ?? -1) > -1 && selectedTagCount > (limitTags ?? -1)
118
+ const reservedMultipleEndAdornmentWidth = hasLimitTagCounter
119
+ ? reservedMultipleWithCounterEndAdornmentWidth
120
+ : reservedMultipleTagsEndAdornmentWidth
121
+
122
+ const [inputValue, setInputValue] = React.useState('')
123
+ const resolvedInputValue = dropdownSearch ? '' : inputValue
124
+
107
125
  const searchRowOption = useMemo<Option>(
108
126
  () => ({ label: '', value: dropdownSearchOptionValue }),
109
127
  [dropdownSearchOptionValue],
@@ -131,7 +149,10 @@ function RcSesSelect(props: Props) {
131
149
  }
132
150
  }
133
151
 
134
- const filteredOptions = useFilteredOptions(options, dropdownSearchValue)
152
+ const filteredOptions = useFilteredOptions(
153
+ options,
154
+ dropdownSearch ? dropdownSearchValue : inputValue,
155
+ )
135
156
 
136
157
  const selectedValues = Array.isArray(value) ? value : []
137
158
  const { allSelected: allFilteredSelected, toggle: handleSelectAll } = useSelectAll(
@@ -141,15 +162,22 @@ function RcSesSelect(props: Props) {
141
162
  )
142
163
 
143
164
  const filterOptions = (opts: Option[]) => {
144
- if (!dropdownSearch || hasCustomGroupBy) return opts
165
+ if (dropdownSearch && !hasCustomGroupBy) {
166
+ const [searchOption, ...realOptions] = opts
167
+ if (!dropdownSearchValue.trim()) return opts
145
168
 
146
- const [searchOption, ...realOptions] = opts
147
- if (!dropdownSearchValue.trim()) return opts
169
+ const filteredValues = new Set(filteredOptions.map((o) => o.value))
170
+ const filtered = realOptions.filter((opt) => filteredValues.has(opt.value))
148
171
 
149
- const filteredValues = new Set(filteredOptions.map((o) => o.value))
150
- const filtered = realOptions.filter((opt) => filteredValues.has(opt.value))
172
+ return [searchOption, ...filtered]
173
+ }
174
+
175
+ if (dropdownSearch && hasCustomGroupBy) return opts
151
176
 
152
- return [searchOption, ...filtered]
177
+ if (!inputValue.trim() || inputValue === selectedSingleLabel) return opts
178
+
179
+ const filteredValues = new Set(filteredOptions.map((o) => o.value))
180
+ return opts.filter((opt) => filteredValues.has(opt.value))
153
181
  }
154
182
 
155
183
  const closeDropdown = () => {
@@ -157,6 +185,13 @@ function RcSesSelect(props: Props) {
157
185
  setDropdownSearchValue('')
158
186
  }
159
187
 
188
+ // clear input when dropdown closes
189
+ const closeDropdownWithClear = () => {
190
+ setOpen(false)
191
+ setDropdownSearchValue('')
192
+ setInputValue('')
193
+ }
194
+
160
195
  const shouldKeepDropdownOpen = () => {
161
196
  const activeEl = document.activeElement
162
197
  if (!(activeEl instanceof Element)) return false
@@ -186,7 +221,7 @@ function RcSesSelect(props: Props) {
186
221
  open={open}
187
222
  onOpen={() => setOpen(true)}
188
223
  multiple={multiple}
189
- limitTags={multiple ? limitTags : undefined}
224
+ limitTags={multiple ? (limitTags ?? -1) : undefined}
190
225
  disableCloseOnSelect={multiple}
191
226
  disabled={disabled}
192
227
  disableClearable={clearable === false}
@@ -198,12 +233,11 @@ function RcSesSelect(props: Props) {
198
233
  handleHomeEndKeys={false}
199
234
  loading={loading}
200
235
  value={resolvedValue}
201
- inputValue={dropdownSearch ? undefined : inputValue}
236
+ inputValue={resolvedInputValue}
202
237
  onChange={handleChange}
203
238
  onInputChange={(event, val, reason) => {
204
239
  if (dropdownSearch) return
205
-
206
- setInputValue(val ?? '')
240
+ setInputValue(val)
207
241
  onInputChange?.(event, val, reason)
208
242
  }}
209
243
  onClose={(_event, reason) => {
@@ -211,7 +245,7 @@ function RcSesSelect(props: Props) {
211
245
  deferCloseCheck()
212
246
  return
213
247
  }
214
- closeDropdown()
248
+ closeDropdownWithClear()
215
249
  }}
216
250
  isOptionEqualToValue={(option, val) => option.value === val.value}
217
251
  getOptionLabel={(option) => option.label}
@@ -243,9 +277,9 @@ function RcSesSelect(props: Props) {
243
277
  {...params}
244
278
  disabled={disabled}
245
279
  error={hasError}
246
- placeholder={placeholder}
280
+ placeholder={!multiple && selectedSingleLabel ? undefined : placeholder}
247
281
  sx={{
248
- ...(dropdownSearch
282
+ ...(dropdownSearch || (!multiple && selectedSingleLabel)
249
283
  ? {
250
284
  '& .MuiInputBase-input': {
251
285
  caretColor: 'transparent',
@@ -256,36 +290,47 @@ function RcSesSelect(props: Props) {
256
290
  ? {
257
291
  '& .MuiAutocomplete-inputRoot': {
258
292
  alignItems: 'center',
259
- pb: '0 !important',
260
- pt: '0 !important',
261
- },
262
- '& .MuiOutlinedInput-root': {
263
- alignItems: 'center',
264
- flexWrap: 'nowrap',
265
- height: '2.75rem',
266
- minHeight: '2.75rem',
267
- overflow: 'hidden',
268
- pl: '.375rem',
269
- py: 0,
293
+ pr: `calc(${reservedMultipleEndAdornmentWidth}rem) !important`,
270
294
  },
271
- '& .MuiAutocomplete-tag': {
272
- alignSelf: 'center',
273
- m: '0 .25rem 0 .35rem',
274
- maxWidth: 'calc(100% - 3.5rem)',
295
+ }
296
+ : {
297
+ '& .rc-ses-select-single-value': {
298
+ boxSizing: 'border-box',
299
+ display: 'block',
300
+ overflowWrap: 'anywhere',
301
+ paddingLeft: '.75rem',
302
+ pointerEvents: 'none',
303
+ width: '100%',
275
304
  },
276
305
  '& .MuiAutocomplete-input': {
277
- minWidth: 0,
306
+ marginRight: `calc(${reservedSingleEndAdornmentWidth}rem) !important`,
278
307
  },
279
- }
280
- : {}),
308
+ }),
281
309
  }}
282
310
  slotProps={{
283
311
  // Spreading params.slotProps keeps `input`, which carries the ref
284
312
  // and classes Autocomplete relies on.
285
313
  ...params.slotProps,
314
+ input: {
315
+ ...params.slotProps.input,
316
+ startAdornment:
317
+ !multiple && selectedSingleLabel ? (
318
+ <Box id={selectedValueId} className='rc-ses-select-single-value'>
319
+ {selectedSingleLabel}
320
+ </Box>
321
+ ) : (
322
+ params.slotProps.input.startAdornment
323
+ ),
324
+ },
286
325
  htmlInput: {
287
326
  ...params.slotProps.htmlInput,
288
- readOnly: dropdownSearch,
327
+ 'aria-describedby':
328
+ !multiple && selectedSingleLabel ? selectedValueId : undefined,
329
+ value:
330
+ !multiple && selectedSingleLabel
331
+ ? ''
332
+ : params.slotProps.htmlInput?.value,
333
+ readOnly: dropdownSearch || (!multiple && !!selectedSingleLabel),
289
334
  },
290
335
  }}
291
336
  />
@@ -468,7 +513,7 @@ function RcSesSelect(props: Props) {
468
513
  </Box>
469
514
  )
470
515
  }}
471
- renderValue={(tagValues, getItemProps) => {
516
+ renderValue={(tagValues, getItemProps, ownerState) => {
472
517
  // MUI 9 merged renderTags into renderValue, so this now runs for
473
518
  // single-select too where v7's renderTags did not. Single-select must
474
519
  // keep showing the plain label - rendering a deletable Chip there both
@@ -478,32 +523,40 @@ function RcSesSelect(props: Props) {
478
523
  return selected[0]?.label ?? ''
479
524
  }
480
525
 
481
- const visible = selected.slice(0, limitTags)
482
- const hiddenCount = selected.length - visible.length
526
+ const visibleTagLimit = ownerState.limitTags ?? -1
527
+ const shouldLimitTags =
528
+ visibleTagLimit > -1 && selected.length > visibleTagLimit
529
+ const visibleTags = shouldLimitTags
530
+ ? selected.slice(0, visibleTagLimit)
531
+ : selected
532
+ const hiddenTagCount = selected.length - visibleTags.length
533
+
483
534
  return (
484
535
  <>
485
- {visible.map((option, index) => (
536
+ {visibleTags.map((option, index) => (
486
537
  // getItemProps no longer returns a key, so it comes from the option.
487
538
  <Chip
488
539
  key={option.value ?? index}
489
540
  label={option.label}
490
541
  size='small'
542
+ sx={{
543
+ height: 'auto',
544
+ maxWidth: `calc(100% - ${reservedMultipleEndAdornmentWidth}rem)`,
545
+ '& .MuiChip-label': {
546
+ display: 'block',
547
+ overflowWrap: 'anywhere',
548
+ py: '.25rem',
549
+ textOverflow: 'clip',
550
+ whiteSpace: 'normal',
551
+ },
552
+ }}
491
553
  {...getItemProps({ index })}
492
554
  />
493
555
  ))}
494
- {hiddenCount > 0 && (
495
- <Box
496
- component='span'
497
- sx={{
498
- alignSelf: 'center',
499
- color: 'text.secondary',
500
- flexShrink: 0,
501
- fontSize: '.8125rem',
502
- ml: '.25rem',
503
- whiteSpace: 'nowrap',
504
- }}
505
- >
506
- +{hiddenCount}
556
+
557
+ {hiddenTagCount > 0 && (
558
+ <Box component='span' className='MuiAutocomplete-tag'>
559
+ {ownerState.getLimitTagsText?.(hiddenTagCount) ?? `+${hiddenTagCount}`}
507
560
  </Box>
508
561
  )}
509
562
  </>
@@ -14,6 +14,20 @@
14
14
  "SegmentedControl": {
15
15
  "options": "Options",
16
16
  "tabs": "Tabs"
17
+ },
18
+ "AdvancedListItemTrailing": {
19
+ "decrease": "Decrease",
20
+ "increase": "Increase",
21
+ "delete": "Delete",
22
+ "toggle": "Toggle",
23
+ "vat": "incl. VAT"
24
+ },
25
+ "Tooltip": {
26
+ "trigger": "Explanation"
27
+ },
28
+ "AdvancedListItemLeading": {
29
+ "moveUp": "Move up",
30
+ "moveDown": "Move down"
17
31
  }
18
32
  }
19
33
  }
@@ -14,6 +14,20 @@
14
14
  "SegmentedControl": {
15
15
  "options": "Parinktys",
16
16
  "tabs": "Skirtukai"
17
+ },
18
+ "AdvancedListItemTrailing": {
19
+ "decrease": "Sumažinti",
20
+ "increase": "Padidinti",
21
+ "delete": "Pašalinti",
22
+ "toggle": "Perjungti",
23
+ "vat": "su PVM"
24
+ },
25
+ "Tooltip": {
26
+ "trigger": "Paaiškinimas"
27
+ },
28
+ "AdvancedListItemLeading": {
29
+ "moveUp": "Perkelti aukštyn",
30
+ "moveDown": "Perkelti žemyn"
17
31
  }
18
32
  }
19
33
  }
@@ -12,6 +12,8 @@ import CaretDownIcon from '@/assets/icons/CaretDownIcon'
12
12
  import CaretLeftBoldIcon from '@/assets/icons/CaretLeftBoldIcon'
13
13
  import CaretLeftIcon from '@/assets/icons/CaretLeftIcon'
14
14
  import CaretRightBoldIcon from '@/assets/icons/CaretRightBoldIcon'
15
+ import CaretUpBoldIcon from '@/assets/icons/CaretUpBoldIcon'
16
+ import CaretUpIcon from '@/assets/icons/CaretUpIcon'
15
17
  import CheckBoldIcon from '@/assets/icons/CheckBoldIcon'
16
18
  import CheckCircleFillIcon from '@/assets/icons/CheckCircleFillIcon'
17
19
  import CheckIcon from '@/assets/icons/CheckIcon'
@@ -23,11 +25,15 @@ import CopyIcon from '@/assets/icons/CopyIcon'
23
25
  import DotCircleFilledIcon from '@/assets/icons/DotCircleFilledIcon'
24
26
  import ExpandChevronsIcon from '@/assets/icons/ExpandChevronsIcon'
25
27
  import InfoFillIcon from '@/assets/icons/InfoFillIcon'
28
+ import ListIcon from '@/assets/icons/ListIcon'
26
29
  import MagnifyingGlassIcon from '@/assets/icons/MagnifyingGlassIcon'
27
30
  import MapPinAreaIcon from '@/assets/icons/MapPinAreaIcon'
28
31
  import MinusBoldIcon from '@/assets/icons/MinusBoldIcon'
32
+ import MinusIcon from '@/assets/icons/MinusIcon'
33
+ import NotePencilIcon from '@/assets/icons/NotePencilIcon'
29
34
  import PencilSimpleLineIcon from '@/assets/icons/PencilSimpleLineIcon'
30
35
  import PlusBoldIcon from '@/assets/icons/PlusBoldIcon'
36
+ import PlusIcon from '@/assets/icons/PlusIcon'
31
37
  import QuestionFillIcon from '@/assets/icons/QuestionFillIcon'
32
38
  import QuestionIcon from '@/assets/icons/QuestionIcon'
33
39
  import ScalesIcon from '@/assets/icons/ScalesIcon'
@@ -35,7 +41,9 @@ import ScrollIcon from '@/assets/icons/ScrollIcon'
35
41
  import SearchHelpIcon from '@/assets/icons/SearchHelpIcon'
36
42
  import SearchXIcon from '@/assets/icons/SearchXIcon'
37
43
  import SpinnerGapBoldIcon from '@/assets/icons/SpinnerGapBoldIcon'
44
+ import TrashIcon from '@/assets/icons/TrashIcon'
38
45
  import UploadSimpleIcon from '@/assets/icons/UploadSimpleIcon'
46
+ import UserIcon from '@/assets/icons/UserIcon'
39
47
  import WarningCircleIcon from '@/assets/icons/WarningCircleIcon'
40
48
  import WarningDiamondFillIcon from '@/assets/icons/WarningDiamondFillIcon'
41
49
  import WarningFillIcon from '@/assets/icons/WarningFillIcon'
@@ -56,6 +64,8 @@ export {
56
64
  CaretLeftBoldIcon,
57
65
  CaretLeftIcon,
58
66
  CaretRightBoldIcon,
67
+ CaretUpIcon,
68
+ CaretUpBoldIcon,
59
69
  CheckBoldIcon,
60
70
  CheckCircleFillIcon,
61
71
  CheckIcon,
@@ -67,11 +77,15 @@ export {
67
77
  DotCircleFilledIcon,
68
78
  ExpandChevronsIcon,
69
79
  InfoFillIcon,
80
+ ListIcon,
70
81
  MagnifyingGlassIcon,
71
82
  MapPinAreaIcon,
72
83
  MinusBoldIcon,
84
+ MinusIcon,
85
+ NotePencilIcon,
73
86
  PencilSimpleLineIcon,
74
87
  PlusBoldIcon,
88
+ PlusIcon,
75
89
  QuestionFillIcon,
76
90
  QuestionIcon,
77
91
  ScalesIcon,
@@ -79,7 +93,9 @@ export {
79
93
  SearchHelpIcon,
80
94
  SearchXIcon,
81
95
  SpinnerGapBoldIcon,
96
+ TrashIcon,
82
97
  UploadSimpleIcon,
98
+ UserIcon,
83
99
  WarningDiamondFillIcon,
84
100
  WarningFillIcon,
85
101
  WarningCircleIcon,
@@ -5,6 +5,8 @@ import type {} from '@mui/x-date-pickers/themeAugmentation'
5
5
  import RcSesIconProps from '@/assets/IconProps'
6
6
  import RcSesAccordion from '@/components/common/Accordion'
7
7
  import useAccordionController from '@/components/common/Accordion/hooks/useAccordionController'
8
+ import RcSesAdvancedList from '@/components/common/AdvancedList'
9
+ import RcSesAdvancedListItem from '@/components/common/AdvancedList/components/AdvancedListItem'
8
10
  import RcSesAlert from '@/components/common/Alert'
9
11
  import RcSesBadge from '@/components/common/Badge'
10
12
  import RcSesBreadcrumbs from '@/components/common/Breadcrumbs'
@@ -26,6 +28,7 @@ import RcSesTab from '@/components/common/Tabs/Tab'
26
28
  import RcSesTabPanel from '@/components/common/Tabs/TabPanel'
27
29
  import RcSesTabs from '@/components/common/Tabs/Tabs'
28
30
  import RcSesTabsWrapper from '@/components/common/Tabs/TabsWrapper'
31
+ import RcSesTooltip from '@/components/common/Tooltip'
29
32
  import RcSesFormControlWrapper from '@/components/form/components/FormControlWrapper'
30
33
  import RcSesCheckbox from '@/components/form/inputs/Checkbox'
31
34
  import RcSesCheckboxFormControl from '@/components/form/inputs/CheckboxFormControl'
@@ -67,6 +70,7 @@ declare module '@mui/x-date-pickers/models' {
67
70
 
68
71
  export { RcSesPalette, RcSesTheme }
69
72
  export { RcSesAccordion, useAccordionController }
73
+ export { RcSesAdvancedList, RcSesAdvancedListItem }
70
74
  export {
71
75
  RcSesAlert,
72
76
  RcSesBadge,
@@ -98,6 +102,7 @@ export { RcSesSearchInput }
98
102
  export { RcSesSearchableField }
99
103
  export { RcSesSelect }
100
104
  export { RcSesTab, RcSesTabPanel, RcSesTabs, RcSesTabsWrapper }
105
+ export { RcSesTooltip }
101
106
  export { RcSesTextField }
102
107
  export { DataPagination }
103
108
  export { ListWithIcons }
@@ -6,6 +6,7 @@ import {
6
6
  RcSesSegmentedControlProps,
7
7
  } from '@/components/common/SegmentedControl'
8
8
  import { RcSesSegmentButtonProps } from '@/components/common/SegmentedControl/components/SegmentButton'
9
+ import { RcSesTooltipProps } from '@/components/common/Tooltip'
9
10
  import { RcSesFormControlLabelProps } from '@/components/form/inputs/FormControlLabel'
10
11
  import { SimpleCheckboxProps } from '@/components/form/inputs/SimpleCheckbox'
11
12
  import { RcSesCardFormContainerProps } from '@/components/layout/ServiceFormContainer/CardFormContainer'
@@ -41,6 +42,7 @@ export type {
41
42
  RcSesFormControlLabelProps,
42
43
  RcSesLoadingSpinnerProps,
43
44
  RcSesSpinnerColor,
45
+ RcSesTooltipProps,
44
46
  }
45
47
  export type { RcSesDialogProps, DialogSize }
46
48
  export type { RcSesModalProps, ModalVariant }
package/src/setupTests.ts CHANGED
@@ -2,13 +2,19 @@ import '@testing-library/jest-dom/vitest'
2
2
  import i18n from 'i18next'
3
3
  import { initReactI18next } from 'react-i18next'
4
4
 
5
+ import commonEn from '@/i18n/namespaces/common/en.json'
6
+ import commonLt from '@/i18n/namespaces/common/lt.json'
7
+ import inputEn from '@/i18n/namespaces/input/en.json'
8
+ import inputLt from '@/i18n/namespaces/input/lt.json'
9
+
5
10
  if (!i18n.isInitialized) {
6
11
  i18n.use(initReactI18next).init({
7
12
  fallbackLng: 'lt',
8
13
  interpolation: { escapeValue: false },
9
14
  lng: 'lt',
10
15
  resources: {
11
- lt: { translation: {} },
16
+ lt: { common: commonLt, input: inputLt },
17
+ en: { common: commonEn, input: inputEn },
12
18
  },
13
19
  })
14
20
  }