@pingux/astro 2.130.2 → 2.130.3-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/RockerButton/RockerButton.d.ts +4 -0
- package/lib/cjs/components/RockerButton/RockerButton.js +31 -67
- package/lib/cjs/components/RockerButton/RockerButton.styles.d.ts +59 -0
- package/lib/cjs/components/RockerButton/RockerButton.styles.js +4 -0
- package/lib/cjs/components/RockerButton/index.d.ts +1 -0
- package/lib/cjs/components/RockerButton/index.js +2 -21
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.js +43 -22
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.stories.js +9 -4
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.test.js +62 -17
- package/lib/cjs/context/RockerButtonGroupContext/index.d.ts +7 -1
- package/lib/cjs/hooks/index.d.ts +0 -1
- package/lib/cjs/hooks/index.js +0 -7
- package/lib/cjs/hooks/useGetTheme/useGetTheme.d.ts +1 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/index.d.ts +1 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +3 -3
- package/lib/cjs/styles/themes/astro/customProperties/index.d.ts +1 -0
- package/lib/cjs/styles/themes/astro/customProperties/index.js +2 -1
- package/lib/cjs/styles/themes/next-gen/customProperties/index.d.ts +1 -0
- package/lib/cjs/styles/themes/next-gen/customProperties/index.js +2 -1
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +2 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +2 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +3 -1
- package/lib/cjs/types/rockerButton.d.ts +13 -0
- package/lib/cjs/types/rockerButton.js +6 -0
- package/lib/cjs/types/rockerButtonGroup.d.ts +7 -3
- package/lib/components/RockerButton/RockerButton.js +32 -68
- package/lib/components/RockerButton/RockerButton.styles.js +4 -0
- package/lib/components/RockerButton/index.js +1 -2
- package/lib/components/RockerButtonGroup/RockerButtonGroup.js +45 -22
- package/lib/components/RockerButtonGroup/RockerButtonGroup.stories.js +9 -4
- package/lib/components/RockerButtonGroup/RockerButtonGroup.test.js +61 -17
- package/lib/hooks/index.js +0 -1
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +3 -3
- package/lib/styles/themes/astro/customProperties/index.js +2 -1
- package/lib/styles/themes/next-gen/customProperties/index.js +2 -1
- package/lib/styles/themes/next-gen/variants/variants.js +3 -1
- package/lib/types/rockerButton.js +1 -0
- package/package.json +4 -3
- package/lib/cjs/hooks/useRockerButton/index.d.ts +0 -1
- package/lib/cjs/hooks/useRockerButton/index.js +0 -14
- package/lib/cjs/hooks/useRockerButton/useRockerButton.d.ts +0 -241
- package/lib/cjs/hooks/useRockerButton/useRockerButton.js +0 -44
- package/lib/hooks/useRockerButton/index.js +0 -1
- package/lib/hooks/useRockerButton/useRockerButton.js +0 -36
@@ -1,14 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
4
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
5
|
-
_Object$defineProperty(exports, "__esModule", {
|
6
|
-
value: true
|
7
|
-
});
|
8
|
-
_Object$defineProperty(exports, "default", {
|
9
|
-
enumerable: true,
|
10
|
-
get: function get() {
|
11
|
-
return _useRockerButton["default"];
|
12
|
-
}
|
13
|
-
});
|
14
|
-
var _useRockerButton = _interopRequireDefault(require("./useRockerButton"));
|
@@ -1,241 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { MultipleSelectionManager } from 'react-stately';
|
3
|
-
import { FocusableElement } from '../../types';
|
4
|
-
interface RockerButtonProps {
|
5
|
-
item: {
|
6
|
-
key: string;
|
7
|
-
};
|
8
|
-
isDisabled: boolean;
|
9
|
-
isSelected: boolean;
|
10
|
-
}
|
11
|
-
declare const useRockerButton: (props: RockerButtonProps, state: {
|
12
|
-
selectionManager: MultipleSelectionManager;
|
13
|
-
}, ref: React.RefObject<FocusableElement>) => {
|
14
|
-
rockerButtonProps: {
|
15
|
-
id: string;
|
16
|
-
'aria-pressed': boolean;
|
17
|
-
'aria-disabled': true | undefined;
|
18
|
-
role?: React.AriaRole | undefined;
|
19
|
-
tabIndex?: number | undefined;
|
20
|
-
style?: React.CSSProperties | undefined;
|
21
|
-
className?: string | undefined;
|
22
|
-
'aria-activedescendant'?: string | undefined;
|
23
|
-
'aria-atomic'?: (boolean | "false" | "true") | undefined;
|
24
|
-
'aria-autocomplete'?: "list" | "none" | "both" | "inline" | undefined;
|
25
|
-
'aria-braillelabel'?: string | undefined;
|
26
|
-
'aria-brailleroledescription'?: string | undefined;
|
27
|
-
'aria-busy'?: (boolean | "false" | "true") | undefined;
|
28
|
-
'aria-checked'?: boolean | "mixed" | "false" | "true" | undefined;
|
29
|
-
'aria-colcount'?: number | undefined;
|
30
|
-
'aria-colindex'?: number | undefined;
|
31
|
-
'aria-colindextext'?: string | undefined;
|
32
|
-
'aria-colspan'?: number | undefined;
|
33
|
-
'aria-controls'?: string | undefined;
|
34
|
-
'aria-current'?: boolean | "time" | "date" | "page" | "false" | "true" | "step" | "location" | undefined;
|
35
|
-
'aria-describedby'?: string | undefined;
|
36
|
-
'aria-description'?: string | undefined;
|
37
|
-
'aria-details'?: string | undefined;
|
38
|
-
'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
|
39
|
-
'aria-errormessage'?: string | undefined;
|
40
|
-
'aria-expanded'?: (boolean | "false" | "true") | undefined;
|
41
|
-
'aria-flowto'?: string | undefined;
|
42
|
-
'aria-grabbed'?: (boolean | "false" | "true") | undefined;
|
43
|
-
'aria-haspopup'?: boolean | "dialog" | "grid" | "listbox" | "menu" | "tree" | "false" | "true" | undefined;
|
44
|
-
'aria-hidden'?: (boolean | "false" | "true") | undefined;
|
45
|
-
'aria-invalid'?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
46
|
-
'aria-keyshortcuts'?: string | undefined;
|
47
|
-
'aria-label'?: string | undefined;
|
48
|
-
'aria-labelledby'?: string | undefined;
|
49
|
-
'aria-level'?: number | undefined;
|
50
|
-
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
51
|
-
'aria-modal'?: (boolean | "false" | "true") | undefined;
|
52
|
-
'aria-multiline'?: (boolean | "false" | "true") | undefined;
|
53
|
-
'aria-multiselectable'?: (boolean | "false" | "true") | undefined;
|
54
|
-
'aria-orientation'?: "vertical" | "horizontal" | undefined;
|
55
|
-
'aria-owns'?: string | undefined;
|
56
|
-
'aria-placeholder'?: string | undefined;
|
57
|
-
'aria-posinset'?: number | undefined;
|
58
|
-
'aria-readonly'?: (boolean | "false" | "true") | undefined;
|
59
|
-
'aria-relevant'?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
60
|
-
'aria-required'?: (boolean | "false" | "true") | undefined;
|
61
|
-
'aria-roledescription'?: string | undefined;
|
62
|
-
'aria-rowcount'?: number | undefined;
|
63
|
-
'aria-rowindex'?: number | undefined;
|
64
|
-
'aria-rowindextext'?: string | undefined;
|
65
|
-
'aria-rowspan'?: number | undefined;
|
66
|
-
'aria-selected'?: (boolean | "false" | "true") | undefined;
|
67
|
-
'aria-setsize'?: number | undefined;
|
68
|
-
'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
|
69
|
-
'aria-valuemax'?: number | undefined;
|
70
|
-
'aria-valuemin'?: number | undefined;
|
71
|
-
'aria-valuenow'?: number | undefined;
|
72
|
-
'aria-valuetext'?: string | undefined;
|
73
|
-
children?: React.ReactNode;
|
74
|
-
dangerouslySetInnerHTML?: {
|
75
|
-
__html: string | TrustedHTML;
|
76
|
-
} | undefined;
|
77
|
-
onCopy?: React.ClipboardEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
78
|
-
onCopyCapture?: React.ClipboardEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
79
|
-
onCut?: React.ClipboardEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
80
|
-
onCutCapture?: React.ClipboardEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
81
|
-
onPaste?: React.ClipboardEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
82
|
-
onPasteCapture?: React.ClipboardEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
83
|
-
onCompositionEnd?: React.CompositionEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
84
|
-
onCompositionEndCapture?: React.CompositionEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
85
|
-
onCompositionStart?: React.CompositionEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
86
|
-
onCompositionStartCapture?: React.CompositionEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
87
|
-
onCompositionUpdate?: React.CompositionEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
88
|
-
onCompositionUpdateCapture?: React.CompositionEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
89
|
-
onFocus?: React.FocusEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
90
|
-
onFocusCapture?: React.FocusEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
91
|
-
onBlur?: React.FocusEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
92
|
-
onBlurCapture?: React.FocusEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
93
|
-
onChange?: React.FormEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
94
|
-
onChangeCapture?: React.FormEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
95
|
-
onBeforeInput?: React.FormEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
96
|
-
onBeforeInputCapture?: React.FormEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
97
|
-
onInput?: React.FormEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
98
|
-
onInputCapture?: React.FormEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
99
|
-
onReset?: React.FormEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
100
|
-
onResetCapture?: React.FormEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
101
|
-
onSubmit?: React.FormEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
102
|
-
onSubmitCapture?: React.FormEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
103
|
-
onInvalid?: React.FormEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
104
|
-
onInvalidCapture?: React.FormEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
105
|
-
onLoad?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
106
|
-
onLoadCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
107
|
-
onError?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
108
|
-
onErrorCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
109
|
-
onKeyDown?: React.KeyboardEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
110
|
-
onKeyDownCapture?: React.KeyboardEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
111
|
-
onKeyPress?: React.KeyboardEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
112
|
-
onKeyPressCapture?: React.KeyboardEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
113
|
-
onKeyUp?: React.KeyboardEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
114
|
-
onKeyUpCapture?: React.KeyboardEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
115
|
-
onAbort?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
116
|
-
onAbortCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
117
|
-
onCanPlay?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
118
|
-
onCanPlayCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
119
|
-
onCanPlayThrough?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
120
|
-
onCanPlayThroughCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
121
|
-
onDurationChange?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
122
|
-
onDurationChangeCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
123
|
-
onEmptied?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
124
|
-
onEmptiedCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
125
|
-
onEncrypted?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
126
|
-
onEncryptedCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
127
|
-
onEnded?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
128
|
-
onEndedCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
129
|
-
onLoadedData?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
130
|
-
onLoadedDataCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
131
|
-
onLoadedMetadata?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
132
|
-
onLoadedMetadataCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
133
|
-
onLoadStart?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
134
|
-
onLoadStartCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
135
|
-
onPause?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
136
|
-
onPauseCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
137
|
-
onPlay?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
138
|
-
onPlayCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
139
|
-
onPlaying?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
140
|
-
onPlayingCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
141
|
-
onProgress?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
142
|
-
onProgressCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
143
|
-
onRateChange?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
144
|
-
onRateChangeCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
145
|
-
onResize?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
146
|
-
onResizeCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
147
|
-
onSeeked?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
148
|
-
onSeekedCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
149
|
-
onSeeking?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
150
|
-
onSeekingCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
151
|
-
onStalled?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
152
|
-
onStalledCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
153
|
-
onSuspend?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
154
|
-
onSuspendCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
155
|
-
onTimeUpdate?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
156
|
-
onTimeUpdateCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
157
|
-
onVolumeChange?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
158
|
-
onVolumeChangeCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
159
|
-
onWaiting?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
160
|
-
onWaitingCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
161
|
-
onAuxClick?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
162
|
-
onAuxClickCapture?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
163
|
-
onClick?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
164
|
-
onClickCapture?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
165
|
-
onContextMenu?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
166
|
-
onContextMenuCapture?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
167
|
-
onDoubleClick?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
168
|
-
onDoubleClickCapture?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
169
|
-
onDrag?: React.DragEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
170
|
-
onDragCapture?: React.DragEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
171
|
-
onDragEnd?: React.DragEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
172
|
-
onDragEndCapture?: React.DragEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
173
|
-
onDragEnter?: React.DragEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
174
|
-
onDragEnterCapture?: React.DragEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
175
|
-
onDragExit?: React.DragEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
176
|
-
onDragExitCapture?: React.DragEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
177
|
-
onDragLeave?: React.DragEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
178
|
-
onDragLeaveCapture?: React.DragEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
179
|
-
onDragOver?: React.DragEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
180
|
-
onDragOverCapture?: React.DragEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
181
|
-
onDragStart?: React.DragEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
182
|
-
onDragStartCapture?: React.DragEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
183
|
-
onDrop?: React.DragEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
184
|
-
onDropCapture?: React.DragEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
185
|
-
onMouseDown?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
186
|
-
onMouseDownCapture?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
187
|
-
onMouseEnter?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
188
|
-
onMouseLeave?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
189
|
-
onMouseMove?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
190
|
-
onMouseMoveCapture?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
191
|
-
onMouseOut?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
192
|
-
onMouseOutCapture?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
193
|
-
onMouseOver?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
194
|
-
onMouseOverCapture?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
195
|
-
onMouseUp?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
196
|
-
onMouseUpCapture?: React.MouseEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
197
|
-
onSelect?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
198
|
-
onSelectCapture?: React.ReactEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
199
|
-
onTouchCancel?: React.TouchEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
200
|
-
onTouchCancelCapture?: React.TouchEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
201
|
-
onTouchEnd?: React.TouchEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
202
|
-
onTouchEndCapture?: React.TouchEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
203
|
-
onTouchMove?: React.TouchEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
204
|
-
onTouchMoveCapture?: React.TouchEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
205
|
-
onTouchStart?: React.TouchEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
206
|
-
onTouchStartCapture?: React.TouchEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
207
|
-
onPointerDown?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
208
|
-
onPointerDownCapture?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
209
|
-
onPointerMove?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
210
|
-
onPointerMoveCapture?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
211
|
-
onPointerUp?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
212
|
-
onPointerUpCapture?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
213
|
-
onPointerCancel?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
214
|
-
onPointerCancelCapture?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
215
|
-
onPointerEnter?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
216
|
-
onPointerEnterCapture?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
217
|
-
onPointerLeave?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
218
|
-
onPointerLeaveCapture?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
219
|
-
onPointerOver?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
220
|
-
onPointerOverCapture?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
221
|
-
onPointerOut?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
222
|
-
onPointerOutCapture?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
223
|
-
onGotPointerCapture?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
224
|
-
onGotPointerCaptureCapture?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
225
|
-
onLostPointerCapture?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
226
|
-
onLostPointerCaptureCapture?: React.PointerEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
227
|
-
onScroll?: React.UIEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
228
|
-
onScrollCapture?: React.UIEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
229
|
-
onWheel?: React.WheelEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
230
|
-
onWheelCapture?: React.WheelEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
231
|
-
onAnimationStart?: React.AnimationEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
232
|
-
onAnimationStartCapture?: React.AnimationEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
233
|
-
onAnimationEnd?: React.AnimationEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
234
|
-
onAnimationEndCapture?: React.AnimationEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
235
|
-
onAnimationIteration?: React.AnimationEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
236
|
-
onAnimationIterationCapture?: React.AnimationEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
237
|
-
onTransitionEnd?: React.TransitionEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
238
|
-
onTransitionEndCapture?: React.TransitionEventHandler<import("@react-types/shared").FocusableElement> | undefined;
|
239
|
-
};
|
240
|
-
};
|
241
|
-
export default useRockerButton;
|
@@ -1,44 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
4
|
-
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
|
5
|
-
var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
|
6
|
-
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
7
|
-
var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
8
|
-
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
|
9
|
-
var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
|
10
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
11
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
12
|
-
_Object$defineProperty(exports, "__esModule", {
|
13
|
-
value: true
|
14
|
-
});
|
15
|
-
exports["default"] = void 0;
|
16
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
17
|
-
var _selection = require("@react-aria/selection");
|
18
|
-
var _utils = require("@react-aria/utils");
|
19
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
20
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
21
|
-
var useRockerButton = function useRockerButton(props, state, ref) {
|
22
|
-
var item = props.item,
|
23
|
-
isDisabled = props.isDisabled,
|
24
|
-
isSelected = props.isSelected;
|
25
|
-
var key = item.key;
|
26
|
-
var manager = state.selectionManager;
|
27
|
-
var _useSelectableItem = (0, _selection.useSelectableItem)({
|
28
|
-
isDisabled: isDisabled,
|
29
|
-
selectionManager: manager,
|
30
|
-
key: key,
|
31
|
-
ref: ref
|
32
|
-
}),
|
33
|
-
itemProps = _useSelectableItem.itemProps;
|
34
|
-
var rockerButtonId = (0, _utils.useId)();
|
35
|
-
return {
|
36
|
-
rockerButtonProps: _objectSpread(_objectSpread({}, itemProps), {}, {
|
37
|
-
id: rockerButtonId,
|
38
|
-
'aria-pressed': isSelected,
|
39
|
-
'aria-disabled': isDisabled || undefined
|
40
|
-
})
|
41
|
-
};
|
42
|
-
};
|
43
|
-
var _default = useRockerButton;
|
44
|
-
exports["default"] = _default;
|
@@ -1 +0,0 @@
|
|
1
|
-
export { default } from './useRockerButton';
|
@@ -1,36 +0,0 @@
|
|
1
|
-
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
2
|
-
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
3
|
-
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
4
|
-
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
5
|
-
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
6
|
-
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
7
|
-
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
8
|
-
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
9
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
10
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
11
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
12
|
-
import { useSelectableItem } from '@react-aria/selection';
|
13
|
-
import { useId } from '@react-aria/utils';
|
14
|
-
var useRockerButton = function useRockerButton(props, state, ref) {
|
15
|
-
var item = props.item,
|
16
|
-
isDisabled = props.isDisabled,
|
17
|
-
isSelected = props.isSelected;
|
18
|
-
var key = item.key;
|
19
|
-
var manager = state.selectionManager;
|
20
|
-
var _useSelectableItem = useSelectableItem({
|
21
|
-
isDisabled: isDisabled,
|
22
|
-
selectionManager: manager,
|
23
|
-
key: key,
|
24
|
-
ref: ref
|
25
|
-
}),
|
26
|
-
itemProps = _useSelectableItem.itemProps;
|
27
|
-
var rockerButtonId = useId();
|
28
|
-
return {
|
29
|
-
rockerButtonProps: _objectSpread(_objectSpread({}, itemProps), {}, {
|
30
|
-
id: rockerButtonId,
|
31
|
-
'aria-pressed': isSelected,
|
32
|
-
'aria-disabled': isDisabled || undefined
|
33
|
-
})
|
34
|
-
};
|
35
|
-
};
|
36
|
-
export default useRockerButton;
|