@plasmicpkgs/react-aria 0.0.24 → 0.0.26

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 (104) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/contexts.d.ts +1 -1
  3. package/dist/interaction-variant-utils.d.ts +31 -0
  4. package/dist/react-aria.esm.js +308 -215
  5. package/dist/react-aria.esm.js.map +1 -1
  6. package/dist/react-aria.js +307 -214
  7. package/dist/react-aria.js.map +1 -1
  8. package/dist/registerButton.d.ts +4 -1
  9. package/dist/registerCheckbox.d.ts +4 -2
  10. package/dist/registerInput.d.ts +7 -1
  11. package/dist/registerRadio.d.ts +6 -4
  12. package/dist/registerRadioGroup.d.ts +2 -6
  13. package/dist/registerSwitch.d.ts +9 -2
  14. package/dist/registerTextArea.d.ts +7 -1
  15. package/dist/registerTextField.d.ts +1 -1
  16. package/dist/utils.d.ts +0 -1
  17. package/package.json +3 -3
  18. package/skinny/contexts.d.ts +1 -1
  19. package/skinny/interaction-variant-utils-608d984b.esm.js +39 -0
  20. package/skinny/interaction-variant-utils-608d984b.esm.js.map +1 -0
  21. package/skinny/interaction-variant-utils-80bf1cfd.cjs.js +45 -0
  22. package/skinny/interaction-variant-utils-80bf1cfd.cjs.js.map +1 -0
  23. package/skinny/interaction-variant-utils.d.ts +31 -0
  24. package/skinny/registerButton.cjs.js +32 -50
  25. package/skinny/registerButton.cjs.js.map +1 -1
  26. package/skinny/registerButton.d.ts +4 -1
  27. package/skinny/registerButton.esm.js +32 -50
  28. package/skinny/registerButton.esm.js.map +1 -1
  29. package/skinny/registerCheckbox.cjs.js +22 -44
  30. package/skinny/registerCheckbox.cjs.js.map +1 -1
  31. package/skinny/registerCheckbox.d.ts +4 -2
  32. package/skinny/registerCheckbox.esm.js +22 -44
  33. package/skinny/registerCheckbox.esm.js.map +1 -1
  34. package/skinny/registerCheckboxGroup.cjs.js +2 -1
  35. package/skinny/registerCheckboxGroup.cjs.js.map +1 -1
  36. package/skinny/registerCheckboxGroup.esm.js +2 -1
  37. package/skinny/registerCheckboxGroup.esm.js.map +1 -1
  38. package/skinny/registerComboBox.cjs.js +1 -1
  39. package/skinny/registerComboBox.esm.js +1 -1
  40. package/skinny/registerDescription.cjs.js +1 -1
  41. package/skinny/registerDescription.esm.js +1 -1
  42. package/skinny/registerFieldError.cjs.js +1 -1
  43. package/skinny/registerFieldError.esm.js +1 -1
  44. package/skinny/registerForm.cjs.js +1 -1
  45. package/skinny/registerForm.esm.js +1 -1
  46. package/skinny/registerHeader.cjs.js +1 -1
  47. package/skinny/registerHeader.esm.js +1 -1
  48. package/skinny/registerInput.cjs.js +40 -2
  49. package/skinny/registerInput.cjs.js.map +1 -1
  50. package/skinny/registerInput.d.ts +7 -1
  51. package/skinny/registerInput.esm.js +40 -2
  52. package/skinny/registerInput.esm.js.map +1 -1
  53. package/skinny/registerLabel.cjs.js +1 -2
  54. package/skinny/registerLabel.cjs.js.map +1 -1
  55. package/skinny/registerLabel.esm.js +1 -2
  56. package/skinny/registerLabel.esm.js.map +1 -1
  57. package/skinny/registerListBox.cjs.js +1 -1
  58. package/skinny/registerListBox.esm.js +1 -1
  59. package/skinny/registerListBoxItem.cjs.js +1 -1
  60. package/skinny/registerListBoxItem.esm.js +1 -1
  61. package/skinny/registerModal.cjs.js +1 -1
  62. package/skinny/registerModal.esm.js +1 -1
  63. package/skinny/registerPopover.cjs.js +1 -1
  64. package/skinny/registerPopover.esm.js +1 -1
  65. package/skinny/registerRadio.cjs.js +21 -55
  66. package/skinny/registerRadio.cjs.js.map +1 -1
  67. package/skinny/registerRadio.d.ts +6 -4
  68. package/skinny/registerRadio.esm.js +21 -55
  69. package/skinny/registerRadio.esm.js.map +1 -1
  70. package/skinny/registerRadioGroup.cjs.js +4 -31
  71. package/skinny/registerRadioGroup.cjs.js.map +1 -1
  72. package/skinny/registerRadioGroup.d.ts +2 -6
  73. package/skinny/registerRadioGroup.esm.js +4 -27
  74. package/skinny/registerRadioGroup.esm.js.map +1 -1
  75. package/skinny/registerSection.cjs.js +1 -1
  76. package/skinny/registerSection.esm.js +1 -1
  77. package/skinny/registerSelect.cjs.js +1 -1
  78. package/skinny/registerSelect.esm.js +1 -1
  79. package/skinny/registerSwitch.cjs.js +42 -12
  80. package/skinny/registerSwitch.cjs.js.map +1 -1
  81. package/skinny/registerSwitch.d.ts +9 -2
  82. package/skinny/registerSwitch.esm.js +38 -12
  83. package/skinny/registerSwitch.esm.js.map +1 -1
  84. package/skinny/registerText.cjs.js +1 -1
  85. package/skinny/registerText.esm.js +1 -1
  86. package/skinny/registerTextArea.cjs.js +61 -2
  87. package/skinny/registerTextArea.cjs.js.map +1 -1
  88. package/skinny/registerTextArea.d.ts +7 -1
  89. package/skinny/registerTextArea.esm.js +61 -2
  90. package/skinny/registerTextArea.esm.js.map +1 -1
  91. package/skinny/registerTextField.cjs.js +54 -6
  92. package/skinny/registerTextField.cjs.js.map +1 -1
  93. package/skinny/registerTextField.d.ts +1 -1
  94. package/skinny/registerTextField.esm.js +54 -6
  95. package/skinny/registerTextField.esm.js.map +1 -1
  96. package/skinny/registerTooltip.cjs.js +1 -1
  97. package/skinny/registerTooltip.esm.js +1 -1
  98. package/skinny/{utils-1190a0a9.cjs.js → utils-18b2465b.cjs.js} +2 -12
  99. package/skinny/utils-18b2465b.cjs.js.map +1 -0
  100. package/skinny/{utils-28f98072.esm.js → utils-cf2632c9.esm.js} +3 -12
  101. package/skinny/utils-cf2632c9.esm.js.map +1 -0
  102. package/skinny/utils.d.ts +0 -1
  103. package/skinny/utils-1190a0a9.cjs.js.map +0 -1
  104. package/skinny/utils-28f98072.esm.js.map +0 -1
@@ -8,8 +8,9 @@ var registerFieldError = require('./registerFieldError.cjs.js');
8
8
  var registerInput = require('./registerInput.cjs.js');
9
9
  var registerLabel = require('./registerLabel.cjs.js');
10
10
  var registerTextArea = require('./registerTextArea.cjs.js');
11
- var utils = require('./utils-1190a0a9.cjs.js');
11
+ var utils = require('./utils-18b2465b.cjs.js');
12
12
  require('./registerText.cjs.js');
13
+ require('./interaction-variant-utils-80bf1cfd.cjs.js');
13
14
  require('@plasmicapp/host/registerComponent');
14
15
 
15
16
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -220,9 +221,61 @@ function registerTextField(loader, overrides) {
220
221
  type: "eventHandler",
221
222
  argTypes: [{ name: "value", type: "string" }]
222
223
  },
224
+ onFocus: {
225
+ type: "eventHandler",
226
+ argTypes: [{ name: "focusEvent", type: "object" }]
227
+ },
228
+ onBlur: {
229
+ type: "eventHandler",
230
+ argTypes: [{ name: "focusEvent", type: "object" }]
231
+ },
223
232
  onFocusChange: {
224
233
  type: "eventHandler",
225
234
  argTypes: [{ name: "isFocused", type: "boolean" }]
235
+ },
236
+ onKeyDown: {
237
+ type: "eventHandler",
238
+ argTypes: [{ name: "keyboardEvent", type: "object" }]
239
+ },
240
+ onKeyUp: {
241
+ type: "eventHandler",
242
+ argTypes: [{ name: "keyboardEvent", type: "object" }]
243
+ },
244
+ onCopy: {
245
+ type: "eventHandler",
246
+ argTypes: [{ name: "clipbordEvent", type: "object" }]
247
+ },
248
+ onCut: {
249
+ type: "eventHandler",
250
+ argTypes: [{ name: "clipbordEvent", type: "object" }]
251
+ },
252
+ onPaste: {
253
+ type: "eventHandler",
254
+ argTypes: [{ name: "clipbordEvent", type: "object" }]
255
+ },
256
+ onCompositionStart: {
257
+ type: "eventHandler",
258
+ argTypes: [{ name: "compositionEvent", type: "object" }]
259
+ },
260
+ onCompositionEnd: {
261
+ type: "eventHandler",
262
+ argTypes: [{ name: "compositionEvent", type: "object" }]
263
+ },
264
+ onCompositionUpdate: {
265
+ type: "eventHandler",
266
+ argTypes: [{ name: "compositionEvent", type: "object" }]
267
+ },
268
+ onSelect: {
269
+ type: "eventHandler",
270
+ argTypes: [{ name: "selectionEvent", type: "object" }]
271
+ },
272
+ onBeforeInput: {
273
+ type: "eventHandler",
274
+ argTypes: [{ name: "inputEvent", type: "object" }]
275
+ },
276
+ onInput: {
277
+ type: "eventHandler",
278
+ argTypes: [{ name: "inputEvent", type: "object" }]
226
279
  }
227
280
  }),
228
281
  // NOTE: React-Aria does not support render props for <Input> and <Textarea>, so focusVisible and inputHovered states are not implemented
@@ -232,11 +285,6 @@ function registerTextField(loader, overrides) {
232
285
  valueProp: "value",
233
286
  onChangeProp: "onChange",
234
287
  variableType: "text"
235
- },
236
- isFocused: {
237
- type: "readonly",
238
- onChangeProp: "onFocusChange",
239
- variableType: "boolean"
240
288
  }
241
289
  },
242
290
  trapsFocus: true
@@ -1 +1 @@
1
- {"version":3,"file":"registerTextField.cjs.js","sources":["../src/registerTextField.tsx"],"sourcesContent":["import React, { ReactNode } from \"react\";\nimport type { InputProps, TextFieldProps } from \"react-aria-components\";\nimport { TextField } from \"react-aria-components\";\nimport { getCommonInputProps } from \"./common\";\nimport { registerDescription } from \"./registerDescription\";\nimport { registerFieldError } from \"./registerFieldError\";\nimport { registerInput } from \"./registerInput\";\nimport { registerLabel } from \"./registerLabel\";\nimport { registerTextArea } from \"./registerTextArea\";\nimport {\n CodeComponentMetaOverrides,\n makeChildComponentName,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\ninterface BaseTextFieldProps extends TextFieldProps {\n children?: ReactNode;\n label?: ReactNode;\n description?: ReactNode;\n enableAutoComplete?: boolean;\n multiline?: boolean;\n inputProps?: InputProps;\n}\n\nexport function BaseTextField(props: BaseTextFieldProps) {\n const { enableAutoComplete, autoComplete, children, ...rest } = props;\n\n return (\n <TextField\n autoComplete={enableAutoComplete ? autoComplete : undefined}\n {...rest}\n >\n {children}\n </TextField>\n );\n}\n\nconst componentName = makeComponentName(\"textField\");\n\nexport function registerTextField(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseTextField>\n) {\n registerComponentHelper(\n loader,\n BaseTextField,\n {\n name: componentName,\n displayName: \"Aria TextField\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerTextField\",\n importName: \"BaseTextField\",\n // TODO: Support for validate prop\n props: {\n ...getCommonInputProps<BaseTextFieldProps>(\"input\", [\n \"name\",\n \"isDisabled\",\n \"isReadOnly\",\n \"autoFocus\",\n \"aria-label\",\n \"children\",\n \"isRequired\",\n ]),\n value: {\n type: \"string\",\n editOnly: true,\n uncontrolledProp: \"defaultValue\",\n description: \"The current value\",\n },\n isInvalid: {\n // TODO: Not sure if needed\n displayName: \"Invalid\",\n type: \"boolean\",\n description: \"Whether the input value is invalid\",\n defaultValueHint: false,\n },\n customValidationErrors: {\n // TODO: Not sure if needed\n type: \"array\",\n description: \"Errors for custom validation\",\n },\n // validate: {\n // type: \"function\" as const,\n // argNames: [\"value\"],\n // argValues: (_ps: any, ctx: any) => [ctx.data[0]],\n // },\n enableAutoComplete: {\n type: \"boolean\",\n description:\n \"Whether the browser is allowed to automatically complete the input\",\n defaultValueHint: false,\n },\n autoComplete: {\n type: \"choice\",\n hidden: ({ enableAutoComplete }: BaseTextFieldProps) =>\n !enableAutoComplete,\n description: \"Guidance as to the type of data expected in the field\",\n helpText:\n \"For explanations on what each of the values mean, check https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\",\n options: [\n \"name\",\n \"honorific-prefix\",\n \"given-name\",\n \"additional-name\",\n \"family-name\",\n \"honorific-suffix\",\n \"nickname\",\n \"email\",\n \"username\",\n \"new-password\",\n \"current-password\",\n \"one-time-code\",\n \"organization-title\",\n \"organization\",\n \"street-address\",\n \"shipping\",\n \"billing\",\n \"address-line1\",\n \"address-line2\",\n \"address-line3\",\n \"address-level4\",\n \"address-level3\",\n \"address-level2\",\n \"address-level1\",\n \"country\",\n \"country-name\",\n \"postal-code\",\n \"cc-name\",\n \"cc-given-name\",\n \"cc-additional-name\",\n \"cc-family-name\",\n \"cc-number\",\n \"cc-exp\",\n \"cc-exp-month\",\n \"cc-exp-year\",\n \"cc-csc\",\n \"cc-type\",\n \"transaction-currency\",\n \"transaction-amount\",\n \"language\",\n \"bday\",\n \"bday-day\",\n \"bday-month\",\n \"bday-year\",\n \"sex\",\n \"tel\",\n \"tel-country-code\",\n \"tel-national\",\n \"tel-area-code\",\n \"tel-local\",\n \"tel-local-suffix\",\n \"tel-local-prefix\",\n \"tel-extension\",\n \"impp\",\n \"url\",\n \"photo\",\n \"webauthn\",\n ],\n },\n maxLength: {\n type: \"number\",\n description:\n \"The maximum number of characters supported by the input\",\n },\n minLength: {\n type: \"number\",\n description:\n \"The minimum number of characters supported by the input\",\n },\n pattern: {\n type: \"string\",\n description:\n \"Regex pattern that the value of the input must match to be valid\",\n helpText:\n \"For more information about writing Regular Expressions (regex), check out https://regexr.com/\",\n validator: (value) => {\n try {\n new RegExp(value);\n return true;\n } catch (error) {\n return \"Invalid Regex\";\n }\n },\n },\n type: {\n type: \"choice\",\n defaultValueHint: \"text\",\n options: [\"text\", \"search\", \"url\", \"tel\", \"email\", \"password\"],\n },\n inputMode: {\n type: \"choice\",\n description:\n \"hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents.\",\n options: [\n \"none\",\n \"text\",\n \"tel\",\n \"url\",\n \"email\",\n \"numeric\",\n \"decimal\",\n \"search\",\n ],\n },\n validationBehavior: {\n type: \"choice\",\n options: [\"native\", \"aria\"],\n description:\n \"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.\",\n defaultValueHint: \"native\",\n },\n onChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"value\", type: \"string\" }],\n },\n onFocusChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isFocused\", type: \"boolean\" }],\n },\n },\n // NOTE: React-Aria does not support render props for <Input> and <Textarea>, so focusVisible and inputHovered states are not implemented\n states: {\n value: {\n type: \"writable\",\n valueProp: \"value\",\n onChangeProp: \"onChange\",\n variableType: \"text\",\n },\n isFocused: {\n type: \"readonly\",\n onChangeProp: \"onFocusChange\",\n variableType: \"boolean\",\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n\n const thisName = makeChildComponentName(\n overrides?.parentComponentName,\n componentName\n );\n\n registerFieldError(loader, { parentComponentName: thisName });\n registerInput(loader, { parentComponentName: thisName });\n registerLabel(loader, { parentComponentName: thisName });\n registerDescription(loader, { parentComponentName: thisName });\n registerTextArea(loader, { parentComponentName: thisName });\n}\n"],"names":["React","TextField","makeComponentName","registerComponentHelper","getCommonInputProps","makeChildComponentName","registerFieldError","registerInput","registerLabel","registerDescription","registerTextArea"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BO,SAAS,cAAc,KAA2B,EAAA;AACvD,EAAgE,MAAA,EAAA,GAAA,KAAA,EAAxD,EAAoB,kBAAA,EAAA,YAAA,EAAc,QA3B5C,EAAA,GA2BkE,IAAT,IAAS,GAAA,SAAA,CAAA,EAAA,EAAT,CAA/C,oBAAA,EAAoB,cAAc,EAAA,UAAA,CAAA,CAAA,CAAA;AAE1C,EACE,uBAAAA,sBAAA,CAAA,aAAA;AAAA,IAACC,6BAAA;AAAA,IAAA,cAAA,CAAA;AAAA,MACC,YAAA,EAAc,qBAAqB,YAAe,GAAA,KAAA,CAAA;AAAA,KAC9C,EAAA,IAAA,CAAA;AAAA,IAEH,QAAA;AAAA,GACH,CAAA;AAEJ,CAAA;AAEA,MAAM,aAAA,GAAgBC,wBAAkB,WAAW,CAAA,CAAA;AAEnC,SAAA,iBAAA,CACd,QACA,SACA,EAAA;AACA,EAAAC,6BAAA;AAAA,IACE,MAAA;AAAA,IACA,aAAA;AAAA,IACA;AAAA,MACE,IAAM,EAAA,aAAA;AAAA,MACN,WAAa,EAAA,gBAAA;AAAA,MACb,UAAY,EAAA,kDAAA;AAAA,MACZ,UAAY,EAAA,eAAA;AAAA;AAAA,MAEZ,KAAA,EAAO,aACF,CAAA,cAAA,CAAA,EAAA,EAAAC,0BAAA,CAAwC,OAAS,EAAA;AAAA,QAClD,MAAA;AAAA,QACA,YAAA;AAAA,QACA,YAAA;AAAA,QACA,WAAA;A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BAAA;AAAA,IACf,SAAW,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,CAAA,mBAAA;AAAA,IACX,aAAA;AAAA,GACF,CAAA;AAEA,EAAAC,qCAAA,CAAmB,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AAC5D,EAAAC,2BAAA,CAAc,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AACvD,EAAAC,2BAAA,CAAc,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AACvD,EAAAC,uCAAA,CAAoB,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AAC7D,EAAAC,iCAAA,CAAiB,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AAC5D;;;;;"}
1
+ {"version":3,"file":"registerTextField.cjs.js","sources":["../src/registerTextField.tsx"],"sourcesContent":["import React, { ReactNode } from \"react\";\nimport type { InputProps, TextFieldProps } from \"react-aria-components\";\nimport { TextField } from \"react-aria-components\";\nimport { getCommonInputProps } from \"./common\";\nimport { registerDescription } from \"./registerDescription\";\nimport { registerFieldError } from \"./registerFieldError\";\nimport { registerInput } from \"./registerInput\";\nimport { registerLabel } from \"./registerLabel\";\nimport { registerTextArea } from \"./registerTextArea\";\nimport {\n CodeComponentMetaOverrides,\n Registerable,\n makeChildComponentName,\n makeComponentName,\n registerComponentHelper,\n} from \"./utils\";\n\ninterface BaseTextFieldProps extends TextFieldProps {\n label?: ReactNode;\n description?: ReactNode;\n enableAutoComplete?: boolean;\n multiline?: boolean;\n inputProps?: InputProps;\n children: ReactNode;\n}\n\nexport function BaseTextField(props: BaseTextFieldProps) {\n const { enableAutoComplete, autoComplete, children, ...rest } = props;\n\n return (\n <TextField\n autoComplete={enableAutoComplete ? autoComplete : undefined}\n {...rest}\n >\n {children}\n </TextField>\n );\n}\n\nconst componentName = makeComponentName(\"textField\");\n\nexport function registerTextField(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseTextField>\n) {\n registerComponentHelper(\n loader,\n BaseTextField,\n {\n name: componentName,\n displayName: \"Aria TextField\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerTextField\",\n importName: \"BaseTextField\",\n // TODO: Support for validate prop\n props: {\n ...getCommonInputProps<BaseTextFieldProps>(\"input\", [\n \"name\",\n \"isDisabled\",\n \"isReadOnly\",\n \"autoFocus\",\n \"aria-label\",\n \"children\",\n \"isRequired\",\n ]),\n value: {\n type: \"string\",\n editOnly: true,\n uncontrolledProp: \"defaultValue\",\n description: \"The current value\",\n },\n isInvalid: {\n // TODO: Not sure if needed\n displayName: \"Invalid\",\n type: \"boolean\",\n description: \"Whether the input value is invalid\",\n defaultValueHint: false,\n },\n customValidationErrors: {\n // TODO: Not sure if needed\n type: \"array\",\n description: \"Errors for custom validation\",\n },\n // validate: {\n // type: \"function\" as const,\n // argNames: [\"value\"],\n // argValues: (_ps: any, ctx: any) => [ctx.data[0]],\n // },\n enableAutoComplete: {\n type: \"boolean\",\n description:\n \"Whether the browser is allowed to automatically complete the input\",\n defaultValueHint: false,\n },\n autoComplete: {\n type: \"choice\",\n hidden: ({ enableAutoComplete }: BaseTextFieldProps) =>\n !enableAutoComplete,\n description: \"Guidance as to the type of data expected in the field\",\n helpText:\n \"For explanations on what each of the values mean, check https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\",\n options: [\n \"name\",\n \"honorific-prefix\",\n \"given-name\",\n \"additional-name\",\n \"family-name\",\n \"honorific-suffix\",\n \"nickname\",\n \"email\",\n \"username\",\n \"new-password\",\n \"current-password\",\n \"one-time-code\",\n \"organization-title\",\n \"organization\",\n \"street-address\",\n \"shipping\",\n \"billing\",\n \"address-line1\",\n \"address-line2\",\n \"address-line3\",\n \"address-level4\",\n \"address-level3\",\n \"address-level2\",\n \"address-level1\",\n \"country\",\n \"country-name\",\n \"postal-code\",\n \"cc-name\",\n \"cc-given-name\",\n \"cc-additional-name\",\n \"cc-family-name\",\n \"cc-number\",\n \"cc-exp\",\n \"cc-exp-month\",\n \"cc-exp-year\",\n \"cc-csc\",\n \"cc-type\",\n \"transaction-currency\",\n \"transaction-amount\",\n \"language\",\n \"bday\",\n \"bday-day\",\n \"bday-month\",\n \"bday-year\",\n \"sex\",\n \"tel\",\n \"tel-country-code\",\n \"tel-national\",\n \"tel-area-code\",\n \"tel-local\",\n \"tel-local-suffix\",\n \"tel-local-prefix\",\n \"tel-extension\",\n \"impp\",\n \"url\",\n \"photo\",\n \"webauthn\",\n ],\n },\n maxLength: {\n type: \"number\",\n description:\n \"The maximum number of characters supported by the input\",\n },\n minLength: {\n type: \"number\",\n description:\n \"The minimum number of characters supported by the input\",\n },\n pattern: {\n type: \"string\",\n description:\n \"Regex pattern that the value of the input must match to be valid\",\n helpText:\n \"For more information about writing Regular Expressions (regex), check out https://regexr.com/\",\n validator: (value) => {\n try {\n new RegExp(value);\n return true;\n } catch (error) {\n return \"Invalid Regex\";\n }\n },\n },\n type: {\n type: \"choice\",\n defaultValueHint: \"text\",\n options: [\"text\", \"search\", \"url\", \"tel\", \"email\", \"password\"],\n },\n inputMode: {\n type: \"choice\",\n description:\n \"hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents.\",\n options: [\n \"none\",\n \"text\",\n \"tel\",\n \"url\",\n \"email\",\n \"numeric\",\n \"decimal\",\n \"search\",\n ],\n },\n validationBehavior: {\n type: \"choice\",\n options: [\"native\", \"aria\"],\n description:\n \"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.\",\n defaultValueHint: \"native\",\n },\n onChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"value\", type: \"string\" }],\n },\n onFocus: {\n type: \"eventHandler\",\n argTypes: [{ name: \"focusEvent\", type: \"object\" }],\n },\n onBlur: {\n type: \"eventHandler\",\n argTypes: [{ name: \"focusEvent\", type: \"object\" }],\n },\n onFocusChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isFocused\", type: \"boolean\" }],\n },\n onKeyDown: {\n type: \"eventHandler\",\n argTypes: [{ name: \"keyboardEvent\", type: \"object\" }],\n },\n onKeyUp: {\n type: \"eventHandler\",\n argTypes: [{ name: \"keyboardEvent\", type: \"object\" }],\n },\n onCopy: {\n type: \"eventHandler\",\n argTypes: [{ name: \"clipbordEvent\", type: \"object\" }],\n },\n onCut: {\n type: \"eventHandler\",\n argTypes: [{ name: \"clipbordEvent\", type: \"object\" }],\n },\n onPaste: {\n type: \"eventHandler\",\n argTypes: [{ name: \"clipbordEvent\", type: \"object\" }],\n },\n onCompositionStart: {\n type: \"eventHandler\",\n argTypes: [{ name: \"compositionEvent\", type: \"object\" }],\n },\n onCompositionEnd: {\n type: \"eventHandler\",\n argTypes: [{ name: \"compositionEvent\", type: \"object\" }],\n },\n onCompositionUpdate: {\n type: \"eventHandler\",\n argTypes: [{ name: \"compositionEvent\", type: \"object\" }],\n },\n onSelect: {\n type: \"eventHandler\",\n argTypes: [{ name: \"selectionEvent\", type: \"object\" }],\n },\n onBeforeInput: {\n type: \"eventHandler\",\n argTypes: [{ name: \"inputEvent\", type: \"object\" }],\n },\n onInput: {\n type: \"eventHandler\",\n argTypes: [{ name: \"inputEvent\", type: \"object\" }],\n },\n },\n // NOTE: React-Aria does not support render props for <Input> and <Textarea>, so focusVisible and inputHovered states are not implemented\n states: {\n value: {\n type: \"writable\",\n valueProp: \"value\",\n onChangeProp: \"onChange\",\n variableType: \"text\",\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n\n const thisName = makeChildComponentName(\n overrides?.parentComponentName,\n componentName\n );\n\n registerFieldError(loader, { parentComponentName: thisName });\n registerInput(loader, { parentComponentName: thisName });\n registerLabel(loader, { parentComponentName: thisName });\n registerDescription(loader, { parentComponentName: thisName });\n registerTextArea(loader, { parentComponentName: thisName });\n}\n"],"names":["React","TextField","makeComponentName","registerComponentHelper","getCommonInputProps","makeChildComponentName","registerFieldError","registerInput","registerLabel","registerDescription","registerTextArea"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BO,SAAS,cAAc,KAA2B,EAAA;AACvD,EAAgE,MAAA,EAAA,GAAA,KAAA,EAAxD,EAAoB,kBAAA,EAAA,YAAA,EAAc,QA3B5C,EAAA,GA2BkE,IAAT,IAAS,GAAA,SAAA,CAAA,EAAA,EAAT,CAA/C,oBAAA,EAAoB,cAAc,EAAA,UAAA,CAAA,CAAA,CAAA;AAE1C,EACE,uBAAAA,sBAAA,CAAA,aAAA;AAAA,IAACC,6BAAA;AAAA,IAAA,cAAA,CAAA;AAAA,MACC,YAAA,EAAc,qBAAqB,YAAe,GAAA,KAAA,CAAA;AAAA,KAC9C,EAAA,IAAA,CAAA;AAAA,IAEH,QAAA;AAAA,GACH,CAAA;AAEJ,CAAA;AAEA,MAAM,aAAA,GAAgBC,wBAAkB,WAAW,CAAA,CAAA;AAEnC,SAAA,iBAAA,CACd,QACA,SACA,EAAA;AACA,EAAAC,6BAAA;AAAA,IACE,MAAA;AAAA,IACA,aAAA;AAAA,IACA;AAAA,MACE,IAAM,EAAA,aAAA;AAAA,MACN,WAAa,EAAA,gBAAA;AAAA,MACb,UAAY,EAAA,kDAAA;AAAA,MACZ,UAAY,EAAA,eAAA;AAAA;AAAA,MAEZ,KAAA,EAAO,aACF,CAAA,cAAA,CAAA,EAAA,EAAAC,0BAAA,CAAwC,OAAS,EAAA;AAAA,QAClD,MAAA;AAAA,QACA,YAAA;AAAA,QACA,YAAA;AAAA,QACA,WAAA;AAAA,QACA,YAAA;AAAA,QACA,UAAA;AAAA,QACA,YAAA;AAAA,OACD,CATI,CAAA,EAAA;AAAA,QAUL,KAAO,EAAA;AAAA,UACL,IAAM,EAAA,QAAA;AAAA,UACN,QAAU,EAAA,IAAA;AAAA,UACV,gBAAkB,EAAA,cAAA;AAAA,UAClB,WAAa,EAAA,mBAAA;AAAA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W,EAAA,OAAA;AAAA,UACX,YAAc,EAAA,UAAA;AAAA,UACd,YAAc,EAAA,MAAA;AAAA,SAChB;AAAA,OACF;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AAEA,EAAA,MAAM,QAAW,GAAAC,4BAAA;AAAA,IACf,SAAW,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,CAAA,mBAAA;AAAA,IACX,aAAA;AAAA,GACF,CAAA;AAEA,EAAAC,qCAAA,CAAmB,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AAC5D,EAAAC,2BAAA,CAAc,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AACvD,EAAAC,2BAAA,CAAc,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AACvD,EAAAC,uCAAA,CAAoB,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AAC7D,EAAAC,iCAAA,CAAiB,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AAC5D;;;;;"}
@@ -2,12 +2,12 @@ import React, { ReactNode } from "react";
2
2
  import type { InputProps, TextFieldProps } from "react-aria-components";
3
3
  import { CodeComponentMetaOverrides, Registerable } from "./utils";
4
4
  interface BaseTextFieldProps extends TextFieldProps {
5
- children?: ReactNode;
6
5
  label?: ReactNode;
7
6
  description?: ReactNode;
8
7
  enableAutoComplete?: boolean;
9
8
  multiline?: boolean;
10
9
  inputProps?: InputProps;
10
+ children: ReactNode;
11
11
  }
12
12
  export declare function BaseTextField(props: BaseTextFieldProps): React.JSX.Element;
13
13
  export declare function registerTextField(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseTextField>): void;
@@ -6,8 +6,9 @@ import { registerFieldError } from './registerFieldError.esm.js';
6
6
  import { registerInput } from './registerInput.esm.js';
7
7
  import { registerLabel } from './registerLabel.esm.js';
8
8
  import { registerTextArea } from './registerTextArea.esm.js';
9
- import { r as registerComponentHelper, a as makeChildComponentName, m as makeComponentName } from './utils-28f98072.esm.js';
9
+ import { r as registerComponentHelper, a as makeChildComponentName, m as makeComponentName } from './utils-cf2632c9.esm.js';
10
10
  import './registerText.esm.js';
11
+ import './interaction-variant-utils-608d984b.esm.js';
11
12
  import '@plasmicapp/host/registerComponent';
12
13
 
13
14
  var __defProp = Object.defineProperty;
@@ -214,9 +215,61 @@ function registerTextField(loader, overrides) {
214
215
  type: "eventHandler",
215
216
  argTypes: [{ name: "value", type: "string" }]
216
217
  },
218
+ onFocus: {
219
+ type: "eventHandler",
220
+ argTypes: [{ name: "focusEvent", type: "object" }]
221
+ },
222
+ onBlur: {
223
+ type: "eventHandler",
224
+ argTypes: [{ name: "focusEvent", type: "object" }]
225
+ },
217
226
  onFocusChange: {
218
227
  type: "eventHandler",
219
228
  argTypes: [{ name: "isFocused", type: "boolean" }]
229
+ },
230
+ onKeyDown: {
231
+ type: "eventHandler",
232
+ argTypes: [{ name: "keyboardEvent", type: "object" }]
233
+ },
234
+ onKeyUp: {
235
+ type: "eventHandler",
236
+ argTypes: [{ name: "keyboardEvent", type: "object" }]
237
+ },
238
+ onCopy: {
239
+ type: "eventHandler",
240
+ argTypes: [{ name: "clipbordEvent", type: "object" }]
241
+ },
242
+ onCut: {
243
+ type: "eventHandler",
244
+ argTypes: [{ name: "clipbordEvent", type: "object" }]
245
+ },
246
+ onPaste: {
247
+ type: "eventHandler",
248
+ argTypes: [{ name: "clipbordEvent", type: "object" }]
249
+ },
250
+ onCompositionStart: {
251
+ type: "eventHandler",
252
+ argTypes: [{ name: "compositionEvent", type: "object" }]
253
+ },
254
+ onCompositionEnd: {
255
+ type: "eventHandler",
256
+ argTypes: [{ name: "compositionEvent", type: "object" }]
257
+ },
258
+ onCompositionUpdate: {
259
+ type: "eventHandler",
260
+ argTypes: [{ name: "compositionEvent", type: "object" }]
261
+ },
262
+ onSelect: {
263
+ type: "eventHandler",
264
+ argTypes: [{ name: "selectionEvent", type: "object" }]
265
+ },
266
+ onBeforeInput: {
267
+ type: "eventHandler",
268
+ argTypes: [{ name: "inputEvent", type: "object" }]
269
+ },
270
+ onInput: {
271
+ type: "eventHandler",
272
+ argTypes: [{ name: "inputEvent", type: "object" }]
220
273
  }
221
274
  }),
222
275
  // NOTE: React-Aria does not support render props for <Input> and <Textarea>, so focusVisible and inputHovered states are not implemented
@@ -226,11 +279,6 @@ function registerTextField(loader, overrides) {
226
279
  valueProp: "value",
227
280
  onChangeProp: "onChange",
228
281
  variableType: "text"
229
- },
230
- isFocused: {
231
- type: "readonly",
232
- onChangeProp: "onFocusChange",
233
- variableType: "boolean"
234
282
  }
235
283
  },
236
284
  trapsFocus: true
@@ -1 +1 @@
1
- {"version":3,"file":"registerTextField.esm.js","sources":["../src/registerTextField.tsx"],"sourcesContent":["import React, { ReactNode } from \"react\";\nimport type { InputProps, TextFieldProps } from \"react-aria-components\";\nimport { TextField } from \"react-aria-components\";\nimport { getCommonInputProps } from \"./common\";\nimport { registerDescription } from \"./registerDescription\";\nimport { registerFieldError } from \"./registerFieldError\";\nimport { registerInput } from \"./registerInput\";\nimport { registerLabel } from \"./registerLabel\";\nimport { registerTextArea } from \"./registerTextArea\";\nimport {\n CodeComponentMetaOverrides,\n makeChildComponentName,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\ninterface BaseTextFieldProps extends TextFieldProps {\n children?: ReactNode;\n label?: ReactNode;\n description?: ReactNode;\n enableAutoComplete?: boolean;\n multiline?: boolean;\n inputProps?: InputProps;\n}\n\nexport function BaseTextField(props: BaseTextFieldProps) {\n const { enableAutoComplete, autoComplete, children, ...rest } = props;\n\n return (\n <TextField\n autoComplete={enableAutoComplete ? autoComplete : undefined}\n {...rest}\n >\n {children}\n </TextField>\n );\n}\n\nconst componentName = makeComponentName(\"textField\");\n\nexport function registerTextField(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseTextField>\n) {\n registerComponentHelper(\n loader,\n BaseTextField,\n {\n name: componentName,\n displayName: \"Aria TextField\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerTextField\",\n importName: \"BaseTextField\",\n // TODO: Support for validate prop\n props: {\n ...getCommonInputProps<BaseTextFieldProps>(\"input\", [\n \"name\",\n \"isDisabled\",\n \"isReadOnly\",\n \"autoFocus\",\n \"aria-label\",\n \"children\",\n \"isRequired\",\n ]),\n value: {\n type: \"string\",\n editOnly: true,\n uncontrolledProp: \"defaultValue\",\n description: \"The current value\",\n },\n isInvalid: {\n // TODO: Not sure if needed\n displayName: \"Invalid\",\n type: \"boolean\",\n description: \"Whether the input value is invalid\",\n defaultValueHint: false,\n },\n customValidationErrors: {\n // TODO: Not sure if needed\n type: \"array\",\n description: \"Errors for custom validation\",\n },\n // validate: {\n // type: \"function\" as const,\n // argNames: [\"value\"],\n // argValues: (_ps: any, ctx: any) => [ctx.data[0]],\n // },\n enableAutoComplete: {\n type: \"boolean\",\n description:\n \"Whether the browser is allowed to automatically complete the input\",\n defaultValueHint: false,\n },\n autoComplete: {\n type: \"choice\",\n hidden: ({ enableAutoComplete }: BaseTextFieldProps) =>\n !enableAutoComplete,\n description: \"Guidance as to the type of data expected in the field\",\n helpText:\n \"For explanations on what each of the values mean, check https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\",\n options: [\n \"name\",\n \"honorific-prefix\",\n \"given-name\",\n \"additional-name\",\n \"family-name\",\n \"honorific-suffix\",\n \"nickname\",\n \"email\",\n \"username\",\n \"new-password\",\n \"current-password\",\n \"one-time-code\",\n \"organization-title\",\n \"organization\",\n \"street-address\",\n \"shipping\",\n \"billing\",\n \"address-line1\",\n \"address-line2\",\n \"address-line3\",\n \"address-level4\",\n \"address-level3\",\n \"address-level2\",\n \"address-level1\",\n \"country\",\n \"country-name\",\n \"postal-code\",\n \"cc-name\",\n \"cc-given-name\",\n \"cc-additional-name\",\n \"cc-family-name\",\n \"cc-number\",\n \"cc-exp\",\n \"cc-exp-month\",\n \"cc-exp-year\",\n \"cc-csc\",\n \"cc-type\",\n \"transaction-currency\",\n \"transaction-amount\",\n \"language\",\n \"bday\",\n \"bday-day\",\n \"bday-month\",\n \"bday-year\",\n \"sex\",\n \"tel\",\n \"tel-country-code\",\n \"tel-national\",\n \"tel-area-code\",\n \"tel-local\",\n \"tel-local-suffix\",\n \"tel-local-prefix\",\n \"tel-extension\",\n \"impp\",\n \"url\",\n \"photo\",\n \"webauthn\",\n ],\n },\n maxLength: {\n type: \"number\",\n description:\n \"The maximum number of characters supported by the input\",\n },\n minLength: {\n type: \"number\",\n description:\n \"The minimum number of characters supported by the input\",\n },\n pattern: {\n type: \"string\",\n description:\n \"Regex pattern that the value of the input must match to be valid\",\n helpText:\n \"For more information about writing Regular Expressions (regex), check out https://regexr.com/\",\n validator: (value) => {\n try {\n new RegExp(value);\n return true;\n } catch (error) {\n return \"Invalid Regex\";\n }\n },\n },\n type: {\n type: \"choice\",\n defaultValueHint: \"text\",\n options: [\"text\", \"search\", \"url\", \"tel\", \"email\", \"password\"],\n },\n inputMode: {\n type: \"choice\",\n description:\n \"hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents.\",\n options: [\n \"none\",\n \"text\",\n \"tel\",\n \"url\",\n \"email\",\n \"numeric\",\n \"decimal\",\n \"search\",\n ],\n },\n validationBehavior: {\n type: \"choice\",\n options: [\"native\", \"aria\"],\n description:\n \"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.\",\n defaultValueHint: \"native\",\n },\n onChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"value\", type: \"string\" }],\n },\n onFocusChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isFocused\", type: \"boolean\" }],\n },\n },\n // NOTE: React-Aria does not support render props for <Input> and <Textarea>, so focusVisible and inputHovered states are not implemented\n states: {\n value: {\n type: \"writable\",\n valueProp: \"value\",\n onChangeProp: \"onChange\",\n variableType: \"text\",\n },\n isFocused: {\n type: \"readonly\",\n onChangeProp: \"onFocusChange\",\n variableType: \"boolean\",\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n\n const thisName = makeChildComponentName(\n overrides?.parentComponentName,\n componentName\n );\n\n registerFieldError(loader, { parentComponentName: thisName });\n registerInput(loader, { parentComponentName: thisName });\n registerLabel(loader, { parentComponentName: thisName });\n registerDescription(loader, { parentComponentName: thisName });\n registerTextArea(loader, { parentComponentName: thisName });\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BO,SAAS,cAAc,KAA2B,EAAA;AACvD,EAAgE,MAAA,EAAA,GAAA,KAAA,EAAxD,EAAoB,kBAAA,EAAA,YAAA,EAAc,QA3B5C,EAAA,GA2BkE,IAAT,IAAS,GAAA,SAAA,CAAA,EAAA,EAAT,CAA/C,oBAAA,EAAoB,cAAc,EAAA,UAAA,CAAA,CAAA,CAAA;AAE1C,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,SAAA;AAAA,IAAA,cAAA,CAAA;AAAA,MACC,YAAA,EAAc,qBAAqB,YAAe,GAAA,KAAA,CAAA;AAAA,KAC9C,EAAA,IAAA,CAAA;AAAA,IAEH,QAAA;AAAA,GACH,CAAA;AAEJ,CAAA;AAEA,MAAM,aAAA,GAAgB,kBAAkB,WAAW,CAAA,CAAA;AAEnC,SAAA,iBAAA,CACd,QACA,SACA,EAAA;AACA,EAAA,uBAAA;AAAA,IACE,MAAA;AAAA,IACA,aAAA;AAAA,IACA;AAAA,MACE,IAAM,EAAA,aAAA;AAAA,MACN,WAAa,EAAA,gBAAA;AAAA,MACb,UAAY,EAAA,kDAAA;AAAA,MACZ,UAAY,EAAA,eAAA;AAAA;AAAA,MAEZ,KAAA,EAAO,aACF,CAAA,cAAA,CAAA,EAAA,EAAA,mBAAA,CAAwC,OAAS,EAAA;AAAA,QAClD,MAAA;A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;AAAA,GACF,CAAA;AAEA,EAAA,MAAM,QAAW,GAAA,sBAAA;AAAA,IACf,SAAW,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,CAAA,mBAAA;AAAA,IACX,aAAA;AAAA,GACF,CAAA;AAEA,EAAA,kBAAA,CAAmB,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AAC5D,EAAA,aAAA,CAAc,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AACvD,EAAA,aAAA,CAAc,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AACvD,EAAA,mBAAA,CAAoB,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AAC7D,EAAA,gBAAA,CAAiB,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AAC5D;;;;"}
1
+ {"version":3,"file":"registerTextField.esm.js","sources":["../src/registerTextField.tsx"],"sourcesContent":["import React, { ReactNode } from \"react\";\nimport type { InputProps, TextFieldProps } from \"react-aria-components\";\nimport { TextField } from \"react-aria-components\";\nimport { getCommonInputProps } from \"./common\";\nimport { registerDescription } from \"./registerDescription\";\nimport { registerFieldError } from \"./registerFieldError\";\nimport { registerInput } from \"./registerInput\";\nimport { registerLabel } from \"./registerLabel\";\nimport { registerTextArea } from \"./registerTextArea\";\nimport {\n CodeComponentMetaOverrides,\n Registerable,\n makeChildComponentName,\n makeComponentName,\n registerComponentHelper,\n} from \"./utils\";\n\ninterface BaseTextFieldProps extends TextFieldProps {\n label?: ReactNode;\n description?: ReactNode;\n enableAutoComplete?: boolean;\n multiline?: boolean;\n inputProps?: InputProps;\n children: ReactNode;\n}\n\nexport function BaseTextField(props: BaseTextFieldProps) {\n const { enableAutoComplete, autoComplete, children, ...rest } = props;\n\n return (\n <TextField\n autoComplete={enableAutoComplete ? autoComplete : undefined}\n {...rest}\n >\n {children}\n </TextField>\n );\n}\n\nconst componentName = makeComponentName(\"textField\");\n\nexport function registerTextField(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseTextField>\n) {\n registerComponentHelper(\n loader,\n BaseTextField,\n {\n name: componentName,\n displayName: \"Aria TextField\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerTextField\",\n importName: \"BaseTextField\",\n // TODO: Support for validate prop\n props: {\n ...getCommonInputProps<BaseTextFieldProps>(\"input\", [\n \"name\",\n \"isDisabled\",\n \"isReadOnly\",\n \"autoFocus\",\n \"aria-label\",\n \"children\",\n \"isRequired\",\n ]),\n value: {\n type: \"string\",\n editOnly: true,\n uncontrolledProp: \"defaultValue\",\n description: \"The current value\",\n },\n isInvalid: {\n // TODO: Not sure if needed\n displayName: \"Invalid\",\n type: \"boolean\",\n description: \"Whether the input value is invalid\",\n defaultValueHint: false,\n },\n customValidationErrors: {\n // TODO: Not sure if needed\n type: \"array\",\n description: \"Errors for custom validation\",\n },\n // validate: {\n // type: \"function\" as const,\n // argNames: [\"value\"],\n // argValues: (_ps: any, ctx: any) => [ctx.data[0]],\n // },\n enableAutoComplete: {\n type: \"boolean\",\n description:\n \"Whether the browser is allowed to automatically complete the input\",\n defaultValueHint: false,\n },\n autoComplete: {\n type: \"choice\",\n hidden: ({ enableAutoComplete }: BaseTextFieldProps) =>\n !enableAutoComplete,\n description: \"Guidance as to the type of data expected in the field\",\n helpText:\n \"For explanations on what each of the values mean, check https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\",\n options: [\n \"name\",\n \"honorific-prefix\",\n \"given-name\",\n \"additional-name\",\n \"family-name\",\n \"honorific-suffix\",\n \"nickname\",\n \"email\",\n \"username\",\n \"new-password\",\n \"current-password\",\n \"one-time-code\",\n \"organization-title\",\n \"organization\",\n \"street-address\",\n \"shipping\",\n \"billing\",\n \"address-line1\",\n \"address-line2\",\n \"address-line3\",\n \"address-level4\",\n \"address-level3\",\n \"address-level2\",\n \"address-level1\",\n \"country\",\n \"country-name\",\n \"postal-code\",\n \"cc-name\",\n \"cc-given-name\",\n \"cc-additional-name\",\n \"cc-family-name\",\n \"cc-number\",\n \"cc-exp\",\n \"cc-exp-month\",\n \"cc-exp-year\",\n \"cc-csc\",\n \"cc-type\",\n \"transaction-currency\",\n \"transaction-amount\",\n \"language\",\n \"bday\",\n \"bday-day\",\n \"bday-month\",\n \"bday-year\",\n \"sex\",\n \"tel\",\n \"tel-country-code\",\n \"tel-national\",\n \"tel-area-code\",\n \"tel-local\",\n \"tel-local-suffix\",\n \"tel-local-prefix\",\n \"tel-extension\",\n \"impp\",\n \"url\",\n \"photo\",\n \"webauthn\",\n ],\n },\n maxLength: {\n type: \"number\",\n description:\n \"The maximum number of characters supported by the input\",\n },\n minLength: {\n type: \"number\",\n description:\n \"The minimum number of characters supported by the input\",\n },\n pattern: {\n type: \"string\",\n description:\n \"Regex pattern that the value of the input must match to be valid\",\n helpText:\n \"For more information about writing Regular Expressions (regex), check out https://regexr.com/\",\n validator: (value) => {\n try {\n new RegExp(value);\n return true;\n } catch (error) {\n return \"Invalid Regex\";\n }\n },\n },\n type: {\n type: \"choice\",\n defaultValueHint: \"text\",\n options: [\"text\", \"search\", \"url\", \"tel\", \"email\", \"password\"],\n },\n inputMode: {\n type: \"choice\",\n description:\n \"hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents.\",\n options: [\n \"none\",\n \"text\",\n \"tel\",\n \"url\",\n \"email\",\n \"numeric\",\n \"decimal\",\n \"search\",\n ],\n },\n validationBehavior: {\n type: \"choice\",\n options: [\"native\", \"aria\"],\n description:\n \"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.\",\n defaultValueHint: \"native\",\n },\n onChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"value\", type: \"string\" }],\n },\n onFocus: {\n type: \"eventHandler\",\n argTypes: [{ name: \"focusEvent\", type: \"object\" }],\n },\n onBlur: {\n type: \"eventHandler\",\n argTypes: [{ name: \"focusEvent\", type: \"object\" }],\n },\n onFocusChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isFocused\", type: \"boolean\" }],\n },\n onKeyDown: {\n type: \"eventHandler\",\n argTypes: [{ name: \"keyboardEvent\", type: \"object\" }],\n },\n onKeyUp: {\n type: \"eventHandler\",\n argTypes: [{ name: \"keyboardEvent\", type: \"object\" }],\n },\n onCopy: {\n type: \"eventHandler\",\n argTypes: [{ name: \"clipbordEvent\", type: \"object\" }],\n },\n onCut: {\n type: \"eventHandler\",\n argTypes: [{ name: \"clipbordEvent\", type: \"object\" }],\n },\n onPaste: {\n type: \"eventHandler\",\n argTypes: [{ name: \"clipbordEvent\", type: \"object\" }],\n },\n onCompositionStart: {\n type: \"eventHandler\",\n argTypes: [{ name: \"compositionEvent\", type: \"object\" }],\n },\n onCompositionEnd: {\n type: \"eventHandler\",\n argTypes: [{ name: \"compositionEvent\", type: \"object\" }],\n },\n onCompositionUpdate: {\n type: \"eventHandler\",\n argTypes: [{ name: \"compositionEvent\", type: \"object\" }],\n },\n onSelect: {\n type: \"eventHandler\",\n argTypes: [{ name: \"selectionEvent\", type: \"object\" }],\n },\n onBeforeInput: {\n type: \"eventHandler\",\n argTypes: [{ name: \"inputEvent\", type: \"object\" }],\n },\n onInput: {\n type: \"eventHandler\",\n argTypes: [{ name: \"inputEvent\", type: \"object\" }],\n },\n },\n // NOTE: React-Aria does not support render props for <Input> and <Textarea>, so focusVisible and inputHovered states are not implemented\n states: {\n value: {\n type: \"writable\",\n valueProp: \"value\",\n onChangeProp: \"onChange\",\n variableType: \"text\",\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n\n const thisName = makeChildComponentName(\n overrides?.parentComponentName,\n componentName\n );\n\n registerFieldError(loader, { parentComponentName: thisName });\n registerInput(loader, { parentComponentName: thisName });\n registerLabel(loader, { parentComponentName: thisName });\n registerDescription(loader, { parentComponentName: thisName });\n registerTextArea(loader, { parentComponentName: thisName });\n}\n"],"names":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AAA,MAAA;AAAA,SAChB;AAAA,OACF;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AAEA,EAAA,MAAM,QAAW,GAAA,sBAAA;AAAA,IACf,SAAW,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,CAAA,mBAAA;AAAA,IACX,aAAA;AAAA,GACF,CAAA;AAEA,EAAA,kBAAA,CAAmB,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AAC5D,EAAA,aAAA,CAAc,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AACvD,EAAA,aAAA,CAAc,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AACvD,EAAA,mBAAA,CAAoB,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AAC7D,EAAA,gBAAA,CAAiB,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AAC5D;;;;"}
@@ -5,7 +5,7 @@ var React = require('react');
5
5
  var reactAria = require('react-aria');
6
6
  var flattenChildren = require('react-keyed-flatten-children');
7
7
  var reactStately = require('react-stately');
8
- var utils$1 = require('./utils-1190a0a9.cjs.js');
8
+ var utils$1 = require('./utils-18b2465b.cjs.js');
9
9
  require('@plasmicapp/host/registerComponent');
10
10
 
11
11
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { useTooltipTrigger } from 'react-aria';
4
4
  import flattenChildren from 'react-keyed-flatten-children';
5
5
  import { useTooltipTriggerState } from 'react-stately';
6
- import { r as registerComponentHelper } from './utils-28f98072.esm.js';
6
+ import { r as registerComponentHelper } from './utils-cf2632c9.esm.js';
7
7
  import '@plasmicapp/host/registerComponent';
8
8
 
9
9
  var __defProp = Object.defineProperty;
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
 
3
3
  var registerComponent = require('@plasmicapp/host/registerComponent');
4
- var React = require('react');
5
4
 
6
5
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
7
6
 
@@ -26,12 +25,6 @@ var __spreadValues = (a, b) => {
26
25
  return a;
27
26
  };
28
27
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
29
- function ValueObserver({ value, onChange }) {
30
- React.useEffect(() => {
31
- onChange(value);
32
- }, [value, onChange]);
33
- return null;
34
- }
35
28
  function registerComponentHelper(loader, component, meta, overrides) {
36
29
  if (overrides) {
37
30
  meta = __spreadProps(__spreadValues(__spreadValues({}, meta), overrides), {
@@ -64,19 +57,16 @@ function makeChildComponentName(fullParentName, fullChildName) {
64
57
  }
65
58
  function extractPlasmicDataProps(props) {
66
59
  return Object.fromEntries(
67
- Object.entries(props).filter(
68
- ([key, val]) => key.startsWith("data-plasmic-")
69
- )
60
+ Object.entries(props).filter(([key]) => key.startsWith("data-plasmic-"))
70
61
  );
71
62
  }
72
63
  function withoutNils(array) {
73
64
  return array.filter((x) => x != null);
74
65
  }
75
66
 
76
- exports.ValueObserver = ValueObserver;
77
67
  exports.extractPlasmicDataProps = extractPlasmicDataProps;
78
68
  exports.makeChildComponentName = makeChildComponentName;
79
69
  exports.makeComponentName = makeComponentName;
80
70
  exports.registerComponentHelper = registerComponentHelper;
81
71
  exports.withoutNils = withoutNils;
82
- //# sourceMappingURL=utils-1190a0a9.cjs.js.map
72
+ //# sourceMappingURL=utils-18b2465b.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils-18b2465b.cjs.js","sources":["../src/utils.ts"],"sourcesContent":["import type { CodeComponentMeta } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type Registerable = {\n registerComponent: typeof registerComponent;\n};\n\nexport type CodeComponentMetaOverrides<T extends React.ComponentType<any>> =\n Partial<\n Pick<\n CodeComponentMeta<React.ComponentProps<T>>,\n \"parentComponentName\" | \"props\" | \"displayName\"\n >\n >;\n\nexport function registerComponentHelper<T extends React.ComponentType<any>>(\n loader: Registerable | undefined,\n component: T,\n meta: CodeComponentMeta<React.ComponentProps<T>>,\n overrides?: CodeComponentMetaOverrides<T>\n) {\n if (overrides) {\n meta = {\n ...meta,\n ...overrides,\n props: {\n ...meta.props,\n ...overrides.props,\n },\n };\n if (overrides.parentComponentName) {\n meta.name = makeChildComponentName(\n overrides.parentComponentName,\n meta.name\n );\n }\n }\n if (loader) {\n loader.registerComponent(component, meta);\n } else {\n registerComponent(component, meta);\n }\n}\n\nexport function makeComponentName(name: string) {\n return `plasmic-react-aria-${name}`;\n}\n\nexport function makeChildComponentName(\n fullParentName: string | undefined,\n fullChildName: string\n) {\n if (!fullParentName) {\n return fullChildName;\n }\n return `${fullParentName}-${fullChildName.replace(\n \"plasmic-react-aria-\",\n \"\"\n )}`;\n}\n\nexport interface Styleable {\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function extractPlasmicDataProps(props: Record<string, any>) {\n return Object.fromEntries(\n Object.entries(props).filter(([key]) => key.startsWith(\"data-plasmic-\"))\n );\n}\n\nexport function withoutNils<T>(array: (T | undefined | null)[]) {\n return array.filter((x): x is T => x != null);\n}\n"],"names":["registerComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBO,SAAS,uBACd,CAAA,MAAA,EACA,SACA,EAAA,IAAA,EACA,SACA,EAAA;AACA,EAAA,IAAI,SAAW,EAAA;AACb,IAAO,IAAA,GAAA,aAAA,CAAA,cAAA,CAAA,cAAA,CAAA,EAAA,EACF,OACA,SAFE,CAAA,EAAA;AAAA,MAGL,KAAO,EAAA,cAAA,CAAA,cAAA,CAAA,EAAA,EACF,IAAK,CAAA,KAAA,CAAA,EACL,SAAU,CAAA,KAAA,CAAA;AAAA,KAEjB,CAAA,CAAA;AACA,IAAA,IAAI,UAAU,mBAAqB,EAAA;AACjC,MAAA,IAAA,CAAK,IAAO,GAAA,sBAAA;AAAA,QACV,SAAU,CAAA,mBAAA;AAAA,QACV,IAAK,CAAA,IAAA;AAAA,OACP,CAAA;AAAA,KACF;AAAA,GACF;AACA,EAAA,IAAI,MAAQ,EAAA;AACV,IAAO,MAAA,CAAA,iBAAA,CAAkB,WAAW,IAAI,CAAA,CAAA;AAAA,GACnC,MAAA;AACL,IAAAA,kCAAA,CAAkB,WAAW,IAAI,CAAA,CAAA;AAAA,GACnC;AACF,CAAA;AAEO,SAAS,kBAAkB,IAAc,EAAA;AAC9C,EAAA,OAAO,CAAsB,mBAAA,EAAA,IAAA,CAAA,CAAA,CAAA;AAC/B,CAAA;AAEgB,SAAA,sBAAA,CACd,gBACA,aACA,EAAA;AACA,EAAA,IAAI,CAAC,cAAgB,EAAA;AACnB,IAAO,OAAA,aAAA,CAAA;AAAA,GACT;AACA,EAAO,OAAA,CAAA,EAAG,kBAAkB,aAAc,CAAA,OAAA;AAAA,IACxC,qBAAA;AAAA,IACA,EAAA;AAAA,GACF,CAAA,CAAA,CAAA;AACF,CAAA;AAOO,SAAS,wBAAwB,KAA4B,EAAA;AAClE,EAAA,OAAO,MAAO,CAAA,WAAA;AAAA,IACZ,MAAO,CAAA,OAAA,CAAQ,KAAK,CAAA,CAAE,MAAO,CAAA,CAAC,CAAC,GAAG,CAAM,KAAA,GAAA,CAAI,UAAW,CAAA,eAAe,CAAC,CAAA;AAAA,GACzE,CAAA;AACF,CAAA;AAEO,SAAS,YAAe,KAAiC,EAAA;AAC9D,EAAA,OAAO,KAAM,CAAA,MAAA,CAAO,CAAC,CAAA,KAAc,KAAK,IAAI,CAAA,CAAA;AAC9C;;;;;;;;"}
@@ -1,5 +1,4 @@
1
1
  import registerComponent from '@plasmicapp/host/registerComponent';
2
- import { useEffect } from 'react';
3
2
 
4
3
  var __defProp = Object.defineProperty;
5
4
  var __defProps = Object.defineProperties;
@@ -20,12 +19,6 @@ var __spreadValues = (a, b) => {
20
19
  return a;
21
20
  };
22
21
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
- function ValueObserver({ value, onChange }) {
24
- useEffect(() => {
25
- onChange(value);
26
- }, [value, onChange]);
27
- return null;
28
- }
29
22
  function registerComponentHelper(loader, component, meta, overrides) {
30
23
  if (overrides) {
31
24
  meta = __spreadProps(__spreadValues(__spreadValues({}, meta), overrides), {
@@ -58,14 +51,12 @@ function makeChildComponentName(fullParentName, fullChildName) {
58
51
  }
59
52
  function extractPlasmicDataProps(props) {
60
53
  return Object.fromEntries(
61
- Object.entries(props).filter(
62
- ([key, val]) => key.startsWith("data-plasmic-")
63
- )
54
+ Object.entries(props).filter(([key]) => key.startsWith("data-plasmic-"))
64
55
  );
65
56
  }
66
57
  function withoutNils(array) {
67
58
  return array.filter((x) => x != null);
68
59
  }
69
60
 
70
- export { ValueObserver as V, makeChildComponentName as a, extractPlasmicDataProps as e, makeComponentName as m, registerComponentHelper as r, withoutNils as w };
71
- //# sourceMappingURL=utils-28f98072.esm.js.map
61
+ export { makeChildComponentName as a, extractPlasmicDataProps as e, makeComponentName as m, registerComponentHelper as r, withoutNils as w };
62
+ //# sourceMappingURL=utils-cf2632c9.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils-cf2632c9.esm.js","sources":["../src/utils.ts"],"sourcesContent":["import type { CodeComponentMeta } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type Registerable = {\n registerComponent: typeof registerComponent;\n};\n\nexport type CodeComponentMetaOverrides<T extends React.ComponentType<any>> =\n Partial<\n Pick<\n CodeComponentMeta<React.ComponentProps<T>>,\n \"parentComponentName\" | \"props\" | \"displayName\"\n >\n >;\n\nexport function registerComponentHelper<T extends React.ComponentType<any>>(\n loader: Registerable | undefined,\n component: T,\n meta: CodeComponentMeta<React.ComponentProps<T>>,\n overrides?: CodeComponentMetaOverrides<T>\n) {\n if (overrides) {\n meta = {\n ...meta,\n ...overrides,\n props: {\n ...meta.props,\n ...overrides.props,\n },\n };\n if (overrides.parentComponentName) {\n meta.name = makeChildComponentName(\n overrides.parentComponentName,\n meta.name\n );\n }\n }\n if (loader) {\n loader.registerComponent(component, meta);\n } else {\n registerComponent(component, meta);\n }\n}\n\nexport function makeComponentName(name: string) {\n return `plasmic-react-aria-${name}`;\n}\n\nexport function makeChildComponentName(\n fullParentName: string | undefined,\n fullChildName: string\n) {\n if (!fullParentName) {\n return fullChildName;\n }\n return `${fullParentName}-${fullChildName.replace(\n \"plasmic-react-aria-\",\n \"\"\n )}`;\n}\n\nexport interface Styleable {\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function extractPlasmicDataProps(props: Record<string, any>) {\n return Object.fromEntries(\n Object.entries(props).filter(([key]) => key.startsWith(\"data-plasmic-\"))\n );\n}\n\nexport function withoutNils<T>(array: (T | undefined | null)[]) {\n return array.filter((x): x is T => x != null);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgBO,SAAS,uBACd,CAAA,MAAA,EACA,SACA,EAAA,IAAA,EACA,SACA,EAAA;AACA,EAAA,IAAI,SAAW,EAAA;AACb,IAAO,IAAA,GAAA,aAAA,CAAA,cAAA,CAAA,cAAA,CAAA,EAAA,EACF,OACA,SAFE,CAAA,EAAA;AAAA,MAGL,KAAO,EAAA,cAAA,CAAA,cAAA,CAAA,EAAA,EACF,IAAK,CAAA,KAAA,CAAA,EACL,SAAU,CAAA,KAAA,CAAA;AAAA,KAEjB,CAAA,CAAA;AACA,IAAA,IAAI,UAAU,mBAAqB,EAAA;AACjC,MAAA,IAAA,CAAK,IAAO,GAAA,sBAAA;AAAA,QACV,SAAU,CAAA,mBAAA;AAAA,QACV,IAAK,CAAA,IAAA;AAAA,OACP,CAAA;AAAA,KACF;AAAA,GACF;AACA,EAAA,IAAI,MAAQ,EAAA;AACV,IAAO,MAAA,CAAA,iBAAA,CAAkB,WAAW,IAAI,CAAA,CAAA;AAAA,GACnC,MAAA;AACL,IAAA,iBAAA,CAAkB,WAAW,IAAI,CAAA,CAAA;AAAA,GACnC;AACF,CAAA;AAEO,SAAS,kBAAkB,IAAc,EAAA;AAC9C,EAAA,OAAO,CAAsB,mBAAA,EAAA,IAAA,CAAA,CAAA,CAAA;AAC/B,CAAA;AAEgB,SAAA,sBAAA,CACd,gBACA,aACA,EAAA;AACA,EAAA,IAAI,CAAC,cAAgB,EAAA;AACnB,IAAO,OAAA,aAAA,CAAA;AAAA,GACT;AACA,EAAO,OAAA,CAAA,EAAG,kBAAkB,aAAc,CAAA,OAAA;AAAA,IACxC,qBAAA;AAAA,IACA,EAAA;AAAA,GACF,CAAA,CAAA,CAAA;AACF,CAAA;AAOO,SAAS,wBAAwB,KAA4B,EAAA;AAClE,EAAA,OAAO,MAAO,CAAA,WAAA;AAAA,IACZ,MAAO,CAAA,OAAA,CAAQ,KAAK,CAAA,CAAE,MAAO,CAAA,CAAC,CAAC,GAAG,CAAM,KAAA,GAAA,CAAI,UAAW,CAAA,eAAe,CAAC,CAAA;AAAA,GACzE,CAAA;AACF,CAAA;AAEO,SAAS,YAAe,KAAiC,EAAA;AAC9D,EAAA,OAAO,KAAM,CAAA,MAAA,CAAO,CAAC,CAAA,KAAc,KAAK,IAAI,CAAA,CAAA;AAC9C;;;;"}
package/skinny/utils.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import type { CodeComponentMeta } from "@plasmicapp/host";
2
2
  import registerComponent from "@plasmicapp/host/registerComponent";
3
3
  import React from "react";
4
- export declare function ValueObserver({ value, onChange }: any): null;
5
4
  export type Registerable = {
6
5
  registerComponent: typeof registerComponent;
7
6
  };
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils-1190a0a9.cjs.js","sources":["../src/utils.ts"],"sourcesContent":["import type { CodeComponentMeta } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { useEffect } from \"react\";\n\nexport function ValueObserver({ value, onChange }: any) {\n useEffect(() => {\n onChange(value);\n }, [value, onChange]);\n return null;\n}\n\nexport type Registerable = {\n registerComponent: typeof registerComponent;\n};\n\nexport type CodeComponentMetaOverrides<T extends React.ComponentType<any>> =\n Partial<\n Pick<\n CodeComponentMeta<React.ComponentProps<T>>,\n \"parentComponentName\" | \"props\" | \"displayName\"\n >\n >;\n\nexport function registerComponentHelper<T extends React.ComponentType<any>>(\n loader: Registerable | undefined,\n component: T,\n meta: CodeComponentMeta<React.ComponentProps<T>>,\n overrides?: CodeComponentMetaOverrides<T>\n) {\n if (overrides) {\n meta = {\n ...meta,\n ...overrides,\n props: {\n ...meta.props,\n ...overrides.props,\n },\n };\n if (overrides.parentComponentName) {\n meta.name = makeChildComponentName(\n overrides.parentComponentName,\n meta.name\n );\n }\n }\n if (loader) {\n loader.registerComponent(component, meta);\n } else {\n registerComponent(component, meta);\n }\n}\n\nexport function makeComponentName(name: string) {\n return `plasmic-react-aria-${name}`;\n}\n\nexport function makeChildComponentName(\n fullParentName: string | undefined,\n fullChildName: string\n) {\n if (!fullParentName) {\n return fullChildName;\n }\n return `${fullParentName}-${fullChildName.replace(\n \"plasmic-react-aria-\",\n \"\"\n )}`;\n}\n\nexport interface Styleable {\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function extractPlasmicDataProps(props: Record<string, any>) {\n return Object.fromEntries(\n Object.entries(props).filter(([key, val]) =>\n key.startsWith(\"data-plasmic-\")\n )\n );\n}\n\nexport function withoutNils<T>(array: (T | undefined | null)[]) {\n return array.filter((x): x is T => x != null);\n}\n"],"names":["useEffect","registerComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,SAAS,aAAc,CAAA,EAAE,KAAO,EAAA,QAAA,EAAiB,EAAA;AACtD,EAAAA,eAAA,CAAU,MAAM;AACd,IAAA,QAAA,CAAS,KAAK,CAAA,CAAA;AAAA,GACb,EAAA,CAAC,KAAO,EAAA,QAAQ,CAAC,CAAA,CAAA;AACpB,EAAO,OAAA,IAAA,CAAA;AACT,CAAA;AAcO,SAAS,uBACd,CA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Ae,CAAA;AAAA,KAChC;AAAA,GACF,CAAA;AACF,CAAA;AAEO,SAAS,YAAe,KAAiC,EAAA;AAC9D,EAAA,OAAO,KAAM,CAAA,MAAA,CAAO,CAAC,CAAA,KAAc,KAAK,IAAI,CAAA,CAAA;AAC9C;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils-28f98072.esm.js","sources":["../src/utils.ts"],"sourcesContent":["import type { CodeComponentMeta } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React, { useEffect } from \"react\";\n\nexport function ValueObserver({ value, onChange }: any) {\n useEffect(() => {\n onChange(value);\n }, [value, onChange]);\n return null;\n}\n\nexport type Registerable = {\n registerComponent: typeof registerComponent;\n};\n\nexport type CodeComponentMetaOverrides<T extends React.ComponentType<any>> =\n Partial<\n Pick<\n CodeComponentMeta<React.ComponentProps<T>>,\n \"parentComponentName\" | \"props\" | \"displayName\"\n >\n >;\n\nexport function registerComponentHelper<T extends React.ComponentType<any>>(\n loader: Registerable | undefined,\n component: T,\n meta: CodeComponentMeta<React.ComponentProps<T>>,\n overrides?: CodeComponentMetaOverrides<T>\n) {\n if (overrides) {\n meta = {\n ...meta,\n ...overrides,\n props: {\n ...meta.props,\n ...overrides.props,\n },\n };\n if (overrides.parentComponentName) {\n meta.name = makeChildComponentName(\n overrides.parentComponentName,\n meta.name\n );\n }\n }\n if (loader) {\n loader.registerComponent(component, meta);\n } else {\n registerComponent(component, meta);\n }\n}\n\nexport function makeComponentName(name: string) {\n return `plasmic-react-aria-${name}`;\n}\n\nexport function makeChildComponentName(\n fullParentName: string | undefined,\n fullChildName: string\n) {\n if (!fullParentName) {\n return fullChildName;\n }\n return `${fullParentName}-${fullChildName.replace(\n \"plasmic-react-aria-\",\n \"\"\n )}`;\n}\n\nexport interface Styleable {\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function extractPlasmicDataProps(props: Record<string, any>) {\n return Object.fromEntries(\n Object.entries(props).filter(([key, val]) =>\n key.startsWith(\"data-plasmic-\")\n )\n );\n}\n\nexport function withoutNils<T>(array: (T | undefined | null)[]) {\n return array.filter((x): x is T => x != null);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAIO,SAAS,aAAc,CAAA,EAAE,KAAO,EAAA,QAAA,EAAiB,EAAA;AACtD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,QAAA,CAAS,KAAK,CAAA,CAAA;AAAA,GACb,EAAA,CAAC,KAAO,EAAA,QAAQ,CAAC,CAAA,CAAA;AACpB,EAAO,OAAA,IAAA,CAAA;AACT,CAAA;AAcO,SAAS,uBACd,CAAA,MAAA,EACA,SACA,EAAA,IAAA,EACA,SACA,EAAA;AACA,EAAA,IAAI,SAAW,EAAA;AACb,IAAO,IAAA,GAAA,aAAA,CAAA,cAAA,CAAA,cAAA,CAAA,EAAA,EACF,OACA,SAFE,CAAA,EAAA;AAAA,MAGL,KAAO,EAAA,cAAA,CAAA,cAAA,CAAA,EAAA,EACF,IAAK,CAAA,KAAA,CAAA,EACL,SAAU,CAAA,KAAA,CAAA;AAAA,KAEjB,CAAA,CAAA;AACA,IAAA,IAAI,UAAU,mBAAqB,EAAA;AACjC,MAAA,IAAA,CAAK,IAAO,GAAA,sBAAA;AAAA,QACV,SAAU,CAAA,mBAAA;AAAA,QACV,IAAK,CAAA,IAAA;AAAA,OACP,CAAA;AAAA,KACF;AAAA,GACF;AACA,EAAA,IAAI,MAAQ,EAAA;AACV,IAAO,MAAA,CAAA,iBAAA,CAAkB,WAAW,IAAI,CAAA,CAAA;AAAA,GACnC,MAAA;AACL,IAAA,iBAAA,CAAkB,WAAW,IAAI,CAAA,CAAA;AAAA,GACnC;AACF,CAAA;AAEO,SAAS,kBAAkB,IAAc,EAAA;AAC9C,EAAA,OAAO,CAAsB,mBAAA,EAAA,IAAA,CAAA,CAAA,CAAA;AAC/B,CAAA;AAEgB,SAAA,sBAAA,CACd,gBACA,aACA,EAAA;AACA,EAAA,IAA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