@purr-react-tailwindcss/components.helper-text 0.0.1 → 0.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.
- package/dist/_components.d.ts +1 -1
- package/dist/_types.d.ts +0 -5
- package/dist/index.cjs +1 -1
- package/dist/index.js +15 -17
- package/package.json +2 -2
package/dist/_components.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { IHelperTextProps } from './_types';
|
|
3
3
|
|
|
4
|
-
export declare const HelperText: React.MemoExoticComponent<({
|
|
4
|
+
export declare const HelperText: React.MemoExoticComponent<({ children, variant, isError, hasLabel, htmlAttributes, }: IHelperTextProps) => React.JSX.Element | null>;
|
package/dist/_types.d.ts
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import { ClassValue } from 'clsx';
|
|
2
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
2
|
import { IExtendable } from '@purr-core/utils.definitions';
|
|
4
3
|
|
|
5
4
|
export type THelperTextVariant = "outlined" | "filled" | "standard";
|
|
6
|
-
export interface IHelperTextClasses {
|
|
7
|
-
container?: ClassValue;
|
|
8
|
-
}
|
|
9
5
|
export interface IHelperTextProps {
|
|
10
|
-
classes?: IHelperTextClasses;
|
|
11
6
|
variant?: THelperTextVariant;
|
|
12
7
|
children?: ReactNode;
|
|
13
8
|
isError?: boolean;
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),o=require("clsx"),u=require("react"),t=u.memo(({children:e="",variant:r="standard",isError:s=!1,hasLabel:l=!1,htmlAttributes:a})=>e?n.jsx("span",{className:o("inline-block","absolute","text-xs",l?"top-12":"top-14",r==="standard"?"left-0":"left-3.5",s?"text-red-500":"text-gray-200","helper-text"),...a,children:e}):null);t.displayName="HelperText";exports.HelperText=t;
|
package/dist/index.js
CHANGED
|
@@ -1,33 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { memo as
|
|
4
|
-
const
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import s from "clsx";
|
|
3
|
+
import { memo as p } from "react";
|
|
4
|
+
const m = p(
|
|
5
5
|
({
|
|
6
|
-
classes: t,
|
|
7
6
|
children: e = "",
|
|
8
|
-
variant:
|
|
9
|
-
isError:
|
|
10
|
-
hasLabel:
|
|
7
|
+
variant: t = "standard",
|
|
8
|
+
isError: r = !1,
|
|
9
|
+
hasLabel: l = !1,
|
|
11
10
|
htmlAttributes: a
|
|
12
|
-
}) => e ? /* @__PURE__ */
|
|
11
|
+
}) => e ? /* @__PURE__ */ o(
|
|
13
12
|
"span",
|
|
14
13
|
{
|
|
15
|
-
className:
|
|
14
|
+
className: s(
|
|
16
15
|
"inline-block",
|
|
17
16
|
"absolute",
|
|
18
17
|
"text-xs",
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"helper-text"
|
|
23
|
-
t == null ? void 0 : t.container
|
|
18
|
+
l ? "top-12" : "top-14",
|
|
19
|
+
t === "standard" ? "left-0" : "left-3.5",
|
|
20
|
+
r ? "text-red-500" : "text-gray-200",
|
|
21
|
+
"helper-text"
|
|
24
22
|
),
|
|
25
23
|
...a,
|
|
26
24
|
children: e
|
|
27
25
|
}
|
|
28
26
|
) : null
|
|
29
27
|
);
|
|
30
|
-
|
|
28
|
+
m.displayName = "HelperText";
|
|
31
29
|
export {
|
|
32
|
-
|
|
30
|
+
m as HelperText
|
|
33
31
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purr-react-tailwindcss/components.helper-text",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"typescript": "*",
|
|
25
25
|
"react": "*",
|
|
26
26
|
"clsx": "*",
|
|
27
|
-
"@purr-core/utils.definitions": "0.0.
|
|
27
|
+
"@purr-core/utils.definitions": "0.0.7"
|
|
28
28
|
},
|
|
29
29
|
"author": "@DinhThienPhuc",
|
|
30
30
|
"license": "ISC",
|