@koobiq/react-components 0.0.1-beta.7 → 0.0.1-beta.9
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/AnimatedIcon/AnimatedIcon.d.ts +4 -0
- package/dist/components/AnimatedIcon/AnimatedIcon.js +50 -0
- package/dist/components/AnimatedIcon/AnimatedIcon.module.css.js +11 -0
- package/dist/components/AnimatedIcon/index.d.ts +2 -0
- package/dist/components/AnimatedIcon/types.d.ts +19 -0
- package/dist/components/Checkbox/Checkbox.js +17 -7
- package/dist/components/FieldComponents/FieldInputGroup/FieldInputGroup.d.ts +8 -2
- package/dist/components/FieldComponents/FieldInputGroup/FieldInputGroup.js +32 -30
- package/dist/components/Input/Input.d.ts +1 -0
- package/dist/components/Input/Input.js +11 -11
- package/dist/components/Input/types.d.ts +2 -1
- package/dist/components/Link/Link.js +13 -15
- package/dist/components/List/types.d.ts +2 -0
- package/dist/components/Popover/Popover.js +1 -1
- package/dist/components/RadioGroup/components/Radio/Radio.js +2 -1
- package/dist/components/RadioGroup/components/Radio/Radio.module.css.js +3 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/style.css +70 -25
- package/package.json +5 -5
- package/dist/components/Input/components/FieldAddon/FieldAddon.d.ts +0 -10
- package/dist/components/Input/components/FieldAddon/index.d.ts +0 -1
- package/dist/components/Input/components/FieldCaption/FieldCaption.d.ts +0 -6
- package/dist/components/Input/components/FieldCaption/index.d.ts +0 -1
- package/dist/components/Input/components/FieldControl/FieldControl.d.ts +0 -9
- package/dist/components/Input/components/FieldControl/index.d.ts +0 -1
- package/dist/components/Input/components/FieldError/FieldError.d.ts +0 -7
- package/dist/components/Input/components/FieldError/index.d.ts +0 -1
- package/dist/components/Input/components/FieldInput/FieldInput.d.ts +0 -9
- package/dist/components/Input/components/FieldInput/index.d.ts +0 -1
- package/dist/components/Input/components/FieldInputGroup/FieldInputGroup.d.ts +0 -7
- package/dist/components/Input/components/FieldInputGroup/index.d.ts +0 -1
- package/dist/components/Input/components/FieldLabel/FieldLabel.d.ts +0 -9
- package/dist/components/Input/components/FieldLabel/index.d.ts +0 -1
- package/dist/components/Input/components/index.d.ts +0 -7
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, ElementType } from 'react';
|
|
2
|
+
import type { AnimatedIconBaseProps } from './index';
|
|
3
|
+
export declare const AnimatedIcon: import("@koobiq/react-core").PolyForwardComponent<"span", AnimatedIconBaseProps, ElementType>;
|
|
4
|
+
export type AnimatedIconProps<As extends ElementType = 'span'> = ComponentPropsWithRef<typeof AnimatedIcon<As>>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { polymorphicForwardRef, useRefs, clsx } from "@koobiq/react-core";
|
|
4
|
+
import { Transition } from "react-transition-group";
|
|
5
|
+
import s from "./AnimatedIcon.module.css.js";
|
|
6
|
+
const AnimatedIcon = polymorphicForwardRef((props, ref) => {
|
|
7
|
+
const {
|
|
8
|
+
transition = 300,
|
|
9
|
+
as: Tag = "span",
|
|
10
|
+
activeIndex = 0,
|
|
11
|
+
directions,
|
|
12
|
+
className,
|
|
13
|
+
icons = [],
|
|
14
|
+
style: styleProp,
|
|
15
|
+
...other
|
|
16
|
+
} = props;
|
|
17
|
+
const refs = useRefs(icons.length);
|
|
18
|
+
const singleIcon = icons?.[0];
|
|
19
|
+
const innerRender = icons.length === 1 ? singleIcon : icons.map((icon, index) => /* @__PURE__ */ jsx(
|
|
20
|
+
Transition,
|
|
21
|
+
{
|
|
22
|
+
in: activeIndex === index,
|
|
23
|
+
timeout: transition,
|
|
24
|
+
nodeRef: refs[index],
|
|
25
|
+
unmountOnExit: true,
|
|
26
|
+
children: (transition2) => /* @__PURE__ */ jsx(
|
|
27
|
+
"span",
|
|
28
|
+
{
|
|
29
|
+
className: s.icon,
|
|
30
|
+
"data-index": index,
|
|
31
|
+
ref: refs[index],
|
|
32
|
+
"data-transition": transition2,
|
|
33
|
+
children: icon
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
},
|
|
37
|
+
index
|
|
38
|
+
));
|
|
39
|
+
const style = {
|
|
40
|
+
...styleProp,
|
|
41
|
+
"--animated-icon-transition": `${transition}ms`,
|
|
42
|
+
...typeof directions?.[activeIndex] === "number" && {
|
|
43
|
+
"--animated-icon-direction": `rotate(${directions[activeIndex]}deg)`
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
return /* @__PURE__ */ jsx(Tag, { ...other, className: clsx(s.base, className), style, ref, children: innerRender });
|
|
47
|
+
});
|
|
48
|
+
export {
|
|
49
|
+
AnimatedIcon
|
|
50
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentRef, CSSProperties, ReactNode } from 'react';
|
|
2
|
+
export type AnimatedIconBaseProps = {
|
|
3
|
+
/** A list of icons. */
|
|
4
|
+
icons?: ReactNode[];
|
|
5
|
+
/** A list of directions for the icons. */
|
|
6
|
+
directions?: number[];
|
|
7
|
+
/**
|
|
8
|
+
* Animation duration in milliseconds.
|
|
9
|
+
* @default 300
|
|
10
|
+
* */
|
|
11
|
+
transition?: number;
|
|
12
|
+
/** Index of the active icon. */
|
|
13
|
+
activeIndex?: number;
|
|
14
|
+
/** Additional CSS-classes. */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Inline styles. */
|
|
17
|
+
style?: CSSProperties;
|
|
18
|
+
};
|
|
19
|
+
export type AnimatedIconRef = ComponentRef<'span'>;
|
|
@@ -5,6 +5,7 @@ import { mergeProps, clsx, isNotNil } from "@koobiq/react-core";
|
|
|
5
5
|
import { IconCheckS16, IconMinusS16 } from "@koobiq/react-icons";
|
|
6
6
|
import { Checkbox as Checkbox$1 } from "@koobiq/react-primitives";
|
|
7
7
|
import s from "./Checkbox.module.css.js";
|
|
8
|
+
import { AnimatedIcon } from "../AnimatedIcon/AnimatedIcon.js";
|
|
8
9
|
const Checkbox = forwardRef(
|
|
9
10
|
(props, ref) => {
|
|
10
11
|
const {
|
|
@@ -47,13 +48,22 @@ const Checkbox = forwardRef(
|
|
|
47
48
|
"data-indeterminate": indeterminate,
|
|
48
49
|
...commonProps,
|
|
49
50
|
ref,
|
|
50
|
-
children: ({ checked, indeterminate: indeterminate2 }) =>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
children: ({ checked, indeterminate: indeterminate2 }) => {
|
|
52
|
+
const activeIndex = indeterminate2 ? 1 : Number(Boolean(checked)) - 1;
|
|
53
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
54
|
+
/* @__PURE__ */ jsx("span", { ...boxProps, children: /* @__PURE__ */ jsx(
|
|
55
|
+
AnimatedIcon,
|
|
56
|
+
{
|
|
57
|
+
icons: [
|
|
58
|
+
/* @__PURE__ */ jsx(IconCheckS16, {}, "checked"),
|
|
59
|
+
/* @__PURE__ */ jsx(IconMinusS16, {}, "indeterminate")
|
|
60
|
+
],
|
|
61
|
+
activeIndex
|
|
62
|
+
}
|
|
63
|
+
) }),
|
|
64
|
+
isNotNil(children) && /* @__PURE__ */ jsx("span", { ...labelProps, children })
|
|
65
|
+
] });
|
|
66
|
+
}
|
|
57
67
|
}
|
|
58
68
|
);
|
|
59
69
|
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type ExtendableComponentPropsWithRef } from '@koobiq/react-core';
|
|
3
|
-
|
|
3
|
+
import { type FieldAddonProps } from '../FieldAddon';
|
|
4
|
+
export type FieldInputGroupProps = ExtendableComponentPropsWithRef<{
|
|
4
5
|
children?: ReactNode;
|
|
5
6
|
startAddon?: ReactNode;
|
|
6
7
|
endAddon?: ReactNode;
|
|
7
8
|
disabled?: boolean;
|
|
8
9
|
className?: string;
|
|
9
10
|
error?: boolean;
|
|
11
|
+
/** The props used for each slot inside. */
|
|
12
|
+
slotProps?: {
|
|
13
|
+
start?: FieldAddonProps;
|
|
14
|
+
end?: FieldAddonProps;
|
|
15
|
+
};
|
|
10
16
|
}, 'div'>;
|
|
11
|
-
export declare const FieldInputGroup: import("react").ForwardRefExoticComponent<Omit<
|
|
17
|
+
export declare const FieldInputGroup: import("react").ForwardRefExoticComponent<Omit<FieldInputGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -5,36 +5,38 @@ import { useInputContext, Group } from "@koobiq/react-primitives";
|
|
|
5
5
|
import s from "./FieldInputGroup.module.css.js";
|
|
6
6
|
import { FieldInputGroupContext } from "./FieldInputGroupContext.js";
|
|
7
7
|
import { FieldAddon } from "../FieldAddon/FieldAddon.js";
|
|
8
|
-
const FieldInputGroup = forwardRef(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
8
|
+
const FieldInputGroup = forwardRef(
|
|
9
|
+
({ children, className, startAddon, endAddon, error, slotProps, ...other }, ref) => {
|
|
10
|
+
const { value } = useInputContext();
|
|
11
|
+
const hasStartAddon = !!startAddon;
|
|
12
|
+
const hasEndAddon = !!endAddon;
|
|
13
|
+
const hasValue = isNotNil(value);
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
Group,
|
|
16
|
+
{
|
|
17
|
+
className: clsx(
|
|
18
|
+
s.base,
|
|
19
|
+
hasStartAddon && s.hasStartAddon,
|
|
20
|
+
hasEndAddon && s.hasEndAddon,
|
|
21
|
+
className
|
|
22
|
+
),
|
|
23
|
+
...other,
|
|
24
|
+
ref,
|
|
25
|
+
children: ({ hovered, focusWithin, disabled }) => /* @__PURE__ */ jsxs(
|
|
26
|
+
FieldInputGroupContext.Provider,
|
|
27
|
+
{
|
|
28
|
+
value: { disabled, hovered, hasValue, focusWithin },
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ jsx(FieldAddon, { placement: "start", error, ...slotProps?.start, children: startAddon }),
|
|
31
|
+
children,
|
|
32
|
+
/* @__PURE__ */ jsx(FieldAddon, { placement: "end", error, ...slotProps?.end, children: endAddon })
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
);
|
|
38
40
|
FieldInputGroup.displayName = "FieldInputGroup";
|
|
39
41
|
export {
|
|
40
42
|
FieldInputGroup
|
|
@@ -17,6 +17,7 @@ export declare const Input: import("react").ForwardRefExoticComponent<Omit<Omit<
|
|
|
17
17
|
label?: import("../FieldComponents").FieldLabelProps;
|
|
18
18
|
input?: import("../FieldComponents").FieldInputProps;
|
|
19
19
|
caption?: import("../FieldComponents").FieldCaptionProps;
|
|
20
|
+
group?: import("../FieldComponents").FieldInputGroupProps;
|
|
20
21
|
errorMessage?: import("../FieldComponents").FieldErrorProps;
|
|
21
22
|
};
|
|
22
23
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -21,7 +21,7 @@ const Input = forwardRef((props, ref) => {
|
|
|
21
21
|
caption,
|
|
22
22
|
...other
|
|
23
23
|
} = props;
|
|
24
|
-
const
|
|
24
|
+
const inputRef = useDOMRef(ref);
|
|
25
25
|
const rootProps = mergeProps(
|
|
26
26
|
{
|
|
27
27
|
label,
|
|
@@ -42,23 +42,23 @@ const Input = forwardRef((props, ref) => {
|
|
|
42
42
|
error,
|
|
43
43
|
variant,
|
|
44
44
|
disabled,
|
|
45
|
-
ref:
|
|
45
|
+
ref: inputRef
|
|
46
46
|
},
|
|
47
47
|
slotProps?.input
|
|
48
48
|
);
|
|
49
|
+
const groupProps = mergeProps(
|
|
50
|
+
{
|
|
51
|
+
error,
|
|
52
|
+
endAddon,
|
|
53
|
+
startAddon
|
|
54
|
+
},
|
|
55
|
+
slotProps?.group
|
|
56
|
+
);
|
|
49
57
|
const captionProps = slotProps?.caption;
|
|
50
58
|
const errorProps = mergeProps({ error }, slotProps?.errorMessage);
|
|
51
59
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52
60
|
/* @__PURE__ */ jsx(FieldLabel, { ...labelProps, children: labelProps?.children || label }),
|
|
53
|
-
/* @__PURE__ */ jsx(
|
|
54
|
-
FieldInputGroup,
|
|
55
|
-
{
|
|
56
|
-
error,
|
|
57
|
-
endAddon,
|
|
58
|
-
startAddon,
|
|
59
|
-
children: /* @__PURE__ */ jsx(FieldInput, { ...inputProps })
|
|
60
|
-
}
|
|
61
|
-
),
|
|
61
|
+
/* @__PURE__ */ jsx(FieldInputGroup, { ...groupProps, children: /* @__PURE__ */ jsx(FieldInput, { ...inputProps }) }),
|
|
62
62
|
/* @__PURE__ */ jsx(FieldCaption, { ...captionProps, children: captionProps?.children || caption }),
|
|
63
63
|
/* @__PURE__ */ jsx(FieldError, { ...errorProps, children: errorProps.children || errorMessage })
|
|
64
64
|
] });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentRef, CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import type { ExtendableProps } from '@koobiq/react-core';
|
|
3
3
|
import type { UseTextFieldProps } from '@koobiq/react-primitives';
|
|
4
|
-
import type { FieldCaptionProps, FieldErrorProps, FieldInputProps, FieldLabelProps } from '../FieldComponents';
|
|
4
|
+
import type { FieldCaptionProps, FieldErrorProps, FieldInputProps, FieldLabelProps, FieldInputGroupProps } from '../FieldComponents';
|
|
5
5
|
export declare const inputPropVariant: readonly ["filled", "transparent"];
|
|
6
6
|
export type InputPropVariant = (typeof inputPropVariant)[number];
|
|
7
7
|
export type InputProps = ExtendableProps<{
|
|
@@ -56,6 +56,7 @@ export type InputProps = ExtendableProps<{
|
|
|
56
56
|
label?: FieldLabelProps;
|
|
57
57
|
input?: FieldInputProps;
|
|
58
58
|
caption?: FieldCaptionProps;
|
|
59
|
+
group?: FieldInputGroupProps;
|
|
59
60
|
errorMessage?: FieldErrorProps;
|
|
60
61
|
};
|
|
61
62
|
}, Omit<UseTextFieldProps, 'inputElementType'>>;
|
|
@@ -1,33 +1,31 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { polymorphicForwardRef,
|
|
4
|
-
import {
|
|
3
|
+
import { polymorphicForwardRef, clsx } from "@koobiq/react-core";
|
|
4
|
+
import { Link as Link$1 } from "@koobiq/react-primitives";
|
|
5
5
|
import s from "./Link.module.css.js";
|
|
6
6
|
const Link = polymorphicForwardRef((props, ref) => {
|
|
7
7
|
const {
|
|
8
8
|
variant = "text-normal",
|
|
9
9
|
visitable = false,
|
|
10
10
|
pseudo = false,
|
|
11
|
+
disabled,
|
|
11
12
|
as = "a",
|
|
12
13
|
startIcon,
|
|
13
14
|
endIcon,
|
|
14
15
|
children,
|
|
15
16
|
className,
|
|
16
|
-
|
|
17
|
+
...other
|
|
17
18
|
} = props;
|
|
18
|
-
const Tag = as;
|
|
19
|
-
const domRef = useDOMRef(ref);
|
|
20
|
-
const elementType = as !== "a" && as !== "button" ? `${as}` : void 0;
|
|
21
|
-
const { linkProps, hovered, pressed, focusVisible } = useLink(
|
|
22
|
-
{ ...props, elementType },
|
|
23
|
-
domRef
|
|
24
|
-
);
|
|
25
19
|
const hasIcon = Boolean(startIcon || endIcon);
|
|
20
|
+
const elementType = as !== "a" && as !== "button" ? `${as}` : void 0;
|
|
26
21
|
return /* @__PURE__ */ jsxs(
|
|
27
|
-
|
|
22
|
+
Link$1,
|
|
28
23
|
{
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
as,
|
|
25
|
+
disabled,
|
|
26
|
+
elementType,
|
|
27
|
+
...disabled && { tabIndex: -1 },
|
|
28
|
+
className: ({ hovered, pressed, focusVisible }) => clsx(
|
|
31
29
|
s.base,
|
|
32
30
|
s[variant],
|
|
33
31
|
pseudo && s.pseudo,
|
|
@@ -38,8 +36,8 @@ const Link = polymorphicForwardRef((props, ref) => {
|
|
|
38
36
|
focusVisible && s.focusVisible,
|
|
39
37
|
className
|
|
40
38
|
),
|
|
41
|
-
|
|
42
|
-
ref
|
|
39
|
+
...other,
|
|
40
|
+
ref,
|
|
43
41
|
children: [
|
|
44
42
|
startIcon,
|
|
45
43
|
children,
|
|
@@ -40,6 +40,8 @@ export type ListBaseProps<T extends object> = {
|
|
|
40
40
|
onAction?: ListPropOnAction<T>;
|
|
41
41
|
/** How multiple selection should behave in the collection. */
|
|
42
42
|
selectionBehavior?: ListPropSelectionBehavior<T>;
|
|
43
|
+
/** Whether to autofocus the list or an option. */
|
|
44
|
+
autoFocus?: boolean | 'first' | 'last';
|
|
43
45
|
/** The props used for each slot inside. */
|
|
44
46
|
slotProps?: {
|
|
45
47
|
label?: TypographyProps;
|
|
@@ -68,7 +68,7 @@ const Popover = forwardRef(
|
|
|
68
68
|
triggerRef: anchorRef || controlRef,
|
|
69
69
|
isKeyboardDismissDisabled: disableExitOnEscapeKeyDown
|
|
70
70
|
},
|
|
71
|
-
{ ...state, isOpen: opened }
|
|
71
|
+
{ ...state, isOpen: openState || opened }
|
|
72
72
|
);
|
|
73
73
|
const resolvedChildren = () => {
|
|
74
74
|
if (typeof children === "function")
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { mergeProps, isNotNil, clsx } from "@koobiq/react-core";
|
|
4
|
+
import { IconCircleXs16 } from "@koobiq/react-icons";
|
|
4
5
|
import { Radio as Radio$1 } from "@koobiq/react-primitives";
|
|
5
6
|
import s from "./Radio.module.css.js";
|
|
6
7
|
import { useRadioGroupState } from "../../RadioContext.js";
|
|
@@ -33,7 +34,7 @@ const Radio = forwardRef(
|
|
|
33
34
|
const circleProps = mergeProps({ className: s.circle }, slotProps?.circle);
|
|
34
35
|
const labelProps = slotProps?.label;
|
|
35
36
|
return /* @__PURE__ */ jsxs(Radio$1, { ...commonProps, ref, children: [
|
|
36
|
-
/* @__PURE__ */ jsx("span", { ...circleProps }),
|
|
37
|
+
/* @__PURE__ */ jsx("span", { ...circleProps, children: /* @__PURE__ */ jsx(IconCircleXs16, { className: s.icon }) }),
|
|
37
38
|
isNotNil(children) && /* @__PURE__ */ jsx("span", { ...labelProps, children })
|
|
38
39
|
] });
|
|
39
40
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const base = "kbq-radio-c3ed31";
|
|
2
2
|
const circle = "kbq-radio-circle-a0903b";
|
|
3
|
+
const icon = "kbq-radio-icon-148a68";
|
|
3
4
|
const normal = "kbq-radio-normal-81ed3e";
|
|
4
5
|
const big = "kbq-radio-big-06db10";
|
|
5
6
|
const hovered = "kbq-radio-hovered-3999f1";
|
|
@@ -12,6 +13,7 @@ const end = "kbq-radio-end-8689f9";
|
|
|
12
13
|
const s = {
|
|
13
14
|
base,
|
|
14
15
|
circle,
|
|
16
|
+
icon,
|
|
15
17
|
normal,
|
|
16
18
|
big,
|
|
17
19
|
hovered,
|
|
@@ -33,6 +35,7 @@ export {
|
|
|
33
35
|
error,
|
|
34
36
|
focusVisible,
|
|
35
37
|
hovered,
|
|
38
|
+
icon,
|
|
36
39
|
normal,
|
|
37
40
|
start
|
|
38
41
|
};
|
package/dist/index.js
CHANGED
|
@@ -58,10 +58,12 @@ import { List, ListRender } from "./components/List/List.js";
|
|
|
58
58
|
import { listPropSelectionMode } from "./components/List/types.js";
|
|
59
59
|
import { ListItem } from "./components/List/ListItem.js";
|
|
60
60
|
import { ListSection } from "./components/List/ListSection.js";
|
|
61
|
+
import { AnimatedIcon } from "./components/AnimatedIcon/AnimatedIcon.js";
|
|
61
62
|
import { flex, flexPropAlignItems, flexPropDirection, flexPropFlex, flexPropGap, flexPropJustifyContent, flexPropOrder, flexPropWrap } from "./components/layout/flex/flex.js";
|
|
62
63
|
import { spacing, spacingGap } from "./components/layout/spacing/spacing.js";
|
|
63
64
|
export {
|
|
64
65
|
Alert,
|
|
66
|
+
AnimatedIcon,
|
|
65
67
|
Badge,
|
|
66
68
|
BreakpointsContext,
|
|
67
69
|
BreakpointsProvider,
|
package/dist/style.css
CHANGED
|
@@ -1497,19 +1497,60 @@
|
|
|
1497
1497
|
.kbq-checkbox-end-0c77de {
|
|
1498
1498
|
flex-direction: row;
|
|
1499
1499
|
}
|
|
1500
|
+
.kbq-animatedicon-61fd86 {
|
|
1501
|
+
--animated-icon-direction: ;
|
|
1502
|
+
--animated-icon-transition-function: cubic-bezier(.7, 0, .5, 1);
|
|
1503
|
+
--animated-icon-transition: .3s;
|
|
1504
|
+
transition: transform var(--animated-icon-transition) var(--animated-icon-transition-function);
|
|
1505
|
+
transform: var(--animated-icon-direction);
|
|
1506
|
+
justify-content: center;
|
|
1507
|
+
align-items: center;
|
|
1508
|
+
display: inline-flex;
|
|
1509
|
+
position: relative;
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
.kbq-animatedicon-icon-2feff8 {
|
|
1513
|
+
transition: transform var(--animated-icon-transition) var(--animated-icon-transition-function), opacity var(--animated-icon-transition) var(--animated-icon-transition-function);
|
|
1514
|
+
justify-content: center;
|
|
1515
|
+
align-items: center;
|
|
1516
|
+
display: inline-flex;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
.kbq-animatedicon-icon-2feff8[data-transition="entering"] {
|
|
1520
|
+
opacity: 1;
|
|
1521
|
+
position: absolute;
|
|
1522
|
+
transform: scale(1);
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
.kbq-animatedicon-icon-2feff8[data-transition="entered"] {
|
|
1526
|
+
opacity: 1;
|
|
1527
|
+
transform: scale(1);
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
.kbq-animatedicon-icon-2feff8[data-transition="exiting"] {
|
|
1531
|
+
opacity: 0;
|
|
1532
|
+
position: absolute;
|
|
1533
|
+
transform: scale(.1);
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
.kbq-animatedicon-icon-2feff8[data-transition="exited"] {
|
|
1537
|
+
opacity: 0;
|
|
1538
|
+
transform: scale(.1);
|
|
1539
|
+
}
|
|
1500
1540
|
.kbq-link-093ccd {
|
|
1501
1541
|
--link-gap: var(--kbq-size-xxs);
|
|
1502
1542
|
--link-outline-width: var(--kbq-size-3xs);
|
|
1503
1543
|
cursor: pointer;
|
|
1504
1544
|
color: var(--kbq-foreground-theme);
|
|
1545
|
+
outline: var(--link-outline-width) solid;
|
|
1505
1546
|
text-decoration: underline;
|
|
1506
1547
|
-webkit-text-decoration-color: var(--kbq-line-theme-less);
|
|
1507
1548
|
text-decoration-color: var(--kbq-line-theme-less);
|
|
1549
|
+
transition: color var(--kbq-transition-default), outline var(--kbq-transition-default), text-decoration-color var(--kbq-transition-default);
|
|
1508
1550
|
background: none;
|
|
1509
1551
|
border: none;
|
|
1510
|
-
outline:
|
|
1552
|
+
outline-color: #0000;
|
|
1511
1553
|
padding: 0;
|
|
1512
|
-
transition: color;
|
|
1513
1554
|
}
|
|
1514
1555
|
|
|
1515
1556
|
.kbq-link-093ccd[aria-disabled="true"] {
|
|
@@ -1518,6 +1559,7 @@
|
|
|
1518
1559
|
text-decoration: none;
|
|
1519
1560
|
-webkit-text-decoration-color: var(--kbq-states-line-disabled);
|
|
1520
1561
|
text-decoration-color: var(--kbq-states-line-disabled);
|
|
1562
|
+
outline-color: #0000;
|
|
1521
1563
|
}
|
|
1522
1564
|
|
|
1523
1565
|
.kbq-link-hovered-1916bc {
|
|
@@ -1534,6 +1576,7 @@
|
|
|
1534
1576
|
|
|
1535
1577
|
.kbq-link-focusVisible-a98307 {
|
|
1536
1578
|
color: var(--kbq-foreground-theme);
|
|
1579
|
+
outline-color: var(--kbq-states-line-focus-theme);
|
|
1537
1580
|
-webkit-text-decoration-color: var(--kbq-line-theme-less);
|
|
1538
1581
|
text-decoration-color: var(--kbq-line-theme-less);
|
|
1539
1582
|
}
|
|
@@ -1556,13 +1599,8 @@
|
|
|
1556
1599
|
text-decoration-color: var(--kbq-line-visited);
|
|
1557
1600
|
}
|
|
1558
1601
|
|
|
1559
|
-
.kbq-link-pseudo-5f21eb:where(:not(.kbq-link-pressed-0b493d, .kbq-link-hovered-1916bc)) {
|
|
1560
|
-
text-decoration:
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
.kbq-link-pseudo-5f21eb:where(.kbq-link-focusVisible-a98307) {
|
|
1564
|
-
outline: var(--link-outline-width) solid var(--kbq-states-line-focus-theme);
|
|
1565
|
-
outline-offset: -1px;
|
|
1602
|
+
.kbq-link-pseudo-5f21eb:where(:not(.kbq-link-pressed-0b493d, .kbq-link-hovered-1916bc)), .kbq-link-pseudo-5f21eb[aria-disabled="true"] {
|
|
1603
|
+
text-decoration-color: #0000;
|
|
1566
1604
|
}
|
|
1567
1605
|
|
|
1568
1606
|
.kbq-link-hasIcon-ea84d7 {
|
|
@@ -1976,6 +2014,10 @@
|
|
|
1976
2014
|
--field-input-placeholder-color: var(--kbq-foreground-error-tertiary);
|
|
1977
2015
|
}
|
|
1978
2016
|
|
|
2017
|
+
.kbq-fieldinput-disabled-59285a {
|
|
2018
|
+
cursor: not-allowed;
|
|
2019
|
+
}
|
|
2020
|
+
|
|
1979
2021
|
.kbq-fieldinput-filled-abb632:where(.kbq-fieldinput-disabled-59285a) {
|
|
1980
2022
|
--field-input-color: var(--kbq-states-foreground-disabled);
|
|
1981
2023
|
--field-input-border-color: var(--kbq-states-line-disabled);
|
|
@@ -2062,10 +2104,10 @@
|
|
|
2062
2104
|
--radio-border-radius: 50%;
|
|
2063
2105
|
--radio-icon-color: transparent;
|
|
2064
2106
|
--radio-outline-color: transparent;
|
|
2065
|
-
--radio-color: var(--kbq-foreground-contrast);
|
|
2066
2107
|
--radio-icon-size: var(--kbq-size-xs);
|
|
2067
2108
|
--radio-outline-width: var(--kbq-size-3xs);
|
|
2068
2109
|
--radio-bg-color: var(--kbq-background-bg);
|
|
2110
|
+
--radio-color: var(--kbq-foreground-contrast);
|
|
2069
2111
|
--radio-border-width: var(--kbq-size-border-width);
|
|
2070
2112
|
--radio-border-color: var(--kbq-line-contrast-fade);
|
|
2071
2113
|
cursor: pointer;
|
|
@@ -2085,24 +2127,19 @@
|
|
|
2085
2127
|
margin-block: var(--radio-margin-block);
|
|
2086
2128
|
border-radius: var(--radio-border-radius);
|
|
2087
2129
|
border: var(--radio-border-width) solid var(--radio-border-color);
|
|
2088
|
-
transition: background-color var(--kbq-transition-default), border var(--kbq-transition-default), outline-color var(--kbq-transition-default)
|
|
2130
|
+
transition: background-color var(--kbq-transition-default), border var(--kbq-transition-default), outline-color var(--kbq-transition-default);
|
|
2089
2131
|
outline-offset: calc(-1 * var(--radio-outline-width) / 2);
|
|
2090
2132
|
outline: var(--radio-outline-width) solid var(--radio-outline-color);
|
|
2091
|
-
|
|
2133
|
+
justify-content: center;
|
|
2134
|
+
align-items: center;
|
|
2135
|
+
display: flex;
|
|
2092
2136
|
}
|
|
2093
2137
|
|
|
2094
|
-
.kbq-radio-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
transition: opacity var(--kbq-transition-default);
|
|
2100
|
-
background-color: currentColor;
|
|
2101
|
-
border-radius: 50%;
|
|
2102
|
-
position: absolute;
|
|
2103
|
-
inset-block-start: 50%;
|
|
2104
|
-
inset-inline-start: 50%;
|
|
2105
|
-
transform: translate(-50%, -50%);
|
|
2138
|
+
.kbq-radio-icon-148a68 {
|
|
2139
|
+
opacity: 0;
|
|
2140
|
+
transition: transform var(--kbq-transition-slow), opacity var(--kbq-transition-slow);
|
|
2141
|
+
flex-shrink: 0;
|
|
2142
|
+
transform: scale(.1);
|
|
2106
2143
|
}
|
|
2107
2144
|
|
|
2108
2145
|
.kbq-radio-normal-81ed3e {
|
|
@@ -2145,6 +2182,11 @@
|
|
|
2145
2182
|
--radio-opacity: 1;
|
|
2146
2183
|
}
|
|
2147
2184
|
|
|
2185
|
+
.kbq-radio-checked-a71e68 .kbq-radio-icon-148a68 {
|
|
2186
|
+
opacity: 1;
|
|
2187
|
+
transform: scale(1);
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2148
2190
|
.kbq-radio-checked-a71e68:where(.kbq-radio-hovered-3999f1) {
|
|
2149
2191
|
--radio-icon-color: var(--kbq-white-default);
|
|
2150
2192
|
--radio-bg-color: var(--kbq-states-background-theme-hover);
|
|
@@ -2503,6 +2545,7 @@
|
|
|
2503
2545
|
outline: none;
|
|
2504
2546
|
flex-direction: column;
|
|
2505
2547
|
flex-grow: 1;
|
|
2548
|
+
min-block-size: 48px;
|
|
2506
2549
|
display: flex;
|
|
2507
2550
|
position: relative;
|
|
2508
2551
|
}
|
|
@@ -2688,7 +2731,6 @@
|
|
|
2688
2731
|
.kbq-popover-f14dc5 {
|
|
2689
2732
|
--popover-inline-size: ;
|
|
2690
2733
|
border-radius: var(--kbq-size-m);
|
|
2691
|
-
min-block-size: 48px;
|
|
2692
2734
|
box-shadow: var(--kbq-shadow-overlay);
|
|
2693
2735
|
background-color: var(--kbq-background-bg);
|
|
2694
2736
|
inline-size: var(--popover-inline-size);
|
|
@@ -2905,6 +2947,7 @@
|
|
|
2905
2947
|
transform: var(--popover-transform);
|
|
2906
2948
|
}
|
|
2907
2949
|
.kbq-list-928929 {
|
|
2950
|
+
outline: none;
|
|
2908
2951
|
margin: 0;
|
|
2909
2952
|
padding: 0;
|
|
2910
2953
|
list-style: none;
|
|
@@ -2922,6 +2965,7 @@
|
|
|
2922
2965
|
}
|
|
2923
2966
|
|
|
2924
2967
|
.kbq-listsection-heading-5bd9e3 {
|
|
2968
|
+
box-sizing: border-box;
|
|
2925
2969
|
padding: var(--kbq-size-s) var(--kbq-size-m);
|
|
2926
2970
|
}
|
|
2927
2971
|
.kbq-listoption-8693c5 {
|
|
@@ -2929,6 +2973,7 @@
|
|
|
2929
2973
|
--list-item-outline-color: transparent;
|
|
2930
2974
|
--list-item-outline-width: var(--kbq-size-3xs);
|
|
2931
2975
|
cursor: pointer;
|
|
2976
|
+
box-sizing: border-box;
|
|
2932
2977
|
gap: var(--kbq-size-s);
|
|
2933
2978
|
border-radius: var(--kbq-size-s);
|
|
2934
2979
|
color: var(--kbq-foreground-contrast);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koobiq/react-components",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.9",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"@koobiq/design-tokens": "^3.12.1",
|
|
23
23
|
"@types/react-transition-group": "^4.4.12",
|
|
24
24
|
"react-transition-group": "^4.4.5",
|
|
25
|
-
"@koobiq/logger": "0.0.1-beta.
|
|
26
|
-
"@koobiq/react-
|
|
27
|
-
"@koobiq/react-
|
|
28
|
-
"@koobiq/react-
|
|
25
|
+
"@koobiq/logger": "0.0.1-beta.9",
|
|
26
|
+
"@koobiq/react-core": "0.0.1-beta.9",
|
|
27
|
+
"@koobiq/react-primitives": "0.0.1-beta.9",
|
|
28
|
+
"@koobiq/react-icons": "0.0.1-beta.9"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"@koobiq/design-tokens": "^3.11.2",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { ExtendableComponentPropsWithRef } from '@koobiq/react-core';
|
|
3
|
-
export declare const fieldAddonPropPlacement: readonly ["start", "end"];
|
|
4
|
-
export type FieldAddonPlacement = (typeof fieldAddonPropPlacement)[number];
|
|
5
|
-
export type FieldAddonProps = ExtendableComponentPropsWithRef<{
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
placement?: FieldAddonPlacement;
|
|
8
|
-
error?: boolean;
|
|
9
|
-
}, 'div'>;
|
|
10
|
-
export declare const FieldAddon: import("react").ForwardRefExoticComponent<Omit<FieldAddonProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FieldAddon';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { ExtendableComponentPropsWithRef } from '@koobiq/react-core';
|
|
3
|
-
export type FieldCaptionProps = ExtendableComponentPropsWithRef<{
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
}, 'div'>;
|
|
6
|
-
export declare const FieldCaption: import("react").ForwardRefExoticComponent<Omit<FieldCaptionProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FieldCaption';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import { type ExtendableComponentPropsWithRef } from '@koobiq/react-core';
|
|
3
|
-
export type FieldControlProps = ExtendableComponentPropsWithRef<{
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
fullWidth?: boolean;
|
|
6
|
-
error?: boolean;
|
|
7
|
-
className?: string;
|
|
8
|
-
}, 'div'>;
|
|
9
|
-
export declare const FieldControl: import("react").ForwardRefExoticComponent<Omit<FieldControlProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FieldControl';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { ExtendableComponentPropsWithRef } from '@koobiq/react-core';
|
|
3
|
-
export type FieldErrorProps = ExtendableComponentPropsWithRef<{
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
error?: boolean;
|
|
6
|
-
}, 'div'>;
|
|
7
|
-
export declare const FieldError: import("react").ForwardRefExoticComponent<Omit<FieldErrorProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FieldError';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { useTextField } from '@koobiq/react-primitives';
|
|
2
|
-
import type { InputPropVariant } from '../../types';
|
|
3
|
-
export type FieldInputProps = {
|
|
4
|
-
error?: boolean;
|
|
5
|
-
variant?: InputPropVariant;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
className?: string;
|
|
8
|
-
} & ReturnType<typeof useTextField>['inputProps'];
|
|
9
|
-
export declare const FieldInput: import("@koobiq/react-core").PolyForwardComponent<"input", FieldInputProps, import("react").ElementType>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FieldInput';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import { type ExtendableComponentPropsWithRef } from '@koobiq/react-core';
|
|
3
|
-
export type FieldInputGroupProps = ExtendableComponentPropsWithRef<{
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
className?: string;
|
|
6
|
-
}, 'div'>;
|
|
7
|
-
export declare const FieldInputGroup: import("react").ForwardRefExoticComponent<Omit<FieldInputGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FieldInputGroup';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { ExtendableComponentPropsWithRef } from '@koobiq/react-core';
|
|
3
|
-
export type FieldLabelProps = ExtendableComponentPropsWithRef<{
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
className?: string;
|
|
6
|
-
hiddenLabel?: boolean;
|
|
7
|
-
required?: boolean;
|
|
8
|
-
}, 'label'>;
|
|
9
|
-
export declare const FieldLabel: import("react").ForwardRefExoticComponent<Omit<FieldLabelProps, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FieldLabel';
|