@dxos/react-ui-list 0.9.1-main.c7dcc2e112 → 0.10.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/lib/browser/index.mjs +628 -167
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +628 -167
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/aspects/useListDisclosure.d.ts +4 -4
- package/dist/types/src/aspects/useListDisclosure.d.ts.map +1 -1
- package/dist/types/src/aspects/useListNavigation.d.ts +9 -7
- package/dist/types/src/aspects/useListNavigation.d.ts.map +1 -1
- package/dist/types/src/aspects/useListSelection.d.ts +3 -3
- package/dist/types/src/aspects/useListSelection.d.ts.map +1 -1
- package/dist/types/src/components/Accordion/Accordion.d.ts +1 -1
- package/dist/types/src/components/Accordion/AccordionItem.d.ts +3 -1
- package/dist/types/src/components/Accordion/AccordionItem.d.ts.map +1 -1
- package/dist/types/src/components/Combobox/Combobox.d.ts +10 -3
- package/dist/types/src/components/Combobox/Combobox.d.ts.map +1 -1
- package/dist/types/src/components/DropIndicator/DropIndicator.d.ts +12 -0
- package/dist/types/src/components/DropIndicator/DropIndicator.d.ts.map +1 -0
- package/dist/types/src/components/DropIndicator/index.d.ts +2 -0
- package/dist/types/src/components/DropIndicator/index.d.ts.map +1 -0
- package/dist/types/src/components/Empty/Empty.d.ts +17 -0
- package/dist/types/src/components/Empty/Empty.d.ts.map +1 -0
- package/dist/types/src/components/Empty/Empty.stories.d.ts +18 -0
- package/dist/types/src/components/Empty/Empty.stories.d.ts.map +1 -0
- package/dist/types/src/components/Empty/index.d.ts +2 -0
- package/dist/types/src/components/Empty/index.d.ts.map +1 -0
- package/dist/types/src/components/List.theme.d.ts +193 -0
- package/dist/types/src/components/List.theme.d.ts.map +1 -0
- package/dist/types/src/components/Listbox/ListItemContent.d.ts +27 -0
- package/dist/types/src/components/Listbox/ListItemContent.d.ts.map +1 -0
- package/dist/types/src/components/Listbox/ListItemContent.stories.d.ts +24 -0
- package/dist/types/src/components/Listbox/ListItemContent.stories.d.ts.map +1 -0
- package/dist/types/src/components/Listbox/Listbox.d.ts +19 -2
- package/dist/types/src/components/Listbox/Listbox.d.ts.map +1 -1
- package/dist/types/src/components/Listbox/Listbox.stories.d.ts +4 -0
- package/dist/types/src/components/Listbox/Listbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/OrderedList/OrderedList.d.ts +1 -1
- package/dist/types/src/components/OrderedList/OrderedList.d.ts.map +1 -1
- package/dist/types/src/components/OrderedList/OrderedListItem.d.ts.map +1 -1
- package/dist/types/src/components/OrderedList/OrderedListRoot.d.ts +1 -1
- package/dist/types/src/components/OrderedList/OrderedListRoot.d.ts.map +1 -1
- package/dist/types/src/components/Picker/Picker.d.ts +12 -4
- package/dist/types/src/components/Picker/Picker.d.ts.map +1 -1
- package/dist/types/src/components/Picker/index.d.ts +1 -1
- package/dist/types/src/components/Picker/index.d.ts.map +1 -1
- package/dist/types/src/components/Tree/Tree.d.ts +1 -1
- package/dist/types/src/components/Tree/Tree.d.ts.map +1 -1
- package/dist/types/src/components/Tree/Tree.stories.d.ts +5 -2
- package/dist/types/src/components/Tree/Tree.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tree/TreeContext.d.ts +2 -0
- package/dist/types/src/components/Tree/TreeContext.d.ts.map +1 -1
- package/dist/types/src/components/Tree/TreeDropIndicator.d.ts +10 -0
- package/dist/types/src/components/Tree/TreeDropIndicator.d.ts.map +1 -0
- package/dist/types/src/components/Tree/TreeItem.d.ts.map +1 -1
- package/dist/types/src/components/Tree/testing.d.ts +4 -1
- package/dist/types/src/components/Tree/testing.d.ts.map +1 -1
- package/dist/types/src/components/Treegrid/Treegrid.d.ts +33 -0
- package/dist/types/src/components/Treegrid/Treegrid.d.ts.map +1 -0
- package/dist/types/src/components/Treegrid/Treegrid.stories.d.ts +11 -0
- package/dist/types/src/components/Treegrid/Treegrid.stories.d.ts.map +1 -0
- package/dist/types/src/components/Treegrid/Treegrid.theme.d.ts +37 -0
- package/dist/types/src/components/Treegrid/Treegrid.theme.d.ts.map +1 -0
- package/dist/types/src/components/Treegrid/index.d.ts +2 -0
- package/dist/types/src/components/Treegrid/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +3 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +23 -22
- package/src/aspects/useListDisclosure.ts +8 -8
- package/src/aspects/useListNavigation.ts +9 -7
- package/src/aspects/useListSelection.ts +4 -4
- package/src/components/Accordion/AccordionItem.tsx +31 -13
- package/src/components/Combobox/Combobox.tsx +46 -38
- package/src/components/DropIndicator/DropIndicator.tsx +74 -0
- package/src/components/DropIndicator/index.ts +5 -0
- package/src/components/Empty/Empty.stories.tsx +37 -0
- package/src/components/Empty/Empty.tsx +41 -0
- package/src/components/Empty/index.ts +5 -0
- package/src/components/List.theme.ts +99 -0
- package/src/components/Listbox/ListItemContent.stories.tsx +41 -0
- package/src/components/Listbox/ListItemContent.tsx +49 -0
- package/src/components/Listbox/Listbox.stories.tsx +106 -7
- package/src/components/Listbox/Listbox.tsx +85 -42
- package/src/components/OrderedList/OrderedList.tsx +1 -1
- package/src/components/OrderedList/OrderedListItem.tsx +13 -13
- package/src/components/OrderedList/OrderedListRoot.tsx +6 -3
- package/src/components/Picker/Picker.tsx +25 -15
- package/src/components/Picker/index.ts +1 -1
- package/src/components/Tree/Tree.stories.tsx +39 -15
- package/src/components/Tree/Tree.tsx +13 -3
- package/src/components/Tree/TreeContext.tsx +2 -0
- package/src/components/Tree/TreeDropIndicator.tsx +72 -0
- package/src/components/Tree/TreeItem.tsx +43 -3
- package/src/components/Tree/TreeItemHeading.tsx +2 -2
- package/src/components/Tree/testing.ts +19 -14
- package/src/components/Treegrid/Treegrid.stories.tsx +132 -0
- package/src/components/Treegrid/Treegrid.theme.ts +38 -0
- package/src/components/Treegrid/Treegrid.tsx +187 -0
- package/src/components/Treegrid/index.ts +5 -0
- package/src/components/index.ts +3 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/** react-ui-list theme: call `.styles()` to get per-slot class functions. */
|
|
2
|
+
export declare const listTheme: {
|
|
3
|
+
styles: import("tailwind-variants").TVReturnType<{
|
|
4
|
+
[key: string]: {
|
|
5
|
+
[key: string]: {
|
|
6
|
+
accordionBody?: import("tailwind-merge").ClassNameValue;
|
|
7
|
+
accordionBodyContent?: import("tailwind-merge").ClassNameValue;
|
|
8
|
+
accordionItem?: import("tailwind-merge").ClassNameValue;
|
|
9
|
+
accordionTrigger?: import("tailwind-merge").ClassNameValue;
|
|
10
|
+
accordionTriggerContent?: import("tailwind-merge").ClassNameValue;
|
|
11
|
+
accordionTriggerIcon?: import("tailwind-merge").ClassNameValue;
|
|
12
|
+
comboboxInput?: import("tailwind-merge").ClassNameValue;
|
|
13
|
+
comboboxItem?: import("tailwind-merge").ClassNameValue;
|
|
14
|
+
comboboxItemDescription?: import("tailwind-merge").ClassNameValue;
|
|
15
|
+
comboboxList?: import("tailwind-merge").ClassNameValue;
|
|
16
|
+
comboboxTriggerText?: import("tailwind-merge").ClassNameValue;
|
|
17
|
+
empty?: import("tailwind-merge").ClassNameValue;
|
|
18
|
+
itemContentDescription?: import("tailwind-merge").ClassNameValue;
|
|
19
|
+
itemContentIcon?: import("tailwind-merge").ClassNameValue;
|
|
20
|
+
itemContentRoot?: import("tailwind-merge").ClassNameValue;
|
|
21
|
+
itemContentTitle?: import("tailwind-merge").ClassNameValue;
|
|
22
|
+
listboxContent?: import("tailwind-merge").ClassNameValue;
|
|
23
|
+
listboxItem?: import("tailwind-merge").ClassNameValue;
|
|
24
|
+
listboxItemLabel?: import("tailwind-merge").ClassNameValue;
|
|
25
|
+
listboxViewport?: import("tailwind-merge").ClassNameValue;
|
|
26
|
+
orderedListContent?: import("tailwind-merge").ClassNameValue;
|
|
27
|
+
orderedListDetailColumn?: import("tailwind-merge").ClassNameValue;
|
|
28
|
+
orderedListDetailPanel?: import("tailwind-merge").ClassNameValue;
|
|
29
|
+
orderedListDetailTitleRow?: import("tailwind-merge").ClassNameValue;
|
|
30
|
+
orderedListItem?: import("tailwind-merge").ClassNameValue;
|
|
31
|
+
orderedListTitle?: import("tailwind-merge").ClassNameValue;
|
|
32
|
+
orderedListViewport?: import("tailwind-merge").ClassNameValue;
|
|
33
|
+
pickerItem?: import("tailwind-merge").ClassNameValue;
|
|
34
|
+
} | import("tailwind-merge").ClassNameValue;
|
|
35
|
+
};
|
|
36
|
+
} | {
|
|
37
|
+
[x: string]: {
|
|
38
|
+
[x: string]: {
|
|
39
|
+
accordionBody?: import("tailwind-merge").ClassNameValue;
|
|
40
|
+
accordionBodyContent?: import("tailwind-merge").ClassNameValue;
|
|
41
|
+
accordionItem?: import("tailwind-merge").ClassNameValue;
|
|
42
|
+
accordionTrigger?: import("tailwind-merge").ClassNameValue;
|
|
43
|
+
accordionTriggerContent?: import("tailwind-merge").ClassNameValue;
|
|
44
|
+
accordionTriggerIcon?: import("tailwind-merge").ClassNameValue;
|
|
45
|
+
comboboxInput?: import("tailwind-merge").ClassNameValue;
|
|
46
|
+
comboboxItem?: import("tailwind-merge").ClassNameValue;
|
|
47
|
+
comboboxItemDescription?: import("tailwind-merge").ClassNameValue;
|
|
48
|
+
comboboxList?: import("tailwind-merge").ClassNameValue;
|
|
49
|
+
comboboxTriggerText?: import("tailwind-merge").ClassNameValue;
|
|
50
|
+
empty?: import("tailwind-merge").ClassNameValue;
|
|
51
|
+
itemContentDescription?: import("tailwind-merge").ClassNameValue;
|
|
52
|
+
itemContentIcon?: import("tailwind-merge").ClassNameValue;
|
|
53
|
+
itemContentRoot?: import("tailwind-merge").ClassNameValue;
|
|
54
|
+
itemContentTitle?: import("tailwind-merge").ClassNameValue;
|
|
55
|
+
listboxContent?: import("tailwind-merge").ClassNameValue;
|
|
56
|
+
listboxItem?: import("tailwind-merge").ClassNameValue;
|
|
57
|
+
listboxItemLabel?: import("tailwind-merge").ClassNameValue;
|
|
58
|
+
listboxViewport?: import("tailwind-merge").ClassNameValue;
|
|
59
|
+
orderedListContent?: import("tailwind-merge").ClassNameValue;
|
|
60
|
+
orderedListDetailColumn?: import("tailwind-merge").ClassNameValue;
|
|
61
|
+
orderedListDetailPanel?: import("tailwind-merge").ClassNameValue;
|
|
62
|
+
orderedListDetailTitleRow?: import("tailwind-merge").ClassNameValue;
|
|
63
|
+
orderedListItem?: import("tailwind-merge").ClassNameValue;
|
|
64
|
+
orderedListTitle?: import("tailwind-merge").ClassNameValue;
|
|
65
|
+
orderedListViewport?: import("tailwind-merge").ClassNameValue;
|
|
66
|
+
pickerItem?: import("tailwind-merge").ClassNameValue;
|
|
67
|
+
} | import("tailwind-merge").ClassNameValue;
|
|
68
|
+
};
|
|
69
|
+
} | {}, {
|
|
70
|
+
accordionItem: string;
|
|
71
|
+
accordionTrigger: string;
|
|
72
|
+
accordionTriggerIcon: string;
|
|
73
|
+
accordionTriggerContent: string;
|
|
74
|
+
accordionBody: string;
|
|
75
|
+
accordionBodyContent: string;
|
|
76
|
+
listboxViewport: string;
|
|
77
|
+
listboxContent: string;
|
|
78
|
+
listboxItem: string;
|
|
79
|
+
listboxItemLabel: string;
|
|
80
|
+
orderedListViewport: string;
|
|
81
|
+
orderedListContent: string;
|
|
82
|
+
orderedListItem: string;
|
|
83
|
+
orderedListDetailColumn: string;
|
|
84
|
+
orderedListDetailTitleRow: string;
|
|
85
|
+
orderedListDetailPanel: string;
|
|
86
|
+
orderedListTitle: string;
|
|
87
|
+
pickerItem: string;
|
|
88
|
+
comboboxInput: string;
|
|
89
|
+
comboboxList: string;
|
|
90
|
+
comboboxTriggerText: string;
|
|
91
|
+
comboboxItem: string;
|
|
92
|
+
comboboxItemDescription: string;
|
|
93
|
+
itemContentRoot: string;
|
|
94
|
+
itemContentIcon: string;
|
|
95
|
+
itemContentTitle: string;
|
|
96
|
+
itemContentDescription: string;
|
|
97
|
+
empty: string;
|
|
98
|
+
}, undefined, {
|
|
99
|
+
[key: string]: {
|
|
100
|
+
[key: string]: {
|
|
101
|
+
accordionBody?: import("tailwind-merge").ClassNameValue;
|
|
102
|
+
accordionBodyContent?: import("tailwind-merge").ClassNameValue;
|
|
103
|
+
accordionItem?: import("tailwind-merge").ClassNameValue;
|
|
104
|
+
accordionTrigger?: import("tailwind-merge").ClassNameValue;
|
|
105
|
+
accordionTriggerContent?: import("tailwind-merge").ClassNameValue;
|
|
106
|
+
accordionTriggerIcon?: import("tailwind-merge").ClassNameValue;
|
|
107
|
+
comboboxInput?: import("tailwind-merge").ClassNameValue;
|
|
108
|
+
comboboxItem?: import("tailwind-merge").ClassNameValue;
|
|
109
|
+
comboboxItemDescription?: import("tailwind-merge").ClassNameValue;
|
|
110
|
+
comboboxList?: import("tailwind-merge").ClassNameValue;
|
|
111
|
+
comboboxTriggerText?: import("tailwind-merge").ClassNameValue;
|
|
112
|
+
empty?: import("tailwind-merge").ClassNameValue;
|
|
113
|
+
itemContentDescription?: import("tailwind-merge").ClassNameValue;
|
|
114
|
+
itemContentIcon?: import("tailwind-merge").ClassNameValue;
|
|
115
|
+
itemContentRoot?: import("tailwind-merge").ClassNameValue;
|
|
116
|
+
itemContentTitle?: import("tailwind-merge").ClassNameValue;
|
|
117
|
+
listboxContent?: import("tailwind-merge").ClassNameValue;
|
|
118
|
+
listboxItem?: import("tailwind-merge").ClassNameValue;
|
|
119
|
+
listboxItemLabel?: import("tailwind-merge").ClassNameValue;
|
|
120
|
+
listboxViewport?: import("tailwind-merge").ClassNameValue;
|
|
121
|
+
orderedListContent?: import("tailwind-merge").ClassNameValue;
|
|
122
|
+
orderedListDetailColumn?: import("tailwind-merge").ClassNameValue;
|
|
123
|
+
orderedListDetailPanel?: import("tailwind-merge").ClassNameValue;
|
|
124
|
+
orderedListDetailTitleRow?: import("tailwind-merge").ClassNameValue;
|
|
125
|
+
orderedListItem?: import("tailwind-merge").ClassNameValue;
|
|
126
|
+
orderedListTitle?: import("tailwind-merge").ClassNameValue;
|
|
127
|
+
orderedListViewport?: import("tailwind-merge").ClassNameValue;
|
|
128
|
+
pickerItem?: import("tailwind-merge").ClassNameValue;
|
|
129
|
+
} | import("tailwind-merge").ClassNameValue;
|
|
130
|
+
};
|
|
131
|
+
} | {}, {
|
|
132
|
+
accordionItem: string;
|
|
133
|
+
accordionTrigger: string;
|
|
134
|
+
accordionTriggerIcon: string;
|
|
135
|
+
accordionTriggerContent: string;
|
|
136
|
+
accordionBody: string;
|
|
137
|
+
accordionBodyContent: string;
|
|
138
|
+
listboxViewport: string;
|
|
139
|
+
listboxContent: string;
|
|
140
|
+
listboxItem: string;
|
|
141
|
+
listboxItemLabel: string;
|
|
142
|
+
orderedListViewport: string;
|
|
143
|
+
orderedListContent: string;
|
|
144
|
+
orderedListItem: string;
|
|
145
|
+
orderedListDetailColumn: string;
|
|
146
|
+
orderedListDetailTitleRow: string;
|
|
147
|
+
orderedListDetailPanel: string;
|
|
148
|
+
orderedListTitle: string;
|
|
149
|
+
pickerItem: string;
|
|
150
|
+
comboboxInput: string;
|
|
151
|
+
comboboxList: string;
|
|
152
|
+
comboboxTriggerText: string;
|
|
153
|
+
comboboxItem: string;
|
|
154
|
+
comboboxItemDescription: string;
|
|
155
|
+
itemContentRoot: string;
|
|
156
|
+
itemContentIcon: string;
|
|
157
|
+
itemContentTitle: string;
|
|
158
|
+
itemContentDescription: string;
|
|
159
|
+
empty: string;
|
|
160
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
161
|
+
accordionItem: string;
|
|
162
|
+
accordionTrigger: string;
|
|
163
|
+
accordionTriggerIcon: string;
|
|
164
|
+
accordionTriggerContent: string;
|
|
165
|
+
accordionBody: string;
|
|
166
|
+
accordionBodyContent: string;
|
|
167
|
+
listboxViewport: string;
|
|
168
|
+
listboxContent: string;
|
|
169
|
+
listboxItem: string;
|
|
170
|
+
listboxItemLabel: string;
|
|
171
|
+
orderedListViewport: string;
|
|
172
|
+
orderedListContent: string;
|
|
173
|
+
orderedListItem: string;
|
|
174
|
+
orderedListDetailColumn: string;
|
|
175
|
+
orderedListDetailTitleRow: string;
|
|
176
|
+
orderedListDetailPanel: string;
|
|
177
|
+
orderedListTitle: string;
|
|
178
|
+
pickerItem: string;
|
|
179
|
+
comboboxInput: string;
|
|
180
|
+
comboboxList: string;
|
|
181
|
+
comboboxTriggerText: string;
|
|
182
|
+
comboboxItem: string;
|
|
183
|
+
comboboxItemDescription: string;
|
|
184
|
+
itemContentRoot: string;
|
|
185
|
+
itemContentIcon: string;
|
|
186
|
+
itemContentTitle: string;
|
|
187
|
+
itemContentDescription: string;
|
|
188
|
+
empty: string;
|
|
189
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
190
|
+
};
|
|
191
|
+
/** Slot names of {@link listTheme.styles}, for `bridgeTv` registration. */
|
|
192
|
+
export declare const listSlots: Array<keyof ReturnType<typeof listTheme.styles>>;
|
|
193
|
+
//# sourceMappingURL=List.theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"List.theme.d.ts","sourceRoot":"","sources":["../../../../src/components/List.theme.ts"],"names":[],"mappings":"AA4FA,6EAA6E;AAC7E,eAAO,MAAM,SAAS;IACpB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACP,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,SAAS,EAAsC,KAAK,CAAC,MAAM,UAAU,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React, { type ReactElement, type ReactNode } from 'react';
|
|
2
|
+
import { type ThemedClassName } from '@dxos/react-ui';
|
|
3
|
+
export type ListItemContentProps = ThemedClassName<{
|
|
4
|
+
/**
|
|
5
|
+
* Leading icon: an icon name (rendered as a neutral size-5 `Icon`) or a custom `Icon` element
|
|
6
|
+
* carrying its own size/colour (e.g. `<Icon icon='…' classNames='text-success-text' />`).
|
|
7
|
+
*/
|
|
8
|
+
icon?: string | ReactElement;
|
|
9
|
+
/** Primary line. */
|
|
10
|
+
title: ReactNode;
|
|
11
|
+
/** Optional secondary line, aligned under the title in the content column. */
|
|
12
|
+
description?: ReactNode;
|
|
13
|
+
}>;
|
|
14
|
+
export declare const ListItemContent: React.ForwardRefExoticComponent<Omit<{
|
|
15
|
+
/**
|
|
16
|
+
* Leading icon: an icon name (rendered as a neutral size-5 `Icon`) or a custom `Icon` element
|
|
17
|
+
* carrying its own size/colour (e.g. `<Icon icon='…' classNames='text-success-text' />`).
|
|
18
|
+
*/
|
|
19
|
+
icon?: string | ReactElement;
|
|
20
|
+
/** Primary line. */
|
|
21
|
+
title: ReactNode;
|
|
22
|
+
/** Optional secondary line, aligned under the title in the content column. */
|
|
23
|
+
description?: ReactNode;
|
|
24
|
+
}, "className"> & {
|
|
25
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
26
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
//# sourceMappingURL=ListItemContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItemContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Listbox/ListItemContent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAE7E,OAAO,EAAQ,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAgB5D,MAAM,MAAM,oBAAoB,GAAG,eAAe,CAAC;IACjD;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAC7B,oBAAoB;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,CAAC,CAAC;AAEH,eAAO,MAAM,eAAe;IAX1B;;;OAGG;WACI,MAAM,GAAG,YAAY;IAC5B,oBAAoB;WACb,SAAS;IAChB,8EAA8E;kBAChE,SAAS;;;wCAexB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<Omit<{
|
|
6
|
+
icon?: string | React.ReactElement;
|
|
7
|
+
title: React.ReactNode;
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
}, "className"> & {
|
|
10
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
11
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
render: (args: Omit<{
|
|
13
|
+
icon?: string | React.ReactElement;
|
|
14
|
+
title: React.ReactNode;
|
|
15
|
+
description?: React.ReactNode;
|
|
16
|
+
}, "className"> & {
|
|
17
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
18
|
+
} & React.RefAttributes<HTMLDivElement>) => React.JSX.Element;
|
|
19
|
+
decorators: import("@storybook/react").Decorator[];
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
23
|
+
export declare const Default: Story;
|
|
24
|
+
//# sourceMappingURL=ListItemContent.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItemContent.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Listbox/ListItemContent.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;CAgB8B,CAAC;eAE1B,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import React, { type ComponentPropsWithRef, type FocusEvent, type MouseEvent, type PropsWithChildren } from 'react';
|
|
2
2
|
import { type IconProps, type ScrollAreaRootProps, type ThemedClassName } from '@dxos/react-ui';
|
|
3
|
+
import { type ListItemContentProps } from './ListItemContent';
|
|
3
4
|
type RootProps = PropsWithChildren<{
|
|
4
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Currently-selected option id (controlled). Supplying any of `value`/`defaultValue`/
|
|
7
|
+
* `onValueChange` makes the list selectable; omitting all three renders plain rows.
|
|
8
|
+
*/
|
|
5
9
|
value?: string;
|
|
6
10
|
/** Initial selected option for uncontrolled mode. */
|
|
7
11
|
defaultValue?: string;
|
|
@@ -36,6 +40,12 @@ type ItemProps = PropsWithChildren<{
|
|
|
36
40
|
onClick?: (event: MouseEvent<HTMLLIElement>) => void;
|
|
37
41
|
/** Optional focus handler in addition to selection-follows-focus. */
|
|
38
42
|
onFocus?: (event: FocusEvent<HTMLLIElement>) => void;
|
|
43
|
+
/**
|
|
44
|
+
* Optional pointer-down handler. Fires before focus (and therefore before selection-follows-focus
|
|
45
|
+
* mutates the value), so consumers can observe the pre-gesture selection — e.g. to implement
|
|
46
|
+
* click-to-toggle without the focus-then-click double count.
|
|
47
|
+
*/
|
|
48
|
+
onMouseDown?: (event: MouseEvent<HTMLLIElement>) => void;
|
|
39
49
|
}>;
|
|
40
50
|
type ItemLabelProps = ThemedClassName<ComponentPropsWithRef<'span'>>;
|
|
41
51
|
type IndicatorProps = Omit<IconProps, 'icon'> & Partial<Pick<IconProps, 'icon'>>;
|
|
@@ -60,8 +70,15 @@ declare const Listbox: {
|
|
|
60
70
|
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
61
71
|
} & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLLIElement>>;
|
|
62
72
|
ItemLabel: React.ForwardRefExoticComponent<Omit<ItemLabelProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
73
|
+
ItemContent: React.ForwardRefExoticComponent<Omit<{
|
|
74
|
+
icon?: string | React.ReactElement;
|
|
75
|
+
title: React.ReactNode;
|
|
76
|
+
description?: React.ReactNode;
|
|
77
|
+
}, "className"> & {
|
|
78
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
79
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
63
80
|
Indicator: React.ForwardRefExoticComponent<Omit<IndicatorProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
64
81
|
};
|
|
65
82
|
export { Listbox, useListboxSelection };
|
|
66
|
-
export type {
|
|
83
|
+
export type { ListItemContentProps as ItemContentProps, ContentProps as ListboxContentProps, IndicatorProps as ListboxIndicatorProps, ItemLabelProps as ListboxItemLabelProps, ItemProps as ListboxItemProps, RootProps as ListboxRootProps, ViewportProps as ListboxViewportProps, };
|
|
67
84
|
//# sourceMappingURL=Listbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Listbox.d.ts","sourceRoot":"","sources":["../../../../../src/components/Listbox/Listbox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Listbox.d.ts","sourceRoot":"","sources":["../../../../../src/components/Listbox/Listbox.tsx"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,EACZ,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EAEf,KAAK,UAAU,EACf,KAAK,iBAAiB,EAIvB,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,KAAK,SAAS,EAEd,KAAK,mBAAmB,EACxB,KAAK,eAAe,EAGrB,MAAM,gBAAgB,CAAC;AAUxB,OAAO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AI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;AAgBjF;;;;GAIG;AACH,QAAA,MAAM,mBAAmB,OAAQ,MAAM,KAAG,OAGzC,CAAC;AAMF,QAAA,MAAM,OAAO;;kFAjP0E,SAAS;;;;;;;;;;;;;;;;;;;;;CAyP/F,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAExC,YAAY,EACV,oBAAoB,IAAI,gBAAgB,EACxC,YAAY,IAAI,mBAAmB,EACnC,cAAc,IAAI,qBAAqB,EACvC,cAAc,IAAI,qBAAqB,EACvC,SAAS,IAAI,gBAAgB,EAC7B,SAAS,IAAI,gBAAgB,EAC7B,aAAa,IAAI,oBAAoB,GACtC,CAAC"}
|
|
@@ -33,4 +33,8 @@ export declare const WithDisabled: Story;
|
|
|
33
33
|
export declare const MasterDetail: Story;
|
|
34
34
|
export declare const WithToolbar: Story;
|
|
35
35
|
export declare const Popover: Story;
|
|
36
|
+
/** Non-selectable: opt-out of the selection model — plain styled rows (role=list/listitem). */
|
|
37
|
+
export declare const Plain: Story;
|
|
38
|
+
/** Items with icon + title + description and a per-row expand caret (disclosure aspect). */
|
|
39
|
+
export declare const Disclosure: Story;
|
|
36
40
|
//# sourceMappingURL=Listbox.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Listbox.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Listbox/Listbox.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Listbox.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Listbox/Listbox.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAYxC,KAAK,QAAQ,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC;AAYlE,KAAK,SAAS,GAAG;IACf,6DAA6D;IAC7D,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AA6MF,QAAA,MAAM,IAAI;;;;;QAKN,MAAM;;CAEiB,CAAC;eAEb,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;AAEjC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,IAAI,EAAE,KAMlB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAK1B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAE1B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAGrB,CAAC;AAEF,+FAA+F;AAC/F,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC;AAEF,4FAA4F;AAC5F,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC"}
|
|
@@ -45,5 +45,5 @@ export declare const OrderedList: {
|
|
|
45
45
|
}) => import("react").JSX.Element;
|
|
46
46
|
ExpandCaret: ({ onClick, ...props }: Partial<import("@dxos/react-ui").IconButtonProps>) => import("react").JSX.Element;
|
|
47
47
|
};
|
|
48
|
-
export type {
|
|
48
|
+
export type { OrderedListDetailItemProps, OrderedListItemProps, OrderedListRootProps, OrderedListViewportProps };
|
|
49
49
|
//# sourceMappingURL=OrderedList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderedList.d.ts","sourceRoot":"","sources":["../../../../../src/components/OrderedList/OrderedList.tsx"],"names":[],"mappings":"AAIA,OAAO,EAGL,KAAK,0BAA0B,EAK/B,KAAK,oBAAoB,EAE1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAGL,KAAK,oBAAoB,EAEzB,KAAK,wBAAwB,EAC9B,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,WAAW;IACtB,IAAI;IACJ,QAAQ;;;IACR,OAAO;IACP,IAAI;IACJ,UAAU;IACV,UAAU;IACV,KAAK;IACL,UAAU;;;IACV,YAAY;;;;IACZ,WAAW;CACZ,CAAC;AAEF,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"OrderedList.d.ts","sourceRoot":"","sources":["../../../../../src/components/OrderedList/OrderedList.tsx"],"names":[],"mappings":"AAIA,OAAO,EAGL,KAAK,0BAA0B,EAK/B,KAAK,oBAAoB,EAE1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAGL,KAAK,oBAAoB,EAEzB,KAAK,wBAAwB,EAC9B,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,WAAW;IACtB,IAAI;IACJ,QAAQ;;;IACR,OAAO;IACP,IAAI;IACJ,UAAU;IACV,UAAU;IACV,KAAK;IACL,UAAU;;;IACV,YAAY;;;;IACZ,WAAW;CACZ,CAAC;AAEF,YAAY,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderedListItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/OrderedList/OrderedListItem.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EACZ,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AAEf,OAAO,EAGL,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"OrderedListItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/OrderedList/OrderedListItem.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EACZ,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AAEf,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,eAAe,EAGrB,MAAM,gBAAgB,CAAC;AAMxB,OAAO,EAAE,KAAK,cAAc,EAAyB,MAAM,mBAAmB,CAAC;AAoB/E,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,cAAc,IAAI,eAAe,CAC1E,iBAAiB,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,4FAA4F;IAC5F,IAAI,EAAE,CAAC,CAAC;IACR,wDAAwD;IACxD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yDAAyD;IACzD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACtD,qGAAqG;IACrG,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC,CACH,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,cAAc,2EASrD,oBAAoB,CAAC,CAAC,CAAC,sBA8BzB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,yBAgBjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,gDAK1B,eAAe,CAAC,iBAAiB,CAAC,cAAc,CAAC,KAAK,CAAC,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xos/react-ui';
|
|
3
|
-
import { type ReorderActive, type ReorderListController, type
|
|
3
|
+
import { type ReorderActive, type ReorderListController, type UseListDisclosureReturn, type UseListNavigationReturn } from '../../aspects';
|
|
4
4
|
export type ListItemRecord = any;
|
|
5
5
|
type OrderedListContextValue<T extends ListItemRecord> = {
|
|
6
6
|
reorder: ReorderListController<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderedListRoot.d.ts","sourceRoot":"","sources":["../../../../../src/components/OrderedList/OrderedListRoot.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAE/E,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,eAAe,EAGrB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAK7B,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"OrderedListRoot.d.ts","sourceRoot":"","sources":["../../../../../src/components/OrderedList/OrderedListRoot.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAE/E,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,eAAe,EAGrB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAK7B,MAAM,eAAe,CAAC;AAKvB,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC;AAIjC,KAAK,uBAAuB,CAAC,CAAC,SAAS,cAAc,IAAI;IACvD,OAAO,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAClC,UAAU,EAAE,uBAAuB,CAAC;IACpC,UAAU,EAAE,uBAAuB,CAA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AM,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC;AAE3F,eAAO,MAAM,mBAAmB;;2HAiB9B,CAAC;AAIH,YAAY,EAAE,wBAAwB,EAAE,CAAC"}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import React, { type ComponentPropsWithRef, type PropsWithChildren, type ReactNode } from 'react';
|
|
2
2
|
import { type Density, type Elevation, type ThemedClassName } from '@dxos/react-ui';
|
|
3
|
-
type PickerRootProps = PropsWithChildren<{
|
|
4
|
-
|
|
3
|
+
type PickerRootProps = PropsWithChildren<{
|
|
4
|
+
/**
|
|
5
|
+
* When the item set changes, snap the highlight back to the first item (command-palette behavior),
|
|
6
|
+
* instead of only re-selecting when the current selection disappears. Use for type-to-filter lists so
|
|
7
|
+
* the top result stays highlighted as results update. Does not fire on keyboard navigation (which
|
|
8
|
+
* changes the selection, not the item set). Defaults to false.
|
|
9
|
+
*/
|
|
10
|
+
resetSelectionOnChange?: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
declare function PickerRoot({ children, resetSelectionOnChange }: PickerRootProps): React.JSX.Element;
|
|
5
13
|
declare namespace PickerRoot {
|
|
6
14
|
var displayName: string;
|
|
7
15
|
}
|
|
@@ -27,7 +35,7 @@ type PickerItemProps = ThemedClassName<{
|
|
|
27
35
|
}>;
|
|
28
36
|
export declare const Picker: {
|
|
29
37
|
Root: {
|
|
30
|
-
({ children }: PickerRootProps): React.JSX.Element;
|
|
38
|
+
({ children, resetSelectionOnChange }: PickerRootProps): React.JSX.Element;
|
|
31
39
|
displayName: string;
|
|
32
40
|
};
|
|
33
41
|
Input: React.ForwardRefExoticComponent<Omit<PickerInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -44,6 +52,6 @@ export declare const Picker: {
|
|
|
44
52
|
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
45
53
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
46
54
|
};
|
|
47
|
-
export type {
|
|
55
|
+
export type { PickerInputProps, PickerItemProps, PickerRootProps };
|
|
48
56
|
export { usePickerInputContext, usePickerItemContext } from './context';
|
|
49
57
|
//# sourceMappingURL=Picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Picker.d.ts","sourceRoot":"","sources":["../../../../../src/components/Picker/Picker.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,EAEZ,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"Picker.d.ts","sourceRoot":"","sources":["../../../../../src/components/Picker/Picker.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,EAEZ,KAAK,qBAAqB,EAG1B,KAAK,iBAAiB,EAEtB,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAS,KAAK,eAAe,EAAmB,MAAM,gBAAgB,CAAC;AAuB5G,KAAK,eAAe,GAAG,iBAAiB,CAAC;IACvC;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,CAAC,CAAC;4BAEiB,EAAE,QAAQ,EAAE,sBAA8B,EAAE,EAAE,eAAe;;;;AA2GjF,KAAK,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC;AAE1C,KAAK,gBAAgB,GAAG,eAAe,CACrC,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,GAAG;IAC9C,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,CACF,CAAC;AA+GF,KAAK,eAAe,GAAG,eAAe,CAAC;IACrC,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC,CAAC;AAsEH,eAAO,MAAM,MAAM;IACjB,IAAI;+CAtT4D,eAAe;;;IAuT/E,KAAK;IACL,IAAI;QAjFJ,uEAAuE;eAChE,MAAM;QACb,+EAA+E;mBACpE,MAAM,IAAI;QACrB,2FAA2F;mBAChF,OAAO;kBACR,OAAO;mBACN,SAAS;;;;CA2ErB,CAAC;AAEF,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC;AAEnE,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Picker, usePickerInputContext, usePickerItemContext } from './Picker';
|
|
2
|
-
export type {
|
|
2
|
+
export type { PickerInputProps, PickerItemProps, PickerRootProps } from './Picker';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Picker/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAC/E,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Picker/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAC/E,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type TreegridRootProps } from '
|
|
2
|
+
import { type TreegridRootProps } from '../Treegrid';
|
|
3
3
|
import { type TreeModel } from './TreeContext';
|
|
4
4
|
import { type TreeItemProps } from './TreeItem';
|
|
5
5
|
export type TreeProps<T extends {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tree.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tree/Tree.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tree.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tree/Tree.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAY,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,KAAK,SAAS,EAAgB,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAwC,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAEtF,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,GAAG,IAAI;IACtD,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;CACZ,GAAG,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,qBAAqB,GAAG,YAAY,CAAC,CAAC,GACxE,IAAI,CACF,aAAa,CAAC,CAAC,CAAC,EACd,WAAW,GACX,eAAe,GACf,kBAAkB,GAClB,SAAS,GACT,WAAW,GACX,cAAc,GACd,UAAU,GACV,aAAa,GACb,aAAa,CAChB,CAAC;AAYJ,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,GAAG,mLAgBhD,SAAS,CAAC,CAAC,CAAC,sBA0Bd,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
declare const DefaultStory: ({ draggable }: {
|
|
3
|
+
declare const DefaultStory: ({ draggable, groups }: {
|
|
4
4
|
draggable?: boolean;
|
|
5
|
+
groups?: boolean;
|
|
5
6
|
}) => React.JSX.Element;
|
|
6
7
|
declare const meta: {
|
|
7
8
|
title: string;
|
|
@@ -9,12 +10,14 @@ declare const meta: {
|
|
|
9
10
|
component: <T extends {
|
|
10
11
|
id: string;
|
|
11
12
|
} = any>({ classNames, model, rootId, path, id, draggable, gridTemplateColumns, levelOffset, renderColumns, blockInstruction, canDrop, canSelect, onOpenChange, onSelect, onItemHover, }: import("./Tree").TreeProps<T>) => React.JSX.Element;
|
|
12
|
-
render: ({ draggable }: {
|
|
13
|
+
render: ({ draggable, groups }: {
|
|
13
14
|
draggable?: boolean;
|
|
15
|
+
groups?: boolean;
|
|
14
16
|
}) => React.JSX.Element;
|
|
15
17
|
};
|
|
16
18
|
export default meta;
|
|
17
19
|
type Story = StoryObj<typeof DefaultStory>;
|
|
18
20
|
export declare const Default: Story;
|
|
19
21
|
export declare const Draggable: Story;
|
|
22
|
+
export declare const WithGroups: Story;
|
|
20
23
|
//# sourceMappingURL=Tree.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tree.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tree/Tree.stories.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAA8D,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Tree.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tree/Tree.stories.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAA8D,MAAM,OAAO,CAAC;AAkBnF,QAAA,MAAM,YAAY,0BAA2B;IAAE,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,sBAyLrF,CAAC;AAEF,QAAA,MAAM,IAAI;;;;;;oCA3LmC;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE;CAiM/C,CAAC;eAEzB,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3C,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC"}
|
|
@@ -4,6 +4,8 @@ export type TreeItemDataProps = {
|
|
|
4
4
|
id: string;
|
|
5
5
|
label: Label;
|
|
6
6
|
parentOf?: string[];
|
|
7
|
+
/** Pass-through of the node's disposition; the tree uses this to branch render mode (e.g. `'group'` → section header). */
|
|
8
|
+
disposition?: string;
|
|
7
9
|
/** When `false`, the item cannot be dragged (overrides tree-level `draggable`). */
|
|
8
10
|
draggable?: boolean;
|
|
9
11
|
/** When `false`, the item does not participate as a drop target. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tree/TreeContext.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAIpD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,mFAAmF;IACnF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oEAAoE;IACpE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACn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AQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;CACtD;AAID,eAAO,MAAM,YAAY,iDAAuB,CAAC;AAEjD,eAAO,MAAM,OAAO,sBAA6E,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Instruction } from '@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
/** Props for {@link TreeDropIndicator}. */
|
|
4
|
+
export type TreeDropIndicatorProps = {
|
|
5
|
+
instruction: Instruction;
|
|
6
|
+
gap?: number;
|
|
7
|
+
};
|
|
8
|
+
/** Themed drop indicator for a tree-item pragmatic-dnd `Instruction` (sibling reorder / make-child). */
|
|
9
|
+
export declare const TreeDropIndicator: ({ instruction, gap }: TreeDropIndicatorProps) => React.JSX.Element | null;
|
|
10
|
+
//# sourceMappingURL=TreeDropIndicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreeDropIndicator.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tree/TreeDropIndicator.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,KAAkD,MAAM,OAAO,CAAC;AAkCvE,2CAA2C;AAC3C,MAAM,MAAM,sBAAsB,GAAG;IACnC,WAAW,EAAE,WAAW,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,wGAAwG;AACxG,eAAO,MAAM,iBAAiB,yBAA8B,sBAAsB,6BAyBjF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tree/TreeItem.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,WAAW,EAIjB,MAAM,oDAAoD,CAAC;AAI5D,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAC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Schema.Struct<{
|
|
@@ -13,7 +14,9 @@ export declare const TestItemSchema: Schema.Struct<{
|
|
|
13
14
|
icon: Schema.optional<typeof Schema.String>;
|
|
14
15
|
items: Schema.mutable<Schema.Array$<Schema.suspend<TestItem, TestItem, never>>>;
|
|
15
16
|
}>;
|
|
16
|
-
export declare const createTree: (n?: number, d?: number
|
|
17
|
+
export declare const createTree: (n?: number, d?: number, { groups }?: {
|
|
18
|
+
groups?: boolean;
|
|
19
|
+
}) => TestItem;
|
|
17
20
|
export declare const updateState: ({ state, instruction, source, target, }: {
|
|
18
21
|
state: TestItem;
|
|
19
22
|
instruction: Instruction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tree/testing.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAMxC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;EAKzB,CAAC;AAEH,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tree/testing.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAMxC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;EAKzB,CAAC;AAEH,eAAO,MAAM,UAAU,wCAAsC;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,KAAQ,QAiBxF,CAAC;AAmBF,eAAO,MAAM,WAAW,4CAKrB;IACD,KAAK,EAAE,QAAQ,CAAC;IAChB,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,QAAQ,CAAC;IACjB,MAAM,EAAE,QAAQ,CAAC;CAClB,SAgCA,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type Scope } from '@radix-ui/react-context';
|
|
2
|
+
import { Primitive } from '@radix-ui/react-primitive';
|
|
3
|
+
import React, { type ComponentPropsWithRef, type CSSProperties } from 'react';
|
|
4
|
+
import { type ThemedClassName } from '@dxos/react-ui';
|
|
5
|
+
type TreegridRowScopedProps<P> = P & {
|
|
6
|
+
__treegridRowScope?: Scope;
|
|
7
|
+
};
|
|
8
|
+
export declare const TREEGRID_PATH_SEPARATOR = "~";
|
|
9
|
+
export declare const TREEGRID_PARENT_OF_SEPARATOR = " ";
|
|
10
|
+
type TreegridRootProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {
|
|
11
|
+
gridTemplateColumns?: CSSProperties['gridTemplateColumns'];
|
|
12
|
+
asChild?: boolean;
|
|
13
|
+
};
|
|
14
|
+
type TreegridRowProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {
|
|
15
|
+
id: string;
|
|
16
|
+
asChild?: boolean;
|
|
17
|
+
parentOf?: string;
|
|
18
|
+
defaultOpen?: boolean;
|
|
19
|
+
open?: boolean;
|
|
20
|
+
onOpenChange?(open: boolean): void;
|
|
21
|
+
};
|
|
22
|
+
type TreegridCellProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {
|
|
23
|
+
indent?: boolean;
|
|
24
|
+
};
|
|
25
|
+
export type { TreegridRootProps, TreegridRowProps };
|
|
26
|
+
export declare const Treegrid: {
|
|
27
|
+
Root: React.ForwardRefExoticComponent<Omit<TreegridRootProps, "className"> & {
|
|
28
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
29
|
+
} & Pick<React.HTMLAttributes<Element>, "children" | "className" | "role" | "style"> & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
Row: React.ForwardRefExoticComponent<Omit<TreegridRowScopedProps<TreegridRowProps>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
Cell: React.ForwardRefExoticComponent<Omit<TreegridCellProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=Treegrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Treegrid.d.ts","sourceRoot":"","sources":["../../../../../src/components/Treegrid/Treegrid.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,KAAK,EAAsB,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,OAAO,KAAK,EAAE,EACZ,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAInB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,eAAe,EAA+B,MAAM,gBAAgB,CAAC;AAWnF,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,kBAAkB,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAapE,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAEhD,KAAK,iBAAiB,GAAG,eAAe,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG;IACtF,mBAAmB,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAqEF,KAAK,gBAAgB,GAAG,eAAe,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG;IACrF,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;CACpC,CAAC;AA6CF,KAAK,iBAAiB,GAAG,eAAe,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAY7G,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;AAEpD,eAAO,MAAM,QAAQ;IACnB,IAAI;;;IACJ,GAAG;IACH,IAAI;CACL,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
render: () => React.JSX.Element;
|
|
6
|
+
decorators: import("@storybook/react").Decorator[];
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof meta>;
|
|
10
|
+
export declare const Default: Story;
|
|
11
|
+
//# sourceMappingURL=Treegrid.stories.d.ts.map
|