@koobiq/react-components 0.0.1-beta.1 → 0.0.1-beta.2
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/README.md +14 -31
- package/dist/components/List/List.d.ts +4 -0
- package/dist/components/List/List.js +41 -0
- package/dist/components/List/List.module.css.js +11 -0
- package/dist/components/List/ListItem.d.ts +11 -0
- package/dist/components/List/ListItem.js +11 -0
- package/dist/components/List/ListSection.d.ts +16 -0
- package/dist/components/List/ListSection.js +11 -0
- package/dist/components/List/components/ListItemText/ListItemText.d.ts +16 -0
- package/dist/components/List/components/ListItemText/index.d.ts +1 -0
- package/dist/components/List/components/ListOption/ListOption.d.ts +5 -0
- package/dist/components/List/components/ListOption/ListOption.js +44 -0
- package/dist/components/List/components/ListOption/ListOption.module.css.js +23 -0
- package/dist/components/List/components/ListOption/index.d.ts +1 -0
- package/dist/components/List/components/ListSection/ListSection.d.ts +5 -0
- package/dist/components/List/components/ListSection/ListSection.js +33 -0
- package/dist/components/List/components/ListSection/ListSection.module.css.js +11 -0
- package/dist/components/List/components/ListSection/index.d.ts +1 -0
- package/dist/components/List/components/index.d.ts +3 -0
- package/dist/components/List/index.d.ts +4 -0
- package/dist/components/List/types.d.ts +42 -0
- package/dist/components/List/types.js +4 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +9 -0
- package/dist/style.css +81 -0
- package/dist/types.d.ts +1 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,43 +1,26 @@
|
|
|
1
1
|
# @koobiq/react-components
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Koobiq React is an open-source design system for designers and developers, focused on designing products related to information security.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
pnpm add @koobiq/design-tokens @koobiq/react-components
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
### Usage
|
|
7
|
+
Depending on your preference, run one of the following in your terminal:
|
|
12
8
|
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import '@koobiq/design-tokens/web/css-tokens-dark.css';
|
|
17
|
-
import '@koobiq/react-components/style.css';
|
|
9
|
+
```sh
|
|
10
|
+
# With npm
|
|
11
|
+
npm install @koobiq/react-components
|
|
18
12
|
|
|
19
|
-
|
|
13
|
+
# With yarn
|
|
14
|
+
yarn add @koobiq/react-components
|
|
20
15
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
16
|
+
# With pnpm
|
|
17
|
+
yarn add @koobiq/react-components
|
|
24
18
|
```
|
|
25
19
|
|
|
26
|
-
##
|
|
27
|
-
|
|
28
|
-
[Check compatible browsers](https://browsersl.ist/#q=defaults+and+supports+es6-module%2C%0A++++chrome+%3E+88%2C%0A++++safari+%3E+14%2C%0A++++firefox+%3E+78%2C%0A++++opera+%3E+75%2C%0A++++edge+%3E+88)
|
|
20
|
+
## Usage
|
|
29
21
|
|
|
30
|
-
|
|
22
|
+
To get started with the library, read [the documentation](https://react.koobiq.io/).
|
|
31
23
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- Clone the repository and navigate to the created directory.
|
|
35
|
-
- Run the command `pnpm dev` in the terminal.
|
|
36
|
-
|
|
37
|
-
Documentation will be available at [http://localhost:6006](http://localhost:6006).
|
|
38
|
-
All development is conducted there. For convenience, you can go directly to the page of the component you are working on.
|
|
39
|
-
|
|
40
|
-
### Prerequisites
|
|
24
|
+
## Browser Support
|
|
41
25
|
|
|
42
|
-
|
|
43
|
-
- pnpm v9
|
|
26
|
+
[Check compatible browsers](https://browsersl.ist/#q=defaults+and+supports+es6-module%2C%0A++++chrome+%3E+105%2C%0A++++safari+%3E+15.4%2C%0A++++firefox+%3E+121%2C%0A++++opera+%3E+91%2C%0A++++edge+%3E+105)
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Ref } from 'react';
|
|
2
|
+
import type { ListComponent, ListProps, ListRef } from './types';
|
|
3
|
+
export declare function ListRender<T extends object>(props: ListProps<T>, ref: Ref<ListRef>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const List: ListComponent;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { useDOMRef, mergeProps, clsx, isNotNil } from "@koobiq/react-core";
|
|
5
|
+
import { useListState, useListBox } from "@koobiq/react-primitives";
|
|
6
|
+
import s from "./List.module.css.js";
|
|
7
|
+
import { ListSection } from "./components/ListSection/ListSection.js";
|
|
8
|
+
import { Typography } from "../Typography/Typography.js";
|
|
9
|
+
import { ListOption } from "./components/ListOption/ListOption.js";
|
|
10
|
+
function ListRender(props, ref) {
|
|
11
|
+
const { className, label } = props;
|
|
12
|
+
const domRef = useDOMRef(ref);
|
|
13
|
+
const state = useListState(props);
|
|
14
|
+
const { listBoxProps, labelProps } = useListBox(props, state, domRef);
|
|
15
|
+
const listProps = mergeProps(
|
|
16
|
+
{
|
|
17
|
+
className: clsx(s.base, className),
|
|
18
|
+
ref: domRef
|
|
19
|
+
},
|
|
20
|
+
listBoxProps
|
|
21
|
+
);
|
|
22
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23
|
+
isNotNil(label) && /* @__PURE__ */ jsx(
|
|
24
|
+
Typography,
|
|
25
|
+
{
|
|
26
|
+
variant: "text-normal-strong",
|
|
27
|
+
className: s.label,
|
|
28
|
+
...labelProps,
|
|
29
|
+
children: label
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ jsx("ul", { ...listProps, children: [...state.collection].map(
|
|
33
|
+
(item) => item.type === "section" ? /* @__PURE__ */ jsx(ListSection, { section: item, state }, item.key) : /* @__PURE__ */ jsx(ListOption, { item, state }, item.key)
|
|
34
|
+
) })
|
|
35
|
+
] });
|
|
36
|
+
}
|
|
37
|
+
const List = forwardRef(ListRender);
|
|
38
|
+
export {
|
|
39
|
+
List,
|
|
40
|
+
ListRender
|
|
41
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode, ComponentProps } from 'react';
|
|
2
|
+
export type ListItemProps = {
|
|
3
|
+
/** Rendered contents of the item or child items. */
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
/** Rendered contents of the item if `children` contains child items. */
|
|
6
|
+
title?: ReactNode;
|
|
7
|
+
} & ComponentProps<'a'>;
|
|
8
|
+
export declare function ListItem(props: ListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare namespace ListItem {
|
|
10
|
+
var getCollectionNode: unknown;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Item } from "@koobiq/react-primitives";
|
|
4
|
+
const ItemInner = Item;
|
|
5
|
+
function ListItem(props) {
|
|
6
|
+
return /* @__PURE__ */ jsx(Item, { ...props });
|
|
7
|
+
}
|
|
8
|
+
ListItem.getCollectionNode = ItemInner.getCollectionNode;
|
|
9
|
+
export {
|
|
10
|
+
ListItem
|
|
11
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { SectionProps } from '@koobiq/react-primitives';
|
|
3
|
+
export type ListSectionProps<T> = {
|
|
4
|
+
/** Rendered contents of the section, e.g. a header. */
|
|
5
|
+
title?: ReactNode;
|
|
6
|
+
/** An accessibility label for the section. */
|
|
7
|
+
'aria-label'?: string;
|
|
8
|
+
/** Static child items or a function to render children. */
|
|
9
|
+
children: SectionProps<T>['children'];
|
|
10
|
+
/** Item objects in the section. */
|
|
11
|
+
items?: SectionProps<T>['items'];
|
|
12
|
+
};
|
|
13
|
+
export declare function ListSection<T>(props: ListSectionProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare namespace ListSection {
|
|
15
|
+
var getCollectionNode: unknown;
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Section } from "@koobiq/react-primitives";
|
|
4
|
+
const SectionInner = Section;
|
|
5
|
+
function ListSection(props) {
|
|
6
|
+
return /* @__PURE__ */ jsx(Section, { ...props });
|
|
7
|
+
}
|
|
8
|
+
ListSection.getCollectionNode = SectionInner.getCollectionNode;
|
|
9
|
+
export {
|
|
10
|
+
ListSection
|
|
11
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ComponentRef, ReactNode } from 'react';
|
|
2
|
+
import type { ExtendableComponentPropsWithRef, DataAttributeProps } from '@koobiq/react-core';
|
|
3
|
+
import type { TypographyProps } from '../../../Typography';
|
|
4
|
+
export type ListItemTextRef = ComponentRef<'div'>;
|
|
5
|
+
export type ListItemTextProps = ExtendableComponentPropsWithRef<{
|
|
6
|
+
/** The content of the component. */
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
/** The helper text content. */
|
|
9
|
+
caption?: ReactNode;
|
|
10
|
+
/** The props used for each slot inside. */
|
|
11
|
+
slotProps?: {
|
|
12
|
+
text?: TypographyProps;
|
|
13
|
+
caption?: TypographyProps;
|
|
14
|
+
};
|
|
15
|
+
} & DataAttributeProps, 'div'>;
|
|
16
|
+
export declare const ListItemText: import("react").ForwardRefExoticComponent<Omit<ListItemTextProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ListItemText';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useRef } from "react";
|
|
4
|
+
import { useHover, usePress, mergeProps, clsx } from "@koobiq/react-core";
|
|
5
|
+
import { useOption } from "@koobiq/react-primitives";
|
|
6
|
+
import { utilClasses } from "../../../../styles/utility.js";
|
|
7
|
+
import s from "./ListOption.module.css.js";
|
|
8
|
+
const textVariant = utilClasses.typography;
|
|
9
|
+
function ListOption({
|
|
10
|
+
item,
|
|
11
|
+
state
|
|
12
|
+
}) {
|
|
13
|
+
const ref = useRef(null);
|
|
14
|
+
const {
|
|
15
|
+
optionProps,
|
|
16
|
+
isSelected: selected,
|
|
17
|
+
isDisabled: disabled,
|
|
18
|
+
isFocusVisible: focusVisible
|
|
19
|
+
} = useOption({ key: item.key }, state, ref);
|
|
20
|
+
const { hoverProps, isHovered: hovered } = useHover({ isDisabled: disabled });
|
|
21
|
+
const { isPressed: pressed, pressProps } = usePress({ isDisabled: disabled });
|
|
22
|
+
const Tag = item.props.href ? "a" : "li";
|
|
23
|
+
return /* @__PURE__ */ jsx(
|
|
24
|
+
Tag,
|
|
25
|
+
{
|
|
26
|
+
...mergeProps(optionProps, hoverProps, pressProps),
|
|
27
|
+
className: clsx(
|
|
28
|
+
s.base,
|
|
29
|
+
hovered && s.hovered,
|
|
30
|
+
pressed && s.pressed,
|
|
31
|
+
selected && s.selected,
|
|
32
|
+
textVariant["text-normal"],
|
|
33
|
+
disabled && s.disabled,
|
|
34
|
+
focusVisible && s.focusVisible
|
|
35
|
+
),
|
|
36
|
+
ref,
|
|
37
|
+
"data-focus-visible": focusVisible,
|
|
38
|
+
children: item.rendered
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
ListOption
|
|
44
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const base = "kbq-listoption-8693c5";
|
|
2
|
+
const hovered = "kbq-listoption-hovered-163e16";
|
|
3
|
+
const pressed = "kbq-listoption-pressed-292310";
|
|
4
|
+
const focusVisible = "kbq-listoption-focusVisible-dcff25";
|
|
5
|
+
const selected = "kbq-listoption-selected-012293";
|
|
6
|
+
const disabled = "kbq-listoption-disabled-dafd94";
|
|
7
|
+
const s = {
|
|
8
|
+
base,
|
|
9
|
+
hovered,
|
|
10
|
+
pressed,
|
|
11
|
+
focusVisible,
|
|
12
|
+
selected,
|
|
13
|
+
disabled
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
base,
|
|
17
|
+
s as default,
|
|
18
|
+
disabled,
|
|
19
|
+
focusVisible,
|
|
20
|
+
hovered,
|
|
21
|
+
pressed,
|
|
22
|
+
selected
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ListOption';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useListBoxSection } from "@koobiq/react-primitives";
|
|
4
|
+
import s from "./ListSection.module.css.js";
|
|
5
|
+
import { ListOption } from "../ListOption/ListOption.js";
|
|
6
|
+
import { Typography } from "../../../Typography/Typography.js";
|
|
7
|
+
function ListSection({
|
|
8
|
+
section,
|
|
9
|
+
state
|
|
10
|
+
}) {
|
|
11
|
+
const { itemProps, headingProps, groupProps } = useListBoxSection({
|
|
12
|
+
heading: section.rendered,
|
|
13
|
+
"aria-label": section["aria-label"]
|
|
14
|
+
});
|
|
15
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("li", { ...itemProps, children: [
|
|
16
|
+
section.rendered && /* @__PURE__ */ jsx(
|
|
17
|
+
Typography,
|
|
18
|
+
{
|
|
19
|
+
as: "span",
|
|
20
|
+
display: "block",
|
|
21
|
+
variant: "caps-compact-strong",
|
|
22
|
+
color: "contrast-secondary",
|
|
23
|
+
className: s.heading,
|
|
24
|
+
...headingProps,
|
|
25
|
+
children: section.rendered
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ jsx("ul", { ...groupProps, className: s.base, children: [...section.childNodes].map((node) => /* @__PURE__ */ jsx(ListOption, { item: node, state }, node.key)) })
|
|
29
|
+
] }) });
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
ListSection
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ListSection';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ComponentRef, ReactElement, ReactNode, Ref } from 'react';
|
|
2
|
+
import type { AriaListBoxProps } from '@koobiq/react-primitives';
|
|
3
|
+
export declare const listPropSelectionMode: readonly ["none", "single", "multiple"];
|
|
4
|
+
export type ListPropSelectionMode = (typeof listPropSelectionMode)[number];
|
|
5
|
+
export type ListPropItems<T extends object> = AriaListBoxProps<T>['items'];
|
|
6
|
+
export type ListPropChildren<T extends object> = AriaListBoxProps<T>['children'];
|
|
7
|
+
export type ListPropSelectedKeys<T extends object> = AriaListBoxProps<T>['selectedKeys'];
|
|
8
|
+
export type ListPropDefaultSelectedKeys<T extends object> = AriaListBoxProps<T>['defaultSelectedKeys'];
|
|
9
|
+
export type ListPropDisabledKeys<T extends object> = AriaListBoxProps<T>['disabledKeys'];
|
|
10
|
+
export type ListPropOnSelectionChange<T extends object> = AriaListBoxProps<T>['onSelectionChange'];
|
|
11
|
+
export type ListPropOnAction<T extends object> = AriaListBoxProps<T>['onAction'];
|
|
12
|
+
export type ListPropSelectionBehavior<T extends object> = AriaListBoxProps<T>['selectionBehavior'];
|
|
13
|
+
export type ListBaseProps<T extends object> = {
|
|
14
|
+
label?: ReactNode;
|
|
15
|
+
/** Additional CSS-classes. */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** The type of selection that is allowed in the collection. */
|
|
18
|
+
selectionMode?: ListPropSelectionMode;
|
|
19
|
+
ref?: Ref<HTMLElement>;
|
|
20
|
+
/** The contents of the collection. */
|
|
21
|
+
children?: ListPropChildren<T>;
|
|
22
|
+
/** Item objects in the collection. */
|
|
23
|
+
items?: ListPropItems<T>;
|
|
24
|
+
/** The currently selected keys in the collection (controlled). */
|
|
25
|
+
selectedKeys?: ListPropSelectedKeys<T>;
|
|
26
|
+
/** The item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with. */
|
|
27
|
+
disabledKeys?: ListPropDisabledKeys<T>;
|
|
28
|
+
/** The initial selected keys in the collection (uncontrolled). */
|
|
29
|
+
defaultSelectedKeys?: ListPropDefaultSelectedKeys<T>;
|
|
30
|
+
/** Handler that is called when the selection changes. */
|
|
31
|
+
onSelectionChange?: ListPropOnSelectionChange<T>;
|
|
32
|
+
/**
|
|
33
|
+
* Handler that is called when a user performs an action on an item. The exact user event depends on
|
|
34
|
+
* the collection's `selectionBehavior` prop and the interaction modality.
|
|
35
|
+
*/
|
|
36
|
+
onAction?: ListPropOnAction<T>;
|
|
37
|
+
/** How multiple selection should behave in the collection. */
|
|
38
|
+
selectionBehavior?: ListPropSelectionBehavior<T>;
|
|
39
|
+
};
|
|
40
|
+
export type ListProps<T extends object> = ListBaseProps<T>;
|
|
41
|
+
export type ListRef = ComponentRef<'ul'>;
|
|
42
|
+
export type ListComponent = <T extends object>(props: ListProps<T>) => ReactElement | null;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -53,6 +53,10 @@ import { Popover } from "./components/Popover/Popover.js";
|
|
|
53
53
|
import { popoverPropPlacement, popoverPropSize } from "./components/Popover/types.js";
|
|
54
54
|
import { Tooltip } from "./components/Tooltip/Tooltip.js";
|
|
55
55
|
import { tooltipPropPlacement, tooltipPropVariant } from "./components/Tooltip/types.js";
|
|
56
|
+
import { List, ListRender } from "./components/List/List.js";
|
|
57
|
+
import { listPropSelectionMode } from "./components/List/types.js";
|
|
58
|
+
import { ListItem } from "./components/List/ListItem.js";
|
|
59
|
+
import { ListSection } from "./components/List/ListSection.js";
|
|
56
60
|
import { flex, flexPropAlignItems, flexPropDirection, flexPropFlex, flexPropGap, flexPropJustifyContent, flexPropOrder, flexPropWrap } from "./components/layout/flex/flex.js";
|
|
57
61
|
import { spacing, spacingGap } from "./components/layout/spacing/spacing.js";
|
|
58
62
|
export {
|
|
@@ -72,6 +76,10 @@ export {
|
|
|
72
76
|
Input,
|
|
73
77
|
InputNumber,
|
|
74
78
|
Link,
|
|
79
|
+
List,
|
|
80
|
+
ListItem,
|
|
81
|
+
ListRender,
|
|
82
|
+
ListSection,
|
|
75
83
|
Modal,
|
|
76
84
|
DialogContent2 as ModalContent,
|
|
77
85
|
DialogFooter2 as ModalFooter,
|
|
@@ -121,6 +129,7 @@ export {
|
|
|
121
129
|
iconButtonPropVariant,
|
|
122
130
|
inputNumberPropVariant,
|
|
123
131
|
inputPropVariant,
|
|
132
|
+
listPropSelectionMode,
|
|
124
133
|
modalPropSize,
|
|
125
134
|
popoverPropPlacement,
|
|
126
135
|
popoverPropSize,
|
package/dist/style.css
CHANGED
|
@@ -2848,6 +2848,87 @@
|
|
|
2848
2848
|
opacity: 0;
|
|
2849
2849
|
transform: var(--popover-transform);
|
|
2850
2850
|
}
|
|
2851
|
+
.kbq-list-928929 {
|
|
2852
|
+
margin: 0;
|
|
2853
|
+
padding: 0;
|
|
2854
|
+
list-style: none;
|
|
2855
|
+
overflow: auto;
|
|
2856
|
+
}
|
|
2857
|
+
|
|
2858
|
+
.kbq-list-label-e4431c {
|
|
2859
|
+
padding: var(--kbq-size-xs) var(--kbq-size-m);
|
|
2860
|
+
}
|
|
2861
|
+
.kbq-listsection-d94a57 {
|
|
2862
|
+
margin: 0;
|
|
2863
|
+
padding: 0;
|
|
2864
|
+
list-style: none;
|
|
2865
|
+
overflow: auto;
|
|
2866
|
+
}
|
|
2867
|
+
|
|
2868
|
+
.kbq-listsection-heading-5bd9e3 {
|
|
2869
|
+
padding: var(--kbq-size-s) var(--kbq-size-m);
|
|
2870
|
+
}
|
|
2871
|
+
.kbq-listoption-8693c5 {
|
|
2872
|
+
--list-item-bg-color: ;
|
|
2873
|
+
--list-item-outline-color: transparent;
|
|
2874
|
+
--list-item-outline-width: var(--kbq-size-3xs);
|
|
2875
|
+
cursor: pointer;
|
|
2876
|
+
gap: var(--kbq-size-s);
|
|
2877
|
+
border-radius: var(--kbq-size-s);
|
|
2878
|
+
color: var(--kbq-foreground-contrast);
|
|
2879
|
+
background-color: var(--list-item-bg-color);
|
|
2880
|
+
padding: var(--kbq-size-xs) var(--kbq-size-m);
|
|
2881
|
+
outline-offset: calc(-1 * var(--list-item-outline-width));
|
|
2882
|
+
outline: var(--list-item-outline-width) solid var(--list-item-outline-color);
|
|
2883
|
+
transition: border-color var(--kbq-transition-default), border-radius var(--kbq-transition-default), background-color var(--kbq-transition-default), color var(--kbq-transition-default);
|
|
2884
|
+
flex-shrink: 0;
|
|
2885
|
+
text-decoration: none;
|
|
2886
|
+
display: flex;
|
|
2887
|
+
}
|
|
2888
|
+
|
|
2889
|
+
.kbq-listoption-hovered-163e16 {
|
|
2890
|
+
--list-item-bg-color: var(--kbq-states-background-transparent-hover);
|
|
2891
|
+
}
|
|
2892
|
+
|
|
2893
|
+
.kbq-listoption-pressed-292310 {
|
|
2894
|
+
--list-item-bg-color: var(--kbq-states-background-transparent-active);
|
|
2895
|
+
}
|
|
2896
|
+
|
|
2897
|
+
.kbq-listoption-focusVisible-dcff25 {
|
|
2898
|
+
--list-item-outline-color: var(--kbq-states-line-focus-theme);
|
|
2899
|
+
}
|
|
2900
|
+
|
|
2901
|
+
.kbq-listoption-selected-012293 {
|
|
2902
|
+
--list-item-bg-color: var(--kbq-background-theme-less);
|
|
2903
|
+
}
|
|
2904
|
+
|
|
2905
|
+
.kbq-listoption-selected-012293:where(.kbq-listoption-hovered-163e16) {
|
|
2906
|
+
--list-item-bg-color: var(--kbq-states-background-theme-less-hover);
|
|
2907
|
+
}
|
|
2908
|
+
|
|
2909
|
+
.kbq-listoption-selected-012293:where(.kbq-listoption-pressed-292310) {
|
|
2910
|
+
--list-item-bg-color: var(--kbq-states-background-theme-less-active);
|
|
2911
|
+
}
|
|
2912
|
+
|
|
2913
|
+
.kbq-listoption-disabled-dafd94 {
|
|
2914
|
+
--list-item-bg-color: ;
|
|
2915
|
+
cursor: default;
|
|
2916
|
+
opacity: .3;
|
|
2917
|
+
}
|
|
2918
|
+
|
|
2919
|
+
.kbq-listoption-selected-012293:where(.kbq-listoption-disabled-dafd94) {
|
|
2920
|
+
--list-item-bg-color: var(--kbq-background-theme-less);
|
|
2921
|
+
}
|
|
2922
|
+
|
|
2923
|
+
[aria-multiselectable] :is(.kbq-listoption-selected-012293, .kbq-listoption-focusVisible-dcff25):has( + :is(.kbq-listoption-selected-012293, .kbq-listoption-focusVisible-dcff25)) {
|
|
2924
|
+
border-end-end-radius: 0;
|
|
2925
|
+
border-end-start-radius: 0;
|
|
2926
|
+
}
|
|
2927
|
+
|
|
2928
|
+
[aria-multiselectable] :is(.kbq-listoption-selected-012293, .kbq-listoption-focusVisible-dcff25) + :is(.kbq-listoption-selected-012293, .kbq-listoption-focusVisible-dcff25) {
|
|
2929
|
+
border-start-start-radius: 0;
|
|
2930
|
+
border-start-end-radius: 0;
|
|
2931
|
+
}
|
|
2851
2932
|
.kbq-spacing-mbs_0-be7021 {
|
|
2852
2933
|
margin-block-start: 0;
|
|
2853
2934
|
}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Selection = 'all' | Set<string | number>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koobiq/react-components",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.2",
|
|
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.11.2",
|
|
23
23
|
"@types/react-transition-group": "^4.4.12",
|
|
24
24
|
"react-transition-group": "^4.4.5",
|
|
25
|
-
"@koobiq/
|
|
26
|
-
"@koobiq/react-
|
|
27
|
-
"@koobiq/
|
|
28
|
-
"@koobiq/react-
|
|
25
|
+
"@koobiq/logger": "0.0.1-beta.2",
|
|
26
|
+
"@koobiq/react-icons": "0.0.1-beta.2",
|
|
27
|
+
"@koobiq/react-primitives": "0.0.1-beta.2",
|
|
28
|
+
"@koobiq/react-core": "0.0.1-beta.2"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"@koobiq/design-tokens": "^3.11.2",
|