@helpwave/hightide 0.1.23 → 0.1.25
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/components/date/DatePicker.js +48 -53
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/DatePicker.mjs +58 -63
- package/dist/components/date/DatePicker.mjs.map +1 -1
- package/dist/components/date/DayPicker.js.map +1 -1
- package/dist/components/date/DayPicker.mjs +4 -4
- package/dist/components/date/DayPicker.mjs.map +1 -1
- package/dist/components/date/TimeDisplay.js.map +1 -1
- package/dist/components/date/TimeDisplay.mjs +2 -2
- package/dist/components/date/TimeDisplay.mjs.map +1 -1
- package/dist/components/date/YearMonthPicker.js +26 -29
- package/dist/components/date/YearMonthPicker.js.map +1 -1
- package/dist/components/date/YearMonthPicker.mjs +31 -34
- package/dist/components/date/YearMonthPicker.mjs.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.js +40 -43
- package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.mjs +48 -51
- package/dist/components/dialogs/ConfirmDialog.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Carousel.js +40 -43
- package/dist/components/layout-and-navigation/Carousel.js.map +1 -1
- package/dist/components/layout-and-navigation/Carousel.mjs +40 -43
- package/dist/components/layout-and-navigation/Carousel.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.js +40 -43
- package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.mjs +46 -49
- package/dist/components/layout-and-navigation/Overlay.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.js +40 -43
- package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.mjs +50 -53
- package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.js +40 -43
- package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.mjs +50 -53
- package/dist/components/layout-and-navigation/SearchableList.mjs.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.js +26 -29
- package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.mjs +30 -33
- package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.mjs +2 -2
- package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
- package/dist/components/loading-states/ErrorComponent.js.map +1 -1
- package/dist/components/loading-states/ErrorComponent.mjs +2 -2
- package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.mjs +2 -2
- package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
- package/dist/components/loading-states/LoadingButton.js +26 -29
- package/dist/components/loading-states/LoadingButton.js.map +1 -1
- package/dist/components/loading-states/LoadingButton.mjs +26 -29
- package/dist/components/loading-states/LoadingButton.mjs.map +1 -1
- package/dist/components/modals/ConfirmModal.js +40 -43
- package/dist/components/modals/ConfirmModal.js.map +1 -1
- package/dist/components/modals/ConfirmModal.mjs +48 -51
- package/dist/components/modals/ConfirmModal.mjs.map +1 -1
- package/dist/components/modals/DiscardChangesModal.js +40 -43
- package/dist/components/modals/DiscardChangesModal.js.map +1 -1
- package/dist/components/modals/DiscardChangesModal.mjs +48 -51
- package/dist/components/modals/DiscardChangesModal.mjs.map +1 -1
- package/dist/components/modals/InputModal.js +40 -43
- package/dist/components/modals/InputModal.js.map +1 -1
- package/dist/components/modals/InputModal.mjs +48 -51
- package/dist/components/modals/InputModal.mjs.map +1 -1
- package/dist/components/modals/LanguageModal.js +43 -49
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.mjs +67 -73
- package/dist/components/modals/LanguageModal.mjs.map +1 -1
- package/dist/components/modals/ThemeModal.js +43 -49
- package/dist/components/modals/ThemeModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.mjs +68 -74
- package/dist/components/modals/ThemeModal.mjs.map +1 -1
- package/dist/components/properties/CheckboxProperty.js +96 -75
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/CheckboxProperty.mjs +98 -77
- package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
- package/dist/components/properties/DateProperty.js +48 -53
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.mjs +50 -55
- package/dist/components/properties/DateProperty.mjs.map +1 -1
- package/dist/components/properties/MultiSelectProperty.js +114 -93
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +135 -114
- package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
- package/dist/components/properties/NumberProperty.js +48 -53
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.mjs +50 -55
- package/dist/components/properties/NumberProperty.mjs.map +1 -1
- package/dist/components/properties/PropertyBase.js +48 -53
- package/dist/components/properties/PropertyBase.js.map +1 -1
- package/dist/components/properties/PropertyBase.mjs +50 -55
- package/dist/components/properties/PropertyBase.mjs.map +1 -1
- package/dist/components/properties/SelectProperty.js +65 -73
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +86 -94
- package/dist/components/properties/SelectProperty.mjs.map +1 -1
- package/dist/components/properties/TextProperty.js +51 -56
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.mjs +57 -62
- package/dist/components/properties/TextProperty.mjs.map +1 -1
- package/dist/components/table/Table.js +88 -65
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/Table.mjs +114 -91
- package/dist/components/table/Table.mjs.map +1 -1
- package/dist/components/table/TableFilterButton.js +40 -43
- package/dist/components/table/TableFilterButton.js.map +1 -1
- package/dist/components/table/TableFilterButton.mjs +44 -47
- package/dist/components/table/TableFilterButton.mjs.map +1 -1
- package/dist/components/table/TableSortButton.js +40 -43
- package/dist/components/table/TableSortButton.js.map +1 -1
- package/dist/components/table/TableSortButton.mjs +40 -43
- package/dist/components/table/TableSortButton.mjs.map +1 -1
- package/dist/components/user-action/Button.d.mts +3 -3
- package/dist/components/user-action/Button.d.ts +3 -3
- package/dist/components/user-action/Button.js +76 -84
- package/dist/components/user-action/Button.js.map +1 -1
- package/dist/components/user-action/Button.mjs +76 -84
- package/dist/components/user-action/Button.mjs.map +1 -1
- package/dist/components/user-action/Checkbox.js +48 -22
- package/dist/components/user-action/Checkbox.js.map +1 -1
- package/dist/components/user-action/Checkbox.mjs +48 -22
- package/dist/components/user-action/Checkbox.mjs.map +1 -1
- package/dist/components/user-action/CopyToClipboardWrapper.js.map +1 -1
- package/dist/components/user-action/CopyToClipboardWrapper.mjs +2 -2
- package/dist/components/user-action/CopyToClipboardWrapper.mjs.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.js +48 -53
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.mjs +60 -65
- package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
- package/dist/components/user-action/MultiSelect.js +92 -69
- package/dist/components/user-action/MultiSelect.js.map +1 -1
- package/dist/components/user-action/MultiSelect.mjs +114 -91
- package/dist/components/user-action/MultiSelect.mjs.map +1 -1
- package/dist/components/user-action/SearchBar.js +40 -43
- package/dist/components/user-action/SearchBar.js.map +1 -1
- package/dist/components/user-action/SearchBar.mjs +42 -45
- package/dist/components/user-action/SearchBar.mjs.map +1 -1
- package/dist/components/user-action/Select.js +43 -49
- package/dist/components/user-action/Select.js.map +1 -1
- package/dist/components/user-action/Select.mjs +49 -55
- package/dist/components/user-action/Select.mjs.map +1 -1
- package/dist/components/user-action/Textarea.js +3 -3
- package/dist/components/user-action/Textarea.js.map +1 -1
- package/dist/components/user-action/Textarea.mjs +3 -3
- package/dist/components/user-action/Textarea.mjs.map +1 -1
- package/dist/css/globals.css +269 -136
- package/dist/css/uncompiled/theme/index.css +1 -2
- package/dist/hooks/useLocalStorage.js +1 -3
- package/dist/hooks/useLocalStorage.js.map +1 -1
- package/dist/hooks/useLocalStorage.mjs +3 -4
- package/dist/hooks/useLocalStorage.mjs.map +1 -1
- package/dist/index.js +141 -129
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +216 -204
- package/dist/index.mjs.map +1 -1
- package/dist/localization/LanguageProvider.js +0 -3
- package/dist/localization/LanguageProvider.js.map +1 -1
- package/dist/localization/LanguageProvider.mjs +5 -8
- package/dist/localization/LanguageProvider.mjs.map +1 -1
- package/dist/localization/useTranslation.js.map +1 -1
- package/dist/localization/useTranslation.mjs +2 -2
- package/dist/localization/useTranslation.mjs.map +1 -1
- package/dist/theming/useTheme.js +3 -6
- package/dist/theming/useTheme.js.map +1 -1
- package/dist/theming/useTheme.mjs +8 -11
- package/dist/theming/useTheme.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/css/uncompiled/theme/theme.css +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// src/components/table/Table.tsx
|
|
2
|
-
import { useCallback as useCallback3, useEffect as
|
|
2
|
+
import { useCallback as useCallback3, useEffect as useEffect11, useMemo, useRef as useRef3, useState as useState10 } from "react";
|
|
3
3
|
|
|
4
4
|
// src/components/layout-and-navigation/Pagination.tsx
|
|
5
5
|
import { ChevronFirst, ChevronLast, ChevronLeft, ChevronRight } from "lucide-react";
|
|
6
6
|
import clsx4 from "clsx";
|
|
7
7
|
|
|
8
8
|
// src/localization/LanguageProvider.tsx
|
|
9
|
-
import { createContext, useContext, useEffect
|
|
9
|
+
import { createContext, useContext, useEffect, useState as useState2 } from "react";
|
|
10
10
|
|
|
11
11
|
// src/hooks/useLocalStorage.ts
|
|
12
|
-
import { useCallback,
|
|
12
|
+
import { useCallback, useState } from "react";
|
|
13
13
|
|
|
14
14
|
// src/localization/util.ts
|
|
15
15
|
var languages = ["en", "de"];
|
|
@@ -209,11 +209,11 @@ var formTranslation = {
|
|
|
209
209
|
};
|
|
210
210
|
|
|
211
211
|
// src/components/user-action/Input.tsx
|
|
212
|
-
import { forwardRef, useEffect as
|
|
212
|
+
import { forwardRef, useEffect as useEffect4, useImperativeHandle, useRef, useState as useState4 } from "react";
|
|
213
213
|
import clsx2 from "clsx";
|
|
214
214
|
|
|
215
215
|
// src/hooks/useDelay.ts
|
|
216
|
-
import { useEffect as
|
|
216
|
+
import { useEffect as useEffect2, useState as useState3 } from "react";
|
|
217
217
|
var defaultOptions = {
|
|
218
218
|
delay: 3e3,
|
|
219
219
|
disabled: false
|
|
@@ -238,12 +238,12 @@ function useDelay(options) {
|
|
|
238
238
|
setTimer(void 0);
|
|
239
239
|
}, delay));
|
|
240
240
|
};
|
|
241
|
-
|
|
241
|
+
useEffect2(() => {
|
|
242
242
|
return () => {
|
|
243
243
|
clearTimeout(timer);
|
|
244
244
|
};
|
|
245
245
|
}, [timer]);
|
|
246
|
-
|
|
246
|
+
useEffect2(() => {
|
|
247
247
|
if (disabled) {
|
|
248
248
|
clearTimeout(timer);
|
|
249
249
|
setTimer(void 0);
|
|
@@ -331,10 +331,10 @@ function useFocusManagement() {
|
|
|
331
331
|
}
|
|
332
332
|
|
|
333
333
|
// src/hooks/useFocusOnceVisible.ts
|
|
334
|
-
import React, { useEffect as
|
|
334
|
+
import React, { useEffect as useEffect3 } from "react";
|
|
335
335
|
var useFocusOnceVisible = (ref, disable = false) => {
|
|
336
336
|
const [hasUsedFocus, setHasUsedFocus] = React.useState(false);
|
|
337
|
-
|
|
337
|
+
useEffect3(() => {
|
|
338
338
|
if (disable || hasUsedFocus) {
|
|
339
339
|
return;
|
|
340
340
|
}
|
|
@@ -486,7 +486,7 @@ var clamp = (value, min = 0, max = 1) => {
|
|
|
486
486
|
};
|
|
487
487
|
|
|
488
488
|
// src/components/layout-and-navigation/Pagination.tsx
|
|
489
|
-
import { useEffect as
|
|
489
|
+
import { useEffect as useEffect5, useState as useState5 } from "react";
|
|
490
490
|
|
|
491
491
|
// src/components/user-action/Button.tsx
|
|
492
492
|
import { forwardRef as forwardRef2 } from "react";
|
|
@@ -517,7 +517,6 @@ var ButtonUtil = {
|
|
|
517
517
|
};
|
|
518
518
|
var SolidButton = forwardRef2(function SolidButton2({
|
|
519
519
|
children,
|
|
520
|
-
disabled = false,
|
|
521
520
|
color = "primary",
|
|
522
521
|
size = "medium",
|
|
523
522
|
startIcon,
|
|
@@ -527,35 +526,33 @@ var SolidButton = forwardRef2(function SolidButton2({
|
|
|
527
526
|
...restProps
|
|
528
527
|
}, ref) {
|
|
529
528
|
const colorClasses = {
|
|
530
|
-
primary: "bg-button-solid-primary-background text-button-solid-primary-text",
|
|
531
|
-
secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
|
|
532
|
-
tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
|
|
533
|
-
positive: "bg-button-solid-positive-background text-button-solid-positive-text",
|
|
534
|
-
warning: "bg-button-solid-warning-background text-button-solid-warning-text",
|
|
535
|
-
negative: "bg-button-solid-negative-background text-button-solid-negative-text",
|
|
536
|
-
neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text"
|
|
529
|
+
primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
|
|
530
|
+
secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
|
|
531
|
+
tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
|
|
532
|
+
positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
|
|
533
|
+
warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
|
|
534
|
+
negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
|
|
535
|
+
neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text"
|
|
537
536
|
}[color];
|
|
538
537
|
const iconColorClasses = {
|
|
539
|
-
primary: "text-button-solid-primary-icon",
|
|
540
|
-
secondary: "text-button-solid-secondary-icon",
|
|
541
|
-
tertiary: "text-button-solid-tertiary-icon",
|
|
542
|
-
positive: "text-button-solid-positive-icon",
|
|
543
|
-
warning: "text-button-solid-warning-icon",
|
|
544
|
-
negative: "text-button-solid-negative-icon",
|
|
545
|
-
neutral: "text-button-solid-neutral-icon"
|
|
538
|
+
primary: "not-group-disabled:text-button-solid-primary-icon",
|
|
539
|
+
secondary: "not-group-disabled:text-button-solid-secondary-icon",
|
|
540
|
+
tertiary: "not-group-disabled:text-button-solid-tertiary-icon",
|
|
541
|
+
positive: "not-group-disabled:text-button-solid-positive-icon",
|
|
542
|
+
warning: "not-group-disabled:text-button-solid-warning-icon",
|
|
543
|
+
negative: "not-group-disabled:text-button-solid-negative-icon",
|
|
544
|
+
neutral: "not-group-disabled:text-button-solid-neutral-icon"
|
|
546
545
|
}[color];
|
|
547
546
|
return /* @__PURE__ */ jsxs2(
|
|
548
547
|
"button",
|
|
549
548
|
{
|
|
550
549
|
ref,
|
|
551
550
|
onClick,
|
|
552
|
-
disabled,
|
|
553
551
|
className: clsx3(
|
|
554
|
-
"font-semibold",
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
},
|
|
552
|
+
"group font-semibold",
|
|
553
|
+
colorClasses,
|
|
554
|
+
"not-disabled:hover:brightness-90",
|
|
555
|
+
"disabled:text-disabled-text disabled:bg-disabled-background",
|
|
559
556
|
ButtonUtil.paddingMapping[size],
|
|
560
557
|
className
|
|
561
558
|
),
|
|
@@ -564,10 +561,10 @@ var SolidButton = forwardRef2(function SolidButton2({
|
|
|
564
561
|
startIcon && /* @__PURE__ */ jsx4(
|
|
565
562
|
"span",
|
|
566
563
|
{
|
|
567
|
-
className: clsx3(
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
564
|
+
className: clsx3(
|
|
565
|
+
iconColorClasses,
|
|
566
|
+
"group-disabled:text-disabled-icon"
|
|
567
|
+
),
|
|
571
568
|
children: startIcon
|
|
572
569
|
}
|
|
573
570
|
),
|
|
@@ -575,10 +572,10 @@ var SolidButton = forwardRef2(function SolidButton2({
|
|
|
575
572
|
endIcon && /* @__PURE__ */ jsx4(
|
|
576
573
|
"span",
|
|
577
574
|
{
|
|
578
|
-
className: clsx3(
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
575
|
+
className: clsx3(
|
|
576
|
+
iconColorClasses,
|
|
577
|
+
"group-disabled:text-disabled-icon"
|
|
578
|
+
),
|
|
582
579
|
children: endIcon
|
|
583
580
|
}
|
|
584
581
|
)
|
|
@@ -588,32 +585,32 @@ var SolidButton = forwardRef2(function SolidButton2({
|
|
|
588
585
|
});
|
|
589
586
|
var IconButton = ({
|
|
590
587
|
children,
|
|
591
|
-
disabled = false,
|
|
592
588
|
color = "primary",
|
|
593
589
|
size = "medium",
|
|
594
590
|
className,
|
|
595
591
|
...restProps
|
|
596
592
|
}) => {
|
|
597
593
|
const colorClasses = {
|
|
598
|
-
primary: "bg-button-solid-primary-background text-button-solid-primary-text",
|
|
599
|
-
secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
|
|
600
|
-
tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
|
|
601
|
-
positive: "bg-button-solid-positive-background text-button-solid-positive-text",
|
|
602
|
-
warning: "bg-button-solid-warning-background text-button-solid-warning-text",
|
|
603
|
-
negative: "bg-button-solid-negative-background text-button-solid-negative-text",
|
|
604
|
-
neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text",
|
|
605
|
-
transparent: "bg-transparent"
|
|
594
|
+
primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
|
|
595
|
+
secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
|
|
596
|
+
tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
|
|
597
|
+
positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
|
|
598
|
+
warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
|
|
599
|
+
negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
|
|
600
|
+
neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text",
|
|
601
|
+
transparent: "not-disabled:bg-transparent"
|
|
606
602
|
}[color];
|
|
607
603
|
return /* @__PURE__ */ jsx4(
|
|
608
604
|
"button",
|
|
609
605
|
{
|
|
610
|
-
disabled,
|
|
611
606
|
className: clsx3(
|
|
607
|
+
colorClasses,
|
|
608
|
+
"not-disabled:hover:brightness-90",
|
|
609
|
+
"disabled:text-disabled-text",
|
|
612
610
|
{
|
|
613
|
-
"
|
|
614
|
-
"
|
|
615
|
-
"hover:bg-button-text-hover-background":
|
|
616
|
-
[clsx3(colorClasses, "hover:brightness-90")]: !disabled
|
|
611
|
+
"disabled:bg-disabled-background": color !== "transparent",
|
|
612
|
+
"disabled:opacity-70": color === "transparent",
|
|
613
|
+
"not-disabled:hover:bg-button-text-hover-background": color === "transparent"
|
|
617
614
|
},
|
|
618
615
|
ButtonUtil.iconPaddingMapping[size],
|
|
619
616
|
className
|
|
@@ -639,7 +636,7 @@ var Pagination = ({
|
|
|
639
636
|
const noPages = pageCount === 0;
|
|
640
637
|
const onFirstPage = pageIndex === 0 && !noPages;
|
|
641
638
|
const onLastPage = pageIndex === pageCount - 1;
|
|
642
|
-
|
|
639
|
+
useEffect5(() => {
|
|
643
640
|
if (noPages) {
|
|
644
641
|
setValue("0");
|
|
645
642
|
} else {
|
|
@@ -776,44 +773,70 @@ var Checkbox = ({
|
|
|
776
773
|
}
|
|
777
774
|
};
|
|
778
775
|
const changeValue = () => {
|
|
776
|
+
if (disabled) {
|
|
777
|
+
return;
|
|
778
|
+
}
|
|
779
779
|
const newValue = checked === "indeterminate" ? false : !checked;
|
|
780
780
|
propagateChange(newValue);
|
|
781
781
|
};
|
|
782
|
-
return /* @__PURE__ */ jsxs4(
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
{
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
782
|
+
return /* @__PURE__ */ jsxs4(
|
|
783
|
+
"div",
|
|
784
|
+
{
|
|
785
|
+
className: clsx5("group flex-row-2 items-center", {
|
|
786
|
+
"cursor-pointer": !disabled,
|
|
787
|
+
"cursor-not-allowed": disabled
|
|
788
|
+
}, containerClassName),
|
|
789
|
+
onClick: changeValue,
|
|
790
|
+
children: [
|
|
791
|
+
/* @__PURE__ */ jsx6(
|
|
792
|
+
CheckboxPrimitive.Root,
|
|
793
|
+
{
|
|
794
|
+
onCheckedChange: propagateChange,
|
|
795
|
+
checked,
|
|
796
|
+
disabled,
|
|
797
|
+
id,
|
|
798
|
+
className: clsx5(usedSizeClass, `items-center border-2 rounded outline-none `, {
|
|
799
|
+
"text-disabled-text border-disabled-outline bg-disabled-background cursor-not-allowed": disabled,
|
|
800
|
+
"focus:border-primary group-hover:border-primary ": !disabled,
|
|
801
|
+
"bg-input-background": !disabled && !checked,
|
|
802
|
+
"bg-primary/30 border-primary text-primary": !disabled && checked === true || checked === "indeterminate"
|
|
803
|
+
}, className),
|
|
804
|
+
children: /* @__PURE__ */ jsxs4(CheckboxPrimitive.Indicator, { children: [
|
|
805
|
+
checked === true && /* @__PURE__ */ jsx6(Check, { className: innerIconSize }),
|
|
806
|
+
checked === "indeterminate" && /* @__PURE__ */ jsx6(Minus, { className: innerIconSize })
|
|
807
|
+
] })
|
|
808
|
+
}
|
|
809
|
+
),
|
|
810
|
+
label && /* @__PURE__ */ jsx6(
|
|
811
|
+
Label,
|
|
812
|
+
{
|
|
813
|
+
...label,
|
|
814
|
+
className: clsx5(
|
|
815
|
+
label.className,
|
|
816
|
+
{
|
|
817
|
+
"cursor-pointer": !disabled,
|
|
818
|
+
"cursor-not-allowed": disabled
|
|
819
|
+
}
|
|
820
|
+
),
|
|
821
|
+
htmlFor: id
|
|
822
|
+
}
|
|
823
|
+
)
|
|
824
|
+
]
|
|
825
|
+
}
|
|
826
|
+
);
|
|
804
827
|
};
|
|
805
828
|
|
|
806
829
|
// src/components/table/TableFilterButton.tsx
|
|
807
830
|
import { FilterIcon } from "lucide-react";
|
|
808
831
|
|
|
809
832
|
// src/components/user-action/Menu.tsx
|
|
810
|
-
import { useEffect as
|
|
833
|
+
import { useEffect as useEffect8, useRef as useRef2, useState as useState8 } from "react";
|
|
811
834
|
import clsx6 from "clsx";
|
|
812
835
|
|
|
813
836
|
// src/hooks/useOutsideClick.ts
|
|
814
|
-
import { useEffect as
|
|
837
|
+
import { useEffect as useEffect6 } from "react";
|
|
815
838
|
var useOutsideClick = (refs, handler) => {
|
|
816
|
-
|
|
839
|
+
useEffect6(() => {
|
|
817
840
|
const listener = (event) => {
|
|
818
841
|
if (event.target === null) return;
|
|
819
842
|
if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
|
|
@@ -831,7 +854,7 @@ var useOutsideClick = (refs, handler) => {
|
|
|
831
854
|
};
|
|
832
855
|
|
|
833
856
|
// src/hooks/useHoverState.ts
|
|
834
|
-
import { useEffect as
|
|
857
|
+
import { useEffect as useEffect7, useState as useState7 } from "react";
|
|
835
858
|
var defaultUseHoverStateProps = {
|
|
836
859
|
closingDelay: 200,
|
|
837
860
|
isDisabled: false
|
|
@@ -855,14 +878,14 @@ var useHoverState = (props = void 0) => {
|
|
|
855
878
|
setIsHovered(false);
|
|
856
879
|
}, closingDelay));
|
|
857
880
|
};
|
|
858
|
-
|
|
881
|
+
useEffect7(() => {
|
|
859
882
|
if (timer) {
|
|
860
883
|
return () => {
|
|
861
884
|
clearTimeout(timer);
|
|
862
885
|
};
|
|
863
886
|
}
|
|
864
887
|
});
|
|
865
|
-
|
|
888
|
+
useEffect7(() => {
|
|
866
889
|
if (timer) {
|
|
867
890
|
clearTimeout(timer);
|
|
868
891
|
}
|
|
@@ -975,7 +998,7 @@ var Menu = ({
|
|
|
975
998
|
triggerRef.current?.getBoundingClientRect(),
|
|
976
999
|
{ verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
|
|
977
1000
|
);
|
|
978
|
-
|
|
1001
|
+
useEffect8(() => {
|
|
979
1002
|
if (!isOpen) return;
|
|
980
1003
|
const triggerEl = triggerRef.current;
|
|
981
1004
|
if (!triggerEl) return;
|
|
@@ -992,7 +1015,7 @@ var Menu = ({
|
|
|
992
1015
|
window.removeEventListener("resize", close);
|
|
993
1016
|
};
|
|
994
1017
|
}, [isOpen, setIsOpen]);
|
|
995
|
-
|
|
1018
|
+
useEffect8(() => {
|
|
996
1019
|
if (isOpen) {
|
|
997
1020
|
setIsHidden(false);
|
|
998
1021
|
}
|
|
@@ -1028,7 +1051,7 @@ var Menu = ({
|
|
|
1028
1051
|
};
|
|
1029
1052
|
|
|
1030
1053
|
// src/components/table/TableFilterButton.tsx
|
|
1031
|
-
import { useEffect as
|
|
1054
|
+
import { useEffect as useEffect9, useState as useState9 } from "react";
|
|
1032
1055
|
import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1033
1056
|
var defaultTableFilterTranslation = {
|
|
1034
1057
|
en: {
|
|
@@ -1056,7 +1079,7 @@ var TableFilterButton = ({
|
|
|
1056
1079
|
const columnFilterValue = column.getFilterValue();
|
|
1057
1080
|
const [filterValue, setFilterValue] = useState9(columnFilterValue);
|
|
1058
1081
|
const hasFilter = !!filterValue;
|
|
1059
|
-
|
|
1082
|
+
useEffect9(() => {
|
|
1060
1083
|
setFilterValue(columnFilterValue);
|
|
1061
1084
|
}, [columnFilterValue]);
|
|
1062
1085
|
return /* @__PURE__ */ jsx8(
|
|
@@ -1211,9 +1234,9 @@ var TableFilters = {
|
|
|
1211
1234
|
};
|
|
1212
1235
|
|
|
1213
1236
|
// src/hooks/useResizeCallbackWrapper.ts
|
|
1214
|
-
import { useEffect as
|
|
1237
|
+
import { useEffect as useEffect10 } from "react";
|
|
1215
1238
|
var useResizeCallbackWrapper = (callback) => {
|
|
1216
|
-
|
|
1239
|
+
useEffect10(() => {
|
|
1217
1240
|
window.addEventListener("resize", callback);
|
|
1218
1241
|
return () => {
|
|
1219
1242
|
window.removeEventListener("resize", callback);
|
|
@@ -1400,7 +1423,7 @@ var Table = ({
|
|
|
1400
1423
|
...tableOptions
|
|
1401
1424
|
});
|
|
1402
1425
|
const [hasInitializedSizing, setHasInitializedSizing] = useState10(false);
|
|
1403
|
-
|
|
1426
|
+
useEffect11(() => {
|
|
1404
1427
|
if (!hasInitializedSizing && ref.current) {
|
|
1405
1428
|
setHasInitializedSizing(true);
|
|
1406
1429
|
table.setColumnSizing(updateColumnSizes(columnSizing));
|
|
@@ -1410,7 +1433,7 @@ var Table = ({
|
|
|
1410
1433
|
table.setColumnSizing(updateColumnSizes);
|
|
1411
1434
|
}, [updateColumnSizes]));
|
|
1412
1435
|
const pageCount = table.getPageCount();
|
|
1413
|
-
|
|
1436
|
+
useEffect11(() => {
|
|
1414
1437
|
const totalPages = pageCount;
|
|
1415
1438
|
if (totalPages === 0) {
|
|
1416
1439
|
if (pagination.pageIndex !== 0) {
|
|
@@ -1542,7 +1565,7 @@ var Table = ({
|
|
|
1542
1565
|
};
|
|
1543
1566
|
var TableUncontrolled = ({ data, ...props }) => {
|
|
1544
1567
|
const [usedDate, setUsedData] = useState10(data);
|
|
1545
|
-
|
|
1568
|
+
useEffect11(() => {
|
|
1546
1569
|
setUsedData(data);
|
|
1547
1570
|
}, [data]);
|
|
1548
1571
|
return /* @__PURE__ */ jsx12(
|