@helpwave/hightide 0.1.15 → 0.1.17
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/dialogs/ConfirmDialog.js +10 -0
- package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.mjs +10 -0
- package/dist/components/dialogs/ConfirmDialog.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.js +10 -0
- package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.mjs +10 -0
- package/dist/components/layout-and-navigation/Overlay.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.js +18 -4
- package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.mjs +18 -4
- package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.js +18 -4
- package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.mjs +18 -4
- package/dist/components/layout-and-navigation/SearchableList.mjs.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.js +10 -0
- package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.mjs +10 -0
- package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.js +10 -0
- package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.mjs +10 -0
- package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.js +10 -0
- package/dist/components/loading-states/LoadingAndErrorComponent.js.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs +10 -0
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.js +10 -0
- package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.mjs +10 -0
- package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
- package/dist/components/modals/ConfirmModal.js +10 -0
- package/dist/components/modals/ConfirmModal.js.map +1 -1
- package/dist/components/modals/ConfirmModal.mjs +10 -0
- package/dist/components/modals/ConfirmModal.mjs.map +1 -1
- package/dist/components/modals/DiscardChangesModal.js +10 -0
- package/dist/components/modals/DiscardChangesModal.js.map +1 -1
- package/dist/components/modals/DiscardChangesModal.mjs +10 -0
- package/dist/components/modals/DiscardChangesModal.mjs.map +1 -1
- package/dist/components/modals/InputModal.js +18 -4
- package/dist/components/modals/InputModal.js.map +1 -1
- package/dist/components/modals/InputModal.mjs +18 -4
- package/dist/components/modals/InputModal.mjs.map +1 -1
- package/dist/components/modals/LanguageModal.js +18 -4
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.mjs +18 -4
- package/dist/components/modals/LanguageModal.mjs.map +1 -1
- package/dist/components/modals/ThemeModal.js +18 -4
- package/dist/components/modals/ThemeModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.mjs +18 -4
- package/dist/components/modals/ThemeModal.mjs.map +1 -1
- package/dist/components/properties/CheckboxProperty.js +10 -0
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/CheckboxProperty.mjs +10 -0
- package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
- package/dist/components/properties/DateProperty.js +18 -4
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.mjs +18 -4
- package/dist/components/properties/DateProperty.mjs.map +1 -1
- package/dist/components/properties/MultiSelectProperty.js +18 -4
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +18 -4
- package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
- package/dist/components/properties/NumberProperty.js +18 -4
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.mjs +18 -4
- package/dist/components/properties/NumberProperty.mjs.map +1 -1
- package/dist/components/properties/PropertyBase.js +10 -0
- package/dist/components/properties/PropertyBase.js.map +1 -1
- package/dist/components/properties/PropertyBase.mjs +10 -0
- package/dist/components/properties/PropertyBase.mjs.map +1 -1
- package/dist/components/properties/SelectProperty.js +18 -4
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +18 -4
- package/dist/components/properties/SelectProperty.mjs.map +1 -1
- package/dist/components/properties/TextProperty.js +18 -4
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.mjs +18 -4
- package/dist/components/properties/TextProperty.mjs.map +1 -1
- package/dist/components/table/Table.d.mts +2 -1
- package/dist/components/table/Table.d.ts +2 -1
- package/dist/components/table/Table.js +27 -7
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/Table.mjs +27 -7
- package/dist/components/table/Table.mjs.map +1 -1
- package/dist/components/table/TableFilterButton.js +18 -4
- package/dist/components/table/TableFilterButton.js.map +1 -1
- package/dist/components/table/TableFilterButton.mjs +18 -4
- package/dist/components/table/TableFilterButton.mjs.map +1 -1
- package/dist/components/user-action/CopyToClipboardWrapper.d.mts +30 -0
- package/dist/components/user-action/CopyToClipboardWrapper.d.ts +30 -0
- package/dist/components/user-action/CopyToClipboardWrapper.js +324 -0
- package/dist/components/user-action/CopyToClipboardWrapper.js.map +1 -0
- package/dist/components/user-action/CopyToClipboardWrapper.mjs +300 -0
- package/dist/components/user-action/CopyToClipboardWrapper.mjs.map +1 -0
- package/dist/components/user-action/DateAndTimePicker.js +10 -0
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.mjs +10 -0
- package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
- package/dist/components/user-action/Input.js +8 -4
- package/dist/components/user-action/Input.js.map +1 -1
- package/dist/components/user-action/Input.mjs +8 -4
- package/dist/components/user-action/Input.mjs.map +1 -1
- package/dist/components/user-action/MultiSelect.js +18 -4
- package/dist/components/user-action/MultiSelect.js.map +1 -1
- package/dist/components/user-action/MultiSelect.mjs +18 -4
- package/dist/components/user-action/MultiSelect.mjs.map +1 -1
- package/dist/components/user-action/Select.js +18 -4
- package/dist/components/user-action/Select.js.map +1 -1
- package/dist/components/user-action/Select.mjs +18 -4
- package/dist/components/user-action/Select.mjs.map +1 -1
- package/dist/components/user-action/Textarea.js +8 -4
- package/dist/components/user-action/Textarea.js.map +1 -1
- package/dist/components/user-action/Textarea.mjs +8 -4
- package/dist/components/user-action/Textarea.mjs.map +1 -1
- package/dist/components/user-action/ToggleableInput.js +8 -4
- package/dist/components/user-action/ToggleableInput.js.map +1 -1
- package/dist/components/user-action/ToggleableInput.mjs +8 -4
- package/dist/components/user-action/ToggleableInput.mjs.map +1 -1
- package/dist/components/user-action/Tooltip.d.mts +1 -1
- package/dist/components/user-action/Tooltip.d.ts +1 -1
- package/dist/components/user-action/Tooltip.js.map +1 -1
- package/dist/components/user-action/Tooltip.mjs.map +1 -1
- package/dist/css/globals.css +18 -21
- package/dist/css/uncompiled/utitlity/animation.css +4 -28
- package/dist/hooks/useDelay.d.mts +1 -0
- package/dist/hooks/useDelay.d.ts +1 -0
- package/dist/hooks/useDelay.js +8 -4
- package/dist/hooks/useDelay.js.map +1 -1
- package/dist/hooks/useDelay.mjs +8 -4
- package/dist/hooks/useDelay.mjs.map +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +176 -54
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +163 -43
- package/dist/index.mjs.map +1 -1
- package/dist/localization/defaults/form.d.mts +5 -0
- package/dist/localization/defaults/form.d.ts +5 -0
- package/dist/localization/defaults/form.js +10 -0
- package/dist/localization/defaults/form.js.map +1 -1
- package/dist/localization/defaults/form.mjs +10 -0
- package/dist/localization/defaults/form.mjs.map +1 -1
- package/dist/util/writeToClipboard.d.mts +3 -0
- package/dist/util/writeToClipboard.d.ts +3 -0
- package/dist/util/writeToClipboard.js +32 -0
- package/dist/util/writeToClipboard.js.map +1 -0
- package/dist/util/writeToClipboard.mjs +8 -0
- package/dist/util/writeToClipboard.mjs.map +1 -0
- package/package.json +1 -1
|
@@ -15,6 +15,10 @@ function useDelay(options) {
|
|
|
15
15
|
...defaultOptions,
|
|
16
16
|
...options
|
|
17
17
|
};
|
|
18
|
+
const clearTimer = () => {
|
|
19
|
+
clearTimeout(timer);
|
|
20
|
+
setTimer(void 0);
|
|
21
|
+
};
|
|
18
22
|
const restartTimer = (onDelayFinish) => {
|
|
19
23
|
if (disabled) {
|
|
20
24
|
return;
|
|
@@ -22,11 +26,9 @@ function useDelay(options) {
|
|
|
22
26
|
clearTimeout(timer);
|
|
23
27
|
setTimer(setTimeout(() => {
|
|
24
28
|
onDelayFinish();
|
|
29
|
+
setTimer(void 0);
|
|
25
30
|
}, delay));
|
|
26
31
|
};
|
|
27
|
-
const clearTimer = () => {
|
|
28
|
-
clearTimeout(timer);
|
|
29
|
-
};
|
|
30
32
|
useEffect(() => {
|
|
31
33
|
return () => {
|
|
32
34
|
clearTimeout(timer);
|
|
@@ -35,9 +37,11 @@ function useDelay(options) {
|
|
|
35
37
|
useEffect(() => {
|
|
36
38
|
if (disabled) {
|
|
37
39
|
clearTimeout(timer);
|
|
40
|
+
setTimer(void 0);
|
|
38
41
|
}
|
|
39
42
|
}, [disabled, timer]);
|
|
40
|
-
|
|
43
|
+
console.log(timer);
|
|
44
|
+
return { restartTimer, clearTimer, hasActiveTimer: !!timer };
|
|
41
45
|
}
|
|
42
46
|
|
|
43
47
|
// src/util/noop.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/user-action/ToggleableInput.tsx","../../../src/hooks/useDelay.ts","../../../src/util/noop.ts"],"sourcesContent":["import type { HTMLInputTypeAttribute, InputHTMLAttributes } from 'react'\nimport { useEffect, useRef, useState } from 'react'\nimport { Pencil } from 'lucide-react'\nimport clsx from 'clsx'\nimport type { UseDelayOptions } from '../../hooks/useDelay'\nimport { useDelay } from '../../hooks/useDelay'\nimport { noop } from '../../util/noop'\n\ntype InputProps = {\n /**\n * The value\n */\n value: string,\n /**\n * @default 'text'\n */\n type?: HTMLInputTypeAttribute,\n /**\n * Callback for when the input's value changes\n * This is pretty much required but made optional for the rare cases where it actually isn't need such as when used with disabled\n * That could be enforced through a union type but that seems a bit overkill\n * @default noop\n */\n onChangeText?: (text: string) => void,\n onEditCompleted?: (text: string) => void,\n labelClassName?: string,\n initialState?: 'editing' | 'display',\n size?: number,\n disclaimer?: string,\n saveDelayOptions?: UseDelayOptions,\n} & Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'label' | 'type' | 'crossOrigin'>\n\n/**\n * A Text input component for inputting text. It changes appearance upon entering the edit mode and switches\n * back to display mode on loss of focus or on enter\n *\n * The State is managed by the parent\n */\nexport const ToggleableInput = ({\n type = 'text',\n value,\n onChange = noop,\n onChangeText = noop,\n onEditCompleted = noop,\n labelClassName = '',\n initialState = 'display',\n size = 16,\n disclaimer,\n onBlur,\n saveDelayOptions,\n ...restProps\n }: InputProps) => {\n const [isEditing, setIsEditing] = useState(initialState !== 'display')\n const { restartTimer, clearTimer } = useDelay(saveDelayOptions)\n const ref = useRef<HTMLInputElement>(null)\n\n const onEditCompletedWrapper = (text: string) => {\n onEditCompleted(text)\n clearTimer()\n }\n\n useEffect(() => {\n if (isEditing) {\n ref.current?.focus()\n }\n }, [isEditing])\n\n return (\n <div>\n <div\n className={clsx('row items-center w-full gap-x-2 overflow-hidden', { 'cursor-pointer': !isEditing })}\n onClick={() => !isEditing ? setIsEditing(!isEditing) : undefined}\n >\n <div className={clsx('row overflow-hidden', { 'flex-1': isEditing })}>\n {isEditing ? (\n <input\n ref={ref}\n {...restProps}\n value={value}\n type={type}\n onChange={event => {\n const value = event.target.value\n restartTimer(() => {\n onEditCompletedWrapper(value)\n })\n onChangeText(value)\n onChange(event)\n }}\n onBlur={(event) => {\n if (onBlur) {\n onBlur(event)\n }\n onEditCompletedWrapper(value)\n setIsEditing(false)\n }}\n onKeyDown={event => {\n if (event.key === 'Enter') {\n setIsEditing(false)\n onEditCompletedWrapper(value)\n }\n }}\n className={clsx(`w-full border-none rounded-none ring-0 outline-0 text-inherit bg-inherit shadow-transparent decoration-primary p-0 underline-offset-4`, {\n underline: isEditing\n }, labelClassName)}\n onFocus={event => event.target.select()}\n />\n ) : (\n <span className={clsx('max-w-xs break-words overflow-hidden', labelClassName)}>\n {value}\n </span>\n )}\n </div>\n <Pencil\n className={clsx(`cursor-pointer`, { 'text-transparent': isEditing })}\n size={size}\n style={{ minWidth: `${size}px` }}\n />\n </div>\n {(isEditing && disclaimer) && (\n <label className=\"text-negative\">\n {disclaimer}\n </label>\n )}\n </div>\n )\n}\n\nexport const ToggleableInputUncontrolled = ({\n value: initialValue,\n onChangeText = noop,\n ...restProps\n }: InputProps) => {\n const [value, setValue] = useState(initialValue)\n\n useEffect(() => {\n setValue(initialValue)\n }, [initialValue])\n\n return (\n <ToggleableInput\n value={value}\n onChangeText={text => {\n setValue(text)\n onChangeText(text)\n }}\n {...restProps}\n />\n )\n}\n","import { useEffect, useState } from 'react'\n\nexport type UseDelayOptionsResolved = {\n delay: number,\n disabled: boolean,\n}\n\nexport type UseDelayOptions = Partial<UseDelayOptionsResolved>\n\nconst defaultOptions: UseDelayOptionsResolved = {\n delay: 3000,\n disabled: false,\n}\n\nexport function useDelay(options?: UseDelayOptions) {\n const [timer, setTimer] = useState<NodeJS.Timeout | undefined>(undefined)\n const { delay, disabled }: UseDelayOptionsResolved = {\n ...defaultOptions,\n ...options\n }\n\n const restartTimer = (onDelayFinish: () => void) => {\n if(disabled) {\n return\n }\n clearTimeout(timer)\n setTimer(setTimeout(() => {\n onDelayFinish()\n }, delay))\n }\n\n
|
|
1
|
+
{"version":3,"sources":["../../../src/components/user-action/ToggleableInput.tsx","../../../src/hooks/useDelay.ts","../../../src/util/noop.ts"],"sourcesContent":["import type { HTMLInputTypeAttribute, InputHTMLAttributes } from 'react'\nimport { useEffect, useRef, useState } from 'react'\nimport { Pencil } from 'lucide-react'\nimport clsx from 'clsx'\nimport type { UseDelayOptions } from '../../hooks/useDelay'\nimport { useDelay } from '../../hooks/useDelay'\nimport { noop } from '../../util/noop'\n\ntype InputProps = {\n /**\n * The value\n */\n value: string,\n /**\n * @default 'text'\n */\n type?: HTMLInputTypeAttribute,\n /**\n * Callback for when the input's value changes\n * This is pretty much required but made optional for the rare cases where it actually isn't need such as when used with disabled\n * That could be enforced through a union type but that seems a bit overkill\n * @default noop\n */\n onChangeText?: (text: string) => void,\n onEditCompleted?: (text: string) => void,\n labelClassName?: string,\n initialState?: 'editing' | 'display',\n size?: number,\n disclaimer?: string,\n saveDelayOptions?: UseDelayOptions,\n} & Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'label' | 'type' | 'crossOrigin'>\n\n/**\n * A Text input component for inputting text. It changes appearance upon entering the edit mode and switches\n * back to display mode on loss of focus or on enter\n *\n * The State is managed by the parent\n */\nexport const ToggleableInput = ({\n type = 'text',\n value,\n onChange = noop,\n onChangeText = noop,\n onEditCompleted = noop,\n labelClassName = '',\n initialState = 'display',\n size = 16,\n disclaimer,\n onBlur,\n saveDelayOptions,\n ...restProps\n }: InputProps) => {\n const [isEditing, setIsEditing] = useState(initialState !== 'display')\n const { restartTimer, clearTimer } = useDelay(saveDelayOptions)\n const ref = useRef<HTMLInputElement>(null)\n\n const onEditCompletedWrapper = (text: string) => {\n onEditCompleted(text)\n clearTimer()\n }\n\n useEffect(() => {\n if (isEditing) {\n ref.current?.focus()\n }\n }, [isEditing])\n\n return (\n <div>\n <div\n className={clsx('row items-center w-full gap-x-2 overflow-hidden', { 'cursor-pointer': !isEditing })}\n onClick={() => !isEditing ? setIsEditing(!isEditing) : undefined}\n >\n <div className={clsx('row overflow-hidden', { 'flex-1': isEditing })}>\n {isEditing ? (\n <input\n ref={ref}\n {...restProps}\n value={value}\n type={type}\n onChange={event => {\n const value = event.target.value\n restartTimer(() => {\n onEditCompletedWrapper(value)\n })\n onChangeText(value)\n onChange(event)\n }}\n onBlur={(event) => {\n if (onBlur) {\n onBlur(event)\n }\n onEditCompletedWrapper(value)\n setIsEditing(false)\n }}\n onKeyDown={event => {\n if (event.key === 'Enter') {\n setIsEditing(false)\n onEditCompletedWrapper(value)\n }\n }}\n className={clsx(`w-full border-none rounded-none ring-0 outline-0 text-inherit bg-inherit shadow-transparent decoration-primary p-0 underline-offset-4`, {\n underline: isEditing\n }, labelClassName)}\n onFocus={event => event.target.select()}\n />\n ) : (\n <span className={clsx('max-w-xs break-words overflow-hidden', labelClassName)}>\n {value}\n </span>\n )}\n </div>\n <Pencil\n className={clsx(`cursor-pointer`, { 'text-transparent': isEditing })}\n size={size}\n style={{ minWidth: `${size}px` }}\n />\n </div>\n {(isEditing && disclaimer) && (\n <label className=\"text-negative\">\n {disclaimer}\n </label>\n )}\n </div>\n )\n}\n\nexport const ToggleableInputUncontrolled = ({\n value: initialValue,\n onChangeText = noop,\n ...restProps\n }: InputProps) => {\n const [value, setValue] = useState(initialValue)\n\n useEffect(() => {\n setValue(initialValue)\n }, [initialValue])\n\n return (\n <ToggleableInput\n value={value}\n onChangeText={text => {\n setValue(text)\n onChangeText(text)\n }}\n {...restProps}\n />\n )\n}\n","import { useEffect, useState } from 'react'\n\nexport type UseDelayOptionsResolved = {\n delay: number,\n disabled: boolean,\n}\n\nexport type UseDelayOptions = Partial<UseDelayOptionsResolved>\n\nconst defaultOptions: UseDelayOptionsResolved = {\n delay: 3000,\n disabled: false,\n}\n\nexport function useDelay(options?: UseDelayOptions) {\n const [timer, setTimer] = useState<NodeJS.Timeout | undefined>(undefined)\n const { delay, disabled }: UseDelayOptionsResolved = {\n ...defaultOptions,\n ...options\n }\n\n const clearTimer = () => {\n clearTimeout(timer)\n setTimer(undefined)\n }\n\n const restartTimer = (onDelayFinish: () => void) => {\n if(disabled) {\n return\n }\n clearTimeout(timer)\n setTimer(setTimeout(() => {\n onDelayFinish()\n setTimer(undefined)\n }, delay))\n }\n\n useEffect(() => {\n return () => {\n clearTimeout(timer)\n }\n }, [timer])\n\n useEffect(() => {\n if(disabled){\n clearTimeout(timer)\n setTimer(undefined)\n }\n }, [disabled, timer])\n\n console.log(timer)\n\n return { restartTimer, clearTimer, hasActiveTimer: !!timer }\n}","export const noop = () => undefined\n"],"mappings":";AACA,SAAS,aAAAA,YAAW,QAAQ,YAAAC,iBAAgB;AAC5C,SAAS,cAAc;AACvB,OAAO,UAAU;;;ACHjB,SAAS,WAAW,gBAAgB;AASpC,IAAM,iBAA0C;AAAA,EAC9C,OAAO;AAAA,EACP,UAAU;AACZ;AAEO,SAAS,SAAS,SAA2B;AAClD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAqC,MAAS;AACxE,QAAM,EAAE,OAAO,SAAS,IAA6B;AAAA,IACnD,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AAEA,QAAM,aAAa,MAAM;AACvB,iBAAa,KAAK;AAClB,aAAS,MAAS;AAAA,EACpB;AAEA,QAAM,eAAe,CAAC,kBAA8B;AAClD,QAAG,UAAU;AACX;AAAA,IACF;AACA,iBAAa,KAAK;AAClB,aAAS,WAAW,MAAM;AACxB,oBAAc;AACd,eAAS,MAAS;AAAA,IACpB,GAAG,KAAK,CAAC;AAAA,EACX;AAEA,YAAU,MAAM;AACd,WAAO,MAAM;AACX,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,KAAK,CAAC;AAEV,YAAU,MAAM;AACd,QAAG,UAAS;AACV,mBAAa,KAAK;AAClB,eAAS,MAAS;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,UAAU,KAAK,CAAC;AAEpB,UAAQ,IAAI,KAAK;AAEjB,SAAO,EAAE,cAAc,YAAY,gBAAgB,CAAC,CAAC,MAAM;AAC7D;;;ACrDO,IAAM,OAAO,MAAM;;;AFqEpB,SAMM,KANN;AA/BC,IAAM,kBAAkB,CAAC;AAAA,EACE,OAAO;AAAA,EACP;AAAA,EACA,WAAW;AAAA,EACX,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAkB;AAChD,QAAM,CAAC,WAAW,YAAY,IAAIC,UAAS,iBAAiB,SAAS;AACrE,QAAM,EAAE,cAAc,WAAW,IAAI,SAAS,gBAAgB;AAC9D,QAAM,MAAM,OAAyB,IAAI;AAEzC,QAAM,yBAAyB,CAAC,SAAiB;AAC/C,oBAAgB,IAAI;AACpB,eAAW;AAAA,EACb;AAEA,EAAAC,WAAU,MAAM;AACd,QAAI,WAAW;AACb,UAAI,SAAS,MAAM;AAAA,IACrB;AAAA,EACF,GAAG,CAAC,SAAS,CAAC;AAEd,SACE,qBAAC,SACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,KAAK,mDAAmD,EAAE,kBAAkB,CAAC,UAAU,CAAC;AAAA,QACnG,SAAS,MAAM,CAAC,YAAY,aAAa,CAAC,SAAS,IAAI;AAAA,QAEvD;AAAA,8BAAC,SAAI,WAAW,KAAK,uBAAuB,EAAE,UAAU,UAAU,CAAC,GAChE,sBACC;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACC,GAAG;AAAA,cACJ;AAAA,cACA;AAAA,cACA,UAAU,WAAS;AACjB,sBAAMC,SAAQ,MAAM,OAAO;AAC3B,6BAAa,MAAM;AACjB,yCAAuBA,MAAK;AAAA,gBAC9B,CAAC;AACD,6BAAaA,MAAK;AAClB,yBAAS,KAAK;AAAA,cAChB;AAAA,cACA,QAAQ,CAAC,UAAU;AACjB,oBAAI,QAAQ;AACV,yBAAO,KAAK;AAAA,gBACd;AACA,uCAAuB,KAAK;AAC5B,6BAAa,KAAK;AAAA,cACpB;AAAA,cACA,WAAW,WAAS;AAClB,oBAAI,MAAM,QAAQ,SAAS;AACzB,+BAAa,KAAK;AAClB,yCAAuB,KAAK;AAAA,gBAC9B;AAAA,cACF;AAAA,cACA,WAAW,KAAK,yIAAyI;AAAA,gBACvJ,WAAW;AAAA,cACb,GAAG,cAAc;AAAA,cACjB,SAAS,WAAS,MAAM,OAAO,OAAO;AAAA;AAAA,UACxC,IAEA,oBAAC,UAAK,WAAW,KAAK,wCAAwC,cAAc,GACzE,iBACH,GAEJ;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,WAAW,KAAK,kBAAkB,EAAE,oBAAoB,UAAU,CAAC;AAAA,cACnE;AAAA,cACA,OAAO,EAAE,UAAU,GAAG,IAAI,KAAK;AAAA;AAAA,UACjC;AAAA;AAAA;AAAA,IACF;AAAA,IACE,aAAa,cACb,oBAAC,WAAM,WAAU,iBACd,sBACH;AAAA,KAEJ;AAEJ;AAEO,IAAM,8BAA8B,CAAC;AAAA,EACE,OAAO;AAAA,EACP,eAAe;AAAA,EACf,GAAG;AACL,MAAkB;AAC5D,QAAM,CAAC,OAAO,QAAQ,IAAIF,UAAS,YAAY;AAE/C,EAAAC,WAAU,MAAM;AACd,aAAS,YAAY;AAAA,EACvB,GAAG,CAAC,YAAY,CAAC;AAEjB,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,cAAc,UAAQ;AACpB,iBAAS,IAAI;AACb,qBAAa,IAAI;AAAA,MACnB;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;","names":["useEffect","useState","useState","useEffect","value"]}
|
|
@@ -3,7 +3,7 @@ import { PropsWithChildren, ReactNode } from 'react';
|
|
|
3
3
|
|
|
4
4
|
type Position = 'top' | 'bottom' | 'left' | 'right';
|
|
5
5
|
type TooltipProps = PropsWithChildren<{
|
|
6
|
-
tooltip:
|
|
6
|
+
tooltip: ReactNode;
|
|
7
7
|
/**
|
|
8
8
|
* Number of milliseconds until the tooltip appears
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@ import { PropsWithChildren, ReactNode } from 'react';
|
|
|
3
3
|
|
|
4
4
|
type Position = 'top' | 'bottom' | 'left' | 'right';
|
|
5
5
|
type TooltipProps = PropsWithChildren<{
|
|
6
|
-
tooltip:
|
|
6
|
+
tooltip: ReactNode;
|
|
7
7
|
/**
|
|
8
8
|
* Number of milliseconds until the tooltip appears
|
|
9
9
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/user-action/Tooltip.tsx","../../../src/hooks/useHoverState.ts"],"sourcesContent":["import type { CSSProperties, PropsWithChildren, ReactNode } from 'react'\nimport { useHoverState } from '../../hooks/useHoverState'\nimport { clsx } from 'clsx'\n\ntype Position = 'top' | 'bottom' | 'left' | 'right'\n\nexport type TooltipProps = PropsWithChildren<{\n tooltip:
|
|
1
|
+
{"version":3,"sources":["../../../src/components/user-action/Tooltip.tsx","../../../src/hooks/useHoverState.ts"],"sourcesContent":["import type { CSSProperties, PropsWithChildren, ReactNode } from 'react'\nimport { useHoverState } from '../../hooks/useHoverState'\nimport { clsx } from 'clsx'\n\ntype Position = 'top' | 'bottom' | 'left' | 'right'\n\nexport type TooltipProps = PropsWithChildren<{\n tooltip: ReactNode,\n /**\n * Number of milliseconds until the tooltip appears\n *\n * defaults to 1000ms\n */\n animationDelay?: number,\n /**\n * Class names of additional styling properties for the tooltip\n */\n tooltipClassName?: string,\n /**\n * Class names of additional styling properties for the container from which the tooltip will be created\n */\n containerClassName?: string,\n position?: Position,\n zIndex?: number,\n}>\n\n/**\n * A Component for showing a tooltip when hovering over Content\n * @param tooltip The tooltip to show can be a text or any ReactNode\n * @param children The Content for which the tooltip should be created\n * @param animationDelay The delay before the tooltip appears\n * @param tooltipClassName Additional ClassNames for the Container of the tooltip\n * @param containerClassName Additional ClassNames for the Container holding the content\n * @param position The direction of the tooltip relative to the Container\n * @param zIndex The z Index of the tooltip (you may require this when stacking modal)\n * @constructor\n */\nexport const Tooltip = ({\n tooltip,\n children,\n animationDelay = 650,\n tooltipClassName = '',\n containerClassName = '',\n position = 'bottom',\n zIndex = 10,\n }: TooltipProps) => {\n const { isHovered, handlers } = useHoverState()\n\n const positionClasses = {\n top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,\n bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,\n left: `right-full top-1/2 -translate-y-1/2 mr-[6px]`,\n right: `left-full top-1/2 -translate-y-1/2 ml-[6px]`\n }\n\n const triangleSize = 6\n const triangleClasses = {\n top: `top-full left-1/2 -translate-x-1/2 border-t-tooltip-background border-l-transparent border-r-transparent`,\n bottom: `bottom-full left-1/2 -translate-x-1/2 border-b-tooltip-background border-l-transparent border-r-transparent`,\n left: `left-full top-1/2 -translate-y-1/2 border-l-tooltip-background border-t-transparent border-b-transparent`,\n right: `right-full top-1/2 -translate-y-1/2 border-r-tooltip-background border-t-transparent border-b-transparent`\n }\n\n const triangleStyle: Record<Position, CSSProperties> = {\n top: { borderWidth: `${triangleSize}px ${triangleSize}px 0 ${triangleSize}px` },\n bottom: { borderWidth: `0 ${triangleSize}px ${triangleSize}px ${triangleSize}px` },\n left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },\n right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }\n }\n\n return (\n <div\n className={clsx('relative inline-block', containerClassName)}\n {...handlers}\n >\n {children}\n {isHovered && (\n <div\n className={clsx(\n `opacity-0 absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap\n animate-tooltip-fade-in shadow-around-md bg-tooltip-background`,\n positionClasses[position], tooltipClassName\n )}\n style={{ zIndex, animationDelay: animationDelay + 'ms' }}\n >\n {tooltip}\n <div\n className={clsx(`absolute w-0 h-0`, triangleClasses[position])}\n style={{ ...triangleStyle[position], zIndex: zIndex + 1 }}\n />\n </div>\n )}\n </div>\n )\n}\n","import type { Dispatch, SetStateAction } from 'react'\nimport { useEffect, useState } from 'react'\n\ntype UseHoverStateProps = {\n /**\n * The delay after which the menu is closed in milliseconds\n *\n * default: 200ms\n */\n closingDelay: number,\n /**\n * Whether the hover state management should be disabled\n *\n * default: false\n */\n isDisabled: boolean,\n}\n\ntype UseHoverStateReturnType = {\n /**\n * Whether the element is hovered\n */\n isHovered: boolean,\n /**\n * Function to change the current hover status\n */\n setIsHovered: Dispatch<SetStateAction<boolean>>,\n /**\n * Handlers to pass on to the component that should be hovered\n */\n handlers: {\n onMouseEnter: () => void,\n onMouseLeave: () => void,\n },\n}\n\nconst defaultUseHoverStateProps: UseHoverStateProps = {\n closingDelay: 200,\n isDisabled: false,\n}\n\n/**\n * @param props See UseHoverStateProps\n *\n * A react hook for managing the hover state of a component. The handlers provided should be\n * forwarded to the component which should be hovered over\n */\nexport const useHoverState = (props: Partial<UseHoverStateProps> | undefined = undefined): UseHoverStateReturnType => {\n const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props }\n\n const [isHovered, setIsHovered] = useState(false)\n const [timer, setTimer] = useState<NodeJS.Timeout>()\n\n const onMouseEnter = () => {\n if (isDisabled) {\n return\n }\n clearTimeout(timer)\n setIsHovered(true)\n }\n\n const onMouseLeave = () => {\n if (isDisabled) {\n return\n }\n setTimer(setTimeout(() => {\n setIsHovered(false)\n }, closingDelay))\n }\n\n useEffect(() => {\n if (timer) {\n return () => {\n clearTimeout(timer)\n }\n }\n })\n\n useEffect(() => {\n if (timer) {\n clearTimeout(timer)\n }\n }, [isDisabled]) // eslint-disable-line react-hooks/exhaustive-deps\n\n return {\n isHovered, setIsHovered, handlers: { onMouseEnter, onMouseLeave }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,mBAAoC;AAmCpC,IAAM,4BAAgD;AAAA,EACpD,cAAc;AAAA,EACd,YAAY;AACd;AAQO,IAAM,gBAAgB,CAAC,QAAiD,WAAuC;AACpH,QAAM,EAAE,cAAc,WAAW,IAAI,EAAE,GAAG,2BAA2B,GAAG,MAAM;AAE9E,QAAM,CAAC,WAAW,YAAY,QAAI,uBAAS,KAAK;AAChD,QAAM,CAAC,OAAO,QAAQ,QAAI,uBAAyB;AAEnD,QAAM,eAAe,MAAM;AACzB,QAAI,YAAY;AACd;AAAA,IACF;AACA,iBAAa,KAAK;AAClB,iBAAa,IAAI;AAAA,EACnB;AAEA,QAAM,eAAe,MAAM;AACzB,QAAI,YAAY;AACd;AAAA,IACF;AACA,aAAS,WAAW,MAAM;AACxB,mBAAa,KAAK;AAAA,IACpB,GAAG,YAAY,CAAC;AAAA,EAClB;AAEA,8BAAU,MAAM;AACd,QAAI,OAAO;AACT,aAAO,MAAM;AACX,qBAAa,KAAK;AAAA,MACpB;AAAA,IACF;AAAA,EACF,CAAC;AAED,8BAAU,MAAM;AACd,QAAI,OAAO;AACT,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,UAAU,CAAC;AAEf,SAAO;AAAA,IACL;AAAA,IAAW;AAAA,IAAc,UAAU,EAAE,cAAc,aAAa;AAAA,EAClE;AACF;;;ADrFA,kBAAqB;AA2Eb;AAxCD,IAAM,UAAU,CAAC;AAAA,EACE;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,qBAAqB;AAAA,EACrB,WAAW;AAAA,EACX,SAAS;AACX,MAAoB;AAC1C,QAAM,EAAE,WAAW,SAAS,IAAI,cAAc;AAE9C,QAAM,kBAAkB;AAAA,IACtB,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAEA,QAAM,eAAe;AACrB,QAAM,kBAAkB;AAAA,IACtB,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAEA,QAAM,gBAAiD;AAAA,IACrD,KAAK,EAAE,aAAa,GAAG,YAAY,MAAM,YAAY,QAAQ,YAAY,KAAK;AAAA,IAC9E,QAAQ,EAAE,aAAa,KAAK,YAAY,MAAM,YAAY,MAAM,YAAY,KAAK;AAAA,IACjF,MAAM,EAAE,aAAa,GAAG,YAAY,QAAQ,YAAY,MAAM,YAAY,KAAK;AAAA,IAC/E,OAAO,EAAE,aAAa,GAAG,YAAY,MAAM,YAAY,MAAM,YAAY,OAAO;AAAA,EAClF;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW,kBAAK,yBAAyB,kBAAkB;AAAA,MAC1D,GAAG;AAAA,MAEH;AAAA;AAAA,QACA,aACC;AAAA,UAAC;AAAA;AAAA,YACC,eAAW;AAAA,cACT;AAAA;AAAA,cAEA,gBAAgB,QAAQ;AAAA,cAAG;AAAA,YAC7B;AAAA,YACA,OAAO,EAAE,QAAQ,gBAAgB,iBAAiB,KAAK;AAAA,YAEtD;AAAA;AAAA,cACD;AAAA,gBAAC;AAAA;AAAA,kBACC,eAAW,kBAAK,oBAAoB,gBAAgB,QAAQ,CAAC;AAAA,kBAC7D,OAAO,EAAE,GAAG,cAAc,QAAQ,GAAG,QAAQ,SAAS,EAAE;AAAA;AAAA,cAC1D;AAAA;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/hooks/useHoverState.ts","../../../src/components/user-action/Tooltip.tsx"],"sourcesContent":["import type { Dispatch, SetStateAction } from 'react'\nimport { useEffect, useState } from 'react'\n\ntype UseHoverStateProps = {\n /**\n * The delay after which the menu is closed in milliseconds\n *\n * default: 200ms\n */\n closingDelay: number,\n /**\n * Whether the hover state management should be disabled\n *\n * default: false\n */\n isDisabled: boolean,\n}\n\ntype UseHoverStateReturnType = {\n /**\n * Whether the element is hovered\n */\n isHovered: boolean,\n /**\n * Function to change the current hover status\n */\n setIsHovered: Dispatch<SetStateAction<boolean>>,\n /**\n * Handlers to pass on to the component that should be hovered\n */\n handlers: {\n onMouseEnter: () => void,\n onMouseLeave: () => void,\n },\n}\n\nconst defaultUseHoverStateProps: UseHoverStateProps = {\n closingDelay: 200,\n isDisabled: false,\n}\n\n/**\n * @param props See UseHoverStateProps\n *\n * A react hook for managing the hover state of a component. The handlers provided should be\n * forwarded to the component which should be hovered over\n */\nexport const useHoverState = (props: Partial<UseHoverStateProps> | undefined = undefined): UseHoverStateReturnType => {\n const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props }\n\n const [isHovered, setIsHovered] = useState(false)\n const [timer, setTimer] = useState<NodeJS.Timeout>()\n\n const onMouseEnter = () => {\n if (isDisabled) {\n return\n }\n clearTimeout(timer)\n setIsHovered(true)\n }\n\n const onMouseLeave = () => {\n if (isDisabled) {\n return\n }\n setTimer(setTimeout(() => {\n setIsHovered(false)\n }, closingDelay))\n }\n\n useEffect(() => {\n if (timer) {\n return () => {\n clearTimeout(timer)\n }\n }\n })\n\n useEffect(() => {\n if (timer) {\n clearTimeout(timer)\n }\n }, [isDisabled]) // eslint-disable-line react-hooks/exhaustive-deps\n\n return {\n isHovered, setIsHovered, handlers: { onMouseEnter, onMouseLeave }\n }\n}\n","import type { CSSProperties, PropsWithChildren, ReactNode } from 'react'\nimport { useHoverState } from '../../hooks/useHoverState'\nimport { clsx } from 'clsx'\n\ntype Position = 'top' | 'bottom' | 'left' | 'right'\n\nexport type TooltipProps = PropsWithChildren<{\n tooltip:
|
|
1
|
+
{"version":3,"sources":["../../../src/hooks/useHoverState.ts","../../../src/components/user-action/Tooltip.tsx"],"sourcesContent":["import type { Dispatch, SetStateAction } from 'react'\nimport { useEffect, useState } from 'react'\n\ntype UseHoverStateProps = {\n /**\n * The delay after which the menu is closed in milliseconds\n *\n * default: 200ms\n */\n closingDelay: number,\n /**\n * Whether the hover state management should be disabled\n *\n * default: false\n */\n isDisabled: boolean,\n}\n\ntype UseHoverStateReturnType = {\n /**\n * Whether the element is hovered\n */\n isHovered: boolean,\n /**\n * Function to change the current hover status\n */\n setIsHovered: Dispatch<SetStateAction<boolean>>,\n /**\n * Handlers to pass on to the component that should be hovered\n */\n handlers: {\n onMouseEnter: () => void,\n onMouseLeave: () => void,\n },\n}\n\nconst defaultUseHoverStateProps: UseHoverStateProps = {\n closingDelay: 200,\n isDisabled: false,\n}\n\n/**\n * @param props See UseHoverStateProps\n *\n * A react hook for managing the hover state of a component. The handlers provided should be\n * forwarded to the component which should be hovered over\n */\nexport const useHoverState = (props: Partial<UseHoverStateProps> | undefined = undefined): UseHoverStateReturnType => {\n const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props }\n\n const [isHovered, setIsHovered] = useState(false)\n const [timer, setTimer] = useState<NodeJS.Timeout>()\n\n const onMouseEnter = () => {\n if (isDisabled) {\n return\n }\n clearTimeout(timer)\n setIsHovered(true)\n }\n\n const onMouseLeave = () => {\n if (isDisabled) {\n return\n }\n setTimer(setTimeout(() => {\n setIsHovered(false)\n }, closingDelay))\n }\n\n useEffect(() => {\n if (timer) {\n return () => {\n clearTimeout(timer)\n }\n }\n })\n\n useEffect(() => {\n if (timer) {\n clearTimeout(timer)\n }\n }, [isDisabled]) // eslint-disable-line react-hooks/exhaustive-deps\n\n return {\n isHovered, setIsHovered, handlers: { onMouseEnter, onMouseLeave }\n }\n}\n","import type { CSSProperties, PropsWithChildren, ReactNode } from 'react'\nimport { useHoverState } from '../../hooks/useHoverState'\nimport { clsx } from 'clsx'\n\ntype Position = 'top' | 'bottom' | 'left' | 'right'\n\nexport type TooltipProps = PropsWithChildren<{\n tooltip: ReactNode,\n /**\n * Number of milliseconds until the tooltip appears\n *\n * defaults to 1000ms\n */\n animationDelay?: number,\n /**\n * Class names of additional styling properties for the tooltip\n */\n tooltipClassName?: string,\n /**\n * Class names of additional styling properties for the container from which the tooltip will be created\n */\n containerClassName?: string,\n position?: Position,\n zIndex?: number,\n}>\n\n/**\n * A Component for showing a tooltip when hovering over Content\n * @param tooltip The tooltip to show can be a text or any ReactNode\n * @param children The Content for which the tooltip should be created\n * @param animationDelay The delay before the tooltip appears\n * @param tooltipClassName Additional ClassNames for the Container of the tooltip\n * @param containerClassName Additional ClassNames for the Container holding the content\n * @param position The direction of the tooltip relative to the Container\n * @param zIndex The z Index of the tooltip (you may require this when stacking modal)\n * @constructor\n */\nexport const Tooltip = ({\n tooltip,\n children,\n animationDelay = 650,\n tooltipClassName = '',\n containerClassName = '',\n position = 'bottom',\n zIndex = 10,\n }: TooltipProps) => {\n const { isHovered, handlers } = useHoverState()\n\n const positionClasses = {\n top: `bottom-full left-1/2 -translate-x-1/2 mb-[6px]`,\n bottom: `top-full left-1/2 -translate-x-1/2 mt-[6px]`,\n left: `right-full top-1/2 -translate-y-1/2 mr-[6px]`,\n right: `left-full top-1/2 -translate-y-1/2 ml-[6px]`\n }\n\n const triangleSize = 6\n const triangleClasses = {\n top: `top-full left-1/2 -translate-x-1/2 border-t-tooltip-background border-l-transparent border-r-transparent`,\n bottom: `bottom-full left-1/2 -translate-x-1/2 border-b-tooltip-background border-l-transparent border-r-transparent`,\n left: `left-full top-1/2 -translate-y-1/2 border-l-tooltip-background border-t-transparent border-b-transparent`,\n right: `right-full top-1/2 -translate-y-1/2 border-r-tooltip-background border-t-transparent border-b-transparent`\n }\n\n const triangleStyle: Record<Position, CSSProperties> = {\n top: { borderWidth: `${triangleSize}px ${triangleSize}px 0 ${triangleSize}px` },\n bottom: { borderWidth: `0 ${triangleSize}px ${triangleSize}px ${triangleSize}px` },\n left: { borderWidth: `${triangleSize}px 0 ${triangleSize}px ${triangleSize}px` },\n right: { borderWidth: `${triangleSize}px ${triangleSize}px ${triangleSize}px 0` }\n }\n\n return (\n <div\n className={clsx('relative inline-block', containerClassName)}\n {...handlers}\n >\n {children}\n {isHovered && (\n <div\n className={clsx(\n `opacity-0 absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap\n animate-tooltip-fade-in shadow-around-md bg-tooltip-background`,\n positionClasses[position], tooltipClassName\n )}\n style={{ zIndex, animationDelay: animationDelay + 'ms' }}\n >\n {tooltip}\n <div\n className={clsx(`absolute w-0 h-0`, triangleClasses[position])}\n style={{ ...triangleStyle[position], zIndex: zIndex + 1 }}\n />\n </div>\n )}\n </div>\n )\n}\n"],"mappings":";AACA,SAAS,WAAW,gBAAgB;AAmCpC,IAAM,4BAAgD;AAAA,EACpD,cAAc;AAAA,EACd,YAAY;AACd;AAQO,IAAM,gBAAgB,CAAC,QAAiD,WAAuC;AACpH,QAAM,EAAE,cAAc,WAAW,IAAI,EAAE,GAAG,2BAA2B,GAAG,MAAM;AAE9E,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAChD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAyB;AAEnD,QAAM,eAAe,MAAM;AACzB,QAAI,YAAY;AACd;AAAA,IACF;AACA,iBAAa,KAAK;AAClB,iBAAa,IAAI;AAAA,EACnB;AAEA,QAAM,eAAe,MAAM;AACzB,QAAI,YAAY;AACd;AAAA,IACF;AACA,aAAS,WAAW,MAAM;AACxB,mBAAa,KAAK;AAAA,IACpB,GAAG,YAAY,CAAC;AAAA,EAClB;AAEA,YAAU,MAAM;AACd,QAAI,OAAO;AACT,aAAO,MAAM;AACX,qBAAa,KAAK;AAAA,MACpB;AAAA,IACF;AAAA,EACF,CAAC;AAED,YAAU,MAAM;AACd,QAAI,OAAO;AACT,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,UAAU,CAAC;AAEf,SAAO;AAAA,IACL;AAAA,IAAW;AAAA,IAAc,UAAU,EAAE,cAAc,aAAa;AAAA,EAClE;AACF;;;ACrFA,SAAS,YAAY;AA2Eb,SASE,KATF;AAxCD,IAAM,UAAU,CAAC;AAAA,EACE;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,qBAAqB;AAAA,EACrB,WAAW;AAAA,EACX,SAAS;AACX,MAAoB;AAC1C,QAAM,EAAE,WAAW,SAAS,IAAI,cAAc;AAE9C,QAAM,kBAAkB;AAAA,IACtB,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAEA,QAAM,eAAe;AACrB,QAAM,kBAAkB;AAAA,IACtB,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AAEA,QAAM,gBAAiD;AAAA,IACrD,KAAK,EAAE,aAAa,GAAG,YAAY,MAAM,YAAY,QAAQ,YAAY,KAAK;AAAA,IAC9E,QAAQ,EAAE,aAAa,KAAK,YAAY,MAAM,YAAY,MAAM,YAAY,KAAK;AAAA,IACjF,MAAM,EAAE,aAAa,GAAG,YAAY,QAAQ,YAAY,MAAM,YAAY,KAAK;AAAA,IAC/E,OAAO,EAAE,aAAa,GAAG,YAAY,MAAM,YAAY,MAAM,YAAY,OAAO;AAAA,EAClF;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,KAAK,yBAAyB,kBAAkB;AAAA,MAC1D,GAAG;AAAA,MAEH;AAAA;AAAA,QACA,aACC;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT;AAAA;AAAA,cAEA,gBAAgB,QAAQ;AAAA,cAAG;AAAA,YAC7B;AAAA,YACA,OAAO,EAAE,QAAQ,gBAAgB,iBAAiB,KAAK;AAAA,YAEtD;AAAA;AAAA,cACD;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAW,KAAK,oBAAoB,gBAAgB,QAAQ,CAAC;AAAA,kBAC7D,OAAO,EAAE,GAAG,cAAc,QAAQ,GAAG,QAAQ,SAAS,EAAE;AAAA;AAAA,cAC1D;AAAA;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
|
package/dist/css/globals.css
CHANGED
|
@@ -451,6 +451,9 @@
|
|
|
451
451
|
.mt-3 {
|
|
452
452
|
margin-top: calc(var(--spacing) * 3);
|
|
453
453
|
}
|
|
454
|
+
.mt-12 {
|
|
455
|
+
margin-top: calc(var(--spacing) * 12);
|
|
456
|
+
}
|
|
454
457
|
.mt-\[6px\] {
|
|
455
458
|
margin-top: 6px;
|
|
456
459
|
}
|
|
@@ -721,6 +724,12 @@
|
|
|
721
724
|
.cursor-col-resize {
|
|
722
725
|
cursor: col-resize;
|
|
723
726
|
}
|
|
727
|
+
.cursor-copy {
|
|
728
|
+
cursor: copy;
|
|
729
|
+
}
|
|
730
|
+
.cursor-default {
|
|
731
|
+
cursor: default;
|
|
732
|
+
}
|
|
724
733
|
.cursor-not-allowed {
|
|
725
734
|
cursor: not-allowed;
|
|
726
735
|
}
|
|
@@ -1621,6 +1630,10 @@
|
|
|
1621
1630
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
1622
1631
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
1623
1632
|
}
|
|
1633
|
+
.duration-200 {
|
|
1634
|
+
--tw-duration: 200ms;
|
|
1635
|
+
transition-duration: 200ms;
|
|
1636
|
+
}
|
|
1624
1637
|
.outline-none {
|
|
1625
1638
|
--tw-outline-style: none;
|
|
1626
1639
|
outline-style: none;
|
|
@@ -1853,27 +1866,6 @@
|
|
|
1853
1866
|
}
|
|
1854
1867
|
}
|
|
1855
1868
|
@layer utilities {
|
|
1856
|
-
.animation-delay-0 {
|
|
1857
|
-
animation-delay: 0ms;
|
|
1858
|
-
}
|
|
1859
|
-
.animation-delay-100 {
|
|
1860
|
-
animation-delay: 100ms;
|
|
1861
|
-
}
|
|
1862
|
-
.animation-delay-200 {
|
|
1863
|
-
animation-delay: 200ms;
|
|
1864
|
-
}
|
|
1865
|
-
.animation-delay-300 {
|
|
1866
|
-
animation-delay: 300ms;
|
|
1867
|
-
}
|
|
1868
|
-
.animation-delay-400 {
|
|
1869
|
-
animation-delay: 400ms;
|
|
1870
|
-
}
|
|
1871
|
-
.animation-delay-500 {
|
|
1872
|
-
animation-delay: 500ms;
|
|
1873
|
-
}
|
|
1874
|
-
.animation-delay-1000 {
|
|
1875
|
-
animation-delay: 1000ms;
|
|
1876
|
-
}
|
|
1877
1869
|
@keyframes fade-in {
|
|
1878
1870
|
0% {
|
|
1879
1871
|
opacity: 0;
|
|
@@ -2672,6 +2664,10 @@
|
|
|
2672
2664
|
syntax: "*";
|
|
2673
2665
|
inherits: false;
|
|
2674
2666
|
}
|
|
2667
|
+
@property --tw-duration {
|
|
2668
|
+
syntax: "*";
|
|
2669
|
+
inherits: false;
|
|
2670
|
+
}
|
|
2675
2671
|
@property --tw-border-spacing-x {
|
|
2676
2672
|
syntax: "<length>";
|
|
2677
2673
|
inherits: false;
|
|
@@ -2748,6 +2744,7 @@
|
|
|
2748
2744
|
--tw-drop-shadow-color: initial;
|
|
2749
2745
|
--tw-drop-shadow-alpha: 100%;
|
|
2750
2746
|
--tw-drop-shadow-size: initial;
|
|
2747
|
+
--tw-duration: initial;
|
|
2751
2748
|
--tw-border-spacing-x: 0;
|
|
2752
2749
|
--tw-border-spacing-y: 0;
|
|
2753
2750
|
}
|
|
@@ -1,32 +1,8 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.animation-delay-100 {
|
|
7
|
-
animation-delay: 100ms;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.animation-delay-200 {
|
|
11
|
-
animation-delay: 200ms;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.animation-delay-300 {
|
|
15
|
-
animation-delay: 300ms;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.animation-delay-400 {
|
|
19
|
-
animation-delay: 400ms;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.animation-delay-500 {
|
|
23
|
-
animation-delay: 500ms;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.animation-delay-1000 {
|
|
27
|
-
animation-delay: 1000ms;
|
|
28
|
-
}
|
|
1
|
+
@utility animation-delay-* {
|
|
2
|
+
animation-delay: calc(--value(number) * 1ms);
|
|
3
|
+
}
|
|
29
4
|
|
|
5
|
+
@layer utilities {
|
|
30
6
|
@keyframes fade-in {
|
|
31
7
|
0% {
|
|
32
8
|
opacity: 0;
|
|
@@ -6,6 +6,7 @@ type UseDelayOptions = Partial<UseDelayOptionsResolved>;
|
|
|
6
6
|
declare function useDelay(options?: UseDelayOptions): {
|
|
7
7
|
restartTimer: (onDelayFinish: () => void) => void;
|
|
8
8
|
clearTimer: () => void;
|
|
9
|
+
hasActiveTimer: boolean;
|
|
9
10
|
};
|
|
10
11
|
|
|
11
12
|
export { type UseDelayOptions, type UseDelayOptionsResolved, useDelay };
|
package/dist/hooks/useDelay.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ type UseDelayOptions = Partial<UseDelayOptionsResolved>;
|
|
|
6
6
|
declare function useDelay(options?: UseDelayOptions): {
|
|
7
7
|
restartTimer: (onDelayFinish: () => void) => void;
|
|
8
8
|
clearTimer: () => void;
|
|
9
|
+
hasActiveTimer: boolean;
|
|
9
10
|
};
|
|
10
11
|
|
|
11
12
|
export { type UseDelayOptions, type UseDelayOptionsResolved, useDelay };
|
package/dist/hooks/useDelay.js
CHANGED
|
@@ -33,6 +33,10 @@ function useDelay(options) {
|
|
|
33
33
|
...defaultOptions,
|
|
34
34
|
...options
|
|
35
35
|
};
|
|
36
|
+
const clearTimer = () => {
|
|
37
|
+
clearTimeout(timer);
|
|
38
|
+
setTimer(void 0);
|
|
39
|
+
};
|
|
36
40
|
const restartTimer = (onDelayFinish) => {
|
|
37
41
|
if (disabled) {
|
|
38
42
|
return;
|
|
@@ -40,11 +44,9 @@ function useDelay(options) {
|
|
|
40
44
|
clearTimeout(timer);
|
|
41
45
|
setTimer(setTimeout(() => {
|
|
42
46
|
onDelayFinish();
|
|
47
|
+
setTimer(void 0);
|
|
43
48
|
}, delay));
|
|
44
49
|
};
|
|
45
|
-
const clearTimer = () => {
|
|
46
|
-
clearTimeout(timer);
|
|
47
|
-
};
|
|
48
50
|
(0, import_react.useEffect)(() => {
|
|
49
51
|
return () => {
|
|
50
52
|
clearTimeout(timer);
|
|
@@ -53,9 +55,11 @@ function useDelay(options) {
|
|
|
53
55
|
(0, import_react.useEffect)(() => {
|
|
54
56
|
if (disabled) {
|
|
55
57
|
clearTimeout(timer);
|
|
58
|
+
setTimer(void 0);
|
|
56
59
|
}
|
|
57
60
|
}, [disabled, timer]);
|
|
58
|
-
|
|
61
|
+
console.log(timer);
|
|
62
|
+
return { restartTimer, clearTimer, hasActiveTimer: !!timer };
|
|
59
63
|
}
|
|
60
64
|
// Annotate the CommonJS export names for ESM import in node:
|
|
61
65
|
0 && (module.exports = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useDelay.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nexport type UseDelayOptionsResolved = {\n delay: number,\n disabled: boolean,\n}\n\nexport type UseDelayOptions = Partial<UseDelayOptionsResolved>\n\nconst defaultOptions: UseDelayOptionsResolved = {\n delay: 3000,\n disabled: false,\n}\n\nexport function useDelay(options?: UseDelayOptions) {\n const [timer, setTimer] = useState<NodeJS.Timeout | undefined>(undefined)\n const { delay, disabled }: UseDelayOptionsResolved = {\n ...defaultOptions,\n ...options\n }\n\n const restartTimer = (onDelayFinish: () => void) => {\n if(disabled) {\n return\n }\n clearTimeout(timer)\n setTimer(setTimeout(() => {\n onDelayFinish()\n }, delay))\n }\n\n
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useDelay.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nexport type UseDelayOptionsResolved = {\n delay: number,\n disabled: boolean,\n}\n\nexport type UseDelayOptions = Partial<UseDelayOptionsResolved>\n\nconst defaultOptions: UseDelayOptionsResolved = {\n delay: 3000,\n disabled: false,\n}\n\nexport function useDelay(options?: UseDelayOptions) {\n const [timer, setTimer] = useState<NodeJS.Timeout | undefined>(undefined)\n const { delay, disabled }: UseDelayOptionsResolved = {\n ...defaultOptions,\n ...options\n }\n\n const clearTimer = () => {\n clearTimeout(timer)\n setTimer(undefined)\n }\n\n const restartTimer = (onDelayFinish: () => void) => {\n if(disabled) {\n return\n }\n clearTimeout(timer)\n setTimer(setTimeout(() => {\n onDelayFinish()\n setTimer(undefined)\n }, delay))\n }\n\n useEffect(() => {\n return () => {\n clearTimeout(timer)\n }\n }, [timer])\n\n useEffect(() => {\n if(disabled){\n clearTimeout(timer)\n setTimer(undefined)\n }\n }, [disabled, timer])\n\n console.log(timer)\n\n return { restartTimer, clearTimer, hasActiveTimer: !!timer }\n}"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAoC;AASpC,IAAM,iBAA0C;AAAA,EAC9C,OAAO;AAAA,EACP,UAAU;AACZ;AAEO,SAAS,SAAS,SAA2B;AAClD,QAAM,CAAC,OAAO,QAAQ,QAAI,uBAAqC,MAAS;AACxE,QAAM,EAAE,OAAO,SAAS,IAA6B;AAAA,IACnD,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AAEA,QAAM,aAAa,MAAM;AACvB,iBAAa,KAAK;AAClB,aAAS,MAAS;AAAA,EACpB;AAEA,QAAM,eAAe,CAAC,kBAA8B;AAClD,QAAG,UAAU;AACX;AAAA,IACF;AACA,iBAAa,KAAK;AAClB,aAAS,WAAW,MAAM;AACxB,oBAAc;AACd,eAAS,MAAS;AAAA,IACpB,GAAG,KAAK,CAAC;AAAA,EACX;AAEA,8BAAU,MAAM;AACd,WAAO,MAAM;AACX,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,KAAK,CAAC;AAEV,8BAAU,MAAM;AACd,QAAG,UAAS;AACV,mBAAa,KAAK;AAClB,eAAS,MAAS;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,UAAU,KAAK,CAAC;AAEpB,UAAQ,IAAI,KAAK;AAEjB,SAAO,EAAE,cAAc,YAAY,gBAAgB,CAAC,CAAC,MAAM;AAC7D;","names":[]}
|
package/dist/hooks/useDelay.mjs
CHANGED
|
@@ -10,6 +10,10 @@ function useDelay(options) {
|
|
|
10
10
|
...defaultOptions,
|
|
11
11
|
...options
|
|
12
12
|
};
|
|
13
|
+
const clearTimer = () => {
|
|
14
|
+
clearTimeout(timer);
|
|
15
|
+
setTimer(void 0);
|
|
16
|
+
};
|
|
13
17
|
const restartTimer = (onDelayFinish) => {
|
|
14
18
|
if (disabled) {
|
|
15
19
|
return;
|
|
@@ -17,11 +21,9 @@ function useDelay(options) {
|
|
|
17
21
|
clearTimeout(timer);
|
|
18
22
|
setTimer(setTimeout(() => {
|
|
19
23
|
onDelayFinish();
|
|
24
|
+
setTimer(void 0);
|
|
20
25
|
}, delay));
|
|
21
26
|
};
|
|
22
|
-
const clearTimer = () => {
|
|
23
|
-
clearTimeout(timer);
|
|
24
|
-
};
|
|
25
27
|
useEffect(() => {
|
|
26
28
|
return () => {
|
|
27
29
|
clearTimeout(timer);
|
|
@@ -30,9 +32,11 @@ function useDelay(options) {
|
|
|
30
32
|
useEffect(() => {
|
|
31
33
|
if (disabled) {
|
|
32
34
|
clearTimeout(timer);
|
|
35
|
+
setTimer(void 0);
|
|
33
36
|
}
|
|
34
37
|
}, [disabled, timer]);
|
|
35
|
-
|
|
38
|
+
console.log(timer);
|
|
39
|
+
return { restartTimer, clearTimer, hasActiveTimer: !!timer };
|
|
36
40
|
}
|
|
37
41
|
export {
|
|
38
42
|
useDelay
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useDelay.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nexport type UseDelayOptionsResolved = {\n delay: number,\n disabled: boolean,\n}\n\nexport type UseDelayOptions = Partial<UseDelayOptionsResolved>\n\nconst defaultOptions: UseDelayOptionsResolved = {\n delay: 3000,\n disabled: false,\n}\n\nexport function useDelay(options?: UseDelayOptions) {\n const [timer, setTimer] = useState<NodeJS.Timeout | undefined>(undefined)\n const { delay, disabled }: UseDelayOptionsResolved = {\n ...defaultOptions,\n ...options\n }\n\n const restartTimer = (onDelayFinish: () => void) => {\n if(disabled) {\n return\n }\n clearTimeout(timer)\n setTimer(setTimeout(() => {\n onDelayFinish()\n }, delay))\n }\n\n
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useDelay.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nexport type UseDelayOptionsResolved = {\n delay: number,\n disabled: boolean,\n}\n\nexport type UseDelayOptions = Partial<UseDelayOptionsResolved>\n\nconst defaultOptions: UseDelayOptionsResolved = {\n delay: 3000,\n disabled: false,\n}\n\nexport function useDelay(options?: UseDelayOptions) {\n const [timer, setTimer] = useState<NodeJS.Timeout | undefined>(undefined)\n const { delay, disabled }: UseDelayOptionsResolved = {\n ...defaultOptions,\n ...options\n }\n\n const clearTimer = () => {\n clearTimeout(timer)\n setTimer(undefined)\n }\n\n const restartTimer = (onDelayFinish: () => void) => {\n if(disabled) {\n return\n }\n clearTimeout(timer)\n setTimer(setTimeout(() => {\n onDelayFinish()\n setTimer(undefined)\n }, delay))\n }\n\n useEffect(() => {\n return () => {\n clearTimeout(timer)\n }\n }, [timer])\n\n useEffect(() => {\n if(disabled){\n clearTimeout(timer)\n setTimer(undefined)\n }\n }, [disabled, timer])\n\n console.log(timer)\n\n return { restartTimer, clearTimer, hasActiveTimer: !!timer }\n}"],"mappings":";AAAA,SAAS,WAAW,gBAAgB;AASpC,IAAM,iBAA0C;AAAA,EAC9C,OAAO;AAAA,EACP,UAAU;AACZ;AAEO,SAAS,SAAS,SAA2B;AAClD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAqC,MAAS;AACxE,QAAM,EAAE,OAAO,SAAS,IAA6B;AAAA,IACnD,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AAEA,QAAM,aAAa,MAAM;AACvB,iBAAa,KAAK;AAClB,aAAS,MAAS;AAAA,EACpB;AAEA,QAAM,eAAe,CAAC,kBAA8B;AAClD,QAAG,UAAU;AACX;AAAA,IACF;AACA,iBAAa,KAAK;AAClB,aAAS,WAAW,MAAM;AACxB,oBAAc;AACd,eAAS,MAAS;AAAA,IACpB,GAAG,KAAK,CAAC;AAAA,EACX;AAEA,YAAU,MAAM;AACd,WAAO,MAAM;AACX,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,KAAK,CAAC;AAEV,YAAU,MAAM;AACd,QAAG,UAAS;AACV,mBAAa,KAAK;AAClB,eAAS,MAAS;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,UAAU,KAAK,CAAC;AAEpB,UAAQ,IAAI,KAAK;AAEjB,SAAO,EAAE,cAAc,YAAY,gBAAgB,CAAC,CAAC,MAAM;AAC7D;","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -51,6 +51,7 @@ export { TableFilterButton, TableFilterButtonProps, TableFilterType } from './co
|
|
|
51
51
|
export { TableSortButton, TableSortButtonProps } from './components/table/TableSortButton.mjs';
|
|
52
52
|
export { ButtonColorUtil, ButtonProps, ButtonUtil, IconButton, IconButtonColor, IconButtonProps, IconButtonUtil, OutlineButton, OutlineButtonColor, OutlineButtonProps, SolidButton, SolidButtonColor, SolidButtonProps, TextButton, TextButtonColor, TextButtonProps } from './components/user-action/Button.mjs';
|
|
53
53
|
export { Checkbox, CheckboxProps, CheckboxUncontrolled } from './components/user-action/Checkbox.mjs';
|
|
54
|
+
export { CopyToClipboardWrapper, CopyToClipboardWrapperProps } from './components/user-action/CopyToClipboardWrapper.mjs';
|
|
54
55
|
export { DateTimePicker, DateTimePickerMode, DateTimePickerProps } from './components/user-action/DateAndTimePicker.mjs';
|
|
55
56
|
export { EditCompleteOptions, EditCompleteOptionsResolved, FormInput, FormInputProps, Input, InputProps, InputUncontrolled } from './components/user-action/Input.mjs';
|
|
56
57
|
export { Label, LabelProps, LabelType } from './components/user-action/Label.mjs';
|
|
@@ -90,6 +91,7 @@ export { resolveSetState } from './util/resolveSetState.mjs';
|
|
|
90
91
|
export { MultiSearchWithMapping, MultiSubjectSearchWithMapping, SimpleSearch, SimpleSearchWithMapping } from './util/simpleSearch.mjs';
|
|
91
92
|
export { LocalStorageService, SessionStorageService } from './util/storage.mjs';
|
|
92
93
|
export { NativeProps } from './util/types.mjs';
|
|
94
|
+
export { writeToClipboard } from './util/writeToClipboard.mjs';
|
|
93
95
|
import 'react/jsx-runtime';
|
|
94
96
|
import 'react';
|
|
95
97
|
import '@tanstack/react-table';
|
package/dist/index.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export { TableFilterButton, TableFilterButtonProps, TableFilterType } from './co
|
|
|
51
51
|
export { TableSortButton, TableSortButtonProps } from './components/table/TableSortButton.js';
|
|
52
52
|
export { ButtonColorUtil, ButtonProps, ButtonUtil, IconButton, IconButtonColor, IconButtonProps, IconButtonUtil, OutlineButton, OutlineButtonColor, OutlineButtonProps, SolidButton, SolidButtonColor, SolidButtonProps, TextButton, TextButtonColor, TextButtonProps } from './components/user-action/Button.js';
|
|
53
53
|
export { Checkbox, CheckboxProps, CheckboxUncontrolled } from './components/user-action/Checkbox.js';
|
|
54
|
+
export { CopyToClipboardWrapper, CopyToClipboardWrapperProps } from './components/user-action/CopyToClipboardWrapper.js';
|
|
54
55
|
export { DateTimePicker, DateTimePickerMode, DateTimePickerProps } from './components/user-action/DateAndTimePicker.js';
|
|
55
56
|
export { EditCompleteOptions, EditCompleteOptionsResolved, FormInput, FormInputProps, Input, InputProps, InputUncontrolled } from './components/user-action/Input.js';
|
|
56
57
|
export { Label, LabelProps, LabelType } from './components/user-action/Label.js';
|
|
@@ -90,6 +91,7 @@ export { resolveSetState } from './util/resolveSetState.js';
|
|
|
90
91
|
export { MultiSearchWithMapping, MultiSubjectSearchWithMapping, SimpleSearch, SimpleSearchWithMapping } from './util/simpleSearch.js';
|
|
91
92
|
export { LocalStorageService, SessionStorageService } from './util/storage.js';
|
|
92
93
|
export { NativeProps } from './util/types.js';
|
|
94
|
+
export { writeToClipboard } from './util/writeToClipboard.js';
|
|
93
95
|
import 'react/jsx-runtime';
|
|
94
96
|
import 'react';
|
|
95
97
|
import '@tanstack/react-table';
|