@teamturing/react-kit 2.61.1 → 2.62.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.
@@ -11,11 +11,17 @@ type Props = {
11
11
  * `multiple`: 모든 아이템에 Checkbox를 표시합니다.
12
12
  */
13
13
  selectionVariant?: 'single' | 'multiple';
14
+ /**
15
+ * 선택 표시(CheckIcon, Checkbox)의 위치를 결정합니다.
16
+ * `leading`: LeadingVisual 앞에 표시합니다. (기본값)
17
+ * `trailing`: TrailingVisual 뒤에 표시합니다.
18
+ */
19
+ selectionPosition?: 'leading' | 'trailing';
14
20
  onSelect?: (event: ReactMouseEvent<HTMLLIElement> | ReactKeyboardEvent<HTMLLIElement>) => void;
15
21
  } & SxProp;
16
- type ActionListContextValue = {} & Pick<Props, 'selectionVariant' | 'onSelect'>;
17
- declare const ActionListContext: import("react").Context<Pick<Props, "onSelect" | "selectionVariant">>;
18
- declare const _default: (({ selectionVariant, onSelect, ...props }: PropsWithChildren<Props>) => import("react/jsx-runtime").JSX.Element) & {
22
+ type ActionListContextValue = {} & Pick<Props, 'selectionVariant' | 'selectionPosition' | 'onSelect'>;
23
+ declare const ActionListContext: import("react").Context<Pick<Props, "onSelect" | "selectionVariant" | "selectionPosition">>;
24
+ declare const _default: (({ selectionVariant, selectionPosition, onSelect, ...props }: PropsWithChildren<Props>) => import("react/jsx-runtime").JSX.Element) & {
19
25
  Item: ({ variant, leadingVisual: LeadingVisual, trailingVisual: TrailingVisual, description, descriptionLayout, disabled, selected, onSelect: propOnSelect, children, onFocus, onBlur, sx, }: PropsWithChildren<ActionListItemProps>) => import("react/jsx-runtime").JSX.Element;
20
26
  SectionDivider: ({ color, variant, width, sx }: ActionListSectionDividerProps) => import("react/jsx-runtime").JSX.Element;
21
27
  SectionHeader: ({ ...props }: PropsWithChildren<SxProp>) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,14 @@
1
1
  /// <reference types="react" />
2
2
  import type { TextProps } from '../Text';
3
- type GradientTextProps = {
3
+ type Props = {
4
4
  variant?: 'violet' | 'pinkBlue';
5
5
  } & TextProps;
6
- declare const GradientText: import("react").ForwardRefExoticComponent<Omit<GradientTextProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
6
+ declare const GradientText: import("react").ForwardRefExoticComponent<{
7
+ variant?: "violet" | "pinkBlue" | undefined;
8
+ } & {
9
+ typography?: import("styled-system").ResponsiveValue<"m" | "s" | "xxs" | "xs" | "l" | "xl" | "xxl" | "display1" | "display2" | "display3" | "display4" | "xxl/regular" | "xxl/bold" | "xl/regular" | "xl/bold" | "l/regular" | "l/bold" | "m/regular" | "m/bold" | "s/regular" | "s/bold" | "xs/regular" | "xs/bold" | "xxs/regular" | "xxs/bold"> | undefined;
10
+ } & import("../../utils/styled-system").SxProp & import("../../utils/styled-system").WordBreakProps & import("../../utils/styled-system").WhiteSpaceProps & import("../../utils/styled-system").TextDecorationProps & import("styled-system").FontSizeProps<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>, "m" | "s" | "xxs" | "xs" | "l" | "xl" | "xxl" | "display1" | "display2" | "display3" | "display4"> & import("styled-system").FontWeightProps<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>, "medium" | "bold" | "regular"> & import("styled-system").LineHeightProps<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>, 1 | 2> & import("styled-system").TextAlignProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").ColorProps<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>, "link" | "border/neutral" | "icon/inverse" | "bg/disabled" | "border/disabled" | "bg/primary" | "icon/disabled" | "border/focused" | "border/danger" | "surface" | "surface/overlay" | "scale/violet/0" | "scale/violet/1" | "scale/violet/2" | "scale/violet/3" | "scale/violet/4" | "scale/violet/5" | "scale/violet/6" | "scale/violet/7" | "scale/violet/8" | "scale/violet/9" | "scale/gray/0" | "scale/gray/1" | "scale/gray/2" | "scale/gray/3" | "scale/gray/4" | "scale/gray/5" | "scale/gray/6" | "scale/gray/7" | "scale/gray/8" | "scale/gray/9" | "scale/blue/0" | "scale/blue/1" | "scale/blue/2" | "scale/blue/3" | "scale/blue/4" | "scale/blue/5" | "scale/blue/6" | "scale/blue/7" | "scale/blue/8" | "scale/blue/9" | "scale/green/0" | "scale/green/1" | "scale/green/2" | "scale/green/3" | "scale/green/4" | "scale/green/5" | "scale/green/6" | "scale/green/7" | "scale/green/8" | "scale/green/9" | "scale/pink/0" | "scale/pink/1" | "scale/pink/2" | "scale/pink/3" | "scale/pink/4" | "scale/pink/5" | "scale/pink/6" | "scale/pink/7" | "scale/pink/8" | "scale/pink/9" | "scale/skyblue/0" | "scale/skyblue/1" | "scale/skyblue/2" | "scale/skyblue/3" | "scale/skyblue/4" | "scale/skyblue/5" | "scale/skyblue/6" | "scale/skyblue/7" | "scale/skyblue/8" | "scale/skyblue/9" | "scale/red/0" | "scale/red/1" | "scale/red/2" | "scale/red/3" | "scale/red/4" | "scale/red/5" | "scale/red/6" | "scale/red/7" | "scale/red/8" | "scale/red/9" | "scale/yellow/0" | "scale/yellow/1" | "scale/yellow/2" | "scale/yellow/3" | "scale/yellow/4" | "scale/yellow/5" | "scale/yellow/6" | "scale/yellow/7" | "scale/yellow/8" | "scale/yellow/9" | "dim" | "link/hovered" | "link/pressed" | "link/neutral" | "link/neutral/hovered" | "link/neutral/pressed" | "link/neutral/bold" | "link/neutral/bold/hovered" | "link/neutral/bold/pressed" | "link/disabled" | "icon/neutral" | "icon/neutral/bold" | "icon/neutral/bolder" | "icon/accent/gray" | "icon/accent/blue/subtle" | "icon/accent/blue" | "icon/accent/blue/bold" | "icon/accent/green" | "icon/accent/yellow" | "icon/accent/red" | "icon/disabled/subtler" | "icon/selected/primary" | "icon/selected" | "icon/primary/subtle" | "icon/primary" | "icon/primary/bold" | "icon/success" | "icon/warning" | "icon/danger" | "border/neutral/subtle" | "border/neutral/bolder" | "border/input" | "border/inverse" | "border/selected" | "border/primary" | "border/hovered" | "border/success" | "border/accent/blue" | "bg/secondary" | "bg/secondary/hovered" | "bg/secondary/pressed" | "bg/primary/hovered" | "bg/primary/pressed" | "bg/primary/disabled" | "bg/neutral/subtlest" | "bg/neutral/subtlest/hovered" | "bg/neutral/subtlest/pressed" | "bg/neutral/subtler" | "bg/neutral/subtler/hovered" | "bg/neutral/subtler/pressed" | "bg/neutral/subtle" | "bg/neutral/subtle/hovered" | "bg/neutral/subtle/pressed" | "bg/neutral" | "bg/neutral/hovered" | "bg/neutral/pressed" | "bg/neutral/bold" | "bg/neutral/bold/hovered" | "bg/neutral/bold/pressed" | "bg/neutral/bolder" | "bg/neutral/bolder/hovered" | "bg/neutral/bolder/pressed" | "bg/disabled/subtlest" | "bg/input" | "bg/accent/blue/subtlest" | "bg/accent/green/subtlest" | "bg/accent/yellow/subtlest" | "bg/accent/red/subtlest" | "bg/accent/red/subtle" | "bg/accent/red" | "bg/accent/gray/subtlest" | "bg/selected/primary" | "bg/selected" | "bg/selected/subtle" | "bg/inverse" | "bg/inverse/subtlest" | "bg/success" | "bg/success/bold" | "bg/warning" | "bg/warning/bold" | "bg/danger" | "bg/danger/bold" | "bg/danger/bold/hovered" | "bg/danger/bold/pressed" | "text/primary" | "text/accent/blue" | "text/accent/green" | "text/accent/yellow" | "text/accent/red" | "text/weak" | "text/neutral/subtlest" | "text/neutral/subtler" | "text/neutral/subtle" | "text/neutral" | "text/inverse" | "text/inverse/subtle" | "text/inverse/subtler" | "text/disabled" | "text/success" | "text/warning" | "text/danger" | "text/selected"> & import("../../utils/styled-system").AsProp & Omit<import("react").HTMLAttributes<HTMLElement>, "color"> & {
11
+ children?: import("react").ReactNode;
12
+ } & import("react").RefAttributes<HTMLSpanElement>>;
7
13
  export default GradientText;
8
- export type { GradientTextProps };
14
+ export type { Props as GradientTextProps };
@@ -1,12 +1,15 @@
1
1
  import { ColorKey, FontSizeKey, FontWeightKey, LineHeightKey, TypographyKey } from '@teamturing/token-studio';
2
- import { ComponentPropsWithRef } from 'react';
2
+ import { type HTMLAttributes } from 'react';
3
3
  import { FontSizeProps, FontWeightProps, ColorProps, TextAlignProps, Theme, LineHeightProps, ResponsiveValue } from 'styled-system';
4
4
  import { AsProp, SxProp, TextDecorationProps, WhiteSpaceProps, WordBreakProps } from '../../utils/styled-system';
5
- type BaseProps = {
5
+ type StyleProps = {
6
6
  typography?: ResponsiveValue<TypographyKey>;
7
7
  } & SxProp & WordBreakProps & WhiteSpaceProps & TextDecorationProps & FontSizeProps<Theme, FontSizeKey> & FontWeightProps<Theme, FontWeightKey> & LineHeightProps<Theme, LineHeightKey> & TextAlignProps & ColorProps<Theme, ColorKey>;
8
- declare const BaseText: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, BaseProps>>;
9
- type TextProps = ComponentPropsWithRef<typeof BaseText> & AsProp;
10
- declare const Text: import("react").ForwardRefExoticComponent<Omit<TextProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
8
+ type Props = StyleProps & AsProp & Omit<HTMLAttributes<HTMLElement>, 'color'>;
9
+ declare const Text: import("react").ForwardRefExoticComponent<{
10
+ typography?: ResponsiveValue<"m" | "s" | "xxs" | "xs" | "l" | "xl" | "xxl" | "display1" | "display2" | "display3" | "display4" | "xxl/regular" | "xxl/bold" | "xl/regular" | "xl/bold" | "l/regular" | "l/bold" | "m/regular" | "m/bold" | "s/regular" | "s/bold" | "xs/regular" | "xs/bold" | "xxs/regular" | "xxs/bold"> | undefined;
11
+ } & SxProp & WordBreakProps & WhiteSpaceProps & TextDecorationProps & FontSizeProps<Theme<import("styled-system").TLengthStyledSystem>, "m" | "s" | "xxs" | "xs" | "l" | "xl" | "xxl" | "display1" | "display2" | "display3" | "display4"> & FontWeightProps<Theme<import("styled-system").TLengthStyledSystem>, "medium" | "bold" | "regular"> & LineHeightProps<Theme<import("styled-system").TLengthStyledSystem>, 1 | 2> & TextAlignProps<Required<Theme<import("styled-system").TLengthStyledSystem>>> & ColorProps<Theme<import("styled-system").TLengthStyledSystem>, "link" | "border/neutral" | "icon/inverse" | "bg/disabled" | "border/disabled" | "bg/primary" | "icon/disabled" | "border/focused" | "border/danger" | "surface" | "surface/overlay" | "scale/violet/0" | "scale/violet/1" | "scale/violet/2" | "scale/violet/3" | "scale/violet/4" | "scale/violet/5" | "scale/violet/6" | "scale/violet/7" | "scale/violet/8" | "scale/violet/9" | "scale/gray/0" | "scale/gray/1" | "scale/gray/2" | "scale/gray/3" | "scale/gray/4" | "scale/gray/5" | "scale/gray/6" | "scale/gray/7" | "scale/gray/8" | "scale/gray/9" | "scale/blue/0" | "scale/blue/1" | "scale/blue/2" | "scale/blue/3" | "scale/blue/4" | "scale/blue/5" | "scale/blue/6" | "scale/blue/7" | "scale/blue/8" | "scale/blue/9" | "scale/green/0" | "scale/green/1" | "scale/green/2" | "scale/green/3" | "scale/green/4" | "scale/green/5" | "scale/green/6" | "scale/green/7" | "scale/green/8" | "scale/green/9" | "scale/pink/0" | "scale/pink/1" | "scale/pink/2" | "scale/pink/3" | "scale/pink/4" | "scale/pink/5" | "scale/pink/6" | "scale/pink/7" | "scale/pink/8" | "scale/pink/9" | "scale/skyblue/0" | "scale/skyblue/1" | "scale/skyblue/2" | "scale/skyblue/3" | "scale/skyblue/4" | "scale/skyblue/5" | "scale/skyblue/6" | "scale/skyblue/7" | "scale/skyblue/8" | "scale/skyblue/9" | "scale/red/0" | "scale/red/1" | "scale/red/2" | "scale/red/3" | "scale/red/4" | "scale/red/5" | "scale/red/6" | "scale/red/7" | "scale/red/8" | "scale/red/9" | "scale/yellow/0" | "scale/yellow/1" | "scale/yellow/2" | "scale/yellow/3" | "scale/yellow/4" | "scale/yellow/5" | "scale/yellow/6" | "scale/yellow/7" | "scale/yellow/8" | "scale/yellow/9" | "dim" | "link/hovered" | "link/pressed" | "link/neutral" | "link/neutral/hovered" | "link/neutral/pressed" | "link/neutral/bold" | "link/neutral/bold/hovered" | "link/neutral/bold/pressed" | "link/disabled" | "icon/neutral" | "icon/neutral/bold" | "icon/neutral/bolder" | "icon/accent/gray" | "icon/accent/blue/subtle" | "icon/accent/blue" | "icon/accent/blue/bold" | "icon/accent/green" | "icon/accent/yellow" | "icon/accent/red" | "icon/disabled/subtler" | "icon/selected/primary" | "icon/selected" | "icon/primary/subtle" | "icon/primary" | "icon/primary/bold" | "icon/success" | "icon/warning" | "icon/danger" | "border/neutral/subtle" | "border/neutral/bolder" | "border/input" | "border/inverse" | "border/selected" | "border/primary" | "border/hovered" | "border/success" | "border/accent/blue" | "bg/secondary" | "bg/secondary/hovered" | "bg/secondary/pressed" | "bg/primary/hovered" | "bg/primary/pressed" | "bg/primary/disabled" | "bg/neutral/subtlest" | "bg/neutral/subtlest/hovered" | "bg/neutral/subtlest/pressed" | "bg/neutral/subtler" | "bg/neutral/subtler/hovered" | "bg/neutral/subtler/pressed" | "bg/neutral/subtle" | "bg/neutral/subtle/hovered" | "bg/neutral/subtle/pressed" | "bg/neutral" | "bg/neutral/hovered" | "bg/neutral/pressed" | "bg/neutral/bold" | "bg/neutral/bold/hovered" | "bg/neutral/bold/pressed" | "bg/neutral/bolder" | "bg/neutral/bolder/hovered" | "bg/neutral/bolder/pressed" | "bg/disabled/subtlest" | "bg/input" | "bg/accent/blue/subtlest" | "bg/accent/green/subtlest" | "bg/accent/yellow/subtlest" | "bg/accent/red/subtlest" | "bg/accent/red/subtle" | "bg/accent/red" | "bg/accent/gray/subtlest" | "bg/selected/primary" | "bg/selected" | "bg/selected/subtle" | "bg/inverse" | "bg/inverse/subtlest" | "bg/success" | "bg/success/bold" | "bg/warning" | "bg/warning/bold" | "bg/danger" | "bg/danger/bold" | "bg/danger/bold/hovered" | "bg/danger/bold/pressed" | "text/primary" | "text/accent/blue" | "text/accent/green" | "text/accent/yellow" | "text/accent/red" | "text/weak" | "text/neutral/subtlest" | "text/neutral/subtler" | "text/neutral/subtle" | "text/neutral" | "text/inverse" | "text/inverse/subtle" | "text/inverse/subtler" | "text/disabled" | "text/success" | "text/warning" | "text/danger" | "text/selected"> & AsProp & Omit<HTMLAttributes<HTMLElement>, "color"> & {
12
+ children?: import("react").ReactNode;
13
+ } & import("react").RefAttributes<HTMLSpanElement>>;
11
14
  export default Text;
12
- export type { TextProps };
15
+ export type { Props as TextProps };
package/dist/index.js CHANGED
@@ -1439,6 +1439,7 @@ const ActionListItem = ({
1439
1439
  }) => {
1440
1440
  const {
1441
1441
  selectionVariant,
1442
+ selectionPosition = 'leading',
1442
1443
  onSelect: defaultOnSelect
1443
1444
  } = React.useContext(ActionListContext);
1444
1445
  if (!selectionVariant && selected) {
@@ -1458,6 +1459,33 @@ const ActionListItem = ({
1458
1459
  handleSelect(event);
1459
1460
  }
1460
1461
  }, [handleSelect, disabled]);
1462
+ const selectionContent = !utils.isNullable(selectionVariant) ? /*#__PURE__*/jsxRuntime.jsx(View, {
1463
+ className: 'action_list_item__selection_wrapper',
1464
+ display: 'inline-flex',
1465
+ minWidth: 20,
1466
+ sx: {
1467
+ ...(selectionPosition === 'trailing' ? {
1468
+ ml: 2
1469
+ } : {
1470
+ mr: 2
1471
+ }),
1472
+ '& svg': {
1473
+ color: 'icon/selected/primary'
1474
+ }
1475
+ },
1476
+ children: selectionVariant === 'single' ? selected ? /*#__PURE__*/jsxRuntime.jsx(StyledIcon, {
1477
+ className: 'action_list_item__selection_wrapper_single',
1478
+ icon: icons.CheckIcon,
1479
+ size: 20
1480
+ }) : null : selectionVariant === 'multiple' ? /*#__PURE__*/jsxRuntime.jsx(FakeCheckbox, {
1481
+ className: 'action_list_item__selection_wrapper_multiple',
1482
+ "aria-checked": selected,
1483
+ checked: selected,
1484
+ onChange: utils.noop,
1485
+ "aria-disabled": disabled,
1486
+ disabled: disabled
1487
+ }) : null
1488
+ }) : null;
1461
1489
  return /*#__PURE__*/jsxRuntime.jsxs(BaseActionListItem, {
1462
1490
  variant: variant,
1463
1491
  ...(disabled ? {
@@ -1470,29 +1498,7 @@ const ActionListItem = ({
1470
1498
  onKeyDown: handleKeyDown,
1471
1499
  onFocus: onFocus,
1472
1500
  onBlur: onBlur,
1473
- children: [!utils.isNullable(selectionVariant) ? /*#__PURE__*/jsxRuntime.jsx(View, {
1474
- className: 'action_list_item__selection_wrapper',
1475
- display: 'inline-flex',
1476
- minWidth: 20,
1477
- sx: {
1478
- 'mr': 2,
1479
- '& svg': {
1480
- color: 'icon/selected/primary'
1481
- }
1482
- },
1483
- children: selectionVariant === 'single' ? selected ? /*#__PURE__*/jsxRuntime.jsx(StyledIcon, {
1484
- className: 'action_list_item__selection_wrapper_single',
1485
- icon: icons.CheckIcon,
1486
- size: 20
1487
- }) : null : selectionVariant === 'multiple' ? /*#__PURE__*/jsxRuntime.jsx(FakeCheckbox, {
1488
- className: 'action_list_item__selection_wrapper_multiple',
1489
- "aria-checked": selected,
1490
- checked: selected,
1491
- onChange: utils.noop,
1492
- "aria-disabled": disabled,
1493
- disabled: disabled
1494
- }) : null
1495
- }) : null, /*#__PURE__*/jsxRuntime.jsx(VisualWrapper, {
1501
+ children: [selectionPosition === 'leading' && selectionContent, /*#__PURE__*/jsxRuntime.jsx(VisualWrapper, {
1496
1502
  className: 'action_list_item__leading_visual',
1497
1503
  display: 'inline-flex',
1498
1504
  flexShrink: 0,
@@ -1535,7 +1541,7 @@ const ActionListItem = ({
1535
1541
  },
1536
1542
  variant: variant,
1537
1543
  children: typeof TrailingVisual !== 'string' && reactIs.isValidElementType(TrailingVisual) ? /*#__PURE__*/jsxRuntime.jsx(TrailingVisual, {}) : TrailingVisual
1538
- })]
1544
+ }), selectionPosition === 'trailing' && selectionContent]
1539
1545
  });
1540
1546
  };
1541
1547
  const VisualWrapper = /*#__PURE__*/styled__default.default(View).withConfig({
@@ -1693,12 +1699,14 @@ const BaseActionListSectionHeader = /*#__PURE__*/styled__default.default.div.wit
1693
1699
  const ActionListContext = /*#__PURE__*/React.createContext({});
1694
1700
  const ActionList = ({
1695
1701
  selectionVariant,
1702
+ selectionPosition,
1696
1703
  onSelect,
1697
1704
  ...props
1698
1705
  }) => {
1699
1706
  return /*#__PURE__*/jsxRuntime.jsx(ActionListContext.Provider, {
1700
1707
  value: {
1701
1708
  selectionVariant,
1709
+ selectionPosition,
1702
1710
  onSelect
1703
1711
  },
1704
1712
  children: /*#__PURE__*/jsxRuntime.jsx(BaseActionList, {
@@ -10,7 +10,7 @@ import StyledIcon from '../StyledIcon/index.js';
10
10
  import Text from '../Text/index.js';
11
11
  import View from '../View/index.js';
12
12
  import { ActionListContext } from './index.js';
13
- import { jsxs, jsx } from 'react/jsx-runtime';
13
+ import { jsx, jsxs } from 'react/jsx-runtime';
14
14
  import { variant } from '../../node_modules/@styled-system/variant/dist/index.esm.js';
15
15
 
16
16
  const ActionListItem = ({
@@ -29,6 +29,7 @@ const ActionListItem = ({
29
29
  }) => {
30
30
  const {
31
31
  selectionVariant,
32
+ selectionPosition = 'leading',
32
33
  onSelect: defaultOnSelect
33
34
  } = useContext(ActionListContext);
34
35
  if (!selectionVariant && selected) {
@@ -48,6 +49,33 @@ const ActionListItem = ({
48
49
  handleSelect(event);
49
50
  }
50
51
  }, [handleSelect, disabled]);
52
+ const selectionContent = !isNullable(selectionVariant) ? /*#__PURE__*/jsx(View, {
53
+ className: 'action_list_item__selection_wrapper',
54
+ display: 'inline-flex',
55
+ minWidth: 20,
56
+ sx: {
57
+ ...(selectionPosition === 'trailing' ? {
58
+ ml: 2
59
+ } : {
60
+ mr: 2
61
+ }),
62
+ '& svg': {
63
+ color: 'icon/selected/primary'
64
+ }
65
+ },
66
+ children: selectionVariant === 'single' ? selected ? /*#__PURE__*/jsx(StyledIcon, {
67
+ className: 'action_list_item__selection_wrapper_single',
68
+ icon: CheckIcon,
69
+ size: 20
70
+ }) : null : selectionVariant === 'multiple' ? /*#__PURE__*/jsx(FakeCheckbox, {
71
+ className: 'action_list_item__selection_wrapper_multiple',
72
+ "aria-checked": selected,
73
+ checked: selected,
74
+ onChange: noop,
75
+ "aria-disabled": disabled,
76
+ disabled: disabled
77
+ }) : null
78
+ }) : null;
51
79
  return /*#__PURE__*/jsxs(BaseActionListItem, {
52
80
  variant: variant,
53
81
  ...(disabled ? {
@@ -60,29 +88,7 @@ const ActionListItem = ({
60
88
  onKeyDown: handleKeyDown,
61
89
  onFocus: onFocus,
62
90
  onBlur: onBlur,
63
- children: [!isNullable(selectionVariant) ? /*#__PURE__*/jsx(View, {
64
- className: 'action_list_item__selection_wrapper',
65
- display: 'inline-flex',
66
- minWidth: 20,
67
- sx: {
68
- 'mr': 2,
69
- '& svg': {
70
- color: 'icon/selected/primary'
71
- }
72
- },
73
- children: selectionVariant === 'single' ? selected ? /*#__PURE__*/jsx(StyledIcon, {
74
- className: 'action_list_item__selection_wrapper_single',
75
- icon: CheckIcon,
76
- size: 20
77
- }) : null : selectionVariant === 'multiple' ? /*#__PURE__*/jsx(FakeCheckbox, {
78
- className: 'action_list_item__selection_wrapper_multiple',
79
- "aria-checked": selected,
80
- checked: selected,
81
- onChange: noop,
82
- "aria-disabled": disabled,
83
- disabled: disabled
84
- }) : null
85
- }) : null, /*#__PURE__*/jsx(VisualWrapper, {
91
+ children: [selectionPosition === 'leading' && selectionContent, /*#__PURE__*/jsx(VisualWrapper, {
86
92
  className: 'action_list_item__leading_visual',
87
93
  display: 'inline-flex',
88
94
  flexShrink: 0,
@@ -125,7 +131,7 @@ const ActionListItem = ({
125
131
  },
126
132
  variant: variant,
127
133
  children: typeof TrailingVisual !== 'string' && isValidElementType(TrailingVisual) ? /*#__PURE__*/jsx(TrailingVisual, {}) : TrailingVisual
128
- })]
134
+ }), selectionPosition === 'trailing' && selectionContent]
129
135
  });
130
136
  };
131
137
  const VisualWrapper = /*#__PURE__*/styled(View).withConfig({
@@ -9,12 +9,14 @@ import { jsx } from 'react/jsx-runtime';
9
9
  const ActionListContext = /*#__PURE__*/createContext({});
10
10
  const ActionList = ({
11
11
  selectionVariant,
12
+ selectionPosition,
12
13
  onSelect,
13
14
  ...props
14
15
  }) => {
15
16
  return /*#__PURE__*/jsx(ActionListContext.Provider, {
16
17
  value: {
17
18
  selectionVariant,
19
+ selectionPosition,
18
20
  onSelect
19
21
  },
20
22
  children: /*#__PURE__*/jsx(BaseActionList, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamturing/react-kit",
3
- "version": "2.61.1",
3
+ "version": "2.62.0",
4
4
  "description": "React components, hooks for create teamturing web application",
5
5
  "author": "Sungchang Park <psch300@gmail.com> (https://github.com/psch300)",
6
6
  "homepage": "https://github.com/weareteamturing/bombe#readme",
@@ -65,5 +65,5 @@
65
65
  "react-textarea-autosize": "^8.5.3",
66
66
  "styled-system": "^5.1.5"
67
67
  },
68
- "gitHead": "6ec3a2fbe8c64af81d4f2e27ab88ebccc7792073"
68
+ "gitHead": "ea0334a4f5e5ced2558f90291d70e7d8180b6420"
69
69
  }