@faststore/ui 2.0.30-alpha.0 → 2.0.33-alpha.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/CHANGELOG.md +37 -0
- package/dist/components/atoms/Incentive/Incentive.js +1 -1
- package/dist/components/atoms/Incentive/Incentive.js.map +1 -1
- package/dist/components/atoms/Popover/Popover.d.ts +1 -1
- package/dist/components/atoms/Popover/Popover.js +1 -1
- package/dist/components/atoms/Popover/Popover.js.map +1 -1
- package/dist/components/atoms/Skeleton/Skeleton.js +1 -1
- package/dist/components/atoms/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/atoms/Slider/Slider.d.ts +2 -2
- package/dist/components/atoms/Spinner/Spinner.d.ts +1 -1
- package/dist/components/atoms/Spinner/Spinner.js +1 -1
- package/dist/components/atoms/Spinner/Spinner.js.map +1 -1
- package/dist/components/atoms/TextArea/TextArea.js +1 -1
- package/dist/components/atoms/TextArea/TextArea.js.map +1 -1
- package/dist/components/molecules/Accordion/Accordion.js +1 -1
- package/dist/components/molecules/Accordion/Accordion.js.map +1 -1
- package/dist/components/molecules/Accordion/AccordionButton.js +2 -2
- package/dist/components/molecules/Accordion/AccordionButton.js.map +1 -1
- package/dist/components/molecules/Accordion/AccordionItem.d.ts +2 -2
- package/dist/components/molecules/Accordion/AccordionItem.js +1 -1
- package/dist/components/molecules/Accordion/AccordionItem.js.map +1 -1
- package/dist/components/molecules/Accordion/AccordionPanel.js +1 -1
- package/dist/components/molecules/Accordion/AccordionPanel.js.map +1 -1
- package/dist/components/molecules/AggregateRating/AggregateRating.d.ts +1 -1
- package/dist/components/molecules/AggregateRating/AggregateRating.js +2 -2
- package/dist/components/molecules/AggregateRating/AggregateRating.js.map +1 -1
- package/dist/components/molecules/Alert/Alert.js +1 -1
- package/dist/components/molecules/Alert/Alert.js.map +1 -1
- package/dist/components/molecules/Banner/Banner.d.ts +1 -1
- package/dist/components/molecules/Banner/Banner.js +1 -1
- package/dist/components/molecules/Banner/Banner.js.map +1 -1
- package/dist/components/molecules/Banner/BannerContent.js +1 -1
- package/dist/components/molecules/Banner/BannerContent.js.map +1 -1
- package/dist/components/molecules/Banner/BannerImage.js +1 -1
- package/dist/components/molecules/Banner/BannerImage.js.map +1 -1
- package/dist/components/molecules/Banner/BannerLink.js +1 -1
- package/dist/components/molecules/Banner/BannerLink.js.map +1 -1
- package/dist/components/molecules/Breadcrumb/Breadcrumb.js +3 -3
- package/dist/components/molecules/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/molecules/Bullets/Bullets.js +1 -1
- package/dist/components/molecules/Bullets/Bullets.js.map +1 -1
- package/dist/components/molecules/Card/Card.js +1 -1
- package/dist/components/molecules/Card/Card.js.map +1 -1
- package/dist/components/molecules/Card/CardActions.js +1 -1
- package/dist/components/molecules/Card/CardActions.js.map +1 -1
- package/dist/components/molecules/Card/CardContent.js +1 -1
- package/dist/components/molecules/Card/CardContent.js.map +1 -1
- package/dist/components/molecules/Card/CardImage.js +1 -1
- package/dist/components/molecules/Card/CardImage.js.map +1 -1
- package/dist/components/molecules/Carousel/Carousel.js +2 -2
- package/dist/components/molecules/Carousel/Carousel.js.map +1 -1
- package/dist/components/molecules/CartItem/CartItem.js +1 -1
- package/dist/components/molecules/CartItem/CartItem.js.map +1 -1
- package/dist/components/molecules/CartItem/CartItemActions.js +1 -1
- package/dist/components/molecules/CartItem/CartItemActions.js.map +1 -1
- package/dist/components/molecules/CartItem/CartItemContent.js +1 -1
- package/dist/components/molecules/CartItem/CartItemContent.js.map +1 -1
- package/dist/components/molecules/CartItem/CartItemImage.js +1 -1
- package/dist/components/molecules/CartItem/CartItemImage.js.map +1 -1
- package/dist/components/molecules/CartItem/CartItemPrices.js +1 -1
- package/dist/components/molecules/CartItem/CartItemPrices.js.map +1 -1
- package/dist/components/molecules/CartItem/CartItemSummary.js +1 -1
- package/dist/components/molecules/CartItem/CartItemSummary.js.map +1 -1
- package/dist/components/molecules/CartItem/CartItemTitle.js +1 -1
- package/dist/components/molecules/CartItem/CartItemTitle.js.map +1 -1
- package/dist/components/molecules/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/molecules/Dropdown/DropdownButton.js +1 -1
- package/dist/components/molecules/Dropdown/DropdownButton.js.map +1 -1
- package/dist/components/molecules/Dropdown/DropdownItem.js +1 -1
- package/dist/components/molecules/Dropdown/DropdownItem.js.map +1 -1
- package/dist/components/molecules/Dropdown/DropdownMenu.js +1 -1
- package/dist/components/molecules/Dropdown/DropdownMenu.js.map +1 -1
- package/dist/components/molecules/Dropdown/contexts/DropdownContext.d.ts +1 -1
- package/dist/components/molecules/Dropdown/hooks/useDropdownPosition.d.ts +1 -1
- package/dist/components/molecules/Form/Form.js +1 -1
- package/dist/components/molecules/Form/Form.js.map +1 -1
- package/dist/components/molecules/Gift/Gift.js +1 -1
- package/dist/components/molecules/Gift/Gift.js.map +1 -1
- package/dist/components/molecules/Gift/GiftContent.js +1 -1
- package/dist/components/molecules/Gift/GiftContent.js.map +1 -1
- package/dist/components/molecules/Gift/GiftImage.js +1 -1
- package/dist/components/molecules/Gift/GiftImage.js.map +1 -1
- package/dist/components/molecules/LoadingButton/LoadingButton.js +1 -1
- package/dist/components/molecules/LoadingButton/LoadingButton.js.map +1 -1
- package/dist/components/molecules/Modal/Modal.js +1 -1
- package/dist/components/molecules/Modal/Modal.js.map +1 -1
- package/dist/components/molecules/Modal/ModalContent.d.ts +1 -1
- package/dist/components/molecules/Modal/ModalContent.js +3 -3
- package/dist/components/molecules/Modal/ModalContent.js.map +1 -1
- package/dist/components/molecules/OrderSummary/OrderSummary.d.ts +1 -1
- package/dist/components/molecules/OrderSummary/OrderSummary.js +1 -1
- package/dist/components/molecules/OrderSummary/OrderSummary.js.map +1 -1
- package/dist/components/molecules/PaymentMethods/PaymentMethods.js +1 -1
- package/dist/components/molecules/PaymentMethods/PaymentMethods.js.map +1 -1
- package/dist/components/molecules/PriceRange/PriceRange.d.ts +2 -2
- package/dist/components/molecules/ProductCard/ProductCard.js +1 -1
- package/dist/components/molecules/ProductCard/ProductCard.js.map +1 -1
- package/dist/components/molecules/ProductCard/ProductCardActions.js +1 -1
- package/dist/components/molecules/ProductCard/ProductCardActions.js.map +1 -1
- package/dist/components/molecules/ProductCard/ProductCardContent.js +1 -1
- package/dist/components/molecules/ProductCard/ProductCardContent.js.map +1 -1
- package/dist/components/molecules/ProductCard/ProductCardImage.js +1 -1
- package/dist/components/molecules/ProductCard/ProductCardImage.js.map +1 -1
- package/dist/components/molecules/ProductTitle/ProductTitle.d.ts +1 -1
- package/dist/components/molecules/ProductTitle/ProductTitle.js +1 -1
- package/dist/components/molecules/ProductTitle/ProductTitle.js.map +1 -1
- package/dist/components/molecules/QuantitySelector/QuantitySelector.js +4 -4
- package/dist/components/molecules/QuantitySelector/QuantitySelector.js.map +1 -1
- package/dist/components/molecules/QuantitySelector/stories/assets/Icons.d.ts +1 -1
- package/dist/components/molecules/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/molecules/RadioGroup/RadioOption.js +1 -1
- package/dist/components/molecules/RadioGroup/RadioOption.js.map +1 -1
- package/dist/components/molecules/SearchInput/SearchInput.d.ts +1 -1
- package/dist/components/molecules/SearchInput/SearchInput.js +1 -1
- package/dist/components/molecules/SearchInput/SearchInput.js.map +1 -1
- package/dist/components/molecules/SkuSelector/SkuSelector.d.ts +1 -1
- package/dist/components/molecules/SkuSelector/SkuSelector.js +1 -1
- package/dist/components/molecules/SkuSelector/SkuSelector.js.map +1 -1
- package/dist/components/organisms/OutOfStock/OutOfStock.d.ts +2 -2
- package/dist/components/organisms/OutOfStock/OutOfStock.js +1 -1
- package/dist/components/organisms/OutOfStock/OutOfStock.js.map +1 -1
- package/dist/components/organisms/OutOfStock/OutOfStockMessage.d.ts +1 -1
- package/dist/components/organisms/OutOfStock/OutOfStockMessage.js +1 -1
- package/dist/components/organisms/OutOfStock/OutOfStockMessage.js.map +1 -1
- package/dist/components/organisms/OutOfStock/OutOfStockTitle.d.ts +1 -1
- package/dist/components/organisms/OutOfStock/OutOfStockTitle.js +1 -1
- package/dist/components/organisms/OutOfStock/OutOfStockTitle.js.map +1 -1
- package/dist/components/organisms/Tiles/Tile.js +1 -1
- package/dist/components/organisms/Tiles/Tile.js.map +1 -1
- package/dist/components/organisms/Tiles/Tiles.js +1 -1
- package/dist/components/organisms/Tiles/Tiles.js.map +1 -1
- package/dist/hooks/useSlider/useSlider.d.ts +3 -3
- package/dist/typings/PolymorphicGenerics.d.ts +6 -6
- package/package.json +10 -8
- package/src/components/atoms/Popover/stories/Popover.stories.tsx +3 -2
- package/src/components/molecules/Form/stories/Form.stories.tsx +0 -1
- package/src/components/organisms/OutOfStock/stories/OutOfStock.stories.tsx +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { IconButton, Input } from '@faststore/components';
|
|
3
3
|
const QuantitySelector = forwardRef(function QuantitySelector({ quantity, testId = 'store-quantity-selector', leftButtonProps, inputProps, rightButtonProps, ...otherProps }, ref) {
|
|
4
|
-
return (React.createElement("div",
|
|
5
|
-
React.createElement(IconButton,
|
|
6
|
-
React.createElement(Input,
|
|
7
|
-
React.createElement(IconButton,
|
|
4
|
+
return (React.createElement("div", { "data-fs-quantity-selector": true, "data-testid": testId, ref: ref, ...otherProps },
|
|
5
|
+
React.createElement(IconButton, { "aria-controls": "quantity-selector-input", "aria-label": "Decrement Quantity", "data-quantity-selector-button": "left", ...leftButtonProps }),
|
|
6
|
+
React.createElement(Input, { "aria-label": "Quantity", "data-quantity-selector-input": true, id: "quantity-selector-input", value: quantity, ...inputProps }),
|
|
7
|
+
React.createElement(IconButton, { "aria-controls": "quantity-selector-input", "aria-label": "Increment Quantity", "data-quantity-selector-button": "right", ...rightButtonProps })));
|
|
8
8
|
});
|
|
9
9
|
export default QuantitySelector;
|
|
10
10
|
//# sourceMappingURL=QuantitySelector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuantitySelector.js","sourceRoot":"","sources":["../../../../src/components/molecules/QuantitySelector/QuantitySelector.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAgCzD,MAAM,gBAAgB,GAAG,UAAU,CACjC,SAAS,gBAAgB,CACvB,EACE,QAAQ,EACR,MAAM,GAAG,yBAAyB,EAClC,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,GAAG,UAAU,EACS,EACxB,GAAG;IAEH,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"QuantitySelector.js","sourceRoot":"","sources":["../../../../src/components/molecules/QuantitySelector/QuantitySelector.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAgCzD,MAAM,gBAAgB,GAAG,UAAU,CACjC,SAAS,gBAAgB,CACvB,EACE,QAAQ,EACR,MAAM,GAAG,yBAAyB,EAClC,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,GAAG,UAAU,EACS,EACxB,GAAG;IAEH,OAAO,CACL,+EAEe,MAAM,EACnB,GAAG,EAAE,GAAG,KACJ,UAAU;QAEd,oBAAC,UAAU,qBACK,yBAAyB,gBAC5B,oBAAoB,mCACD,MAAM,KAChC,eAAe,GACnB;QACF,oBAAC,KAAK,kBACO,UAAU,wCAErB,EAAE,EAAC,yBAAyB,EAC5B,KAAK,EAAE,QAAQ,KACX,UAAU,GACd;QACF,oBAAC,UAAU,qBACK,yBAAyB,gBAC5B,oBAAoB,mCACD,OAAO,KACjC,gBAAgB,GACpB,CACE,CACP,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
2
|
import { RadioGroupContext } from './useRadioGroup';
|
|
3
|
-
export
|
|
3
|
+
export type RadioGroupProps = PropsWithChildren<RadioGroupContext>;
|
|
4
4
|
declare const RadioGroup: ({ name, onChange, children, selectedValue, }: RadioGroupProps) => JSX.Element;
|
|
5
5
|
export default RadioGroup;
|
|
@@ -4,7 +4,7 @@ import { useRadioGroup } from './useRadioGroup';
|
|
|
4
4
|
const RadioOption = forwardRef(function RadioOption({ label, value, children, testId = 'store-radio-option', ...otherProps }, ref) {
|
|
5
5
|
const { name, selectedValue, onChange } = useRadioGroup();
|
|
6
6
|
return (React.createElement("label", { "aria-label": label, "data-fs-radio-option": true },
|
|
7
|
-
React.createElement(Radio,
|
|
7
|
+
React.createElement(Radio, { "data-fs-radio-option-item": true, ref: ref, name: name, checked: value === selectedValue, onChange: onChange, value: value, testId: testId, ...otherProps }),
|
|
8
8
|
children));
|
|
9
9
|
});
|
|
10
10
|
export default RadioOption;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioOption.js","sourceRoot":"","sources":["../../../../src/components/molecules/RadioGroup/RadioOption.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAmB/C,MAAM,WAAW,GAAG,UAAU,CAC5B,SAAS,WAAW,CAClB,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,GAAG,oBAAoB,EAAE,GAAG,UAAU,EAAE,EACxE,GAAG;IAEH,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,aAAa,EAAE,CAAA;IAEzD,OAAO,CACL,6CAAmB,KAAK;QACtB,oBAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"RadioOption.js","sourceRoot":"","sources":["../../../../src/components/molecules/RadioGroup/RadioOption.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAmB/C,MAAM,WAAW,GAAG,UAAU,CAC5B,SAAS,WAAW,CAClB,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,GAAG,oBAAoB,EAAE,GAAG,UAAU,EAAE,EACxE,GAAG;IAEH,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,aAAa,EAAE,CAAA;IAEzD,OAAO,CACL,6CAAmB,KAAK;QACtB,oBAAC,KAAK,uCAEJ,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,KAAK,KAAK,aAAa,EAChC,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,KACV,UAAU,GACd;QACD,QAAQ,CACH,CACT,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AriaAttributes, InputHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
|
|
3
|
+
type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'onSubmit'>;
|
|
4
4
|
export interface SearchInputProps extends InputProps {
|
|
5
5
|
/**
|
|
6
6
|
* Callback function when submitted.
|
|
@@ -18,7 +18,7 @@ const SearchInput = forwardRef(function SearchInput({ onSubmit, icon, 'aria-labe
|
|
|
18
18
|
formRef: formRef.current,
|
|
19
19
|
}));
|
|
20
20
|
return (React.createElement(Form, { ref: formRef, "data-fs-search-input-form": true, "data-testid": testId, onSubmit: handleSubmit, role: "search" },
|
|
21
|
-
React.createElement(Input,
|
|
21
|
+
React.createElement(Input, { ref: inputRef, "aria-label": ariaLabel, ...otherProps }),
|
|
22
22
|
React.createElement(Button, { type: "submit", "aria-label": "Submit Search" },
|
|
23
23
|
React.createElement(Icon, { component: icon ?? React.createElement(SearchIcon, null) }))));
|
|
24
24
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.js","sourceRoot":"","sources":["../../../../src/components/molecules/SearchInput/SearchInput.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEtE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,IAAI,MAAM,SAAS,CAAA;AAE1B,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,CACvB,6BACE,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,KAAK,EACX,MAAM,EAAC,KAAK,EACZ,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO;IAEtB,gCAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,GAAG,GAAG;IAChC,8BAAM,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,OAAO,EAAC,EAAE,EAAC,OAAO,GAAG,CAC1C,CACP,CAAA;AA6BD,MAAM,WAAW,GAAG,UAAU,CAC5B,SAAS,WAAW,CAClB,EACE,QAAQ,EACR,IAAI,EACJ,YAAY,EAAE,SAAS,GAAG,QAAQ,EAClC,MAAM,GAAG,oBAAoB,EAC7B,GAAG,UAAU,EACd,EACD,GAAG;IAEH,MAAM,QAAQ,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAA;IAC/C,MAAM,OAAO,GAAG,MAAM,CAAk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
23
23
|
disabled?: boolean;
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
type Variant = 'label' | 'image';
|
|
26
26
|
export interface SkuSelectorProps extends HTMLAttributes<HTMLDivElement> {
|
|
27
27
|
/**
|
|
28
28
|
* ID to find this component in testing tools (e.g.: cypress,
|
|
@@ -3,7 +3,7 @@ import { Label } from '@faststore/components';
|
|
|
3
3
|
import RadioGroup from '../RadioGroup';
|
|
4
4
|
const SkuSelector = forwardRef(function SkuSelector({ id, label, variant, onChange, testId = 'store-sku-selector', activeValue, children, ...otherProps }, ref) {
|
|
5
5
|
const radioGroupId = id ? `-${id}` : '';
|
|
6
|
-
return (React.createElement("div",
|
|
6
|
+
return (React.createElement("div", { ref: ref, "data-fs-sku-selector": true, "data-testid": testId, "data-fs-sku-selector-variant": variant, ...otherProps },
|
|
7
7
|
label && (React.createElement(Label, { "data-fs-sku-selector-title": true },
|
|
8
8
|
label,
|
|
9
9
|
": ",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkuSelector.js","sourceRoot":"","sources":["../../../../src/components/molecules/SkuSelector/SkuSelector.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,OAAO,UAAU,MAAM,eAAe,CAAA;AA4DtC,MAAM,WAAW,GAAG,UAAU,CAC5B,SAAS,WAAW,CAClB,EACE,EAAE,EACF,KAAK,EACL,OAAO,EACP,QAAQ,EACR,MAAM,GAAG,oBAAoB,EAC7B,WAAW,EACX,QAAQ,EACR,GAAG,UAAU,EACd,EACD,GAAG;IAEH,MAAM,YAAY,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IAEvC,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"SkuSelector.js","sourceRoot":"","sources":["../../../../src/components/molecules/SkuSelector/SkuSelector.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,OAAO,UAAU,MAAM,eAAe,CAAA;AA4DtC,MAAM,WAAW,GAAG,UAAU,CAC5B,SAAS,WAAW,CAClB,EACE,EAAE,EACF,KAAK,EACL,OAAO,EACP,QAAQ,EACR,MAAM,GAAG,oBAAoB,EAC7B,WAAW,EACX,QAAQ,EACR,GAAG,UAAU,EACd,EACD,GAAG;IAEH,MAAM,YAAY,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IAEvC,OAAO,CACL,6BACE,GAAG,EAAE,GAAG,+CAEK,MAAM,kCACW,OAAO,KACjC,UAAU;QAEb,KAAK,IAAI,CACR,oBAAC,KAAK;YACH,KAAK;;YAAG,oCAAS,WAAW,CAAU,CACjC,CACT;QACD,oBAAC,UAAU,IACT,aAAa,EAAE,WAAW,EAC1B,IAAI,EAAE,gBAAgB,OAAO,GAAG,YAAY,EAAE,EAC9C,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;gBACd,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAA;YACf,CAAC,IAEA,QAAQ,CACE,CACT,CACP,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ReactNode, FormHTMLAttributes } from 'react';
|
|
3
|
-
export
|
|
3
|
+
export type OutOfStockBaseProps = {
|
|
4
4
|
/**
|
|
5
5
|
* ID to find this component in testing tools (e.g.: cypress,
|
|
6
6
|
* testing-library, and jest).
|
|
@@ -11,7 +11,7 @@ export declare type OutOfStockBaseProps = {
|
|
|
11
11
|
*/
|
|
12
12
|
children: string | ReactNode;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type OutOfStockProps = OutOfStockBaseProps & {
|
|
15
15
|
/**
|
|
16
16
|
* Event emitted when form is submitted.
|
|
17
17
|
*/
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Form from '../../molecules/Form';
|
|
3
3
|
const OutOfStock = ({ testId = 'store-out-of-stock', children, ...otherProps }) => {
|
|
4
4
|
return (React.createElement("section", { "data-fs-out-of-stock": true, "data-testid": testId },
|
|
5
|
-
React.createElement(Form,
|
|
5
|
+
React.createElement(Form, { "data-out-of-stock-form": true, testId: `${testId}-form`, ...otherProps }, children)));
|
|
6
6
|
};
|
|
7
7
|
export default OutOfStock;
|
|
8
8
|
//# sourceMappingURL=OutOfStock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutOfStock.js","sourceRoot":"","sources":["../../../../src/components/organisms/OutOfStock/OutOfStock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,IAAI,MAAM,sBAAsB,CAAA;AAqBvC,MAAM,UAAU,GAAG,CAAC,EAClB,MAAM,GAAG,oBAAoB,EAC7B,QAAQ,EACR,GAAG,UAAU,EACG,EAAE,EAAE;IACpB,OAAO,CACL,8EAA2C,MAAM;QAC/C,oBAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"OutOfStock.js","sourceRoot":"","sources":["../../../../src/components/organisms/OutOfStock/OutOfStock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,IAAI,MAAM,sBAAsB,CAAA;AAqBvC,MAAM,UAAU,GAAG,CAAC,EAClB,MAAM,GAAG,oBAAoB,EAC7B,QAAQ,EACR,GAAG,UAAU,EACG,EAAE,EAAE;IACpB,OAAO,CACL,8EAA2C,MAAM;QAC/C,oBAAC,IAAI,oCAAwB,MAAM,EAAE,GAAG,MAAM,OAAO,KAAM,UAAU,IAClE,QAAQ,CACJ,CACC,CACX,CAAA;AACH,CAAC,CAAA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export const OutOfStockMessage = ({ as: MessageComponent = 'p', testId = 'store-out-of-stock-message', children, ...otherProps }) => {
|
|
3
|
-
return (React.createElement(MessageComponent,
|
|
3
|
+
return (React.createElement(MessageComponent, { "data-out-of-stock-message": true, "data-testid": testId, ...otherProps }, children));
|
|
4
4
|
};
|
|
5
5
|
//# sourceMappingURL=OutOfStockMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutOfStockMessage.js","sourceRoot":"","sources":["../../../../src/components/organisms/OutOfStock/OutOfStockMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAChC,EAAE,EAAE,gBAAgB,GAAG,GAAG,EAC1B,MAAM,GAAG,4BAA4B,EACrC,QAAQ,EACR,GAAG,UAAU,EACU,EAAE,EAAE;IAC3B,OAAO,CACL,oBAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"OutOfStockMessage.js","sourceRoot":"","sources":["../../../../src/components/organisms/OutOfStock/OutOfStockMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAChC,EAAE,EAAE,gBAAgB,GAAG,GAAG,EAC1B,MAAM,GAAG,4BAA4B,EACrC,QAAQ,EACR,GAAG,UAAU,EACU,EAAE,EAAE;IAC3B,OAAO,CACL,oBAAC,gBAAgB,sDAEF,MAAM,KACf,UAAU,IAEb,QAAQ,CACQ,CACpB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export const OutOfStockTitle = ({ as: TitleComponent = 'h2', testId = 'store-out-of-stock-title', children, ...otherProps }) => {
|
|
3
|
-
return (React.createElement(TitleComponent,
|
|
3
|
+
return (React.createElement(TitleComponent, { "data-out-of-stock-title": true, "data-testid": testId, ...otherProps }, children));
|
|
4
4
|
};
|
|
5
5
|
//# sourceMappingURL=OutOfStockTitle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutOfStockTitle.js","sourceRoot":"","sources":["../../../../src/components/organisms/OutOfStock/OutOfStockTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,EAAE,EAAE,cAAc,GAAG,IAAI,EACzB,MAAM,GAAG,0BAA0B,EACnC,QAAQ,EACR,GAAG,UAAU,EACQ,EAAE,EAAE;IACzB,OAAO,CACL,oBAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"OutOfStockTitle.js","sourceRoot":"","sources":["../../../../src/components/organisms/OutOfStock/OutOfStockTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,EAAE,EAAE,cAAc,GAAG,IAAI,EACzB,MAAM,GAAG,0BAA0B,EACnC,QAAQ,EACR,GAAG,UAAU,EACQ,EAAE,EAAE;IACzB,OAAO,CACL,oBAAC,cAAc,oDAEA,MAAM,KACf,UAAU,IAEb,QAAQ,CACM,CAClB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
const Tile = forwardRef(function Tile({ testId = 'store-tile', children, ...otherProps }, ref) {
|
|
3
|
-
return (React.createElement("li",
|
|
3
|
+
return (React.createElement("li", { ref: ref, "data-fs-tile": true, "data-testid": testId, ...otherProps }, children));
|
|
4
4
|
});
|
|
5
5
|
export default Tile;
|
|
6
6
|
//# sourceMappingURL=Tile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.js","sourceRoot":"","sources":["../../../../src/components/organisms/Tiles/Tile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAWzC,MAAM,IAAI,GAAG,UAAU,CAA2B,SAAS,IAAI,CAC7D,EAAE,MAAM,GAAG,YAAY,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAClD,GAAG;IAEH,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"Tile.js","sourceRoot":"","sources":["../../../../src/components/organisms/Tiles/Tile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAWzC,MAAM,IAAI,GAAG,UAAU,CAA2B,SAAS,IAAI,CAC7D,EAAE,MAAM,GAAG,YAAY,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,EAClD,GAAG;IAEH,OAAO,CACL,4BAAI,GAAG,EAAE,GAAG,uCAA4B,MAAM,KAAM,UAAU,IAC3D,QAAQ,CACN,CACN,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,IAAI,CAAA"}
|
|
@@ -24,7 +24,7 @@ const Tiles = forwardRef(function Tiles({ testId = 'store-tiles', children, ...o
|
|
|
24
24
|
: childrenCount === NUMBER_ITEMS_TO_EXPAND_FIRST_TWO
|
|
25
25
|
? 'expanded-first-two'
|
|
26
26
|
: '';
|
|
27
|
-
return (React.createElement("ul",
|
|
27
|
+
return (React.createElement("ul", { ref: ref, "data-fs-tiles": true, "data-fs-tiles-variant": expandedClass, "data-testid": testId, ...otherProps }, children));
|
|
28
28
|
});
|
|
29
29
|
export default Tiles;
|
|
30
30
|
//# sourceMappingURL=Tiles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tiles.js","sourceRoot":"","sources":["../../../../src/components/organisms/Tiles/Tiles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAA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Q,CACN,CACN,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,KAAK,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Dispatch } from 'react';
|
|
2
2
|
import type { SwipeableProps } from 'react-swipeable';
|
|
3
|
-
export
|
|
3
|
+
export type SlideDirection = 'next' | 'previous';
|
|
4
4
|
interface NextPageAction {
|
|
5
5
|
type: 'NEXT_PAGE';
|
|
6
6
|
}
|
|
@@ -17,8 +17,8 @@ interface GoToPageAction {
|
|
|
17
17
|
interface StopSlideAction {
|
|
18
18
|
type: 'STOP_SLIDE';
|
|
19
19
|
}
|
|
20
|
-
export
|
|
21
|
-
export
|
|
20
|
+
export type Action = NextPageAction | PreviousPageAction | StopSlideAction | GoToPageAction;
|
|
21
|
+
export type SliderDispatch = Dispatch<Action>;
|
|
22
22
|
export interface SliderState {
|
|
23
23
|
/**
|
|
24
24
|
* The `currentItem` in a Slider with multiple items in a single page is
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Article link: https://www.benmvp.com/blog/forwarding-refs-polymorphic-react-component-typescript/
|
|
6
6
|
*/
|
|
7
7
|
import type { ComponentPropsWithoutRef, ComponentPropsWithRef, ElementType } from 'react';
|
|
8
|
-
|
|
8
|
+
type AsProp<C extends ElementType> = {
|
|
9
9
|
as?: C;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
@@ -13,16 +13,16 @@ declare type AsProp<C extends ElementType> = {
|
|
|
13
13
|
* (`OverrideProps`), ensuring that any duplicates are overridden by the overriding
|
|
14
14
|
* set of props.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
type ExtendableProps<ExtendedProps = Record<string, never>, OverrideProps = Record<string, never>> = OverrideProps & Omit<ExtendedProps, keyof OverrideProps>;
|
|
17
17
|
/**
|
|
18
18
|
* Allows for inheriting the props from the specified element type so that
|
|
19
19
|
* props like children, className & style work, as well as element-specific
|
|
20
20
|
* attributes like aria roles. The component (`C`) must be passed in.
|
|
21
21
|
*/
|
|
22
|
-
|
|
23
|
-
export
|
|
24
|
-
export
|
|
22
|
+
type InheritableElementProps<C extends ElementType, Props = Record<string, never>> = ExtendableProps<ComponentPropsWithoutRef<C>, Props>;
|
|
23
|
+
export type PolymorphicComponentProps<C extends ElementType, Props = Record<string, never>> = InheritableElementProps<C, Props & AsProp<C>>;
|
|
24
|
+
export type PolymorphicComponentPropsWithRef<C extends ElementType, P = Record<string, never>> = PolymorphicComponentProps<C, P> & {
|
|
25
25
|
ref?: ComponentPropsWithRef<C>['ref'];
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type PolymorphicRef<C extends ElementType> = PolymorphicComponentPropsWithRef<C>['ref'];
|
|
28
28
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.33-alpha.0",
|
|
4
4
|
"description": "A lightweight, framework agnostic component library for React",
|
|
5
5
|
"author": "emersonlaurentino",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,13 +44,14 @@
|
|
|
44
44
|
"tabbable": "^5.2.1"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"react": "^
|
|
48
|
-
"react-dom": "^
|
|
47
|
+
"react": "^18.2.0",
|
|
48
|
+
"react-dom": "^18.2.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@babel/core": "^7.19.6",
|
|
52
|
-
"@faststore/
|
|
53
|
-
"@faststore/
|
|
52
|
+
"@faststore/eslint-config": "^2.0.33-alpha.0",
|
|
53
|
+
"@faststore/shared": "^2.0.33-alpha.0",
|
|
54
|
+
"@faststore/styles": "^2.0.33-alpha.0",
|
|
54
55
|
"@size-limit/preset-small-lib": "^7.0.8",
|
|
55
56
|
"@storybook/addon-a11y": "^6.5.13",
|
|
56
57
|
"@storybook/addon-actions": "^6.5.13",
|
|
@@ -65,8 +66,9 @@
|
|
|
65
66
|
"@types/tabbable": "^3.1.1",
|
|
66
67
|
"babel-loader": "^8.2.5",
|
|
67
68
|
"css-loader": "^6.7.1",
|
|
68
|
-
"
|
|
69
|
-
"react
|
|
69
|
+
"eslint": "7.32.0",
|
|
70
|
+
"react": "^18.2.0",
|
|
71
|
+
"react-dom": "^18.2.0",
|
|
70
72
|
"sass": "^1.55.0",
|
|
71
73
|
"sass-loader": "^13.1.0",
|
|
72
74
|
"size-limit": "^7.0.8",
|
|
@@ -78,5 +80,5 @@
|
|
|
78
80
|
"node": "16.18.0",
|
|
79
81
|
"yarn": "1.19.1"
|
|
80
82
|
},
|
|
81
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "64b82f07ceaa1f7b1f374cd0588dbc82e39d1fc6"
|
|
82
84
|
}
|
|
@@ -16,7 +16,6 @@ const PopoverTemplate: Story<PopoverProps> = ({ children }) => {
|
|
|
16
16
|
<label>
|
|
17
17
|
<span>Type for a special message</span>
|
|
18
18
|
<Input
|
|
19
|
-
variant={value.length > 0 ? 'success' : undefined}
|
|
20
19
|
type="text"
|
|
21
20
|
onChange={(event) => setValue(event.target.value)}
|
|
22
21
|
ref={ref}
|
|
@@ -38,7 +37,7 @@ const argTypes: ComponentArgTypes<Omit<PopoverProps, 'targetRef'>> = {
|
|
|
38
37
|
},
|
|
39
38
|
}
|
|
40
39
|
|
|
41
|
-
|
|
40
|
+
const story = {
|
|
42
41
|
title: 'Atoms/Popover',
|
|
43
42
|
argTypes,
|
|
44
43
|
parameters: {
|
|
@@ -47,3 +46,5 @@ export default {
|
|
|
47
46
|
},
|
|
48
47
|
},
|
|
49
48
|
}
|
|
49
|
+
|
|
50
|
+
export default story
|