@koobiq/react-components 0.9.0 → 0.11.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.
Files changed (54) hide show
  1. package/dist/components/DateInput/DateInput.js +8 -2
  2. package/dist/components/Dialog/components/DialogCloseButton.d.ts +2 -2
  3. package/dist/components/FieldComponents/FieldSelect/FieldSelect.js +1 -1
  4. package/dist/components/Form/Form.d.ts +19 -0
  5. package/dist/components/Form/Form.js +63 -0
  6. package/dist/components/Form/Form.module.css.js +17 -0
  7. package/dist/components/Form/FormContext.d.ts +7 -0
  8. package/dist/components/Form/FormContext.js +7 -0
  9. package/dist/components/Form/index.d.ts +3 -0
  10. package/dist/components/Form/types.d.ts +30 -0
  11. package/dist/components/Form/types.js +18 -0
  12. package/dist/components/Form/utils.d.ts +15 -0
  13. package/dist/components/Form/utils.js +18 -0
  14. package/dist/components/FormControl/FormControl.js +25 -24
  15. package/dist/components/Input/Input.d.ts +1 -1
  16. package/dist/components/InputNumber/InputNumber.d.ts +1 -1
  17. package/dist/components/List/List.js +4 -3
  18. package/dist/components/List/List.module.css.js +1 -4
  19. package/dist/components/List/components/ListSection/ListSection.js +5 -4
  20. package/dist/components/List/types.d.ts +2 -0
  21. package/dist/components/Menu/Menu.js +2 -2
  22. package/dist/components/Menu/components/MenuList/MenuList.d.ts +6 -0
  23. package/dist/components/Menu/components/{MenuInner/MenuInner.js → MenuList/MenuList.js} +6 -5
  24. package/dist/components/Menu/components/MenuList/MenuList.module.css.js +8 -0
  25. package/dist/components/Menu/components/MenuList/index.d.ts +1 -0
  26. package/dist/components/Menu/components/MenuSection/MenuSection.js +4 -3
  27. package/dist/components/Menu/components/index.d.ts +1 -1
  28. package/dist/components/SearchInput/SearchInput.d.ts +1 -1
  29. package/dist/components/SearchInput/SearchInput.js +8 -2
  30. package/dist/components/Select/Select.js +12 -8
  31. package/dist/components/Select/components/SelectList/SelectList.d.ts +4 -2
  32. package/dist/components/Select/components/SelectList/SelectList.js +35 -7
  33. package/dist/components/Select/components/SelectList/SelectList.module.css.js +3 -3
  34. package/dist/components/Select/intl.js +2 -0
  35. package/dist/components/Select/types.d.ts +4 -2
  36. package/dist/components/Textarea/Textarea.d.ts +1 -1
  37. package/dist/components/Textarea/components/TextareaContextConsumer/TextareaContextConsumer.d.ts +1 -1
  38. package/dist/components/TimePicker/TimePicker.js +4 -1
  39. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  40. package/dist/components/index.d.ts +1 -0
  41. package/dist/index.js +10 -0
  42. package/dist/style.css +94 -51
  43. package/dist/styles/utility.d.ts +1 -0
  44. package/dist/styles/utility.js +2 -1
  45. package/dist/styles/utility.module.css.js +2 -1
  46. package/dist/utils/index.d.ts +1 -0
  47. package/package.json +5 -5
  48. package/dist/components/List/components/ListSection/ListSection.module.css.js +0 -11
  49. package/dist/components/Menu/components/MenuInner/MenuInner.d.ts +0 -6
  50. package/dist/components/Menu/components/MenuInner/MenuInner.module.css.js +0 -11
  51. package/dist/components/Menu/components/MenuInner/index.d.ts +0 -1
  52. package/dist/components/Menu/components/MenuSection/MenuSection.module.css.js +0 -11
  53. /package/dist/{components/FieldComponents/FieldSelect/utils.d.ts → utils/isPrimitiveNode.d.ts} +0 -0
  54. /package/dist/{components/FieldComponents/FieldSelect/utils.js → utils/isPrimitiveNode.js} +0 -0
@@ -2,7 +2,7 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { forwardRef, useCallback } from "react";
3
3
  import { useLocalizedStringFormatter, useDOMRef, useElementSize, mergeProps, clsx } from "@koobiq/react-core";
4
4
  import { IconXmarkCircle16, IconChevronDownS16 } from "@koobiq/react-icons";
5
- import { useMultiSelectState, removeDataAttributes, useMultiSelect, FieldErrorContext } from "@koobiq/react-primitives";
5
+ import { useSlottedContext, FormContext, useMultiSelectState, removeDataAttributes, useMultiSelect, FieldErrorContext } from "@koobiq/react-primitives";
6
6
  import { PopoverInner } from "../Popover/PopoverInner.js";
7
7
  import intlMessages from "./intl.js";
8
8
  import s from "./Select.module.css.js";
@@ -26,6 +26,7 @@ function SelectRender(props, ref) {
26
26
  isClearable,
27
27
  "data-testid": testId,
28
28
  selectionMode = "single",
29
+ noItemsText,
29
30
  selectedTagsOverflow = "responsive",
30
31
  labelPlacement,
31
32
  labelAlign,
@@ -46,6 +47,8 @@ function SelectRender(props, ref) {
46
47
  } = props;
47
48
  const t = useLocalizedStringFormatter(intlMessages);
48
49
  const domRef = useDOMRef(ref);
50
+ const { validationBehavior: formValidationBehavior } = useSlottedContext(FormContext) || {};
51
+ const validationBehavior = props.validationBehavior ?? formValidationBehavior ?? "aria";
49
52
  const state = useMultiSelectState(
50
53
  removeDataAttributes({ ...props, selectionMode })
51
54
  );
@@ -66,7 +69,8 @@ function SelectRender(props, ref) {
66
69
  removeDataAttributes({
67
70
  ...props,
68
71
  selectionMode,
69
- disallowEmptySelection: true
72
+ disallowEmptySelection: true,
73
+ validationBehavior
70
74
  }),
71
75
  state,
72
76
  domRef
@@ -85,14 +89,14 @@ function SelectRender(props, ref) {
85
89
  style
86
90
  });
87
91
  const listProps = mergeProps(
88
- { className: s.list, state },
89
- slotProps?.list,
90
- menuProps
92
+ { className: s.list, state, noItemsText },
93
+ menuProps,
94
+ slotProps?.list
91
95
  );
92
96
  const labelProps = mergeProps(
93
97
  { isHidden: isLabelHidden, children: label, isRequired },
94
- slotProps?.label,
95
- labelPropsAria
98
+ labelPropsAria,
99
+ slotProps?.label
96
100
  );
97
101
  const clearButtonProps = mergeProps(
98
102
  {
@@ -150,7 +154,7 @@ function SelectRender(props, ref) {
150
154
  const captionProps = mergeProps({ children: caption }, slotProps?.caption, descriptionProps);
151
155
  const errorProps = mergeProps({ children: errorMessage }, slotProps?.errorMessage, errorMessageProps);
152
156
  const renderDefaultValue = (state2, states) => {
153
- if (!state2.selectedItems) return null;
157
+ if (!state2.selectedItems?.length) return null;
154
158
  if (selectionMode === "multiple")
155
159
  return /* @__PURE__ */ jsx(
156
160
  TagGroup,
@@ -1,8 +1,10 @@
1
- import type { Ref } from 'react';
1
+ import type { ReactNode, Ref } from 'react';
2
2
  import { type MultiSelectState } from '@koobiq/react-primitives';
3
3
  import type { ListProps } from '../../../List';
4
4
  export type SelectListProps<T extends object> = {
5
5
  state: MultiSelectState<T>;
6
6
  listRef?: Ref<HTMLUListElement>;
7
- } & Omit<ListProps<T>, 'ref'>;
7
+ /** Content to display when no items are available. */
8
+ noItemsText?: ReactNode;
9
+ } & Omit<ListProps<T>, 'ref' | 'children'>;
8
10
  export declare function SelectList<T extends object>(props: SelectListProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,16 +1,28 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { useDOMRef, mergeProps, clsx, isNotNil } from "@koobiq/react-core";
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { useLocalizedStringFormatter, useDOMRef, mergeProps, clsx, isNotNil } from "@koobiq/react-core";
3
3
  import { useListBox } from "@koobiq/react-primitives";
4
4
  import { utilClasses } from "../../../../styles/utility.js";
5
+ import intlMessages from "../../intl.js";
5
6
  import s from "./SelectList.module.css.js";
6
7
  import { SelectOption } from "../SelectOption/SelectOption.js";
8
+ import { isPrimitiveNode } from "../../../../utils/isPrimitiveNode.js";
7
9
  import { Typography } from "../../../Typography/Typography.js";
8
10
  import { ListSection } from "../../../List/components/ListSection/ListSection.js";
9
11
  import { Divider } from "../../../Divider/Divider.js";
10
- const { list } = utilClasses;
12
+ const { list, typography } = utilClasses;
11
13
  function SelectList(props) {
12
- const { label, className, style, slotProps, state, listRef } = props;
14
+ const {
15
+ label,
16
+ className,
17
+ style,
18
+ slotProps,
19
+ state,
20
+ listRef,
21
+ noItemsText: noItemsTextProp
22
+ } = props;
23
+ const t = useLocalizedStringFormatter(intlMessages);
13
24
  const domRef = useDOMRef(listRef);
25
+ const isEmpty = state.collection.size === 0;
14
26
  const { listBoxProps, labelProps } = useListBox(props, state, domRef);
15
27
  const titleProps = mergeProps(
16
28
  {
@@ -24,15 +36,28 @@ function SelectList(props) {
24
36
  {
25
37
  style,
26
38
  ref: domRef,
27
- className: clsx(list, className)
39
+ className: clsx(list, className),
40
+ "data-padded": true
28
41
  },
29
42
  slotProps?.list,
30
43
  listBoxProps
31
44
  );
45
+ const noItemsText = noItemsTextProp ?? t.format("empty items");
46
+ const emptyState = isEmpty ? /* @__PURE__ */ jsx(
47
+ "div",
48
+ {
49
+ role: "option",
50
+ className: clsx(s.empty, typography["text-normal"]),
51
+ ...!isPrimitiveNode(noItemsText) && {
52
+ style: { display: "contents" }
53
+ },
54
+ children: noItemsText
55
+ }
56
+ ) : null;
32
57
  const renderItems = (treeState) => [...treeState.collection].map((item) => {
33
58
  switch (item.type) {
34
59
  case "divider":
35
- return /* @__PURE__ */ jsx(Divider, { className: s.divider }, item.key);
60
+ return /* @__PURE__ */ jsx(Divider, {}, item.key);
36
61
  case "item":
37
62
  return /* @__PURE__ */ jsx(SelectOption, { item, state }, item.key);
38
63
  case "section":
@@ -43,7 +68,10 @@ function SelectList(props) {
43
68
  });
44
69
  return /* @__PURE__ */ jsxs(Fragment, { children: [
45
70
  isNotNil(label) && /* @__PURE__ */ jsx(Typography, { ...titleProps, children: label }),
46
- /* @__PURE__ */ jsx("ul", { ...listProps, children: renderItems(state) })
71
+ /* @__PURE__ */ jsxs("ul", { ...listProps, children: [
72
+ renderItems(state),
73
+ emptyState
74
+ ] })
47
75
  ] });
48
76
  }
49
77
  export {
@@ -1,11 +1,11 @@
1
1
  const label = "kbq-selectlist-label-4b49f4";
2
- const divider = "kbq-selectlist-divider-7c167f";
2
+ const empty = "kbq-selectlist-empty-e6a9b0";
3
3
  const s = {
4
4
  label,
5
- divider
5
+ empty
6
6
  };
7
7
  export {
8
8
  s as default,
9
- divider,
9
+ empty,
10
10
  label
11
11
  };
@@ -1,10 +1,12 @@
1
1
  const intlMessages = {
2
2
  "ru-RU": {
3
+ "empty items": "Нет вариантов выбора",
3
4
  "selected items": "Выбранные элементы",
4
5
  clear: "Очистить",
5
6
  more: ({ count }) => `еще ${count}`
6
7
  },
7
8
  "en-US": {
9
+ "empty items": "No options available",
8
10
  "selected items": "Selected items",
9
11
  clear: "Clear",
10
12
  more: ({ count }) => `${count} more`
@@ -5,8 +5,8 @@ import { type FieldErrorProps, type FieldSelectProps, type FieldCaptionProps, ty
5
5
  import { type FormControlPropLabelAlign, type FormControlPropLabelPlacement } from '../FormControl';
6
6
  import type { FormControlLabelProps } from '../FormControlLabel';
7
7
  import type { IconButtonProps } from '../IconButton';
8
- import type { ListProps } from '../List';
9
8
  import type { PopoverProps } from '../Popover';
9
+ import type { SelectListProps } from './components';
10
10
  export declare const selectPropSelectedTagsOverflow: readonly ["multiline", "responsive"];
11
11
  export type SelectPropSelectedTagsOverflow = (typeof selectPropSelectedTagsOverflow)[number];
12
12
  export declare const selectPropLabelPlacement: readonly ["top", "side"];
@@ -77,11 +77,13 @@ export type SelectProps<T> = ExtendableProps<{
77
77
  isDisabled?: boolean;
78
78
  isRequired?: boolean;
79
79
  }) => ReactNode;
80
+ /** Content to display when no items are available. */
81
+ noItemsText?: ReactNode;
80
82
  /** The props used for each slot inside. */
81
83
  slotProps?: {
82
84
  popover?: PopoverProps;
83
85
  label?: FormControlLabelProps;
84
- list?: ListProps<T>;
86
+ list?: Omit<SelectListProps<object>, 'state'>;
85
87
  control?: FieldSelectProps;
86
88
  caption?: FieldCaptionProps;
87
89
  group?: FieldContentGroupProps;
@@ -4,7 +4,7 @@ export declare const Textarea: import("react").ForwardRefExoticComponent<Omit<{
4
4
  required?: boolean;
5
5
  hiddenLabel?: boolean;
6
6
  readonly?: boolean;
7
- } & Omit<import("@koobiq/react-primitives").TextFieldProps<HTMLTextAreaElement>, "children" | "style" | "className" | "validationState" | "description" | "inputElementType">, "caption" | "style" | "className" | "cols" | "rows" | "labelPlacement" | "labelAlign" | "fullWidth" | "variant" | "slotProps" | "data-testid" | "isLabelHidden" | "expand"> & {
7
+ } & Omit<import("@koobiq/react-primitives").TextFieldProps<HTMLTextAreaElement>, "children" | "style" | "className" | "validationState" | "description" | "inputElementType">, "caption" | "style" | "className" | "cols" | "rows" | "variant" | "labelPlacement" | "labelAlign" | "fullWidth" | "slotProps" | "data-testid" | "isLabelHidden" | "expand"> & {
8
8
  className?: string;
9
9
  style?: import("react").CSSProperties;
10
10
  variant?: import("./types").TextareaPropVariant;
@@ -3,4 +3,4 @@ export declare const TextareaContextConsumer: import("react").ForwardRefExoticCo
3
3
  isRequired?: boolean;
4
4
  isInvalid?: boolean;
5
5
  isDisabled?: boolean;
6
- } & Pick<TextareaProps, "caption" | "label" | "cols" | "rows" | "labelPlacement" | "variant" | "slotProps" | "errorMessage" | "isLabelHidden" | "expand"> & import("react").RefAttributes<HTMLTextAreaElement>>;
6
+ } & Pick<TextareaProps, "caption" | "label" | "cols" | "rows" | "variant" | "labelPlacement" | "slotProps" | "errorMessage" | "isLabelHidden" | "expand"> & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -2,7 +2,7 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import { useLocale, useDOMRef, mergeProps, clsx } from "@koobiq/react-core";
4
4
  import { IconClock16 } from "@koobiq/react-icons";
5
- import { useTimeFieldState, removeDataAttributes, useTimeField, FieldErrorContext } from "@koobiq/react-primitives";
5
+ import { useSlottedContext, FormContext, useTimeFieldState, removeDataAttributes, useTimeField, FieldErrorContext } from "@koobiq/react-primitives";
6
6
  import s from "./TimePicker.module.css.js";
7
7
  import { FormControl } from "../FormControl/FormControl.js";
8
8
  import { FormControlLabel } from "../FormControlLabel/FormControlLabel.js";
@@ -31,8 +31,11 @@ function TimePickerRender(props, ref) {
31
31
  startAddon,
32
32
  "data-testid": testId
33
33
  } = props;
34
+ const { validationBehavior: formValidationBehavior } = useSlottedContext(FormContext) || {};
35
+ const validationBehavior = props.validationBehavior ?? formValidationBehavior ?? "aria";
34
36
  const state = useTimeFieldState({
35
37
  ...removeDataAttributes(props),
38
+ validationBehavior,
36
39
  locale
37
40
  });
38
41
  const {
@@ -1,4 +1,4 @@
1
- export declare const Tooltip: import("react").ForwardRefExoticComponent<Omit<import("@react-types/tooltip").TooltipTriggerProps, "children" | "className" | "id" | "offset" | `data-${string}` | "variant" | "placement" | "control" | "portalContainer" | "anchorRef" | "hideArrow" | "arrowBoundaryOffset" | "crossOffset" | "delay" | "closeDelay" | keyof {
1
+ export declare const Tooltip: import("react").ForwardRefExoticComponent<Omit<import("@react-types/tooltip").TooltipTriggerProps, "children" | "className" | "id" | "offset" | "variant" | `data-${string}` | "placement" | "control" | "portalContainer" | "anchorRef" | "hideArrow" | "arrowBoundaryOffset" | "crossOffset" | "delay" | "closeDelay" | keyof {
2
2
  open?: boolean;
3
3
  disabled?: boolean;
4
4
  }> & {
@@ -37,6 +37,7 @@ export * from './DateInput';
37
37
  export * from './DatePicker';
38
38
  export * from './TimePicker';
39
39
  export * from './SearchInput';
40
+ export * from './Form';
40
41
  export * from './layout';
41
42
  export { useListData, type ListData, type ListOptions, type TimeValue, type DateValue, } from '@koobiq/react-primitives';
42
43
  export { useRouter, useLocale, type Locale, RouterProvider, useDateFormatter, } from '@koobiq/react-core';
package/dist/index.js CHANGED
@@ -82,6 +82,9 @@ import { TimePicker, TimePickerRender } from "./components/TimePicker/TimePicker
82
82
  import { timePickerPropLabelAlign, timePickerPropLabelPlacement } from "./components/TimePicker/types.js";
83
83
  import { SearchInput } from "./components/SearchInput/SearchInput.js";
84
84
  import { searchInputPropLabelAlign, searchInputPropLabelPlacement, searchInputPropVariant } from "./components/SearchInput/types.js";
85
+ import { Fieldset, Form, FormComponent, Legend } from "./components/Form/Form.js";
86
+ import { FormContext, useForm } from "./components/Form/FormContext.js";
87
+ import { formPropLabelInlineSize } from "./components/Form/types.js";
85
88
  import { flex, flexPropAlignItems, flexPropDirection, flexPropFlex, flexPropGap, flexPropJustifyContent, flexPropOrder, flexPropWrap } from "./components/layout/flex/flex.js";
86
89
  import { spacing, spacingGap } from "./components/layout/spacing/spacing.js";
87
90
  export {
@@ -101,7 +104,11 @@ export {
101
104
  DatePicker,
102
105
  DatePickerRender,
103
106
  Divider,
107
+ Fieldset,
104
108
  FlexBox,
109
+ Form,
110
+ FormComponent,
111
+ FormContext,
105
112
  FormControl,
106
113
  FormControlLabel,
107
114
  Grid,
@@ -109,6 +116,7 @@ export {
109
116
  IconButton,
110
117
  Input,
111
118
  InputNumber,
119
+ Legend,
112
120
  Link,
113
121
  List,
114
122
  ListInner,
@@ -173,6 +181,7 @@ export {
173
181
  flexPropWrap,
174
182
  formControlPropLabelAlign,
175
183
  formControlPropLabelPlacement,
184
+ formPropLabelInlineSize,
176
185
  gridPropGap,
177
186
  iconButtonPropSize,
178
187
  iconButtonPropVariant,
@@ -223,6 +232,7 @@ export {
223
232
  typographyPropVariant,
224
233
  useBreakpoints,
225
234
  useDateFormatter,
235
+ useForm,
226
236
  useListData,
227
237
  useLocale,
228
238
  useMatchedBreakpoints,
package/dist/style.css CHANGED
@@ -1352,7 +1352,7 @@
1352
1352
  font-family: inherit;
1353
1353
  }
1354
1354
 
1355
- .kbq-utility-list-792630 {
1355
+ .kbq-utility-list-792630, .kbq-utility-list-792630 ul {
1356
1356
  outline: none;
1357
1357
  margin: 0;
1358
1358
  padding: 0;
@@ -1360,6 +1360,22 @@
1360
1360
  overflow: auto;
1361
1361
  }
1362
1362
 
1363
+ .kbq-utility-list-792630[data-padded] {
1364
+ padding-block: var(--kbq-size-xxs);
1365
+ }
1366
+
1367
+ .kbq-utility-list-792630[data-padded] .kbq-utility-list-item-862731, .kbq-utility-list-792630[data-padded] .kbq-utility-list-heading-3c364a {
1368
+ border-inline: var(--kbq-size-xxs) solid transparent;
1369
+ background-clip: padding-box;
1370
+ }
1371
+
1372
+ .kbq-utility-list-heading-3c364a {
1373
+ -webkit-user-select: none;
1374
+ user-select: none;
1375
+ box-sizing: border-box;
1376
+ padding: var(--kbq-size-s) var(--kbq-size-m);
1377
+ }
1378
+
1363
1379
  .kbq-utility-list-item-862731 {
1364
1380
  --list-item-bg-color: ;
1365
1381
  --list-item-outline-color: transparent;
@@ -1367,17 +1383,33 @@
1367
1383
  cursor: pointer;
1368
1384
  box-sizing: border-box;
1369
1385
  gap: var(--kbq-size-s);
1370
- border-radius: var(--kbq-size-s);
1371
1386
  color: var(--kbq-foreground-contrast);
1372
- background-color: var(--list-item-bg-color);
1373
1387
  padding: var(--kbq-size-xs) var(--kbq-size-m);
1374
- outline-offset: calc(-1 * var(--list-item-outline-width));
1375
- outline: var(--list-item-outline-width) solid var(--list-item-outline-color);
1376
- transition: border-color var(--kbq-transition-default), border-radius var(--kbq-transition-default), background-color var(--kbq-transition-default), color var(--kbq-transition-default);
1388
+ z-index: var(--kbq-layer-absolute);
1389
+ transition: border-color var(--kbq-transition-default), border-radius var(--kbq-transition-default), color var(--kbq-transition-default);
1390
+ outline: none;
1377
1391
  flex-shrink: 0;
1378
1392
  align-items: center;
1379
1393
  text-decoration: none;
1380
1394
  display: flex;
1395
+ position: relative;
1396
+ }
1397
+
1398
+ .kbq-utility-list-item-862731 > * {
1399
+ z-index: var(--kbq-layer-absolute);
1400
+ }
1401
+
1402
+ .kbq-utility-list-item-862731:before {
1403
+ content: "";
1404
+ outline-offset: calc(-1 * var(--list-item-outline-width));
1405
+ outline: var(--list-item-outline-width) solid var(--list-item-outline-color);
1406
+ transition: background-color var(--kbq-transition-default);
1407
+ background-color: var(--list-item-bg-color);
1408
+ border-radius: var(--kbq-size-s);
1409
+ pointer-events: none;
1410
+ z-index: -1;
1411
+ position: absolute;
1412
+ inset: 0;
1381
1413
  }
1382
1414
 
1383
1415
  .kbq-utility-list-item-862731:where([data-hovered="true"]) {
@@ -1426,12 +1458,12 @@
1426
1458
  --list-item-bg-color: var(--kbq-states-background-contrast-less-active);
1427
1459
  }
1428
1460
 
1429
- .kbq-utility-list-792630[aria-multiselectable="true"] .kbq-utility-list-item-862731:is([data-selected="true"], [data-focus-visible="true"]):has( + :is([data-selected="true"], [data-focus-visible="true"])) {
1461
+ .kbq-utility-list-792630[aria-multiselectable="true"] .kbq-utility-list-item-862731:is([data-selected="true"], [data-focus-visible="true"]):has( + :is([data-selected="true"], [data-focus-visible="true"])):before {
1430
1462
  border-end-end-radius: 0;
1431
1463
  border-end-start-radius: 0;
1432
1464
  }
1433
1465
 
1434
- .kbq-utility-list-792630[aria-multiselectable="true"] .kbq-utility-list-item-862731:is([data-selected="true"], [data-focus-visible="true"]) + :is([data-selected="true"], [data-focus-visible="true"]) {
1466
+ .kbq-utility-list-792630[aria-multiselectable="true"] .kbq-utility-list-item-862731:is([data-selected="true"], [data-focus-visible="true"]) + :is([data-selected="true"], [data-focus-visible="true"]):before {
1435
1467
  border-start-start-radius: 0;
1436
1468
  border-start-end-radius: 0;
1437
1469
  }
@@ -3117,24 +3149,6 @@
3117
3149
  .kbq-list-label-e4431c {
3118
3150
  padding: var(--kbq-size-xs) var(--kbq-size-m);
3119
3151
  }
3120
-
3121
- .kbq-list-divider-fd5123 {
3122
- margin-inline: calc(var(--kbq-size-xxs) * -1);
3123
- inline-size: initial;
3124
- }
3125
- .kbq-listsection-d94a57 {
3126
- margin: 0;
3127
- padding: 0;
3128
- list-style: none;
3129
- overflow: auto;
3130
- }
3131
-
3132
- .kbq-listsection-heading-5bd9e3 {
3133
- -webkit-user-select: none;
3134
- user-select: none;
3135
- box-sizing: border-box;
3136
- padding: var(--kbq-size-s) var(--kbq-size-m);
3137
- }
3138
3152
  .kbq-divider-16da20 {
3139
3153
  border-style: solid;
3140
3154
  border-color: var(--kbq-line-contrast-less);
@@ -3209,7 +3223,6 @@
3209
3223
 
3210
3224
  .kbq-select-list-8ffac0 {
3211
3225
  inline-size: 100%;
3212
- padding: var(--kbq-size-xxs);
3213
3226
  }
3214
3227
 
3215
3228
  .kbq-select-popover-79fc05 {
@@ -3305,9 +3318,10 @@
3305
3318
  padding: var(--kbq-size-xs) var(--kbq-size-m);
3306
3319
  }
3307
3320
 
3308
- .kbq-selectlist-divider-7c167f {
3309
- margin-inline: calc(var(--kbq-size-xxs) * -1);
3310
- inline-size: initial;
3321
+ .kbq-selectlist-empty-e6a9b0 {
3322
+ color: var(--kbq-foreground-contrast-secondary);
3323
+ padding-block: var(--kbq-size-xs);
3324
+ padding-inline: var(--kbq-size-l);
3311
3325
  }
3312
3326
  .kbq-taggroup-container-c4d544 {
3313
3327
  inline-size: calc(100% + var(--kbq-size-s));
@@ -3457,28 +3471,9 @@
3457
3471
  min-inline-size: 200px;
3458
3472
  max-inline-size: 640px;
3459
3473
  }
3460
- .kbq-menuinner-0117f8 {
3461
- padding: var(--kbq-size-xxs);
3474
+ .kbq-menulist-0e5f46 {
3462
3475
  inline-size: 100%;
3463
3476
  }
3464
-
3465
- .kbq-menuinner-divider-acbe04 {
3466
- margin-inline: calc(var(--kbq-size-xxs) * -1);
3467
- inline-size: initial;
3468
- }
3469
- .kbq-menusection-6a5530 {
3470
- margin: 0;
3471
- padding: 0;
3472
- list-style: none;
3473
- overflow: auto;
3474
- }
3475
-
3476
- .kbq-menusection-heading-2be1f1 {
3477
- -webkit-user-select: none;
3478
- user-select: none;
3479
- box-sizing: border-box;
3480
- padding: var(--kbq-size-s) var(--kbq-size-m);
3481
- }
3482
3477
  .kbq-buttontogglegroup-79a88d {
3483
3478
  --thumb-inline-size-start: ;
3484
3479
  --thumb-transform-start: ;
@@ -4091,7 +4086,7 @@
4091
4086
  }
4092
4087
 
4093
4088
  .kbq-datesegment-3b7153:focus {
4094
- color: var(--date-input-segment-color);
4089
+ color: highlighttext;
4095
4090
  background-color: highlight;
4096
4091
  outline: none;
4097
4092
  }
@@ -4164,6 +4159,54 @@
4164
4159
  .kbq-searchinput-clearButton-71f872 {
4165
4160
  margin-inline-end: calc(-1 * var(--kbq-size-xxs));
4166
4161
  }
4162
+ .kbq-form-40d37e, .kbq-form-fieldset-b2924b {
4163
+ --gap-y: var(--kbq-size-xl);
4164
+ --template-columns: max-content 1fr;
4165
+ display: grid;
4166
+ }
4167
+
4168
+ :is(.kbq-form-40d37e, .kbq-form-fieldset-b2924b) > [data-slot="form-control"] {
4169
+ width: 100%;
4170
+ }
4171
+
4172
+ :is(.kbq-form-40d37e, .kbq-form-fieldset-b2924b) > [data-slot="form-control"]:not(:last-child) {
4173
+ margin-block-end: var(--gap-y);
4174
+ }
4175
+
4176
+ :is(.kbq-form-40d37e, .kbq-form-fieldset-b2924b) > * {
4177
+ grid-column: 1 / -1;
4178
+ justify-self: start;
4179
+ }
4180
+
4181
+ .kbq-form-fieldset-b2924b {
4182
+ border: 0;
4183
+ margin: 0;
4184
+ padding: 0;
4185
+ }
4186
+
4187
+ .kbq-form-fieldset-b2924b .kbq-form-legend-91e738 {
4188
+ margin-block-end: var(--kbq-size-l);
4189
+ }
4190
+
4191
+ .kbq-form-horizontal-52dea8, .kbq-form-horizontal-52dea8 .kbq-form-fieldset-b2924b {
4192
+ grid-template-columns: var(--template-columns);
4193
+ }
4194
+
4195
+ :is(.kbq-form-horizontal-52dea8, .kbq-form-horizontal-52dea8 .kbq-form-fieldset-b2924b) > [data-slot="form-control"] {
4196
+ grid-template-columns: subgrid;
4197
+ align-items: center;
4198
+ display: grid;
4199
+ }
4200
+
4201
+ :is(.kbq-form-horizontal-52dea8, .kbq-form-horizontal-52dea8 .kbq-form-fieldset-b2924b) > [data-slot="form-control"] > :first-child {
4202
+ grid-column: 1;
4203
+ align-self: start;
4204
+ }
4205
+
4206
+ :is(.kbq-form-horizontal-52dea8, .kbq-form-horizontal-52dea8 .kbq-form-fieldset-b2924b) > [data-slot="form-control"] > :last-child {
4207
+ grid-column: 2;
4208
+ justify-self: start;
4209
+ }
4167
4210
  .kbq-spacing-mbs_0-be7021 {
4168
4211
  margin-block-start: 0;
4169
4212
  }
@@ -70,5 +70,6 @@ export declare const utilClasses: {
70
70
  };
71
71
  list: string;
72
72
  listItem: string;
73
+ listHeading: string;
73
74
  scrollable: string;
74
75
  };
@@ -71,7 +71,8 @@ const utilClasses = {
71
71
  color,
72
72
  typography,
73
73
  list: s.list,
74
- listItem: s["list-item"]
74
+ listItem: s["list-item"],
75
+ listHeading: s["list-heading"]
75
76
  };
76
77
  export {
77
78
  utilClasses
@@ -67,7 +67,8 @@ const s = {
67
67
  "italic-compact-strong": "kbq-utility-italic-compact-strong-d8e16e",
68
68
  inherit,
69
69
  list,
70
- "list-item": "kbq-utility-list-item-862731"
70
+ "list-item": "kbq-utility-list-item-862731",
71
+ "list-heading": "kbq-utility-list-heading-3c364a"
71
72
  };
72
73
  export {
73
74
  s as default,
@@ -1,2 +1,3 @@
1
1
  export * from './getResponsiveValue';
2
2
  export * from './capitalizeFirstLetter';
3
+ export * from './isPrimitiveNode';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koobiq/react-components",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -28,10 +28,10 @@
28
28
  "@koobiq/design-tokens": "^3.14.0",
29
29
  "@types/react-transition-group": "^4.4.12",
30
30
  "react-transition-group": "^4.4.5",
31
- "@koobiq/logger": "0.9.0",
32
- "@koobiq/react-core": "0.9.0",
33
- "@koobiq/react-icons": "0.9.0",
34
- "@koobiq/react-primitives": "0.9.0"
31
+ "@koobiq/react-core": "0.11.0",
32
+ "@koobiq/logger": "0.11.0",
33
+ "@koobiq/react-icons": "0.11.0",
34
+ "@koobiq/react-primitives": "0.11.0"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@koobiq/design-tokens": "^3.14.0",
@@ -1,11 +0,0 @@
1
- const base = "kbq-listsection-d94a57";
2
- const heading = "kbq-listsection-heading-5bd9e3";
3
- const s = {
4
- base,
5
- heading
6
- };
7
- export {
8
- base,
9
- s as default,
10
- heading
11
- };
@@ -1,6 +0,0 @@
1
- import type { ComponentRef, ReactElement } from 'react';
2
- import type { AriaMenuOptions } from '@koobiq/react-primitives';
3
- export type MenuInnerProps<T> = AriaMenuOptions<T>;
4
- export type MenuInnerComponent = <T>(props: MenuInnerProps<T>) => ReactElement | null;
5
- export type MenuInnerRef = ComponentRef<'ul'>;
6
- export declare const MenuInner: MenuInnerComponent;
@@ -1,11 +0,0 @@
1
- const base = "kbq-menuinner-0117f8";
2
- const divider = "kbq-menuinner-divider-acbe04";
3
- const s = {
4
- base,
5
- divider
6
- };
7
- export {
8
- base,
9
- s as default,
10
- divider
11
- };
@@ -1 +0,0 @@
1
- export * from './MenuInner';
@@ -1,11 +0,0 @@
1
- const base = "kbq-menusection-6a5530";
2
- const heading = "kbq-menusection-heading-2be1f1";
3
- const s = {
4
- base,
5
- heading
6
- };
7
- export {
8
- base,
9
- s as default,
10
- heading
11
- };