@zicas/ui 0.0.0-stage → 0.1.0-beta.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.
Files changed (103) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +76 -2
  3. package/dist/accordion.d.ts +23 -0
  4. package/dist/accordion.js +105 -0
  5. package/dist/alert.d.ts +16 -0
  6. package/dist/alert.js +50 -0
  7. package/dist/avatar.d.ts +14 -0
  8. package/dist/avatar.js +53 -0
  9. package/dist/badge.d.ts +11 -0
  10. package/dist/badge.js +46 -0
  11. package/dist/breadcrumb.d.ts +26 -0
  12. package/dist/breadcrumb.js +92 -0
  13. package/dist/button.d.ts +17 -0
  14. package/dist/button.js +174 -0
  15. package/dist/card.d.ts +24 -0
  16. package/dist/card.js +81 -0
  17. package/dist/checkbox.d.ts +9 -0
  18. package/dist/checkbox.js +91 -0
  19. package/dist/dialog.d.ts +39 -0
  20. package/dist/dialog.js +195 -0
  21. package/dist/direction.d.ts +17 -0
  22. package/dist/direction.js +93 -0
  23. package/dist/dropdown-menu.d.ts +39 -0
  24. package/dist/dropdown-menu.js +189 -0
  25. package/dist/field.d.ts +24 -0
  26. package/dist/field.js +59 -0
  27. package/dist/icon-button.d.ts +15 -0
  28. package/dist/icon-button.js +50 -0
  29. package/dist/index.d.ts +68 -0
  30. package/dist/index.js +36 -0
  31. package/dist/inline.d.ts +12 -0
  32. package/dist/inline.js +25 -0
  33. package/dist/input.d.ts +9 -0
  34. package/dist/input.js +54 -0
  35. package/dist/navbar.d.ts +44 -0
  36. package/dist/navbar.js +258 -0
  37. package/dist/popover.d.ts +36 -0
  38. package/dist/popover.js +148 -0
  39. package/dist/progress.d.ts +23 -0
  40. package/dist/progress.js +67 -0
  41. package/dist/radio.d.ts +15 -0
  42. package/dist/radio.js +93 -0
  43. package/dist/scroll-area.d.ts +21 -0
  44. package/dist/scroll-area.js +120 -0
  45. package/dist/select.d.ts +37 -0
  46. package/dist/select.js +260 -0
  47. package/dist/semantic-colors.stylex.d.ts +22 -0
  48. package/dist/semantic-colors.stylex.js +23 -0
  49. package/dist/separator.d.ts +9 -0
  50. package/dist/separator.js +26 -0
  51. package/dist/skeleton.d.ts +6 -0
  52. package/dist/skeleton.js +18 -0
  53. package/dist/stack.d.ts +11 -0
  54. package/dist/stack.js +24 -0
  55. package/dist/surface.d.ts +9 -0
  56. package/dist/surface.js +18 -0
  57. package/dist/switch.d.ts +9 -0
  58. package/dist/switch.js +73 -0
  59. package/dist/table.d.ts +34 -0
  60. package/dist/table.js +84 -0
  61. package/dist/tabs.d.ts +19 -0
  62. package/dist/tabs.js +115 -0
  63. package/dist/text.d.ts +14 -0
  64. package/dist/text.js +31 -0
  65. package/dist/textarea.d.ts +8 -0
  66. package/dist/textarea.js +70 -0
  67. package/dist/theme-root.d.ts +9 -0
  68. package/dist/theme-root.js +61 -0
  69. package/dist/theme-types.d.ts +16 -0
  70. package/dist/theme-types.js +0 -0
  71. package/dist/themes/atelier-theme.d.ts +2 -0
  72. package/dist/themes/atelier-theme.js +3 -0
  73. package/dist/themes/compact-theme.d.ts +2 -0
  74. package/dist/themes/compact-theme.js +3 -0
  75. package/dist/themes/compose-theme.d.ts +27 -0
  76. package/dist/themes/compose-theme.js +82 -0
  77. package/dist/themes/fragments/borders.d.ts +34 -0
  78. package/dist/themes/fragments/borders.js +19 -0
  79. package/dist/themes/fragments/density.d.ts +58 -0
  80. package/dist/themes/fragments/density.js +31 -0
  81. package/dist/themes/fragments/elevation.d.ts +34 -0
  82. package/dist/themes/fragments/elevation.js +19 -0
  83. package/dist/themes/fragments/font-family.d.ts +16 -0
  84. package/dist/themes/fragments/font-family.js +9 -0
  85. package/dist/themes/fragments/line-height.d.ts +24 -0
  86. package/dist/themes/fragments/line-height.js +13 -0
  87. package/dist/themes/fragments/motion.d.ts +40 -0
  88. package/dist/themes/fragments/motion.js +21 -0
  89. package/dist/themes/fragments/radius.d.ts +60 -0
  90. package/dist/themes/fragments/radius.js +13 -0
  91. package/dist/themes/fragments/semantic-colors.d.ts +151 -0
  92. package/dist/themes/fragments/semantic-colors.js +68 -0
  93. package/dist/themes/fragments/type-scale.d.ts +36 -0
  94. package/dist/themes/fragments/type-scale.js +16 -0
  95. package/dist/themes/nitro-theme.d.ts +2 -0
  96. package/dist/themes/nitro-theme.js +3 -0
  97. package/dist/token-types.d.ts +1 -0
  98. package/dist/token-types.js +0 -0
  99. package/dist/tokens.stylex.d.ts +59 -0
  100. package/dist/tokens.stylex.js +61 -0
  101. package/dist/tooltip.d.ts +23 -0
  102. package/dist/tooltip.js +89 -0
  103. package/package.json +42 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Zicas UI contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,77 @@
1
- # Temporary Holding Version
1
+ # Zicas UI
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ React components styled with StyleX, with Base UI accessibility behavior.
4
+ ## Install in a Vite React app
5
+
6
+ React and React DOM (18 or newer) are peer dependencies. Install the package,
7
+ StyleX, and the required StyleX build plugin:
8
+
9
+ ```sh
10
+ npm install @zicas/ui @stylexjs/stylex@0.19.0
11
+ npm install --save-dev @stylexjs/unplugin@0.19.0
12
+ ```
13
+
14
+ > **Testing only:** before the public release is available, install a locally
15
+ > packed tarball instead, for example
16
+ > `npm install /path/to/zicas-ui-0.1.0-beta.0.tgz @stylexjs/stylex@0.19.0`.
17
+ > Do not use local tarball paths in shared projects.
18
+
19
+ The package ships ESM with uncompiled StyleX calls. The consumer must compile
20
+ them; omitting the plugin causes `stylex.defineVars` to fail at runtime.
21
+
22
+ ```ts
23
+ // vite.config.ts
24
+ import { defineConfig } from "vite";
25
+ import react from "@vitejs/plugin-react";
26
+ import stylex from "@stylexjs/unplugin";
27
+
28
+ export default defineConfig({
29
+ plugins: [
30
+ stylex.vite({ lightningcssOptions: { targets: {} } }),
31
+ react(),
32
+ ],
33
+ });
34
+ ```
35
+
36
+ Keep native `light-dark()` in StyleX's generated stylesheet with the explicit
37
+ `targets: {}` option. Without it, the plugin resolves the app's Browserslist
38
+ targets. Older targets can lower semantic color variables into fallback pairs
39
+ that become invalid colors when inherited from `:root`. Vite's `build.cssTarget`
40
+ alone does not control this separate plugin transform. This setup requires
41
+ browsers with native `light-dark()` support; it does not provide legacy fallbacks.
42
+ If you add another CSS transformer, ensure it also preserves `light-dark()`.
43
+ The plugin automatically discovers `@zicas/ui` through its StyleX dependency;
44
+ no private-source aliases or `externalPackages` option are needed.
45
+
46
+ Add this link to `index.html` for the plugin's development and production CSS:
47
+
48
+ ```html
49
+ <link rel="stylesheet" href="/assets/stylex.css" />
50
+ ```
51
+
52
+ ## Themes and direction
53
+
54
+ ```tsx
55
+ import { Button, ThemeRoot, compactTheme, atelierTheme, nitroTheme } from "@zicas/ui";
56
+
57
+ export function App() {
58
+ return (
59
+ <div dir="rtl">
60
+ <ThemeRoot colorScheme="light" theme={atelierTheme}>
61
+ <Button variant="primary">Continue</Button>
62
+ </ThemeRoot>
63
+ </div>
64
+ );
65
+ }
66
+ ```
67
+
68
+ `colorScheme` is required: use `"light"` or `"dark"`. Omit `theme` for Default,
69
+ or pass `compactTheme`, `atelierTheme`, or `nitroTheme`. Changing either prop
70
+ switches the existing theme scope, including library portals. Default primary
71
+ uses a dark neutral background with white text in light mode, and a light
72
+ neutral background with dark text in dark mode.
73
+
74
+ Set native `dir="rtl"` on an ancestor for RTL; components use logical CSS
75
+ properties and library popups inherit direction through the public components.
76
+
77
+ Next.js integration is untested. MIT licensed; see [LICENSE](./LICENSE).
@@ -0,0 +1,23 @@
1
+ import type { ComponentPropsWithoutRef } from "react";
2
+ import { Accordion as BaseUIAccordion } from "@base-ui/react/accordion";
3
+ import type { StyleXStyles } from "@stylexjs/stylex";
4
+ export type AccordionProps<Value = string> = Omit<BaseUIAccordion.Root.Props<Value>, "className" | "style" | "ref"> & {
5
+ xstyle?: StyleXStyles;
6
+ };
7
+ export type AccordionItemProps = Omit<ComponentPropsWithoutRef<typeof BaseUIAccordion.Item>, "className" | "style"> & {
8
+ xstyle?: StyleXStyles;
9
+ };
10
+ export type AccordionHeaderProps = Omit<ComponentPropsWithoutRef<typeof BaseUIAccordion.Header>, "className" | "style"> & {
11
+ xstyle?: StyleXStyles;
12
+ };
13
+ export type AccordionTriggerProps = Omit<ComponentPropsWithoutRef<typeof BaseUIAccordion.Trigger>, "className" | "style"> & {
14
+ xstyle?: StyleXStyles;
15
+ };
16
+ export type AccordionPanelProps = Omit<ComponentPropsWithoutRef<typeof BaseUIAccordion.Panel>, "className" | "style"> & {
17
+ xstyle?: StyleXStyles;
18
+ };
19
+ export declare function Accordion<Value = string>({ xstyle, ...props }: AccordionProps<Value>): import("react").JSX.Element;
20
+ export declare function AccordionItem({ xstyle, ...props }: AccordionItemProps): import("react").JSX.Element;
21
+ export declare function AccordionHeader({ xstyle, ...props }: AccordionHeaderProps): import("react").JSX.Element;
22
+ export declare function AccordionTrigger({ xstyle, ...props }: AccordionTriggerProps): import("react").JSX.Element;
23
+ export declare function AccordionPanel({ xstyle, ...props }: AccordionPanelProps): import("react").JSX.Element;
@@ -0,0 +1,105 @@
1
+ import { colors } from "./semantic-colors.stylex.js";
2
+ import { controlSizes, fontSizes, fontWeights, lineHeights, radii, spacing, typography } from "./tokens.stylex.js";
3
+ import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
4
+ import * as stylex from "@stylexjs/stylex";
5
+ import { jsx } from "react/jsx-runtime";
6
+ var styles = stylex.create({
7
+ root: {
8
+ display: "flex",
9
+ flexDirection: "column",
10
+ gap: spacing[2],
11
+ minInlineSize: 0,
12
+ color: colors.foreground,
13
+ fontFamily: typography.fontFamily,
14
+ fontSize: fontSizes.sm,
15
+ lineHeight: lineHeights.normal
16
+ },
17
+ item: {
18
+ minInlineSize: 0,
19
+ backgroundColor: colors.surface,
20
+ borderRadius: radii.md
21
+ },
22
+ header: {
23
+ margin: 0,
24
+ fontSize: "inherit",
25
+ fontWeight: fontWeights.medium,
26
+ lineHeight: "inherit"
27
+ },
28
+ trigger: {
29
+ display: "flex",
30
+ alignItems: "center",
31
+ justifyContent: "space-between",
32
+ gap: spacing[3],
33
+ inlineSize: "100%",
34
+ minBlockSize: controlSizes.md,
35
+ paddingBlock: spacing[3],
36
+ paddingInline: spacing[4],
37
+ borderWidth: 0,
38
+ borderRadius: radii.md,
39
+ color: "inherit",
40
+ fontFamily: "inherit",
41
+ fontSize: "inherit",
42
+ fontWeight: "inherit",
43
+ lineHeight: "inherit",
44
+ textAlign: "start",
45
+ cursor: "pointer",
46
+ outlineStyle: "solid",
47
+ outlineWidth: "2px",
48
+ outlineOffset: "2px",
49
+ outlineColor: {
50
+ default: "transparent",
51
+ ":focus-visible": colors.focus
52
+ }
53
+ },
54
+ closed: { backgroundColor: {
55
+ default: "transparent",
56
+ ":hover": colors.mutedHover
57
+ } },
58
+ open: { backgroundColor: {
59
+ default: colors.muted,
60
+ ":hover": colors.mutedHover
61
+ } },
62
+ disabled: {
63
+ cursor: "not-allowed",
64
+ opacity: .5
65
+ },
66
+ panel: {
67
+ minInlineSize: 0,
68
+ paddingInline: spacing[4],
69
+ paddingBlockStart: spacing[2],
70
+ paddingBlockEnd: spacing[4]
71
+ }
72
+ });
73
+ function Accordion({ xstyle, ...props }) {
74
+ return jsx(Accordion$1.Root, {
75
+ ...props,
76
+ ...stylex.props(styles.root, xstyle)
77
+ });
78
+ }
79
+ function AccordionItem({ xstyle, ...props }) {
80
+ return jsx(Accordion$1.Item, {
81
+ ...props,
82
+ ...stylex.props(styles.item, xstyle)
83
+ });
84
+ }
85
+ function AccordionHeader({ xstyle, ...props }) {
86
+ return jsx(Accordion$1.Header, {
87
+ ...props,
88
+ ...stylex.props(styles.header, xstyle)
89
+ });
90
+ }
91
+ function AccordionTrigger({ xstyle, ...props }) {
92
+ const getStyles = (state) => stylex.props(styles.trigger, state.open ? styles.open : styles.closed, (state.disabled || props.disabled) && styles.disabled, xstyle);
93
+ return jsx(Accordion$1.Trigger, {
94
+ ...props,
95
+ className: (state) => getStyles(state).className,
96
+ style: (state) => getStyles(state).style
97
+ });
98
+ }
99
+ function AccordionPanel({ xstyle, ...props }) {
100
+ return jsx(Accordion$1.Panel, {
101
+ ...props,
102
+ ...stylex.props(styles.panel, xstyle)
103
+ });
104
+ }
105
+ export { Accordion, AccordionHeader, AccordionItem, AccordionPanel, AccordionTrigger };
@@ -0,0 +1,16 @@
1
+ import type { ComponentPropsWithoutRef } from "react";
2
+ import type { StyleXStyles } from "@stylexjs/stylex";
3
+ export type AlertVariant = "neutral" | "danger";
4
+ export type AlertProps = Omit<ComponentPropsWithoutRef<"div">, "className" | "style"> & {
5
+ variant?: AlertVariant;
6
+ xstyle?: StyleXStyles;
7
+ };
8
+ export type AlertTitleProps = Omit<ComponentPropsWithoutRef<"div">, "className" | "style"> & {
9
+ xstyle?: StyleXStyles;
10
+ };
11
+ export type AlertDescriptionProps = Omit<ComponentPropsWithoutRef<"p">, "className" | "style"> & {
12
+ xstyle?: StyleXStyles;
13
+ };
14
+ export declare function Alert({ variant, xstyle, ...props }: AlertProps): import("react").JSX.Element;
15
+ export declare function AlertTitle({ xstyle, ...props }: AlertTitleProps): import("react").JSX.Element;
16
+ export declare function AlertDescription({ xstyle, ...props }: AlertDescriptionProps): import("react").JSX.Element;
package/dist/alert.js ADDED
@@ -0,0 +1,50 @@
1
+ import { colors } from "./semantic-colors.stylex.js";
2
+ import { fontSizes, fontWeights, lineHeights, radii, spacing, typography } from "./tokens.stylex.js";
3
+ import * as stylex from "@stylexjs/stylex";
4
+ import { jsx } from "react/jsx-runtime";
5
+ var styles = stylex.create({
6
+ root: {
7
+ display: "flex",
8
+ flexDirection: "column",
9
+ gap: spacing[1],
10
+ minInlineSize: 0,
11
+ paddingBlock: spacing[3],
12
+ paddingInline: spacing[4],
13
+ borderRadius: radii.md,
14
+ fontFamily: typography.fontFamily,
15
+ fontSize: fontSizes.sm,
16
+ lineHeight: lineHeights.normal,
17
+ overflowWrap: "anywhere"
18
+ },
19
+ title: { fontWeight: fontWeights.semibold },
20
+ description: { margin: 0 }
21
+ });
22
+ var variants = stylex.create({
23
+ neutral: {
24
+ backgroundColor: colors.muted,
25
+ color: colors.foreground
26
+ },
27
+ danger: {
28
+ backgroundColor: colors.danger,
29
+ color: colors.onDanger
30
+ }
31
+ });
32
+ function Alert({ variant = "neutral", xstyle, ...props }) {
33
+ return jsx("div", {
34
+ ...props,
35
+ ...stylex.props(styles.root, variants[variant], xstyle)
36
+ });
37
+ }
38
+ function AlertTitle({ xstyle, ...props }) {
39
+ return jsx("div", {
40
+ ...props,
41
+ ...stylex.props(styles.title, xstyle)
42
+ });
43
+ }
44
+ function AlertDescription({ xstyle, ...props }) {
45
+ return jsx("p", {
46
+ ...props,
47
+ ...stylex.props(styles.description, xstyle)
48
+ });
49
+ }
50
+ export { Alert, AlertDescription, AlertTitle };
@@ -0,0 +1,14 @@
1
+ import type { ComponentPropsWithoutRef, ReactNode } from "react";
2
+ import { Avatar as BaseUIAvatar } from "@base-ui/react/avatar";
3
+ import type { StyleXStyles } from "@stylexjs/stylex";
4
+ export type AvatarSize = "sm" | "md" | "lg";
5
+ type NativeAvatarProps = Omit<ComponentPropsWithoutRef<typeof BaseUIAvatar.Root>, "children" | "className" | "style">;
6
+ export type AvatarProps = NativeAvatarProps & {
7
+ src?: string;
8
+ alt: string;
9
+ fallback: ReactNode;
10
+ size?: AvatarSize;
11
+ xstyle?: StyleXStyles;
12
+ };
13
+ export declare function Avatar({ src, alt, fallback, size, xstyle, ...props }: AvatarProps): import("react").JSX.Element;
14
+ export {};
package/dist/avatar.js ADDED
@@ -0,0 +1,53 @@
1
+ import { colors } from "./semantic-colors.stylex.js";
2
+ import { fontSizes, fontWeights, radii } from "./tokens.stylex.js";
3
+ import * as stylex from "@stylexjs/stylex";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
6
+ var styles = stylex.create({
7
+ root: {
8
+ display: "inline-flex",
9
+ alignItems: "center",
10
+ justifyContent: "center",
11
+ flexShrink: 0,
12
+ overflow: "hidden",
13
+ borderRadius: radii.full,
14
+ backgroundColor: colors.muted,
15
+ color: colors.mutedForeground,
16
+ fontWeight: fontWeights.medium,
17
+ userSelect: "none"
18
+ },
19
+ image: {
20
+ width: "100%",
21
+ height: "100%",
22
+ objectFit: "cover"
23
+ }
24
+ });
25
+ var sizeStyles = stylex.create({
26
+ sm: {
27
+ width: "2rem",
28
+ height: "2rem",
29
+ fontSize: fontSizes.xs
30
+ },
31
+ md: {
32
+ width: "2.5rem",
33
+ height: "2.5rem",
34
+ fontSize: fontSizes.sm
35
+ },
36
+ lg: {
37
+ width: "3rem",
38
+ height: "3rem",
39
+ fontSize: fontSizes.md
40
+ }
41
+ });
42
+ function Avatar({ src, alt, fallback, size = "md", xstyle, ...props }) {
43
+ return jsxs(Avatar$1.Root, {
44
+ ...props,
45
+ ...stylex.props(styles.root, sizeStyles[size], xstyle),
46
+ children: [src ? jsx(Avatar$1.Image, {
47
+ src,
48
+ alt,
49
+ ...stylex.props(styles.image)
50
+ }) : null, jsx(Avatar$1.Fallback, { children: fallback })]
51
+ });
52
+ }
53
+ export { Avatar };
@@ -0,0 +1,11 @@
1
+ import type { ComponentPropsWithoutRef, ReactNode } from "react";
2
+ import type { StyleXStyles } from "@stylexjs/stylex";
3
+ type NativeBadgeProps = Omit<ComponentPropsWithoutRef<"span">, "children" | "className" | "style">;
4
+ export type BadgeVariant = "neutral" | "primary" | "danger" | "outline";
5
+ export type BadgeProps = NativeBadgeProps & {
6
+ children: ReactNode;
7
+ variant?: BadgeVariant;
8
+ xstyle?: StyleXStyles;
9
+ };
10
+ export declare function Badge({ children, variant, xstyle, ...props }: BadgeProps): import("react").JSX.Element;
11
+ export {};
package/dist/badge.js ADDED
@@ -0,0 +1,46 @@
1
+ import { colors } from "./semantic-colors.stylex.js";
2
+ import { borders, fontSizes, fontWeights, lineHeights, radii, spacing } from "./tokens.stylex.js";
3
+ import * as stylex from "@stylexjs/stylex";
4
+ import { jsx } from "react/jsx-runtime";
5
+ var styles = stylex.create({ root: {
6
+ display: "inline-flex",
7
+ alignItems: "center",
8
+ width: "fit-content",
9
+ paddingBlock: spacing[1],
10
+ paddingInline: spacing[2],
11
+ borderWidth: borders.outline,
12
+ borderStyle: "solid",
13
+ borderColor: "transparent",
14
+ borderRadius: radii.full,
15
+ fontSize: fontSizes.xs,
16
+ fontWeight: fontWeights.medium,
17
+ lineHeight: lineHeights.normal,
18
+ whiteSpace: "nowrap"
19
+ } });
20
+ var variantStyles = stylex.create({
21
+ neutral: {
22
+ backgroundColor: colors.muted,
23
+ color: colors.foreground
24
+ },
25
+ primary: {
26
+ backgroundColor: colors.primary,
27
+ color: colors.onPrimary
28
+ },
29
+ danger: {
30
+ backgroundColor: colors.danger,
31
+ color: colors.onDanger
32
+ },
33
+ outline: {
34
+ backgroundColor: "transparent",
35
+ color: colors.foreground,
36
+ borderColor: colors.border
37
+ }
38
+ });
39
+ function Badge({ children, variant = "neutral", xstyle, ...props }) {
40
+ return jsx("span", {
41
+ ...props,
42
+ ...stylex.props(styles.root, variantStyles[variant], xstyle),
43
+ children
44
+ });
45
+ }
46
+ export { Badge };
@@ -0,0 +1,26 @@
1
+ import type { ComponentPropsWithoutRef } from "react";
2
+ import type { StyleXStyles } from "@stylexjs/stylex";
3
+ export type BreadcrumbProps = Omit<ComponentPropsWithoutRef<"nav">, "className" | "style"> & {
4
+ xstyle?: StyleXStyles;
5
+ };
6
+ export type BreadcrumbListProps = Omit<ComponentPropsWithoutRef<"ol">, "className" | "style"> & {
7
+ xstyle?: StyleXStyles;
8
+ };
9
+ export type BreadcrumbItemProps = Omit<ComponentPropsWithoutRef<"li">, "className" | "style"> & {
10
+ xstyle?: StyleXStyles;
11
+ };
12
+ export type BreadcrumbLinkProps = Omit<ComponentPropsWithoutRef<"a">, "className" | "style"> & {
13
+ xstyle?: StyleXStyles;
14
+ };
15
+ export type BreadcrumbPageProps = Omit<ComponentPropsWithoutRef<"span">, "className" | "style"> & {
16
+ xstyle?: StyleXStyles;
17
+ };
18
+ export type BreadcrumbSeparatorProps = Omit<ComponentPropsWithoutRef<"span">, "className" | "style" | "aria-hidden"> & {
19
+ xstyle?: StyleXStyles;
20
+ };
21
+ export declare function Breadcrumb({ xstyle, ...props }: BreadcrumbProps): import("react").JSX.Element;
22
+ export declare function BreadcrumbList({ xstyle, ...props }: BreadcrumbListProps): import("react").JSX.Element;
23
+ export declare function BreadcrumbItem({ xstyle, ...props }: BreadcrumbItemProps): import("react").JSX.Element;
24
+ export declare function BreadcrumbLink({ xstyle, ...props }: BreadcrumbLinkProps): import("react").JSX.Element;
25
+ export declare function BreadcrumbPage({ xstyle, "aria-current": ariaCurrent, ...props }: BreadcrumbPageProps): import("react").JSX.Element;
26
+ export declare function BreadcrumbSeparator({ children, xstyle, ...props }: BreadcrumbSeparatorProps): import("react").JSX.Element;
@@ -0,0 +1,92 @@
1
+ import { colors } from "./semantic-colors.stylex.js";
2
+ import { fontSizes, lineHeights, spacing, typography } from "./tokens.stylex.js";
3
+ import * as stylex from "@stylexjs/stylex";
4
+ import { jsx } from "react/jsx-runtime";
5
+ var styles = stylex.create({
6
+ root: {
7
+ minInlineSize: 0,
8
+ color: colors.mutedForeground,
9
+ fontFamily: typography.fontFamily,
10
+ fontSize: fontSizes.sm,
11
+ lineHeight: lineHeights.normal
12
+ },
13
+ list: {
14
+ display: "flex",
15
+ flexWrap: "wrap",
16
+ alignItems: "center",
17
+ gap: spacing[2],
18
+ listStyleType: "none",
19
+ margin: 0,
20
+ padding: 0
21
+ },
22
+ item: {
23
+ display: "inline-flex",
24
+ alignItems: "center",
25
+ gap: spacing[2],
26
+ minInlineSize: 0,
27
+ overflowWrap: "anywhere"
28
+ },
29
+ link: {
30
+ color: {
31
+ default: colors.mutedForeground,
32
+ ":hover": colors.foreground
33
+ },
34
+ textDecorationLine: {
35
+ default: "none",
36
+ ":hover": "underline"
37
+ },
38
+ outlineStyle: "solid",
39
+ outlineWidth: "2px",
40
+ outlineOffset: "2px",
41
+ outlineColor: {
42
+ default: "transparent",
43
+ ":focus-visible": colors.focus
44
+ }
45
+ },
46
+ page: { color: colors.foreground },
47
+ separator: {
48
+ color: colors.mutedForeground,
49
+ flexShrink: 0
50
+ }
51
+ });
52
+ function Breadcrumb({ xstyle, ...props }) {
53
+ return jsx("nav", {
54
+ ...props,
55
+ ...stylex.props(styles.root, xstyle)
56
+ });
57
+ }
58
+ function BreadcrumbList({ xstyle, ...props }) {
59
+ return jsx("ol", {
60
+ role: "list",
61
+ ...props,
62
+ ...stylex.props(styles.list, xstyle)
63
+ });
64
+ }
65
+ function BreadcrumbItem({ xstyle, ...props }) {
66
+ return jsx("li", {
67
+ ...props,
68
+ ...stylex.props(styles.item, xstyle)
69
+ });
70
+ }
71
+ function BreadcrumbLink({ xstyle, ...props }) {
72
+ return jsx("a", {
73
+ ...props,
74
+ ...stylex.props(styles.link, xstyle)
75
+ });
76
+ }
77
+ function BreadcrumbPage({ xstyle, "aria-current": ariaCurrent = "page", ...props }) {
78
+ return jsx("span", {
79
+ ...props,
80
+ "aria-current": ariaCurrent,
81
+ ...stylex.props(styles.page, xstyle)
82
+ });
83
+ }
84
+ function BreadcrumbSeparator({ children = "/", xstyle, ...props }) {
85
+ return jsx("span", {
86
+ ...props,
87
+ "aria-hidden": "true",
88
+ ...stylex.props(styles.separator, xstyle),
89
+ children
90
+ });
91
+ }
92
+ export { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
@@ -0,0 +1,17 @@
1
+ import type { ComponentPropsWithoutRef, ReactNode } from "react";
2
+ import { Button as BaseUIButton } from "@base-ui/react/button";
3
+ import type { StyleXStyles } from "@stylexjs/stylex";
4
+ export type ButtonVariant = "primary" | "secondary" | "outline" | "danger" | "ghost" | "link";
5
+ export type ButtonSize = "sm" | "md" | "lg";
6
+ export type ButtonShape = "default" | "pill";
7
+ type NativeButtonProps = Omit<ComponentPropsWithoutRef<typeof BaseUIButton>, "children" | "className" | "style">;
8
+ export type ButtonProps = NativeButtonProps & {
9
+ children: ReactNode;
10
+ variant?: ButtonVariant;
11
+ size?: ButtonSize;
12
+ shape?: ButtonShape;
13
+ loading?: boolean;
14
+ xstyle?: StyleXStyles;
15
+ };
16
+ export declare function Button({ children, xstyle, variant, size, shape, loading, disabled, focusableWhenDisabled, ...props }: ButtonProps): import("react").JSX.Element;
17
+ export {};