@registrucentras/rc-ses-react-components 2.2.0 → 2.4.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.
Files changed (164) hide show
  1. package/dist/assets/icons/createIcon.d.ts +18 -0
  2. package/dist/assets/icons/phosphorIcons.d.ts +217 -0
  3. package/dist/components/common/AdvancedList/components/AdvancedListItem/index.d.ts +3 -0
  4. package/dist/components/common/AdvancedList/components/AdvancedListItemShell/AdvancedListItemShell.types.d.ts +31 -0
  5. package/dist/components/common/AdvancedList/components/AdvancedListItemShell/index.d.ts +11 -0
  6. package/dist/library/icons.d.ts +2 -48
  7. package/dist/library/index.d.ts +2 -1
  8. package/dist/library/types.d.ts +2 -0
  9. package/dist/registrucentras-rc-ses-react-components.cjs +1 -1
  10. package/dist/registrucentras-rc-ses-react-components.js +3031 -3240
  11. package/package.json +1 -1
  12. package/src/assets/icons/createIcon.test.tsx +49 -0
  13. package/src/assets/icons/createIcon.tsx +49 -0
  14. package/src/assets/icons/phosphorIcons.ts +160 -0
  15. package/src/components/common/Accordion/index.tsx +1 -1
  16. package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemLeading.tsx +1 -3
  17. package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemTrailing.tsx +6 -4
  18. package/src/components/common/AdvancedList/components/AdvancedListItem/index.test.tsx +5 -3
  19. package/src/components/common/AdvancedList/components/AdvancedListItem/index.tsx +4 -0
  20. package/src/components/common/AdvancedList/components/AdvancedListItemShell/AdvancedListItemShell.types.ts +35 -0
  21. package/src/components/common/AdvancedList/components/AdvancedListItemShell/index.test.tsx +350 -0
  22. package/src/components/common/AdvancedList/components/AdvancedListItemShell/index.tsx +247 -0
  23. package/src/components/common/Alert/index.tsx +1 -1
  24. package/src/components/common/Badge/index.tsx +1 -2
  25. package/src/components/common/Button/ButtonWithPopover.tsx +1 -2
  26. package/src/components/common/DataPagination/index.tsx +1 -2
  27. package/src/components/common/IconWithSquareBackground/index.test.tsx +1 -1
  28. package/src/components/common/ServiceLinks/ServiceLinkItem/index.tsx +1 -1
  29. package/src/components/common/Snackbar/index.tsx +1 -1
  30. package/src/components/common/StepCard/StepCardFooter/index.tsx +5 -3
  31. package/src/components/common/Tooltip/index.tsx +1 -1
  32. package/src/components/form/inputs/CheckboxFormControl.tsx +1 -2
  33. package/src/components/form/inputs/Datepicker/components/RcSesDatepickerCalendarHeader.tsx +6 -4
  34. package/src/components/form/inputs/Datepicker/index.tsx +1 -2
  35. package/src/components/form/inputs/FileDropzone.tsx +1 -2
  36. package/src/components/form/inputs/FileUpload.tsx +1 -1
  37. package/src/components/form/inputs/NumberStepper.tsx +1 -2
  38. package/src/components/form/inputs/PhoneInputFormControl/components/AutocompleteInput.tsx +1 -1
  39. package/src/components/form/inputs/PhoneInputFormControl/index.tsx +1 -1
  40. package/src/components/form/inputs/SearchInput/index.tsx +1 -2
  41. package/src/components/form/inputs/SearchableField.tsx +1 -2
  42. package/src/components/form/inputs/Select/components/OptionCheckbox.tsx +1 -1
  43. package/src/components/form/inputs/Select/index.tsx +1 -2
  44. package/src/components/form/inputs/SimpleCheckbox.tsx +1 -2
  45. package/src/components/layout/ServiceFormActions.tsx +1 -2
  46. package/src/components/layout/ServiceFormContainer/AccordionFormContainer/components/AccordionCollapseControls.tsx +1 -2
  47. package/src/components/layout/ServiceWizardStepper/components/CustomStepIcon.tsx +1 -2
  48. package/src/components/layout/ServiceWizardStepper/components/HorizontalStepperButton.tsx +1 -2
  49. package/src/components/overlays/BottomSheet/index.tsx +1 -1
  50. package/src/components/overlays/Modal/index.tsx +6 -4
  51. package/src/library/icons.ts +3 -100
  52. package/src/library/index.ts +2 -1
  53. package/src/library/types.ts +10 -0
  54. package/src/stories/atoms/Button.stories.tsx +1 -1
  55. package/src/stories/atoms/IconWithCircularBackground.stories.tsx +1 -1
  56. package/src/stories/atoms/IconWithSquareBackground.stories.tsx +1 -1
  57. package/src/stories/atoms/Icons.stories.tsx +40 -38
  58. package/src/stories/molecules/Card.stories.tsx +5 -3
  59. package/src/stories/molecules/CardShell.stories.tsx +1 -1
  60. package/src/stories/molecules/ImageCard.stories.tsx +1 -1
  61. package/src/stories/molecules/ListWithIcons.stories.tsx +1 -2
  62. package/src/stories/molecules/TitleBlock.stories.tsx +6 -3
  63. package/src/stories/organisms/AdvancedList.stories.tsx +6 -4
  64. package/src/stories/organisms/AdvancedListItem.stories.tsx +2 -4
  65. package/src/stories/organisms/AdvancedListItemShell.stories.tsx +865 -0
  66. package/src/stories/organisms/SelectableCardList.stories.tsx +1 -3
  67. package/src/stories/organisms/ServiceLinks.stories.tsx +1 -1
  68. package/src/theme/light/MuiAccordionSummary.tsx +1 -1
  69. package/src/theme/light/MuiAlert.tsx +7 -5
  70. package/src/theme/light/MuiTypography.tsx +24 -24
  71. package/dist/assets/icons/ArrowLeftIcon.d.ts +0 -3
  72. package/dist/assets/icons/ArrowRightIcon.d.ts +0 -3
  73. package/dist/assets/icons/ArrowsClockwiseIcon.d.ts +0 -3
  74. package/dist/assets/icons/BarcodeIcon.d.ts +0 -3
  75. package/dist/assets/icons/CalendarBlankIcon.d.ts +0 -3
  76. package/dist/assets/icons/CaretDoubleLeftBoldIcon.d.ts +0 -3
  77. package/dist/assets/icons/CaretDoubleRightBoldIcon.d.ts +0 -3
  78. package/dist/assets/icons/CaretDownBoldIcon.d.ts +0 -3
  79. package/dist/assets/icons/CaretDownFill.d.ts +0 -3
  80. package/dist/assets/icons/CaretDownIcon.d.ts +0 -3
  81. package/dist/assets/icons/CaretLeftBoldIcon.d.ts +0 -3
  82. package/dist/assets/icons/CaretLeftIcon.d.ts +0 -3
  83. package/dist/assets/icons/CaretRightBoldIcon.d.ts +0 -3
  84. package/dist/assets/icons/CaretUpBoldIcon.d.ts +0 -3
  85. package/dist/assets/icons/CaretUpIcon.d.ts +0 -3
  86. package/dist/assets/icons/CheckBoldIcon.d.ts +0 -3
  87. package/dist/assets/icons/CheckCircleFillIcon.d.ts +0 -3
  88. package/dist/assets/icons/CheckIcon.d.ts +0 -3
  89. package/dist/assets/icons/CheckUncheckedBoldIcon.d.ts +0 -3
  90. package/dist/assets/icons/CircleFilledIcon.d.ts +0 -3
  91. package/dist/assets/icons/CloseIcon.d.ts +0 -3
  92. package/dist/assets/icons/CollapseChevronsIcon.d.ts +0 -3
  93. package/dist/assets/icons/CopyIcon.d.ts +0 -3
  94. package/dist/assets/icons/ExpandChevronsIcon.d.ts +0 -3
  95. package/dist/assets/icons/InfoFillIcon.d.ts +0 -3
  96. package/dist/assets/icons/ListIcon.d.ts +0 -3
  97. package/dist/assets/icons/MagnifyingGlassIcon.d.ts +0 -3
  98. package/dist/assets/icons/MapPinAreaIcon.d.ts +0 -3
  99. package/dist/assets/icons/MinusBoldIcon.d.ts +0 -3
  100. package/dist/assets/icons/MinusIcon.d.ts +0 -3
  101. package/dist/assets/icons/NotePencilIcon.d.ts +0 -3
  102. package/dist/assets/icons/PencilSimpleLineIcon.d.ts +0 -3
  103. package/dist/assets/icons/PlusBoldIcon.d.ts +0 -3
  104. package/dist/assets/icons/PlusIcon.d.ts +0 -3
  105. package/dist/assets/icons/QuestionFillIcon.d.ts +0 -3
  106. package/dist/assets/icons/QuestionIcon.d.ts +0 -3
  107. package/dist/assets/icons/ScalesIcon.d.ts +0 -3
  108. package/dist/assets/icons/ScrollIcon.d.ts +0 -3
  109. package/dist/assets/icons/ShoppingCartIcon.d.ts +0 -3
  110. package/dist/assets/icons/SpinnerGapBoldIcon.d.ts +0 -3
  111. package/dist/assets/icons/TrashIcon.d.ts +0 -3
  112. package/dist/assets/icons/UploadSimpleIcon.d.ts +0 -3
  113. package/dist/assets/icons/UserIcon.d.ts +0 -3
  114. package/dist/assets/icons/WarningCircleIcon.d.ts +0 -3
  115. package/dist/assets/icons/WarningDiamondFillIcon.d.ts +0 -3
  116. package/dist/assets/icons/WarningFillIcon.d.ts +0 -3
  117. package/dist/assets/icons/XCircleFillIcon.d.ts +0 -3
  118. package/src/assets/icons/ArrowLeftIcon.tsx +0 -16
  119. package/src/assets/icons/ArrowRightIcon.tsx +0 -17
  120. package/src/assets/icons/ArrowsClockwiseIcon.tsx +0 -16
  121. package/src/assets/icons/BarcodeIcon.tsx +0 -9
  122. package/src/assets/icons/CalendarBlankIcon.tsx +0 -9
  123. package/src/assets/icons/CaretDoubleLeftBoldIcon.tsx +0 -22
  124. package/src/assets/icons/CaretDoubleRightBoldIcon.tsx +0 -22
  125. package/src/assets/icons/CaretDownBoldIcon.tsx +0 -17
  126. package/src/assets/icons/CaretDownFill.tsx +0 -17
  127. package/src/assets/icons/CaretDownIcon.tsx +0 -9
  128. package/src/assets/icons/CaretLeftBoldIcon.tsx +0 -17
  129. package/src/assets/icons/CaretLeftIcon.tsx +0 -9
  130. package/src/assets/icons/CaretRightBoldIcon.tsx +0 -17
  131. package/src/assets/icons/CaretUpBoldIcon.tsx +0 -17
  132. package/src/assets/icons/CaretUpIcon.tsx +0 -9
  133. package/src/assets/icons/CheckBoldIcon.tsx +0 -17
  134. package/src/assets/icons/CheckCircleFillIcon.tsx +0 -23
  135. package/src/assets/icons/CheckIcon.tsx +0 -23
  136. package/src/assets/icons/CheckUncheckedBoldIcon.tsx +0 -9
  137. package/src/assets/icons/CircleFilledIcon.tsx +0 -11
  138. package/src/assets/icons/CloseIcon.tsx +0 -9
  139. package/src/assets/icons/CollapseChevronsIcon.tsx +0 -17
  140. package/src/assets/icons/CopyIcon.tsx +0 -23
  141. package/src/assets/icons/ExpandChevronsIcon.tsx +0 -17
  142. package/src/assets/icons/InfoFillIcon.tsx +0 -17
  143. package/src/assets/icons/ListIcon.tsx +0 -17
  144. package/src/assets/icons/MagnifyingGlassIcon.tsx +0 -9
  145. package/src/assets/icons/MapPinAreaIcon.tsx +0 -9
  146. package/src/assets/icons/MinusBoldIcon.tsx +0 -11
  147. package/src/assets/icons/MinusIcon.tsx +0 -9
  148. package/src/assets/icons/NotePencilIcon.tsx +0 -9
  149. package/src/assets/icons/PencilSimpleLineIcon.tsx +0 -23
  150. package/src/assets/icons/PlusBoldIcon.tsx +0 -11
  151. package/src/assets/icons/PlusIcon.tsx +0 -9
  152. package/src/assets/icons/QuestionFillIcon.tsx +0 -23
  153. package/src/assets/icons/QuestionIcon.tsx +0 -9
  154. package/src/assets/icons/ScalesIcon.tsx +0 -9
  155. package/src/assets/icons/ScrollIcon.tsx +0 -9
  156. package/src/assets/icons/ShoppingCartIcon.tsx +0 -16
  157. package/src/assets/icons/SpinnerGapBoldIcon.tsx +0 -17
  158. package/src/assets/icons/TrashIcon.tsx +0 -23
  159. package/src/assets/icons/UploadSimpleIcon.tsx +0 -9
  160. package/src/assets/icons/UserIcon.tsx +0 -17
  161. package/src/assets/icons/WarningCircleIcon.tsx +0 -22
  162. package/src/assets/icons/WarningDiamondFillIcon.tsx +0 -17
  163. package/src/assets/icons/WarningFillIcon.tsx +0 -22
  164. package/src/assets/icons/XCircleFillIcon.tsx +0 -17
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@registrucentras/rc-ses-react-components",
3
3
  "author": "VĮ REGISTRŲ CENTRAS",
4
- "version": "2.2.0",
4
+ "version": "2.4.0",
5
5
  "description": "RC SES React komponentų biblioteka",
6
6
  "type": "module",
7
7
  "private": false,
@@ -0,0 +1,49 @@
1
+ import { BriefcaseIcon as Briefcase } from '@phosphor-icons/react'
2
+ import { render } from '@testing-library/react'
3
+ import { describe, expect, it } from 'vitest'
4
+
5
+ import createIcon from './createIcon'
6
+
7
+ const renderSvg = (element: React.ReactElement) =>
8
+ render(element).container.querySelector('svg') as SVGSVGElement
9
+
10
+ describe('createIcon', () => {
11
+ it('renders at 24px in the icon color by default', () => {
12
+ const Icon = createIcon(Briefcase)
13
+ const svg = renderSvg(<Icon fillColor='#06a0d4' />)
14
+
15
+ expect(svg).toHaveAttribute('width', '24')
16
+ expect(svg).toHaveAttribute('height', '24')
17
+ expect(svg).toHaveAttribute('fill', '#06a0d4')
18
+ })
19
+
20
+ it('uses the given defaults and still lets callers override them', () => {
21
+ const Icon = createIcon(Briefcase, { size: 16, weight: 'bold' })
22
+ const withDefaults = renderSvg(<Icon />)
23
+ const boldPaths = withDefaults.innerHTML
24
+ const overridden = renderSvg(<Icon size={32} weight='regular' />)
25
+
26
+ expect(withDefaults).toHaveAttribute('width', '16')
27
+ expect(overridden).toHaveAttribute('width', '32')
28
+ expect(overridden.innerHTML).not.toBe(boldPaths)
29
+ })
30
+
31
+ it('passes other SVG props through', () => {
32
+ const Icon = createIcon(Briefcase)
33
+ const svg = renderSvg(<Icon className='custom' aria-hidden='true' />)
34
+
35
+ expect(svg).toHaveClass('custom')
36
+ expect(svg).toHaveAttribute('aria-hidden', 'true')
37
+ })
38
+
39
+ it('names the component after the Phosphor icon and its default weight', () => {
40
+ expect(createIcon(Briefcase).displayName).toBe('BriefcaseIcon')
41
+ expect(createIcon(Briefcase, { weight: 'bold' }).displayName).toBe(
42
+ 'BriefcaseBoldIcon',
43
+ )
44
+ })
45
+
46
+ it('uses an explicit name when given', () => {
47
+ expect(createIcon(Briefcase, { name: 'WorkIcon' }).displayName).toBe('WorkIcon')
48
+ })
49
+ })
@@ -0,0 +1,49 @@
1
+ import type { IconWeight, Icon as PhosphorIcon } from '@phosphor-icons/react'
2
+
3
+ import IconProps from '../IconProps'
4
+
5
+ interface CreateIconOptions {
6
+ size?: number
7
+ weight?: IconWeight
8
+ /** Component name, only needed when it doesn't follow `<Phosphor name><Weight>Icon` */
9
+ name?: string
10
+ }
11
+
12
+ // Phosphor names its components with the `Icon` suffix (`CaretDownIcon`), so a bold
13
+ // variant becomes `CaretDownBoldIcon`, matching how the library names its icons
14
+ const nameFor = (Phosphor: PhosphorIcon, weight: IconWeight) => {
15
+ const base = Phosphor.displayName ?? 'Icon'
16
+ if (weight === 'regular') {
17
+ return base
18
+ }
19
+ return base.replace(/Icon$/, `${weight[0].toUpperCase()}${weight.slice(1)}Icon`)
20
+ }
21
+
22
+ /**
23
+ * Wraps a Phosphor icon in the library's icon API: `fillColor` maps to Phosphor's
24
+ * `color`, and `size`/`weight` fall back to the given defaults. Callers can still
25
+ * override both per use.
26
+ */
27
+ const createIcon = (
28
+ Phosphor: PhosphorIcon,
29
+ {
30
+ size: defaultSize = 24,
31
+ weight: defaultWeight = 'regular',
32
+ name,
33
+ }: CreateIconOptions = {},
34
+ ) => {
35
+ function Icon({
36
+ fillColor,
37
+ size = defaultSize,
38
+ weight = defaultWeight,
39
+ ...rest
40
+ }: IconProps) {
41
+ return <Phosphor {...rest} size={size} weight={weight} color={fillColor} />
42
+ }
43
+
44
+ Icon.displayName = name ?? nameFor(Phosphor, defaultWeight)
45
+
46
+ return Icon
47
+ }
48
+
49
+ export default createIcon
@@ -0,0 +1,160 @@
1
+ import {
2
+ ArrowLeftIcon as ArrowLeft,
3
+ ArrowRightIcon as ArrowRight,
4
+ ArrowsClockwiseIcon as ArrowsClockwise,
5
+ ArrowsInLineVerticalIcon as ArrowsInLineVertical,
6
+ ArrowsOutLineVerticalIcon as ArrowsOutLineVertical,
7
+ BarcodeIcon as Barcode,
8
+ BriefcaseIcon as Briefcase,
9
+ CalendarBlankIcon as CalendarBlank,
10
+ CaretDoubleLeftIcon as CaretDoubleLeft,
11
+ CaretDoubleRightIcon as CaretDoubleRight,
12
+ CaretDownIcon as CaretDown,
13
+ CaretLeftIcon as CaretLeft,
14
+ CaretRightIcon as CaretRight,
15
+ CaretUpIcon as CaretUp,
16
+ CheckIcon as Check,
17
+ CheckCircleIcon as CheckCircle,
18
+ CheckSquareIcon as CheckSquare,
19
+ CircleIcon as Circle,
20
+ CopyIcon as Copy,
21
+ EnvelopeSimpleIcon as EnvelopeSimple,
22
+ InfoIcon as Info,
23
+ ListIcon as List,
24
+ MagnifyingGlassIcon as MagnifyingGlass,
25
+ MapPinIcon as MapPin,
26
+ MapPinAreaIcon as MapPinArea,
27
+ MinusIcon as Minus,
28
+ NotePencilIcon as NotePencil,
29
+ PencilSimpleLineIcon as PencilSimpleLine,
30
+ PhoneIcon as Phone,
31
+ PhoneCallIcon as PhoneCall,
32
+ PlusIcon as Plus,
33
+ QuestionIcon as Question,
34
+ ScalesIcon as Scales,
35
+ ScrollIcon as Scroll,
36
+ ShoppingCartIcon as ShoppingCart,
37
+ SpinnerGapIcon as SpinnerGap,
38
+ SquareIcon as Square,
39
+ TrashIcon as Trash,
40
+ UploadSimpleIcon as UploadSimple,
41
+ UserIcon as User,
42
+ UserListIcon as UserList,
43
+ WarningIcon as Warning,
44
+ WarningCircleIcon as WarningCircle,
45
+ WarningDiamondIcon as WarningDiamond,
46
+ XIcon as X,
47
+ XCircleIcon as XCircle,
48
+ } from '@phosphor-icons/react'
49
+
50
+ import createIcon from './createIcon'
51
+
52
+ // One line per icon. Pass `{ size, weight }` only when the default (24, regular) differs,
53
+ // and `name` only when the export name doesn't follow `<Phosphor name><Weight>Icon`.
54
+ // The pure annotation lets consumers' bundlers drop the icons they don't import.
55
+ export const ArrowLeftIcon = /* @__PURE__ */ createIcon(ArrowLeft)
56
+ export const ArrowRightIcon = /* @__PURE__ */ createIcon(ArrowRight)
57
+ export const ArrowsClockwiseIcon = /* @__PURE__ */ createIcon(ArrowsClockwise)
58
+ export const BarcodeIcon = /* @__PURE__ */ createIcon(Barcode)
59
+ export const BriefcaseIcon = /* @__PURE__ */ createIcon(Briefcase)
60
+ export const CalendarBlankIcon = /* @__PURE__ */ createIcon(CalendarBlank)
61
+ export const CaretDoubleLeftBoldIcon = /* @__PURE__ */ createIcon(CaretDoubleLeft, {
62
+ size: 16,
63
+ weight: 'bold',
64
+ })
65
+ export const CaretDoubleRightBoldIcon = /* @__PURE__ */ createIcon(CaretDoubleRight, {
66
+ size: 16,
67
+ weight: 'bold',
68
+ })
69
+ export const CaretDownBoldIcon = /* @__PURE__ */ createIcon(CaretDown, {
70
+ size: 16,
71
+ weight: 'bold',
72
+ })
73
+ export const CaretDownFill = /* @__PURE__ */ createIcon(CaretDown, {
74
+ weight: 'fill',
75
+ name: 'CaretDownFill',
76
+ })
77
+ export const CaretDownIcon = /* @__PURE__ */ createIcon(CaretDown)
78
+ export const CaretLeftBoldIcon = /* @__PURE__ */ createIcon(CaretLeft, {
79
+ size: 16,
80
+ weight: 'bold',
81
+ })
82
+ export const CaretLeftIcon = /* @__PURE__ */ createIcon(CaretLeft, { size: 16 })
83
+ export const CaretRightBoldIcon = /* @__PURE__ */ createIcon(CaretRight, {
84
+ size: 16,
85
+ weight: 'bold',
86
+ })
87
+ export const CaretUpBoldIcon = /* @__PURE__ */ createIcon(CaretUp, {
88
+ size: 16,
89
+ weight: 'bold',
90
+ })
91
+ export const CaretUpIcon = /* @__PURE__ */ createIcon(CaretUp, { size: 16 })
92
+ export const CheckBoldIcon = /* @__PURE__ */ createIcon(CheckSquare, {
93
+ weight: 'fill',
94
+ name: 'CheckBoldIcon',
95
+ })
96
+ export const CheckCircleFillIcon = /* @__PURE__ */ createIcon(CheckCircle, {
97
+ weight: 'fill',
98
+ })
99
+ export const CheckIcon = /* @__PURE__ */ createIcon(Check)
100
+ export const CheckUncheckedBoldIcon = /* @__PURE__ */ createIcon(Square, {
101
+ name: 'CheckUncheckedBoldIcon',
102
+ })
103
+ export const CircleFilledIcon = /* @__PURE__ */ createIcon(Circle, {
104
+ weight: 'fill',
105
+ name: 'CircleFilledIcon',
106
+ })
107
+ export const CloseIcon = /* @__PURE__ */ createIcon(X, { name: 'CloseIcon' })
108
+ export const CollapseChevronsIcon = /* @__PURE__ */ createIcon(ArrowsInLineVertical, {
109
+ size: 16,
110
+ weight: 'bold',
111
+ name: 'CollapseChevronsIcon',
112
+ })
113
+ export const CopyIcon = /* @__PURE__ */ createIcon(Copy)
114
+ export const EnvelopeSimpleIcon = /* @__PURE__ */ createIcon(EnvelopeSimple)
115
+ export const ExpandChevronsIcon = /* @__PURE__ */ createIcon(ArrowsOutLineVertical, {
116
+ size: 16,
117
+ weight: 'bold',
118
+ name: 'ExpandChevronsIcon',
119
+ })
120
+ export const InfoFillIcon = /* @__PURE__ */ createIcon(Info, { weight: 'fill' })
121
+ export const InfoIcon = /* @__PURE__ */ createIcon(Info)
122
+ export const ListIcon = /* @__PURE__ */ createIcon(List)
123
+ export const MagnifyingGlassIcon = /* @__PURE__ */ createIcon(MagnifyingGlass)
124
+ export const MapPinAreaIcon = /* @__PURE__ */ createIcon(MapPinArea)
125
+ export const MapPinIcon = /* @__PURE__ */ createIcon(MapPin)
126
+ export const MinusBoldIcon = /* @__PURE__ */ createIcon(Minus, {
127
+ size: 16,
128
+ weight: 'bold',
129
+ })
130
+ export const MinusIcon = /* @__PURE__ */ createIcon(Minus, { size: 16 })
131
+ export const NotePencilIcon = /* @__PURE__ */ createIcon(NotePencil, { size: 16 })
132
+ export const PencilSimpleLineIcon = /* @__PURE__ */ createIcon(PencilSimpleLine)
133
+ export const PhoneCallIcon = /* @__PURE__ */ createIcon(PhoneCall)
134
+ export const PhoneIcon = /* @__PURE__ */ createIcon(Phone)
135
+ export const PlusBoldIcon = /* @__PURE__ */ createIcon(Plus, { size: 16, weight: 'bold' })
136
+ export const PlusIcon = /* @__PURE__ */ createIcon(Plus, { size: 16 })
137
+ export const QuestionFillIcon = /* @__PURE__ */ createIcon(Question, {
138
+ size: 16,
139
+ weight: 'fill',
140
+ })
141
+ export const QuestionIcon = /* @__PURE__ */ createIcon(Question, { size: 16 })
142
+ export const ScalesIcon = /* @__PURE__ */ createIcon(Scales)
143
+ export const ScrollIcon = /* @__PURE__ */ createIcon(Scroll)
144
+ export const ShoppingCartIcon = /* @__PURE__ */ createIcon(ShoppingCart)
145
+ export const SpinnerGapBoldIcon = /* @__PURE__ */ createIcon(SpinnerGap, {
146
+ weight: 'bold',
147
+ })
148
+ export const TrashIcon = /* @__PURE__ */ createIcon(Trash)
149
+ export const UploadSimpleIcon = /* @__PURE__ */ createIcon(UploadSimple)
150
+ export const UserIcon = /* @__PURE__ */ createIcon(User)
151
+ export const UserListIcon = /* @__PURE__ */ createIcon(UserList)
152
+ export const WarningCircleIcon = /* @__PURE__ */ createIcon(WarningCircle, {
153
+ weight: 'fill',
154
+ name: 'WarningCircleIcon',
155
+ })
156
+ export const WarningDiamondFillIcon = /* @__PURE__ */ createIcon(WarningDiamond, {
157
+ weight: 'fill',
158
+ })
159
+ export const WarningFillIcon = /* @__PURE__ */ createIcon(Warning, { weight: 'fill' })
160
+ export const XCircleFillIcon = /* @__PURE__ */ createIcon(XCircle, { weight: 'fill' })
@@ -1,7 +1,7 @@
1
1
  import { Accordion, AccordionDetails, AccordionSummary } from '@mui/material'
2
2
  import React from 'react'
3
3
 
4
- import CaretDownIcon from '@/assets/icons/CaretDownIcon'
4
+ import { CaretDownIcon } from '@/assets/icons/phosphorIcons'
5
5
 
6
6
  import useAccordionController from './hooks/useAccordionController'
7
7
 
@@ -2,9 +2,7 @@ import { Avatar, Box, IconButton, Radio, Stack, Typography } from '@mui/material
2
2
  import { RefObject } from 'react'
3
3
  import { useTranslation } from 'react-i18next'
4
4
 
5
- import CaretDownIcon from '@/assets/icons/CaretDownIcon'
6
- import CaretUpIcon from '@/assets/icons/CaretUpIcon'
7
- import ListIcon from '@/assets/icons/ListIcon'
5
+ import { CaretDownIcon, CaretUpIcon, ListIcon } from '@/assets/icons/phosphorIcons'
8
6
  import RcSesSimpleCheckbox from '@/components/form/inputs/SimpleCheckbox'
9
7
  import palette from '@/theme/palette'
10
8
 
@@ -1,10 +1,12 @@
1
1
  import { Box, IconButton, Radio, Stack, Typography } from '@mui/material'
2
2
  import { useTranslation } from 'react-i18next'
3
3
 
4
- import CaretRightBoldIcon from '@/assets/icons/CaretRightBoldIcon'
5
- import MinusRegularIcon from '@/assets/icons/MinusIcon'
6
- import PlusRegularIcon from '@/assets/icons/PlusIcon'
7
- import TrashIcon from '@/assets/icons/TrashIcon'
4
+ import {
5
+ CaretRightBoldIcon,
6
+ MinusIcon as MinusRegularIcon,
7
+ PlusIcon as PlusRegularIcon,
8
+ TrashIcon,
9
+ } from '@/assets/icons/phosphorIcons'
8
10
  import RcSesBadge, { type RcSesBadgeProps } from '@/components/common/Badge'
9
11
  import RcSesButton from '@/components/common/Button'
10
12
  import RcSesSwitch from '@/components/common/Switch'
@@ -3,9 +3,11 @@ import { fireEvent, render, screen, within } from '@testing-library/react'
3
3
  import { type ReactElement, useState } from 'react'
4
4
  import { describe, expect, test, vi } from 'vitest'
5
5
 
6
- import NotePencilIcon from '@/assets/icons/NotePencilIcon'
7
- import PencilSimpleLineIcon from '@/assets/icons/PencilSimpleLineIcon'
8
- import TrashIcon from '@/assets/icons/TrashIcon'
6
+ import {
7
+ NotePencilIcon,
8
+ PencilSimpleLineIcon,
9
+ TrashIcon,
10
+ } from '@/assets/icons/phosphorIcons'
9
11
  import theme from '@/theme/light'
10
12
 
11
13
  import AdvancedListItem from '.'
@@ -44,6 +44,10 @@ const INTERACTIVE_TRAILING_TYPES = new Set([
44
44
  'stepper',
45
45
  ])
46
46
 
47
+ /**
48
+ * @deprecated Use `RcSesAdvancedListItemShell` instead. Will be removed in a future major release.
49
+ */
50
+
47
51
  const AdvancedListItem = ({
48
52
  title,
49
53
  label,
@@ -0,0 +1,35 @@
1
+ import { ReactNode } from 'react'
2
+
3
+ export type AdvancedListItemShellState = 'rest' | 'selected' | 'disabled' | 'error'
4
+
5
+ /**
6
+ * `card` - bordered, rounded container (the default).
7
+ * `row` - flush row within a list: no border/radius, just a bottom divider.
8
+ */
9
+ export type AdvancedListItemShellContainer = 'card' | 'row'
10
+
11
+ export interface AdvancedListItemShellTestIds {
12
+ root?: string
13
+ leading?: string
14
+ content?: string
15
+ trailing?: string
16
+ expanded?: string
17
+ }
18
+
19
+ export interface AdvancedListItemShellProps {
20
+ /** Optional leading slot (e.g. checkbox, radio, avatar, icon). Empty => not rendered. */
21
+ leading?: ReactNode
22
+ /** Required main content slot (title, subtitle, meta, etc.). */
23
+ content: ReactNode
24
+ /** Optional trailing slot (e.g. actions, status, price). Empty => not rendered. */
25
+ trailing?: ReactNode
26
+ /** Optional expandable slot content, shown/hidden via `isExpanded`. */
27
+ expanded?: ReactNode
28
+ isExpanded?: boolean
29
+ state?: AdvancedListItemShellState
30
+ /** Visual container style. Defaults to `card`. */
31
+ container?: AdvancedListItemShellContainer
32
+ onClick?: () => void
33
+ className?: string
34
+ testIds?: AdvancedListItemShellTestIds
35
+ }