@citrusworx/juiceui 0.9.4 → 0.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.css CHANGED
@@ -102486,6 +102486,391 @@ nav[sticky] > [container][safe-area=y],
102486
102486
  box-sizing: border-box;
102487
102487
  }
102488
102488
 
102489
+ @property --juice-keyboard-inset {
102490
+ syntax: "<length>";
102491
+ inherits: true;
102492
+ initial-value: 0px;
102493
+ }
102494
+ :root {
102495
+ --juice-keyboard-inset: 0px;
102496
+ --juice-keyboard-duration: var(--juice-motion-duration-base);
102497
+ --juice-keyboard-easing: var(--juice-motion-ease-enter);
102498
+ }
102499
+
102500
+ @supports (height: env(keyboard-inset-height)) {
102501
+ :root {
102502
+ --juice-keyboard-inset: env(keyboard-inset-height, 0px);
102503
+ }
102504
+ }
102505
+ [keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]),
102506
+ [theme] [keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]),
102507
+ nav[fixed] > [container][keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]),
102508
+ nav[sticky] > [container][keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]),
102509
+ [wizard-header] > [container][keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]) {
102510
+ padding-bottom: var(--juice-keyboard-inset);
102511
+ box-sizing: border-box;
102512
+ }
102513
+
102514
+ [keyboard-avoider~=padding],
102515
+ [theme] [keyboard-avoider~=padding],
102516
+ nav[fixed] > [container][keyboard-avoider~=padding],
102517
+ nav[sticky] > [container][keyboard-avoider~=padding],
102518
+ [wizard-header] > [container][keyboard-avoider~=padding] {
102519
+ padding-bottom: var(--juice-keyboard-inset);
102520
+ box-sizing: border-box;
102521
+ }
102522
+
102523
+ [keyboard-avoider~=translate],
102524
+ [theme] [keyboard-avoider~=translate],
102525
+ nav[fixed] > [container][keyboard-avoider~=translate],
102526
+ nav[sticky] > [container][keyboard-avoider~=translate],
102527
+ [wizard-header] > [container][keyboard-avoider~=translate] {
102528
+ transform: translateY(calc(-1 * var(--juice-keyboard-inset)));
102529
+ transition: transform var(--juice-keyboard-duration) var(--juice-keyboard-easing);
102530
+ }
102531
+
102532
+ [keyboard-avoider~=footer],
102533
+ [theme] [keyboard-avoider~=footer],
102534
+ nav[fixed] > [container][keyboard-avoider~=footer],
102535
+ nav[sticky] > [container][keyboard-avoider~=footer],
102536
+ [wizard-header] > [container][keyboard-avoider~=footer] {
102537
+ position: sticky;
102538
+ bottom: var(--juice-keyboard-inset);
102539
+ }
102540
+
102541
+ nav[fixed][keyboard-avoider~=footer],
102542
+ [theme] nav[fixed][keyboard-avoider~=footer] {
102543
+ bottom: auto;
102544
+ }
102545
+
102546
+ [safe-area]:not([safe-area=top]):not([safe-area=bottom]):not([safe-area=x]):not([safe-area=y])[keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]),
102547
+ [theme] [safe-area]:not([safe-area=top]):not([safe-area=bottom]):not([safe-area=x]):not([safe-area=y])[keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]),
102548
+ nav[fixed] > [container][safe-area]:not([safe-area=top]):not([safe-area=bottom]):not([safe-area=x]):not([safe-area=y])[keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]),
102549
+ nav[sticky] > [container][safe-area]:not([safe-area=top]):not([safe-area=bottom]):not([safe-area=x]):not([safe-area=y])[keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]),
102550
+ [wizard-header] > [container][safe-area]:not([safe-area=top]):not([safe-area=bottom]):not([safe-area=x]):not([safe-area=y])[keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]),
102551
+ [safe-area]:not([safe-area=top]):not([safe-area=bottom]):not([safe-area=x]):not([safe-area=y])[keyboard-avoider~=padding],
102552
+ [theme] [safe-area]:not([safe-area=top]):not([safe-area=bottom]):not([safe-area=x]):not([safe-area=y])[keyboard-avoider~=padding],
102553
+ nav[fixed] > [container][safe-area]:not([safe-area=top]):not([safe-area=bottom]):not([safe-area=x]):not([safe-area=y])[keyboard-avoider~=padding],
102554
+ nav[sticky] > [container][safe-area]:not([safe-area=top]):not([safe-area=bottom]):not([safe-area=x]):not([safe-area=y])[keyboard-avoider~=padding],
102555
+ [wizard-header] > [container][safe-area]:not([safe-area=top]):not([safe-area=bottom]):not([safe-area=x]):not([safe-area=y])[keyboard-avoider~=padding] {
102556
+ padding-bottom: max(var(--juice-safe-area-pad), env(safe-area-inset-bottom, 0px), var(--juice-keyboard-inset));
102557
+ }
102558
+
102559
+ [safe-area=bottom][keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]),
102560
+ [theme] [safe-area=bottom][keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]),
102561
+ nav[fixed] > [container][safe-area=bottom][keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]),
102562
+ nav[sticky] > [container][safe-area=bottom][keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]),
102563
+ [wizard-header] > [container][safe-area=bottom][keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]),
102564
+ [safe-area=bottom][keyboard-avoider~=padding],
102565
+ [theme] [safe-area=bottom][keyboard-avoider~=padding],
102566
+ nav[fixed] > [container][safe-area=bottom][keyboard-avoider~=padding],
102567
+ nav[sticky] > [container][safe-area=bottom][keyboard-avoider~=padding],
102568
+ [wizard-header] > [container][safe-area=bottom][keyboard-avoider~=padding] {
102569
+ padding-bottom: max(var(--juice-safe-area-pad), env(safe-area-inset-bottom, 0px), var(--juice-keyboard-inset));
102570
+ }
102571
+
102572
+ [safe-area=y][keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]),
102573
+ [theme] [safe-area=y][keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]),
102574
+ nav[fixed] > [container][safe-area=y][keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]),
102575
+ nav[sticky] > [container][safe-area=y][keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]),
102576
+ [wizard-header] > [container][safe-area=y][keyboard-avoider]:not([keyboard-avoider~=padding]):not([keyboard-avoider~=translate]):not([keyboard-avoider~=footer]),
102577
+ [safe-area=y][keyboard-avoider~=padding],
102578
+ [theme] [safe-area=y][keyboard-avoider~=padding],
102579
+ nav[fixed] > [container][safe-area=y][keyboard-avoider~=padding],
102580
+ nav[sticky] > [container][safe-area=y][keyboard-avoider~=padding],
102581
+ [wizard-header] > [container][safe-area=y][keyboard-avoider~=padding] {
102582
+ padding-bottom: max(var(--juice-safe-area-pad), env(safe-area-inset-bottom, 0px), var(--juice-keyboard-inset));
102583
+ }
102584
+
102585
+ @media (prefers-reduced-motion: reduce) {
102586
+ [keyboard-avoider~=translate],
102587
+ [theme] [keyboard-avoider~=translate],
102588
+ nav[fixed] > [container][keyboard-avoider~=translate],
102589
+ nav[sticky] > [container][keyboard-avoider~=translate],
102590
+ [wizard-header] > [container][keyboard-avoider~=translate] {
102591
+ transition: none;
102592
+ }
102593
+ }
102594
+ :root {
102595
+ --juice-sheet-offset: max(env(safe-area-inset-top, 0px), 1.5rem);
102596
+ --juice-sheet-peek: 25vh;
102597
+ --juice-sheet-peek: 25dvh;
102598
+ --juice-sheet-half: 50vh;
102599
+ --juice-sheet-half: 50dvh;
102600
+ --juice-sheet-full: calc(100vh - var(--juice-sheet-offset));
102601
+ --juice-sheet-full: calc(100dvh - var(--juice-sheet-offset));
102602
+ --juice-sheet-max-height: calc(100vh - var(--juice-sheet-offset));
102603
+ --juice-sheet-max-height: calc(100dvh - var(--juice-sheet-offset));
102604
+ --juice-sheet-radius: 1rem;
102605
+ --juice-sheet-handle-width: 2.5rem;
102606
+ --juice-sheet-handle-height: 0.25rem;
102607
+ }
102608
+
102609
+ [sheet-overlay],
102610
+ [theme] [sheet-overlay] {
102611
+ position: fixed;
102612
+ inset: 0;
102613
+ z-index: 1000;
102614
+ box-sizing: border-box;
102615
+ }
102616
+
102617
+ [sheet-overlay][hidden],
102618
+ [theme] [sheet-overlay][hidden] {
102619
+ display: none;
102620
+ }
102621
+
102622
+ [sheet-overlay]:not([sheet-overlay=none]),
102623
+ [sheet-overlay=static],
102624
+ [theme] [sheet-overlay]:not([sheet-overlay=none]),
102625
+ [theme] [sheet-overlay=static] {
102626
+ background-color: var(--juice-sheet-overlay, var(--juice-drawer-overlay, rgba(25.5, 25.5, 25.5, 0.55)));
102627
+ pointer-events: auto;
102628
+ }
102629
+
102630
+ [sheet-overlay=none],
102631
+ [theme] [sheet-overlay=none] {
102632
+ background-color: transparent;
102633
+ pointer-events: none;
102634
+ }
102635
+
102636
+ [sheet-overlay=none] [sheet],
102637
+ [theme] [sheet-overlay=none] [sheet] {
102638
+ pointer-events: auto;
102639
+ }
102640
+
102641
+ [sheet] {
102642
+ position: absolute;
102643
+ top: auto;
102644
+ right: 0;
102645
+ bottom: 0;
102646
+ left: 0;
102647
+ display: flex;
102648
+ flex-direction: column;
102649
+ width: 100%;
102650
+ max-width: 100%;
102651
+ height: var(--juice-sheet-half);
102652
+ max-height: var(--juice-sheet-max-height);
102653
+ box-sizing: border-box;
102654
+ border-radius: var(--juice-sheet-radius) var(--juice-sheet-radius) 0 0;
102655
+ overflow: hidden;
102656
+ transition: height var(--juice-motion-duration-base) var(--juice-motion-ease-enter), max-height var(--juice-motion-duration-base) var(--juice-motion-ease-enter);
102657
+ }
102658
+
102659
+ [sheet],
102660
+ [theme] [sheet]:not([surfaceTone]) {
102661
+ background-color: var(--juice-sheet-panel, var(--juice-drawer-panel, hsl(0, 0%, 100%)));
102662
+ border: 1px solid var(--juice-sheet-panel-border, var(--juice-drawer-panel-border, rgba(216.75, 216.75, 216.75, 0.85)));
102663
+ box-shadow: var(--juice-sheet-panel-shadow, var(--juice-drawer-panel-shadow, 0 24px 56px -24px rgba(25.5, 25.5, 25.5, 0.42)));
102664
+ }
102665
+
102666
+ [sheet][sheet-detents~=half]:not([detent]) {
102667
+ height: var(--juice-sheet-half);
102668
+ }
102669
+
102670
+ [sheet][sheet-detents~=peek]:not([detent]):not([sheet-detents~=half]):not([sheet-detents~=full]) {
102671
+ height: var(--juice-sheet-peek);
102672
+ }
102673
+
102674
+ [sheet][sheet-detents~=full]:not([detent]):not([sheet-detents~=half]) {
102675
+ height: var(--juice-sheet-full);
102676
+ }
102677
+
102678
+ [sheet][detent=peek] {
102679
+ height: var(--juice-sheet-peek);
102680
+ }
102681
+
102682
+ [sheet][detent=half] {
102683
+ height: var(--juice-sheet-half);
102684
+ }
102685
+
102686
+ [sheet][detent=full] {
102687
+ height: var(--juice-sheet-full);
102688
+ }
102689
+
102690
+ [sheet-handle],
102691
+ [theme] [sheet-handle] {
102692
+ position: relative;
102693
+ z-index: 1;
102694
+ display: block;
102695
+ flex: 0 0 auto;
102696
+ align-self: center;
102697
+ width: var(--juice-sheet-handle-width);
102698
+ height: var(--juice-sheet-handle-height);
102699
+ margin-top: 0.75rem;
102700
+ margin-bottom: 0.25rem;
102701
+ padding: 0;
102702
+ border: none;
102703
+ border-radius: 999px;
102704
+ background-color: var(--juice-sheet-close-color, var(--juice-drawer-close-color, hsl(0, 0%, 20%)));
102705
+ background-image: none;
102706
+ box-shadow: none;
102707
+ touch-action: none;
102708
+ -webkit-user-select: none;
102709
+ user-select: none;
102710
+ }
102711
+
102712
+ [sheet-handle]::before,
102713
+ [theme] [sheet-handle]::before {
102714
+ content: "";
102715
+ position: absolute;
102716
+ left: 50%;
102717
+ top: -0.75rem;
102718
+ width: 100%;
102719
+ height: 44px;
102720
+ transform: translateX(-50%);
102721
+ }
102722
+
102723
+ [sheet-header] {
102724
+ display: flex;
102725
+ flex-direction: column;
102726
+ flex: 0 0 auto;
102727
+ gap: 0.5rem;
102728
+ text-align: start;
102729
+ padding: 0.25rem 3.5rem 0.75rem 1.25rem;
102730
+ box-sizing: border-box;
102731
+ }
102732
+
102733
+ [sheet-body] {
102734
+ flex: 1 1 auto;
102735
+ min-height: 0;
102736
+ overflow: auto;
102737
+ overscroll-behavior: contain;
102738
+ padding: 0 1.25rem 1.25rem;
102739
+ box-sizing: border-box;
102740
+ }
102741
+
102742
+ [sheet] > [sheet-body]:last-child {
102743
+ padding-bottom: max(var(--juice-safe-area-pad), env(safe-area-inset-bottom, 0px), var(--juice-keyboard-inset));
102744
+ }
102745
+
102746
+ [sheet-footer] {
102747
+ flex: 0 0 auto;
102748
+ box-sizing: border-box;
102749
+ padding-top: 0.75rem;
102750
+ padding-right: 1.25rem;
102751
+ padding-bottom: max(var(--juice-safe-area-pad), env(safe-area-inset-bottom, 0px), var(--juice-keyboard-inset));
102752
+ padding-left: 1.25rem;
102753
+ }
102754
+
102755
+ [sheet-close],
102756
+ [theme] [sheet-close] {
102757
+ position: absolute;
102758
+ top: 0.75rem;
102759
+ right: 0.75rem;
102760
+ width: 2.5rem;
102761
+ height: 2.5rem;
102762
+ border-radius: 50%;
102763
+ display: inline-flex;
102764
+ align-items: center;
102765
+ justify-content: center;
102766
+ cursor: pointer;
102767
+ border: none;
102768
+ padding: 0;
102769
+ background-color: var(--juice-sheet-close, var(--juice-drawer-close, hsl(0, 0%, 100%)));
102770
+ background-image: none;
102771
+ color: var(--juice-sheet-close-color, var(--juice-drawer-close-color, hsl(0, 0%, 20%)));
102772
+ box-shadow: none;
102773
+ transform: none;
102774
+ transition: background-color var(--juice-motion-duration-fast) var(--juice-motion-ease-standard), color var(--juice-motion-duration-fast) var(--juice-motion-ease-standard);
102775
+ }
102776
+
102777
+ [sheet-close]:hover,
102778
+ [theme] [sheet-close]:hover {
102779
+ background-color: var(--juice-sheet-close-hover, var(--juice-drawer-close-hover, hsl(0, 0%, 95%)));
102780
+ background-image: none;
102781
+ color: var(--juice-sheet-close-color, var(--juice-drawer-close-color, hsl(0, 0%, 20%)));
102782
+ transform: none;
102783
+ }
102784
+
102785
+ [sheet-close]:focus-visible,
102786
+ [theme] [sheet-close]:focus-visible {
102787
+ outline: 2px solid var(--juice-sheet-focus-ring, var(--juice-drawer-focus-ring, currentColor));
102788
+ outline-offset: 2px;
102789
+ }
102790
+
102791
+ html[keyboard-open] [sheet],
102792
+ html[keyboard-open] [theme] [sheet] {
102793
+ max-height: calc(var(--juice-sheet-max-height) - var(--juice-keyboard-inset));
102794
+ }
102795
+
102796
+ html[keyboard-open] [sheet] > [sheet-body]:last-child,
102797
+ html[keyboard-open] [theme] [sheet] > [sheet-body]:last-child,
102798
+ html[keyboard-open] [sheet-footer],
102799
+ html[keyboard-open] [theme] [sheet-footer] {
102800
+ padding-bottom: max(var(--juice-safe-area-pad), env(safe-area-inset-bottom, 0px));
102801
+ }
102802
+
102803
+ [sheet][dragging],
102804
+ [theme] [sheet][dragging],
102805
+ [sheet-overlay][dragging] [sheet],
102806
+ [theme] [sheet-overlay][dragging] [sheet] {
102807
+ transition: none;
102808
+ }
102809
+
102810
+ @keyframes juice-sheet-overlay-in {
102811
+ from {
102812
+ opacity: 0;
102813
+ }
102814
+ to {
102815
+ opacity: 1;
102816
+ }
102817
+ }
102818
+ @keyframes juice-sheet-overlay-out {
102819
+ from {
102820
+ opacity: 1;
102821
+ }
102822
+ to {
102823
+ opacity: 0;
102824
+ }
102825
+ }
102826
+ @keyframes juice-sheet-panel-in {
102827
+ from {
102828
+ transform: translateY(100%);
102829
+ }
102830
+ to {
102831
+ transform: none;
102832
+ }
102833
+ }
102834
+ @keyframes juice-sheet-panel-out {
102835
+ from {
102836
+ transform: none;
102837
+ }
102838
+ to {
102839
+ transform: translateY(100%);
102840
+ }
102841
+ }
102842
+ [sheet-overlay][data-motion-state=entering] {
102843
+ animation: juice-sheet-overlay-in var(--juice-motion-duration-base) var(--juice-motion-ease-enter) both;
102844
+ }
102845
+
102846
+ [sheet-overlay][data-motion-state=entering] [sheet] {
102847
+ animation: juice-sheet-panel-in var(--juice-motion-duration-base) var(--juice-motion-ease-enter) both;
102848
+ }
102849
+
102850
+ [sheet-overlay][data-motion-state=exiting] {
102851
+ animation: juice-sheet-overlay-out var(--juice-motion-duration-fast) var(--juice-motion-ease-exit) both;
102852
+ }
102853
+
102854
+ [sheet-overlay][data-motion-state=exiting] [sheet] {
102855
+ animation: juice-sheet-panel-out var(--juice-motion-duration-fast) var(--juice-motion-ease-exit) both;
102856
+ }
102857
+
102858
+ [sheet-overlay][data-motion-state=exited] {
102859
+ opacity: 0;
102860
+ }
102861
+
102862
+ [sheet-overlay][data-motion-state=exited] [sheet] {
102863
+ transform: translateY(100%);
102864
+ }
102865
+
102866
+ @media (prefers-reduced-motion: reduce) {
102867
+ [sheet],
102868
+ [theme] [sheet],
102869
+ [sheet-close],
102870
+ [theme] [sheet-close] {
102871
+ transition: none;
102872
+ }
102873
+ }
102489
102874
  [search-panel] {
102490
102875
  max-width: 56rem;
102491
102876
  margin: 0 auto;
package/dist/index.d.ts CHANGED
@@ -59,6 +59,10 @@ export { createPressable, initPressable, startPressableRuntime, stopPressableRun
59
59
  export type { PressableController, PressableOptions, PressableState } from "./js/src/pressable/pressable-runtime.js";
60
60
  export { createTouchableRow, initTouchableRow, startTouchableRowRuntime, stopTouchableRowRuntime } from "./js/src/touchable-row/touchable-row-runtime.js";
61
61
  export type { TouchableRowController, TouchableRowOptions, TouchableRowState } from "./js/src/touchable-row/touchable-row-runtime.js";
62
+ export { createKeyboardAvoider, initKeyboardAvoider, startKeyboardAvoiderRuntime, stopKeyboardAvoiderRuntime } from "./js/src/keyboard-avoider/keyboard-avoider-runtime.js";
63
+ export type { KeyboardAvoiderController, KeyboardAvoiderOptions, KeyboardAvoiderState } from "./js/src/keyboard-avoider/keyboard-avoider-runtime.js";
64
+ export { createSheet, initSheet, startSheetRuntime, stopSheetRuntime } from "./js/src/sheet/sheet-runtime.js";
65
+ export type { SheetController, SheetDetent, SheetOptions, SheetState } from "./js/src/sheet/sheet-runtime.js";
62
66
  export { prefersReducedMotion, subscribeReducedMotion, createMotionCancelToken, runMotion, createElementMotion } from "./js/src/shared/motion.js";
63
67
  export type { MotionCancelToken, MotionDirection, MotionPlayer, MotionResult, MotionState } from "./js/src/shared/motion.js";
64
68
  export { JUICE_CHANGE_EVENT } from "./js/src/shared/change.js";