@widgetic/design-system 0.3.68 → 0.3.70
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/README.md +126 -454
- package/dist/components/CopyableHeader.svelte +7 -11
- package/dist/components/EmptyState.svelte +1 -1
- package/dist/components/WScrollArea.svelte +4 -4
- package/dist/components/debug-grid/DebugGrid.svelte +1 -1
- package/dist/components/ic/browser/BrowserInputController.svelte +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/modals/ActionModal.svelte +2 -2
- package/dist/components/modals/BaseModal.svelte +2 -2
- package/dist/components/modals/NewItemDialog.svelte +3 -3
- package/dist/components/modals/RenameDialog.svelte +3 -3
- package/dist/components/navigation/Breadcrumbs.svelte +9 -9
- package/dist/components/pdf/PDFViewer.svelte +2 -2
- package/dist/components/search-input/SearchInput.svelte +1 -6
- package/dist/components/search-input/index.d.ts +3 -14
- package/dist/components/search-input/index.js +1 -2
- package/dist/components/search-input/index2.d.ts +14 -0
- package/dist/components/shad-editor/README.md +18 -0
- package/dist/components/shad-editor/custom/code-extended.svelte +1 -1
- package/dist/components/shad-editor/custom/image-extended-component.svelte +1 -1
- package/dist/components/shad-editor/editor.css +8 -4
- package/dist/components/shad-editor/icons/highlighter.svelte +1 -1
- package/dist/components/shad-editor/icons/image.svelte +1 -1
- package/dist/components/shad-editor/icons/link.svelte +1 -1
- package/dist/components/shad-editor/icons/quickcolor.svelte +3 -3
- package/dist/components/shad-editor/icons/table.svelte +4 -4
- package/dist/components/shad-editor/icons/text.svelte +6 -6
- package/dist/components/shad-editor/icons/textalign.svelte +5 -5
- package/dist/components/shad-editor/icons/textcolor.svelte +1 -1
- package/dist/components/shad-editor/onedark.css +3 -0
- package/dist/components/shad-editor/shad-editor.svelte +1 -1
- package/dist/components/toast/ToasterModal.svelte +7 -7
- package/dist/components/ui/badge/badge.svelte +1 -1
- package/dist/components/ui/badge/badge.svelte.d.ts +2 -2
- package/dist/components/ui/button/button.svelte +1 -1
- package/dist/components/ui/button/button.svelte.d.ts +2 -2
- package/dist/components/ui/calendar/calendar-day.svelte +4 -4
- package/dist/components/ui/card/card.svelte +1 -1
- package/dist/components/ui/checkbox/checkbox.svelte +1 -1
- package/dist/components/ui/command/command-dialog.svelte +1 -1
- package/dist/components/ui/command/command-input.svelte +1 -1
- package/dist/components/ui/command/command-item.svelte +1 -1
- package/dist/components/ui/command/command-link-item.svelte +1 -1
- package/dist/components/ui/dialog/dialog-content.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +1 -1
- package/dist/components/ui/hover-card/hover-card-content.svelte +1 -1
- package/dist/components/ui/input/input.svelte +1 -1
- package/dist/components/ui/input-otp/input-otp.svelte +1 -1
- package/dist/components/ui/popover/popover-content.svelte +1 -1
- package/dist/components/ui/radio-group/radio-group-item.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-day.svelte +6 -6
- package/dist/components/ui/select/select-item.svelte +1 -1
- package/dist/components/ui/select/select-trigger.svelte +1 -1
- package/dist/components/ui/slider/slider.svelte +1 -1
- package/dist/components/ui/switch/switch.svelte +1 -1
- package/dist/components/ui/tabs/tabs-content.svelte +1 -1
- package/dist/components/ui/tabs/tabs-trigger.svelte +1 -1
- package/dist/components/ui/textarea/textarea.svelte +1 -1
- package/dist/components/ui/toggle/toggle.svelte +1 -1
- package/dist/components/ui/toggle/toggle.svelte.d.ts +2 -2
- package/dist/components/widget-system/Moveable.svelte +0 -1
- package/dist/styles/fonts.css +50 -39
- package/dist/styles/global.css +55 -36
- package/package.json +12 -11
- package/tailwind.config.ts +1 -6
|
@@ -26,16 +26,16 @@ export let element: HTMLElement | null = null;
|
|
|
26
26
|
<ScrollArea bind:ref={element}
|
|
27
27
|
class={(className ? className + ' ' : '') + "scroll-area-container w-full h-full " +
|
|
28
28
|
"widgetic-radius widgetic-colors select-text " +
|
|
29
|
-
"
|
|
29
|
+
"**:data-scroll-area-viewport:pr-(--scrollbar-width)!"}
|
|
30
30
|
style="{style} {scrollOutside ? `width: calc(100% + ${scrollbarWidth}px) !important;` : ''}
|
|
31
31
|
--scrollbar-width: {scrollbarWidth}px; --scrollbar-padding: {scrollbarWidth/4}px; "
|
|
32
32
|
{orientation}
|
|
33
33
|
{type}
|
|
34
34
|
{scrollHideDelay}
|
|
35
|
-
scrollbarYClasses={scrollbarYClasses + "flex w-[var(--scrollbar-width)]
|
|
36
|
-
"
|
|
35
|
+
scrollbarYClasses={scrollbarYClasses + "flex w-[var(--scrollbar-width)] p-(--scrollbar-padding)! " +
|
|
36
|
+
"bg-transparent! border-none select-none touch-none " +
|
|
37
37
|
"[&>div]:rounded-[var(--radius-pill)] [&>div]:cursor-pointer " +
|
|
38
|
-
"[&>div]:bg-[hsl(var(--grey1))] [&>div]:
|
|
38
|
+
"[&>div]:bg-[hsl(var(--grey1))] hover:[&>div]:bg-[hsl(var(--grey2))] " +
|
|
39
39
|
"[&>div]:transition-colors [&>div]:duration-250"}
|
|
40
40
|
>
|
|
41
41
|
<div class="actual-viewport {viewPortClass ? viewPortClass + ' ' : ''} absolute inset-0 z-[-1]" style="margin-right: {scrollbarWidth}px;">
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
{#if isDashboard && !isMobile}
|
|
164
164
|
<div class="grid-sidebar flex">
|
|
165
165
|
<div class="grid-sidebar-margin-left grid-margin-left" style="width: {marginWidth}px"></div>
|
|
166
|
-
<div class="grid-sidebar-content grid-column
|
|
166
|
+
<div class="grid-sidebar-content grid-column grow"></div>
|
|
167
167
|
<div class="grid-sidebar-margin-right grid-margin-right" style="width: {marginWidth}px"></div>
|
|
168
168
|
</div>
|
|
169
169
|
{/if}
|
|
@@ -333,7 +333,7 @@
|
|
|
333
333
|
<Tooltip.Content
|
|
334
334
|
side="right"
|
|
335
335
|
sideOffset={5}
|
|
336
|
-
class="bg-gray-900 text-white z-
|
|
336
|
+
class="bg-gray-900 text-white z-99999 overflow-hidden rounded-md px-3 py-1.5 text-sm shadow-md"
|
|
337
337
|
style="position: fixed; left: {mouseX + 20}px; top: {mouseY}px; z-index: 999999;"
|
|
338
338
|
>
|
|
339
339
|
<p class="text-sm">{header.helpText}</p>
|
|
@@ -12,7 +12,7 @@ export { default as Portal } from './modals/Portal.svelte';
|
|
|
12
12
|
export { default as RenameDialog } from './modals/RenameDialog.svelte';
|
|
13
13
|
export { Breadcrumbs, type BreadcrumbsProps } from './navigation';
|
|
14
14
|
export { default as PDFViewer } from './pdf/PDFViewer.svelte';
|
|
15
|
-
export {
|
|
15
|
+
export { SearchInput } from './search-input';
|
|
16
16
|
export { ShadEditor, type TipTapEditor, type TipTapEditorLevel } from './shad-editor';
|
|
17
17
|
export { ToasterModal, showToast } from './toast';
|
|
18
18
|
export * as Accordion from './ui/accordion';
|
package/dist/components/index.js
CHANGED
|
@@ -13,7 +13,7 @@ export { default as Portal } from './modals/Portal.svelte';
|
|
|
13
13
|
export { default as RenameDialog } from './modals/RenameDialog.svelte';
|
|
14
14
|
export { Breadcrumbs } from './navigation';
|
|
15
15
|
export { default as PDFViewer } from './pdf/PDFViewer.svelte';
|
|
16
|
-
export {
|
|
16
|
+
export { SearchInput } from './search-input';
|
|
17
17
|
export { ShadEditor } from './shad-editor';
|
|
18
18
|
export { ToasterModal, showToast } from './toast';
|
|
19
19
|
export * as Accordion from './ui/accordion';
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
147
147
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
|
148
148
|
<div
|
|
149
|
-
class="cancel-button modal-btn-secondary
|
|
149
|
+
class="cancel-button modal-btn-secondary h-[34px]! radius-pill widgetic-radius flex items-center justify-center px-4 py-2 cursor-pointer bg-[hsl(var(--grey1))] hover:bg-[hsl(var(--grey2))] text-[hsl(var(--grey7))] rounded-full"
|
|
150
150
|
on:click={handleClose}
|
|
151
151
|
role="button"
|
|
152
152
|
tabindex="0"
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
159
159
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
|
160
160
|
<div
|
|
161
|
-
class="{confirmVariant === 'attention' ? 'confirm-button modal-btn-attention
|
|
161
|
+
class="{confirmVariant === 'attention' ? 'confirm-button modal-btn-attention h-[34px]! radius-pill widgetic-radius flex items-center justify-center px-4 py-2 cursor-pointer bg-[hsl(var(--error))] hover:bg-[hsl(var(--error-dark))] text-white rounded-full' : 'confirm-button modal-btn-primary h-[34px]! radius-pill widgetic-radius flex items-center justify-center px-4 py-2 cursor-pointer bg-[hsl(var(--forest-green))] hover:bg-[hsl(var(--forest-green-dark))] text-white rounded-full'}"
|
|
162
162
|
on:click={handleConfirm}
|
|
163
163
|
role="button"
|
|
164
164
|
tabindex="0"
|
|
@@ -284,7 +284,7 @@
|
|
|
284
284
|
></div>
|
|
285
285
|
|
|
286
286
|
<!-- Close button -->
|
|
287
|
-
<div class="modal-close-bt-container absolute top-4 right-4 z-
|
|
287
|
+
<div class="modal-close-bt-container absolute top-4 right-4 z-1004" transition:fade={{ duration: transitionDuration, easing }}>
|
|
288
288
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
289
289
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
|
290
290
|
<div
|
|
@@ -294,7 +294,7 @@
|
|
|
294
294
|
role="button"
|
|
295
295
|
tabindex="0"
|
|
296
296
|
>
|
|
297
|
-
<IconX class="
|
|
297
|
+
<IconX class="w-[24px]! h-[24px]! text-white" />
|
|
298
298
|
</div>
|
|
299
299
|
</div>
|
|
300
300
|
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
}}
|
|
132
132
|
required
|
|
133
133
|
class="w-full h5 text-[24px] text-[hsl(var(--grey7))] text-center
|
|
134
|
-
bg-transparent border-none focus:outline-
|
|
134
|
+
bg-transparent border-none focus:outline-hidden focus:ring-0
|
|
135
135
|
placeholder:text-[24px] placeholder:text-[hsl(var(--grey3))]
|
|
136
136
|
{!isValid && hasAttemptedSubmit ? 'input-error' : ''}"
|
|
137
137
|
placeholder={placeholder}
|
|
@@ -149,14 +149,14 @@
|
|
|
149
149
|
<Button
|
|
150
150
|
type="button"
|
|
151
151
|
variant="secondary"
|
|
152
|
-
class="modal-btn-secondary
|
|
152
|
+
class="modal-btn-secondary rounded-[100px]! h-[34px]!"
|
|
153
153
|
onclick={handleClose}
|
|
154
154
|
>
|
|
155
155
|
{cancelLabel}
|
|
156
156
|
</Button>
|
|
157
157
|
<Button
|
|
158
158
|
type="submit"
|
|
159
|
-
class="modal-btn-primary
|
|
159
|
+
class="modal-btn-primary rounded-[100px]! h-[34px]!"
|
|
160
160
|
onclick={handleSubmit}
|
|
161
161
|
disabled={!isValid}
|
|
162
162
|
>
|
|
@@ -264,7 +264,7 @@
|
|
|
264
264
|
}}
|
|
265
265
|
required
|
|
266
266
|
class="w-full h5 text-[24px] text-[hsl(var(--grey7))] text-center
|
|
267
|
-
bg-transparent border-none focus:outline-
|
|
267
|
+
bg-transparent border-none focus:outline-hidden focus:ring-0
|
|
268
268
|
placeholder:text-[24px] placeholder:text-[hsl(var(--grey3))]
|
|
269
269
|
{!isValid && hasAttemptedSubmit ? 'input-error' : ''}"
|
|
270
270
|
maxlength={maxLength}
|
|
@@ -285,14 +285,14 @@
|
|
|
285
285
|
<Button
|
|
286
286
|
type="button"
|
|
287
287
|
variant="secondary"
|
|
288
|
-
class="modal-btn-secondary
|
|
288
|
+
class="modal-btn-secondary h-[34px]!"
|
|
289
289
|
onclick={handleClose}
|
|
290
290
|
>
|
|
291
291
|
{cancelLabel}
|
|
292
292
|
</Button>
|
|
293
293
|
<Button
|
|
294
294
|
type="submit"
|
|
295
|
-
class="modal-btn-primary
|
|
295
|
+
class="modal-btn-primary h-[34px]!"
|
|
296
296
|
onclick={handleRename}
|
|
297
297
|
disabled={!isValid}
|
|
298
298
|
>
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
>
|
|
183
183
|
<!-- NAVIGATION BUTTONS -->
|
|
184
184
|
{#if showNavigationButtons}
|
|
185
|
-
<div class="nav-buttons flex items-center
|
|
185
|
+
<div class="nav-buttons flex items-center shrink-0">
|
|
186
186
|
<!-- Left arrow -->
|
|
187
187
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
188
188
|
<div
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
<Breadcrumb.List class="inline-flex items-center min-w-0 breadcrumbs-list">
|
|
223
223
|
<div class="inline-flex items-center min-w-0 min-h-[24px]">
|
|
224
224
|
<!-- Root Breadcrumb Item -->
|
|
225
|
-
<Breadcrumb.Item class="
|
|
225
|
+
<Breadcrumb.Item class="shrink-0">
|
|
226
226
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
227
227
|
<span
|
|
228
228
|
role="link"
|
|
@@ -241,10 +241,10 @@
|
|
|
241
241
|
{#if !isLoading && currentPath.length > 0 && breadcrumbsPositioned}
|
|
242
242
|
{#if shouldShowEllipsis && currentPath.length > itemsToShow}
|
|
243
243
|
<!-- Breadcrumb Separator -->
|
|
244
|
-
<Breadcrumb.Separator class="h5 text-[hsl(var(--grey6))]
|
|
244
|
+
<Breadcrumb.Separator class="h5 text-[hsl(var(--grey6))] shrink-0">/</Breadcrumb.Separator>
|
|
245
245
|
|
|
246
246
|
<!-- Dropdown Menu for Ellipsis -->
|
|
247
|
-
<Breadcrumb.Item class="
|
|
247
|
+
<Breadcrumb.Item class="shrink-0">
|
|
248
248
|
<DropdownMenu.Root>
|
|
249
249
|
<DropdownMenu.Trigger class="flex items-center gap-1 cursor-pointer">
|
|
250
250
|
<span class="h5 text-[hsl(var(--grey6))]">...</span>
|
|
@@ -269,8 +269,8 @@
|
|
|
269
269
|
|
|
270
270
|
<!-- Always show last N segments based on available width -->
|
|
271
271
|
{#each currentPath.slice(-itemsToShow + 1) as _, index}
|
|
272
|
-
<Breadcrumb.Separator class="h5 text-[hsl(var(--grey6))]
|
|
273
|
-
<Breadcrumb.Item class="
|
|
272
|
+
<Breadcrumb.Separator class="h5 text-[hsl(var(--grey6))] shrink-0">/</Breadcrumb.Separator>
|
|
273
|
+
<Breadcrumb.Item class="shrink-0">
|
|
274
274
|
{#if index === itemsToShow - 2}
|
|
275
275
|
<span class="h5 text-[hsl(var(--grey3))]">
|
|
276
276
|
{currentPathNames[currentPath.length - 1]}
|
|
@@ -293,8 +293,8 @@
|
|
|
293
293
|
{/each}
|
|
294
294
|
{:else}
|
|
295
295
|
{#each currentPath as _, index}
|
|
296
|
-
<Breadcrumb.Separator class="h5 text-[hsl(var(--grey6))]
|
|
297
|
-
<Breadcrumb.Item class="
|
|
296
|
+
<Breadcrumb.Separator class="h5 text-[hsl(var(--grey6))] shrink-0">/</Breadcrumb.Separator>
|
|
297
|
+
<Breadcrumb.Item class="shrink-0">
|
|
298
298
|
{#if index === currentPath.length - 1}
|
|
299
299
|
<span class="h5 text-[hsl(var(--grey3))]">
|
|
300
300
|
{currentPathNames[index]}
|
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
</div>
|
|
324
324
|
|
|
325
325
|
{#if showDebugVisualizer}
|
|
326
|
-
<div class="absolute bottom-1 right-1 text-xs text-blue-600 bg-white px-1 rounded shadow">
|
|
326
|
+
<div class="absolute bottom-1 right-1 text-xs text-blue-600 bg-white px-1 rounded shadow-2xs">
|
|
327
327
|
Available width: {Math.round(availableWidth)}px
|
|
328
328
|
<br>
|
|
329
329
|
Items to show: {itemsToShow}
|
|
@@ -549,7 +549,7 @@
|
|
|
549
549
|
aria-label="Previous page"
|
|
550
550
|
>
|
|
551
551
|
<IconChevronLeft
|
|
552
|
-
class="
|
|
552
|
+
class="text-[hsl(var(--grey5))]! group-hover:text-[hsl(var(--grey7))]!"
|
|
553
553
|
style="width: 20px !important; height: 20px !important; min-width: 20px !important; min-height: 20px !important; max-width: 20px !important; max-height: 20px !important;"
|
|
554
554
|
/>
|
|
555
555
|
</button>
|
|
@@ -563,7 +563,7 @@
|
|
|
563
563
|
aria-label="Next page"
|
|
564
564
|
>
|
|
565
565
|
<IconChevronRight
|
|
566
|
-
class="
|
|
566
|
+
class="text-[hsl(var(--grey5))]! group-hover:text-[hsl(var(--grey7))]!"
|
|
567
567
|
style="width: 20px !important; height: 20px !important; min-width: 20px !important; min-height: 20px !important; max-width: 20px !important; max-height: 20px !important;"
|
|
568
568
|
/>
|
|
569
569
|
</button>
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
onKeydown(e);
|
|
80
80
|
}}
|
|
81
81
|
onpaste={onPaste}
|
|
82
|
-
class="w-full h-[38px] border-0 bg-transparent focus:outline-
|
|
82
|
+
class="w-full h-[38px] border-0 bg-transparent focus:outline-hidden focus:ring-0 focus-visible:ring-0 pl-9 pr-8 subtext
|
|
83
83
|
transition-all duration-300
|
|
84
84
|
{value ? 'text-[hsl(var(--grey7))]' : 'text-[hsl(var(--grey3))] placeholder:text-[hsl(var(--grey3))] placeholder:transition-colors placeholder:duration-300 group-hover:text-[hsl(var(--grey7))] group-hover:placeholder:text-[hsl(var(--grey7))] group-focus-within:text-[hsl(var(--grey7))] group-focus-within:placeholder:text-[hsl(var(--grey7)))'}
|
|
85
85
|
{inputClass}"
|
|
@@ -104,11 +104,6 @@
|
|
|
104
104
|
transition: color 300ms ease, background-color 300ms ease, border-color 300ms ease !important;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
input::-moz-placeholder {
|
|
108
|
-
-moz-transition: color 300ms ease !important;
|
|
109
|
-
transition: color 300ms ease !important;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
107
|
input::placeholder {
|
|
113
108
|
transition: color 300ms ease !important;
|
|
114
109
|
}
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
placeholder?: string;
|
|
5
|
-
value?: string;
|
|
6
|
-
onInput?: (event: Event) => Promise<void> | void;
|
|
7
|
-
onKeydown?: (event: KeyboardEvent) => void;
|
|
8
|
-
onClear?: () => void;
|
|
9
|
-
onPaste?: (event: ClipboardEvent) => void;
|
|
10
|
-
containerClass?: string;
|
|
11
|
-
inputClass?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export default class SearchInput extends SvelteComponent<SearchInputProps> {}
|
|
1
|
+
import SearchInput from './SearchInput.svelte';
|
|
2
|
+
export { SearchInput };
|
|
3
|
+
export default SearchInput;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SvelteComponent } from 'svelte';
|
|
2
|
+
|
|
3
|
+
export interface SearchInputProps {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
onInput?: (event: Event) => Promise<void> | void;
|
|
7
|
+
onKeydown?: (event: KeyboardEvent) => void;
|
|
8
|
+
onClear?: () => void;
|
|
9
|
+
onPaste?: (event: ClipboardEvent) => void;
|
|
10
|
+
containerClass?: string;
|
|
11
|
+
inputClass?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default class SearchInput extends SvelteComponent<SearchInputProps> {}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# ShadEditor Component
|
|
2
|
+
|
|
3
|
+
This directory contains the Svelte components for a rich text editor based on Tiptap and styled with shadcn-svelte UI elements.
|
|
4
|
+
|
|
5
|
+
## Origin
|
|
6
|
+
|
|
7
|
+
The code was originally scaffolded using version `0.0.7` of the now-deprecated `shadeditor` CLI tool.
|
|
8
|
+
|
|
9
|
+
* Original (deprecated) npm package: [https://www.npmjs.com/package/shadeditor](https://www.npmjs.com/package/shadeditor)
|
|
10
|
+
* The author appears to have continued development under a new name/project called "Edra": [https://edra.tsuzat.com/](https://edra.tsuzat.com/)
|
|
11
|
+
|
|
12
|
+
## Current Status
|
|
13
|
+
|
|
14
|
+
The components in this directory have been adapted to work within the Widgetic Design System after its migration to **Tailwind CSS v4**.
|
|
15
|
+
|
|
16
|
+
**Important:** Do not attempt to update or reinstall this component using the original `shadeditor` CLI (`npx shadeditor init`) or the new one from edra, as it is designed for Tailwind v3 and will likely break the current Tailwind v4 configuration and component adaptations.
|
|
17
|
+
|
|
18
|
+
Use the component as it exists within this design system project.
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
'absolute left-2 top-2 h-4 rounded px-1 py-2 text-xs capitalize text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100'
|
|
44
44
|
})}
|
|
45
45
|
>{defaultLanguage}
|
|
46
|
-
<ChevronDown class="
|
|
46
|
+
<ChevronDown class="size-3!" />
|
|
47
47
|
</DropdownMenu.Trigger>
|
|
48
48
|
<DropdownMenu.Content class="h-60 w-40 overflow-auto" contenteditable="false">
|
|
49
49
|
{#each languages as language}
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
<input
|
|
132
132
|
value={node.attrs.title}
|
|
133
133
|
type="text"
|
|
134
|
-
class="my-1 w-full bg-transparent text-center text-sm text-muted-foreground outline-
|
|
134
|
+
class="my-1 w-full bg-transparent text-center text-sm text-muted-foreground outline-hidden"
|
|
135
135
|
onchange={(e) => {
|
|
136
136
|
if (e.target === null) return;
|
|
137
137
|
//@ts-ignore
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
/* @config "../../../../tailwind.config.ts"; */
|
|
2
|
+
@reference "../../styles/global.css";
|
|
3
|
+
|
|
1
4
|
.tiptap :where(p):not(:where([class~='not-prose'], [class~='not-prose'] *)) {
|
|
2
5
|
margin-top: 0 !important;
|
|
3
6
|
margin-bottom: 0 !important;
|
|
4
7
|
}
|
|
5
8
|
|
|
6
9
|
.tiptap code:not(pre code) {
|
|
7
|
-
/* Remove the before and after pseudo elements */
|
|
8
|
-
@apply rounded border bg-muted/50 p-1 before:content-[''] after:content-[''];
|
|
10
|
+
/* Remove the before and after pseudo elements, replace rounded with rounded-sm */
|
|
11
|
+
@apply rounded-sm border bg-muted/50 p-1 before:content-[''] after:content-[''];
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
.tiptap blockquote p {
|
|
@@ -54,7 +57,7 @@ ul[data-type='taskList'] li[data-checked='true'] div {
|
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
input[type='checkbox'] {
|
|
57
|
-
@apply size-4 cursor-pointer rounded
|
|
60
|
+
@apply !size-4 !cursor-pointer !rounded-sm;
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
ul[data-type='taskList'] ul[data-type='taskList'] {
|
|
@@ -67,7 +70,8 @@ ul[data-type='taskList'] ul[data-type='taskList'] {
|
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
.color::before {
|
|
70
|
-
|
|
73
|
+
/* Replace rounded with rounded-md */
|
|
74
|
+
@apply mb-[0.15rem] mr-[0.1rem] inline-block size-[1rem] rounded-md border border-muted align-middle;
|
|
71
75
|
background-color: var(--color);
|
|
72
76
|
content: ' ';
|
|
73
77
|
}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
onclick={() => editor.chain().focus()}
|
|
31
31
|
>
|
|
32
32
|
<Highlighter />
|
|
33
|
-
<ChevronDown class="
|
|
33
|
+
<ChevronDown class="size-3! text-muted-foreground" />
|
|
34
34
|
</Button>
|
|
35
35
|
</Popover.Trigger>
|
|
36
36
|
<Popover.Content class="bg-popover shadow-lg *:my-2">
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<Popover.Trigger>
|
|
19
19
|
<Button variant="ghost" size="sm" class="h-8">
|
|
20
20
|
<Image />
|
|
21
|
-
<ChevronDown class="
|
|
21
|
+
<ChevronDown class="size-3! text-muted-foreground" />
|
|
22
22
|
</Button>
|
|
23
23
|
</Popover.Trigger>
|
|
24
24
|
<Popover.Content class="bg-popover shadow-lg *:my-2">
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
class={cn('h-8', editor.isActive('link') && 'bg-muted')}
|
|
32
32
|
>
|
|
33
33
|
<Link />
|
|
34
|
-
<ChevronDown class="
|
|
34
|
+
<ChevronDown class="size-3! text-muted-foreground" />
|
|
35
35
|
</Button>
|
|
36
36
|
</Popover.Trigger>
|
|
37
37
|
<Popover.Content class="bg-popover shadow-lg *:my-2">
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
<DropdownMenu.Trigger>
|
|
31
31
|
<Button variant="ghost" size="sm" class="h-8" style={`color: ${currentColor}`}>
|
|
32
32
|
A
|
|
33
|
-
<ChevronDown class="
|
|
33
|
+
<ChevronDown class="size-3!" />
|
|
34
34
|
</Button>
|
|
35
35
|
</DropdownMenu.Trigger>
|
|
36
36
|
<DropdownMenu.Content class="max-h-[25rem] w-40 overflow-auto">
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
>
|
|
57
57
|
<span>{color.label}</span>
|
|
58
58
|
{#if editor.isActive('textStyle', { color: color.value })}
|
|
59
|
-
<Check class="absolute right-2
|
|
59
|
+
<Check class="absolute right-2 size-3! text-muted-foreground" />
|
|
60
60
|
{/if}
|
|
61
61
|
</DropdownMenu.Item>
|
|
62
62
|
{/each}
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
>
|
|
81
81
|
<span>{color.label}</span>
|
|
82
82
|
{#if editor.isActive('highlight', { color: color.value })}
|
|
83
|
-
<Check class="absolute right-2
|
|
83
|
+
<Check class="absolute right-2 size-3! text-muted-foreground" />
|
|
84
84
|
{/if}
|
|
85
85
|
</DropdownMenu.Item>
|
|
86
86
|
{/each}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<DropdownMenu.Trigger>
|
|
16
16
|
<Button variant="ghost" size="sm" class="h-8">
|
|
17
17
|
<Table />
|
|
18
|
-
<ChevronDown class="
|
|
18
|
+
<ChevronDown class="size-3!" />
|
|
19
19
|
</Button>
|
|
20
20
|
</DropdownMenu.Trigger>
|
|
21
21
|
<DropdownMenu.Content class="max-h-[25rem] w-40 overflow-auto">
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
</DropdownMenu.Item>
|
|
71
71
|
<DropdownMenu.Item
|
|
72
72
|
onclick={() => editor.chain().focus().deleteRow().run()}
|
|
73
|
-
class="text-destructive hover:text-foreground data-
|
|
73
|
+
class="text-destructive hover:text-foreground data-highlighted:bg-destructive"
|
|
74
74
|
>
|
|
75
75
|
<span>Delete Row</span>
|
|
76
76
|
</DropdownMenu.Item>
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
</DropdownMenu.Item>
|
|
90
90
|
<DropdownMenu.Item
|
|
91
91
|
onclick={() => editor.chain().focus().deleteColumn().run()}
|
|
92
|
-
class="text-destructive hover:text-foreground data-
|
|
92
|
+
class="text-destructive hover:text-foreground data-highlighted:bg-destructive"
|
|
93
93
|
>
|
|
94
94
|
<span>Delete</span>
|
|
95
95
|
</DropdownMenu.Item>
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
</DropdownMenu.Sub>
|
|
98
98
|
<DropdownMenu.Item
|
|
99
99
|
onclick={() => editor.chain().focus().deleteTable().run()}
|
|
100
|
-
class="text-destructive hover:text-foreground data-
|
|
100
|
+
class="text-destructive hover:text-foreground data-highlighted:bg-destructive"
|
|
101
101
|
>
|
|
102
102
|
<span>Delete</span>
|
|
103
103
|
</DropdownMenu.Item>
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
{:else}
|
|
37
37
|
<Minus />
|
|
38
38
|
{/if}
|
|
39
|
-
<ChevronDown class="
|
|
39
|
+
<ChevronDown class="size-3! text-muted-foreground" />
|
|
40
40
|
</Button>
|
|
41
41
|
</DropdownMenu.Trigger>
|
|
42
42
|
<DropdownMenu.Content class="w-56">
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
>
|
|
47
47
|
<Heading1 /> Heading 1
|
|
48
48
|
{#if editor.isActive('heading', { level: 1 })}
|
|
49
|
-
<Check class="absolute right-2
|
|
49
|
+
<Check class="absolute right-2 size-3! text-muted-foreground" />
|
|
50
50
|
{/if}
|
|
51
51
|
</DropdownMenu.Item>
|
|
52
52
|
<DropdownMenu.Item
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
>
|
|
56
56
|
<Heading2 /> Heading 2
|
|
57
57
|
{#if editor.isActive('heading', { level: 2 })}
|
|
58
|
-
<Check class="absolute right-2
|
|
58
|
+
<Check class="absolute right-2 size-3! text-muted-foreground" />
|
|
59
59
|
{/if}
|
|
60
60
|
</DropdownMenu.Item>
|
|
61
61
|
<DropdownMenu.Item
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
>
|
|
65
65
|
<Heading3 /> Heading 3
|
|
66
66
|
{#if editor.isActive('heading', { level: 3 })}
|
|
67
|
-
<Check class="absolute right-2
|
|
67
|
+
<Check class="absolute right-2 size-3! text-muted-foreground" />
|
|
68
68
|
{/if}
|
|
69
69
|
</DropdownMenu.Item>
|
|
70
70
|
<DropdownMenu.Item
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
>
|
|
74
74
|
<Pilcrow /> Paragraph
|
|
75
75
|
{#if editor.isActive('paragraph')}
|
|
76
|
-
<Check class="absolute right-2
|
|
76
|
+
<Check class="absolute right-2 size-3! text-muted-foreground" />
|
|
77
77
|
{/if}
|
|
78
78
|
</DropdownMenu.Item>
|
|
79
79
|
<DropdownMenu.Item
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
>
|
|
83
83
|
<FileJson /> Code Block
|
|
84
84
|
{#if editor.isActive('codeBlock')}
|
|
85
|
-
<Check class="absolute right-2
|
|
85
|
+
<Check class="absolute right-2 size-3! text-muted-foreground" />
|
|
86
86
|
{/if}
|
|
87
87
|
</DropdownMenu.Item>
|
|
88
88
|
</DropdownMenu.Content>
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
{:else}
|
|
33
33
|
<AlignLeft />
|
|
34
34
|
{/if}
|
|
35
|
-
<ChevronDown class="
|
|
35
|
+
<ChevronDown class="size-3! text-muted-foreground" />
|
|
36
36
|
</Button>
|
|
37
37
|
</DropdownMenu.Trigger>
|
|
38
38
|
<DropdownMenu.Content class="w-56">
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
>
|
|
43
43
|
<AlignLeft /> Align Left
|
|
44
44
|
{#if editor.isActive({ textAlign: 'left' })}
|
|
45
|
-
<Check class="absolute right-2
|
|
45
|
+
<Check class="absolute right-2 size-3! text-muted-foreground" />
|
|
46
46
|
{/if}
|
|
47
47
|
</DropdownMenu.Item>
|
|
48
48
|
<DropdownMenu.Item
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
>
|
|
52
52
|
<AlignCenter /> Align Center
|
|
53
53
|
{#if editor.isActive({ textAlign: 'center' })}
|
|
54
|
-
<Check class="absolute right-2
|
|
54
|
+
<Check class="absolute right-2 size-3! text-muted-foreground" />
|
|
55
55
|
{/if}
|
|
56
56
|
</DropdownMenu.Item>
|
|
57
57
|
<DropdownMenu.Item
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
>
|
|
61
61
|
<AlignRight /> Align Right
|
|
62
62
|
{#if editor.isActive({ textAlign: 'right' })}
|
|
63
|
-
<Check class="absolute right-2
|
|
63
|
+
<Check class="absolute right-2 size-3! text-muted-foreground" />
|
|
64
64
|
{/if}
|
|
65
65
|
</DropdownMenu.Item>
|
|
66
66
|
<DropdownMenu.Item
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
>
|
|
70
70
|
<AlignJustify /> Align Justify
|
|
71
71
|
{#if editor.isActive({ textAlign: 'justify' })}
|
|
72
|
-
<Check class="absolute right-2
|
|
72
|
+
<Check class="absolute right-2 size-3! text-muted-foreground" />
|
|
73
73
|
{/if}
|
|
74
74
|
</DropdownMenu.Item>
|
|
75
75
|
</DropdownMenu.Content>
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
onclick={() => editor.chain().focus()}
|
|
31
31
|
>
|
|
32
32
|
<Baseline />
|
|
33
|
-
<ChevronDown class="
|
|
33
|
+
<ChevronDown class="size-3! text-muted-foreground" />
|
|
34
34
|
</Button>
|
|
35
35
|
</Popover.Trigger>
|
|
36
36
|
<Popover.Content class="bg-popover shadow-lg *:my-2">
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
editorProps: {
|
|
63
63
|
attributes: {
|
|
64
64
|
class:
|
|
65
|
-
'm-auto p-2 focus:outline-
|
|
65
|
+
'm-auto p-2 focus:outline-hidden flex-1 prose text-foreground min-w-full max-h-full overflow-auto dark:prose-invert *:my-2'
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
extensions: [
|