@faststore/ui 3.16.0 → 3.18.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.
@@ -1,6 +1,4 @@
1
1
  export * from '@faststore/components';
2
- export { default as TextArea } from './components/atoms/TextArea';
3
- export type { TextAreaProps } from './components/atoms/TextArea';
4
2
  export { default as Incentive } from './components/atoms/Incentive';
5
3
  export type { IncentiveProps } from './components/atoms/Incentive';
6
4
  export { Tile, Tiles } from './components/organisms/Tiles';
package/dist/cjs/index.js CHANGED
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Tiles = exports.Tile = exports.Incentive = exports.TextArea = void 0;
3
+ exports.Tiles = exports.Tile = exports.Incentive = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  tslib_1.__exportStar(require("@faststore/components"), exports);
6
- // Atoms
7
- var TextArea_1 = require("./components/atoms/TextArea");
8
- Object.defineProperty(exports, "TextArea", { enumerable: true, get: function () { return tslib_1.__importDefault(TextArea_1).default; } });
9
6
  var Incentive_1 = require("./components/atoms/Incentive");
10
7
  Object.defineProperty(exports, "Incentive", { enumerable: true, get: function () { return tslib_1.__importDefault(Incentive_1).default; } });
11
8
  // Organisms
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,gEAAqC;AAErC,QAAQ;AACR,wDAAiE;AAAxD,6HAAA,OAAO,OAAY;AAG5B,0DAAmE;AAA1D,+HAAA,OAAO,OAAa;AAG7B,YAAY;AACZ,sDAA0D;AAAjD,6FAAA,IAAI,OAAA;AAAE,8FAAA,KAAK,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,gEAAqC;AAErC,0DAAmE;AAA1D,+HAAA,OAAO,OAAa;AAG7B,YAAY;AACZ,sDAA0D;AAAjD,6FAAA,IAAI,OAAA;AAAE,8FAAA,KAAK,OAAA"}
@@ -1,6 +1,4 @@
1
1
  export * from '@faststore/components';
2
- export { default as TextArea } from './components/atoms/TextArea';
3
- export type { TextAreaProps } from './components/atoms/TextArea';
4
2
  export { default as Incentive } from './components/atoms/Incentive';
5
3
  export type { IncentiveProps } from './components/atoms/Incentive';
6
4
  export { Tile, Tiles } from './components/organisms/Tiles';
package/dist/esm/index.js CHANGED
@@ -1,6 +1,4 @@
1
1
  export * from '@faststore/components';
2
- // Atoms
3
- export { default as TextArea } from './components/atoms/TextArea';
4
2
  export { default as Incentive } from './components/atoms/Incentive';
5
3
  // Organisms
6
4
  export { Tile, Tiles } from './components/organisms/Tiles';
@@ -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,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAGjE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAGnE,YAAY;AACZ,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AAErC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAGnE,YAAY;AACZ,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/ui",
3
- "version": "3.16.0",
3
+ "version": "3.18.0",
4
4
  "description": "A lightweight, framework agnostic component library for React",
5
5
  "author": "emersonlaurentino",
6
6
  "license": "MIT",
@@ -47,7 +47,7 @@
47
47
  }
48
48
  ],
49
49
  "dependencies": {
50
- "@faststore/components": "^3.16.0",
50
+ "@faststore/components": "^3.18.0",
51
51
  "include-media": "^1.4.10",
52
52
  "modern-normalize": "^1.1.0",
53
53
  "react-swipeable": "^7.0.0",
@@ -69,5 +69,5 @@
69
69
  "volta": {
70
70
  "extends": "../../package.json"
71
71
  },
72
- "gitHead": "f8e0fe29267488a76fb8d85c33c3aa2cebf0d0f9"
72
+ "gitHead": "ba979131660bdfcfb18ed1f144c50f9643b49ecb"
73
73
  }
@@ -0,0 +1,86 @@
1
+ [data-fs-textarea] {
2
+ // --------------------------------------------------------
3
+ // Design Tokens for Textarea
4
+ // --------------------------------------------------------
5
+
6
+ // Default properties
7
+ --fs-textarea-padding : var(--fs-spacing-1) var(--fs-spacing-2);
8
+ --fs-textarea-height : calc(var(--fs-control-tap-size) * 3);
9
+
10
+ --fs-textarea-bkg-color : var(--fs-color-body-bkg);
11
+ --fs-textarea-box-shadow : none;
12
+ --fs-textarea-box-shadow-hover : 0 0 0 var(--fs-border-width) var(--fs-border-color-active);
13
+
14
+ --fs-textarea-border-radius : var(--fs-border-radius);
15
+ --fs-textarea-border-width : var(--fs-border-width);
16
+ --fs-textarea-border-color : var(--fs-border-color);
17
+ --fs-textarea-border-color-hover : var(--fs-border-color-active);
18
+
19
+ --fs-textarea-text-color : var(--fs-color-text);
20
+ --fs-textarea-text-size : var(--fs-text-size-body);
21
+
22
+ --fs-textarea-line-height : 1.25;
23
+
24
+ --fs-textarea-transition-function : var(--fs-transition-function);
25
+ --fs-textarea-transition-property : var(--fs-transition-property);
26
+ --fs-textarea-transition-timing : var(--fs-transition-timing);
27
+
28
+ // Disabled properties
29
+ --fs-textarea-disabled-bkg-color : var(--fs-color-disabled-bkg);
30
+ --fs-textarea-disabled-border-width : var(--fs-border-width);
31
+ --fs-textarea-disabled-text-color : var(--fs-color-disabled-text);
32
+ --fs-textarea-disabled-border-color : var(--fs-border-color);
33
+
34
+ // --------------------------------------------------------
35
+ // Structural Styles
36
+ // --------------------------------------------------------
37
+
38
+ width: 100%;
39
+ height: var(--fs-textarea-height);
40
+ padding: var(--fs-textarea-padding);
41
+ font-size: var(--fs-textarea-text-size);
42
+ line-height: var(--fs-textarea-line-height);
43
+ color: var(--fs-textarea-text-color);
44
+ background-color: var(--fs-textarea-bkg-color);
45
+ border: var(--fs-textarea-border-width) solid var(--fs-textarea-border-color);
46
+ border-radius: var(--fs-textarea-border-radius);
47
+ box-shadow: var(--fs-textarea-box-shadow);
48
+ transition:
49
+ var(--fs-textarea-transition-property) var(--fs-textarea-transition-timing) var(--fs-textarea-transition-function),
50
+ width 0s,
51
+ height 0s;
52
+
53
+ @include input-focus-ring;
54
+
55
+ &:hover:not(:disabled):not(:focus-visible):not(:focus) {
56
+ border-color: var(--fs-textarea-border-color-hover);
57
+ box-shadow: var(--fs-textarea-box-shadow-hover);
58
+ }
59
+
60
+ &:disabled {
61
+ color: var(--fs-textarea-disabled-text-color);
62
+ cursor: not-allowed;
63
+ background-color: var(--fs-textarea-disabled-bkg-color);
64
+ border: var(--fs-textarea-disabled-border-width) solid var(--fs-textarea-disabled-border-color);
65
+ }
66
+
67
+ // --------------------------------------------------------
68
+ // Variants Styles
69
+ // --------------------------------------------------------
70
+
71
+ &[data-fs-textarea-resize="none"] {
72
+ resize: none;
73
+ }
74
+
75
+ &[data-fs-textarea-resize="vertical"] {
76
+ resize: vertical;
77
+ }
78
+
79
+ &[data-fs-textarea-resize="horizontal"] {
80
+ resize: horizontal;
81
+ }
82
+
83
+ &[data-fs-textarea-resize="both"] {
84
+ resize: both;
85
+ }
86
+ }
@@ -42,6 +42,12 @@
42
42
  // Body
43
43
  --fs-modal-body-padding : var(--fs-spacing-1) var(--fs-spacing-4) var(--fs-spacing-5);
44
44
 
45
+ // Footer
46
+ --fs-modal-footer-padding : var(--fs-spacing-3) 0 var(--fs-spacing-3);
47
+ --fs-modal-footer-box-shadow : 0 -1px 15px 0 rgb(0 0 0 / 10.2%);
48
+ --fs-modal-footer-actions-padding : var(--fs-spacing-1) var(--fs-spacing-4);
49
+ --fs-modal-footer-actions-gap : var(--fs-spacing-3);
50
+
45
51
  position: fixed;
46
52
  top: var(--fs-modal-position-top);
47
53
  right: var(--fs-modal-position-right);
@@ -94,4 +100,31 @@
94
100
  [data-fs-modal-body] {
95
101
  padding: var(--fs-modal-body-padding);
96
102
  }
103
+
104
+ [data-fs-modal-footer] {
105
+ padding: var(--fs-modal-footer-padding);
106
+ box-shadow: var(--fs-modal-footer-box-shadow);
107
+
108
+ [data-fs-modal-footer-actions] {
109
+ display: flex;
110
+ gap: var(--fs-modal-footer-actions-gap);
111
+ align-items: center;
112
+ justify-content: flex-end;
113
+ padding: var(--fs-modal-footer-actions-padding);
114
+
115
+ > * {
116
+ flex-shrink: 0;
117
+ }
118
+
119
+ &[data-fs-modal-footer-actions-direction="vertical"] {
120
+ flex-direction: column;
121
+ align-items: flex-end;
122
+ justify-content: center;
123
+ }
124
+
125
+ &[data-fs-modal-footer-actions-wrap="true"] {
126
+ flex-wrap: wrap;
127
+ }
128
+ }
129
+ }
97
130
  }
package/src/index.ts CHANGED
@@ -1,9 +1,5 @@
1
1
  export * from '@faststore/components'
2
2
 
3
- // Atoms
4
- export { default as TextArea } from './components/atoms/TextArea'
5
- export type { TextAreaProps } from './components/atoms/TextArea'
6
-
7
3
  export { default as Incentive } from './components/atoms/Incentive'
8
4
  export type { IncentiveProps } from './components/atoms/Incentive'
9
5
 
@@ -4,6 +4,7 @@
4
4
  @import "../components/atoms/Checkbox/styles";
5
5
  @import "../components/atoms/Icon/styles";
6
6
  @import "../components/atoms/Input/styles";
7
+ @import "../components/atoms/Textarea/styles";
7
8
  @import "../components/atoms/Link/styles";
8
9
  @import "../components/atoms/List/styles";
9
10
  @import "../components/atoms/Loader/styles";
@@ -1,14 +0,0 @@
1
- import type { TextareaHTMLAttributes } from 'react';
2
- import React from 'react';
3
- export interface TextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'children'> {
4
- /**
5
- * Current variant of the input.
6
- */
7
- variant?: 'success' | 'error';
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 TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
14
- export default TextArea;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const react_1 = tslib_1.__importStar(require("react"));
5
- const TextArea = (0, react_1.forwardRef)(function TextArea({ variant, testId = 'store-textarea', ...otherProps }, ref) {
6
- const variants = {
7
- 'data-success': variant === 'success' || undefined,
8
- 'data-error': variant === 'error' || undefined,
9
- };
10
- return (react_1.default.createElement("textarea", { ref: ref, "data-fs-textarea": true, "data-testid": testId, ...variants, ...otherProps }));
11
- });
12
- exports.default = TextArea;
13
- //# sourceMappingURL=TextArea.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextArea.js","sourceRoot":"","sources":["../../../../../src/components/atoms/TextArea/TextArea.tsx"],"names":[],"mappings":";;;AACA,uDAAyC;AAczC,MAAM,QAAQ,GAAG,IAAA,kBAAU,EACzB,SAAS,QAAQ,CACf,EAAE,OAAO,EAAE,MAAM,GAAG,gBAAgB,EAAE,GAAG,UAAU,EAAE,EACrD,GAAG;IAEH,MAAM,QAAQ,GAAG;QACf,cAAc,EAAE,OAAO,KAAK,SAAS,IAAI,SAAS;QAClD,YAAY,EAAE,OAAO,KAAK,OAAO,IAAI,SAAS;KAC/C,CAAA;IAED,OAAO,CACL,4CACE,GAAG,EAAE,GAAG,2CAEK,MAAM,KACf,QAAQ,KACR,UAAU,GACd,CACH,CAAA;AACH,CAAC,CACF,CAAA;AAED,kBAAe,QAAQ,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default } from './TextArea';
2
- export type { TextAreaProps } from './TextArea';
@@ -1,9 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.default = void 0;
7
- var TextArea_1 = require("./TextArea");
8
- Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(TextArea_1).default; } });
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/atoms/TextArea/index.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAoC;AAA3B,oHAAA,OAAO,OAAA"}
@@ -1,14 +0,0 @@
1
- import type { TextareaHTMLAttributes } from 'react';
2
- import React from 'react';
3
- export interface TextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'children'> {
4
- /**
5
- * Current variant of the input.
6
- */
7
- variant?: 'success' | 'error';
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 TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
14
- export default TextArea;
@@ -1,10 +0,0 @@
1
- import React, { forwardRef } from 'react';
2
- const TextArea = forwardRef(function TextArea({ variant, testId = 'store-textarea', ...otherProps }, ref) {
3
- const variants = {
4
- 'data-success': variant === 'success' || undefined,
5
- 'data-error': variant === 'error' || undefined,
6
- };
7
- return (React.createElement("textarea", { ref: ref, "data-fs-textarea": true, "data-testid": testId, ...variants, ...otherProps }));
8
- });
9
- export default TextArea;
10
- //# sourceMappingURL=TextArea.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextArea.js","sourceRoot":"","sources":["../../../../../src/components/atoms/TextArea/TextArea.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAczC,MAAM,QAAQ,GAAG,UAAU,CACzB,SAAS,QAAQ,CACf,EAAE,OAAO,EAAE,MAAM,GAAG,gBAAgB,EAAE,GAAG,UAAU,EAAE,EACrD,GAAG;IAEH,MAAM,QAAQ,GAAG;QACf,cAAc,EAAE,OAAO,KAAK,SAAS,IAAI,SAAS;QAClD,YAAY,EAAE,OAAO,KAAK,OAAO,IAAI,SAAS;KAC/C,CAAA;IAED,OAAO,CACL,kCACE,GAAG,EAAE,GAAG,2CAEK,MAAM,KACf,QAAQ,KACR,UAAU,GACd,CACH,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,QAAQ,CAAA"}
@@ -1,2 +0,0 @@
1
- export { default } from './TextArea';
2
- export type { TextAreaProps } from './TextArea';
@@ -1,2 +0,0 @@
1
- export { default } from './TextArea';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/atoms/TextArea/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA"}
@@ -1,38 +0,0 @@
1
- import type { TextareaHTMLAttributes } from 'react'
2
- import React, { forwardRef } from 'react'
3
-
4
- export interface TextAreaProps
5
- extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'children'> {
6
- /**
7
- * Current variant of the input.
8
- */
9
- variant?: 'success' | 'error'
10
- /**
11
- * ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
12
- */
13
- testId?: string
14
- }
15
-
16
- const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(
17
- function TextArea(
18
- { variant, testId = 'store-textarea', ...otherProps },
19
- ref
20
- ) {
21
- const variants = {
22
- 'data-success': variant === 'success' || undefined,
23
- 'data-error': variant === 'error' || undefined,
24
- }
25
-
26
- return (
27
- <textarea
28
- ref={ref}
29
- data-fs-textarea
30
- data-testid={testId}
31
- {...variants}
32
- {...otherProps}
33
- />
34
- )
35
- }
36
- )
37
-
38
- export default TextArea
@@ -1,2 +0,0 @@
1
- export { default } from './TextArea'
2
- export type { TextAreaProps } from './TextArea'