@plasmicapp/react-web 0.2.347 → 0.2.349
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/all.d.ts +131 -270
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/react-web.esm.js +1 -1
- package/dist/react-web.esm.js.map +1 -1
- package/package.json +4 -4
- package/skinny/dist/index.js +2 -2
- package/skinny/dist/plume/checkbox/index.js +1 -1
- package/skinny/dist/plume/menu/index.js +1 -1
- package/skinny/dist/plume/menu-button/index.js +1 -1
- package/skinny/dist/plume/select/index.js +1 -1
- package/skinny/dist/plume/switch/index.js +1 -1
- package/skinny/dist/{ssr-f37a883d.js → ssr-64c8ab20.js} +2 -2
- package/skinny/dist/ssr-64c8ab20.js.map +1 -0
- package/skinny/dist/ssr-f37a883d.js.map +0 -1
package/dist/all.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { AriaAttributes, DOMAttributes as DOMAttributes$1, AriaRole, CSSProperties as CSSProperties$1, FocusEvent, KeyboardEvent as KeyboardEvent$
|
|
3
|
+
import React__default, { AriaAttributes, DOMAttributes as DOMAttributes$1, AriaRole, CSSProperties as CSSProperties$1, ReactNode, ReactElement, FocusEvent, KeyboardEvent as KeyboardEvent$1, SyntheticEvent } from 'react';
|
|
4
4
|
|
|
5
5
|
interface PlasmicPageGuardProps {
|
|
6
6
|
appId: string;
|
|
@@ -12826,269 +12826,6 @@ declare const Stack: (<T extends keyof JSX.IntrinsicElements = "div">(props: {
|
|
|
12826
12826
|
|
|
12827
12827
|
|
|
12828
12828
|
|
|
12829
|
-
interface AriaLabelingProps$1 {
|
|
12830
|
-
/**
|
|
12831
|
-
* Defines a string value that labels the current element.
|
|
12832
|
-
*/
|
|
12833
|
-
'aria-label'?: string,
|
|
12834
|
-
|
|
12835
|
-
/**
|
|
12836
|
-
* Identifies the element (or elements) that labels the current element.
|
|
12837
|
-
*/
|
|
12838
|
-
'aria-labelledby'?: string,
|
|
12839
|
-
|
|
12840
|
-
/**
|
|
12841
|
-
* Identifies the element (or elements) that describes the object.
|
|
12842
|
-
*/
|
|
12843
|
-
'aria-describedby'?: string,
|
|
12844
|
-
|
|
12845
|
-
/**
|
|
12846
|
-
* Identifies the element (or elements) that provide a detailed, extended description for the object.
|
|
12847
|
-
*/
|
|
12848
|
-
'aria-details'?: string
|
|
12849
|
-
}
|
|
12850
|
-
|
|
12851
|
-
// A set of common DOM props that are allowed on any component
|
|
12852
|
-
// Ensure this is synced with DOMPropNames in filterDOMProps
|
|
12853
|
-
interface DOMProps$1 {
|
|
12854
|
-
/**
|
|
12855
|
-
* The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
|
|
12856
|
-
*/
|
|
12857
|
-
id?: string
|
|
12858
|
-
}
|
|
12859
|
-
|
|
12860
|
-
interface FocusableDOMProps$1 extends DOMProps$1 {
|
|
12861
|
-
/**
|
|
12862
|
-
* Whether to exclude the element from the sequential tab order. If true,
|
|
12863
|
-
* the element will not be focusable via the keyboard by tabbing. This should
|
|
12864
|
-
* be avoided except in rare scenarios where an alternative means of accessing
|
|
12865
|
-
* the element or its functionality via the keyboard is available.
|
|
12866
|
-
*/
|
|
12867
|
-
excludeFromTabOrder?: boolean
|
|
12868
|
-
}
|
|
12869
|
-
|
|
12870
|
-
/** Any focusable element, including both HTML and SVG elements. */
|
|
12871
|
-
interface FocusableElement extends Element, HTMLOrSVGElement {}
|
|
12872
|
-
|
|
12873
|
-
/** All DOM attributes supported across both HTML and SVG elements. */
|
|
12874
|
-
interface DOMAttributes<T = FocusableElement> extends AriaAttributes, DOMAttributes$1<T> {
|
|
12875
|
-
id?: string | undefined,
|
|
12876
|
-
role?: AriaRole | undefined,
|
|
12877
|
-
tabIndex?: number | undefined,
|
|
12878
|
-
style?: CSSProperties$1 | undefined,
|
|
12879
|
-
className?: string | undefined
|
|
12880
|
-
}
|
|
12881
|
-
|
|
12882
|
-
/*
|
|
12883
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
12884
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12885
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
12886
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12887
|
-
*
|
|
12888
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12889
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12890
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12891
|
-
* governing permissions and limitations under the License.
|
|
12892
|
-
*/
|
|
12893
|
-
|
|
12894
|
-
|
|
12895
|
-
|
|
12896
|
-
interface InputBase$1 {
|
|
12897
|
-
/** Whether the input is disabled. */
|
|
12898
|
-
isDisabled?: boolean,
|
|
12899
|
-
/** Whether the input can be selected but not changed by the user. */
|
|
12900
|
-
isReadOnly?: boolean
|
|
12901
|
-
}
|
|
12902
|
-
|
|
12903
|
-
/*
|
|
12904
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
12905
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12906
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
12907
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12908
|
-
*
|
|
12909
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12910
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12911
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12912
|
-
* governing permissions and limitations under the License.
|
|
12913
|
-
*/
|
|
12914
|
-
|
|
12915
|
-
|
|
12916
|
-
|
|
12917
|
-
type FocusStrategy$1 = 'first' | 'last';
|
|
12918
|
-
|
|
12919
|
-
/*
|
|
12920
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
12921
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12922
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
12923
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12924
|
-
*
|
|
12925
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
12926
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12927
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12928
|
-
* governing permissions and limitations under the License.
|
|
12929
|
-
*/
|
|
12930
|
-
|
|
12931
|
-
|
|
12932
|
-
|
|
12933
|
-
// Event bubbling can be problematic in real-world applications, so the default for React Spectrum components
|
|
12934
|
-
// is not to propagate. This can be overridden by calling continuePropagation() on the event.
|
|
12935
|
-
type BaseEvent$1<T extends SyntheticEvent> = T & {
|
|
12936
|
-
/**
|
|
12937
|
-
* Use continuePropagation.
|
|
12938
|
-
* @deprecated */
|
|
12939
|
-
stopPropagation(): void,
|
|
12940
|
-
continuePropagation(): void
|
|
12941
|
-
}
|
|
12942
|
-
|
|
12943
|
-
type KeyboardEvent$1 = BaseEvent$1<KeyboardEvent$2<any>>;
|
|
12944
|
-
|
|
12945
|
-
interface KeyboardEvents$1 {
|
|
12946
|
-
/** Handler that is called when a key is pressed. */
|
|
12947
|
-
onKeyDown?: (e: KeyboardEvent$1) => void,
|
|
12948
|
-
/** Handler that is called when a key is released. */
|
|
12949
|
-
onKeyUp?: (e: KeyboardEvent$1) => void
|
|
12950
|
-
}
|
|
12951
|
-
|
|
12952
|
-
interface FocusEvents$1<Target = Element> {
|
|
12953
|
-
/** Handler that is called when the element receives focus. */
|
|
12954
|
-
onFocus?: (e: FocusEvent<Target>) => void,
|
|
12955
|
-
/** Handler that is called when the element loses focus. */
|
|
12956
|
-
onBlur?: (e: FocusEvent<Target>) => void,
|
|
12957
|
-
/** Handler that is called when the element's focus status changes. */
|
|
12958
|
-
onFocusChange?: (isFocused: boolean) => void
|
|
12959
|
-
}
|
|
12960
|
-
|
|
12961
|
-
interface FocusableProps$1<Target = Element> extends FocusEvents$1<Target>, KeyboardEvents$1 {
|
|
12962
|
-
/** Whether the element should receive focus on render. */
|
|
12963
|
-
autoFocus?: boolean
|
|
12964
|
-
}
|
|
12965
|
-
|
|
12966
|
-
declare function useFocused(opts: {
|
|
12967
|
-
isTextInput?: boolean;
|
|
12968
|
-
}): (boolean | DOMAttributes<FocusableElement>)[];
|
|
12969
|
-
declare function useFocusVisible(opts: {
|
|
12970
|
-
isTextInput?: boolean;
|
|
12971
|
-
}): (boolean | DOMAttributes<FocusableElement>)[];
|
|
12972
|
-
declare function useFocusedWithin(opts: {
|
|
12973
|
-
isTextInput?: boolean;
|
|
12974
|
-
}): (boolean | DOMAttributes<FocusableElement>)[];
|
|
12975
|
-
declare function useFocusVisibleWithin(opts: {
|
|
12976
|
-
isTextInput?: boolean;
|
|
12977
|
-
}): (boolean | DOMAttributes<FocusableElement>)[];
|
|
12978
|
-
declare function useHover(): (boolean | {
|
|
12979
|
-
onMouseEnter: () => void;
|
|
12980
|
-
onMouseLeave: () => void;
|
|
12981
|
-
})[];
|
|
12982
|
-
declare function usePressed(): (boolean | {
|
|
12983
|
-
onMouseDown: () => void;
|
|
12984
|
-
onMouseUp: () => void;
|
|
12985
|
-
})[];
|
|
12986
|
-
declare const TRIGGER_TO_HOOK: {
|
|
12987
|
-
readonly useHover: typeof useHover;
|
|
12988
|
-
readonly useFocused: typeof useFocused;
|
|
12989
|
-
readonly useFocusVisible: typeof useFocusVisible;
|
|
12990
|
-
readonly useFocusedWithin: typeof useFocusedWithin;
|
|
12991
|
-
readonly useFocusVisibleWithin: typeof useFocusVisibleWithin;
|
|
12992
|
-
readonly usePressed: typeof usePressed;
|
|
12993
|
-
};
|
|
12994
|
-
type TriggerType = keyof typeof TRIGGER_TO_HOOK;
|
|
12995
|
-
interface TriggerOpts {
|
|
12996
|
-
isTextInput?: boolean;
|
|
12997
|
-
}
|
|
12998
|
-
/**
|
|
12999
|
-
* Installs argment trigger. All the useTrigger calls must use hardcoded `trigger` arg,
|
|
13000
|
-
* as it's not valid to install variable React hooks!
|
|
13001
|
-
*/
|
|
13002
|
-
declare function useTrigger(trigger: TriggerType, opts: TriggerOpts): [boolean, React$1.HTMLAttributes<HTMLElement>];
|
|
13003
|
-
|
|
13004
|
-
declare const classNames: any;
|
|
13005
|
-
|
|
13006
|
-
declare function setPlumeStrictMode(mode: boolean): void;
|
|
13007
|
-
type VariantArgChoices<T> = T extends (infer M)[] ? M : T extends SingleChoiceArg<infer M> ? M : never;
|
|
13008
|
-
type VariantArgsChoices<V> = {
|
|
13009
|
-
[k in keyof V]-?: VariantArgChoices<V[k]>;
|
|
13010
|
-
};
|
|
13011
|
-
type DictValues<V extends Record<string, any>> = V[keyof V];
|
|
13012
|
-
type DictTuples<V extends Record<string, any>> = DictValues<{
|
|
13013
|
-
[K in keyof V]: [K, V[K]];
|
|
13014
|
-
}>;
|
|
13015
|
-
type VariantDefTuple<V> = DictTuples<VariantArgsChoices<V>>;
|
|
13016
|
-
type DistributeTuple<T> = T extends [infer T1, infer T2] ? {
|
|
13017
|
-
group: T1;
|
|
13018
|
-
variant: T2;
|
|
13019
|
-
} : never;
|
|
13020
|
-
type VariantDef<V> = DistributeTuple<VariantDefTuple<V>>;
|
|
13021
|
-
type PlasmicClass<V extends Record<string, any>, A extends Record<string, any>, O extends Record<string, any>> = {
|
|
13022
|
-
(props: {
|
|
13023
|
-
variants?: V;
|
|
13024
|
-
args?: A;
|
|
13025
|
-
overrides?: O;
|
|
13026
|
-
}): React$1.ReactElement | null;
|
|
13027
|
-
internalVariantProps: (keyof V)[];
|
|
13028
|
-
internalArgProps: (keyof A)[];
|
|
13029
|
-
};
|
|
13030
|
-
type AnyPlasmicClass = PlasmicClass<any, any, any>;
|
|
13031
|
-
type PlasmicClassVariants<C extends AnyPlasmicClass> = C extends PlasmicClass<infer V, any, any> ? V : unknown;
|
|
13032
|
-
type PlasmicClassArgs<C extends AnyPlasmicClass> = C extends PlasmicClass<any, infer A, any> ? A : unknown;
|
|
13033
|
-
type PlasmicClassOverrides<C extends AnyPlasmicClass> = C extends PlasmicClass<any, any, infer O> ? O : unknown;
|
|
13034
|
-
|
|
13035
|
-
interface PlumeCommonProps {
|
|
13036
|
-
showStartIcon?: boolean;
|
|
13037
|
-
showEndIcon?: boolean;
|
|
13038
|
-
startIcon?: React$1.ReactNode;
|
|
13039
|
-
endIcon?: React$1.ReactNode;
|
|
13040
|
-
children?: React$1.ReactNode;
|
|
13041
|
-
isDisabled?: boolean;
|
|
13042
|
-
}
|
|
13043
|
-
interface HtmlButtonProps extends Omit<React$1.ComponentProps<"button">, "ref" | "disabled"> {
|
|
13044
|
-
}
|
|
13045
|
-
interface HtmlAnchorProps extends Omit<React$1.ComponentProps<"a">, "ref" | "href" | "target"> {
|
|
13046
|
-
}
|
|
13047
|
-
interface PlumeActualButtonProps {
|
|
13048
|
-
submitsForm?: boolean;
|
|
13049
|
-
}
|
|
13050
|
-
interface PlumeAnchorProps {
|
|
13051
|
-
link?: string;
|
|
13052
|
-
target?: React$1.ComponentProps<"a">["target"] | boolean;
|
|
13053
|
-
}
|
|
13054
|
-
type PlumeButtonProps = PlumeCommonProps & PlumeActualButtonProps & PlumeAnchorProps;
|
|
13055
|
-
type BaseButtonProps = PlumeButtonProps & HtmlButtonProps & HtmlAnchorProps;
|
|
13056
|
-
type AllButtonProps = PlumeCommonProps & PlumeActualButtonProps & HtmlButtonProps;
|
|
13057
|
-
type AllAnchorProps = PlumeCommonProps & PlumeAnchorProps & HtmlAnchorProps;
|
|
13058
|
-
type HtmlAnchorOnlyProps = Exclude<keyof AllAnchorProps, keyof AllButtonProps>;
|
|
13059
|
-
type HtmlButtonOnlyProps = Exclude<keyof AllButtonProps, keyof AllAnchorProps>;
|
|
13060
|
-
type ButtonRef = React$1.Ref<HTMLButtonElement | HTMLAnchorElement>;
|
|
13061
|
-
interface ButtonConfig<C extends AnyPlasmicClass> {
|
|
13062
|
-
showStartIconVariant: VariantDef<PlasmicClassVariants<C>>;
|
|
13063
|
-
showEndIconVariant?: VariantDef<PlasmicClassVariants<C>>;
|
|
13064
|
-
isDisabledVariant?: VariantDef<PlasmicClassVariants<C>>;
|
|
13065
|
-
startIconSlot?: keyof PlasmicClassArgs<C>;
|
|
13066
|
-
endIconSlot?: keyof PlasmicClassArgs<C>;
|
|
13067
|
-
contentSlot: keyof PlasmicClassArgs<C>;
|
|
13068
|
-
root: keyof PlasmicClassOverrides<C>;
|
|
13069
|
-
}
|
|
13070
|
-
declare function useButton<P extends PlumeButtonProps, C extends AnyPlasmicClass>(plasmicClass: C, props: P, config: ButtonConfig<C>, ref?: ButtonRef): {
|
|
13071
|
-
plasmicProps: {
|
|
13072
|
-
variants: PlasmicClassVariants<C>;
|
|
13073
|
-
args: PlasmicClassArgs<C>;
|
|
13074
|
-
overrides: PlasmicClassOverrides<C>;
|
|
13075
|
-
};
|
|
13076
|
-
};
|
|
13077
|
-
|
|
13078
|
-
/*
|
|
13079
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
13080
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
13081
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
13082
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
13083
|
-
*
|
|
13084
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
13085
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
13086
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
13087
|
-
* governing permissions and limitations under the License.
|
|
13088
|
-
*/
|
|
13089
|
-
|
|
13090
|
-
|
|
13091
|
-
|
|
13092
12829
|
interface AriaLabelingProps {
|
|
13093
12830
|
/**
|
|
13094
12831
|
* Defines a string value that labels the current element.
|
|
@@ -13145,6 +12882,18 @@ interface InputDOMProps {
|
|
|
13145
12882
|
name?: string
|
|
13146
12883
|
}
|
|
13147
12884
|
|
|
12885
|
+
/** Any focusable element, including both HTML and SVG elements. */
|
|
12886
|
+
interface FocusableElement extends Element, HTMLOrSVGElement {}
|
|
12887
|
+
|
|
12888
|
+
/** All DOM attributes supported across both HTML and SVG elements. */
|
|
12889
|
+
interface DOMAttributes<T = FocusableElement> extends AriaAttributes, DOMAttributes$1<T> {
|
|
12890
|
+
id?: string | undefined,
|
|
12891
|
+
role?: AriaRole | undefined,
|
|
12892
|
+
tabIndex?: number | undefined,
|
|
12893
|
+
style?: CSSProperties$1 | undefined,
|
|
12894
|
+
className?: string | undefined
|
|
12895
|
+
}
|
|
12896
|
+
|
|
13148
12897
|
/*
|
|
13149
12898
|
* Copyright 2020 Adobe. All rights reserved.
|
|
13150
12899
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -13326,7 +13075,7 @@ type BaseEvent<T extends SyntheticEvent> = T & {
|
|
|
13326
13075
|
continuePropagation(): void
|
|
13327
13076
|
}
|
|
13328
13077
|
|
|
13329
|
-
type KeyboardEvent = BaseEvent<KeyboardEvent$
|
|
13078
|
+
type KeyboardEvent = BaseEvent<KeyboardEvent$1<any>>;
|
|
13330
13079
|
|
|
13331
13080
|
type PointerType = 'mouse' | 'pen' | 'touch' | 'keyboard' | 'virtual';
|
|
13332
13081
|
|
|
@@ -13393,6 +13142,118 @@ interface FocusableProps<Target = Element> extends FocusEvents<Target>, Keyboard
|
|
|
13393
13142
|
|
|
13394
13143
|
type Key = string | number;
|
|
13395
13144
|
|
|
13145
|
+
declare function useFocused(opts: {
|
|
13146
|
+
isTextInput?: boolean;
|
|
13147
|
+
}): (boolean | DOMAttributes<FocusableElement>)[];
|
|
13148
|
+
declare function useFocusVisible(opts: {
|
|
13149
|
+
isTextInput?: boolean;
|
|
13150
|
+
}): (boolean | DOMAttributes<FocusableElement>)[];
|
|
13151
|
+
declare function useFocusedWithin(opts: {
|
|
13152
|
+
isTextInput?: boolean;
|
|
13153
|
+
}): (boolean | DOMAttributes<FocusableElement>)[];
|
|
13154
|
+
declare function useFocusVisibleWithin(opts: {
|
|
13155
|
+
isTextInput?: boolean;
|
|
13156
|
+
}): (boolean | DOMAttributes<FocusableElement>)[];
|
|
13157
|
+
declare function useHover(): (boolean | {
|
|
13158
|
+
onMouseEnter: () => void;
|
|
13159
|
+
onMouseLeave: () => void;
|
|
13160
|
+
})[];
|
|
13161
|
+
declare function usePressed(): (boolean | {
|
|
13162
|
+
onMouseDown: () => void;
|
|
13163
|
+
onMouseUp: () => void;
|
|
13164
|
+
})[];
|
|
13165
|
+
declare const TRIGGER_TO_HOOK: {
|
|
13166
|
+
readonly useHover: typeof useHover;
|
|
13167
|
+
readonly useFocused: typeof useFocused;
|
|
13168
|
+
readonly useFocusVisible: typeof useFocusVisible;
|
|
13169
|
+
readonly useFocusedWithin: typeof useFocusedWithin;
|
|
13170
|
+
readonly useFocusVisibleWithin: typeof useFocusVisibleWithin;
|
|
13171
|
+
readonly usePressed: typeof usePressed;
|
|
13172
|
+
};
|
|
13173
|
+
type TriggerType = keyof typeof TRIGGER_TO_HOOK;
|
|
13174
|
+
interface TriggerOpts {
|
|
13175
|
+
isTextInput?: boolean;
|
|
13176
|
+
}
|
|
13177
|
+
/**
|
|
13178
|
+
* Installs argment trigger. All the useTrigger calls must use hardcoded `trigger` arg,
|
|
13179
|
+
* as it's not valid to install variable React hooks!
|
|
13180
|
+
*/
|
|
13181
|
+
declare function useTrigger(trigger: TriggerType, opts: TriggerOpts): [boolean, React$1.HTMLAttributes<HTMLElement>];
|
|
13182
|
+
|
|
13183
|
+
declare const classNames: any;
|
|
13184
|
+
|
|
13185
|
+
declare function setPlumeStrictMode(mode: boolean): void;
|
|
13186
|
+
type VariantArgChoices<T> = T extends (infer M)[] ? M : T extends SingleChoiceArg<infer M> ? M : never;
|
|
13187
|
+
type VariantArgsChoices<V> = {
|
|
13188
|
+
[k in keyof V]-?: VariantArgChoices<V[k]>;
|
|
13189
|
+
};
|
|
13190
|
+
type DictValues<V extends Record<string, any>> = V[keyof V];
|
|
13191
|
+
type DictTuples<V extends Record<string, any>> = DictValues<{
|
|
13192
|
+
[K in keyof V]: [K, V[K]];
|
|
13193
|
+
}>;
|
|
13194
|
+
type VariantDefTuple<V> = DictTuples<VariantArgsChoices<V>>;
|
|
13195
|
+
type DistributeTuple<T> = T extends [infer T1, infer T2] ? {
|
|
13196
|
+
group: T1;
|
|
13197
|
+
variant: T2;
|
|
13198
|
+
} : never;
|
|
13199
|
+
type VariantDef<V> = DistributeTuple<VariantDefTuple<V>>;
|
|
13200
|
+
type PlasmicClass<V extends Record<string, any>, A extends Record<string, any>, O extends Record<string, any>> = {
|
|
13201
|
+
(props: {
|
|
13202
|
+
variants?: V;
|
|
13203
|
+
args?: A;
|
|
13204
|
+
overrides?: O;
|
|
13205
|
+
}): React$1.ReactElement | null;
|
|
13206
|
+
internalVariantProps: (keyof V)[];
|
|
13207
|
+
internalArgProps: (keyof A)[];
|
|
13208
|
+
};
|
|
13209
|
+
type AnyPlasmicClass = PlasmicClass<any, any, any>;
|
|
13210
|
+
type PlasmicClassVariants<C extends AnyPlasmicClass> = C extends PlasmicClass<infer V, any, any> ? V : unknown;
|
|
13211
|
+
type PlasmicClassArgs<C extends AnyPlasmicClass> = C extends PlasmicClass<any, infer A, any> ? A : unknown;
|
|
13212
|
+
type PlasmicClassOverrides<C extends AnyPlasmicClass> = C extends PlasmicClass<any, any, infer O> ? O : unknown;
|
|
13213
|
+
|
|
13214
|
+
interface PlumeCommonProps {
|
|
13215
|
+
showStartIcon?: boolean;
|
|
13216
|
+
showEndIcon?: boolean;
|
|
13217
|
+
startIcon?: React$1.ReactNode;
|
|
13218
|
+
endIcon?: React$1.ReactNode;
|
|
13219
|
+
children?: React$1.ReactNode;
|
|
13220
|
+
isDisabled?: boolean;
|
|
13221
|
+
}
|
|
13222
|
+
interface HtmlButtonProps extends Omit<React$1.ComponentProps<"button">, "ref" | "disabled"> {
|
|
13223
|
+
}
|
|
13224
|
+
interface HtmlAnchorProps extends Omit<React$1.ComponentProps<"a">, "ref" | "href" | "target"> {
|
|
13225
|
+
}
|
|
13226
|
+
interface PlumeActualButtonProps {
|
|
13227
|
+
submitsForm?: boolean;
|
|
13228
|
+
}
|
|
13229
|
+
interface PlumeAnchorProps {
|
|
13230
|
+
link?: string;
|
|
13231
|
+
target?: React$1.ComponentProps<"a">["target"] | boolean;
|
|
13232
|
+
}
|
|
13233
|
+
type PlumeButtonProps = PlumeCommonProps & PlumeActualButtonProps & PlumeAnchorProps;
|
|
13234
|
+
type BaseButtonProps = PlumeButtonProps & HtmlButtonProps & HtmlAnchorProps;
|
|
13235
|
+
type AllButtonProps = PlumeCommonProps & PlumeActualButtonProps & HtmlButtonProps;
|
|
13236
|
+
type AllAnchorProps = PlumeCommonProps & PlumeAnchorProps & HtmlAnchorProps;
|
|
13237
|
+
type HtmlAnchorOnlyProps = Exclude<keyof AllAnchorProps, keyof AllButtonProps>;
|
|
13238
|
+
type HtmlButtonOnlyProps = Exclude<keyof AllButtonProps, keyof AllAnchorProps>;
|
|
13239
|
+
type ButtonRef = React$1.Ref<HTMLButtonElement | HTMLAnchorElement>;
|
|
13240
|
+
interface ButtonConfig<C extends AnyPlasmicClass> {
|
|
13241
|
+
showStartIconVariant: VariantDef<PlasmicClassVariants<C>>;
|
|
13242
|
+
showEndIconVariant?: VariantDef<PlasmicClassVariants<C>>;
|
|
13243
|
+
isDisabledVariant?: VariantDef<PlasmicClassVariants<C>>;
|
|
13244
|
+
startIconSlot?: keyof PlasmicClassArgs<C>;
|
|
13245
|
+
endIconSlot?: keyof PlasmicClassArgs<C>;
|
|
13246
|
+
contentSlot: keyof PlasmicClassArgs<C>;
|
|
13247
|
+
root: keyof PlasmicClassOverrides<C>;
|
|
13248
|
+
}
|
|
13249
|
+
declare function useButton<P extends PlumeButtonProps, C extends AnyPlasmicClass>(plasmicClass: C, props: P, config: ButtonConfig<C>, ref?: ButtonRef): {
|
|
13250
|
+
plasmicProps: {
|
|
13251
|
+
variants: PlasmicClassVariants<C>;
|
|
13252
|
+
args: PlasmicClassArgs<C>;
|
|
13253
|
+
overrides: PlasmicClassOverrides<C>;
|
|
13254
|
+
};
|
|
13255
|
+
};
|
|
13256
|
+
|
|
13396
13257
|
/*
|
|
13397
13258
|
* Copyright 2020 Adobe. All rights reserved.
|
|
13398
13259
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -13496,7 +13357,7 @@ declare function useCheckbox<P extends CheckboxProps, C extends AnyPlasmicClass>
|
|
|
13496
13357
|
state: CheckboxState;
|
|
13497
13358
|
};
|
|
13498
13359
|
|
|
13499
|
-
interface BaseMenuProps extends DOMProps
|
|
13360
|
+
interface BaseMenuProps extends DOMProps, AriaLabelingProps, StyleProps {
|
|
13500
13361
|
/**
|
|
13501
13362
|
* List of `Menu.Item`s or `Menu.Group`s that make up the menu
|
|
13502
13363
|
*/
|
|
@@ -13738,7 +13599,7 @@ interface DropdownMenuProps {
|
|
|
13738
13599
|
}
|
|
13739
13600
|
declare function DropdownMenu(props: DropdownMenuProps): React$1.JSX.Element;
|
|
13740
13601
|
|
|
13741
|
-
interface BaseMenuButtonProps extends DOMProps
|
|
13602
|
+
interface BaseMenuButtonProps extends DOMProps, FocusableProps, StyleProps, Pick<React$1.ComponentProps<"button">, "title"> {
|
|
13742
13603
|
/**
|
|
13743
13604
|
* The menu to show; can either be a Menu instance, or a function that returns a Menu
|
|
13744
13605
|
* instance if you want to defer creating the instance till when it's opened.
|
|
@@ -13804,7 +13665,7 @@ declare function useMenuButton<P extends BaseMenuButtonProps, C extends AnyPlasm
|
|
|
13804
13665
|
state: MenuButtonState;
|
|
13805
13666
|
};
|
|
13806
13667
|
|
|
13807
|
-
interface BaseSelectProps extends DOMProps
|
|
13668
|
+
interface BaseSelectProps extends DOMProps, AriaLabelingProps, FocusableDOMProps, InputBase, FocusableProps, StyleProps {
|
|
13808
13669
|
/**
|
|
13809
13670
|
* Key of the currently selected value
|
|
13810
13671
|
*/
|
|
@@ -14268,7 +14129,7 @@ declare function useTextInput<P extends PlumeTextInputProps, C extends AnyPlasmi
|
|
|
14268
14129
|
};
|
|
14269
14130
|
};
|
|
14270
14131
|
|
|
14271
|
-
interface BaseTriggeredOverlayProps extends StyleProps, DOMProps
|
|
14132
|
+
interface BaseTriggeredOverlayProps extends StyleProps, DOMProps {
|
|
14272
14133
|
children?: React$1.ReactNode;
|
|
14273
14134
|
}
|
|
14274
14135
|
interface TriggeredOverlayConfig<C extends AnyPlasmicClass> {
|
|
@@ -14304,7 +14165,7 @@ interface OverlayTriggerState {
|
|
|
14304
14165
|
interface TriggeredOverlayContextValue {
|
|
14305
14166
|
triggerRef: React$1.RefObject<HTMLElement>;
|
|
14306
14167
|
state: OverlayTriggerState;
|
|
14307
|
-
autoFocus?: boolean | FocusStrategy
|
|
14168
|
+
autoFocus?: boolean | FocusStrategy;
|
|
14308
14169
|
placement?: Placement;
|
|
14309
14170
|
overlayMatchTriggerWidth?: boolean;
|
|
14310
14171
|
overlayMinTriggerWidth?: boolean;
|
package/dist/index.cjs.js
CHANGED
|
@@ -1741,7 +1741,7 @@ function PlasmicRootProvider(props) {
|
|
|
1741
1741
|
return (React__namespace.createElement(MaybeWrap, { cond: !disableLoadingBoundary && reactMajorVersion >= 18, wrapper: function (children) { return (React__namespace.createElement(host.DataProvider, { name: "plasmicInternalEnableLoadingBoundary", hidden: true, data: true },
|
|
1742
1742
|
React__namespace.createElement(React__namespace.Suspense, { fallback: suspenseFallback !== null && suspenseFallback !== void 0 ? suspenseFallback : "Loading..." }, children))); } },
|
|
1743
1743
|
React__namespace.createElement(PlasmicRootContext.Provider, { value: context },
|
|
1744
|
-
React__namespace.createElement(ssr.SSRProvider, null,
|
|
1744
|
+
React__namespace.createElement(MaybeWrap, { cond: reactMajorVersion < 18, wrapper: function (children) { return React__namespace.createElement(ssr.SSRProvider, null, children); } },
|
|
1745
1745
|
React__namespace.createElement(dataSourcesContext.PlasmicDataSourceContextProvider, { value: dataSourceContextValue },
|
|
1746
1746
|
React__namespace.createElement(PlasmicTranslatorContext.Provider, { value: (_a = props.i18n) !== null && _a !== void 0 ? _a : props.translator },
|
|
1747
1747
|
React__namespace.createElement(PlasmicHeadContext.Provider, { value: props.Head },
|