@faststore/ui 1.3.26 → 1.3.30

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/ui.esm.js CHANGED
@@ -235,37 +235,28 @@ const Slider = ({
235
235
  }));
236
236
  };
237
237
 
238
- const variantToType = variant => {
239
- switch (variant) {
240
- case 'description':
241
- return 'dl';
242
-
243
- case 'unordered':
244
- return 'ul';
245
-
246
- case 'ordered':
247
- return 'ol';
248
-
249
- default:
250
- return 'ul';
251
- }
238
+ const variantToElement = {
239
+ description: 'dl',
240
+ unordered: 'ul',
241
+ ordered: 'ol'
252
242
  };
253
-
254
243
  const List = /*#__PURE__*/forwardRef(function List({
255
244
  testId = 'store-list',
256
245
  variant = 'unordered',
257
- as,
258
- ...rawProps
246
+ as: MaybeComponent,
247
+ ...otherProps
259
248
  }, ref) {
249
+ var _ref;
250
+
260
251
  const dataAttributes = {
261
252
  'data-testid': testId,
262
253
  'data-store-list': true,
263
254
  [`data-${variant}`]: true
264
255
  };
265
- const Component = as != null ? as : variantToType(variant);
256
+ const Component = (_ref = MaybeComponent != null ? MaybeComponent : variantToElement[variant]) != null ? _ref : 'ul';
266
257
  return React.createElement(Component, Object.assign({
267
258
  ref: ref
268
- }, dataAttributes, rawProps));
259
+ }, dataAttributes, otherProps));
269
260
  });
270
261
 
271
262
  const Skeleton = /*#__PURE__*/forwardRef(function Skeleton({
@@ -1013,6 +1004,43 @@ const Banner = ({
1013
1004
  }, children);
1014
1005
  };
1015
1006
 
1007
+ const BannerImage = /*#__PURE__*/forwardRef(function BannerImage({
1008
+ testId = 'store-banner-image',
1009
+ children,
1010
+ ...otherProps
1011
+ }, ref) {
1012
+ return React.createElement("div", Object.assign({
1013
+ ref: ref,
1014
+ "data-store-banner-image": true,
1015
+ "data-testid": testId
1016
+ }, otherProps), children);
1017
+ });
1018
+
1019
+ const BannerContent = /*#__PURE__*/forwardRef(function BannerContent({
1020
+ testId = 'store-banner-content',
1021
+ children,
1022
+ ...otherProps
1023
+ }, ref) {
1024
+ return React.createElement("div", Object.assign({
1025
+ ref: ref,
1026
+ role: "region",
1027
+ "data-store-banner-content": true,
1028
+ "data-testid": testId
1029
+ }, otherProps), children);
1030
+ });
1031
+
1032
+ const BannerLink = /*#__PURE__*/forwardRef(function BannerLink({
1033
+ testId = 'store-banner-link',
1034
+ children,
1035
+ ...otherProps
1036
+ }, ref) {
1037
+ return React.createElement("div", Object.assign({
1038
+ ref: ref,
1039
+ "data-store-banner-link": true,
1040
+ "data-testid": testId
1041
+ }, otherProps), children);
1042
+ });
1043
+
1016
1044
  const PaymentMethods = /*#__PURE__*/forwardRef(function PaymentMethods({
1017
1045
  testId = 'store-payment-methods',
1018
1046
  title,
@@ -1457,5 +1485,5 @@ const Alert = /*#__PURE__*/forwardRef(function Alert({
1457
1485
  }, otherProps), children);
1458
1486
  });
1459
1487
 
1460
- export { Accordion, AccordionButton, AccordionItem, AccordionPanel, Alert, Badge, Banner, Breadcrumb, Bullets, Button, Carousel, Checkbox, Form, Icon, IconButton, Input, Label, List, LoadingButton, Modal, Overlay, PaymentMethods, Popover, Price, PriceRange, Radio, RadioGroup, RadioOption, SearchInput, Select, Skeleton, Slider, Spinner, Table, TableBody, TableCell, TableFooter, TableHead, TableRow, TextArea, useSlider };
1488
+ export { Accordion, AccordionButton, AccordionItem, AccordionPanel, Alert, Badge, Banner, BannerContent, BannerImage, BannerLink, Breadcrumb, Bullets, Button, Carousel, Checkbox, Form, Icon, IconButton, Input, Label, List, LoadingButton, Modal, Overlay, PaymentMethods, Popover, Price, PriceRange, Radio, RadioGroup, RadioOption, SearchInput, Select, Skeleton, Slider, Spinner, Table, TableBody, TableCell, TableFooter, TableHead, TableRow, TextArea, useSlider };
1461
1489
  //# sourceMappingURL=ui.esm.js.map