@geneui/components 3.0.0-next-65b0240-02122024 → 3.0.0-next-8abb102-14012025

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/TextLink.js CHANGED
@@ -2,7 +2,7 @@ import React__default from 'react';
2
2
  import { c as classNames } from './index-ce02421b.js';
3
3
  import { s as styleInject } from './style-inject.es-746bb8ed.js';
4
4
 
5
- var css_248z = ".textLink{border-radius:var(--guit-ref-radius-4xsmall);cursor:pointer;display:inline-flex;word-break:break-word}.textLink_underline .textLink__text{font-family:var(--guit-sem-font-body-medium-underline-medium-font-family);font-size:var(--guit-sem-font-body-medium-underline-medium-font-size);font-weight:var(--guit-sem-font-body-medium-underline-medium-font-weight);line-height:var(--guit-sem-font-body-medium-underline-medium-line-height);-webkit-text-decoration:var(--guit-sem-font-body-medium-underline-medium-text-decoration);text-decoration:var(--guit-sem-font-body-medium-underline-medium-text-decoration)}.textLink:not(.textLink_underline) .textLink__text{font-family:var(--guit-sem-font-body-medium-default-medium-font-family);font-size:var(--guit-sem-font-body-medium-default-medium-font-size);font-weight:var(--guit-sem-font-body-medium-default-medium-font-weight);line-height:var(--guit-sem-font-body-medium-default-medium-line-height)}.textLink_color_primary{color:var(--guit-sem-color-foreground-brand)}.textLink_color_primary:hover{color:var(--guit-sem-color-foreground-brand-hover)}.textLink_color_primary:active{color:var(--guit-sem-color-foreground-brand-pressed)}.textLink_color_secondary{color:var(--guit-sem-color-foreground-neutral-2)}.textLink_color_secondary:hover{color:var(--guit-sem-color-foreground-neutral-2-hover)}.textLink_color_secondary:active{color:var(--guit-sem-color-foreground-neutral-2-pressed)}.textLink_color_inverse{color:var(--guit-sem-color-foreground-inverse)}.textLink_color_inverse:hover{color:var(--guit-sem-color-foreground-inverse-hover)}.textLink_color_inverse:active{color:var(--guit-sem-color-foreground-inverse-pressed)}.textLink_disabled{pointer-events:none}.textLink_disabled:not(.textLink_color_inverse){color:var(--guit-sem-color-foreground-disabled)}.textLink_disabled.textLink_color_inverse{color:var(--guit-sem-color-foreground-inverse-disabled)}.textLink__text{color:inherit}.textLink__icon{flex:0 0 auto;vertical-align:middle}.textLink__icon_before{margin-inline-end:var(--guit-ref-spacing-3xsmall)}.textLink__icon_after{margin-inline-start:var(--guit-ref-spacing-3xsmall)}";
5
+ var css_248z = ".textLink{border-radius:var(--guit-ref-radius-4xsmall);cursor:pointer;display:inline-flex;word-break:break-word}.textLink_underline .textLink__text{font-family:var(--guit-sem-font-body-medium-underline-medium-font-family);font-size:var(--guit-sem-font-body-medium-underline-medium-font-size);font-weight:var(--guit-sem-font-body-medium-underline-medium-font-weight);line-height:var(--guit-sem-font-body-medium-underline-medium-line-height);-webkit-text-decoration:var(--guit-sem-font-body-medium-underline-medium-text-decoration);text-decoration:var(--guit-sem-font-body-medium-underline-medium-text-decoration)}.textLink:not(.textLink_underline) .textLink__text{font-family:var(--guit-sem-font-body-medium-default-medium-font-family);font-size:var(--guit-sem-font-body-medium-default-medium-font-size);font-weight:var(--guit-sem-font-body-medium-default-medium-font-weight);line-height:var(--guit-sem-font-body-medium-default-medium-line-height)}.textLink_color_primary{color:var(--guit-sem-color-foreground-brand)}.textLink_color_primary:hover{color:var(--guit-sem-color-foreground-brand-hover)}.textLink_color_primary:active{color:var(--guit-sem-color-foreground-brand-pressed)}.textLink_color_secondary{color:var(--guit-sem-color-foreground-neutral-2)}.textLink_color_secondary:hover{color:var(--guit-sem-color-foreground-neutral-2-hover)}.textLink_color_secondary:active{color:var(--guit-sem-color-foreground-neutral-2-pressed)}.textLink_color_inverse{color:var(--guit-sem-color-foreground-inverse)}.textLink_color_inverse:hover{color:var(--guit-sem-color-foreground-inverse-hover)}.textLink_color_inverse:active{color:var(--guit-sem-color-foreground-inverse-pressed)}.textLink_disabled{pointer-events:none}.textLink_disabled:not(.textLink_color_inverse){color:var(--guit-sem-color-foreground-disabled)}.textLink_disabled.textLink_color_inverse{color:var(--guit-sem-color-foreground-inverse-disabled)}.textLink__text{color:inherit}.textLink__icon{flex:0 0 auto;vertical-align:middle}.textLink__icon_before{-webkit-margin-end:var(--guit-ref-spacing-3xsmall);margin-inline-end:var(--guit-ref-spacing-3xsmall)}.textLink__icon_after{-webkit-margin-start:var(--guit-ref-spacing-3xsmall);margin-inline-start:var(--guit-ref-spacing-3xsmall)}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  /**
@@ -30,11 +30,6 @@ interface IHelperTextProps {
30
30
  * If `true`, the helper text will appear dimmed and non-interactive.
31
31
  */
32
32
  isDisabled?: boolean;
33
- /**
34
- * Indicates whether the component is in a loading state.
35
- * When `true`, a loading skeleton is displayed instead of the actual helper text.
36
- */
37
- isLoading?: boolean;
38
33
  /**
39
34
  * Additional class for the parent element.
40
35
  * This prop should be used to set placement properties for the element relative to its parent using BEM conventions.
@@ -0,0 +1,42 @@
1
+ import { FC, UIEvent, ReactNode } from "react";
2
+ import "./Scrollbar.scss";
3
+ interface IScrollbarProps {
4
+ /**
5
+ * Additional class for the parent element.
6
+ * This prop should be used to set placement properties for the element relative to its parent using BEM conventions.
7
+ */
8
+ className?: string;
9
+ /**
10
+ *The content to be rendered inside the scrollable area.
11
+ */
12
+ children: ReactNode;
13
+ /**
14
+ * Automatically scrolls the container to a specific vertical position (in pixels).
15
+ */
16
+ autoScrollTopTo?: number;
17
+ /**
18
+ * Automatically scrolls the container to a specific horizontal position (in pixels).
19
+ */
20
+ autoScrollLeftTo?: number;
21
+ /**
22
+ * Callback function triggered during scroll events. Receives the scroll event as an argument.
23
+ */
24
+ onScroll?: (e: UIEvent<HTMLDivElement>) => void;
25
+ /**
26
+ * Custom height for the scrollable container.<br>
27
+ * Default is 100%.<br>
28
+ * Possible values: `any valid css value`
29
+ */
30
+ customHeight?: string;
31
+ /**
32
+ * Custom width for the scrollable container.<br>
33
+ * Default is 100%.<br>
34
+ * Possible values: `any valid css value`
35
+ */
36
+ customWidth?: string;
37
+ }
38
+ /**
39
+ * Scrollbar is a UI element that allows users to navigate through content that extends beyond the visible area of a container or window. It typically appears along the right side or bottom of the viewport, providing a draggable handle and directional arrows for vertical or horizontal scrolling, enabling users to access all available content.
40
+ */
41
+ declare const Scrollbar: FC<IScrollbarProps>;
42
+ export { IScrollbarProps, Scrollbar as default };
@@ -0,0 +1 @@
1
+ export { IScrollbarProps, default } from "./Scrollbar";
@@ -1,2 +1,5 @@
1
- declare const useDebouncedCallback: <T extends (...args: unknown[]) => void>(func: T, wait?: number) => (...args: unknown[]) => void;
1
+ declare const useDebouncedCallback: <T extends (...args: unknown[]) => void>(func: T, wait?: number) => {
2
+ debouncedCallback: (...args: unknown[]) => void;
3
+ clearDebounce: () => void;
4
+ };
2
5
  export default useDebouncedCallback;
package/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export { default as Pill, IPillProps } from "./components/atoms/Pill";
6
6
  export { default as Divider, IDividerProps } from "./components/atoms/Divider";
7
7
  export { default as Info, IInfoProps } from "./components/atoms/Info";
8
8
  export { default as Button, IButtonProps } from "./components/atoms/Button";
9
+ export { default as Scrollbar } from "./components/atoms/Scrollbar";
9
10
  export { default as Tooltip } from "./components/molecules/Tooltip";
10
11
  export { default as ProgressBar } from "./components/molecules/ProgressBar";
11
12
  export { default as GeneUIProvider, GeneUIDesignSystemContext, IGeneUIDesignSystemContext, IGeneUIProviderProps } from "./components/providers/GeneUIProvider";
package/index.js CHANGED
@@ -6,12 +6,15 @@ export { default as Pill } from './Pill.js';
6
6
  export { default as Divider } from './Divider.js';
7
7
  export { default as Info } from './Info.js';
8
8
  export { default as Button } from './Button.js';
9
+ export { default as Scrollbar } from './Scrollbar.js';
9
10
  export { default as Tooltip } from './Tooltip.js';
10
11
  export { default as ProgressBar } from './ProgressBar.js';
11
12
  export { GeneUIDesignSystemContext, default as GeneUIProvider } from './GeneUIProvider.js';
12
- export { u as useDebounce, a as useEllipsisDetection } from './useEllipsisDetection-46d712b6.js';
13
+ export { u as useDebounce } from './useDebounceCallback-999deae7.js';
14
+ export { u as useEllipsisDetection } from './useEllipsisDetection-e545ae62.js';
13
15
  import 'react';
14
16
  import './index-ce02421b.js';
15
17
  import './ArrowLeft-b88e2ba8.js';
16
18
  import './style-inject.es-746bb8ed.js';
19
+ import 'prop-types';
17
20
  import 'react-dom';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@geneui/components",
3
3
  "description": "The Gene UI components library designed for BI tools",
4
- "version": "3.0.0-next-65b0240-02122024",
4
+ "version": "3.0.0-next-8abb102-14012025",
5
5
  "author": "SoftConstruct",
6
6
  "homepage": "https://github.com/softconstruct/gene-ui-components#readme",
7
7
  "repository": {
@@ -168,7 +168,8 @@
168
168
  "@geneui/icons": "^1.0.4",
169
169
  "@geneui/tokens": "^1.8.0-beta",
170
170
  "classnames": "^2.3.2",
171
- "react-is": "^17.0.2"
171
+ "react-is": "^17.0.2",
172
+ "react-scrollbars-custom": "^4.1.1"
172
173
  },
173
174
  "husky": {
174
175
  "hooks": {
@@ -0,0 +1,23 @@
1
+ import { useRef, useCallback } from 'react';
2
+
3
+ const useDebouncedCallback = (func, wait) => {
4
+ const timeout = useRef(undefined);
5
+ const waitTime = wait === undefined ? 0 : wait;
6
+ const debouncedCallback = useCallback((...args) => {
7
+ const later = () => {
8
+ clearTimeout(timeout.current);
9
+ func(...args);
10
+ };
11
+ clearTimeout(timeout.current);
12
+ timeout.current = window.setTimeout(later, waitTime);
13
+ }, [func, waitTime]);
14
+ const clearDebounce = useCallback(() => {
15
+ if (timeout.current !== undefined) {
16
+ clearTimeout(timeout.current);
17
+ timeout.current = undefined;
18
+ }
19
+ }, []);
20
+ return { debouncedCallback, clearDebounce };
21
+ };
22
+
23
+ export { useDebouncedCallback as u };
@@ -1,16 +1,5 @@
1
- import { useRef, useCallback, useState, useEffect } from 'react';
2
-
3
- const useDebouncedCallback = (func, wait) => {
4
- const timeout = useRef(undefined);
5
- return useCallback((...args) => {
6
- const later = () => {
7
- clearTimeout(timeout.current);
8
- func(...args);
9
- };
10
- clearTimeout(timeout.current);
11
- timeout.current = window.setTimeout(later, wait);
12
- }, [func, wait]);
13
- };
1
+ import { useState, useEffect } from 'react';
2
+ import { u as useDebouncedCallback } from './useDebounceCallback-999deae7.js';
14
3
 
15
4
  const EQUAL_HEIGHT_DIFF = 3;
16
5
  const useEllipsisDetection = (ref, externalDependencies = []) => {
@@ -23,12 +12,12 @@ const useEllipsisDetection = (ref, externalDependencies = []) => {
23
12
  setIsTruncated(scrollWidth > clientWidth || scrollHeight > clientHeight + EQUAL_HEIGHT_DIFF);
24
13
  };
25
14
  useEffect(() => handleResize(), [...externalDependencies]);
26
- const debounce = useDebouncedCallback(handleResize, 100);
15
+ const { debouncedCallback } = useDebouncedCallback(handleResize, 100);
27
16
  useEffect(() => {
28
- window.addEventListener("resize", debounce);
29
- return () => window.removeEventListener("resize", debounce);
17
+ window.addEventListener("resize", debouncedCallback);
18
+ return () => window.removeEventListener("resize", debouncedCallback);
30
19
  }, [(_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.scrollWidth, (_b = ref === null || ref === void 0 ? void 0 : ref.current) === null || _b === void 0 ? void 0 : _b.clientWidth, (_c = ref === null || ref === void 0 ? void 0 : ref.current) === null || _c === void 0 ? void 0 : _c.scrollHeight, (_d = ref === null || ref === void 0 ? void 0 : ref.current) === null || _d === void 0 ? void 0 : _d.clientHeight]);
31
20
  return isTruncated;
32
21
  };
33
22
 
34
- export { useEllipsisDetection as a, useDebouncedCallback as u };
23
+ export { useEllipsisDetection as u };