@gnome-ui/react 1.46.0 → 1.48.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 (43) hide show
  1. package/README.md +1 -0
  2. package/dist/components/EntryRow/EntryRow.module.css.cjs +1 -1
  3. package/dist/components/EntryRow/EntryRow.module.css.cjs.map +1 -1
  4. package/dist/components/EntryRow/EntryRow.module.css.js +10 -10
  5. package/dist/components/EntryRow/EntryRow.module.css.js.map +1 -1
  6. package/dist/components/InlineViewSwitcher/InlineViewSwitcher.cjs +1 -1
  7. package/dist/components/InlineViewSwitcher/InlineViewSwitcher.cjs.map +1 -1
  8. package/dist/components/InlineViewSwitcher/InlineViewSwitcher.d.ts +11 -1
  9. package/dist/components/InlineViewSwitcher/InlineViewSwitcher.js +136 -24
  10. package/dist/components/InlineViewSwitcher/InlineViewSwitcher.js.map +1 -1
  11. package/dist/components/InlineViewSwitcher/InlineViewSwitcher.module.css.cjs +1 -1
  12. package/dist/components/InlineViewSwitcher/InlineViewSwitcher.module.css.cjs.map +1 -1
  13. package/dist/components/InlineViewSwitcher/InlineViewSwitcher.module.css.js +22 -10
  14. package/dist/components/InlineViewSwitcher/InlineViewSwitcher.module.css.js.map +1 -1
  15. package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.cjs +1 -1
  16. package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.cjs.map +1 -1
  17. package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.d.ts +4 -1
  18. package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.js +7 -6
  19. package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.js.map +1 -1
  20. package/dist/components/InlineViewSwitcher/index.d.ts +1 -1
  21. package/dist/components/ScrollToTop/ScrollToTop.cjs +2 -0
  22. package/dist/components/ScrollToTop/ScrollToTop.cjs.map +1 -0
  23. package/dist/components/ScrollToTop/ScrollToTop.d.ts +74 -0
  24. package/dist/components/ScrollToTop/ScrollToTop.js +42 -0
  25. package/dist/components/ScrollToTop/ScrollToTop.js.map +1 -0
  26. package/dist/components/ScrollToTop/ScrollToTop.module.css.cjs +2 -0
  27. package/dist/components/ScrollToTop/ScrollToTop.module.css.cjs.map +1 -0
  28. package/dist/components/ScrollToTop/ScrollToTop.module.css.js +13 -0
  29. package/dist/components/ScrollToTop/ScrollToTop.module.css.js.map +1 -0
  30. package/dist/components/ScrollToTop/index.d.ts +2 -0
  31. package/dist/components/ScrollToTop/useScrollToTopVisibility.cjs +2 -0
  32. package/dist/components/ScrollToTop/useScrollToTopVisibility.cjs.map +1 -0
  33. package/dist/components/ScrollToTop/useScrollToTopVisibility.d.ts +21 -0
  34. package/dist/components/ScrollToTop/useScrollToTopVisibility.js +18 -0
  35. package/dist/components/ScrollToTop/useScrollToTopVisibility.js.map +1 -0
  36. package/dist/components/ScrollToTop.cjs +1 -0
  37. package/dist/components/ScrollToTop.d.ts +2 -0
  38. package/dist/components/ScrollToTop.js +2 -0
  39. package/dist/index.cjs +1 -1
  40. package/dist/index.d.ts +2 -0
  41. package/dist/index.js +40 -39
  42. package/dist/style.css +1 -1
  43. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"InlineViewSwitcherItem.cjs","names":[],"sources":["../../../src/components/InlineViewSwitcher/InlineViewSwitcherItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport { useInlineViewSwitcher } from './InlineViewSwitcher';\nimport styles from './InlineViewSwitcher.module.css';\n\nexport interface InlineViewSwitcherItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** String identifier — used as the switcher's `value` when this item is active. */\n name: string;\n /** Visible label. */\n label?: string;\n /** Icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n}\n\n/**\n * Individual view option inside an `InlineViewSwitcher`.\n *\n * Can be icon-only, label-only, or icon + label. For icon-only items always\n * provide an `aria-label` so screen readers can identify the view.\n */\nexport const InlineViewSwitcherItem = ({\n name,\n label,\n icon,\n disabled,\n className,\n ...props\n}: InlineViewSwitcherItemProps) => {\n const { value, onValueChange } = useInlineViewSwitcher();\n const active = value === name;\n const iconOnly = icon && !label;\n\n return (\n <button\n type=\"button\"\n role=\"radio\"\n aria-checked={active}\n tabIndex={active ? 0 : -1}\n disabled={disabled}\n onClick={() => onValueChange(name)}\n className={[\n styles.item,\n active ? styles.active : null,\n iconOnly ? styles.iconOnly : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {icon && (\n <span className={styles.itemIcon}>\n <Icon icon={icon} size=\"md\" aria-hidden />\n </span>\n )}\n {label && <span className={styles.itemLabel}>{label}</span>}\n </button>\n );\n};\n"],"mappings":"8JAuBA,IAAa,GAA0B,CACrC,OACA,QACA,OACA,WACA,YACA,GAAG,KAC8B,CACjC,GAAM,CAAE,QAAO,iBAAkB,EAAA,sBAAsB,EACjD,EAAS,IAAU,EACnB,EAAW,GAAQ,CAAC,EAE1B,OACE,EAAA,EAAA,MAAC,SAAD,CACE,KAAK,SACL,KAAK,QACL,eAAc,EACd,SAAU,EAAS,EAAI,GACb,WACV,YAAe,EAAc,CAAI,EACjC,UAAW,CACT,EAAA,QAAO,KACP,EAAS,EAAA,QAAO,OAAS,KACzB,EAAW,EAAA,QAAO,SAAW,KAC7B,CACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG,EACX,GAAI,WAfN,CAiBG,IACC,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,mBACtB,EAAA,EAAA,KAAC,EAAA,KAAD,CAAY,OAAM,KAAK,KAAK,cAAA,EAAa,CAAA,CACrC,CAAA,EAEP,IAAS,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,mBAAY,CAAY,CAAA,CACpD,GAEZ"}
1
+ {"version":3,"file":"InlineViewSwitcherItem.cjs","names":[],"sources":["../../../src/components/InlineViewSwitcher/InlineViewSwitcherItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport { useInlineViewSwitcher } from './InlineViewSwitcher';\nimport styles from './InlineViewSwitcher.module.css';\n\nexport interface InlineViewSwitcherItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** String identifier — used as the switcher's `value` when this item is active. */\n name: string;\n /** Visible label. */\n label?: string;\n /** Icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n}\n\n/**\n * Individual view option inside an `InlineViewSwitcher`.\n *\n * Can be icon-only, label-only, or icon + label. For icon-only items always\n * provide an `aria-label` so screen readers can identify the view.\n */\nexport const InlineViewSwitcherItem = ({\n name,\n label,\n icon,\n disabled,\n className,\n ...props\n}: InlineViewSwitcherItemProps) => {\n const { value, onValueChange, compact } = useInlineViewSwitcher();\n const active = value === name;\n // In compact mode, hide the label when an icon is present as a fallback\n const showLabel = !!label && !(compact && icon);\n const isIconOnly = !!icon && !showLabel;\n\n return (\n <button\n type=\"button\"\n role=\"radio\"\n aria-checked={active}\n tabIndex={active ? 0 : -1}\n disabled={disabled}\n onClick={() => onValueChange(name)}\n className={[\n styles.item,\n active ? styles.active : null,\n isIconOnly ? styles.iconOnly : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {icon && (\n <span className={styles.itemIcon}>\n <Icon icon={icon} size=\"md\" aria-hidden />\n </span>\n )}\n {showLabel && <span className={styles.itemLabel}>{label}</span>}\n </button>\n );\n};\n\nInlineViewSwitcherItem.displayName = 'InlineViewSwitcherItem';\n"],"mappings":"8JAuBA,IAAa,GAA0B,CACrC,OACA,QACA,OACA,WACA,YACA,GAAG,KAC8B,CACjC,GAAM,CAAE,QAAO,gBAAe,WAAY,EAAA,sBAAsB,EAC1D,EAAS,IAAU,EAEnB,EAAY,CAAC,CAAC,GAAS,EAAE,GAAW,GACpC,EAAa,CAAC,CAAC,GAAQ,CAAC,EAE9B,OACE,EAAA,EAAA,MAAC,SAAD,CACE,KAAK,SACL,KAAK,QACL,eAAc,EACd,SAAU,EAAS,EAAI,GACb,WACV,YAAe,EAAc,CAAI,EACjC,UAAW,CACT,EAAA,QAAO,KACP,EAAS,EAAA,QAAO,OAAS,KACzB,EAAa,EAAA,QAAO,SAAW,KAC/B,CACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG,EACX,GAAI,WAfN,CAiBG,IACC,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,mBACtB,EAAA,EAAA,KAAC,EAAA,KAAD,CAAY,OAAM,KAAK,KAAK,cAAA,EAAa,CAAA,CACrC,CAAA,EAEP,IAAa,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAA,QAAO,mBAAY,CAAY,CAAA,CACxD,GAEZ,EAEA,EAAuB,YAAc"}
@@ -14,4 +14,7 @@ export interface InlineViewSwitcherItemProps extends ButtonHTMLAttributes<HTMLBu
14
14
  * Can be icon-only, label-only, or icon + label. For icon-only items always
15
15
  * provide an `aria-label` so screen readers can identify the view.
16
16
  */
17
- export declare const InlineViewSwitcherItem: ({ name, label, icon, disabled, className, ...props }: InlineViewSwitcherItemProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const InlineViewSwitcherItem: {
18
+ ({ name, label, icon, disabled, className, ...props }: InlineViewSwitcherItemProps): import("react/jsx-runtime").JSX.Element;
19
+ displayName: string;
20
+ };
@@ -4,18 +4,18 @@ import { useInlineViewSwitcher as n } from "./InlineViewSwitcher.js";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
5
  //#region src/components/InlineViewSwitcher/InlineViewSwitcherItem.tsx
6
6
  var a = ({ name: a, label: o, icon: s, disabled: c, className: l, ...u }) => {
7
- let { value: d, onValueChange: f } = n(), p = d === a, m = s && !o;
7
+ let { value: d, onValueChange: f, compact: p } = n(), m = d === a, h = !!o && !(p && s), g = !!s && !h;
8
8
  return /* @__PURE__ */ i("button", {
9
9
  type: "button",
10
10
  role: "radio",
11
- "aria-checked": p,
12
- tabIndex: p ? 0 : -1,
11
+ "aria-checked": m,
12
+ tabIndex: m ? 0 : -1,
13
13
  disabled: c,
14
14
  onClick: () => f(a),
15
15
  className: [
16
16
  t.item,
17
- p ? t.active : null,
18
- m ? t.iconOnly : null,
17
+ m ? t.active : null,
18
+ g ? t.iconOnly : null,
19
19
  l
20
20
  ].filter(Boolean).join(" "),
21
21
  ...u,
@@ -26,12 +26,13 @@ var a = ({ name: a, label: o, icon: s, disabled: c, className: l, ...u }) => {
26
26
  size: "md",
27
27
  "aria-hidden": !0
28
28
  })
29
- }), o && /* @__PURE__ */ r("span", {
29
+ }), h && /* @__PURE__ */ r("span", {
30
30
  className: t.itemLabel,
31
31
  children: o
32
32
  })]
33
33
  });
34
34
  };
35
+ a.displayName = "InlineViewSwitcherItem";
35
36
  //#endregion
36
37
  export { a as InlineViewSwitcherItem };
37
38
 
@@ -1 +1 @@
1
- {"version":3,"file":"InlineViewSwitcherItem.js","names":[],"sources":["../../../src/components/InlineViewSwitcher/InlineViewSwitcherItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport { useInlineViewSwitcher } from './InlineViewSwitcher';\nimport styles from './InlineViewSwitcher.module.css';\n\nexport interface InlineViewSwitcherItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** String identifier — used as the switcher's `value` when this item is active. */\n name: string;\n /** Visible label. */\n label?: string;\n /** Icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n}\n\n/**\n * Individual view option inside an `InlineViewSwitcher`.\n *\n * Can be icon-only, label-only, or icon + label. For icon-only items always\n * provide an `aria-label` so screen readers can identify the view.\n */\nexport const InlineViewSwitcherItem = ({\n name,\n label,\n icon,\n disabled,\n className,\n ...props\n}: InlineViewSwitcherItemProps) => {\n const { value, onValueChange } = useInlineViewSwitcher();\n const active = value === name;\n const iconOnly = icon && !label;\n\n return (\n <button\n type=\"button\"\n role=\"radio\"\n aria-checked={active}\n tabIndex={active ? 0 : -1}\n disabled={disabled}\n onClick={() => onValueChange(name)}\n className={[\n styles.item,\n active ? styles.active : null,\n iconOnly ? styles.iconOnly : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {icon && (\n <span className={styles.itemIcon}>\n <Icon icon={icon} size=\"md\" aria-hidden />\n </span>\n )}\n {label && <span className={styles.itemLabel}>{label}</span>}\n </button>\n );\n};\n"],"mappings":";;;;;AAuBA,IAAa,KAA0B,EACrC,SACA,UACA,SACA,aACA,cACA,GAAG,QAC8B;CACjC,IAAM,EAAE,UAAO,qBAAkB,EAAsB,GACjD,IAAS,MAAU,GACnB,IAAW,KAAQ,CAAC;CAE1B,OACE,kBAAC,UAAD;EACE,MAAK;EACL,MAAK;EACL,gBAAc;EACd,UAAU,IAAS,IAAI;EACb;EACV,eAAe,EAAc,CAAI;EACjC,WAAW;GACT,EAAO;GACP,IAAS,EAAO,SAAS;GACzB,IAAW,EAAO,WAAW;GAC7B;EACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG;EACX,GAAI;YAfN,CAiBG,KACC,kBAAC,QAAD;GAAM,WAAW,EAAO;aACtB,kBAAC,GAAD;IAAY;IAAM,MAAK;IAAK,eAAA;GAAa,CAAA;EACrC,CAAA,GAEP,KAAS,kBAAC,QAAD;GAAM,WAAW,EAAO;aAAY;EAAY,CAAA,CACpD;;AAEZ"}
1
+ {"version":3,"file":"InlineViewSwitcherItem.js","names":[],"sources":["../../../src/components/InlineViewSwitcher/InlineViewSwitcherItem.tsx"],"sourcesContent":["import type { IconDefinition } from '@gnome-ui/icons';\nimport type { ButtonHTMLAttributes } from 'react';\n\nimport { Icon } from '../Icon';\n\nimport { useInlineViewSwitcher } from './InlineViewSwitcher';\nimport styles from './InlineViewSwitcher.module.css';\n\nexport interface InlineViewSwitcherItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** String identifier — used as the switcher's `value` when this item is active. */\n name: string;\n /** Visible label. */\n label?: string;\n /** Icon from `@gnome-ui/icons`. */\n icon?: IconDefinition;\n}\n\n/**\n * Individual view option inside an `InlineViewSwitcher`.\n *\n * Can be icon-only, label-only, or icon + label. For icon-only items always\n * provide an `aria-label` so screen readers can identify the view.\n */\nexport const InlineViewSwitcherItem = ({\n name,\n label,\n icon,\n disabled,\n className,\n ...props\n}: InlineViewSwitcherItemProps) => {\n const { value, onValueChange, compact } = useInlineViewSwitcher();\n const active = value === name;\n // In compact mode, hide the label when an icon is present as a fallback\n const showLabel = !!label && !(compact && icon);\n const isIconOnly = !!icon && !showLabel;\n\n return (\n <button\n type=\"button\"\n role=\"radio\"\n aria-checked={active}\n tabIndex={active ? 0 : -1}\n disabled={disabled}\n onClick={() => onValueChange(name)}\n className={[\n styles.item,\n active ? styles.active : null,\n isIconOnly ? styles.iconOnly : null,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n >\n {icon && (\n <span className={styles.itemIcon}>\n <Icon icon={icon} size=\"md\" aria-hidden />\n </span>\n )}\n {showLabel && <span className={styles.itemLabel}>{label}</span>}\n </button>\n );\n};\n\nInlineViewSwitcherItem.displayName = 'InlineViewSwitcherItem';\n"],"mappings":";;;;;AAuBA,IAAa,KAA0B,EACrC,SACA,UACA,SACA,aACA,cACA,GAAG,QAC8B;CACjC,IAAM,EAAE,UAAO,kBAAe,eAAY,EAAsB,GAC1D,IAAS,MAAU,GAEnB,IAAY,CAAC,CAAC,KAAS,EAAE,KAAW,IACpC,IAAa,CAAC,CAAC,KAAQ,CAAC;CAE9B,OACE,kBAAC,UAAD;EACE,MAAK;EACL,MAAK;EACL,gBAAc;EACd,UAAU,IAAS,IAAI;EACb;EACV,eAAe,EAAc,CAAI;EACjC,WAAW;GACT,EAAO;GACP,IAAS,EAAO,SAAS;GACzB,IAAa,EAAO,WAAW;GAC/B;EACF,EACG,OAAO,OAAO,EACd,KAAK,GAAG;EACX,GAAI;YAfN,CAiBG,KACC,kBAAC,QAAD;GAAM,WAAW,EAAO;aACtB,kBAAC,GAAD;IAAY;IAAM,MAAK;IAAK,eAAA;GAAa,CAAA;EACrC,CAAA,GAEP,KAAa,kBAAC,QAAD;GAAM,WAAW,EAAO;aAAY;EAAY,CAAA,CACxD;;AAEZ;AAEA,EAAuB,cAAc"}
@@ -1,4 +1,4 @@
1
- export type { InlineViewSwitcherProps, InlineViewSwitcherVariant, } from './InlineViewSwitcher';
1
+ export type { InlineViewSwitcherOverflow, InlineViewSwitcherProps, InlineViewSwitcherVariant, } from './InlineViewSwitcher';
2
2
  export { InlineViewSwitcher } from './InlineViewSwitcher';
3
3
  export type { InlineViewSwitcherItemProps } from './InlineViewSwitcherItem';
4
4
  export { InlineViewSwitcherItem } from './InlineViewSwitcherItem';
@@ -0,0 +1,2 @@
1
+ const e=require("../IconButton/IconButton.cjs"),t=require("./ScrollToTop.module.css.cjs"),n=require("./useScrollToTopVisibility.cjs");let r=require("react"),i=require("react/jsx-runtime"),a=require("@gnome-ui/icons");var o={"bottom-right":t.default.bottom_right,"bottom-left":t.default.bottom_left,"bottom-center":t.default.bottom_center,"top-right":t.default.top_right,"top-left":t.default.top_left,"top-center":t.default.top_center},s=(0,r.forwardRef)(function({visible:r=`auto`,position:s=`bottom-right`,threshold:c=300,scrollTarget:l,className:u,style:d},f){return n.useScrollToTopVisibility({visible:r,threshold:c,scrollTarget:l})?(0,i.jsx)(`div`,{ref:f,className:[t.default.root,o[s],u].filter(Boolean).join(` `),style:d,children:(0,i.jsx)(e.IconButton,{icon:a.GoUp,label:`Scroll to top`,variant:`osd`,onClick:()=>(l??window).scrollTo({top:0,behavior:`smooth`})})}):null});exports.ScrollToTop=s;
2
+ //# sourceMappingURL=ScrollToTop.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScrollToTop.cjs","names":[],"sources":["../../../src/components/ScrollToTop/ScrollToTop.tsx"],"sourcesContent":["import { GoUp } from '@gnome-ui/icons';\nimport { type CSSProperties, forwardRef } from 'react';\n\nimport { IconButton } from '../IconButton';\nimport styles from './ScrollToTop.module.css';\nimport { useScrollToTopVisibility } from './useScrollToTopVisibility';\n\n/**\n * Controls when the button is rendered.\n *\n * - `\"auto\"` — hidden until the user scrolls past `threshold` pixels (default).\n * - `\"always\"` — always rendered regardless of scroll position.\n */\nexport type ScrollToTopVisible = 'always' | 'auto';\n\n/**\n * Anchor corner or edge for the fixed-position container.\n * The button is inset `--gnome-space-4` (24 px) from each named edge.\n */\nexport type ScrollToTopPosition =\n | 'bottom-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'top-right'\n | 'top-left'\n | 'top-center';\n\nexport interface ScrollToTopProps {\n /**\n * Controls when the button is visible.\n *\n * - `\"auto\"` (default) — shown only after the user scrolls past `threshold` pixels.\n * Hides again when they scroll back above the threshold.\n * - `\"always\"` — permanently visible.\n */\n visible?: ScrollToTopVisible;\n /**\n * Corner or edge where the button is anchored inside the viewport.\n *\n * Default: `\"bottom-right\"`.\n */\n position?: ScrollToTopPosition;\n /**\n * Number of pixels the user must scroll before the button appears.\n * Only relevant when `visible=\"auto\"`.\n *\n * Default: `300`.\n */\n threshold?: number;\n /**\n * Scrollable element to observe and scroll back to the top.\n * Pass an `HTMLElement` when the scrollable area is a container other than\n * the page (e.g. a drawer, a split-view pane, or a custom scroll region).\n *\n * Defaults to `window`.\n */\n scrollTarget?: HTMLElement | Window;\n /** Additional CSS class applied to the root positioning container. */\n className?: string;\n /** Inline styles applied to the root positioning container. */\n style?: CSSProperties;\n}\n\nconst POSITION_CLASS: Record<ScrollToTopPosition, string> = {\n 'bottom-right': styles.bottom_right,\n 'bottom-left': styles.bottom_left,\n 'bottom-center': styles.bottom_center,\n 'top-right': styles.top_right,\n 'top-left': styles.top_left,\n 'top-center': styles.top_center,\n};\n\n/**\n * Fixed-position OSD button that scrolls the page (or a container) back to the top.\n *\n * - Renders a circular `IconButton` with the `GoUp` icon at the chosen `position`.\n * - When `visible=\"auto\"` (default), the button appears only after the user scrolls\n * past `threshold` pixels and hides again when they scroll back above it.\n * - The button is semi-transparent at rest (`opacity: 0.5`) and fully opaque on\n * hover or keyboard focus, so it does not obscure underlying content.\n * - Clicking triggers a smooth scroll to the top via `scrollTo({ top: 0, behavior: \"smooth\" })`.\n * - Forwards `ref` to the root `<div>` positioning container, not the inner `<button>`.\n *\n * @example\n * // Minimal — appears after 300 px of scroll, anchored bottom-right\n * <ScrollToTop />\n *\n * @example\n * // Always visible, anchored bottom-left\n * <ScrollToTop visible=\"always\" position=\"bottom-left\" />\n *\n * @example\n * // Observe a custom scrollable container\n * const ref = useRef<HTMLDivElement>(null);\n * <div ref={ref} style={{ overflowY: 'auto', height: 400 }}>...</div>\n * <ScrollToTop scrollTarget={ref.current ?? undefined} threshold={150} />\n */\nexport const ScrollToTop = forwardRef<HTMLDivElement, ScrollToTopProps>(function ScrollToTop(\n { visible = 'auto', position = 'bottom-right', threshold = 300, scrollTarget, className, style },\n ref,\n) {\n const isVisible = useScrollToTopVisibility({ visible, threshold, scrollTarget });\n\n if (!isVisible) {\n return null;\n }\n\n return (\n <div\n ref={ref}\n className={[styles.root, POSITION_CLASS[position], className].filter(Boolean).join(' ')}\n style={style}\n >\n <IconButton\n icon={GoUp}\n label=\"Scroll to top\"\n variant=\"osd\"\n onClick={() => (scrollTarget ?? window).scrollTo({ top: 0, behavior: 'smooth' })}\n />\n </div>\n );\n});\n"],"mappings":"yNA+DA,IAAM,EAAsD,CAC1D,eAAgB,EAAA,QAAO,aACvB,cAAe,EAAA,QAAO,YACtB,gBAAiB,EAAA,QAAO,cACxB,YAAa,EAAA,QAAO,UACpB,WAAY,EAAA,QAAO,SACnB,aAAc,EAAA,QAAO,UACvB,EA2Ba,GAAA,EAAA,EAAA,YAA2D,SACtE,CAAE,UAAU,OAAQ,WAAW,eAAgB,YAAY,IAAK,eAAc,YAAW,SACzF,EACA,CAOA,OANkB,EAAA,yBAAyB,CAAE,UAAS,YAAW,cAAa,CAEzE,GAKH,EAAA,EAAA,KAAC,MAAD,CACO,MACL,UAAW,CAAC,EAAA,QAAO,KAAM,EAAe,GAAW,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAC/E,kBAEP,EAAA,EAAA,KAAC,EAAA,WAAD,CACE,KAAM,EAAA,KACN,MAAM,gBACN,QAAQ,MACR,aAAgB,GAAgB,QAAQ,SAAS,CAAE,IAAK,EAAG,SAAU,QAAS,CAAC,CAChF,CAAA,CACE,CAAA,EAfE,IAiBX,CAAC"}
@@ -0,0 +1,74 @@
1
+ import { CSSProperties } from 'react';
2
+ /**
3
+ * Controls when the button is rendered.
4
+ *
5
+ * - `"auto"` — hidden until the user scrolls past `threshold` pixels (default).
6
+ * - `"always"` — always rendered regardless of scroll position.
7
+ */
8
+ export type ScrollToTopVisible = 'always' | 'auto';
9
+ /**
10
+ * Anchor corner or edge for the fixed-position container.
11
+ * The button is inset `--gnome-space-4` (24 px) from each named edge.
12
+ */
13
+ export type ScrollToTopPosition = 'bottom-right' | 'bottom-left' | 'bottom-center' | 'top-right' | 'top-left' | 'top-center';
14
+ export interface ScrollToTopProps {
15
+ /**
16
+ * Controls when the button is visible.
17
+ *
18
+ * - `"auto"` (default) — shown only after the user scrolls past `threshold` pixels.
19
+ * Hides again when they scroll back above the threshold.
20
+ * - `"always"` — permanently visible.
21
+ */
22
+ visible?: ScrollToTopVisible;
23
+ /**
24
+ * Corner or edge where the button is anchored inside the viewport.
25
+ *
26
+ * Default: `"bottom-right"`.
27
+ */
28
+ position?: ScrollToTopPosition;
29
+ /**
30
+ * Number of pixels the user must scroll before the button appears.
31
+ * Only relevant when `visible="auto"`.
32
+ *
33
+ * Default: `300`.
34
+ */
35
+ threshold?: number;
36
+ /**
37
+ * Scrollable element to observe and scroll back to the top.
38
+ * Pass an `HTMLElement` when the scrollable area is a container other than
39
+ * the page (e.g. a drawer, a split-view pane, or a custom scroll region).
40
+ *
41
+ * Defaults to `window`.
42
+ */
43
+ scrollTarget?: HTMLElement | Window;
44
+ /** Additional CSS class applied to the root positioning container. */
45
+ className?: string;
46
+ /** Inline styles applied to the root positioning container. */
47
+ style?: CSSProperties;
48
+ }
49
+ /**
50
+ * Fixed-position OSD button that scrolls the page (or a container) back to the top.
51
+ *
52
+ * - Renders a circular `IconButton` with the `GoUp` icon at the chosen `position`.
53
+ * - When `visible="auto"` (default), the button appears only after the user scrolls
54
+ * past `threshold` pixels and hides again when they scroll back above it.
55
+ * - The button is semi-transparent at rest (`opacity: 0.5`) and fully opaque on
56
+ * hover or keyboard focus, so it does not obscure underlying content.
57
+ * - Clicking triggers a smooth scroll to the top via `scrollTo({ top: 0, behavior: "smooth" })`.
58
+ * - Forwards `ref` to the root `<div>` positioning container, not the inner `<button>`.
59
+ *
60
+ * @example
61
+ * // Minimal — appears after 300 px of scroll, anchored bottom-right
62
+ * <ScrollToTop />
63
+ *
64
+ * @example
65
+ * // Always visible, anchored bottom-left
66
+ * <ScrollToTop visible="always" position="bottom-left" />
67
+ *
68
+ * @example
69
+ * // Observe a custom scrollable container
70
+ * const ref = useRef<HTMLDivElement>(null);
71
+ * <div ref={ref} style={{ overflowY: 'auto', height: 400 }}>...</div>
72
+ * <ScrollToTop scrollTarget={ref.current ?? undefined} threshold={150} />
73
+ */
74
+ export declare const ScrollToTop: import('react').ForwardRefExoticComponent<ScrollToTopProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,42 @@
1
+ import { IconButton as e } from "../IconButton/IconButton.js";
2
+ import t from "./ScrollToTop.module.css.js";
3
+ import { useScrollToTopVisibility as n } from "./useScrollToTopVisibility.js";
4
+ import { forwardRef as r } from "react";
5
+ import { jsx as i } from "react/jsx-runtime";
6
+ import { GoUp as a } from "@gnome-ui/icons";
7
+ //#region src/components/ScrollToTop/ScrollToTop.tsx
8
+ var o = {
9
+ "bottom-right": t.bottom_right,
10
+ "bottom-left": t.bottom_left,
11
+ "bottom-center": t.bottom_center,
12
+ "top-right": t.top_right,
13
+ "top-left": t.top_left,
14
+ "top-center": t.top_center
15
+ }, s = r(function({ visible: r = "auto", position: s = "bottom-right", threshold: c = 300, scrollTarget: l, className: u, style: d }, f) {
16
+ return n({
17
+ visible: r,
18
+ threshold: c,
19
+ scrollTarget: l
20
+ }) ? /* @__PURE__ */ i("div", {
21
+ ref: f,
22
+ className: [
23
+ t.root,
24
+ o[s],
25
+ u
26
+ ].filter(Boolean).join(" "),
27
+ style: d,
28
+ children: /* @__PURE__ */ i(e, {
29
+ icon: a,
30
+ label: "Scroll to top",
31
+ variant: "osd",
32
+ onClick: () => (l ?? window).scrollTo({
33
+ top: 0,
34
+ behavior: "smooth"
35
+ })
36
+ })
37
+ }) : null;
38
+ });
39
+ //#endregion
40
+ export { s as ScrollToTop };
41
+
42
+ //# sourceMappingURL=ScrollToTop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScrollToTop.js","names":[],"sources":["../../../src/components/ScrollToTop/ScrollToTop.tsx"],"sourcesContent":["import { GoUp } from '@gnome-ui/icons';\nimport { type CSSProperties, forwardRef } from 'react';\n\nimport { IconButton } from '../IconButton';\nimport styles from './ScrollToTop.module.css';\nimport { useScrollToTopVisibility } from './useScrollToTopVisibility';\n\n/**\n * Controls when the button is rendered.\n *\n * - `\"auto\"` — hidden until the user scrolls past `threshold` pixels (default).\n * - `\"always\"` — always rendered regardless of scroll position.\n */\nexport type ScrollToTopVisible = 'always' | 'auto';\n\n/**\n * Anchor corner or edge for the fixed-position container.\n * The button is inset `--gnome-space-4` (24 px) from each named edge.\n */\nexport type ScrollToTopPosition =\n | 'bottom-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'top-right'\n | 'top-left'\n | 'top-center';\n\nexport interface ScrollToTopProps {\n /**\n * Controls when the button is visible.\n *\n * - `\"auto\"` (default) — shown only after the user scrolls past `threshold` pixels.\n * Hides again when they scroll back above the threshold.\n * - `\"always\"` — permanently visible.\n */\n visible?: ScrollToTopVisible;\n /**\n * Corner or edge where the button is anchored inside the viewport.\n *\n * Default: `\"bottom-right\"`.\n */\n position?: ScrollToTopPosition;\n /**\n * Number of pixels the user must scroll before the button appears.\n * Only relevant when `visible=\"auto\"`.\n *\n * Default: `300`.\n */\n threshold?: number;\n /**\n * Scrollable element to observe and scroll back to the top.\n * Pass an `HTMLElement` when the scrollable area is a container other than\n * the page (e.g. a drawer, a split-view pane, or a custom scroll region).\n *\n * Defaults to `window`.\n */\n scrollTarget?: HTMLElement | Window;\n /** Additional CSS class applied to the root positioning container. */\n className?: string;\n /** Inline styles applied to the root positioning container. */\n style?: CSSProperties;\n}\n\nconst POSITION_CLASS: Record<ScrollToTopPosition, string> = {\n 'bottom-right': styles.bottom_right,\n 'bottom-left': styles.bottom_left,\n 'bottom-center': styles.bottom_center,\n 'top-right': styles.top_right,\n 'top-left': styles.top_left,\n 'top-center': styles.top_center,\n};\n\n/**\n * Fixed-position OSD button that scrolls the page (or a container) back to the top.\n *\n * - Renders a circular `IconButton` with the `GoUp` icon at the chosen `position`.\n * - When `visible=\"auto\"` (default), the button appears only after the user scrolls\n * past `threshold` pixels and hides again when they scroll back above it.\n * - The button is semi-transparent at rest (`opacity: 0.5`) and fully opaque on\n * hover or keyboard focus, so it does not obscure underlying content.\n * - Clicking triggers a smooth scroll to the top via `scrollTo({ top: 0, behavior: \"smooth\" })`.\n * - Forwards `ref` to the root `<div>` positioning container, not the inner `<button>`.\n *\n * @example\n * // Minimal — appears after 300 px of scroll, anchored bottom-right\n * <ScrollToTop />\n *\n * @example\n * // Always visible, anchored bottom-left\n * <ScrollToTop visible=\"always\" position=\"bottom-left\" />\n *\n * @example\n * // Observe a custom scrollable container\n * const ref = useRef<HTMLDivElement>(null);\n * <div ref={ref} style={{ overflowY: 'auto', height: 400 }}>...</div>\n * <ScrollToTop scrollTarget={ref.current ?? undefined} threshold={150} />\n */\nexport const ScrollToTop = forwardRef<HTMLDivElement, ScrollToTopProps>(function ScrollToTop(\n { visible = 'auto', position = 'bottom-right', threshold = 300, scrollTarget, className, style },\n ref,\n) {\n const isVisible = useScrollToTopVisibility({ visible, threshold, scrollTarget });\n\n if (!isVisible) {\n return null;\n }\n\n return (\n <div\n ref={ref}\n className={[styles.root, POSITION_CLASS[position], className].filter(Boolean).join(' ')}\n style={style}\n >\n <IconButton\n icon={GoUp}\n label=\"Scroll to top\"\n variant=\"osd\"\n onClick={() => (scrollTarget ?? window).scrollTo({ top: 0, behavior: 'smooth' })}\n />\n </div>\n );\n});\n"],"mappings":";;;;;;;AA+DA,IAAM,IAAsD;CAC1D,gBAAgB,EAAO;CACvB,eAAe,EAAO;CACtB,iBAAiB,EAAO;CACxB,aAAa,EAAO;CACpB,YAAY,EAAO;CACnB,cAAc,EAAO;AACvB,GA2Ba,IAAc,EAA6C,SACtE,EAAE,aAAU,QAAQ,cAAW,gBAAgB,eAAY,KAAK,iBAAc,cAAW,YACzF,GACA;CAOA,OANkB,EAAyB;EAAE;EAAS;EAAW;CAAa,CAEzE,IAKH,kBAAC,OAAD;EACO;EACL,WAAW;GAAC,EAAO;GAAM,EAAe;GAAW;EAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;EAC/E;YAEP,kBAAC,GAAD;GACE,MAAM;GACN,OAAM;GACN,SAAQ;GACR,gBAAgB,KAAgB,QAAQ,SAAS;IAAE,KAAK;IAAG,UAAU;GAAS,CAAC;EAChF,CAAA;CACE,CAAA,IAfE;AAiBX,CAAC"}
@@ -0,0 +1,2 @@
1
+ var e={root:`_root_1qshr_1`,bottom_right:`_bottom_right_1qshr_8`,bottom_left:`_bottom_left_1qshr_13`,bottom_center:`_bottom_center_1qshr_18`,top_right:`_top_right_1qshr_24`,top_left:`_top_left_1qshr_29`,top_center:`_top_center_1qshr_34`};exports.default=e;
2
+ //# sourceMappingURL=ScrollToTop.module.css.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScrollToTop.module.css.cjs","names":[],"sources":["../../../src/components/ScrollToTop/ScrollToTop.module.css"],"sourcesContent":[".root {\n position: fixed;\n z-index: 9999;\n pointer-events: none;\n}\n\n/* Position variants — 24px edge spacing via --gnome-space-4 */\n.bottom_right {\n bottom: var(--gnome-space-4, 24px);\n right: var(--gnome-space-4, 24px);\n}\n\n.bottom_left {\n bottom: var(--gnome-space-4, 24px);\n left: var(--gnome-space-4, 24px);\n}\n\n.bottom_center {\n bottom: var(--gnome-space-4, 24px);\n left: 50%;\n transform: translateX(-50%);\n}\n\n.top_right {\n top: var(--gnome-space-4, 24px);\n right: var(--gnome-space-4, 24px);\n}\n\n.top_left {\n top: var(--gnome-space-4, 24px);\n left: var(--gnome-space-4, 24px);\n}\n\n.top_center {\n top: var(--gnome-space-4, 24px);\n left: 50%;\n transform: translateX(-50%);\n}\n\n/* Re-enable pointer events and apply hover opacity on the button */\n.root > button {\n pointer-events: auto;\n opacity: 0.5;\n transition: opacity var(--gnome-duration-fast, 100ms) var(--gnome-easing-default, ease);\n}\n\n.root > button:hover,\n.root > button:focus-visible {\n opacity: 1;\n}\n"],"mappings":""}
@@ -0,0 +1,13 @@
1
+ var e = {
2
+ root: "_root_1qshr_1",
3
+ bottom_right: "_bottom_right_1qshr_8",
4
+ bottom_left: "_bottom_left_1qshr_13",
5
+ bottom_center: "_bottom_center_1qshr_18",
6
+ top_right: "_top_right_1qshr_24",
7
+ top_left: "_top_left_1qshr_29",
8
+ top_center: "_top_center_1qshr_34"
9
+ };
10
+ //#endregion
11
+ export { e as default };
12
+
13
+ //# sourceMappingURL=ScrollToTop.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScrollToTop.module.css.js","names":[],"sources":["../../../src/components/ScrollToTop/ScrollToTop.module.css"],"sourcesContent":[".root {\n position: fixed;\n z-index: 9999;\n pointer-events: none;\n}\n\n/* Position variants — 24px edge spacing via --gnome-space-4 */\n.bottom_right {\n bottom: var(--gnome-space-4, 24px);\n right: var(--gnome-space-4, 24px);\n}\n\n.bottom_left {\n bottom: var(--gnome-space-4, 24px);\n left: var(--gnome-space-4, 24px);\n}\n\n.bottom_center {\n bottom: var(--gnome-space-4, 24px);\n left: 50%;\n transform: translateX(-50%);\n}\n\n.top_right {\n top: var(--gnome-space-4, 24px);\n right: var(--gnome-space-4, 24px);\n}\n\n.top_left {\n top: var(--gnome-space-4, 24px);\n left: var(--gnome-space-4, 24px);\n}\n\n.top_center {\n top: var(--gnome-space-4, 24px);\n left: 50%;\n transform: translateX(-50%);\n}\n\n/* Re-enable pointer events and apply hover opacity on the button */\n.root > button {\n pointer-events: auto;\n opacity: 0.5;\n transition: opacity var(--gnome-duration-fast, 100ms) var(--gnome-easing-default, ease);\n}\n\n.root > button:hover,\n.root > button:focus-visible {\n opacity: 1;\n}\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export type { ScrollToTopPosition, ScrollToTopProps, ScrollToTopVisible } from './ScrollToTop';
2
+ export { ScrollToTop } from './ScrollToTop';
@@ -0,0 +1,2 @@
1
+ let e=require("react");function t({visible:t,threshold:n,scrollTarget:r}){let[i,a]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{if(t===`always`)return;let e=r??window,i=()=>e===window?window.scrollY:e.scrollTop,o=()=>a(i()>n);return o(),e.addEventListener(`scroll`,o,{passive:!0}),()=>e.removeEventListener(`scroll`,o)},[t,n,r]),t===`always`||i}exports.useScrollToTopVisibility=t;
2
+ //# sourceMappingURL=useScrollToTopVisibility.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScrollToTopVisibility.cjs","names":[],"sources":["../../../src/components/ScrollToTop/useScrollToTopVisibility.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport type { ScrollToTopVisible } from './ScrollToTop';\n\ninterface UseScrollToTopVisibilityOptions {\n /** See {@link ScrollToTopVisible}. */\n visible: ScrollToTopVisible;\n /** Pixels scrolled before returning `true` in `\"auto\"` mode. */\n threshold: number;\n /** Element to observe. Defaults to `window` when `undefined`. */\n scrollTarget?: HTMLElement | Window;\n}\n\n/**\n * Returns `true` when the `ScrollToTop` button should be rendered.\n *\n * - `visible === \"always\"` → always `true`; no scroll listener is attached.\n * - `visible === \"auto\"` → attaches a passive `scroll` listener on `scrollTarget`\n * (or `window`) and returns `true` once the scroll offset exceeds `threshold`.\n * Reverts to `false` when the user scrolls back below the threshold.\n *\n * This is an internal hook — not exported from the package.\n */\nexport function useScrollToTopVisibility({\n visible,\n threshold,\n scrollTarget,\n}: UseScrollToTopVisibilityOptions): boolean {\n const [isScrolledPast, setIsScrolledPast] = useState(false);\n\n useEffect(() => {\n if (visible === 'always') {\n return;\n }\n\n const target = scrollTarget ?? window;\n\n const getScrollY = () =>\n target === window ? window.scrollY : (target as HTMLElement).scrollTop;\n\n const check = () => setIsScrolledPast(getScrollY() > threshold);\n\n check();\n target.addEventListener('scroll', check, { passive: true });\n return () => target.removeEventListener('scroll', check);\n }, [visible, threshold, scrollTarget]);\n\n return visible === 'always' || isScrolledPast;\n}\n"],"mappings":"uBAuBA,SAAgB,EAAyB,CACvC,UACA,YACA,gBAC2C,CAC3C,GAAM,CAAC,EAAgB,IAAA,EAAA,EAAA,UAA8B,EAAK,EAmB1D,OAjBA,EAAA,EAAA,eAAgB,CACd,GAAI,IAAY,SACd,OAGF,IAAM,EAAS,GAAgB,OAEzB,MACJ,IAAW,OAAS,OAAO,QAAW,EAAuB,UAEzD,MAAc,EAAkB,EAAW,EAAI,CAAS,EAI9D,OAFA,EAAM,EACN,EAAO,iBAAiB,SAAU,EAAO,CAAE,QAAS,EAAK,CAAC,MAC7C,EAAO,oBAAoB,SAAU,CAAK,CACzD,EAAG,CAAC,EAAS,EAAW,CAAY,CAAC,EAE9B,IAAY,UAAY,CACjC"}
@@ -0,0 +1,21 @@
1
+ import { ScrollToTopVisible } from './ScrollToTop';
2
+ interface UseScrollToTopVisibilityOptions {
3
+ /** See {@link ScrollToTopVisible}. */
4
+ visible: ScrollToTopVisible;
5
+ /** Pixels scrolled before returning `true` in `"auto"` mode. */
6
+ threshold: number;
7
+ /** Element to observe. Defaults to `window` when `undefined`. */
8
+ scrollTarget?: HTMLElement | Window;
9
+ }
10
+ /**
11
+ * Returns `true` when the `ScrollToTop` button should be rendered.
12
+ *
13
+ * - `visible === "always"` → always `true`; no scroll listener is attached.
14
+ * - `visible === "auto"` → attaches a passive `scroll` listener on `scrollTarget`
15
+ * (or `window`) and returns `true` once the scroll offset exceeds `threshold`.
16
+ * Reverts to `false` when the user scrolls back below the threshold.
17
+ *
18
+ * This is an internal hook — not exported from the package.
19
+ */
20
+ export declare function useScrollToTopVisibility({ visible, threshold, scrollTarget, }: UseScrollToTopVisibilityOptions): boolean;
21
+ export {};
@@ -0,0 +1,18 @@
1
+ import { useEffect as e, useState as t } from "react";
2
+ //#region src/components/ScrollToTop/useScrollToTopVisibility.ts
3
+ function n({ visible: n, threshold: r, scrollTarget: i }) {
4
+ let [a, o] = t(!1);
5
+ return e(() => {
6
+ if (n === "always") return;
7
+ let e = i ?? window, t = () => e === window ? window.scrollY : e.scrollTop, a = () => o(t() > r);
8
+ return a(), e.addEventListener("scroll", a, { passive: !0 }), () => e.removeEventListener("scroll", a);
9
+ }, [
10
+ n,
11
+ r,
12
+ i
13
+ ]), n === "always" || a;
14
+ }
15
+ //#endregion
16
+ export { n as useScrollToTopVisibility };
17
+
18
+ //# sourceMappingURL=useScrollToTopVisibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScrollToTopVisibility.js","names":[],"sources":["../../../src/components/ScrollToTop/useScrollToTopVisibility.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport type { ScrollToTopVisible } from './ScrollToTop';\n\ninterface UseScrollToTopVisibilityOptions {\n /** See {@link ScrollToTopVisible}. */\n visible: ScrollToTopVisible;\n /** Pixels scrolled before returning `true` in `\"auto\"` mode. */\n threshold: number;\n /** Element to observe. Defaults to `window` when `undefined`. */\n scrollTarget?: HTMLElement | Window;\n}\n\n/**\n * Returns `true` when the `ScrollToTop` button should be rendered.\n *\n * - `visible === \"always\"` → always `true`; no scroll listener is attached.\n * - `visible === \"auto\"` → attaches a passive `scroll` listener on `scrollTarget`\n * (or `window`) and returns `true` once the scroll offset exceeds `threshold`.\n * Reverts to `false` when the user scrolls back below the threshold.\n *\n * This is an internal hook — not exported from the package.\n */\nexport function useScrollToTopVisibility({\n visible,\n threshold,\n scrollTarget,\n}: UseScrollToTopVisibilityOptions): boolean {\n const [isScrolledPast, setIsScrolledPast] = useState(false);\n\n useEffect(() => {\n if (visible === 'always') {\n return;\n }\n\n const target = scrollTarget ?? window;\n\n const getScrollY = () =>\n target === window ? window.scrollY : (target as HTMLElement).scrollTop;\n\n const check = () => setIsScrolledPast(getScrollY() > threshold);\n\n check();\n target.addEventListener('scroll', check, { passive: true });\n return () => target.removeEventListener('scroll', check);\n }, [visible, threshold, scrollTarget]);\n\n return visible === 'always' || isScrolledPast;\n}\n"],"mappings":";;AAuBA,SAAgB,EAAyB,EACvC,YACA,cACA,mBAC2C;CAC3C,IAAM,CAAC,GAAgB,KAAqB,EAAS,EAAK;CAmB1D,OAjBA,QAAgB;EACd,IAAI,MAAY,UACd;EAGF,IAAM,IAAS,KAAgB,QAEzB,UACJ,MAAW,SAAS,OAAO,UAAW,EAAuB,WAEzD,UAAc,EAAkB,EAAW,IAAI,CAAS;EAI9D,OAFA,EAAM,GACN,EAAO,iBAAiB,UAAU,GAAO,EAAE,SAAS,GAAK,CAAC,SAC7C,EAAO,oBAAoB,UAAU,CAAK;CACzD,GAAG;EAAC;EAAS;EAAW;CAAY,CAAC,GAE9B,MAAY,YAAY;AACjC"}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./ScrollToTop/ScrollToTop.cjs");exports.ScrollToTop=e.ScrollToTop;
@@ -0,0 +1,2 @@
1
+ export * from './ScrollToTop/index'
2
+ export {}
@@ -0,0 +1,2 @@
1
+ import { ScrollToTop as e } from "./ScrollToTop/ScrollToTop.js";
2
+ export { e as ScrollToTop };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const ee=require("./components/AboutDialog/AboutDialog.cjs"),e=require("./components/ActionRow/ActionRow.cjs"),t=require("./components/Avatar/Avatar.cjs"),n=require("./components/AvatarRotator/AvatarRotator.cjs"),r=require("./components/Badge/Badge.cjs"),i=require("./components/Banner/Banner.cjs"),a=require("./components/Bin/Bin.cjs"),te=require("./components/Blockquote/Blockquote.cjs"),o=require("./components/BottomSheet/BottomSheet.cjs"),s=require("./components/Box/Box.cjs"),c=require("./components/Separator/Separator.cjs"),l=require("./components/BoxedList/BoxedList.cjs"),u=require("./components/BreakpointBin/BreakpointBin.cjs"),d=require("./components/Button/Button.cjs"),f=require("./components/ButtonContent/ButtonContent.cjs"),p=require("./components/ButtonRow/ButtonRow.cjs"),m=require("./components/Card/Card.cjs"),h=require("./components/Carousel/Carousel.cjs"),g=require("./components/CheckRow/CheckRow.cjs"),_=require("./components/Checkbox/Checkbox.cjs"),v=require("./components/Icon/Icon.cjs"),y=require("./components/Chip/Chip.cjs"),b=require("./components/Clamp/Clamp.cjs"),x=require("./components/ColorPicker/ColorPicker.cjs"),S=require("./components/ColumnView/ColumnView.cjs"),C=require("./components/ComboRow/ComboRow.cjs"),w=require("./components/GnomeProvider/GnomeContext.cjs"),T=require("./components/ContributionGraph/ContributionGraph.cjs"),E=require("./components/CountDownTimer/CountDownTimer.cjs"),D=require("./components/Dialog/Dialog.cjs"),O=require("./components/Drawer/Drawer.cjs"),k=require("./components/Dropdown/Dropdown.cjs"),A=require("./components/EntryRow/EntryRow.cjs"),j=require("./components/ExpanderRow/ExpanderRow.cjs"),M=require("./components/Footer/Footer.cjs"),N=require("./components/Frame/Frame.cjs"),P=require("./components/GnomeProvider/GnomeProvider.cjs"),F=require("./components/HeaderBar/HeaderBar.cjs"),I=require("./components/Tooltip/Tooltip.cjs"),L=require("./components/IconButton/IconButton.cjs"),R=require("./components/InlineViewSwitcher/InlineViewSwitcher.cjs"),z=require("./components/InlineViewSwitcher/InlineViewSwitcherItem.cjs"),B=require("./components/Link/Link.cjs"),V=require("./components/LinkedGroup/LinkedGroup.cjs"),H=require("./hooks/useBreakpoint.cjs"),U=require("./components/NavigationSplitView/NavigationSplitView.cjs"),W=require("./components/NavigationView/NavigationView.cjs"),G=require("./components/OverlaySplitView/OverlaySplitView.cjs"),K=require("./components/PasswordEntryRow/PasswordEntryRow.cjs"),q=require("./components/PathBar/PathBar.cjs"),J=require("./components/Popover/Popover.cjs"),Y=require("./components/PreferencesDialog/PreferencesDialog.cjs"),X=require("./components/PreferencesGroup/PreferencesGroup.cjs"),Z=require("./components/PreferencesPage/PreferencesPage.cjs"),Q=require("./components/ProgressBar/ProgressBar.cjs"),ne=require("./components/RadioButton/RadioButton.cjs"),re=require("./components/Spinner/Spinner.cjs"),ie=require("./components/SearchBar/SearchBar.cjs"),ae=require("./components/SegmentedBar/SegmentedBar.cjs"),oe=require("./components/ShortcutLabel/ShortcutLabel.cjs"),se=require("./components/ShortcutsDialog/ShortcutsDialog.cjs"),ce=require("./components/StatusPage/StatusPage.cjs"),$=require("./components/Sidebar/Sidebar.cjs"),le=require("./components/Sidebar/SidebarItem.cjs"),ue=require("./components/Sidebar/SidebarSection.cjs"),de=require("./components/Skeleton/Skeleton.cjs"),fe=require("./components/Slider/Slider.cjs"),pe=require("./components/SpinButton/SpinButton.cjs"),me=require("./components/SpinRow/SpinRow.cjs"),he=require("./components/SplitButton/SplitButton.cjs"),ge=require("./components/StatusBadge/StatusBadge.cjs"),_e=require("./components/Switch/Switch.cjs"),ve=require("./components/SwitchRow/SwitchRow.cjs"),ye=require("./components/Tabs/TabBar.cjs"),be=require("./components/Tabs/TabItem.cjs"),xe=require("./components/Tabs/TabPanel.cjs"),Se=require("./components/TerminalView/TerminalView.cjs"),Ce=require("./components/Text/Text.cjs"),we=require("./components/TextField/TextField.cjs"),Te=require("./components/Timeline/Timeline.cjs"),Ee=require("./components/Toast/Toast.cjs"),De=require("./components/Toast/Toaster.cjs"),Oe=require("./components/ToggleGroup/ToggleGroup.cjs"),ke=require("./components/ToggleGroup/ToggleGroupItem.cjs"),Ae=require("./components/Toolbar/Spacer.cjs"),je=require("./components/Toolbar/Toolbar.cjs"),Me=require("./components/ToolbarView/ToolbarView.cjs"),Ne=require("./components/ViewSwitcher/ViewSwitcher.cjs"),Pe=require("./components/ViewSwitcher/ViewSwitcherItem.cjs"),Fe=require("./components/ViewSwitcherBar/ViewSwitcherBar.cjs"),Ie=require("./components/ViewSwitcherSidebar/ViewSwitcherSidebar.cjs"),Le=require("./components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.cjs"),Re=require("./components/WindowTitle/WindowTitle.cjs"),ze=require("./components/WrapBox/WrapBox.cjs");exports.AboutDialog=ee.AboutDialog,exports.ActionRow=e.ActionRow,exports.Avatar=t.Avatar,exports.AvatarRotator=n.AvatarRotator,exports.Badge=r.Badge,exports.Banner=i.Banner,exports.Bin=a.Bin,exports.Blockquote=te.Blockquote,exports.BottomSheet=o.BottomSheet,exports.Box=s.Box,exports.BoxedList=l.BoxedList,exports.BreakpointBin=u.BreakpointBin,exports.Button=d.Button,exports.ButtonContent=f.ButtonContent,exports.ButtonRow=p.ButtonRow,exports.Card=m.Card,exports.Carousel=h.Carousel,exports.CarouselIndicatorDots=h.CarouselIndicatorDots,exports.CarouselIndicatorLines=h.CarouselIndicatorLines,exports.CheckRow=g.CheckRow,exports.Checkbox=_.Checkbox,exports.Chip=y.Chip,exports.Clamp=b.Clamp,exports.ColorPicker=x.ColorPicker,exports.ColorSwatch=x.ColorSwatch,exports.ColumnView=S.ColumnView,exports.ComboRow=C.ComboRow,exports.ContributionGraph=T.ContributionGraph,exports.CountDownTimer=E.CountDownTimer,exports.Dialog=D.Dialog,exports.Drawer=O.Drawer,exports.Dropdown=k.Dropdown,exports.EntryRow=A.EntryRow,exports.ExpanderRow=j.ExpanderRow,exports.Footer=M.Footer,exports.Frame=N.Frame,exports.GNOME_BREAKPOINTS=H.GNOME_BREAKPOINTS,exports.GNOME_PALETTE=x.GNOME_PALETTE,exports.GnomeProvider=P.GnomeProvider,exports.HeaderBar=F.HeaderBar,exports.Icon=v.Icon,exports.IconButton=L.IconButton,exports.InlineViewSwitcher=R.InlineViewSwitcher,exports.InlineViewSwitcherItem=z.InlineViewSwitcherItem,exports.Link=B.Link,exports.LinkedGroup=V.LinkedGroup,exports.NavigationPage=W.NavigationPage,exports.NavigationSplitView=U.NavigationSplitView,exports.NavigationView=W.NavigationView,exports.OverlaySplitView=G.OverlaySplitView,exports.PasswordEntryRow=K.PasswordEntryRow,exports.PathBar=q.PathBar,exports.Popover=J.Popover,exports.PreferencesDialog=Y.PreferencesDialog,exports.PreferencesGroup=X.PreferencesGroup,exports.PreferencesPage=Z.PreferencesPage,exports.ProgressBar=Q.ProgressBar,exports.RadioButton=ne.RadioButton,exports.SearchBar=ie.SearchBar,exports.SegmentedBar=ae.SegmentedBar,exports.Separator=c.Separator,exports.ShortcutLabel=oe.ShortcutLabel,exports.ShortcutsDialog=se.ShortcutsDialog,exports.Sidebar=$.Sidebar,exports.SidebarCollapsedContext=$.SidebarCollapsedContext,exports.SidebarItem=le.SidebarItem,exports.SidebarSection=ue.SidebarSection,exports.Skeleton=de.Skeleton,exports.Slider=fe.Slider,exports.Spacer=Ae.Spacer,exports.SpinButton=pe.SpinButton,exports.SpinRow=me.SpinRow,exports.Spinner=re.Spinner,exports.SplitButton=he.SplitButton,exports.StatusBadge=ge.StatusBadge,exports.StatusPage=ce.StatusPage,exports.Switch=_e.Switch,exports.SwitchRow=ve.SwitchRow,exports.TabBar=ye.TabBar,exports.TabItem=be.TabItem,exports.TabPanel=xe.TabPanel,exports.TerminalView=Se.TerminalView,exports.Text=Ce.Text,exports.TextField=we.TextField,exports.Timeline=Te.Timeline,exports.Toast=Ee.Toast,exports.Toaster=De.Toaster,exports.ToggleGroup=Oe.ToggleGroup,exports.ToggleGroupItem=ke.ToggleGroupItem,exports.Toolbar=je.Toolbar,exports.ToolbarView=Me.ToolbarView,exports.Tooltip=I.Tooltip,exports.ViewSwitcher=Ne.ViewSwitcher,exports.ViewSwitcherBar=Fe.ViewSwitcherBar,exports.ViewSwitcherItem=Pe.ViewSwitcherItem,exports.ViewSwitcherSidebar=Ie.ViewSwitcherSidebar,exports.ViewSwitcherSidebarItem=Le.ViewSwitcherSidebarItem,exports.WindowTitle=Re.WindowTitle,exports.WrapBox=ze.WrapBox,exports.useAccentColor=w.useAccentColor,exports.useBreakpoint=H.useBreakpoint,exports.useColorScheme=w.useColorScheme,exports.useDateTimeFormatter=w.useDateTimeFormatter,exports.useDir=w.useDir,exports.useLocale=w.useLocale,exports.useNavigation=W.useNavigation,exports.useNumberFormatter=w.useNumberFormatter,exports.useResolvedColorScheme=w.useResolvedColorScheme,exports.useSidebarCollapsed=$.useSidebarCollapsed;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./components/AboutDialog/AboutDialog.cjs"),ee=require("./components/ActionRow/ActionRow.cjs"),t=require("./components/Avatar/Avatar.cjs"),n=require("./components/AvatarRotator/AvatarRotator.cjs"),r=require("./components/Badge/Badge.cjs"),i=require("./components/Banner/Banner.cjs"),a=require("./components/Bin/Bin.cjs"),te=require("./components/Blockquote/Blockquote.cjs"),o=require("./components/BottomSheet/BottomSheet.cjs"),s=require("./components/Box/Box.cjs"),c=require("./components/Separator/Separator.cjs"),l=require("./components/BoxedList/BoxedList.cjs"),u=require("./components/BreakpointBin/BreakpointBin.cjs"),d=require("./components/Button/Button.cjs"),f=require("./components/ButtonContent/ButtonContent.cjs"),p=require("./components/ButtonRow/ButtonRow.cjs"),m=require("./components/Card/Card.cjs"),h=require("./components/Carousel/Carousel.cjs"),g=require("./components/CheckRow/CheckRow.cjs"),_=require("./components/Checkbox/Checkbox.cjs"),v=require("./components/Icon/Icon.cjs"),y=require("./components/Chip/Chip.cjs"),b=require("./components/Clamp/Clamp.cjs"),x=require("./components/ColorPicker/ColorPicker.cjs"),S=require("./components/ColumnView/ColumnView.cjs"),C=require("./components/ComboRow/ComboRow.cjs"),w=require("./components/GnomeProvider/GnomeContext.cjs"),T=require("./components/ContributionGraph/ContributionGraph.cjs"),E=require("./components/CountDownTimer/CountDownTimer.cjs"),D=require("./components/Dialog/Dialog.cjs"),O=require("./components/Drawer/Drawer.cjs"),k=require("./components/Dropdown/Dropdown.cjs"),A=require("./components/EntryRow/EntryRow.cjs"),j=require("./components/ExpanderRow/ExpanderRow.cjs"),M=require("./components/Footer/Footer.cjs"),N=require("./components/Frame/Frame.cjs"),P=require("./components/GnomeProvider/GnomeProvider.cjs"),F=require("./components/HeaderBar/HeaderBar.cjs"),I=require("./components/Tooltip/Tooltip.cjs"),L=require("./components/IconButton/IconButton.cjs"),R=require("./components/InlineViewSwitcher/InlineViewSwitcher.cjs"),z=require("./components/InlineViewSwitcher/InlineViewSwitcherItem.cjs"),B=require("./components/Link/Link.cjs"),V=require("./components/LinkedGroup/LinkedGroup.cjs"),H=require("./hooks/useBreakpoint.cjs"),U=require("./components/NavigationSplitView/NavigationSplitView.cjs"),W=require("./components/NavigationView/NavigationView.cjs"),G=require("./components/OverlaySplitView/OverlaySplitView.cjs"),K=require("./components/PasswordEntryRow/PasswordEntryRow.cjs"),q=require("./components/PathBar/PathBar.cjs"),J=require("./components/Popover/Popover.cjs"),Y=require("./components/PreferencesDialog/PreferencesDialog.cjs"),X=require("./components/PreferencesGroup/PreferencesGroup.cjs"),Z=require("./components/PreferencesPage/PreferencesPage.cjs"),Q=require("./components/ProgressBar/ProgressBar.cjs"),ne=require("./components/RadioButton/RadioButton.cjs"),re=require("./components/ScrollToTop/ScrollToTop.cjs"),ie=require("./components/Spinner/Spinner.cjs"),ae=require("./components/SearchBar/SearchBar.cjs"),oe=require("./components/SegmentedBar/SegmentedBar.cjs"),se=require("./components/ShortcutLabel/ShortcutLabel.cjs"),ce=require("./components/ShortcutsDialog/ShortcutsDialog.cjs"),le=require("./components/StatusPage/StatusPage.cjs"),$=require("./components/Sidebar/Sidebar.cjs"),ue=require("./components/Sidebar/SidebarItem.cjs"),de=require("./components/Sidebar/SidebarSection.cjs"),fe=require("./components/Skeleton/Skeleton.cjs"),pe=require("./components/Slider/Slider.cjs"),me=require("./components/SpinButton/SpinButton.cjs"),he=require("./components/SpinRow/SpinRow.cjs"),ge=require("./components/SplitButton/SplitButton.cjs"),_e=require("./components/StatusBadge/StatusBadge.cjs"),ve=require("./components/Switch/Switch.cjs"),ye=require("./components/SwitchRow/SwitchRow.cjs"),be=require("./components/Tabs/TabBar.cjs"),xe=require("./components/Tabs/TabItem.cjs"),Se=require("./components/Tabs/TabPanel.cjs"),Ce=require("./components/TerminalView/TerminalView.cjs"),we=require("./components/Text/Text.cjs"),Te=require("./components/TextField/TextField.cjs"),Ee=require("./components/Timeline/Timeline.cjs"),De=require("./components/Toast/Toast.cjs"),Oe=require("./components/Toast/Toaster.cjs"),ke=require("./components/ToggleGroup/ToggleGroup.cjs"),Ae=require("./components/ToggleGroup/ToggleGroupItem.cjs"),je=require("./components/Toolbar/Spacer.cjs"),Me=require("./components/Toolbar/Toolbar.cjs"),Ne=require("./components/ToolbarView/ToolbarView.cjs"),Pe=require("./components/ViewSwitcher/ViewSwitcher.cjs"),Fe=require("./components/ViewSwitcher/ViewSwitcherItem.cjs"),Ie=require("./components/ViewSwitcherBar/ViewSwitcherBar.cjs"),Le=require("./components/ViewSwitcherSidebar/ViewSwitcherSidebar.cjs"),Re=require("./components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.cjs"),ze=require("./components/WindowTitle/WindowTitle.cjs"),Be=require("./components/WrapBox/WrapBox.cjs");exports.AboutDialog=e.AboutDialog,exports.ActionRow=ee.ActionRow,exports.Avatar=t.Avatar,exports.AvatarRotator=n.AvatarRotator,exports.Badge=r.Badge,exports.Banner=i.Banner,exports.Bin=a.Bin,exports.Blockquote=te.Blockquote,exports.BottomSheet=o.BottomSheet,exports.Box=s.Box,exports.BoxedList=l.BoxedList,exports.BreakpointBin=u.BreakpointBin,exports.Button=d.Button,exports.ButtonContent=f.ButtonContent,exports.ButtonRow=p.ButtonRow,exports.Card=m.Card,exports.Carousel=h.Carousel,exports.CarouselIndicatorDots=h.CarouselIndicatorDots,exports.CarouselIndicatorLines=h.CarouselIndicatorLines,exports.CheckRow=g.CheckRow,exports.Checkbox=_.Checkbox,exports.Chip=y.Chip,exports.Clamp=b.Clamp,exports.ColorPicker=x.ColorPicker,exports.ColorSwatch=x.ColorSwatch,exports.ColumnView=S.ColumnView,exports.ComboRow=C.ComboRow,exports.ContributionGraph=T.ContributionGraph,exports.CountDownTimer=E.CountDownTimer,exports.Dialog=D.Dialog,exports.Drawer=O.Drawer,exports.Dropdown=k.Dropdown,exports.EntryRow=A.EntryRow,exports.ExpanderRow=j.ExpanderRow,exports.Footer=M.Footer,exports.Frame=N.Frame,exports.GNOME_BREAKPOINTS=H.GNOME_BREAKPOINTS,exports.GNOME_PALETTE=x.GNOME_PALETTE,exports.GnomeProvider=P.GnomeProvider,exports.HeaderBar=F.HeaderBar,exports.Icon=v.Icon,exports.IconButton=L.IconButton,exports.InlineViewSwitcher=R.InlineViewSwitcher,exports.InlineViewSwitcherItem=z.InlineViewSwitcherItem,exports.Link=B.Link,exports.LinkedGroup=V.LinkedGroup,exports.NavigationPage=W.NavigationPage,exports.NavigationSplitView=U.NavigationSplitView,exports.NavigationView=W.NavigationView,exports.OverlaySplitView=G.OverlaySplitView,exports.PasswordEntryRow=K.PasswordEntryRow,exports.PathBar=q.PathBar,exports.Popover=J.Popover,exports.PreferencesDialog=Y.PreferencesDialog,exports.PreferencesGroup=X.PreferencesGroup,exports.PreferencesPage=Z.PreferencesPage,exports.ProgressBar=Q.ProgressBar,exports.RadioButton=ne.RadioButton,exports.ScrollToTop=re.ScrollToTop,exports.SearchBar=ae.SearchBar,exports.SegmentedBar=oe.SegmentedBar,exports.Separator=c.Separator,exports.ShortcutLabel=se.ShortcutLabel,exports.ShortcutsDialog=ce.ShortcutsDialog,exports.Sidebar=$.Sidebar,exports.SidebarCollapsedContext=$.SidebarCollapsedContext,exports.SidebarItem=ue.SidebarItem,exports.SidebarSection=de.SidebarSection,exports.Skeleton=fe.Skeleton,exports.Slider=pe.Slider,exports.Spacer=je.Spacer,exports.SpinButton=me.SpinButton,exports.SpinRow=he.SpinRow,exports.Spinner=ie.Spinner,exports.SplitButton=ge.SplitButton,exports.StatusBadge=_e.StatusBadge,exports.StatusPage=le.StatusPage,exports.Switch=ve.Switch,exports.SwitchRow=ye.SwitchRow,exports.TabBar=be.TabBar,exports.TabItem=xe.TabItem,exports.TabPanel=Se.TabPanel,exports.TerminalView=Ce.TerminalView,exports.Text=we.Text,exports.TextField=Te.TextField,exports.Timeline=Ee.Timeline,exports.Toast=De.Toast,exports.Toaster=Oe.Toaster,exports.ToggleGroup=ke.ToggleGroup,exports.ToggleGroupItem=Ae.ToggleGroupItem,exports.Toolbar=Me.Toolbar,exports.ToolbarView=Ne.ToolbarView,exports.Tooltip=I.Tooltip,exports.ViewSwitcher=Pe.ViewSwitcher,exports.ViewSwitcherBar=Ie.ViewSwitcherBar,exports.ViewSwitcherItem=Fe.ViewSwitcherItem,exports.ViewSwitcherSidebar=Le.ViewSwitcherSidebar,exports.ViewSwitcherSidebarItem=Re.ViewSwitcherSidebarItem,exports.WindowTitle=ze.WindowTitle,exports.WrapBox=Be.WrapBox,exports.useAccentColor=w.useAccentColor,exports.useBreakpoint=H.useBreakpoint,exports.useColorScheme=w.useColorScheme,exports.useDateTimeFormatter=w.useDateTimeFormatter,exports.useDir=w.useDir,exports.useLocale=w.useLocale,exports.useNavigation=W.useNavigation,exports.useNumberFormatter=w.useNumberFormatter,exports.useResolvedColorScheme=w.useResolvedColorScheme,exports.useSidebarCollapsed=$.useSidebarCollapsed;
package/dist/index.d.ts CHANGED
@@ -102,6 +102,8 @@ export type { ProgressBarProps, ProgressBarVariant } from './components/Progress
102
102
  export { ProgressBar } from './components/ProgressBar';
103
103
  export type { RadioButtonProps } from './components/RadioButton';
104
104
  export { RadioButton } from './components/RadioButton';
105
+ export type { ScrollToTopPosition, ScrollToTopProps, ScrollToTopVisible, } from './components/ScrollToTop';
106
+ export { ScrollToTop } from './components/ScrollToTop';
105
107
  export type { SearchBarProps } from './components/SearchBar';
106
108
  export { SearchBar } from './components/SearchBar';
107
109
  export type { SegmentedBarProps, SegmentedBarSegment } from './components/SegmentedBar';
package/dist/index.js CHANGED
@@ -54,42 +54,43 @@ import { PreferencesGroup as de } from "./components/PreferencesGroup/Preference
54
54
  import { PreferencesPage as fe } from "./components/PreferencesPage/PreferencesPage.js";
55
55
  import { ProgressBar as pe } from "./components/ProgressBar/ProgressBar.js";
56
56
  import { RadioButton as me } from "./components/RadioButton/RadioButton.js";
57
- import { Spinner as he } from "./components/Spinner/Spinner.js";
58
- import { SearchBar as ge } from "./components/SearchBar/SearchBar.js";
59
- import { SegmentedBar as _e } from "./components/SegmentedBar/SegmentedBar.js";
60
- import { ShortcutLabel as ve } from "./components/ShortcutLabel/ShortcutLabel.js";
61
- import { ShortcutsDialog as ye } from "./components/ShortcutsDialog/ShortcutsDialog.js";
62
- import { StatusPage as be } from "./components/StatusPage/StatusPage.js";
63
- import { Sidebar as xe, SidebarCollapsedContext as Se, useSidebarCollapsed as Ce } from "./components/Sidebar/Sidebar.js";
64
- import { SidebarItem as we } from "./components/Sidebar/SidebarItem.js";
65
- import { SidebarSection as Te } from "./components/Sidebar/SidebarSection.js";
66
- import { Skeleton as Ee } from "./components/Skeleton/Skeleton.js";
67
- import { Slider as De } from "./components/Slider/Slider.js";
68
- import { SpinButton as Oe } from "./components/SpinButton/SpinButton.js";
69
- import { SpinRow as ke } from "./components/SpinRow/SpinRow.js";
70
- import { SplitButton as Ae } from "./components/SplitButton/SplitButton.js";
71
- import { StatusBadge as je } from "./components/StatusBadge/StatusBadge.js";
72
- import { Switch as Me } from "./components/Switch/Switch.js";
73
- import { SwitchRow as Ne } from "./components/SwitchRow/SwitchRow.js";
74
- import { TabBar as Pe } from "./components/Tabs/TabBar.js";
75
- import { TabItem as Fe } from "./components/Tabs/TabItem.js";
76
- import { TabPanel as Ie } from "./components/Tabs/TabPanel.js";
77
- import { TerminalView as Le } from "./components/TerminalView/TerminalView.js";
78
- import { Text as Re } from "./components/Text/Text.js";
79
- import { TextField as ze } from "./components/TextField/TextField.js";
80
- import { Timeline as Be } from "./components/Timeline/Timeline.js";
81
- import { Toast as Ve } from "./components/Toast/Toast.js";
82
- import { Toaster as He } from "./components/Toast/Toaster.js";
83
- import { ToggleGroup as Ue } from "./components/ToggleGroup/ToggleGroup.js";
84
- import { ToggleGroupItem as We } from "./components/ToggleGroup/ToggleGroupItem.js";
85
- import { Spacer as Ge } from "./components/Toolbar/Spacer.js";
86
- import { Toolbar as Ke } from "./components/Toolbar/Toolbar.js";
87
- import { ToolbarView as qe } from "./components/ToolbarView/ToolbarView.js";
88
- import { ViewSwitcher as Je } from "./components/ViewSwitcher/ViewSwitcher.js";
89
- import { ViewSwitcherItem as Ye } from "./components/ViewSwitcher/ViewSwitcherItem.js";
90
- import { ViewSwitcherBar as Xe } from "./components/ViewSwitcherBar/ViewSwitcherBar.js";
91
- import { ViewSwitcherSidebar as Ze } from "./components/ViewSwitcherSidebar/ViewSwitcherSidebar.js";
92
- import { ViewSwitcherSidebarItem as Qe } from "./components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.js";
93
- import { WindowTitle as $e } from "./components/WindowTitle/WindowTitle.js";
94
- import { WrapBox as et } from "./components/WrapBox/WrapBox.js";
95
- export { e as AboutDialog, t as ActionRow, n as Avatar, r as AvatarRotator, i as Badge, a as Banner, o as Bin, s as Blockquote, c as BottomSheet, l as Box, d as BoxedList, f as BreakpointBin, p as Button, m as ButtonContent, h as ButtonRow, g as Card, _ as Carousel, v as CarouselIndicatorDots, y as CarouselIndicatorLines, b as CheckRow, x as Checkbox, C as Chip, w as Clamp, T as ColorPicker, E as ColorSwatch, O as ColumnView, k as ComboRow, L as ContributionGraph, R as CountDownTimer, z as Dialog, B as Drawer, V as Dropdown, H as EntryRow, U as ExpanderRow, W as Footer, G as Frame, ee as GNOME_BREAKPOINTS, D as GNOME_PALETTE, K as GnomeProvider, q as HeaderBar, S as Icon, Y as IconButton, X as InlineViewSwitcher, Z as InlineViewSwitcherItem, Q as Link, $ as LinkedGroup, re as NavigationPage, ne as NavigationSplitView, ie as NavigationView, oe as OverlaySplitView, se as PasswordEntryRow, ce as PathBar, le as Popover, ue as PreferencesDialog, de as PreferencesGroup, fe as PreferencesPage, pe as ProgressBar, me as RadioButton, ge as SearchBar, _e as SegmentedBar, u as Separator, ve as ShortcutLabel, ye as ShortcutsDialog, xe as Sidebar, Se as SidebarCollapsedContext, we as SidebarItem, Te as SidebarSection, Ee as Skeleton, De as Slider, Ge as Spacer, Oe as SpinButton, ke as SpinRow, he as Spinner, Ae as SplitButton, je as StatusBadge, be as StatusPage, Me as Switch, Ne as SwitchRow, Pe as TabBar, Fe as TabItem, Ie as TabPanel, Le as TerminalView, Re as Text, ze as TextField, Be as Timeline, Ve as Toast, He as Toaster, Ue as ToggleGroup, We as ToggleGroupItem, Ke as Toolbar, qe as ToolbarView, J as Tooltip, Je as ViewSwitcher, Xe as ViewSwitcherBar, Ye as ViewSwitcherItem, Ze as ViewSwitcherSidebar, Qe as ViewSwitcherSidebarItem, $e as WindowTitle, et as WrapBox, A as useAccentColor, te as useBreakpoint, j as useColorScheme, M as useDateTimeFormatter, N as useDir, P as useLocale, ae as useNavigation, F as useNumberFormatter, I as useResolvedColorScheme, Ce as useSidebarCollapsed };
57
+ import { ScrollToTop as he } from "./components/ScrollToTop/ScrollToTop.js";
58
+ import { Spinner as ge } from "./components/Spinner/Spinner.js";
59
+ import { SearchBar as _e } from "./components/SearchBar/SearchBar.js";
60
+ import { SegmentedBar as ve } from "./components/SegmentedBar/SegmentedBar.js";
61
+ import { ShortcutLabel as ye } from "./components/ShortcutLabel/ShortcutLabel.js";
62
+ import { ShortcutsDialog as be } from "./components/ShortcutsDialog/ShortcutsDialog.js";
63
+ import { StatusPage as xe } from "./components/StatusPage/StatusPage.js";
64
+ import { Sidebar as Se, SidebarCollapsedContext as Ce, useSidebarCollapsed as we } from "./components/Sidebar/Sidebar.js";
65
+ import { SidebarItem as Te } from "./components/Sidebar/SidebarItem.js";
66
+ import { SidebarSection as Ee } from "./components/Sidebar/SidebarSection.js";
67
+ import { Skeleton as De } from "./components/Skeleton/Skeleton.js";
68
+ import { Slider as Oe } from "./components/Slider/Slider.js";
69
+ import { SpinButton as ke } from "./components/SpinButton/SpinButton.js";
70
+ import { SpinRow as Ae } from "./components/SpinRow/SpinRow.js";
71
+ import { SplitButton as je } from "./components/SplitButton/SplitButton.js";
72
+ import { StatusBadge as Me } from "./components/StatusBadge/StatusBadge.js";
73
+ import { Switch as Ne } from "./components/Switch/Switch.js";
74
+ import { SwitchRow as Pe } from "./components/SwitchRow/SwitchRow.js";
75
+ import { TabBar as Fe } from "./components/Tabs/TabBar.js";
76
+ import { TabItem as Ie } from "./components/Tabs/TabItem.js";
77
+ import { TabPanel as Le } from "./components/Tabs/TabPanel.js";
78
+ import { TerminalView as Re } from "./components/TerminalView/TerminalView.js";
79
+ import { Text as ze } from "./components/Text/Text.js";
80
+ import { TextField as Be } from "./components/TextField/TextField.js";
81
+ import { Timeline as Ve } from "./components/Timeline/Timeline.js";
82
+ import { Toast as He } from "./components/Toast/Toast.js";
83
+ import { Toaster as Ue } from "./components/Toast/Toaster.js";
84
+ import { ToggleGroup as We } from "./components/ToggleGroup/ToggleGroup.js";
85
+ import { ToggleGroupItem as Ge } from "./components/ToggleGroup/ToggleGroupItem.js";
86
+ import { Spacer as Ke } from "./components/Toolbar/Spacer.js";
87
+ import { Toolbar as qe } from "./components/Toolbar/Toolbar.js";
88
+ import { ToolbarView as Je } from "./components/ToolbarView/ToolbarView.js";
89
+ import { ViewSwitcher as Ye } from "./components/ViewSwitcher/ViewSwitcher.js";
90
+ import { ViewSwitcherItem as Xe } from "./components/ViewSwitcher/ViewSwitcherItem.js";
91
+ import { ViewSwitcherBar as Ze } from "./components/ViewSwitcherBar/ViewSwitcherBar.js";
92
+ import { ViewSwitcherSidebar as Qe } from "./components/ViewSwitcherSidebar/ViewSwitcherSidebar.js";
93
+ import { ViewSwitcherSidebarItem as $e } from "./components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.js";
94
+ import { WindowTitle as et } from "./components/WindowTitle/WindowTitle.js";
95
+ import { WrapBox as tt } from "./components/WrapBox/WrapBox.js";
96
+ export { e as AboutDialog, t as ActionRow, n as Avatar, r as AvatarRotator, i as Badge, a as Banner, o as Bin, s as Blockquote, c as BottomSheet, l as Box, d as BoxedList, f as BreakpointBin, p as Button, m as ButtonContent, h as ButtonRow, g as Card, _ as Carousel, v as CarouselIndicatorDots, y as CarouselIndicatorLines, b as CheckRow, x as Checkbox, C as Chip, w as Clamp, T as ColorPicker, E as ColorSwatch, O as ColumnView, k as ComboRow, L as ContributionGraph, R as CountDownTimer, z as Dialog, B as Drawer, V as Dropdown, H as EntryRow, U as ExpanderRow, W as Footer, G as Frame, ee as GNOME_BREAKPOINTS, D as GNOME_PALETTE, K as GnomeProvider, q as HeaderBar, S as Icon, Y as IconButton, X as InlineViewSwitcher, Z as InlineViewSwitcherItem, Q as Link, $ as LinkedGroup, re as NavigationPage, ne as NavigationSplitView, ie as NavigationView, oe as OverlaySplitView, se as PasswordEntryRow, ce as PathBar, le as Popover, ue as PreferencesDialog, de as PreferencesGroup, fe as PreferencesPage, pe as ProgressBar, me as RadioButton, he as ScrollToTop, _e as SearchBar, ve as SegmentedBar, u as Separator, ye as ShortcutLabel, be as ShortcutsDialog, Se as Sidebar, Ce as SidebarCollapsedContext, Te as SidebarItem, Ee as SidebarSection, De as Skeleton, Oe as Slider, Ke as Spacer, ke as SpinButton, Ae as SpinRow, ge as Spinner, je as SplitButton, Me as StatusBadge, xe as StatusPage, Ne as Switch, Pe as SwitchRow, Fe as TabBar, Ie as TabItem, Le as TabPanel, Re as TerminalView, ze as Text, Be as TextField, Ve as Timeline, He as Toast, Ue as Toaster, We as ToggleGroup, Ge as ToggleGroupItem, qe as Toolbar, Je as ToolbarView, J as Tooltip, Ye as ViewSwitcher, Ze as ViewSwitcherBar, Xe as ViewSwitcherItem, Qe as ViewSwitcherSidebar, $e as ViewSwitcherSidebarItem, et as WindowTitle, tt as WrapBox, A as useAccentColor, te as useBreakpoint, j as useColorScheme, M as useDateTimeFormatter, N as useDir, P as useLocale, ae as useNavigation, F as useNumberFormatter, I as useResolvedColorScheme, we as useSidebarCollapsed };