@veevarts/design-system 1.0.0-dev.2 → 1.0.0-dev.21
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/components/Button/Button.d.ts +1 -1
- package/dist/index.cjs +10 -10
- package/dist/index.js +2796 -2460
- package/dist/patterns/Multiselect/Multiselect.d.ts +2 -0
- package/dist/patterns/Multiselect/__test__/Multiselect.test.d.ts +4 -0
- package/dist/patterns/Multiselect/index.d.ts +2 -0
- package/dist/patterns/Multiselect/types.d.ts +7 -0
- package/dist/patterns/RichText/index.d.ts +1 -0
- package/dist/patterns/RichText/types/extensions.d.ts +2 -1
- package/dist/patterns/RichText/types/props.d.ts +11 -0
- package/dist/patterns/RichText/utils/index.d.ts +1 -0
- package/dist/patterns/RichText/utils/inlineStyles.d.ts +31 -0
- package/dist/patterns/index.d.ts +2 -0
- package/dist/styles.css +18 -16
- package/dist/test/setup.motion.d.ts +1 -0
- package/package.json +3 -3
- /package/{fonts → public/fonts}/neue-montreal/Icon/r" +0 -0
- /package/{fonts → public/fonts}/neue-montreal/PPNeueMontreal-Bold.woff +0 -0
- /package/{fonts → public/fonts}/neue-montreal/PPNeueMontreal-Bold.woff2 +0 -0
- /package/{fonts → public/fonts}/neue-montreal/PPNeueMontreal-BoldItalic.woff +0 -0
- /package/{fonts → public/fonts}/neue-montreal/PPNeueMontreal-BoldItalic.woff2 +0 -0
- /package/{fonts → public/fonts}/neue-montreal/PPNeueMontreal-Italic.woff +0 -0
- /package/{fonts → public/fonts}/neue-montreal/PPNeueMontreal-Italic.woff2 +0 -0
- /package/{fonts → public/fonts}/neue-montreal/PPNeueMontreal-Regular.woff +0 -0
- /package/{fonts → public/fonts}/neue-montreal/PPNeueMontreal-Regular.woff2 +0 -0
- /package/{fonts → public/fonts}/neue-montreal/PPNeueMontreal-SemiBold.woff +0 -0
- /package/{fonts → public/fonts}/neue-montreal/PPNeueMontreal-SemiBold.woff2 +0 -0
- /package/{fonts → public/fonts}/scholar/Scholar-Italic.woff +0 -0
- /package/{fonts → public/fonts}/scholar/Scholar-Italic.woff2 +0 -0
- /package/{fonts → public/fonts}/scholar/Scholar-Regular.woff +0 -0
- /package/{fonts → public/fonts}/scholar/Scholar-Regular.woff2 +0 -0
|
@@ -9,3 +9,4 @@ export type { ModifierIdentifier, ModifierType, HeadingLevel, TextAlignment, Hea
|
|
|
9
9
|
export { isHeadingModifier, isTextAlignModifier, isTextColorModifier, isHighlightModifier, isLinkModifier, getModifierType, } from './types';
|
|
10
10
|
export { TEXT_COLORS, HIGHLIGHT_COLORS } from './config';
|
|
11
11
|
export type { TextColor, HighlightColor } from './config';
|
|
12
|
+
export { addInlineStyles, removeInlineStyles } from './utils';
|
|
@@ -16,8 +16,9 @@ export interface ExtensionConfig<TOptions = any> {
|
|
|
16
16
|
category: ExtensionCategory;
|
|
17
17
|
/**
|
|
18
18
|
* TipTap extension class or instance
|
|
19
|
+
* Can be null for built-in editor commands (e.g., clearMarks, clearNodes)
|
|
19
20
|
*/
|
|
20
|
-
extension: Node | Mark | Extension;
|
|
21
|
+
extension: Node | Mark | Extension | null;
|
|
21
22
|
/**
|
|
22
23
|
* Default options for the extension
|
|
23
24
|
*/
|
|
@@ -147,6 +147,17 @@ export interface RichTextAreaProps extends Omit<ComponentProps<typeof Textarea>,
|
|
|
147
147
|
type: string;
|
|
148
148
|
modifier: string;
|
|
149
149
|
}) => void;
|
|
150
|
+
/**
|
|
151
|
+
* Include inline styles in HTML output
|
|
152
|
+
* When true, the HTML in onContentChange will include inline styles
|
|
153
|
+
* (e.g., `<h1 style="font-size: 2rem; ...">` instead of just `<h1>`)
|
|
154
|
+
*
|
|
155
|
+
* Useful when the HTML will be rendered outside the RichTextArea
|
|
156
|
+
* without access to the editor CSS.
|
|
157
|
+
*
|
|
158
|
+
* @default false
|
|
159
|
+
*/
|
|
160
|
+
includeInlineStyles?: boolean;
|
|
150
161
|
}
|
|
151
162
|
/**
|
|
152
163
|
* Internal TipTap editor props (for core/TipTapEditor.tsx)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { addInlineStyles, removeInlineStyles } from './inlineStyles';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rich Text - Inline Styles Utility
|
|
3
|
+
*
|
|
4
|
+
* Converts semantic HTML to HTML with inline styles.
|
|
5
|
+
* This ensures the HTML renders correctly without external CSS.
|
|
6
|
+
*
|
|
7
|
+
* Typography and colors follow design tokens from src/tokens/
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Adds inline styles to HTML elements
|
|
11
|
+
*
|
|
12
|
+
* @param html - The HTML string to process
|
|
13
|
+
* @returns HTML with inline styles added
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const html = '<h1>Title</h1><p>Content</p>';
|
|
18
|
+
* const styled = addInlineStyles(html);
|
|
19
|
+
* // Returns: '<h1 style="font-size: 2rem; ...">Title</h1><p style="...">Content</p>'
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function addInlineStyles(html: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* Removes inline styles from HTML elements
|
|
25
|
+
* Useful for cleaning up HTML before editing
|
|
26
|
+
*
|
|
27
|
+
* @param html - The HTML string to process
|
|
28
|
+
* @returns HTML with inline styles removed
|
|
29
|
+
*/
|
|
30
|
+
export declare function removeInlineStyles(html: string): string;
|
|
31
|
+
export default addInlineStyles;
|
package/dist/patterns/index.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export type { NavbarProps, NavbarLink, NavbarLanguage } from './Navbar';
|
|
|
3
3
|
export { Stepper } from './Stepper';
|
|
4
4
|
export type { StepperProps } from './Stepper';
|
|
5
5
|
export { Footer } from './Footer';
|
|
6
|
+
export { Multiselect } from './Multiselect';
|
|
7
|
+
export type { MultiselectProps } from './Multiselect';
|
|
6
8
|
export { RichTextArea, RICH_TEXT_PRESETS } from './RichText';
|
|
7
9
|
export type { RichTextAreaProps } from './RichText';
|
|
8
10
|
export { DonationAmounts } from './DonationAmounts';
|
package/dist/styles.css
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Veevart Design System - Font Definitions
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* @import '@veevarts/design-system/styles.css';
|
|
4
|
+
* Usage:
|
|
5
|
+
* 1. Import this file: @import '@veevarts/design-system/styles.css';
|
|
6
|
+
* 2. Copy fonts to your public folder:
|
|
7
|
+
* cp -r node_modules/@veevarts/design-system/fonts public/fonts
|
|
6
8
|
*/
|
|
7
9
|
|
|
8
10
|
/**
|
|
@@ -12,8 +14,8 @@
|
|
|
12
14
|
@font-face {
|
|
13
15
|
font-family: 'NeueMontreal';
|
|
14
16
|
src:
|
|
15
|
-
url('
|
|
16
|
-
url('
|
|
17
|
+
url('/fonts/neue-montreal/PPNeueMontreal-Regular.woff2') format('woff2'),
|
|
18
|
+
url('/fonts/neue-montreal/PPNeueMontreal-Regular.woff') format('woff');
|
|
17
19
|
font-weight: 400;
|
|
18
20
|
font-style: normal;
|
|
19
21
|
font-display: swap;
|
|
@@ -22,8 +24,8 @@
|
|
|
22
24
|
@font-face {
|
|
23
25
|
font-family: 'NeueMontreal';
|
|
24
26
|
src:
|
|
25
|
-
url('
|
|
26
|
-
url('
|
|
27
|
+
url('/fonts/neue-montreal/PPNeueMontreal-SemiBold.woff2') format('woff2'),
|
|
28
|
+
url('/fonts/neue-montreal/PPNeueMontreal-SemiBold.woff') format('woff');
|
|
27
29
|
font-weight: 600;
|
|
28
30
|
font-style: normal;
|
|
29
31
|
font-display: swap;
|
|
@@ -32,8 +34,8 @@
|
|
|
32
34
|
@font-face {
|
|
33
35
|
font-family: 'NeueMontreal';
|
|
34
36
|
src:
|
|
35
|
-
url('
|
|
36
|
-
url('
|
|
37
|
+
url('/fonts/neue-montreal/PPNeueMontreal-Bold.woff2') format('woff2'),
|
|
38
|
+
url('/fonts/neue-montreal/PPNeueMontreal-Bold.woff') format('woff');
|
|
37
39
|
font-weight: 700;
|
|
38
40
|
font-style: normal;
|
|
39
41
|
font-display: swap;
|
|
@@ -42,8 +44,8 @@
|
|
|
42
44
|
@font-face {
|
|
43
45
|
font-family: 'NeueMontreal';
|
|
44
46
|
src:
|
|
45
|
-
url('
|
|
46
|
-
url('
|
|
47
|
+
url('/fonts/neue-montreal/PPNeueMontreal-Italic.woff2') format('woff2'),
|
|
48
|
+
url('/fonts/neue-montreal/PPNeueMontreal-Italic.woff') format('woff');
|
|
47
49
|
font-weight: 400;
|
|
48
50
|
font-style: italic;
|
|
49
51
|
font-display: swap;
|
|
@@ -52,8 +54,8 @@
|
|
|
52
54
|
@font-face {
|
|
53
55
|
font-family: 'NeueMontreal';
|
|
54
56
|
src:
|
|
55
|
-
url('
|
|
56
|
-
url('
|
|
57
|
+
url('/fonts/neue-montreal/PPNeueMontreal-BoldItalic.woff2') format('woff2'),
|
|
58
|
+
url('/fonts/neue-montreal/PPNeueMontreal-BoldItalic.woff') format('woff');
|
|
57
59
|
font-weight: 700;
|
|
58
60
|
font-style: italic;
|
|
59
61
|
font-display: swap;
|
|
@@ -66,8 +68,8 @@
|
|
|
66
68
|
@font-face {
|
|
67
69
|
font-family: 'Scholar';
|
|
68
70
|
src:
|
|
69
|
-
url('
|
|
70
|
-
url('
|
|
71
|
+
url('/fonts/scholar/Scholar-Regular.woff2') format('woff2'),
|
|
72
|
+
url('/fonts/scholar/Scholar-Regular.woff') format('woff');
|
|
71
73
|
font-weight: 400;
|
|
72
74
|
font-style: normal;
|
|
73
75
|
font-display: swap;
|
|
@@ -76,8 +78,8 @@
|
|
|
76
78
|
@font-face {
|
|
77
79
|
font-family: 'Scholar';
|
|
78
80
|
src:
|
|
79
|
-
url('
|
|
80
|
-
url('
|
|
81
|
+
url('/fonts/scholar/Scholar-Italic.woff2') format('woff2'),
|
|
82
|
+
url('/fonts/scholar/Scholar-Italic.woff') format('woff');
|
|
81
83
|
font-weight: 400;
|
|
82
84
|
font-style: italic;
|
|
83
85
|
font-display: swap;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veevarts/design-system",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.0-dev.
|
|
4
|
+
"version": "1.0.0-dev.21",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
"import": "./dist/tailwind/index.js"
|
|
19
19
|
},
|
|
20
20
|
"./styles.css": "./dist/styles.css",
|
|
21
|
-
"./fonts/*": "./fonts/*"
|
|
21
|
+
"./fonts/*": "./public/fonts/*"
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
24
|
"dist",
|
|
25
|
-
"fonts"
|
|
25
|
+
"public/fonts"
|
|
26
26
|
],
|
|
27
27
|
"scripts": {
|
|
28
28
|
"dev": "vite",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|