@faststore/ui 2.0.33-alpha.0 → 2.0.35-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 (101) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/components/molecules/Accordion/AccordionItem.d.ts +1 -7
  3. package/dist/components/molecules/Accordion/AccordionItem.js +1 -7
  4. package/dist/components/molecules/Accordion/AccordionItem.js.map +1 -1
  5. package/package.json +6 -19
  6. package/src/components/atoms/Button/styles.scss +1 -0
  7. package/src/components/molecules/Accordion/AccordionItem.tsx +42 -42
  8. package/dist/components/atoms/Incentive/stories/assets/Icons.d.ts +0 -2
  9. package/dist/components/atoms/Incentive/stories/assets/Icons.js +0 -6
  10. package/dist/components/atoms/Incentive/stories/assets/Icons.js.map +0 -1
  11. package/dist/components/molecules/Dropdown/stories/assets/Caret.d.ts +0 -2
  12. package/dist/components/molecules/Dropdown/stories/assets/Caret.js +0 -4
  13. package/dist/components/molecules/Dropdown/stories/assets/Caret.js.map +0 -1
  14. package/dist/components/molecules/PaymentMethods/stories/assets/Icons.d.ts +0 -9
  15. package/dist/components/molecules/PaymentMethods/stories/assets/Icons.js +0 -26
  16. package/dist/components/molecules/PaymentMethods/stories/assets/Icons.js.map +0 -1
  17. package/dist/components/molecules/QuantitySelector/stories/assets/Icons.d.ts +0 -7
  18. package/dist/components/molecules/QuantitySelector/stories/assets/Icons.js +0 -11
  19. package/dist/components/molecules/QuantitySelector/stories/assets/Icons.js.map +0 -1
  20. package/dist/components/molecules/SearchInput/stories/assets/CustomIcon.d.ts +0 -3
  21. package/dist/components/molecules/SearchInput/stories/assets/CustomIcon.js +0 -7
  22. package/dist/components/molecules/SearchInput/stories/assets/CustomIcon.js.map +0 -1
  23. package/src/components/atoms/Badge/Badge.stories.mdx +0 -156
  24. package/src/components/atoms/Incentive/stories/Incentive.mdx +0 -24
  25. package/src/components/atoms/Incentive/stories/Incentive.stories.tsx +0 -26
  26. package/src/components/atoms/Incentive/stories/assets/Icons.tsx +0 -14
  27. package/src/components/atoms/Input/Input.stories.mdx +0 -34
  28. package/src/components/atoms/Label/Label.stories.mdx +0 -65
  29. package/src/components/atoms/Link/Link.stories.mdx +0 -134
  30. package/src/components/atoms/Popover/stories/Popover.mdx +0 -18
  31. package/src/components/atoms/Popover/stories/Popover.stories.tsx +0 -50
  32. package/src/components/atoms/Radio/Radio.stories.mdx +0 -101
  33. package/src/components/atoms/Skeleton/stories/Skeleton.mdx +0 -18
  34. package/src/components/atoms/Skeleton/stories/Skeleton.stories.tsx +0 -21
  35. package/src/components/atoms/Slider/stories/Slider.mdx +0 -29
  36. package/src/components/atoms/Slider/stories/Slider.stories.tsx +0 -32
  37. package/src/components/atoms/Spinner/stories/Spinner.mdx +0 -18
  38. package/src/components/atoms/Spinner/stories/Spinner.stories.tsx +0 -21
  39. package/src/components/atoms/TextArea/stories/TextArea.mdx +0 -22
  40. package/src/components/atoms/TextArea/stories/TextArea.stories.tsx +0 -49
  41. package/src/components/molecules/Accordion/stories/Accordion.mdx +0 -62
  42. package/src/components/molecules/Accordion/stories/Accordion.stories.tsx +0 -160
  43. package/src/components/molecules/AggregateRating/stories/AggregateRating.mdx +0 -33
  44. package/src/components/molecules/AggregateRating/stories/AggregateRating.stories.tsx +0 -111
  45. package/src/components/molecules/Alert/stories/Alert.mdx +0 -26
  46. package/src/components/molecules/Alert/stories/Alert.stories.tsx +0 -36
  47. package/src/components/molecules/Banner/stories/Banner.mdx +0 -63
  48. package/src/components/molecules/Banner/stories/Banner.stories.tsx +0 -66
  49. package/src/components/molecules/Breadcrumb/stories/Breadcrumb.mdx +0 -27
  50. package/src/components/molecules/Breadcrumb/stories/Breadcrumb.stories.tsx +0 -55
  51. package/src/components/molecules/Bullets/stories/Bullets.mdx +0 -25
  52. package/src/components/molecules/Bullets/stories/Bullets.stories.tsx +0 -64
  53. package/src/components/molecules/Card/stories/Card.mdx +0 -54
  54. package/src/components/molecules/Card/stories/Card.stories.tsx +0 -63
  55. package/src/components/molecules/Carousel/stories/Carousel.mdx +0 -35
  56. package/src/components/molecules/Carousel/stories/Carousel.stories.tsx +0 -56
  57. package/src/components/molecules/CartItem/stories/CartItem.mdx +0 -79
  58. package/src/components/molecules/CartItem/stories/CartItem.stories.tsx +0 -70
  59. package/src/components/molecules/CheckboxField/CheckboxField.stories.mdx +0 -38
  60. package/src/components/molecules/DiscountBadge/DiscountBadge.stories.mdx +0 -38
  61. package/src/components/molecules/Dropdown/stories/Dropdown.mdx +0 -63
  62. package/src/components/molecules/Dropdown/stories/Dropdown.stories.tsx +0 -94
  63. package/src/components/molecules/Dropdown/stories/assets/Caret.tsx +0 -19
  64. package/src/components/molecules/Form/stories/Form.mdx +0 -23
  65. package/src/components/molecules/Form/stories/Form.stories.tsx +0 -65
  66. package/src/components/molecules/Gift/stories/Gift.mdx +0 -40
  67. package/src/components/molecules/Gift/stories/Gift.stories.tsx +0 -66
  68. package/src/components/molecules/IconButton/IconButton.stories.mdx +0 -46
  69. package/src/components/molecules/InputField/InputField.stories.mdx +0 -116
  70. package/src/components/molecules/LoadingButton/stories/LoadingButton.mdx +0 -20
  71. package/src/components/molecules/LoadingButton/stories/LoadingButton.stories.tsx +0 -36
  72. package/src/components/molecules/Modal/stories/Modal.mdx +0 -18
  73. package/src/components/molecules/Modal/stories/Modal.stories.tsx +0 -45
  74. package/src/components/molecules/OrderSummary/stories/OrderSummary.mdx +0 -29
  75. package/src/components/molecules/OrderSummary/stories/OrderSummary.stories.tsx +0 -29
  76. package/src/components/molecules/PaymentMethods/stories/PaymentMethods.mdx +0 -19
  77. package/src/components/molecules/PaymentMethods/stories/PaymentMethods.stories.tsx +0 -41
  78. package/src/components/molecules/PaymentMethods/stories/assets/Icons.tsx +0 -89
  79. package/src/components/molecules/PriceRange/stories/PriceRange.mdx +0 -28
  80. package/src/components/molecules/PriceRange/stories/PriceRange.stories.tsx +0 -45
  81. package/src/components/molecules/ProductCard/stories/ProductCard.mdx +0 -55
  82. package/src/components/molecules/ProductCard/stories/ProductCard.stories.tsx +0 -60
  83. package/src/components/molecules/ProductTitle/stories/ProductTitle.mdx +0 -26
  84. package/src/components/molecules/ProductTitle/stories/ProductTitle.stories.tsx +0 -27
  85. package/src/components/molecules/QuantitySelector/stories/QuantitySelector.mdx +0 -26
  86. package/src/components/molecules/QuantitySelector/stories/QuantitySelector.stories.tsx +0 -77
  87. package/src/components/molecules/QuantitySelector/stories/assets/Icons.tsx +0 -52
  88. package/src/components/molecules/RadioField/RadioField.stories.mdx +0 -38
  89. package/src/components/molecules/RadioGroup/stories/RadioGroup.mdx +0 -39
  90. package/src/components/molecules/RadioGroup/stories/RadioGroup.stories.tsx +0 -108
  91. package/src/components/molecules/SearchInput/stories/SearchInput.mdx +0 -28
  92. package/src/components/molecules/SearchInput/stories/SearchInput.stories.tsx +0 -45
  93. package/src/components/molecules/SearchInput/stories/assets/CustomIcon.tsx +0 -22
  94. package/src/components/molecules/SkuSelector/stories/SkuSelector.mdx +0 -24
  95. package/src/components/molecules/SkuSelector/stories/SkuSelector.stories.tsx +0 -52
  96. package/src/components/molecules/Tag/Tag.stories.mdx +0 -31
  97. package/src/components/organisms/OutOfStock/stories/OutOfStock.mdx +0 -37
  98. package/src/components/organisms/OutOfStock/stories/OutOfStock.stories.tsx +0 -71
  99. package/src/components/organisms/Tiles/stories/Tiles.mdx +0 -39
  100. package/src/components/organisms/Tiles/stories/Tiles.stories.tsx +0 -38
  101. package/src/typings/utils.d.ts +0 -5
@@ -1,52 +0,0 @@
1
- import type { Story, Meta } from '@storybook/react'
2
- import React from 'react'
3
- import { RadioOption } from '../../../../'
4
-
5
- import type { SkuSelectorProps } from '../SkuSelector'
6
- import Component from '../SkuSelector'
7
- import mdx from './SkuSelector.mdx'
8
-
9
- const SkuSelectorTemplate: Story<SkuSelectorProps> = ({ testId }) => {
10
- const activeValue = 'Pink'
11
- const options = [
12
- { label: 'Color Pink', value: 'Pink' },
13
- { label: 'Color White', value: 'White' },
14
- ]
15
- const variant = 'label'
16
-
17
- return (
18
- <Component
19
- testId={testId}
20
- variant={variant}
21
- options={options}
22
- activeValue={activeValue}
23
- label='Color'
24
- >
25
- {options.map((option, index) => {
26
- return (
27
- <RadioOption
28
- data-fs-sku-selector-option
29
- key={String(index)}
30
- label={option.label}
31
- value={option.value}
32
- checked={option.value === activeValue}
33
- >
34
- <span>{option.value}</span>
35
- </RadioOption>
36
- )
37
- })}
38
- </Component>
39
- )
40
- }
41
-
42
- export const SkuSelector = SkuSelectorTemplate.bind({})
43
- SkuSelector.storyName = 'SkuSelector'
44
-
45
- export default {
46
- title: 'Molecules/SkuSelector',
47
- parameters: {
48
- docs: {
49
- page: mdx,
50
- },
51
- },
52
- } as Meta
@@ -1,31 +0,0 @@
1
- import { Meta, Canvas, Story, ArgsTable } from '@storybook/addon-docs'
2
-
3
- import { Tag } from '@faststore/components'
4
-
5
- <Meta title="Molecules/Tag" component={Tag} argTypes={{}} />
6
-
7
- export const Template = (args) => (
8
- <Tag label="Label" variant="warning" onClose={() => {}} />
9
- )
10
-
11
- <header>
12
-
13
- # Tag
14
-
15
- Tags are an interactive `Badge.` By default, its have a close button.
16
-
17
- </header>
18
-
19
- ## Usage
20
-
21
- ```jsx
22
- import { Tag } from '@faststore/ui'
23
- // Styles
24
- import '@faststore/ui/src/components/molecules/Tag/styles.scss'
25
- ```
26
-
27
- <Canvas>
28
- <Story name="default">{Template.bind({})}</Story>
29
- </Canvas>
30
-
31
- <ArgsTable story="default" />
@@ -1,37 +0,0 @@
1
- import { Canvas, Props, Story, ArgsTable } from '@storybook/addon-docs'
2
-
3
- import OutOfStock from '../OutOfStock'
4
-
5
- # OutOfStock
6
-
7
- <Canvas>
8
- <Story id="organisms-outofstock--out-of-stock" />
9
- </Canvas>
10
-
11
- The `OutOfStock` uses the [Compound Component](https://kentcdodds.com/blog/compound-components-with-react-hooks) pattern, its components are:
12
-
13
- - `OutOfStock`: the form wrapper of the out of stock component with title and message;
14
- - `OutOfStockTitle`: the main title component for out of stock component;
15
- - `OutOfStockMessage`: the message component for out of stock component;
16
-
17
- ## Props
18
-
19
- ### `OutOfStock`
20
-
21
- <ArgsTable of={ OutOfStock } />
22
-
23
- ## CSS Selectors
24
-
25
- ```css
26
- [data-fs-out-of-stock] {
27
- }
28
-
29
- [data-out-of-stock-form] {
30
- }
31
-
32
- [data-out-of-stock-title] {
33
- }
34
-
35
- [data-out-of-stock-message] {
36
- }
37
- ```
@@ -1,71 +0,0 @@
1
- import type { Story, Meta } from '@storybook/react'
2
- import React, { useState } from 'react'
3
-
4
- import type {
5
- OutOfStockMessageProps,
6
- OutOfStockTitleProps,
7
- OutOfStockProps,
8
- } from '..'
9
- import Component, { OutOfStockTitle, OutOfStockMessage } from '..'
10
- import { Button, Input } from '@faststore/components'
11
- import mdx from './OutOfStock.mdx'
12
-
13
- type OutOfStockTemplateProps = {
14
- title: string
15
- message: string
16
- titleAs: OutOfStockTitleProps['as']
17
- messageAs: OutOfStockMessageProps['as']
18
- } & OutOfStockProps
19
-
20
- const OutOfStockTemplate: Story<OutOfStockTemplateProps> = ({
21
- title,
22
- message,
23
- titleAs,
24
- messageAs,
25
- ...props
26
- }) => {
27
- const [value, setValue] = useState('')
28
-
29
- const handlerSubmitForm = (e: React.FormEvent<HTMLFormElement>) => {
30
- e.preventDefault()
31
-
32
- alert(value)
33
- }
34
-
35
- return (
36
- <Component onSubmit={handlerSubmitForm} {...props}>
37
- <OutOfStockTitle as={titleAs}>{title}</OutOfStockTitle>
38
- <OutOfStockMessage as={messageAs}>{message}</OutOfStockMessage>
39
- <Input value={value} onChange={(e) => setValue(e.target.value)} />
40
- <Button>Notify me</Button>
41
- </Component>
42
- )
43
- }
44
-
45
- export const OutOfStock = OutOfStockTemplate.bind({})
46
- OutOfStock.storyName = 'OutOfStock'
47
-
48
- export default {
49
- title: 'Organisms/OutOfStock',
50
- parameters: {
51
- docs: {
52
- page: mdx,
53
- },
54
- },
55
- args: {
56
- title: 'Notify me',
57
- message: 'Notify me when available',
58
- },
59
- argTypes: {
60
- titleAs: {
61
- defaultValue: 'h2',
62
- options: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'],
63
- control: { type: 'select' },
64
- },
65
- messageAs: {
66
- defaultValue: 'p',
67
- options: ['h2', 'h3', 'h4', 'h5', 'h6', 'p', 'div', 'span'],
68
- control: { type: 'select' },
69
- },
70
- },
71
- } as Meta
@@ -1,39 +0,0 @@
1
- import { ArgsTable, Canvas, Story } from '@storybook/addon-docs'
2
-
3
- import { Tile, Tiles } from '../'
4
-
5
- # Tiles
6
-
7
- <Canvas>
8
- <Story id="organisms-tiles--tiles" />
9
- </Canvas>
10
-
11
- ## Components
12
-
13
- - `Tiles`: the parent component that wraps one or many `Tile`s.
14
- - `Tile`: the child component.
15
-
16
- ## Props
17
-
18
- Besides those attributes, the following props are also supported:
19
-
20
- ### `Tiles`
21
-
22
- <ArgsTable of={Tiles} />
23
-
24
- ### `Tile`
25
-
26
- <ArgsTable of={Tile} />
27
-
28
- ## CSS Selectors
29
-
30
- ```css
31
- [data-fs-tiles] {
32
- }
33
-
34
- [data-fs-tiles-variant='expanded-first'|'expanded-first-two'] {
35
- }
36
-
37
- [data-fs-tile] {
38
- }
39
- ```
@@ -1,38 +0,0 @@
1
- import React from 'react'
2
-
3
- import { Tile, Tiles as UITiles } from '../'
4
- import mdx from './Tiles.mdx'
5
-
6
- import type { Story, Meta } from '@storybook/react'
7
- import type { TilesProps } from '../'
8
-
9
- const TilesTemplate: Story<TilesProps> = () => (
10
- <>
11
- <UITiles>
12
- <Tile>Tile #1</Tile>
13
- <Tile>Tile #2</Tile>
14
- </UITiles>
15
- <UITiles>
16
- <Tile>Tile #1</Tile>
17
- <Tile>Tile #2</Tile>
18
- <Tile>Tile #3</Tile>
19
- <Tile>Tile #4</Tile>
20
- </UITiles>
21
- <UITiles>
22
- <Tile>Tile #1</Tile>
23
- <Tile>Tile #2</Tile>
24
- <Tile>Tile #3</Tile>
25
- </UITiles>
26
- </>
27
- )
28
-
29
- export const Tiles = TilesTemplate.bind({})
30
-
31
- export default {
32
- title: 'Organisms/Tiles',
33
- parameters: {
34
- docs: {
35
- page: mdx,
36
- },
37
- },
38
- } as Meta
@@ -1,5 +0,0 @@
1
- import type { ArgTypes } from '@storybook/react'
2
-
3
- export type ComponentArgTypes<T> = {
4
- [K in keyof T]: ArgTypes
5
- }