@koobiq/react-components 0.22.0 → 0.24.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/Autocomplete/Autocomplete.js +2 -2
- package/dist/components/Button/Button.js +1 -0
- package/dist/components/Calendar/Calendar.js +9 -10
- package/dist/components/Calendar/components/CalendarCell/CalendarCell.js +11 -1
- package/dist/components/Calendar/components/CalendarGrid/CalendarGrid.d.ts +2 -6
- package/dist/components/Calendar/components/CalendarGrid/CalendarGrid.js +13 -3
- package/dist/components/Calendar/components/CalendarGrid/index.d.ts +1 -0
- package/dist/components/Calendar/components/CalendarGrid/types.d.ts +10 -0
- package/dist/components/Calendar/components/CalendarHeader/CalendarHeader.d.ts +1 -7
- package/dist/components/Calendar/components/CalendarHeader/CalendarHeader.js +13 -6
- package/dist/components/Calendar/components/CalendarHeader/index.d.ts +1 -0
- package/dist/components/Calendar/components/CalendarHeader/types.d.ts +16 -0
- package/dist/components/Calendar/components/CalendarMonthDropdown/CalendarMonthDropdown.d.ts +11 -3
- package/dist/components/Calendar/components/CalendarMonthDropdown/CalendarMonthDropdown.js +26 -15
- package/dist/components/Calendar/components/CalendarYearDropdown/CalendarYearDropdown.d.ts +11 -3
- package/dist/components/Calendar/components/CalendarYearDropdown/CalendarYearDropdown.js +26 -15
- package/dist/components/Calendar/types.d.ts +8 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.js +2 -2
- package/dist/components/ContenPanel/ContentPanel.d.ts +32 -0
- package/dist/components/ContenPanel/ContentPanel.js +157 -0
- package/dist/components/ContenPanel/ContentPanel.module.css.js +17 -0
- package/dist/components/ContenPanel/ContentPanelContext.d.ts +3 -0
- package/dist/components/ContenPanel/ContentPanelContext.js +6 -0
- package/dist/components/ContenPanel/components/ContentPanelContainer/ContentPanelContainer.d.ts +2 -0
- package/dist/components/ContenPanel/components/ContentPanelContainer/ContentPanelContainer.js +108 -0
- package/dist/components/ContenPanel/components/ContentPanelContainer/ContentPanelContainer.module.css.js +14 -0
- package/dist/components/ContenPanel/components/ContentPanelContainer/ContentPanelContainerContext.d.ts +7 -0
- package/dist/components/ContenPanel/components/ContentPanelContainer/ContentPanelContainerContext.js +8 -0
- package/dist/components/ContenPanel/components/ContentPanelContainer/index.d.ts +3 -0
- package/dist/components/ContenPanel/components/ContentPanelContainer/types.d.ts +23 -0
- package/dist/components/ContenPanel/components/index.d.ts +1 -0
- package/dist/components/ContenPanel/constants.d.ts +1 -0
- package/dist/components/ContenPanel/constants.js +4 -0
- package/dist/components/ContenPanel/hooks/index.d.ts +2 -0
- package/dist/components/ContenPanel/hooks/useContentPanelContainer/index.d.ts +1 -0
- package/dist/components/ContenPanel/hooks/useContentPanelContainer/useContentPanelContainer.d.ts +14 -0
- package/dist/components/ContenPanel/hooks/useContentPanelContainer/useContentPanelContainer.js +19 -0
- package/dist/components/ContenPanel/hooks/useContentPanelResize/index.d.ts +1 -0
- package/dist/components/ContenPanel/hooks/useContentPanelResize/intl.json.js +7 -0
- package/dist/components/ContenPanel/hooks/useContentPanelResize/useContentPanelResize.d.ts +32 -0
- package/dist/components/ContenPanel/hooks/useContentPanelResize/useContentPanelResize.js +80 -0
- package/dist/components/ContenPanel/index.d.ts +3 -0
- package/dist/components/ContenPanel/types.d.ts +53 -0
- package/dist/components/ContenPanel/utils/index.d.ts +3 -0
- package/dist/components/ContenPanel/utils/index.js +31 -0
- package/dist/components/DateInput/DateInput.js +2 -2
- package/dist/components/DatePicker/DatePicker.js +21 -21
- package/dist/components/DatePicker/types.d.ts +1 -0
- package/dist/components/Dialog/types.d.ts +1 -1
- package/dist/components/FormField/FormFieldInputDate/FormFieldInputDate.d.ts +3 -2
- package/dist/components/IconButton/IconButton.js +1 -0
- package/dist/components/Input/Input.js +2 -2
- package/dist/components/InputNumber/InputNumber.js +2 -2
- package/dist/components/Link/Link.js +0 -2
- package/dist/components/Menu/components/MenuItem/MenuItem.js +8 -1
- package/dist/components/Navbar/Navbar.d.ts +15 -0
- package/dist/components/Navbar/Navbar.js +80 -0
- package/dist/components/Navbar/Navbar.module.css.js +41 -0
- package/dist/components/Navbar/NavbarContext.d.ts +5 -0
- package/dist/components/Navbar/NavbarContext.js +8 -0
- package/dist/components/Navbar/components/NavbarAppItem.d.ts +7 -0
- package/dist/components/Navbar/components/NavbarAppItem.js +10 -0
- package/dist/components/Navbar/components/NavbarBody.d.ts +6 -0
- package/dist/components/Navbar/components/NavbarBody.js +15 -0
- package/dist/components/Navbar/components/NavbarFooter.d.ts +6 -0
- package/dist/components/Navbar/components/NavbarFooter.js +15 -0
- package/dist/components/Navbar/components/NavbarHeader.d.ts +6 -0
- package/dist/components/Navbar/components/NavbarHeader.js +15 -0
- package/dist/components/Navbar/components/NavbarItem.d.ts +25 -0
- package/dist/components/Navbar/components/NavbarItem.js +55 -0
- package/dist/components/Navbar/components/index.d.ts +5 -0
- package/dist/components/Navbar/index.d.ts +2 -0
- package/dist/components/Navbar/intl.json.js +7 -0
- package/dist/components/Navbar/types.d.ts +26 -0
- package/dist/components/Navbar/types.js +4 -0
- package/dist/components/RadioGroup/RadioGroup.js +2 -2
- package/dist/components/SearchInput/SearchInput.js +2 -2
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/Select/intl.js +2 -2
- package/dist/components/Table/components/TableColumnHeader/TableColumnHeader.js +2 -2
- package/dist/components/Textarea/components/TextareaContextConsumer/TextareaContextConsumer.js +2 -2
- package/dist/components/TimePicker/TimePicker.js +2 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/index.js +11 -0
- package/dist/style.css +246 -0
- package/package.json +5 -5
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useObjectRef, useControlledState, useLocalizedStringFormatter, clsx, mergeProps } from "@koobiq/react-core";
|
|
4
|
+
import { IconChevronDoubleLeftS16 } from "@koobiq/react-icons";
|
|
5
|
+
import { useToolbar, Button } from "@koobiq/react-primitives";
|
|
6
|
+
import intlMessages from "./intl.json.js";
|
|
7
|
+
import s from "./Navbar.module.css.js";
|
|
8
|
+
import { NavbarContext } from "./NavbarContext.js";
|
|
9
|
+
import { NavbarHeader } from "./components/NavbarHeader.js";
|
|
10
|
+
import { NavbarBody } from "./components/NavbarBody.js";
|
|
11
|
+
import { NavbarFooter } from "./components/NavbarFooter.js";
|
|
12
|
+
import { NavbarItem } from "./components/NavbarItem.js";
|
|
13
|
+
import { NavbarAppItem } from "./components/NavbarAppItem.js";
|
|
14
|
+
import { Tooltip } from "../Tooltip/Tooltip.js";
|
|
15
|
+
const NavbarComponent = ({
|
|
16
|
+
variant = "vertical",
|
|
17
|
+
isCollapsed,
|
|
18
|
+
isToggleButtonHidden,
|
|
19
|
+
defaultCollapsed,
|
|
20
|
+
className,
|
|
21
|
+
children,
|
|
22
|
+
onCollapse,
|
|
23
|
+
ref,
|
|
24
|
+
...other
|
|
25
|
+
}) => {
|
|
26
|
+
const navbarRef = useObjectRef(ref);
|
|
27
|
+
const { toolbarProps } = useToolbar({ orientation: variant }, navbarRef);
|
|
28
|
+
const [isCollapsedActual, setIsCollapsedActual] = useControlledState(
|
|
29
|
+
isCollapsed,
|
|
30
|
+
defaultCollapsed ?? false,
|
|
31
|
+
onCollapse
|
|
32
|
+
);
|
|
33
|
+
const stringFormatter = useLocalizedStringFormatter(intlMessages);
|
|
34
|
+
return /* @__PURE__ */ jsx(NavbarContext, { value: { isCollapsed: isCollapsedActual }, children: /* @__PURE__ */ jsxs(
|
|
35
|
+
"nav",
|
|
36
|
+
{
|
|
37
|
+
...mergeProps(other, toolbarProps),
|
|
38
|
+
className: clsx(s.navbar, className),
|
|
39
|
+
role: "navigation",
|
|
40
|
+
ref: navbarRef,
|
|
41
|
+
"data-collapsed": isCollapsedActual,
|
|
42
|
+
children: [
|
|
43
|
+
children,
|
|
44
|
+
!isToggleButtonHidden && /* @__PURE__ */ jsx(
|
|
45
|
+
Tooltip,
|
|
46
|
+
{
|
|
47
|
+
offset: 8,
|
|
48
|
+
hideArrow: true,
|
|
49
|
+
placement: "end",
|
|
50
|
+
control: (tooltipProps) => /* @__PURE__ */ jsx(
|
|
51
|
+
Button,
|
|
52
|
+
{
|
|
53
|
+
...tooltipProps,
|
|
54
|
+
"aria-hidden": true,
|
|
55
|
+
tabIndex: -1,
|
|
56
|
+
className: s.toggleWrapper,
|
|
57
|
+
onPress: () => setIsCollapsedActual((is) => !is),
|
|
58
|
+
children: /* @__PURE__ */ jsx("span", { className: s.toggleButton, children: /* @__PURE__ */ jsx(IconChevronDoubleLeftS16, {}) })
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
children: stringFormatter.format(
|
|
62
|
+
isCollapsedActual ? "show navbar" : "hide navbar"
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
) });
|
|
69
|
+
};
|
|
70
|
+
NavbarComponent.displayName = "Navbar";
|
|
71
|
+
const Navbar = NavbarComponent;
|
|
72
|
+
Navbar.Header = NavbarHeader;
|
|
73
|
+
Navbar.Body = NavbarBody;
|
|
74
|
+
Navbar.Footer = NavbarFooter;
|
|
75
|
+
Navbar.Item = NavbarItem;
|
|
76
|
+
Navbar.AppItem = NavbarAppItem;
|
|
77
|
+
export {
|
|
78
|
+
Navbar,
|
|
79
|
+
NavbarComponent
|
|
80
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const navbar = "kbq-navbar-navbar-9d3c75";
|
|
2
|
+
const list = "kbq-navbar-list-42b3cd";
|
|
3
|
+
const appItem = "kbq-navbar-appItem-08f75b";
|
|
4
|
+
const header = "kbq-navbar-header-ba57bd";
|
|
5
|
+
const item = "kbq-navbar-item-1b3022";
|
|
6
|
+
const itemIcon = "kbq-navbar-itemIcon-50a6ed";
|
|
7
|
+
const itemContent = "kbq-navbar-itemContent-ca07c9";
|
|
8
|
+
const itemBadge = "kbq-navbar-itemBadge-3ef4ba";
|
|
9
|
+
const itemMenuIcon = "kbq-navbar-itemMenuIcon-dc5e9e";
|
|
10
|
+
const footer = "kbq-navbar-footer-851065";
|
|
11
|
+
const toggleWrapper = "kbq-navbar-toggleWrapper-e7247f";
|
|
12
|
+
const toggleButton = "kbq-navbar-toggleButton-2ebeeb";
|
|
13
|
+
const s = {
|
|
14
|
+
navbar,
|
|
15
|
+
list,
|
|
16
|
+
appItem,
|
|
17
|
+
header,
|
|
18
|
+
item,
|
|
19
|
+
itemIcon,
|
|
20
|
+
itemContent,
|
|
21
|
+
itemBadge,
|
|
22
|
+
itemMenuIcon,
|
|
23
|
+
footer,
|
|
24
|
+
toggleWrapper,
|
|
25
|
+
toggleButton
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
appItem,
|
|
29
|
+
s as default,
|
|
30
|
+
footer,
|
|
31
|
+
header,
|
|
32
|
+
item,
|
|
33
|
+
itemBadge,
|
|
34
|
+
itemContent,
|
|
35
|
+
itemIcon,
|
|
36
|
+
itemMenuIcon,
|
|
37
|
+
list,
|
|
38
|
+
navbar,
|
|
39
|
+
toggleButton,
|
|
40
|
+
toggleWrapper
|
|
41
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type DistributiveOmit } from '@koobiq/react-core';
|
|
2
|
+
import { type NavbarItemProps } from './NavbarItem';
|
|
3
|
+
export type NavbarAppItemProps = DistributiveOmit<NavbarItemProps, 'isMenu' | 'badge'>;
|
|
4
|
+
export declare const NavbarAppItem: {
|
|
5
|
+
({ className, ...props }: NavbarAppItemProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { clsx } from "@koobiq/react-core";
|
|
4
|
+
import s from "../Navbar.module.css.js";
|
|
5
|
+
import { NavbarItem } from "./NavbarItem.js";
|
|
6
|
+
const NavbarAppItem = ({ className, ...props }) => /* @__PURE__ */ jsx(NavbarItem, { ...props, className: clsx(s.appItem, className) });
|
|
7
|
+
NavbarAppItem.displayName = "NavbarAppItem";
|
|
8
|
+
export {
|
|
9
|
+
NavbarAppItem
|
|
10
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from 'react';
|
|
2
|
+
export type NavbarBodyProps = ComponentPropsWithRef<'ul'>;
|
|
3
|
+
export declare const NavbarBody: {
|
|
4
|
+
({ children, className, ...props }: NavbarBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { clsx } from "@koobiq/react-core";
|
|
4
|
+
import { utilClasses } from "../../../styles/utility.js";
|
|
5
|
+
import s from "../Navbar.module.css.js";
|
|
6
|
+
const { list } = utilClasses;
|
|
7
|
+
const NavbarBody = ({
|
|
8
|
+
children,
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
}) => /* @__PURE__ */ jsx("ul", { "data-padded": "true", className: clsx(list, s.list, className), ...props, children });
|
|
12
|
+
NavbarBody.displayName = "NavbarBody";
|
|
13
|
+
export {
|
|
14
|
+
NavbarBody
|
|
15
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from 'react';
|
|
2
|
+
export type NavbarFooterProps = ComponentPropsWithRef<'footer'>;
|
|
3
|
+
export declare const NavbarFooter: {
|
|
4
|
+
({ children, className, ...props }: NavbarFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { clsx } from "@koobiq/react-core";
|
|
4
|
+
import { utilClasses } from "../../../styles/utility.js";
|
|
5
|
+
import s from "../Navbar.module.css.js";
|
|
6
|
+
const { list } = utilClasses;
|
|
7
|
+
const NavbarFooter = ({
|
|
8
|
+
children,
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
}) => /* @__PURE__ */ jsx("footer", { className: clsx(s.footer, className), ...props, children: /* @__PURE__ */ jsx("ul", { "data-padded": "true", className: clsx(list, s.list, className), children }) });
|
|
12
|
+
NavbarFooter.displayName = "NavbarFooter";
|
|
13
|
+
export {
|
|
14
|
+
NavbarFooter
|
|
15
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from 'react';
|
|
2
|
+
export type NavbarHeaderProps = ComponentPropsWithRef<'header'>;
|
|
3
|
+
export declare const NavbarHeader: {
|
|
4
|
+
({ className, children, ...props }: NavbarHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { clsx } from "@koobiq/react-core";
|
|
4
|
+
import { utilClasses } from "../../../styles/utility.js";
|
|
5
|
+
import s from "../Navbar.module.css.js";
|
|
6
|
+
const { list } = utilClasses;
|
|
7
|
+
const NavbarHeader = ({
|
|
8
|
+
className,
|
|
9
|
+
children,
|
|
10
|
+
...props
|
|
11
|
+
}) => /* @__PURE__ */ jsx("header", { className: clsx(s.header, className), ...props, children: /* @__PURE__ */ jsx("ul", { "data-padded": "true", className: clsx(list, s.list, className), children }) });
|
|
12
|
+
NavbarHeader.displayName = "NavbarHeader";
|
|
13
|
+
export {
|
|
14
|
+
NavbarHeader
|
|
15
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type LinkBaseProps } from '@koobiq/react-primitives';
|
|
3
|
+
export type NavbarItemProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the item is a menu trigger.
|
|
6
|
+
*/
|
|
7
|
+
isMenu?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Additional CSS class name.
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Icon to display before the item content.
|
|
14
|
+
*/
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Badge content to display.
|
|
18
|
+
*/
|
|
19
|
+
badge?: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Item content.
|
|
22
|
+
*/
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
} & LinkBaseProps;
|
|
25
|
+
export declare const NavbarItem: import("@koobiq/react-core").PolyForwardComponent<"a", NavbarItemProps, import("react").ElementType>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { polymorphicForwardRef, mergeRefs, mergeProps, clsx } from "@koobiq/react-core";
|
|
4
|
+
import { IconChevronRight16 } from "@koobiq/react-icons";
|
|
5
|
+
import { Link } from "@koobiq/react-primitives";
|
|
6
|
+
import { utilClasses } from "../../../styles/utility.js";
|
|
7
|
+
import s from "../Navbar.module.css.js";
|
|
8
|
+
import { useNavbarState } from "../NavbarContext.js";
|
|
9
|
+
import { Tooltip } from "../../Tooltip/Tooltip.js";
|
|
10
|
+
const { listItem, typography } = utilClasses;
|
|
11
|
+
const NavbarItem = polymorphicForwardRef(
|
|
12
|
+
({ as, className, isMenu = false, icon, badge, children, ...other }, inRef) => {
|
|
13
|
+
const { isCollapsed } = useNavbarState();
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
Tooltip,
|
|
16
|
+
{
|
|
17
|
+
offset: 8,
|
|
18
|
+
hideArrow: true,
|
|
19
|
+
placement: "end",
|
|
20
|
+
isDisabled: !isCollapsed,
|
|
21
|
+
control: (props) => /* @__PURE__ */ jsxs(
|
|
22
|
+
Link,
|
|
23
|
+
{
|
|
24
|
+
as: as || (isMenu || !other.href ? "button" : "a"),
|
|
25
|
+
className: clsx(
|
|
26
|
+
listItem,
|
|
27
|
+
typography["text-normal-medium"],
|
|
28
|
+
s.item,
|
|
29
|
+
className
|
|
30
|
+
),
|
|
31
|
+
...mergeProps(props, other),
|
|
32
|
+
ref: mergeRefs(props.ref, inRef),
|
|
33
|
+
children: [
|
|
34
|
+
icon && /* @__PURE__ */ jsx("span", { className: s.itemIcon, children: icon }),
|
|
35
|
+
!isCollapsed && /* @__PURE__ */ jsx("span", { className: s.itemContent, children }),
|
|
36
|
+
badge && /* @__PURE__ */ jsx(
|
|
37
|
+
"span",
|
|
38
|
+
{
|
|
39
|
+
className: clsx(typography["text-compact-medium"], s.itemBadge),
|
|
40
|
+
children: badge
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
!isCollapsed && isMenu && /* @__PURE__ */ jsx(IconChevronRight16, { className: s.itemMenuIcon })
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
children
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
NavbarItem.displayName = "NavbarItem";
|
|
53
|
+
export {
|
|
54
|
+
NavbarItem
|
|
55
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from 'react';
|
|
2
|
+
export declare const navbarPropVariant: readonly ["vertical", "horizontal"];
|
|
3
|
+
export type NavbarPropVariant = (typeof navbarPropVariant)[number];
|
|
4
|
+
export type NavbarProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Whether the navbar is collapsed.
|
|
7
|
+
*/
|
|
8
|
+
isCollapsed?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Whether the toggle button is hidden.
|
|
11
|
+
*/
|
|
12
|
+
isToggleButtonHidden?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Default collapsed state when uncontrolled.
|
|
15
|
+
*/
|
|
16
|
+
defaultCollapsed?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Navbar orientation variant.
|
|
19
|
+
* @default 'vertical'
|
|
20
|
+
*/
|
|
21
|
+
variant?: NavbarPropVariant;
|
|
22
|
+
/**
|
|
23
|
+
* Callback fired when collapse state changes.
|
|
24
|
+
*/
|
|
25
|
+
onCollapse?: (isCollapsed: boolean) => void;
|
|
26
|
+
} & ComponentPropsWithRef<'nav'>;
|
|
@@ -114,8 +114,8 @@ const RadioGroup = forwardRef(
|
|
|
114
114
|
/* @__PURE__ */ jsx(FormField.Label, { ...labelProps }),
|
|
115
115
|
/* @__PURE__ */ jsxs("div", { className: s.body, children: [
|
|
116
116
|
/* @__PURE__ */ jsx("div", { ...radioGroupProps, children }),
|
|
117
|
-
/* @__PURE__ */ jsx(FormField.
|
|
118
|
-
/* @__PURE__ */ jsx(FormField.
|
|
117
|
+
/* @__PURE__ */ jsx(FormField.Error, { ...errorProps }),
|
|
118
|
+
/* @__PURE__ */ jsx(FormField.Caption, { ...captionProps })
|
|
119
119
|
] })
|
|
120
120
|
] });
|
|
121
121
|
} }) });
|
|
@@ -126,8 +126,8 @@ const SearchInput = forwardRef(
|
|
|
126
126
|
/* @__PURE__ */ jsx(FormField.Label, { ...labelProps, children: label }),
|
|
127
127
|
/* @__PURE__ */ jsxs("div", { className: s.body, children: [
|
|
128
128
|
/* @__PURE__ */ jsx(FormField.ControlGroup, { ...groupProps, children: /* @__PURE__ */ jsx(FormField.Input, { ...inputProps }) }),
|
|
129
|
-
/* @__PURE__ */ jsx(FormField.
|
|
130
|
-
/* @__PURE__ */ jsx(
|
|
129
|
+
/* @__PURE__ */ jsx(FieldErrorContext.Provider, { value: validation, children: /* @__PURE__ */ jsx(FormField.Error, { ...errorProps }) }),
|
|
130
|
+
/* @__PURE__ */ jsx(FormField.Caption, { ...captionProps })
|
|
131
131
|
] })
|
|
132
132
|
] });
|
|
133
133
|
}
|
|
@@ -194,8 +194,8 @@ function SelectRender(props, ref) {
|
|
|
194
194
|
isDisabled: props.isDisabled,
|
|
195
195
|
isRequired: props.isRequired
|
|
196
196
|
}) }) }),
|
|
197
|
-
/* @__PURE__ */ jsx(FormField.
|
|
198
|
-
/* @__PURE__ */ jsx(
|
|
197
|
+
/* @__PURE__ */ jsx(FieldErrorContext.Provider, { value: validation, children: /* @__PURE__ */ jsx(FormField.Error, { ...errorProps }) }),
|
|
198
|
+
/* @__PURE__ */ jsx(FormField.Caption, { ...captionProps })
|
|
199
199
|
] })
|
|
200
200
|
] }),
|
|
201
201
|
/* @__PURE__ */ jsx(PopoverInner, { ...popoverProps, children: /* @__PURE__ */ jsx(SelectList, { ...listProps }) })
|
|
@@ -3,13 +3,13 @@ const intlMessages = {
|
|
|
3
3
|
"empty items": "Нет вариантов выбора",
|
|
4
4
|
loading: "Загрузка…",
|
|
5
5
|
"selected items": "Выбранные элементы",
|
|
6
|
-
more: ({ count }) =>
|
|
6
|
+
more: ({ count }) => `+${count}`
|
|
7
7
|
},
|
|
8
8
|
"en-US": {
|
|
9
9
|
"empty items": "No options available",
|
|
10
10
|
"selected items": "Selected items",
|
|
11
11
|
loading: "Loading…",
|
|
12
|
-
more: ({ count }) =>
|
|
12
|
+
more: ({ count }) => `+${count}`
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
export {
|
|
@@ -37,7 +37,7 @@ function TableColumnHeader({
|
|
|
37
37
|
const defaultIcon = direction === "ascending" ? /* @__PURE__ */ jsx(IconChevronUpS16, {}) : /* @__PURE__ */ jsx(IconChevronDownS16, {});
|
|
38
38
|
const iconToRender = renderSortIcon?.({ direction, isActive }) ?? defaultIcon;
|
|
39
39
|
const columnSortIcon = allowsSorting && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: clsx(s.sortIcon, isActive && s.active), children: iconToRender });
|
|
40
|
-
const isResizable = allowsResizing && layoutState;
|
|
40
|
+
const isResizable = !!(allowsResizing && layoutState);
|
|
41
41
|
return /* @__PURE__ */ jsx(
|
|
42
42
|
"th",
|
|
43
43
|
{
|
|
@@ -69,8 +69,8 @@ function TableColumnHeader({
|
|
|
69
69
|
Resizer,
|
|
70
70
|
{
|
|
71
71
|
column,
|
|
72
|
-
layoutState,
|
|
73
72
|
onResize,
|
|
73
|
+
layoutState,
|
|
74
74
|
onResizeEnd,
|
|
75
75
|
onResizeStart
|
|
76
76
|
}
|
package/dist/components/Textarea/components/TextareaContextConsumer/TextareaContextConsumer.js
CHANGED
|
@@ -60,8 +60,8 @@ const TextareaContextConsumer = forwardRef((props, ref) => {
|
|
|
60
60
|
/* @__PURE__ */ jsx(FormField.Label, { ...labelProps }),
|
|
61
61
|
/* @__PURE__ */ jsxs("div", { className: s.body, children: [
|
|
62
62
|
/* @__PURE__ */ jsx(FormField.ControlGroup, { ...groupProps, children: /* @__PURE__ */ jsx(FormField.Input, { as: "textarea", ...textareaProps }) }),
|
|
63
|
-
/* @__PURE__ */ jsx(FormField.
|
|
64
|
-
/* @__PURE__ */ jsx(FormField.
|
|
63
|
+
/* @__PURE__ */ jsx(FormField.Error, { ...errorProps }),
|
|
64
|
+
/* @__PURE__ */ jsx(FormField.Caption, { ...captionProps })
|
|
65
65
|
] })
|
|
66
66
|
] });
|
|
67
67
|
});
|
|
@@ -120,8 +120,8 @@ function TimePickerRender(props, ref) {
|
|
|
120
120
|
] })
|
|
121
121
|
}
|
|
122
122
|
),
|
|
123
|
-
/* @__PURE__ */ jsx(FormField.
|
|
124
|
-
/* @__PURE__ */ jsx(
|
|
123
|
+
/* @__PURE__ */ jsx(FieldErrorContext.Provider, { value: validation, children: /* @__PURE__ */ jsx(FormField.Error, { ...errorProps }) }),
|
|
124
|
+
/* @__PURE__ */ jsx(FormField.Caption, { ...captionProps })
|
|
125
125
|
] })
|
|
126
126
|
] });
|
|
127
127
|
}
|
|
@@ -43,6 +43,8 @@ export * from './Autocomplete';
|
|
|
43
43
|
export * from './ToastProvider';
|
|
44
44
|
export * from './Breadcrumbs';
|
|
45
45
|
export * from './Accordion';
|
|
46
|
+
export * from './ContenPanel';
|
|
47
|
+
export * from './Navbar';
|
|
46
48
|
export * from './layout';
|
|
47
49
|
export { useListData, useAsyncList, type ListData, type ListOptions, type AsyncListData, type AsyncListOptions, type AsyncListLoadFunction, type AsyncListLoadOptions, type TimeValue, type DateValue, } from '@koobiq/react-primitives';
|
|
48
50
|
export { useRouter, useLocale, useFilter, type Locale, type SortDescriptor, type Selection, RouterProvider, useDateFormatter, } from '@koobiq/react-core';
|
package/dist/index.js
CHANGED
|
@@ -108,6 +108,11 @@ import { Accordion, AccordionComponent } from "./components/Accordion/Accordion.
|
|
|
108
108
|
import { AccordionGroup } from "./components/Accordion/components/AccordionGroup/AccordionGroup.js";
|
|
109
109
|
import { AccordionGroupStateContext } from "./components/Accordion/components/AccordionGroup/AccordionGroupContext.js";
|
|
110
110
|
import { AccordionStateContext } from "./components/Accordion/AccordionStateContext.js";
|
|
111
|
+
import { ContentPanel } from "./components/ContenPanel/ContentPanel.js";
|
|
112
|
+
import { ContentPanelContainer } from "./components/ContenPanel/components/ContentPanelContainer/ContentPanelContainer.js";
|
|
113
|
+
import { ContentPanelContainerContext } from "./components/ContenPanel/components/ContentPanelContainer/ContentPanelContainerContext.js";
|
|
114
|
+
import { Navbar, NavbarComponent } from "./components/Navbar/Navbar.js";
|
|
115
|
+
import { navbarPropVariant } from "./components/Navbar/types.js";
|
|
111
116
|
import { flex, flexPropAlignItems, flexPropDirection, flexPropFlex, flexPropGap, flexPropJustifyContent, flexPropOrder, flexPropWrap } from "./components/layout/flex/flex.js";
|
|
112
117
|
import { spacing, spacingGap } from "./components/layout/spacing/spacing.js";
|
|
113
118
|
export {
|
|
@@ -132,6 +137,9 @@ export {
|
|
|
132
137
|
Checkbox,
|
|
133
138
|
CheckboxGroup,
|
|
134
139
|
Container,
|
|
140
|
+
ContentPanel,
|
|
141
|
+
ContentPanelContainer,
|
|
142
|
+
ContentPanelContainerContext,
|
|
135
143
|
DateInput,
|
|
136
144
|
DateInputRender,
|
|
137
145
|
DatePicker,
|
|
@@ -167,6 +175,8 @@ export {
|
|
|
167
175
|
ModalContent,
|
|
168
176
|
ModalFooter,
|
|
169
177
|
ModalHeader,
|
|
178
|
+
Navbar,
|
|
179
|
+
NavbarComponent,
|
|
170
180
|
Popover,
|
|
171
181
|
PopoverContent,
|
|
172
182
|
PopoverFooter,
|
|
@@ -247,6 +257,7 @@ export {
|
|
|
247
257
|
inputPropLabelPlacement,
|
|
248
258
|
inputPropVariant,
|
|
249
259
|
modalPropSize,
|
|
260
|
+
navbarPropVariant,
|
|
250
261
|
popoverPropPlacement,
|
|
251
262
|
popoverPropSize,
|
|
252
263
|
popoverPropType,
|