@shoplflow/base 0.24.21 → 0.24.23
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.cjs +17 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +17 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -516,6 +516,7 @@ declare const ButtonStyleVariants: {
|
|
|
516
516
|
declare type ButtonStyleVariantType = $Values<typeof ButtonStyleVariants>;
|
|
517
517
|
declare type ButtonOptionProps<T extends ElementType = 'button'> = Omit<ComponentPropsWithoutRef<T>, 'color' | 'disabled'> & SizeVariantProps<ButtonSizeVariantType> & StyleVariantProps<ButtonStyleVariantType> & ColorTokenProps & DisableProps & {
|
|
518
518
|
typography?: TypographyTokens;
|
|
519
|
+
lineClamp?: number;
|
|
519
520
|
};
|
|
520
521
|
declare type ButtonProps<T extends ElementType = 'button'> = PolymorphicComponentProps<T, ButtonOptionProps> & LeftAndRightNodeProps;
|
|
521
522
|
declare type ButtonComponent = <T extends ElementType = 'button'>(props: ButtonProps<T> & {
|
|
@@ -1205,11 +1206,11 @@ interface TextAreaOptionProps extends DisableProps, ErrorProps {
|
|
|
1205
1206
|
/**
|
|
1206
1207
|
* text area의 높이를 조절해요.
|
|
1207
1208
|
*/
|
|
1208
|
-
height?:
|
|
1209
|
+
height?: string;
|
|
1209
1210
|
/**
|
|
1210
1211
|
* text area의 최소 높이를 조절해요.
|
|
1211
1212
|
*/
|
|
1212
|
-
minHeight?:
|
|
1213
|
+
minHeight?: string;
|
|
1213
1214
|
}
|
|
1214
1215
|
declare type TextAreaProps = ComponentPropsWithoutRef<'textarea'> & TextAreaOptionProps;
|
|
1215
1216
|
|
package/dist/index.d.ts
CHANGED
|
@@ -516,6 +516,7 @@ declare const ButtonStyleVariants: {
|
|
|
516
516
|
declare type ButtonStyleVariantType = $Values<typeof ButtonStyleVariants>;
|
|
517
517
|
declare type ButtonOptionProps<T extends ElementType = 'button'> = Omit<ComponentPropsWithoutRef<T>, 'color' | 'disabled'> & SizeVariantProps<ButtonSizeVariantType> & StyleVariantProps<ButtonStyleVariantType> & ColorTokenProps & DisableProps & {
|
|
518
518
|
typography?: TypographyTokens;
|
|
519
|
+
lineClamp?: number;
|
|
519
520
|
};
|
|
520
521
|
declare type ButtonProps<T extends ElementType = 'button'> = PolymorphicComponentProps<T, ButtonOptionProps> & LeftAndRightNodeProps;
|
|
521
522
|
declare type ButtonComponent = <T extends ElementType = 'button'>(props: ButtonProps<T> & {
|
|
@@ -1205,11 +1206,11 @@ interface TextAreaOptionProps extends DisableProps, ErrorProps {
|
|
|
1205
1206
|
/**
|
|
1206
1207
|
* text area의 높이를 조절해요.
|
|
1207
1208
|
*/
|
|
1208
|
-
height?:
|
|
1209
|
+
height?: string;
|
|
1209
1210
|
/**
|
|
1210
1211
|
* text area의 최소 높이를 조절해요.
|
|
1211
1212
|
*/
|
|
1212
|
-
minHeight?:
|
|
1213
|
+
minHeight?: string;
|
|
1213
1214
|
}
|
|
1214
1215
|
declare type TextAreaProps = ComponentPropsWithoutRef<'textarea'> & TextAreaOptionProps;
|
|
1215
1216
|
|
package/dist/index.js
CHANGED
|
@@ -521,6 +521,7 @@ var setEllipsis = (maxLines) => {
|
|
|
521
521
|
-webkit-line-clamp: ${maxLines};
|
|
522
522
|
-webkit-box-orient: vertical;
|
|
523
523
|
overflow: hidden;
|
|
524
|
+
word-break: break-all;
|
|
524
525
|
text-overflow: ellipsis;
|
|
525
526
|
`;
|
|
526
527
|
};
|
|
@@ -1373,7 +1374,8 @@ var Button = forwardRef(
|
|
|
1373
1374
|
as,
|
|
1374
1375
|
children,
|
|
1375
1376
|
leftSource,
|
|
1376
|
-
rightSource
|
|
1377
|
+
rightSource,
|
|
1378
|
+
lineClamp
|
|
1377
1379
|
} = _b, rest = __objRest(_b, [
|
|
1378
1380
|
"styleVar",
|
|
1379
1381
|
"sizeVar",
|
|
@@ -1382,7 +1384,8 @@ var Button = forwardRef(
|
|
|
1382
1384
|
"as",
|
|
1383
1385
|
"children",
|
|
1384
1386
|
"leftSource",
|
|
1385
|
-
"rightSource"
|
|
1387
|
+
"rightSource",
|
|
1388
|
+
"lineClamp"
|
|
1386
1389
|
]);
|
|
1387
1390
|
return /* @__PURE__ */ jsxs(
|
|
1388
1391
|
StyledButton,
|
|
@@ -1401,8 +1404,7 @@ var Button = forwardRef(
|
|
|
1401
1404
|
/* @__PURE__ */ jsx(
|
|
1402
1405
|
Text_default,
|
|
1403
1406
|
{
|
|
1404
|
-
|
|
1405
|
-
whiteSpace: "nowrap",
|
|
1407
|
+
lineClamp,
|
|
1406
1408
|
color: styleVar === "PRIMARY" ? "neutral0" : "neutral700",
|
|
1407
1409
|
typography: sizeVar === "M" ? "body1_400" : "body2_400",
|
|
1408
1410
|
children
|
|
@@ -1835,11 +1837,12 @@ var getBorderColorByStatus = ({ isFocused, isError, isHovered, disabled }) => {
|
|
|
1835
1837
|
var InputWrapper = styled5.label`
|
|
1836
1838
|
display: flex;
|
|
1837
1839
|
align-items: center;
|
|
1838
|
-
width: ${({ width }) => width != null ? width : "100%"};
|
|
1839
|
-
|
|
1840
|
+
width: ${({ width }) => width != null ? width : "calc(100% - 2px)"};
|
|
1841
|
+
min-width: ${({ minWidth }) => minWidth != null ? minWidth : "fit-content"};
|
|
1842
|
+
height: ${({ height }) => height != null ? height : "fit-content"};
|
|
1840
1843
|
flex-direction: ${({ direction }) => direction || "row"};
|
|
1841
1844
|
justify-content: space-between;
|
|
1842
|
-
min-height: ${({
|
|
1845
|
+
min-height: ${({ minHeight }) => minHeight != null ? minHeight : "38px"};
|
|
1843
1846
|
margin: 1px;
|
|
1844
1847
|
gap: 8px;
|
|
1845
1848
|
box-shadow: 0 0 0 1px ${(props) => getBorderColorByStatus(props)};
|
|
@@ -2911,7 +2914,7 @@ var StyledTextarea = styled5.textarea`
|
|
|
2911
2914
|
background-color: transparent;
|
|
2912
2915
|
resize: none;
|
|
2913
2916
|
width: 100%;
|
|
2914
|
-
height:
|
|
2917
|
+
height: 100%;
|
|
2915
2918
|
flex: 1;
|
|
2916
2919
|
word-break: break-all;
|
|
2917
2920
|
${({ disabled }) => getDisabledStyle(disabled)};
|
|
@@ -2932,8 +2935,9 @@ var TextArea = forwardRef(
|
|
|
2932
2935
|
defaultValue,
|
|
2933
2936
|
onBlur,
|
|
2934
2937
|
onFocus,
|
|
2935
|
-
minHeight =
|
|
2938
|
+
minHeight = "100px",
|
|
2936
2939
|
width,
|
|
2940
|
+
height,
|
|
2937
2941
|
className
|
|
2938
2942
|
} = _b, rest = __objRest(_b, [
|
|
2939
2943
|
"name",
|
|
@@ -2948,6 +2952,7 @@ var TextArea = forwardRef(
|
|
|
2948
2952
|
"onFocus",
|
|
2949
2953
|
"minHeight",
|
|
2950
2954
|
"width",
|
|
2955
|
+
"height",
|
|
2951
2956
|
"className"
|
|
2952
2957
|
]);
|
|
2953
2958
|
const [text, setText] = useState("");
|
|
@@ -3007,6 +3012,8 @@ var TextArea = forwardRef(
|
|
|
3007
3012
|
direction: "column",
|
|
3008
3013
|
onMouseEnter: handleOnMouseEnter,
|
|
3009
3014
|
onMouseLeave: handleOnMouseLeave,
|
|
3015
|
+
height,
|
|
3016
|
+
minHeight,
|
|
3010
3017
|
width,
|
|
3011
3018
|
"data-shoplflow": "text-area",
|
|
3012
3019
|
children: [
|
|
@@ -3023,8 +3030,7 @@ var TextArea = forwardRef(
|
|
|
3023
3030
|
value,
|
|
3024
3031
|
ref,
|
|
3025
3032
|
maxLength,
|
|
3026
|
-
disabled
|
|
3027
|
-
minHeight
|
|
3033
|
+
disabled
|
|
3028
3034
|
}, rest)
|
|
3029
3035
|
),
|
|
3030
3036
|
/* @__PURE__ */ jsx(BottomElementWrapper, { children: maxLength && /* @__PURE__ */ jsx(TextCounter_default, { currentLength: String(text).length, maxLength }) })
|