@registrucentras/rc-ses-react-components 1.11.0 → 1.13.0
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/README.md +5 -1
- package/dist/assets/icons/CaretUpBoldIcon.d.ts +3 -0
- package/dist/assets/icons/CaretUpIcon.d.ts +3 -0
- package/dist/assets/icons/ListIcon.d.ts +3 -0
- package/dist/assets/icons/MinusIcon.d.ts +3 -0
- package/dist/assets/icons/NotePencilIcon.d.ts +3 -0
- package/dist/assets/icons/PlusIcon.d.ts +3 -0
- package/dist/assets/icons/TrashIcon.d.ts +3 -0
- package/dist/assets/icons/UserIcon.d.ts +3 -0
- package/dist/components/common/AdvancedList/components/AdvancedListItem/AdvancedListItem.types.d.ts +106 -0
- package/dist/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemLeading.d.ts +12 -0
- package/dist/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemTrailing.d.ts +7 -0
- package/dist/components/common/AdvancedList/components/AdvancedListItem/hooks/usePrefersReducedMotion.d.ts +2 -0
- package/dist/components/common/AdvancedList/components/AdvancedListItem/index.d.ts +4 -0
- package/dist/components/common/AdvancedList/index.d.ts +11 -0
- package/dist/components/common/SelectableCardList/components/SelectableCardListItem.d.ts +4 -1
- package/dist/components/common/SelectableCardList/index.d.ts +4 -1
- package/dist/components/common/Tooltip/index.d.ts +20 -0
- package/dist/components/form/inputs/Select/index.d.ts +1 -0
- package/dist/library/icons.d.ts +9 -1
- package/dist/library/index.d.ts +5 -0
- package/dist/library/types.d.ts +2 -1
- package/dist/registrucentras-rc-ses-react-components.cjs +10 -10
- package/dist/registrucentras-rc-ses-react-components.js +4218 -3377
- package/dist/stories/components/display/AdvancedList.stories.d.ts +33 -0
- package/dist/stories/components/display/AdvancedListItem.stories.d.ts +33 -0
- package/dist/stories/components/display/SelectableCardList.stories.d.ts +8 -1
- package/dist/stories/components/display/Tooltip.stories.d.ts +48 -0
- package/dist/stories/components/loaders/LoadingSpinner.stories.d.ts +3 -3
- package/dist/theme/light/MuiTooltip.d.ts +3 -0
- package/dist/theme/motion.d.ts +16 -0
- package/package.json +1 -1
- package/src/assets/icons/CaretUpBoldIcon.tsx +17 -0
- package/src/assets/icons/CaretUpIcon.tsx +9 -0
- package/src/assets/icons/ListIcon.tsx +17 -0
- package/src/assets/icons/MinusIcon.tsx +9 -0
- package/src/assets/icons/NotePencilIcon.tsx +9 -0
- package/src/assets/icons/PlusIcon.tsx +9 -0
- package/src/assets/icons/TrashIcon.tsx +23 -0
- package/src/assets/icons/UserIcon.tsx +17 -0
- package/src/components/common/AdvancedList/components/AdvancedListItem/AdvancedListItem.types.ts +100 -0
- package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemLeading.tsx +214 -0
- package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemTrailing.tsx +241 -0
- package/src/components/common/AdvancedList/components/AdvancedListItem/hooks/usePrefersReducedMotion.test.ts +80 -0
- package/src/components/common/AdvancedList/components/AdvancedListItem/hooks/usePrefersReducedMotion.ts +28 -0
- package/src/components/common/AdvancedList/components/AdvancedListItem/index.test.tsx +631 -0
- package/src/components/common/AdvancedList/components/AdvancedListItem/index.tsx +329 -0
- package/src/components/common/AdvancedList/index.test.tsx +97 -0
- package/src/components/common/AdvancedList/index.tsx +52 -0
- package/src/components/common/ListWithIcons/components/ListWithIconsItem.tsx +7 -5
- package/src/components/common/SelectableCardList/components/SelectableCardListItem.test.tsx +50 -0
- package/src/components/common/SelectableCardList/components/SelectableCardListItem.tsx +34 -0
- package/src/components/common/SelectableCardList/index.test.tsx +56 -2
- package/src/components/common/SelectableCardList/index.tsx +29 -10
- package/src/components/common/Tooltip/index.test.tsx +85 -0
- package/src/components/common/Tooltip/index.tsx +167 -0
- package/src/components/form/inputs/FileDropzone.tsx +1 -0
- package/src/components/form/inputs/FileUpload.tsx +1 -0
- package/src/components/form/inputs/NumberStepper.tsx +1 -0
- package/src/components/form/inputs/RadioButtonGroup.test.tsx +71 -0
- package/src/components/form/inputs/RadioButtonGroup.tsx +1 -0
- package/src/components/form/inputs/Select/index.test.tsx +159 -0
- package/src/components/form/inputs/Select/index.tsx +109 -53
- package/src/i18n/namespaces/common/en.json +14 -0
- package/src/i18n/namespaces/common/lt.json +14 -0
- package/src/library/icons.ts +16 -0
- package/src/library/index.ts +5 -0
- package/src/library/types.ts +2 -0
- package/src/setupTests.ts +7 -1
- package/src/stories/components/display/AdvancedList.stories.tsx +660 -0
- package/src/stories/components/display/AdvancedListItem.stories.tsx +593 -0
- package/src/stories/components/display/SelectableCardList.stories.tsx +19 -0
- package/src/stories/components/display/Tooltip.stories.tsx +67 -0
- package/src/stories/components/inputs/Select.stories.tsx +38 -2
- package/src/theme/light/MuiAutocomplete.ts +3 -1
- package/src/theme/light/MuiInputBase.ts +4 -0
- package/src/theme/light/MuiTooltip.ts +40 -0
- package/src/theme/light/index.tsx +2 -0
- package/src/theme/motion.tsx +10 -0
|
@@ -42,6 +42,7 @@ type Props = Pick<TControllerProps, ImmediateControllerProps> &
|
|
|
42
42
|
onInputChange?: AutocompleteProps<Option, boolean, boolean, false>['onInputChange']
|
|
43
43
|
|
|
44
44
|
slotProps?: {
|
|
45
|
+
controller?: Partial<Omit<TControllerProps, ImmediateControllerProps>>
|
|
45
46
|
field?: Partial<
|
|
46
47
|
Omit<
|
|
47
48
|
AutocompleteProps<Option, boolean, boolean, false>,
|
|
@@ -53,19 +54,22 @@ type Props = Pick<TControllerProps, ImmediateControllerProps> &
|
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
function RcSesSelect(props: Props) {
|
|
56
|
-
const [inputValue, setInputValue] = React.useState('')
|
|
57
57
|
const [dropdownSearchValue, setDropdownSearchValue] = React.useState('')
|
|
58
58
|
const [open, setOpen] = React.useState(false)
|
|
59
59
|
const dropdownSearchOptionValue = '__dropdown-search-option__'
|
|
60
|
+
// rem widths reserved at the end of the input for the clear and dropdown adornments
|
|
61
|
+
const reservedSingleEndAdornmentWidth = 2
|
|
62
|
+
const reservedMultipleTagsEndAdornmentWidth = 2.2
|
|
63
|
+
const reservedMultipleWithCounterEndAdornmentWidth = 3
|
|
60
64
|
const wrapperRef = React.useRef<HTMLDivElement>(null)
|
|
61
65
|
|
|
62
66
|
const {
|
|
63
67
|
multiple = false,
|
|
64
68
|
clearable,
|
|
65
|
-
limitTags = 1,
|
|
66
69
|
control,
|
|
67
70
|
errors,
|
|
68
71
|
label,
|
|
72
|
+
limitTags,
|
|
69
73
|
loading,
|
|
70
74
|
onInputChange,
|
|
71
75
|
options,
|
|
@@ -82,6 +86,7 @@ function RcSesSelect(props: Props) {
|
|
|
82
86
|
const { disabled, name } = fieldProps
|
|
83
87
|
|
|
84
88
|
const id = useMemo(() => fieldProps.id ?? uuidv4(), [fieldProps.id])
|
|
89
|
+
const selectedValueId = useMemo(() => `rc-ses-select-single-value-${id}`, [id])
|
|
85
90
|
|
|
86
91
|
const {
|
|
87
92
|
field: { onChange, value },
|
|
@@ -90,6 +95,7 @@ function RcSesSelect(props: Props) {
|
|
|
90
95
|
name,
|
|
91
96
|
rules,
|
|
92
97
|
shouldUnregister: true,
|
|
98
|
+
...slotProps?.controller,
|
|
93
99
|
})
|
|
94
100
|
|
|
95
101
|
const hasError = !!errors
|
|
@@ -104,6 +110,20 @@ function RcSesSelect(props: Props) {
|
|
|
104
110
|
return options.find((o) => o.value === value) ?? null
|
|
105
111
|
}, [value, options, multiple])
|
|
106
112
|
|
|
113
|
+
const selectedSingleLabel =
|
|
114
|
+
!multiple && resolvedValue && !Array.isArray(resolvedValue) ? resolvedValue.label : ''
|
|
115
|
+
|
|
116
|
+
const selectedTagCount =
|
|
117
|
+
multiple && Array.isArray(resolvedValue) ? resolvedValue.length : 0
|
|
118
|
+
const hasLimitTagCounter =
|
|
119
|
+
multiple && (limitTags ?? -1) > -1 && selectedTagCount > (limitTags ?? -1)
|
|
120
|
+
const reservedMultipleEndAdornmentWidth = hasLimitTagCounter
|
|
121
|
+
? reservedMultipleWithCounterEndAdornmentWidth
|
|
122
|
+
: reservedMultipleTagsEndAdornmentWidth
|
|
123
|
+
|
|
124
|
+
const [inputValue, setInputValue] = React.useState('')
|
|
125
|
+
const resolvedInputValue = dropdownSearch ? '' : inputValue
|
|
126
|
+
|
|
107
127
|
const searchRowOption = useMemo<Option>(
|
|
108
128
|
() => ({ label: '', value: dropdownSearchOptionValue }),
|
|
109
129
|
[dropdownSearchOptionValue],
|
|
@@ -131,7 +151,10 @@ function RcSesSelect(props: Props) {
|
|
|
131
151
|
}
|
|
132
152
|
}
|
|
133
153
|
|
|
134
|
-
const filteredOptions = useFilteredOptions(
|
|
154
|
+
const filteredOptions = useFilteredOptions(
|
|
155
|
+
options,
|
|
156
|
+
dropdownSearch ? dropdownSearchValue : inputValue,
|
|
157
|
+
)
|
|
135
158
|
|
|
136
159
|
const selectedValues = Array.isArray(value) ? value : []
|
|
137
160
|
const { allSelected: allFilteredSelected, toggle: handleSelectAll } = useSelectAll(
|
|
@@ -141,15 +164,22 @@ function RcSesSelect(props: Props) {
|
|
|
141
164
|
)
|
|
142
165
|
|
|
143
166
|
const filterOptions = (opts: Option[]) => {
|
|
144
|
-
if (
|
|
167
|
+
if (dropdownSearch && !hasCustomGroupBy) {
|
|
168
|
+
const [searchOption, ...realOptions] = opts
|
|
169
|
+
if (!dropdownSearchValue.trim()) return opts
|
|
145
170
|
|
|
146
|
-
|
|
147
|
-
|
|
171
|
+
const filteredValues = new Set(filteredOptions.map((o) => o.value))
|
|
172
|
+
const filtered = realOptions.filter((opt) => filteredValues.has(opt.value))
|
|
148
173
|
|
|
149
|
-
|
|
150
|
-
|
|
174
|
+
return [searchOption, ...filtered]
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (dropdownSearch && hasCustomGroupBy) return opts
|
|
151
178
|
|
|
152
|
-
return
|
|
179
|
+
if (!inputValue.trim() || inputValue === selectedSingleLabel) return opts
|
|
180
|
+
|
|
181
|
+
const filteredValues = new Set(filteredOptions.map((o) => o.value))
|
|
182
|
+
return opts.filter((opt) => filteredValues.has(opt.value))
|
|
153
183
|
}
|
|
154
184
|
|
|
155
185
|
const closeDropdown = () => {
|
|
@@ -157,6 +187,13 @@ function RcSesSelect(props: Props) {
|
|
|
157
187
|
setDropdownSearchValue('')
|
|
158
188
|
}
|
|
159
189
|
|
|
190
|
+
// clear input when dropdown closes
|
|
191
|
+
const closeDropdownWithClear = () => {
|
|
192
|
+
setOpen(false)
|
|
193
|
+
setDropdownSearchValue('')
|
|
194
|
+
setInputValue('')
|
|
195
|
+
}
|
|
196
|
+
|
|
160
197
|
const shouldKeepDropdownOpen = () => {
|
|
161
198
|
const activeEl = document.activeElement
|
|
162
199
|
if (!(activeEl instanceof Element)) return false
|
|
@@ -186,7 +223,7 @@ function RcSesSelect(props: Props) {
|
|
|
186
223
|
open={open}
|
|
187
224
|
onOpen={() => setOpen(true)}
|
|
188
225
|
multiple={multiple}
|
|
189
|
-
limitTags={multiple ? limitTags : undefined}
|
|
226
|
+
limitTags={multiple ? (limitTags ?? -1) : undefined}
|
|
190
227
|
disableCloseOnSelect={multiple}
|
|
191
228
|
disabled={disabled}
|
|
192
229
|
disableClearable={clearable === false}
|
|
@@ -203,12 +240,11 @@ function RcSesSelect(props: Props) {
|
|
|
203
240
|
}}
|
|
204
241
|
loading={loading}
|
|
205
242
|
value={resolvedValue}
|
|
206
|
-
inputValue={
|
|
243
|
+
inputValue={resolvedInputValue}
|
|
207
244
|
onChange={handleChange}
|
|
208
245
|
onInputChange={(event, val, reason) => {
|
|
209
246
|
if (dropdownSearch) return
|
|
210
|
-
|
|
211
|
-
setInputValue(val ?? '')
|
|
247
|
+
setInputValue(val)
|
|
212
248
|
onInputChange?.(event, val, reason)
|
|
213
249
|
}}
|
|
214
250
|
onClose={(_event, reason) => {
|
|
@@ -216,7 +252,7 @@ function RcSesSelect(props: Props) {
|
|
|
216
252
|
deferCloseCheck()
|
|
217
253
|
return
|
|
218
254
|
}
|
|
219
|
-
|
|
255
|
+
closeDropdownWithClear()
|
|
220
256
|
}}
|
|
221
257
|
isOptionEqualToValue={(option, val) => option.value === val.value}
|
|
222
258
|
getOptionLabel={(option) => option.label}
|
|
@@ -247,9 +283,9 @@ function RcSesSelect(props: Props) {
|
|
|
247
283
|
{...params}
|
|
248
284
|
disabled={disabled}
|
|
249
285
|
error={hasError}
|
|
250
|
-
placeholder={placeholder}
|
|
286
|
+
placeholder={!multiple && selectedSingleLabel ? undefined : placeholder}
|
|
251
287
|
sx={{
|
|
252
|
-
...(dropdownSearch
|
|
288
|
+
...(dropdownSearch || (!multiple && selectedSingleLabel)
|
|
253
289
|
? {
|
|
254
290
|
'& .MuiInputBase-input': {
|
|
255
291
|
caretColor: 'transparent',
|
|
@@ -260,34 +296,39 @@ function RcSesSelect(props: Props) {
|
|
|
260
296
|
? {
|
|
261
297
|
'& .MuiAutocomplete-inputRoot': {
|
|
262
298
|
alignItems: 'center',
|
|
263
|
-
|
|
264
|
-
pt: '0 !important',
|
|
265
|
-
},
|
|
266
|
-
'& .MuiOutlinedInput-root': {
|
|
267
|
-
alignItems: 'center',
|
|
268
|
-
flexWrap: 'nowrap',
|
|
269
|
-
height: '2.75rem',
|
|
270
|
-
minHeight: '2.75rem',
|
|
271
|
-
overflow: 'hidden',
|
|
272
|
-
pl: '.375rem',
|
|
273
|
-
py: 0,
|
|
299
|
+
pr: `calc(${reservedMultipleEndAdornmentWidth}rem) !important`,
|
|
274
300
|
},
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
301
|
+
}
|
|
302
|
+
: {
|
|
303
|
+
'& .rc-ses-select-single-value': {
|
|
304
|
+
boxSizing: 'border-box',
|
|
305
|
+
display: 'block',
|
|
306
|
+
overflowWrap: 'anywhere',
|
|
307
|
+
paddingLeft: '.75rem',
|
|
308
|
+
pointerEvents: 'none',
|
|
309
|
+
width: '100%',
|
|
279
310
|
},
|
|
280
311
|
'& .MuiAutocomplete-input': {
|
|
281
|
-
|
|
312
|
+
marginRight: `calc(${reservedSingleEndAdornmentWidth}rem) !important`,
|
|
282
313
|
},
|
|
283
|
-
}
|
|
284
|
-
: {}),
|
|
314
|
+
}),
|
|
285
315
|
}}
|
|
286
316
|
InputProps={{
|
|
287
317
|
...params.InputProps,
|
|
318
|
+
startAdornment:
|
|
319
|
+
!multiple && selectedSingleLabel ? (
|
|
320
|
+
<Box id={selectedValueId} className='rc-ses-select-single-value'>
|
|
321
|
+
{selectedSingleLabel}
|
|
322
|
+
</Box>
|
|
323
|
+
) : (
|
|
324
|
+
params.InputProps.startAdornment
|
|
325
|
+
),
|
|
288
326
|
inputProps: {
|
|
289
327
|
...params.inputProps,
|
|
290
|
-
|
|
328
|
+
'aria-describedby':
|
|
329
|
+
!multiple && selectedSingleLabel ? selectedValueId : undefined,
|
|
330
|
+
value: !multiple && selectedSingleLabel ? '' : params.inputProps?.value,
|
|
331
|
+
readOnly: dropdownSearch || (!multiple && !!selectedSingleLabel),
|
|
291
332
|
},
|
|
292
333
|
}}
|
|
293
334
|
/>
|
|
@@ -458,28 +499,43 @@ function RcSesSelect(props: Props) {
|
|
|
458
499
|
</Box>
|
|
459
500
|
)
|
|
460
501
|
}}
|
|
461
|
-
renderTags={(tagValues, getTagProps) => {
|
|
462
|
-
const
|
|
463
|
-
const
|
|
502
|
+
renderTags={(tagValues, getTagProps, ownerState) => {
|
|
503
|
+
const visibleTagLimit = ownerState.limitTags ?? -1
|
|
504
|
+
const shouldLimitTags =
|
|
505
|
+
visibleTagLimit > -1 && tagValues.length > visibleTagLimit
|
|
506
|
+
const visibleTags = shouldLimitTags
|
|
507
|
+
? tagValues.slice(0, visibleTagLimit)
|
|
508
|
+
: tagValues
|
|
509
|
+
const hiddenTagCount = tagValues.length - visibleTags.length
|
|
510
|
+
|
|
464
511
|
return (
|
|
465
512
|
<>
|
|
466
|
-
{
|
|
513
|
+
{visibleTags.map((option, index) => {
|
|
467
514
|
const { key, ...tagProps } = getTagProps({ index })
|
|
468
|
-
return
|
|
515
|
+
return (
|
|
516
|
+
<Chip
|
|
517
|
+
key={key}
|
|
518
|
+
label={option.label}
|
|
519
|
+
size='small'
|
|
520
|
+
sx={{
|
|
521
|
+
height: 'auto',
|
|
522
|
+
maxWidth: `calc(100% - ${reservedMultipleEndAdornmentWidth}rem)`,
|
|
523
|
+
'& .MuiChip-label': {
|
|
524
|
+
display: 'block',
|
|
525
|
+
overflowWrap: 'anywhere',
|
|
526
|
+
py: '.25rem',
|
|
527
|
+
textOverflow: 'clip',
|
|
528
|
+
whiteSpace: 'normal',
|
|
529
|
+
},
|
|
530
|
+
}}
|
|
531
|
+
{...tagProps}
|
|
532
|
+
/>
|
|
533
|
+
)
|
|
469
534
|
})}
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
alignSelf: 'center',
|
|
475
|
-
color: 'text.secondary',
|
|
476
|
-
flexShrink: 0,
|
|
477
|
-
fontSize: '.8125rem',
|
|
478
|
-
ml: '.25rem',
|
|
479
|
-
whiteSpace: 'nowrap',
|
|
480
|
-
}}
|
|
481
|
-
>
|
|
482
|
-
+{hiddenCount}
|
|
535
|
+
|
|
536
|
+
{hiddenTagCount > 0 && (
|
|
537
|
+
<Box component='span' className='MuiAutocomplete-tag'>
|
|
538
|
+
{ownerState.getLimitTagsText?.(hiddenTagCount) ?? `+${hiddenTagCount}`}
|
|
483
539
|
</Box>
|
|
484
540
|
)}
|
|
485
541
|
</>
|
|
@@ -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
|
}
|
package/src/library/icons.ts
CHANGED
|
@@ -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,
|
package/src/library/index.ts
CHANGED
|
@@ -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 }
|
package/src/library/types.ts
CHANGED
|
@@ -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: {
|
|
16
|
+
lt: { common: commonLt, input: inputLt },
|
|
17
|
+
en: { common: commonEn, input: inputEn },
|
|
12
18
|
},
|
|
13
19
|
})
|
|
14
20
|
}
|