@widgetic/design-system 0.3.79 → 0.3.80
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 +828 -123
- package/dist/components/CopyableHeader.svelte +13 -11
- package/dist/components/EmptyState.svelte +2 -9
- package/dist/components/EmptyState.svelte.d.ts +1 -2
- package/dist/components/PasswordInput.svelte +1 -5
- 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 +6 -7
- package/dist/components/modals/modalStore.js +21 -26
- package/dist/components/navigation/Breadcrumbs.svelte +9 -9
- package/dist/components/pdf/PDFViewer.svelte +19 -10
- package/dist/components/search-input/SearchInput.svelte +8 -3
- package/dist/components/search-input/index.d.ts +14 -3
- package/dist/components/search-input/index.js +2 -1
- package/dist/components/shad-editor/custom/image-extended-component.svelte +1 -1
- package/dist/components/shad-editor/editor.css +4 -8
- 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 +0 -3
- package/dist/components/shad-editor/shad-editor.svelte +1 -1
- package/dist/components/toast/ToasterModal.svelte +11 -15
- 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 +62 -19
- package/dist/icons/LogoWidgetic.svelte +6 -17
- package/dist/icons/LogoWidgeticGreen.svelte +13 -0
- package/dist/icons/LogoWidgeticGreen.svelte.d.ts +20 -0
- package/dist/icons/LogoWidgeticType-old.svelte +13 -0
- package/dist/icons/LogoWidgeticType-old.svelte.d.ts +20 -0
- package/dist/icons/LogoWidgeticType-old.svg +4 -0
- package/dist/icons/LogoWidgeticType.svelte +18 -10
- package/dist/icons/LogoWidgeticType.svg +10 -3
- package/dist/icons/index.d.ts +3 -1
- package/dist/icons/index.js +3 -1
- package/dist/styles/fonts.css +39 -50
- package/dist/styles/global.css +45 -68
- package/package.json +42 -44
- package/tailwind.config.ts +6 -1
- package/dist/components/search-input/index2.d.ts +0 -14
- package/dist/components/shad-editor/README.md +0 -18
- package/dist/icons/eye-off.svg +0 -1
- package/dist/icons/eye.svg +0 -1
- /package/dist/icons/{checked.svg → Checked.svg} +0 -0
|
@@ -30,10 +30,8 @@ const dispatch = createEventDispatcher();
|
|
|
30
30
|
/**
|
|
31
31
|
* COMPONENT IMPORTS
|
|
32
32
|
*/
|
|
33
|
-
|
|
34
|
-
import {
|
|
35
|
-
// import { IconCopy, IconHelp } from '@widgetic/design-system/icons';
|
|
36
|
-
import { IconCopy, IconHelp } from '../icons';
|
|
33
|
+
import { toast, Button, Tooltip, Portal } from '@widgetic/design-system/components';
|
|
34
|
+
import { IconCopy, IconHelp } from '@widgetic/design-system/icons';
|
|
37
35
|
|
|
38
36
|
/**
|
|
39
37
|
* COMPONENT PROPS
|
|
@@ -191,7 +189,7 @@ function showToast(type: 'success' | 'error', message: string, options = {}) {
|
|
|
191
189
|
{#if showHelp && helpUrl}
|
|
192
190
|
<Tooltip.Provider>
|
|
193
191
|
<Tooltip.Root open={showHelpTooltip}>
|
|
194
|
-
<Tooltip.Trigger class="focus:outline-
|
|
192
|
+
<Tooltip.Trigger class="focus:outline-none">
|
|
195
193
|
<a
|
|
196
194
|
href={helpUrl}
|
|
197
195
|
target="_blank"
|
|
@@ -220,7 +218,7 @@ function showToast(type: 'success' | 'error', message: string, options = {}) {
|
|
|
220
218
|
<Tooltip.Content
|
|
221
219
|
side="right"
|
|
222
220
|
sideOffset={5}
|
|
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"
|
|
221
|
+
class="bg-[hsl(var(--dark))] text-white z-[200000] overflow-hidden rounded-md px-2 py-1.5 shadow-md widgetic-colors widgetic-radius"
|
|
224
222
|
>
|
|
225
223
|
<p class="caption text-white">{helpText}</p>
|
|
226
224
|
</Tooltip.Content>
|
|
@@ -233,7 +231,7 @@ function showToast(type: 'success' | 'error', message: string, options = {}) {
|
|
|
233
231
|
{#if showStandaloneCopyButton}
|
|
234
232
|
<Tooltip.Provider>
|
|
235
233
|
<Tooltip.Root open={showCopyTooltip}>
|
|
236
|
-
<Tooltip.Trigger class="focus:outline-
|
|
234
|
+
<Tooltip.Trigger class="focus:outline-none">
|
|
237
235
|
<Button
|
|
238
236
|
variant="default"
|
|
239
237
|
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"
|
|
@@ -258,7 +256,7 @@ function showToast(type: 'success' | 'error', message: string, options = {}) {
|
|
|
258
256
|
<Tooltip.Content
|
|
259
257
|
side="left"
|
|
260
258
|
sideOffset={5}
|
|
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"
|
|
259
|
+
class="bg-[hsl(var(--dark))] text-white z-[200000] overflow-hidden rounded-md px-3 py-1.5 shadow-md widgetic-colors widgetic-radius"
|
|
262
260
|
>
|
|
263
261
|
<p class="caption text-white">{standaloneCopyButtonText}</p>
|
|
264
262
|
</Tooltip.Content>
|
|
@@ -269,7 +267,7 @@ function showToast(type: 'success' | 'error', message: string, options = {}) {
|
|
|
269
267
|
{:else}
|
|
270
268
|
<Tooltip.Provider>
|
|
271
269
|
<Tooltip.Root open={showCopyTooltip}>
|
|
272
|
-
<Tooltip.Trigger class="focus:outline-
|
|
270
|
+
<Tooltip.Trigger class="focus:outline-none">
|
|
273
271
|
<Button
|
|
274
272
|
variant="ghost"
|
|
275
273
|
size="icon"
|
|
@@ -296,7 +294,7 @@ function showToast(type: 'success' | 'error', message: string, options = {}) {
|
|
|
296
294
|
<Tooltip.Content
|
|
297
295
|
side="left"
|
|
298
296
|
sideOffset={5}
|
|
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"
|
|
297
|
+
class="bg-[hsl(var(--dark))] text-white z-[200000] overflow-hidden rounded-md px-3 py-1.5 shadow-md widgetic-colors widgetic-radius"
|
|
300
298
|
>
|
|
301
299
|
<p class="caption text-white">{standaloneCopyButtonText}</p>
|
|
302
300
|
</Tooltip.Content>
|
|
@@ -341,11 +339,15 @@ function showToast(type: 'success' | 'error', message: string, options = {}) {
|
|
|
341
339
|
.copyable-content-area {
|
|
342
340
|
-webkit-user-select: text !important;
|
|
343
341
|
-moz-user-select: text !important;
|
|
344
|
-
-ms-user-select: text !important;
|
|
345
342
|
user-select: text !important;
|
|
346
343
|
overflow-y: auto !important;
|
|
347
344
|
}
|
|
348
345
|
|
|
346
|
+
.copyable-content-area::-moz-selection {
|
|
347
|
+
background-color: rgba(59, 130, 246, 0.2) !important;
|
|
348
|
+
color: inherit !important;
|
|
349
|
+
}
|
|
350
|
+
|
|
349
351
|
.copyable-content-area::selection {
|
|
350
352
|
background-color: rgba(59, 130, 246, 0.2) !important;
|
|
351
353
|
color: inherit !important;
|
|
@@ -11,10 +11,8 @@
|
|
|
11
11
|
* - Responsive: hides icon when space is limited
|
|
12
12
|
-->
|
|
13
13
|
<script lang="ts">
|
|
14
|
+
import { IconExclamationCircle } from '@widgetic/design-system/icons';
|
|
14
15
|
import { onMount } from 'svelte';
|
|
15
|
-
|
|
16
|
-
// import { IconExclamationCircle } from '@widgetic/design-system/icons';
|
|
17
|
-
import { IconExclamationCircle } from '../icons';
|
|
18
16
|
|
|
19
17
|
/**
|
|
20
18
|
* Component Props
|
|
@@ -98,11 +96,6 @@
|
|
|
98
96
|
align-items: center;
|
|
99
97
|
justify-content: center;
|
|
100
98
|
overflow: hidden;
|
|
101
|
-
position: absolute;
|
|
102
|
-
left: 0;
|
|
103
|
-
right: 0;
|
|
104
|
-
top: 0;
|
|
105
|
-
bottom: 0;
|
|
106
99
|
z-index: 0; /* Lower z-index so it doesn't block interactive elements */
|
|
107
100
|
pointer-events: none; /* Allow clicks to pass through to elements behind */
|
|
108
101
|
}
|
|
@@ -123,7 +116,7 @@
|
|
|
123
116
|
|
|
124
117
|
/* Icon container to prevent scaling */
|
|
125
118
|
.icon-container {
|
|
126
|
-
shrink: 0;
|
|
119
|
+
flex-shrink: 0;
|
|
127
120
|
width: 24px;
|
|
128
121
|
height: 24px;
|
|
129
122
|
display: flex;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IconExclamationCircle } from '../icons';
|
|
2
1
|
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> {
|
|
3
2
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
3
|
$$bindings?: Bindings;
|
|
@@ -27,7 +26,7 @@ declare const EmptyState: $$__sveltets_2_IsomorphicComponent<{
|
|
|
27
26
|
showIcon?: boolean;
|
|
28
27
|
iconColor?: string;
|
|
29
28
|
textColor?: string;
|
|
30
|
-
icon?:
|
|
29
|
+
icon?: any;
|
|
31
30
|
}, {
|
|
32
31
|
[evt: string]: CustomEvent<any>;
|
|
33
32
|
}, {
|
|
@@ -5,10 +5,6 @@
|
|
|
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
|
-
|
|
12
8
|
// External Props
|
|
13
9
|
export let value = '';
|
|
14
10
|
export let placeholder = 'Enter password';
|
|
@@ -41,7 +37,7 @@
|
|
|
41
37
|
on:click={() => showPassword = !showPassword}
|
|
42
38
|
>
|
|
43
39
|
<img
|
|
44
|
-
src={showPassword ?
|
|
40
|
+
src={showPassword ? '/icons/eye-off.svg' : '/icons/eye.svg'}
|
|
45
41
|
alt={showPassword ? 'Hide password' : 'Show password'}
|
|
46
42
|
class="w-5 h-5"
|
|
47
43
|
/>
|
|
@@ -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-[var(--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-(--scrollbar-padding) " +
|
|
35
|
+
scrollbarYClasses={scrollbarYClasses + "flex w-[var(--scrollbar-width)] !p-[var(--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))]
|
|
38
|
+
"[&>div]:bg-[hsl(var(--grey1))] [&>div]:hover: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 grow"></div>
|
|
166
|
+
<div class="grid-sidebar-content grid-column flex-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-99999 overflow-hidden rounded-md px-3 py-1.5 text-sm shadow-md"
|
|
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 { SearchInput } from './search-input';
|
|
15
|
+
export { default as SearchInput } from './search-input/SearchInput.svelte';
|
|
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 { SearchInput } from './search-input';
|
|
16
|
+
export { default as SearchInput } from './search-input/SearchInput.svelte';
|
|
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-1004" transition:fade={{ duration: transitionDuration, easing }}>
|
|
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-none 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-none focus:ring-0
|
|
268
268
|
placeholder:text-[24px] placeholder:text-[hsl(var(--grey3))]
|
|
269
269
|
{!isValid && hasAttemptedSubmit ? 'input-error' : ''}"
|
|
270
270
|
maxlength={maxLength}
|
|
@@ -282,17 +282,16 @@
|
|
|
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 -->
|
|
287
285
|
<Button
|
|
288
|
-
|
|
286
|
+
type="button"
|
|
287
|
+
variant="secondary"
|
|
288
|
+
class="modal-btn-secondary !h-[34px]"
|
|
289
289
|
onclick={handleClose}
|
|
290
290
|
>
|
|
291
291
|
{cancelLabel}
|
|
292
292
|
</Button>
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
<Button
|
|
293
|
+
<Button
|
|
294
|
+
type="submit"
|
|
296
295
|
class="modal-btn-primary !h-[34px]"
|
|
297
296
|
onclick={handleRename}
|
|
298
297
|
disabled={!isValid}
|
|
@@ -1,33 +1,28 @@
|
|
|
1
1
|
import { writable } from 'svelte/store';
|
|
2
2
|
// import { browser } from '$app/environment';
|
|
3
|
+
// Determine if running in browser (avoids reference errors during SSR)
|
|
3
4
|
const browser = typeof window !== 'undefined';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return { isOpen: false };
|
|
17
|
-
};
|
|
18
|
-
// Create a store to track modal state
|
|
5
|
+
// Debug flag – set to true when you need to trace modal behaviour
|
|
6
|
+
const showLogs = false;
|
|
7
|
+
/*
|
|
8
|
+
* NOTE: We intentionally **do not** persist modal state to `localStorage` anymore.
|
|
9
|
+
* Persisting the open state caused an issue where refreshing the page while a
|
|
10
|
+
* modal was open would restore (and immediately reopen) that modal on the next
|
|
11
|
+
* page load. The new behaviour always starts with `isOpen: false`, ensuring a
|
|
12
|
+
* clean slate after any refresh.
|
|
13
|
+
*/
|
|
14
|
+
// Always start with a closed modal on fresh page loads
|
|
15
|
+
const getInitialState = () => ({ isOpen: false });
|
|
16
|
+
// Central writable store for runtime modal state
|
|
19
17
|
export const modalState = writable(getInitialState());
|
|
20
|
-
//
|
|
18
|
+
// Backwards-compatibility helper – exposes only the boolean flag
|
|
21
19
|
export const isModalOpen = writable(getInitialState().isOpen);
|
|
22
|
-
//
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
isModalOpen.set(state.isOpen);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
20
|
+
// Keep `isModalOpen` in sync (without persisting to localStorage)
|
|
21
|
+
modalState.subscribe(state => {
|
|
22
|
+
if (showLogs)
|
|
23
|
+
console.log('Modal state updated:', state);
|
|
24
|
+
isModalOpen.set(state.isOpen);
|
|
25
|
+
});
|
|
31
26
|
// Helper functions to manage modal state
|
|
32
27
|
export function openModal(modalType, data) {
|
|
33
28
|
if (showLogs)
|
|
@@ -35,7 +30,7 @@ export function openModal(modalType, data) {
|
|
|
35
30
|
modalState.set({
|
|
36
31
|
isOpen: true,
|
|
37
32
|
modalType,
|
|
38
|
-
data
|
|
33
|
+
data,
|
|
39
34
|
});
|
|
40
35
|
}
|
|
41
36
|
export function closeModal() {
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
>
|
|
183
183
|
<!-- NAVIGATION BUTTONS -->
|
|
184
184
|
{#if showNavigationButtons}
|
|
185
|
-
<div class="nav-buttons flex items-center shrink-0">
|
|
185
|
+
<div class="nav-buttons flex items-center flex-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="shrink-0">
|
|
225
|
+
<Breadcrumb.Item class="flex-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))] shrink-0">/</Breadcrumb.Separator>
|
|
244
|
+
<Breadcrumb.Separator class="h5 text-[hsl(var(--grey6))] flex-shrink-0">/</Breadcrumb.Separator>
|
|
245
245
|
|
|
246
246
|
<!-- Dropdown Menu for Ellipsis -->
|
|
247
|
-
<Breadcrumb.Item class="shrink-0">
|
|
247
|
+
<Breadcrumb.Item class="flex-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))] shrink-0">/</Breadcrumb.Separator>
|
|
273
|
-
<Breadcrumb.Item class="shrink-0">
|
|
272
|
+
<Breadcrumb.Separator class="h5 text-[hsl(var(--grey6))] flex-shrink-0">/</Breadcrumb.Separator>
|
|
273
|
+
<Breadcrumb.Item class="flex-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))] shrink-0">/</Breadcrumb.Separator>
|
|
297
|
-
<Breadcrumb.Item class="shrink-0">
|
|
296
|
+
<Breadcrumb.Separator class="h5 text-[hsl(var(--grey6))] flex-shrink-0">/</Breadcrumb.Separator>
|
|
297
|
+
<Breadcrumb.Item class="flex-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">
|
|
327
327
|
Available width: {Math.round(availableWidth)}px
|
|
328
328
|
<br>
|
|
329
329
|
Items to show: {itemsToShow}
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
import { onMount, onDestroy, tick, afterUpdate, createEventDispatcher } from 'svelte';
|
|
4
4
|
|
|
5
5
|
// Sveltekit imports
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const base = '';
|
|
6
|
+
import { browser } from '$app/environment';
|
|
7
|
+
import { base } from '$app/paths';
|
|
8
|
+
|
|
10
9
|
// Local components imports
|
|
11
10
|
import { WScrollArea } from '../../components';
|
|
12
11
|
|
|
@@ -543,19 +542,29 @@
|
|
|
543
542
|
<!-- Page Navigation Bar -->
|
|
544
543
|
<div class="page-navigation-bar flex items-center justify-center h-[54px] widgetic-colors border-b border-[hsl(var(--grey2))] w-full">
|
|
545
544
|
<div class="flex items-center gap-3 w-full max-w-[200px] justify-between px-0">
|
|
546
|
-
<button
|
|
547
|
-
|
|
545
|
+
<button
|
|
546
|
+
class="pdf-nav-button h-9 w-9 flex items-center justify-center rounded-small bg-white border border-[hsl(var(--grey2))] transition-colors group active:scale-95 disabled:opacity-50"
|
|
547
|
+
onclick={onPrevPage}
|
|
548
|
+
disabled={pageNum <= 1}
|
|
549
|
+
aria-label="Previous page"
|
|
550
|
+
>
|
|
551
|
+
<IconChevronLeft
|
|
548
552
|
class="!text-[hsl(var(--grey5))] group-hover:!text-[hsl(var(--grey7))]"
|
|
549
|
-
style="height: 20px !important; min-width: 20px !important; max-width: 20px !important; max-height: 20px !important;"
|
|
553
|
+
style="width: 20px !important; height: 20px !important; min-width: 20px !important; min-height: 20px !important; max-width: 20px !important; max-height: 20px !important;"
|
|
550
554
|
/>
|
|
551
555
|
</button>
|
|
552
556
|
|
|
553
557
|
<span class="subtext text-[hsl(var(--grey7))]">Page {pageNum} of {pageCount || '?'}</span>
|
|
554
558
|
|
|
555
|
-
<button
|
|
556
|
-
|
|
559
|
+
<button
|
|
560
|
+
class="pdf-nav-button h-9 w-9 flex items-center justify-center rounded-small bg-white border border-[hsl(var(--grey2))] transition-colors group active:scale-95 disabled:opacity-50"
|
|
561
|
+
onclick={onNextPage}
|
|
562
|
+
disabled={pageNum >= pageCount}
|
|
563
|
+
aria-label="Next page"
|
|
564
|
+
>
|
|
565
|
+
<IconChevronRight
|
|
557
566
|
class="!text-[hsl(var(--grey5))] group-hover:!text-[hsl(var(--grey7))]"
|
|
558
|
-
style="height: 20px !important; min-width: 20px !important; max-width: 20px !important; max-height: 20px !important;"
|
|
567
|
+
style="width: 20px !important; height: 20px !important; min-width: 20px !important; min-height: 20px !important; max-width: 20px !important; max-height: 20px !important;"
|
|
559
568
|
/>
|
|
560
569
|
</button>
|
|
561
570
|
</div>
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* - Uses Widgetic design system styling
|
|
11
11
|
-->
|
|
12
12
|
<script lang="ts">
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
import { X, IconSearch } from '@widgetic/design-system/icons';
|
|
14
|
+
|
|
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-none 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,6 +104,11 @@
|
|
|
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
|
+
|
|
107
112
|
input::placeholder {
|
|
108
113
|
transition: color 300ms ease !important;
|
|
109
114
|
}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export
|
|
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> {}
|
|
@@ -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-none"
|
|
135
135
|
onchange={(e) => {
|
|
136
136
|
if (e.target === null) return;
|
|
137
137
|
//@ts-ignore
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
/* @config "../../../../tailwind.config.ts"; */
|
|
2
|
-
@reference "../../styles/global.css";
|
|
3
|
-
|
|
4
1
|
.tiptap :where(p):not(:where([class~='not-prose'], [class~='not-prose'] *)) {
|
|
5
2
|
margin-top: 0 !important;
|
|
6
3
|
margin-bottom: 0 !important;
|
|
7
4
|
}
|
|
8
5
|
|
|
9
6
|
.tiptap code:not(pre code) {
|
|
10
|
-
/* Remove the before and after pseudo elements
|
|
11
|
-
@apply rounded
|
|
7
|
+
/* Remove the before and after pseudo elements */
|
|
8
|
+
@apply rounded border bg-muted/50 p-1 before:content-[''] after:content-[''];
|
|
12
9
|
}
|
|
13
10
|
|
|
14
11
|
.tiptap blockquote p {
|
|
@@ -57,7 +54,7 @@ ul[data-type='taskList'] li[data-checked='true'] div {
|
|
|
57
54
|
}
|
|
58
55
|
|
|
59
56
|
input[type='checkbox'] {
|
|
60
|
-
@apply
|
|
57
|
+
@apply size-4 cursor-pointer rounded !important;
|
|
61
58
|
}
|
|
62
59
|
|
|
63
60
|
ul[data-type='taskList'] ul[data-type='taskList'] {
|
|
@@ -70,8 +67,7 @@ ul[data-type='taskList'] ul[data-type='taskList'] {
|
|
|
70
67
|
}
|
|
71
68
|
|
|
72
69
|
.color::before {
|
|
73
|
-
|
|
74
|
-
@apply mb-[0.15rem] mr-[0.1rem] inline-block size-[1rem] rounded-md border border-muted align-middle;
|
|
70
|
+
@apply mb-[0.15rem] mr-[0.1rem] inline-block size-[1rem] rounded border border-muted align-middle;
|
|
75
71
|
background-color: var(--color);
|
|
76
72
|
content: ' ';
|
|
77
73
|
}
|
|
@@ -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-highlighted:bg-destructive"
|
|
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-highlighted:bg-destructive"
|
|
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-highlighted:bg-destructive"
|
|
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-none 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: [
|