@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
@@ -1,11 +1,12 @@
1
1
  import { StoryObj } from '@storybook/react-vite';
2
- import { default as Button } from '../../../components/common/Button';
2
+ import { ExtendButtonBase, ButtonTypeMap, ButtonPropsVariantOverrides } from '@mui/material';
3
3
  import { OverridableStringUnion } from '@mui/types';
4
- import { ButtonPropsVariantOverrides } from '@mui/material';
5
4
  import { Mock } from 'storybook/test';
6
5
  declare const meta: {
7
6
  title: string;
8
- component: typeof Button;
7
+ component: ExtendButtonBase<ButtonTypeMap<{
8
+ iconOnly?: boolean;
9
+ }>>;
9
10
  parameters: {
10
11
  layout: string;
11
12
  };
@@ -0,0 +1,32 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ import { AdvancedListItemData, AdvancedListProps } from '../../../components/common/AdvancedList';
3
+ declare const meta: {
4
+ title: string;
5
+ component: ({ items, error }: AdvancedListProps) => import("react").JSX.Element;
6
+ tags: string[];
7
+ args: {
8
+ items: AdvancedListItemData[];
9
+ error: undefined;
10
+ };
11
+ argTypes: {
12
+ items: {
13
+ control: false;
14
+ };
15
+ error: {
16
+ control: false;
17
+ };
18
+ };
19
+ };
20
+ export default meta;
21
+ type Story = StoryObj<typeof meta>;
22
+ export declare const Main: Story;
23
+ export declare const Error: Story;
24
+ export declare const KitchenSink: Story;
25
+ export declare const OwnerTypeExpand: Story;
26
+ export declare const FigmaAnatomy: Story;
27
+ export declare const LeadingOptions: Story;
28
+ export declare const TrailingOptions: Story;
29
+ export declare const StateShowcase: Story;
30
+ export declare const UniversalPresetList: Story;
31
+ export declare const PaymentTileList: Story;
32
+ export declare const CartWithDeleteList: Story;
@@ -0,0 +1,33 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ import { AdvancedListItemProps } from '../../../components/common/AdvancedList/components/AdvancedListItem';
3
+ declare const meta: {
4
+ title: string;
5
+ component: ({ title, label, subtitle, metaItems, leadingMedia, expandedContent, expanded, onExpandedChange, leading, trailing, state, onClick, }: AdvancedListItemProps) => import("react").JSX.Element;
6
+ tags: string[];
7
+ args: {
8
+ title: string;
9
+ subtitle: string;
10
+ state: "rest";
11
+ };
12
+ };
13
+ export default meta;
14
+ type Story = StoryObj<typeof meta>;
15
+ export declare const Main: Story;
16
+ export declare const Selected: Story;
17
+ export declare const Disabled: Story;
18
+ export declare const ErrorState: Story;
19
+ export declare const IgaliotojaiPreset: Story;
20
+ export declare const JaAtstovaiRedaguojamaPreset: Story;
21
+ export declare const JaAtstovaiPerziuraPreset: Story;
22
+ export declare const PasirenkamasSarasasPreset: Story;
23
+ export declare const CheckboxWithLeadingMedia: Story;
24
+ export declare const KrepselisPreset: Story;
25
+ export declare const RadioExpand: Story;
26
+ export declare const CheckboxExpand: Story;
27
+ export declare const NestedRadioGroup: Story;
28
+ export declare const LongExpandedContent: Story;
29
+ export declare const TrailingShowcase: Story;
30
+ export declare const LeadingShowcase: Story;
31
+ export declare const UniversalPreset: Story;
32
+ export declare const PaymentTilePreset: Story;
33
+ export declare const KrepselisWithDeletePreset: Story;
@@ -2,8 +2,15 @@ import { StoryObj } from '@storybook/react-vite';
2
2
  import { SelectableCardListItemData, SelectableCardListProps } from '../../../components/common/SelectableCardList';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: ({ items, selectedId, onSelect, error, }: SelectableCardListProps) => import("react").JSX.Element;
5
+ component: (props: SelectableCardListProps) => import("react").JSX.Element;
6
6
  tags: string[];
7
+ parameters: {
8
+ docs: {
9
+ description: {
10
+ component: string;
11
+ };
12
+ };
13
+ };
7
14
  args: {
8
15
  items: SelectableCardListItemData[];
9
16
  selectedId: null;
@@ -0,0 +1,48 @@
1
+ import { default as RcSesTooltip } from '../../../components/common/Tooltip';
2
+ declare const meta: {
3
+ title: string;
4
+ component: typeof RcSesTooltip;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ tags: string[];
9
+ argTypes: {
10
+ title: {
11
+ control: "text";
12
+ description: string;
13
+ };
14
+ placement: {
15
+ control: "select";
16
+ options: string[];
17
+ description: string;
18
+ };
19
+ slotProps: {
20
+ control: false;
21
+ description: string;
22
+ };
23
+ children: {
24
+ control: false;
25
+ description: string;
26
+ };
27
+ };
28
+ };
29
+ export default meta;
30
+ export declare const Default: {
31
+ readonly args: {
32
+ readonly title: "Deklaruojant išvykimą iš Lietuvos nurodoma užsienio valstybė, į kurią išvykstama.";
33
+ };
34
+ readonly render: (args: any) => import("react").JSX.Element;
35
+ };
36
+ export declare const CustomTrigger: {
37
+ readonly args: {
38
+ readonly title: "Papildoma informacija apie paslaugą.";
39
+ };
40
+ readonly render: (args: any) => import("react").JSX.Element;
41
+ readonly parameters: {
42
+ readonly docs: {
43
+ readonly source: {
44
+ readonly code: "<RcSesTooltip title=\"Papildoma informacija apie paslaugą.\">\n <Button variant=\"text\">Mygtukas</Button>\n</RcSesTooltip>";
45
+ };
46
+ };
47
+ };
48
+ };
@@ -20,3 +20,26 @@ export declare const Main: {
20
20
  };
21
21
  };
22
22
  };
23
+ /**
24
+ * The calendar popup carries the `MuiPickersLayout` theme overrides, and it only
25
+ * mounts once the picker is opened - so nothing covered them until this story
26
+ * (SAV-5648 / LIB-02).
27
+ */
28
+ export declare const CalendarOpen: {
29
+ render: (args: any) => import("react").JSX.Element;
30
+ args: {
31
+ clearable: boolean;
32
+ label: string;
33
+ open: boolean;
34
+ rules: {
35
+ required: boolean;
36
+ };
37
+ };
38
+ parameters: {
39
+ docs: {
40
+ description: {
41
+ story: string;
42
+ };
43
+ };
44
+ };
45
+ };
@@ -14,11 +14,11 @@ declare const meta: {
14
14
  argTypes: {
15
15
  color: {
16
16
  description: string;
17
- options: ("inherit" | "success" | "info" | "warning" | "error" | "primary" | "secondary")[];
18
- mapping: ("inherit" | "success" | "info" | "warning" | "error" | "primary" | "secondary")[];
17
+ options: ("inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning")[];
18
+ mapping: ("inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning")[];
19
19
  control: {
20
20
  type: "select";
21
- labels: ("inherit" | "success" | "info" | "warning" | "error" | "primary" | "secondary")[];
21
+ labels: ("inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning")[];
22
22
  };
23
23
  table: {
24
24
  defaultValue: {
@@ -4,6 +4,12 @@ declare const meta: Meta<typeof RcSesDialog>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof RcSesDialog>;
6
6
  export declare const Basic: Story;
7
+ /**
8
+ * Every other story here starts closed behind a trigger button, so the dialog
9
+ * itself never reached a visual baseline (SAV-5648 / LIB-02). This one renders
10
+ * it open.
11
+ */
12
+ export declare const Open: Story;
7
13
  export declare const SmallDialog: Story;
8
14
  export declare const MediumDialog: Story;
9
15
  export declare const LargeDialog: Story;
@@ -0,0 +1,12 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { default as RcSesPopover } from '../../../components/common/Popover';
3
+ /**
4
+ * `RcSesButtonWithPopover` owns the popover's open state internally and starts
5
+ * closed, so `MuiPopover` never reached a visual baseline (SAV-5648 / LIB-02).
6
+ * These stories render the popover itself, already open against a fixed anchor.
7
+ */
8
+ declare const meta: Meta<typeof RcSesPopover>;
9
+ export default meta;
10
+ type Story = StoryObj<typeof RcSesPopover>;
11
+ export declare const Default: Story;
12
+ export declare const WithoutHeader: Story;
@@ -0,0 +1,25 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ /**
3
+ * Coverage stories for theme slots no other story puts on the page
4
+ * (SAV-5648 / LIB-02). `visual/theme-slots.spec.ts` fails if one is missing.
5
+ *
6
+ * Two reasons a slot ends up here:
7
+ *
8
+ * 1. **No `RcSes*` wrapper renders it.** `MuiTable`, `MuiTableCell`,
9
+ * `MuiCardHeader`, `MuiCardContent` and `MuiLinearProgress` ship to consumers
10
+ * and are exercised by nothing - `RcSesCard` builds its own header and
11
+ * content out of Stack/Box rather than MUI's slots.
12
+ * 2. **The wrapper never shows it open.** `MuiTooltip` is styled through
13
+ * `RcSesTooltip`, but that component owns its open state internally and no
14
+ * story can force it, so the popper never reaches a baseline.
15
+ *
16
+ * Either way these render the plain MUI component under the theme, so a broken
17
+ * or silently dead override surfaces as a pixel diff.
18
+ */
19
+ declare const meta: Meta;
20
+ export default meta;
21
+ type Story = StoryObj;
22
+ export declare const TableSlots: Story;
23
+ export declare const CardSlots: Story;
24
+ export declare const LinearProgressSlots: Story;
25
+ export declare const TooltipSlots: Story;
@@ -0,0 +1,3 @@
1
+ import { Components } from '@mui/material';
2
+ declare const MuiTooltip: Components['MuiTooltip'];
3
+ export default MuiTooltip;
@@ -0,0 +1,16 @@
1
+ declare const duration: {
2
+ standard: number;
3
+ };
4
+ declare const easing: {
5
+ standard: string;
6
+ };
7
+ export { duration, easing };
8
+ declare const _default: {
9
+ duration: {
10
+ standard: number;
11
+ };
12
+ easing: {
13
+ standard: string;
14
+ };
15
+ };
16
+ export default _default;
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.0.0-rc.0",
4
+ "version": "2.0.0-rc.1",
5
5
  "description": "RC SES React komponentų biblioteka",
6
6
  "type": "module",
7
7
  "private": false,
@@ -39,6 +39,7 @@
39
39
  "test:visual": "playwright test",
40
40
  "test:visual:ci": "npm run storybook-build && playwright test",
41
41
  "test:visual:update": "docker run --rm -v .:/work -v rcses-visual-node-modules:/work/node_modules -w /work mcr.microsoft.com/playwright:v1.62.0-noble bash -c \"npm ci --no-audit --no-fund && npm run storybook-build && npx playwright test --update-snapshots\"",
42
+ "test:visual:update:new": "docker run --rm -v .:/work -v rcses-visual-node-modules:/work/node_modules -w /work mcr.microsoft.com/playwright:v1.62.0-noble bash -c \"npm ci --no-audit --no-fund && npm run storybook-build && npx playwright test --update-snapshots missing\"",
42
43
  "test:visual:report": "playwright show-report"
43
44
  },
44
45
  "repository": {
@@ -0,0 +1,17 @@
1
+ import { CaretUpIcon as CaretUp } from '@phosphor-icons/react'
2
+
3
+ import IconProps from '../IconProps'
4
+
5
+ function CaretUpBoldIcon({ className, size = 16, fillColor, ...rest }: IconProps) {
6
+ return (
7
+ <CaretUp
8
+ {...rest}
9
+ className={className}
10
+ size={size}
11
+ weight='bold'
12
+ color={fillColor}
13
+ />
14
+ )
15
+ }
16
+
17
+ export default CaretUpBoldIcon
@@ -0,0 +1,9 @@
1
+ import { CaretUpIcon as CaretUp } from '@phosphor-icons/react'
2
+
3
+ import IconProps from '../IconProps'
4
+
5
+ function CaretUpBoldIcon({ className, size = 16, fillColor, ...rest }: IconProps) {
6
+ return <CaretUp {...rest} className={className} size={size} color={fillColor} />
7
+ }
8
+
9
+ export default CaretUpBoldIcon
@@ -0,0 +1,17 @@
1
+ import { ListIcon as List } from '@phosphor-icons/react'
2
+
3
+ import IconProps from '../IconProps'
4
+
5
+ function ListIcon({
6
+ className,
7
+ fillColor,
8
+ size = 24,
9
+ weight = 'regular',
10
+ ...rest
11
+ }: IconProps) {
12
+ return (
13
+ <List {...rest} className={className} size={size} weight={weight} color={fillColor} />
14
+ )
15
+ }
16
+
17
+ export default ListIcon
@@ -0,0 +1,9 @@
1
+ import { MinusIcon as Minus } from '@phosphor-icons/react'
2
+
3
+ import IconProps from '../IconProps'
4
+
5
+ function MinusIcon({ className, size = 16, fillColor, ...rest }: IconProps) {
6
+ return <Minus {...rest} className={className} size={size} color={fillColor} />
7
+ }
8
+
9
+ export default MinusIcon
@@ -0,0 +1,9 @@
1
+ import { NotePencilIcon as NotePencil } from '@phosphor-icons/react'
2
+
3
+ import IconProps from '../IconProps'
4
+
5
+ function NotePencilIcon({ className, size = 16, fillColor, ...rest }: IconProps) {
6
+ return <NotePencil {...rest} className={className} size={size} color={fillColor} />
7
+ }
8
+
9
+ export default NotePencilIcon
@@ -0,0 +1,9 @@
1
+ import { PlusIcon as Plus } from '@phosphor-icons/react'
2
+
3
+ import IconProps from '../IconProps'
4
+
5
+ function PlusIcon({ className, size = 16, fillColor, ...rest }: IconProps) {
6
+ return <Plus {...rest} className={className} size={size} color={fillColor} />
7
+ }
8
+
9
+ export default PlusIcon
@@ -0,0 +1,23 @@
1
+ import { TrashIcon as Trash } from '@phosphor-icons/react'
2
+
3
+ import IconProps from '../IconProps'
4
+
5
+ function TrashIcon({
6
+ className,
7
+ fillColor,
8
+ size = 24,
9
+ weight = 'regular',
10
+ ...rest
11
+ }: IconProps) {
12
+ return (
13
+ <Trash
14
+ {...rest}
15
+ className={className}
16
+ size={size}
17
+ weight={weight}
18
+ color={fillColor}
19
+ />
20
+ )
21
+ }
22
+
23
+ export default TrashIcon
@@ -0,0 +1,17 @@
1
+ import { UserIcon as User } from '@phosphor-icons/react'
2
+
3
+ import IconProps from '../IconProps'
4
+
5
+ function UserIcon({
6
+ className,
7
+ fillColor,
8
+ size = 24,
9
+ weight = 'regular',
10
+ ...rest
11
+ }: IconProps) {
12
+ return (
13
+ <User {...rest} className={className} size={size} weight={weight} color={fillColor} />
14
+ )
15
+ }
16
+
17
+ export default UserIcon
@@ -0,0 +1,100 @@
1
+ import { ComponentType, ReactNode } from 'react'
2
+
3
+ import { ListWithIconsItemData } from '@/components/common/ListWithIcons/ListWithIcons.types'
4
+
5
+ export type AdvancedListItemState = 'rest' | 'selected' | 'disabled' | 'error'
6
+
7
+ export type AdvancedListItemStatusColor = 'grey' | 'warning' | 'success' | 'error'
8
+
9
+ export type AdvancedListItemAction = {
10
+ label: string
11
+ icon?: ComponentType<{ fillColor?: string; size?: number }>
12
+ onClick: () => void
13
+ disabled?: boolean
14
+ }
15
+
16
+ export type AdvancedListItemLeading =
17
+ | { type: 'none' }
18
+ | {
19
+ type: 'reorder'
20
+ onMoveUp?: () => void
21
+ onMoveDown?: () => void
22
+ moveUpDisabled?: boolean
23
+ moveDownDisabled?: boolean
24
+ }
25
+ | {
26
+ type: 'checkbox'
27
+ checked: boolean
28
+ onChange: (checked: boolean) => void
29
+ 'aria-label'?: string
30
+ }
31
+ | {
32
+ type: 'radio'
33
+ checked: boolean
34
+ onChange: (checked: boolean) => void
35
+ name?: string
36
+ 'aria-label'?: string
37
+ }
38
+ | { type: 'drag'; 'aria-label'?: string }
39
+ | {
40
+ type: 'icon'
41
+ icon: ComponentType<{ fillColor?: string; size?: number }>
42
+ 'aria-label'?: string
43
+ }
44
+ | { type: 'avatar'; initials?: string; src?: string; alt?: string }
45
+ | { type: 'index'; index: number }
46
+
47
+ export type AdvancedListItemTrailing =
48
+ | { type: 'none' }
49
+ | { type: 'actions'; actions: AdvancedListItemAction[] }
50
+ | {
51
+ type: 'toggle'
52
+ checked: boolean
53
+ onChange: (checked: boolean) => void
54
+ 'aria-label'?: string
55
+ }
56
+ | { type: 'status'; label: string; color?: AdvancedListItemStatusColor }
57
+ | {
58
+ type: 'price'
59
+ amount: string
60
+ caption?: string
61
+ onDelete?: () => void
62
+ deleteAriaLabel?: string
63
+ }
64
+ | {
65
+ type: 'checkbox'
66
+ checked: boolean
67
+ onChange: (checked: boolean) => void
68
+ 'aria-label'?: string
69
+ }
70
+ | {
71
+ type: 'radio'
72
+ checked: boolean
73
+ onChange: (checked: boolean) => void
74
+ name?: string
75
+ 'aria-label'?: string
76
+ }
77
+ | { type: 'chevron' }
78
+ | {
79
+ type: 'stepper'
80
+ value: number
81
+ onChange: (value: number) => void
82
+ min?: number
83
+ max?: number
84
+ 'aria-label'?: string
85
+ }
86
+
87
+ export interface AdvancedListItemProps {
88
+ title: string
89
+ label?: string
90
+ subtitle?: string
91
+ metaItems?: ListWithIconsItemData[]
92
+ leadingMedia?: ReactNode
93
+ expandedContent?: ReactNode
94
+ expanded?: boolean
95
+ onExpandedChange?: (expanded: boolean) => void
96
+ leading?: AdvancedListItemLeading
97
+ trailing?: AdvancedListItemTrailing
98
+ state?: AdvancedListItemState
99
+ onClick?: () => void
100
+ }