@pathscale/ui 0.0.146 → 0.0.148

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,6 +1,8 @@
1
1
  import { type JSX } from "solid-js";
2
2
  import type { IComponentBaseProps, ComponentSize, ComponentColor } from "../types";
3
+ export type GlassPanelBlur = "none" | "sm" | "md" | "lg" | "xl" | "2xl";
3
4
  export type GlassPanelProps = IComponentBaseProps & JSX.HTMLAttributes<HTMLDivElement> & {
5
+ blur?: GlassPanelBlur;
4
6
  collapsible?: boolean;
5
7
  open?: boolean;
6
8
  defaultOpen?: boolean;
@@ -1 +1 @@
1
- export { default, type GlassPanelProps } from "./GlassPanel";
1
+ export { default, type GlassPanelProps, type GlassPanelBlur } from "./GlassPanel";
package/dist/index.d.ts CHANGED
@@ -38,7 +38,7 @@ export type { FloatingDockProps, FloatingDockItem, FloatingDockDirection } from
38
38
  export { default as Flex } from "./components/flex";
39
39
  export { default as GlassPanel } from "./components/glass-panel";
40
40
  export { GlowCard, type GlowCardProps } from "./components/glow-card";
41
- export type { GlassPanelProps } from "./components/glass-panel";
41
+ export type { GlassPanelProps, GlassPanelBlur } from "./components/glass-panel";
42
42
  export { default as Footer } from "./components/footer";
43
43
  export type { FooterProps, FooterTitleProps } from "./components/footer";
44
44
  export { FormActions, type FormActionsProps } from "./components/form-actions";
package/dist/index.js CHANGED
@@ -10485,7 +10485,11 @@ const FloatingDock_DockItem = (props)=>{
10485
10485
  rafId = requestAnimationFrame(tick);
10486
10486
  };
10487
10487
  (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onMount)(()=>{
10488
- startLoop();
10488
+ if (!cfg.magnify) return;
10489
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createEffect)(()=>{
10490
+ props.mousePos();
10491
+ startLoop();
10492
+ });
10489
10493
  });
10490
10494
  (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onCleanup)(()=>{
10491
10495
  stopLoop();
@@ -10838,6 +10842,14 @@ const floating_dock_FloatingDock = FloatingDock;
10838
10842
  "mousemove"
10839
10843
  ]);
10840
10844
  var GlassPanel_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<button type=button class="flex w-full items-center justify-between gap-2 px-4 py-3 text-sm font-medium cursor-pointer select-none transition-colors duration-150 text-base-content/50 hover:text-base-content/80 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary"><span class="flex items-center gap-2"></span><svg fill=none viewBox="0 0 24 24"stroke=currentColor stroke-width=1.5><path stroke-linecap=round stroke-linejoin=round d="M19 9l-7 7-7-7">'), GlassPanel_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div><div class="grid transition-[grid-template-rows] duration-200 ease-in-out"><div>');
10845
+ const BLUR_MAP = {
10846
+ none: "",
10847
+ sm: "backdrop-blur-sm",
10848
+ md: "backdrop-blur-md",
10849
+ lg: "backdrop-blur-lg",
10850
+ xl: "backdrop-blur-xl",
10851
+ "2xl": "backdrop-blur-2xl"
10852
+ };
10841
10853
  const SIZE_PADDING = {
10842
10854
  xs: "p-2",
10843
10855
  sm: "p-3",
@@ -10858,6 +10870,7 @@ const ACCENT_BORDER = {
10858
10870
  };
10859
10871
  const GlassPanel = (props)=>{
10860
10872
  const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
10873
+ "blur",
10861
10874
  "collapsible",
10862
10875
  "open",
10863
10876
  "defaultOpen",
@@ -10875,6 +10888,7 @@ const GlassPanel = (props)=>{
10875
10888
  "style"
10876
10889
  ]);
10877
10890
  const contentId = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createUniqueId)();
10891
+ const blur = ()=>local.blur ?? "none";
10878
10892
  const size = ()=>local.size ?? "md";
10879
10893
  const isControlled = ()=>void 0 !== local.open;
10880
10894
  const [internalOpen, setInternalOpen] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(local.defaultOpen ?? true);
@@ -10884,7 +10898,9 @@ const GlassPanel = (props)=>{
10884
10898
  if (!isControlled()) setInternalOpen(next);
10885
10899
  local.onToggle?.(next);
10886
10900
  };
10887
- const containerClasses = ()=>twMerge("glass-panel", "rounded-xl", "backdrop-blur-[2px]", "transition-all duration-200 ease-in-out", clsx({
10901
+ const containerClasses = ()=>twMerge("glass-panel", "rounded-xl", "transition-all duration-200 ease-in-out", clsx({
10902
+ "bg-transparent": local.transparent,
10903
+ [BLUR_MAP[blur()]]: !local.transparent && "none" !== blur(),
10888
10904
  "border-l-2": !!local.accent,
10889
10905
  [ACCENT_BORDER[local.accent ?? ""]]: !!local.accent
10890
10906
  }), local.class, local.className);
@@ -10893,7 +10909,7 @@ const GlassPanel = (props)=>{
10893
10909
  ...local.style || {}
10894
10910
  };
10895
10911
  if (!local.transparent) {
10896
- base.background = "color-mix(in srgb, var(--color-base-200) 80%, transparent)";
10912
+ base.background = "color-mix(in srgb, var(--color-base-200) 85%, transparent)";
10897
10913
  base.border = "1px solid color-mix(in srgb, var(--color-base-content) 8%, transparent)";
10898
10914
  }
10899
10915
  if (local.glow) base["box-shadow"] = "inset 0 1px 0 color-mix(in srgb, var(--color-base-content) 5%, transparent)";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pathscale/ui",
3
- "version": "0.0.146",
3
+ "version": "0.0.148",
4
4
  "author": "pathscale",
5
5
  "repository": {
6
6
  "type": "git",