@stainless-api/ui-primitives 0.1.0-beta.13 → 0.1.0-beta.15
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/CHANGELOG.md +12 -0
- package/package.json +3 -3
- package/src/components/DropdownButton.tsx +2 -10
- package/src/scripts/dropdown-button.ts +2 -5
- package/tsconfig.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @stainless-api/ui-primitives
|
|
2
2
|
|
|
3
|
+
## 0.1.0-beta.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 15c003d: fix react peer dependencies
|
|
8
|
+
|
|
9
|
+
## 0.1.0-beta.14
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 0618d05: Markdown rendering of prose pages, ai context menu, auth via cli, minor fixes
|
|
14
|
+
|
|
3
15
|
## 0.1.0-beta.13
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
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.15",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
},
|
|
20
20
|
"types": "./src/index.ts",
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"react": ">=
|
|
23
|
-
"react-dom": ">=
|
|
22
|
+
"react": ">=19.0.0",
|
|
23
|
+
"react-dom": ">=19.0.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"clsx": "^2.1.1",
|
|
@@ -101,17 +101,9 @@ function MenuItem({
|
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
export function DropdownButton({
|
|
105
|
-
id,
|
|
106
|
-
className,
|
|
107
|
-
...props
|
|
108
|
-
}: ComponentPropsWithoutRef<'div'> & { id: string }) {
|
|
104
|
+
export function DropdownButton({ className, ...props }: ComponentPropsWithoutRef<'div'>) {
|
|
109
105
|
return (
|
|
110
|
-
<div
|
|
111
|
-
id={id}
|
|
112
|
-
{...props}
|
|
113
|
-
className={clsx('stl-ui-dropdown-button stl-ui-not-prose not-content', className)}
|
|
114
|
-
/>
|
|
106
|
+
<div {...props} className={clsx('stl-ui-dropdown-button stl-ui-not-prose not-content', className)} />
|
|
115
107
|
);
|
|
116
108
|
}
|
|
117
109
|
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
export function initDropdownButton({
|
|
2
|
-
|
|
2
|
+
dropdown,
|
|
3
3
|
onSelect,
|
|
4
4
|
onPrimaryAction,
|
|
5
5
|
}: {
|
|
6
|
-
|
|
6
|
+
dropdown: Element;
|
|
7
7
|
onSelect: (value: string) => void;
|
|
8
8
|
onPrimaryAction: (primaryActionElement: Element) => void;
|
|
9
9
|
}) {
|
|
10
|
-
const dropdown = document.getElementById(dropdownId);
|
|
11
|
-
if (!dropdown) return;
|
|
12
|
-
|
|
13
10
|
const trigger = dropdown.querySelector('[data-part="trigger"]') as HTMLButtonElement | null;
|
|
14
11
|
const menu = dropdown.querySelector('[data-part="menu"]') as HTMLElement | null;
|
|
15
12
|
const primaryAction = dropdown.querySelector('[data-part="primary-action"]');
|