@povio/ui 0.0.10 → 2.1.0
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/Menu/MenuItem.js +2 -1
- package/dist/components/buttons/Button/Button.d.ts +3 -2
- package/dist/components/buttons/Button/Button.js +6 -1
- package/dist/components/buttons/Button/button.cva.d.ts +5 -5
- package/dist/components/buttons/Button/button.cva.js +188 -214
- package/dist/components/buttons/IconButton/IconButton.d.ts +3 -2
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +3 -2
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +1 -1
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +2 -0
- package/dist/components/buttons/PillButton/pillButton.cva.js +227 -45
- package/dist/components/buttons/SplitButton/SplitButton.d.ts +3 -2
- package/dist/components/buttons/SplitButton/SplitButton.js +2 -2
- package/dist/components/buttons/TextButton/TextButton.d.ts +3 -2
- package/dist/components/buttons/TextButton/TextButton.js +1 -1
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +2 -19
- package/dist/components/inputs/Checkbox/checkbox.cva.js +4 -0
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +3 -3
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +1 -1
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +1 -1
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +6 -4
- package/dist/components/inputs/File/FileUpload.js +2 -2
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +3 -3
- package/dist/components/inputs/File/shared/InputUploadContent.js +1 -2
- package/dist/components/inputs/File/shared/ProgressBar.d.ts +6 -0
- package/dist/components/inputs/File/shared/ProgressBar.js +42 -0
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +1 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.js +1 -11
- package/dist/components/inputs/RadioGroup/radio.cva.js +12 -2
- package/dist/components/inputs/shared/input.cva.js +23 -17
- package/dist/components/inputs/shared/label.cva.js +9 -14
- package/dist/components/overlays/Modal/Modal.d.ts +2 -1
- package/dist/components/overlays/Modal/Modal.js +7 -3
- package/dist/components/overlays/Tooltip/Tooltip.js +9 -1
- package/dist/components/overlays/Tooltip/tooltip.cva.js +4 -4
- package/dist/components/segment/SegmentItem.js +9 -8
- package/dist/components/shared/pagination/PaginationList.d.ts +1 -1
- package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
- package/dist/components/status/Toast/Toast.js +2 -1
- package/dist/components/text/Link/Link.d.ts +3 -1
- package/dist/components/text/Link/Link.js +7 -1
- package/dist/config/link.context.d.ts +10 -0
- package/dist/config/link.context.js +19 -0
- package/dist/hooks/useFilters.d.ts +5 -1
- package/dist/hooks/useFilters.js +123 -69
- package/dist/index.d.ts +3 -4
- package/dist/index.js +5 -3
- package/dist/utils/vendor/acl/AclGuard.d.ts +5 -5
- package/dist/utils/vendor/acl/AclGuard.js +2 -3
- package/dist/utils/vendor/auth/auth.context.d.ts +2 -1
- package/dist/utils/vendor/auth/auth.context.js +2 -0
- package/package.json +1 -1
- package/dist/components/inputs/File/shared/FileProgressBar.d.ts +0 -3
- package/dist/components/inputs/File/shared/FileProgressBar.js +0 -32
- package/dist/utils/vendor/auth/withPrivateAuthGuard.d.ts +0 -6
- package/dist/utils/vendor/auth/withPrivateAuthGuard.js +0 -17
|
@@ -24,7 +24,8 @@ const menuItemClass = clsx(
|
|
|
24
24
|
"bg-elevation-fill-default-1 text-interactive-text-secondary-idle",
|
|
25
25
|
"disabled:cursor-default disabled:text-interactive-text-secondary-disabled",
|
|
26
26
|
"hover:bg-elevation-fill-default-1 hover:text-interactive-text-secondary-hover",
|
|
27
|
-
"open:bg-interactive-contained-primary-idle open:text-interactive-
|
|
27
|
+
"open:bg-interactive-contained-primary-idle open:text-interactive-contained-primary-on-idle",
|
|
28
|
+
"open:hover:bg-interactive-contained-primary-hover open:hover:text-interactive-contained-primary-on-hover",
|
|
28
29
|
"focus-visible:bg-elevation-fill-default-1 focus-visible:text-interactive-text-secondary-hover"
|
|
29
30
|
);
|
|
30
31
|
export {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FC, ReactElement, SVGProps } from 'react';
|
|
2
|
-
import { ButtonProps as AriaButtonProps,
|
|
2
|
+
import { ButtonProps as AriaButtonProps, ToggleButtonProps as AriaToggleButtonProps } from 'react-aria-components';
|
|
3
3
|
import { ButtonContentVariantProps } from '../shared/buttonContent.cva';
|
|
4
|
+
import { LinkNavigationProps } from '../../text/Link/Link';
|
|
4
5
|
import { ButtonVariantProps } from './button.cva';
|
|
5
6
|
export type ButtonIconProps<IconOnly extends boolean = false> = {
|
|
6
7
|
iconOnly?: IconOnly;
|
|
@@ -18,7 +19,7 @@ type ToggleButtonProps = {
|
|
|
18
19
|
export type ButtonProps<IconOnly extends boolean = false> = ButtonVariantProps & ButtonContentVariantProps & AriaButtonProps & ButtonIconProps<IconOnly> & ToggleButtonProps & {
|
|
19
20
|
children: string;
|
|
20
21
|
isLoading?: boolean;
|
|
21
|
-
link?:
|
|
22
|
+
link?: LinkNavigationProps;
|
|
22
23
|
noDisableWhenLoading?: boolean;
|
|
23
24
|
iconClassName?: string;
|
|
24
25
|
disableTooltip?: boolean;
|
|
@@ -3,6 +3,7 @@ import { clsx } from "clsx";
|
|
|
3
3
|
import { Link, ToggleButton, Button as Button$1 } from "react-aria-components";
|
|
4
4
|
import { ButtonContent } from "../shared/ButtonContent.js";
|
|
5
5
|
import { TooltipEllipsis } from "../../overlays/Tooltip/TooltipEllipsis.js";
|
|
6
|
+
import { LinkContext } from "../../../config/link.context.js";
|
|
6
7
|
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
7
8
|
import { button, buttonSize, buttonContent, buttonIconSize, buttonTypography } from "./button.cva.js";
|
|
8
9
|
const Button = ({
|
|
@@ -17,6 +18,7 @@ const Button = ({
|
|
|
17
18
|
disableTooltip,
|
|
18
19
|
...props
|
|
19
20
|
}) => {
|
|
21
|
+
const linkContext = LinkContext.useLinkContext();
|
|
20
22
|
const uiStyle = UIStyle.useConfig();
|
|
21
23
|
const buttonCva = uiStyle?.button?.cva ?? button;
|
|
22
24
|
const buttonSizeCva = uiStyle?.button?.sizeCva ?? buttonSize;
|
|
@@ -25,13 +27,16 @@ const Button = ({
|
|
|
25
27
|
const typographyMap = uiStyle?.button?.typography ?? buttonTypography;
|
|
26
28
|
const Component = (() => {
|
|
27
29
|
if (link) {
|
|
28
|
-
return Link;
|
|
30
|
+
return linkContext?.LinkComponent ?? Link;
|
|
29
31
|
}
|
|
30
32
|
if (props.toggle != null) {
|
|
31
33
|
return ToggleButton;
|
|
32
34
|
}
|
|
33
35
|
return Button$1;
|
|
34
36
|
})();
|
|
37
|
+
if (link && !link.to && link.href) {
|
|
38
|
+
link.to = link.href;
|
|
39
|
+
}
|
|
35
40
|
return /* @__PURE__ */ jsx(
|
|
36
41
|
TooltipEllipsis,
|
|
37
42
|
{
|
|
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import { TypographyVariantProps } from '../../text/Typography/typography.cva';
|
|
3
3
|
export declare const button: (props?: ({
|
|
4
4
|
width?: "fill" | "hug" | null | undefined;
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "none" | "xs" | "s" | "m" | "l" | null | undefined;
|
|
6
6
|
color?: "primary" | "secondary" | "success" | "warning" | "error" | "dual" | null | undefined;
|
|
7
7
|
variant?: "contained" | "outlined" | "subtle" | "text" | "ghost" | null | undefined;
|
|
8
8
|
inverted?: boolean | null | undefined;
|
|
@@ -10,21 +10,21 @@ export declare const button: (props?: ({
|
|
|
10
10
|
export interface ButtonVariantProps extends VariantProps<typeof button> {
|
|
11
11
|
}
|
|
12
12
|
export declare const buttonSize: (props?: ({
|
|
13
|
-
size?: "
|
|
13
|
+
size?: "none" | "xs" | "s" | "m" | "l" | null | undefined;
|
|
14
14
|
iconOnly?: boolean | null | undefined;
|
|
15
15
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
16
16
|
export declare const buttonContent: (props?: ({
|
|
17
|
-
size?: "
|
|
17
|
+
size?: "none" | "xs" | "s" | "m" | "l" | null | undefined;
|
|
18
18
|
iconPosition?: "none" | "left" | "right" | null | undefined;
|
|
19
19
|
iconOnly?: boolean | null | undefined;
|
|
20
20
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
21
21
|
export declare const buttonIconSize: (props?: ({
|
|
22
|
-
size?: "
|
|
22
|
+
size?: "none" | "xs" | "s" | "m" | "l" | null | undefined;
|
|
23
23
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
24
24
|
export declare const buttonTypography: (props: {
|
|
25
25
|
color?: "primary" | "secondary" | "success" | "warning" | "error" | "dual" | null | undefined;
|
|
26
26
|
width?: "fill" | "hug" | null | undefined;
|
|
27
|
-
size?: "
|
|
27
|
+
size?: "none" | "xs" | "s" | "m" | "l" | null | undefined;
|
|
28
28
|
variant?: "contained" | "outlined" | "subtle" | "text" | "ghost" | null | undefined;
|
|
29
29
|
inverted?: boolean | null | undefined;
|
|
30
30
|
}) => TypographyVariantProps | undefined;
|