@faststore/ui 1.12.11 → 1.12.13

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
+ ## [1.12.13](https://github.com/vtex/faststore/compare/v1.12.12...v1.12.13) (2022-10-11)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Rename `SearchInput`'s form data-attribute ([#1485](https://github.com/vtex/faststore/issues/1485)) ([c065646](https://github.com/vtex/faststore/commit/c065646948e32d3474f13b79a50090b6ed0bda28))
12
+
13
+
14
+
6
15
  ## [1.12.11](https://github.com/vtex/faststore/compare/v1.12.10...v1.12.11) (2022-10-06)
7
16
 
8
17
 
@@ -19,7 +19,7 @@ const SearchInput = forwardRef(function SearchInput({ onSubmit, icon, 'aria-labe
19
19
  inputRef: inputRef.current,
20
20
  formRef: formRef.current,
21
21
  }));
22
- return (React.createElement(Form, { ref: formRef, "data-fs-search-input": true, "data-testid": testId, onSubmit: handleSubmit, role: "search" },
22
+ return (React.createElement(Form, { ref: formRef, "data-fs-search-input-form": true, "data-testid": testId, onSubmit: handleSubmit, role: "search" },
23
23
  React.createElement(Input, Object.assign({ ref: inputRef, "aria-label": ariaLabel }, otherProps)),
24
24
  React.createElement(Button, { type: "submit", "aria-label": "Submit Search" },
25
25
  React.createElement(Icon, { component: icon ?? React.createElement(SearchIcon, null) }))));
@@ -1 +1 @@
1
- {"version":3,"file":"SearchInput.js","sourceRoot":"","sources":["../../../src/molecules/SearchInput/SearchInput.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEtE,OAAO,MAAM,MAAM,oBAAoB,CAAA;AACvC,OAAO,IAAI,MAAM,kBAAkB,CAAA;AACnC,OA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,CAC5B,SAAS,WAAW,CAClB,EACE,QAAQ,EACR,IAAI,EACJ,YAAY,EAAE,SAAS,GAAG,QAAQ,EAClC,MAAM,GAAG,oBAAoB,EAC7B,GAAG,UAAU,EACd,EACD,GAAG;IAEH,MAAM,QAAQ,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAA;IAC/C,MAAM,OAAO,GAAG,MAAM,CAAkB,IAAI,CAAC,CAAA;IAE7C,MAAM,YAAY,GAAG,CAAC,KAAgB,EAAE,EAAE;QACxC,KAAK,CAAC,cAAc,EAAE,CAAA;QAEtB,IAAI,QAAQ,CAAC,OAAO,EAAE,KAAK,KAAK,EAAE,EAAE;YAClC,QAAQ,CAAC,QAAQ,CAAC,OAAQ,CAAC,KAAK,CAAC,CAAA;SAClC;IACH,CAAC,CAAA;IAED,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;QAC9B,QAAQ,EAAE,QAAQ,CAAC,OAAO;QAC1B,OAAO,EAAE,OAAO,CAAC,OAAO;KACzB,CAAC,CAAC,CAAA;IAEH,OAAO,CACL,oBAAC,IAAI,IACH,GAAG,EAAE,OAAO,oDAEC,MAAM,EACnB,QAAQ,EAAE,YAAY,EACtB,IAAI,EAAC,QAAQ;QAEb,oBAAC,KAAK,kBAAC,GAAG,EAAE,QAAQ,gBAAc,SAAS,IAAM,UAAU,EAAI;QAC/D,oBAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,gBAAY,eAAe;YAC9C,oBAAC,IAAI,IAAC,SAAS,EAAE,IAAI,IAAI,oBAAC,UAAU,OAAG,GAAI,CACpC,CACJ,CACR,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,WAAW,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/ui",
3
- "version": "1.12.11",
3
+ "version": "1.12.13",
4
4
  "description": "A lightweight, framework agnostic component library for React",
5
5
  "author": "emersonlaurentino",
6
6
  "license": "MIT",
@@ -57,7 +57,7 @@
57
57
  "react-dom": "^17.0.2"
58
58
  },
59
59
  "devDependencies": {
60
- "@faststore/styles": "^1.12.11",
60
+ "@faststore/styles": "^1.12.13",
61
61
  "@size-limit/preset-small-lib": "^7.0.8",
62
62
  "@storybook/addon-actions": "^6.4.4",
63
63
  "@storybook/addon-docs": "^6.4.4",
@@ -85,5 +85,5 @@
85
85
  "tsdx": "^0.14.1",
86
86
  "typescript": "^4.2.4"
87
87
  },
88
- "gitHead": "db0804e6ec40d14babf429a9d0c6576bbe8a3340"
88
+ "gitHead": "e30bc52489357e316dfcf7e0c1871ac31e97c683"
89
89
  }
@@ -6,18 +6,24 @@ import type { SearchInputProps } from './SearchInput'
6
6
  import SearchInput from './SearchInput'
7
7
 
8
8
  const Wrapper = (props: Partial<SearchInputProps>) => (
9
- <SearchInput {...props} onSubmit={(value) => value} testId="search-input" />
9
+ <SearchInput testId="search-input" onSubmit={(value) => value} {...props} />
10
10
  )
11
11
 
12
12
  describe('SearchInput', () => {
13
- it('`data-fs-search-input` is present', () => {
13
+ it('`data-fs-search-input-form` is present', () => {
14
14
  const { getByTestId } = render(<Wrapper />)
15
15
 
16
16
  expect(getByTestId('search-input')).toHaveAttribute(
17
- 'data-fs-search-input'
17
+ 'data-fs-search-input-form'
18
18
  )
19
19
  })
20
20
 
21
+ it('`data-fs-search-input` is present and applied to `Input`', () => {
22
+ const { getByTestId } = render(<Wrapper data-fs-search-input />)
23
+
24
+ expect(getByTestId('store-input')).toHaveAttribute('data-fs-search-input')
25
+ })
26
+
21
27
  describe('Accessibility', () => {
22
28
  it('should have no violations', async () => {
23
29
  const { getByTestId } = render(<Wrapper />)
@@ -85,7 +85,7 @@ const SearchInput = forwardRef<SearchInputRef | null, SearchInputProps>(
85
85
  return (
86
86
  <Form
87
87
  ref={formRef}
88
- data-fs-search-input
88
+ data-fs-search-input-form
89
89
  data-testid={testId}
90
90
  onSubmit={handleSubmit}
91
91
  role="search"
@@ -22,7 +22,7 @@ import CustomIcon from './assets/CustomIcon'
22
22
 
23
23
  ## CSS Selectors
24
24
  ```css
25
- [data-fs-search-input] {}
25
+ [data-fs-search-input-form] {}
26
26
  ```
27
27
 
28
28
  This component inherits [Input](?path=/docs/atoms-input--input#css-selectors), [Button](?path=/docs/atoms-button--button#css-selectors), [Icon](?path=/docs/atoms-icon--icon#css-selectors) css selectors.