@zvk/ui 0.1.2 → 0.1.5

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 (53) hide show
  1. package/dist/components/alert-dialog/alert-dialog.d.ts +8 -5
  2. package/dist/components/alert-dialog/alert-dialog.js +21 -8
  3. package/dist/components/button/button.d.ts +3 -2
  4. package/dist/components/button/button.js +5 -1
  5. package/dist/components/calendar/calendar.d.ts +51 -0
  6. package/dist/components/calendar/calendar.js +190 -0
  7. package/dist/components/calendar/index.d.ts +2 -0
  8. package/dist/components/calendar/index.js +2 -0
  9. package/dist/components/carousel/carousel.d.ts +51 -0
  10. package/dist/components/carousel/carousel.js +210 -0
  11. package/dist/components/carousel/index.d.ts +2 -0
  12. package/dist/components/carousel/index.js +2 -0
  13. package/dist/components/collapsible/collapsible.d.ts +3 -2
  14. package/dist/components/collapsible/collapsible.js +5 -1
  15. package/dist/components/command/command.d.ts +11 -4
  16. package/dist/components/command/command.js +27 -16
  17. package/dist/components/command/index.d.ts +1 -1
  18. package/dist/components/context-menu/context-menu.d.ts +17 -6
  19. package/dist/components/context-menu/context-menu.js +139 -36
  20. package/dist/components/date-picker/date-picker.d.ts +16 -0
  21. package/dist/components/date-picker/date-picker.js +50 -0
  22. package/dist/components/date-picker/index.d.ts +2 -0
  23. package/dist/components/date-picker/index.js +2 -0
  24. package/dist/components/dialog/dialog.d.ts +6 -4
  25. package/dist/components/dialog/dialog.js +14 -4
  26. package/dist/components/dropdown-menu/dropdown-menu.d.ts +13 -7
  27. package/dist/components/dropdown-menu/dropdown-menu.js +127 -72
  28. package/dist/components/hover-card/hover-card.d.ts +37 -0
  29. package/dist/components/hover-card/hover-card.js +271 -0
  30. package/dist/components/hover-card/index.d.ts +2 -0
  31. package/dist/components/hover-card/index.js +2 -0
  32. package/dist/components/index.d.ts +14 -6
  33. package/dist/components/index.js +5 -1
  34. package/dist/components/menubar/menubar.d.ts +24 -5
  35. package/dist/components/menubar/menubar.js +182 -33
  36. package/dist/components/popover/popover.d.ts +9 -3
  37. package/dist/components/popover/popover.js +15 -5
  38. package/dist/components/sheet/sheet.d.ts +6 -4
  39. package/dist/components/sheet/sheet.js +21 -8
  40. package/dist/components/toast/index.d.ts +2 -2
  41. package/dist/components/toast/index.js +2 -1
  42. package/dist/components/toast/toast.d.ts +40 -0
  43. package/dist/components/toast/toast.js +144 -2
  44. package/dist/components/tooltip/tooltip.d.ts +8 -2
  45. package/dist/components/tooltip/tooltip.js +8 -5
  46. package/dist/internal/floating/placement-aliases.d.ts +7 -0
  47. package/dist/internal/floating/placement-aliases.js +13 -0
  48. package/dist/internal/slot/index.d.ts +2 -0
  49. package/dist/internal/slot/index.js +1 -0
  50. package/dist/internal/slot/slot.d.ts +6 -0
  51. package/dist/internal/slot/slot.js +53 -0
  52. package/dist/styles.css +356 -4
  53. package/package.json +18 -2
package/dist/styles.css CHANGED
@@ -1687,6 +1687,168 @@
1687
1687
  }
1688
1688
 
1689
1689
 
1690
+ /* src/components/calendar/calendar.css */
1691
+ @layer liano-components {
1692
+ :where(.liano-calendar) {
1693
+ color: var(--liano-color-foreground);
1694
+ display: grid;
1695
+ font-family: var(--liano-font-family-sans);
1696
+ gap: var(--liano-space-3);
1697
+ inline-size: max-content;
1698
+ min-inline-size: 17.5rem;
1699
+ }
1700
+
1701
+ :where(.liano-calendar__header) {
1702
+ align-items: center;
1703
+ display: grid;
1704
+ gap: var(--liano-space-2);
1705
+ grid-template-columns: var(--liano-control-height-sm) 1fr var(--liano-control-height-sm);
1706
+ }
1707
+
1708
+ :where(.liano-calendar__heading) {
1709
+ font-size: var(--liano-font-size-sm);
1710
+ font-weight: 700;
1711
+ line-height: var(--liano-line-height-tight);
1712
+ margin: 0;
1713
+ text-align: center;
1714
+ }
1715
+
1716
+ :where(.liano-calendar__nav, .liano-calendar__day) {
1717
+ align-items: center;
1718
+ appearance: none;
1719
+ background: transparent;
1720
+ border: 1px solid transparent;
1721
+ border-radius: var(--liano-radius-sm);
1722
+ color: inherit;
1723
+ cursor: pointer;
1724
+ display: inline-flex;
1725
+ font: inherit;
1726
+ justify-content: center;
1727
+ padding: 0;
1728
+ }
1729
+
1730
+ :where(.liano-calendar__nav) {
1731
+ block-size: var(--liano-control-height-sm);
1732
+ color: var(--liano-color-muted-foreground);
1733
+ font-size: var(--liano-font-size-lg);
1734
+ }
1735
+
1736
+ :where(.liano-calendar__nav:hover) {
1737
+ background: var(--liano-control-hover);
1738
+ color: var(--liano-color-foreground);
1739
+ }
1740
+
1741
+ :where(.liano-calendar__grid) {
1742
+ display: grid;
1743
+ gap: var(--liano-space-1);
1744
+ }
1745
+
1746
+ :where(.liano-calendar__weekdays, .liano-calendar__week) {
1747
+ display: grid;
1748
+ gap: var(--liano-space-1);
1749
+ grid-template-columns: repeat(7, minmax(0, 1fr));
1750
+ }
1751
+
1752
+ :where(.liano-calendar__weekday) {
1753
+ color: var(--liano-color-muted-foreground);
1754
+ font-size: var(--liano-font-size-xs);
1755
+ font-weight: 700;
1756
+ line-height: var(--liano-line-height-tight);
1757
+ padding-block: var(--liano-space-1);
1758
+ text-align: center;
1759
+ }
1760
+
1761
+ :where(.liano-calendar__cell) {
1762
+ display: inline-flex;
1763
+ }
1764
+
1765
+ :where(.liano-calendar__day) {
1766
+ aspect-ratio: 1;
1767
+ block-size: var(--liano-control-height-sm);
1768
+ font-size: var(--liano-font-size-sm);
1769
+ inline-size: var(--liano-control-height-sm);
1770
+ }
1771
+
1772
+ :where(.liano-calendar__day:hover:not(:disabled)) {
1773
+ background: var(--liano-control-hover);
1774
+ border-color: var(--liano-color-border);
1775
+ }
1776
+
1777
+ :where(.liano-calendar__day:focus-visible, .liano-calendar__nav:focus-visible) {
1778
+ box-shadow: var(--liano-focus-ring);
1779
+ outline: 0;
1780
+ }
1781
+
1782
+ :where(.liano-calendar__day[data-outside-month="true"]) {
1783
+ color: var(--liano-color-muted-foreground);
1784
+ opacity: 0.62;
1785
+ }
1786
+
1787
+ :where(.liano-calendar__day[data-today="true"]) {
1788
+ border-color: var(--liano-color-border-strong);
1789
+ font-weight: 700;
1790
+ }
1791
+
1792
+ :where(.liano-calendar__day[data-selected="true"]) {
1793
+ background: var(--liano-color-primary);
1794
+ border-color: var(--liano-color-primary);
1795
+ color: var(--liano-color-primary-foreground);
1796
+ font-weight: 700;
1797
+ }
1798
+
1799
+ :where(.liano-calendar__day:disabled) {
1800
+ cursor: not-allowed;
1801
+ opacity: var(--liano-opacity-disabled);
1802
+ }
1803
+ }
1804
+
1805
+
1806
+ /* src/components/date-picker/date-picker.css */
1807
+ @layer liano-components {
1808
+ :where(.liano-date-picker) {
1809
+ display: grid;
1810
+ gap: var(--liano-space-2);
1811
+ }
1812
+
1813
+ :where(.liano-date-picker .liano-popover) {
1814
+ display: block;
1815
+ inline-size: 100%;
1816
+ }
1817
+
1818
+ :where(.liano-date-picker__trigger) {
1819
+ justify-content: flex-start;
1820
+ line-height: var(--liano-line-height-tight);
1821
+ min-inline-size: 12rem;
1822
+ text-align: start;
1823
+ width: 100%;
1824
+ }
1825
+
1826
+ :where(.liano-date-picker__trigger[data-state="open"]) {
1827
+ border-color: var(--liano-color-ring);
1828
+ box-shadow: var(--liano-shadow-xs), var(--liano-focus-ring);
1829
+ }
1830
+
1831
+ :where(.liano-date-picker__trigger[aria-invalid="true"]) {
1832
+ border-color: var(--liano-color-destructive);
1833
+ }
1834
+
1835
+ :where(.liano-date-picker__trigger--placeholder) {
1836
+ color: var(--liano-color-muted-foreground);
1837
+ font-weight: 500;
1838
+ }
1839
+
1840
+ :where(.liano-date-picker__value) {
1841
+ overflow: hidden;
1842
+ text-overflow: ellipsis;
1843
+ white-space: nowrap;
1844
+ }
1845
+
1846
+ :where(.liano-date-picker__content) {
1847
+ padding: var(--liano-space-3);
1848
+ }
1849
+ }
1850
+
1851
+
1690
1852
  /* src/components/select/select.css */
1691
1853
  @layer liano-components {
1692
1854
  :where(.liano-select) {
@@ -2843,6 +3005,66 @@
2843
3005
  }
2844
3006
 
2845
3007
 
3008
+ /* src/components/hover-card/hover-card.css */
3009
+ @layer liano-components {
3010
+ :where(.liano-hover-card__trigger) {
3011
+ border-radius: var(--liano-radius-sm);
3012
+ }
3013
+
3014
+ :where(.liano-hover-card__trigger:focus-visible) {
3015
+ box-shadow: var(--liano-focus-ring);
3016
+ outline: 0;
3017
+ }
3018
+
3019
+ :where(.liano-hover-card__content) {
3020
+ animation: liano-hover-card-enter var(--liano-duration-fast) var(--liano-ease-standard);
3021
+ background: var(--liano-color-surface-raised);
3022
+ border: 1px solid var(--liano-color-border);
3023
+ border-radius: var(--liano-radius-md);
3024
+ box-shadow: var(--liano-shadow-md);
3025
+ color: var(--liano-color-foreground);
3026
+ font-family: var(--liano-font-family-sans);
3027
+ font-size: var(--liano-font-size-sm);
3028
+ max-width: min(20rem, var(--liano-floating-available-width));
3029
+ padding: var(--liano-space-3);
3030
+ pointer-events: auto;
3031
+ position: absolute;
3032
+ z-index: var(--liano-z-index-popover, var(--liano-z-index-overlay));
3033
+ }
3034
+
3035
+ :where(.liano-hover-card__content:focus-visible) {
3036
+ box-shadow: var(--liano-shadow-md), var(--liano-focus-ring);
3037
+ outline: 0;
3038
+ }
3039
+
3040
+ :where(.liano-hover-card__content[data-state="closed"]) {
3041
+ animation: none;
3042
+ }
3043
+
3044
+ :where(.liano-hover-card__content[hidden]) {
3045
+ display: none;
3046
+ }
3047
+
3048
+ @keyframes liano-hover-card-enter {
3049
+ from {
3050
+ opacity: 0;
3051
+ transform: scale(0.98) translateY(0.125rem);
3052
+ }
3053
+
3054
+ to {
3055
+ opacity: 1;
3056
+ transform: scale(1) translateY(0);
3057
+ }
3058
+ }
3059
+
3060
+ @media (prefers-reduced-motion: reduce) {
3061
+ :where(.liano-hover-card__content) {
3062
+ animation: none;
3063
+ }
3064
+ }
3065
+ }
3066
+
3067
+
2846
3068
  /* src/components/tooltip/tooltip.css */
2847
3069
  @layer liano-components {
2848
3070
  :where(.liano-tooltip) {
@@ -3128,6 +3350,12 @@
3128
3350
  margin: var(--liano-space-1) 0;
3129
3351
  }
3130
3352
 
3353
+ .liano-command__shortcut {
3354
+ color: var(--liano-color-muted-foreground);
3355
+ font-size: var(--liano-font-size-xs);
3356
+ margin-inline-start: auto;
3357
+ }
3358
+
3131
3359
  .liano-command-dialog {
3132
3360
  font-family: var(--liano-font-family-sans);
3133
3361
  padding: var(--liano-space-4);
@@ -3334,7 +3562,7 @@
3334
3562
  padding: var(--liano-space-1) var(--liano-space-3);
3335
3563
  }
3336
3564
 
3337
- .liano-context-menu__checkbox-item {
3565
+ :where(.liano-context-menu__checkbox-item, .liano-context-menu__radio-item) {
3338
3566
  justify-content: start;
3339
3567
  }
3340
3568
 
@@ -3407,6 +3635,20 @@
3407
3635
  text-align: start;
3408
3636
  }
3409
3637
 
3638
+ :where(.liano-menubar__checkbox-item, .liano-menubar__radio-item) {
3639
+ justify-content: start;
3640
+ }
3641
+
3642
+ .liano-menubar__item-indicator {
3643
+ color: var(--liano-color-primary);
3644
+ inline-size: 1rem;
3645
+ text-align: center;
3646
+ }
3647
+
3648
+ .liano-menubar__item-label {
3649
+ min-width: 0;
3650
+ }
3651
+
3410
3652
  .liano-menubar__item:focus-visible {
3411
3653
  background: var(--liano-color-muted);
3412
3654
  outline: 0;
@@ -3439,6 +3681,101 @@
3439
3681
  }
3440
3682
 
3441
3683
 
3684
+ /* src/components/carousel/carousel.css */
3685
+ @layer liano-components {
3686
+ :where(.liano-carousel) {
3687
+ --liano-carousel-gap: var(--liano-space-3);
3688
+ --liano-carousel-slide-size: 100%;
3689
+
3690
+ color: var(--liano-color-foreground);
3691
+ display: grid;
3692
+ gap: var(--liano-carousel-gap);
3693
+ }
3694
+
3695
+ :where(.liano-carousel:focus-visible) {
3696
+ outline: 0;
3697
+ box-shadow: var(--liano-focus-ring);
3698
+ }
3699
+
3700
+ :where(.liano-carousel__viewport) {
3701
+ overflow: auto;
3702
+ overscroll-behavior: contain;
3703
+ scrollbar-width: none;
3704
+ scroll-behavior: smooth;
3705
+ scroll-snap-type: x mandatory;
3706
+ }
3707
+
3708
+ :where(.liano-carousel__viewport[data-orientation="vertical"]) {
3709
+ scroll-snap-type: y mandatory;
3710
+ }
3711
+
3712
+ .liano-carousel__viewport::-webkit-scrollbar {
3713
+ display: none;
3714
+ }
3715
+
3716
+ :where(.liano-carousel__track) {
3717
+ display: flex;
3718
+ gap: var(--liano-carousel-gap);
3719
+ }
3720
+
3721
+ :where(.liano-carousel__track[data-orientation="vertical"]) {
3722
+ flex-direction: column;
3723
+ }
3724
+
3725
+ :where(.liano-carousel__slide) {
3726
+ flex: 0 0 var(--liano-carousel-slide-size);
3727
+ min-inline-size: 0;
3728
+ scroll-snap-align: start;
3729
+ }
3730
+
3731
+ :where(.liano-carousel__slide[data-selected="true"]) {
3732
+ scroll-snap-stop: always;
3733
+ }
3734
+
3735
+ :where(.liano-carousel__button) {
3736
+ align-items: center;
3737
+ appearance: none;
3738
+ background: var(--liano-color-surface);
3739
+ border: 1px solid var(--liano-color-border);
3740
+ border-radius: var(--liano-radius-sm);
3741
+ color: var(--liano-color-foreground);
3742
+ cursor: pointer;
3743
+ display: inline-flex;
3744
+ font-family: var(--liano-font-family-sans);
3745
+ font-size: var(--liano-font-size-sm);
3746
+ font-weight: 600;
3747
+ justify-content: center;
3748
+ line-height: 1;
3749
+ min-block-size: var(--liano-control-height-sm);
3750
+ padding-block: 0;
3751
+ padding-inline: var(--liano-control-padding-x);
3752
+ transition: background var(--liano-duration-fast) var(--liano-ease-standard), border-color var(--liano-duration-fast) var(--liano-ease-standard), box-shadow var(--liano-duration-fast) var(--liano-ease-standard), color var(--liano-duration-fast) var(--liano-ease-standard);
3753
+ }
3754
+
3755
+ :where(.liano-carousel__button:hover:not(:disabled)) {
3756
+ background: var(--liano-control-hover);
3757
+ border-color: var(--liano-color-border-strong);
3758
+ }
3759
+
3760
+ :where(.liano-carousel__button:focus-visible) {
3761
+ outline: 0;
3762
+ box-shadow: var(--liano-focus-ring);
3763
+ }
3764
+
3765
+ :where(.liano-carousel__button:disabled) {
3766
+ cursor: not-allowed;
3767
+ opacity: var(--liano-opacity-disabled);
3768
+ }
3769
+
3770
+ :where(.liano-carousel__page) {
3771
+ color: var(--liano-color-muted-foreground);
3772
+ font-family: var(--liano-font-family-sans);
3773
+ font-size: var(--liano-font-size-sm);
3774
+ line-height: var(--liano-line-height-normal);
3775
+ }
3776
+ }
3777
+
3778
+
3442
3779
  /* src/components/responsive-container/responsive-container.css */
3443
3780
  @layer liano-components {
3444
3781
  :where(.liano-responsive-container) {
@@ -3799,14 +4136,27 @@
3799
4136
  line-height: var(--liano-line-height-tight);
3800
4137
  }
3801
4138
 
4139
+ :where(.liano-toast__content) {
4140
+ display: grid;
4141
+ gap: var(--liano-space-1);
4142
+ }
4143
+
3802
4144
  :where(.liano-toast__description) {
3803
4145
  color: var(--liano-color-muted-foreground);
3804
4146
  font-size: var(--liano-font-size-sm);
3805
4147
  line-height: var(--liano-line-height-normal);
3806
4148
  }
3807
4149
 
4150
+ :where(.liano-toast__controls) {
4151
+ align-items: center;
4152
+ display: flex;
4153
+ flex-wrap: wrap;
4154
+ gap: var(--liano-space-2);
4155
+ }
4156
+
3808
4157
  :where(.liano-toast__action),
3809
- :where(.liano-toast__close) {
4158
+ :where(.liano-toast__close),
4159
+ :where(.liano-toast__controls > button) {
3810
4160
  align-items: center;
3811
4161
  appearance: none;
3812
4162
  background: transparent;
@@ -3822,12 +4172,14 @@
3822
4172
  }
3823
4173
 
3824
4174
  :where(.liano-toast__action:hover:not(:disabled)),
3825
- :where(.liano-toast__close:hover:not(:disabled)) {
4175
+ :where(.liano-toast__close:hover:not(:disabled)),
4176
+ :where(.liano-toast__controls > button:hover:not(:disabled)) {
3826
4177
  background: var(--liano-control-hover);
3827
4178
  }
3828
4179
 
3829
4180
  :where(.liano-toast__action:focus-visible),
3830
- :where(.liano-toast__close:focus-visible) {
4181
+ :where(.liano-toast__close:focus-visible),
4182
+ :where(.liano-toast__controls > button:focus-visible) {
3831
4183
  outline: 0;
3832
4184
  box-shadow: var(--liano-focus-ring);
3833
4185
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zvk/ui",
3
- "version": "0.1.2",
4
- "description": "A polished, zero-runtime-dependency React component library for Liano applications.",
3
+ "version": "0.1.5",
4
+ "description": "A polished, zero-runtime-dependency React component library for ZvkUi applications.",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "license": "SEE LICENSE IN LICENSE.md",
@@ -173,6 +173,10 @@
173
173
  "types": "./dist/components/popover/index.d.ts",
174
174
  "import": "./dist/components/popover/index.js"
175
175
  },
176
+ "./hover-card": {
177
+ "types": "./dist/components/hover-card/index.d.ts",
178
+ "import": "./dist/components/hover-card/index.js"
179
+ },
176
180
  "./tooltip": {
177
181
  "types": "./dist/components/tooltip/index.d.ts",
178
182
  "import": "./dist/components/tooltip/index.js"
@@ -209,6 +213,18 @@
209
213
  "types": "./dist/components/menubar/index.d.ts",
210
214
  "import": "./dist/components/menubar/index.js"
211
215
  },
216
+ "./calendar": {
217
+ "types": "./dist/components/calendar/index.d.ts",
218
+ "import": "./dist/components/calendar/index.js"
219
+ },
220
+ "./date-picker": {
221
+ "types": "./dist/components/date-picker/index.d.ts",
222
+ "import": "./dist/components/date-picker/index.js"
223
+ },
224
+ "./carousel": {
225
+ "types": "./dist/components/carousel/index.d.ts",
226
+ "import": "./dist/components/carousel/index.js"
227
+ },
212
228
  "./responsive-container": {
213
229
  "types": "./dist/components/responsive-container/index.d.ts",
214
230
  "import": "./dist/components/responsive-container/index.js"