@purr-react-tailwindcss/components.pre-adornment 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 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;
1
+ 'use strict';var n=require('clsx'),m=require('react');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var n__default=/*#__PURE__*/_interopDefault(n);var m__default=/*#__PURE__*/_interopDefault(m);var s=m.memo(({children:r=null,variant:e="standard",hasLabel:t=false,htmlAttributes:o})=>r?m__default.default.createElement("span",{className:n__default.default("flex","absolute","text-white","top-1/2","transform","-translate-y-1/2",e==="standard"?"left-0":"left-3.5","pre-adornment"),style:t?{top:"calc(50% + 6px)"}:void 0,...o},r):null);s.displayName="PreAdornment";exports.PreAdornment=s;
@@ -0,0 +1,14 @@
1
+ import React, { ReactNode, HTMLAttributes } from 'react';
2
+ import { IExtendable } from '@purr-core/utils.definitions';
3
+
4
+ type TPreAdornmentVariant = "standard" | "outlined" | "filled";
5
+ interface IPreAdornmentProps {
6
+ variant?: TPreAdornmentVariant;
7
+ children?: ReactNode;
8
+ hasLabel?: boolean;
9
+ htmlAttributes?: HTMLAttributes<HTMLSpanElement> & IExtendable;
10
+ }
11
+
12
+ declare const PreAdornment: React.MemoExoticComponent<({ children, variant, hasLabel, htmlAttributes, }: IPreAdornmentProps) => React.JSX.Element | null>;
13
+
14
+ export { type IPreAdornmentProps, PreAdornment, type TPreAdornmentVariant };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,14 @@
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 TPreAdornmentVariant = "standard" | "outlined" | "filled";
5
+ interface IPreAdornmentProps {
6
+ variant?: TPreAdornmentVariant;
7
+ children?: ReactNode;
8
+ hasLabel?: boolean;
9
+ htmlAttributes?: HTMLAttributes<HTMLSpanElement> & IExtendable;
10
+ }
11
+
12
+ declare const PreAdornment: React.MemoExoticComponent<({ children, variant, hasLabel, htmlAttributes, }: IPreAdornmentProps) => React.JSX.Element | null>;
13
+
14
+ export { type IPreAdornmentProps, PreAdornment, type TPreAdornmentVariant };
package/dist/index.js CHANGED
@@ -1,32 +1 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import n from "clsx";
3
- import { memo as l } from "react";
4
- const m = l(
5
- ({
6
- children: t = null,
7
- variant: r = "standard",
8
- hasLabel: e = !1,
9
- htmlAttributes: o
10
- }) => t ? /* @__PURE__ */ a(
11
- "span",
12
- {
13
- className: n(
14
- "flex",
15
- "absolute",
16
- "text-white",
17
- "top-1/2",
18
- "transform",
19
- "-translate-y-1/2",
20
- r === "standard" ? "left-0" : "left-3.5",
21
- "pre-adornment"
22
- ),
23
- style: e ? { top: "calc(50% + 6px)" } : void 0,
24
- ...o,
25
- children: t
26
- }
27
- ) : null
28
- );
29
- m.displayName = "PreAdornment";
30
- export {
31
- m as PreAdornment
32
- };
1
+ import n from'clsx';import m,{memo}from'react';var s=memo(({children:r=null,variant:e="standard",hasLabel:t=false,htmlAttributes:o})=>r?m.createElement("span",{className:n("flex","absolute","text-white","top-1/2","transform","-translate-y-1/2",e==="standard"?"left-0":"left-3.5","pre-adornment"),style:t?{top:"calc(50% + 6px)"}:void 0,...o},r):null);s.displayName="PreAdornment";export{s as PreAdornment};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purr-react-tailwindcss/components.pre-adornment",
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 { IPreAdornmentProps } from './_types';
3
-
4
- export declare const PreAdornment: React.MemoExoticComponent<({ children, variant, hasLabel, htmlAttributes, }: IPreAdornmentProps) => React.JSX.Element | null>;
package/dist/_types.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import { HTMLAttributes, ReactNode } from 'react';
2
- import { IExtendable } from '@purr-core/utils.definitions';
3
-
4
- export type TPreAdornmentVariant = "standard" | "outlined" | "filled";
5
- export interface IPreAdornmentProps {
6
- variant?: TPreAdornmentVariant;
7
- children?: ReactNode;
8
- hasLabel?: boolean;
9
- htmlAttributes?: HTMLAttributes<HTMLSpanElement> & IExtendable;
10
- }