@chayns-components/core 5.0.63 → 5.0.64
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/lib/cjs/components/list/List.js +35 -59
- package/lib/cjs/components/list/List.js.map +1 -1
- package/lib/cjs/components/list/List.utils.js +26 -0
- package/lib/cjs/components/list/List.utils.js.map +1 -0
- package/lib/cjs/components/list/list-item/ListItem.utils.js +47 -0
- package/lib/cjs/components/list/list-item/ListItem.utils.js.map +1 -0
- package/lib/cjs/index.js +19 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/components/list/List.js +35 -58
- package/lib/esm/components/list/List.js.map +1 -1
- package/lib/esm/components/list/List.utils.js +17 -0
- package/lib/esm/components/list/List.utils.js.map +1 -0
- package/lib/esm/components/list/list-item/ListItem.utils.js +38 -0
- package/lib/esm/components/list/list-item/ListItem.utils.js.map +1 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/types/components/list/List.utils.d.ts +9 -0
- package/lib/types/components/list/list-item/ListItem.utils.d.ts +14 -0
- package/lib/types/index.d.ts +2 -1
- package/package.json +2 -2
|
@@ -7,8 +7,7 @@ exports.default = exports.ListContext = void 0;
|
|
|
7
7
|
var _reactCompilerRuntime = require("react-compiler-runtime");
|
|
8
8
|
var _react = require("motion/react");
|
|
9
9
|
var _react2 = _interopRequireWildcard(require("react"));
|
|
10
|
-
var
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
var _List = require("./List.utils");
|
|
12
11
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
13
12
|
const ListContext = exports.ListContext = /*#__PURE__*/_react2.default.createContext({
|
|
14
13
|
isAnyItemExpandable: false,
|
|
@@ -20,13 +19,12 @@ ListContext.displayName = 'ListContext';
|
|
|
20
19
|
const List = t0 => {
|
|
21
20
|
"use memo";
|
|
22
21
|
|
|
23
|
-
const $ = (0, _reactCompilerRuntime.c)(
|
|
22
|
+
const $ = (0, _reactCompilerRuntime.c)(13);
|
|
24
23
|
const {
|
|
25
24
|
children,
|
|
26
25
|
isWrapped: t1
|
|
27
26
|
} = t0;
|
|
28
27
|
const isWrapped = t1 === undefined ? false : t1;
|
|
29
|
-
const isListItemElement = _temp;
|
|
30
28
|
const [openItemUuid, setOpenItemUuid] = (0, _react2.useState)(undefined);
|
|
31
29
|
let t2;
|
|
32
30
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -47,85 +45,63 @@ const List = t0 => {
|
|
|
47
45
|
}
|
|
48
46
|
const updateOpenItemUuid = t2;
|
|
49
47
|
let t3;
|
|
50
|
-
if ($[1]
|
|
51
|
-
t3 =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (found) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
if (isListItemElement(child_0) && !child_0.props.shouldHideIndicator && child_0.props.children !== undefined) {
|
|
58
|
-
found = true;
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
return found;
|
|
62
|
-
};
|
|
63
|
-
$[1] = t3;
|
|
48
|
+
if ($[1] !== children) {
|
|
49
|
+
t3 = (0, _List.shouldShowExpandIndicator)(children);
|
|
50
|
+
$[1] = children;
|
|
51
|
+
$[2] = t3;
|
|
64
52
|
} else {
|
|
65
|
-
t3 = $[
|
|
53
|
+
t3 = $[2];
|
|
66
54
|
}
|
|
67
|
-
const hasExpandableChildren = t3;
|
|
68
55
|
let t4;
|
|
69
|
-
if ($[
|
|
70
|
-
t4 =
|
|
71
|
-
|
|
72
|
-
$[3] = t4;
|
|
73
|
-
} else {
|
|
74
|
-
t4 = $[3];
|
|
75
|
-
}
|
|
76
|
-
let t5;
|
|
77
|
-
if ($[4] !== isWrapped || $[5] !== openItemUuid || $[6] !== t4) {
|
|
78
|
-
t5 = {
|
|
79
|
-
isAnyItemExpandable: t4,
|
|
56
|
+
if ($[3] !== isWrapped || $[4] !== openItemUuid || $[5] !== t3) {
|
|
57
|
+
t4 = {
|
|
58
|
+
isAnyItemExpandable: t3,
|
|
80
59
|
isWrapped,
|
|
81
60
|
openItemUuid,
|
|
82
61
|
updateOpenItemUuid
|
|
83
62
|
};
|
|
84
|
-
$[
|
|
85
|
-
$[
|
|
63
|
+
$[3] = isWrapped;
|
|
64
|
+
$[4] = openItemUuid;
|
|
65
|
+
$[5] = t3;
|
|
86
66
|
$[6] = t4;
|
|
87
|
-
$[7] = t5;
|
|
88
67
|
} else {
|
|
89
|
-
|
|
68
|
+
t4 = $[6];
|
|
90
69
|
}
|
|
91
|
-
const providerValue =
|
|
92
|
-
let
|
|
93
|
-
if ($[
|
|
94
|
-
|
|
70
|
+
const providerValue = t4;
|
|
71
|
+
let t5;
|
|
72
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
73
|
+
t5 = {
|
|
95
74
|
type: "tween"
|
|
96
75
|
};
|
|
97
|
-
$[
|
|
76
|
+
$[7] = t5;
|
|
98
77
|
} else {
|
|
99
|
-
|
|
78
|
+
t5 = $[7];
|
|
100
79
|
}
|
|
101
|
-
let
|
|
102
|
-
if ($[
|
|
103
|
-
|
|
104
|
-
transition:
|
|
80
|
+
let t6;
|
|
81
|
+
if ($[8] !== children) {
|
|
82
|
+
t6 = /*#__PURE__*/_react2.default.createElement(_react.MotionConfig, {
|
|
83
|
+
transition: t5
|
|
105
84
|
}, /*#__PURE__*/_react2.default.createElement(_react.AnimatePresence, {
|
|
106
85
|
initial: false
|
|
107
86
|
}, children));
|
|
108
|
-
$[
|
|
109
|
-
$[
|
|
87
|
+
$[8] = children;
|
|
88
|
+
$[9] = t6;
|
|
110
89
|
} else {
|
|
111
|
-
|
|
90
|
+
t6 = $[9];
|
|
112
91
|
}
|
|
113
|
-
let
|
|
114
|
-
if ($[
|
|
115
|
-
|
|
92
|
+
let t7;
|
|
93
|
+
if ($[10] !== providerValue || $[11] !== t6) {
|
|
94
|
+
t7 = /*#__PURE__*/_react2.default.createElement(ListContext.Provider, {
|
|
116
95
|
value: providerValue
|
|
117
|
-
},
|
|
118
|
-
$[
|
|
96
|
+
}, t6);
|
|
97
|
+
$[10] = providerValue;
|
|
98
|
+
$[11] = t6;
|
|
119
99
|
$[12] = t7;
|
|
120
|
-
$[13] = t8;
|
|
121
100
|
} else {
|
|
122
|
-
|
|
101
|
+
t7 = $[12];
|
|
123
102
|
}
|
|
124
|
-
return
|
|
103
|
+
return t7;
|
|
125
104
|
};
|
|
126
105
|
List.displayName = 'List';
|
|
127
106
|
var _default = exports.default = List;
|
|
128
|
-
function _temp(child) {
|
|
129
|
-
return /*#__PURE__*/_react2.default.isValidElement(child) && child.type === _ListItem.default;
|
|
130
|
-
}
|
|
131
107
|
//# sourceMappingURL=List.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","names":["_react","require","_react2","_interopRequireWildcard","
|
|
1
|
+
{"version":3,"file":"List.js","names":["_react","require","_react2","_interopRequireWildcard","_List","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ListContext","exports","React","createContext","isAnyItemExpandable","isWrapped","openItemUuid","undefined","updateOpenItemUuid","displayName","List","t0","$","_reactCompilerRuntime","c","children","t1","setOpenItemUuid","useState","t2","Symbol","for","uuid","t3","shouldOnlyOpen","currentOpenItemUuid","shouldShowExpandIndicator","t4","providerValue","t5","type","t6","createElement","MotionConfig","transition","AnimatePresence","initial","t7","Provider","_default"],"sources":["../../../../src/components/list/List.tsx"],"sourcesContent":["import { AnimatePresence, MotionConfig } from 'motion/react';\nimport React, { FC, ReactNode, useCallback, useMemo, useState } from 'react';\nimport { shouldShowExpandIndicator } from './List.utils';\n\ninterface IListContext {\n isAnyItemExpandable: boolean;\n isWrapped: boolean;\n openItemUuid: string | undefined;\n updateOpenItemUuid: (uuid: string, options?: { shouldOnlyOpen?: boolean }) => void;\n}\n\nexport const ListContext = React.createContext<IListContext>({\n isAnyItemExpandable: false,\n isWrapped: false,\n openItemUuid: undefined,\n updateOpenItemUuid: () => {},\n});\n\nListContext.displayName = 'ListContext';\n\ntype ListProps = {\n /**\n * The items of the list\n */\n children: ReactNode;\n /**\n * This value must be set for nested AccordionGroup components. This adjusts the style of\n * the head and the padding of the content accordions.\n */\n isWrapped?: boolean;\n};\n\nconst List: FC<ListProps> = ({ children, isWrapped = false }) => {\n 'use memo';\n\n const [openItemUuid, setOpenItemUuid] = useState<IListContext['openItemUuid']>(undefined);\n\n const updateOpenItemUuid = useCallback<IListContext['updateOpenItemUuid']>(\n (uuid, { shouldOnlyOpen } = {}) => {\n setOpenItemUuid((currentOpenItemUuid) => {\n if (currentOpenItemUuid === uuid && shouldOnlyOpen !== true) {\n return undefined;\n }\n\n return uuid;\n });\n },\n [setOpenItemUuid],\n );\n\n const providerValue = useMemo<IListContext>(\n () => ({\n isAnyItemExpandable: shouldShowExpandIndicator(children),\n isWrapped,\n openItemUuid,\n updateOpenItemUuid,\n }),\n [children, isWrapped, openItemUuid, updateOpenItemUuid],\n );\n\n return (\n <ListContext.Provider value={providerValue}>\n <MotionConfig transition={{ type: 'tween' }}>\n <AnimatePresence initial={false}>{children}</AnimatePresence>\n </MotionConfig>\n </ListContext.Provider>\n );\n};\n\nList.displayName = 'List';\n\nexport default List;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG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defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.shouldShowExpandIndicator = exports.isMarkedListItemElement = exports.isDirectListItemElement = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _ListItem = require("./list-item/ListItem.utils");
|
|
9
|
+
const isDirectListItemElement = node => /*#__PURE__*/(0, _react.isValidElement)(node) && node.type.displayName === 'ListItem';
|
|
10
|
+
exports.isDirectListItemElement = isDirectListItemElement;
|
|
11
|
+
const isMarkedListItemElement = node => /*#__PURE__*/(0, _react.isValidElement)(node) && typeof node.type !== 'string' && node.type.$$listItem === _ListItem.LIST_ITEM_MARKER;
|
|
12
|
+
exports.isMarkedListItemElement = isMarkedListItemElement;
|
|
13
|
+
const shouldShowExpandIndicator = node => _react.Children.toArray(node).some(child => {
|
|
14
|
+
if (isDirectListItemElement(child)) {
|
|
15
|
+
return child.props.isExpandable !== false && child.props.shouldHideIndicator !== true && child.props.children !== undefined;
|
|
16
|
+
}
|
|
17
|
+
if (isMarkedListItemElement(child)) {
|
|
18
|
+
return child.props.isExpandable !== false && child.props.shouldHideIndicator !== true;
|
|
19
|
+
}
|
|
20
|
+
if (/*#__PURE__*/(0, _react.isValidElement)(child) && child.props.children !== undefined) {
|
|
21
|
+
return shouldShowExpandIndicator(child.props.children);
|
|
22
|
+
}
|
|
23
|
+
return false;
|
|
24
|
+
});
|
|
25
|
+
exports.shouldShowExpandIndicator = shouldShowExpandIndicator;
|
|
26
|
+
//# sourceMappingURL=List.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"List.utils.js","names":["_react","require","_ListItem","isDirectListItemElement","node","isValidElement","type","displayName","exports","isMarkedListItemElement","$$listItem","LIST_ITEM_MARKER","shouldShowExpandIndicator","Children","toArray","some","child","props","isExpandable","shouldHideIndicator","children","undefined"],"sources":["../../../../src/components/list/List.utils.ts"],"sourcesContent":["import { Children, isValidElement, type ReactElement, type ReactNode } from 'react';\nimport { LIST_ITEM_MARKER } from './list-item/ListItem.utils';\n\nexport interface ListItemMetaProps {\n isExpandable?: boolean;\n shouldHideIndicator?: boolean;\n children?: ReactNode;\n}\n\ntype ListItemMarkedType = {\n $$listItem?: typeof LIST_ITEM_MARKER;\n};\n\nexport const isDirectListItemElement = (node: ReactNode): node is ReactElement<ListItemMetaProps> =>\n isValidElement(node) && (node.type as { displayName?: string }).displayName === 'ListItem';\n\nexport const isMarkedListItemElement = (node: ReactNode): node is ReactElement<ListItemMetaProps> =>\n isValidElement(node) &&\n typeof node.type !== 'string' &&\n (node.type as ListItemMarkedType).$$listItem === LIST_ITEM_MARKER;\n\nexport const shouldShowExpandIndicator = (node: ReactNode): boolean =>\n Children.toArray(node).some((child) => {\n if (isDirectListItemElement(child)) {\n return (\n child.props.isExpandable !== false &&\n child.props.shouldHideIndicator !== true &&\n child.props.children !== undefined\n );\n }\n\n if (isMarkedListItemElement(child)) {\n return child.props.isExpandable !== false && child.props.shouldHideIndicator !== true;\n }\n\n if (isValidElement<{ children?: ReactNode }>(child) && child.props.children !== undefined) {\n return shouldShowExpandIndicator(child.props.children);\n }\n\n return false;\n });\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAYO,MAAME,uBAAuB,GAAIC,IAAe,IACnD,iBAAAC,qBAAc,EAACD,IAAI,CAAC,IAAKA,IAAI,CAACE,IAAI,CAA8BC,WAAW,KAAK,UAAU;AAACC,OAAA,CAAAL,uBAAA,GAAAA,uBAAA;AAExF,MAAMM,uBAAuB,GAAIL,IAAe,IACnD,iBAAAC,qBAAc,EAACD,IAAI,CAAC,IACpB,OAAOA,IAAI,CAACE,IAAI,KAAK,QAAQ,IAC5BF,IAAI,CAACE,IAAI,CAAwBI,UAAU,KAAKC,0BAAgB;AAACH,OAAA,CAAAC,uBAAA,GAAAA,uBAAA;AAE/D,MAAMG,yBAAyB,GAAIR,IAAe,IACrDS,eAAQ,CAACC,OAAO,CAACV,IAAI,CAAC,CAACW,IAAI,CAAEC,KAAK,IAAK;EACnC,IAAIb,uBAAuB,CAACa,KAAK,CAAC,EAAE;IAChC,OACIA,KAAK,CAACC,KAAK,CAACC,YAAY,KAAK,KAAK,IAClCF,KAAK,CAACC,KAAK,CAACE,mBAAmB,KAAK,IAAI,IACxCH,KAAK,CAACC,KAAK,CAACG,QAAQ,KAAKC,SAAS;EAE1C;EAEA,IAAIZ,uBAAuB,CAACO,KAAK,CAAC,EAAE;IAChC,OAAOA,KAAK,CAACC,KAAK,CAACC,YAAY,KAAK,KAAK,IAAIF,KAAK,CAACC,KAAK,CAACE,mBAAmB,KAAK,IAAI;EACzF;EAEA,IAAI,iBAAAd,qBAAc,EAA2BW,KAAK,CAAC,IAAIA,KAAK,CAACC,KAAK,CAACG,QAAQ,KAAKC,SAAS,EAAE;IACvF,OAAOT,yBAAyB,CAACI,KAAK,CAACC,KAAK,CAACG,QAAQ,CAAC;EAC1D;EAEA,OAAO,KAAK;AAChB,CAAC,CAAC;AAACZ,OAAA,CAAAI,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.withListItemMarkerForwardRef = exports.withListItemMarker = exports.LIST_ITEM_MARKER = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
9
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
10
|
+
const LIST_ITEM_MARKER = exports.LIST_ITEM_MARKER = Symbol('ListItem');
|
|
11
|
+
const getDisplayName = Component => Component.displayName || Component.name || 'Component';
|
|
12
|
+
const withListItemMarker = Component => {
|
|
13
|
+
const WrappedComponent = props => {
|
|
14
|
+
const {
|
|
15
|
+
isExpandable = false,
|
|
16
|
+
shouldHideIndicator = false,
|
|
17
|
+
...restProps
|
|
18
|
+
} = props;
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement(Component, _extends({}, restProps, {
|
|
20
|
+
isExpandable: isExpandable,
|
|
21
|
+
shouldHideIndicator: shouldHideIndicator
|
|
22
|
+
}));
|
|
23
|
+
};
|
|
24
|
+
WrappedComponent.$$listItem = LIST_ITEM_MARKER;
|
|
25
|
+
WrappedComponent.displayName = `withListItemMarker(${getDisplayName(Component)})`;
|
|
26
|
+
return WrappedComponent;
|
|
27
|
+
};
|
|
28
|
+
exports.withListItemMarker = withListItemMarker;
|
|
29
|
+
const withListItemMarkerForwardRef = (render, displayName) => {
|
|
30
|
+
const Component = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
31
|
+
const {
|
|
32
|
+
isExpandable = true,
|
|
33
|
+
shouldHideIndicator = false,
|
|
34
|
+
...restProps
|
|
35
|
+
} = props;
|
|
36
|
+
return render({
|
|
37
|
+
...restProps,
|
|
38
|
+
isExpandable,
|
|
39
|
+
shouldHideIndicator
|
|
40
|
+
}, ref);
|
|
41
|
+
});
|
|
42
|
+
Component.$$listItem = LIST_ITEM_MARKER;
|
|
43
|
+
Component.displayName = displayName;
|
|
44
|
+
return Component;
|
|
45
|
+
};
|
|
46
|
+
exports.withListItemMarkerForwardRef = withListItemMarkerForwardRef;
|
|
47
|
+
//# sourceMappingURL=ListItem.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItem.utils.js","names":["_react","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","LIST_ITEM_MARKER","exports","Symbol","getDisplayName","Component","displayName","name","withListItemMarker","WrappedComponent","props","isExpandable","shouldHideIndicator","restProps","createElement","$$listItem","withListItemMarkerForwardRef","render","forwardRef","ref"],"sources":["../../../../../src/components/list/list-item/ListItem.utils.tsx"],"sourcesContent":["import React, {\n ComponentType,\n forwardRef,\n ForwardRefExoticComponent,\n ForwardRefRenderFunction,\n RefAttributes,\n} from 'react';\n\nexport const LIST_ITEM_MARKER = Symbol('ListItem');\n\nexport interface ListItemMetaProps {\n // eslint-disable-next-line react/no-unused-prop-types\n isExpandable?: boolean;\n // eslint-disable-next-line react/no-unused-prop-types\n shouldHideIndicator?: boolean;\n}\n\nexport type ListItemMarkedComponent<P> = ComponentType<P & ListItemMetaProps> & {\n $$listItem: typeof LIST_ITEM_MARKER;\n};\n\nexport type ListItemMarkedForwardRefComponent<P, R> = ForwardRefExoticComponent<\n P & ListItemMetaProps & RefAttributes<R>\n> & {\n $$listItem: typeof LIST_ITEM_MARKER;\n};\n\ntype DisplayNameComponent = {\n displayName?: string;\n name?: string;\n};\n\nconst getDisplayName = (Component: DisplayNameComponent): string =>\n Component.displayName || Component.name || 'Component';\n\nexport const withListItemMarker = <P,>(\n Component: ComponentType<P & ListItemMetaProps>,\n): ListItemMarkedComponent<P> => {\n const WrappedComponent = ((props: P & ListItemMetaProps) => {\n const { isExpandable = false, shouldHideIndicator = false, ...restProps } = props;\n\n return (\n <Component\n {...(restProps as P)}\n isExpandable={isExpandable}\n shouldHideIndicator={shouldHideIndicator}\n />\n );\n }) as ListItemMarkedComponent<P>;\n\n WrappedComponent.$$listItem = LIST_ITEM_MARKER;\n WrappedComponent.displayName = `withListItemMarker(${getDisplayName(Component)})`;\n\n return WrappedComponent;\n};\n\nexport const withListItemMarkerForwardRef = <P, R>(\n render: ForwardRefRenderFunction<R, P & ListItemMetaProps>,\n displayName: string,\n): ListItemMarkedForwardRefComponent<P, R> => {\n const Component = forwardRef<R, P & ListItemMetaProps>((props, ref) => {\n const { isExpandable = true, shouldHideIndicator = false, ...restProps } = props;\n\n return render(\n {\n ...(restProps as P),\n isExpandable,\n shouldHideIndicator,\n },\n ref,\n );\n }) as ListItemMarkedForwardRefComponent<P, R>;\n\n Component.$$listItem = LIST_ITEM_MARKER;\n Component.displayName = displayName;\n\n return Component;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAMe,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,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U,GAAGd,gBAAgB;EAC9CQ,gBAAgB,CAACH,WAAW,GAAG,sBAAsBF,cAAc,CAACC,SAAS,CAAC,GAAG;EAEjF,OAAOI,gBAAgB;AAC3B,CAAC;AAACP,OAAA,CAAAM,kBAAA,GAAAA,kBAAA;AAEK,MAAMQ,4BAA4B,GAAGA,CACxCC,MAA0D,EAC1DX,WAAmB,KACuB;EAC1C,MAAMD,SAAS,gBAAG,IAAAa,iBAAU,EAA2B,CAACR,KAAK,EAAES,GAAG,KAAK;IACnE,MAAM;MAAER,YAAY,GAAG,IAAI;MAAEC,mBAAmB,GAAG,KAAK;MAAE,GAAGC;IAAU,CAAC,GAAGH,KAAK;IAEhF,OAAOO,MAAM,CACT;MACI,GAAIJ,SAAe;MACnBF,YAAY;MACZC;IACJ,CAAC,EACDO,GACJ,CAAC;EACL,CAAC,CAA4C;EAE7Cd,SAAS,CAACU,UAAU,GAAGd,gBAAgB;EACvCI,SAAS,CAACC,WAAW,GAAGA,WAAW;EAEnC,OAAOD,SAAS;AACpB,CAAC;AAACH,OAAA,CAAAc,4BAAA,GAAAA,4BAAA","ignoreList":[]}
|
package/lib/cjs/index.js
CHANGED
|
@@ -243,6 +243,12 @@ Object.defineProperty(exports, "InputSize", {
|
|
|
243
243
|
return _Input.InputSize;
|
|
244
244
|
}
|
|
245
245
|
});
|
|
246
|
+
Object.defineProperty(exports, "LIST_ITEM_MARKER", {
|
|
247
|
+
enumerable: true,
|
|
248
|
+
get: function () {
|
|
249
|
+
return _ListItem2.LIST_ITEM_MARKER;
|
|
250
|
+
}
|
|
251
|
+
});
|
|
246
252
|
Object.defineProperty(exports, "List", {
|
|
247
253
|
enumerable: true,
|
|
248
254
|
get: function () {
|
|
@@ -549,6 +555,18 @@ Object.defineProperty(exports, "useIsTouch", {
|
|
|
549
555
|
return _environment.useIsTouch;
|
|
550
556
|
}
|
|
551
557
|
});
|
|
558
|
+
Object.defineProperty(exports, "withListItemMarker", {
|
|
559
|
+
enumerable: true,
|
|
560
|
+
get: function () {
|
|
561
|
+
return _ListItem2.withListItemMarker;
|
|
562
|
+
}
|
|
563
|
+
});
|
|
564
|
+
Object.defineProperty(exports, "withListItemMarkerForwardRef", {
|
|
565
|
+
enumerable: true,
|
|
566
|
+
get: function () {
|
|
567
|
+
return _ListItem2.withListItemMarkerForwardRef;
|
|
568
|
+
}
|
|
569
|
+
});
|
|
552
570
|
var _Accordion = _interopRequireDefault(require("./components/accordion/Accordion"));
|
|
553
571
|
var _AccordionContent = _interopRequireDefault(require("./components/accordion/accordion-content/AccordionContent"));
|
|
554
572
|
var _AccordionGroup = _interopRequireDefault(require("./components/accordion/accordion-group/AccordionGroup"));
|
|
@@ -587,6 +605,7 @@ var _Input = _interopRequireWildcard(require("./components/input/Input"));
|
|
|
587
605
|
var _List = _interopRequireDefault(require("./components/list/List"));
|
|
588
606
|
var _ListItemContent = _interopRequireDefault(require("./components/list/list-item/list-item-content/ListItemContent"));
|
|
589
607
|
var _ListItem = _interopRequireDefault(require("./components/list/list-item/ListItem"));
|
|
608
|
+
var _ListItem2 = require("./components/list/list-item/ListItem.utils");
|
|
590
609
|
var _MentionFinder = _interopRequireDefault(require("./components/mention-finder/MentionFinder"));
|
|
591
610
|
var _MultiActionButton = _interopRequireDefault(require("./components/multi-action-button/MultiActionButton"));
|
|
592
611
|
var _NumberInput = _interopRequireDefault(require("./components/number-input/NumberInput"));
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_Accordion","_interopRequireDefault","require","_AccordionContent","_AccordionGroup","_AccordionIntro","_AccordionItem","_AmountControl","_VerificationBadge","_AreaContextProvider","_interopRequireWildcard","_Badge","_Button","_Checkbox","_ColorSchemeProvider","_Badge2","_container","_dropdown","_element","_ref","_Filter","_AnimatedNumber","_FileList","_FileSelect","_DropdownBodyWrapper","_ComboBox","_ContentCard","_HighlightSlider","_ContextMenu","_ContextMenu2","_ExpandableContent","_FileInput","_FilterButton","_FilterButtons","_GridImage","_GroupedImage","_Icon","_Input","_List","_ListItemContent","_ListItem","_MentionFinder","_MultiActionButton","_NumberInput","_PageProvider","_Popup","_PopupContent","_ProgressBar","_popup","_RadioButtonGroup","_RadioButton","_ScrollView","_SearchBox","_SearchInput","_SelectButton","_SetupWizardItem","_SetupWizard","_SharingContextMenu","_SharingBar","_SharingButton","_Signature","_SliderButton","_Slider","_SmallWaitCursor","_TagInput","_TextArea","_Tooltip","_Truncation","_mentionFinder","_contentCard","_file","_filterButtons","_MultiActionButton2","_truncation","_environment","_fileDialog","_isTobitEmployee","_pageProvider","_uploadFile","_ComboBox2","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as VerificationBadge } from './components/verification-badge/VerificationBadge';\nexport {\n AreaContext,\n default as AreaProvider,\n} from './components/area-provider/AreaContextProvider';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport {\n default as ColorSchemeProvider,\n useColorScheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { BadgeSize, BadgeDesign } from './components/badge/Badge.types';\nexport type {\n ColorSchemeContextProps,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { useContainer, ContainerAnchor } from './hooks/container';\nexport { DropdownDirection, type DropdownCoordinates } from './types/dropdown';\nexport { useIsMeasuredClone } from './hooks/element';\nexport { useCombinedRefs } from './hooks/ref';\nexport { default as Filter, type FilterRightIcon } from './components/filter/Filter';\nexport {\n type SortItem,\n type SearchConfig,\n type SortConfig,\n type CheckboxConfig,\n type FilterButtonConfig,\n type FilterRef,\n} from './types/filter';\nexport { default as AnimatedNumber } from './components/animated-number/AnimatedNumber';\nexport {\n default as FileList,\n type IFileItem as FileListItem,\n} from './components/file-list/FileList';\nexport { default as FileSelect } from './components/file-select/FileSelect';\nexport { default as DropdownBodyWrapper } from './components/dropdown-body-wrapper/DropdownBodyWrapper';\nexport { default as ComboBox } from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as HighlightSlider } from './components/highlight-slider/HighlightSlider';\nexport type { HighlightSliderItemColors as HighlightSliderColors } from './components/highlight-slider/highlight-slider-item/HighlightSliderItem';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport {\n ContextMenuAlignment,\n type ContextMenuCoordinates,\n type ContextMenuItem,\n type ContextMenuProps,\n type ContextMenuRef,\n} from './components/context-menu/ContextMenu.types';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport {\n default as FileInput,\n type FileInputRef,\n STREAMINGSERVICE_FILE_TYPES,\n TSIMG_FILE_TYPES,\n} from './components/file-input/FileInput';\nexport { default as FilterButton } from './components/filter-buttons/filter-button/FilterButton';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as GroupedImage } from './components/grouped-image/GroupedImage';\nexport { default as Icon, type IconProps } from './components/icon/Icon';\nexport { default as Input, InputSize } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport {\n default as ListItem,\n type ListItemElements,\n type ListItemProps,\n type ListItemRef,\n} from './components/list/list-item/ListItem';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as MultiActionButton } from './components/multi-action-button/MultiActionButton';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as PageProvider } from './components/page-provider/PageProvider';\nexport { default as Popup } from './components/popup/Popup';\nexport { default as PopupContent } from './components/popup/popup-content/PopupContent';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport { PopupAlignment } from './types/popup';\nexport type { PopupProps } from './components/popup/Popup.types';\nexport {\n default as RadioButtonGroup,\n type RadioButtonGroupRef,\n} from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingContextMenu } from './components/sharing-context-menu/SharingContextMenu';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as SharingButton } from './components/sharing-button/SharingButton';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport type { Tag } from './types/tagInput';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport type { TagInputRef } from './components/tag-input/TagInput';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { MentionFinderPopupAlignment } from './constants/mentionFinder';\nexport { useElementSize } from './hooks/element';\nexport type { BrowserName } from './types/chayns';\nexport { ContentCardType } from './types/contentCard';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport { isValidFileType } from './utils/file';\nexport type { FileInputFileItem } from './types/fileInput';\nexport { FilterButtonItemShape, FilterButtonSize } from './types/filterButtons';\nexport type { IFilterButtonItem as FilterButtonItem } from './types/filterButtons';\nexport type { IListItemRightElements } from './types/list';\nexport type { PopupRef } from './types/popup';\nexport type { RadioButtonItem } from './types/radioButton';\nexport type {\n ISearchBoxItem as SearchBoxItem,\n ISearchBoxItems as SearchBoxItems,\n} from './types/searchBox';\nexport type { SelectButtonItem } from './types/selectButton';\nexport type { SliderButtonItem } from './types/slider-button';\nexport {\n type MultiActionButtonAction,\n type MultiActionButtonActionEvent,\n type MultiActionButtonActionStatus,\n MultiActionButtonHeight,\n type MultiActionButtonProps,\n type MultiActionButtonSecondaryContextMenu,\n MultiActionButtonStatusType,\n} from './components/multi-action-button/MultiActionButton.types';\nexport { ClampPosition } from './types/truncation';\nexport { useIsTouch } from './utils/environment';\nexport { filterFilesByMimeType, getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\nexport type { Theme } from './components/color-scheme-provider/ColorSchemeProvider';\nexport { ComboBoxSize } from './components/combobox/ComboBox.types';\nexport type {\n IComboBoxItem as ComboBoxItem,\n ComboBoxTextStyles,\n IComboBoxItems as ComboBoxItems,\n ComboBoxRef,\n} from './components/combobox/ComboBox.types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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_AccordionContent","_AccordionGroup","_AccordionIntro","_AccordionItem","_AmountControl","_VerificationBadge","_AreaContextProvider","_interopRequireWildcard","_Badge","_Button","_Checkbox","_ColorSchemeProvider","_Badge2","_container","_dropdown","_element","_ref","_Filter","_AnimatedNumber","_FileList","_FileSelect","_DropdownBodyWrapper","_ComboBox","_ContentCard","_HighlightSlider","_ContextMenu","_ContextMenu2","_ExpandableContent","_FileInput","_FilterButton","_FilterButtons","_GridImage","_GroupedImage","_Icon","_Input","_List","_ListItemContent","_ListItem","_ListItem2","_MentionFinder","_MultiActionButton","_NumberInput","_PageProvider","_Popup","_PopupContent","_ProgressBar","_popup","_RadioButtonGroup","_RadioButton","_ScrollView","_SearchBox","_SearchInput","_SelectButton","_SetupWizardItem","_SetupWizard","_SharingContextMenu","_SharingBar","_SharingButton","_Signature","_SliderButton","_Slider","_SmallWaitCursor","_TagInput","_TextArea","_Tooltip","_Truncation","_mentionFinder","_contentCard","_file","_filterButtons","_MultiActionButton2","_truncation","_environment","_fileDialog","_isTobitEmployee","_pageProvider","_uploadFile","_ComboBox2","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as VerificationBadge } from './components/verification-badge/VerificationBadge';\nexport {\n AreaContext,\n default as AreaProvider,\n} from './components/area-provider/AreaContextProvider';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport {\n default as ColorSchemeProvider,\n useColorScheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { BadgeSize, BadgeDesign } from './components/badge/Badge.types';\nexport type {\n ColorSchemeContextProps,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { useContainer, ContainerAnchor } from './hooks/container';\nexport { DropdownDirection, type DropdownCoordinates } from './types/dropdown';\nexport { useIsMeasuredClone } from './hooks/element';\nexport { useCombinedRefs } from './hooks/ref';\nexport { default as Filter, type FilterRightIcon } from './components/filter/Filter';\nexport {\n type SortItem,\n type SearchConfig,\n type SortConfig,\n type CheckboxConfig,\n type FilterButtonConfig,\n type FilterRef,\n} from './types/filter';\nexport { default as AnimatedNumber } from './components/animated-number/AnimatedNumber';\nexport {\n default as FileList,\n type IFileItem as FileListItem,\n} from './components/file-list/FileList';\nexport { default as FileSelect } from './components/file-select/FileSelect';\nexport { default as DropdownBodyWrapper } from './components/dropdown-body-wrapper/DropdownBodyWrapper';\nexport { default as ComboBox } from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as HighlightSlider } from './components/highlight-slider/HighlightSlider';\nexport type { HighlightSliderItemColors as HighlightSliderColors } from './components/highlight-slider/highlight-slider-item/HighlightSliderItem';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport {\n ContextMenuAlignment,\n type ContextMenuCoordinates,\n type ContextMenuItem,\n type ContextMenuProps,\n type ContextMenuRef,\n} from './components/context-menu/ContextMenu.types';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport {\n default as FileInput,\n type FileInputRef,\n STREAMINGSERVICE_FILE_TYPES,\n TSIMG_FILE_TYPES,\n} from './components/file-input/FileInput';\nexport { default as FilterButton } from './components/filter-buttons/filter-button/FilterButton';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as GroupedImage } from './components/grouped-image/GroupedImage';\nexport { default as Icon, type IconProps } from './components/icon/Icon';\nexport { default as Input, InputSize } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport {\n default as ListItem,\n type ListItemElements,\n type ListItemProps,\n type ListItemRef,\n type ListItemSize,\n} from './components/list/list-item/ListItem';\nexport {\n type ListItemMarkedForwardRefComponent,\n type ListItemMarkedComponent,\n type ListItemMetaProps,\n LIST_ITEM_MARKER,\n withListItemMarker,\n withListItemMarkerForwardRef,\n} from './components/list/list-item/ListItem.utils';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as MultiActionButton } from './components/multi-action-button/MultiActionButton';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as PageProvider } from './components/page-provider/PageProvider';\nexport { default as Popup } from './components/popup/Popup';\nexport { default as PopupContent } from './components/popup/popup-content/PopupContent';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport { PopupAlignment } from './types/popup';\nexport type { PopupProps } from './components/popup/Popup.types';\nexport {\n default as RadioButtonGroup,\n type RadioButtonGroupRef,\n} from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingContextMenu } from './components/sharing-context-menu/SharingContextMenu';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as SharingButton } from './components/sharing-button/SharingButton';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport type { Tag } from './types/tagInput';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport type { TagInputRef } from './components/tag-input/TagInput';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { MentionFinderPopupAlignment } from './constants/mentionFinder';\nexport { useElementSize } from './hooks/element';\nexport type { BrowserName } from './types/chayns';\nexport { ContentCardType } from './types/contentCard';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport { isValidFileType } from './utils/file';\nexport type { FileInputFileItem } from './types/fileInput';\nexport { FilterButtonItemShape, FilterButtonSize } from './types/filterButtons';\nexport type { IFilterButtonItem as FilterButtonItem } from './types/filterButtons';\nexport type { IListItemRightElements } from './types/list';\nexport type { PopupRef } from './types/popup';\nexport type { RadioButtonItem } from './types/radioButton';\nexport type {\n ISearchBoxItem as SearchBoxItem,\n ISearchBoxItems as SearchBoxItems,\n} from './types/searchBox';\nexport type { SelectButtonItem } from './types/selectButton';\nexport type { SliderButtonItem } from './types/slider-button';\nexport {\n type MultiActionButtonAction,\n type MultiActionButtonActionEvent,\n type MultiActionButtonActionStatus,\n MultiActionButtonHeight,\n type MultiActionButtonProps,\n type MultiActionButtonSecondaryContextMenu,\n MultiActionButtonStatusType,\n} from './components/multi-action-button/MultiActionButton.types';\nexport { ClampPosition } from './types/truncation';\nexport { useIsTouch } from './utils/environment';\nexport { filterFilesByMimeType, getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\nexport type { Theme } from './components/color-scheme-provider/ColorSchemeProvider';\nexport { ComboBoxSize } from './components/combobox/ComboBox.types';\nexport type {\n IComboBoxItem as ComboBoxItem,\n ComboBoxTextStyles,\n IComboBoxItems as ComboBoxItems,\n ComboBoxRef,\n} from './components/combobox/ComboBox.types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,eAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,eAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,cAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,cAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,kBAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,oBAAA,GAAAC,uBAAA,CAAAR,OAAA;AAIA,IAAAS,MAAA,GAAAV,sBAAA,CAAAC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C,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAAA,SAAAjF,uBAAAgF,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAK,UAAA,GAAAL,CAAA,KAAAU,OAAA,EAAAV,CAAA","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as _c } from "react-compiler-runtime";
|
|
2
2
|
import { AnimatePresence, MotionConfig } from 'motion/react';
|
|
3
3
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
4
|
-
import
|
|
4
|
+
import { shouldShowExpandIndicator } from './List.utils';
|
|
5
5
|
export const ListContext = /*#__PURE__*/React.createContext({
|
|
6
6
|
isAnyItemExpandable: false,
|
|
7
7
|
isWrapped: false,
|
|
@@ -12,13 +12,12 @@ ListContext.displayName = 'ListContext';
|
|
|
12
12
|
const List = t0 => {
|
|
13
13
|
"use memo";
|
|
14
14
|
|
|
15
|
-
const $ = _c(
|
|
15
|
+
const $ = _c(13);
|
|
16
16
|
const {
|
|
17
17
|
children,
|
|
18
18
|
isWrapped: t1
|
|
19
19
|
} = t0;
|
|
20
20
|
const isWrapped = t1 === undefined ? false : t1;
|
|
21
|
-
const isListItemElement = _temp;
|
|
22
21
|
const [openItemUuid, setOpenItemUuid] = useState(undefined);
|
|
23
22
|
let t2;
|
|
24
23
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -39,85 +38,63 @@ const List = t0 => {
|
|
|
39
38
|
}
|
|
40
39
|
const updateOpenItemUuid = t2;
|
|
41
40
|
let t3;
|
|
42
|
-
if ($[1]
|
|
43
|
-
t3 =
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if (found) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
if (isListItemElement(child_0) && !child_0.props.shouldHideIndicator && child_0.props.children !== undefined) {
|
|
50
|
-
found = true;
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
return found;
|
|
54
|
-
};
|
|
55
|
-
$[1] = t3;
|
|
41
|
+
if ($[1] !== children) {
|
|
42
|
+
t3 = shouldShowExpandIndicator(children);
|
|
43
|
+
$[1] = children;
|
|
44
|
+
$[2] = t3;
|
|
56
45
|
} else {
|
|
57
|
-
t3 = $[
|
|
46
|
+
t3 = $[2];
|
|
58
47
|
}
|
|
59
|
-
const hasExpandableChildren = t3;
|
|
60
48
|
let t4;
|
|
61
|
-
if ($[
|
|
62
|
-
t4 =
|
|
63
|
-
|
|
64
|
-
$[3] = t4;
|
|
65
|
-
} else {
|
|
66
|
-
t4 = $[3];
|
|
67
|
-
}
|
|
68
|
-
let t5;
|
|
69
|
-
if ($[4] !== isWrapped || $[5] !== openItemUuid || $[6] !== t4) {
|
|
70
|
-
t5 = {
|
|
71
|
-
isAnyItemExpandable: t4,
|
|
49
|
+
if ($[3] !== isWrapped || $[4] !== openItemUuid || $[5] !== t3) {
|
|
50
|
+
t4 = {
|
|
51
|
+
isAnyItemExpandable: t3,
|
|
72
52
|
isWrapped,
|
|
73
53
|
openItemUuid,
|
|
74
54
|
updateOpenItemUuid
|
|
75
55
|
};
|
|
76
|
-
$[
|
|
77
|
-
$[
|
|
56
|
+
$[3] = isWrapped;
|
|
57
|
+
$[4] = openItemUuid;
|
|
58
|
+
$[5] = t3;
|
|
78
59
|
$[6] = t4;
|
|
79
|
-
$[7] = t5;
|
|
80
60
|
} else {
|
|
81
|
-
|
|
61
|
+
t4 = $[6];
|
|
82
62
|
}
|
|
83
|
-
const providerValue =
|
|
84
|
-
let
|
|
85
|
-
if ($[
|
|
86
|
-
|
|
63
|
+
const providerValue = t4;
|
|
64
|
+
let t5;
|
|
65
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
66
|
+
t5 = {
|
|
87
67
|
type: "tween"
|
|
88
68
|
};
|
|
89
|
-
$[
|
|
69
|
+
$[7] = t5;
|
|
90
70
|
} else {
|
|
91
|
-
|
|
71
|
+
t5 = $[7];
|
|
92
72
|
}
|
|
93
|
-
let
|
|
94
|
-
if ($[
|
|
95
|
-
|
|
96
|
-
transition:
|
|
73
|
+
let t6;
|
|
74
|
+
if ($[8] !== children) {
|
|
75
|
+
t6 = /*#__PURE__*/React.createElement(MotionConfig, {
|
|
76
|
+
transition: t5
|
|
97
77
|
}, /*#__PURE__*/React.createElement(AnimatePresence, {
|
|
98
78
|
initial: false
|
|
99
79
|
}, children));
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
80
|
+
$[8] = children;
|
|
81
|
+
$[9] = t6;
|
|
102
82
|
} else {
|
|
103
|
-
|
|
83
|
+
t6 = $[9];
|
|
104
84
|
}
|
|
105
|
-
let
|
|
106
|
-
if ($[
|
|
107
|
-
|
|
85
|
+
let t7;
|
|
86
|
+
if ($[10] !== providerValue || $[11] !== t6) {
|
|
87
|
+
t7 = /*#__PURE__*/React.createElement(ListContext.Provider, {
|
|
108
88
|
value: providerValue
|
|
109
|
-
},
|
|
110
|
-
$[
|
|
89
|
+
}, t6);
|
|
90
|
+
$[10] = providerValue;
|
|
91
|
+
$[11] = t6;
|
|
111
92
|
$[12] = t7;
|
|
112
|
-
$[13] = t8;
|
|
113
93
|
} else {
|
|
114
|
-
|
|
94
|
+
t7 = $[12];
|
|
115
95
|
}
|
|
116
|
-
return
|
|
96
|
+
return t7;
|
|
117
97
|
};
|
|
118
98
|
List.displayName = 'List';
|
|
119
99
|
export default List;
|
|
120
|
-
function _temp(child) {
|
|
121
|
-
return /*#__PURE__*/React.isValidElement(child) && child.type === ListItem;
|
|
122
|
-
}
|
|
123
100
|
//# sourceMappingURL=List.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","names":["AnimatePresence","MotionConfig","React","useCallback","useMemo","useState","
|
|
1
|
+
{"version":3,"file":"List.js","names":["AnimatePresence","MotionConfig","React","useCallback","useMemo","useState","shouldShowExpandIndicator","ListContext","createContext","isAnyItemExpandable","isWrapped","openItemUuid","undefined","updateOpenItemUuid","displayName","List","t0","$","_c","children","t1","setOpenItemUuid","t2","Symbol","for","uuid","t3","shouldOnlyOpen","currentOpenItemUuid","t4","providerValue","t5","type","t6","createElement","transition","initial","t7","Provider"],"sources":["../../../../src/components/list/List.tsx"],"sourcesContent":["import { AnimatePresence, MotionConfig } from 'motion/react';\nimport React, { FC, ReactNode, useCallback, useMemo, useState } from 'react';\nimport { shouldShowExpandIndicator } from './List.utils';\n\ninterface IListContext {\n isAnyItemExpandable: boolean;\n isWrapped: boolean;\n openItemUuid: string | undefined;\n updateOpenItemUuid: (uuid: string, options?: { shouldOnlyOpen?: boolean }) => void;\n}\n\nexport const ListContext = React.createContext<IListContext>({\n isAnyItemExpandable: false,\n isWrapped: false,\n openItemUuid: undefined,\n updateOpenItemUuid: () => {},\n});\n\nListContext.displayName = 'ListContext';\n\ntype ListProps = {\n /**\n * The items of the list\n */\n children: ReactNode;\n /**\n * This value must be set for nested AccordionGroup components. This adjusts the style of\n * the head and the padding of the content accordions.\n */\n isWrapped?: boolean;\n};\n\nconst List: FC<ListProps> = ({ children, isWrapped = false }) => {\n 'use memo';\n\n const [openItemUuid, setOpenItemUuid] = useState<IListContext['openItemUuid']>(undefined);\n\n const updateOpenItemUuid = useCallback<IListContext['updateOpenItemUuid']>(\n (uuid, { shouldOnlyOpen } = {}) => {\n setOpenItemUuid((currentOpenItemUuid) => {\n if (currentOpenItemUuid === uuid && shouldOnlyOpen !== true) {\n return undefined;\n }\n\n return uuid;\n });\n },\n [setOpenItemUuid],\n );\n\n const providerValue = useMemo<IListContext>(\n () => ({\n isAnyItemExpandable: shouldShowExpandIndicator(children),\n isWrapped,\n openItemUuid,\n updateOpenItemUuid,\n }),\n [children, isWrapped, openItemUuid, updateOpenItemUuid],\n );\n\n return (\n <ListContext.Provider value={providerValue}>\n <MotionConfig transition={{ type: 'tween' }}>\n <AnimatePresence initial={false}>{children}</AnimatePresence>\n </MotionConfig>\n </ListContext.Provider>\n );\n};\n\nList.displayName = 'List';\n\nexport default List;\n"],"mappings":";AAAA,SAASA,eAAe,EAAEC,YAAY,QAAQ,cAAc;AAC5D,OAAOC,KAAK,IAAmBC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC5E,SAASC,yBAAyB,QAAQ,cAAc;AASxD,OAAO,MAAMC,WAAW,gBAAGL,KAAK,CAACM,aAAa,CAAe;EACzDC,mBAAmB,EAAE,KAAK;EAC1BC,SAAS,EAAE,KAAK;EAChBC,YAAY,EAAEC,SAAS;EACvBC,kBAAkB,EAAEA,CAAA,KAAM,CAAC;AAC/B,CAAC,CAAC;AAEFN,WAAW,CAACO,WAAW,GAAG,aAAa;AAcvC,MAAMC,IAAmB,GAAGC,EAAA;EAAA;;EAAA,MAAAC,CAAA,GAAAC,EAAA;EAAC;IAAAC,QAAA;IAAAT,SAAA,EAAAU;EAAA,IAAAJ,EAA+B;EAAnB,MAAAN,SAAA,GAAAU,EAAiB,KAAjBR,SAAiB,GAAjB,KAAiB,GAAjBQ,EAAiB;EAGtD,OAAAT,YAAA,EAAAU,eAAA,IAAwChB,QAAQ,CAA+BO,SAAS,CAAC;EAAC,IAAAU,EAAA;EAAA,IAAAL,CAAA,QAAAM,MAAA,CAAAC,GAAA;IAGtFF,EAAA,GAAAA,CAAAG,IAAA,EAAAC,EAAA;MAAO;QAAAC;MAAA,IAAAD,EAAuB,KAAvBd,SAAuB,GAAvB,CAAsB,CAAC,GAAvBc,EAAuB;MAC1BL,eAAe,CAACO,mBAAA;QACZ,IAAIA,mBAAmB,KAAKH,IAA+B,IAAvBE,cAAc,KAAK,IAAI;UAAA;QAAA;QA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IAAAoB,EAAA;EAAA,IAAApB,CAAA,SAAAa,aAAA,IAAAb,CAAA,SAAAgB,EAAA;IAHnBI,EAAA,gBAAAnC,KAAA,CAAAgC,aAAA,CAAA3B,WAAA,CAAA+B,QAAA;MAA6BR,KAAa,EAAbA;IAAa,GACtCG,EAGkB,CAAC;IAAAhB,CAAA,OAAAa,aAAA;IAAAb,CAAA,OAAAgB,EAAA;IAAAhB,CAAA,OAAAoB,EAAA;EAAA;IAAAA,EAAA,GAAApB,CAAA;EAAA;EAAA,OAJvBoB,EAIuB;AAAA,CAE9B;AAEDtB,IAAI,CAACD,WAAW,GAAG,MAAM;AAEzB,eAAeC,IAAI","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Children, isValidElement } from 'react';
|
|
2
|
+
import { LIST_ITEM_MARKER } from './list-item/ListItem.utils';
|
|
3
|
+
export const isDirectListItemElement = node => /*#__PURE__*/isValidElement(node) && node.type.displayName === 'ListItem';
|
|
4
|
+
export const isMarkedListItemElement = node => /*#__PURE__*/isValidElement(node) && typeof node.type !== 'string' && node.type.$$listItem === LIST_ITEM_MARKER;
|
|
5
|
+
export const shouldShowExpandIndicator = node => Children.toArray(node).some(child => {
|
|
6
|
+
if (isDirectListItemElement(child)) {
|
|
7
|
+
return child.props.isExpandable !== false && child.props.shouldHideIndicator !== true && child.props.children !== undefined;
|
|
8
|
+
}
|
|
9
|
+
if (isMarkedListItemElement(child)) {
|
|
10
|
+
return child.props.isExpandable !== false && child.props.shouldHideIndicator !== true;
|
|
11
|
+
}
|
|
12
|
+
if (/*#__PURE__*/isValidElement(child) && child.props.children !== undefined) {
|
|
13
|
+
return shouldShowExpandIndicator(child.props.children);
|
|
14
|
+
}
|
|
15
|
+
return false;
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=List.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"List.utils.js","names":["Children","isValidElement","LIST_ITEM_MARKER","isDirectListItemElement","node","type","displayName","isMarkedListItemElement","$$listItem","shouldShowExpandIndicator","toArray","some","child","props","isExpandable","shouldHideIndicator","children","undefined"],"sources":["../../../../src/components/list/List.utils.ts"],"sourcesContent":["import { Children, isValidElement, type ReactElement, type ReactNode } from 'react';\nimport { LIST_ITEM_MARKER } from './list-item/ListItem.utils';\n\nexport interface ListItemMetaProps {\n isExpandable?: boolean;\n shouldHideIndicator?: boolean;\n children?: ReactNode;\n}\n\ntype ListItemMarkedType = {\n $$listItem?: typeof LIST_ITEM_MARKER;\n};\n\nexport const isDirectListItemElement = (node: ReactNode): node is ReactElement<ListItemMetaProps> =>\n isValidElement(node) && (node.type as { displayName?: string }).displayName === 'ListItem';\n\nexport const isMarkedListItemElement = (node: ReactNode): node is ReactElement<ListItemMetaProps> =>\n isValidElement(node) &&\n typeof node.type !== 'string' &&\n (node.type as ListItemMarkedType).$$listItem === LIST_ITEM_MARKER;\n\nexport const shouldShowExpandIndicator = (node: ReactNode): boolean =>\n Children.toArray(node).some((child) => {\n if (isDirectListItemElement(child)) {\n return (\n child.props.isExpandable !== false &&\n child.props.shouldHideIndicator !== true &&\n child.props.children !== undefined\n );\n }\n\n if (isMarkedListItemElement(child)) {\n return child.props.isExpandable !== false && child.props.shouldHideIndicator !== true;\n }\n\n if (isValidElement<{ children?: ReactNode }>(child) && child.props.children !== undefined) {\n return shouldShowExpandIndicator(child.props.children);\n }\n\n return false;\n });\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,cAAc,QAA2C,OAAO;AACnF,SAASC,gBAAgB,QAAQ,4BAA4B;AAY7D,OAAO,MAAMC,uBAAuB,GAAIC,IAAe,IACnD,aAAAH,cAAc,CAACG,IAAI,CAAC,IAAKA,IAAI,CAACC,IAAI,CAA8BC,WAAW,KAAK,UAAU;AAE9F,OAAO,MAAMC,uBAAuB,GAAIH,IAAe,IACnD,aAAAH,cAAc,CAACG,IAAI,CAAC,IACpB,OAAOA,IAAI,CAACC,IAAI,KAAK,QAAQ,IAC5BD,IAAI,CAACC,IAAI,CAAwBG,UAAU,KAAKN,gBAAgB;AAErE,OAAO,MAAMO,yBAAyB,GAAIL,IAAe,IACrDJ,QAAQ,CAACU,OAAO,CAACN,IAAI,CAAC,CAACO,IAAI,CAAEC,KAAK,IAAK;EACnC,IAAIT,uBAAuB,CAACS,KAAK,CAAC,EAAE;IAChC,OACIA,KAAK,CAACC,KAAK,CAACC,YAAY,KAAK,KAAK,IAClCF,KAAK,CAACC,KAAK,CAACE,mBAAmB,KAAK,IAAI,IACxCH,KAAK,CAACC,KAAK,CAACG,QAAQ,KAAKC,SAAS;EAE1C;EAEA,IAAIV,uBAAuB,CAACK,KAAK,CAAC,EAAE;IAChC,OAAOA,KAAK,CAACC,KAAK,CAACC,YAAY,KAAK,KAAK,IAAIF,KAAK,CAACC,KAAK,CAACE,mBAAmB,KAAK,IAAI;EACzF;EAEA,IAAI,aAAAd,cAAc,CAA2BW,KAAK,CAAC,IAAIA,KAAK,CAACC,KAAK,CAACG,QAAQ,KAAKC,SAAS,EAAE;IACvF,OAAOR,yBAAyB,CAACG,KAAK,CAACC,KAAK,CAACG,QAAQ,CAAC;EAC1D;EAEA,OAAO,KAAK;AAChB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
|
+
export const LIST_ITEM_MARKER = Symbol('ListItem');
|
|
4
|
+
const getDisplayName = Component => Component.displayName || Component.name || 'Component';
|
|
5
|
+
export const withListItemMarker = Component => {
|
|
6
|
+
const WrappedComponent = props => {
|
|
7
|
+
const {
|
|
8
|
+
isExpandable = false,
|
|
9
|
+
shouldHideIndicator = false,
|
|
10
|
+
...restProps
|
|
11
|
+
} = props;
|
|
12
|
+
return /*#__PURE__*/React.createElement(Component, _extends({}, restProps, {
|
|
13
|
+
isExpandable: isExpandable,
|
|
14
|
+
shouldHideIndicator: shouldHideIndicator
|
|
15
|
+
}));
|
|
16
|
+
};
|
|
17
|
+
WrappedComponent.$$listItem = LIST_ITEM_MARKER;
|
|
18
|
+
WrappedComponent.displayName = `withListItemMarker(${getDisplayName(Component)})`;
|
|
19
|
+
return WrappedComponent;
|
|
20
|
+
};
|
|
21
|
+
export const withListItemMarkerForwardRef = (render, displayName) => {
|
|
22
|
+
const Component = /*#__PURE__*/forwardRef((props, ref) => {
|
|
23
|
+
const {
|
|
24
|
+
isExpandable = true,
|
|
25
|
+
shouldHideIndicator = false,
|
|
26
|
+
...restProps
|
|
27
|
+
} = props;
|
|
28
|
+
return render({
|
|
29
|
+
...restProps,
|
|
30
|
+
isExpandable,
|
|
31
|
+
shouldHideIndicator
|
|
32
|
+
}, ref);
|
|
33
|
+
});
|
|
34
|
+
Component.$$listItem = LIST_ITEM_MARKER;
|
|
35
|
+
Component.displayName = displayName;
|
|
36
|
+
return Component;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=ListItem.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItem.utils.js","names":["React","forwardRef","LIST_ITEM_MARKER","Symbol","getDisplayName","Component","displayName","name","withListItemMarker","WrappedComponent","props","isExpandable","shouldHideIndicator","restProps","createElement","_extends","$$listItem","withListItemMarkerForwardRef","render","ref"],"sources":["../../../../../src/components/list/list-item/ListItem.utils.tsx"],"sourcesContent":["import React, {\n ComponentType,\n forwardRef,\n ForwardRefExoticComponent,\n ForwardRefRenderFunction,\n RefAttributes,\n} from 'react';\n\nexport const LIST_ITEM_MARKER = Symbol('ListItem');\n\nexport interface ListItemMetaProps {\n // eslint-disable-next-line react/no-unused-prop-types\n isExpandable?: boolean;\n // eslint-disable-next-line react/no-unused-prop-types\n shouldHideIndicator?: boolean;\n}\n\nexport type ListItemMarkedComponent<P> = ComponentType<P & ListItemMetaProps> & {\n $$listItem: typeof LIST_ITEM_MARKER;\n};\n\nexport type ListItemMarkedForwardRefComponent<P, R> = ForwardRefExoticComponent<\n P & ListItemMetaProps & RefAttributes<R>\n> & {\n $$listItem: typeof LIST_ITEM_MARKER;\n};\n\ntype DisplayNameComponent = {\n displayName?: string;\n name?: string;\n};\n\nconst getDisplayName = (Component: DisplayNameComponent): string =>\n Component.displayName || Component.name || 'Component';\n\nexport const withListItemMarker = <P,>(\n Component: ComponentType<P & ListItemMetaProps>,\n): ListItemMarkedComponent<P> => {\n const WrappedComponent = ((props: P & ListItemMetaProps) => {\n const { isExpandable = false, shouldHideIndicator = false, ...restProps } = props;\n\n return (\n <Component\n {...(restProps as P)}\n isExpandable={isExpandable}\n shouldHideIndicator={shouldHideIndicator}\n />\n );\n }) as ListItemMarkedComponent<P>;\n\n WrappedComponent.$$listItem = LIST_ITEM_MARKER;\n WrappedComponent.displayName = `withListItemMarker(${getDisplayName(Component)})`;\n\n return WrappedComponent;\n};\n\nexport const withListItemMarkerForwardRef = <P, R>(\n render: ForwardRefRenderFunction<R, P & ListItemMetaProps>,\n displayName: string,\n): ListItemMarkedForwardRefComponent<P, R> => {\n const Component = forwardRef<R, P & ListItemMetaProps>((props, ref) => {\n const { isExpandable = true, shouldHideIndicator = false, ...restProps } = props;\n\n return render(\n {\n ...(restProps as P),\n isExpandable,\n shouldHideIndicator,\n },\n ref,\n );\n }) as ListItemMarkedForwardRefComponent<P, R>;\n\n Component.$$listItem = LIST_ITEM_MARKER;\n Component.displayName = displayName;\n\n return Component;\n};\n"],"mappings":";AAAA,OAAOA,KAAK,IAERC,UAAU,QAIP,OAAO;AAEd,OAAO,MAAMC,gBAAgB,GAAGC,MAAM,CAAC,UAAU,CAAC;AAwBlD,MAAMC,cAAc,GAAIC,SAA+B,IACnDA,SAAS,CAACC,WAAW,IAAID,SAAS,CAACE,IAAI,IAAI,WAAW;AAE1D,OAAO,MAAMC,kBAAkB,GAC3BH,SAA+C,IAClB;EAC7B,MAAMI,gBAAgB,GAAKC,KAA4B,IAAK;IACxD,MAAM;MAAEC,YAAY,GAAG,KAAK;MAAEC,mBAAmB,GAAG,KAAK;MAAE,GAAGC;IAAU,CAAC,GAAGH,KAAK;IAEjF,oBACIV,KAAA,CAAAc,aAAA,CAACT,SAAS,EAAAU,QAAA,KACDF,SAAS;MACdF,YAAY,EAAEA,YAAa;MAC3BC,mBAAmB,EAAEA;IAAoB,EAC5C,CAAC;EAEV,CAAgC;EAEhCH,gBAAgB,CAACO,UAAU,GAAGd,gBAAgB;EAC9CO,gBAAgB,CAACH,WAAW,GAAG,sBAAsBF,cAAc,CAACC,SAAS,CAAC,GAAG;EAEjF,OAAOI,gBAAgB;AAC3B,CAAC;AAED,OAAO,MAAMQ,4BAA4B,GAAGA,CACxCC,MAA0D,EAC1DZ,WAAmB,KACuB;EAC1C,MAAMD,SAAS,gBAAGJ,UAAU,CAA2B,CAACS,KAAK,EAAES,GAAG,KAAK;IACnE,MAAM;MAAER,YAAY,GAAG,IAAI;MAAEC,mBAAmB,GAAG,KAAK;MAAE,GAAGC;IAAU,CAAC,GAAGH,KAAK;IAEhF,OAAOQ,MAAM,CACT;MACI,GAAIL,SAAe;MACnBF,YAAY;MACZC;IACJ,CAAC,EACDO,GACJ,CAAC;EACL,CAAC,CAA4C;EAE7Cd,SAAS,CAACW,UAAU,GAAGd,gBAAgB;EACvCG,SAAS,CAACC,WAAW,GAAGA,WAAW;EAEnC,OAAOD,SAAS;AACpB,CAAC","ignoreList":[]}
|
package/lib/esm/index.js
CHANGED
|
@@ -38,6 +38,7 @@ export { default as Input, InputSize } from './components/input/Input';
|
|
|
38
38
|
export { default as List } from './components/list/List';
|
|
39
39
|
export { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';
|
|
40
40
|
export { default as ListItem } from './components/list/list-item/ListItem';
|
|
41
|
+
export { LIST_ITEM_MARKER, withListItemMarker, withListItemMarkerForwardRef } from './components/list/list-item/ListItem.utils';
|
|
41
42
|
export { default as MentionFinder } from './components/mention-finder/MentionFinder';
|
|
42
43
|
export { default as MultiActionButton } from './components/multi-action-button/MultiActionButton';
|
|
43
44
|
export { default as NumberInput } from './components/number-input/NumberInput';
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","Accordion","AccordionContent","AccordionGroup","AccordionIntro","AccordionItem","AmountControl","VerificationBadge","AreaContext","AreaProvider","Badge","Button","Checkbox","ColorSchemeProvider","useColorScheme","BadgeSize","BadgeDesign","useContainer","ContainerAnchor","DropdownDirection","useIsMeasuredClone","useCombinedRefs","Filter","AnimatedNumber","FileList","FileSelect","DropdownBodyWrapper","ComboBox","ContentCard","HighlightSlider","ContextMenu","ContextMenuAlignment","ExpandableContent","FileInput","STREAMINGSERVICE_FILE_TYPES","TSIMG_FILE_TYPES","FilterButton","FilterButtons","GridImage","GroupedImage","Icon","Input","InputSize","List","ListItemContent","ListItem","MentionFinder","MultiActionButton","NumberInput","PageProvider","Popup","PopupContent","ProgressBar","PopupAlignment","RadioButtonGroup","RadioButton","ScrollView","SearchBox","SearchInput","SelectButton","SetupWizardItem","SetupWizard","SharingContextMenu","SharingBar","SharingButton","Signature","SliderButton","Slider","SmallWaitCursor","SmallWaitCursorSize","SmallWaitCursorSpeed","TagInput","TextArea","Tooltip","Truncation","MentionFinderPopupAlignment","useElementSize","ContentCardType","isValidFileType","FilterButtonItemShape","FilterButtonSize","MultiActionButtonHeight","MultiActionButtonStatusType","ClampPosition","useIsTouch","filterFilesByMimeType","getFileAsArrayBuffer","selectFiles","isTobitEmployee","getUsableHeight","uploadFile","ComboBoxSize"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as VerificationBadge } from './components/verification-badge/VerificationBadge';\nexport {\n AreaContext,\n default as AreaProvider,\n} from './components/area-provider/AreaContextProvider';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport {\n default as ColorSchemeProvider,\n useColorScheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { BadgeSize, BadgeDesign } from './components/badge/Badge.types';\nexport type {\n ColorSchemeContextProps,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { useContainer, ContainerAnchor } from './hooks/container';\nexport { DropdownDirection, type DropdownCoordinates } from './types/dropdown';\nexport { useIsMeasuredClone } from './hooks/element';\nexport { useCombinedRefs } from './hooks/ref';\nexport { default as Filter, type FilterRightIcon } from './components/filter/Filter';\nexport {\n type SortItem,\n type SearchConfig,\n type SortConfig,\n type CheckboxConfig,\n type FilterButtonConfig,\n type FilterRef,\n} from './types/filter';\nexport { default as AnimatedNumber } from './components/animated-number/AnimatedNumber';\nexport {\n default as FileList,\n type IFileItem as FileListItem,\n} from './components/file-list/FileList';\nexport { default as FileSelect } from './components/file-select/FileSelect';\nexport { default as DropdownBodyWrapper } from './components/dropdown-body-wrapper/DropdownBodyWrapper';\nexport { default as ComboBox } from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as HighlightSlider } from './components/highlight-slider/HighlightSlider';\nexport type { HighlightSliderItemColors as HighlightSliderColors } from './components/highlight-slider/highlight-slider-item/HighlightSliderItem';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport {\n ContextMenuAlignment,\n type ContextMenuCoordinates,\n type ContextMenuItem,\n type ContextMenuProps,\n type ContextMenuRef,\n} from './components/context-menu/ContextMenu.types';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport {\n default as FileInput,\n type FileInputRef,\n STREAMINGSERVICE_FILE_TYPES,\n TSIMG_FILE_TYPES,\n} from './components/file-input/FileInput';\nexport { default as FilterButton } from './components/filter-buttons/filter-button/FilterButton';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as GroupedImage } from './components/grouped-image/GroupedImage';\nexport { default as Icon, type IconProps } from './components/icon/Icon';\nexport { default as Input, InputSize } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport {\n default as ListItem,\n type ListItemElements,\n type ListItemProps,\n type ListItemRef,\n} from './components/list/list-item/ListItem';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as MultiActionButton } from './components/multi-action-button/MultiActionButton';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as PageProvider } from './components/page-provider/PageProvider';\nexport { default as Popup } from './components/popup/Popup';\nexport { default as PopupContent } from './components/popup/popup-content/PopupContent';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport { PopupAlignment } from './types/popup';\nexport type { PopupProps } from './components/popup/Popup.types';\nexport {\n default as RadioButtonGroup,\n type RadioButtonGroupRef,\n} from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingContextMenu } from './components/sharing-context-menu/SharingContextMenu';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as SharingButton } from './components/sharing-button/SharingButton';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport type { Tag } from './types/tagInput';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport type { TagInputRef } from './components/tag-input/TagInput';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { MentionFinderPopupAlignment } from './constants/mentionFinder';\nexport { useElementSize } from './hooks/element';\nexport type { BrowserName } from './types/chayns';\nexport { ContentCardType } from './types/contentCard';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport { isValidFileType } from './utils/file';\nexport type { FileInputFileItem } from './types/fileInput';\nexport { FilterButtonItemShape, FilterButtonSize } from './types/filterButtons';\nexport type { IFilterButtonItem as FilterButtonItem } from './types/filterButtons';\nexport type { IListItemRightElements } from './types/list';\nexport type { PopupRef } from './types/popup';\nexport type { RadioButtonItem } from './types/radioButton';\nexport type {\n ISearchBoxItem as SearchBoxItem,\n ISearchBoxItems as SearchBoxItems,\n} from './types/searchBox';\nexport type { SelectButtonItem } from './types/selectButton';\nexport type { SliderButtonItem } from './types/slider-button';\nexport {\n type MultiActionButtonAction,\n type MultiActionButtonActionEvent,\n type MultiActionButtonActionStatus,\n MultiActionButtonHeight,\n type MultiActionButtonProps,\n type MultiActionButtonSecondaryContextMenu,\n MultiActionButtonStatusType,\n} from './components/multi-action-button/MultiActionButton.types';\nexport { ClampPosition } from './types/truncation';\nexport { useIsTouch } from './utils/environment';\nexport { filterFilesByMimeType, getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\nexport type { Theme } from './components/color-scheme-provider/ColorSchemeProvider';\nexport { ComboBoxSize } from './components/combobox/ComboBox.types';\nexport type {\n IComboBoxItem as ComboBoxItem,\n ComboBoxTextStyles,\n IComboBoxItems as ComboBoxItems,\n ComboBoxRef,\n} from './components/combobox/ComboBox.types';\n"],"mappings":"AAAA;;AAEA,SAASA,OAAO,IAAIC,SAAS,QAAQ,kCAAkC;AACvE,SAASD,OAAO,IAAIE,gBAAgB,QAAQ,2DAA2D;AACvG,SAASF,OAAO,IAAIG,cAAc,QAAQ,uDAAuD;AACjG,SAASH,OAAO,IAAII,cAAc,QAAQ,uDAAuD;AACjG,SAASJ,OAAO,IAAIK,aAAa,QAAQ,qDAAqD;AAC9F,SAASL,OAAO,IAAIM,aAAa,QAAQ,2CAA2C;AACpF,SAASN,OAAO,IAAIO,iBAAiB,QAAQ,mDAAmD;AAChG,SACIC,WAAW,EACXR,OAAO,IAAIS,YAAY,QACpB,gDAAgD;AACvD,SAAST,OAAO,IAAIU,KAAK,QAAQ,0BAA0B;AAC3D,SAASV,OAAO,IAAIW,MAAM,QAAQ,4BAA4B;AAC9D,SAASX,OAAO,IAAIY,QAAQ,QAAQ,gCAAgC;AACpE,SACIZ,OAAO,IAAIa,mBAAmB,EAC9BC,cAAc,QACX,wDAAwD;AAC/D,SAASC,SAAS,EAAEC,WAAW,QAAQ,gCAAgC;AAKvE,SAASC,YAAY,EAAEC,eAAe,QAAQ,mBAAmB;AACjE,SAASC,iBAAiB,QAAkC,kBAAkB;AAC9E,SAASC,kBAAkB,QAAQ,iBAAiB;AACpD,SAASC,eAAe,QAAQ,aAAa;AAC7C,SAASrB,OAAO,IAAIsB,MAAM,QAA8B,4BAA4B;AASpF,SAAStB,OAAO,IAAIuB,cAAc,QAAQ,6CAA6C;AACvF,SACIvB,OAAO,IAAIwB,QAAQ,QAEhB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c;AAE9C,SAASC,qBAAqB,EAAEC,gBAAgB,QAAQ,uBAAuB;AAW/E,SAIIC,uBAAuB,EAGvBC,2BAA2B,QACxB,0DAA0D;AACjE,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,UAAU,QAAQ,qBAAqB;AAChD,SAASC,qBAAqB,EAAEC,oBAAoB,EAAEC,WAAW,QAAQ,oBAAoB;AAC7F,SAASC,eAAe,QAAQ,yBAAyB;AACzD,SAASC,eAAe,QAAQ,sBAAsB;AACtD,SAASC,UAAU,QAAQ,oBAAoB;AAE/C,SAASC,YAAY,QAAQ,sCAAsC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","Accordion","AccordionContent","AccordionGroup","AccordionIntro","AccordionItem","AmountControl","VerificationBadge","AreaContext","AreaProvider","Badge","Button","Checkbox","ColorSchemeProvider","useColorScheme","BadgeSize","BadgeDesign","useContainer","ContainerAnchor","DropdownDirection","useIsMeasuredClone","useCombinedRefs","Filter","AnimatedNumber","FileList","FileSelect","DropdownBodyWrapper","ComboBox","ContentCard","HighlightSlider","ContextMenu","ContextMenuAlignment","ExpandableContent","FileInput","STREAMINGSERVICE_FILE_TYPES","TSIMG_FILE_TYPES","FilterButton","FilterButtons","GridImage","GroupedImage","Icon","Input","InputSize","List","ListItemContent","ListItem","LIST_ITEM_MARKER","withListItemMarker","withListItemMarkerForwardRef","MentionFinder","MultiActionButton","NumberInput","PageProvider","Popup","PopupContent","ProgressBar","PopupAlignment","RadioButtonGroup","RadioButton","ScrollView","SearchBox","SearchInput","SelectButton","SetupWizardItem","SetupWizard","SharingContextMenu","SharingBar","SharingButton","Signature","SliderButton","Slider","SmallWaitCursor","SmallWaitCursorSize","SmallWaitCursorSpeed","TagInput","TextArea","Tooltip","Truncation","MentionFinderPopupAlignment","useElementSize","ContentCardType","isValidFileType","FilterButtonItemShape","FilterButtonSize","MultiActionButtonHeight","MultiActionButtonStatusType","ClampPosition","useIsTouch","filterFilesByMimeType","getFileAsArrayBuffer","selectFiles","isTobitEmployee","getUsableHeight","uploadFile","ComboBoxSize"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as VerificationBadge } from './components/verification-badge/VerificationBadge';\nexport {\n AreaContext,\n default as AreaProvider,\n} from './components/area-provider/AreaContextProvider';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport {\n default as ColorSchemeProvider,\n useColorScheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { BadgeSize, BadgeDesign } from './components/badge/Badge.types';\nexport type {\n ColorSchemeContextProps,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { useContainer, ContainerAnchor } from './hooks/container';\nexport { DropdownDirection, type DropdownCoordinates } from './types/dropdown';\nexport { useIsMeasuredClone } from './hooks/element';\nexport { useCombinedRefs } from './hooks/ref';\nexport { default as Filter, type FilterRightIcon } from './components/filter/Filter';\nexport {\n type SortItem,\n type SearchConfig,\n type SortConfig,\n type CheckboxConfig,\n type FilterButtonConfig,\n type FilterRef,\n} from './types/filter';\nexport { default as AnimatedNumber } from './components/animated-number/AnimatedNumber';\nexport {\n default as FileList,\n type IFileItem as FileListItem,\n} from './components/file-list/FileList';\nexport { default as FileSelect } from './components/file-select/FileSelect';\nexport { default as DropdownBodyWrapper } from './components/dropdown-body-wrapper/DropdownBodyWrapper';\nexport { default as ComboBox } from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as HighlightSlider } from './components/highlight-slider/HighlightSlider';\nexport type { HighlightSliderItemColors as HighlightSliderColors } from './components/highlight-slider/highlight-slider-item/HighlightSliderItem';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport {\n ContextMenuAlignment,\n type ContextMenuCoordinates,\n type ContextMenuItem,\n type ContextMenuProps,\n type ContextMenuRef,\n} from './components/context-menu/ContextMenu.types';\nexport { default as ExpandableContent } from './components/expandable-content/ExpandableContent';\nexport {\n default as FileInput,\n type FileInputRef,\n STREAMINGSERVICE_FILE_TYPES,\n TSIMG_FILE_TYPES,\n} from './components/file-input/FileInput';\nexport { default as FilterButton } from './components/filter-buttons/filter-button/FilterButton';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as GroupedImage } from './components/grouped-image/GroupedImage';\nexport { default as Icon, type IconProps } from './components/icon/Icon';\nexport { default as Input, InputSize } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport {\n default as ListItem,\n type ListItemElements,\n type ListItemProps,\n type ListItemRef,\n type ListItemSize,\n} from './components/list/list-item/ListItem';\nexport {\n type ListItemMarkedForwardRefComponent,\n type ListItemMarkedComponent,\n type ListItemMetaProps,\n LIST_ITEM_MARKER,\n withListItemMarker,\n withListItemMarkerForwardRef,\n} from './components/list/list-item/ListItem.utils';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as MultiActionButton } from './components/multi-action-button/MultiActionButton';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as PageProvider } from './components/page-provider/PageProvider';\nexport { default as Popup } from './components/popup/Popup';\nexport { default as PopupContent } from './components/popup/popup-content/PopupContent';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport { PopupAlignment } from './types/popup';\nexport type { PopupProps } from './components/popup/Popup.types';\nexport {\n default as RadioButtonGroup,\n type RadioButtonGroupRef,\n} from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingContextMenu } from './components/sharing-context-menu/SharingContextMenu';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as SharingButton } from './components/sharing-button/SharingButton';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport type { Tag } from './types/tagInput';\nexport { default as TagInput } from './components/tag-input/TagInput';\nexport type { TagInputRef } from './components/tag-input/TagInput';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { MentionFinderPopupAlignment } from './constants/mentionFinder';\nexport { useElementSize } from './hooks/element';\nexport type { BrowserName } from './types/chayns';\nexport { ContentCardType } from './types/contentCard';\nexport type { FileItem, Image, InternalFileItem, Meta, Video } from './types/file';\nexport { isValidFileType } from './utils/file';\nexport type { FileInputFileItem } from './types/fileInput';\nexport { FilterButtonItemShape, FilterButtonSize } from './types/filterButtons';\nexport type { IFilterButtonItem as FilterButtonItem } from './types/filterButtons';\nexport type { IListItemRightElements } from './types/list';\nexport type { PopupRef } from './types/popup';\nexport type { RadioButtonItem } from './types/radioButton';\nexport type {\n ISearchBoxItem as SearchBoxItem,\n ISearchBoxItems as SearchBoxItems,\n} from './types/searchBox';\nexport type { SelectButtonItem } from './types/selectButton';\nexport type { SliderButtonItem } from './types/slider-button';\nexport {\n type MultiActionButtonAction,\n type MultiActionButtonActionEvent,\n type MultiActionButtonActionStatus,\n MultiActionButtonHeight,\n type MultiActionButtonProps,\n type MultiActionButtonSecondaryContextMenu,\n MultiActionButtonStatusType,\n} from './components/multi-action-button/MultiActionButton.types';\nexport { ClampPosition } from './types/truncation';\nexport { useIsTouch } from './utils/environment';\nexport { filterFilesByMimeType, getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { getUsableHeight } from './utils/pageProvider';\nexport { uploadFile } from './utils/uploadFile';\nexport type { Theme } from './components/color-scheme-provider/ColorSchemeProvider';\nexport { ComboBoxSize } from './components/combobox/ComboBox.types';\nexport type {\n IComboBoxItem as ComboBoxItem,\n ComboBoxTextStyles,\n IComboBoxItems as ComboBoxItems,\n ComboBoxRef,\n} from './components/combobox/ComboBox.types';\n"],"mappings":"AAAA;;AAEA,SAASA,OAAO,IAAIC,SAAS,QAAQ,kCAAkC;AACvE,SAASD,OAAO,IAAIE,gBAAgB,QAAQ,2DAA2D;AACvG,SAASF,OAAO,IAAIG,cAAc,QAAQ,uDAAuD;AACjG,SAASH,OAAO,IAAII,cAAc,QAAQ,uDAAuD;AACjG,SAASJ,OAAO,IAAIK,aAAa,QAAQ,qDAAqD;AAC9F,SAASL,OAAO,IAAIM,aAAa,QAAQ,2CAA2C;AACpF,SAASN,OAAO,IAAIO,iBAAiB,QAAQ,mDAAmD;AAChG,SACIC,WAAW,EACXR,OAAO,IAAIS,YAAY,QACpB,gDAAgD;AACvD,SAAST,OAAO,IAAIU,KAAK,QAAQ,0BAA0B;AAC3D,SAASV,OAAO,IAAIW,MAAM,QAAQ,4BAA4B;AAC9D,SAASX,OAAO,IAAIY,QAAQ,QAAQ,gCAAgC;AACpE,SACIZ,OAAO,IA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IAAIsE,MAAM,QAAQ,4BAA4B;AAC9D,SACItE,OAAO,IAAIuE,eAAe,EAC1BC,mBAAmB,EACnBC,oBAAoB,QACjB,gDAAgD;AAEvD,SAASzE,OAAO,IAAI0E,QAAQ,QAAQ,iCAAiC;AAErE,SAAS1E,OAAO,IAAI2E,QAAQ,QAAQ,iCAAiC;AACrE,SAAS3E,OAAO,IAAI4E,OAAO,QAAQ,8BAA8B;AACjE,SAAS5E,OAAO,IAAI6E,UAAU,QAAQ,oCAAoC;AAC1E,SAASC,2BAA2B,QAAQ,2BAA2B;AACvE,SAASC,cAAc,QAAQ,iBAAiB;AAEhD,SAASC,eAAe,QAAQ,qBAAqB;AAErD,SAASC,eAAe,QAAQ,cAAc;AAE9C,SAASC,qBAAqB,EAAEC,gBAAgB,QAAQ,uBAAuB;AAW/E,SAIIC,uBAAuB,EAGvBC,2BAA2B,QACxB,0DAA0D;AACjE,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,UAAU,QAAQ,qBAAqB;AAChD,SAASC,qBAAqB,EAAEC,oBAAoB,EAAEC,WAAW,QAAQ,oBAAoB;AAC7F,SAASC,eAAe,QAAQ,yBAAyB;AACzD,SAASC,eAAe,QAAQ,sBAAsB;AACtD,SAASC,UAAU,QAAQ,oBAAoB;AAE/C,SAASC,YAAY,QAAQ,sCAAsC","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
2
|
+
export interface ListItemMetaProps {
|
|
3
|
+
isExpandable?: boolean;
|
|
4
|
+
shouldHideIndicator?: boolean;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const isDirectListItemElement: (node: ReactNode) => node is ReactElement<ListItemMetaProps>;
|
|
8
|
+
export declare const isMarkedListItemElement: (node: ReactNode) => node is ReactElement<ListItemMetaProps>;
|
|
9
|
+
export declare const shouldShowExpandIndicator: (node: ReactNode) => boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentType, ForwardRefExoticComponent, ForwardRefRenderFunction, RefAttributes } from 'react';
|
|
2
|
+
export declare const LIST_ITEM_MARKER: unique symbol;
|
|
3
|
+
export interface ListItemMetaProps {
|
|
4
|
+
isExpandable?: boolean;
|
|
5
|
+
shouldHideIndicator?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export type ListItemMarkedComponent<P> = ComponentType<P & ListItemMetaProps> & {
|
|
8
|
+
$$listItem: typeof LIST_ITEM_MARKER;
|
|
9
|
+
};
|
|
10
|
+
export type ListItemMarkedForwardRefComponent<P, R> = ForwardRefExoticComponent<P & ListItemMetaProps & RefAttributes<R>> & {
|
|
11
|
+
$$listItem: typeof LIST_ITEM_MARKER;
|
|
12
|
+
};
|
|
13
|
+
export declare const withListItemMarker: <P>(Component: ComponentType<P & ListItemMetaProps>) => ListItemMarkedComponent<P>;
|
|
14
|
+
export declare const withListItemMarkerForwardRef: <P, R>(render: ForwardRefRenderFunction<R, P & ListItemMetaProps>, displayName: string) => ListItemMarkedForwardRefComponent<P, R>;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -38,7 +38,8 @@ export { default as Icon, type IconProps } from './components/icon/Icon';
|
|
|
38
38
|
export { default as Input, InputSize } from './components/input/Input';
|
|
39
39
|
export { default as List } from './components/list/List';
|
|
40
40
|
export { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';
|
|
41
|
-
export { default as ListItem, type ListItemElements, type ListItemProps, type ListItemRef, } from './components/list/list-item/ListItem';
|
|
41
|
+
export { default as ListItem, type ListItemElements, type ListItemProps, type ListItemRef, type ListItemSize, } from './components/list/list-item/ListItem';
|
|
42
|
+
export { type ListItemMarkedForwardRefComponent, type ListItemMarkedComponent, type ListItemMetaProps, LIST_ITEM_MARKER, withListItemMarker, withListItemMarkerForwardRef, } from './components/list/list-item/ListItem.utils';
|
|
42
43
|
export { default as MentionFinder } from './components/mention-finder/MentionFinder';
|
|
43
44
|
export type { MentionMember } from './components/mention-finder/MentionFinder';
|
|
44
45
|
export { default as MultiActionButton } from './components/multi-action-button/MultiActionButton';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-components/core",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.64",
|
|
4
4
|
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"browserslist": [
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "ccb192d61c7fac0ba61c1c88e6583eb66a1529f3"
|
|
92
92
|
}
|