@teamturing/react-kit 2.58.4 → 2.59.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.
package/dist/index.js
CHANGED
|
@@ -11,7 +11,6 @@ var utils$1 = require('@primer/behaviors/utils');
|
|
|
11
11
|
var react = require('@floating-ui/react');
|
|
12
12
|
var behaviors = require('@primer/behaviors');
|
|
13
13
|
var debounce = require('lodash.debounce');
|
|
14
|
-
var toArray = require('lodash.toarray');
|
|
15
14
|
var ReactTextareaAutosize = require('react-textarea-autosize');
|
|
16
15
|
var reactKit = require('@teamturing/react-kit');
|
|
17
16
|
var throttle = require('lodash.throttle');
|
|
@@ -41,7 +40,6 @@ var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
|
41
40
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
42
41
|
var icons__namespace = /*#__PURE__*/_interopNamespace(icons);
|
|
43
42
|
var debounce__default = /*#__PURE__*/_interopDefault(debounce);
|
|
44
|
-
var toArray__default = /*#__PURE__*/_interopDefault(toArray);
|
|
45
43
|
var ReactTextareaAutosize__default = /*#__PURE__*/_interopDefault(ReactTextareaAutosize);
|
|
46
44
|
var throttle__default = /*#__PURE__*/_interopDefault(throttle);
|
|
47
45
|
|
|
@@ -4527,17 +4525,14 @@ const Textarea = /*#__PURE__*/React.forwardRef(({
|
|
|
4527
4525
|
const focusInput = () => {
|
|
4528
4526
|
inputRef.current?.focus();
|
|
4529
4527
|
};
|
|
4530
|
-
const getTextareaLength = value => {
|
|
4531
|
-
return toArray__default.default(value).length;
|
|
4532
|
-
};
|
|
4533
4528
|
const [count, setCount] = React.useState(0);
|
|
4534
4529
|
const handleChange = e => {
|
|
4535
|
-
setCount(
|
|
4530
|
+
setCount(utils.getGraphemeLength(e.target.value));
|
|
4536
4531
|
props.onChange?.(e);
|
|
4537
4532
|
};
|
|
4538
4533
|
React.useEffect(() => {
|
|
4539
4534
|
if (inputRef.current) {
|
|
4540
|
-
setCount(
|
|
4535
|
+
setCount(utils.getGraphemeLength(inputRef.current.value));
|
|
4541
4536
|
}
|
|
4542
4537
|
}, [ref]);
|
|
4543
4538
|
return /*#__PURE__*/jsxRuntime.jsxs(TextareaWrapper, {
|
|
@@ -6400,7 +6395,7 @@ const Dialog = ({
|
|
|
6400
6395
|
className: 'trk-dialog__close_button',
|
|
6401
6396
|
ref: closeButtonRef,
|
|
6402
6397
|
icon: icons.CloseIcon,
|
|
6403
|
-
variant: 'plain',
|
|
6398
|
+
variant: 'plain-bold',
|
|
6404
6399
|
size: 'm',
|
|
6405
6400
|
onClick: handleDismiss
|
|
6406
6401
|
})
|
package/esm/core/Dialog/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { forcePixelValue, isFunction, commaizeNumber } from '@teamturing/utils';
|
|
2
|
-
import toArray from 'lodash.toarray';
|
|
1
|
+
import { forcePixelValue, getGraphemeLength, isFunction, commaizeNumber } from '@teamturing/utils';
|
|
3
2
|
import { forwardRef, useState, useEffect } from 'react';
|
|
4
3
|
import ReactTextareaAutosize from 'react-textarea-autosize';
|
|
5
4
|
import styled, { css } from 'styled-components';
|
|
@@ -16,17 +15,14 @@ const Textarea = /*#__PURE__*/forwardRef(({
|
|
|
16
15
|
const focusInput = () => {
|
|
17
16
|
inputRef.current?.focus();
|
|
18
17
|
};
|
|
19
|
-
const getTextareaLength = value => {
|
|
20
|
-
return toArray(value).length;
|
|
21
|
-
};
|
|
22
18
|
const [count, setCount] = useState(0);
|
|
23
19
|
const handleChange = e => {
|
|
24
|
-
setCount(
|
|
20
|
+
setCount(getGraphemeLength(e.target.value));
|
|
25
21
|
props.onChange?.(e);
|
|
26
22
|
};
|
|
27
23
|
useEffect(() => {
|
|
28
24
|
if (inputRef.current) {
|
|
29
|
-
setCount(
|
|
25
|
+
setCount(getGraphemeLength(inputRef.current.value));
|
|
30
26
|
}
|
|
31
27
|
}, [ref]);
|
|
32
28
|
return /*#__PURE__*/jsxs(TextareaWrapper, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamturing/react-kit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.59.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",
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
"@styled-system/css": "^5.1.5",
|
|
35
35
|
"@types/lodash.debounce": "^4.0.7",
|
|
36
36
|
"@types/lodash.throttle": "^4.1.7",
|
|
37
|
-
"@types/lodash.toarray": "^4.4.9",
|
|
38
37
|
"@types/react-is": "^18.2.2",
|
|
39
38
|
"@types/styled-system": "^5.1.17",
|
|
40
39
|
"@types/styled-system__css": "^5.0.17",
|
|
@@ -57,14 +56,13 @@
|
|
|
57
56
|
"@primer/behaviors": "^1.3.6",
|
|
58
57
|
"@teamturing/icons": "^1.63.0",
|
|
59
58
|
"@teamturing/token-studio": "^1.16.3",
|
|
60
|
-
"@teamturing/utils": "^1.
|
|
59
|
+
"@teamturing/utils": "^1.6.0",
|
|
61
60
|
"framer-motion": "^10.16.4",
|
|
62
61
|
"lodash.debounce": "^4.0.8",
|
|
63
62
|
"lodash.throttle": "^4.1.1",
|
|
64
|
-
"lodash.toarray": "^4.4.0",
|
|
65
63
|
"react-is": "^18.2.0",
|
|
66
64
|
"react-textarea-autosize": "^8.5.3",
|
|
67
65
|
"styled-system": "^5.1.5"
|
|
68
66
|
},
|
|
69
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "a9c26091d43b47da8680a485d931f53710c3c21b"
|
|
70
68
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|