@koobiq/react-components 0.0.1-beta.36 → 0.0.1-beta.38

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 (27) hide show
  1. package/dist/components/Calendar/Calendar.js +2 -1
  2. package/dist/components/Calendar/components/CalendarCell/CalendarCell.js +2 -0
  3. package/dist/components/Calendar/components/CalendarCell/CalendarCell.module.css.js +4 -1
  4. package/dist/components/Calendar/types.d.ts +3 -1
  5. package/dist/components/DateInput/DateInput.js +1 -0
  6. package/dist/components/DateInput/types.d.ts +1 -1
  7. package/dist/components/DatePicker/DatePicker.d.ts +5 -3
  8. package/dist/components/DatePicker/DatePicker.js +101 -0
  9. package/dist/components/DatePicker/DatePicker.module.css.js +8 -0
  10. package/dist/components/DatePicker/index.d.ts +2 -0
  11. package/dist/components/DatePicker/types.d.ts +34 -0
  12. package/dist/components/FieldComponents/FieldAddon/FieldAddon.d.ts +1 -0
  13. package/dist/components/FieldComponents/FieldAddon/FieldAddon.js +13 -1
  14. package/dist/components/FieldComponents/FieldAddon/FieldAddon.module.css.js +4 -1
  15. package/dist/components/FieldComponents/FieldInputGroup/FieldInputGroup.js +54 -56
  16. package/dist/components/FieldComponents/FieldInputGroup/FieldInputGroupContext.d.ts +1 -0
  17. package/dist/components/Input/Input.js +1 -0
  18. package/dist/components/InputNumber/components/InputNumberCounterControls.js +10 -10
  19. package/dist/components/InputNumber/components/InputNumberCounterControls.module.css.js +7 -4
  20. package/dist/components/RadioGroup/components/Radio/Radio.d.ts +0 -1
  21. package/dist/components/RadioGroup/components/Radio/types.d.ts +0 -2
  22. package/dist/components/Select/Select.js +1 -0
  23. package/dist/components/index.d.ts +1 -0
  24. package/dist/index.js +3 -0
  25. package/dist/style.css +37 -17
  26. package/package.json +7 -7
  27. package/dist/components/DatePicker/DatePicker._stories_.d.ts +0 -13
@@ -9,6 +9,7 @@ import { CalendarHeader } from "./components/CalendarHeader/CalendarHeader.js";
9
9
  import { CalendarGrid } from "./components/CalendarGrid/CalendarGrid.js";
10
10
  const textNormal = utilClasses.typography["text-normal"];
11
11
  function CalendarRender(props, ref) {
12
+ const { style, className } = props;
12
13
  const { locale } = useLocale();
13
14
  const state = useCalendarState({
14
15
  createCalendar,
@@ -20,7 +21,7 @@ function CalendarRender(props, ref) {
20
21
  state
21
22
  );
22
23
  const rootProps = mergeProps(
23
- { className: clsx(s.base, textNormal, props.className), ref },
24
+ { className: clsx(s.base, textNormal, className), style, ref },
24
25
  calendarProps
25
26
  );
26
27
  return /* @__PURE__ */ jsxs("div", { ...rootProps, children: [
@@ -13,6 +13,7 @@ function CalendarCell({ state, date }) {
13
13
  cellProps,
14
14
  isSelected,
15
15
  isDisabled,
16
+ isInvalid,
16
17
  isPressed,
17
18
  buttonProps,
18
19
  isUnavailable,
@@ -35,6 +36,7 @@ function CalendarCell({ state, date }) {
35
36
  isHovered && s.hovered,
36
37
  isDisabled && s.disabled,
37
38
  isSelected && s.selected,
39
+ isInvalid && s.invalid,
38
40
  isUnavailable && s.unavailable,
39
41
  isSelected && textNormalMedium,
40
42
  isFocusVisible && s.focusVisible
@@ -6,6 +6,7 @@ const focusVisible = "kbq-calendarcell-focusVisible-d92d99";
6
6
  const selected = "kbq-calendarcell-selected-62a719";
7
7
  const disabled = "kbq-calendarcell-disabled-a2a975";
8
8
  const unavailable = "kbq-calendarcell-unavailable-a606f4";
9
+ const invalid = "kbq-calendarcell-invalid-02611e";
9
10
  const s = {
10
11
  base,
11
12
  today,
@@ -14,7 +15,8 @@ const s = {
14
15
  focusVisible,
15
16
  selected,
16
17
  disabled,
17
- unavailable
18
+ unavailable,
19
+ invalid
18
20
  };
19
21
  export {
20
22
  base,
@@ -22,6 +24,7 @@ export {
22
24
  disabled,
23
25
  focusVisible,
24
26
  hovered,
27
+ invalid,
25
28
  pressed,
26
29
  selected,
27
30
  today,
@@ -1,4 +1,4 @@
1
- import type { ComponentRef, ReactElement, Ref } from 'react';
1
+ import type { ComponentRef, CSSProperties, ReactElement, Ref } from 'react';
2
2
  import type { AriaCalendarProps, DateValue } from '@koobiq/react-primitives';
3
3
  type CalendarPropMinValue<T extends DateValue> = AriaCalendarProps<T>['minValue'];
4
4
  type CalendarPropMaxValue<T extends DateValue> = AriaCalendarProps<T>['maxValue'];
@@ -16,6 +16,8 @@ export type CalendarProps<T extends DateValue> = {
16
16
  ref?: Ref<HTMLDivElement>;
17
17
  /** Additional CSS-classes. */
18
18
  className?: string;
19
+ /** Inline styles. */
20
+ style?: CSSProperties;
19
21
  /** The minimum allowed date that a user may select. */
20
22
  minValue?: CalendarPropMinValue<T>;
21
23
  /** The maximum allowed date that a user may select. */
@@ -67,6 +67,7 @@ function DateInputRender(props, ref) {
67
67
  {
68
68
  endAddon,
69
69
  isInvalid,
70
+ isDisabled,
70
71
  startAddon
71
72
  },
72
73
  slotProps?.group
@@ -11,7 +11,7 @@ export type DateInputProps<T extends DateValue> = {
11
11
  /** Unique identifier for testing purposes. */
12
12
  'data-testid'?: string | number;
13
13
  /** The helper text content. */
14
- caption?: string | number;
14
+ caption?: ReactNode;
15
15
  /**
16
16
  * The variant to use.
17
17
  * @default filled
@@ -1,3 +1,5 @@
1
- import type { AriaDatePickerProps, DateValue } from '@koobiq/react-primitives';
2
- export type DatePickerProps<T extends DateValue> = AriaDatePickerProps<T>;
3
- export declare function DatePicker<T extends DateValue>(props: DatePickerProps<T>): import("react/jsx-runtime").JSX.Element;
1
+ import type { Ref } from 'react';
2
+ import { type DateValue } from '@koobiq/react-primitives';
3
+ import type { DatePickerComponent, DatePickerProps, DatePickerRef } from './types';
4
+ export declare function DatePickerRender<T extends DateValue>(props: DatePickerProps<T>, ref: Ref<DatePickerRef>): import("react/jsx-runtime").JSX.Element;
5
+ export declare const DatePicker: DatePickerComponent;
@@ -0,0 +1,101 @@
1
+ "use client";
2
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
3
+ import { forwardRef, useRef } from "react";
4
+ import { mergeProps } from "@koobiq/react-core";
5
+ import { IconCalendarO16 } from "@koobiq/react-icons";
6
+ import { useDatePickerState, removeDataAttributes, useDatePicker } from "@koobiq/react-primitives";
7
+ import { PopoverInner } from "../Popover/PopoverInner.js";
8
+ import s from "./DatePicker.module.css.js";
9
+ import { DateInput } from "../DateInput/DateInput.js";
10
+ import { Calendar } from "../Calendar/Calendar.js";
11
+ import { IconButton } from "../IconButton/IconButton.js";
12
+ function DatePickerRender(props, ref) {
13
+ const anchorRef = useRef(null);
14
+ const {
15
+ label,
16
+ style,
17
+ caption,
18
+ className,
19
+ slotProps,
20
+ fullWidth,
21
+ errorMessage,
22
+ startAddon,
23
+ endAddon,
24
+ "data-testid": testId
25
+ } = props;
26
+ const state = useDatePickerState(
27
+ removeDataAttributes({ ...props, description: caption })
28
+ );
29
+ const {
30
+ isInvalid,
31
+ groupProps,
32
+ labelProps,
33
+ fieldProps,
34
+ buttonProps,
35
+ dialogProps,
36
+ calendarProps: calendarPropsAria
37
+ } = useDatePicker(
38
+ removeDataAttributes({ ...props, description: caption }),
39
+ state,
40
+ anchorRef
41
+ );
42
+ const rootProps = mergeProps(
43
+ {
44
+ ref,
45
+ style,
46
+ label,
47
+ caption,
48
+ fullWidth,
49
+ className,
50
+ startAddon,
51
+ errorMessage,
52
+ "data-testid": testId,
53
+ slotProps: {
54
+ label: labelProps,
55
+ group: {
56
+ endAddon: /* @__PURE__ */ jsxs(Fragment, { children: [
57
+ endAddon,
58
+ /* @__PURE__ */ jsx(
59
+ IconButton,
60
+ {
61
+ variant: isInvalid ? "error" : "fade-contrast",
62
+ className: s.calendar,
63
+ ...buttonProps,
64
+ children: /* @__PURE__ */ jsx(IconCalendarO16, {})
65
+ }
66
+ )
67
+ ] }),
68
+ ...groupProps,
69
+ ref: anchorRef
70
+ }
71
+ }
72
+ },
73
+ slotProps?.root,
74
+ fieldProps
75
+ );
76
+ const popoverProps = mergeProps(
77
+ {
78
+ state,
79
+ anchorRef,
80
+ offset: 4,
81
+ size: "auto",
82
+ hideArrow: true,
83
+ hideCloseButton: true,
84
+ placement: "bottom start",
85
+ slotProps: {
86
+ dialog: dialogProps
87
+ }
88
+ },
89
+ slotProps?.popover
90
+ );
91
+ const calendarProps = mergeProps(calendarPropsAria, slotProps?.calendar);
92
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
93
+ /* @__PURE__ */ jsx(DateInput, { ...rootProps }),
94
+ /* @__PURE__ */ jsx(PopoverInner, { ...popoverProps, children: /* @__PURE__ */ jsx(Calendar, { firstDayOfWeek: props.firstDayOfWeek, ...calendarProps }) })
95
+ ] });
96
+ }
97
+ const DatePicker = forwardRef(DatePickerRender);
98
+ export {
99
+ DatePicker,
100
+ DatePickerRender
101
+ };
@@ -0,0 +1,8 @@
1
+ const calendar = "kbq-datepicker-calendar-25a0d7";
2
+ const s = {
3
+ calendar
4
+ };
5
+ export {
6
+ calendar,
7
+ s as default
8
+ };
@@ -0,0 +1,2 @@
1
+ export * from './DatePicker';
2
+ export * from './types';
@@ -0,0 +1,34 @@
1
+ import type { CSSProperties, ReactElement, ReactNode, Ref } from 'react';
2
+ import type { AriaDatePickerProps, DateValue } from '@koobiq/react-primitives';
3
+ import type { CalendarProps } from '../Calendar';
4
+ import type { DateInputProps, DateInputRef } from '../DateInput';
5
+ import type { PopoverProps } from '../Popover';
6
+ export type DatePickerProps<T extends DateValue> = {
7
+ /**
8
+ * If true, the input will take up the full width of its container.
9
+ * @default false
10
+ */
11
+ fullWidth?: boolean;
12
+ /** The helper text content. */
13
+ caption?: ReactNode;
14
+ /** Addon placed before the children. */
15
+ startAddon?: ReactNode;
16
+ /** Addon placed after the children. */
17
+ endAddon?: ReactNode;
18
+ /** Additional CSS-classes. */
19
+ className?: string;
20
+ /** Inline styles. */
21
+ style?: CSSProperties;
22
+ /** Unique identifier for testing purposes. */
23
+ 'data-testid'?: string | number;
24
+ /** Ref to the DateInput. */
25
+ ref?: Ref<DateInputRef>;
26
+ /** The props used for each slot inside. */
27
+ slotProps?: {
28
+ root?: DateInputProps<T>;
29
+ popover?: PopoverProps;
30
+ calendar?: CalendarProps<T>;
31
+ };
32
+ } & Omit<AriaDatePickerProps<T>, 'description' | 'validate' | 'validationBehavior' | 'validationState'>;
33
+ export type DatePickerComponent = <T extends DateValue>(props: DatePickerProps<T>) => ReactElement | null;
34
+ export type DatePickerRef = DateInputRef;
@@ -4,6 +4,7 @@ export declare const fieldAddonPropPlacement: readonly ["start", "end"];
4
4
  export type FieldAddonPlacement = (typeof fieldAddonPropPlacement)[number];
5
5
  export type FieldAddonProps = ExtendableComponentPropsWithRef<{
6
6
  isInvalid?: boolean;
7
+ isDisabled?: boolean;
7
8
  children?: ReactNode;
8
9
  placement?: FieldAddonPlacement;
9
10
  }, 'div'>;
@@ -3,15 +3,27 @@ import { forwardRef } from "react";
3
3
  import { isNotNil, clsx } from "@koobiq/react-core";
4
4
  import s from "./FieldAddon.module.css.js";
5
5
  const FieldAddon = forwardRef(
6
- ({ placement = "start", isInvalid = false, className, children, ...other }, ref) => isNotNil(children) ? /* @__PURE__ */ jsx(
6
+ ({
7
+ placement = "start",
8
+ isInvalid = false,
9
+ isDisabled = false,
10
+ className,
11
+ children,
12
+ ...other
13
+ }, ref) => isNotNil(children) ? /* @__PURE__ */ jsx(
7
14
  "div",
8
15
  {
9
16
  className: clsx(
10
17
  s.base,
11
18
  s[placement],
12
19
  isInvalid && s.invalid,
20
+ isDisabled && s.disabled,
13
21
  className
14
22
  ),
23
+ "data-placement": placement,
24
+ "data-invalid": isInvalid,
25
+ "data-disabled": isDisabled,
26
+ "data-testid": `field-addon-${placement}`,
15
27
  ...other,
16
28
  ref,
17
29
  children
@@ -2,15 +2,18 @@ const base = "kbq-fieldaddon-3388d3";
2
2
  const start = "kbq-fieldaddon-start-83aa84";
3
3
  const end = "kbq-fieldaddon-end-f314bf";
4
4
  const invalid = "kbq-fieldaddon-invalid-08b1fe";
5
+ const disabled = "kbq-fieldaddon-disabled-c170bf";
5
6
  const s = {
6
7
  base,
7
8
  start,
8
9
  end,
9
- invalid
10
+ invalid,
11
+ disabled
10
12
  };
11
13
  export {
12
14
  base,
13
15
  s as default,
16
+ disabled,
14
17
  end,
15
18
  invalid,
16
19
  start
@@ -5,62 +5,60 @@ import { useInputContext, Group } from "@koobiq/react-primitives";
5
5
  import s from "./FieldInputGroup.module.css.js";
6
6
  import { FieldInputGroupContext } from "./FieldInputGroupContext.js";
7
7
  import { FieldAddon } from "../FieldAddon/FieldAddon.js";
8
- const FieldInputGroup = forwardRef(
9
- ({
10
- children,
11
- className,
12
- startAddon,
13
- endAddon,
14
- isInvalid,
15
- slotProps,
16
- ...other
17
- }, ref) => {
18
- const { value } = useInputContext();
19
- const hasStartAddon = !!startAddon;
20
- const hasEndAddon = !!endAddon;
21
- const hasValue = isNotNil(value);
22
- return /* @__PURE__ */ jsx(
23
- Group,
24
- {
25
- className: clsx(
26
- s.base,
27
- hasStartAddon && s.hasStartAddon,
28
- hasEndAddon && s.hasEndAddon,
29
- className
30
- ),
31
- ...other,
32
- ref,
33
- children: ({ isHovered, isFocusWithin, isDisabled }) => /* @__PURE__ */ jsxs(
34
- FieldInputGroupContext.Provider,
35
- {
36
- value: { isDisabled, isHovered, hasValue, isFocusWithin },
37
- children: [
38
- /* @__PURE__ */ jsx(
39
- FieldAddon,
40
- {
41
- placement: "start",
42
- isInvalid,
43
- ...slotProps?.start,
44
- children: startAddon
45
- }
46
- ),
47
- children,
48
- /* @__PURE__ */ jsx(
49
- FieldAddon,
50
- {
51
- placement: "end",
52
- isInvalid,
53
- ...slotProps?.end,
54
- children: endAddon
55
- }
56
- )
57
- ]
58
- }
59
- )
60
- }
61
- );
62
- }
63
- );
8
+ const FieldInputGroup = forwardRef(({ children, className, startAddon, endAddon, slotProps, ...other }, ref) => {
9
+ const { value } = useInputContext();
10
+ const hasStartAddon = !!startAddon;
11
+ const hasEndAddon = !!endAddon;
12
+ const hasValue = isNotNil(value);
13
+ return /* @__PURE__ */ jsx(
14
+ Group,
15
+ {
16
+ className: clsx(
17
+ s.base,
18
+ hasStartAddon && s.hasStartAddon,
19
+ hasEndAddon && s.hasEndAddon,
20
+ className
21
+ ),
22
+ ...other,
23
+ ref,
24
+ children: ({ isHovered, isFocusWithin, isDisabled, isInvalid }) => /* @__PURE__ */ jsxs(
25
+ FieldInputGroupContext.Provider,
26
+ {
27
+ value: {
28
+ isDisabled,
29
+ isHovered,
30
+ hasValue,
31
+ isFocusWithin,
32
+ isInvalid
33
+ },
34
+ children: [
35
+ /* @__PURE__ */ jsx(
36
+ FieldAddon,
37
+ {
38
+ placement: "start",
39
+ isInvalid,
40
+ isDisabled,
41
+ ...slotProps?.start,
42
+ children: startAddon
43
+ }
44
+ ),
45
+ children,
46
+ /* @__PURE__ */ jsx(
47
+ FieldAddon,
48
+ {
49
+ placement: "end",
50
+ isInvalid,
51
+ isDisabled,
52
+ ...slotProps?.end,
53
+ children: endAddon
54
+ }
55
+ )
56
+ ]
57
+ }
58
+ )
59
+ }
60
+ );
61
+ });
64
62
  FieldInputGroup.displayName = "FieldInputGroup";
65
63
  export {
66
64
  FieldInputGroup
@@ -3,6 +3,7 @@ export type FieldInputGroupContextProps = {
3
3
  hasValue?: boolean;
4
4
  isHovered?: boolean;
5
5
  isFocusWithin?: boolean;
6
+ isInvalid?: boolean;
6
7
  };
7
8
  export declare const FieldInputGroupContext: import("react").Context<FieldInputGroupContextProps>;
8
9
  export declare const useFieldInputGroup: () => FieldInputGroupContextProps;
@@ -96,6 +96,7 @@ const Input = forwardRef((props, ref) => {
96
96
  {
97
97
  endAddon,
98
98
  isInvalid: isInvalid2,
99
+ isDisabled: isDisabled2,
99
100
  startAddon
100
101
  },
101
102
  slotProps?.group
@@ -1,33 +1,33 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { clsx } from "@koobiq/react-core";
3
- import { IconChevronUp16, IconChevronDown16 } from "@koobiq/react-icons";
3
+ import { IconChevronUpS16, IconChevronDownS16 } from "@koobiq/react-icons";
4
4
  import s from "./InputNumberCounterControls.module.css.js";
5
5
  import { useFieldInputGroup } from "../../FieldComponents/FieldInputGroup/FieldInputGroupContext.js";
6
6
  import { IconButton } from "../../IconButton/IconButton.js";
7
7
  const InputNumberCounterControls = () => {
8
- const { isHovered, hasValue, isFocusWithin } = useFieldInputGroup();
9
- const visible = (isHovered || isFocusWithin) && hasValue;
10
- return /* @__PURE__ */ jsxs("div", { className: clsx(s.base, visible && s.visible), children: [
8
+ const { isInvalid } = useFieldInputGroup();
9
+ const variant = isInvalid ? "error" : "fade-contrast";
10
+ return /* @__PURE__ */ jsxs("div", { className: s.base, children: [
11
11
  /* @__PURE__ */ jsx(
12
12
  IconButton,
13
13
  {
14
- className: s.counter,
14
+ className: clsx(s.counter, s.increment),
15
15
  slot: "increment",
16
- variant: "fade-contrast",
16
+ variant,
17
17
  size: "l",
18
18
  isCompact: true,
19
- children: /* @__PURE__ */ jsx(IconChevronUp16, {})
19
+ children: /* @__PURE__ */ jsx(IconChevronUpS16, {})
20
20
  }
21
21
  ),
22
22
  /* @__PURE__ */ jsx(
23
23
  IconButton,
24
24
  {
25
- className: s.counter,
25
+ className: clsx(s.counter, s.decrement),
26
26
  slot: "decrement",
27
- variant: "fade-contrast",
27
+ variant,
28
28
  size: "l",
29
29
  isCompact: true,
30
- children: /* @__PURE__ */ jsx(IconChevronDown16, {})
30
+ children: /* @__PURE__ */ jsx(IconChevronDownS16, {})
31
31
  }
32
32
  )
33
33
  ] });
@@ -1,14 +1,17 @@
1
1
  const base = "kbq-inputnumbercountercontrols-77ed13";
2
- const visible = "kbq-inputnumbercountercontrols-visible-5885f8";
3
2
  const counter = "kbq-inputnumbercountercontrols-counter-1126db";
3
+ const increment = "kbq-inputnumbercountercontrols-increment-d89a95";
4
+ const decrement = "kbq-inputnumbercountercontrols-decrement-fbd37a";
4
5
  const s = {
5
6
  base,
6
- visible,
7
- counter
7
+ counter,
8
+ increment,
9
+ decrement
8
10
  };
9
11
  export {
10
12
  base,
11
13
  counter,
14
+ decrement,
12
15
  s as default,
13
- visible
16
+ increment
14
17
  };
@@ -1,7 +1,6 @@
1
1
  export declare const Radio: import("react").ForwardRefExoticComponent<Omit<Omit<import("@react-types/radio").AriaRadioProps, "isDisabled">, "disabled"> & {
2
2
  disabled?: boolean;
3
3
  } & {
4
- caption?: string;
5
4
  size?: import("./types").RadioPropSize;
6
5
  labelPlacement?: import("./types").RadioPropLabelPlacement;
7
6
  className?: string;
@@ -5,8 +5,6 @@ export type RadioPropSize = (typeof radioPropSize)[number];
5
5
  export declare const radioPropLabelPlacement: readonly ["start", "end"];
6
6
  export type RadioPropLabelPlacement = (typeof radioPropLabelPlacement)[number];
7
7
  export type RadioProps = UseRadioProps & {
8
- /** The helper text content. */
9
- caption?: string;
10
8
  /**
11
9
  * Size.
12
10
  * @default normal
@@ -131,6 +131,7 @@ function SelectRender(props, ref) {
131
131
  /* @__PURE__ */ jsx(IconChevronDownS16, {})
132
132
  ] }),
133
133
  isInvalid,
134
+ isDisabled,
134
135
  ref: containerRef
135
136
  },
136
137
  slotProps?.group
@@ -32,6 +32,7 @@ export * from './TagGroup';
32
32
  export * from './Table';
33
33
  export * from './Calendar';
34
34
  export * from './DateInput';
35
+ export * from './DatePicker';
35
36
  export * from './layout';
36
37
  export { useListData, useDateFormatter, type DateFormatterOptions, } from '@koobiq/react-primitives';
37
38
  export { useRouter, RouterProvider } from '@koobiq/react-primitives';
package/dist/index.js CHANGED
@@ -75,6 +75,7 @@ import { Table } from "./components/Table/Table.js";
75
75
  import { Calendar } from "./components/Calendar/Calendar.js";
76
76
  import { DateInput, DateInputRender } from "./components/DateInput/DateInput.js";
77
77
  import { dateInputPropVariant } from "./components/DateInput/types.js";
78
+ import { DatePicker, DatePickerRender } from "./components/DatePicker/DatePicker.js";
78
79
  import { flex, flexPropAlignItems, flexPropDirection, flexPropFlex, flexPropGap, flexPropJustifyContent, flexPropOrder, flexPropWrap } from "./components/layout/flex/flex.js";
79
80
  import { spacing, spacingGap } from "./components/layout/spacing/spacing.js";
80
81
  export {
@@ -91,6 +92,8 @@ export {
91
92
  Container,
92
93
  DateInput,
93
94
  DateInputRender,
95
+ DatePicker,
96
+ DatePickerRender,
94
97
  Divider,
95
98
  FlexBox,
96
99
  Grid,
package/dist/style.css CHANGED
@@ -1979,9 +1979,10 @@
1979
1979
  --field-control-end-addon-inline-size: 36px;
1980
1980
  }
1981
1981
  .kbq-fieldaddon-3388d3 {
1982
+ --field-addon-color: var(--kbq-icon-contrast-fade);
1982
1983
  z-index: 1;
1983
1984
  block-size: 100%;
1984
- color: var(--kbq-icon-contrast-fade);
1985
+ color: var(--field-addon-color);
1985
1986
  transition: color var(--kbq-transition-default);
1986
1987
  justify-content: center;
1987
1988
  align-items: center;
@@ -1999,7 +2000,11 @@
1999
2000
  }
2000
2001
 
2001
2002
  .kbq-fieldaddon-invalid-08b1fe {
2002
- color: var(--kbq-icon-error);
2003
+ --field-addon-color: var(--kbq-icon-error);
2004
+ }
2005
+
2006
+ .kbq-fieldaddon-disabled-c170bf {
2007
+ --field-addon-color: var(--kbq-states-icon-disabled);
2003
2008
  }
2004
2009
  .kbq-fieldinput-77b90b {
2005
2010
  --field-input-color: ;
@@ -2138,22 +2143,22 @@
2138
2143
  overflow: auto;
2139
2144
  }
2140
2145
  .kbq-inputnumbercountercontrols-77ed13 {
2141
- opacity: 0;
2142
- visibility: hidden;
2143
- transition: opacity var(--kbq-transition-default);
2144
2146
  flex-direction: column;
2145
- margin-inline-end: -8px;
2147
+ margin-inline-end: calc(-1 * var(--kbq-size-s));
2146
2148
  display: flex;
2147
2149
  }
2148
2150
 
2149
- .kbq-inputnumbercountercontrols-visible-5885f8 {
2150
- visibility: visible;
2151
- opacity: 1;
2152
- }
2153
-
2154
2151
  .kbq-inputnumbercountercontrols-counter-1126db {
2155
2152
  inline-size: var(--kbq-size-3xl);
2156
2153
  }
2154
+
2155
+ .kbq-inputnumbercountercontrols-increment-d89a95 > svg {
2156
+ margin-block-end: calc(-1 * var(--kbq-size-3xs));
2157
+ }
2158
+
2159
+ .kbq-inputnumbercountercontrols-decrement-fbd37a > svg {
2160
+ margin-block-start: calc(-1 * var(--kbq-size-3xs));
2161
+ }
2157
2162
  .kbq-radio-c3ed31 {
2158
2163
  --radio-size: ;
2159
2164
  --radio-opacity: 0;
@@ -2330,7 +2335,7 @@
2330
2335
  margin-block: var(--toggle-track-margin-block);
2331
2336
  border-radius: var(--toggle-track-border-radius);
2332
2337
  outline: 2px solid var(--toggle-track-outline-color);
2333
- transition: background-color var(--kbq-transition-default), outline-color var(--kbq-transition-default);
2338
+ transition: border-color var(--kbq-transition-default), background-color var(--kbq-transition-default), outline-color var(--kbq-transition-default);
2334
2339
  flex-shrink: 0;
2335
2340
  position: relative;
2336
2341
  }
@@ -2412,14 +2417,14 @@
2412
2417
  }
2413
2418
 
2414
2419
  .kbq-toggle-invalid-ae9ba4 {
2415
- --toggle-track-bg-color: var(--kbq-states-background-error-less);
2420
+ --toggle-track-bg-color: var(--kbq-background-error-less);
2416
2421
  --toggle-track-border-color: var(--kbq-line-error);
2417
2422
  --toggle-thumb-bg-color: var(--kbq-icon-error);
2418
2423
  }
2419
2424
 
2420
2425
  .kbq-toggle-invalid-ae9ba4:where(.kbq-toggle-selected-0bb42c) {
2421
2426
  --toggle-track-bg-color: var(--kbq-background-error);
2422
- --toggle-track-border-color: var(--kbq-line-error);
2427
+ --toggle-track-border-color: transparent;
2423
2428
  --toggle-thumb-bg-color: var(--kbq-icon-white);
2424
2429
  }
2425
2430
 
@@ -2431,7 +2436,7 @@
2431
2436
 
2432
2437
  .kbq-toggle-invalid-ae9ba4:where(.kbq-toggle-hovered-d4d8d0.kbq-toggle-selected-0bb42c) {
2433
2438
  --toggle-track-bg-color: var(--kbq-states-background-error-hover);
2434
- --toggle-track-border-color: var(--kbq-line-error);
2439
+ --toggle-track-border-color: transparent;
2435
2440
  --toggle-thumb-bg-color: var(--kbq-icon-white);
2436
2441
  }
2437
2442
 
@@ -2445,12 +2450,19 @@
2445
2450
  }
2446
2451
 
2447
2452
  .kbq-toggle-disabled-b31c64 {
2453
+ cursor: not-allowed;
2454
+ }
2455
+
2456
+ .kbq-toggle-disabled-b31c64:not(.kbq-toggle-selected-0bb42c) {
2448
2457
  --toggle-track-border-color: var(--kbq-states-line-disabled);
2449
2458
  --toggle-track-bg-color: var(--kbq-states-background-disabled);
2450
2459
  --toggle-thumb-bg-color: var(--kbq-states-icon-disabled);
2451
- --toggle-thumb-border-color: var(--kbq-states-icon-disabled);
2452
2460
  --toggle-color: var(--kbq-states-foreground-disabled);
2453
- cursor: not-allowed;
2461
+ }
2462
+
2463
+ .kbq-toggle-disabled-b31c64:where(.kbq-toggle-selected-0bb42c) {
2464
+ opacity: var(--kbq-opacity-disabled);
2465
+ display: flex;
2454
2466
  }
2455
2467
  .kbq-progressbar-824268 {
2456
2468
  --progressbar-track-bg-color: var(--kbq-background-contrast-fade);
@@ -3760,6 +3772,11 @@
3760
3772
  color: var(--kbq-states-foreground-disabled);
3761
3773
  cursor: not-allowed;
3762
3774
  }
3775
+
3776
+ .kbq-calendarcell-invalid-02611e {
3777
+ background-color: var(--kbq-background-error);
3778
+ color: var(--kbq-foreground-on-contrast);
3779
+ }
3763
3780
  .kbq-dateinput-a4c39b {
3764
3781
  min-inline-size: 150px;
3765
3782
  }
@@ -3867,6 +3884,9 @@
3867
3884
  .kbq-dateinputsegment-literal-d722fc:not(.kbq-dateinputsegment-hasValue-886d0f) {
3868
3885
  color: var(--field-input-placeholder-color);
3869
3886
  }
3887
+ .kbq-datepicker-calendar-25a0d7 {
3888
+ margin-inline-end: calc(-1 * var(--kbq-size-xxs));
3889
+ }
3870
3890
  .kbq-spacing-mbs_0-be7021 {
3871
3891
  margin-block-start: 0;
3872
3892
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koobiq/react-components",
3
- "version": "0.0.1-beta.36",
3
+ "version": "0.0.1-beta.38",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {
@@ -24,16 +24,16 @@
24
24
  },
25
25
  "sideEffects": false,
26
26
  "dependencies": {
27
- "@koobiq/design-tokens": "^3.12.1",
27
+ "@koobiq/design-tokens": "^3.14.0",
28
28
  "@types/react-transition-group": "^4.4.12",
29
29
  "react-transition-group": "^4.4.5",
30
- "@koobiq/logger": "0.0.1-beta.36",
31
- "@koobiq/react-core": "0.0.1-beta.36",
32
- "@koobiq/react-primitives": "0.0.1-beta.36",
33
- "@koobiq/react-icons": "0.0.1-beta.36"
30
+ "@koobiq/react-core": "0.0.1-beta.38",
31
+ "@koobiq/logger": "0.0.1-beta.38",
32
+ "@koobiq/react-icons": "0.0.1-beta.38",
33
+ "@koobiq/react-primitives": "0.0.1-beta.38"
34
34
  },
35
35
  "peerDependencies": {
36
- "@koobiq/design-tokens": "^3.11.2",
36
+ "@koobiq/design-tokens": "^3.14.0",
37
37
  "react": "18.x || 19.x",
38
38
  "react-dom": "18.x || 19.x"
39
39
  },
@@ -1,13 +0,0 @@
1
- import type { StoryObj } from '@storybook/react';
2
- import { DatePicker } from './DatePicker';
3
- declare const meta: {
4
- title: string;
5
- component: typeof DatePicker;
6
- parameters: {
7
- layout: string;
8
- };
9
- argTypes: {};
10
- };
11
- export default meta;
12
- type Story = StoryObj<typeof meta>;
13
- export declare const Base: Story;