@planningcenter/tapestry-react 4.14.0 → 4.14.1
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/ActionsDropdown/ActionsDropdown.d.ts +14 -0
- package/dist/ActionsDropdown/ActionsDropdown.d.ts.map +1 -1
- package/dist/Alert/Alert.d.ts +2 -0
- package/dist/Alert/Alert.d.ts.map +1 -1
- package/dist/Avatar/Avatar.d.ts +12 -0
- package/dist/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Badge/Badge.d.ts +28 -0
- package/dist/Badge/Badge.d.ts.map +1 -1
- package/dist/Badge/Status.d.ts +15 -0
- package/dist/Badge/Status.d.ts.map +1 -1
- package/dist/Box/Box.d.ts +12 -0
- package/dist/Box/Box.d.ts.map +1 -1
- package/dist/Button/Button.d.ts +53 -0
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Input.d.ts +12 -0
- package/dist/Button/Input.d.ts.map +1 -1
- package/dist/Calendar/Calendar.d.ts +33 -0
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Day.d.ts +49 -0
- package/dist/Calendar/Day.d.ts.map +1 -1
- package/dist/Card/Card.d.ts +2 -0
- package/dist/Card/Card.d.ts.map +1 -1
- package/dist/Card/Section.d.ts +1 -0
- package/dist/Card/Section.d.ts.map +1 -1
- package/dist/Checkbox/Checkbox.d.ts +38 -0
- package/dist/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/CheckboxCard/CheckboxCard.d.ts +2 -0
- package/dist/CheckboxCard/CheckboxCard.d.ts.map +1 -1
- package/dist/CheckboxGroup/CheckboxGroup.d.ts +9 -0
- package/dist/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
- package/dist/ChurchCenterStatus/ChurchCenterStatus.d.ts +41 -0
- package/dist/ChurchCenterStatus/ChurchCenterStatus.d.ts.map +1 -1
- package/dist/Collapse/Collapse.d.ts +12 -0
- package/dist/Collapse/Collapse.d.ts.map +1 -1
- package/dist/ColumnView/ColumnView.d.ts +3 -0
- package/dist/ColumnView/ColumnView.d.ts.map +1 -1
- package/dist/Combobox/Combobox.d.ts +12 -0
- package/dist/Combobox/Combobox.d.ts.map +1 -1
- package/dist/Combobox/ComboboxPopover.d.ts +10 -0
- package/dist/Combobox/ComboboxPopover.d.ts.map +1 -1
- package/dist/DataTable/DataTable.d.ts +176 -0
- package/dist/DataTable/DataTable.d.ts.map +1 -1
- package/dist/DataTable/components/Icon.d.ts +2 -0
- package/dist/DataTable/components/Icon.d.ts.map +1 -1
- package/dist/DateField/DateField.d.ts +33 -0
- package/dist/DateField/DateField.d.ts.map +1 -1
- package/dist/DateField/parse.d.ts +9 -0
- package/dist/DateField/parse.d.ts.map +1 -1
- package/dist/DateField/useEditableDate.d.ts +12 -0
- package/dist/DateField/useEditableDate.d.ts.map +1 -1
- package/dist/Dialog/Dialog.d.ts +40 -0
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Divider/Divider.d.ts +15 -0
- package/dist/Divider/Divider.d.ts.map +1 -1
- package/dist/Drawer/Drawer.d.ts +1 -0
- package/dist/Drawer/Drawer.d.ts.map +1 -1
- package/dist/Dropdown/Dropdown.d.ts +33 -0
- package/dist/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/EditActions/EditActions.d.ts +3 -0
- package/dist/EditActions/EditActions.d.ts.map +1 -1
- package/dist/Field/Field.d.ts +14 -0
- package/dist/Field/Field.d.ts.map +1 -1
- package/dist/FieldSet/FieldSet.d.ts +18 -0
- package/dist/FieldSet/FieldSet.d.ts.map +1 -1
- package/dist/FilterLayout/FilterLayout.d.ts +5 -0
- package/dist/FilterLayout/FilterLayout.d.ts.map +1 -1
- package/dist/Form/Form.d.ts +44 -0
- package/dist/Form/Form.d.ts.map +1 -1
- package/dist/GridView/GridView.d.ts +15 -0
- package/dist/GridView/GridView.d.ts.map +1 -1
- package/dist/Group/Group.d.ts +15 -0
- package/dist/Group/Group.d.ts.map +1 -1
- package/dist/Heading/Heading.d.ts +2 -0
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/HelperDrawer/HelperDrawer.d.ts +1 -0
- package/dist/HelperDrawer/HelperDrawer.d.ts.map +1 -1
- package/dist/Highlight/Highlight.d.ts +15 -0
- package/dist/Highlight/Highlight.d.ts.map +1 -1
- package/dist/Icon/Icon.d.ts +4 -0
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Path.d.ts +2 -0
- package/dist/Icon/Path.d.ts.map +1 -1
- package/dist/Icon/Status.d.ts +3 -0
- package/dist/Icon/Status.d.ts.map +1 -1
- package/dist/Input/Inline.d.ts +7 -0
- package/dist/Input/Inline.d.ts.map +1 -1
- package/dist/Input/Input.d.ts +70 -0
- package/dist/Input/Input.d.ts.map +1 -1
- package/dist/Input/InputBox.d.ts +63 -0
- package/dist/Input/InputBox.d.ts.map +1 -1
- package/dist/Input/InputField.d.ts +19 -0
- package/dist/Input/InputField.d.ts.map +1 -1
- package/dist/Input/InputLabel.d.ts +6 -0
- package/dist/Input/InputLabel.d.ts.map +1 -1
- package/dist/ItemList/ItemListItem.d.ts +9 -0
- package/dist/ItemList/ItemListItem.d.ts.map +1 -1
- package/dist/Link/Link.d.ts +22 -0
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/LinkList/LinkList.d.ts +1 -0
- package/dist/LinkList/LinkList.d.ts.map +1 -1
- package/dist/List/List.d.ts +9 -0
- package/dist/List/List.d.ts.map +1 -1
- package/dist/Logo/Logo.d.ts +20 -0
- package/dist/Logo/Logo.d.ts.map +1 -1
- package/dist/Menu/Menu.d.ts +1 -0
- package/dist/Menu/Menu.d.ts.map +1 -1
- package/dist/Modal/Modal.d.ts +13 -0
- package/dist/Modal/Modal.d.ts.map +1 -1
- package/dist/NumberField/NumberField.d.ts +38 -0
- package/dist/NumberField/NumberField.d.ts.map +1 -1
- package/dist/Page/PageBody.d.ts +9 -0
- package/dist/Page/PageBody.d.ts.map +1 -1
- package/dist/Page/PageHeader.d.ts +4 -0
- package/dist/Page/PageHeader.d.ts.map +1 -1
- package/dist/Page/PageTitle.d.ts +4 -0
- package/dist/Page/PageTitle.d.ts.map +1 -1
- package/dist/Page/PageToolbar.d.ts +3 -0
- package/dist/Page/PageToolbar.d.ts.map +1 -1
- package/dist/PagerView/PagerView.d.ts +18 -0
- package/dist/PagerView/PagerView.d.ts.map +1 -1
- package/dist/Pagination/Pagination.d.ts +24 -0
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Popover/Popover.d.ts +92 -0
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/Portal/Portal.d.ts +6 -0
- package/dist/Portal/Portal.d.ts.map +1 -1
- package/dist/Progress/Progress.d.ts +6 -0
- package/dist/Progress/Progress.d.ts.map +1 -1
- package/dist/Radio/Radio.d.ts +36 -0
- package/dist/Radio/Radio.d.ts.map +1 -1
- package/dist/RangeSlider/RangeSlider.d.ts +21 -0
- package/dist/RangeSlider/RangeSlider.d.ts.map +1 -1
- package/dist/Scrim/Scrim.d.ts +1 -0
- package/dist/Scrim/Scrim.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControl.d.ts +1 -0
- package/dist/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/SegmentedTabs/SegmentedTabs.d.ts +1 -0
- package/dist/SegmentedTabs/SegmentedTabs.d.ts.map +1 -1
- package/dist/Select/Inline.d.ts +9 -0
- package/dist/Select/Inline.d.ts.map +1 -1
- package/dist/Select/OptionGroup.d.ts +3 -0
- package/dist/Select/OptionGroup.d.ts.map +1 -1
- package/dist/Select/Select.d.ts +75 -0
- package/dist/Select/Select.d.ts.map +1 -1
- package/dist/Sidebar/Sidebar.d.ts +6 -0
- package/dist/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/Sidebar/SidebarItem.d.ts +3 -0
- package/dist/Sidebar/SidebarItem.d.ts.map +1 -1
- package/dist/Sidebar/SidebarList.d.ts +3 -0
- package/dist/Sidebar/SidebarList.d.ts.map +1 -1
- package/dist/Spinner/Spinner.d.ts +15 -0
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/StackView/StackView.d.ts +6 -0
- package/dist/StackView/StackView.d.ts.map +1 -1
- package/dist/StepperField/StepperField.d.ts +15 -0
- package/dist/StepperField/StepperField.d.ts.map +1 -1
- package/dist/StepperProgress/Step.d.ts +4 -0
- package/dist/StepperProgress/Step.d.ts.map +1 -1
- package/dist/StepperProgress/StepperProgress.d.ts +3 -0
- package/dist/StepperProgress/StepperProgress.d.ts.map +1 -1
- package/dist/Summary/Summary.d.ts +12 -0
- package/dist/Summary/Summary.d.ts.map +1 -1
- package/dist/Tab/Tab.d.ts +5 -0
- package/dist/Tab/Tab.d.ts.map +1 -1
- package/dist/TabNav/Tab.d.ts +12 -0
- package/dist/TabNav/Tab.d.ts.map +1 -1
- package/dist/TabNav/TabNav.d.ts +9 -0
- package/dist/TabNav/TabNav.d.ts.map +1 -1
- package/dist/Table/SubRowToggleCell.d.ts +2 -0
- package/dist/Table/SubRowToggleCell.d.ts.map +1 -1
- package/dist/Table/Table.d.ts +125 -0
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Tabs/Tabs.d.ts +14 -0
- package/dist/Tabs/Tabs.d.ts.map +1 -1
- package/dist/Text/Text.d.ts +33 -0
- package/dist/Text/Text.d.ts.map +1 -1
- package/dist/TextArea/TextArea.d.ts +1 -0
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TileView/TileView.d.ts +6 -0
- package/dist/TileView/TileView.d.ts.map +1 -1
- package/dist/TimeField/TimeField.d.ts +21 -0
- package/dist/TimeField/TimeField.d.ts.map +1 -1
- package/dist/ToggleSwitch/ToggleSwitch.d.ts +13 -0
- package/dist/ToggleSwitch/ToggleSwitch.d.ts.map +1 -1
- package/dist/TokenInput/DefaultToken.d.ts +8 -0
- package/dist/TokenInput/DefaultToken.d.ts.map +1 -1
- package/dist/TokenInput/TokenInput.d.ts +15 -0
- package/dist/TokenInput/TokenInput.d.ts.map +1 -1
- package/dist/Toolbar/Toolbar.d.ts +22 -0
- package/dist/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.d.ts +118 -0
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Wizard/Wizard.d.ts +37 -0
- package/dist/Wizard/Wizard.d.ts.map +1 -1
- package/dist/WrapView/WrapView.d.ts +1 -0
- package/dist/WrapView/WrapView.d.ts.map +1 -1
- package/dist/hooks/use-accessibility-violation.d.ts +8 -1
- package/dist/hooks/use-accessibility-violation.d.ts.map +1 -1
- package/dist/hooks/use-document-event.d.ts +15 -0
- package/dist/hooks/use-document-event.d.ts.map +1 -1
- package/dist/hooks/use-focus.d.ts +5 -0
- package/dist/hooks/use-focus.d.ts.map +1 -1
- package/dist/hooks/use-id.d.ts +6 -0
- package/dist/hooks/use-id.d.ts.map +1 -1
- package/dist/hooks/use-measure.d.ts +36 -0
- package/dist/hooks/use-measure.d.ts.map +1 -1
- package/dist/hooks/use-roving-index.d.ts +23 -0
- package/dist/hooks/use-roving-index.d.ts.map +1 -1
- package/dist/utils.d.ts +109 -0
- package/dist/utils.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import React, { ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import Badge from '../Badge';
|
|
3
3
|
interface Props {
|
|
4
|
+
/** Props to pass to the Badge component. */
|
|
4
5
|
keyboardControls?: ComponentProps<typeof Badge>;
|
|
6
|
+
/** Callback when "X" Icon is clicked */
|
|
5
7
|
removeToken: (notUsed: false) => void;
|
|
8
|
+
/** Not used. */
|
|
6
9
|
selectFirstToken?: () => void;
|
|
10
|
+
/** Not used. */
|
|
7
11
|
selectLastToken?: () => void;
|
|
12
|
+
/** Not used. */
|
|
8
13
|
selectNextToken?: () => void;
|
|
14
|
+
/** Not used. */
|
|
9
15
|
selectPreviousToken?: () => void;
|
|
16
|
+
/** The token to render. */
|
|
10
17
|
token?: ReactNode;
|
|
18
|
+
/** Not used */
|
|
11
19
|
tokenIndex?: number;
|
|
12
20
|
}
|
|
13
21
|
type InheritedProps = Omit<ComponentProps<typeof Badge>, keyof Props>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultToken.d.ts","sourceRoot":"","sources":["../../src/TokenInput/DefaultToken.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAqB,SAAS,EAAE,MAAM,OAAO,CAAA;AAE3E,OAAO,KAAK,MAAM,UAAU,CAAA;AAG5B,UAAU,KAAK;
|
|
1
|
+
{"version":3,"file":"DefaultToken.d.ts","sourceRoot":"","sources":["../../src/TokenInput/DefaultToken.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAqB,SAAS,EAAE,MAAM,OAAO,CAAA;AAE3E,OAAO,KAAK,MAAM,UAAU,CAAA;AAG5B,UAAU,KAAK;IACb,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,cAAc,CAAC,OAAO,KAAK,CAAC,CAAA;IAE/C,wCAAwC;IACxC,WAAW,EAAE,CAAC,OAAO,EAAE,KAAK,KAAK,IAAI,CAAA;IAErC,gBAAgB;IAChB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAA;IAE7B,gBAAgB;IAChB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAE5B,gBAAgB;IAChB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAE5B,gBAAgB;IAChB,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAA;IAEhC,2BAA2B;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAA;IAEjB,eAAe;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AACD,KAAK,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC,CAAA;AACrE,KAAK,iBAAiB,GAAG,KAAK,GAAG,cAAc,CAAA;AAE/C,iBAAS,YAAY,CAAC,EACpB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,KAAK,EACL,UAAU,EACV,GAAG,SAAS,EACb,EAAE,iBAAiB,qBAkBnB;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -2,12 +2,19 @@ import React, { Component } from 'react';
|
|
|
2
2
|
import { defaultRenderInput, defaultRenderToken } from './default-renders';
|
|
3
3
|
import DefaultToken from './DefaultToken';
|
|
4
4
|
export interface TokenInputProps<T = unknown> {
|
|
5
|
+
/**
|
|
6
|
+
* Callback when a token has been added or removed.
|
|
7
|
+
*/
|
|
5
8
|
onChange: (event: {
|
|
6
9
|
added: boolean;
|
|
7
10
|
token: T;
|
|
8
11
|
tokenIndex: number;
|
|
9
12
|
tokens: T[];
|
|
10
13
|
}) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Control how the internal input is rendered, `inputProps` must be passed
|
|
16
|
+
* through to the rendered input.
|
|
17
|
+
*/
|
|
11
18
|
renderInput?: (inputProps: object, options: {
|
|
12
19
|
addToken: (token: T) => void;
|
|
13
20
|
clearInputValue: () => void;
|
|
@@ -15,6 +22,11 @@ export interface TokenInputProps<T = unknown> {
|
|
|
15
22
|
selectFirstToken: () => void;
|
|
16
23
|
selectLastToken: () => void;
|
|
17
24
|
}) => React.ReactElement;
|
|
25
|
+
/**
|
|
26
|
+
* Control how a token is rendered. As long as this function returns a string,
|
|
27
|
+
* it will use a default badge, otherwise pass any custom component and
|
|
28
|
+
* functionality you need.
|
|
29
|
+
*/
|
|
18
30
|
renderToken?: (token: T, options: {
|
|
19
31
|
keyboardControls: {
|
|
20
32
|
onKeyDown: (e: React.KeyboardEvent) => void;
|
|
@@ -28,6 +40,9 @@ export interface TokenInputProps<T = unknown> {
|
|
|
28
40
|
tokenIndex: number;
|
|
29
41
|
}) => React.ReactElement;
|
|
30
42
|
size?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Controlled set of tokens.
|
|
45
|
+
*/
|
|
31
46
|
tokens: Array<T>;
|
|
32
47
|
}
|
|
33
48
|
type Props<T = unknown> = TokenInputProps<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenInput.d.ts","sourceRoot":"","sources":["../../src/TokenInput/TokenInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC1E,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAEzC,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,OAAO;
|
|
1
|
+
{"version":3,"file":"TokenInput.d.ts","sourceRoot":"","sources":["../../src/TokenInput/TokenInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC1E,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAEzC,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,OAAO;IAC1C;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE;QAChB,KAAK,EAAE,OAAO,CAAA;QACd,KAAK,EAAE,CAAC,CAAA;QACR,UAAU,EAAE,MAAM,CAAA;QAClB,MAAM,EAAE,CAAC,EAAE,CAAA;KACZ,KAAK,IAAI,CAAA;IACV;;;OAGG;IACH,WAAW,CAAC,EAAE,CACZ,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE;QACP,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAA;QAC5B,eAAe,EAAE,MAAM,IAAI,CAAA;QAC3B,WAAW,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;QACpD,gBAAgB,EAAE,MAAM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;AAED,wBAEC"}
|
|
@@ -2,12 +2,34 @@ import React, { Component, ComponentProps, ReactElement, ReactNode } from 'react
|
|
|
2
2
|
import StackView from '../StackView';
|
|
3
3
|
import ToolbarAction from './Action';
|
|
4
4
|
export type ToolbarProps = ComponentProps<typeof StackView> & {
|
|
5
|
+
/**
|
|
6
|
+
* Provide either a single action like a `Button` or `Dropdown` or an array of actions.
|
|
7
|
+
* Each element will be cloned with the following props: `{ size: 'xs', borderColor: 'primary' }`.
|
|
8
|
+
*/
|
|
5
9
|
actions?: ReactElement | Array<ReactElement>;
|
|
10
|
+
/**
|
|
11
|
+
* Adds a counter next to the title of the toolbar.
|
|
12
|
+
*/
|
|
6
13
|
count?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Controls the color of the counter.
|
|
16
|
+
*/
|
|
7
17
|
countColor?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Render help content inside of a `Collapse` that is triggered by an info button placed next to the title.
|
|
20
|
+
*/
|
|
8
21
|
helpContent?: string | ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Used to clear a status once it has been set.
|
|
24
|
+
*/
|
|
9
25
|
onStatusClearRequest?: () => null;
|
|
26
|
+
/**
|
|
27
|
+
* Renders either a saved or error badge.
|
|
28
|
+
*/
|
|
10
29
|
status?: 'error' | 'success';
|
|
30
|
+
/**
|
|
31
|
+
* Renders a heading in the left portion of the toolbar.
|
|
32
|
+
*/
|
|
11
33
|
title: ReactNode;
|
|
12
34
|
};
|
|
13
35
|
declare class Toolbar extends Component<ToolbarProps> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../src/Toolbar/Toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAGZ,SAAS,EACT,cAAc,EACd,YAAY,EACZ,SAAS,EACV,MAAM,OAAO,CAAA;AAId,OAAO,SAAS,MAAM,cAAc,CAAA;AAEpC,OAAO,aAAa,MAAM,UAAU,CAAA;AAQpC,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,GAAG;
|
|
1
|
+
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../src/Toolbar/Toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAGZ,SAAS,EACT,cAAc,EACd,YAAY,EACZ,SAAS,EACV,MAAM,OAAO,CAAA;AAId,OAAO,SAAS,MAAM,cAAc,CAAA;AAEpC,OAAO,aAAa,MAAM,UAAU,CAAA;AAQpC,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,GAAG;IAC5D;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC,CAAA;IAE5C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAEhC;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAA;IAEjC;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAE5B;;OAEG;IACH,KAAK,EAAE,SAAS,CAAA;CACjB,CAAA;AAED,cAAM,OAAQ,SAAQ,SAAS,CAAC,YAAY,CAAC;IAC3C,MAAM,CAAC,MAAM,uBAAgB;IAE7B,cAAc,SAAsC;IAEpD,MAAM,CAAC,YAAY;;MAA2B;IAE9C,MAAM;CA+EP;AASD,eAAe,OAAO,CAAA"}
|
|
@@ -3,19 +3,78 @@ import React from 'react';
|
|
|
3
3
|
import { As, StyleProps } from '../types';
|
|
4
4
|
export type TooltipProps = StyleProps & {
|
|
5
5
|
as?: As;
|
|
6
|
+
/**
|
|
7
|
+
* Passes props to [Popover](/popover)'s `anchorElement`.
|
|
8
|
+
*/
|
|
6
9
|
childProps?: object;
|
|
10
|
+
/**
|
|
11
|
+
* The child becomes the trigger for the tooltip, unless it is overridden with `popoverProps={{relativeTo: ref}}`.
|
|
12
|
+
*/
|
|
7
13
|
children?: any;
|
|
14
|
+
/**
|
|
15
|
+
* The amount of time in milliseconds before the tooltip closes.
|
|
16
|
+
*/
|
|
8
17
|
closeDelay?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Controls whether the Popover is rendered as open or closed.
|
|
20
|
+
*/
|
|
9
21
|
defaultOpen?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Attempts to keep popover in view clipping edges if too large.
|
|
24
|
+
*/
|
|
10
25
|
keepInView?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The amount of time in milliseconds before the tooltip opens.
|
|
28
|
+
*/
|
|
11
29
|
openDelay?: number;
|
|
30
|
+
/**
|
|
31
|
+
* `'top-start'
|
|
32
|
+
| 'top'
|
|
33
|
+
| 'top-end'
|
|
34
|
+
| 'right-start'
|
|
35
|
+
| 'right'
|
|
36
|
+
| 'right-end'
|
|
37
|
+
| 'bottom-start'
|
|
38
|
+
| 'bottom'
|
|
39
|
+
| 'bottom-end'
|
|
40
|
+
| 'left-start'
|
|
41
|
+
| 'left'
|
|
42
|
+
| 'left-end'`
|
|
43
|
+
|
|
44
|
+
* Where to place the popover.
|
|
45
|
+
*/
|
|
12
46
|
placement?: Placement;
|
|
47
|
+
/**
|
|
48
|
+
* Accepts any valid [Popover](/popover) props.
|
|
49
|
+
*/
|
|
13
50
|
popoverProps?: object;
|
|
51
|
+
/**
|
|
52
|
+
* Determines if the tooltip should use innerRef instead of ref. Default is `true`.
|
|
53
|
+
* This is useful when the anchor element is not a Tapestry React component.
|
|
54
|
+
*/
|
|
14
55
|
refAsInnerRef?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Where to render the composed popover into. Accepts an HTML element or selector.
|
|
58
|
+
* Uses the closest fixed parent or `document.body` by default. This will only
|
|
59
|
+
* be computed once on initial render.
|
|
60
|
+
*/
|
|
15
61
|
renderTo?: HTMLElement | string;
|
|
62
|
+
/**
|
|
63
|
+
* The title of the tooltip. Accepts a string or a React element.
|
|
64
|
+
*/
|
|
16
65
|
title?: any;
|
|
66
|
+
/**
|
|
67
|
+
* Reveals the tooltip when the cloned child receives focus.
|
|
68
|
+
*/
|
|
17
69
|
triggerOnFocus?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Reveals the tooltip when the cloned child is hovered.
|
|
72
|
+
*/
|
|
18
73
|
triggerOnHover?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Set a specific z-index for Tooltip. (defaults to `10000`)
|
|
76
|
+
* This option can be helpful in adjusting elements that overlap visually.
|
|
77
|
+
*/
|
|
19
78
|
zIndex?: number;
|
|
20
79
|
};
|
|
21
80
|
declare const _default: React.ForwardRefExoticComponent<Pick<React.CSSProperties, "borderWidth" | "borderTopWidth" | "borderRightWidth" | "borderBottomWidth" | "borderLeftWidth" | "contain" | "left" | "right" | "bottom" | "top" | "content" | "flex" | "position" | "clip" | "clear" | "border" | "padding" | "resize" | "filter" | "overflow" | "overflowX" | "overflowY" | "alignContent" | "alignItems" | "alignSelf" | "alignmentBaseline" | "animation" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationName" | "animationPlayState" | "animationTimingFunction" | "aspectRatio" | "backfaceVisibility" | "background" | "backgroundAttachment" | "backgroundBlendMode" | "backgroundClip" | "backgroundImage" | "backgroundOrigin" | "backgroundPosition" | "backgroundPositionX" | "backgroundPositionY" | "backgroundRepeat" | "backgroundSize" | "baselineShift" | "borderBottom" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderCollapse" | "borderImage" | "borderImageOutset" | "borderImageRepeat" | "borderImageSlice" | "borderImageSource" | "borderImageWidth" | "borderLeft" | "borderLeftStyle" | "borderRadius" | "borderRight" | "borderRightStyle" | "borderSpacing" | "borderStyle" | "borderTop" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "boxShadow" | "boxSizing" | "breakAfter" | "breakBefore" | "breakInside" | "clipPath" | "clipRule" | "columnCount" | "columnFill" | "columnGap" | "columnRule" | "columnRuleColor" | "columnRuleStyle" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "columns" | "counterIncrement" | "counterReset" | "cursor" | "direction" | "display" | "fillOpacity" | "fillRule" | "flexBasis" | "flexDirection" | "flexFlow" | "flexGrow" | "flexShrink" | "flexWrap" | "font" | "fontFamily" | "fontFeatureSettings" | "fontKerning" | "fontSize" | "fontStretch" | "fontStyle" | "fontVariant" | "fontVariantCaps" | "fontVariantLigatures" | "fontVariantNumeric" | "fontWeight" | "gap" | "gridArea" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumn" | "gridColumnEnd" | "gridColumnGap" | "gridColumnStart" | "gridGap" | "gridRow" | "gridRowEnd" | "gridRowGap" | "gridRowStart" | "gridTemplate" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "hyphens" | "imageRendering" | "isolation" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lightingColor" | "lineHeight" | "listStyle" | "listStyleImage" | "listStylePosition" | "listStyleType" | "margin" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "mask" | "maskType" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "mixBlendMode" | "motion" | "objectFit" | "objectPosition" | "opacity" | "order" | "outline" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflowWrap" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "perspective" | "perspectiveOrigin" | "placeItems" | "placeSelf" | "pointerEvents" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "tabSize" | "tableLayout" | "textAlign" | "textDecoration" | "textIndent" | "textOrientation" | "textOverflow" | "textRendering" | "textShadow" | "textTransform" | "touchAction" | "transform" | "transformOrigin" | "transformStyle" | "transition" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "verticalAlign" | "visibility" | "userSelect" | "WebkitOverflowScrolling" | "writingMode" | "whiteSpace" | "width" | "willChange" | "wordBreak" | "wordSpacing" | "wordWrap" | "zIndex"> & Partial<Record<"color" | "fill" | "stroke" | "outlineColor" | "backgroundColor" | "borderColor" | "borderBottomColor" | "borderLeftColor" | "borderRightColor" | "borderTopColor", import("../types").ColorProp>> & {
|
|
@@ -54,19 +113,78 @@ declare const _default: React.ForwardRefExoticComponent<Pick<React.CSSProperties
|
|
|
54
113
|
hover?: StyleProps;
|
|
55
114
|
} & {
|
|
56
115
|
as?: As;
|
|
116
|
+
/**
|
|
117
|
+
* Passes props to [Popover](/popover)'s `anchorElement`.
|
|
118
|
+
*/
|
|
57
119
|
childProps?: object;
|
|
120
|
+
/**
|
|
121
|
+
* The child becomes the trigger for the tooltip, unless it is overridden with `popoverProps={{relativeTo: ref}}`.
|
|
122
|
+
*/
|
|
58
123
|
children?: any;
|
|
124
|
+
/**
|
|
125
|
+
* The amount of time in milliseconds before the tooltip closes.
|
|
126
|
+
*/
|
|
59
127
|
closeDelay?: number;
|
|
128
|
+
/**
|
|
129
|
+
* Controls whether the Popover is rendered as open or closed.
|
|
130
|
+
*/
|
|
60
131
|
defaultOpen?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Attempts to keep popover in view clipping edges if too large.
|
|
134
|
+
*/
|
|
61
135
|
keepInView?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* The amount of time in milliseconds before the tooltip opens.
|
|
138
|
+
*/
|
|
62
139
|
openDelay?: number;
|
|
140
|
+
/**
|
|
141
|
+
* `'top-start'
|
|
142
|
+
| 'top'
|
|
143
|
+
| 'top-end'
|
|
144
|
+
| 'right-start'
|
|
145
|
+
| 'right'
|
|
146
|
+
| 'right-end'
|
|
147
|
+
| 'bottom-start'
|
|
148
|
+
| 'bottom'
|
|
149
|
+
| 'bottom-end'
|
|
150
|
+
| 'left-start'
|
|
151
|
+
| 'left'
|
|
152
|
+
| 'left-end'`
|
|
153
|
+
|
|
154
|
+
* Where to place the popover.
|
|
155
|
+
*/
|
|
63
156
|
placement?: Placement;
|
|
157
|
+
/**
|
|
158
|
+
* Accepts any valid [Popover](/popover) props.
|
|
159
|
+
*/
|
|
64
160
|
popoverProps?: object;
|
|
161
|
+
/**
|
|
162
|
+
* Determines if the tooltip should use innerRef instead of ref. Default is `true`.
|
|
163
|
+
* This is useful when the anchor element is not a Tapestry React component.
|
|
164
|
+
*/
|
|
65
165
|
refAsInnerRef?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Where to render the composed popover into. Accepts an HTML element or selector.
|
|
168
|
+
* Uses the closest fixed parent or `document.body` by default. This will only
|
|
169
|
+
* be computed once on initial render.
|
|
170
|
+
*/
|
|
66
171
|
renderTo?: string | HTMLElement;
|
|
172
|
+
/**
|
|
173
|
+
* The title of the tooltip. Accepts a string or a React element.
|
|
174
|
+
*/
|
|
67
175
|
title?: any;
|
|
176
|
+
/**
|
|
177
|
+
* Reveals the tooltip when the cloned child receives focus.
|
|
178
|
+
*/
|
|
68
179
|
triggerOnFocus?: boolean;
|
|
180
|
+
/**
|
|
181
|
+
* Reveals the tooltip when the cloned child is hovered.
|
|
182
|
+
*/
|
|
69
183
|
triggerOnHover?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Set a specific z-index for Tooltip. (defaults to `10000`)
|
|
186
|
+
* This option can be helpful in adjusting elements that overlap visually.
|
|
187
|
+
*/
|
|
70
188
|
zIndex?: number;
|
|
71
189
|
} & React.RefAttributes<unknown>>;
|
|
72
190
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,OAAO,KAQN,MAAM,OAAO,C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FC;;OAEG;;IAEH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;;;;;;;;;;;;;MAeE;;IAGF;;OAEG;;IAGH;;;OAGG;;IAGH;;;;OAIG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;OAGG;;;AAuLL,wBAAkC"}
|
package/dist/Wizard/Wizard.d.ts
CHANGED
|
@@ -4,21 +4,58 @@ import { StackViewProps } from '../StackView';
|
|
|
4
4
|
import Step from './Step';
|
|
5
5
|
import { StepProps } from './StepProps';
|
|
6
6
|
export type WizardProps = StackViewProps & {
|
|
7
|
+
/**
|
|
8
|
+
* Always display cancel button.
|
|
9
|
+
*/
|
|
7
10
|
alwaysCancellable?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Pass props to the back button.
|
|
13
|
+
*/
|
|
8
14
|
backButtonProps?: ButtonProps;
|
|
15
|
+
/**
|
|
16
|
+
* Pass props to all Button components in the footer.
|
|
17
|
+
*/
|
|
9
18
|
buttonProps?: ButtonProps;
|
|
19
|
+
/**
|
|
20
|
+
* Pass props to the cancel button.
|
|
21
|
+
*/
|
|
10
22
|
cancelButtonProps?: ButtonProps;
|
|
23
|
+
/**
|
|
24
|
+
* The content of the component.
|
|
25
|
+
*/
|
|
11
26
|
children: React.ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Pass props to the Button components.
|
|
29
|
+
*/
|
|
12
30
|
footerProps?: ButtonProps;
|
|
31
|
+
/**
|
|
32
|
+
* The initial payload state.
|
|
33
|
+
*/
|
|
13
34
|
initialPayload?: Record<string, any>;
|
|
35
|
+
/**
|
|
36
|
+
* Pass props to the next button.
|
|
37
|
+
*/
|
|
14
38
|
nextButtonProps?: ButtonProps;
|
|
39
|
+
/**
|
|
40
|
+
* Determines what the next button title displays.
|
|
41
|
+
*/
|
|
15
42
|
nextButtonTitle?: (props: {
|
|
16
43
|
activeStepIndex: number;
|
|
17
44
|
steps: StepProps[];
|
|
18
45
|
totalSteps: number;
|
|
19
46
|
}) => string;
|
|
47
|
+
/**
|
|
48
|
+
* Creates a cancel button for canceling a process from the first step.
|
|
49
|
+
*/
|
|
20
50
|
onCancel?: () => void;
|
|
51
|
+
/**
|
|
52
|
+
* Called when the `Done` button is pressed on the last view. Passes back the `payload` state
|
|
53
|
+
* as well as an option `complete` callback to revert the button spinner back to normal.
|
|
54
|
+
*/
|
|
21
55
|
onSubmit?: (payload: Record<string, any>, complete: () => void) => void;
|
|
56
|
+
/**
|
|
57
|
+
* Provide a custom progress component to render in place of `StepperProgress`.
|
|
58
|
+
*/
|
|
22
59
|
renderProgress?: (props: {
|
|
23
60
|
activeStepIndex: number;
|
|
24
61
|
steps: StepProps[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wizard.d.ts","sourceRoot":"","sources":["../../src/Wizard/Wizard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsD,MAAM,OAAO,CAAA;AAG1E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAI9C,OAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAIxD,OAAO,IAAI,MAAM,QAAQ,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAGvC,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG;
|
|
1
|
+
{"version":3,"file":"Wizard.d.ts","sourceRoot":"","sources":["../../src/Wizard/Wizard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsD,MAAM,OAAO,CAAA;AAG1E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAI9C,OAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAIxD,OAAO,IAAI,MAAM,QAAQ,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAGvC,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG;IACzC;;OAEG;IACH,iBAAiB,CAAC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|
|
3
3
|
import { As } from '../types';
|
|
4
4
|
type Props = {
|
|
5
|
+
/** The amount of space between children. */
|
|
5
6
|
spacing?: number | string;
|
|
6
7
|
};
|
|
7
8
|
export type WrapViewProps<E extends As = 'div'> = Props & Omit<StackViewProps<E>, keyof Props>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WrapView.d.ts","sourceRoot":"","sources":["../../src/WrapView/WrapView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAExD,OAAO,EAAE,EAAE,EAAc,MAAM,UAAU,CAAA;AAEzC,KAAK,KAAK,GAAG;
|
|
1
|
+
{"version":3,"file":"WrapView.d.ts","sourceRoot":"","sources":["../../src/WrapView/WrapView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAExD,OAAO,EAAE,EAAE,EAAc,MAAM,UAAU,CAAA;AAEzC,KAAK,KAAK,GAAG;IACX,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC1B,CAAA;AACD,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,EAAE,GAAG,KAAK,IAAI,KAAK,GACrD,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,CAAC,CAAA;AAEtC,wBAAgB,QAAQ,CAAC,CAAC,SAAS,EAAE,EAAE,EACrC,QAAQ,EACR,OAAO,EACP,GAAG,gBAAgB,EACpB,EAAE,aAAa,CAAC,CAAC,CAAC,qBAgBlB"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Provide an on-screen and optional console accessibilty violation.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useAccessibilityViolation(
|
|
6
|
+
/** Content to be displayed in tooltip when hovering element. */
|
|
7
|
+
tooltipContent: React.ReactNode,
|
|
8
|
+
/** Content to be displayed in the console with a reference to the element. */
|
|
9
|
+
consoleContent: string): {
|
|
3
10
|
tooltipProps?: undefined;
|
|
4
11
|
wrapperProps?: undefined;
|
|
5
12
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-accessibility-violation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-accessibility-violation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"use-accessibility-violation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-accessibility-violation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B;;GAEG;AACH,wBAAgB,yBAAyB;AACvC,gEAAgE;AAChE,cAAc,EAAE,KAAK,CAAC,SAAS;AAE/B,8EAA8E;AAC9E,cAAc,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;EA8CvB"}
|
|
@@ -1,2 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provide a callback for any document event type.
|
|
3
|
+
*
|
|
4
|
+
* @event {string} type - A valid [DOM event](https://developer.mozilla.org/en-US/docs/Web/Events).
|
|
5
|
+
* @param {Function} callback - Callback when specified event type occurs.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
*
|
|
9
|
+
* function App() {
|
|
10
|
+
* useDocumentEvent('keydown', event => {
|
|
11
|
+
* console.log(`${event.key} pressed`)
|
|
12
|
+
* })
|
|
13
|
+
* return <div>App</div>
|
|
14
|
+
* }
|
|
15
|
+
*/
|
|
1
16
|
export declare function useDocumentEvent(type: any, callback: any): void;
|
|
2
17
|
//# sourceMappingURL=use-document-event.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-document-event.d.ts","sourceRoot":"","sources":["../../src/hooks/use-document-event.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-document-event.d.ts","sourceRoot":"","sources":["../../src/hooks/use-document-event.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,KAAA,EAAE,QAAQ,KAAA,QAgB9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-focus.d.ts","sourceRoot":"","sources":["../../src/hooks/use-focus.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-focus.d.ts","sourceRoot":"","sources":["../../src/hooks/use-focus.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,QAAQ;;;;;;EASvB"}
|
package/dist/hooks/use-id.d.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates a unique id based on the provided prefix.
|
|
3
|
+
* Be aware using the same prefix elsewhere _does not_ generate a unique id.
|
|
4
|
+
* @param {string} prefix
|
|
5
|
+
* @returns {string} unique prefixed id
|
|
6
|
+
*/
|
|
1
7
|
export declare function useId(prefix: any): any;
|
|
2
8
|
//# sourceMappingURL=use-id.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-id.d.ts","sourceRoot":"","sources":["../../src/hooks/use-id.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-id.d.ts","sourceRoot":"","sources":["../../src/hooks/use-id.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,MAAM,KAAA,OAM3B"}
|
|
@@ -1,4 +1,40 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a set of hooks to help manage collecting and using measurements
|
|
4
|
+
* from one or many components.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
*
|
|
8
|
+
* function Singular({ ref, value }) {
|
|
9
|
+
* const [useMeasureRef, useMeasureEffect] = useMeasure()
|
|
10
|
+
* useMeasureRef(ref)
|
|
11
|
+
* useMeasureEffect(([node]) => {
|
|
12
|
+
* console.log(node)
|
|
13
|
+
* }, [value])
|
|
14
|
+
* return <div />
|
|
15
|
+
* }
|
|
16
|
+
*
|
|
17
|
+
* function Parent({ children }) {
|
|
18
|
+
* const [useMeasureRef, useMeasureEffect] = useMeasure()
|
|
19
|
+
* useMeasureEffect(nodes => {
|
|
20
|
+
* console.log(nodes)
|
|
21
|
+
* }, [])
|
|
22
|
+
* return (
|
|
23
|
+
* <div>
|
|
24
|
+
* {Children.map(children, child =>
|
|
25
|
+
* React.cloneElement(child, { useMeasureRef })
|
|
26
|
+
* )}
|
|
27
|
+
* </div>
|
|
28
|
+
* )
|
|
29
|
+
* }
|
|
30
|
+
*
|
|
31
|
+
* function Child({ useMeasureRef }) {
|
|
32
|
+
* const ref = useMeasureRef(ref)
|
|
33
|
+
* return <div ref={ref} />
|
|
34
|
+
* }
|
|
35
|
+
*
|
|
36
|
+
* @returns {[(ref?: React.RefObject) => React.RefObject, (onMeasure: Function, dependencies: Array) => void]}
|
|
37
|
+
*/
|
|
2
38
|
export declare function useMeasure(): [
|
|
3
39
|
(ref?: React.RefObject<Node>) => React.RefObject<Node>,
|
|
4
40
|
(onMeasure: (nodes: HTMLElement[]) => void, dependencies?: React.DependencyList) => void
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-measure.d.ts","sourceRoot":"","sources":["../../src/hooks/use-measure.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"use-measure.d.ts","sourceRoot":"","sources":["../../src/hooks/use-measure.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAwB9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,UAAU,IAAI;IAC5B,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC;IACtD,CACE,SAAS,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,IAAI,EACzC,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,KAChC,IAAI;CACV,CAmEA"}
|
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Manages a set of indices that need to wrap or be contained.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
*
|
|
6
|
+
* const {
|
|
7
|
+
* activeIndex,
|
|
8
|
+
* moveActiveIndex,
|
|
9
|
+
* } = useRovingIndex({ maxIndex: items.length - 1 })
|
|
10
|
+
*
|
|
11
|
+
* @param {{
|
|
12
|
+
* maxIndex: number,
|
|
13
|
+
* defaultIndex?: number,
|
|
14
|
+
* wrap?: boolean
|
|
15
|
+
* }} [options]
|
|
16
|
+
* @returns {{
|
|
17
|
+
* activeIndex: number,
|
|
18
|
+
* moveActiveIndex: (amountToMove: number) => void,
|
|
19
|
+
* setActiveIndex: (nextIndex: number) => void,
|
|
20
|
+
* moveBackwardDisabled: boolean,
|
|
21
|
+
* moveForwardDisabled: boolean,
|
|
22
|
+
* }}
|
|
23
|
+
*/
|
|
1
24
|
export declare function useRovingIndex({ maxIndex, defaultIndex, wrap }: {
|
|
2
25
|
maxIndex: any;
|
|
3
26
|
defaultIndex?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-roving-index.d.ts","sourceRoot":"","sources":["../../src/hooks/use-roving-index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-roving-index.d.ts","sourceRoot":"","sources":["../../src/hooks/use-roving-index.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,YAAgB,EAAE,IAAY,EAAE;;;;CAAA;;;;;;EAiC1E"}
|