@stainless-api/ui-primitives 0.1.0-beta.21 → 0.1.0-beta.23
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/dist/{Accordion-DLQE3Td6.js → Accordion-CL3Oarbz.js} +3 -3
- package/dist/{Accordion-CJL9SWwS.d.ts → Accordion-Cj5GURin.d.ts} +4 -4
- package/dist/{Button-DwndlytB.d.ts → Button-CxQtPObH.d.ts} +4 -4
- package/dist/{Button-DBhd6kU7.js → Button-DFAg4M-E.js} +3 -3
- package/dist/{Callout-UZQRuCQ5.js → Callout-BGkXD7D2.js} +1 -1
- package/dist/{Callout-CMz3Yl_5.d.ts → Callout-DlwbfFHm.d.ts} +2 -2
- package/dist/components/Accordion.d.ts +1 -1
- package/dist/components/Accordion.js +1 -1
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/Button.js +1 -1
- package/dist/components/Callout.d.ts +1 -1
- package/dist/components/Callout.js +1 -1
- package/dist/index.d.ts +170 -5
- package/dist/index.js +175 -5
- package/dist/scripts/index.d.ts +12 -1
- package/dist/scripts/index.js +150 -22
- package/dist/styles.css +210 -96
- package/dist/styles.js +0 -1
- package/package.json +21 -12
- package/.turbo/turbo-build.log +0 -35
- package/CHANGELOG.md +0 -133
- package/dist/DropdownButton-DoYDi8tB.js +0 -82
- package/dist/DropdownButton-zcvep_xH.d.ts +0 -50
- package/dist/components/DropdownButton.d.ts +0 -2
- package/dist/components/DropdownButton.js +0 -3
- package/eslint.config.js +0 -2
- package/src/components/Accordion.tsx +0 -41
- package/src/components/Button.tsx +0 -95
- package/src/components/Callout.tsx +0 -31
- package/src/components/accordion.css +0 -145
- package/src/components/button.css +0 -187
- package/src/components/callout.css +0 -93
- package/src/components/dropdown/Dropdown.tsx +0 -51
- package/src/components/dropdown/DropdownButton.tsx +0 -54
- package/src/components/dropdown/DropdownMenu.tsx +0 -113
- package/src/components/dropdown/dropdown.css +0 -232
- package/src/index.ts +0 -5
- package/src/scripts/dropdown-button.ts +0 -39
- package/src/scripts/dropdown.ts +0 -193
- package/src/scripts/index.ts +0 -2
- package/src/styles/layout.css +0 -13
- package/src/styles/scales.css +0 -129
- package/src/styles/starlight-compat.css +0 -156
- package/src/styles/swatches.css +0 -87
- package/src/styles/theme.css +0 -49
- package/src/styles/typography.css +0 -169
- package/src/styles.css +0 -11
- package/tsconfig.json +0 -11
package/CHANGELOG.md
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
# @stainless-api/ui-primitives
|
|
2
|
-
|
|
3
|
-
## 0.1.0-beta.21
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- 344761e: fix: dropdown button hover state
|
|
8
|
-
|
|
9
|
-
## 0.1.0-beta.20
|
|
10
|
-
|
|
11
|
-
### Patch Changes
|
|
12
|
-
|
|
13
|
-
- 7ef572c: feat: updated dropdowns
|
|
14
|
-
|
|
15
|
-
## 0.1.0-beta.19
|
|
16
|
-
|
|
17
|
-
### Patch Changes
|
|
18
|
-
|
|
19
|
-
- 58040d8: feat: ui primitives updates, cursor support
|
|
20
|
-
|
|
21
|
-
## 0.1.0-beta.18
|
|
22
|
-
|
|
23
|
-
### Minor Changes
|
|
24
|
-
|
|
25
|
-
- c635741: Updated worker and fixed docs-ui jsx issue
|
|
26
|
-
|
|
27
|
-
## 0.1.0-beta.17
|
|
28
|
-
|
|
29
|
-
### Patch Changes
|
|
30
|
-
|
|
31
|
-
- 1517484: fixing font loading, updating nav bar height
|
|
32
|
-
|
|
33
|
-
## 0.1.0-beta.16
|
|
34
|
-
|
|
35
|
-
### Patch Changes
|
|
36
|
-
|
|
37
|
-
- 9cdb24d: Update pagination components, fix search modal
|
|
38
|
-
|
|
39
|
-
## 0.1.0-beta.15
|
|
40
|
-
|
|
41
|
-
### Patch Changes
|
|
42
|
-
|
|
43
|
-
- 15c003d: fix react peer dependencies
|
|
44
|
-
|
|
45
|
-
## 0.1.0-beta.14
|
|
46
|
-
|
|
47
|
-
### Patch Changes
|
|
48
|
-
|
|
49
|
-
- 0618d05: Markdown rendering of prose pages, ai context menu, auth via cli, minor fixes
|
|
50
|
-
|
|
51
|
-
## 0.1.0-beta.13
|
|
52
|
-
|
|
53
|
-
### Patch Changes
|
|
54
|
-
|
|
55
|
-
- e35360f: include ui-primitive packages
|
|
56
|
-
|
|
57
|
-
## 0.1.0-beta.12
|
|
58
|
-
|
|
59
|
-
### Patch Changes
|
|
60
|
-
|
|
61
|
-
- a529fd4: fix: site title height
|
|
62
|
-
|
|
63
|
-
## 0.1.0-beta.11
|
|
64
|
-
|
|
65
|
-
### Patch Changes
|
|
66
|
-
|
|
67
|
-
- 26a4786: fix: include missing starlight config options
|
|
68
|
-
|
|
69
|
-
## 0.1.0-beta.10
|
|
70
|
-
|
|
71
|
-
### Patch Changes
|
|
72
|
-
|
|
73
|
-
- 3e44a9c: Reduce specificity on prose elements
|
|
74
|
-
|
|
75
|
-
## 0.1.0-beta.9
|
|
76
|
-
|
|
77
|
-
### Patch Changes
|
|
78
|
-
|
|
79
|
-
- c96f895: Remove css layers, update sidebar styles, add new prose elements
|
|
80
|
-
|
|
81
|
-
## 0.1.0-beta.8
|
|
82
|
-
|
|
83
|
-
### Patch Changes
|
|
84
|
-
|
|
85
|
-
- d15a520: fix initialization of dropdown buttons
|
|
86
|
-
|
|
87
|
-
## 0.1.0-beta.7
|
|
88
|
-
|
|
89
|
-
### Patch Changes
|
|
90
|
-
|
|
91
|
-
- 34e7c61: verify dependents update
|
|
92
|
-
|
|
93
|
-
## 0.1.0-beta.6
|
|
94
|
-
|
|
95
|
-
### Minor Changes
|
|
96
|
-
|
|
97
|
-
- f664b4d: Creating design system css variables, markdown styles, and typography improvements
|
|
98
|
-
|
|
99
|
-
### Patch Changes
|
|
100
|
-
|
|
101
|
-
- 34cbd12: verify publishing
|
|
102
|
-
|
|
103
|
-
## 0.1.0-beta.5
|
|
104
|
-
|
|
105
|
-
### Patch Changes
|
|
106
|
-
|
|
107
|
-
- e7a2a96: verifying dependent packages update
|
|
108
|
-
|
|
109
|
-
## 0.1.0-beta.4
|
|
110
|
-
|
|
111
|
-
### Patch Changes
|
|
112
|
-
|
|
113
|
-
- 2853ae8: fixing dependency structure
|
|
114
|
-
|
|
115
|
-
## 0.1.0-beta.3
|
|
116
|
-
|
|
117
|
-
### Patch Changes
|
|
118
|
-
|
|
119
|
-
- 870af8d: verify dependent packages update
|
|
120
|
-
|
|
121
|
-
## 0.1.0-beta.2
|
|
122
|
-
|
|
123
|
-
## 0.1.0-beta.1
|
|
124
|
-
|
|
125
|
-
### Patch Changes
|
|
126
|
-
|
|
127
|
-
- 5537225: verify publishing of dependent package works
|
|
128
|
-
|
|
129
|
-
## 0.1.0-beta.0
|
|
130
|
-
|
|
131
|
-
### Minor Changes
|
|
132
|
-
|
|
133
|
-
- ed77b46: prep packages for beta release
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import clsx from "clsx";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { ChevronsUpDown, ExternalLink } from "lucide-react";
|
|
4
|
-
|
|
5
|
-
//#region src/components/DropdownButton.tsx
|
|
6
|
-
function PrimaryActionText({ children }) {
|
|
7
|
-
return /* @__PURE__ */ jsx("span", {
|
|
8
|
-
"data-part": "primary-action-text",
|
|
9
|
-
children
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
function PrimaryAction({ className,...props }) {
|
|
13
|
-
return /* @__PURE__ */ jsx("button", {
|
|
14
|
-
"data-part": "primary-action",
|
|
15
|
-
...props,
|
|
16
|
-
className: clsx("stl-ui-dropdown-button__button stl-ui-dropdown-button--action", className)
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
function Trigger({ className,...props }) {
|
|
20
|
-
return /* @__PURE__ */ jsx("button", {
|
|
21
|
-
"aria-haspopup": "listbox",
|
|
22
|
-
"aria-expanded": "false",
|
|
23
|
-
"data-part": "trigger",
|
|
24
|
-
...props,
|
|
25
|
-
className: clsx("stl-ui-dropdown-button__button stl-ui-dropdown-button__trigger", className),
|
|
26
|
-
children: /* @__PURE__ */ jsx(ChevronsUpDown, { size: 16 })
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
function Menu({ className,...props }) {
|
|
30
|
-
return /* @__PURE__ */ jsx("div", {
|
|
31
|
-
"data-state": "closed",
|
|
32
|
-
"data-part": "menu",
|
|
33
|
-
...props,
|
|
34
|
-
className: clsx("stl-ui-dropdown-button__menu", className)
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
function MenuItemIcon({ className,...props }) {
|
|
38
|
-
return /* @__PURE__ */ jsx("div", {
|
|
39
|
-
"data-part": "item-icon",
|
|
40
|
-
...props,
|
|
41
|
-
className: clsx("stl-ui-dropdown-button__menu-item-icon", className)
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
function MenuItemText({ className, subtle,...props }) {
|
|
45
|
-
return /* @__PURE__ */ jsx("span", {
|
|
46
|
-
"data-part": "item-text",
|
|
47
|
-
className: clsx(`stl-ui-dropdown-button__menu-item-text`, { "stl-ui-dropdown-button__menu-item-text--subtle": subtle }, className),
|
|
48
|
-
...props
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
function MenuItem({ children, value, isExternalLink,...props }) {
|
|
52
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
53
|
-
"data-part": "item",
|
|
54
|
-
"data-value": value,
|
|
55
|
-
...props,
|
|
56
|
-
className: clsx("stl-ui-dropdown-button__menu-item", props.className),
|
|
57
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
58
|
-
className: "stl-ui-dropdown-button__menu-item-content",
|
|
59
|
-
children
|
|
60
|
-
}), isExternalLink && /* @__PURE__ */ jsx("div", {
|
|
61
|
-
className: "stl-ui-dropdown-button__menu-item-external-link-icon",
|
|
62
|
-
"data-part": "item-external-link-icon",
|
|
63
|
-
children: /* @__PURE__ */ jsx(ExternalLink, { size: 16 })
|
|
64
|
-
})]
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
function DropdownButton({ className,...props }) {
|
|
68
|
-
return /* @__PURE__ */ jsx("div", {
|
|
69
|
-
...props,
|
|
70
|
-
className: clsx("stl-ui-dropdown-button stl-ui-not-prose not-content", className)
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
DropdownButton.Menu = Menu;
|
|
74
|
-
DropdownButton.MenuItem = MenuItem;
|
|
75
|
-
DropdownButton.MenuItemIcon = MenuItemIcon;
|
|
76
|
-
DropdownButton.MenuItemText = MenuItemText;
|
|
77
|
-
DropdownButton.PrimaryAction = PrimaryAction;
|
|
78
|
-
DropdownButton.PrimaryActionText = PrimaryActionText;
|
|
79
|
-
DropdownButton.Trigger = Trigger;
|
|
80
|
-
|
|
81
|
-
//#endregion
|
|
82
|
-
export { DropdownButton as t };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
-
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/components/DropdownButton.d.ts
|
|
5
|
-
declare function DropdownButton({
|
|
6
|
-
className,
|
|
7
|
-
...props
|
|
8
|
-
}: ComponentPropsWithoutRef<'div'>): react_jsx_runtime6.JSX.Element;
|
|
9
|
-
declare namespace DropdownButton {
|
|
10
|
-
var Menu: ({
|
|
11
|
-
className,
|
|
12
|
-
...props
|
|
13
|
-
}: ComponentPropsWithoutRef<"div">) => react_jsx_runtime6.JSX.Element;
|
|
14
|
-
var MenuItem: ({
|
|
15
|
-
children,
|
|
16
|
-
value,
|
|
17
|
-
isExternalLink,
|
|
18
|
-
...props
|
|
19
|
-
}: ComponentPropsWithoutRef<"div"> & {
|
|
20
|
-
children?: React.ReactNode;
|
|
21
|
-
value: string;
|
|
22
|
-
isExternalLink?: boolean;
|
|
23
|
-
}) => react_jsx_runtime6.JSX.Element;
|
|
24
|
-
var MenuItemIcon: ({
|
|
25
|
-
className,
|
|
26
|
-
...props
|
|
27
|
-
}: ComponentPropsWithoutRef<"div">) => react_jsx_runtime6.JSX.Element;
|
|
28
|
-
var MenuItemText: ({
|
|
29
|
-
className,
|
|
30
|
-
subtle,
|
|
31
|
-
...props
|
|
32
|
-
}: ComponentPropsWithoutRef<"span"> & {
|
|
33
|
-
subtle?: boolean;
|
|
34
|
-
}) => react_jsx_runtime6.JSX.Element;
|
|
35
|
-
var PrimaryAction: ({
|
|
36
|
-
className,
|
|
37
|
-
...props
|
|
38
|
-
}: ComponentPropsWithoutRef<"button">) => react_jsx_runtime6.JSX.Element;
|
|
39
|
-
var PrimaryActionText: ({
|
|
40
|
-
children
|
|
41
|
-
}: {
|
|
42
|
-
children?: React.ReactNode;
|
|
43
|
-
}) => react_jsx_runtime6.JSX.Element;
|
|
44
|
-
var Trigger: ({
|
|
45
|
-
className,
|
|
46
|
-
...props
|
|
47
|
-
}: ComponentPropsWithoutRef<"button">) => react_jsx_runtime6.JSX.Element;
|
|
48
|
-
}
|
|
49
|
-
//#endregion
|
|
50
|
-
export { DropdownButton as t };
|
package/eslint.config.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
|
|
4
|
-
export type AccordionProps = React.ComponentProps<'details'>;
|
|
5
|
-
|
|
6
|
-
export function Accordion({ className, children, ...props }: AccordionProps) {
|
|
7
|
-
const classes = clsx('stl-ui-accordion', className);
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<details className={classes} {...props}>
|
|
11
|
-
{children}
|
|
12
|
-
</details>
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function AccordionSummary({ children, className, ...props }: React.ComponentProps<'summary'>) {
|
|
17
|
-
const classes = clsx('stl-ui-accordion__summary', className);
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<summary className={classes} {...props}>
|
|
21
|
-
{children}
|
|
22
|
-
</summary>
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
Accordion.Summary = AccordionSummary;
|
|
27
|
-
|
|
28
|
-
function AccordionGroup({ className, children, ...props }: React.ComponentProps<'div'>) {
|
|
29
|
-
const classes = clsx('stl-ui-accordion-group', className);
|
|
30
|
-
|
|
31
|
-
// TODO: boolean `exclusive` prop assigns a unique `name` to each of the child <details> elements
|
|
32
|
-
// For now this can be handled by the user
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<div className={classes} {...props}>
|
|
36
|
-
{children}
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
Accordion.Group = AccordionGroup;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import { LucideIcon } from 'lucide-react';
|
|
4
|
-
|
|
5
|
-
export type ButtonVariant =
|
|
6
|
-
| 'outline'
|
|
7
|
-
| 'ghost'
|
|
8
|
-
| 'accent'
|
|
9
|
-
| 'accent-muted'
|
|
10
|
-
| 'muted'
|
|
11
|
-
| 'success'
|
|
12
|
-
| 'destructive'
|
|
13
|
-
| 'default';
|
|
14
|
-
|
|
15
|
-
type BaseProps = {
|
|
16
|
-
variant?: ButtonVariant;
|
|
17
|
-
className?: string;
|
|
18
|
-
children?: React.ReactNode;
|
|
19
|
-
size?: 'sm' | 'lg' | 'default';
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
type AnchorBranch = BaseProps &
|
|
23
|
-
Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'className' | 'children'> & {
|
|
24
|
-
href: string;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
type ButtonBranch = BaseProps &
|
|
28
|
-
Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'children'> & {
|
|
29
|
-
href?: never;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export type ButtonProps = AnchorBranch | ButtonBranch;
|
|
33
|
-
|
|
34
|
-
// Because this code needs to run inside .astro files, we can’t use React.cloneElement
|
|
35
|
-
// (or radix-ui/react-slot). In .astro, children are passed as static HTML elements
|
|
36
|
-
// rather than React elements, so they can’t be cloned or modified to add class names.
|
|
37
|
-
|
|
38
|
-
export function Button(props: ButtonProps) {
|
|
39
|
-
const { variant, children } = props;
|
|
40
|
-
|
|
41
|
-
const classes = clsx(
|
|
42
|
-
'stl-ui-button',
|
|
43
|
-
{
|
|
44
|
-
'stl-ui-button--outline': variant === 'outline',
|
|
45
|
-
'stl-ui-button--ghost': variant === 'ghost',
|
|
46
|
-
'stl-ui-button--accent': variant === 'accent',
|
|
47
|
-
'stl-ui-button--accent-muted': variant === 'accent-muted',
|
|
48
|
-
'stl-ui-button--muted': variant === 'muted',
|
|
49
|
-
'stl-ui-button--success': variant === 'success',
|
|
50
|
-
'stl-ui-button--destructive': variant === 'destructive',
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
'stl-ui-button--size-sm': props.size === 'sm',
|
|
54
|
-
'stl-ui-button--size-lg': props.size === 'lg',
|
|
55
|
-
},
|
|
56
|
-
'not-content',
|
|
57
|
-
'stl-ui-not-prose',
|
|
58
|
-
props.className,
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
if ('href' in props) {
|
|
62
|
-
const { href, ...rest } = props as AnchorBranch;
|
|
63
|
-
return (
|
|
64
|
-
<a href={href} {...rest} className={classes}>
|
|
65
|
-
{children}
|
|
66
|
-
</a>
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const { type, ...rest } = props as ButtonBranch;
|
|
71
|
-
return (
|
|
72
|
-
<button type={type ?? 'button'} {...rest} className={classes}>
|
|
73
|
-
{children}
|
|
74
|
-
</button>
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
type LabelProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
79
|
-
|
|
80
|
-
Button.Label = function ButtonLabel({ className, ...rest }: LabelProps) {
|
|
81
|
-
return <span className={clsx('stl-ui-button-label leading-none', className)} {...rest} />;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
type IconProps = {
|
|
85
|
-
icon: LucideIcon;
|
|
86
|
-
size?: number;
|
|
87
|
-
} & React.HTMLAttributes<HTMLSpanElement>;
|
|
88
|
-
|
|
89
|
-
Button.Icon = function ButtonIcon({ className, icon: Icon, size = 18 }: IconProps) {
|
|
90
|
-
return (
|
|
91
|
-
<span className={clsx('stl-ui-button__icon', className)}>
|
|
92
|
-
<Icon size={size} />
|
|
93
|
-
</span>
|
|
94
|
-
);
|
|
95
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import { Info, CircleAlert, Lightbulb, Check, TriangleAlert, OctagonAlert } from 'lucide-react';
|
|
4
|
-
|
|
5
|
-
export type CalloutVariant = 'info' | 'note' | 'tip' | 'success' | 'warning' | 'danger';
|
|
6
|
-
|
|
7
|
-
export type CalloutProps = {
|
|
8
|
-
variant?: CalloutVariant;
|
|
9
|
-
className?: string;
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
} & Omit<React.ComponentProps<'aside'>, 'className' | 'children'>;
|
|
12
|
-
|
|
13
|
-
export function Callout({ variant = 'info', className, children, ...props }: CalloutProps) {
|
|
14
|
-
const classes = clsx('stl-ui-callout', `stl-ui-callout--${variant}`, className);
|
|
15
|
-
|
|
16
|
-
const Icon = {
|
|
17
|
-
info: Info,
|
|
18
|
-
note: CircleAlert,
|
|
19
|
-
tip: Lightbulb,
|
|
20
|
-
success: Check,
|
|
21
|
-
warning: TriangleAlert,
|
|
22
|
-
danger: OctagonAlert,
|
|
23
|
-
}[variant];
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<aside className={classes} {...props}>
|
|
27
|
-
<Icon className="stl-ui-callout__icon" />
|
|
28
|
-
<div className="stl-ui-callout__content">{children}</div>
|
|
29
|
-
</aside>
|
|
30
|
-
);
|
|
31
|
-
}
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
/* revert starlight details styles */
|
|
2
|
-
@layer starlight.content {
|
|
3
|
-
/* artificially increase specificity to outcompete selectors in the same layer whose styles we want to revert */
|
|
4
|
-
.stl-ui-prose .sl-markdown-content.sl-markdown-content.sl-markdown-content {
|
|
5
|
-
details,
|
|
6
|
-
summary,
|
|
7
|
-
summary::before,
|
|
8
|
-
summary::marker {
|
|
9
|
-
all: revert-layer;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.stl-ui-accordion {
|
|
15
|
-
--stl-ui-accordion-padding: 12px;
|
|
16
|
-
--stl-ui-accordion-content-padding-bottom: 4px;
|
|
17
|
-
--stl-ui-accordion-marker-size: 1em;
|
|
18
|
-
--stl-ui-accordion-marker-margin: calc((1lh - var(--stl-ui-accordion-marker-size)) / 2);
|
|
19
|
-
--stl-ui-accordion-row-gap: 8px;
|
|
20
|
-
--stl-ui-accordion-summary-column-gap: 8px;
|
|
21
|
-
--stl-ui-accordion-border-radius: var(--stl-ui-layout-border-radius);
|
|
22
|
-
--stl-ui-accordion-hover-film-color: oklch(from var(--stl-ui-foreground) l c h / 0.03);
|
|
23
|
-
/* left inset to make content line up with summary content (after chevron) */
|
|
24
|
-
--stl-ui--internal--accordion-padding-start: calc(
|
|
25
|
-
var(--stl-ui-accordion-padding) + var(--stl-ui-accordion-marker-size) +
|
|
26
|
-
var(--stl-ui-accordion-marker-margin) * 2 + var(--stl-ui-accordion-summary-column-gap)
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
background-color: var(--stl-ui-card-background);
|
|
30
|
-
border: 1px solid var(--stl-ui-border);
|
|
31
|
-
border-radius: var(--stl-ui-accordion-border-radius);
|
|
32
|
-
font-size: var(--stl-ui-typography-text-body);
|
|
33
|
-
|
|
34
|
-
padding: var(--stl-ui-accordion-padding);
|
|
35
|
-
/* indent content to line up with left edge of summary content */
|
|
36
|
-
padding-inline-start: var(--stl-ui--internal--accordion-padding-start);
|
|
37
|
-
|
|
38
|
-
& > .stl-ui-accordion__summary {
|
|
39
|
-
display: block;
|
|
40
|
-
list-style: none;
|
|
41
|
-
|
|
42
|
-
/* summary extends to the edges of the element in order to increase click target */
|
|
43
|
-
padding: var(--stl-ui-accordion-padding);
|
|
44
|
-
padding-inline-start: var(--stl-ui--internal--accordion-padding-start);
|
|
45
|
-
margin: calc(-1 * var(--stl-ui-accordion-padding));
|
|
46
|
-
margin-inline-start: calc(-1 * var(--stl-ui--internal--accordion-padding-start));
|
|
47
|
-
|
|
48
|
-
cursor: pointer;
|
|
49
|
-
font-weight: 500;
|
|
50
|
-
|
|
51
|
-
border-radius: var(--stl-ui-accordion-border-radius);
|
|
52
|
-
|
|
53
|
-
&::before {
|
|
54
|
-
content: '';
|
|
55
|
-
width: var(--stl-ui-accordion-marker-size);
|
|
56
|
-
height: var(--stl-ui-accordion-marker-size);
|
|
57
|
-
margin: var(--stl-ui-accordion-marker-margin);
|
|
58
|
-
background-color: currentColor;
|
|
59
|
-
display: block;
|
|
60
|
-
position: absolute;
|
|
61
|
-
--stl-ui-accordion--internal--marker-width: calc(
|
|
62
|
-
var(--stl-ui-accordion-marker-size) + var(--stl-ui-accordion-marker-margin) * 2
|
|
63
|
-
);
|
|
64
|
-
--stl-ui-accordion--internal--summary-marker-transform: translateX(
|
|
65
|
-
calc(
|
|
66
|
-
-1 * var(--stl-ui-accordion--internal--marker-width) - var(--stl-ui-accordion-summary-column-gap)
|
|
67
|
-
)
|
|
68
|
-
);
|
|
69
|
-
transform: var(--stl-ui-accordion--internal--summary-marker-transform);
|
|
70
|
-
|
|
71
|
-
--lucide-chevron-right: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tcmlnaHQtaWNvbiBsdWNpZGUtY2hldnJvbi1yaWdodCI+PHBhdGggZD0ibTkgMTggNi02LTYtNiIvPjwvc3ZnPg==');
|
|
72
|
-
mask-image: var(--lucide-chevron-right);
|
|
73
|
-
mask-size: contain;
|
|
74
|
-
mask-repeat: no-repeat;
|
|
75
|
-
|
|
76
|
-
transition: transform 0.1s ease-out;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
& > :first-child {
|
|
80
|
-
margin-top: 0;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
&[open] {
|
|
85
|
-
border-color: var(--stl-ui-border-emphasis);
|
|
86
|
-
padding-bottom: calc(var(--stl-ui-accordion-padding) + var(--stl-ui-accordion-content-padding-bottom));
|
|
87
|
-
|
|
88
|
-
& > .stl-ui-accordion__summary {
|
|
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
|
-
--stl-ui--internal--summary-padding-bottom: min(
|
|
91
|
-
var(--stl-ui-accordion-padding),
|
|
92
|
-
var(--stl-ui-accordion-row-gap)
|
|
93
|
-
);
|
|
94
|
-
padding-bottom: var(--stl-ui--internal--summary-padding-bottom);
|
|
95
|
-
margin-bottom: calc(var(--stl-ui-accordion-row-gap) - var(--stl-ui--internal--summary-padding-bottom));
|
|
96
|
-
border-bottom-left-radius: 0;
|
|
97
|
-
border-bottom-right-radius: 0;
|
|
98
|
-
|
|
99
|
-
&::before {
|
|
100
|
-
transform: var(--stl-ui-accordion--internal--summary-marker-transform) rotate(90deg);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
&:has(> .stl-ui-accordion__summary:hover) {
|
|
106
|
-
background-image: linear-gradient(
|
|
107
|
-
to bottom,
|
|
108
|
-
var(--stl-ui-accordion-hover-film-color),
|
|
109
|
-
var(--stl-ui-accordion-hover-film-color)
|
|
110
|
-
);
|
|
111
|
-
border-color: var(--stl-ui-border-emphasis);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
& > .stl-ui-accordion__summary + * {
|
|
115
|
-
margin-top: 0;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.stl-ui-accordion-group {
|
|
120
|
-
& > .stl-ui-accordion:has(+ .stl-ui-accordion) {
|
|
121
|
-
border-bottom-left-radius: 0;
|
|
122
|
-
border-bottom-right-radius: 0;
|
|
123
|
-
& > .stl-ui-accordion__summary {
|
|
124
|
-
border-bottom-left-radius: 0;
|
|
125
|
-
border-bottom-right-radius: 0;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
& > .stl-ui-accordion + .stl-ui-accordion {
|
|
130
|
-
margin-top: 0;
|
|
131
|
-
border-top-width: 0;
|
|
132
|
-
border-top-left-radius: 0;
|
|
133
|
-
border-top-right-radius: 0;
|
|
134
|
-
|
|
135
|
-
& > .stl-ui-accordion__summary {
|
|
136
|
-
border-top-left-radius: 0;
|
|
137
|
-
border-top-right-radius: 0;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.stl-ui-accordion:not(:is([open], :hover)) + .stl-ui-accordion:is([open], :hover) {
|
|
142
|
-
border-top-width: 1px;
|
|
143
|
-
margin-top: -1px;
|
|
144
|
-
}
|
|
145
|
-
}
|