@stainless-api/ui-primitives 0.1.0-beta.26 → 0.1.0-beta.27

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.
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/Accordion.d.ts
5
5
  type AccordionProps = React.ComponentProps<'details'>;
@@ -7,7 +7,7 @@ declare function Accordion({
7
7
  className,
8
8
  children,
9
9
  ...props
10
- }: AccordionProps): react_jsx_runtime0.JSX.Element;
10
+ }: AccordionProps): react_jsx_runtime3.JSX.Element;
11
11
  declare namespace Accordion {
12
12
  var Summary: typeof AccordionSummary;
13
13
  var Group: typeof AccordionGroup;
@@ -16,11 +16,11 @@ declare function AccordionSummary({
16
16
  children,
17
17
  className,
18
18
  ...props
19
- }: React.ComponentProps<'summary'>): react_jsx_runtime0.JSX.Element;
19
+ }: React.ComponentProps<'summary'>): react_jsx_runtime3.JSX.Element;
20
20
  declare function AccordionGroup({
21
21
  className,
22
22
  children,
23
23
  ...props
24
- }: React.ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
24
+ }: React.ComponentProps<'div'>): react_jsx_runtime3.JSX.Element;
25
25
  //#endregion
26
26
  export { AccordionProps as n, Accordion as t };
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime3 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
  import { LucideIcon } from "lucide-react";
4
4
 
5
5
  //#region src/components/Button.d.ts
@@ -17,17 +17,17 @@ type ButtonBranch = BaseProps & Omit<React.ButtonHTMLAttributes<HTMLButtonElemen
17
17
  href?: never;
18
18
  };
19
19
  type ButtonProps = AnchorBranch | ButtonBranch;
20
- declare function Button(props: ButtonProps): react_jsx_runtime3.JSX.Element;
20
+ declare function Button(props: ButtonProps): react_jsx_runtime0.JSX.Element;
21
21
  declare namespace Button {
22
22
  var Label: ({
23
23
  className,
24
24
  ...rest
25
- }: LabelProps) => react_jsx_runtime3.JSX.Element;
25
+ }: LabelProps) => react_jsx_runtime0.JSX.Element;
26
26
  var Icon: ({
27
27
  className,
28
28
  icon: Icon,
29
29
  size
30
- }: IconProps) => react_jsx_runtime3.JSX.Element;
30
+ }: IconProps) => react_jsx_runtime0.JSX.Element;
31
31
  }
32
32
  type LabelProps = React.HTMLAttributes<HTMLSpanElement>;
33
33
  type IconProps = {
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime2 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/Callout.d.ts
5
5
  type CalloutVariant = 'info' | 'note' | 'tip' | 'success' | 'warning' | 'danger';
@@ -13,6 +13,6 @@ declare function Callout({
13
13
  className,
14
14
  children,
15
15
  ...props
16
- }: CalloutProps): react_jsx_runtime2.JSX.Element;
16
+ }: CalloutProps): react_jsx_runtime0.JSX.Element;
17
17
  //#endregion
18
18
  export { CalloutProps as n, CalloutVariant as r, Callout as t };
@@ -1,2 +1,2 @@
1
- import { n as AccordionProps, t as Accordion } from "../Accordion-Cj5GURin.js";
1
+ import { n as AccordionProps, t as Accordion } from "../Accordion-CvvTR8p8.js";
2
2
  export { Accordion, AccordionProps };
@@ -1,2 +1,2 @@
1
- import { n as ButtonProps, r as ButtonVariant, t as Button } from "../Button-DJ4VsD2o.js";
1
+ import { n as ButtonProps, r as ButtonVariant, t as Button } from "../Button-DMtVJEuK.js";
2
2
  export { Button, ButtonProps, ButtonVariant };
@@ -1,2 +1,2 @@
1
- import { n as CalloutProps, r as CalloutVariant, t as Callout } from "../Callout-DTFAhHWq.js";
1
+ import { n as CalloutProps, r as CalloutVariant, t as Callout } from "../Callout-Desqa2PM.js";
2
2
  export { Callout, CalloutProps, CalloutVariant };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { n as AccordionProps, t as Accordion } from "./Accordion-Cj5GURin.js";
2
- import { n as ButtonProps, r as ButtonVariant, t as Button } from "./Button-DJ4VsD2o.js";
3
- import { n as CalloutProps, r as CalloutVariant, t as Callout } from "./Callout-DTFAhHWq.js";
1
+ import { n as AccordionProps, t as Accordion } from "./Accordion-CvvTR8p8.js";
2
+ import { n as ButtonProps, r as ButtonVariant, t as Button } from "./Button-DMtVJEuK.js";
3
+ import { n as CalloutProps, r as CalloutVariant, t as Callout } from "./Callout-Desqa2PM.js";
4
4
  import * as react3 from "react";
5
5
  import { ComponentProps } from "react";
6
6
  import * as react_jsx_runtime21 from "react/jsx-runtime";
@@ -0,0 +1,151 @@
1
+ :root {
2
+ /* Layout and Typography */
3
+ --sl-font: var(--stl-typography-font);
4
+ --sl-font-mono: var(--stl-typography-font-mono);
5
+ --sl-line-height: var(--stl-typography-line-height);
6
+
7
+ /* Font sizes */
8
+ --sl-text-h1: var(--stl-typography-text-h1);
9
+ --sl-text-h2: var(--stl-typography-text-h2);
10
+ --sl-text-h3: var(--stl-typography-text-h3);
11
+ --sl-text-h4: var(--stl-typography-text-h4);
12
+ --sl-text-h5: var(--stl-typography-text-h5);
13
+ --sl-text-body: var(--stl-typography-scale-base);
14
+ --sl-text-sm: var(--stl-typography-scale-sm);
15
+ --sl-text-body-sm: var(--stl-typography-scale-sm);
16
+ --sl-text-code: var(--stl-typography-scale-sm);
17
+ --sl-text-code-sm: var(--stl-typography-scale-xs);
18
+
19
+ /* Colors */
20
+ --sl-color-bg: var(--stl-color-background);
21
+ --sl-color-bg-sidebar: var(--stl-color-background);
22
+ --sl-color-bg-ui: var(--stl-color-ui-background);
23
+ --sl-color-bg-nav: var(--stl-color-background);
24
+ --sl-color-bg-inline-code: var(--stl-color-muted-background);
25
+ --sl-color-bg-accent: var(--stl-color-accent-background);
26
+
27
+ --sl-color-text: var(--stl-color-foreground);
28
+ --sl-color-text-secondary: var(--stl-color-foreground-reduced);
29
+ --sl-color-text-tertiary: var(--stl-color-foreground-muted);
30
+ --sl-color-text-accent: var(--stl-color-foreground-accent);
31
+ --sl-color-hairline: var(--stl-color-border);
32
+ --sl-color-hairline-light: var(--stl-color-border-faint);
33
+ --sl-color-hairline-shade: var(--stl-color-border-strong);
34
+ --sl-color-text-invert: var(--stl-color-inverse-foreground);
35
+
36
+ /* Accent colors */
37
+
38
+ --sl-color-accent-low: var(--stl-color-accent-muted-background);
39
+ --sl-color-accent: var(--stl-color-accent);
40
+ --sl-color-accent-high: var(--stl-color-accent);
41
+
42
+ /* Primary colors */
43
+ --sl-color-red-low: var(--stl-color-red-muted-background);
44
+ --sl-color-red: var(--stl-color-red);
45
+ --sl-color-red-high: var(--stl-color-red);
46
+
47
+ --sl-color-green-low: var(--stl-color-green-muted-background);
48
+ --sl-color-green: var(--stl-color-green);
49
+ --sl-color-green-high: var(--stl-color-green);
50
+
51
+ --sl-color-blue-low: var(--stl-color-blue-muted-background);
52
+ --sl-color-blue: var(--stl-color-blue);
53
+ --sl-color-blue-high: var(--stl-color-blue);
54
+
55
+ --sl-color-orange-low: var(--stl-color-orange-muted-background);
56
+ --sl-color-orange: var(--stl-color-orange);
57
+ --sl-color-orange-high: var(--stl-color-orange);
58
+
59
+ --sl-color-purple-low: var(--stl-color-purple-muted-background);
60
+ --sl-color-purple: var(--stl-color-purple);
61
+ --sl-color-purple-high: var(--stl-color-purple);
62
+
63
+ --sl-color-teal-low: var(--stl-color-cyan-muted-background);
64
+ --sl-color-teal: var(--stl-color-cyan);
65
+ --sl-color-teal-high: var(--stl-color-cyan);
66
+
67
+ --sl-color-magenta-low: var(--stl-color-pink-muted-background);
68
+ --sl-color-magenta: var(--stl-color-pink);
69
+ --sl-color-magenta-high: var(--stl-color-pink);
70
+
71
+ --sl-color-yellow-low: var(--stl-color-yellow-muted-background);
72
+ --sl-color-yellow: var(--stl-color-yellow);
73
+ --sl-color-yellow-high: var(--stl-color-yellow);
74
+ }
75
+
76
+ /* Starlight Compatibility */
77
+ .stl-ui-prose {
78
+ /* TODO: Disable starlight headingLinks and replace with our own */
79
+ /* Duplicate styles from h1–5 in typography; TODO: move to mixins after adopting preprocessor */
80
+ .sl-heading-wrapper.level-h1 {
81
+ font-size: var(--stl-typography-text-h1);
82
+ letter-spacing: -0.03em;
83
+ margin-top: 64px;
84
+ line-height: var(--stl-typography-line-height-headings);
85
+ }
86
+ .sl-heading-wrapper.level-h2 {
87
+ font-size: var(--stl-typography-text-h2);
88
+ letter-spacing: -0.03em;
89
+ margin-top: 48px;
90
+ line-height: var(--stl-typography-line-height-headings);
91
+ }
92
+
93
+ .sl-heading-wrapper.level-h3 {
94
+ font-size: var(--stl-typography-text-h3);
95
+ letter-spacing: -0.02em;
96
+ margin-top: 40px;
97
+ line-height: var(--stl-typography-line-height-headings);
98
+ }
99
+ .sl-heading-wrapper.level-h4 {
100
+ font-size: var(--stl-typography-text-h4);
101
+ letter-spacing: -0.02em;
102
+ margin-top: 32px;
103
+ line-height: var(--stl-typography-line-height-headings);
104
+ }
105
+ .sl-heading-wrapper.level-h5 {
106
+ font-size: var(--stl-typography-text-h5);
107
+ letter-spacing: -0.02em;
108
+ margin-top: 24px;
109
+ line-height: var(--stl-typography-line-height-headings);
110
+ }
111
+ .sl-heading-wrapper {
112
+ --sl-anchor-icon-size: 0.8em;
113
+ }
114
+ /* TODO: replace with an icon that matches Stainless branding */
115
+ .sl-anchor-link svg {
116
+ margin-top: 0;
117
+ }
118
+ }
119
+
120
+ /* TODO: remove these */
121
+ .stl-ui-prose starlight-tabs {
122
+ a {
123
+ text-decoration: none;
124
+ line-height: unset;
125
+ color: var(--stl-color-foreground);
126
+
127
+ &[aria-selected='true'] {
128
+ color: var(--stl-color-foreground-accent);
129
+ font-weight: normal;
130
+ }
131
+ }
132
+
133
+ ol,
134
+ ul {
135
+ &:not(.stl-ui-not-prose *) {
136
+ padding-left: 0;
137
+ }
138
+ }
139
+
140
+ li:not(.stl-ui-not-prose *) {
141
+ margin-bottom: -2px;
142
+ &:not(:last-child) {
143
+ margin-bottom: -2px;
144
+ }
145
+
146
+ a:first-child {
147
+ display: flex;
148
+ }
149
+ }
150
+ }
151
+
File without changes