@bitrix24/b24ui-nuxt 0.4.10 → 0.5.0

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 (55) hide show
  1. package/.nuxt/b24ui/collapsible.ts +6 -0
  2. package/.nuxt/b24ui/index.ts +2 -0
  3. package/.nuxt/b24ui/navigation-menu.ts +312 -0
  4. package/.nuxt/b24ui/sidebar-body.ts +1 -1
  5. package/.nuxt/b24ui/sidebar-footer.ts +1 -1
  6. package/.nuxt/b24ui/sidebar-header.ts +1 -1
  7. package/.nuxt/b24ui/sidebar-heading.ts +1 -1
  8. package/.nuxt/b24ui/sidebar-section.ts +1 -1
  9. package/cli/package.json +1 -1
  10. package/dist/meta.cjs +9778 -588
  11. package/dist/meta.d.cts +9778 -588
  12. package/dist/meta.d.mts +9778 -588
  13. package/dist/meta.d.ts +9778 -588
  14. package/dist/meta.mjs +9778 -588
  15. package/dist/module.cjs +1 -1
  16. package/dist/module.json +1 -1
  17. package/dist/module.mjs +1 -1
  18. package/dist/runtime/components/Collapsible.vue +56 -0
  19. package/dist/runtime/components/DropdownMenu.vue +3 -1
  20. package/dist/runtime/components/Form.vue +21 -1
  21. package/dist/runtime/components/FormField.vue +5 -0
  22. package/dist/runtime/components/Navbar.vue +1 -2
  23. package/dist/runtime/components/NavbarDivider.vue +1 -2
  24. package/dist/runtime/components/NavbarSection.vue +1 -2
  25. package/dist/runtime/components/NavbarSpacer.vue +1 -2
  26. package/dist/runtime/components/NavigationMenu.vue +345 -0
  27. package/dist/runtime/components/Sidebar.vue +1 -2
  28. package/dist/runtime/components/SidebarFooter.vue +1 -2
  29. package/dist/runtime/components/SidebarHeader.vue +1 -2
  30. package/dist/runtime/components/SidebarHeading.vue +1 -2
  31. package/dist/runtime/components/SidebarLayout.vue +34 -8
  32. package/dist/runtime/components/SidebarSection.vue +1 -2
  33. package/dist/runtime/components/SidebarSpacer.vue +1 -2
  34. package/dist/runtime/components/StackedLayout.vue +1 -3
  35. package/dist/runtime/composables/defineLocale.js +1 -0
  36. package/dist/runtime/composables/defineShortcuts.js +1 -0
  37. package/dist/runtime/composables/useKbd.js +1 -1
  38. package/dist/runtime/composables/useLocale.js +2 -2
  39. package/dist/runtime/composables/useOverlay.js +1 -1
  40. package/dist/runtime/index.css +1 -1
  41. package/dist/runtime/types/form.d.ts +1 -3
  42. package/dist/runtime/types/index.d.ts +2 -0
  43. package/dist/runtime/types/index.js +2 -0
  44. package/dist/runtime/utils/form.d.ts +0 -4
  45. package/dist/runtime/utils/form.js +2 -47
  46. package/dist/runtime/utils/link.d.ts +8 -8
  47. package/dist/runtime/utils/tv.js +1 -1
  48. package/dist/runtime/vue/stubs.d.ts +1 -1
  49. package/dist/shared/{b24ui-nuxt._rviRWFf.mjs → b24ui-nuxt.Bj4fKDSa.mjs} +375 -4
  50. package/dist/shared/{b24ui-nuxt.CY35QViH.cjs → b24ui-nuxt.DHbGsmbj.cjs} +375 -4
  51. package/dist/unplugin.cjs +1 -1
  52. package/dist/unplugin.mjs +1 -1
  53. package/dist/vite.cjs +1 -1
  54. package/dist/vite.mjs +1 -1
  55. package/package.json +6 -6
@@ -1635,6 +1635,16 @@ const chip = {
1635
1635
  }
1636
1636
  };
1637
1637
 
1638
+ const collapsible = {
1639
+ slots: {
1640
+ root: "",
1641
+ content: [
1642
+ "motion-safe:data-[state=open]:animate-[collapsible-down_200ms_ease-out] motion-safe:data-[state=closed]:animate-[collapsible-up_200ms_ease-out]",
1643
+ "overflow-hidden"
1644
+ ].join(" ")
1645
+ }
1646
+ };
1647
+
1638
1648
  const container = {
1639
1649
  base: "max-w-[80rem] mx-auto px-5"
1640
1650
  // max-w-7xl w-full
@@ -3503,6 +3513,365 @@ const modal = {
3503
3513
  }
3504
3514
  };
3505
3515
 
3516
+ const navigationMenu = {
3517
+ slots: {
3518
+ root: "relative flex [&>div]:min-w-0 font-b24-secondary",
3519
+ list: "isolate min-w-0",
3520
+ label: [
3521
+ "w-full min-h-6",
3522
+ "flex items-center rtl:flex-row-reverse gap-1.5",
3523
+ "font-medium text-xs/6",
3524
+ "text-base-500 dark:text-base-400",
3525
+ "ps-2xl pe-xs rtl:ps-xs rtl:pe-2xl"
3526
+ ].join(" "),
3527
+ item: "min-w-0",
3528
+ link: [
3529
+ "group relative",
3530
+ "cursor-pointer",
3531
+ "w-full",
3532
+ "flex items-center gap-1.5",
3533
+ "font-normal text-lg leading-9 min-h-9",
3534
+ "before:absolute before:z-[-1]",
3535
+ "focus:outline-none focus-visible:before:rounded-md focus-visible:outline-none dark:focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2"
3536
+ ].join(" "),
3537
+ linkLeadingIcon: "shrink-0 size-5",
3538
+ linkLeadingAvatar: "shrink-0",
3539
+ linkLeadingAvatarSize: "2xs",
3540
+ linkTrailing: "ms-auto inline-flex gap-1.5 items-center",
3541
+ linkTrailingBadge: "shrink-0",
3542
+ linkTrailingBadgeSize: "sm",
3543
+ linkTrailingIcon: "text-base-600 size-5 transform shrink-0 group-data-[state=open]:rotate-180 transition-transform duration-200",
3544
+ linkLabel: "truncate",
3545
+ linkLabelExternalIcon: "inline-block h-6 w-3 align-top text-base-500 dark:text-base-700",
3546
+ childList: "",
3547
+ childItem: "",
3548
+ childLink: [
3549
+ "group",
3550
+ "size-full",
3551
+ "px-3 py-2",
3552
+ // 'rounded-md',
3553
+ "flex items-start gap-2",
3554
+ "text-start"
3555
+ ].join(" "),
3556
+ childLinkWrapper: "flex flex-col items-start",
3557
+ childLinkIcon: "size-5 shrink-0",
3558
+ childLinkLabel: "font-semibold text-sm relative inline-flex",
3559
+ childLinkLabelExternalIcon: "inline-block h-6 w-3 align-top text-base-500 dark:text-base-700",
3560
+ childLinkDescription: "text-sm text-(--ui-text-muted)",
3561
+ separator: "px-2 h-px bg-(--ui-border)",
3562
+ viewportWrapper: "absolute top-full left-0 flex w-full",
3563
+ viewport: [
3564
+ "relative overflow-hidden",
3565
+ "w-full",
3566
+ "bg-(--ui-bg)",
3567
+ "shadow-lg",
3568
+ "rounded-md",
3569
+ "ring ring-(--ui-border)",
3570
+ "h-(--reka-navigation-menu-viewport-height)",
3571
+ "transition-[width,height,left] duration-200 origin-[top_center]",
3572
+ "motion-safe:data-[state=open]:animate-[scale-in_100ms_ease-out] motion-safe:data-[state=closed]:animate-[scale-out_100ms_ease-in]"
3573
+ ].join(" "),
3574
+ content: "absolute top-0 left-0 w-full",
3575
+ indicator: [
3576
+ "absolute",
3577
+ "motion-safe:data-[state=visible]:animate-[fade-in_100ms_ease-out] motion-safe:data-[state=hidden]:animate-[fade-out_100ms_ease-in]",
3578
+ "data-[state=hidden]:opacity-0",
3579
+ "bottom-0",
3580
+ "z-[1]",
3581
+ "w-(--reka-navigation-menu-indicator-size)",
3582
+ "h-2.5",
3583
+ "translate-x-(--reka-navigation-menu-indicator-position)",
3584
+ "flex items-end justify-center",
3585
+ "overflow-hidden",
3586
+ "transition-[translate,width] duration-200"
3587
+ ].join(" "),
3588
+ arrow: "relative top-[50%] size-2.5 rotate-45 border border-(--ui-border) bg-(--ui-bg) z-[1] rounded-md"
3589
+ },
3590
+ variants: {
3591
+ color: {
3592
+ default: {
3593
+ link: "focus-visible:before:ring-base-300 dark:focus-visible:before:ring-base-800",
3594
+ childLink: "focus-visible:outline-base-300 dark:focus-visible:outline-base-800"
3595
+ },
3596
+ danger: "",
3597
+ success: "",
3598
+ warning: "",
3599
+ primary: "",
3600
+ secondary: "",
3601
+ collab: "",
3602
+ ai: ""
3603
+ },
3604
+ highlightColor: {
3605
+ default: "",
3606
+ danger: "",
3607
+ success: "",
3608
+ warning: "",
3609
+ primary: "",
3610
+ secondary: "",
3611
+ collab: "",
3612
+ ai: ""
3613
+ },
3614
+ variant: {
3615
+ pill: {
3616
+ link: [
3617
+ "hover:before:bg-base-250/80 dark:hover:before:bg-white/10"
3618
+ ].join(" ")
3619
+ },
3620
+ link: ""
3621
+ },
3622
+ orientation: {
3623
+ horizontal: {
3624
+ root: "items-center justify-between",
3625
+ list: "flex items-center",
3626
+ item: "py-2",
3627
+ link: "px-2.5 py-1.5 before:inset-x-px before:inset-y-0",
3628
+ childList: "grid p-2"
3629
+ },
3630
+ vertical: {
3631
+ root: "flex-col w-full",
3632
+ link: [
3633
+ "ps-2xl pe-xs rtl:ps-xs rtl:pe-2xl",
3634
+ "flex-row rtl:flex-row-reverse",
3635
+ "before:inset-y-px before:inset-x-0"
3636
+ ].join(" ")
3637
+ }
3638
+ },
3639
+ contentOrientation: {
3640
+ horizontal: {
3641
+ viewport: "",
3642
+ viewportWrapper: "justify-center",
3643
+ content: "motion-safe:data-[motion=from-start]:animate-[enter-from-left_200ms_ease] motion-safe:data-[motion=from-end]:animate-[enter-from-right_200ms_ease] motion-safe:data-[motion=to-start]:animate-[exit-to-left_200ms_ease] motion-safe:data-[motion=to-end]:animate-[exit-to-right_200ms_ease]"
3644
+ },
3645
+ vertical: {
3646
+ viewport: "sm:w-(--reka-navigation-menu-viewport-width) left-(--reka-navigation-menu-viewport-left)",
3647
+ content: ""
3648
+ }
3649
+ },
3650
+ active: {
3651
+ true: {
3652
+ childLink: "bg-(--ui-bg-elevated) text-(--ui-text-highlighted)",
3653
+ childLinkIcon: "text-(--ui-text)"
3654
+ },
3655
+ false: {
3656
+ link: "text-base-900 dark:text-base-200",
3657
+ linkLeadingIcon: "text-base-500 dark:text-base-700",
3658
+ childLink: [
3659
+ "hover:bg-(--ui-bg-elevated)/50 text-(--ui-text) hover:text-(--ui-text-highlighted)",
3660
+ "transition-colors"
3661
+ ].join(" "),
3662
+ childLinkIcon: [
3663
+ "text-base-500 dark:text-base-700",
3664
+ "group-hover:text-(--ui-text)",
3665
+ "transition-colors"
3666
+ ].join(" ")
3667
+ }
3668
+ },
3669
+ disabled: {
3670
+ true: {
3671
+ link: "cursor-not-allowed opacity-75"
3672
+ }
3673
+ },
3674
+ highlight: {
3675
+ true: ""
3676
+ },
3677
+ level: {
3678
+ true: ""
3679
+ },
3680
+ collapsed: {
3681
+ true: ""
3682
+ }
3683
+ },
3684
+ compoundVariants: [
3685
+ // region horizontal ////
3686
+ {
3687
+ orientation: "horizontal",
3688
+ contentOrientation: "horizontal",
3689
+ class: {
3690
+ childList: "grid-cols-2 gap-2"
3691
+ }
3692
+ },
3693
+ {
3694
+ orientation: "horizontal",
3695
+ contentOrientation: "vertical",
3696
+ class: {
3697
+ childList: "gap-1",
3698
+ content: "w-60"
3699
+ }
3700
+ },
3701
+ {
3702
+ orientation: "horizontal",
3703
+ highlight: true,
3704
+ class: {
3705
+ link: ["after:absolute after:-bottom-2 after:inset-x-2.5 after:block after:h-px after:rounded-full", "after:transition-colors"]
3706
+ }
3707
+ },
3708
+ // endregion ////
3709
+ // region vertical ////
3710
+ {
3711
+ orientation: "vertical",
3712
+ highlight: true,
3713
+ level: true,
3714
+ class: {
3715
+ link: ["after:absolute after:-start-1.5 after:inset-y-0.5 after:block after:w-px after:rounded-full", "after:transition-colors"]
3716
+ }
3717
+ },
3718
+ // endregion ////
3719
+ // region disabled ////
3720
+ {
3721
+ disabled: false,
3722
+ active: false,
3723
+ variant: "pill",
3724
+ class: {
3725
+ link: [
3726
+ "transition-colors before:transition-colors"
3727
+ ].join(" "),
3728
+ linkLeadingIcon: [
3729
+ "group-hover:text-(--ui-text)",
3730
+ "transition-colors"
3731
+ ].join(" ")
3732
+ }
3733
+ },
3734
+ {
3735
+ disabled: false,
3736
+ active: false,
3737
+ variant: "pill",
3738
+ orientation: "horizontal",
3739
+ class: {
3740
+ link: "data-[state=open]:text-(--ui-text-highlighted)",
3741
+ linkLeadingIcon: "group-data-[state=open]:text-(--ui-text)"
3742
+ }
3743
+ },
3744
+ {
3745
+ disabled: false,
3746
+ variant: "pill",
3747
+ highlight: true,
3748
+ orientation: "horizontal",
3749
+ class: {
3750
+ link: "data-[state=open]:before:bg-(--ui-bg-elevated)/50"
3751
+ }
3752
+ },
3753
+ {
3754
+ disabled: false,
3755
+ variant: "pill",
3756
+ highlight: false,
3757
+ active: false,
3758
+ orientation: "horizontal",
3759
+ class: {
3760
+ link: "data-[state=open]:before:bg-(--ui-bg-elevated)/50"
3761
+ }
3762
+ },
3763
+ // endregion ////
3764
+ {
3765
+ color: "default",
3766
+ variant: "pill",
3767
+ active: true,
3768
+ class: {
3769
+ // link: 'text-(--ui-text-highlighted)',
3770
+ linkLeadingIcon: "text-(--ui-text-highlighted) group-data-[state=open]:text-(--ui-text-highlighted)",
3771
+ linkLabel: [
3772
+ "text-white dark:text-white",
3773
+ "bg-base-800 dark:bg-white/35"
3774
+ ].join(" ")
3775
+ }
3776
+ },
3777
+ {
3778
+ variant: "pill",
3779
+ active: true,
3780
+ highlight: false,
3781
+ class: {
3782
+ link: [
3783
+ "leading-9"
3784
+ ].join(" "),
3785
+ linkLabel: [
3786
+ "px-3",
3787
+ "-ms-3 me-3 rtl:-me-3 rtl:ms-3",
3788
+ "font-semibold leading-[1.563rem]",
3789
+ "text-white dark:text-white",
3790
+ "bg-base-800 dark:bg-white/35",
3791
+ // (--ui-bg-elevated)
3792
+ "rounded-2xl"
3793
+ ].join(" ")
3794
+ }
3795
+ },
3796
+ {
3797
+ variant: "pill",
3798
+ active: true,
3799
+ highlight: true,
3800
+ class: {
3801
+ link: [
3802
+ "hover:before:bg-(--ui-bg-elevated)/50",
3803
+ "before:transition-colors"
3804
+ ]
3805
+ }
3806
+ },
3807
+ // region link ////
3808
+ {
3809
+ disabled: false,
3810
+ active: false,
3811
+ variant: "link",
3812
+ class: {
3813
+ link: [
3814
+ "hover:text-base-950 dark:hover:text-base-50",
3815
+ "transition-colors"
3816
+ ].join(" "),
3817
+ linkLeadingIcon: [
3818
+ "group-hover:text-(--ui-text)",
3819
+ "transition-colors"
3820
+ ].join(" ")
3821
+ }
3822
+ },
3823
+ {
3824
+ disabled: false,
3825
+ active: false,
3826
+ variant: "link",
3827
+ orientation: "horizontal",
3828
+ class: {
3829
+ link: "data-[state=open]:text-(--ui-text-highlighted)",
3830
+ linkLeadingIcon: "group-data-[state=open]:text-(--ui-text)"
3831
+ }
3832
+ },
3833
+ {
3834
+ color: "default",
3835
+ variant: "link",
3836
+ active: true,
3837
+ class: {
3838
+ link: "text-(--ui-text-highlighted)",
3839
+ linkLeadingIcon: "text-(--ui-text-highlighted) group-data-[state=open]:text-(--ui-text-highlighted)"
3840
+ }
3841
+ },
3842
+ // endregion ////
3843
+ {
3844
+ highlightColor: "default",
3845
+ highlight: true,
3846
+ level: true,
3847
+ active: true,
3848
+ class: {
3849
+ link: "after:bg-(--ui-bg-inverted)"
3850
+ }
3851
+ },
3852
+ {
3853
+ orientation: "vertical",
3854
+ collapsed: false,
3855
+ class: {
3856
+ childList: "v-1",
3857
+ childItem: "v-2 [&>a]:ps-[44px]"
3858
+ }
3859
+ },
3860
+ {
3861
+ orientation: "vertical",
3862
+ collapsed: true,
3863
+ class: {
3864
+ link: "px-1.5"
3865
+ }
3866
+ }
3867
+ ],
3868
+ defaultVariants: {
3869
+ color: "default",
3870
+ highlightColor: "default",
3871
+ variant: "pill"
3872
+ }
3873
+ };
3874
+
3506
3875
  const popover = {
3507
3876
  slots: {
3508
3877
  content: [
@@ -5507,7 +5876,7 @@ const sidebar = {
5507
5876
  const sidebarHeader = {
5508
5877
  slots: {
5509
5878
  root: [
5510
- "p-4",
5879
+ "py-4",
5511
5880
  "flex flex-col",
5512
5881
  // 'border-b border-base-950/5 dark:border-white/5',
5513
5882
  "[&>[data-slot=section]+[data-slot=section]]:mt-2.5"
@@ -5518,7 +5887,7 @@ const sidebarHeader = {
5518
5887
  const sidebarBody = {
5519
5888
  slots: {
5520
5889
  root: [
5521
- "p-4",
5890
+ "py-4",
5522
5891
  "flex flex-1 flex-col",
5523
5892
  "overflow-y-auto",
5524
5893
  "[&>[data-slot=section]+[data-slot=section]]:mt-8"
@@ -5539,7 +5908,7 @@ const sidebarBody = {
5539
5908
  const sidebarFooter = {
5540
5909
  slots: {
5541
5910
  root: [
5542
- "p-4",
5911
+ "py-4",
5543
5912
  "flex flex-col",
5544
5913
  "max-lg:hidden",
5545
5914
  // 'border-t border-base-950/5 dark:border-white/5',
@@ -5551,6 +5920,7 @@ const sidebarFooter = {
5551
5920
  const sidebarSection = {
5552
5921
  slots: {
5553
5922
  root: [
5923
+ "ps-2xl pe-xs",
5554
5924
  "flex flex-col gap-0.5"
5555
5925
  ].join(" ")
5556
5926
  }
@@ -5560,7 +5930,6 @@ const sidebarHeading = {
5560
5930
  slots: {
5561
5931
  root: [
5562
5932
  "mb-1",
5563
- "px-2",
5564
5933
  "text-xs/6 font-medium ",
5565
5934
  "text-base-500 dark:text-base-400"
5566
5935
  ].join(" ")
@@ -5624,6 +5993,7 @@ const theme = {
5624
5993
  calendar: calendar,
5625
5994
  checkbox: checkbox,
5626
5995
  chip: chip,
5996
+ collapsible: collapsible,
5627
5997
  container: container,
5628
5998
  countdown: countdown,
5629
5999
  descriptionList: descriptionList,
@@ -5640,6 +6010,7 @@ const theme = {
5640
6010
  navbarDivider: navbarDivider,
5641
6011
  navbarSection: navbarSection,
5642
6012
  navbarSpacer: navbarSpacer,
6013
+ navigationMenu: navigationMenu,
5643
6014
  popover: popover,
5644
6015
  progress: progress,
5645
6016
  radioGroup: radioGroup,