@noxlovette/material 0.6.1 → 0.7.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/claude-skill/material-design/SKILL.md +5 -2
- package/claude-skill/material-design/references/accessibility-checklist.md +5 -0
- package/claude-skill/material-design/references/component-patterns.md +24 -3
- package/claude-skill/material-design/references/motion-guide.md +53 -11
- package/claude-skill/material-design/references/tokens-and-styles.md +4 -0
- package/dist/animation/TransitionPatterns.stories.svelte +50 -0
- package/dist/animation/containerTransform.js +10 -4
- package/dist/animation/reducedMotion.d.ts +2 -0
- package/dist/animation/reducedMotion.js +2 -0
- package/dist/animation/sharedAxisTransition.d.ts +20 -3
- package/dist/animation/sharedAxisTransition.js +67 -8
- package/dist/attachments/drag.d.ts +52 -0
- package/dist/attachments/drag.js +217 -0
- package/dist/attachments/index.d.ts +1 -0
- package/dist/attachments/index.js +1 -0
- package/dist/components/buttons/ButtonIcon.svelte +6 -2
- package/dist/components/buttons/ButtonIcon.svelte.d.ts +1 -1
- package/dist/components/buttons/context.d.ts +10 -0
- package/dist/components/buttons/context.js +9 -0
- package/dist/components/chips/Chip.mdx +24 -11
- package/dist/components/chips/Chip.stories.svelte +10 -0
- package/dist/components/chips/Chip.svelte +58 -18
- package/dist/components/chips/Chip.svelte.d.ts +3 -1
- package/dist/components/chips/ChipGroup.stories.svelte +73 -0
- package/dist/components/chips/ChipGroup.stories.svelte.d.ts +4 -0
- package/dist/components/chips/ChipGroup.svelte +242 -0
- package/dist/components/chips/ChipGroup.svelte.d.ts +33 -0
- package/dist/components/chips/index.d.ts +1 -0
- package/dist/components/chips/index.js +1 -0
- package/dist/components/chips/theme.d.ts +182 -21
- package/dist/components/chips/theme.js +116 -25
- package/dist/components/chips/types.d.ts +36 -2
- package/dist/components/containers/app/theme.d.ts +1 -1
- package/dist/components/containers/app/theme.js +1 -1
- package/dist/components/containers/bottom-sheet/BottomSheet.stories.svelte +1 -1
- package/dist/components/containers/list/List.svelte +8 -2
- package/dist/components/containers/list/ListItem.mdx +6 -0
- package/dist/components/containers/list/ListItem.svelte +77 -2
- package/dist/components/containers/list/context.d.ts +14 -0
- package/dist/components/containers/list/theme.d.ts +6 -0
- package/dist/components/containers/list/theme.js +10 -2
- package/dist/components/containers/pane/DraggablePane.svelte +25 -63
- package/dist/components/containers/pane/Pane.svelte +1 -1
- package/dist/components/containers/pane/theme.js +32 -6
- package/dist/components/containers/popover/theme.d.ts +3 -3
- package/dist/components/date/theme.d.ts +6 -6
- package/dist/components/forms/checkbox/theme.js +1 -1
- package/dist/components/forms/command/theme.d.ts +3 -3
- package/dist/components/misc/Avatar.stories.svelte +56 -7
- package/dist/components/misc/Avatar.stories.svelte.d.ts +2 -17
- package/dist/components/misc/Avatar.svelte +82 -8
- package/dist/components/misc/Avatar.svelte.d.ts +5 -0
- package/dist/components/misc/theme.d.ts +6 -0
- package/dist/components/misc/theme.js +5 -3
- package/dist/components/misc/types.d.ts +17 -1
- package/dist/components/nav/appbar/AppBar.svelte +8 -0
- package/dist/components/nav/appbar/AppBar.svelte.d.ts +3 -0
- package/dist/components/nav/appbar/theme.js +14 -2
- package/dist/components/nav/currentRoute.d.ts +11 -0
- package/dist/components/nav/currentRoute.js +28 -0
- package/dist/components/nav/navbar/NavbarItem.svelte +3 -6
- package/dist/components/nav/navbar/theme.d.ts +3 -3
- package/dist/components/nav/rail/Rail.mdx +65 -23
- package/dist/components/nav/rail/Rail.stories.svelte +24 -4
- package/dist/components/nav/rail/Rail.stories.svelte.d.ts +2 -17
- package/dist/components/nav/rail/Rail.svelte +163 -48
- package/dist/components/nav/rail/Rail.svelte.d.ts +6 -3
- package/dist/components/nav/rail/RailItem.svelte +122 -65
- package/dist/components/nav/rail/RailItem.svelte.d.ts +3 -2
- package/dist/components/nav/rail/theme.d.ts +69 -84
- package/dist/components/nav/rail/theme.js +79 -66
- package/dist/components/nav/tabs/Tabs.stories.svelte +2 -1
- package/dist/index.css +2 -0
- package/dist/styles/components.css +50 -0
- package/dist/styles/icon.css +13 -0
- package/dist/utils/icon/Icon.stories.svelte +97 -0
- package/dist/utils/icon/Icon.stories.svelte.d.ts +4 -0
- package/dist/utils/icon/Icon.svelte +101 -12
- package/dist/utils/icon/Icon.svelte.d.ts +9 -0
- package/dist/utils/icon/MaterialSymbolsProvider.svelte +11 -4
- package/dist/utils/icon/base-icons.d.ts +1 -1
- package/dist/utils/icon/base-icons.js +1 -1
- package/dist/utils/icon/icon-names.d.ts +2 -0
- package/dist/utils/icon/icon-names.js +2 -0
- package/dist/utils/icon/swap.d.ts +6 -0
- package/dist/utils/icon/swap.js +45 -0
- package/dist/utils/icon/types.d.ts +59 -7
- package/dist/utils/tv.d.ts +3 -4
- package/dist/utils/tv.js +14 -6
- package/package.json +2 -1
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
A set of chips, 8dp apart, wrapping onto new lines. With `reorderable`, people can reorder them:
|
|
4
|
+
drag a chip (on touch, press and hold first) or focus one and press Alt+Arrow. The dragged chip
|
|
5
|
+
takes M3's dragged state and follows the pointer; the others spring aside to make room, and it
|
|
6
|
+
springs into its slot on release, carrying the pointer's speed.
|
|
7
|
+
|
|
8
|
+
@see https://m3.material.io/components/chips/specs
|
|
9
|
+
-->
|
|
10
|
+
<script lang="ts" generics="T">
|
|
11
|
+
import { flushSync } from 'svelte';
|
|
12
|
+
import type { Attachment } from 'svelte/attachments';
|
|
13
|
+
import { animate, type AnimationPlaybackControls } from 'motion';
|
|
14
|
+
import { nanoid } from 'nanoid';
|
|
15
|
+
import clsx from 'clsx';
|
|
16
|
+
import { springTokens, springTransition } from '../../animation/spring.js';
|
|
17
|
+
import { drag, resist, type DragPoint } from '../../attachments/index.js';
|
|
18
|
+
import { chipGroup } from './theme.js';
|
|
19
|
+
import type { ChipGroupProps } from './types.js';
|
|
20
|
+
|
|
21
|
+
let {
|
|
22
|
+
items = $bindable(),
|
|
23
|
+
key,
|
|
24
|
+
chip,
|
|
25
|
+
reorderable = false,
|
|
26
|
+
onReorder,
|
|
27
|
+
itemLabel,
|
|
28
|
+
'aria-label': ariaLabel,
|
|
29
|
+
class: className
|
|
30
|
+
}: ChipGroupProps<T> = $props();
|
|
31
|
+
|
|
32
|
+
const styles = $derived(chipGroup({ reorderable }));
|
|
33
|
+
const hintId = `chip-group-hint-${nanoid(6)}`;
|
|
34
|
+
|
|
35
|
+
/*
|
|
36
|
+
Motion: chips are small components moved by direct manipulation, so everything springs on
|
|
37
|
+
fastSpatial, like DraggablePane. Under reduced motion neighbours jump to their new slots.
|
|
38
|
+
*/
|
|
39
|
+
const SPRING = springTransition(springTokens.fastSpatial);
|
|
40
|
+
/* Movement before a press turns into a drag, so a tap still presses the chip. */
|
|
41
|
+
const DRAG_THRESHOLD = 4;
|
|
42
|
+
/* How long a finger rests on a chip before it lifts; moving sooner scrolls the page. */
|
|
43
|
+
const TOUCH_DELAY = 400;
|
|
44
|
+
|
|
45
|
+
const reducedMotion = () =>
|
|
46
|
+
typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
47
|
+
|
|
48
|
+
/** Each item's slot element, and the visual offset from its layout position it's drawn at. */
|
|
49
|
+
const slots = new Map<string, HTMLElement>();
|
|
50
|
+
const offsets = new Map<
|
|
51
|
+
string,
|
|
52
|
+
{ x: number; y: number; controls: AnimationPlaybackControls[] }
|
|
53
|
+
>();
|
|
54
|
+
|
|
55
|
+
let draggedKey = $state<string | null>(null);
|
|
56
|
+
let announcement = $state('');
|
|
57
|
+
|
|
58
|
+
const register =
|
|
59
|
+
(k: string): Attachment<HTMLElement> =>
|
|
60
|
+
(el) => {
|
|
61
|
+
slots.set(k, el);
|
|
62
|
+
return () => {
|
|
63
|
+
if (slots.get(k) === el) slots.delete(k);
|
|
64
|
+
stop(k);
|
|
65
|
+
offsets.delete(k);
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
function stop(k: string) {
|
|
70
|
+
for (const c of offsets.get(k)?.controls ?? []) c.stop();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function setOffset(k: string, x: number, y: number) {
|
|
74
|
+
stop(k);
|
|
75
|
+
offsets.set(k, { x, y, controls: [] });
|
|
76
|
+
const el = slots.get(k);
|
|
77
|
+
if (el) el.style.translate = x || y ? `${x}px ${y}px` : '';
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Springs a slot from its current offset back to its layout position. */
|
|
81
|
+
function settle(k: string, velocity: DragPoint = { x: 0, y: 0 }) {
|
|
82
|
+
const from = offsets.get(k);
|
|
83
|
+
if (!from || reducedMotion()) return setOffset(k, 0, 0);
|
|
84
|
+
stop(k);
|
|
85
|
+
const state = { x: from.x, y: from.y, controls: [] as AnimationPlaybackControls[] };
|
|
86
|
+
offsets.set(k, state);
|
|
87
|
+
const el = slots.get(k);
|
|
88
|
+
const paint = () => el && (el.style.translate = `${state.x}px ${state.y}px`);
|
|
89
|
+
state.controls = [
|
|
90
|
+
animate(from.x, 0, {
|
|
91
|
+
...SPRING,
|
|
92
|
+
velocity: velocity.x,
|
|
93
|
+
onUpdate: (v) => ((state.x = v), paint())
|
|
94
|
+
}),
|
|
95
|
+
animate(from.y, 0, {
|
|
96
|
+
...SPRING,
|
|
97
|
+
velocity: velocity.y,
|
|
98
|
+
onUpdate: (v) => ((state.y = v), paint())
|
|
99
|
+
})
|
|
100
|
+
];
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const layoutOf = (el: HTMLElement) => ({ left: el.offsetLeft, top: el.offsetTop });
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Moves the item at `from` to `to`, then plays FLIP on the slots: each one is drawn at its old
|
|
107
|
+
* position and springs to its new one. The dragged slot is skipped; it stays under the pointer.
|
|
108
|
+
*/
|
|
109
|
+
function move(from: number, to: number) {
|
|
110
|
+
if (from === to || to < 0 || to >= items.length) return;
|
|
111
|
+
const before = new Map([...slots].map(([k, el]) => [k, layoutOf(el)]));
|
|
112
|
+
const next = [...items];
|
|
113
|
+
next.splice(to, 0, ...next.splice(from, 1));
|
|
114
|
+
items = next;
|
|
115
|
+
flushSync();
|
|
116
|
+
for (const [k, el] of slots) {
|
|
117
|
+
const was = before.get(k);
|
|
118
|
+
if (!was || k === draggedKey) continue;
|
|
119
|
+
const now = layoutOf(el);
|
|
120
|
+
const current = offsets.get(k) ?? { x: 0, y: 0 };
|
|
121
|
+
setOffset(k, current.x + was.left - now.left, current.y + was.top - now.top);
|
|
122
|
+
settle(k);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function announce(item: T, index: number) {
|
|
127
|
+
const name = itemLabel?.(item) ?? key(item);
|
|
128
|
+
announcement = `${name}, moved to ${index + 1} of ${items.length}`;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* The pointer drag in progress: where the dragged slot's layout box was when it started. */
|
|
132
|
+
let start = { left: 0, top: 0, width: 0, height: 0 };
|
|
133
|
+
let startOrder: string[] = [];
|
|
134
|
+
|
|
135
|
+
function dragSlot(k: string) {
|
|
136
|
+
return drag(() => ({
|
|
137
|
+
threshold: DRAG_THRESHOLD,
|
|
138
|
+
touchDelay: TOUCH_DELAY,
|
|
139
|
+
onStart: () => {
|
|
140
|
+
const el = slots.get(k)!;
|
|
141
|
+
const current = offsets.get(k) ?? { x: 0, y: 0 };
|
|
142
|
+
// Picked up mid-spring: carry on from where it's drawn, not from its slot.
|
|
143
|
+
start = {
|
|
144
|
+
left: el.offsetLeft + current.x,
|
|
145
|
+
top: el.offsetTop + current.y,
|
|
146
|
+
width: el.offsetWidth,
|
|
147
|
+
height: el.offsetHeight
|
|
148
|
+
};
|
|
149
|
+
startOrder = items.map(key);
|
|
150
|
+
draggedKey = k;
|
|
151
|
+
},
|
|
152
|
+
onMove: (offset) => {
|
|
153
|
+
const el = slots.get(k);
|
|
154
|
+
const group = el?.parentElement;
|
|
155
|
+
if (!el || !group) return;
|
|
156
|
+
// Where the chip is drawn, in the group's coordinates, rubber-banded inside it.
|
|
157
|
+
const maxLeft = group.clientWidth - start.width;
|
|
158
|
+
const maxTop = group.clientHeight - start.height;
|
|
159
|
+
const left = resist(start.left + offset.x, 0, Math.max(0, maxLeft), group.clientWidth);
|
|
160
|
+
const top = resist(start.top + offset.y, 0, Math.max(0, maxTop), group.clientHeight);
|
|
161
|
+
|
|
162
|
+
// Take the slot whose centre is nearest the chip's, its own included, so it only moves
|
|
163
|
+
// once another slot is closer than the one it has, and still reaches the ends when the
|
|
164
|
+
// pointer is past the last chip or between rows.
|
|
165
|
+
const cx = left + start.width / 2;
|
|
166
|
+
const cy = top + start.height / 2;
|
|
167
|
+
const from = items.findIndex((item) => key(item) === k);
|
|
168
|
+
let to = from;
|
|
169
|
+
let nearest = Infinity;
|
|
170
|
+
items.forEach((item, index) => {
|
|
171
|
+
const other = slots.get(key(item));
|
|
172
|
+
if (!other) return;
|
|
173
|
+
const distance = Math.hypot(
|
|
174
|
+
other.offsetLeft + other.offsetWidth / 2 - cx,
|
|
175
|
+
other.offsetTop + other.offsetHeight / 2 - cy
|
|
176
|
+
);
|
|
177
|
+
if (distance < nearest) {
|
|
178
|
+
nearest = distance;
|
|
179
|
+
to = index;
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
move(from, to);
|
|
183
|
+
|
|
184
|
+
setOffset(k, left - el.offsetLeft, top - el.offsetTop);
|
|
185
|
+
},
|
|
186
|
+
onEnd: (velocity) => {
|
|
187
|
+
settle(k, velocity);
|
|
188
|
+
draggedKey = null;
|
|
189
|
+
const order = items.map(key);
|
|
190
|
+
if (order.join('\n') === startOrder.join('\n')) return;
|
|
191
|
+
const index = order.indexOf(k);
|
|
192
|
+
announce(items[index], index);
|
|
193
|
+
onReorder?.(items);
|
|
194
|
+
}
|
|
195
|
+
}));
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function onKeydown(event: KeyboardEvent, k: string) {
|
|
199
|
+
if (!reorderable || !event.altKey) return;
|
|
200
|
+
const step = { ArrowLeft: -1, ArrowUp: -1, ArrowRight: 1, ArrowDown: 1 }[event.key];
|
|
201
|
+
if (!step) return;
|
|
202
|
+
event.preventDefault();
|
|
203
|
+
const from = items.findIndex((item) => key(item) === k);
|
|
204
|
+
const to = from + step;
|
|
205
|
+
if (to < 0 || to >= items.length) return;
|
|
206
|
+
const focused = document.activeElement as HTMLElement | null;
|
|
207
|
+
move(from, to);
|
|
208
|
+
// Moving a keyed node can drop its focus; put it back on the chip that moved.
|
|
209
|
+
if (focused && document.activeElement !== focused) focused.focus();
|
|
210
|
+
announce(items[to], to);
|
|
211
|
+
onReorder?.(items);
|
|
212
|
+
}
|
|
213
|
+
</script>
|
|
214
|
+
|
|
215
|
+
<div
|
|
216
|
+
role="list"
|
|
217
|
+
aria-label={ariaLabel}
|
|
218
|
+
aria-describedby={reorderable ? hintId : undefined}
|
|
219
|
+
class={styles.base({ class: clsx(className) })}
|
|
220
|
+
>
|
|
221
|
+
{#each items as item, index (key(item))}
|
|
222
|
+
{@const k = key(item)}
|
|
223
|
+
<!-- The keydown is delegated: Alt+Arrow arrives from the focused chip inside, which is the
|
|
224
|
+
interactive element. The slot itself is only a list item. -->
|
|
225
|
+
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
|
226
|
+
<div
|
|
227
|
+
role="listitem"
|
|
228
|
+
class={styles.item()}
|
|
229
|
+
data-dragged={draggedKey === k ? true : undefined}
|
|
230
|
+
onkeydown={(event) => onKeydown(event, k)}
|
|
231
|
+
{@attach register(k)}
|
|
232
|
+
{@attach reorderable && dragSlot(k)}
|
|
233
|
+
>
|
|
234
|
+
{@render chip(item, index)}
|
|
235
|
+
</div>
|
|
236
|
+
{/each}
|
|
237
|
+
</div>
|
|
238
|
+
|
|
239
|
+
{#if reorderable}
|
|
240
|
+
<span id={hintId} class={styles.hint()}>Drag, or press Alt and an arrow key, to reorder.</span>
|
|
241
|
+
<span class={styles.live()} aria-live="assertive">{announcement}</span>
|
|
242
|
+
{/if}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ChipGroupProps } from './types.js';
|
|
2
|
+
declare function $$render<T>(): {
|
|
3
|
+
props: ChipGroupProps<T>;
|
|
4
|
+
exports: {};
|
|
5
|
+
bindings: "items";
|
|
6
|
+
slots: {};
|
|
7
|
+
events: {};
|
|
8
|
+
};
|
|
9
|
+
declare class __sveltets_Render<T> {
|
|
10
|
+
props(): ReturnType<typeof $$render<T>>['props'];
|
|
11
|
+
events(): ReturnType<typeof $$render<T>>['events'];
|
|
12
|
+
slots(): ReturnType<typeof $$render<T>>['slots'];
|
|
13
|
+
bindings(): "items";
|
|
14
|
+
exports(): {};
|
|
15
|
+
}
|
|
16
|
+
interface $$IsomorphicComponent {
|
|
17
|
+
new <T>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
|
|
18
|
+
$$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
|
|
19
|
+
} & ReturnType<__sveltets_Render<T>['exports']>;
|
|
20
|
+
<T>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
|
|
21
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A set of chips, 8dp apart, wrapping onto new lines. With `reorderable`, people can reorder them:
|
|
25
|
+
* drag a chip (on touch, press and hold first) or focus one and press Alt+Arrow. The dragged chip
|
|
26
|
+
* takes M3's dragged state and follows the pointer; the others spring aside to make room, and it
|
|
27
|
+
* springs into its slot on release, carrying the pointer's speed.
|
|
28
|
+
*
|
|
29
|
+
* @see https://m3.material.io/components/chips/specs
|
|
30
|
+
*/
|
|
31
|
+
declare const ChipGroup: $$IsomorphicComponent;
|
|
32
|
+
type ChipGroup<T> = InstanceType<typeof ChipGroup<T>>;
|
|
33
|
+
export default ChipGroup;
|
|
@@ -2,77 +2,238 @@ import { type VariantProps } from '../../utils/tv.js';
|
|
|
2
2
|
export type ChipVariants = VariantProps<typeof chip>;
|
|
3
3
|
export declare const chip: import("tailwind-variants").TVReturnType<{
|
|
4
4
|
variant: {
|
|
5
|
-
assist:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
assist: {
|
|
6
|
+
base: string;
|
|
7
|
+
icon: string;
|
|
8
|
+
};
|
|
9
|
+
filter: {
|
|
10
|
+
base: string;
|
|
11
|
+
};
|
|
12
|
+
input: {
|
|
13
|
+
base: string;
|
|
14
|
+
};
|
|
15
|
+
suggestion: {
|
|
16
|
+
base: string;
|
|
17
|
+
icon: string;
|
|
18
|
+
};
|
|
9
19
|
};
|
|
10
20
|
elevated: {
|
|
11
|
-
true:
|
|
21
|
+
true: {
|
|
22
|
+
base: string;
|
|
23
|
+
};
|
|
12
24
|
false: "";
|
|
13
25
|
};
|
|
14
26
|
selected: {
|
|
15
|
-
true:
|
|
27
|
+
true: {
|
|
28
|
+
base: string;
|
|
29
|
+
};
|
|
30
|
+
false: "";
|
|
31
|
+
};
|
|
32
|
+
leading: {
|
|
33
|
+
none: "";
|
|
34
|
+
icon: {
|
|
35
|
+
base: string;
|
|
36
|
+
action: string;
|
|
37
|
+
};
|
|
38
|
+
avatar: {
|
|
39
|
+
base: string;
|
|
40
|
+
action: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
/** A trailing icon: the filter chip's `trailingIconProps`, or the input chip's remove button. */
|
|
44
|
+
trailing: {
|
|
45
|
+
true: {
|
|
46
|
+
base: string;
|
|
47
|
+
action: string;
|
|
48
|
+
};
|
|
16
49
|
false: "";
|
|
17
50
|
};
|
|
18
51
|
disabled: {
|
|
19
|
-
true:
|
|
52
|
+
true: {
|
|
53
|
+
base: string;
|
|
54
|
+
icon: string;
|
|
55
|
+
avatar: string;
|
|
56
|
+
trailing: string;
|
|
57
|
+
checkIcon: string;
|
|
58
|
+
};
|
|
20
59
|
false: "";
|
|
21
60
|
};
|
|
22
61
|
}, {
|
|
23
62
|
base: string;
|
|
24
63
|
icon: string;
|
|
64
|
+
avatar: string;
|
|
65
|
+
action: string;
|
|
25
66
|
label: string;
|
|
26
67
|
trailing: string;
|
|
27
68
|
checkIcon: string;
|
|
28
69
|
}, undefined, {
|
|
29
70
|
variant: {
|
|
30
|
-
assist:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
71
|
+
assist: {
|
|
72
|
+
base: string;
|
|
73
|
+
icon: string;
|
|
74
|
+
};
|
|
75
|
+
filter: {
|
|
76
|
+
base: string;
|
|
77
|
+
};
|
|
78
|
+
input: {
|
|
79
|
+
base: string;
|
|
80
|
+
};
|
|
81
|
+
suggestion: {
|
|
82
|
+
base: string;
|
|
83
|
+
icon: string;
|
|
84
|
+
};
|
|
34
85
|
};
|
|
35
86
|
elevated: {
|
|
36
|
-
true:
|
|
87
|
+
true: {
|
|
88
|
+
base: string;
|
|
89
|
+
};
|
|
37
90
|
false: "";
|
|
38
91
|
};
|
|
39
92
|
selected: {
|
|
40
|
-
true:
|
|
93
|
+
true: {
|
|
94
|
+
base: string;
|
|
95
|
+
};
|
|
96
|
+
false: "";
|
|
97
|
+
};
|
|
98
|
+
leading: {
|
|
99
|
+
none: "";
|
|
100
|
+
icon: {
|
|
101
|
+
base: string;
|
|
102
|
+
action: string;
|
|
103
|
+
};
|
|
104
|
+
avatar: {
|
|
105
|
+
base: string;
|
|
106
|
+
action: string;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
/** A trailing icon: the filter chip's `trailingIconProps`, or the input chip's remove button. */
|
|
110
|
+
trailing: {
|
|
111
|
+
true: {
|
|
112
|
+
base: string;
|
|
113
|
+
action: string;
|
|
114
|
+
};
|
|
41
115
|
false: "";
|
|
42
116
|
};
|
|
43
117
|
disabled: {
|
|
44
|
-
true:
|
|
118
|
+
true: {
|
|
119
|
+
base: string;
|
|
120
|
+
icon: string;
|
|
121
|
+
avatar: string;
|
|
122
|
+
trailing: string;
|
|
123
|
+
checkIcon: string;
|
|
124
|
+
};
|
|
45
125
|
false: "";
|
|
46
126
|
};
|
|
47
127
|
}, {
|
|
48
128
|
base: string;
|
|
49
129
|
icon: string;
|
|
130
|
+
avatar: string;
|
|
131
|
+
action: string;
|
|
50
132
|
label: string;
|
|
51
133
|
trailing: string;
|
|
52
134
|
checkIcon: string;
|
|
53
135
|
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
54
136
|
variant: {
|
|
55
|
-
assist:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
137
|
+
assist: {
|
|
138
|
+
base: string;
|
|
139
|
+
icon: string;
|
|
140
|
+
};
|
|
141
|
+
filter: {
|
|
142
|
+
base: string;
|
|
143
|
+
};
|
|
144
|
+
input: {
|
|
145
|
+
base: string;
|
|
146
|
+
};
|
|
147
|
+
suggestion: {
|
|
148
|
+
base: string;
|
|
149
|
+
icon: string;
|
|
150
|
+
};
|
|
59
151
|
};
|
|
60
152
|
elevated: {
|
|
61
|
-
true:
|
|
153
|
+
true: {
|
|
154
|
+
base: string;
|
|
155
|
+
};
|
|
62
156
|
false: "";
|
|
63
157
|
};
|
|
64
158
|
selected: {
|
|
65
|
-
true:
|
|
159
|
+
true: {
|
|
160
|
+
base: string;
|
|
161
|
+
};
|
|
162
|
+
false: "";
|
|
163
|
+
};
|
|
164
|
+
leading: {
|
|
165
|
+
none: "";
|
|
166
|
+
icon: {
|
|
167
|
+
base: string;
|
|
168
|
+
action: string;
|
|
169
|
+
};
|
|
170
|
+
avatar: {
|
|
171
|
+
base: string;
|
|
172
|
+
action: string;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
/** A trailing icon: the filter chip's `trailingIconProps`, or the input chip's remove button. */
|
|
176
|
+
trailing: {
|
|
177
|
+
true: {
|
|
178
|
+
base: string;
|
|
179
|
+
action: string;
|
|
180
|
+
};
|
|
66
181
|
false: "";
|
|
67
182
|
};
|
|
68
183
|
disabled: {
|
|
69
|
-
true:
|
|
184
|
+
true: {
|
|
185
|
+
base: string;
|
|
186
|
+
icon: string;
|
|
187
|
+
avatar: string;
|
|
188
|
+
trailing: string;
|
|
189
|
+
checkIcon: string;
|
|
190
|
+
};
|
|
70
191
|
false: "";
|
|
71
192
|
};
|
|
72
193
|
}, {
|
|
73
194
|
base: string;
|
|
74
195
|
icon: string;
|
|
196
|
+
avatar: string;
|
|
197
|
+
action: string;
|
|
75
198
|
label: string;
|
|
76
199
|
trailing: string;
|
|
77
200
|
checkIcon: string;
|
|
78
201
|
}>>;
|
|
202
|
+
/** Layout of a set of chips: 8dp apart, wrapping onto new lines. */
|
|
203
|
+
export declare const chipGroup: import("tailwind-variants").TVReturnType<{
|
|
204
|
+
reorderable: {
|
|
205
|
+
true: {
|
|
206
|
+
item: string;
|
|
207
|
+
};
|
|
208
|
+
false: "";
|
|
209
|
+
};
|
|
210
|
+
}, {
|
|
211
|
+
base: string;
|
|
212
|
+
item: string;
|
|
213
|
+
hint: string;
|
|
214
|
+
live: string;
|
|
215
|
+
}, undefined, {
|
|
216
|
+
reorderable: {
|
|
217
|
+
true: {
|
|
218
|
+
item: string;
|
|
219
|
+
};
|
|
220
|
+
false: "";
|
|
221
|
+
};
|
|
222
|
+
}, {
|
|
223
|
+
base: string;
|
|
224
|
+
item: string;
|
|
225
|
+
hint: string;
|
|
226
|
+
live: string;
|
|
227
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
228
|
+
reorderable: {
|
|
229
|
+
true: {
|
|
230
|
+
item: string;
|
|
231
|
+
};
|
|
232
|
+
false: "";
|
|
233
|
+
};
|
|
234
|
+
}, {
|
|
235
|
+
base: string;
|
|
236
|
+
item: string;
|
|
237
|
+
hint: string;
|
|
238
|
+
live: string;
|
|
239
|
+
}>>;
|