@koobiq/react-components 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/FieldComponents/FieldSelect/FieldSelect.js +1 -1
- package/dist/components/List/List.js +4 -3
- package/dist/components/List/List.module.css.js +1 -4
- package/dist/components/List/components/ListSection/ListSection.js +4 -3
- package/dist/components/List/types.d.ts +2 -0
- package/dist/components/Menu/Menu.js +2 -2
- package/dist/components/Menu/components/MenuList/MenuList.d.ts +6 -0
- package/dist/components/Menu/components/{MenuInner/MenuInner.js → MenuList/MenuList.js} +6 -5
- package/dist/components/Menu/components/MenuList/MenuList.module.css.js +8 -0
- package/dist/components/Menu/components/MenuList/index.d.ts +1 -0
- package/dist/components/Menu/components/MenuSection/MenuSection.js +4 -3
- package/dist/components/Menu/components/index.d.ts +1 -1
- package/dist/components/Select/Select.js +7 -6
- package/dist/components/Select/components/SelectList/SelectList.d.ts +4 -2
- package/dist/components/Select/components/SelectList/SelectList.js +35 -7
- package/dist/components/Select/components/SelectList/SelectList.module.css.js +3 -3
- package/dist/components/Select/intl.js +2 -0
- package/dist/components/Select/types.d.ts +4 -2
- package/dist/style.css +45 -50
- package/dist/styles/utility.d.ts +1 -0
- package/dist/styles/utility.js +2 -1
- package/dist/styles/utility.module.css.js +2 -1
- package/dist/utils/index.d.ts +1 -0
- package/package.json +5 -5
- package/dist/components/List/components/ListSection/ListSection.module.css.js +0 -11
- package/dist/components/Menu/components/MenuInner/MenuInner.d.ts +0 -6
- package/dist/components/Menu/components/MenuInner/MenuInner.module.css.js +0 -11
- package/dist/components/Menu/components/MenuInner/index.d.ts +0 -1
- package/dist/components/Menu/components/MenuSection/MenuSection.module.css.js +0 -11
- /package/dist/{components/FieldComponents/FieldSelect/utils.d.ts → utils/isPrimitiveNode.d.ts} +0 -0
- /package/dist/{components/FieldComponents/FieldSelect/utils.js → utils/isPrimitiveNode.js} +0 -0
|
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { polymorphicForwardRef, clsx, isNotNil } from "@koobiq/react-core";
|
|
3
3
|
import { Button } from "@koobiq/react-primitives";
|
|
4
4
|
import s from "./FieldSelect.module.css.js";
|
|
5
|
-
import { isPrimitiveNode } from "
|
|
5
|
+
import { isPrimitiveNode } from "../../../utils/isPrimitiveNode.js";
|
|
6
6
|
const FieldSelect = polymorphicForwardRef(
|
|
7
7
|
({
|
|
8
8
|
variant = "filled",
|
|
@@ -15,7 +15,7 @@ import { Typography } from "../Typography/Typography.js";
|
|
|
15
15
|
import { ListOption } from "./components/ListOption/ListOption.js";
|
|
16
16
|
const { list } = utilClasses;
|
|
17
17
|
function ListInner(props) {
|
|
18
|
-
const { label, className, style, slotProps, state, listRef } = props;
|
|
18
|
+
const { label, className, style, slotProps, state, listRef, isPadded } = props;
|
|
19
19
|
const domRef = useDOMRef(listRef);
|
|
20
20
|
const { listBoxProps, labelProps } = useListBox(props, state, domRef);
|
|
21
21
|
const titleProps = mergeProps(
|
|
@@ -30,7 +30,8 @@ function ListInner(props) {
|
|
|
30
30
|
{
|
|
31
31
|
style,
|
|
32
32
|
ref: domRef,
|
|
33
|
-
className: clsx(list, className)
|
|
33
|
+
className: clsx(list, className),
|
|
34
|
+
"data-padded": isPadded || void 0
|
|
34
35
|
},
|
|
35
36
|
slotProps?.list,
|
|
36
37
|
listBoxProps
|
|
@@ -38,7 +39,7 @@ function ListInner(props) {
|
|
|
38
39
|
const renderItems = (listState) => [...listState.collection].map((item) => {
|
|
39
40
|
switch (item.type) {
|
|
40
41
|
case "divider":
|
|
41
|
-
return /* @__PURE__ */ jsx(Divider, {
|
|
42
|
+
return /* @__PURE__ */ jsx(Divider, {}, item.key);
|
|
42
43
|
case "item":
|
|
43
44
|
return /* @__PURE__ */ jsx(ListOption, { item, state }, item.key);
|
|
44
45
|
case "section":
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useListBoxSection } from "@koobiq/react-primitives";
|
|
4
|
-
import
|
|
4
|
+
import { utilClasses } from "../../../../styles/utility.js";
|
|
5
5
|
import { Typography } from "../../../Typography/Typography.js";
|
|
6
6
|
import { ListOption } from "../ListOption/ListOption.js";
|
|
7
|
+
const { listHeading } = utilClasses;
|
|
7
8
|
function ListSection({ section, state }) {
|
|
8
9
|
const { itemProps, headingProps, groupProps } = useListBoxSection({
|
|
9
10
|
heading: section.rendered,
|
|
@@ -17,12 +18,12 @@ function ListSection({ section, state }) {
|
|
|
17
18
|
display: "block",
|
|
18
19
|
variant: "caps-compact-strong",
|
|
19
20
|
color: "contrast-secondary",
|
|
20
|
-
className:
|
|
21
|
+
className: listHeading,
|
|
21
22
|
...headingProps,
|
|
22
23
|
children: section.rendered
|
|
23
24
|
}
|
|
24
25
|
),
|
|
25
|
-
/* @__PURE__ */ jsx("ul", { ...groupProps,
|
|
26
|
+
/* @__PURE__ */ jsx("ul", { ...groupProps, children: [...section.childNodes].map((node) => /* @__PURE__ */ jsx(ListOption, { item: node, state }, node.key)) })
|
|
26
27
|
] }) });
|
|
27
28
|
}
|
|
28
29
|
export {
|
|
@@ -14,6 +14,8 @@ export type ListProps<T> = ExtendableProps<{
|
|
|
14
14
|
label?: TypographyProps;
|
|
15
15
|
list?: ComponentPropsWithRef<'div'>;
|
|
16
16
|
};
|
|
17
|
+
/** Whether the component has outer padding. */
|
|
18
|
+
isPadded?: boolean;
|
|
17
19
|
}, AriaListBoxProps<T>>;
|
|
18
20
|
export type ListRef = ComponentRef<'ul'>;
|
|
19
21
|
export type ListComponent = <T>(props: ListProps<T>) => ReactElement | null;
|
|
@@ -6,7 +6,7 @@ import { useDOMRef, mergeProps, clsx, Pressable } from "@koobiq/react-core";
|
|
|
6
6
|
import { useMenuTriggerState, useMenuTrigger } from "@koobiq/react-primitives";
|
|
7
7
|
import { PopoverInner } from "../Popover/PopoverInner.js";
|
|
8
8
|
import s from "./Menu.module.css.js";
|
|
9
|
-
import {
|
|
9
|
+
import { MenuList } from "./components/MenuList/MenuList.js";
|
|
10
10
|
import { Header } from "../Collections/Header.js";
|
|
11
11
|
import { Item } from "../Collections/Item.js";
|
|
12
12
|
import { Section } from "../Collections/Section.js";
|
|
@@ -59,7 +59,7 @@ function MenuRender(props, ref) {
|
|
|
59
59
|
ref: controlRef,
|
|
60
60
|
...menuTriggerProps
|
|
61
61
|
}),
|
|
62
|
-
/* @__PURE__ */ jsx(PopoverInner, { type: "menu", placement, ...popoverProps, children: /* @__PURE__ */ jsx(
|
|
62
|
+
/* @__PURE__ */ jsx(PopoverInner, { type: "menu", placement, ...popoverProps, children: /* @__PURE__ */ jsx(MenuList, { ...listProps }) })
|
|
63
63
|
] });
|
|
64
64
|
}
|
|
65
65
|
const MenuComponent = forwardRef(MenuRender);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ComponentRef, ReactElement } from 'react';
|
|
2
|
+
import type { AriaMenuOptions } from '@koobiq/react-primitives';
|
|
3
|
+
export type MenuListProps<T> = AriaMenuOptions<T>;
|
|
4
|
+
export type MenuListComponent = <T>(props: MenuListProps<T>) => ReactElement | null;
|
|
5
|
+
export type MenuListRef = ComponentRef<'ul'>;
|
|
6
|
+
export declare const MenuList: MenuListComponent;
|
|
@@ -4,13 +4,13 @@ import { forwardRef } from "react";
|
|
|
4
4
|
import { useDOMRef, clsx } from "@koobiq/react-core";
|
|
5
5
|
import { useTreeState, useMenu } from "@koobiq/react-primitives";
|
|
6
6
|
import { utilClasses } from "../../../../styles/utility.js";
|
|
7
|
-
import s from "./
|
|
7
|
+
import s from "./MenuList.module.css.js";
|
|
8
8
|
import { MenuSection } from "../MenuSection/MenuSection.js";
|
|
9
9
|
import { MenuHeader } from "../MenuHeader/MenuHeader.js";
|
|
10
10
|
import { MenuItem } from "../MenuItem/MenuItem.js";
|
|
11
11
|
import { Divider } from "../../../Divider/Divider.js";
|
|
12
12
|
const { list } = utilClasses;
|
|
13
|
-
function
|
|
13
|
+
function MenuListRender(props, ref) {
|
|
14
14
|
const state = useTreeState(props);
|
|
15
15
|
const domRef = useDOMRef(ref);
|
|
16
16
|
const { menuProps } = useMenu(props, state, domRef);
|
|
@@ -20,7 +20,7 @@ function MenuInnerRender(props, ref) {
|
|
|
20
20
|
case "header":
|
|
21
21
|
return /* @__PURE__ */ jsx(MenuHeader, { item }, item.key);
|
|
22
22
|
case "divider":
|
|
23
|
-
return /* @__PURE__ */ jsx(Divider, {
|
|
23
|
+
return /* @__PURE__ */ jsx(Divider, {}, item.key);
|
|
24
24
|
case "item":
|
|
25
25
|
return /* @__PURE__ */ jsx(MenuItem, { item, state }, item.key);
|
|
26
26
|
case "section":
|
|
@@ -33,6 +33,7 @@ function MenuInnerRender(props, ref) {
|
|
|
33
33
|
"ul",
|
|
34
34
|
{
|
|
35
35
|
...menuProps,
|
|
36
|
+
"data-padded": true,
|
|
36
37
|
className: clsx(s.base, list),
|
|
37
38
|
...multiple && { "aria-multiselectable": true },
|
|
38
39
|
ref: domRef,
|
|
@@ -40,7 +41,7 @@ function MenuInnerRender(props, ref) {
|
|
|
40
41
|
}
|
|
41
42
|
);
|
|
42
43
|
}
|
|
43
|
-
const
|
|
44
|
+
const MenuList = forwardRef(MenuListRender);
|
|
44
45
|
export {
|
|
45
|
-
|
|
46
|
+
MenuList
|
|
46
47
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MenuList';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useMenuSection } from "@koobiq/react-primitives";
|
|
4
|
-
import
|
|
4
|
+
import { utilClasses } from "../../../../styles/utility.js";
|
|
5
5
|
import { MenuItem } from "../MenuItem/MenuItem.js";
|
|
6
6
|
import { Typography } from "../../../Typography/Typography.js";
|
|
7
|
+
const { listHeading } = utilClasses;
|
|
7
8
|
function MenuSection({ section, state }) {
|
|
8
9
|
const { itemProps, headingProps, groupProps } = useMenuSection({
|
|
9
10
|
heading: section.rendered,
|
|
@@ -17,12 +18,12 @@ function MenuSection({ section, state }) {
|
|
|
17
18
|
display: "block",
|
|
18
19
|
variant: "caps-compact-strong",
|
|
19
20
|
color: "contrast-secondary",
|
|
20
|
-
className:
|
|
21
|
+
className: listHeading,
|
|
21
22
|
...headingProps,
|
|
22
23
|
children: section.rendered
|
|
23
24
|
}
|
|
24
25
|
),
|
|
25
|
-
/* @__PURE__ */ jsx("ul", { ...groupProps,
|
|
26
|
+
/* @__PURE__ */ jsx("ul", { ...groupProps, children: [...section.childNodes].map((node) => /* @__PURE__ */ jsx(MenuItem, { item: node, state }, node.key)) })
|
|
26
27
|
] });
|
|
27
28
|
}
|
|
28
29
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './MenuList';
|
|
@@ -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,
|
|
@@ -85,14 +86,14 @@ function SelectRender(props, ref) {
|
|
|
85
86
|
style
|
|
86
87
|
});
|
|
87
88
|
const listProps = mergeProps(
|
|
88
|
-
{ className: s.list, state },
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
{ className: s.list, state, noItemsText },
|
|
90
|
+
menuProps,
|
|
91
|
+
slotProps?.list
|
|
91
92
|
);
|
|
92
93
|
const labelProps = mergeProps(
|
|
93
94
|
{ isHidden: isLabelHidden, children: label, isRequired },
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
labelPropsAria,
|
|
96
|
+
slotProps?.label
|
|
96
97
|
);
|
|
97
98
|
const clearButtonProps = mergeProps(
|
|
98
99
|
{
|
|
@@ -150,7 +151,7 @@ function SelectRender(props, ref) {
|
|
|
150
151
|
const captionProps = mergeProps({ children: caption }, slotProps?.caption, descriptionProps);
|
|
151
152
|
const errorProps = mergeProps({ children: errorMessage }, slotProps?.errorMessage, errorMessageProps);
|
|
152
153
|
const renderDefaultValue = (state2, states) => {
|
|
153
|
-
if (!state2.selectedItems) return null;
|
|
154
|
+
if (!state2.selectedItems?.length) return null;
|
|
154
155
|
if (selectionMode === "multiple")
|
|
155
156
|
return /* @__PURE__ */ jsx(
|
|
156
157
|
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
|
-
|
|
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
|
|
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 {
|
|
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, {
|
|
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__ */
|
|
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
|
|
2
|
+
const empty = "kbq-selectlist-empty-e6a9b0";
|
|
3
3
|
const s = {
|
|
4
4
|
label,
|
|
5
|
-
|
|
5
|
+
empty
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
8
8
|
s as default,
|
|
9
|
-
|
|
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?:
|
|
86
|
+
list?: Omit<SelectListProps<object>, 'state'>;
|
|
85
87
|
control?: FieldSelectProps;
|
|
86
88
|
caption?: FieldCaptionProps;
|
|
87
89
|
group?: FieldContentGroupProps;
|
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
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
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-
|
|
3309
|
-
|
|
3310
|
-
|
|
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-
|
|
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: ;
|
package/dist/styles/utility.d.ts
CHANGED
package/dist/styles/utility.js
CHANGED
|
@@ -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,
|
package/dist/utils/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koobiq/react-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.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/
|
|
32
|
-
"@koobiq/
|
|
33
|
-
"@koobiq/react-icons": "0.
|
|
34
|
-
"@koobiq/react-primitives": "0.
|
|
31
|
+
"@koobiq/react-core": "0.10.0",
|
|
32
|
+
"@koobiq/logger": "0.10.0",
|
|
33
|
+
"@koobiq/react-icons": "0.10.0",
|
|
34
|
+
"@koobiq/react-primitives": "0.10.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@koobiq/design-tokens": "^3.14.0",
|
|
@@ -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 +0,0 @@
|
|
|
1
|
-
export * from './MenuInner';
|
/package/dist/{components/FieldComponents/FieldSelect/utils.d.ts → utils/isPrimitiveNode.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|