@teamturing/react-kit 2.29.1 → 2.30.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.
@@ -23,6 +23,26 @@ type Props = {
23
23
  */
24
24
  disabled?: boolean;
25
25
  } & UnstyledButtonProps & SxProp;
26
- declare const IconToggleButton: ({ icon: Icon, size, variant, selected, disabled, sx, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
27
- export default IconToggleButton;
26
+ declare const _default: import("react").ForwardRefExoticComponent<{
27
+ icon: ComponentType<SVGProps<SVGSVGElement>>;
28
+ /**
29
+ * 크기를 정의합니다.
30
+ * 반응형 디자인이 적용됩니다.
31
+ */
32
+ size?: ResponsiveValue<"m" | "s" | "l"> | undefined;
33
+ /**
34
+ * 색을 정의합니다.
35
+ */
36
+ variant?: "primary" | "plain" | undefined;
37
+ /**
38
+ * 활성화 상태를 정의합니다.
39
+ * `true`일 경우, 활성화된 상태를 그립니다.
40
+ */
41
+ selected?: boolean | undefined;
42
+ /**
43
+ * 비활성화 상태를 정의합니다.
44
+ */
45
+ disabled?: boolean | undefined;
46
+ } & import("react").ButtonHTMLAttributes<HTMLButtonElement> & SxProp & import("react").RefAttributes<HTMLButtonElement>>;
47
+ export default _default;
28
48
  export type { Props as IconToggleButtonProps };
package/dist/index.js CHANGED
@@ -7103,7 +7103,7 @@ const BaseActionList = styled__default.default.ul`
7103
7103
 
7104
7104
  ${sx}
7105
7105
  `;
7106
- var index$c = Object.assign(ActionList, {
7106
+ var index$d = Object.assign(ActionList, {
7107
7107
  Item: ActionListItem,
7108
7108
  SectionDivider: ActionListSectionDivider,
7109
7109
  SectionHeader: ActionListSectionHeader
@@ -16374,7 +16374,7 @@ const BaseAvatar = styled__default.default(Image)`
16374
16374
  })}
16375
16375
  ${sx}
16376
16376
  `;
16377
- var index$b = /*#__PURE__*/React.forwardRef(Avatar);
16377
+ var index$c = /*#__PURE__*/React.forwardRef(Avatar);
16378
16378
 
16379
16379
  const BadgeAttacher = ({
16380
16380
  children,
@@ -16786,7 +16786,7 @@ const BreadcrumbsItemWrapper = styled__default.default.span`
16786
16786
  }
16787
16787
  }
16788
16788
  `;
16789
- var index$a = Object.assign(Breadcrumbs, {
16789
+ var index$b = Object.assign(Breadcrumbs, {
16790
16790
  Item: BreadcrumbsItem
16791
16791
  });
16792
16792
 
@@ -17756,7 +17756,7 @@ const DatagridWrapper = styled__default.default.div`
17756
17756
  const BaseDatagrid = styled__default.default.div`
17757
17757
  width: inherit;
17758
17758
  `;
17759
- var index$9 = Object.assign(Datagrid, {
17759
+ var index$a = Object.assign(Datagrid, {
17760
17760
  Header: DatagridHeader,
17761
17761
  Subheader: DatagridSubheader,
17762
17762
  Body: DatagridBody,
@@ -18968,7 +18968,7 @@ const BaseDialog = styled__default.default.div(({
18968
18968
  overflow: 'hidden',
18969
18969
  margin: 'auto'
18970
18970
  }), sx);
18971
- var index$8 = Object.assign( /*#__PURE__*/React.forwardRef(Dialog), {
18971
+ var index$9 = Object.assign( /*#__PURE__*/React.forwardRef(Dialog), {
18972
18972
  UnstyledHeader: UnstyledDialogHeader,
18973
18973
  UnstyledBody: UnstyledDialogBody,
18974
18974
  UnstyledFooter: UnstyledDialogFooter,
@@ -19289,7 +19289,7 @@ const BaseDrawer = styled__default.default.div(({
19289
19289
  }
19290
19290
  }
19291
19291
  }), sx);
19292
- var index$7 = Object.assign( /*#__PURE__*/React.forwardRef(Drawer), {
19292
+ var index$8 = Object.assign( /*#__PURE__*/React.forwardRef(Drawer), {
19293
19293
  UnstyledHeader: UnstyledDrawerHeader,
19294
19294
  UnstyledBody: UnstyledDrawerBody,
19295
19295
  UnstyledFooter: UnstyledDrawerFooter,
@@ -19534,7 +19534,7 @@ const BaseFlash = styled__default.default.div`
19534
19534
 
19535
19535
  ${sx}
19536
19536
  `;
19537
- var index$6 = /*#__PURE__*/React.forwardRef(Flash);
19537
+ var index$7 = /*#__PURE__*/React.forwardRef(Flash);
19538
19538
 
19539
19539
  const Radio = ({
19540
19540
  checked,
@@ -34440,7 +34440,7 @@ if (process.env.NODE_ENV === 'production') {
34440
34440
  }
34441
34441
  var reactDomExports = reactDom.exports;
34442
34442
 
34443
- var index$5 = typeof document !== 'undefined' ? React.useLayoutEffect : React.useEffect;
34443
+ var index$6 = typeof document !== 'undefined' ? React.useLayoutEffect : React.useEffect;
34444
34444
 
34445
34445
  // Fork of `fast-deep-equal` that only does the comparisons we need and compares
34446
34446
  // functions
@@ -34505,7 +34505,7 @@ function roundByDPR(element, value) {
34505
34505
 
34506
34506
  function useLatestRef(value) {
34507
34507
  const ref = React__namespace.useRef(value);
34508
- index$5(() => {
34508
+ index$6(() => {
34509
34509
  ref.current = value;
34510
34510
  });
34511
34511
  return ref;
@@ -34590,7 +34590,7 @@ function useFloating(options) {
34590
34590
  }
34591
34591
  });
34592
34592
  }, [latestMiddleware, placement, strategy, platformRef]);
34593
- index$5(() => {
34593
+ index$6(() => {
34594
34594
  if (open === false && dataRef.current.isPositioned) {
34595
34595
  dataRef.current.isPositioned = false;
34596
34596
  setData(data => ({
@@ -34600,13 +34600,13 @@ function useFloating(options) {
34600
34600
  }
34601
34601
  }, [open]);
34602
34602
  const isMountedRef = React__namespace.useRef(false);
34603
- index$5(() => {
34603
+ index$6(() => {
34604
34604
  isMountedRef.current = true;
34605
34605
  return () => {
34606
34606
  isMountedRef.current = false;
34607
34607
  };
34608
34608
  }, []);
34609
- index$5(() => {
34609
+ index$6(() => {
34610
34610
  if (referenceEl) referenceRef.current = referenceEl;
34611
34611
  if (floatingEl) floatingRef.current = floatingEl;
34612
34612
  if (referenceEl && floatingEl) {
@@ -36949,7 +36949,7 @@ const FormControl = ({
36949
36949
  })
36950
36950
  });
36951
36951
  };
36952
- var index$4 = Object.assign( /*#__PURE__*/React.forwardRef(FormControl), {
36952
+ var index$5 = Object.assign( /*#__PURE__*/React.forwardRef(FormControl), {
36953
36953
  Label: FormControlLabel,
36954
36954
  Caption: FormControlCaption,
36955
36955
  ErrorMessage: FormControlErrorMessage,
@@ -36973,20 +36973,19 @@ const IconToggleButton = ({
36973
36973
  disabled = false,
36974
36974
  sx,
36975
36975
  ...props
36976
- }) => {
36977
- return /*#__PURE__*/jsxRuntimeExports.jsx(BaseIconToggleButton, {
36978
- icon: Icon,
36979
- size: size,
36980
- variant: variant,
36981
- selected: selected,
36982
- type: 'button',
36983
- disabled: disabled,
36984
- $disabled: disabled,
36985
- sx: sx,
36986
- ...props,
36987
- children: /*#__PURE__*/jsxRuntimeExports.jsx(Icon, {})
36988
- });
36989
- };
36976
+ }, ref) => /*#__PURE__*/jsxRuntimeExports.jsx(BaseIconToggleButton, {
36977
+ ref: ref,
36978
+ icon: Icon,
36979
+ size: size,
36980
+ variant: variant,
36981
+ selected: selected,
36982
+ type: 'button',
36983
+ disabled: disabled,
36984
+ $disabled: disabled,
36985
+ sx: sx,
36986
+ ...props,
36987
+ children: /*#__PURE__*/jsxRuntimeExports.jsx(Icon, {})
36988
+ });
36990
36989
  const BaseIconToggleButton = styled__default.default(UnstyledButton)(({
36991
36990
  $disabled,
36992
36991
  theme
@@ -37063,6 +37062,7 @@ const BaseIconToggleButton = styled__default.default(UnstyledButton)(({
37063
37062
  }
37064
37063
  }
37065
37064
  }), sx);
37065
+ var index$4 = /*#__PURE__*/React.forwardRef(IconToggleButton);
37066
37066
 
37067
37067
  const Pagination = ({
37068
37068
  pages: propPages,
@@ -39532,28 +39532,28 @@ const useTabState = ({
39532
39532
  return [selectedIndex, handleSelect];
39533
39533
  };
39534
39534
 
39535
- exports.ActionList = index$c;
39535
+ exports.ActionList = index$d;
39536
39536
  exports.AnimatePresence = AnimatePresence;
39537
- exports.Avatar = index$b;
39537
+ exports.Avatar = index$c;
39538
39538
  exports.BadgeAttacher = BadgeAttacher;
39539
- exports.Breadcrumbs = index$a;
39539
+ exports.Breadcrumbs = index$b;
39540
39540
  exports.Button = Button;
39541
39541
  exports.Checkbox = Checkbox$1;
39542
39542
  exports.Chip = Chip;
39543
39543
  exports.CounterBadge = CounterBadge;
39544
- exports.Datagrid = index$9;
39544
+ exports.Datagrid = index$a;
39545
39545
  exports.DescriptionList = DescriptionList;
39546
- exports.Dialog = index$8;
39547
- exports.Drawer = index$7;
39546
+ exports.Dialog = index$9;
39547
+ exports.Drawer = index$8;
39548
39548
  exports.EmptyState = EmptyState;
39549
39549
  exports.EnigmaUI = index;
39550
- exports.Flash = index$6;
39551
- exports.FormControl = index$4;
39550
+ exports.Flash = index$7;
39551
+ exports.FormControl = index$5;
39552
39552
  exports.GradientText = GradientText;
39553
39553
  exports.Grid = Grid$1;
39554
39554
  exports.HorizontalDivider = HorizontalDivider;
39555
39555
  exports.IconButton = IconButton;
39556
- exports.IconToggleButton = IconToggleButton;
39556
+ exports.IconToggleButton = index$4;
39557
39557
  exports.Image = Image;
39558
39558
  exports.ItemList = ItemList;
39559
39559
  exports.MotionView = MotionView;
@@ -1,3 +1,4 @@
1
+ import { forwardRef } from 'react';
1
2
  import styled from 'styled-components';
2
3
  import '../../node_modules/styled-system/dist/index.esm.js';
3
4
  import { sx } from '../../utils/styled-system/index.js';
@@ -13,20 +14,19 @@ const IconToggleButton = ({
13
14
  disabled = false,
14
15
  sx,
15
16
  ...props
16
- }) => {
17
- return /*#__PURE__*/jsxRuntimeExports.jsx(BaseIconToggleButton, {
18
- icon: Icon,
19
- size: size,
20
- variant: variant,
21
- selected: selected,
22
- type: 'button',
23
- disabled: disabled,
24
- $disabled: disabled,
25
- sx: sx,
26
- ...props,
27
- children: /*#__PURE__*/jsxRuntimeExports.jsx(Icon, {})
28
- });
29
- };
17
+ }, ref) => /*#__PURE__*/jsxRuntimeExports.jsx(BaseIconToggleButton, {
18
+ ref: ref,
19
+ icon: Icon,
20
+ size: size,
21
+ variant: variant,
22
+ selected: selected,
23
+ type: 'button',
24
+ disabled: disabled,
25
+ $disabled: disabled,
26
+ sx: sx,
27
+ ...props,
28
+ children: /*#__PURE__*/jsxRuntimeExports.jsx(Icon, {})
29
+ });
30
30
  const BaseIconToggleButton = styled(UnstyledButton)(({
31
31
  $disabled,
32
32
  theme
@@ -103,5 +103,6 @@ const BaseIconToggleButton = styled(UnstyledButton)(({
103
103
  }
104
104
  }
105
105
  }), sx);
106
+ var index = /*#__PURE__*/forwardRef(IconToggleButton);
106
107
 
107
- export { IconToggleButton as default };
108
+ export { index as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamturing/react-kit",
3
- "version": "2.29.1",
3
+ "version": "2.30.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",
@@ -66,5 +66,5 @@
66
66
  "react-textarea-autosize": "^8.5.3",
67
67
  "styled-system": "^5.1.5"
68
68
  },
69
- "gitHead": "22854552108cb3fe3d9d2ab9e829301fe85e6df9"
69
+ "gitHead": "d479f2b970e8e83acae103090b2429e996699433"
70
70
  }