@wix/site-ui 1.19.0 → 1.20.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/Breadcrumbs/index.css +47 -0
- package/dist/Breadcrumbs/index.d.ts +32 -0
- package/dist/Breadcrumbs/index.js +81 -0
- package/dist/index.d.ts +26 -6
- package/dist/index.js +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
.root-uwc56U {
|
|
2
|
+
font: var(--wst-paragraph-2-font);
|
|
3
|
+
color: var(--wst-paragraph-2-color, #000);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.list-HHG8hu {
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: 4px;
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
list-style: none;
|
|
12
|
+
display: flex;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.item-yTmapi {
|
|
16
|
+
align-items: center;
|
|
17
|
+
padding: 4px 0;
|
|
18
|
+
display: flex;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.link-GDIKcZ {
|
|
22
|
+
color: inherit;
|
|
23
|
+
text-decoration: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.link-GDIKcZ:hover, .link-GDIKcZ:focus-visible {
|
|
27
|
+
opacity: .7;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.page-adRf_w {
|
|
31
|
+
color: inherit;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.separator-Kz0pCd {
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
align-items: center;
|
|
38
|
+
min-width: 1.5em;
|
|
39
|
+
min-height: 1.5em;
|
|
40
|
+
display: flex;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.separatorIcon-vONtbc {
|
|
44
|
+
width: 1.5em;
|
|
45
|
+
height: 1.5em;
|
|
46
|
+
}
|
|
47
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
2
|
+
import { NavigationMenu } from '@base-ui/react/navigation-menu';
|
|
3
|
+
import { NavigationMenuItemProps } from '@base-ui/react/navigation-menu';
|
|
4
|
+
import { NavigationMenuLinkProps } from '@base-ui/react/navigation-menu';
|
|
5
|
+
import { NavigationMenuListProps } from '@base-ui/react/navigation-menu';
|
|
6
|
+
import * as React_2 from 'react';
|
|
7
|
+
|
|
8
|
+
export declare const Breadcrumbs: {
|
|
9
|
+
Root: typeof Root;
|
|
10
|
+
List: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<NavigationMenuListProps, "ref"> & React_2.RefAttributes<HTMLUListElement>, "ref">, "className"> & {
|
|
11
|
+
className?: string | undefined;
|
|
12
|
+
} & React_2.RefAttributes<HTMLUListElement>>;
|
|
13
|
+
Item: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<NavigationMenuItemProps, "ref"> & React_2.RefAttributes<HTMLLIElement>, "ref">, "className"> & {
|
|
14
|
+
className?: string | undefined;
|
|
15
|
+
} & React_2.RefAttributes<HTMLLIElement>>;
|
|
16
|
+
Link: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<NavigationMenuLinkProps, "ref"> & React_2.RefAttributes<HTMLAnchorElement>, "ref">, "className"> & {
|
|
17
|
+
className?: string | undefined;
|
|
18
|
+
} & React_2.RefAttributes<HTMLAnchorElement>>;
|
|
19
|
+
Page: React_2.ForwardRefExoticComponent<{
|
|
20
|
+
className?: string | undefined;
|
|
21
|
+
} & Omit<React_2.DetailedHTMLProps<React_2.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
declare function Root<Value = any>({ className, dir, separator, 'aria-label': ariaLabel, ...props }: WithStringClassName<NavigationMenu.Root.Props<Value>> & {
|
|
25
|
+
separator?: React_2.ReactNode;
|
|
26
|
+
}): JSX_2.Element;
|
|
27
|
+
|
|
28
|
+
declare type WithStringClassName<P> = Omit<P, 'className'> & {
|
|
29
|
+
className?: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { }
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { NavigationMenu } from "@base-ui/react/navigation-menu";
|
|
3
|
+
import { ChevronLeft, ChevronRight } from "@wix/wix-ui-icons-common";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import * as __rspack_external_react from "react";
|
|
6
|
+
const Breadcrumbs_module = {
|
|
7
|
+
root: "root-uwc56U",
|
|
8
|
+
list: "list-HHG8hu",
|
|
9
|
+
item: "item-yTmapi",
|
|
10
|
+
link: "link-GDIKcZ",
|
|
11
|
+
page: "page-adRf_w",
|
|
12
|
+
separator: "separator-Kz0pCd",
|
|
13
|
+
separatorIcon: "separatorIcon-vONtbc"
|
|
14
|
+
};
|
|
15
|
+
const BreadcrumbsContext = /*#__PURE__*/ __rspack_external_react.createContext({
|
|
16
|
+
separator: /*#__PURE__*/ jsx(ChevronRight, {
|
|
17
|
+
className: Breadcrumbs_module.separatorIcon
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
const List = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, children, ...props }, ref)=>{
|
|
21
|
+
const { separator } = __rspack_external_react.useContext(BreadcrumbsContext);
|
|
22
|
+
const childArray = __rspack_external_react.Children.toArray(children);
|
|
23
|
+
return /*#__PURE__*/ jsx(NavigationMenu.List, {
|
|
24
|
+
ref: ref,
|
|
25
|
+
className: clsx(Breadcrumbs_module.list, className),
|
|
26
|
+
...props,
|
|
27
|
+
children: childArray.flatMap((child, index)=>0 === index ? [
|
|
28
|
+
child
|
|
29
|
+
] : [
|
|
30
|
+
/*#__PURE__*/ jsx("li", {
|
|
31
|
+
"aria-hidden": "true",
|
|
32
|
+
role: "presentation",
|
|
33
|
+
className: Breadcrumbs_module.separator,
|
|
34
|
+
children: separator
|
|
35
|
+
}, `sep-${index}`),
|
|
36
|
+
child
|
|
37
|
+
])
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
const Item = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(NavigationMenu.Item, {
|
|
41
|
+
ref: ref,
|
|
42
|
+
className: clsx(Breadcrumbs_module.item, className),
|
|
43
|
+
...props
|
|
44
|
+
}));
|
|
45
|
+
const Link = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(NavigationMenu.Link, {
|
|
46
|
+
ref: ref,
|
|
47
|
+
className: clsx(Breadcrumbs_module.link, className),
|
|
48
|
+
...props
|
|
49
|
+
}));
|
|
50
|
+
const Page = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("span", {
|
|
51
|
+
ref: ref,
|
|
52
|
+
"aria-current": "page",
|
|
53
|
+
...props,
|
|
54
|
+
className: clsx(Breadcrumbs_module.page, className)
|
|
55
|
+
}));
|
|
56
|
+
function Root({ className, dir, separator, 'aria-label': ariaLabel = 'Breadcrumbs', ...props }) {
|
|
57
|
+
const defaultSeparator = 'rtl' === dir ? /*#__PURE__*/ jsx(ChevronLeft, {
|
|
58
|
+
className: Breadcrumbs_module.separatorIcon
|
|
59
|
+
}) : /*#__PURE__*/ jsx(ChevronRight, {
|
|
60
|
+
className: Breadcrumbs_module.separatorIcon
|
|
61
|
+
});
|
|
62
|
+
return /*#__PURE__*/ jsx(BreadcrumbsContext.Provider, {
|
|
63
|
+
value: {
|
|
64
|
+
separator: separator ?? defaultSeparator
|
|
65
|
+
},
|
|
66
|
+
children: /*#__PURE__*/ jsx(NavigationMenu.Root, {
|
|
67
|
+
"aria-label": ariaLabel,
|
|
68
|
+
dir: dir,
|
|
69
|
+
...props,
|
|
70
|
+
className: clsx(Breadcrumbs_module.root, className)
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
const Breadcrumbs = {
|
|
75
|
+
Root: Root,
|
|
76
|
+
List: List,
|
|
77
|
+
Item: Item,
|
|
78
|
+
Link: Link,
|
|
79
|
+
Page: Page
|
|
80
|
+
};
|
|
81
|
+
export { Breadcrumbs };
|
package/dist/index.d.ts
CHANGED
|
@@ -362,6 +362,22 @@ export declare const AvatarSize: {
|
|
|
362
362
|
|
|
363
363
|
declare type BaseProps = WithStringClassName<React_2.ComponentPropsWithoutRef<typeof Button_2>>;
|
|
364
364
|
|
|
365
|
+
export declare const Breadcrumbs: {
|
|
366
|
+
Root: typeof Root_2;
|
|
367
|
+
List: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<NavigationMenuListProps, "ref"> & React_2.RefAttributes<HTMLUListElement>, "ref">, "className"> & {
|
|
368
|
+
className?: string | undefined;
|
|
369
|
+
} & React_2.RefAttributes<HTMLUListElement>>;
|
|
370
|
+
Item: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<NavigationMenuItemProps, "ref"> & React_2.RefAttributes<HTMLLIElement>, "ref">, "className"> & {
|
|
371
|
+
className?: string | undefined;
|
|
372
|
+
} & React_2.RefAttributes<HTMLLIElement>>;
|
|
373
|
+
Link: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<NavigationMenuLinkProps, "ref"> & React_2.RefAttributes<HTMLAnchorElement>, "ref">, "className"> & {
|
|
374
|
+
className?: string | undefined;
|
|
375
|
+
} & React_2.RefAttributes<HTMLAnchorElement>>;
|
|
376
|
+
Page: React_2.ForwardRefExoticComponent<{
|
|
377
|
+
className?: string | undefined;
|
|
378
|
+
} & Omit<React_2.DetailedHTMLProps<React_2.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
|
|
379
|
+
};
|
|
380
|
+
|
|
365
381
|
export declare const Button: React_2.ForwardRefExoticComponent<ButtonProps & React_2.RefAttributes<HTMLElement>>;
|
|
366
382
|
|
|
367
383
|
declare interface ButtonProps extends BaseProps {
|
|
@@ -741,7 +757,7 @@ export declare const NavigationMenu: {
|
|
|
741
757
|
Icon: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<NavigationMenuIconProps, "ref"> & React_2.RefAttributes<HTMLSpanElement>, "ref">, "className"> & {
|
|
742
758
|
className?: string | undefined;
|
|
743
759
|
} & React_2.RefAttributes<HTMLSpanElement>>;
|
|
744
|
-
Root: typeof
|
|
760
|
+
Root: typeof Root_3;
|
|
745
761
|
Portal: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPortalProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
746
762
|
};
|
|
747
763
|
|
|
@@ -855,7 +871,7 @@ export declare const Radio: {
|
|
|
855
871
|
Indicator: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<RadioIndicatorProps, "ref"> & React_2.RefAttributes<HTMLSpanElement>, "ref">, "className"> & {
|
|
856
872
|
className?: string | undefined;
|
|
857
873
|
} & React_2.RefAttributes<HTMLSpanElement>>;
|
|
858
|
-
Root: typeof
|
|
874
|
+
Root: typeof Root_4;
|
|
859
875
|
};
|
|
860
876
|
|
|
861
877
|
export declare const RadioGroup: React_2.ForwardRefExoticComponent<Omit<Omit<RadioGroup_2.Props<unknown>, "ref">, "className"> & {
|
|
@@ -873,11 +889,15 @@ declare function Root<Value = any>({ className, size, variant, ...props }: WithS
|
|
|
873
889
|
variant?: Variant;
|
|
874
890
|
}): JSX_2.Element;
|
|
875
891
|
|
|
876
|
-
declare function Root_2<Value = any>({ className, ...props }: WithStringClassName<NavigationMenu_2.Root.Props<Value>>
|
|
892
|
+
declare function Root_2<Value = any>({ className, dir, separator, 'aria-label': ariaLabel, ...props }: WithStringClassName<NavigationMenu_2.Root.Props<Value>> & {
|
|
893
|
+
separator?: React_2.ReactNode;
|
|
894
|
+
}): JSX_2.Element;
|
|
877
895
|
|
|
878
|
-
declare function Root_3<Value>({ className,
|
|
896
|
+
declare function Root_3<Value = any>({ className, ...props }: WithStringClassName<NavigationMenu_2.Root.Props<Value>>): JSX_2.Element;
|
|
879
897
|
|
|
880
|
-
declare function Root_4<Value
|
|
898
|
+
declare function Root_4<Value>({ className, size, style, ...props }: RootProps<Value>): JSX_2.Element;
|
|
899
|
+
|
|
900
|
+
declare function Root_5<Value extends number | readonly number[]>({ className, size, style, ...props }: RootProps_2<Value>): JSX_2.Element;
|
|
881
901
|
|
|
882
902
|
declare type RootProps<Value> = WithStringClassName<Radio_2.Root.Props<Value>> & {
|
|
883
903
|
size?: number;
|
|
@@ -987,7 +1007,7 @@ export declare const Slider: {
|
|
|
987
1007
|
Indicator: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<SliderIndicatorProps, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
988
1008
|
className?: string | undefined;
|
|
989
1009
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
990
|
-
Root: typeof
|
|
1010
|
+
Root: typeof Root_5;
|
|
991
1011
|
};
|
|
992
1012
|
|
|
993
1013
|
export declare const SliderSize: {
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export { Accordion, AccordionSize, AccordionVariant } from "./Accordion/index.js
|
|
|
2
2
|
export { AlertDialog } from "./AlertDialog/index.js";
|
|
3
3
|
export { Autocomplete } from "./Autocomplete/index.js";
|
|
4
4
|
export { Avatar, AvatarSize } from "./Avatar/index.js";
|
|
5
|
+
export { Breadcrumbs } from "./Breadcrumbs/index.js";
|
|
5
6
|
export { Button } from "./Button/index.js";
|
|
6
7
|
export { Checkbox, CheckboxSize } from "./Checkbox/index.js";
|
|
7
8
|
export { CheckboxGroup } from "./CheckboxGroup/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/site-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.0",
|
|
4
4
|
"description": "Pure UI components for the Wix site builder",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"registry": "https://registry.npmjs.org/",
|
|
79
79
|
"access": "public"
|
|
80
80
|
},
|
|
81
|
-
"falconPackageHash": "
|
|
81
|
+
"falconPackageHash": "b2b7a8518aee6afaa0290fba74856876f2786c40325b333c0b16cf14"
|
|
82
82
|
}
|