@jonmilner/ui 0.21.1 → 0.22.0

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.
Files changed (102) hide show
  1. package/THIRD_PARTY_NOTICES.md +1 -1
  2. package/dist/AlertDialog/index.d.mts +1 -1
  3. package/dist/Avatar/index.d.mts +1 -1
  4. package/dist/Avatar/index.mjs +5 -5
  5. package/dist/Badge/index.d.mts +1 -1
  6. package/dist/Badge/index.mjs +12 -12
  7. package/dist/Box/index.mjs +1 -1
  8. package/dist/Button/index.d.mts +1 -1
  9. package/dist/Button/index.mjs +22 -22
  10. package/dist/Checkbox/index.mjs +7 -7
  11. package/dist/Chip/index.mjs +35 -35
  12. package/dist/Clickable/index.d.mts +1 -1
  13. package/dist/Clickable/index.mjs +4 -4
  14. package/dist/ColorField/ColorField.css +1 -1
  15. package/dist/ColorField/client.mjs +6 -6
  16. package/dist/ColorField/index.mjs +14 -14
  17. package/dist/Combobox/Combobox.css +1 -1
  18. package/dist/Combobox/client.mjs +26 -26
  19. package/dist/Combobox/index.mjs +20 -20
  20. package/dist/Dialog/client.mjs +26 -26
  21. package/dist/Dialog/index.d.mts +1 -1
  22. package/dist/Dialog/index.mjs +19 -19
  23. package/dist/Field/client.mjs +6 -6
  24. package/dist/Field/index.mjs +29 -29
  25. package/dist/IconButton/IconButton.css +1 -1
  26. package/dist/IconButton/IconButton.css.mjs +2 -2
  27. package/dist/IconButton/index.d.mts +5 -2
  28. package/dist/IconButton/index.mjs +60 -21
  29. package/dist/Inline/index.d.mts +2 -2
  30. package/dist/Inline/index.mjs +4 -4
  31. package/dist/Menu/Menu.css +1 -1
  32. package/dist/Menu/Menu.css.mjs +2 -2
  33. package/dist/Menu/client.d.mts +1 -0
  34. package/dist/Menu/client.mjs +95 -53
  35. package/dist/Menu/index.d.mts +8 -0
  36. package/dist/Menu/index.mjs +123 -87
  37. package/dist/MultiSelect/MultiSelect.css +1 -1
  38. package/dist/MultiSelect/client.mjs +4 -4
  39. package/dist/MultiSelect/index.mjs +8 -8
  40. package/dist/NavList/NavList.css +1 -1
  41. package/dist/NavList/client.mjs +3 -3
  42. package/dist/NavList/index.d.mts +3 -3
  43. package/dist/NavList/index.mjs +67 -65
  44. package/dist/NumberField/NumberField.css +1 -1
  45. package/dist/NumberField/index.mjs +17 -17
  46. package/dist/RadioGroup/index.mjs +23 -23
  47. package/dist/SearchField/SearchField.css +1 -1
  48. package/dist/SearchField/client.mjs +13 -13
  49. package/dist/SearchField/index.mjs +16 -16
  50. package/dist/Select/Select.css +1 -1
  51. package/dist/Select/client.mjs +11 -11
  52. package/dist/Select/index.mjs +8 -8
  53. package/dist/Sidebar/index.d.mts +1 -1
  54. package/dist/Sidebar/index.mjs +21 -21
  55. package/dist/SidebarLayout/index.d.mts +1 -1
  56. package/dist/SidebarLayout/index.mjs +8 -8
  57. package/dist/Stack/index.d.mts +2 -2
  58. package/dist/Stack/index.mjs +4 -4
  59. package/dist/Switch/index.mjs +13 -13
  60. package/dist/Table/index.d.mts +1 -1
  61. package/dist/Table/index.mjs +59 -59
  62. package/dist/Tabs/index.mjs +26 -26
  63. package/dist/Tag/index.d.mts +1 -1
  64. package/dist/Tag/index.mjs +16 -16
  65. package/dist/Text/index.d.mts +2 -2
  66. package/dist/Text/index.mjs +4 -4
  67. package/dist/TextField/TextField.css +1 -1
  68. package/dist/TextField/index.mjs +16 -16
  69. package/dist/Textarea/Textarea.css +1 -1
  70. package/dist/Textarea/index.mjs +9 -9
  71. package/dist/Toast/client.d.mts +2 -1
  72. package/dist/Toast/client.mjs +62 -55
  73. package/dist/Tooltip/base.mjs +13 -13
  74. package/dist/contrast/contrast.d.mts +1 -1
  75. package/dist/contrast/contrast.mjs +9 -9
  76. package/dist/contrast/mixes.mjs +27 -27
  77. package/dist/docs/Combobox.md +1 -0
  78. package/dist/docs/IconButton.md +9 -1
  79. package/dist/docs/Menu.md +51 -3
  80. package/dist/docs/MultiSelect.md +1 -0
  81. package/dist/docs/NavList.md +2 -2
  82. package/dist/docs/Select.md +1 -0
  83. package/dist/docs/Toast.md +7 -0
  84. package/dist/docs/llms.txt +1 -1
  85. package/dist/docs/manifest.json +118 -1
  86. package/dist/docs/migrations/0.22.0.md +35 -0
  87. package/dist/icons/index.d.mts +3 -3
  88. package/dist/icons/index.mjs +33 -33
  89. package/dist/index.d.mts +16 -16
  90. package/dist/index.mjs +39 -39
  91. package/dist/lint/index.mjs +1 -0
  92. package/dist/popup/client.d.mts +1 -1
  93. package/dist/popup/client.mjs +49 -32
  94. package/dist/popup/direction.d.mts +1 -0
  95. package/dist/popup/direction.mjs +23 -0
  96. package/dist/popup/listbox-base.mjs +24 -24
  97. package/dist/popup/listbox-options.mjs +4 -4
  98. package/dist/popup/listbox-row.mjs +1 -0
  99. package/dist/popup/tooltip.d.mts +1 -0
  100. package/dist/popup/tooltip.mjs +48 -42
  101. package/dist/theme/define-theme.mjs +42 -42
  102. package/package.json +2 -2
@@ -1,35 +1,35 @@
1
- import { CheckIcon as e } from "./CheckIcon.mjs";
2
- import { CircleAlertIcon as t } from "./CircleAlertIcon.mjs";
3
- import { ChevronDownIcon as n } from "./ChevronDownIcon.mjs";
4
- import { MinusIcon as r } from "./MinusIcon.mjs";
5
- import { PlusIcon as i } from "./PlusIcon.mjs";
6
- import { SearchIcon as a } from "./SearchIcon.mjs";
7
- import { XIcon as o } from "./XIcon.mjs";
8
- import { PanelLeftCloseIcon as s } from "./PanelLeftCloseIcon.mjs";
9
- import { PanelLeftOpenIcon as c } from "./PanelLeftOpenIcon.mjs";
10
- import { ArrowDownIcon as l } from "./ArrowDownIcon.mjs";
11
- import { ArrowUpIcon as u } from "./ArrowUpIcon.mjs";
12
- import { CircleCheckIcon as d } from "./CircleCheckIcon.mjs";
13
- import { InfoIcon as f } from "./InfoIcon.mjs";
14
- import { ArrowLeftIcon as p } from "./ArrowLeftIcon.mjs";
15
- import { ArrowRightIcon as m } from "./ArrowRightIcon.mjs";
16
- import { ChevronRightIcon as h } from "./ChevronRightIcon.mjs";
17
- import { CircleDotIcon as g } from "./CircleDotIcon.mjs";
18
- import { CircleSlashIcon as _ } from "./CircleSlashIcon.mjs";
19
- import { EllipsisIcon as v } from "./EllipsisIcon.mjs";
20
- import { GitMergeIcon as y } from "./GitMergeIcon.mjs";
21
- import { GitPullRequestClosedIcon as b } from "./GitPullRequestClosedIcon.mjs";
22
- import { GitPullRequestDraftIcon as x } from "./GitPullRequestDraftIcon.mjs";
23
- import { GitPullRequestIcon as S } from "./GitPullRequestIcon.mjs";
24
- import { InboxIcon as C } from "./InboxIcon.mjs";
25
- import { LoaderCircleIcon as w } from "./LoaderCircleIcon.mjs";
26
- import { LockOpenIcon as T } from "./LockOpenIcon.mjs";
27
- import { PencilIcon as E } from "./PencilIcon.mjs";
28
- import { PlayIcon as D } from "./PlayIcon.mjs";
29
- import { RefreshCwIcon as O } from "./RefreshCwIcon.mjs";
30
- import { ReplyIcon as k } from "./ReplyIcon.mjs";
31
- import { SettingsIcon as A } from "./SettingsIcon.mjs";
32
- import { Trash2Icon as j } from "./Trash2Icon.mjs";
1
+ import { ArrowDownIcon as e } from "./ArrowDownIcon.mjs";
2
+ import { ArrowLeftIcon as t } from "./ArrowLeftIcon.mjs";
3
+ import { ArrowRightIcon as n } from "./ArrowRightIcon.mjs";
4
+ import { ArrowUpIcon as r } from "./ArrowUpIcon.mjs";
5
+ import { CheckIcon as i } from "./CheckIcon.mjs";
6
+ import { ChevronDownIcon as a } from "./ChevronDownIcon.mjs";
7
+ import { ChevronRightIcon as o } from "./ChevronRightIcon.mjs";
8
+ import { CircleAlertIcon as s } from "./CircleAlertIcon.mjs";
9
+ import { CircleCheckIcon as c } from "./CircleCheckIcon.mjs";
10
+ import { CircleDotIcon as l } from "./CircleDotIcon.mjs";
11
+ import { CircleSlashIcon as u } from "./CircleSlashIcon.mjs";
12
+ import { EllipsisIcon as d } from "./EllipsisIcon.mjs";
13
+ import { GitMergeIcon as f } from "./GitMergeIcon.mjs";
14
+ import { GitPullRequestClosedIcon as p } from "./GitPullRequestClosedIcon.mjs";
15
+ import { GitPullRequestDraftIcon as m } from "./GitPullRequestDraftIcon.mjs";
16
+ import { GitPullRequestIcon as h } from "./GitPullRequestIcon.mjs";
17
+ import { InboxIcon as g } from "./InboxIcon.mjs";
18
+ import { InfoIcon as _ } from "./InfoIcon.mjs";
19
+ import { LoaderCircleIcon as v } from "./LoaderCircleIcon.mjs";
20
+ import { LockOpenIcon as y } from "./LockOpenIcon.mjs";
21
+ import { MinusIcon as b } from "./MinusIcon.mjs";
22
+ import { PanelLeftCloseIcon as x } from "./PanelLeftCloseIcon.mjs";
23
+ import { PanelLeftOpenIcon as S } from "./PanelLeftOpenIcon.mjs";
24
+ import { PencilIcon as C } from "./PencilIcon.mjs";
25
+ import { PlayIcon as w } from "./PlayIcon.mjs";
26
+ import { PlusIcon as T } from "./PlusIcon.mjs";
27
+ import { RefreshCwIcon as E } from "./RefreshCwIcon.mjs";
28
+ import { ReplyIcon as D } from "./ReplyIcon.mjs";
29
+ import { SearchIcon as O } from "./SearchIcon.mjs";
30
+ import { SettingsIcon as k } from "./SettingsIcon.mjs";
31
+ import { Trash2Icon as A } from "./Trash2Icon.mjs";
32
+ import { XIcon as j } from "./XIcon.mjs";
33
33
  // src/icons/index.ts
34
34
  var M = /* @__PURE__ */ "ArrowDownIcon.ArrowLeftIcon.ArrowRightIcon.ArrowUpIcon.CheckIcon.ChevronDownIcon.ChevronRightIcon.CircleAlertIcon.CircleCheckIcon.CircleDotIcon.CircleSlashIcon.EllipsisIcon.GitMergeIcon.GitPullRequestClosedIcon.GitPullRequestDraftIcon.GitPullRequestIcon.InboxIcon.InfoIcon.LoaderCircleIcon.LockOpenIcon.MinusIcon.PanelLeftCloseIcon.PanelLeftOpenIcon.PencilIcon.PlayIcon.PlusIcon.RefreshCwIcon.ReplyIcon.SearchIcon.SettingsIcon.Trash2Icon.XIcon".split(".");
35
- export { l as ArrowDownIcon, p as ArrowLeftIcon, m as ArrowRightIcon, u as ArrowUpIcon, e as CheckIcon, n as ChevronDownIcon, h as ChevronRightIcon, t as CircleAlertIcon, d as CircleCheckIcon, g as CircleDotIcon, _ as CircleSlashIcon, v as EllipsisIcon, y as GitMergeIcon, b as GitPullRequestClosedIcon, x as GitPullRequestDraftIcon, S as GitPullRequestIcon, C as InboxIcon, f as InfoIcon, w as LoaderCircleIcon, T as LockOpenIcon, r as MinusIcon, s as PanelLeftCloseIcon, c as PanelLeftOpenIcon, E as PencilIcon, D as PlayIcon, i as PlusIcon, O as RefreshCwIcon, k as ReplyIcon, a as SearchIcon, A as SettingsIcon, j as Trash2Icon, o as XIcon, M as iconNames };
35
+ export { e as ArrowDownIcon, t as ArrowLeftIcon, n as ArrowRightIcon, r as ArrowUpIcon, i as CheckIcon, a as ChevronDownIcon, o as ChevronRightIcon, s as CircleAlertIcon, c as CircleCheckIcon, l as CircleDotIcon, u as CircleSlashIcon, d as EllipsisIcon, f as GitMergeIcon, p as GitPullRequestClosedIcon, m as GitPullRequestDraftIcon, h as GitPullRequestIcon, g as InboxIcon, _ as InfoIcon, v as LoaderCircleIcon, y as LockOpenIcon, b as MinusIcon, x as PanelLeftCloseIcon, S as PanelLeftOpenIcon, C as PencilIcon, w as PlayIcon, T as PlusIcon, E as RefreshCwIcon, D as ReplyIcon, O as SearchIcon, k as SettingsIcon, A as Trash2Icon, j as XIcon, M as iconNames };
package/dist/index.d.mts CHANGED
@@ -1,31 +1,30 @@
1
1
  import { BoxProps, StyleProps } from "./Box/base.mjs";
2
- import { Clickable, ClickableProps } from "./Clickable/index.mjs";
3
- import { Icon, IconProps } from "./Icon/index.mjs";
4
- import { Button, ButtonProps } from "./Button/index.mjs";
5
- import { Dialog, DialogActionsProps, DialogBodyProps, DialogPopupProps, DialogProps } from "./Dialog/index.mjs";
6
- import { DialogCloseProps, DialogTriggerProps } from "./Dialog/client.mjs";
7
2
  import { AlertDialog, AlertDialogProps, AlertDialogTriggerProps } from "./AlertDialog/index.mjs";
8
3
  import { Avatar, AvatarProps } from "./Avatar/index.mjs";
9
4
  import { Badge, BadgeProps } from "./Badge/index.mjs";
10
5
  import { Box } from "./Box/index.mjs";
6
+ import { DialogCloseProps, DialogTriggerProps } from "./Dialog/client.mjs";
7
+ import { Button, ButtonProps } from "./Button/index.mjs";
11
8
  import { Checkbox, CheckboxProps } from "./Checkbox/index.mjs";
12
9
  import { Chip, ChipGroup, ChipGroupProps, ChipProps } from "./Chip/index.mjs";
13
- import { SearchFieldInputProps } from "./SearchField/client.mjs";
14
- import { SearchField, SearchFieldProps } from "./SearchField/index.mjs";
15
- import { ColorFieldInputProps } from "./ColorField/client.mjs";
10
+ import { Clickable, ClickableProps } from "./Clickable/index.mjs";
16
11
  import { ColorField, ColorFieldProps } from "./ColorField/index.mjs";
17
12
  import { Combobox, ComboboxOption, ComboboxProps } from "./Combobox/index.mjs";
18
- import { Text, TextProps } from "./Text/index.mjs";
13
+ import { SearchFieldInputProps } from "./SearchField/client.mjs";
14
+ import { Dialog, DialogActionsProps, DialogBodyProps, DialogPopupProps, DialogProps } from "./Dialog/index.mjs";
15
+ import { ColorFieldInputProps } from "./ColorField/client.mjs";
19
16
  import { Field, FieldDescriptionProps, FieldErrorProps, FieldLabelProps, FieldProps } from "./Field/index.mjs";
20
17
  import { Heading, HeadingLevel, HeadingProps, HeadingSize } from "./Heading/index.mjs";
18
+ import { Icon, IconProps } from "./Icon/index.mjs";
21
19
  import { IconButton, IconButtonProps } from "./IconButton/index.mjs";
22
20
  import { Inline, InlineProps } from "./Inline/index.mjs";
23
- import { MenuTriggerProps } from "./Menu/client.mjs";
24
- import { Menu, MenuGroupProps, MenuItemProps, MenuLinkItemProps, MenuPopupProps, MenuProps, MenuSeparatorProps } from "./Menu/index.mjs";
21
+ import { Menu, MenuGroupProps, MenuItemProps, MenuLinkItemProps, MenuPopupProps, MenuProps, MenuSeparatorProps, MenuSubmenuRootProps, MenuSubmenuTriggerProps } from "./Menu/index.mjs";
25
22
  import { MultiSelect, MultiSelectOption, MultiSelectProps } from "./MultiSelect/index.mjs";
23
+ import { MenuTriggerProps } from "./Menu/client.mjs";
26
24
  import { NavList, NavListGroupProps, NavListItemOwnProps, NavListItemProps, NavListProps } from "./NavList/index.mjs";
27
25
  import { NumberField, NumberFieldInputProps, NumberFieldProps } from "./NumberField/index.mjs";
28
26
  import { RadioGroup, RadioGroupOption, RadioGroupProps } from "./RadioGroup/index.mjs";
27
+ import { SearchField, SearchFieldProps } from "./SearchField/index.mjs";
29
28
  import { Select, SelectOption, SelectProps } from "./Select/index.mjs";
30
29
  import { Sidebar, SidebarProps } from "./Sidebar/index.mjs";
31
30
  import { SidebarLayout, SidebarLayoutMainProps, SidebarLayoutProps, SidebarLayoutSidebarProps } from "./SidebarLayout/index.mjs";
@@ -34,14 +33,15 @@ import { Switch, SwitchProps } from "./Switch/index.mjs";
34
33
  import { Table, TableBodyProps, TableCellProps, TableColumnGroupProps, TableColumnProps, TableFootProps, TableHeadProps, TableHeaderCellProps, TableProps, TableRowProps, TableScrollAreaProps, TableSortDirection } from "./Table/index.mjs";
35
34
  import { Tabs, TabsListProps, TabsPanelProps, TabsProps, TabsTabProps } from "./Tabs/index.mjs";
36
35
  import { Tag, TagProps } from "./Tag/index.mjs";
37
- import { TextField, TextFieldInputProps, TextFieldProps } from "./TextField/index.mjs";
36
+ import { Text, TextProps } from "./Text/index.mjs";
38
37
  import { Textarea, TextareaInputProps, TextareaProps } from "./Textarea/index.mjs";
38
+ import { TextField, TextFieldInputProps, TextFieldProps } from "./TextField/index.mjs";
39
39
  import { ToastOptions, ToastProviderProps, ToastVariant, useToast } from "./Toast/client.mjs";
40
- import { Toast } from "./Toast/index.mjs";
40
+ import { Theme, defineTheme } from "./theme/define-theme.mjs";
41
41
  import { TooltipPopupProps } from "./Tooltip/base.mjs";
42
42
  import { TooltipTriggerProps } from "./Tooltip/client.mjs";
43
+ import { ThemeProvider, ThemeProviderProps } from "./theme/ThemeProvider.mjs";
44
+ import { Toast } from "./Toast/index.mjs";
43
45
  import { Tooltip, TooltipProps, TooltipProviderProps } from "./Tooltip/index.mjs";
44
46
  import { VisuallyHidden, VisuallyHiddenProps } from "./VisuallyHidden/index.mjs";
45
- import { Theme, defineTheme } from "./theme/define-theme.mjs";
46
- import { ThemeProvider, ThemeProviderProps } from "./theme/ThemeProvider.mjs";
47
- export { AlertDialog, type AlertDialogProps, type AlertDialogTriggerProps, Avatar, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, type ButtonProps, Checkbox, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipProps, Clickable, type ClickableProps, ColorField, type ColorFieldInputProps, type ColorFieldProps, Combobox, type ComboboxOption, type ComboboxProps, Dialog, type DialogActionsProps, type DialogBodyProps, type DialogCloseProps, type DialogPopupProps, type DialogProps, type DialogTriggerProps, Field, type FieldDescriptionProps, type FieldErrorProps, type FieldLabelProps, type FieldProps, Heading, type HeadingLevel, type HeadingProps, type HeadingSize, Icon, IconButton, type IconButtonProps, type IconProps, Inline, type InlineProps, Menu, type MenuGroupProps, type MenuItemProps, type MenuLinkItemProps, type MenuPopupProps, type MenuProps, type MenuSeparatorProps, type MenuTriggerProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavList, type NavListGroupProps, type NavListItemOwnProps, type NavListItemProps, type NavListProps, NumberField, type NumberFieldInputProps, type NumberFieldProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, SearchField, type SearchFieldInputProps, type SearchFieldProps, Select, type SelectOption, type SelectProps, Sidebar, SidebarLayout, type SidebarLayoutMainProps, type SidebarLayoutProps, type SidebarLayoutSidebarProps, type SidebarProps, Stack, type StackProps, type StyleProps, Switch, type SwitchProps, Table, type TableBodyProps, type TableCellProps, type TableColumnGroupProps, type TableColumnProps, type TableFootProps, type TableHeadProps, type TableHeaderCellProps, type TableProps, type TableRowProps, type TableScrollAreaProps, type TableSortDirection, Tabs, type TabsListProps, type TabsPanelProps, type TabsProps, type TabsTabProps, Tag, type TagProps, Text, TextField, type TextFieldInputProps, type TextFieldProps, type TextProps, Textarea, type TextareaInputProps, type TextareaProps, type Theme, ThemeProvider, type ThemeProviderProps, Toast, type ToastOptions, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipPopupProps, type TooltipProps, type TooltipProviderProps, type TooltipTriggerProps, VisuallyHidden, type VisuallyHiddenProps, defineTheme, useToast };
47
+ export { AlertDialog, type AlertDialogProps, type AlertDialogTriggerProps, Avatar, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, type ButtonProps, Checkbox, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipProps, Clickable, type ClickableProps, ColorField, type ColorFieldInputProps, type ColorFieldProps, Combobox, type ComboboxOption, type ComboboxProps, Dialog, type DialogActionsProps, type DialogBodyProps, type DialogCloseProps, type DialogPopupProps, type DialogProps, type DialogTriggerProps, Field, type FieldDescriptionProps, type FieldErrorProps, type FieldLabelProps, type FieldProps, Heading, type HeadingLevel, type HeadingProps, type HeadingSize, Icon, IconButton, type IconButtonProps, type IconProps, Inline, type InlineProps, Menu, type MenuGroupProps, type MenuItemProps, type MenuLinkItemProps, type MenuPopupProps, type MenuProps, type MenuSeparatorProps, type MenuSubmenuRootProps, type MenuSubmenuTriggerProps, type MenuTriggerProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavList, type NavListGroupProps, type NavListItemOwnProps, type NavListItemProps, type NavListProps, NumberField, type NumberFieldInputProps, type NumberFieldProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, SearchField, type SearchFieldInputProps, type SearchFieldProps, Select, type SelectOption, type SelectProps, Sidebar, SidebarLayout, type SidebarLayoutMainProps, type SidebarLayoutProps, type SidebarLayoutSidebarProps, type SidebarProps, Stack, type StackProps, type StyleProps, Switch, type SwitchProps, Table, type TableBodyProps, type TableCellProps, type TableColumnGroupProps, type TableColumnProps, type TableFootProps, type TableHeadProps, type TableHeaderCellProps, type TableProps, type TableRowProps, type TableScrollAreaProps, type TableSortDirection, Tabs, type TabsListProps, type TabsPanelProps, type TabsProps, type TabsTabProps, Tag, type TagProps, Text, TextField, type TextFieldInputProps, type TextFieldProps, type TextProps, Textarea, type TextareaInputProps, type TextareaProps, type Theme, ThemeProvider, type ThemeProviderProps, Toast, type ToastOptions, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipPopupProps, type TooltipProps, type TooltipProviderProps, type TooltipTriggerProps, VisuallyHidden, type VisuallyHiddenProps, defineTheme, useToast };
package/dist/index.mjs CHANGED
@@ -1,40 +1,40 @@
1
- import { Clickable as e } from "./Clickable/index.mjs";
2
- import { Icon as t } from "./Icon/index.mjs";
3
- import { Text as n } from "./Text/index.mjs";
4
- import { Button as r } from "./Button/index.mjs";
5
- import { Heading as i } from "./Heading/index.mjs";
6
- import { Dialog as a } from "./Dialog/index.mjs";
7
- import { AlertDialog as o } from "./AlertDialog/index.mjs";
8
- import { Avatar as s } from "./Avatar/index.mjs";
9
- import { Badge as c } from "./Badge/index.mjs";
10
- import { Box as l } from "./Box/index.mjs";
11
- import { Checkbox as u } from "./Checkbox/index.mjs";
12
- import { Chip as d, ChipGroup as f } from "./Chip/index.mjs";
13
- import { Field as p } from "./Field/index.mjs";
14
- import { ColorField as m } from "./ColorField/index.mjs";
15
- import { Combobox as h } from "./Combobox/index.mjs";
16
- import { IconButton as g } from "./IconButton/index.mjs";
17
- import { Inline as _ } from "./Inline/index.mjs";
18
- import { Menu as v } from "./Menu/index.mjs";
19
- import { MultiSelect as y } from "./MultiSelect/index.mjs";
20
- import { VisuallyHidden as b } from "./VisuallyHidden/index.mjs";
21
- import { NavList as x } from "./NavList/index.mjs";
22
- import { NumberField as S } from "./NumberField/index.mjs";
23
- import { RadioGroup as C } from "./RadioGroup/index.mjs";
24
- import { SearchField as w } from "./SearchField/index.mjs";
25
- import { Select as T } from "./Select/index.mjs";
26
- import { Sidebar as E } from "./Sidebar/index.mjs";
27
- import { SidebarLayout as D } from "./SidebarLayout/index.mjs";
28
- import { Stack as O } from "./Stack/index.mjs";
29
- import { Switch as k } from "./Switch/index.mjs";
30
- import { Table as A } from "./Table/index.mjs";
31
- import { Tabs as j } from "./Tabs/index.mjs";
32
- import { Tag as M } from "./Tag/index.mjs";
33
- import { Textarea as N } from "./Textarea/index.mjs";
34
- import { TextField as P } from "./TextField/index.mjs";
35
- import { defineTheme as F } from "./theme/define-theme.mjs";
36
- import { ThemeProvider as I } from "./theme/ThemeProvider.mjs";
1
+ import { AlertDialog as e } from "./AlertDialog/index.mjs";
2
+ import { Avatar as t } from "./Avatar/index.mjs";
3
+ import { Badge as n } from "./Badge/index.mjs";
4
+ import { Box as r } from "./Box/index.mjs";
5
+ import { Button as i } from "./Button/index.mjs";
6
+ import { Checkbox as a } from "./Checkbox/index.mjs";
7
+ import { Chip as o, ChipGroup as s } from "./Chip/index.mjs";
8
+ import { Clickable as c } from "./Clickable/index.mjs";
9
+ import { ColorField as l } from "./ColorField/index.mjs";
10
+ import { Combobox as u } from "./Combobox/index.mjs";
11
+ import { Dialog as d } from "./Dialog/index.mjs";
12
+ import { Field as f } from "./Field/index.mjs";
13
+ import { Heading as p } from "./Heading/index.mjs";
14
+ import { Icon as m } from "./Icon/index.mjs";
15
+ import { IconButton as h } from "./IconButton/index.mjs";
16
+ import { Inline as g } from "./Inline/index.mjs";
17
+ import { Menu as _ } from "./Menu/index.mjs";
18
+ import { MultiSelect as v } from "./MultiSelect/index.mjs";
19
+ import { NavList as y } from "./NavList/index.mjs";
20
+ import { NumberField as b } from "./NumberField/index.mjs";
21
+ import { RadioGroup as x } from "./RadioGroup/index.mjs";
22
+ import { SearchField as S } from "./SearchField/index.mjs";
23
+ import { Select as C } from "./Select/index.mjs";
24
+ import { Sidebar as w } from "./Sidebar/index.mjs";
25
+ import { SidebarLayout as T } from "./SidebarLayout/index.mjs";
26
+ import { Stack as E } from "./Stack/index.mjs";
27
+ import { Switch as D } from "./Switch/index.mjs";
28
+ import { Table as O } from "./Table/index.mjs";
29
+ import { Tabs as k } from "./Tabs/index.mjs";
30
+ import { Tag as A } from "./Tag/index.mjs";
31
+ import { Text as j } from "./Text/index.mjs";
32
+ import { Textarea as M } from "./Textarea/index.mjs";
33
+ import { TextField as N } from "./TextField/index.mjs";
34
+ import { defineTheme as P } from "./theme/define-theme.mjs";
35
+ import { ThemeProvider as F } from "./theme/ThemeProvider.mjs";
36
+ import { Toast as I } from "./Toast/index.mjs";
37
37
  import { useToast as L } from "./Toast/client.mjs";
38
- import { Toast as R } from "./Toast/index.mjs";
39
- import { Tooltip as z } from "./Tooltip/index.mjs";
40
- export { o as AlertDialog, s as Avatar, c as Badge, l as Box, r as Button, u as Checkbox, d as Chip, f as ChipGroup, e as Clickable, m as ColorField, h as Combobox, a as Dialog, p as Field, i as Heading, t as Icon, g as IconButton, _ as Inline, v as Menu, y as MultiSelect, x as NavList, S as NumberField, C as RadioGroup, w as SearchField, T as Select, E as Sidebar, D as SidebarLayout, O as Stack, k as Switch, A as Table, j as Tabs, M as Tag, n as Text, P as TextField, N as Textarea, I as ThemeProvider, R as Toast, z as Tooltip, b as VisuallyHidden, F as defineTheme, L as useToast };
38
+ import { Tooltip as R } from "./Tooltip/index.mjs";
39
+ import { VisuallyHidden as z } from "./VisuallyHidden/index.mjs";
40
+ export { e as AlertDialog, t as Avatar, n as Badge, r as Box, i as Button, a as Checkbox, o as Chip, s as ChipGroup, c as Clickable, l as ColorField, u as Combobox, d as Dialog, f as Field, p as Heading, m as Icon, h as IconButton, g as Inline, _ as Menu, v as MultiSelect, y as NavList, b as NumberField, x as RadioGroup, S as SearchField, C as Select, w as Sidebar, T as SidebarLayout, E as Stack, D as Switch, O as Table, k as Tabs, A as Tag, j as Text, N as TextField, M as Textarea, F as ThemeProvider, I as Toast, R as Tooltip, z as VisuallyHidden, P as defineTheme, L as useToast };
@@ -13,6 +13,7 @@ var e = Object.freeze([
13
13
  "Error",
14
14
  "Description",
15
15
  "Trigger",
16
+ "SubmenuTrigger",
16
17
  "Close",
17
18
  "HeaderCell",
18
19
  "Cell",
@@ -1,5 +1,5 @@
1
- import { ClickableProps } from "../Clickable/index.mjs";
2
1
  import { ButtonOwnProps } from "../Button/index.mjs";
2
+ import { ClickableProps } from "../Clickable/index.mjs";
3
3
  import { ReactNode } from "react";
4
4
  export type TriggerLookProps = {
5
5
  variant?: Exclude<ButtonOwnProps["variant"], "danger">;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { Clickable as e } from "../Clickable/index.mjs";
3
- import { Button as t } from "../Button/index.mjs";
2
+ import { Button as e } from "../Button/index.mjs";
3
+ import { Clickable as t } from "../Clickable/index.mjs";
4
4
  import { useThemeContainer as n } from "../theme/use-theme-container.mjs";
5
5
  import { createContext as r, use as i, useCallback as a, useLayoutEffect as o, useRef as s } from "react";
6
6
  import { jsx as c } from "react/jsx-runtime";
@@ -12,34 +12,49 @@ var l = r({
12
12
  }), u = r({ current: {
13
13
  keyboard: !1,
14
14
  opener: null
15
- } });
16
- function d({ children: e }) {
17
- let t = s({
15
+ } }), d = r(null);
16
+ function f(e, t) {
17
+ return e.element = t, e.parent?.current.nested.add(e), () => {
18
+ e.element = null, e.parent?.current.nested.delete(e);
19
+ };
20
+ }
21
+ function p(e, t) {
22
+ return !!e.element?.contains(t) || [...e.nested].some((e) => p(e, t));
23
+ }
24
+ function m({ children: e, nested: t = !1 }) {
25
+ let r = s({
18
26
  keyboard: !1,
19
27
  opener: null
28
+ }), a = i(d), o = s({
29
+ element: null,
30
+ nested: /* @__PURE__ */ new Set(),
31
+ parent: t ? a : null
20
32
  });
21
33
  return /* @__PURE__ */ c(l, {
22
34
  value: n(),
23
35
  children: /* @__PURE__ */ c(u, {
24
- value: t,
25
- children: e
36
+ value: r,
37
+ children: /* @__PURE__ */ c(d, {
38
+ value: o,
39
+ children: e
40
+ })
26
41
  })
27
42
  });
28
43
  }
29
- function f() {
44
+ function h() {
30
45
  return i(l);
31
46
  }
32
- function p({ variant: n, size: r, iconStart: i, iconEnd: a, uppercase: o, ...s }) {
33
- return n || r || i || a || o ? /* @__PURE__ */ c(t, {
47
+ function g({ variant: n, size: r, iconStart: i, iconEnd: a, uppercase: o, ...s }) {
48
+ return n || r || i || a || o ? /* @__PURE__ */ c(e, {
34
49
  ...s,
35
50
  variant: n,
36
51
  size: r,
37
52
  iconStart: i,
38
53
  iconEnd: a,
39
54
  uppercase: o
40
- }) : /* @__PURE__ */ c(e, { ...s });
55
+ }) : /* @__PURE__ */ c(t, { ...s });
41
56
  }
42
- function m(e) {
57
+ function _(e) {
43
58
  let t = i(u);
44
59
  return (n, r) => {
45
60
  t.current = n ? {
@@ -54,7 +69,7 @@ function m(e) {
54
69
  }, e?.(n, r);
55
70
  };
56
71
  }
57
- function h(e, t) {
72
+ function v(e, t) {
58
73
  if (typeof e == "function") {
59
74
  let n = e(t);
60
75
  return typeof n == "function" ? n : () => e(null);
@@ -63,26 +78,27 @@ function h(e, t) {
63
78
  e && (e.current = null);
64
79
  };
65
80
  }
66
- var g = /* @__PURE__ */ new Set([
81
+ var y = /* @__PURE__ */ new Set([
67
82
  "trigger-hover",
68
83
  "focus-out",
69
- "outside-press"
70
- ]), _;
71
- function v(e) {
72
- return _ === void 0 && (_ = !1, e.createElement("div").focus({ get preventScroll() {
73
- return _ = !0, !1;
74
- } })), _;
84
+ "outside-press",
85
+ "sibling-open"
86
+ ]), b;
87
+ function x(e) {
88
+ return b === void 0 && (b = !1, e.createElement("div").focus({ get preventScroll() {
89
+ return b = !0, !1;
90
+ } })), b;
75
91
  }
76
- function y(e, { finalFocus: t, modal: n = !1, open: r }) {
77
- let { trigger: c } = f(), l = i(u), d = s(null), p = a((t) => {
78
- d.current = t;
79
- let n = h(e, t);
92
+ function S(e, { finalFocus: t, modal: n = !1, open: r }) {
93
+ let { trigger: c } = h(), l = i(u), m = i(d), g = s(null), _ = a((t) => {
94
+ g.current = t;
95
+ let n = v(e, t), r = m && f(m.current, t);
80
96
  return () => {
81
- d.current = null, n();
97
+ g.current = null, r?.(), n();
82
98
  };
83
- }, [e]);
99
+ }, [e, m]);
84
100
  return o(() => {
85
- let e = d.current;
101
+ let e = g.current;
86
102
  if (!r || !e || l.current.recorded) return;
87
103
  let { activeElement: t, body: n } = e.ownerDocument, i = t === n || e.contains(t) ? null : t;
88
104
  l.current = {
@@ -90,7 +106,7 @@ function y(e, { finalFocus: t, modal: n = !1, open: r }) {
90
106
  opener: i
91
107
  };
92
108
  }, [r, l]), o(() => {
93
- let e = d.current;
109
+ let e = g.current;
94
110
  if (!e) return;
95
111
  if (r) {
96
112
  e.inert = !1;
@@ -98,8 +114,8 @@ function y(e, { finalFocus: t, modal: n = !1, open: r }) {
98
114
  }
99
115
  let { reason: i, keyboard: a, opener: o } = l.current;
100
116
  l.current.recorded = !1;
101
- let s = o?.isConnected ? o : c.current, { activeElement: u } = e.ownerDocument, f = n && i === "outside-press" && v(e.ownerDocument);
102
- if (!t && s instanceof HTMLElement && (f || e.contains(u) && !g.has(i ?? ""))) {
117
+ let s = o?.isConnected ? o : c.current, { activeElement: u } = e.ownerDocument, d = n && i === "outside-press" && x(e.ownerDocument), f = e.contains(u) || [...m?.current.nested ?? []].some((e) => p(e, u));
118
+ if (!t && s instanceof HTMLElement && (d || f && !y.has(i ?? ""))) {
103
119
  let e = { preventScroll: !0 };
104
120
  a && (e.focusVisible = !0), s.focus(e);
105
121
  }
@@ -109,10 +125,11 @@ function y(e, { finalFocus: t, modal: n = !1, open: r }) {
109
125
  t,
110
126
  n,
111
127
  l,
128
+ m,
112
129
  c
113
130
  ]), {
114
131
  "aria-hidden": !r || void 0,
115
- ref: p
132
+ ref: _
116
133
  };
117
134
  }
118
- export { d as PopupScope, p as triggerElement, y as useClosingRule, f as usePopupScope, m as useRecordOpenChange };
135
+ export { m as PopupScope, g as triggerElement, S as useClosingRule, h as usePopupScope, _ as useRecordOpenChange };
@@ -0,0 +1 @@
1
+ import "react";
@@ -0,0 +1,23 @@
1
+ "use client";
2
+ import { createContext as e, use as t, useCallback as n, useLayoutEffect as r, useMemo as i, useRef as a, useState as o } from "react";
3
+ // src/popup/direction.tsx
4
+ var s = e({ rtl: !1 });
5
+ function c(e, t, s) {
6
+ let [c, l] = o(!1), u = a(!1), d = n((e) => {
7
+ e?.isConnected && (u.current = !0, l(getComputedStyle(e).direction === "rtl"));
8
+ }, []);
9
+ return r(() => {
10
+ e ? u.current || d(t.current) : u.current = !1;
11
+ }, [
12
+ e,
13
+ t,
14
+ d
15
+ ]), [i(() => ({ rtl: c }), [c]), (e, n) => {
16
+ s?.(e, n), e && !n.isCanceled && d(n.trigger ?? t.current);
17
+ }];
18
+ }
19
+ function l(e) {
20
+ let { rtl: n } = t(s);
21
+ return e === "inline-start" ? n ? "right" : "left" : e === "inline-end" ? n ? "left" : "right" : e;
22
+ }
23
+ export { s as TriggerDirection, l as usePhysicalSide, c as useTriggerDirection };
@@ -1,22 +1,22 @@
1
1
  "use client";
2
- import { splitStyleProps as e } from "../styles/split-style-props.mjs";
3
- import { Box as t } from "../Box/base.mjs";
4
- import { PopupScope as n, triggerElement as r, useClosingRule as i } from "./client.mjs";
5
- import { Field as a } from "../Field/index.mjs";
6
- import { ChevronDownIcon as o } from "../icons/ChevronDownIcon.mjs";
2
+ import { Box as e } from "../Box/base.mjs";
3
+ import { Field as t } from "../Field/index.mjs";
4
+ import { ChevronDownIcon as n } from "../icons/ChevronDownIcon.mjs";
5
+ import { splitStyleProps as r } from "../styles/split-style-props.mjs";
6
+ import { PopupScope as i, triggerElement as a, useClosingRule as o } from "./client.mjs";
7
7
  import { createContext as s, use as c, useId as l } from "react";
8
8
  import { jsx as u } from "react/jsx-runtime";
9
9
  // src/popup/listbox-base.tsx
10
10
  var d = s(void 0);
11
11
  function f({ children: e }) {
12
- return /* @__PURE__ */ u(n, { children: /* @__PURE__ */ u(d, {
12
+ return /* @__PURE__ */ u(i, { children: /* @__PURE__ */ u(d, {
13
13
  value: l(),
14
14
  children: e
15
15
  }) });
16
16
  }
17
- function p({ children: e, className: t }) {
18
- return /* @__PURE__ */ u(a.Label, {
19
- className: t,
17
+ function p({ children: e, className: n }) {
18
+ return /* @__PURE__ */ u(t.Label, {
19
+ className: n,
20
20
  id: c(d),
21
21
  nativeLabel: !1,
22
22
  children: e
@@ -25,24 +25,24 @@ function p({ children: e, className: t }) {
25
25
  function m() {
26
26
  return c(d);
27
27
  }
28
- function h({ children: e, className: t, iconStart: n, size: i }) {
29
- return r({
28
+ function h({ children: e, className: t, iconStart: r, size: i }) {
29
+ return a({
30
30
  variant: "secondary",
31
31
  size: i,
32
32
  backgroundColor: "bg",
33
33
  color: "fg",
34
- iconStart: n,
35
- iconEnd: o,
34
+ iconStart: r,
35
+ iconEnd: n,
36
36
  className: t,
37
37
  children: e
38
38
  });
39
39
  }
40
- function g(e) {
41
- return /* @__PURE__ */ u(t, {
40
+ function g(t) {
41
+ return /* @__PURE__ */ u(e, {
42
42
  backgroundColor: "bgRaised",
43
43
  borderRadius: "med",
44
44
  boxShadow: "med",
45
- className: e,
45
+ className: t,
46
46
  padding: "4"
47
47
  });
48
48
  }
@@ -52,19 +52,19 @@ var _ = {
52
52
  side: "bottom",
53
53
  sideOffset: 4
54
54
  };
55
- function v(t, { open: n }) {
56
- let [, r] = e(t);
55
+ function v(e, { open: t }) {
56
+ let [, n] = r(e);
57
57
  return /* @__PURE__ */ u(y, {
58
- ...r,
59
- open: n
58
+ ...n,
59
+ open: t
60
60
  });
61
61
  }
62
- function y({ open: e, ref: n, ...r }) {
63
- return /* @__PURE__ */ u(t, {
62
+ function y({ open: t, ref: n, ...r }) {
63
+ return /* @__PURE__ */ u(e, {
64
64
  ...r,
65
- ...i(n, {
65
+ ...o(n, {
66
66
  finalFocus: !1,
67
- open: e
67
+ open: t
68
68
  }),
69
69
  zIndex: "popover"
70
70
  });
@@ -1,5 +1,5 @@
1
- import { Text as e } from "../Text/index.mjs";
2
- import { CheckIcon as t } from "../icons/CheckIcon.mjs";
1
+ import { CheckIcon as e } from "../icons/CheckIcon.mjs";
2
+ import { Text as t } from "../Text/index.mjs";
3
3
  import { listboxRow as n } from "./listbox-row.mjs";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
5
  import { Select as a } from "@base-ui/react/select";
@@ -11,13 +11,13 @@ function o({ checkClassName: o, itemClassName: s, options: c }) {
11
11
  render: n(s),
12
12
  value: c.value,
13
13
  children: [/* @__PURE__ */ r(a.ItemText, {
14
- render: /* @__PURE__ */ r(e, {
14
+ render: /* @__PURE__ */ r(t, {
15
15
  as: "span",
16
16
  font: "label",
17
17
  size: "sm"
18
18
  }),
19
19
  children: c.label
20
- }), /* @__PURE__ */ r(t, {
20
+ }), /* @__PURE__ */ r(e, {
21
21
  className: o,
22
22
  size: "sm"
23
23
  })]
@@ -10,6 +10,7 @@ function n(n) {
10
10
  gap: "8",
11
11
  justifyContent: "space-between",
12
12
  minBlockSize: "sm",
13
+ paddingBlock: "8",
13
14
  paddingInline: "12"
14
15
  });
15
16
  }
@@ -1,3 +1,4 @@
1
+ import "./direction.mjs";
1
2
  import { ReactElement, ReactNode } from "react";
2
3
  import { Tooltip } from "@base-ui/react/tooltip";
3
4
  export type TooltipRootScopeProps = Pick<Tooltip.Root.Props, "open" | "defaultOpen" | "onOpenChange" | "disabled"> & {