luan-ui 0.8.1 → 0.8.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/dist/components/accordion/accordion.js +2 -2
- package/dist/components/alert/alert.d.ts +1 -1
- package/dist/components/alert/alert.js +1 -1
- package/dist/components/alert-dialog/alert-dialog.js +1 -1
- package/dist/components/autocomplete/autocomplete.js +3 -3
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/badge/badge.js +1 -1
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/card/card.js +1 -1
- package/dist/components/checkbox/checkbox.d.ts +1 -1
- package/dist/components/checkbox/checkbox.js +3 -3
- package/dist/components/combobox/combobox.js +3 -3
- package/dist/components/dialog/dialog.js +1 -1
- package/dist/components/drawer/drawer.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.js +1 -1
- package/dist/components/form-field/form-field.js +4 -4
- package/dist/components/form-helper/form-helper.js +2 -2
- package/dist/components/icon/icon.d.ts +1 -1
- package/dist/components/icon/icon.js +1 -1
- package/dist/components/input/input.js +2 -2
- package/dist/components/label/label.js +2 -2
- package/dist/components/pagination/pagination.js +4 -4
- package/dist/components/popover/popover.js +2 -2
- package/dist/components/progress/progress.js +1 -1
- package/dist/components/radio-group/radio-group.js +2 -2
- package/dist/components/select/select.js +3 -3
- package/dist/components/skeleton/skeleton.js +1 -1
- package/dist/components/slider/slider.d.ts +7 -1
- package/dist/components/slider/slider.js +11 -7
- package/dist/components/slider/slider.js.map +1 -1
- package/dist/components/switch/switch.d.ts +1 -1
- package/dist/components/switch/switch.js +2 -2
- package/dist/components/table/table.js +2 -2
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/text-area/text-area.js +1 -1
- package/dist/components/toast/toast.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/index.d.ts +48 -48
- package/dist/index.js +29 -29
- package/dist/utilities/pagination/get-truncated-elements.js +1 -1
- package/dist/utilities/responsive/responsive.js +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Accordion as BaseAccordion } from "@base-ui/react/accordion";
|
|
3
|
-
import { Icon } from "../icon/icon";
|
|
3
|
+
import { Icon } from "../icon/icon.js";
|
|
4
4
|
import { ChevronDownIcon } from "@radix-ui/react-icons";
|
|
5
|
-
import { cn } from "../../utilities/cn/cn";
|
|
5
|
+
import { cn } from "../../utilities/cn/cn.js";
|
|
6
6
|
const Accordion = BaseAccordion.Root;
|
|
7
7
|
function AccordionItem({ className, ref, ...props }) {
|
|
8
8
|
return (_jsx(BaseAccordion.Item, { ref: ref, className: cn("border-border border-b", className), ...props }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
-
import type { ResponsiveValue } from "../../utilities/responsive/responsive";
|
|
2
|
+
import type { ResponsiveValue } from "../../utilities/responsive/responsive.js";
|
|
3
3
|
type AlertProps = useRender.ComponentProps<"div"> & {
|
|
4
4
|
variant?: "primary" | "secondary" | "error";
|
|
5
5
|
size?: ResponsiveValue<"small" | "medium">;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
-
import { getVariants } from "../../utilities/responsive/responsive";
|
|
4
|
+
import { getVariants } from "../../utilities/responsive/responsive.js";
|
|
5
5
|
import { createContext, useContext } from "react";
|
|
6
6
|
const AlertContext = createContext(undefined);
|
|
7
7
|
const useAlertContext = () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { AlertDialog as BaseAlertDialog } from "@base-ui/react/alert-dialog";
|
|
3
|
-
import { cn } from "../../utilities/cn/cn";
|
|
3
|
+
import { cn } from "../../utilities/cn/cn.js";
|
|
4
4
|
const AlertDialog = BaseAlertDialog.Root;
|
|
5
5
|
const AlertDialogTrigger = BaseAlertDialog.Trigger;
|
|
6
6
|
const AlertDialogPortal = BaseAlertDialog.Portal;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Autocomplete as AutocompletePrimitive } from "@base-ui/react/autocomplete";
|
|
3
|
-
import { useFormContext } from "../form-field/form-field-context";
|
|
4
|
-
import { Icon } from "../icon/icon";
|
|
3
|
+
import { useFormContext } from "../form-field/form-field-context.js";
|
|
4
|
+
import { Icon } from "../icon/icon.js";
|
|
5
5
|
import { ChevronDownIcon, Cross2Icon } from "@radix-ui/react-icons";
|
|
6
|
-
import { cn } from "../../utilities/cn/cn";
|
|
6
|
+
import { cn } from "../../utilities/cn/cn.js";
|
|
7
7
|
function Autocomplete(props) {
|
|
8
8
|
const { disabled, required } = useFormContext({
|
|
9
9
|
disabled: props.disabled,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar";
|
|
3
|
-
import { cn } from "../../utilities/cn/cn";
|
|
3
|
+
import { cn } from "../../utilities/cn/cn.js";
|
|
4
4
|
function Avatar({ className, ref, ...props }) {
|
|
5
5
|
return (_jsx(AvatarPrimitive.Root, { ref: ref, className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full border-2 border-surface", className), ...props }));
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
-
import type { ResponsiveValue } from "../../utilities/responsive/responsive";
|
|
2
|
+
import type { ResponsiveValue } from "../../utilities/responsive/responsive.js";
|
|
3
3
|
import type { ComponentProps } from "react";
|
|
4
4
|
/**
|
|
5
5
|
* Props for the Badge component
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
-
import { getVariants } from "../../utilities/responsive/responsive";
|
|
3
|
+
import { getVariants } from "../../utilities/responsive/responsive.js";
|
|
4
4
|
const badgeStyles = getVariants({
|
|
5
5
|
base: "flex w-fit items-center justify-center rounded-full font-medium",
|
|
6
6
|
variants: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
-
import type { ResponsiveValue } from "../../utilities/responsive/responsive";
|
|
2
|
+
import type { ResponsiveValue } from "../../utilities/responsive/responsive.js";
|
|
3
3
|
export type ButtonProps = useRender.ComponentProps<"button"> & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className"> & {
|
|
4
4
|
variant?: "primary" | "secondary" | "destructive";
|
|
5
5
|
size?: ResponsiveValue<"small" | "medium" | "large">;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
-
import { getVariants } from "../../utilities/responsive/responsive";
|
|
3
|
+
import { getVariants } from "../../utilities/responsive/responsive.js";
|
|
4
4
|
export const SIZES = {
|
|
5
5
|
sm: {
|
|
6
6
|
small: "sm:text-sm sm:px-2 sm:py-1 sm:gap-2",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
-
import { getVariants } from "../../utilities/responsive/responsive";
|
|
4
|
+
import { getVariants } from "../../utilities/responsive/responsive.js";
|
|
5
5
|
import { createContext, useContext } from "react";
|
|
6
6
|
const CardContext = createContext(undefined);
|
|
7
7
|
const useCardContext = () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
2
|
-
import { type ResponsiveValue } from "../../utilities/responsive/responsive";
|
|
2
|
+
import { type ResponsiveValue } from "../../utilities/responsive/responsive.js";
|
|
3
3
|
import type { ComponentProps } from "react";
|
|
4
4
|
export type CheckboxProps = Omit<ComponentProps<typeof CheckboxPrimitive.Root>, "className"> & {
|
|
5
5
|
size?: ResponsiveValue<"small" | "medium" | "large">;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
3
|
-
import { useFormContext } from "../form-field/form-field-context";
|
|
4
|
-
import { Icon } from "../icon/icon";
|
|
3
|
+
import { useFormContext } from "../form-field/form-field-context.js";
|
|
4
|
+
import { Icon } from "../icon/icon.js";
|
|
5
5
|
import { CheckIcon } from "@radix-ui/react-icons";
|
|
6
|
-
import { getVariants, mapResponsiveValue, } from "../../utilities/responsive/responsive";
|
|
6
|
+
import { getVariants, mapResponsiveValue, } from "../../utilities/responsive/responsive.js";
|
|
7
7
|
export const SIZES = {
|
|
8
8
|
sm: {
|
|
9
9
|
small: "sm:h-4 sm:w-4",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Combobox as ComboboxPrimitive } from "@base-ui/react/combobox";
|
|
3
|
-
import { useFormContext } from "../form-field/form-field-context";
|
|
4
|
-
import { Icon } from "../icon/icon";
|
|
3
|
+
import { useFormContext } from "../form-field/form-field-context.js";
|
|
4
|
+
import { Icon } from "../icon/icon.js";
|
|
5
5
|
import { CheckIcon, ChevronDownIcon, Cross2Icon } from "@radix-ui/react-icons";
|
|
6
|
-
import { cn } from "../../utilities/cn/cn";
|
|
6
|
+
import { cn } from "../../utilities/cn/cn.js";
|
|
7
7
|
function Combobox({ disabled: initialDisabled, required: initialRequired, ...props }) {
|
|
8
8
|
const { disabled, required } = useFormContext({
|
|
9
9
|
disabled: initialDisabled,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Dialog as BaseDialog } from "@base-ui/react/dialog";
|
|
3
3
|
import { Cross1Icon } from "@radix-ui/react-icons";
|
|
4
|
-
import { cn } from "../../utilities/cn/cn";
|
|
4
|
+
import { cn } from "../../utilities/cn/cn.js";
|
|
5
5
|
const Dialog = BaseDialog.Root;
|
|
6
6
|
const DialogTrigger = BaseDialog.Trigger;
|
|
7
7
|
const DialogClose = BaseDialog.Close;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Drawer as BaseDrawer } from "@base-ui/react/drawer";
|
|
3
3
|
import { Cross1Icon } from "@radix-ui/react-icons";
|
|
4
|
-
import { cn } from "../../utilities/cn/cn";
|
|
4
|
+
import { cn } from "../../utilities/cn/cn.js";
|
|
5
5
|
const SIDE_TO_SWIPE_DIRECTION = {
|
|
6
6
|
left: "left",
|
|
7
7
|
right: "right",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Menu } from "@base-ui/react/menu";
|
|
3
3
|
import { CheckIcon, ChevronRightIcon, CircleIcon } from "@radix-ui/react-icons";
|
|
4
|
-
import { cn } from "../../utilities/cn/cn";
|
|
4
|
+
import { cn } from "../../utilities/cn/cn.js";
|
|
5
5
|
const DropdownMenu = Menu.Root;
|
|
6
6
|
function DropdownMenuTrigger({ className, ref, ...props }) {
|
|
7
7
|
return _jsx(Menu.Trigger, { ref: ref, className: className, ...props });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as _jsxs, Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { FormHelper } from "../form-helper/form-helper";
|
|
3
|
-
import { Label } from "../label/label";
|
|
4
|
-
import { getVariants } from "../../utilities/responsive/responsive";
|
|
2
|
+
import { FormHelper } from "../form-helper/form-helper.js";
|
|
3
|
+
import { Label } from "../label/label.js";
|
|
4
|
+
import { getVariants } from "../../utilities/responsive/responsive.js";
|
|
5
5
|
import { Children, isValidElement } from "react";
|
|
6
|
-
import { FormFieldProvider } from "./form-field-context";
|
|
6
|
+
import { FormFieldProvider } from "./form-field-context.js";
|
|
7
7
|
const formFieldStyles = getVariants({
|
|
8
8
|
base: "flex gap-2",
|
|
9
9
|
variants: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useFormContext } from "../form-field/form-field-context";
|
|
3
|
-
import { getVariants } from "../../utilities/responsive/responsive";
|
|
2
|
+
import { useFormContext } from "../form-field/form-field-context.js";
|
|
3
|
+
import { getVariants } from "../../utilities/responsive/responsive.js";
|
|
4
4
|
const formHelperStyles = getVariants({
|
|
5
5
|
base: "text-sm text-text-muted",
|
|
6
6
|
variants: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
-
import type { ResponsiveValue } from "../../utilities/responsive/responsive";
|
|
2
|
+
import type { ResponsiveValue } from "../../utilities/responsive/responsive.js";
|
|
3
3
|
export type IconProps = useRender.ComponentProps<"svg"> & {
|
|
4
4
|
size?: ResponsiveValue<"small" | "medium" | "large">;
|
|
5
5
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
-
import { getVariants } from "../../utilities/responsive/responsive";
|
|
3
|
+
import { getVariants } from "../../utilities/responsive/responsive.js";
|
|
4
4
|
export const SIZES = {
|
|
5
5
|
sm: {
|
|
6
6
|
small: "sm:h-4 sm:w-4",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useFormContext } from "../form-field/form-field-context";
|
|
3
|
-
import { getVariants } from "../../utilities/responsive/responsive";
|
|
2
|
+
import { useFormContext } from "../form-field/form-field-context.js";
|
|
3
|
+
import { getVariants } from "../../utilities/responsive/responsive.js";
|
|
4
4
|
const inputStyles = getVariants({
|
|
5
5
|
base: "rounded-sm border border-border-input px-3 py-2 text-sm placeholder:text-text-placeholder focus-visible:outline focus-visible:outline-primary-hover",
|
|
6
6
|
variants: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useFormContext } from "../form-field/form-field-context";
|
|
3
|
-
import { cn } from "../../utilities/cn/cn";
|
|
2
|
+
import { useFormContext } from "../form-field/form-field-context.js";
|
|
3
|
+
import { cn } from "../../utilities/cn/cn.js";
|
|
4
4
|
/**
|
|
5
5
|
* A label component that can be used to label form fields.
|
|
6
6
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
-
import { cn } from "../../utilities/cn/cn";
|
|
5
|
-
import { mergeRefs } from "../../utilities/merge-refs/merge-refs";
|
|
6
|
-
import { getTruncatedElements } from "../../utilities/pagination/get-truncated-elements";
|
|
7
|
-
import { handleKeyboardNavigation } from "../../utilities/pagination/keyboard-navigation";
|
|
4
|
+
import { cn } from "../../utilities/cn/cn.js";
|
|
5
|
+
import { mergeRefs } from "../../utilities/merge-refs/merge-refs.js";
|
|
6
|
+
import { getTruncatedElements } from "../../utilities/pagination/get-truncated-elements.js";
|
|
7
|
+
import { handleKeyboardNavigation } from "../../utilities/pagination/keyboard-navigation.js";
|
|
8
8
|
import clsx from "clsx";
|
|
9
9
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState, } from "react";
|
|
10
10
|
const PaginationContext = createContext(undefined);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
3
|
-
import { Icon } from "../icon/icon";
|
|
3
|
+
import { Icon } from "../icon/icon.js";
|
|
4
4
|
import { Cross1Icon } from "@radix-ui/react-icons";
|
|
5
|
-
import { cn } from "../../utilities/cn/cn";
|
|
5
|
+
import { cn } from "../../utilities/cn/cn.js";
|
|
6
6
|
import { createContext, useContext, useMemo } from "react";
|
|
7
7
|
const PopoverContext = createContext(undefined);
|
|
8
8
|
const usePopoverContext = () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Progress as ProgressPrimitive } from "@base-ui/react/progress";
|
|
3
|
-
import { cn } from "../../utilities/cn/cn";
|
|
3
|
+
import { cn } from "../../utilities/cn/cn.js";
|
|
4
4
|
/**
|
|
5
5
|
* A progress bar component that displays a progress indicator and a label.
|
|
6
6
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Radio } from "@base-ui/react/radio";
|
|
3
3
|
import { RadioGroup as BaseRadioGroup } from "@base-ui/react/radio-group";
|
|
4
|
-
import { useFormContext } from "../form-field/form-field-context";
|
|
5
|
-
import { cn } from "../../utilities/cn/cn";
|
|
4
|
+
import { useFormContext } from "../form-field/form-field-context.js";
|
|
5
|
+
import { cn } from "../../utilities/cn/cn.js";
|
|
6
6
|
function RadioGroup({ className, disabled: initialDisabled, required: initialRequired, ref, ...props }) {
|
|
7
7
|
const { disabled, required } = useFormContext({
|
|
8
8
|
disabled: initialDisabled,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
3
|
-
import { useFormContext } from "../form-field/form-field-context";
|
|
4
|
-
import { Icon } from "../icon/icon";
|
|
3
|
+
import { useFormContext } from "../form-field/form-field-context.js";
|
|
4
|
+
import { Icon } from "../icon/icon.js";
|
|
5
5
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon, } from "@radix-ui/react-icons";
|
|
6
|
-
import { cn } from "../../utilities/cn/cn";
|
|
6
|
+
import { cn } from "../../utilities/cn/cn.js";
|
|
7
7
|
function Select({ disabled: initialDisabled, required: initialRequired, ...props }) {
|
|
8
8
|
const { disabled, required } = useFormContext({
|
|
9
9
|
disabled: initialDisabled,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../../utilities/cn/cn";
|
|
2
|
+
import { cn } from "../../utilities/cn/cn.js";
|
|
3
3
|
function Skeleton({ className, ref, ...props }) {
|
|
4
4
|
return (_jsx("div", { ref: ref, className: cn("animate-pulse rounded-md bg-skeleton", className), ...props }));
|
|
5
5
|
}
|
|
@@ -6,6 +6,11 @@ export type SliderProps = ComponentProps<typeof SliderPrimitive.Root> & {
|
|
|
6
6
|
* @default true
|
|
7
7
|
*/
|
|
8
8
|
showMinMax?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Whether to show the current value in a tooltip on each thumb
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
|
+
showTooltipValue?: boolean;
|
|
9
14
|
};
|
|
10
15
|
/**
|
|
11
16
|
* A customizable slider component built on top of Base UI's slider primitive.
|
|
@@ -25,8 +30,9 @@ export type SliderProps = ComponentProps<typeof SliderPrimitive.Root> & {
|
|
|
25
30
|
* @param {number} [props.min=0] - The minimum value of the slider
|
|
26
31
|
* @param {number} [props.max=100] - The maximum value of the slider
|
|
27
32
|
* @param {boolean} [props.showMinMax=true] - Whether to show min/max values below the slider
|
|
33
|
+
* @param {boolean} [props.showTooltipValue=true] - Whether to show the value in a tooltip on each thumb
|
|
28
34
|
* @param {string} [props.className] - Additional CSS classes to apply to the slider
|
|
29
35
|
* @returns {JSX.Element} A slider component with optional tooltips and min/max display
|
|
30
36
|
*/
|
|
31
|
-
declare function Slider({ className, defaultValue, min, max, showMinMax, disabled: initialDisabled, onValueChange, ref, ...props }: SliderProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
declare function Slider({ className, defaultValue, min, max, showMinMax, showTooltipValue, disabled: initialDisabled, onValueChange, ref, ...props }: SliderProps): import("react/jsx-runtime").JSX.Element;
|
|
32
38
|
export { Slider };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Slider as SliderPrimitive } from "@base-ui/react/slider";
|
|
3
|
-
import { useFormContext } from "../form-field/form-field-context";
|
|
4
|
-
import { Tooltip, TooltipContent, TooltipTrigger, } from "../tooltip/tooltip";
|
|
5
|
-
import { cn } from "../../utilities/cn/cn";
|
|
3
|
+
import { useFormContext } from "../form-field/form-field-context.js";
|
|
4
|
+
import { Tooltip, TooltipContent, TooltipTrigger, } from "../tooltip/tooltip.js";
|
|
5
|
+
import { cn } from "../../utilities/cn/cn.js";
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
/**
|
|
8
8
|
* A customizable slider component built on top of Base UI's slider primitive.
|
|
@@ -22,10 +22,11 @@ import { useState } from "react";
|
|
|
22
22
|
* @param {number} [props.min=0] - The minimum value of the slider
|
|
23
23
|
* @param {number} [props.max=100] - The maximum value of the slider
|
|
24
24
|
* @param {boolean} [props.showMinMax=true] - Whether to show min/max values below the slider
|
|
25
|
+
* @param {boolean} [props.showTooltipValue=true] - Whether to show the value in a tooltip on each thumb
|
|
25
26
|
* @param {string} [props.className] - Additional CSS classes to apply to the slider
|
|
26
27
|
* @returns {JSX.Element} A slider component with optional tooltips and min/max display
|
|
27
28
|
*/
|
|
28
|
-
function Slider({ className, defaultValue, min = 0, max = 100, showMinMax = true, disabled: initialDisabled, onValueChange, ref, ...props }) {
|
|
29
|
+
function Slider({ className, defaultValue, min = 0, max = 100, showMinMax = true, showTooltipValue = true, disabled: initialDisabled, onValueChange, ref, ...props }) {
|
|
29
30
|
const normalizedDefault = Array.isArray(defaultValue)
|
|
30
31
|
? defaultValue
|
|
31
32
|
: defaultValue !== undefined
|
|
@@ -42,9 +43,12 @@ function Slider({ className, defaultValue, min = 0, max = 100, showMinMax = true
|
|
|
42
43
|
setValue(normalizedValue);
|
|
43
44
|
onValueChange?.(newValue, event);
|
|
44
45
|
};
|
|
45
|
-
return (_jsxs(_Fragment, { children: [_jsx(SliderPrimitive.Root, { ref: ref, value: value, onValueChange: handleValueChange, className: cn("relative flex w-full touch-none select-none flex-col items-center", className), disabled: disabled, min: min, max: max, ...props, children: _jsx(SliderPrimitive.Control, { className: "flex w-full items-center", children: _jsxs(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow rounded-full bg-primary/20 data-disabled:opacity-50", children: [_jsx(SliderPrimitive.Indicator, { className: "absolute h-full bg-primary" }), value.map((thumbValue, index) =>
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
return (_jsxs(_Fragment, { children: [_jsx(SliderPrimitive.Root, { ref: ref, value: value, onValueChange: handleValueChange, className: cn("relative flex w-full touch-none select-none flex-col items-center", className), disabled: disabled, min: min, max: max, ...props, children: _jsx(SliderPrimitive.Control, { className: "flex w-full items-center", children: _jsxs(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow rounded-full bg-primary/20 data-disabled:opacity-50", children: [_jsx(SliderPrimitive.Indicator, { className: "absolute h-full bg-primary" }), value.map((thumbValue, index) => {
|
|
47
|
+
const thumbClassName = "block h-4 w-4 rounded-full border border-primary bg-surface shadow outline-none transition-colors focus-within:ring-2 focus-within:ring-focus-ring focus-within:ring-offset-surface data-disabled:pointer-events-none";
|
|
48
|
+
return showTooltipValue ? (
|
|
49
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: index is the only stable identifier for thumbs
|
|
50
|
+
_jsxs(Tooltip, { delayDuration: 0, children: [_jsx(TooltipTrigger, { render: _jsx(SliderPrimitive.Thumb, { index: index, className: thumbClassName }) }), _jsx(TooltipContent, { children: _jsx("p", { children: thumbValue }) })] }, index)) : (_jsx(SliderPrimitive.Thumb, { className: thumbClassName, index: index }, index));
|
|
51
|
+
})] }) }) }), showMinMax && (_jsxs("div", { className: "mt-2 flex w-full flex-row justify-between", children: [_jsx("p", { children: min }), _jsx("p", { children: max })] }))] }));
|
|
48
52
|
}
|
|
49
53
|
export { Slider };
|
|
50
54
|
//# sourceMappingURL=slider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.js","sourceRoot":"/","sources":["components/slider/slider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EACN,OAAO,EACP,cAAc,EACd,cAAc,GACd,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"slider.js","sourceRoot":"/","sources":["components/slider/slider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EACN,OAAO,EACP,cAAc,EACd,cAAc,GACd,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAejC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAS,MAAM,CAAC,EACf,SAAS,EACT,YAAY,EACZ,GAAG,GAAG,CAAC,EACP,GAAG,GAAG,GAAG,EACT,UAAU,GAAG,IAAI,EACjB,gBAAgB,GAAG,IAAI,EACvB,QAAQ,EAAE,eAAe,EACzB,aAAa,EACb,GAAG,EACH,GAAG,KAAK,EACK;IACb,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;QACpD,CAAC,CAAC,YAAY;QACd,CAAC,CAAC,YAAY,KAAK,SAAS;YAC3B,CAAC,CAAC,CAAC,YAAY,CAAC;YAChB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAER,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAW,iBAAiB,CAAC,CAAC;IAChE,MAAM,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC;QACnC,QAAQ,EAAE,eAAe;KACzB,CAAC,CAAC;IAEH,MAAM,iBAAiB,GAAG,CACzB,QAAoC,EACpC,KAA8C,EAC7C,EAAE;QACH,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;YAC9C,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC;YACf,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QACd,QAAQ,CAAC,eAAe,CAAC,CAAC;QAC1B,aAAa,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAClC,CAAC,CAAC;IAEF,OAAO,CACN,8BACC,KAAC,eAAe,CAAC,IAAI,IACpB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,iBAAiB,EAChC,SAAS,EAAE,EAAE,CACZ,mEAAmE,EACnE,SAAS,CACT,EACD,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,KACJ,KAAK,YAET,KAAC,eAAe,CAAC,OAAO,IAAC,SAAS,EAAC,0BAA0B,YAC5D,MAAC,eAAe,CAAC,KAAK,IAAC,SAAS,EAAC,gFAAgF,aAChH,KAAC,eAAe,CAAC,SAAS,IAAC,SAAS,EAAC,4BAA4B,GAAG,EACnE,KAAK,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE;gCAChC,MAAM,cAAc,GACnB,uNAAuN,CAAC;gCACzN,OAAO,gBAAgB,CAAC,CAAC,CAAC;gCACzB,+FAA+F;gCAC/F,MAAC,OAAO,IAAa,aAAa,EAAE,CAAC,aACpC,KAAC,cAAc,IACd,MAAM,EACL,KAAC,eAAe,CAAC,KAAK,IACrB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,cAAc,GACxB,GAEF,EACF,KAAC,cAAc,cACd,sBAAI,UAAU,GAAK,GACH,KAXJ,KAAK,CAYT,CACV,CAAC,CAAC,CAAC,CACH,KAAC,eAAe,CAAC,KAAK,IACrB,SAAS,EAAE,cAAc,EACzB,KAAK,EAAE,KAAK,IAEP,KAAK,CACT,CACF,CAAC;4BACH,CAAC,CAAC,IACqB,GACC,GACJ,EACtB,UAAU,IAAI,CACd,eAAK,SAAS,EAAC,2CAA2C,aACzD,sBAAI,GAAG,GAAK,EACZ,sBAAI,GAAG,GAAK,IACP,CACN,IACC,CACH,CAAC;AACH,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,CAAC","sourcesContent":["import { Slider as SliderPrimitive } from \"@base-ui/react/slider\";\nimport { useFormContext } from \"@components/form-field/form-field-context\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipTrigger,\n} from \"@components/tooltip/tooltip\";\nimport { cn } from \"@utilities/cn/cn\";\nimport type { ComponentProps } from \"react\";\nimport { useState } from \"react\";\n\nexport type SliderProps = ComponentProps<typeof SliderPrimitive.Root> & {\n\t/**\n\t * Whether to show the minimum and maximum values below the slider\n\t * @default true\n\t */\n\tshowMinMax?: boolean;\n\t/**\n\t * Whether to show the current value in a tooltip on each thumb\n\t * @default true\n\t */\n\tshowTooltipValue?: boolean;\n};\n\n/**\n * A customizable slider component built on top of Base UI's slider primitive.\n *\n * @example\n * ```tsx\n * <Slider\n * min={0}\n * max={100}\n * defaultValue={50}\n * showMinMax={true}\n * />\n * ```\n *\n * @param {Object} props - The props for the Slider component\n * @param {number | number[]} [props.defaultValue] - The initial value of the slider\n * @param {number} [props.min=0] - The minimum value of the slider\n * @param {number} [props.max=100] - The maximum value of the slider\n * @param {boolean} [props.showMinMax=true] - Whether to show min/max values below the slider\n * @param {boolean} [props.showTooltipValue=true] - Whether to show the value in a tooltip on each thumb\n * @param {string} [props.className] - Additional CSS classes to apply to the slider\n * @returns {JSX.Element} A slider component with optional tooltips and min/max display\n */\nfunction Slider({\n\tclassName,\n\tdefaultValue,\n\tmin = 0,\n\tmax = 100,\n\tshowMinMax = true,\n\tshowTooltipValue = true,\n\tdisabled: initialDisabled,\n\tonValueChange,\n\tref,\n\t...props\n}: SliderProps) {\n\tconst normalizedDefault = Array.isArray(defaultValue)\n\t\t? defaultValue\n\t\t: defaultValue !== undefined\n\t\t\t? [defaultValue]\n\t\t\t: [0];\n\n\tconst [value, setValue] = useState<number[]>(normalizedDefault);\n\tconst { disabled } = useFormContext({\n\t\tdisabled: initialDisabled,\n\t});\n\n\tconst handleValueChange = (\n\t\tnewValue: number | readonly number[],\n\t\tevent: SliderPrimitive.Root.ChangeEventDetails,\n\t) => {\n\t\tconst normalizedValue = Array.isArray(newValue)\n\t\t\t? [...newValue]\n\t\t\t: [newValue];\n\t\tsetValue(normalizedValue);\n\t\tonValueChange?.(newValue, event);\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<SliderPrimitive.Root\n\t\t\t\tref={ref}\n\t\t\t\tvalue={value}\n\t\t\t\tonValueChange={handleValueChange}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"relative flex w-full touch-none select-none flex-col items-center\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tmin={min}\n\t\t\t\tmax={max}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<SliderPrimitive.Control className=\"flex w-full items-center\">\n\t\t\t\t\t<SliderPrimitive.Track className=\"relative h-1.5 w-full grow rounded-full bg-primary/20 data-disabled:opacity-50\">\n\t\t\t\t\t\t<SliderPrimitive.Indicator className=\"absolute h-full bg-primary\" />\n\t\t\t\t\t\t{value.map((thumbValue, index) => {\n\t\t\t\t\t\t\tconst thumbClassName =\n\t\t\t\t\t\t\t\t\"block h-4 w-4 rounded-full border border-primary bg-surface shadow outline-none transition-colors focus-within:ring-2 focus-within:ring-focus-ring focus-within:ring-offset-surface data-disabled:pointer-events-none\";\n\t\t\t\t\t\t\treturn showTooltipValue ? (\n\t\t\t\t\t\t\t\t// biome-ignore lint/suspicious/noArrayIndexKey: index is the only stable identifier for thumbs\n\t\t\t\t\t\t\t\t<Tooltip key={index} delayDuration={0}>\n\t\t\t\t\t\t\t\t\t<TooltipTrigger\n\t\t\t\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t\t\t\t<SliderPrimitive.Thumb\n\t\t\t\t\t\t\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={thumbClassName}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t<p>{thumbValue}</p>\n\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<SliderPrimitive.Thumb\n\t\t\t\t\t\t\t\t\tclassName={thumbClassName}\n\t\t\t\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\t\t\t\t// biome-ignore lint/suspicious/noArrayIndexKey: index is the only stable identifier for thumbs\n\t\t\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</SliderPrimitive.Track>\n\t\t\t\t</SliderPrimitive.Control>\n\t\t\t</SliderPrimitive.Root>\n\t\t\t{showMinMax && (\n\t\t\t\t<div className=\"mt-2 flex w-full flex-row justify-between\">\n\t\t\t\t\t<p>{min}</p>\n\t\t\t\t\t<p>{max}</p>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</>\n\t);\n}\n\nexport { Slider };\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
|
|
2
|
-
import type { ResponsiveValue } from "../../utilities/responsive/responsive";
|
|
2
|
+
import type { ResponsiveValue } from "../../utilities/responsive/responsive.js";
|
|
3
3
|
import type { Ref } from "react";
|
|
4
4
|
export type SwitchProps = Omit<SwitchPrimitive.Root.Props, "className"> & {
|
|
5
5
|
size?: ResponsiveValue<"small" | "medium" | "large">;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
|
|
3
|
-
import { useFormContext } from "../form-field/form-field-context";
|
|
4
|
-
import { getVariants } from "../../utilities/responsive/responsive";
|
|
3
|
+
import { useFormContext } from "../form-field/form-field-context.js";
|
|
4
|
+
import { getVariants } from "../../utilities/responsive/responsive.js";
|
|
5
5
|
const thumbStyles = getVariants({
|
|
6
6
|
slots: {
|
|
7
7
|
root: "relative flex cursor-pointer appearance-none items-center rounded-full bg-indicator transition-colors duration-500 ease-out focus:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring data-[checked]:bg-primary",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../../utilities/cn/cn";
|
|
2
|
+
import { cn } from "../../utilities/cn/cn.js";
|
|
3
3
|
function Table({ className, ref, ...props }) {
|
|
4
4
|
return (_jsx("div", { className: "relative w-full overflow-auto", children: _jsx("table", { ref: ref, className: cn("w-full caption-bottom text-sm", className), ...props }) }));
|
|
5
5
|
}
|
|
@@ -13,7 +13,7 @@ function TableFooter({ className, ref, ...props }) {
|
|
|
13
13
|
return (_jsx("tfoot", { ref: ref, className: cn("border-t bg-surface-muted font-medium [&>tr]:bg-surface-muted! [&>tr]:text-text-secondary! [&>tr]:last:border-b-0", className), ...props }));
|
|
14
14
|
}
|
|
15
15
|
function TableRow({ className, ref, ...props }) {
|
|
16
|
-
return (_jsx("tr", { ref: ref, className: cn("border-b transition-colors
|
|
16
|
+
return (_jsx("tr", { ref: ref, className: cn("border-b transition-colors data-[state=selected]:bg-indicator data-[state=selected]:text-on-primary", className), ...props }));
|
|
17
17
|
}
|
|
18
18
|
function TableHead({ className, ref, ...props }) {
|
|
19
19
|
return (_jsx("th", { ref: ref, className: cn("h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className), ...props }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.js","sourceRoot":"/","sources":["components/table/table.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAStC,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAc;IACtD,OAAO,CACN,cAAK,SAAS,EAAC,+BAA+B,YAC7C,gBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACR,GACG,CACN,CAAC;AACH,CAAC;AAQD,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAoB;IAClE,OAAO,CACN,gBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,kHAAkH,EAClH,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAQD,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAkB;IAC9D,OAAO,CACN,gBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS,CAAC,KAClD,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAQD,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAoB;IAClE,OAAO,CACN,gBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,mHAAmH,EACnH,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAQD,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAiB;IAC5D,OAAO,CACN,aACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"/","sources":["components/table/table.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAStC,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAc;IACtD,OAAO,CACN,cAAK,SAAS,EAAC,+BAA+B,YAC7C,gBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACR,GACG,CACN,CAAC;AACH,CAAC;AAQD,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAoB;IAClE,OAAO,CACN,gBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,kHAAkH,EAClH,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAQD,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAkB;IAC9D,OAAO,CACN,gBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS,CAAC,KAClD,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAQD,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAoB;IAClE,OAAO,CACN,gBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,mHAAmH,EACnH,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAQD,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAiB;IAC5D,OAAO,CACN,aACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,qGAAqG,EACrG,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAQD,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAkB;IAC9D,OAAO,CACN,aACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,kHAAkH,EAClH,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAQD,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAkB;IAC9D,OAAO,CACN,aACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACZ,sFAAsF,EACtF,SAAS,CACT,KACG,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAQD,SAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,EAAqB;IACpE,OAAO,CACN,kBACC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,yCAAyC,EAAE,SAAS,CAAC,KAC/D,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAED,OAAO,EACN,KAAK,EACL,SAAS,EACT,YAAY,EACZ,SAAS,EACT,WAAW,EACX,SAAS,EACT,WAAW,EACX,QAAQ,GACR,CAAC","sourcesContent":["import { cn } from \"@utilities/cn/cn\";\nimport type { ComponentProps } from \"react\";\n\n/**\n * Table\n */\n\nexport type TableProps = ComponentProps<\"table\">;\n\nfunction Table({ className, ref, ...props }: TableProps) {\n\treturn (\n\t\t<div className=\"relative w-full overflow-auto\">\n\t\t\t<table\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\"w-full caption-bottom text-sm\", className)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\n/**\n * TableHeader\n */\n\nexport type TableHeaderProps = ComponentProps<\"thead\">;\n\nfunction TableHeader({ className, ref, ...props }: TableHeaderProps) {\n\treturn (\n\t\t<thead\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"[&_tr]:border-b [&_tr]:bg-primary! [&_tr]:text-on-primary [&_tr]:hover:bg-primary! [&_tr]:hover:text-on-primary!\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * TableBody\n */\n\nexport type TableBodyProps = ComponentProps<\"tbody\">;\n\nfunction TableBody({ className, ref, ...props }: TableBodyProps) {\n\treturn (\n\t\t<tbody\n\t\t\tref={ref}\n\t\t\tclassName={cn(\"[&_tr:last-child]:border-0\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * TableFooter\n */\n\nexport type TableFooterProps = ComponentProps<\"tfoot\">;\n\nfunction TableFooter({ className, ref, ...props }: TableFooterProps) {\n\treturn (\n\t\t<tfoot\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"border-t bg-surface-muted font-medium [&>tr]:bg-surface-muted! [&>tr]:text-text-secondary! [&>tr]:last:border-b-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * TableRow\n */\n\nexport type TableRowProps = ComponentProps<\"tr\">;\n\nfunction TableRow({ className, ref, ...props }: TableRowProps) {\n\treturn (\n\t\t<tr\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"border-b transition-colors data-[state=selected]:bg-indicator data-[state=selected]:text-on-primary\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * TableHead\n */\n\nexport type TableHeadProps = ComponentProps<\"th\">;\n\nfunction TableHead({ className, ref, ...props }: TableHeadProps) {\n\treturn (\n\t\t<th\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * TableCell\n */\n\nexport type TableCellProps = ComponentProps<\"td\">;\n\nfunction TableCell({ className, ref, ...props }: TableCellProps) {\n\treturn (\n\t\t<td\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n/**\n * TableCaption\n */\n\nexport type TableCaptionProps = ComponentProps<\"caption\">;\n\nfunction TableCaption({ className, ref, ...props }: TableCaptionProps) {\n\treturn (\n\t\t<caption\n\t\t\tref={ref}\n\t\t\tclassName={cn(\"mt-4 text-start text-sm text-text-muted\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tTable,\n\tTableBody,\n\tTableCaption,\n\tTableCell,\n\tTableFooter,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
|
|
3
|
-
import { cn } from "../../utilities/cn/cn";
|
|
3
|
+
import { cn } from "../../utilities/cn/cn.js";
|
|
4
4
|
const Tabs = TabsPrimitive.Root;
|
|
5
5
|
function TabsList({ className, ref, ...props }) {
|
|
6
6
|
return (_jsx(TabsPrimitive.List, { ref: ref, className: cn("inline-flex h-10 items-center justify-center gap-2 bg-surface-muted px-1 text-text-secondary", className), ...props }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getVariants } from "../../utilities/responsive/responsive";
|
|
2
|
+
import { getVariants } from "../../utilities/responsive/responsive.js";
|
|
3
3
|
const textAreaStyles = getVariants({
|
|
4
4
|
base: "w-full rounded-md border border-border-input p-2 focus-visible:outline focus-visible:outline-primary-hover",
|
|
5
5
|
variants: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Toaster as SonnerToaster, toast as sonnerToast, } from "sonner";
|
|
3
|
-
import { Button } from "../button/button";
|
|
3
|
+
import { Button } from "../button/button.js";
|
|
4
4
|
/**
|
|
5
5
|
* Creates a custom toast notification using the sonner toast library
|
|
6
6
|
* @param toast - The toast configuration object without an ID
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
3
|
-
import { cn } from "../../utilities/cn/cn";
|
|
3
|
+
import { cn } from "../../utilities/cn/cn.js";
|
|
4
4
|
import { createContext, useContext, useMemo } from "react";
|
|
5
5
|
const TooltipContext = createContext(undefined);
|
|
6
6
|
const useTooltipContext = () => {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
export type { AccordionContentProps, AccordionItemProps, AccordionProps, AccordionTriggerProps, } from "./components/accordion/accordion";
|
|
2
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "./components/accordion/accordion";
|
|
3
|
-
export type { AlertDescriptionProps, AlertProps, AlertTitleProps, } from "./components/alert/alert";
|
|
4
|
-
export { Alert, AlertDescription, AlertTitle } from "./components/alert/alert";
|
|
5
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogOverlay, AlertDialogTitle, AlertDialogTrigger, } from "./components/alert-dialog/alert-dialog";
|
|
6
|
-
export type { AutocompleteClearProps, AutocompleteCollectionProps, AutocompleteContentProps, AutocompleteEmptyProps, AutocompleteGroupLabelProps, AutocompleteInputGroupProps, AutocompleteInputProps, AutocompleteItemProps, AutocompleteListProps, AutocompleteProps, AutocompleteSeparatorProps, AutocompleteTriggerProps, } from "./components/autocomplete/autocomplete";
|
|
7
|
-
export { Autocomplete, AutocompleteClear, AutocompleteCollection, AutocompleteContent, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteInput, AutocompleteInputGroup, AutocompleteItem, AutocompleteList, AutocompleteSeparator, AutocompleteTrigger, useAutocompleteFilteredItems, } from "./components/autocomplete/autocomplete";
|
|
8
|
-
export { Avatar, AvatarFallback, AvatarImage } from "./components/avatar/avatar";
|
|
9
|
-
export type { AvatarGroupProps } from "./components/avatar/avatar-group";
|
|
10
|
-
export { AvatarGroup } from "./components/avatar/avatar-group";
|
|
11
|
-
export type { BadgeProps } from "./components/badge/badge";
|
|
12
|
-
export { Badge } from "./components/badge/badge";
|
|
13
|
-
export type { ButtonProps } from "./components/button/button";
|
|
14
|
-
export { Button } from "./components/button/button";
|
|
15
|
-
export type { CardContentProps, CardFooterProps, CardHeaderProps, CardProps, } from "./components/card/card";
|
|
16
|
-
export { Card, CardContent, CardFooter, CardHeader, } from "./components/card/card";
|
|
17
|
-
export type { CheckboxProps } from "./components/checkbox/checkbox";
|
|
18
|
-
export { Checkbox } from "./components/checkbox/checkbox";
|
|
19
|
-
export type { ComboboxClearProps, ComboboxCollectionProps, ComboboxContentProps, ComboboxEmptyProps, ComboboxGroupLabelProps, ComboboxInputGroupProps, ComboboxInputProps, ComboboxItemProps, ComboboxListProps, ComboboxProps, ComboboxSeparatorProps, ComboboxTriggerProps, } from "./components/combobox/combobox";
|
|
20
|
-
export { Combobox, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxInputGroup, ComboboxItem, ComboboxList, ComboboxSeparator, ComboboxTrigger, useComboboxFilteredItems, } from "./components/combobox/combobox";
|
|
21
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "./components/dialog/dialog";
|
|
22
|
-
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, } from "./components/drawer/drawer";
|
|
23
|
-
export { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from "./components/dropdown-menu/dropdown-menu";
|
|
24
|
-
export type { InputProps } from "./components/input/input";
|
|
25
|
-
export { Input } from "./components/input/input";
|
|
26
|
-
export type { LabelProps } from "./components/label/label";
|
|
27
|
-
export { Label } from "./components/label/label";
|
|
28
|
-
export type { PaginationItemProps, PaginationProps, } from "./components/pagination/pagination";
|
|
29
|
-
export { Pagination, PaginationItem, PaginationNext, PaginationPrev, } from "./components/pagination/pagination";
|
|
30
|
-
export type { PopoverContentProps, PopoverProps, } from "./components/popover/popover";
|
|
31
|
-
export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, } from "./components/popover/popover";
|
|
32
|
-
export type { ProgressProps } from "./components/progress/progress";
|
|
33
|
-
export { Progress } from "./components/progress/progress";
|
|
34
|
-
export { RadioGroup, RadioGroupItem, } from "./components/radio-group/radio-group";
|
|
35
|
-
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, } from "./components/select/select";
|
|
36
|
-
export { Skeleton } from "./components/skeleton/skeleton";
|
|
37
|
-
export type { SliderProps } from "./components/slider/slider";
|
|
38
|
-
export { Slider } from "./components/slider/slider";
|
|
39
|
-
export type { SwitchProps } from "./components/switch/switch";
|
|
40
|
-
export { Switch } from "./components/switch/switch";
|
|
41
|
-
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from "./components/table/table";
|
|
42
|
-
export { Tabs, TabsContent, TabsList, TabsTrigger, } from "./components/tabs/tabs";
|
|
43
|
-
export type { TextareaProps } from "./components/text-area/text-area";
|
|
44
|
-
export { Textarea } from "./components/text-area/text-area";
|
|
45
|
-
export type { ToastProps } from "./components/toast/toast";
|
|
46
|
-
export { Toast, Toaster, toast } from "./components/toast/toast";
|
|
47
|
-
export type { TooltipProps } from "./components/tooltip/tooltip";
|
|
48
|
-
export { Tooltip, TooltipContent, TooltipTrigger, } from "./components/tooltip/tooltip";
|
|
1
|
+
export type { AccordionContentProps, AccordionItemProps, AccordionProps, AccordionTriggerProps, } from "./components/accordion/accordion.js";
|
|
2
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "./components/accordion/accordion.js";
|
|
3
|
+
export type { AlertDescriptionProps, AlertProps, AlertTitleProps, } from "./components/alert/alert.js";
|
|
4
|
+
export { Alert, AlertDescription, AlertTitle } from "./components/alert/alert.js";
|
|
5
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogOverlay, AlertDialogTitle, AlertDialogTrigger, } from "./components/alert-dialog/alert-dialog.js";
|
|
6
|
+
export type { AutocompleteClearProps, AutocompleteCollectionProps, AutocompleteContentProps, AutocompleteEmptyProps, AutocompleteGroupLabelProps, AutocompleteInputGroupProps, AutocompleteInputProps, AutocompleteItemProps, AutocompleteListProps, AutocompleteProps, AutocompleteSeparatorProps, AutocompleteTriggerProps, } from "./components/autocomplete/autocomplete.js";
|
|
7
|
+
export { Autocomplete, AutocompleteClear, AutocompleteCollection, AutocompleteContent, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteInput, AutocompleteInputGroup, AutocompleteItem, AutocompleteList, AutocompleteSeparator, AutocompleteTrigger, useAutocompleteFilteredItems, } from "./components/autocomplete/autocomplete.js";
|
|
8
|
+
export { Avatar, AvatarFallback, AvatarImage } from "./components/avatar/avatar.js";
|
|
9
|
+
export type { AvatarGroupProps } from "./components/avatar/avatar-group.js";
|
|
10
|
+
export { AvatarGroup } from "./components/avatar/avatar-group.js";
|
|
11
|
+
export type { BadgeProps } from "./components/badge/badge.js";
|
|
12
|
+
export { Badge } from "./components/badge/badge.js";
|
|
13
|
+
export type { ButtonProps } from "./components/button/button.js";
|
|
14
|
+
export { Button } from "./components/button/button.js";
|
|
15
|
+
export type { CardContentProps, CardFooterProps, CardHeaderProps, CardProps, } from "./components/card/card.js";
|
|
16
|
+
export { Card, CardContent, CardFooter, CardHeader, } from "./components/card/card.js";
|
|
17
|
+
export type { CheckboxProps } from "./components/checkbox/checkbox.js";
|
|
18
|
+
export { Checkbox } from "./components/checkbox/checkbox.js";
|
|
19
|
+
export type { ComboboxClearProps, ComboboxCollectionProps, ComboboxContentProps, ComboboxEmptyProps, ComboboxGroupLabelProps, ComboboxInputGroupProps, ComboboxInputProps, ComboboxItemProps, ComboboxListProps, ComboboxProps, ComboboxSeparatorProps, ComboboxTriggerProps, } from "./components/combobox/combobox.js";
|
|
20
|
+
export { Combobox, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxInputGroup, ComboboxItem, ComboboxList, ComboboxSeparator, ComboboxTrigger, useComboboxFilteredItems, } from "./components/combobox/combobox.js";
|
|
21
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "./components/dialog/dialog.js";
|
|
22
|
+
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, } from "./components/drawer/drawer.js";
|
|
23
|
+
export { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from "./components/dropdown-menu/dropdown-menu.js";
|
|
24
|
+
export type { InputProps } from "./components/input/input.js";
|
|
25
|
+
export { Input } from "./components/input/input.js";
|
|
26
|
+
export type { LabelProps } from "./components/label/label.js";
|
|
27
|
+
export { Label } from "./components/label/label.js";
|
|
28
|
+
export type { PaginationItemProps, PaginationProps, } from "./components/pagination/pagination.js";
|
|
29
|
+
export { Pagination, PaginationItem, PaginationNext, PaginationPrev, } from "./components/pagination/pagination.js";
|
|
30
|
+
export type { PopoverContentProps, PopoverProps, } from "./components/popover/popover.js";
|
|
31
|
+
export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, } from "./components/popover/popover.js";
|
|
32
|
+
export type { ProgressProps } from "./components/progress/progress.js";
|
|
33
|
+
export { Progress } from "./components/progress/progress.js";
|
|
34
|
+
export { RadioGroup, RadioGroupItem, } from "./components/radio-group/radio-group.js";
|
|
35
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, } from "./components/select/select.js";
|
|
36
|
+
export { Skeleton } from "./components/skeleton/skeleton.js";
|
|
37
|
+
export type { SliderProps } from "./components/slider/slider.js";
|
|
38
|
+
export { Slider } from "./components/slider/slider.js";
|
|
39
|
+
export type { SwitchProps } from "./components/switch/switch.js";
|
|
40
|
+
export { Switch } from "./components/switch/switch.js";
|
|
41
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from "./components/table/table.js";
|
|
42
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger, } from "./components/tabs/tabs.js";
|
|
43
|
+
export type { TextareaProps } from "./components/text-area/text-area.js";
|
|
44
|
+
export { Textarea } from "./components/text-area/text-area.js";
|
|
45
|
+
export type { ToastProps } from "./components/toast/toast.js";
|
|
46
|
+
export { Toast, Toaster, toast } from "./components/toast/toast.js";
|
|
47
|
+
export type { TooltipProps } from "./components/tooltip/tooltip.js";
|
|
48
|
+
export { Tooltip, TooltipContent, TooltipTrigger, } from "./components/tooltip/tooltip.js";
|
package/dist/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "./components/accordion/accordion";
|
|
2
|
-
export { Alert, AlertDescription, AlertTitle } from "./components/alert/alert";
|
|
3
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogOverlay, AlertDialogTitle, AlertDialogTrigger, } from "./components/alert-dialog/alert-dialog";
|
|
4
|
-
export { Autocomplete, AutocompleteClear, AutocompleteCollection, AutocompleteContent, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteInput, AutocompleteInputGroup, AutocompleteItem, AutocompleteList, AutocompleteSeparator, AutocompleteTrigger, useAutocompleteFilteredItems, } from "./components/autocomplete/autocomplete";
|
|
5
|
-
export { Avatar, AvatarFallback, AvatarImage } from "./components/avatar/avatar";
|
|
6
|
-
export { AvatarGroup } from "./components/avatar/avatar-group";
|
|
7
|
-
export { Badge } from "./components/badge/badge";
|
|
8
|
-
export { Button } from "./components/button/button";
|
|
9
|
-
export { Card, CardContent, CardFooter, CardHeader, } from "./components/card/card";
|
|
10
|
-
export { Checkbox } from "./components/checkbox/checkbox";
|
|
11
|
-
export { Combobox, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxInputGroup, ComboboxItem, ComboboxList, ComboboxSeparator, ComboboxTrigger, useComboboxFilteredItems, } from "./components/combobox/combobox";
|
|
12
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "./components/dialog/dialog";
|
|
13
|
-
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, } from "./components/drawer/drawer";
|
|
14
|
-
export { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from "./components/dropdown-menu/dropdown-menu";
|
|
15
|
-
export { Input } from "./components/input/input";
|
|
16
|
-
export { Label } from "./components/label/label";
|
|
17
|
-
export { Pagination, PaginationItem, PaginationNext, PaginationPrev, } from "./components/pagination/pagination";
|
|
18
|
-
export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, } from "./components/popover/popover";
|
|
19
|
-
export { Progress } from "./components/progress/progress";
|
|
20
|
-
export { RadioGroup, RadioGroupItem, } from "./components/radio-group/radio-group";
|
|
21
|
-
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, } from "./components/select/select";
|
|
22
|
-
export { Skeleton } from "./components/skeleton/skeleton";
|
|
23
|
-
export { Slider } from "./components/slider/slider";
|
|
24
|
-
export { Switch } from "./components/switch/switch";
|
|
25
|
-
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from "./components/table/table";
|
|
26
|
-
export { Tabs, TabsContent, TabsList, TabsTrigger, } from "./components/tabs/tabs";
|
|
27
|
-
export { Textarea } from "./components/text-area/text-area";
|
|
28
|
-
export { Toast, Toaster, toast } from "./components/toast/toast";
|
|
29
|
-
export { Tooltip, TooltipContent, TooltipTrigger, } from "./components/tooltip/tooltip";
|
|
1
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "./components/accordion/accordion.js";
|
|
2
|
+
export { Alert, AlertDescription, AlertTitle } from "./components/alert/alert.js";
|
|
3
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogOverlay, AlertDialogTitle, AlertDialogTrigger, } from "./components/alert-dialog/alert-dialog.js";
|
|
4
|
+
export { Autocomplete, AutocompleteClear, AutocompleteCollection, AutocompleteContent, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteInput, AutocompleteInputGroup, AutocompleteItem, AutocompleteList, AutocompleteSeparator, AutocompleteTrigger, useAutocompleteFilteredItems, } from "./components/autocomplete/autocomplete.js";
|
|
5
|
+
export { Avatar, AvatarFallback, AvatarImage } from "./components/avatar/avatar.js";
|
|
6
|
+
export { AvatarGroup } from "./components/avatar/avatar-group.js";
|
|
7
|
+
export { Badge } from "./components/badge/badge.js";
|
|
8
|
+
export { Button } from "./components/button/button.js";
|
|
9
|
+
export { Card, CardContent, CardFooter, CardHeader, } from "./components/card/card.js";
|
|
10
|
+
export { Checkbox } from "./components/checkbox/checkbox.js";
|
|
11
|
+
export { Combobox, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxInputGroup, ComboboxItem, ComboboxList, ComboboxSeparator, ComboboxTrigger, useComboboxFilteredItems, } from "./components/combobox/combobox.js";
|
|
12
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "./components/dialog/dialog.js";
|
|
13
|
+
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, } from "./components/drawer/drawer.js";
|
|
14
|
+
export { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from "./components/dropdown-menu/dropdown-menu.js";
|
|
15
|
+
export { Input } from "./components/input/input.js";
|
|
16
|
+
export { Label } from "./components/label/label.js";
|
|
17
|
+
export { Pagination, PaginationItem, PaginationNext, PaginationPrev, } from "./components/pagination/pagination.js";
|
|
18
|
+
export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, } from "./components/popover/popover.js";
|
|
19
|
+
export { Progress } from "./components/progress/progress.js";
|
|
20
|
+
export { RadioGroup, RadioGroupItem, } from "./components/radio-group/radio-group.js";
|
|
21
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, } from "./components/select/select.js";
|
|
22
|
+
export { Skeleton } from "./components/skeleton/skeleton.js";
|
|
23
|
+
export { Slider } from "./components/slider/slider.js";
|
|
24
|
+
export { Switch } from "./components/switch/switch.js";
|
|
25
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from "./components/table/table.js";
|
|
26
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger, } from "./components/tabs/tabs.js";
|
|
27
|
+
export { Textarea } from "./components/text-area/text-area.js";
|
|
28
|
+
export { Toast, Toaster, toast } from "./components/toast/toast.js";
|
|
29
|
+
export { Tooltip, TooltipContent, TooltipTrigger, } from "./components/tooltip/tooltip.js";
|
|
30
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PaginationItem, } from "../../components/pagination/pagination";
|
|
2
|
+
import { PaginationItem, } from "../../components/pagination/pagination.js";
|
|
3
3
|
import { Children, isValidElement, } from "react";
|
|
4
4
|
export const getTruncatedElements = ({ page, children, }) => {
|
|
5
5
|
const elements = Children.toArray(children);
|