@dxos/react-ui-list 0.8.4-main.cb12b3f963 → 0.8.4-main.d05539e30a
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/LICENSE +102 -5
- package/dist/lib/browser/index.mjs +10 -17
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +10 -17
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/Accordion/AccordionItem.d.ts.map +1 -1
- package/dist/types/src/components/List/ListItem.d.ts.map +1 -1
- package/dist/types/src/components/Picker/Picker.d.ts.map +1 -1
- package/dist/types/src/components/RowList/RowList.d.ts.map +1 -1
- package/dist/types/src/components/Tree/Tree.d.ts +1 -1
- package/dist/types/src/components/Tree/Tree.stories.d.ts +1 -1
- package/dist/types/src/components/Tree/TreeItem.d.ts.map +1 -1
- package/dist/types/src/components/Tree/TreeItemHeading.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +17 -17
- package/src/components/Accordion/AccordionItem.tsx +1 -3
- package/src/components/List/List.stories.tsx +2 -2
- package/src/components/List/ListItem.tsx +2 -4
- package/src/components/Picker/Picker.tsx +21 -92
- package/src/components/RowList/RowList.stories.tsx +1 -1
- package/src/components/RowList/RowList.tsx +3 -6
- package/src/components/Tree/Tree.tsx +1 -1
- package/src/components/Tree/TreeItem.tsx +2 -6
- package/src/components/Tree/TreeItemHeading.tsx +3 -1
package/LICENSE
CHANGED
|
@@ -1,8 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c) 2022 DXOS
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
## Abbreviation
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
FSL-1.1-Apache-2.0
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 DXOS
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
|
@@ -55,7 +55,6 @@ var AccordionItemBody = ({ children, classNames }) => {
|
|
|
55
55
|
return /* @__PURE__ */ React2.createElement(AccordionPrimitive2.Content, {
|
|
56
56
|
className: "overflow-hidden data-[state=closed]:animate-slide-up data-[state=open]:animate-slide-down"
|
|
57
57
|
}, /* @__PURE__ */ React2.createElement("div", {
|
|
58
|
-
role: "none",
|
|
59
58
|
className: mx2("p-2", classNames)
|
|
60
59
|
}, children));
|
|
61
60
|
};
|
|
@@ -324,10 +323,7 @@ var PickerItem = /* @__PURE__ */ forwardRef(({ classNames, value, onSelect, disa
|
|
|
324
323
|
"data-selected": isSelected,
|
|
325
324
|
"data-disabled": disabled,
|
|
326
325
|
"data-value": value,
|
|
327
|
-
//
|
|
328
|
-
// input; the selected option is highlighted via `aria-selected`,
|
|
329
|
-
// not via DOM focus. Differs from `Row` (listbox pattern,
|
|
330
|
-
// tabIndex={0}). See header comment.
|
|
326
|
+
// Browser focus stays on the input; highlight is via `aria-selected`.
|
|
331
327
|
tabIndex: -1,
|
|
332
328
|
className: mx3("dx-hover dx-selected px-[var(--gutter,0.75rem)] py-1 cursor-pointer select-none", disabled && "opacity-50 cursor-not-allowed", classNames),
|
|
333
329
|
onMouseDown: handleMouseDown,
|
|
@@ -771,11 +767,9 @@ var ListItemDragPreview = ({ children }) => {
|
|
|
771
767
|
}), state.container) : null;
|
|
772
768
|
};
|
|
773
769
|
var ListItemWrapper = ({ classNames, children }) => /* @__PURE__ */ React6.createElement("div", {
|
|
774
|
-
role: "none",
|
|
775
770
|
className: mx5("flex w-full gap-2", classNames)
|
|
776
771
|
}, children);
|
|
777
772
|
var ListItemTitle = ({ classNames, children, ...props }) => /* @__PURE__ */ React6.createElement("div", {
|
|
778
|
-
role: "none",
|
|
779
773
|
className: mx5("flex grow items-center truncate", classNames),
|
|
780
774
|
...props
|
|
781
775
|
}, children);
|
|
@@ -835,15 +829,14 @@ var Root2 = ({ selectedId, defaultSelectedId, onSelectChange, children }) => {
|
|
|
835
829
|
Root2.displayName = ROW_LIST_ROOT_NAME;
|
|
836
830
|
var Viewport = composable2((props, forwardedRef) => {
|
|
837
831
|
const { thin, padding, centered, children, ...rest } = props;
|
|
838
|
-
const composed = composableProps2(rest, {
|
|
839
|
-
classNames: "dx-container"
|
|
840
|
-
});
|
|
841
832
|
return /* @__PURE__ */ React7.createElement(ScrollArea2.Root, {
|
|
842
|
-
|
|
833
|
+
...composableProps2(rest, {
|
|
834
|
+
classNames: "dx-container"
|
|
835
|
+
}),
|
|
843
836
|
thin,
|
|
844
837
|
padding,
|
|
845
838
|
centered,
|
|
846
|
-
|
|
839
|
+
orientation: "vertical",
|
|
847
840
|
ref: forwardedRef
|
|
848
841
|
}, /* @__PURE__ */ React7.createElement(ScrollArea2.Viewport, null, children));
|
|
849
842
|
});
|
|
@@ -883,7 +876,7 @@ var Content2 = composable2((props, forwardedRef) => {
|
|
|
883
876
|
}, children);
|
|
884
877
|
});
|
|
885
878
|
Content2.displayName = ROW_LIST_CONTENT_NAME;
|
|
886
|
-
var ROW_BASE = "dx-hover dx-selected px-3 py-2 cursor-pointer outline-none
|
|
879
|
+
var ROW_BASE = "dx-hover dx-selected px-3 py-2 cursor-pointer outline-none";
|
|
887
880
|
var Row = composable2((props, forwardedRef) => {
|
|
888
881
|
const { id, disabled, onClick, onFocus, children, ...rest } = props;
|
|
889
882
|
const { selectedId, setSelected } = useRowListContext(ROW_NAME, void 0);
|
|
@@ -1085,10 +1078,11 @@ var TreeItemHeading = /* @__PURE__ */ memo(/* @__PURE__ */ forwardRef4(({ label,
|
|
|
1085
1078
|
"aria-current": "location"
|
|
1086
1079
|
}
|
|
1087
1080
|
}, icon && /* @__PURE__ */ React9.createElement(Icon4, {
|
|
1081
|
+
size: 5,
|
|
1088
1082
|
icon: icon ?? "ph--placeholder--regular",
|
|
1089
1083
|
classNames: [
|
|
1090
1084
|
"my-1",
|
|
1091
|
-
styles?.
|
|
1085
|
+
styles?.foreground
|
|
1092
1086
|
]
|
|
1093
1087
|
}), /* @__PURE__ */ React9.createElement("span", {
|
|
1094
1088
|
className: "flex-1 w-0 truncate text-start font-normal",
|
|
@@ -1380,12 +1374,11 @@ var RawTreeItem = ({ item, path: pathProp, levelOffset = 2, last, draggable: dra
|
|
|
1380
1374
|
// without alerting the user (except for in the correct link element). See also:
|
|
1381
1375
|
// https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current#description
|
|
1382
1376
|
"aria-current": current ? "" : void 0,
|
|
1383
|
-
classNames: mx7("grid grid-cols-subgrid col-[tree-row] mt-0.5 is-current:bg-
|
|
1377
|
+
classNames: mx7("grid grid-cols-subgrid col-[tree-row] mt-0.5 is-current:bg-current-surface", hoverableControls, hoverableFocusedKeyboardControls, hoverableFocusedWithinControls, hoverableDescriptionIcons, ghostFocusWithin, ghostHover, className),
|
|
1384
1378
|
onKeyDown: handleKeyDown,
|
|
1385
1379
|
onMouseEnter: handleItemHover,
|
|
1386
1380
|
onContextMenu: handleContextMenu
|
|
1387
1381
|
}, /* @__PURE__ */ React11.createElement("div", {
|
|
1388
|
-
role: "none",
|
|
1389
1382
|
className: "indent relative grid grid-cols-subgrid col-[tree-row]",
|
|
1390
1383
|
style: paddingIndentation(level)
|
|
1391
1384
|
}, /* @__PURE__ */ React11.createElement(Treegrid.Cell, {
|
|
@@ -1435,7 +1428,7 @@ var RawTreeItemById = ({ id, ...props }) => {
|
|
|
1435
1428
|
var TreeItemById = /* @__PURE__ */ memo3(RawTreeItemById);
|
|
1436
1429
|
|
|
1437
1430
|
// src/components/Tree/Tree.tsx
|
|
1438
|
-
var Tree = ({ model, rootId, path, id, draggable: draggable3 = false, gridTemplateColumns = "[tree-row-start] 1fr min-content [tree-row-end]",
|
|
1431
|
+
var Tree = ({ classNames, model, rootId, path, id, draggable: draggable3 = false, gridTemplateColumns = "[tree-row-start] 1fr min-content [tree-row-end]", levelOffset, renderColumns, blockInstruction, canDrop, canSelect, onOpenChange, onSelect, onItemHover }) => {
|
|
1439
1432
|
const childIds = useAtomValue2(model.childIds(rootId));
|
|
1440
1433
|
const treePath = useMemo3(() => path ? [
|
|
1441
1434
|
...path,
|