@sikka/hawa 0.12.7-next → 0.12.9-next

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -572,6 +572,7 @@ declare const BackToTop: FC<BackToTopTypes>;
572
572
 
573
573
  type ScrollIndicatorProps = {
574
574
  anchor: RefObject<HTMLInputElement>;
575
+ inContainer?: boolean;
575
576
  };
576
577
  declare const ScrollIndicator: FC<ScrollIndicatorProps>;
577
578
 
package/dist/index.d.ts CHANGED
@@ -572,6 +572,7 @@ declare const BackToTop: FC<BackToTopTypes>;
572
572
 
573
573
  type ScrollIndicatorProps = {
574
574
  anchor: RefObject<HTMLInputElement>;
575
+ inContainer?: boolean;
575
576
  };
576
577
  declare const ScrollIndicator: FC<ScrollIndicatorProps>;
577
578
 
package/dist/index.js CHANGED
@@ -5590,7 +5590,7 @@ var BackToTop = function(_param) {
5590
5590
  // components/elements/ScrollIndicator.tsx
5591
5591
  var import_react27 = __toESM(require("react"));
5592
5592
  var ScrollIndicator = function(param) {
5593
- var anchor = param.anchor;
5593
+ var anchor = param.anchor, _param_inContainer = param.inContainer, inContainer = _param_inContainer === void 0 ? false : _param_inContainer;
5594
5594
  var _ref = _sliced_to_array((0, import_react27.useState)(0), 2), scrollPercentage = _ref[0], setScrollPercentage = _ref[1];
5595
5595
  var onScroll = function() {
5596
5596
  var scrollElement = anchor.current;
@@ -5614,7 +5614,7 @@ var ScrollIndicator = function(param) {
5614
5614
  ]);
5615
5615
  return /* @__PURE__ */ import_react27.default.createElement("div", {
5616
5616
  style: {
5617
- position: "absolute",
5617
+ position: inContainer ? "absolute" : "fixed",
5618
5618
  top: 0,
5619
5619
  left: 0,
5620
5620
  height: "5px",
package/dist/index.mjs CHANGED
@@ -5286,7 +5286,10 @@ var BackToTop = ({ ...props }) => {
5286
5286
 
5287
5287
  // components/elements/ScrollIndicator.tsx
5288
5288
  import React45, { useState as useState18, useEffect as useEffect13 } from "react";
5289
- var ScrollIndicator = ({ anchor }) => {
5289
+ var ScrollIndicator = ({
5290
+ anchor,
5291
+ inContainer = false
5292
+ }) => {
5290
5293
  const [scrollPercentage, setScrollPercentage] = useState18(0);
5291
5294
  const onScroll = () => {
5292
5295
  const scrollElement = anchor.current;
@@ -5310,7 +5313,7 @@ var ScrollIndicator = ({ anchor }) => {
5310
5313
  "div",
5311
5314
  {
5312
5315
  style: {
5313
- position: "absolute",
5316
+ position: inContainer ? "absolute" : "fixed",
5314
5317
  top: 0,
5315
5318
  left: 0,
5316
5319
  height: "5px",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.12.7-next",
3
+ "version": "0.12.9-next",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {