@stainless-api/ui-primitives 0.1.0-beta.50 → 0.1.0-beta.52

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,11 +1,11 @@
1
1
  import { ComponentProps } from "react";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/dropdown/DropdownMenu.d.ts
5
5
  declare function Menu({
6
6
  className,
7
7
  ...props
8
- }: ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
8
+ }: ComponentProps<'div'>): _$react_jsx_runtime0.JSX.Element;
9
9
  declare namespace Menu {
10
10
  var Item: typeof MenuItem;
11
11
  var ItemText: typeof MenuItemText;
@@ -17,7 +17,7 @@ declare function MenuItemText({
17
17
  ...props
18
18
  }: ComponentProps<'span'> & {
19
19
  subtle?: boolean;
20
- }): react_jsx_runtime0.JSX.Element;
20
+ }): _$react_jsx_runtime0.JSX.Element;
21
21
  type MenuItemBaseProps = {
22
22
  children?: React.ReactNode;
23
23
  value: string;
@@ -38,7 +38,7 @@ declare function MenuItem({
38
38
  isExternalLink,
39
39
  isSelected,
40
40
  ...props
41
- }: MenuItemProps): react_jsx_runtime0.JSX.Element;
41
+ }: MenuItemProps): _$react_jsx_runtime0.JSX.Element;
42
42
  /**
43
43
  * A template component that defines the content to be displayed in the dropdown trigger
44
44
  * when a menu item is selected. This template is used to customize the appearance of
@@ -49,6 +49,6 @@ declare function MenuItem({
49
49
  */
50
50
  declare function MenuItemTemplate({
51
51
  ...props
52
- }: ComponentProps<'template'>): react_jsx_runtime0.JSX.Element;
52
+ }: ComponentProps<'template'>): _$react_jsx_runtime0.JSX.Element;
53
53
  //#endregion
54
54
  export { Menu as t };
@@ -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_runtime0 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_runtime0.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_runtime0.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_runtime0.JSX.Element;
25
25
  //#endregion
26
26
  export { Accordion, AccordionProps };
@@ -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_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/Badge.d.ts
5
5
  type BadgeIntent = 'none' | 'info' | 'success' | 'warning' | 'danger' | 'note' | 'tip' | 'accent';
@@ -16,7 +16,7 @@ declare function BaseBadge({
16
16
  intent?: BadgeIntent;
17
17
  size?: 'sm' | 'md' | 'lg';
18
18
  solid?: boolean;
19
- } & React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime0.JSX.Element;
19
+ } & React.HTMLAttributes<HTMLSpanElement>): _$react_jsx_runtime0.JSX.Element;
20
20
  type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
21
21
  declare function getHttpMethod(method?: string): HTTPMethod | null;
22
22
  declare function HTTPBadge({
@@ -26,14 +26,14 @@ declare function HTTPBadge({
26
26
  }: {
27
27
  method: HTTPMethod;
28
28
  iconOnly?: boolean;
29
- } & Omit<React.ComponentProps<typeof Badge>, 'children' | 'intent'>): react_jsx_runtime0.JSX.Element;
29
+ } & Omit<React.ComponentProps<typeof Badge>, 'children' | 'intent'>): _$react_jsx_runtime0.JSX.Element;
30
30
  declare const Badge: (({
31
31
  children,
32
32
  intent,
33
33
  ...props
34
34
  }: {
35
35
  children: React.ReactNode;
36
- } & React.ComponentProps<typeof BaseBadge>) => react_jsx_runtime0.JSX.Element) & {
36
+ } & React.ComponentProps<typeof BaseBadge>) => _$react_jsx_runtime0.JSX.Element) & {
37
37
  HTTP: typeof HTTPBadge;
38
38
  };
39
39
  //#endregion
@@ -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_runtime0 from "react/jsx-runtime";
3
3
  import { LucideIcon } from "lucide-react";
4
4
 
5
5
  //#region src/components/Button.d.ts
@@ -21,22 +21,24 @@ type ButtonBranch = BaseProps & Omit<React.ButtonHTMLAttributes<HTMLButtonElemen
21
21
  href?: never;
22
22
  };
23
23
  type ButtonProps = AnchorBranch | ButtonBranch;
24
- declare function Button(props: ButtonProps): react_jsx_runtime0.JSX.Element;
24
+ declare function Button(props: ButtonProps): _$react_jsx_runtime0.JSX.Element;
25
25
  declare namespace Button {
26
26
  var Label: ({
27
27
  className,
28
28
  ...rest
29
- }: LabelProps) => react_jsx_runtime0.JSX.Element;
29
+ }: LabelProps) => _$react_jsx_runtime0.JSX.Element;
30
30
  var Icon: ({
31
31
  className,
32
32
  icon: Icon,
33
33
  size,
34
34
  ...rest
35
- }: IconProps) => react_jsx_runtime0.JSX.Element;
35
+ }: IconProps) => _$react_jsx_runtime0.JSX.Element;
36
36
  }
37
37
  type LabelProps = React.HTMLAttributes<HTMLSpanElement>;
38
38
  type IconProps = {
39
- icon: LucideIcon;
39
+ icon: LucideIcon | React.ComponentType<{
40
+ size?: number;
41
+ }>;
40
42
  size?: number;
41
43
  } & React.HTMLAttributes<HTMLSpanElement>;
42
44
  //#endregion
@@ -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_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_runtime0.JSX.Element;
16
+ }: CalloutProps): _$react_jsx_runtime0.JSX.Element;
17
17
  //#endregion
18
18
  export { Callout, CalloutProps, CalloutVariant };
@@ -1,17 +1,17 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/components/Steps.d.ts
4
4
  declare function Steps({
5
5
  children
6
6
  }: {
7
7
  children: React.ReactNode;
8
- }): react_jsx_runtime0.JSX.Element;
8
+ }): _$react_jsx_runtime0.JSX.Element;
9
9
  declare function Step({
10
10
  children,
11
11
  title
12
12
  }: {
13
13
  children: React.ReactNode;
14
14
  title: string;
15
- }): react_jsx_runtime0.JSX.Element;
15
+ }): _$react_jsx_runtime0.JSX.Element;
16
16
  //#endregion
17
17
  export { Step, Steps };
@@ -1,13 +1,13 @@
1
- import { t as Menu } from "../../DropdownMenu-H_J8MxM7.js";
2
- import * as react from "react";
1
+ import { t as Menu } from "../../DropdownMenu-DJ2-gPoP.js";
2
+ import * as _$react from "react";
3
3
  import { ComponentProps } from "react";
4
- import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
5
5
 
6
6
  //#region src/components/dropdown/Dropdown.d.ts
7
7
  declare function Dropdown({
8
8
  className,
9
9
  ...props
10
- }: ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
10
+ }: ComponentProps<'div'>): _$react_jsx_runtime0.JSX.Element;
11
11
  declare namespace Dropdown {
12
12
  var Menu: typeof Menu;
13
13
  var MenuItem: ({
@@ -22,42 +22,42 @@ declare namespace Dropdown {
22
22
  value: string;
23
23
  isExternalLink?: boolean;
24
24
  isSelected?: boolean;
25
- } & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
25
+ } & _$react.ClassAttributes<HTMLAnchorElement> & _$react.AnchorHTMLAttributes<HTMLAnchorElement> & {
26
26
  href: string;
27
27
  }) | ({
28
28
  children?: React.ReactNode;
29
29
  value: string;
30
30
  isExternalLink?: boolean;
31
31
  isSelected?: boolean;
32
- } & react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & {
32
+ } & _$react.ClassAttributes<HTMLButtonElement> & _$react.ButtonHTMLAttributes<HTMLButtonElement> & {
33
33
  href?: never;
34
- })) => react_jsx_runtime0.JSX.Element;
34
+ })) => _$react_jsx_runtime0.JSX.Element;
35
35
  var MenuItemText: ({
36
36
  className,
37
37
  subtle,
38
38
  ...props
39
39
  }: ComponentProps<"span"> & {
40
40
  subtle?: boolean;
41
- }) => react_jsx_runtime0.JSX.Element;
41
+ }) => _$react_jsx_runtime0.JSX.Element;
42
42
  var MenuItemTemplate: ({
43
43
  ...props
44
- }: ComponentProps<"template">) => react_jsx_runtime0.JSX.Element;
44
+ }: ComponentProps<"template">) => _$react_jsx_runtime0.JSX.Element;
45
45
  var Trigger: ({
46
46
  className,
47
47
  ...props
48
- }: ComponentProps<"button">) => react_jsx_runtime0.JSX.Element;
48
+ }: ComponentProps<"button">) => _$react_jsx_runtime0.JSX.Element;
49
49
  var TriggerSelectedItem: ({
50
50
  className,
51
51
  ...props
52
- }: ComponentProps<"div">) => react_jsx_runtime0.JSX.Element;
52
+ }: ComponentProps<"div">) => _$react_jsx_runtime0.JSX.Element;
53
53
  var TriggerIcon: ({
54
54
  className,
55
55
  ...props
56
- }: ComponentProps<"span">) => react_jsx_runtime0.JSX.Element;
56
+ }: ComponentProps<"span">) => _$react_jsx_runtime0.JSX.Element;
57
57
  var Icon: ({
58
58
  className,
59
59
  ...props
60
- }: ComponentProps<"div">) => react_jsx_runtime0.JSX.Element;
60
+ }: ComponentProps<"div">) => _$react_jsx_runtime0.JSX.Element;
61
61
  }
62
62
  //#endregion
63
63
  export { Dropdown };
@@ -1,13 +1,13 @@
1
- import { t as Menu } from "../../DropdownMenu-H_J8MxM7.js";
2
- import * as react from "react";
1
+ import { t as Menu } from "../../DropdownMenu-DJ2-gPoP.js";
2
+ import * as _$react from "react";
3
3
  import { ComponentProps } from "react";
4
- import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
5
5
 
6
6
  //#region src/components/dropdown/DropdownButton.d.ts
7
7
  declare function DropdownButton({
8
8
  className,
9
9
  ...props
10
- }: ComponentProps<'div'>): react_jsx_runtime0.JSX.Element;
10
+ }: ComponentProps<'div'>): _$react_jsx_runtime0.JSX.Element;
11
11
  declare namespace DropdownButton {
12
12
  var Menu: typeof Menu;
13
13
  var MenuItem: ({
@@ -22,40 +22,40 @@ declare namespace DropdownButton {
22
22
  value: string;
23
23
  isExternalLink?: boolean;
24
24
  isSelected?: boolean;
25
- } & react.ClassAttributes<HTMLAnchorElement> & react.AnchorHTMLAttributes<HTMLAnchorElement> & {
25
+ } & _$react.ClassAttributes<HTMLAnchorElement> & _$react.AnchorHTMLAttributes<HTMLAnchorElement> & {
26
26
  href: string;
27
27
  }) | ({
28
28
  children?: React.ReactNode;
29
29
  value: string;
30
30
  isExternalLink?: boolean;
31
31
  isSelected?: boolean;
32
- } & react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & {
32
+ } & _$react.ClassAttributes<HTMLButtonElement> & _$react.ButtonHTMLAttributes<HTMLButtonElement> & {
33
33
  href?: never;
34
- })) => react_jsx_runtime0.JSX.Element;
34
+ })) => _$react_jsx_runtime0.JSX.Element;
35
35
  var MenuItemText: ({
36
36
  className,
37
37
  subtle,
38
38
  ...props
39
39
  }: ComponentProps<"span"> & {
40
40
  subtle?: boolean;
41
- }) => react_jsx_runtime0.JSX.Element;
41
+ }) => _$react_jsx_runtime0.JSX.Element;
42
42
  var PrimaryAction: ({
43
43
  className,
44
44
  ...props
45
- }: ComponentProps<"button">) => react_jsx_runtime0.JSX.Element;
45
+ }: ComponentProps<"button">) => _$react_jsx_runtime0.JSX.Element;
46
46
  var PrimaryActionText: ({
47
47
  children
48
48
  }: {
49
49
  children?: React.ReactNode;
50
- }) => react_jsx_runtime0.JSX.Element;
50
+ }) => _$react_jsx_runtime0.JSX.Element;
51
51
  var Trigger: ({
52
52
  className,
53
53
  ...props
54
- }: ComponentProps<"button">) => react_jsx_runtime0.JSX.Element;
54
+ }: ComponentProps<"button">) => _$react_jsx_runtime0.JSX.Element;
55
55
  var Icon: ({
56
56
  className,
57
57
  ...props
58
- }: ComponentProps<"div">) => react_jsx_runtime0.JSX.Element;
58
+ }: ComponentProps<"div">) => _$react_jsx_runtime0.JSX.Element;
59
59
  }
60
60
  //#endregion
61
61
  export { DropdownButton };
@@ -1,2 +1,2 @@
1
- import { t as Menu } from "../../DropdownMenu-H_J8MxM7.js";
1
+ import { t as Menu } from "../../DropdownMenu-DJ2-gPoP.js";
2
2
  export { Menu };
@@ -1,9 +1,9 @@
1
- import * as react from "react";
2
- import * as lucide_react0 from "lucide-react";
1
+ import * as _$react from "react";
2
+ import * as _$lucide_react0 from "lucide-react";
3
3
  import { IconNode } from "lucide-react";
4
4
 
5
5
  //#region src/components/icons/Function.d.ts
6
6
  declare const __iconNode: IconNode;
7
- declare const FunctionIcon: react.ForwardRefExoticComponent<Omit<lucide_react0.LucideProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
7
+ declare const FunctionIcon: _$react.ForwardRefExoticComponent<Omit<_$lucide_react0.LucideProps, "ref"> & _$react.RefAttributes<SVGSVGElement>>;
8
8
  //#endregion
9
9
  export { FunctionIcon, __iconNode };
@@ -17,7 +17,7 @@ declare function initDropdown({
17
17
  }: {
18
18
  root?: Element | null;
19
19
  onSelect?: (value: string) => void;
20
- initialValue?: string;
20
+ initialValue?: string | null;
21
21
  }): void;
22
22
  //#endregion
23
23
  export { initDropdown, initDropdownButton };
@@ -82,7 +82,7 @@ function initDropdown({ root, onSelect, initialValue }) {
82
82
  return true;
83
83
  }
84
84
  }
85
- const initial = (initialValue ? items.find((i) => i.getAttribute("data-value") === initialValue) : items.find((i) => i.getAttribute("aria-selected") === "true")) ?? items[0];
85
+ const initial = initialValue === null ? null : (initialValue ? items.find((i) => i.getAttribute("data-value") === initialValue) : items.find((i) => i.getAttribute("aria-selected") === "true")) ?? items[0];
86
86
  if (initial) selectItem(initial);
87
87
  trigger.addEventListener("click", () => {
88
88
  handleTriggerClick();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stainless-api/ui-primitives",
3
- "version": "0.1.0-beta.50",
3
+ "version": "0.1.0-beta.52",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -14,17 +14,17 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "clsx": "^2.1.1",
17
- "lucide-react": "^0.574.0"
17
+ "lucide-react": "^0.577.0"
18
18
  },
19
19
  "devDependencies": {
20
- "@tsdown/css": "^0.21.4",
20
+ "@tsdown/css": "^0.21.7",
21
21
  "@types/react": "19.2.14",
22
22
  "@types/react-dom": "^19.2.3",
23
23
  "react": "^19.2.4",
24
24
  "react-dom": "^19.2.4",
25
25
  "sass": "^1.98.0",
26
- "tsdown": "^0.21.4",
27
- "typescript": "5.9.3",
26
+ "tsdown": "^0.21.7",
27
+ "typescript": "6.0.2",
28
28
  "@stainless/eslint-config": "0.1.0-beta.1"
29
29
  },
30
30
  "exports": {