pixelize-design-library 2.3.17 → 2.3.20
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/.cursor/modules/inputs-date-file/MODULE.md +1 -0
- package/.cursor/modules/overlays/MODULE.md +9 -1
- package/.cursor/modules/utils-hooks/MODULE.md +12 -2
- package/dist/Components/DatePicker/SingleDatePicker.d.ts.map +1 -1
- package/dist/Components/DatePicker/SingleDatePicker.js +30 -2
- package/dist/Components/ToolTip/OverflowToolTip.d.ts +18 -0
- package/dist/Components/ToolTip/OverflowToolTip.d.ts.map +1 -0
- package/dist/Components/ToolTip/OverflowToolTip.js +26 -0
- package/dist/Components/ToolTip/ToolTip.d.ts +1 -1
- package/dist/Components/ToolTip/ToolTip.d.ts.map +1 -1
- package/dist/Components/ToolTip/ToolTip.js +21 -3
- package/dist/Components/ToolTip/ToolTipProps.d.ts +9 -0
- package/dist/Components/ToolTip/ToolTipProps.d.ts.map +1 -1
- package/dist/Hooks/useIsTruncated.d.ts +36 -0
- package/dist/Hooks/useIsTruncated.d.ts.map +1 -0
- package/dist/Hooks/useIsTruncated.js +57 -0
- package/dist/Utils/mergeRefs.d.ts +11 -0
- package/dist/Utils/mergeRefs.d.ts.map +1 -0
- package/dist/Utils/mergeRefs.js +20 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ ThemeDatePicker (Single/Range/Time variants), FileUpload, FileUploader, Editor (
|
|
|
12
12
|
## Key rules
|
|
13
13
|
|
|
14
14
|
- DatePicker themed for brand tokens
|
|
15
|
+
- Masked-input blur must not discard a valid value. `isMaskComplete()` only recognises numeric/`a` tokens, so text month formats (e.g. `MMM d, yyyy`) never look "complete" — `handleInputBlur`/`handleInputFocus` therefore keep any value that `parseValidatedValue()` can parse to a valid date, and only `requestClose(null)` (clear) on empty/unparseable input. The Clear button and emptied-mask paths remain the explicit ways to clear. Regression: `SingleDatePicker.blur.test.tsx`.
|
|
15
16
|
|
|
16
17
|
## Migration notes
|
|
17
18
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
4
|
|
|
5
|
-
Modal, AlertDialog, ToolTip, Toaster (+ `useToaster` hook).
|
|
5
|
+
Modal, AlertDialog, ToolTip / OverflowToolTip, Toaster (+ `useToaster` hook).
|
|
6
6
|
|
|
7
7
|
## Key paths
|
|
8
8
|
|
|
@@ -11,3 +11,11 @@ Modal, AlertDialog, ToolTip, Toaster (+ `useToaster` hook).
|
|
|
11
11
|
## Key rules
|
|
12
12
|
|
|
13
13
|
- Modal exports ModalHeader, ModalBody, ModalFooter subcomponents
|
|
14
|
+
- **ToolTip `overflowOnly`:** pass `overflowOnly` to show the tooltip **only**
|
|
15
|
+
when the child text is actually truncated (ellipsis active) — no tooltip when
|
|
16
|
+
it fits. The child must be the single clamping element (e.g. `Text` with
|
|
17
|
+
`noOfLines`); its ref is managed internally. Works for single- and multi-line
|
|
18
|
+
clamps and combines with `isDisabled`. **`OverflowToolTip`** is sugar for
|
|
19
|
+
`<ToolTip overflowOnly>`. Powered by the `useIsTruncated` hook (see
|
|
20
|
+
`utils-hooks`). Inert unless `overflowOnly` is set — no measurement/observer
|
|
21
|
+
for ordinary tooltips, and it never measures on hover/scroll.
|
|
@@ -2,12 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
4
|
|
|
5
|
-
Shared utilities and hooks: debounce, table helpers, preferences
|
|
5
|
+
Shared utilities and hooks: debounce, table helpers, preferences, ref merging,
|
|
6
|
+
truncation detection.
|
|
6
7
|
|
|
7
8
|
## Key paths
|
|
8
9
|
|
|
9
|
-
- `src/Utils/table.ts`, `src/
|
|
10
|
+
- `src/Utils/table.ts`, `src/Utils/mergeRefs.ts`, `src/Hooks/usePreferences.ts`,
|
|
11
|
+
`src/Hooks/useIsTruncated.ts`, `src/services/feedback.ts`
|
|
10
12
|
|
|
11
13
|
## Key rules
|
|
12
14
|
|
|
13
15
|
- `debounce` exported from index.ts
|
|
16
|
+
- **`useIsTruncated(content?, enabled?)`** (exported) — returns `{ ref, isTruncated }`;
|
|
17
|
+
attach `ref` to a clamped element to detect real overflow (`scrollWidth/Height`
|
|
18
|
+
vs `clientWidth/Height`, single- and multi-line). Re-measures on mount, element
|
|
19
|
+
resize (`ResizeObserver`), and `content` change — never on hover/scroll. Pass
|
|
20
|
+
`enabled=false` to make it fully inert. Powers `ToolTip overflowOnly` (see
|
|
21
|
+
`overlays`).
|
|
22
|
+
- **`mergeRefs(...refs)`** (internal) — combine a caller ref with an injected one
|
|
23
|
+
when cloning an element.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleDatePicker.d.ts","sourceRoot":"","sources":["../../../src/Components/DatePicker/SingleDatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6E,MAAM,OAAO,CAAC;AA6BlG,OAAO,EAAE,qBAAqB,EAAc,MAAM,mBAAmB,CAAC;AA2OtE,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"SingleDatePicker.d.ts","sourceRoot":"","sources":["../../../src/Components/DatePicker/SingleDatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6E,MAAM,OAAO,CAAC;AA6BlG,OAAO,EAAE,qBAAqB,EAAc,MAAM,mBAAmB,CAAC;AA2OtE,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA09B5D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -435,7 +435,13 @@ const SingleDatePicker = (props) => {
|
|
|
435
435
|
if (enableMask && isMaskActive) {
|
|
436
436
|
setIsMaskActive(false);
|
|
437
437
|
segmentInputBufferRef.current = "";
|
|
438
|
-
|
|
438
|
+
// isMaskComplete() can't recognise text month tokens (e.g. "MMM"), so a
|
|
439
|
+
// valid, externally-set value like "Jun 10, 2026" is judged "incomplete"
|
|
440
|
+
// and was being cleared on blur (data loss). Only clear when the value is
|
|
441
|
+
// empty or genuinely can't be parsed into a valid date; otherwise fall
|
|
442
|
+
// through and let the parse path below commit it.
|
|
443
|
+
const hasParsableDate = parseValidatedValue(value) !== null;
|
|
444
|
+
if (!value || !value.trim() || (!isMaskComplete(value) && !hasParsableDate)) {
|
|
439
445
|
setInputValue("");
|
|
440
446
|
setTempDate(null);
|
|
441
447
|
setIsTyping(false);
|
|
@@ -635,6 +641,24 @@ const SingleDatePicker = (props) => {
|
|
|
635
641
|
}
|
|
636
642
|
return finalDate;
|
|
637
643
|
};
|
|
644
|
+
// Returns the validated Date for a fully-typed value, or null when the value
|
|
645
|
+
// is empty / not a parseable, in-range date. Used by blur handling so an
|
|
646
|
+
// already-valid value is never discarded just because the mask-completeness
|
|
647
|
+
// heuristic doesn't understand text month tokens.
|
|
648
|
+
const parseValidatedValue = (value) => {
|
|
649
|
+
if (!value || !value.trim())
|
|
650
|
+
return null;
|
|
651
|
+
try {
|
|
652
|
+
const parsed = (0, date_fns_1.parse)(value, resolvedDateFormat, new Date());
|
|
653
|
+
if ((0, date_fns_1.isValid)(parsed)) {
|
|
654
|
+
return computeFinalDate(parsed);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
catch (error) {
|
|
658
|
+
console.error("Error parsing input:", error);
|
|
659
|
+
}
|
|
660
|
+
return null;
|
|
661
|
+
};
|
|
638
662
|
const updateTempDateFromMask = (value) => {
|
|
639
663
|
if (!isMaskComplete(value)) {
|
|
640
664
|
return;
|
|
@@ -662,7 +686,11 @@ const SingleDatePicker = (props) => {
|
|
|
662
686
|
return;
|
|
663
687
|
setIsMaskActive(true);
|
|
664
688
|
setIsTyping(true);
|
|
665
|
-
|
|
689
|
+
// Never blank an already-valid value on focus. The mask placeholder is built
|
|
690
|
+
// with padded tokens (e.g. "MMM dd, yyyy"), so a valid but shorter value such
|
|
691
|
+
// as "Jun 5, 2026" would otherwise be replaced by the empty mask and lost.
|
|
692
|
+
const hasValidValue = parseValidatedValue(inputValue) !== null;
|
|
693
|
+
if (!hasValidValue && (!inputValue || inputValue.length !== maskPlaceholder.length)) {
|
|
666
694
|
setInputValue(maskPlaceholder);
|
|
667
695
|
maskInsertedRef.current = true;
|
|
668
696
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ToolTipProps } from "./ToolTipProps";
|
|
2
|
+
/**
|
|
3
|
+
* A tooltip that only appears when its child text is actually truncated
|
|
4
|
+
* (ellipsis active) — no tooltip when the text fully fits. Thin sugar over
|
|
5
|
+
* `<ToolTip overflowOnly>`; use it wherever you clamp text with `noOfLines` /
|
|
6
|
+
* ellipsis and want the full text revealed only when it's cut off.
|
|
7
|
+
*
|
|
8
|
+
* The child must be the single element that clamps the text (e.g. a Chakra
|
|
9
|
+
* `Text` with `noOfLines`); its ref is managed internally. Works for both
|
|
10
|
+
* single-line and multi-line clamps.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <OverflowToolTip label={title}>
|
|
14
|
+
* <Text noOfLines={1}>{title}</Text>
|
|
15
|
+
* </OverflowToolTip>
|
|
16
|
+
*/
|
|
17
|
+
export default function OverflowToolTip(props: ToolTipProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=OverflowToolTip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverflowToolTip.d.ts","sourceRoot":"","sources":["../../../src/Components/ToolTip/OverflowToolTip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,YAAY,2CAE1D"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = OverflowToolTip;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const ToolTip_1 = __importDefault(require("./ToolTip"));
|
|
9
|
+
/**
|
|
10
|
+
* A tooltip that only appears when its child text is actually truncated
|
|
11
|
+
* (ellipsis active) — no tooltip when the text fully fits. Thin sugar over
|
|
12
|
+
* `<ToolTip overflowOnly>`; use it wherever you clamp text with `noOfLines` /
|
|
13
|
+
* ellipsis and want the full text revealed only when it's cut off.
|
|
14
|
+
*
|
|
15
|
+
* The child must be the single element that clamps the text (e.g. a Chakra
|
|
16
|
+
* `Text` with `noOfLines`); its ref is managed internally. Works for both
|
|
17
|
+
* single-line and multi-line clamps.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <OverflowToolTip label={title}>
|
|
21
|
+
* <Text noOfLines={1}>{title}</Text>
|
|
22
|
+
* </OverflowToolTip>
|
|
23
|
+
*/
|
|
24
|
+
function OverflowToolTip(props) {
|
|
25
|
+
return (0, jsx_runtime_1.jsx)(ToolTip_1.default, { ...props, overflowOnly: true });
|
|
26
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ToolTipProps } from "./ToolTipProps";
|
|
2
|
-
export default function ToolTip({ placement, label, children, hasArrow, fontSize, bg, color, isDisabled, isOpen, defaultIsOpen, openDelay, closeDelay, arrowSize, closeOnClick, size, width, height, arrowPadding, arrowShadowColor, direction, gutter, onClose, modifiers, closeOnPointerDown, styles, }: ToolTipProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function ToolTip({ placement, label, children, hasArrow, fontSize, bg, color, isDisabled, overflowOnly, isOpen, defaultIsOpen, openDelay, closeDelay, arrowSize, closeOnClick, size, width, height, arrowPadding, arrowShadowColor, direction, gutter, onClose, modifiers, closeOnPointerDown, styles, }: ToolTipProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=ToolTip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolTip.d.ts","sourceRoot":"","sources":["../../../src/Components/ToolTip/ToolTip.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ToolTip.d.ts","sourceRoot":"","sources":["../../../src/Components/ToolTip/ToolTip.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAI9C,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAC9B,SAAiB,EACjB,KAAK,EACL,QAAQ,EACR,QAAe,EACf,QAAiB,EACjB,EAAc,EACd,KAAe,EACf,UAAU,EACV,YAAoB,EACpB,MAAM,EACN,aAAa,EACb,SAAa,EACb,UAAc,EACd,SAAc,EACd,YAAoB,EACpB,IAAI,EACJ,KAAK,EACL,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,MAAU,EACV,OAAO,EACP,SAAS,EACT,kBAAkB,EAClB,MAAM,GACP,EAAE,YAAY,2CA4Dd"}
|
|
@@ -2,7 +2,25 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = ToolTip;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const react_2 = require("@chakra-ui/react");
|
|
7
|
+
const useIsTruncated_1 = require("../../Hooks/useIsTruncated");
|
|
8
|
+
const mergeRefs_1 = require("../../Utils/mergeRefs");
|
|
9
|
+
function ToolTip({ placement = "top", label, children, hasArrow = true, fontSize = "14px", bg = "#12161B", color = "white", isDisabled, overflowOnly = false, isOpen, defaultIsOpen, openDelay = 0, closeDelay = 0, arrowSize = 10, closeOnClick = false, size, width, height, arrowPadding, arrowShadowColor, direction, gutter = 8, onClose, modifiers, closeOnPointerDown, styles, }) {
|
|
10
|
+
// Measure the child for `overflowOnly`. The hook is always called (Rules of
|
|
11
|
+
// Hooks) but is fully inert unless `overflowOnly` is set — no layout reads,
|
|
12
|
+
// no ResizeObserver, no re-renders for ordinary tooltips. Measurement never
|
|
13
|
+
// runs on hover/scroll, so showing the tooltip stays as cheap as before.
|
|
14
|
+
const { ref, isTruncated } = (0, useIsTruncated_1.useIsTruncated)(label, overflowOnly && (0, react_1.isValidElement)(children));
|
|
15
|
+
let content = children;
|
|
16
|
+
let effectiveDisabled = isDisabled;
|
|
17
|
+
if (overflowOnly && (0, react_1.isValidElement)(children)) {
|
|
18
|
+
const child = children;
|
|
19
|
+
const childRef = child.ref;
|
|
20
|
+
content = (0, react_1.cloneElement)(child, {
|
|
21
|
+
ref: (0, mergeRefs_1.mergeRefs)(ref, childRef),
|
|
22
|
+
});
|
|
23
|
+
effectiveDisabled = Boolean(isDisabled) || !isTruncated;
|
|
24
|
+
}
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: label, placement: placement, hasArrow: hasArrow, fontSize: fontSize, bg: bg, color: color, isDisabled: effectiveDisabled, isOpen: isOpen, defaultIsOpen: defaultIsOpen, openDelay: openDelay, closeDelay: closeDelay, arrowSize: arrowSize, closeOnClick: closeOnClick, size: size, width: width, height: height, arrowPadding: arrowPadding, arrowShadowColor: arrowShadowColor, direction: direction, gutter: gutter, onClose: onClose, modifiers: modifiers, closeOnPointerDown: closeOnPointerDown, style: styles, px: 3, py: 2, borderRadius: "8px", fontWeight: "400", lineHeight: "1.5", maxW: "300px", children: content }));
|
|
8
26
|
}
|
|
@@ -2,6 +2,15 @@ import { TooltipProps as ChakraTooltip } from "@chakra-ui/react";
|
|
|
2
2
|
export type ToolTipProps = Pick<ChakraTooltip, "placement" | "label" | "hasArrow" | "fontSize" | "bg" | "color" | "isDisabled" | "isOpen" | "defaultIsOpen" | "openDelay" | "closeDelay" | "arrowSize" | "closeOnClick" | "size" | "width" | "height" | "arrowPadding" | "arrowShadowColor" | "direction" | "gutter" | "onClose" | "modifiers" | "closeOnPointerDown"> & {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
styles?: React.CSSProperties;
|
|
5
|
+
/**
|
|
6
|
+
* When `true`, the tooltip is shown **only** while its child is actually
|
|
7
|
+
* truncated (ellipsis active) — no tooltip when the text fully fits. The
|
|
8
|
+
* child must be the single element that clamps the text (e.g. a `Text` with
|
|
9
|
+
* `noOfLines` / `isTruncated`); its ref is managed internally. Combines with
|
|
10
|
+
* `isDisabled` (either disabling condition hides the tooltip). Works for both
|
|
11
|
+
* single-line and multi-line clamps.
|
|
12
|
+
*/
|
|
13
|
+
overflowOnly?: boolean;
|
|
5
14
|
placement?: "auto" | "auto-start" | "auto-end" | "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end";
|
|
6
15
|
};
|
|
7
16
|
//# sourceMappingURL=ToolTipProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolTipProps.d.ts","sourceRoot":"","sources":["../../../src/Components/ToolTip/ToolTipProps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjE,MAAM,MAAM,YAAY,GAAG,IAAI,CAC7B,aAAa,EACX,WAAW,GACX,OAAO,GACP,UAAU,GACV,UAAU,GACV,IAAI,GACJ,OAAO,GACP,YAAY,GACZ,QAAQ,GACR,eAAe,GACf,WAAW,GACX,YAAY,GACZ,WAAW,GACX,cAAc,GACd,MAAM,GACN,OAAO,GACP,QAAQ,GACR,cAAc,GACd,kBAAkB,GAClB,WAAW,GACX,QAAQ,GACR,SAAS,GACT,WAAW,GACX,oBAAoB,CACvB,GAAG;IACF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC7B,SAAS,CAAC,EACN,MAAM,GACN,YAAY,GACZ,UAAU,GACV,KAAK,GACL,WAAW,GACX,SAAS,GACT,OAAO,GACP,aAAa,GACb,WAAW,GACX,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,UAAU,CAAC;CAChB,CAAC"}
|
|
1
|
+
{"version":3,"file":"ToolTipProps.d.ts","sourceRoot":"","sources":["../../../src/Components/ToolTip/ToolTipProps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjE,MAAM,MAAM,YAAY,GAAG,IAAI,CAC7B,aAAa,EACX,WAAW,GACX,OAAO,GACP,UAAU,GACV,UAAU,GACV,IAAI,GACJ,OAAO,GACP,YAAY,GACZ,QAAQ,GACR,eAAe,GACf,WAAW,GACX,YAAY,GACZ,WAAW,GACX,cAAc,GACd,MAAM,GACN,OAAO,GACP,QAAQ,GACR,cAAc,GACd,kBAAkB,GAClB,WAAW,GACX,QAAQ,GACR,SAAS,GACT,WAAW,GACX,oBAAoB,CACvB,GAAG;IACF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC7B;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EACN,MAAM,GACN,YAAY,GACZ,UAAU,GACV,KAAK,GACL,WAAW,GACX,SAAS,GACT,OAAO,GACP,aAAa,GACb,WAAW,GACX,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,UAAU,CAAC;CAChB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detects whether an element's text is *actually* visually truncated — i.e. the
|
|
3
|
+
* ellipsis is active. Works for both single-line clamps
|
|
4
|
+
* (`overflow: hidden; white-space: nowrap; text-overflow: ellipsis`) and
|
|
5
|
+
* multi-line clamps (`-webkit-line-clamp` / Chakra `noOfLines`), by comparing
|
|
6
|
+
* the scroll size against the visible client size.
|
|
7
|
+
*
|
|
8
|
+
* Attach the returned `ref` to the element that clamps the text, then read
|
|
9
|
+
* `isTruncated` to decide whether a tooltip is worth showing. Re-measures on
|
|
10
|
+
* element resize (via `ResizeObserver`) and whenever `content` changes.
|
|
11
|
+
*
|
|
12
|
+
* @param content Pass the rendered text (or anything that changes with it) so
|
|
13
|
+
* the measurement re-runs when the content changes — the clamp box can keep
|
|
14
|
+
* the same size while the text length changes, which a `ResizeObserver` alone
|
|
15
|
+
* would not catch.
|
|
16
|
+
* @param enabled Set to `false` to fully disable measurement — no layout reads,
|
|
17
|
+
* no `ResizeObserver`, no state updates. Use it to keep the hook cheap when
|
|
18
|
+
* the caller isn't in truncation mode (`isTruncated` stays `false`).
|
|
19
|
+
*
|
|
20
|
+
* Performance: measurement runs only on mount, on element **resize**, and when
|
|
21
|
+
* `content` changes — never on hover, scroll, or re-render. Each run does a
|
|
22
|
+
* single batched layout read (four properties) on one element. When `enabled`
|
|
23
|
+
* is `false` the hook does nothing at all.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* const { ref, isTruncated } = useIsTruncated(title);
|
|
27
|
+
* <ToolTip label={title} isDisabled={!isTruncated}>
|
|
28
|
+
* <Text ref={ref} noOfLines={1}>{title}</Text>
|
|
29
|
+
* </ToolTip>
|
|
30
|
+
*/
|
|
31
|
+
export declare function useIsTruncated<T extends HTMLElement = HTMLElement>(content?: unknown, enabled?: boolean): {
|
|
32
|
+
ref: React.MutableRefObject<T | null>;
|
|
33
|
+
isTruncated: boolean;
|
|
34
|
+
};
|
|
35
|
+
export default useIsTruncated;
|
|
36
|
+
//# sourceMappingURL=useIsTruncated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsTruncated.d.ts","sourceRoot":"","sources":["../../src/Hooks/useIsTruncated.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAChE,OAAO,CAAC,EAAE,OAAO,EACjB,OAAO,GAAE,OAAc,GACtB;IAAE,GAAG,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAAC,WAAW,EAAE,OAAO,CAAA;CAAE,CAuBjE;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useIsTruncated = useIsTruncated;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
/**
|
|
6
|
+
* Detects whether an element's text is *actually* visually truncated — i.e. the
|
|
7
|
+
* ellipsis is active. Works for both single-line clamps
|
|
8
|
+
* (`overflow: hidden; white-space: nowrap; text-overflow: ellipsis`) and
|
|
9
|
+
* multi-line clamps (`-webkit-line-clamp` / Chakra `noOfLines`), by comparing
|
|
10
|
+
* the scroll size against the visible client size.
|
|
11
|
+
*
|
|
12
|
+
* Attach the returned `ref` to the element that clamps the text, then read
|
|
13
|
+
* `isTruncated` to decide whether a tooltip is worth showing. Re-measures on
|
|
14
|
+
* element resize (via `ResizeObserver`) and whenever `content` changes.
|
|
15
|
+
*
|
|
16
|
+
* @param content Pass the rendered text (or anything that changes with it) so
|
|
17
|
+
* the measurement re-runs when the content changes — the clamp box can keep
|
|
18
|
+
* the same size while the text length changes, which a `ResizeObserver` alone
|
|
19
|
+
* would not catch.
|
|
20
|
+
* @param enabled Set to `false` to fully disable measurement — no layout reads,
|
|
21
|
+
* no `ResizeObserver`, no state updates. Use it to keep the hook cheap when
|
|
22
|
+
* the caller isn't in truncation mode (`isTruncated` stays `false`).
|
|
23
|
+
*
|
|
24
|
+
* Performance: measurement runs only on mount, on element **resize**, and when
|
|
25
|
+
* `content` changes — never on hover, scroll, or re-render. Each run does a
|
|
26
|
+
* single batched layout read (four properties) on one element. When `enabled`
|
|
27
|
+
* is `false` the hook does nothing at all.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* const { ref, isTruncated } = useIsTruncated(title);
|
|
31
|
+
* <ToolTip label={title} isDisabled={!isTruncated}>
|
|
32
|
+
* <Text ref={ref} noOfLines={1}>{title}</Text>
|
|
33
|
+
* </ToolTip>
|
|
34
|
+
*/
|
|
35
|
+
function useIsTruncated(content, enabled = true) {
|
|
36
|
+
const ref = (0, react_1.useRef)(null);
|
|
37
|
+
const [isTruncated, setIsTruncated] = (0, react_1.useState)(false);
|
|
38
|
+
const measure = (0, react_1.useCallback)(() => {
|
|
39
|
+
const el = ref.current;
|
|
40
|
+
if (!el)
|
|
41
|
+
return;
|
|
42
|
+
setIsTruncated(el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight);
|
|
43
|
+
}, []);
|
|
44
|
+
(0, react_1.useEffect)(() => {
|
|
45
|
+
if (!enabled)
|
|
46
|
+
return;
|
|
47
|
+
measure();
|
|
48
|
+
const el = ref.current;
|
|
49
|
+
if (!el || typeof ResizeObserver === "undefined")
|
|
50
|
+
return;
|
|
51
|
+
const observer = new ResizeObserver(measure);
|
|
52
|
+
observer.observe(el);
|
|
53
|
+
return () => observer.disconnect();
|
|
54
|
+
}, [measure, content, enabled]);
|
|
55
|
+
return { ref, isTruncated };
|
|
56
|
+
}
|
|
57
|
+
exports.default = useIsTruncated;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/** Assign a value to a callback ref or a ref object. */
|
|
3
|
+
export declare function setRef<T>(ref: React.Ref<T> | undefined, value: T | null): void;
|
|
4
|
+
/**
|
|
5
|
+
* Combine multiple refs into a single callback ref, so a value flows to all of
|
|
6
|
+
* them. Useful when cloning an element to attach an internal ref while
|
|
7
|
+
* preserving a ref the caller already set.
|
|
8
|
+
*/
|
|
9
|
+
export declare function mergeRefs<T>(...refs: Array<React.Ref<T> | undefined>): (value: T | null) => void;
|
|
10
|
+
export default mergeRefs;
|
|
11
|
+
//# sourceMappingURL=mergeRefs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeRefs.d.ts","sourceRoot":"","sources":["../../src/Utils/mergeRefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,wDAAwD;AACxD,wBAAgB,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,QAIvE;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EACzB,GAAG,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,GACvC,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAE3B;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setRef = setRef;
|
|
4
|
+
exports.mergeRefs = mergeRefs;
|
|
5
|
+
/** Assign a value to a callback ref or a ref object. */
|
|
6
|
+
function setRef(ref, value) {
|
|
7
|
+
if (typeof ref === "function")
|
|
8
|
+
ref(value);
|
|
9
|
+
else if (ref && typeof ref === "object")
|
|
10
|
+
ref.current = value;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Combine multiple refs into a single callback ref, so a value flows to all of
|
|
14
|
+
* them. Useful when cloning an element to attach an internal ref while
|
|
15
|
+
* preserving a ref the caller already set.
|
|
16
|
+
*/
|
|
17
|
+
function mergeRefs(...refs) {
|
|
18
|
+
return (value) => refs.forEach((r) => setRef(r, value));
|
|
19
|
+
}
|
|
20
|
+
exports.default = mergeRefs;
|
package/dist/index.d.ts
CHANGED
|
@@ -45,11 +45,13 @@ import TextInput from "./Components/Input/TextInput";
|
|
|
45
45
|
import Timeline from "./Components/Timeline/Timeline";
|
|
46
46
|
import Toaster, { useToaster } from "./Components/Toaster/Toaster";
|
|
47
47
|
import ToolTip from "./Components/ToolTip/ToolTip";
|
|
48
|
+
import OverflowToolTip from "./Components/ToolTip/OverflowToolTip";
|
|
48
49
|
import VerifyEmailOtp from "./Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp";
|
|
49
50
|
import TableToggle from "./Components/Toggle/TableToggle";
|
|
50
51
|
import withTheme from "./withTheme";
|
|
51
52
|
import { useCustomTheme } from "./Theme/useCustomTheme";
|
|
52
53
|
import { useSidebarPrefs } from "./Hooks/useSidebarPrefs";
|
|
54
|
+
import { useIsTruncated } from "./Hooks/useIsTruncated";
|
|
53
55
|
import { ThemesList } from "./Theme";
|
|
54
56
|
import { debounce } from "./Utils/table";
|
|
55
57
|
import ProductCard from "./Components/ProductCard/ProductCard";
|
|
@@ -78,7 +80,7 @@ import RolesPermission from "./Components/RolesPermission/RolesPermission";
|
|
|
78
80
|
import CustomModulesTable from "./Components/CustomModulesTable/CustomModulesTable";
|
|
79
81
|
import SignInActivityTable from "./Components/SignInActivityTable/SignInActivityTable";
|
|
80
82
|
import OrganizationDetails from "./Components/OrganizationDetails/OrganizationDetails";
|
|
81
|
-
export { Accordian, AlertDialog, ApexBarChart, ApexPieChart, ApexPolarChart, ApexLineChart, Breadcrumbs, Button, ButtonGroupIcon, Card, Checkbox, ContactForm, DatePicker, Drawer, DrawerHeader, DrawerBody, DrawerFooter, Dropdown, Editor, EmptyState, FieldSelectModal, FilePreview, FilePreviewTrigger, FileUpload, FileUploader, FilterSidebar, FormWrapper, LazyWrapper, MoreItems, PdfViewer, ScrollToTop, CopyButton, StageProgress, StageItem, OrgSwitcher, UpgradeButton, UserDetails, RolesPermission, CustomModulesTable, SignInActivityTable, OrganizationDetails, Header, HeaderActions, InputTextArea, InputSwitch, KanbanBoard, Loading, Modal, ModalHeader, ModalBody, ModalFooter, NavigationBar, Notification, NoteTextArea, MultiSelect, NumberInput, PaymentCard, PhoneNumberInput, PinInput, ProductCard, ProductDetails, ProfileCard, ProfileCardHeader, ProfileCardBody, ProfileCardFooter, ProfilePhotoViewer, ProgressBar, RadioButton, RadioButtonGroup, Reorder, Search, Select, SearchSelect, SelectSearch, SideBar, Slider, Skeletons, Switch, Table, TableToggle, Tag, TextInput, Timeline, Toaster, ToolTip, useToaster, VerifyEmailOtp, useSidebarPrefs, useCustomTheme, ThemesList, debounce, };
|
|
83
|
+
export { Accordian, AlertDialog, ApexBarChart, ApexPieChart, ApexPolarChart, ApexLineChart, Breadcrumbs, Button, ButtonGroupIcon, Card, Checkbox, ContactForm, DatePicker, Drawer, DrawerHeader, DrawerBody, DrawerFooter, Dropdown, Editor, EmptyState, FieldSelectModal, FilePreview, FilePreviewTrigger, FileUpload, FileUploader, FilterSidebar, FormWrapper, LazyWrapper, MoreItems, PdfViewer, ScrollToTop, CopyButton, StageProgress, StageItem, OrgSwitcher, UpgradeButton, UserDetails, RolesPermission, CustomModulesTable, SignInActivityTable, OrganizationDetails, Header, HeaderActions, InputTextArea, InputSwitch, KanbanBoard, Loading, Modal, ModalHeader, ModalBody, ModalFooter, NavigationBar, Notification, NoteTextArea, MultiSelect, NumberInput, PaymentCard, PhoneNumberInput, PinInput, ProductCard, ProductDetails, ProfileCard, ProfileCardHeader, ProfileCardBody, ProfileCardFooter, ProfilePhotoViewer, ProgressBar, RadioButton, RadioButtonGroup, Reorder, Search, Select, SearchSelect, SelectSearch, SideBar, Slider, Skeletons, Switch, Table, TableToggle, Tag, TextInput, Timeline, Toaster, ToolTip, OverflowToolTip, useToaster, VerifyEmailOtp, useSidebarPrefs, useIsTruncated, useCustomTheme, ThemesList, debounce, };
|
|
82
84
|
export default withTheme;
|
|
83
85
|
export type { UserDetailsProps, UserDetailsLabels, UserListItem, SelectedUserDetail, UserDetailRow, RoleOption, AddUserFormValues, ChangeRoleSubmitPayload, } from "./Components/UserDetails/UserDetailsProps";
|
|
84
86
|
export type { RolesPermissionProps, RolesPermissionLabels, RolesPermissionView, RolesPermissionMode, Permission, PermissionKey, RoleData, } from "./Components/RolesPermission/RolesPermissionProps";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,kCAAkC,CAAC;AACzD,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAC/D,OAAO,YAAY,MAAM,mDAAmD,CAAC;AAC7E,OAAO,YAAY,MAAM,mDAAmD,CAAC;AAC7E,OAAO,cAAc,MAAM,yDAAyD,CAAC;AACrF,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAC/D,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAChD,OAAO,eAAe,MAAM,8CAA8C,CAAC;AAC3E,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AACtD,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAE/D,OAAO,MAAM,EAAE,EACX,YAAY,EACZ,UAAU,EACV,YAAY,EACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AACtD,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAChD,OAAO,UAAU,MAAM,oCAAoC,CAAC;AAC5D,OAAO,YAAY,MAAM,wCAAwC,CAAC;AAClE,OAAO,WAAW,MAAM,+BAA+B,CAAC;AACxD,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAChD,OAAO,aAAa,MAAM,mCAAmC,CAAC;AAC9D,OAAO,aAAa,MAAM,0CAA0C,CAAC;AACrE,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAC/D,OAAO,OAAO,MAAM,8BAA8B,CAAC;AACnD,OAAO,KAAK,EAAE,EACV,WAAW,EACX,SAAS,EACT,WAAW,EAC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ACT,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,aAAa,EACb,WAAW,EACX,MAAM,EACN,eAAe,EACf,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,UAAU,EACV,MAAM,EACN,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,aAAa,EACb,WAAW,EACX,WAAW,EACX,SAAS,EACT,SAAS,EACT,WAAW,EACX,UAAU,EACV,aAAa,EACb,SAAS,EACT,WAAW,EACX,aAAa,EACb,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,MAAM,EACN,aAAa,EACb,aAAa,EACb,WAAW,EACX,WAAW,EACX,OAAO,EACP,KAAK,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,OAAO,EACP,MAAM,EACN,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,MAAM,EACN,SAAS,EACT,MAAM,EACN,KAAK,EACL,WAAW,EACX,GAAG,EACH,SAAS,EACT,QAAQ,EACR,OAAO,EACP,OAAO,EACP,UAAU,EACV,cAAc,EAEd,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,kCAAkC,CAAC;AACzD,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAC/D,OAAO,YAAY,MAAM,mDAAmD,CAAC;AAC7E,OAAO,YAAY,MAAM,mDAAmD,CAAC;AAC7E,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EACzB,gBAAgB,EAChB,mBAAmB,GACtB,MAAM,2DAA2D,CAAC;AAEnE,YAAY,EACR,YAAY,EACZ,sBAAsB,EACtB,qBAAqB,GACxB,MAAM,yBAAyB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -38,7 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
};
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
40
|
exports.ModalBody = exports.ModalHeader = exports.Modal = exports.Loading = exports.KanbanBoard = exports.InputSwitch = exports.InputTextArea = exports.HeaderActions = exports.Header = exports.OrganizationDetails = exports.SignInActivityTable = exports.CustomModulesTable = exports.RolesPermission = exports.UserDetails = exports.UpgradeButton = exports.OrgSwitcher = exports.StageItem = exports.StageProgress = exports.CopyButton = exports.ScrollToTop = exports.PdfViewer = exports.MoreItems = exports.LazyWrapper = exports.FormWrapper = exports.FilterSidebar = exports.FileUploader = exports.FileUpload = exports.FilePreviewTrigger = exports.FilePreview = exports.FieldSelectModal = exports.EmptyState = exports.Editor = exports.Dropdown = exports.DrawerFooter = exports.DrawerBody = exports.DrawerHeader = exports.Drawer = exports.DatePicker = exports.ContactForm = exports.Checkbox = exports.Card = exports.ButtonGroupIcon = exports.Button = exports.Breadcrumbs = exports.ApexLineChart = exports.ApexPolarChart = exports.ApexPieChart = exports.ApexBarChart = exports.AlertDialog = exports.Accordian = void 0;
|
|
41
|
-
exports.debounce = exports.ThemesList = exports.useCustomTheme = exports.useSidebarPrefs = exports.VerifyEmailOtp = exports.useToaster = exports.ToolTip = exports.Toaster = exports.Timeline = exports.TextInput = exports.Tag = exports.TableToggle = exports.Table = exports.Switch = exports.Skeletons = exports.Slider = exports.SideBar = exports.SelectSearch = exports.SearchSelect = exports.Select = exports.Search = exports.Reorder = exports.RadioButtonGroup = exports.RadioButton = exports.ProgressBar = exports.ProfilePhotoViewer = exports.ProfileCardFooter = exports.ProfileCardBody = exports.ProfileCardHeader = exports.ProfileCard = exports.ProductDetails = exports.ProductCard = exports.PinInput = exports.PhoneNumberInput = exports.PaymentCard = exports.NumberInput = exports.MultiSelect = exports.NoteTextArea = exports.Notification = exports.NavigationBar = exports.ModalFooter = void 0;
|
|
41
|
+
exports.debounce = exports.ThemesList = exports.useCustomTheme = exports.useIsTruncated = exports.useSidebarPrefs = exports.VerifyEmailOtp = exports.useToaster = exports.OverflowToolTip = exports.ToolTip = exports.Toaster = exports.Timeline = exports.TextInput = exports.Tag = exports.TableToggle = exports.Table = exports.Switch = exports.Skeletons = exports.Slider = exports.SideBar = exports.SelectSearch = exports.SearchSelect = exports.Select = exports.Search = exports.Reorder = exports.RadioButtonGroup = exports.RadioButton = exports.ProgressBar = exports.ProfilePhotoViewer = exports.ProfileCardFooter = exports.ProfileCardBody = exports.ProfileCardHeader = exports.ProfileCard = exports.ProductDetails = exports.ProductCard = exports.PinInput = exports.PhoneNumberInput = exports.PaymentCard = exports.NumberInput = exports.MultiSelect = exports.NoteTextArea = exports.Notification = exports.NavigationBar = exports.ModalFooter = void 0;
|
|
42
42
|
const Accordion_1 = __importDefault(require("./Components/Accordion/Accordion"));
|
|
43
43
|
exports.Accordian = Accordion_1.default;
|
|
44
44
|
const AlertDialog_1 = __importDefault(require("./Components/AlertDialog/AlertDialog"));
|
|
@@ -145,6 +145,8 @@ exports.Toaster = Toaster_1.default;
|
|
|
145
145
|
Object.defineProperty(exports, "useToaster", { enumerable: true, get: function () { return Toaster_1.useToaster; } });
|
|
146
146
|
const ToolTip_1 = __importDefault(require("./Components/ToolTip/ToolTip"));
|
|
147
147
|
exports.ToolTip = ToolTip_1.default;
|
|
148
|
+
const OverflowToolTip_1 = __importDefault(require("./Components/ToolTip/OverflowToolTip"));
|
|
149
|
+
exports.OverflowToolTip = OverflowToolTip_1.default;
|
|
148
150
|
const VerifyEmailOtp_1 = __importDefault(require("./Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp"));
|
|
149
151
|
exports.VerifyEmailOtp = VerifyEmailOtp_1.default;
|
|
150
152
|
const TableToggle_1 = __importDefault(require("./Components/Toggle/TableToggle"));
|
|
@@ -154,6 +156,8 @@ const useCustomTheme_1 = require("./Theme/useCustomTheme");
|
|
|
154
156
|
Object.defineProperty(exports, "useCustomTheme", { enumerable: true, get: function () { return useCustomTheme_1.useCustomTheme; } });
|
|
155
157
|
const useSidebarPrefs_1 = require("./Hooks/useSidebarPrefs");
|
|
156
158
|
Object.defineProperty(exports, "useSidebarPrefs", { enumerable: true, get: function () { return useSidebarPrefs_1.useSidebarPrefs; } });
|
|
159
|
+
const useIsTruncated_1 = require("./Hooks/useIsTruncated");
|
|
160
|
+
Object.defineProperty(exports, "useIsTruncated", { enumerable: true, get: function () { return useIsTruncated_1.useIsTruncated; } });
|
|
157
161
|
const Theme_1 = require("./Theme");
|
|
158
162
|
Object.defineProperty(exports, "ThemesList", { enumerable: true, get: function () { return Theme_1.ThemesList; } });
|
|
159
163
|
const table_1 = require("./Utils/table");
|