@koobiq/react-components 0.0.1-beta.27 → 0.0.1-beta.29
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/Badge/Badge.js +24 -15
- package/dist/components/Badge/types.d.ts +11 -4
- package/dist/components/FieldComponents/FieldControl/FieldControl.d.ts +4 -7
- package/dist/components/FieldComponents/FieldControl/FieldControl.js +5 -8
- package/dist/components/FieldComponents/FieldInput/FieldInput.d.ts +1 -1
- package/dist/components/FieldComponents/index.d.ts +0 -1
- package/dist/components/Input/Input.js +2 -1
- package/dist/components/InputNumber/InputNumber.js +3 -2
- package/dist/components/InputNumber/components/InputNumberCounterControls.js +2 -2
- package/dist/components/Select/Select.js +2 -1
- package/dist/components/Table/Table.js +1 -8
- package/dist/components/Table/Table.module.css.js +1 -4
- package/dist/components/Table/types.d.ts +0 -5
- package/dist/components/Textarea/Textarea.js +2 -1
- package/dist/components/Tooltip/Tooltip.d.ts +5 -2
- package/dist/components/Tooltip/Tooltip.js +22 -7
- package/dist/components/Tooltip/types.d.ts +23 -5
- package/dist/components/index.d.ts +1 -0
- package/dist/index.js +4 -2
- package/dist/style.css +1 -19
- package/package.json +5 -5
- package/dist/components/FieldComponents/FieldNumberControl/FieldNumberControl.d.ts +0 -10
- package/dist/components/FieldComponents/FieldNumberControl/FieldNumberControl.js +0 -18
- package/dist/components/FieldComponents/FieldNumberControl/FieldNumberControl.module.css.js +0 -11
- package/dist/components/FieldComponents/FieldNumberControl/index.d.ts +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { deprecate } from "@koobiq/logger";
|
|
3
|
+
import { polymorphicForwardRef, isNotNil, clsx } from "@koobiq/react-core";
|
|
3
4
|
import s from "./Badge.module.css.js";
|
|
4
5
|
const Badge = polymorphicForwardRef(
|
|
5
6
|
({
|
|
@@ -10,22 +11,30 @@ const Badge = polymorphicForwardRef(
|
|
|
10
11
|
startIcon,
|
|
11
12
|
endIcon,
|
|
12
13
|
label,
|
|
14
|
+
children,
|
|
13
15
|
...other
|
|
14
|
-
}, ref) =>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
...other,
|
|
20
|
-
ref,
|
|
21
|
-
className: clsx(s.base, s[size], s[variant], className),
|
|
22
|
-
children: [
|
|
23
|
-
startIcon,
|
|
24
|
-
/* @__PURE__ */ jsx("span", { className: s.label, children: label }),
|
|
25
|
-
endIcon
|
|
26
|
-
]
|
|
16
|
+
}, ref) => {
|
|
17
|
+
if (process.env.NODE_ENV !== "production" && isNotNil(label)) {
|
|
18
|
+
deprecate(
|
|
19
|
+
'Badge. The "label" prop is deprecated. Use "children" prop to replace it.'
|
|
20
|
+
);
|
|
27
21
|
}
|
|
28
|
-
|
|
22
|
+
return /* @__PURE__ */ jsxs(
|
|
23
|
+
Tag,
|
|
24
|
+
{
|
|
25
|
+
"data-variant": variant,
|
|
26
|
+
"data-size": size,
|
|
27
|
+
...other,
|
|
28
|
+
ref,
|
|
29
|
+
className: clsx(s.base, s[size], s[variant], className),
|
|
30
|
+
children: [
|
|
31
|
+
startIcon,
|
|
32
|
+
/* @__PURE__ */ jsx("span", { className: s.label, children: children ?? label }),
|
|
33
|
+
endIcon
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
29
38
|
);
|
|
30
39
|
export {
|
|
31
40
|
Badge
|
|
@@ -3,18 +3,25 @@ export declare const badgePropSize: readonly ["compact", "normal"];
|
|
|
3
3
|
export type BadgePropSize = (typeof badgePropSize)[number];
|
|
4
4
|
export declare const badgePropVariant: readonly ["theme", "fade-theme", "outline-fade-theme", "error", "fade-error", "outline-fade-error", "warning", "fade-warning", "outline-fade-warning", "success", "fade-success", "outline-fade-success", "contrast", "fade-contrast", "outline-fade-contrast"];
|
|
5
5
|
export type BadgePropVariant = (typeof badgePropVariant)[number];
|
|
6
|
+
type BadgeBaseDeprecatedProps = {
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated
|
|
9
|
+
* The "label" prop is deprecated. Use "children" prop to replace it.
|
|
10
|
+
* The label of the component. */
|
|
11
|
+
label?: ReactNode;
|
|
12
|
+
};
|
|
6
13
|
export type BadgeBaseProps = {
|
|
7
14
|
/** The variant to use. */
|
|
8
15
|
variant?: BadgePropVariant;
|
|
9
16
|
/** The size of the component. */
|
|
10
17
|
size?: BadgePropSize;
|
|
11
|
-
/** The
|
|
12
|
-
|
|
18
|
+
/** The content of the component. */
|
|
19
|
+
children?: ReactNode;
|
|
13
20
|
/** Icon placed before the children. */
|
|
14
21
|
startIcon?: ReactNode;
|
|
15
22
|
/** Icon placed after the children. */
|
|
16
23
|
endIcon?: ReactNode;
|
|
17
24
|
/** Additional CSS-classes. */
|
|
18
25
|
className?: string;
|
|
19
|
-
|
|
20
|
-
};
|
|
26
|
+
} & BadgeBaseDeprecatedProps;
|
|
27
|
+
export {};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type
|
|
1
|
+
import type { ComponentPropsWithRef, ElementType } from 'react';
|
|
2
|
+
export type FieldControlBaseProps = {
|
|
3
3
|
fullWidth?: boolean;
|
|
4
4
|
className?: string;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
fullWidth?: boolean;
|
|
9
|
-
className?: string;
|
|
10
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export declare const FieldControl: import("@koobiq/react-core").PolyForwardComponent<"div", FieldControlBaseProps, ElementType>;
|
|
7
|
+
export type FieldControlProps<As extends ElementType = 'div'> = ComponentPropsWithRef<typeof FieldControl<As>>;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { clsx } from "@koobiq/react-core";
|
|
4
|
-
import { TextField } from "@koobiq/react-primitives";
|
|
2
|
+
import { polymorphicForwardRef, clsx } from "@koobiq/react-core";
|
|
5
3
|
import s from "./FieldControl.module.css.js";
|
|
6
|
-
const FieldControl =
|
|
7
|
-
({ fullWidth = false,
|
|
8
|
-
|
|
4
|
+
const FieldControl = polymorphicForwardRef(
|
|
5
|
+
({ fullWidth = false, className, as: Tag = "div", ...other }, ref) => /* @__PURE__ */ jsx(
|
|
6
|
+
Tag,
|
|
9
7
|
{
|
|
10
8
|
className: clsx(s.base, fullWidth && s.fullWidth, className),
|
|
11
9
|
...other,
|
|
12
|
-
ref
|
|
13
|
-
children
|
|
10
|
+
ref
|
|
14
11
|
}
|
|
15
12
|
)
|
|
16
13
|
);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { useDOMRef, mergeProps } from "@koobiq/react-core";
|
|
5
|
+
import { TextField } from "@koobiq/react-primitives";
|
|
5
6
|
import { FieldControl } from "../FieldComponents/FieldControl/FieldControl.js";
|
|
6
7
|
import { FieldLabel } from "../FieldComponents/FieldLabel/FieldLabel.js";
|
|
7
8
|
import { FieldInputGroup } from "../FieldComponents/FieldInputGroup/FieldInputGroup.js";
|
|
@@ -32,7 +33,7 @@ const Input = forwardRef((props, ref) => {
|
|
|
32
33
|
},
|
|
33
34
|
other
|
|
34
35
|
);
|
|
35
|
-
return /* @__PURE__ */ jsx(FieldControl, { ...rootProps, children: ({ error, required, disabled }) => {
|
|
36
|
+
return /* @__PURE__ */ jsx(FieldControl, { as: TextField, ...rootProps, children: ({ error, required, disabled }) => {
|
|
36
37
|
const labelProps = mergeProps(
|
|
37
38
|
{ hidden: hiddenLabel, required },
|
|
38
39
|
slotProps?.label
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { useDOMRef, mergeProps } from "@koobiq/react-core";
|
|
5
|
-
import {
|
|
5
|
+
import { NumberField } from "@koobiq/react-primitives";
|
|
6
6
|
import { InputNumberCounterControls } from "./components/InputNumberCounterControls.js";
|
|
7
|
+
import { FieldControl } from "../FieldComponents/FieldControl/FieldControl.js";
|
|
7
8
|
import { FieldLabel } from "../FieldComponents/FieldLabel/FieldLabel.js";
|
|
8
9
|
import { FieldInputGroup } from "../FieldComponents/FieldInputGroup/FieldInputGroup.js";
|
|
9
10
|
import { FieldInput } from "../FieldComponents/FieldInput/FieldInput.js";
|
|
@@ -34,7 +35,7 @@ const InputNumber = forwardRef(
|
|
|
34
35
|
},
|
|
35
36
|
other
|
|
36
37
|
);
|
|
37
|
-
return /* @__PURE__ */ jsx(
|
|
38
|
+
return /* @__PURE__ */ jsx(FieldControl, { as: NumberField, ...rootProps, children: ({ error, required, disabled }) => {
|
|
38
39
|
const labelProps = mergeProps(
|
|
39
40
|
{ hidden: hiddenLabel, required },
|
|
40
41
|
slotProps?.label
|
|
@@ -15,7 +15,7 @@ const InputNumberCounterControls = () => {
|
|
|
15
15
|
slot: "increment",
|
|
16
16
|
variant: "fade-contrast",
|
|
17
17
|
size: "l",
|
|
18
|
-
|
|
18
|
+
isCompact: true,
|
|
19
19
|
children: /* @__PURE__ */ jsx(IconChevronUp16, {})
|
|
20
20
|
}
|
|
21
21
|
),
|
|
@@ -26,7 +26,7 @@ const InputNumberCounterControls = () => {
|
|
|
26
26
|
slot: "decrement",
|
|
27
27
|
variant: "fade-contrast",
|
|
28
28
|
size: "l",
|
|
29
|
-
|
|
29
|
+
isCompact: true,
|
|
30
30
|
children: /* @__PURE__ */ jsx(IconChevronDown16, {})
|
|
31
31
|
}
|
|
32
32
|
)
|
|
@@ -7,6 +7,7 @@ import s from "./Select.module.css.js";
|
|
|
7
7
|
import { FieldSelect } from "../FieldComponents/FieldSelect/FieldSelect.js";
|
|
8
8
|
import { PopoverInner } from "../Popover/Popover.js";
|
|
9
9
|
import { ListInner } from "../List/List.js";
|
|
10
|
+
import { FieldControl } from "../FieldComponents/FieldControl/FieldControl.js";
|
|
10
11
|
import { FieldLabel } from "../FieldComponents/FieldLabel/FieldLabel.js";
|
|
11
12
|
import { FieldInputGroup } from "../FieldComponents/FieldInputGroup/FieldInputGroup.js";
|
|
12
13
|
import { FieldCaption } from "../FieldComponents/FieldCaption/FieldCaption.js";
|
|
@@ -150,7 +151,7 @@ function SelectRender(props, ref) {
|
|
|
150
151
|
const renderDefaultValue = (selectedItem) => selectedItem?.rendered;
|
|
151
152
|
const renderValue = renderValueProp || renderDefaultValue;
|
|
152
153
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
153
|
-
/* @__PURE__ */ jsxs(
|
|
154
|
+
/* @__PURE__ */ jsxs(FieldControl, { ...rootProps, children: [
|
|
154
155
|
/* @__PURE__ */ jsx(FieldLabel, { ...labelProps, children: props.label }),
|
|
155
156
|
/* @__PURE__ */ jsx(
|
|
156
157
|
HiddenSelect,
|
|
@@ -22,7 +22,6 @@ const textNormal = utilClasses.typography["text-normal"];
|
|
|
22
22
|
function TableRender(props, ref) {
|
|
23
23
|
const {
|
|
24
24
|
stickyHeader = false,
|
|
25
|
-
fullWidth = false,
|
|
26
25
|
divider = "none",
|
|
27
26
|
slotProps,
|
|
28
27
|
selectionMode,
|
|
@@ -49,14 +48,8 @@ function TableRender(props, ref) {
|
|
|
49
48
|
const { ref: theadRef, height } = useElementSize();
|
|
50
49
|
const containerProps = mergeProps(
|
|
51
50
|
{
|
|
52
|
-
className: clsx(
|
|
53
|
-
s.container,
|
|
54
|
-
fullWidth && s.fullWidth,
|
|
55
|
-
textNormal,
|
|
56
|
-
className
|
|
57
|
-
),
|
|
51
|
+
className: clsx(s.container, textNormal, className),
|
|
58
52
|
"data-divider": divider,
|
|
59
|
-
"data-fullwidth": fullWidth,
|
|
60
53
|
"data-sticky-header": stickyHeader,
|
|
61
54
|
style: {
|
|
62
55
|
...styleProp,
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
const container = "kbq-table-container-ecbaa4";
|
|
2
|
-
const fullWidth = "kbq-table-fullWidth-419d42";
|
|
3
2
|
const base = "kbq-table-55e555";
|
|
4
3
|
const s = {
|
|
5
4
|
container,
|
|
6
|
-
fullWidth,
|
|
7
5
|
base
|
|
8
6
|
};
|
|
9
7
|
export {
|
|
10
8
|
base,
|
|
11
9
|
container,
|
|
12
|
-
s as default
|
|
13
|
-
fullWidth
|
|
10
|
+
s as default
|
|
14
11
|
};
|
|
@@ -43,11 +43,6 @@ export type TableProps<T> = ExtendableComponentPropsWithRef<{
|
|
|
43
43
|
* @default none
|
|
44
44
|
*/
|
|
45
45
|
divider?: TablePropDivider;
|
|
46
|
-
/**
|
|
47
|
-
* If `true`, the table will take up the full width of its container.
|
|
48
|
-
* @default false
|
|
49
|
-
* */
|
|
50
|
-
fullWidth?: boolean;
|
|
51
46
|
/**
|
|
52
47
|
* Flag indicating a fixed table header.
|
|
53
48
|
* @default false
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { mergeProps } from "@koobiq/react-core";
|
|
5
|
+
import { TextField } from "@koobiq/react-primitives";
|
|
5
6
|
import { TextareaContextConsumer } from "./components/TextareaContextConsumer/TextareaContextConsumer.js";
|
|
6
7
|
import { FieldControl } from "../FieldComponents/FieldControl/FieldControl.js";
|
|
7
8
|
const Textarea = forwardRef((props, ref) => {
|
|
@@ -28,7 +29,7 @@ const Textarea = forwardRef((props, ref) => {
|
|
|
28
29
|
},
|
|
29
30
|
other
|
|
30
31
|
);
|
|
31
|
-
return /* @__PURE__ */ jsx(FieldControl, { inputElementType: "textarea", ...rootProps, children: (values) => /* @__PURE__ */ jsx(
|
|
32
|
+
return /* @__PURE__ */ jsx(FieldControl, { as: TextField, inputElementType: "textarea", ...rootProps, children: (values) => /* @__PURE__ */ jsx(
|
|
32
33
|
TextareaContextConsumer,
|
|
33
34
|
{
|
|
34
35
|
...values,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const Tooltip: import("react").ForwardRefExoticComponent<{
|
|
2
2
|
variant?: import("./types").TooltipPropVariant;
|
|
3
|
-
|
|
3
|
+
isOpen?: boolean;
|
|
4
4
|
defaultOpen?: boolean;
|
|
5
5
|
onOpenChange?(open: boolean): void;
|
|
6
|
-
|
|
6
|
+
isDisabled?: boolean;
|
|
7
7
|
children?: import("react").ReactNode;
|
|
8
8
|
control?: import("./types").TooltipPropControl;
|
|
9
9
|
placement?: import("./types").TooltipPropPlacement;
|
|
@@ -18,4 +18,7 @@ export declare const Tooltip: import("react").ForwardRefExoticComponent<{
|
|
|
18
18
|
id?: string;
|
|
19
19
|
className?: string;
|
|
20
20
|
portalContainer?: Element;
|
|
21
|
+
} & {
|
|
22
|
+
open?: boolean;
|
|
23
|
+
disabled?: boolean;
|
|
21
24
|
} & import("@koobiq/react-core").DataAttributeProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef, useRef } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { deprecate } from "@koobiq/logger";
|
|
5
|
+
import { isNotNil, useDOMRef, useMultiRef, useBoolean, mergeProps, clsx, FocusableProvider } from "@koobiq/react-core";
|
|
5
6
|
import { useTooltipTriggerState, useTooltipTrigger, useOverlayPosition, useTooltip, Overlay } from "@koobiq/react-primitives";
|
|
6
7
|
import { Transition } from "react-transition-group";
|
|
7
8
|
import { utilClasses } from "../../styles/utility.js";
|
|
@@ -9,7 +10,10 @@ import s from "./Tooltip.module.css.js";
|
|
|
9
10
|
const Tooltip = forwardRef((props, ref) => {
|
|
10
11
|
const {
|
|
11
12
|
delay = 120,
|
|
12
|
-
disabled
|
|
13
|
+
disabled,
|
|
14
|
+
open,
|
|
15
|
+
isDisabled: isDisabledProp,
|
|
16
|
+
isOpen: isOpenProp,
|
|
13
17
|
closeDelay = 120,
|
|
14
18
|
hideArrow = false,
|
|
15
19
|
variant = "contrast",
|
|
@@ -20,12 +24,23 @@ const Tooltip = forwardRef((props, ref) => {
|
|
|
20
24
|
crossOffset,
|
|
21
25
|
defaultOpen,
|
|
22
26
|
onOpenChange,
|
|
23
|
-
open: openProp,
|
|
24
27
|
portalContainer,
|
|
25
28
|
offset: offsetProp,
|
|
26
29
|
arrowBoundaryOffset,
|
|
27
30
|
...other
|
|
28
31
|
} = props;
|
|
32
|
+
const isOpen = isOpenProp ?? open;
|
|
33
|
+
const isDisabled = isDisabledProp ?? disabled;
|
|
34
|
+
if (process.env.NODE_ENV !== "production" && isNotNil(open)) {
|
|
35
|
+
deprecate(
|
|
36
|
+
'Tooltip. The "open" prop is deprecated. Use "isOpen" prop to replace it.'
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
if (process.env.NODE_ENV !== "production" && isNotNil(disabled)) {
|
|
40
|
+
deprecate(
|
|
41
|
+
'Tooltip. The "disabled" prop is deprecated. Use "isDisabled" prop to replace it.'
|
|
42
|
+
);
|
|
43
|
+
}
|
|
29
44
|
const showArrow = !hideArrow;
|
|
30
45
|
const offset = showArrow ? offsetProp : offsetProp || 4;
|
|
31
46
|
const state = useTooltipTriggerState({
|
|
@@ -33,8 +48,8 @@ const Tooltip = forwardRef((props, ref) => {
|
|
|
33
48
|
closeDelay,
|
|
34
49
|
defaultOpen,
|
|
35
50
|
onOpenChange,
|
|
36
|
-
isOpen
|
|
37
|
-
isDisabled
|
|
51
|
+
isOpen,
|
|
52
|
+
isDisabled,
|
|
38
53
|
...other
|
|
39
54
|
});
|
|
40
55
|
const domRef = useDOMRef(ref);
|
|
@@ -43,11 +58,11 @@ const Tooltip = forwardRef((props, ref) => {
|
|
|
43
58
|
const { triggerProps, tooltipProps: tooltipTriggerProps } = useTooltipTrigger(
|
|
44
59
|
{
|
|
45
60
|
delay,
|
|
61
|
+
isOpen,
|
|
62
|
+
isDisabled,
|
|
46
63
|
closeDelay,
|
|
47
64
|
defaultOpen,
|
|
48
65
|
onOpenChange,
|
|
49
|
-
isOpen: openProp,
|
|
50
|
-
isDisabled: disabled,
|
|
51
66
|
...other
|
|
52
67
|
},
|
|
53
68
|
state,
|
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
import type { ReactNode, RefObject, ComponentRef, ReactElement, DOMAttributes } from 'react';
|
|
2
2
|
import type { DataAttributeProps } from '@koobiq/react-core';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import type { FocusableElement } from '@koobiq/react-primitives';
|
|
4
|
+
export type TooltipPropControl = (props: DOMAttributes<FocusableElement | null> & {
|
|
5
|
+
ref: ((node: FocusableElement | null) => void) | null;
|
|
5
6
|
}) => ReactElement;
|
|
6
7
|
export declare const tooltipPropPlacement: readonly ["bottom", "bottom start", "bottom end", "top", "top start", "top end", "start", "start top", "start bottom", "end", "end top", "end bottom"];
|
|
7
8
|
export declare const tooltipPropVariant: readonly ["contrast", "contrast-fade", "error", "warning", "theme"];
|
|
8
9
|
export type TooltipPropVariant = (typeof tooltipPropVariant)[number];
|
|
9
10
|
export type TooltipPropPlacement = (typeof tooltipPropPlacement)[number];
|
|
11
|
+
type TooltipDeprecatedProps = {
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated
|
|
14
|
+
* The "open" prop is deprecated. Use "isOpen" prop to replace it.
|
|
15
|
+
* If `true`, the component is shown.
|
|
16
|
+
* @default false
|
|
17
|
+
* */
|
|
18
|
+
open?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated
|
|
21
|
+
* The "disabled" prop is deprecated. Use "isDisabled" prop to replace it.
|
|
22
|
+
* If `true`, the component is disabled.
|
|
23
|
+
* @default false
|
|
24
|
+
* */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
};
|
|
10
27
|
export type TooltipProps = {
|
|
11
28
|
/**
|
|
12
29
|
* The variant to use.
|
|
@@ -14,7 +31,7 @@ export type TooltipProps = {
|
|
|
14
31
|
* */
|
|
15
32
|
variant?: TooltipPropVariant;
|
|
16
33
|
/** If `true`, the component is shown. */
|
|
17
|
-
|
|
34
|
+
isOpen?: boolean;
|
|
18
35
|
/** The default open state. Use when the component is not controlled. */
|
|
19
36
|
defaultOpen?: boolean;
|
|
20
37
|
/** Handler that is called when the overlay's open state changes. */
|
|
@@ -23,7 +40,7 @@ export type TooltipProps = {
|
|
|
23
40
|
* If `true`, the tooltip should be disabled, independent of the trigger.
|
|
24
41
|
* @default false
|
|
25
42
|
* */
|
|
26
|
-
|
|
43
|
+
isDisabled?: boolean;
|
|
27
44
|
/** The content of the component. */
|
|
28
45
|
children?: ReactNode;
|
|
29
46
|
/** The render function of the control for displaying the tooltip. */
|
|
@@ -82,5 +99,6 @@ export type TooltipProps = {
|
|
|
82
99
|
* @default document.body
|
|
83
100
|
*/
|
|
84
101
|
portalContainer?: Element;
|
|
85
|
-
} & DataAttributeProps;
|
|
102
|
+
} & TooltipDeprecatedProps & DataAttributeProps;
|
|
86
103
|
export type TooltipRef = ComponentRef<'div'>;
|
|
104
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* empty css */
|
|
2
|
-
import { useListData, useLocale } from "@koobiq/react-primitives";
|
|
2
|
+
import { RouterProvider, useListData, useLocale, useRouter } from "@koobiq/react-primitives";
|
|
3
3
|
import { Provider, defaultBreakpoints } from "./components/Provider/Provider.js";
|
|
4
4
|
import { BreakpointsProvider } from "./components/Provider/BreakpointsProvider.js";
|
|
5
5
|
import { ProviderContext, useProvider } from "./components/Provider/ProviderContext.js";
|
|
@@ -119,6 +119,7 @@ export {
|
|
|
119
119
|
RadioGroupContext,
|
|
120
120
|
RadioGroupDescription,
|
|
121
121
|
RadioGroupLabel,
|
|
122
|
+
RouterProvider,
|
|
122
123
|
Select,
|
|
123
124
|
SidePanel,
|
|
124
125
|
SidePanelContent,
|
|
@@ -190,5 +191,6 @@ export {
|
|
|
190
191
|
useLocale,
|
|
191
192
|
useMatchedBreakpoints,
|
|
192
193
|
useProvider,
|
|
193
|
-
useRadioGroupState
|
|
194
|
+
useRadioGroupState,
|
|
195
|
+
useRouter
|
|
194
196
|
};
|
package/dist/style.css
CHANGED
|
@@ -2135,21 +2135,6 @@
|
|
|
2135
2135
|
resize: block;
|
|
2136
2136
|
overflow: auto;
|
|
2137
2137
|
}
|
|
2138
|
-
.kbq-fieldnumbercontrol-9b0b2d {
|
|
2139
|
-
--field-input-padding-inline-start: var(--kbq-size-m);
|
|
2140
|
-
--field-input-padding-inline-end: var(--kbq-size-m);
|
|
2141
|
-
--field-input-padding-block-start: var(--kbq-size-xs);
|
|
2142
|
-
--field-input-padding-block-end: var(--kbq-size-xs);
|
|
2143
|
-
flex-direction: column;
|
|
2144
|
-
justify-content: center;
|
|
2145
|
-
align-items: flex-start;
|
|
2146
|
-
display: flex;
|
|
2147
|
-
position: relative;
|
|
2148
|
-
}
|
|
2149
|
-
|
|
2150
|
-
.kbq-fieldnumbercontrol-fullWidth-d20d89 {
|
|
2151
|
-
inline-size: 100%;
|
|
2152
|
-
}
|
|
2153
2138
|
.kbq-inputnumbercountercontrols-77ed13 {
|
|
2154
2139
|
opacity: 0;
|
|
2155
2140
|
visibility: hidden;
|
|
@@ -3469,10 +3454,6 @@
|
|
|
3469
3454
|
scroll-padding-block-start: var(--table-container-scroll-padding-top);
|
|
3470
3455
|
}
|
|
3471
3456
|
|
|
3472
|
-
.kbq-table-fullWidth-419d42 .kbq-table-55e555 {
|
|
3473
|
-
inline-size: 100%;
|
|
3474
|
-
}
|
|
3475
|
-
|
|
3476
3457
|
[data-divider="none"] tbody td:first-child {
|
|
3477
3458
|
border-start-start-radius: var(--kbq-size-s);
|
|
3478
3459
|
border-end-start-radius: var(--kbq-size-s);
|
|
@@ -3519,6 +3500,7 @@
|
|
|
3519
3500
|
|
|
3520
3501
|
.kbq-table-55e555 {
|
|
3521
3502
|
border-spacing: 0;
|
|
3503
|
+
inline-size: 100%;
|
|
3522
3504
|
}
|
|
3523
3505
|
|
|
3524
3506
|
[aria-multiselectable="true"] tbody tr:is([data-selected="true"], [data-focus-visible="true"]):has( + :is([data-selected="true"], [data-focus-visible="true"])) {
|
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.29",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"@koobiq/design-tokens": "^3.12.1",
|
|
28
28
|
"@types/react-transition-group": "^4.4.12",
|
|
29
29
|
"react-transition-group": "^4.4.5",
|
|
30
|
-
"@koobiq/logger": "0.0.1-beta.
|
|
31
|
-
"@koobiq/react-
|
|
32
|
-
"@koobiq/react-
|
|
33
|
-
"@koobiq/react-
|
|
30
|
+
"@koobiq/logger": "0.0.1-beta.29",
|
|
31
|
+
"@koobiq/react-core": "0.0.1-beta.29",
|
|
32
|
+
"@koobiq/react-primitives": "0.0.1-beta.29",
|
|
33
|
+
"@koobiq/react-icons": "0.0.1-beta.29"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@koobiq/design-tokens": "^3.11.2",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type NumberFieldProps, type NumberFieldRef } from '@koobiq/react-primitives';
|
|
2
|
-
export type FieldNumberControlProps = NumberFieldProps & {
|
|
3
|
-
fullWidth?: boolean;
|
|
4
|
-
className?: string;
|
|
5
|
-
};
|
|
6
|
-
export type FieldNumberControlRef = NumberFieldRef;
|
|
7
|
-
export declare const FieldNumberControl: import("react").ForwardRefExoticComponent<Omit<import("@koobiq/react-primitives").UseNumberFieldProps, keyof import("@koobiq/react-primitives").RenderProps<import("@koobiq/react-primitives").NumberFieldRenderProps>> & import("@koobiq/react-primitives").RenderProps<import("@koobiq/react-primitives").NumberFieldRenderProps> & {
|
|
8
|
-
fullWidth?: boolean;
|
|
9
|
-
className?: string;
|
|
10
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { clsx } from "@koobiq/react-core";
|
|
4
|
-
import { NumberField } from "@koobiq/react-primitives";
|
|
5
|
-
import s from "./FieldNumberControl.module.css.js";
|
|
6
|
-
const FieldNumberControl = forwardRef(({ fullWidth = false, children, className, ...other }, ref) => /* @__PURE__ */ jsx(
|
|
7
|
-
NumberField,
|
|
8
|
-
{
|
|
9
|
-
className: clsx(s.base, fullWidth && s.fullWidth, className),
|
|
10
|
-
...other,
|
|
11
|
-
ref,
|
|
12
|
-
children
|
|
13
|
-
}
|
|
14
|
-
));
|
|
15
|
-
FieldNumberControl.displayName = "FieldNumberControl";
|
|
16
|
-
export {
|
|
17
|
-
FieldNumberControl
|
|
18
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FieldNumberControl';
|