@nild/components 0.0.21 → 0.0.22
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.js +1 -1
- package/dist/typography/Link.d.ts +1 -5
- package/dist/typography/Link.js +1 -1
- package/dist/typography/Paragraph.d.ts +1 -2
- package/dist/typography/Paragraph.js +1 -1
- package/dist/typography/Text.d.ts +1 -12
- package/dist/typography/Text.js +1 -1
- package/dist/typography/Title.d.ts +1 -5
- package/dist/typography/Title.js +1 -1
- package/dist/typography/Typography.d.ts +2 -15
- package/dist/typography/Typography.js +1 -1
- package/dist/typography/index.d.ts +10 -7
- package/dist/typography/index.js +1 -1
- package/dist/typography/style/index.d.ts +9 -2
- package/dist/typography/style/index.js +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as a}from"./button/index.js";import{default as o}from"./checkbox/index.js";import{default as r}from"./divider/Divider.js";import{default as t}from"./popover/Popover.js";import{default as s}from"./switch/index.js";import{default as f}from"./transition/Transition.js";import{default as m}from"./typography/
|
|
1
|
+
import{default as a}from"./button/index.js";import{default as o}from"./checkbox/index.js";import{default as r}from"./divider/Divider.js";import{default as t}from"./popover/Popover.js";import{default as s}from"./switch/index.js";import{default as f}from"./transition/Transition.js";import{default as m}from"./typography/index.js";/* empty css */export{a as Button,o as Checkbox,r as Divider,t as Popover,s as Switch,f as Transition,m as Typography};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
3
|
-
disabled?: boolean;
|
|
4
|
-
underlined?: boolean;
|
|
5
|
-
}
|
|
1
|
+
import { LinkProps } from './interfaces';
|
|
6
2
|
declare const Link: import('react').ForwardRefExoticComponent<LinkProps & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
7
3
|
export default Link;
|
package/dist/typography/Link.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as m}from"react/jsx-runtime";import{cnMerge as n}from"@nild/shared";import{forwardRef as f}from"react";import{linkClassNames as p}from"./style/index.js";const a=f(({className:r,children:s,underlined:i=!1,disabled:e=!1,href:d="#",...l},o)=>m("a",{...l,href:e?void 0:d,className:n(p({underlined:i,disabled:e}),r),ref:o,children:s}));a.displayName="Typography.Link";export{a as default};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type ParagraphProps = HTMLAttributes<HTMLParagraphElement>;
|
|
1
|
+
import { ParagraphProps } from './interfaces';
|
|
3
2
|
declare const Paragraph: import('react').ForwardRefExoticComponent<ParagraphProps & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
4
3
|
export default Paragraph;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{cnMerge as p}from"@nild/shared";import{forwardRef as f}from"react";import{paragraphClassNames as t}from"./style/index.js";const a=f(({className:r,children:s,...e},m)=>o("p",{...e,className:p(t(),r),ref:m,children:s}));a.displayName="Typography.Paragraph";export{a as default};
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface TextProps extends HTMLAttributes<HTMLSpanElement> {
|
|
3
|
-
disabled?: boolean;
|
|
4
|
-
secondary?: boolean;
|
|
5
|
-
strong?: boolean;
|
|
6
|
-
deleted?: boolean;
|
|
7
|
-
underlined?: boolean;
|
|
8
|
-
italic?: boolean;
|
|
9
|
-
marked?: boolean;
|
|
10
|
-
coded?: boolean;
|
|
11
|
-
keyboarded?: boolean;
|
|
12
|
-
}
|
|
1
|
+
import { TextProps } from './interfaces';
|
|
13
2
|
declare const Text: import('react').ForwardRefExoticComponent<TextProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
14
3
|
export default Text;
|
package/dist/typography/Text.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as s}from"react/jsx-runtime";import{cnMerge as p}from"@nild/shared";import{forwardRef as f}from"react";import{textTagClassNames as x,textClassNames as N}from"./style/index.js";const e=f(({className:r,children:t,variants:o=[],secondary:d=!1,disabled:m=!1,...n},i)=>{const c=[...new Set(o)].reduce((l,a)=>s(a,{className:x({variant:a}),children:l}),t);return s("span",{...n,className:p(N({secondary:d,disabled:m}),r),ref:i,children:c})});e.displayName="Typography.Text";export{e as default};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { HeadingLevel } from './style';
|
|
3
|
-
export interface TitleProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
4
|
-
level?: HeadingLevel;
|
|
5
|
-
}
|
|
1
|
+
import { TitleProps } from './interfaces';
|
|
6
2
|
declare const Title: import('react').ForwardRefExoticComponent<TitleProps & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
7
3
|
export default Title;
|
package/dist/typography/Title.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{cnMerge as i}from"@nild/shared";import{forwardRef as f}from"react";import{titleClassNames as p}from"./style/index.js";const r=f(({className:s,children:a,level:e=1,...l},m)=>{const o=`h${e}`;return t(o,{...l,className:i(p({level:e}),s),ref:m,children:a})});r.displayName="Typography.Title";export{r as default};
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { default as Paragraph } from './Paragraph';
|
|
4
|
-
import { default as Text } from './Text';
|
|
5
|
-
import { default as Title } from './Title';
|
|
6
|
-
export type TypographyProps = HTMLAttributes<HTMLElement>;
|
|
7
|
-
/**
|
|
8
|
-
* @category Components
|
|
9
|
-
*/
|
|
10
|
-
declare const Typography: ForwardRefExoticComponent<TypographyProps> & {
|
|
11
|
-
Link: typeof Link;
|
|
12
|
-
Paragraph: typeof Paragraph;
|
|
13
|
-
Text: typeof Text;
|
|
14
|
-
Title: typeof Title;
|
|
15
|
-
};
|
|
1
|
+
import { TypographyProps } from './interfaces';
|
|
2
|
+
declare const Typography: import('react').ForwardRefExoticComponent<TypographyProps & import('react').RefAttributes<HTMLElement>>;
|
|
16
3
|
export default Typography;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{cnMerge as p}from"@nild/shared";import{forwardRef as t}from"react";import{typographyClassNames as f}from"./style/index.js";const a=t(({className:r,children:s,...e},m)=>o("article",{...e,className:p(f(),r),ref:m,children:s}));a.displayName="Typography";export{a as default};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @category Components
|
|
3
|
+
*/
|
|
4
|
+
declare const Typography: import('react').ForwardRefExoticComponent<import('./interfaces').TypographyProps & import('react').RefAttributes<HTMLElement>> & {
|
|
5
|
+
Link: import('react').ForwardRefExoticComponent<import('./interfaces').LinkProps & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
6
|
+
Paragraph: import('react').ForwardRefExoticComponent<import('./interfaces').ParagraphProps & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
7
|
+
Text: import('react').ForwardRefExoticComponent<import('./interfaces').TextProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
8
|
+
Title: import('react').ForwardRefExoticComponent<import('./interfaces').TitleProps & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
9
|
+
};
|
|
10
|
+
export type * from './interfaces';
|
|
8
11
|
export default Typography;
|
package/dist/typography/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"./Typography.js";export{
|
|
1
|
+
import r from"./Link.js";import o from"./Paragraph.js";import t from"./Text.js";import m from"./Title.js";import i from"./Typography.js";const p=Object.assign(i,{Link:r,Paragraph:o,Text:t,Title:m});export{p as default};
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
1
|
+
import { LinkProps, ParagraphProps, TextProps, TextVariant, TitleProps, TypographyProps } from '../interfaces';
|
|
2
|
+
export declare const linkClassNames: (props?: LinkProps | undefined) => string;
|
|
3
|
+
export declare const paragraphClassNames: (props?: ParagraphProps | undefined) => string;
|
|
4
|
+
export declare const textClassNames: (props?: TextProps | undefined) => string;
|
|
5
|
+
export declare const textTagClassNames: (props?: {
|
|
6
|
+
variant: TextVariant;
|
|
7
|
+
} | undefined) => string;
|
|
8
|
+
export declare const titleClassNames: (props?: TitleProps | undefined) => string;
|
|
9
|
+
export declare const typographyClassNames: (props?: TypographyProps | undefined) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t={1:["text-6xl"],2:["text-5xl"],3:["text-4xl"],4:["text-3xl"],5:["text-2xl"],6:["text-lg"]};export{
|
|
1
|
+
import{cva as e}from"@nild/shared";import{DISABLED_CLS as t}from"../../_shared/style/index.js";const a=e(["nd-link",["font-nd","text-link","text-[length:inherit]","cursor-pointer","enabled:hover:text-link-hover","enabled:active:text-link-active"],t],{variants:{disabled:{true:"disabled",false:""},underlined:{true:"underline",false:"no-underline"}}}),r=e(["nd-paragraph",["font-nd","text-primary","text-[length:inherit]"],["mt-0","mb-[1em]"]]),s=e(["nd-text",["font-nd","text-[length:inherit]"],t],{variants:{secondary:{true:"text-secondary",false:"text-primary"},disabled:{true:"disabled",false:""}}}),n=e("",{variants:{variant:{strong:"",del:"",u:["underline"],i:"",mark:["bg-primary","text-contrast"],code:[["ps-1.5","pe-1.5"],["bg-secondary","text-sm","rounded-sm"],["border","border-solid","border-secondary"]],kbd:[["ps-1.5","pe-1.5"],["text-sm","rounded-sm"],["border","border-b-2","border-solid","border-secondary"]]}}}),d=e(["nd-title",["font-nd","font-semibold","text-primary"],["mt-[1em]","mb-[0.5em]"]],{variants:{level:{1:["text-6xl"],2:["text-5xl"],3:["text-4xl"],4:["text-3xl"],5:["text-2xl"],6:["text-lg"]}}}),l=e(["nd-typography",["font-nd","text-md"]]);export{a as linkClassNames,r as paragraphClassNames,s as textClassNames,n as textTagClassNames,d as titleClassNames,l as typographyClassNames};
|
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.22",
|
|
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/shared": "0.0.10",
|
|
35
34
|
"@nild/hooks": "0.0.12",
|
|
36
|
-
"@nild/icons": "0.0.11"
|
|
35
|
+
"@nild/icons": "0.0.11",
|
|
36
|
+
"@nild/shared": "0.0.10"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "vite build --mode PROD",
|