@koobiq/react-components 0.25.0 → 0.26.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/ActionsPanel/ActionPanel.module.css.js +17 -0
- package/dist/components/ActionsPanel/ActionsPanel.d.ts +11 -0
- package/dist/components/ActionsPanel/ActionsPanel.js +170 -0
- package/dist/components/ActionsPanel/ActionsPanelContext.d.ts +3 -0
- package/dist/components/ActionsPanel/ActionsPanelContext.js +6 -0
- package/dist/components/ActionsPanel/components/ActionsPanelAction/ActionsPanelAction.d.ts +2 -0
- package/dist/components/ActionsPanel/components/ActionsPanelAction/ActionsPanelAction.js +22 -0
- package/dist/components/ActionsPanel/components/ActionsPanelAction/ActionsPanelAction.module.css.js +8 -0
- package/dist/components/ActionsPanel/components/ActionsPanelAction/index.d.ts +2 -0
- package/dist/components/ActionsPanel/components/ActionsPanelAction/types.d.ts +5 -0
- package/dist/components/ActionsPanel/components/ActionsPanelClearButton/ActionsPanelClearButton.d.ts +5 -0
- package/dist/components/ActionsPanel/components/ActionsPanelClearButton/ActionsPanelClearButton.js +30 -0
- package/dist/components/ActionsPanel/components/ActionsPanelClearButton/ActionsPanelClearButton.module.css.js +8 -0
- package/dist/components/ActionsPanel/components/ActionsPanelClearButton/index.d.ts +1 -0
- package/dist/components/ActionsPanel/components/ActionsPanelContainer/ActionPanelContainer.module.css.js +11 -0
- package/dist/components/ActionsPanel/components/ActionsPanelContainer/ActionsPanelContainer.d.ts +2 -0
- package/dist/components/ActionsPanel/components/ActionsPanelContainer/ActionsPanelContainer.js +32 -0
- package/dist/components/ActionsPanel/components/ActionsPanelContainer/index.d.ts +2 -0
- package/dist/components/ActionsPanel/components/ActionsPanelContainer/types.d.ts +5 -0
- package/dist/components/ActionsPanel/components/ActionsPanelCounter/ActionsPanelCounter.d.ts +6 -0
- package/dist/components/ActionsPanel/components/ActionsPanelCounter/ActionsPanelCounter.js +44 -0
- package/dist/components/ActionsPanel/components/ActionsPanelCounter/ActionsPanelCounter.module.css.js +17 -0
- package/dist/components/ActionsPanel/components/ActionsPanelCounter/index.d.ts +1 -0
- package/dist/components/ActionsPanel/components/ActionsPanelDivider/ActionsPanelDivider.d.ts +3 -0
- package/dist/components/ActionsPanel/components/ActionsPanelDivider/ActionsPanelDivider.js +18 -0
- package/dist/components/ActionsPanel/components/ActionsPanelDivider/ActionsPanelDivider.module.css.js +8 -0
- package/dist/components/ActionsPanel/components/ActionsPanelDivider/index.d.ts +1 -0
- package/dist/components/ActionsPanel/components/ActionsPanelMoreAction/ActionsPanelMoreAction.d.ts +2 -0
- package/dist/components/ActionsPanel/components/ActionsPanelMoreAction/ActionsPanelMoreAction.js +72 -0
- package/dist/components/ActionsPanel/components/ActionsPanelMoreAction/ActionsPanelMoreAction.module.css.js +14 -0
- package/dist/components/ActionsPanel/components/ActionsPanelMoreAction/index.d.ts +2 -0
- package/dist/components/ActionsPanel/components/ActionsPanelMoreAction/types.d.ts +9 -0
- package/dist/components/ActionsPanel/components/index.d.ts +4 -0
- package/dist/components/ActionsPanel/hooks/index.d.ts +1 -0
- package/dist/components/ActionsPanel/hooks/useInlinePaddingSize.d.ts +6 -0
- package/dist/components/ActionsPanel/hooks/useInlinePaddingSize.js +17 -0
- package/dist/components/ActionsPanel/index.d.ts +5 -0
- package/dist/components/ActionsPanel/intl.json.js +7 -0
- package/dist/components/ActionsPanel/types.d.ts +47 -0
- package/dist/components/Breadcrumbs/components/BreadcrumbsCollapse/BreadcrumbsCollapse.js +9 -5
- package/dist/components/Breadcrumbs/intl.json.js +7 -0
- package/dist/components/Breadcrumbs/types.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.js +6 -0
- package/dist/style.css +154 -6
- package/package.json +5 -5
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const base = "kbq-actionpanel-f0ec9d";
|
|
2
|
+
const container = "kbq-actionpanel-container-b084cf";
|
|
3
|
+
const actions = "kbq-actionpanel-actions-0c0847";
|
|
4
|
+
const more = "kbq-actionpanel-more-1622be";
|
|
5
|
+
const s = {
|
|
6
|
+
base,
|
|
7
|
+
container,
|
|
8
|
+
actions,
|
|
9
|
+
more
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
actions,
|
|
13
|
+
base,
|
|
14
|
+
container,
|
|
15
|
+
s as default,
|
|
16
|
+
more
|
|
17
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ActionsPanelAction } from './components';
|
|
2
|
+
import type { ActionsPanelProps } from './index';
|
|
3
|
+
declare const ActionsPanelComponent: {
|
|
4
|
+
(props: ActionsPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
type CompoundedComponent = typeof ActionsPanelComponent & {
|
|
8
|
+
Action: typeof ActionsPanelAction;
|
|
9
|
+
};
|
|
10
|
+
export declare const ActionsPanel: CompoundedComponent;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useRef, useState, useEffect, Children, cloneElement } from "react";
|
|
4
|
+
import { useElementSize, useHideOverflowItems, mergeProps, useMultiRef } from "@koobiq/react-core";
|
|
5
|
+
import { useContextProps, useToolbar, useOverlayTriggerState, useOverlay, Overlay } from "@koobiq/react-primitives";
|
|
6
|
+
import { Transition } from "react-transition-group";
|
|
7
|
+
import s from "./ActionPanel.module.css.js";
|
|
8
|
+
import { ActionsPanelContext } from "./ActionsPanelContext.js";
|
|
9
|
+
import { useInlinePaddingSize } from "./hooks/useInlinePaddingSize.js";
|
|
10
|
+
import { ActionsPanelAction } from "./components/ActionsPanelAction/ActionsPanelAction.js";
|
|
11
|
+
import { ActionsPanelCounter } from "./components/ActionsPanelCounter/ActionsPanelCounter.js";
|
|
12
|
+
import { ActionsPanelMoreAction } from "./components/ActionsPanelMoreAction/ActionsPanelMoreAction.js";
|
|
13
|
+
import { ActionsPanelClearButton } from "./components/ActionsPanelClearButton/ActionsPanelClearButton.js";
|
|
14
|
+
const ActionsPanelComponent = (props) => {
|
|
15
|
+
const [panelProps, panelRef] = useContextProps(
|
|
16
|
+
props,
|
|
17
|
+
props.ref,
|
|
18
|
+
ActionsPanelContext
|
|
19
|
+
);
|
|
20
|
+
const {
|
|
21
|
+
children,
|
|
22
|
+
onAction,
|
|
23
|
+
slotProps,
|
|
24
|
+
onClearSelection,
|
|
25
|
+
selectedItemCount,
|
|
26
|
+
selectedExtraCount,
|
|
27
|
+
portalContainer,
|
|
28
|
+
disableExitOnEscapeKeyDown,
|
|
29
|
+
...other
|
|
30
|
+
} = panelProps;
|
|
31
|
+
const overlayRef = useRef(null);
|
|
32
|
+
const actionsRef = useRef(null);
|
|
33
|
+
const actionsInlinePadding = useInlinePaddingSize(actionsRef);
|
|
34
|
+
const [shownCount, setShownCount] = useState(selectedItemCount);
|
|
35
|
+
const { toolbarProps } = useToolbar({ orientation: "horizontal" }, panelRef);
|
|
36
|
+
const { ref: clearBtnRef, width: clearBtnWidth } = useElementSize();
|
|
37
|
+
const state = useOverlayTriggerState({
|
|
38
|
+
isOpen: !!selectedItemCount,
|
|
39
|
+
onOpenChange: onClearSelection
|
|
40
|
+
});
|
|
41
|
+
const { isOpen: isOpenState, close } = state;
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
if (isOpenState) {
|
|
44
|
+
setShownCount(selectedItemCount);
|
|
45
|
+
}
|
|
46
|
+
}, [isOpenState, selectedItemCount]);
|
|
47
|
+
const elements = [];
|
|
48
|
+
const elementKeys = [];
|
|
49
|
+
Children.forEach(children, (child) => {
|
|
50
|
+
if (!child || typeof child !== "object") return;
|
|
51
|
+
const el = child;
|
|
52
|
+
elements.push(el);
|
|
53
|
+
elementKeys.push(el.key);
|
|
54
|
+
});
|
|
55
|
+
const { length } = elements;
|
|
56
|
+
const { parentRef, visibleMap, itemsRefs } = useHideOverflowItems({
|
|
57
|
+
length: length + 2,
|
|
58
|
+
busy: clearBtnWidth + actionsInlinePadding,
|
|
59
|
+
deps: [isOpenState, clearBtnWidth, actionsInlinePadding]
|
|
60
|
+
});
|
|
61
|
+
const counterIndex = length;
|
|
62
|
+
const moreIndex = length + 1;
|
|
63
|
+
const { overlayProps } = useOverlay(
|
|
64
|
+
{
|
|
65
|
+
onClose: close,
|
|
66
|
+
isOpen: isOpenState,
|
|
67
|
+
isKeyboardDismissDisabled: disableExitOnEscapeKeyDown
|
|
68
|
+
},
|
|
69
|
+
overlayRef
|
|
70
|
+
);
|
|
71
|
+
const transitionProps = mergeProps(
|
|
72
|
+
{
|
|
73
|
+
timeout: 300,
|
|
74
|
+
in: isOpenState,
|
|
75
|
+
nodeRef: panelRef,
|
|
76
|
+
unmountOnExit: true
|
|
77
|
+
},
|
|
78
|
+
slotProps?.transition
|
|
79
|
+
);
|
|
80
|
+
const items = [];
|
|
81
|
+
const collapsedItems = [];
|
|
82
|
+
for (let idx = 0; idx < elements.length; idx += 1) {
|
|
83
|
+
const element = elements[idx];
|
|
84
|
+
const isAction = element.type === ActionsPanelAction;
|
|
85
|
+
const isHidden = !visibleMap[idx];
|
|
86
|
+
if (!isAction) {
|
|
87
|
+
items.push(element);
|
|
88
|
+
} else {
|
|
89
|
+
const itemKey = elementKeys[idx] ?? String(idx);
|
|
90
|
+
if (isHidden) {
|
|
91
|
+
collapsedItems.push({
|
|
92
|
+
element,
|
|
93
|
+
index: idx,
|
|
94
|
+
key: itemKey,
|
|
95
|
+
props: element.props,
|
|
96
|
+
children: element.props.children
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
items.push(
|
|
100
|
+
cloneElement(element, {
|
|
101
|
+
ref: itemsRefs[idx],
|
|
102
|
+
"aria-hidden": isHidden || void 0,
|
|
103
|
+
onPress: (e) => {
|
|
104
|
+
element.props?.onPress?.(e);
|
|
105
|
+
onAction?.(itemKey);
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
const isOnlyCounterHidden = collapsedItems.length === 0 && !visibleMap[counterIndex];
|
|
112
|
+
const rootRef = useMultiRef([panelRef, overlayRef]);
|
|
113
|
+
const rootProps = mergeProps(
|
|
114
|
+
{ className: s.base },
|
|
115
|
+
other,
|
|
116
|
+
toolbarProps,
|
|
117
|
+
overlayProps
|
|
118
|
+
);
|
|
119
|
+
const containerProps = mergeProps(
|
|
120
|
+
{ className: s.container, ref: parentRef },
|
|
121
|
+
slotProps?.container
|
|
122
|
+
);
|
|
123
|
+
const actionsProps = mergeProps(
|
|
124
|
+
{
|
|
125
|
+
ref: actionsRef,
|
|
126
|
+
className: s.actions,
|
|
127
|
+
"data-only-counter-hidden": isOnlyCounterHidden || void 0
|
|
128
|
+
},
|
|
129
|
+
slotProps?.actions
|
|
130
|
+
);
|
|
131
|
+
const counterProps = mergeProps(
|
|
132
|
+
{
|
|
133
|
+
selectedExtraCount,
|
|
134
|
+
ref: itemsRefs[counterIndex],
|
|
135
|
+
selectedItemCount: shownCount,
|
|
136
|
+
"aria-hidden": !visibleMap[counterIndex] || void 0
|
|
137
|
+
},
|
|
138
|
+
slotProps?.counter
|
|
139
|
+
);
|
|
140
|
+
const moreProps = mergeProps(
|
|
141
|
+
{
|
|
142
|
+
onAction,
|
|
143
|
+
collapsedItems,
|
|
144
|
+
className: s.more,
|
|
145
|
+
selectedExtraCount,
|
|
146
|
+
ref: itemsRefs[moreIndex],
|
|
147
|
+
selectedItemCount: shownCount,
|
|
148
|
+
"aria-hidden": !visibleMap[moreIndex] || void 0
|
|
149
|
+
},
|
|
150
|
+
slotProps?.more
|
|
151
|
+
);
|
|
152
|
+
return /* @__PURE__ */ jsx(Transition, { ...transitionProps, children: (transition) => /* @__PURE__ */ jsx(Overlay, { portalContainer: portalContainer || void 0, children: /* @__PURE__ */ jsx("div", { "data-transition": transition, ...rootProps, ref: rootRef, children: /* @__PURE__ */ jsx("div", { ...containerProps, children: /* @__PURE__ */ jsxs("div", { ...actionsProps, children: [
|
|
153
|
+
items,
|
|
154
|
+
/* @__PURE__ */ jsx(ActionsPanelCounter, { ...counterProps }),
|
|
155
|
+
/* @__PURE__ */ jsx(ActionsPanelMoreAction, { ...moreProps }),
|
|
156
|
+
/* @__PURE__ */ jsx(
|
|
157
|
+
ActionsPanelClearButton,
|
|
158
|
+
{
|
|
159
|
+
ref: clearBtnRef,
|
|
160
|
+
onClearSelection
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
] }) }) }) }) });
|
|
164
|
+
};
|
|
165
|
+
ActionsPanelComponent.displayName = "ActionsPanel";
|
|
166
|
+
const ActionsPanel = ActionsPanelComponent;
|
|
167
|
+
ActionsPanel.Action = ActionsPanelAction;
|
|
168
|
+
export {
|
|
169
|
+
ActionsPanel
|
|
170
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { clsx } from "@koobiq/react-core";
|
|
4
|
+
import s from "./ActionsPanelAction.module.css.js";
|
|
5
|
+
import { Button } from "../../../Button/Button.js";
|
|
6
|
+
const ActionsPanelAction = (props) => {
|
|
7
|
+
const { children, ref, className, icon, ...other } = props;
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
Button,
|
|
10
|
+
{
|
|
11
|
+
ref,
|
|
12
|
+
"data-slot": "action",
|
|
13
|
+
startIcon: icon,
|
|
14
|
+
className: clsx(s.base, className),
|
|
15
|
+
...other,
|
|
16
|
+
children
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
ActionsPanelAction
|
|
22
|
+
};
|
package/dist/components/ActionsPanel/components/ActionsPanelClearButton/ActionsPanelClearButton.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ExtendableComponentPropsWithRef } from '@koobiq/react-core';
|
|
2
|
+
export type ActionsPanelClearButtonProps = ExtendableComponentPropsWithRef<{
|
|
3
|
+
onClearSelection?: () => void;
|
|
4
|
+
}, 'div'>;
|
|
5
|
+
export declare const ActionsPanelClearButton: ({ onClearSelection, className, ...other }: ActionsPanelClearButtonProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/components/ActionsPanel/components/ActionsPanelClearButton/ActionsPanelClearButton.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useLocalizedStringFormatter, clsx } from "@koobiq/react-core";
|
|
3
|
+
import { IconCircleXmark16 } from "@koobiq/react-icons";
|
|
4
|
+
import intlMessages from "../../intl.json.js";
|
|
5
|
+
import s from "./ActionsPanelClearButton.module.css.js";
|
|
6
|
+
import { FlexBox } from "../../../FlexBox/FlexBox.js";
|
|
7
|
+
import { ActionsPanelDivider } from "../ActionsPanelDivider/ActionsPanelDivider.js";
|
|
8
|
+
import { Button } from "../../../Button/Button.js";
|
|
9
|
+
const ActionsPanelClearButton = ({
|
|
10
|
+
onClearSelection,
|
|
11
|
+
className,
|
|
12
|
+
...other
|
|
13
|
+
}) => {
|
|
14
|
+
const t = useLocalizedStringFormatter(intlMessages);
|
|
15
|
+
return /* @__PURE__ */ jsxs(FlexBox, { className: clsx(s.base, className), alignItems: "center", ...other, children: [
|
|
16
|
+
/* @__PURE__ */ jsx(ActionsPanelDivider, {}),
|
|
17
|
+
/* @__PURE__ */ jsx(
|
|
18
|
+
Button,
|
|
19
|
+
{
|
|
20
|
+
"aria-label": t.format("clear selection"),
|
|
21
|
+
onPress: onClearSelection,
|
|
22
|
+
startIcon: /* @__PURE__ */ jsx(IconCircleXmark16, {}),
|
|
23
|
+
onlyIcon: true
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
] });
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
ActionsPanelClearButton
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ActionsPanelClearButton';
|
package/dist/components/ActionsPanel/components/ActionsPanelContainer/ActionsPanelContainer.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { useMultiRef, clsx } from "@koobiq/react-core";
|
|
5
|
+
import { Provider } from "@koobiq/react-primitives";
|
|
6
|
+
import { ActionsPanelContext } from "../../ActionsPanelContext.js";
|
|
7
|
+
import s from "./ActionPanelContainer.module.css.js";
|
|
8
|
+
const ActionsPanelContainer = (props) => {
|
|
9
|
+
const { children, className, ref, ...other } = props;
|
|
10
|
+
const [portalContainer, setPortalContainer] = useState(
|
|
11
|
+
null
|
|
12
|
+
);
|
|
13
|
+
const domRef = useMultiRef([ref, setPortalContainer]);
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
Provider,
|
|
16
|
+
{
|
|
17
|
+
values: [
|
|
18
|
+
[
|
|
19
|
+
ActionsPanelContext,
|
|
20
|
+
{
|
|
21
|
+
className: s.panel,
|
|
22
|
+
portalContainer
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
],
|
|
26
|
+
children: /* @__PURE__ */ jsx("div", { className: clsx(s.base, className), ref: domRef, ...other, children })
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
ActionsPanelContainer
|
|
32
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type DataAttributeProps, type ExtendableComponentPropsWithRef } from '@koobiq/react-core';
|
|
2
|
+
export type ActionsPanelCounterProps = ExtendableComponentPropsWithRef<{
|
|
3
|
+
selectedItemCount?: number | 'all';
|
|
4
|
+
selectedExtraCount?: number;
|
|
5
|
+
} & DataAttributeProps, 'div'>;
|
|
6
|
+
export declare const ActionsPanelCounter: ({ selectedItemCount, selectedExtraCount, className, ...other }: ActionsPanelCounterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useLocalizedStringFormatter, clsx, isNumber } from "@koobiq/react-core";
|
|
3
|
+
import intlMessages from "../../intl.json.js";
|
|
4
|
+
import s from "./ActionsPanelCounter.module.css.js";
|
|
5
|
+
import { Badge } from "../../../Badge/Badge.js";
|
|
6
|
+
import { FlexBox } from "../../../FlexBox/FlexBox.js";
|
|
7
|
+
import { Typography } from "../../../Typography/Typography.js";
|
|
8
|
+
import { ActionsPanelDivider } from "../ActionsPanelDivider/ActionsPanelDivider.js";
|
|
9
|
+
const ActionsPanelCounter = ({
|
|
10
|
+
selectedItemCount,
|
|
11
|
+
selectedExtraCount,
|
|
12
|
+
className,
|
|
13
|
+
...other
|
|
14
|
+
}) => {
|
|
15
|
+
const t = useLocalizedStringFormatter(intlMessages);
|
|
16
|
+
const isAll = selectedItemCount === "all";
|
|
17
|
+
return /* @__PURE__ */ jsxs(FlexBox, { alignItems: "center", className: clsx(s.base, className), ...other, children: [
|
|
18
|
+
/* @__PURE__ */ jsxs(
|
|
19
|
+
Typography,
|
|
20
|
+
{
|
|
21
|
+
as: "div",
|
|
22
|
+
className: s.text,
|
|
23
|
+
ellipsis: true,
|
|
24
|
+
color: "on-contrast",
|
|
25
|
+
variant: "text-normal-medium",
|
|
26
|
+
children: [
|
|
27
|
+
isAll ? t.format("all selected") : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
28
|
+
t.format("selected"),
|
|
29
|
+
" ",
|
|
30
|
+
/* @__PURE__ */ jsx("span", { className: s.counterValue, children: selectedItemCount })
|
|
31
|
+
] }),
|
|
32
|
+
isNumber(selectedExtraCount) && /* @__PURE__ */ jsxs(Badge, { variant: "outline-fade-contrast", className: s.extraCounter, children: [
|
|
33
|
+
"+",
|
|
34
|
+
selectedExtraCount
|
|
35
|
+
] })
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
/* @__PURE__ */ jsx(ActionsPanelDivider, {})
|
|
40
|
+
] });
|
|
41
|
+
};
|
|
42
|
+
export {
|
|
43
|
+
ActionsPanelCounter
|
|
44
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const base = "kbq-actionspanelcounter-a1a48c";
|
|
2
|
+
const text = "kbq-actionspanelcounter-text-378809";
|
|
3
|
+
const counterValue = "kbq-actionspanelcounter-counterValue-bbeca7";
|
|
4
|
+
const extraCounter = "kbq-actionspanelcounter-extraCounter-feb01d";
|
|
5
|
+
const s = {
|
|
6
|
+
base,
|
|
7
|
+
text,
|
|
8
|
+
counterValue,
|
|
9
|
+
extraCounter
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
base,
|
|
13
|
+
counterValue,
|
|
14
|
+
s as default,
|
|
15
|
+
extraCounter,
|
|
16
|
+
text
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ActionsPanelCounter';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { clsx } from "@koobiq/react-core";
|
|
3
|
+
import s from "./ActionsPanelDivider.module.css.js";
|
|
4
|
+
import { Divider } from "../../../Divider/Divider.js";
|
|
5
|
+
const ActionsPanelDivider = ({
|
|
6
|
+
className,
|
|
7
|
+
...other
|
|
8
|
+
}) => /* @__PURE__ */ jsx(
|
|
9
|
+
Divider,
|
|
10
|
+
{
|
|
11
|
+
orientation: "vertical",
|
|
12
|
+
className: clsx(s.base, className),
|
|
13
|
+
...other
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
export {
|
|
17
|
+
ActionsPanelDivider
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ActionsPanelDivider';
|
package/dist/components/ActionsPanel/components/ActionsPanelMoreAction/ActionsPanelMoreAction.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useLocalizedStringFormatter, isNumber, isString, mergeProps, clsx, mergeRefs } from "@koobiq/react-core";
|
|
4
|
+
import { IconEllipsisVertical16 } from "@koobiq/react-icons";
|
|
5
|
+
import intlMessages from "../../intl.json.js";
|
|
6
|
+
import s from "./ActionsPanelMoreAction.module.css.js";
|
|
7
|
+
import { Menu } from "../../../Menu/Menu.js";
|
|
8
|
+
import { Typography } from "../../../Typography/Typography.js";
|
|
9
|
+
import { Badge } from "../../../Badge/Badge.js";
|
|
10
|
+
import { Button } from "../../../Button/Button.js";
|
|
11
|
+
const ActionsPanelMoreAction = (props) => {
|
|
12
|
+
const {
|
|
13
|
+
ref,
|
|
14
|
+
onAction,
|
|
15
|
+
children,
|
|
16
|
+
className,
|
|
17
|
+
collapsedItems,
|
|
18
|
+
selectedItemCount,
|
|
19
|
+
selectedExtraCount,
|
|
20
|
+
...other
|
|
21
|
+
} = props;
|
|
22
|
+
const t = useLocalizedStringFormatter(intlMessages);
|
|
23
|
+
const isAll = selectedItemCount === "all";
|
|
24
|
+
const hasItems = collapsedItems.length > 0;
|
|
25
|
+
const renderButton = ({
|
|
26
|
+
ref: controlRef,
|
|
27
|
+
...controlProps
|
|
28
|
+
}) => /* @__PURE__ */ jsx(
|
|
29
|
+
Button,
|
|
30
|
+
{
|
|
31
|
+
"data-slot": "more-action",
|
|
32
|
+
ref: mergeRefs(ref, controlRef),
|
|
33
|
+
"aria-label": t.format("show more actions"),
|
|
34
|
+
className: clsx(s.base, className),
|
|
35
|
+
startIcon: /* @__PURE__ */ jsx(IconEllipsisVertical16, {}),
|
|
36
|
+
...mergeProps(other, controlProps),
|
|
37
|
+
onlyIcon: true,
|
|
38
|
+
children
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
if (!hasItems) {
|
|
42
|
+
return renderButton({});
|
|
43
|
+
}
|
|
44
|
+
return /* @__PURE__ */ jsxs(Menu, { onAction, control: (props2) => renderButton(props2), children: [
|
|
45
|
+
/* @__PURE__ */ jsx(Menu.Header, { children: /* @__PURE__ */ jsxs(Typography, { variant: "text-normal-strong", className: s.menuTitle, children: [
|
|
46
|
+
isAll ? t.format("all selected") : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
47
|
+
t.format("selected"),
|
|
48
|
+
" ",
|
|
49
|
+
selectedItemCount
|
|
50
|
+
] }),
|
|
51
|
+
isNumber(selectedExtraCount) && /* @__PURE__ */ jsxs(Badge, { variant: "fade-contrast", className: s.extraCounter, children: [
|
|
52
|
+
"+",
|
|
53
|
+
selectedExtraCount
|
|
54
|
+
] })
|
|
55
|
+
] }) }),
|
|
56
|
+
/* @__PURE__ */ jsx(Menu.Divider, {}),
|
|
57
|
+
/* @__PURE__ */ jsx(Fragment, { children: collapsedItems.map((item, index) => /* @__PURE__ */ jsxs(
|
|
58
|
+
Menu.Item,
|
|
59
|
+
{
|
|
60
|
+
textValue: isString(item.children) ? item.children : `${index}`,
|
|
61
|
+
children: [
|
|
62
|
+
item.props.icon,
|
|
63
|
+
/* @__PURE__ */ jsx(Menu.ItemText, { children: item.children })
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
item.key
|
|
67
|
+
)) })
|
|
68
|
+
] });
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
ActionsPanelMoreAction
|
|
72
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const base = "kbq-actionspanelmoreaction-4f2721";
|
|
2
|
+
const menuTitle = "kbq-actionspanelmoreaction-menuTitle-06612f";
|
|
3
|
+
const extraCounter = "kbq-actionspanelmoreaction-extraCounter-9d3cb2";
|
|
4
|
+
const s = {
|
|
5
|
+
base,
|
|
6
|
+
menuTitle,
|
|
7
|
+
extraCounter
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
base,
|
|
11
|
+
s as default,
|
|
12
|
+
extraCounter,
|
|
13
|
+
menuTitle
|
|
14
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Key } from '../../../../index';
|
|
2
|
+
import type { ButtonProps } from '../../../Button';
|
|
3
|
+
import type { ActionsPanelActionRenderItem } from '../../types';
|
|
4
|
+
export type ActionsPanelMoreActionProps = ButtonProps & {
|
|
5
|
+
selectedItemCount?: number | 'all';
|
|
6
|
+
collapsedItems: ActionsPanelActionRenderItem[];
|
|
7
|
+
onAction?: (key: Key) => void;
|
|
8
|
+
selectedExtraCount?: number;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useInlinePaddingSize';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Returns sum of inline paddings (start + end) in px for a given element ref.
|
|
4
|
+
* Updates on ResizeObserver notifications.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useInlinePaddingSize<Element extends HTMLElement | SVGGraphicsElement>(ref: RefObject<Element | null>): number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { useResizeObserverRefs } from "@koobiq/react-core";
|
|
4
|
+
function useInlinePaddingSize(ref) {
|
|
5
|
+
const refs = useMemo(() => [ref], [ref]);
|
|
6
|
+
const [paddingInline] = useResizeObserverRefs(refs, (el) => {
|
|
7
|
+
if (!el) return 0;
|
|
8
|
+
const cs = getComputedStyle(el);
|
|
9
|
+
const start = parseFloat(cs.paddingInlineStart || cs.paddingLeft) || 0;
|
|
10
|
+
const end = parseFloat(cs.paddingInlineEnd || cs.paddingRight) || 0;
|
|
11
|
+
return start + end;
|
|
12
|
+
});
|
|
13
|
+
return paddingInline ?? 0;
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
useInlinePaddingSize
|
|
17
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const intlMessages = {
|
|
2
|
+
"ru-RU": { "selected": "Выбрано:", "all selected": "Выбраны все", "clear selection": "Очистить выделение", "show more actions": "Показать остальные действия" },
|
|
3
|
+
"en-US": { "selected": "Selected:", "all selected": "All selected", "clear selection": "Clear selection", "show more actions": "Show more actions" }
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
intlMessages as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { DataAttributeProps, ExtendableComponentPropsWithRef } from '@koobiq/react-core';
|
|
3
|
+
import type { TransitionProps } from 'react-transition-group/Transition';
|
|
4
|
+
import type { Key } from '../../index';
|
|
5
|
+
import type { ActionsPanelActionProps, ActionsPanelCounterProps } from './components';
|
|
6
|
+
import type { ActionsPanelMoreActionProps } from './components/ActionsPanelMoreAction';
|
|
7
|
+
export type ActionsPanelActionRenderItem = {
|
|
8
|
+
/** React element. */
|
|
9
|
+
element: ReactElement<ActionsPanelActionProps>;
|
|
10
|
+
/** Index in the `children` list. */
|
|
11
|
+
index: number;
|
|
12
|
+
/** Key. */
|
|
13
|
+
key: Key | null;
|
|
14
|
+
/** Convenient access to the element's children. */
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
/** Optional link target extracted from props. */
|
|
17
|
+
href?: string;
|
|
18
|
+
/** Element props shortcut. */
|
|
19
|
+
props: ActionsPanelActionProps;
|
|
20
|
+
};
|
|
21
|
+
export type ActionsPanelProps = ExtendableComponentPropsWithRef<{
|
|
22
|
+
/** If `true`, the content panel won't close when the ESC key is pressed. */
|
|
23
|
+
disableExitOnEscapeKeyDown?: boolean;
|
|
24
|
+
/** The number of selected items that the ActionsPanel is currently linked to. */
|
|
25
|
+
selectedItemCount?: number | 'all';
|
|
26
|
+
/** Optional secondary counter displayed next to `selectedItemCount`. */
|
|
27
|
+
selectedExtraCount?: number;
|
|
28
|
+
/** The contents of the collection. */
|
|
29
|
+
children?: ReactElement<ActionsPanelActionProps> | Array<ReactElement<ActionsPanelActionProps>>;
|
|
30
|
+
/** Handler that is called when the ActionsPanel clear button is pressed. */
|
|
31
|
+
onClearSelection?: () => void;
|
|
32
|
+
/** Handler called when any breadcrumb item is pressed. It returns the item key. */
|
|
33
|
+
onAction?: (key: Key) => void;
|
|
34
|
+
/**
|
|
35
|
+
* The container element in which the component portal will be placed.
|
|
36
|
+
* @default document.body
|
|
37
|
+
*/
|
|
38
|
+
portalContainer?: HTMLElement | null;
|
|
39
|
+
/** The props used for each slot inside. */
|
|
40
|
+
slotProps?: {
|
|
41
|
+
transition?: Partial<TransitionProps<HTMLElement>>;
|
|
42
|
+
container?: ComponentPropsWithRef<'div'> & DataAttributeProps;
|
|
43
|
+
actions?: ComponentPropsWithRef<'div'> & DataAttributeProps;
|
|
44
|
+
counter?: ActionsPanelCounterProps;
|
|
45
|
+
more?: Partial<ActionsPanelMoreActionProps>;
|
|
46
|
+
};
|
|
47
|
+
}, 'div'>;
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Children, isValidElement, cloneElement } from "react";
|
|
4
|
-
import { useHideOverflowItems, mergeProps, isString, isNotNil } from "@koobiq/react-core";
|
|
4
|
+
import { useLocalizedStringFormatter, useHideOverflowItems, mergeProps, isString, isNotNil } from "@koobiq/react-core";
|
|
5
5
|
import { IconEllipsisHorizontal16 } from "@koobiq/react-icons";
|
|
6
6
|
import { Button } from "@koobiq/react-primitives";
|
|
7
7
|
import s from "../../Breadcrumbs.module.css.js";
|
|
8
|
+
import intlMessages from "../../intl.json.js";
|
|
8
9
|
import { clampEllipsisIndex, getSlotIndex } from "./utils.js";
|
|
9
10
|
import { BreadcrumbItem } from "../BreadcrumbItem/BreadcrumbItem.js";
|
|
10
11
|
import { Menu } from "../../../Menu/Menu.js";
|
|
11
12
|
const renderEllipsisDefault = ({
|
|
12
13
|
ellipsisIcon,
|
|
13
14
|
onAction,
|
|
14
|
-
items
|
|
15
|
+
items,
|
|
16
|
+
"aria-label": label
|
|
15
17
|
}) => {
|
|
16
18
|
if (items.length === 0) return null;
|
|
17
19
|
return /* @__PURE__ */ jsx(
|
|
18
20
|
Menu,
|
|
19
21
|
{
|
|
20
22
|
onAction,
|
|
21
|
-
control: (props) => /* @__PURE__ */ jsx(BreadcrumbItem, { ...props, as: Button, children: ellipsisIcon }),
|
|
23
|
+
control: (props) => /* @__PURE__ */ jsx(BreadcrumbItem, { "aria-label": label, ...props, as: Button, children: ellipsisIcon }),
|
|
22
24
|
children: items.map((item, index) => /* @__PURE__ */ jsx(
|
|
23
25
|
Menu.Item,
|
|
24
26
|
{
|
|
@@ -40,6 +42,7 @@ const BreadcrumbsCollapse = (props) => {
|
|
|
40
42
|
slotProps,
|
|
41
43
|
children
|
|
42
44
|
} = props;
|
|
45
|
+
const t = useLocalizedStringFormatter(intlMessages);
|
|
43
46
|
const ellipsisIcon = /* @__PURE__ */ jsx(IconEllipsisHorizontal16, {});
|
|
44
47
|
const elements = Children.toArray(children);
|
|
45
48
|
const { length } = elements;
|
|
@@ -77,10 +80,11 @@ const BreadcrumbsCollapse = (props) => {
|
|
|
77
80
|
if (isEllipsis) {
|
|
78
81
|
const defaultEllipsis = /* @__PURE__ */ jsx(BreadcrumbItem, { as: "span", children: ellipsisIcon });
|
|
79
82
|
const customEllipsis = renderEllipsis?.({
|
|
83
|
+
onAction,
|
|
80
84
|
ellipsisIcon,
|
|
81
|
-
ellipsisIndex: slotIndex,
|
|
82
85
|
items: collapsedItems,
|
|
83
|
-
|
|
86
|
+
ellipsisIndex: slotIndex,
|
|
87
|
+
"aria-label": t.format("show more")
|
|
84
88
|
});
|
|
85
89
|
return /* @__PURE__ */ jsxs(
|
|
86
90
|
"li",
|
|
@@ -29,6 +29,8 @@ export type RenderEllipsisParams = {
|
|
|
29
29
|
ellipsisIndex: number;
|
|
30
30
|
/** Handler called when any breadcrumb item is pressed. It returns the item key. */
|
|
31
31
|
onAction?: (key: Key) => void;
|
|
32
|
+
/** Defines a string value that labels the current element. */
|
|
33
|
+
'aria-label'?: string;
|
|
32
34
|
};
|
|
33
35
|
export type BreadcrumbsPropRenderEllipsis = (params: RenderEllipsisParams) => ReactNode;
|
|
34
36
|
export type BreadcrumbsProps = ExtendableComponentPropsWithRef<AriaBreadcrumbsProps & {
|
|
@@ -46,6 +46,7 @@ export * from './Breadcrumbs';
|
|
|
46
46
|
export * from './Accordion';
|
|
47
47
|
export * from './ContenPanel';
|
|
48
48
|
export * from './Navbar';
|
|
49
|
+
export * from './ActionsPanel';
|
|
49
50
|
export * from './layout';
|
|
50
51
|
export { useListData, useAsyncList, type ListData, type ListOptions, type AsyncListData, type AsyncListOptions, type AsyncListLoadFunction, type AsyncListLoadOptions, type TimeValue, type DateValue, } from '@koobiq/react-primitives';
|
|
51
52
|
export { useRouter, useLocale, useFilter, type Locale, type Key, type SortDescriptor, type Selection, RouterProvider, useDateFormatter, } from '@koobiq/react-core';
|
package/dist/index.js
CHANGED
|
@@ -115,6 +115,9 @@ import { ContentPanelContainer } from "./components/ContenPanel/components/Conte
|
|
|
115
115
|
import { ContentPanelContainerContext } from "./components/ContenPanel/components/ContentPanelContainer/ContentPanelContainerContext.js";
|
|
116
116
|
import { Navbar, NavbarComponent } from "./components/Navbar/Navbar.js";
|
|
117
117
|
import { navbarPropVariant } from "./components/Navbar/types.js";
|
|
118
|
+
import { ActionsPanel } from "./components/ActionsPanel/ActionsPanel.js";
|
|
119
|
+
import { ActionsPanelContainer } from "./components/ActionsPanel/components/ActionsPanelContainer/ActionsPanelContainer.js";
|
|
120
|
+
import { ActionsPanelContext } from "./components/ActionsPanel/ActionsPanelContext.js";
|
|
118
121
|
import { flex, flexPropAlignItems, flexPropDirection, flexPropFlex, flexPropGap, flexPropJustifyContent, flexPropOrder, flexPropWrap } from "./components/layout/flex/flex.js";
|
|
119
122
|
import { spacing, spacingGap } from "./components/layout/spacing/spacing.js";
|
|
120
123
|
export {
|
|
@@ -123,6 +126,9 @@ export {
|
|
|
123
126
|
AccordionGroup,
|
|
124
127
|
AccordionGroupStateContext,
|
|
125
128
|
AccordionStateContext,
|
|
129
|
+
ActionsPanel,
|
|
130
|
+
ActionsPanelContainer,
|
|
131
|
+
ActionsPanelContext,
|
|
126
132
|
Alert,
|
|
127
133
|
AnimatedIcon,
|
|
128
134
|
Autocomplete,
|
package/dist/style.css
CHANGED
|
@@ -3323,9 +3323,12 @@
|
|
|
3323
3323
|
display: flex;
|
|
3324
3324
|
}
|
|
3325
3325
|
.kbq-divider-16da20 {
|
|
3326
|
-
--
|
|
3326
|
+
--divider-color: var(--kbq-line-contrast-less);
|
|
3327
|
+
--divider-inline-padding: var(--kbq-size-xxs);
|
|
3328
|
+
--divider-block-padding: var(--kbq-size-xxs);
|
|
3329
|
+
--divider-size: 1px;
|
|
3327
3330
|
border-style: solid;
|
|
3328
|
-
border-color: var(--
|
|
3331
|
+
border-color: var(--divider-color);
|
|
3329
3332
|
flex-shrink: 0;
|
|
3330
3333
|
margin: 0;
|
|
3331
3334
|
}
|
|
@@ -3343,15 +3346,15 @@
|
|
|
3343
3346
|
}
|
|
3344
3347
|
|
|
3345
3348
|
.kbq-divider-vertical-a4e613 {
|
|
3346
|
-
--divider-paddings: 0 var(--
|
|
3347
|
-
border-width: 0
|
|
3349
|
+
--divider-paddings: 0 var(--divider-inline-padding);
|
|
3350
|
+
border-width: 0 var(--divider-size) 0 0;
|
|
3348
3351
|
block-size: 100%;
|
|
3349
3352
|
inline-size: 0;
|
|
3350
3353
|
}
|
|
3351
3354
|
|
|
3352
3355
|
.kbq-divider-horizontal-22c78d {
|
|
3353
|
-
--divider-paddings: var(--
|
|
3354
|
-
border-width: 0 0
|
|
3356
|
+
--divider-paddings: var(--divider-block-padding) 0;
|
|
3357
|
+
border-width: 0 0 var(--divider-size);
|
|
3355
3358
|
block-size: 0;
|
|
3356
3359
|
inline-size: 100%;
|
|
3357
3360
|
}
|
|
@@ -5556,6 +5559,151 @@ body[data-resizing="true"] .kbq-contentpanel-3541ee {
|
|
|
5556
5559
|
outline: var(--kbq-size-3xs) solid var(--kbq-states-line-focus-theme);
|
|
5557
5560
|
outline-offset: -1px;
|
|
5558
5561
|
}
|
|
5562
|
+
.kbq-actionpanel-f0ec9d {
|
|
5563
|
+
--actions-panel-start-position: 100%;
|
|
5564
|
+
--actions-panel-padding: var(--kbq-size-s);
|
|
5565
|
+
--actions-panel-block-size: var(--kbq-size-5xl);
|
|
5566
|
+
--actions-panel-border-radius: var(--kbq-size-l);
|
|
5567
|
+
--actions-panel-box-shadow: var(--kbq-shadow-card);
|
|
5568
|
+
--actions-panel-bg-color: var(--kbq-background-contrast);
|
|
5569
|
+
--actions-panel-color: var(--kbq-foreground-on-contrast);
|
|
5570
|
+
--actions-panel-vertical-divider-color: var(--kbq-line-contrast-fade);
|
|
5571
|
+
pointer-events: none;
|
|
5572
|
+
margin-inline: var(--kbq-size-s);
|
|
5573
|
+
z-index: var(--kbq-layer-absolute);
|
|
5574
|
+
justify-content: center;
|
|
5575
|
+
align-items: center;
|
|
5576
|
+
margin-block-end: var(--kbq-size-l);
|
|
5577
|
+
display: flex;
|
|
5578
|
+
position: fixed;
|
|
5579
|
+
inset-block-end: 0;
|
|
5580
|
+
inset-inline: 0;
|
|
5581
|
+
}
|
|
5582
|
+
|
|
5583
|
+
.kbq-actionpanel-f0ec9d[data-transition="entering"] {
|
|
5584
|
+
opacity: 1;
|
|
5585
|
+
transition: transform var(--kbq-transition-slow), opacity var(--kbq-transition-slow);
|
|
5586
|
+
transform: translate(0);
|
|
5587
|
+
}
|
|
5588
|
+
|
|
5589
|
+
.kbq-actionpanel-f0ec9d[data-transition="entered"] {
|
|
5590
|
+
opacity: 1;
|
|
5591
|
+
transform: translate(0);
|
|
5592
|
+
}
|
|
5593
|
+
|
|
5594
|
+
.kbq-actionpanel-f0ec9d[data-transition="exiting"] {
|
|
5595
|
+
transform: translate(0, var(--actions-panel-start-position));
|
|
5596
|
+
opacity: 0;
|
|
5597
|
+
transition: transform var(--kbq-transition-slow), opacity var(--kbq-transition-slow);
|
|
5598
|
+
}
|
|
5599
|
+
|
|
5600
|
+
.kbq-actionpanel-f0ec9d[data-transition="exited"] {
|
|
5601
|
+
transform: translate(0, var(--actions-panel-start-position));
|
|
5602
|
+
opacity: 0;
|
|
5603
|
+
}
|
|
5604
|
+
|
|
5605
|
+
.kbq-actionpanel-container-b084cf {
|
|
5606
|
+
justify-content: center;
|
|
5607
|
+
inline-size: 100%;
|
|
5608
|
+
display: flex;
|
|
5609
|
+
}
|
|
5610
|
+
|
|
5611
|
+
.kbq-actionpanel-actions-0c0847 {
|
|
5612
|
+
pointer-events: auto;
|
|
5613
|
+
box-sizing: border-box;
|
|
5614
|
+
color: var(--actions-panel-color);
|
|
5615
|
+
padding: var(--actions-panel-padding);
|
|
5616
|
+
background: var(--actions-panel-bg-color);
|
|
5617
|
+
block-size: var(--actions-panel-block-size);
|
|
5618
|
+
box-shadow: var(--actions-panel-box-shadow);
|
|
5619
|
+
border-radius: var(--actions-panel-border-radius);
|
|
5620
|
+
align-items: center;
|
|
5621
|
+
display: flex;
|
|
5622
|
+
}
|
|
5623
|
+
|
|
5624
|
+
.kbq-actionpanel-actions-0c0847[data-only-counter-hidden="true"] .kbq-actionpanel-more-1622be {
|
|
5625
|
+
visibility: hidden;
|
|
5626
|
+
pointer-events: none;
|
|
5627
|
+
inline-size: 0;
|
|
5628
|
+
margin: 0;
|
|
5629
|
+
padding: 0;
|
|
5630
|
+
overflow: hidden;
|
|
5631
|
+
}
|
|
5632
|
+
.kbq-actionspanelaction-da3850 {
|
|
5633
|
+
flex-shrink: 0;
|
|
5634
|
+
margin-inline-start: var(--kbq-size-xxs);
|
|
5635
|
+
}
|
|
5636
|
+
|
|
5637
|
+
.kbq-actionspanelaction-da3850:first-child {
|
|
5638
|
+
margin-inline-start: unset;
|
|
5639
|
+
}
|
|
5640
|
+
|
|
5641
|
+
.kbq-actionspanelaction-da3850[aria-hidden="true"] {
|
|
5642
|
+
visibility: hidden;
|
|
5643
|
+
position: absolute;
|
|
5644
|
+
inset-inline-start: -300vw;
|
|
5645
|
+
}
|
|
5646
|
+
.kbq-actionspanelcounter-a1a48c {
|
|
5647
|
+
order: -1;
|
|
5648
|
+
}
|
|
5649
|
+
|
|
5650
|
+
.kbq-actionspanelcounter-a1a48c[aria-hidden="true"] {
|
|
5651
|
+
visibility: hidden;
|
|
5652
|
+
position: absolute;
|
|
5653
|
+
inset-inline-start: -300vw;
|
|
5654
|
+
}
|
|
5655
|
+
|
|
5656
|
+
.kbq-actionspanelcounter-text-378809 {
|
|
5657
|
+
padding-inline: var(--kbq-size-m);
|
|
5658
|
+
padding-block: var(--kbq-size-xs);
|
|
5659
|
+
}
|
|
5660
|
+
|
|
5661
|
+
.kbq-actionspanelcounter-counterValue-bbeca7 {
|
|
5662
|
+
text-align: start;
|
|
5663
|
+
min-inline-size: 1ch;
|
|
5664
|
+
display: inline-block;
|
|
5665
|
+
}
|
|
5666
|
+
|
|
5667
|
+
.kbq-actionspanelcounter-extraCounter-feb01d {
|
|
5668
|
+
color: inherit;
|
|
5669
|
+
margin-inline-start: var(--kbq-size-xs);
|
|
5670
|
+
}
|
|
5671
|
+
.kbq-actionspaneldivider-b8d764 {
|
|
5672
|
+
--divider-color: var(--actions-panel-vertical-divider-color);
|
|
5673
|
+
block-size: var(--kbq-size-m);
|
|
5674
|
+
}
|
|
5675
|
+
.kbq-actionspanelmoreaction-4f2721 {
|
|
5676
|
+
flex-shrink: 0;
|
|
5677
|
+
}
|
|
5678
|
+
|
|
5679
|
+
.kbq-actionspanelmoreaction-4f2721[aria-hidden="true"] {
|
|
5680
|
+
visibility: hidden;
|
|
5681
|
+
position: absolute;
|
|
5682
|
+
inset-inline-start: -300vw;
|
|
5683
|
+
}
|
|
5684
|
+
|
|
5685
|
+
.kbq-actionspanelmoreaction-4f2721[aria-expanded="true"] {
|
|
5686
|
+
background-color: var(--button-bg-color-active);
|
|
5687
|
+
}
|
|
5688
|
+
|
|
5689
|
+
.kbq-actionspanelmoreaction-menuTitle-06612f {
|
|
5690
|
+
padding: var(--kbq-size-s) var(--kbq-size-l);
|
|
5691
|
+
}
|
|
5692
|
+
|
|
5693
|
+
.kbq-actionspanelmoreaction-extraCounter-9d3cb2 {
|
|
5694
|
+
margin-inline-start: var(--kbq-size-xs);
|
|
5695
|
+
}
|
|
5696
|
+
.kbq-actionspanelclearbutton-2a7ca4 {
|
|
5697
|
+
margin-inline-start: auto;
|
|
5698
|
+
}
|
|
5699
|
+
.kbq-actionpanelcontainer-2fad9f {
|
|
5700
|
+
position: relative;
|
|
5701
|
+
overflow: hidden;
|
|
5702
|
+
}
|
|
5703
|
+
|
|
5704
|
+
.kbq-actionpanelcontainer-panel-0ab5be {
|
|
5705
|
+
position: absolute;
|
|
5706
|
+
}
|
|
5559
5707
|
.kbq-spacing-mbs_0-be7021 {
|
|
5560
5708
|
margin-block-start: 0;
|
|
5561
5709
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koobiq/react-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.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.15.0",
|
|
29
29
|
"@types/react-transition-group": "^4.4.12",
|
|
30
30
|
"react-transition-group": "^4.4.5",
|
|
31
|
-
"@koobiq/logger": "0.
|
|
32
|
-
"@koobiq/react-
|
|
33
|
-
"@koobiq/react-icons": "0.
|
|
34
|
-
"@koobiq/react-
|
|
31
|
+
"@koobiq/logger": "0.26.0",
|
|
32
|
+
"@koobiq/react-core": "0.26.0",
|
|
33
|
+
"@koobiq/react-icons": "0.26.0",
|
|
34
|
+
"@koobiq/react-primitives": "0.26.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@koobiq/design-tokens": "^3.15.0",
|