@purr-react-styled-components/components.divider 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.
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { IDividerProps } from './_types';
3
+
4
+ export declare const Divider: ({ width, height, className, borderRadius, htmlAttributes, color, }: IDividerProps) => React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { IStyledDividerProps } from './_types';
2
+
3
+ export declare const Styled: {
4
+ Container: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, IStyledDividerProps>> & string;
5
+ };
@@ -0,0 +1,17 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import { IExtendable } from '@purr-core/utils.definitions';
3
+
4
+ export interface IDividerProps extends HTMLAttributes<HTMLElement> {
5
+ className?: string;
6
+ width?: number | string;
7
+ height?: number | string;
8
+ color?: string;
9
+ borderRadius?: number | string;
10
+ htmlAttributes?: HTMLAttributes<HTMLElement> & IExtendable;
11
+ }
12
+ export interface IStyledDividerProps extends HTMLAttributes<HTMLElement>, IExtendable {
13
+ $width?: number | string;
14
+ $height?: number | string;
15
+ $borderRadius?: number | string;
16
+ $color?: string;
17
+ }
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),c=require("clsx"),r=require("styled-components"),u=({$width:e="100%"})=>r.css(["width:",";"],typeof e=="number"?`${e}px`:e),y=({$height:e=1})=>r.css(["height:",";"],typeof e=="number"?`${e}px`:e),l=({$borderRadius:e=0})=>r.css(["border-radius:",";"],typeof e=="number"?`${e}px`:e),a=({$color:e="inherit"})=>r.css(["background-color:",";"],e),p={Container:r.div.withConfig({displayName:"_style__Container",componentId:"sc-1p7mpoe-0"})(["",";",";",";",";"],u,y,l,a)},f=({width:e="100%",height:i=1,className:o,borderRadius:t=0,htmlAttributes:n,color:s="inherit"})=>d.jsx(p.Container,{...n,$color:s,$width:e,$height:i,$borderRadius:t,className:c("divider",`divider__width--${e}`,`divider__height--${i}`,`divider__borderRadius--${t}`,o)});exports.Divider=f;
@@ -0,0 +1,2 @@
1
+ export * from './_components';
2
+ export * from './_types';
package/dist/index.js ADDED
@@ -0,0 +1,27 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import c from "clsx";
3
+ import p, { css as o } from "styled-components";
4
+ const m = ({
5
+ $width: r = "100%"
6
+ }) => o(["width:", ";"], typeof r == "number" ? `${r}px` : r), f = ({
7
+ $height: r = 1
8
+ }) => o(["height:", ";"], typeof r == "number" ? `${r}px` : r), y = ({
9
+ $borderRadius: r = 0
10
+ }) => o(["border-radius:", ";"], typeof r == "number" ? `${r}px` : r), u = ({
11
+ $color: r = "inherit"
12
+ }) => o(["background-color:", ";"], r), a = {
13
+ Container: p.div.withConfig({
14
+ displayName: "_style__Container",
15
+ componentId: "sc-1p7mpoe-0"
16
+ })(["", ";", ";", ";", ";"], m, f, y, u)
17
+ }, v = ({
18
+ width: r = "100%",
19
+ height: e = 1,
20
+ className: t,
21
+ borderRadius: i = 0,
22
+ htmlAttributes: n,
23
+ color: d = "inherit"
24
+ }) => /* @__PURE__ */ s(a.Container, { ...n, $color: d, $width: r, $height: e, $borderRadius: i, className: c("divider", `divider__width--${r}`, `divider__height--${e}`, `divider__borderRadius--${i}`, t) });
25
+ export {
26
+ v as Divider
27
+ };
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@purr-react-styled-components/components.divider",
3
+ "version": "0.0.2",
4
+ "type": "module",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": {
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/index.js"
13
+ },
14
+ "require": {
15
+ "types": "./dist/index.d.ts",
16
+ "default": "./dist/index.cjs"
17
+ }
18
+ }
19
+ },
20
+ "files": [
21
+ "dist"
22
+ ],
23
+ "peerDependencies": {
24
+ "typescript": "*",
25
+ "react": "*",
26
+ "styled-components": "*",
27
+ "clsx": "*",
28
+ "@purr-core/utils.definitions": "0.0.9"
29
+ },
30
+ "author": "@DinhThienPhuc",
31
+ "license": "ISC",
32
+ "description": "",
33
+ "sideEffects": false,
34
+ "scripts": {
35
+ "dev": "vite build --watch",
36
+ "build": "tsc && vite build",
37
+ "lint": "eslint . --ext ts,tsx --max-warnings 0"
38
+ }
39
+ }