@techsio/ui-kit 0.48.0 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atoms/numeric-input.js +3 -0
- package/dist/molecules/combobox.js +204 -50
- package/dist/molecules/form-checkbox.js +12 -2
- package/dist/molecules/form-error-summary.js +59 -0
- package/dist/molecules/form-input.js +10 -1
- package/dist/molecules/form-numeric-input.js +9 -1
- package/dist/molecules/form-textarea.js +10 -1
- package/dist/src/atoms/numeric-input.d.ts +1 -1
- package/dist/src/atoms/numeric-input.d.ts.map +1 -1
- package/dist/src/molecules/combobox.d.ts +50 -4
- package/dist/src/molecules/combobox.d.ts.map +1 -1
- package/dist/src/molecules/form-checkbox.d.ts +2 -1
- package/dist/src/molecules/form-checkbox.d.ts.map +1 -1
- package/dist/src/molecules/form-error-summary.d.ts +29 -0
- package/dist/src/molecules/form-error-summary.d.ts.map +1 -0
- package/dist/src/molecules/form-input.d.ts +3 -3
- package/dist/src/molecules/form-input.d.ts.map +1 -1
- package/dist/src/molecules/form-numeric-input.d.ts +3 -3
- package/dist/src/molecules/form-numeric-input.d.ts.map +1 -1
- package/dist/src/molecules/form-textarea.d.ts +3 -3
- package/dist/src/molecules/form-textarea.d.ts.map +1 -1
- package/dist/src/templates/facet-filter-panel.d.ts +96 -0
- package/dist/src/templates/facet-filter-panel.d.ts.map +1 -0
- package/dist/src/templates/numeric-input.d.ts +1 -1
- package/dist/src/templates/search-suggestions.d.ts +23 -0
- package/dist/src/templates/search-suggestions.d.ts.map +1 -0
- package/dist/stories/changelog/changelog.stories.d.ts.map +1 -1
- package/dist/stories/molecules/combobox.stories.d.ts +6 -0
- package/dist/stories/molecules/combobox.stories.d.ts.map +1 -1
- package/dist/stories/molecules/form-error-summary.stories.d.ts +11 -0
- package/dist/stories/molecules/form-error-summary.stories.d.ts.map +1 -0
- package/dist/stories/templates/facet-filter-panel.stories.d.ts +17 -0
- package/dist/stories/templates/facet-filter-panel.stories.d.ts.map +1 -0
- package/dist/stories/templates/search-suggestions.stories.d.ts +119 -0
- package/dist/stories/templates/search-suggestions.stories.d.ts.map +1 -0
- package/dist/templates/facet-filter-panel.js +310 -0
- package/dist/templates/search-suggestions.js +14 -0
- package/dist/test/combobox.behavior.spec.d.ts +2 -0
- package/dist/test/combobox.behavior.spec.d.ts.map +1 -0
- package/dist/test/facet-filter-panel.spec.d.ts +2 -0
- package/dist/test/facet-filter-panel.spec.d.ts.map +1 -0
- package/dist/test/form-error-summary.ids.test.d.ts +2 -0
- package/dist/test/form-error-summary.ids.test.d.ts.map +1 -0
- package/dist/test/search-suggestions.spec.d.ts +2 -0
- package/dist/test/search-suggestions.spec.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/tokens/components/components.css +3 -0
- package/src/tokens/components/molecules/_combobox.css +22 -0
- package/src/tokens/components/molecules/_form-error-summary.css +20 -0
- package/src/tokens/components/templates/_facet-filter-panel.css +43 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useId, useRef, useState } from "react";
|
|
3
|
+
import { Button } from "../atoms/button.js";
|
|
4
|
+
import { Accordion } from "../molecules/accordion.js";
|
|
5
|
+
import { Dialog } from "../molecules/dialog.js";
|
|
6
|
+
import { FormCheckbox } from "../molecules/form-checkbox.js";
|
|
7
|
+
import { Slider } from "../molecules/slider.js";
|
|
8
|
+
import { tv } from "../utils.js";
|
|
9
|
+
const facetFilterPanelStyles = tv({
|
|
10
|
+
slots: {
|
|
11
|
+
root: [
|
|
12
|
+
"flex w-full min-w-0 flex-col overflow-y-auto",
|
|
13
|
+
"max-h-(--container-facet-filter-panel-max-h) rounded-facet-filter-panel",
|
|
14
|
+
"border-(length:--border-width-facet-filter-panel) border-facet-filter-panel-border",
|
|
15
|
+
"bg-facet-filter-panel-bg text-facet-filter-panel-fg",
|
|
16
|
+
"p-facet-filter-panel"
|
|
17
|
+
],
|
|
18
|
+
content: "flex min-h-0 flex-col gap-facet-filter-panel",
|
|
19
|
+
title: "font-facet-filter-panel-title text-facet-filter-panel-title text-facet-filter-panel-title-fg",
|
|
20
|
+
pending: "text-(length:--text-facet-filter-panel-status) text-facet-filter-panel-muted-fg",
|
|
21
|
+
groups: "min-h-0 gap-facet-filter-panel-group bg-facet-filter-panel-bg",
|
|
22
|
+
rangeGroup: "border-b-(length:--border-width-facet-filter-panel) border-facet-filter-panel-border p-facet-filter-panel-group",
|
|
23
|
+
optionList: "flex flex-col gap-facet-filter-panel-item",
|
|
24
|
+
optionLabel: "flex min-w-0 flex-1 items-center justify-between gap-facet-filter-panel-item",
|
|
25
|
+
optionText: "min-w-0 break-words",
|
|
26
|
+
optionCount: "shrink-0 text-facet-filter-panel-count text-facet-filter-panel-muted-fg",
|
|
27
|
+
empty: "text-(length:--text-facet-filter-panel-status) text-facet-filter-panel-muted-fg",
|
|
28
|
+
overflowAction: "mt-facet-filter-panel-overflow self-start",
|
|
29
|
+
drawerTrigger: "self-start",
|
|
30
|
+
drawerContent: "min-w-0",
|
|
31
|
+
triggerCount: "inline-flex min-w-facet-filter-panel-count items-center justify-center rounded-facet-filter-panel-count bg-facet-filter-panel-count-bg px-facet-filter-panel-count text-facet-filter-panel-count text-facet-filter-panel-count-fg",
|
|
32
|
+
activeRoot: "border-b-(length:--border-width-facet-filter-panel) flex flex-col gap-facet-filter-panel-active border-facet-filter-panel-border pb-facet-filter-panel-active",
|
|
33
|
+
activeHeader: "flex flex-wrap items-center justify-between gap-facet-filter-panel-active",
|
|
34
|
+
activeTitle: "font-facet-filter-panel-active-title text-facet-filter-panel-active-title",
|
|
35
|
+
activeList: "flex flex-wrap gap-facet-filter-panel-active"
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
const toRangeTuple = (values, group)=>[
|
|
39
|
+
values[0] ?? group.min,
|
|
40
|
+
values[1] ?? group.max
|
|
41
|
+
];
|
|
42
|
+
function FacetFilterOptions({ group, selectedValues, disabled, showMoreLabel, showLessLabel, onOptionChange }) {
|
|
43
|
+
const [expanded, setExpanded] = useState(false);
|
|
44
|
+
const styles = facetFilterPanelStyles();
|
|
45
|
+
const collapseAfter = Math.max(0, group.collapseAfter ?? group.options.length);
|
|
46
|
+
const hasOverflow = group.options.length > collapseAfter;
|
|
47
|
+
const visibleOptions = expanded || !hasOverflow ? group.options : group.options.slice(0, collapseAfter);
|
|
48
|
+
if (0 === group.options.length) return group.emptyLabel ? /*#__PURE__*/ jsx("div", {
|
|
49
|
+
className: styles.empty(),
|
|
50
|
+
children: group.emptyLabel
|
|
51
|
+
}) : null;
|
|
52
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
53
|
+
className: "flex flex-col",
|
|
54
|
+
children: [
|
|
55
|
+
/*#__PURE__*/ jsx("ul", {
|
|
56
|
+
className: styles.optionList(),
|
|
57
|
+
children: visibleOptions.map((option)=>/*#__PURE__*/ jsx("li", {
|
|
58
|
+
children: /*#__PURE__*/ jsx(FormCheckbox, {
|
|
59
|
+
checked: selectedValues.includes(option.value),
|
|
60
|
+
disabled: disabled || option.disabled,
|
|
61
|
+
label: /*#__PURE__*/ jsxs("span", {
|
|
62
|
+
className: styles.optionLabel(),
|
|
63
|
+
children: [
|
|
64
|
+
/*#__PURE__*/ jsx("span", {
|
|
65
|
+
className: styles.optionText(),
|
|
66
|
+
children: option.label
|
|
67
|
+
}),
|
|
68
|
+
void 0 !== option.count ? /*#__PURE__*/ jsx("span", {
|
|
69
|
+
className: styles.optionCount(),
|
|
70
|
+
children: option.count
|
|
71
|
+
}) : null
|
|
72
|
+
]
|
|
73
|
+
}),
|
|
74
|
+
name: group.id,
|
|
75
|
+
onCheckedChange: (checked)=>onOptionChange?.({
|
|
76
|
+
groupId: group.id,
|
|
77
|
+
value: option.value,
|
|
78
|
+
checked
|
|
79
|
+
}),
|
|
80
|
+
value: option.value
|
|
81
|
+
})
|
|
82
|
+
}, option.value))
|
|
83
|
+
}),
|
|
84
|
+
hasOverflow ? /*#__PURE__*/ jsx(Button, {
|
|
85
|
+
"aria-expanded": expanded,
|
|
86
|
+
className: styles.overflowAction(),
|
|
87
|
+
disabled: disabled,
|
|
88
|
+
onClick: ()=>setExpanded((current)=>!current),
|
|
89
|
+
size: "sm",
|
|
90
|
+
theme: "borderless",
|
|
91
|
+
type: "button",
|
|
92
|
+
variant: "primary",
|
|
93
|
+
children: expanded ? showLessLabel : showMoreLabel(group.options.length - collapseAfter)
|
|
94
|
+
}) : null
|
|
95
|
+
]
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function FacetFilterPanelContent({ title, groups, selectedValues = {}, activeFilters = [], disabled = false, pending = false, pendingLabel, activeFiltersLabel = "Active filters", resetLabel = "Clear filters", showMoreLabel = (hiddenCount)=>`Show ${hiddenCount} more`, showLessLabel = "Show less", expandedGroups, defaultExpandedGroups, onExpandedGroupsChange, onOptionChange, onRangeChange, onRangeChangeEnd, onRemoveFilter, onReset, showTitle, titleId }) {
|
|
99
|
+
const styles = facetFilterPanelStyles();
|
|
100
|
+
const interactionDisabled = disabled || pending;
|
|
101
|
+
const optionGroupIds = groups.filter((group)=>"options" === group.type).map((group)=>group.id);
|
|
102
|
+
const [localExpandedGroups, setLocalExpandedGroups] = useState(()=>defaultExpandedGroups ?? optionGroupIds);
|
|
103
|
+
const previousGroupIds = useRef(new Set(optionGroupIds));
|
|
104
|
+
useEffect(()=>{
|
|
105
|
+
const addedGroupIds = optionGroupIds.filter((id)=>!previousGroupIds.current.has(id));
|
|
106
|
+
previousGroupIds.current = new Set(optionGroupIds);
|
|
107
|
+
if (void 0 === expandedGroups && void 0 === defaultExpandedGroups && addedGroupIds.length > 0) setLocalExpandedGroups((current)=>[
|
|
108
|
+
...new Set([
|
|
109
|
+
...current,
|
|
110
|
+
...addedGroupIds
|
|
111
|
+
])
|
|
112
|
+
]);
|
|
113
|
+
}, [
|
|
114
|
+
optionGroupIds,
|
|
115
|
+
expandedGroups,
|
|
116
|
+
defaultExpandedGroups
|
|
117
|
+
]);
|
|
118
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
119
|
+
"aria-busy": pending || void 0,
|
|
120
|
+
className: styles.content(),
|
|
121
|
+
children: [
|
|
122
|
+
showTitle ? /*#__PURE__*/ jsx("h2", {
|
|
123
|
+
className: styles.title(),
|
|
124
|
+
id: titleId,
|
|
125
|
+
children: title
|
|
126
|
+
}) : null,
|
|
127
|
+
pending && pendingLabel ? /*#__PURE__*/ jsx("output", {
|
|
128
|
+
"aria-live": "polite",
|
|
129
|
+
className: styles.pending(),
|
|
130
|
+
children: pendingLabel
|
|
131
|
+
}) : null,
|
|
132
|
+
/*#__PURE__*/ jsx(FacetFilterPanel.ActiveFilters, {
|
|
133
|
+
disabled: interactionDisabled,
|
|
134
|
+
items: activeFilters,
|
|
135
|
+
label: activeFiltersLabel,
|
|
136
|
+
onRemove: onRemoveFilter,
|
|
137
|
+
onReset: onReset,
|
|
138
|
+
resetLabel: resetLabel
|
|
139
|
+
}),
|
|
140
|
+
/*#__PURE__*/ jsx(Accordion, {
|
|
141
|
+
className: styles.groups(),
|
|
142
|
+
disabled: disabled,
|
|
143
|
+
multiple: true,
|
|
144
|
+
onChange: (groupIds)=>{
|
|
145
|
+
if (void 0 === expandedGroups) setLocalExpandedGroups(groupIds);
|
|
146
|
+
onExpandedGroupsChange?.(groupIds);
|
|
147
|
+
},
|
|
148
|
+
value: expandedGroups ?? localExpandedGroups,
|
|
149
|
+
variant: "child",
|
|
150
|
+
children: groups.map((group)=>{
|
|
151
|
+
if ("range" === group.type) return /*#__PURE__*/ jsx("section", {
|
|
152
|
+
className: styles.rangeGroup(),
|
|
153
|
+
children: /*#__PURE__*/ jsx(Slider, {
|
|
154
|
+
disabled: interactionDisabled || group.disabled,
|
|
155
|
+
formatRangeText: group.formatRangeText,
|
|
156
|
+
formatValue: group.formatValue,
|
|
157
|
+
label: group.label,
|
|
158
|
+
max: group.max,
|
|
159
|
+
min: group.min,
|
|
160
|
+
minStepsBetweenThumbs: group.minStepsBetweenThumbs,
|
|
161
|
+
onChange: (value)=>onRangeChange?.({
|
|
162
|
+
groupId: group.id,
|
|
163
|
+
value: toRangeTuple(value, group)
|
|
164
|
+
}),
|
|
165
|
+
onChangeEnd: (value)=>onRangeChangeEnd?.({
|
|
166
|
+
groupId: group.id,
|
|
167
|
+
value: toRangeTuple(value, group)
|
|
168
|
+
}),
|
|
169
|
+
showValueText: true,
|
|
170
|
+
step: group.step,
|
|
171
|
+
value: [
|
|
172
|
+
...group.value
|
|
173
|
+
]
|
|
174
|
+
})
|
|
175
|
+
}, group.id);
|
|
176
|
+
return /*#__PURE__*/ jsxs(Accordion.Item, {
|
|
177
|
+
disabled: group.disabled,
|
|
178
|
+
value: group.id,
|
|
179
|
+
children: [
|
|
180
|
+
/*#__PURE__*/ jsxs(Accordion.Header, {
|
|
181
|
+
children: [
|
|
182
|
+
/*#__PURE__*/ jsx(Accordion.Title, {
|
|
183
|
+
children: group.label
|
|
184
|
+
}),
|
|
185
|
+
/*#__PURE__*/ jsx(Accordion.Indicator, {})
|
|
186
|
+
]
|
|
187
|
+
}),
|
|
188
|
+
/*#__PURE__*/ jsx(Accordion.Content, {
|
|
189
|
+
children: /*#__PURE__*/ jsx(FacetFilterOptions, {
|
|
190
|
+
disabled: interactionDisabled || Boolean(group.disabled),
|
|
191
|
+
group: group,
|
|
192
|
+
onOptionChange: onOptionChange,
|
|
193
|
+
selectedValues: selectedValues[group.id] ?? [],
|
|
194
|
+
showLessLabel: showLessLabel,
|
|
195
|
+
showMoreLabel: showMoreLabel
|
|
196
|
+
})
|
|
197
|
+
})
|
|
198
|
+
]
|
|
199
|
+
}, group.id);
|
|
200
|
+
})
|
|
201
|
+
})
|
|
202
|
+
]
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
function FacetFilterPanel({ presentation = "inline", drawerTriggerLabel, drawerPlacement = "right", drawerSize = "sm", drawerOpen, defaultDrawerOpen = false, onDrawerOpenChange, className, ...props }) {
|
|
206
|
+
const styles = facetFilterPanelStyles();
|
|
207
|
+
const inlineTitleId = useId();
|
|
208
|
+
const drawerTriggerRef = useRef(null);
|
|
209
|
+
const [uncontrolledDrawerOpen, setUncontrolledDrawerOpen] = useState(defaultDrawerOpen);
|
|
210
|
+
const resolvedDrawerOpen = drawerOpen ?? uncontrolledDrawerOpen;
|
|
211
|
+
const activeCount = props.activeFilters?.length ?? 0;
|
|
212
|
+
const setDrawerOpen = (open)=>{
|
|
213
|
+
if (void 0 === drawerOpen) setUncontrolledDrawerOpen(open);
|
|
214
|
+
onDrawerOpenChange?.(open);
|
|
215
|
+
};
|
|
216
|
+
if ("drawer" === presentation) return /*#__PURE__*/ jsxs(Fragment, {
|
|
217
|
+
children: [
|
|
218
|
+
/*#__PURE__*/ jsxs(Button, {
|
|
219
|
+
"aria-expanded": resolvedDrawerOpen,
|
|
220
|
+
"aria-haspopup": "dialog",
|
|
221
|
+
className: styles.drawerTrigger(),
|
|
222
|
+
icon: "token-icon-facet-filter-panel-filter",
|
|
223
|
+
onClick: ()=>setDrawerOpen(true),
|
|
224
|
+
ref: drawerTriggerRef,
|
|
225
|
+
type: "button",
|
|
226
|
+
variant: "primary",
|
|
227
|
+
children: [
|
|
228
|
+
drawerTriggerLabel ?? props.title,
|
|
229
|
+
activeCount > 0 ? /*#__PURE__*/ jsx("span", {
|
|
230
|
+
"aria-hidden": "true",
|
|
231
|
+
className: styles.triggerCount(),
|
|
232
|
+
children: activeCount
|
|
233
|
+
}) : null
|
|
234
|
+
]
|
|
235
|
+
}),
|
|
236
|
+
/*#__PURE__*/ jsx(Dialog, {
|
|
237
|
+
className: styles.drawerContent({
|
|
238
|
+
className
|
|
239
|
+
}),
|
|
240
|
+
customTrigger: true,
|
|
241
|
+
finalFocusEl: ()=>drawerTriggerRef.current,
|
|
242
|
+
onOpenChange: ({ open })=>setDrawerOpen(open),
|
|
243
|
+
open: resolvedDrawerOpen,
|
|
244
|
+
placement: drawerPlacement,
|
|
245
|
+
size: drawerSize,
|
|
246
|
+
title: props.title,
|
|
247
|
+
children: /*#__PURE__*/ jsx(FacetFilterPanelContent, {
|
|
248
|
+
...props,
|
|
249
|
+
showTitle: false
|
|
250
|
+
})
|
|
251
|
+
})
|
|
252
|
+
]
|
|
253
|
+
});
|
|
254
|
+
return /*#__PURE__*/ jsx("aside", {
|
|
255
|
+
"aria-labelledby": inlineTitleId,
|
|
256
|
+
className: styles.root({
|
|
257
|
+
className
|
|
258
|
+
}),
|
|
259
|
+
children: /*#__PURE__*/ jsx(FacetFilterPanelContent, {
|
|
260
|
+
...props,
|
|
261
|
+
showTitle: true,
|
|
262
|
+
titleId: inlineTitleId
|
|
263
|
+
})
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
FacetFilterPanel.ActiveFilters = function({ items, label = "Active filters", resetLabel = "Clear filters", disabled = false, className, onRemove, onReset }) {
|
|
267
|
+
const styles = facetFilterPanelStyles();
|
|
268
|
+
if (0 === items.length) return null;
|
|
269
|
+
return /*#__PURE__*/ jsxs("section", {
|
|
270
|
+
className: styles.activeRoot({
|
|
271
|
+
className
|
|
272
|
+
}),
|
|
273
|
+
children: [
|
|
274
|
+
/*#__PURE__*/ jsxs("div", {
|
|
275
|
+
className: styles.activeHeader(),
|
|
276
|
+
children: [
|
|
277
|
+
/*#__PURE__*/ jsx("h3", {
|
|
278
|
+
className: styles.activeTitle(),
|
|
279
|
+
children: label
|
|
280
|
+
}),
|
|
281
|
+
/*#__PURE__*/ jsx(Button, {
|
|
282
|
+
disabled: disabled,
|
|
283
|
+
onClick: onReset,
|
|
284
|
+
size: "sm",
|
|
285
|
+
theme: "borderless",
|
|
286
|
+
type: "button",
|
|
287
|
+
variant: "primary",
|
|
288
|
+
children: resetLabel
|
|
289
|
+
})
|
|
290
|
+
]
|
|
291
|
+
}),
|
|
292
|
+
/*#__PURE__*/ jsx("div", {
|
|
293
|
+
className: styles.activeList(),
|
|
294
|
+
children: items.map((item)=>/*#__PURE__*/ jsx(Button, {
|
|
295
|
+
"aria-label": item.removeLabel,
|
|
296
|
+
disabled: disabled,
|
|
297
|
+
icon: "token-icon-close",
|
|
298
|
+
iconPosition: "right",
|
|
299
|
+
onClick: ()=>onRemove?.(item.id),
|
|
300
|
+
size: "sm",
|
|
301
|
+
theme: "outlined",
|
|
302
|
+
type: "button",
|
|
303
|
+
variant: "primary",
|
|
304
|
+
children: item.label
|
|
305
|
+
}, item.id))
|
|
306
|
+
})
|
|
307
|
+
]
|
|
308
|
+
});
|
|
309
|
+
};
|
|
310
|
+
export { FacetFilterPanel };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Combobox } from "../molecules/combobox.js";
|
|
3
|
+
function SearchSuggestions({ resultSlot, allResultsLink, filterBehavior = "external", inputBehavior = "none", portalled = false, ...props }) {
|
|
4
|
+
return /*#__PURE__*/ jsx(Combobox, {
|
|
5
|
+
...props,
|
|
6
|
+
filterBehavior: filterBehavior,
|
|
7
|
+
footer: allResultsLink,
|
|
8
|
+
inputBehavior: inputBehavior,
|
|
9
|
+
mode: "navigation",
|
|
10
|
+
portalled: portalled,
|
|
11
|
+
renderItem: resultSlot
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export { SearchSuggestions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox.behavior.spec.d.ts","sourceRoot":"","sources":["../../test/combobox.behavior.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facet-filter-panel.spec.d.ts","sourceRoot":"","sources":["../../test/facet-filter-panel.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-error-summary.ids.test.d.ts","sourceRoot":"","sources":["../../test/form-error-summary.ids.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-suggestions.spec.d.ts","sourceRoot":"","sources":["../../test/search-suggestions.spec.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
@import "./molecules/_dialog.css";
|
|
30
30
|
@import "./molecules/_drawer.css";
|
|
31
31
|
@import "./molecules/_file-upload.css";
|
|
32
|
+
@import "./molecules/_form-error-summary.css";
|
|
32
33
|
@import "./molecules/_pagination.css";
|
|
33
34
|
@import "./molecules/_popover.css";
|
|
34
35
|
@import "./molecules/_radio-card.css";
|
|
@@ -52,3 +53,5 @@
|
|
|
52
53
|
@import "./organisms/_header.css";
|
|
53
54
|
@import "./organisms/_gallery.css";
|
|
54
55
|
@import "./organisms/_sidebar.css";
|
|
56
|
+
|
|
57
|
+
@import "./templates/_facet-filter-panel.css";
|
|
@@ -5,14 +5,36 @@
|
|
|
5
5
|
* - `--padding-combobox-input-{size}` semantic aliases (Figma exports
|
|
6
6
|
* the shared per-size spacing axis).
|
|
7
7
|
* - `--padding-combobox-trigger` composite.
|
|
8
|
+
* - Group, footer, and async status aliases over shared popup tokens.
|
|
8
9
|
*/
|
|
9
10
|
|
|
10
11
|
@theme static {
|
|
12
|
+
--color-combobox-status: var(--color-popup-item-fg);
|
|
13
|
+
--color-combobox-group: var(--color-popup-item-fg);
|
|
14
|
+
--color-combobox-divider: var(--color-popup-border);
|
|
15
|
+
|
|
16
|
+
--color-combobox-status-fg: var(--color-combobox-status);
|
|
17
|
+
--color-combobox-group-fg: var(--color-combobox-group);
|
|
18
|
+
--color-combobox-footer-border: var(--color-combobox-divider);
|
|
19
|
+
|
|
11
20
|
--padding-combobox-input-sm: var(--spacing-combobox-sm);
|
|
12
21
|
--padding-combobox-input-md: var(--spacing-combobox-md);
|
|
13
22
|
--padding-combobox-input-lg: var(--spacing-combobox-lg);
|
|
14
23
|
|
|
15
24
|
--padding-combobox-trigger: 0 var(--spacing-100);
|
|
25
|
+
|
|
26
|
+
--text-combobox-group-label-size: var(--text-sm);
|
|
27
|
+
--font-weight-combobox-group-label: var(--font-weight-semibold);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Resolve the popup's size scale on each group label, footer, or status. */
|
|
31
|
+
@utility combobox-popup-padding {
|
|
32
|
+
padding: var(--popup-item-y, var(--padding-popup-item-y-md))
|
|
33
|
+
var(--popup-item-x, var(--padding-popup-item-x-md));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@utility combobox-status-gap {
|
|
37
|
+
gap: var(--popup-item-gap, var(--spacing-popup-item-md));
|
|
16
38
|
}
|
|
17
39
|
|
|
18
40
|
/* Semantic tokens for combobox icons */
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* FormErrorSummary — runtime tokens derive from the status-text error token and
|
|
3
|
+
* danger primitives so the summary reads as one system with the form fields.
|
|
4
|
+
*/
|
|
5
|
+
@theme static {
|
|
6
|
+
--color-form-error-summary-fg: var(--color-status-text-fg-error);
|
|
7
|
+
--color-form-error-summary-border: var(--color-bg-danger-base);
|
|
8
|
+
--color-form-error-summary-bg: var(--color-bg-danger-subtle);
|
|
9
|
+
--color-form-error-summary-ring: var(--color-status-text-fg-error);
|
|
10
|
+
--outline-form-error-summary-focus-style: var(--default-ring-style);
|
|
11
|
+
--outline-form-error-summary-focus-width: var(--default-ring-width);
|
|
12
|
+
--outline-form-error-summary-focus-offset: var(--default-ring-offset);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@utility form-error-summary-focus-ring {
|
|
16
|
+
outline-color: var(--color-form-error-summary-ring);
|
|
17
|
+
outline-offset: var(--outline-form-error-summary-focus-offset);
|
|
18
|
+
outline-style: var(--outline-form-error-summary-focus-style);
|
|
19
|
+
outline-width: var(--outline-form-error-summary-focus-width);
|
|
20
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@theme static {
|
|
2
|
+
/* Reference layer */
|
|
3
|
+
--color-facet-filter-panel-surface: var(--color-fill-surface);
|
|
4
|
+
--color-facet-filter-panel-text: var(--color-fg-primary);
|
|
5
|
+
--color-facet-filter-panel-muted: var(--color-fg-secondary);
|
|
6
|
+
--color-facet-filter-panel-divider: var(--color-border-primary);
|
|
7
|
+
--color-facet-filter-panel-accent: var(--color-bg-primary-base);
|
|
8
|
+
--color-facet-filter-panel-on-accent: var(--color-fg-on-primary-solid-neo);
|
|
9
|
+
|
|
10
|
+
/* Derived layer */
|
|
11
|
+
--color-facet-filter-panel-bg: var(--color-facet-filter-panel-surface);
|
|
12
|
+
--color-facet-filter-panel-fg: var(--color-facet-filter-panel-text);
|
|
13
|
+
--color-facet-filter-panel-title-fg: var(--color-facet-filter-panel-text);
|
|
14
|
+
--color-facet-filter-panel-muted-fg: var(--color-facet-filter-panel-muted);
|
|
15
|
+
--color-facet-filter-panel-border: var(--color-facet-filter-panel-divider);
|
|
16
|
+
--color-facet-filter-panel-count-bg: var(--color-facet-filter-panel-accent);
|
|
17
|
+
--color-facet-filter-panel-count-fg: var(--color-facet-filter-panel-on-accent);
|
|
18
|
+
|
|
19
|
+
--border-width-facet-filter-panel: var(--border-sm);
|
|
20
|
+
--radius-facet-filter-panel: var(--radius-md);
|
|
21
|
+
--radius-facet-filter-panel-count: var(--radius-sm);
|
|
22
|
+
--container-facet-filter-panel-max-h: calc(100dvh - var(--spacing-400));
|
|
23
|
+
--spacing-facet-filter-panel: var(--spacing-200);
|
|
24
|
+
--spacing-facet-filter-panel-group: var(--spacing-100);
|
|
25
|
+
--spacing-facet-filter-panel-item: var(--spacing-100);
|
|
26
|
+
--spacing-facet-filter-panel-active: var(--spacing-100);
|
|
27
|
+
--spacing-facet-filter-panel-overflow: var(--spacing-100);
|
|
28
|
+
--spacing-facet-filter-panel-count: var(--spacing-400);
|
|
29
|
+
--padding-facet-filter-panel: var(--spacing-200);
|
|
30
|
+
--padding-facet-filter-panel-group: var(--spacing-200);
|
|
31
|
+
--padding-facet-filter-panel-active: var(--spacing-150);
|
|
32
|
+
--padding-facet-filter-panel-count: var(--spacing-100);
|
|
33
|
+
--text-facet-filter-panel-title: var(--text-md);
|
|
34
|
+
--text-facet-filter-panel-active-title: var(--text-sm);
|
|
35
|
+
--text-facet-filter-panel-status: var(--text-sm);
|
|
36
|
+
--text-facet-filter-panel-count: var(--text-xs);
|
|
37
|
+
--font-weight-facet-filter-panel-title: var(--font-weight-semibold);
|
|
38
|
+
--font-weight-facet-filter-panel-active-title: var(--font-weight-medium);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@utility token-icon-facet-filter-panel-filter {
|
|
42
|
+
@apply icon-[mdi--filter-variant];
|
|
43
|
+
}
|