@koobiq/react-components 0.0.1-beta.6 → 0.0.1-beta.8

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 (36) hide show
  1. package/dist/components/AnimatedIcon/AnimatedIcon.d.ts +4 -0
  2. package/dist/components/AnimatedIcon/AnimatedIcon.js +50 -0
  3. package/dist/components/AnimatedIcon/AnimatedIcon.module.css.js +11 -0
  4. package/dist/components/AnimatedIcon/index.d.ts +2 -0
  5. package/dist/components/AnimatedIcon/types.d.ts +19 -0
  6. package/dist/components/Checkbox/Checkbox.js +17 -7
  7. package/dist/components/FieldComponents/FieldInputGroup/FieldInputGroup.d.ts +2 -2
  8. package/dist/components/Input/Input.d.ts +1 -0
  9. package/dist/components/Input/Input.js +9 -9
  10. package/dist/components/Input/types.d.ts +2 -1
  11. package/dist/components/Modal/Modal.js +14 -12
  12. package/dist/components/Modal/types.d.ts +7 -0
  13. package/dist/components/Popover/Popover.js +23 -21
  14. package/dist/components/Popover/types.d.ts +7 -0
  15. package/dist/components/SidePanel/SidePanel.js +17 -15
  16. package/dist/components/SidePanel/types.d.ts +7 -0
  17. package/dist/components/Tooltip/Tooltip.js +3 -3
  18. package/dist/components/index.d.ts +1 -0
  19. package/dist/index.js +2 -0
  20. package/dist/style.css +43 -1
  21. package/package.json +5 -5
  22. package/dist/components/Input/components/FieldAddon/FieldAddon.d.ts +0 -10
  23. package/dist/components/Input/components/FieldAddon/index.d.ts +0 -1
  24. package/dist/components/Input/components/FieldCaption/FieldCaption.d.ts +0 -6
  25. package/dist/components/Input/components/FieldCaption/index.d.ts +0 -1
  26. package/dist/components/Input/components/FieldControl/FieldControl.d.ts +0 -9
  27. package/dist/components/Input/components/FieldControl/index.d.ts +0 -1
  28. package/dist/components/Input/components/FieldError/FieldError.d.ts +0 -7
  29. package/dist/components/Input/components/FieldError/index.d.ts +0 -1
  30. package/dist/components/Input/components/FieldInput/FieldInput.d.ts +0 -9
  31. package/dist/components/Input/components/FieldInput/index.d.ts +0 -1
  32. package/dist/components/Input/components/FieldInputGroup/FieldInputGroup.d.ts +0 -7
  33. package/dist/components/Input/components/FieldInputGroup/index.d.ts +0 -1
  34. package/dist/components/Input/components/FieldLabel/FieldLabel.d.ts +0 -9
  35. package/dist/components/Input/components/FieldLabel/index.d.ts +0 -1
  36. 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,11 @@
1
+ const base = "kbq-animatedicon-61fd86";
2
+ const icon = "kbq-animatedicon-icon-2feff8";
3
+ const s = {
4
+ base,
5
+ icon
6
+ };
7
+ export {
8
+ base,
9
+ s as default,
10
+ icon
11
+ };
@@ -0,0 +1,2 @@
1
+ export * from './AnimatedIcon';
2
+ export * from './types';
@@ -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 }) => /* @__PURE__ */ jsxs(Fragment, { children: [
51
- /* @__PURE__ */ jsxs("span", { ...boxProps, children: [
52
- checked && !indeterminate2 && /* @__PURE__ */ jsx(IconCheckS16, {}),
53
- indeterminate2 && /* @__PURE__ */ jsx(IconMinusS16, {})
54
- ] }),
55
- isNotNil(children) && /* @__PURE__ */ jsx("span", { ...labelProps, children })
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,6 +1,6 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import { type ExtendableComponentPropsWithRef } from '@koobiq/react-core';
3
- export type FieldInputGroupBaseProps = ExtendableComponentPropsWithRef<{
3
+ export type FieldInputGroupProps = ExtendableComponentPropsWithRef<{
4
4
  children?: ReactNode;
5
5
  startAddon?: ReactNode;
6
6
  endAddon?: ReactNode;
@@ -8,4 +8,4 @@ export type FieldInputGroupBaseProps = ExtendableComponentPropsWithRef<{
8
8
  className?: string;
9
9
  error?: boolean;
10
10
  }, 'div'>;
11
- export declare const FieldInputGroup: import("react").ForwardRefExoticComponent<Omit<FieldInputGroupBaseProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
11
+ export declare const FieldInputGroup: import("react").ForwardRefExoticComponent<Omit<FieldInputGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -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>>;
@@ -46,19 +46,19 @@ const Input = forwardRef((props, ref) => {
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'>>;
@@ -9,19 +9,20 @@ import { Backdrop } from "../Backdrop/Backdrop.js";
9
9
  import { Dialog } from "../Dialog/Dialog.js";
10
10
  const Modal = forwardRef((props, ref) => {
11
11
  const {
12
- hideCloseButton = false,
13
12
  size = "medium",
14
- disableExitOnEscapeKeyDown,
15
- disableExitOnClickOutside,
16
- disableFocusManagement,
17
- portalContainer,
18
- open: openProp,
19
- hideBackdrop,
20
- onOpenChange,
21
- defaultOpen,
22
- children,
13
+ hideCloseButton = false,
23
14
  control,
15
+ children,
24
16
  slotProps,
17
+ defaultOpen,
18
+ hideBackdrop,
19
+ onOpenChange,
20
+ open: openProp,
21
+ portalContainer,
22
+ disableFocusManagement,
23
+ disableExitOnClickOutside,
24
+ disableExitOnEscapeKeyDown,
25
+ shouldCloseOnInteractOutside,
25
26
  ...other
26
27
  } = props;
27
28
  const state = useOverlayTriggerState({
@@ -41,6 +42,7 @@ const Modal = forwardRef((props, ref) => {
41
42
  const { modalProps: modalCommonProps, underlayProps } = useModalOverlay(
42
43
  {
43
44
  ...props,
45
+ shouldCloseOnInteractOutside,
44
46
  isDismissable: !disableExitOnClickOutside,
45
47
  isKeyboardDismissDisabled: disableExitOnEscapeKeyDown
46
48
  },
@@ -55,9 +57,9 @@ const Modal = forwardRef((props, ref) => {
55
57
  };
56
58
  const containerProps = mergeProps(
57
59
  {
58
- className: clsx(s.base, s[size]),
59
60
  ref: containerRef,
60
- "data-size": size
61
+ "data-size": size,
62
+ className: clsx(s.base, s[size])
61
63
  },
62
64
  other
63
65
  );
@@ -58,6 +58,13 @@ export type ModalProps = {
58
58
  * @default false
59
59
  */
60
60
  disableFocusManagement?: boolean;
61
+ /**
62
+ * When user interacts with the argument element outside of the overlay ref,
63
+ * return true if onClose should be called. This gives you a chance to filter
64
+ * out interaction with elements that should not dismiss the overlay.
65
+ * By default, onClose will always be called on interaction outside the overlay ref.
66
+ */
67
+ shouldCloseOnInteractOutside?: (element: Element) => boolean;
61
68
  /** The props used for each slot inside. */
62
69
  slotProps?: {
63
70
  dialog?: DialogProps;
@@ -10,35 +10,36 @@ import { Dialog } from "../Dialog/Dialog.js";
10
10
  const Popover = forwardRef(
11
11
  (props, ref) => {
12
12
  const {
13
- placement: placementProp = "top",
14
- arrowBoundaryOffset = 20,
15
- containerPadding = 12,
16
- hideArrow = false,
13
+ offset = 0,
17
14
  size = "medium",
18
15
  crossOffset = 0,
19
- offset = 0,
16
+ hideArrow = false,
17
+ containerPadding = 12,
18
+ arrowBoundaryOffset = 20,
19
+ placement: placementProp = "top",
20
+ control,
21
+ children,
22
+ anchorRef,
20
23
  slotProps,
21
- disableExitOnEscapeKeyDown,
22
- disableFocusManagement,
23
- portalContainer,
24
- hideCloseButton,
25
- open: openProp,
26
24
  className,
25
+ isNonModal,
27
26
  defaultOpen,
28
27
  onOpenChange,
29
- isNonModal,
30
- anchorRef,
31
- children,
32
- control,
28
+ open: openProp,
29
+ portalContainer,
30
+ hideCloseButton,
31
+ disableFocusManagement,
32
+ disableExitOnEscapeKeyDown,
33
+ shouldCloseOnInteractOutside,
33
34
  ...other
34
35
  } = props;
35
36
  const showArrow = !hideArrow;
36
37
  const domRef = useDOMRef(ref);
37
38
  const controlRef = useRef(null);
38
39
  const state = useOverlayTriggerState({
39
- isOpen: openProp,
40
- onOpenChange,
41
40
  defaultOpen,
41
+ onOpenChange,
42
+ isOpen: openProp,
42
43
  ...other
43
44
  });
44
45
  const openState = state.isOpen;
@@ -63,8 +64,9 @@ const Popover = forwardRef(
63
64
  popoverRef: domRef,
64
65
  arrowBoundaryOffset,
65
66
  placement: placementProp,
66
- isKeyboardDismissDisabled: disableExitOnEscapeKeyDown,
67
- triggerRef: anchorRef || controlRef
67
+ shouldCloseOnInteractOutside,
68
+ triggerRef: anchorRef || controlRef,
69
+ isKeyboardDismissDisabled: disableExitOnEscapeKeyDown
68
70
  },
69
71
  { ...state, isOpen: opened }
70
72
  );
@@ -83,9 +85,9 @@ const Popover = forwardRef(
83
85
  const dialogProps = mergeProps(
84
86
  {
85
87
  role: "dialog",
88
+ hideCloseButton,
86
89
  className: s.dialog,
87
- onClose: state.close,
88
- hideCloseButton
90
+ onClose: state.close
89
91
  },
90
92
  slotProps?.dialog
91
93
  );
@@ -98,8 +100,8 @@ const Popover = forwardRef(
98
100
  );
99
101
  return /* @__PURE__ */ jsxs(Fragment, { children: [
100
102
  control?.({
101
- onClick: onPress,
102
103
  ref: controlRef,
104
+ onClick: onPress,
103
105
  disabled: isDisabled,
104
106
  ...otherTriggerProps
105
107
  }),
@@ -95,6 +95,13 @@ export type PopoverProps = {
95
95
  * @default 0
96
96
  */
97
97
  crossOffset?: number;
98
+ /**
99
+ * When user interacts with the argument element outside of the popover ref,
100
+ * return true if onClose should be called. This gives you a chance to filter
101
+ * out interaction with elements that should not dismiss the popover.
102
+ * By default, onClose will always be called on interaction outside the popover ref.
103
+ */
104
+ shouldCloseOnInteractOutside?: (element: Element) => boolean;
98
105
  /** The props used for each slot inside. */
99
106
  slotProps?: {
100
107
  dialog?: DialogProps;
@@ -10,20 +10,21 @@ import { Dialog } from "../Dialog/Dialog.js";
10
10
  const SidePanel = forwardRef(
11
11
  (props, ref) => {
12
12
  const {
13
- hideCloseButton = false,
14
- position = "left",
15
13
  size = "medium",
16
- disableExitOnEscapeKeyDown,
17
- disableExitOnClickOutside,
18
- disableFocusManagement,
19
- portalContainer,
20
- open: openProp,
21
- hideBackdrop,
22
- onOpenChange,
23
- defaultOpen,
24
- children,
14
+ position = "left",
15
+ hideCloseButton = false,
25
16
  control,
17
+ children,
26
18
  slotProps,
19
+ defaultOpen,
20
+ onOpenChange,
21
+ hideBackdrop,
22
+ open: openProp,
23
+ portalContainer,
24
+ disableFocusManagement,
25
+ disableExitOnClickOutside,
26
+ disableExitOnEscapeKeyDown,
27
+ shouldCloseOnInteractOutside,
27
28
  ...other
28
29
  } = props;
29
30
  const state = useOverlayTriggerState({
@@ -43,6 +44,7 @@ const SidePanel = forwardRef(
43
44
  const { modalProps: modalCommonProps, underlayProps } = useModalOverlay(
44
45
  {
45
46
  ...props,
47
+ shouldCloseOnInteractOutside,
46
48
  isDismissable: !disableExitOnClickOutside,
47
49
  isKeyboardDismissDisabled: disableExitOnEscapeKeyDown
48
50
  },
@@ -57,10 +59,10 @@ const SidePanel = forwardRef(
57
59
  };
58
60
  const containerProps = mergeProps(
59
61
  {
60
- className: clsx(s.base, s[size], s[position]),
62
+ ref: containerRef,
61
63
  "data-size": size,
62
64
  "data-position": position,
63
- ref: containerRef
65
+ className: clsx(s.base, s[size], s[position])
64
66
  },
65
67
  other
66
68
  );
@@ -81,8 +83,8 @@ const SidePanel = forwardRef(
81
83
  const panelProps = mergeProps(
82
84
  modalCommonProps,
83
85
  {
84
- className: s.panel,
85
- ref: modalRef
86
+ ref: modalRef,
87
+ className: s.panel
86
88
  },
87
89
  slotProps?.panel
88
90
  );
@@ -65,6 +65,13 @@ export type SidePanelProps = {
65
65
  * @default false
66
66
  */
67
67
  disableFocusManagement?: boolean;
68
+ /**
69
+ * When user interacts with the argument element outside of the overlay ref,
70
+ * return true if onClose should be called. This gives you a chance to filter
71
+ * out interaction with elements that should not dismiss the overlay.
72
+ * By default, onClose will always be called on interaction outside the overlay ref.
73
+ */
74
+ shouldCloseOnInteractOutside?: (element: Element) => boolean;
68
75
  /** The props used for each slot inside. */
69
76
  slotProps?: {
70
77
  dialog?: DialogProps;
@@ -10,20 +10,20 @@ const Tooltip = forwardRef((props, ref) => {
10
10
  const {
11
11
  delay = 120,
12
12
  disabled = false,
13
- defaultOpen,
14
13
  closeDelay = 120,
15
14
  hideArrow = false,
16
15
  variant = "contrast",
17
- onOpenChange,
18
16
  placement: placementProp = "top",
19
17
  control,
20
18
  children,
21
19
  anchorRef,
22
20
  crossOffset,
21
+ defaultOpen,
22
+ onOpenChange,
23
23
  open: openProp,
24
+ portalContainer,
24
25
  offset: offsetProp,
25
26
  arrowBoundaryOffset,
26
- portalContainer,
27
27
  ...other
28
28
  } = props;
29
29
  const showArrow = !hideArrow;
@@ -23,4 +23,5 @@ export * from './SidePanel';
23
23
  export * from './Popover';
24
24
  export * from './Tooltip';
25
25
  export * from './List';
26
+ export * from './AnimatedIcon';
26
27
  export * from './layout';
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,6 +1497,46 @@
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);
@@ -2503,6 +2543,7 @@
2503
2543
  outline: none;
2504
2544
  flex-direction: column;
2505
2545
  flex-grow: 1;
2546
+ min-block-size: 48px;
2506
2547
  display: flex;
2507
2548
  position: relative;
2508
2549
  }
@@ -2688,7 +2729,6 @@
2688
2729
  .kbq-popover-f14dc5 {
2689
2730
  --popover-inline-size: ;
2690
2731
  border-radius: var(--kbq-size-m);
2691
- min-block-size: 48px;
2692
2732
  box-shadow: var(--kbq-shadow-overlay);
2693
2733
  background-color: var(--kbq-background-bg);
2694
2734
  inline-size: var(--popover-inline-size);
@@ -2922,6 +2962,7 @@
2922
2962
  }
2923
2963
 
2924
2964
  .kbq-listsection-heading-5bd9e3 {
2965
+ box-sizing: border-box;
2925
2966
  padding: var(--kbq-size-s) var(--kbq-size-m);
2926
2967
  }
2927
2968
  .kbq-listoption-8693c5 {
@@ -2929,6 +2970,7 @@
2929
2970
  --list-item-outline-color: transparent;
2930
2971
  --list-item-outline-width: var(--kbq-size-3xs);
2931
2972
  cursor: pointer;
2973
+ box-sizing: border-box;
2932
2974
  gap: var(--kbq-size-s);
2933
2975
  border-radius: var(--kbq-size-s);
2934
2976
  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.6",
3
+ "version": "0.0.1-beta.8",
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.6",
26
- "@koobiq/react-icons": "0.0.1-beta.6",
27
- "@koobiq/react-primitives": "0.0.1-beta.6",
28
- "@koobiq/react-core": "0.0.1-beta.6"
25
+ "@koobiq/logger": "0.0.1-beta.8",
26
+ "@koobiq/react-core": "0.0.1-beta.8",
27
+ "@koobiq/react-icons": "0.0.1-beta.8",
28
+ "@koobiq/react-primitives": "0.0.1-beta.8"
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';
@@ -1,7 +0,0 @@
1
- export * from './FieldControl';
2
- export * from './FieldInput';
3
- export * from './FieldLabel';
4
- export * from './FieldAddon';
5
- export * from './FieldCaption';
6
- export * from './FieldError';
7
- export * from './FieldInputGroup';