fis-component 0.1.24 → 0.1.25
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/cjs/index.js +98 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/Input/InputField/index.d.ts +1 -1
- package/dist/esm/index.js +98 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/Input/InputField/index.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -65289,6 +65289,52 @@ const InputSC$2 = styled.input `
|
|
|
65289
65289
|
border-radius: 0;
|
|
65290
65290
|
}
|
|
65291
65291
|
|
|
65292
|
+
/* xs/sm dùng chung corner-radius với md nên chỉ cần override height,
|
|
65293
|
+
typography và sub-spacing. */
|
|
65294
|
+
&.input-text-xs {
|
|
65295
|
+
height: calc(
|
|
65296
|
+
${getTheme("com/input/field/size-xs/height")} - 2 *
|
|
65297
|
+
${getTheme("com/input/field/stroke-width")}
|
|
65298
|
+
);
|
|
65299
|
+
${getTheme("Paragraph/XS")}
|
|
65300
|
+
padding-right: calc(
|
|
65301
|
+
${getTheme("com/input/field/size-xs/label/sub-spacing")} +
|
|
65302
|
+
${getTheme("com/input/field/right-padding")}
|
|
65303
|
+
);
|
|
65304
|
+
padding-left: calc(
|
|
65305
|
+
${getTheme("com/input/field/size-xs/label/sub-spacing")} +
|
|
65306
|
+
${getTheme("com/input/field/left-padding")}
|
|
65307
|
+
);
|
|
65308
|
+
|
|
65309
|
+
&.prefix,
|
|
65310
|
+
&.suffix {
|
|
65311
|
+
padding-right: ${getTheme("com/input/field/size-xs/label/sub-spacing")};
|
|
65312
|
+
padding-left: ${getTheme("com/input/field/size-xs/label/sub-spacing")};
|
|
65313
|
+
}
|
|
65314
|
+
}
|
|
65315
|
+
|
|
65316
|
+
&.input-text-sm {
|
|
65317
|
+
height: calc(
|
|
65318
|
+
${getTheme("com/input/field/size-sm/height")} - 2 *
|
|
65319
|
+
${getTheme("com/input/field/stroke-width")}
|
|
65320
|
+
);
|
|
65321
|
+
${getTheme("Paragraph/XS")}
|
|
65322
|
+
padding-right: calc(
|
|
65323
|
+
${getTheme("com/input/field/size-sm/label/sub-spacing")} +
|
|
65324
|
+
${getTheme("com/input/field/right-padding")}
|
|
65325
|
+
);
|
|
65326
|
+
padding-left: calc(
|
|
65327
|
+
${getTheme("com/input/field/size-sm/label/sub-spacing")} +
|
|
65328
|
+
${getTheme("com/input/field/left-padding")}
|
|
65329
|
+
);
|
|
65330
|
+
|
|
65331
|
+
&.prefix,
|
|
65332
|
+
&.suffix {
|
|
65333
|
+
padding-right: ${getTheme("com/input/field/size-sm/label/sub-spacing")};
|
|
65334
|
+
padding-left: ${getTheme("com/input/field/size-sm/label/sub-spacing")};
|
|
65335
|
+
}
|
|
65336
|
+
}
|
|
65337
|
+
|
|
65292
65338
|
&.input-text-lg {
|
|
65293
65339
|
height: calc(
|
|
65294
65340
|
${getTheme("com/input/field/size-lg/height")} - 2 *
|
|
@@ -65350,8 +65396,38 @@ const DivIconSC$2 = styled.div `
|
|
|
65350
65396
|
margin-left: ${getTheme("com/input/field/size-md/icon/left-padding")};
|
|
65351
65397
|
color: ${getTheme("com/input/field/default/icon/color-icon/default")};
|
|
65352
65398
|
|
|
65399
|
+
svg {
|
|
65400
|
+
width: ${getTheme("com/input/field/size-md/icon/size-icon")};
|
|
65401
|
+
height: ${getTheme("com/input/field/size-md/icon/size-icon")};
|
|
65402
|
+
}
|
|
65403
|
+
|
|
65404
|
+
/* xs/sm không có token icon/left-padding, dùng label/sub-spacing (cùng 4px
|
|
65405
|
+
như token icon/left-padding của select ở hai size này). */
|
|
65406
|
+
&.input-text-xs {
|
|
65407
|
+
margin-left: ${getTheme("com/input/field/size-xs/label/sub-spacing")};
|
|
65408
|
+
|
|
65409
|
+
svg {
|
|
65410
|
+
width: ${getTheme("com/input/field/size-xs/icon/size-icon")};
|
|
65411
|
+
height: ${getTheme("com/input/field/size-xs/icon/size-icon")};
|
|
65412
|
+
}
|
|
65413
|
+
}
|
|
65414
|
+
|
|
65415
|
+
&.input-text-sm {
|
|
65416
|
+
margin-left: ${getTheme("com/input/field/size-sm/label/sub-spacing")};
|
|
65417
|
+
|
|
65418
|
+
svg {
|
|
65419
|
+
width: ${getTheme("com/input/field/size-sm/icon/size-icon")};
|
|
65420
|
+
height: ${getTheme("com/input/field/size-sm/icon/size-icon")};
|
|
65421
|
+
}
|
|
65422
|
+
}
|
|
65423
|
+
|
|
65353
65424
|
&.input-text-lg {
|
|
65354
65425
|
margin-left: ${getTheme("com/input/field/size-lg/icon/left-padding")};
|
|
65426
|
+
|
|
65427
|
+
svg {
|
|
65428
|
+
width: ${getTheme("com/input/field/size-lg/icon/size-icon")};
|
|
65429
|
+
height: ${getTheme("com/input/field/size-lg/icon/size-icon")};
|
|
65430
|
+
}
|
|
65355
65431
|
}
|
|
65356
65432
|
`;
|
|
65357
65433
|
const DivIconSuffixSC$1 = styled.div `
|
|
@@ -65394,7 +65470,7 @@ const DivDropdownSuffixSC = styled.div `
|
|
|
65394
65470
|
);
|
|
65395
65471
|
padding-right: ${getTheme("com/input/dropdown/horizontal-padding")};
|
|
65396
65472
|
border-left: ${getTheme("com/input/dropdown/divider/stroke-width")} solid
|
|
65397
|
-
${getTheme("com/input/
|
|
65473
|
+
${getTheme("com/input/dropdown/divider/color-stroke")};
|
|
65398
65474
|
border-top-right-radius: ${getTheme("com/input/field/size-md/corner-radius")};
|
|
65399
65475
|
border-bottom-right-radius: ${getTheme("com/input/field/size-md/corner-radius")};
|
|
65400
65476
|
background-color: ${getTheme("com/input/dropdown/background/default")};
|
|
@@ -65462,7 +65538,7 @@ const DivDropdownPreFixSC = styled.div `
|
|
|
65462
65538
|
);
|
|
65463
65539
|
padding-right: ${getTheme("com/input/dropdown/horizontal-padding")};
|
|
65464
65540
|
border-right: ${getTheme("com/input/dropdown/divider/stroke-width")} solid
|
|
65465
|
-
${getTheme("com/input/
|
|
65541
|
+
${getTheme("com/input/dropdown/divider/color-stroke")};
|
|
65466
65542
|
border-top-left-radius: ${getTheme("com/input/field/size-md/corner-radius")};
|
|
65467
65543
|
border-bottom-left-radius: ${getTheme("com/input/field/size-md/corner-radius")};
|
|
65468
65544
|
background-color: ${getTheme("com/input/dropdown/background/default")};
|
|
@@ -65611,6 +65687,19 @@ const DivContainerSC$6 = styled.div `
|
|
|
65611
65687
|
color: ${getTheme("com/input/character-limit/label/over-limit/color-text")};
|
|
65612
65688
|
}
|
|
65613
65689
|
|
|
65690
|
+
/* xs/sm dùng chung corner-radius với md nên chỉ cần override height. */
|
|
65691
|
+
&.input-text-xs {
|
|
65692
|
+
height: ${getTheme("com/input/field/size-xs/height")};
|
|
65693
|
+
min-height: ${getTheme("com/input/field/size-xs/height")};
|
|
65694
|
+
max-height: ${getTheme("com/input/field/size-xs/height")};
|
|
65695
|
+
}
|
|
65696
|
+
|
|
65697
|
+
&.input-text-sm {
|
|
65698
|
+
height: ${getTheme("com/input/field/size-sm/height")};
|
|
65699
|
+
min-height: ${getTheme("com/input/field/size-sm/height")};
|
|
65700
|
+
max-height: ${getTheme("com/input/field/size-sm/height")};
|
|
65701
|
+
}
|
|
65702
|
+
|
|
65614
65703
|
&.input-text-lg {
|
|
65615
65704
|
height: ${getTheme("com/input/field/size-lg/height")};
|
|
65616
65705
|
min-height: ${getTheme("com/input/field/size-lg/height")};
|
|
@@ -65761,6 +65850,8 @@ const DivContainerSC$6 = styled.div `
|
|
|
65761
65850
|
const FISInputField = React.forwardRef(({ onClickSuffix, onClickPrefix, ...props }, ref) => {
|
|
65762
65851
|
const { sizeInput = "md", iconPrefix, iconSuffix, labelSuffix, labelPrefix, typeSuffix, typePrefix, disabled, negative, activeDropdown, ...rest } = props;
|
|
65763
65852
|
return (jsxRuntime.jsxs(DivContainerSC$6, { className: classNames({
|
|
65853
|
+
"input-text-xs": sizeInput === "xs",
|
|
65854
|
+
"input-text-sm": sizeInput === "sm",
|
|
65764
65855
|
"input-text-lg": sizeInput === "lg",
|
|
65765
65856
|
negative: negative,
|
|
65766
65857
|
dropdownSuffix: typeSuffix === "dropdown",
|
|
@@ -65771,6 +65862,8 @@ const FISInputField = React.forwardRef(({ onClickSuffix, onClickPrefix, ...props
|
|
|
65771
65862
|
iconSuffix: typeSuffix === "icon",
|
|
65772
65863
|
disabled: disabled,
|
|
65773
65864
|
}), children: [iconPrefix && typePrefix !== "prefix" && typePrefix !== "dropdown" && (jsxRuntime.jsx(DivIconSC$2, { className: classNames({
|
|
65865
|
+
"input-text-xs": sizeInput === "xs",
|
|
65866
|
+
"input-text-sm": sizeInput === "sm",
|
|
65774
65867
|
"input-text-lg": sizeInput === "lg",
|
|
65775
65868
|
}), children: iconPrefix })), typePrefix === "prefix" && (jsxRuntime.jsxs(DivPrefixSC, { onClick: onClickPrefix, className: classNames({ disabled: disabled }), children: [iconPrefix && jsxRuntime.jsx(DivIconPrefixSC$1, { children: iconPrefix }), labelPrefix && jsxRuntime.jsx(SpanTextPrefixSC, { children: labelPrefix })] })), typePrefix === "dropdown" && (jsxRuntime.jsxs(DivDropdownPreFixSC, { className: classNames({
|
|
65776
65869
|
"active-dropdown": activeDropdown,
|
|
@@ -65778,12 +65871,14 @@ const FISInputField = React.forwardRef(({ onClickSuffix, onClickPrefix, ...props
|
|
|
65778
65871
|
"input-text-lg": sizeInput === "lg",
|
|
65779
65872
|
}), onClick: onClickPrefix, children: [iconPrefix && jsxRuntime.jsx(DivIconDropSC, { children: iconPrefix }), labelPrefix && jsxRuntime.jsx(SpanTextDropSC, { children: labelPrefix }), jsxRuntime.jsx(DivIconPrefixSC$1, { children: jsxRuntime.jsx(DropdownIcon, {}) })] })), jsxRuntime.jsx(InputSC$2, { ...rest, ref: ref, disabled: disabled, "$isPointer": props.$isPointer, className: classNames({
|
|
65780
65873
|
negative: negative,
|
|
65874
|
+
"input-text-xs": sizeInput === "xs",
|
|
65875
|
+
"input-text-sm": sizeInput === "sm",
|
|
65781
65876
|
"input-text-lg": sizeInput === "lg",
|
|
65782
65877
|
prefix: iconPrefix,
|
|
65783
65878
|
suffix: typeSuffix === "icon" ||
|
|
65784
65879
|
typeSuffix === "suffix" ||
|
|
65785
65880
|
typeSuffix === "dropdown",
|
|
65786
|
-
}) }), typeSuffix === "icon" && iconSuffix && (jsxRuntime.jsx(FISIconButton, { size: "md", icon: iconSuffix, variant: "tertiary-invisible", className: "icon-suffix", onClick: onClickSuffix, disabled: disabled })), typeSuffix === "suffix" && (jsxRuntime.jsxs(DivSuffixSC, { onClick: onClickSuffix, className: classNames({ disabled: disabled }), children: [iconSuffix && jsxRuntime.jsx(DivIconSuffixSC$1, { children: iconSuffix }), labelSuffix && jsxRuntime.jsx(SpanTextSuffixSC, { children: labelSuffix })] })), typeSuffix === "dropdown" && (jsxRuntime.jsxs(DivDropdownSuffixSC, { className: classNames({
|
|
65881
|
+
}) }), typeSuffix === "icon" && iconSuffix && (jsxRuntime.jsx(FISIconButton, { size: sizeInput === "xs" || sizeInput === "sm" ? sizeInput : "md", icon: iconSuffix, variant: "tertiary-invisible", className: "icon-suffix", onClick: onClickSuffix, disabled: disabled })), typeSuffix === "suffix" && (jsxRuntime.jsxs(DivSuffixSC, { onClick: onClickSuffix, className: classNames({ disabled: disabled }), children: [iconSuffix && jsxRuntime.jsx(DivIconSuffixSC$1, { children: iconSuffix }), labelSuffix && jsxRuntime.jsx(SpanTextSuffixSC, { children: labelSuffix })] })), typeSuffix === "dropdown" && (jsxRuntime.jsxs(DivDropdownSuffixSC, { className: classNames({
|
|
65787
65882
|
"active-dropdown": activeDropdown,
|
|
65788
65883
|
disabled: disabled,
|
|
65789
65884
|
"input-text-lg": sizeInput === "lg",
|