@teamturing/react-kit 2.68.0 → 2.69.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.
@@ -1,16 +1,17 @@
1
1
  import { SpaceKey } from '@teamturing/token-studio';
2
2
  import { PropsWithChildren, RefObject } from 'react';
3
3
  import { ResponsiveValue } from 'styled-system';
4
+ import { SxProp } from '../../utils/styled-system';
4
5
  type Props = {
5
6
  variant?: 'plain' | 'outlined' | 'underline';
6
7
  size?: ResponsiveValue<'l' | 'm' | 's'>;
7
8
  gap?: ResponsiveValue<SpaceKey>;
8
- };
9
+ } & SxProp;
9
10
  type TabContextValue = {
10
11
  containerRef?: RefObject<HTMLElement>;
11
12
  } & Props;
12
13
  declare const TabContext: import("react").Context<TabContextValue>;
13
- declare const _default: (({ variant, size, gap, children }: PropsWithChildren<Props>) => import("react/jsx-runtime").JSX.Element) & {
14
+ declare const _default: (({ variant, size, gap, sx, children }: PropsWithChildren<Props>) => import("react/jsx-runtime").JSX.Element) & {
14
15
  Item: ({ children, leadingIcon: LeadingIcon, selected, onClick, size: propSize, variant: propVariant, }: PropsWithChildren<import("./TabItem").TabItemProps>) => import("react/jsx-runtime").JSX.Element;
15
16
  };
16
17
  export default _default;
package/dist/index.js CHANGED
@@ -7072,6 +7072,7 @@ const TabItem = ({
7072
7072
  onClick?.(e);
7073
7073
  };
7074
7074
  return /*#__PURE__*/jsxRuntime.jsx(BaseTabItem, {
7075
+ className: 'trk-tab_item',
7075
7076
  type: 'button',
7076
7077
  role: 'tab',
7077
7078
  ref: ref,
@@ -7081,6 +7082,7 @@ const TabItem = ({
7081
7082
  selected: selected,
7082
7083
  onClick: handleClick,
7083
7084
  children: /*#__PURE__*/jsxRuntime.jsxs(View, {
7085
+ className: 'trk-tab_item__content',
7084
7086
  sx: {
7085
7087
  display: 'flex',
7086
7088
  flexDirection: 'row',
@@ -7089,6 +7091,7 @@ const TabItem = ({
7089
7091
  columnGap: 1
7090
7092
  },
7091
7093
  children: [LeadingIcon ? /*#__PURE__*/jsxRuntime.jsx(LeadingIcon, {}) : null, /*#__PURE__*/jsxRuntime.jsx(View, {
7094
+ className: 'trk-tab_item__label',
7092
7095
  children: children
7093
7096
  })]
7094
7097
  })
@@ -7258,6 +7261,7 @@ const Tab = ({
7258
7261
  variant = 'plain',
7259
7262
  size = 'm',
7260
7263
  gap = 2,
7264
+ sx,
7261
7265
  children
7262
7266
  }) => {
7263
7267
  const theme = styled.useTheme();
@@ -7299,8 +7303,11 @@ const Tab = ({
7299
7303
  containerRef: rootRef
7300
7304
  },
7301
7305
  children: /*#__PURE__*/jsxRuntime.jsxs(View, {
7306
+ className: 'trk-tab__wrapper',
7302
7307
  position: 'relative',
7308
+ sx: sx,
7303
7309
  children: [/*#__PURE__*/jsxRuntime.jsx(View, {
7310
+ className: 'trk-tab__list',
7304
7311
  ref: rootRef,
7305
7312
  role: 'tablist',
7306
7313
  sx: {
@@ -7318,9 +7325,11 @@ const Tab = ({
7318
7325
  onScroll: throttle__default.default(handleScrollButtonVisibility, 150),
7319
7326
  children: children
7320
7327
  }), /*#__PURE__*/jsxRuntime.jsxs(View, {
7328
+ className: 'trk-tab__navigation',
7321
7329
  display: ['none', 'initial', 'initial'],
7322
7330
  children: [isLeftButtonVisible ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
7323
7331
  children: [/*#__PURE__*/jsxRuntime.jsx(View, {
7332
+ className: 'trk-tab__left_gradient',
7324
7333
  sx: {
7325
7334
  position: 'absolute',
7326
7335
  top: 0,
@@ -7332,6 +7341,7 @@ const Tab = ({
7332
7341
  pointerEvents: 'none'
7333
7342
  }
7334
7343
  }), /*#__PURE__*/jsxRuntime.jsx(View, {
7344
+ className: 'trk-tab__left_button',
7335
7345
  sx: {
7336
7346
  position: 'absolute',
7337
7347
  display: 'flex',
@@ -7350,6 +7360,7 @@ const Tab = ({
7350
7360
  })]
7351
7361
  }) : null, isRightButtonVisible ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
7352
7362
  children: [/*#__PURE__*/jsxRuntime.jsx(View, {
7363
+ className: 'trk-tab__right_gradient',
7353
7364
  sx: {
7354
7365
  position: 'absolute',
7355
7366
  top: 0,
@@ -7361,6 +7372,7 @@ const Tab = ({
7361
7372
  pointerEvents: 'none'
7362
7373
  }
7363
7374
  }), /*#__PURE__*/jsxRuntime.jsx(View, {
7375
+ className: 'trk-tab__right_button',
7364
7376
  sx: {
7365
7377
  position: 'absolute',
7366
7378
  display: 'flex',
@@ -38,6 +38,7 @@ const TabItem = ({
38
38
  onClick?.(e);
39
39
  };
40
40
  return /*#__PURE__*/jsx(BaseTabItem, {
41
+ className: 'trk-tab_item',
41
42
  type: 'button',
42
43
  role: 'tab',
43
44
  ref: ref,
@@ -47,6 +48,7 @@ const TabItem = ({
47
48
  selected: selected,
48
49
  onClick: handleClick,
49
50
  children: /*#__PURE__*/jsxs(View, {
51
+ className: 'trk-tab_item__content',
50
52
  sx: {
51
53
  display: 'flex',
52
54
  flexDirection: 'row',
@@ -55,6 +57,7 @@ const TabItem = ({
55
57
  columnGap: 1
56
58
  },
57
59
  children: [LeadingIcon ? /*#__PURE__*/jsx(LeadingIcon, {}) : null, /*#__PURE__*/jsx(View, {
60
+ className: 'trk-tab_item__label',
58
61
  children: children
59
62
  })]
60
63
  })
@@ -14,6 +14,7 @@ const Tab = ({
14
14
  variant = 'plain',
15
15
  size = 'm',
16
16
  gap = 2,
17
+ sx,
17
18
  children
18
19
  }) => {
19
20
  const theme = useTheme();
@@ -55,8 +56,11 @@ const Tab = ({
55
56
  containerRef: rootRef
56
57
  },
57
58
  children: /*#__PURE__*/jsxs(View, {
59
+ className: 'trk-tab__wrapper',
58
60
  position: 'relative',
61
+ sx: sx,
59
62
  children: [/*#__PURE__*/jsx(View, {
63
+ className: 'trk-tab__list',
60
64
  ref: rootRef,
61
65
  role: 'tablist',
62
66
  sx: {
@@ -74,9 +78,11 @@ const Tab = ({
74
78
  onScroll: throttle(handleScrollButtonVisibility, 150),
75
79
  children: children
76
80
  }), /*#__PURE__*/jsxs(View, {
81
+ className: 'trk-tab__navigation',
77
82
  display: ['none', 'initial', 'initial'],
78
83
  children: [isLeftButtonVisible ? /*#__PURE__*/jsxs(Fragment, {
79
84
  children: [/*#__PURE__*/jsx(View, {
85
+ className: 'trk-tab__left_gradient',
80
86
  sx: {
81
87
  position: 'absolute',
82
88
  top: 0,
@@ -88,6 +94,7 @@ const Tab = ({
88
94
  pointerEvents: 'none'
89
95
  }
90
96
  }), /*#__PURE__*/jsx(View, {
97
+ className: 'trk-tab__left_button',
91
98
  sx: {
92
99
  position: 'absolute',
93
100
  display: 'flex',
@@ -106,6 +113,7 @@ const Tab = ({
106
113
  })]
107
114
  }) : null, isRightButtonVisible ? /*#__PURE__*/jsxs(Fragment, {
108
115
  children: [/*#__PURE__*/jsx(View, {
116
+ className: 'trk-tab__right_gradient',
109
117
  sx: {
110
118
  position: 'absolute',
111
119
  top: 0,
@@ -117,6 +125,7 @@ const Tab = ({
117
125
  pointerEvents: 'none'
118
126
  }
119
127
  }), /*#__PURE__*/jsx(View, {
128
+ className: 'trk-tab__right_button',
120
129
  sx: {
121
130
  position: 'absolute',
122
131
  display: 'flex',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamturing/react-kit",
3
- "version": "2.68.0",
3
+ "version": "2.69.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",
@@ -55,7 +55,7 @@
55
55
  "dependencies": {
56
56
  "@floating-ui/react": "^0.27.16",
57
57
  "@primer/behaviors": "^1.3.6",
58
- "@teamturing/icons": "^1.73.0",
58
+ "@teamturing/icons": "^1.73.1",
59
59
  "@teamturing/token-studio": "^1.16.4",
60
60
  "@teamturing/utils": "^1.6.1",
61
61
  "framer-motion": "^10.16.4",
@@ -65,5 +65,5 @@
65
65
  "react-textarea-autosize": "^8.5.3",
66
66
  "styled-system": "^5.1.5"
67
67
  },
68
- "gitHead": "367ba22b7504f2ac19a89ca49cf5deeeb8034592"
68
+ "gitHead": "224e16d81f6eadc1fb028ee5c875c42f5d23f325"
69
69
  }