@stainless-api/ui-primitives 0.1.0-beta.10 → 0.1.0-beta.11
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/.turbo/turbo-build.log +5 -0
- package/CHANGELOG.md +6 -0
- package/dist/components/Accordion.d.ts +10 -0
- package/dist/components/Accordion.js +19 -0
- package/dist/components/Accordion.js.map +1 -0
- package/dist/components/Button.d.ts +27 -0
- package/dist/components/Button.js +33 -0
- package/dist/components/Button.js.map +1 -0
- package/dist/components/Callout.d.ts +8 -0
- package/dist/components/Callout.js +16 -0
- package/dist/components/Callout.js.map +1 -0
- package/dist/components/DropdownButton.d.ts +21 -0
- package/dist/components/DropdownButton.js +37 -0
- package/dist/components/DropdownButton.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/scripts/dropdown-button.d.ts +5 -0
- package/dist/scripts/dropdown-button.js +43 -0
- package/dist/scripts/dropdown-button.js.map +1 -0
- package/dist/scripts/index.d.ts +1 -0
- package/dist/scripts/index.js +2 -0
- package/dist/scripts/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +6 -6
- package/src/components/DropdownButton.tsx +53 -38
- package/src/components/accordion.css +6 -6
- package/src/styles/layout.css +2 -0
- package/src/styles/starlight-compat.css +0 -4
- package/src/styles/typography.css +8 -20
- package/.env +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type AccordionProps = React.ComponentProps<'details'>;
|
|
3
|
+
export declare function Accordion({ className, children, ...props }: AccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare namespace Accordion {
|
|
5
|
+
var Summary: typeof AccordionSummary;
|
|
6
|
+
var Group: typeof AccordionGroup;
|
|
7
|
+
}
|
|
8
|
+
declare function AccordionSummary({ children, className, ...props }: React.ComponentProps<'summary'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function AccordionGroup({ className, children, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
export function Accordion({ className, children, ...props }) {
|
|
4
|
+
const classes = clsx('stl-ui-accordion', className);
|
|
5
|
+
return (_jsx("details", { className: classes, ...props, children: children }));
|
|
6
|
+
}
|
|
7
|
+
function AccordionSummary({ children, className, ...props }) {
|
|
8
|
+
const classes = clsx('stl-ui-accordion__summary', className);
|
|
9
|
+
return (_jsx("summary", { className: classes, ...props, children: children }));
|
|
10
|
+
}
|
|
11
|
+
Accordion.Summary = AccordionSummary;
|
|
12
|
+
function AccordionGroup({ className, children, ...props }) {
|
|
13
|
+
const classes = clsx('stl-ui-accordion-group', className);
|
|
14
|
+
// TODO: boolean `exclusive` prop assigns a unique `name` to each of the child <details> elements
|
|
15
|
+
// For now this can be handled by the user
|
|
16
|
+
return (_jsx("div", { className: classes, ...props, children: children }));
|
|
17
|
+
}
|
|
18
|
+
Accordion.Group = AccordionGroup;
|
|
19
|
+
//# sourceMappingURL=Accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../../src/components/Accordion.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AAIxB,MAAM,UAAU,SAAS,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAkB;IACzE,MAAM,OAAO,GAAG,IAAI,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;IAEpD,OAAO,CACL,kBAAS,SAAS,EAAE,OAAO,KAAM,KAAK,YACnC,QAAQ,GACD,CACX,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAmC;IAC1F,MAAM,OAAO,GAAG,IAAI,CAAC,2BAA2B,EAAE,SAAS,CAAC,CAAC;IAE7D,OAAO,CACL,kBAAS,SAAS,EAAE,OAAO,KAAM,KAAK,YACnC,QAAQ,GACD,CACX,CAAC;AACJ,CAAC;AAED,SAAS,CAAC,OAAO,GAAG,gBAAgB,CAAC;AAErC,SAAS,cAAc,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAA+B;IACpF,MAAM,OAAO,GAAG,IAAI,CAAC,wBAAwB,EAAE,SAAS,CAAC,CAAC;IAE1D,iGAAiG;IACjG,0CAA0C;IAE1C,OAAO,CACL,cAAK,SAAS,EAAE,OAAO,KAAM,KAAK,YAC/B,QAAQ,GACL,CACP,CAAC;AACJ,CAAC;AAED,SAAS,CAAC,KAAK,GAAG,cAAc,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
export type ButtonVariant = 'outline' | 'ghost' | 'accent' | 'accent-muted' | 'muted' | 'success' | 'destructive' | 'default';
|
|
4
|
+
type BaseProps = {
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
className?: string;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
size?: 'sm' | 'lg' | 'default';
|
|
9
|
+
};
|
|
10
|
+
type AnchorBranch = BaseProps & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'className' | 'children'> & {
|
|
11
|
+
href: string;
|
|
12
|
+
};
|
|
13
|
+
type ButtonBranch = BaseProps & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'children'> & {
|
|
14
|
+
href?: never;
|
|
15
|
+
};
|
|
16
|
+
export type ButtonProps = AnchorBranch | ButtonBranch;
|
|
17
|
+
export declare function Button(props: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare namespace Button {
|
|
19
|
+
var Label: ({ className, ...rest }: LabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
var Icon: ({ className, icon: Icon, size }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
}
|
|
22
|
+
type LabelProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
23
|
+
type IconProps = {
|
|
24
|
+
icon: LucideIcon;
|
|
25
|
+
size?: number;
|
|
26
|
+
} & React.HTMLAttributes<HTMLSpanElement>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
// Because this code needs to run inside .astro files, we can’t use React.cloneElement
|
|
4
|
+
// (or radix-ui/react-slot). In .astro, children are passed as static HTML elements
|
|
5
|
+
// rather than React elements, so they can’t be cloned or modified to add class names.
|
|
6
|
+
export function Button(props) {
|
|
7
|
+
const { variant, children } = props;
|
|
8
|
+
const classes = clsx('stl-ui-button', {
|
|
9
|
+
'stl-ui-button--outline': variant === 'outline',
|
|
10
|
+
'stl-ui-button--ghost': variant === 'ghost',
|
|
11
|
+
'stl-ui-button--accent': variant === 'accent',
|
|
12
|
+
'stl-ui-button--accent-muted': variant === 'accent-muted',
|
|
13
|
+
'stl-ui-button--muted': variant === 'muted',
|
|
14
|
+
'stl-ui-button--success': variant === 'success',
|
|
15
|
+
'stl-ui-button--destructive': variant === 'destructive',
|
|
16
|
+
}, {
|
|
17
|
+
'stl-ui-button--size-sm': props.size === 'sm',
|
|
18
|
+
'stl-ui-button--size-lg': props.size === 'lg',
|
|
19
|
+
}, 'not-content', 'stl-ui-not-prose', props.className);
|
|
20
|
+
if ('href' in props) {
|
|
21
|
+
const { href, ...rest } = props;
|
|
22
|
+
return (_jsx("a", { href: href, ...rest, className: classes, children: children }));
|
|
23
|
+
}
|
|
24
|
+
const { type, ...rest } = props;
|
|
25
|
+
return (_jsx("button", { type: type ?? 'button', ...rest, className: classes, children: children }));
|
|
26
|
+
}
|
|
27
|
+
Button.Label = function ButtonLabel({ className, ...rest }) {
|
|
28
|
+
return _jsx("span", { className: clsx('stl-ui-button-label leading-none', className), ...rest });
|
|
29
|
+
};
|
|
30
|
+
Button.Icon = function ButtonIcon({ className, icon: Icon, size = 18 }) {
|
|
31
|
+
return (_jsx("span", { className: clsx('stl-ui-button__icon', className), children: _jsx(Icon, { size: size }) }));
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AAgCxB,sFAAsF;AACtF,mFAAmF;AACnF,sFAAsF;AAEtF,MAAM,UAAU,MAAM,CAAC,KAAkB;IACvC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEpC,MAAM,OAAO,GAAG,IAAI,CAClB,eAAe,EACf;QACE,wBAAwB,EAAE,OAAO,KAAK,SAAS;QAC/C,sBAAsB,EAAE,OAAO,KAAK,OAAO;QAC3C,uBAAuB,EAAE,OAAO,KAAK,QAAQ;QAC7C,6BAA6B,EAAE,OAAO,KAAK,cAAc;QACzD,sBAAsB,EAAE,OAAO,KAAK,OAAO;QAC3C,wBAAwB,EAAE,OAAO,KAAK,SAAS;QAC/C,4BAA4B,EAAE,OAAO,KAAK,aAAa;KACxD,EACD;QACE,wBAAwB,EAAE,KAAK,CAAC,IAAI,KAAK,IAAI;QAC7C,wBAAwB,EAAE,KAAK,CAAC,IAAI,KAAK,IAAI;KAC9C,EACD,aAAa,EACb,kBAAkB,EAClB,KAAK,CAAC,SAAS,CAChB,CAAC;IAEF,IAAI,MAAM,IAAI,KAAK,EAAE,CAAC;QACpB,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,KAAqB,CAAC;QAChD,OAAO,CACL,YAAG,IAAI,EAAE,IAAI,KAAM,IAAI,EAAE,SAAS,EAAE,OAAO,YACxC,QAAQ,GACP,CACL,CAAC;IACJ,CAAC;IAED,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,KAAqB,CAAC;IAChD,OAAO,CACL,iBAAQ,IAAI,EAAE,IAAI,IAAI,QAAQ,KAAM,IAAI,EAAE,SAAS,EAAE,OAAO,YACzD,QAAQ,GACF,CACV,CAAC;AACJ,CAAC;AAID,MAAM,CAAC,KAAK,GAAG,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAc;IACpE,OAAO,eAAM,SAAS,EAAE,IAAI,CAAC,kCAAkC,EAAE,SAAS,CAAC,KAAM,IAAI,GAAI,CAAC;AAC5F,CAAC,CAAC;AAOF,MAAM,CAAC,IAAI,GAAG,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE,EAAa;IAC/E,OAAO,CACL,eAAM,SAAS,EAAE,IAAI,CAAC,qBAAqB,EAAE,SAAS,CAAC,YACrD,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,GAAI,GACf,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type CalloutVariant = 'info' | 'note' | 'tip' | 'success' | 'warning' | 'danger';
|
|
3
|
+
export type CalloutProps = {
|
|
4
|
+
variant?: CalloutVariant;
|
|
5
|
+
className?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
} & Omit<React.ComponentProps<'aside'>, 'className' | 'children'>;
|
|
8
|
+
export declare function Callout({ variant, className, children, ...props }: CalloutProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { Info, CircleAlert, Lightbulb, Check, TriangleAlert, OctagonAlert } from 'lucide-react';
|
|
4
|
+
export function Callout({ variant = 'info', className, children, ...props }) {
|
|
5
|
+
const classes = clsx('stl-ui-callout', `stl-ui-callout--${variant}`, className);
|
|
6
|
+
const Icon = {
|
|
7
|
+
info: Info,
|
|
8
|
+
note: CircleAlert,
|
|
9
|
+
tip: Lightbulb,
|
|
10
|
+
success: Check,
|
|
11
|
+
warning: TriangleAlert,
|
|
12
|
+
danger: OctagonAlert,
|
|
13
|
+
}[variant];
|
|
14
|
+
return (_jsxs("aside", { className: classes, ...props, children: [_jsx(Icon, { className: "stl-ui-callout__icon" }), _jsx("div", { className: "stl-ui-callout__content", children: children })] }));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=Callout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Callout.js","sourceRoot":"","sources":["../../src/components/Callout.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAUhG,MAAM,UAAU,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAgB;IACvF,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,EAAE,mBAAmB,OAAO,EAAE,EAAE,SAAS,CAAC,CAAC;IAEhF,MAAM,IAAI,GAAG;QACX,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,WAAW;QACjB,GAAG,EAAE,SAAS;QACd,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,aAAa;QACtB,MAAM,EAAE,YAAY;KACrB,CAAC,OAAO,CAAC,CAAC;IAEX,OAAO,CACL,iBAAO,SAAS,EAAE,OAAO,KAAM,KAAK,aAClC,KAAC,IAAI,IAAC,SAAS,EAAC,sBAAsB,GAAG,EACzC,cAAK,SAAS,EAAC,yBAAyB,YAAE,QAAQ,GAAO,IACnD,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export declare function DropdownButton({ id, className, ...props }: ComponentPropsWithoutRef<'div'> & {
|
|
3
|
+
id: string;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare namespace DropdownButton {
|
|
6
|
+
var Menu: ({ className, ...props }: ComponentPropsWithoutRef<"div">) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
var MenuItem: ({ children, value, isExternalLink, ...props }: ComponentPropsWithoutRef<"div"> & {
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
value: string;
|
|
10
|
+
isExternalLink?: boolean;
|
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
var MenuItemIcon: ({ className, ...props }: ComponentPropsWithoutRef<"div">) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
var MenuItemText: ({ className, subtle, ...props }: ComponentPropsWithoutRef<"span"> & {
|
|
14
|
+
subtle?: boolean;
|
|
15
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
var PrimaryAction: ({ className, ...props }: ComponentPropsWithoutRef<"button">) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
var PrimaryActionText: ({ children }: {
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
var Trigger: ({ className, ...props }: ComponentPropsWithoutRef<"button">) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { ChevronsUpDown, ExternalLink } from 'lucide-react';
|
|
4
|
+
function PrimaryActionText({ children }) {
|
|
5
|
+
return _jsx("span", { "data-part": "primary-action-text", children: children });
|
|
6
|
+
}
|
|
7
|
+
function PrimaryAction({ className, ...props }) {
|
|
8
|
+
return (_jsx("button", { "data-part": "primary-action", ...props, className: clsx('stl-ui-dropdown-button__button stl-ui-dropdown-button--action', className) }));
|
|
9
|
+
}
|
|
10
|
+
function Trigger({ className, ...props }) {
|
|
11
|
+
return (_jsx("button", { "aria-haspopup": "listbox", "aria-expanded": "false", "data-part": "trigger", ...props, className: clsx('stl-ui-dropdown-button__button stl-ui-dropdown-button__trigger', className), children: _jsx(ChevronsUpDown, { size: 16 }) }));
|
|
12
|
+
}
|
|
13
|
+
function Menu({ className, ...props }) {
|
|
14
|
+
return (_jsx("div", { "data-state": "closed", "data-part": "menu", ...props, className: clsx('stl-ui-dropdown-button__menu', className) }));
|
|
15
|
+
}
|
|
16
|
+
function MenuItemIcon({ className, ...props }) {
|
|
17
|
+
return (_jsx("div", { "data-part": "item-icon", ...props, className: clsx('stl-ui-dropdown-button__menu-item-icon', className) }));
|
|
18
|
+
}
|
|
19
|
+
function MenuItemText({ className, subtle, ...props }) {
|
|
20
|
+
return (_jsx("span", { "data-part": "item-text", className: clsx(`stl-ui-dropdown-button__menu-item-text`, {
|
|
21
|
+
'stl-ui-dropdown-button__menu-item-text--subtle': subtle,
|
|
22
|
+
}, className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
function MenuItem({ children, value, isExternalLink, ...props }) {
|
|
25
|
+
return (_jsxs("div", { "data-part": "item", "data-value": value, ...props, className: clsx('stl-ui-dropdown-button__menu-item', props.className), children: [_jsx("div", { className: "stl-ui-dropdown-button__menu-item-content", children: children }), isExternalLink && (_jsx("div", { className: "stl-ui-dropdown-button__menu-item-external-link-icon", "data-part": "item-external-link-icon", children: _jsx(ExternalLink, { size: 16 }) }))] }));
|
|
26
|
+
}
|
|
27
|
+
export function DropdownButton({ id, className, ...props }) {
|
|
28
|
+
return (_jsx("div", { id: id, ...props, className: clsx('stl-ui-dropdown-button stl-ui-not-prose not-content', className) }));
|
|
29
|
+
}
|
|
30
|
+
DropdownButton.Menu = Menu;
|
|
31
|
+
DropdownButton.MenuItem = MenuItem;
|
|
32
|
+
DropdownButton.MenuItemIcon = MenuItemIcon;
|
|
33
|
+
DropdownButton.MenuItemText = MenuItemText;
|
|
34
|
+
DropdownButton.PrimaryAction = PrimaryAction;
|
|
35
|
+
DropdownButton.PrimaryActionText = PrimaryActionText;
|
|
36
|
+
DropdownButton.Trigger = Trigger;
|
|
37
|
+
//# sourceMappingURL=DropdownButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownButton.js","sourceRoot":"","sources":["../../src/components/DropdownButton.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG5D,SAAS,iBAAiB,CAAC,EAAE,QAAQ,EAAkC;IACrE,OAAO,4BAAgB,qBAAqB,YAAE,QAAQ,GAAQ,CAAC;AACjE,CAAC;AAED,SAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAsC;IAChF,OAAO,CACL,8BACY,gBAAgB,KACtB,KAAK,EACT,SAAS,EAAE,IAAI,CAAC,+DAA+D,EAAE,SAAS,CAAC,GAC3F,CACH,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAsC;IAC1E,OAAO,CACL,kCACgB,SAAS,mBACT,OAAO,eACX,SAAS,KACf,KAAK,EACT,SAAS,EAAE,IAAI,CAAC,gEAAgE,EAAE,SAAS,CAAC,YAE5F,KAAC,cAAc,IAAC,IAAI,EAAE,EAAE,GAAI,GACrB,CACV,CAAC;AACJ,CAAC;AAED,SAAS,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAmC;IACpE,OAAO,CACL,4BACa,QAAQ,eACT,MAAM,KACZ,KAAK,EACT,SAAS,EAAE,IAAI,CAAC,8BAA8B,EAAE,SAAS,CAAC,GAC1D,CACH,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAmC;IAC5E,OAAO,CACL,2BACY,WAAW,KACjB,KAAK,EACT,SAAS,EAAE,IAAI,CAAC,wCAAwC,EAAE,SAAS,CAAC,GACpE,CACH,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,EACpB,SAAS,EACT,MAAM,EACN,GAAG,KAAK,EACgD;IACxD,OAAO,CACL,4BACY,WAAW,EACrB,SAAS,EAAE,IAAI,CACb,wCAAwC,EACxC;YACE,gDAAgD,EAAE,MAAM;SACzD,EACD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,EAChB,QAAQ,EACR,KAAK,EACL,cAAc,EACd,GAAG,KAAK,EAKT;IACC,OAAO,CACL,4BACY,MAAM,gBACJ,KAAK,KACb,KAAK,EACT,SAAS,EAAE,IAAI,CAAC,mCAAmC,EAAE,KAAK,CAAC,SAAS,CAAC,aAErE,cAAK,SAAS,EAAC,2CAA2C,YAAE,QAAQ,GAAO,EAC1E,cAAc,IAAI,CACjB,cACE,SAAS,EAAC,sDAAsD,eACtD,yBAAyB,YAEnC,KAAC,YAAY,IAAC,IAAI,EAAE,EAAE,GAAI,GACtB,CACP,IACG,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,EAC7B,EAAE,EACF,SAAS,EACT,GAAG,KAAK,EACyC;IACjD,OAAO,CACL,cACE,EAAE,EAAE,EAAE,KACF,KAAK,EACT,SAAS,EAAE,IAAI,CAAC,qDAAqD,EAAE,SAAS,CAAC,GACjF,CACH,CAAC;AACJ,CAAC;AAED,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC;AAC3B,cAAc,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACnC,cAAc,CAAC,YAAY,GAAG,YAAY,CAAC;AAC3C,cAAc,CAAC,YAAY,GAAG,YAAY,CAAC;AAC3C,cAAc,CAAC,aAAa,GAAG,aAAa,CAAC;AAC7C,cAAc,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;AACrD,cAAc,CAAC,OAAO,GAAG,OAAO,CAAC"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export function initDropdownButton({ dropdownId, onSelect, onPrimaryAction, }) {
|
|
2
|
+
const dropdown = document.getElementById(dropdownId);
|
|
3
|
+
if (!dropdown)
|
|
4
|
+
return;
|
|
5
|
+
const trigger = dropdown.querySelector('[data-part="trigger"]');
|
|
6
|
+
const menu = dropdown.querySelector('[data-part="menu"]');
|
|
7
|
+
const primaryAction = dropdown.querySelector('[data-part="primary-action"]');
|
|
8
|
+
if (!trigger || !menu || !primaryAction)
|
|
9
|
+
return;
|
|
10
|
+
let isOpen = false;
|
|
11
|
+
function toggleDropdown() {
|
|
12
|
+
if (!trigger || !menu)
|
|
13
|
+
return;
|
|
14
|
+
isOpen = !isOpen;
|
|
15
|
+
menu.dataset.state = isOpen ? 'open' : 'closed';
|
|
16
|
+
trigger.setAttribute('aria-expanded', String(isOpen));
|
|
17
|
+
}
|
|
18
|
+
trigger.addEventListener('click', toggleDropdown);
|
|
19
|
+
document.addEventListener('click', (event) => {
|
|
20
|
+
if (!isOpen)
|
|
21
|
+
return;
|
|
22
|
+
if (!dropdown.contains(event.target)) {
|
|
23
|
+
toggleDropdown();
|
|
24
|
+
}
|
|
25
|
+
if (primaryAction && primaryAction.contains(event.target)) {
|
|
26
|
+
toggleDropdown();
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
const items = dropdown.querySelectorAll('[data-part="item"]');
|
|
30
|
+
items.forEach((item) => {
|
|
31
|
+
item.addEventListener('click', () => {
|
|
32
|
+
const value = item.getAttribute('data-value');
|
|
33
|
+
if (value) {
|
|
34
|
+
onSelect(value);
|
|
35
|
+
}
|
|
36
|
+
toggleDropdown();
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
primaryAction.addEventListener('click', () => {
|
|
40
|
+
onPrimaryAction(primaryAction);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=dropdown-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-button.js","sourceRoot":"","sources":["../../src/scripts/dropdown-button.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,kBAAkB,CAAC,EACjC,UAAU,EACV,QAAQ,EACR,eAAe,GAKhB;IACC,MAAM,QAAQ,GAAG,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IACrD,IAAI,CAAC,QAAQ;QAAE,OAAO;IAEtB,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,uBAAuB,CAA6B,CAAC;IAC5F,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,oBAAoB,CAAuB,CAAC;IAChF,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,8BAA8B,CAAC,CAAC;IAE7E,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,IAAI,CAAC,aAAa;QAAE,OAAO;IAEhD,IAAI,MAAM,GAAG,KAAK,CAAC;IAEnB,SAAS,cAAc;QACrB,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI;YAAE,OAAO;QAC9B,MAAM,GAAG,CAAC,MAAM,CAAC;QACjB,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;QAChD,OAAO,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IACxD,CAAC;IAED,OAAO,CAAC,gBAAgB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAElD,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;QAC3C,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,EAAE,CAAC;YAC7C,cAAc,EAAE,CAAC;QACnB,CAAC;QAED,IAAI,aAAa,IAAI,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,EAAE,CAAC;YAClE,cAAc,EAAE,CAAC;QACnB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,KAAK,GAAG,QAAQ,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;IAC9D,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACrB,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;YAClC,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;YAC9C,IAAI,KAAK,EAAE,CAAC;gBACV,QAAQ,CAAC,KAAK,CAAC,CAAC;YAClB,CAAC;YACD,cAAc,EAAE,CAAC;QACnB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,aAAa,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;QAC3C,eAAe,CAAC,aAAa,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dropdown-button';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scripts/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/@total-typescript+ts-reset@0.6.1/node_modules/@total-typescript/ts-reset/dist/fetch.d.ts","../../../node_modules/.pnpm/@total-typescript+ts-reset@0.6.1/node_modules/@total-typescript/ts-reset/dist/utils.d.ts","../../../node_modules/.pnpm/@total-typescript+ts-reset@0.6.1/node_modules/@total-typescript/ts-reset/dist/filter-boolean.d.ts","../../../node_modules/.pnpm/@total-typescript+ts-reset@0.6.1/node_modules/@total-typescript/ts-reset/dist/is-array.d.ts","../../../node_modules/.pnpm/@total-typescript+ts-reset@0.6.1/node_modules/@total-typescript/ts-reset/dist/json-parse.d.ts","../../../node_modules/.pnpm/@total-typescript+ts-reset@0.6.1/node_modules/@total-typescript/ts-reset/dist/array-includes.d.ts","../../../node_modules/.pnpm/@total-typescript+ts-reset@0.6.1/node_modules/@total-typescript/ts-reset/dist/set-has.d.ts","../../../node_modules/.pnpm/@total-typescript+ts-reset@0.6.1/node_modules/@total-typescript/ts-reset/dist/map-constructor.d.ts","../../../node_modules/.pnpm/@total-typescript+ts-reset@0.6.1/node_modules/@total-typescript/ts-reset/dist/map-has.d.ts","../../../node_modules/.pnpm/@total-typescript+ts-reset@0.6.1/node_modules/@total-typescript/ts-reset/dist/array-index-of.d.ts","../../../node_modules/.pnpm/@total-typescript+ts-reset@0.6.1/node_modules/@total-typescript/ts-reset/dist/promise-catch.d.ts","../../../node_modules/.pnpm/@total-typescript+ts-reset@0.6.1/node_modules/@total-typescript/ts-reset/dist/recommended.d.ts","../../../reset.d.ts","../../../node_modules/.pnpm/@types+react@19.1.13/node_modules/@types/react/global.d.ts","../../../node_modules/.pnpm/csstype@3.1.3/node_modules/csstype/index.d.ts","../../../node_modules/.pnpm/@types+react@19.1.13/node_modules/@types/react/index.d.ts","../../../node_modules/.pnpm/@types+react@19.1.13/node_modules/@types/react/jsx-runtime.d.ts","../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/clsx.d.mts","../../../node_modules/.pnpm/lucide-react@0.544.0_react@19.1.1/node_modules/lucide-react/dist/lucide-react.d.ts","../src/components/button.tsx","../src/components/dropdownbutton.tsx","../src/components/callout.tsx","../src/components/accordion.tsx","../src/index.ts","../src/scripts/dropdown-button.ts","../src/scripts/index.ts","../../../node_modules/.pnpm/@types+react-dom@19.1.9_@types+react@19.1.13/node_modules/@types/react-dom/index.d.ts"],"fileIdsList":[[65],[64,66,67,68,69,70,71,72,73,74],[79],[77,78],[79,80,81],[79,80,81,82],[80,83,84,85,86],[80],[80,88]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"98e4a7b236b99d95ba3b38f30392dc9370020002350dab42e78ae1a6353dcdd3","affectsGlobalScope":true,"impliedFormat":1},{"version":"5189bddfa6ca2850dd10fc5c96a205b898da3f7773c11164c688d46ec9b27eed","affectsGlobalScope":true,"impliedFormat":1},{"version":"9a07caf171973d8886c28128e84c122e1f6fe16b0ccd601d2dd998216053deb3","affectsGlobalScope":true,"impliedFormat":1},{"version":"22f9c4223c59fd47ea5aadee362aec0b1adc9a6e58f58d9d848d71732f676abf","affectsGlobalScope":true,"impliedFormat":1},{"version":"8c5c8110577288007799018d817ecec25fe3eb3aefba99fc8720eb7c1bcd306e","affectsGlobalScope":true,"impliedFormat":1},{"version":"db41487da1c62b8a2e9aeaba4b79b9e2270452cfca0165bacb22ab50b2fb9bed","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb0d8eac52f68a5fd4f4e8119040c907ca182f45f883e29b5e61cb9eeecb068a","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf85bb53c4c344237dbac7557d13bb6b331e1d325bc33c7b0d1459a2b9feb8f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"1bc1de3b1f094ed8f0612239c11d3163c1b1d7e197ecc6c1606051a3be8bfb5d","affectsGlobalScope":true,"impliedFormat":1},{"version":"78eebaa895ec3bfc488e0f2a7a05d573604be33f692187381ba8108cfe31b8c4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1138a25afe3a31b4dc62ae38265569ca893312ea93d007a9bb65a50d57325b8","affectsGlobalScope":true,"impliedFormat":1},{"version":"58d590af11ceda2caa79275e78ed56a91025c248f2b6fbe4e47af0f87a82075a","impliedFormat":1},"90785263f9b4527b55ef1c9390e5a7bafd0c7eafaf19ba7a65d77e7ba35a0beb",{"version":"170d4db14678c68178ee8a3d5a990d5afb759ecb6ec44dbd885c50f6da6204f6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"bea6c0f5b819cf8cba6608bf3530089119294f949640714011d46ec8013b61c2","impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"c57b441e0c0a9cbdfa7d850dae1f8a387d6f81cbffbc3cd0465d530084c2417d","impliedFormat":99},{"version":"3515102d216c9971e9f1800b3de1b628c0ff9567daf5620fb18db09df604e135","impliedFormat":1},{"version":"a55605d31c9fe56296c6dd17b5f2d41e10cc271b1aae2fc1aad9b355a49f8fbb","signature":"e75b799c2101af2355da5d09a91700d8941bacf3e13cc3587e1a2efef0b63597"},{"version":"b5e92e839c354434cfdfdf1e0fc57cbf5b0e7c3342110231cd393ebd9838a839","signature":"4a120bd77835318eccb2d27a15e737037b46916a65ea464dacd0708849fe8d38"},{"version":"bf2fa018f62a163fe4520edb8ae68f392f7ab14b2703f3dfe09f15bdcc56c459","signature":"4132a5733e62fd5d5d1bb195265dc6406be70f1cc0769ebc13b5ac150b85ecfc"},{"version":"d08db4c373417fd94859b4a6fbbe6ed4f4e76482803de474c6096c3b31053755","signature":"8a46112a6658f39d7d74e8d88047d6a0dfef399d8cf0c8d98af1a1b65cd72a22"},"7b5461cf92f84d1fa8ac93c992a82fb962c85c6d335de639da4735ac87312425",{"version":"8cc193e3ae8c597eb59edee9c46a6b16d1497931a48a57ec319b17ebb90f0c39","signature":"87277d219da0f8be25dc90a5cd71975bcce63fdd5d7e2888ead4fb44fe7e28e1"},"5f4716d8277278eeb2d7079ad937e25135c868e103b51dee702ef075b7f09d66",{"version":"a0acca63c9e39580f32a10945df231815f0fe554c074da96ba6564010ffbd2d8","impliedFormat":1}],"root":[76,[83,89]],"options":{"allowImportingTsExtensions":true,"allowJs":true,"declaration":true,"declarationDir":"./","esModuleInterop":true,"experimentalDecorators":true,"jsx":4,"module":99,"noImplicitOverride":true,"noUncheckedIndexedAccess":true,"outDir":"./","rewriteRelativeImportExtensions":true,"skipLibCheck":true,"sourceMap":true,"strict":true,"target":99},"referencedMap":[[69,1],[73,1],[66,1],[72,1],[75,2],[70,1],[90,3],[79,4],[80,3],[82,3],[86,5],[83,6],[85,6],[84,6],[87,7],[88,8],[89,9]],"version":"5.9.2"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stainless-api/ui-primitives",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.11",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"lucide-react": "^0.544.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@types/react": "^19.
|
|
31
|
-
"@types/react-dom": "^19.
|
|
32
|
-
"react": "^19.
|
|
33
|
-
"react-dom": "^19.
|
|
34
|
-
"typescript": "5.9.
|
|
30
|
+
"@types/react": "^19.2.2",
|
|
31
|
+
"@types/react-dom": "^19.2.2",
|
|
32
|
+
"react": "^19.2.0",
|
|
33
|
+
"react-dom": "^19.2.0",
|
|
34
|
+
"typescript": "5.9.3",
|
|
35
35
|
"@stainless/eslint-config": "0.0.0"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -1,69 +1,73 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
2
|
import { ChevronsUpDown, ExternalLink } from 'lucide-react';
|
|
3
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
3
4
|
|
|
4
5
|
function PrimaryActionText({ children }: { children?: React.ReactNode }) {
|
|
5
6
|
return <span data-part="primary-action-text">{children}</span>;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
|
-
function PrimaryAction({
|
|
9
|
+
function PrimaryAction({ className, ...props }: ComponentPropsWithoutRef<'button'>) {
|
|
9
10
|
return (
|
|
10
11
|
<button
|
|
11
|
-
type="button"
|
|
12
12
|
data-part="primary-action"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
</button>
|
|
13
|
+
{...props}
|
|
14
|
+
className={clsx('stl-ui-dropdown-button__button stl-ui-dropdown-button--action', className)}
|
|
15
|
+
/>
|
|
17
16
|
);
|
|
18
17
|
}
|
|
19
18
|
|
|
20
|
-
function Trigger() {
|
|
19
|
+
function Trigger({ className, ...props }: ComponentPropsWithoutRef<'button'>) {
|
|
21
20
|
return (
|
|
22
21
|
<button
|
|
23
|
-
className="stl-ui-dropdown-button__button stl-ui-dropdown-button__trigger"
|
|
24
22
|
aria-haspopup="listbox"
|
|
25
23
|
aria-expanded="false"
|
|
26
24
|
data-part="trigger"
|
|
25
|
+
{...props}
|
|
26
|
+
className={clsx('stl-ui-dropdown-button__button stl-ui-dropdown-button__trigger', className)}
|
|
27
27
|
>
|
|
28
28
|
<ChevronsUpDown size={16} />
|
|
29
29
|
</button>
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
function Menu({
|
|
33
|
+
function Menu({ className, ...props }: ComponentPropsWithoutRef<'div'>) {
|
|
34
34
|
return (
|
|
35
|
-
<div
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
<div
|
|
36
|
+
data-state="closed"
|
|
37
|
+
data-part="menu"
|
|
38
|
+
{...props}
|
|
39
|
+
className={clsx('stl-ui-dropdown-button__menu', className)}
|
|
40
|
+
/>
|
|
38
41
|
);
|
|
39
42
|
}
|
|
40
43
|
|
|
41
|
-
function MenuItemIcon({
|
|
44
|
+
function MenuItemIcon({ className, ...props }: ComponentPropsWithoutRef<'div'>) {
|
|
42
45
|
return (
|
|
43
|
-
<div
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
<div
|
|
47
|
+
data-part="item-icon"
|
|
48
|
+
{...props}
|
|
49
|
+
className={clsx('stl-ui-dropdown-button__menu-item-icon', className)}
|
|
50
|
+
/>
|
|
46
51
|
);
|
|
47
52
|
}
|
|
48
53
|
|
|
49
|
-
function MenuItemText({
|
|
54
|
+
function MenuItemText({
|
|
55
|
+
className,
|
|
56
|
+
subtle,
|
|
57
|
+
...props
|
|
58
|
+
}: ComponentPropsWithoutRef<'span'> & { subtle?: boolean }) {
|
|
50
59
|
return (
|
|
51
60
|
<span
|
|
52
|
-
className={clsx(`stl-ui-dropdown-button__menu-item-text`, {
|
|
53
|
-
'stl-ui-dropdown-button__menu-item-text--subtle': subtle,
|
|
54
|
-
})}
|
|
55
61
|
data-part="item-text"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
{children}
|
|
66
|
-
</span>
|
|
62
|
+
className={clsx(
|
|
63
|
+
`stl-ui-dropdown-button__menu-item-text`,
|
|
64
|
+
{
|
|
65
|
+
'stl-ui-dropdown-button__menu-item-text--subtle': subtle,
|
|
66
|
+
},
|
|
67
|
+
className,
|
|
68
|
+
)}
|
|
69
|
+
{...props}
|
|
70
|
+
/>
|
|
67
71
|
);
|
|
68
72
|
}
|
|
69
73
|
|
|
@@ -71,13 +75,19 @@ function MenuItem({
|
|
|
71
75
|
children,
|
|
72
76
|
value,
|
|
73
77
|
isExternalLink,
|
|
74
|
-
|
|
78
|
+
...props
|
|
79
|
+
}: ComponentPropsWithoutRef<'div'> & {
|
|
75
80
|
children?: React.ReactNode;
|
|
76
81
|
value: string;
|
|
77
82
|
isExternalLink?: boolean;
|
|
78
83
|
}) {
|
|
79
84
|
return (
|
|
80
|
-
<div
|
|
85
|
+
<div
|
|
86
|
+
data-part="item"
|
|
87
|
+
data-value={value}
|
|
88
|
+
{...props}
|
|
89
|
+
className={clsx('stl-ui-dropdown-button__menu-item', props.className)}
|
|
90
|
+
>
|
|
81
91
|
<div className="stl-ui-dropdown-button__menu-item-content">{children}</div>
|
|
82
92
|
{isExternalLink && (
|
|
83
93
|
<div
|
|
@@ -91,11 +101,17 @@ function MenuItem({
|
|
|
91
101
|
);
|
|
92
102
|
}
|
|
93
103
|
|
|
94
|
-
export function DropdownButton({
|
|
104
|
+
export function DropdownButton({
|
|
105
|
+
id,
|
|
106
|
+
className,
|
|
107
|
+
...props
|
|
108
|
+
}: ComponentPropsWithoutRef<'div'> & { id: string }) {
|
|
95
109
|
return (
|
|
96
|
-
<div
|
|
97
|
-
{
|
|
98
|
-
|
|
110
|
+
<div
|
|
111
|
+
id={id}
|
|
112
|
+
{...props}
|
|
113
|
+
className={clsx('stl-ui-dropdown-button stl-ui-not-prose not-content', className)}
|
|
114
|
+
/>
|
|
99
115
|
);
|
|
100
116
|
}
|
|
101
117
|
|
|
@@ -103,7 +119,6 @@ DropdownButton.Menu = Menu;
|
|
|
103
119
|
DropdownButton.MenuItem = MenuItem;
|
|
104
120
|
DropdownButton.MenuItemIcon = MenuItemIcon;
|
|
105
121
|
DropdownButton.MenuItemText = MenuItemText;
|
|
106
|
-
DropdownButton.MenuItemTextSubtle = MenuItemTextSubtle;
|
|
107
122
|
DropdownButton.PrimaryAction = PrimaryAction;
|
|
108
123
|
DropdownButton.PrimaryActionText = PrimaryActionText;
|
|
109
124
|
DropdownButton.Trigger = Trigger;
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
/* indent content to line up with left edge of summary content */
|
|
36
36
|
padding-inline-start: var(--stl-ui--internal--accordion-padding-start);
|
|
37
37
|
|
|
38
|
-
.stl-ui-accordion__summary {
|
|
38
|
+
& > .stl-ui-accordion__summary {
|
|
39
39
|
display: block;
|
|
40
40
|
list-style: none;
|
|
41
41
|
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
border-color: var(--stl-ui-border-emphasis);
|
|
86
86
|
padding-bottom: calc(var(--stl-ui-accordion-padding) + var(--stl-ui-accordion-content-padding-bottom));
|
|
87
87
|
|
|
88
|
-
.stl-ui-accordion__summary {
|
|
88
|
+
& > .stl-ui-accordion__summary {
|
|
89
89
|
/* padding-bottom shouldn’t extend beyond the row gap while open, i.e. we shouldn’t be negative-margin-placing content overlapping summary */
|
|
90
90
|
--stl-ui--internal--summary-padding-bottom: min(
|
|
91
91
|
var(--stl-ui-accordion-padding),
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
&:has(.stl-ui-accordion__summary:hover) {
|
|
105
|
+
&:has(> .stl-ui-accordion__summary:hover) {
|
|
106
106
|
background-image: linear-gradient(
|
|
107
107
|
to bottom,
|
|
108
108
|
var(--stl-ui-accordion-hover-film-color),
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
border-color: var(--stl-ui-border-emphasis);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
.stl-ui-accordion__summary + * {
|
|
114
|
+
& > .stl-ui-accordion__summary + * {
|
|
115
115
|
margin-top: 0;
|
|
116
116
|
}
|
|
117
117
|
}
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
& > .stl-ui-accordion:has(+ .stl-ui-accordion) {
|
|
121
121
|
border-bottom-left-radius: 0;
|
|
122
122
|
border-bottom-right-radius: 0;
|
|
123
|
-
.stl-ui-accordion__summary {
|
|
123
|
+
& > .stl-ui-accordion__summary {
|
|
124
124
|
border-bottom-left-radius: 0;
|
|
125
125
|
border-bottom-right-radius: 0;
|
|
126
126
|
}
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
border-top-left-radius: 0;
|
|
133
133
|
border-top-right-radius: 0;
|
|
134
134
|
|
|
135
|
-
.stl-ui-accordion__summary {
|
|
135
|
+
& > .stl-ui-accordion__summary {
|
|
136
136
|
border-top-left-radius: 0;
|
|
137
137
|
border-top-right-radius: 0;
|
|
138
138
|
}
|
package/src/styles/layout.css
CHANGED
|
@@ -64,10 +64,6 @@
|
|
|
64
64
|
|
|
65
65
|
/* Starlight Compatibility */
|
|
66
66
|
.stl-ui-prose {
|
|
67
|
-
:is(h1, h2, h3, h4, h5) code {
|
|
68
|
-
font-size: 0.9em;
|
|
69
|
-
font-weight: inherit;
|
|
70
|
-
}
|
|
71
67
|
/* TODO: Disable starlight headingLinks and replace with our own */
|
|
72
68
|
/* Duplicate styles from h1–5 in typography; TODO: move to mixins after adopting preprocessor */
|
|
73
69
|
.sl-heading-wrapper.level-h1 {
|
|
@@ -67,20 +67,10 @@ body {
|
|
|
67
67
|
color: var(--stl-ui-foreground);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
h1,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
h5,
|
|
75
|
-
h6 {
|
|
76
|
-
&:not(.stl-ui-not-prose *) {
|
|
77
|
-
&,
|
|
78
|
-
* {
|
|
79
|
-
color: var(--stl-ui-foreground);
|
|
80
|
-
font-weight: 500;
|
|
81
|
-
line-height: var(--stl-ui-typography-line-height-headings);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
70
|
+
:is(h1, h2, h3, h4, h5, h6):not(.stl-ui-not-prose *) {
|
|
71
|
+
color: var(--stl-ui-foreground);
|
|
72
|
+
font-weight: 500;
|
|
73
|
+
line-height: var(--stl-ui-typography-line-height-headings);
|
|
84
74
|
}
|
|
85
75
|
|
|
86
76
|
h1:not(.stl-ui-not-prose *) {
|
|
@@ -160,13 +150,11 @@ body {
|
|
|
160
150
|
|
|
161
151
|
/* Code/Regular */
|
|
162
152
|
font-family: var(--stl-ui-typography-font-mono);
|
|
163
|
-
font-size:
|
|
164
|
-
font-
|
|
165
|
-
font-weight: 400;
|
|
166
|
-
line-height: 150%; /* 21px */
|
|
153
|
+
font-size: 0.9em;
|
|
154
|
+
font-weight: inherit;
|
|
167
155
|
|
|
168
|
-
padding: 0
|
|
156
|
+
padding: 0 0.2em;
|
|
169
157
|
background-color: oklch(from var(--stl-ui-foreground) l c h / 0.1);
|
|
170
|
-
border-radius:
|
|
158
|
+
border-radius: 0.2em;
|
|
171
159
|
}
|
|
172
160
|
}
|
package/.env
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
STAINLESS_API_KEY=stl_sk_001uwmod48VpDm2a1bvB1tUTdJ1ooZ5I
|