@jacshuo/onyx 2.2.0 → 2.4.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.
Files changed (135) hide show
  1. package/dist/Chart/BarChart.cjs +1 -1
  2. package/dist/Chart/BarChart.js +1 -1
  3. package/dist/Chart/PieChart.cjs +1 -1
  4. package/dist/Chart/PieChart.js +1 -1
  5. package/dist/Chart/ScatterChart.cjs +1 -1
  6. package/dist/Chart/ScatterChart.js +1 -1
  7. package/dist/Chart/index.cjs +1 -1
  8. package/dist/Chart/index.js +1 -1
  9. package/dist/DataDisplay/VirtualList.cjs +2 -0
  10. package/dist/DataDisplay/VirtualList.css +1 -0
  11. package/dist/DataDisplay/VirtualList.d.cts +5 -0
  12. package/dist/DataDisplay/VirtualList.d.ts +5 -0
  13. package/dist/DataDisplay/VirtualList.js +2 -0
  14. package/dist/DataDisplay/index.cjs +3 -2
  15. package/dist/DataDisplay/index.css +1 -0
  16. package/dist/DataDisplay/index.d.cts +5 -0
  17. package/dist/DataDisplay/index.d.ts +5 -0
  18. package/dist/DataDisplay/index.js +3 -2
  19. package/dist/Extras/FileExplorer.cjs +2 -2
  20. package/dist/Extras/FileExplorer.js +2 -2
  21. package/dist/Extras/LoginPanel.cjs +1 -0
  22. package/dist/Extras/LoginPanel.css +1 -0
  23. package/dist/Extras/LoginPanel.d.cts +3 -0
  24. package/dist/Extras/LoginPanel.d.ts +3 -0
  25. package/dist/Extras/LoginPanel.js +1 -0
  26. package/dist/Extras/RichTextEditor.cjs +45 -0
  27. package/dist/Extras/RichTextEditor.css +1 -0
  28. package/dist/Extras/RichTextEditor.d.cts +10 -0
  29. package/dist/Extras/RichTextEditor.d.ts +10 -0
  30. package/dist/Extras/RichTextEditor.js +45 -0
  31. package/dist/Extras/TypewriterText.cjs +2 -1
  32. package/dist/Extras/TypewriterText.css +1 -1
  33. package/dist/Extras/TypewriterText.js +2 -1
  34. package/dist/Extras/index.cjs +48 -4
  35. package/dist/Extras/index.css +1 -1
  36. package/dist/Extras/index.d.cts +7 -0
  37. package/dist/Extras/index.d.ts +7 -0
  38. package/dist/Extras/index.js +48 -4
  39. package/dist/Forms/Form.cjs +1 -1
  40. package/dist/Forms/Form.js +1 -1
  41. package/dist/Forms/OTPInput.cjs +1 -0
  42. package/dist/Forms/OTPInput.css +1 -0
  43. package/dist/Forms/OTPInput.d.cts +4 -0
  44. package/dist/Forms/OTPInput.d.ts +4 -0
  45. package/dist/Forms/OTPInput.js +1 -0
  46. package/dist/Forms/Select.cjs +1 -1
  47. package/dist/Forms/Select.js +1 -1
  48. package/dist/Forms/index.cjs +1 -1
  49. package/dist/Forms/index.css +1 -0
  50. package/dist/Forms/index.d.cts +4 -0
  51. package/dist/Forms/index.d.ts +4 -0
  52. package/dist/Forms/index.js +1 -1
  53. package/dist/Layout/SplitPanel.cjs +1 -0
  54. package/dist/Layout/SplitPanel.d.cts +3 -0
  55. package/dist/Layout/SplitPanel.d.ts +3 -0
  56. package/dist/Layout/SplitPanel.js +1 -0
  57. package/dist/Layout/index.cjs +1 -1
  58. package/dist/Layout/index.d.cts +3 -0
  59. package/dist/Layout/index.d.ts +3 -0
  60. package/dist/Layout/index.js +1 -1
  61. package/dist/Navigation/Header.cjs +1 -1
  62. package/dist/Navigation/Header.js +1 -1
  63. package/dist/Navigation/RibbonBar.d.cts +3 -3
  64. package/dist/Navigation/RibbonBar.d.ts +3 -3
  65. package/dist/Navigation/index.cjs +2 -2
  66. package/dist/Navigation/index.d.cts +3 -3
  67. package/dist/Navigation/index.d.ts +3 -3
  68. package/dist/Navigation/index.js +2 -2
  69. package/dist/Primitives/Avatar.cjs +1 -1
  70. package/dist/Primitives/Avatar.js +1 -1
  71. package/dist/Primitives/Badge.cjs +1 -1
  72. package/dist/Primitives/Badge.js +1 -1
  73. package/dist/Primitives/Button.cjs +1 -1
  74. package/dist/Primitives/Button.js +1 -1
  75. package/dist/Primitives/Checkbox.cjs +1 -1
  76. package/dist/Primitives/Checkbox.js +1 -1
  77. package/dist/Primitives/Dropdown.cjs +1 -1
  78. package/dist/Primitives/Dropdown.js +1 -1
  79. package/dist/Primitives/DropdownButton.cjs +1 -1
  80. package/dist/Primitives/DropdownButton.js +1 -1
  81. package/dist/Primitives/Indicator.cjs +1 -1
  82. package/dist/Primitives/Indicator.js +1 -1
  83. package/dist/Primitives/Input.cjs +1 -1
  84. package/dist/Primitives/Input.js +1 -1
  85. package/dist/Primitives/Kbd.cjs +1 -0
  86. package/dist/Primitives/Kbd.css +0 -0
  87. package/dist/Primitives/Kbd.d.cts +6 -0
  88. package/dist/Primitives/Kbd.d.ts +6 -0
  89. package/dist/Primitives/Kbd.js +1 -0
  90. package/dist/Primitives/Label.cjs +1 -1
  91. package/dist/Primitives/Label.js +1 -1
  92. package/dist/Primitives/Radio.cjs +1 -1
  93. package/dist/Primitives/Radio.js +1 -1
  94. package/dist/Primitives/Rating.cjs +2 -0
  95. package/dist/Primitives/Rating.css +0 -0
  96. package/dist/Primitives/Rating.d.cts +4 -0
  97. package/dist/Primitives/Rating.d.ts +4 -0
  98. package/dist/Primitives/Rating.js +2 -0
  99. package/dist/Primitives/Slider.cjs +1 -1
  100. package/dist/Primitives/Slider.js +1 -1
  101. package/dist/Primitives/Switch.cjs +1 -1
  102. package/dist/Primitives/Switch.js +1 -1
  103. package/dist/Primitives/Tag.cjs +1 -1
  104. package/dist/Primitives/Tag.js +1 -1
  105. package/dist/Primitives/index.cjs +2 -1
  106. package/dist/Primitives/index.d.cts +10 -0
  107. package/dist/Primitives/index.d.ts +10 -0
  108. package/dist/Primitives/index.js +2 -1
  109. package/dist/_tsup-dts-rollup.d.cts +843 -1
  110. package/dist/_tsup-dts-rollup.d.ts +843 -1
  111. package/dist/index.cjs +49 -5
  112. package/dist/index.css +1 -1
  113. package/dist/index.d.cts +35 -0
  114. package/dist/index.d.ts +35 -0
  115. package/dist/index.js +49 -5
  116. package/dist/styles/DataDisplay/VirtualList.css +35 -0
  117. package/dist/styles/Extras/CinePlayer.css +63 -1
  118. package/dist/styles/Extras/FileExplorer.css +39 -1
  119. package/dist/styles/Extras/FilmReel.css +24 -1
  120. package/dist/styles/Extras/LoginPanel.css +16 -0
  121. package/dist/styles/Extras/MiniPlayer.css +84 -1
  122. package/dist/styles/Extras/RichTextEditor.css +908 -0
  123. package/dist/styles/Extras/TypewriterText.css +254 -0
  124. package/dist/styles/Forms/OTPInput.css +11 -0
  125. package/dist/styles/Layout/SplitPanel.css +15 -0
  126. package/dist/styles/Primitives/DropdownButton.css +26 -1
  127. package/dist/styles/Primitives/Kbd.css +1 -0
  128. package/dist/styles/Primitives/Rating.css +1 -0
  129. package/dist/styles/base.css +281 -0
  130. package/dist/styles.css +281 -0
  131. package/dist/theme.cjs +1 -1
  132. package/dist/theme.d.cts +3 -0
  133. package/dist/theme.d.ts +3 -0
  134. package/dist/theme.js +1 -1
  135. package/package.json +22 -1
@@ -24,6 +24,18 @@
24
24
  }
25
25
  }
26
26
 
27
+ /* ── Image fade-in for rich mode ─────────────────────────── */
28
+ @keyframes tw-img-fade-in {
29
+ from {
30
+ opacity: 0;
31
+ transform: translateY(5px);
32
+ }
33
+ to {
34
+ opacity: 1;
35
+ transform: translateY(0);
36
+ }
37
+ }
38
+
27
39
  /* ── Base cursor element ─────────────────────────────────── */
28
40
  .tw-cursor {
29
41
  display: inline-block;
@@ -53,3 +65,245 @@
53
65
  animation: tw-cursor-out 0.6s ease-out forwards;
54
66
  pointer-events: none;
55
67
  }
68
+
69
+ /* ═══════════════════════════════════════════════════════════
70
+ RICH MODE — prose-style Markdown rendering
71
+ ═══════════════════════════════════════════════════════════ */
72
+
73
+ /* ── Prose container ─────────────────────────────────────── */
74
+ .tw-rich-prose {
75
+ font-size: 0.875rem;
76
+ line-height: 1.75;
77
+ color: var(--color-primary-900);
78
+ word-break: break-word;
79
+ overflow-wrap: break-word;
80
+ }
81
+
82
+ .dark .tw-rich-prose {
83
+ color: var(--color-primary-100);
84
+ }
85
+
86
+ /* ── Headings ────────────────────────────────────────────── */
87
+ .tw-rich-prose h1,
88
+ .tw-rich-prose h2,
89
+ .tw-rich-prose h3,
90
+ .tw-rich-prose h4,
91
+ .tw-rich-prose h5,
92
+ .tw-rich-prose h6 {
93
+ font-weight: 700;
94
+ line-height: 1.3;
95
+ margin-top: 1.25rem;
96
+ margin-bottom: 0.375rem;
97
+ color: var(--color-primary-950);
98
+ }
99
+
100
+ .dark .tw-rich-prose h1,
101
+ .dark .tw-rich-prose h2,
102
+ .dark .tw-rich-prose h3,
103
+ .dark .tw-rich-prose h4,
104
+ .dark .tw-rich-prose h5,
105
+ .dark .tw-rich-prose h6 {
106
+ color: var(--color-primary-50);
107
+ }
108
+
109
+ .tw-rich-prose h1 {
110
+ font-size: 1.5rem;
111
+ }
112
+ .tw-rich-prose h2 {
113
+ font-size: 1.25rem;
114
+ }
115
+ .tw-rich-prose h3 {
116
+ font-size: 1.125rem;
117
+ }
118
+ .tw-rich-prose h4 {
119
+ font-size: 1rem;
120
+ }
121
+ .tw-rich-prose h5,
122
+ .tw-rich-prose h6 {
123
+ font-size: 0.875rem;
124
+ }
125
+
126
+ /* ── Paragraphs ──────────────────────────────────────────── */
127
+ .tw-rich-prose p {
128
+ margin-top: 0.625rem;
129
+ margin-bottom: 0.625rem;
130
+ }
131
+
132
+ .tw-rich-prose p:first-child {
133
+ margin-top: 0;
134
+ }
135
+
136
+ .tw-rich-prose p:last-child {
137
+ margin-bottom: 0;
138
+ }
139
+
140
+ /* ── Inline code ─────────────────────────────────────────── */
141
+ .tw-rich-prose :not(pre) > code {
142
+ background-color: var(--color-primary-100);
143
+ color: var(--color-primary-700);
144
+ padding: 0.1em 0.35em;
145
+ border-radius: 0.25rem;
146
+ font-size: 0.8125em;
147
+ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
148
+ }
149
+
150
+ .dark .tw-rich-prose :not(pre) > code {
151
+ background-color: var(--color-primary-800);
152
+ color: var(--color-primary-200);
153
+ }
154
+
155
+ /* ── Fenced code blocks ──────────────────────────────────── */
156
+ .tw-rich-prose pre {
157
+ background-color: var(--color-primary-100);
158
+ border-radius: 0.5rem;
159
+ padding: 0.875rem 1rem;
160
+ overflow-x: auto;
161
+ margin: 0.75rem 0;
162
+ font-size: 0.8125rem;
163
+ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
164
+ line-height: 1.6;
165
+ }
166
+
167
+ .dark .tw-rich-prose pre {
168
+ background-color: var(--color-primary-800);
169
+ }
170
+
171
+ .tw-rich-prose pre > code {
172
+ background: none;
173
+ padding: 0;
174
+ font-size: inherit;
175
+ color: inherit;
176
+ border-radius: 0;
177
+ }
178
+
179
+ /* ── Blockquotes ─────────────────────────────────────────── */
180
+ .tw-rich-prose blockquote {
181
+ border-left: 3px solid var(--color-primary-400);
182
+ padding: 0.375rem 0 0.375rem 1rem;
183
+ margin: 0.75rem 0;
184
+ color: var(--color-primary-600);
185
+ font-style: italic;
186
+ }
187
+
188
+ .dark .tw-rich-prose blockquote {
189
+ border-left-color: var(--color-primary-500);
190
+ color: var(--color-primary-400);
191
+ }
192
+
193
+ /* ── Lists ───────────────────────────────────────────────── */
194
+ .tw-rich-prose ul,
195
+ .tw-rich-prose ol {
196
+ padding-left: 1.5rem;
197
+ margin: 0.5rem 0;
198
+ }
199
+
200
+ .tw-rich-prose ul {
201
+ list-style: disc;
202
+ }
203
+
204
+ .tw-rich-prose ol {
205
+ list-style: decimal;
206
+ }
207
+
208
+ .tw-rich-prose li {
209
+ margin: 0.25rem 0;
210
+ }
211
+
212
+ .tw-rich-prose li > ul,
213
+ .tw-rich-prose li > ol {
214
+ margin: 0.125rem 0 0.125rem 0.25rem;
215
+ }
216
+
217
+ /* ── Horizontal rule ─────────────────────────────────────── */
218
+ .tw-rich-prose hr {
219
+ border: none;
220
+ border-top: 1px solid var(--color-primary-200);
221
+ margin: 1.25rem 0;
222
+ }
223
+
224
+ .dark .tw-rich-prose hr {
225
+ border-top-color: var(--color-primary-700);
226
+ }
227
+
228
+ /* ── Links ───────────────────────────────────────────────── */
229
+ .tw-rich-prose a {
230
+ color: var(--color-primary-600);
231
+ text-decoration: underline;
232
+ text-underline-offset: 2px;
233
+ }
234
+
235
+ .tw-rich-prose a:hover {
236
+ color: var(--color-primary-800);
237
+ }
238
+
239
+ .dark .tw-rich-prose a {
240
+ color: var(--color-primary-400);
241
+ }
242
+
243
+ .dark .tw-rich-prose a:hover {
244
+ color: var(--color-primary-200);
245
+ }
246
+
247
+ /* ── strong / em baseline ────────────────────────────────── */
248
+ .tw-rich-prose strong {
249
+ font-weight: 700;
250
+ }
251
+
252
+ .tw-rich-prose em {
253
+ font-style: italic;
254
+ }
255
+
256
+ /* ═══════════════════════════════════════════════════════════
257
+ RICH MODE — image rendering
258
+ ═══════════════════════════════════════════════════════════ */
259
+
260
+ /* Figure wrapper */
261
+ .tw-rich-img-wrap {
262
+ display: block;
263
+ margin: 0.875rem 0;
264
+ }
265
+
266
+ /* Actual image */
267
+ .tw-rich-img {
268
+ display: block;
269
+ max-width: 100%;
270
+ border-radius: 0.5rem;
271
+ box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
272
+ animation: tw-img-fade-in 0.4s ease-out both;
273
+ }
274
+
275
+ .dark .tw-rich-img {
276
+ box-shadow: 0 2px 8px rgb(0 0 0 / 0.3);
277
+ }
278
+
279
+ /* Error state overlay (hidden by default) */
280
+ .tw-rich-img-error {
281
+ display: none;
282
+ flex-direction: column;
283
+ align-items: center;
284
+ justify-content: center;
285
+ gap: 0.5rem;
286
+ padding: 1.5rem;
287
+ border-radius: 0.5rem;
288
+ background-color: var(--color-primary-100);
289
+ color: var(--color-primary-400);
290
+ font-size: 0.75rem;
291
+ font-style: normal;
292
+ text-align: center;
293
+ min-height: 80px;
294
+ max-width: 100%;
295
+ }
296
+
297
+ .dark .tw-rich-img-error {
298
+ background-color: var(--color-primary-800);
299
+ color: var(--color-primary-500);
300
+ }
301
+
302
+ /* Toggle error state via JS class added by the image error handler */
303
+ .tw-rich-img-wrap--error .tw-rich-img {
304
+ display: none;
305
+ }
306
+
307
+ .tw-rich-img-wrap--error .tw-rich-img-error {
308
+ display: flex;
309
+ }
@@ -0,0 +1,11 @@
1
+ /* OTPInput component styles */
2
+
3
+ @keyframes otp-pop {
4
+ 0% { transform: scale(1); }
5
+ 40% { transform: scale(1.12); }
6
+ 100% { transform: scale(1); }
7
+ }
8
+
9
+ .otp-pop {
10
+ animation: otp-pop 0.18s ease-out forwards;
11
+ }
@@ -0,0 +1,15 @@
1
+ /* SplitPanel component styles.
2
+ The component uses Tailwind v4 utilities directly; this file holds only
3
+ CSS that cannot be expressed as utilities (e.g. transition on data-* state).
4
+ */
5
+
6
+ /* Enforces that the panel container fills its parent when used without
7
+ an explicit width/height — matching the "100%" defaults in the props. */
8
+ [data-split-panel] {
9
+ box-sizing: border-box;
10
+ }
11
+
12
+ /* Ensure all pane children respect the flex layout. */
13
+ [data-split-pane-id] {
14
+ box-sizing: border-box;
15
+ }
@@ -1 +1,26 @@
1
- @import "../Dropdown/Dropdown.css";
1
+ :root {
2
+ --animate-dropdown-item-in: dropdown-item-in 200ms ease-out both;
3
+ --animate-dropdown-item-out: dropdown-item-out 150ms ease-in both;
4
+ --animate-dropdown-container-in: dropdown-container-in 150ms ease-out both;
5
+ --animate-dropdown-container-out: dropdown-container-out 120ms ease-in both;
6
+ }
7
+
8
+ @keyframes dropdown-item-in {
9
+ from { opacity: 0; transform: perspective(400px) rotateX(-50deg); transform-origin: top center; }
10
+ to { opacity: 1; transform: perspective(400px) rotateX(0deg); transform-origin: top center; }
11
+ }
12
+
13
+ @keyframes dropdown-item-out {
14
+ from { opacity: 1; transform: perspective(400px) rotateX(0deg); transform-origin: top center; }
15
+ to { opacity: 0; transform: perspective(400px) rotateX(-50deg); transform-origin: top center; }
16
+ }
17
+
18
+ @keyframes dropdown-container-in {
19
+ from { opacity: 0; transform: scaleY(0.96); transform-origin: top center; }
20
+ to { opacity: 1; transform: scaleY(1); transform-origin: top center; }
21
+ }
22
+
23
+ @keyframes dropdown-container-out {
24
+ from { opacity: 1; transform: scaleY(1); transform-origin: top center; }
25
+ to { opacity: 0; transform: scaleY(0.96); transform-origin: top center; }
26
+ }
@@ -0,0 +1 @@
1
+ /* Kbd component styles */
@@ -0,0 +1 @@
1
+ /* Rating component styles */