@customafk/lunas-ui 0.2.16 → 0.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@customafk/lunas-ui",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "description": "UI library for Lunas Enterprise",
5
5
  "type": "module",
6
6
  "author": {
@@ -31,6 +31,7 @@
31
31
  "./styles/loader": "./styles/loader.css",
32
32
  "./styles/theme": "./styles/theme.css",
33
33
  "./styles/typography": "./styles/typography.css",
34
+ "./styles/text-editor": "./styles/text-editor.css",
34
35
  "./cards/grid-product-card": {
35
36
  "require": "./dist/cards/grid-product-card.cjs",
36
37
  "import": "./dist/cards/grid-product-card.mjs"
@@ -119,6 +120,10 @@
119
120
  "require": "./dist/features/tanstack-form/index.cjs",
120
121
  "import": "./dist/features/tanstack-form/index.mjs"
121
122
  },
123
+ "./features/text-editor": {
124
+ "require": "./dist/features/text-editor/index.cjs",
125
+ "import": "./dist/features/text-editor/index.mjs"
126
+ },
122
127
  "./layouts/cms-layout": {
123
128
  "require": "./dist/layouts/cms-layout/index.cjs",
124
129
  "import": "./dist/layouts/cms-layout/index.mjs"
@@ -424,6 +429,11 @@
424
429
  "@tanstack/react-form": "^1.29.0",
425
430
  "@tanstack/react-table": "^8.21.0",
426
431
  "@tanstack/react-virtual": "^3.13.12",
432
+ "@tiptap/extension-placeholder": "^3.24.0",
433
+ "@tiptap/extension-text-align": "^3.24.0",
434
+ "@tiptap/extension-underline": "^3.24.0",
435
+ "@tiptap/react": "^3.24.0",
436
+ "@tiptap/starter-kit": "^3.24.0",
427
437
  "class-variance-authority": "^0.7.0",
428
438
  "cmdk": "^1.1.0",
429
439
  "embla-carousel-react": "^8.6.0",
@@ -0,0 +1,140 @@
1
+ /* ProseMirror editor content styles */
2
+ .lunas-text-editor .ProseMirror {
3
+ outline: none;
4
+ min-height: 8rem;
5
+ padding: 0.5rem 0.75rem;
6
+ }
7
+
8
+ /* Placeholder */
9
+ .lunas-text-editor .ProseMirror p.is-editor-empty:first-child::before {
10
+ color: var(--text-positive-muted);
11
+ content: attr(data-placeholder);
12
+ float: left;
13
+ height: 0;
14
+ pointer-events: none;
15
+ }
16
+
17
+ /* Headings */
18
+ .lunas-text-editor .ProseMirror h1 {
19
+ font-size: 1.875rem;
20
+ font-weight: 700;
21
+ line-height: 2.25rem;
22
+ color: var(--text-positive-strong);
23
+ margin-top: 1.25rem;
24
+ margin-bottom: 0.5rem;
25
+ }
26
+
27
+ .lunas-text-editor .ProseMirror h2 {
28
+ font-size: 1.5rem;
29
+ font-weight: 600;
30
+ line-height: 2rem;
31
+ color: var(--text-positive-strong);
32
+ margin-top: 1rem;
33
+ margin-bottom: 0.5rem;
34
+ }
35
+
36
+ .lunas-text-editor .ProseMirror h3 {
37
+ font-size: 1.25rem;
38
+ font-weight: 600;
39
+ line-height: 1.75rem;
40
+ color: var(--text-positive-strong);
41
+ margin-top: 0.875rem;
42
+ margin-bottom: 0.375rem;
43
+ }
44
+
45
+ /* Paragraph */
46
+ .lunas-text-editor .ProseMirror p {
47
+ margin: 0.25rem 0;
48
+ color: var(--text-positive);
49
+ line-height: 1.625;
50
+ }
51
+
52
+ /* Lists */
53
+ .lunas-text-editor .ProseMirror ul,
54
+ .lunas-text-editor .ProseMirror ol {
55
+ padding-left: 1.5rem;
56
+ margin: 0.5rem 0;
57
+ color: var(--text-positive);
58
+ }
59
+
60
+ .lunas-text-editor .ProseMirror ul {
61
+ list-style-type: disc;
62
+ }
63
+
64
+ .lunas-text-editor .ProseMirror ol {
65
+ list-style-type: decimal;
66
+ }
67
+
68
+ .lunas-text-editor .ProseMirror li {
69
+ margin: 0.125rem 0;
70
+ line-height: 1.625;
71
+ }
72
+
73
+ /* Blockquote */
74
+ .lunas-text-editor .ProseMirror blockquote {
75
+ border-left: 3px solid var(--primary-weak);
76
+ padding-left: 1rem;
77
+ margin: 0.75rem 0;
78
+ color: var(--text-positive-weak);
79
+ font-style: italic;
80
+ }
81
+
82
+ /* Inline code */
83
+ .lunas-text-editor .ProseMirror code {
84
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
85
+ font-size: 0.875em;
86
+ background-color: var(--muted-muted);
87
+ color: var(--text-positive-strong);
88
+ padding: 0.125rem 0.25rem;
89
+ border-radius: 0.25rem;
90
+ border: 1px solid var(--border);
91
+ }
92
+
93
+ /* Code block */
94
+ .lunas-text-editor .ProseMirror pre {
95
+ background-color: var(--muted-intense);
96
+ color: var(--text-negative);
97
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
98
+ font-size: 0.875rem;
99
+ border-radius: 0.375rem;
100
+ padding: 0.75rem 1rem;
101
+ margin: 0.75rem 0;
102
+ overflow-x: auto;
103
+ }
104
+
105
+ .lunas-text-editor .ProseMirror pre code {
106
+ background: none;
107
+ border: none;
108
+ padding: 0;
109
+ color: inherit;
110
+ font-size: inherit;
111
+ }
112
+
113
+ /* Horizontal rule */
114
+ .lunas-text-editor .ProseMirror hr {
115
+ border: none;
116
+ border-top: 1px solid var(--border);
117
+ margin: 1rem 0;
118
+ }
119
+
120
+ /* Strong / Bold */
121
+ .lunas-text-editor .ProseMirror strong {
122
+ font-weight: 600;
123
+ color: var(--text-positive-strong);
124
+ }
125
+
126
+ /* Em / Italic */
127
+ .lunas-text-editor .ProseMirror em {
128
+ font-style: italic;
129
+ }
130
+
131
+ /* Strike */
132
+ .lunas-text-editor .ProseMirror s {
133
+ text-decoration: line-through;
134
+ color: var(--text-positive-weak);
135
+ }
136
+
137
+ /* Selection */
138
+ .lunas-text-editor .ProseMirror ::selection {
139
+ background-color: var(--primary-muted);
140
+ }