@purr-react-styled-components/components.divider 0.0.4 → 0.0.5

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,14 @@
1
+ 'use strict';var v=require('clsx'),c=require('react'),s=require('styled-components');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var v__default=/*#__PURE__*/_interopDefault(v);var c__default=/*#__PURE__*/_interopDefault(c);var s__default=/*#__PURE__*/_interopDefault(s);var m=({$width:r="100%"})=>s.css`
2
+ width: ${typeof r=="number"?`${r}px`:r};
3
+ `,y=({$height:r=1})=>s.css`
4
+ height: ${typeof r=="number"?`${r}px`:r};
5
+ `,f=({$borderRadius:r=0})=>s.css`
6
+ border-radius: ${typeof r=="number"?`${r}px`:r};
7
+ `,l=({$color:r="inherit"})=>s.css`
8
+ background-color: ${r};
9
+ `,t={Container:s__default.default.div`
10
+ ${m};
11
+ ${y};
12
+ ${f};
13
+ ${l};
14
+ `};var P=({width:r="100%",height:i=1,className:d,borderRadius:e=0,htmlAttributes:p,color:n="inherit"})=>c__default.default.createElement(t.Container,{...p,$color:n,$width:r,$height:i,$borderRadius:e,className:v__default.default("divider",`divider__width--${r}`,`divider__height--${i}`,`divider__borderRadius--${e}`,d)});exports.Divider=P;
@@ -0,0 +1,21 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ import { IExtendable } from '@purr-core/utils.definitions';
3
+
4
+ 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
+ interface IStyledDividerProps extends HTMLAttributes<HTMLElement>, IExtendable {
13
+ $width?: number | string;
14
+ $height?: number | string;
15
+ $borderRadius?: number | string;
16
+ $color?: string;
17
+ }
18
+
19
+ declare const Divider: ({ width, height, className, borderRadius, htmlAttributes, color, }: IDividerProps) => React.JSX.Element;
20
+
21
+ export { Divider, type IDividerProps, type IStyledDividerProps };
@@ -0,0 +1,21 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ import { IExtendable } from '@purr-core/utils.definitions';
3
+
4
+ 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
+ interface IStyledDividerProps extends HTMLAttributes<HTMLElement>, IExtendable {
13
+ $width?: number | string;
14
+ $height?: number | string;
15
+ $borderRadius?: number | string;
16
+ $color?: string;
17
+ }
18
+
19
+ declare const Divider: ({ width, height, className, borderRadius, htmlAttributes, color, }: IDividerProps) => React.JSX.Element;
20
+
21
+ export { Divider, type IDividerProps, type IStyledDividerProps };
package/dist/index.js ADDED
@@ -0,0 +1,14 @@
1
+ import v from'clsx';import c from'react';import s,{css}from'styled-components';var m=({$width:r="100%"})=>css`
2
+ width: ${typeof r=="number"?`${r}px`:r};
3
+ `,y=({$height:r=1})=>css`
4
+ height: ${typeof r=="number"?`${r}px`:r};
5
+ `,f=({$borderRadius:r=0})=>css`
6
+ border-radius: ${typeof r=="number"?`${r}px`:r};
7
+ `,l=({$color:r="inherit"})=>css`
8
+ background-color: ${r};
9
+ `,t={Container:s.div`
10
+ ${m};
11
+ ${y};
12
+ ${f};
13
+ ${l};
14
+ `};var P=({width:r="100%",height:i=1,className:d,borderRadius:e=0,htmlAttributes:p,color:n="inherit"})=>c.createElement(t.Container,{...p,$color:n,$width:r,$height:i,$borderRadius:e,className:v("divider",`divider__width--${r}`,`divider__height--${i}`,`divider__borderRadius--${e}`,d)});export{P as Divider};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purr-react-styled-components/components.divider",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -25,7 +25,7 @@
25
25
  "react": "*",
26
26
  "styled-components": "*",
27
27
  "clsx": "*",
28
- "@purr-core/utils.definitions": "0.0.11"
28
+ "@purr-core/utils.definitions": "0.0.12"
29
29
  },
30
30
  "author": "@DinhThienPhuc",
31
31
  "license": "ISC",