@nild/components 0.0.16 → 0.0.17
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.
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DividerVariant, DividerDirection, DividerAlign } from './style';
|
|
3
|
-
export interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
variant?: DividerVariant;
|
|
5
|
-
direction?: DividerDirection;
|
|
6
|
-
align?: DividerAlign;
|
|
7
|
-
}
|
|
1
|
+
import { DividerProps } from './interfaces';
|
|
8
2
|
/**
|
|
9
3
|
* @category Components
|
|
10
4
|
*/
|
package/dist/divider/Divider.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import{cnMerge as m,isEmpty as c}from"@nild/shared";import{forwardRef as f,Children as p}from"react";import{dividerClassNames as h}from"./style/index.js";const a=f(({className:i,children:e,variant:s="solid",direction:o="horizontal",align:t="center",...n},d)=>{const r=p.toArray(e);return l("div",{...n,className:m(h({emptyChildren:c(r),variant:s,direction:o,align:t}),i),ref:d,children:r})});a.displayName="Divider";export{a as default};
|
package/dist/divider/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as Divider
|
|
2
|
-
|
|
3
|
-
export type { DividerProps, DividerVariant, DividerDirection, DividerAlign };
|
|
1
|
+
import { default as Divider } from './Divider';
|
|
2
|
+
export type * from './interfaces';
|
|
4
3
|
export default Divider;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export type DividerAlign = 'left' | 'center' | 'right';
|
|
6
|
-
export declare const ALIGN_CLS_MAP: Record<DividerAlign, string[]>;
|
|
1
|
+
import { DividerProps } from '../interfaces';
|
|
2
|
+
export declare const dividerClassNames: (props?: (DividerProps & {
|
|
3
|
+
emptyChildren: boolean;
|
|
4
|
+
}) | undefined) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e
|
|
1
|
+
import{cva as e}from"@nild/shared";const r=e(["nd-divider","border-split","text-primary"],{compoundVariants:[{emptyChildren:!0,direction:"horizontal",className:["w-full","min-w-full","border-b","my-6"]},{emptyChildren:!0,direction:"vertical",className:["inline-block","h-[1em]","align-middle","border-r","ms-3 me-3"]},{emptyChildren:!0,variant:"solid",className:["border-solid"]},{emptyChildren:!0,variant:"dashed",className:["border-dashed"]},{emptyChildren:!0,variant:"dotted",className:["border-dotted"]},{emptyChildren:!1,direction:"horizontal",className:["flex items-center text-center",'before:h-0 before:content-[""] before:border-b before:border-[color:inherit]','after:h-0 after:content-[""] after:border-b after:border-[color:inherit]',"my-6"]},{emptyChildren:!1,direction:"horizontal",variant:"solid",className:["before:border-solid","after:border-solid"]},{emptyChildren:!1,direction:"horizontal",variant:"dashed",className:["before:border-dashed","after:border-dashed"]},{emptyChildren:!1,direction:"horizontal",variant:"dotted",className:["before:border-dotted","after:border-dotted"]},{emptyChildren:!1,direction:"horizontal",align:"left",className:["before:basis-1/12","before:grow-0","after:flex-1"]},{emptyChildren:!1,direction:"horizontal",align:"center",className:["before:flex-1","after:flex-1"]},{emptyChildren:!1,direction:"horizontal",align:"right",className:["before:flex-1","after:basis-1/12","after:grow-0"]}]});export{r as dividerClassNames};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nild/components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.17",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": ">=18.2.0",
|
|
33
33
|
"react-dom": ">=18.2.0",
|
|
34
|
-
"@nild/
|
|
34
|
+
"@nild/icons": "0.0.10",
|
|
35
35
|
"@nild/hooks": "0.0.11",
|
|
36
|
-
"@nild/
|
|
36
|
+
"@nild/shared": "0.0.9"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "vite build --mode PROD",
|