@purr-react-tailwindcss/components.pre-adornment 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/dist/_components.d.ts +1 -1
- package/dist/_types.d.ts +0 -5
- package/dist/index.cjs +1 -1
- package/dist/index.js +14 -16
- 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 { IPreAdornmentProps } from './_types';
|
|
3
3
|
|
|
4
|
-
export declare const PreAdornment: React.MemoExoticComponent<({
|
|
4
|
+
export declare const PreAdornment: React.MemoExoticComponent<({ children, variant, hasLabel, htmlAttributes, }: IPreAdornmentProps) => 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 TPreAdornmentVariant = "standard" | "outlined" | "filled";
|
|
6
|
-
export interface IPreAdornmentClasses {
|
|
7
|
-
container?: ClassValue;
|
|
8
|
-
}
|
|
9
5
|
export interface IPreAdornmentProps {
|
|
10
|
-
classes?: IPreAdornmentClasses;
|
|
11
6
|
variant?: TPreAdornmentVariant;
|
|
12
7
|
children?: ReactNode;
|
|
13
8
|
hasLabel?: 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 a=require("react/jsx-runtime"),o=require("clsx"),l=require("react"),t=l.memo(({children:e=null,variant:r="standard",hasLabel:n=!1,htmlAttributes:s})=>e?a.jsx("span",{className:o("flex","absolute","text-white","top-1/2","transform","-translate-y-1/2",r==="standard"?"left-0":"left-3.5","pre-adornment"),style:n?{top:"calc(50% + 6px)"}:void 0,...s,children:e}):null);t.displayName="PreAdornment";exports.PreAdornment=t;
|
package/dist/index.js
CHANGED
|
@@ -1,34 +1,32 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import n from "clsx";
|
|
3
3
|
import { memo as l } from "react";
|
|
4
|
-
const
|
|
4
|
+
const m = l(
|
|
5
5
|
({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
variant: o = "standard",
|
|
6
|
+
children: t = null,
|
|
7
|
+
variant: r = "standard",
|
|
9
8
|
hasLabel: e = !1,
|
|
10
|
-
htmlAttributes:
|
|
11
|
-
}) =>
|
|
9
|
+
htmlAttributes: o
|
|
10
|
+
}) => t ? /* @__PURE__ */ a(
|
|
12
11
|
"span",
|
|
13
12
|
{
|
|
14
|
-
className:
|
|
13
|
+
className: n(
|
|
15
14
|
"flex",
|
|
16
15
|
"absolute",
|
|
17
16
|
"text-white",
|
|
18
17
|
"top-1/2",
|
|
19
18
|
"transform",
|
|
20
19
|
"-translate-y-1/2",
|
|
21
|
-
|
|
22
|
-
"pre-adornment"
|
|
23
|
-
t == null ? void 0 : t.container
|
|
20
|
+
r === "standard" ? "left-0" : "left-3.5",
|
|
21
|
+
"pre-adornment"
|
|
24
22
|
),
|
|
25
23
|
style: e ? { top: "calc(50% + 6px)" } : void 0,
|
|
26
|
-
...
|
|
27
|
-
children:
|
|
24
|
+
...o,
|
|
25
|
+
children: t
|
|
28
26
|
}
|
|
29
27
|
) : null
|
|
30
28
|
);
|
|
31
|
-
|
|
29
|
+
m.displayName = "PreAdornment";
|
|
32
30
|
export {
|
|
33
|
-
|
|
31
|
+
m as PreAdornment
|
|
34
32
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purr-react-tailwindcss/components.pre-adornment",
|
|
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",
|
|
@@ -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.6"
|
|
28
28
|
},
|
|
29
29
|
"author": "@DinhThienPhuc",
|
|
30
30
|
"license": "ISC",
|