Socket
Socket
Sign inDemoInstall

@ark-ui/react

Package Overview
Dependencies
Maintainers
2
Versions
531
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ark-ui/react - npm Package Compare versions

Comparing version 0.0.0-rc-20221106114650 to 0.0.0-rc-20221106185238

72

dist/index.d.ts

@@ -21,2 +21,3 @@ import * as _polymorphic_factory_react from '@polymorphic-factory/react';

import { connect as connect$2 } from '@zag-js/tabs';
import * as tagsInput from '@zag-js/tags-input';
import * as tooltip from '@zag-js/tooltip';

@@ -574,2 +575,71 @@

declare type TagProps = {
index: string | number;
value: string;
disabled?: boolean;
};
declare const Tag: _polymorphic_factory_react.ComponentWithAs<"div", Assign<HTMLArkProps<"div">, TagProps>>;
declare type TagDeleteButtonProps = Assign<HTMLArkProps<'button'>, TagProps>;
declare const TagDeleteButton: _polymorphic_factory_react.ComponentWithAs<"button", TagDeleteButtonProps>;
declare type TagInputProps = Assign<HTMLArkProps<'input'>, TagProps>;
declare const TagInput: _polymorphic_factory_react.ComponentWithAs<"input", TagInputProps>;
declare type UseTagsInputProps = Omit<tagsInput.Context, 'id'> & {
defaultValue?: tagsInput.Context['value'];
};
declare const useTagsInput: (props: UseTagsInputProps) => {
isEmpty: boolean;
inputValue: string;
value: string[];
count: number;
valueAsString: string;
isAtMax: boolean;
setValue(value: string[]): void;
clearAll(): void;
addValue(value: string): void;
deleteValue(id: string): void;
setValueAtIndex(index: number, value: string): void;
setInputValue(value: string): void;
clearInputValue(): void;
focus(): void;
rootProps: react.HTMLAttributes<HTMLElement>;
labelProps: react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
controlProps: react.HTMLAttributes<HTMLElement>;
inputProps: react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
hiddenInputProps: react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
getTagProps(options: {
index: string | number;
value: string;
disabled?: boolean | undefined;
}): react.HTMLAttributes<HTMLElement>;
getTagInputProps(options: {
index: string | number;
value: string;
disabled?: boolean | undefined;
}): react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
getTagDeleteButtonProps(options: {
index: string | number;
value: string;
disabled?: boolean | undefined;
}): react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
clearButtonProps: react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
};
declare type UseTagsInputReturn = ReturnType<typeof useTagsInput>;
declare type TagsInputProps = Assign<Assign<HTMLArkProps<'input'>, UseTagsInputProps>, {
children: ReactNode | ((pages: UseTagsInputProps) => ReactNode);
}>;
declare const TagsInput: _polymorphic_factory_react.ComponentWithAs<"input", TagsInputProps>;
declare type TagsInputClearButtonProps = HTMLArkProps<'button'>;
declare const TagsInputClearButton: _polymorphic_factory_react.ComponentWithAs<"button", TagsInputClearButtonProps>;
declare type TagsInputControlProps = HTMLArkProps<'div'>;
declare const TagsInputControl: _polymorphic_factory_react.ComponentWithAs<"div", TagsInputControlProps>;
declare type TagsInputFieldProps = HTMLArkProps<'input'>;
declare const TagsInputField: _polymorphic_factory_react.ComponentWithAs<"input", TagsInputFieldProps>;
declare type UseTooltipProps = Omit<tooltip.Context, 'id'>;

@@ -614,2 +684,2 @@ declare const useTooltip: (props: UseTooltipProps) => {

export { Accordion, AccordionButton, AccordionButtonProps, AccordionIcon, AccordionIconProps, AccordionItem, AccordionItemContext, AccordionItemProps, AccordionPanel, AccordionPanelProps, AccordionProps, Checkbox, CheckboxControl, CheckboxControlProps, CheckboxInput, CheckboxInputProps, CheckboxLabel, CheckboxLabelProps, CheckboxProps, Dialog, DialogBackdrop, DialogBackdropProps, DialogCloseButton, DialogCloseButtonProps, DialogContent, DialogContentProps, DialogDescription, DialogDescriptionProps, DialogPortal, DialogPortalProps, DialogProps, DialogTitle, DialogTitleProps, DialogTrigger, DialogTriggerProps, DialogUnderlay, DialogUnderlayProps, Editable, EditableArea, EditableAreaProps, EditableCancelButton, EditableCancelButtonProps, EditableControls, EditableControlsProps, EditableEditButton, EditableEditButtonProps, EditableInput, EditableInputProps, EditablePreview, EditablePreviewProps, EditableProps, EditableSubmitButton, EditableSubmitButtonProps, NumberInput, NumberInputDecrementButton, NumberInputDecrementButtonProps, NumberInputField, NumberInputFieldProps, NumberInputIncrementButton, NumberInputIncrementButtonProps, NumberInputProps, Pagination, PaginationContext, PaginationEllipsis, PaginationEllipsisProps, PaginationItem, PaginationItemProps, PaginationNextItem, PaginationNextItemProps, PaginationPrevItem, PaginationPrevItemProps, PaginationProps, PaginationProvider, PinInput, PinInputField, PinInputFieldProps, PinInputProps, Popover, PopoverArrow, PopoverArrowProps, PopoverCloseButton, PopoverCloseButtonProps, PopoverContent, PopoverContentProps, PopoverDescription, PopoverDescriptionProps, PopoverInnerArrow, PopoverInnerArrowProps, PopoverPositioner, PopoverPositionerProps, PopoverProps, PopoverTitle, PopoverTitleProps, PopoverTrigger, PopoverTriggerProps, Pressable, PressableProps, Radio, RadioControl, RadioControlProps, RadioGroup, RadioGroupLabel, RadioGroupLabelProps, RadioGroupProps, RadioInput, RadioInputProps, RadioLabel, RadioLabelProps, RadioProps, Rating, RatingGroup, RatingGroupProps, RatingItem, RatingItemProps, RatingLabel, RatingLabelProps, RatingProps, RenderIconFn, Tab, TabIndicator, TabIndicatorProps, TabList, TabListProps, TabPanel, TabPanelProps, TabPanels, TabPanelsProps, TabProps, Tabs, TabsProps, Tooltip, TooltipArrow, TooltipArrowProps, TooltipContent, TooltipContentProps, TooltipInnerArrow, TooltipInnerArrowProps, TooltipPositioner, TooltipPositionerProps, TooltipProps, TooltipTrigger, TooltipTriggerProps, UseAccordionProps, UseAccordionReturn, UseCheckboxProps, UseCheckboxReturn, UseEditableProps, UseEditableReturn, UsePaginationProps, UsePinInputProps, UsePinInputReturn, UsePopoverProps, UsePopoverReturn, UsePressableProps, UsePressableReturn, UseRadioGroupProps, UseRadioGroupReturn, UseRatingProps, UseRatingReturn, UseTabsProps, UseTabsReturn, UseTooltipProps, UseTooltipReturn, useAccordion, useAccordionItemContext, useCheckbox, useEditable, usePagination, usePaginationContext, usePinInput, usePopover, usePressable, useRadioGroup, useRating, useTabs, useTooltip };
export { Accordion, AccordionButton, AccordionButtonProps, AccordionIcon, AccordionIconProps, AccordionItem, AccordionItemContext, AccordionItemProps, AccordionPanel, AccordionPanelProps, AccordionProps, Checkbox, CheckboxControl, CheckboxControlProps, CheckboxInput, CheckboxInputProps, CheckboxLabel, CheckboxLabelProps, CheckboxProps, Dialog, DialogBackdrop, DialogBackdropProps, DialogCloseButton, DialogCloseButtonProps, DialogContent, DialogContentProps, DialogDescription, DialogDescriptionProps, DialogPortal, DialogPortalProps, DialogProps, DialogTitle, DialogTitleProps, DialogTrigger, DialogTriggerProps, DialogUnderlay, DialogUnderlayProps, Editable, EditableArea, EditableAreaProps, EditableCancelButton, EditableCancelButtonProps, EditableControls, EditableControlsProps, EditableEditButton, EditableEditButtonProps, EditableInput, EditableInputProps, EditablePreview, EditablePreviewProps, EditableProps, EditableSubmitButton, EditableSubmitButtonProps, NumberInput, NumberInputDecrementButton, NumberInputDecrementButtonProps, NumberInputField, NumberInputFieldProps, NumberInputIncrementButton, NumberInputIncrementButtonProps, NumberInputProps, Pagination, PaginationContext, PaginationEllipsis, PaginationEllipsisProps, PaginationItem, PaginationItemProps, PaginationNextItem, PaginationNextItemProps, PaginationPrevItem, PaginationPrevItemProps, PaginationProps, PaginationProvider, PinInput, PinInputField, PinInputFieldProps, PinInputProps, Popover, PopoverArrow, PopoverArrowProps, PopoverCloseButton, PopoverCloseButtonProps, PopoverContent, PopoverContentProps, PopoverDescription, PopoverDescriptionProps, PopoverInnerArrow, PopoverInnerArrowProps, PopoverPositioner, PopoverPositionerProps, PopoverProps, PopoverTitle, PopoverTitleProps, PopoverTrigger, PopoverTriggerProps, Pressable, PressableProps, Radio, RadioControl, RadioControlProps, RadioGroup, RadioGroupLabel, RadioGroupLabelProps, RadioGroupProps, RadioInput, RadioInputProps, RadioLabel, RadioLabelProps, RadioProps, Rating, RatingGroup, RatingGroupProps, RatingItem, RatingItemProps, RatingLabel, RatingLabelProps, RatingProps, RenderIconFn, Tab, TabIndicator, TabIndicatorProps, TabList, TabListProps, TabPanel, TabPanelProps, TabPanels, TabPanelsProps, TabProps, Tabs, TabsProps, Tag, TagDeleteButton, TagDeleteButtonProps, TagInput, TagInputProps, TagProps, TagsInput, TagsInputClearButton, TagsInputClearButtonProps, TagsInputControl, TagsInputControlProps, TagsInputField, TagsInputFieldProps, TagsInputProps, Tooltip, TooltipArrow, TooltipArrowProps, TooltipContent, TooltipContentProps, TooltipInnerArrow, TooltipInnerArrowProps, TooltipPositioner, TooltipPositionerProps, TooltipProps, TooltipTrigger, TooltipTriggerProps, UseAccordionProps, UseAccordionReturn, UseCheckboxProps, UseCheckboxReturn, UseEditableProps, UseEditableReturn, UsePaginationProps, UsePinInputProps, UsePinInputReturn, UsePopoverProps, UsePopoverReturn, UsePressableProps, UsePressableReturn, UseRadioGroupProps, UseRadioGroupReturn, UseRatingProps, UseRatingReturn, UseTabsProps, UseTabsReturn, UseTagsInputProps, UseTagsInputReturn, UseTooltipProps, UseTooltipReturn, useAccordion, useAccordionItemContext, useCheckbox, useEditable, usePagination, usePaginationContext, usePinInput, usePopover, usePressable, useRadioGroup, useRating, useTabs, useTagsInput, useTooltip };

@@ -1442,2 +1442,154 @@ // src/accordion/accordion.tsx

// src/tags-input/tag.tsx
import { forwardRef as forwardRef59 } from "@polymorphic-factory/react";
import { mergeProps as mergeProps57 } from "@zag-js/react";
// src/tags-input/tags-input-context.ts
var [TagsInputProvider, useTagsInputContext] = createContext({
name: "TagsInputContext",
hookName: "useTagsInputContext",
providerName: "<TagsInputProvider />"
});
// src/tags-input/tag.tsx
import { jsx as jsx64 } from "react/jsx-runtime";
var Tag = forwardRef59((props, ref) => {
const [tagProps, divProps] = splitProps(props, ["index", "disabled", "value"]);
const { getTagProps } = useTagsInputContext();
const mergedProps = mergeProps57(getTagProps(tagProps), divProps);
return /* @__PURE__ */ jsx64(ark.div, {
...mergedProps,
ref
});
});
// src/tags-input/tag-delete-button.tsx
import { forwardRef as forwardRef60 } from "@polymorphic-factory/react";
import { mergeProps as mergeProps58 } from "@zag-js/react";
import { jsx as jsx65 } from "react/jsx-runtime";
var TagDeleteButton = forwardRef60((props, ref) => {
const { getTagDeleteButtonProps } = useTagsInputContext();
const [tagProps, buttonProps] = splitProps(props, ["index", "disabled", "value"]);
const mergedProps = mergeProps58(getTagDeleteButtonProps(tagProps), buttonProps);
return /* @__PURE__ */ jsx65(ark.button, {
...mergedProps,
ref
});
});
// src/tags-input/tag-input.tsx
import { forwardRef as forwardRef61 } from "@polymorphic-factory/react";
import { mergeProps as mergeProps59 } from "@zag-js/react";
import { jsx as jsx66 } from "react/jsx-runtime";
var TagInput = forwardRef61((props, ref) => {
const [tagProps, inputProps] = splitProps(props, ["index", "disabled", "value"]);
const { getTagInputProps } = useTagsInputContext();
const mergedProps = mergeProps59(getTagInputProps(tagProps), inputProps);
return /* @__PURE__ */ jsx66(ark.input, {
...mergedProps,
ref
});
});
// src/tags-input/tags-input.tsx
import { forwardRef as forwardRef62 } from "@polymorphic-factory/react";
import { mergeProps as mergeProps60 } from "@zag-js/react";
// src/tags-input/use-tags-input.ts
import { normalizeProps as normalizeProps13, useMachine as useMachine13 } from "@zag-js/react";
import * as tagsInput from "@zag-js/tags-input";
import { useId as useId13 } from "react";
var useTagsInput = (props) => {
const initialContext = filterUndefinedEntries({
id: useId13(),
...props,
value: props.value ?? props.defaultValue
});
const [state, send] = useMachine13(tagsInput.machine(initialContext));
return tagsInput.connect(state, send, normalizeProps13);
};
// src/tags-input/tags-input.tsx
import { jsx as jsx67 } from "react/jsx-runtime";
var TagsInput = forwardRef62((props, ref) => {
const [useTagsInputProps, { children, ...inputProps }] = splitProps(props, [
"addOnPaste",
"allowEditTag",
"allowOverflow",
"autoFocus",
"blurBehavior",
"defaultValue",
"delimiter",
"dir",
"disabled",
"getRootNode",
"ids",
"inputValue",
"invalid",
"max",
"maxLength",
"name",
"onChange",
"onHighlight",
"onInvalid",
"onTagUpdate",
"readonly",
"translations",
"validate",
"value"
]);
const tagsInput2 = useTagsInput(useTagsInputProps);
const mergedProps = mergeProps60(tagsInput2.rootProps, inputProps);
const view = runIfFn(children, tagsInput2);
return /* @__PURE__ */ jsx67(TagsInputProvider, {
value: tagsInput2,
children: /* @__PURE__ */ jsx67(ark.div, {
...mergedProps,
ref,
children: view
})
});
});
// src/tags-input/tags-input-clear-button.tsx
import { forwardRef as forwardRef63 } from "@polymorphic-factory/react";
import { mergeProps as mergeProps61 } from "@zag-js/react";
import { jsx as jsx68 } from "react/jsx-runtime";
var TagsInputClearButton = forwardRef63(
(props, ref) => {
const { clearButtonProps } = useTagsInputContext();
const mergedProps = mergeProps61(clearButtonProps, props);
return /* @__PURE__ */ jsx68(ark.button, {
...mergedProps,
ref
});
}
);
// src/tags-input/tags-input-control.tsx
import { forwardRef as forwardRef64 } from "@polymorphic-factory/react";
import { mergeProps as mergeProps62 } from "@zag-js/react";
import { jsx as jsx69 } from "react/jsx-runtime";
var TagsInputControl = forwardRef64((props, ref) => {
const { controlProps } = useTagsInputContext();
const mergedProps = mergeProps62(controlProps, props);
return /* @__PURE__ */ jsx69(ark.div, {
...mergedProps,
ref
});
});
// src/tags-input/tags-input-field.tsx
import { forwardRef as forwardRef65 } from "@polymorphic-factory/react";
import { mergeProps as mergeProps63 } from "@zag-js/react";
import { jsx as jsx70 } from "react/jsx-runtime";
var TagsInputField = forwardRef65((props, ref) => {
const { inputProps } = useTagsInputContext();
const mergedProps = mergeProps63(inputProps, props);
return /* @__PURE__ */ jsx70(ark.input, {
...mergedProps,
ref
});
});
// src/tooltip/tooltip-context.tsx

@@ -1451,20 +1603,20 @@ var [TooltipProvider, useTooltipContext] = createContext({

// src/tooltip/use-tooltip.ts
import { normalizeProps as normalizeProps13, useMachine as useMachine13 } from "@zag-js/react";
import { normalizeProps as normalizeProps14, useMachine as useMachine14 } from "@zag-js/react";
import * as tooltip from "@zag-js/tooltip";
import { useId as useId13 } from "react";
import { useId as useId14 } from "react";
var useTooltip = (props) => {
const initialContext = filterUndefinedEntries({
id: useId13(),
id: useId14(),
...props
});
const [state, send] = useMachine13(tooltip.machine(initialContext), { context: initialContext });
return tooltip.connect(state, send, normalizeProps13);
const [state, send] = useMachine14(tooltip.machine(initialContext), { context: initialContext });
return tooltip.connect(state, send, normalizeProps14);
};
// src/tooltip/tooltip.tsx
import { jsx as jsx64 } from "react/jsx-runtime";
import { jsx as jsx71 } from "react/jsx-runtime";
var Tooltip = (props) => {
const { children, ...useTooltipProps } = props;
const tooltip2 = useTooltip(useTooltipProps);
return /* @__PURE__ */ jsx64(TooltipProvider, {
return /* @__PURE__ */ jsx71(TooltipProvider, {
value: tooltip2,

@@ -1476,9 +1628,9 @@ children

// src/tooltip/tooltip-arrow.tsx
import { forwardRef as forwardRef59 } from "@polymorphic-factory/react";
import { mergeProps as mergeProps57 } from "@zag-js/react";
import { jsx as jsx65 } from "react/jsx-runtime";
var TooltipArrow = forwardRef59((props, ref) => {
import { forwardRef as forwardRef66 } from "@polymorphic-factory/react";
import { mergeProps as mergeProps64 } from "@zag-js/react";
import { jsx as jsx72 } from "react/jsx-runtime";
var TooltipArrow = forwardRef66((props, ref) => {
const { arrowProps } = useTooltipContext();
const mergedProps = mergeProps57(arrowProps, props);
return /* @__PURE__ */ jsx65(ark.div, {
const mergedProps = mergeProps64(arrowProps, props);
return /* @__PURE__ */ jsx72(ark.div, {
...mergedProps,

@@ -1490,9 +1642,9 @@ ref

// src/tooltip/tooltip-content.tsx
import { forwardRef as forwardRef60 } from "@polymorphic-factory/react";
import { mergeProps as mergeProps58 } from "@zag-js/react";
import { jsx as jsx66 } from "react/jsx-runtime";
var TooltipContent = forwardRef60((props, ref) => {
import { forwardRef as forwardRef67 } from "@polymorphic-factory/react";
import { mergeProps as mergeProps65 } from "@zag-js/react";
import { jsx as jsx73 } from "react/jsx-runtime";
var TooltipContent = forwardRef67((props, ref) => {
const { contentProps } = useTooltipContext();
const mergedProps = mergeProps58(contentProps, props);
return /* @__PURE__ */ jsx66(ark.div, {
const mergedProps = mergeProps65(contentProps, props);
return /* @__PURE__ */ jsx73(ark.div, {
...mergedProps,

@@ -1504,9 +1656,9 @@ ref

// src/tooltip/tooltip-inner-arrow.tsx
import { forwardRef as forwardRef61 } from "@polymorphic-factory/react";
import { mergeProps as mergeProps59 } from "@zag-js/react";
import { jsx as jsx67 } from "react/jsx-runtime";
var TooltipInnerArrow = forwardRef61((props, ref) => {
import { forwardRef as forwardRef68 } from "@polymorphic-factory/react";
import { mergeProps as mergeProps66 } from "@zag-js/react";
import { jsx as jsx74 } from "react/jsx-runtime";
var TooltipInnerArrow = forwardRef68((props, ref) => {
const { innerArrowProps } = useTooltipContext();
const mergedProps = mergeProps59(innerArrowProps, props);
return /* @__PURE__ */ jsx67(ark.div, {
const mergedProps = mergeProps66(innerArrowProps, props);
return /* @__PURE__ */ jsx74(ark.div, {
...mergedProps,

@@ -1518,9 +1670,9 @@ ref

// src/tooltip/tooltip-positioner.tsx
import { forwardRef as forwardRef62 } from "@polymorphic-factory/react";
import { mergeProps as mergeProps60 } from "@zag-js/react";
import { jsx as jsx68 } from "react/jsx-runtime";
var TooltipPositioner = forwardRef62((props, ref) => {
import { forwardRef as forwardRef69 } from "@polymorphic-factory/react";
import { mergeProps as mergeProps67 } from "@zag-js/react";
import { jsx as jsx75 } from "react/jsx-runtime";
var TooltipPositioner = forwardRef69((props, ref) => {
const { positionerProps, isOpen } = useTooltipContext();
const mergedProps = mergeProps60(positionerProps, props);
return isOpen ? /* @__PURE__ */ jsx68(ark.div, {
const mergedProps = mergeProps67(positionerProps, props);
return isOpen ? /* @__PURE__ */ jsx75(ark.div, {
...mergedProps,

@@ -1533,7 +1685,7 @@ ref

import { cloneElement as cloneElement3 } from "react";
import { jsx as jsx69 } from "react/jsx-runtime";
import { jsx as jsx76 } from "react/jsx-runtime";
var TooltipTrigger = (props) => {
const { children } = props;
const { triggerProps } = useTooltipContext();
return typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ jsx69(ark.span, {
return typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ jsx76(ark.span, {
...triggerProps,

@@ -1608,2 +1760,9 @@ children

Tabs,
Tag,
TagDeleteButton,
TagInput,
TagsInput,
TagsInputClearButton,
TagsInputControl,
TagsInputField,
Tooltip,

@@ -1627,3 +1786,4 @@ TooltipArrow,

useTabs,
useTagsInput,
useTooltip
};

2

package.json
{
"name": "@ark-ui/react",
"version": "0.0.0-rc-20221106114650",
"version": "0.0.0-rc-20221106185238",
"description": "",

@@ -5,0 +5,0 @@ "keywords": [],

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc