@widgetic/design-system 0.3.70 → 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.
Files changed (41) hide show
  1. package/dist/components/CopyableHeader.svelte +4 -2
  2. package/dist/components/EmptyState.svelte +3 -1
  3. package/dist/components/EmptyState.svelte.d.ts +2 -1
  4. package/dist/components/PasswordInput.svelte +5 -1
  5. package/dist/components/WScrollArea.svelte +3 -3
  6. package/dist/components/modals/ActionModal.svelte +2 -2
  7. package/dist/components/modals/BaseModal.svelte +1 -1
  8. package/dist/components/modals/NewItemDialog.svelte +2 -2
  9. package/dist/components/modals/RenameDialog.svelte +7 -6
  10. package/dist/components/pdf/PDFViewer.svelte +8 -18
  11. package/dist/components/search-input/SearchInput.svelte +2 -2
  12. package/dist/components/shad-editor/custom/code-extended.svelte +1 -1
  13. package/dist/components/shad-editor/icons/highlighter.svelte +1 -1
  14. package/dist/components/shad-editor/icons/image.svelte +1 -1
  15. package/dist/components/shad-editor/icons/link.svelte +1 -1
  16. package/dist/components/shad-editor/icons/quickcolor.svelte +3 -3
  17. package/dist/components/shad-editor/icons/table.svelte +1 -1
  18. package/dist/components/shad-editor/icons/text.svelte +5 -5
  19. package/dist/components/shad-editor/icons/textalign.svelte +5 -5
  20. package/dist/components/shad-editor/icons/textcolor.svelte +1 -1
  21. package/dist/components/toast/ToasterModal.svelte +19 -15
  22. package/dist/components/ui/accordion/index.d.ts +1 -1
  23. package/dist/components/ui/calendar/calendar.svelte.d.ts +1 -1
  24. package/dist/components/ui/collapsible/index.d.ts +1 -1
  25. package/dist/components/ui/command/command-dialog.svelte.d.ts +1 -1
  26. package/dist/components/ui/command/command-input.svelte.d.ts +1 -1
  27. package/dist/components/ui/command/command.svelte.d.ts +1 -1
  28. package/dist/components/ui/dropdown-menu/index.d.ts +1 -1
  29. package/dist/components/ui/input/input.svelte.d.ts +1 -1
  30. package/dist/components/ui/input-otp/input-otp.svelte.d.ts +1 -1
  31. package/dist/components/ui/radio-group/radio-group.svelte.d.ts +1 -1
  32. package/dist/components/ui/range-calendar/range-calendar.svelte.d.ts +1 -1
  33. package/dist/components/ui/select/index.d.ts +1 -1
  34. package/dist/components/ui/slider/slider.svelte.d.ts +1 -1
  35. package/dist/components/ui/tabs/index.d.ts +1 -1
  36. package/dist/components/ui/textarea/textarea.svelte.d.ts +1 -1
  37. package/dist/components/ui/toggle-group/toggle-group-item.svelte.d.ts +1 -1
  38. package/dist/components/ui/toggle-group/toggle-group.svelte.d.ts +1 -1
  39. package/dist/icons/eye-off.svg +1 -0
  40. package/dist/icons/eye.svg +1 -0
  41. package/package.json +32 -32
@@ -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 { IconCopy, IconHelp } from '@widgetic/design-system/icons';
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
@@ -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
@@ -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?: any;
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 ? '/icons/eye-off.svg' : '/icons/eye.svg'}
44
+ src={showPassword ? eyeOffIconUrl : eyeIconUrl}
41
45
  alt={showPassword ? 'Hide password' : 'Show password'}
42
46
  class="w-5 h-5"
43
47
  />
@@ -26,14 +26,14 @@ 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
- "**:data-scroll-area-viewport:pr-(--scrollbar-width)!"}
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-(--scrollbar-padding)! " +
36
- "bg-transparent! border-none select-none touch-none " +
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
38
  "[&>div]:bg-[hsl(var(--grey1))] hover:[&>div]:bg-[hsl(var(--grey2))] " +
39
39
  "[&>div]:transition-colors [&>div]:duration-250"}
@@ -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 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"
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 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'}"
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"
@@ -294,7 +294,7 @@
294
294
  role="button"
295
295
  tabindex="0"
296
296
  >
297
- <IconX class="w-[24px]! h-[24px]! text-white" />
297
+ <IconX class="!w-[24px] !h-[24px] text-white" />
298
298
  </div>
299
299
  </div>
300
300
 
@@ -149,14 +149,14 @@
149
149
  <Button
150
150
  type="button"
151
151
  variant="secondary"
152
- class="modal-btn-secondary rounded-[100px]! h-[34px]!"
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 rounded-[100px]! h-[34px]!"
159
+ class="modal-btn-primary !rounded-[100px] !h-[34px]"
160
160
  onclick={handleSubmit}
161
161
  disabled={!isValid}
162
162
  >
@@ -282,17 +282,18 @@
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
- type="button"
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
- <Button
294
- type="submit"
295
- class="modal-btn-primary h-[34px]!"
293
+
294
+ <!-- Confirm Button -->
295
+ <Button
296
+ class="modal-btn-primary !h-[34px]"
296
297
  onclick={handleRename}
297
298
  disabled={!isValid}
298
299
  >
@@ -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
- 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
552
- class="text-[hsl(var(--grey5))]! group-hover:text-[hsl(var(--grey7))]!"
553
- style="width: 20px !important; height: 20px !important; min-width: 20px !important; min-height: 20px !important; max-width: 20px !important; max-height: 20px !important;"
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
547
+ class="!text-[hsl(var(--grey5))] group-hover:!text-[hsl(var(--grey7))]"
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
- 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
566
- class="text-[hsl(var(--grey5))]! group-hover:text-[hsl(var(--grey7))]!"
567
- style="width: 20px !important; height: 20px !important; min-width: 20px !important; min-height: 20px !important; max-width: 20px !important; max-height: 20px !important;"
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
556
+ class="!text-[hsl(var(--grey5))] group-hover:!text-[hsl(var(--grey7))]"
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
  */
@@ -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="size-3!" />
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}
@@ -30,7 +30,7 @@
30
30
  onclick={() => editor.chain().focus()}
31
31
  >
32
32
  <Highlighter />
33
- <ChevronDown class="size-3! text-muted-foreground" />
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="size-3! text-muted-foreground" />
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="size-3! text-muted-foreground" />
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="size-3!" />
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 size-3! text-muted-foreground" />
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 size-3! text-muted-foreground" />
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="size-3!" />
18
+ <ChevronDown class="!size-3" />
19
19
  </Button>
20
20
  </DropdownMenu.Trigger>
21
21
  <DropdownMenu.Content class="max-h-[25rem] w-40 overflow-auto">
@@ -36,7 +36,7 @@
36
36
  {:else}
37
37
  <Minus />
38
38
  {/if}
39
- <ChevronDown class="size-3! text-muted-foreground" />
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 size-3! text-muted-foreground" />
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 size-3! text-muted-foreground" />
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 size-3! text-muted-foreground" />
67
+ <Check class="absolute right-2 !size-3 text-muted-foreground" />
68
68
  {/if}
69
69
  </DropdownMenu.Item>
70
70
  <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 size-3! text-muted-foreground" />
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="size-3! text-muted-foreground" />
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 size-3! text-muted-foreground" />
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 size-3! text-muted-foreground" />
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 size-3! text-muted-foreground" />
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 size-3! text-muted-foreground" />
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="size-3! text-muted-foreground" />
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">
@@ -3,8 +3,8 @@
3
3
  import { toast, Toaster } from '../ui/sonner';
4
4
 
5
5
  // Import Icons from Icons Folder
6
- import Close from '../../icons/Exclamation.svelte';
7
- import Checked from '../../icons/checked.svelte';
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 = Close;
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 = Close;
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') options.iconBgFillColor = '--icon-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
  },
@@ -101,25 +105,25 @@ export function showToast(type: string = 'success', title: string, options: any
101
105
  toastOptions={{
102
106
  style: "box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1); !important;",
103
107
  classes: {
104
- toast: toastMainClass + " widgetic-colors widgetic-radius bg-white! rounded-small! border! border-[hsl(var(--forest-green))]! " +
105
- "min-w-[334px]! max-w-[450px]! " +
108
+ toast: toastMainClass + " widgetic-colors widgetic-radius !bg-white !rounded-small !border !border-[hsl(var(--forest-green))] " +
109
+ "!min-w-[334px] !max-w-[450px] " +
106
110
  // "fixed top-auto bottom-[20px] right-[20px] " +
107
- "flex! items-center! gap-[24px]! p-[16px]! px-[24px]! " +
111
+ "!flex !items-center !gap-[24px] !p-[16px] !px-[24px] " +
108
112
  // Icon Styling
109
- "*:data-icon:w-[24px]! *:data-icon:h-[24px]! *:data-icon:m-0! " +
110
- "[&>[data-icon]>svg]:w-full! [&>[data-icon]>svg]:h-full! " +
113
+ "*:data-icon:!w-[24px] *:data-icon:!h-[24px] *:data-icon:!m-0 " +
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]",
113
117
  // Title Styling
114
118
  title: toastMainClass + "-title body-medium",
115
119
  // Description Styling
116
- description: toastMainClass + "-description caption text-[hsl(var(--grey5))]!",
120
+ description: toastMainClass + "-description caption !text-[hsl(var(--grey5))]",
117
121
  // Action Button Styling
118
122
  actionButton: "",
119
123
  // Cancel Button Styling
120
124
  cancelButton: "",
121
125
  // Close Button Styling
122
- closeButton: toastMainClass + '-close-button w-[16px] h-[16px] absolute -translate-x-1/2 -translate-y-1/2 top-[1px] left-[1px] z-10 bg-[hsl(var(--grey7))]! border border-[hsl(var(--grey5))]! text-white!'
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, {}, "ref" | "value">;
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 };
@@ -1,5 +1,5 @@
1
1
  import { Calendar as CalendarPrimitive, type WithoutChildrenOrChild } from "bits-ui";
2
2
  import * as Calendar from "./index.js";
3
- declare const Calendar: import("svelte").Component<WithoutChildrenOrChild<CalendarPrimitive.RootProps>, {}, "ref" | "value" | "placeholder">;
3
+ declare const Calendar: import("svelte").Component<WithoutChildrenOrChild<CalendarPrimitive.RootProps>, {}, "value" | "placeholder" | "ref">;
4
4
  type Calendar = ReturnType<typeof Calendar>;
5
5
  export default Calendar;
@@ -1,5 +1,5 @@
1
1
  import { Collapsible as CollapsiblePrimitive } from "bits-ui";
2
- declare const Root: import("svelte").Component<CollapsiblePrimitive.RootProps, {}, "ref" | "open">;
2
+ declare const Root: import("svelte").Component<CollapsiblePrimitive.RootProps, {}, "open" | "ref">;
3
3
  declare const Trigger: import("svelte").Component<CollapsiblePrimitive.TriggerProps, {}, "ref">;
4
4
  declare const Content: import("svelte").Component<Omit<{
5
5
  forceMount?: boolean;
@@ -4,6 +4,6 @@ type $$ComponentProps = WithoutChildrenOrChild<DialogPrimitive.RootProps> & With
4
4
  portalProps?: DialogPrimitive.PortalProps;
5
5
  children: Snippet;
6
6
  };
7
- declare const CommandDialog: import("svelte").Component<$$ComponentProps, {}, "ref" | "value" | "open">;
7
+ declare const CommandDialog: import("svelte").Component<$$ComponentProps, {}, "open" | "value" | "ref">;
8
8
  type CommandDialog = ReturnType<typeof CommandDialog>;
9
9
  export default CommandDialog;
@@ -1,4 +1,4 @@
1
1
  import { Command as CommandPrimitive } from "bits-ui";
2
- declare const CommandInput: import("svelte").Component<CommandPrimitive.InputProps, {}, "ref" | "value">;
2
+ declare const CommandInput: import("svelte").Component<CommandPrimitive.InputProps, {}, "value" | "ref">;
3
3
  type CommandInput = ReturnType<typeof CommandInput>;
4
4
  export default CommandInput;
@@ -1,4 +1,4 @@
1
1
  import { Command as CommandPrimitive } from "bits-ui";
2
- declare const Command: import("svelte").Component<CommandPrimitive.RootProps, {}, "ref" | "value">;
2
+ declare const Command: import("svelte").Component<CommandPrimitive.RootProps, {}, "value" | "ref">;
3
3
  type Command = ReturnType<typeof Command>;
4
4
  export default Command;
@@ -21,5 +21,5 @@ declare const Root: import("svelte").Component<{
21
21
  }, {}, "open">;
22
22
  declare const Trigger: import("svelte").Component<DropdownMenuPrimitive.TriggerProps, {}, "ref">;
23
23
  declare const Group: import("svelte").Component<DropdownMenuPrimitive.GroupProps, {}, "ref">;
24
- declare const RadioGroup: import("svelte").Component<DropdownMenuPrimitive.RadioGroupProps, {}, "ref" | "value">;
24
+ declare const RadioGroup: import("svelte").Component<DropdownMenuPrimitive.RadioGroupProps, {}, "value" | "ref">;
25
25
  export { CheckboxItem, Content, Root, Group, GroupHeading, Item, Label, RadioGroup, RadioItem, Separator, Shortcut, Sub, SubContent, SubTrigger, Trigger, CheckboxItem as DropdownMenuCheckboxItem, Content as DropdownMenuContent, Root as DropdownMenu, Group as DropdownMenuGroup, GroupHeading as DropdownMenuGroupHeading, Item as DropdownMenuItem, Label as DropdownMenuLabel, RadioGroup as DropdownMenuRadioGroup, RadioItem as DropdownMenuRadioItem, Separator as DropdownMenuSeparator, Shortcut as DropdownMenuShortcut, Sub as DropdownMenuSub, SubContent as DropdownMenuSubContent, SubTrigger as DropdownMenuSubTrigger, Trigger as DropdownMenuTrigger };
@@ -1,5 +1,5 @@
1
1
  import type { HTMLInputAttributes } from "svelte/elements";
2
2
  import type { WithElementRef } from "bits-ui";
3
- declare const Input: import("svelte").Component<WithElementRef<HTMLInputAttributes>, {}, "ref" | "value">;
3
+ declare const Input: import("svelte").Component<WithElementRef<HTMLInputAttributes>, {}, "value" | "ref">;
4
4
  type Input = ReturnType<typeof Input>;
5
5
  export default Input;
@@ -1,3 +1,3 @@
1
- declare const InputOtp: import("svelte").Component<import("bits-ui").PinInputRootPropsWithoutHTML & import("bits-ui").Without<import("bits-ui").BitsPrimitiveInputAttributes, import("bits-ui").PinInputRootPropsWithoutHTML>, {}, "ref" | "value">;
1
+ declare const InputOtp: import("svelte").Component<import("bits-ui").PinInputRootPropsWithoutHTML & import("bits-ui").Without<import("bits-ui").BitsPrimitiveInputAttributes, import("bits-ui").PinInputRootPropsWithoutHTML>, {}, "value" | "ref">;
2
2
  type InputOtp = ReturnType<typeof InputOtp>;
3
3
  export default InputOtp;
@@ -1,4 +1,4 @@
1
1
  import { RadioGroup as RadioGroupPrimitive } from "bits-ui";
2
- declare const RadioGroup: import("svelte").Component<RadioGroupPrimitive.RootProps, {}, "ref" | "value">;
2
+ declare const RadioGroup: import("svelte").Component<RadioGroupPrimitive.RootProps, {}, "value" | "ref">;
3
3
  type RadioGroup = ReturnType<typeof RadioGroup>;
4
4
  export default RadioGroup;
@@ -1,5 +1,5 @@
1
1
  import { RangeCalendar as RangeCalendarPrimitive } from "bits-ui";
2
2
  import * as RangeCalendar from "./index.js";
3
- declare const RangeCalendar: import("svelte").Component<Omit<Omit<RangeCalendarPrimitive.RootProps, "child">, "children">, {}, "ref" | "value" | "placeholder">;
3
+ declare const RangeCalendar: import("svelte").Component<Omit<Omit<RangeCalendarPrimitive.RootProps, "child">, "children">, {}, "value" | "placeholder" | "ref">;
4
4
  type RangeCalendar = ReturnType<typeof RangeCalendar>;
5
5
  export default RangeCalendar;
@@ -6,6 +6,6 @@ import Trigger from "./select-trigger.svelte";
6
6
  import Separator from "./select-separator.svelte";
7
7
  import ScrollDownButton from "./select-scroll-down-button.svelte";
8
8
  import ScrollUpButton from "./select-scroll-up-button.svelte";
9
- declare const Root: import("svelte").Component<import("bits-ui").ComboboxRootPropsWithoutHTML, {}, "value" | "open">;
9
+ declare const Root: import("svelte").Component<import("bits-ui").ComboboxRootPropsWithoutHTML, {}, "open" | "value">;
10
10
  declare const Group: import("svelte").Component<SelectPrimitive.GroupProps, {}, "ref">;
11
11
  export { Root, Group, GroupHeading, Item, Content, Trigger, Separator, ScrollDownButton, ScrollUpButton, Root as Select, Group as SelectGroup, GroupHeading as SelectGroupHeading, Item as SelectItem, Content as SelectContent, Trigger as SelectTrigger, Separator as SelectSeparator, ScrollDownButton as SelectScrollDownButton, ScrollUpButton as SelectScrollUpButton };
@@ -1,4 +1,4 @@
1
1
  import { Slider as SliderPrimitive, type WithoutChildrenOrChild } from "bits-ui";
2
- declare const Slider: import("svelte").Component<WithoutChildrenOrChild<SliderPrimitive.RootProps>, {}, "ref" | "value">;
2
+ declare const Slider: import("svelte").Component<WithoutChildrenOrChild<SliderPrimitive.RootProps>, {}, "value" | "ref">;
3
3
  type Slider = ReturnType<typeof Slider>;
4
4
  export default Slider;
@@ -2,5 +2,5 @@ import { Tabs as TabsPrimitive } from "bits-ui";
2
2
  import Content from "./tabs-content.svelte";
3
3
  import List from "./tabs-list.svelte";
4
4
  import Trigger from "./tabs-trigger.svelte";
5
- declare const Root: import("svelte").Component<TabsPrimitive.RootProps, {}, "ref" | "value">;
5
+ declare const Root: import("svelte").Component<TabsPrimitive.RootProps, {}, "value" | "ref">;
6
6
  export { Root, Content, List, Trigger, Root as Tabs, Content as TabsContent, List as TabsList, Trigger as TabsTrigger, };
@@ -1,5 +1,5 @@
1
1
  import type { WithElementRef } from "bits-ui";
2
2
  import type { HTMLTextareaAttributes } from "svelte/elements";
3
- declare const Textarea: import("svelte").Component<Omit<WithElementRef<HTMLTextareaAttributes>, "children">, {}, "ref" | "value">;
3
+ declare const Textarea: import("svelte").Component<Omit<WithElementRef<HTMLTextareaAttributes>, "children">, {}, "value" | "ref">;
4
4
  type Textarea = ReturnType<typeof Textarea>;
5
5
  export default Textarea;
@@ -1,6 +1,6 @@
1
1
  import { ToggleGroup as ToggleGroupPrimitive } from "bits-ui";
2
2
  import { type ToggleVariants } from "../toggle/index.js";
3
3
  type $$ComponentProps = ToggleGroupPrimitive.ItemProps & ToggleVariants;
4
- declare const ToggleGroupItem: import("svelte").Component<$$ComponentProps, {}, "ref" | "value">;
4
+ declare const ToggleGroupItem: import("svelte").Component<$$ComponentProps, {}, "value" | "ref">;
5
5
  type ToggleGroupItem = ReturnType<typeof ToggleGroupItem>;
6
6
  export default ToggleGroupItem;
@@ -3,6 +3,6 @@ export declare function setToggleGroupCtx(props: ToggleVariants): void;
3
3
  export declare function getToggleGroupCtx(): ToggleVariants;
4
4
  import { ToggleGroup as ToggleGroupPrimitive } from "bits-ui";
5
5
  type $$ComponentProps = ToggleGroupPrimitive.RootProps & ToggleVariants;
6
- declare const ToggleGroup: import("svelte").Component<$$ComponentProps, {}, "ref" | "value">;
6
+ declare const ToggleGroup: import("svelte").Component<$$ComponentProps, {}, "value" | "ref">;
7
7
  type ToggleGroup = ReturnType<typeof ToggleGroup>;
8
8
  export default ToggleGroup;
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-eye-off"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.585 10.587a2 2 0 0 0 2.829 2.828" /><path d="M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87" /><path d="M3 3l18 18" /></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-eye"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" /><path d="M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6" /></svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widgetic/design-system",
3
- "version": "0.3.70",
3
+ "version": "0.3.71",
4
4
  "type": "module",
5
5
  "svelte": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -14,7 +14,7 @@
14
14
  "**/*.ts"
15
15
  ],
16
16
  "scripts": {
17
- "i": "rm -rf node_modules && npm i && npm link",
17
+ "i": "rm -rf node_modules && rm -rf package-lock.json && npm i && npm link",
18
18
  "unlink": "rm -rf \"$(npm root -g)/@widgetic/design-system\" 2>/dev/null || true",
19
19
  "clean-modules": "rm -rf node_modules",
20
20
  "llinks": "ls -la node_modules/@widgetic",
@@ -106,11 +106,9 @@
106
106
  "peerDependencies": {
107
107
  "@internationalized/date": "^3.6.0",
108
108
  "@sveltejs/kit": "^2.20.2",
109
- "@tabler/icons-svelte": "^3.30.0",
110
109
  "bits-ui": "^1.3.19",
111
- "lucide-svelte": "^0.468.0",
110
+ "shadcn-svelte": "1.0.0-next.9",
112
111
  "svelte": "^5.25.6",
113
- "svelte-sonner": "^0.3.28",
114
112
  "tailwindcss": "^4.1.4"
115
113
  },
116
114
  "devDependencies": {
@@ -121,6 +119,31 @@
121
119
  "@sveltejs/vite-plugin-svelte": "^5.0.3",
122
120
  "@tailwindcss/postcss": "^4.1.4",
123
121
  "@tailwindcss/typography": "^0.5.15",
122
+ "@types/node": "^22.10.1",
123
+ "bits-ui": "^1.3.19",
124
+ "concurrently": "^9.1.0",
125
+ "eslint": "^9.7.0",
126
+ "eslint-config-prettier": "^9.1.0",
127
+ "eslint-plugin-svelte": "^2.36.0",
128
+ "globals": "^15.0.0",
129
+ "lucide-svelte": "^0.468.0",
130
+ "mode-watcher": "^0.5.0",
131
+ "postcss": "^8.5.3",
132
+ "prettier": "^3.3.2",
133
+ "prettier-plugin-svelte": "^3.2.6",
134
+ "prettier-plugin-tailwindcss": "^0.6.11",
135
+ "shadcn-svelte": "1.0.0-next.9",
136
+ "svelte": "^5.25.6",
137
+ "svelte-check": "^4.1.0",
138
+ "svelte-sonner": "^0.3.28",
139
+ "tailwindcss": "^4.1.4",
140
+ "typescript": "^5.0.0",
141
+ "typescript-eslint": "^8.0.0",
142
+ "vite": "^6.0.1"
143
+ },
144
+ "dependencies": {
145
+ "@hirasso/thumbhash-custom-element": "^0.5.5",
146
+ "@tabler/icons-svelte": "^3.30.0",
124
147
  "@tiptap/core": "^2.9.1",
125
148
  "@tiptap/extension-bubble-menu": "^2.9.1",
126
149
  "@tiptap/extension-code-block-lowlight": "^2.9.1",
@@ -143,42 +166,19 @@
143
166
  "@tiptap/extension-underline": "^2.9.1",
144
167
  "@tiptap/pm": "^2.9.1",
145
168
  "@tiptap/starter-kit": "^2.9.1",
146
- "@types/node": "^22.10.1",
147
- "bits-ui": "^1.3.19",
148
169
  "clsx": "^2.1.1",
149
- "concurrently": "^9.1.0",
150
- "eslint": "^9.7.0",
151
- "eslint-config-prettier": "^9.1.0",
152
- "eslint-plugin-svelte": "^2.36.0",
153
- "globals": "^15.0.0",
154
170
  "lowlight": "^3.2.0",
155
- "lucide-svelte": "^0.468.0",
156
- "mode-watcher": "^0.5.0",
157
- "postcss": "^8.5.3",
158
- "prettier": "^3.3.2",
159
- "prettier-plugin-svelte": "^3.2.6",
160
- "prettier-plugin-tailwindcss": "^0.6.11",
161
- "svelte": "^5.25.6",
171
+ "pdfjs-dist": "^4.10.38",
162
172
  "svelte-awesome-color-picker": "^3.1.4",
163
- "svelte-check": "^4.1.0",
164
173
  "svelte-sonner": "^0.3.28",
165
174
  "svelte-tiptap": "^2.0.3",
166
- "tailwind-merge": "^2.6.0",
167
- "tailwind-variants": "^0.3.1",
175
+ "tailwind-merge": "^2.5.5",
176
+ "tailwind-variants": "^0.3.0",
168
177
  "tailwindcss-animate": "^1.0.7",
169
- "typescript": "^5.0.0",
170
- "typescript-eslint": "^8.0.0",
171
- "vaul-svelte": "^1.0.0-next.3",
172
- "vite": "^6.0.1"
178
+ "vaul-svelte": "^1.0.0-next.3"
173
179
  },
174
180
  "volta": {
175
181
  "node": "22.14.0",
176
182
  "npm": "11.1.0"
177
- },
178
- "dependencies": {
179
- "@hirasso/thumbhash-custom-element": "^0.5.5",
180
- "@tabler/icons-svelte": "^3.30.0",
181
- "pdfjs-dist": "^4.10.38",
182
- "shadcn-svelte": "^1.0.0-next.9"
183
183
  }
184
184
  }