@jonmilner/ui 0.0.0-stage → 0.1.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/THIRD_PARTY_NOTICES.md +51 -0
- package/dist/AlertDialog/index.d.mts +21 -0
- package/dist/AlertDialog/index.mjs +29 -0
- package/dist/Badge/Badge.css +2 -0
- package/dist/Badge/Badge.css.mjs +24 -0
- package/dist/Badge/index.d.mts +11 -0
- package/dist/Badge/index.mjs +54 -0
- package/dist/Box/Box.css +2 -0
- package/dist/Box/Box.css.mjs +8 -0
- package/dist/Box/index.d.mts +10 -0
- package/dist/Box/index.mjs +15 -0
- package/dist/Button/Button.css +2 -0
- package/dist/Button/Button.css.mjs +25 -0
- package/dist/Button/index.d.mts +20 -0
- package/dist/Button/index.mjs +97 -0
- package/dist/Checkbox/Checkbox.css +2 -0
- package/dist/Checkbox/Checkbox.css.mjs +8 -0
- package/dist/Checkbox/index.d.mts +6 -0
- package/dist/Checkbox/index.mjs +45 -0
- package/dist/Chip/Chip.css +2 -0
- package/dist/Chip/Chip.css.mjs +17 -0
- package/dist/Chip/index.d.mts +13 -0
- package/dist/Chip/index.mjs +73 -0
- package/dist/Clickable/Clickable.css +2 -0
- package/dist/Clickable/Clickable.css.mjs +8 -0
- package/dist/Clickable/index.d.mts +13 -0
- package/dist/Clickable/index.mjs +28 -0
- package/dist/Dialog/Dialog.css +2 -0
- package/dist/Dialog/Dialog.css.d.mts +3 -0
- package/dist/Dialog/Dialog.css.mjs +12 -0
- package/dist/Dialog/client.d.mts +12 -0
- package/dist/Dialog/client.mjs +31 -0
- package/dist/Dialog/index.d.mts +30 -0
- package/dist/Dialog/index.mjs +85 -0
- package/dist/Field/Field.css +2 -0
- package/dist/Field/Field.css.mjs +8 -0
- package/dist/Field/client.mjs +26 -0
- package/dist/Field/index.d.mts +20 -0
- package/dist/Field/index.mjs +88 -0
- package/dist/Heading/Heading.css +2 -0
- package/dist/Heading/Heading.css.mjs +8 -0
- package/dist/Heading/index.d.mts +9 -0
- package/dist/Heading/index.mjs +27 -0
- package/dist/Icon/Icon.css +2 -0
- package/dist/Icon/Icon.css.mjs +17 -0
- package/dist/Icon/index.d.mts +12 -0
- package/dist/Icon/index.mjs +24 -0
- package/dist/IconButton/IconButton.css +2 -0
- package/dist/IconButton/IconButton.css.mjs +24 -0
- package/dist/IconButton/index.d.mts +17 -0
- package/dist/IconButton/index.mjs +25 -0
- package/dist/Inline/Inline.css +2 -0
- package/dist/Inline/Inline.css.mjs +8 -0
- package/dist/Inline/index.d.mts +15 -0
- package/dist/Inline/index.mjs +17 -0
- package/dist/Menu/Menu.css +2 -0
- package/dist/Menu/Menu.css.mjs +8 -0
- package/dist/Menu/client.d.mts +9 -0
- package/dist/Menu/client.mjs +27 -0
- package/dist/Menu/index.d.mts +34 -0
- package/dist/Menu/index.mjs +107 -0
- package/dist/MultiSelect/MultiSelect.css +2 -0
- package/dist/MultiSelect/MultiSelect.css.mjs +8 -0
- package/dist/MultiSelect/client.d.mts +8 -0
- package/dist/MultiSelect/client.mjs +93 -0
- package/dist/MultiSelect/index.d.mts +23 -0
- package/dist/MultiSelect/index.mjs +75 -0
- package/dist/SearchField/SearchField.css +2 -0
- package/dist/SearchField/SearchField.css.mjs +27 -0
- package/dist/SearchField/client.mjs +71 -0
- package/dist/SearchField/index.d.mts +22 -0
- package/dist/SearchField/index.mjs +35 -0
- package/dist/Stack/Stack.css +2 -0
- package/dist/Stack/Stack.css.mjs +8 -0
- package/dist/Stack/index.d.mts +15 -0
- package/dist/Stack/index.mjs +15 -0
- package/dist/Tabs/Tabs.css +2 -0
- package/dist/Tabs/Tabs.css.mjs +8 -0
- package/dist/Tabs/index.d.mts +20 -0
- package/dist/Tabs/index.mjs +88 -0
- package/dist/Tag/Tag.css +2 -0
- package/dist/Tag/Tag.css.mjs +17 -0
- package/dist/Tag/index.d.mts +13 -0
- package/dist/Tag/index.mjs +82 -0
- package/dist/Text/Text.css +2 -0
- package/dist/Text/Text.css.mjs +32 -0
- package/dist/Text/index.d.mts +18 -0
- package/dist/Text/index.mjs +25 -0
- package/dist/Toast/Toast.css +2 -0
- package/dist/Toast/Toast.css.mjs +18 -0
- package/dist/Toast/client.d.mts +46 -0
- package/dist/Toast/client.mjs +219 -0
- package/dist/Toast/index.d.mts +7 -0
- package/dist/Toast/index.mjs +5 -0
- package/dist/base.css +6 -0
- package/dist/brands/brand.d.mts +9 -0
- package/dist/brands/brand.mjs +4 -0
- package/dist/brands/check-fonts.mjs +15 -0
- package/dist/brands/default.d.mts +4 -0
- package/dist/brands/default.mjs +74 -0
- package/dist/brands/font.d.mts +17 -0
- package/dist/brands/font.mjs +35 -0
- package/dist/brands/forced-colors.mjs +18 -0
- package/dist/brands/index.d.mts +8 -0
- package/dist/brands/index.mjs +5 -0
- package/dist/brands/metrics.mjs +40 -0
- package/dist/contrast/color.d.mts +3 -0
- package/dist/contrast/color.mjs +222 -0
- package/dist/contrast/contrast.d.mts +18 -0
- package/dist/contrast/contrast.mjs +52 -0
- package/dist/contrast/mixes.mjs +33 -0
- package/dist/docs/AlertDialog.md +113 -0
- package/dist/docs/Badge.md +76 -0
- package/dist/docs/Box.md +74 -0
- package/dist/docs/Button.md +98 -0
- package/dist/docs/Checkbox.md +107 -0
- package/dist/docs/Chip.md +92 -0
- package/dist/docs/Clickable.md +82 -0
- package/dist/docs/Dialog.md +166 -0
- package/dist/docs/Field.md +143 -0
- package/dist/docs/Heading.md +69 -0
- package/dist/docs/Icon.md +116 -0
- package/dist/docs/IconButton.md +83 -0
- package/dist/docs/Inline.md +79 -0
- package/dist/docs/Menu.md +181 -0
- package/dist/docs/MultiSelect.md +120 -0
- package/dist/docs/SearchField.md +106 -0
- package/dist/docs/Stack.md +79 -0
- package/dist/docs/Tabs.md +130 -0
- package/dist/docs/Tag.md +97 -0
- package/dist/docs/Text.md +90 -0
- package/dist/docs/Toast.md +115 -0
- package/dist/docs/llms.txt +33 -0
- package/dist/docs/manifest.json +2632 -0
- package/dist/docs/manifest.schema.json +96 -0
- package/dist/docs/migrations/README.md +27 -0
- package/dist/docs/theming.md +59 -0
- package/dist/icons/ArrowLeftIcon.d.mts +4 -0
- package/dist/icons/ArrowLeftIcon.mjs +11 -0
- package/dist/icons/ArrowRightIcon.d.mts +4 -0
- package/dist/icons/ArrowRightIcon.mjs +11 -0
- package/dist/icons/CheckIcon.d.mts +4 -0
- package/dist/icons/CheckIcon.mjs +11 -0
- package/dist/icons/ChevronDownIcon.d.mts +4 -0
- package/dist/icons/ChevronDownIcon.mjs +11 -0
- package/dist/icons/ChevronRightIcon.d.mts +4 -0
- package/dist/icons/ChevronRightIcon.mjs +11 -0
- package/dist/icons/CircleAlertIcon.d.mts +4 -0
- package/dist/icons/CircleAlertIcon.mjs +15 -0
- package/dist/icons/CircleCheckIcon.d.mts +4 -0
- package/dist/icons/CircleCheckIcon.mjs +15 -0
- package/dist/icons/CircleDotIcon.d.mts +4 -0
- package/dist/icons/CircleDotIcon.mjs +19 -0
- package/dist/icons/CircleSlashIcon.d.mts +4 -0
- package/dist/icons/CircleSlashIcon.mjs +15 -0
- package/dist/icons/GitMergeIcon.d.mts +4 -0
- package/dist/icons/GitMergeIcon.mjs +23 -0
- package/dist/icons/GitPullRequestClosedIcon.d.mts +4 -0
- package/dist/icons/GitPullRequestClosedIcon.mjs +23 -0
- package/dist/icons/GitPullRequestDraftIcon.d.mts +4 -0
- package/dist/icons/GitPullRequestDraftIcon.mjs +23 -0
- package/dist/icons/GitPullRequestIcon.d.mts +4 -0
- package/dist/icons/GitPullRequestIcon.mjs +23 -0
- package/dist/icons/InboxIcon.d.mts +4 -0
- package/dist/icons/InboxIcon.mjs +11 -0
- package/dist/icons/InfoIcon.d.mts +4 -0
- package/dist/icons/InfoIcon.mjs +15 -0
- package/dist/icons/LoaderCircleIcon.d.mts +4 -0
- package/dist/icons/LoaderCircleIcon.mjs +11 -0
- package/dist/icons/RefreshCwIcon.d.mts +4 -0
- package/dist/icons/RefreshCwIcon.mjs +15 -0
- package/dist/icons/SearchIcon.d.mts +4 -0
- package/dist/icons/SearchIcon.mjs +15 -0
- package/dist/icons/SettingsIcon.d.mts +4 -0
- package/dist/icons/SettingsIcon.mjs +15 -0
- package/dist/icons/XIcon.d.mts +4 -0
- package/dist/icons/XIcon.mjs +11 -0
- package/dist/icons/index.d.mts +25 -0
- package/dist/icons/index.mjs +45 -0
- package/dist/index.d.mts +27 -0
- package/dist/index.mjs +25 -0
- package/dist/popup/client.d.mts +9 -0
- package/dist/popup/client.mjs +31 -0
- package/dist/styles/atoms.css +2 -0
- package/dist/styles/atoms.css.d.mts +219 -0
- package/dist/styles/atoms.css.mjs +2579 -0
- package/dist/styles/button-fills.mjs +17 -0
- package/dist/styles/highlight.mjs +8 -0
- package/dist/styles/hover-tint.mjs +4 -0
- package/dist/styles/join.mjs +4 -0
- package/dist/styles/layers.css +2 -0
- package/dist/styles/part-props.d.mts +8 -0
- package/dist/styles/split-style-props.mjs +9 -0
- package/dist/testing/index.d.mts +4 -0
- package/dist/testing/index.mjs +3 -0
- package/dist/testing/motion.d.mts +22 -0
- package/dist/testing/motion.mjs +49 -0
- package/dist/theme/FontCheck.mjs +11 -0
- package/dist/theme/ThemeProvider.d.mts +15 -0
- package/dist/theme/ThemeProvider.mjs +23 -0
- package/dist/theme/define-theme.d.mts +9 -0
- package/dist/theme/define-theme.mjs +84 -0
- package/dist/theme/use-theme-container.mjs +15 -0
- package/dist/tokens/contract.d.mts +105 -0
- package/dist/tokens/contract.mjs +17 -0
- package/dist/tokens/index.d.mts +2 -0
- package/dist/tokens/index.mjs +1 -0
- package/dist/tokens/roles.d.mts +6 -0
- package/dist/tokens/roles.mjs +24 -0
- package/dist/tokens/scales.d.mts +95 -0
- package/dist/tokens/scales.mjs +98 -0
- package/dist/types.d.mts +3 -0
- package/package.json +159 -3
- package/README.md +0 -3
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
## Lucide
|
|
4
|
+
|
|
5
|
+
The components exported from `@jonmilner/ui/icons` are generated from [Lucide](https://lucide.dev) icons (lucide-static 1.61.0). Lucide's license follows.
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
ISC License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2026 Lucide Icons and Contributors
|
|
11
|
+
|
|
12
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
13
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
14
|
+
copyright notice and this permission notice appear in all copies.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
17
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
19
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
20
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
21
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
22
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
The following Lucide icons are derived from the Feather project:
|
|
27
|
+
|
|
28
|
+
airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
|
|
29
|
+
|
|
30
|
+
The MIT License (MIT) (for the icons listed above)
|
|
31
|
+
|
|
32
|
+
Copyright (c) 2013-present Cole Bemis
|
|
33
|
+
|
|
34
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
35
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
36
|
+
in the Software without restriction, including without limitation the rights
|
|
37
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
38
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
39
|
+
furnished to do so, subject to the following conditions:
|
|
40
|
+
|
|
41
|
+
The above copyright notice and this permission notice shall be included in all
|
|
42
|
+
copies or substantial portions of the Software.
|
|
43
|
+
|
|
44
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
45
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
46
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
47
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
48
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
49
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
50
|
+
SOFTWARE.
|
|
51
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DialogTrigger, DialogTriggerProps } from "../Dialog/client.mjs";
|
|
2
|
+
import "../Dialog/index.mjs";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
|
|
5
|
+
//#region src/AlertDialog/index.d.ts
|
|
6
|
+
export type AlertDialogTriggerProps = DialogTriggerProps;
|
|
7
|
+
export type AlertDialogProps = Pick<AlertDialog$1.Root.Props, "open" | "defaultOpen" | "onOpenChange" | "onOpenChangeComplete"> & {
|
|
8
|
+
cancelLabel?: string;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
confirmLabel: string;
|
|
11
|
+
description: Exclude<ReactNode, null | undefined | boolean>;
|
|
12
|
+
onConfirm: () => void;
|
|
13
|
+
title: Exclude<ReactNode, null | undefined | boolean>;
|
|
14
|
+
tone?: "default" | "danger";
|
|
15
|
+
};
|
|
16
|
+
declare function AlertDialogRoot({ title, description, confirmLabel, cancelLabel, tone, onConfirm, children, ...props }: AlertDialogProps): import("react").JSX.Element;
|
|
17
|
+
export declare const AlertDialog: typeof AlertDialogRoot & {
|
|
18
|
+
Trigger: typeof DialogTrigger;
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Button as e } from "../Button/index.mjs";
|
|
2
|
+
import { PopupScope as t } from "../popup/client.mjs";
|
|
3
|
+
import { Dialog as n } from "../Dialog/index.mjs";
|
|
4
|
+
import { AlertDialog as r } from "@base-ui/react/alert-dialog";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
//#region src/AlertDialog/index.tsx
|
|
7
|
+
function o({ title: o, description: s, confirmLabel: c, cancelLabel: l = "Cancel", tone: u = "default", onConfirm: d, children: f, ...p }) {
|
|
8
|
+
return /* @__PURE__ */ i(t, { children: /* @__PURE__ */ a(r.Root, {
|
|
9
|
+
...p,
|
|
10
|
+
children: [f, /* @__PURE__ */ i(n.Popup, {
|
|
11
|
+
description: s,
|
|
12
|
+
size: "sm",
|
|
13
|
+
title: o,
|
|
14
|
+
children: /* @__PURE__ */ a(n.Actions, { children: [/* @__PURE__ */ i(n.Close, {
|
|
15
|
+
variant: "secondary",
|
|
16
|
+
children: l
|
|
17
|
+
}), /* @__PURE__ */ i(r.Close, {
|
|
18
|
+
onClick: (e) => {
|
|
19
|
+
e.currentTarget.closest("[data-closed]") || d();
|
|
20
|
+
},
|
|
21
|
+
render: /* @__PURE__ */ i(e, { variant: u === "danger" ? "danger" : "primary" }),
|
|
22
|
+
children: c
|
|
23
|
+
})] })
|
|
24
|
+
})]
|
|
25
|
+
}) });
|
|
26
|
+
}
|
|
27
|
+
var s = Object.assign(o, { Trigger: n.Trigger });
|
|
28
|
+
//#endregion
|
|
29
|
+
export { s as AlertDialog };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer tokens, reset, atoms, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.stack, components.text, components.badge, components.button, components.chip, components.field, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.search-field, components.tabs, components.tag, components.toast;
|
|
2
|
+
@layer components.badge{._1ixfil10{white-space:nowrap;border-width:var(--space-1);border-style:solid;border-color:#0000}@media (forced-colors:active){._1ixfil10{color:canvastext;background-color:canvas;border-color:canvastext}}}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "../styles/layers.css";
|
|
2
|
+
import "./Badge.css";
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { createRuntimeFn as e } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
6
|
+
//#region src/Badge/Badge.css.ts
|
|
7
|
+
var t = "_1ixfil10", n = e({
|
|
8
|
+
defaultClassName: "_1ixfil11",
|
|
9
|
+
variantClassNames: {
|
|
10
|
+
variant: {
|
|
11
|
+
neutral: "_1ixfil12",
|
|
12
|
+
accent: "_1ixfil13",
|
|
13
|
+
danger: "_1ixfil14"
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
sm: "_1ixfil15",
|
|
17
|
+
med: "_1ixfil16"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {},
|
|
21
|
+
compoundVariants: []
|
|
22
|
+
});
|
|
23
|
+
//#endregion
|
|
24
|
+
export { n as badge, t as root };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OmitEach } from "../types.mjs";
|
|
2
|
+
import { StyleProps } from "../Box/index.mjs";
|
|
3
|
+
import { ComponentPropsWithRef } from "react";
|
|
4
|
+
//#region src/Badge/index.d.ts
|
|
5
|
+
export type BadgeOwnProps = {
|
|
6
|
+
size?: "sm" | "med";
|
|
7
|
+
variant?: "neutral" | "accent" | "danger";
|
|
8
|
+
};
|
|
9
|
+
export type BadgeProps = StyleProps & BadgeOwnProps & OmitEach<ComponentPropsWithRef<"span">, keyof StyleProps | keyof BadgeOwnProps>;
|
|
10
|
+
export declare function Badge({ variant, size, display, paddingInline, paddingBlock, borderRadius, backgroundColor, color, className, children, ...props }: BadgeProps): import("react").JSX.Element | null;
|
|
11
|
+
//#endregion
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { join as e } from "../styles/join.mjs";
|
|
2
|
+
import { Box as t } from "../Box/index.mjs";
|
|
3
|
+
import { Text as n } from "../Text/index.mjs";
|
|
4
|
+
import { badge as r, root as i } from "./Badge.css.mjs";
|
|
5
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
6
|
+
//#region src/Badge/index.tsx
|
|
7
|
+
var o = {
|
|
8
|
+
neutral: {
|
|
9
|
+
backgroundColor: "bgMuted",
|
|
10
|
+
color: "fgMuted"
|
|
11
|
+
},
|
|
12
|
+
accent: {
|
|
13
|
+
backgroundColor: "accent",
|
|
14
|
+
color: "accentFg"
|
|
15
|
+
},
|
|
16
|
+
danger: {
|
|
17
|
+
backgroundColor: "danger",
|
|
18
|
+
color: "dangerFg"
|
|
19
|
+
}
|
|
20
|
+
}, s = {
|
|
21
|
+
sm: {
|
|
22
|
+
paddingInline: "6",
|
|
23
|
+
paddingBlock: "4"
|
|
24
|
+
},
|
|
25
|
+
med: {
|
|
26
|
+
paddingInline: "8",
|
|
27
|
+
paddingBlock: "6"
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
function c({ variant: c = "neutral", size: l = "med", display: u = "inline-block", paddingInline: d = s[l].paddingInline, paddingBlock: f = s[l].paddingBlock, borderRadius: p = "sm", backgroundColor: m = o[c].backgroundColor, color: h = o[c].color, className: g, children: _, ...v }) {
|
|
31
|
+
return _ == null || typeof _ == "boolean" || _ === "" ? null : /* @__PURE__ */ a(t, {
|
|
32
|
+
...v,
|
|
33
|
+
as: "span",
|
|
34
|
+
backgroundColor: m,
|
|
35
|
+
borderRadius: p,
|
|
36
|
+
className: e(i, r({
|
|
37
|
+
variant: c,
|
|
38
|
+
size: l
|
|
39
|
+
}), g),
|
|
40
|
+
color: h,
|
|
41
|
+
display: u,
|
|
42
|
+
paddingBlock: f,
|
|
43
|
+
paddingInline: d,
|
|
44
|
+
children: /* @__PURE__ */ a(n, {
|
|
45
|
+
as: "span",
|
|
46
|
+
font: "label",
|
|
47
|
+
size: l,
|
|
48
|
+
weight: "medium",
|
|
49
|
+
children: _
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { c as Badge };
|
package/dist/Box/Box.css
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer tokens, reset, atoms, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.stack, components.text, components.badge, components.button, components.chip, components.field, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.search-field, components.tabs, components.tag, components.toast;
|
|
2
|
+
@layer components.box{._11caph0{box-sizing:border-box}}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Sprinkles } from "../styles/atoms.css.mjs";
|
|
2
|
+
import { OmitEach } from "../types.mjs";
|
|
3
|
+
import { ComponentPropsWithRef, ElementType } from "react";
|
|
4
|
+
//#region src/Box/index.d.ts
|
|
5
|
+
export type StyleProps = { [K in keyof Sprinkles]?: Sprinkles[K] | null | false; };
|
|
6
|
+
export type BoxProps<T extends ElementType = "div"> = {
|
|
7
|
+
as?: T;
|
|
8
|
+
} & StyleProps & OmitEach<ComponentPropsWithRef<T>, "as" | keyof StyleProps>;
|
|
9
|
+
export declare function Box<T extends ElementType = "div">({ as, className, ...props }: BoxProps<T>): import("react").JSX.Element;
|
|
10
|
+
//#endregion
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { sprinkles as e } from "../styles/atoms.css.mjs";
|
|
2
|
+
import { join as t } from "../styles/join.mjs";
|
|
3
|
+
import { splitStyleProps as n } from "../styles/split-style-props.mjs";
|
|
4
|
+
import { root as r } from "./Box.css.mjs";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
//#region src/Box/index.tsx
|
|
7
|
+
function a({ as: a, className: o, ...s }) {
|
|
8
|
+
let c = a ?? "div", [l, u] = n(s), d = Object.fromEntries(Object.entries(l).filter(([, e]) => e !== null && e !== !1));
|
|
9
|
+
return /* @__PURE__ */ i(c, {
|
|
10
|
+
...u,
|
|
11
|
+
className: t(r, e(d), o)
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { a as Box };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer tokens, reset, atoms, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.stack, components.text, components.badge, components.button, components.chip, components.field, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.search-field, components.tabs, components.tag, components.toast;
|
|
2
|
+
@keyframes hkhd8a{to{opacity:.25}}@layer components.button{.hkhd80{border-width:var(--space-1);border-style:solid}.hkhd80[aria-disabled=true]{background-color:var(--color-bg-muted);border-color:var(--color-border-strong);color:var(--color-fg-muted);border-style:dashed}.hkhd80:not([aria-disabled=true]):not([aria-busy=true])[aria-expanded=true]{background-image:linear-gradient(color-mix(in srgb, var(--color-fg) 15%, transparent), color-mix(in srgb, var(--color-fg) 15%, transparent));box-shadow:inset 0 0 0 var(--space-1) currentColor}.hkhd82{border-color:#0000}.hkhd83{border-color:var(--color-border-strong)}.hkhd84{border-color:#0000}.hkhd88{justify-items:center}.hkhd89{grid-area:1/1}.hkhd80[aria-busy=true] .hkhd89{opacity:0}.hkhd8b{grid-area:1/1}.hkhd8c{animation-name:hkhd8a;animation-duration:var(--duration-slow);animation-timing-function:var(--easing-standard);animation-iteration-count:infinite;animation-direction:alternate}.hkhd8c:nth-child(2){animation-delay:calc(var(--duration-slow) / 3)}.hkhd8c:nth-child(3){animation-delay:calc(var(--duration-slow) * 2 / 3)}@media (hover:hover){.hkhd80:not([aria-disabled=true]):not([aria-busy=true]):hover{background-image:linear-gradient(color-mix(in srgb, var(--color-fg) 15%, transparent), color-mix(in srgb, var(--color-fg) 15%, transparent))}}@media (forced-colors:active){.hkhd80{forced-color-adjust:none}.hkhd80:not([aria-disabled=true]):not([aria-busy=true]):hover{background-image:none}.hkhd80[aria-disabled=true]{color:graytext;border-color:graytext}.hkhd80:not([aria-disabled=true]):not([aria-busy=true])[aria-expanded=true]{background-image:none}.hkhd84{--color-danger:var(--color-accent);--color-danger-fg:var(--color-accent-fg)}}@media (prefers-reduced-motion:reduce){.hkhd8c{animation-name:none}}}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import "../styles/layers.css";
|
|
2
|
+
import "./Button.css";
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { createRuntimeFn as e } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
6
|
+
//#region src/Button/Button.css.ts
|
|
7
|
+
var t = "hkhd80", n = e({
|
|
8
|
+
defaultClassName: "hkhd81",
|
|
9
|
+
variantClassNames: {
|
|
10
|
+
variant: {
|
|
11
|
+
primary: "hkhd82",
|
|
12
|
+
secondary: "hkhd83",
|
|
13
|
+
danger: "hkhd84"
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
sm: "hkhd85",
|
|
17
|
+
med: "hkhd86",
|
|
18
|
+
lg: "hkhd87"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {},
|
|
22
|
+
compoundVariants: []
|
|
23
|
+
}), r = "hkhd88", i = "hkhd89", a = "hkhd8b", o = "hkhd8c";
|
|
24
|
+
//#endregion
|
|
25
|
+
export { n as button, i as content, o as dot, t as root, a as spinner, r as stack };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OmitEach } from "../types.mjs";
|
|
2
|
+
import { StyleProps } from "../Box/index.mjs";
|
|
3
|
+
import { ClickableOwnProps } from "../Clickable/index.mjs";
|
|
4
|
+
import { IconProps } from "../Icon/index.mjs";
|
|
5
|
+
import { ComponentPropsWithRef, ComponentType, ElementType } from "react";
|
|
6
|
+
//#region src/Button/index.d.ts
|
|
7
|
+
export type ButtonOwnProps = {
|
|
8
|
+
iconEnd?: ComponentType<IconProps>;
|
|
9
|
+
iconStart?: ComponentType<IconProps>;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
size?: "sm" | "med" | "lg";
|
|
12
|
+
variant?: "primary" | "secondary" | "danger";
|
|
13
|
+
};
|
|
14
|
+
export type ButtonProps<T extends ElementType = "button"> = {
|
|
15
|
+
as?: T;
|
|
16
|
+
} & StyleProps & ButtonOwnProps & Omit<ClickableOwnProps, "busy"> & OmitEach<ComponentPropsWithRef<T>, "as" | keyof StyleProps | keyof ClickableOwnProps | keyof ButtonOwnProps | "aria-disabled" | "aria-busy">;
|
|
17
|
+
export declare function Button<T extends ElementType = "button">({ variant, size, loading: loadingProp, iconStart: IconStart, iconEnd: IconEnd, minBlockSize, paddingBlock, paddingInline, gap, borderRadius, backgroundColor, color, className, children, "aria-busy": ariaBusy, ...props }: ButtonProps<T> & {
|
|
18
|
+
"aria-busy"?: boolean | "true" | "false";
|
|
19
|
+
}): import("react").JSX.Element;
|
|
20
|
+
//#endregion
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { join as e } from "../styles/join.mjs";
|
|
2
|
+
import { Box as t } from "../Box/index.mjs";
|
|
3
|
+
import { Clickable as n } from "../Clickable/index.mjs";
|
|
4
|
+
import { Icon as r } from "../Icon/index.mjs";
|
|
5
|
+
import { fills as i } from "../styles/button-fills.mjs";
|
|
6
|
+
import { Text as a } from "../Text/index.mjs";
|
|
7
|
+
import { button as o, content as s, root as c, stack as l } from "./Button.css.mjs";
|
|
8
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
|
+
//#region src/Button/index.tsx
|
|
10
|
+
var f = {
|
|
11
|
+
sm: {
|
|
12
|
+
minBlockSize: "sm",
|
|
13
|
+
paddingBlock: "6",
|
|
14
|
+
paddingInline: "12",
|
|
15
|
+
gap: "4"
|
|
16
|
+
},
|
|
17
|
+
med: {
|
|
18
|
+
minBlockSize: "med",
|
|
19
|
+
paddingBlock: "8",
|
|
20
|
+
paddingInline: "16",
|
|
21
|
+
gap: "8"
|
|
22
|
+
},
|
|
23
|
+
lg: {
|
|
24
|
+
minBlockSize: "lg",
|
|
25
|
+
paddingBlock: "12",
|
|
26
|
+
paddingInline: "20",
|
|
27
|
+
gap: "8"
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
function p({ variant: p = "secondary", size: m = "med", loading: h = !1, iconStart: g, iconEnd: _, minBlockSize: v = f[m].minBlockSize, paddingBlock: y = f[m].paddingBlock, paddingInline: b = f[m].paddingInline, gap: x = f[m].gap, borderRadius: S = "med", backgroundColor: C = i[p].backgroundColor, color: w = i[p].color, className: T, children: E, "aria-busy": D, ...O }) {
|
|
31
|
+
let k = h || String(D) === "true";
|
|
32
|
+
return /* @__PURE__ */ u(n, {
|
|
33
|
+
...O,
|
|
34
|
+
backgroundColor: C,
|
|
35
|
+
borderRadius: S,
|
|
36
|
+
busy: k,
|
|
37
|
+
className: e(c, o({
|
|
38
|
+
variant: p,
|
|
39
|
+
size: m
|
|
40
|
+
}), T),
|
|
41
|
+
color: w,
|
|
42
|
+
minBlockSize: v,
|
|
43
|
+
paddingBlock: y,
|
|
44
|
+
paddingInline: b,
|
|
45
|
+
children: /* @__PURE__ */ d(t, {
|
|
46
|
+
alignItems: "center",
|
|
47
|
+
as: "span",
|
|
48
|
+
className: l,
|
|
49
|
+
display: "grid",
|
|
50
|
+
children: [/* @__PURE__ */ d(t, {
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
as: "span",
|
|
53
|
+
className: s,
|
|
54
|
+
display: "flex",
|
|
55
|
+
gap: x,
|
|
56
|
+
children: [
|
|
57
|
+
g && /* @__PURE__ */ u(g, { size: m }),
|
|
58
|
+
E != null && E !== !1 && E !== "" && /* @__PURE__ */ u(a, {
|
|
59
|
+
as: "span",
|
|
60
|
+
font: "label",
|
|
61
|
+
size: m,
|
|
62
|
+
weight: "medium",
|
|
63
|
+
children: E
|
|
64
|
+
}),
|
|
65
|
+
_ && /* @__PURE__ */ u(_, { size: m })
|
|
66
|
+
]
|
|
67
|
+
}), k && /* @__PURE__ */ d(r, {
|
|
68
|
+
className: "hkhd8b",
|
|
69
|
+
fill: "currentColor",
|
|
70
|
+
size: m,
|
|
71
|
+
stroke: "none",
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ u("circle", {
|
|
74
|
+
className: "hkhd8c",
|
|
75
|
+
cx: "5",
|
|
76
|
+
cy: "12",
|
|
77
|
+
r: "2"
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ u("circle", {
|
|
80
|
+
className: "hkhd8c",
|
|
81
|
+
cx: "12",
|
|
82
|
+
cy: "12",
|
|
83
|
+
r: "2"
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ u("circle", {
|
|
86
|
+
className: "hkhd8c",
|
|
87
|
+
cx: "19",
|
|
88
|
+
cy: "12",
|
|
89
|
+
r: "2"
|
|
90
|
+
})
|
|
91
|
+
]
|
|
92
|
+
})]
|
|
93
|
+
})
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
//#endregion
|
|
97
|
+
export { p as Button };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer tokens, reset, atoms, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.stack, components.text, components.badge, components.button, components.chip, components.field, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.search-field, components.tabs, components.tag, components.toast;
|
|
2
|
+
@layer components.checkbox{._1tze2y80{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}._1tze2y80:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}._1tze2y80[aria-disabled=true]{cursor:not-allowed}._1tze2y80[aria-readonly=true]{cursor:default}._1tze2y81{inline-size:var(--space-16);block-size:var(--space-16);border:var(--space-1) solid var(--color-border-strong);border-radius:var(--radius-sm);background-color:var(--color-bg);color:var(--color-accent-fg);forced-color-adjust:none;place-items:center;display:grid}._1tze2y80:not([aria-checked=true],[aria-checked=mixed],[aria-invalid=true],[aria-disabled=true],[aria-readonly=true]):hover ._1tze2y81{border-color:var(--color-fg)}._1tze2y80:is([aria-checked=true],[aria-checked=mixed]) ._1tze2y81{background-color:var(--color-accent);border-color:var(--color-accent)}._1tze2y80[aria-disabled=true] ._1tze2y81{border-style:dashed;border-color:var(--color-border-strong);background-color:var(--color-bg-muted);color:var(--color-fg-muted)}._1tze2y80[aria-invalid=true] ._1tze2y81{border-width:var(--space-2);border-color:var(--color-danger)}._1tze2y82{fill:none;stroke:currentColor;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round;block-size:100%;inline-size:100%}._1tze2y80[aria-checked=mixed] ._1tze2y83,._1tze2y80:not([aria-checked=mixed]) ._1tze2y84{display:none}}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "../styles/layers.css";
|
|
2
|
+
import "./Checkbox.css";
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
//#region src/Checkbox/Checkbox.css.ts
|
|
6
|
+
var e = "_1tze2y80", t = "_1tze2y81", n = "_1tze2y82", r = "_1tze2y83", i = "_1tze2y84";
|
|
7
|
+
//#endregion
|
|
8
|
+
export { t as box, i as dash, n as mark, e as root, r as tick };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PartProps } from "../styles/part-props.mjs";
|
|
2
|
+
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
3
|
+
//#region src/Checkbox/index.d.ts
|
|
4
|
+
export type CheckboxProps = PartProps<Omit<Checkbox$1.Root.Props, "nativeButton">>;
|
|
5
|
+
export declare function Checkbox({ display, alignItems, justifyContent, flexShrink, minInlineSize, minBlockSize, className, style, ...props }: CheckboxProps): import("react").JSX.Element;
|
|
6
|
+
//#endregion
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { join as e } from "../styles/join.mjs";
|
|
2
|
+
import { splitStyleProps as t } from "../styles/split-style-props.mjs";
|
|
3
|
+
import { Box as n } from "../Box/index.mjs";
|
|
4
|
+
import { box as r, dash as i, mark as a, root as o, tick as s } from "./Checkbox.css.mjs";
|
|
5
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
+
import { Checkbox as u } from "@base-ui/react/checkbox";
|
|
7
|
+
//#region src/Checkbox/index.tsx
|
|
8
|
+
function d({ display: d = "inline-flex", alignItems: f = "center", justifyContent: p = "center", flexShrink: m = 0, minInlineSize: h = "xs", minBlockSize: g = "xs", className: _, style: v, ...y }) {
|
|
9
|
+
let [b, x] = t(y);
|
|
10
|
+
return /* @__PURE__ */ c(u.Root, {
|
|
11
|
+
...x,
|
|
12
|
+
render: /* @__PURE__ */ c(n, {
|
|
13
|
+
as: "span",
|
|
14
|
+
display: d,
|
|
15
|
+
alignItems: f,
|
|
16
|
+
justifyContent: p,
|
|
17
|
+
flexShrink: m,
|
|
18
|
+
minInlineSize: h,
|
|
19
|
+
minBlockSize: g,
|
|
20
|
+
...b,
|
|
21
|
+
className: e(o, _),
|
|
22
|
+
style: v
|
|
23
|
+
}),
|
|
24
|
+
children: /* @__PURE__ */ c(n, {
|
|
25
|
+
as: "span",
|
|
26
|
+
className: r,
|
|
27
|
+
children: /* @__PURE__ */ l(u.Indicator, {
|
|
28
|
+
render: /* @__PURE__ */ c("svg", {
|
|
29
|
+
"aria-hidden": "true",
|
|
30
|
+
className: a,
|
|
31
|
+
viewBox: "0 0 16 16"
|
|
32
|
+
}),
|
|
33
|
+
children: [/* @__PURE__ */ c("path", {
|
|
34
|
+
className: s,
|
|
35
|
+
d: "M3.5 8.5l3 3 6-7"
|
|
36
|
+
}), /* @__PURE__ */ c("path", {
|
|
37
|
+
className: i,
|
|
38
|
+
d: "M4 8h8"
|
|
39
|
+
})]
|
|
40
|
+
})
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { d as Checkbox };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer tokens, reset, atoms, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.stack, components.text, components.badge, components.button, components.chip, components.field, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.search-field, components.tabs, components.tag, components.toast;
|
|
2
|
+
@layer components.chip{._1l071c80{border-width:var(--space-1);border-style:solid;border-color:var(--color-border-strong);transition:background-color var(--duration-fast) var(--easing-standard), color var(--duration-fast) var(--easing-standard)}._1l071c80[aria-disabled=true]{background-color:var(--color-bg-muted);border-color:var(--color-border-strong);color:var(--color-fg-muted);border-style:dashed}._1l071c80[aria-pressed=true]:not([aria-disabled=true]){background-color:var(--color-accent);color:var(--color-accent-fg);border-color:#0000}._1l071c84{display:none}[aria-pressed=true]>._1l071c84{display:inline-block}@media (hover:hover){._1l071c80:not([aria-disabled=true]):hover{background-image:linear-gradient(color-mix(in srgb, var(--color-fg) 15%, transparent), color-mix(in srgb, var(--color-fg) 15%, transparent))}}@media (forced-colors:active){._1l071c80{forced-color-adjust:none}._1l071c80:not([aria-disabled=true]):hover{background-image:none}._1l071c80[aria-disabled=true]{color:graytext;border-color:graytext}._1l071c80[aria-pressed=true]:not([aria-disabled=true]){color:highlighttext;background-color:highlight;border-color:highlight}}}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "../styles/layers.css";
|
|
2
|
+
import "./Chip.css";
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { createRuntimeFn as e } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
6
|
+
//#region src/Chip/Chip.css.ts
|
|
7
|
+
var t = "_1l071c80", n = e({
|
|
8
|
+
defaultClassName: "_1l071c81",
|
|
9
|
+
variantClassNames: { size: {
|
|
10
|
+
sm: "_1l071c82",
|
|
11
|
+
med: "_1l071c83"
|
|
12
|
+
} },
|
|
13
|
+
defaultVariants: {},
|
|
14
|
+
compoundVariants: []
|
|
15
|
+
}), r = "_1l071c84";
|
|
16
|
+
//#endregion
|
|
17
|
+
export { r as check, n as chip, t as root };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PartProps } from "../styles/part-props.mjs";
|
|
2
|
+
import { Toggle } from "@base-ui/react/toggle";
|
|
3
|
+
import { ToggleGroup } from "@base-ui/react/toggle-group";
|
|
4
|
+
//#region src/Chip/index.d.ts
|
|
5
|
+
export type ChipOwnProps = {
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
size?: "sm" | "med";
|
|
8
|
+
};
|
|
9
|
+
export type ChipProps = PartProps<Omit<Toggle.Props, "nativeButton" | keyof ChipOwnProps>> & ChipOwnProps;
|
|
10
|
+
export type ChipGroupProps = PartProps<Omit<ToggleGroup.Props, "disabled">>;
|
|
11
|
+
export declare function Chip({ size, disabled, children, minBlockSize, paddingBlock, paddingInline, gap, borderRadius, backgroundColor, color, className, style, ...props }: ChipProps): import("react").JSX.Element;
|
|
12
|
+
export declare function ChipGroup({ orientation, display, flexDirection, flexWrap, alignItems, gap, className, style, ...props }: ChipGroupProps): import("react").JSX.Element;
|
|
13
|
+
//#endregion
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { join as e } from "../styles/join.mjs";
|
|
2
|
+
import { splitStyleProps as t } from "../styles/split-style-props.mjs";
|
|
3
|
+
import { Box as n } from "../Box/index.mjs";
|
|
4
|
+
import { Clickable as r } from "../Clickable/index.mjs";
|
|
5
|
+
import { Text as i } from "../Text/index.mjs";
|
|
6
|
+
import { CheckIcon as a } from "../icons/CheckIcon.mjs";
|
|
7
|
+
import { check as o, chip as s, root as c } from "./Chip.css.mjs";
|
|
8
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
9
|
+
import { Toggle as d } from "@base-ui/react/toggle";
|
|
10
|
+
import { ToggleGroup as f } from "@base-ui/react/toggle-group";
|
|
11
|
+
//#region src/Chip/index.tsx
|
|
12
|
+
var p = {
|
|
13
|
+
sm: {
|
|
14
|
+
minBlockSize: "xs",
|
|
15
|
+
paddingBlock: "4",
|
|
16
|
+
paddingInline: "8",
|
|
17
|
+
gap: "4"
|
|
18
|
+
},
|
|
19
|
+
med: {
|
|
20
|
+
minBlockSize: "sm",
|
|
21
|
+
paddingBlock: "6",
|
|
22
|
+
paddingInline: "12",
|
|
23
|
+
gap: "6"
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
function m({ size: n = "med", disabled: f = !1, children: m, minBlockSize: h = p[n].minBlockSize, paddingBlock: g = p[n].paddingBlock, paddingInline: _ = p[n].paddingInline, gap: v = p[n].gap, borderRadius: y = "full", backgroundColor: b = "bg", color: x = "fg", className: S, style: C, ...w }) {
|
|
27
|
+
let [T, E] = t(w);
|
|
28
|
+
return /* @__PURE__ */ u(d, {
|
|
29
|
+
...E,
|
|
30
|
+
render: /* @__PURE__ */ l(r, {
|
|
31
|
+
backgroundColor: b,
|
|
32
|
+
borderRadius: y,
|
|
33
|
+
color: x,
|
|
34
|
+
disabled: f,
|
|
35
|
+
gap: v,
|
|
36
|
+
minBlockSize: h,
|
|
37
|
+
paddingBlock: g,
|
|
38
|
+
paddingInline: _,
|
|
39
|
+
...T,
|
|
40
|
+
className: e(c, s({ size: n }), S),
|
|
41
|
+
style: C
|
|
42
|
+
}),
|
|
43
|
+
children: [/* @__PURE__ */ l(a, {
|
|
44
|
+
className: o,
|
|
45
|
+
size: "sm"
|
|
46
|
+
}), /* @__PURE__ */ l(i, {
|
|
47
|
+
as: "span",
|
|
48
|
+
font: "label",
|
|
49
|
+
size: "sm",
|
|
50
|
+
weight: "medium",
|
|
51
|
+
children: m
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function h({ orientation: e = "horizontal", display: r = "flex", flexDirection: i = e === "vertical" ? "column" : "row", flexWrap: a = "wrap", alignItems: o = e === "vertical" ? "start" : "center", gap: s = "8", className: c, style: u, ...d }) {
|
|
56
|
+
let [p, m] = t(d);
|
|
57
|
+
return /* @__PURE__ */ l(f, {
|
|
58
|
+
...m,
|
|
59
|
+
orientation: e,
|
|
60
|
+
render: /* @__PURE__ */ l(n, {
|
|
61
|
+
alignItems: o,
|
|
62
|
+
display: r,
|
|
63
|
+
flexDirection: i,
|
|
64
|
+
flexWrap: a,
|
|
65
|
+
gap: s,
|
|
66
|
+
...p,
|
|
67
|
+
className: c,
|
|
68
|
+
style: u
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
export { m as Chip, h as ChipGroup };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer tokens, reset, atoms, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.stack, components.text, components.badge, components.button, components.chip, components.field, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.search-field, components.tabs, components.tag, components.toast;
|
|
2
|
+
@layer components.clickable{._10dxgnx0{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}._10dxgnx0:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}._10dxgnx0[aria-disabled=true]{cursor:not-allowed}._10dxgnx0[aria-busy=true]{cursor:progress}}@layer reset{._10dxgnx0{appearance:none;font:inherit;color:inherit;text-align:inherit;background:0 0;border:0;padding:0;text-decoration:none}}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OmitEach } from "../types.mjs";
|
|
2
|
+
import { StyleProps } from "../Box/index.mjs";
|
|
3
|
+
import { ComponentPropsWithRef, ElementType } from "react";
|
|
4
|
+
//#region src/Clickable/index.d.ts
|
|
5
|
+
export type ClickableOwnProps = {
|
|
6
|
+
busy?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type ClickableProps<T extends ElementType = "button"> = {
|
|
10
|
+
as?: T;
|
|
11
|
+
} & StyleProps & ClickableOwnProps & OmitEach<ComponentPropsWithRef<T>, "as" | keyof StyleProps | keyof ClickableOwnProps | "aria-disabled" | "aria-busy">;
|
|
12
|
+
export declare function Clickable<T extends ElementType = "button">({ as, disabled, busy, display, alignItems, justifyContent, minInlineSize, minBlockSize, className, ...props }: ClickableProps<T>): import("react").JSX.Element;
|
|
13
|
+
//#endregion
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { join as e } from "../styles/join.mjs";
|
|
3
|
+
import { Box as t } from "../Box/index.mjs";
|
|
4
|
+
import { root as n } from "./Clickable.css.mjs";
|
|
5
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
6
|
+
//#region src/Clickable/index.tsx
|
|
7
|
+
function i({ as: i, disabled: a = !1, busy: o = !1, display: s = "inline-flex", alignItems: c = "center", justifyContent: l = "center", minInlineSize: u = "xs", minBlockSize: d = "xs", className: f, ...p }) {
|
|
8
|
+
let m = i ?? "button", { onClick: h, onAuxClick: g, "aria-disabled": _, "aria-busy": v, ...y } = p, b = a || String(_) === "true", x = o || String(v) === "true", S = (e) => (t) => {
|
|
9
|
+
b || x ? t.preventDefault() : e?.(t);
|
|
10
|
+
};
|
|
11
|
+
return /* @__PURE__ */ r(t, {
|
|
12
|
+
alignItems: c,
|
|
13
|
+
as: m,
|
|
14
|
+
display: s,
|
|
15
|
+
justifyContent: l,
|
|
16
|
+
minBlockSize: d,
|
|
17
|
+
minInlineSize: u,
|
|
18
|
+
type: m === "button" ? "button" : void 0,
|
|
19
|
+
...y,
|
|
20
|
+
"aria-busy": x || void 0,
|
|
21
|
+
"aria-disabled": b || void 0,
|
|
22
|
+
className: e(n, f),
|
|
23
|
+
onAuxClick: S(g),
|
|
24
|
+
onClick: S(h)
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { i as Clickable };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer tokens, reset, atoms, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.stack, components.text, components.badge, components.button, components.chip, components.field, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.search-field, components.tabs, components.tag, components.toast;
|
|
2
|
+
@layer components.dialog{.iyoziv0{background-color:color-mix(in srgb, var(--color-shadow) 40%, transparent);transition:opacity var(--duration-med) var(--easing-standard);inset-block:0;inset-inline:0}.iyoziv0[data-starting-style],.iyoziv0[data-ending-style]{opacity:0}.iyoziv1{max-block-size:calc(100% - 2 * var(--space-16));border:var(--space-1) solid var(--color-border);transition:opacity var(--duration-med) var(--easing-standard), scale var(--duration-med) var(--easing-enter);inset-block:0;inset-inline:0}.iyoziv1:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}.iyoziv1[data-starting-style],.iyoziv1[data-ending-style]{opacity:0;scale:calc(1 - var(--scale-med))}.iyoziv2{inline-size:min(100% - 2 * var(--space-16), 6 * var(--space-64))}.iyoziv3{inline-size:min(100% - 2 * var(--space-16), 8 * var(--space-64))}.iyoziv4{inline-size:min(100% - 2 * var(--space-16), 10 * var(--space-64))}}
|