@shoplflow/base 0.42.22 → 0.43.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.cjs +8 -4
- package/dist/index.js +8 -4
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1297,7 +1297,7 @@ var StyledSwitch = styled6__default.default.input`
|
|
|
1297
1297
|
position: relative;
|
|
1298
1298
|
display: flex;
|
|
1299
1299
|
align-items: center;
|
|
1300
|
-
background: ${exports.colorTokens.neutral350};
|
|
1300
|
+
background: ${({ sizeVar }) => sizeVar === "M" ? exports.colorTokens.neutral350 : exports.colorTokens.neutral400};
|
|
1301
1301
|
padding: 2px;
|
|
1302
1302
|
margin: 0;
|
|
1303
1303
|
|
|
@@ -3631,7 +3631,7 @@ exports.TreeItem[exports.TREE_SYMBOL_KEY] = true;
|
|
|
3631
3631
|
Tree.Item = exports.TreeItem;
|
|
3632
3632
|
exports.Tree = Tree;
|
|
3633
3633
|
var StyledInput = styled6__default.default.input`
|
|
3634
|
-
padding: 4px 0 4px 12px;
|
|
3634
|
+
padding: ${({ sizeVar }) => sizeVar === "S" ? "0 0 0 8px" : "4px 0 4px 12px"};
|
|
3635
3635
|
background-color: transparent;
|
|
3636
3636
|
display: flex;
|
|
3637
3637
|
min-width: ${({ minWidth }) => minWidth || "64px"};
|
|
@@ -3760,7 +3760,7 @@ var InputWrapper = styled6__default.default.label`
|
|
|
3760
3760
|
borderRadius
|
|
3761
3761
|
})};
|
|
3762
3762
|
justify-content: space-between;
|
|
3763
|
-
gap: ${({ gap }) => gap || "8px"};
|
|
3763
|
+
gap: ${({ gap, sizeVar }) => gap || (sizeVar === "S" ? "4px" : "8px")};
|
|
3764
3764
|
border: 1px solid ${(props) => getBorderColorByStatus2(props)};
|
|
3765
3765
|
background-color: ${exports.colorTokens.neutral0};
|
|
3766
3766
|
overflow: hidden;
|
|
@@ -3942,6 +3942,7 @@ var Input = React3.forwardRef(
|
|
|
3942
3942
|
borderRadius,
|
|
3943
3943
|
customNumberInputHeight,
|
|
3944
3944
|
gap,
|
|
3945
|
+
sizeVar,
|
|
3945
3946
|
children: [
|
|
3946
3947
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3947
3948
|
StyledInput,
|
|
@@ -3957,6 +3958,7 @@ var Input = React3.forwardRef(
|
|
|
3957
3958
|
id: uniqueId,
|
|
3958
3959
|
ref: refs,
|
|
3959
3960
|
minWidth,
|
|
3961
|
+
sizeVar,
|
|
3960
3962
|
className: "body1_400" + (className ? ` ${className}` : "")
|
|
3961
3963
|
}, rest)
|
|
3962
3964
|
),
|
|
@@ -4795,6 +4797,8 @@ var PaginationSizeSelector = ({ data, pageSize, setPageSize }) => {
|
|
|
4795
4797
|
handleToggleSelect(value);
|
|
4796
4798
|
setPageSize(value);
|
|
4797
4799
|
};
|
|
4800
|
+
const currentItem = selectedItem || data.find((item) => item.value === pageSize);
|
|
4801
|
+
const displayLabel = currentItem ? currentItem.label : String(pageSize);
|
|
4798
4802
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4799
4803
|
exports.Dropdown,
|
|
4800
4804
|
{
|
|
@@ -4805,7 +4809,7 @@ var PaginationSizeSelector = ({ data, pageSize, setPageSize }) => {
|
|
|
4805
4809
|
{
|
|
4806
4810
|
placeholder: String(pageSize),
|
|
4807
4811
|
sizeVar: "S",
|
|
4808
|
-
value:
|
|
4812
|
+
value: /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { typography: "body1_400", color: "neutral400", children: displayLabel })
|
|
4809
4813
|
}
|
|
4810
4814
|
),
|
|
4811
4815
|
popper: /* @__PURE__ */ jsxRuntime.jsx(exports.Dropdown.Content, { type: "FILL", children: data.map((item) => {
|
package/dist/index.js
CHANGED
|
@@ -1270,7 +1270,7 @@ var StyledSwitch = styled6.input`
|
|
|
1270
1270
|
position: relative;
|
|
1271
1271
|
display: flex;
|
|
1272
1272
|
align-items: center;
|
|
1273
|
-
background: ${colorTokens.neutral350};
|
|
1273
|
+
background: ${({ sizeVar }) => sizeVar === "M" ? colorTokens.neutral350 : colorTokens.neutral400};
|
|
1274
1274
|
padding: 2px;
|
|
1275
1275
|
margin: 0;
|
|
1276
1276
|
|
|
@@ -3604,7 +3604,7 @@ TreeItem[TREE_SYMBOL_KEY] = true;
|
|
|
3604
3604
|
Tree.Item = TreeItem;
|
|
3605
3605
|
var Tree_default = Tree;
|
|
3606
3606
|
var StyledInput = styled6.input`
|
|
3607
|
-
padding: 4px 0 4px 12px;
|
|
3607
|
+
padding: ${({ sizeVar }) => sizeVar === "S" ? "0 0 0 8px" : "4px 0 4px 12px"};
|
|
3608
3608
|
background-color: transparent;
|
|
3609
3609
|
display: flex;
|
|
3610
3610
|
min-width: ${({ minWidth }) => minWidth || "64px"};
|
|
@@ -3733,7 +3733,7 @@ var InputWrapper = styled6.label`
|
|
|
3733
3733
|
borderRadius
|
|
3734
3734
|
})};
|
|
3735
3735
|
justify-content: space-between;
|
|
3736
|
-
gap: ${({ gap }) => gap || "8px"};
|
|
3736
|
+
gap: ${({ gap, sizeVar }) => gap || (sizeVar === "S" ? "4px" : "8px")};
|
|
3737
3737
|
border: 1px solid ${(props) => getBorderColorByStatus2(props)};
|
|
3738
3738
|
background-color: ${colorTokens.neutral0};
|
|
3739
3739
|
overflow: hidden;
|
|
@@ -3915,6 +3915,7 @@ var Input = forwardRef(
|
|
|
3915
3915
|
borderRadius,
|
|
3916
3916
|
customNumberInputHeight,
|
|
3917
3917
|
gap,
|
|
3918
|
+
sizeVar,
|
|
3918
3919
|
children: [
|
|
3919
3920
|
/* @__PURE__ */ jsx(
|
|
3920
3921
|
StyledInput,
|
|
@@ -3930,6 +3931,7 @@ var Input = forwardRef(
|
|
|
3930
3931
|
id: uniqueId,
|
|
3931
3932
|
ref: refs,
|
|
3932
3933
|
minWidth,
|
|
3934
|
+
sizeVar,
|
|
3933
3935
|
className: "body1_400" + (className ? ` ${className}` : "")
|
|
3934
3936
|
}, rest)
|
|
3935
3937
|
),
|
|
@@ -4768,6 +4770,8 @@ var PaginationSizeSelector = ({ data, pageSize, setPageSize }) => {
|
|
|
4768
4770
|
handleToggleSelect(value);
|
|
4769
4771
|
setPageSize(value);
|
|
4770
4772
|
};
|
|
4773
|
+
const currentItem = selectedItem || data.find((item) => item.value === pageSize);
|
|
4774
|
+
const displayLabel = currentItem ? currentItem.label : String(pageSize);
|
|
4771
4775
|
return /* @__PURE__ */ jsx(
|
|
4772
4776
|
Dropdown_default,
|
|
4773
4777
|
{
|
|
@@ -4778,7 +4782,7 @@ var PaginationSizeSelector = ({ data, pageSize, setPageSize }) => {
|
|
|
4778
4782
|
{
|
|
4779
4783
|
placeholder: String(pageSize),
|
|
4780
4784
|
sizeVar: "S",
|
|
4781
|
-
value:
|
|
4785
|
+
value: /* @__PURE__ */ jsx(Text_default, { typography: "body1_400", color: "neutral400", children: displayLabel })
|
|
4782
4786
|
}
|
|
4783
4787
|
),
|
|
4784
4788
|
popper: /* @__PURE__ */ jsx(Dropdown_default.Content, { type: "FILL", children: data.map((item) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shoplflow/base",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
"react-datepicker": "^7.3.0",
|
|
91
91
|
"react-dom": "^18.2.0",
|
|
92
92
|
"simplebar-react": "^3.2.6",
|
|
93
|
+
"@shoplflow/shopl-assets": "^0.12.26",
|
|
93
94
|
"@shoplflow/hada-assets": "^0.1.8",
|
|
94
|
-
"@shoplflow/shopl-assets": "^0.12.25",
|
|
95
95
|
"@shoplflow/utils": "^0.7.0"
|
|
96
96
|
},
|
|
97
97
|
"scripts": {
|