@kommo-crm/crm-react-ui-kit 1.17.1 → 1.19.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/{ContextMenu-DY7dE-m3.mjs → ContextMenu-C5hUJzo_.mjs} +4 -4
- package/dist/ItemRoot.module-Bai745fc.mjs +7 -0
- package/dist/ItemRoot.module-aMBsZnCj.mjs +7 -0
- package/dist/assets/Item.css +1 -1
- package/dist/assets/Item3.css +1 -1
- package/dist/assets/ItemRoot.css +1 -1
- package/dist/assets/ItemRoot2.css +1 -1
- package/dist/assets/Ribbon.css +1 -0
- package/dist/components/CheckboxGroup/components/CheckboxSelectAll/ItemRootSelectAll.js +1 -1
- package/dist/components/CheckboxGroup/components/ItemRoot/ItemRoot.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.d.ts +5 -15
- package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +3 -3
- package/dist/components/ContextMenu/components/Arrow/Arrow.js +1 -1
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.d.ts +1 -3
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.js +2 -2
- package/dist/components/ContextMenu/components/Content/Content.d.ts +1 -3
- package/dist/components/ContextMenu/components/Content/Content.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/Content/Content.js +2 -2
- package/dist/components/ContextMenu/components/Content/index.js +1 -1
- package/dist/components/ContextMenu/components/Group/Group.js +1 -1
- package/dist/components/ContextMenu/components/Item/Item.js +3 -3
- package/dist/components/ContextMenu/components/ItemIndicator/ItemIndicator.js +1 -1
- package/dist/components/ContextMenu/components/Label/Label.js +2 -2
- package/dist/components/ContextMenu/components/Portal/Portal.js +1 -1
- package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.d.ts +1 -3
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.js +2 -2
- package/dist/components/ContextMenu/components/Sub/Sub.js +2 -2
- package/dist/components/ContextMenu/components/Sub/hooks/useContextMenuSub/useContextMenuSub.js +1 -1
- package/dist/components/ContextMenu/components/Sub/index.js +1 -1
- package/dist/components/ContextMenu/components/SubContent/SubContent.js +2 -2
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.d.ts +1 -3
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.js +1 -1
- package/dist/components/ContextMenu/components/SubRoot/components/Content/Content.js +2 -2
- package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.js +2 -2
- package/dist/components/ContextMenu/components/SubRoot/hooks/useContextMenuSubMenu/useContextMenuSubMenu.js +1 -1
- package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.d.ts +1 -3
- package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.js +2 -2
- package/dist/components/ContextMenu/components/Trigger/Trigger.js +1 -1
- package/dist/components/ContextMenu/hooks/index.js +1 -1
- package/dist/components/ContextMenu/hooks/useContentPositioning/useContentPositioning.js +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.js +1 -1
- package/dist/components/ContextMenu/index.js +1 -1
- package/dist/components/DropdownList/DropdownList.js +1 -1
- package/dist/components/FilterTabs/components/ItemRoot/ItemRoot.js +1 -1
- package/dist/components/FilterTabs/components/ItemRootReset/ItemRootReset.js +1 -1
- package/dist/components/Ribbon/Ribbon.d.ts +5 -0
- package/dist/components/Ribbon/Ribbon.d.ts.map +1 -0
- package/dist/components/Ribbon/Ribbon.js +66 -0
- package/dist/components/Ribbon/Ribbon.props.d.ts +47 -0
- package/dist/components/Ribbon/Ribbon.props.d.ts.map +1 -0
- package/dist/components/Ribbon/Ribbon.props.js +1 -0
- package/dist/components/Ribbon/Ribbon.themes.d.ts +7 -0
- package/dist/components/Ribbon/Ribbon.themes.d.ts.map +1 -0
- package/dist/components/Ribbon/Ribbon.themes.js +12 -0
- package/dist/components/Ribbon/index.d.ts +4 -0
- package/dist/components/Ribbon/index.d.ts.map +1 -0
- package/dist/components/Ribbon/index.js +6 -0
- package/dist/components/Select/components/Item/Item.js +1 -1
- package/dist/components/Select/components/List/List.js +12 -12
- package/dist/{index-SjVEUQPm.mjs → index-BSUeeun5.mjs} +1249 -1216
- package/dist/{index-DBS3EIVR.mjs → index-CitTBapb.mjs} +4 -4
- package/dist/{useContentPositioning-Dvz908Jg.mjs → useContentPositioning--C2HIYDR.mjs} +658 -636
- package/package.json +6 -1
- package/dist/ItemRoot.module-DaaOqYPx.mjs +0 -7
- package/dist/ItemRoot.module-fiKLca_h.mjs +0 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useId as Ce, useState as a, useRef as c, useEffect as y } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { u as pe, a as Re } from "../../../../index-CitTBapb.mjs";
|
|
3
3
|
import { useFocusChange as Ie } from "../../../../hooks/useFocusChange/useFocusChange.js";
|
|
4
4
|
import { noop as ge } from "../../../../utils/noop/noop.js";
|
|
5
5
|
import { ContextMenuMode as i } from "../../ContextMenu.enums.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _ } from "react/jsx-runtime";
|
|
2
2
|
import N, { forwardRef as g } from "react";
|
|
3
3
|
import { c as u } from "../../index-L8X2o7IH.mjs";
|
|
4
|
-
import { c as x } from "../../index-
|
|
4
|
+
import { c as x } from "../../index-CitTBapb.mjs";
|
|
5
5
|
import { useThemeClassName as C } from "../../hooks/useThemeClassName/useThemeClassName.js";
|
|
6
6
|
import { CustomScrollClassName as w } from "../../stylesheets/utils/BaseClasses/BaseClasses.js";
|
|
7
7
|
import { noop as o } from "../../utils/noop/noop.js";
|
|
@@ -4,7 +4,7 @@ import { c as d } from "../../../../index-L8X2o7IH.mjs";
|
|
|
4
4
|
import { useThemeClassName as n } from "../../../../hooks/useThemeClassName/useThemeClassName.js";
|
|
5
5
|
import { useFilterTabsContext as N } from "../../FilterTabs.context.js";
|
|
6
6
|
import { DISPLAY_NAME as t, TabItemRootProvider as b } from "./ItemRoot.context.js";
|
|
7
|
-
import { s as m } from "../../../../ItemRoot.module-
|
|
7
|
+
import { s as m } from "../../../../ItemRoot.module-aMBsZnCj.mjs";
|
|
8
8
|
const u = ({
|
|
9
9
|
children: i,
|
|
10
10
|
theme: r,
|
|
@@ -3,7 +3,7 @@ import { c as d } from "../../../../index-L8X2o7IH.mjs";
|
|
|
3
3
|
import { useThemeClassName as p } from "../../../../hooks/useThemeClassName/useThemeClassName.js";
|
|
4
4
|
import { useFilterTabsContext as c } from "../../FilterTabs.context.js";
|
|
5
5
|
import { DISPLAY_NAME as t, TabItemRootResetProvider as f } from "./ItemRootReset.context.js";
|
|
6
|
-
import { s } from "../../../../ItemRoot.module-
|
|
6
|
+
import { s } from "../../../../ItemRoot.module-aMBsZnCj.mjs";
|
|
7
7
|
const n = ({
|
|
8
8
|
children: m,
|
|
9
9
|
theme: r,
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { RibbonProps } from './Ribbon.props';
|
|
3
|
+
export declare const DEFAULT_OFFSET = 86;
|
|
4
|
+
export declare const Ribbon: React.ForwardRefExoticComponent<Omit<RibbonProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
//# sourceMappingURL=Ribbon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Ribbon.d.ts","sourceRoot":"","sources":["../../../src/components/Ribbon/Ribbon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAU7C,eAAO,MAAM,cAAc,KAAK,CAAC;AAEjC,eAAO,MAAM,MAAM,iGA2DjB,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as _ } from "react";
|
|
3
|
+
import { c as o } from "../../index-L8X2o7IH.mjs";
|
|
4
|
+
import { useThemeClassName as w } from "../../hooks/useThemeClassName/useThemeClassName.js";
|
|
5
|
+
import '../../assets/Ribbon.css';const N = "_container_1w362_1", f = "_ribbon_1w362_8", v = "_label_1w362_30", n = {
|
|
6
|
+
container: N,
|
|
7
|
+
"ribbon-wrapper": "_ribbon-wrapper_1w362_8",
|
|
8
|
+
ribbon: f,
|
|
9
|
+
label: v
|
|
10
|
+
}, y = Math.sqrt(2), u = 86, x = _((b, t) => {
|
|
11
|
+
const {
|
|
12
|
+
label: d,
|
|
13
|
+
className: a,
|
|
14
|
+
theme: m,
|
|
15
|
+
offset: e = u,
|
|
16
|
+
children: s,
|
|
17
|
+
style: i = {},
|
|
18
|
+
...l
|
|
19
|
+
} = b, h = w(m), c = /* @__PURE__ */ r(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
style: {
|
|
23
|
+
width: y * e
|
|
24
|
+
},
|
|
25
|
+
className: o(n.ribbon, h),
|
|
26
|
+
children: /* @__PURE__ */ r("span", { className: n.label, children: d })
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
return s == null ? /* @__PURE__ */ r(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
ref: t,
|
|
33
|
+
style: { width: e, height: e, ...i },
|
|
34
|
+
className: o(n["ribbon-wrapper"], a),
|
|
35
|
+
...l,
|
|
36
|
+
children: c
|
|
37
|
+
}
|
|
38
|
+
) : /* @__PURE__ */ p(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
ref: t,
|
|
42
|
+
className: o(n.container, a),
|
|
43
|
+
style: i,
|
|
44
|
+
...l,
|
|
45
|
+
children: [
|
|
46
|
+
s,
|
|
47
|
+
/* @__PURE__ */ r(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
style: {
|
|
51
|
+
width: e,
|
|
52
|
+
height: e
|
|
53
|
+
},
|
|
54
|
+
className: n["ribbon-wrapper"],
|
|
55
|
+
children: c
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
});
|
|
62
|
+
x.displayName = "Ribbon";
|
|
63
|
+
export {
|
|
64
|
+
u as DEFAULT_OFFSET,
|
|
65
|
+
x as Ribbon
|
|
66
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RibbonTheme } from './Ribbon.themes';
|
|
3
|
+
type DivProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
4
|
+
export interface RibbonProps extends DivProps {
|
|
5
|
+
/**
|
|
6
|
+
* Content to wrap with the ribbon.
|
|
7
|
+
*
|
|
8
|
+
* **With children** - Ribbon renders a `position: relative` container
|
|
9
|
+
* around the children and positions itself inside it. No extra CSS needed
|
|
10
|
+
* on the parent.
|
|
11
|
+
*
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <Ribbon label="Pro" theme={RibbonPrimaryTheme}>
|
|
14
|
+
* <Card>
|
|
15
|
+
* {content}
|
|
16
|
+
* </Card>
|
|
17
|
+
* </Ribbon>
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* **Without children** - only the ribbon element is rendered. It
|
|
21
|
+
* has `position: absolute` and is positioned to the top-right corner via
|
|
22
|
+
* `top` and `right`. Place it inside a parent with non-static position so
|
|
23
|
+
* it can be anchored correctly.
|
|
24
|
+
*
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <Card style={{ position: 'relative' }}>
|
|
27
|
+
* <Ribbon label="Pro" theme={RibbonPrimaryTheme} />
|
|
28
|
+
* {content}
|
|
29
|
+
* </Card>
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
children?: ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Ribbon label.
|
|
35
|
+
*/
|
|
36
|
+
label?: ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Ribbon tips offset from the top-right corner.
|
|
39
|
+
*/
|
|
40
|
+
offset?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Object with CSS theme properties.
|
|
43
|
+
*/
|
|
44
|
+
theme: RibbonTheme;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=Ribbon.props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Ribbon.props.d.ts","sourceRoot":"","sources":["../../../src/components/Ribbon/Ribbon.props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,KAAK,QAAQ,GAAG,KAAK,CAAC,iBAAiB,CACrC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EACpC,cAAc,CACf,CAAC;AAEF,MAAM,WAAW,WAAY,SAAQ,QAAQ;IAC3C;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,EAAE,WAAW,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type RibbonThemeKey = '--crm-ui-kit-ribbon-background-color' | '--crm-ui-kit-ribbon-color' | '--crm-ui-kit-ribbon-height' | '--crm-ui-kit-ribbon-font-size' | '--crm-ui-kit-ribbon-line-height' | '--crm-ui-kit-ribbon-font-weight' | '--crm-ui-kit-ribbon-text-transform';
|
|
2
|
+
export type RibbonTheme = {
|
|
3
|
+
[K in RibbonThemeKey]: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const RibbonPrimaryTheme: RibbonTheme;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=Ribbon.themes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Ribbon.themes.d.ts","sourceRoot":"","sources":["../../../src/components/Ribbon/Ribbon.themes.ts"],"names":[],"mappings":"AAAA,KAAK,cAAc,GACf,sCAAsC,GACtC,2BAA2B,GAC3B,4BAA4B,GAC5B,+BAA+B,GAC/B,iCAAiC,GACjC,iCAAiC,GACjC,oCAAoC,CAAC;AAEzC,MAAM,MAAM,WAAW,GAAG;KACvB,CAAC,IAAI,cAAc,GAAG,MAAM;CAC9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,WAQhC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const i = {
|
|
2
|
+
"--crm-ui-kit-ribbon-background-color": "var(--crm-ui-kit-color-error)",
|
|
3
|
+
"--crm-ui-kit-ribbon-color": "var(--crm-ui-kit-color-white)",
|
|
4
|
+
"--crm-ui-kit-ribbon-height": "19px",
|
|
5
|
+
"--crm-ui-kit-ribbon-font-size": "10px",
|
|
6
|
+
"--crm-ui-kit-ribbon-line-height": "14px",
|
|
7
|
+
"--crm-ui-kit-ribbon-font-weight": "700",
|
|
8
|
+
"--crm-ui-kit-ribbon-text-transform": "uppercase"
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
i as RibbonPrimaryTheme
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Ribbon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -6,7 +6,7 @@ import { noop as A } from "../../../../utils/noop/noop.js";
|
|
|
6
6
|
import { useSelectContext as D } from "../../Select.context.js";
|
|
7
7
|
import { getSelectItemTitle as H } from "../../Select.types.js";
|
|
8
8
|
import P from "../Option/Option.js";
|
|
9
|
-
import '../../../../assets/
|
|
9
|
+
import '../../../../assets/Item3.css';const T = "_item_mywsb_1", j = "_selected_mywsb_24", E = "_hovered_mywsb_30", s = {
|
|
10
10
|
item: T,
|
|
11
11
|
selected: j,
|
|
12
12
|
hovered: E
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import u, { forwardRef as k, useMemo as A, useRef as E, useCallback as m, useEffect as H } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { b as N } from "../../../../index-CitTBapb.mjs";
|
|
4
4
|
import { Portal as P } from "../../../Portal/Portal.js";
|
|
5
5
|
import { DropdownList as _ } from "../../../DropdownList/DropdownList.js";
|
|
6
|
-
import { mergeRefs as
|
|
7
|
-
import { noop as
|
|
8
|
-
import { useSelectContext as
|
|
9
|
-
const h = "Select.List",
|
|
6
|
+
import { mergeRefs as b } from "../../../../lib/utils.js";
|
|
7
|
+
import { noop as w } from "../../../../utils/noop/noop.js";
|
|
8
|
+
import { useSelectContext as y } from "../../Select.context.js";
|
|
9
|
+
const h = "Select.List", D = (r) => {
|
|
10
10
|
const { container: o, children: n } = r;
|
|
11
11
|
return o ? /* @__PURE__ */ c(P, { container: o, children: n }) : n;
|
|
12
|
-
},
|
|
12
|
+
}, T = k((r, o) => {
|
|
13
13
|
const { container: n, children: s, theme: C, className: g } = r, {
|
|
14
14
|
isOpened: t,
|
|
15
15
|
onOpen: i,
|
|
16
16
|
onHoveredIndexChange: v,
|
|
17
|
-
onChange: d =
|
|
17
|
+
onChange: d = w,
|
|
18
18
|
hoveredIndex: x,
|
|
19
19
|
value: f
|
|
20
|
-
} =
|
|
20
|
+
} = y(h), { items: p, itemsMap: I } = A(() => {
|
|
21
21
|
const e = {};
|
|
22
22
|
return { items: u.Children.toArray(s).map(
|
|
23
23
|
(l, M) => u.isValidElement(l) ? (e[l.props.item.value] = M, { ...l.props.item }) : {}
|
|
@@ -45,11 +45,11 @@ const h = "Select.List", T = (r) => {
|
|
|
45
45
|
return H(() => {
|
|
46
46
|
var e;
|
|
47
47
|
t && ((e = a.current) == null || e.focus());
|
|
48
|
-
}, [t]), /* @__PURE__ */ c(
|
|
48
|
+
}, [t]), /* @__PURE__ */ c(D, { container: n, children: /* @__PURE__ */ c(
|
|
49
49
|
_,
|
|
50
50
|
{
|
|
51
51
|
className: g,
|
|
52
|
-
ref:
|
|
52
|
+
ref: b(a, o),
|
|
53
53
|
isOpened: t,
|
|
54
54
|
theme: C,
|
|
55
55
|
onHoveredIndexChange: O,
|
|
@@ -60,7 +60,7 @@ const h = "Select.List", T = (r) => {
|
|
|
60
60
|
}
|
|
61
61
|
) });
|
|
62
62
|
});
|
|
63
|
-
|
|
63
|
+
T.displayName = h;
|
|
64
64
|
export {
|
|
65
|
-
|
|
65
|
+
T as List
|
|
66
66
|
};
|