@intlayer/design-system 8.4.10 → 8.5.0
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/esm/components/HTMLRender/HTMLRender.mjs +1 -1
- package/dist/esm/components/HTMLRender/HTMLRender.mjs.map +1 -1
- package/dist/types/components/Badge/index.d.ts +1 -1
- package/dist/types/components/Button/Button.d.ts +2 -2
- package/dist/types/components/CollapsibleTable/CollapsibleTable.d.ts +1 -1
- package/dist/types/components/Command/index.d.ts +1 -1
- package/dist/types/components/Container/index.d.ts +1 -1
- package/dist/types/components/HTMLRender/HTMLRender.d.ts +1 -1
- package/dist/types/components/Link/Link.d.ts +2 -2
- package/dist/types/components/Tag/index.d.ts +1 -1
- package/package.json +15 -15
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Link } from "../Link/Link.mjs";
|
|
2
2
|
import { H1, H2, H3, H4, H5, H6 } from "../Headers/index.mjs";
|
|
3
3
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
4
|
-
import { renderHTML } from "react-intlayer";
|
|
4
|
+
import { renderHTML } from "react-intlayer/html";
|
|
5
5
|
|
|
6
6
|
//#region src/components/HTMLRender/HTMLRender.tsx
|
|
7
7
|
const getIntlayerHTMLOptions = () => ({ components: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTMLRender.mjs","names":[],"sources":["../../../../src/components/HTMLRender/HTMLRender.tsx"],"sourcesContent":["import type { LocalesValues } from '@intlayer/types/module_augmentation';\nimport type { ComponentProps, FC } from 'react';\nimport {\n type HTMLRenderer as HTMLRendererIntlayer,\n type RenderHTMLProps,\n renderHTML,\n} from 'react-intlayer';\nimport { H1, H2, H3, H4, H5, H6 } from '../Headers';\nimport { Link } from '../Link';\n\ntype HTMLRendererProps = {\n children: string;\n isDarkMode?: boolean;\n locale?: LocalesValues;\n components?: ComponentProps<typeof HTMLRendererIntlayer>['components'];\n};\n\nexport const getIntlayerHTMLOptions: (isDarkMode: boolean) => RenderHTMLProps =\n () => ({\n components: {\n h1: (props) => <H1 isClickable={true} {...props} />,\n h2: (props) => <H2 isClickable={true} className=\"mt-16\" {...props} />,\n h3: (props) => <H3 isClickable={true} className=\"mt-5\" {...props} />,\n h4: (props) => <H4 isClickable={true} className=\"mt-3\" {...props} />,\n h5: (props) => <H5 isClickable={true} className=\"mt-3\" {...props} />,\n h6: (props) => <H6 isClickable={true} className=\"mt-3\" {...props} />,\n a: (props) => (\n <Link\n isExternalLink={props.href?.startsWith('http')}\n underlined={true}\n label=\"\"\n {...props}\n color=\"neutral\"\n />\n ),\n },\n });\n\n/**\n * HTMLRenderer Component\n *\n * A comprehensive HTML renderer that transforms HTML text into rich,\n * interactive content with custom styling and Intlayer integration.\n */\nexport const HTMLRenderer: FC<HTMLRendererProps> = ({\n children,\n isDarkMode,\n locale,\n components: componentsProp,\n}) => {\n const htmlOptions = getIntlayerHTMLOptions(isDarkMode ?? false);\n\n const htmlContent = renderHTML(children, {\n components: {\n ...htmlOptions.components,\n a: (props) => (\n <Link\n isExternalLink={props.href?.startsWith('http')}\n underlined={true}\n locale={locale}\n label=\"\"\n {...props}\n color=\"neutral\"\n />\n ),\n ...componentsProp,\n },\n });\n\n return <>{htmlContent}</>;\n};\n"],"mappings":";;;;;;AAiBA,MAAa,gCACJ,EACL,YAAY;CACV,KAAK,UAAU,oBAAC,IAAD;EAAI,aAAa;EAAM,GAAI;EAAS;CACnD,KAAK,UAAU,oBAAC,IAAD;EAAI,aAAa;EAAM,WAAU;EAAQ,GAAI;EAAS;CACrE,KAAK,UAAU,oBAAC,IAAD;EAAI,aAAa;EAAM,WAAU;EAAO,GAAI;EAAS;CACpE,KAAK,UAAU,oBAAC,IAAD;EAAI,aAAa;EAAM,WAAU;EAAO,GAAI;EAAS;CACpE,KAAK,UAAU,oBAAC,IAAD;EAAI,aAAa;EAAM,WAAU;EAAO,GAAI;EAAS;CACpE,KAAK,UAAU,oBAAC,IAAD;EAAI,aAAa;EAAM,WAAU;EAAO,GAAI;EAAS;CACpE,IAAI,UACF,oBAAC,MAAD;EACE,gBAAgB,MAAM,MAAM,WAAW,OAAO;EAC9C,YAAY;EACZ,OAAM;EACN,GAAI;EACJ,OAAM;EACN;CAEL,EACF;;;;;;;AAQH,MAAa,gBAAuC,EAClD,UACA,YACA,QACA,YAAY,qBACR;AAoBJ,QAAO,0CAjBa,WAAW,UAAU,EACvC,YAAY;EACV,GAJgB,uBAAuB,cAAc,MAAM,CAI5C;EACf,IAAI,UACF,oBAAC,MAAD;GACE,gBAAgB,MAAM,MAAM,WAAW,OAAO;GAC9C,YAAY;GACJ;GACR,OAAM;GACN,GAAI;GACJ,OAAM;GACN;EAEJ,GAAG;EACJ,EACF,CAAC,EAEuB"}
|
|
1
|
+
{"version":3,"file":"HTMLRender.mjs","names":[],"sources":["../../../../src/components/HTMLRender/HTMLRender.tsx"],"sourcesContent":["import type { LocalesValues } from '@intlayer/types/module_augmentation';\nimport type { ComponentProps, FC } from 'react';\nimport {\n type HTMLRenderer as HTMLRendererIntlayer,\n type RenderHTMLProps,\n renderHTML,\n} from 'react-intlayer/html';\nimport { H1, H2, H3, H4, H5, H6 } from '../Headers';\nimport { Link } from '../Link';\n\ntype HTMLRendererProps = {\n children: string;\n isDarkMode?: boolean;\n locale?: LocalesValues;\n components?: ComponentProps<typeof HTMLRendererIntlayer>['components'];\n};\n\nexport const getIntlayerHTMLOptions: (isDarkMode: boolean) => RenderHTMLProps =\n () => ({\n components: {\n h1: (props) => <H1 isClickable={true} {...props} />,\n h2: (props) => <H2 isClickable={true} className=\"mt-16\" {...props} />,\n h3: (props) => <H3 isClickable={true} className=\"mt-5\" {...props} />,\n h4: (props) => <H4 isClickable={true} className=\"mt-3\" {...props} />,\n h5: (props) => <H5 isClickable={true} className=\"mt-3\" {...props} />,\n h6: (props) => <H6 isClickable={true} className=\"mt-3\" {...props} />,\n a: (props) => (\n <Link\n isExternalLink={props.href?.startsWith('http')}\n underlined={true}\n label=\"\"\n {...props}\n color=\"neutral\"\n />\n ),\n },\n });\n\n/**\n * HTMLRenderer Component\n *\n * A comprehensive HTML renderer that transforms HTML text into rich,\n * interactive content with custom styling and Intlayer integration.\n */\nexport const HTMLRenderer: FC<HTMLRendererProps> = ({\n children,\n isDarkMode,\n locale,\n components: componentsProp,\n}) => {\n const htmlOptions = getIntlayerHTMLOptions(isDarkMode ?? false);\n\n const htmlContent = renderHTML(children, {\n components: {\n ...htmlOptions.components,\n a: (props) => (\n <Link\n isExternalLink={props.href?.startsWith('http')}\n underlined={true}\n locale={locale}\n label=\"\"\n {...props}\n color=\"neutral\"\n />\n ),\n ...componentsProp,\n },\n });\n\n return <>{htmlContent}</>;\n};\n"],"mappings":";;;;;;AAiBA,MAAa,gCACJ,EACL,YAAY;CACV,KAAK,UAAU,oBAAC,IAAD;EAAI,aAAa;EAAM,GAAI;EAAS;CACnD,KAAK,UAAU,oBAAC,IAAD;EAAI,aAAa;EAAM,WAAU;EAAQ,GAAI;EAAS;CACrE,KAAK,UAAU,oBAAC,IAAD;EAAI,aAAa;EAAM,WAAU;EAAO,GAAI;EAAS;CACpE,KAAK,UAAU,oBAAC,IAAD;EAAI,aAAa;EAAM,WAAU;EAAO,GAAI;EAAS;CACpE,KAAK,UAAU,oBAAC,IAAD;EAAI,aAAa;EAAM,WAAU;EAAO,GAAI;EAAS;CACpE,KAAK,UAAU,oBAAC,IAAD;EAAI,aAAa;EAAM,WAAU;EAAO,GAAI;EAAS;CACpE,IAAI,UACF,oBAAC,MAAD;EACE,gBAAgB,MAAM,MAAM,WAAW,OAAO;EAC9C,YAAY;EACZ,OAAM;EACN,GAAI;EACJ,OAAM;EACN;CAEL,EACF;;;;;;;AAQH,MAAa,gBAAuC,EAClD,UACA,YACA,QACA,YAAY,qBACR;AAoBJ,QAAO,0CAjBa,WAAW,UAAU,EACvC,YAAY;EACV,GAJgB,uBAAuB,cAAc,MAAM,CAI5C;EACf,IAAI,UACF,oBAAC,MAAD;GACE,gBAAgB,MAAM,MAAM,WAAW,OAAO;GAC9C,YAAY;GACJ;GACR,OAAM;GACN,GAAI;GACJ,OAAM;GACN;EAEJ,GAAG;EACJ,EACF,CAAC,EAEuB"}
|
|
@@ -43,7 +43,7 @@ declare enum BadgeSize {
|
|
|
43
43
|
* @description Defines the styling variants for different badge combinations
|
|
44
44
|
*/
|
|
45
45
|
declare const badgeVariants: (props?: {
|
|
46
|
-
color?: "text" | "primary" | "secondary" | "destructive" | "
|
|
46
|
+
color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "error" | "success" | "custom";
|
|
47
47
|
variant?: "none" | "default" | "outline" | "hoverable";
|
|
48
48
|
size?: "sm" | "md" | "lg";
|
|
49
49
|
} & class_variance_authority_types0.ClassProp) => string;
|
|
@@ -61,9 +61,9 @@ declare enum ButtonTextAlign {
|
|
|
61
61
|
*/
|
|
62
62
|
declare const buttonVariants: (props?: {
|
|
63
63
|
size?: "sm" | "md" | "lg" | "xl" | "icon-sm" | "icon-md" | "icon-lg" | "icon-xl";
|
|
64
|
-
color?: "text" | "primary" | "secondary" | "destructive" | "
|
|
64
|
+
color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "card" | "light" | "dark" | "current" | "text-inverse" | "error" | "success" | "custom";
|
|
65
65
|
roundedSize?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "3xl" | "4xl" | "5xl" | "full";
|
|
66
|
-
variant?: "input" | "none" | "default" | "
|
|
66
|
+
variant?: "input" | "none" | "default" | "outline" | "link" | "invisible-link" | "hoverable" | "fade";
|
|
67
67
|
textAlign?: "left" | "center" | "right";
|
|
68
68
|
isFullWidth?: boolean;
|
|
69
69
|
} & class_variance_authority_types0.ClassProp) => string;
|
|
@@ -5,7 +5,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
5
5
|
//#region src/components/CollapsibleTable/CollapsibleTable.d.ts
|
|
6
6
|
declare const collapsibleTableVariants: (props?: {
|
|
7
7
|
size?: "sm" | "md" | "lg" | "xl" | "full";
|
|
8
|
-
variant?: "default" | "
|
|
8
|
+
variant?: "default" | "dark" | "ghost" | "outlined";
|
|
9
9
|
spacing?: "sm" | "md" | "lg" | "none" | "auto";
|
|
10
10
|
} & class_variance_authority_types0.ClassProp) => string;
|
|
11
11
|
interface CollapsibleTableProps extends Omit<HTMLAttributes<HTMLElement>, 'title'>, VariantProps<typeof collapsibleTableVariants> {
|
|
@@ -29,7 +29,7 @@ declare const Command: {
|
|
|
29
29
|
ref?: React.Ref<HTMLInputElement>;
|
|
30
30
|
} & {
|
|
31
31
|
asChild?: boolean;
|
|
32
|
-
}, "key" |
|
|
32
|
+
}, "key" | keyof react.InputHTMLAttributes<HTMLInputElement> | "asChild">, "onChange" | "type" | "value"> & {
|
|
33
33
|
value?: string;
|
|
34
34
|
onValueChange?: (search: string) => void;
|
|
35
35
|
} & react.RefAttributes<HTMLInputElement>>;
|
|
@@ -14,7 +14,7 @@ declare const containerVariants: (props?: {
|
|
|
14
14
|
separator?: "both" | "without" | "x" | "y";
|
|
15
15
|
border?: "none" | "with";
|
|
16
16
|
borderColor?: "error" | "success" | "text" | "primary" | "secondary" | "neutral" | "card" | "warning";
|
|
17
|
-
background?: "none" | "
|
|
17
|
+
background?: "none" | "hoverable" | "with";
|
|
18
18
|
gap?: "sm" | "md" | "lg" | "xl" | "2xl" | "none";
|
|
19
19
|
} & class_variance_authority_types0.ClassProp) => string;
|
|
20
20
|
/** Available rounded corner sizes for the container */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps, FC } from "react";
|
|
2
2
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
3
|
-
import { HTMLRenderer as HTMLRenderer$1, RenderHTMLProps } from "react-intlayer";
|
|
3
|
+
import { HTMLRenderer as HTMLRenderer$1, RenderHTMLProps } from "react-intlayer/html";
|
|
4
4
|
|
|
5
5
|
//#region src/components/HTMLRender/HTMLRender.d.ts
|
|
6
6
|
type HTMLRendererProps = {
|
|
@@ -53,9 +53,9 @@ declare enum LinkUnderlined {
|
|
|
53
53
|
FALSE = "false"
|
|
54
54
|
}
|
|
55
55
|
declare const linkVariants: (props?: {
|
|
56
|
-
variant?: "default" | "
|
|
56
|
+
variant?: "default" | "invisible-link" | "hoverable" | "button" | "button-outlined";
|
|
57
57
|
roundedSize?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "3xl" | "full";
|
|
58
|
-
color?: "text" | "primary" | "secondary" | "destructive" | "
|
|
58
|
+
color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "text-inverse" | "error" | "success" | "custom";
|
|
59
59
|
size?: "sm" | "md" | "lg" | "xl" | "custom";
|
|
60
60
|
underlined?: boolean | LinkUnderlined.DEFAULT;
|
|
61
61
|
} & class_variance_authority_types0.ClassProp) => string;
|
|
@@ -186,7 +186,7 @@ declare enum TagBackground {
|
|
|
186
186
|
}
|
|
187
187
|
declare const containerVariants: (props?: {
|
|
188
188
|
roundedSize?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "3xl" | "full";
|
|
189
|
-
color?: "text" | "primary" | "
|
|
189
|
+
color?: "text" | "primary" | "neutral" | "error" | "success" | "warning" | "blue" | "yellow" | "green" | "red" | "orange" | "purple" | "pink" | "brown" | "gray" | "black" | "white";
|
|
190
190
|
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
191
191
|
border?: "none" | "with";
|
|
192
192
|
background?: "none" | "with";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/design-system",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Intlayer design system, including UI components used in the Intlayer editor, website, and visual editor/CMS.",
|
|
6
6
|
"keywords": [
|
|
@@ -106,12 +106,12 @@
|
|
|
106
106
|
"dependencies": {
|
|
107
107
|
"@better-auth/passkey": "1.5.5",
|
|
108
108
|
"@better-auth/sso": "1.5.5",
|
|
109
|
-
"@intlayer/api": "8.
|
|
110
|
-
"@intlayer/config": "8.
|
|
111
|
-
"@intlayer/core": "8.
|
|
112
|
-
"@intlayer/dictionaries-entry": "8.
|
|
113
|
-
"@intlayer/editor-react": "8.
|
|
114
|
-
"@intlayer/types": "8.
|
|
109
|
+
"@intlayer/api": "8.5.0",
|
|
110
|
+
"@intlayer/config": "8.5.0",
|
|
111
|
+
"@intlayer/core": "8.5.0",
|
|
112
|
+
"@intlayer/dictionaries-entry": "8.5.0",
|
|
113
|
+
"@intlayer/editor-react": "8.5.0",
|
|
114
|
+
"@intlayer/types": "8.5.0",
|
|
115
115
|
"@radix-ui/react-dialog": "1.1.15",
|
|
116
116
|
"@radix-ui/react-select": "2.2.6",
|
|
117
117
|
"@radix-ui/react-slot": "1.2.4",
|
|
@@ -120,12 +120,12 @@
|
|
|
120
120
|
"better-auth": "1.5.5",
|
|
121
121
|
"class-variance-authority": "0.7.1",
|
|
122
122
|
"cmdk": "1.1.1",
|
|
123
|
-
"react-intlayer": "8.
|
|
123
|
+
"react-intlayer": "8.5.0",
|
|
124
124
|
"rollup-preserve-directives": "1.1.3",
|
|
125
125
|
"zod": "4.3.6"
|
|
126
126
|
},
|
|
127
127
|
"devDependencies": {
|
|
128
|
-
"@intlayer/backend": "8.
|
|
128
|
+
"@intlayer/backend": "8.5.0",
|
|
129
129
|
"@shikijs/transformers": "4.0.2",
|
|
130
130
|
"@storybook/addon-a11y": "8.6.14",
|
|
131
131
|
"@storybook/addon-essentials": "8.6.14",
|
|
@@ -154,14 +154,14 @@
|
|
|
154
154
|
"@utils/ts-config": "1.0.4",
|
|
155
155
|
"@utils/ts-config-types": "1.0.4",
|
|
156
156
|
"fast-glob": "3.3.3",
|
|
157
|
-
"intlayer": "8.
|
|
157
|
+
"intlayer": "8.5.0",
|
|
158
158
|
"rimraf": "6.1.3",
|
|
159
159
|
"shiki": "4.0.2",
|
|
160
160
|
"storybook": "8.6.17",
|
|
161
161
|
"tsdown": "0.21.4",
|
|
162
162
|
"typescript": "6.0.2",
|
|
163
163
|
"vite": "8.0.2",
|
|
164
|
-
"vite-intlayer": "8.
|
|
164
|
+
"vite-intlayer": "8.5.0",
|
|
165
165
|
"vite-plugin-dts": "4.5.4",
|
|
166
166
|
"vite-tsconfig-paths": "6.1.1",
|
|
167
167
|
"vitest": "4.1.1"
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
"peerDependencies": {
|
|
170
170
|
"@better-fetch/fetch": "1.1.21",
|
|
171
171
|
"@hookform/resolvers": "5.2.2",
|
|
172
|
-
"@intlayer/backend": "8.
|
|
172
|
+
"@intlayer/backend": "8.5.0",
|
|
173
173
|
"@monaco-editor/react": "4.7.0",
|
|
174
174
|
"@shikijs/transformers": "4.0.2",
|
|
175
175
|
"@tanstack/react-query": "5.95.2",
|
|
@@ -177,12 +177,12 @@
|
|
|
177
177
|
"clsx": "2.1.1",
|
|
178
178
|
"framer-motion": "12.38.0",
|
|
179
179
|
"fuse.js": "7.1.0",
|
|
180
|
-
"intlayer": "8.
|
|
180
|
+
"intlayer": "8.5.0",
|
|
181
181
|
"lucide-react": "1.0.1",
|
|
182
182
|
"react": ">=16.0.0",
|
|
183
183
|
"react-dom": ">=16.0.0",
|
|
184
|
-
"react-hook-form": "7.
|
|
185
|
-
"react-intlayer": "8.
|
|
184
|
+
"react-hook-form": "7.72.0",
|
|
185
|
+
"react-intlayer": "8.5.0",
|
|
186
186
|
"shiki": "4.0.2",
|
|
187
187
|
"tailwind-merge": "3.5.0",
|
|
188
188
|
"tailwindcss": "4.2.1"
|