@faststore/components 1.12.19 → 2.0.0-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 (66) hide show
  1. package/.turbo/turbo-build.log +1 -0
  2. package/CHANGELOG.md +9 -0
  3. package/dist/atoms/Badge/Badge.d.ts +28 -0
  4. package/dist/atoms/Badge/Badge.js +8 -0
  5. package/dist/atoms/Badge/Badge.js.map +1 -0
  6. package/dist/atoms/Badge/index.d.ts +2 -0
  7. package/dist/atoms/Badge/index.js +2 -0
  8. package/dist/atoms/Badge/index.js.map +1 -0
  9. package/dist/atoms/Button/Button.d.ts +37 -0
  10. package/dist/atoms/Button/Button.js +10 -0
  11. package/dist/atoms/Button/Button.js.map +1 -0
  12. package/dist/atoms/Button/index.d.ts +2 -0
  13. package/dist/atoms/Button/index.js +2 -0
  14. package/dist/atoms/Button/index.js.map +1 -0
  15. package/dist/atoms/Checkbox/Checkbox.d.ts +14 -0
  16. package/dist/atoms/Checkbox/Checkbox.js +6 -0
  17. package/dist/atoms/Checkbox/Checkbox.js.map +1 -0
  18. package/dist/atoms/Checkbox/index.d.ts +2 -0
  19. package/dist/atoms/Checkbox/index.js +2 -0
  20. package/dist/atoms/Checkbox/index.js.map +1 -0
  21. package/dist/atoms/Icon/Icon.d.ts +14 -0
  22. package/dist/atoms/Icon/Icon.js +6 -0
  23. package/dist/atoms/Icon/Icon.js.map +1 -0
  24. package/dist/atoms/Icon/index.d.ts +2 -0
  25. package/dist/atoms/Icon/index.js +2 -0
  26. package/dist/atoms/Icon/index.js.map +1 -0
  27. package/dist/atoms/Label/Label.d.ts +10 -0
  28. package/dist/atoms/Label/Label.js +6 -0
  29. package/dist/atoms/Label/Label.js.map +1 -0
  30. package/dist/atoms/Label/index.d.ts +2 -0
  31. package/dist/atoms/Label/index.js +2 -0
  32. package/dist/atoms/Label/index.js.map +1 -0
  33. package/dist/atoms/Radio/Radio.d.ts +10 -0
  34. package/dist/atoms/Radio/Radio.js +6 -0
  35. package/dist/atoms/Radio/Radio.js.map +1 -0
  36. package/dist/atoms/Radio/index.d.ts +2 -0
  37. package/dist/atoms/Radio/index.js +2 -0
  38. package/dist/atoms/Radio/index.js.map +1 -0
  39. package/dist/index.d.ts +20 -0
  40. package/dist/index.js +13 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/molecules/CheckboxField/CheckboxField.d.ts +25 -0
  43. package/dist/molecules/CheckboxField/CheckboxField.js +10 -0
  44. package/dist/molecules/CheckboxField/CheckboxField.js.map +1 -0
  45. package/dist/molecules/CheckboxField/index.d.ts +2 -0
  46. package/dist/molecules/CheckboxField/index.js +2 -0
  47. package/dist/molecules/CheckboxField/index.js.map +1 -0
  48. package/dist/molecules/IconButton/IconButton.d.ts +19 -0
  49. package/dist/molecules/IconButton/IconButton.js +9 -0
  50. package/dist/molecules/IconButton/IconButton.js.map +1 -0
  51. package/dist/molecules/IconButton/index.d.ts +2 -0
  52. package/dist/molecules/IconButton/index.js +2 -0
  53. package/dist/molecules/IconButton/index.js.map +1 -0
  54. package/dist/molecules/RadioField/RadioField.d.ts +25 -0
  55. package/dist/molecules/RadioField/RadioField.js +10 -0
  56. package/dist/molecules/RadioField/RadioField.js.map +1 -0
  57. package/dist/molecules/RadioField/index.d.ts +2 -0
  58. package/dist/molecules/RadioField/index.js +2 -0
  59. package/dist/molecules/RadioField/index.js.map +1 -0
  60. package/dist/molecules/Tag/Tag.d.ts +23 -0
  61. package/dist/molecules/Tag/Tag.js +11 -0
  62. package/dist/molecules/Tag/Tag.js.map +1 -0
  63. package/dist/molecules/Tag/index.d.ts +2 -0
  64. package/dist/molecules/Tag/index.js +2 -0
  65. package/dist/molecules/Tag/index.js.map +1 -0
  66. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ $ tsc
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
+ ## 1.12.20 (2022-10-26)
7
+
8
+
9
+ ### Chores
10
+
11
+ * git blame ignore modification by data-fs ([#1494](https://github.com/vtex/faststore/issues/1494)) ([783079e](https://github.com/vtex/faststore/commit/783079e7095b39270bbb60e79063b774056dc5d4))
12
+
13
+
14
+
6
15
  ## 1.12.19 (2022-10-25)
7
16
 
8
17
 
@@ -0,0 +1,28 @@
1
+ import type { ReactNode, HTMLAttributes, AriaAttributes } from 'react';
2
+ import React from 'react';
3
+ export declare type BadgeVariants = 'info' | 'highlighted' | 'success' | 'neutral' | 'warning' | 'danger';
4
+ export interface BadgeProps extends HTMLAttributes<HTMLDivElement> {
5
+ /**
6
+ * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
7
+ */
8
+ testId?: string;
9
+ /**
10
+ * Sets the component's size.
11
+ */
12
+ size?: 'small' | 'big';
13
+ /**
14
+ * Specifies the component variant.
15
+ */
16
+ variant?: BadgeVariants;
17
+ /**
18
+ * Enables counter badge.
19
+ */
20
+ counter?: boolean;
21
+ /**
22
+ * For accessibility purposes, adds an ARIA label to the element when `counter` is set to `true`.
23
+ */
24
+ 'aria-label'?: AriaAttributes['aria-label'];
25
+ children?: ReactNode;
26
+ }
27
+ declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLDivElement>>;
28
+ export default Badge;
@@ -0,0 +1,8 @@
1
+ import React, { forwardRef } from 'react';
2
+ const Badge = forwardRef(function Badge({ testId = 'fs-badge', size = 'small', variant = 'neutral', counter = false, 'aria-label': ariaLabel, children, ...otherProps }, ref) {
3
+ return (React.createElement("div", { ref: ref, "data-fs-badge": true, "data-testid": testId, "aria-label": ariaLabel, "data-fs-badge-variant": counter ? null : variant, "data-fs-badge-size": size, "data-fs-badge-counter": counter, ...otherProps },
4
+ React.createElement("div", { "data-fs-badge-wrapper": true },
5
+ React.createElement("span", null, children))));
6
+ });
7
+ export default Badge;
8
+ //# sourceMappingURL=Badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../src/atoms/Badge/Badge.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAkCzC,MAAM,KAAK,GAAG,UAAU,CAA6B,SAAS,KAAK,CACjE,EACE,MAAM,GAAG,UAAU,EACnB,IAAI,GAAG,OAAO,EACd,OAAO,GAAG,SAAS,EACnB,OAAO,GAAG,KAAK,EACf,YAAY,EAAE,SAAS,EACvB,QAAQ,EACR,GAAG,UAAU,EACF,EACb,GAAG;IAEH,OAAO,CACL,6BACE,GAAG,EAAE,GAAG,wCAEK,MAAM,gBACP,SAAS,2BACE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,wBAC3B,IAAI,2BACD,OAAO,KAC1B,UAAU;QAEd;YACE,kCAAO,QAAQ,CAAQ,CACnB,CACF,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,KAAK,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { default } from './Badge';
2
+ export type { BadgeProps } from './Badge';
@@ -0,0 +1,2 @@
1
+ export { default } from './Badge';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/atoms/Badge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,37 @@
1
+ import type { ReactNode, ButtonHTMLAttributes } from 'react';
2
+ import React from 'react';
3
+ export declare type Variant = 'primary' | 'secondary' | 'tertiary';
4
+ export declare type Size = 'small' | 'regular';
5
+ export declare type IconPosition = 'left' | 'right';
6
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
7
+ /**
8
+ * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
9
+ */
10
+ testId?: string;
11
+ /**
12
+ * Specifies the component color variant.
13
+ */
14
+ variant?: Variant;
15
+ /**
16
+ * Specifies the size variant.
17
+ */
18
+ size?: Size;
19
+ /**
20
+ * Defines the use of inverted colors.
21
+ */
22
+ inverse?: boolean;
23
+ /**
24
+ * Specifies that this button should be disabled
25
+ */
26
+ disabled?: boolean;
27
+ /**
28
+ * A React component that will be rendered as an icon.
29
+ */
30
+ icon?: ReactNode;
31
+ /**
32
+ * Specifies where the icon should be positioned
33
+ */
34
+ iconPosition?: IconPosition;
35
+ }
36
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
37
+ export default Button;
@@ -0,0 +1,10 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { Icon } from '../../index';
3
+ const Button = forwardRef(function Button({ children, variant, inverse, size = 'regular', testId = 'fs-button', icon, iconPosition = 'left', disabled, ...otherProps }, ref) {
4
+ return (React.createElement("button", { ref: ref, "data-testid": testId, "data-fs-button": true, "data-fs-button-inverse": inverse, "data-fs-button-size": size, "data-fs-button-variant": variant, disabled: disabled, ...otherProps },
5
+ icon && iconPosition === 'left' && React.createElement(Icon, { component: icon }),
6
+ children,
7
+ icon && iconPosition === 'right' && React.createElement(Icon, { component: icon })));
8
+ });
9
+ export default Button;
10
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/atoms/Button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAqClC,MAAM,MAAM,GAAG,UAAU,CAAiC,SAAS,MAAM,CACvE,EACE,QAAQ,EACR,OAAO,EACP,OAAO,EACP,IAAI,GAAG,SAAS,EAChB,MAAM,GAAG,WAAW,EACpB,IAAI,EACJ,YAAY,GAAG,MAAM,EACrB,QAAQ,EACR,GAAG,UAAU,EACd,EACD,GAAG;IAEH,OAAO,CACL,gCACE,GAAG,EAAE,GAAG,iBACK,MAAM,oDAEK,OAAO,yBACV,IAAI,4BACD,OAAO,EAC/B,QAAQ,EAAE,QAAQ,KACd,UAAU;QAEb,IAAI,IAAI,YAAY,KAAK,MAAM,IAAI,oBAAC,IAAI,IAAC,SAAS,EAAE,IAAI,GAAI;QAC5D,QAAQ;QACR,IAAI,IAAI,YAAY,KAAK,OAAO,IAAI,oBAAC,IAAI,IAAC,SAAS,EAAE,IAAI,GAAI,CACvD,CACV,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,MAAM,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { default } from './Button';
2
+ export type { ButtonProps } from './Button';
@@ -0,0 +1,2 @@
1
+ export { default } from './Button';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/atoms/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA"}
@@ -0,0 +1,14 @@
1
+ import type { InputHTMLAttributes } from 'react';
2
+ import React from 'react';
3
+ export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
4
+ /**
5
+ * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
6
+ */
7
+ testId?: string;
8
+ /**
9
+ * Boolean that represents a partial state.
10
+ */
11
+ partial?: boolean;
12
+ }
13
+ declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
14
+ export default Checkbox;
@@ -0,0 +1,6 @@
1
+ import React, { forwardRef } from 'react';
2
+ const Checkbox = forwardRef(function Checkbox({ testId = 'fs-checkbox', partial, ...otherProps }, ref) {
3
+ return (React.createElement("input", { ref: ref, "data-fs-checkbox": true, "data-testid": testId, "data-fs-checkbox-partial": partial, type: "checkbox", ...otherProps }));
4
+ });
5
+ export default Checkbox;
6
+ //# sourceMappingURL=Checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/atoms/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAczC,MAAM,QAAQ,GAAG,UAAU,CAAkC,SAAS,QAAQ,CAC5E,EAAE,MAAM,GAAG,aAAa,EAAE,OAAO,EAAE,GAAG,UAAU,EAAiB,EACjE,GAAG;IAEH,OAAO,CACL,+BACE,GAAG,EAAE,GAAG,2CAEK,MAAM,8BACO,OAAO,EACjC,IAAI,EAAC,UAAU,KACX,UAAU,GACd,CACH,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,QAAQ,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { default } from './Checkbox';
2
+ export type { CheckboxProps } from './Checkbox';
@@ -0,0 +1,2 @@
1
+ export { default } from './Checkbox';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/atoms/Checkbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA"}
@@ -0,0 +1,14 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ import React from 'react';
3
+ export interface IconProps extends HTMLAttributes<HTMLSpanElement> {
4
+ /**
5
+ * A React component that will be rendered as an icon.
6
+ */
7
+ component: ReactNode;
8
+ /**
9
+ * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
10
+ */
11
+ testId?: string;
12
+ }
13
+ declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<HTMLSpanElement>>;
14
+ export default Icon;
@@ -0,0 +1,6 @@
1
+ import React, { forwardRef } from 'react';
2
+ const Icon = forwardRef(function Button({ component, testId = 'fs-icon', ...otherProps }, ref) {
3
+ return (React.createElement("span", { ref: ref, "data-fs-icon": true, "data-testid": testId, ...otherProps }, component));
4
+ });
5
+ export default Icon;
6
+ //# sourceMappingURL=Icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.js","sourceRoot":"","sources":["../../../src/atoms/Icon/Icon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAazC,MAAM,IAAI,GAAG,UAAU,CAA6B,SAAS,MAAM,CACjE,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,UAAU,EAAa,EAC3D,GAAG;IAEH,OAAO,CACL,8BAAM,GAAG,EAAE,GAAG,uCAA4B,MAAM,KAAM,UAAU,IAC7D,SAAS,CACL,CACR,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,IAAI,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { default } from './Icon';
2
+ export type { IconProps } from './Icon';
@@ -0,0 +1,2 @@
1
+ export { default } from './Icon';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/atoms/Icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA"}
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { LabelHTMLAttributes } from 'react';
3
+ export interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
4
+ /**
5
+ * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
6
+ */
7
+ testId?: string;
8
+ }
9
+ declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
10
+ export default Label;
@@ -0,0 +1,6 @@
1
+ import React, { forwardRef } from 'react';
2
+ const Label = forwardRef(function Label({ testId = 'fs-label', children, ...otherProps }, ref) {
3
+ return (React.createElement("label", { ref: ref, "data-fs-label": true, "data-testid": testId, ...otherProps }, children));
4
+ });
5
+ export default Label;
6
+ //# sourceMappingURL=Label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../src/atoms/Label/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAUzC,MAAM,KAAK,GAAG,UAAU,CAA+B,SAAS,KAAK,CACnE,EAAE,MAAM,GAAG,UAAU,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAc,EAC5D,GAAG;IAEH,OAAO,CACL,+BAAO,GAAG,EAAE,GAAG,wCAA6B,MAAM,KAAM,UAAU,IAC/D,QAAQ,CACH,CACT,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,KAAK,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { default } from './Label';
2
+ export type { LabelProps } from './Label';
@@ -0,0 +1,2 @@
1
+ export { default } from './Label';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/atoms/Label/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { InputHTMLAttributes } from 'react';
3
+ export interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
4
+ /**
5
+ * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
6
+ */
7
+ testId?: string;
8
+ }
9
+ declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
10
+ export default Radio;
@@ -0,0 +1,6 @@
1
+ import React, { forwardRef } from 'react';
2
+ const Radio = forwardRef(function Radio({ testId = 'fs-radio', ...otherProps }, ref) {
3
+ return (React.createElement("input", { ref: ref, "data-fs-radio": true, "data-testid": testId, type: "radio", ...otherProps }));
4
+ });
5
+ export default Radio;
6
+ //# sourceMappingURL=Radio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../src/atoms/Radio/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAWzC,MAAM,KAAK,GAAG,UAAU,CAA+B,SAAS,KAAK,CACnE,EAAE,MAAM,GAAG,UAAU,EAAE,GAAG,UAAU,EAAc,EAClD,GAAG;IAEH,OAAO,CACL,+BACE,GAAG,EAAE,GAAG,wCAEK,MAAM,EACnB,IAAI,EAAC,OAAO,KACR,UAAU,GACd,CACH,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,KAAK,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { default } from './Radio';
2
+ export type { RadioProps } from './Radio';
@@ -0,0 +1,2 @@
1
+ export { default } from './Radio';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/atoms/Radio/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,20 @@
1
+ export { default as Badge } from './atoms/Badge';
2
+ export type { BadgeProps } from './atoms/Badge';
3
+ export { default as Button } from './atoms/Button';
4
+ export type { ButtonProps } from './atoms/Button';
5
+ export { default as Checkbox } from './atoms/Checkbox';
6
+ export type { CheckboxProps } from './atoms/Checkbox';
7
+ export { default as Icon } from './atoms/Icon';
8
+ export type { IconProps } from './atoms/Icon';
9
+ export { default as Label } from './atoms/Label';
10
+ export type { LabelProps } from './atoms/Label';
11
+ export { default as Radio } from './atoms/Radio';
12
+ export type { RadioProps } from './atoms/Radio';
13
+ export { default as CheckboxField } from './molecules/CheckboxField';
14
+ export type { CheckboxFieldProps } from './molecules/CheckboxField';
15
+ export { default as IconButton } from './molecules/IconButton';
16
+ export type { IconButtonProps } from './molecules/IconButton';
17
+ export { default as RadioField } from './molecules/RadioField';
18
+ export type { RadioFieldProps } from './molecules/RadioField';
19
+ export { default as Tag } from './molecules/Tag';
20
+ export type { TagProps } from './molecules/Tag';
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ // Atoms
2
+ export { default as Badge } from './atoms/Badge';
3
+ export { default as Button } from './atoms/Button';
4
+ export { default as Checkbox } from './atoms/Checkbox';
5
+ export { default as Icon } from './atoms/Icon';
6
+ export { default as Label } from './atoms/Label';
7
+ export { default as Radio } from './atoms/Radio';
8
+ // Molecules
9
+ export { default as CheckboxField } from './molecules/CheckboxField';
10
+ export { default as IconButton } from './molecules/IconButton';
11
+ export { default as RadioField } from './molecules/RadioField';
12
+ export { default as Tag } from './molecules/Tag';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,eAAe,CAAA;AAEhD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAElD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEtD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,cAAc,CAAA;AAE9C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,eAAe,CAAA;AAEhD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,eAAe,CAAA;AAGhD,YAAY;AACZ,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEpE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAE9D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAE9D,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,iBAAiB,CAAA"}
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ export declare type CheckboxFieldProps = {
3
+ /**
4
+ * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
5
+ */
6
+ testId?: string;
7
+ /**
8
+ * ID to identify input and corresponding label.
9
+ */
10
+ id: string;
11
+ /**
12
+ * The text displayed to identify the input checkbox.
13
+ */
14
+ label: string;
15
+ /**
16
+ * The value to identify the input checkbox.
17
+ */
18
+ value?: string;
19
+ /**
20
+ * Identify checkbox in the same group.
21
+ */
22
+ name?: string;
23
+ };
24
+ declare const CheckboxField: React.ForwardRefExoticComponent<CheckboxFieldProps & React.RefAttributes<HTMLDivElement>>;
25
+ export default CheckboxField;
@@ -0,0 +1,10 @@
1
+ import React, { forwardRef } from 'react';
2
+ import Checkbox from '../../atoms/Checkbox';
3
+ import Label from '../../atoms/Label';
4
+ const CheckboxField = forwardRef(function CheckboxField({ testId = 'fs-checkbox-field', id, label, value, name, ...otherProps }, ref) {
5
+ return (React.createElement("div", { ref: ref, "data-fs-checkbox-field": true, "data-testid": testId },
6
+ React.createElement(Checkbox, { id: id, value: value ?? label, name: name, ...otherProps }),
7
+ React.createElement(Label, { htmlFor: id }, label)));
8
+ });
9
+ export default CheckboxField;
10
+ //# sourceMappingURL=CheckboxField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckboxField.js","sourceRoot":"","sources":["../../../src/molecules/CheckboxField/CheckboxField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,QAAQ,MAAM,sBAAsB,CAAA;AAC3C,OAAO,KAAK,MAAM,mBAAmB,CAAA;AAyBrC,MAAM,aAAa,GAAG,UAAU,CAC9B,SAAS,aAAa,CACpB,EAAE,MAAM,GAAG,mBAAmB,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,EACvE,GAAG;IAEH,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,iDAAsC,MAAM;QACvD,oBAAC,QAAQ,IAAC,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,IAAI,KAAK,EAAE,IAAI,EAAE,IAAI,KAAM,UAAU,GAAI;QACvE,oBAAC,KAAK,IAAC,OAAO,EAAE,EAAE,IAAG,KAAK,CAAS,CAC/B,CACP,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,aAAa,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { default } from './CheckboxField';
2
+ export type { CheckboxFieldProps } from './CheckboxField';
@@ -0,0 +1,2 @@
1
+ export { default } from './CheckboxField';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/molecules/CheckboxField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA"}
@@ -0,0 +1,19 @@
1
+ import type { ReactNode, AriaAttributes } from 'react';
2
+ import React from 'react';
3
+ import type { ButtonProps } from '../../index';
4
+ export interface IconButtonProps extends Omit<ButtonProps, 'aria-label'> {
5
+ /**
6
+ * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
7
+ */
8
+ testId?: string;
9
+ /**
10
+ * A React component that will be rendered as an icon.
11
+ */
12
+ icon: ReactNode;
13
+ /**
14
+ * A Label should be provided.
15
+ */
16
+ 'aria-label': AriaAttributes['aria-label'];
17
+ }
18
+ declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
19
+ export default IconButton;
@@ -0,0 +1,9 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { Icon, Button } from '../../index';
3
+ const IconButton = forwardRef(function IconButton({ icon, children, testId = 'fs-icon-button', 'aria-label': ariaLabel, variant = 'tertiary', ...otherProps }, ref) {
4
+ return (React.createElement(Button, { ref: ref, "data-fs-button": true, "data-fs-icon-button": true, testId: testId, variant: variant, "aria-label": ariaLabel, ...otherProps },
5
+ children,
6
+ React.createElement(Icon, { component: icon })));
7
+ });
8
+ export default IconButton;
9
+ //# sourceMappingURL=IconButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../src/molecules/IconButton/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAkB1C,MAAM,UAAU,GAAG,UAAU,CAC3B,SAAS,UAAU,CACjB,EACE,IAAI,EACJ,QAAQ,EACR,MAAM,GAAG,gBAAgB,EACzB,YAAY,EAAE,SAAS,EACvB,OAAO,GAAG,UAAU,EACpB,GAAG,UAAU,EACd,EACD,GAAG;IAEH,OAAO,CACL,oBAAC,MAAM,IACL,GAAG,EAAE,GAAG,uDAGR,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,gBACJ,SAAS,KACjB,UAAU;QAEb,QAAQ;QACT,oBAAC,IAAI,IAAC,SAAS,EAAE,IAAI,GAAI,CAClB,CACV,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { default } from './IconButton';
2
+ export type { IconButtonProps } from './IconButton';
@@ -0,0 +1,2 @@
1
+ export { default } from './IconButton';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/molecules/IconButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA"}
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ export declare type RadioFieldProps = {
3
+ /**
4
+ * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
5
+ */
6
+ testId?: string;
7
+ /**
8
+ * ID to identify input and corresponding label.
9
+ */
10
+ id: string;
11
+ /**
12
+ * The text displayed to identify the input radio.
13
+ */
14
+ label: string;
15
+ /**
16
+ * The value to identify the input radio.
17
+ */
18
+ value?: string;
19
+ /**
20
+ * Identify radio in the same group.
21
+ */
22
+ name?: string;
23
+ };
24
+ declare const RadioField: React.ForwardRefExoticComponent<RadioFieldProps & React.RefAttributes<HTMLDivElement>>;
25
+ export default RadioField;
@@ -0,0 +1,10 @@
1
+ import Label from '../../atoms/Label';
2
+ import Radio from '../../atoms/Radio';
3
+ import React, { forwardRef } from 'react';
4
+ const RadioField = forwardRef(function RadioField({ testId = 'fs-radio-field', id, label, value, name, ...otherProps }, ref) {
5
+ return (React.createElement("div", { ref: ref, "data-fs-radio-field": true, "data-testid": testId },
6
+ React.createElement(Radio, { id: id, value: value ?? label, name: name, ...otherProps }),
7
+ React.createElement(Label, { htmlFor: id }, label)));
8
+ });
9
+ export default RadioField;
10
+ //# sourceMappingURL=RadioField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioField.js","sourceRoot":"","sources":["../../../src/molecules/RadioField/RadioField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,mBAAmB,CAAA;AACrC,OAAO,KAAK,MAAM,mBAAmB,CAAA;AACrC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAyBzC,MAAM,UAAU,GAAG,UAAU,CAC3B,SAAS,UAAU,CACjB,EAAE,MAAM,GAAG,gBAAgB,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,EACpE,GAAG;IAEH,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,8CAAmC,MAAM;QACpD,oBAAC,KAAK,IAAC,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,IAAI,KAAK,EAAE,IAAI,EAAE,IAAI,KAAM,UAAU,GAAI;QACpE,oBAAC,KAAK,IAAC,OAAO,EAAE,EAAE,IAAG,KAAK,CAAS,CAC/B,CACP,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { default } from './RadioField';
2
+ export type { RadioFieldProps } from './RadioField';
@@ -0,0 +1,2 @@
1
+ export { default } from './RadioField';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/molecules/RadioField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA"}
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import type { ReactNode } from 'react';
3
+ import { BadgeProps } from '../..';
4
+ export interface TagProps extends BadgeProps {
5
+ /**
6
+ * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
7
+ */
8
+ testId?: string;
9
+ /**
10
+ * The text displayed inside the tag.
11
+ */
12
+ label: string;
13
+ /**
14
+ * A React component that will be rendered as an icon.
15
+ */
16
+ icon?: ReactNode;
17
+ /**
18
+ * Function called when Icon button is clicked.
19
+ */
20
+ onClose?: () => void;
21
+ }
22
+ declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLDivElement>>;
23
+ export default Tag;
@@ -0,0 +1,11 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { IconButton } from '../..';
3
+ import { Badge } from '../..';
4
+ import { X } from '@faststore/ui/src/assets';
5
+ const Tag = forwardRef(function Tag({ testId = 'fs-radio-field', label, icon, onClose, ...otherProps }, ref) {
6
+ return (React.createElement(Badge, { ref: ref, "data-fs-tag": true, "data-testid": testId, ...otherProps },
7
+ label,
8
+ React.createElement(IconButton, { "data-fs-tag-icon-button": true, icon: icon ? icon : React.createElement(X, null), "aria-label": "remove", onClick: onClose })));
9
+ });
10
+ export default Tag;
11
+ //# sourceMappingURL=Tag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../src/molecules/Tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,KAAK,EAAc,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,0BAA0B,CAAA;AAqB5C,MAAM,GAAG,GAAG,UAAU,CAA2B,SAAS,GAAG,CAC3D,EAAE,MAAM,GAAG,gBAAgB,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,UAAU,EAAE,EAClE,GAAG;IAEH,OAAO,CACL,oBAAC,KAAK,IAAC,GAAG,EAAE,GAAG,sCAA2B,MAAM,KAAM,UAAU;QAC7D,KAAK;QACN,oBAAC,UAAU,qCAET,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAC,CAAC,OAAG,gBACd,QAAQ,EACnB,OAAO,EAAE,OAAO,GAChB,CACI,CACT,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,GAAG,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { default } from './Tag';
2
+ export type { TagProps } from './Tag';
@@ -0,0 +1,2 @@
1
+ export { default } from './Tag';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/molecules/Tag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA"}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@faststore/components",
3
- "version": "1.12.19",
3
+ "version": "2.0.0-alpha.0",
4
4
  "main": "index.js",
5
5
  "author": "Emerson Laurentino @emersonlaurentino",
6
6
  "license": "MIT",
7
- "gitHead": "5d5338e9f856f19c8b190ddbaba1ee243f1ea8b6"
7
+ "gitHead": "82a6325bd801a6c3a36a2d2aa294ea36a5e9b18d"
8
8
  }