@plasmicpkgs/react-aria 0.0.13 → 0.0.15
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/ErrorBoundary.d.ts +14 -0
- package/dist/contexts.d.ts +1 -1
- package/dist/react-aria.esm.js +757 -475
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +754 -472
- package/dist/react-aria.js.map +1 -1
- package/dist/registerCheckbox.d.ts +1 -0
- package/dist/registerInput.d.ts +2 -2
- package/dist/registerRadio.d.ts +1 -0
- package/dist/registerTextArea.d.ts +5 -0
- package/dist/registerTextField.d.ts +15 -0
- package/package.json +2 -2
- package/skinny/ErrorBoundary.d.ts +14 -0
- package/skinny/contexts.d.ts +1 -1
- package/skinny/registerButton.cjs.js +2 -2
- package/skinny/registerButton.cjs.js.map +1 -1
- package/skinny/registerButton.esm.js +2 -2
- package/skinny/registerButton.esm.js.map +1 -1
- package/skinny/registerCheckbox.cjs.js +24 -5
- package/skinny/registerCheckbox.cjs.js.map +1 -1
- package/skinny/registerCheckbox.d.ts +1 -0
- package/skinny/registerCheckbox.esm.js +24 -5
- package/skinny/registerCheckbox.esm.js.map +1 -1
- package/skinny/registerCheckboxGroup.cjs.js +2 -14
- package/skinny/registerCheckboxGroup.cjs.js.map +1 -1
- package/skinny/registerCheckboxGroup.esm.js +2 -14
- package/skinny/registerCheckboxGroup.esm.js.map +1 -1
- package/skinny/registerComboBox.cjs.js +4 -4
- package/skinny/registerComboBox.cjs.js.map +1 -1
- package/skinny/registerComboBox.esm.js +4 -4
- package/skinny/registerComboBox.esm.js.map +1 -1
- package/skinny/registerDescription.cjs.js +1 -1
- package/skinny/registerDescription.cjs.js.map +1 -1
- package/skinny/registerDescription.esm.js +1 -1
- package/skinny/registerDescription.esm.js.map +1 -1
- package/skinny/registerFieldError.cjs.js +2 -2
- package/skinny/registerFieldError.cjs.js.map +1 -1
- package/skinny/registerFieldError.esm.js +2 -2
- package/skinny/registerFieldError.esm.js.map +1 -1
- package/skinny/registerForm.cjs.js +2 -2
- package/skinny/registerForm.cjs.js.map +1 -1
- package/skinny/registerForm.esm.js +2 -2
- package/skinny/registerForm.esm.js.map +1 -1
- package/skinny/registerHeader.cjs.js +2 -2
- package/skinny/registerHeader.cjs.js.map +1 -1
- package/skinny/registerHeader.esm.js +2 -2
- package/skinny/registerHeader.esm.js.map +1 -1
- package/skinny/registerInput.cjs.js +10 -35
- package/skinny/registerInput.cjs.js.map +1 -1
- package/skinny/registerInput.d.ts +2 -2
- package/skinny/registerInput.esm.js +7 -32
- package/skinny/registerInput.esm.js.map +1 -1
- package/skinny/registerLabel.cjs.js +2 -2
- package/skinny/registerLabel.cjs.js.map +1 -1
- package/skinny/registerLabel.esm.js +2 -2
- package/skinny/registerLabel.esm.js.map +1 -1
- package/skinny/registerListBox.cjs.js +2 -2
- package/skinny/registerListBox.cjs.js.map +1 -1
- package/skinny/registerListBox.esm.js +2 -2
- package/skinny/registerListBox.esm.js.map +1 -1
- package/skinny/registerListBoxItem.cjs.js +2 -2
- package/skinny/registerListBoxItem.cjs.js.map +1 -1
- package/skinny/registerListBoxItem.esm.js +2 -2
- package/skinny/registerListBoxItem.esm.js.map +1 -1
- package/skinny/registerPopover.cjs.js +4 -4
- package/skinny/registerPopover.cjs.js.map +1 -1
- package/skinny/registerPopover.esm.js +4 -4
- package/skinny/registerPopover.esm.js.map +1 -1
- package/skinny/registerRadio.cjs.js +39 -27
- package/skinny/registerRadio.cjs.js.map +1 -1
- package/skinny/registerRadio.d.ts +1 -0
- package/skinny/registerRadio.esm.js +41 -29
- package/skinny/registerRadio.esm.js.map +1 -1
- package/skinny/registerRadioGroup.cjs.js +2 -15
- package/skinny/registerRadioGroup.cjs.js.map +1 -1
- package/skinny/registerRadioGroup.esm.js +2 -15
- package/skinny/registerRadioGroup.esm.js.map +1 -1
- package/skinny/registerSection.cjs.js +2 -2
- package/skinny/registerSection.cjs.js.map +1 -1
- package/skinny/registerSection.esm.js +2 -2
- package/skinny/registerSection.esm.js.map +1 -1
- package/skinny/registerSelect.cjs.js +3 -3
- package/skinny/registerSelect.cjs.js.map +1 -1
- package/skinny/registerSelect.esm.js +3 -3
- package/skinny/registerSelect.esm.js.map +1 -1
- package/skinny/registerSwitch.cjs.js +2 -2
- package/skinny/registerSwitch.cjs.js.map +1 -1
- package/skinny/registerSwitch.esm.js +2 -2
- package/skinny/registerSwitch.esm.js.map +1 -1
- package/skinny/registerText.cjs.js +2 -2
- package/skinny/registerText.cjs.js.map +1 -1
- package/skinny/registerText.esm.js +2 -2
- package/skinny/registerText.esm.js.map +1 -1
- package/skinny/registerTextArea.cjs.js +53 -0
- package/skinny/registerTextArea.cjs.js.map +1 -0
- package/skinny/registerTextArea.d.ts +5 -0
- package/skinny/registerTextArea.esm.js +46 -0
- package/skinny/registerTextArea.esm.js.map +1 -0
- package/skinny/registerTextField.cjs.js +278 -0
- package/skinny/registerTextField.cjs.js.map +1 -0
- package/skinny/registerTextField.d.ts +15 -0
- package/skinny/registerTextField.esm.js +271 -0
- package/skinny/registerTextField.esm.js.map +1 -0
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { mergeProps } from '@react-aria/utils';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { Input } from 'react-aria-components';
|
|
4
|
-
import { a as PlasmicInputContext } from './contexts-49f6c298.esm.js';
|
|
5
3
|
import { r as registerComponentHelper, m as makeComponentName } from './utils-28f98072.esm.js';
|
|
6
4
|
import '@plasmicapp/host/registerComponent';
|
|
7
5
|
|
|
@@ -22,8 +20,7 @@ var __spreadValues = (a, b) => {
|
|
|
22
20
|
return a;
|
|
23
21
|
};
|
|
24
22
|
function BaseInput(props) {
|
|
25
|
-
|
|
26
|
-
return /* @__PURE__ */ React.createElement(Input, __spreadValues({}, mergeProps(contextProps, props)));
|
|
23
|
+
return /* @__PURE__ */ React.createElement(Input, __spreadValues({}, props));
|
|
27
24
|
}
|
|
28
25
|
function registerInput(loader, overrides) {
|
|
29
26
|
registerComponentHelper(
|
|
@@ -31,37 +28,15 @@ function registerInput(loader, overrides) {
|
|
|
31
28
|
BaseInput,
|
|
32
29
|
{
|
|
33
30
|
name: makeComponentName("input"),
|
|
34
|
-
displayName: "
|
|
35
|
-
importPath: "@plasmicpkgs/react-aria/registerInput",
|
|
31
|
+
displayName: "Aria Input",
|
|
32
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerInput",
|
|
36
33
|
importName: "BaseInput",
|
|
37
34
|
props: {
|
|
38
|
-
|
|
39
|
-
type: "
|
|
40
|
-
displayName: "Additional states",
|
|
41
|
-
selectors: [
|
|
42
|
-
{
|
|
43
|
-
selector: ":self[data-hovered]",
|
|
44
|
-
label: "Hovered"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
selector: ":self[data-focused]",
|
|
48
|
-
label: "Focused"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
selector: ":self[data-focus-visible]",
|
|
52
|
-
label: "Focused by keyboard"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
selector: ":self[data-disabled]",
|
|
56
|
-
label: "Disabled"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
selector: ":self::placeholder",
|
|
60
|
-
label: "Placeholder"
|
|
61
|
-
}
|
|
62
|
-
]
|
|
35
|
+
placeholder: {
|
|
36
|
+
type: "string"
|
|
63
37
|
}
|
|
64
|
-
}
|
|
38
|
+
},
|
|
39
|
+
trapsFocus: true
|
|
65
40
|
},
|
|
66
41
|
overrides
|
|
67
42
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerInput.esm.js","sources":["../src/registerInput.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"registerInput.esm.js","sources":["../src/registerInput.tsx"],"sourcesContent":["import React from \"react\";\nimport type { InputProps } from \"react-aria-components\";\nimport { Input } from \"react-aria-components\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport function BaseInput(props: InputProps) {\n return <Input {...props} />;\n}\n\nexport function registerInput(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseInput>\n) {\n registerComponentHelper(\n loader,\n BaseInput,\n {\n name: makeComponentName(\"input\"),\n displayName: \"Aria Input\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerInput\",\n importName: \"BaseInput\",\n props: {\n placeholder: {\n type: \"string\",\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAUO,SAAS,UAAU,KAAmB,EAAA;AAC3C,EAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,0BAAU,KAAO,CAAA,CAAA,CAAA;AAC3B,CAAA;AAEgB,SAAA,aAAA,CACd,QACA,SACA,EAAA;AACA,EAAA,uBAAA;AAAA,IACE,MAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,MACE,IAAA,EAAM,kBAAkB,OAAO,CAAA;AAAA,MAC/B,WAAa,EAAA,YAAA;AAAA,MACb,UAAY,EAAA,8CAAA;AAAA,MACZ,UAAY,EAAA,WAAA;AAAA,MACZ,KAAO,EAAA;AAAA,QACL,WAAa,EAAA;AAAA,UACX,IAAM,EAAA,QAAA;AAAA,SACR;AAAA,OACF;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;"}
|
|
@@ -12,8 +12,8 @@ function registerLabel(loader, overrides) {
|
|
|
12
12
|
BaseLabel,
|
|
13
13
|
{
|
|
14
14
|
name: utils.makeComponentName("label"),
|
|
15
|
-
displayName: "
|
|
16
|
-
importPath: "@plasmicpkgs/react-aria/registerLabel",
|
|
15
|
+
displayName: "Aria Label",
|
|
16
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerLabel",
|
|
17
17
|
importName: "BaseLabel",
|
|
18
18
|
props: {
|
|
19
19
|
children: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerLabel.cjs.js","sources":["../src/registerLabel.tsx"],"sourcesContent":["import { Label } from \"react-aria-components\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport const BaseLabel = Label;\n\nexport function registerLabel(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseLabel>\n) {\n registerComponentHelper(\n loader,\n BaseLabel,\n {\n name: makeComponentName(\"label\"),\n displayName: \"
|
|
1
|
+
{"version":3,"file":"registerLabel.cjs.js","sources":["../src/registerLabel.tsx"],"sourcesContent":["import { Label } from \"react-aria-components\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport const BaseLabel = Label;\n\nexport function registerLabel(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseLabel>\n) {\n registerComponentHelper(\n loader,\n BaseLabel,\n {\n name: makeComponentName(\"label\"),\n displayName: \"Aria Label\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerLabel\",\n importName: \"BaseLabel\",\n props: {\n children: {\n type: \"slot\",\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":["Label","registerComponentHelper","makeComponentName"],"mappings":";;;;;;;AAQO,MAAM,SAAY,GAAAA,0BAAA;AAET,SAAA,aAAA,CACd,QACA,SACA,EAAA;AACA,EAAAC,6BAAA;AAAA,IACE,MAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,MACE,IAAA,EAAMC,wBAAkB,OAAO,CAAA;AAAA,MAC/B,WAAa,EAAA,YAAA;AAAA,MACb,UAAY,EAAA,8CAAA;AAAA,MACZ,UAAY,EAAA,WAAA;AAAA,MACZ,KAAO,EAAA;AAAA,QACL,QAAU,EAAA;AAAA,UACR,IAAM,EAAA,MAAA;AAAA,SACR;AAAA,OACF;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;;"}
|
|
@@ -10,8 +10,8 @@ function registerLabel(loader, overrides) {
|
|
|
10
10
|
BaseLabel,
|
|
11
11
|
{
|
|
12
12
|
name: makeComponentName("label"),
|
|
13
|
-
displayName: "
|
|
14
|
-
importPath: "@plasmicpkgs/react-aria/registerLabel",
|
|
13
|
+
displayName: "Aria Label",
|
|
14
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerLabel",
|
|
15
15
|
importName: "BaseLabel",
|
|
16
16
|
props: {
|
|
17
17
|
children: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerLabel.esm.js","sources":["../src/registerLabel.tsx"],"sourcesContent":["import { Label } from \"react-aria-components\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport const BaseLabel = Label;\n\nexport function registerLabel(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseLabel>\n) {\n registerComponentHelper(\n loader,\n BaseLabel,\n {\n name: makeComponentName(\"label\"),\n displayName: \"
|
|
1
|
+
{"version":3,"file":"registerLabel.esm.js","sources":["../src/registerLabel.tsx"],"sourcesContent":["import { Label } from \"react-aria-components\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport const BaseLabel = Label;\n\nexport function registerLabel(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseLabel>\n) {\n registerComponentHelper(\n loader,\n BaseLabel,\n {\n name: makeComponentName(\"label\"),\n displayName: \"Aria Label\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerLabel\",\n importName: \"BaseLabel\",\n props: {\n children: {\n type: \"slot\",\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":[],"mappings":";;;;;AAQO,MAAM,SAAY,GAAA,MAAA;AAET,SAAA,aAAA,CACd,QACA,SACA,EAAA;AACA,EAAA,uBAAA;AAAA,IACE,MAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,MACE,IAAA,EAAM,kBAAkB,OAAO,CAAA;AAAA,MAC/B,WAAa,EAAA,YAAA;AAAA,MACb,UAAY,EAAA,8CAAA;AAAA,MACZ,UAAY,EAAA,WAAA;AAAA,MACZ,KAAO,EAAA;AAAA,QACL,QAAU,EAAA;AAAA,UACR,IAAM,EAAA,MAAA;AAAA,SACR;AAAA,OACF;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;"}
|
|
@@ -117,8 +117,8 @@ function registerListBox(loader, overrides) {
|
|
|
117
117
|
BaseListBox,
|
|
118
118
|
{
|
|
119
119
|
name: utils$1.makeComponentName("listbox"),
|
|
120
|
-
displayName: "
|
|
121
|
-
importPath: "@plasmicpkgs/react-aria/registerListBox",
|
|
120
|
+
displayName: "Aria ListBox",
|
|
121
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerListBox",
|
|
122
122
|
importName: "BaseListBox",
|
|
123
123
|
props: {
|
|
124
124
|
renderItem: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerListBox.cjs.js","sources":["../src/registerListBox.tsx"],"sourcesContent":["import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { ListBox } from \"react-aria-components\";\nimport {\n PlasmicItemContext,\n PlasmicListBoxContext,\n PlasmicSectionContext,\n} from \"./contexts\";\nimport {\n registerListBoxItem,\n type BaseListBoxItem,\n} from \"./registerListBoxItem\";\nimport type { BaseSection } from \"./registerSection\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport interface BaseListBoxProps extends React.ComponentProps<typeof ListBox> {\n makeItemProps?: (\n item: any\n ) => Partial<React.ComponentProps<typeof BaseListBoxItem>>;\n makeSectionProps?: (\n section: any\n ) => Partial<React.ComponentProps<typeof BaseSection>>;\n renderItem?: (item: any) => React.ReactNode;\n renderSection?: (section: any) => React.ReactNode;\n getItemType?: (thing: any) => \"item\" | \"section\";\n}\n\nconst STANDALONE_PROPS: Partial<BaseListBoxProps> = {\n getItemType: (item: any) => item.type,\n items: [\n { type: \"item\", value: \"op1\", label: \"Option 1\" },\n { type: \"item\", value: \"op2\", label: \"Option 2\" },\n { type: \"item\", value: \"op3\", label: \"Option 3\" },\n {\n type: \"section\",\n label: \"Section 1\",\n items: [\n { type: \"item\", value: \"s1op1\", label: \"Section 1 Option 1\" },\n { type: \"item\", value: \"s1op2\", label: \"Section 1 Option 2\" },\n { type: \"item\", value: \"s1op3\", label: \"Section 1 Option 3\" },\n ],\n },\n {\n type: \"section\",\n label: \"Section 2\",\n items: [\n { type: \"item\", value: \"s2op1\", label: \"Section 2 Option 1\" },\n { type: \"item\", value: \"s2op2\", label: \"Section 2 Option 2\" },\n { type: \"item\", value: \"s2op3\", label: \"Section 2 Option 3\" },\n ],\n },\n ],\n makeItemProps: (item: any) => ({\n key: item.value,\n textValue: item.label,\n children: item.label,\n }),\n makeSectionProps: (section: any) => ({\n section: section,\n key: section.label,\n }),\n};\n\nexport function BaseListBox(props: BaseListBoxProps) {\n const contextProps = React.useContext(PlasmicListBoxContext);\n const isStandalone: boolean = !contextProps;\n const {\n makeItemProps,\n makeSectionProps,\n renderItem,\n renderSection,\n getItemType,\n ...rest\n } = mergeProps(contextProps, props, isStandalone ? STANDALONE_PROPS : {});\n return (\n <ListBox {...mergeProps(contextProps, rest)}>\n {(item) => {\n if (getItemType?.(item) === \"section\") {\n const sectionProps = makeSectionProps?.(item);\n return (\n <PlasmicSectionContext.Provider\n key={sectionProps?.key}\n value={{ ...sectionProps, makeItemProps, renderItem }}\n >\n {renderSection?.(item)}\n </PlasmicSectionContext.Provider>\n );\n } else {\n const itemProps = makeItemProps?.(item);\n return (\n <PlasmicItemContext.Provider key={itemProps?.key} value={itemProps}>\n {renderItem?.(item)}\n </PlasmicItemContext.Provider>\n );\n }\n }}\n </ListBox>\n );\n}\n\nexport function registerListBox(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseListBox>\n) {\n registerComponentHelper(\n loader,\n BaseListBox,\n {\n name: makeComponentName(\"listbox\"),\n displayName: \"
|
|
1
|
+
{"version":3,"file":"registerListBox.cjs.js","sources":["../src/registerListBox.tsx"],"sourcesContent":["import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { ListBox } from \"react-aria-components\";\nimport {\n PlasmicItemContext,\n PlasmicListBoxContext,\n PlasmicSectionContext,\n} from \"./contexts\";\nimport {\n registerListBoxItem,\n type BaseListBoxItem,\n} from \"./registerListBoxItem\";\nimport type { BaseSection } from \"./registerSection\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport interface BaseListBoxProps extends React.ComponentProps<typeof ListBox> {\n makeItemProps?: (\n item: any\n ) => Partial<React.ComponentProps<typeof BaseListBoxItem>>;\n makeSectionProps?: (\n section: any\n ) => Partial<React.ComponentProps<typeof BaseSection>>;\n renderItem?: (item: any) => React.ReactNode;\n renderSection?: (section: any) => React.ReactNode;\n getItemType?: (thing: any) => \"item\" | \"section\";\n}\n\nconst STANDALONE_PROPS: Partial<BaseListBoxProps> = {\n getItemType: (item: any) => item.type,\n items: [\n { type: \"item\", value: \"op1\", label: \"Option 1\" },\n { type: \"item\", value: \"op2\", label: \"Option 2\" },\n { type: \"item\", value: \"op3\", label: \"Option 3\" },\n {\n type: \"section\",\n label: \"Section 1\",\n items: [\n { type: \"item\", value: \"s1op1\", label: \"Section 1 Option 1\" },\n { type: \"item\", value: \"s1op2\", label: \"Section 1 Option 2\" },\n { type: \"item\", value: \"s1op3\", label: \"Section 1 Option 3\" },\n ],\n },\n {\n type: \"section\",\n label: \"Section 2\",\n items: [\n { type: \"item\", value: \"s2op1\", label: \"Section 2 Option 1\" },\n { type: \"item\", value: \"s2op2\", label: \"Section 2 Option 2\" },\n { type: \"item\", value: \"s2op3\", label: \"Section 2 Option 3\" },\n ],\n },\n ],\n makeItemProps: (item: any) => ({\n key: item.value,\n textValue: item.label,\n children: item.label,\n }),\n makeSectionProps: (section: any) => ({\n section: section,\n key: section.label,\n }),\n};\n\nexport function BaseListBox(props: BaseListBoxProps) {\n const contextProps = React.useContext(PlasmicListBoxContext);\n const isStandalone: boolean = !contextProps;\n const {\n makeItemProps,\n makeSectionProps,\n renderItem,\n renderSection,\n getItemType,\n ...rest\n } = mergeProps(contextProps, props, isStandalone ? STANDALONE_PROPS : {});\n return (\n <ListBox {...mergeProps(contextProps, rest)}>\n {(item) => {\n if (getItemType?.(item) === \"section\") {\n const sectionProps = makeSectionProps?.(item);\n return (\n <PlasmicSectionContext.Provider\n key={sectionProps?.key}\n value={{ ...sectionProps, makeItemProps, renderItem }}\n >\n {renderSection?.(item)}\n </PlasmicSectionContext.Provider>\n );\n } else {\n const itemProps = makeItemProps?.(item);\n return (\n <PlasmicItemContext.Provider key={itemProps?.key} value={itemProps}>\n {renderItem?.(item)}\n </PlasmicItemContext.Provider>\n );\n }\n }}\n </ListBox>\n );\n}\n\nexport function registerListBox(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseListBox>\n) {\n registerComponentHelper(\n loader,\n BaseListBox,\n {\n name: makeComponentName(\"listbox\"),\n displayName: \"Aria ListBox\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerListBox\",\n importName: \"BaseListBox\",\n props: {\n renderItem: {\n type: \"slot\",\n displayName: \"Render Item\",\n renderPropParams: [\"item\"],\n },\n renderSection: {\n type: \"slot\",\n displayName: \"Render Section\",\n renderPropParams: [\"section\"],\n },\n className: {\n type: \"class\",\n displayName: \"Additional states\",\n selectors: [\n {\n selector: \":self[data-focused]\",\n label: \"Focused\",\n },\n {\n selector: \":self[data-focus-visible]\",\n label: \"Focused by keyboard\",\n },\n ],\n },\n },\n },\n overrides\n );\n\n registerListBoxItem(loader, {\n parentComponentName: makeComponentName(\"listbox\"),\n });\n}\n"],"names":["React","PlasmicListBoxContext","ListBox","mergeProps","PlasmicSectionContext","PlasmicItemContext","registerComponentHelper","makeComponentName","registerListBoxItem"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,MAAM,gBAA8C,GAAA;AAAA,EAClD,WAAA,EAAa,CAAC,IAAA,KAAc,IAAK,CAAA,IAAA;AAAA,EACjC,KAAO,EAAA;AAAA,IACL,EAAE,IAAM,EAAA,MAAA,EAAQ,KAAO,EAAA,KAAA,EAAO,OAAO,UAAW,EAAA;AAAA,IAChD,EAAE,IAAM,EAAA,MAAA,EAAQ,KAAO,EAAA,KAAA,EAAO,OAAO,UAAW,EAAA;AAAA,IAChD,EAAE,IAAM,EAAA,MAAA,EAAQ,KAAO,EAAA,KAAA,EAAO,OAAO,UAAW,EAAA;AAAA,IAChD;AAAA,MACE,IAAM,EAAA,SAAA;AAAA,MACN,KAAO,EAAA,WAAA;AAAA,MACP,KAAO,EAAA;AAAA,QACL,EAAE,IAAM,EAAA,MAAA,EAAQ,KAAO,EAAA,OAAA,EAAS,OAAO,oBAAqB,EAAA;AAAA,QAC5D,EAAE,IAAM,EAAA,MAAA,EAAQ,KAAO,EAAA,OAAA,EAAS,OAAO,oBAAqB,EAAA;AAAA,QAC5D,EAAE,IAAM,EAAA,MAAA,EAAQ,KAAO,EAAA,OAAA,EAAS,OAAO,oBAAqB,EAAA;AAAA,OAC9D;AAAA,KACF;AAAA,IACA;AAAA,MACE,IAAM,EAAA,SAAA;AAAA,MACN,KAAO,EAAA,WAAA;AAAA,MACP,KAAO,EAAA;AAAA,QACL,EAAE,IAAM,EAAA,MAAA,EAAQ,KAAO,EAAA,OAAA,EAAS,OAAO,oBAAqB,EAAA;AAAA,QAC5D,EAAE,IAAM,EAAA,MAAA,EAAQ,KAAO,EAAA,OAAA,EAAS,OAAO,oBAAqB,EAAA;AAAA,QAC5D,EAAE,IA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BAAA;AAAA,UACb,gBAAA,EAAkB,CAAC,SAAS,CAAA;AAAA,SAC9B;AAAA,QACA,SAAW,EAAA;AAAA,UACT,IAAM,EAAA,OAAA;AAAA,UACN,WAAa,EAAA,mBAAA;AAAA,UACb,SAAW,EAAA;AAAA,YACT;AAAA,cACE,QAAU,EAAA,qBAAA;AAAA,cACV,KAAO,EAAA,SAAA;AAAA,aACT;AAAA,YACA;AAAA,cACE,QAAU,EAAA,2BAAA;AAAA,cACV,KAAO,EAAA,qBAAA;AAAA,aACT;AAAA,WACF;AAAA,SACF;AAAA,OACF;AAAA,KACF;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AAEA,EAAAC,uCAAA,CAAoB,MAAQ,EAAA;AAAA,IAC1B,mBAAA,EAAqBD,0BAAkB,SAAS,CAAA;AAAA,GACjD,CAAA,CAAA;AACH;;;;;"}
|
|
@@ -111,8 +111,8 @@ function registerListBox(loader, overrides) {
|
|
|
111
111
|
BaseListBox,
|
|
112
112
|
{
|
|
113
113
|
name: makeComponentName("listbox"),
|
|
114
|
-
displayName: "
|
|
115
|
-
importPath: "@plasmicpkgs/react-aria/registerListBox",
|
|
114
|
+
displayName: "Aria ListBox",
|
|
115
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerListBox",
|
|
116
116
|
importName: "BaseListBox",
|
|
117
117
|
props: {
|
|
118
118
|
renderItem: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerListBox.esm.js","sources":["../src/registerListBox.tsx"],"sourcesContent":["import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { ListBox } from \"react-aria-components\";\nimport {\n PlasmicItemContext,\n PlasmicListBoxContext,\n PlasmicSectionContext,\n} from \"./contexts\";\nimport {\n registerListBoxItem,\n type BaseListBoxItem,\n} from \"./registerListBoxItem\";\nimport type { BaseSection } from \"./registerSection\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport interface BaseListBoxProps extends React.ComponentProps<typeof ListBox> {\n makeItemProps?: (\n item: any\n ) => Partial<React.ComponentProps<typeof BaseListBoxItem>>;\n makeSectionProps?: (\n section: any\n ) => Partial<React.ComponentProps<typeof BaseSection>>;\n renderItem?: (item: any) => React.ReactNode;\n renderSection?: (section: any) => React.ReactNode;\n getItemType?: (thing: any) => \"item\" | \"section\";\n}\n\nconst STANDALONE_PROPS: Partial<BaseListBoxProps> = {\n getItemType: (item: any) => item.type,\n items: [\n { type: \"item\", value: \"op1\", label: \"Option 1\" },\n { type: \"item\", value: \"op2\", label: \"Option 2\" },\n { type: \"item\", value: \"op3\", label: \"Option 3\" },\n {\n type: \"section\",\n label: \"Section 1\",\n items: [\n { type: \"item\", value: \"s1op1\", label: \"Section 1 Option 1\" },\n { type: \"item\", value: \"s1op2\", label: \"Section 1 Option 2\" },\n { type: \"item\", value: \"s1op3\", label: \"Section 1 Option 3\" },\n ],\n },\n {\n type: \"section\",\n label: \"Section 2\",\n items: [\n { type: \"item\", value: \"s2op1\", label: \"Section 2 Option 1\" },\n { type: \"item\", value: \"s2op2\", label: \"Section 2 Option 2\" },\n { type: \"item\", value: \"s2op3\", label: \"Section 2 Option 3\" },\n ],\n },\n ],\n makeItemProps: (item: any) => ({\n key: item.value,\n textValue: item.label,\n children: item.label,\n }),\n makeSectionProps: (section: any) => ({\n section: section,\n key: section.label,\n }),\n};\n\nexport function BaseListBox(props: BaseListBoxProps) {\n const contextProps = React.useContext(PlasmicListBoxContext);\n const isStandalone: boolean = !contextProps;\n const {\n makeItemProps,\n makeSectionProps,\n renderItem,\n renderSection,\n getItemType,\n ...rest\n } = mergeProps(contextProps, props, isStandalone ? STANDALONE_PROPS : {});\n return (\n <ListBox {...mergeProps(contextProps, rest)}>\n {(item) => {\n if (getItemType?.(item) === \"section\") {\n const sectionProps = makeSectionProps?.(item);\n return (\n <PlasmicSectionContext.Provider\n key={sectionProps?.key}\n value={{ ...sectionProps, makeItemProps, renderItem }}\n >\n {renderSection?.(item)}\n </PlasmicSectionContext.Provider>\n );\n } else {\n const itemProps = makeItemProps?.(item);\n return (\n <PlasmicItemContext.Provider key={itemProps?.key} value={itemProps}>\n {renderItem?.(item)}\n </PlasmicItemContext.Provider>\n );\n }\n }}\n </ListBox>\n );\n}\n\nexport function registerListBox(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseListBox>\n) {\n registerComponentHelper(\n loader,\n BaseListBox,\n {\n name: makeComponentName(\"listbox\"),\n displayName: \"
|
|
1
|
+
{"version":3,"file":"registerListBox.esm.js","sources":["../src/registerListBox.tsx"],"sourcesContent":["import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { ListBox } from \"react-aria-components\";\nimport {\n PlasmicItemContext,\n PlasmicListBoxContext,\n PlasmicSectionContext,\n} from \"./contexts\";\nimport {\n registerListBoxItem,\n type BaseListBoxItem,\n} from \"./registerListBoxItem\";\nimport type { BaseSection } from \"./registerSection\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport interface BaseListBoxProps extends React.ComponentProps<typeof ListBox> {\n makeItemProps?: (\n item: any\n ) => Partial<React.ComponentProps<typeof BaseListBoxItem>>;\n makeSectionProps?: (\n section: any\n ) => Partial<React.ComponentProps<typeof BaseSection>>;\n renderItem?: (item: any) => React.ReactNode;\n renderSection?: (section: any) => React.ReactNode;\n getItemType?: (thing: any) => \"item\" | \"section\";\n}\n\nconst STANDALONE_PROPS: Partial<BaseListBoxProps> = {\n getItemType: (item: any) => item.type,\n items: [\n { type: \"item\", value: \"op1\", label: \"Option 1\" },\n { type: \"item\", value: \"op2\", label: \"Option 2\" },\n { type: \"item\", value: \"op3\", label: \"Option 3\" },\n {\n type: \"section\",\n label: \"Section 1\",\n items: [\n { type: \"item\", value: \"s1op1\", label: \"Section 1 Option 1\" },\n { type: \"item\", value: \"s1op2\", label: \"Section 1 Option 2\" },\n { type: \"item\", value: \"s1op3\", label: \"Section 1 Option 3\" },\n ],\n },\n {\n type: \"section\",\n label: \"Section 2\",\n items: [\n { type: \"item\", value: \"s2op1\", label: \"Section 2 Option 1\" },\n { type: \"item\", value: \"s2op2\", label: \"Section 2 Option 2\" },\n { type: \"item\", value: \"s2op3\", label: \"Section 2 Option 3\" },\n ],\n },\n ],\n makeItemProps: (item: any) => ({\n key: item.value,\n textValue: item.label,\n children: item.label,\n }),\n makeSectionProps: (section: any) => ({\n section: section,\n key: section.label,\n }),\n};\n\nexport function BaseListBox(props: BaseListBoxProps) {\n const contextProps = React.useContext(PlasmicListBoxContext);\n const isStandalone: boolean = !contextProps;\n const {\n makeItemProps,\n makeSectionProps,\n renderItem,\n renderSection,\n getItemType,\n ...rest\n } = mergeProps(contextProps, props, isStandalone ? STANDALONE_PROPS : {});\n return (\n <ListBox {...mergeProps(contextProps, rest)}>\n {(item) => {\n if (getItemType?.(item) === \"section\") {\n const sectionProps = makeSectionProps?.(item);\n return (\n <PlasmicSectionContext.Provider\n key={sectionProps?.key}\n value={{ ...sectionProps, makeItemProps, renderItem }}\n >\n {renderSection?.(item)}\n </PlasmicSectionContext.Provider>\n );\n } else {\n const itemProps = makeItemProps?.(item);\n return (\n <PlasmicItemContext.Provider key={itemProps?.key} value={itemProps}>\n {renderItem?.(item)}\n </PlasmicItemContext.Provider>\n );\n }\n }}\n </ListBox>\n );\n}\n\nexport function registerListBox(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseListBox>\n) {\n registerComponentHelper(\n loader,\n BaseListBox,\n {\n name: makeComponentName(\"listbox\"),\n displayName: \"Aria ListBox\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerListBox\",\n importName: \"BaseListBox\",\n props: {\n renderItem: {\n type: \"slot\",\n displayName: \"Render Item\",\n renderPropParams: [\"item\"],\n },\n renderSection: {\n type: \"slot\",\n displayName: \"Render Section\",\n renderPropParams: [\"section\"],\n },\n className: {\n type: \"class\",\n displayName: \"Additional states\",\n selectors: [\n {\n selector: \":self[data-focused]\",\n label: \"Focused\",\n },\n {\n selector: \":self[data-focus-visible]\",\n label: \"Focused by keyboard\",\n },\n ],\n },\n },\n },\n overrides\n );\n\n registerListBoxItem(loader, {\n parentComponentName: makeComponentName(\"listbox\"),\n });\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,MAAM,gBAA8C,GAAA;AAAA,EAClD,WAAA,EAAa,CAAC,IAAA,KAAc,IAAK,CAAA,IAAA;AAAA,EACjC,KAAO,EAAA;AAAA,IACL,EAAE,IAAM,EAAA,MAAA,EAAQ,KAAO,EAAA,KAAA,EAAO,OAAO,UAAW,EAAA;AAAA,IAChD,EAAE,IAAM,EAAA,MAAA,EAAQ,KAAO,EAAA,KAAA,EAAO,OAAO,UAAW,EAAA;AAAA,IAChD,EAAE,IAAM,EAAA,MAAA,EAAQ,KAAO,EAAA,KAAA,EAAO,OAAO,UAAW,EAAA;AAAA,IAChD;AAAA,MACE,IAAM,EAAA,SAAA;AAAA,MACN,KAAO,EAAA,WAAA;AAAA,MACP,KAAO,EAAA;AAAA,QACL,EAAE,IAAM,EAAA,MAAA,EAAQ,KAAO,EAAA,OAAA,EAAS,OAAO,oBAAqB,EAAA;AAAA,QAC5D,EAAE,IAAM,EAAA,MAAA,EAAQ,KAAO,EAAA,OAAA,EAAS,OAAO,oBAAqB,EAAA;AAAA,QAC5D,EAAE,IAAM,EAAA,MAAA,EAAQ,KAAO,EAAA,OAAA,EAAS,OAAO,oBAAqB,EAAA;AAAA,OAC9D;AAAA,KACF;AAAA,IACA;AAAA,MACE,IAAM,EAAA,SAAA;AAAA,MACN,KAAO,EAAA,WAAA;AAAA,MACP,KAAO,EAAA;AAAA,QACL,EAAE,IAAM,EAAA,MAAA,EAAQ,KAAO,EAAA,OAAA,EAAS,OAAO,oBAAqB,EAAA;AAAA,QAC5D,EAAE,IAAM,EAAA,MAAA,EAAQ,KAAO,EAAA,OAAA,EAAS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A;AAAA,UACN,WAAa,EAAA,gBAAA;AAAA,UACb,gBAAA,EAAkB,CAAC,SAAS,CAAA;AAAA,SAC9B;AAAA,QACA,SAAW,EAAA;AAAA,UACT,IAAM,EAAA,OAAA;AAAA,UACN,WAAa,EAAA,mBAAA;AAAA,UACb,SAAW,EAAA;AAAA,YACT;AAAA,cACE,QAAU,EAAA,qBAAA;AAAA,cACV,KAAO,EAAA,SAAA;AAAA,aACT;AAAA,YACA;AAAA,cACE,QAAU,EAAA,2BAAA;AAAA,cACV,KAAO,EAAA,qBAAA;AAAA,aACT;AAAA,WACF;AAAA,SACF;AAAA,OACF;AAAA,KACF;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AAEA,EAAA,mBAAA,CAAoB,MAAQ,EAAA;AAAA,IAC1B,mBAAA,EAAqB,kBAAkB,SAAS,CAAA;AAAA,GACjD,CAAA,CAAA;AACH;;;;"}
|
|
@@ -39,8 +39,8 @@ function registerListBoxItem(loader, overrides) {
|
|
|
39
39
|
BaseListBoxItem,
|
|
40
40
|
{
|
|
41
41
|
name: utils$1.makeComponentName("item"),
|
|
42
|
-
displayName: "
|
|
43
|
-
importPath: "@plasmicpkgs/react-aria/registerListBoxItem",
|
|
42
|
+
displayName: "Aria ListBoxItem",
|
|
43
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerListBoxItem",
|
|
44
44
|
importName: "BaseListBoxItem",
|
|
45
45
|
props: {
|
|
46
46
|
className: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerListBoxItem.cjs.js","sources":["../src/registerListBoxItem.tsx"],"sourcesContent":["import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Key, ListBoxItem } from \"react-aria-components\";\nimport { PlasmicItemContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport function BaseListBoxItem(\n props: React.ComponentProps<typeof ListBoxItem> & {\n key?: Key;\n }\n) {\n const contextProps = React.useContext(PlasmicItemContext);\n const mergedProps = mergeProps(contextProps, props);\n return <ListBoxItem id={mergedProps.key ?? undefined} {...mergedProps} />;\n}\n\nexport function registerListBoxItem(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseListBoxItem>\n) {\n registerComponentHelper(\n loader,\n BaseListBoxItem,\n {\n name: makeComponentName(\"item\"),\n displayName: \"
|
|
1
|
+
{"version":3,"file":"registerListBoxItem.cjs.js","sources":["../src/registerListBoxItem.tsx"],"sourcesContent":["import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Key, ListBoxItem } from \"react-aria-components\";\nimport { PlasmicItemContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport function BaseListBoxItem(\n props: React.ComponentProps<typeof ListBoxItem> & {\n key?: Key;\n }\n) {\n const contextProps = React.useContext(PlasmicItemContext);\n const mergedProps = mergeProps(contextProps, props);\n return <ListBoxItem id={mergedProps.key ?? undefined} {...mergedProps} />;\n}\n\nexport function registerListBoxItem(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseListBoxItem>\n) {\n registerComponentHelper(\n loader,\n BaseListBoxItem,\n {\n name: makeComponentName(\"item\"),\n displayName: \"Aria ListBoxItem\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerListBoxItem\",\n importName: \"BaseListBoxItem\",\n props: {\n className: {\n type: \"class\",\n displayName: \"Additional states\",\n selectors: [\n {\n selector: \":self[data-selected]\",\n label: \"Selected\",\n },\n {\n selector: \":self[data-focused], :self[data-hovered]\",\n label: \"Focused\",\n },\n {\n selector: \":self[data-disabled]\",\n label: \"Disabled\",\n },\n ],\n },\n },\n },\n overrides\n );\n}\n"],"names":["React","PlasmicItemContext","mergeProps","ListBoxItem","registerComponentHelper","makeComponentName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWO,SAAS,gBACd,KAGA,EAAA;AAfF,EAAA,IAAA,EAAA,CAAA;AAgBE,EAAM,MAAA,YAAA,GAAeA,sBAAM,CAAA,UAAA,CAAWC,2BAAkB,CAAA,CAAA;AACxD,EAAM,MAAA,WAAA,GAAcC,gBAAW,CAAA,YAAA,EAAc,KAAK,CAAA,CAAA;AAClD,EAAA,4DAAQC,+BAAY,EAAA,cAAA,CAAA,EAAA,EAAA,EAAA,CAAI,iBAAY,GAAZ,KAAA,IAAA,GAAA,EAAA,GAAmB,UAAe,WAAa,CAAA,CAAA,CAAA;AACzE,CAAA;AAEgB,SAAA,mBAAA,CACd,QACA,SACA,EAAA;AACA,EAAAC,+BAAA;AAAA,IACE,MAAA;AAAA,IACA,eAAA;AAAA,IACA;AAAA,MACE,IAAA,EAAMC,0BAAkB,MAAM,CAAA;AAAA,MAC9B,WAAa,EAAA,kBAAA;AAAA,MACb,UAAY,EAAA,oDAAA;AAAA,MACZ,UAAY,EAAA,iBAAA;AAAA,MACZ,KAAO,EAAA;AAAA,QACL,SAAW,EAAA;AAAA,UACT,IAAM,EAAA,OAAA;AAAA,UACN,WAAa,EAAA,mBAAA;AAAA,UACb,SAAW,EAAA;AAAA,YACT;AAAA,cACE,QAAU,EAAA,sBAAA;AAAA,cACV,KAAO,EAAA,UAAA;AAAA,aACT;AAAA,YACA;AAAA,cACE,QAAU,EAAA,0CAAA;AAAA,cACV,KAAO,EAAA,SAAA;AAAA,aACT;AAAA,YACA;AAAA,cACE,QAAU,EAAA,sBAAA;AAAA,cACV,KAAO,EAAA,UAAA;AAAA,aACT;AAAA,WACF;AAAA,SACF;AAAA,OACF;AAAA,KACF;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;;"}
|
|
@@ -33,8 +33,8 @@ function registerListBoxItem(loader, overrides) {
|
|
|
33
33
|
BaseListBoxItem,
|
|
34
34
|
{
|
|
35
35
|
name: makeComponentName("item"),
|
|
36
|
-
displayName: "
|
|
37
|
-
importPath: "@plasmicpkgs/react-aria/registerListBoxItem",
|
|
36
|
+
displayName: "Aria ListBoxItem",
|
|
37
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerListBoxItem",
|
|
38
38
|
importName: "BaseListBoxItem",
|
|
39
39
|
props: {
|
|
40
40
|
className: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerListBoxItem.esm.js","sources":["../src/registerListBoxItem.tsx"],"sourcesContent":["import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Key, ListBoxItem } from \"react-aria-components\";\nimport { PlasmicItemContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport function BaseListBoxItem(\n props: React.ComponentProps<typeof ListBoxItem> & {\n key?: Key;\n }\n) {\n const contextProps = React.useContext(PlasmicItemContext);\n const mergedProps = mergeProps(contextProps, props);\n return <ListBoxItem id={mergedProps.key ?? undefined} {...mergedProps} />;\n}\n\nexport function registerListBoxItem(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseListBoxItem>\n) {\n registerComponentHelper(\n loader,\n BaseListBoxItem,\n {\n name: makeComponentName(\"item\"),\n displayName: \"
|
|
1
|
+
{"version":3,"file":"registerListBoxItem.esm.js","sources":["../src/registerListBoxItem.tsx"],"sourcesContent":["import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Key, ListBoxItem } from \"react-aria-components\";\nimport { PlasmicItemContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport function BaseListBoxItem(\n props: React.ComponentProps<typeof ListBoxItem> & {\n key?: Key;\n }\n) {\n const contextProps = React.useContext(PlasmicItemContext);\n const mergedProps = mergeProps(contextProps, props);\n return <ListBoxItem id={mergedProps.key ?? undefined} {...mergedProps} />;\n}\n\nexport function registerListBoxItem(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseListBoxItem>\n) {\n registerComponentHelper(\n loader,\n BaseListBoxItem,\n {\n name: makeComponentName(\"item\"),\n displayName: \"Aria ListBoxItem\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerListBoxItem\",\n importName: \"BaseListBoxItem\",\n props: {\n className: {\n type: \"class\",\n displayName: \"Additional states\",\n selectors: [\n {\n selector: \":self[data-selected]\",\n label: \"Selected\",\n },\n {\n selector: \":self[data-focused], :self[data-hovered]\",\n label: \"Focused\",\n },\n {\n selector: \":self[data-disabled]\",\n label: \"Disabled\",\n },\n ],\n },\n },\n },\n overrides\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAWO,SAAS,gBACd,KAGA,EAAA;AAfF,EAAA,IAAA,EAAA,CAAA;AAgBE,EAAM,MAAA,YAAA,GAAe,KAAM,CAAA,UAAA,CAAW,kBAAkB,CAAA,CAAA;AACxD,EAAM,MAAA,WAAA,GAAc,UAAW,CAAA,YAAA,EAAc,KAAK,CAAA,CAAA;AAClD,EAAA,2CAAQ,WAAY,EAAA,cAAA,CAAA,EAAA,EAAA,EAAA,CAAI,iBAAY,GAAZ,KAAA,IAAA,GAAA,EAAA,GAAmB,UAAe,WAAa,CAAA,CAAA,CAAA;AACzE,CAAA;AAEgB,SAAA,mBAAA,CACd,QACA,SACA,EAAA;AACA,EAAA,uBAAA;AAAA,IACE,MAAA;AAAA,IACA,eAAA;AAAA,IACA;AAAA,MACE,IAAA,EAAM,kBAAkB,MAAM,CAAA;AAAA,MAC9B,WAAa,EAAA,kBAAA;AAAA,MACb,UAAY,EAAA,oDAAA;AAAA,MACZ,UAAY,EAAA,iBAAA;AAAA,MACZ,KAAO,EAAA;AAAA,QACL,SAAW,EAAA;AAAA,UACT,IAAM,EAAA,OAAA;AAAA,UACN,WAAa,EAAA,mBAAA;AAAA,UACb,SAAW,EAAA;AAAA,YACT;AAAA,cACE,QAAU,EAAA,sBAAA;AAAA,cACV,KAAO,EAAA,UAAA;AAAA,aACT;AAAA,YACA;AAAA,cACE,QAAU,EAAA,0CAAA;AAAA,cACV,KAAO,EAAA,SAAA;AAAA,aACT;AAAA,YACA;AAAA,cACE,QAAU,EAAA,sBAAA;AAAA,cACV,KAAO,EAAA,UAAA;AAAA,aACT;AAAA,WACF;AAAA,SACF;AAAA,OACF;AAAA,KACF;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;"}
|
|
@@ -44,12 +44,12 @@ var __objRest = (source, exclude) => {
|
|
|
44
44
|
return target;
|
|
45
45
|
};
|
|
46
46
|
function BasePopover(props) {
|
|
47
|
-
const _a = props, restProps = __objRest(_a, ["resetClassName"]);
|
|
47
|
+
const _a = props, { resetClassName } = _a, restProps = __objRest(_a, ["resetClassName"]);
|
|
48
48
|
const isStandalone = !React__default.default.useContext(reactAriaComponents.PopoverContext);
|
|
49
49
|
const contextProps = React__default.default.useContext(contexts.PlasmicPopoverContext);
|
|
50
50
|
const canvas = host.usePlasmicCanvasContext();
|
|
51
51
|
const mergedProps = utils.mergeProps(contextProps, restProps, {
|
|
52
|
-
className: `${
|
|
52
|
+
className: `${resetClassName}`
|
|
53
53
|
});
|
|
54
54
|
if (isStandalone) {
|
|
55
55
|
const triggerRef = React__default.default.useRef(null);
|
|
@@ -71,8 +71,8 @@ function registerPopover(loader, overrides) {
|
|
|
71
71
|
BasePopover,
|
|
72
72
|
{
|
|
73
73
|
name: "plasmic-react-aria-popover",
|
|
74
|
-
displayName: "
|
|
75
|
-
importPath: "@plasmicpkgs/react-aria/registerPopover",
|
|
74
|
+
displayName: "Aria Popover",
|
|
75
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerPopover",
|
|
76
76
|
importName: "BasePopover",
|
|
77
77
|
props: {
|
|
78
78
|
children: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerPopover.cjs.js","sources":["../src/registerPopover.tsx"],"sourcesContent":["import { usePlasmicCanvasContext } from \"@plasmicapp/host\";\nimport { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Popover, PopoverContext } from \"react-aria-components\";\nimport { PlasmicPopoverContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport function BasePopover(props: {\n className?: string;\n resetClassName?: string;\n}) {\n const { resetClassName, ...restProps } = props;\n const isStandalone = !React.useContext(PopoverContext);\n const contextProps = React.useContext(PlasmicPopoverContext);\n const canvas = usePlasmicCanvasContext();\n const mergedProps = mergeProps(contextProps, restProps, {\n className: `${
|
|
1
|
+
{"version":3,"file":"registerPopover.cjs.js","sources":["../src/registerPopover.tsx"],"sourcesContent":["import { usePlasmicCanvasContext } from \"@plasmicapp/host\";\nimport { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Popover, PopoverContext } from \"react-aria-components\";\nimport { PlasmicPopoverContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport function BasePopover(props: {\n className?: string;\n resetClassName?: string;\n}) {\n const { resetClassName, ...restProps } = props;\n const isStandalone = !React.useContext(PopoverContext);\n const contextProps = React.useContext(PlasmicPopoverContext);\n const canvas = usePlasmicCanvasContext();\n const mergedProps = mergeProps(contextProps, restProps, {\n className: `${resetClassName}`,\n });\n\n if (isStandalone) {\n const triggerRef = React.useRef<any>(null);\n return (\n <>\n <div ref={triggerRef} />\n <Popover\n {...mergedProps}\n triggerRef={triggerRef}\n isNonModal={true}\n isOpen={true}\n />\n </>\n );\n } else {\n return <Popover {...mergedProps} isNonModal={!!canvas} />;\n }\n}\n\nexport function registerPopover(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BasePopover>\n) {\n registerComponentHelper(\n loader,\n BasePopover,\n {\n name: \"plasmic-react-aria-popover\",\n displayName: \"Aria Popover\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerPopover\",\n importName: \"BasePopover\",\n props: {\n children: {\n type: \"slot\",\n },\n offset: {\n type: \"number\",\n displayName: \"Offset\",\n description:\n \"Additional offset applied vertically between the popover and its trigger\",\n defaultValueHint: 0,\n },\n placement: {\n type: \"choice\",\n description:\n \"Default placement of the popover relative to the trigger, if there is enough space\",\n options: [\n \"bottom\",\n \"bottom left\",\n \"bottom right\",\n \"top\",\n \"top left\",\n \"top right\",\n ],\n },\n resetClassName: {\n type: \"themeResetClass\",\n },\n // className: {\n // type: \"class\",\n // displayName: \"Additional states\",\n // selectors: [\n // {\n // selector: \":self[data-entering]\",\n // label: \"Entering\",\n // },\n // {\n // selector: \":self[data-exiting]\",\n // label: \"Exiting\",\n // },\n // ],\n // },\n },\n styleSections: true,\n },\n overrides\n );\n}\n"],"names":["React","PopoverContext","PlasmicPopoverContext","usePlasmicCanvasContext","mergeProps","Popover","registerComponentHelper"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWO,SAAS,YAAY,KAGzB,EAAA;AACD,EAAA,MAAyC,YAAjC,EAfV,cAAA,EAAA,GAe2C,EAAd,EAAA,SAAA,GAAA,SAAA,CAAc,IAAd,CAAnB,gBAAA,CAAA,CAAA,CAAA;AACR,EAAA,MAAM,YAAe,GAAA,CAACA,sBAAM,CAAA,UAAA,CAAWC,kCAAc,CAAA,CAAA;AACrD,EAAM,MAAA,YAAA,GAAeD,sBAAM,CAAA,UAAA,CAAWE,8BAAqB,CAAA,CAAA;AAC3D,EAAA,MAAM,SAASC,4BAAwB,EAAA,CAAA;AACvC,EAAM,MAAA,WAAA,GAAcC,gBAAW,CAAA,YAAA,EAAc,SAAW,EAAA;AAAA,IACtD,WAAW,CAAG,EAAA,cAAA,CAAA,CAAA;AAAA,GACf,CAAA,CAAA;AAED,EAAA,IAAI,YAAc,EAAA;AAChB,IAAM,MAAA,UAAA,GAAaJ,sBAAM,CAAA,MAAA,CAAY,IAAI,CAAA,CAAA;AACzC,IAAA,uBAEIA,sBAAA,CAAA,aAAA,CAAAA,sBAAA,CAAA,QAAA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UACd,IAAM,EAAA,iBAAA;AAAA,SACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAeF;AAAA,MACA,aAAe,EAAA,IAAA;AAAA,KACjB;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;;"}
|
|
@@ -38,12 +38,12 @@ var __objRest = (source, exclude) => {
|
|
|
38
38
|
return target;
|
|
39
39
|
};
|
|
40
40
|
function BasePopover(props) {
|
|
41
|
-
const _a = props, restProps = __objRest(_a, ["resetClassName"]);
|
|
41
|
+
const _a = props, { resetClassName } = _a, restProps = __objRest(_a, ["resetClassName"]);
|
|
42
42
|
const isStandalone = !React.useContext(PopoverContext);
|
|
43
43
|
const contextProps = React.useContext(PlasmicPopoverContext);
|
|
44
44
|
const canvas = usePlasmicCanvasContext();
|
|
45
45
|
const mergedProps = mergeProps(contextProps, restProps, {
|
|
46
|
-
className: `${
|
|
46
|
+
className: `${resetClassName}`
|
|
47
47
|
});
|
|
48
48
|
if (isStandalone) {
|
|
49
49
|
const triggerRef = React.useRef(null);
|
|
@@ -65,8 +65,8 @@ function registerPopover(loader, overrides) {
|
|
|
65
65
|
BasePopover,
|
|
66
66
|
{
|
|
67
67
|
name: "plasmic-react-aria-popover",
|
|
68
|
-
displayName: "
|
|
69
|
-
importPath: "@plasmicpkgs/react-aria/registerPopover",
|
|
68
|
+
displayName: "Aria Popover",
|
|
69
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerPopover",
|
|
70
70
|
importName: "BasePopover",
|
|
71
71
|
props: {
|
|
72
72
|
children: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerPopover.esm.js","sources":["../src/registerPopover.tsx"],"sourcesContent":["import { usePlasmicCanvasContext } from \"@plasmicapp/host\";\nimport { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Popover, PopoverContext } from \"react-aria-components\";\nimport { PlasmicPopoverContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport function BasePopover(props: {\n className?: string;\n resetClassName?: string;\n}) {\n const { resetClassName, ...restProps } = props;\n const isStandalone = !React.useContext(PopoverContext);\n const contextProps = React.useContext(PlasmicPopoverContext);\n const canvas = usePlasmicCanvasContext();\n const mergedProps = mergeProps(contextProps, restProps, {\n className: `${
|
|
1
|
+
{"version":3,"file":"registerPopover.esm.js","sources":["../src/registerPopover.tsx"],"sourcesContent":["import { usePlasmicCanvasContext } from \"@plasmicapp/host\";\nimport { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Popover, PopoverContext } from \"react-aria-components\";\nimport { PlasmicPopoverContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport function BasePopover(props: {\n className?: string;\n resetClassName?: string;\n}) {\n const { resetClassName, ...restProps } = props;\n const isStandalone = !React.useContext(PopoverContext);\n const contextProps = React.useContext(PlasmicPopoverContext);\n const canvas = usePlasmicCanvasContext();\n const mergedProps = mergeProps(contextProps, restProps, {\n className: `${resetClassName}`,\n });\n\n if (isStandalone) {\n const triggerRef = React.useRef<any>(null);\n return (\n <>\n <div ref={triggerRef} />\n <Popover\n {...mergedProps}\n triggerRef={triggerRef}\n isNonModal={true}\n isOpen={true}\n />\n </>\n );\n } else {\n return <Popover {...mergedProps} isNonModal={!!canvas} />;\n }\n}\n\nexport function registerPopover(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BasePopover>\n) {\n registerComponentHelper(\n loader,\n BasePopover,\n {\n name: \"plasmic-react-aria-popover\",\n displayName: \"Aria Popover\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerPopover\",\n importName: \"BasePopover\",\n props: {\n children: {\n type: \"slot\",\n },\n offset: {\n type: \"number\",\n displayName: \"Offset\",\n description:\n \"Additional offset applied vertically between the popover and its trigger\",\n defaultValueHint: 0,\n },\n placement: {\n type: \"choice\",\n description:\n \"Default placement of the popover relative to the trigger, if there is enough space\",\n options: [\n \"bottom\",\n \"bottom left\",\n \"bottom right\",\n \"top\",\n \"top left\",\n \"top right\",\n ],\n },\n resetClassName: {\n type: \"themeResetClass\",\n },\n // className: {\n // type: \"class\",\n // displayName: \"Additional states\",\n // selectors: [\n // {\n // selector: \":self[data-entering]\",\n // label: \"Entering\",\n // },\n // {\n // selector: \":self[data-exiting]\",\n // label: \"Exiting\",\n // },\n // ],\n // },\n },\n styleSections: true,\n },\n overrides\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWO,SAAS,YAAY,KAGzB,EAAA;AACD,EAAA,MAAyC,YAAjC,EAfV,cAAA,EAAA,GAe2C,EAAd,EAAA,SAAA,GAAA,SAAA,CAAc,IAAd,CAAnB,gBAAA,CAAA,CAAA,CAAA;AACR,EAAA,MAAM,YAAe,GAAA,CAAC,KAAM,CAAA,UAAA,CAAW,cAAc,CAAA,CAAA;AACrD,EAAM,MAAA,YAAA,GAAe,KAAM,CAAA,UAAA,CAAW,qBAAqB,CAAA,CAAA;AAC3D,EAAA,MAAM,SAAS,uBAAwB,EAAA,CAAA;AACvC,EAAM,MAAA,WAAA,GAAc,UAAW,CAAA,YAAA,EAAc,SAAW,EAAA;AAAA,IACtD,WAAW,CAAG,EAAA,cAAA,CAAA,CAAA;AAAA,GACf,CAAA,CAAA;AAED,EAAA,IAAI,YAAc,EAAA;AAChB,IAAM,MAAA,UAAA,GAAa,KAAM,CAAA,MAAA,CAAY,IAAI,CAAA,CAAA;AACzC,IAAA,uBAEI,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,KAAI,EAAA,EAAA,GAAA,EAAK,YAAY,CACtB,kBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,OAAA;AAAA,MAAA,aAAA,CAAA,cAAA,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jB;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var host = require('@plasmicapp/host');
|
|
4
3
|
var React = require('react');
|
|
5
4
|
var reactAriaComponents = require('react-aria-components');
|
|
6
5
|
var common = require('./common-e74a9214.cjs.js');
|
|
@@ -11,6 +10,22 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
11
10
|
|
|
12
11
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
13
12
|
|
|
13
|
+
class ErrorBoundary extends React.Component {
|
|
14
|
+
constructor(props) {
|
|
15
|
+
super(props);
|
|
16
|
+
this.state = { hasError: false };
|
|
17
|
+
}
|
|
18
|
+
static getDerivedStateFromError(_) {
|
|
19
|
+
return { hasError: true };
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
if (this.state.hasError) {
|
|
23
|
+
return this.props.fallback;
|
|
24
|
+
}
|
|
25
|
+
return this.props.children;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
14
29
|
var __defProp = Object.defineProperty;
|
|
15
30
|
var __defProps = Object.defineProperties;
|
|
16
31
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
@@ -47,33 +62,23 @@ function BaseRadio(props) {
|
|
|
47
62
|
children,
|
|
48
63
|
onPressChange,
|
|
49
64
|
onFocusVisibleChange,
|
|
50
|
-
onHoverChange
|
|
65
|
+
onHoverChange,
|
|
66
|
+
onSelectionChange
|
|
51
67
|
} = _a, rest = __objRest(_a, [
|
|
52
68
|
"children",
|
|
53
69
|
"onPressChange",
|
|
54
70
|
"onFocusVisibleChange",
|
|
55
|
-
"onHoverChange"
|
|
71
|
+
"onHoverChange",
|
|
72
|
+
"onSelectionChange"
|
|
56
73
|
]);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
/* @__PURE__ */ React__default.default.createElement(
|
|
66
|
-
utils.ValueObserver,
|
|
67
|
-
{
|
|
68
|
-
value: isFocusVisible,
|
|
69
|
-
onChange: onFocusVisibleChange
|
|
70
|
-
}
|
|
71
|
-
),
|
|
72
|
-
/* @__PURE__ */ React__default.default.createElement(utils.ValueObserver, { value: isPressed, onChange: onPressChange }),
|
|
73
|
-
/* @__PURE__ */ React__default.default.createElement(utils.ValueObserver, { value: isHovered, onChange: onHoverChange }),
|
|
74
|
-
children
|
|
75
|
-
)
|
|
76
|
-
)));
|
|
74
|
+
const radio = /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Radio, __spreadValues({}, rest), ({ isFocusVisible, isPressed, isHovered, isSelected }) => /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, /* @__PURE__ */ React__default.default.createElement(
|
|
75
|
+
utils.ValueObserver,
|
|
76
|
+
{
|
|
77
|
+
value: isFocusVisible,
|
|
78
|
+
onChange: onFocusVisibleChange
|
|
79
|
+
}
|
|
80
|
+
), /* @__PURE__ */ React__default.default.createElement(utils.ValueObserver, { value: isSelected, onChange: onSelectionChange }), /* @__PURE__ */ React__default.default.createElement(utils.ValueObserver, { value: isPressed, onChange: onPressChange }), /* @__PURE__ */ React__default.default.createElement(utils.ValueObserver, { value: isHovered, onChange: onHoverChange }), children));
|
|
81
|
+
return /* @__PURE__ */ React__default.default.createElement(ErrorBoundary, { fallback: /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.RadioGroup, null, radio) }, radio);
|
|
77
82
|
}
|
|
78
83
|
function registerRadio(loader, overrides) {
|
|
79
84
|
utils.registerComponentHelper(
|
|
@@ -81,10 +86,8 @@ function registerRadio(loader, overrides) {
|
|
|
81
86
|
BaseRadio,
|
|
82
87
|
{
|
|
83
88
|
name: utils.makeComponentName("radio"),
|
|
84
|
-
displayName: "
|
|
85
|
-
importPath: "@plasmicpkgs/react-aria/registerRadio",
|
|
86
|
-
// TODO: Remove DataProvider once Interaction variants are implemented for Code components
|
|
87
|
-
providesData: true,
|
|
89
|
+
displayName: "Aria Radio",
|
|
90
|
+
importPath: "@plasmicpkgs/react-aria/skinny/registerRadio",
|
|
88
91
|
importName: "BaseRadio",
|
|
89
92
|
props: __spreadProps(__spreadValues({}, common.getCommonInputProps("radio", [
|
|
90
93
|
"isDisabled",
|
|
@@ -111,6 +114,10 @@ function registerRadio(loader, overrides) {
|
|
|
111
114
|
onFocusVisibleChange: {
|
|
112
115
|
type: "eventHandler",
|
|
113
116
|
argTypes: [{ name: "isFocusVisible", type: "boolean" }]
|
|
117
|
+
},
|
|
118
|
+
onSelectionChange: {
|
|
119
|
+
type: "eventHandler",
|
|
120
|
+
argTypes: [{ name: "isSelected", type: "boolean" }]
|
|
114
121
|
}
|
|
115
122
|
}),
|
|
116
123
|
states: {
|
|
@@ -133,6 +140,11 @@ function registerRadio(loader, overrides) {
|
|
|
133
140
|
type: "readonly",
|
|
134
141
|
onChangeProp: "onFocusVisibleChange",
|
|
135
142
|
variableType: "boolean"
|
|
143
|
+
},
|
|
144
|
+
isSelected: {
|
|
145
|
+
type: "readonly",
|
|
146
|
+
onChangeProp: "onSelectionChange",
|
|
147
|
+
variableType: "boolean"
|
|
136
148
|
}
|
|
137
149
|
},
|
|
138
150
|
trapsFocus: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerRadio.cjs.js","sources":["../src/registerRadio.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"registerRadio.cjs.js","sources":["../src/ErrorBoundary.tsx","../src/registerRadio.tsx"],"sourcesContent":["import { Component, ReactNode } from \"react\";\n\ninterface ErrorBoundaryProps {\n children: ReactNode;\n fallback: ReactNode;\n}\n\ninterface ErrorBoundaryState {\n hasError: boolean;\n}\n\nclass ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError(_: Error): ErrorBoundaryState {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n render() {\n if (this.state.hasError) {\n return this.props.fallback;\n }\n\n return this.props.children;\n }\n}\n\nexport default ErrorBoundary;\n","import React, { ReactNode } from \"react\";\nimport type { RadioProps } from \"react-aria-components\";\nimport { Radio, RadioGroup } from \"react-aria-components\";\nimport { getCommonInputProps } from \"./common\";\nimport ErrorBoundary from \"./ErrorBoundary\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n ValueObserver,\n} from \"./utils\";\n\ninterface BaseRadioProps extends RadioProps {\n onSelectionChange: (isSelected: boolean) => void;\n onPressChange: (isPressed: boolean) => void;\n onFocusVisibleChange: (isFocusVisible: boolean) => void;\n}\n\nexport function BaseRadio(props: BaseRadioProps) {\n const {\n children,\n onPressChange,\n onFocusVisibleChange,\n onHoverChange,\n onSelectionChange,\n ...rest\n } = props;\n\n const radio = (\n <Radio {...rest}>\n {({ isFocusVisible, isPressed, isHovered, isSelected }) => (\n <>\n <ValueObserver\n value={isFocusVisible}\n onChange={onFocusVisibleChange}\n />\n <ValueObserver value={isSelected} onChange={onSelectionChange} />\n <ValueObserver value={isPressed} onChange={onPressChange} />\n <ValueObserver value={isHovered} onChange={onHoverChange} />\n {children as ReactNode}\n </>\n )}\n </Radio>\n );\n\n return (\n <ErrorBoundary fallback={<RadioGroup>{radio}</RadioGroup>}>\n {radio}\n </ErrorBoundary>\n );\n}\n\nexport function registerRadio(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseRadio>\n) {\n 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 props: {\n ...getCommonInputProps<BaseRadioProps>(\"radio\", [\n \"isDisabled\",\n \"autoFocus\",\n \"aria-label\",\n \"children\",\n ]),\n value: {\n type: \"string\",\n description:\n \"The value of the input element, used when submitting an HTML form.\",\n },\n onHoverChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isHovered\", type: \"boolean\" }],\n },\n onFocusChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isFocused\", type: \"boolean\" }],\n },\n onPressChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isPressed\", type: \"boolean\" }],\n },\n onFocusVisibleChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isFocusVisible\", type: \"boolean\" }],\n },\n onSelectionChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isSelected\", type: \"boolean\" }],\n },\n },\n states: {\n isHovered: {\n type: \"readonly\",\n onChangeProp: \"onHoverChange\",\n variableType: \"boolean\",\n },\n isPressed: {\n type: \"readonly\",\n onChangeProp: \"onPressChange\",\n variableType: \"boolean\",\n },\n isFocused: {\n type: \"readonly\",\n onChangeProp: \"onFocusChange\",\n variableType: \"boolean\",\n },\n isFocusVisible: {\n type: \"readonly\",\n onChangeProp: \"onFocusVisibleChange\",\n variableType: \"boolean\",\n },\n isSelected: {\n type: \"readonly\",\n onChangeProp: \"onSelectionChange\",\n variableType: \"boolean\",\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":["Component","React","Radio","ValueObserver","RadioGroup","registerComponentHelper","makeComponentName","getCommonInputProps"],"mappings":";;;;;;;;;;;;AAWA,MAAM,sBAAsBA,eAAkD,CAAA;AAAA,EAC5E,YAAY,KAA2B,EAAA;AACrC,IAAA,KAAA,CAAM,KAAK,CAAA,CAAA;AACX,IAAK,IAAA,CAAA,KAAA,GAAQ,EAAE,QAAA,EAAU,KAAM,EAAA,CAAA;AAAA,GACjC;AAAA,EAEA,OAAO,yBAAyB,CAA8B,EAAA;AAE5D,IAAO,OAAA,EAAE,UAAU,IAAK,EAAA,CAAA;AAAA,GAC1B;AAAA,EAEA,MAAS,GAAA;AACP,IAAI,IAAA,IAAA,CAAK,MAAM,QAAU,EAAA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AM,YAAc,EAAA,IAAA,EAAM,WAAW,CAAA;AAAA,SACpD;AAAA,OACF,CAAA;AAAA,MACA,MAAQ,EAAA;AAAA,QACN,SAAW,EAAA;AAAA,UACT,IAAM,EAAA,UAAA;AAAA,UACN,YAAc,EAAA,eAAA;AAAA,UACd,YAAc,EAAA,SAAA;AAAA,SAChB;AAAA,QACA,SAAW,EAAA;AAAA,UACT,IAAM,EAAA,UAAA;AAAA,UACN,YAAc,EAAA,eAAA;AAAA,UACd,YAAc,EAAA,SAAA;AAAA,SAChB;AAAA,QACA,SAAW,EAAA;AAAA,UACT,IAAM,EAAA,UAAA;AAAA,UACN,YAAc,EAAA,eAAA;AAAA,UACd,YAAc,EAAA,SAAA;AAAA,SAChB;AAAA,QACA,cAAgB,EAAA;AAAA,UACd,IAAM,EAAA,UAAA;AAAA,UACN,YAAc,EAAA,sBAAA;AAAA,UACd,YAAc,EAAA,SAAA;AAAA,SAChB;AAAA,QACA,UAAY,EAAA;AAAA,UACV,IAAM,EAAA,UAAA;AAAA,UACN,YAAc,EAAA,mBAAA;AAAA,UACd,YAAc,EAAA,SAAA;AAAA,SAChB;AAAA,OACF;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;;"}
|
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
import type { RadioProps } from "react-aria-components";
|
|
3
3
|
import { CodeComponentMetaOverrides, Registerable } from "./utils";
|
|
4
4
|
interface BaseRadioProps extends RadioProps {
|
|
5
|
+
onSelectionChange: (isSelected: boolean) => void;
|
|
5
6
|
onPressChange: (isPressed: boolean) => void;
|
|
6
7
|
onFocusVisibleChange: (isFocusVisible: boolean) => void;
|
|
7
8
|
}
|