@finsweet/webflow-apps-utils 1.0.8 → 1.0.10

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 (51) hide show
  1. package/dist/types/customCode.d.ts +1 -1
  2. package/dist/ui/components/Loader.svelte +0 -2
  3. package/dist/ui/components/LoadingScreen.svelte +6 -2
  4. package/dist/ui/components/LoadingScreen.svelte.d.ts +1 -0
  5. package/dist/ui/components/breakpoints/BreakpointItem.svelte +2 -2
  6. package/dist/ui/components/button/Button.stories.svelte +0 -8
  7. package/dist/ui/components/button/Button.svelte +68 -76
  8. package/dist/ui/components/button/index.d.ts +1 -1
  9. package/dist/ui/components/button/index.js +1 -0
  10. package/dist/ui/components/color-picker/ColorPicker.stories.svelte +42 -0
  11. package/dist/ui/components/color-picker/ColorPicker.stories.svelte.d.ts +19 -0
  12. package/dist/ui/components/color-picker/ColorPicker.svelte +155 -0
  13. package/dist/ui/components/color-picker/ColorPicker.svelte.d.ts +8 -0
  14. package/dist/ui/components/color-picker/ColorSelect.stories.svelte +61 -0
  15. package/dist/ui/components/color-picker/ColorSelect.stories.svelte.d.ts +27 -0
  16. package/dist/ui/components/color-picker/ColorSelect.svelte +940 -0
  17. package/dist/ui/components/color-picker/ColorSelect.svelte.d.ts +7 -0
  18. package/dist/ui/components/color-picker/index.d.ts +1 -0
  19. package/dist/ui/components/color-picker/index.js +1 -0
  20. package/dist/ui/components/controlled-buttons/ControlledButtons.svelte +17 -7
  21. package/dist/ui/components/copy-text/CopyText.svelte +48 -39
  22. package/dist/ui/components/divider/Divider.stories.svelte +0 -4
  23. package/dist/ui/components/input/index.d.ts +1 -1
  24. package/dist/ui/components/input/index.js +1 -0
  25. package/dist/ui/components/layout/Layout.svelte +0 -5
  26. package/dist/ui/components/layout/examples/ExampleLayout.svelte +9 -8
  27. package/dist/ui/components/modal/Example.svelte +0 -7
  28. package/dist/ui/components/modal/Modal.stories.svelte +0 -2
  29. package/dist/ui/components/modal/Modal.svelte +1 -1
  30. package/dist/ui/components/notification/Notification.stories.svelte +0 -8
  31. package/dist/ui/components/notification/Notification.svelte +2 -2
  32. package/dist/ui/components/section/Section.stories.svelte +0 -1
  33. package/dist/ui/components/text/README.md +0 -2
  34. package/dist/ui/components/text/Text.stories.svelte +0 -6
  35. package/dist/ui/components/text/Text.svelte +0 -19
  36. package/dist/ui/components/tooltip/Tooltip.svelte +9 -5
  37. package/dist/ui/icons/FinsweetLogoOutlineIcon.svelte +17 -0
  38. package/dist/ui/icons/FinsweetLogoOutlineIcon.svelte.d.ts +26 -0
  39. package/dist/ui/icons/TriangleDownIconToggle.svelte +0 -1
  40. package/dist/ui/icons/index.d.ts +2 -1
  41. package/dist/ui/icons/index.js +2 -1
  42. package/dist/ui/index.css +1 -1
  43. package/dist/ui/providers/GlobalProviderDemo.svelte +0 -2
  44. package/dist/ui/router/Router.stories.js +7 -7
  45. package/dist/ui/router/examples/RouterExample.svelte +0 -9
  46. package/dist/ui/router/examples/pages/AboutPage.svelte +0 -4
  47. package/dist/ui/router/providers/Link.svelte +0 -2
  48. package/dist/ui/router/providers/Route.svelte +0 -3
  49. package/dist/ui/stores/form.d.ts +136 -3
  50. package/dist/ui/stores/form.js +310 -2
  51. package/package.json +1 -1
@@ -305,7 +305,6 @@
305
305
 
306
306
  {#if label || tooltip || icon || children}
307
307
  {#if !hasPopup && shouldShowTooltipOnText}
308
- <!-- Simple text with tooltip on text -->
309
308
  <Tooltip {...tooltip}>
310
309
  {#snippet target()}
311
310
  <div
@@ -320,7 +319,6 @@
320
319
  >
321
320
  {#if label?.trim() || icon || children}
322
321
  {#if ellipsisOnWidth && (icon || loading)}
323
- <!-- handling ellipsis with icons -->
324
322
  <div
325
323
  class="text-with-icon"
326
324
  style="display: flex; align-items: center; gap: 4px; width: {ellipsisOnWidth}; justify-content: {textAlign ===
@@ -356,7 +354,6 @@
356
354
  </div>
357
355
  </div>
358
356
  {:else}
359
- <!-- Normal text handling -->
360
357
  <div class={textClasses()} style={textStyles()}>
361
358
  {#if icon || loading}
362
359
  {#if loading}
@@ -392,7 +389,6 @@
392
389
  {/snippet}
393
390
  </Tooltip>
394
391
  {:else if !hasPopup && shouldShowTooltipOnIcon}
395
- <!-- Simple text with tooltip on icon -->
396
392
  <div
397
393
  class={labelClasses()}
398
394
  data-component="Text"
@@ -405,7 +401,6 @@
405
401
  >
406
402
  {#if label?.trim() || icon || children}
407
403
  {#if ellipsisOnWidth && (icon || loading)}
408
- <!-- handling ellipsis with icons -->
409
404
  <div
410
405
  class="text-with-icon"
411
406
  style="display: flex; align-items: center; gap: 4px; width: {ellipsisOnWidth}; justify-content: {textAlign ===
@@ -439,7 +434,6 @@
439
434
  </div>
440
435
  </div>
441
436
  {:else}
442
- <!-- Normal text handling -->
443
437
  <div class={textClasses()} style={textStyles()}>
444
438
  {#if icon || loading}
445
439
  {#if loading}
@@ -471,7 +465,6 @@
471
465
  {/if}
472
466
  </div>
473
467
  {:else if !hasPopup}
474
- <!-- Simple text without tooltip -->
475
468
  <div
476
469
  class={labelClasses()}
477
470
  data-component="Text"
@@ -484,7 +477,6 @@
484
477
  >
485
478
  {#if label?.trim() || icon || children}
486
479
  {#if ellipsisOnWidth && (icon || loading)}
487
- <!-- handling ellipsis with icons -->
488
480
  <div
489
481
  class="text-with-icon"
490
482
  style="display: flex; align-items: center; gap: 4px; width: {ellipsisOnWidth}; justify-content: {textAlign ===
@@ -514,7 +506,6 @@
514
506
  </div>
515
507
  </div>
516
508
  {:else}
517
- <!-- Normal text handling -->
518
509
  <div class={textClasses()} style={textStyles()}>
519
510
  {#if icon || loading}
520
511
  {#if loading}
@@ -542,7 +533,6 @@
542
533
  {/if}
543
534
  </div>
544
535
  {:else}
545
- <!-- Text with popup functionality -->
546
536
  <div
547
537
  class="label-popup {disabled ? 'disabled' : ''}"
548
538
  onclick={handlePopupToggle}
@@ -564,7 +554,6 @@
564
554
  {#snippet target()}
565
555
  <span class="dropdown-label item {popupConfig.active ? 'active' : ''}">
566
556
  {#if shouldShowTooltipOnText}
567
- <!-- Text with popup and tooltip on text -->
568
557
  <Tooltip {...tooltip}>
569
558
  {#snippet target()}
570
559
  <div
@@ -579,7 +568,6 @@
579
568
  >
580
569
  {#if label?.trim() || icon || children}
581
570
  {#if ellipsisOnWidth && (icon || loading)}
582
- <!-- handling ellipsis with icons -->
583
571
  <div
584
572
  class="text-with-icon"
585
573
  style="display: flex; align-items: center; gap: 4px; width: {ellipsisOnWidth}; justify-content: {textAlign ===
@@ -615,7 +603,6 @@
615
603
  </div>
616
604
  </div>
617
605
  {:else}
618
- <!-- Normal text handling -->
619
606
  <div class={textClasses()} style={textStyles()}>
620
607
  {#if icon || loading}
621
608
  {#if loading}
@@ -651,7 +638,6 @@
651
638
  {/snippet}
652
639
  </Tooltip>
653
640
  {:else if shouldShowTooltipOnIcon}
654
- <!-- Text with popup and tooltip on icon -->
655
641
  <div
656
642
  class={labelClasses()}
657
643
  data-component="Text"
@@ -664,7 +650,6 @@
664
650
  >
665
651
  {#if label?.trim() || icon || children}
666
652
  {#if ellipsisOnWidth && (icon || loading)}
667
- <!-- handling ellipsis with icons -->
668
653
  <div
669
654
  class="text-with-icon"
670
655
  style="display: flex; align-items: center; gap: 4px; width: {ellipsisOnWidth}; justify-content: {textAlign ===
@@ -698,7 +683,6 @@
698
683
  </div>
699
684
  </div>
700
685
  {:else}
701
- <!-- Normal text handling -->
702
686
  <div class={textClasses()} style={textStyles()}>
703
687
  {#if icon || loading}
704
688
  {#if loading}
@@ -730,7 +714,6 @@
730
714
  {/if}
731
715
  </div>
732
716
  {:else}
733
- <!-- Text with popup without tooltip -->
734
717
  <div
735
718
  class={labelClasses()}
736
719
  data-component="Text"
@@ -743,7 +726,6 @@
743
726
  >
744
727
  {#if label?.trim() || icon || children}
745
728
  {#if ellipsisOnWidth && (icon || loading)}
746
- <!-- handling ellipsis with icons -->
747
729
  <div
748
730
  class="text-with-icon"
749
731
  style="display: flex; align-items: center; gap: 4px; width: {ellipsisOnWidth}; justify-content: {textAlign ===
@@ -773,7 +755,6 @@
773
755
  </div>
774
756
  </div>
775
757
  {:else}
776
- <!-- Normal text handling -->
777
758
  <div class={textClasses()} style={textStyles()}>
778
759
  {#if icon || loading}
779
760
  {#if loading}
@@ -212,7 +212,6 @@
212
212
  tooltipEl.removeAttribute('data-trigger-type');
213
213
  isActive = false;
214
214
  hidden = true;
215
-
216
215
  activeTooltips = activeTooltips.filter((id) => id !== tooltipId);
217
216
 
218
217
  dispatchEvent('close', true);
@@ -356,7 +355,6 @@
356
355
  {#if target}
357
356
  {@render target()}
358
357
  {:else}
359
- <!-- Default target for Storybook compatibility -->
360
358
  <button
361
359
  style="
362
360
  padding: 4px 8px;
@@ -411,12 +409,17 @@
411
409
  display: none;
412
410
  top: 0;
413
411
  left: 0;
414
- z-index: 99999999999;
415
412
  border-radius: 4px;
413
+ z-index: 99999999999;
414
+ border-radius: var(--border-radius, 4px);
416
415
  background: var(--background3);
417
416
  box-shadow:
418
- 0px 0.5px 1px 0px #000,
419
- 0px 0.5px 0.5px 0px rgba(255, 255, 255, 0.12) inset;
417
+ 0 12px 24px 8px #0000004d,
418
+ 0 8px 16px 4px #0000004d,
419
+ 0 4px 8px 2px #0000,
420
+ 0 2px 6px #00000014,
421
+ 0 -0.5px 0.5px #0000 inset,
422
+ 0 0.5px 0.5px #ffffff57 inset;
420
423
  color: var(--text2);
421
424
  font-family: Inter;
422
425
  line-height: 120%;
@@ -431,6 +434,7 @@
431
434
  .content-wrapper {
432
435
  flex: 1;
433
436
  min-width: 0;
437
+ border-radius: var(--border-radius, 4px);
434
438
  z-index: 3;
435
439
  background: inherit;
436
440
  }
@@ -0,0 +1,17 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="17" viewBox="0 0 16 17" fill="none">
2
+ <g clip-path="url(#clip0_5665_3736)">
3
+ <path
4
+ d="M12.7839 6.16037V4.88037H8.15991V12.0924H9.79591V9.30037H12.1599V8.06837H9.79591V6.16037H12.7839Z"
5
+ fill="currentColor"
6
+ />
7
+ <path
8
+ d="M3.89982 5.37971V7.52371C3.90035 7.58096 3.88959 7.63776 3.86817 7.69086C3.84674 7.74396 3.81507 7.79232 3.77495 7.83318C3.73484 7.87404 3.68707 7.9066 3.63437 7.92899C3.58167 7.95139 3.52508 7.96318 3.46782 7.96371H3.21582V9.01171H3.46382C3.52108 9.01171 3.57777 9.02298 3.63067 9.0449C3.68357 9.06681 3.73163 9.09892 3.77212 9.13941C3.8126 9.17989 3.84472 9.22796 3.86663 9.28086C3.88854 9.33376 3.89982 9.39045 3.89982 9.44771V11.5677C3.89982 12.6677 4.47982 13.2677 5.53582 13.2677H6.51981V12.0677H5.92382C5.86826 12.0679 5.81299 12.0598 5.75982 12.0437C5.51182 11.9917 5.35982 11.7917 5.35982 11.4437V9.65171C5.35982 9.17171 5.35982 8.69571 4.73582 8.47571C5.35982 8.25171 5.35982 7.69971 5.35982 7.24771V5.49971C5.34084 5.36798 5.37117 5.23389 5.44499 5.12316C5.51881 5.01242 5.63092 4.93285 5.75982 4.89971C5.81592 4.88498 5.87383 4.87824 5.93182 4.87971H6.53181V3.69971H5.53582C4.46782 3.69971 3.89982 4.29971 3.89982 5.37971Z"
9
+ fill="currentColor"
10
+ />
11
+ </g>
12
+ <defs>
13
+ <clipPath id="clip0_5665_3736">
14
+ <rect y="0.5" width="16" height="16" rx="1.33333" fill="currentColor" />
15
+ </clipPath>
16
+ </defs>
17
+ </svg>
@@ -0,0 +1,26 @@
1
+ export default FinsweetLogoOutlineIcon;
2
+ type FinsweetLogoOutlineIcon = SvelteComponent<{
3
+ [x: string]: never;
4
+ }, {
5
+ [evt: string]: CustomEvent<any>;
6
+ }, {}> & {
7
+ $$bindings?: string | undefined;
8
+ };
9
+ declare const FinsweetLogoOutlineIcon: $$__sveltets_2_IsomorphicComponent<{
10
+ [x: string]: never;
11
+ }, {
12
+ [evt: string]: CustomEvent<any>;
13
+ }, {}, {}, string>;
14
+ 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> {
15
+ new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
16
+ $$bindings?: Bindings;
17
+ } & Exports;
18
+ (internal: unknown, props: {
19
+ $$events?: Events;
20
+ $$slots?: Slots;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
25
+ z_$$bindings?: Bindings;
26
+ }
@@ -1,4 +1,3 @@
1
- <!-- TriangleDownIconToggle.svelte -->
2
1
  <script lang="ts">
3
2
  export let rotate = false;
4
3
  </script>
@@ -46,6 +46,7 @@ import FileUploadIcon from './FileUploadIcon.svelte';
46
46
  import FilterIcon from './FilterIcon.svelte';
47
47
  import FinsweetLibraryIcon from './FinsweetLibraryIcon.svelte';
48
48
  import FinsweetLogoIcon from './FinsweetLogoIcon.svelte';
49
+ import FinsweetLogoOutlineIcon from './FinsweetLogoOutlineIcon.svelte';
49
50
  import FolderIcon from './FolderIcon.svelte';
50
51
  import FolderOutlinedIcon from './FolderOutlinedIcon.svelte';
51
52
  import FolderPlusIcon from './FolderPlusIcon.svelte';
@@ -118,4 +119,4 @@ import WizedLogoIcon from './WizedLogoIcon.svelte';
118
119
  import XL from './XL.svelte';
119
120
  import XXL from './XXL.svelte';
120
121
  import XXXL from './XXXL.svelte';
121
- export { AccordionDownArrow, AccordionUpArrow, AccountIcon, ArrowIcon, BackIcon, BodyIcon, BookmarkIcon, BoxAddIcon, BrushIcon, BuilderEditIcon, BuilderIcon, CheckboxCheckedIcon, CheckCircleIcon, CheckCircleOutlinedIcon, CheckIcon, ChevronIcon, ChevronRightIcon, CircleIcon, CloseCircleIcon, CloseIcon, CMSIcon, CodeIcon, ComponentsIcon, CookieIcon, CopyIcon, CrossIcon, DeleteIcon, DeleteOutlinedIcon, Desktop, DesktopWithStar, DivBlock, DOMElement, EditIcon, ExpertIcon, EyeCancelIcon, EyeIcon, FavouriteIcon, FileUploadIcon, FilterIcon, FinsweetLibraryIcon, FinsweetLogoIcon, FolderIcon, FolderOutlinedIcon, FolderPlusIcon, FreeComponentIcon, GlobeIcon, HandPointUpIcon, HeartIcon, HeartIconOutlined, HelpAltIcon, HelpIcon, HomeIcon, InfoIcon, LineChartIcon, ListIcon, LockIcon, MessageIcon, MobileLandscape, MobilePortrait, NavigatorIcon, OpenBookIcon, PageDraftIcon, PageIcon, PageLockedIcon, PageOutlinedIcon, PageSectionIcon, Pencil, PencilOutlinedIcon, PinIcon, PlayIcon, PlusIcon, PreviewEyeIcon, ProfileIcon, PublishCancelIcon, PublishIcon, RefreshIcon, RepairIcon, SaveIcon, SearchIcon, SelectIcon, SettingsIcon, SidebarToggleIcon, SliderAppIcon, SquareCheckIcon, StarIcon, StarOutlinedIcon, StaticContentIcon, SubtractIcon, TableAppIcon, Tablet, TabletPreview, TabNewIcon, TabsIcon, ThreeDotsIcon, TimesIcon, TooltipInfoCircleFilled, ToolTipInfoCircleIcon, TooltipInfoSquaredIcon, TriangleDownIcon, TriangleDownIconToggle, UndoIcon, UploadFileIcon, WarningCircleIcon, WarningCircleOutlineIcon, WarningTriangleIcon, WarningTriangleOutlineIcon, WebflowComponentIcon, WebflowComponentOutlinedIcon, WebflowInsightsIcon, WizedLogoIcon, XL, XXL, XXXL };
122
+ export { AccordionDownArrow, AccordionUpArrow, AccountIcon, ArrowIcon, BackIcon, BodyIcon, BookmarkIcon, BoxAddIcon, BrushIcon, BuilderEditIcon, BuilderIcon, CheckboxCheckedIcon, CheckCircleIcon, CheckCircleOutlinedIcon, CheckIcon, ChevronIcon, ChevronRightIcon, CircleIcon, CloseCircleIcon, CloseIcon, CMSIcon, CodeIcon, ComponentsIcon, CookieIcon, CopyIcon, CrossIcon, DeleteIcon, DeleteOutlinedIcon, Desktop, DesktopWithStar, DivBlock, DOMElement, EditIcon, ExpertIcon, EyeCancelIcon, EyeIcon, FavouriteIcon, FileUploadIcon, FilterIcon, FinsweetLibraryIcon, FinsweetLogoIcon, FinsweetLogoOutlineIcon, FolderIcon, FolderOutlinedIcon, FolderPlusIcon, FreeComponentIcon, GlobeIcon, HandPointUpIcon, HeartIcon, HeartIconOutlined, HelpAltIcon, HelpIcon, HomeIcon, InfoIcon, LineChartIcon, ListIcon, LockIcon, MessageIcon, MobileLandscape, MobilePortrait, NavigatorIcon, OpenBookIcon, PageDraftIcon, PageIcon, PageLockedIcon, PageOutlinedIcon, PageSectionIcon, Pencil, PencilOutlinedIcon, PinIcon, PlayIcon, PlusIcon, PreviewEyeIcon, ProfileIcon, PublishCancelIcon, PublishIcon, RefreshIcon, RepairIcon, SaveIcon, SearchIcon, SelectIcon, SettingsIcon, SidebarToggleIcon, SliderAppIcon, SquareCheckIcon, StarIcon, StarOutlinedIcon, StaticContentIcon, SubtractIcon, TableAppIcon, Tablet, TabletPreview, TabNewIcon, TabsIcon, ThreeDotsIcon, TimesIcon, TooltipInfoCircleFilled, ToolTipInfoCircleIcon, TooltipInfoSquaredIcon, TriangleDownIcon, TriangleDownIconToggle, UndoIcon, UploadFileIcon, WarningCircleIcon, WarningCircleOutlineIcon, WarningTriangleIcon, WarningTriangleOutlineIcon, WebflowComponentIcon, WebflowComponentOutlinedIcon, WebflowInsightsIcon, WizedLogoIcon, XL, XXL, XXXL };
@@ -46,6 +46,7 @@ import FileUploadIcon from './FileUploadIcon.svelte';
46
46
  import FilterIcon from './FilterIcon.svelte';
47
47
  import FinsweetLibraryIcon from './FinsweetLibraryIcon.svelte';
48
48
  import FinsweetLogoIcon from './FinsweetLogoIcon.svelte';
49
+ import FinsweetLogoOutlineIcon from './FinsweetLogoOutlineIcon.svelte';
49
50
  import FolderIcon from './FolderIcon.svelte';
50
51
  import FolderOutlinedIcon from './FolderOutlinedIcon.svelte';
51
52
  import FolderPlusIcon from './FolderPlusIcon.svelte';
@@ -118,4 +119,4 @@ import WizedLogoIcon from './WizedLogoIcon.svelte';
118
119
  import XL from './XL.svelte';
119
120
  import XXL from './XXL.svelte';
120
121
  import XXXL from './XXXL.svelte';
121
- export { AccordionDownArrow, AccordionUpArrow, AccountIcon, ArrowIcon, BackIcon, BodyIcon, BookmarkIcon, BoxAddIcon, BrushIcon, BuilderEditIcon, BuilderIcon, CheckboxCheckedIcon, CheckCircleIcon, CheckCircleOutlinedIcon, CheckIcon, ChevronIcon, ChevronRightIcon, CircleIcon, CloseCircleIcon, CloseIcon, CMSIcon, CodeIcon, ComponentsIcon, CookieIcon, CopyIcon, CrossIcon, DeleteIcon, DeleteOutlinedIcon, Desktop, DesktopWithStar, DivBlock, DOMElement, EditIcon, ExpertIcon, EyeCancelIcon, EyeIcon, FavouriteIcon, FileUploadIcon, FilterIcon, FinsweetLibraryIcon, FinsweetLogoIcon, FolderIcon, FolderOutlinedIcon, FolderPlusIcon, FreeComponentIcon, GlobeIcon, HandPointUpIcon, HeartIcon, HeartIconOutlined, HelpAltIcon, HelpIcon, HomeIcon, InfoIcon, LineChartIcon, ListIcon, LockIcon, MessageIcon, MobileLandscape, MobilePortrait, NavigatorIcon, OpenBookIcon, PageDraftIcon, PageIcon, PageLockedIcon, PageOutlinedIcon, PageSectionIcon, Pencil, PencilOutlinedIcon, PinIcon, PlayIcon, PlusIcon, PreviewEyeIcon, ProfileIcon, PublishCancelIcon, PublishIcon, RefreshIcon, RepairIcon, SaveIcon, SearchIcon, SelectIcon, SettingsIcon, SidebarToggleIcon, SliderAppIcon, SquareCheckIcon, StarIcon, StarOutlinedIcon, StaticContentIcon, SubtractIcon, TableAppIcon, Tablet, TabletPreview, TabNewIcon, TabsIcon, ThreeDotsIcon, TimesIcon, TooltipInfoCircleFilled, ToolTipInfoCircleIcon, TooltipInfoSquaredIcon, TriangleDownIcon, TriangleDownIconToggle, UndoIcon, UploadFileIcon, WarningCircleIcon, WarningCircleOutlineIcon, WarningTriangleIcon, WarningTriangleOutlineIcon, WebflowComponentIcon, WebflowComponentOutlinedIcon, WebflowInsightsIcon, WizedLogoIcon, XL, XXL, XXXL };
122
+ export { AccordionDownArrow, AccordionUpArrow, AccountIcon, ArrowIcon, BackIcon, BodyIcon, BookmarkIcon, BoxAddIcon, BrushIcon, BuilderEditIcon, BuilderIcon, CheckboxCheckedIcon, CheckCircleIcon, CheckCircleOutlinedIcon, CheckIcon, ChevronIcon, ChevronRightIcon, CircleIcon, CloseCircleIcon, CloseIcon, CMSIcon, CodeIcon, ComponentsIcon, CookieIcon, CopyIcon, CrossIcon, DeleteIcon, DeleteOutlinedIcon, Desktop, DesktopWithStar, DivBlock, DOMElement, EditIcon, ExpertIcon, EyeCancelIcon, EyeIcon, FavouriteIcon, FileUploadIcon, FilterIcon, FinsweetLibraryIcon, FinsweetLogoIcon, FinsweetLogoOutlineIcon, FolderIcon, FolderOutlinedIcon, FolderPlusIcon, FreeComponentIcon, GlobeIcon, HandPointUpIcon, HeartIcon, HeartIconOutlined, HelpAltIcon, HelpIcon, HomeIcon, InfoIcon, LineChartIcon, ListIcon, LockIcon, MessageIcon, MobileLandscape, MobilePortrait, NavigatorIcon, OpenBookIcon, PageDraftIcon, PageIcon, PageLockedIcon, PageOutlinedIcon, PageSectionIcon, Pencil, PencilOutlinedIcon, PinIcon, PlayIcon, PlusIcon, PreviewEyeIcon, ProfileIcon, PublishCancelIcon, PublishIcon, RefreshIcon, RepairIcon, SaveIcon, SearchIcon, SelectIcon, SettingsIcon, SidebarToggleIcon, SliderAppIcon, SquareCheckIcon, StarIcon, StarOutlinedIcon, StaticContentIcon, SubtractIcon, TableAppIcon, Tablet, TabletPreview, TabNewIcon, TabsIcon, ThreeDotsIcon, TimesIcon, TooltipInfoCircleFilled, ToolTipInfoCircleIcon, TooltipInfoSquaredIcon, TriangleDownIcon, TriangleDownIconToggle, UndoIcon, UploadFileIcon, WarningCircleIcon, WarningCircleOutlineIcon, WarningTriangleIcon, WarningTriangleOutlineIcon, WebflowComponentIcon, WebflowComponentOutlinedIcon, WebflowInsightsIcon, WizedLogoIcon, XL, XXL, XXXL };
package/dist/ui/index.css CHANGED
@@ -10,7 +10,7 @@
10
10
  --background1: #292929;
11
11
  --black: #000000;
12
12
  --background2: #353535;
13
- --background3: #404040;
13
+ --background3: #383838;
14
14
  --background-background-3: #363636;
15
15
  --background4: #373737;
16
16
  --background5: #404040;
@@ -57,12 +57,10 @@
57
57
  </div>
58
58
 
59
59
  {#snippet DemoContent()}
60
- <!-- Get contexts and data reactively -->
61
60
  {@const appContext = useAppContext<DemoConfigType>()}
62
61
  {@const formContext = useFormContext()}
63
62
  {@const configuratorContext = useConfiguratorContext<DemoConfigType>()}
64
63
 
65
- <!-- Force reactive updates with trigger -->
66
64
  {#key refreshTrigger}
67
65
  {@const appData = appContext.get()}
68
66
  {@const formData = formContext.get()}
@@ -345,7 +345,7 @@ interface HistoryEntry {
345
345
  ### Complete Application Setup
346
346
 
347
347
  \`\`\`typescript
348
- <!-- App.svelte -->
348
+
349
349
  <script lang="ts">
350
350
  import { onMount } from 'svelte';
351
351
  import { createRouter, RouterProvider, Route, Link } from '@finsweet/webflow-apps-utils';
@@ -379,7 +379,7 @@ interface HistoryEntry {
379
379
  <RouterProvider {router}>
380
380
  {#snippet children({ router, currentRoute, isNavigating })}
381
381
  <div class="app">
382
- <!-- Navigation -->
382
+
383
383
  <nav class="navbar">
384
384
  <div class="nav-brand">
385
385
  <Link to="/">My App</Link>
@@ -391,17 +391,17 @@ interface HistoryEntry {
391
391
  </ul>
392
392
  </nav>
393
393
 
394
- <!-- Loading indicator -->
394
+
395
395
  {#if isNavigating}
396
396
  <div class="loading-bar"></div>
397
397
  {/if}
398
398
 
399
- <!-- Page title -->
399
+
400
400
  <title>{currentRoute?.meta?.title || 'My App'}</title>
401
401
 
402
- <!-- Main content -->
402
+
403
403
  <main class="main-content">
404
- <!-- Routes -->
404
+
405
405
  <Route path="/" component={HomePage} />
406
406
  <Route path="/about" component={AboutPage} />
407
407
  <Route path="/users/:id">
@@ -421,7 +421,7 @@ interface HistoryEntry {
421
421
  ### Using Hooks in Components
422
422
 
423
423
  \`\`\`typescript
424
- <!-- UserProfile.svelte -->
424
+
425
425
  <script lang="ts">
426
426
  import { useParams, useNavigate, useSearchParams } from '@finsweet/webflow-apps-utils';
427
427
 
@@ -36,7 +36,6 @@
36
36
  <RouterProvider {router}>
37
37
  {#snippet children({ router, currentRoute, currentLocation, isNavigating })}
38
38
  <div class="app-layout">
39
- <!-- Navigation -->
40
39
  <nav class="navigation">
41
40
  <div class="nav-brand">
42
41
  <h3>My App</h3>
@@ -57,7 +56,6 @@
57
56
  </ul>
58
57
  </nav>
59
58
 
60
- <!-- Loading indicator -->
61
59
  {#if isNavigating}
62
60
  <div class="loading-indicator">
63
61
  <div class="spinner"></div>
@@ -65,7 +63,6 @@
65
63
  </div>
66
64
  {/if}
67
65
 
68
- <!-- Route information display -->
69
66
  <div class="route-info">
70
67
  <strong>Current Route:</strong>
71
68
  {currentLocation?.pathname || 'None'}<br />
@@ -77,9 +74,7 @@
77
74
  {currentLocation?.search || 'None'}
78
75
  </div>
79
76
 
80
- <!-- Main content area -->
81
77
  <main class="main-content">
82
- <!-- Home Route -->
83
78
  <Route path="/">
84
79
  {#snippet children({ params, location, router, isActive })}
85
80
  {#if isActive}
@@ -88,7 +83,6 @@
88
83
  {/snippet}
89
84
  </Route>
90
85
 
91
- <!-- About Route (with optional section parameter) -->
92
86
  <Route path="/about">
93
87
  {#snippet children({ params, location, router, isActive })}
94
88
  {#if isActive}
@@ -97,7 +91,6 @@
97
91
  {/snippet}
98
92
  </Route>
99
93
 
100
- <!-- About with section parameter -->
101
94
  <Route path="/about/:section">
102
95
  {#snippet children({ params, location, router, isActive })}
103
96
  {#if isActive}
@@ -106,7 +99,6 @@
106
99
  {/snippet}
107
100
  </Route>
108
101
 
109
- <!-- Fallback route (404) -->
110
102
  <Route path="*" exact={false}>
111
103
  {#snippet children({ params, location, router, isActive })}
112
104
  {#if isActive && !router.isActive('/') && !router.isActive('/about')}
@@ -116,7 +108,6 @@
116
108
  </Route>
117
109
  </main>
118
110
 
119
- <!-- Router controls -->
120
111
  <div class="router-controls">
121
112
  <h4>Router Controls</h4>
122
113
  <div class="controls-grid">
@@ -74,7 +74,6 @@
74
74
 
75
75
  <div class="about-page">
76
76
  {#if section && currentSection}
77
- <!-- Section-specific content -->
78
77
  <div class="section-header">
79
78
  <button class="back-button" onclick={() => router.navigate('/about')}>
80
79
  ← Back to About
@@ -158,7 +157,6 @@
158
157
  {/if}
159
158
  </div>
160
159
 
161
- <!-- Navigation to other sections -->
162
160
  <div class="section-navigation">
163
161
  <h3>Explore More</h3>
164
162
  <div class="nav-buttons">
@@ -172,7 +170,6 @@
172
170
  </div>
173
171
  </div>
174
172
  {:else}
175
- <!-- Main about page -->
176
173
  <div class="main-about">
177
174
  <header class="about-header">
178
175
  <h1>About Our Company</h1>
@@ -232,7 +229,6 @@
232
229
  </div>
233
230
  {/if}
234
231
 
235
- <!-- Debug information -->
236
232
  <div class="debug-section">
237
233
  <h3>Route Debug Information</h3>
238
234
  <div class="debug-info">
@@ -106,7 +106,6 @@
106
106
  });
107
107
  </script>
108
108
 
109
- <!-- Render as anchor tag by default -->
110
109
  {#if element === 'a'}
111
110
  <a
112
111
  {href}
@@ -122,7 +121,6 @@
122
121
  {/if}
123
122
  </a>
124
123
  {:else if element === 'button'}
125
- <!-- Render as button -->
126
124
  <button
127
125
  type="button"
128
126
  class={className}
@@ -64,14 +64,11 @@
64
64
  });
65
65
  </script>
66
66
 
67
- <!-- Render content only if route is active -->
68
67
  {#if isActive}
69
68
  {#if component}
70
- <!-- Render provided component with route props -->
71
69
  {@const Component = component}
72
70
  <Component params={routeParams} location={currentLocation} {router} />
73
71
  {:else if children}
74
- <!-- Render children snippet with route data -->
75
72
  {@render children({
76
73
  params: routeParams,
77
74
  location: currentLocation,
@@ -1,4 +1,5 @@
1
1
  import { derived } from 'svelte/store';
2
+ import { z } from 'zod';
2
3
  interface FormState<T> {
3
4
  values: T;
4
5
  errors: Record<keyof T, string[]>;
@@ -7,6 +8,108 @@ interface FormState<T> {
7
8
  isDirty: boolean;
8
9
  isSubmitting: boolean;
9
10
  }
11
+ /**
12
+ * Generic Form Manager for any Zod schema with cross-component field support
13
+ */
14
+ export declare class FormManager<T extends Record<string, unknown>> {
15
+ private schema;
16
+ private _store;
17
+ private initialValues;
18
+ private identifier;
19
+ private fieldRegistrations;
20
+ readonly values: ReturnType<typeof derived<typeof this._store, T>>;
21
+ readonly errors: ReturnType<typeof derived<typeof this._store, Record<keyof T, string[]>>>;
22
+ readonly touched: ReturnType<typeof derived<typeof this._store, Record<keyof T, boolean>>>;
23
+ readonly isValid: ReturnType<typeof derived<typeof this._store, boolean>>;
24
+ readonly isDirty: ReturnType<typeof derived<typeof this._store, boolean>>;
25
+ readonly isSubmitting: ReturnType<typeof derived<typeof this._store, boolean>>;
26
+ constructor(identifier: string, schema: z.ZodType<T>, initialValues: T);
27
+ /**
28
+ * Register a field with the form for cross-component management
29
+ */
30
+ registerField<K extends keyof T>(fieldName: K, options?: {
31
+ validate?: (value: T[K]) => string | null;
32
+ transform?: (value: unknown) => T[K];
33
+ }): {
34
+ value: import("svelte/store").Readable<T[K]>;
35
+ error: import("svelte/store").Readable<Record<keyof T, string[]>[K]>;
36
+ touched: import("svelte/store").Readable<false | Record<keyof T, boolean>[K]>;
37
+ setValue: (value: T[K]) => void;
38
+ setTouched: () => void;
39
+ validate: () => string[];
40
+ };
41
+ /**
42
+ * Set the value of a specific field
43
+ */
44
+ setField<K extends keyof T>(field: K, value: T[K]): void;
45
+ /**
46
+ * Set multiple field values at once
47
+ */
48
+ setFields(values: Partial<T>): void;
49
+ /**
50
+ * Set a field as touched without changing its value
51
+ */
52
+ setTouched<K extends keyof T>(field: K): void;
53
+ /**
54
+ * Validate a specific field
55
+ */
56
+ validateField<K extends keyof T>(field: K): string[];
57
+ /**
58
+ * Reset the form to initial values
59
+ */
60
+ reset(): void;
61
+ /**
62
+ * Set the form as submitting
63
+ */
64
+ setSubmitting(isSubmitting: boolean): void;
65
+ /**
66
+ * Update the schema (useful for dynamic forms)
67
+ */
68
+ updateSchema(newSchema: z.ZodType<T>): void;
69
+ /**
70
+ * Validate the entire form
71
+ */
72
+ private validate;
73
+ /**
74
+ * Get the current state of the form
75
+ */
76
+ getState(): FormState<T>;
77
+ /**
78
+ * Destroy the form and clean up resources
79
+ */
80
+ destroy(): void;
81
+ }
82
+ /**
83
+ * Creates a generic form with Zod validation
84
+ */
85
+ export declare function createGenericForm<T extends Record<string, unknown>>(identifier: string, schema: z.ZodType<T>, initialValues: T): {
86
+ values: import("svelte/store").Readable<T>;
87
+ errors: import("svelte/store").Readable<Record<keyof T, string[]>>;
88
+ touched: import("svelte/store").Readable<Record<keyof T, boolean>>;
89
+ isValid: import("svelte/store").Readable<boolean>;
90
+ isDirty: import("svelte/store").Readable<boolean>;
91
+ isSubmitting: import("svelte/store").Readable<boolean>;
92
+ setField: <K extends keyof T>(field: K, value: T[K]) => void;
93
+ setFields: (values: Partial<T>) => void;
94
+ setTouched: <K extends keyof T>(field: K) => void;
95
+ reset: () => void;
96
+ setSubmitting: (isSubmitting: boolean) => void;
97
+ updateSchema: (newSchema: z.ZodType<T, z.ZodTypeDef, T>) => void;
98
+ registerField: <K extends keyof T>(fieldName: K, options?: {
99
+ validate?: ((value: T[K]) => string | null) | undefined;
100
+ transform?: ((value: unknown) => T[K]) | undefined;
101
+ } | undefined) => {
102
+ value: import("svelte/store").Readable<T[K]>;
103
+ error: import("svelte/store").Readable<Record<keyof T, string[]>[K]>;
104
+ touched: import("svelte/store").Readable<false | Record<keyof T, boolean>[K]>;
105
+ setValue: (value: T[K]) => void;
106
+ setTouched: () => void;
107
+ validate: () => string[];
108
+ };
109
+ validateField: <K extends keyof T>(field: K) => string[];
110
+ getState: () => FormState<T>;
111
+ destroy: () => void;
112
+ };
10
113
  /**
11
114
  * Creates a form validation utility with Svelte 5 reactive stores
12
115
  * @param identifier - Unique identifier for the form
@@ -85,7 +188,7 @@ export declare class FormValidator<T extends {
85
188
  */
86
189
  setSubmitting(isSubmitting: boolean): void;
87
190
  /**
88
- * Get the current state of the form (for legacy compatibility)
191
+ * Get the current state of the form
89
192
  */
90
193
  getState(): FormState<T>;
91
194
  }
@@ -118,7 +221,11 @@ export declare function createForm<T extends {
118
221
  /**
119
222
  * Get a form by its identifier
120
223
  */
121
- export declare function getFormById(identifier: string): FormValidator<any> | undefined;
224
+ export declare function getFormById(identifier: string): FormValidator<{
225
+ name: string;
226
+ instance: string;
227
+ class: string;
228
+ }> | FormManager<Record<string, unknown>> | undefined;
122
229
  /**
123
230
  * Check if a form with a specific identifier is valid
124
231
  */
@@ -136,9 +243,35 @@ export declare function createFormSubscription(identifier: string): import("svel
136
243
  errors: {};
137
244
  values: {};
138
245
  }> | {
139
- subscribe: (this: void, run: import("svelte/store").Subscriber<FormState<any>>, invalidate?: () => void) => import("svelte/store").Unsubscriber;
246
+ subscribe: (this: void, run: import("svelte/store").Subscriber<FormState<{
247
+ name: string;
248
+ instance: string;
249
+ class: string;
250
+ }> | FormState<Record<string, unknown>>>, invalidate?: () => void) => import("svelte/store").Unsubscriber;
140
251
  destroy: () => void;
141
252
  };
253
+ /**
254
+ * Helper to get field state for a specific form and field
255
+ */
256
+ export declare function getFieldState<T extends Record<string, unknown>>(formId: string, fieldName: keyof T): {
257
+ value: undefined;
258
+ error: never[];
259
+ touched: boolean;
260
+ isValid: boolean;
261
+ } | {
262
+ value: T[keyof T];
263
+ error: Record<keyof T, string[]>[keyof T];
264
+ touched: boolean | Record<keyof T, boolean>[keyof T];
265
+ isValid: boolean;
266
+ };
267
+ /**
268
+ * Helper to update a field value for a specific form
269
+ */
270
+ export declare function updateFieldValue<T extends Record<string, unknown>>(formId: string, fieldName: keyof T, value: T[typeof fieldName]): void;
271
+ /**
272
+ * Helper to get all registered field names for a form
273
+ */
274
+ export declare function getFormFieldNames(formId: string): string[];
142
275
  /**
143
276
  * Store to track if the form is adding or updating to the Canvas
144
277
  */