@purr-react-tailwindcss/components.post-adornment 0.0.7 → 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 ADDED
@@ -0,0 +1 @@
1
+ 'use strict';var a=require('clsx'),t=require('react'),components_icon=require('@purr-react-tailwindcss/components.icon');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var a__default=/*#__PURE__*/_interopDefault(a);var t__default=/*#__PURE__*/_interopDefault(t);var d=t.memo(({children:o=null,variant:n="standard",clearIcon:m=null,hasLabel:r=false,htmlAttributes:e,clear:s})=>s?t__default.default.createElement("button",{className:a__default.default("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:r?{top:"calc(50% + 6px)"}:void 0,onClick:s,...e},m??t__default.default.createElement(components_icon.Icon,{name:"x"})):o?t__default.default.createElement("span",{className:a__default.default("flex","absolute","text-white","top-1/2","transform","-translate-y-1/2",n==="standard"?"right-0":"right-3.5","post-adornment"),style:r?{top:"calc(50% + 6px)"}:void 0,...e},o):null);d.displayName="PostAdornment";exports.PostAdornment=d;
@@ -0,0 +1,16 @@
1
+ import React, { ReactNode, HTMLAttributes } from 'react';
2
+ import { IExtendable } from '@purr-core/utils.definitions';
3
+
4
+ type TPostAdornmentVariant = "outlined" | "filled" | "standard";
5
+ interface IPostAdornmentProps {
6
+ variant?: TPostAdornmentVariant;
7
+ children?: ReactNode;
8
+ clearIcon?: ReactNode;
9
+ hasLabel?: boolean;
10
+ htmlAttributes?: HTMLAttributes<HTMLSpanElement & HTMLButtonElement> & IExtendable;
11
+ clear?: () => void;
12
+ }
13
+
14
+ declare const PostAdornment: React.MemoExoticComponent<({ children, variant, clearIcon, hasLabel, htmlAttributes, clear, }: IPostAdornmentProps) => React.JSX.Element | null>;
15
+
16
+ export { type IPostAdornmentProps, PostAdornment, type TPostAdornmentVariant };
@@ -0,0 +1,16 @@
1
+ import React, { ReactNode, HTMLAttributes } from 'react';
2
+ import { IExtendable } from '@purr-core/utils.definitions';
3
+
4
+ type TPostAdornmentVariant = "outlined" | "filled" | "standard";
5
+ interface IPostAdornmentProps {
6
+ variant?: TPostAdornmentVariant;
7
+ children?: ReactNode;
8
+ clearIcon?: ReactNode;
9
+ hasLabel?: boolean;
10
+ htmlAttributes?: HTMLAttributes<HTMLSpanElement & HTMLButtonElement> & IExtendable;
11
+ clear?: () => void;
12
+ }
13
+
14
+ declare const PostAdornment: React.MemoExoticComponent<({ children, variant, clearIcon, hasLabel, htmlAttributes, clear, }: IPostAdornmentProps) => React.JSX.Element | null>;
15
+
16
+ export { type IPostAdornmentProps, PostAdornment, type TPostAdornmentVariant };
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ import a from'clsx';import t,{memo}from'react';import {Icon}from'@purr-react-tailwindcss/components.icon';var d=memo(({children:o=null,variant:n="standard",clearIcon:m=null,hasLabel:r=false,htmlAttributes:e,clear:s})=>s?t.createElement("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:r?{top:"calc(50% + 6px)"}:void 0,onClick:s,...e},m??t.createElement(Icon,{name:"x"})):o?t.createElement("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:r?{top:"calc(50% + 6px)"}:void 0,...e},o):null);d.displayName="PostAdornment";export{d as PostAdornment};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purr-react-tailwindcss/components.post-adornment",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
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.11",
28
- "@purr-react-tailwindcss/components.icon": "0.0.7"
27
+ "@purr-react-tailwindcss/components.icon": "0.0.8",
28
+ "@purr-core/utils.definitions": "0.0.12"
29
29
  },
30
30
  "author": "@DinhThienPhuc",
31
31
  "license": "ISC",