@plasmicpkgs/react-aria 0.0.49 → 0.0.50
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/ListBoxItemIdManager.d.ts +13 -0
- package/dist/common.d.ts +0 -2
- package/dist/contexts.d.ts +4 -5
- package/dist/react-aria.esm.js +711 -843
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +709 -841
- package/dist/react-aria.js.map +1 -1
- package/dist/registerComboBox.d.ts +9 -17
- package/dist/registerListBox.d.ts +16 -6
- package/dist/registerListBoxItem.d.ts +13 -3
- package/dist/registerSection.d.ts +2 -4
- package/dist/registerSelect.d.ts +9 -18
- package/package.json +2 -2
- package/skinny/ListBoxItemIdManager.d.ts +13 -0
- package/skinny/{common-fa69e9b3.esm.js → common-8ca74873.esm.js} +4 -72
- package/skinny/common-8ca74873.esm.js.map +1 -0
- package/skinny/{common-bfedaf7d.cjs.js → common-c892c339.cjs.js} +4 -82
- package/skinny/common-c892c339.cjs.js.map +1 -0
- package/skinny/common.d.ts +0 -2
- package/skinny/contexts-0a2977d8.esm.js +15 -0
- package/skinny/contexts-0a2977d8.esm.js.map +1 -0
- package/skinny/{contexts-0dec6156.cjs.js → contexts-c26d68f8.cjs.js} +3 -9
- package/skinny/contexts-c26d68f8.cjs.js.map +1 -0
- package/skinny/contexts.d.ts +4 -5
- package/skinny/{interaction-variant-utils-abd0c319.esm.js → interaction-variant-utils-1d94d073.esm.js} +2 -2
- package/skinny/interaction-variant-utils-1d94d073.esm.js.map +1 -0
- package/skinny/{interaction-variant-utils-36f1b397.cjs.js → interaction-variant-utils-9a869063.cjs.js} +2 -2
- package/skinny/interaction-variant-utils-9a869063.cjs.js.map +1 -0
- package/skinny/registerButton.cjs.js +5 -4
- package/skinny/registerButton.cjs.js.map +1 -1
- package/skinny/registerButton.esm.js +3 -2
- package/skinny/registerButton.esm.js.map +1 -1
- package/skinny/registerCheckbox.cjs.js +6 -5
- package/skinny/registerCheckbox.cjs.js.map +1 -1
- package/skinny/registerCheckbox.esm.js +4 -3
- package/skinny/registerCheckbox.esm.js.map +1 -1
- package/skinny/registerCheckboxGroup.cjs.js +8 -7
- package/skinny/registerCheckboxGroup.cjs.js.map +1 -1
- package/skinny/registerCheckboxGroup.esm.js +5 -4
- package/skinny/registerCheckboxGroup.esm.js.map +1 -1
- package/skinny/registerComboBox.cjs.js +73 -253
- package/skinny/registerComboBox.cjs.js.map +1 -1
- package/skinny/registerComboBox.d.ts +9 -17
- package/skinny/registerComboBox.esm.js +74 -254
- package/skinny/registerComboBox.esm.js.map +1 -1
- package/skinny/registerDescription.cjs.js +2 -2
- package/skinny/registerDescription.cjs.js.map +1 -1
- package/skinny/registerDescription.esm.js +1 -1
- package/skinny/registerDialogTrigger.cjs.js +6 -5
- package/skinny/registerDialogTrigger.cjs.js.map +1 -1
- package/skinny/registerDialogTrigger.esm.js +4 -3
- package/skinny/registerDialogTrigger.esm.js.map +1 -1
- package/skinny/registerFieldError.cjs.js +3 -3
- package/skinny/registerFieldError.cjs.js.map +1 -1
- package/skinny/registerFieldError.esm.js +1 -1
- package/skinny/registerForm.cjs.js +3 -3
- package/skinny/registerForm.cjs.js.map +1 -1
- package/skinny/registerForm.esm.js +1 -1
- package/skinny/registerInput.cjs.js +7 -6
- package/skinny/registerInput.cjs.js.map +1 -1
- package/skinny/registerInput.esm.js +5 -4
- package/skinny/registerInput.esm.js.map +1 -1
- package/skinny/registerLabel.cjs.js +3 -3
- package/skinny/registerLabel.cjs.js.map +1 -1
- package/skinny/registerLabel.esm.js +1 -1
- package/skinny/registerListBox-85f61377.esm.js +321 -0
- package/skinny/registerListBox-85f61377.esm.js.map +1 -0
- package/skinny/registerListBox-96ae5783.cjs.js +331 -0
- package/skinny/registerListBox-96ae5783.cjs.js.map +1 -0
- package/skinny/registerListBox.cjs.js +7 -7
- package/skinny/registerListBox.d.ts +16 -6
- package/skinny/registerListBox.esm.js +6 -7
- package/skinny/registerListBox.esm.js.map +1 -1
- package/skinny/registerListBoxItem.cjs.js +96 -13
- package/skinny/registerListBoxItem.cjs.js.map +1 -1
- package/skinny/registerListBoxItem.d.ts +13 -3
- package/skinny/registerListBoxItem.esm.js +95 -12
- package/skinny/registerListBoxItem.esm.js.map +1 -1
- package/skinny/registerModal.cjs.js +5 -4
- package/skinny/registerModal.cjs.js.map +1 -1
- package/skinny/registerModal.esm.js +3 -2
- package/skinny/registerModal.esm.js.map +1 -1
- package/skinny/registerPopover.cjs.js +5 -6
- package/skinny/registerPopover.cjs.js.map +1 -1
- package/skinny/registerPopover.esm.js +3 -4
- package/skinny/registerPopover.esm.js.map +1 -1
- package/skinny/registerRadio.cjs.js +6 -5
- package/skinny/registerRadio.cjs.js.map +1 -1
- package/skinny/registerRadio.esm.js +4 -3
- package/skinny/registerRadio.esm.js.map +1 -1
- package/skinny/registerRadioGroup.cjs.js +8 -7
- package/skinny/registerRadioGroup.cjs.js.map +1 -1
- package/skinny/registerRadioGroup.esm.js +5 -4
- package/skinny/registerRadioGroup.esm.js.map +1 -1
- package/skinny/registerSection.cjs.js +30 -25
- package/skinny/registerSection.cjs.js.map +1 -1
- package/skinny/registerSection.d.ts +2 -4
- package/skinny/registerSection.esm.js +29 -24
- package/skinny/registerSection.esm.js.map +1 -1
- package/skinny/registerSelect.cjs.js +65 -88
- package/skinny/registerSelect.cjs.js.map +1 -1
- package/skinny/registerSelect.d.ts +9 -18
- package/skinny/registerSelect.esm.js +61 -84
- package/skinny/registerSelect.esm.js.map +1 -1
- package/skinny/registerSlider.cjs.js +9 -9
- package/skinny/registerSlider.cjs.js.map +1 -1
- package/skinny/registerSlider.esm.js +5 -5
- package/skinny/registerSliderOutput.cjs.js +4 -4
- package/skinny/registerSliderOutput.cjs.js.map +1 -1
- package/skinny/registerSliderOutput.esm.js +2 -2
- package/skinny/registerSliderThumb.cjs.js +23 -7
- package/skinny/registerSliderThumb.cjs.js.map +1 -1
- package/skinny/registerSliderThumb.esm.js +21 -5
- package/skinny/registerSliderThumb.esm.js.map +1 -1
- package/skinny/registerSliderTrack.cjs.js +7 -7
- package/skinny/registerSliderTrack.cjs.js.map +1 -1
- package/skinny/registerSliderTrack.esm.js +3 -3
- package/skinny/registerSwitch.cjs.js +6 -5
- package/skinny/registerSwitch.cjs.js.map +1 -1
- package/skinny/registerSwitch.esm.js +4 -3
- package/skinny/registerSwitch.esm.js.map +1 -1
- package/skinny/registerText.cjs.js +3 -3
- package/skinny/registerText.cjs.js.map +1 -1
- package/skinny/registerText.esm.js +1 -1
- package/skinny/registerTextArea.cjs.js +6 -5
- package/skinny/registerTextArea.cjs.js.map +1 -1
- package/skinny/registerTextArea.esm.js +4 -3
- package/skinny/registerTextArea.esm.js.map +1 -1
- package/skinny/registerTextField.cjs.js +8 -7
- package/skinny/registerTextField.cjs.js.map +1 -1
- package/skinny/registerTextField.esm.js +5 -4
- package/skinny/registerTextField.esm.js.map +1 -1
- package/skinny/registerTooltip.cjs.js +2 -2
- package/skinny/registerTooltip.cjs.js.map +1 -1
- package/skinny/registerTooltip.esm.js +1 -1
- package/skinny/utils-8dbb4d1f.cjs.js +79 -0
- package/skinny/utils-8dbb4d1f.cjs.js.map +1 -0
- package/skinny/utils-c7662a47.esm.js +69 -0
- package/skinny/utils-c7662a47.esm.js.map +1 -0
- package/dist/option-utils.d.ts +0 -42
- package/dist/registerHeader.d.ts +0 -5
- package/skinny/ErrorBoundary-c6b111d3.esm.js +0 -20
- package/skinny/ErrorBoundary-c6b111d3.esm.js.map +0 -1
- package/skinny/ErrorBoundary-e9b86248.cjs.js +0 -22
- package/skinny/ErrorBoundary-e9b86248.cjs.js.map +0 -1
- package/skinny/common-bfedaf7d.cjs.js.map +0 -1
- package/skinny/common-fa69e9b3.esm.js.map +0 -1
- package/skinny/contexts-0dec6156.cjs.js.map +0 -1
- package/skinny/contexts-9a8234bf.esm.js +0 -17
- package/skinny/contexts-9a8234bf.esm.js.map +0 -1
- package/skinny/interaction-variant-utils-36f1b397.cjs.js.map +0 -1
- package/skinny/interaction-variant-utils-abd0c319.esm.js.map +0 -1
- package/skinny/option-utils.d.ts +0 -42
- package/skinny/registerHeader.cjs.js +0 -55
- package/skinny/registerHeader.cjs.js.map +0 -1
- package/skinny/registerHeader.d.ts +0 -5
- package/skinny/registerHeader.esm.js +0 -48
- package/skinny/registerHeader.esm.js.map +0 -1
- package/skinny/registerListBox-b3f2891a.esm.js +0 -298
- package/skinny/registerListBox-b3f2891a.esm.js.map +0 -1
- package/skinny/registerListBox-f4801dbd.cjs.js +0 -310
- package/skinny/registerListBox-f4801dbd.cjs.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-8dbb4d1f.cjs.js","sources":["../src/utils.ts"],"sourcesContent":["import type { CodeComponentMeta } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type HasControlContextData<T = BaseControlContextData> = {\n setControlContextData?: (ctxData: T) => void;\n};\n\nexport type BaseControlContextData = {\n parent?: {\n isDisabled?: boolean;\n isReadOnly?: boolean;\n };\n};\n\nexport type Registerable = {\n registerComponent: typeof registerComponent;\n};\n\nexport type OtherCodeComponentsMeta = {\n text: CodeComponentMeta<any>;\n description: CodeComponentMeta<any>;\n};\n\nexport type CodeComponentMetaOverrides<T extends React.ComponentType<any>> =\n Partial<\n Pick<\n CodeComponentMeta<React.ComponentProps<T>>,\n \"parentComponentName\" | \"props\" | \"displayName\" | \"name\"\n >\n >;\n\nexport function registerComponentHelper<T extends React.ComponentType<any>>(\n loader: Registerable | undefined,\n component: T,\n meta: CodeComponentMeta<React.ComponentProps<T>>,\n overrides?: CodeComponentMetaOverrides<T>\n) {\n meta = {\n ...meta,\n defaultStyles: {\n boxSizing: \"border-box\",\n ...(meta.defaultStyles ?? {}),\n },\n };\n if (overrides) {\n meta = {\n ...meta,\n ...overrides,\n props: {\n ...meta.props,\n ...overrides.props,\n },\n };\n if (overrides.parentComponentName) {\n meta.name = makeChildComponentName(\n overrides.parentComponentName,\n meta.name\n );\n }\n }\n if (loader) {\n loader.registerComponent(component, meta);\n } else {\n registerComponent(component, meta);\n }\n return meta;\n}\n\nexport function makeComponentName(name: string) {\n return `plasmic-react-aria-${name}`;\n}\n\nexport function makeChildComponentName(\n fullParentName: string | undefined,\n fullChildName: string\n) {\n if (!fullParentName) {\n return fullChildName;\n }\n return `${fullParentName}-${fullChildName.replace(\n \"plasmic-react-aria-\",\n \"\"\n )}`;\n}\n\nexport interface Styleable {\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function extractPlasmicDataProps(props: Record<string, any>) {\n return Object.fromEntries(\n Object.entries(props).filter(([key]) => key.startsWith(\"data-plasmic-\"))\n );\n}\n\nexport function withoutNils<T>(array: (T | undefined | null)[]) {\n return array.filter((x): x is T => x != null);\n}\n\nexport function isDefined<T>(thing: T | undefined | null): thing is T {\n return thing !== undefined && thing !== null;\n}\n"],"names":["registerComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCO,SAAS,uBACd,CAAA,MAAA,EACA,SACA,EAAA,IAAA,EACA,SACA,EAAA;AArCF,EAAA,IAAA,EAAA,CAAA;AAsCE,EAAA,IAAA,GAAO,iCACF,IADE,CAAA,EAAA;AAAA,IAEL,aAAe,EAAA,cAAA,CAAA;AAAA,MACb,SAAW,EAAA,YAAA;AAAA,KACP,EAAA,CAAA,EAAA,GAAA,IAAA,CAAK,aAAL,KAAA,IAAA,GAAA,EAAA,GAAsB,EAAC,CAAA;AAAA,GAE/B,CAAA,CAAA;AACA,EAAA,IAAI,SAAW,EAAA;AACb,IAAO,IAAA,GAAA,aAAA,CAAA,cAAA,CAAA,cAAA,CAAA,EAAA,EACF,OACA,SAFE,CAAA,EAAA;AAAA,MAGL,KAAO,EAAA,cAAA,CAAA,cAAA,CAAA,EAAA,EACF,IAAK,CAAA,KAAA,CAAA,EACL,SAAU,CAAA,KAAA,CAAA;AAAA,KAEjB,C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
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
|
+
function registerComponentHelper(loader, component, meta, overrides) {
|
|
23
|
+
var _a;
|
|
24
|
+
meta = __spreadProps(__spreadValues({}, meta), {
|
|
25
|
+
defaultStyles: __spreadValues({
|
|
26
|
+
boxSizing: "border-box"
|
|
27
|
+
}, (_a = meta.defaultStyles) != null ? _a : {})
|
|
28
|
+
});
|
|
29
|
+
if (overrides) {
|
|
30
|
+
meta = __spreadProps(__spreadValues(__spreadValues({}, meta), overrides), {
|
|
31
|
+
props: __spreadValues(__spreadValues({}, meta.props), overrides.props)
|
|
32
|
+
});
|
|
33
|
+
if (overrides.parentComponentName) {
|
|
34
|
+
meta.name = makeChildComponentName(
|
|
35
|
+
overrides.parentComponentName,
|
|
36
|
+
meta.name
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (loader) {
|
|
41
|
+
loader.registerComponent(component, meta);
|
|
42
|
+
} else {
|
|
43
|
+
registerComponent(component, meta);
|
|
44
|
+
}
|
|
45
|
+
return meta;
|
|
46
|
+
}
|
|
47
|
+
function makeComponentName(name) {
|
|
48
|
+
return `plasmic-react-aria-${name}`;
|
|
49
|
+
}
|
|
50
|
+
function makeChildComponentName(fullParentName, fullChildName) {
|
|
51
|
+
if (!fullParentName) {
|
|
52
|
+
return fullChildName;
|
|
53
|
+
}
|
|
54
|
+
return `${fullParentName}-${fullChildName.replace(
|
|
55
|
+
"plasmic-react-aria-",
|
|
56
|
+
""
|
|
57
|
+
)}`;
|
|
58
|
+
}
|
|
59
|
+
function extractPlasmicDataProps(props) {
|
|
60
|
+
return Object.fromEntries(
|
|
61
|
+
Object.entries(props).filter(([key]) => key.startsWith("data-plasmic-"))
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
function isDefined(thing) {
|
|
65
|
+
return thing !== void 0 && thing !== null;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { makeComponentName as a, extractPlasmicDataProps as e, isDefined as i, makeChildComponentName as m, registerComponentHelper as r };
|
|
69
|
+
//# sourceMappingURL=utils-c7662a47.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-c7662a47.esm.js","sources":["../src/utils.ts"],"sourcesContent":["import type { CodeComponentMeta } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\n\nexport type HasControlContextData<T = BaseControlContextData> = {\n setControlContextData?: (ctxData: T) => void;\n};\n\nexport type BaseControlContextData = {\n parent?: {\n isDisabled?: boolean;\n isReadOnly?: boolean;\n };\n};\n\nexport type Registerable = {\n registerComponent: typeof registerComponent;\n};\n\nexport type OtherCodeComponentsMeta = {\n text: CodeComponentMeta<any>;\n description: CodeComponentMeta<any>;\n};\n\nexport type CodeComponentMetaOverrides<T extends React.ComponentType<any>> =\n Partial<\n Pick<\n CodeComponentMeta<React.ComponentProps<T>>,\n \"parentComponentName\" | \"props\" | \"displayName\" | \"name\"\n >\n >;\n\nexport function registerComponentHelper<T extends React.ComponentType<any>>(\n loader: Registerable | undefined,\n component: T,\n meta: CodeComponentMeta<React.ComponentProps<T>>,\n overrides?: CodeComponentMetaOverrides<T>\n) {\n meta = {\n ...meta,\n defaultStyles: {\n boxSizing: \"border-box\",\n ...(meta.defaultStyles ?? {}),\n },\n };\n if (overrides) {\n meta = {\n ...meta,\n ...overrides,\n props: {\n ...meta.props,\n ...overrides.props,\n },\n };\n if (overrides.parentComponentName) {\n meta.name = makeChildComponentName(\n overrides.parentComponentName,\n meta.name\n );\n }\n }\n if (loader) {\n loader.registerComponent(component, meta);\n } else {\n registerComponent(component, meta);\n }\n return meta;\n}\n\nexport function makeComponentName(name: string) {\n return `plasmic-react-aria-${name}`;\n}\n\nexport function makeChildComponentName(\n fullParentName: string | undefined,\n fullChildName: string\n) {\n if (!fullParentName) {\n return fullChildName;\n }\n return `${fullParentName}-${fullChildName.replace(\n \"plasmic-react-aria-\",\n \"\"\n )}`;\n}\n\nexport interface Styleable {\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function extractPlasmicDataProps(props: Record<string, any>) {\n return Object.fromEntries(\n Object.entries(props).filter(([key]) => key.startsWith(\"data-plasmic-\"))\n );\n}\n\nexport function withoutNils<T>(array: (T | undefined | null)[]) {\n return array.filter((x): x is T => x != null);\n}\n\nexport function isDefined<T>(thing: T | undefined | null): thing is T {\n return thing !== undefined && thing !== null;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgCO,SAAS,uBACd,CAAA,MAAA,EACA,SACA,EAAA,IAAA,EACA,SACA,EAAA;AArCF,EAAA,IAAA,EAAA,CAAA;AAsCE,EAAA,IAAA,GAAO,iCACF,IADE,CAAA,EAAA;AAAA,IAEL,aAAe,EAAA,cAAA,CAAA;AAAA,MACb,SAAW,EAAA,YAAA;AAAA,KACP,EAAA,CAAA,EAAA,GAAA,IAAA,CAAK,aAAL,KAAA,IAAA,GAAA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CAAI,UAAW,CAAA,eAAe,CAAC,CAAA;AAAA,GACzE,CAAA;AACF,CAAA;AAMO,SAAS,UAAa,KAAyC,EAAA;AACpE,EAAO,OAAA,KAAA,KAAU,UAAa,KAAU,KAAA,IAAA,CAAA;AAC1C;;;;"}
|
package/dist/option-utils.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { ArrayType } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
export interface ObjectSectionType<T extends object> {
|
|
3
|
-
label?: string;
|
|
4
|
-
items?: ObjectItemType<T>[];
|
|
5
|
-
}
|
|
6
|
-
interface FlexSectionType<T extends object> {
|
|
7
|
-
label?: string;
|
|
8
|
-
items?: FlexItemType<T>[];
|
|
9
|
-
}
|
|
10
|
-
export type ObjectItemType<T extends object> = StrictOptionType | T;
|
|
11
|
-
type FlexItemType<T extends object> = ObjectItemType<T> | string;
|
|
12
|
-
export type FlexOptionType<T extends object> = FlexItemType<T> | FlexSectionType<T>;
|
|
13
|
-
export type ObjectOptionType<T extends object> = ObjectSectionType<T> | ObjectItemType<T>;
|
|
14
|
-
export interface HasOptions<T extends object> {
|
|
15
|
-
options?: FlexOptionType<T>[];
|
|
16
|
-
optionInfo?: (option: FlexOptionType<T>) => StrictOptionType;
|
|
17
|
-
}
|
|
18
|
-
export interface StrictItemType {
|
|
19
|
-
type?: "option";
|
|
20
|
-
id: string;
|
|
21
|
-
label?: string;
|
|
22
|
-
isDisabled?: boolean;
|
|
23
|
-
}
|
|
24
|
-
export interface StrictSectionType {
|
|
25
|
-
type: "option-group";
|
|
26
|
-
label?: string;
|
|
27
|
-
items?: StrictItemType[];
|
|
28
|
-
key: string;
|
|
29
|
-
}
|
|
30
|
-
export type StrictOptionType = StrictItemType | StrictSectionType;
|
|
31
|
-
export declare function useStrictOptions<T extends object>(props: HasOptions<T>): {
|
|
32
|
-
options: StrictOptionType[] | undefined;
|
|
33
|
-
optionText: (op: StrictItemType) => string;
|
|
34
|
-
};
|
|
35
|
-
export declare function deriveStrictOptions<T extends object>(props: HasOptions<T>): {
|
|
36
|
-
options: StrictOptionType[] | undefined;
|
|
37
|
-
optionText: (op: StrictItemType) => string;
|
|
38
|
-
};
|
|
39
|
-
export declare function flattenOptions(options: (StrictItemType | StrictSectionType)[] | undefined): StrictItemType[];
|
|
40
|
-
export declare function makeOptionsPropType(): ArrayType<HasOptions<any>>;
|
|
41
|
-
export declare function makeValuePropType(): import("@plasmicapp/host/registerComponent").SingleChoiceType<HasOptions<any>>;
|
|
42
|
-
export {};
|
package/dist/registerHeader.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Header } from "react-aria-components";
|
|
3
|
-
import { CodeComponentMetaOverrides, Registerable } from "./utils";
|
|
4
|
-
export declare function BaseHeader(props: React.ComponentProps<typeof Header>): React.JSX.Element;
|
|
5
|
-
export declare function registerHeader(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseHeader>): import("@plasmicapp/host").CodeComponentMeta<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
2
|
-
|
|
3
|
-
class ErrorBoundary extends Component {
|
|
4
|
-
constructor(props) {
|
|
5
|
-
super(props);
|
|
6
|
-
this.state = { hasError: false };
|
|
7
|
-
}
|
|
8
|
-
static getDerivedStateFromError(_) {
|
|
9
|
-
return { hasError: true };
|
|
10
|
-
}
|
|
11
|
-
render() {
|
|
12
|
-
if (this.state.hasError) {
|
|
13
|
-
return this.props.fallback;
|
|
14
|
-
}
|
|
15
|
-
return this.props.children;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { ErrorBoundary as E };
|
|
20
|
-
//# sourceMappingURL=ErrorBoundary-c6b111d3.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary-c6b111d3.esm.js","sources":["../src/ErrorBoundary.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"],"names":[],"mappings":";;AAWA,MAAM,sBAAsB,SAAkD,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;AACvB,MAAA,OAAO,KAAK,KAAM,CAAA,QAAA,CAAA;AAAA,KACpB;AAEA,IAAA,OAAO,KAAK,KAAM,CAAA,QAAA,CAAA;AAAA,GACpB;AACF;;;;"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
|
|
5
|
-
class ErrorBoundary extends React.Component {
|
|
6
|
-
constructor(props) {
|
|
7
|
-
super(props);
|
|
8
|
-
this.state = { hasError: false };
|
|
9
|
-
}
|
|
10
|
-
static getDerivedStateFromError(_) {
|
|
11
|
-
return { hasError: true };
|
|
12
|
-
}
|
|
13
|
-
render() {
|
|
14
|
-
if (this.state.hasError) {
|
|
15
|
-
return this.props.fallback;
|
|
16
|
-
}
|
|
17
|
-
return this.props.children;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
exports.ErrorBoundary = ErrorBoundary;
|
|
22
|
-
//# sourceMappingURL=ErrorBoundary-e9b86248.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary-e9b86248.cjs.js","sources":["../src/ErrorBoundary.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"],"names":["Component"],"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;AACvB,MAAA,OAAO,KAAK,KAAM,CAAA,QAAA,CAAA;AAAA,KACpB;AAEA,IAAA,OAAO,KAAK,KAAM,CAAA,QAAA,CAAA;AAAA,GACpB;AACF;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common-bfedaf7d.cjs.js","sources":["../src/utils.ts","../src/common.ts"],"sourcesContent":["import type { CodeComponentMeta } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\nimport { defaultStyles } from \"./common\";\n\nexport type HasControlContextData<T = BaseControlContextData> = {\n setControlContextData?: (ctxData: T) => void;\n};\n\nexport type BaseControlContextData = {\n parent?: {\n isDisabled?: boolean;\n isReadOnly?: boolean;\n };\n};\n\nexport type Registerable = {\n registerComponent: typeof registerComponent;\n};\n\nexport type OtherCodeComponentsMeta = {\n text: CodeComponentMeta<any>;\n description: CodeComponentMeta<any>;\n};\n\nexport type CodeComponentMetaOverrides<T extends React.ComponentType<any>> =\n Partial<\n Pick<\n CodeComponentMeta<React.ComponentProps<T>>,\n \"parentComponentName\" | \"props\" | \"displayName\" | \"name\"\n >\n >;\n\nexport function registerComponentHelper<T extends React.ComponentType<any>>(\n loader: Registerable | undefined,\n component: T,\n meta: CodeComponentMeta<React.ComponentProps<T>>,\n overrides?: CodeComponentMetaOverrides<T>\n) {\n meta = {\n ...meta,\n defaultStyles: {\n ...defaultStyles,\n ...(meta.defaultStyles ?? {}),\n },\n };\n if (overrides) {\n meta = {\n ...meta,\n ...overrides,\n props: {\n ...meta.props,\n ...overrides.props,\n },\n };\n if (overrides.parentComponentName) {\n meta.name = makeChildComponentName(\n overrides.parentComponentName,\n meta.name\n );\n }\n }\n if (loader) {\n loader.registerComponent(component, meta);\n } else {\n registerComponent(component, meta);\n }\n return meta;\n}\n\nexport function makeComponentName(name: string) {\n return `plasmic-react-aria-${name}`;\n}\n\nexport function makeChildComponentName(\n fullParentName: string | undefined,\n fullChildName: string\n) {\n if (!fullParentName) {\n return fullChildName;\n }\n return `${fullParentName}-${fullChildName.replace(\n \"plasmic-react-aria-\",\n \"\"\n )}`;\n}\n\nexport interface Styleable {\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function extractPlasmicDataProps(props: Record<string, any>) {\n return Object.fromEntries(\n Object.entries(props).filter(([key]) => key.startsWith(\"data-plasmic-\"))\n );\n}\n\nexport function withoutNils<T>(array: (T | undefined | null)[]) {\n return array.filter((x): x is T => x != null);\n}\n\nexport function isDefined<T>(thing: T | undefined | null): thing is T {\n return thing !== undefined && thing !== null;\n}\n","import { PropType } from \"@plasmicapp/host\";\nimport {\n BaseControlContextData,\n HasControlContextData,\n isDefined,\n} from \"./utils\";\n\nexport const defaultStyles: React.CSSProperties = {\n boxSizing: \"border-box\",\n};\n\nexport function hasParent<T>(_props: T, ctx: ConditionalContext<T>): boolean {\n return isDefined(ctx?.parent) === true;\n}\n\nexport function isParentReadOnly<T>(_props: T, ctx: ConditionalContext<T>) {\n return ctx?.parent?.isReadOnly === true;\n}\n\nexport function isParentDisabled<T>(_props: T, ctx: ConditionalContext<T>) {\n return ctx?.parent?.isDisabled === true;\n}\n\nexport function resolveAutoComplete(autoCompleteProp?: string | string[]) {\n if (typeof autoCompleteProp === \"string\") {\n return autoCompleteProp;\n }\n if (\n !autoCompleteProp ||\n !Array.isArray(autoCompleteProp) ||\n autoCompleteProp.includes(\"off\")\n ) {\n return undefined;\n }\n if (autoCompleteProp.includes(\"off\")) {\n return \"off\";\n }\n if (autoCompleteProp.includes(\"on\") && autoCompleteProp.length === 1) {\n return \"on\";\n }\n return autoCompleteProp.filter((x) => x !== \"on\").join(\" \");\n}\n\ntype ConditionalContext<T> = T extends HasControlContextData\n ? BaseControlContextData | null\n : null;\n\nfunction createNameProp<T>(): PropType<T> {\n return {\n type: \"string\",\n description: \"Name for this field if it is part of a form\",\n hidden: hasParent,\n advanced: true,\n };\n}\n\nfunction createDisabledProp<T>(componentName: string): PropType<T> {\n return {\n displayName: \"Disabled\",\n type: \"boolean\",\n description: `Whether the ${componentName} is read-only and unfocusable`,\n defaultValueHint: false,\n hidden: isParentDisabled,\n };\n}\n\nfunction createReadOnlyProp<T>(componentName: string): PropType<T> {\n return {\n displayName: \"Read only\",\n type: \"boolean\",\n description: `Whether the value of this ${componentName} can be changed by the user. Unlike disabled, read-only does not prevent the user from interacting with the component (such as focus).`,\n defaultValueHint: false,\n advanced: true,\n hidden: isParentReadOnly,\n };\n}\n\nfunction createRequiredProp<T>(componentName: string): PropType<T> {\n return {\n displayName: \"Required\",\n type: \"boolean\",\n description: `Whether user input is required on the ${componentName} before form submission.`,\n defaultValueHint: false,\n advanced: true,\n hidden: hasParent,\n };\n}\n\nfunction createAutoFocusProp<T>(componentName: string): PropType<T> {\n return {\n type: \"boolean\",\n description: `Whether the ${componentName} should be focused when rendered`,\n defaultValueHint: false,\n advanced: true,\n hidden: hasParent,\n };\n}\n\nfunction createAriaLabelProp<T>(componentName: string): PropType<T> {\n return {\n type: \"string\",\n displayName: \"ARIA label\",\n description: `Label for this ${componentName}, if no visible label is used, to identify the element to assistive technology`,\n advanced: true,\n hidden: hasParent,\n };\n}\n\nfunction createChildrenProp<T>(): PropType<T> {\n return {\n type: \"slot\",\n mergeWithParent: true as any,\n };\n}\n\nexport function getCommonProps<T>(\n componentName: string,\n propNames: (keyof T)[]\n) {\n const commonProps: Record<string, PropType<T>> = {\n name: createNameProp<T>(),\n disabled: createDisabledProp(componentName),\n isDisabled: createDisabledProp(componentName),\n readOnly: createReadOnlyProp(componentName),\n isReadOnly: createReadOnlyProp(componentName),\n autoFocus: createAutoFocusProp(componentName),\n \"aria-label\": createAriaLabelProp(componentName),\n required: createRequiredProp(componentName),\n isRequired: createRequiredProp(componentName),\n children: createChildrenProp(),\n // NOTE: The following props are only applicable to inputs, textareas, and text fields\n value: {\n type: \"string\",\n editOnly: true,\n displayName: \"Initial value\",\n uncontrolledProp: \"defaultValue\",\n description: `The default value of the ${componentName}`,\n hidden: hasParent,\n },\n maxLength: {\n type: \"number\",\n description: \"The maximum number of characters supported by the input\",\n advanced: true,\n hidden: hasParent,\n },\n minLength: {\n type: \"number\",\n description: \"The minimum number of characters supported by the input\",\n advanced: true,\n hidden: hasParent,\n },\n pattern: {\n type: \"string\",\n description:\n \"Regex pattern that the value of the input must match to be valid\",\n helpText:\n \"For more information about writing Regular Expressions (regex), check out https://regexr.com/\",\n validator: (value: string) => {\n try {\n new RegExp(value);\n return true;\n } catch (error) {\n return \"Invalid Regex\";\n }\n },\n advanced: true,\n hidden: hasParent,\n },\n type: {\n type: \"choice\",\n defaultValueHint: \"text\",\n options: [\"text\", \"search\", \"url\", \"tel\", \"email\", \"password\"],\n description:\n \"The type of data that an input field is expected to handle. It influences the input's behavior, validation, and the kind of interface provided to the user.\",\n advanced: true,\n hidden: hasParent,\n },\n inputMode: {\n type: \"choice\",\n description:\n \"hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents.\",\n options: [\n \"none\",\n \"text\",\n \"tel\",\n \"url\",\n \"email\",\n \"numeric\",\n \"decimal\",\n \"search\",\n ],\n hidden: hasParent,\n },\n autoComplete: {\n type: \"choice\",\n advanced: true,\n multiSelect: true,\n hidden: hasParent,\n description: \"Guidance as to the type of data expected in the field\",\n helpText:\n \"For explanations on what each of the values mean, check https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\",\n options: [\n \"on\",\n \"off\",\n \"name\",\n \"honorific-prefix\",\n \"given-name\",\n \"additional-name\",\n \"family-name\",\n \"honorific-suffix\",\n \"nickname\",\n \"email\",\n \"username\",\n \"new-password\",\n \"current-password\",\n \"one-time-code\",\n \"organization-title\",\n \"organization\",\n \"street-address\",\n \"shipping\",\n \"billing\",\n \"address-line1\",\n \"address-line2\",\n \"address-line3\",\n \"address-level4\",\n \"address-level3\",\n \"address-level2\",\n \"address-level1\",\n \"country\",\n \"country-name\",\n \"postal-code\",\n \"cc-name\",\n \"cc-given-name\",\n \"cc-additional-name\",\n \"cc-family-name\",\n \"cc-number\",\n \"cc-exp\",\n \"cc-exp-month\",\n \"cc-exp-year\",\n \"cc-csc\",\n \"cc-type\",\n \"transaction-currency\",\n \"transaction-amount\",\n \"language\",\n \"bday\",\n \"bday-day\",\n \"bday-month\",\n \"bday-year\",\n \"sex\",\n \"tel\",\n \"tel-country-code\",\n \"tel-national\",\n \"tel-area-code\",\n \"tel-local\",\n \"tel-local-suffix\",\n \"tel-local-prefix\",\n \"tel-extension\",\n \"impp\",\n \"url\",\n \"photo\",\n \"webauthn\",\n ],\n },\n validationBehavior: {\n type: \"choice\",\n options: [\"native\", \"aria\"],\n description:\n \"Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA.\",\n defaultValueHint: \"native\",\n advanced: true,\n hidden: hasParent,\n },\n onChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"value\", type: \"string\" }],\n hidden: hasParent,\n },\n onFocus: {\n type: \"eventHandler\",\n argTypes: [{ name: \"focusEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onBlur: {\n type: \"eventHandler\",\n argTypes: [{ name: \"focusEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onFocusChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isFocused\", type: \"boolean\" }],\n advanced: true,\n hidden: hasParent,\n },\n onKeyDown: {\n type: \"eventHandler\",\n argTypes: [{ name: \"keyboardEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onKeyUp: {\n type: \"eventHandler\",\n argTypes: [{ name: \"keyboardEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCopy: {\n type: \"eventHandler\",\n argTypes: [{ name: \"clipbordEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCut: {\n type: \"eventHandler\",\n argTypes: [{ name: \"clipbordEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onPaste: {\n type: \"eventHandler\",\n argTypes: [{ name: \"clipbordEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCompositionStart: {\n type: \"eventHandler\",\n argTypes: [{ name: \"compositionEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCompositionEnd: {\n type: \"eventHandler\",\n argTypes: [{ name: \"compositionEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCompositionUpdate: {\n type: \"eventHandler\",\n argTypes: [{ name: \"compositionEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onSelect: {\n type: \"eventHandler\",\n argTypes: [{ name: \"selectionEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onBeforeInput: {\n type: \"eventHandler\",\n argTypes: [{ name: \"inputEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onInput: {\n type: \"eventHandler\",\n argTypes: [{ name: \"inputEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n placeholder: {\n type: \"string\",\n },\n };\n\n // Filter the properties based on the provided fields array\n const filteredProps: Partial<Record<keyof T, PropType<T>>> = {};\n propNames.forEach((propName) => {\n if (Object.prototype.hasOwnProperty.call(commonProps, propName)) {\n filteredProps[propName] = commonProps[propName as string];\n }\n });\n\n return filteredProps;\n}\n"],"names":["registerComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCO,SAAS,uBACd,CAAA,MAAA,EACA,SACA,EAAA,IAAA,EACA,SACA,EAAA;AAtCF,EAAA,IAAA,EAAA,CAAA;AAuCE,EAAA,IAAA,GAAO,iCACF,IADE,CAAA,EAAA;AAAA,IAEL,eAAe,cACV,CAAA,cAAA,CAAA,EAAA,EAAA,aAAA,CAAA,EAAA,CACC,EAAK,GAAA,IAAA,CAAA,aAAA,KAAL,YAAsB,EAAC,CAAA;AAAA,GAE/B,CAAA,CAAA;AACA,EAAA,IAAI,SAAW,EAAA;AACb,IAAO,IAAA,GAAA,aAAA,CAAA,cAAA,CAAA,cAAA,CAAA,EAAA,EACF,OACA,SAFE,CAAA,EAAA;AAAA,MAGL,KAAO,EAAA,cAAA,CAAA,cAAA,CAAA,EAAA,EACF,IAAK,CAAA,KAAA,CAAA,EACL,SAAU,CAAA,KAAA,CAAA;AAAA,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QAAkB,CAAA,CAAA;AAAA,KAC1D;AAAA,GACD,CAAA,CAAA;AAED,EAAO,OAAA,aAAA,CAAA;AACT;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common-fa69e9b3.esm.js","sources":["../src/utils.ts","../src/common.ts"],"sourcesContent":["import type { CodeComponentMeta } from \"@plasmicapp/host\";\nimport registerComponent from \"@plasmicapp/host/registerComponent\";\nimport React from \"react\";\nimport { defaultStyles } from \"./common\";\n\nexport type HasControlContextData<T = BaseControlContextData> = {\n setControlContextData?: (ctxData: T) => void;\n};\n\nexport type BaseControlContextData = {\n parent?: {\n isDisabled?: boolean;\n isReadOnly?: boolean;\n };\n};\n\nexport type Registerable = {\n registerComponent: typeof registerComponent;\n};\n\nexport type OtherCodeComponentsMeta = {\n text: CodeComponentMeta<any>;\n description: CodeComponentMeta<any>;\n};\n\nexport type CodeComponentMetaOverrides<T extends React.ComponentType<any>> =\n Partial<\n Pick<\n CodeComponentMeta<React.ComponentProps<T>>,\n \"parentComponentName\" | \"props\" | \"displayName\" | \"name\"\n >\n >;\n\nexport function registerComponentHelper<T extends React.ComponentType<any>>(\n loader: Registerable | undefined,\n component: T,\n meta: CodeComponentMeta<React.ComponentProps<T>>,\n overrides?: CodeComponentMetaOverrides<T>\n) {\n meta = {\n ...meta,\n defaultStyles: {\n ...defaultStyles,\n ...(meta.defaultStyles ?? {}),\n },\n };\n if (overrides) {\n meta = {\n ...meta,\n ...overrides,\n props: {\n ...meta.props,\n ...overrides.props,\n },\n };\n if (overrides.parentComponentName) {\n meta.name = makeChildComponentName(\n overrides.parentComponentName,\n meta.name\n );\n }\n }\n if (loader) {\n loader.registerComponent(component, meta);\n } else {\n registerComponent(component, meta);\n }\n return meta;\n}\n\nexport function makeComponentName(name: string) {\n return `plasmic-react-aria-${name}`;\n}\n\nexport function makeChildComponentName(\n fullParentName: string | undefined,\n fullChildName: string\n) {\n if (!fullParentName) {\n return fullChildName;\n }\n return `${fullParentName}-${fullChildName.replace(\n \"plasmic-react-aria-\",\n \"\"\n )}`;\n}\n\nexport interface Styleable {\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function extractPlasmicDataProps(props: Record<string, any>) {\n return Object.fromEntries(\n Object.entries(props).filter(([key]) => key.startsWith(\"data-plasmic-\"))\n );\n}\n\nexport function withoutNils<T>(array: (T | undefined | null)[]) {\n return array.filter((x): x is T => x != null);\n}\n\nexport function isDefined<T>(thing: T | undefined | null): thing is T {\n return thing !== undefined && thing !== null;\n}\n","import { PropType } from \"@plasmicapp/host\";\nimport {\n BaseControlContextData,\n HasControlContextData,\n isDefined,\n} from \"./utils\";\n\nexport const defaultStyles: React.CSSProperties = {\n boxSizing: \"border-box\",\n};\n\nexport function hasParent<T>(_props: T, ctx: ConditionalContext<T>): boolean {\n return isDefined(ctx?.parent) === true;\n}\n\nexport function isParentReadOnly<T>(_props: T, ctx: ConditionalContext<T>) {\n return ctx?.parent?.isReadOnly === true;\n}\n\nexport function isParentDisabled<T>(_props: T, ctx: ConditionalContext<T>) {\n return ctx?.parent?.isDisabled === true;\n}\n\nexport function resolveAutoComplete(autoCompleteProp?: string | string[]) {\n if (typeof autoCompleteProp === \"string\") {\n return autoCompleteProp;\n }\n if (\n !autoCompleteProp ||\n !Array.isArray(autoCompleteProp) ||\n autoCompleteProp.includes(\"off\")\n ) {\n return undefined;\n }\n if (autoCompleteProp.includes(\"off\")) {\n return \"off\";\n }\n if (autoCompleteProp.includes(\"on\") && autoCompleteProp.length === 1) {\n return \"on\";\n }\n return autoCompleteProp.filter((x) => x !== \"on\").join(\" \");\n}\n\ntype ConditionalContext<T> = T extends HasControlContextData\n ? BaseControlContextData | null\n : null;\n\nfunction createNameProp<T>(): PropType<T> {\n return {\n type: \"string\",\n description: \"Name for this field if it is part of a form\",\n hidden: hasParent,\n advanced: true,\n };\n}\n\nfunction createDisabledProp<T>(componentName: string): PropType<T> {\n return {\n displayName: \"Disabled\",\n type: \"boolean\",\n description: `Whether the ${componentName} is read-only and unfocusable`,\n defaultValueHint: false,\n hidden: isParentDisabled,\n };\n}\n\nfunction createReadOnlyProp<T>(componentName: string): PropType<T> {\n return {\n displayName: \"Read only\",\n type: \"boolean\",\n description: `Whether the value of this ${componentName} can be changed by the user. Unlike disabled, read-only does not prevent the user from interacting with the component (such as focus).`,\n defaultValueHint: false,\n advanced: true,\n hidden: isParentReadOnly,\n };\n}\n\nfunction createRequiredProp<T>(componentName: string): PropType<T> {\n return {\n displayName: \"Required\",\n type: \"boolean\",\n description: `Whether user input is required on the ${componentName} before form submission.`,\n defaultValueHint: false,\n advanced: true,\n hidden: hasParent,\n };\n}\n\nfunction createAutoFocusProp<T>(componentName: string): PropType<T> {\n return {\n type: \"boolean\",\n description: `Whether the ${componentName} should be focused when rendered`,\n defaultValueHint: false,\n advanced: true,\n hidden: hasParent,\n };\n}\n\nfunction createAriaLabelProp<T>(componentName: string): PropType<T> {\n return {\n type: \"string\",\n displayName: \"ARIA label\",\n description: `Label for this ${componentName}, if no visible label is used, to identify the element to assistive technology`,\n advanced: true,\n hidden: hasParent,\n };\n}\n\nfunction createChildrenProp<T>(): PropType<T> {\n return {\n type: \"slot\",\n mergeWithParent: true as any,\n };\n}\n\nexport function getCommonProps<T>(\n componentName: string,\n propNames: (keyof T)[]\n) {\n const commonProps: Record<string, PropType<T>> = {\n name: createNameProp<T>(),\n disabled: createDisabledProp(componentName),\n isDisabled: createDisabledProp(componentName),\n readOnly: createReadOnlyProp(componentName),\n isReadOnly: createReadOnlyProp(componentName),\n autoFocus: createAutoFocusProp(componentName),\n \"aria-label\": createAriaLabelProp(componentName),\n required: createRequiredProp(componentName),\n isRequired: createRequiredProp(componentName),\n children: createChildrenProp(),\n // NOTE: The following props are only applicable to inputs, textareas, and text fields\n value: {\n type: \"string\",\n editOnly: true,\n displayName: \"Initial value\",\n uncontrolledProp: \"defaultValue\",\n description: `The default value of the ${componentName}`,\n hidden: hasParent,\n },\n maxLength: {\n type: \"number\",\n description: \"The maximum number of characters supported by the input\",\n advanced: true,\n hidden: hasParent,\n },\n minLength: {\n type: \"number\",\n description: \"The minimum number of characters supported by the input\",\n advanced: true,\n hidden: hasParent,\n },\n pattern: {\n type: \"string\",\n description:\n \"Regex pattern that the value of the input must match to be valid\",\n helpText:\n \"For more information about writing Regular Expressions (regex), check out https://regexr.com/\",\n validator: (value: string) => {\n try {\n new RegExp(value);\n return true;\n } catch (error) {\n return \"Invalid Regex\";\n }\n },\n advanced: true,\n hidden: hasParent,\n },\n type: {\n type: \"choice\",\n defaultValueHint: \"text\",\n options: [\"text\", \"search\", \"url\", \"tel\", \"email\", \"password\"],\n description:\n \"The type of data that an input field is expected to handle. It influences the input's behavior, validation, and the kind of interface provided to the user.\",\n advanced: true,\n hidden: hasParent,\n },\n inputMode: {\n type: \"choice\",\n description:\n \"hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents.\",\n options: [\n \"none\",\n \"text\",\n \"tel\",\n \"url\",\n \"email\",\n \"numeric\",\n \"decimal\",\n \"search\",\n ],\n hidden: hasParent,\n },\n autoComplete: {\n type: \"choice\",\n advanced: true,\n multiSelect: true,\n hidden: hasParent,\n description: \"Guidance as to the type of data expected in the field\",\n helpText:\n \"For explanations on what each of the values mean, check https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\",\n options: [\n \"on\",\n \"off\",\n \"name\",\n \"honorific-prefix\",\n \"given-name\",\n \"additional-name\",\n \"family-name\",\n \"honorific-suffix\",\n \"nickname\",\n \"email\",\n \"username\",\n \"new-password\",\n \"current-password\",\n \"one-time-code\",\n \"organization-title\",\n \"organization\",\n \"street-address\",\n \"shipping\",\n \"billing\",\n \"address-line1\",\n \"address-line2\",\n \"address-line3\",\n \"address-level4\",\n \"address-level3\",\n \"address-level2\",\n \"address-level1\",\n \"country\",\n \"country-name\",\n \"postal-code\",\n \"cc-name\",\n \"cc-given-name\",\n \"cc-additional-name\",\n \"cc-family-name\",\n \"cc-number\",\n \"cc-exp\",\n \"cc-exp-month\",\n \"cc-exp-year\",\n \"cc-csc\",\n \"cc-type\",\n \"transaction-currency\",\n \"transaction-amount\",\n \"language\",\n \"bday\",\n \"bday-day\",\n \"bday-month\",\n \"bday-year\",\n \"sex\",\n \"tel\",\n \"tel-country-code\",\n \"tel-national\",\n \"tel-area-code\",\n \"tel-local\",\n \"tel-local-suffix\",\n \"tel-local-prefix\",\n \"tel-extension\",\n \"impp\",\n \"url\",\n \"photo\",\n \"webauthn\",\n ],\n },\n validationBehavior: {\n type: \"choice\",\n options: [\"native\", \"aria\"],\n description:\n \"Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA.\",\n defaultValueHint: \"native\",\n advanced: true,\n hidden: hasParent,\n },\n onChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"value\", type: \"string\" }],\n hidden: hasParent,\n },\n onFocus: {\n type: \"eventHandler\",\n argTypes: [{ name: \"focusEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onBlur: {\n type: \"eventHandler\",\n argTypes: [{ name: \"focusEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onFocusChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isFocused\", type: \"boolean\" }],\n advanced: true,\n hidden: hasParent,\n },\n onKeyDown: {\n type: \"eventHandler\",\n argTypes: [{ name: \"keyboardEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onKeyUp: {\n type: \"eventHandler\",\n argTypes: [{ name: \"keyboardEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCopy: {\n type: \"eventHandler\",\n argTypes: [{ name: \"clipbordEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCut: {\n type: \"eventHandler\",\n argTypes: [{ name: \"clipbordEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onPaste: {\n type: \"eventHandler\",\n argTypes: [{ name: \"clipbordEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCompositionStart: {\n type: \"eventHandler\",\n argTypes: [{ name: \"compositionEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCompositionEnd: {\n type: \"eventHandler\",\n argTypes: [{ name: \"compositionEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onCompositionUpdate: {\n type: \"eventHandler\",\n argTypes: [{ name: \"compositionEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onSelect: {\n type: \"eventHandler\",\n argTypes: [{ name: \"selectionEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onBeforeInput: {\n type: \"eventHandler\",\n argTypes: [{ name: \"inputEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n onInput: {\n type: \"eventHandler\",\n argTypes: [{ name: \"inputEvent\", type: \"object\" }],\n advanced: true,\n hidden: hasParent,\n },\n placeholder: {\n type: \"string\",\n },\n };\n\n // Filter the properties based on the provided fields array\n const filteredProps: Partial<Record<keyof T, PropType<T>>> = {};\n propNames.forEach((propName) => {\n if (Object.prototype.hasOwnProperty.call(commonProps, propName)) {\n filteredProps[propName] = commonProps[propName as string];\n }\n });\n\n return filteredProps;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiCO,SAAS,uBACd,CAAA,MAAA,EACA,SACA,EAAA,IAAA,EACA,SACA,EAAA;AAtCF,EAAA,IAAA,EAAA,CAAA;AAuCE,EAAA,IAAA,GAAO,iCACF,IADE,CAAA,EAAA;AAAA,IAEL,eAAe,cACV,CAAA,cAAA,CAAA,EAAA,EAAA,aAAA,CAAA,EAAA,CACC,EAAK,GAAA,IAAA,CAAA,aAAA,KAAL,YAAsB,EAAC,CAAA;AAAA,GAE/B,CAAA,CAAA;AACA,EAAA,IAAI,SAAW,EAAA;AACb,IAAO,IAAA,GAAA,aAAA,CAAA,cAAA,CAAA,cAAA,CAAA,EAAA,EACF,OACA,SAFE,CAAA,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AAU,CAAA,cAAA,CAAe,IAAK,CAAA,WAAA,EAAa,QAAQ,CAAG,EAAA;AAC/D,MAAc,aAAA,CAAA,QAAQ,CAAI,GAAA,WAAA,CAAY,QAAkB,CAAA,CAAA;AAAA,KAC1D;AAAA,GACD,CAAA,CAAA;AAED,EAAO,OAAA,aAAA,CAAA;AACT;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contexts-0dec6156.cjs.js","sources":["../src/contexts.tsx"],"sourcesContent":["import React from \"react\";\nimport type { StrictItemType } from \"./option-utils\";\nimport { BaseCheckboxGroup } from \"./registerCheckboxGroup\";\nimport { BaseDialogTrigger } from \"./registerDialogTrigger\";\nimport type { BaseHeader } from \"./registerHeader\";\nimport type { BaseInput } from \"./registerInput\";\nimport type { BaseLabel } from \"./registerLabel\";\nimport type { BaseListBoxProps } from \"./registerListBox\";\nimport { BasePopover } from \"./registerPopover\";\nimport { BaseRadioGroup } from \"./registerRadioGroup\";\nimport type { BaseSection } from \"./registerSection\";\nimport { BaseSlider } from \"./registerSlider\";\nimport { BaseTextField } from \"./registerTextField\";\n\n// We pass down context props via our own Plasmic*Context instead of directly\n// using react-aria-component's *Context, because react-aria-component's\n// contexts don't \"merge\" with contexts further up the tree, so if we render\n// a context provider, it will just be overwritten by react-aria-component's\n// context provider. So we do the merging within our own Base* components\n// instead.\n\n// Creating the text field context here because input/textarea inside text field receive a null for the TextFieldContext\nexport const PlasmicTextFieldContext = React.createContext<\n React.ComponentProps<typeof BaseTextField> | undefined\n>(undefined);\n\nexport const PlasmicCheckboxGroupContext = React.createContext<\n React.ComponentProps<typeof BaseCheckboxGroup> | undefined\n>(undefined);\n\nexport const PlasmicRadioGroupContext = React.createContext<\n React.ComponentProps<typeof BaseRadioGroup> | undefined\n>(undefined);\n\nexport const PlasmicDialogTriggerContext = React.createContext<\n React.ComponentProps<typeof BaseDialogTrigger> | undefined\n>(undefined);\n\nexport type PlasmicSliderContextType<T extends number | number[]> =\n | React.ComponentProps<typeof BaseSlider<T>>\n | undefined;\n\nexport const PlasmicSliderContext =\n React.createContext<PlasmicSliderContextType<number | number[]>>(undefined);\n\nexport const PlasmicLabelContext = React.createContext<\n React.ComponentProps<typeof BaseLabel> | undefined\n>(undefined);\n\nexport const PlasmicPopoverContext = React.createContext<\n React.ComponentProps<typeof BasePopover> | undefined\n>(undefined);\n\nexport const PlasmicListBoxContext = React.createContext<\n BaseListBoxProps | undefined\n>(undefined);\n\nexport const PlasmicItemContext = React.createContext<\n StrictItemType | undefined\n>(undefined);\n\nexport const PlasmicSectionContext = React.createContext<\n React.ComponentProps<typeof BaseSection> | undefined\n>(undefined);\n\nexport const PlasmicHeaderContext = React.createContext<\n React.ComponentProps<typeof BaseHeader> | undefined\n>(undefined);\n\nexport const PlasmicInputContext = React.createContext<\n React.ComponentProps<typeof BaseInput> | undefined\n>(undefined);\n"],"names":["React"],"mappings":";;;;;;;;AAsBa,MAAA,uBAAA,GAA0BA,sBAAM,CAAA,aAAA,CAE3C,KAAS,CAAA,EAAA;AAEE,MAAA,2BAAA,GAA8BA,sBAAM,CAAA,aAAA,CAE/C,KAAS,CAAA,EAAA;AAEE,MAAA,wBAAA,GAA2BA,sBAAM,CAAA,aAAA,CAE5C,KAAS,CAAA,EAAA;AAEE,MAAA,2BAAA,GAA8BA,sBAAM,CAAA,aAAA,CAE/C,KAAS,CAAA,EAAA;AAME,MAAA,oBAAA,GACXA,sBAAM,CAAA,aAAA,CAA2D,KAAS,CAAA,EAAA;AAEzCA,sBAAM,CAAA,aAAA,CAEvC,KAAS,CAAA,EAAA;AAEE,MAAA,qBAAA,GAAwBA,sBAAM,CAAA,aAAA,CAEzC,KAAS,CAAA,EAAA;AAEE,MAAA,qBAAA,GAAwBA,sBAAM,CAAA,aAAA,CAEzC,KAAS,CAAA,EAAA;AAEE,MAAA,kBAAA,GAAqBA,sBAAM,CAAA,aAAA,CAEtC,KAAS,CAAA,EAAA;AAEE,MAAA,qBAAA,GAAwBA,sBAAM,CAAA,aAAA,CAEzC,KAAS,CAAA,EAAA;AAEE,MAAA,oBAAA,GAAuBA,sBAAM,CAAA,aAAA,CAExC,KAAS,CAAA,EAAA;AAEE,MAAA,mBAAA,GAAsBA,sBAAM,CAAA,aAAA,CAEvC,KAAS,CAAA;;;;;;;;;;;;;;"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
const PlasmicTextFieldContext = React.createContext(void 0);
|
|
4
|
-
const PlasmicCheckboxGroupContext = React.createContext(void 0);
|
|
5
|
-
const PlasmicRadioGroupContext = React.createContext(void 0);
|
|
6
|
-
const PlasmicDialogTriggerContext = React.createContext(void 0);
|
|
7
|
-
const PlasmicSliderContext = React.createContext(void 0);
|
|
8
|
-
React.createContext(void 0);
|
|
9
|
-
const PlasmicPopoverContext = React.createContext(void 0);
|
|
10
|
-
const PlasmicListBoxContext = React.createContext(void 0);
|
|
11
|
-
const PlasmicItemContext = React.createContext(void 0);
|
|
12
|
-
const PlasmicSectionContext = React.createContext(void 0);
|
|
13
|
-
const PlasmicHeaderContext = React.createContext(void 0);
|
|
14
|
-
const PlasmicInputContext = React.createContext(void 0);
|
|
15
|
-
|
|
16
|
-
export { PlasmicCheckboxGroupContext as P, PlasmicListBoxContext as a, PlasmicInputContext as b, PlasmicDialogTriggerContext as c, PlasmicRadioGroupContext as d, PlasmicPopoverContext as e, PlasmicSectionContext as f, PlasmicItemContext as g, PlasmicHeaderContext as h, PlasmicSliderContext as i, PlasmicTextFieldContext as j };
|
|
17
|
-
//# sourceMappingURL=contexts-9a8234bf.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contexts-9a8234bf.esm.js","sources":["../src/contexts.tsx"],"sourcesContent":["import React from \"react\";\nimport type { StrictItemType } from \"./option-utils\";\nimport { BaseCheckboxGroup } from \"./registerCheckboxGroup\";\nimport { BaseDialogTrigger } from \"./registerDialogTrigger\";\nimport type { BaseHeader } from \"./registerHeader\";\nimport type { BaseInput } from \"./registerInput\";\nimport type { BaseLabel } from \"./registerLabel\";\nimport type { BaseListBoxProps } from \"./registerListBox\";\nimport { BasePopover } from \"./registerPopover\";\nimport { BaseRadioGroup } from \"./registerRadioGroup\";\nimport type { BaseSection } from \"./registerSection\";\nimport { BaseSlider } from \"./registerSlider\";\nimport { BaseTextField } from \"./registerTextField\";\n\n// We pass down context props via our own Plasmic*Context instead of directly\n// using react-aria-component's *Context, because react-aria-component's\n// contexts don't \"merge\" with contexts further up the tree, so if we render\n// a context provider, it will just be overwritten by react-aria-component's\n// context provider. So we do the merging within our own Base* components\n// instead.\n\n// Creating the text field context here because input/textarea inside text field receive a null for the TextFieldContext\nexport const PlasmicTextFieldContext = React.createContext<\n React.ComponentProps<typeof BaseTextField> | undefined\n>(undefined);\n\nexport const PlasmicCheckboxGroupContext = React.createContext<\n React.ComponentProps<typeof BaseCheckboxGroup> | undefined\n>(undefined);\n\nexport const PlasmicRadioGroupContext = React.createContext<\n React.ComponentProps<typeof BaseRadioGroup> | undefined\n>(undefined);\n\nexport const PlasmicDialogTriggerContext = React.createContext<\n React.ComponentProps<typeof BaseDialogTrigger> | undefined\n>(undefined);\n\nexport type PlasmicSliderContextType<T extends number | number[]> =\n | React.ComponentProps<typeof BaseSlider<T>>\n | undefined;\n\nexport const PlasmicSliderContext =\n React.createContext<PlasmicSliderContextType<number | number[]>>(undefined);\n\nexport const PlasmicLabelContext = React.createContext<\n React.ComponentProps<typeof BaseLabel> | undefined\n>(undefined);\n\nexport const PlasmicPopoverContext = React.createContext<\n React.ComponentProps<typeof BasePopover> | undefined\n>(undefined);\n\nexport const PlasmicListBoxContext = React.createContext<\n BaseListBoxProps | undefined\n>(undefined);\n\nexport const PlasmicItemContext = React.createContext<\n StrictItemType | undefined\n>(undefined);\n\nexport const PlasmicSectionContext = React.createContext<\n React.ComponentProps<typeof BaseSection> | undefined\n>(undefined);\n\nexport const PlasmicHeaderContext = React.createContext<\n React.ComponentProps<typeof BaseHeader> | undefined\n>(undefined);\n\nexport const PlasmicInputContext = React.createContext<\n React.ComponentProps<typeof BaseInput> | undefined\n>(undefined);\n"],"names":[],"mappings":";;AAsBa,MAAA,uBAAA,GAA0B,KAAM,CAAA,aAAA,CAE3C,KAAS,CAAA,EAAA;AAEE,MAAA,2BAAA,GAA8B,KAAM,CAAA,aAAA,CAE/C,KAAS,CAAA,EAAA;AAEE,MAAA,wBAAA,GAA2B,KAAM,CAAA,aAAA,CAE5C,KAAS,CAAA,EAAA;AAEE,MAAA,2BAAA,GAA8B,KAAM,CAAA,aAAA,CAE/C,KAAS,CAAA,EAAA;AAME,MAAA,oBAAA,GACX,KAAM,CAAA,aAAA,CAA2D,KAAS,CAAA,EAAA;AAEzC,KAAM,CAAA,aAAA,CAEvC,KAAS,CAAA,EAAA;AAEE,MAAA,qBAAA,GAAwB,KAAM,CAAA,aAAA,CAEzC,KAAS,CAAA,EAAA;AAEE,MAAA,qBAAA,GAAwB,KAAM,CAAA,aAAA,CAEzC,KAAS,CAAA,EAAA;AAEE,MAAA,kBAAA,GAAqB,KAAM,CAAA,aAAA,CAEtC,KAAS,CAAA,EAAA;AAEE,MAAA,qBAAA,GAAwB,KAAM,CAAA,aAAA,CAEzC,KAAS,CAAA,EAAA;AAEE,MAAA,oBAAA,GAAuB,KAAM,CAAA,aAAA,CAExC,KAAS,CAAA,EAAA;AAEE,MAAA,mBAAA,GAAsB,KAAM,CAAA,aAAA,CAEvC,KAAS,CAAA;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interaction-variant-utils-36f1b397.cjs.js","sources":["../src/interaction-variant-utils.tsx"],"sourcesContent":["import { CodeComponentMeta } from \"@plasmicapp/host\";\nimport React from \"react\";\n\nconst ARIA_COMPONENTS_INTERACTION_VARIANTS = {\n hovered: {\n cssSelector: \"[data-hovered]\",\n displayName: \"Hovered\",\n },\n pressed: {\n cssSelector: \"[data-pressed]\",\n displayName: \"Pressed\",\n },\n focused: {\n cssSelector: \"[data-focused]\",\n displayName: \"Focused\",\n },\n focusVisible: {\n cssSelector: \"[data-focus-visible]\",\n displayName: \"Focus Visible\",\n },\n dragging: {\n cssSelector: \"[data-dragging]\",\n displayName: \"Dragging\",\n },\n selected: {\n cssSelector: \"[data-selected]\",\n displayName: \"Selected\",\n },\n readonly: {\n cssSelector: \"[data-readonly]\",\n displayName: \"Read Only\",\n },\n disabled: {\n cssSelector: \"[data-disabled]\",\n displayName: \"Disabled\",\n },\n indeterminate: {\n cssSelector: \"[data-indeterminate]\",\n displayName: \"Indeterminate\",\n },\n};\n\ntype AriaInteractionVariant = keyof typeof ARIA_COMPONENTS_INTERACTION_VARIANTS;\n\ntype CodeComponentInteractionVariantsMeta = NonNullable<\n CodeComponentMeta<unknown>[\"interactionVariants\"]\n>;\n\ntype InteractionVariantMeta = CodeComponentInteractionVariantsMeta[string];\n\ntype ArrayElement<T> = T extends (infer U)[] ? U : never;\n\nexport type UpdateInteractionVariant<T extends AriaInteractionVariant[]> =\n | ((changes: Partial<Record<ArrayElement<T>, boolean>>) => void)\n | undefined;\n\ntype WithObservedValues<T extends AriaInteractionVariant[]> = (\n children: React.ReactNode,\n state: Record<ArrayElement<T>, boolean>,\n updateInteractionVariant: UpdateInteractionVariant<T>\n) => React.ReactNode;\n\nfunction ChangesObserver<T extends AriaInteractionVariant[]>({\n children,\n changes,\n updateInteractionVariant,\n}: {\n children: React.ReactNode;\n changes: Partial<Record<ArrayElement<T>, boolean>>;\n updateInteractionVariant?: UpdateInteractionVariant<T>;\n}) {\n React.useEffect(() => {\n if (updateInteractionVariant) {\n updateInteractionVariant(changes);\n }\n }, [changes, updateInteractionVariant]);\n return children;\n}\n\nfunction realWithObservedValues<T extends AriaInteractionVariant[]>(\n children: React.ReactNode,\n changes: Partial<Record<ArrayElement<T>, boolean>>,\n updateInteractionVariant?: UpdateInteractionVariant<T>\n) {\n return (\n <ChangesObserver\n changes={changes}\n updateInteractionVariant={updateInteractionVariant}\n >\n {children}\n </ChangesObserver>\n );\n}\n\nexport function pickAriaComponentVariants<T extends AriaInteractionVariant[]>(\n keys: T\n): {\n interactionVariants: Record<ArrayElement<T>, InteractionVariantMeta>;\n withObservedValues: WithObservedValues<T>;\n} {\n return {\n interactionVariants: Object.fromEntries(\n keys.map((key) => [key, ARIA_COMPONENTS_INTERACTION_VARIANTS[key]])\n ) as Record<ArrayElement<T>, InteractionVariantMeta>,\n withObservedValues: realWithObservedValues<T>,\n };\n}\n"],"names":["React"],"mappings":";;;;;;;;AAGA,MAAM,oCAAuC,GAAA;AAAA,EAC3C,OAAS,EAAA;AAAA,IACP,WAAa,EAAA,gBAAA;AAAA,IACb,WAAa,EAAA,SAAA;AAAA,GACf;AAAA,EACA,OAAS,EAAA;AAAA,IACP,WAAa,EAAA,gBAAA;AAAA,IACb,WAAa,EAAA,SAAA;AAAA,GACf;AAAA,EACA,OAAS,EAAA;AAAA,IACP,WAAa,EAAA,gBAAA;AAAA,IACb,WAAa,EAAA,SAAA;AAAA,GACf;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,WAAa,EAAA,sBAAA;AAAA,IACb,WAAa,EAAA,eAAA;AAAA,GACf;AAAA,EACA,QAAU,EAAA;AAAA,IACR,WAAa,EAAA,iBAAA;AAAA,IACb,WAAa,EAAA,UAAA;AAAA,GACf;AAAA,EACA,QAAU,EAAA;AAAA,IACR,WAAa,EAAA,iBAAA;AAAA,IACb,WAAa,EAAA,UAAA;AAAA,GACf;AAAA,EACA,QAAU,EAAA;AAAA,IACR,WAAa,EAAA,iBAAA;AAAA,IACb,WAAa,EAAA,WAAA;AAAA,GACf;AAAA,EACA,QAAU,EAAA;AAAA,IACR,WAAa,EAAA,iBAAA;AAAA,IACb,WAAa,EAAA,UAAA;AAAA,GACf;AAAA,EACA,aAAe,EAAA;AAAA,IACb,WAAa,EAAA,sBAAA;AAAA,IACb,WAAa,EAAA,eAAA;AAAA,GACf;AACF,CAAA,CAAA;AAsBA,SAAS,eAAoD,CAAA;AAAA,EAC3D,QAAA;AAAA,EACA,OAAA;AAAA,EACA,wBAAA;AACF,CAIG,EAAA;AACD,EAAAA,sBAAA,CAAM,UAAU,MAAM;AACpB,IAAA,IAAI,wBAA0B,EAAA;AAC5B,MAAA,wBAAA,CAAyB,OAAO,CAAA,CAAA;AAAA,KAClC;AAAA,GACC,EAAA,CAAC,OAAS,EAAA,wBAAwB,CAAC,CAAA,CAAA;AACtC,EAAO,OAAA,QAAA,CAAA;AACT,CAAA;AAEA,SAAS,sBAAA,CACP,QACA,EAAA,OAAA,EACA,wBACA,EAAA;AACA,EACE,uBAAAA,sBAAA,CAAA,aAAA;AAAA,IAAC,eAAA;AAAA,IAAA;AAAA,MACC,OAAA;AAAA,MACA,wBAAA;AAAA,KAAA;AAAA,IAEC,QAAA;AAAA,GACH,CAAA;AAEJ,CAAA;AAEO,SAAS,0BACd,IAIA,EAAA;AACA,EAAO,OAAA;AAAA,IACL,qBAAqB,MAAO,CAAA,WAAA;AAAA,MAC1B,IAAA,CAAK,IAAI,CAAC,GAAA,KAAQ,CAAC,GAAK,EAAA,oCAAA,CAAqC,GAAG,CAAC,CAAC,CAAA;AAAA,KACpE;AAAA,IACA,kBAAoB,EAAA,sBAAA;AAAA,GACtB,CAAA;AACF;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interaction-variant-utils-abd0c319.esm.js","sources":["../src/interaction-variant-utils.tsx"],"sourcesContent":["import { CodeComponentMeta } from \"@plasmicapp/host\";\nimport React from \"react\";\n\nconst ARIA_COMPONENTS_INTERACTION_VARIANTS = {\n hovered: {\n cssSelector: \"[data-hovered]\",\n displayName: \"Hovered\",\n },\n pressed: {\n cssSelector: \"[data-pressed]\",\n displayName: \"Pressed\",\n },\n focused: {\n cssSelector: \"[data-focused]\",\n displayName: \"Focused\",\n },\n focusVisible: {\n cssSelector: \"[data-focus-visible]\",\n displayName: \"Focus Visible\",\n },\n dragging: {\n cssSelector: \"[data-dragging]\",\n displayName: \"Dragging\",\n },\n selected: {\n cssSelector: \"[data-selected]\",\n displayName: \"Selected\",\n },\n readonly: {\n cssSelector: \"[data-readonly]\",\n displayName: \"Read Only\",\n },\n disabled: {\n cssSelector: \"[data-disabled]\",\n displayName: \"Disabled\",\n },\n indeterminate: {\n cssSelector: \"[data-indeterminate]\",\n displayName: \"Indeterminate\",\n },\n};\n\ntype AriaInteractionVariant = keyof typeof ARIA_COMPONENTS_INTERACTION_VARIANTS;\n\ntype CodeComponentInteractionVariantsMeta = NonNullable<\n CodeComponentMeta<unknown>[\"interactionVariants\"]\n>;\n\ntype InteractionVariantMeta = CodeComponentInteractionVariantsMeta[string];\n\ntype ArrayElement<T> = T extends (infer U)[] ? U : never;\n\nexport type UpdateInteractionVariant<T extends AriaInteractionVariant[]> =\n | ((changes: Partial<Record<ArrayElement<T>, boolean>>) => void)\n | undefined;\n\ntype WithObservedValues<T extends AriaInteractionVariant[]> = (\n children: React.ReactNode,\n state: Record<ArrayElement<T>, boolean>,\n updateInteractionVariant: UpdateInteractionVariant<T>\n) => React.ReactNode;\n\nfunction ChangesObserver<T extends AriaInteractionVariant[]>({\n children,\n changes,\n updateInteractionVariant,\n}: {\n children: React.ReactNode;\n changes: Partial<Record<ArrayElement<T>, boolean>>;\n updateInteractionVariant?: UpdateInteractionVariant<T>;\n}) {\n React.useEffect(() => {\n if (updateInteractionVariant) {\n updateInteractionVariant(changes);\n }\n }, [changes, updateInteractionVariant]);\n return children;\n}\n\nfunction realWithObservedValues<T extends AriaInteractionVariant[]>(\n children: React.ReactNode,\n changes: Partial<Record<ArrayElement<T>, boolean>>,\n updateInteractionVariant?: UpdateInteractionVariant<T>\n) {\n return (\n <ChangesObserver\n changes={changes}\n updateInteractionVariant={updateInteractionVariant}\n >\n {children}\n </ChangesObserver>\n );\n}\n\nexport function pickAriaComponentVariants<T extends AriaInteractionVariant[]>(\n keys: T\n): {\n interactionVariants: Record<ArrayElement<T>, InteractionVariantMeta>;\n withObservedValues: WithObservedValues<T>;\n} {\n return {\n interactionVariants: Object.fromEntries(\n keys.map((key) => [key, ARIA_COMPONENTS_INTERACTION_VARIANTS[key]])\n ) as Record<ArrayElement<T>, InteractionVariantMeta>,\n withObservedValues: realWithObservedValues<T>,\n };\n}\n"],"names":[],"mappings":";;AAGA,MAAM,oCAAuC,GAAA;AAAA,EAC3C,OAAS,EAAA;AAAA,IACP,WAAa,EAAA,gBAAA;AAAA,IACb,WAAa,EAAA,SAAA;AAAA,GACf;AAAA,EACA,OAAS,EAAA;AAAA,IACP,WAAa,EAAA,gBAAA;AAAA,IACb,WAAa,EAAA,SAAA;AAAA,GACf;AAAA,EACA,OAAS,EAAA;AAAA,IACP,WAAa,EAAA,gBAAA;AAAA,IACb,WAAa,EAAA,SAAA;AAAA,GACf;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,WAAa,EAAA,sBAAA;AAAA,IACb,WAAa,EAAA,eAAA;AAAA,GACf;AAAA,EACA,QAAU,EAAA;AAAA,IACR,WAAa,EAAA,iBAAA;AAAA,IACb,WAAa,EAAA,UAAA;AAAA,GACf;AAAA,EACA,QAAU,EAAA;AAAA,IACR,WAAa,EAAA,iBAAA;AAAA,IACb,WAAa,EAAA,UAAA;AAAA,GACf;AAAA,EACA,QAAU,EAAA;AAAA,IACR,WAAa,EAAA,iBAAA;AAAA,IACb,WAAa,EAAA,WAAA;AAAA,GACf;AAAA,EACA,QAAU,EAAA;AAAA,IACR,WAAa,EAAA,iBAAA;AAAA,IACb,WAAa,EAAA,UAAA;AAAA,GACf;AAAA,EACA,aAAe,EAAA;AAAA,IACb,WAAa,EAAA,sBAAA;AAAA,IACb,WAAa,EAAA,eAAA;AAAA,GACf;AACF,CAAA,CAAA;AAsBA,SAAS,eAAoD,CAAA;AAAA,EAC3D,QAAA;AAAA,EACA,OAAA;AAAA,EACA,wBAAA;AACF,CAIG,EAAA;AACD,EAAA,KAAA,CAAM,UAAU,MAAM;AACpB,IAAA,IAAI,wBAA0B,EAAA;AAC5B,MAAA,wBAAA,CAAyB,OAAO,CAAA,CAAA;AAAA,KAClC;AAAA,GACC,EAAA,CAAC,OAAS,EAAA,wBAAwB,CAAC,CAAA,CAAA;AACtC,EAAO,OAAA,QAAA,CAAA;AACT,CAAA;AAEA,SAAS,sBAAA,CACP,QACA,EAAA,OAAA,EACA,wBACA,EAAA;AACA,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,eAAA;AAAA,IAAA;AAAA,MACC,OAAA;AAAA,MACA,wBAAA;AAAA,KAAA;AAAA,IAEC,QAAA;AAAA,GACH,CAAA;AAEJ,CAAA;AAEO,SAAS,0BACd,IAIA,EAAA;AACA,EAAO,OAAA;AAAA,IACL,qBAAqB,MAAO,CAAA,WAAA;AAAA,MAC1B,IAAA,CAAK,IAAI,CAAC,GAAA,KAAQ,CAAC,GAAK,EAAA,oCAAA,CAAqC,GAAG,CAAC,CAAC,CAAA;AAAA,KACpE;AAAA,IACA,kBAAoB,EAAA,sBAAA;AAAA,GACtB,CAAA;AACF;;;;"}
|
package/skinny/option-utils.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { ArrayType } from "@plasmicapp/host/registerComponent";
|
|
2
|
-
export interface ObjectSectionType<T extends object> {
|
|
3
|
-
label?: string;
|
|
4
|
-
items?: ObjectItemType<T>[];
|
|
5
|
-
}
|
|
6
|
-
interface FlexSectionType<T extends object> {
|
|
7
|
-
label?: string;
|
|
8
|
-
items?: FlexItemType<T>[];
|
|
9
|
-
}
|
|
10
|
-
export type ObjectItemType<T extends object> = StrictOptionType | T;
|
|
11
|
-
type FlexItemType<T extends object> = ObjectItemType<T> | string;
|
|
12
|
-
export type FlexOptionType<T extends object> = FlexItemType<T> | FlexSectionType<T>;
|
|
13
|
-
export type ObjectOptionType<T extends object> = ObjectSectionType<T> | ObjectItemType<T>;
|
|
14
|
-
export interface HasOptions<T extends object> {
|
|
15
|
-
options?: FlexOptionType<T>[];
|
|
16
|
-
optionInfo?: (option: FlexOptionType<T>) => StrictOptionType;
|
|
17
|
-
}
|
|
18
|
-
export interface StrictItemType {
|
|
19
|
-
type?: "option";
|
|
20
|
-
id: string;
|
|
21
|
-
label?: string;
|
|
22
|
-
isDisabled?: boolean;
|
|
23
|
-
}
|
|
24
|
-
export interface StrictSectionType {
|
|
25
|
-
type: "option-group";
|
|
26
|
-
label?: string;
|
|
27
|
-
items?: StrictItemType[];
|
|
28
|
-
key: string;
|
|
29
|
-
}
|
|
30
|
-
export type StrictOptionType = StrictItemType | StrictSectionType;
|
|
31
|
-
export declare function useStrictOptions<T extends object>(props: HasOptions<T>): {
|
|
32
|
-
options: StrictOptionType[] | undefined;
|
|
33
|
-
optionText: (op: StrictItemType) => string;
|
|
34
|
-
};
|
|
35
|
-
export declare function deriveStrictOptions<T extends object>(props: HasOptions<T>): {
|
|
36
|
-
options: StrictOptionType[] | undefined;
|
|
37
|
-
optionText: (op: StrictItemType) => string;
|
|
38
|
-
};
|
|
39
|
-
export declare function flattenOptions(options: (StrictItemType | StrictSectionType)[] | undefined): StrictItemType[];
|
|
40
|
-
export declare function makeOptionsPropType(): ArrayType<HasOptions<any>>;
|
|
41
|
-
export declare function makeValuePropType(): import("@plasmicapp/host/registerComponent").SingleChoiceType<HasOptions<any>>;
|
|
42
|
-
export {};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var utils = require('@react-aria/utils');
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var reactAriaComponents = require('react-aria-components');
|
|
6
|
-
var contexts = require('./contexts-0dec6156.cjs.js');
|
|
7
|
-
var common = require('./common-bfedaf7d.cjs.js');
|
|
8
|
-
require('@plasmicapp/host/registerComponent');
|
|
9
|
-
|
|
10
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
|
|
12
|
-
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
13
|
-
|
|
14
|
-
var __defProp = Object.defineProperty;
|
|
15
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
16
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
17
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
18
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19
|
-
var __spreadValues = (a, b) => {
|
|
20
|
-
for (var prop in b || (b = {}))
|
|
21
|
-
if (__hasOwnProp.call(b, prop))
|
|
22
|
-
__defNormalProp(a, prop, b[prop]);
|
|
23
|
-
if (__getOwnPropSymbols)
|
|
24
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
25
|
-
if (__propIsEnum.call(b, prop))
|
|
26
|
-
__defNormalProp(a, prop, b[prop]);
|
|
27
|
-
}
|
|
28
|
-
return a;
|
|
29
|
-
};
|
|
30
|
-
function BaseHeader(props) {
|
|
31
|
-
const contextProps = React__default.default.useContext(contexts.PlasmicHeaderContext);
|
|
32
|
-
return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Header, __spreadValues({}, utils.mergeProps(contextProps, props)));
|
|
33
|
-
}
|
|
34
|
-
function registerHeader(loader, overrides) {
|
|
35
|
-
return common.registerComponentHelper(
|
|
36
|
-
loader,
|
|
37
|
-
BaseHeader,
|
|
38
|
-
{
|
|
39
|
-
name: common.makeComponentName("header"),
|
|
40
|
-
displayName: "Aria Header",
|
|
41
|
-
importPath: "@plasmicpkgs/react-aria/skinny/registerHeader",
|
|
42
|
-
importName: "BaseHeader",
|
|
43
|
-
defaultStyles: {
|
|
44
|
-
fontWeight: "bold",
|
|
45
|
-
fontSize: "20px"
|
|
46
|
-
},
|
|
47
|
-
props: {}
|
|
48
|
-
},
|
|
49
|
-
overrides
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
exports.BaseHeader = BaseHeader;
|
|
54
|
-
exports.registerHeader = registerHeader;
|
|
55
|
-
//# sourceMappingURL=registerHeader.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registerHeader.cjs.js","sources":["../src/registerHeader.tsx"],"sourcesContent":["import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Header } from \"react-aria-components\";\nimport { PlasmicHeaderContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\nexport function BaseHeader(props: React.ComponentProps<typeof Header>) {\n const contextProps = React.useContext(PlasmicHeaderContext);\n return <Header {...mergeProps(contextProps, props)} />;\n}\n\nexport function registerHeader(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseHeader>\n) {\n return registerComponentHelper(\n loader,\n BaseHeader,\n {\n name: makeComponentName(\"header\"),\n displayName: \"Aria Header\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerHeader\",\n importName: \"BaseHeader\",\n defaultStyles: {\n fontWeight: \"bold\",\n fontSize: \"20px\",\n },\n props: {},\n },\n overrides\n );\n}\n"],"names":["React","PlasmicHeaderContext","Header","mergeProps","registerComponentHelper","makeComponentName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUO,SAAS,WAAW,KAA4C,EAAA;AACrE,EAAM,MAAA,YAAA,GAAeA,sBAAM,CAAA,UAAA,CAAWC,6BAAoB,CAAA,CAAA;AAC1D,EAAA,uBAAQD,sBAAA,CAAA,aAAA,CAAAE,0BAAA,EAAA,cAAA,CAAA,EAAA,EAAWC,gBAAW,CAAA,YAAA,EAAc,KAAK,CAAG,CAAA,CAAA,CAAA;AACtD,CAAA;AAEgB,SAAA,cAAA,CACd,QACA,SACA,EAAA;AACA,EAAO,OAAAC,8BAAA;AAAA,IACL,MAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,MACE,IAAA,EAAMC,yBAAkB,QAAQ,CAAA;AAAA,MAChC,WAAa,EAAA,aAAA;AAAA,MACb,UAAY,EAAA,+CAAA;AAAA,MACZ,UAAY,EAAA,YAAA;AAAA,MACZ,aAAe,EAAA;AAAA,QACb,UAAY,EAAA,MAAA;AAAA,QACZ,QAAU,EAAA,MAAA;AAAA,OACZ;AAAA,MACA,OAAO,EAAC;AAAA,KACV;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;;"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Header } from "react-aria-components";
|
|
3
|
-
import { CodeComponentMetaOverrides, Registerable } from "./utils";
|
|
4
|
-
export declare function BaseHeader(props: React.ComponentProps<typeof Header>): React.JSX.Element;
|
|
5
|
-
export declare function registerHeader(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseHeader>): import("@plasmicapp/host").CodeComponentMeta<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { mergeProps } from '@react-aria/utils';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Header } from 'react-aria-components';
|
|
4
|
-
import { h as PlasmicHeaderContext } from './contexts-9a8234bf.esm.js';
|
|
5
|
-
import { r as registerComponentHelper, a as makeComponentName } from './common-fa69e9b3.esm.js';
|
|
6
|
-
import '@plasmicapp/host/registerComponent';
|
|
7
|
-
|
|
8
|
-
var __defProp = Object.defineProperty;
|
|
9
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
10
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
}
|
|
22
|
-
return a;
|
|
23
|
-
};
|
|
24
|
-
function BaseHeader(props) {
|
|
25
|
-
const contextProps = React.useContext(PlasmicHeaderContext);
|
|
26
|
-
return /* @__PURE__ */ React.createElement(Header, __spreadValues({}, mergeProps(contextProps, props)));
|
|
27
|
-
}
|
|
28
|
-
function registerHeader(loader, overrides) {
|
|
29
|
-
return registerComponentHelper(
|
|
30
|
-
loader,
|
|
31
|
-
BaseHeader,
|
|
32
|
-
{
|
|
33
|
-
name: makeComponentName("header"),
|
|
34
|
-
displayName: "Aria Header",
|
|
35
|
-
importPath: "@plasmicpkgs/react-aria/skinny/registerHeader",
|
|
36
|
-
importName: "BaseHeader",
|
|
37
|
-
defaultStyles: {
|
|
38
|
-
fontWeight: "bold",
|
|
39
|
-
fontSize: "20px"
|
|
40
|
-
},
|
|
41
|
-
props: {}
|
|
42
|
-
},
|
|
43
|
-
overrides
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export { BaseHeader, registerHeader };
|
|
48
|
-
//# sourceMappingURL=registerHeader.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registerHeader.esm.js","sources":["../src/registerHeader.tsx"],"sourcesContent":["import { mergeProps } from \"@react-aria/utils\";\nimport React from \"react\";\nimport { Header } from \"react-aria-components\";\nimport { PlasmicHeaderContext } from \"./contexts\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\nexport function BaseHeader(props: React.ComponentProps<typeof Header>) {\n const contextProps = React.useContext(PlasmicHeaderContext);\n return <Header {...mergeProps(contextProps, props)} />;\n}\n\nexport function registerHeader(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseHeader>\n) {\n return registerComponentHelper(\n loader,\n BaseHeader,\n {\n name: makeComponentName(\"header\"),\n displayName: \"Aria Header\",\n importPath: \"@plasmicpkgs/react-aria/skinny/registerHeader\",\n importName: \"BaseHeader\",\n defaultStyles: {\n fontWeight: \"bold\",\n fontSize: \"20px\",\n },\n props: {},\n },\n overrides\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAUO,SAAS,WAAW,KAA4C,EAAA;AACrE,EAAM,MAAA,YAAA,GAAe,KAAM,CAAA,UAAA,CAAW,oBAAoB,CAAA,CAAA;AAC1D,EAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,cAAA,CAAA,EAAA,EAAW,UAAW,CAAA,YAAA,EAAc,KAAK,CAAG,CAAA,CAAA,CAAA;AACtD,CAAA;AAEgB,SAAA,cAAA,CACd,QACA,SACA,EAAA;AACA,EAAO,OAAA,uBAAA;AAAA,IACL,MAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,MACE,IAAA,EAAM,kBAAkB,QAAQ,CAAA;AAAA,MAChC,WAAa,EAAA,aAAA;AAAA,MACb,UAAY,EAAA,+CAAA;AAAA,MACZ,UAAY,EAAA,YAAA;AAAA,MACZ,aAAe,EAAA;AAAA,QACb,UAAY,EAAA,MAAA;AAAA,QACZ,QAAU,EAAA,MAAA;AAAA,OACZ;AAAA,MACA,OAAO,EAAC;AAAA,KACV;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;"}
|