@superblocksteam/library 2.0.0-next.30 → 2.0.0-next.31
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/{allPaths-vbWTRLnL.js → allPaths-CEF7eymC.js} +2 -2
- package/dist/{allPaths-vbWTRLnL.js.map → allPaths-CEF7eymC.js.map} +1 -1
- package/dist/{allPaths-BPA_rZsQ.js → allPaths-qHt9NRRE.js} +2 -2
- package/dist/{allPaths-BPA_rZsQ.js.map → allPaths-qHt9NRRE.js.map} +1 -1
- package/dist/{allPathsLoader-BCcFyr1P.js → allPathsLoader-C_jYLeY9.js} +3 -3
- package/dist/{allPathsLoader-DbyWd1-q.js.map → allPathsLoader-C_jYLeY9.js.map} +1 -1
- package/dist/{allPathsLoader-DbyWd1-q.js → allPathsLoader-hWLqt9nZ.js} +3 -3
- package/dist/{allPathsLoader-BCcFyr1P.js.map → allPathsLoader-hWLqt9nZ.js.map} +1 -1
- package/dist/{index-DTN4RUsr.js → index-e6o5xaRw.js} +51 -24
- package/dist/{index-DTN4RUsr.js.map → index-e6o5xaRw.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{splitPathsBySizeLoader-DSHvCqou.js → splitPathsBySizeLoader-BclYBPrJ.js} +2 -2
- package/dist/{splitPathsBySizeLoader-DSHvCqou.js.map → splitPathsBySizeLoader-BclYBPrJ.js.map} +1 -1
- package/dist/{splitPathsBySizeLoader-ByawxTZ1.js → splitPathsBySizeLoader-DiRcmbhL.js} +2 -2
- package/dist/{splitPathsBySizeLoader-ByawxTZ1.js.map → splitPathsBySizeLoader-DiRcmbhL.js.map} +1 -1
- package/dist-types/lib/user-facing/components/dropdown/index.d.ts +1 -1
- package/dist-types/lib/user-facing/components/dropdown/props.d.ts +1 -1
- package/dist-types/lib/user-facing/components/dropdown/types.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { I as IconSvgPaths16 } from "./index-BxzKdlqH.js";
|
|
2
2
|
import { I as IconSvgPaths20 } from "./index-DIn-fanT.js";
|
|
3
|
-
import { p as pascalCase, b as IconSize } from "./index-
|
|
3
|
+
import { p as pascalCase, b as IconSize } from "./index-e6o5xaRw.js";
|
|
4
4
|
function getIconPaths(name, size) {
|
|
5
5
|
var key = pascalCase(name);
|
|
6
6
|
return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];
|
|
@@ -14,4 +14,4 @@ export {
|
|
|
14
14
|
getIconPaths,
|
|
15
15
|
iconNameToPathsRecordKey
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=allPaths-
|
|
17
|
+
//# sourceMappingURL=allPaths-CEF7eymC.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPaths-
|
|
1
|
+
{"version":3,"file":"allPaths-CEF7eymC.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.20.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/allPaths.js"],"sourcesContent":["/*\n * Copyright 2021 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { pascalCase } from \"change-case\";\nimport * as IconSvgPaths16 from \"./generated/16px/paths\";\nimport * as IconSvgPaths20 from \"./generated/20px/paths\";\nimport { IconSize } from \"./iconTypes\";\nexport { IconSvgPaths16, IconSvgPaths20 };\n/**\n * Get the list of vector paths that define a given icon. These path strings are used to render `<path>`\n * elements inside an `<svg>` icon element. For full implementation details and nuances, see the icon component\n * handlebars template and `generate-icon-components` script in the __@blueprintjs/icons__ package.\n *\n * Note: this function loads all icon definitions __statically__, which means every icon is included in your\n * JS bundle. Only use this API if your app is likely to use all Blueprint icons at runtime. If you are looking for a\n * dynamic icon loader which loads icon definitions on-demand, use `{ Icons } from \"@blueprintjs/icons\"` instead.\n */\nexport function getIconPaths(name, size) {\n var key = pascalCase(name);\n return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];\n}\n/**\n * Type safe string literal conversion of snake-case icon names to PascalCase icon names.\n * This is useful for indexing into the SVG paths record to extract a single icon's SVG path definition.\n *\n * @deprecated use `getIconPaths` instead\n */\nexport function iconNameToPathsRecordKey(name) {\n return pascalCase(name);\n}\n//# sourceMappingURL=allPaths.js.map"],"names":[],"mappings":";;;AA6BO,SAAS,aAAa,MAAM,MAAM;AACrC,MAAI,MAAM,WAAW,IAAI;AACzB,SAAO,SAAS,SAAS,WAAW,eAAe,GAAG,IAAI,eAAe,GAAG;AAChF;AAOO,SAAS,yBAAyB,MAAM;AAC3C,SAAO,WAAW,IAAI;AAC1B;","x_google_ignoreList":[0]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { I as IconSvgPaths16 } from "./index-DIJYif9G.js";
|
|
2
2
|
import { I as IconSvgPaths20 } from "./index-LHtbj0-V.js";
|
|
3
|
-
import { p as pascalCase, I as IconSize } from "./index-
|
|
3
|
+
import { p as pascalCase, I as IconSize } from "./index-e6o5xaRw.js";
|
|
4
4
|
function getIconPaths(name, size) {
|
|
5
5
|
var key = pascalCase(name);
|
|
6
6
|
return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];
|
|
@@ -14,4 +14,4 @@ export {
|
|
|
14
14
|
getIconPaths,
|
|
15
15
|
iconNameToPathsRecordKey
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=allPaths-
|
|
17
|
+
//# sourceMappingURL=allPaths-qHt9NRRE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPaths-
|
|
1
|
+
{"version":3,"file":"allPaths-qHt9NRRE.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.18.1_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/allPaths.js"],"sourcesContent":["/*\n * Copyright 2021 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { pascalCase } from \"change-case\";\nimport * as IconSvgPaths16 from \"./generated/16px/paths\";\nimport * as IconSvgPaths20 from \"./generated/20px/paths\";\nimport { IconSize } from \"./iconTypes\";\nexport { IconSvgPaths16, IconSvgPaths20 };\n/**\n * Get the list of vector paths that define a given icon. These path strings are used to render `<path>`\n * elements inside an `<svg>` icon element. For full implementation details and nuances, see the icon component\n * handlebars template and `generate-icon-components` script in the __@blueprintjs/icons__ package.\n *\n * Note: this function loads all icon definitions __statically__, which means every icon is included in your\n * JS bundle. Only use this API if your app is likely to use all Blueprint icons at runtime. If you are looking for a\n * dynamic icon loader which loads icon definitions on-demand, use `{ Icons } from \"@blueprintjs/icons\"` instead.\n */\nexport function getIconPaths(name, size) {\n var key = pascalCase(name);\n return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];\n}\n/**\n * Type safe string literal conversion of snake-case icon names to PascalCase icon names.\n * This is useful for indexing into the SVG paths record to extract a single icon's SVG path definition.\n *\n * @deprecated use `getIconPaths` instead\n */\nexport function iconNameToPathsRecordKey(name) {\n return pascalCase(name);\n}\n//# sourceMappingURL=allPaths.js.map"],"names":[],"mappings":";;;AA6BO,SAAS,aAAa,MAAM,MAAM;AACrC,MAAI,MAAM,WAAW,IAAI;AACzB,SAAO,SAAS,SAAS,WAAW,eAAe,GAAG,IAAI,eAAe,GAAG;AAChF;AAOO,SAAS,yBAAyB,MAAM;AAC3C,SAAO,WAAW,IAAI;AAC1B;","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __awaiter, a as __generator } from "./index-
|
|
1
|
+
import { _ as __awaiter, a as __generator } from "./index-e6o5xaRw.js";
|
|
2
2
|
var allPathsLoader = function(name, size) {
|
|
3
3
|
return __awaiter(void 0, void 0, void 0, function() {
|
|
4
4
|
var getIconPaths;
|
|
@@ -7,7 +7,7 @@ var allPathsLoader = function(name, size) {
|
|
|
7
7
|
case 0:
|
|
8
8
|
return [4, import(
|
|
9
9
|
/* webpackChunkName: "blueprint-icons-all-paths" */
|
|
10
|
-
"./allPaths-
|
|
10
|
+
"./allPaths-CEF7eymC.js"
|
|
11
11
|
)];
|
|
12
12
|
case 1:
|
|
13
13
|
getIconPaths = _a.sent().getIconPaths;
|
|
@@ -19,4 +19,4 @@ var allPathsLoader = function(name, size) {
|
|
|
19
19
|
export {
|
|
20
20
|
allPathsLoader
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=allPathsLoader-
|
|
22
|
+
//# sourceMappingURL=allPathsLoader-C_jYLeY9.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPathsLoader-
|
|
1
|
+
{"version":3,"file":"allPathsLoader-C_jYLeY9.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.20.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/paths-loaders/allPathsLoader.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __awaiter, __generator } from \"tslib\";\n/**\n * A simple module loader which concatenates all icon paths into a single chunk.\n */\nexport var allPathsLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var getIconPaths;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-all-paths\" */\n \"../allPaths\")];\n case 1:\n getIconPaths = (_a.sent()).getIconPaths;\n return [2 /*return*/, getIconPaths(name, size)];\n }\n });\n}); };\n//# sourceMappingURL=allPathsLoader.js.map"],"names":[],"mappings":";AAmBU,IAAC,iBAAiB,SAAU,MAAM,MAAM;AAAE,SAAO,UAAU,QAAQ,QAAQ,QAAQ,WAAY;AACrG,QAAI;AACJ,WAAO,YAAY,MAAM,SAAU,IAAI;AACnC,cAAQ,GAAG,OAAK;AAAA,QACZ,KAAK;AAAG,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEzB;AAAA,UAAa,CAAC;AAAA,QAClB,KAAK;AACD,yBAAgB,GAAG,KAAI,EAAI;AAC3B,iBAAO,CAAC,GAAc,aAAa,MAAM,IAAI,CAAC;AAAA,MAC9D;AAAA,IACA,CAAK;AAAA,EACL,CAAC;AAAE;","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __awaiter, a as __generator } from "./index-
|
|
1
|
+
import { _ as __awaiter, a as __generator } from "./index-e6o5xaRw.js";
|
|
2
2
|
var allPathsLoader = function(name, size) {
|
|
3
3
|
return __awaiter(void 0, void 0, void 0, function() {
|
|
4
4
|
var getIconPaths;
|
|
@@ -7,7 +7,7 @@ var allPathsLoader = function(name, size) {
|
|
|
7
7
|
case 0:
|
|
8
8
|
return [4, import(
|
|
9
9
|
/* webpackChunkName: "blueprint-icons-all-paths" */
|
|
10
|
-
"./allPaths-
|
|
10
|
+
"./allPaths-qHt9NRRE.js"
|
|
11
11
|
)];
|
|
12
12
|
case 1:
|
|
13
13
|
getIconPaths = _a.sent().getIconPaths;
|
|
@@ -19,4 +19,4 @@ var allPathsLoader = function(name, size) {
|
|
|
19
19
|
export {
|
|
20
20
|
allPathsLoader
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=allPathsLoader-
|
|
22
|
+
//# sourceMappingURL=allPathsLoader-hWLqt9nZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allPathsLoader-
|
|
1
|
+
{"version":3,"file":"allPathsLoader-hWLqt9nZ.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.18.1_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/paths-loaders/allPathsLoader.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __awaiter, __generator } from \"tslib\";\n/**\n * A simple module loader which concatenates all icon paths into a single chunk.\n */\nexport var allPathsLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var getIconPaths;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-all-paths\" */\n \"../allPaths\")];\n case 1:\n getIconPaths = (_a.sent()).getIconPaths;\n return [2 /*return*/, getIconPaths(name, size)];\n }\n });\n}); };\n//# sourceMappingURL=allPathsLoader.js.map"],"names":[],"mappings":";AAmBU,IAAC,iBAAiB,SAAU,MAAM,MAAM;AAAE,SAAO,UAAU,QAAQ,QAAQ,QAAQ,WAAY;AACrG,QAAI;AACJ,WAAO,YAAY,MAAM,SAAU,IAAI;AACnC,cAAQ,GAAG,OAAK;AAAA,QACZ,KAAK;AAAG,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEzB;AAAA,UAAa,CAAC;AAAA,QAClB,KAAK;AACD,yBAAgB,GAAG,KAAI,EAAI;AAC3B,iBAAO,CAAC,GAAc,aAAa,MAAM,IAAI,CAAC;AAAA,MAC9D;AAAA,IACA,CAAK;AAAA,EACL,CAAC;AAAE;","x_google_ignoreList":[0]}
|
|
@@ -2690,14 +2690,14 @@ function getLoaderFn$1(options) {
|
|
|
2690
2690
|
if (!(loader === "all")) return [3, 3];
|
|
2691
2691
|
return [4, import(
|
|
2692
2692
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
2693
|
-
"./allPathsLoader-
|
|
2693
|
+
"./allPathsLoader-hWLqt9nZ.js"
|
|
2694
2694
|
)];
|
|
2695
2695
|
case 2:
|
|
2696
2696
|
return [2, _b2.sent().allPathsLoader];
|
|
2697
2697
|
case 3:
|
|
2698
2698
|
return [4, import(
|
|
2699
2699
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
2700
|
-
"./splitPathsBySizeLoader-
|
|
2700
|
+
"./splitPathsBySizeLoader-BclYBPrJ.js"
|
|
2701
2701
|
)];
|
|
2702
2702
|
case 4:
|
|
2703
2703
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -133454,6 +133454,7 @@ const useStyle = (props) => {
|
|
|
133454
133454
|
return {
|
|
133455
133455
|
overflow: props.shouldScroll ? "auto" : "hidden",
|
|
133456
133456
|
textAlign: (_a2 = props.textAlign) == null ? void 0 : _a2.toLowerCase(),
|
|
133457
|
+
alignItems: getVerticalAlignment(props.verticalAlign),
|
|
133457
133458
|
color: (_c2 = (_b2 = props.textStyle) == null ? void 0 : _b2.textColor) == null ? void 0 : _c2.default,
|
|
133458
133459
|
...props.style
|
|
133459
133460
|
};
|
|
@@ -133475,6 +133476,17 @@ const getTextAlignClass = (textAlign) => {
|
|
|
133475
133476
|
};
|
|
133476
133477
|
}
|
|
133477
133478
|
};
|
|
133479
|
+
const getVerticalAlignment = (verticalAlign) => {
|
|
133480
|
+
switch (verticalAlign) {
|
|
133481
|
+
case "top":
|
|
133482
|
+
return "flex-start";
|
|
133483
|
+
case "bottom":
|
|
133484
|
+
return "flex-end";
|
|
133485
|
+
case "center":
|
|
133486
|
+
default:
|
|
133487
|
+
return "center";
|
|
133488
|
+
}
|
|
133489
|
+
};
|
|
133478
133490
|
const useIconContainerStyles = ({
|
|
133479
133491
|
iconGap,
|
|
133480
133492
|
textAlign
|
|
@@ -143832,14 +143844,14 @@ function getLoaderFn(options) {
|
|
|
143832
143844
|
if (!(loader === "all")) return [3, 3];
|
|
143833
143845
|
return [4, import(
|
|
143834
143846
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
143835
|
-
"./allPathsLoader-
|
|
143847
|
+
"./allPathsLoader-C_jYLeY9.js"
|
|
143836
143848
|
)];
|
|
143837
143849
|
case 2:
|
|
143838
143850
|
return [2, _b2.sent().allPathsLoader];
|
|
143839
143851
|
case 3:
|
|
143840
143852
|
return [4, import(
|
|
143841
143853
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
143842
|
-
"./splitPathsBySizeLoader-
|
|
143854
|
+
"./splitPathsBySizeLoader-DiRcmbhL.js"
|
|
143843
143855
|
)];
|
|
143844
143856
|
case 4:
|
|
143845
143857
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -173399,6 +173411,10 @@ const StyledSingleDropDown = qe$1(SingleDropDown)`
|
|
|
173399
173411
|
display: -webkit-box;
|
|
173400
173412
|
-webkit-line-clamp: 1;
|
|
173401
173413
|
-webkit-box-orient: vertical;
|
|
173414
|
+
|
|
173415
|
+
&:disabled {
|
|
173416
|
+
cursor: not-allowed;
|
|
173417
|
+
}
|
|
173402
173418
|
}
|
|
173403
173419
|
`;
|
|
173404
173420
|
const StyledCrossIcon = qe$1(SvgCrossXs)`
|
|
@@ -173880,7 +173896,8 @@ class DropDownComponent extends React__default.PureComponent {
|
|
|
173880
173896
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(DynamicSVG, { iconName: this.props.icon, size: this.props.iconSize })
|
|
173881
173897
|
}
|
|
173882
173898
|
) : null;
|
|
173883
|
-
const
|
|
173899
|
+
const selectedItemHasIcon = !!(selectedIndex > -1 && ((_c2 = this.props.options[selectedIndex]) == null ? void 0 : _c2.icon));
|
|
173900
|
+
const singleSelectDropdownIconElement = selectedItemHasIcon ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
173884
173901
|
StyledIconSpan,
|
|
173885
173902
|
{
|
|
173886
173903
|
className: this.getIconClassNames(
|
|
@@ -173889,7 +173906,13 @@ class DropDownComponent extends React__default.PureComponent {
|
|
|
173889
173906
|
style: {
|
|
173890
173907
|
left: ((_e2 = (_d2 = this.props.inputPadding) == null ? void 0 : _d2.left) == null ? void 0 : _e2.value) ?? 0
|
|
173891
173908
|
},
|
|
173892
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
173909
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
173910
|
+
DynamicSVG,
|
|
173911
|
+
{
|
|
173912
|
+
iconName: this.props.options[selectedIndex].icon,
|
|
173913
|
+
size: this.props.iconSize
|
|
173914
|
+
}
|
|
173915
|
+
)
|
|
173893
173916
|
}
|
|
173894
173917
|
) : defaultIconElement;
|
|
173895
173918
|
const tagOptionIconElement = (tagIndex) => {
|
|
@@ -173900,7 +173923,7 @@ class DropDownComponent extends React__default.PureComponent {
|
|
|
173900
173923
|
return null;
|
|
173901
173924
|
};
|
|
173902
173925
|
const paddingVarDeclarations = createCssVariablesForPadding(
|
|
173903
|
-
!!this.props.icon,
|
|
173926
|
+
!!this.props.icon || selectedItemHasIcon,
|
|
173904
173927
|
this.props.inputPadding,
|
|
173905
173928
|
this.props.iconSize
|
|
173906
173929
|
);
|
|
@@ -174019,6 +174042,7 @@ class DropDownComponent extends React__default.PureComponent {
|
|
|
174019
174042
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
174020
174043
|
MultiDropDown,
|
|
174021
174044
|
{
|
|
174045
|
+
disabled: this.props.disabled,
|
|
174022
174046
|
overflowTags: this.props.overflowTags,
|
|
174023
174047
|
items: this.props.options,
|
|
174024
174048
|
labelHeight: this.props.vertical ? 26 : 0,
|
|
@@ -174228,13 +174252,16 @@ const propertiesDefinition$8 = {
|
|
|
174228
174252
|
}),
|
|
174229
174253
|
layout: Section.category(PropsPanelCategory.Layout).add(padding({ themeValue: DROPDOWN_PADDING, default: DROPDOWN_PADDING })).add(size$2()).add(margin()).add(visible()),
|
|
174230
174254
|
interaction: Section.category(PropsPanelCategory.Interaction).children({
|
|
174231
|
-
|
|
174255
|
+
multiselect: Prop.boolean().readAndWrite().default(false).propertiesPanel({
|
|
174232
174256
|
label: "Multi-select",
|
|
174233
174257
|
helpText: "Allows users to select either a single option or multiple options"
|
|
174234
174258
|
}),
|
|
174235
174259
|
allowSelectAll: Prop.boolean().readAndWrite().default(false).propertiesPanel({
|
|
174236
174260
|
label: "Select/Deselect all",
|
|
174237
|
-
helpText: "Enable a button to select/deselect all options"
|
|
174261
|
+
helpText: "Enable a button to select/deselect all options",
|
|
174262
|
+
isVisible: function() {
|
|
174263
|
+
return this.multiselect;
|
|
174264
|
+
}
|
|
174238
174265
|
}),
|
|
174239
174266
|
allowClearing: Prop.boolean().readAndWrite().default(false).propertiesPanel({
|
|
174240
174267
|
label: "Clearable",
|
|
@@ -174279,7 +174306,7 @@ const propertiesDefinition$8 = {
|
|
|
174279
174306
|
}),
|
|
174280
174307
|
derived: Section.category(PropsPanelCategory.Derived).children({
|
|
174281
174308
|
value: Prop.any().readable().default(function() {
|
|
174282
|
-
return this.
|
|
174309
|
+
return this.multiselect ? this.selectedOptionArr : this.selectedOptionValue;
|
|
174283
174310
|
}),
|
|
174284
174311
|
defaultTransformation: Prop.any().readable().default(function() {
|
|
174285
174312
|
if (!Array.isArray(this.options)) return;
|
|
@@ -174335,9 +174362,9 @@ const propertiesDefinition$8 = {
|
|
|
174335
174362
|
validationErrors: Prop.any().readable().default(function() {
|
|
174336
174363
|
const errors2 = {};
|
|
174337
174364
|
if (this.isRequired) {
|
|
174338
|
-
if (this.
|
|
174365
|
+
if (this.multiselect && this.selectedIndexArr && this.selectedIndexArr.length === 0) {
|
|
174339
174366
|
errors2.isRequired = "Required";
|
|
174340
|
-
} else if (!this.
|
|
174367
|
+
} else if (!this.multiselect && !this.selectedOption) {
|
|
174341
174368
|
errors2.isRequired = "Required";
|
|
174342
174369
|
}
|
|
174343
174370
|
}
|
|
@@ -174348,7 +174375,7 @@ const propertiesDefinition$8 = {
|
|
|
174348
174375
|
}),
|
|
174349
174376
|
selectedOptionValue: Prop.any().readable().default(function() {
|
|
174350
174377
|
var _a2;
|
|
174351
|
-
if (this.
|
|
174378
|
+
if (this.multiselect) return;
|
|
174352
174379
|
const normalizedValue = normalizeFunction(
|
|
174353
174380
|
this.metaSelectedOptionValue,
|
|
174354
174381
|
(_a2 = this.transformation) == null ? void 0 : _a2.value
|
|
@@ -174363,7 +174390,7 @@ const propertiesDefinition$8 = {
|
|
|
174363
174390
|
}
|
|
174364
174391
|
}),
|
|
174365
174392
|
selectedOptionValues: Prop.any().readable().default(function() {
|
|
174366
|
-
if (!this.
|
|
174393
|
+
if (!this.multiselect) return;
|
|
174367
174394
|
const normalize2 = (val) => {
|
|
174368
174395
|
var _a2;
|
|
174369
174396
|
return normalizeFunction(val, (_a2 = this.transformation) == null ? void 0 : _a2.value);
|
|
@@ -174384,7 +174411,7 @@ const propertiesDefinition$8 = {
|
|
|
174384
174411
|
}),
|
|
174385
174412
|
selectedOption: Prop.any().readable().default(function() {
|
|
174386
174413
|
var _a2;
|
|
174387
|
-
if (this.
|
|
174414
|
+
if (this.multiselect) return;
|
|
174388
174415
|
const normalizedValue = normalizeFunction(
|
|
174389
174416
|
this.metaSelectedOptionValue,
|
|
174390
174417
|
(_a2 = this.transformation) == null ? void 0 : _a2.value
|
|
@@ -174394,7 +174421,7 @@ const propertiesDefinition$8 = {
|
|
|
174394
174421
|
);
|
|
174395
174422
|
}),
|
|
174396
174423
|
selectedOptionArr: Prop.any().readable().default(function() {
|
|
174397
|
-
if (!this.
|
|
174424
|
+
if (!this.multiselect) return;
|
|
174398
174425
|
const normalize2 = (val) => {
|
|
174399
174426
|
var _a2;
|
|
174400
174427
|
return normalizeFunction(val, (_a2 = this.transformation) == null ? void 0 : _a2.value);
|
|
@@ -174410,7 +174437,7 @@ const propertiesDefinition$8 = {
|
|
|
174410
174437
|
}),
|
|
174411
174438
|
selectedIndex: Prop.number().readable().default(function() {
|
|
174412
174439
|
var _a2;
|
|
174413
|
-
if (this.
|
|
174440
|
+
if (this.multiselect) return;
|
|
174414
174441
|
const normalizedValue = normalizeFunction(
|
|
174415
174442
|
this.metaSelectedOptionValue,
|
|
174416
174443
|
(_a2 = this.transformation) == null ? void 0 : _a2.value
|
|
@@ -174520,20 +174547,20 @@ const SbDropdown = registerSbComponent(
|
|
|
174520
174547
|
},
|
|
174521
174548
|
[props.isTouched, update]
|
|
174522
174549
|
);
|
|
174523
|
-
const {
|
|
174550
|
+
const { multiselect, onOptionChange: propOnOptionChange } = props;
|
|
174524
174551
|
const onOptionSelected = useCallback(
|
|
174525
174552
|
(selectedOption) => {
|
|
174526
174553
|
if (selectedOption === null) {
|
|
174527
174554
|
if (props.selectedOption) {
|
|
174528
174555
|
update((e3) => e3.metaSelectedOptionValue = -1);
|
|
174529
|
-
if (!
|
|
174556
|
+
if (!multiselect) {
|
|
174530
174557
|
onClear();
|
|
174531
174558
|
}
|
|
174532
174559
|
}
|
|
174533
174560
|
return;
|
|
174534
174561
|
}
|
|
174535
174562
|
let isChanged = true;
|
|
174536
|
-
if (!
|
|
174563
|
+
if (!multiselect) {
|
|
174537
174564
|
if (props.selectedOption) {
|
|
174538
174565
|
isChanged = !lodashExports.isEqual(
|
|
174539
174566
|
normalize2(props.selectedOption.value),
|
|
@@ -174565,7 +174592,7 @@ const SbDropdown = registerSbComponent(
|
|
|
174565
174592
|
}
|
|
174566
174593
|
},
|
|
174567
174594
|
[
|
|
174568
|
-
|
|
174595
|
+
multiselect,
|
|
174569
174596
|
props.isTouched,
|
|
174570
174597
|
props.selectedOption,
|
|
174571
174598
|
propOnOptionChange,
|
|
@@ -174674,7 +174701,7 @@ const SbDropdown = registerSbComponent(
|
|
|
174674
174701
|
onFocusChange: handleFocusChange,
|
|
174675
174702
|
onSearchTextChange: onDebouncedSearchTextChange
|
|
174676
174703
|
};
|
|
174677
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(DropdownContainer, { ...passthroughProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DropdownStyleOverrides, { vertical: props.labelPosition === "top", children: props.
|
|
174704
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(DropdownContainer, { ...passthroughProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DropdownStyleOverrides, { vertical: props.labelPosition === "top", children: props.multiselect ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
174678
174705
|
DropDownComponent,
|
|
174679
174706
|
{
|
|
174680
174707
|
...commonProps,
|
|
@@ -178513,7 +178540,7 @@ const generateTextStyles = (textStyles, builtinTypographies, fallbackFont) => {
|
|
|
178513
178540
|
|
|
178514
178541
|
.${CLASS_NAMES.INPUT} {
|
|
178515
178542
|
input::placeholder,
|
|
178516
|
-
textarea::placeholder {
|
|
178543
|
+
.${INPUT$1}::placeholder, textarea::placeholder {
|
|
178517
178544
|
${styleFromTextBlockWithColors(textStyles.inputPlaceholder)}
|
|
178518
178545
|
}
|
|
178519
178546
|
}
|
|
@@ -190267,4 +190294,4 @@ export {
|
|
|
190267
190294
|
copyToClipboard as y,
|
|
190268
190295
|
navigateTo as z
|
|
190269
190296
|
};
|
|
190270
|
-
//# sourceMappingURL=index-
|
|
190297
|
+
//# sourceMappingURL=index-e6o5xaRw.js.map
|