@purr-react-styled-components/components.form-field 0.0.1 → 0.0.2
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/package.json +5 -3
- package/dist/_components.d.ts +0 -4
- package/dist/_style.d.ts +0 -6
- package/dist/_types.d.ts +0 -11
- package/dist/index.cjs +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -36
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purr-react-styled-components/components.form-field",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"react": "*",
|
|
26
26
|
"styled-components": "*",
|
|
27
27
|
"clsx": "*",
|
|
28
|
-
"@purr-core/utils.definitions": "0.0.
|
|
29
|
-
"@purr-core/utils.helpers": "0.0.
|
|
28
|
+
"@purr-core/utils.definitions": "0.0.11",
|
|
29
|
+
"@purr-core/utils.helpers": "0.0.11"
|
|
30
30
|
},
|
|
31
31
|
"author": "@DinhThienPhuc",
|
|
32
32
|
"license": "ISC",
|
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
"scripts": {
|
|
36
36
|
"dev": "vite build --watch",
|
|
37
37
|
"build": "tsc && vite build",
|
|
38
|
+
"build:vite": "tsc && vite build",
|
|
39
|
+
"build:tsup": "tsup",
|
|
38
40
|
"lint": "eslint . --ext ts,tsx --max-warnings 0"
|
|
39
41
|
}
|
|
40
42
|
}
|
package/dist/_components.d.ts
DELETED
package/dist/_style.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const Styled: {
|
|
2
|
-
Container: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
-
HelperText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
-
ExplainText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
5
|
-
ErrorMessage: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
|
-
};
|
package/dist/_types.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { IExtendable } from '@purr-core/utils.definitions';
|
|
3
|
-
|
|
4
|
-
export interface IFormFieldProps extends IExtendable {
|
|
5
|
-
label?: ReactNode;
|
|
6
|
-
htmlAttributes?: HTMLAttributes<HTMLElement> & IExtendable;
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
className?: string;
|
|
9
|
-
helperText?: ReactNode;
|
|
10
|
-
errorMessage?: ReactNode;
|
|
11
|
-
}
|
package/dist/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),d=require("clsx"),e=require("styled-components"),i={Container:e.div.withConfig({displayName:"_style__Container",componentId:"sc-4mt1q9-0"})(["display:flex;flex-direction:column;row-gap:8px;position:relative;"]),HelperText:e.div.withConfig({displayName:"_style__HelperText",componentId:"sc-4mt1q9-1"})(["color:#00000073;"]),ExplainText:e.div.withConfig({displayName:"_style__ExplainText",componentId:"sc-4mt1q9-2"})(["position:absolute;bottom:0px;color:#00000073;"]),ErrorMessage:e.div.withConfig({displayName:"_style__ErrorMessage",componentId:"sc-4mt1q9-3"})(["position:absolute;bottom:-21px;color:#ff4d4f;"])},m=({children:l,className:n,htmlAttributes:a,label:s,helperText:o,errorMessage:r})=>t.jsxs(i.Container,{...a,className:d("form-field",!!s&&"form-field--has-label",!!o&&"form-field--has-helper-text",n),children:[s,l,!!o&&t.jsx(i.HelperText,{className:"form-field__helper-text",children:o}),!!r&&t.jsx(i.ErrorMessage,{className:"form-field__error-message",children:r})]});exports.FormField=m;
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { jsxs as a, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import d from "clsx";
|
|
3
|
-
import e from "styled-components";
|
|
4
|
-
const t = {
|
|
5
|
-
Container: e.div.withConfig({
|
|
6
|
-
displayName: "_style__Container",
|
|
7
|
-
componentId: "sc-4mt1q9-0"
|
|
8
|
-
})(["display:flex;flex-direction:column;row-gap:8px;position:relative;"]),
|
|
9
|
-
HelperText: e.div.withConfig({
|
|
10
|
-
displayName: "_style__HelperText",
|
|
11
|
-
componentId: "sc-4mt1q9-1"
|
|
12
|
-
})(["color:#00000073;"]),
|
|
13
|
-
ExplainText: e.div.withConfig({
|
|
14
|
-
displayName: "_style__ExplainText",
|
|
15
|
-
componentId: "sc-4mt1q9-2"
|
|
16
|
-
})(["position:absolute;bottom:0px;color:#00000073;"]),
|
|
17
|
-
ErrorMessage: e.div.withConfig({
|
|
18
|
-
displayName: "_style__ErrorMessage",
|
|
19
|
-
componentId: "sc-4mt1q9-3"
|
|
20
|
-
})(["position:absolute;bottom:-21px;color:#ff4d4f;"])
|
|
21
|
-
}, x = ({
|
|
22
|
-
children: l,
|
|
23
|
-
className: m,
|
|
24
|
-
htmlAttributes: n,
|
|
25
|
-
label: i,
|
|
26
|
-
helperText: o,
|
|
27
|
-
errorMessage: r
|
|
28
|
-
}) => /* @__PURE__ */ a(t.Container, { ...n, className: d("form-field", !!i && "form-field--has-label", !!o && "form-field--has-helper-text", m), children: [
|
|
29
|
-
i,
|
|
30
|
-
l,
|
|
31
|
-
!!o && /* @__PURE__ */ s(t.HelperText, { className: "form-field__helper-text", children: o }),
|
|
32
|
-
!!r && /* @__PURE__ */ s(t.ErrorMessage, { className: "form-field__error-message", children: r })
|
|
33
|
-
] });
|
|
34
|
-
export {
|
|
35
|
-
x as FormField
|
|
36
|
-
};
|