@chayns-ui/core 0.3.2 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/button.css +16 -0
- package/dist/checkbox.css +83 -0
- package/dist/components/accordion/Accordion.d.ts.map +1 -1
- package/dist/components/accordion/Accordion.js +3 -0
- package/dist/components/accordion/Accordion.js.map +1 -1
- package/dist/components/checkbox/Checkbox.d.ts +4 -0
- package/dist/components/checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/Checkbox.js +27 -0
- package/dist/components/checkbox/Checkbox.js.map +1 -0
- package/dist/components/checkbox/Checkbox.types.d.ts +9 -0
- package/dist/components/checkbox/Checkbox.types.d.ts.map +1 -0
- package/dist/components/list/List.d.ts +14 -2
- package/dist/components/list/List.d.ts.map +1 -1
- package/dist/components/list/List.js +79 -6
- package/dist/components/list/List.js.map +1 -1
- package/dist/components/list/List.types.d.ts +17 -77
- package/dist/components/list/List.types.d.ts.map +1 -1
- package/dist/components/list/ListContext.d.ts +6 -0
- package/dist/components/list/ListContext.d.ts.map +1 -0
- package/dist/components/list/ListContext.js +14 -0
- package/dist/components/list/ListContext.js.map +1 -0
- package/dist/components/message-box/MessageBox.d.ts +4 -0
- package/dist/components/message-box/MessageBox.d.ts.map +1 -0
- package/dist/components/message-box/MessageBox.js +19 -0
- package/dist/components/message-box/MessageBox.js.map +1 -0
- package/dist/components/message-box/MessageBox.types.d.ts +13 -0
- package/dist/components/message-box/MessageBox.types.d.ts.map +1 -0
- package/dist/components/popup/Popup.d.ts +6 -3
- package/dist/components/popup/Popup.d.ts.map +1 -1
- package/dist/components/popup/Popup.js +102 -90
- package/dist/components/popup/Popup.js.map +1 -1
- package/dist/components/popup/Popup.types.d.ts +17 -7
- package/dist/components/popup/Popup.types.d.ts.map +1 -1
- package/dist/components/popup/PopupList.d.ts.map +1 -1
- package/dist/components/popup/PopupList.js +7 -5
- package/dist/components/popup/PopupList.js.map +1 -1
- package/dist/components/radio-group/RadioGroup.d.ts +6 -0
- package/dist/components/radio-group/RadioGroup.d.ts.map +1 -0
- package/dist/components/radio-group/RadioGroup.js +69 -0
- package/dist/components/radio-group/RadioGroup.js.map +1 -0
- package/dist/components/radio-group/RadioGroup.types.d.ts +30 -0
- package/dist/components/radio-group/RadioGroup.types.d.ts.map +1 -0
- package/dist/components/radio-group/RadioGroupContext.d.ts +11 -0
- package/dist/components/radio-group/RadioGroupContext.d.ts.map +1 -0
- package/dist/components/radio-group/RadioGroupContext.js +12 -0
- package/dist/components/radio-group/RadioGroupContext.js.map +1 -0
- package/dist/components/segmented-control/SegmentedControl.d.ts +16 -0
- package/dist/components/segmented-control/SegmentedControl.d.ts.map +1 -0
- package/dist/components/segmented-control/SegmentedControl.js +146 -0
- package/dist/components/segmented-control/SegmentedControl.js.map +1 -0
- package/dist/components/segmented-control/SegmentedControl.types.d.ts +41 -0
- package/dist/components/segmented-control/SegmentedControl.types.d.ts.map +1 -0
- package/dist/components/segmented-control/SegmentedControlContext.d.ts +11 -0
- package/dist/components/segmented-control/SegmentedControlContext.d.ts.map +1 -0
- package/dist/components/segmented-control/SegmentedControlContext.js +12 -0
- package/dist/components/segmented-control/SegmentedControlContext.js.map +1 -0
- package/dist/components/switch/Switch.d.ts +4 -0
- package/dist/components/switch/Switch.d.ts.map +1 -0
- package/dist/components/switch/Switch.js +28 -0
- package/dist/components/switch/Switch.js.map +1 -0
- package/dist/components/switch/Switch.types.d.ts +9 -0
- package/dist/components/switch/Switch.types.d.ts.map +1 -0
- package/dist/components/text-area/TextArea.d.ts +4 -0
- package/dist/components/text-area/TextArea.d.ts.map +1 -0
- package/dist/components/text-area/TextArea.js +45 -0
- package/dist/components/text-area/TextArea.js.map +1 -0
- package/dist/components/text-area/TextArea.types.d.ts +15 -0
- package/dist/components/text-area/TextArea.types.d.ts.map +1 -0
- package/dist/components/text-field/TextField.d.ts +4 -0
- package/dist/components/text-field/TextField.d.ts.map +1 -0
- package/dist/components/text-field/TextField.js +45 -0
- package/dist/components/text-field/TextField.js.map +1 -0
- package/dist/components/text-field/TextField.types.d.ts +15 -0
- package/dist/components/text-field/TextField.types.d.ts.map +1 -0
- package/dist/index.d.ts +15 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -3
- package/dist/list.css +33 -44
- package/dist/message-box.css +26 -0
- package/dist/radio-group.css +102 -0
- package/dist/segmented-control.css +79 -0
- package/dist/styles.css +7 -0
- package/dist/switch.css +76 -0
- package/dist/text-area.css +136 -0
- package/dist/text-field.css +138 -0
- package/package.json +8 -1
- package/dist/components/list-item/ListItem.d.ts +0 -4
- package/dist/components/list-item/ListItem.d.ts.map +0 -1
- package/dist/components/list-item/ListItem.js +0 -42
- package/dist/components/list-item/ListItem.js.map +0 -1
- package/dist/components/list-item/list-item-body/ListItemBody.d.ts +0 -10
- package/dist/components/list-item/list-item-body/ListItemBody.d.ts.map +0 -1
- package/dist/components/list-item/list-item-body/ListItemBody.js +0 -30
- package/dist/components/list-item/list-item-body/ListItemBody.js.map +0 -1
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
@layer chayns.components {
|
|
2
|
+
.chayns-text-field {
|
|
3
|
+
position: relative;
|
|
4
|
+
inline-size: 100%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.chayns-text-field__input {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
inline-size: 100%;
|
|
10
|
+
padding: var(--input-py) var(--input-px);
|
|
11
|
+
border: 1.5px solid var(--input-border);
|
|
12
|
+
border-radius: 10px;
|
|
13
|
+
font: inherit;
|
|
14
|
+
font-size: var(--fs-body);
|
|
15
|
+
line-height: 1.2;
|
|
16
|
+
color: var(--text);
|
|
17
|
+
background: var(--surface);
|
|
18
|
+
outline: none;
|
|
19
|
+
transition:
|
|
20
|
+
border-color 0.18s ease,
|
|
21
|
+
box-shadow 0.18s ease;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.chayns-text-field__label {
|
|
25
|
+
position: absolute;
|
|
26
|
+
inset-block-start: 0;
|
|
27
|
+
inset-inline-start: 10px;
|
|
28
|
+
padding-inline: var(--k5);
|
|
29
|
+
color: var(--text-3);
|
|
30
|
+
pointer-events: none;
|
|
31
|
+
font-size: var(--fs-body);
|
|
32
|
+
font-weight: 400;
|
|
33
|
+
line-height: 1.2;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
background: var(--surface);
|
|
36
|
+
transform: translateY(calc(var(--input-py) + 1.5px + 0.6em - 50%));
|
|
37
|
+
transform-origin: left center;
|
|
38
|
+
transition:
|
|
39
|
+
transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1),
|
|
40
|
+
color 0.15s ease;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:where(.chayns-text-field__input:hover:not(:disabled)) {
|
|
44
|
+
border-color: var(--text-3);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.chayns-text-field__input:focus {
|
|
48
|
+
border-color: var(--accent);
|
|
49
|
+
box-shadow: 0 0 0 var(--focus-ring-size)
|
|
50
|
+
rgb(var(--focus-ring-rgb), var(--focus-ring-alpha-soft));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.chayns-text-field__input:disabled {
|
|
54
|
+
color: var(--disabled-fg);
|
|
55
|
+
cursor: not-allowed;
|
|
56
|
+
background: var(--disabled-bg);
|
|
57
|
+
border-color: var(--disabled-border);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.chayns-text-field__input:read-only {
|
|
61
|
+
color: var(--text-2);
|
|
62
|
+
cursor: text;
|
|
63
|
+
background: var(--surface-2);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.chayns-text-field--error .chayns-text-field__label {
|
|
67
|
+
color: var(--danger);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.chayns-text-field__input:disabled + .chayns-text-field__label {
|
|
71
|
+
color: var(--disabled-fg);
|
|
72
|
+
background: var(--disabled-bg);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.chayns-text-field__input:read-only + .chayns-text-field__label {
|
|
76
|
+
background: var(--surface-2);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.chayns-text-field--error .chayns-text-field__input {
|
|
80
|
+
border-color: var(--danger);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.chayns-text-field__input:focus + .chayns-text-field__label,
|
|
84
|
+
.chayns-text-field__input:not(:placeholder-shown) + .chayns-text-field__label {
|
|
85
|
+
transform: translateY(-50%) scale(0.8);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.chayns-text-field__input:focus + .chayns-text-field__label {
|
|
89
|
+
color: var(--accent);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.chayns-text-field--error .chayns-text-field__input:focus + .chayns-text-field__label {
|
|
93
|
+
color: var(--danger);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.chayns-text-field--error .chayns-text-field__input:disabled {
|
|
97
|
+
color: var(--disabled-fg);
|
|
98
|
+
background: var(--disabled-bg);
|
|
99
|
+
border-color: var(--disabled-border);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.chayns-text-field--error .chayns-text-field__input:disabled + .chayns-text-field__label {
|
|
103
|
+
color: var(--disabled-fg);
|
|
104
|
+
background: var(--disabled-bg);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.chayns-text-field--error .chayns-text-field__input:focus {
|
|
108
|
+
box-shadow: 0 0 0 var(--focus-ring-size)
|
|
109
|
+
rgb(var(--focus-ring-rgb), var(--focus-ring-alpha-soft));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.chayns-text-field__help {
|
|
113
|
+
display: flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
justify-content: space-between;
|
|
116
|
+
gap: var(--k10);
|
|
117
|
+
margin-block-start: 6px;
|
|
118
|
+
font-size: var(--fs-caption);
|
|
119
|
+
color: var(--text-3);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.chayns-text-field__error {
|
|
123
|
+
color: var(--danger);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@media (forced-colors: active) {
|
|
127
|
+
.chayns-text-field__input:focus-visible {
|
|
128
|
+
outline: var(--focus-ring-size) solid ButtonText;
|
|
129
|
+
outline-offset: 1px;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@media (prefers-reduced-motion: reduce) {
|
|
134
|
+
.chayns-text-field__label {
|
|
135
|
+
transition: none;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-ui/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Accessible React core components for chayns UI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -29,6 +29,13 @@
|
|
|
29
29
|
"./accordion.css": "./dist/accordion.css",
|
|
30
30
|
"./popup.css": "./dist/popup.css",
|
|
31
31
|
"./split-button.css": "./dist/split-button.css",
|
|
32
|
+
"./text-field.css": "./dist/text-field.css",
|
|
33
|
+
"./text-area.css": "./dist/text-area.css",
|
|
34
|
+
"./checkbox.css": "./dist/checkbox.css",
|
|
35
|
+
"./switch.css": "./dist/switch.css",
|
|
36
|
+
"./radio-group.css": "./dist/radio-group.css",
|
|
37
|
+
"./segmented-control.css": "./dist/segmented-control.css",
|
|
38
|
+
"./message-box.css": "./dist/message-box.css",
|
|
32
39
|
"./styles.css": "./dist/styles.css",
|
|
33
40
|
"./package.json": "./package.json"
|
|
34
41
|
},
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ListItemProps } from '../list/List.types.js';
|
|
2
|
-
declare const ListItem: ({ className, disabled, href, id, leading, onClick, subtitle, title, trailing, unread, unreadLabel, }: ListItemProps) => import("react").JSX.Element;
|
|
3
|
-
export default ListItem;
|
|
4
|
-
//# sourceMappingURL=ListItem.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../src/components/list-item/ListItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG3D,QAAA,MAAM,QAAQ,GAAI,sGAYf,aAAa,gCA0Cf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import ListItemBody from "./list-item-body/ListItemBody.js";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
//#region src/components/list-item/ListItem.tsx
|
|
4
|
-
var ListItem = ({ className, disabled = false, href, id, leading, onClick, subtitle, title, trailing, unread = false, unreadLabel }) => {
|
|
5
|
-
const actionClassName = ["chayns-list-item__action", Boolean(href) || Boolean(onClick) ? "chayns-list-item__action--interactive" : null].filter(Boolean).join(" ");
|
|
6
|
-
const body = /* @__PURE__ */ jsx(ListItemBody, {
|
|
7
|
-
leading,
|
|
8
|
-
subtitle,
|
|
9
|
-
title,
|
|
10
|
-
unread,
|
|
11
|
-
unreadLabel
|
|
12
|
-
});
|
|
13
|
-
let action;
|
|
14
|
-
if (href) action = /* @__PURE__ */ jsx("a", {
|
|
15
|
-
className: actionClassName,
|
|
16
|
-
href,
|
|
17
|
-
children: body
|
|
18
|
-
});
|
|
19
|
-
else if (onClick) action = /* @__PURE__ */ jsx("button", {
|
|
20
|
-
className: actionClassName,
|
|
21
|
-
disabled,
|
|
22
|
-
onClick,
|
|
23
|
-
type: "button",
|
|
24
|
-
children: body
|
|
25
|
-
});
|
|
26
|
-
else action = /* @__PURE__ */ jsx("div", {
|
|
27
|
-
className: actionClassName,
|
|
28
|
-
children: body
|
|
29
|
-
});
|
|
30
|
-
return /* @__PURE__ */ jsxs("li", {
|
|
31
|
-
className: ["chayns-list-item", className].filter(Boolean).join(" "),
|
|
32
|
-
id,
|
|
33
|
-
children: [action, trailing ? /* @__PURE__ */ jsx("span", {
|
|
34
|
-
className: "chayns-list-item__trailing",
|
|
35
|
-
children: trailing
|
|
36
|
-
}) : null]
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
//#endregion
|
|
40
|
-
export { ListItem as default };
|
|
41
|
-
|
|
42
|
-
//# sourceMappingURL=ListItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.js","names":[],"sources":["../../../src/components/list-item/ListItem.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { ListItemProps } from '../list/List.types.js';\nimport ListItemBody from './list-item-body/ListItemBody.js';\n\nconst ListItem = ({\n className,\n disabled = false,\n href,\n id,\n leading,\n onClick,\n subtitle,\n title,\n trailing,\n unread = false,\n unreadLabel,\n}: ListItemProps) => {\n const interactive = Boolean(href) || Boolean(onClick);\n const actionClassName = [\n 'chayns-list-item__action',\n interactive ? 'chayns-list-item__action--interactive' : null,\n ]\n .filter(Boolean)\n .join(' ');\n\n const body = (\n <ListItemBody\n leading={leading}\n subtitle={subtitle}\n title={title}\n unread={unread}\n unreadLabel={unreadLabel}\n />\n );\n\n let action: ReactNode;\n if (href) {\n action = (\n <a className={actionClassName} href={href}>\n {body}\n </a>\n );\n } else if (onClick) {\n action = (\n <button className={actionClassName} disabled={disabled} onClick={onClick} type=\"button\">\n {body}\n </button>\n );\n } else {\n action = <div className={actionClassName}>{body}</div>;\n }\n\n return (\n <li className={['chayns-list-item', className].filter(Boolean).join(' ')} id={id}>\n {action}\n {trailing ? <span className=\"chayns-list-item__trailing\">{trailing}</span> : null}\n </li>\n );\n};\n\nexport default ListItem;\n"],"mappings":";;;AAKA,IAAM,YAAY,EAChB,WACA,WAAW,OACX,MACA,IACA,SACA,SACA,UACA,OACA,UACA,SAAS,OACT,kBACmB;CAEnB,MAAM,kBAAkB,CACtB,4BAFkB,QAAQ,IAAI,KAAK,QAAQ,OAAO,IAGpC,0CAA0C,IAC1D,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;CAEX,MAAM,OACJ,oBAAC,cAAD;EACW;EACC;EACH;EACC;EACK;CACd,CAAA;CAGH,IAAI;CACJ,IAAI,MACF,SACE,oBAAC,KAAD;EAAG,WAAW;EAAuB;EAClC,UAAA;CACA,CAAA;MAEA,IAAI,SACT,SACE,oBAAC,UAAD;EAAQ,WAAW;EAA2B;EAAmB;EAAS,MAAK;EAC5E,UAAA;CACK,CAAA;MAGV,SAAS,oBAAC,OAAD;EAAK,WAAW;EAAkB,UAAA;CAAU,CAAA;CAGvD,OACE,qBAAC,MAAD;EAAI,WAAW,CAAC,oBAAoB,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAAO;EAA9E,UAAA,CACG,QACA,WAAW,oBAAC,QAAD;GAAM,WAAU;GAA8B,UAAA;EAAe,CAAA,IAAI,IAC3E;;AAER"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
declare const ListItemBody: ({ leading, subtitle, title, unread, unreadLabel, }: {
|
|
3
|
-
leading?: ReactNode;
|
|
4
|
-
subtitle?: ReactNode;
|
|
5
|
-
title: ReactNode;
|
|
6
|
-
unread?: boolean;
|
|
7
|
-
unreadLabel?: string | undefined;
|
|
8
|
-
}) => import("react").JSX.Element;
|
|
9
|
-
export default ListItemBody;
|
|
10
|
-
//# sourceMappingURL=ListItemBody.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemBody.d.ts","sourceRoot":"","sources":["../../../../src/components/list-item/list-item-body/ListItemBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,QAAA,MAAM,YAAY,GAAI,oDAMnB;IACD,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,gCAaA,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
//#region src/components/list-item/list-item-body/ListItemBody.tsx
|
|
3
|
-
var ListItemBody = ({ leading, subtitle, title, unread, unreadLabel }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4
|
-
unread ? /* @__PURE__ */ jsx("span", {
|
|
5
|
-
className: "chayns-list-item__unread",
|
|
6
|
-
"aria-hidden": unreadLabel ? void 0 : true,
|
|
7
|
-
children: unreadLabel ? /* @__PURE__ */ jsx("span", {
|
|
8
|
-
className: "chayns-visually-hidden",
|
|
9
|
-
children: unreadLabel
|
|
10
|
-
}) : null
|
|
11
|
-
}) : null,
|
|
12
|
-
leading ? /* @__PURE__ */ jsx("span", {
|
|
13
|
-
className: "chayns-list-item__leading",
|
|
14
|
-
children: leading
|
|
15
|
-
}) : null,
|
|
16
|
-
/* @__PURE__ */ jsxs("span", {
|
|
17
|
-
className: "chayns-list-item__body",
|
|
18
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
19
|
-
className: "chayns-list-item__title",
|
|
20
|
-
children: title
|
|
21
|
-
}), subtitle ? /* @__PURE__ */ jsx("span", {
|
|
22
|
-
className: "chayns-list-item__subtitle",
|
|
23
|
-
children: subtitle
|
|
24
|
-
}) : null]
|
|
25
|
-
})
|
|
26
|
-
] });
|
|
27
|
-
//#endregion
|
|
28
|
-
export { ListItemBody as default };
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=ListItemBody.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemBody.js","names":[],"sources":["../../../../src/components/list-item/list-item-body/ListItemBody.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nconst ListItemBody = ({\n leading,\n subtitle,\n title,\n unread,\n unreadLabel,\n}: {\n leading?: ReactNode;\n subtitle?: ReactNode;\n title: ReactNode;\n unread?: boolean;\n unreadLabel?: string | undefined;\n}) => (\n <>\n {unread ? (\n <span className=\"chayns-list-item__unread\" aria-hidden={unreadLabel ? undefined : true}>\n {unreadLabel ? <span className=\"chayns-visually-hidden\">{unreadLabel}</span> : null}\n </span>\n ) : null}\n {leading ? <span className=\"chayns-list-item__leading\">{leading}</span> : null}\n <span className=\"chayns-list-item__body\">\n <span className=\"chayns-list-item__title\">{title}</span>\n {subtitle ? <span className=\"chayns-list-item__subtitle\">{subtitle}</span> : null}\n </span>\n </>\n);\n\nexport default ListItemBody;\n"],"mappings":";;AAEA,IAAM,gBAAgB,EACpB,SACA,UACA,OACA,QACA,kBAQA,qBAAA,UAAA,EAAA,UAAA;CACG,SACC,oBAAC,QAAD;EAAM,WAAU;EAA2B,eAAa,cAAc,KAAA,IAAY;EAC/E,UAAA,cAAc,oBAAC,QAAD;GAAM,WAAU;GAA0B,UAAA;EAAkB,CAAA,IAAI;CAC3E,CAAA,IACJ;CACH,UAAU,oBAAC,QAAD;EAAM,WAAU;EAA6B,UAAA;CAAc,CAAA,IAAI;CAC1E,qBAAC,QAAD;EAAM,WAAU;EAAhB,UAAA,CACE,oBAAC,QAAD;GAAM,WAAU;GAA2B,UAAA;EAAY,CAAA,GACtD,WAAW,oBAAC,QAAD;GAAM,WAAU;GAA8B,UAAA;EAAe,CAAA,IAAI,IACzE;;AACN,EAAA,CAAA"}
|