@bonprix-ds/react-search-field 1.0.2 → 1.0.3
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchField.js","names":[],"sources":["../../src/SearchField.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { RefObject } from \"react\";\n\nimport BaseInputField from \"@bonprix-ds/react-base-input-field\";\nimport type { TextFieldBaseProps } from \"@bonprix-ds/react-text-field\";\n\ninterface BaseProps extends TextFieldBaseProps {\n /** Callback that is triggered when the search button is clicked. */\n onSearch: () => void;\n /** Reference to the input element. */\n inputRef?: RefObject<HTMLInputElement>;\n}\n\ninterface ControlledInputProps extends BaseProps {\n /** The current value of the input field. Should be used in conjunction with `onChange`, when controlling the input. Should be `undefined` otherwise. */\n value: string;\n defaultValue?: never;\n /** Callback that is triggered when the input value changes. Should be used in conjunction with `value`, when controlling the input. Optional otherwise. */\n onChange: (value: string) => void;\n}\n\ninterface UncontrolledInputProps extends BaseProps {\n value?: never;\n /** The default value of the input field. Should be used when the input is uncontrolled. */\n defaultValue: string;\n onChange?: (value: string) => void;\n}\n\nexport type Props = ControlledInputProps | UncontrolledInputProps;\n\nconst SearchField = ({ onSearch, ...props }: Props) => {\n const iconButtonLabel = \"Suchen\";\n return (\n <BaseInputField\n {...props}\n type=\"text\"\n buttonIcon=\"search\"\n iconButtonType=\"submit\"\n iconButtonLabel={iconButtonLabel}\n onIconButtonClick={onSearch}\n componentName=\"search-field\"\n />\n );\n};\nexport default SearchField;\n"],"mappings":";;;;;AA+BA,
|
|
1
|
+
{"version":3,"file":"SearchField.js","names":["BaseInputField","SearchField","props","onSearch"],"sources":["../../src/SearchField.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { RefObject } from \"react\";\n\nimport BaseInputField from \"@bonprix-ds/react-base-input-field\";\nimport type { TextFieldBaseProps } from \"@bonprix-ds/react-text-field\";\n\ninterface BaseProps extends TextFieldBaseProps {\n /** Callback that is triggered when the search button is clicked. */\n onSearch: () => void;\n /** Reference to the input element. */\n inputRef?: RefObject<HTMLInputElement>;\n}\n\ninterface ControlledInputProps extends BaseProps {\n /** The current value of the input field. Should be used in conjunction with `onChange`, when controlling the input. Should be `undefined` otherwise. */\n value: string;\n defaultValue?: never;\n /** Callback that is triggered when the input value changes. Should be used in conjunction with `value`, when controlling the input. Optional otherwise. */\n onChange: (value: string) => void;\n}\n\ninterface UncontrolledInputProps extends BaseProps {\n value?: never;\n /** The default value of the input field. Should be used when the input is uncontrolled. */\n defaultValue: string;\n onChange?: (value: string) => void;\n}\n\nexport type Props = ControlledInputProps | UncontrolledInputProps;\n\nconst SearchField = ({ onSearch, ...props }: Props) => {\n const iconButtonLabel = \"Suchen\";\n return (\n <BaseInputField\n {...props}\n type=\"text\"\n buttonIcon=\"search\"\n iconButtonType=\"submit\"\n iconButtonLabel={iconButtonLabel}\n onIconButtonClick={onSearch}\n componentName=\"search-field\"\n />\n );\n};\nexport default SearchField;\n"],"mappings":";;;;;AA+BA,IAAMC,KAAe,EAAE,aAAU,GAAGC,QAGhC,kBAACF,GAAD;CACE,GAAIE;CACJ,MAAK;CACL,YAAW;CACX,gBAAe;CACE;CACjB,mBAAmBC;CACnB,eAAc;AACf,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bonprix-ds/react-search-field",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "SearchField component, implemented in React, for the Bonprix Design System.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -32,19 +32,18 @@
|
|
|
32
32
|
"provenance": true
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@bonprix-ds/react-base-input-field": "1.0.
|
|
36
|
-
"@bonprix-ds/react-text-field": "1.0
|
|
37
|
-
"@bonprix-ds/utils": "0.
|
|
35
|
+
"@bonprix-ds/react-base-input-field": "1.0.3",
|
|
36
|
+
"@bonprix-ds/react-text-field": "1.1.0",
|
|
37
|
+
"@bonprix-ds/utils": "0.3.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/react": "19.3.0",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"vite": "8.3.0"
|
|
41
|
+
"vite": "8.3.2",
|
|
42
|
+
"@bonprix-ds/vite-config": "0.0.0"
|
|
44
43
|
},
|
|
45
44
|
"peerDependencies": {
|
|
46
|
-
"react": "^19
|
|
47
|
-
"react-dom": "^19
|
|
45
|
+
"react": "^19",
|
|
46
|
+
"react-dom": "^19",
|
|
48
47
|
"tailwind-variants": "0.3.1"
|
|
49
48
|
},
|
|
50
49
|
"scripts": {
|