@salt-ds/core 1.62.0 → 1.64.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/CHANGELOG.md +36 -0
- package/css/salt-core.css +168 -5
- package/dist-cjs/banner/Banner.js +8 -1
- package/dist-cjs/banner/Banner.js.map +1 -1
- package/dist-cjs/drawer/Drawer.js +3 -1
- package/dist-cjs/drawer/Drawer.js.map +1 -1
- package/dist-cjs/file-drop-zone/FileDropZoneTrigger.js.map +1 -1
- package/dist-cjs/index.js +8 -0
- package/dist-cjs/index.js.map +1 -1
- package/dist-cjs/link/Link.css.js +1 -1
- package/dist-cjs/tree/Tree.css.js +6 -0
- package/dist-cjs/tree/Tree.css.js.map +1 -0
- package/dist-cjs/tree/Tree.js +308 -0
- package/dist-cjs/tree/Tree.js.map +1 -0
- package/dist-cjs/tree/TreeContext.js +37 -0
- package/dist-cjs/tree/TreeContext.js.map +1 -0
- package/dist-cjs/tree/TreeNode.css.js +6 -0
- package/dist-cjs/tree/TreeNode.css.js.map +1 -0
- package/dist-cjs/tree/TreeNode.js +109 -0
- package/dist-cjs/tree/TreeNode.js.map +1 -0
- package/dist-cjs/tree/TreeNodeExpansionIcon.css.js +6 -0
- package/dist-cjs/tree/TreeNodeExpansionIcon.css.js.map +1 -0
- package/dist-cjs/tree/TreeNodeExpansionIcon.js +67 -0
- package/dist-cjs/tree/TreeNodeExpansionIcon.js.map +1 -0
- package/dist-cjs/tree/TreeNodeLabel.css.js +6 -0
- package/dist-cjs/tree/TreeNodeLabel.css.js.map +1 -0
- package/dist-cjs/tree/TreeNodeLabel.js +30 -0
- package/dist-cjs/tree/TreeNodeLabel.js.map +1 -0
- package/dist-cjs/tree/TreeNodeTrigger.css.js +6 -0
- package/dist-cjs/tree/TreeNodeTrigger.css.js.map +1 -0
- package/dist-cjs/tree/TreeNodeTrigger.js +161 -0
- package/dist-cjs/tree/TreeNodeTrigger.js.map +1 -0
- package/dist-cjs/tree/treeModel.js +61 -0
- package/dist-cjs/tree/treeModel.js.map +1 -0
- package/dist-cjs/tree/useTree.js +343 -0
- package/dist-cjs/tree/useTree.js.map +1 -0
- package/dist-es/banner/Banner.js +8 -1
- package/dist-es/banner/Banner.js.map +1 -1
- package/dist-es/drawer/Drawer.js +3 -1
- package/dist-es/drawer/Drawer.js.map +1 -1
- package/dist-es/file-drop-zone/FileDropZoneTrigger.js.map +1 -1
- package/dist-es/index.js +4 -0
- package/dist-es/index.js.map +1 -1
- package/dist-es/link/Link.css.js +1 -1
- package/dist-es/tree/Tree.css.js +4 -0
- package/dist-es/tree/Tree.css.js.map +1 -0
- package/dist-es/tree/Tree.js +306 -0
- package/dist-es/tree/Tree.js.map +1 -0
- package/dist-es/tree/TreeContext.js +32 -0
- package/dist-es/tree/TreeContext.js.map +1 -0
- package/dist-es/tree/TreeNode.css.js +4 -0
- package/dist-es/tree/TreeNode.css.js.map +1 -0
- package/dist-es/tree/TreeNode.js +107 -0
- package/dist-es/tree/TreeNode.js.map +1 -0
- package/dist-es/tree/TreeNodeExpansionIcon.css.js +4 -0
- package/dist-es/tree/TreeNodeExpansionIcon.css.js.map +1 -0
- package/dist-es/tree/TreeNodeExpansionIcon.js +65 -0
- package/dist-es/tree/TreeNodeExpansionIcon.js.map +1 -0
- package/dist-es/tree/TreeNodeLabel.css.js +4 -0
- package/dist-es/tree/TreeNodeLabel.css.js.map +1 -0
- package/dist-es/tree/TreeNodeLabel.js +28 -0
- package/dist-es/tree/TreeNodeLabel.js.map +1 -0
- package/dist-es/tree/TreeNodeTrigger.css.js +4 -0
- package/dist-es/tree/TreeNodeTrigger.css.js.map +1 -0
- package/dist-es/tree/TreeNodeTrigger.js +159 -0
- package/dist-es/tree/TreeNodeTrigger.js.map +1 -0
- package/dist-es/tree/treeModel.js +57 -0
- package/dist-es/tree/treeModel.js.map +1 -0
- package/dist-es/tree/useTree.js +341 -0
- package/dist-es/tree/useTree.js.map +1 -0
- package/dist-types/drawer/Drawer.d.ts +6 -0
- package/dist-types/file-drop-zone/FileDropZoneTrigger.d.ts +14 -2
- package/dist-types/index.d.ts +1 -0
- package/dist-types/tree/Tree.d.ts +36 -0
- package/dist-types/tree/TreeContext.d.ts +77 -0
- package/dist-types/tree/TreeNode.d.ts +25 -0
- package/dist-types/tree/TreeNodeExpansionIcon.d.ts +4 -0
- package/dist-types/tree/TreeNodeLabel.d.ts +4 -0
- package/dist-types/tree/TreeNodeTrigger.d.ts +8 -0
- package/dist-types/tree/index.d.ts +4 -0
- package/dist-types/tree/treeModel.d.ts +24 -0
- package/dist-types/tree/useTree.d.ts +68 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# @salt-ds/core
|
|
2
2
|
|
|
3
|
+
## 1.64.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 52daa64: Added an `initialFocus` prop to `Drawer` to allow customizing which element receives focus when the drawer opens.
|
|
8
|
+
- ed2779c: Added `appearance` and `sentiment` props to `FileDropZoneTrigger`. `sentiment` accepts `'accented' | 'neutral'` (defaults to `'neutral'`) and `appearance` accepts `'solid' | 'bordered' | 'transparent'` (defaults to `'solid'`).
|
|
9
|
+
|
|
10
|
+
```tsx
|
|
11
|
+
<FileDropZoneTrigger appearance="bordered" sentiment="accented" />
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Also widened the props type so all native `<button>` attributes (e.g. `type`, `name`, `form`, `value`) are now accepted.
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 9729a10: Fixed the status indicator in Banner being visible to screen readers.
|
|
19
|
+
- 07e4d5d: Fixed an issue where the visually hidden "Opens in a new tab" text on `Link` (when `target="_blank"`) was included when users selected and copied the link's contents.
|
|
20
|
+
|
|
21
|
+
## 1.63.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- fcf295b: Added `Tree`, `TreeNode`, `TreeNodeTrigger`, and `TreeNodeLabel`.
|
|
26
|
+
|
|
27
|
+
`Tree` displays hierarchical data as an expandable and collapsible structure. Users can navigate nested items and optionally select one or more nodes.
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
<Tree aria-label="File browser" defaultExpanded={["documents"]}>
|
|
31
|
+
<TreeNode value="documents" label="Documents">
|
|
32
|
+
<TreeNode value="reports" label="Reports">
|
|
33
|
+
<TreeNode value="annual-report" label="Annual Report" />
|
|
34
|
+
</TreeNode>
|
|
35
|
+
</TreeNode>
|
|
36
|
+
</Tree>
|
|
37
|
+
```
|
|
38
|
+
|
|
3
39
|
## 1.62.0
|
|
4
40
|
|
|
5
41
|
### Minor Changes
|
package/css/salt-core.css
CHANGED
|
@@ -2104,14 +2104,18 @@ a:focus .saltCard-interactable.saltCard-disabled {
|
|
|
2104
2104
|
text-decoration: var(--link-textDecoration-focus);
|
|
2105
2105
|
}
|
|
2106
2106
|
.saltLink-externalLinkADA {
|
|
2107
|
-
display: block;
|
|
2108
2107
|
position: absolute;
|
|
2109
2108
|
width: 1px;
|
|
2110
2109
|
height: 1px;
|
|
2110
|
+
padding: 0;
|
|
2111
|
+
margin: -1px;
|
|
2111
2112
|
overflow: hidden;
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2113
|
+
clip: rect(0, 0, 0, 0);
|
|
2114
|
+
clip-path: inset(50%);
|
|
2115
|
+
white-space: nowrap;
|
|
2116
|
+
border: 0;
|
|
2117
|
+
user-select: none;
|
|
2118
|
+
-webkit-user-select: none;
|
|
2115
2119
|
}
|
|
2116
2120
|
|
|
2117
2121
|
/* src/link-card/LinkCard.css */
|
|
@@ -5558,6 +5562,165 @@ label.saltText small,
|
|
|
5558
5562
|
--tooltip-status-borderColor: var(--salt-status-success-borderColor);
|
|
5559
5563
|
}
|
|
5560
5564
|
|
|
5565
|
+
/* src/tree/Tree.css */
|
|
5566
|
+
.saltTree {
|
|
5567
|
+
display: flex;
|
|
5568
|
+
flex-direction: column;
|
|
5569
|
+
gap: var(--salt-spacing-fixed-100);
|
|
5570
|
+
list-style: none;
|
|
5571
|
+
margin: 0;
|
|
5572
|
+
padding: 0;
|
|
5573
|
+
outline: none;
|
|
5574
|
+
width: 100%;
|
|
5575
|
+
box-sizing: border-box;
|
|
5576
|
+
}
|
|
5577
|
+
.saltTree-disabled {
|
|
5578
|
+
cursor: var(--salt-cursor-disabled);
|
|
5579
|
+
}
|
|
5580
|
+
|
|
5581
|
+
/* src/tree/TreeNode.css */
|
|
5582
|
+
.saltTreeNode {
|
|
5583
|
+
list-style: none;
|
|
5584
|
+
position: relative;
|
|
5585
|
+
cursor: var(--salt-cursor-hover);
|
|
5586
|
+
}
|
|
5587
|
+
.saltTreeNode:focus {
|
|
5588
|
+
outline: none;
|
|
5589
|
+
}
|
|
5590
|
+
.saltTreeNode:focus-visible > .saltTreeNodeTrigger,
|
|
5591
|
+
.saltTreeNode-focusVisible > .saltTreeNodeTrigger {
|
|
5592
|
+
outline: var(--salt-focused-outline);
|
|
5593
|
+
outline-offset: calc(var(--salt-size-fixed-100) * -2);
|
|
5594
|
+
position: relative;
|
|
5595
|
+
z-index: calc(var(--salt-zIndex-default) + 1);
|
|
5596
|
+
}
|
|
5597
|
+
.saltTreeNode-selected:focus-visible > .saltTreeNodeTrigger,
|
|
5598
|
+
.saltTreeNode-selected.saltTreeNode-focusVisible > .saltTreeNodeTrigger {
|
|
5599
|
+
outline: var(--salt-focused-outline);
|
|
5600
|
+
outline-offset: calc(var(--salt-size-fixed-100) * -2);
|
|
5601
|
+
z-index: calc(var(--salt-zIndex-default) + 1);
|
|
5602
|
+
}
|
|
5603
|
+
.saltTreeNode-group {
|
|
5604
|
+
display: flex;
|
|
5605
|
+
flex-direction: column;
|
|
5606
|
+
gap: var(--salt-spacing-fixed-100);
|
|
5607
|
+
list-style: none;
|
|
5608
|
+
margin: 0;
|
|
5609
|
+
padding: 0;
|
|
5610
|
+
padding-top: var(--salt-spacing-fixed-100);
|
|
5611
|
+
}
|
|
5612
|
+
.saltTreeNode-checkbox {
|
|
5613
|
+
flex-shrink: 0;
|
|
5614
|
+
height: var(--salt-size-selectable);
|
|
5615
|
+
}
|
|
5616
|
+
.saltTreeNode-icon {
|
|
5617
|
+
display: flex;
|
|
5618
|
+
align-items: center;
|
|
5619
|
+
justify-content: center;
|
|
5620
|
+
width: var(--saltTreeNodeTrigger-iconSize);
|
|
5621
|
+
min-width: var(--saltTreeNodeTrigger-iconSize);
|
|
5622
|
+
height: var(--saltTreeNodeTrigger-iconSize);
|
|
5623
|
+
flex-shrink: 0;
|
|
5624
|
+
}
|
|
5625
|
+
.saltTreeNode-icon > * {
|
|
5626
|
+
color: var(--salt-content-primary-foreground);
|
|
5627
|
+
}
|
|
5628
|
+
|
|
5629
|
+
/* src/tree/TreeNodeExpansionIcon.css */
|
|
5630
|
+
.saltTreeNodeExpansionIcon {
|
|
5631
|
+
display: flex;
|
|
5632
|
+
align-items: center;
|
|
5633
|
+
justify-content: center;
|
|
5634
|
+
width: var(--saltTreeNodeTrigger-iconSize);
|
|
5635
|
+
min-width: var(--saltTreeNodeTrigger-iconSize);
|
|
5636
|
+
height: var(--saltTreeNodeTrigger-iconSize);
|
|
5637
|
+
flex-shrink: 0;
|
|
5638
|
+
position: relative;
|
|
5639
|
+
}
|
|
5640
|
+
.saltTreeNodeExpansionIcon-icon {
|
|
5641
|
+
color: var(--salt-content-primary-foreground);
|
|
5642
|
+
}
|
|
5643
|
+
.saltTreeNodeExpansionIcon::before {
|
|
5644
|
+
content: "";
|
|
5645
|
+
display: block;
|
|
5646
|
+
position: absolute;
|
|
5647
|
+
width: var(--salt-size-base);
|
|
5648
|
+
height: var(--salt-size-base);
|
|
5649
|
+
top: 50%;
|
|
5650
|
+
left: 50%;
|
|
5651
|
+
transform: translate(-50%, -50%);
|
|
5652
|
+
}
|
|
5653
|
+
|
|
5654
|
+
/* src/tree/TreeNodeLabel.css */
|
|
5655
|
+
.saltTreeNodeLabel {
|
|
5656
|
+
flex: 1;
|
|
5657
|
+
font-family: var(--salt-text-fontFamily);
|
|
5658
|
+
font-size: var(--salt-text-fontSize);
|
|
5659
|
+
font-weight: var(--salt-text-fontWeight);
|
|
5660
|
+
line-height: var(--salt-text-lineHeight);
|
|
5661
|
+
letter-spacing: var(--salt-text-letterSpacing);
|
|
5662
|
+
word-break: break-word;
|
|
5663
|
+
}
|
|
5664
|
+
|
|
5665
|
+
/* src/tree/TreeNodeTrigger.css */
|
|
5666
|
+
.saltTreeNodeTrigger {
|
|
5667
|
+
box-sizing: border-box;
|
|
5668
|
+
display: flex;
|
|
5669
|
+
align-items: flex-start;
|
|
5670
|
+
gap: var(--salt-spacing-100);
|
|
5671
|
+
width: 100%;
|
|
5672
|
+
padding-top: calc(var(--salt-spacing-75) + var(--salt-spacing-50));
|
|
5673
|
+
padding-bottom: calc(var(--salt-spacing-75) + var(--salt-spacing-50));
|
|
5674
|
+
padding-right: var(--salt-spacing-100);
|
|
5675
|
+
--saltTreeNodeTrigger-iconSize: max(var(--salt-size-icon), 12px);
|
|
5676
|
+
--saltTreeNodeTrigger-indentStep: calc(var(--saltTreeNodeTrigger-iconSize) + var(--salt-spacing-100));
|
|
5677
|
+
--saltTreeNodeTrigger-iconOffsetY: calc((var(--salt-text-lineHeight) - var(--saltTreeNodeTrigger-iconSize)) / 2);
|
|
5678
|
+
--saltTreeNodeTrigger-checkboxOffsetY: calc((var(--salt-text-lineHeight) - var(--salt-size-selectable)) / 2);
|
|
5679
|
+
padding-left: calc(var(--salt-spacing-100) + (var(--saltTreeNodeTrigger-indentStep) * (var(--saltTreeNode-level, 1) - 1)));
|
|
5680
|
+
background: var(--salt-selectable-background);
|
|
5681
|
+
color: var(--salt-content-primary-foreground);
|
|
5682
|
+
}
|
|
5683
|
+
.saltTree-multiselect .saltTreeNodeTrigger {
|
|
5684
|
+
--saltTreeNodeTrigger-indentStep: calc(((var(--saltTreeNodeTrigger-iconSize) + var(--salt-size-selectable)) / 2) + var(--salt-spacing-100));
|
|
5685
|
+
}
|
|
5686
|
+
.saltTreeNodeTrigger:hover {
|
|
5687
|
+
background: var(--salt-selectable-background-hover);
|
|
5688
|
+
}
|
|
5689
|
+
.saltTreeNode:focus-visible > .saltTreeNodeTrigger,
|
|
5690
|
+
.saltTreeNode-focusVisible > .saltTreeNodeTrigger {
|
|
5691
|
+
background: var(--salt-selectable-background-hover);
|
|
5692
|
+
}
|
|
5693
|
+
.saltTreeNode-selected > .saltTreeNodeTrigger {
|
|
5694
|
+
background: var(--salt-selectable-background-selected);
|
|
5695
|
+
box-shadow: 0 calc(var(--salt-size-fixed-100) * -1) 0 0 var(--salt-selectable-borderColor-selected), 0 var(--salt-size-fixed-100) 0 0 var(--salt-selectable-borderColor-selected);
|
|
5696
|
+
position: relative;
|
|
5697
|
+
z-index: var(--salt-zIndex-default);
|
|
5698
|
+
}
|
|
5699
|
+
.saltTreeNode-selected:focus-visible > .saltTreeNodeTrigger,
|
|
5700
|
+
.saltTreeNode-selected.saltTreeNode-focusVisible > .saltTreeNodeTrigger {
|
|
5701
|
+
background: var(--salt-selectable-background-selected);
|
|
5702
|
+
}
|
|
5703
|
+
.saltTreeNode-disabled > .saltTreeNodeTrigger,
|
|
5704
|
+
.saltTreeNode-disabled:hover > .saltTreeNodeTrigger {
|
|
5705
|
+
opacity: 0.4;
|
|
5706
|
+
cursor: var(--salt-cursor-disabled);
|
|
5707
|
+
background: var(--salt-selectable-background);
|
|
5708
|
+
color: var(--salt-content-primary-foreground);
|
|
5709
|
+
}
|
|
5710
|
+
.saltTreeNodeTrigger > .saltTreeNode-checkbox {
|
|
5711
|
+
margin-top: var(--saltTreeNodeTrigger-checkboxOffsetY);
|
|
5712
|
+
margin-bottom: 0;
|
|
5713
|
+
}
|
|
5714
|
+
.saltTreeNodeTrigger > .saltTreeNodeExpansionIcon,
|
|
5715
|
+
.saltTreeNodeTrigger > .saltTreeNode-icon {
|
|
5716
|
+
margin-top: var(--saltTreeNodeTrigger-iconOffsetY);
|
|
5717
|
+
}
|
|
5718
|
+
.saltTreeNodeTrigger > .saltIcon {
|
|
5719
|
+
margin-top: var(--saltTreeNodeTrigger-iconOffsetY);
|
|
5720
|
+
flex-shrink: 0;
|
|
5721
|
+
color: var(--salt-content-primary-foreground);
|
|
5722
|
+
}
|
|
5723
|
+
|
|
5561
5724
|
/* src/vertical-navigation/VerticalNavigation.css */
|
|
5562
5725
|
.saltVerticalNavigation ol {
|
|
5563
5726
|
display: flex;
|
|
@@ -6329,4 +6492,4 @@ label.saltText small,
|
|
|
6329
6492
|
box-shadow: 0 calc(var(--salt-size-fixed-100) * -1) 0 0 var(--salt-selectable-borderColor-selected), 0 var(--salt-size-fixed-100) 0 0 var(--salt-selectable-borderColor-selected);
|
|
6330
6493
|
}
|
|
6331
6494
|
|
|
6332
|
-
/* src/
|
|
6495
|
+
/* src/ef89478e-0a7b-4958-80fa-e9325cc9dfb2.css */
|
|
@@ -33,7 +33,14 @@ const Banner = React.forwardRef(function Banner2({ children, className, variant
|
|
|
33
33
|
ref,
|
|
34
34
|
...rest,
|
|
35
35
|
children: [
|
|
36
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
37
|
+
StatusIndicator.StatusIndicator,
|
|
38
|
+
{
|
|
39
|
+
"aria-hidden": true,
|
|
40
|
+
status,
|
|
41
|
+
className: withBaseName("icon")
|
|
42
|
+
}
|
|
43
|
+
),
|
|
37
44
|
children
|
|
38
45
|
]
|
|
39
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.js","sources":["../src/banner/Banner.tsx"],"sourcesContent":["import { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { clsx } from \"clsx\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { StatusIndicator, type ValidationStatus } from \"../status-indicator\";\nimport { makePrefixer } from \"../utils\";\n\nimport bannerCss from \"./Banner.css\";\n\nexport interface BannerProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Emphasize the styling by applying a background color: defaults to false\n */\n variant?: \"primary\" | \"secondary\";\n /**\n * A string to determine the current state of the Banner\n */\n status?: ValidationStatus;\n}\n\nconst withBaseName = makePrefixer(\"saltBanner\");\n\nexport const Banner = forwardRef<HTMLDivElement, BannerProps>(function Banner(\n { children, className, variant = \"primary\", status = \"info\", ...rest },\n ref,\n) {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"salt-banner\",\n css: bannerCss,\n window: targetWindow,\n });\n\n return (\n <div\n className={clsx(\n withBaseName(),\n withBaseName(status),\n withBaseName(variant),\n className,\n )}\n ref={ref}\n {...rest}\n >\n <StatusIndicator
|
|
1
|
+
{"version":3,"file":"Banner.js","sources":["../src/banner/Banner.tsx"],"sourcesContent":["import { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { clsx } from \"clsx\";\nimport { forwardRef, type HTMLAttributes } from \"react\";\nimport { StatusIndicator, type ValidationStatus } from \"../status-indicator\";\nimport { makePrefixer } from \"../utils\";\n\nimport bannerCss from \"./Banner.css\";\n\nexport interface BannerProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Emphasize the styling by applying a background color: defaults to false\n */\n variant?: \"primary\" | \"secondary\";\n /**\n * A string to determine the current state of the Banner\n */\n status?: ValidationStatus;\n}\n\nconst withBaseName = makePrefixer(\"saltBanner\");\n\nexport const Banner = forwardRef<HTMLDivElement, BannerProps>(function Banner(\n { children, className, variant = \"primary\", status = \"info\", ...rest },\n ref,\n) {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"salt-banner\",\n css: bannerCss,\n window: targetWindow,\n });\n\n return (\n <div\n className={clsx(\n withBaseName(),\n withBaseName(status),\n withBaseName(variant),\n className,\n )}\n ref={ref}\n {...rest}\n >\n <StatusIndicator\n aria-hidden\n status={status}\n className={withBaseName(\"icon\")}\n />\n {children}\n </div>\n );\n});\n"],"names":["makePrefixer","forwardRef","Banner","useWindow","useComponentCssInjection","bannerCss","jsxs","clsx","jsx","StatusIndicator"],"mappings":";;;;;;;;;;;;;;;AAoBA,MAAM,YAAA,GAAeA,0BAAa,YAAY,CAAA;AAEvC,MAAM,MAAA,GAASC,gBAAA,CAAwC,SAASC,OAAAA,CACrE,EAAE,QAAA,EAAU,SAAA,EAAW,OAAA,GAAU,SAAA,EAAW,MAAA,GAAS,MAAA,EAAQ,GAAG,IAAA,IAChE,GAAA,EACA;AACA,EAAA,MAAM,eAAeC,gBAAA,EAAU;AAC/B,EAAAC,+BAAA,CAAyB;AAAA,IACvB,MAAA,EAAQ,aAAA;AAAA,IACR,GAAA,EAAKC,QAAA;AAAA,IACL,MAAA,EAAQ;AAAA,GACT,CAAA;AAED,EAAA,uBACEC,eAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAWC,SAAA;AAAA,QACT,YAAA,EAAa;AAAA,QACb,aAAa,MAAM,CAAA;AAAA,QACnB,aAAa,OAAO,CAAA;AAAA,QACpB;AAAA,OACF;AAAA,MACA,GAAA;AAAA,MACC,GAAG,IAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAAC,cAAA;AAAA,UAACC,+BAAA;AAAA,UAAA;AAAA,YACC,aAAA,EAAW,IAAA;AAAA,YACX,MAAA;AAAA,YACA,SAAA,EAAW,aAAa,MAAM;AAAA;AAAA,SAChC;AAAA,QACC;AAAA;AAAA;AAAA,GACH;AAEJ,CAAC;;;;"}
|
|
@@ -41,6 +41,7 @@ const Drawer = React.forwardRef(
|
|
|
41
41
|
variant = "primary",
|
|
42
42
|
disableDismiss,
|
|
43
43
|
disableScrim,
|
|
44
|
+
initialFocus,
|
|
44
45
|
...rest
|
|
45
46
|
} = props;
|
|
46
47
|
const targetWindow = window.useWindow();
|
|
@@ -81,7 +82,8 @@ const Drawer = React.forwardRef(
|
|
|
81
82
|
height: (_b = elements.floating) == null ? void 0 : _b.offsetHeight,
|
|
82
83
|
"aria-modal": "true",
|
|
83
84
|
focusManagerProps: {
|
|
84
|
-
context
|
|
85
|
+
context,
|
|
86
|
+
initialFocus
|
|
85
87
|
},
|
|
86
88
|
className: clsx.clsx(
|
|
87
89
|
withBaseName(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sources":["../src/drawer/Drawer.tsx"],"sourcesContent":["import { useClick
|
|
1
|
+
{"version":3,"file":"Drawer.js","sources":["../src/drawer/Drawer.tsx"],"sourcesContent":["import {\n type FloatingFocusManager,\n useClick,\n useDismiss,\n useInteractions,\n} from \"@floating-ui/react\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { clsx } from \"clsx\";\nimport {\n type ComponentPropsWithoutRef,\n forwardRef,\n type PropsWithChildren,\n useEffect,\n useState,\n} from \"react\";\nimport { Scrim } from \"../scrim\";\nimport {\n makePrefixer,\n useFloatingComponent,\n useFloatingUI,\n useForkRef,\n} from \"../utils\";\nimport drawerCss from \"./Drawer.css\";\n\ninterface ConditionalScrimWrapperProps extends PropsWithChildren {\n condition: boolean;\n}\n\nconst ConditionalScrimWrapper = ({\n condition,\n children,\n}: ConditionalScrimWrapperProps) => {\n return condition ? <Scrim fixed> {children} </Scrim> : <>{children} </>;\n};\n\nexport interface DrawerProps extends ComponentPropsWithoutRef<\"div\"> {\n /**\n * Defines the drawer position within the screen. Defaults to `left`.\n */\n position?: \"left\" | \"top\" | \"right\" | \"bottom\";\n /**\n * Display or hide the component.\n */\n open?: boolean;\n /**\n * Callback function triggered when open state changes.\n */\n onOpenChange?: (newOpen: boolean) => void;\n /**\n * Change background color palette\n */\n variant?: \"primary\" | \"secondary\" | \"tertiary\";\n /**\n * Prevent the dialog closing on click away\n * */\n disableDismiss?: boolean;\n /**\n * Prevent Scrim from rendering\n * */\n disableScrim?: boolean;\n /**\n * Which element to initially focus. Can be either a number (tabbable index as specified by the order) or a ref.\n * Default value is 0 (first tabbable element).\n * */\n initialFocus?: ComponentPropsWithoutRef<\n typeof FloatingFocusManager\n >[\"initialFocus\"];\n}\n\nconst withBaseName = makePrefixer(\"saltDrawer\");\n\nexport const Drawer = forwardRef<HTMLDivElement, DrawerProps>(\n function Drawer(props, ref) {\n const {\n children,\n className,\n position = \"left\",\n open = false,\n onOpenChange,\n variant = \"primary\",\n disableDismiss,\n disableScrim,\n initialFocus,\n ...rest\n } = props;\n\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"salt-drawer\",\n css: drawerCss,\n window: targetWindow,\n });\n\n const [showComponent, setShowComponent] = useState(false);\n const { Component: FloatingComponent } = useFloatingComponent();\n\n const { context, floating, elements } = useFloatingUI({\n open: showComponent,\n onOpenChange,\n });\n\n const { getFloatingProps } = useInteractions([\n useClick(context),\n useDismiss(context, { enabled: !disableDismiss }),\n ]);\n\n const handleRef = useForkRef<HTMLDivElement>(floating, ref);\n\n useEffect(() => {\n if (open && !showComponent) {\n setShowComponent(true);\n }\n\n if (!open && showComponent) {\n const animate = setTimeout(() => {\n setShowComponent(false);\n }, 300); // var(--salt-duration-perceptible)\n return () => clearTimeout(animate);\n }\n }, [open, showComponent]);\n\n return (\n <ConditionalScrimWrapper condition={showComponent && !disableScrim}>\n <FloatingComponent\n open={showComponent}\n ref={handleRef}\n role={\"dialog\"}\n width={elements.floating?.offsetWidth}\n height={elements.floating?.offsetHeight}\n aria-modal=\"true\"\n focusManagerProps={{\n context: context,\n initialFocus,\n }}\n className={clsx(\n withBaseName(),\n withBaseName(position),\n {\n [withBaseName(\"enterAnimation\")]: open,\n [withBaseName(\"exitAnimation\")]: !open,\n [withBaseName(variant)]: variant,\n },\n className,\n )}\n {...getFloatingProps()}\n {...rest}\n >\n {children}\n </FloatingComponent>\n </ConditionalScrimWrapper>\n );\n },\n);\n"],"names":["jsxs","Scrim","Fragment","makePrefixer","forwardRef","Drawer","useWindow","useComponentCssInjection","drawerCss","useState","useFloatingComponent","useFloatingUI","useInteractions","use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AAAA,UACA;AAAA,SACF;AAAA,QACA,SAAA,EAAWC,SAAA;AAAA,UACT,YAAA,EAAa;AAAA,UACb,aAAa,QAAQ,CAAA;AAAA,UACrB;AAAA,YACE,CAAC,YAAA,CAAa,gBAAgB,CAAC,GAAG,IAAA;AAAA,YAClC,CAAC,YAAA,CAAa,eAAe,CAAC,GAAG,CAAC,IAAA;AAAA,YAClC,CAAC,YAAA,CAAa,OAAO,CAAC,GAAG;AAAA,WAC3B;AAAA,UACA;AAAA,SACF;AAAA,QACC,GAAG,gBAAA,EAAiB;AAAA,QACpB,GAAG,IAAA;AAAA,QAEH;AAAA;AAAA,KACH,EACF,CAAA;AAAA,EAEJ;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileDropZoneTrigger.js","sources":["../src/file-drop-zone/FileDropZoneTrigger.tsx"],"sourcesContent":["import {\n type ChangeEvent,\n type
|
|
1
|
+
{"version":3,"file":"FileDropZoneTrigger.js","sources":["../src/file-drop-zone/FileDropZoneTrigger.tsx"],"sourcesContent":["import {\n type ChangeEvent,\n type ComponentPropsWithoutRef,\n type FocusEvent,\n forwardRef,\n type SyntheticEvent,\n useRef,\n} from \"react\";\nimport { Button, type ButtonProps } from \"../button\";\nimport { useForkRef } from \"../utils\";\n\nexport interface FileDropZoneTriggerProps\n extends Omit<ComponentPropsWithoutRef<\"button\">, \"onChange\"> {\n /**\n * `accept` attribute for HTML <input>.\n *\n * A comma separated list of file types the user can pick from the file input dialog box.\n */\n accept?: string;\n /**\n * Disable all trigger elements.\n */\n disabled?: boolean;\n /**\n * Allows multiple files to be uploaded.\n */\n multiple?: boolean;\n /**\n * Callback for input change event\n */\n onChange?: (event: ChangeEvent<HTMLInputElement>, files: File[]) => void;\n /**\n * The appearance of the button. Options are 'solid', 'bordered', and 'transparent'.\n * 'solid' is the default value.\n */\n appearance?: ButtonProps[\"appearance\"];\n /**\n * The sentiment of the button. Options are 'accented' and 'neutral'.\n * 'neutral' is the default value.\n *\n */\n sentiment?: Extract<ButtonProps[\"sentiment\"], \"accented\" | \"neutral\">;\n}\n\nexport const FileDropZoneTrigger = forwardRef<\n HTMLButtonElement,\n FileDropZoneTriggerProps\n>(function FileDropZoneTrigger(\n { accept, children, disabled, multiple = false, onChange, ...rest },\n ref,\n) {\n const buttonRef = useRef<HTMLButtonElement>(null);\n const fileInputRef = useRef<HTMLInputElement>(null);\n const triggerRef = useForkRef(ref, buttonRef);\n\n // As an ADA requirement when dialog is closed and the focus is returned to the input, we need to\n // move focus back on the button element so that all labels can be announced correctly\n const handleFocus = (event: FocusEvent<HTMLInputElement>) => {\n event.stopPropagation();\n buttonRef.current?.focus();\n };\n\n const handleClick = (event: SyntheticEvent<HTMLButtonElement>) => {\n event.stopPropagation();\n fileInputRef.current?.click();\n };\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n const files = Array.from((event.target as HTMLInputElement).files ?? []);\n // Allow selecting the same file multiple times - #3591\n // User would still be able to put back the value in onChange, if necessary\n event.target.value = \"\";\n onChange?.(event, files);\n };\n return (\n <>\n <Button\n onClick={handleClick}\n disabled={disabled}\n ref={triggerRef}\n {...rest}\n >\n {children ?? \"Browse files\"}\n </Button>\n <input\n accept={accept}\n style={{ display: \"none\" }}\n disabled={disabled}\n multiple={multiple}\n onChange={handleChange}\n onFocus={handleFocus}\n ref={fileInputRef}\n type=\"file\"\n />\n </>\n );\n});\n"],"names":["forwardRef","FileDropZoneTrigger","useRef","useForkRef","jsxs","Fragment","jsx","Button"],"mappings":";;;;;;;;;;;;AA4CO,MAAM,mBAAA,GAAsBA,gBAAA,CAGjC,SAASC,oBAAAA,CACT,EAAE,MAAA,EAAQ,QAAA,EAAU,QAAA,EAAU,QAAA,GAAW,KAAA,EAAO,QAAA,EAAU,GAAG,IAAA,IAC7D,GAAA,EACA;AACA,EAAA,MAAM,SAAA,GAAYC,aAA0B,IAAI,CAAA;AAChD,EAAA,MAAM,YAAA,GAAeA,aAAyB,IAAI,CAAA;A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ACA,QAAA;AAAA,QACA,QAAA,EAAU,YAAA;AAAA,QACV,OAAA,EAAS,WAAA;AAAA,QACT,GAAA,EAAK,YAAA;AAAA,QACL,IAAA,EAAK;AAAA;AAAA;AACP,GAAA,EACF,CAAA;AAEJ,CAAC;;;;"}
|
package/dist-cjs/index.js
CHANGED
|
@@ -155,6 +155,10 @@ var ToggletipPanel = require('./toggletip/ToggletipPanel.js');
|
|
|
155
155
|
var ToggletipTrigger = require('./toggletip/ToggletipTrigger.js');
|
|
156
156
|
var Tooltip = require('./tooltip/Tooltip.js');
|
|
157
157
|
var useTooltip = require('./tooltip/useTooltip.js');
|
|
158
|
+
var Tree = require('./tree/Tree.js');
|
|
159
|
+
var TreeNode = require('./tree/TreeNode.js');
|
|
160
|
+
var TreeNodeLabel = require('./tree/TreeNodeLabel.js');
|
|
161
|
+
var TreeNodeTrigger = require('./tree/TreeNodeTrigger.js');
|
|
158
162
|
var capitalize = require('./utils/capitalize.js');
|
|
159
163
|
var createChainedFunction = require('./utils/createChainedFunction.js');
|
|
160
164
|
var createContext = require('./utils/createContext.js');
|
|
@@ -379,6 +383,10 @@ exports.ToggletipPanel = ToggletipPanel.ToggletipPanel;
|
|
|
379
383
|
exports.ToggletipTrigger = ToggletipTrigger.ToggletipTrigger;
|
|
380
384
|
exports.Tooltip = Tooltip.Tooltip;
|
|
381
385
|
exports.useTooltip = useTooltip.useTooltip;
|
|
386
|
+
exports.Tree = Tree.Tree;
|
|
387
|
+
exports.TreeNode = TreeNode.TreeNode;
|
|
388
|
+
exports.TreeNodeLabel = TreeNodeLabel.TreeNodeLabel;
|
|
389
|
+
exports.TreeNodeTrigger = TreeNodeTrigger.TreeNodeTrigger;
|
|
382
390
|
exports.capitalize = capitalize.capitalize;
|
|
383
391
|
exports.createChainedFunction = createChainedFunction.createChainedFunction;
|
|
384
392
|
exports.createContext = createContext.createContext;
|
package/dist-cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".saltLink {\n --link-color: \"inherit\";\n --link-color-hover: \"inherit\";\n --link-color-active: \"inherit\";\n --link-color-visited: var(--salt-content-foreground-visited);\n --link-color-focus: \"inherit\";\n --link-focus-outlineColor: currentColor;\n\n --link-fontFamily: var(--salt-text-fontFamily);\n}\n\n.saltLink-underlineDefault {\n --link-textDecoration: var(--salt-typography-textDecoration-underline);\n --link-textDecoration-hover: var(--salt-typography-textDecoration-none);\n /* Active takes default */\n --link-textDecoration-active: var(--link-textDecoration);\n /* Focus takes hover */\n --link-textDecoration-focus: var(--link-textDecoration-hover);\n /* Visited takes default */\n --link-textDecoration-visited: var(--link-textDecoration);\n}\n\n.saltLink-underlineNever {\n --link-textDecoration: var(--salt-typography-textDecoration-none);\n --link-textDecoration-hover: var(--salt-typography-textDecoration-none);\n}\n\n/* Main css class */\n.saltLink.saltText {\n color: var(--link-color);\n letter-spacing: var(--salt-text-letterSpacing);\n text-decoration: var(--link-textDecoration);\n font-family: var(--link-fontFamily);\n}\n\n/* Primary variant */\n.saltLink-primary {\n --link-color: var(--salt-content-primary-foreground);\n --link-color-hover: var(--salt-content-primary-foreground);\n --link-color-active: var(--salt-content-primary-foreground);\n --link-color-focus: var(--salt-content-primary-foreground);\n --link-focus-outlineColor: var(--salt-focused-outlineColor);\n --link-color-visited: var(--salt-content-foreground-visited);\n}\n\n/* Secondary variant */\n.saltLink-secondary {\n --link-color: var(--salt-content-secondary-foreground);\n --link-color-hover: var(--salt-content-secondary-foreground);\n --link-color-active: var(--salt-content-secondary-foreground);\n --link-color-focus: var(--salt-content-secondary-foreground);\n --link-focus-outlineColor: var(--salt-focused-outlineColor);\n --link-color-visited: var(--salt-content-foreground-visited);\n}\n\n.saltLink-accent {\n --link-color: var(--salt-content-accent-foreground);\n --link-color-hover: var(--salt-content-accent-foreground);\n --link-color-active: var(--salt-content-accent-foreground);\n --link-color-focus: var(--salt-content-accent-foreground);\n --link-focus-outlineColor: var(--salt-focused-outlineColor);\n --link-color-visited: var(--salt-content-foreground-visited);\n}\n\n/* External link's icon */\n.saltLink .saltLink-icon {\n margin-left: var(--salt-spacing-75);\n margin-bottom: -2px;\n}\n\n/* Set color for visited link */\n.saltLink:visited {\n color: var(--saltLink-color-visited, var(--link-color-visited));\n text-decoration: var(--link-textDecoration-visited);\n}\n\n/* Set color for hovered link */\n.saltLink:hover {\n color: var(--saltLink-color-hover, var(--link-color-hover));\n text-decoration: var(--link-textDecoration-hover);\n}\n\n/* Set color for active link */\n.saltLink:active {\n color: var(--saltLink-color-active, var(--link-color-active));\n text-decoration: var(--link-textDecoration-active);\n}\n\n/* Set color for focused link */\n.saltLink:focus {\n color: var(--saltLink-color-focus, var(--link-color-focus));\n outline: var(--salt-focused-outline);\n outline-color: var(--link-focus-outlineColor);\n text-decoration: var(--link-textDecoration-focus);\n}\n\n/* Class for ADA content */\n.saltLink-externalLinkADA {\n
|
|
3
|
+
var css_248z = ".saltLink {\n --link-color: \"inherit\";\n --link-color-hover: \"inherit\";\n --link-color-active: \"inherit\";\n --link-color-visited: var(--salt-content-foreground-visited);\n --link-color-focus: \"inherit\";\n --link-focus-outlineColor: currentColor;\n\n --link-fontFamily: var(--salt-text-fontFamily);\n}\n\n.saltLink-underlineDefault {\n --link-textDecoration: var(--salt-typography-textDecoration-underline);\n --link-textDecoration-hover: var(--salt-typography-textDecoration-none);\n /* Active takes default */\n --link-textDecoration-active: var(--link-textDecoration);\n /* Focus takes hover */\n --link-textDecoration-focus: var(--link-textDecoration-hover);\n /* Visited takes default */\n --link-textDecoration-visited: var(--link-textDecoration);\n}\n\n.saltLink-underlineNever {\n --link-textDecoration: var(--salt-typography-textDecoration-none);\n --link-textDecoration-hover: var(--salt-typography-textDecoration-none);\n}\n\n/* Main css class */\n.saltLink.saltText {\n color: var(--link-color);\n letter-spacing: var(--salt-text-letterSpacing);\n text-decoration: var(--link-textDecoration);\n font-family: var(--link-fontFamily);\n}\n\n/* Primary variant */\n.saltLink-primary {\n --link-color: var(--salt-content-primary-foreground);\n --link-color-hover: var(--salt-content-primary-foreground);\n --link-color-active: var(--salt-content-primary-foreground);\n --link-color-focus: var(--salt-content-primary-foreground);\n --link-focus-outlineColor: var(--salt-focused-outlineColor);\n --link-color-visited: var(--salt-content-foreground-visited);\n}\n\n/* Secondary variant */\n.saltLink-secondary {\n --link-color: var(--salt-content-secondary-foreground);\n --link-color-hover: var(--salt-content-secondary-foreground);\n --link-color-active: var(--salt-content-secondary-foreground);\n --link-color-focus: var(--salt-content-secondary-foreground);\n --link-focus-outlineColor: var(--salt-focused-outlineColor);\n --link-color-visited: var(--salt-content-foreground-visited);\n}\n\n.saltLink-accent {\n --link-color: var(--salt-content-accent-foreground);\n --link-color-hover: var(--salt-content-accent-foreground);\n --link-color-active: var(--salt-content-accent-foreground);\n --link-color-focus: var(--salt-content-accent-foreground);\n --link-focus-outlineColor: var(--salt-focused-outlineColor);\n --link-color-visited: var(--salt-content-foreground-visited);\n}\n\n/* External link's icon */\n.saltLink .saltLink-icon {\n margin-left: var(--salt-spacing-75);\n margin-bottom: -2px;\n}\n\n/* Set color for visited link */\n.saltLink:visited {\n color: var(--saltLink-color-visited, var(--link-color-visited));\n text-decoration: var(--link-textDecoration-visited);\n}\n\n/* Set color for hovered link */\n.saltLink:hover {\n color: var(--saltLink-color-hover, var(--link-color-hover));\n text-decoration: var(--link-textDecoration-hover);\n}\n\n/* Set color for active link */\n.saltLink:active {\n color: var(--saltLink-color-active, var(--link-color-active));\n text-decoration: var(--link-textDecoration-active);\n}\n\n/* Set color for focused link */\n.saltLink:focus {\n color: var(--saltLink-color-focus, var(--link-color-focus));\n outline: var(--salt-focused-outline);\n outline-color: var(--link-focus-outlineColor);\n text-decoration: var(--link-textDecoration-focus);\n}\n\n/* Class for ADA content - visually hidden but accessible to screen readers.\n Uses clip-path and prevents user selection so the text isn't included\n when users copy the link's visible content. */\n.saltLink-externalLinkADA {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n user-select: none;\n -webkit-user-select: none;\n}\n";
|
|
4
4
|
|
|
5
5
|
module.exports = css_248z;
|
|
6
6
|
//# sourceMappingURL=Link.css.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var css_248z = ".saltTree {\n display: flex;\n flex-direction: column;\n gap: var(--salt-spacing-fixed-100);\n list-style: none;\n margin: 0;\n padding: 0;\n outline: none;\n width: 100%;\n box-sizing: border-box;\n}\n\n.saltTree-disabled {\n cursor: var(--salt-cursor-disabled);\n}\n";
|
|
4
|
+
|
|
5
|
+
module.exports = css_248z;
|
|
6
|
+
//# sourceMappingURL=Tree.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tree.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|