@faststore/ui 2.0.9-alpha.0 → 2.0.10-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 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.10-alpha.0](https://github.com/vtex/faststore/compare/v2.0.9-alpha.0...v2.0.10-alpha.0) (2022-12-12)
7
+
8
+
9
+ ### Features
10
+
11
+ * Adds `ButtonBuy` component ([#1551](https://github.com/vtex/faststore/issues/1551)) ([cf48bc8](https://github.com/vtex/faststore/commit/cf48bc803f0537e1a32eb87ff18e8328646939a5))
12
+
13
+
14
+
6
15
  ## [2.0.9-alpha.0](https://github.com/vtex/faststore/compare/v2.0.8-alpha.0...v2.0.9-alpha.0) (2022-12-12)
7
16
 
8
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/ui",
3
- "version": "2.0.9-alpha.0",
3
+ "version": "2.0.10-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": "df3ddd2d140bf19046a4753474bebee4298cd6ac"
81
+ "gitHead": "640305492dc03e55d3df05de18bcca8587d562fc"
82
82
  }
@@ -11,7 +11,6 @@ body {
11
11
  background: var(--fs-body-bkg);
12
12
  }
13
13
 
14
- main,
15
14
  .layout__main {
16
15
  display: flex;
17
16
  flex-wrap: wrap;
@@ -0,0 +1,49 @@
1
+ [data-fs-buy-button] {
2
+ // --------------------------------------------------------
3
+ // Design Tokens for Buy Button
4
+ // --------------------------------------------------------
5
+
6
+ // Default properties
7
+ --fs-buy-button-text-color : var(--fs-color-action-text);
8
+ --fs-buy-button-text-color-hover : var(--fs-color-action-text);
9
+ --fs-buy-button-text-color-active : var(--fs-color-action-text);
10
+
11
+ --fs-buy-button-bkg-color : var(--fs-color-action-bkg);
12
+ --fs-buy-button-bkg-color-hover : var(--fs-color-action-bkg-hover);
13
+ --fs-buy-button-bkg-color-active : var(--fs-color-action-bkg-active);
14
+
15
+ --fs-buy-button-border-color : var(--fs-buy-button-bkg-color);
16
+ --fs-buy-button-border-color-hover : var(--fs-buy-button-bkg-color-hover);
17
+ --fs-buy-button-border-color-active : var(--fs-buy-button-bkg-color-active);
18
+
19
+ --fs-buy-button-shadow-hover : var(--fs-button-shadow-hover);
20
+
21
+ // --------------------------------------------------------
22
+ // Structural Styles
23
+ // --------------------------------------------------------
24
+
25
+ @include focus-ring-visible;
26
+
27
+ color: var(--fs-buy-button-text-color);
28
+ background-color: var(--fs-buy-button-bkg-color);
29
+ border: var(--fs-button-border-width) solid var(--fs-buy-button-border-color);
30
+
31
+ &:hover {
32
+ color: var(--fs-buy-button-text-color-hover);
33
+ background-color: var(--fs-buy-button-bkg-color-hover);
34
+ border-color: var(--fs-buy-button-border-color-hover);
35
+ box-shadow: var(--fs-buy-button-shadow-hover);
36
+ }
37
+
38
+ &:focus, &:focus-visible {
39
+ color: var(--fs-buy-button-text-color-hover);
40
+ background-color: var(--fs-buy-button-bkg-color-hover);
41
+ }
42
+
43
+ &:active {
44
+ color: var(--fs-buy-button-text-color-hover);
45
+ background-color: var(--fs-buy-button-bkg-color-active);
46
+ border-color: var(--fs-buy-button-border-color-active);
47
+ outline: none;
48
+ }
49
+ }
@@ -8,6 +8,7 @@
8
8
  @import "../components/atoms/Radio/styles";
9
9
 
10
10
  // Molecules
11
+ @import "../components/molecules/BuyButton/styles";
11
12
  @import "../components/molecules/CheckboxField/styles";
12
13
  @import "../components/molecules/DiscountBadge/styles";
13
14
  @import "../components/molecules/InputField/styles";
@@ -1,110 +0,0 @@
1
- import { Meta, Canvas, Story, ArgsTable } from '@storybook/addon-docs'
2
-
3
- import { Button } from '@faststore/components'
4
-
5
- <Meta
6
- title="Atoms/Button/Default"
7
- component={Button}
8
- argTypes={{
9
- children: {
10
- name: 'content',
11
- },
12
- variant: {
13
- options: ['primary', 'secondary', 'tertiary'],
14
- control: { type: 'select' },
15
- description: 'Specifies the component color variant.',
16
- },
17
- size: {
18
- options: ['small', 'regular'],
19
- control: { type: 'radio' },
20
- description: 'Specifies the component size variant. ',
21
- },
22
- iconPosition: {
23
- options: ['left', 'right'],
24
- control: { type: 'radio' },
25
- },
26
- }}
27
- />
28
-
29
- export const Template = ({ children, ...args }) => (
30
- <Button {...args}>{children}</Button>
31
- )
32
-
33
- <header>
34
-
35
- # Button
36
-
37
- This component allows users to take actions, make choices or trigger an event with a single tap.
38
-
39
- </header>
40
-
41
- ## Overview
42
-
43
- <Canvas>
44
- <Story
45
- name="overview-primary"
46
- args={{
47
- children: 'Primary',
48
- size: 'regular',
49
- variant: 'primary',
50
- }}
51
- >
52
- {Template.bind({})}
53
- </Story>
54
- <Story
55
- name="overview-secondary"
56
- args={{
57
- children: 'Secondary',
58
- size: 'regular',
59
- variant: 'secondary',
60
- }}
61
- >
62
- {Template.bind({})}
63
- </Story>
64
- <Story
65
- name="overview-tertiary"
66
- args={{
67
- children: 'Tertiary',
68
- size: 'regular',
69
- variant: 'tertiary',
70
- }}
71
- >
72
- {Template.bind({})}
73
- </Story>
74
- <Story
75
- name="overview-small"
76
- args={{
77
- children: 'Small',
78
- size: 'small',
79
- variant: 'secondary',
80
- }}
81
- >
82
- {Template.bind({})}
83
- </Story>
84
- </Canvas>
85
-
86
- ---
87
-
88
- ## Usage
89
-
90
- ```jsx
91
- import Button from '@faststore/ui'
92
-
93
- // Styles
94
- import @faststore/ui/src/components/atoms/Button/styles.scss
95
- ```
96
-
97
- <Canvas>
98
- <Story
99
- name="default"
100
- args={{
101
- children: 'Buy Now',
102
- size: 'regular',
103
- variant: 'primary',
104
- }}
105
- >
106
- {Template.bind({})}
107
- </Story>
108
- </Canvas>
109
-
110
- <ArgsTable story="default" />