@plasmicpkgs/react-aria 0.0.151 → 0.0.152

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.
Files changed (174) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/common.d.ts +44 -1
  3. package/dist/contexts.d.ts +1 -1
  4. package/dist/react-aria.esm.js +813 -730
  5. package/dist/react-aria.esm.js.map +1 -1
  6. package/dist/react-aria.js +812 -729
  7. package/dist/react-aria.js.map +1 -1
  8. package/dist/registerButton.d.ts +2 -2
  9. package/dist/registerDescription.d.ts +1 -1
  10. package/dist/registerDialog.d.ts +1 -1
  11. package/dist/registerDialogTrigger.d.ts +3 -1
  12. package/dist/registerHeading.d.ts +4 -2
  13. package/dist/registerLabel.d.ts +3 -1
  14. package/dist/registerListBoxItem.d.ts +6 -3
  15. package/dist/registerModal.d.ts +1 -0
  16. package/dist/registerOverlayArrow.d.ts +1 -1
  17. package/dist/registerText.d.ts +4 -2
  18. package/dist/registerTooltip.d.ts +1 -0
  19. package/package.json +2 -2
  20. package/skinny/{OptionsItemIdManager-724ffca2.esm.js → OptionsItemIdManager-0ce90944.esm.js} +2 -2
  21. package/skinny/{OptionsItemIdManager-724ffca2.esm.js.map → OptionsItemIdManager-0ce90944.esm.js.map} +1 -1
  22. package/skinny/{OptionsItemIdManager-f0a61ed5.cjs.js → OptionsItemIdManager-cb3a2c53.cjs.js} +3 -3
  23. package/skinny/{OptionsItemIdManager-f0a61ed5.cjs.js.map → OptionsItemIdManager-cb3a2c53.cjs.js.map} +1 -1
  24. package/skinny/common-7f948fa5.cjs.js +659 -0
  25. package/skinny/common-7f948fa5.cjs.js.map +1 -0
  26. package/skinny/common-81f08e86.esm.js +621 -0
  27. package/skinny/common-81f08e86.esm.js.map +1 -0
  28. package/skinny/common.d.ts +44 -1
  29. package/skinny/contexts.d.ts +1 -1
  30. package/skinny/registerButton.cjs.js +11 -10
  31. package/skinny/registerButton.cjs.js.map +1 -1
  32. package/skinny/registerButton.d.ts +2 -2
  33. package/skinny/registerButton.esm.js +9 -8
  34. package/skinny/registerButton.esm.js.map +1 -1
  35. package/skinny/registerCheckbox.cjs.js +13 -14
  36. package/skinny/registerCheckbox.cjs.js.map +1 -1
  37. package/skinny/registerCheckbox.esm.js +11 -12
  38. package/skinny/registerCheckbox.esm.js.map +1 -1
  39. package/skinny/registerCheckboxGroup.cjs.js +13 -14
  40. package/skinny/registerCheckboxGroup.cjs.js.map +1 -1
  41. package/skinny/registerCheckboxGroup.esm.js +11 -12
  42. package/skinny/registerCheckboxGroup.esm.js.map +1 -1
  43. package/skinny/registerComboBox.cjs.js +13 -14
  44. package/skinny/registerComboBox.cjs.js.map +1 -1
  45. package/skinny/registerComboBox.esm.js +10 -11
  46. package/skinny/registerComboBox.esm.js.map +1 -1
  47. package/skinny/registerDescription.cjs.js +2 -3
  48. package/skinny/registerDescription.cjs.js.map +1 -1
  49. package/skinny/registerDescription.d.ts +1 -1
  50. package/skinny/registerDescription.esm.js +1 -2
  51. package/skinny/registerDescription.esm.js.map +1 -1
  52. package/skinny/registerDialog.cjs.js +40 -7
  53. package/skinny/registerDialog.cjs.js.map +1 -1
  54. package/skinny/registerDialog.d.ts +1 -1
  55. package/skinny/registerDialog.esm.js +38 -5
  56. package/skinny/registerDialog.esm.js.map +1 -1
  57. package/skinny/registerDialogTrigger.cjs.js +9 -8
  58. package/skinny/registerDialogTrigger.cjs.js.map +1 -1
  59. package/skinny/registerDialogTrigger.d.ts +3 -1
  60. package/skinny/registerDialogTrigger.esm.js +6 -5
  61. package/skinny/registerDialogTrigger.esm.js.map +1 -1
  62. package/skinny/registerFieldError.cjs.js +4 -3
  63. package/skinny/registerFieldError.cjs.js.map +1 -1
  64. package/skinny/registerFieldError.esm.js +2 -1
  65. package/skinny/registerFieldError.esm.js.map +1 -1
  66. package/skinny/registerForm.cjs.js +4 -3
  67. package/skinny/registerForm.cjs.js.map +1 -1
  68. package/skinny/registerForm.esm.js +2 -1
  69. package/skinny/registerForm.esm.js.map +1 -1
  70. package/skinny/registerHeading.cjs.js +4 -4
  71. package/skinny/registerHeading.cjs.js.map +1 -1
  72. package/skinny/registerHeading.d.ts +4 -2
  73. package/skinny/registerHeading.esm.js +2 -2
  74. package/skinny/registerHeading.esm.js.map +1 -1
  75. package/skinny/registerInput.cjs.js +25 -36
  76. package/skinny/registerInput.cjs.js.map +1 -1
  77. package/skinny/registerInput.esm.js +21 -32
  78. package/skinny/registerInput.esm.js.map +1 -1
  79. package/skinny/registerLabel.cjs.js +11 -7
  80. package/skinny/registerLabel.cjs.js.map +1 -1
  81. package/skinny/registerLabel.d.ts +3 -1
  82. package/skinny/registerLabel.esm.js +9 -5
  83. package/skinny/registerLabel.esm.js.map +1 -1
  84. package/skinny/{registerListBox-d83a8581.esm.js → registerListBox-14503b0a.esm.js} +6 -4
  85. package/skinny/registerListBox-14503b0a.esm.js.map +1 -0
  86. package/skinny/{registerListBox-b21abca6.cjs.js → registerListBox-7a50077e.cjs.js} +10 -8
  87. package/skinny/registerListBox-7a50077e.cjs.js.map +1 -0
  88. package/skinny/registerListBox.cjs.js +4 -5
  89. package/skinny/registerListBox.cjs.js.map +1 -1
  90. package/skinny/registerListBox.esm.js +4 -5
  91. package/skinny/registerListBox.esm.js.map +1 -1
  92. package/skinny/registerListBoxItem.cjs.js +5 -9
  93. package/skinny/registerListBoxItem.cjs.js.map +1 -1
  94. package/skinny/registerListBoxItem.d.ts +6 -3
  95. package/skinny/registerListBoxItem.esm.js +3 -7
  96. package/skinny/registerListBoxItem.esm.js.map +1 -1
  97. package/skinny/registerModal.cjs.js +17 -8
  98. package/skinny/registerModal.cjs.js.map +1 -1
  99. package/skinny/registerModal.d.ts +1 -0
  100. package/skinny/registerModal.esm.js +14 -5
  101. package/skinny/registerModal.esm.js.map +1 -1
  102. package/skinny/registerOverlayArrow.cjs.js +7 -5
  103. package/skinny/registerOverlayArrow.cjs.js.map +1 -1
  104. package/skinny/registerOverlayArrow.d.ts +1 -1
  105. package/skinny/registerOverlayArrow.esm.js +5 -3
  106. package/skinny/registerOverlayArrow.esm.js.map +1 -1
  107. package/skinny/registerPopover.cjs.js +5 -5
  108. package/skinny/registerPopover.cjs.js.map +1 -1
  109. package/skinny/registerPopover.esm.js +3 -3
  110. package/skinny/registerPopover.esm.js.map +1 -1
  111. package/skinny/registerRadio.cjs.js +10 -11
  112. package/skinny/registerRadio.cjs.js.map +1 -1
  113. package/skinny/registerRadio.esm.js +8 -9
  114. package/skinny/registerRadio.esm.js.map +1 -1
  115. package/skinny/registerRadioGroup.cjs.js +14 -15
  116. package/skinny/registerRadioGroup.cjs.js.map +1 -1
  117. package/skinny/registerRadioGroup.esm.js +11 -12
  118. package/skinny/registerRadioGroup.esm.js.map +1 -1
  119. package/skinny/registerSection.cjs.js +4 -5
  120. package/skinny/registerSection.cjs.js.map +1 -1
  121. package/skinny/registerSection.esm.js +4 -5
  122. package/skinny/registerSection.esm.js.map +1 -1
  123. package/skinny/registerSelect.cjs.js +19 -22
  124. package/skinny/registerSelect.cjs.js.map +1 -1
  125. package/skinny/registerSelect.esm.js +13 -16
  126. package/skinny/registerSelect.esm.js.map +1 -1
  127. package/skinny/registerSlider.cjs.js +16 -15
  128. package/skinny/registerSlider.cjs.js.map +1 -1
  129. package/skinny/registerSlider.esm.js +12 -11
  130. package/skinny/registerSlider.esm.js.map +1 -1
  131. package/skinny/registerSliderOutput.cjs.js +4 -4
  132. package/skinny/registerSliderOutput.cjs.js.map +1 -1
  133. package/skinny/registerSliderOutput.esm.js +2 -2
  134. package/skinny/registerSliderOutput.esm.js.map +1 -1
  135. package/skinny/registerSliderThumb.cjs.js +25 -21
  136. package/skinny/registerSliderThumb.cjs.js.map +1 -1
  137. package/skinny/registerSliderThumb.esm.js +23 -19
  138. package/skinny/registerSliderThumb.esm.js.map +1 -1
  139. package/skinny/registerSliderTrack.cjs.js +5 -5
  140. package/skinny/registerSliderTrack.cjs.js.map +1 -1
  141. package/skinny/registerSliderTrack.esm.js +2 -2
  142. package/skinny/registerSliderTrack.esm.js.map +1 -1
  143. package/skinny/registerSwitch.cjs.js +12 -13
  144. package/skinny/registerSwitch.cjs.js.map +1 -1
  145. package/skinny/registerSwitch.esm.js +10 -11
  146. package/skinny/registerSwitch.esm.js.map +1 -1
  147. package/skinny/registerText.cjs.js +6 -5
  148. package/skinny/registerText.cjs.js.map +1 -1
  149. package/skinny/registerText.d.ts +4 -2
  150. package/skinny/registerText.esm.js +4 -3
  151. package/skinny/registerText.esm.js.map +1 -1
  152. package/skinny/registerTextArea.cjs.js +23 -35
  153. package/skinny/registerTextArea.cjs.js.map +1 -1
  154. package/skinny/registerTextArea.esm.js +19 -31
  155. package/skinny/registerTextArea.esm.js.map +1 -1
  156. package/skinny/registerTextField.cjs.js +27 -38
  157. package/skinny/registerTextField.cjs.js.map +1 -1
  158. package/skinny/registerTextField.esm.js +25 -36
  159. package/skinny/registerTextField.esm.js.map +1 -1
  160. package/skinny/registerTooltip.cjs.js +6 -6
  161. package/skinny/registerTooltip.cjs.js.map +1 -1
  162. package/skinny/registerTooltip.d.ts +1 -0
  163. package/skinny/registerTooltip.esm.js +4 -4
  164. package/skinny/registerTooltip.esm.js.map +1 -1
  165. package/skinny/common-3fde23cc.esm.js +0 -446
  166. package/skinny/common-3fde23cc.esm.js.map +0 -1
  167. package/skinny/common-6ffc5113.cjs.js +0 -453
  168. package/skinny/common-6ffc5113.cjs.js.map +0 -1
  169. package/skinny/registerListBox-b21abca6.cjs.js.map +0 -1
  170. package/skinny/registerListBox-d83a8581.esm.js.map +0 -1
  171. package/skinny/utils-88dd1a55.cjs.js +0 -148
  172. package/skinny/utils-88dd1a55.cjs.js.map +0 -1
  173. package/skinny/utils-b68e14cf.esm.js +0 -133
  174. package/skinny/utils-b68e14cf.esm.js.map +0 -1
@@ -0,0 +1,621 @@
1
+ import { usePlasmicCanvasContext, usePlasmicCanvasComponentInfo } from '@plasmicapp/host';
2
+ import registerComponent from '@plasmicapp/host/registerComponent';
3
+ import React, { useEffect } from 'react';
4
+
5
+ var __defProp$1 = Object.defineProperty;
6
+ var __defProps = Object.defineProperties;
7
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
8
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
9
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues$1 = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp$1.call(b, prop))
15
+ __defNormalProp$1(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols$1)
17
+ for (var prop of __getOwnPropSymbols$1(b)) {
18
+ if (__propIsEnum$1.call(b, prop))
19
+ __defNormalProp$1(a, prop, b[prop]);
20
+ }
21
+ return a;
22
+ };
23
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
+ var __objRest = (source, exclude) => {
25
+ var target = {};
26
+ for (var prop in source)
27
+ if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
28
+ target[prop] = source[prop];
29
+ if (source != null && __getOwnPropSymbols$1)
30
+ for (var prop of __getOwnPropSymbols$1(source)) {
31
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
32
+ target[prop] = source[prop];
33
+ }
34
+ return target;
35
+ };
36
+ const isBrowser = typeof window !== "undefined";
37
+ const useIsomorphicLayoutEffect = isBrowser ? React.useLayoutEffect : React.useEffect;
38
+ function useIsOpen({
39
+ triggerSlotName,
40
+ isOpen,
41
+ props
42
+ }) {
43
+ var _a, _b;
44
+ const { __plasmic_selection_prop__, plasmicNotifyAutoOpenedContent } = props;
45
+ const canvasContext = usePlasmicCanvasContext();
46
+ const { isSelected, selectedSlotName } = (_b = (_a = usePlasmicCanvasComponentInfo) == null ? void 0 : _a({ __plasmic_selection_prop__ })) != null ? _b : {};
47
+ if (!canvasContext) {
48
+ return isOpen;
49
+ }
50
+ const isTriggerSlotSelected = isDefined(selectedSlotName) && selectedSlotName === triggerSlotName;
51
+ const isAutoOpenedBySelection = isSelected && !isTriggerSlotSelected;
52
+ if (isAutoOpenedBySelection && !isOpen) {
53
+ plasmicNotifyAutoOpenedContent == null ? void 0 : plasmicNotifyAutoOpenedContent();
54
+ }
55
+ return Boolean(isAutoOpenedBySelection || isOpen);
56
+ }
57
+ function useAutoOpen({
58
+ props,
59
+ open,
60
+ close
61
+ }) {
62
+ var _a, _b, _c;
63
+ const inPlasmicCanvas = !!usePlasmicCanvasContext();
64
+ const isSelected = (_c = (_b = (_a = usePlasmicCanvasComponentInfo) == null ? void 0 : _a(props)) == null ? void 0 : _b.isSelected) != null ? _c : false;
65
+ const { plasmicNotifyAutoOpenedContent } = props;
66
+ useEffect(() => {
67
+ if (!inPlasmicCanvas) {
68
+ return;
69
+ }
70
+ if (isSelected) {
71
+ open == null ? void 0 : open();
72
+ plasmicNotifyAutoOpenedContent == null ? void 0 : plasmicNotifyAutoOpenedContent();
73
+ } else {
74
+ close == null ? void 0 : close();
75
+ }
76
+ }, [
77
+ isSelected,
78
+ inPlasmicCanvas,
79
+ plasmicNotifyAutoOpenedContent,
80
+ open,
81
+ close
82
+ ]);
83
+ }
84
+ function registerComponentHelper(loader, component, meta, overrides) {
85
+ if (overrides) {
86
+ meta = __spreadProps(__spreadValues$1(__spreadValues$1({}, meta), overrides), {
87
+ props: __spreadValues$1(__spreadValues$1({}, meta.props), overrides.props)
88
+ });
89
+ if (overrides.parentComponentName) {
90
+ meta.name = makeChildComponentName(
91
+ overrides.parentComponentName,
92
+ meta.name
93
+ );
94
+ }
95
+ }
96
+ if (loader) {
97
+ loader.registerComponent(component, meta);
98
+ } else {
99
+ registerComponent(component, meta);
100
+ }
101
+ return meta;
102
+ }
103
+ function makeComponentName(name) {
104
+ return `plasmic-react-aria-${name}`;
105
+ }
106
+ function makeChildComponentName(fullParentName, fullChildName) {
107
+ if (!fullParentName) {
108
+ return fullChildName;
109
+ }
110
+ return `${fullParentName}-${fullChildName.replace(
111
+ "plasmic-react-aria-",
112
+ ""
113
+ )}`;
114
+ }
115
+ function extractPlasmicDataProps(props) {
116
+ return Object.fromEntries(
117
+ Object.entries(props).filter(([key]) => key.startsWith("data-plasmic-"))
118
+ );
119
+ }
120
+ function isDefined(thing) {
121
+ return thing !== void 0 && thing !== null;
122
+ }
123
+ function filterHoverProps(props) {
124
+ const _a = props, otherProps = __objRest(_a, [
125
+ "onHoverStart",
126
+ "onHoverChange",
127
+ "onHoverEnd"
128
+ ]);
129
+ return otherProps;
130
+ }
131
+
132
+ var __defProp = Object.defineProperty;
133
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
134
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
135
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
136
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
137
+ var __spreadValues = (a, b) => {
138
+ for (var prop in b || (b = {}))
139
+ if (__hasOwnProp.call(b, prop))
140
+ __defNormalProp(a, prop, b[prop]);
141
+ if (__getOwnPropSymbols)
142
+ for (var prop of __getOwnPropSymbols(b)) {
143
+ if (__propIsEnum.call(b, prop))
144
+ __defNormalProp(a, prop, b[prop]);
145
+ }
146
+ return a;
147
+ };
148
+ function hasParent(_props, ctx) {
149
+ return isDefined(ctx == null ? void 0 : ctx.parent) === true;
150
+ }
151
+ function isParentReadOnly(_props, ctx) {
152
+ var _a;
153
+ return ((_a = ctx == null ? void 0 : ctx.parent) == null ? void 0 : _a.isReadOnly) === true;
154
+ }
155
+ function isParentDisabled(_props, ctx) {
156
+ var _a;
157
+ return ((_a = ctx == null ? void 0 : ctx.parent) == null ? void 0 : _a.isDisabled) === true;
158
+ }
159
+ function resolveAutoComplete(autoCompleteProp) {
160
+ if (typeof autoCompleteProp === "string") {
161
+ return autoCompleteProp;
162
+ }
163
+ if (!autoCompleteProp || !Array.isArray(autoCompleteProp) || autoCompleteProp.includes("off")) {
164
+ return void 0;
165
+ }
166
+ if (autoCompleteProp.includes("off")) {
167
+ return "off";
168
+ }
169
+ if (autoCompleteProp.includes("on") && autoCompleteProp.length === 1) {
170
+ return "on";
171
+ }
172
+ return autoCompleteProp.filter((x) => x !== "on").join(" ");
173
+ }
174
+ function createIdProp(componentName) {
175
+ return {
176
+ type: "string",
177
+ description: `Sets the HTML id attribute on the root element of the ${componentName}.`,
178
+ advanced: true
179
+ };
180
+ }
181
+ function createNameProp() {
182
+ return {
183
+ type: "string",
184
+ description: "Name for this field if it is part of a form",
185
+ displayName: "Form field key",
186
+ hidden: hasParent,
187
+ advanced: true
188
+ };
189
+ }
190
+ function createDisabledProp(componentName) {
191
+ return {
192
+ displayName: "Disabled",
193
+ type: "boolean",
194
+ description: `Whether the ${componentName} is read-only and unfocusable`,
195
+ defaultValueHint: false,
196
+ hidden: isParentDisabled
197
+ };
198
+ }
199
+ function createReadOnlyProp(componentName) {
200
+ return {
201
+ displayName: "Read only",
202
+ type: "boolean",
203
+ description: `Whether the value of this ${componentName} can be changed by the user. Unlike disabled, read-only does not prevent the user from interacting with the component (such as focus).`,
204
+ defaultValueHint: false,
205
+ advanced: true,
206
+ hidden: isParentReadOnly
207
+ };
208
+ }
209
+ function createRequiredProp(componentName) {
210
+ return {
211
+ displayName: "Required",
212
+ type: "boolean",
213
+ description: `Whether user input is required on the ${componentName} before form submission.`,
214
+ defaultValueHint: false,
215
+ advanced: true,
216
+ // hidden: hasParent,
217
+ hidden: () => true
218
+ // hiding required prop until the release of Aria Forms
219
+ };
220
+ }
221
+ function createAutoFocusProp(componentName) {
222
+ return {
223
+ type: "boolean",
224
+ description: `Whether the ${componentName} should be focused when rendered`,
225
+ defaultValueHint: false,
226
+ advanced: true,
227
+ hidden: hasParent
228
+ };
229
+ }
230
+ function createAriaLabelProp(componentName) {
231
+ return {
232
+ type: "string",
233
+ displayName: "ARIA label",
234
+ description: `Assistive technology uses this if there is no visible label for this ${componentName}`,
235
+ advanced: true,
236
+ hidden: hasParent
237
+ };
238
+ }
239
+ function createInitialValueProp(componentName) {
240
+ return {
241
+ type: "string",
242
+ editOnly: true,
243
+ displayName: "Initial value",
244
+ uncontrolledProp: "defaultValue",
245
+ description: `The default value of the ${componentName}`,
246
+ hidden: hasParent
247
+ };
248
+ }
249
+ function createMaxLengthProp() {
250
+ return {
251
+ type: "number",
252
+ description: "The maximum number of characters supported by the input",
253
+ advanced: true,
254
+ hidden: hasParent
255
+ };
256
+ }
257
+ function createMinLengthProp() {
258
+ return {
259
+ type: "number",
260
+ description: "The minimum number of characters supported by the input",
261
+ advanced: true,
262
+ hidden: hasParent
263
+ };
264
+ }
265
+ function createPatternProp() {
266
+ return {
267
+ type: "string",
268
+ description: "Regex pattern that the value of the input must match to be valid",
269
+ helpText: "For more information about writing Regular Expressions (regex), visit [Regexr](https://regexr.com/)",
270
+ validator: (value) => {
271
+ try {
272
+ new RegExp(value);
273
+ return true;
274
+ } catch (_err) {
275
+ return "Invalid Regex";
276
+ }
277
+ },
278
+ advanced: true,
279
+ hidden: hasParent
280
+ };
281
+ }
282
+ function createInputTypeProp() {
283
+ return {
284
+ type: "choice",
285
+ defaultValueHint: "text",
286
+ options: ["text", "search", "url", "tel", "email", "password"],
287
+ description: "The type of data that an input field is expected to handle. It influences the input's behavior, validation, and the kind of interface provided to the user.",
288
+ advanced: true,
289
+ hidden: hasParent
290
+ };
291
+ }
292
+ function createInputModeProp() {
293
+ return {
294
+ type: "choice",
295
+ description: "hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents.",
296
+ options: [
297
+ "none",
298
+ "text",
299
+ "tel",
300
+ "url",
301
+ "email",
302
+ "numeric",
303
+ "decimal",
304
+ "search"
305
+ ],
306
+ hidden: hasParent
307
+ };
308
+ }
309
+ function createAutoCompleteProp() {
310
+ return {
311
+ type: "choice",
312
+ advanced: true,
313
+ multiSelect: true,
314
+ hidden: hasParent,
315
+ description: "Guidance as to the type of data expected in the field",
316
+ helpText: "Learn more about the available options on the [MDN guide](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values)",
317
+ options: [
318
+ "on",
319
+ "off",
320
+ "name",
321
+ "honorific-prefix",
322
+ "given-name",
323
+ "additional-name",
324
+ "family-name",
325
+ "honorific-suffix",
326
+ "nickname",
327
+ "email",
328
+ "username",
329
+ "new-password",
330
+ "current-password",
331
+ "one-time-code",
332
+ "organization-title",
333
+ "organization",
334
+ "street-address",
335
+ "shipping",
336
+ "billing",
337
+ "address-line1",
338
+ "address-line2",
339
+ "address-line3",
340
+ "address-level4",
341
+ "address-level3",
342
+ "address-level2",
343
+ "address-level1",
344
+ "country",
345
+ "country-name",
346
+ "postal-code",
347
+ "cc-name",
348
+ "cc-given-name",
349
+ "cc-additional-name",
350
+ "cc-family-name",
351
+ "cc-number",
352
+ "cc-exp",
353
+ "cc-exp-month",
354
+ "cc-exp-year",
355
+ "cc-csc",
356
+ "cc-type",
357
+ "transaction-currency",
358
+ "transaction-amount",
359
+ "language",
360
+ "bday",
361
+ "bday-day",
362
+ "bday-month",
363
+ "bday-year",
364
+ "sex",
365
+ "tel",
366
+ "tel-country-code",
367
+ "tel-national",
368
+ "tel-area-code",
369
+ "tel-local",
370
+ "tel-local-suffix",
371
+ "tel-local-prefix",
372
+ "tel-extension",
373
+ "impp",
374
+ "url",
375
+ "photo",
376
+ "webauthn"
377
+ ]
378
+ };
379
+ }
380
+ function createValidationBehaviorProp() {
381
+ return {
382
+ type: "choice",
383
+ options: ["native", "aria"],
384
+ description: "Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA.",
385
+ defaultValueHint: "native",
386
+ advanced: true,
387
+ hidden: hasParent
388
+ };
389
+ }
390
+ function createOnChangeProp(argType = "string") {
391
+ return {
392
+ type: "eventHandler",
393
+ argTypes: [{ name: "value", type: argType }],
394
+ hidden: hasParent
395
+ };
396
+ }
397
+ function createOnFocusProp() {
398
+ return {
399
+ type: "eventHandler",
400
+ argTypes: [{ name: "focusEvent", type: "object" }],
401
+ advanced: true,
402
+ hidden: hasParent
403
+ };
404
+ }
405
+ function createOnBlurProp() {
406
+ return {
407
+ type: "eventHandler",
408
+ argTypes: [{ name: "focusEvent", type: "object" }],
409
+ advanced: true,
410
+ hidden: hasParent
411
+ };
412
+ }
413
+ function createOnFocusChangeProp() {
414
+ return {
415
+ type: "eventHandler",
416
+ argTypes: [{ name: "isFocused", type: "boolean" }],
417
+ advanced: true,
418
+ hidden: hasParent
419
+ };
420
+ }
421
+ function createOnKeyDownProp() {
422
+ return {
423
+ type: "eventHandler",
424
+ argTypes: [{ name: "keyboardEvent", type: "object" }],
425
+ advanced: true,
426
+ hidden: hasParent
427
+ };
428
+ }
429
+ function createOnKeyUpProp() {
430
+ return {
431
+ type: "eventHandler",
432
+ argTypes: [{ name: "keyboardEvent", type: "object" }],
433
+ advanced: true,
434
+ hidden: hasParent
435
+ };
436
+ }
437
+ function createOnCopyProp() {
438
+ return {
439
+ type: "eventHandler",
440
+ argTypes: [{ name: "clipbordEvent", type: "object" }],
441
+ advanced: true,
442
+ hidden: hasParent
443
+ };
444
+ }
445
+ function createOnCutProp() {
446
+ return {
447
+ type: "eventHandler",
448
+ argTypes: [{ name: "clipbordEvent", type: "object" }],
449
+ advanced: true,
450
+ hidden: hasParent
451
+ };
452
+ }
453
+ function createOnPasteProp() {
454
+ return {
455
+ type: "eventHandler",
456
+ argTypes: [{ name: "clipbordEvent", type: "object" }],
457
+ advanced: true,
458
+ hidden: hasParent
459
+ };
460
+ }
461
+ function createOnCompositionStartProp() {
462
+ return {
463
+ type: "eventHandler",
464
+ argTypes: [{ name: "compositionEvent", type: "object" }],
465
+ advanced: true,
466
+ hidden: hasParent
467
+ };
468
+ }
469
+ function createOnCompositionEndProp() {
470
+ return {
471
+ type: "eventHandler",
472
+ argTypes: [{ name: "compositionEvent", type: "object" }],
473
+ advanced: true,
474
+ hidden: hasParent
475
+ };
476
+ }
477
+ function createOnCompositionUpdateProp() {
478
+ return {
479
+ type: "eventHandler",
480
+ argTypes: [{ name: "compositionEvent", type: "object" }],
481
+ advanced: true,
482
+ hidden: hasParent
483
+ };
484
+ }
485
+ function createOnSelectProp() {
486
+ return {
487
+ type: "eventHandler",
488
+ argTypes: [{ name: "selectionEvent", type: "object" }],
489
+ advanced: true,
490
+ hidden: hasParent
491
+ };
492
+ }
493
+ function createOnBeforeInputProp() {
494
+ return {
495
+ type: "eventHandler",
496
+ argTypes: [{ name: "inputEvent", type: "object" }],
497
+ advanced: true,
498
+ hidden: hasParent
499
+ };
500
+ }
501
+ function createOnInputProp() {
502
+ return {
503
+ type: "eventHandler",
504
+ argTypes: [{ name: "inputEvent", type: "object" }],
505
+ advanced: true,
506
+ hidden: hasParent
507
+ };
508
+ }
509
+ function createPlaceholderProp() {
510
+ return {
511
+ type: "string"
512
+ };
513
+ }
514
+ function createPlacementProp(componentName, overrides) {
515
+ return __spreadValues({
516
+ type: "choice",
517
+ description: `Default placement of the ${componentName} relative to the trigger, if there is enough space`,
518
+ options: [
519
+ "bottom",
520
+ "bottom left",
521
+ "bottom right",
522
+ "bottom start",
523
+ "bottom end",
524
+ "top",
525
+ "top left",
526
+ "top right",
527
+ "top start",
528
+ "top end",
529
+ "left",
530
+ "left top",
531
+ "left bottom",
532
+ "start",
533
+ "start top",
534
+ "start bottom",
535
+ "right",
536
+ "right top",
537
+ "right bottom",
538
+ "end",
539
+ "end top",
540
+ "end bottom"
541
+ ]
542
+ }, overrides != null ? overrides : {});
543
+ }
544
+ function createOffsetProp(componentName, overrides) {
545
+ return __spreadValues({
546
+ type: "number",
547
+ displayName: "Offset",
548
+ description: `Additional offset applied along the main axis between the ${componentName} and its trigger`,
549
+ advanced: true
550
+ }, overrides != null ? overrides : {});
551
+ }
552
+ function createContainerPaddingProp(componentName, overrides) {
553
+ return __spreadValues({
554
+ type: "number",
555
+ description: `The padding that should be applied between the ${componentName} and its surrounding container. This affects the positioning breakpoints that determine when it will attempt to flip.`,
556
+ advanced: true
557
+ }, overrides != null ? overrides : {});
558
+ }
559
+ function createCrossOffsetProp(componentName, overrides) {
560
+ return __spreadValues({
561
+ type: "number",
562
+ description: `The additional offset applied along the cross axis between the ${componentName} and its anchor element.`,
563
+ advanced: true
564
+ }, overrides != null ? overrides : {});
565
+ }
566
+ function getCommonOverlayProps(componentName, overrides) {
567
+ const commonProps = {
568
+ placement: createPlacementProp(componentName, overrides["placement"]),
569
+ offset: createOffsetProp(componentName, overrides["offset"]),
570
+ containerPadding: createContainerPaddingProp(
571
+ componentName,
572
+ overrides["containerPadding"]
573
+ ),
574
+ crossOffset: createCrossOffsetProp(
575
+ componentName,
576
+ overrides["crossOffset"]
577
+ )
578
+ };
579
+ return commonProps;
580
+ }
581
+ const arrowDown = {
582
+ type: "hbox",
583
+ children: [],
584
+ styles: {
585
+ width: 0,
586
+ height: 0,
587
+ padding: 0,
588
+ borderLeftWidth: "5px",
589
+ borderRightWidth: "5px",
590
+ borderTopWidth: "5px",
591
+ borderLeftStyle: "solid",
592
+ borderRightStyle: "solid",
593
+ borderTopStyle: "solid",
594
+ borderLeftColor: "transparent",
595
+ borderRightColor: "transparent",
596
+ borderTopColor: "black"
597
+ }
598
+ };
599
+ const COMMON_STYLES = { boxSizing: "border-box" };
600
+ function commonInputEventHandlerProps() {
601
+ return {
602
+ // Events supported uniformly by all three
603
+ onChange: createOnChangeProp("string"),
604
+ onFocus: createOnFocusProp(),
605
+ onBlur: createOnBlurProp(),
606
+ onKeyDown: createOnKeyDownProp(),
607
+ onKeyUp: createOnKeyUpProp(),
608
+ onCopy: createOnCopyProp(),
609
+ onCut: createOnCutProp(),
610
+ onPaste: createOnPasteProp(),
611
+ onCompositionStart: createOnCompositionStartProp(),
612
+ onCompositionEnd: createOnCompositionEndProp(),
613
+ onCompositionUpdate: createOnCompositionUpdateProp(),
614
+ onSelect: createOnSelectProp(),
615
+ onBeforeInput: createOnBeforeInputProp(),
616
+ onInput: createOnInputProp()
617
+ };
618
+ }
619
+
620
+ export { createInputTypeProp as A, createAutoCompleteProp as B, COMMON_STYLES as C, createPatternProp as D, createValidationBehaviorProp as E, createOnFocusChangeProp as F, createNameProp as a, createDisabledProp as b, createIdProp as c, createReadOnlyProp as d, createRequiredProp as e, createAriaLabelProp as f, createAutoFocusProp as g, hasParent as h, arrowDown as i, useIsOpen as j, makeChildComponentName as k, extractPlasmicDataProps as l, makeComponentName as m, getCommonOverlayProps as n, useIsomorphicLayoutEffect as o, isDefined as p, filterHoverProps as q, registerComponentHelper as r, commonInputEventHandlerProps as s, createPlaceholderProp as t, useAutoOpen as u, createInitialValueProp as v, createMaxLengthProp as w, createMinLengthProp as x, createInputModeProp as y, resolveAutoComplete as z };
621
+ //# sourceMappingURL=common-81f08e86.esm.js.map