pentatrion-design 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/autocomplete/Autocomplete.d.ts +4 -3
- package/components/autocomplete/Autocomplete.js +10 -10
- package/components/autocomplete/AutocompleteOption.d.ts +1 -1
- package/components/autocomplete/AutocompleteOption.js +2 -2
- package/components/autocomplete/LazyAutocomplete.d.ts +3 -3
- package/components/autocomplete/LazyAutocomplete.js +3 -3
- package/components/autocomplete/SimpleAutocomplete.d.ts +3 -3
- package/components/autocomplete/SimpleAutocomplete.js +3 -3
- package/components/autocomplete/_fixtures.d.ts +1 -1
- package/components/autocomplete/index.d.ts +6 -6
- package/components/autocomplete/index.js +6 -6
- package/components/autocomplete/useAutocompleteContext.d.ts +1 -1
- package/components/autocomplete/util.d.ts +1 -1
- package/components/badge/Badge.d.ts +1 -1
- package/components/badge/Badge.js +5 -5
- package/components/badge/index.d.ts +1 -1
- package/components/badge/index.js +1 -1
- package/components/button/Button.d.ts +1 -1
- package/components/button/Button.js +2 -2
- package/components/button/Button.test.js +1 -1
- package/components/button/LinkButton.d.ts +1 -1
- package/components/button/LinkButton.js +2 -2
- package/components/button/index.d.ts +3 -3
- package/components/button/index.js +3 -3
- package/components/card/index.d.ts +1 -1
- package/components/card/index.js +1 -1
- package/components/code/index.d.ts +1 -1
- package/components/code/index.js +1 -1
- package/components/context-menu/ContextMenu.js +2 -2
- package/components/context-menu/index.d.ts +2 -2
- package/components/context-menu/index.js +2 -2
- package/components/dialog/Dialog.d.ts +1 -1
- package/components/dialog/index.d.ts +1 -1
- package/components/dialog/index.js +1 -1
- package/components/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/components/dropdown-menu/DropdownMenu.js +2 -2
- package/components/dropdown-menu/DropdownMenuContent.js +2 -2
- package/components/dropdown-menu/DropdownMenuItem.js +1 -1
- package/components/dropdown-menu/DropdownMenuTrigger.js +2 -2
- package/components/dropdown-menu/index.d.ts +7 -7
- package/components/dropdown-menu/index.js +6 -6
- package/components/dropdown-menu/interface.d.ts +1 -1
- package/components/dropdown-menu/useDropdownMenu.d.ts +2 -2
- package/components/dropdown-menu/useDropdownMenuContext.d.ts +2 -2
- package/components/dropdown-menu-nested/DropdownMenuNested.d.ts +1 -1
- package/components/dropdown-menu-nested/DropdownMenuNested.js +1 -1
- package/components/dropdown-menu-nested/MenuItem.js +1 -1
- package/components/dropdown-menu-nested/MenuItemWithChildren.d.ts +1 -1
- package/components/dropdown-menu-nested/MenuItemWithChildren.js +3 -3
- package/components/dropdown-menu-nested/index.d.ts +3 -3
- package/components/dropdown-menu-nested/index.js +3 -3
- package/components/flash/Flash.d.ts +1 -1
- package/components/flash/Flash.js +1 -1
- package/components/flash/index.d.ts +1 -1
- package/components/flash/index.js +1 -1
- package/components/highlight/index.d.ts +1 -1
- package/components/highlight/index.js +1 -1
- package/components/href/index.d.ts +1 -1
- package/components/href/index.js +1 -1
- package/components/input/Checkbox.d.ts +1 -1
- package/components/input/Checkbox.js +1 -1
- package/components/input/Color.d.ts +1 -1
- package/components/input/Color.js +1 -1
- package/components/input/Input.d.ts +1 -1
- package/components/input/Input.test.js +1 -1
- package/components/input/RadioGroup.d.ts +1 -1
- package/components/input/RadioGroup.js +1 -1
- package/components/input/Range.d.ts +1 -1
- package/components/input/Toggle.d.ts +1 -1
- package/components/input/Toggle.js +1 -1
- package/components/input/index.d.ts +6 -6
- package/components/input/index.js +6 -6
- package/components/input-field/InputField.d.ts +1 -1
- package/components/input-field/InputField.js +1 -1
- package/components/input-field/index.d.ts +1 -1
- package/components/input-field/index.js +1 -1
- package/components/loader/Loader.d.ts +1 -1
- package/components/loader/Loader.js +1 -1
- package/components/loader/index.d.ts +1 -1
- package/components/loader/index.js +1 -1
- package/components/modal/Components.js +3 -3
- package/components/modal/Modal.d.ts +1 -1
- package/components/modal/Modal.js +2 -2
- package/components/modal/ModalContent.js +2 -2
- package/components/modal/ModalTrigger.js +2 -2
- package/components/modal/index.d.ts +7 -7
- package/components/modal/index.js +6 -6
- package/components/modal/interface.d.ts +1 -1
- package/components/modal/useModal.d.ts +2 -2
- package/components/modal/useModalContext.d.ts +2 -2
- package/components/notification/NotificationsContext.d.ts +1 -1
- package/components/notification/NotificationsContext.js +1 -1
- package/components/notification/NotificationsProvider.js +2 -2
- package/components/notification/index.d.ts +4 -4
- package/components/notification/index.js +4 -4
- package/components/notification/useContextNotifications.d.ts +1 -1
- package/components/notification/useContextNotifications.js +1 -1
- package/components/notification/useFetch.d.ts +1 -1
- package/components/notification/useFetch.js +2 -2
- package/components/popover/Components.js +2 -2
- package/components/popover/Popover.d.ts +1 -1
- package/components/popover/Popover.js +1 -1
- package/components/popover/Popover.test.js +1 -1
- package/components/popover/PopoverContent.js +3 -3
- package/components/popover/PopoverTrigger.js +2 -2
- package/components/popover/index.d.ts +7 -7
- package/components/popover/index.js +6 -6
- package/components/popover/interface.d.ts +1 -1
- package/components/popover/usePopover.d.ts +2 -2
- package/components/popover/usePopoverContext.d.ts +2 -2
- package/components/portal/index.d.ts +1 -1
- package/components/portal/index.js +1 -1
- package/components/resize-area/index.d.ts +1 -1
- package/components/resize-area/index.js +1 -1
- package/components/scroll/index.d.ts +1 -1
- package/components/scroll/index.js +1 -1
- package/components/select/Select.d.ts +2 -2
- package/components/select/Select.js +6 -6
- package/components/select/Select.test.js +1 -1
- package/components/select/SelectOption.d.ts +1 -1
- package/components/select/SelectOption.js +1 -1
- package/components/select/SelectSelection.d.ts +1 -1
- package/components/select/SelectSelection.js +1 -1
- package/components/select/_fixtures.d.ts +1 -1
- package/components/select/_fixtures.js +1 -1
- package/components/select/index.d.ts +5 -5
- package/components/select/index.js +4 -4
- package/components/snack/Snack.d.ts +1 -1
- package/components/snack/Snack.js +4 -4
- package/components/snack/index.d.ts +1 -1
- package/components/snack/index.js +1 -1
- package/components/sortable/Sortable.js +1 -1
- package/components/sortable/index.d.ts +2 -2
- package/components/sortable/index.js +1 -1
- package/components/steps/index.d.ts +2 -2
- package/components/steps/index.js +2 -2
- package/components/table/index.d.ts +7 -7
- package/components/table/index.js +7 -7
- package/components/tabs/index.d.ts +1 -1
- package/components/tabs/index.js +1 -1
- package/components/textarea/Textarea.d.ts +1 -1
- package/components/textarea/index.d.ts +1 -1
- package/components/textarea/index.js +1 -1
- package/components/tooltip/SimpleTooltip.d.ts +1 -1
- package/components/tooltip/SimpleTooltip.js +3 -3
- package/components/tooltip/Tooltip.d.ts +1 -1
- package/components/tooltip/Tooltip.js +2 -2
- package/components/tooltip/Tooltip.test.js +1 -1
- package/components/tooltip/TooltipContent.js +3 -3
- package/components/tooltip/TooltipTrigger.js +1 -1
- package/components/tooltip/index.d.ts +6 -6
- package/components/tooltip/index.js +6 -6
- package/components/tooltip/interface.d.ts +1 -1
- package/components/tooltip/useTooltip.d.ts +2 -2
- package/components/tooltip/useTooltipContext.d.ts +2 -2
- package/hooks/index.d.ts +11 -11
- package/hooks/index.js +11 -11
- package/hooks/useCombinedRefs.test.js +1 -1
- package/hooks/useEventListener.js +1 -1
- package/hooks/useOnClickOutside.js +1 -1
- package/hooks/useRipple.js +1 -1
- package/hooks/useRipple.test.js +1 -1
- package/index.d.ts +33 -33
- package/index.js +32 -32
- package/lib/error.d.ts +1 -1
- package/lib/fetch.test.js +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.js +4 -4
- package/lib/tailwindVariants.d.ts +1 -1
- package/package.json +2 -1
- package/redux/index.d.ts +1 -1
- package/redux/index.js +1 -1
- package/redux/notification/NotificationConsumer.js +2 -2
- package/redux/notification/errorCatcherMiddleware.js +4 -4
- package/redux/notification/index.d.ts +5 -5
- package/redux/notification/index.js +5 -5
- package/redux/notification/notificationSlice.d.ts +3 -3
- package/redux/notification/notificationSlice.js +1 -1
- package/redux/notification/useReduxNotifications.d.ts +1 -1
- package/redux/notification/useReduxNotifications.js +2 -2
- package/tailwind/index.d.ts +2 -2
- package/tailwind/index.js +2 -2
- package/tailwind/pentatrionTw.js +5 -5
- package/.storybook/fontello/config.json +0 -966
- package/components/autocomplete/Autocomplete.stories.d.ts +0 -11
- package/components/autocomplete/Autocomplete.stories.js +0 -55
- package/components/badge/Badge.stories.d.ts +0 -18
- package/components/badge/Badge.stories.js +0 -29
- package/components/button/Button.stories.d.ts +0 -34
- package/components/button/Button.stories.js +0 -52
- package/components/button/ButtonGroup.stories.d.ts +0 -7
- package/components/button/ButtonGroup.stories.js +0 -17
- package/components/card/Card.stories.d.ts +0 -6
- package/components/card/Card.stories.js +0 -12
- package/components/color/ColorPalette.d.ts +0 -1
- package/components/color/ColorPalette.js +0 -4
- package/components/color/utils.d.ts +0 -292
- package/components/color/utils.js +0 -293
- package/components/context-menu/ContextMenu.stories.d.ts +0 -5
- package/components/context-menu/ContextMenu.stories.js +0 -12
- package/components/dialog/Dialog.stories.d.ts +0 -6
- package/components/dialog/Dialog.stories.js +0 -13
- package/components/dropdown-menu/DropdownMenu.stories.d.ts +0 -7
- package/components/dropdown-menu/DropdownMenu.stories.js +0 -8
- package/components/dropdown-menu-nested/DropdownMenuNested.stories.d.ts +0 -6
- package/components/dropdown-menu-nested/DropdownMenuNested.stories.js +0 -11
- package/components/flash/Flash.stories.d.ts +0 -10
- package/components/flash/Flash.stories.js +0 -16
- package/components/highlight/Highlight.stories.d.ts +0 -8
- package/components/highlight/Highlight.stories.js +0 -45
- package/components/href/Href.stories.d.ts +0 -9
- package/components/href/Href.stories.js +0 -15
- package/components/input/Checkbox.stories.d.ts +0 -8
- package/components/input/Checkbox.stories.js +0 -30
- package/components/input/Color.stories.d.ts +0 -6
- package/components/input/Color.stories.js +0 -10
- package/components/input/Input.stories.d.ts +0 -17
- package/components/input/Input.stories.js +0 -31
- package/components/input/RadioGroup.stories.d.ts +0 -7
- package/components/input/RadioGroup.stories.js +0 -26
- package/components/input/Range.stories.d.ts +0 -6
- package/components/input/Range.stories.js +0 -16
- package/components/input/Toggle.stories.d.ts +0 -7
- package/components/input/Toggle.stories.js +0 -13
- package/components/input-field/InputField.stories.d.ts +0 -7
- package/components/input-field/InputField.stories.js +0 -46
- package/components/loader/Loader.stories.d.ts +0 -18
- package/components/loader/Loader.stories.js +0 -22
- package/components/modal/Modal.stories.d.ts +0 -13
- package/components/modal/Modal.stories.js +0 -64
- package/components/notification/Notification.stories.d.ts +0 -10
- package/components/notification/Notification.stories.js +0 -37
- package/components/popover/Popover.stories.d.ts +0 -10
- package/components/popover/Popover.stories.js +0 -22
- package/components/quick-settings/QuickSettings.stories.d.ts +0 -8
- package/components/quick-settings/QuickSettings.stories.js +0 -33
- package/components/resize-area/ResizeArea.stories.d.ts +0 -11
- package/components/resize-area/ResizeArea.stories.js +0 -14
- package/components/scroll/Scroll.stories.d.ts +0 -7
- package/components/scroll/Scroll.stories.js +0 -9
- package/components/select/Select.stories.d.ts +0 -47
- package/components/select/Select.stories.js +0 -77
- package/components/snack/Snack.stories.d.ts +0 -7
- package/components/snack/Snack.stories.js +0 -10
- package/components/sortable/Sortable.stories.d.ts +0 -18
- package/components/sortable/Sortable.stories.js +0 -52
- package/components/steps/Steps.stories.d.ts +0 -8
- package/components/steps/Steps.stories.js +0 -40
- package/components/steps/util.d.ts +0 -1
- package/components/steps/util.js +0 -3
- package/components/table/Table.stories.d.ts +0 -5
- package/components/table/Table.stories.js +0 -13
- package/components/tabs/Tabs.stories.d.ts +0 -7
- package/components/tabs/Tabs.stories.js +0 -29
- package/components/textarea/Textarea.stories.d.ts +0 -9
- package/components/textarea/Textarea.stories.js +0 -11
- package/components/tooltip/Tooltip.stories.d.ts +0 -8
- package/components/tooltip/Tooltip.stories.js +0 -28
- package/styles/Animation.stories.d.ts +0 -6
- package/styles/Animation.stories.js +0 -21
- package/styles/Icons.stories.d.ts +0 -5
- package/styles/Icons.stories.js +0 -17
- package/styles/Shadow.stories.d.ts +0 -5
- package/styles/Shadow.stories.js +0 -27
- package/styles/Themes.stories.d.ts +0 -5
- package/styles/Themes.stories.js +0 -8
- package/styles/Typography.stories.d.ts +0 -7
- package/styles/Typography.stories.js +0 -25
- package/tsup.config.d.ts +0 -2
- package/tsup.config.js +0 -25
- package/vite.config.d.ts +0 -2
- package/vite.config.js +0 -21
- package/vitest-setup.d.ts +0 -1
- package/vitest-setup.js +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
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
|
+
autoFocus?: boolean;
|
|
8
9
|
icon?: boolean | ReactNode;
|
|
9
10
|
color?: ThemeColor;
|
|
10
11
|
/**
|
|
@@ -1,17 +1,17 @@
|
|
|
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";
|
|
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) {
|
|
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
|
+
export const Autocomplete = forwardRef(function Autocomplete({ className, autoFocus = false, 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);
|
|
17
17
|
const onChangeSearchValueStable = useEventCallback(onChangeSearchValue);
|
|
@@ -95,7 +95,7 @@ export const Autocomplete = forwardRef(function Autocomplete({ className, icon =
|
|
|
95
95
|
handleSelect,
|
|
96
96
|
}), [activeIndex, selection, getItemProps, handleSelect]);
|
|
97
97
|
const showClearSearchButton = clearSearchButton && (searchValue.trim() !== "" || selection !== null);
|
|
98
|
-
return (_jsxs("div", { className: className, children: [_jsxs("div", { className: clsx(inputConfig.container, readOnly && "readonly"), ref: refs.setReference, "data-color": color, children: [icon !== false && (_jsxs("div", { className: "relative flex-center", children: [loading && _jsx(Loader, { size: "medium", color: "gray", className: "absolute left-0 top-0" }), icon === true ? (_jsx("span", { className: "h-8 w-8 flex-center", children: _jsx("i", { className: "fe-search" }) })) : (icon)] })), _jsx("input", { spellCheck: "false", className: clsx(inputConfig.input, icon === false && "pl-4"), ref: inputRef, type: "search", readOnly: readOnly, value: searchValue, placeholder: placeholder, "aria-autocomplete": "list", ...getReferenceProps({
|
|
98
|
+
return (_jsxs("div", { className: className, children: [_jsxs("div", { className: clsx(inputConfig.container, readOnly && "readonly"), ref: refs.setReference, "data-color": color, children: [icon !== false && (_jsxs("div", { className: "relative flex-center", children: [loading && _jsx(Loader, { size: "medium", color: "gray", className: "absolute left-0 top-0" }), icon === true ? (_jsx("span", { className: "h-8 w-8 flex-center", children: _jsx("i", { className: "fe-search" }) })) : (icon)] })), _jsx("input", { autoFocus: autoFocus, spellCheck: "false", className: clsx(inputConfig.input, icon === false && "pl-4"), ref: inputRef, type: "search", readOnly: readOnly, value: searchValue, placeholder: placeholder, "aria-autocomplete": "list", ...getReferenceProps({
|
|
99
99
|
onClick() {
|
|
100
100
|
if (selectOnFocus) {
|
|
101
101
|
// it's better to listen onClick instead of onFocus. the event is triggered later and there
|
|
@@ -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,6 +1,6 @@
|
|
|
1
|
-
import { AutocompleteProps } from "./Autocomplete";
|
|
2
|
-
import { OptionLike, Option } from "../select";
|
|
3
|
-
interface Props<O extends OptionLike = Option> extends Pick<AutocompleteProps<O>, "className" | "icon" | "color" | "suffix" | "noSearchSuffix" | "placement" | "placeholder" | "selection" | "onChangeSelection" | "autocompleteOptionComponent" | "loading" | "clearSearchButton" | "readOnly"> {
|
|
1
|
+
import { AutocompleteProps } from "./Autocomplete.js";
|
|
2
|
+
import { OptionLike, Option } from "../select/index.js";
|
|
3
|
+
interface Props<O extends OptionLike = Option> extends Pick<AutocompleteProps<O>, "autoFocus" | "className" | "icon" | "color" | "suffix" | "noSearchSuffix" | "placement" | "placeholder" | "selection" | "onChangeSelection" | "autocompleteOptionComponent" | "loading" | "clearSearchButton" | "readOnly"> {
|
|
4
4
|
onChangeSearchValueCallback: (searchValue: string) => Promise<O[]>;
|
|
5
5
|
debounce?: number;
|
|
6
6
|
}
|
|
@@ -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,6 +1,6 @@
|
|
|
1
|
-
import { AutocompleteProps } from "./Autocomplete";
|
|
2
|
-
import { Option, OptionLike } from "../select";
|
|
3
|
-
interface Props<O extends OptionLike = Option> extends Pick<AutocompleteProps<O>, "className" | "icon" | "color" | "suffix" | "noSearchSuffix" | "placement" | "placeholder" | "selection" | "onChangeSelection" | "autocompleteOptionComponent" | "options" | "selection" | "readOnly"> {
|
|
1
|
+
import { AutocompleteProps } from "./Autocomplete.js";
|
|
2
|
+
import { Option, OptionLike } from "../select/index.js";
|
|
3
|
+
interface Props<O extends OptionLike = Option> extends Pick<AutocompleteProps<O>, "autoFocus" | "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;
|
|
6
6
|
export {};
|
|
@@ -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,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,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 +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") {
|
|
@@ -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,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 +1 @@
|
|
|
1
|
-
export { cardConfig } from "./config";
|
|
1
|
+
export { cardConfig } from "./config.js";
|
package/components/card/index.js
CHANGED
|
@@ -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";
|
package/components/code/index.js
CHANGED
|
@@ -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,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 +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,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,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,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("
|
|
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("
|
|
7
|
+
color: import("../../index.js").ThemeColor | "default";
|
|
8
8
|
modal: boolean;
|
|
9
9
|
activeIndex: number | null;
|
|
10
10
|
handleSelect: () => void;
|
|
@@ -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,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useFloatingTree, useListItem, useMergeRefs } from "@floating-ui/react";
|
|
3
3
|
import { forwardRef, useContext } from "react";
|
|
4
|
-
import { MenuContext } from "./MenuContext";
|
|
4
|
+
import { MenuContext } from "./MenuContext.js";
|
|
5
5
|
export const MenuItem = forwardRef(({ label, disabled, ...props }, forwardedRef) => {
|
|
6
6
|
const menu = useContext(MenuContext);
|
|
7
7
|
const item = useListItem({ label: disabled ? null : label });
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { FloatingFocusManager, FloatingList, FloatingNode, FloatingPortal, autoUpdate, flip, offset, safePolygon, shift, useClick, useDismiss, useFloating, useFloatingNodeId, useFloatingParentNodeId, useFloatingTree, useHover, useInteractions, useListItem, useListNavigation, useMergeRefs, useRole, useTypeahead, } from "@floating-ui/react";
|
|
3
3
|
import { forwardRef, useContext, useEffect, useRef, useState } from "react";
|
|
4
|
-
import { MenuContext } from "./MenuContext";
|
|
4
|
+
import { MenuContext } from "./MenuContext.js";
|
|
5
5
|
import clsx from "clsx";
|
|
6
|
-
import { Button } from "../button/Button";
|
|
7
|
-
import { Dialog } from "../dialog/Dialog";
|
|
6
|
+
import { Button } from "../button/Button.js";
|
|
7
|
+
import { Dialog } from "../dialog/Dialog.js";
|
|
8
8
|
export const MenuItemWithChildren = forwardRef(({ children, label, triggerComponent: TriggerComponent = Button, ...props }, forwardedRef) => {
|
|
9
9
|
const [isOpen, setIsOpen] = useState(false);
|
|
10
10
|
const [hasFocusInside, setHasFocusInside] = useState(false);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { DropdownMenuNested } from "./DropdownMenuNested";
|
|
2
|
-
export { MenuItem } from "./MenuItem";
|
|
3
|
-
export { MenuItemWithChildren } from "./MenuItemWithChildren";
|
|
1
|
+
export { DropdownMenuNested } from "./DropdownMenuNested.js";
|
|
2
|
+
export { MenuItem } from "./MenuItem.js";
|
|
3
|
+
export { MenuItemWithChildren } from "./MenuItemWithChildren.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { DropdownMenuNested } from "./DropdownMenuNested";
|
|
2
|
-
export { MenuItem } from "./MenuItem";
|
|
3
|
-
export { MenuItemWithChildren } from "./MenuItemWithChildren";
|
|
1
|
+
export { DropdownMenuNested } from "./DropdownMenuNested.js";
|
|
2
|
+
export { MenuItem } from "./MenuItem.js";
|
|
3
|
+
export { MenuItemWithChildren } from "./MenuItemWithChildren.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from "clsx";
|
|
3
|
-
import { colorVariants } from "../../lib/tailwindVariants";
|
|
3
|
+
import { colorVariants } from "../../lib/tailwindVariants.js";
|
|
4
4
|
export function Flash({ color = "yellow", children, className }) {
|
|
5
5
|
return (_jsx("div", { className: clsx("border-l-4 bg-gray-0 p-2 shadow dark:shadow-dark [&_p]:m-0", colorVariants[color].border, className), children: children }));
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Flash } from "./Flash";
|
|
1
|
+
export { Flash } from "./Flash.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Flash } from "./Flash";
|
|
1
|
+
export { Flash } from "./Flash.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Highlight } from "./Highlight";
|
|
1
|
+
export { Highlight } from "./Highlight.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Highlight } from "./Highlight";
|
|
1
|
+
export { Highlight } from "./Highlight.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Href } from "./Href";
|
|
1
|
+
export { Href } from "./Href.js";
|
package/components/href/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Href } from "./Href";
|
|
1
|
+
export { Href } from "./Href.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef } from "react";
|
|
2
|
-
import { type ThemeColor } from "../../types";
|
|
2
|
+
import { type ThemeColor } from "../../types.js";
|
|
3
3
|
export interface CheckboxProps extends ComponentPropsWithRef<"input"> {
|
|
4
4
|
indeterminate?: boolean;
|
|
5
5
|
disabled?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useRef } from "react";
|
|
3
|
-
import { useCombinedRefs } from "../../hooks";
|
|
3
|
+
import { useCombinedRefs } from "../../hooks/index.js";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
export const Checkbox = forwardRef(function Checkbox({ color = "yellow", indeterminate, disabled = false, checked, className, children, ...rest }, ref) {
|
|
6
6
|
const inputRef = useRef(null);
|