@chayns-ui/core 0.2.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 +21 -0
- package/README.md +3 -0
- package/dist/accordion.css +147 -0
- package/dist/button.css +191 -0
- package/dist/card.css +13 -0
- package/dist/components/accordion/Accordion.d.ts +4 -0
- package/dist/components/accordion/Accordion.d.ts.map +1 -0
- package/dist/components/accordion/Accordion.js +72 -0
- package/dist/components/accordion/Accordion.js.map +1 -0
- package/dist/components/accordion/Accordion.types.d.ts +37 -0
- package/dist/components/accordion/Accordion.types.d.ts.map +1 -0
- package/dist/components/accordion/AccordionContext.d.ts +20 -0
- package/dist/components/accordion/AccordionContext.d.ts.map +1 -0
- package/dist/components/accordion/AccordionContext.js +18 -0
- package/dist/components/accordion/AccordionContext.js.map +1 -0
- package/dist/components/accordion/AccordionGroup.d.ts +4 -0
- package/dist/components/accordion/AccordionGroup.d.ts.map +1 -0
- package/dist/components/accordion/AccordionGroup.js +35 -0
- package/dist/components/accordion/AccordionGroup.js.map +1 -0
- package/dist/components/accordion/index.d.ts +4 -0
- package/dist/components/accordion/index.d.ts.map +1 -0
- package/dist/components/accordion/index.js +3 -0
- package/dist/components/button/Button.d.ts +4 -0
- package/dist/components/button/Button.d.ts.map +1 -0
- package/dist/components/button/Button.js +17 -0
- package/dist/components/button/Button.js.map +1 -0
- package/dist/components/button/Button.types.d.ts +35 -0
- package/dist/components/button/Button.types.d.ts.map +1 -0
- package/dist/components/button/ButtonIcon.d.ts +7 -0
- package/dist/components/button/ButtonIcon.d.ts.map +1 -0
- package/dist/components/button/ButtonIcon.js +19 -0
- package/dist/components/button/ButtonIcon.js.map +1 -0
- package/dist/components/button/IconButton.d.ts +4 -0
- package/dist/components/button/IconButton.d.ts.map +1 -0
- package/dist/components/button/IconButton.js +17 -0
- package/dist/components/button/IconButton.js.map +1 -0
- package/dist/components/button/buttonClassName.d.ts +3 -0
- package/dist/components/button/buttonClassName.d.ts.map +1 -0
- package/dist/components/button/buttonClassName.js +9 -0
- package/dist/components/button/buttonClassName.js.map +1 -0
- package/dist/components/button/index.d.ts +4 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/button/index.js +3 -0
- package/dist/components/card/Card.d.ts +4 -0
- package/dist/components/card/Card.d.ts.map +1 -0
- package/dist/components/card/Card.js +18 -0
- package/dist/components/card/Card.js.map +1 -0
- package/dist/components/card/Card.types.d.ts +9 -0
- package/dist/components/card/Card.types.d.ts.map +1 -0
- package/dist/components/card/index.d.ts +3 -0
- package/dist/components/card/index.d.ts.map +1 -0
- package/dist/components/card/index.js +2 -0
- package/dist/components/list/List.d.ts +4 -0
- package/dist/components/list/List.d.ts.map +1 -0
- package/dist/components/list/List.js +14 -0
- package/dist/components/list/List.js.map +1 -0
- package/dist/components/list/List.types.d.ts +32 -0
- package/dist/components/list/List.types.d.ts.map +1 -0
- package/dist/components/list/ListItem.d.ts +4 -0
- package/dist/components/list/ListItem.d.ts.map +1 -0
- package/dist/components/list/ListItem.js +67 -0
- package/dist/components/list/ListItem.js.map +1 -0
- package/dist/components/list/index.d.ts +4 -0
- package/dist/components/list/index.d.ts.map +1 -0
- package/dist/components/list/index.js +3 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/list.css +121 -0
- package/dist/styles.css +4 -0
- package/package.json +57 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
/** Supported visual emphasis levels for Button and IconButton. */
|
|
3
|
+
export type ButtonVariant = 'primary' | 'outline' | 'ghost' | 'danger';
|
|
4
|
+
/** FontAwesome Classic icon name with a Regular and Solid pair. */
|
|
5
|
+
export type ButtonIcon = `fa-${string}`;
|
|
6
|
+
/** Visible content that gives a Button its accessible name. */
|
|
7
|
+
export type ButtonContent = Exclude<ReactNode, boolean | null | undefined>;
|
|
8
|
+
/** Props for a visible-label native action button. */
|
|
9
|
+
export interface ButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {
|
|
10
|
+
/** Visual emphasis that communicates the action's role. */
|
|
11
|
+
variant: ButtonVariant;
|
|
12
|
+
/** Optional leading FontAwesome Classic icon name. */
|
|
13
|
+
icon?: ButtonIcon;
|
|
14
|
+
/** Visible, non-empty content used as the button label. */
|
|
15
|
+
children: ButtonContent;
|
|
16
|
+
}
|
|
17
|
+
type IconButtonAccessibleName = {
|
|
18
|
+
/** Localized accessible name when no external label element exists. */
|
|
19
|
+
'aria-label': string;
|
|
20
|
+
'aria-labelledby'?: never;
|
|
21
|
+
} | {
|
|
22
|
+
'aria-label'?: never;
|
|
23
|
+
/** ID of the element that provides the localized accessible name. */
|
|
24
|
+
'aria-labelledby': string;
|
|
25
|
+
};
|
|
26
|
+
interface IconButtonBaseProps extends Omit<ComponentPropsWithRef<'button'>, 'aria-label' | 'aria-labelledby' | 'children'> {
|
|
27
|
+
/** Visual emphasis that communicates the action's role. */
|
|
28
|
+
variant: ButtonVariant;
|
|
29
|
+
/** FontAwesome Classic icon name rendered Regular at rest and Solid on interaction. */
|
|
30
|
+
icon: ButtonIcon;
|
|
31
|
+
}
|
|
32
|
+
/** Props for a compact native action button with a required accessible name. */
|
|
33
|
+
export type IconButtonProps = IconButtonBaseProps & IconButtonAccessibleName;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=Button.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,kEAAkE;AAClE,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEvE,mEAAmE;AACnE,MAAM,MAAM,UAAU,GAAG,MAAM,MAAM,EAAE,CAAC;AAExC,+DAA+D;AAC/D,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAE3E,sDAAsD;AACtD,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;IACpF,2DAA2D;IAC3D,OAAO,EAAE,aAAa,CAAC;IAEvB,sDAAsD;IACtD,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB,2DAA2D;IAC3D,QAAQ,EAAE,aAAa,CAAC;CACzB;AAED,KAAK,wBAAwB,GACzB;IACE,uEAAuE;IACvE,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,KAAK,CAAC;CAC3B,GACD;IACE,YAAY,CAAC,EAAE,KAAK,CAAC;IAErB,qEAAqE;IACrE,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEN,UAAU,mBAAoB,SAAQ,IAAI,CACxC,qBAAqB,CAAC,QAAQ,CAAC,EAC/B,YAAY,GAAG,iBAAiB,GAAG,UAAU,CAC9C;IACC,2DAA2D;IAC3D,OAAO,EAAE,aAAa,CAAC;IAEvB,uFAAuF;IACvF,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,gFAAgF;AAChF,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAAG,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ButtonIcon as ButtonIconName } from './Button.types.js';
|
|
2
|
+
interface ButtonIconProps {
|
|
3
|
+
icon: ButtonIconName;
|
|
4
|
+
}
|
|
5
|
+
declare function ButtonIcon({ icon }: ButtonIconProps): import("react").JSX.Element;
|
|
6
|
+
export default ButtonIcon;
|
|
7
|
+
//# sourceMappingURL=ButtonIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonIcon.d.ts","sourceRoot":"","sources":["../../../src/components/button/ButtonIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEtE,UAAU,eAAe;IACvB,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,iBAAS,UAAU,CAAC,EAAE,IAAI,EAAE,EAAE,eAAe,+BAW5C;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/button/ButtonIcon.tsx
|
|
3
|
+
function ButtonIcon({ icon }) {
|
|
4
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
5
|
+
"aria-hidden": "true",
|
|
6
|
+
className: "chayns-button-icon",
|
|
7
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
8
|
+
className: "chayns-button-icon__weight",
|
|
9
|
+
children: /* @__PURE__ */ jsx("i", { className: `far ${icon}` })
|
|
10
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
11
|
+
className: "chayns-button-icon__weight chayns-button-icon__weight--active",
|
|
12
|
+
children: /* @__PURE__ */ jsx("i", { className: `fas ${icon}` })
|
|
13
|
+
})]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { ButtonIcon as default };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=ButtonIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonIcon.js","names":[],"sources":["../../../src/components/button/ButtonIcon.tsx"],"sourcesContent":["import type { ButtonIcon as ButtonIconName } from './Button.types.js';\n\ninterface ButtonIconProps {\n icon: ButtonIconName;\n}\n\nfunction ButtonIcon({ icon }: ButtonIconProps) {\n return (\n <span aria-hidden=\"true\" className=\"chayns-button-icon\">\n <span className=\"chayns-button-icon__weight\">\n <i className={`far ${icon}`} />\n </span>\n <span className=\"chayns-button-icon__weight chayns-button-icon__weight--active\">\n <i className={`fas ${icon}`} />\n </span>\n </span>\n );\n}\n\nexport default ButtonIcon;\n"],"mappings":";;AAMA,SAAS,WAAW,EAAE,QAAyB;CAC7C,OACE,qBAAC,QAAD;EAAM,eAAY;EAAO,WAAU;EAAnC,UAAA,CACE,oBAAC,QAAD;GAAM,WAAU;GACd,UAAA,oBAAC,KAAD,EAAG,WAAW,OAAO,OAAS,CAAA;EAC1B,CAAA,GACN,oBAAC,QAAD;GAAM,WAAU;GACd,UAAA,oBAAC,KAAD,EAAG,WAAW,OAAO,OAAS,CAAA;EAC1B,CAAA,CACF;;AAEV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/components/button/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIzD,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,IAAI,EACJ,IAAe,EACf,OAAO,EACP,GAAG,WAAW,EACf,EAAE,eAAe,+BAQjB;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import ButtonIcon from "./ButtonIcon.js";
|
|
2
|
+
import { getButtonClassName } from "./buttonClassName.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/button/IconButton.tsx
|
|
5
|
+
function IconButton({ className, icon, type = "button", variant, ...buttonProps }) {
|
|
6
|
+
const resolvedClassName = getButtonClassName("chayns-icon-button", variant, className);
|
|
7
|
+
return /* @__PURE__ */ jsx("button", {
|
|
8
|
+
...buttonProps,
|
|
9
|
+
className: resolvedClassName,
|
|
10
|
+
type,
|
|
11
|
+
children: /* @__PURE__ */ jsx(ButtonIcon, { icon })
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { IconButton as default };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=IconButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.js","names":[],"sources":["../../../src/components/button/IconButton.tsx"],"sourcesContent":["import type { IconButtonProps } from './Button.types.js';\nimport ButtonIcon from './ButtonIcon.js';\nimport { getButtonClassName } from './buttonClassName.js';\n\nfunction IconButton({\n className,\n icon,\n type = 'button',\n variant,\n ...buttonProps\n}: IconButtonProps) {\n const resolvedClassName = getButtonClassName('chayns-icon-button', variant, className);\n\n return (\n <button {...buttonProps} className={resolvedClassName} type={type}>\n <ButtonIcon icon={icon} />\n </button>\n );\n}\n\nexport default IconButton;\n"],"mappings":";;;;AAIA,SAAS,WAAW,EAClB,WACA,MACA,OAAO,UACP,SACA,GAAG,eACe;CAClB,MAAM,oBAAoB,mBAAmB,sBAAsB,SAAS,SAAS;CAErF,OACE,oBAAC,UAAD;EAAQ,GAAI;EAAa,WAAW;EAAyB;EAC3D,UAAA,oBAAC,YAAD,EAAkB,KAAO,CAAA;CACnB,CAAA;AAEZ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buttonClassName.d.ts","sourceRoot":"","sources":["../../../src/components/button/buttonClassName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,wBAAgB,kBAAkB,CAChC,kBAAkB,EAAE,eAAe,GAAG,oBAAoB,EAC1D,OAAO,EAAE,aAAa,EACtB,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAMR"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/components/button/buttonClassName.ts
|
|
2
|
+
function getButtonClassName(componentClassName, variant, className) {
|
|
3
|
+
const variantClassName = `${componentClassName}--${variant}`;
|
|
4
|
+
return className ? `${componentClassName} ${variantClassName} ${className}` : `${componentClassName} ${variantClassName}`;
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { getButtonClassName };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=buttonClassName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buttonClassName.js","names":[],"sources":["../../../src/components/button/buttonClassName.ts"],"sourcesContent":["import type { ButtonVariant } from './Button.types.js';\n\nexport function getButtonClassName(\n componentClassName: 'chayns-button' | 'chayns-icon-button',\n variant: ButtonVariant,\n className?: string,\n): string {\n const variantClassName = `${componentClassName}--${variant}`;\n\n return className\n ? `${componentClassName} ${variantClassName} ${className}`\n : `${componentClassName} ${variantClassName}`;\n}\n"],"mappings":";AAEA,SAAgB,mBACd,oBACA,SACA,WACQ;CACR,MAAM,mBAAmB,GAAG,mBAAmB,IAAI;CAEnD,OAAO,YACH,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,cAC7C,GAAG,mBAAmB,GAAG;AAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACxD,YAAY,EACV,aAAa,EACb,UAAU,EACV,WAAW,EACX,aAAa,EACb,eAAe,GAChB,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,iBAAS,IAAI,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAgB,EAAE,GAAG,SAAS,EAAE,EAAE,SAAS,+BAU/E;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/card/Card.tsx
|
|
3
|
+
function Card({ children, className, elevated = false, ...cardProps }) {
|
|
4
|
+
const resolvedClassName = [
|
|
5
|
+
"chayns-card",
|
|
6
|
+
elevated ? "chayns-card--elevated" : null,
|
|
7
|
+
className
|
|
8
|
+
].filter(Boolean).join(" ");
|
|
9
|
+
return /* @__PURE__ */ jsx("div", {
|
|
10
|
+
...cardProps,
|
|
11
|
+
className: resolvedClassName,
|
|
12
|
+
children
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Card as default };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=Card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.js","names":[],"sources":["../../../src/components/card/Card.tsx"],"sourcesContent":["import type { CardProps } from './Card.types.js';\n\nfunction Card({ children, className, elevated = false, ...cardProps }: CardProps) {\n const resolvedClassName = ['chayns-card', elevated ? 'chayns-card--elevated' : null, className]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div {...cardProps} className={resolvedClassName}>\n {children}\n </div>\n );\n}\n\nexport default Card;\n"],"mappings":";;AAEA,SAAS,KAAK,EAAE,UAAU,WAAW,WAAW,OAAO,GAAG,aAAwB;CAChF,MAAM,oBAAoB;EAAC;EAAe,WAAW,0BAA0B;EAAM;CAAS,CAAC,CAC5F,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;CAEX,OACE,oBAAC,OAAD;EAAK,GAAI;EAAW,WAAW;EAC5B;CACE,CAAA;AAET"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
/** Props for the presentational surface container. */
|
|
3
|
+
export interface CardProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
+
/** Content rendered inside the card surface. */
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
/** Adds the subtle resting card elevation token. */
|
|
7
|
+
elevated?: boolean;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=Card.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.types.d.ts","sourceRoot":"","sources":["../../../src/components/card/Card.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,sDAAsD;AACtD,MAAM,WAAW,SAAU,SAAQ,qBAAqB,CAAC,KAAK,CAAC;IAC7D,gDAAgD;IAChD,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/components/list/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,iBAAS,IAAI,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,EAAE,SAAS,+BAQ7D;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/list/List.tsx
|
|
3
|
+
function List({ children, className, ...listProps }) {
|
|
4
|
+
const resolvedClassName = ["chayns-list", className].filter(Boolean).join(" ");
|
|
5
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
6
|
+
...listProps,
|
|
7
|
+
className: resolvedClassName,
|
|
8
|
+
children
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { List as default };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=List.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"List.js","names":[],"sources":["../../../src/components/list/List.tsx"],"sourcesContent":["import type { ListProps } from './List.types.js';\n\nfunction List({ children, className, ...listProps }: ListProps) {\n const resolvedClassName = ['chayns-list', className].filter(Boolean).join(' ');\n\n return (\n <ul {...listProps} className={resolvedClassName}>\n {children}\n </ul>\n );\n}\n\nexport default List;\n"],"mappings":";;AAEA,SAAS,KAAK,EAAE,UAAU,WAAW,GAAG,aAAwB;CAC9D,MAAM,oBAAoB,CAAC,eAAe,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;CAE7E,OACE,oBAAC,MAAD;EAAI,GAAI;EAAW,WAAW;EAC3B;CACC,CAAA;AAER"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, MouseEventHandler, ReactNode } from 'react';
|
|
2
|
+
/** Props for the vertical list container. */
|
|
3
|
+
export interface ListProps extends ComponentPropsWithRef<'ul'> {
|
|
4
|
+
/** List items, typically ListItem elements. */
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/** Props for a single list row. */
|
|
8
|
+
export interface ListItemProps {
|
|
9
|
+
/** Primary single-line row label. */
|
|
10
|
+
title: ReactNode;
|
|
11
|
+
/** Optional secondary single-line preview text. */
|
|
12
|
+
subtitle?: ReactNode;
|
|
13
|
+
/** Optional leading slot, for example an avatar or icon. */
|
|
14
|
+
leading?: ReactNode;
|
|
15
|
+
/** Optional trailing slot for row-level actions or metadata. */
|
|
16
|
+
trailing?: ReactNode;
|
|
17
|
+
/** Shows an accent unread indicator. */
|
|
18
|
+
unread?: boolean;
|
|
19
|
+
/** Localized accessible name for the unread indicator. */
|
|
20
|
+
unreadLabel?: string;
|
|
21
|
+
/** Renders the row as a navigation link with this destination. */
|
|
22
|
+
href?: string;
|
|
23
|
+
/** Renders the row as an action button with this handler. */
|
|
24
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
25
|
+
/** Disables the action button variant. */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** Additional class names on the list item element. */
|
|
28
|
+
className?: string;
|
|
29
|
+
/** Optional id on the list item element. */
|
|
30
|
+
id?: string;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=List.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"List.types.d.ts","sourceRoot":"","sources":["../../../src/components/list/List.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjF,6CAA6C;AAC7C,MAAM,WAAW,SAAU,SAAQ,qBAAqB,CAAC,IAAI,CAAC;IAC5D,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,mCAAmC;AACnC,MAAM,WAAW,aAAa;IAC5B,qCAAqC;IACrC,KAAK,EAAE,SAAS,CAAC;IAEjB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,wCAAwC;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,6DAA6D;IAC7D,OAAO,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IAE/C,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,4CAA4C;IAC5C,EAAE,CAAC,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ListItemProps } from './List.types.js';
|
|
2
|
+
declare function ListItem({ className, disabled, href, id, leading, onClick, subtitle, title, trailing, unread, unreadLabel, }: ListItemProps): import("react").JSX.Element;
|
|
3
|
+
export default ListItem;
|
|
4
|
+
//# sourceMappingURL=ListItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../src/components/list/ListItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA+BrD,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,QAAgB,EAChB,IAAI,EACJ,EAAE,EACF,OAAO,EACP,OAAO,EACP,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,MAAc,EACd,WAAW,GACZ,EAAE,aAAa,+BA0Cf;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/list/ListItem.tsx
|
|
3
|
+
function ListItemBody({ leading, subtitle, title, unread, unreadLabel }) {
|
|
4
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5
|
+
unread ? /* @__PURE__ */ jsx("span", {
|
|
6
|
+
className: "chayns-list-item__unread",
|
|
7
|
+
"aria-hidden": unreadLabel ? void 0 : true,
|
|
8
|
+
children: unreadLabel ? /* @__PURE__ */ jsx("span", {
|
|
9
|
+
className: "chayns-visually-hidden",
|
|
10
|
+
children: unreadLabel
|
|
11
|
+
}) : null
|
|
12
|
+
}) : null,
|
|
13
|
+
leading ? /* @__PURE__ */ jsx("span", {
|
|
14
|
+
className: "chayns-list-item__leading",
|
|
15
|
+
children: leading
|
|
16
|
+
}) : null,
|
|
17
|
+
/* @__PURE__ */ jsxs("span", {
|
|
18
|
+
className: "chayns-list-item__body",
|
|
19
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
20
|
+
className: "chayns-list-item__title",
|
|
21
|
+
children: title
|
|
22
|
+
}), subtitle ? /* @__PURE__ */ jsx("span", {
|
|
23
|
+
className: "chayns-list-item__subtitle",
|
|
24
|
+
children: subtitle
|
|
25
|
+
}) : null]
|
|
26
|
+
})
|
|
27
|
+
] });
|
|
28
|
+
}
|
|
29
|
+
function ListItem({ className, disabled = false, href, id, leading, onClick, subtitle, title, trailing, unread = false, unreadLabel }) {
|
|
30
|
+
const actionClassName = ["chayns-list-item__action", Boolean(href) || Boolean(onClick) ? "chayns-list-item__action--interactive" : null].filter(Boolean).join(" ");
|
|
31
|
+
const body = /* @__PURE__ */ jsx(ListItemBody, {
|
|
32
|
+
leading,
|
|
33
|
+
subtitle,
|
|
34
|
+
title,
|
|
35
|
+
unread,
|
|
36
|
+
unreadLabel
|
|
37
|
+
});
|
|
38
|
+
let action;
|
|
39
|
+
if (href) action = /* @__PURE__ */ jsx("a", {
|
|
40
|
+
className: actionClassName,
|
|
41
|
+
href,
|
|
42
|
+
children: body
|
|
43
|
+
});
|
|
44
|
+
else if (onClick) action = /* @__PURE__ */ jsx("button", {
|
|
45
|
+
className: actionClassName,
|
|
46
|
+
disabled,
|
|
47
|
+
onClick,
|
|
48
|
+
type: "button",
|
|
49
|
+
children: body
|
|
50
|
+
});
|
|
51
|
+
else action = /* @__PURE__ */ jsx("div", {
|
|
52
|
+
className: actionClassName,
|
|
53
|
+
children: body
|
|
54
|
+
});
|
|
55
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
56
|
+
className: ["chayns-list-item", className].filter(Boolean).join(" "),
|
|
57
|
+
id,
|
|
58
|
+
children: [action, trailing ? /* @__PURE__ */ jsx("span", {
|
|
59
|
+
className: "chayns-list-item__trailing",
|
|
60
|
+
children: trailing
|
|
61
|
+
}) : null]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
export { ListItem as default };
|
|
66
|
+
|
|
67
|
+
//# sourceMappingURL=ListItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItem.js","names":[],"sources":["../../../src/components/list/ListItem.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { ListItemProps } from './List.types.js';\n\nfunction ListItemBody({\n leading,\n subtitle,\n title,\n unread,\n unreadLabel,\n}: {\n leading?: ReactNode;\n subtitle?: ReactNode;\n title: ReactNode;\n unread?: boolean;\n unreadLabel?: string | undefined;\n}) {\n return (\n <>\n {unread ? (\n <span className=\"chayns-list-item__unread\" aria-hidden={unreadLabel ? undefined : true}>\n {unreadLabel ? <span className=\"chayns-visually-hidden\">{unreadLabel}</span> : null}\n </span>\n ) : null}\n {leading ? <span className=\"chayns-list-item__leading\">{leading}</span> : null}\n <span className=\"chayns-list-item__body\">\n <span className=\"chayns-list-item__title\">{title}</span>\n {subtitle ? <span className=\"chayns-list-item__subtitle\">{subtitle}</span> : null}\n </span>\n </>\n );\n}\n\nfunction ListItem({\n className,\n disabled = false,\n href,\n id,\n leading,\n onClick,\n subtitle,\n title,\n trailing,\n unread = false,\n unreadLabel,\n}: ListItemProps) {\n const interactive = Boolean(href) || Boolean(onClick);\n const actionClassName = [\n 'chayns-list-item__action',\n interactive ? 'chayns-list-item__action--interactive' : null,\n ]\n .filter(Boolean)\n .join(' ');\n\n const body = (\n <ListItemBody\n leading={leading}\n subtitle={subtitle}\n title={title}\n unread={unread}\n unreadLabel={unreadLabel}\n />\n );\n\n let action: ReactNode;\n if (href) {\n action = (\n <a className={actionClassName} href={href}>\n {body}\n </a>\n );\n } else if (onClick) {\n action = (\n <button className={actionClassName} disabled={disabled} onClick={onClick} type=\"button\">\n {body}\n </button>\n );\n } else {\n action = <div className={actionClassName}>{body}</div>;\n }\n\n return (\n <li className={['chayns-list-item', className].filter(Boolean).join(' ')} id={id}>\n {action}\n {trailing ? <span className=\"chayns-list-item__trailing\">{trailing}</span> : null}\n </li>\n );\n}\n\nexport default ListItem;\n"],"mappings":";;AAIA,SAAS,aAAa,EACpB,SACA,UACA,OACA,QACA,eAOC;CACD,OACE,qBAAA,UAAA,EAAA,UAAA;EACG,SACC,oBAAC,QAAD;GAAM,WAAU;GAA2B,eAAa,cAAc,KAAA,IAAY;GAC/E,UAAA,cAAc,oBAAC,QAAD;IAAM,WAAU;IAA0B,UAAA;GAAkB,CAAA,IAAI;EAC3E,CAAA,IACJ;EACH,UAAU,oBAAC,QAAD;GAAM,WAAU;GAA6B,UAAA;EAAc,CAAA,IAAI;EAC1E,qBAAC,QAAD;GAAM,WAAU;GAAhB,UAAA,CACE,oBAAC,QAAD;IAAM,WAAU;IAA2B,UAAA;GAAY,CAAA,GACtD,WAAW,oBAAC,QAAD;IAAM,WAAU;IAA8B,UAAA;GAAe,CAAA,IAAI,IACzE;;CACN,EAAA,CAAA;AAEN;AAEA,SAAS,SAAS,EAChB,WACA,WAAW,OACX,MACA,IACA,SACA,SACA,UACA,OACA,UACA,SAAS,OACT,eACgB;CAEhB,MAAM,kBAAkB,CACtB,4BAFkB,QAAQ,IAAI,KAAK,QAAQ,OAAO,IAGpC,0CAA0C,IAC1D,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;CAEX,MAAM,OACJ,oBAAC,cAAD;EACW;EACC;EACH;EACC;EACK;CACd,CAAA;CAGH,IAAI;CACJ,IAAI,MACF,SACE,oBAAC,KAAD;EAAG,WAAW;EAAuB;EAClC,UAAA;CACA,CAAA;MAEA,IAAI,SACT,SACE,oBAAC,UAAD;EAAQ,WAAW;EAA2B;EAAmB;EAAS,MAAK;EAC5E,UAAA;CACK,CAAA;MAGV,SAAS,oBAAC,OAAD;EAAK,WAAW;EAAkB,UAAA;CAAU,CAAA;CAGvD,OACE,qBAAC,MAAD;EAAI,WAAW,CAAC,oBAAoB,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAAO;EAA9E,UAAA,CACG,QACA,WAAW,oBAAC,QAAD;GAAM,WAAU;GAA8B,UAAA;EAAe,CAAA,IAAI,IAC3E;;AAER"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/list/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { Button, IconButton } from './components/button/index.js';
|
|
2
|
+
export type { ButtonContent, ButtonIcon, ButtonProps, ButtonVariant, IconButtonProps, } from './components/button/index.js';
|
|
3
|
+
export { Card } from './components/card/index.js';
|
|
4
|
+
export type { CardProps } from './components/card/index.js';
|
|
5
|
+
export { List, ListItem } from './components/list/index.js';
|
|
6
|
+
export type { ListItemProps, ListProps } from './components/list/index.js';
|
|
7
|
+
export { Accordion, AccordionGroup } from './components/accordion/index.js';
|
|
8
|
+
export type { AccordionGroupProps, AccordionProps } from './components/accordion/index.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAClE,YAAY,EACV,aAAa,EACb,UAAU,EACV,WAAW,EACX,aAAa,EACb,eAAe,GAChB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,YAAY,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC5D,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAC5E,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import Button from "./components/button/Button.js";
|
|
2
|
+
import IconButton from "./components/button/IconButton.js";
|
|
3
|
+
import Card from "./components/card/Card.js";
|
|
4
|
+
import List from "./components/list/List.js";
|
|
5
|
+
import ListItem from "./components/list/ListItem.js";
|
|
6
|
+
import Accordion from "./components/accordion/Accordion.js";
|
|
7
|
+
import AccordionGroup from "./components/accordion/AccordionGroup.js";
|
|
8
|
+
export { Accordion, AccordionGroup, Button, Card, IconButton, List, ListItem };
|
package/dist/list.css
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
@layer chayns.components {
|
|
2
|
+
.chayns-list {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
list-style: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.chayns-list-item {
|
|
12
|
+
position: relative;
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: stretch;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.chayns-list-item__action {
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
flex: 1;
|
|
20
|
+
min-inline-size: 0;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: var(--k12);
|
|
24
|
+
margin: 0;
|
|
25
|
+
padding: var(--k10) var(--k16);
|
|
26
|
+
border: 0;
|
|
27
|
+
border-radius: 10px;
|
|
28
|
+
background: transparent;
|
|
29
|
+
font: inherit;
|
|
30
|
+
font-size: var(--fs-body);
|
|
31
|
+
color: var(--text);
|
|
32
|
+
text-align: start;
|
|
33
|
+
text-decoration: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.chayns-list-item__action--interactive {
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
transition: background 0.16s ease;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.chayns-list-item__action--interactive:disabled {
|
|
42
|
+
cursor: not-allowed;
|
|
43
|
+
color: var(--disabled-fg);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.chayns-list-item__action--interactive:focus-visible {
|
|
47
|
+
outline: none;
|
|
48
|
+
box-shadow: 0 0 0 var(--focus-ring-size)
|
|
49
|
+
rgb(var(--focus-ring-rgb), var(--focus-ring-alpha-strong));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.chayns-list-item__leading {
|
|
53
|
+
flex: none;
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.chayns-list-item__body {
|
|
59
|
+
min-inline-size: 0;
|
|
60
|
+
flex: 1;
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.chayns-list-item__title {
|
|
66
|
+
min-inline-size: 0;
|
|
67
|
+
overflow: hidden;
|
|
68
|
+
color: var(--text);
|
|
69
|
+
white-space: nowrap;
|
|
70
|
+
text-overflow: ellipsis;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.chayns-list-item__subtitle {
|
|
74
|
+
min-inline-size: 0;
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
font-size: var(--fs-meta);
|
|
77
|
+
color: var(--text-3);
|
|
78
|
+
white-space: nowrap;
|
|
79
|
+
text-overflow: ellipsis;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.chayns-list-item__unread {
|
|
83
|
+
flex: none;
|
|
84
|
+
inline-size: var(--k8);
|
|
85
|
+
block-size: var(--k8);
|
|
86
|
+
border-radius: 50%;
|
|
87
|
+
background: var(--accent);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.chayns-list-item__trailing {
|
|
91
|
+
flex: none;
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
gap: var(--k8);
|
|
95
|
+
padding-inline-end: var(--k16);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.chayns-visually-hidden {
|
|
99
|
+
position: absolute;
|
|
100
|
+
inline-size: 1px;
|
|
101
|
+
block-size: 1px;
|
|
102
|
+
margin: -1px;
|
|
103
|
+
padding: 0;
|
|
104
|
+
overflow: hidden;
|
|
105
|
+
clip-path: inset(50%);
|
|
106
|
+
white-space: nowrap;
|
|
107
|
+
border: 0;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@media (hover: hover) {
|
|
111
|
+
.chayns-list-item__action--interactive:hover:not(:disabled) {
|
|
112
|
+
background: var(--hover);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@media (prefers-reduced-motion: reduce) {
|
|
117
|
+
.chayns-list-item__action--interactive {
|
|
118
|
+
transition: none;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
package/dist/styles.css
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@chayns-ui/core",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Accessible React core components for chayns UI",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": [
|
|
8
|
+
"**/*.css"
|
|
9
|
+
],
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"LICENSE",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./button": {
|
|
21
|
+
"types": "./dist/components/button/index.d.ts",
|
|
22
|
+
"import": "./dist/components/button/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./button.css": "./dist/button.css",
|
|
25
|
+
"./card": {
|
|
26
|
+
"types": "./dist/components/card/index.d.ts",
|
|
27
|
+
"import": "./dist/components/card/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./card.css": "./dist/card.css",
|
|
30
|
+
"./list": {
|
|
31
|
+
"types": "./dist/components/list/index.d.ts",
|
|
32
|
+
"import": "./dist/components/list/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./list.css": "./dist/list.css",
|
|
35
|
+
"./accordion": {
|
|
36
|
+
"types": "./dist/components/accordion/index.d.ts",
|
|
37
|
+
"import": "./dist/components/accordion/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./accordion.css": "./dist/accordion.css",
|
|
40
|
+
"./styles.css": "./dist/styles.css",
|
|
41
|
+
"./package.json": "./package.json"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"react": ">=19.2 <20"
|
|
45
|
+
},
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">=24"
|
|
48
|
+
},
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "vite build && node ../../tooling/copy-core-css.mjs && tsc -b tsconfig.build.json --force",
|
|
54
|
+
"clean": "node ../../tooling/clean-package.mjs core",
|
|
55
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
56
|
+
}
|
|
57
|
+
}
|