@koobiq/react-components 0.0.1-beta.12 → 0.0.1-beta.14

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.
Files changed (72) hide show
  1. package/dist/components/Alert/Alert.js +1 -1
  2. package/dist/components/Alert/types.d.ts +1 -1
  3. package/dist/components/Button/types.d.ts +4 -5
  4. package/dist/components/Collections/Item.d.ts +14 -0
  5. package/dist/components/Collections/Item.js +11 -0
  6. package/dist/components/{List/ListSection.d.ts → Collections/Section.d.ts} +6 -6
  7. package/dist/components/Collections/Section.js +11 -0
  8. package/dist/components/Collections/index.d.ts +2 -0
  9. package/dist/components/Dialog/Dialog.d.ts +9 -1
  10. package/dist/components/Dialog/Dialog.js +31 -17
  11. package/dist/components/Dialog/components/DialogBody.d.ts +13 -0
  12. package/dist/components/Dialog/components/{DialogContent.js → DialogBody.js} +9 -8
  13. package/dist/components/Dialog/components/DialogCloseButton.d.ts +14 -1
  14. package/dist/components/Dialog/components/DialogCloseButton.js +3 -6
  15. package/dist/components/Dialog/components/index.d.ts +1 -1
  16. package/dist/components/Dialog/index.d.ts +0 -1
  17. package/dist/components/Divider/Divider.d.ts +4 -0
  18. package/dist/components/Divider/Divider.js +44 -0
  19. package/dist/components/Divider/Divider.module.css.js +29 -0
  20. package/dist/components/Divider/index.d.ts +2 -0
  21. package/dist/components/Divider/types.d.ts +26 -0
  22. package/dist/components/Divider/types.js +6 -0
  23. package/dist/components/FieldComponents/FieldControl/FieldControl.d.ts +1 -1
  24. package/dist/components/FieldComponents/FieldNumberControl/FieldNumberControl.d.ts +1 -1
  25. package/dist/components/Grid/Grid.d.ts +8 -2
  26. package/dist/components/Grid/Grid.js +5 -2
  27. package/dist/components/IconButton/types.d.ts +5 -4
  28. package/dist/components/Link/types.d.ts +4 -4
  29. package/dist/components/List/List.d.ts +11 -2
  30. package/dist/components/List/List.js +13 -4
  31. package/dist/components/List/List.module.css.js +0 -3
  32. package/dist/components/List/components/ListItemText/ListItemText.js +26 -0
  33. package/dist/components/List/components/ListItemText/ListItemText.module.css.js +11 -0
  34. package/dist/components/List/components/ListOption/ListOption.d.ts +3 -2
  35. package/dist/components/List/components/ListOption/ListOption.js +10 -15
  36. package/dist/components/List/components/ListSection/ListSection.d.ts +3 -2
  37. package/dist/components/List/components/ListSection/ListSection.js +1 -4
  38. package/dist/components/List/index.d.ts +3 -3
  39. package/dist/components/List/types.d.ts +2 -6
  40. package/dist/components/Modal/Modal.d.ts +9 -1
  41. package/dist/components/Modal/Modal.js +7 -4
  42. package/dist/components/Modal/index.d.ts +15 -2
  43. package/dist/components/Modal/index.js +9 -0
  44. package/dist/components/Popover/Popover.d.ts +9 -1
  45. package/dist/components/Popover/Popover.js +7 -4
  46. package/dist/components/Popover/index.d.ts +15 -2
  47. package/dist/components/Popover/index.js +9 -0
  48. package/dist/components/Popover/types.d.ts +4 -2
  49. package/dist/components/Popover/types.js +9 -1
  50. package/dist/components/Select/Select.d.ts +11 -2
  51. package/dist/components/Select/Select.js +9 -2
  52. package/dist/components/Select/types.d.ts +1 -1
  53. package/dist/components/SidePanel/SidePanel.d.ts +9 -1
  54. package/dist/components/SidePanel/SidePanel.js +7 -4
  55. package/dist/components/SidePanel/index.d.ts +15 -2
  56. package/dist/components/SidePanel/index.js +9 -0
  57. package/dist/components/Typography/types.d.ts +6 -1
  58. package/dist/components/index.d.ts +1 -0
  59. package/dist/index.js +27 -21
  60. package/dist/style.css +187 -134
  61. package/dist/styles/utility.d.ts +2 -0
  62. package/dist/styles/utility.js +3 -1
  63. package/dist/styles/utility.module.css.js +5 -1
  64. package/dist/types.d.ts +1 -0
  65. package/package.json +5 -5
  66. package/dist/components/Dialog/DialogContext.d.ts +0 -9
  67. package/dist/components/Dialog/DialogContext.js +0 -12
  68. package/dist/components/Dialog/components/DialogContent.d.ts +0 -12
  69. package/dist/components/List/ListItem.d.ts +0 -6
  70. package/dist/components/List/ListItem.js +0 -11
  71. package/dist/components/List/ListSection.js +0 -11
  72. package/dist/components/List/components/ListOption/ListOption.module.css.js +0 -23
@@ -42,7 +42,7 @@ const Alert = polymorphicForwardRef(
42
42
  {
43
43
  "aria-label": stringFormatter.format("close"),
44
44
  variant: "fade-contrast",
45
- onClick: onClose,
45
+ onPress: onClose,
46
46
  className: s.closeIcon
47
47
  },
48
48
  slotProps?.closeIcon
@@ -34,7 +34,7 @@ export type AlertBaseProps = {
34
34
  /** Override default icon. */
35
35
  icon?: ReactNode;
36
36
  /** A callback function called when the user clicks the alert's close button. */
37
- onClose?: IconButtonProps['onClick'];
37
+ onClose?: IconButtonProps['onPress'];
38
38
  slotProps?: {
39
39
  content?: ComponentPropsWithRef<'div'>;
40
40
  statusIcon?: ComponentPropsWithRef<'div'>;
@@ -1,9 +1,9 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { ButtonOptions, HoverEvent } from '@koobiq/react-primitives';
2
+ import type { ExtendableProps } from '@koobiq/react-core';
3
+ import type { HoverEvent, UseButtonProps } from '@koobiq/react-primitives';
3
4
  export declare const buttonPropVariant: readonly ["contrast-filled", "contrast-transparent", "fade-contrast-filled", "fade-contrast-outline", "fade-theme-outline", "theme-transparent"];
4
5
  export type ButtonPropVariant = (typeof buttonPropVariant)[number];
5
- export type ButtonPropOnClick = ButtonOptions['onPress'];
6
- export type ButtonBaseProps = {
6
+ export type ButtonBaseProps = ExtendableProps<{
7
7
  /** The content of the component. */
8
8
  children?: ReactNode;
9
9
  /**
@@ -43,5 +43,4 @@ export type ButtonBaseProps = {
43
43
  onHoverStart?: (e: HoverEvent) => void;
44
44
  /** Handler that is called when a hover interaction ends. */
45
45
  onHoverEnd?: (e: HoverEvent) => void;
46
- onClick?: ButtonPropOnClick;
47
- };
46
+ }, UseButtonProps>;
@@ -0,0 +1,14 @@
1
+ import type { CSSProperties } from 'react';
2
+ import type { ItemProps as AriaItemProps } from '@koobiq/react-primitives';
3
+ export type ItemProps<T> = AriaItemProps<T> & {
4
+ /** Additional CSS-classes. */
5
+ className?: string;
6
+ /** Inline styles. */
7
+ style?: CSSProperties;
8
+ /** Unique identifier for testing purposes. */
9
+ 'data-testid'?: string | number;
10
+ };
11
+ export declare function Item<T>(props: ItemProps<T>): import("react/jsx-runtime").JSX.Element;
12
+ export declare namespace Item {
13
+ var getCollectionNode: unknown;
14
+ }
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { Item as Item$1 } from "@koobiq/react-primitives";
4
+ const ItemInner = Item$1;
5
+ function Item(props) {
6
+ return /* @__PURE__ */ jsx(Item$1, { ...props });
7
+ }
8
+ Item.getCollectionNode = ItemInner.getCollectionNode;
9
+ export {
10
+ Item
11
+ };
@@ -1,16 +1,16 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { SectionProps } from '@koobiq/react-primitives';
3
- export type ListSectionProps<T> = {
2
+ import type { SectionProps as AriaSectionProps } from '@koobiq/react-primitives';
3
+ export type SectionProps<T> = {
4
4
  /** Rendered contents of the section, e.g. a header. */
5
5
  title?: ReactNode;
6
6
  /** An accessibility label for the section. */
7
7
  'aria-label'?: string;
8
8
  /** Static child items or a function to render children. */
9
- children: SectionProps<T>['children'];
9
+ children: AriaSectionProps<T>['children'];
10
10
  /** Item objects in the section. */
11
- items?: SectionProps<T>['items'];
11
+ items?: AriaSectionProps<T>['items'];
12
12
  };
13
- export declare function ListSection<T>(props: ListSectionProps<T>): import("react/jsx-runtime").JSX.Element;
14
- export declare namespace ListSection {
13
+ export declare function Section<T>(props: SectionProps<T>): import("react/jsx-runtime").JSX.Element;
14
+ export declare namespace Section {
15
15
  var getCollectionNode: unknown;
16
16
  }
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { Section as Section$1 } from "@koobiq/react-primitives";
4
+ const SectionInner = Section$1;
5
+ function Section(props) {
6
+ return /* @__PURE__ */ jsx(Section$1, { ...props });
7
+ }
8
+ Section.getCollectionNode = SectionInner.getCollectionNode;
9
+ export {
10
+ Section
11
+ };
@@ -0,0 +1,2 @@
1
+ export * from './Section';
2
+ export * from './Item';
@@ -1,2 +1,10 @@
1
+ import { DialogBody, DialogFooter, DialogHeader } from './components';
1
2
  import type { DialogProps } from './types';
2
- export declare const Dialog: import("react").ForwardRefExoticComponent<Omit<DialogProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
3
+ declare const DialogComponent: import("react").ForwardRefExoticComponent<Omit<DialogProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
4
+ type CompoundedComponent = typeof DialogComponent & {
5
+ Header: typeof DialogHeader;
6
+ Body: typeof DialogBody;
7
+ Footer: typeof DialogFooter;
8
+ };
9
+ export declare const Dialog: CompoundedComponent;
10
+ export {};
@@ -1,17 +1,18 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { forwardRef, useRef, useEffect } from "react";
4
- import { useBoolean, useDOMRef, mergeProps, clsx, useElementSize, useEventListener, useMultiRef } from "@koobiq/react-core";
5
- import { useDialog } from "@koobiq/react-primitives";
3
+ import { forwardRef, useEffect } from "react";
4
+ import { useBoolean, useDOMRef, mergeProps, clsx, useElementSize, useEventListener } from "@koobiq/react-core";
5
+ import { useDialog, Provider, ButtonContext } from "@koobiq/react-primitives";
6
6
  import { utilClasses } from "../../styles/utility.js";
7
7
  import s from "./Dialog.module.css.js";
8
- import { DialogContext } from "./DialogContext.js";
8
+ import { DialogBodyContext, DialogBody } from "./components/DialogBody.js";
9
9
  import { DialogCloseButton } from "./components/DialogCloseButton.js";
10
- const Dialog = forwardRef(
10
+ import { DialogHeader } from "./components/DialoglHeader.js";
11
+ import { DialogFooter } from "./components/DialogFooter.js";
12
+ const DialogComponent = forwardRef(
11
13
  ({ onClose, children, slotProps, hideCloseButton, ...other }, ref) => {
12
14
  const [topOverflow, { set: setTopOverflow }] = useBoolean();
13
15
  const [bottomOverflow, { set: setBottomOverflow }] = useBoolean();
14
- const contentRef = useRef(null);
15
16
  const domRef = useDOMRef(ref);
16
17
  const { dialogProps } = useDialog(other, domRef);
17
18
  const showCloseButton = !hideCloseButton;
@@ -35,24 +36,33 @@ const Dialog = forwardRef(
35
36
  element.scrollTop + element.clientHeight < element.scrollHeight
36
37
  );
37
38
  };
38
- const { ref: innerRef, height } = useElementSize();
39
+ const { ref: bodyRef, height } = useElementSize();
39
40
  useEffect(() => {
40
- if (contentRef.current) updateOverflow(contentRef.current);
41
- }, [contentRef.current, height]);
41
+ if (bodyRef.current) updateOverflow(bodyRef.current);
42
+ }, [bodyRef.current, height]);
42
43
  useEventListener({
43
- element: contentRef,
44
+ element: bodyRef,
44
45
  eventName: "scroll",
45
46
  handler: () => {
46
- updateOverflow(contentRef.current);
47
+ updateOverflow(bodyRef.current);
47
48
  }
48
49
  });
49
50
  return /* @__PURE__ */ jsx(
50
- DialogContext.Provider,
51
+ Provider,
51
52
  {
52
- value: {
53
- close: onClose,
54
- slots: { content: { ref: useMultiRef([contentRef, innerRef]) } }
55
- },
53
+ values: [
54
+ [DialogBodyContext, { ref: bodyRef }],
55
+ [
56
+ ButtonContext,
57
+ {
58
+ slots: {
59
+ close: {
60
+ onPress: onClose
61
+ }
62
+ }
63
+ }
64
+ ]
65
+ ],
56
66
  children: /* @__PURE__ */ jsxs("section", { ...rootProps, ref: domRef, children: [
57
67
  showCloseButton && /* @__PURE__ */ jsx(DialogCloseButton, { ...slotProps?.["close-button"] }),
58
68
  /* @__PURE__ */ jsx("div", { ...containerProps, children })
@@ -61,7 +71,11 @@ const Dialog = forwardRef(
61
71
  );
62
72
  }
63
73
  );
64
- Dialog.displayName = "Dialog";
74
+ DialogComponent.displayName = "Dialog";
75
+ const Dialog = DialogComponent;
76
+ Dialog.Header = DialogHeader;
77
+ Dialog.Body = DialogBody;
78
+ Dialog.Footer = DialogFooter;
65
79
  export {
66
80
  Dialog
67
81
  };
@@ -0,0 +1,13 @@
1
+ import type { ReactNode, ComponentRef } from 'react';
2
+ import { type ExtendableComponentPropsWithRef } from '@koobiq/react-core';
3
+ export type DialogBodyRef = ComponentRef<'div'>;
4
+ export type DialogBodyProps = ExtendableComponentPropsWithRef<{
5
+ /** Additional CSS-classes. */
6
+ className?: string;
7
+ /** The content of the component. */
8
+ children?: ReactNode;
9
+ /** Unique identifier for testing purposes. */
10
+ 'data-testid'?: string;
11
+ }, 'div'>;
12
+ export declare const DialogBodyContext: import("react").Context<DialogBodyProps>;
13
+ export declare const DialogBody: import("react").ForwardRefExoticComponent<Omit<DialogBodyProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { forwardRef } from "react";
4
- import { clsx, useMultiRef } from "@koobiq/react-core";
3
+ import { createContext, forwardRef, useContext } from "react";
4
+ import { mergeProps, clsx, useMultiRef } from "@koobiq/react-core";
5
5
  import { utilClasses } from "../../../styles/utility.js";
6
6
  import s from "../Dialog.module.css.js";
7
- import { useDialogProvider } from "../DialogContext.js";
8
- const DialogContent = forwardRef(
7
+ const DialogBodyContext = createContext({});
8
+ const DialogBody = forwardRef(
9
9
  ({ children, className, ...other }, ref) => {
10
- const { slots } = useDialogProvider();
11
- const { content: { ref: contextRef } = {} } = slots || {};
10
+ const defaultProps = useContext(DialogBodyContext);
11
+ const { ref: contextRef } = mergeProps(defaultProps, other);
12
12
  return /* @__PURE__ */ jsx(
13
13
  "div",
14
14
  {
@@ -24,7 +24,8 @@ const DialogContent = forwardRef(
24
24
  );
25
25
  }
26
26
  );
27
- DialogContent.displayName = "DialogContent";
27
+ DialogBody.displayName = "DialogBody";
28
28
  export {
29
- DialogContent
29
+ DialogBody,
30
+ DialogBodyContext
30
31
  };
@@ -4,6 +4,19 @@ export type DialogCloseButtonRef = ComponentRef<'button'>;
4
4
  export type DialogCloseButtonProps = ButtonProps;
5
5
  export declare const DialogCloseButton: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
6
6
  ref?: ((instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLButtonElement> | null | undefined;
7
- }, "as" | keyof import("../..").ButtonBaseProps> & import("../..").ButtonBaseProps & {
7
+ }, "children" | "progress" | "as" | "className" | "autoFocus" | "id" | "rel" | "aria-controls" | "aria-describedby" | "aria-details" | "aria-expanded" | "aria-haspopup" | "aria-label" | "aria-labelledby" | "aria-pressed" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "target" | "type" | "href" | "disabled" | "onPress" | "onPressStart" | "onPressEnd" | "onPressChange" | "onPressUp" | "onFocusChange" | "elementType" | "preventFocusOnPress" | "excludeFromTabOrder" | "variant" | "onHoverStart" | "onHoverEnd" | "onlyIcon" | "fullWidth" | "startIcon" | "endIcon" | "data-testid"> & Omit<import("@koobiq/react-primitives").ButtonOptions, "children" | "progress" | "className" | "disabled" | "variant" | "onHoverStart" | "onHoverEnd" | "onlyIcon" | "fullWidth" | "startIcon" | "endIcon" | "data-testid"> & {
8
+ children?: import("react").ReactNode;
9
+ variant?: import("../..").ButtonPropVariant;
10
+ progress?: boolean;
11
+ disabled?: boolean;
12
+ onlyIcon?: boolean;
13
+ className?: string;
14
+ fullWidth?: boolean;
15
+ startIcon?: import("react").ReactNode;
16
+ endIcon?: import("react").ReactNode;
17
+ 'data-testid'?: string | number;
18
+ onHoverStart?: (e: import("@react-types/shared").HoverEvent) => void;
19
+ onHoverEnd?: (e: import("@react-types/shared").HoverEvent) => void;
20
+ } & {
8
21
  as?: "button" | undefined;
9
22
  }, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1,25 +1,22 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { forwardRef } from "react";
4
- import { mergeProps } from "@koobiq/react-core";
5
4
  import { IconXmark16 } from "@koobiq/react-icons";
6
5
  import { useLocalizedStringFormatter } from "@koobiq/react-primitives";
7
6
  import s from "../Dialog.module.css.js";
8
7
  import intlMessages from "../intl.json.js";
9
- import { useDialogProvider } from "../DialogContext.js";
10
8
  import { Button } from "../../Button/Button.js";
11
- const DialogCloseButton = forwardRef(({ onClick, ...other }, ref) => {
12
- const { close } = useDialogProvider();
9
+ const DialogCloseButton = forwardRef((props, ref) => {
13
10
  const stringFormatter = useLocalizedStringFormatter(intlMessages);
14
11
  return /* @__PURE__ */ jsx("div", { className: s.closeButton, children: /* @__PURE__ */ jsx(
15
12
  Button,
16
13
  {
17
- ...mergeProps({ onClick: close }, { onClick }),
18
14
  "aria-label": stringFormatter.format("close"),
19
15
  startIcon: /* @__PURE__ */ jsx(IconXmark16, {}),
20
16
  variant: "contrast-transparent",
17
+ slot: "close",
21
18
  onlyIcon: true,
22
- ...other,
19
+ ...props,
23
20
  ref
24
21
  }
25
22
  ) });
@@ -1,4 +1,4 @@
1
1
  export * from './DialoglHeader';
2
- export * from './DialogContent';
2
+ export * from './DialogBody';
3
3
  export * from './DialogFooter';
4
4
  export * from './DialogCloseButton';
@@ -1,4 +1,3 @@
1
1
  export * from './types';
2
2
  export * from './Dialog';
3
3
  export * from './components';
4
- export * from './DialogContext';
@@ -0,0 +1,4 @@
1
+ import type { ComponentPropsWithRef, ElementType } from 'react';
2
+ import type { DividerBaseProps } from './index';
3
+ export declare const Divider: import("@koobiq/react-core").PolyForwardComponent<"div", DividerBaseProps, ElementType>;
4
+ export type DividerProps<As extends ElementType = 'div'> = ComponentPropsWithRef<typeof Divider<As>>;
@@ -0,0 +1,44 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { polymorphicForwardRef, clsx } from "@koobiq/react-core";
4
+ import { useSeparator } from "@koobiq/react-primitives";
5
+ import s from "./Divider.module.css.js";
6
+ const Divider = polymorphicForwardRef(
7
+ (props, ref) => {
8
+ const {
9
+ as: Tag = "div",
10
+ orientation = "horizontal",
11
+ disablePaddings = false,
12
+ flexItem = false,
13
+ display,
14
+ className,
15
+ ...other
16
+ } = props;
17
+ const { separatorProps } = useSeparator({
18
+ ...other,
19
+ orientation,
20
+ elementType: Tag
21
+ });
22
+ const hasPaddings = !disablePaddings;
23
+ return /* @__PURE__ */ jsx(
24
+ Tag,
25
+ {
26
+ ...separatorProps,
27
+ className: clsx(
28
+ s.base,
29
+ s[orientation],
30
+ display && s[display],
31
+ hasPaddings && s.hasPaddings,
32
+ flexItem && s.flexItem,
33
+ className
34
+ ),
35
+ ref,
36
+ ...other
37
+ }
38
+ );
39
+ }
40
+ );
41
+ Divider.displayName = "Divider";
42
+ export {
43
+ Divider
44
+ };
@@ -0,0 +1,29 @@
1
+ const base = "kbq-divider-16da20";
2
+ const block = "kbq-divider-block-72e3e3";
3
+ const inlineBlock = "kbq-divider-inlineBlock-0f06d1";
4
+ const inline = "kbq-divider-inline-2d4752";
5
+ const vertical = "kbq-divider-vertical-a4e613";
6
+ const horizontal = "kbq-divider-horizontal-22c78d";
7
+ const hasPaddings = "kbq-divider-hasPaddings-d8f601";
8
+ const flexItem = "kbq-divider-flexItem-af9975";
9
+ const s = {
10
+ base,
11
+ block,
12
+ inlineBlock,
13
+ inline,
14
+ vertical,
15
+ horizontal,
16
+ hasPaddings,
17
+ flexItem
18
+ };
19
+ export {
20
+ base,
21
+ block,
22
+ s as default,
23
+ flexItem,
24
+ hasPaddings,
25
+ horizontal,
26
+ inline,
27
+ inlineBlock,
28
+ vertical
29
+ };
@@ -0,0 +1,2 @@
1
+ export * from './Divider';
2
+ export * from './types';
@@ -0,0 +1,26 @@
1
+ export declare const dividerPropDisplay: readonly ["block", "inline", "inlineBlock"];
2
+ export declare const dividerPropOrientation: readonly ["horizontal", "vertical"];
3
+ export type DividerPropOrientation = (typeof dividerPropOrientation)[number];
4
+ export type DividerPropDisplay = (typeof dividerPropDisplay)[number];
5
+ export type DividerBaseProps = {
6
+ /** Additional CSS-classes. */
7
+ className?: string;
8
+ /**
9
+ * The orientation of the separator.
10
+ * @default 'horizontal'
11
+ */
12
+ orientation?: DividerPropOrientation;
13
+ /** Set the display for the component. */
14
+ display?: DividerPropDisplay;
15
+ /**
16
+ * Indicates if the divider is a child of a flex container.
17
+ * Mainly used for vertical layout.
18
+ * Used when the block does not have a fixed height.
19
+ * @default false
20
+ */
21
+ flexItem?: boolean;
22
+ /** If `true`, it disables the default paddings.
23
+ * @default false
24
+ */
25
+ disablePaddings?: boolean;
26
+ };
@@ -0,0 +1,6 @@
1
+ const dividerPropDisplay = ["block", "inline", "inlineBlock"];
2
+ const dividerPropOrientation = ["horizontal", "vertical"];
3
+ export {
4
+ dividerPropDisplay,
5
+ dividerPropOrientation
6
+ };
@@ -4,7 +4,7 @@ export type FieldControlProps = TextFieldProps & {
4
4
  className?: string;
5
5
  };
6
6
  export type FieldControlRef = TextFieldRef;
7
- export declare const FieldControl: import("react").ForwardRefExoticComponent<Omit<import("@koobiq/react-primitives").UseTextFieldProps, keyof import("node_modules/@koobiq/react-primitives/dist/utils").RenderProps<import("@koobiq/react-primitives").TextFieldRenderProps>> & import("node_modules/@koobiq/react-primitives/dist/utils").RenderProps<import("@koobiq/react-primitives").TextFieldRenderProps> & {
7
+ export declare const FieldControl: import("react").ForwardRefExoticComponent<Omit<import("@koobiq/react-primitives").UseTextFieldProps, keyof import("@koobiq/react-primitives").RenderProps<import("@koobiq/react-primitives").TextFieldRenderProps>> & import("@koobiq/react-primitives").RenderProps<import("@koobiq/react-primitives").TextFieldRenderProps> & {
8
8
  fullWidth?: boolean;
9
9
  className?: string;
10
10
  } & import("react").RefAttributes<HTMLDivElement>>;
@@ -4,7 +4,7 @@ export type FieldNumberControlProps = NumberFieldProps & {
4
4
  className?: string;
5
5
  };
6
6
  export type FieldNumberControlRef = NumberFieldRef;
7
- export declare const FieldNumberControl: import("react").ForwardRefExoticComponent<Omit<import("@koobiq/react-primitives").UseNumberFieldProps, keyof import("node_modules/@koobiq/react-primitives/dist/utils").RenderProps<import("@koobiq/react-primitives").NumberFieldRenderProps>> & import("node_modules/@koobiq/react-primitives/dist/utils").RenderProps<import("@koobiq/react-primitives").NumberFieldRenderProps> & {
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
8
  fullWidth?: boolean;
9
9
  className?: string;
10
10
  } & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,10 @@
1
1
  import type { ComponentPropsWithRef, ElementType } from 'react';
2
+ import { GridItem } from './components';
2
3
  import type { GridBaseProps } from './types';
3
- export declare const Grid: import("@koobiq/react-core").PolyForwardComponent<"div", GridBaseProps, ElementType>;
4
- export type GridProps<As extends ElementType = 'div'> = ComponentPropsWithRef<typeof Grid<As>>;
4
+ declare const GridComponent: import("@koobiq/react-core").PolyForwardComponent<"div", GridBaseProps, ElementType>;
5
+ export type GridProps<As extends ElementType = 'div'> = ComponentPropsWithRef<typeof GridComponent<As>>;
6
+ type CompoundedComponent = typeof GridComponent & {
7
+ Item: typeof GridItem;
8
+ };
9
+ export declare const Grid: CompoundedComponent;
10
+ export {};
@@ -3,9 +3,10 @@ import { jsx } from "react/jsx-runtime";
3
3
  import { polymorphicForwardRef, clsx } from "@koobiq/react-core";
4
4
  import s from "./Grid.module.css.js";
5
5
  import { normalizeGap } from "./utils.js";
6
+ import { GridItem } from "./components/GridItem/GridItem.js";
6
7
  import { useMatchedBreakpoints } from "../Provider/BreakpointsContext.js";
7
8
  import { getResponsiveValue } from "../../utils/getResponsiveValue/getResponsiveValue.js";
8
- const Grid = polymorphicForwardRef(
9
+ const GridComponent = polymorphicForwardRef(
9
10
  ({
10
11
  as: Tag = "div",
11
12
  gap: gapProp,
@@ -46,7 +47,9 @@ const Grid = polymorphicForwardRef(
46
47
  );
47
48
  }
48
49
  );
49
- Grid.displayName = "Grid";
50
+ GridComponent.displayName = "Grid";
51
+ const Grid = GridComponent;
52
+ Grid.Item = GridItem;
50
53
  export {
51
54
  Grid
52
55
  };
@@ -1,10 +1,11 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { ButtonOptions, HoverEvent } from '@koobiq/react-primitives';
2
+ import type { ExtendableProps } from '@koobiq/react-core';
3
+ import type { HoverEvent, UseButtonProps } from '@koobiq/react-primitives';
3
4
  export declare const iconButtonPropVariant: readonly ["theme", "theme-contrast", "fade-contrast", "error", "success", "warning"];
4
5
  export type IconButtonPropVariant = (typeof iconButtonPropVariant)[number];
5
6
  export declare const iconButtonPropSize: readonly ["l", "xl"];
6
7
  export type IconButtonPropSize = (typeof iconButtonPropSize)[number];
7
- export type IconButtonBaseProps = {
8
+ export type IconButtonBaseProps = ExtendableProps<{
8
9
  /** The content of the component. */
9
10
  children?: ReactNode;
10
11
  /**
@@ -32,5 +33,5 @@ export type IconButtonBaseProps = {
32
33
  /** Handler that is called when a hover interaction starts. */
33
34
  onHoverStart?: (e: HoverEvent) => void;
34
35
  /** Handler that is called when a hover interaction ends. */
35
- onClick?: ButtonOptions['onPress'];
36
- };
36
+ onHoverEnd?: (e: HoverEvent) => void;
37
+ }, UseButtonProps>;
@@ -1,8 +1,9 @@
1
1
  import type { CSSProperties, ReactNode } from 'react';
2
- import type { ButtonOptions } from '@koobiq/react-primitives';
2
+ import type { ExtendableProps } from '@koobiq/react-core';
3
+ import type { UseLinkProps } from '@koobiq/react-primitives';
3
4
  import type { TypographyPropVariant } from '../Typography';
4
5
  export type LinkPropVariant = Extract<TypographyPropVariant, 'text-compact' | 'text-normal' | 'text-big' | 'inherit'>;
5
- export type LinkBaseProps = {
6
+ export type LinkBaseProps = ExtendableProps<{
6
7
  /** The content of the component. */
7
8
  children?: ReactNode;
8
9
  /** The variant of the component. */
@@ -21,5 +22,4 @@ export type LinkBaseProps = {
21
22
  className?: string;
22
23
  /** Inline styles */
23
24
  style?: CSSProperties;
24
- onClick?: ButtonOptions['onPress'];
25
- };
25
+ }, UseLinkProps>;
@@ -1,9 +1,18 @@
1
1
  import type { Ref } from 'react';
2
2
  import { type ListState } from '@koobiq/react-primitives';
3
- import type { ListComponent, ListBaseProps } from './types';
3
+ import { Item, Section } from '../Collections';
4
+ import { ListItemText } from './components';
5
+ import type { ListComponentProps, ListBaseProps } from './types';
4
6
  export type ListInnerProps<T extends object> = {
5
7
  state: ListState<T>;
6
8
  listRef?: Ref<HTMLUListElement>;
7
9
  } & Omit<ListBaseProps<T>, 'ref'>;
8
10
  export declare function ListInner<T extends object>(props: ListInnerProps<T>): import("react/jsx-runtime").JSX.Element;
9
- export declare const List: ListComponent;
11
+ declare const ListComponent: ListComponentProps;
12
+ type CompoundedComponent = typeof ListComponent & {
13
+ Item: typeof Item;
14
+ Section: typeof Section;
15
+ ItemText: typeof ListItemText;
16
+ };
17
+ export declare const List: CompoundedComponent;
18
+ export {};
@@ -1,12 +1,17 @@
1
1
  "use client";
2
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
3
3
  import { forwardRef } from "react";
4
4
  import { useDOMRef, mergeProps, clsx, isNotNil } from "@koobiq/react-core";
5
- import { useListState, useListBox } from "@koobiq/react-primitives";
5
+ import { useListBox, useListState } from "@koobiq/react-primitives";
6
+ import { utilClasses } from "../../styles/utility.js";
6
7
  import s from "./List.module.css.js";
7
8
  import { ListSection } from "./components/ListSection/ListSection.js";
9
+ import { Item } from "../Collections/Item.js";
10
+ import { Section } from "../Collections/Section.js";
11
+ import { ListItemText } from "./components/ListItemText/ListItemText.js";
8
12
  import { Typography } from "../Typography/Typography.js";
9
13
  import { ListOption } from "./components/ListOption/ListOption.js";
14
+ const { list } = utilClasses;
10
15
  function ListInner(props) {
11
16
  const { label, className, style, slotProps, state, listRef } = props;
12
17
  const domRef = useDOMRef(listRef);
@@ -23,7 +28,7 @@ function ListInner(props) {
23
28
  {
24
29
  style,
25
30
  ref: domRef,
26
- className: clsx(s.base, className)
31
+ className: clsx(list, className)
27
32
  },
28
33
  slotProps?.list,
29
34
  listBoxProps
@@ -39,7 +44,11 @@ function ListRender(props, ref) {
39
44
  const state = useListState(props);
40
45
  return /* @__PURE__ */ jsx(ListInner, { listRef: ref, ...props, state });
41
46
  }
42
- const List = forwardRef(ListRender);
47
+ const ListComponent = forwardRef(ListRender);
48
+ const List = ListComponent;
49
+ List.Item = Item;
50
+ List.Section = Section;
51
+ List.ItemText = ListItemText;
43
52
  export {
44
53
  List,
45
54
  ListInner
@@ -1,11 +1,8 @@
1
- const base = "kbq-list-928929";
2
1
  const label = "kbq-list-label-e4431c";
3
2
  const s = {
4
- base,
5
3
  label
6
4
  };
7
5
  export {
8
- base,
9
6
  s as default,
10
7
  label
11
8
  };