@recordair/ui-core 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/LICENSE +29 -0
- package/README.md +12 -0
- package/dist/Accordion.d.ts +17 -0
- package/dist/Accordion.d.ts.map +1 -0
- package/dist/Accordion.js +25 -0
- package/dist/Accordion.js.map +1 -0
- package/dist/Alert.d.ts +11 -0
- package/dist/Alert.d.ts.map +1 -0
- package/dist/Alert.js +18 -0
- package/dist/Alert.js.map +1 -0
- package/dist/Avatar.d.ts +12 -0
- package/dist/Avatar.d.ts.map +1 -0
- package/dist/Avatar.js +19 -0
- package/dist/Avatar.js.map +1 -0
- package/dist/Badge.d.ts +14 -0
- package/dist/Badge.d.ts.map +1 -0
- package/dist/Badge.js +25 -0
- package/dist/Badge.js.map +1 -0
- package/dist/Button.d.ts +26 -0
- package/dist/Button.d.ts.map +1 -0
- package/dist/Button.js +8 -0
- package/dist/Button.js.map +1 -0
- package/dist/ButtonGroup.d.ts +8 -0
- package/dist/ButtonGroup.d.ts.map +1 -0
- package/dist/ButtonGroup.js +11 -0
- package/dist/ButtonGroup.js.map +1 -0
- package/dist/Card.d.ts +13 -0
- package/dist/Card.d.ts.map +1 -0
- package/dist/Card.js +20 -0
- package/dist/Card.js.map +1 -0
- package/dist/CardContent.d.ts +8 -0
- package/dist/CardContent.d.ts.map +1 -0
- package/dist/CardContent.js +11 -0
- package/dist/CardContent.js.map +1 -0
- package/dist/CardDescription.d.ts +6 -0
- package/dist/CardDescription.d.ts.map +1 -0
- package/dist/CardDescription.js +5 -0
- package/dist/CardDescription.js.map +1 -0
- package/dist/CardFooter.d.ts +8 -0
- package/dist/CardFooter.d.ts.map +1 -0
- package/dist/CardFooter.js +5 -0
- package/dist/CardFooter.js.map +1 -0
- package/dist/CardHeader.d.ts +9 -0
- package/dist/CardHeader.d.ts.map +1 -0
- package/dist/CardHeader.js +5 -0
- package/dist/CardHeader.js.map +1 -0
- package/dist/CardMedia.d.ts +9 -0
- package/dist/CardMedia.d.ts.map +1 -0
- package/dist/CardMedia.js +10 -0
- package/dist/CardMedia.js.map +1 -0
- package/dist/CardTitle.d.ts +8 -0
- package/dist/CardTitle.d.ts.map +1 -0
- package/dist/CardTitle.js +8 -0
- package/dist/CardTitle.js.map +1 -0
- package/dist/Checkbox.d.ts +10 -0
- package/dist/Checkbox.d.ts.map +1 -0
- package/dist/Checkbox.js +8 -0
- package/dist/Checkbox.js.map +1 -0
- package/dist/ChoiceChip.d.ts +9 -0
- package/dist/ChoiceChip.d.ts.map +1 -0
- package/dist/ChoiceChip.js +5 -0
- package/dist/ChoiceChip.js.map +1 -0
- package/dist/ContentBlock.d.ts +19 -0
- package/dist/ContentBlock.d.ts.map +1 -0
- package/dist/ContentBlock.js +18 -0
- package/dist/ContentBlock.js.map +1 -0
- package/dist/Divider.d.ts +7 -0
- package/dist/Divider.d.ts.map +1 -0
- package/dist/Divider.js +9 -0
- package/dist/Divider.js.map +1 -0
- package/dist/EmptyState.d.ts +11 -0
- package/dist/EmptyState.d.ts.map +1 -0
- package/dist/EmptyState.js +5 -0
- package/dist/EmptyState.js.map +1 -0
- package/dist/Field.d.ts +13 -0
- package/dist/Field.d.ts.map +1 -0
- package/dist/Field.js +7 -0
- package/dist/Field.js.map +1 -0
- package/dist/IconBox.d.ts +13 -0
- package/dist/IconBox.d.ts.map +1 -0
- package/dist/IconBox.js +18 -0
- package/dist/IconBox.js.map +1 -0
- package/dist/IconButton.d.ts +12 -0
- package/dist/IconButton.d.ts.map +1 -0
- package/dist/IconButton.js +10 -0
- package/dist/IconButton.js.map +1 -0
- package/dist/Input.d.ts +14 -0
- package/dist/Input.d.ts.map +1 -0
- package/dist/Input.js +14 -0
- package/dist/Input.js.map +1 -0
- package/dist/KeyValue.d.ts +9 -0
- package/dist/KeyValue.d.ts.map +1 -0
- package/dist/KeyValue.js +5 -0
- package/dist/KeyValue.js.map +1 -0
- package/dist/LinkButton.d.ts +14 -0
- package/dist/LinkButton.d.ts.map +1 -0
- package/dist/LinkButton.js +5 -0
- package/dist/LinkButton.js.map +1 -0
- package/dist/LinkTabs.d.ts +17 -0
- package/dist/LinkTabs.d.ts.map +1 -0
- package/dist/LinkTabs.js +10 -0
- package/dist/LinkTabs.js.map +1 -0
- package/dist/MenuSelect.d.ts +16 -0
- package/dist/MenuSelect.d.ts.map +1 -0
- package/dist/MenuSelect.js +41 -0
- package/dist/MenuSelect.js.map +1 -0
- package/dist/Modal.d.ts +14 -0
- package/dist/Modal.d.ts.map +1 -0
- package/dist/Modal.js +59 -0
- package/dist/Modal.js.map +1 -0
- package/dist/NativeSelect.d.ts +8 -0
- package/dist/NativeSelect.d.ts.map +1 -0
- package/dist/NativeSelect.js +8 -0
- package/dist/NativeSelect.js.map +1 -0
- package/dist/NavigationList.d.ts +20 -0
- package/dist/NavigationList.d.ts.map +1 -0
- package/dist/NavigationList.js +23 -0
- package/dist/NavigationList.js.map +1 -0
- package/dist/Progress.d.ts +9 -0
- package/dist/Progress.d.ts.map +1 -0
- package/dist/Progress.js +8 -0
- package/dist/Progress.js.map +1 -0
- package/dist/Radio.d.ts +12 -0
- package/dist/Radio.d.ts.map +1 -0
- package/dist/Radio.js +8 -0
- package/dist/Radio.js.map +1 -0
- package/dist/RatingStars.d.ts +12 -0
- package/dist/RatingStars.d.ts.map +1 -0
- package/dist/RatingStars.js +13 -0
- package/dist/RatingStars.js.map +1 -0
- package/dist/ScrollAnchor.d.ts +8 -0
- package/dist/ScrollAnchor.d.ts.map +1 -0
- package/dist/ScrollAnchor.js +12 -0
- package/dist/ScrollAnchor.js.map +1 -0
- package/dist/SearchInput.d.ts +10 -0
- package/dist/SearchInput.d.ts.map +1 -0
- package/dist/SearchInput.js +9 -0
- package/dist/SearchInput.js.map +1 -0
- package/dist/Select.d.ts +12 -0
- package/dist/Select.d.ts.map +1 -0
- package/dist/Select.js +12 -0
- package/dist/Select.js.map +1 -0
- package/dist/Skeleton.d.ts +8 -0
- package/dist/Skeleton.d.ts.map +1 -0
- package/dist/Skeleton.js +5 -0
- package/dist/Skeleton.js.map +1 -0
- package/dist/Spinner.d.ts +10 -0
- package/dist/Spinner.d.ts.map +1 -0
- package/dist/Spinner.js +10 -0
- package/dist/Spinner.js.map +1 -0
- package/dist/SubmitButton.d.ts +10 -0
- package/dist/SubmitButton.d.ts.map +1 -0
- package/dist/SubmitButton.js +10 -0
- package/dist/SubmitButton.js.map +1 -0
- package/dist/Tabs.d.ts +17 -0
- package/dist/Tabs.d.ts.map +1 -0
- package/dist/Tabs.js +8 -0
- package/dist/Tabs.js.map +1 -0
- package/dist/Textarea.d.ts +10 -0
- package/dist/Textarea.d.ts.map +1 -0
- package/dist/Textarea.js +8 -0
- package/dist/Textarea.js.map +1 -0
- package/dist/Toast.d.ts +13 -0
- package/dist/Toast.d.ts.map +1 -0
- package/dist/Toast.js +26 -0
- package/dist/Toast.js.map +1 -0
- package/dist/Toggle.d.ts +13 -0
- package/dist/Toggle.d.ts.map +1 -0
- package/dist/Toggle.js +21 -0
- package/dist/Toggle.js.map +1 -0
- package/dist/buttonStyles.d.ts +14 -0
- package/dist/buttonStyles.d.ts.map +1 -0
- package/dist/buttonStyles.js +16 -0
- package/dist/buttonStyles.js.map +1 -0
- package/dist/classNames.d.ts +4 -0
- package/dist/classNames.d.ts.map +1 -0
- package/dist/classNames.js +3 -0
- package/dist/classNames.js.map +1 -0
- package/dist/icons/GoogleIcon.d.ts +6 -0
- package/dist/icons/GoogleIcon.d.ts.map +1 -0
- package/dist/icons/GoogleIcon.js +4 -0
- package/dist/icons/GoogleIcon.js.map +1 -0
- package/dist/icons/XSocialIcon.d.ts +6 -0
- package/dist/icons/XSocialIcon.d.ts.map +1 -0
- package/dist/icons/XSocialIcon.js +4 -0
- package/dist/icons/XSocialIcon.js.map +1 -0
- package/dist/icons/index.d.ts +7 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +4 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.d.ts +85 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/package.json +34 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Record'air Design System Proprietary License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pierre-Alexandre Monneau. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software and its associated documentation are proprietary. Their public
|
|
6
|
+
availability, including distribution through the npm registry, does not place
|
|
7
|
+
them in the public domain and does not grant an open-source license or any
|
|
8
|
+
other permission to use them.
|
|
9
|
+
|
|
10
|
+
No person or entity may use, reproduce, copy, modify, adapt, translate, create
|
|
11
|
+
derivative works from, distribute, publish, sublicense, sell, rent, host,
|
|
12
|
+
commercialize, reverse engineer, or incorporate this software into another
|
|
13
|
+
product or service without the copyright holder's prior express written
|
|
14
|
+
permission.
|
|
15
|
+
|
|
16
|
+
Any authorized use is limited to the rights and conditions stated in a
|
|
17
|
+
separate written agreement issued by the copyright holder. All rights not
|
|
18
|
+
expressly granted in such an agreement are reserved.
|
|
19
|
+
|
|
20
|
+
The Record'air name, visual identity, design tokens, components, and related
|
|
21
|
+
assets remain the exclusive property of their respective rights holders. No
|
|
22
|
+
trademark or branding rights are granted by this license.
|
|
23
|
+
|
|
24
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
26
|
+
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. TO THE MAXIMUM EXTENT
|
|
27
|
+
PERMITTED BY LAW, THE COPYRIGHT HOLDER SHALL NOT BE LIABLE FOR ANY CLAIM,
|
|
28
|
+
DAMAGES, OR OTHER LIABILITY ARISING FROM OR IN CONNECTION WITH THE SOFTWARE OR
|
|
29
|
+
ITS USE.
|
package/README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# @recordair/ui-core
|
|
2
|
+
|
|
3
|
+
Primitives React accessibles, typées et indépendantes de Record’air.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { Accordion, Button, Field, Input } from "@recordair/ui-core";
|
|
7
|
+
import { SearchIcon } from "@recordair/ui-core/icons";
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Le projet consommateur doit charger un thème compatible, par exemple `@recordair/theme-recordair`.
|
|
11
|
+
|
|
12
|
+
Les composants émettent uniquement des événements React et n’importent ni route, ni service, ni traduction applicative.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
type AccordionItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
content: ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
type AccordionProps = {
|
|
9
|
+
items: readonly AccordionItem[];
|
|
10
|
+
defaultOpenIds?: readonly string[];
|
|
11
|
+
allowMultiple?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
declare const Accordion: ({ items, defaultOpenIds, allowMultiple, className, }: AccordionProps) => import("react").JSX.Element;
|
|
15
|
+
export { Accordion };
|
|
16
|
+
export type { AccordionItem, AccordionProps };
|
|
17
|
+
//# sourceMappingURL=Accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../src/Accordion.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,KAAK,aAAa,GAAG;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,SAAS,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,KAAK,EAAE,SAAS,aAAa,EAAE,CAAC;IAChC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,QAAA,MAAM,SAAS,GAAI,sDAKhB,cAAc,gCA0DhB,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId, useState } from "react";
|
|
4
|
+
import { ChevronDownIcon } from "./icons";
|
|
5
|
+
import { classNames } from "./classNames";
|
|
6
|
+
const Accordion = ({ items, defaultOpenIds = [], allowMultiple = false, className, }) => {
|
|
7
|
+
const instanceId = useId();
|
|
8
|
+
const [openIds, setOpenIds] = useState(defaultOpenIds);
|
|
9
|
+
const toggle = (id) => {
|
|
10
|
+
const isOpen = openIds.includes(id);
|
|
11
|
+
if (isOpen) {
|
|
12
|
+
setOpenIds(openIds.filter((openId) => openId !== id));
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
setOpenIds(allowMultiple ? [...openIds, id] : [id]);
|
|
16
|
+
};
|
|
17
|
+
return (_jsx("div", { className: classNames("w-full", className), children: items.map((item) => {
|
|
18
|
+
const isOpen = openIds.includes(item.id);
|
|
19
|
+
const triggerId = `${instanceId}-${item.id}-trigger`;
|
|
20
|
+
const panelId = `${instanceId}-${item.id}-panel`;
|
|
21
|
+
return (_jsxs("section", { className: "border-b border-neutral-200", children: [_jsx("h3", { children: _jsxs("button", { id: triggerId, type: "button", "aria-controls": panelId, "aria-expanded": isOpen, disabled: item.disabled, onClick: () => toggle(item.id), className: "flex w-full items-center justify-between gap-4 py-6 text-left text-heading-md font-semibold leading-heading text-neutral-900 transition hover:text-brand-primary focus:outline-none focus-visible:shadow-focus disabled:cursor-not-allowed disabled:opacity-50", children: [_jsx("span", { children: item.title }), _jsx(ChevronDownIcon, { "aria-hidden": true, className: classNames("size-5 shrink-0 text-brand-primary transition-transform", isOpen && "rotate-180") })] }) }), _jsx("div", { id: panelId, role: "region", "aria-labelledby": triggerId, hidden: !isOpen, className: "pb-6 pr-10 text-body leading-copy text-neutral-700", children: item.content })] }, item.id));
|
|
22
|
+
}) }));
|
|
23
|
+
};
|
|
24
|
+
export { Accordion };
|
|
25
|
+
//# sourceMappingURL=Accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../src/Accordion.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAgB1C,MAAM,SAAS,GAAG,CAAC,EACjB,KAAK,EACL,cAAc,GAAG,EAAE,EACnB,aAAa,GAAG,KAAK,EACrB,SAAS,GACM,EAAE,EAAE;IACnB,MAAM,UAAU,GAAG,KAAK,EAAE,CAAC;IAC3B,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAoB,cAAc,CAAC,CAAC;IAE1E,MAAM,MAAM,GAAG,CAAC,EAAU,EAAE,EAAE;QAC5B,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAEpC,IAAI,MAAM,EAAE,CAAC;YACX,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC;YACtD,OAAO;QACT,CAAC;QAED,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACtD,CAAC,CAAC;IAEF,OAAO,CACL,cAAK,SAAS,EAAE,UAAU,CAAC,QAAQ,EAAE,SAAS,CAAC,YAC5C,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YAClB,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACzC,MAAM,SAAS,GAAG,GAAG,UAAU,IAAI,IAAI,CAAC,EAAE,UAAU,CAAC;YACrD,MAAM,OAAO,GAAG,GAAG,UAAU,IAAI,IAAI,CAAC,EAAE,QAAQ,CAAC;YAEjD,OAAO,CACL,mBAAuB,SAAS,EAAC,6BAA6B,aAC5D,uBACE,kBACE,EAAE,EAAE,SAAS,EACb,IAAI,EAAC,QAAQ,mBACE,OAAO,mBACP,MAAM,EACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAC9B,SAAS,EAAC,gQAAgQ,aAE1Q,yBAAO,IAAI,CAAC,KAAK,GAAQ,EACzB,KAAC,eAAe,yBAEd,SAAS,EAAE,UAAU,CACnB,yDAAyD,EACzD,MAAM,IAAI,YAAY,CACvB,GACD,IACK,GACN,EACL,cACE,EAAE,EAAE,OAAO,EACX,IAAI,EAAC,QAAQ,qBACI,SAAS,EAC1B,MAAM,EAAE,CAAC,MAAM,EACf,SAAS,EAAC,oDAAoD,YAE7D,IAAI,CAAC,OAAO,GACT,KA7BM,IAAI,CAAC,EAAE,CA8BX,CACX,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
package/dist/Alert.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
type AlertTone = "info" | "success" | "warning" | "error";
|
|
3
|
+
type AlertProps = HTMLAttributes<HTMLDivElement> & {
|
|
4
|
+
tone?: AlertTone;
|
|
5
|
+
title: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
declare const Alert: ({ tone, title, icon, className, children, ...rest }: AlertProps) => import("react").JSX.Element;
|
|
9
|
+
export { Alert };
|
|
10
|
+
export type { AlertProps, AlertTone };
|
|
11
|
+
//# sourceMappingURL=Alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../src/Alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvD,KAAK,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAE1D,KAAK,UAAU,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACjD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAgBF,QAAA,MAAM,KAAK,GAAI,qDAA8D,UAAU,gCAQtF,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC"}
|
package/dist/Alert.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CircleHelpIcon, CheckIcon, TriangleAlertIcon, XIcon } from "./icons";
|
|
3
|
+
import { classNames } from "./classNames";
|
|
4
|
+
const toneClasses = {
|
|
5
|
+
info: "border-info-border bg-info-bg text-info-text",
|
|
6
|
+
success: "border-success-border bg-success-bg text-success-text",
|
|
7
|
+
warning: "border-warning-border bg-warning-bg text-warning-text",
|
|
8
|
+
error: "border-error-border bg-error-bg text-error-text",
|
|
9
|
+
};
|
|
10
|
+
const toneIcons = {
|
|
11
|
+
info: _jsx(CircleHelpIcon, { "aria-hidden": true, className: "size-5" }),
|
|
12
|
+
success: _jsx(CheckIcon, { "aria-hidden": true, className: "size-5" }),
|
|
13
|
+
warning: _jsx(TriangleAlertIcon, { "aria-hidden": true, className: "size-5" }),
|
|
14
|
+
error: _jsx(XIcon, { "aria-hidden": true, className: "size-5" }),
|
|
15
|
+
};
|
|
16
|
+
const Alert = ({ tone = "info", title, icon, className, children, ...rest }) => (_jsxs("div", { role: "alert", className: classNames("flex gap-3 rounded-md border p-4", toneClasses[tone], className), ...rest, children: [_jsx("span", { className: "shrink-0", children: icon ?? toneIcons[tone] }), _jsxs("span", { className: "flex flex-col gap-1", children: [_jsx("strong", { className: "text-sm font-semibold", children: title }), children ? _jsx("span", { className: "text-label leading-5", children: children }) : null] })] }));
|
|
17
|
+
export { Alert };
|
|
18
|
+
//# sourceMappingURL=Alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alert.js","sourceRoot":"","sources":["../src/Alert.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAU1C,MAAM,WAAW,GAA8B;IAC7C,IAAI,EAAE,8CAA8C;IACpD,OAAO,EAAE,uDAAuD;IAChE,OAAO,EAAE,uDAAuD;IAChE,KAAK,EAAE,iDAAiD;CACzD,CAAC;AAEF,MAAM,SAAS,GAAiC;IAC9C,IAAI,EAAE,KAAC,cAAc,yBAAa,SAAS,EAAC,QAAQ,GAAG;IACvD,OAAO,EAAE,KAAC,SAAS,yBAAa,SAAS,EAAC,QAAQ,GAAG;IACrD,OAAO,EAAE,KAAC,iBAAiB,yBAAa,SAAS,EAAC,QAAQ,GAAG;IAC7D,KAAK,EAAE,KAAC,KAAK,yBAAa,SAAS,EAAC,QAAQ,GAAG;CAChD,CAAC;AAEF,MAAM,KAAK,GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAc,EAAE,EAAE,CAAC,CAC1F,eAAK,IAAI,EAAC,OAAO,EAAC,SAAS,EAAE,UAAU,CAAC,kCAAkC,EAAE,WAAW,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,KAAM,IAAI,aACjH,eAAM,SAAS,EAAC,UAAU,YAAE,IAAI,IAAI,SAAS,CAAC,IAAI,CAAC,GAAQ,EAC3D,gBAAM,SAAS,EAAC,qBAAqB,aACnC,iBAAQ,SAAS,EAAC,uBAAuB,YAAE,KAAK,GAAU,EACzD,QAAQ,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,sBAAsB,YAAE,QAAQ,GAAQ,CAAC,CAAC,CAAC,IAAI,IACtE,IACH,CACP,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
package/dist/Avatar.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
type AvatarSize = "sm" | "md" | "lg" | "xl";
|
|
3
|
+
type AvatarProps = HTMLAttributes<HTMLSpanElement> & {
|
|
4
|
+
name: string;
|
|
5
|
+
src?: string | null;
|
|
6
|
+
size?: AvatarSize;
|
|
7
|
+
alt?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const Avatar: ({ name, src, size, alt, className, ...rest }: AvatarProps) => import("react").JSX.Element;
|
|
10
|
+
export { Avatar };
|
|
11
|
+
export type { AvatarProps, AvatarSize };
|
|
12
|
+
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../src/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,KAAK,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,KAAK,WAAW,GAAG,cAAc,CAAC,eAAe,CAAC,GAAG;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AASF,QAAA,MAAM,MAAM,GAAI,8CAA0D,WAAW,gCAoBpF,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/Avatar.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { classNames } from "./classNames";
|
|
3
|
+
const sizeClasses = {
|
|
4
|
+
sm: "size-[var(--size-avatar-sm)] text-xs",
|
|
5
|
+
md: "size-[var(--size-avatar-md)] text-sm",
|
|
6
|
+
lg: "size-[var(--size-avatar-lg)] text-base",
|
|
7
|
+
xl: "size-[var(--size-avatar-xl)] text-xl",
|
|
8
|
+
};
|
|
9
|
+
const Avatar = ({ name, src, size = "md", alt = "", className, ...rest }) => {
|
|
10
|
+
const initials = name
|
|
11
|
+
.split(" ")
|
|
12
|
+
.filter(Boolean)
|
|
13
|
+
.slice(0, 2)
|
|
14
|
+
.map((part) => part.slice(0, 1).toUpperCase())
|
|
15
|
+
.join("");
|
|
16
|
+
return (_jsx("span", { className: classNames("grid shrink-0 place-items-center overflow-hidden rounded-full bg-gradient-to-br from-brand-gradient-from to-brand-gradient-to font-semibold text-neutral-0", sizeClasses[size], className), ...rest, children: src ? _jsx("img", { src: src, alt: alt, loading: "lazy", className: "size-full object-cover" }) : _jsx("span", { "aria-hidden": true, children: initials }) }));
|
|
17
|
+
};
|
|
18
|
+
export { Avatar };
|
|
19
|
+
//# sourceMappingURL=Avatar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../src/Avatar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAW1C,MAAM,WAAW,GAA+B;IAC9C,EAAE,EAAE,sCAAsC;IAC1C,EAAE,EAAE,sCAAsC;IAC1C,EAAE,EAAE,wCAAwC;IAC5C,EAAE,EAAE,sCAAsC;CAC3C,CAAC;AAEF,MAAM,MAAM,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,GAAG,EAAE,EAAE,SAAS,EAAE,GAAG,IAAI,EAAe,EAAE,EAAE;IACvF,MAAM,QAAQ,GAAG,IAAI;SAClB,KAAK,CAAC,GAAG,CAAC;SACV,MAAM,CAAC,OAAO,CAAC;SACf,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;SACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;SAC7C,IAAI,CAAC,EAAE,CAAC,CAAC;IAEZ,OAAO,CACL,eACE,SAAS,EAAE,UAAU,CACnB,4JAA4J,EAC5J,WAAW,CAAC,IAAI,CAAC,EACjB,SAAS,CACV,KACG,IAAI,YAEP,GAAG,CAAC,CAAC,CAAC,cAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAC,MAAM,EAAC,SAAS,EAAC,wBAAwB,GAAG,CAAC,CAAC,CAAC,8CAAmB,QAAQ,GAAQ,GACrH,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
package/dist/Badge.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
type BadgeTone = "neutral" | "brand" | "success" | "error" | "warning" | "info";
|
|
3
|
+
type BadgeSize = "sm" | "md";
|
|
4
|
+
type BadgeProps = HTMLAttributes<HTMLSpanElement> & {
|
|
5
|
+
tone?: BadgeTone;
|
|
6
|
+
size?: BadgeSize;
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
dot?: boolean;
|
|
9
|
+
pill?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const Badge: ({ tone, size, icon, dot, pill, className, children, ...rest }: BadgeProps) => import("react").JSX.Element;
|
|
12
|
+
export { Badge };
|
|
13
|
+
export type { BadgeProps, BadgeSize, BadgeTone };
|
|
14
|
+
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../src/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,KAAK,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAChF,KAAK,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7B,KAAK,UAAU,GAAG,cAAc,CAAC,eAAe,CAAC,GAAG;IAClD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAyBF,QAAA,MAAM,KAAK,GAAI,+DASZ,UAAU,gCAeZ,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC"}
|
package/dist/Badge.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { classNames } from "./classNames";
|
|
3
|
+
const toneClasses = {
|
|
4
|
+
neutral: "bg-neutral-100 text-neutral-700",
|
|
5
|
+
brand: "bg-role-studio-bg text-role-studio-text",
|
|
6
|
+
success: "bg-success-bg text-success-text",
|
|
7
|
+
error: "bg-error-bg text-error-text",
|
|
8
|
+
warning: "bg-warning-bg text-warning-text",
|
|
9
|
+
info: "bg-info-bg text-info-text",
|
|
10
|
+
};
|
|
11
|
+
const sizeClasses = {
|
|
12
|
+
sm: "gap-1 px-2 py-0.5 text-xs",
|
|
13
|
+
md: "gap-2 px-3 py-1 text-label",
|
|
14
|
+
};
|
|
15
|
+
const dotClasses = {
|
|
16
|
+
neutral: "bg-neutral-500",
|
|
17
|
+
brand: "bg-brand-primary",
|
|
18
|
+
success: "bg-success",
|
|
19
|
+
error: "bg-error",
|
|
20
|
+
warning: "bg-warning",
|
|
21
|
+
info: "bg-info",
|
|
22
|
+
};
|
|
23
|
+
const Badge = ({ tone = "neutral", size = "sm", icon, dot = false, pill = true, className, children, ...rest }) => (_jsxs("span", { className: classNames("inline-flex w-fit items-center font-semibold tracking-wide", pill ? "rounded-full" : "rounded-sm", toneClasses[tone], sizeClasses[size], className), ...rest, children: [dot ? _jsx("span", { "aria-hidden": true, className: classNames("size-1.5 rounded-full", dotClasses[tone]) }) : null, icon, children] }));
|
|
24
|
+
export { Badge };
|
|
25
|
+
//# sourceMappingURL=Badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../src/Badge.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAa1C,MAAM,WAAW,GAA8B;IAC7C,OAAO,EAAE,iCAAiC;IAC1C,KAAK,EAAE,yCAAyC;IAChD,OAAO,EAAE,iCAAiC;IAC1C,KAAK,EAAE,6BAA6B;IACpC,OAAO,EAAE,iCAAiC;IAC1C,IAAI,EAAE,2BAA2B;CAClC,CAAC;AAEF,MAAM,WAAW,GAA8B;IAC7C,EAAE,EAAE,2BAA2B;IAC/B,EAAE,EAAE,4BAA4B;CACjC,CAAC;AAEF,MAAM,UAAU,GAA8B;IAC5C,OAAO,EAAE,gBAAgB;IACzB,KAAK,EAAE,kBAAkB;IACzB,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,UAAU;IACjB,OAAO,EAAE,YAAY;IACrB,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF,MAAM,KAAK,GAAG,CAAC,EACb,IAAI,GAAG,SAAS,EAChB,IAAI,GAAG,IAAI,EACX,IAAI,EACJ,GAAG,GAAG,KAAK,EACX,IAAI,GAAG,IAAI,EACX,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACI,EAAE,EAAE,CAAC,CAChB,gBACE,SAAS,EAAE,UAAU,CACnB,4DAA4D,EAC5D,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY,EACpC,WAAW,CAAC,IAAI,CAAC,EACjB,WAAW,CAAC,IAAI,CAAC,EACjB,SAAS,CACV,KACG,IAAI,aAEP,GAAG,CAAC,CAAC,CAAC,oCAAkB,SAAS,EAAE,UAAU,CAAC,uBAAuB,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,GAAI,CAAC,CAAC,CAAC,IAAI,EACnG,IAAI,EACJ,QAAQ,IACJ,CACR,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
package/dist/Button.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { ButtonShape, ButtonSize, ButtonVariant } from "./buttonStyles";
|
|
3
|
+
type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
4
|
+
variant?: ButtonVariant;
|
|
5
|
+
size?: ButtonSize;
|
|
6
|
+
shape?: ButtonShape;
|
|
7
|
+
leadingIcon?: ReactNode;
|
|
8
|
+
trailingIcon?: ReactNode;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
loadingLabel?: string;
|
|
11
|
+
block?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare const Button: import("react").ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
14
|
+
variant?: ButtonVariant;
|
|
15
|
+
size?: ButtonSize;
|
|
16
|
+
shape?: ButtonShape;
|
|
17
|
+
leadingIcon?: ReactNode;
|
|
18
|
+
trailingIcon?: ReactNode;
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
loadingLabel?: string;
|
|
21
|
+
block?: boolean;
|
|
22
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
23
|
+
export { Button };
|
|
24
|
+
export type { ButtonProps };
|
|
25
|
+
export type { ButtonShape, ButtonSize, ButtonVariant } from "./buttonStyles";
|
|
26
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../src/Button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE7E,KAAK,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAC3D,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,QAAA,MAAM,MAAM;cAVA,aAAa;WAChB,UAAU;YACT,WAAW;kBACL,SAAS;mBACR,SAAS;cACd,OAAO;mBACF,MAAM;YACb,OAAO;qDAwCf,CAAC;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,CAAC;AAC5B,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/Button.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { buttonClassName } from "./buttonStyles";
|
|
4
|
+
const Button = forwardRef(function Button({ variant = "primary", size = "md", shape = "default", leadingIcon, trailingIcon, loading = false, loadingLabel = "Chargement", block = false, disabled, className, children, ...rest }, ref) {
|
|
5
|
+
return (_jsxs("button", { ref: ref, disabled: disabled || loading, "aria-busy": loading || undefined, className: buttonClassName({ variant, size, shape, block, className }), ...rest, children: [loading ? (_jsx("span", { "aria-label": loadingLabel, className: "inline-block size-4 animate-spin rounded-full border-2 border-current border-r-transparent" })) : (leadingIcon), children, !loading && trailingIcon] }));
|
|
6
|
+
});
|
|
7
|
+
export { Button };
|
|
8
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../src/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAcjD,MAAM,MAAM,GAAG,UAAU,CAAiC,SAAS,MAAM,CACvE,EACE,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,IAAI,EACX,KAAK,GAAG,SAAS,EACjB,WAAW,EACX,YAAY,EACZ,OAAO,GAAG,KAAK,EACf,YAAY,GAAG,YAAY,EAC3B,KAAK,GAAG,KAAK,EACb,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EACD,GAAG;IAEH,OAAO,CACL,kBACE,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAQ,IAAI,OAAO,eAClB,OAAO,IAAI,SAAS,EAC/B,SAAS,EAAE,eAAe,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,KAClE,IAAI,aAEP,OAAO,CAAC,CAAC,CAAC,CACT,6BACc,YAAY,EACxB,SAAS,EAAC,4FAA4F,GACtG,CACH,CAAC,CAAC,CAAC,CACF,WAAW,CACZ,EACA,QAAQ,EACR,CAAC,OAAO,IAAI,YAAY,IAClB,CACV,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
type ButtonGroupProps = HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
align?: "start" | "center" | "end" | "stretch";
|
|
4
|
+
};
|
|
5
|
+
declare const ButtonGroup: ({ align, className, ...rest }: ButtonGroupProps) => import("react").JSX.Element;
|
|
6
|
+
export { ButtonGroup };
|
|
7
|
+
export type { ButtonGroupProps };
|
|
8
|
+
//# sourceMappingURL=ButtonGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["../src/ButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,KAAK,gBAAgB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACvD,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;CAChD,CAAC;AASF,QAAA,MAAM,WAAW,GAAI,+BAIlB,gBAAgB,gCAMlB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { classNames } from "./classNames";
|
|
3
|
+
const alignClasses = {
|
|
4
|
+
start: "justify-start",
|
|
5
|
+
center: "justify-center",
|
|
6
|
+
end: "justify-end",
|
|
7
|
+
stretch: "[&>*]:flex-1",
|
|
8
|
+
};
|
|
9
|
+
const ButtonGroup = ({ align = "start", className, ...rest }) => (_jsx("div", { role: "group", className: classNames("flex flex-wrap items-center gap-3", alignClasses[align], className), ...rest }));
|
|
10
|
+
export { ButtonGroup };
|
|
11
|
+
//# sourceMappingURL=ButtonGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonGroup.js","sourceRoot":"","sources":["../src/ButtonGroup.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,MAAM,YAAY,GAA2D;IAC3E,KAAK,EAAE,eAAe;IACtB,MAAM,EAAE,gBAAgB;IACxB,GAAG,EAAE,aAAa;IAClB,OAAO,EAAE,cAAc;CACxB,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,EACnB,KAAK,GAAG,OAAO,EACf,SAAS,EACT,GAAG,IAAI,EACU,EAAE,EAAE,CAAC,CACtB,cACE,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,UAAU,CAAC,mCAAmC,EAAE,YAAY,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,KACtF,IAAI,GACR,CACH,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/Card.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
type CardElement = "div" | "article" | "section";
|
|
3
|
+
type CardVariant = "default" | "flat" | "elevated" | "interactive";
|
|
4
|
+
type CardPadding = "none" | "sm" | "md" | "lg";
|
|
5
|
+
type CardProps = HTMLAttributes<HTMLElement> & {
|
|
6
|
+
as?: CardElement;
|
|
7
|
+
variant?: CardVariant;
|
|
8
|
+
padding?: CardPadding;
|
|
9
|
+
};
|
|
10
|
+
declare const Card: ({ as, variant, padding, className, ...rest }: CardProps) => import("react").JSX.Element;
|
|
11
|
+
export { Card };
|
|
12
|
+
export type { CardElement, CardPadding, CardProps, CardVariant };
|
|
13
|
+
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../src/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,KAAK,WAAW,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,CAAC;AACjD,KAAK,WAAW,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,aAAa,CAAC;AACnE,KAAK,WAAW,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE/C,KAAK,SAAS,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IAC7C,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,CAAC;AAiBF,QAAA,MAAM,IAAI,GAAI,8CAMX,SAAS,gCAcX,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/Card.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { classNames } from "./classNames";
|
|
3
|
+
const variantClasses = {
|
|
4
|
+
default: "border border-neutral-200 bg-neutral-0",
|
|
5
|
+
flat: "border border-transparent bg-neutral-50",
|
|
6
|
+
elevated: "border border-neutral-200 bg-neutral-0 shadow-elevated",
|
|
7
|
+
interactive: "border border-neutral-200 bg-neutral-0 transition hover:-translate-y-0.5 hover:border-neutral-300 hover:shadow-elevated",
|
|
8
|
+
};
|
|
9
|
+
const paddingClasses = {
|
|
10
|
+
none: "",
|
|
11
|
+
sm: "p-4",
|
|
12
|
+
md: "p-6",
|
|
13
|
+
lg: "p-8",
|
|
14
|
+
};
|
|
15
|
+
const Card = ({ as = "div", variant = "default", padding = "none", className, ...rest }) => {
|
|
16
|
+
const Element = as;
|
|
17
|
+
return (_jsx(Element, { className: classNames("flex flex-col overflow-hidden rounded-lg", variantClasses[variant], paddingClasses[padding], className), ...rest }));
|
|
18
|
+
};
|
|
19
|
+
export { Card };
|
|
20
|
+
//# sourceMappingURL=Card.js.map
|
package/dist/Card.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../src/Card.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAY1C,MAAM,cAAc,GAAgC;IAClD,OAAO,EAAE,wCAAwC;IACjD,IAAI,EAAE,yCAAyC;IAC/C,QAAQ,EAAE,wDAAwD;IAClE,WAAW,EACT,yHAAyH;CAC5H,CAAC;AAEF,MAAM,cAAc,GAAgC;IAClD,IAAI,EAAE,EAAE;IACR,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,KAAK;CACV,CAAC;AAEF,MAAM,IAAI,GAAG,CAAC,EACZ,EAAE,GAAG,KAAK,EACV,OAAO,GAAG,SAAS,EACnB,OAAO,GAAG,MAAM,EAChB,SAAS,EACT,GAAG,IAAI,EACG,EAAE,EAAE;IACd,MAAM,OAAO,GAAG,EAAE,CAAC;IAEnB,OAAO,CACL,KAAC,OAAO,IACN,SAAS,EAAE,UAAU,CACnB,0CAA0C,EAC1C,cAAc,CAAC,OAAO,CAAC,EACvB,cAAc,CAAC,OAAO,CAAC,EACvB,SAAS,CACV,KACG,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
type CardContentProps = HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
padding?: "none" | "sm" | "md" | "lg";
|
|
4
|
+
};
|
|
5
|
+
declare const CardContent: ({ padding, className, ...rest }: CardContentProps) => import("react").JSX.Element;
|
|
6
|
+
export { CardContent };
|
|
7
|
+
export type { CardContentProps };
|
|
8
|
+
//# sourceMappingURL=CardContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardContent.d.ts","sourceRoot":"","sources":["../src/CardContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,KAAK,gBAAgB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACvD,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CACvC,CAAC;AASF,QAAA,MAAM,WAAW,GAAI,iCAIlB,gBAAgB,gCAElB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { classNames } from "./classNames";
|
|
3
|
+
const paddingClasses = {
|
|
4
|
+
none: "",
|
|
5
|
+
sm: "p-4",
|
|
6
|
+
md: "p-6",
|
|
7
|
+
lg: "p-8",
|
|
8
|
+
};
|
|
9
|
+
const CardContent = ({ padding = "md", className, ...rest }) => (_jsx("div", { className: classNames(paddingClasses[padding], className), ...rest }));
|
|
10
|
+
export { CardContent };
|
|
11
|
+
//# sourceMappingURL=CardContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardContent.js","sourceRoot":"","sources":["../src/CardContent.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,MAAM,cAAc,GAA6D;IAC/E,IAAI,EAAE,EAAE;IACR,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,KAAK;IACT,EAAE,EAAE,KAAK;CACV,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,EACnB,OAAO,GAAG,IAAI,EACd,SAAS,EACT,GAAG,IAAI,EACU,EAAE,EAAE,CAAC,CACtB,cAAK,SAAS,EAAE,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,KAAM,IAAI,GAAI,CAC7E,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
type CardDescriptionProps = HTMLAttributes<HTMLParagraphElement>;
|
|
3
|
+
declare const CardDescription: ({ className, ...rest }: CardDescriptionProps) => import("react").JSX.Element;
|
|
4
|
+
export { CardDescription };
|
|
5
|
+
export type { CardDescriptionProps };
|
|
6
|
+
//# sourceMappingURL=CardDescription.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardDescription.d.ts","sourceRoot":"","sources":["../src/CardDescription.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,KAAK,oBAAoB,GAAG,cAAc,CAAC,oBAAoB,CAAC,CAAC;AAEjE,QAAA,MAAM,eAAe,GAAI,wBAAwB,oBAAoB,gCAEpE,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC;AAC3B,YAAY,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { classNames } from "./classNames";
|
|
3
|
+
const CardDescription = ({ className, ...rest }) => (_jsx("p", { className: classNames("text-label text-neutral-500", className), ...rest }));
|
|
4
|
+
export { CardDescription };
|
|
5
|
+
//# sourceMappingURL=CardDescription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardDescription.js","sourceRoot":"","sources":["../src/CardDescription.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,MAAM,eAAe,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAwB,EAAE,EAAE,CAAC,CACxE,YAAG,SAAS,EAAE,UAAU,CAAC,6BAA6B,EAAE,SAAS,CAAC,KAAM,IAAI,GAAI,CACjF,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
type CardFooterProps = HTMLAttributes<HTMLElement> & {
|
|
3
|
+
divided?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const CardFooter: ({ divided, className, ...rest }: CardFooterProps) => import("react").JSX.Element;
|
|
6
|
+
export { CardFooter };
|
|
7
|
+
export type { CardFooterProps };
|
|
8
|
+
//# sourceMappingURL=CardFooter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardFooter.d.ts","sourceRoot":"","sources":["../src/CardFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,KAAK,eAAe,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,QAAA,MAAM,UAAU,GAAI,iCAIjB,eAAe,gCASjB,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { classNames } from "./classNames";
|
|
3
|
+
const CardFooter = ({ divided = false, className, ...rest }) => (_jsx("footer", { className: classNames("flex items-center gap-3 px-6 py-4", divided && "border-t border-neutral-200", className), ...rest }));
|
|
4
|
+
export { CardFooter };
|
|
5
|
+
//# sourceMappingURL=CardFooter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardFooter.js","sourceRoot":"","sources":["../src/CardFooter.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,MAAM,UAAU,GAAG,CAAC,EAClB,OAAO,GAAG,KAAK,EACf,SAAS,EACT,GAAG,IAAI,EACS,EAAE,EAAE,CAAC,CACrB,iBACE,SAAS,EAAE,UAAU,CACnB,mCAAmC,EACnC,OAAO,IAAI,6BAA6B,EACxC,SAAS,CACV,KACG,IAAI,GACR,CACH,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
type CardHeaderProps = HTMLAttributes<HTMLElement> & {
|
|
3
|
+
divided?: boolean;
|
|
4
|
+
layout?: "stack" | "row";
|
|
5
|
+
};
|
|
6
|
+
declare const CardHeader: ({ divided, layout, className, ...rest }: CardHeaderProps) => import("react").JSX.Element;
|
|
7
|
+
export { CardHeader };
|
|
8
|
+
export type { CardHeaderProps };
|
|
9
|
+
//# sourceMappingURL=CardHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardHeader.d.ts","sourceRoot":"","sources":["../src/CardHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,KAAK,eAAe,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;CAC1B,CAAC;AAEF,QAAA,MAAM,UAAU,GAAI,yCAKjB,eAAe,gCAUjB,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { classNames } from "./classNames";
|
|
3
|
+
const CardHeader = ({ divided = false, layout = "stack", className, ...rest }) => (_jsx("header", { className: classNames("flex items-start px-6 py-5", layout === "stack" ? "flex-col gap-1" : "flex-row justify-between gap-4", divided && "border-b border-neutral-200", className), ...rest }));
|
|
4
|
+
export { CardHeader };
|
|
5
|
+
//# sourceMappingURL=CardHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardHeader.js","sourceRoot":"","sources":["../src/CardHeader.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAO1C,MAAM,UAAU,GAAG,CAAC,EAClB,OAAO,GAAG,KAAK,EACf,MAAM,GAAG,OAAO,EAChB,SAAS,EACT,GAAG,IAAI,EACS,EAAE,EAAE,CAAC,CACrB,iBACE,SAAS,EAAE,UAAU,CACnB,4BAA4B,EAC5B,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,gCAAgC,EACxE,OAAO,IAAI,6BAA6B,EACxC,SAAS,CACV,KACG,IAAI,GACR,CACH,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
type CardMediaRatio = "landscape" | "square" | "wide";
|
|
3
|
+
type CardMediaProps = HTMLAttributes<HTMLDivElement> & {
|
|
4
|
+
ratio?: CardMediaRatio;
|
|
5
|
+
};
|
|
6
|
+
declare const CardMedia: ({ ratio, className, ...rest }: CardMediaProps) => import("react").JSX.Element;
|
|
7
|
+
export { CardMedia };
|
|
8
|
+
export type { CardMediaProps, CardMediaRatio };
|
|
9
|
+
//# sourceMappingURL=CardMedia.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardMedia.d.ts","sourceRoot":"","sources":["../src/CardMedia.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,KAAK,cAAc,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEtD,KAAK,cAAc,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IACrD,KAAK,CAAC,EAAE,cAAc,CAAC;CACxB,CAAC;AAQF,QAAA,MAAM,SAAS,GAAI,+BAIhB,cAAc,gCAKhB,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { classNames } from "./classNames";
|
|
3
|
+
const ratioClasses = {
|
|
4
|
+
landscape: "aspect-[4/3]",
|
|
5
|
+
square: "aspect-square",
|
|
6
|
+
wide: "aspect-video",
|
|
7
|
+
};
|
|
8
|
+
const CardMedia = ({ ratio = "landscape", className, ...rest }) => (_jsx("div", { className: classNames("relative overflow-hidden", ratioClasses[ratio], className), ...rest }));
|
|
9
|
+
export { CardMedia };
|
|
10
|
+
//# sourceMappingURL=CardMedia.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardMedia.js","sourceRoot":"","sources":["../src/CardMedia.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAQ1C,MAAM,YAAY,GAAmC;IACnD,SAAS,EAAE,cAAc;IACzB,MAAM,EAAE,eAAe;IACvB,IAAI,EAAE,cAAc;CACrB,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,EACjB,KAAK,GAAG,WAAW,EACnB,SAAS,EACT,GAAG,IAAI,EACQ,EAAE,EAAE,CAAC,CACpB,cACE,SAAS,EAAE,UAAU,CAAC,0BAA0B,EAAE,YAAY,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,KAC7E,IAAI,GACR,CACH,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
type CardTitleProps = HTMLAttributes<HTMLHeadingElement> & {
|
|
3
|
+
level?: 2 | 3 | 4;
|
|
4
|
+
};
|
|
5
|
+
declare const CardTitle: ({ level, className, ...rest }: CardTitleProps) => import("react").JSX.Element;
|
|
6
|
+
export { CardTitle };
|
|
7
|
+
export type { CardTitleProps };
|
|
8
|
+
//# sourceMappingURL=CardTitle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardTitle.d.ts","sourceRoot":"","sources":["../src/CardTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,KAAK,cAAc,GAAG,cAAc,CAAC,kBAAkB,CAAC,GAAG;IACzD,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACnB,CAAC;AAEF,QAAA,MAAM,SAAS,GAAI,+BAAmC,cAAc,gCAUnE,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { classNames } from "./classNames";
|
|
3
|
+
const CardTitle = ({ level = 3, className, ...rest }) => {
|
|
4
|
+
const Element = level === 2 ? "h2" : level === 3 ? "h3" : "h4";
|
|
5
|
+
return (_jsx(Element, { className: classNames("text-heading-sm font-semibold text-neutral-900", className), ...rest }));
|
|
6
|
+
};
|
|
7
|
+
export { CardTitle };
|
|
8
|
+
//# sourceMappingURL=CardTitle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardTitle.js","sourceRoot":"","sources":["../src/CardTitle.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,MAAM,SAAS,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAkB,EAAE,EAAE;IACtE,MAAM,OAAO,GACX,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAEjD,OAAO,CACL,KAAC,OAAO,IACN,SAAS,EAAE,UAAU,CAAC,gDAAgD,EAAE,SAAS,CAAC,KAC9E,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from "react";
|
|
2
|
+
type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, "type"> & {
|
|
3
|
+
invalid?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type"> & {
|
|
6
|
+
invalid?: boolean;
|
|
7
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
8
|
+
export { Checkbox };
|
|
9
|
+
export type { CheckboxProps };
|
|
10
|
+
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../src/Checkbox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAGjD,KAAK,aAAa,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,GAAG;IACzE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,QAAA,MAAM,QAAQ;cAHF,OAAO;oDAsBjB,CAAC;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/Checkbox.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { classNames } from "./classNames";
|
|
4
|
+
const Checkbox = forwardRef(function Checkbox({ invalid = false, className, ...rest }, ref) {
|
|
5
|
+
return (_jsx("input", { ref: ref, type: "checkbox", "aria-invalid": invalid || undefined, className: classNames("mt-0.5 size-5 shrink-0 rounded-sm border-control bg-neutral-0 transition", "checked:border-brand-primary checked:bg-brand-primary", "focus:outline-none focus:shadow-focus", invalid ? "border-error" : "border-neutral-300", className), ...rest }));
|
|
6
|
+
});
|
|
7
|
+
export { Checkbox };
|
|
8
|
+
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../src/Checkbox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,MAAM,QAAQ,GAAG,UAAU,CAAkC,SAAS,QAAQ,CAC5E,EAAE,OAAO,GAAG,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EACvC,GAAG;IAEH,OAAO,CACL,gBACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,UAAU,kBACD,OAAO,IAAI,SAAS,EAClC,SAAS,EAAE,UAAU,CACnB,0EAA0E,EAC1E,uDAAuD,EACvD,uCAAuC,EACvC,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,oBAAoB,EAC/C,SAAS,CACV,KACG,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
type ChoiceChipProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
3
|
+
selected?: boolean;
|
|
4
|
+
icon?: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
declare const ChoiceChip: ({ selected, icon, className, children, ...rest }: ChoiceChipProps) => import("react").JSX.Element;
|
|
7
|
+
export { ChoiceChip };
|
|
8
|
+
export type { ChoiceChipProps };
|
|
9
|
+
//# sourceMappingURL=ChoiceChip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChoiceChip.d.ts","sourceRoot":"","sources":["../src/ChoiceChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG7D,KAAK,eAAe,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAC/D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,QAAA,MAAM,UAAU,GAAI,kDAA0D,eAAe,gCAc5F,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { classNames } from "./classNames";
|
|
3
|
+
const ChoiceChip = ({ selected = false, icon, className, children, ...rest }) => (_jsxs("button", { type: "button", "aria-pressed": selected, className: classNames("inline-flex h-[var(--size-btn-sm)] items-center gap-2 rounded-full border px-4 text-sm font-semibold transition focus:outline-none focus-visible:shadow-focus", selected ? "border-brand-primary bg-role-studio-bg text-role-studio-text" : "border-neutral-200 bg-neutral-0 text-neutral-700 hover:bg-neutral-100", className), ...rest, children: [icon, children] }));
|
|
4
|
+
export { ChoiceChip };
|
|
5
|
+
//# sourceMappingURL=ChoiceChip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChoiceChip.js","sourceRoot":"","sources":["../src/ChoiceChip.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAO1C,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,GAAG,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAmB,EAAE,EAAE,CAAC,CAChG,kBACE,IAAI,EAAC,QAAQ,kBACC,QAAQ,EACtB,SAAS,EAAE,UAAU,CACnB,+JAA+J,EAC/J,QAAQ,CAAC,CAAC,CAAC,8DAA8D,CAAC,CAAC,CAAC,uEAAuE,EACnJ,SAAS,CACV,KACG,IAAI,aAEP,IAAI,EACJ,QAAQ,IACF,CACV,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
type ContentBlockData = {
|
|
3
|
+
kind: "paragraph";
|
|
4
|
+
text: string;
|
|
5
|
+
} | {
|
|
6
|
+
kind: "list";
|
|
7
|
+
items: readonly string[];
|
|
8
|
+
} | {
|
|
9
|
+
kind: "callout";
|
|
10
|
+
text: string;
|
|
11
|
+
tone?: "neutral" | "info" | "warning";
|
|
12
|
+
};
|
|
13
|
+
type ContentBlockProps = HTMLAttributes<HTMLElement> & {
|
|
14
|
+
block: ContentBlockData;
|
|
15
|
+
};
|
|
16
|
+
declare const ContentBlock: ({ block, className, ...rest }: ContentBlockProps) => import("react").JSX.Element;
|
|
17
|
+
export { ContentBlock };
|
|
18
|
+
export type { ContentBlockData, ContentBlockProps };
|
|
19
|
+
//# sourceMappingURL=ContentBlock.d.ts.map
|