@faststore/ui 2.0.14-alpha.0 → 2.0.15-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.
Files changed (29) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/components/molecules/AggregateRating/AggregateRating.d.ts +3 -3
  3. package/dist/components/molecules/AggregateRating/AggregateRating.js +3 -3
  4. package/dist/components/molecules/AggregateRating/AggregateRating.js.map +1 -1
  5. package/dist/components/molecules/Breadcrumb/Breadcrumb.js +2 -2
  6. package/dist/components/molecules/Breadcrumb/Breadcrumb.js.map +1 -1
  7. package/dist/components/molecules/OrderSummary/OrderSummary.d.ts +3 -3
  8. package/dist/components/molecules/OrderSummary/OrderSummary.js +1 -1
  9. package/dist/components/molecules/OrderSummary/OrderSummary.js.map +1 -1
  10. package/dist/index.d.ts +0 -2
  11. package/dist/index.js +0 -1
  12. package/dist/index.js.map +1 -1
  13. package/package.json +2 -2
  14. package/src/components/atoms/List/styles.scss +27 -0
  15. package/src/components/molecules/AggregateRating/AggregateRating.tsx +4 -11
  16. package/src/components/molecules/Breadcrumb/Breadcrumb.tsx +2 -2
  17. package/src/components/molecules/OrderSummary/OrderSummary.tsx +3 -2
  18. package/src/index.ts +0 -3
  19. package/src/styles/components.scss +1 -0
  20. package/dist/components/atoms/List/List.d.ts +0 -12
  21. package/dist/components/atoms/List/List.js +0 -16
  22. package/dist/components/atoms/List/List.js.map +0 -1
  23. package/dist/components/atoms/List/index.d.ts +0 -2
  24. package/dist/components/atoms/List/index.js +0 -2
  25. package/dist/components/atoms/List/index.js.map +0 -1
  26. package/src/components/atoms/List/List.tsx +0 -38
  27. package/src/components/atoms/List/index.ts +0 -2
  28. package/src/components/atoms/List/stories/List.mdx +0 -33
  29. package/src/components/atoms/List/stories/List.stories.tsx +0 -73
package/CHANGELOG.md CHANGED
@@ -3,6 +3,15 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.0.15-alpha.0](https://github.com/vtex/faststore/compare/v2.0.14-alpha.0...v2.0.15-alpha.0) (2022-12-14)
7
+
8
+
9
+ ### Features
10
+
11
+ * Adds `List` component ([#1549](https://github.com/vtex/faststore/issues/1549)) ([55858fe](https://github.com/vtex/faststore/commit/55858fe39c254786e7c7a1e1dd3da96ed3be0d16))
12
+
13
+
14
+
6
15
  ## [2.0.14-alpha.0](https://github.com/vtex/faststore/compare/v2.0.13-alpha.0...v2.0.14-alpha.0) (2022-12-14)
7
16
 
8
17
 
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { ListProps } from '../../atoms/List';
3
- export interface AggregateRatingProps extends ListProps<HTMLUListElement> {
2
+ import type { ListProps } from '@faststore/components';
3
+ export interface AggregateRatingProps extends ListProps<'ul'> {
4
4
  /**
5
5
  * The current value of the rating, based on the quantity of child elements.
6
6
  */
@@ -14,5 +14,5 @@ export interface RatingItemProps {
14
14
  'data-fs-aggregate-rating-item'?: 'full' | 'partial' | 'empty';
15
15
  'data-testid'?: string;
16
16
  }
17
- declare const AggregateRating: React.ForwardRefExoticComponent<AggregateRatingProps & React.RefAttributes<HTMLUListElement>>;
17
+ declare const AggregateRating: React.ForwardRefExoticComponent<Pick<AggregateRatingProps, "children" | "hidden" | "testId" | "slot" | "style" | "title" | "marker" | "as" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "value"> & React.RefAttributes<HTMLUListElement>>;
18
18
  export default AggregateRating;
@@ -1,12 +1,12 @@
1
1
  import React, { forwardRef } from 'react';
2
- import List from '../../atoms/List';
2
+ import { List } from '@faststore/components';
3
3
  const RatingItem = ({ children, ...otherProps }) => {
4
4
  if (!React.isValidElement(children)) {
5
5
  return React.createElement("li", Object.assign({}, otherProps), children);
6
6
  }
7
7
  return React.createElement("li", null, React.cloneElement(children, otherProps));
8
8
  };
9
- const AggregateRating = forwardRef(function AggregateRating({ children, testId = 'store-aggregate-rating', value, variant = 'unordered', ...otherProps }, ref) {
9
+ const AggregateRating = forwardRef(function AggregateRating({ children, testId = 'store-aggregate-rating', value, ...otherProps }, ref) {
10
10
  const fillCheck = (itemValue) => {
11
11
  if (itemValue >= 1) {
12
12
  return 'full';
@@ -16,7 +16,7 @@ const AggregateRating = forwardRef(function AggregateRating({ children, testId =
16
16
  }
17
17
  return 'empty';
18
18
  };
19
- return (React.createElement(List, Object.assign({ "data-fs-aggregate-rating": true, variant: variant, ref: ref, "data-testid": testId }, otherProps), React.Children.map(children, (child, index) => {
19
+ return (React.createElement(List, Object.assign({ "data-fs-aggregate-rating": true, ref: ref, "data-testid": testId }, otherProps), React.Children.map(children, (child, index) => {
20
20
  const currentItemNumber = index;
21
21
  const fill = fillCheck(value - currentItemNumber);
22
22
  return (React.createElement(RatingItem, { key: `aggregate-rating-${index}`, "data-fs-aggregate-rating-item": fill, "data-testid": `${testId}-item` }, child));
@@ -1 +1 @@
1
- {"version":3,"file":"AggregateRating.js","sourceRoot":"","sources":["../../../../src/components/molecules/AggregateRating/AggregateRating.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,IAAI,MAAM,kBAAkB,CAAA;AAmBnC,MAAM,UAAU,GAA2C,CAAC,EAC1D,QAAQ,EACR,GAAG,UAAU,EACd,EAAE,EAAE;IACH,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;QACnC,OAAO,4CAAQ,UAAU,GAAG,QAAQ,CAAM,CAAA;KAC3C;IAED,OAAO,gCAAK,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAM,CAAA;AAC5D,CAAC,CAAA;AAED,MAAM,eAAe,GAAG,UAAU,CAChC,SAAS,eAAe,CACtB,EACE,QAAQ,EACR,MAAM,GAAG,wBAAwB,EACjC,KAAK,EACL,OAAO,GAAG,WAAW,EACrB,GAAG,UAAU,EACd,EACD,GAAG;IAEH,MAAM,SAAS,GAAG,CAAC,SAAiB,EAAE,EAAE;QACtC,IAAI,SAAS,IAAI,CAAC,EAAE;YAClB,OAAO,MAAM,CAAA;SACd;QAED,IAAI,CAAC,GAAG,SAAS,IAAI,SAAS,GAAG,CAAC,EAAE;YAClC,OAAO,SAAS,CAAA;SACjB;QAED,OAAO,OAAO,CAAA;IAChB,CAAC,CAAA;IAED,OAAO,CACL,oBAAC,IAAI,oDAEH,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,iBACK,MAAM,IACf,UAAU,GAEb,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAa,EAAE,EAAE;QACrD,MAAM,iBAAiB,GAAG,KAAK,CAAA;QAC/B,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,GAAG,iBAAiB,CAAC,CAAA;QAEjD,OAAO,CACL,oBAAC,UAAU,IACT,GAAG,EAAE,oBAAoB,KAAK,EAAE,mCACD,IAAI,iBACtB,GAAG,MAAM,OAAO,IAE5B,KAAK,CACK,CACd,CAAA;IACH,CAAC,CAAC,CACG,CACR,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,eAAe,CAAA"}
1
+ {"version":3,"file":"AggregateRating.js","sourceRoot":"","sources":["../../../../src/components/molecules/AggregateRating/AggregateRating.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO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"}
@@ -1,5 +1,5 @@
1
1
  import React, { forwardRef } from 'react';
2
- import List from '../../atoms/List';
2
+ import { List } from '@faststore/components';
3
3
  const Divider = ({ divider, testId }) => {
4
4
  const props = {
5
5
  'data-breadcrumb-divider': true,
@@ -29,7 +29,7 @@ const ListItem = ({ children, isLastItem, divider, testId, }) => {
29
29
  };
30
30
  const Breadcrumb = forwardRef(function Breadcrumb({ children, divider: rawDivider, testId = 'store-breadcrumb', ...otherProps }, ref) {
31
31
  return (React.createElement("nav", Object.assign({ "aria-label": "Breadcrumb", role: "navigation", ref: ref, "data-fs-breadcrumb": true, "data-testid": testId }, otherProps),
32
- React.createElement(List, { "data-breadcrumb-list": true, variant: "ordered" }, React.Children.toArray(children).map((child, index, childrenArray) => {
32
+ React.createElement(List, { as: "ol", "data-breadcrumb-list": true }, React.Children.toArray(children).map((child, index, childrenArray) => {
33
33
  const isLastItem = index === childrenArray.length - 1;
34
34
  return (React.createElement(ListItem, { isLastItem: isLastItem, divider: rawDivider, key: `breadcrumb-${index}`, testId: testId }, child));
35
35
  }))));
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumb.js","sourceRoot":"","sources":["../../../../src/components/molecules/Breadcrumb/Breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,IAAI,MAAM,kBAAkB,CAAA;AAanC,MAAM,OAAO,GAAwB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE;IAC3D,MAAM,KAAK,GAAG;QACZ,yBAAyB,EAAE,IAAI;QAC/B,aAAa,EAAE,IAAI;QACnB,aAAa,EAAE,GAAG,MAAM,UAAU;KACnC,CAAA;IAED,IAAI,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;QACjC,OAAO,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;KAC1C;IAED,OAAO,8CAAU,KAAK,GAAG,OAA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,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { ListProps } from '../../atoms/List';
3
- export interface OrderSummaryProps<T = HTMLElement> extends Omit<ListProps<T>, 'variant'> {
2
+ import type { ListProps } from '@faststore/components';
3
+ export interface OrderSummaryProps extends ListProps<'ul'> {
4
4
  /**
5
5
  * ID to find this component in testing tools (e.g.: cypress,
6
6
  * testing-library, and jest).
@@ -31,5 +31,5 @@ export interface OrderSummaryProps<T = HTMLElement> extends Omit<ListProps<T>, '
31
31
  */
32
32
  totalValue?: string;
33
33
  }
34
- declare const OrderSummary: React.ForwardRefExoticComponent<OrderSummaryProps<HTMLElement> & React.RefAttributes<HTMLUListElement>>;
34
+ declare const OrderSummary: React.ForwardRefExoticComponent<Pick<OrderSummaryProps, "children" | "hidden" | "testId" | "slot" | "style" | "title" | "marker" | "as" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "subtotalLabel" | "subtotalValue" | "discountLabel" | "discountValue" | "totalLabel" | "totalValue"> & React.RefAttributes<HTMLUListElement>>;
35
35
  export default OrderSummary;
@@ -1,5 +1,5 @@
1
1
  import React, { forwardRef } from 'react';
2
- import List from '../../atoms/List';
2
+ import { List } from '@faststore/components';
3
3
  const OrderSummary = forwardRef(function OrderSummary({ testId = 'store-order-summary', children, subtotalLabel, subtotalValue, discountLabel, discountValue, totalLabel, totalValue, ...otherProps }, ref) {
4
4
  return (React.createElement(List, Object.assign({ ref: ref, "data-fs-order-summary": true, "data-testid": testId }, otherProps),
5
5
  subtotalValue ? (React.createElement("li", { "data-fs-order-summary-subtotal": true },
@@ -1 +1 @@
1
- {"version":3,"file":"OrderSummary.js","sourceRoot":"","sources":["../../../../src/components/molecules/OrderSummary/OrderSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,IAAmB,MAAM,kBAAkB,CAAA;AAkClD,MAAM,YAAY,GAAG,UAAU,CAC7B,SAAS,YAAY,CACnB,EACE,MAAM,GAAG,qBAAqB,EAC9B,QAAQ,EACR,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,UAAU,EACV,UAAU,EACV,GAAG,UAAU,EACd,EACD,GAAG;IAEH,OAAO,CACL,oBAAC,IAAI,kBACH,GAAG,EAAE,GAAG,gDAEK,MAAM,IACf,UAAU;QAEb,aAAa,CAAC,CAAC,CAAC,CACf;YACE,2FAEe,GAAG,MAAM,iBAAiB,IAEtC,aAAa,CACT;YACP,2FAEe,GAAG,MAAM,iBAAiB,IAEtC,aAAa,CACT,CACJ,CACN,CAAC,CAAC,CAAC,IAAI;QACP,aAAa,CAAC,CAAC,CAAC,CACf;YACE,2FAEe,GAAG,MAAM,iBAAiB,IAEtC,aAAa,CACT;YACP,2FAEe,GAAG,MAAM,iBAAiB,IAEtC,aAAa,CACT,CACJ,CACN,CAAC,CAAC,CAAC,IAAI;QACR;YACE,wFAEe,GAAG,MAAM,cAAc,IAEnC,UAAU,CACN;YACP,wFAEe,GAAG,MAAM,cAAc,IAEnC,UAAU,CACN,CACJ,CACA,CACR,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,YAAY,CAAA"}
1
+ {"version":3,"file":"OrderSummary.js","sourceRoot":"","sources":["../../../../src/components/molecules/OrderSummary/OrderSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAmC5C,MAAM,YAAY,GAAG,UAAU,CAC7B,SAAS,YAAY,CACnB,EACE,MAAM,GAAG,qBAAqB,EAC9B,QAAQ,EACR,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,UAAU,EACV,UAAU,EACV,GAAG,UAAU,EACd,EACD,GAAG;IAEH,OAAO,CACL,oBAAC,IAAI,kBACH,GAAG,EAAE,GAAG,gDAEK,MAAM,IACf,UAAU;QAEb,aAAa,CAAC,CAAC,CAAC,CACf;YACE,2FAEe,GAAG,MAAM,iBAAiB,IAEtC,aAAa,CACT;YACP,2FAEe,GAAG,MAAM,iBAAiB,IAEtC,aAAa,CACT,CACJ,CACN,CAAC,CAAC,CAAC,IAAI;QACP,aAAa,CAAC,CAAC,CAAC,CACf;YACE,2FAEe,GAAG,MAAM,iBAAiB,IAEtC,aAAa,CACT;YACP,2FAEe,GAAG,MAAM,iBAAiB,IAEtC,aAAa,CACT,CACJ,CACN,CAAC,CAAC,CAAC,IAAI;QACR;YACE,wFAEe,GAAG,MAAM,cAAc,IAEnC,UAAU,CACN;YACP,wFAEe,GAAG,MAAM,cAAc,IAEnC,UAAU,CACN,CACJ,CACA,CACR,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,YAAY,CAAA"}
package/dist/index.d.ts CHANGED
@@ -5,8 +5,6 @@ export { default as TextArea } from './components/atoms/TextArea';
5
5
  export type { TextAreaProps } from './components/atoms/TextArea';
6
6
  export { default as Slider } from './components/atoms/Slider';
7
7
  export type { SliderProps } from './components/atoms/Slider';
8
- export { default as List } from './components/atoms/List';
9
- export type { ListProps } from './components/atoms/List';
10
8
  export { default as Skeleton } from './components/atoms/Skeleton';
11
9
  export type { SkeletonProps } from './components/atoms/Skeleton';
12
10
  export { default as Spinner } from './components/atoms/Spinner';
package/dist/index.js CHANGED
@@ -3,7 +3,6 @@ export * from '@faststore/components';
3
3
  export { default as Popover } from './components/atoms/Popover';
4
4
  export { default as TextArea } from './components/atoms/TextArea';
5
5
  export { default as Slider } from './components/atoms/Slider';
6
- export { default as List } from './components/atoms/List';
7
6
  export { default as Skeleton } from './components/atoms/Skeleton';
8
7
  export { default as Spinner } from './components/atoms/Spinner';
9
8
  export { default as Incentive } from './components/atoms/Incentive';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AAErC,QAAQ;AACR,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAG/D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAGjE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAG7D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAGzD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAGjE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAG/D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAGnE,YAAY;AACZ,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oCAAoC,CAAA;AAG3E,OAAO,EACL,OAAO,IAAI,IAAI,EACf,WAAW,EACX,SAAS,GACV,MAAM,6BAA6B,CAAA;AAOpC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qCAAqC,CAAA;AAG7E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qCAAqC,CAAA;AAG7E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAGnF,OAAO,EACL,OAAO,IAAI,WAAW,EACtB,gBAAgB,EAChB,kBAAkB,EA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AAA;AAQzC,OAAO,EACL,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,GACT,MAAM,8BAA8B,CAAA;AAUrC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAG7D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,8BAA8B,CAAA;AAG/D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yCAAyC,CAAA;AAGrF,OAAO,EACL,OAAO,IAAI,QAAQ,EACnB,cAAc,EACd,YAAY,EACZ,YAAY,GACb,MAAM,iCAAiC,CAAA;AAQxC,YAAY;AACZ,OAAO,EACL,OAAO,IAAI,UAAU,EACrB,eAAe,EACf,iBAAiB,GAClB,MAAM,mCAAmC,CAAA;AAO1C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAA;AAG1D,OAAO,EACL,OAAO,IAAI,IAAI,EACf,WAAW,EACX,SAAS,GACV,MAAM,6BAA6B,CAAA;AAOpC,QAAQ;AACR,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,mBAAmB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/ui",
3
- "version": "2.0.14-alpha.0",
3
+ "version": "2.0.15-alpha.0",
4
4
  "description": "A lightweight, framework agnostic component library for React",
5
5
  "author": "emersonlaurentino",
6
6
  "license": "MIT",
@@ -78,5 +78,5 @@
78
78
  "node": "16.18.0",
79
79
  "yarn": "1.19.1"
80
80
  },
81
- "gitHead": "a8f4ca0ddc690e24df31abee9e4a4bbdb2d1a03b"
81
+ "gitHead": "9b72e9d993f45bf072144751654854a11e099d17"
82
82
  }
@@ -0,0 +1,27 @@
1
+ [data-fs-list] {
2
+ // --------------------------------------------------------
3
+ // Design Tokens for List
4
+ // --------------------------------------------------------
5
+
6
+ // Default properties
7
+ --fs-list-style-unordered : initial;
8
+ --fs-list-style-ordered : decimal;
9
+
10
+ // --------------------------------------------------------
11
+ // Structural Styles
12
+ // --------------------------------------------------------
13
+
14
+ margin: 0;
15
+ padding: 0;
16
+
17
+ &[data-fs-list-marker="true"] {
18
+ list-style: var(--fs-list-style-unordered);
19
+ list-style-position: inside;
20
+
21
+ @at-root ol#{&} {
22
+ list-style: var(--fs-list-style-ordered);
23
+ list-style-position: inside;
24
+ }
25
+ }
26
+
27
+ }
@@ -1,10 +1,10 @@
1
1
  import React, { forwardRef } from 'react'
2
2
  import type { FC, PropsWithChildren } from 'react'
3
3
 
4
- import List from '../../atoms/List'
5
- import type { ListProps } from '../../atoms/List'
4
+ import { List } from '@faststore/components'
5
+ import type { ListProps } from '@faststore/components'
6
6
 
7
- export interface AggregateRatingProps extends ListProps<HTMLUListElement> {
7
+ export interface AggregateRatingProps extends ListProps<'ul'> {
8
8
  /**
9
9
  * The current value of the rating, based on the quantity of child elements.
10
10
  */
@@ -33,13 +33,7 @@ const RatingItem: FC<PropsWithChildren<RatingItemProps>> = ({
33
33
 
34
34
  const AggregateRating = forwardRef<HTMLUListElement, AggregateRatingProps>(
35
35
  function AggregateRating(
36
- {
37
- children,
38
- testId = 'store-aggregate-rating',
39
- value,
40
- variant = 'unordered',
41
- ...otherProps
42
- },
36
+ { children, testId = 'store-aggregate-rating', value, ...otherProps },
43
37
  ref
44
38
  ) {
45
39
  const fillCheck = (itemValue: number) => {
@@ -57,7 +51,6 @@ const AggregateRating = forwardRef<HTMLUListElement, AggregateRatingProps>(
57
51
  return (
58
52
  <List
59
53
  data-fs-aggregate-rating
60
- variant={variant}
61
54
  ref={ref}
62
55
  data-testid={testId}
63
56
  {...otherProps}
@@ -1,7 +1,7 @@
1
1
  import React, { forwardRef } from 'react'
2
2
  import type { FC, HTMLAttributes, ReactNode } from 'react'
3
3
 
4
- import List from '../../atoms/List'
4
+ import { List } from '@faststore/components'
5
5
 
6
6
  export interface BreadcrumbProps extends HTMLAttributes<HTMLDivElement> {
7
7
  /**
@@ -85,7 +85,7 @@ const Breadcrumb = forwardRef<HTMLDivElement, BreadcrumbProps>(
85
85
  data-testid={testId}
86
86
  {...otherProps}
87
87
  >
88
- <List data-breadcrumb-list variant="ordered">
88
+ <List as="ol" data-breadcrumb-list>
89
89
  {React.Children.toArray(children).map(
90
90
  (child, index, childrenArray) => {
91
91
  const isLastItem = index === childrenArray.length - 1
@@ -1,7 +1,8 @@
1
1
  import React, { forwardRef } from 'react'
2
- import List, { ListProps } from '../../atoms/List'
2
+ import { List } from '@faststore/components'
3
+ import type { ListProps } from '@faststore/components'
3
4
 
4
- export interface OrderSummaryProps<T = HTMLElement> extends Omit<ListProps<T>, 'variant'> {
5
+ export interface OrderSummaryProps extends ListProps<'ul'> {
5
6
  /**
6
7
  * ID to find this component in testing tools (e.g.: cypress,
7
8
  * testing-library, and jest).
package/src/index.ts CHANGED
@@ -10,9 +10,6 @@ export type { TextAreaProps } from './components/atoms/TextArea'
10
10
  export { default as Slider } from './components/atoms/Slider'
11
11
  export type { SliderProps } from './components/atoms/Slider'
12
12
 
13
- export { default as List } from './components/atoms/List'
14
- export type { ListProps } from './components/atoms/List'
15
-
16
13
  export { default as Skeleton } from './components/atoms/Skeleton'
17
14
  export type { SkeletonProps } from './components/atoms/Skeleton'
18
15
 
@@ -5,6 +5,7 @@
5
5
  @import "../components/atoms/Icon/styles";
6
6
  @import "../components/atoms/Link/styles";
7
7
  @import "../components/atoms/Input/styles";
8
+ @import "../components/atoms/List/styles";
8
9
  @import "../components/atoms/Overlay/styles";
9
10
  @import "../components/atoms/Price/styles";
10
11
  @import "../components/atoms/Radio/styles";
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import type { ElementType, HTMLAttributes } from 'react';
3
- export interface ListProps<T = HTMLElement> extends HTMLAttributes<T> {
4
- /**
5
- * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
6
- */
7
- testId?: string;
8
- variant?: 'description' | 'ordered' | 'unordered';
9
- as?: ElementType;
10
- }
11
- declare const List: React.ForwardRefExoticComponent<ListProps<HTMLElement> & React.RefAttributes<HTMLUListElement>>;
12
- export default List;
@@ -1,16 +0,0 @@
1
- import React, { forwardRef } from 'react';
2
- const variantToElement = {
3
- description: 'dl',
4
- unordered: 'ul',
5
- ordered: 'ol',
6
- };
7
- const List = forwardRef(function List({ testId = 'store-list', variant = 'unordered', as: MaybeComponent, ...otherProps }, ref) {
8
- const dataAttributes = {
9
- 'data-testid': testId,
10
- 'data-fs-list': variant,
11
- };
12
- const Component = MaybeComponent ?? variantToElement[variant] ?? 'ul';
13
- return React.createElement(Component, Object.assign({ ref: ref }, dataAttributes, otherProps));
14
- });
15
- export default List;
16
- //# sourceMappingURL=List.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"List.js","sourceRoot":"","sources":["../../../../src/components/atoms/List/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAGzC,MAAM,gBAAgB,GAAG;IACvB,WAAW,EAAE,IAAI;IACjB,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;CACd,CAAA;AAWD,MAAM,IAAI,GAAG,UAAU,CAA8B,SAAS,IAAI,CAChE,EACE,MAAM,GAAG,YAAY,EACrB,OAAO,GAAG,WAAW,EACrB,EAAE,EAAE,cAAc,EAClB,GAAG,UAAU,EACd,EACD,GAAG;IAEH,MAAM,cAAc,GAAG;QACrB,aAAa,EAAE,MAAM;QACrB,cAAc,EAAE,OAAO;KACxB,CAAA;IAED,MAAM,SAAS,GAAG,cAAc,IAAI,gBAAgB,CAAC,OAAO,CAAC,IAAI,IAAI,CAAA;IAErE,OAAO,oBAAC,SAAS,kBAAC,GAAG,EAAE,GAAG,IAAM,cAAc,EAAM,UAAU,EAAI,CAAA;AACpE,CAAC,CAAC,CAAA;AAEF,eAAe,IAAI,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default } from './List';
2
- export type { ListProps } from './List';
@@ -1,2 +0,0 @@
1
- export { default } from './List';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/atoms/List/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA"}
@@ -1,38 +0,0 @@
1
- import React, { forwardRef } from 'react'
2
- import type { ElementType, HTMLAttributes } from 'react'
3
-
4
- const variantToElement = {
5
- description: 'dl',
6
- unordered: 'ul',
7
- ordered: 'ol',
8
- }
9
-
10
- export interface ListProps<T = HTMLElement> extends HTMLAttributes<T> {
11
- /**
12
- * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
13
- */
14
- testId?: string
15
- variant?: 'description' | 'ordered' | 'unordered'
16
- as?: ElementType
17
- }
18
-
19
- const List = forwardRef<HTMLUListElement, ListProps>(function List(
20
- {
21
- testId = 'store-list',
22
- variant = 'unordered',
23
- as: MaybeComponent,
24
- ...otherProps
25
- },
26
- ref
27
- ) {
28
- const dataAttributes = {
29
- 'data-testid': testId,
30
- 'data-fs-list': variant,
31
- }
32
-
33
- const Component = MaybeComponent ?? variantToElement[variant] ?? 'ul'
34
-
35
- return <Component ref={ref} {...dataAttributes} {...otherProps} />
36
- })
37
-
38
- export default List
@@ -1,2 +0,0 @@
1
- export { default } from './List'
2
- export type { ListProps } from './List'
@@ -1,33 +0,0 @@
1
- import { Story, Canvas, ArgsTable } from '@storybook/addon-docs'
2
- import List from '../List'
3
-
4
- # List
5
-
6
- ## Unordered
7
-
8
- <Canvas>
9
- <Story id="atoms-list--unordered-list" />
10
- </Canvas>
11
-
12
- ## Ordered
13
-
14
- <Canvas>
15
- <Story id="atoms-list--ordered-list" />
16
- </Canvas>
17
-
18
- ## Description
19
-
20
- <Canvas>
21
- <Story id="atoms-list--description-list" />
22
- </Canvas>
23
-
24
- ## Props
25
-
26
- <ArgsTable of={List} />
27
-
28
- ## CSS Selectors
29
-
30
- ```css
31
- [data-fs-list] {}
32
- [data-fs-list='(description|ordered|unordered)'] {}
33
- ```
@@ -1,73 +0,0 @@
1
- import type { Story } from '@storybook/react'
2
- import React from 'react'
3
-
4
- import type { ComponentArgTypes } from '../../../../typings/utils'
5
- import type { ListProps } from '../List'
6
- import Component from '../List'
7
- import mdx from './List.mdx'
8
-
9
- type ListStoryProps = ListProps & { options: string[] }
10
- type DescriptionListStoryProps = ListProps & { options: string[][] }
11
-
12
- const ListTemplate: Story<ListStoryProps> = ({ options, ...props }) => {
13
- return (
14
- <Component {...props}>
15
- {options.map((value) => (
16
- <li key={value}>{value}</li>
17
- ))}
18
- </Component>
19
- )
20
- }
21
-
22
- const DescriptionListTemplate: Story<DescriptionListStoryProps> = ({
23
- options,
24
- ...props
25
- }) => {
26
- return (
27
- <Component {...props}>
28
- {options.map(([title, value]) => [
29
- <dt key={title}>{title}</dt>,
30
- <dd key={value}>{value}</dd>,
31
- ])}
32
- </Component>
33
- )
34
- }
35
-
36
- export const UnorderedList = ListTemplate.bind({})
37
-
38
- export const OrderedList = ListTemplate.bind({})
39
- OrderedList.args = {
40
- variant: 'ordered',
41
- }
42
-
43
- export const DescriptionList = DescriptionListTemplate.bind({})
44
- DescriptionList.args = {
45
- options: [
46
- ['Ok', 'An ok item'],
47
- ['Good', 'A good item'],
48
- ['Bad', 'A bad item'],
49
- ],
50
- variant: 'description',
51
- }
52
-
53
- const argTypes: ComponentArgTypes<ListStoryProps> = {
54
- options: {
55
- control: { type: 'array' },
56
- defaultValue: ['Great', 'Ok', 'Bad'],
57
- },
58
- variant: {
59
- options: ['description', 'ordered', 'unordered'],
60
- control: { type: 'select' },
61
- defaultValue: 'unordered',
62
- },
63
- }
64
-
65
- export default {
66
- title: 'Atoms/List',
67
- argTypes,
68
- parameters: {
69
- docs: {
70
- page: mdx,
71
- },
72
- },
73
- }