@ark-ui/solid 1.0.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +65 -0
- package/README.md +67 -61
- package/cjs/index.js +331 -99
- package/cjs/index.js.map +1 -1
- package/esm/index.js +315 -100
- package/esm/index.js.map +1 -1
- package/package.json +55 -50
- package/source/color-picker/color-picker-format-select.jsx +13 -0
- package/source/color-picker/color-picker-format-trigger.jsx +8 -0
- package/source/color-picker/color-picker-swatch-context.js +5 -0
- package/source/color-picker/color-picker-swatch-indicator.jsx +10 -0
- package/source/color-picker/color-picker-swatch-trigger.jsx +4 -1
- package/source/color-picker/color-picker-swatch.jsx +6 -3
- package/source/color-picker/color-picker.jsx +3 -1
- package/source/color-picker/index.js +7 -1
- package/source/date-picker/date-picker.jsx +1 -1
- package/source/dialog/dialog-close-trigger.jsx +1 -1
- package/source/editable/editable-area.jsx +2 -2
- package/source/editable/editable-cancel-trigger.jsx +2 -2
- package/source/editable/editable-control.jsx +2 -2
- package/source/editable/editable-edit-trigger.jsx +2 -2
- package/source/editable/editable-input.jsx +2 -2
- package/source/editable/editable-label.jsx +2 -2
- package/source/editable/editable-preview.jsx +2 -2
- package/source/editable/editable-submit-trigger.jsx +2 -2
- package/source/editable/editable.jsx +5 -7
- package/source/file-upload/file-upload-context.js +5 -0
- package/source/file-upload/file-upload-dropzone.jsx +11 -0
- package/source/file-upload/file-upload-item-context.js +5 -0
- package/source/file-upload/file-upload-item-delete-trigger.jsx +10 -0
- package/source/file-upload/file-upload-item-group.jsx +10 -0
- package/source/file-upload/file-upload-item-name.jsx +12 -0
- package/source/file-upload/file-upload-item-preview-image.jsx +13 -0
- package/source/file-upload/file-upload-item-preview.jsx +12 -0
- package/source/file-upload/file-upload-item-size-text.jsx +12 -0
- package/source/file-upload/file-upload-item.jsx +15 -0
- package/source/file-upload/file-upload-label.jsx +8 -0
- package/source/file-upload/file-upload-trigger.jsx +8 -0
- package/source/file-upload/file-upload.jsx +34 -0
- package/source/file-upload/index.js +26 -0
- package/source/file-upload/use-file-upload.js +10 -0
- package/source/index.jsx +1 -0
- package/source/number-input/index.js +1 -1
- package/source/number-input/number-input.jsx +4 -2
- package/source/pagination/pagination-ellipsis.jsx +2 -2
- package/source/pagination/pagination.jsx +2 -4
- package/source/pin-input/index.js +1 -1
- package/source/pin-input/pin-input.jsx +2 -2
- package/source/radio-group/radio-group-item-context.js +2 -2
- package/source/radio-group/radio-group-item.jsx +9 -6
- package/source/rating-group/rating-group-control.jsx +1 -1
- package/source/rating-group/rating-group-item.jsx +2 -2
- package/source/rating-group/rating-group.jsx +2 -2
- package/source/segment-group/segment-group-item-context.js +2 -2
- package/source/segment-group/segment-group-item.jsx +9 -6
- package/source/select/select-indicator.jsx +1 -1
- package/source/select/select-item-group.jsx +2 -2
- package/source/select/select.jsx +2 -2
- package/source/switch/switch-label.jsx +2 -2
- package/source/switch/switch-thumb.jsx +2 -2
- package/source/switch/switch.jsx +2 -2
- package/source/toast/create-toaster.jsx +9 -10
- package/source/toast/index.js +5 -3
- package/source/toast/toast-group.jsx +4 -0
- package/types/color-picker/color-picker-format-select.d.ts +4 -0
- package/types/color-picker/color-picker-format-trigger.d.ts +4 -0
- package/types/color-picker/color-picker-swatch-context.d.ts +4 -0
- package/types/color-picker/color-picker-swatch-indicator.d.ts +4 -0
- package/types/color-picker/color-picker-swatch-trigger.d.ts +1 -5
- package/types/color-picker/color-picker-transparency-grid.d.ts +2 -5
- package/types/color-picker/index.d.ts +10 -3
- package/types/color-picker/use-color-picker.d.ts +3 -0
- package/types/file-upload/file-upload-context.d.ts +4 -0
- package/types/file-upload/file-upload-dropzone.d.ts +4 -0
- package/types/file-upload/file-upload-item-context.d.ts +4 -0
- package/types/file-upload/file-upload-item-delete-trigger.d.ts +4 -0
- package/types/file-upload/file-upload-item-group.d.ts +8 -0
- package/types/file-upload/file-upload-item-name.d.ts +4 -0
- package/types/file-upload/file-upload-item-preview-image.d.ts +4 -0
- package/types/file-upload/file-upload-item-preview.d.ts +9 -0
- package/types/file-upload/file-upload-item-size-text.d.ts +4 -0
- package/types/file-upload/file-upload-item.d.ts +6 -0
- package/types/file-upload/file-upload-label.d.ts +4 -0
- package/types/file-upload/file-upload-trigger.d.ts +4 -0
- package/types/file-upload/file-upload.d.ts +9 -0
- package/types/file-upload/index.d.ts +27 -0
- package/types/file-upload/use-file-upload.d.ts +9 -0
- package/types/index.d.ts +1 -0
- package/types/number-input/index.d.ts +1 -1
- package/types/number-input/number-input.d.ts +6 -3
- package/types/pin-input/index.d.ts +1 -1
- package/types/radio-group/radio-group-item-context.d.ts +1 -1
- package/types/radio-group/radio-group-item.d.ts +6 -3
- package/types/rating-group/rating-group-item-context.d.ts +2 -3
- package/types/segment-group/segment-group-item-context.d.ts +3 -14
- package/types/segment-group/segment-group-item.d.ts +6 -2
- package/types/toast/create-toaster.d.ts +3 -2
- package/types/toast/index.d.ts +6 -4
- package/types/toast/toast-context.d.ts +7 -2
- package/types/toast/toast-group.d.ts +4 -0
- /package/source/number-input/{number-input-field.jsx → number-input-input.jsx} +0 -0
- /package/source/pin-input/{pin-input-field.jsx → pin-input-input.jsx} +0 -0
- /package/types/number-input/{number-input-field.d.ts → number-input-input.d.ts} +0 -0
- /package/types/pin-input/{pin-input-field.d.ts → pin-input-input.d.ts} +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type FileUploadProps } from './file-upload';
|
|
2
|
+
import { useFileUploadContext, type FileUploadContext } from './file-upload-context';
|
|
3
|
+
import { FileUploadDropzone, type FileUploadDropzoneProps } from './file-upload-dropzone';
|
|
4
|
+
import { FileUploadItem, type FileUploadItemProps } from './file-upload-item';
|
|
5
|
+
import { FileUploadItemDeleteTrigger, type FileUploadItemDeleteTriggerProps } from './file-upload-item-delete-trigger';
|
|
6
|
+
import { FileUploadItemGroup, type FileUploadItemGroupProps } from './file-upload-item-group';
|
|
7
|
+
import { FileUploadItemName, type FileUploadItemNameProps } from './file-upload-item-name';
|
|
8
|
+
import { type FileUploadItemPreviewProps } from './file-upload-item-preview';
|
|
9
|
+
import { FileUploadItemPreviewImage, type FileUploadItemPreviewImageProps } from './file-upload-item-preview-image';
|
|
10
|
+
import { FileUploadItemSizeText, type FileUploadItemSizeTextProps } from './file-upload-item-size-text';
|
|
11
|
+
import { FileUploadLabel, type FileUploadLabelProps } from './file-upload-label';
|
|
12
|
+
import { FileUploadTrigger, type FileUploadTriggerProps } from './file-upload-trigger';
|
|
13
|
+
declare const FileUpload: ((props: FileUploadProps) => import("solid-js").JSX.Element) & {
|
|
14
|
+
Root: (props: FileUploadProps) => import("solid-js").JSX.Element;
|
|
15
|
+
Dropzone: (props: FileUploadDropzoneProps) => import("solid-js").JSX.Element;
|
|
16
|
+
Item: (props: FileUploadItemProps) => import("solid-js").JSX.Element;
|
|
17
|
+
ItemDeleteTrigger: (props: FileUploadItemDeleteTriggerProps) => import("solid-js").JSX.Element;
|
|
18
|
+
ItemGroup: (props: FileUploadItemGroupProps) => import("solid-js").JSX.Element;
|
|
19
|
+
ItemName: (props: FileUploadItemNameProps) => import("solid-js").JSX.Element;
|
|
20
|
+
ItemPreview: (props: FileUploadItemPreviewProps) => import("solid-js").JSX.Element;
|
|
21
|
+
ItemPreviewImage: (props: FileUploadItemPreviewImageProps) => import("solid-js").JSX.Element;
|
|
22
|
+
ItemSizeText: (props: FileUploadItemSizeTextProps) => import("solid-js").JSX.Element;
|
|
23
|
+
Label: (props: FileUploadLabelProps) => import("solid-js").JSX.Element;
|
|
24
|
+
Trigger: (props: FileUploadTriggerProps) => import("solid-js").JSX.Element;
|
|
25
|
+
};
|
|
26
|
+
export { FileUpload, FileUploadDropzone, FileUploadItem, FileUploadItemDeleteTrigger, FileUploadItemGroup, FileUploadItemName, FileUploadItemPreviewImage, FileUploadItemSizeText, FileUploadLabel, FileUploadTrigger, useFileUploadContext, };
|
|
27
|
+
export type { FileUploadContext, FileUploadDropzoneProps, FileUploadItemDeleteTriggerProps, FileUploadItemGroupProps, FileUploadItemNameProps, FileUploadItemPreviewImageProps, FileUploadItemPreviewProps, FileUploadItemProps, FileUploadItemSizeTextProps, FileUploadLabelProps, FileUploadProps, FileUploadTriggerProps, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as fileUpload from '@zag-js/file-upload';
|
|
2
|
+
import { type PropTypes } from '@zag-js/solid';
|
|
3
|
+
import { type Accessor } from 'solid-js';
|
|
4
|
+
import { type Optional } from '../types';
|
|
5
|
+
export interface UseFileUploadProps extends Optional<fileUpload.Context, 'id'> {
|
|
6
|
+
}
|
|
7
|
+
export interface UseFileUploadReturn extends Accessor<fileUpload.Api<PropTypes>> {
|
|
8
|
+
}
|
|
9
|
+
export declare const useFileUpload: (props: UseFileUploadProps) => UseFileUploadReturn;
|
package/types/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { type NumberInputProps } from './number-input';
|
|
|
2
2
|
import { useNumberInputContext, type NumberInputContext } from './number-input-context';
|
|
3
3
|
import { NumberInputControl, type NumberInputControlProps } from './number-input-control';
|
|
4
4
|
import { NumberInputDecrementTrigger, type NumberInputDecrementTriggerProps } from './number-input-decrement-trigger';
|
|
5
|
-
import { NumberInputInput, type NumberInputInputProps } from './number-input-field';
|
|
6
5
|
import { NumberInputIncrementTrigger, type NumberInputIncrementTriggerProps } from './number-input-increment-trigger';
|
|
6
|
+
import { NumberInputInput, type NumberInputInputProps } from './number-input-input';
|
|
7
7
|
import { NumberInputLabel, type NumberInputLabelProps } from './number-input-label';
|
|
8
8
|
import { NumberInputScrubber, type NumberInputScrubberProps } from './number-input-scrubber';
|
|
9
9
|
declare const NumberInput: ((props: NumberInputProps) => import("solid-js").JSX.Element) & {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type JSX } from 'solid-js';
|
|
1
2
|
import { type HTMLArkProps } from '../factory';
|
|
2
3
|
import type { Assign } from '../types';
|
|
3
|
-
import { type UseNumberInputProps } from './use-number-input';
|
|
4
|
-
export interface NumberInputProps extends Assign<HTMLArkProps<'div'>,
|
|
4
|
+
import { type UseNumberInputProps, type UseNumberInputReturn } from './use-number-input';
|
|
5
|
+
export interface NumberInputProps extends Assign<Assign<HTMLArkProps<'div'>, {
|
|
6
|
+
children?: JSX.Element | ((api: UseNumberInputReturn) => JSX.Element);
|
|
7
|
+
}>, UseNumberInputProps> {
|
|
5
8
|
}
|
|
6
|
-
export declare const NumberInput: (props: NumberInputProps) =>
|
|
9
|
+
export declare const NumberInput: (props: NumberInputProps) => JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type PinInputProps } from './pin-input';
|
|
2
2
|
import { usePinInputContext, type PinInputContext } from './pin-input-context';
|
|
3
3
|
import { PinInputControl, type PinInputControlProps } from './pin-input-control';
|
|
4
|
-
import { PinInputInput, type PinInputInputProps } from './pin-input-
|
|
4
|
+
import { PinInputInput, type PinInputInputProps } from './pin-input-input';
|
|
5
5
|
import { PinInputLabel, type PinInputLabelProps } from './pin-input-label';
|
|
6
6
|
declare const PinInput: ((props: PinInputProps) => import("solid-js").JSX.Element) & {
|
|
7
7
|
Root: (props: PinInputProps) => import("solid-js").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ItemProps } from '@zag-js/radio-group';
|
|
2
2
|
export interface RadioGroupItemContext extends ItemProps {
|
|
3
3
|
}
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const RadioGroupItemProvider: import("solid-js").ContextProviderComponent<RadioGroupItemContext>, useRadioGroupItemContext: () => RadioGroupItemContext;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type { ItemProps } from '@zag-js/radio-group';
|
|
1
|
+
import type { ItemProps, ItemState } from '@zag-js/radio-group';
|
|
2
|
+
import type { JSX } from 'solid-js/jsx-runtime';
|
|
2
3
|
import { type HTMLArkProps } from '../factory';
|
|
3
4
|
import type { Assign } from '../types';
|
|
4
|
-
export interface RadioGroupItemProps extends Assign<HTMLArkProps<'label'>,
|
|
5
|
+
export interface RadioGroupItemProps extends Assign<HTMLArkProps<'label'>, {
|
|
6
|
+
children?: ((state: ItemState) => JSX.Element) | JSX.Element;
|
|
7
|
+
}>, ItemProps {
|
|
5
8
|
}
|
|
6
|
-
export declare const RadioGroupItem: (props: RadioGroupItemProps) =>
|
|
9
|
+
export declare const RadioGroupItem: (props: RadioGroupItemProps) => JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
export interface RatingGroupItemContext extends Accessor<ItemState> {
|
|
1
|
+
import { type ItemProps } from '@zag-js/rating-group';
|
|
2
|
+
export interface RatingGroupItemContext extends ItemProps {
|
|
4
3
|
}
|
|
5
4
|
export declare const RatingGroupItemProvider: import("solid-js").ContextProviderComponent<RatingGroupItemContext>, useRatingGroupItemContext: () => RatingGroupItemContext;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
disabled?: boolean;
|
|
4
|
-
invalid?: boolean;
|
|
1
|
+
import type { ItemProps } from '@zag-js/radio-group';
|
|
2
|
+
export interface SegmentGroupItemContext extends ItemProps {
|
|
5
3
|
}
|
|
6
|
-
export
|
|
7
|
-
isInvalid: boolean;
|
|
8
|
-
isDisabled: boolean;
|
|
9
|
-
isChecked: boolean;
|
|
10
|
-
isFocused: boolean;
|
|
11
|
-
isHovered: boolean;
|
|
12
|
-
isActive: boolean;
|
|
13
|
-
}
|
|
14
|
-
export type SegmentGroupItemContext = ItemProps;
|
|
15
|
-
export declare const SegmentProvider: import("solid-js").ContextProviderComponent<ItemProps>, useSegmentGroupItemContext: () => ItemProps;
|
|
4
|
+
export declare const SegmentGroupItemProvider: import("solid-js").ContextProviderComponent<SegmentGroupItemContext>, useSegmentGroupItemContext: () => SegmentGroupItemContext;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import type { ItemState } from '@zag-js/radio-group';
|
|
2
|
+
import type { JSX } from 'solid-js/jsx-runtime';
|
|
1
3
|
import { type HTMLArkProps } from '../factory';
|
|
2
4
|
import type { Assign } from '../types';
|
|
3
5
|
import { type SegmentGroupItemContext } from './segment-group-item-context';
|
|
4
|
-
export interface SegmentGroupItemProps extends Assign<HTMLArkProps<'label'>,
|
|
6
|
+
export interface SegmentGroupItemProps extends Assign<HTMLArkProps<'label'>, {
|
|
7
|
+
children?: ((state: ItemState) => JSX.Element) | JSX.Element;
|
|
8
|
+
}>, SegmentGroupItemContext {
|
|
5
9
|
}
|
|
6
|
-
export declare const SegmentGroupItem: (props: SegmentGroupItemProps) =>
|
|
10
|
+
export declare const SegmentGroupItem: (props: SegmentGroupItemProps) => JSX.Element;
|
|
@@ -3,14 +3,15 @@ import * as toast from '@zag-js/toast';
|
|
|
3
3
|
import { type Accessor, type JSX } from 'solid-js';
|
|
4
4
|
import { type HTMLArkProps } from '../factory';
|
|
5
5
|
import type { Optional } from '../types';
|
|
6
|
+
import { type Options } from './toast-context';
|
|
6
7
|
type GroupContext = Partial<toast.GroupMachineContext>;
|
|
7
8
|
export interface CreateToasterProps extends Omit<Optional<GroupContext, 'id'>, 'render'> {
|
|
8
9
|
placement: toast.Placement;
|
|
9
|
-
render: (api: toast.Api<PropTypes
|
|
10
|
+
render: (api: Accessor<toast.Api<PropTypes, Options>>) => JSX.Element;
|
|
10
11
|
}
|
|
11
12
|
export type CreateToasterReturn = [
|
|
12
13
|
(props: HTMLArkProps<'ol'>) => JSX.Element,
|
|
13
|
-
Accessor<toast.GroupApi<PropTypes>>
|
|
14
|
+
Accessor<toast.GroupApi<PropTypes, Options>>
|
|
14
15
|
];
|
|
15
16
|
export declare const createToaster: (props: CreateToasterProps) => CreateToasterReturn;
|
|
16
17
|
export {};
|
package/types/toast/index.d.ts
CHANGED
|
@@ -2,12 +2,14 @@ import { createToaster, type CreateToasterProps, type CreateToasterReturn } from
|
|
|
2
2
|
import { type ToastProps } from './toast';
|
|
3
3
|
import { ToastCloseTrigger, type ToastCloseTriggerProps } from './toast-close-trigger';
|
|
4
4
|
import { ToastDescription, type ToastDescriptionProps } from './toast-description';
|
|
5
|
+
import { ToastGroup, type ToastGroupProps } from './toast-group';
|
|
5
6
|
import { ToastTitle, type ToastTitleProps } from './toast-title';
|
|
6
7
|
declare const Toast: ((props: ToastProps) => import("solid-js").JSX.Element) & {
|
|
7
8
|
Root: (props: ToastProps) => import("solid-js").JSX.Element;
|
|
8
|
-
Title: (props: ToastTitleProps) => import("solid-js").JSX.Element;
|
|
9
|
-
Description: (props: ToastDescriptionProps) => import("solid-js").JSX.Element;
|
|
10
9
|
CloseTrigger: (props: ToastCloseTriggerProps) => import("solid-js").JSX.Element;
|
|
10
|
+
Description: (props: ToastDescriptionProps) => import("solid-js").JSX.Element;
|
|
11
|
+
Group: (props: ToastGroupProps) => import("solid-js").JSX.Element;
|
|
12
|
+
Title: (props: ToastTitleProps) => import("solid-js").JSX.Element;
|
|
11
13
|
};
|
|
12
|
-
export { createToaster, Toast, ToastCloseTrigger, ToastDescription, ToastTitle };
|
|
13
|
-
export type { CreateToasterProps, CreateToasterReturn, ToastCloseTriggerProps, ToastDescriptionProps, ToastProps, ToastTitleProps, };
|
|
14
|
+
export { createToaster, Toast, ToastCloseTrigger, ToastDescription, ToastGroup, ToastTitle };
|
|
15
|
+
export type { CreateToasterProps, CreateToasterReturn, ToastCloseTriggerProps, ToastDescriptionProps, ToastGroupProps, ToastProps, ToastTitleProps, };
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { PropTypes } from '@zag-js/solid';
|
|
2
2
|
import * as toast from '@zag-js/toast';
|
|
3
|
-
import type { Accessor } from 'solid-js';
|
|
4
|
-
export interface
|
|
3
|
+
import type { Accessor, JSX } from 'solid-js';
|
|
4
|
+
export interface Options {
|
|
5
|
+
render: (api: Accessor<toast.Api<PropTypes, Options>>) => JSX.Element;
|
|
6
|
+
title: JSX.Element;
|
|
7
|
+
description: JSX.Element;
|
|
8
|
+
}
|
|
9
|
+
export interface ToastContext extends Accessor<toast.Api<PropTypes, Options>> {
|
|
5
10
|
}
|
|
6
11
|
export declare const ToastProvider: import("solid-js").ContextProviderComponent<ToastContext>, useToastContext: () => ToastContext;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|