@plasmicpkgs/react-aria 0.0.194 → 0.0.195
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/common.d.ts +11 -10
- package/dist/react-aria.esm.js +115 -100
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +114 -99
- package/dist/react-aria.js.map +1 -1
- package/package.json +2 -2
- package/skinny/{OptionsItemIdManager-144c0ec2.esm.js → OptionsItemIdManager-abecfd79.esm.js} +2 -2
- package/skinny/{OptionsItemIdManager-144c0ec2.esm.js.map → OptionsItemIdManager-abecfd79.esm.js.map} +1 -1
- package/skinny/{OptionsItemIdManager-b907e7cf.cjs.js → OptionsItemIdManager-d01901ad.cjs.js} +2 -2
- package/skinny/{OptionsItemIdManager-b907e7cf.cjs.js.map → OptionsItemIdManager-d01901ad.cjs.js.map} +1 -1
- package/skinny/{common-9574ac48.esm.js → common-5a3610e7.esm.js} +9 -2
- package/skinny/common-5a3610e7.esm.js.map +1 -0
- package/skinny/{common-44638169.cjs.js → common-e9872bf5.cjs.js} +9 -1
- package/skinny/common-e9872bf5.cjs.js.map +1 -0
- package/skinny/common.d.ts +11 -10
- package/skinny/registerButton.cjs.js +3 -7
- package/skinny/registerButton.cjs.js.map +1 -1
- package/skinny/registerButton.esm.js +3 -7
- package/skinny/registerButton.esm.js.map +1 -1
- package/skinny/registerCheckbox.cjs.js +4 -4
- package/skinny/registerCheckbox.cjs.js.map +1 -1
- package/skinny/registerCheckbox.esm.js +4 -4
- package/skinny/registerCheckbox.esm.js.map +1 -1
- package/skinny/registerCheckboxGroup.cjs.js +4 -4
- package/skinny/registerCheckboxGroup.cjs.js.map +1 -1
- package/skinny/registerCheckboxGroup.esm.js +4 -4
- package/skinny/registerCheckboxGroup.esm.js.map +1 -1
- package/skinny/registerComboBox.cjs.js +7 -6
- package/skinny/registerComboBox.cjs.js.map +1 -1
- package/skinny/registerComboBox.esm.js +7 -6
- package/skinny/registerComboBox.esm.js.map +1 -1
- package/skinny/registerDescription.cjs.js +1 -1
- package/skinny/registerDescription.esm.js +1 -1
- package/skinny/registerDialog.cjs.js +1 -1
- package/skinny/registerDialog.esm.js +1 -1
- package/skinny/registerDialogTrigger.cjs.js +1 -1
- package/skinny/registerDialogTrigger.esm.js +1 -1
- package/skinny/registerFieldError.cjs.js +1 -1
- package/skinny/registerFieldError.esm.js +1 -1
- package/skinny/registerForm.cjs.js +1 -1
- package/skinny/registerForm.esm.js +1 -1
- package/skinny/registerHeading.cjs.js +1 -1
- package/skinny/registerHeading.esm.js +1 -1
- package/skinny/registerInput.cjs.js +1 -1
- package/skinny/registerInput.esm.js +1 -1
- package/skinny/registerLabel.cjs.js +1 -1
- package/skinny/registerLabel.esm.js +1 -1
- package/skinny/{registerListBox-be002653.esm.js → registerListBox-020ce7b4.esm.js} +5 -5
- package/skinny/registerListBox-020ce7b4.esm.js.map +1 -0
- package/skinny/{registerListBox-9d951610.cjs.js → registerListBox-d2c459cc.cjs.js} +5 -5
- package/skinny/registerListBox-d2c459cc.cjs.js.map +1 -0
- package/skinny/registerListBox.cjs.js +3 -3
- package/skinny/registerListBox.esm.js +3 -3
- package/skinny/registerListBoxItem.cjs.js +2 -2
- package/skinny/registerListBoxItem.esm.js +2 -2
- package/skinny/registerModal.cjs.js +1 -1
- package/skinny/registerModal.esm.js +1 -1
- package/skinny/registerOverlayArrow.cjs.js +1 -1
- package/skinny/registerOverlayArrow.esm.js +1 -1
- package/skinny/registerPopover.cjs.js +1 -1
- package/skinny/registerPopover.esm.js +1 -1
- package/skinny/registerRadio.cjs.js +4 -4
- package/skinny/registerRadio.cjs.js.map +1 -1
- package/skinny/registerRadio.esm.js +4 -4
- package/skinny/registerRadio.esm.js.map +1 -1
- package/skinny/registerRadioGroup.cjs.js +4 -4
- package/skinny/registerRadioGroup.cjs.js.map +1 -1
- package/skinny/registerRadioGroup.esm.js +4 -4
- package/skinny/registerRadioGroup.esm.js.map +1 -1
- package/skinny/registerSection.cjs.js +3 -3
- package/skinny/registerSection.esm.js +3 -3
- package/skinny/registerSelect.cjs.js +16 -6
- package/skinny/registerSelect.cjs.js.map +1 -1
- package/skinny/registerSelect.esm.js +16 -6
- package/skinny/registerSelect.esm.js.map +1 -1
- package/skinny/registerSlider.cjs.js +1 -1
- package/skinny/registerSlider.esm.js +1 -1
- package/skinny/registerSliderOutput.cjs.js +1 -1
- package/skinny/registerSliderOutput.esm.js +1 -1
- package/skinny/registerSliderThumb.cjs.js +5 -4
- package/skinny/registerSliderThumb.cjs.js.map +1 -1
- package/skinny/registerSliderThumb.esm.js +5 -4
- package/skinny/registerSliderThumb.esm.js.map +1 -1
- package/skinny/registerSliderTrack.cjs.js +1 -1
- package/skinny/registerSliderTrack.esm.js +1 -1
- package/skinny/registerSwitch.cjs.js +3 -3
- package/skinny/registerSwitch.cjs.js.map +1 -1
- package/skinny/registerSwitch.esm.js +3 -3
- package/skinny/registerSwitch.esm.js.map +1 -1
- package/skinny/registerText.cjs.js +1 -1
- package/skinny/registerText.esm.js +1 -1
- package/skinny/registerTextArea.cjs.js +1 -1
- package/skinny/registerTextArea.esm.js +1 -1
- package/skinny/registerTextField.cjs.js +1 -1
- package/skinny/registerTextField.esm.js +1 -1
- package/skinny/registerTooltip.cjs.js +1 -1
- package/skinny/registerTooltip.esm.js +1 -1
- package/skinny/common-44638169.cjs.js.map +0 -1
- package/skinny/common-9574ac48.esm.js.map +0 -1
- package/skinny/registerListBox-9d951610.cjs.js.map +0 -1
- package/skinny/registerListBox-be002653.esm.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { registerText } from './registerText.esm.js';
|
|
2
|
-
import { m as makeComponentName } from './common-
|
|
2
|
+
import { m as makeComponentName } from './common-5a3610e7.esm.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-aria-components';
|
|
5
5
|
import '@plasmicapp/host';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var host = require('@plasmicapp/host');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var reactAriaComponents = require('react-aria-components');
|
|
6
|
-
var common = require('./common-
|
|
6
|
+
var common = require('./common-e9872bf5.cjs.js');
|
|
7
7
|
require('@plasmicapp/host/registerComponent');
|
|
8
8
|
|
|
9
9
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { usePlasmicCanvasContext } from '@plasmicapp/host';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Dialog } from 'react-aria-components';
|
|
4
|
-
import { C as COMMON_STYLES, m as makeComponentName, r as registerComponentHelper, c as createIdProp,
|
|
4
|
+
import { C as COMMON_STYLES, m as makeComponentName, r as registerComponentHelper, c as createIdProp, g as createAriaLabelProp } from './common-5a3610e7.esm.js';
|
|
5
5
|
import '@plasmicapp/host/registerComponent';
|
|
6
6
|
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAria = require('react-aria');
|
|
5
5
|
var reactAriaComponents = require('react-aria-components');
|
|
6
|
-
var common = require('./common-
|
|
6
|
+
var common = require('./common-e9872bf5.cjs.js');
|
|
7
7
|
var contexts = require('./contexts-6d0cb2b1.cjs.js');
|
|
8
8
|
var registerButton = require('./registerButton.cjs.js');
|
|
9
9
|
var registerDialog = require('./registerDialog.cjs.js');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useButton, mergeProps } from 'react-aria';
|
|
3
3
|
import { DialogTrigger } from 'react-aria-components';
|
|
4
|
-
import { C as COMMON_STYLES,
|
|
4
|
+
import { C as COMMON_STYLES, k as useIsOpen, r as registerComponentHelper, m as makeComponentName, c as createIdProp } from './common-5a3610e7.esm.js';
|
|
5
5
|
import { d as PlasmicDialogTriggerContext } from './contexts-5cb81c2f.esm.js';
|
|
6
6
|
import { BUTTON_COMPONENT_NAME } from './registerButton.esm.js';
|
|
7
7
|
import { DIALOG_COMPONENT_NAME } from './registerDialog.esm.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAriaComponents = require('react-aria-components');
|
|
5
|
-
var common = require('./common-
|
|
5
|
+
var common = require('./common-e9872bf5.cjs.js');
|
|
6
6
|
require('@plasmicapp/host');
|
|
7
7
|
require('@plasmicapp/host/registerComponent');
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FieldError } from 'react-aria-components';
|
|
3
|
-
import { r as registerComponentHelper, m as makeComponentName, c as createIdProp } from './common-
|
|
3
|
+
import { r as registerComponentHelper, m as makeComponentName, c as createIdProp } from './common-5a3610e7.esm.js';
|
|
4
4
|
import '@plasmicapp/host';
|
|
5
5
|
import '@plasmicapp/host/registerComponent';
|
|
6
6
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAriaComponents = require('react-aria-components');
|
|
5
|
-
var common = require('./common-
|
|
5
|
+
var common = require('./common-e9872bf5.cjs.js');
|
|
6
6
|
require('@plasmicapp/host');
|
|
7
7
|
require('@plasmicapp/host/registerComponent');
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Form } from 'react-aria-components';
|
|
3
|
-
import { r as registerComponentHelper, m as makeComponentName, c as createIdProp } from './common-
|
|
3
|
+
import { r as registerComponentHelper, m as makeComponentName, c as createIdProp } from './common-5a3610e7.esm.js';
|
|
4
4
|
import '@plasmicapp/host';
|
|
5
5
|
import '@plasmicapp/host/registerComponent';
|
|
6
6
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAriaComponents = require('react-aria-components');
|
|
5
|
-
var common = require('./common-
|
|
5
|
+
var common = require('./common-e9872bf5.cjs.js');
|
|
6
6
|
require('@plasmicapp/host');
|
|
7
7
|
require('@plasmicapp/host/registerComponent');
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Heading } from 'react-aria-components';
|
|
3
|
-
import { r as registerComponentHelper, C as COMMON_STYLES, c as createIdProp, m as makeComponentName } from './common-
|
|
3
|
+
import { r as registerComponentHelper, C as COMMON_STYLES, c as createIdProp, m as makeComponentName } from './common-5a3610e7.esm.js';
|
|
4
4
|
import '@plasmicapp/host';
|
|
5
5
|
import '@plasmicapp/host/registerComponent';
|
|
6
6
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAria = require('react-aria');
|
|
5
5
|
var reactAriaComponents = require('react-aria-components');
|
|
6
|
-
var common = require('./common-
|
|
6
|
+
var common = require('./common-e9872bf5.cjs.js');
|
|
7
7
|
var contexts = require('./contexts-6d0cb2b1.cjs.js');
|
|
8
8
|
var variantUtils = require('./variant-utils-d46df529.cjs.js');
|
|
9
9
|
require('@plasmicapp/host');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
2
|
import { useHover, useFocusRing, mergeProps } from 'react-aria';
|
|
3
3
|
import { useContextProps, InputContext } from 'react-aria-components';
|
|
4
|
-
import {
|
|
4
|
+
import { t as filterHoverProps, C as COMMON_STYLES, s as isDefined, B as resolveAutoComplete, m as makeComponentName, r as registerComponentHelper, v as commonInputEventHandlerProps, c as createIdProp, a as createNameProp, w as createPlaceholderProp, x as createInitialValueProp, D as createInputTypeProp, i as createAutoFocusProp, b as createDisabledProp, d as createReadOnlyProp, e as createRequiredProp, F as createPatternProp, A as createInputModeProp, E as createAutoCompleteProp, y as createMaxLengthProp, z as createMinLengthProp, g as createAriaLabelProp } from './common-5a3610e7.esm.js';
|
|
5
5
|
import { g as PlasmicTextFieldContext, c as PlasmicInputContext } from './contexts-5cb81c2f.esm.js';
|
|
6
6
|
import { p as pickAriaComponentVariants } from './variant-utils-65364e9b.esm.js';
|
|
7
7
|
import '@plasmicapp/host';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAriaComponents = require('react-aria-components');
|
|
5
|
-
var common = require('./common-
|
|
5
|
+
var common = require('./common-e9872bf5.cjs.js');
|
|
6
6
|
require('@plasmicapp/host');
|
|
7
7
|
require('@plasmicapp/host/registerComponent');
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Label } from 'react-aria-components';
|
|
3
|
-
import {
|
|
3
|
+
import { n as extractPlasmicDataProps, m as makeComponentName, r as registerComponentHelper, C as COMMON_STYLES, c as createIdProp, g as createAriaLabelProp } from './common-5a3610e7.esm.js';
|
|
4
4
|
import '@plasmicapp/host';
|
|
5
5
|
import '@plasmicapp/host/registerComponent';
|
|
6
6
|
|
|
@@ -2,8 +2,8 @@ import { usePlasmicCanvasContext } from '@plasmicapp/host';
|
|
|
2
2
|
import React, { useState, useEffect } from 'react';
|
|
3
3
|
import { mergeProps } from 'react-aria';
|
|
4
4
|
import { ListBoxSection, Header, ListBox } from 'react-aria-components';
|
|
5
|
-
import { u as useIdManager } from './OptionsItemIdManager-
|
|
6
|
-
import { r as registerComponentHelper, C as COMMON_STYLES, m as makeComponentName,
|
|
5
|
+
import { u as useIdManager } from './OptionsItemIdManager-abecfd79.esm.js';
|
|
6
|
+
import { r as registerComponentHelper, C as COMMON_STYLES, m as makeComponentName, g as createAriaLabelProp, c as createIdProp, f as focusEventHandlerProps } from './common-5a3610e7.esm.js';
|
|
7
7
|
import { b as PlasmicListBoxContext } from './contexts-5cb81c2f.esm.js';
|
|
8
8
|
import { registerListBoxItem, makeDefaultListBoxItemChildren } from './registerListBoxItem.esm.js';
|
|
9
9
|
import { p as pickAriaComponentVariants } from './variant-utils-65364e9b.esm.js';
|
|
@@ -255,7 +255,7 @@ function registerListBox(loader, overrides) {
|
|
|
255
255
|
borderStyle: "solid",
|
|
256
256
|
borderColor: "black"
|
|
257
257
|
},
|
|
258
|
-
props: {
|
|
258
|
+
props: __spreadValues({
|
|
259
259
|
id: createIdProp("List Box"),
|
|
260
260
|
"aria-label": createAriaLabelProp("List Box"),
|
|
261
261
|
children: {
|
|
@@ -333,7 +333,7 @@ function registerListBox(loader, overrides) {
|
|
|
333
333
|
type: "eventHandler",
|
|
334
334
|
argTypes: [{ name: "selectedValues", type: "object" }]
|
|
335
335
|
}
|
|
336
|
-
},
|
|
336
|
+
}, focusEventHandlerProps()),
|
|
337
337
|
states: {
|
|
338
338
|
selectedValue: __spreadValues({
|
|
339
339
|
type: "writable",
|
|
@@ -355,4 +355,4 @@ function registerListBox(loader, overrides) {
|
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
export { BaseSection as B, LIST_BOX_COMPONENT_NAME as L, BaseListBox as a, registerListBox as b, listboxHelpers as l, registerSection as r };
|
|
358
|
-
//# sourceMappingURL=registerListBox-
|
|
358
|
+
//# sourceMappingURL=registerListBox-020ce7b4.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerListBox-020ce7b4.esm.js","sources":["../src/registerSection.tsx","../src/registerListBox.tsx"],"sourcesContent":["import React from \"react\";\nimport { Header, ListBoxSection } from \"react-aria-components\";\nimport { COMMON_STYLES, createAriaLabelProp } from \"./common\";\nimport { PlasmicListBoxContext } from \"./contexts\";\nimport { BaseListBox } from \"./registerListBox\";\nimport {\n CodeComponentMetaOverrides,\n Registerable,\n Styleable,\n makeComponentName,\n registerComponentHelper,\n} from \"./utils\";\n\nexport interface BaseSectionProps extends Styleable {\n items: React.ReactNode;\n header: React.ReactNode;\n}\n\nexport function BaseSection(props: BaseSectionProps) {\n const { header, items, ...rest } = props;\n const contextProps = React.useContext(PlasmicListBoxContext);\n const isStandalone = !contextProps;\n\n const section = (\n <ListBoxSection {...rest} style={COMMON_STYLES}>\n <Header>{header}</Header>\n {items}\n </ListBoxSection>\n );\n\n if (isStandalone) {\n return (\n // BaseListbox should give section a listbox context (that it can't be used without)\n // as well as the id manager (that is needed to identify and warn about duplication of ids)\n // selection mode needs to be single/multiple to be able to trigger hover state on it.\n <BaseListBox selectionMode=\"single\">{section}</BaseListBox>\n );\n }\n\n return section;\n}\n\nexport function registerSection(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseSection>\n) {\n return registerComponentHelper(\n loader,\n BaseSection,\n {\n name: makeComponentName(\"section\"),\n displayName: \"Aria Section\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerSection\",\n importName: \"BaseSection\",\n defaultStyles: {\n width: \"stretch\",\n padding: \"10px\",\n },\n props: {\n \"aria-label\": createAriaLabelProp(\"Section\"),\n header: {\n type: \"slot\",\n mergeWithParent: true,\n defaultValue: [\n {\n type: \"text\",\n value: \"Section Header.\",\n },\n ],\n },\n items: {\n type: \"slot\",\n mergeWithParent: true,\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n","import { usePlasmicCanvasContext } from \"@plasmicapp/host\";\nimport React, { useEffect, useState } from \"react\";\nimport { mergeProps } from \"react-aria\";\nimport { Key, ListBox } from \"react-aria-components\";\nimport { useIdManager } from \"./OptionsItemIdManager\";\nimport {\n COMMON_STYLES,\n createAriaLabelProp,\n createIdProp,\n focusEventHandlerProps,\n} from \"./common\";\nimport { PlasmicListBoxContext } from \"./contexts\";\nimport {\n makeDefaultListBoxItemChildren,\n registerListBoxItem,\n} from \"./registerListBoxItem\";\nimport { registerSection } from \"./registerSection\";\nimport {\n BaseControlContextDataForLists,\n CodeComponentMetaOverrides,\n HasControlContextData,\n Registerable,\n makeComponentName,\n registerComponentHelper,\n} from \"./utils\";\nimport { WithVariants, pickAriaComponentVariants } from \"./variant-utils\";\n\nexport interface BaseListBoxControlContextData\n extends BaseControlContextDataForLists {\n isStandalone: boolean;\n}\n\nconst LISTBOX_VARIANTS = [\"focused\" as const];\n\nconst { variants: LISTBOX_VARIANTS_DATA } =\n pickAriaComponentVariants(LISTBOX_VARIANTS);\n\nexport interface BaseListBoxProps\n extends Omit<\n React.ComponentProps<typeof ListBox>,\n \"selectedKeys\" | \"defaultSelectedKeys\" | \"className\"\n >,\n HasControlContextData<BaseListBoxControlContextData>,\n WithVariants<typeof LISTBOX_VARIANTS> {\n children?: React.ReactNode;\n selectedKeys?: string | string[] | undefined;\n defaultSelectedKeys?: string | string[] | undefined;\n className?: string;\n}\n\nexport const listboxHelpers = {\n states: {\n selectedValue: {\n onChangeArgsToValue: (value: Set<Key> | string[] | string) => {\n // only single selection is supported\n return Array.from(value)[0];\n },\n },\n },\n};\n\nfunction normalizeSelectedKeys(selectedKeys: string | string[] | undefined) {\n // Listbox expects it to be of type \"all\" | Iterable\n return typeof selectedKeys === \"string\" && selectedKeys !== \"all\"\n ? [selectedKeys]\n : selectedKeys;\n}\n\nexport function BaseListBox(props: BaseListBoxProps) {\n const {\n setControlContextData: setControlContextData,\n children,\n selectedKeys,\n defaultSelectedKeys,\n plasmicUpdateVariant,\n ...rest\n } = props;\n const context = React.useContext(PlasmicListBoxContext);\n const isStandalone = !context;\n const [ids, setIds] = useState<string[]>([]);\n const inEditor = usePlasmicCanvasContext();\n\n const idManager = useIdManager(setIds, context?.idManager);\n\n const mergedProps = mergeProps(rest, {\n onFocusChange: (focused: boolean) => {\n plasmicUpdateVariant?.({ focused });\n },\n // `shouldUseVirtualFocus` is not part of the ListBox prop types, but it's passed through to useListBox, which does support it.\n // In editor, we use virtual focus to prevent the listbox from stealing focus\n ...(inEditor ? { shouldUseVirtualFocus: true } : {}),\n style: COMMON_STYLES,\n selectedKeys: normalizeSelectedKeys(selectedKeys),\n defaultSelectedKeys: normalizeSelectedKeys(defaultSelectedKeys),\n });\n\n useEffect(() => {\n setControlContextData?.({\n itemIds: ids,\n isStandalone,\n });\n }, [ids, isStandalone, setControlContextData]);\n\n const listbox = <ListBox {...mergedProps}>{children}</ListBox>;\n\n if (isStandalone) {\n return (\n <PlasmicListBoxContext.Provider\n value={{\n idManager,\n }}\n >\n {listbox}\n </PlasmicListBoxContext.Provider>\n );\n }\n\n return listbox;\n}\n\nexport const LIST_BOX_COMPONENT_NAME = makeComponentName(\"listbox\");\n\nexport function registerListBox(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseListBox>\n) {\n const listBoxItemMeta = registerListBoxItem(loader, {\n parentComponentName: LIST_BOX_COMPONENT_NAME,\n });\n const sectionMeta = registerSection(loader, {\n parentComponentName: LIST_BOX_COMPONENT_NAME,\n props: {\n items: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"section-1-1\",\n textValue: \"Section1-Item 1\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 1\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"section-1-2\",\n textValue: \"Section1-Item 2\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 2\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"section-1-3\",\n textValue: \"Section1-Item 3\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 3\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n ],\n },\n },\n });\n\n registerComponentHelper(\n loader,\n BaseListBox,\n {\n name: LIST_BOX_COMPONENT_NAME,\n displayName: \"Aria ListBox\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerListBox\",\n importName: \"BaseListBox\",\n variants: LISTBOX_VARIANTS_DATA,\n defaultStyles: {\n width: \"250px\",\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"black\",\n },\n props: {\n id: createIdProp(\"List Box\"),\n \"aria-label\": createAriaLabelProp(\"List Box\"),\n children: {\n type: \"slot\",\n displayName: \"List Items\",\n allowedComponents: [listBoxItemMeta.name, sectionMeta.name],\n allowRootWrapper: true,\n defaultValue: [\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"1\",\n textValue: \"Item 1\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 1\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"2\",\n textValue: \"Item 2\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 2\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"3\",\n textValue: \"Item 3\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 3\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: sectionMeta.name,\n },\n ],\n },\n selectionMode: {\n type: \"choice\",\n description: \"The selection mode of the listbox\",\n options: [\"none\", \"single\"],\n defaultValue: \"none\",\n hidden: (_props, ctx) => !ctx?.isStandalone,\n },\n selectedKeys: {\n type: \"choice\",\n editOnly: true,\n uncontrolledProp: \"defaultSelectedKeys\",\n displayName: \"Initial selected item\",\n options: (_props, ctx) =>\n ctx?.itemIds ? Array.from(ctx.itemIds) : [],\n hidden: (props, ctx) =>\n !ctx?.isStandalone || props.selectionMode === \"none\",\n // We do not support multiple selections yet (Because React Aria select and combobox only support single selections).\n multiSelect: false,\n },\n onSelectionChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"selectedValues\", type: \"object\" }],\n },\n ...focusEventHandlerProps(),\n },\n states: {\n selectedValue: {\n type: \"writable\",\n valueProp: \"selectedKeys\",\n hidden: (props, ctx) =>\n !ctx?.isStandalone || props.selectionMode === \"none\",\n onChangeProp: \"onSelectionChange\",\n variableType: \"text\",\n ...listboxHelpers.states.selectedValue,\n },\n },\n componentHelpers: {\n helpers: listboxHelpers,\n importName: \"listboxHelpers\",\n importPath: \"@plasmicp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OACd;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;"}
|
|
@@ -4,8 +4,8 @@ var host = require('@plasmicapp/host');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var reactAria = require('react-aria');
|
|
6
6
|
var reactAriaComponents = require('react-aria-components');
|
|
7
|
-
var OptionsItemIdManager = require('./OptionsItemIdManager-
|
|
8
|
-
var common = require('./common-
|
|
7
|
+
var OptionsItemIdManager = require('./OptionsItemIdManager-d01901ad.cjs.js');
|
|
8
|
+
var common = require('./common-e9872bf5.cjs.js');
|
|
9
9
|
var contexts = require('./contexts-6d0cb2b1.cjs.js');
|
|
10
10
|
var registerListBoxItem = require('./registerListBoxItem.cjs.js');
|
|
11
11
|
var variantUtils = require('./variant-utils-d46df529.cjs.js');
|
|
@@ -261,7 +261,7 @@ function registerListBox(loader, overrides) {
|
|
|
261
261
|
borderStyle: "solid",
|
|
262
262
|
borderColor: "black"
|
|
263
263
|
},
|
|
264
|
-
props: {
|
|
264
|
+
props: __spreadValues({
|
|
265
265
|
id: common.createIdProp("List Box"),
|
|
266
266
|
"aria-label": common.createAriaLabelProp("List Box"),
|
|
267
267
|
children: {
|
|
@@ -339,7 +339,7 @@ function registerListBox(loader, overrides) {
|
|
|
339
339
|
type: "eventHandler",
|
|
340
340
|
argTypes: [{ name: "selectedValues", type: "object" }]
|
|
341
341
|
}
|
|
342
|
-
},
|
|
342
|
+
}, common.focusEventHandlerProps()),
|
|
343
343
|
states: {
|
|
344
344
|
selectedValue: __spreadValues({
|
|
345
345
|
type: "writable",
|
|
@@ -366,4 +366,4 @@ exports.LIST_BOX_COMPONENT_NAME = LIST_BOX_COMPONENT_NAME;
|
|
|
366
366
|
exports.listboxHelpers = listboxHelpers;
|
|
367
367
|
exports.registerListBox = registerListBox;
|
|
368
368
|
exports.registerSection = registerSection;
|
|
369
|
-
//# sourceMappingURL=registerListBox-
|
|
369
|
+
//# sourceMappingURL=registerListBox-d2c459cc.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerListBox-d2c459cc.cjs.js","sources":["../src/registerSection.tsx","../src/registerListBox.tsx"],"sourcesContent":["import React from \"react\";\nimport { Header, ListBoxSection } from \"react-aria-components\";\nimport { COMMON_STYLES, createAriaLabelProp } from \"./common\";\nimport { PlasmicListBoxContext } from \"./contexts\";\nimport { BaseListBox } from \"./registerListBox\";\nimport {\n CodeComponentMetaOverrides,\n Registerable,\n Styleable,\n makeComponentName,\n registerComponentHelper,\n} from \"./utils\";\n\nexport interface BaseSectionProps extends Styleable {\n items: React.ReactNode;\n header: React.ReactNode;\n}\n\nexport function BaseSection(props: BaseSectionProps) {\n const { header, items, ...rest } = props;\n const contextProps = React.useContext(PlasmicListBoxContext);\n const isStandalone = !contextProps;\n\n const section = (\n <ListBoxSection {...rest} style={COMMON_STYLES}>\n <Header>{header}</Header>\n {items}\n </ListBoxSection>\n );\n\n if (isStandalone) {\n return (\n // BaseListbox should give section a listbox context (that it can't be used without)\n // as well as the id manager (that is needed to identify and warn about duplication of ids)\n // selection mode needs to be single/multiple to be able to trigger hover state on it.\n <BaseListBox selectionMode=\"single\">{section}</BaseListBox>\n );\n }\n\n return section;\n}\n\nexport function registerSection(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseSection>\n) {\n return registerComponentHelper(\n loader,\n BaseSection,\n {\n name: makeComponentName(\"section\"),\n displayName: \"Aria Section\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerSection\",\n importName: \"BaseSection\",\n defaultStyles: {\n width: \"stretch\",\n padding: \"10px\",\n },\n props: {\n \"aria-label\": createAriaLabelProp(\"Section\"),\n header: {\n type: \"slot\",\n mergeWithParent: true,\n defaultValue: [\n {\n type: \"text\",\n value: \"Section Header.\",\n },\n ],\n },\n items: {\n type: \"slot\",\n mergeWithParent: true,\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n","import { usePlasmicCanvasContext } from \"@plasmicapp/host\";\nimport React, { useEffect, useState } from \"react\";\nimport { mergeProps } from \"react-aria\";\nimport { Key, ListBox } from \"react-aria-components\";\nimport { useIdManager } from \"./OptionsItemIdManager\";\nimport {\n COMMON_STYLES,\n createAriaLabelProp,\n createIdProp,\n focusEventHandlerProps,\n} from \"./common\";\nimport { PlasmicListBoxContext } from \"./contexts\";\nimport {\n makeDefaultListBoxItemChildren,\n registerListBoxItem,\n} from \"./registerListBoxItem\";\nimport { registerSection } from \"./registerSection\";\nimport {\n BaseControlContextDataForLists,\n CodeComponentMetaOverrides,\n HasControlContextData,\n Registerable,\n makeComponentName,\n registerComponentHelper,\n} from \"./utils\";\nimport { WithVariants, pickAriaComponentVariants } from \"./variant-utils\";\n\nexport interface BaseListBoxControlContextData\n extends BaseControlContextDataForLists {\n isStandalone: boolean;\n}\n\nconst LISTBOX_VARIANTS = [\"focused\" as const];\n\nconst { variants: LISTBOX_VARIANTS_DATA } =\n pickAriaComponentVariants(LISTBOX_VARIANTS);\n\nexport interface BaseListBoxProps\n extends Omit<\n React.ComponentProps<typeof ListBox>,\n \"selectedKeys\" | \"defaultSelectedKeys\" | \"className\"\n >,\n HasControlContextData<BaseListBoxControlContextData>,\n WithVariants<typeof LISTBOX_VARIANTS> {\n children?: React.ReactNode;\n selectedKeys?: string | string[] | undefined;\n defaultSelectedKeys?: string | string[] | undefined;\n className?: string;\n}\n\nexport const listboxHelpers = {\n states: {\n selectedValue: {\n onChangeArgsToValue: (value: Set<Key> | string[] | string) => {\n // only single selection is supported\n return Array.from(value)[0];\n },\n },\n },\n};\n\nfunction normalizeSelectedKeys(selectedKeys: string | string[] | undefined) {\n // Listbox expects it to be of type \"all\" | Iterable\n return typeof selectedKeys === \"string\" && selectedKeys !== \"all\"\n ? [selectedKeys]\n : selectedKeys;\n}\n\nexport function BaseListBox(props: BaseListBoxProps) {\n const {\n setControlContextData: setControlContextData,\n children,\n selectedKeys,\n defaultSelectedKeys,\n plasmicUpdateVariant,\n ...rest\n } = props;\n const context = React.useContext(PlasmicListBoxContext);\n const isStandalone = !context;\n const [ids, setIds] = useState<string[]>([]);\n const inEditor = usePlasmicCanvasContext();\n\n const idManager = useIdManager(setIds, context?.idManager);\n\n const mergedProps = mergeProps(rest, {\n onFocusChange: (focused: boolean) => {\n plasmicUpdateVariant?.({ focused });\n },\n // `shouldUseVirtualFocus` is not part of the ListBox prop types, but it's passed through to useListBox, which does support it.\n // In editor, we use virtual focus to prevent the listbox from stealing focus\n ...(inEditor ? { shouldUseVirtualFocus: true } : {}),\n style: COMMON_STYLES,\n selectedKeys: normalizeSelectedKeys(selectedKeys),\n defaultSelectedKeys: normalizeSelectedKeys(defaultSelectedKeys),\n });\n\n useEffect(() => {\n setControlContextData?.({\n itemIds: ids,\n isStandalone,\n });\n }, [ids, isStandalone, setControlContextData]);\n\n const listbox = <ListBox {...mergedProps}>{children}</ListBox>;\n\n if (isStandalone) {\n return (\n <PlasmicListBoxContext.Provider\n value={{\n idManager,\n }}\n >\n {listbox}\n </PlasmicListBoxContext.Provider>\n );\n }\n\n return listbox;\n}\n\nexport const LIST_BOX_COMPONENT_NAME = makeComponentName(\"listbox\");\n\nexport function registerListBox(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseListBox>\n) {\n const listBoxItemMeta = registerListBoxItem(loader, {\n parentComponentName: LIST_BOX_COMPONENT_NAME,\n });\n const sectionMeta = registerSection(loader, {\n parentComponentName: LIST_BOX_COMPONENT_NAME,\n props: {\n items: {\n type: \"slot\",\n defaultValue: [\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"section-1-1\",\n textValue: \"Section1-Item 1\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 1\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"section-1-2\",\n textValue: \"Section1-Item 2\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 2\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"section-1-3\",\n textValue: \"Section1-Item 3\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 3\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n ],\n },\n },\n });\n\n registerComponentHelper(\n loader,\n BaseListBox,\n {\n name: LIST_BOX_COMPONENT_NAME,\n displayName: \"Aria ListBox\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerListBox\",\n importName: \"BaseListBox\",\n variants: LISTBOX_VARIANTS_DATA,\n defaultStyles: {\n width: \"250px\",\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"black\",\n },\n props: {\n id: createIdProp(\"List Box\"),\n \"aria-label\": createAriaLabelProp(\"List Box\"),\n children: {\n type: \"slot\",\n displayName: \"List Items\",\n allowedComponents: [listBoxItemMeta.name, sectionMeta.name],\n allowRootWrapper: true,\n defaultValue: [\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"1\",\n textValue: \"Item 1\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 1\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"2\",\n textValue: \"Item 2\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 2\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: listBoxItemMeta.name,\n props: {\n id: \"3\",\n textValue: \"Item 3\",\n children: [\n makeDefaultListBoxItemChildren(\n \"Item 3\",\n \"Add dynamic values to make it more interesting\"\n ),\n ],\n },\n },\n {\n type: \"component\",\n name: sectionMeta.name,\n },\n ],\n },\n selectionMode: {\n type: \"choice\",\n description: \"The selection mode of the listbox\",\n options: [\"none\", \"single\"],\n defaultValue: \"none\",\n hidden: (_props, ctx) => !ctx?.isStandalone,\n },\n selectedKeys: {\n type: \"choice\",\n editOnly: true,\n uncontrolledProp: \"defaultSelectedKeys\",\n displayName: \"Initial selected item\",\n options: (_props, ctx) =>\n ctx?.itemIds ? Array.from(ctx.itemIds) : [],\n hidden: (props, ctx) =>\n !ctx?.isStandalone || props.selectionMode === \"none\",\n // We do not support multiple selections yet (Because React Aria select and combobox only support single selections).\n multiSelect: false,\n },\n onSelectionChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"selectedValues\", type: \"object\" }],\n },\n ...focusEventHandlerProps(),\n },\n states: {\n selectedValue: {\n type: \"writable\",\n valueProp: \"selectedKeys\",\n hidden: (props, ctx) =>\n !ctx?.isStandalone || props.selectionMode === \"none\",\n onChangeProp: \"onSelectionChange\",\n variableType: \"text\",\n ...listboxHelpers.states.selectedValue,\n },\n },\n componentHelpers: {\n helpers: listboxHelpers,\n importName: \"listboxHelpers\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerListBox\",\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":["__objRest","React","PlasmicListBoxContext","ListBoxSection","__spreadProps","__spreadValues","COMMON_STYLES","Header","registerComponentHelper","makeComponentName","createAriaLabelProp","pickAriaComponentVariants","useState","usePlasmicCanvasContext","useIdManager","mergeProps","useEffect","ListBox","registerListBoxItem","makeDefaultListBoxItemChildren","createIdProp","focusEventHandlerProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBO,SAAS,YAAY,KAAyB,EAAA;AACnD,EAAmC,MAAA,EAAA,GAAA,KAAA,EAA3B,UAAQ,KAnBlB,EAAA,GAmBqC,IAAT,IAAS,GAAAA,WAAA,CAAA,EAAA,EAAT,CAAlB,QAAQ,EAAA,OAAA,CAAA,CAAA,CAAA;AAChB,EAAM,MAAA,YAAA,GAAeC,sBAAM,CAAA,UAAA,CAAWC,8BAAqB,CAAA,CAAA;AAC3D,EAAA,MAAM,eAAe,CAAC,YAAA,CAAA;AAEtB,EAAM,MAAA,OA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AAA,GAAA,CAAA,YAAA,CAAA,IAAgB,MAAM,aAAkB,KAAA,MAAA;AAAA;AAAA,UAEhD,WAAa,EAAA,KAAA;AAAA,SACf;AAAA,QACA,iBAAmB,EAAA;AAAA,UACjB,IAAM,EAAA,cAAA;AAAA,UACN,UAAU,CAAC,EAAE,MAAM,gBAAkB,EAAA,IAAA,EAAM,UAAU,CAAA;AAAA,SACvD;AAAA,OAAA,EACGE,6BAAuB,EAAA,CAAA;AAAA,MAE5B,MAAQ,EAAA;AAAA,QACN,aAAe,EAAA,cAAA,CAAA;AAAA,UACb,IAAM,EAAA,UAAA;AAAA,UACN,SAAW,EAAA,cAAA;AAAA,UACX,MAAA,EAAQ,CAAC,KAAO,EAAA,GAAA,KACd,EAAC,GAAK,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,GAAA,CAAA,YAAA,CAAA,IAAgB,MAAM,aAAkB,KAAA,MAAA;AAAA,UAChD,YAAc,EAAA,mBAAA;AAAA,UACd,YAAc,EAAA,MAAA;AAAA,SAAA,EACX,eAAe,MAAO,CAAA,aAAA,CAAA;AAAA,OAE7B;AAAA,MACA,gBAAkB,EAAA;AAAA,QAChB,OAAS,EAAA,cAAA;AAAA,QACT,UAAY,EAAA,gBAAA;AAAA,QACZ,UAAY,EAAA,gDAAA;AAAA,OACd;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;;;;;;"}
|
|
@@ -4,11 +4,11 @@ require('@plasmicapp/host');
|
|
|
4
4
|
require('react');
|
|
5
5
|
require('react-aria');
|
|
6
6
|
require('react-aria-components');
|
|
7
|
-
require('./OptionsItemIdManager-
|
|
8
|
-
require('./common-
|
|
7
|
+
require('./OptionsItemIdManager-d01901ad.cjs.js');
|
|
8
|
+
require('./common-e9872bf5.cjs.js');
|
|
9
9
|
require('./contexts-6d0cb2b1.cjs.js');
|
|
10
10
|
require('./registerListBoxItem.cjs.js');
|
|
11
|
-
var registerSection = require('./registerListBox-
|
|
11
|
+
var registerSection = require('./registerListBox-d2c459cc.cjs.js');
|
|
12
12
|
require('./variant-utils-d46df529.cjs.js');
|
|
13
13
|
require('@plasmicapp/host/registerComponent');
|
|
14
14
|
require('./registerDescription.cjs.js');
|
|
@@ -2,11 +2,11 @@ import '@plasmicapp/host';
|
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react-aria';
|
|
4
4
|
import 'react-aria-components';
|
|
5
|
-
import './OptionsItemIdManager-
|
|
6
|
-
import './common-
|
|
5
|
+
import './OptionsItemIdManager-abecfd79.esm.js';
|
|
6
|
+
import './common-5a3610e7.esm.js';
|
|
7
7
|
import './contexts-5cb81c2f.esm.js';
|
|
8
8
|
import './registerListBoxItem.esm.js';
|
|
9
|
-
export { a as BaseListBox, L as LIST_BOX_COMPONENT_NAME, l as listboxHelpers, b as registerListBox } from './registerListBox-
|
|
9
|
+
export { a as BaseListBox, L as LIST_BOX_COMPONENT_NAME, l as listboxHelpers, b as registerListBox } from './registerListBox-020ce7b4.esm.js';
|
|
10
10
|
import './variant-utils-65364e9b.esm.js';
|
|
11
11
|
import '@plasmicapp/host/registerComponent';
|
|
12
12
|
import './registerDescription.esm.js';
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAriaComponents = require('react-aria-components');
|
|
5
|
-
var OptionsItemIdManager = require('./OptionsItemIdManager-
|
|
6
|
-
var common = require('./common-
|
|
5
|
+
var OptionsItemIdManager = require('./OptionsItemIdManager-d01901ad.cjs.js');
|
|
6
|
+
var common = require('./common-e9872bf5.cjs.js');
|
|
7
7
|
var contexts = require('./contexts-6d0cb2b1.cjs.js');
|
|
8
8
|
var registerDescription = require('./registerDescription.cjs.js');
|
|
9
9
|
var registerText = require('./registerText.cjs.js');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ListBoxItem, ListBox } from 'react-aria-components';
|
|
3
|
-
import { a as useOptionsItemId } from './OptionsItemIdManager-
|
|
4
|
-
import { r as registerComponentHelper, C as COMMON_STYLES, m as makeComponentName } from './common-
|
|
3
|
+
import { a as useOptionsItemId } from './OptionsItemIdManager-abecfd79.esm.js';
|
|
4
|
+
import { r as registerComponentHelper, C as COMMON_STYLES, m as makeComponentName } from './common-5a3610e7.esm.js';
|
|
5
5
|
import { b as PlasmicListBoxContext } from './contexts-5cb81c2f.esm.js';
|
|
6
6
|
import { DESCRIPTION_COMPONENT_NAME } from './registerDescription.esm.js';
|
|
7
7
|
import { TEXT_COMPONENT_NAME } from './registerText.esm.js';
|
|
@@ -4,7 +4,7 @@ var host = require('@plasmicapp/host');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var reactAria = require('react-aria');
|
|
6
6
|
var reactAriaComponents = require('react-aria-components');
|
|
7
|
-
var common = require('./common-
|
|
7
|
+
var common = require('./common-e9872bf5.cjs.js');
|
|
8
8
|
var contexts = require('./contexts-6d0cb2b1.cjs.js');
|
|
9
9
|
require('@plasmicapp/host/registerComponent');
|
|
10
10
|
|
|
@@ -2,7 +2,7 @@ import { usePlasmicCanvasContext } from '@plasmicapp/host';
|
|
|
2
2
|
import React, { forwardRef, useImperativeHandle } from 'react';
|
|
3
3
|
import { mergeProps } from 'react-aria';
|
|
4
4
|
import { ModalOverlay, Modal } from 'react-aria-components';
|
|
5
|
-
import {
|
|
5
|
+
import { k as useIsOpen, m as makeComponentName, r as registerComponentHelper, c as createIdProp, h as hasParent } from './common-5a3610e7.esm.js';
|
|
6
6
|
import { d as PlasmicDialogTriggerContext } from './contexts-5cb81c2f.esm.js';
|
|
7
7
|
import '@plasmicapp/host/registerComponent';
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAriaComponents = require('react-aria-components');
|
|
5
|
-
var common = require('./common-
|
|
5
|
+
var common = require('./common-e9872bf5.cjs.js');
|
|
6
6
|
var variantUtils = require('./variant-utils-d46df529.cjs.js');
|
|
7
7
|
require('@plasmicapp/host');
|
|
8
8
|
require('@plasmicapp/host/registerComponent');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PopoverContext, TooltipTriggerStateContext, OverlayArrow } from 'react-aria-components';
|
|
3
|
-
import { m as makeComponentName, r as registerComponentHelper, C as COMMON_STYLES, c as createIdProp,
|
|
3
|
+
import { m as makeComponentName, r as registerComponentHelper, C as COMMON_STYLES, c as createIdProp, j as arrowDown } from './common-5a3610e7.esm.js';
|
|
4
4
|
import { p as pickAriaComponentVariants, V as VariantUpdater } from './variant-utils-65364e9b.esm.js';
|
|
5
5
|
import '@plasmicapp/host';
|
|
6
6
|
import '@plasmicapp/host/registerComponent';
|
|
@@ -4,7 +4,7 @@ var host = require('@plasmicapp/host');
|
|
|
4
4
|
var utils = require('@react-aria/utils');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var reactAriaComponents = require('react-aria-components');
|
|
7
|
-
var common = require('./common-
|
|
7
|
+
var common = require('./common-e9872bf5.cjs.js');
|
|
8
8
|
var contexts = require('./contexts-6d0cb2b1.cjs.js');
|
|
9
9
|
require('@plasmicapp/host/registerComponent');
|
|
10
10
|
|
|
@@ -2,7 +2,7 @@ import { usePlasmicCanvasContext } from '@plasmicapp/host';
|
|
|
2
2
|
import { mergeProps } from '@react-aria/utils';
|
|
3
3
|
import React, { useEffect } from 'react';
|
|
4
4
|
import { PopoverContext, Popover } from 'react-aria-components';
|
|
5
|
-
import { C as COMMON_STYLES, m as makeComponentName, r as registerComponentHelper,
|
|
5
|
+
import { C as COMMON_STYLES, m as makeComponentName, r as registerComponentHelper, o as getCommonOverlayProps, c as createIdProp } from './common-5a3610e7.esm.js';
|
|
6
6
|
import { a as PlasmicPopoverTriggerContext } from './contexts-5cb81c2f.esm.js';
|
|
7
7
|
import '@plasmicapp/host/registerComponent';
|
|
8
8
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAriaComponents = require('react-aria-components');
|
|
5
|
-
var OptionsItemIdManager = require('./OptionsItemIdManager-
|
|
6
|
-
var common = require('./common-
|
|
5
|
+
var OptionsItemIdManager = require('./OptionsItemIdManager-d01901ad.cjs.js');
|
|
6
|
+
var common = require('./common-e9872bf5.cjs.js');
|
|
7
7
|
var contexts = require('./contexts-6d0cb2b1.cjs.js');
|
|
8
8
|
var registerLabel = require('./registerLabel.cjs.js');
|
|
9
9
|
var variantUtils = require('./variant-utils-d46df529.cjs.js');
|
|
@@ -156,7 +156,7 @@ function registerRadio(loader, overrides) {
|
|
|
156
156
|
importPath: "@plasmicpkgs/react-aria/skinny/registerRadio",
|
|
157
157
|
importName: "BaseRadio",
|
|
158
158
|
variants,
|
|
159
|
-
props: {
|
|
159
|
+
props: __spreadValues({
|
|
160
160
|
id: common.createIdProp("Radio"),
|
|
161
161
|
isDisabled: common.createDisabledProp("Radio"),
|
|
162
162
|
autoFocus: common.createAutoFocusProp("Radio"),
|
|
@@ -176,7 +176,7 @@ function registerRadio(loader, overrides) {
|
|
|
176
176
|
return true;
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
},
|
|
179
|
+
}, common.focusEventHandlerProps()),
|
|
180
180
|
trapsFocus: true
|
|
181
181
|
},
|
|
182
182
|
overrides
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerRadio.cjs.js","sources":["../src/registerRadio.tsx"],"sourcesContent":["import { PlasmicElement } from \"@plasmicapp/host\";\nimport React from \"react\";\nimport type { RadioProps } from \"react-aria-components\";\nimport { Radio, RadioGroup } from \"react-aria-components\";\nimport { useOptionsItemId } from \"./OptionsItemIdManager\";\nimport {\n COMMON_STYLES,\n createAriaLabelProp,\n createAutoFocusProp,\n createDisabledProp,\n createIdProp,\n} from \"./common\";\nimport { PlasmicRadioGroupContext } from \"./contexts\";\nimport { LABEL_COMPONENT_NAME } from \"./registerLabel\";\nimport {\n BaseControlContextData,\n CodeComponentMetaOverrides,\n HasControlContextData,\n Registerable,\n makeComponentName,\n registerComponentHelper,\n} from \"./utils\";\nimport {\n VariantUpdater,\n WithVariants,\n pickAriaComponentVariants,\n} from \"./variant-utils\";\n\nconst RADIO_VARIANTS = [\n \"selected\" as const,\n \"hovered\" as const,\n \"pressed\" as const,\n \"focused\" as const,\n \"focusVisible\" as const,\n \"disabled\" as const,\n \"readonly\" as const,\n \"selected\" as const,\n];\n\nexport interface BaseRadioControlContextData extends BaseControlContextData {\n idError?: string;\n}\n\nexport interface BaseRadioProps\n extends RadioProps,\n HasControlContextData<BaseRadioControlContextData>,\n WithVariants<typeof RADIO_VARIANTS> {\n children: React.ReactNode;\n}\n\nconst { variants } = pickAriaComponentVariants(RADIO_VARIANTS);\n\nexport function BaseRadio(props: BaseRadioProps) {\n const {\n children,\n setControlContextData,\n plasmicUpdateVariant,\n value,\n ...rest\n } = props;\n const contextProps = React.useContext(PlasmicRadioGroupContext);\n const isStandalone = !contextProps;\n const { registeredId, idError } = useOptionsItemId(\n value,\n contextProps?.idManager\n );\n\n setControlContextData?.({\n parent: contextProps,\n idError,\n });\n\n const radio = (\n <Radio\n {...rest}\n value={registeredId ?? \"\"}\n key={registeredId}\n style={COMMON_STYLES}\n >\n {({\n isHovered,\n isPressed,\n isFocused,\n isFocusVisible,\n isSelected,\n isDisabled,\n isReadOnly,\n }) => (\n <>\n <VariantUpdater\n changes={{\n hovered: isHovered,\n pressed: isPressed,\n focused: isFocused,\n focusVisible: isFocusVisible,\n selected: isSelected,\n disabled: isDisabled,\n readonly: isReadOnly,\n }}\n updateVariant={plasmicUpdateVariant}\n />\n {children}\n </>\n )}\n </Radio>\n );\n\n if (isStandalone) {\n return <RadioGroup>{radio}</RadioGroup>;\n }\n\n return radio;\n}\n\nexport const makeDefaultRadioChildren = (label: string): PlasmicElement => ({\n type: \"hbox\",\n styles: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"10px\",\n padding: 0,\n },\n children: [\n {\n type: \"box\",\n styles: {\n width: \"7px\",\n height: \"7px\",\n borderRadius: \"100%\",\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"black\",\n },\n },\n {\n type: \"component\",\n name: LABEL_COMPONENT_NAME,\n props: {\n children: {\n type: \"text\",\n value: label,\n },\n },\n },\n ],\n});\n\nexport function registerRadio(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseRadio>\n) {\n return registerComponentHelper(\n loader,\n BaseRadio,\n {\n name: makeComponentName(\"radio\"),\n displayName: \"Aria Radio\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerRadio\",\n importName: \"BaseRadio\",\n variants,\n props: {\n id: createIdProp(\"Radio\"),\n isDisabled: createDisabledProp(\"Radio\"),\n autoFocus: createAutoFocusProp(\"Radio\"),\n \"aria-label\": createAriaLabelProp(\"Radio\"),\n children: {\n type: \"slot\",\n mergeWithParent: true,\n defaultValue: makeDefaultRadioChildren(\"Radio\"),\n },\n value: {\n type: \"string\",\n description:\n \"The value of the input element, used when submitting an HTML form.\",\n validator: (_value, _props, ctx) => {\n if (ctx?.idError) {\n return ctx.idError;\n }\n return true;\n },\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":["pickAriaComponentVariants","React","PlasmicRadioGroupContext","useOptionsItemId","Radio","COMMON_STYLES","VariantUpdater","RadioGroup","LABEL_COMPONENT_NAME","registerComponentHelper","makeComponentName","createIdProp","createDisabledProp","createAutoFocusProp","createAriaLabelProp"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"registerRadio.cjs.js","sources":["../src/registerRadio.tsx"],"sourcesContent":["import { PlasmicElement } from \"@plasmicapp/host\";\nimport React from \"react\";\nimport type { RadioProps } from \"react-aria-components\";\nimport { Radio, RadioGroup } from \"react-aria-components\";\nimport { useOptionsItemId } from \"./OptionsItemIdManager\";\nimport {\n COMMON_STYLES,\n createAriaLabelProp,\n createAutoFocusProp,\n createDisabledProp,\n createIdProp,\n focusEventHandlerProps,\n} from \"./common\";\nimport { PlasmicRadioGroupContext } from \"./contexts\";\nimport { LABEL_COMPONENT_NAME } from \"./registerLabel\";\nimport {\n BaseControlContextData,\n CodeComponentMetaOverrides,\n HasControlContextData,\n Registerable,\n makeComponentName,\n registerComponentHelper,\n} from \"./utils\";\nimport {\n VariantUpdater,\n WithVariants,\n pickAriaComponentVariants,\n} from \"./variant-utils\";\n\nconst RADIO_VARIANTS = [\n \"selected\" as const,\n \"hovered\" as const,\n \"pressed\" as const,\n \"focused\" as const,\n \"focusVisible\" as const,\n \"disabled\" as const,\n \"readonly\" as const,\n \"selected\" as const,\n];\n\nexport interface BaseRadioControlContextData extends BaseControlContextData {\n idError?: string;\n}\n\nexport interface BaseRadioProps\n extends RadioProps,\n HasControlContextData<BaseRadioControlContextData>,\n WithVariants<typeof RADIO_VARIANTS> {\n children: React.ReactNode;\n}\n\nconst { variants } = pickAriaComponentVariants(RADIO_VARIANTS);\n\nexport function BaseRadio(props: BaseRadioProps) {\n const {\n children,\n setControlContextData,\n plasmicUpdateVariant,\n value,\n ...rest\n } = props;\n const contextProps = React.useContext(PlasmicRadioGroupContext);\n const isStandalone = !contextProps;\n const { registeredId, idError } = useOptionsItemId(\n value,\n contextProps?.idManager\n );\n\n setControlContextData?.({\n parent: contextProps,\n idError,\n });\n\n const radio = (\n <Radio\n {...rest}\n value={registeredId ?? \"\"}\n key={registeredId}\n style={COMMON_STYLES}\n >\n {({\n isHovered,\n isPressed,\n isFocused,\n isFocusVisible,\n isSelected,\n isDisabled,\n isReadOnly,\n }) => (\n <>\n <VariantUpdater\n changes={{\n hovered: isHovered,\n pressed: isPressed,\n focused: isFocused,\n focusVisible: isFocusVisible,\n selected: isSelected,\n disabled: isDisabled,\n readonly: isReadOnly,\n }}\n updateVariant={plasmicUpdateVariant}\n />\n {children}\n </>\n )}\n </Radio>\n );\n\n if (isStandalone) {\n return <RadioGroup>{radio}</RadioGroup>;\n }\n\n return radio;\n}\n\nexport const makeDefaultRadioChildren = (label: string): PlasmicElement => ({\n type: \"hbox\",\n styles: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"10px\",\n padding: 0,\n },\n children: [\n {\n type: \"box\",\n styles: {\n width: \"7px\",\n height: \"7px\",\n borderRadius: \"100%\",\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"black\",\n },\n },\n {\n type: \"component\",\n name: LABEL_COMPONENT_NAME,\n props: {\n children: {\n type: \"text\",\n value: label,\n },\n },\n },\n ],\n});\n\nexport function registerRadio(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseRadio>\n) {\n return registerComponentHelper(\n loader,\n BaseRadio,\n {\n name: makeComponentName(\"radio\"),\n displayName: \"Aria Radio\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerRadio\",\n importName: \"BaseRadio\",\n variants,\n props: {\n id: createIdProp(\"Radio\"),\n isDisabled: createDisabledProp(\"Radio\"),\n autoFocus: createAutoFocusProp(\"Radio\"),\n \"aria-label\": createAriaLabelProp(\"Radio\"),\n children: {\n type: \"slot\",\n mergeWithParent: true,\n defaultValue: makeDefaultRadioChildren(\"Radio\"),\n },\n value: {\n type: \"string\",\n description:\n \"The value of the input element, used when submitting an HTML form.\",\n validator: (_value, _props, ctx) => {\n if (ctx?.idError) {\n return ctx.idError;\n }\n return true;\n },\n },\n ...focusEventHandlerProps(),\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":["pickAriaComponentVariants","React","PlasmicRadioGroupContext","useOptionsItemId","Radio","COMMON_STYLES","VariantUpdater","RadioGroup","LABEL_COMPONENT_NAME","registerComponentHelper","makeComponentName","createIdProp","createDisabledProp","createAutoFocusProp","createAriaLabelProp","focusEventHandlerProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAM,cAAiB,GAAA;AAAA,EACrB,UAAA;AAAA,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AA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Radio, RadioGroup } from 'react-aria-components';
|
|
3
|
-
import { a as useOptionsItemId } from './OptionsItemIdManager-
|
|
4
|
-
import { r as registerComponentHelper, C as COMMON_STYLES,
|
|
3
|
+
import { a as useOptionsItemId } from './OptionsItemIdManager-abecfd79.esm.js';
|
|
4
|
+
import { r as registerComponentHelper, m as makeComponentName, C as COMMON_STYLES, f as focusEventHandlerProps, c as createIdProp, b as createDisabledProp, i as createAutoFocusProp, g as createAriaLabelProp } from './common-5a3610e7.esm.js';
|
|
5
5
|
import { e as PlasmicRadioGroupContext } from './contexts-5cb81c2f.esm.js';
|
|
6
6
|
import { LABEL_COMPONENT_NAME } from './registerLabel.esm.js';
|
|
7
7
|
import { p as pickAriaComponentVariants, V as VariantUpdater } from './variant-utils-65364e9b.esm.js';
|
|
@@ -150,7 +150,7 @@ function registerRadio(loader, overrides) {
|
|
|
150
150
|
importPath: "@plasmicpkgs/react-aria/skinny/registerRadio",
|
|
151
151
|
importName: "BaseRadio",
|
|
152
152
|
variants,
|
|
153
|
-
props: {
|
|
153
|
+
props: __spreadValues({
|
|
154
154
|
id: createIdProp("Radio"),
|
|
155
155
|
isDisabled: createDisabledProp("Radio"),
|
|
156
156
|
autoFocus: createAutoFocusProp("Radio"),
|
|
@@ -170,7 +170,7 @@ function registerRadio(loader, overrides) {
|
|
|
170
170
|
return true;
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
},
|
|
173
|
+
}, focusEventHandlerProps()),
|
|
174
174
|
trapsFocus: true
|
|
175
175
|
},
|
|
176
176
|
overrides
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerRadio.esm.js","sources":["../src/registerRadio.tsx"],"sourcesContent":["import { PlasmicElement } from \"@plasmicapp/host\";\nimport React from \"react\";\nimport type { RadioProps } from \"react-aria-components\";\nimport { Radio, RadioGroup } from \"react-aria-components\";\nimport { useOptionsItemId } from \"./OptionsItemIdManager\";\nimport {\n COMMON_STYLES,\n createAriaLabelProp,\n createAutoFocusProp,\n createDisabledProp,\n createIdProp,\n} from \"./common\";\nimport { PlasmicRadioGroupContext } from \"./contexts\";\nimport { LABEL_COMPONENT_NAME } from \"./registerLabel\";\nimport {\n BaseControlContextData,\n CodeComponentMetaOverrides,\n HasControlContextData,\n Registerable,\n makeComponentName,\n registerComponentHelper,\n} from \"./utils\";\nimport {\n VariantUpdater,\n WithVariants,\n pickAriaComponentVariants,\n} from \"./variant-utils\";\n\nconst RADIO_VARIANTS = [\n \"selected\" as const,\n \"hovered\" as const,\n \"pressed\" as const,\n \"focused\" as const,\n \"focusVisible\" as const,\n \"disabled\" as const,\n \"readonly\" as const,\n \"selected\" as const,\n];\n\nexport interface BaseRadioControlContextData extends BaseControlContextData {\n idError?: string;\n}\n\nexport interface BaseRadioProps\n extends RadioProps,\n HasControlContextData<BaseRadioControlContextData>,\n WithVariants<typeof RADIO_VARIANTS> {\n children: React.ReactNode;\n}\n\nconst { variants } = pickAriaComponentVariants(RADIO_VARIANTS);\n\nexport function BaseRadio(props: BaseRadioProps) {\n const {\n children,\n setControlContextData,\n plasmicUpdateVariant,\n value,\n ...rest\n } = props;\n const contextProps = React.useContext(PlasmicRadioGroupContext);\n const isStandalone = !contextProps;\n const { registeredId, idError } = useOptionsItemId(\n value,\n contextProps?.idManager\n );\n\n setControlContextData?.({\n parent: contextProps,\n idError,\n });\n\n const radio = (\n <Radio\n {...rest}\n value={registeredId ?? \"\"}\n key={registeredId}\n style={COMMON_STYLES}\n >\n {({\n isHovered,\n isPressed,\n isFocused,\n isFocusVisible,\n isSelected,\n isDisabled,\n isReadOnly,\n }) => (\n <>\n <VariantUpdater\n changes={{\n hovered: isHovered,\n pressed: isPressed,\n focused: isFocused,\n focusVisible: isFocusVisible,\n selected: isSelected,\n disabled: isDisabled,\n readonly: isReadOnly,\n }}\n updateVariant={plasmicUpdateVariant}\n />\n {children}\n </>\n )}\n </Radio>\n );\n\n if (isStandalone) {\n return <RadioGroup>{radio}</RadioGroup>;\n }\n\n return radio;\n}\n\nexport const makeDefaultRadioChildren = (label: string): PlasmicElement => ({\n type: \"hbox\",\n styles: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"10px\",\n padding: 0,\n },\n children: [\n {\n type: \"box\",\n styles: {\n width: \"7px\",\n height: \"7px\",\n borderRadius: \"100%\",\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"black\",\n },\n },\n {\n type: \"component\",\n name: LABEL_COMPONENT_NAME,\n props: {\n children: {\n type: \"text\",\n value: label,\n },\n },\n },\n ],\n});\n\nexport function registerRadio(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseRadio>\n) {\n return registerComponentHelper(\n loader,\n BaseRadio,\n {\n name: makeComponentName(\"radio\"),\n displayName: \"Aria Radio\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerRadio\",\n importName: \"BaseRadio\",\n variants,\n props: {\n id: createIdProp(\"Radio\"),\n isDisabled: createDisabledProp(\"Radio\"),\n autoFocus: createAutoFocusProp(\"Radio\"),\n \"aria-label\": createAriaLabelProp(\"Radio\"),\n children: {\n type: \"slot\",\n mergeWithParent: true,\n defaultValue: makeDefaultRadioChildren(\"Radio\"),\n },\n value: {\n type: \"string\",\n description:\n \"The value of the input element, used when submitting an HTML form.\",\n validator: (_value, _props, ctx) => {\n if (ctx?.idError) {\n return ctx.idError;\n }\n return true;\n },\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"registerRadio.esm.js","sources":["../src/registerRadio.tsx"],"sourcesContent":["import { PlasmicElement } from \"@plasmicapp/host\";\nimport React from \"react\";\nimport type { RadioProps } from \"react-aria-components\";\nimport { Radio, RadioGroup } from \"react-aria-components\";\nimport { useOptionsItemId } from \"./OptionsItemIdManager\";\nimport {\n COMMON_STYLES,\n createAriaLabelProp,\n createAutoFocusProp,\n createDisabledProp,\n createIdProp,\n focusEventHandlerProps,\n} from \"./common\";\nimport { PlasmicRadioGroupContext } from \"./contexts\";\nimport { LABEL_COMPONENT_NAME } from \"./registerLabel\";\nimport {\n BaseControlContextData,\n CodeComponentMetaOverrides,\n HasControlContextData,\n Registerable,\n makeComponentName,\n registerComponentHelper,\n} from \"./utils\";\nimport {\n VariantUpdater,\n WithVariants,\n pickAriaComponentVariants,\n} from \"./variant-utils\";\n\nconst RADIO_VARIANTS = [\n \"selected\" as const,\n \"hovered\" as const,\n \"pressed\" as const,\n \"focused\" as const,\n \"focusVisible\" as const,\n \"disabled\" as const,\n \"readonly\" as const,\n \"selected\" as const,\n];\n\nexport interface BaseRadioControlContextData extends BaseControlContextData {\n idError?: string;\n}\n\nexport interface BaseRadioProps\n extends RadioProps,\n HasControlContextData<BaseRadioControlContextData>,\n WithVariants<typeof RADIO_VARIANTS> {\n children: React.ReactNode;\n}\n\nconst { variants } = pickAriaComponentVariants(RADIO_VARIANTS);\n\nexport function BaseRadio(props: BaseRadioProps) {\n const {\n children,\n setControlContextData,\n plasmicUpdateVariant,\n value,\n ...rest\n } = props;\n const contextProps = React.useContext(PlasmicRadioGroupContext);\n const isStandalone = !contextProps;\n const { registeredId, idError } = useOptionsItemId(\n value,\n contextProps?.idManager\n );\n\n setControlContextData?.({\n parent: contextProps,\n idError,\n });\n\n const radio = (\n <Radio\n {...rest}\n value={registeredId ?? \"\"}\n key={registeredId}\n style={COMMON_STYLES}\n >\n {({\n isHovered,\n isPressed,\n isFocused,\n isFocusVisible,\n isSelected,\n isDisabled,\n isReadOnly,\n }) => (\n <>\n <VariantUpdater\n changes={{\n hovered: isHovered,\n pressed: isPressed,\n focused: isFocused,\n focusVisible: isFocusVisible,\n selected: isSelected,\n disabled: isDisabled,\n readonly: isReadOnly,\n }}\n updateVariant={plasmicUpdateVariant}\n />\n {children}\n </>\n )}\n </Radio>\n );\n\n if (isStandalone) {\n return <RadioGroup>{radio}</RadioGroup>;\n }\n\n return radio;\n}\n\nexport const makeDefaultRadioChildren = (label: string): PlasmicElement => ({\n type: \"hbox\",\n styles: {\n display: \"flex\",\n alignItems: \"center\",\n gap: \"10px\",\n padding: 0,\n },\n children: [\n {\n type: \"box\",\n styles: {\n width: \"7px\",\n height: \"7px\",\n borderRadius: \"100%\",\n borderWidth: \"1px\",\n borderStyle: \"solid\",\n borderColor: \"black\",\n },\n },\n {\n type: \"component\",\n name: LABEL_COMPONENT_NAME,\n props: {\n children: {\n type: \"text\",\n value: label,\n },\n },\n },\n ],\n});\n\nexport function registerRadio(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseRadio>\n) {\n return registerComponentHelper(\n loader,\n BaseRadio,\n {\n name: makeComponentName(\"radio\"),\n displayName: \"Aria Radio\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerRadio\",\n importName: \"BaseRadio\",\n variants,\n props: {\n id: createIdProp(\"Radio\"),\n isDisabled: createDisabledProp(\"Radio\"),\n autoFocus: createAutoFocusProp(\"Radio\"),\n \"aria-label\": createAriaLabelProp(\"Radio\"),\n children: {\n type: \"slot\",\n mergeWithParent: true,\n defaultValue: makeDefaultRadioChildren(\"Radio\"),\n },\n value: {\n type: \"string\",\n description:\n \"The value of the input element, used when submitting an HTML form.\",\n validator: (_value, _props, ctx) => {\n if (ctx?.idError) {\n return ctx.idError;\n }\n return true;\n },\n },\n ...focusEventHandlerProps(),\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAM,cAAiB,GAAA;AAAA,EACrB,UAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA;AAAA,EACA,cAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AAAA,EACA,UAAA;AACF,C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