@plasmicpkgs/react-aria 0.0.42 → 0.0.44
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/.tsbuildinfo +1 -1
- package/dist/common.d.ts +8 -1
- package/dist/contexts.d.ts +3 -2
- package/dist/react-aria.esm.js +863 -670
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +861 -668
- package/dist/react-aria.js.map +1 -1
- package/dist/registerButton.d.ts +1 -1
- package/dist/registerCheckbox.d.ts +3 -4
- package/dist/registerCheckboxGroup.d.ts +2 -2
- package/dist/registerInput.d.ts +12 -5
- package/dist/registerListBox.d.ts +2 -3
- package/dist/registerModal.d.ts +2 -3
- package/dist/registerPopover.d.ts +4 -6
- package/dist/registerRadio.d.ts +3 -5
- package/dist/registerRadioGroup.d.ts +1 -1
- package/dist/registerSlider.d.ts +3 -20
- package/dist/registerSliderOutput.d.ts +1 -1
- package/dist/registerSliderThumb.d.ts +3 -3
- package/dist/registerSliderTrack.d.ts +3 -1
- package/dist/registerSwitch.d.ts +1 -1
- package/dist/registerTextArea.d.ts +11 -5
- package/dist/registerTextField.d.ts +3 -3
- package/dist/utils.d.ts +7 -1
- package/package.json +2 -2
- package/skinny/common-96be13c3.esm.js +341 -0
- package/skinny/common-96be13c3.esm.js.map +1 -0
- package/skinny/common-f51484c1.cjs.js +345 -0
- package/skinny/common-f51484c1.cjs.js.map +1 -0
- package/skinny/common.d.ts +8 -1
- package/skinny/{contexts-7236059e.cjs.js → contexts-3a98471a.cjs.js} +1 -3
- package/skinny/contexts-3a98471a.cjs.js.map +1 -0
- package/skinny/{contexts-21e0d928.esm.js → contexts-87c261f6.esm.js} +2 -3
- package/skinny/contexts-87c261f6.esm.js.map +1 -0
- package/skinny/contexts.d.ts +3 -2
- package/skinny/registerButton.cjs.js +2 -2
- package/skinny/registerButton.cjs.js.map +1 -1
- package/skinny/registerButton.d.ts +1 -1
- package/skinny/registerButton.esm.js +2 -2
- package/skinny/registerButton.esm.js.map +1 -1
- package/skinny/registerCheckbox.cjs.js +13 -18
- package/skinny/registerCheckbox.cjs.js.map +1 -1
- package/skinny/registerCheckbox.d.ts +3 -4
- package/skinny/registerCheckbox.esm.js +13 -18
- package/skinny/registerCheckbox.esm.js.map +1 -1
- package/skinny/registerCheckboxGroup.cjs.js +5 -5
- package/skinny/registerCheckboxGroup.cjs.js.map +1 -1
- package/skinny/registerCheckboxGroup.d.ts +2 -2
- package/skinny/registerCheckboxGroup.esm.js +5 -5
- package/skinny/registerCheckboxGroup.esm.js.map +1 -1
- package/skinny/registerComboBox.cjs.js +3 -3
- package/skinny/registerComboBox.esm.js +3 -3
- package/skinny/registerDialogTrigger.cjs.js +2 -2
- package/skinny/registerDialogTrigger.esm.js +2 -2
- package/skinny/registerHeader.cjs.js +1 -1
- package/skinny/registerHeader.esm.js +1 -1
- package/skinny/registerInput.cjs.js +76 -16
- package/skinny/registerInput.cjs.js.map +1 -1
- package/skinny/registerInput.d.ts +12 -5
- package/skinny/registerInput.esm.js +76 -17
- package/skinny/registerInput.esm.js.map +1 -1
- package/skinny/{registerListBox-f060da58.cjs.js → registerListBox-44316bb6.cjs.js} +7 -7
- package/skinny/registerListBox-44316bb6.cjs.js.map +1 -0
- package/skinny/{registerListBox-38a08460.esm.js → registerListBox-ccd14a2e.esm.js} +7 -7
- package/skinny/registerListBox-ccd14a2e.esm.js.map +1 -0
- package/skinny/registerListBox.cjs.js +3 -2
- package/skinny/registerListBox.cjs.js.map +1 -1
- package/skinny/registerListBox.d.ts +2 -3
- package/skinny/registerListBox.esm.js +3 -2
- package/skinny/registerListBox.esm.js.map +1 -1
- package/skinny/registerListBoxItem.cjs.js +1 -1
- package/skinny/registerListBoxItem.esm.js +1 -1
- package/skinny/registerModal.cjs.js +5 -4
- package/skinny/registerModal.cjs.js.map +1 -1
- package/skinny/registerModal.d.ts +2 -3
- package/skinny/registerModal.esm.js +5 -4
- package/skinny/registerModal.esm.js.map +1 -1
- package/skinny/registerPopover.cjs.js +23 -24
- package/skinny/registerPopover.cjs.js.map +1 -1
- package/skinny/registerPopover.d.ts +4 -6
- package/skinny/registerPopover.esm.js +24 -25
- package/skinny/registerPopover.esm.js.map +1 -1
- package/skinny/registerRadio.cjs.js +14 -26
- package/skinny/registerRadio.cjs.js.map +1 -1
- package/skinny/registerRadio.d.ts +3 -5
- package/skinny/registerRadio.esm.js +14 -26
- package/skinny/registerRadio.esm.js.map +1 -1
- package/skinny/registerRadioGroup.cjs.js +4 -4
- package/skinny/registerRadioGroup.cjs.js.map +1 -1
- package/skinny/registerRadioGroup.d.ts +1 -1
- package/skinny/registerRadioGroup.esm.js +4 -4
- package/skinny/registerRadioGroup.esm.js.map +1 -1
- package/skinny/registerSection.cjs.js +1 -1
- package/skinny/registerSection.esm.js +1 -1
- package/skinny/registerSelect.cjs.js +3 -3
- package/skinny/registerSelect.esm.js +3 -3
- package/skinny/registerSlider.cjs.js +305 -15
- package/skinny/registerSlider.cjs.js.map +1 -1
- package/skinny/registerSlider.d.ts +3 -20
- package/skinny/registerSlider.esm.js +303 -11
- package/skinny/registerSlider.esm.js.map +1 -1
- package/skinny/registerSliderOutput.cjs.js +1 -1
- package/skinny/registerSliderOutput.cjs.js.map +1 -1
- package/skinny/registerSliderOutput.d.ts +1 -1
- package/skinny/registerSliderOutput.esm.js +1 -1
- package/skinny/registerSliderOutput.esm.js.map +1 -1
- package/skinny/registerSliderThumb.cjs.js +4 -4
- package/skinny/registerSliderThumb.cjs.js.map +1 -1
- package/skinny/registerSliderThumb.d.ts +3 -3
- package/skinny/registerSliderThumb.esm.js +4 -4
- package/skinny/registerSliderThumb.esm.js.map +1 -1
- package/skinny/registerSliderTrack.cjs.js +188 -16
- package/skinny/registerSliderTrack.cjs.js.map +1 -1
- package/skinny/registerSliderTrack.d.ts +3 -1
- package/skinny/registerSliderTrack.esm.js +184 -13
- package/skinny/registerSliderTrack.esm.js.map +1 -1
- package/skinny/registerSwitch.cjs.js +10 -4
- package/skinny/registerSwitch.cjs.js.map +1 -1
- package/skinny/registerSwitch.d.ts +1 -1
- package/skinny/registerSwitch.esm.js +10 -4
- package/skinny/registerSwitch.esm.js.map +1 -1
- package/skinny/registerTextArea.cjs.js +56 -35
- package/skinny/registerTextArea.cjs.js.map +1 -1
- package/skinny/registerTextArea.d.ts +11 -5
- package/skinny/registerTextArea.esm.js +56 -36
- package/skinny/registerTextArea.esm.js.map +1 -1
- package/skinny/registerTextField.cjs.js +34 -215
- package/skinny/registerTextField.cjs.js.map +1 -1
- package/skinny/registerTextField.d.ts +3 -3
- package/skinny/registerTextField.esm.js +34 -215
- package/skinny/registerTextField.esm.js.map +1 -1
- package/skinny/utils-a1785802.esm.js.map +1 -1
- package/skinny/utils-d3708034.cjs.js.map +1 -1
- package/skinny/utils.d.ts +7 -1
- package/skinny/common-52c26d37.esm.js +0 -52
- package/skinny/common-52c26d37.esm.js.map +0 -1
- package/skinny/common-e74a9214.cjs.js +0 -54
- package/skinny/common-e74a9214.cjs.js.map +0 -1
- package/skinny/contexts-21e0d928.esm.js.map +0 -1
- package/skinny/contexts-7236059e.cjs.js.map +0 -1
- package/skinny/registerListBox-38a08460.esm.js.map +0 -1
- package/skinny/registerListBox-f060da58.cjs.js.map +0 -1
- package/skinny/registerSlider-58ef7e20.cjs.js +0 -473
- package/skinny/registerSlider-58ef7e20.cjs.js.map +0 -1
- package/skinny/registerSlider-d74e2330.esm.js +0 -460
- package/skinny/registerSlider-d74e2330.esm.js.map +0 -1
package/dist/registerButton.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import type { ButtonProps } from "react-aria-components";
|
|
3
3
|
import { UpdateInteractionVariant } from "./interaction-variant-utils";
|
|
4
4
|
import { CodeComponentMetaOverrides, Registerable } from "./utils";
|
|
5
|
-
declare const BUTTON_INTERACTION_VARIANTS: ("
|
|
5
|
+
declare const BUTTON_INTERACTION_VARIANTS: ("disabled" | "hovered" | "pressed" | "focused" | "focusVisible")[];
|
|
6
6
|
interface BaseButtonProps extends ButtonProps {
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
resetsForm?: boolean;
|
|
@@ -2,11 +2,10 @@ import { PlasmicElement } from "@plasmicapp/host";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import type { CheckboxProps } from "react-aria-components";
|
|
4
4
|
import { UpdateInteractionVariant } from "./interaction-variant-utils";
|
|
5
|
-
import {
|
|
6
|
-
declare const CHECKBOX_INTERACTION_VARIANTS: ("
|
|
7
|
-
interface BaseCheckboxProps extends CheckboxProps {
|
|
5
|
+
import { CodeComponentMetaOverrides, HasControlContextData, Registerable } from "./utils";
|
|
6
|
+
declare const CHECKBOX_INTERACTION_VARIANTS: ("disabled" | "readonly" | "hovered" | "pressed" | "focused" | "focusVisible" | "selected" | "indeterminate")[];
|
|
7
|
+
interface BaseCheckboxProps extends CheckboxProps, HasControlContextData {
|
|
8
8
|
children: React.ReactNode;
|
|
9
|
-
setControlContextData?: (ctxData: BaseControlContextData) => void;
|
|
10
9
|
updateInteractionVariant?: UpdateInteractionVariant<typeof CHECKBOX_INTERACTION_VARIANTS>;
|
|
11
10
|
}
|
|
12
11
|
export declare function BaseCheckbox(props: BaseCheckboxProps): React.JSX.Element;
|
|
@@ -2,9 +2,9 @@ import React from "react";
|
|
|
2
2
|
import type { CheckboxGroupProps } from "react-aria-components";
|
|
3
3
|
import { UpdateInteractionVariant } from "./interaction-variant-utils";
|
|
4
4
|
import { CodeComponentMetaOverrides, Registerable } from "./utils";
|
|
5
|
-
declare const CHECKBOX_GROUP_INTERACTION_VARIANTS: ("
|
|
5
|
+
declare const CHECKBOX_GROUP_INTERACTION_VARIANTS: ("disabled" | "readonly")[];
|
|
6
6
|
export interface BaseCheckboxGroupProps extends CheckboxGroupProps {
|
|
7
|
-
children
|
|
7
|
+
children?: React.ReactNode;
|
|
8
8
|
updateInteractionVariant?: UpdateInteractionVariant<typeof CHECKBOX_GROUP_INTERACTION_VARIANTS>;
|
|
9
9
|
}
|
|
10
10
|
export declare function BaseCheckboxGroup(props: BaseCheckboxGroupProps): React.JSX.Element;
|
package/dist/registerInput.d.ts
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ChangeEvent } from "react";
|
|
2
2
|
import type { InputProps } from "react-aria-components";
|
|
3
3
|
import { UpdateInteractionVariant } from "./interaction-variant-utils";
|
|
4
|
-
import {
|
|
5
|
-
declare const INPUT_INTERACTION_VARIANTS: ("
|
|
6
|
-
export interface BaseInputProps extends InputProps {
|
|
4
|
+
import { CodeComponentMetaOverrides, HasControlContextData, Registerable } from "./utils";
|
|
5
|
+
declare const INPUT_INTERACTION_VARIANTS: ("disabled" | "hovered" | "focused")[];
|
|
6
|
+
export interface BaseInputProps extends Omit<InputProps, "autoComplete">, HasControlContextData {
|
|
7
7
|
updateInteractionVariant?: UpdateInteractionVariant<typeof INPUT_INTERACTION_VARIANTS>;
|
|
8
|
-
|
|
8
|
+
autoComplete?: string[];
|
|
9
9
|
}
|
|
10
|
+
export declare const inputHelpers: {
|
|
11
|
+
states: {
|
|
12
|
+
value: {
|
|
13
|
+
onChangeArgsToValue: (e: ChangeEvent<HTMLInputElement>) => string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
10
17
|
export declare function BaseInput(props: BaseInputProps): React.JSX.Element;
|
|
11
18
|
export declare const INPUT_COMPONENT_NAME: string;
|
|
12
19
|
export declare function registerInput(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseInput>): void;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ListBox } from "react-aria-components";
|
|
3
3
|
import { HasOptions } from "./option-utils";
|
|
4
|
-
import {
|
|
5
|
-
export interface BaseListBoxProps extends React.ComponentProps<typeof ListBox>, HasOptions<any
|
|
4
|
+
import { CodeComponentMetaOverrides, HasControlContextData, Registerable } from "./utils";
|
|
5
|
+
export interface BaseListBoxProps extends React.ComponentProps<typeof ListBox>, HasOptions<any>, HasControlContextData {
|
|
6
6
|
renderItem?: (item: any) => React.ReactNode;
|
|
7
7
|
renderSection?: (section: any) => React.ReactNode;
|
|
8
8
|
getItemType?: (thing: any) => "item" | "section";
|
|
9
|
-
setControlContextData?: (ctxData: BaseControlContextData) => void;
|
|
10
9
|
}
|
|
11
10
|
export declare function BaseListBox(props: BaseListBoxProps): React.JSX.Element;
|
|
12
11
|
export declare const LIST_BOX_COMPONENT_NAME: string;
|
package/dist/registerModal.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ModalOverlayProps } from "react-aria-components";
|
|
3
|
-
import {
|
|
4
|
-
export interface BaseModalProps extends ModalOverlayProps {
|
|
3
|
+
import { CodeComponentMetaOverrides, HasControlContextData, Registerable } from "./utils";
|
|
4
|
+
export interface BaseModalProps extends ModalOverlayProps, HasControlContextData {
|
|
5
5
|
heading: React.ReactNode;
|
|
6
6
|
modalOverlayClass: string;
|
|
7
7
|
onOpenChange(isOpen: boolean): void;
|
|
8
|
-
setControlContextData?: (ctxData: BaseControlContextData) => void;
|
|
9
8
|
}
|
|
10
9
|
export interface BaseModalActions {
|
|
11
10
|
close(): void;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { PlasmicElement } from "@plasmicapp/host";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Popover } from "react-aria-components";
|
|
4
|
-
import {
|
|
5
|
-
interface PopoverControlContextData
|
|
6
|
-
|
|
4
|
+
import { CodeComponentMetaOverrides, HasControlContextData, Registerable } from "./utils";
|
|
5
|
+
export interface PopoverControlContextData {
|
|
6
|
+
defaultShouldFlip?: boolean;
|
|
7
7
|
}
|
|
8
|
-
export interface BasePopoverProps extends React.ComponentProps<typeof Popover> {
|
|
8
|
+
export interface BasePopoverProps extends React.ComponentProps<typeof Popover>, HasControlContextData<PopoverControlContextData> {
|
|
9
9
|
className?: string;
|
|
10
10
|
resetClassName?: string;
|
|
11
|
-
setControlContextData?: (ctxData: PopoverControlContextData) => void;
|
|
12
11
|
}
|
|
13
12
|
export declare function BasePopover(props: BasePopoverProps): React.JSX.Element;
|
|
14
13
|
export declare const POPOVER_COMPONENT_NAME: string;
|
|
15
14
|
export declare const POPOVER_ARROW_IMG: PlasmicElement;
|
|
16
15
|
export declare function registerPopover(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BasePopover>): void;
|
|
17
|
-
export {};
|
package/dist/registerRadio.d.ts
CHANGED
|
@@ -2,12 +2,10 @@ import { PlasmicElement } from "@plasmicapp/host";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import type { RadioProps } from "react-aria-components";
|
|
4
4
|
import { UpdateInteractionVariant } from "./interaction-variant-utils";
|
|
5
|
-
import {
|
|
6
|
-
declare const RADIO_INTERACTION_VARIANTS: ("
|
|
7
|
-
export interface BaseRadioProps extends RadioProps {
|
|
5
|
+
import { CodeComponentMetaOverrides, HasControlContextData, Registerable } from "./utils";
|
|
6
|
+
declare const RADIO_INTERACTION_VARIANTS: ("disabled" | "readonly" | "hovered" | "pressed" | "focused" | "focusVisible" | "selected")[];
|
|
7
|
+
export interface BaseRadioProps extends RadioProps, HasControlContextData {
|
|
8
8
|
children: React.ReactNode;
|
|
9
|
-
isSelected: boolean;
|
|
10
|
-
setControlContextData?: (ctxData: BaseControlContextData) => void;
|
|
11
9
|
updateInteractionVariant?: UpdateInteractionVariant<typeof RADIO_INTERACTION_VARIANTS>;
|
|
12
10
|
}
|
|
13
11
|
export declare function BaseRadio(props: BaseRadioProps): React.JSX.Element;
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import type { RadioGroupProps } from "react-aria-components";
|
|
3
3
|
import { UpdateInteractionVariant } from "./interaction-variant-utils";
|
|
4
4
|
import { CodeComponentMetaOverrides, Registerable } from "./utils";
|
|
5
|
-
declare const RADIO_GROUP_INTERACTION_VARIANTS: ("
|
|
5
|
+
declare const RADIO_GROUP_INTERACTION_VARIANTS: ("disabled" | "readonly")[];
|
|
6
6
|
export interface BaseRadioGroupProps extends RadioGroupProps {
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
updateInteractionVariant?: UpdateInteractionVariant<typeof RADIO_GROUP_INTERACTION_VARIANTS>;
|
package/dist/registerSlider.d.ts
CHANGED
|
@@ -2,28 +2,11 @@ import React from "react";
|
|
|
2
2
|
import { type SliderProps } from "react-aria-components";
|
|
3
3
|
import { UpdateInteractionVariant } from "./interaction-variant-utils";
|
|
4
4
|
import { CodeComponentMetaOverrides, Registerable } from "./utils";
|
|
5
|
-
export declare const SLIDER_COMPONENT_NAME: string;
|
|
6
5
|
declare const SLIDER_INTERACTION_VARIANTS: "disabled"[];
|
|
7
|
-
export interface BaseSliderProps extends
|
|
8
|
-
name?: string;
|
|
9
|
-
autoFocus?: boolean;
|
|
10
|
-
isMultiValue?: boolean;
|
|
11
|
-
range?: number[];
|
|
12
|
-
defaultRange?: number[];
|
|
6
|
+
export interface BaseSliderProps<T extends number | number[]> extends SliderProps<T> {
|
|
13
7
|
children?: React.ReactNode;
|
|
14
|
-
onChange?: (value: number | number[], isMultiValue?: boolean) => void;
|
|
15
8
|
updateInteractionVariant?: UpdateInteractionVariant<typeof SLIDER_INTERACTION_VARIANTS>;
|
|
16
9
|
}
|
|
17
|
-
export declare
|
|
18
|
-
|
|
19
|
-
range: {
|
|
20
|
-
onChangeArgsToValue: (value: number[], isMultiValue: boolean) => number[] | undefined;
|
|
21
|
-
};
|
|
22
|
-
value: {
|
|
23
|
-
onChangeArgsToValue: (value: number, isMultiValue: boolean) => any;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export declare function BaseSlider(props: BaseSliderProps): React.JSX.Element;
|
|
28
|
-
export declare function registerSlider(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseSlider>): void;
|
|
10
|
+
export declare function BaseSlider<T extends number | number[]>(props: BaseSliderProps<T>): React.JSX.Element;
|
|
11
|
+
export declare function registerSlider(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseSlider<number>>): void;
|
|
29
12
|
export {};
|
|
@@ -9,5 +9,5 @@ export interface BaseSliderOutputProps extends React.ComponentProps<typeof Slide
|
|
|
9
9
|
}
|
|
10
10
|
export declare function BaseSliderOutput(props: BaseSliderOutputProps): React.JSX.Element;
|
|
11
11
|
export declare const SLIDER_OUTPUT_COMPONENT_NAME: string;
|
|
12
|
-
export declare function registerSliderOutput(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseSliderOutput>):
|
|
12
|
+
export declare function registerSliderOutput(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseSliderOutput>): import("@plasmicapp/host").CodeComponentMeta<BaseSliderOutputProps>;
|
|
13
13
|
export {};
|
|
@@ -2,12 +2,12 @@ import React from "react";
|
|
|
2
2
|
import { SliderThumb } from "react-aria-components";
|
|
3
3
|
import { UpdateInteractionVariant } from "./interaction-variant-utils";
|
|
4
4
|
import { CodeComponentMetaOverrides, Registerable } from "./utils";
|
|
5
|
-
declare const SLIDER_THUMB_INTERACTION_VARIANTS: ("
|
|
6
|
-
interface BaseSliderThumbProps extends React.ComponentProps<typeof SliderThumb> {
|
|
5
|
+
declare const SLIDER_THUMB_INTERACTION_VARIANTS: ("disabled" | "hovered" | "focused" | "focusVisible" | "dragging")[];
|
|
6
|
+
export interface BaseSliderThumbProps extends React.ComponentProps<typeof SliderThumb> {
|
|
7
7
|
advanced?: boolean;
|
|
8
8
|
updateInteractionVariant?: UpdateInteractionVariant<typeof SLIDER_THUMB_INTERACTION_VARIANTS>;
|
|
9
9
|
}
|
|
10
10
|
export declare function BaseSliderThumb({ children, advanced, updateInteractionVariant, ...rest }: BaseSliderThumbProps): React.JSX.Element;
|
|
11
11
|
export declare const SLIDER_THUMB_COMPONENT_NAME: string;
|
|
12
|
-
export declare function registerSliderThumb(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseSliderThumb>):
|
|
12
|
+
export declare function registerSliderThumb(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseSliderThumb>): import("@plasmicapp/host").CodeComponentMeta<BaseSliderThumbProps>;
|
|
13
13
|
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { CodeComponentMeta } from "@plasmicapp/host";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { SliderTrack } from "react-aria-components";
|
|
3
4
|
import { UpdateInteractionVariant } from "./interaction-variant-utils";
|
|
5
|
+
import { BaseSliderThumbProps } from "./registerSliderThumb";
|
|
4
6
|
import { CodeComponentMetaOverrides, Registerable } from "./utils";
|
|
5
7
|
declare const SLIDER_TRACK_INTERACTION_VARIANTS: "hovered"[];
|
|
6
8
|
export interface BaseSliderTrackProps extends React.ComponentProps<typeof SliderTrack> {
|
|
@@ -10,5 +12,5 @@ export interface BaseSliderTrackProps extends React.ComponentProps<typeof Slider
|
|
|
10
12
|
}
|
|
11
13
|
export declare function BaseSliderTrack(props: BaseSliderTrackProps): React.JSX.Element;
|
|
12
14
|
export declare const SLIDER_TRACK_COMPONENT_NAME: string;
|
|
13
|
-
export declare function registerSliderTrack(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseSliderTrack>):
|
|
15
|
+
export declare function registerSliderTrack(sliderThumbMeta: CodeComponentMeta<BaseSliderThumbProps>, loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseSliderTrack>): CodeComponentMeta<BaseSliderTrackProps>;
|
|
14
16
|
export {};
|
package/dist/registerSwitch.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import type { SwitchProps } from "react-aria-components";
|
|
3
3
|
import { UpdateInteractionVariant } from "./interaction-variant-utils";
|
|
4
4
|
import { CodeComponentMetaOverrides, Registerable } from "./utils";
|
|
5
|
-
declare const SWITCH_INTERACTION_VARIANTS: ("
|
|
5
|
+
declare const SWITCH_INTERACTION_VARIANTS: ("disabled" | "readonly" | "hovered" | "pressed" | "focused" | "focusVisible" | "selected")[];
|
|
6
6
|
interface BaseSwitchProps extends SwitchProps {
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
updateInteractionVariant?: UpdateInteractionVariant<typeof SWITCH_INTERACTION_VARIANTS>;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ChangeEvent } from "react";
|
|
2
2
|
import type { TextAreaProps } from "react-aria-components";
|
|
3
3
|
import { UpdateInteractionVariant } from "./interaction-variant-utils";
|
|
4
|
-
import {
|
|
5
|
-
declare const TEXTAREA_INTERACTION_VARIANTS: ("
|
|
6
|
-
export interface BaseTextAreaProps extends TextAreaProps {
|
|
4
|
+
import { CodeComponentMetaOverrides, HasControlContextData, Registerable } from "./utils";
|
|
5
|
+
declare const TEXTAREA_INTERACTION_VARIANTS: ("disabled" | "hovered" | "focused")[];
|
|
6
|
+
export interface BaseTextAreaProps extends TextAreaProps, HasControlContextData {
|
|
7
7
|
updateInteractionVariant?: UpdateInteractionVariant<typeof TEXTAREA_INTERACTION_VARIANTS>;
|
|
8
|
-
setControlContextData?: (ctxData: BaseControlContextData) => void;
|
|
9
8
|
}
|
|
9
|
+
export declare const inputHelpers: {
|
|
10
|
+
states: {
|
|
11
|
+
value: {
|
|
12
|
+
onChangeArgsToValue: (e: ChangeEvent<HTMLInputElement>) => string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
10
16
|
export declare function BaseTextArea(props: BaseTextAreaProps): React.JSX.Element;
|
|
11
17
|
export declare function registerTextArea(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseTextArea>): void;
|
|
12
18
|
export {};
|
|
@@ -2,13 +2,13 @@ import React, { ReactNode } from "react";
|
|
|
2
2
|
import type { InputProps, TextFieldProps } from "react-aria-components";
|
|
3
3
|
import { UpdateInteractionVariant } from "./interaction-variant-utils";
|
|
4
4
|
import { CodeComponentMetaOverrides, Registerable } from "./utils";
|
|
5
|
-
declare const TEXT_FIELD_INTERACTION_VARIANTS: ("
|
|
6
|
-
export interface BaseTextFieldProps extends TextFieldProps {
|
|
5
|
+
declare const TEXT_FIELD_INTERACTION_VARIANTS: ("disabled" | "readonly")[];
|
|
6
|
+
export interface BaseTextFieldProps extends Omit<TextFieldProps, "autoComplete"> {
|
|
7
7
|
label?: ReactNode;
|
|
8
8
|
description?: ReactNode;
|
|
9
|
-
enableAutoComplete?: boolean;
|
|
10
9
|
multiline?: boolean;
|
|
11
10
|
inputProps?: InputProps;
|
|
11
|
+
autoComplete?: string[];
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
updateInteractionVariant?: UpdateInteractionVariant<typeof TEXT_FIELD_INTERACTION_VARIANTS>;
|
|
14
14
|
}
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import type { CodeComponentMeta } from "@plasmicapp/host";
|
|
2
2
|
import registerComponent from "@plasmicapp/host/registerComponent";
|
|
3
3
|
import React from "react";
|
|
4
|
+
export type HasControlContextData<T = BaseControlContextData> = {
|
|
5
|
+
setControlContextData?: (ctxData: T) => void;
|
|
6
|
+
};
|
|
4
7
|
export type BaseControlContextData = {
|
|
5
|
-
|
|
8
|
+
parent?: {
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
isReadOnly?: boolean;
|
|
11
|
+
};
|
|
6
12
|
};
|
|
7
13
|
export type Registerable = {
|
|
8
14
|
registerComponent: typeof registerComponent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicpkgs/react-aria",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.44",
|
|
4
4
|
"description": "Plasmic registration calls for react-aria based components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "485bcdc340f3027b149e373e6b622a472982eb90"
|
|
78
78
|
}
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
import { i as isDefined } from './utils-a1785802.esm.js';
|
|
2
|
+
|
|
3
|
+
function hasParent(_props, ctx) {
|
|
4
|
+
return isDefined(ctx == null ? void 0 : ctx.parent) === true;
|
|
5
|
+
}
|
|
6
|
+
function isParentReadOnly(_props, ctx) {
|
|
7
|
+
var _a;
|
|
8
|
+
return ((_a = ctx == null ? void 0 : ctx.parent) == null ? void 0 : _a.isReadOnly) === true;
|
|
9
|
+
}
|
|
10
|
+
function isParentDisabled(_props, ctx) {
|
|
11
|
+
var _a;
|
|
12
|
+
return ((_a = ctx == null ? void 0 : ctx.parent) == null ? void 0 : _a.isDisabled) === true;
|
|
13
|
+
}
|
|
14
|
+
function resolveAutoComplete(autoCompleteProp) {
|
|
15
|
+
if (typeof autoCompleteProp === "string") {
|
|
16
|
+
return autoCompleteProp;
|
|
17
|
+
}
|
|
18
|
+
if (!autoCompleteProp || !Array.isArray(autoCompleteProp) || autoCompleteProp.includes("off")) {
|
|
19
|
+
return void 0;
|
|
20
|
+
}
|
|
21
|
+
if (autoCompleteProp.includes("off")) {
|
|
22
|
+
return "off";
|
|
23
|
+
}
|
|
24
|
+
if (autoCompleteProp.includes("on") && autoCompleteProp.length === 1) {
|
|
25
|
+
return "on";
|
|
26
|
+
}
|
|
27
|
+
return autoCompleteProp.filter((x) => x !== "on").join(" ");
|
|
28
|
+
}
|
|
29
|
+
function createNameProp() {
|
|
30
|
+
return {
|
|
31
|
+
type: "string",
|
|
32
|
+
description: "Name for this field if it is part of a form",
|
|
33
|
+
hidden: hasParent,
|
|
34
|
+
advanced: true
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function createDisabledProp(componentName) {
|
|
38
|
+
return {
|
|
39
|
+
displayName: "Disabled",
|
|
40
|
+
type: "boolean",
|
|
41
|
+
description: `Whether the ${componentName} is read-only and unfocusable`,
|
|
42
|
+
defaultValueHint: false,
|
|
43
|
+
hidden: isParentDisabled
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function createReadOnlyProp(componentName) {
|
|
47
|
+
return {
|
|
48
|
+
displayName: "Read only",
|
|
49
|
+
type: "boolean",
|
|
50
|
+
description: `Whether the value of this ${componentName} can be changed by the user. Unlike disabled, read-only does not prevent the user from interacting with the component (such as focus).`,
|
|
51
|
+
defaultValueHint: false,
|
|
52
|
+
advanced: true,
|
|
53
|
+
hidden: isParentReadOnly
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function createRequiredProp(componentName) {
|
|
57
|
+
return {
|
|
58
|
+
displayName: "Required",
|
|
59
|
+
type: "boolean",
|
|
60
|
+
description: `Whether user input is required on the ${componentName} before form submission.`,
|
|
61
|
+
defaultValueHint: false,
|
|
62
|
+
advanced: true,
|
|
63
|
+
hidden: hasParent
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function createAutoFocusProp(componentName) {
|
|
67
|
+
return {
|
|
68
|
+
type: "boolean",
|
|
69
|
+
description: `Whether the ${componentName} should be focused when rendered`,
|
|
70
|
+
defaultValueHint: false,
|
|
71
|
+
advanced: true,
|
|
72
|
+
hidden: hasParent
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function createAriaLabelProp(componentName) {
|
|
76
|
+
return {
|
|
77
|
+
type: "string",
|
|
78
|
+
displayName: "Aria Label",
|
|
79
|
+
description: `Label for this ${componentName}, if no visible label is used, to identify the element to assistive technology`,
|
|
80
|
+
advanced: true,
|
|
81
|
+
hidden: hasParent
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function createChildrenProp() {
|
|
85
|
+
return {
|
|
86
|
+
type: "slot",
|
|
87
|
+
mergeWithParent: true
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function getCommonProps(componentName, propNames) {
|
|
91
|
+
const commonProps = {
|
|
92
|
+
name: createNameProp(),
|
|
93
|
+
disabled: createDisabledProp(componentName),
|
|
94
|
+
isDisabled: createDisabledProp(componentName),
|
|
95
|
+
readOnly: createReadOnlyProp(componentName),
|
|
96
|
+
isReadOnly: createReadOnlyProp(componentName),
|
|
97
|
+
autoFocus: createAutoFocusProp(componentName),
|
|
98
|
+
"aria-label": createAriaLabelProp(componentName),
|
|
99
|
+
required: createRequiredProp(componentName),
|
|
100
|
+
isRequired: createRequiredProp(componentName),
|
|
101
|
+
children: createChildrenProp(),
|
|
102
|
+
// NOTE: The following props are only applicable to inputs, textareas, and text fields
|
|
103
|
+
value: {
|
|
104
|
+
type: "string",
|
|
105
|
+
editOnly: true,
|
|
106
|
+
displayName: "Default Value",
|
|
107
|
+
uncontrolledProp: "defaultValue",
|
|
108
|
+
description: `The default value of the ${componentName}`,
|
|
109
|
+
hidden: hasParent
|
|
110
|
+
},
|
|
111
|
+
maxLength: {
|
|
112
|
+
type: "number",
|
|
113
|
+
description: "The maximum number of characters supported by the input",
|
|
114
|
+
advanced: true,
|
|
115
|
+
hidden: hasParent
|
|
116
|
+
},
|
|
117
|
+
minLength: {
|
|
118
|
+
type: "number",
|
|
119
|
+
description: "The minimum number of characters supported by the input",
|
|
120
|
+
advanced: true,
|
|
121
|
+
hidden: hasParent
|
|
122
|
+
},
|
|
123
|
+
pattern: {
|
|
124
|
+
type: "string",
|
|
125
|
+
description: "Regex pattern that the value of the input must match to be valid",
|
|
126
|
+
helpText: "For more information about writing Regular Expressions (regex), check out https://regexr.com/",
|
|
127
|
+
validator: (value) => {
|
|
128
|
+
try {
|
|
129
|
+
new RegExp(value);
|
|
130
|
+
return true;
|
|
131
|
+
} catch (error) {
|
|
132
|
+
return "Invalid Regex";
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
advanced: true,
|
|
136
|
+
hidden: hasParent
|
|
137
|
+
},
|
|
138
|
+
type: {
|
|
139
|
+
type: "choice",
|
|
140
|
+
defaultValueHint: "text",
|
|
141
|
+
options: ["text", "search", "url", "tel", "email", "password"],
|
|
142
|
+
description: "The type of data that an input field is expected to handle. It influences the input's behavior, validation, and the kind of interface provided to the user.",
|
|
143
|
+
advanced: true,
|
|
144
|
+
hidden: hasParent
|
|
145
|
+
},
|
|
146
|
+
inputMode: {
|
|
147
|
+
type: "choice",
|
|
148
|
+
description: "hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents.",
|
|
149
|
+
options: [
|
|
150
|
+
"none",
|
|
151
|
+
"text",
|
|
152
|
+
"tel",
|
|
153
|
+
"url",
|
|
154
|
+
"email",
|
|
155
|
+
"numeric",
|
|
156
|
+
"decimal",
|
|
157
|
+
"search"
|
|
158
|
+
],
|
|
159
|
+
hidden: hasParent
|
|
160
|
+
},
|
|
161
|
+
autoComplete: {
|
|
162
|
+
type: "choice",
|
|
163
|
+
advanced: true,
|
|
164
|
+
multiSelect: true,
|
|
165
|
+
hidden: hasParent,
|
|
166
|
+
description: "Guidance as to the type of data expected in the field",
|
|
167
|
+
helpText: "For explanations on what each of the values mean, check https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values",
|
|
168
|
+
options: [
|
|
169
|
+
"on",
|
|
170
|
+
"off",
|
|
171
|
+
"name",
|
|
172
|
+
"honorific-prefix",
|
|
173
|
+
"given-name",
|
|
174
|
+
"additional-name",
|
|
175
|
+
"family-name",
|
|
176
|
+
"honorific-suffix",
|
|
177
|
+
"nickname",
|
|
178
|
+
"email",
|
|
179
|
+
"username",
|
|
180
|
+
"new-password",
|
|
181
|
+
"current-password",
|
|
182
|
+
"one-time-code",
|
|
183
|
+
"organization-title",
|
|
184
|
+
"organization",
|
|
185
|
+
"street-address",
|
|
186
|
+
"shipping",
|
|
187
|
+
"billing",
|
|
188
|
+
"address-line1",
|
|
189
|
+
"address-line2",
|
|
190
|
+
"address-line3",
|
|
191
|
+
"address-level4",
|
|
192
|
+
"address-level3",
|
|
193
|
+
"address-level2",
|
|
194
|
+
"address-level1",
|
|
195
|
+
"country",
|
|
196
|
+
"country-name",
|
|
197
|
+
"postal-code",
|
|
198
|
+
"cc-name",
|
|
199
|
+
"cc-given-name",
|
|
200
|
+
"cc-additional-name",
|
|
201
|
+
"cc-family-name",
|
|
202
|
+
"cc-number",
|
|
203
|
+
"cc-exp",
|
|
204
|
+
"cc-exp-month",
|
|
205
|
+
"cc-exp-year",
|
|
206
|
+
"cc-csc",
|
|
207
|
+
"cc-type",
|
|
208
|
+
"transaction-currency",
|
|
209
|
+
"transaction-amount",
|
|
210
|
+
"language",
|
|
211
|
+
"bday",
|
|
212
|
+
"bday-day",
|
|
213
|
+
"bday-month",
|
|
214
|
+
"bday-year",
|
|
215
|
+
"sex",
|
|
216
|
+
"tel",
|
|
217
|
+
"tel-country-code",
|
|
218
|
+
"tel-national",
|
|
219
|
+
"tel-area-code",
|
|
220
|
+
"tel-local",
|
|
221
|
+
"tel-local-suffix",
|
|
222
|
+
"tel-local-prefix",
|
|
223
|
+
"tel-extension",
|
|
224
|
+
"impp",
|
|
225
|
+
"url",
|
|
226
|
+
"photo",
|
|
227
|
+
"webauthn"
|
|
228
|
+
]
|
|
229
|
+
},
|
|
230
|
+
validationBehavior: {
|
|
231
|
+
type: "choice",
|
|
232
|
+
options: ["native", "aria"],
|
|
233
|
+
description: "Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA.",
|
|
234
|
+
defaultValueHint: "native",
|
|
235
|
+
advanced: true,
|
|
236
|
+
hidden: hasParent
|
|
237
|
+
},
|
|
238
|
+
onChange: {
|
|
239
|
+
type: "eventHandler",
|
|
240
|
+
argTypes: [{ name: "value", type: "string" }],
|
|
241
|
+
hidden: hasParent
|
|
242
|
+
},
|
|
243
|
+
onFocus: {
|
|
244
|
+
type: "eventHandler",
|
|
245
|
+
argTypes: [{ name: "focusEvent", type: "object" }],
|
|
246
|
+
advanced: true,
|
|
247
|
+
hidden: hasParent
|
|
248
|
+
},
|
|
249
|
+
onBlur: {
|
|
250
|
+
type: "eventHandler",
|
|
251
|
+
argTypes: [{ name: "focusEvent", type: "object" }],
|
|
252
|
+
advanced: true,
|
|
253
|
+
hidden: hasParent
|
|
254
|
+
},
|
|
255
|
+
onFocusChange: {
|
|
256
|
+
type: "eventHandler",
|
|
257
|
+
argTypes: [{ name: "isFocused", type: "boolean" }],
|
|
258
|
+
advanced: true,
|
|
259
|
+
hidden: hasParent
|
|
260
|
+
},
|
|
261
|
+
onKeyDown: {
|
|
262
|
+
type: "eventHandler",
|
|
263
|
+
argTypes: [{ name: "keyboardEvent", type: "object" }],
|
|
264
|
+
advanced: true,
|
|
265
|
+
hidden: hasParent
|
|
266
|
+
},
|
|
267
|
+
onKeyUp: {
|
|
268
|
+
type: "eventHandler",
|
|
269
|
+
argTypes: [{ name: "keyboardEvent", type: "object" }],
|
|
270
|
+
advanced: true,
|
|
271
|
+
hidden: hasParent
|
|
272
|
+
},
|
|
273
|
+
onCopy: {
|
|
274
|
+
type: "eventHandler",
|
|
275
|
+
argTypes: [{ name: "clipbordEvent", type: "object" }],
|
|
276
|
+
advanced: true,
|
|
277
|
+
hidden: hasParent
|
|
278
|
+
},
|
|
279
|
+
onCut: {
|
|
280
|
+
type: "eventHandler",
|
|
281
|
+
argTypes: [{ name: "clipbordEvent", type: "object" }],
|
|
282
|
+
advanced: true,
|
|
283
|
+
hidden: hasParent
|
|
284
|
+
},
|
|
285
|
+
onPaste: {
|
|
286
|
+
type: "eventHandler",
|
|
287
|
+
argTypes: [{ name: "clipbordEvent", type: "object" }],
|
|
288
|
+
advanced: true,
|
|
289
|
+
hidden: hasParent
|
|
290
|
+
},
|
|
291
|
+
onCompositionStart: {
|
|
292
|
+
type: "eventHandler",
|
|
293
|
+
argTypes: [{ name: "compositionEvent", type: "object" }],
|
|
294
|
+
advanced: true,
|
|
295
|
+
hidden: hasParent
|
|
296
|
+
},
|
|
297
|
+
onCompositionEnd: {
|
|
298
|
+
type: "eventHandler",
|
|
299
|
+
argTypes: [{ name: "compositionEvent", type: "object" }],
|
|
300
|
+
advanced: true,
|
|
301
|
+
hidden: hasParent
|
|
302
|
+
},
|
|
303
|
+
onCompositionUpdate: {
|
|
304
|
+
type: "eventHandler",
|
|
305
|
+
argTypes: [{ name: "compositionEvent", type: "object" }],
|
|
306
|
+
advanced: true,
|
|
307
|
+
hidden: hasParent
|
|
308
|
+
},
|
|
309
|
+
onSelect: {
|
|
310
|
+
type: "eventHandler",
|
|
311
|
+
argTypes: [{ name: "selectionEvent", type: "object" }],
|
|
312
|
+
advanced: true,
|
|
313
|
+
hidden: hasParent
|
|
314
|
+
},
|
|
315
|
+
onBeforeInput: {
|
|
316
|
+
type: "eventHandler",
|
|
317
|
+
argTypes: [{ name: "inputEvent", type: "object" }],
|
|
318
|
+
advanced: true,
|
|
319
|
+
hidden: hasParent
|
|
320
|
+
},
|
|
321
|
+
onInput: {
|
|
322
|
+
type: "eventHandler",
|
|
323
|
+
argTypes: [{ name: "inputEvent", type: "object" }],
|
|
324
|
+
advanced: true,
|
|
325
|
+
hidden: hasParent
|
|
326
|
+
},
|
|
327
|
+
placeholder: {
|
|
328
|
+
type: "string"
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
const filteredProps = {};
|
|
332
|
+
propNames.forEach((propName) => {
|
|
333
|
+
if (Object.prototype.hasOwnProperty.call(commonProps, propName)) {
|
|
334
|
+
filteredProps[propName] = commonProps[propName];
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
return filteredProps;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
export { getCommonProps as g, hasParent as h, resolveAutoComplete as r };
|
|
341
|
+
//# sourceMappingURL=common-96be13c3.esm.js.map
|