pentatrion-design 0.1.0 → 0.1.2

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 (251) hide show
  1. package/components/autocomplete/Autocomplete.d.ts +3 -3
  2. package/components/autocomplete/Autocomplete.js +8 -8
  3. package/components/autocomplete/Autocomplete.stories.d.ts +2 -2
  4. package/components/autocomplete/Autocomplete.stories.js +6 -6
  5. package/components/autocomplete/AutocompleteOption.d.ts +1 -1
  6. package/components/autocomplete/AutocompleteOption.js +2 -2
  7. package/components/autocomplete/LazyAutocomplete.d.ts +2 -2
  8. package/components/autocomplete/LazyAutocomplete.js +3 -3
  9. package/components/autocomplete/SimpleAutocomplete.d.ts +2 -2
  10. package/components/autocomplete/SimpleAutocomplete.js +3 -3
  11. package/components/autocomplete/_fixtures.d.ts +1 -1
  12. package/components/autocomplete/index.d.ts +6 -6
  13. package/components/autocomplete/index.js +6 -6
  14. package/components/autocomplete/useAutocompleteContext.d.ts +1 -1
  15. package/components/autocomplete/util.d.ts +1 -1
  16. package/components/badge/Badge.d.ts +1 -1
  17. package/components/badge/Badge.js +5 -5
  18. package/components/badge/Badge.stories.d.ts +1 -1
  19. package/components/badge/Badge.stories.js +1 -1
  20. package/components/badge/index.d.ts +1 -1
  21. package/components/badge/index.js +1 -1
  22. package/components/button/Button.d.ts +1 -1
  23. package/components/button/Button.js +2 -2
  24. package/components/button/Button.stories.d.ts +1 -1
  25. package/components/button/Button.stories.js +2 -2
  26. package/components/button/Button.test.js +1 -1
  27. package/components/button/ButtonGroup.stories.d.ts +1 -1
  28. package/components/button/ButtonGroup.stories.js +2 -2
  29. package/components/button/LinkButton.d.ts +1 -1
  30. package/components/button/LinkButton.js +2 -2
  31. package/components/button/index.d.ts +3 -3
  32. package/components/button/index.js +3 -3
  33. package/components/card/Card.stories.js +1 -1
  34. package/components/card/index.d.ts +1 -1
  35. package/components/card/index.js +1 -1
  36. package/components/code/index.d.ts +1 -1
  37. package/components/code/index.js +1 -1
  38. package/components/context-menu/ContextMenu.js +2 -2
  39. package/components/context-menu/ContextMenu.stories.js +2 -2
  40. package/components/context-menu/index.d.ts +2 -2
  41. package/components/context-menu/index.js +2 -2
  42. package/components/dialog/Dialog.d.ts +1 -1
  43. package/components/dialog/Dialog.stories.js +2 -2
  44. package/components/dialog/index.d.ts +1 -1
  45. package/components/dialog/index.js +1 -1
  46. package/components/dropdown-menu/DropdownMenu.d.ts +1 -1
  47. package/components/dropdown-menu/DropdownMenu.js +2 -2
  48. package/components/dropdown-menu/DropdownMenu.stories.d.ts +1 -1
  49. package/components/dropdown-menu/DropdownMenu.stories.js +1 -1
  50. package/components/dropdown-menu/DropdownMenuContent.js +2 -2
  51. package/components/dropdown-menu/DropdownMenuItem.js +1 -1
  52. package/components/dropdown-menu/DropdownMenuTrigger.js +2 -2
  53. package/components/dropdown-menu/index.d.ts +7 -7
  54. package/components/dropdown-menu/index.js +6 -6
  55. package/components/dropdown-menu/interface.d.ts +1 -1
  56. package/components/dropdown-menu/useDropdownMenu.d.ts +2 -2
  57. package/components/dropdown-menu/useDropdownMenuContext.d.ts +2 -2
  58. package/components/dropdown-menu-nested/DropdownMenuNested.d.ts +1 -1
  59. package/components/dropdown-menu-nested/DropdownMenuNested.js +1 -1
  60. package/components/dropdown-menu-nested/DropdownMenuNested.stories.d.ts +1 -1
  61. package/components/dropdown-menu-nested/DropdownMenuNested.stories.js +4 -4
  62. package/components/dropdown-menu-nested/MenuItem.js +1 -1
  63. package/components/dropdown-menu-nested/MenuItemWithChildren.d.ts +1 -1
  64. package/components/dropdown-menu-nested/MenuItemWithChildren.js +3 -3
  65. package/components/dropdown-menu-nested/index.d.ts +3 -3
  66. package/components/dropdown-menu-nested/index.js +3 -3
  67. package/components/flash/Flash.d.ts +1 -1
  68. package/components/flash/Flash.js +1 -1
  69. package/components/flash/Flash.stories.d.ts +1 -1
  70. package/components/flash/Flash.stories.js +1 -1
  71. package/components/flash/index.d.ts +1 -1
  72. package/components/flash/index.js +1 -1
  73. package/components/highlight/Highlight.stories.d.ts +1 -1
  74. package/components/highlight/Highlight.stories.js +3 -3
  75. package/components/highlight/index.d.ts +1 -1
  76. package/components/highlight/index.js +1 -1
  77. package/components/href/Href.stories.d.ts +1 -1
  78. package/components/href/Href.stories.js +1 -1
  79. package/components/href/index.d.ts +1 -1
  80. package/components/href/index.js +1 -1
  81. package/components/input/Checkbox.d.ts +1 -1
  82. package/components/input/Checkbox.js +1 -1
  83. package/components/input/Checkbox.stories.d.ts +1 -1
  84. package/components/input/Checkbox.stories.js +1 -1
  85. package/components/input/Color.d.ts +1 -1
  86. package/components/input/Color.js +1 -1
  87. package/components/input/Color.stories.d.ts +1 -1
  88. package/components/input/Color.stories.js +1 -1
  89. package/components/input/Input.d.ts +1 -1
  90. package/components/input/Input.stories.d.ts +1 -1
  91. package/components/input/Input.stories.js +3 -3
  92. package/components/input/Input.test.js +1 -1
  93. package/components/input/RadioGroup.d.ts +1 -1
  94. package/components/input/RadioGroup.js +1 -1
  95. package/components/input/RadioGroup.stories.d.ts +1 -1
  96. package/components/input/RadioGroup.stories.js +1 -1
  97. package/components/input/Range.d.ts +1 -1
  98. package/components/input/Range.stories.d.ts +1 -1
  99. package/components/input/Range.stories.js +1 -1
  100. package/components/input/Toggle.d.ts +1 -1
  101. package/components/input/Toggle.js +1 -1
  102. package/components/input/Toggle.stories.d.ts +1 -1
  103. package/components/input/Toggle.stories.js +1 -1
  104. package/components/input/index.d.ts +6 -6
  105. package/components/input/index.js +6 -6
  106. package/components/input-field/InputField.d.ts +1 -1
  107. package/components/input-field/InputField.js +1 -1
  108. package/components/input-field/InputField.stories.d.ts +1 -1
  109. package/components/input-field/InputField.stories.js +4 -4
  110. package/components/input-field/index.d.ts +1 -1
  111. package/components/input-field/index.js +1 -1
  112. package/components/loader/Loader.d.ts +1 -1
  113. package/components/loader/Loader.js +1 -1
  114. package/components/loader/Loader.stories.d.ts +1 -1
  115. package/components/loader/Loader.stories.js +1 -1
  116. package/components/loader/index.d.ts +1 -1
  117. package/components/loader/index.js +1 -1
  118. package/components/modal/Components.js +3 -3
  119. package/components/modal/Modal.d.ts +1 -1
  120. package/components/modal/Modal.js +2 -2
  121. package/components/modal/Modal.stories.d.ts +1 -1
  122. package/components/modal/Modal.stories.js +6 -6
  123. package/components/modal/ModalContent.js +2 -2
  124. package/components/modal/ModalTrigger.js +2 -2
  125. package/components/modal/index.d.ts +7 -7
  126. package/components/modal/index.js +6 -6
  127. package/components/modal/interface.d.ts +1 -1
  128. package/components/modal/useModal.d.ts +2 -2
  129. package/components/modal/useModalContext.d.ts +2 -2
  130. package/components/notification/Notification.stories.d.ts +1 -1
  131. package/components/notification/Notification.stories.js +4 -4
  132. package/components/notification/NotificationsContext.d.ts +1 -1
  133. package/components/notification/NotificationsContext.js +1 -1
  134. package/components/notification/NotificationsProvider.js +2 -2
  135. package/components/notification/index.d.ts +4 -4
  136. package/components/notification/index.js +4 -4
  137. package/components/notification/useContextNotifications.d.ts +1 -1
  138. package/components/notification/useContextNotifications.js +1 -1
  139. package/components/notification/useFetch.d.ts +1 -1
  140. package/components/notification/useFetch.js +2 -2
  141. package/components/popover/Components.js +2 -2
  142. package/components/popover/Popover.d.ts +1 -1
  143. package/components/popover/Popover.js +1 -1
  144. package/components/popover/Popover.stories.d.ts +1 -1
  145. package/components/popover/Popover.stories.js +4 -4
  146. package/components/popover/Popover.test.js +1 -1
  147. package/components/popover/PopoverContent.js +3 -3
  148. package/components/popover/PopoverTrigger.js +2 -2
  149. package/components/popover/index.d.ts +7 -7
  150. package/components/popover/index.js +6 -6
  151. package/components/popover/interface.d.ts +1 -1
  152. package/components/popover/usePopover.d.ts +2 -2
  153. package/components/popover/usePopoverContext.d.ts +2 -2
  154. package/components/portal/index.d.ts +1 -1
  155. package/components/portal/index.js +1 -1
  156. package/components/quick-settings/QuickSettings.stories.js +4 -4
  157. package/components/resize-area/ResizeArea.stories.d.ts +1 -1
  158. package/components/resize-area/ResizeArea.stories.js +1 -1
  159. package/components/resize-area/index.d.ts +1 -1
  160. package/components/resize-area/index.js +1 -1
  161. package/components/scroll/Scroll.stories.d.ts +1 -1
  162. package/components/scroll/Scroll.stories.js +1 -1
  163. package/components/scroll/index.d.ts +1 -1
  164. package/components/scroll/index.js +1 -1
  165. package/components/select/Select.d.ts +2 -2
  166. package/components/select/Select.js +6 -6
  167. package/components/select/Select.stories.d.ts +3 -3
  168. package/components/select/Select.stories.js +2 -2
  169. package/components/select/Select.test.js +1 -1
  170. package/components/select/SelectOption.d.ts +1 -1
  171. package/components/select/SelectOption.js +1 -1
  172. package/components/select/SelectSelection.d.ts +1 -1
  173. package/components/select/SelectSelection.js +1 -1
  174. package/components/select/_fixtures.d.ts +1 -1
  175. package/components/select/_fixtures.js +1 -1
  176. package/components/select/index.d.ts +5 -5
  177. package/components/select/index.js +4 -4
  178. package/components/snack/Snack.d.ts +1 -1
  179. package/components/snack/Snack.js +4 -4
  180. package/components/snack/Snack.stories.d.ts +1 -1
  181. package/components/snack/Snack.stories.js +1 -1
  182. package/components/snack/index.d.ts +1 -1
  183. package/components/snack/index.js +1 -1
  184. package/components/sortable/Sortable.js +1 -1
  185. package/components/sortable/Sortable.stories.d.ts +1 -1
  186. package/components/sortable/Sortable.stories.js +3 -3
  187. package/components/sortable/index.d.ts +2 -2
  188. package/components/sortable/index.js +1 -1
  189. package/components/steps/Steps.stories.d.ts +1 -1
  190. package/components/steps/Steps.stories.js +3 -3
  191. package/components/steps/index.d.ts +2 -2
  192. package/components/steps/index.js +2 -2
  193. package/components/table/Table.stories.js +6 -6
  194. package/components/table/index.d.ts +7 -7
  195. package/components/table/index.js +7 -7
  196. package/components/tabs/Tabs.stories.d.ts +1 -1
  197. package/components/tabs/Tabs.stories.js +2 -2
  198. package/components/tabs/index.d.ts +1 -1
  199. package/components/tabs/index.js +1 -1
  200. package/components/textarea/Textarea.d.ts +1 -1
  201. package/components/textarea/Textarea.stories.d.ts +1 -1
  202. package/components/textarea/Textarea.stories.js +1 -1
  203. package/components/textarea/index.d.ts +1 -1
  204. package/components/textarea/index.js +1 -1
  205. package/components/tooltip/SimpleTooltip.d.ts +1 -1
  206. package/components/tooltip/SimpleTooltip.js +3 -3
  207. package/components/tooltip/Tooltip.d.ts +1 -1
  208. package/components/tooltip/Tooltip.js +2 -2
  209. package/components/tooltip/Tooltip.stories.d.ts +1 -1
  210. package/components/tooltip/Tooltip.stories.js +2 -2
  211. package/components/tooltip/Tooltip.test.js +1 -1
  212. package/components/tooltip/TooltipContent.js +3 -3
  213. package/components/tooltip/TooltipTrigger.js +1 -1
  214. package/components/tooltip/index.d.ts +6 -6
  215. package/components/tooltip/index.js +6 -6
  216. package/components/tooltip/interface.d.ts +1 -1
  217. package/components/tooltip/useTooltip.d.ts +2 -2
  218. package/components/tooltip/useTooltipContext.d.ts +2 -2
  219. package/hooks/index.d.ts +11 -11
  220. package/hooks/index.js +11 -11
  221. package/hooks/useCombinedRefs.test.js +1 -1
  222. package/hooks/useEventListener.js +1 -1
  223. package/hooks/useOnClickOutside.js +1 -1
  224. package/hooks/useRipple.js +1 -1
  225. package/hooks/useRipple.test.js +1 -1
  226. package/index.d.ts +33 -33
  227. package/index.js +32 -32
  228. package/lib/error.d.ts +1 -1
  229. package/lib/fetch.js +11 -6
  230. package/lib/fetch.test.js +17 -1
  231. package/lib/index.d.ts +4 -4
  232. package/lib/index.js +4 -4
  233. package/lib/tailwindVariants.d.ts +1 -1
  234. package/package.json +1 -1
  235. package/redux/index.d.ts +1 -1
  236. package/redux/index.js +1 -1
  237. package/redux/notification/NotificationConsumer.js +2 -2
  238. package/redux/notification/errorCatcherMiddleware.js +4 -4
  239. package/redux/notification/index.d.ts +5 -5
  240. package/redux/notification/index.js +5 -5
  241. package/redux/notification/notificationSlice.d.ts +3 -3
  242. package/redux/notification/notificationSlice.js +1 -1
  243. package/redux/notification/useReduxNotifications.d.ts +1 -1
  244. package/redux/notification/useReduxNotifications.js +2 -2
  245. package/styles/Animation.stories.js +1 -1
  246. package/styles/Icons.stories.js +1 -1
  247. package/styles/Shadow.stories.js +1 -1
  248. package/styles/Typography.stories.js +3 -3
  249. package/tailwind/index.d.ts +2 -2
  250. package/tailwind/index.js +2 -2
  251. package/tailwind/pentatrionTw.js +5 -5
@@ -1,8 +1,8 @@
1
1
  import { ReactNode } from "react";
2
- import type { OptionLike, Option } from "../select";
3
- import { AutocompleteOptionProps } from "./AutocompleteOption";
2
+ import type { OptionLike, Option } from "../select/index.js";
3
+ import { AutocompleteOptionProps } from "./AutocompleteOption.js";
4
4
  import { Placement } from "@floating-ui/react";
5
- import { ThemeColor } from "../../types";
5
+ import { ThemeColor } from "../../types.js";
6
6
  export interface AutocompleteProps<O extends OptionLike = Option> {
7
7
  className?: string;
8
8
  icon?: boolean | ReactNode;
@@ -1,16 +1,16 @@
1
1
  import { createElement as _createElement } from "react";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useCallback, useMemo, useRef, useState, forwardRef, } from "react";
4
- import { AutocompleteOption } from "./AutocompleteOption";
4
+ import { AutocompleteOption } from "./AutocompleteOption.js";
5
5
  import { FloatingFocusManager, FloatingList, FloatingPortal, autoUpdate, flip, offset, size, useDismiss, useFloating, useInteractions, useListNavigation, useRole, } from "@floating-ui/react";
6
- import { AutocompleteContext } from "./useAutocompleteContext";
6
+ import { AutocompleteContext } from "./useAutocompleteContext.js";
7
7
  import clsx from "clsx";
8
- import { useEventCallback } from "../../hooks";
9
- import { getOptionLabel, getOptionValue } from "./util";
10
- import { Button } from "../button";
11
- import { Dialog } from "../dialog";
12
- import { Loader } from "../loader";
13
- import { inputConfig } from "../input/Input";
8
+ import { useEventCallback } from "../../hooks/index.js";
9
+ import { getOptionLabel, getOptionValue } from "./util.js";
10
+ import { Button } from "../button/index.js";
11
+ import { Dialog } from "../dialog/index.js";
12
+ import { Loader } from "../loader/index.js";
13
+ import { inputConfig } from "../input/Input.js";
14
14
  export const Autocomplete = forwardRef(function Autocomplete({ className, icon = true, color = "yellow", noSearchSuffix, suffix, placement = "bottom", placeholder = "Search...", selection = null, onChangeSelection, autocompleteOptionComponent, loading = false, clearSearchButton = false, searchValue, onChangeSearchValue, options, selectOnFocus = true, readOnly = false, }, inputRef) {
15
15
  const [isOpen, setIsOpen] = useState(false);
16
16
  const [activeIndex, setActiveIndex] = useState(null);
@@ -1,9 +1,9 @@
1
1
  import { ReactRenderer } from "@storybook/react";
2
- import { Option } from "../select";
2
+ import { Option } from "../select/index.js";
3
3
  import { PartialStoryFn } from "@storybook/types";
4
4
  declare const meta: {
5
5
  title: string;
6
- component: <O extends import("../select").OptionLike = Option>(props: import("./Autocomplete").AutocompleteProps<O> & import("react").RefAttributes<HTMLInputElement>) => React.ReactElement | null;
6
+ component: <O extends import("../select/index.js").OptionLike = Option>(props: import("./Autocomplete.js").AutocompleteProps<O> & import("react").RefAttributes<HTMLInputElement>) => React.ReactElement | null;
7
7
  decorators: ((story: PartialStoryFn<ReactRenderer, any>) => JSX.Element)[];
8
8
  };
9
9
  export default meta;
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
- import { NotificationsProvider } from "../notification";
4
- import { Button } from "../button";
5
- import { SimpleAutocomplete } from "./SimpleAutocomplete";
6
- import { Autocomplete } from "./Autocomplete";
7
- import { LazyAutocomplete } from "./LazyAutocomplete";
8
- import { handleChangeSearchValue, options } from "./_fixtures";
3
+ import { NotificationsProvider } from "../notification/index.js";
4
+ import { Button } from "../button/index.js";
5
+ import { SimpleAutocomplete } from "./SimpleAutocomplete.js";
6
+ import { Autocomplete } from "./Autocomplete.js";
7
+ import { LazyAutocomplete } from "./LazyAutocomplete.js";
8
+ import { handleChangeSearchValue, options } from "./_fixtures.js";
9
9
  const meta = {
10
10
  title: "Components/Autocomplete",
11
11
  component: Autocomplete,
@@ -1,3 +1,3 @@
1
- import { OptionLike } from "../select";
1
+ import { OptionLike } from "../select/index.js";
2
2
  export type AutocompleteOptionProps<O extends OptionLike> = O;
3
3
  export declare const AutocompleteOption: import("react").MemoExoticComponent<(<O extends OptionLike>(props: AutocompleteOptionProps<O>) => import("react/jsx-runtime").JSX.Element)>;
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { memo, useId } from "react";
3
3
  import { useListItem } from "@floating-ui/react";
4
- import { useAutocomplete } from "./useAutocompleteContext";
4
+ import { useAutocomplete } from "./useAutocompleteContext.js";
5
5
  import clsx from "clsx";
6
- import { getOptionLabel, getOptionValue } from "./util";
6
+ import { getOptionLabel, getOptionValue } from "./util.js";
7
7
  export const AutocompleteOption = memo(function AutocompleteOption(props) {
8
8
  const label = getOptionLabel(props);
9
9
  const id = useId();
@@ -1,5 +1,5 @@
1
- import { AutocompleteProps } from "./Autocomplete";
2
- import { OptionLike, Option } from "../select";
1
+ import { AutocompleteProps } from "./Autocomplete.js";
2
+ import { OptionLike, Option } from "../select/index.js";
3
3
  interface Props<O extends OptionLike = Option> extends Pick<AutocompleteProps<O>, "className" | "icon" | "color" | "suffix" | "noSearchSuffix" | "placement" | "placeholder" | "selection" | "onChangeSelection" | "autocompleteOptionComponent" | "loading" | "clearSearchButton" | "readOnly"> {
4
4
  onChangeSearchValueCallback: (searchValue: string) => Promise<O[]>;
5
5
  debounce?: number;
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
3
- import { Autocomplete } from "./Autocomplete";
4
- import { getOptionLabel } from "./util";
5
- import { useStateDebounce, useEventCallback } from "../../hooks";
3
+ import { Autocomplete } from "./Autocomplete.js";
4
+ import { getOptionLabel } from "./util.js";
5
+ import { useStateDebounce, useEventCallback } from "../../hooks/index.js";
6
6
  export function LazyAutocomplete({ onChangeSearchValueCallback, debounce = 5000, selection = null, onChangeSelection, ...rest }) {
7
7
  const onChangeSelectionStable = useEventCallback(onChangeSelection);
8
8
  const onChangeSearchValueCallbackStable = useEventCallback(onChangeSearchValueCallback);
@@ -1,5 +1,5 @@
1
- import { AutocompleteProps } from "./Autocomplete";
2
- import { Option, OptionLike } from "../select";
1
+ import { AutocompleteProps } from "./Autocomplete.js";
2
+ import { Option, OptionLike } from "../select/index.js";
3
3
  interface Props<O extends OptionLike = Option> extends Pick<AutocompleteProps<O>, "className" | "icon" | "color" | "suffix" | "noSearchSuffix" | "placement" | "placeholder" | "selection" | "onChangeSelection" | "autocompleteOptionComponent" | "options" | "selection" | "readOnly"> {
4
4
  }
5
5
  export declare function SimpleAutocomplete<O extends OptionLike = Option>({ options, selection, onChangeSelection, ...rest }: Props<O>): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useLayoutEffect, useRef, useState } from "react";
3
- import { Autocomplete } from "./Autocomplete";
4
- import { useEventCallback } from "../../hooks";
5
- import { getOptionLabel } from "./util";
3
+ import { Autocomplete } from "./Autocomplete.js";
4
+ import { useEventCallback } from "../../hooks/index.js";
5
+ import { getOptionLabel } from "./util.js";
6
6
  export function SimpleAutocomplete({ options, selection = null, onChangeSelection, ...rest }) {
7
7
  const onChangeSelectionStable = useEventCallback(onChangeSelection);
8
8
  const [searchValue, setSearchValue] = useState(selection ? getOptionLabel(selection) : "");
@@ -1,3 +1,3 @@
1
- import { Option } from "../select";
1
+ import { Option } from "../select/index.js";
2
2
  export declare const options: Option[];
3
3
  export declare const handleChangeSearchValue: (searchValue: string) => Promise<Option[]>;
@@ -1,6 +1,6 @@
1
- export { Autocomplete, type AutocompleteProps } from "./Autocomplete";
2
- export { SimpleAutocomplete } from "./SimpleAutocomplete";
3
- export { AutocompleteOption } from "./AutocompleteOption";
4
- export { LazyAutocomplete } from "./LazyAutocomplete";
5
- export { useAutocomplete } from "./useAutocompleteContext";
6
- export { getOptionValue, getOptionLabel } from "./util";
1
+ export { Autocomplete, type AutocompleteProps } from "./Autocomplete.js";
2
+ export { SimpleAutocomplete } from "./SimpleAutocomplete.js";
3
+ export { AutocompleteOption } from "./AutocompleteOption.js";
4
+ export { LazyAutocomplete } from "./LazyAutocomplete.js";
5
+ export { useAutocomplete } from "./useAutocompleteContext.js";
6
+ export { getOptionValue, getOptionLabel } from "./util.js";
@@ -1,6 +1,6 @@
1
- export { Autocomplete } from "./Autocomplete";
2
- export { SimpleAutocomplete } from "./SimpleAutocomplete";
3
- export { AutocompleteOption } from "./AutocompleteOption";
4
- export { LazyAutocomplete } from "./LazyAutocomplete";
5
- export { useAutocomplete } from "./useAutocompleteContext";
6
- export { getOptionValue, getOptionLabel } from "./util";
1
+ export { Autocomplete } from "./Autocomplete.js";
2
+ export { SimpleAutocomplete } from "./SimpleAutocomplete.js";
3
+ export { AutocompleteOption } from "./AutocompleteOption.js";
4
+ export { LazyAutocomplete } from "./LazyAutocomplete.js";
5
+ export { useAutocomplete } from "./useAutocompleteContext.js";
6
+ export { getOptionValue, getOptionLabel } from "./util.js";
@@ -1,5 +1,5 @@
1
1
  import { useInteractions } from "@floating-ui/react";
2
- import { OptionLike } from "../select";
2
+ import { OptionLike } from "../select/index.js";
3
3
  interface AutocompleteContext {
4
4
  activeIndex: number | null;
5
5
  selection: OptionLike | null;
@@ -1,3 +1,3 @@
1
- import { OptionLike } from "../select";
1
+ import { OptionLike } from "../select/index.js";
2
2
  export declare function getOptionLabel(option: OptionLike): string;
3
3
  export declare function getOptionValue(option: OptionLike): string | number;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from "react";
2
- import { ThemeColor } from "../../types";
2
+ import { ThemeColor } from "../../types.js";
3
3
  interface Props {
4
4
  children: ReactNode;
5
5
  className?: string;
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import clsx from "clsx";
3
- import { buttonVariants } from "../button/Button";
4
- import { Href } from "../href";
5
- import { Tooltip } from "../tooltip/Tooltip";
6
- import { TooltipContent } from "../tooltip/TooltipContent";
7
- import { TooltipTrigger } from "../tooltip/TooltipTrigger";
3
+ import { buttonVariants } from "../button/Button.js";
4
+ import { Href } from "../href/index.js";
5
+ import { Tooltip } from "../tooltip/Tooltip.js";
6
+ import { TooltipContent } from "../tooltip/TooltipContent.js";
7
+ import { TooltipTrigger } from "../tooltip/TooltipTrigger.js";
8
8
  export function Badge({ children, className, onRemove, onClick, tooltip, url, color = "yellow", }) {
9
9
  const badge = (_jsxs("span", { className: clsx("ll-badge", "inline-flex w-fit items-stretch overflow-hidden rounded-full text-xs shadow", buttonVariants.variant.contained(color),
10
10
  // badgeVariants.color[color],
@@ -1,4 +1,4 @@
1
- import { Badge } from ".";
1
+ import { Badge } from "./index.js";
2
2
  import { StoryObj } from "@storybook/react";
3
3
  declare const meta: {
4
4
  title: string;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Badge } from ".";
2
+ import { Badge } from "./index.js";
3
3
  import { action } from "@storybook/addon-actions";
4
4
  const onClickAction = action("onClick");
5
5
  const onRemoveAction = action("onRemove");
@@ -1 +1 @@
1
- export { Badge } from "./Badge";
1
+ export { Badge } from "./Badge.js";
@@ -1 +1 @@
1
- export { Badge } from "./Badge";
1
+ export { Badge } from "./Badge.js";
@@ -1,5 +1,5 @@
1
1
  import { ComponentPropsWithRef } from "react";
2
- import { ThemeColor } from "../../types";
2
+ import { ThemeColor } from "../../types.js";
3
3
  export interface ButtonProps extends ComponentPropsWithRef<"button"> {
4
4
  withRipple?: boolean;
5
5
  variant?: "contained" | "light" | "outlined" | "text" | "ghost";
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef, useImperativeHandle, useRef } from "react";
3
3
  import clsx from "clsx";
4
- import { Loader } from "../loader";
5
- import { useRipple } from "../../hooks";
4
+ import { Loader } from "../loader/index.js";
5
+ import { useRipple } from "../../hooks/index.js";
6
6
  export const buttonVariants = {
7
7
  size(icon, size) {
8
8
  if (size === "custom") {
@@ -2,7 +2,7 @@ import type { StoryObj, ReactRenderer } from "@storybook/react";
2
2
  import { PartialStoryFn } from "@storybook/types";
3
3
  declare const meta: {
4
4
  title: string;
5
- component: (props: import("./Button").ButtonProps & import("react").RefAttributes<HTMLButtonElement>) => React.ReactElement | null;
5
+ component: (props: import("./Button.js").ButtonProps & import("react").RefAttributes<HTMLButtonElement>) => React.ReactElement | null;
6
6
  argTypes: {
7
7
  variant: {
8
8
  control: {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Table, TableBody, TableCell, TableHeader, TableHeaderCell, TableRow } from "../table";
3
- import { Button } from "./Button";
2
+ import { Table, TableBody, TableCell, TableHeader, TableHeaderCell, TableRow } from "../table/index.js";
3
+ import { Button } from "./Button.js";
4
4
  const meta = {
5
5
  title: "Components/Button",
6
6
  component: Button,
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cleanup, fireEvent, render } from "@testing-library/react";
3
3
  import { describe, it, expect, vi, afterEach } from "vitest";
4
- import { Button } from "./Button";
4
+ import { Button } from "./Button.js";
5
5
  afterEach(cleanup);
6
6
  describe("<Button />", () => {
7
7
  it("forwards className", () => {
@@ -1,4 +1,4 @@
1
- import { ButtonGroup } from "./ButtonGroup";
1
+ import { ButtonGroup } from "./ButtonGroup.js";
2
2
  declare const meta: {
3
3
  title: string;
4
4
  component: typeof ButtonGroup;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
- import { Button } from "./Button";
4
- import { ButtonGroup } from "./ButtonGroup";
3
+ import { Button } from "./Button.js";
4
+ import { ButtonGroup } from "./ButtonGroup.js";
5
5
  const meta = {
6
6
  title: "Components/ButtonGroup",
7
7
  component: ButtonGroup,
@@ -1,5 +1,5 @@
1
1
  import { ComponentPropsWithRef } from "react";
2
- import { ThemeColor } from "../../types";
2
+ import { ThemeColor } from "../../types.js";
3
3
  export interface LinkButtonProps extends ComponentPropsWithRef<"a"> {
4
4
  href: string;
5
5
  withRipple?: boolean;
@@ -1,8 +1,8 @@
1
1
  import { jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef, useImperativeHandle, useRef } from "react";
3
3
  import clsx from "clsx";
4
- import { useRipple } from "../../hooks/useRipple";
5
- import { buttonVariants } from "./Button";
4
+ import { useRipple } from "../../hooks/useRipple.js";
5
+ import { buttonVariants } from "./Button.js";
6
6
  export const LinkButton = forwardRef(function LinkButton({ withRipple = true, variant = "contained", color = "yellow", size = "medium", focusable = true, fullWidth, className, children, selected = false, icon = false, href, ...props }, ref) {
7
7
  const anchorRef = useRef(null);
8
8
  useImperativeHandle(ref, () => anchorRef.current);
@@ -1,3 +1,3 @@
1
- export { Button, type ButtonProps, buttonVariants } from "./Button";
2
- export { ButtonGroup } from "./ButtonGroup";
3
- export { LinkButton } from "./LinkButton";
1
+ export { Button, type ButtonProps, buttonVariants } from "./Button.js";
2
+ export { ButtonGroup } from "./ButtonGroup.js";
3
+ export { LinkButton } from "./LinkButton.js";
@@ -1,3 +1,3 @@
1
- export { Button, buttonVariants } from "./Button";
2
- export { ButtonGroup } from "./ButtonGroup";
3
- export { LinkButton } from "./LinkButton";
1
+ export { Button, buttonVariants } from "./Button.js";
2
+ export { ButtonGroup } from "./ButtonGroup.js";
3
+ export { LinkButton } from "./LinkButton.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cardConfig } from "./config";
2
+ import { cardConfig } from "./config.js";
3
3
  const meta = {
4
4
  title: "Components/Card",
5
5
  };
@@ -1 +1 @@
1
- export { cardConfig } from "./config";
1
+ export { cardConfig } from "./config.js";
@@ -1 +1 @@
1
- export { cardConfig } from "./config";
1
+ export { cardConfig } from "./config.js";
@@ -1 +1 @@
1
- export { Code } from "./Code";
1
+ export { Code } from "./Code.js";
@@ -1 +1 @@
1
- export { Code } from "./Code";
1
+ export { Code } from "./Code.js";
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Children, cloneElement, isValidElement, useEffect, useRef, useState, } from "react";
3
3
  import { FloatingFocusManager, FloatingPortal, autoUpdate, flip, offset, shift, size, useDismiss, useFloating, useInteractions, useListNavigation, useRole, useTypeahead, } from "@floating-ui/react";
4
- import { Dialog } from "../dialog/Dialog";
5
- import { useEventCallback, useRefDebounce } from "../../hooks";
4
+ import { Dialog } from "../dialog/Dialog.js";
5
+ import { useEventCallback, useRefDebounce } from "../../hooks/index.js";
6
6
  export function ContextMenu({ targetRef, children, style, eventName = "contextmenu" }) {
7
7
  const [activeIndex, setActiveIndex] = useState(null);
8
8
  const [isOpen, setIsOpen] = useState(false);
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ContextMenu } from "./ContextMenu";
3
- import { ContextMenuItem } from "./ContextMenuItem";
2
+ import { ContextMenu } from "./ContextMenu.js";
3
+ import { ContextMenuItem } from "./ContextMenuItem.js";
4
4
  import { action } from "@storybook/addon-actions";
5
5
  const onChangeAction = action("onChange");
6
6
  const meta = {
@@ -1,2 +1,2 @@
1
- export { ContextMenu } from "./ContextMenu";
2
- export { ContextMenuItem, type ContextMenuItemMouseEvent } from "./ContextMenuItem";
1
+ export { ContextMenu } from "./ContextMenu.js";
2
+ export { ContextMenuItem, type ContextMenuItemMouseEvent } from "./ContextMenuItem.js";
@@ -1,2 +1,2 @@
1
- export { ContextMenu } from "./ContextMenu";
2
- export { ContextMenuItem } from "./ContextMenuItem";
1
+ export { ContextMenu } from "./ContextMenu.js";
2
+ export { ContextMenuItem } from "./ContextMenuItem.js";
@@ -1,6 +1,6 @@
1
1
  import { Placement } from "@floating-ui/react";
2
2
  import { ComponentProps, ReactNode } from "react";
3
- import type { ThemeColor } from "../../types";
3
+ import type { ThemeColor } from "../../types.js";
4
4
  interface Props extends ComponentProps<"div"> {
5
5
  color?: ThemeColor;
6
6
  placement?: Placement;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Dialog } from "./Dialog";
3
- import { Button } from "../button";
2
+ import { Dialog } from "./Dialog.js";
3
+ import { Button } from "../button/index.js";
4
4
  const meta = {
5
5
  title: "Components/Dialog",
6
6
  };
@@ -1 +1 @@
1
- export { Dialog, dialogVariants } from "./Dialog";
1
+ export { Dialog, dialogVariants } from "./Dialog.js";
@@ -1 +1 @@
1
- export { Dialog, dialogVariants } from "./Dialog";
1
+ export { Dialog, dialogVariants } from "./Dialog.js";
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from "react";
2
- import { DropdownMenuOptions } from "./interface";
2
+ import { DropdownMenuOptions } from "./interface.js";
3
3
  interface Props extends DropdownMenuOptions {
4
4
  children: ReactNode;
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { DropdownMenuContext } from "./useDropdownMenuContext";
3
- import { useDropdownMenu } from "./useDropdownMenu";
2
+ import { DropdownMenuContext } from "./useDropdownMenuContext.js";
3
+ import { useDropdownMenu } from "./useDropdownMenu.js";
4
4
  export function DropdownMenu({ children, ...options }) {
5
5
  const popover = useDropdownMenu(options);
6
6
  return _jsx(DropdownMenuContext.Provider, { value: popover, children: children });
@@ -1,4 +1,4 @@
1
- import { DropdownMenu } from ".";
1
+ import { DropdownMenu } from "./index.js";
2
2
  declare const meta: {
3
3
  title: string;
4
4
  component: typeof DropdownMenu;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from ".";
2
+ import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from "./index.js";
3
3
  const meta = {
4
4
  title: "Components/DropdownMenu",
5
5
  component: DropdownMenu,
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { useDropdownMenuContext } from "./useDropdownMenuContext";
3
+ import { useDropdownMenuContext } from "./useDropdownMenuContext.js";
4
4
  import { FloatingFocusManager, FloatingList, FloatingPortal, useMergeRefs, } from "@floating-ui/react";
5
5
  import clsx from "clsx";
6
- import { Dialog } from "../dialog";
6
+ import { Dialog } from "../dialog/index.js";
7
7
  export const DropdownMenuContent = forwardRef(({ style, children, ...props }, propRef) => {
8
8
  const context = useDropdownMenuContext();
9
9
  const floatingContext = context.context;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useListItem } from "@floating-ui/react";
3
3
  import clsx from "clsx";
4
- import { useDropdownMenuContext } from "./useDropdownMenuContext";
4
+ import { useDropdownMenuContext } from "./useDropdownMenuContext.js";
5
5
  export function DropdownMenuItem({ children, onClick, ...rest }) {
6
6
  const { activeIndex, getItemProps, handleSelect } = useDropdownMenuContext();
7
7
  const { ref, index } = useListItem({ label: children?.toString() });
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cloneElement, forwardRef, isValidElement } from "react";
3
- import { useDropdownMenuContext } from "./useDropdownMenuContext";
3
+ import { useDropdownMenuContext } from "./useDropdownMenuContext.js";
4
4
  import { useMergeRefs } from "@floating-ui/react";
5
- import { Button } from "../button";
5
+ import { Button } from "../button/index.js";
6
6
  export const DropdownMenuTrigger = forwardRef(({ children, asChild = false, ...props }, propRef) => {
7
7
  const context = useDropdownMenuContext();
8
8
  const childrenRef = children.ref;
@@ -1,7 +1,7 @@
1
- export { DropdownMenu } from "./DropdownMenu";
2
- export { DropdownMenuContent } from "./DropdownMenuContent";
3
- export { DropdownMenuTrigger } from "./DropdownMenuTrigger";
4
- export { useDropdownMenu } from "./useDropdownMenu";
5
- export { useDropdownMenuContext, DropdownMenuContext } from "./useDropdownMenuContext";
6
- export { DropdownMenuItem } from "./DropdownMenuItem";
7
- export type * from "./interface";
1
+ export { DropdownMenu } from "./DropdownMenu.js";
2
+ export { DropdownMenuContent } from "./DropdownMenuContent.js";
3
+ export { DropdownMenuTrigger } from "./DropdownMenuTrigger.js";
4
+ export { useDropdownMenu } from "./useDropdownMenu.js";
5
+ export { useDropdownMenuContext, DropdownMenuContext } from "./useDropdownMenuContext.js";
6
+ export { DropdownMenuItem } from "./DropdownMenuItem.js";
7
+ export type * from "./interface.js";
@@ -1,6 +1,6 @@
1
- export { DropdownMenu } from "./DropdownMenu";
2
- export { DropdownMenuContent } from "./DropdownMenuContent";
3
- export { DropdownMenuTrigger } from "./DropdownMenuTrigger";
4
- export { useDropdownMenu } from "./useDropdownMenu";
5
- export { useDropdownMenuContext, DropdownMenuContext } from "./useDropdownMenuContext";
6
- export { DropdownMenuItem } from "./DropdownMenuItem";
1
+ export { DropdownMenu } from "./DropdownMenu.js";
2
+ export { DropdownMenuContent } from "./DropdownMenuContent.js";
3
+ export { DropdownMenuTrigger } from "./DropdownMenuTrigger.js";
4
+ export { useDropdownMenu } from "./useDropdownMenu.js";
5
+ export { useDropdownMenuContext, DropdownMenuContext } from "./useDropdownMenuContext.js";
6
+ export { DropdownMenuItem } from "./DropdownMenuItem.js";
@@ -1,5 +1,5 @@
1
1
  import { Placement } from "@floating-ui/react";
2
- import { ThemeColor } from "../../types";
2
+ import { ThemeColor } from "../../types.js";
3
3
  export interface DropdownMenuOptions {
4
4
  initialOpen?: boolean;
5
5
  placement?: Placement;
@@ -1,8 +1,8 @@
1
- import type { DropdownMenuOptions } from "./interface";
1
+ import type { DropdownMenuOptions } from "./interface.js";
2
2
  export declare function useDropdownMenu({ initialOpen, placement, open: controlledOpen, onOpen: setControlledOpen, color, modal, }: DropdownMenuOptions): {
3
3
  elementsRef: import("react").MutableRefObject<(HTMLElement | null)[]>;
4
4
  labelsRef: import("react").MutableRefObject<(string | null)[]>;
5
- color: import("../..").ThemeColor | "default";
5
+ color: import("../../index.js").ThemeColor | "default";
6
6
  modal: boolean;
7
7
  activeIndex: number | null;
8
8
  handleSelect: () => void;
@@ -1,10 +1,10 @@
1
- import { useDropdownMenu } from "./useDropdownMenu";
1
+ import { useDropdownMenu } from "./useDropdownMenu.js";
2
2
  type ContextType = ReturnType<typeof useDropdownMenu> | null;
3
3
  export declare const DropdownMenuContext: import("react").Context<ContextType>;
4
4
  export declare function useDropdownMenuContext(): {
5
5
  elementsRef: import("react").MutableRefObject<(HTMLElement | null)[]>;
6
6
  labelsRef: import("react").MutableRefObject<(string | null)[]>;
7
- color: import("../..").ThemeColor | "default";
7
+ color: import("../../index.js").ThemeColor | "default";
8
8
  modal: boolean;
9
9
  activeIndex: number | null;
10
10
  handleSelect: () => void;
@@ -1,4 +1,4 @@
1
- import { Button, type ButtonProps } from "../button/Button";
1
+ import { Button, type ButtonProps } from "../button/Button.js";
2
2
  export interface Props extends ButtonProps {
3
3
  label: string;
4
4
  triggerComponent: typeof Button;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { MenuItemWithChildren } from "./MenuItemWithChildren";
3
+ import { MenuItemWithChildren } from "./MenuItemWithChildren.js";
4
4
  import { FloatingTree } from "@floating-ui/react";
5
5
  export const DropdownMenuNested = forwardRef((props, ref) => {
6
6
  return (_jsx(FloatingTree, { children: _jsx(MenuItemWithChildren, { ...props, ref: ref }) }));
@@ -1,6 +1,6 @@
1
1
  declare const meta: {
2
2
  title: string;
3
- component: (props: import("./DropdownMenuNested").Props & import("react").RefAttributes<HTMLButtonElement>) => React.ReactElement | null;
3
+ component: (props: import("./DropdownMenuNested.js").Props & import("react").RefAttributes<HTMLButtonElement>) => React.ReactElement | null;
4
4
  };
5
5
  export default meta;
6
6
  export declare const Basic: () => import("react/jsx-runtime").JSX.Element;