@plasmicapp/react-web 0.2.102 → 0.2.105
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/README.md +13 -0
- package/dist/all.d.ts +471 -108
- package/dist/index.d.ts +1 -0
- package/dist/plume/menu-button/menu-trigger.d.ts +1 -1
- package/dist/plume/select/index.d.ts +1 -0
- package/dist/plume/triggered-overlay/index.d.ts +1 -0
- package/dist/react-web.cjs.development.js +480 -339
- package/dist/react-web.cjs.development.js.map +1 -1
- package/dist/react-web.cjs.production.min.js +1 -1
- package/dist/react-web.cjs.production.min.js.map +1 -1
- package/dist/react-web.esm.js +476 -339
- package/dist/react-web.esm.js.map +1 -1
- package/dist/render/triggers.d.ts +4 -4
- package/dist/states/helpers.d.ts +9 -0
- package/dist/states/index.d.ts +7 -7
- package/dist/stories/PlasmicImg.stories.d.ts +2 -2
- package/dist/stories/UseDollarState.stories.d.ts +40 -0
- package/package.json +27 -21
- package/skinny/dist/collection-utils-3487dd27.js +238 -0
- package/skinny/dist/collection-utils-3487dd27.js.map +1 -0
- package/skinny/dist/collection-utils-47e89cbe.js +238 -0
- package/skinny/dist/collection-utils-47e89cbe.js.map +1 -0
- package/skinny/dist/collection-utils-4dae6efa.js +292 -0
- package/skinny/dist/collection-utils-4dae6efa.js.map +1 -0
- package/skinny/dist/collection-utils-57c273dc.js +238 -0
- package/skinny/dist/collection-utils-57c273dc.js.map +1 -0
- package/skinny/dist/collection-utils-57ec40f9.js +292 -0
- package/skinny/dist/collection-utils-57ec40f9.js.map +1 -0
- package/skinny/dist/collection-utils-96cde83c.js +238 -0
- package/skinny/dist/collection-utils-96cde83c.js.map +1 -0
- package/skinny/dist/collection-utils-b0b8f30e.js +291 -0
- package/skinny/dist/collection-utils-b0b8f30e.js.map +1 -0
- package/skinny/dist/common-182a0b0c.js +201 -0
- package/skinny/dist/common-182a0b0c.js.map +1 -0
- package/skinny/dist/index.d.ts +1 -0
- package/skinny/dist/index.js +68 -45
- package/skinny/dist/index.js.map +1 -1
- package/skinny/dist/plume/button/index.js +5 -5
- package/skinny/dist/plume/button/index.js.map +1 -1
- package/skinny/dist/plume/checkbox/index.js +6 -6
- package/skinny/dist/plume/checkbox/index.js.map +1 -1
- package/skinny/dist/plume/menu/index.js +11 -11
- package/skinny/dist/plume/menu/index.js.map +1 -1
- package/skinny/dist/plume/menu-button/index.js +6 -6
- package/skinny/dist/plume/menu-button/index.js.map +1 -1
- package/skinny/dist/plume/menu-button/menu-trigger.d.ts +1 -1
- package/skinny/dist/plume/select/index.d.ts +1 -0
- package/skinny/dist/plume/select/index.js +12 -12
- package/skinny/dist/plume/select/index.js.map +1 -1
- package/skinny/dist/plume/switch/index.js +6 -6
- package/skinny/dist/plume/switch/index.js.map +1 -1
- package/skinny/dist/plume/text-input/index.js +5 -5
- package/skinny/dist/plume/text-input/index.js.map +1 -1
- package/skinny/dist/plume/triggered-overlay/index.d.ts +1 -0
- package/skinny/dist/plume/triggered-overlay/index.js +8 -7
- package/skinny/dist/plume/triggered-overlay/index.js.map +1 -1
- package/skinny/dist/plume-utils-5c413fd1.js +35 -0
- package/skinny/dist/plume-utils-5c413fd1.js.map +1 -0
- package/skinny/dist/plume-utils-623b91cc.js +35 -0
- package/skinny/dist/plume-utils-623b91cc.js.map +1 -0
- package/skinny/dist/props-utils-4633caf6.js +8 -0
- package/skinny/dist/props-utils-4633caf6.js.map +1 -0
- package/skinny/dist/props-utils-5c0ad25a.js +59 -0
- package/skinny/dist/props-utils-5c0ad25a.js.map +1 -0
- package/skinny/dist/props-utils-754f655a.js +39 -0
- package/skinny/dist/props-utils-754f655a.js.map +1 -0
- package/skinny/dist/props-utils-b2ad4997.js +8 -0
- package/skinny/dist/props-utils-b2ad4997.js.map +1 -0
- package/skinny/dist/props-utils-c632595f.js +59 -0
- package/skinny/dist/props-utils-c632595f.js.map +1 -0
- package/skinny/dist/props-utils-fd5f444e.js +59 -0
- package/skinny/dist/props-utils-fd5f444e.js.map +1 -0
- package/skinny/dist/react-utils-118d8539.js +190 -0
- package/skinny/dist/react-utils-118d8539.js.map +1 -0
- package/skinny/dist/react-utils-2a2fd6c9.js +339 -0
- package/skinny/dist/react-utils-2a2fd6c9.js.map +1 -0
- package/skinny/dist/react-utils-2d70bbbe.js +172 -0
- package/skinny/dist/react-utils-2d70bbbe.js.map +1 -0
- package/skinny/dist/react-utils-35cb2a4e.js +201 -0
- package/skinny/dist/react-utils-35cb2a4e.js.map +1 -0
- package/skinny/dist/react-utils-675565b4.js +334 -0
- package/skinny/dist/react-utils-675565b4.js.map +1 -0
- package/skinny/dist/render/PlasmicImg/index.js +3 -3
- package/skinny/dist/render/PlasmicImg/index.js.map +1 -1
- package/skinny/dist/render/PlasmicImg.d.ts +62 -0
- package/skinny/dist/render/triggers.d.ts +4 -4
- package/skinny/dist/ssr-64e38713.js +108 -0
- package/skinny/dist/ssr-64e38713.js.map +1 -0
- package/skinny/dist/ssr-902d1292.js +105 -0
- package/skinny/dist/ssr-902d1292.js.map +1 -0
- package/skinny/dist/ssr-a8081074.js +108 -0
- package/skinny/dist/ssr-a8081074.js.map +1 -0
- package/skinny/dist/ssr-d2fd94f2.js +31 -0
- package/skinny/dist/ssr-d2fd94f2.js.map +1 -0
- package/skinny/dist/states/helpers.d.ts +9 -0
- package/skinny/dist/states/index.d.ts +7 -7
- package/skinny/dist/stories/UseDollarState.stories.d.ts +41 -0
- package/skinny/dist/tslib.es6-00014098.js +148 -0
- package/skinny/dist/tslib.es6-00014098.js.map +1 -0
- package/skinny/dist/tslib.es6-73236e8e.js +141 -0
- package/skinny/dist/tslib.es6-73236e8e.js.map +1 -0
- package/README +0 -8
package/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# @plasmicapp/react-web
|
|
2
|
+
|
|
3
|
+
This is the runtime for code generated by Plasmic, the visual builder for React.
|
|
4
|
+
This package contains functions
|
|
5
|
+
and type definitions used by generated presentational code.
|
|
6
|
+
|
|
7
|
+
Learn more about Plasmic:
|
|
8
|
+
|
|
9
|
+
https://www.plasmic.app
|
|
10
|
+
|
|
11
|
+
Learn more about Plasmic codegen:
|
|
12
|
+
|
|
13
|
+
https://docs.plasmic.app/learn/codegen-guide/
|
package/dist/all.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { FocusEvent, KeyboardEvent as KeyboardEvent$1, SyntheticEvent
|
|
2
|
+
import React__default, { AriaAttributes, DOMAttributes as DOMAttributes$1, AriaRole, CSSProperties, Key, ReactNode, ReactElement, FocusEvent, KeyboardEvent as KeyboardEvent$1, SyntheticEvent } from 'react';
|
|
3
3
|
|
|
4
4
|
// This is the only way I found to break circular references between ClassArray and ClassValue
|
|
5
5
|
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
|
|
@@ -268,109 +268,6 @@ declare const Stack: (<T extends "symbol" | "object" | "a" | "abbr" | "address"
|
|
|
268
268
|
}>;
|
|
269
269
|
};
|
|
270
270
|
|
|
271
|
-
declare function useFocused(opts: {
|
|
272
|
-
isTextInput?: boolean;
|
|
273
|
-
}): (boolean | React.HTMLAttributes<HTMLElement>)[];
|
|
274
|
-
declare function useFocusVisible(opts: {
|
|
275
|
-
isTextInput?: boolean;
|
|
276
|
-
}): (boolean | React.HTMLAttributes<HTMLElement>)[];
|
|
277
|
-
declare function useFocusedWithin(opts: {
|
|
278
|
-
isTextInput?: boolean;
|
|
279
|
-
}): (boolean | React.HTMLAttributes<HTMLElement>)[];
|
|
280
|
-
declare function useFocusVisibleWithin(opts: {
|
|
281
|
-
isTextInput?: boolean;
|
|
282
|
-
}): (boolean | React.HTMLAttributes<HTMLElement>)[];
|
|
283
|
-
declare function useHover(): (boolean | {
|
|
284
|
-
onMouseEnter: () => void;
|
|
285
|
-
onMouseLeave: () => void;
|
|
286
|
-
})[];
|
|
287
|
-
declare function usePressed(): (boolean | {
|
|
288
|
-
onMouseDown: () => void;
|
|
289
|
-
onMouseUp: () => void;
|
|
290
|
-
})[];
|
|
291
|
-
declare const TRIGGER_TO_HOOK: {
|
|
292
|
-
readonly useHover: typeof useHover;
|
|
293
|
-
readonly useFocused: typeof useFocused;
|
|
294
|
-
readonly useFocusVisible: typeof useFocusVisible;
|
|
295
|
-
readonly useFocusedWithin: typeof useFocusedWithin;
|
|
296
|
-
readonly useFocusVisibleWithin: typeof useFocusVisibleWithin;
|
|
297
|
-
readonly usePressed: typeof usePressed;
|
|
298
|
-
};
|
|
299
|
-
declare type TriggerType = keyof typeof TRIGGER_TO_HOOK;
|
|
300
|
-
interface TriggerOpts {
|
|
301
|
-
isTextInput?: boolean;
|
|
302
|
-
}
|
|
303
|
-
/**
|
|
304
|
-
* Installs argment trigger. All the useTrigger calls must use hardcoded `trigger` arg,
|
|
305
|
-
* as it's not valid to install variable React hooks!
|
|
306
|
-
*/
|
|
307
|
-
declare function useTrigger(trigger: TriggerType, opts: TriggerOpts): [boolean, React.HTMLAttributes<HTMLElement>];
|
|
308
|
-
|
|
309
|
-
declare const classNames: ClassNamesExport;
|
|
310
|
-
|
|
311
|
-
declare function setPlumeStrictMode(mode: boolean): void;
|
|
312
|
-
declare type VariantArgChoices<T> = T extends (infer M)[] ? M : T extends SingleChoiceArg<infer M> ? M : never;
|
|
313
|
-
declare type VariantArgsChoices<V> = {
|
|
314
|
-
[k in keyof V]-?: VariantArgChoices<V[k]>;
|
|
315
|
-
};
|
|
316
|
-
declare type DictValues<V extends Record<string, any>> = V[keyof V];
|
|
317
|
-
declare type DictTuples<V extends Record<string, any>> = DictValues<{
|
|
318
|
-
[K in keyof V]: [K, V[K]];
|
|
319
|
-
}>;
|
|
320
|
-
declare type VariantDefTuple<V> = DictTuples<VariantArgsChoices<V>>;
|
|
321
|
-
declare type DistributeTuple<T> = T extends [infer T1, infer T2] ? {
|
|
322
|
-
group: T1;
|
|
323
|
-
variant: T2;
|
|
324
|
-
} : never;
|
|
325
|
-
declare type VariantDef<V> = DistributeTuple<VariantDefTuple<V>>;
|
|
326
|
-
declare type PlasmicClass<V extends Record<string, any>, A extends Record<string, any>, O extends Record<string, any>> = {
|
|
327
|
-
(props: {
|
|
328
|
-
variants?: V;
|
|
329
|
-
args?: A;
|
|
330
|
-
overrides?: O;
|
|
331
|
-
}): React.ReactElement | null;
|
|
332
|
-
internalVariantProps: (keyof V)[];
|
|
333
|
-
internalArgProps: (keyof A)[];
|
|
334
|
-
};
|
|
335
|
-
declare type AnyPlasmicClass = PlasmicClass<any, any, any>;
|
|
336
|
-
declare type PlasmicClassVariants<C extends AnyPlasmicClass> = C extends PlasmicClass<infer V, any, any> ? V : unknown;
|
|
337
|
-
declare type PlasmicClassArgs<C extends AnyPlasmicClass> = C extends PlasmicClass<any, infer A, any> ? A : unknown;
|
|
338
|
-
declare type PlasmicClassOverrides<C extends AnyPlasmicClass> = C extends PlasmicClass<any, any, infer O> ? O : unknown;
|
|
339
|
-
|
|
340
|
-
interface CommonProps {
|
|
341
|
-
showStartIcon?: boolean;
|
|
342
|
-
showEndIcon?: boolean;
|
|
343
|
-
startIcon?: React.ReactNode;
|
|
344
|
-
endIcon?: React.ReactNode;
|
|
345
|
-
children?: React.ReactNode;
|
|
346
|
-
isDisabled?: boolean;
|
|
347
|
-
}
|
|
348
|
-
interface HtmlButtonProps extends Omit<React.ComponentProps<"button">, "ref" | "disabled"> {
|
|
349
|
-
}
|
|
350
|
-
interface HtmlAnchorProps extends Omit<React.ComponentProps<"a">, "ref" | "href"> {
|
|
351
|
-
link?: string;
|
|
352
|
-
}
|
|
353
|
-
declare type BaseButtonProps = CommonProps & HtmlButtonProps & HtmlAnchorProps;
|
|
354
|
-
declare type HtmlAnchorOnlyProps = Exclude<keyof HtmlAnchorProps, keyof HtmlButtonProps>;
|
|
355
|
-
declare type HtmlButtonOnlyProps = Exclude<keyof HtmlButtonProps, keyof HtmlAnchorProps>;
|
|
356
|
-
declare type ButtonRef = React.Ref<HTMLButtonElement | HTMLAnchorElement>;
|
|
357
|
-
interface ButtonConfig<C extends AnyPlasmicClass> {
|
|
358
|
-
showStartIconVariant: VariantDef<PlasmicClassVariants<C>>;
|
|
359
|
-
showEndIconVariant?: VariantDef<PlasmicClassVariants<C>>;
|
|
360
|
-
isDisabledVariant?: VariantDef<PlasmicClassVariants<C>>;
|
|
361
|
-
startIconSlot?: keyof PlasmicClassArgs<C>;
|
|
362
|
-
endIconSlot?: keyof PlasmicClassArgs<C>;
|
|
363
|
-
contentSlot: keyof PlasmicClassArgs<C>;
|
|
364
|
-
root: keyof PlasmicClassOverrides<C>;
|
|
365
|
-
}
|
|
366
|
-
declare function useButton<P extends BaseButtonProps, C extends AnyPlasmicClass>(plasmicClass: C, props: P, config: ButtonConfig<C>, ref?: ButtonRef): {
|
|
367
|
-
plasmicProps: {
|
|
368
|
-
variants: PlasmicClassVariants<C>;
|
|
369
|
-
args: PlasmicClassArgs<C>;
|
|
370
|
-
overrides: PlasmicClassOverrides<C>;
|
|
371
|
-
};
|
|
372
|
-
};
|
|
373
|
-
|
|
374
271
|
/*
|
|
375
272
|
* Copyright 2020 Adobe. All rights reserved.
|
|
376
273
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -433,6 +330,17 @@ interface FocusableDOMProps extends DOMProps {
|
|
|
433
330
|
excludeFromTabOrder?: boolean
|
|
434
331
|
}
|
|
435
332
|
|
|
333
|
+
/** Any focusable element, including both HTML and SVG elements. */
|
|
334
|
+
interface FocusableElement extends Element, HTMLOrSVGElement {}
|
|
335
|
+
|
|
336
|
+
/** All DOM attributes supported across both HTML and SVG elements. */
|
|
337
|
+
interface DOMAttributes<T = FocusableElement> extends AriaAttributes, DOMAttributes$1<T> {
|
|
338
|
+
id?: string | undefined,
|
|
339
|
+
role?: AriaRole | undefined,
|
|
340
|
+
tabIndex?: number | undefined,
|
|
341
|
+
style?: CSSProperties | undefined
|
|
342
|
+
}
|
|
343
|
+
|
|
436
344
|
/*
|
|
437
345
|
* Copyright 2020 Adobe. All rights reserved.
|
|
438
346
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -478,6 +386,104 @@ interface InputBase {
|
|
|
478
386
|
*/
|
|
479
387
|
|
|
480
388
|
|
|
389
|
+
type SelectionMode = 'none' | 'single' | 'multiple';
|
|
390
|
+
type SelectionBehavior = 'toggle' | 'replace';
|
|
391
|
+
type Selection = 'all' | Set<Key>;
|
|
392
|
+
|
|
393
|
+
type FocusStrategy = 'first' | 'last';
|
|
394
|
+
type DisabledBehavior = 'selection' | 'all';
|
|
395
|
+
|
|
396
|
+
/*
|
|
397
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
398
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
399
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
400
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
401
|
+
*
|
|
402
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
403
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
404
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
405
|
+
* governing permissions and limitations under the License.
|
|
406
|
+
*/
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* A generic interface to access a readonly sequential
|
|
411
|
+
* collection of unique keyed items.
|
|
412
|
+
*/
|
|
413
|
+
interface Collection<T> extends Iterable<T> {
|
|
414
|
+
/** The number of items in the collection. */
|
|
415
|
+
readonly size: number,
|
|
416
|
+
|
|
417
|
+
/** Iterate over all keys in the collection. */
|
|
418
|
+
getKeys(): Iterable<Key>,
|
|
419
|
+
|
|
420
|
+
/** Get an item by its key. */
|
|
421
|
+
getItem(key: Key): T,
|
|
422
|
+
|
|
423
|
+
/** Get an item by the index of its key. */
|
|
424
|
+
at(idx: number): T,
|
|
425
|
+
|
|
426
|
+
/** Get the key that comes before the given key in the collection. */
|
|
427
|
+
getKeyBefore(key: Key): Key | null,
|
|
428
|
+
|
|
429
|
+
/** Get the key that comes after the given key in the collection. */
|
|
430
|
+
getKeyAfter(key: Key): Key | null,
|
|
431
|
+
|
|
432
|
+
/** Get the first key in the collection. */
|
|
433
|
+
getFirstKey(): Key | null,
|
|
434
|
+
|
|
435
|
+
/** Get the last key in the collection. */
|
|
436
|
+
getLastKey(): Key | null
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
interface Node<T> {
|
|
440
|
+
/** The type of item this node represents. */
|
|
441
|
+
type: string,
|
|
442
|
+
/** A unique key for the node. */
|
|
443
|
+
key: Key,
|
|
444
|
+
/** The object value the node was created from. */
|
|
445
|
+
value: T,
|
|
446
|
+
/** The level of depth this node is at in the heirarchy. */
|
|
447
|
+
level: number,
|
|
448
|
+
/** Whether this item has children, even if not loaded yet. */
|
|
449
|
+
hasChildNodes: boolean,
|
|
450
|
+
/** The loaded children of this node. */
|
|
451
|
+
childNodes: Iterable<Node<T>>,
|
|
452
|
+
/** The rendered contents of this node (e.g. JSX). */
|
|
453
|
+
rendered: ReactNode,
|
|
454
|
+
/** A string value for this node, used for features like typeahead. */
|
|
455
|
+
textValue: string,
|
|
456
|
+
/** An accessibility label for this node. */
|
|
457
|
+
'aria-label'?: string,
|
|
458
|
+
/** The index of this node within its parent. */
|
|
459
|
+
index?: number,
|
|
460
|
+
/** A function that should be called to wrap the rendered node. */
|
|
461
|
+
wrapper?: (element: ReactElement) => ReactElement,
|
|
462
|
+
/** The key of the parent node. */
|
|
463
|
+
parentKey?: Key,
|
|
464
|
+
/** The key of the node before this node. */
|
|
465
|
+
prevKey?: Key,
|
|
466
|
+
/** The key of the node after this node. */
|
|
467
|
+
nextKey?: Key,
|
|
468
|
+
/** Additional properties specific to a particular node type. */
|
|
469
|
+
props?: any,
|
|
470
|
+
/** @private */
|
|
471
|
+
shouldInvalidate?: (context: unknown) => boolean
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/*
|
|
475
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
476
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
477
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
478
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
479
|
+
*
|
|
480
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
481
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
482
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
483
|
+
* governing permissions and limitations under the License.
|
|
484
|
+
*/
|
|
485
|
+
|
|
486
|
+
|
|
481
487
|
// Event bubbling can be problematic in real-world applications, so the default for React Spectrum components
|
|
482
488
|
// is not to propagate. This can be overridden by calling continuePropagation() on the event.
|
|
483
489
|
type BaseEvent<T extends SyntheticEvent> = T & {
|
|
@@ -488,6 +494,30 @@ type BaseEvent<T extends SyntheticEvent> = T & {
|
|
|
488
494
|
|
|
489
495
|
type KeyboardEvent = BaseEvent<KeyboardEvent$1<any>>;
|
|
490
496
|
|
|
497
|
+
type PointerType = 'mouse' | 'pen' | 'touch' | 'keyboard' | 'virtual';
|
|
498
|
+
|
|
499
|
+
interface PressEvent {
|
|
500
|
+
/** The type of press event being fired. */
|
|
501
|
+
type: 'pressstart' | 'pressend' | 'pressup' | 'press',
|
|
502
|
+
/** The pointer type that triggered the press event. */
|
|
503
|
+
pointerType: PointerType,
|
|
504
|
+
/** The target element of the press event. */
|
|
505
|
+
target: Element,
|
|
506
|
+
/** Whether the shift keyboard modifier was held during the press event. */
|
|
507
|
+
shiftKey: boolean,
|
|
508
|
+
/** Whether the ctrl keyboard modifier was held during the press event. */
|
|
509
|
+
ctrlKey: boolean,
|
|
510
|
+
/** Whether the meta keyboard modifier was held during the press event. */
|
|
511
|
+
metaKey: boolean,
|
|
512
|
+
/** Whether the alt keyboard modifier was held during the press event. */
|
|
513
|
+
altKey: boolean
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
interface LongPressEvent extends Omit<PressEvent, 'type'> {
|
|
517
|
+
/** The type of long press event being fired. */
|
|
518
|
+
type: 'longpressstart' | 'longpressend' | 'longpress'
|
|
519
|
+
}
|
|
520
|
+
|
|
491
521
|
interface KeyboardEvents {
|
|
492
522
|
/** Handler that is called when a key is pressed. */
|
|
493
523
|
onKeyDown?: (e: KeyboardEvent) => void,
|
|
@@ -509,6 +539,109 @@ interface FocusableProps extends FocusEvents, KeyboardEvents {
|
|
|
509
539
|
autoFocus?: boolean
|
|
510
540
|
}
|
|
511
541
|
|
|
542
|
+
declare function useFocused(opts: {
|
|
543
|
+
isTextInput?: boolean;
|
|
544
|
+
}): (boolean | DOMAttributes<FocusableElement>)[];
|
|
545
|
+
declare function useFocusVisible(opts: {
|
|
546
|
+
isTextInput?: boolean;
|
|
547
|
+
}): (boolean | DOMAttributes<FocusableElement>)[];
|
|
548
|
+
declare function useFocusedWithin(opts: {
|
|
549
|
+
isTextInput?: boolean;
|
|
550
|
+
}): (boolean | DOMAttributes<FocusableElement>)[];
|
|
551
|
+
declare function useFocusVisibleWithin(opts: {
|
|
552
|
+
isTextInput?: boolean;
|
|
553
|
+
}): (boolean | DOMAttributes<FocusableElement>)[];
|
|
554
|
+
declare function useHover(): (boolean | {
|
|
555
|
+
onMouseEnter: () => void;
|
|
556
|
+
onMouseLeave: () => void;
|
|
557
|
+
})[];
|
|
558
|
+
declare function usePressed(): (boolean | {
|
|
559
|
+
onMouseDown: () => void;
|
|
560
|
+
onMouseUp: () => void;
|
|
561
|
+
})[];
|
|
562
|
+
declare const TRIGGER_TO_HOOK: {
|
|
563
|
+
readonly useHover: typeof useHover;
|
|
564
|
+
readonly useFocused: typeof useFocused;
|
|
565
|
+
readonly useFocusVisible: typeof useFocusVisible;
|
|
566
|
+
readonly useFocusedWithin: typeof useFocusedWithin;
|
|
567
|
+
readonly useFocusVisibleWithin: typeof useFocusVisibleWithin;
|
|
568
|
+
readonly usePressed: typeof usePressed;
|
|
569
|
+
};
|
|
570
|
+
declare type TriggerType = keyof typeof TRIGGER_TO_HOOK;
|
|
571
|
+
interface TriggerOpts {
|
|
572
|
+
isTextInput?: boolean;
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Installs argment trigger. All the useTrigger calls must use hardcoded `trigger` arg,
|
|
576
|
+
* as it's not valid to install variable React hooks!
|
|
577
|
+
*/
|
|
578
|
+
declare function useTrigger(trigger: TriggerType, opts: TriggerOpts): [boolean, React.HTMLAttributes<HTMLElement>];
|
|
579
|
+
|
|
580
|
+
declare const classNames: ClassNamesExport;
|
|
581
|
+
|
|
582
|
+
declare function setPlumeStrictMode(mode: boolean): void;
|
|
583
|
+
declare type VariantArgChoices<T> = T extends (infer M)[] ? M : T extends SingleChoiceArg<infer M> ? M : never;
|
|
584
|
+
declare type VariantArgsChoices<V> = {
|
|
585
|
+
[k in keyof V]-?: VariantArgChoices<V[k]>;
|
|
586
|
+
};
|
|
587
|
+
declare type DictValues<V extends Record<string, any>> = V[keyof V];
|
|
588
|
+
declare type DictTuples<V extends Record<string, any>> = DictValues<{
|
|
589
|
+
[K in keyof V]: [K, V[K]];
|
|
590
|
+
}>;
|
|
591
|
+
declare type VariantDefTuple<V> = DictTuples<VariantArgsChoices<V>>;
|
|
592
|
+
declare type DistributeTuple<T> = T extends [infer T1, infer T2] ? {
|
|
593
|
+
group: T1;
|
|
594
|
+
variant: T2;
|
|
595
|
+
} : never;
|
|
596
|
+
declare type VariantDef<V> = DistributeTuple<VariantDefTuple<V>>;
|
|
597
|
+
declare type PlasmicClass<V extends Record<string, any>, A extends Record<string, any>, O extends Record<string, any>> = {
|
|
598
|
+
(props: {
|
|
599
|
+
variants?: V;
|
|
600
|
+
args?: A;
|
|
601
|
+
overrides?: O;
|
|
602
|
+
}): React.ReactElement | null;
|
|
603
|
+
internalVariantProps: (keyof V)[];
|
|
604
|
+
internalArgProps: (keyof A)[];
|
|
605
|
+
};
|
|
606
|
+
declare type AnyPlasmicClass = PlasmicClass<any, any, any>;
|
|
607
|
+
declare type PlasmicClassVariants<C extends AnyPlasmicClass> = C extends PlasmicClass<infer V, any, any> ? V : unknown;
|
|
608
|
+
declare type PlasmicClassArgs<C extends AnyPlasmicClass> = C extends PlasmicClass<any, infer A, any> ? A : unknown;
|
|
609
|
+
declare type PlasmicClassOverrides<C extends AnyPlasmicClass> = C extends PlasmicClass<any, any, infer O> ? O : unknown;
|
|
610
|
+
|
|
611
|
+
interface CommonProps {
|
|
612
|
+
showStartIcon?: boolean;
|
|
613
|
+
showEndIcon?: boolean;
|
|
614
|
+
startIcon?: React.ReactNode;
|
|
615
|
+
endIcon?: React.ReactNode;
|
|
616
|
+
children?: React.ReactNode;
|
|
617
|
+
isDisabled?: boolean;
|
|
618
|
+
}
|
|
619
|
+
interface HtmlButtonProps extends Omit<React.ComponentProps<"button">, "ref" | "disabled"> {
|
|
620
|
+
}
|
|
621
|
+
interface HtmlAnchorProps extends Omit<React.ComponentProps<"a">, "ref" | "href"> {
|
|
622
|
+
link?: string;
|
|
623
|
+
}
|
|
624
|
+
declare type BaseButtonProps = CommonProps & HtmlButtonProps & HtmlAnchorProps;
|
|
625
|
+
declare type HtmlAnchorOnlyProps = Exclude<keyof HtmlAnchorProps, keyof HtmlButtonProps>;
|
|
626
|
+
declare type HtmlButtonOnlyProps = Exclude<keyof HtmlButtonProps, keyof HtmlAnchorProps>;
|
|
627
|
+
declare type ButtonRef = React.Ref<HTMLButtonElement | HTMLAnchorElement>;
|
|
628
|
+
interface ButtonConfig<C extends AnyPlasmicClass> {
|
|
629
|
+
showStartIconVariant: VariantDef<PlasmicClassVariants<C>>;
|
|
630
|
+
showEndIconVariant?: VariantDef<PlasmicClassVariants<C>>;
|
|
631
|
+
isDisabledVariant?: VariantDef<PlasmicClassVariants<C>>;
|
|
632
|
+
startIconSlot?: keyof PlasmicClassArgs<C>;
|
|
633
|
+
endIconSlot?: keyof PlasmicClassArgs<C>;
|
|
634
|
+
contentSlot: keyof PlasmicClassArgs<C>;
|
|
635
|
+
root: keyof PlasmicClassOverrides<C>;
|
|
636
|
+
}
|
|
637
|
+
declare function useButton<P extends BaseButtonProps, C extends AnyPlasmicClass>(plasmicClass: C, props: P, config: ButtonConfig<C>, ref?: ButtonRef): {
|
|
638
|
+
plasmicProps: {
|
|
639
|
+
variants: PlasmicClassVariants<C>;
|
|
640
|
+
args: PlasmicClassArgs<C>;
|
|
641
|
+
overrides: PlasmicClassOverrides<C>;
|
|
642
|
+
};
|
|
643
|
+
};
|
|
644
|
+
|
|
512
645
|
/*
|
|
513
646
|
* Copyright 2020 Adobe. All rights reserved.
|
|
514
647
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -1044,6 +1177,202 @@ declare function useSelectOptionGroup<P extends BaseSelectOptionGroupProps, C ex
|
|
|
1044
1177
|
};
|
|
1045
1178
|
};
|
|
1046
1179
|
|
|
1180
|
+
interface FocusState {
|
|
1181
|
+
/** Whether the collection is currently focused. */
|
|
1182
|
+
readonly isFocused: boolean;
|
|
1183
|
+
/** Sets whether the collection is focused. */
|
|
1184
|
+
setFocused(isFocused: boolean): void;
|
|
1185
|
+
/** The current focused key in the collection. */
|
|
1186
|
+
readonly focusedKey: Key;
|
|
1187
|
+
/** Whether the first or last child of the focused key should receive focus. */
|
|
1188
|
+
readonly childFocusStrategy: FocusStrategy;
|
|
1189
|
+
/** Sets the focused key, and optionally, whether the first or last child of that key should receive focus. */
|
|
1190
|
+
setFocusedKey(key: Key, child?: FocusStrategy): void;
|
|
1191
|
+
}
|
|
1192
|
+
interface MultipleSelectionState extends FocusState {
|
|
1193
|
+
/** The type of selection that is allowed in the collection. */
|
|
1194
|
+
readonly selectionMode: SelectionMode;
|
|
1195
|
+
/** The selection behavior for the collection. */
|
|
1196
|
+
readonly selectionBehavior: SelectionBehavior;
|
|
1197
|
+
/** Sets the selection behavior for the collection. */
|
|
1198
|
+
setSelectionBehavior(selectionBehavior: SelectionBehavior): void;
|
|
1199
|
+
/** Whether the collection allows empty selection. */
|
|
1200
|
+
readonly disallowEmptySelection: boolean;
|
|
1201
|
+
/** The currently selected keys in the collection. */
|
|
1202
|
+
readonly selectedKeys: Selection;
|
|
1203
|
+
/** Sets the selected keys in the collection. */
|
|
1204
|
+
setSelectedKeys(keys: Selection): void;
|
|
1205
|
+
/** The currently disabled keys in the collection. */
|
|
1206
|
+
readonly disabledKeys: Set<Key>;
|
|
1207
|
+
/** Whether `disabledKeys` applies to selection, actions, or both. */
|
|
1208
|
+
readonly disabledBehavior: DisabledBehavior;
|
|
1209
|
+
}
|
|
1210
|
+
interface MultipleSelectionManager extends FocusState {
|
|
1211
|
+
/** The type of selection that is allowed in the collection. */
|
|
1212
|
+
readonly selectionMode: SelectionMode;
|
|
1213
|
+
/** The selection behavior for the collection. */
|
|
1214
|
+
readonly selectionBehavior: SelectionBehavior;
|
|
1215
|
+
/** Whether the collection allows empty selection. */
|
|
1216
|
+
readonly disallowEmptySelection?: boolean;
|
|
1217
|
+
/** The currently selected keys in the collection. */
|
|
1218
|
+
readonly selectedKeys: Set<Key>;
|
|
1219
|
+
/** Whether the selection is empty. */
|
|
1220
|
+
readonly isEmpty: boolean;
|
|
1221
|
+
/** Whether all items in the collection are selected. */
|
|
1222
|
+
readonly isSelectAll: boolean;
|
|
1223
|
+
/** The first selected key in the collection. */
|
|
1224
|
+
readonly firstSelectedKey: Key | null;
|
|
1225
|
+
/** The last selected key in the collection. */
|
|
1226
|
+
readonly lastSelectedKey: Key | null;
|
|
1227
|
+
/** The currently disabled keys in the collection. */
|
|
1228
|
+
readonly disabledKeys: Set<Key>;
|
|
1229
|
+
/** Whether `disabledKeys` applies to selection, actions, or both. */
|
|
1230
|
+
readonly disabledBehavior: DisabledBehavior;
|
|
1231
|
+
/** Returns whether a key is selected. */
|
|
1232
|
+
isSelected(key: Key): boolean;
|
|
1233
|
+
/** Returns whether the current selection is equal to the given selection. */
|
|
1234
|
+
isSelectionEqual(selection: Set<Key>): boolean;
|
|
1235
|
+
/** Extends the selection to the given key. */
|
|
1236
|
+
extendSelection(toKey: Key): void;
|
|
1237
|
+
/** Toggles whether the given key is selected. */
|
|
1238
|
+
toggleSelection(key: Key): void;
|
|
1239
|
+
/** Replaces the selection with only the given key. */
|
|
1240
|
+
replaceSelection(key: Key): void;
|
|
1241
|
+
/** Replaces the selection with the given keys. */
|
|
1242
|
+
setSelectedKeys(keys: Iterable<Key>): void;
|
|
1243
|
+
/** Selects all items in the collection. */
|
|
1244
|
+
selectAll(): void;
|
|
1245
|
+
/** Removes all keys from the selection. */
|
|
1246
|
+
clearSelection(): void;
|
|
1247
|
+
/** Toggles between select all and an empty selection. */
|
|
1248
|
+
toggleSelectAll(): void;
|
|
1249
|
+
/**
|
|
1250
|
+
* Toggles, replaces, or extends selection to the given key depending
|
|
1251
|
+
* on the pointer event and collection's selection mode.
|
|
1252
|
+
*/
|
|
1253
|
+
select(key: Key, e?: PressEvent | LongPressEvent | PointerEvent): void;
|
|
1254
|
+
/** Returns whether the given key can be selected. */
|
|
1255
|
+
canSelectItem(key: Key): boolean;
|
|
1256
|
+
/** Returns whether the given key is non-interactive, i.e. both selection and actions are disabled. */
|
|
1257
|
+
isDisabled(key: Key): boolean;
|
|
1258
|
+
/** Sets the selection behavior for the collection. */
|
|
1259
|
+
setSelectionBehavior(selectionBehavior: SelectionBehavior): void;
|
|
1260
|
+
}
|
|
1261
|
+
interface SelectionManagerOptions {
|
|
1262
|
+
allowsCellSelection?: boolean;
|
|
1263
|
+
}
|
|
1264
|
+
/**
|
|
1265
|
+
* An interface for reading and updating multiple selection state.
|
|
1266
|
+
*/
|
|
1267
|
+
declare class SelectionManager implements MultipleSelectionManager {
|
|
1268
|
+
constructor(collection: Collection<Node<unknown>>, state: MultipleSelectionState, options?: SelectionManagerOptions);
|
|
1269
|
+
/**
|
|
1270
|
+
* The type of selection that is allowed in the collection.
|
|
1271
|
+
*/
|
|
1272
|
+
get selectionMode(): SelectionMode;
|
|
1273
|
+
/**
|
|
1274
|
+
* Whether the collection allows empty selection.
|
|
1275
|
+
*/
|
|
1276
|
+
get disallowEmptySelection(): boolean;
|
|
1277
|
+
/**
|
|
1278
|
+
* The selection behavior for the collection.
|
|
1279
|
+
*/
|
|
1280
|
+
get selectionBehavior(): SelectionBehavior;
|
|
1281
|
+
/**
|
|
1282
|
+
* Sets the selection behavior for the collection.
|
|
1283
|
+
*/
|
|
1284
|
+
setSelectionBehavior(selectionBehavior: SelectionBehavior): void;
|
|
1285
|
+
/**
|
|
1286
|
+
* Whether the collection is currently focused.
|
|
1287
|
+
*/
|
|
1288
|
+
get isFocused(): boolean;
|
|
1289
|
+
/**
|
|
1290
|
+
* Sets whether the collection is focused.
|
|
1291
|
+
*/
|
|
1292
|
+
setFocused(isFocused: boolean): void;
|
|
1293
|
+
/**
|
|
1294
|
+
* The current focused key in the collection.
|
|
1295
|
+
*/
|
|
1296
|
+
get focusedKey(): Key;
|
|
1297
|
+
/** Whether the first or last child of the focused key should receive focus. */
|
|
1298
|
+
get childFocusStrategy(): FocusStrategy;
|
|
1299
|
+
/**
|
|
1300
|
+
* Sets the focused key.
|
|
1301
|
+
*/
|
|
1302
|
+
setFocusedKey(key: Key, childFocusStrategy?: FocusStrategy): void;
|
|
1303
|
+
/**
|
|
1304
|
+
* The currently selected keys in the collection.
|
|
1305
|
+
*/
|
|
1306
|
+
get selectedKeys(): Set<Key>;
|
|
1307
|
+
/**
|
|
1308
|
+
* The raw selection value for the collection.
|
|
1309
|
+
* Either 'all' for select all, or a set of keys.
|
|
1310
|
+
*/
|
|
1311
|
+
get rawSelection(): Selection;
|
|
1312
|
+
/**
|
|
1313
|
+
* Returns whether a key is selected.
|
|
1314
|
+
*/
|
|
1315
|
+
isSelected(key: Key): boolean;
|
|
1316
|
+
/**
|
|
1317
|
+
* Whether the selection is empty.
|
|
1318
|
+
*/
|
|
1319
|
+
get isEmpty(): boolean;
|
|
1320
|
+
/**
|
|
1321
|
+
* Whether all items in the collection are selected.
|
|
1322
|
+
*/
|
|
1323
|
+
get isSelectAll(): boolean;
|
|
1324
|
+
get firstSelectedKey(): Key | null;
|
|
1325
|
+
get lastSelectedKey(): Key | null;
|
|
1326
|
+
get disabledKeys(): Set<Key>;
|
|
1327
|
+
get disabledBehavior(): DisabledBehavior;
|
|
1328
|
+
/**
|
|
1329
|
+
* Extends the selection to the given key.
|
|
1330
|
+
*/
|
|
1331
|
+
extendSelection(toKey: Key): void;
|
|
1332
|
+
/**
|
|
1333
|
+
* Toggles whether the given key is selected.
|
|
1334
|
+
*/
|
|
1335
|
+
toggleSelection(key: Key): void;
|
|
1336
|
+
/**
|
|
1337
|
+
* Replaces the selection with only the given key.
|
|
1338
|
+
*/
|
|
1339
|
+
replaceSelection(key: Key): void;
|
|
1340
|
+
/**
|
|
1341
|
+
* Replaces the selection with the given keys.
|
|
1342
|
+
*/
|
|
1343
|
+
setSelectedKeys(keys: Iterable<Key>): void;
|
|
1344
|
+
/**
|
|
1345
|
+
* Selects all items in the collection.
|
|
1346
|
+
*/
|
|
1347
|
+
selectAll(): void;
|
|
1348
|
+
/**
|
|
1349
|
+
* Removes all keys from the selection.
|
|
1350
|
+
*/
|
|
1351
|
+
clearSelection(): void;
|
|
1352
|
+
/**
|
|
1353
|
+
* Toggles between select all and an empty selection.
|
|
1354
|
+
*/
|
|
1355
|
+
toggleSelectAll(): void;
|
|
1356
|
+
select(key: Key, e?: PressEvent | LongPressEvent | PointerEvent): void;
|
|
1357
|
+
/**
|
|
1358
|
+
* Returns whether the current selection is equal to the given selection.
|
|
1359
|
+
*/
|
|
1360
|
+
isSelectionEqual(selection: Set<Key>): boolean;
|
|
1361
|
+
canSelectItem(key: Key): boolean;
|
|
1362
|
+
isDisabled(key: Key): boolean;
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
interface ListState<T> {
|
|
1366
|
+
/** A collection of items in the list. */
|
|
1367
|
+
collection: Collection<Node<T>>;
|
|
1368
|
+
/** A set of items that are disabled. */
|
|
1369
|
+
disabledKeys: Set<Key>;
|
|
1370
|
+
/** A selection manager to read and update multiple selection state. */
|
|
1371
|
+
selectionManager: SelectionManager;
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
declare const SelectContext: React.Context<ListState<any> | undefined>;
|
|
1375
|
+
|
|
1047
1376
|
/*
|
|
1048
1377
|
* Copyright 2020 Adobe. All rights reserved.
|
|
1049
1378
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -1182,18 +1511,52 @@ declare function useTriggeredOverlay<P extends BaseTriggeredOverlayProps, C exte
|
|
|
1182
1511
|
};
|
|
1183
1512
|
};
|
|
1184
1513
|
|
|
1514
|
+
interface OverlayTriggerState {
|
|
1515
|
+
/** Whether the overlay is currently open. */
|
|
1516
|
+
readonly isOpen: boolean;
|
|
1517
|
+
/** Sets whether the overlay is open. */
|
|
1518
|
+
setOpen(isOpen: boolean): void;
|
|
1519
|
+
/** Opens the overlay. */
|
|
1520
|
+
open(): void;
|
|
1521
|
+
/** Closes the overlay. */
|
|
1522
|
+
close(): void;
|
|
1523
|
+
/** Toggles the overlay's visibility. */
|
|
1524
|
+
toggle(): void;
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
interface TriggeredOverlayContextValue {
|
|
1528
|
+
triggerRef: React.RefObject<HTMLElement>;
|
|
1529
|
+
state: OverlayTriggerState;
|
|
1530
|
+
autoFocus?: boolean | FocusStrategy;
|
|
1531
|
+
placement?: Placement;
|
|
1532
|
+
overlayMatchTriggerWidth?: boolean;
|
|
1533
|
+
overlayMinTriggerWidth?: boolean;
|
|
1534
|
+
overlayWidth?: number;
|
|
1535
|
+
}
|
|
1536
|
+
declare const TriggeredOverlayContext: React.Context<TriggeredOverlayContextValue | undefined>;
|
|
1537
|
+
|
|
1538
|
+
declare type InitFunc<T> = ($props: Record<string, any>, $state: $State) => T;
|
|
1185
1539
|
interface $State {
|
|
1186
1540
|
[key: string]: any;
|
|
1541
|
+
registerInitFunc: (path: string, f: InitFunc<any>) => any;
|
|
1187
1542
|
}
|
|
1188
1543
|
interface $StateSpec<T> {
|
|
1189
1544
|
path: string;
|
|
1190
|
-
initFunc?:
|
|
1545
|
+
initFunc?: InitFunc<T>;
|
|
1191
1546
|
initVal?: T;
|
|
1192
1547
|
type: "private" | "readonly" | "writable";
|
|
1193
1548
|
valueProp?: string;
|
|
1194
1549
|
onChangeProp?: string;
|
|
1195
1550
|
}
|
|
1196
|
-
declare function useVanillaDollarState(
|
|
1197
|
-
|
|
1551
|
+
declare function useVanillaDollarState(_specs: $StateSpec<any>[], props: Record<string, any>): $State;
|
|
1552
|
+
|
|
1553
|
+
declare function generateStateOnChangeProp($state: $State, stateName: string, dataReps: number[]): (val: any, path: (string | number)[]) => void;
|
|
1554
|
+
/**
|
|
1555
|
+
* This function generate the state value prop for repeated states
|
|
1556
|
+
* Example:
|
|
1557
|
+
* - parent[][].counter[].count
|
|
1558
|
+
* We need to pass `parent[index1][index2].counter to the child component
|
|
1559
|
+
*/
|
|
1560
|
+
declare function generateStateValueProp($state: $State, path: (string | number)[]): any;
|
|
1198
1561
|
|
|
1199
|
-
export { BaseButtonProps, BaseMenuButtonProps, BaseMenuGroupProps, BaseMenuItemProps, BaseMenuProps, BaseSelectOptionGroupProps, BaseSelectOptionProps, BaseSelectProps, BaseTextInputProps, BaseTriggeredOverlayProps, ButtonRef, CheckboxProps, CheckboxRef, CheckboxRefValue, DropdownMenu, Flex, HTMLElementRefOf, HtmlAnchorOnlyProps, HtmlButtonOnlyProps, MenuButtonRef, MenuButtonRefValue, MenuRef, MenuRefValue, MultiChoiceArg, PlasmicIcon, PlasmicImg, PlasmicLink, PlasmicRootProvider, PlasmicSlot, SelectOptionRef, SelectRef, SelectRefValue, SingleBooleanChoiceArg, SingleChoiceArg, Stack, StrictProps, SwitchProps, SwitchRef, SwitchRefValue, TextInputRef, TextInputRefValue, Trans, TriggeredOverlayConfig, TriggeredOverlayRef, classNames, createPlasmicElementProxy, createUseScreenVariants, deriveRenderOpts, ensureGlobalVariants, genTranslatableString, getDataProps, hasVariant, makeFragment, omit, pick, renderPlasmicSlot, setPlumeStrictMode, useButton, useCheckbox, useDollarState, useIsSSR, useMenu, useMenuButton, useMenuGroup, useMenuItem, useSelect, useSelectOption, useSelectOptionGroup, useSwitch, useTextInput, useTrigger, useTriggeredOverlay, wrapWithClassName };
|
|
1562
|
+
export { BaseButtonProps, BaseMenuButtonProps, BaseMenuGroupProps, BaseMenuItemProps, BaseMenuProps, BaseSelectOptionGroupProps, BaseSelectOptionProps, BaseSelectProps, BaseTextInputProps, BaseTriggeredOverlayProps, ButtonRef, CheckboxProps, CheckboxRef, CheckboxRefValue, DropdownMenu, Flex, HTMLElementRefOf, HtmlAnchorOnlyProps, HtmlButtonOnlyProps, MenuButtonRef, MenuButtonRefValue, MenuRef, MenuRefValue, MultiChoiceArg, PlasmicIcon, PlasmicImg, PlasmicLink, PlasmicRootProvider, PlasmicSlot, SelectContext, SelectOptionRef, SelectRef, SelectRefValue, SingleBooleanChoiceArg, SingleChoiceArg, Stack, StrictProps, SwitchProps, SwitchRef, SwitchRefValue, TextInputRef, TextInputRefValue, Trans, TriggeredOverlayConfig, TriggeredOverlayContext, TriggeredOverlayRef, classNames, createPlasmicElementProxy, createUseScreenVariants, deriveRenderOpts, ensureGlobalVariants, genTranslatableString, generateStateOnChangeProp, generateStateValueProp, getDataProps, hasVariant, makeFragment, omit, pick, renderPlasmicSlot, setPlumeStrictMode, useButton, useCheckbox, useVanillaDollarState as useDollarState, useIsSSR, useMenu, useMenuButton, useMenuGroup, useMenuItem, useSelect, useSelectOption, useSelectOptionGroup, useSwitch, useTextInput, useTrigger, useTriggeredOverlay, wrapWithClassName };
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare function useMenuTrigger(opts: {
|
|
|
15
15
|
menuWidth?: number;
|
|
16
16
|
menu: React.ReactElement<BaseMenuProps> | (() => React.ReactElement<BaseMenuProps>);
|
|
17
17
|
}, state: MenuTriggerState): {
|
|
18
|
-
triggerProps:
|
|
18
|
+
triggerProps: import("@react-types/shared").DOMAttributes<import("@react-types/shared").FocusableElement>;
|
|
19
19
|
makeMenu: () => React.ReactElement<BaseMenuProps, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)> | null;
|
|
20
20
|
triggerContext: TriggeredOverlayContextValue;
|
|
21
21
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { BaseSelectProps, SelectRef, SelectRefValue, useSelect, } from "./select";
|
|
2
2
|
export { BaseSelectOptionProps, SelectOptionRef, useSelectOption, } from "./select-option";
|
|
3
3
|
export { BaseSelectOptionGroupProps, useSelectOptionGroup, } from "./select-option-group";
|
|
4
|
+
export { SelectContext } from "./context";
|