@povio/ui 3.4.0-rc.17 → 3.4.0-rc.19
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/README.md +20 -1
- package/dist/components/Menu/Menu.d.ts +23 -0
- package/dist/components/Menu/Menu.js +27 -0
- package/dist/components/Menu/MenuItem.d.ts +1 -1
- package/dist/components/Menu/MenuPopover.d.ts +1 -1
- package/dist/components/accordion.d.ts +3 -5
- package/dist/components/accordion.js +1 -80
- package/dist/components/action-modal.d.ts +1 -1
- package/dist/components/action-modal.js +1 -1
- package/dist/components/alert.js +1 -1
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/checkbox-group.js +2 -2
- package/dist/components/checkbox.js +2 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +3 -3
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +4 -4
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +3 -3
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +3 -3
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +1 -1
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +2 -2
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +1 -1
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +1 -1
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +2 -2
- package/dist/components/inputs/DateTime/shared/YearPicker.js +1 -1
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentError.js +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +1 -1
- package/dist/components/inputs/File/shared/InputUploadContent.js +1 -1
- package/dist/components/inputs/File/shared/InputUploadFilled.js +1 -1
- package/dist/components/inputs/File/shared/ProgressBar.js +1 -1
- package/dist/components/inputs/FormField/FormFieldHeader.js +1 -1
- package/dist/components/inputs/Input/shared/InputContent.js +1 -1
- package/dist/components/inputs/Inputs/InputItem.d.ts +1 -1
- package/dist/components/inputs/Inputs/InputItem.js +5 -5
- package/dist/components/inputs/Selection/Select/Select.js +2 -2
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +3 -3
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +1 -1
- package/dist/components/inputs/Skeleton/InputFrame.js +1 -1
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +1 -1
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +1 -1
- package/dist/components/menu.d.ts +3 -23
- package/dist/components/menu.js +3 -27
- package/dist/components/navigation/Accordion/Accordion.d.ts +5 -0
- package/dist/components/navigation/Accordion/Accordion.js +81 -0
- package/dist/components/navigation/Accordion/AccordionItem.js +1 -1
- package/dist/components/navigation/Stepper/Stepper.d.ts +5 -0
- package/dist/components/navigation/Stepper/Stepper.js +79 -0
- package/dist/components/navigation/Stepper/StepperItem.js +1 -1
- package/dist/components/number-input.js +3 -3
- package/dist/components/number-range-input.js +2 -2
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +1 -1
- package/dist/components/{shared/pagination/PaginationList.d.ts → pagination-list.d.ts} +1 -1
- package/dist/components/{shared/pagination/PaginationList.js → pagination-list.js} +3 -3
- package/dist/components/pagination.d.ts +1 -1
- package/dist/components/pagination.js +2 -2
- package/dist/components/pill.d.ts +1 -1
- package/dist/components/pill.js +1 -1
- package/dist/components/progress-bar.d.ts +2 -0
- package/dist/components/progress-bar.js +2 -0
- package/dist/components/radio-group.js +1 -1
- package/dist/components/segment/Segment.d.ts +7 -0
- package/dist/components/segment/Segment.js +245 -0
- package/dist/components/segment/SegmentItem.js +1 -1
- package/dist/components/segment.d.ts +3 -7
- package/dist/components/segment.js +1 -244
- package/dist/components/slider.js +1 -1
- package/dist/components/split-button.d.ts +1 -1
- package/dist/components/split-button.js +1 -1
- package/dist/components/status/Toast/Toast.d.ts +17 -0
- package/dist/components/status/Toast/Toast.js +82 -0
- package/dist/components/stepper.d.ts +3 -5
- package/dist/components/stepper.js +1 -78
- package/dist/components/table/CellText.d.ts +1 -1
- package/dist/components/table/CellText.js +1 -1
- package/dist/components/table/ColumnConfig.d.ts +6 -4
- package/dist/components/table/ColumnConfig.js +1 -1
- package/dist/components/table/HeaderText.d.ts +1 -1
- package/dist/components/table/HeaderText.js +1 -1
- package/dist/components/table/InfiniteTable.d.ts +4 -3
- package/dist/components/table/PaginatedTable.d.ts +4 -4
- package/dist/components/table/Table.d.ts +13 -9
- package/dist/components/table/Table.js +8 -8
- package/dist/components/tag.d.ts +1 -1
- package/dist/components/tag.js +1 -1
- package/dist/components/text/Typography/Typography.d.ts +12 -0
- package/dist/components/text/Typography/Typography.js +31 -0
- package/dist/components/text-area.js +1 -1
- package/dist/components/text-input.js +2 -2
- package/dist/components/toast.d.ts +2 -16
- package/dist/components/toast.js +1 -81
- package/dist/components/tooltip.js +1 -1
- package/dist/components/typography.d.ts +2 -11
- package/dist/components/typography.js +1 -30
- package/dist/components/use-toast.d.ts +16 -0
- package/dist/components/{status/Toast/useToast.js → use-toast.js} +1 -1
- package/dist/config/confirmation.d.ts +2 -0
- package/dist/config/confirmation.js +2 -0
- package/dist/config/link-context.d.ts +3 -0
- package/dist/config/link-context.js +2 -0
- package/dist/config/resources.d.ts +2 -0
- package/dist/config/resources.js +2 -0
- package/dist/config/theme-context.d.ts +2 -0
- package/dist/config/theme-context.js +2 -0
- package/dist/config/ui-config.d.ts +2 -0
- package/dist/config/ui-config.js +2 -0
- package/dist/config/ui-overrides.d.ts +2 -0
- package/dist/config/ui-overrides.js +2 -0
- package/dist/config/ui-router.d.ts +2 -0
- package/dist/config/ui-router.js +2 -0
- package/dist/config/uiConfig.context.d.ts +1 -1
- package/dist/helpers/dynamicColumns.d.ts +13 -10
- package/dist/helpers/dynamicInputs.d.ts +1 -1
- package/dist/hooks/use-filters.d.ts +2 -0
- package/dist/hooks/use-filters.js +2 -0
- package/dist/hooks/use-local-storage.d.ts +2 -0
- package/dist/hooks/use-local-storage.js +2 -0
- package/dist/hooks/use-translation-memo.d.ts +2 -0
- package/dist/hooks/use-translation-memo.js +2 -0
- package/dist/hooks/useTableColumnConfig.d.ts +7 -5
- package/dist/hooks/useTableNav.js +1 -1
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +2 -0
- package/dist/index.d.ts +59 -39
- package/dist/index.js +43 -23
- package/dist/rhf/Inputs.d.ts +19 -1
- package/dist/rhf/{Inputs.js → Inputs2.js} +18 -1
- package/dist/rhf/autocomplete.d.ts +15 -2
- package/dist/rhf/autocomplete.js +8 -1
- package/dist/rhf/checkbox-group.d.ts +8 -2
- package/dist/rhf/checkbox-group.js +8 -1
- package/dist/rhf/checkbox.d.ts +8 -2
- package/dist/rhf/checkbox.js +8 -1
- package/dist/rhf/components.d.ts +30 -69
- package/dist/rhf/date-picker.d.ts +8 -2
- package/dist/rhf/date-picker.js +9 -1
- package/dist/rhf/date-range-picker.d.ts +8 -2
- package/dist/rhf/date-range-picker.js +9 -1
- package/dist/rhf/date-time-picker.d.ts +8 -2
- package/dist/rhf/date-time-picker.js +9 -1
- package/dist/rhf/date.transforms.js +15 -0
- package/dist/rhf/entry.utils.js +19 -2
- package/dist/rhf/file-upload.d.ts +10 -0
- package/dist/rhf/file-upload.js +7 -0
- package/dist/rhf/input-upload.d.ts +10 -0
- package/dist/rhf/input-upload.js +7 -0
- package/dist/rhf/inputs.js +3 -0
- package/dist/rhf/inputs2.d.ts +6 -0
- package/dist/rhf/number-input.js +2 -2
- package/dist/rhf/number-range-input.js +2 -2
- package/dist/rhf/password-input.js +2 -2
- package/dist/rhf/query-autocomplete.d.ts +14 -2
- package/dist/rhf/query-autocomplete.js +8 -1
- package/dist/rhf/query-select.d.ts +15 -2
- package/dist/rhf/query-select.js +8 -1
- package/dist/rhf/radio-group.d.ts +8 -2
- package/dist/rhf/radio-group.js +8 -1
- package/dist/rhf/segment.d.ts +8 -2
- package/dist/rhf/segment.js +6 -1
- package/dist/rhf/select.d.ts +15 -2
- package/dist/rhf/select.js +8 -1
- package/dist/rhf/slider.d.ts +7 -2
- package/dist/rhf/slider.js +6 -1
- package/dist/rhf/text-area.js +2 -2
- package/dist/rhf/text-editor.d.ts +8 -0
- package/dist/rhf/text-editor.js +7 -0
- package/dist/rhf/text-input.js +1 -1
- package/dist/rhf/time-picker.d.ts +8 -2
- package/dist/rhf/time-picker.js +9 -1
- package/dist/rhf/toggle.d.ts +8 -2
- package/dist/rhf/toggle.js +8 -1
- package/dist/rhf.d.ts +60 -39
- package/dist/rhf.js +43 -23
- package/dist/styles/input.d.ts +2 -0
- package/dist/styles/input.js +0 -0
- package/dist/styles/outline.d.ts +2 -0
- package/dist/styles/outline.js +2 -0
- package/dist/tanstack/file-upload.d.ts +3 -0
- package/dist/tanstack/file-upload.js +2 -0
- package/dist/tanstack/form.d.ts +2 -1
- package/dist/tanstack/form.js +2 -1
- package/dist/tanstack/input-upload.d.ts +3 -0
- package/dist/tanstack/input-upload.js +2 -0
- package/dist/tanstack/inputs.d.ts +6 -0
- package/dist/tanstack/inputs.js +3 -0
- package/dist/tanstack/segment.d.ts +1 -1
- package/dist/tanstack/segment.js +1 -1
- package/dist/tanstack/table.d.ts +2 -1
- package/dist/tanstack/table.js +2 -1
- package/dist/tanstack/text-editor.d.ts +2 -0
- package/dist/tanstack/text-editor.js +2 -0
- package/dist/tanstack.d.ts +40 -40
- package/dist/tanstack.js +30 -30
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +0 -0
- package/dist/utils/compound-mapper.d.ts +2 -0
- package/dist/utils/compound-mapper.js +2 -0
- package/dist/utils/date-time.d.ts +2 -0
- package/dist/utils/date-time.js +2 -0
- package/dist/utils/date.d.ts +2 -0
- package/dist/utils/date.js +2 -0
- package/dist/utils/file.d.ts +2 -0
- package/dist/utils/file.js +2 -0
- package/dist/utils/intl.d.ts +2 -0
- package/dist/utils/intl.js +2 -0
- package/dist/utils/logger.js +1 -18
- package/dist/utils/logger2.d.ts +2 -0
- package/dist/utils/logger2.js +19 -0
- package/dist/utils/string.d.ts +2 -0
- package/dist/utils/string.js +2 -0
- package/package.json +197 -10
- package/dist/components/status/Toast/useToast.d.ts +0 -16
- package/dist/rhf/components.js +0 -101
- /package/dist/styles/{editor.css → styles/editor.css} +0 -0
package/dist/components/tag.d.ts
CHANGED
package/dist/components/tag.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UIOverrides } from "../config/uiOverrides.context.js";
|
|
2
|
-
import { Typography } from "./
|
|
2
|
+
import { Typography } from "./text/Typography/Typography.js";
|
|
3
3
|
import { UIConfig } from "../config/uiConfig.context.js";
|
|
4
4
|
import "../config/i18n.js";
|
|
5
5
|
import { tagDefinition } from "./text/Tag/tag.cva.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TypographyVariantProps } from "./typography.cva.js";
|
|
2
|
+
import { HTMLAttributes, Ref } from "react";
|
|
3
|
+
//#region src/components/text/Typography/Typography.d.ts
|
|
4
|
+
type TypographyTag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "div";
|
|
5
|
+
interface TypographyPropsCva extends Omit<TypographyVariantProps, "size">, Required<Pick<TypographyVariantProps, "size">> {}
|
|
6
|
+
interface TypographyProps extends TypographyPropsCva, HTMLAttributes<HTMLElement> {
|
|
7
|
+
ref?: Ref<HTMLHeadingElement>;
|
|
8
|
+
as?: TypographyTag;
|
|
9
|
+
}
|
|
10
|
+
declare const Typography: ({ as, className, ...props }: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Typography, TypographyProps, TypographyPropsCva };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
|
+
import { typographyDefinition } from "./typography.cva.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/text/Typography/Typography.tsx
|
|
6
|
+
const Typography = (t0) => {
|
|
7
|
+
const $ = c(4);
|
|
8
|
+
const { as: t1, className, ...props } = t0;
|
|
9
|
+
const as = t1 === void 0 ? "p" : t1;
|
|
10
|
+
const typographyCva = UIOverrides.useCva("typography.cva", typographyDefinition);
|
|
11
|
+
const Tag = as;
|
|
12
|
+
const t2 = typographyCva({
|
|
13
|
+
...props,
|
|
14
|
+
sizeMobile: props.sizeMobile ?? props.size,
|
|
15
|
+
className
|
|
16
|
+
});
|
|
17
|
+
let t3;
|
|
18
|
+
if ($[0] !== Tag || $[1] !== props || $[2] !== t2) {
|
|
19
|
+
t3 = /* @__PURE__ */ jsx(Tag, {
|
|
20
|
+
className: t2,
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
$[0] = Tag;
|
|
24
|
+
$[1] = props;
|
|
25
|
+
$[2] = t2;
|
|
26
|
+
$[3] = t3;
|
|
27
|
+
} else t3 = $[3];
|
|
28
|
+
return t3;
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { Typography };
|
|
@@ -3,8 +3,8 @@ import { UIConfig } from "../config/uiConfig.context.js";
|
|
|
3
3
|
import { FieldController } from "./inputs/shared/form.binding.js";
|
|
4
4
|
import { FormFieldLabel } from "./inputs/FormField/FormFieldLabel.js";
|
|
5
5
|
import { FormField } from "./form-field.js";
|
|
6
|
-
import { inputSideDefinition, inputSizeDefinition, useInputCva } from "./inputs/shared/input.cva.js";
|
|
7
6
|
import { InputClear } from "./inputs/shared/InputClear.js";
|
|
7
|
+
import { inputSideDefinition, inputSizeDefinition, useInputCva } from "./inputs/shared/input.cva.js";
|
|
8
8
|
import { TooltipWrapper } from "./inputs/shared/TooltipWrapper.js";
|
|
9
9
|
import { textAreaWrapperDefinition } from "./inputs/Input/TextArea/TextArea.cva.js";
|
|
10
10
|
import { clsx } from "clsx";
|
|
@@ -4,10 +4,10 @@ import { FieldController } from "./inputs/shared/form.binding.js";
|
|
|
4
4
|
import { FormField } from "./form-field.js";
|
|
5
5
|
import { inputBaseDefinition } from "./inputs/shared/input.cva.js";
|
|
6
6
|
import { TooltipWrapper } from "./inputs/shared/TooltipWrapper.js";
|
|
7
|
-
import { InputFrame } from "./inputs/Skeleton/InputFrame.js";
|
|
8
|
-
import { useStaticInputHandoff } from "./inputs/shared/useStaticInputHandoff.js";
|
|
9
7
|
import { InputContent } from "./inputs/Input/shared/InputContent.js";
|
|
8
|
+
import { InputFrame } from "./inputs/Skeleton/InputFrame.js";
|
|
10
9
|
import { useFieldAccessibility } from "./inputs/shared/useFieldAccessibility.js";
|
|
10
|
+
import { useStaticInputHandoff } from "./inputs/shared/useStaticInputHandoff.js";
|
|
11
11
|
import { clsx } from "clsx";
|
|
12
12
|
import { memo, useEffect, useRef, useState } from "react";
|
|
13
13
|
import { Input } from "react-aria-components";
|
|
@@ -1,17 +1,3 @@
|
|
|
1
1
|
import { ToastVariantProps } from "./status/Toast/toast.cva.js";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
interface ToastAction {
|
|
5
|
-
text: string;
|
|
6
|
-
onPress: () => void;
|
|
7
|
-
}
|
|
8
|
-
interface ToastProps extends ToastVariantProps {
|
|
9
|
-
text: ReactNode;
|
|
10
|
-
isLoading?: boolean;
|
|
11
|
-
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
12
|
-
actions?: ToastAction[];
|
|
13
|
-
}
|
|
14
|
-
declare const Toast: ({ text, isLoading, actions, icon: Icon, ...props }: ToastProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
declare const ToastContainer: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
//#endregion
|
|
17
|
-
export { Toast, ToastAction, ToastContainer, ToastProps };
|
|
2
|
+
import { Toast, ToastAction, ToastContainer, ToastProps } from "./status/Toast/Toast.js";
|
|
3
|
+
export { Toast, type ToastAction, ToastContainer, type ToastProps, type ToastVariantProps };
|
package/dist/components/toast.js
CHANGED
|
@@ -1,82 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Typography } from "./typography.js";
|
|
3
|
-
import { Loader } from "./loader.js";
|
|
4
|
-
import { UIConfig } from "../config/uiConfig.context.js";
|
|
5
|
-
import { Button } from "./buttons/Button/Button.js";
|
|
6
|
-
import { buttonColorVariant, statusIconDefinition, statusSeparatorDefinition, toastContainerDefinition, toastDefinition, toastWrapper } from "./status/Toast/toast.cva.js";
|
|
7
|
-
import { c } from "react/compiler-runtime";
|
|
8
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { ToastContainer as ToastContainer$1 } from "react-toastify";
|
|
10
|
-
//#region src/components/status/Toast/Toast.tsx
|
|
11
|
-
const Toast = ({ text, isLoading = false, actions = [], icon: Icon, ...props }) => {
|
|
12
|
-
const uiConfig = UIConfig.useConfig();
|
|
13
|
-
const { variant = uiConfig.toast.variant, ...restProps } = props;
|
|
14
|
-
const toastCva = UIOverrides.useCva("toast.cva", toastDefinition);
|
|
15
|
-
const buttonColor = UIOverrides.useMapper("toast.buttonColor", buttonColorVariant);
|
|
16
|
-
const iconCva = UIOverrides.useCva("status.iconCva", statusIconDefinition);
|
|
17
|
-
const separatorCva = UIOverrides.useCva("status.separatorCva", statusSeparatorDefinition);
|
|
18
|
-
const variantProps = {
|
|
19
|
-
variant,
|
|
20
|
-
...restProps
|
|
21
|
-
};
|
|
22
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
23
|
-
className: toastCva(variantProps),
|
|
24
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
25
|
-
className: "flex items-start gap-toast-gap-icon-to-text px-toast-side-default py-toast-height-content",
|
|
26
|
-
children: [
|
|
27
|
-
isLoading && /* @__PURE__ */ jsx(Loader, {
|
|
28
|
-
size: "default",
|
|
29
|
-
className: "shrink-0"
|
|
30
|
-
}),
|
|
31
|
-
!isLoading && Icon && /* @__PURE__ */ jsx(Icon, { className: iconCva(variantProps) }),
|
|
32
|
-
/* @__PURE__ */ jsx(Typography, {
|
|
33
|
-
size: "label-2",
|
|
34
|
-
children: text
|
|
35
|
-
})
|
|
36
|
-
]
|
|
37
|
-
}), actions.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", { className: separatorCva(variantProps) }), /* @__PURE__ */ jsx("div", {
|
|
38
|
-
className: "flex w-full shrink-0 flex-wrap items-center justify-end gap-toast-gap-action px-toast-side-default py-toast-height-actions-mobile md:w-auto md:justify-center md:py-toast-height-actions-desktop",
|
|
39
|
-
children: actions.map(({ text: buttonText, onPress }) => /* @__PURE__ */ jsx(Button, {
|
|
40
|
-
onPress,
|
|
41
|
-
...buttonColor(variantProps),
|
|
42
|
-
variant: "text",
|
|
43
|
-
size: "none",
|
|
44
|
-
width: "hug",
|
|
45
|
-
children: buttonText
|
|
46
|
-
}, buttonText))
|
|
47
|
-
})] })]
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
const ToastContainer = () => {
|
|
51
|
-
const $ = c(6);
|
|
52
|
-
const uiConfig = UIConfig.useConfig();
|
|
53
|
-
const containerCva = UIOverrides.useCva("toast.containerCva", toastContainerDefinition);
|
|
54
|
-
let t0;
|
|
55
|
-
if ($[0] !== containerCva || $[1] !== uiConfig.toast.position) {
|
|
56
|
-
t0 = (params) => containerCva({
|
|
57
|
-
position: params?.position ?? uiConfig.toast.position,
|
|
58
|
-
className: params?.defaultClassName
|
|
59
|
-
});
|
|
60
|
-
$[0] = containerCva;
|
|
61
|
-
$[1] = uiConfig.toast.position;
|
|
62
|
-
$[2] = t0;
|
|
63
|
-
} else t0 = $[2];
|
|
64
|
-
let t1;
|
|
65
|
-
if ($[3] !== t0 || $[4] !== uiConfig.toast.position) {
|
|
66
|
-
t1 = /* @__PURE__ */ jsx(ToastContainer$1, {
|
|
67
|
-
position: uiConfig.toast.position,
|
|
68
|
-
className: t0,
|
|
69
|
-
toastClassName: toastWrapper,
|
|
70
|
-
autoClose: 2500,
|
|
71
|
-
icon: false,
|
|
72
|
-
closeButton: false,
|
|
73
|
-
hideProgressBar: true
|
|
74
|
-
});
|
|
75
|
-
$[3] = t0;
|
|
76
|
-
$[4] = uiConfig.toast.position;
|
|
77
|
-
$[5] = t1;
|
|
78
|
-
} else t1 = $[5];
|
|
79
|
-
return t1;
|
|
80
|
-
};
|
|
81
|
-
//#endregion
|
|
1
|
+
import { Toast, ToastContainer } from "./status/Toast/Toast.js";
|
|
82
2
|
export { Toast, ToastContainer };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIOverrides } from "../config/uiOverrides.context.js";
|
|
2
2
|
import { tooltipDefinition, tooltipPointerHorizontalDefinition, tooltipPointerVerticalDefinition, tooltipTextDefinition } from "./overlays/Tooltip/tooltip.cva.js";
|
|
3
|
-
import { Typography } from "./
|
|
3
|
+
import { Typography } from "./text/Typography/Typography.js";
|
|
4
4
|
import { Triangle, TriangleRight } from "lucide-react";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import { clsx } from "clsx";
|
|
@@ -1,12 +1,3 @@
|
|
|
1
1
|
import { TypographyVariantProps } from "./text/Typography/typography.cva.js";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
type TypographyTag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "div";
|
|
5
|
-
interface TypographyPropsCva extends Omit<TypographyVariantProps, "size">, Required<Pick<TypographyVariantProps, "size">> {}
|
|
6
|
-
interface TypographyProps extends TypographyPropsCva, HTMLAttributes<HTMLElement> {
|
|
7
|
-
ref?: Ref<HTMLHeadingElement>;
|
|
8
|
-
as?: TypographyTag;
|
|
9
|
-
}
|
|
10
|
-
declare const Typography: ({ as, className, ...props }: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { Typography, TypographyProps, TypographyPropsCva };
|
|
2
|
+
import { Typography, TypographyProps } from "./text/Typography/Typography.js";
|
|
3
|
+
export { Typography, type TypographyProps, type TypographyVariantProps };
|
|
@@ -1,31 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { typographyDefinition } from "./text/Typography/typography.cva.js";
|
|
3
|
-
import { c } from "react/compiler-runtime";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
//#region src/components/text/Typography/Typography.tsx
|
|
6
|
-
const Typography = (t0) => {
|
|
7
|
-
const $ = c(4);
|
|
8
|
-
const { as: t1, className, ...props } = t0;
|
|
9
|
-
const as = t1 === void 0 ? "p" : t1;
|
|
10
|
-
const typographyCva = UIOverrides.useCva("typography.cva", typographyDefinition);
|
|
11
|
-
const Tag = as;
|
|
12
|
-
const t2 = typographyCva({
|
|
13
|
-
...props,
|
|
14
|
-
sizeMobile: props.sizeMobile ?? props.size,
|
|
15
|
-
className
|
|
16
|
-
});
|
|
17
|
-
let t3;
|
|
18
|
-
if ($[0] !== Tag || $[1] !== props || $[2] !== t2) {
|
|
19
|
-
t3 = /* @__PURE__ */ jsx(Tag, {
|
|
20
|
-
className: t2,
|
|
21
|
-
...props
|
|
22
|
-
});
|
|
23
|
-
$[0] = Tag;
|
|
24
|
-
$[1] = props;
|
|
25
|
-
$[2] = t2;
|
|
26
|
-
$[3] = t3;
|
|
27
|
-
} else t3 = $[3];
|
|
28
|
-
return t3;
|
|
29
|
-
};
|
|
30
|
-
//#endregion
|
|
1
|
+
import { Typography } from "./text/Typography/Typography.js";
|
|
31
2
|
export { Typography };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ToastProps } from "./status/Toast/Toast.js";
|
|
2
|
+
import { Id, ToastOptions as ToastOptions$1, ToastPosition } from "react-toastify";
|
|
3
|
+
//#region src/components/status/Toast/useToast.d.ts
|
|
4
|
+
interface ToastParams extends Omit<ToastProps, "color"> {
|
|
5
|
+
position?: ToastPosition;
|
|
6
|
+
}
|
|
7
|
+
type ToastOptions = Omit<ToastOptions$1, "position" | "data">;
|
|
8
|
+
declare const useToast: () => {
|
|
9
|
+
successToast: (params: ToastParams, options?: ToastOptions) => Id;
|
|
10
|
+
errorToast: (params: ToastParams, options?: ToastOptions) => Id;
|
|
11
|
+
warningToast: (params: ToastParams, options?: ToastOptions) => Id;
|
|
12
|
+
neutralToast: (params: ToastParams, options?: ToastOptions) => Id;
|
|
13
|
+
closeToast: (id: Id) => void;
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { ToastOptions, ToastParams, useToast };
|
|
@@ -8,7 +8,7 @@ import { SelectBaseProps } from "../components/inputs/Selection/shared/SelectBas
|
|
|
8
8
|
import { SliderProps } from "../components/slider.js";
|
|
9
9
|
import { ToggleProps } from "../components/toggle.js";
|
|
10
10
|
import { ActionModalProps } from "../components/action-modal.js";
|
|
11
|
-
import { ToastProps } from "../components/
|
|
11
|
+
import { ToastProps } from "../components/status/Toast/Toast.js";
|
|
12
12
|
import { TagProps } from "../components/tag.js";
|
|
13
13
|
import { DatePickerProps } from "../components/inputs/DateTime/DatePicker/DatePicker.js";
|
|
14
14
|
import { CellTextProps } from "../components/table/CellText.js";
|
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
import { FieldPath } from "../components/inputs/shared/form.binding.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import { CellContext, ColumnDef, ColumnMeta } from "@tanstack/react-table";
|
|
4
|
+
import { CellContext, ColumnDef, ColumnMeta, RowData, StockFeatures } from "@tanstack/react-table";
|
|
5
5
|
//#region src/helpers/dynamicColumns.d.ts
|
|
6
|
+
type CellContext$1<TData extends RowData, TValue> = CellContext<StockFeatures, TData, TValue>;
|
|
7
|
+
type ColumnDef$1<TData extends RowData, TValue = unknown> = ColumnDef<StockFeatures, TData, TValue>;
|
|
8
|
+
type ColumnMeta$1<TData extends RowData, TValue> = ColumnMeta<StockFeatures, TData, TValue>;
|
|
6
9
|
type NestedTypeFromKey<T, K extends string> = K extends keyof T ? T[K] : K extends `${infer First}.${infer Rest}` ? First extends keyof T ? NestedTypeFromKey<T[First], Rest> : never : never;
|
|
7
10
|
type SchemaType<TSchema extends z.ZodObject<any>> = z.infer<TSchema>;
|
|
8
11
|
type SchemaKey<TSchema extends z.ZodObject<any>> = keyof SchemaType<TSchema>;
|
|
9
12
|
type NestedSchemaKey<TSchema extends z.ZodObject<any>> = FieldPath<SchemaType<TSchema>>;
|
|
10
13
|
type SchemaValue<TSchema extends z.ZodObject<any>> = SchemaType<TSchema>[SchemaKey<TSchema>];
|
|
11
|
-
type ColumnMetaType<TSchema extends z.ZodObject<any>> = ColumnMeta<SchemaType<TSchema>, SchemaValue<TSchema>>;
|
|
14
|
+
type ColumnMetaType<TSchema extends z.ZodObject<any>> = ColumnMeta$1<SchemaType<TSchema>, SchemaValue<TSchema>>;
|
|
12
15
|
type GetNestedValueType<TSchema extends z.ZodObject<any>, K extends string> = NestedTypeFromKey<SchemaType<TSchema>, K>;
|
|
13
16
|
type NestedSchemaKeyOrString<TSchema extends z.ZodObject<any>> = NestedSchemaKey<TSchema> | (string & {});
|
|
14
|
-
type DynamicColumnDef<TSchema extends z.ZodObject<any>, TValue = any> = Omit<ColumnDef<SchemaType<TSchema>, TValue>, "accessorKey" | "cell"> & {
|
|
15
|
-
cell?: ((props: CellContext<SchemaType<TSchema>, TValue>) => any) | NestedSchemaKey<TSchema>;
|
|
17
|
+
type DynamicColumnDef<TSchema extends z.ZodObject<any>, TValue = any> = Omit<ColumnDef$1<SchemaType<TSchema>, TValue>, "accessorKey" | "cell"> & {
|
|
18
|
+
cell?: ((props: CellContext$1<SchemaType<TSchema>, TValue>) => any) | NestedSchemaKey<TSchema>;
|
|
16
19
|
};
|
|
17
|
-
type ColumnsConfig<TSchema extends z.ZodObject<any>> = { [K in NestedSchemaKey<TSchema>]?: DynamicColumnDef<TSchema, GetNestedValueType<TSchema, K>> | ((props: CellContext<SchemaType<TSchema>, GetNestedValueType<TSchema, K>>) => any) | NestedSchemaKey<TSchema> | boolean; };
|
|
18
|
-
type CustomColumnDef<TSchema extends z.ZodObject<any>> = Omit<ColumnDef<SchemaType<TSchema>, any>, "accessorKey" | "cell"> & {
|
|
20
|
+
type ColumnsConfig<TSchema extends z.ZodObject<any>> = { [K in NestedSchemaKey<TSchema>]?: DynamicColumnDef<TSchema, GetNestedValueType<TSchema, K>> | ((props: CellContext$1<SchemaType<TSchema>, GetNestedValueType<TSchema, K>>) => any) | NestedSchemaKey<TSchema> | boolean; };
|
|
21
|
+
type CustomColumnDef<TSchema extends z.ZodObject<any>> = Omit<ColumnDef$1<SchemaType<TSchema>, any>, "accessorKey" | "cell"> & {
|
|
19
22
|
accessorKey?: NestedSchemaKeyOrString<TSchema>;
|
|
20
|
-
cell?: ((props: CellContext<SchemaType<TSchema>, any>) => any) | NestedSchemaKey<TSchema>;
|
|
23
|
+
cell?: ((props: CellContext$1<SchemaType<TSchema>, any>) => any) | NestedSchemaKey<TSchema>;
|
|
21
24
|
};
|
|
22
|
-
type CustomColumnsConfig<TSchema extends z.ZodObject<any>> = Record<string, CustomColumnDef<TSchema> | ((props: CellContext<SchemaType<TSchema>, undefined>) => any) | NestedSchemaKey<TSchema>>;
|
|
25
|
+
type CustomColumnsConfig<TSchema extends z.ZodObject<any>> = Record<string, CustomColumnDef<TSchema> | ((props: CellContext$1<SchemaType<TSchema>, undefined>) => any) | NestedSchemaKey<TSchema>>;
|
|
23
26
|
interface DynamicColumnsOptions<TSchema extends z.ZodObject<any>> {
|
|
24
27
|
columns?: ColumnsConfig<TSchema>;
|
|
25
28
|
customColumns?: CustomColumnsConfig<TSchema>;
|
|
@@ -35,9 +38,9 @@ interface DynamicColumnsOptions<TSchema extends z.ZodObject<any>> {
|
|
|
35
38
|
}
|
|
36
39
|
interface DynamicColumnsParams<TSchema extends z.ZodObject<any>> {
|
|
37
40
|
schema: TSchema;
|
|
38
|
-
preset?: ColumnDef<SchemaType<TSchema>>[];
|
|
41
|
+
preset?: ColumnDef$1<SchemaType<TSchema>>[];
|
|
39
42
|
options: DynamicColumnsOptions<TSchema>;
|
|
40
43
|
}
|
|
41
|
-
declare const dynamicColumns: <TSchema extends z.ZodObject<any>>({ schema, preset, options }: DynamicColumnsParams<TSchema>) => ColumnDef<SchemaType<TSchema>>[];
|
|
44
|
+
declare const dynamicColumns: <TSchema extends z.ZodObject<any>>({ schema, preset, options }: DynamicColumnsParams<TSchema>) => ColumnDef$1<SchemaType<TSchema>>[];
|
|
42
45
|
//#endregion
|
|
43
46
|
export { DynamicColumnsOptions, dynamicColumns };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FormInstance } from "../components/inputs/shared/form.binding.js";
|
|
2
|
-
import { InputComponentProps, InputComponentType, InputDef, InputDefBaseProps, InputWrapperType } from "../components/inputs/Inputs/InputItem.js";
|
|
3
2
|
import { ZodUtils } from "../utils/zod.utils.js";
|
|
3
|
+
import { InputComponentProps, InputComponentType, InputDef, InputDefBaseProps, InputWrapperType } from "../components/inputs/Inputs/InputItem.js";
|
|
4
4
|
import { ReactElement } from "react";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region src/helpers/dynamicInputs.d.ts
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { ColumnDef, ColumnOrderState,
|
|
1
|
+
import { ColumnDef, ColumnOrderState, ColumnVisibilityState, RowData, StockFeatures } from "@tanstack/react-table";
|
|
2
2
|
//#region src/hooks/useTableColumnConfig.d.ts
|
|
3
|
+
type ColumnDef$1<TData extends RowData, TValue = unknown> = ColumnDef<StockFeatures, TData, TValue>;
|
|
4
|
+
type VisibilityState = ColumnVisibilityState;
|
|
3
5
|
interface UseTableColumnConfigOptions {
|
|
4
6
|
visibleColumns?: VisibilityState;
|
|
5
7
|
columnOrder?: ColumnOrderState;
|
|
6
8
|
onVisibilityChange?: (value: VisibilityState) => void;
|
|
7
9
|
onOrderChange?: (value: ColumnOrderState) => void;
|
|
8
10
|
}
|
|
9
|
-
declare function useTableColumnConfig<TData, TValue>(defaultColumns: ColumnDef<TData, TValue>[], options?: UseTableColumnConfigOptions): {
|
|
10
|
-
configColumns: ColumnDef<TData, TValue>[];
|
|
11
|
-
columns: ColumnDef<TData, TValue>[];
|
|
12
|
-
visibleColumns:
|
|
11
|
+
declare function useTableColumnConfig<TData extends RowData, TValue>(defaultColumns: ColumnDef$1<TData, TValue>[], options?: UseTableColumnConfigOptions): {
|
|
12
|
+
configColumns: ColumnDef$1<TData, TValue>[];
|
|
13
|
+
columns: ColumnDef$1<TData, TValue>[];
|
|
14
|
+
visibleColumns: ColumnVisibilityState;
|
|
13
15
|
columnOrder: ColumnOrderState;
|
|
14
16
|
onVisibilityChange: (value: VisibilityState) => void;
|
|
15
17
|
onOrderChange: (value: ColumnOrderState) => void;
|
package/dist/icons.d.ts
ADDED
package/dist/icons.js
ADDED