@knkcs/anker 1.8.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.js +67 -53
- package/dist/components/index.js.map +1 -1
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { text_input_default } from '../chunk-OU6H3KU4.js';
|
|
|
6
6
|
import { Button, IconButton } from '../chunk-JS7ZEZV3.js';
|
|
7
7
|
import { Box, Flex, Text, Heading, HStack, Grid, GridItem, Code, Link, VStack, Spacer, Stack } from '../chunk-G4QMIXLC.js';
|
|
8
8
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
9
|
-
import { PanelRightOpen, PanelRightClose, ChevronRight, PanelLeftOpen, PanelLeftClose,
|
|
9
|
+
import { PanelRightOpen, PanelRightClose, ChevronRight, Search, PanelLeftOpen, PanelLeftClose, X, Ellipsis, Plus, ChevronLeft, ArrowUp, ArrowDown, ArrowUpDown, ChevronDown, Check, Upload } from 'lucide-react';
|
|
10
10
|
import { createContext, Timeline, TreeView, Card as Card$1, Menu, Portal, Checkbox, Drawer, ButtonGroup, Dialog, useSlotRecipe, chakra } from '@chakra-ui/react';
|
|
11
11
|
export { createTreeCollection } from '@chakra-ui/react';
|
|
12
12
|
import React3, { createContext as createContext$1, useState, useEffect, useMemo, Children, useRef, useCallback, useContext } from 'react';
|
|
@@ -1839,7 +1839,7 @@ var SidebarRoot = ({
|
|
|
1839
1839
|
}),
|
|
1840
1840
|
[collapsed]
|
|
1841
1841
|
);
|
|
1842
|
-
return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: ctx, children: /* @__PURE__ */
|
|
1842
|
+
return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx(
|
|
1843
1843
|
Flex,
|
|
1844
1844
|
{
|
|
1845
1845
|
"data-testid": "sidebar",
|
|
@@ -1853,20 +1853,7 @@ var SidebarRoot = ({
|
|
|
1853
1853
|
transition: "width 250ms ease-out",
|
|
1854
1854
|
overflow: "hidden",
|
|
1855
1855
|
position: "relative",
|
|
1856
|
-
children
|
|
1857
|
-
/* @__PURE__ */ jsx(Flex, { justify: "flex-end", px: "2", pt: "2", children: /* @__PURE__ */ jsx(
|
|
1858
|
-
IconButton,
|
|
1859
|
-
{
|
|
1860
|
-
"data-testid": "sidebar-toggle",
|
|
1861
|
-
"aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
1862
|
-
variant: "ghost",
|
|
1863
|
-
size: "sm",
|
|
1864
|
-
onClick: () => setCollapsed((c) => !c),
|
|
1865
|
-
children: collapsed ? /* @__PURE__ */ jsx(PanelLeftOpen, { size: 16 }) : /* @__PURE__ */ jsx(PanelLeftClose, { size: 16 })
|
|
1866
|
-
}
|
|
1867
|
-
) }),
|
|
1868
|
-
children
|
|
1869
|
-
]
|
|
1856
|
+
children
|
|
1870
1857
|
}
|
|
1871
1858
|
) });
|
|
1872
1859
|
};
|
|
@@ -1878,45 +1865,72 @@ SidebarBody.displayName = "Sidebar.Body";
|
|
|
1878
1865
|
var SidebarFooter = ({ children }) => /* @__PURE__ */ jsx(Box, { p: "3", borderTopWidth: "1px", borderTopColor: "border", children });
|
|
1879
1866
|
SidebarFooter.displayName = "Sidebar.Footer";
|
|
1880
1867
|
var SidebarLogo = ({ wordmark, subtitle }) => {
|
|
1881
|
-
const { collapsed } = useSidebarContext();
|
|
1868
|
+
const { collapsed, toggle } = useSidebarContext();
|
|
1869
|
+
const toggleButton = /* @__PURE__ */ jsx(
|
|
1870
|
+
IconButton,
|
|
1871
|
+
{
|
|
1872
|
+
"data-testid": "sidebar-toggle",
|
|
1873
|
+
"aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
1874
|
+
variant: "ghost",
|
|
1875
|
+
size: "sm",
|
|
1876
|
+
onClick: toggle,
|
|
1877
|
+
children: collapsed ? /* @__PURE__ */ jsx(PanelLeftOpen, { size: 16 }) : /* @__PURE__ */ jsx(PanelLeftClose, { size: 16 })
|
|
1878
|
+
}
|
|
1879
|
+
);
|
|
1882
1880
|
if (collapsed) {
|
|
1883
|
-
return /* @__PURE__ */
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1881
|
+
return /* @__PURE__ */ jsxs(Flex, { direction: "column", align: "center", gap: "2", children: [
|
|
1882
|
+
/* @__PURE__ */ jsx(
|
|
1883
|
+
Heading,
|
|
1884
|
+
{
|
|
1885
|
+
as: "span",
|
|
1886
|
+
fontSize: "lg",
|
|
1887
|
+
fontWeight: "bold",
|
|
1888
|
+
color: "primary.700",
|
|
1889
|
+
letterSpacing: "tight",
|
|
1890
|
+
children: wordmark.charAt(0)
|
|
1891
|
+
}
|
|
1892
|
+
),
|
|
1893
|
+
toggleButton
|
|
1894
|
+
] });
|
|
1894
1895
|
}
|
|
1895
|
-
return /* @__PURE__ */ jsxs(
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
children:
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1896
|
+
return /* @__PURE__ */ jsxs(
|
|
1897
|
+
Flex,
|
|
1898
|
+
{
|
|
1899
|
+
direction: "row",
|
|
1900
|
+
align: "center",
|
|
1901
|
+
justify: "space-between",
|
|
1902
|
+
gap: "2",
|
|
1903
|
+
w: "full",
|
|
1904
|
+
children: [
|
|
1905
|
+
/* @__PURE__ */ jsxs(Box, { mb: subtitle ? "0" : "0", children: [
|
|
1906
|
+
/* @__PURE__ */ jsx(
|
|
1907
|
+
Heading,
|
|
1908
|
+
{
|
|
1909
|
+
as: "span",
|
|
1910
|
+
fontSize: "lg",
|
|
1911
|
+
fontWeight: "bold",
|
|
1912
|
+
color: "primary.700",
|
|
1913
|
+
letterSpacing: "tight",
|
|
1914
|
+
children: wordmark
|
|
1915
|
+
}
|
|
1916
|
+
),
|
|
1917
|
+
subtitle && /* @__PURE__ */ jsx(
|
|
1918
|
+
Text,
|
|
1919
|
+
{
|
|
1920
|
+
fontSize: "2xs",
|
|
1921
|
+
fontWeight: "semibold",
|
|
1922
|
+
letterSpacing: "wider",
|
|
1923
|
+
textTransform: "uppercase",
|
|
1924
|
+
color: "muted",
|
|
1925
|
+
mt: "0.5",
|
|
1926
|
+
children: subtitle
|
|
1927
|
+
}
|
|
1928
|
+
)
|
|
1929
|
+
] }),
|
|
1930
|
+
toggleButton
|
|
1931
|
+
]
|
|
1932
|
+
}
|
|
1933
|
+
);
|
|
1920
1934
|
};
|
|
1921
1935
|
SidebarLogo.displayName = "Sidebar.Logo";
|
|
1922
1936
|
var SidebarSlot = ({ children }) => /* @__PURE__ */ jsx(Box, { mt: "3", children });
|