qstd 0.3.75 → 0.3.76

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.
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../src/block/drawer.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AA6a9B,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC,gBAAgB,2CAMxD;AAID,wBAAgB,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,mBAAmB,2CAYrD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,mBAAmB,uDAkDrD"}
1
+ {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../src/block/drawer.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AA+a9B,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC,gBAAgB,2CAMxD;AAID,wBAAgB,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,mBAAmB,2CAYrD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,mBAAmB,uDAkDrD"}
@@ -2670,7 +2670,6 @@ var accordion_default = Accordion;
2670
2670
  var MotionDiv4 = motionTags.div;
2671
2671
  var MotionBtn2 = motionTags.button;
2672
2672
  var breakpoint = ["(min-width: 600px)"];
2673
- var mobileOvershootCoverPx = 96;
2674
2673
  function requirePortalRootForDrawer() {
2675
2674
  if (typeof document === "undefined") {
2676
2675
  throw new Error(
@@ -2709,6 +2708,52 @@ function DrawerComponent(props) {
2709
2708
  const { open, setOpen } = useDrawer();
2710
2709
  const { onClose, onExitComplete, ...rest } = props;
2711
2710
  const drawerBg = rest.bg ?? { base: "neutral.100", _dark: "neutral.900" };
2711
+ const hasMobileHeight = props.height !== void 0;
2712
+ const mobileVariants = hasMobileHeight ? {
2713
+ initial: { height: 0, opacity: 0.5 },
2714
+ animate: {
2715
+ height: props.height,
2716
+ opacity: 1,
2717
+ transition: {
2718
+ type: "spring",
2719
+ damping: 22,
2720
+ stiffness: 400,
2721
+ mass: 0.7
2722
+ }
2723
+ },
2724
+ exit: {
2725
+ height: 0,
2726
+ opacity: 0,
2727
+ transition: {
2728
+ type: "tween",
2729
+ duration: 0.2,
2730
+ ease: [0.4, 0, 1, 1]
2731
+ // ease-in for quick exit
2732
+ }
2733
+ }
2734
+ } : {
2735
+ initial: { transform: "translateY(100%)", opacity: 0.5 },
2736
+ animate: {
2737
+ transform: "translateY(0%)",
2738
+ opacity: 1,
2739
+ transition: {
2740
+ type: "spring",
2741
+ damping: 22,
2742
+ stiffness: 400,
2743
+ mass: 0.7
2744
+ }
2745
+ },
2746
+ exit: {
2747
+ transform: "translateY(100%)",
2748
+ opacity: 0,
2749
+ transition: {
2750
+ type: "tween",
2751
+ duration: 0.2,
2752
+ ease: [0.4, 0, 1, 1]
2753
+ // ease-in for quick exit
2754
+ }
2755
+ }
2756
+ };
2712
2757
  const [mounted, setMounted] = React3__namespace.default.useState(false);
2713
2758
  React3__namespace.default.useEffect(() => {
2714
2759
  setMounted(true);
@@ -2803,155 +2848,116 @@ function DrawerComponent(props) {
2803
2848
  initial: false,
2804
2849
  mode: "wait",
2805
2850
  onExitComplete,
2806
- children: open && /* @__PURE__ */ jsxRuntime.jsxs(
2851
+ children: open && /* @__PURE__ */ jsxRuntime.jsx(
2807
2852
  Backdrop,
2808
2853
  {
2809
2854
  onClick: () => onBackdropClick(),
2810
- children: [
2811
- !isDesktop && /* @__PURE__ */ jsxRuntime.jsx(
2812
- MotionDiv4,
2813
- {
2814
- fixed: true,
2815
- left: 0,
2816
- right: 0,
2817
- bottom: 0,
2818
- h: mobileOvershootCoverPx,
2819
- pointerEvents: "none",
2820
- bg: drawerBg
2821
- }
2822
- ),
2823
- /* @__PURE__ */ jsxRuntime.jsx(
2824
- MotionDiv4,
2825
- {
2826
- grid: true,
2827
- onClick: (e) => e.stopPropagation(),
2828
- position: "fixed",
2829
- initial: "initial",
2830
- animate: "animate",
2831
- exit: "exit",
2832
- ...isDesktop ? {
2833
- drag: false,
2834
- style: void 0,
2835
- dragControls: null,
2836
- dragConstraints: void 0,
2837
- // style: null,
2838
- // dragConstraints: null,
2839
- height: props.height ?? "max-content!",
2840
- // "min(50%, 300px)",
2841
- width: props.width ?? "clamp(50%, 700px, 90%)",
2842
- pt: 6,
2843
- // px: 4,
2844
- margin: "auto",
2845
- borderRadius: 12,
2846
- zIndex: 1,
2847
- variants: {
2848
- initial: { opacity: 0, scale: 0.5 },
2849
- animate: {
2850
- opacity: 1,
2851
- scale: 1,
2852
- transition: {
2853
- type: "spring",
2854
- damping: 20,
2855
- stiffness: 300
2856
- }
2857
- },
2858
- exit: {
2859
- opacity: 0,
2860
- scale: 0.3,
2861
- transition: { type: "spring", duration: 0.45 }
2862
- }
2863
- }
2864
- } : {
2865
- w: "100vw",
2866
- left: 0,
2867
- right: 0,
2868
- bottom: 0,
2869
- borderTopLeftRadius: 12,
2870
- borderTopRightRadius: 12,
2871
- overflow: "hidden",
2872
- // Note: Can't use framer-motion's `y` prop because it conflicts
2873
- // with the drag motion value. Use CSS transform instead.
2874
- variants: {
2875
- initial: {
2876
- transform: "translateY(100%)",
2877
- opacity: 0.5
2878
- },
2879
- animate: {
2880
- transform: "translateY(0%)",
2881
- opacity: 1,
2882
- transition: {
2883
- type: "spring",
2884
- damping: 22,
2885
- stiffness: 400,
2886
- mass: 0.7
2887
- }
2888
- },
2889
- exit: {
2890
- transform: "translateY(100%)",
2891
- opacity: 0,
2892
- transition: {
2893
- type: "tween",
2894
- duration: 0.2,
2895
- ease: [0.4, 0, 1, 1]
2896
- // ease-in for quick exit
2897
- }
2855
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2856
+ MotionDiv4,
2857
+ {
2858
+ grid: true,
2859
+ onClick: (e) => e.stopPropagation(),
2860
+ position: "fixed",
2861
+ initial: "initial",
2862
+ animate: "animate",
2863
+ exit: "exit",
2864
+ ...isDesktop ? {
2865
+ drag: false,
2866
+ style: void 0,
2867
+ dragControls: null,
2868
+ dragConstraints: void 0,
2869
+ // style: null,
2870
+ // dragConstraints: null,
2871
+ height: props.height ?? "max-content!",
2872
+ // "min(50%, 300px)",
2873
+ width: props.width ?? "clamp(50%, 700px, 90%)",
2874
+ pt: 6,
2875
+ // px: 4,
2876
+ margin: "auto",
2877
+ borderRadius: 12,
2878
+ zIndex: 1,
2879
+ variants: {
2880
+ initial: { opacity: 0, scale: 0.5 },
2881
+ animate: {
2882
+ opacity: 1,
2883
+ scale: 1,
2884
+ transition: {
2885
+ type: "spring",
2886
+ damping: 20,
2887
+ stiffness: 300
2898
2888
  }
2899
2889
  },
2900
- drag: "y",
2901
- style: { y },
2902
- dragControls,
2903
- onPointerDown: (e) => onDragStart(e),
2904
- // drag={hasBackdrop ? "y" : false}
2905
- dragElastic: 0,
2906
- // prevent drawer from being dragged higher than what its opened to
2907
- dragConstraints: { top: 0 },
2908
- onDragEnd: (_, drag) => {
2909
- if (props.drag === false) return;
2910
- const pageHeight = document.documentElement.scrollHeight;
2911
- const yCoord = drag.point.y;
2912
- const velocity = drag.velocity.y;
2913
- const releaseThreshold = 0.8;
2914
- const releasePct = yCoord / pageHeight;
2915
- if (velocity > 25 && releasePct >= releaseThreshold || velocity > 750) {
2916
- props.onClose?.();
2917
- }
2890
+ exit: {
2891
+ opacity: 0,
2892
+ scale: 0.3,
2893
+ transition: { type: "spring", duration: 0.45 }
2918
2894
  }
2919
- },
2920
- boxSizing: "border-box",
2921
- boxShadow: "hsl(0deg 0% 0% / 60%) 0px -4px 20px",
2922
- bg: { base: "neutral.100", _dark: "neutral.900" },
2923
- color: "text-primary",
2924
- ref,
2925
- ...rest,
2926
- children: /* @__PURE__ */ jsxRuntime.jsxs(
2927
- MotionDiv4,
2928
- {
2929
- grid: true,
2930
- ...isDesktop ? { position: "relative" } : { rows: "max-content 1fr" },
2931
- children: [
2932
- !isDesktop && props.hideHandle !== false && /* @__PURE__ */ jsxRuntime.jsx(
2933
- MotionDiv4,
2934
- {
2935
- grid: true,
2936
- justifySelf: "center",
2937
- h: 6,
2938
- w: 34,
2939
- mt: "16px",
2940
- mb: 4,
2941
- br: 20,
2942
- bg: { base: "neutral.400", _dark: "neutral.600" },
2943
- cursor: props.drag ? "row-resize" : "default",
2944
- ref: dragHandleRef
2945
- }
2946
- ),
2947
- props.children
2948
- ]
2895
+ }
2896
+ } : {
2897
+ w: "100vw",
2898
+ left: 0,
2899
+ right: 0,
2900
+ bottom: 0,
2901
+ borderTopLeftRadius: 12,
2902
+ borderTopRightRadius: 12,
2903
+ overflow: "hidden",
2904
+ // Note: Can't use framer-motion's `y` prop because it conflicts
2905
+ // with the drag motion value. Use CSS transform instead.
2906
+ drag: "y",
2907
+ style: { y },
2908
+ dragControls,
2909
+ variants: mobileVariants,
2910
+ onPointerDown: (e) => onDragStart(e),
2911
+ // drag={hasBackdrop ? "y" : false}
2912
+ dragElastic: 0,
2913
+ // prevent drawer from being dragged higher than what its opened to
2914
+ dragConstraints: { top: 0 },
2915
+ onDragEnd: (_, drag) => {
2916
+ if (props.drag === false) return;
2917
+ const pageHeight = document.documentElement.scrollHeight;
2918
+ const yCoord = drag.point.y;
2919
+ const velocity = drag.velocity.y;
2920
+ const releaseThreshold = 0.8;
2921
+ const releasePct = yCoord / pageHeight;
2922
+ if (velocity > 25 && releasePct >= releaseThreshold || velocity > 750) {
2923
+ props.onClose?.();
2949
2924
  }
2950
- )
2925
+ }
2951
2926
  },
2952
- "drawer"
2953
- )
2954
- ]
2927
+ boxSizing: "border-box",
2928
+ boxShadow: "hsl(0deg 0% 0% / 60%) 0px -4px 20px",
2929
+ color: "text-primary",
2930
+ bg: drawerBg,
2931
+ ref,
2932
+ ...rest,
2933
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
2934
+ MotionDiv4,
2935
+ {
2936
+ grid: true,
2937
+ ...isDesktop ? { position: "relative" } : { rows: "max-content 1fr" },
2938
+ children: [
2939
+ !isDesktop && props.hideHandle !== false && /* @__PURE__ */ jsxRuntime.jsx(
2940
+ MotionDiv4,
2941
+ {
2942
+ grid: true,
2943
+ justifySelf: "center",
2944
+ h: 6,
2945
+ w: 34,
2946
+ mt: "16px",
2947
+ mb: 4,
2948
+ br: 20,
2949
+ bg: { base: "neutral.400", _dark: "neutral.600" },
2950
+ cursor: props.drag ? "row-resize" : "default",
2951
+ ref: dragHandleRef
2952
+ }
2953
+ ),
2954
+ props.children
2955
+ ]
2956
+ }
2957
+ )
2958
+ },
2959
+ "drawer"
2960
+ )
2955
2961
  }
2956
2962
  )
2957
2963
  }
@@ -996,12 +996,6 @@
996
996
  .stk-w_4 path {
997
997
  stroke-width: 4;
998
998
  }
999
- .fixed_true {
1000
- position: fixed;
1001
- }
1002
- .pointer-events_none {
1003
- pointer-events: none;
1004
- }
1005
999
  .pos_fixed {
1006
1000
  position: fixed;
1007
1001
  }
@@ -1115,6 +1109,9 @@
1115
1109
  .grid-af_column {
1116
1110
  grid-auto-flow: column;
1117
1111
  }
1112
+ .pointer-events_none {
1113
+ pointer-events: none;
1114
+ }
1118
1115
  .trf-o_top_left {
1119
1116
  transform-origin: top left;
1120
1117
  }
@@ -1239,18 +1236,6 @@
1239
1236
  .w_100\% {
1240
1237
  width: 100%;
1241
1238
  }
1242
- .left_0 {
1243
- left: var(--spacing-0);
1244
- }
1245
- .right_0 {
1246
- right: var(--spacing-0);
1247
- }
1248
- .bottom_0 {
1249
- bottom: var(--spacing-0);
1250
- }
1251
- .h_96 {
1252
- height: 96px;
1253
- }
1254
1239
  .h_max-content\! {
1255
1240
  height: max-content !important;
1256
1241
  }
@@ -1263,6 +1248,15 @@
1263
1248
  .w_100vw {
1264
1249
  width: 100vw;
1265
1250
  }
1251
+ .left_0 {
1252
+ left: var(--spacing-0);
1253
+ }
1254
+ .right_0 {
1255
+ right: var(--spacing-0);
1256
+ }
1257
+ .bottom_0 {
1258
+ bottom: var(--spacing-0);
1259
+ }
1266
1260
  .bdr-tl_12 {
1267
1261
  border-top-left-radius: 12px;
1268
1262
  }
@@ -2647,7 +2647,6 @@ var accordion_default = Accordion;
2647
2647
  var MotionDiv4 = motionTags.div;
2648
2648
  var MotionBtn2 = motionTags.button;
2649
2649
  var breakpoint = ["(min-width: 600px)"];
2650
- var mobileOvershootCoverPx = 96;
2651
2650
  function requirePortalRootForDrawer() {
2652
2651
  if (typeof document === "undefined") {
2653
2652
  throw new Error(
@@ -2686,6 +2685,52 @@ function DrawerComponent(props) {
2686
2685
  const { open, setOpen } = useDrawer();
2687
2686
  const { onClose, onExitComplete, ...rest } = props;
2688
2687
  const drawerBg = rest.bg ?? { base: "neutral.100", _dark: "neutral.900" };
2688
+ const hasMobileHeight = props.height !== void 0;
2689
+ const mobileVariants = hasMobileHeight ? {
2690
+ initial: { height: 0, opacity: 0.5 },
2691
+ animate: {
2692
+ height: props.height,
2693
+ opacity: 1,
2694
+ transition: {
2695
+ type: "spring",
2696
+ damping: 22,
2697
+ stiffness: 400,
2698
+ mass: 0.7
2699
+ }
2700
+ },
2701
+ exit: {
2702
+ height: 0,
2703
+ opacity: 0,
2704
+ transition: {
2705
+ type: "tween",
2706
+ duration: 0.2,
2707
+ ease: [0.4, 0, 1, 1]
2708
+ // ease-in for quick exit
2709
+ }
2710
+ }
2711
+ } : {
2712
+ initial: { transform: "translateY(100%)", opacity: 0.5 },
2713
+ animate: {
2714
+ transform: "translateY(0%)",
2715
+ opacity: 1,
2716
+ transition: {
2717
+ type: "spring",
2718
+ damping: 22,
2719
+ stiffness: 400,
2720
+ mass: 0.7
2721
+ }
2722
+ },
2723
+ exit: {
2724
+ transform: "translateY(100%)",
2725
+ opacity: 0,
2726
+ transition: {
2727
+ type: "tween",
2728
+ duration: 0.2,
2729
+ ease: [0.4, 0, 1, 1]
2730
+ // ease-in for quick exit
2731
+ }
2732
+ }
2733
+ };
2689
2734
  const [mounted, setMounted] = React3__default.useState(false);
2690
2735
  React3__default.useEffect(() => {
2691
2736
  setMounted(true);
@@ -2780,155 +2825,116 @@ function DrawerComponent(props) {
2780
2825
  initial: false,
2781
2826
  mode: "wait",
2782
2827
  onExitComplete,
2783
- children: open && /* @__PURE__ */ jsxs(
2828
+ children: open && /* @__PURE__ */ jsx(
2784
2829
  Backdrop,
2785
2830
  {
2786
2831
  onClick: () => onBackdropClick(),
2787
- children: [
2788
- !isDesktop && /* @__PURE__ */ jsx(
2789
- MotionDiv4,
2790
- {
2791
- fixed: true,
2792
- left: 0,
2793
- right: 0,
2794
- bottom: 0,
2795
- h: mobileOvershootCoverPx,
2796
- pointerEvents: "none",
2797
- bg: drawerBg
2798
- }
2799
- ),
2800
- /* @__PURE__ */ jsx(
2801
- MotionDiv4,
2802
- {
2803
- grid: true,
2804
- onClick: (e) => e.stopPropagation(),
2805
- position: "fixed",
2806
- initial: "initial",
2807
- animate: "animate",
2808
- exit: "exit",
2809
- ...isDesktop ? {
2810
- drag: false,
2811
- style: void 0,
2812
- dragControls: null,
2813
- dragConstraints: void 0,
2814
- // style: null,
2815
- // dragConstraints: null,
2816
- height: props.height ?? "max-content!",
2817
- // "min(50%, 300px)",
2818
- width: props.width ?? "clamp(50%, 700px, 90%)",
2819
- pt: 6,
2820
- // px: 4,
2821
- margin: "auto",
2822
- borderRadius: 12,
2823
- zIndex: 1,
2824
- variants: {
2825
- initial: { opacity: 0, scale: 0.5 },
2826
- animate: {
2827
- opacity: 1,
2828
- scale: 1,
2829
- transition: {
2830
- type: "spring",
2831
- damping: 20,
2832
- stiffness: 300
2833
- }
2834
- },
2835
- exit: {
2836
- opacity: 0,
2837
- scale: 0.3,
2838
- transition: { type: "spring", duration: 0.45 }
2839
- }
2840
- }
2841
- } : {
2842
- w: "100vw",
2843
- left: 0,
2844
- right: 0,
2845
- bottom: 0,
2846
- borderTopLeftRadius: 12,
2847
- borderTopRightRadius: 12,
2848
- overflow: "hidden",
2849
- // Note: Can't use framer-motion's `y` prop because it conflicts
2850
- // with the drag motion value. Use CSS transform instead.
2851
- variants: {
2852
- initial: {
2853
- transform: "translateY(100%)",
2854
- opacity: 0.5
2855
- },
2856
- animate: {
2857
- transform: "translateY(0%)",
2858
- opacity: 1,
2859
- transition: {
2860
- type: "spring",
2861
- damping: 22,
2862
- stiffness: 400,
2863
- mass: 0.7
2864
- }
2865
- },
2866
- exit: {
2867
- transform: "translateY(100%)",
2868
- opacity: 0,
2869
- transition: {
2870
- type: "tween",
2871
- duration: 0.2,
2872
- ease: [0.4, 0, 1, 1]
2873
- // ease-in for quick exit
2874
- }
2832
+ children: /* @__PURE__ */ jsx(
2833
+ MotionDiv4,
2834
+ {
2835
+ grid: true,
2836
+ onClick: (e) => e.stopPropagation(),
2837
+ position: "fixed",
2838
+ initial: "initial",
2839
+ animate: "animate",
2840
+ exit: "exit",
2841
+ ...isDesktop ? {
2842
+ drag: false,
2843
+ style: void 0,
2844
+ dragControls: null,
2845
+ dragConstraints: void 0,
2846
+ // style: null,
2847
+ // dragConstraints: null,
2848
+ height: props.height ?? "max-content!",
2849
+ // "min(50%, 300px)",
2850
+ width: props.width ?? "clamp(50%, 700px, 90%)",
2851
+ pt: 6,
2852
+ // px: 4,
2853
+ margin: "auto",
2854
+ borderRadius: 12,
2855
+ zIndex: 1,
2856
+ variants: {
2857
+ initial: { opacity: 0, scale: 0.5 },
2858
+ animate: {
2859
+ opacity: 1,
2860
+ scale: 1,
2861
+ transition: {
2862
+ type: "spring",
2863
+ damping: 20,
2864
+ stiffness: 300
2875
2865
  }
2876
2866
  },
2877
- drag: "y",
2878
- style: { y },
2879
- dragControls,
2880
- onPointerDown: (e) => onDragStart(e),
2881
- // drag={hasBackdrop ? "y" : false}
2882
- dragElastic: 0,
2883
- // prevent drawer from being dragged higher than what its opened to
2884
- dragConstraints: { top: 0 },
2885
- onDragEnd: (_, drag) => {
2886
- if (props.drag === false) return;
2887
- const pageHeight = document.documentElement.scrollHeight;
2888
- const yCoord = drag.point.y;
2889
- const velocity = drag.velocity.y;
2890
- const releaseThreshold = 0.8;
2891
- const releasePct = yCoord / pageHeight;
2892
- if (velocity > 25 && releasePct >= releaseThreshold || velocity > 750) {
2893
- props.onClose?.();
2894
- }
2867
+ exit: {
2868
+ opacity: 0,
2869
+ scale: 0.3,
2870
+ transition: { type: "spring", duration: 0.45 }
2895
2871
  }
2896
- },
2897
- boxSizing: "border-box",
2898
- boxShadow: "hsl(0deg 0% 0% / 60%) 0px -4px 20px",
2899
- bg: { base: "neutral.100", _dark: "neutral.900" },
2900
- color: "text-primary",
2901
- ref,
2902
- ...rest,
2903
- children: /* @__PURE__ */ jsxs(
2904
- MotionDiv4,
2905
- {
2906
- grid: true,
2907
- ...isDesktop ? { position: "relative" } : { rows: "max-content 1fr" },
2908
- children: [
2909
- !isDesktop && props.hideHandle !== false && /* @__PURE__ */ jsx(
2910
- MotionDiv4,
2911
- {
2912
- grid: true,
2913
- justifySelf: "center",
2914
- h: 6,
2915
- w: 34,
2916
- mt: "16px",
2917
- mb: 4,
2918
- br: 20,
2919
- bg: { base: "neutral.400", _dark: "neutral.600" },
2920
- cursor: props.drag ? "row-resize" : "default",
2921
- ref: dragHandleRef
2922
- }
2923
- ),
2924
- props.children
2925
- ]
2872
+ }
2873
+ } : {
2874
+ w: "100vw",
2875
+ left: 0,
2876
+ right: 0,
2877
+ bottom: 0,
2878
+ borderTopLeftRadius: 12,
2879
+ borderTopRightRadius: 12,
2880
+ overflow: "hidden",
2881
+ // Note: Can't use framer-motion's `y` prop because it conflicts
2882
+ // with the drag motion value. Use CSS transform instead.
2883
+ drag: "y",
2884
+ style: { y },
2885
+ dragControls,
2886
+ variants: mobileVariants,
2887
+ onPointerDown: (e) => onDragStart(e),
2888
+ // drag={hasBackdrop ? "y" : false}
2889
+ dragElastic: 0,
2890
+ // prevent drawer from being dragged higher than what its opened to
2891
+ dragConstraints: { top: 0 },
2892
+ onDragEnd: (_, drag) => {
2893
+ if (props.drag === false) return;
2894
+ const pageHeight = document.documentElement.scrollHeight;
2895
+ const yCoord = drag.point.y;
2896
+ const velocity = drag.velocity.y;
2897
+ const releaseThreshold = 0.8;
2898
+ const releasePct = yCoord / pageHeight;
2899
+ if (velocity > 25 && releasePct >= releaseThreshold || velocity > 750) {
2900
+ props.onClose?.();
2926
2901
  }
2927
- )
2902
+ }
2928
2903
  },
2929
- "drawer"
2930
- )
2931
- ]
2904
+ boxSizing: "border-box",
2905
+ boxShadow: "hsl(0deg 0% 0% / 60%) 0px -4px 20px",
2906
+ color: "text-primary",
2907
+ bg: drawerBg,
2908
+ ref,
2909
+ ...rest,
2910
+ children: /* @__PURE__ */ jsxs(
2911
+ MotionDiv4,
2912
+ {
2913
+ grid: true,
2914
+ ...isDesktop ? { position: "relative" } : { rows: "max-content 1fr" },
2915
+ children: [
2916
+ !isDesktop && props.hideHandle !== false && /* @__PURE__ */ jsx(
2917
+ MotionDiv4,
2918
+ {
2919
+ grid: true,
2920
+ justifySelf: "center",
2921
+ h: 6,
2922
+ w: 34,
2923
+ mt: "16px",
2924
+ mb: 4,
2925
+ br: 20,
2926
+ bg: { base: "neutral.400", _dark: "neutral.600" },
2927
+ cursor: props.drag ? "row-resize" : "default",
2928
+ ref: dragHandleRef
2929
+ }
2930
+ ),
2931
+ props.children
2932
+ ]
2933
+ }
2934
+ )
2935
+ },
2936
+ "drawer"
2937
+ )
2932
2938
  }
2933
2939
  )
2934
2940
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qstd",
3
- "version": "0.3.75",
3
+ "version": "0.3.76",
4
4
  "description": "Standard Block component and utilities library with Panda CSS",
5
5
  "author": "malin1",
6
6
  "license": "MIT",
@@ -1017,14 +1017,6 @@
1017
1017
  stroke-width: 4;
1018
1018
  }
1019
1019
 
1020
- .fixed_true {
1021
- position: fixed;
1022
- }
1023
-
1024
- .pointer-events_none {
1025
- pointer-events: none;
1026
- }
1027
-
1028
1020
  .pos_fixed {
1029
1021
  position: fixed;
1030
1022
  }
@@ -1167,6 +1159,10 @@
1167
1159
  grid-auto-flow: column;
1168
1160
  }
1169
1161
 
1162
+ .pointer-events_none {
1163
+ pointer-events: none;
1164
+ }
1165
+
1170
1166
  .trf-o_top_left {
1171
1167
  transform-origin: top left;
1172
1168
  }
@@ -1331,22 +1327,6 @@
1331
1327
  width: 100%;
1332
1328
  }
1333
1329
 
1334
- .left_0 {
1335
- left: var(--spacing-0);
1336
- }
1337
-
1338
- .right_0 {
1339
- right: var(--spacing-0);
1340
- }
1341
-
1342
- .bottom_0 {
1343
- bottom: var(--spacing-0);
1344
- }
1345
-
1346
- .h_96 {
1347
- height: 96px;
1348
- }
1349
-
1350
1330
  .h_max-content\! {
1351
1331
  height: max-content !important;
1352
1332
  }
@@ -1363,6 +1343,18 @@
1363
1343
  width: 100vw;
1364
1344
  }
1365
1345
 
1346
+ .left_0 {
1347
+ left: var(--spacing-0);
1348
+ }
1349
+
1350
+ .right_0 {
1351
+ right: var(--spacing-0);
1352
+ }
1353
+
1354
+ .bottom_0 {
1355
+ bottom: var(--spacing-0);
1356
+ }
1357
+
1366
1358
  .bdr-tl_12 {
1367
1359
  border-top-left-radius: 12px;
1368
1360
  }