@purr-react-tailwindcss/components.helper-text 0.0.6 → 0.0.8

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.cjs CHANGED
@@ -1 +1 @@
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;
1
+ 'use strict';var l=require('clsx'),s=require('react');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var l__default=/*#__PURE__*/_interopDefault(l);var s__default=/*#__PURE__*/_interopDefault(s);var x=s.memo(({children:e="",variant:t="standard",isError:r=false,hasLabel:o=false,htmlAttributes:p})=>e?s__default.default.createElement("span",{className:l__default.default("inline-block","absolute","text-xs",o?"top-12":"top-14",t==="standard"?"left-0":"left-3.5",r?"text-red-500":"text-gray-200","helper-text"),...p},e):null);x.displayName="HelperText";exports.HelperText=x;
@@ -0,0 +1,15 @@
1
+ import React, { ReactNode, HTMLAttributes } from 'react';
2
+ import { IExtendable } from '@purr-core/utils.definitions';
3
+
4
+ type THelperTextVariant = "outlined" | "filled" | "standard";
5
+ interface IHelperTextProps {
6
+ variant?: THelperTextVariant;
7
+ children?: ReactNode;
8
+ isError?: boolean;
9
+ hasLabel?: boolean;
10
+ htmlAttributes?: HTMLAttributes<HTMLSpanElement> & IExtendable;
11
+ }
12
+
13
+ declare const HelperText: React.MemoExoticComponent<({ children, variant, isError, hasLabel, htmlAttributes, }: IHelperTextProps) => React.JSX.Element | null>;
14
+
15
+ export { HelperText, type IHelperTextProps, type THelperTextVariant };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,15 @@
1
- export * from './_components';
2
- export * from './_types';
1
+ import React, { ReactNode, HTMLAttributes } from 'react';
2
+ import { IExtendable } from '@purr-core/utils.definitions';
3
+
4
+ type THelperTextVariant = "outlined" | "filled" | "standard";
5
+ interface IHelperTextProps {
6
+ variant?: THelperTextVariant;
7
+ children?: ReactNode;
8
+ isError?: boolean;
9
+ hasLabel?: boolean;
10
+ htmlAttributes?: HTMLAttributes<HTMLSpanElement> & IExtendable;
11
+ }
12
+
13
+ declare const HelperText: React.MemoExoticComponent<({ children, variant, isError, hasLabel, htmlAttributes, }: IHelperTextProps) => React.JSX.Element | null>;
14
+
15
+ export { HelperText, type IHelperTextProps, type THelperTextVariant };
package/dist/index.js CHANGED
@@ -1,31 +1 @@
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
- ({
6
- children: e = "",
7
- variant: t = "standard",
8
- isError: r = !1,
9
- hasLabel: l = !1,
10
- htmlAttributes: a
11
- }) => e ? /* @__PURE__ */ o(
12
- "span",
13
- {
14
- className: s(
15
- "inline-block",
16
- "absolute",
17
- "text-xs",
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"
22
- ),
23
- ...a,
24
- children: e
25
- }
26
- ) : null
27
- );
28
- m.displayName = "HelperText";
29
- export {
30
- m as HelperText
31
- };
1
+ import l from'clsx';import s,{memo}from'react';var x=memo(({children:e="",variant:t="standard",isError:r=false,hasLabel:o=false,htmlAttributes:p})=>e?s.createElement("span",{className:l("inline-block","absolute","text-xs",o?"top-12":"top-14",t==="standard"?"left-0":"left-3.5",r?"text-red-500":"text-gray-200","helper-text"),...p},e):null);x.displayName="HelperText";export{x as HelperText};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purr-react-tailwindcss/components.helper-text",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
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.10"
27
+ "@purr-core/utils.definitions": "0.0.12"
28
28
  },
29
29
  "author": "@DinhThienPhuc",
30
30
  "license": "ISC",
@@ -33,6 +33,8 @@
33
33
  "scripts": {
34
34
  "dev": "vite build --watch",
35
35
  "build": "tsc && vite build",
36
+ "build:vite": "tsc && vite build",
37
+ "build:tsup": "tsup",
36
38
  "lint": "eslint . --ext ts,tsx --max-warnings 0"
37
39
  }
38
40
  }
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- import { IHelperTextProps } from './_types';
3
-
4
- export declare const HelperText: React.MemoExoticComponent<({ children, variant, isError, hasLabel, htmlAttributes, }: IHelperTextProps) => React.JSX.Element | null>;
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 type THelperTextVariant = "outlined" | "filled" | "standard";
5
- export interface IHelperTextProps {
6
- variant?: THelperTextVariant;
7
- children?: ReactNode;
8
- isError?: boolean;
9
- hasLabel?: boolean;
10
- htmlAttributes?: HTMLAttributes<HTMLSpanElement> & IExtendable;
11
- }