@plasmicpkgs/react-aria 0.0.10 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/common.d.ts +2 -0
- package/dist/contexts.d.ts +1 -1
- package/dist/react-aria.esm.js +404 -203
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +403 -202
- package/dist/react-aria.js.map +1 -1
- package/dist/registerButton.d.ts +1 -0
- package/dist/registerForm.d.ts +9 -0
- package/dist/registerLabel.d.ts +2 -2
- package/dist/registerSwitch.d.ts +5 -0
- package/package.json +4 -4
- package/skinny/common-52c26d37.esm.js +52 -0
- package/skinny/common-52c26d37.esm.js.map +1 -0
- package/skinny/common-e74a9214.cjs.js +54 -0
- package/skinny/common-e74a9214.cjs.js.map +1 -0
- package/skinny/common.d.ts +2 -0
- package/skinny/{contexts-c0294d96.cjs.js → contexts-3e42cdf9.cjs.js} +2 -3
- package/skinny/{contexts-c0294d96.cjs.js.map → contexts-3e42cdf9.cjs.js.map} +1 -1
- package/skinny/{contexts-fd3e1077.esm.js → contexts-49f6c298.esm.js} +3 -3
- package/skinny/{contexts-fd3e1077.esm.js.map → contexts-49f6c298.esm.js.map} +1 -1
- package/skinny/contexts.d.ts +1 -1
- package/skinny/registerButton.cjs.js +20 -18
- package/skinny/registerButton.cjs.js.map +1 -1
- package/skinny/registerButton.d.ts +1 -0
- package/skinny/registerButton.esm.js +20 -18
- package/skinny/registerButton.esm.js.map +1 -1
- package/skinny/registerComboBox.cjs.js +1 -1
- package/skinny/registerComboBox.esm.js +1 -1
- package/skinny/registerFieldError.cjs.js +163 -0
- package/skinny/registerFieldError.cjs.js.map +1 -0
- package/skinny/registerFieldError.esm.js +156 -0
- package/skinny/registerFieldError.esm.js.map +1 -0
- package/skinny/registerForm.cjs.js +96 -0
- package/skinny/registerForm.cjs.js.map +1 -0
- package/skinny/registerForm.d.ts +9 -0
- package/skinny/registerForm.esm.js +89 -0
- package/skinny/registerForm.esm.js.map +1 -0
- package/skinny/registerHeader.cjs.js +1 -1
- package/skinny/registerHeader.esm.js +1 -1
- package/skinny/registerInput.cjs.js +1 -1
- package/skinny/registerInput.esm.js +1 -1
- package/skinny/registerLabel.cjs.js +5 -13
- package/skinny/registerLabel.cjs.js.map +1 -1
- package/skinny/registerLabel.d.ts +2 -2
- package/skinny/registerLabel.esm.js +4 -12
- package/skinny/registerLabel.esm.js.map +1 -1
- package/skinny/registerListBox.cjs.js +1 -1
- package/skinny/registerListBox.esm.js +1 -1
- package/skinny/registerListBoxItem.cjs.js +1 -1
- package/skinny/registerListBoxItem.esm.js +1 -1
- package/skinny/registerPopover.cjs.js +1 -1
- package/skinny/registerPopover.esm.js +1 -1
- package/skinny/registerSection.cjs.js +1 -1
- package/skinny/registerSection.esm.js +1 -1
- package/skinny/registerSelect.cjs.js +1 -1
- package/skinny/registerSelect.esm.js +1 -1
- package/skinny/registerSwitch.cjs.js +83 -0
- package/skinny/registerSwitch.cjs.js.map +1 -0
- package/skinny/registerSwitch.d.ts +5 -0
- package/skinny/registerSwitch.esm.js +80 -0
- package/skinny/registerSwitch.esm.js.map +1 -0
|
@@ -2,7 +2,7 @@ import { usePlasmicCanvasContext } from '@plasmicapp/host';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Select, SelectValue } from 'react-aria-components';
|
|
4
4
|
export { SelectValue as BaseSelectValue } from 'react-aria-components';
|
|
5
|
-
import { P as PlasmicListBoxContext } from './contexts-
|
|
5
|
+
import { P as PlasmicListBoxContext } from './contexts-49f6c298.esm.js';
|
|
6
6
|
import { u as useStrictOptions, f as flattenOptions, m as makeOptionsPropType, a as makeValuePropType } from './option-utils-765a1782.esm.js';
|
|
7
7
|
import { e as extractPlasmicDataProps, r as registerComponentHelper, m as makeComponentName } from './utils-28f98072.esm.js';
|
|
8
8
|
import '@plasmicapp/host/registerComponent';
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var reactAriaComponents = require('react-aria-components');
|
|
4
|
+
var common = require('./common-e74a9214.cjs.js');
|
|
5
|
+
var utils = require('./utils-1190a0a9.cjs.js');
|
|
6
|
+
require('@plasmicapp/host/registerComponent');
|
|
7
|
+
require('react');
|
|
8
|
+
|
|
9
|
+
var __defProp = Object.defineProperty;
|
|
10
|
+
var __defProps = Object.defineProperties;
|
|
11
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
12
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
15
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16
|
+
var __spreadValues = (a, b) => {
|
|
17
|
+
for (var prop in b || (b = {}))
|
|
18
|
+
if (__hasOwnProp.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
if (__getOwnPropSymbols)
|
|
21
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
22
|
+
if (__propIsEnum.call(b, prop))
|
|
23
|
+
__defNormalProp(a, prop, b[prop]);
|
|
24
|
+
}
|
|
25
|
+
return a;
|
|
26
|
+
};
|
|
27
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
28
|
+
const BaseSwitch = reactAriaComponents.Switch;
|
|
29
|
+
function registerSwitch(loader, overrides) {
|
|
30
|
+
utils.registerComponentHelper(
|
|
31
|
+
loader,
|
|
32
|
+
BaseSwitch,
|
|
33
|
+
{
|
|
34
|
+
name: utils.makeComponentName("switch"),
|
|
35
|
+
displayName: "BaseSwitch",
|
|
36
|
+
importPath: "@plasmicpkgs/react-aria/registerSwitch",
|
|
37
|
+
importName: "BaseSwitch",
|
|
38
|
+
props: __spreadProps(__spreadValues({}, common.getCommonInputProps("switch", [
|
|
39
|
+
"name",
|
|
40
|
+
"isDisabled",
|
|
41
|
+
"isReadOnly",
|
|
42
|
+
"autoFocus",
|
|
43
|
+
"aria-label",
|
|
44
|
+
"children"
|
|
45
|
+
])), {
|
|
46
|
+
value: {
|
|
47
|
+
type: "boolean",
|
|
48
|
+
editOnly: true,
|
|
49
|
+
uncontrolledProp: "defaultSelected",
|
|
50
|
+
description: "Whether the switch is toggled on",
|
|
51
|
+
defaultValueHint: false
|
|
52
|
+
},
|
|
53
|
+
onChange: {
|
|
54
|
+
type: "eventHandler",
|
|
55
|
+
argTypes: [{ name: "isSelected", type: "boolean" }]
|
|
56
|
+
},
|
|
57
|
+
onHoverChange: {
|
|
58
|
+
type: "eventHandler",
|
|
59
|
+
argTypes: [{ name: "isHovered", type: "boolean" }]
|
|
60
|
+
}
|
|
61
|
+
}),
|
|
62
|
+
states: {
|
|
63
|
+
isSelected: {
|
|
64
|
+
type: "writable",
|
|
65
|
+
valueProp: "value",
|
|
66
|
+
onChangeProp: "onChange",
|
|
67
|
+
variableType: "boolean"
|
|
68
|
+
},
|
|
69
|
+
isHovered: {
|
|
70
|
+
type: "readonly",
|
|
71
|
+
onChangeProp: "onHoverChange",
|
|
72
|
+
variableType: "boolean"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
trapsFocus: true
|
|
76
|
+
},
|
|
77
|
+
overrides
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
exports.BaseSwitch = BaseSwitch;
|
|
82
|
+
exports.registerSwitch = registerSwitch;
|
|
83
|
+
//# sourceMappingURL=registerSwitch.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerSwitch.cjs.js","sources":["../src/registerSwitch.tsx"],"sourcesContent":["import type { SwitchProps } from \"react-aria-components\";\nimport { Switch } from \"react-aria-components\";\nimport { getCommonInputProps } from \"./common\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport const BaseSwitch = Switch;\n\nexport function registerSwitch(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseSwitch>\n) {\n registerComponentHelper(\n loader,\n BaseSwitch,\n {\n name: makeComponentName(\"switch\"),\n displayName: \"BaseSwitch\",\n importPath: \"@plasmicpkgs/react-aria/registerSwitch\",\n importName: \"BaseSwitch\",\n props: {\n ...getCommonInputProps<SwitchProps>(\"switch\", [\n \"name\",\n \"isDisabled\",\n \"isReadOnly\",\n \"autoFocus\",\n \"aria-label\",\n \"children\",\n ]),\n value: {\n type: \"boolean\",\n editOnly: true,\n uncontrolledProp: \"defaultSelected\",\n description: \"Whether the switch is toggled on\",\n defaultValueHint: false,\n },\n onChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isSelected\", type: \"boolean\" }],\n },\n onHoverChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isHovered\", type: \"boolean\" }],\n },\n },\n states: {\n isSelected: {\n type: \"writable\",\n valueProp: \"value\",\n onChangeProp: \"onChange\",\n variableType: \"boolean\",\n },\n isHovered: {\n type: \"readonly\",\n onChangeProp: \"onHoverChange\",\n variableType: \"boolean\",\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":["Switch","registerComponentHelper","makeComponentName","getCommonInputProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAUO,MAAM,UAAa,GAAAA,2BAAA;AAEV,SAAA,cAAA,CACd,QACA,SACA,EAAA;AACA,EAAAC,6BAAA;AAAA,IACE,MAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,MACE,IAAA,EAAMC,wBAAkB,QAAQ,CAAA;AAAA,MAChC,WAAa,EAAA,YAAA;AAAA,MACb,UAAY,EAAA,wCAAA;AAAA,MACZ,UAAY,EAAA,YAAA;AAAA,MACZ,KAAA,EAAO,aACF,CAAA,cAAA,CAAA,EAAA,EAAAC,0BAAA,CAAiC,QAAU,EAAA;AAAA,QAC5C,MAAA;AAAA,QACA,YAAA;AAAA,QACA,YAAA;AAAA,QACA,WAAA;AAAA,QACA,YAAA;AAAA,QACA,UAAA;AAAA,OACD,CARI,CAAA,EAAA;AAAA,QASL,KAAO,EAAA;AAAA,UACL,IAAM,EAAA,SAAA;AAAA,UACN,QAAU,EAAA,IAAA;AAAA,UACV,gBAAkB,EAAA,iBAAA;AAAA,UAClB,WAAa,EAAA,kCAAA;AAAA,UACb,gBAAkB,EAAA,KAAA;AAAA,SACpB;AAAA,QACA,QAAU,EAAA;AAAA,UACR,IAAM,EAAA,cAAA;AAAA,UACN,UAAU,CAAC,EAAE,MAAM,YAAc,EAAA,IAAA,EAAM,WAAW,CAAA;AAAA,SACpD;AAAA,QACA,aAAe,EAAA;AAAA,UACb,IAAM,EAAA,cAAA;AAAA,UACN,UAAU,CAAC,EAAE,MAAM,WAAa,EAAA,IAAA,EAAM,WAAW,CAAA;AAAA,SACnD;AAAA,OACF,CAAA;AAAA,MACA,MAAQ,EAAA;AAAA,QACN,UAAY,EAAA;AAAA,UACV,IAAM,EAAA,UAAA;AAAA,UACN,SAAW,EAAA,OAAA;AAAA,UACX,YAAc,EAAA,UAAA;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,OACF;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { SwitchProps } from "react-aria-components";
|
|
3
|
+
import { CodeComponentMetaOverrides, Registerable } from "./utils";
|
|
4
|
+
export declare const BaseSwitch: (props: SwitchProps & import("react").RefAttributes<HTMLInputElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
5
|
+
export declare function registerSwitch(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseSwitch>): void;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { Switch } from 'react-aria-components';
|
|
2
|
+
import { g as getCommonInputProps } from './common-52c26d37.esm.js';
|
|
3
|
+
import { r as registerComponentHelper, m as makeComponentName } from './utils-28f98072.esm.js';
|
|
4
|
+
import '@plasmicapp/host/registerComponent';
|
|
5
|
+
import 'react';
|
|
6
|
+
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __defProps = Object.defineProperties;
|
|
9
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
10
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
11
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
13
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14
|
+
var __spreadValues = (a, b) => {
|
|
15
|
+
for (var prop in b || (b = {}))
|
|
16
|
+
if (__hasOwnProp.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
if (__getOwnPropSymbols)
|
|
19
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
20
|
+
if (__propIsEnum.call(b, prop))
|
|
21
|
+
__defNormalProp(a, prop, b[prop]);
|
|
22
|
+
}
|
|
23
|
+
return a;
|
|
24
|
+
};
|
|
25
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
26
|
+
const BaseSwitch = Switch;
|
|
27
|
+
function registerSwitch(loader, overrides) {
|
|
28
|
+
registerComponentHelper(
|
|
29
|
+
loader,
|
|
30
|
+
BaseSwitch,
|
|
31
|
+
{
|
|
32
|
+
name: makeComponentName("switch"),
|
|
33
|
+
displayName: "BaseSwitch",
|
|
34
|
+
importPath: "@plasmicpkgs/react-aria/registerSwitch",
|
|
35
|
+
importName: "BaseSwitch",
|
|
36
|
+
props: __spreadProps(__spreadValues({}, getCommonInputProps("switch", [
|
|
37
|
+
"name",
|
|
38
|
+
"isDisabled",
|
|
39
|
+
"isReadOnly",
|
|
40
|
+
"autoFocus",
|
|
41
|
+
"aria-label",
|
|
42
|
+
"children"
|
|
43
|
+
])), {
|
|
44
|
+
value: {
|
|
45
|
+
type: "boolean",
|
|
46
|
+
editOnly: true,
|
|
47
|
+
uncontrolledProp: "defaultSelected",
|
|
48
|
+
description: "Whether the switch is toggled on",
|
|
49
|
+
defaultValueHint: false
|
|
50
|
+
},
|
|
51
|
+
onChange: {
|
|
52
|
+
type: "eventHandler",
|
|
53
|
+
argTypes: [{ name: "isSelected", type: "boolean" }]
|
|
54
|
+
},
|
|
55
|
+
onHoverChange: {
|
|
56
|
+
type: "eventHandler",
|
|
57
|
+
argTypes: [{ name: "isHovered", type: "boolean" }]
|
|
58
|
+
}
|
|
59
|
+
}),
|
|
60
|
+
states: {
|
|
61
|
+
isSelected: {
|
|
62
|
+
type: "writable",
|
|
63
|
+
valueProp: "value",
|
|
64
|
+
onChangeProp: "onChange",
|
|
65
|
+
variableType: "boolean"
|
|
66
|
+
},
|
|
67
|
+
isHovered: {
|
|
68
|
+
type: "readonly",
|
|
69
|
+
onChangeProp: "onHoverChange",
|
|
70
|
+
variableType: "boolean"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
trapsFocus: true
|
|
74
|
+
},
|
|
75
|
+
overrides
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export { BaseSwitch, registerSwitch };
|
|
80
|
+
//# sourceMappingURL=registerSwitch.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerSwitch.esm.js","sources":["../src/registerSwitch.tsx"],"sourcesContent":["import type { SwitchProps } from \"react-aria-components\";\nimport { Switch } from \"react-aria-components\";\nimport { getCommonInputProps } from \"./common\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport const BaseSwitch = Switch;\n\nexport function registerSwitch(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseSwitch>\n) {\n registerComponentHelper(\n loader,\n BaseSwitch,\n {\n name: makeComponentName(\"switch\"),\n displayName: \"BaseSwitch\",\n importPath: \"@plasmicpkgs/react-aria/registerSwitch\",\n importName: \"BaseSwitch\",\n props: {\n ...getCommonInputProps<SwitchProps>(\"switch\", [\n \"name\",\n \"isDisabled\",\n \"isReadOnly\",\n \"autoFocus\",\n \"aria-label\",\n \"children\",\n ]),\n value: {\n type: \"boolean\",\n editOnly: true,\n uncontrolledProp: \"defaultSelected\",\n description: \"Whether the switch is toggled on\",\n defaultValueHint: false,\n },\n onChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isSelected\", type: \"boolean\" }],\n },\n onHoverChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isHovered\", type: \"boolean\" }],\n },\n },\n states: {\n isSelected: {\n type: \"writable\",\n valueProp: \"value\",\n onChangeProp: \"onChange\",\n variableType: \"boolean\",\n },\n isHovered: {\n type: \"readonly\",\n onChangeProp: \"onHoverChange\",\n variableType: \"boolean\",\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAUO,MAAM,UAAa,GAAA,OAAA;AAEV,SAAA,cAAA,CACd,QACA,SACA,EAAA;AACA,EAAA,uBAAA;AAAA,IACE,MAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,MACE,IAAA,EAAM,kBAAkB,QAAQ,CAAA;AAAA,MAChC,WAAa,EAAA,YAAA;AAAA,MACb,UAAY,EAAA,wCAAA;AAAA,MACZ,UAAY,EAAA,YAAA;AAAA,MACZ,KAAA,EAAO,aACF,CAAA,cAAA,CAAA,EAAA,EAAA,mBAAA,CAAiC,QAAU,EAAA;AAAA,QAC5C,MAAA;AAAA,QACA,YAAA;AAAA,QACA,YAAA;AAAA,QACA,WAAA;AAAA,QACA,YAAA;AAAA,QACA,UAAA;AAAA,OACD,CARI,CAAA,EAAA;AAAA,QASL,KAAO,EAAA;AAAA,UACL,IAAM,EAAA,SAAA;AAAA,UACN,QAAU,EAAA,IAAA;AAAA,UACV,gBAAkB,EAAA,iBAAA;AAAA,UAClB,WAAa,EAAA,kCAAA;AAAA,UACb,gBAAkB,EAAA,KAAA;AAAA,SACpB;AAAA,QACA,QAAU,EAAA;AAAA,UACR,IAAM,EAAA,cAAA;AAAA,UACN,UAAU,CAAC,EAAE,MAAM,YAAc,EAAA,IAAA,EAAM,WAAW,CAAA;AAAA,SACpD;AAAA,QACA,aAAe,EAAA;AAAA,UACb,IAAM,EAAA,cAAA;AAAA,UACN,UAAU,CAAC,EAAE,MAAM,WAAa,EAAA,IAAA,EAAM,WAAW,CAAA;AAAA,SACnD;AAAA,OACF,CAAA;AAAA,MACA,MAAQ,EAAA;AAAA,QACN,UAAY,EAAA;AAAA,UACV,IAAM,EAAA,UAAA;AAAA,UACN,SAAW,EAAA,OAAA;AAAA,UACX,YAAc,EAAA,UAAA;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,OACF;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;"}
|