@bonprix-ds/react-email-field 1.0.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/dist/index.d.ts +24 -0
- package/dist/index.js +2 -0
- package/dist/src/EmailField.js +14 -0
- package/dist/src/EmailField.js.map +1 -0
- package/package.json +52 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
import { TextFieldBaseProps } from '@bonprix-ds/react-text-field';
|
|
3
|
+
|
|
4
|
+
declare interface ControlledInputProps extends TextFieldBaseProps {
|
|
5
|
+
/** The current value of the input field. Should be used in conjunction with `onChange`, when controlling the input. Should be `undefined` otherwise. */
|
|
6
|
+
value: string;
|
|
7
|
+
defaultValue?: never;
|
|
8
|
+
/** Callback that is triggered when the input value changes. Should be used in conjunction with `value`, when controlling the input. Optional otherwise. */
|
|
9
|
+
onChange: (value: string) => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare const EmailField: (props: EmailFieldProps) => default_2.JSX.Element;
|
|
13
|
+
export default EmailField;
|
|
14
|
+
|
|
15
|
+
export declare type EmailFieldProps = ControlledInputProps | UncontrolledInputProps;
|
|
16
|
+
|
|
17
|
+
declare interface UncontrolledInputProps extends TextFieldBaseProps {
|
|
18
|
+
value?: never;
|
|
19
|
+
/** The default value of the input field. Should be used when the input is uncontrolled. */
|
|
20
|
+
defaultValue: string;
|
|
21
|
+
onChange?: (value: string) => void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { }
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import e from "@bonprix-ds/react-base-input-field";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
+
//#region src/EmailField.tsx
|
|
6
|
+
var n = (n) => /* @__PURE__ */ t(e, {
|
|
7
|
+
...n,
|
|
8
|
+
type: "email",
|
|
9
|
+
componentName: "email-field"
|
|
10
|
+
});
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as default };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=EmailField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmailField.js","names":[],"sources":["../../src/EmailField.tsx"],"sourcesContent":["\"use client\";\n\nimport BaseInputField from \"@bonprix-ds/react-base-input-field\";\nimport type { TextFieldBaseProps } from \"@bonprix-ds/react-text-field\";\nimport React from \"react\";\n\ninterface ControlledInputProps extends TextFieldBaseProps {\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 TextFieldBaseProps {\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 EmailField = (props: Props) => {\n return <BaseInputField {...props} type=\"email\" componentName=\"email-field\" />;\n};\nexport default EmailField;\n"],"mappings":";;;;;AAuBA,IAAM,KAAc,MACX,kBAAC,GAAD;CAAgB,GAAI;CAAO,MAAK;CAAQ,eAAc;AAAe,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bonprix-ds/react-email-field",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "EmailField component, implemented in React, for the Bonprix Design System.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public",
|
|
8
|
+
"provenance": true
|
|
9
|
+
},
|
|
10
|
+
"module": "./dist/index.js",
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"keywords": [],
|
|
24
|
+
"author": "",
|
|
25
|
+
"license": "UNLICENSED",
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/bonprix/design-system.git",
|
|
29
|
+
"directory": "packages/react/email-field"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@bonprix-ds/react-base-input-field": "1.0.0",
|
|
33
|
+
"@bonprix-ds/react-text-field": "1.0.0",
|
|
34
|
+
"@bonprix-ds/utils": "0.2.1"
|
|
35
|
+
},
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"react": "^19.0.0",
|
|
38
|
+
"react-dom": "^19.0.0",
|
|
39
|
+
"tailwind-variants": "0.3.1"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"vite": "8.2.2",
|
|
43
|
+
"@types/react": "19.2.18",
|
|
44
|
+
"@vitejs/plugin-react": "6.1.1",
|
|
45
|
+
"rollup-preserve-directives": "1.1.3",
|
|
46
|
+
"unplugin-dts": "1.0.3",
|
|
47
|
+
"@microsoft/api-extractor": "7.59.0"
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "vite build"
|
|
51
|
+
}
|
|
52
|
+
}
|