@purr-react-tailwindcss/components.post-adornment 0.0.6 → 0.0.7

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purr-react-tailwindcss/components.post-adornment",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -24,8 +24,8 @@
24
24
  "typescript": "*",
25
25
  "react": "*",
26
26
  "clsx": "*",
27
- "@purr-core/utils.definitions": "0.0.10",
28
- "@purr-react-tailwindcss/components.icon": "0.0.6"
27
+ "@purr-core/utils.definitions": "0.0.11",
28
+ "@purr-react-tailwindcss/components.icon": "0.0.7"
29
29
  },
30
30
  "author": "@DinhThienPhuc",
31
31
  "license": "ISC",
@@ -34,6 +34,8 @@
34
34
  "scripts": {
35
35
  "dev": "vite build --watch",
36
36
  "build": "tsc && vite build",
37
+ "build:vite": "tsc && vite build",
38
+ "build:tsup": "tsup",
37
39
  "lint": "eslint . --ext ts,tsx --max-warnings 0"
38
40
  }
39
41
  }
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- import { IPostAdornmentProps } from './_types';
3
-
4
- export declare const PostAdornment: React.MemoExoticComponent<({ children, variant, clearIcon, hasLabel, htmlAttributes, clear, }: IPostAdornmentProps) => React.JSX.Element | null>;
package/dist/_types.d.ts DELETED
@@ -1,12 +0,0 @@
1
- import { HTMLAttributes, ReactNode } from 'react';
2
- import { IExtendable } from '@purr-core/utils.definitions';
3
-
4
- export type TPostAdornmentVariant = "outlined" | "filled" | "standard";
5
- export interface IPostAdornmentProps {
6
- variant?: TPostAdornmentVariant;
7
- children?: ReactNode;
8
- clearIcon?: ReactNode;
9
- hasLabel?: boolean;
10
- htmlAttributes?: HTMLAttributes<HTMLSpanElement & HTMLButtonElement> & IExtendable;
11
- clear?: () => void;
12
- }
package/dist/index.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("clsx"),c=require("react"),d=require("@purr-react-tailwindcss/components.icon"),l=c.memo(({children:e=null,variant:n="standard",clearIcon:i=null,hasLabel:o=!1,htmlAttributes:r,clear:s})=>s?t.jsx("button",{className:a("flex","absolute","text-white","top-1/2","transform","-translate-y-1/2","bg-transparent","outline-none","border-none",n==="standard"?"right-0":"right-3.5","post-adornment"),style:o?{top:"calc(50% + 6px)"}:void 0,onClick:s,...r,children:i??t.jsx(d.Icon,{name:"x"})}):e?t.jsx("span",{className:a("flex","absolute","text-white","top-1/2","transform","-translate-y-1/2",n==="standard"?"right-0":"right-3.5","post-adornment"),style:o?{top:"calc(50% + 6px)"}:void 0,...r,children:e}):null);l.displayName="PostAdornment";exports.PostAdornment=l;
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './_components';
2
- export * from './_types';
package/dist/index.js DELETED
@@ -1,56 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import s from "clsx";
3
- import { memo as m } from "react";
4
- import { Icon as p } from "@purr-react-tailwindcss/components.icon";
5
- const i = m(
6
- ({
7
- children: o = null,
8
- variant: n = "standard",
9
- clearIcon: l = null,
10
- hasLabel: r = !1,
11
- htmlAttributes: e,
12
- clear: a
13
- }) => a ? /* @__PURE__ */ t(
14
- "button",
15
- {
16
- className: s(
17
- "flex",
18
- "absolute",
19
- "text-white",
20
- "top-1/2",
21
- "transform",
22
- "-translate-y-1/2",
23
- "bg-transparent",
24
- "outline-none",
25
- "border-none",
26
- n === "standard" ? "right-0" : "right-3.5",
27
- "post-adornment"
28
- ),
29
- style: r ? { top: "calc(50% + 6px)" } : void 0,
30
- onClick: a,
31
- ...e,
32
- children: l ?? /* @__PURE__ */ t(p, { name: "x" })
33
- }
34
- ) : o ? /* @__PURE__ */ t(
35
- "span",
36
- {
37
- className: s(
38
- "flex",
39
- "absolute",
40
- "text-white",
41
- "top-1/2",
42
- "transform",
43
- "-translate-y-1/2",
44
- n === "standard" ? "right-0" : "right-3.5",
45
- "post-adornment"
46
- ),
47
- style: r ? { top: "calc(50% + 6px)" } : void 0,
48
- ...e,
49
- children: o
50
- }
51
- ) : null
52
- );
53
- i.displayName = "PostAdornment";
54
- export {
55
- i as PostAdornment
56
- };