@teamturing/react-kit 2.72.0 → 2.73.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.
@@ -18,6 +18,7 @@ type Props = {
18
18
  size?: DialogSizeType;
19
19
  initialFocusRef?: RefObject<HTMLElement>;
20
20
  motionProps?: DialogMotionProps;
21
+ blanketMotionProps?: DialogMotionProps;
21
22
  } & SxProp;
22
23
  declare const _default: import("react").ForwardRefExoticComponent<{
23
24
  isOpen?: boolean | undefined;
@@ -26,6 +27,7 @@ declare const _default: import("react").ForwardRefExoticComponent<{
26
27
  size?: DialogSizeType | undefined;
27
28
  initialFocusRef?: RefObject<HTMLElement> | undefined;
28
29
  motionProps?: Partial<Pick<HTMLMotionProps<"div">, "transition" | "initial" | "animate" | "exit">> | undefined;
30
+ blanketMotionProps?: Partial<Pick<HTMLMotionProps<"div">, "transition" | "initial" | "animate" | "exit">> | undefined;
29
31
  } & SxProp & {
30
32
  children?: import("react").ReactNode;
31
33
  } & import("react").RefAttributes<HTMLDivElement>> & {
package/dist/index.js CHANGED
@@ -2539,24 +2539,30 @@ const Breadcrumbs = ({
2539
2539
  onClick: () => setIsExpanded(true)
2540
2540
  }, 'collapse'), ...childrenArray.slice(1 + 1 + childrenArray.length - maxItemCount)];
2541
2541
  return /*#__PURE__*/jsxRuntime.jsx(BaseBreadcrumbs, {
2542
+ "aria-label": 'Breadcrumb',
2542
2543
  ...props,
2543
- children: React.Children.map(breadcrumbsItems, child => /*#__PURE__*/jsxRuntime.jsx(BreadcrumbsItemWrapper, {
2544
- role: 'listitem',
2545
- children: child
2546
- }))
2544
+ children: /*#__PURE__*/jsxRuntime.jsx(BreadcrumbsList, {
2545
+ children: React.Children.map(breadcrumbsItems, child => /*#__PURE__*/jsxRuntime.jsx(BreadcrumbsItemWrapper, {
2546
+ children: child
2547
+ }))
2548
+ })
2547
2549
  });
2548
2550
  };
2549
2551
  const BaseBreadcrumbs = /*#__PURE__*/styled__default.default.nav.withConfig({
2550
2552
  displayName: "Breadcrumbs__BaseBreadcrumbs",
2551
2553
  componentId: "sc-1lwv2x7-0"
2552
- })(["display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;column-gap:", ";row-gap:", ";"], ({
2554
+ })([""]);
2555
+ const BreadcrumbsList = /*#__PURE__*/styled__default.default.ol.withConfig({
2556
+ displayName: "Breadcrumbs__BreadcrumbsList",
2557
+ componentId: "sc-1lwv2x7-1"
2558
+ })(["display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;list-style:none;padding:0;margin:0;column-gap:", ";row-gap:", ";"], ({
2553
2559
  theme
2554
2560
  }) => utils.forcePixelValue(theme.space[2]), ({
2555
2561
  theme
2556
2562
  }) => utils.forcePixelValue(theme.space[1]));
2557
- const BreadcrumbsItemWrapper = /*#__PURE__*/styled__default.default.span.withConfig({
2563
+ const BreadcrumbsItemWrapper = /*#__PURE__*/styled__default.default.li.withConfig({
2558
2564
  displayName: "Breadcrumbs__BreadcrumbsItemWrapper",
2559
- componentId: "sc-1lwv2x7-1"
2565
+ componentId: "sc-1lwv2x7-2"
2560
2566
  })(["display:inline-flex;&::after{content:'/';font-size:", ";font-weight:", ";line-height:", ";color:", ";margin-left:", ";}&:last-child{&::after{content:none;}}"], ({
2561
2567
  theme
2562
2568
  }) => utils.forcePixelValue(theme.fontSizes.xxs), ({
@@ -5643,6 +5649,21 @@ const DEFAULT_MOTION_PROPS = {
5643
5649
  ease: framerMotion.cubicBezier(0.5, 1, 0.89, 1)
5644
5650
  }
5645
5651
  };
5652
+ const DEFAULT_BLANKET_MOTION_PROPS = {
5653
+ initial: {
5654
+ opacity: 0
5655
+ },
5656
+ animate: {
5657
+ opacity: 1
5658
+ },
5659
+ exit: {
5660
+ opacity: 0
5661
+ },
5662
+ transition: {
5663
+ duration: 0.25,
5664
+ ease: framerMotion.cubicBezier(0.5, 1, 0.89, 1)
5665
+ }
5666
+ };
5646
5667
  const Dialog = ({
5647
5668
  children,
5648
5669
  isOpen,
@@ -5651,6 +5672,7 @@ const Dialog = ({
5651
5672
  size = 'm',
5652
5673
  initialFocusRef,
5653
5674
  motionProps,
5675
+ blanketMotionProps,
5654
5676
  sx
5655
5677
  }, ref) => {
5656
5678
  const theme = styled.useTheme();
@@ -5688,8 +5710,24 @@ const Dialog = ({
5688
5710
  }
5689
5711
  }, [isOpen, isOutsideClickDismissable, handleOutsideClick]);
5690
5712
  return /*#__PURE__*/jsxRuntime.jsx(framerMotion.AnimatePresence, {
5691
- children: isOpen ? /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
5692
- children: /*#__PURE__*/jsxRuntime.jsxs(MotionView, {
5713
+ children: isOpen ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
5714
+ children: [/*#__PURE__*/jsxRuntime.jsx(MotionView, {
5715
+ initial: blanketMotionProps?.initial ?? DEFAULT_BLANKET_MOTION_PROPS.initial,
5716
+ animate: blanketMotionProps?.animate ?? DEFAULT_BLANKET_MOTION_PROPS.animate,
5717
+ exit: blanketMotionProps?.exit ?? DEFAULT_BLANKET_MOTION_PROPS.exit,
5718
+ transition: blanketMotionProps?.transition ?? DEFAULT_BLANKET_MOTION_PROPS.transition,
5719
+ sx: {
5720
+ position: 'fixed',
5721
+ top: 0,
5722
+ right: 0,
5723
+ bottom: 0,
5724
+ left: 0,
5725
+ zIndex: 9999
5726
+ },
5727
+ children: /*#__PURE__*/jsxRuntime.jsx(Blanket$1, {
5728
+ ref: blanketRef
5729
+ })
5730
+ }), /*#__PURE__*/jsxRuntime.jsx(MotionView, {
5693
5731
  initial: motionProps?.initial ?? DEFAULT_MOTION_PROPS.initial,
5694
5732
  animate: motionProps?.animate ?? DEFAULT_MOTION_PROPS.animate,
5695
5733
  exit: motionProps?.exit ?? DEFAULT_MOTION_PROPS.exit,
@@ -5700,14 +5738,16 @@ const Dialog = ({
5700
5738
  right: 0,
5701
5739
  bottom: 0,
5702
5740
  left: 0,
5703
- zIndex: 9999
5741
+ zIndex: 9999,
5742
+ pointerEvents: 'none'
5704
5743
  },
5705
- children: [/*#__PURE__*/jsxRuntime.jsx(Blanket$1, {
5706
- ref: blanketRef
5707
- }), /*#__PURE__*/jsxRuntime.jsx(View, {
5744
+ children: /*#__PURE__*/jsxRuntime.jsx(View, {
5708
5745
  display: 'flex',
5709
5746
  width: '100%',
5710
5747
  height: '100%',
5748
+ sx: {
5749
+ pointerEvents: 'none'
5750
+ },
5711
5751
  children: /*#__PURE__*/jsxRuntime.jsxs(BaseDialog, {
5712
5752
  className: `trk-dialog--${size}`,
5713
5753
  ref: dialogRef,
@@ -5769,8 +5809,8 @@ const Dialog = ({
5769
5809
  children: children
5770
5810
  })]
5771
5811
  })
5772
- })]
5773
- })
5812
+ })
5813
+ })]
5774
5814
  }) : null
5775
5815
  });
5776
5816
  };
@@ -5793,7 +5833,8 @@ const BaseDialog = /*#__PURE__*/styled__default.default.div.withConfig({
5793
5833
  backgroundColor: theme.colors['surface'],
5794
5834
  outline: 'none',
5795
5835
  overflow: 'hidden',
5796
- margin: 'auto'
5836
+ margin: 'auto',
5837
+ pointerEvents: 'auto'
5797
5838
  }), sx);
5798
5839
  var index$8 = Object.assign( /*#__PURE__*/React.forwardRef(Dialog), {
5799
5840
  UnstyledHeader: UnstyledDialogHeader,
@@ -6830,7 +6871,7 @@ const BasePagination = /*#__PURE__*/styled__default.default.nav.withConfig({
6830
6871
  const PaginationPage = /*#__PURE__*/styled__default.default(UnstyledButton).withConfig({
6831
6872
  displayName: "Pagination__PaginationPage",
6832
6873
  componentId: "sc-1fu43y9-1"
6833
- })(["transition:background-color 100ms;height:", ";min-width:", ";border-radius:", ";padding:", ";background-color:", ";font-size:", ";font-weight:", ";line-height:", ";color:", ";", ""], utils.forcePixelValue(32), utils.forcePixelValue(32), ({
6874
+ })(["transition:background-color 100ms;display:inline-flex;align-items:center;justify-content:center;height:", ";min-width:", ";border-radius:", ";padding:", ";background-color:", ";font-size:", ";font-weight:", ";line-height:", ";color:", ";", ""], utils.forcePixelValue(32), utils.forcePixelValue(32), ({
6834
6875
  theme
6835
6876
  }) => utils.forcePixelValue(theme.radii.xs), ({
6836
6877
  theme
@@ -17,24 +17,30 @@ const Breadcrumbs = ({
17
17
  onClick: () => setIsExpanded(true)
18
18
  }, 'collapse'), ...childrenArray.slice(1 + 1 + childrenArray.length - maxItemCount)];
19
19
  return /*#__PURE__*/jsx(BaseBreadcrumbs, {
20
+ "aria-label": 'Breadcrumb',
20
21
  ...props,
21
- children: Children.map(breadcrumbsItems, child => /*#__PURE__*/jsx(BreadcrumbsItemWrapper, {
22
- role: 'listitem',
23
- children: child
24
- }))
22
+ children: /*#__PURE__*/jsx(BreadcrumbsList, {
23
+ children: Children.map(breadcrumbsItems, child => /*#__PURE__*/jsx(BreadcrumbsItemWrapper, {
24
+ children: child
25
+ }))
26
+ })
25
27
  });
26
28
  };
27
29
  const BaseBreadcrumbs = /*#__PURE__*/styled.nav.withConfig({
28
30
  displayName: "Breadcrumbs__BaseBreadcrumbs",
29
31
  componentId: "sc-1lwv2x7-0"
30
- })(["display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;column-gap:", ";row-gap:", ";"], ({
32
+ })([""]);
33
+ const BreadcrumbsList = /*#__PURE__*/styled.ol.withConfig({
34
+ displayName: "Breadcrumbs__BreadcrumbsList",
35
+ componentId: "sc-1lwv2x7-1"
36
+ })(["display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;list-style:none;padding:0;margin:0;column-gap:", ";row-gap:", ";"], ({
31
37
  theme
32
38
  }) => forcePixelValue(theme.space[2]), ({
33
39
  theme
34
40
  }) => forcePixelValue(theme.space[1]));
35
- const BreadcrumbsItemWrapper = /*#__PURE__*/styled.span.withConfig({
41
+ const BreadcrumbsItemWrapper = /*#__PURE__*/styled.li.withConfig({
36
42
  displayName: "Breadcrumbs__BreadcrumbsItemWrapper",
37
- componentId: "sc-1lwv2x7-1"
43
+ componentId: "sc-1lwv2x7-2"
38
44
  })(["display:inline-flex;&::after{content:'/';font-size:", ";font-weight:", ";line-height:", ";color:", ";margin-left:", ";}&:last-child{&::after{content:none;}}"], ({
39
45
  theme
40
46
  }) => forcePixelValue(theme.fontSizes.xxs), ({
@@ -17,7 +17,7 @@ import DialogHeaderTitle from './DialogHeaderTitle.js';
17
17
  import UnstyledDialogBody from './_UnstyledDialogBody.js';
18
18
  import UnstyledDialogFooter from './_UnstyledDialogFooter.js';
19
19
  import UnstyledDialogHeader from './_UnstyledDialogHeader.js';
20
- import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
20
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
21
21
 
22
22
  const DEFAULT_MOTION_PROPS = {
23
23
  initial: {
@@ -40,6 +40,21 @@ const DEFAULT_MOTION_PROPS = {
40
40
  ease: cubicBezier(0.5, 1, 0.89, 1)
41
41
  }
42
42
  };
43
+ const DEFAULT_BLANKET_MOTION_PROPS = {
44
+ initial: {
45
+ opacity: 0
46
+ },
47
+ animate: {
48
+ opacity: 1
49
+ },
50
+ exit: {
51
+ opacity: 0
52
+ },
53
+ transition: {
54
+ duration: 0.25,
55
+ ease: cubicBezier(0.5, 1, 0.89, 1)
56
+ }
57
+ };
43
58
  const Dialog = ({
44
59
  children,
45
60
  isOpen,
@@ -48,6 +63,7 @@ const Dialog = ({
48
63
  size = 'm',
49
64
  initialFocusRef,
50
65
  motionProps,
66
+ blanketMotionProps,
51
67
  sx
52
68
  }, ref) => {
53
69
  const theme = useTheme();
@@ -85,8 +101,24 @@ const Dialog = ({
85
101
  }
86
102
  }, [isOpen, isOutsideClickDismissable, handleOutsideClick]);
87
103
  return /*#__PURE__*/jsx(AnimatePresence, {
88
- children: isOpen ? /*#__PURE__*/jsx(Fragment, {
89
- children: /*#__PURE__*/jsxs(MotionView, {
104
+ children: isOpen ? /*#__PURE__*/jsxs(Fragment, {
105
+ children: [/*#__PURE__*/jsx(MotionView, {
106
+ initial: blanketMotionProps?.initial ?? DEFAULT_BLANKET_MOTION_PROPS.initial,
107
+ animate: blanketMotionProps?.animate ?? DEFAULT_BLANKET_MOTION_PROPS.animate,
108
+ exit: blanketMotionProps?.exit ?? DEFAULT_BLANKET_MOTION_PROPS.exit,
109
+ transition: blanketMotionProps?.transition ?? DEFAULT_BLANKET_MOTION_PROPS.transition,
110
+ sx: {
111
+ position: 'fixed',
112
+ top: 0,
113
+ right: 0,
114
+ bottom: 0,
115
+ left: 0,
116
+ zIndex: 9999
117
+ },
118
+ children: /*#__PURE__*/jsx(Blanket, {
119
+ ref: blanketRef
120
+ })
121
+ }), /*#__PURE__*/jsx(MotionView, {
90
122
  initial: motionProps?.initial ?? DEFAULT_MOTION_PROPS.initial,
91
123
  animate: motionProps?.animate ?? DEFAULT_MOTION_PROPS.animate,
92
124
  exit: motionProps?.exit ?? DEFAULT_MOTION_PROPS.exit,
@@ -97,14 +129,16 @@ const Dialog = ({
97
129
  right: 0,
98
130
  bottom: 0,
99
131
  left: 0,
100
- zIndex: 9999
132
+ zIndex: 9999,
133
+ pointerEvents: 'none'
101
134
  },
102
- children: [/*#__PURE__*/jsx(Blanket, {
103
- ref: blanketRef
104
- }), /*#__PURE__*/jsx(View, {
135
+ children: /*#__PURE__*/jsx(View, {
105
136
  display: 'flex',
106
137
  width: '100%',
107
138
  height: '100%',
139
+ sx: {
140
+ pointerEvents: 'none'
141
+ },
108
142
  children: /*#__PURE__*/jsxs(BaseDialog, {
109
143
  className: `trk-dialog--${size}`,
110
144
  ref: dialogRef,
@@ -166,8 +200,8 @@ const Dialog = ({
166
200
  children: children
167
201
  })]
168
202
  })
169
- })]
170
- })
203
+ })
204
+ })]
171
205
  }) : null
172
206
  });
173
207
  };
@@ -190,7 +224,8 @@ const BaseDialog = /*#__PURE__*/styled.div.withConfig({
190
224
  backgroundColor: theme.colors['surface'],
191
225
  outline: 'none',
192
226
  overflow: 'hidden',
193
- margin: 'auto'
227
+ margin: 'auto',
228
+ pointerEvents: 'auto'
194
229
  }), sx);
195
230
  var index = Object.assign( /*#__PURE__*/forwardRef(Dialog), {
196
231
  UnstyledHeader: UnstyledDialogHeader,
@@ -132,7 +132,7 @@ const BasePagination = /*#__PURE__*/styled.nav.withConfig({
132
132
  const PaginationPage = /*#__PURE__*/styled(UnstyledButton).withConfig({
133
133
  displayName: "Pagination__PaginationPage",
134
134
  componentId: "sc-1fu43y9-1"
135
- })(["transition:background-color 100ms;height:", ";min-width:", ";border-radius:", ";padding:", ";background-color:", ";font-size:", ";font-weight:", ";line-height:", ";color:", ";", ""], forcePixelValue(32), forcePixelValue(32), ({
135
+ })(["transition:background-color 100ms;display:inline-flex;align-items:center;justify-content:center;height:", ";min-width:", ";border-radius:", ";padding:", ";background-color:", ";font-size:", ";font-weight:", ";line-height:", ";color:", ";", ""], forcePixelValue(32), forcePixelValue(32), ({
136
136
  theme
137
137
  }) => forcePixelValue(theme.radii.xs), ({
138
138
  theme
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamturing/react-kit",
3
- "version": "2.72.0",
3
+ "version": "2.73.1",
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": "edc5ac0a6961a8ee1a543659662dcfd8b2e4980f"
68
+ "gitHead": "2a6718f0fbab9a0110acf4ec944271a40521b9b2"
69
69
  }