@teamturing/react-kit 2.53.0 → 2.53.2
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.
- package/dist/core/Dialog/_UnstyledDialogBody.d.ts +270 -1
- package/dist/core/Dialog/_UnstyledDialogFooter.d.ts +270 -1
- package/dist/core/Dialog/_UnstyledDialogHeader.d.ts +270 -1
- package/dist/core/Dialog/index.d.ts +810 -3
- package/dist/core/Drawer/_UnstyledDrawerBody.d.ts +270 -1
- package/dist/core/Drawer/_UnstyledDrawerFooter.d.ts +270 -1
- package/dist/core/Drawer/_UnstyledDrawerHeader.d.ts +270 -1
- package/dist/core/Drawer/index.d.ts +810 -3
- package/dist/index.js +36 -10
- package/esm/core/Dialog/DialogHeaderSubtitle.js +1 -0
- package/esm/core/Dialog/DialogHeaderTitle.js +1 -0
- package/esm/core/Dialog/_UnstyledDialogBody.js +3 -1
- package/esm/core/Dialog/_UnstyledDialogFooter.js +3 -1
- package/esm/core/Dialog/_UnstyledDialogHeader.js +3 -1
- package/esm/core/Dialog/index.js +2 -0
- package/esm/core/Drawer/_UnstyledDrawerBody.js +3 -1
- package/esm/core/Drawer/_UnstyledDrawerFooter.js +3 -1
- package/esm/core/Drawer/_UnstyledDrawerHeader.js +3 -1
- package/esm/core/Drawer/index.js +2 -0
- package/esm/core/FileItem/index.js +12 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4023,7 +4023,9 @@ const BaseIconButton = styled__default.default(UnstyledButton)(({
|
|
|
4023
4023
|
|
|
4024
4024
|
const MotionView = framerMotion.motion(View);
|
|
4025
4025
|
|
|
4026
|
-
const UnstyledDialogBody = styled__default.default.div
|
|
4026
|
+
const UnstyledDialogBody = styled__default.default.div.attrs({
|
|
4027
|
+
className: 'trk-dialog_body'
|
|
4028
|
+
})`
|
|
4027
4029
|
flex-grow: 1;
|
|
4028
4030
|
flex-shrink: 1;
|
|
4029
4031
|
flex-basis: auto;
|
|
@@ -4045,7 +4047,9 @@ const DialogBody = ({
|
|
|
4045
4047
|
children: children
|
|
4046
4048
|
});
|
|
4047
4049
|
|
|
4048
|
-
const UnstyledDialogFooter = styled__default.default.div
|
|
4050
|
+
const UnstyledDialogFooter = styled__default.default.div.attrs({
|
|
4051
|
+
className: 'trk-dialog_footer'
|
|
4052
|
+
})`
|
|
4049
4053
|
flex-grow: 0;
|
|
4050
4054
|
flex-shrink: 0;
|
|
4051
4055
|
flex-basis: auto;
|
|
@@ -4076,7 +4080,9 @@ const DialogFooter = ({
|
|
|
4076
4080
|
children: children
|
|
4077
4081
|
});
|
|
4078
4082
|
|
|
4079
|
-
const UnstyledDialogHeader = styled__default.default.div
|
|
4083
|
+
const UnstyledDialogHeader = styled__default.default.div.attrs({
|
|
4084
|
+
className: 'trk-dialog_header'
|
|
4085
|
+
})`
|
|
4080
4086
|
flex-grow: 0;
|
|
4081
4087
|
flex-shrink: 0;
|
|
4082
4088
|
flex-basis: auto;
|
|
@@ -4106,6 +4112,7 @@ const DialogHeaderSubtitle = ({
|
|
|
4106
4112
|
color = 'text/neutral/subtler',
|
|
4107
4113
|
...props
|
|
4108
4114
|
}) => /*#__PURE__*/jsxRuntime.jsx(Text, {
|
|
4115
|
+
className: 'trk-dialog_header_subtitle',
|
|
4109
4116
|
typography: typography,
|
|
4110
4117
|
color: color,
|
|
4111
4118
|
...props
|
|
@@ -4116,6 +4123,7 @@ const DialogHeaderTitle = ({
|
|
|
4116
4123
|
color = 'text/neutral',
|
|
4117
4124
|
...props
|
|
4118
4125
|
}) => /*#__PURE__*/jsxRuntime.jsx(Text, {
|
|
4126
|
+
className: 'trk-dialog_header_title',
|
|
4119
4127
|
typography: typography,
|
|
4120
4128
|
color: color,
|
|
4121
4129
|
...props
|
|
@@ -4198,6 +4206,7 @@ const Dialog = ({
|
|
|
4198
4206
|
width: '100%',
|
|
4199
4207
|
height: '100%',
|
|
4200
4208
|
children: /*#__PURE__*/jsxRuntime.jsxs(BaseDialog, {
|
|
4209
|
+
className: `rkt-dialog--${size}`,
|
|
4201
4210
|
ref: dialogRef,
|
|
4202
4211
|
"aria-modal": 'true',
|
|
4203
4212
|
role: 'dialog',
|
|
@@ -4242,6 +4251,7 @@ const Dialog = ({
|
|
|
4242
4251
|
right: 3
|
|
4243
4252
|
},
|
|
4244
4253
|
children: /*#__PURE__*/jsxRuntime.jsx(IconButton, {
|
|
4254
|
+
className: 'trk-dialog__close_button',
|
|
4245
4255
|
ref: closeButtonRef,
|
|
4246
4256
|
icon: icons.CloseIcon,
|
|
4247
4257
|
variant: 'plain',
|
|
@@ -4293,7 +4303,9 @@ var index$8 = Object.assign( /*#__PURE__*/React.forwardRef(Dialog), {
|
|
|
4293
4303
|
Footer: DialogFooter
|
|
4294
4304
|
});
|
|
4295
4305
|
|
|
4296
|
-
const UnstyledDrawerBody = styled__default.default.div
|
|
4306
|
+
const UnstyledDrawerBody = styled__default.default.div.attrs({
|
|
4307
|
+
className: 'trk-drawer_body'
|
|
4308
|
+
})`
|
|
4297
4309
|
flex-grow: 1;
|
|
4298
4310
|
flex-shrink: 1;
|
|
4299
4311
|
flex-basis: auto;
|
|
@@ -4315,7 +4327,9 @@ const DrawerBody = ({
|
|
|
4315
4327
|
children: children
|
|
4316
4328
|
});
|
|
4317
4329
|
|
|
4318
|
-
const UnstyledDrawerFooter = styled__default.default.div
|
|
4330
|
+
const UnstyledDrawerFooter = styled__default.default.div.attrs({
|
|
4331
|
+
className: 'trk-drawer_footer'
|
|
4332
|
+
})`
|
|
4319
4333
|
flex-grow: 0;
|
|
4320
4334
|
flex-shrink: 0;
|
|
4321
4335
|
flex-basis: auto;
|
|
@@ -4346,7 +4360,9 @@ const DrawerFooter = ({
|
|
|
4346
4360
|
children: children
|
|
4347
4361
|
});
|
|
4348
4362
|
|
|
4349
|
-
const UnstyledDrawerHeader = styled__default.default.div
|
|
4363
|
+
const UnstyledDrawerHeader = styled__default.default.div.attrs({
|
|
4364
|
+
className: 'trk-drawer_header'
|
|
4365
|
+
})`
|
|
4350
4366
|
flex-grow: 0;
|
|
4351
4367
|
flex-shrink: 0;
|
|
4352
4368
|
flex-basis: auto;
|
|
@@ -4498,6 +4514,7 @@ const Drawer = ({
|
|
|
4498
4514
|
} : {})
|
|
4499
4515
|
},
|
|
4500
4516
|
children: /*#__PURE__*/jsxRuntime.jsxs(BaseDrawer, {
|
|
4517
|
+
className: `trk-drawer--${size}`,
|
|
4501
4518
|
ref: drawerRef,
|
|
4502
4519
|
"aria-modal": 'true',
|
|
4503
4520
|
role: 'dialog',
|
|
@@ -4513,6 +4530,7 @@ const Drawer = ({
|
|
|
4513
4530
|
right: 5
|
|
4514
4531
|
},
|
|
4515
4532
|
children: /*#__PURE__*/jsxRuntime.jsx(IconButton, {
|
|
4533
|
+
className: 'trk-drawer__close_button',
|
|
4516
4534
|
ref: closeButtonRef,
|
|
4517
4535
|
icon: icons.CloseIcon,
|
|
4518
4536
|
variant: 'plain-bold',
|
|
@@ -4730,11 +4748,12 @@ const FileItem = ({
|
|
|
4730
4748
|
const FileIcon = fileType === 'image' ? icons.PictureIcon : fileType === 'video' ? icons.VideoIcon : icons.DocumentIcon;
|
|
4731
4749
|
const [objectUrl, setObjectUrl] = React.useState('');
|
|
4732
4750
|
React.useEffect(() => {
|
|
4733
|
-
|
|
4751
|
+
const url = URL.createObjectURL(file);
|
|
4752
|
+
setObjectUrl(url);
|
|
4734
4753
|
return () => {
|
|
4735
|
-
URL.revokeObjectURL(
|
|
4754
|
+
URL.revokeObjectURL(url);
|
|
4736
4755
|
};
|
|
4737
|
-
}, []);
|
|
4756
|
+
}, [file]);
|
|
4738
4757
|
return /*#__PURE__*/jsxRuntime.jsx(BaseFile, {
|
|
4739
4758
|
variant: variant,
|
|
4740
4759
|
disabled: disabled,
|
|
@@ -4754,7 +4773,9 @@ const FileItem = ({
|
|
|
4754
4773
|
height: 24
|
|
4755
4774
|
}) : null, trailingAction]
|
|
4756
4775
|
}) : variant === 'thumbnail' ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4757
|
-
children: [
|
|
4776
|
+
children: [!objectUrl ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
4777
|
+
className: 'file__thumbnail__empty'
|
|
4778
|
+
}) : fileType === 'image' ? /*#__PURE__*/jsxRuntime.jsx("img", {
|
|
4758
4779
|
src: objectUrl
|
|
4759
4780
|
}) : fileType === 'video' ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4760
4781
|
className: 'file__thumbnail__video',
|
|
@@ -4856,6 +4877,11 @@ const BaseFile = styled__default.default.div({
|
|
|
4856
4877
|
pointerEvents: 'none',
|
|
4857
4878
|
backgroundColor: 'bg/neutral'
|
|
4858
4879
|
},
|
|
4880
|
+
'& > .file__thumbnail__empty': {
|
|
4881
|
+
width: '100%',
|
|
4882
|
+
height: '100%',
|
|
4883
|
+
backgroundColor: 'bg/neutral'
|
|
4884
|
+
},
|
|
4859
4885
|
'& > img': {
|
|
4860
4886
|
width: '100%',
|
|
4861
4887
|
height: '100%',
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { sx } from '../../utils/styled-system/index.js';
|
|
3
3
|
|
|
4
|
-
const UnstyledDialogBody = styled.div
|
|
4
|
+
const UnstyledDialogBody = styled.div.attrs({
|
|
5
|
+
className: 'trk-dialog_body'
|
|
6
|
+
})`
|
|
5
7
|
flex-grow: 1;
|
|
6
8
|
flex-shrink: 1;
|
|
7
9
|
flex-basis: auto;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { sx } from '../../utils/styled-system/index.js';
|
|
3
3
|
|
|
4
|
-
const UnstyledDialogFooter = styled.div
|
|
4
|
+
const UnstyledDialogFooter = styled.div.attrs({
|
|
5
|
+
className: 'trk-dialog_footer'
|
|
6
|
+
})`
|
|
5
7
|
flex-grow: 0;
|
|
6
8
|
flex-shrink: 0;
|
|
7
9
|
flex-basis: auto;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { sx } from '../../utils/styled-system/index.js';
|
|
3
3
|
|
|
4
|
-
const UnstyledDialogHeader = styled.div
|
|
4
|
+
const UnstyledDialogHeader = styled.div.attrs({
|
|
5
|
+
className: 'trk-dialog_header'
|
|
6
|
+
})`
|
|
5
7
|
flex-grow: 0;
|
|
6
8
|
flex-shrink: 0;
|
|
7
9
|
flex-basis: auto;
|
package/esm/core/Dialog/index.js
CHANGED
|
@@ -94,6 +94,7 @@ const Dialog = ({
|
|
|
94
94
|
width: '100%',
|
|
95
95
|
height: '100%',
|
|
96
96
|
children: /*#__PURE__*/jsxs(BaseDialog, {
|
|
97
|
+
className: `rkt-dialog--${size}`,
|
|
97
98
|
ref: dialogRef,
|
|
98
99
|
"aria-modal": 'true',
|
|
99
100
|
role: 'dialog',
|
|
@@ -138,6 +139,7 @@ const Dialog = ({
|
|
|
138
139
|
right: 3
|
|
139
140
|
},
|
|
140
141
|
children: /*#__PURE__*/jsx(IconButton, {
|
|
142
|
+
className: 'trk-dialog__close_button',
|
|
141
143
|
ref: closeButtonRef,
|
|
142
144
|
icon: CloseIcon,
|
|
143
145
|
variant: 'plain',
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { sx } from '../../utils/styled-system/index.js';
|
|
3
3
|
|
|
4
|
-
const UnstyledDrawerBody = styled.div
|
|
4
|
+
const UnstyledDrawerBody = styled.div.attrs({
|
|
5
|
+
className: 'trk-drawer_body'
|
|
6
|
+
})`
|
|
5
7
|
flex-grow: 1;
|
|
6
8
|
flex-shrink: 1;
|
|
7
9
|
flex-basis: auto;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { sx } from '../../utils/styled-system/index.js';
|
|
3
3
|
|
|
4
|
-
const UnstyledDrawerFooter = styled.div
|
|
4
|
+
const UnstyledDrawerFooter = styled.div.attrs({
|
|
5
|
+
className: 'trk-drawer_footer'
|
|
6
|
+
})`
|
|
5
7
|
flex-grow: 0;
|
|
6
8
|
flex-shrink: 0;
|
|
7
9
|
flex-basis: auto;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { sx } from '../../utils/styled-system/index.js';
|
|
3
3
|
|
|
4
|
-
const UnstyledDrawerHeader = styled.div
|
|
4
|
+
const UnstyledDrawerHeader = styled.div.attrs({
|
|
5
|
+
className: 'trk-drawer_header'
|
|
6
|
+
})`
|
|
5
7
|
flex-grow: 0;
|
|
6
8
|
flex-shrink: 0;
|
|
7
9
|
flex-basis: auto;
|
package/esm/core/Drawer/index.js
CHANGED
|
@@ -129,6 +129,7 @@ const Drawer = ({
|
|
|
129
129
|
} : {})
|
|
130
130
|
},
|
|
131
131
|
children: /*#__PURE__*/jsxs(BaseDrawer, {
|
|
132
|
+
className: `trk-drawer--${size}`,
|
|
132
133
|
ref: drawerRef,
|
|
133
134
|
"aria-modal": 'true',
|
|
134
135
|
role: 'dialog',
|
|
@@ -144,6 +145,7 @@ const Drawer = ({
|
|
|
144
145
|
right: 5
|
|
145
146
|
},
|
|
146
147
|
children: /*#__PURE__*/jsx(IconButton, {
|
|
148
|
+
className: 'trk-drawer__close_button',
|
|
147
149
|
ref: closeButtonRef,
|
|
148
150
|
icon: CloseIcon,
|
|
149
151
|
variant: 'plain-bold',
|
|
@@ -23,11 +23,12 @@ const FileItem = ({
|
|
|
23
23
|
const FileIcon = fileType === 'image' ? PictureIcon : fileType === 'video' ? VideoIcon : DocumentIcon;
|
|
24
24
|
const [objectUrl, setObjectUrl] = useState('');
|
|
25
25
|
useEffect(() => {
|
|
26
|
-
|
|
26
|
+
const url = URL.createObjectURL(file);
|
|
27
|
+
setObjectUrl(url);
|
|
27
28
|
return () => {
|
|
28
|
-
URL.revokeObjectURL(
|
|
29
|
+
URL.revokeObjectURL(url);
|
|
29
30
|
};
|
|
30
|
-
}, []);
|
|
31
|
+
}, [file]);
|
|
31
32
|
return /*#__PURE__*/jsx(BaseFile, {
|
|
32
33
|
variant: variant,
|
|
33
34
|
disabled: disabled,
|
|
@@ -47,7 +48,9 @@ const FileItem = ({
|
|
|
47
48
|
height: 24
|
|
48
49
|
}) : null, trailingAction]
|
|
49
50
|
}) : variant === 'thumbnail' ? /*#__PURE__*/jsxs(Fragment, {
|
|
50
|
-
children: [
|
|
51
|
+
children: [!objectUrl ? /*#__PURE__*/jsx("div", {
|
|
52
|
+
className: 'file__thumbnail__empty'
|
|
53
|
+
}) : fileType === 'image' ? /*#__PURE__*/jsx("img", {
|
|
51
54
|
src: objectUrl
|
|
52
55
|
}) : fileType === 'video' ? /*#__PURE__*/jsxs("div", {
|
|
53
56
|
className: 'file__thumbnail__video',
|
|
@@ -149,6 +152,11 @@ const BaseFile = styled.div({
|
|
|
149
152
|
pointerEvents: 'none',
|
|
150
153
|
backgroundColor: 'bg/neutral'
|
|
151
154
|
},
|
|
155
|
+
'& > .file__thumbnail__empty': {
|
|
156
|
+
width: '100%',
|
|
157
|
+
height: '100%',
|
|
158
|
+
backgroundColor: 'bg/neutral'
|
|
159
|
+
},
|
|
152
160
|
'& > img': {
|
|
153
161
|
width: '100%',
|
|
154
162
|
height: '100%',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamturing/react-kit",
|
|
3
|
-
"version": "2.53.
|
|
3
|
+
"version": "2.53.2",
|
|
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": "
|
|
69
|
+
"gitHead": "38ac054ca771d2974d3b1ec8bbbc4c22094d8b52"
|
|
70
70
|
}
|