@widgetic/design-system 0.3.68 → 0.3.71
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 +11 -13
- package/dist/components/EmptyState.svelte +4 -2
- package/dist/components/EmptyState.svelte.d.ts +2 -1
- package/dist/components/PasswordInput.svelte +5 -1
- package/dist/components/WScrollArea.svelte +3 -3
- 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/BaseModal.svelte +1 -1
- package/dist/components/modals/NewItemDialog.svelte +1 -1
- package/dist/components/modals/RenameDialog.svelte +7 -6
- package/dist/components/navigation/Breadcrumbs.svelte +9 -9
- package/dist/components/pdf/PDFViewer.svelte +6 -16
- package/dist/components/search-input/SearchInput.svelte +3 -8
- 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/image-extended-component.svelte +1 -1
- package/dist/components/shad-editor/editor.css +8 -4
- package/dist/components/shad-editor/icons/table.svelte +3 -3
- package/dist/components/shad-editor/icons/text.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 +14 -10
- package/dist/components/ui/accordion/index.d.ts +1 -1
- 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/calendar/calendar.svelte.d.ts +1 -1
- package/dist/components/ui/card/card.svelte +1 -1
- package/dist/components/ui/checkbox/checkbox.svelte +1 -1
- package/dist/components/ui/collapsible/index.d.ts +1 -1
- package/dist/components/ui/command/command-dialog.svelte +1 -1
- package/dist/components/ui/command/command-dialog.svelte.d.ts +1 -1
- package/dist/components/ui/command/command-input.svelte +1 -1
- package/dist/components/ui/command/command-input.svelte.d.ts +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/command/command.svelte.d.ts +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/dropdown-menu/index.d.ts +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/input.svelte.d.ts +1 -1
- package/dist/components/ui/input-otp/input-otp.svelte +1 -1
- package/dist/components/ui/input-otp/input-otp.svelte.d.ts +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/radio-group/radio-group.svelte.d.ts +1 -1
- package/dist/components/ui/range-calendar/range-calendar-day.svelte +6 -6
- package/dist/components/ui/range-calendar/range-calendar.svelte.d.ts +1 -1
- package/dist/components/ui/select/index.d.ts +1 -1
- 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/slider/slider.svelte.d.ts +1 -1
- package/dist/components/ui/switch/switch.svelte +1 -1
- package/dist/components/ui/tabs/index.d.ts +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/textarea/textarea.svelte.d.ts +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/ui/toggle-group/toggle-group-item.svelte.d.ts +1 -1
- package/dist/components/ui/toggle-group/toggle-group.svelte.d.ts +1 -1
- package/dist/components/widget-system/Moveable.svelte +0 -1
- package/dist/icons/eye-off.svg +1 -0
- package/dist/icons/eye.svg +1 -0
- package/dist/styles/fonts.css +50 -39
- package/dist/styles/global.css +55 -36
- package/package.json +34 -33
- package/tailwind.config.ts +1 -6
|
@@ -30,8 +30,10 @@ const dispatch = createEventDispatcher();
|
|
|
30
30
|
/**
|
|
31
31
|
* COMPONENT IMPORTS
|
|
32
32
|
*/
|
|
33
|
-
import { toast, Button, Tooltip, Portal } from '@widgetic/design-system/components';
|
|
34
|
-
import {
|
|
33
|
+
// import { toast, Button, Tooltip, Portal } from '@widgetic/design-system/components';
|
|
34
|
+
import { toast, Button, Tooltip, Portal } from './';
|
|
35
|
+
// import { IconCopy, IconHelp } from '@widgetic/design-system/icons';
|
|
36
|
+
import { IconCopy, IconHelp } from '../icons';
|
|
35
37
|
|
|
36
38
|
/**
|
|
37
39
|
* COMPONENT PROPS
|
|
@@ -189,7 +191,7 @@ function showToast(type: 'success' | 'error', message: string, options = {}) {
|
|
|
189
191
|
{#if showHelp && helpUrl}
|
|
190
192
|
<Tooltip.Provider>
|
|
191
193
|
<Tooltip.Root open={showHelpTooltip}>
|
|
192
|
-
<Tooltip.Trigger class="focus:outline-
|
|
194
|
+
<Tooltip.Trigger class="focus:outline-hidden">
|
|
193
195
|
<a
|
|
194
196
|
href={helpUrl}
|
|
195
197
|
target="_blank"
|
|
@@ -218,7 +220,7 @@ function showToast(type: 'success' | 'error', message: string, options = {}) {
|
|
|
218
220
|
<Tooltip.Content
|
|
219
221
|
side="right"
|
|
220
222
|
sideOffset={5}
|
|
221
|
-
class="bg-[hsl(var(--dark))] text-white z-
|
|
223
|
+
class="bg-[hsl(var(--dark))] text-white z-200000 overflow-hidden rounded-md px-2 py-1.5 shadow-md widgetic-colors widgetic-radius"
|
|
222
224
|
>
|
|
223
225
|
<p class="caption text-white">{helpText}</p>
|
|
224
226
|
</Tooltip.Content>
|
|
@@ -231,7 +233,7 @@ function showToast(type: 'success' | 'error', message: string, options = {}) {
|
|
|
231
233
|
{#if showStandaloneCopyButton}
|
|
232
234
|
<Tooltip.Provider>
|
|
233
235
|
<Tooltip.Root open={showCopyTooltip}>
|
|
234
|
-
<Tooltip.Trigger class="focus:outline-
|
|
236
|
+
<Tooltip.Trigger class="focus:outline-hidden">
|
|
235
237
|
<Button
|
|
236
238
|
variant="default"
|
|
237
239
|
class="h-9 w-6 {headerBackgroundColor ? headerBackgroundColor + ' text-[hsl(var(--grey7))]' : buttonClass || 'bg-[hsl(var(--dark))] hover:bg-white text-white rounded-full'} flex items-center justify-center active:scale-95 transition-transform duration-150"
|
|
@@ -256,7 +258,7 @@ function showToast(type: 'success' | 'error', message: string, options = {}) {
|
|
|
256
258
|
<Tooltip.Content
|
|
257
259
|
side="left"
|
|
258
260
|
sideOffset={5}
|
|
259
|
-
class="bg-[hsl(var(--dark))] text-white z-
|
|
261
|
+
class="bg-[hsl(var(--dark))] text-white z-200000 overflow-hidden rounded-md px-3 py-1.5 shadow-md widgetic-colors widgetic-radius"
|
|
260
262
|
>
|
|
261
263
|
<p class="caption text-white">{standaloneCopyButtonText}</p>
|
|
262
264
|
</Tooltip.Content>
|
|
@@ -267,7 +269,7 @@ function showToast(type: 'success' | 'error', message: string, options = {}) {
|
|
|
267
269
|
{:else}
|
|
268
270
|
<Tooltip.Provider>
|
|
269
271
|
<Tooltip.Root open={showCopyTooltip}>
|
|
270
|
-
<Tooltip.Trigger class="focus:outline-
|
|
272
|
+
<Tooltip.Trigger class="focus:outline-hidden">
|
|
271
273
|
<Button
|
|
272
274
|
variant="ghost"
|
|
273
275
|
size="icon"
|
|
@@ -294,7 +296,7 @@ function showToast(type: 'success' | 'error', message: string, options = {}) {
|
|
|
294
296
|
<Tooltip.Content
|
|
295
297
|
side="left"
|
|
296
298
|
sideOffset={5}
|
|
297
|
-
class="bg-[hsl(var(--dark))] text-white z-
|
|
299
|
+
class="bg-[hsl(var(--dark))] text-white z-200000 overflow-hidden rounded-md px-3 py-1.5 shadow-md widgetic-colors widgetic-radius"
|
|
298
300
|
>
|
|
299
301
|
<p class="caption text-white">{standaloneCopyButtonText}</p>
|
|
300
302
|
</Tooltip.Content>
|
|
@@ -339,15 +341,11 @@ function showToast(type: 'success' | 'error', message: string, options = {}) {
|
|
|
339
341
|
.copyable-content-area {
|
|
340
342
|
-webkit-user-select: text !important;
|
|
341
343
|
-moz-user-select: text !important;
|
|
344
|
+
-ms-user-select: text !important;
|
|
342
345
|
user-select: text !important;
|
|
343
346
|
overflow-y: auto !important;
|
|
344
347
|
}
|
|
345
348
|
|
|
346
|
-
.copyable-content-area::-moz-selection {
|
|
347
|
-
background-color: rgba(59, 130, 246, 0.2) !important;
|
|
348
|
-
color: inherit !important;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
349
|
.copyable-content-area::selection {
|
|
352
350
|
background-color: rgba(59, 130, 246, 0.2) !important;
|
|
353
351
|
color: inherit !important;
|
|
@@ -11,8 +11,10 @@
|
|
|
11
11
|
* - Responsive: hides icon when space is limited
|
|
12
12
|
-->
|
|
13
13
|
<script lang="ts">
|
|
14
|
-
import { IconExclamationCircle } from '@widgetic/design-system/icons';
|
|
15
14
|
import { onMount } from 'svelte';
|
|
15
|
+
|
|
16
|
+
// import { IconExclamationCircle } from '@widgetic/design-system/icons';
|
|
17
|
+
import { IconExclamationCircle } from '../icons';
|
|
16
18
|
|
|
17
19
|
/**
|
|
18
20
|
* Component Props
|
|
@@ -121,7 +123,7 @@
|
|
|
121
123
|
|
|
122
124
|
/* Icon container to prevent scaling */
|
|
123
125
|
.icon-container {
|
|
124
|
-
|
|
126
|
+
shrink: 0;
|
|
125
127
|
width: 24px;
|
|
126
128
|
height: 24px;
|
|
127
129
|
display: flex;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IconExclamationCircle } from '../icons';
|
|
1
2
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
3
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
4
|
$$bindings?: Bindings;
|
|
@@ -26,7 +27,7 @@ declare const EmptyState: $$__sveltets_2_IsomorphicComponent<{
|
|
|
26
27
|
showIcon?: boolean;
|
|
27
28
|
iconColor?: string;
|
|
28
29
|
textColor?: string;
|
|
29
|
-
icon?:
|
|
30
|
+
icon?: typeof IconExclamationCircle;
|
|
30
31
|
}, {
|
|
31
32
|
[evt: string]: CustomEvent<any>;
|
|
32
33
|
}, {
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
// SHADCN Imports
|
|
6
6
|
import { Input } from './ui/input';
|
|
7
7
|
|
|
8
|
+
// Import icon URLs
|
|
9
|
+
import eyeIconUrl from '../icons/eye.svg?url';
|
|
10
|
+
import eyeOffIconUrl from '../icons/eye-off.svg?url';
|
|
11
|
+
|
|
8
12
|
// External Props
|
|
9
13
|
export let value = '';
|
|
10
14
|
export let placeholder = 'Enter password';
|
|
@@ -37,7 +41,7 @@
|
|
|
37
41
|
on:click={() => showPassword = !showPassword}
|
|
38
42
|
>
|
|
39
43
|
<img
|
|
40
|
-
src={showPassword ?
|
|
44
|
+
src={showPassword ? eyeOffIconUrl : eyeIconUrl}
|
|
41
45
|
alt={showPassword ? 'Hide password' : 'Show password'}
|
|
42
46
|
class="w-5 h-5"
|
|
43
47
|
/>
|
|
@@ -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)] !p-
|
|
35
|
+
scrollbarYClasses={scrollbarYClasses + "flex w-[var(--scrollbar-width)] !p-(--scrollbar-padding) " +
|
|
36
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';
|
|
@@ -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
|
|
@@ -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}
|
|
@@ -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}
|
|
@@ -282,16 +282,17 @@
|
|
|
282
282
|
|
|
283
283
|
<!-- Buttons Container -->
|
|
284
284
|
<div class="buttons-container flex justify-center gap-4">
|
|
285
|
+
<!-- Cancel Button -->
|
|
286
|
+
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
|
285
287
|
<Button
|
|
286
|
-
|
|
287
|
-
variant="secondary"
|
|
288
|
-
class="modal-btn-secondary !h-[34px]"
|
|
288
|
+
class="modal-btn-secondary !h-[34px]"
|
|
289
289
|
onclick={handleClose}
|
|
290
290
|
>
|
|
291
291
|
{cancelLabel}
|
|
292
292
|
</Button>
|
|
293
|
-
|
|
294
|
-
|
|
293
|
+
|
|
294
|
+
<!-- Confirm Button -->
|
|
295
|
+
<Button
|
|
295
296
|
class="modal-btn-primary !h-[34px]"
|
|
296
297
|
onclick={handleRename}
|
|
297
298
|
disabled={!isValid}
|
|
@@ -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}
|
|
@@ -542,29 +542,19 @@
|
|
|
542
542
|
<!-- Page Navigation Bar -->
|
|
543
543
|
<div class="page-navigation-bar flex items-center justify-center h-[54px] widgetic-colors border-b border-[hsl(var(--grey2))] w-full">
|
|
544
544
|
<div class="flex items-center gap-3 w-full max-w-[200px] justify-between px-0">
|
|
545
|
-
<button
|
|
546
|
-
|
|
547
|
-
onclick={onPrevPage}
|
|
548
|
-
disabled={pageNum <= 1}
|
|
549
|
-
aria-label="Previous page"
|
|
550
|
-
>
|
|
551
|
-
<IconChevronLeft
|
|
545
|
+
<button class="pdf-nav-button h-9 w-9 flex items-center justify-center rounded-small bg-white border-[hsl(var(--grey2))] transition-colors group disabled:cursor-not-allowed" on:click={onPrevPage} disabled={pageNum <= 1}>
|
|
546
|
+
<IconChevronLeft
|
|
552
547
|
class="!text-[hsl(var(--grey5))] group-hover:!text-[hsl(var(--grey7))]"
|
|
553
|
-
style="
|
|
548
|
+
style="height: 20px !important; min-width: 20px !important; max-width: 20px !important; max-height: 20px !important;"
|
|
554
549
|
/>
|
|
555
550
|
</button>
|
|
556
551
|
|
|
557
552
|
<span class="subtext text-[hsl(var(--grey7))]">Page {pageNum} of {pageCount || '?'}</span>
|
|
558
553
|
|
|
559
|
-
<button
|
|
560
|
-
|
|
561
|
-
onclick={onNextPage}
|
|
562
|
-
disabled={pageNum >= pageCount}
|
|
563
|
-
aria-label="Next page"
|
|
564
|
-
>
|
|
565
|
-
<IconChevronRight
|
|
554
|
+
<button class="pdf-nav-button h-9 w-9 flex items-center justify-center rounded-small bg-white border-[hsl(var(--grey2))] transition-colors group disabled:cursor-not-allowed" on:click={onNextPage} disabled={pageNum >= pageCount}>
|
|
555
|
+
<IconChevronRight
|
|
566
556
|
class="!text-[hsl(var(--grey5))] group-hover:!text-[hsl(var(--grey7))]"
|
|
567
|
-
style="
|
|
557
|
+
style="height: 20px !important; min-width: 20px !important; max-width: 20px !important; max-height: 20px !important;"
|
|
568
558
|
/>
|
|
569
559
|
</button>
|
|
570
560
|
</div>
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* - Uses Widgetic design system styling
|
|
11
11
|
-->
|
|
12
12
|
<script lang="ts">
|
|
13
|
-
import { X, IconSearch } from '@widgetic/design-system/icons';
|
|
14
|
-
|
|
13
|
+
// import { X, IconSearch } from '@widgetic/design-system/icons';
|
|
14
|
+
import { X, IconSearch } from '../../icons';
|
|
15
15
|
/**
|
|
16
16
|
* Placeholder text for the search input
|
|
17
17
|
*/
|
|
@@ -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.
|
|
@@ -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
|
}
|
|
@@ -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>
|
|
@@ -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: [
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { toast, Toaster } from '../ui/sonner';
|
|
4
4
|
|
|
5
5
|
// Import Icons from Icons Folder
|
|
6
|
-
import
|
|
7
|
-
import Checked from '../../icons/
|
|
6
|
+
import Exclamation from '../../icons/Exclamation.svelte';
|
|
7
|
+
import Checked from '../../icons/Checked.svelte';
|
|
8
8
|
|
|
9
9
|
// Import Toast Types directly from the svelte-sonner module
|
|
10
10
|
// import type { ToastTypes } from 'svelte-sonner';
|
|
@@ -50,27 +50,34 @@ export function showToast(type: string = 'success', title: string, options: any
|
|
|
50
50
|
const duration = options?.duration || defaultDuration;
|
|
51
51
|
|
|
52
52
|
// set close icon - not working !!!
|
|
53
|
-
options.closeIcon =
|
|
53
|
+
options.closeIcon = Exclamation;
|
|
54
54
|
|
|
55
55
|
// Get the title color from the options or use the default color
|
|
56
56
|
const titleColor = type === 'success' ? '--grey7' : type === 'error' ? '--error' : '--dark';
|
|
57
57
|
|
|
58
58
|
// set icon depending on the type of toast
|
|
59
|
-
if(type === 'error') options.icon =
|
|
59
|
+
if(type === 'error') options.icon = Exclamation;
|
|
60
60
|
if(type === 'success') options.icon = Checked;
|
|
61
61
|
|
|
62
62
|
// set icon background fill color
|
|
63
63
|
if(type === 'success') options.iconBgFillColor = '--icon-success';
|
|
64
|
-
if(type === 'error')
|
|
64
|
+
if(type === 'error') options.iconBgFillColor = '--icon-error';
|
|
65
65
|
if(type === 'warning') options.iconBgFillColor = '--sunny-yellow';
|
|
66
66
|
// console.log('showToast:', type, title, titleColor, duration);
|
|
67
67
|
|
|
68
68
|
// set style of the data-icon element
|
|
69
69
|
setTimeout(() => {
|
|
70
|
+
// set the close button color
|
|
70
71
|
let closeButtonElement = document.querySelector('.' + toastMainClass + '-close-button') as HTMLElement; //console.log('closeButtonElement:', closeButtonElement);
|
|
72
|
+
// if(closeButtonElement) closeButtonElement.style.backgroundColor = 'hsl(var(' + options.closeBgFillColor + '))';
|
|
71
73
|
|
|
74
|
+
// set icon background fill color
|
|
72
75
|
let iconElement = document.querySelector('.' + toastMainClass + '> [data-icon] > svg') as HTMLElement; //console.log('iconElement:', iconElement);
|
|
73
76
|
if(iconElement) iconElement.style.color = 'hsl(var(' + options.iconBgFillColor + '))';
|
|
77
|
+
|
|
78
|
+
// set the title color
|
|
79
|
+
let titleElement = document.querySelector('.' + toastMainClass + '-title') as HTMLElement; //console.log('titleElement:', titleElement);
|
|
80
|
+
if(titleElement) titleElement.style.color = 'hsl(var(' + titleColor + '))';
|
|
74
81
|
}, 20);
|
|
75
82
|
|
|
76
83
|
// Call toast with custom styling
|
|
@@ -78,9 +85,6 @@ export function showToast(type: string = 'success', title: string, options: any
|
|
|
78
85
|
...options,
|
|
79
86
|
duration,
|
|
80
87
|
unstyled: true,
|
|
81
|
-
classes: {
|
|
82
|
-
title: "text-[hsl(var(" + titleColor + "))]",
|
|
83
|
-
},
|
|
84
88
|
onAutoClose: () => {
|
|
85
89
|
isToastVisible = false;
|
|
86
90
|
},
|
|
@@ -106,7 +110,7 @@ export function showToast(type: string = 'success', title: string, options: any
|
|
|
106
110
|
// "fixed top-auto bottom-[20px] right-[20px] " +
|
|
107
111
|
"!flex !items-center !gap-[24px] !p-[16px] !px-[24px] " +
|
|
108
112
|
// Icon Styling
|
|
109
|
-
"
|
|
113
|
+
"*:data-icon:!w-[24px] *:data-icon:!h-[24px] *:data-icon:!m-0 " +
|
|
110
114
|
"[&>[data-icon]>svg]:!w-full [&>[data-icon]>svg]:!h-full " +
|
|
111
115
|
// Content Styling
|
|
112
116
|
"[&>[data-content]>svg]:flex [&>[data-content]>svg]:flex-col [&>[data-content]>svg]:gap-[2px]",
|
|
@@ -119,7 +123,7 @@ export function showToast(type: string = 'success', title: string, options: any
|
|
|
119
123
|
// Cancel Button Styling
|
|
120
124
|
cancelButton: "",
|
|
121
125
|
// Close Button Styling
|
|
122
|
-
closeButton: toastMainClass + '-close-button w-[16px] h-[16px] absolute
|
|
126
|
+
closeButton: toastMainClass + '-close-button !w-[16px] !h-[16px] !absolute !top-[0px] !left-[0px] z-10 !bg-[hsl(var(--grey7))] !border !border-[hsl(var(--grey5))] !text-white'
|
|
123
127
|
}
|
|
124
128
|
}}
|
|
125
129
|
expand={false}
|
|
@@ -2,5 +2,5 @@ import { Accordion as AccordionPrimitive } from "bits-ui";
|
|
|
2
2
|
import Content from "./accordion-content.svelte";
|
|
3
3
|
import Item from "./accordion-item.svelte";
|
|
4
4
|
import Trigger from "./accordion-trigger.svelte";
|
|
5
|
-
declare const Root: import("svelte").Component<AccordionPrimitive.RootProps, {}, "
|
|
5
|
+
declare const Root: import("svelte").Component<AccordionPrimitive.RootProps, {}, "value" | "ref">;
|
|
6
6
|
export { Root, Content, Item, Trigger, Root as Accordion, Content as AccordionContent, Item as AccordionItem, Trigger as AccordionTrigger };
|