@clicoh/orion-library 1.2.0-beta.13 → 1.2.0-beta.15
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/assets/css/expresivo.css +75 -2
- package/dist/components/01-atoms/Select/Select.d.ts +3 -1
- package/dist/components/01-atoms/Select/Select.d.ts.map +1 -1
- package/dist/components/01-atoms/Select/Select.jsx +8 -2
- package/dist/components/01-atoms/Select/Select.jsx.map +1 -1
- package/dist/components/02-molecules/Card/Card.d.ts +2 -2
- package/dist/components/02-molecules/Card/Card.d.ts.map +1 -1
- package/dist/components/02-molecules/Card/Card.jsx +6 -2
- package/dist/components/02-molecules/Card/Card.jsx.map +1 -1
- package/dist/components/02-molecules/DatePicker/DatePicker.d.ts +5 -2
- package/dist/components/02-molecules/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/02-molecules/DatePicker/DatePicker.jsx +3 -2
- package/dist/components/02-molecules/DatePicker/DatePicker.jsx.map +1 -1
- package/dist/components/02-molecules/MultiAutocomplete/MultiAutocomplete.d.ts +80 -0
- package/dist/components/02-molecules/MultiAutocomplete/MultiAutocomplete.d.ts.map +1 -0
- package/dist/components/02-molecules/MultiAutocomplete/MultiAutocomplete.jsx +261 -0
- package/dist/components/02-molecules/MultiAutocomplete/MultiAutocomplete.jsx.map +1 -0
- package/dist/components/02-molecules/MultiAutocomplete/index.d.ts +2 -0
- package/dist/components/02-molecules/MultiAutocomplete/index.d.ts.map +1 -0
- package/dist/components/02-molecules/MultiAutocomplete/index.js +2 -0
- package/dist/components/02-molecules/MultiAutocomplete/index.js.map +1 -0
- package/dist/components/02-molecules/index.d.ts +1 -0
- package/dist/components/02-molecules/index.d.ts.map +1 -1
- package/dist/components/02-molecules/index.js +1 -0
- package/dist/components/02-molecules/index.js.map +1 -1
- package/dist/components/04-templates/DashboardTemplate/DashboardTemplate.d.ts +13 -1
- package/dist/components/04-templates/DashboardTemplate/DashboardTemplate.d.ts.map +1 -1
- package/dist/components/04-templates/DashboardTemplate/DashboardTemplate.jsx +25 -14
- package/dist/components/04-templates/DashboardTemplate/DashboardTemplate.jsx.map +1 -1
- package/expresivo/ExpMascot/ExpMascot.d.ts +7 -3
- package/expresivo/ExpMascot/ExpMascot.d.ts.map +1 -1
- package/expresivo/ExpMascot/ExpMascot.jsx +9 -4
- package/expresivo/ExpMascot/ExpMascot.jsx.map +1 -1
- package/expresivo/ExpPageHero/ExpPageHero.d.ts +82 -0
- package/expresivo/ExpPageHero/ExpPageHero.d.ts.map +1 -0
- package/expresivo/ExpPageHero/ExpPageHero.jsx +113 -0
- package/expresivo/ExpPageHero/ExpPageHero.jsx.map +1 -0
- package/expresivo/ExpPageHero/index.d.ts +3 -0
- package/expresivo/ExpPageHero/index.d.ts.map +1 -0
- package/expresivo/ExpPageHero/index.js +2 -0
- package/expresivo/ExpPageHero/index.js.map +1 -0
- package/expresivo/ExpStepBadge/ExpStepBadge.d.ts +25 -0
- package/expresivo/ExpStepBadge/ExpStepBadge.d.ts.map +1 -0
- package/expresivo/ExpStepBadge/ExpStepBadge.jsx +30 -0
- package/expresivo/ExpStepBadge/ExpStepBadge.jsx.map +1 -0
- package/expresivo/ExpStepBadge/index.d.ts +2 -0
- package/expresivo/ExpStepBadge/index.d.ts.map +1 -0
- package/expresivo/ExpStepBadge/index.js +2 -0
- package/expresivo/ExpStepBadge/index.js.map +1 -0
- package/expresivo/index.d.ts +2 -0
- package/expresivo/index.d.ts.map +1 -1
- package/expresivo/index.js +2 -0
- package/expresivo/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useEffect, useId, useMemo, useRef, useState, } from 'react';
|
|
4
|
+
import { FiX } from 'react-icons/fi';
|
|
5
|
+
import { IoIosSearch } from 'react-icons/io';
|
|
6
|
+
import { Each, Show } from '../../00-base';
|
|
7
|
+
import { RenderErrorOrHelperText } from '../../01-atoms/Input/utils/RenderErrorOrHelperText';
|
|
8
|
+
const normalize = (text) => text
|
|
9
|
+
.normalize('NFD')
|
|
10
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
11
|
+
.toLowerCase();
|
|
12
|
+
const groupOptions = (options, order = []) => {
|
|
13
|
+
const names = [
|
|
14
|
+
...new Set([...order, ...options.map((option) => option.group ?? '')]),
|
|
15
|
+
];
|
|
16
|
+
let start = 0;
|
|
17
|
+
return names.flatMap((name) => {
|
|
18
|
+
const inGroup = options.filter((option) => (option.group ?? '') === name);
|
|
19
|
+
if (!inGroup.length)
|
|
20
|
+
return [];
|
|
21
|
+
const group = { name, start, options: inGroup };
|
|
22
|
+
start += inGroup.length;
|
|
23
|
+
return [group];
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* MultiAutocomplete picks several options by typing: the chosen ones sit as
|
|
28
|
+
* chips inside the field and the list, grouped under headings, filters as the
|
|
29
|
+
* user writes. All visible labels are provided by the consumer.
|
|
30
|
+
*
|
|
31
|
+
* Arrow keys move through the list, Enter adds the highlighted option,
|
|
32
|
+
* Backspace on an empty query removes the last chip and Escape closes the list.
|
|
33
|
+
*
|
|
34
|
+
* @component
|
|
35
|
+
* @example
|
|
36
|
+
* <MultiAutocomplete
|
|
37
|
+
* label="Repositories"
|
|
38
|
+
* options={[
|
|
39
|
+
* { value: 'api', label: 'api', meta: 'GitHub', group: 'Indexed' },
|
|
40
|
+
* { value: 'web', label: 'web', meta: 'GitHub', group: 'Indexed' },
|
|
41
|
+
* ]}
|
|
42
|
+
* value={repos}
|
|
43
|
+
* onChange={setRepos}
|
|
44
|
+
* noOptionsText="No repository matches"
|
|
45
|
+
* removeLabel="Remove"
|
|
46
|
+
* countText={(matches) => `${matches} repositories`}
|
|
47
|
+
* limit={{ max: 3, text: 'Up to 3 repositories' }}
|
|
48
|
+
* />
|
|
49
|
+
*
|
|
50
|
+
* @param {MultiAutocompleteProps} props - The properties of the MultiAutocomplete component.
|
|
51
|
+
* @param {string} props.label - The label of the field, floating like `Input` unless `hideLabel`.
|
|
52
|
+
* @param {MultiAutocompleteOption[]} props.options - Options with `value`, `label`, and optional `meta` and `group`.
|
|
53
|
+
* @param {Array<string | number>} props.value - The values chosen, in order.
|
|
54
|
+
* @param {Function} props.onChange - Receives the new list of values.
|
|
55
|
+
* @param {string} props.noOptionsText - Shown when the query matches nothing.
|
|
56
|
+
* @param {string} props.removeLabel - Accessible name of each chip's remove button, followed by the chip label.
|
|
57
|
+
* @param {string[]} [props.groups] - Order of the group headings.
|
|
58
|
+
* @param {string | Function} [props.countText] - Line under the list; a function receives the number of matches and the query.
|
|
59
|
+
* @param {MultiAutocompleteLimit} [props.limit] - Maximum number of values and the text shown once it is reached.
|
|
60
|
+
* @param {boolean} [props.hideLabel] - Keeps the label for assistive technology only. Use it when a heading outside the field already names it.
|
|
61
|
+
* @param {string} [props.placeholder] - Placeholder while nothing is chosen. With the floating label it only shows while focused.
|
|
62
|
+
* @param {string} [props.helperText] - Helper text under the field.
|
|
63
|
+
* @param {string} [props.error] - Error message under the field.
|
|
64
|
+
* @param {boolean} [props.disabled] - Disables typing and removing chips.
|
|
65
|
+
* @param {boolean} [props.isMutedWhenEmpty] - Renders the border and label in gray while nothing is chosen.
|
|
66
|
+
* @param {string} [props.id] - Id of the text input, for a `label` or for focusing it from outside.
|
|
67
|
+
*
|
|
68
|
+
* @returns {ReactNode} The rendered MultiAutocomplete component.
|
|
69
|
+
*/
|
|
70
|
+
export function MultiAutocomplete({ label, options, value, onChange, noOptionsText, removeLabel, groups, countText, limit, hideLabel = false, placeholder, helperText, error, disabled = false, isMutedWhenEmpty, ...restProps }) {
|
|
71
|
+
const { id: inputIdProp, className, ...rootProps } = restProps;
|
|
72
|
+
const generatedId = useId();
|
|
73
|
+
const inputId = inputIdProp ?? generatedId;
|
|
74
|
+
const listboxId = `${inputId}-listbox`;
|
|
75
|
+
const descriptionId = error || helperText ? `${inputId}-description` : undefined;
|
|
76
|
+
const inputRef = useRef(null);
|
|
77
|
+
const [query, setQuery] = useState('');
|
|
78
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
79
|
+
const [activeIndex, setActiveIndex] = useState(-1);
|
|
80
|
+
const isFull = limit !== undefined && value.length >= limit.max;
|
|
81
|
+
const needle = normalize(query.trim());
|
|
82
|
+
const optionGroups = useMemo(() => {
|
|
83
|
+
const chosen = new Set(value);
|
|
84
|
+
const matches = options.filter((option) => !chosen.has(option.value) &&
|
|
85
|
+
(!needle ||
|
|
86
|
+
normalize(option.label).includes(needle) ||
|
|
87
|
+
normalize(option.meta ?? '').includes(needle)));
|
|
88
|
+
return groupOptions(matches, groups);
|
|
89
|
+
}, [options, value, needle, groups]);
|
|
90
|
+
const flat = optionGroups.flatMap((group) => group.options);
|
|
91
|
+
const active = activeIndex < flat.length && !isFull ? activeIndex : -1;
|
|
92
|
+
const optionId = (index) => `${listboxId}-${index}`;
|
|
93
|
+
const showList = isOpen && !disabled;
|
|
94
|
+
const isMuted = Boolean(isMutedWhenEmpty) && !value.length;
|
|
95
|
+
useEffect(() => {
|
|
96
|
+
if (!showList || active < 0)
|
|
97
|
+
return;
|
|
98
|
+
document.getElementById(`${listboxId}-${active}`)?.scrollIntoView({
|
|
99
|
+
block: 'nearest',
|
|
100
|
+
});
|
|
101
|
+
}, [showList, active, listboxId]);
|
|
102
|
+
const labelOf = (item) => options.find((option) => option.value === item)?.label ?? String(item);
|
|
103
|
+
const add = (option) => {
|
|
104
|
+
if (isFull)
|
|
105
|
+
return;
|
|
106
|
+
onChange([...value, option.value]);
|
|
107
|
+
setQuery('');
|
|
108
|
+
setActiveIndex(-1);
|
|
109
|
+
};
|
|
110
|
+
const remove = (item) => {
|
|
111
|
+
onChange(value.filter((current) => current !== item));
|
|
112
|
+
inputRef.current?.focus();
|
|
113
|
+
};
|
|
114
|
+
const handleKeyDown = (event) => {
|
|
115
|
+
if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
|
|
116
|
+
event.preventDefault();
|
|
117
|
+
setIsOpen(true);
|
|
118
|
+
if (!flat.length || isFull)
|
|
119
|
+
return;
|
|
120
|
+
setActiveIndex((current) => {
|
|
121
|
+
if (event.key === 'ArrowDown') {
|
|
122
|
+
return current >= flat.length - 1 ? 0 : current + 1;
|
|
123
|
+
}
|
|
124
|
+
return current <= 0 ? flat.length - 1 : current - 1;
|
|
125
|
+
});
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
if (event.key === 'Enter') {
|
|
129
|
+
const option = flat[active];
|
|
130
|
+
if (showList && option) {
|
|
131
|
+
event.preventDefault();
|
|
132
|
+
add(option);
|
|
133
|
+
}
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
if (event.key === 'Backspace' && !query && value.length) {
|
|
137
|
+
onChange(value.slice(0, -1));
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
if (event.key === 'Escape' && isOpen) {
|
|
141
|
+
event.preventDefault();
|
|
142
|
+
setIsOpen(false);
|
|
143
|
+
setActiveIndex(-1);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
const handleBlur = (event) => {
|
|
147
|
+
if (event.currentTarget.contains(event.relatedTarget))
|
|
148
|
+
return;
|
|
149
|
+
setIsOpen(false);
|
|
150
|
+
setActiveIndex(-1);
|
|
151
|
+
};
|
|
152
|
+
const outlineColor = disabled
|
|
153
|
+
? 'border-gray-3 dark:border-gray-2'
|
|
154
|
+
: error
|
|
155
|
+
? 'border-error dark:border-error-dark'
|
|
156
|
+
: isMuted
|
|
157
|
+
? 'border-gray-3 dark:border-gray-2 group-focus-within/field:border-black dark:group-focus-within/field:border-white'
|
|
158
|
+
: 'border-black dark:border-white';
|
|
159
|
+
const labelColor = disabled
|
|
160
|
+
? 'text-gray-3 dark:text-gray-2'
|
|
161
|
+
: error
|
|
162
|
+
? 'text-error dark:text-error-dark'
|
|
163
|
+
: isMuted
|
|
164
|
+
? 'text-gray-2 dark:text-gray-2 group-focus-within/field:text-black dark:group-focus-within/field:text-white'
|
|
165
|
+
: 'text-black dark:text-white';
|
|
166
|
+
const isFloating = value.length > 0 || query !== '';
|
|
167
|
+
return (<div {...rootProps} data-orion-part="field" onBlur={handleBlur} className={clsx('relative w-full max-w-full', className)}>
|
|
168
|
+
<div data-orion-part="field-box" data-grows="" onClick={() => inputRef.current?.focus()} className={clsx('group/field relative flex min-h-9 w-full flex-wrap items-center gap-1.5 rounded-[1.125rem] py-1 pr-10', value.length ? 'pl-1.5' : 'pl-5', disabled ? 'cursor-not-allowed' : 'cursor-text')}>
|
|
169
|
+
<Each of={[...value]} render={(item) => (<span key={String(item)} className={clsx('bg-lavender-2 dark:bg-lavender-dark-1 inline-flex h-7 max-w-full items-center gap-1 rounded-full pr-1 pl-3 text-xs font-medium', disabled
|
|
170
|
+
? 'text-gray-3 dark:text-gray-2'
|
|
171
|
+
: 'text-black dark:text-white')}>
|
|
172
|
+
<span className="truncate">{labelOf(item)}</span>
|
|
173
|
+
<button type="button" aria-label={`${removeLabel} ${labelOf(item)}`} disabled={disabled} onClick={(event) => {
|
|
174
|
+
event.stopPropagation();
|
|
175
|
+
remove(item);
|
|
176
|
+
}} className="text-gray-1 dark:text-gray-2 flex size-5 shrink-0 items-center justify-center rounded-full transition-colors not-disabled:hover:bg-black not-disabled:hover:text-white disabled:cursor-not-allowed dark:not-disabled:hover:bg-white dark:not-disabled:hover:text-black">
|
|
177
|
+
<FiX size={12} aria-hidden="true"/>
|
|
178
|
+
</button>
|
|
179
|
+
</span>)}/>
|
|
180
|
+
<input ref={inputRef} id={inputId} data-orion-part="field-control" type="text" role="combobox" autoComplete="off" value={query} disabled={disabled} placeholder={value.length ? '' : placeholder} aria-autocomplete="list" aria-expanded={showList} aria-controls={listboxId} aria-activedescendant={showList && active >= 0 ? optionId(active) : undefined} aria-invalid={Boolean(error)} aria-describedby={descriptionId} onChange={(event) => {
|
|
181
|
+
setQuery(event.target.value);
|
|
182
|
+
setIsOpen(true);
|
|
183
|
+
setActiveIndex(event.target.value.trim() ? 0 : -1);
|
|
184
|
+
}} onFocus={() => setIsOpen(true)} onKeyDown={handleKeyDown} className={clsx('h-7 min-w-20 flex-1 basis-28 bg-transparent text-sm text-black outline-0 disabled:cursor-not-allowed dark:text-white', 'disabled:text-gray-3 dark:disabled:text-gray-2', hideLabel
|
|
185
|
+
? 'placeholder:text-gray-2'
|
|
186
|
+
: 'focus:placeholder:text-gray-2 placeholder:text-transparent')}/>
|
|
187
|
+
<Show>
|
|
188
|
+
<Show.When isTrue={hideLabel}>
|
|
189
|
+
<label htmlFor={inputId} className="sr-only">
|
|
190
|
+
{label}
|
|
191
|
+
</label>
|
|
192
|
+
</Show.When>
|
|
193
|
+
<Show.Else>
|
|
194
|
+
<label htmlFor={inputId} data-orion-part="field-label" className={clsx('pointer-events-none absolute left-[1.0625rem] truncate px-1 leading-tight transition-all select-none', isFloating
|
|
195
|
+
? '-top-2 text-xs'
|
|
196
|
+
: 'top-2.5 text-sm group-focus-within/field:-top-2 group-focus-within/field:text-xs', labelColor)}>
|
|
197
|
+
{label}
|
|
198
|
+
</label>
|
|
199
|
+
</Show.Else>
|
|
200
|
+
</Show>
|
|
201
|
+
<fieldset aria-hidden="true" data-orion-part="field-outline" className={clsx('pointer-events-none absolute left-0 w-full rounded-[1.125rem] border px-4', hideLabel ? 'top-0 h-full' : '-top-2 h-[calc(100%+.5rem)]', outlineColor)}>
|
|
202
|
+
{!hideLabel && (<legend className={clsx('invisible text-left text-xs text-nowrap transition-all', isFloating
|
|
203
|
+
? 'max-w-full px-1'
|
|
204
|
+
: 'max-w-0 px-0 group-focus-within/field:max-w-full group-focus-within/field:px-1')}>
|
|
205
|
+
{label}
|
|
206
|
+
</legend>)}
|
|
207
|
+
</fieldset>
|
|
208
|
+
<span aria-hidden="true" data-orion-part="field-icon" className={clsx('absolute top-1/2 right-4 flex -translate-y-1/2 items-center', disabled
|
|
209
|
+
? 'text-gray-3 dark:text-gray-2'
|
|
210
|
+
: 'text-gray-1 dark:text-gray-2')}>
|
|
211
|
+
<IoIosSearch size={16}/>
|
|
212
|
+
</span>
|
|
213
|
+
</div>
|
|
214
|
+
{showList && (<div data-orion-part="listbox-panel" className="border-gray-5 dark:border-gray-1 dark:bg-black-1 absolute left-0 z-40 mt-2 w-full overflow-hidden rounded-2xl border bg-white shadow-lg">
|
|
215
|
+
<ul id={listboxId} role="listbox" aria-label={label} aria-multiselectable="true" className="max-h-72 overflow-y-auto p-1.5">
|
|
216
|
+
<Show>
|
|
217
|
+
<Show.When isTrue={isFull}>
|
|
218
|
+
<li role="presentation" className="text-gray-1 dark:text-gray-2 px-2.5 py-3 text-sm">
|
|
219
|
+
{limit?.text}
|
|
220
|
+
</li>
|
|
221
|
+
</Show.When>
|
|
222
|
+
<Show.When isTrue={flat.length > 0}>
|
|
223
|
+
<Each of={optionGroups} render={(group) => (<li key={group.name || '-'} role="presentation">
|
|
224
|
+
{!!group.name && (<p aria-hidden="true" className="text-gray-1 dark:text-gray-2 px-2.5 pt-2 pb-1 text-[0.6875rem] leading-4 font-semibold tracking-wide uppercase">
|
|
225
|
+
{group.name}
|
|
226
|
+
</p>)}
|
|
227
|
+
<ul role="group" aria-label={group.name || undefined}>
|
|
228
|
+
<Each of={group.options} render={(option, index) => {
|
|
229
|
+
const flatIndex = group.start + index;
|
|
230
|
+
const isActive = flatIndex === active;
|
|
231
|
+
return (<li key={String(option.value)} id={optionId(flatIndex)} role="option" aria-selected={false} onMouseDown={(event) => event.preventDefault()} onMouseEnter={() => setActiveIndex(flatIndex)} onClick={() => add(option)} className={clsx('flex cursor-pointer items-center justify-between gap-3 rounded-[0.625rem] px-2.5 py-2 text-sm', isActive
|
|
232
|
+
? 'bg-lavender-3 text-lavender dark:bg-lavender-dark-1 dark:text-lavender-dark font-semibold'
|
|
233
|
+
: 'text-black dark:text-white')}>
|
|
234
|
+
<span className="min-w-0 truncate">
|
|
235
|
+
{option.label}
|
|
236
|
+
</span>
|
|
237
|
+
{!!option.meta && (<span className="text-gray-1 dark:text-gray-2 shrink-0 text-xs font-normal whitespace-nowrap">
|
|
238
|
+
{option.meta}
|
|
239
|
+
</span>)}
|
|
240
|
+
</li>);
|
|
241
|
+
}}/>
|
|
242
|
+
</ul>
|
|
243
|
+
</li>)}/>
|
|
244
|
+
</Show.When>
|
|
245
|
+
<Show.Else>
|
|
246
|
+
<li role="presentation" className="text-gray-1 dark:text-gray-2 px-2.5 py-3 text-sm">
|
|
247
|
+
{noOptionsText}
|
|
248
|
+
</li>
|
|
249
|
+
</Show.Else>
|
|
250
|
+
</Show>
|
|
251
|
+
</ul>
|
|
252
|
+
{countText !== undefined && !isFull && (<p className="border-gray-5 dark:border-gray-1 text-gray-1 dark:text-gray-2 border-t px-4 py-2 text-xs">
|
|
253
|
+
{typeof countText === 'function'
|
|
254
|
+
? countText(flat.length, query.trim())
|
|
255
|
+
: countText}
|
|
256
|
+
</p>)}
|
|
257
|
+
</div>)}
|
|
258
|
+
<RenderErrorOrHelperText id={descriptionId} disabled={disabled} helperText={helperText} error={error} className="pl-6"/>
|
|
259
|
+
</div>);
|
|
260
|
+
}
|
|
261
|
+
//# sourceMappingURL=MultiAutocomplete.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiAutocomplete.jsx","sourceRoot":"","sources":["../../../../src/components/02-molecules/MultiAutocomplete/MultiAutocomplete.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAKL,SAAS,EACT,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,oDAAoD,CAAC;AA2C7F,MAAM,SAA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CAAC,SAAS,CAAC,6EAA6E,CAC3F;oCAAA,CAAC,MAAM,CAAC,IAAI,CACd;kCAAA,EAAE,IAAI,CAAC,CACR,CACH;8BAAA,EAAE,EAAE,CAAC,CACN,CAAC;gBACJ,CAAC,CAAC,EAEN;sBAAA,EAAE,EAAE,CACN;oBAAA,EAAE,EAAE,CAAC,CACN,CAAC,EAEN;cAAA,EAAE,IAAI,CAAC,IAAI,CACX;cAAA,CAAC,IAAI,CAAC,IAAI,CACR;gBAAA,CAAC,EAAE,CACD,IAAI,CAAC,cAAc,CACnB,SAAS,CAAC,kDAAkD,CAE5D;kBAAA,CAAC,aAAa,CAChB;gBAAA,EAAE,EAAE,CACN;cAAA,EAAE,IAAI,CAAC,IAAI,CACb;YAAA,EAAE,IAAI,CACR;UAAA,EAAE,EAAE,CACJ;UAAA,CAAC,SAAS,KAAK,SAAS,IAAI,CAAC,MAAM,IAAI,CACrC,CAAC,CAAC,CAAC,SAAS,CAAC,0FAA0F,CACrG;cAAA,CAAC,OAAO,SAAS,KAAK,UAAU;oBAC9B,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;oBACtC,CAAC,CAAC,SAAS,CACf;YAAA,EAAE,CAAC,CAAC,CACL,CACH;QAAA,EAAE,GAAG,CAAC,CACP,CACD;MAAA,CAAC,uBAAuB,CACtB,EAAE,CAAC,CAAC,aAAa,CAAC,CAClB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,SAAS,CAAC,MAAM,EAEpB;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/02-molecules/MultiAutocomplete/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/02-molecules/MultiAutocomplete/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/02-molecules/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/02-molecules/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/02-molecules/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/02-molecules/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC"}
|
|
@@ -9,6 +9,7 @@ type DashboardTemplateProps = {
|
|
|
9
9
|
readonly titleAdornment?: ReactNode;
|
|
10
10
|
readonly titleDescription?: ReactNode;
|
|
11
11
|
readonly titleChildren?: ReactNode;
|
|
12
|
+
readonly heading?: ReactNode;
|
|
12
13
|
readonly children: ReactNode;
|
|
13
14
|
readonly breadcrumbLoadingLabel?: string;
|
|
14
15
|
readonly headingLoadingLabel?: string;
|
|
@@ -39,6 +40,16 @@ type DashboardTemplateProps = {
|
|
|
39
40
|
* <OrderDetail />
|
|
40
41
|
* </DashboardTemplate>
|
|
41
42
|
*
|
|
43
|
+
* @example
|
|
44
|
+
* // A page header with its own layout under the breadcrumb
|
|
45
|
+
* <DashboardTemplate
|
|
46
|
+
* headerProps={headerProps}
|
|
47
|
+
* pageTitles={{ '/orders': 'Orders' }}
|
|
48
|
+
* heading={<OrdersHeader />}
|
|
49
|
+
* >
|
|
50
|
+
* <OrdersTable />
|
|
51
|
+
* </DashboardTemplate>
|
|
52
|
+
*
|
|
42
53
|
* @param {Object} props - The properties of the DashboardTemplate component.
|
|
43
54
|
* @param {HeaderProps} props.headerProps - The properties for the Header component.
|
|
44
55
|
* @param {Record<string, string>} props.pageTitles - An object mapping pathnames to their corresponding page titles, used by the breadcrumb and the heading.
|
|
@@ -47,10 +58,11 @@ type DashboardTemplateProps = {
|
|
|
47
58
|
* @param {ReactNode} [props.titleAdornment] - Content next to the title, such as a `Badge`.
|
|
48
59
|
* @param {ReactNode} [props.titleDescription] - Content under the title, inside the title band.
|
|
49
60
|
* @param {ReactNode} [props.titleChildren] - Content at the right of the title; it moves under the title on small screens.
|
|
61
|
+
* @param {ReactNode} [props.heading] - Replaces the title row under the breadcrumb. With it, `headingTitles`, `headingLevel`, `titleAdornment`, `titleDescription` and `titleChildren` are ignored; the breadcrumb still uses `pageTitles`.
|
|
50
62
|
* @param {ReactNode} props.children - The main content to be rendered within the dashboard.
|
|
51
63
|
*
|
|
52
64
|
* @returns {ReactNode} The rendered DashboardTemplate component.
|
|
53
65
|
*/
|
|
54
|
-
export declare function DashboardTemplate({ headerProps, pageTitles, headingTitles, headingLevel, titleAdornment, titleDescription, titleChildren, children, breadcrumbLoadingLabel, headingLoadingLabel, }: DashboardTemplateProps): ReactNode;
|
|
66
|
+
export declare function DashboardTemplate({ headerProps, pageTitles, headingTitles, headingLevel, titleAdornment, titleDescription, titleChildren, heading, children, breadcrumbLoadingLabel, headingLoadingLabel, }: DashboardTemplateProps): ReactNode;
|
|
55
67
|
export {};
|
|
56
68
|
//# sourceMappingURL=DashboardTemplate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardTemplate.d.ts","sourceRoot":"","sources":["../../../../src/components/04-templates/DashboardTemplate/DashboardTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAU,WAAW,EAAE,MAAM,kCAAkC,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AAC,EAAE,SAAS,CAAC;IACpC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,CAAC;IACtC,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,CAAC;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IACzC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CACvC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,UAAU,EACV,aAAa,EACb,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,OAAO,EACP,QAAQ,EACR,sBAAsB,EACtB,mBAAmB,GACpB,EAAE,sBAAsB,GAAG,SAAS,CAmDpC"}
|
|
@@ -31,6 +31,16 @@ import { HeadingWithTitleSkeleton } from './HeadingWithTitleSkeleton';
|
|
|
31
31
|
* <OrderDetail />
|
|
32
32
|
* </DashboardTemplate>
|
|
33
33
|
*
|
|
34
|
+
* @example
|
|
35
|
+
* // A page header with its own layout under the breadcrumb
|
|
36
|
+
* <DashboardTemplate
|
|
37
|
+
* headerProps={headerProps}
|
|
38
|
+
* pageTitles={{ '/orders': 'Orders' }}
|
|
39
|
+
* heading={<OrdersHeader />}
|
|
40
|
+
* >
|
|
41
|
+
* <OrdersTable />
|
|
42
|
+
* </DashboardTemplate>
|
|
43
|
+
*
|
|
34
44
|
* @param {Object} props - The properties of the DashboardTemplate component.
|
|
35
45
|
* @param {HeaderProps} props.headerProps - The properties for the Header component.
|
|
36
46
|
* @param {Record<string, string>} props.pageTitles - An object mapping pathnames to their corresponding page titles, used by the breadcrumb and the heading.
|
|
@@ -39,11 +49,12 @@ import { HeadingWithTitleSkeleton } from './HeadingWithTitleSkeleton';
|
|
|
39
49
|
* @param {ReactNode} [props.titleAdornment] - Content next to the title, such as a `Badge`.
|
|
40
50
|
* @param {ReactNode} [props.titleDescription] - Content under the title, inside the title band.
|
|
41
51
|
* @param {ReactNode} [props.titleChildren] - Content at the right of the title; it moves under the title on small screens.
|
|
52
|
+
* @param {ReactNode} [props.heading] - Replaces the title row under the breadcrumb. With it, `headingTitles`, `headingLevel`, `titleAdornment`, `titleDescription` and `titleChildren` are ignored; the breadcrumb still uses `pageTitles`.
|
|
42
53
|
* @param {ReactNode} props.children - The main content to be rendered within the dashboard.
|
|
43
54
|
*
|
|
44
55
|
* @returns {ReactNode} The rendered DashboardTemplate component.
|
|
45
56
|
*/
|
|
46
|
-
export function DashboardTemplate({ headerProps, pageTitles, headingTitles, headingLevel, titleAdornment, titleDescription, titleChildren, children, breadcrumbLoadingLabel, headingLoadingLabel, }) {
|
|
57
|
+
export function DashboardTemplate({ headerProps, pageTitles, headingTitles, headingLevel, titleAdornment, titleDescription, titleChildren, heading, children, breadcrumbLoadingLabel, headingLoadingLabel, }) {
|
|
47
58
|
return (<>
|
|
48
59
|
<Header {...headerProps}/>
|
|
49
60
|
<hr className="border-gray-5 dark:border-gray-dark-1"/>
|
|
@@ -51,20 +62,20 @@ export function DashboardTemplate({ headerProps, pageTitles, headingTitles, head
|
|
|
51
62
|
<Suspense fallback={<BreadcrumbSkeleton loadingLabel={breadcrumbLoadingLabel}/>}>
|
|
52
63
|
<BreadcrumbWithPathname homeHref={headerProps.homeHref} pageTitles={pageTitles}/>
|
|
53
64
|
</Suspense>
|
|
54
|
-
<div className="flex flex-col items-start gap-3 sm:flex-row sm:justify-between">
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
65
|
+
{heading ?? (<div className="flex flex-col items-start gap-3 sm:flex-row sm:justify-between">
|
|
66
|
+
<div className="flex min-w-0 flex-col gap-1">
|
|
67
|
+
<div className="flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1">
|
|
68
|
+
<Suspense fallback={<HeadingWithTitleSkeleton loadingLabel={headingLoadingLabel}/>}>
|
|
69
|
+
<HeadingWithTitle pageTitles={pageTitles} headingTitles={headingTitles} level={headingLevel}/>
|
|
70
|
+
</Suspense>
|
|
71
|
+
{titleAdornment}
|
|
72
|
+
</div>
|
|
73
|
+
{!!titleDescription && (<div className="text-gray-1 dark:text-gray-2 text-sm">
|
|
74
|
+
{titleDescription}
|
|
75
|
+
</div>)}
|
|
61
76
|
</div>
|
|
62
|
-
{
|
|
63
|
-
|
|
64
|
-
</div>)}
|
|
65
|
-
</div>
|
|
66
|
-
{titleChildren}
|
|
67
|
-
</div>
|
|
77
|
+
{titleChildren}
|
|
78
|
+
</div>)}
|
|
68
79
|
</Container>
|
|
69
80
|
<hr className="border-gray-5 dark:border-gray-dark-1"/>
|
|
70
81
|
<Container className="py-6" as="main">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardTemplate.jsx","sourceRoot":"","sources":["../../../../src/components/04-templates/DashboardTemplate/DashboardTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AACtF,OAAO,EAAE,MAAM,EAAe,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAyB,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"DashboardTemplate.jsx","sourceRoot":"","sources":["../../../../src/components/04-templates/DashboardTemplate/DashboardTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAA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CAAC,EAEtC,CAAC,CAED;kBAAA,CAAC,gBAAgB,CACf,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,KAAK,CAAC,CAAC,YAAY,CAAC,EAExB;gBAAA,EAAE,QAAQ,CACV;gBAAA,CAAC,cAAc,CACjB;cAAA,EAAE,GAAG,CACL;cAAA,CAAC,CAAC,CAAC,gBAAgB,IAAI,CACrB,CAAC,GAAG,CAAC,SAAS,CAAC,sCAAsC,CACnD;kBAAA,CAAC,gBAAgB,CACnB;gBAAA,EAAE,GAAG,CAAC,CACP,CACH;YAAA,EAAE,GAAG,CACL;YAAA,CAAC,aAAa,CAChB;UAAA,EAAE,GAAG,CAAC,CACP,CACH;MAAA,EAAE,SAAS,CACX;MAAA,CAAC,EAAE,CAAC,SAAS,CAAC,uCAAuC,EACrD;MAAA,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CACnC;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,SAAS,CACb;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -13,9 +13,13 @@ export type ExpMascotProps = {
|
|
|
13
13
|
*
|
|
14
14
|
* Mascots are decorative and hidden from screen readers, so the text next to
|
|
15
15
|
* them must carry the message. Use one per state (empty, loading, error, no
|
|
16
|
-
* permission, success), above the title and the copy,
|
|
17
|
-
*
|
|
18
|
-
*
|
|
16
|
+
* permission, success), above the title and the copy, or one in the page
|
|
17
|
+
* header (`ExpPageHero`), even when the page shows data; never among the data
|
|
18
|
+
* itself (rows, cards, charts). Suggested sizes: 96–128px for desktop empty
|
|
19
|
+
* states, 80px on small screens, 48–64px inside a message or a toast.
|
|
20
|
+
*
|
|
21
|
+
* In dark mode Bugi sits on a light disc so it reads on the dark background;
|
|
22
|
+
* Oculus and Fixi need none.
|
|
19
23
|
*
|
|
20
24
|
* Renders nothing outside an `ExpScope`, or when the scope hides mascots.
|
|
21
25
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpMascot.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpMascot/ExpMascot.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,WAAW,CAAC;AAE9D,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzD,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,aAAa,CAAC;IACpB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B,GAAG,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,CAAC;AAEtD
|
|
1
|
+
{"version":3,"file":"ExpMascot.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpMascot/ExpMascot.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,WAAW,CAAC;AAE9D,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzD,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,aAAa,CAAC;IACpB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B,GAAG,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,IAAU,EACV,MAAgB,EAChB,GAAG,SAAS,EACb,EAAE,cAAc,GAAG,SAAS,CAiC5B"}
|
|
@@ -8,9 +8,13 @@ import { mascotCatalog } from './catalog';
|
|
|
8
8
|
*
|
|
9
9
|
* Mascots are decorative and hidden from screen readers, so the text next to
|
|
10
10
|
* them must carry the message. Use one per state (empty, loading, error, no
|
|
11
|
-
* permission, success), above the title and the copy,
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* permission, success), above the title and the copy, or one in the page
|
|
12
|
+
* header (`ExpPageHero`), even when the page shows data; never among the data
|
|
13
|
+
* itself (rows, cards, charts). Suggested sizes: 96–128px for desktop empty
|
|
14
|
+
* states, 80px on small screens, 48–64px inside a message or a toast.
|
|
15
|
+
*
|
|
16
|
+
* In dark mode Bugi sits on a light disc so it reads on the dark background;
|
|
17
|
+
* Oculus and Fixi need none.
|
|
14
18
|
*
|
|
15
19
|
* Renders nothing outside an `ExpScope`, or when the scope hides mascots.
|
|
16
20
|
*
|
|
@@ -35,7 +39,8 @@ export function ExpMascot({ name, size = 112, motion = 'still', ...restProps })
|
|
|
35
39
|
return null;
|
|
36
40
|
return (<span {...restProps} aria-hidden="true" className={clsx('inline-flex shrink-0 flex-col items-center', motion === 'float' && 'exp-float', motion === 'hang' && 'exp-hang', restProps.className)}>
|
|
37
41
|
{motion === 'hang' && (<span className="bg-lavender-1 dark:bg-lavender-dark-1 h-3.5 w-[1.5px]"/>)}
|
|
38
|
-
<img src={mascotCatalog[name].src} alt="" width={size} height={size} draggable={false} className=
|
|
42
|
+
<img src={mascotCatalog[name].src} alt="" width={size} height={size} draggable={false} className={clsx('block object-contain', name.startsWith('bugi-') &&
|
|
43
|
+
'dark:bg-gray-6 dark:rounded-full dark:p-[8%]')}/>
|
|
39
44
|
</span>);
|
|
40
45
|
}
|
|
41
46
|
//# sourceMappingURL=ExpMascot.jsx.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpMascot.jsx","sourceRoot":"","sources":["../../src/expresivo/ExpMascot/ExpMascot.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,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AC,CACjB,SAAS,CAAC,CAAC,IAAI,CACb,sBAAsB,EACtB,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;YACtB,8CAA8C,CACjD,CAAC,EAEN;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import type { ExpMascotName } from '../ExpMascot/catalog';
|
|
3
|
+
export type ExpPageHeroLevel = 'h3' | 'h4' | 'h5';
|
|
4
|
+
export type ExpPageHeroBubble = {
|
|
5
|
+
title?: ReactNode;
|
|
6
|
+
text?: ReactNode;
|
|
7
|
+
badge?: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
export type ExpPageHeroCollapse = {
|
|
10
|
+
collapsed: boolean;
|
|
11
|
+
onToggle: () => void;
|
|
12
|
+
/** Accessible name while collapsed, such as "Expand header". */
|
|
13
|
+
expandLabel: string;
|
|
14
|
+
/** Accessible name while expanded, such as "Collapse header". */
|
|
15
|
+
collapseLabel: string;
|
|
16
|
+
};
|
|
17
|
+
export type ExpPageHeroProps = {
|
|
18
|
+
title: ReactNode;
|
|
19
|
+
eyebrow?: ReactNode;
|
|
20
|
+
headingLevel?: ExpPageHeroLevel;
|
|
21
|
+
titleAdornment?: ReactNode;
|
|
22
|
+
description?: ReactNode;
|
|
23
|
+
/** Content under the description, such as stat chips or a data line. */
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
actions?: ReactNode;
|
|
26
|
+
mascot?: ExpMascotName;
|
|
27
|
+
bubble?: ExpPageHeroBubble;
|
|
28
|
+
collapse?: ExpPageHeroCollapse;
|
|
29
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'children'>;
|
|
30
|
+
/**
|
|
31
|
+
* Page header for the top of a screen, meant for the `heading` slot of
|
|
32
|
+
* `DashboardTemplate`: an eyebrow, the title, a description, optional content
|
|
33
|
+
* under it, and a mascot with a speech bubble on the right.
|
|
34
|
+
*
|
|
35
|
+
* On wide screens it draws a band with a dotted lavender background. With
|
|
36
|
+
* `collapse`, a corner button tucks it down to the title, and the mascot hangs
|
|
37
|
+
* from a thread instead; the consumer keeps the state. On small screens it is
|
|
38
|
+
* a plain title row without eyebrow, mascot or bubble, and `collapse` has no
|
|
39
|
+
* effect.
|
|
40
|
+
*
|
|
41
|
+
* Outside an `ExpScope` it renders the core title row of `DashboardTemplate`:
|
|
42
|
+
* title, adornment, description, children and actions.
|
|
43
|
+
*
|
|
44
|
+
* @component
|
|
45
|
+
* @example
|
|
46
|
+
* <ExpPageHero
|
|
47
|
+
* eyebrow="Case memory"
|
|
48
|
+
* title="Cases"
|
|
49
|
+
* description="Review past diagnoses before starting from scratch."
|
|
50
|
+
* mascot="fixi-02-investigando"
|
|
51
|
+
* bubble={{ title: 'Lead found', text: 'Search by ticket or symptom.' }}
|
|
52
|
+
* />
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* // Collapsible, with the state kept by the consumer
|
|
56
|
+
* <ExpPageHero
|
|
57
|
+
* title="Cases"
|
|
58
|
+
* mascot="fixi-02-investigando"
|
|
59
|
+
* collapse={{
|
|
60
|
+
* collapsed,
|
|
61
|
+
* onToggle: () => setCollapsed(!collapsed),
|
|
62
|
+
* expandLabel: 'Expand header',
|
|
63
|
+
* collapseLabel: 'Collapse header',
|
|
64
|
+
* }}
|
|
65
|
+
* />
|
|
66
|
+
*
|
|
67
|
+
* @param {Object} props - The properties of the ExpPageHero component.
|
|
68
|
+
* @param {ReactNode} props.title - Page title.
|
|
69
|
+
* @param {ReactNode} [props.eyebrow] - Short uppercase line above the title, only on wide screens.
|
|
70
|
+
* @param {'h3' | 'h4' | 'h5'} [props.headingLevel='h3'] - Heading level of the title.
|
|
71
|
+
* @param {ReactNode} [props.titleAdornment] - Content next to the title, such as a `Badge`.
|
|
72
|
+
* @param {ReactNode} [props.description] - Text under the title; hidden while collapsed.
|
|
73
|
+
* @param {ReactNode} [props.children] - Content under the description, such as stat chips; hidden while collapsed.
|
|
74
|
+
* @param {ReactNode} [props.actions] - Content on the right, such as buttons; it moves under the title on small screens.
|
|
75
|
+
* @param {ExpMascotName} [props.mascot] - Mascot on the right, 104px; 56px and hanging while collapsed.
|
|
76
|
+
* @param {ExpPageHeroBubble} [props.bubble] - Speech bubble next to the mascot: `title`, `text` and `badge`.
|
|
77
|
+
* @param {ExpPageHeroCollapse} [props.collapse] - Makes the header collapsible: `collapsed`, `onToggle`, `expandLabel` and `collapseLabel`.
|
|
78
|
+
*
|
|
79
|
+
* @returns {ReactNode} The page header.
|
|
80
|
+
*/
|
|
81
|
+
export declare function ExpPageHero({ title, eyebrow, headingLevel, titleAdornment, description, children, actions, mascot, bubble, collapse, ...restProps }: ExpPageHeroProps): ReactNode;
|
|
82
|
+
//# sourceMappingURL=ExpPageHero.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpPageHero.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpPageHero/ExpPageHero.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAKnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAElD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,gEAAgE;IAChE,WAAW,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,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