@chayns-components/core 5.0.0-beta.1245 → 5.0.0-beta.1246
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-item/list-item-head/ListItemHead.js +17 -37
- package/lib/cjs/components/list/list-item/list-item-head/ListItemHead.js.map +1 -1
- package/lib/cjs/components/list/list-item/list-item-head/ListItemHead.styles.js +1 -44
- package/lib/cjs/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -1
- package/lib/cjs/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.js +42 -0
- package/lib/cjs/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.js.map +1 -0
- package/lib/cjs/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.styles.js +15 -0
- package/lib/cjs/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.styles.js.map +1 -0
- package/lib/cjs/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.js +40 -0
- package/lib/cjs/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.js.map +1 -0
- package/lib/cjs/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.styles.js +40 -0
- package/lib/cjs/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.styles.js.map +1 -0
- package/lib/cjs/components/list/list-item/list-item-head/list-item-title/ListItemTitle.js +53 -0
- package/lib/cjs/components/list/list-item/list-item-head/list-item-title/ListItemTitle.js.map +1 -0
- package/lib/cjs/components/list/list-item/list-item-head/list-item-title/ListItemTitle.styles.js +60 -0
- package/lib/cjs/components/list/list-item/list-item-head/list-item-title/ListItemTitle.styles.js.map +1 -0
- package/lib/esm/components/list/list-item/list-item-head/ListItemHead.js +19 -39
- package/lib/esm/components/list/list-item/list-item-head/ListItemHead.js.map +1 -1
- package/lib/esm/components/list/list-item/list-item-head/ListItemHead.styles.js +0 -43
- package/lib/esm/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -1
- package/lib/esm/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.js +35 -0
- package/lib/esm/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.js.map +1 -0
- package/lib/esm/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.styles.js +8 -0
- package/lib/esm/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.styles.js.map +1 -0
- package/lib/esm/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.js +33 -0
- package/lib/esm/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.js.map +1 -0
- package/lib/esm/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.styles.js +33 -0
- package/lib/esm/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.styles.js.map +1 -0
- package/lib/esm/components/list/list-item/list-item-head/list-item-title/ListItemTitle.js +46 -0
- package/lib/esm/components/list/list-item/list-item-head/list-item-title/ListItemTitle.js.map +1 -0
- package/lib/esm/components/list/list-item/list-item-head/list-item-title/ListItemTitle.styles.js +53 -0
- package/lib/esm/components/list/list-item/list-item-head/list-item-title/ListItemTitle.styles.js.map +1 -0
- package/lib/types/components/list/list-item/list-item-head/ListItemHead.styles.d.ts +0 -10
- package/lib/types/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.d.ts +7 -0
- package/lib/types/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.styles.d.ts +1 -0
- package/lib/types/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.d.ts +9 -0
- package/lib/types/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.styles.d.ts +8 -0
- package/lib/types/components/list/list-item/list-item-head/list-item-title/ListItemTitle.d.ts +12 -0
- package/lib/types/components/list/list-item/list-item-head/list-item-title/ListItemTitle.styles.d.ts +11 -0
- package/package.json +2 -2
- package/lib/cjs/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.js +0 -64
- package/lib/cjs/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.js.map +0 -1
- package/lib/cjs/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.styles.js +0 -58
- package/lib/cjs/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.styles.js.map +0 -1
- package/lib/esm/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.js +0 -57
- package/lib/esm/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.js.map +0 -1
- package/lib/esm/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.styles.js +0 -51
- package/lib/esm/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.styles.js.map +0 -1
- package/lib/types/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.d.ts +0 -8
- package/lib/types/components/list/list-item/list-item-head/list-item-right-elements/ListItemRightElements.styles.d.ts +0 -14
|
@@ -6,13 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("motion/react");
|
|
8
8
|
var _react2 = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _accordion = require("../../../../utils/accordion");
|
|
10
9
|
var _Icon = _interopRequireDefault(require("../../../icon/Icon"));
|
|
11
10
|
var _ListItemIcon = _interopRequireDefault(require("./list-item-icon/ListItemIcon"));
|
|
12
11
|
var _ListItemImage = _interopRequireDefault(require("./list-item-image/ListItemImage"));
|
|
13
|
-
var _ListItemRightElements = _interopRequireDefault(require("./list-item-right-elements/ListItemRightElements"));
|
|
14
12
|
var _ListItemHead = require("./ListItemHead.styles");
|
|
15
13
|
var _list = require("../../../../constants/list");
|
|
14
|
+
var _ListItemTitle = _interopRequireDefault(require("./list-item-title/ListItemTitle"));
|
|
15
|
+
var _ListItemSubtitle = _interopRequireDefault(require("./list-item-subtitle/ListItemSubtitle"));
|
|
16
|
+
var _ListItemRightElement = _interopRequireDefault(require("./list-item-right-element/ListItemRightElement"));
|
|
16
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
18
|
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); }
|
|
18
19
|
const ListItemHead = ({
|
|
@@ -44,9 +45,8 @@ const ListItemHead = ({
|
|
|
44
45
|
onImageError
|
|
45
46
|
}) => {
|
|
46
47
|
const [shouldShowHoverItem, setShouldShowHoverItem] = (0, _react2.useState)(false);
|
|
47
|
-
const titleWrapperRef = (0, _react2.useRef)(null);
|
|
48
48
|
const longPressTimeoutRef = (0, _react2.useRef)();
|
|
49
|
-
const shouldShowSubtitleRow = subtitle || typeof subtitle === 'string';
|
|
49
|
+
const shouldShowSubtitleRow = subtitle || typeof subtitle === 'string' || typeof rightElements === 'object' && rightElements && 'bottom' in rightElements;
|
|
50
50
|
const shouldShowMultilineTitle = (0, _react2.useMemo)(() => !subtitle, [subtitle]);
|
|
51
51
|
const handleShowTooltipResize = (0, _react2.useCallback)(entries => {
|
|
52
52
|
var _entries$;
|
|
@@ -54,13 +54,6 @@ const ListItemHead = ({
|
|
|
54
54
|
if (!el) return;
|
|
55
55
|
setShouldEnableTooltip(el.scrollWidth > el.clientWidth);
|
|
56
56
|
}, [setShouldEnableTooltip]);
|
|
57
|
-
(0, _react2.useEffect)(() => {
|
|
58
|
-
const element = titleWrapperRef === null || titleWrapperRef === void 0 ? void 0 : titleWrapperRef.current;
|
|
59
|
-
if (!element) return undefined;
|
|
60
|
-
const resizeObserver = new ResizeObserver(handleShowTooltipResize);
|
|
61
|
-
resizeObserver.observe(element);
|
|
62
|
-
return () => resizeObserver.disconnect();
|
|
63
|
-
}, [handleShowTooltipResize]);
|
|
64
57
|
const handleMouseEnter = (0, _react2.useCallback)(() => setShouldShowHoverItem(true), []);
|
|
65
58
|
const handleMouseLeave = (0, _react2.useCallback)(() => setShouldShowHoverItem(false), []);
|
|
66
59
|
const handleTouchStart = (0, _react2.useCallback)(event => {
|
|
@@ -73,23 +66,6 @@ const ListItemHead = ({
|
|
|
73
66
|
const handleTouchEnd = (0, _react2.useCallback)(() => {
|
|
74
67
|
clearTimeout(longPressTimeoutRef.current);
|
|
75
68
|
}, []);
|
|
76
|
-
const shouldPreventRightElementClick = (0, _react2.useMemo)(() => {
|
|
77
|
-
if (!rightElements) return false;
|
|
78
|
-
if (typeof rightElements === 'object' && ('bottom' in rightElements || 'center' in rightElements || 'top' in rightElements)) {
|
|
79
|
-
if (rightElements.bottom && (0, _accordion.getElementClickEvent)(rightElements.bottom)) {
|
|
80
|
-
return true;
|
|
81
|
-
}
|
|
82
|
-
if (rightElements.center && (0, _accordion.getElementClickEvent)(rightElements.center)) {
|
|
83
|
-
return true;
|
|
84
|
-
}
|
|
85
|
-
if (rightElements.top && (0, _accordion.getElementClickEvent)(rightElements.top)) {
|
|
86
|
-
return true;
|
|
87
|
-
}
|
|
88
|
-
} else {
|
|
89
|
-
return (0, _accordion.getElementClickEvent)(rightElements);
|
|
90
|
-
}
|
|
91
|
-
return false;
|
|
92
|
-
}, [rightElements]);
|
|
93
69
|
const iconOrImageElement = (0, _react2.useMemo)(() => {
|
|
94
70
|
if (icons) {
|
|
95
71
|
return /*#__PURE__*/_react2.default.createElement(_ListItemIcon.default, {
|
|
@@ -112,7 +88,7 @@ const ListItemHead = ({
|
|
|
112
88
|
});
|
|
113
89
|
}
|
|
114
90
|
return undefined;
|
|
115
|
-
}, [careOfLocationId, cornerElement, cornerImage, icons, imageBackground, images, shouldHideImageOrIconBackground, shouldOpenImageOnClick, shouldShowRoundImageOrIcon]);
|
|
91
|
+
}, [careOfLocationId, cornerElement, cornerImage, icons, imageBackground, images, onImageError, shouldHideImageOrIconBackground, shouldOpenImageOnClick, shouldShowRoundImageOrIcon]);
|
|
116
92
|
return /*#__PURE__*/_react2.default.createElement(_ListItemHead.StyledListItemHead, {
|
|
117
93
|
as: shouldDisableAnimation ? undefined : _react.motion[_list.LIST_ITEM_HEAD_HTML_TAG],
|
|
118
94
|
animate: shouldDisableAnimation ? undefined : {
|
|
@@ -148,15 +124,19 @@ const ListItemHead = ({
|
|
|
148
124
|
}, /*#__PURE__*/_react2.default.createElement(_react.LayoutGroup, null, /*#__PURE__*/_react2.default.createElement(_ListItemHead.StyledListItemHeadTitle, {
|
|
149
125
|
as: shouldDisableAnimation ? undefined : _react.motion[_list.LIST_ITEM_HEAD_TITLE_HTML_TAG],
|
|
150
126
|
layout: "position"
|
|
151
|
-
}, /*#__PURE__*/_react2.default.createElement(
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
$isOpen: isOpen
|
|
157
|
-
}, subtitle)))), rightElements && /*#__PURE__*/_react2.default.createElement(_ListItemRightElements.default, {
|
|
127
|
+
}, /*#__PURE__*/_react2.default.createElement(_ListItemTitle.default, {
|
|
128
|
+
title: title,
|
|
129
|
+
titleElement: titleElement,
|
|
130
|
+
isOpen: isOpen,
|
|
131
|
+
shouldShowMultilineTitle: shouldShowMultilineTitle,
|
|
158
132
|
rightElements: rightElements,
|
|
159
|
-
|
|
133
|
+
onResize: handleShowTooltipResize
|
|
134
|
+
})), shouldShowSubtitleRow && /*#__PURE__*/_react2.default.createElement(_ListItemHead.StyledListItemHeadSubtitle, null, /*#__PURE__*/_react2.default.createElement(_ListItemSubtitle.default, {
|
|
135
|
+
subtitle: subtitle,
|
|
136
|
+
isOpen: isOpen,
|
|
137
|
+
rightElements: rightElements
|
|
138
|
+
})))), /*#__PURE__*/_react2.default.createElement(_ListItemRightElement.default, {
|
|
139
|
+
rightElements: rightElements
|
|
160
140
|
}), hoverItem && /*#__PURE__*/_react2.default.createElement(_ListItemHead.StyledMotionListItemHeadHoverItemWrapper, {
|
|
161
141
|
className: "beta-chayns-list-item-hover-item",
|
|
162
142
|
animate: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemHead.js","names":["_react","require","_react2","_interopRequireWildcard","_accordion","_Icon","_interopRequireDefault","_ListItemIcon","_ListItemImage","_ListItemRightElements","_ListItemHead","_list","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ListItemHead","careOfLocationId","cornerImage","hoverItem","icons","imageBackground","images","isAnyItemExpandable","isExpandable","isOpen","isTitleGreyed","leftElements","onClick","onLongPress","rightElements","shouldHideImageOrIconBackground","shouldHideIndicator","shouldOpenImageOnClick","shouldShowRoundImageOrIcon","subtitle","shouldForceHover","title","titleElement","setShouldEnableTooltip","shouldDisableAnimation","cornerElement","onImageError","shouldShowHoverItem","setShouldShowHoverItem","useState","titleWrapperRef","useRef","longPressTimeoutRef","shouldShowSubtitleRow","shouldShowMultilineTitle","useMemo","handleShowTooltipResize","useCallback","entries","_entries$","el","target","scrollWidth","clientWidth","useEffect","element","current","undefined","resizeObserver","ResizeObserver","observe","disconnect","handleMouseEnter","handleMouseLeave","handleTouchStart","event","window","setTimeout","handleTouchEnd","clearTimeout","shouldPreventRightElementClick","bottom","getElementClickEvent","center","top","iconOrImageElement","createElement","shouldHideBackground","shouldShowRoundIcon","shouldShowRoundImage","StyledListItemHead","as","motion","LIST_ITEM_HEAD_HTML_TAG","animate","opacity","initial","transition","duration","type","className","$isClickable","$isAnyItemExpandable","onMouseEnter","onMouseLeave","onTouchStart","onTouchEnd","StyledListItemHeadLeftWrapper","StyledListItemHeadIndicator","LIST_ITEM_HEAD_INDICATOR_HTML_TAG","rotate","StyledListItemHeadContent","$isIconOrImageGiven","$isOpen","LayoutGroup","StyledListItemHeadTitle","LIST_ITEM_HEAD_TITLE_HTML_TAG","layout","StyledListItemHeadTitleContent","StyledListItemHeadTitleText","$isEllipsis","ref","$shouldShowMultilineTitle","StyledListItemHeadTitleElement","StyledListItemHeadSubtitle","StyledListItemHeadSubtitleText","StyledMotionListItemHeadHoverItemWrapper","marginLeft","width","StyledMotionListItemHeadHoverItem","displayName","_default","exports"],"sources":["../../../../../../src/components/list/list-item/list-item-head/ListItemHead.tsx"],"sourcesContent":["import { LayoutGroup, motion } from 'motion/react';\nimport React, {\n CSSProperties,\n FC,\n MouseEventHandler,\n ReactNode,\n SyntheticEvent,\n TouchEventHandler,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport type { IListItemRightElements } from '../../../../types/list';\nimport { getElementClickEvent } from '../../../../utils/accordion';\nimport Icon from '../../../icon/Icon';\nimport ListItemIcon from './list-item-icon/ListItemIcon';\nimport ListItemImage from './list-item-image/ListItemImage';\nimport ListItemRightElements from './list-item-right-elements/ListItemRightElements';\nimport {\n StyledListItemHeadContent,\n StyledListItemHeadLeftWrapper,\n StyledListItemHeadSubtitle,\n StyledListItemHeadSubtitleText,\n StyledListItemHeadTitleContent,\n StyledListItemHeadTitleElement,\n StyledListItemHeadTitleText,\n StyledMotionListItemHeadHoverItem,\n StyledMotionListItemHeadHoverItemWrapper,\n StyledListItemHead,\n StyledListItemHeadIndicator,\n StyledListItemHeadTitle,\n} from './ListItemHead.styles';\nimport {\n LIST_ITEM_HEAD_HTML_TAG,\n LIST_ITEM_HEAD_INDICATOR_HTML_TAG,\n LIST_ITEM_HEAD_TITLE_HTML_TAG,\n} from '../../../../constants/list';\n\ntype ListItemHeadProps = {\n careOfLocationId?: number;\n cornerImage?: string;\n hoverItem?: ReactNode;\n icons?: string[];\n imageBackground?: CSSProperties['background'];\n images?: string[];\n isAnyItemExpandable: boolean;\n isExpandable: boolean;\n isOpen: boolean;\n isTitleGreyed?: boolean;\n leftElements?: ReactNode;\n onClick?: MouseEventHandler<HTMLDivElement>;\n onLongPress?: TouchEventHandler<HTMLDivElement>;\n rightElements?: IListItemRightElements;\n shouldHideImageOrIconBackground?: boolean;\n shouldHideIndicator?: boolean;\n shouldOpenImageOnClick: boolean;\n shouldShowRoundImageOrIcon?: boolean;\n subtitle?: ReactNode;\n title: ReactNode;\n titleElement?: ReactNode;\n shouldForceHover?: boolean;\n setShouldEnableTooltip: (value: boolean) => void;\n shouldDisableAnimation?: boolean;\n cornerElement?: ReactNode;\n onImageError?: (event: SyntheticEvent<HTMLImageElement, Event>, index: number) => void;\n};\n\nconst ListItemHead: FC<ListItemHeadProps> = ({\n careOfLocationId,\n cornerImage,\n hoverItem,\n icons,\n imageBackground,\n images,\n isAnyItemExpandable,\n isExpandable,\n isOpen,\n isTitleGreyed,\n leftElements,\n onClick,\n onLongPress,\n rightElements,\n shouldHideImageOrIconBackground,\n shouldHideIndicator,\n shouldOpenImageOnClick,\n shouldShowRoundImageOrIcon,\n subtitle,\n shouldForceHover,\n title,\n titleElement,\n setShouldEnableTooltip,\n shouldDisableAnimation = false,\n cornerElement,\n onImageError,\n}) => {\n const [shouldShowHoverItem, setShouldShowHoverItem] = useState(false);\n\n const titleWrapperRef = useRef<HTMLDivElement>(null);\n\n const longPressTimeoutRef = useRef<number>();\n\n const shouldShowSubtitleRow = subtitle || typeof subtitle === 'string';\n\n const shouldShowMultilineTitle = useMemo(() => !subtitle, [subtitle]);\n\n const handleShowTooltipResize = useCallback(\n (entries: ResizeObserverEntry[]) => {\n const el = entries[0]?.target;\n if (!el) return;\n setShouldEnableTooltip(el.scrollWidth > el.clientWidth);\n },\n [setShouldEnableTooltip],\n );\n\n useEffect(() => {\n const element = titleWrapperRef?.current;\n if (!element) return undefined;\n\n const resizeObserver = new ResizeObserver(handleShowTooltipResize);\n resizeObserver.observe(element);\n\n return () => resizeObserver.disconnect();\n }, [handleShowTooltipResize]);\n\n const handleMouseEnter = useCallback(() => setShouldShowHoverItem(true), []);\n\n const handleMouseLeave = useCallback(() => setShouldShowHoverItem(false), []);\n\n const handleTouchStart = useCallback<TouchEventHandler<HTMLDivElement>>(\n (event) => {\n longPressTimeoutRef.current = window.setTimeout(() => {\n if (typeof onLongPress === 'function') {\n onLongPress(event);\n }\n }, 400);\n },\n [onLongPress],\n );\n\n const handleTouchEnd = useCallback(() => {\n clearTimeout(longPressTimeoutRef.current);\n }, []);\n\n const shouldPreventRightElementClick = useMemo(() => {\n if (!rightElements) return false;\n\n if (\n typeof rightElements === 'object' &&\n ('bottom' in rightElements || 'center' in rightElements || 'top' in rightElements)\n ) {\n if (rightElements.bottom && getElementClickEvent(rightElements.bottom)) {\n return true;\n }\n\n if (rightElements.center && getElementClickEvent(rightElements.center)) {\n return true;\n }\n\n if (rightElements.top && getElementClickEvent(rightElements.top)) {\n return true;\n }\n } else {\n return getElementClickEvent(rightElements as ReactNode);\n }\n\n return false;\n }, [rightElements]);\n\n const iconOrImageElement = useMemo(() => {\n if (icons) {\n return (\n <ListItemIcon\n icons={icons}\n shouldHideBackground={!!shouldHideImageOrIconBackground}\n shouldShowRoundIcon={!!shouldShowRoundImageOrIcon}\n />\n );\n }\n\n if (images) {\n return (\n <ListItemImage\n cornerElement={cornerElement}\n imageBackground={imageBackground}\n careOfLocationId={careOfLocationId}\n cornerImage={cornerImage}\n images={images}\n shouldOpenImageOnClick={shouldOpenImageOnClick}\n shouldHideBackground={!!shouldHideImageOrIconBackground}\n shouldShowRoundImage={!!shouldShowRoundImageOrIcon}\n onImageError={onImageError}\n />\n );\n }\n\n return undefined;\n }, [\n careOfLocationId,\n cornerElement,\n cornerImage,\n icons,\n imageBackground,\n images,\n shouldHideImageOrIconBackground,\n shouldOpenImageOnClick,\n shouldShowRoundImageOrIcon,\n ]);\n\n return (\n <StyledListItemHead\n as={shouldDisableAnimation ? undefined : motion[LIST_ITEM_HEAD_HTML_TAG]}\n animate={\n shouldDisableAnimation\n ? undefined\n : {\n opacity: isTitleGreyed ? 0.5 : 1,\n }\n }\n initial={shouldDisableAnimation ? undefined : false}\n transition={shouldDisableAnimation ? undefined : { duration: 0.2, type: 'tween' }}\n className=\"beta-chayns-list-item-head\"\n $isClickable={typeof onClick === 'function' || isExpandable}\n $isAnyItemExpandable={isAnyItemExpandable}\n onClick={onClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onTouchStart={typeof onLongPress === 'function' ? handleTouchStart : undefined}\n onTouchEnd={typeof onLongPress === 'function' ? handleTouchEnd : undefined}\n >\n <StyledListItemHeadLeftWrapper>\n {isAnyItemExpandable && (\n <StyledListItemHeadIndicator\n as={\n shouldDisableAnimation\n ? undefined\n : motion[LIST_ITEM_HEAD_INDICATOR_HTML_TAG]\n }\n animate={shouldDisableAnimation ? undefined : { rotate: isOpen ? 90 : 0 }}\n initial={shouldDisableAnimation ? undefined : false}\n transition={shouldDisableAnimation ? undefined : { type: 'tween' }}\n >\n {isExpandable && !shouldHideIndicator && (\n <Icon icons={['fa fa-chevron-right']} />\n )}\n </StyledListItemHeadIndicator>\n )}\n {leftElements}\n {iconOrImageElement}\n </StyledListItemHeadLeftWrapper>\n <StyledListItemHeadContent\n $isIconOrImageGiven={iconOrImageElement !== undefined}\n $isOpen={isOpen}\n >\n <LayoutGroup>\n <StyledListItemHeadTitle\n as={\n shouldDisableAnimation\n ? undefined\n : motion[LIST_ITEM_HEAD_TITLE_HTML_TAG]\n }\n layout=\"position\"\n >\n <StyledListItemHeadTitleContent>\n <StyledListItemHeadTitleText\n $isEllipsis={!isOpen}\n ref={titleWrapperRef}\n $shouldShowMultilineTitle={shouldShowMultilineTitle}\n >\n {title}\n </StyledListItemHeadTitleText>\n <StyledListItemHeadTitleElement>\n {titleElement}\n </StyledListItemHeadTitleElement>\n </StyledListItemHeadTitleContent>\n </StyledListItemHeadTitle>\n {shouldShowSubtitleRow && (\n <StyledListItemHeadSubtitle>\n <StyledListItemHeadSubtitleText $isOpen={isOpen}>\n {subtitle}\n </StyledListItemHeadSubtitleText>\n </StyledListItemHeadSubtitle>\n )}\n </LayoutGroup>\n </StyledListItemHeadContent>\n {rightElements && (\n <ListItemRightElements\n rightElements={rightElements}\n shouldPreventRightElementClick={shouldPreventRightElementClick}\n />\n )}\n {hoverItem && (\n <StyledMotionListItemHeadHoverItemWrapper\n className=\"beta-chayns-list-item-hover-item\"\n animate={{\n marginLeft: shouldForceHover || shouldShowHoverItem ? 8 : 0,\n opacity: shouldForceHover || shouldShowHoverItem ? 1 : 0,\n width: shouldForceHover || shouldShowHoverItem ? 'auto' : 0,\n }}\n initial={false}\n transition={{ duration: 0.15, type: 'tween' }}\n >\n <StyledMotionListItemHeadHoverItem>\n {hoverItem}\n </StyledMotionListItemHeadHoverItem>\n </StyledMotionListItemHeadHoverItemWrapper>\n )}\n </StyledListItemHead>\n );\n};\n\nListItemHead.displayName = 'ListItemHead';\n\nexport default ListItemHead;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,uBAAA,CAAAF,OAAA;AAcA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,aAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,cAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,sBAAA,GAAAH,sBAAA,CAAAL,OAAA;AACA,IAAAS,aAAA,GAAAT,OAAA;AAcA,IAAAU,KAAA,GAAAV,OAAA;AAIoC,SAAAK,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAb,uBAAA,YAAAA,CAAAS,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,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;IACfC,UAAU,EAAE;MAAEC,QAAQ,EAAE,IAAI;MAAEC,IAAI,EAAE;IAAQ;EAAE,gBAE9C5G,OAAA,CAAAY,OAAA,CAAAmF,aAAA,CAACvF,aAAA,CAAAkI,iCAAiC,QAC7B1G,SAC8B,CACG,CAE9B,CAAC;AAE7B,CAAC;AAEDH,YAAY,CAAC8G,WAAW,GAAG,cAAc;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAjI,OAAA,GAE3BiB,YAAY","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ListItemHead.js","names":["_react","require","_react2","_interopRequireWildcard","_Icon","_interopRequireDefault","_ListItemIcon","_ListItemImage","_ListItemHead","_list","_ListItemTitle","_ListItemSubtitle","_ListItemRightElement","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ListItemHead","careOfLocationId","cornerImage","hoverItem","icons","imageBackground","images","isAnyItemExpandable","isExpandable","isOpen","isTitleGreyed","leftElements","onClick","onLongPress","rightElements","shouldHideImageOrIconBackground","shouldHideIndicator","shouldOpenImageOnClick","shouldShowRoundImageOrIcon","subtitle","shouldForceHover","title","titleElement","setShouldEnableTooltip","shouldDisableAnimation","cornerElement","onImageError","shouldShowHoverItem","setShouldShowHoverItem","useState","longPressTimeoutRef","useRef","shouldShowSubtitleRow","shouldShowMultilineTitle","useMemo","handleShowTooltipResize","useCallback","entries","_entries$","el","target","scrollWidth","clientWidth","handleMouseEnter","handleMouseLeave","handleTouchStart","event","current","window","setTimeout","handleTouchEnd","clearTimeout","iconOrImageElement","createElement","shouldHideBackground","shouldShowRoundIcon","shouldShowRoundImage","undefined","StyledListItemHead","as","motion","LIST_ITEM_HEAD_HTML_TAG","animate","opacity","initial","transition","duration","type","className","$isClickable","$isAnyItemExpandable","onMouseEnter","onMouseLeave","onTouchStart","onTouchEnd","StyledListItemHeadLeftWrapper","StyledListItemHeadIndicator","LIST_ITEM_HEAD_INDICATOR_HTML_TAG","rotate","StyledListItemHeadContent","$isIconOrImageGiven","$isOpen","LayoutGroup","StyledListItemHeadTitle","LIST_ITEM_HEAD_TITLE_HTML_TAG","layout","onResize","StyledListItemHeadSubtitle","StyledMotionListItemHeadHoverItemWrapper","marginLeft","width","StyledMotionListItemHeadHoverItem","displayName","_default","exports"],"sources":["../../../../../../src/components/list/list-item/list-item-head/ListItemHead.tsx"],"sourcesContent":["import { LayoutGroup, motion } from 'motion/react';\nimport React, {\n CSSProperties,\n FC,\n MouseEventHandler,\n ReactNode,\n SyntheticEvent,\n TouchEventHandler,\n useCallback,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport type { IListItemRightElements } from '../../../../types/list';\nimport Icon from '../../../icon/Icon';\nimport ListItemIcon from './list-item-icon/ListItemIcon';\nimport ListItemImage from './list-item-image/ListItemImage';\nimport {\n StyledListItemHeadContent,\n StyledListItemHeadLeftWrapper,\n StyledListItemHeadSubtitle,\n StyledMotionListItemHeadHoverItem,\n StyledMotionListItemHeadHoverItemWrapper,\n StyledListItemHead,\n StyledListItemHeadIndicator,\n StyledListItemHeadTitle,\n} from './ListItemHead.styles';\nimport {\n LIST_ITEM_HEAD_HTML_TAG,\n LIST_ITEM_HEAD_INDICATOR_HTML_TAG,\n LIST_ITEM_HEAD_TITLE_HTML_TAG,\n} from '../../../../constants/list';\nimport ListItemTitle from './list-item-title/ListItemTitle';\nimport ListItemSubtitle from './list-item-subtitle/ListItemSubtitle';\nimport ListItemRightElement from './list-item-right-element/ListItemRightElement';\n\ntype ListItemHeadProps = {\n careOfLocationId?: number;\n cornerImage?: string;\n hoverItem?: ReactNode;\n icons?: string[];\n imageBackground?: CSSProperties['background'];\n images?: string[];\n isAnyItemExpandable: boolean;\n isExpandable: boolean;\n isOpen: boolean;\n isTitleGreyed?: boolean;\n leftElements?: ReactNode;\n onClick?: MouseEventHandler<HTMLDivElement>;\n onLongPress?: TouchEventHandler<HTMLDivElement>;\n rightElements?: IListItemRightElements;\n shouldHideImageOrIconBackground?: boolean;\n shouldHideIndicator?: boolean;\n shouldOpenImageOnClick: boolean;\n shouldShowRoundImageOrIcon?: boolean;\n subtitle?: ReactNode;\n title: ReactNode;\n titleElement?: ReactNode;\n shouldForceHover?: boolean;\n setShouldEnableTooltip: (value: boolean) => void;\n shouldDisableAnimation?: boolean;\n cornerElement?: ReactNode;\n onImageError?: (event: SyntheticEvent<HTMLImageElement, Event>, index: number) => void;\n};\n\nconst ListItemHead: FC<ListItemHeadProps> = ({\n careOfLocationId,\n cornerImage,\n hoverItem,\n icons,\n imageBackground,\n images,\n isAnyItemExpandable,\n isExpandable,\n isOpen,\n isTitleGreyed,\n leftElements,\n onClick,\n onLongPress,\n rightElements,\n shouldHideImageOrIconBackground,\n shouldHideIndicator,\n shouldOpenImageOnClick,\n shouldShowRoundImageOrIcon,\n subtitle,\n shouldForceHover,\n title,\n titleElement,\n setShouldEnableTooltip,\n shouldDisableAnimation = false,\n cornerElement,\n onImageError,\n}) => {\n const [shouldShowHoverItem, setShouldShowHoverItem] = useState(false);\n\n const longPressTimeoutRef = useRef<number>();\n\n const shouldShowSubtitleRow =\n subtitle ||\n typeof subtitle === 'string' ||\n (typeof rightElements === 'object' && rightElements && 'bottom' in rightElements);\n\n const shouldShowMultilineTitle = useMemo(() => !subtitle, [subtitle]);\n\n const handleShowTooltipResize = useCallback(\n (entries: ResizeObserverEntry[]) => {\n const el = entries[0]?.target;\n if (!el) return;\n setShouldEnableTooltip(el.scrollWidth > el.clientWidth);\n },\n [setShouldEnableTooltip],\n );\n\n const handleMouseEnter = useCallback(() => setShouldShowHoverItem(true), []);\n\n const handleMouseLeave = useCallback(() => setShouldShowHoverItem(false), []);\n\n const handleTouchStart = useCallback<TouchEventHandler<HTMLDivElement>>(\n (event) => {\n longPressTimeoutRef.current = window.setTimeout(() => {\n if (typeof onLongPress === 'function') {\n onLongPress(event);\n }\n }, 400);\n },\n [onLongPress],\n );\n\n const handleTouchEnd = useCallback(() => {\n clearTimeout(longPressTimeoutRef.current);\n }, []);\n\n const iconOrImageElement = useMemo(() => {\n if (icons) {\n return (\n <ListItemIcon\n icons={icons}\n shouldHideBackground={!!shouldHideImageOrIconBackground}\n shouldShowRoundIcon={!!shouldShowRoundImageOrIcon}\n />\n );\n }\n\n if (images) {\n return (\n <ListItemImage\n cornerElement={cornerElement}\n imageBackground={imageBackground}\n careOfLocationId={careOfLocationId}\n cornerImage={cornerImage}\n images={images}\n shouldOpenImageOnClick={shouldOpenImageOnClick}\n shouldHideBackground={!!shouldHideImageOrIconBackground}\n shouldShowRoundImage={!!shouldShowRoundImageOrIcon}\n onImageError={onImageError}\n />\n );\n }\n\n return undefined;\n }, [\n careOfLocationId,\n cornerElement,\n cornerImage,\n icons,\n imageBackground,\n images,\n onImageError,\n shouldHideImageOrIconBackground,\n shouldOpenImageOnClick,\n shouldShowRoundImageOrIcon,\n ]);\n\n return (\n <StyledListItemHead\n as={shouldDisableAnimation ? undefined : motion[LIST_ITEM_HEAD_HTML_TAG]}\n animate={\n shouldDisableAnimation\n ? undefined\n : {\n opacity: isTitleGreyed ? 0.5 : 1,\n }\n }\n initial={shouldDisableAnimation ? undefined : false}\n transition={shouldDisableAnimation ? undefined : { duration: 0.2, type: 'tween' }}\n className=\"beta-chayns-list-item-head\"\n $isClickable={typeof onClick === 'function' || isExpandable}\n $isAnyItemExpandable={isAnyItemExpandable}\n onClick={onClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onTouchStart={typeof onLongPress === 'function' ? handleTouchStart : undefined}\n onTouchEnd={typeof onLongPress === 'function' ? handleTouchEnd : undefined}\n >\n <StyledListItemHeadLeftWrapper>\n {isAnyItemExpandable && (\n <StyledListItemHeadIndicator\n as={\n shouldDisableAnimation\n ? undefined\n : motion[LIST_ITEM_HEAD_INDICATOR_HTML_TAG]\n }\n animate={shouldDisableAnimation ? undefined : { rotate: isOpen ? 90 : 0 }}\n initial={shouldDisableAnimation ? undefined : false}\n transition={shouldDisableAnimation ? undefined : { type: 'tween' }}\n >\n {isExpandable && !shouldHideIndicator && (\n <Icon icons={['fa fa-chevron-right']} />\n )}\n </StyledListItemHeadIndicator>\n )}\n {leftElements}\n {iconOrImageElement}\n </StyledListItemHeadLeftWrapper>\n <StyledListItemHeadContent\n $isIconOrImageGiven={iconOrImageElement !== undefined}\n $isOpen={isOpen}\n >\n <LayoutGroup>\n <StyledListItemHeadTitle\n as={\n shouldDisableAnimation\n ? undefined\n : motion[LIST_ITEM_HEAD_TITLE_HTML_TAG]\n }\n layout=\"position\"\n >\n <ListItemTitle\n title={title}\n titleElement={titleElement}\n isOpen={isOpen}\n shouldShowMultilineTitle={shouldShowMultilineTitle}\n rightElements={rightElements}\n onResize={handleShowTooltipResize}\n />\n </StyledListItemHeadTitle>\n {shouldShowSubtitleRow && (\n <StyledListItemHeadSubtitle>\n <ListItemSubtitle\n subtitle={subtitle}\n isOpen={isOpen}\n rightElements={rightElements}\n />\n </StyledListItemHeadSubtitle>\n )}\n </LayoutGroup>\n </StyledListItemHeadContent>\n <ListItemRightElement rightElements={rightElements} />\n {hoverItem && (\n <StyledMotionListItemHeadHoverItemWrapper\n className=\"beta-chayns-list-item-hover-item\"\n animate={{\n marginLeft: shouldForceHover || shouldShowHoverItem ? 8 : 0,\n opacity: shouldForceHover || shouldShowHoverItem ? 1 : 0,\n width: shouldForceHover || shouldShowHoverItem ? 'auto' : 0,\n }}\n initial={false}\n transition={{ duration: 0.15, type: 'tween' }}\n >\n <StyledMotionListItemHeadHoverItem>\n {hoverItem}\n </StyledMotionListItemHeadHoverItem>\n </StyledMotionListItemHeadHoverItemWrapper>\n )}\n </StyledListItemHead>\n );\n};\n\nListItemHead.displayName = 'ListItemHead';\n\nexport default ListItemHead;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,uBAAA,CAAAF,OAAA;AAaA,IAAAG,KAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAA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AA,CAAAa,OAAA,CAAAsE,aAAA,CAAC7E,aAAA,CAAA+G,0BAA0B,qBACvBrH,OAAA,CAAAa,OAAA,CAAAsE,aAAA,CAAC1E,iBAAA,CAAAI,OAAgB;IACboC,QAAQ,EAAEA,QAAS;IACnBV,MAAM,EAAEA,MAAO;IACfK,aAAa,EAAEA;EAAc,CAChC,CACuB,CAEvB,CACU,CAAC,eAC5B5C,OAAA,CAAAa,OAAA,CAAAsE,aAAA,CAACzE,qBAAA,CAAAG,OAAoB;IAAC+B,aAAa,EAAEA;EAAc,CAAE,CAAC,EACrDX,SAAS,iBACNjC,OAAA,CAAAa,OAAA,CAAAsE,aAAA,CAAC7E,aAAA,CAAAgH,wCAAwC;IACrCpB,SAAS,EAAC,kCAAkC;IAC5CN,OAAO,EAAE;MACL2B,UAAU,EAAErE,gBAAgB,IAAIO,mBAAmB,GAAG,CAAC,GAAG,CAAC;MAC3DoC,OAAO,EAAE3C,gBAAgB,IAAIO,mBAAmB,GAAG,CAAC,GAAG,CAAC;MACxD+D,KAAK,EAAEtE,gBAAgB,IAAIO,mBAAmB,GAAG,MAAM,GAAG;IAC9D,CAAE;IACFqC,OAAO,EAAE,KAAM;IACfC,UAAU,EAAE;MAAEC,QAAQ,EAAE,IAAI;MAAEC,IAAI,EAAE;IAAQ;EAAE,gBAE9CjG,OAAA,CAAAa,OAAA,CAAAsE,aAAA,CAAC7E,aAAA,CAAAmH,iCAAiC,QAC7BxF,SAC8B,CACG,CAE9B,CAAC;AAE7B,CAAC;AAEDH,YAAY,CAAC4F,WAAW,GAAG,cAAc;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA/G,OAAA,GAE3BiB,YAAY","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.StyledMotionListItemHeadHoverItemWrapper = exports.StyledMotionListItemHeadHoverItem = exports.
|
|
6
|
+
exports.StyledMotionListItemHeadHoverItemWrapper = exports.StyledMotionListItemHeadHoverItem = exports.StyledListItemHeadTitleContent = exports.StyledListItemHeadTitle = exports.StyledListItemHeadSubtitle = exports.StyledListItemHeadLeftWrapper = exports.StyledListItemHeadIndicator = exports.StyledListItemHeadContent = exports.StyledListItemHead = void 0;
|
|
7
7
|
var _react = require("motion/react");
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
9
|
var _list = require("../../../../constants/list");
|
|
@@ -70,55 +70,12 @@ const StyledListItemHeadTitleContent = exports.StyledListItemHeadTitleContent =
|
|
|
70
70
|
min-width: 0;
|
|
71
71
|
position: relative;
|
|
72
72
|
`;
|
|
73
|
-
const StyledListItemHeadTitleElement = exports.StyledListItemHeadTitleElement = _styledComponents.default.div`
|
|
74
|
-
align-items: center;
|
|
75
|
-
display: flex;
|
|
76
|
-
flex: 0 0 auto;
|
|
77
|
-
margin-left: 8px;
|
|
78
|
-
`;
|
|
79
|
-
const StyledListItemHeadTitleText = exports.StyledListItemHeadTitleText = _styledComponents.default.span`
|
|
80
|
-
font-weight: ${({
|
|
81
|
-
$isEllipsis
|
|
82
|
-
}) => $isEllipsis ? 'normal' : 'bold'};
|
|
83
|
-
white-space: ${({
|
|
84
|
-
$isEllipsis
|
|
85
|
-
}) => $isEllipsis ? 'nowrap' : 'normal'};
|
|
86
|
-
min-width: 0;
|
|
87
|
-
overflow: hidden;
|
|
88
|
-
text-overflow: ellipsis;
|
|
89
|
-
|
|
90
|
-
${({
|
|
91
|
-
$shouldShowMultilineTitle,
|
|
92
|
-
$isEllipsis
|
|
93
|
-
}) => $shouldShowMultilineTitle && $isEllipsis && (0, _styledComponents.css)`
|
|
94
|
-
display: -webkit-box;
|
|
95
|
-
-webkit-box-orient: vertical;
|
|
96
|
-
-webkit-line-clamp: 2;
|
|
97
|
-
text-overflow: ellipsis;
|
|
98
|
-
white-space: normal;
|
|
99
|
-
`}
|
|
100
|
-
`;
|
|
101
73
|
const StyledListItemHeadSubtitle = exports.StyledListItemHeadSubtitle = _styledComponents.default.div`
|
|
102
74
|
align-items: center;
|
|
103
75
|
display: flex;
|
|
104
76
|
justify-content: space-between;
|
|
105
77
|
margin-top: 2px;
|
|
106
78
|
`;
|
|
107
|
-
const StyledListItemHeadSubtitleText = exports.StyledListItemHeadSubtitleText = _styledComponents.default.span`
|
|
108
|
-
font-weight: ${({
|
|
109
|
-
$isOpen
|
|
110
|
-
}) => $isOpen ? 'bold' : 'normal'};
|
|
111
|
-
white-space: ${({
|
|
112
|
-
$isOpen
|
|
113
|
-
}) => $isOpen ? 'normal' : 'nowrap'};
|
|
114
|
-
overflow: hidden;
|
|
115
|
-
text-overflow: ellipsis;
|
|
116
|
-
|
|
117
|
-
flex: 1 1 auto;
|
|
118
|
-
font-size: 85%;
|
|
119
|
-
min-width: 0;
|
|
120
|
-
opacity: 0.75;
|
|
121
|
-
`;
|
|
122
79
|
const StyledMotionListItemHeadHoverItemWrapper = exports.StyledMotionListItemHeadHoverItemWrapper = (0, _styledComponents.default)(_react.motion.div)`
|
|
123
80
|
overflow: hidden;
|
|
124
81
|
flex-shrink: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemHead.styles.js","names":["_react","require","_styledComponents","_interopRequireWildcard","_list","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","StyledListItemHead","exports","styled","LIST_ITEM_HEAD_HTML_TAG","theme","text","$isClickable","$isAnyItemExpandable","css","StyledListItemHeadLeftWrapper","div","StyledListItemHeadIndicator","LIST_ITEM_HEAD_INDICATOR_HTML_TAG","StyledListItemHeadContent","$isOpen","$isIconOrImageGiven","undefined","StyledListItemHeadTitle","LIST_ITEM_HEAD_TITLE_HTML_TAG","StyledListItemHeadTitleContent","
|
|
1
|
+
{"version":3,"file":"ListItemHead.styles.js","names":["_react","require","_styledComponents","_interopRequireWildcard","_list","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","StyledListItemHead","exports","styled","LIST_ITEM_HEAD_HTML_TAG","theme","text","$isClickable","$isAnyItemExpandable","css","StyledListItemHeadLeftWrapper","div","StyledListItemHeadIndicator","LIST_ITEM_HEAD_INDICATOR_HTML_TAG","StyledListItemHeadContent","$isOpen","$isIconOrImageGiven","undefined","StyledListItemHeadTitle","LIST_ITEM_HEAD_TITLE_HTML_TAG","StyledListItemHeadTitleContent","StyledListItemHeadSubtitle","StyledMotionListItemHeadHoverItemWrapper","motion","StyledMotionListItemHeadHoverItem"],"sources":["../../../../../../src/components/list/list-item/list-item-head/ListItemHead.styles.ts"],"sourcesContent":["import { motion } from 'motion/react';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../../../color-scheme-provider/ColorSchemeProvider';\nimport {\n LIST_ITEM_HEAD_HTML_TAG,\n LIST_ITEM_HEAD_INDICATOR_HTML_TAG,\n LIST_ITEM_HEAD_TITLE_HTML_TAG,\n} from '../../../../constants/list';\n\ntype StyledListItemHeadProps = WithTheme<{\n $isClickable: boolean;\n $isAnyItemExpandable: boolean;\n}>;\n\nexport const StyledListItemHead = styled[LIST_ITEM_HEAD_HTML_TAG]<StyledListItemHeadProps>`\n //align-items: center;\n overflow: hidden;\n color: ${({ theme }: StyledListItemHeadProps) => theme.text};\n display: flex;\n min-height: 64px;\n padding: 12px 9px;\n position: relative;\n width: 100%;\n justify-content: center;\n cursor: ${({ $isClickable }) => ($isClickable ? 'pointer' : 'default')};\n\n ${({ $isAnyItemExpandable }) =>\n !$isAnyItemExpandable &&\n css`\n padding-left: 12px;\n `}\n`;\n\nexport const StyledListItemHeadLeftWrapper = styled.div`\n display: flex;\n align-items: center;\n margin: auto 0;\n`;\n\nexport const StyledListItemHeadIndicator = styled[LIST_ITEM_HEAD_INDICATOR_HTML_TAG]`\n align-items: center;\n display: flex;\n flex: 0 0 auto;\n height: 26px;\n justify-content: center;\n width: 26px;\n`;\n\ntype StyledListItemHeadContentProps = {\n $isIconOrImageGiven: boolean;\n $isOpen: boolean;\n};\n\nexport const StyledListItemHeadContent = styled.div<StyledListItemHeadContentProps>`\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n font-weight: ${({ $isOpen }) => ($isOpen ? 'bold' : 'normal')};\n justify-content: center;\n line-height: normal;\n margin-left: ${({ $isIconOrImageGiven }) => ($isIconOrImageGiven ? '10px' : undefined)};\n min-width: 0;\n`;\n\nexport const StyledListItemHeadTitle = styled[LIST_ITEM_HEAD_TITLE_HTML_TAG]`\n align-items: center;\n display: flex;\n justify-content: space-between;\n`;\n\nexport const StyledListItemHeadTitleContent = styled.div`\n align-items: center;\n display: flex;\n flex: 1 1 auto;\n max-width: 100%;\n min-width: 0;\n position: relative;\n`;\n\nexport const StyledListItemHeadSubtitle = styled.div`\n align-items: center;\n display: flex;\n justify-content: space-between;\n margin-top: 2px;\n`;\n\ntype StyledMotionListItemHeadHoverItemWrapperProps = WithTheme<unknown>;\n\nexport const StyledMotionListItemHeadHoverItemWrapper = styled(\n motion.div,\n)<StyledMotionListItemHeadHoverItemWrapperProps>`\n overflow: hidden;\n flex-shrink: 0;\n margin: auto 0;\n position: absolute;\n right: 0;\n\n background: ${({ theme }: StyledMotionListItemHeadHoverItemWrapperProps) =>\n `linear-gradient(to right, transparent 0px, rgb(${theme['000-rgb'] ?? ''}) 40px)`};\n`;\n\nexport const StyledMotionListItemHeadHoverItem = styled.div`\n padding-left: 40px;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAH,OAAA;AAIoC,SAAAE,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAA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object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _ListItemRightElement = require("./ListItemRightElement.styles");
|
|
9
|
+
var _accordion = require("../../../../../utils/accordion");
|
|
10
|
+
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); }
|
|
11
|
+
const ListItemRightElement = ({
|
|
12
|
+
rightElements
|
|
13
|
+
}) => {
|
|
14
|
+
const handlePreventClick = event => {
|
|
15
|
+
event.stopPropagation();
|
|
16
|
+
event.preventDefault();
|
|
17
|
+
};
|
|
18
|
+
const centerElement = (0, _react.useMemo)(() => {
|
|
19
|
+
if (typeof rightElements === 'string' || /*#__PURE__*/(0, _react.isValidElement)(rightElements)) {
|
|
20
|
+
return rightElements;
|
|
21
|
+
}
|
|
22
|
+
if (typeof rightElements === 'object' && rightElements && 'center' in rightElements) {
|
|
23
|
+
return rightElements.center;
|
|
24
|
+
}
|
|
25
|
+
return undefined;
|
|
26
|
+
}, [rightElements]);
|
|
27
|
+
const shouldPreventRightElementClick = (0, _react.useMemo)(() => {
|
|
28
|
+
if (centerElement) {
|
|
29
|
+
return (0, _accordion.getElementClickEvent)(centerElement);
|
|
30
|
+
}
|
|
31
|
+
return false;
|
|
32
|
+
}, [centerElement]);
|
|
33
|
+
if (!centerElement) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
return /*#__PURE__*/_react.default.createElement(_ListItemRightElement.StyledListItemRightElement, {
|
|
37
|
+
onClick: shouldPreventRightElementClick ? handlePreventClick : undefined
|
|
38
|
+
}, centerElement);
|
|
39
|
+
};
|
|
40
|
+
ListItemRightElement.displayName = 'ListItemRightElement';
|
|
41
|
+
var _default = exports.default = ListItemRightElement;
|
|
42
|
+
//# sourceMappingURL=ListItemRightElement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItemRightElement.js","names":["_react","_interopRequireWildcard","require","_ListItemRightElement","_accordion","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ListItemRightElement","rightElements","handlePreventClick","event","stopPropagation","preventDefault","centerElement","useMemo","isValidElement","center","undefined","shouldPreventRightElementClick","getElementClickEvent","createElement","StyledListItemRightElement","onClick","displayName","_default","exports"],"sources":["../../../../../../../src/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.tsx"],"sourcesContent":["import React, { FC, isValidElement, useMemo } from 'react';\nimport type { IListItemRightElement, IListItemRightElements } from '../../../../../types/list';\nimport { StyledListItemRightElement } from './ListItemRightElement.styles';\nimport { getElementClickEvent } from '../../../../../utils/accordion';\n\ntype ListItemRightElementProps = {\n rightElements?: IListItemRightElements;\n};\n\nconst ListItemRightElement: FC<ListItemRightElementProps> = ({ rightElements }) => {\n const handlePreventClick = (event: React.MouseEvent) => {\n event.stopPropagation();\n event.preventDefault();\n };\n\n const centerElement = useMemo(() => {\n if (typeof rightElements === 'string' || isValidElement(rightElements)) {\n return rightElements;\n }\n\n if (typeof rightElements === 'object' && rightElements && 'center' in rightElements) {\n return (rightElements as unknown as IListItemRightElement).center;\n }\n\n return undefined;\n }, [rightElements]);\n\n const shouldPreventRightElementClick = useMemo(() => {\n if (centerElement) {\n return getElementClickEvent(centerElement);\n }\n\n return false;\n }, [centerElement]);\n\n if (!centerElement) {\n return null;\n }\n\n return (\n <StyledListItemRightElement\n onClick={shouldPreventRightElementClick ? handlePreventClick : undefined}\n >\n {centerElement}\n </StyledListItemRightElement>\n );\n};\n\nListItemRightElement.displayName = 'ListItemRightElement';\n\nexport default ListItemRightElement;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,qBAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAAsE,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,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,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;AAMtE,MAAMkB,oBAAmD,GAAGA,CAAC;EAAEC;AAAc,CAAC,KAAK;EAC/E,MAAMC,kBAAkB,GAAIC,KAAuB,IAAK;IACpDA,KAAK,CAACC,eAAe,CAAC,CAAC;IACvBD,KAAK,CAACE,cAAc,CAAC,CAAC;EAC1B,CAAC;EAED,MAAMC,aAAa,GAAG,IAAAC,cAAO,EAAC,MAAM;IAChC,IAAI,OAAON,aAAa,KAAK,QAAQ,iBAAI,IAAAO,qBAAc,EAACP,aAAa,CAAC,EAAE;MACpE,OAAOA,aAAa;IACxB;IAEA,IAAI,OAAOA,aAAa,KAAK,QAAQ,IAAIA,aAAa,IAAI,QAAQ,IAAIA,aAAa,EAAE;MACjF,OAAQA,aAAa,CAAsCQ,MAAM;IACrE;IAEA,OAAOC,SAAS;EACpB,CAAC,EAAE,CAACT,aAAa,CAAC,CAAC;EAEnB,MAAMU,8BAA8B,GAAG,IAAAJ,cAAO,EAAC,MAAM;IACjD,IAAID,aAAa,EAAE;MACf,OAAO,IAAAM,+BAAoB,EAACN,aAAa,CAAC;IAC9C;IAEA,OAAO,KAAK;EAChB,CAAC,EAAE,CAACA,aAAa,CAAC,CAAC;EAEnB,IAAI,CAACA,aAAa,EAAE;IAChB,OAAO,IAAI;EACf;EAEA,oBACI9B,MAAA,CAAAe,OAAA,CAAAsB,aAAA,CAAClC,qBAAA,CAAAmC,0BAA0B;IACvBC,OAAO,EAAEJ,8BAA8B,GAAGT,kBAAkB,GAAGQ;EAAU,GAExEJ,aACuB,CAAC;AAErC,CAAC;AAEDN,oBAAoB,CAACgB,WAAW,GAAG,sBAAsB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA3B,OAAA,GAE3CS,oBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledListItemRightElement = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
const StyledListItemRightElement = exports.StyledListItemRightElement = _styledComponents.default.div`
|
|
10
|
+
margin: auto 0 auto 12px;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex: 0 0 auto;
|
|
13
|
+
line-height: normal;
|
|
14
|
+
`;
|
|
15
|
+
//# sourceMappingURL=ListItemRightElement.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItemRightElement.styles.js","names":["_styledComponents","_interopRequireDefault","require","e","__esModule","default","StyledListItemRightElement","exports","styled","div"],"sources":["../../../../../../../src/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledListItemRightElement = styled.div`\n margin: auto 0 auto 12px;\n display: flex;\n flex: 0 0 auto;\n line-height: normal;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhC,MAAMG,0BAA0B,GAAAC,OAAA,CAAAD,0BAAA,GAAGE,yBAAM,CAACC,GAAG;AACpD;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
package/lib/cjs/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _ListItemSubtitle = require("./ListItemSubtitle.styles");
|
|
9
|
+
var _accordion = require("../../../../../utils/accordion");
|
|
10
|
+
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); }
|
|
11
|
+
const ListItemSubtitle = ({
|
|
12
|
+
rightElements,
|
|
13
|
+
subtitle,
|
|
14
|
+
isOpen
|
|
15
|
+
}) => {
|
|
16
|
+
const handlePreventClick = event => {
|
|
17
|
+
event.stopPropagation();
|
|
18
|
+
event.preventDefault();
|
|
19
|
+
};
|
|
20
|
+
const bottomElement = (0, _react.useMemo)(() => {
|
|
21
|
+
if (typeof rightElements === 'object' && rightElements && 'bottom' in rightElements) {
|
|
22
|
+
return rightElements.bottom;
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}, [rightElements]);
|
|
26
|
+
const shouldPreventRightElementClick = (0, _react.useMemo)(() => {
|
|
27
|
+
if (bottomElement) {
|
|
28
|
+
return (0, _accordion.getElementClickEvent)(bottomElement);
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
}, [bottomElement]);
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement(_ListItemSubtitle.StyledListItemSubtitle, null, /*#__PURE__*/_react.default.createElement(_ListItemSubtitle.StyledListItemHeadSubtitleText, {
|
|
33
|
+
$isOpen: isOpen
|
|
34
|
+
}, subtitle), bottomElement && /*#__PURE__*/_react.default.createElement(_ListItemSubtitle.StyledListItemBottomRightElement, {
|
|
35
|
+
onClick: shouldPreventRightElementClick ? handlePreventClick : undefined
|
|
36
|
+
}, bottomElement));
|
|
37
|
+
};
|
|
38
|
+
ListItemSubtitle.displayName = 'ListItemSubtitle';
|
|
39
|
+
var _default = exports.default = ListItemSubtitle;
|
|
40
|
+
//# sourceMappingURL=ListItemSubtitle.js.map
|
package/lib/cjs/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItemSubtitle.js","names":["_react","_interopRequireWildcard","require","_ListItemSubtitle","_accordion","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ListItemSubtitle","rightElements","subtitle","isOpen","handlePreventClick","event","stopPropagation","preventDefault","bottomElement","useMemo","bottom","undefined","shouldPreventRightElementClick","getElementClickEvent","createElement","StyledListItemSubtitle","StyledListItemHeadSubtitleText","$isOpen","StyledListItemBottomRightElement","onClick","displayName","_default","exports"],"sources":["../../../../../../../src/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.tsx"],"sourcesContent":["import React, { FC, ReactNode, useMemo } from 'react';\nimport type { IListItemRightElement, IListItemRightElements } from '../../../../../types/list';\nimport {\n StyledListItemHeadSubtitleText,\n StyledListItemSubtitle,\n StyledListItemBottomRightElement,\n} from './ListItemSubtitle.styles';\nimport { getElementClickEvent } from '../../../../../utils/accordion';\n\ntype ListItemSubtitleProps = {\n rightElements?: IListItemRightElements;\n subtitle?: ReactNode;\n isOpen: boolean;\n};\n\nconst ListItemSubtitle: FC<ListItemSubtitleProps> = ({ rightElements, subtitle, isOpen }) => {\n const handlePreventClick = (event: React.MouseEvent) => {\n event.stopPropagation();\n event.preventDefault();\n };\n\n const bottomElement = useMemo(() => {\n if (typeof rightElements === 'object' && rightElements && 'bottom' in rightElements) {\n return (rightElements as unknown as IListItemRightElement).bottom;\n }\n\n return undefined;\n }, [rightElements]);\n\n const shouldPreventRightElementClick = useMemo(() => {\n if (bottomElement) {\n return getElementClickEvent(bottomElement);\n }\n\n return false;\n }, [bottomElement]);\n\n return (\n <StyledListItemSubtitle>\n <StyledListItemHeadSubtitleText $isOpen={isOpen}>\n {subtitle}\n </StyledListItemHeadSubtitleText>\n {bottomElement && (\n <StyledListItemBottomRightElement\n onClick={shouldPreventRightElementClick ? handlePreventClick : undefined}\n >\n {bottomElement}\n </StyledListItemBottomRightElement>\n )}\n </StyledListItemSubtitle>\n );\n};\n\nListItemSubtitle.displayName = 'ListItemSubtitle';\n\nexport default ListItemSubtitle;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAD,OAAA;AAKA,IAAAE,UAAA,GAAAF,OAAA;AAAsE,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,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,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,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A,GAEnCS,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledListItemSubtitle = exports.StyledListItemHeadSubtitleText = exports.StyledListItemBottomRightElement = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
const StyledListItemSubtitle = exports.StyledListItemSubtitle = _styledComponents.default.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
gap: 12px;
|
|
14
|
+
width: 100%;
|
|
15
|
+
`;
|
|
16
|
+
const StyledListItemHeadSubtitleText = exports.StyledListItemHeadSubtitleText = _styledComponents.default.span`
|
|
17
|
+
font-weight: ${({
|
|
18
|
+
$isOpen
|
|
19
|
+
}) => $isOpen ? 'bold' : 'normal'};
|
|
20
|
+
white-space: ${({
|
|
21
|
+
$isOpen
|
|
22
|
+
}) => $isOpen ? 'normal' : 'nowrap'};
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
text-overflow: ellipsis;
|
|
25
|
+
|
|
26
|
+
flex: 1 1 auto;
|
|
27
|
+
font-size: 85%;
|
|
28
|
+
min-width: 0;
|
|
29
|
+
opacity: 0.75;
|
|
30
|
+
`;
|
|
31
|
+
const StyledListItemBottomRightElement = exports.StyledListItemBottomRightElement = _styledComponents.default.div`
|
|
32
|
+
display: flex;
|
|
33
|
+
flex: 0 0 auto;
|
|
34
|
+
font-size: 85%;
|
|
35
|
+
margin-left: auto;
|
|
36
|
+
height: 50%;
|
|
37
|
+
align-items: center;
|
|
38
|
+
line-height: normal;
|
|
39
|
+
`;
|
|
40
|
+
//# sourceMappingURL=ListItemSubtitle.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItemSubtitle.styles.js","names":["_styledComponents","_interopRequireDefault","require","e","__esModule","default","StyledListItemSubtitle","exports","styled","div","StyledListItemHeadSubtitleText","span","$isOpen","StyledListItemBottomRightElement"],"sources":["../../../../../../../src/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport type { WithTheme } from '../../../../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledListItemSubtitle = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n width: 100%;\n`;\n\ntype StyledListItemHeadSubtitleTextProps = WithTheme<{ $isOpen: boolean }>;\n\nexport const StyledListItemHeadSubtitleText = styled.span<StyledListItemHeadSubtitleTextProps>`\n font-weight: ${({ $isOpen }) => ($isOpen ? 'bold' : 'normal')};\n white-space: ${({ $isOpen }) => ($isOpen ? 'normal' : 'nowrap')};\n overflow: hidden;\n text-overflow: ellipsis;\n\n flex: 1 1 auto;\n font-size: 85%;\n min-width: 0;\n opacity: 0.75;\n`;\n\nexport const StyledListItemBottomRightElement = styled.div`\n display: flex;\n flex: 0 0 auto;\n font-size: 85%;\n margin-left: auto;\n height: 50%;\n align-items: center;\n line-height: normal;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGhC,MAAMG,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAGE,yBAAM,CAACC,GAAG;AAChD;AACA;AACA;AACA;AACA;AACA,CAAC;AAIM,MAAMC,8BAA8B,GAAAH,OAAA,CAAAG,8BAAA,GAAGF,yBAAM,CAACG,IAAyC;AAC9F,mBAAmB,CAAC;EAAEC;AAAQ,CAAC,KAAMA,OAAO,GAAG,MAAM,GAAG,QAAS;AACjE,mBAAmB,CAAC;EAAEA;AAAQ,CAAC,KAAMA,OAAO,GAAG,QAAQ,GAAG,QAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAEM,MAAMC,gCAAgC,GAAAN,OAAA,CAAAM,gCAAA,GAAGL,yBAAM,CAACC,GAAG;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _ListItemTitle = require("./ListItemTitle.styles");
|
|
9
|
+
var _accordion = require("../../../../../utils/accordion");
|
|
10
|
+
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); }
|
|
11
|
+
const ListItemTitle = ({
|
|
12
|
+
rightElements,
|
|
13
|
+
titleElement,
|
|
14
|
+
title,
|
|
15
|
+
shouldShowMultilineTitle,
|
|
16
|
+
isOpen,
|
|
17
|
+
onResize
|
|
18
|
+
}) => {
|
|
19
|
+
const titleWrapperRef = (0, _react.useRef)(null);
|
|
20
|
+
(0, _react.useEffect)(() => {
|
|
21
|
+
const element = titleWrapperRef === null || titleWrapperRef === void 0 ? void 0 : titleWrapperRef.current;
|
|
22
|
+
if (!element || typeof onResize !== 'function') return undefined;
|
|
23
|
+
const resizeObserver = new ResizeObserver(onResize);
|
|
24
|
+
resizeObserver.observe(element);
|
|
25
|
+
return () => resizeObserver.disconnect();
|
|
26
|
+
}, [onResize]);
|
|
27
|
+
const handlePreventClick = event => {
|
|
28
|
+
event.stopPropagation();
|
|
29
|
+
event.preventDefault();
|
|
30
|
+
};
|
|
31
|
+
const topElement = (0, _react.useMemo)(() => {
|
|
32
|
+
if (typeof rightElements === 'object' && rightElements && 'top' in rightElements) {
|
|
33
|
+
return rightElements.top;
|
|
34
|
+
}
|
|
35
|
+
return undefined;
|
|
36
|
+
}, [rightElements]);
|
|
37
|
+
const shouldPreventRightElementClick = (0, _react.useMemo)(() => {
|
|
38
|
+
if (topElement) {
|
|
39
|
+
return (0, _accordion.getElementClickEvent)(topElement);
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
42
|
+
}, [topElement]);
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement(_ListItemTitle.StyledListItemTitle, null, /*#__PURE__*/_react.default.createElement(_ListItemTitle.StyledListItemTitleLeftWrapper, null, /*#__PURE__*/_react.default.createElement(_ListItemTitle.StyledListItemHeadTitleText, {
|
|
44
|
+
$isEllipsis: !isOpen,
|
|
45
|
+
ref: titleWrapperRef,
|
|
46
|
+
$shouldShowMultilineTitle: shouldShowMultilineTitle
|
|
47
|
+
}, title), /*#__PURE__*/_react.default.createElement(_ListItemTitle.StyledListItemHeadTitleElement, null, titleElement)), topElement && /*#__PURE__*/_react.default.createElement(_ListItemTitle.StyledListItemTopRightElement, {
|
|
48
|
+
onClick: shouldPreventRightElementClick ? handlePreventClick : undefined
|
|
49
|
+
}, topElement));
|
|
50
|
+
};
|
|
51
|
+
ListItemTitle.displayName = 'ListItemTitle';
|
|
52
|
+
var _default = exports.default = ListItemTitle;
|
|
53
|
+
//# sourceMappingURL=ListItemTitle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItemTitle.js","names":["_react","_interopRequireWildcard","require","_ListItemTitle","_accordion","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ListItemTitle","rightElements","titleElement","title","shouldShowMultilineTitle","isOpen","onResize","titleWrapperRef","useRef","useEffect","element","current","undefined","resizeObserver","ResizeObserver","observe","disconnect","handlePreventClick","event","stopPropagation","preventDefault","topElement","useMemo","top","shouldPreventRightElementClick","getElementClickEvent","createElement","StyledListItemTitle","StyledListItemTitleLeftWrapper","StyledListItemHeadTitleText","$isEllipsis","ref","$shouldShowMultilineTitle","StyledListItemHeadTitleElement","StyledListItemTopRightElement","onClick","displayName","_default","exports"],"sources":["../../../../../../../src/components/list/list-item/list-item-head/list-item-title/ListItemTitle.tsx"],"sourcesContent":["import React, { FC, ReactNode, useEffect, useMemo, useRef } from 'react';\nimport type { IListItemRightElement, IListItemRightElements } from '../../../../../types/list';\nimport {\n StyledListItemHeadTitleElement,\n StyledListItemHeadTitleText,\n StyledListItemTitle,\n StyledListItemTitleLeftWrapper,\n StyledListItemTopRightElement,\n} from './ListItemTitle.styles';\nimport { getElementClickEvent } from '../../../../../utils/accordion';\n\ntype ListItemTitleProps = {\n rightElements?: IListItemRightElements;\n title: ReactNode;\n titleElement?: ReactNode;\n shouldShowMultilineTitle: boolean;\n isOpen: boolean;\n onResize?: (entries: ResizeObserverEntry[]) => void;\n};\n\nconst ListItemTitle: FC<ListItemTitleProps> = ({\n rightElements,\n titleElement,\n title,\n shouldShowMultilineTitle,\n isOpen,\n onResize,\n}) => {\n const titleWrapperRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const element = titleWrapperRef?.current;\n if (!element || typeof onResize !== 'function') return undefined;\n\n const resizeObserver = new ResizeObserver(onResize);\n resizeObserver.observe(element);\n\n return () => resizeObserver.disconnect();\n }, [onResize]);\n\n const handlePreventClick = (event: React.MouseEvent) => {\n event.stopPropagation();\n event.preventDefault();\n };\n\n const topElement = useMemo(() => {\n if (typeof rightElements === 'object' && rightElements && 'top' in rightElements) {\n return (rightElements as unknown as IListItemRightElement).top;\n }\n\n return undefined;\n }, [rightElements]);\n\n const shouldPreventRightElementClick = useMemo(() => {\n if (topElement) {\n return getElementClickEvent(topElement);\n }\n\n return false;\n }, [topElement]);\n\n return (\n <StyledListItemTitle>\n <StyledListItemTitleLeftWrapper>\n <StyledListItemHeadTitleText\n $isEllipsis={!isOpen}\n ref={titleWrapperRef}\n $shouldShowMultilineTitle={shouldShowMultilineTitle}\n >\n {title}\n </StyledListItemHeadTitleText>\n <StyledListItemHeadTitleElement>{titleElement}</StyledListItemHeadTitleElement>\n </StyledListItemTitleLeftWrapper>\n {topElement && (\n <StyledListItemTopRightElement\n onClick={shouldPreventRightElementClick ? handlePreventClick : undefined}\n >\n {topElement}\n </StyledListItemTopRightElement>\n )}\n </StyledListItemTitle>\n );\n};\n\nListItemTitle.displayName = 'ListItemTitle';\n\nexport default ListItemTitle;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AAOA,IAAAE,UAAA,GAAAF,OAAA;AAAsE,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,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,EAAA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