@plasmicpkgs/react-aria 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/contexts.d.ts +1 -1
  3. package/dist/react-aria.esm.js +897 -189
  4. package/dist/react-aria.esm.js.map +1 -1
  5. package/dist/react-aria.js +895 -187
  6. package/dist/react-aria.js.map +1 -1
  7. package/dist/registerCheckbox.d.ts +10 -0
  8. package/dist/registerCheckboxGroup.d.ts +5 -0
  9. package/dist/registerDescription.d.ts +3 -0
  10. package/dist/registerFieldError.d.ts +19 -0
  11. package/dist/registerLabel.d.ts +2 -3
  12. package/dist/registerRadio.d.ts +10 -0
  13. package/dist/registerRadioGroup.d.ts +9 -0
  14. package/dist/registerText.d.ts +5 -0
  15. package/package.json +2 -2
  16. package/skinny/contexts.d.ts +1 -1
  17. package/skinny/registerCheckbox.cjs.js +158 -0
  18. package/skinny/registerCheckbox.cjs.js.map +1 -0
  19. package/skinny/registerCheckbox.d.ts +10 -0
  20. package/skinny/registerCheckbox.esm.js +151 -0
  21. package/skinny/registerCheckbox.esm.js.map +1 -0
  22. package/skinny/registerCheckboxGroup.cjs.js +113 -0
  23. package/skinny/registerCheckboxGroup.cjs.js.map +1 -0
  24. package/skinny/registerCheckboxGroup.d.ts +5 -0
  25. package/skinny/registerCheckboxGroup.esm.js +110 -0
  26. package/skinny/registerCheckboxGroup.esm.js.map +1 -0
  27. package/skinny/registerDescription.cjs.js +38 -0
  28. package/skinny/registerDescription.cjs.js.map +1 -0
  29. package/skinny/registerDescription.d.ts +3 -0
  30. package/skinny/registerDescription.esm.js +36 -0
  31. package/skinny/registerDescription.esm.js.map +1 -0
  32. package/skinny/registerFieldError.d.ts +19 -0
  33. package/skinny/registerLabel.cjs.js +2 -24
  34. package/skinny/registerLabel.cjs.js.map +1 -1
  35. package/skinny/registerLabel.d.ts +2 -3
  36. package/skinny/registerLabel.esm.js +2 -20
  37. package/skinny/registerLabel.esm.js.map +1 -1
  38. package/skinny/registerRadio.cjs.js +146 -0
  39. package/skinny/registerRadio.cjs.js.map +1 -0
  40. package/skinny/registerRadio.d.ts +10 -0
  41. package/skinny/registerRadio.esm.js +139 -0
  42. package/skinny/registerRadio.esm.js.map +1 -0
  43. package/skinny/registerRadioGroup.cjs.js +142 -0
  44. package/skinny/registerRadioGroup.cjs.js.map +1 -0
  45. package/skinny/registerRadioGroup.d.ts +9 -0
  46. package/skinny/registerRadioGroup.esm.js +135 -0
  47. package/skinny/registerRadioGroup.esm.js.map +1 -0
  48. package/skinny/registerText.cjs.js +69 -0
  49. package/skinny/registerText.cjs.js.map +1 -0
  50. package/skinny/registerText.d.ts +5 -0
  51. package/skinny/registerText.esm.js +62 -0
  52. package/skinny/registerText.esm.js.map +1 -0
@@ -0,0 +1,9 @@
1
+ import React, { ReactNode } from "react";
2
+ import type { RadioGroupProps } from "react-aria-components";
3
+ import { CodeComponentMetaOverrides, Registerable } from "./utils";
4
+ interface BaseRadioGroupProps extends RadioGroupProps {
5
+ children?: ReactNode;
6
+ }
7
+ export declare function BaseRadioGroup(props: BaseRadioGroupProps): React.JSX.Element;
8
+ export declare function registerRadioGroup(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseRadioGroup>): void;
9
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import type { TextProps } from "react-aria-components";
3
+ import { CodeComponentMetaOverrides, Registerable } from "./utils";
4
+ export declare function BaseText({ children, ...rest }: TextProps): React.JSX.Element;
5
+ export declare function registerText(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseText>): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicpkgs/react-aria",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "Plasmic registration calls for react-aria based components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -70,5 +70,5 @@
70
70
  "publishConfig": {
71
71
  "access": "public"
72
72
  },
73
- "gitHead": "cdcce1e6264390fcd9d5f6994f5677188d40d83a"
73
+ "gitHead": "ba7c77ecb6112755275be06c4c527495b7cc466f"
74
74
  }
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import type { BaseListBoxProps } from "./registerListBox";
3
- export declare const PlasmicLabelContext: React.Context<import("react-aria-components").LabelProps | undefined>;
3
+ export declare const PlasmicLabelContext: React.Context<(import("react-aria-components").LabelProps & React.RefAttributes<HTMLLabelElement>) | undefined>;
4
4
  export declare const PlasmicListBoxContext: React.Context<BaseListBoxProps | undefined>;
5
5
  export declare const PlasmicPopoverContext: React.Context<{
6
6
  className?: string | undefined;
@@ -0,0 +1,158 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var reactAriaComponents = require('react-aria-components');
5
+ var common = require('./common-e74a9214.cjs.js');
6
+ var utils = require('./utils-1190a0a9.cjs.js');
7
+ require('@plasmicapp/host/registerComponent');
8
+
9
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
+
11
+ var React__default = /*#__PURE__*/_interopDefault(React);
12
+
13
+ var __defProp = Object.defineProperty;
14
+ var __defProps = Object.defineProperties;
15
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
16
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
17
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
18
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
19
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20
+ var __spreadValues = (a, b) => {
21
+ for (var prop in b || (b = {}))
22
+ if (__hasOwnProp.call(b, prop))
23
+ __defNormalProp(a, prop, b[prop]);
24
+ if (__getOwnPropSymbols)
25
+ for (var prop of __getOwnPropSymbols(b)) {
26
+ if (__propIsEnum.call(b, prop))
27
+ __defNormalProp(a, prop, b[prop]);
28
+ }
29
+ return a;
30
+ };
31
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
32
+ var __objRest = (source, exclude) => {
33
+ var target = {};
34
+ for (var prop in source)
35
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
36
+ target[prop] = source[prop];
37
+ if (source != null && __getOwnPropSymbols)
38
+ for (var prop of __getOwnPropSymbols(source)) {
39
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
40
+ target[prop] = source[prop];
41
+ }
42
+ return target;
43
+ };
44
+ function BaseCheckbox(props) {
45
+ const _a = props, { children, onPressChange, onFocusVisibleChange } = _a, rest = __objRest(_a, ["children", "onPressChange", "onFocusVisibleChange"]);
46
+ return /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Checkbox, __spreadValues({}, rest), ({ isFocusVisible, isPressed }) => /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, /* @__PURE__ */ React__default.default.createElement(
47
+ utils.ValueObserver,
48
+ {
49
+ value: isFocusVisible,
50
+ onChange: onFocusVisibleChange
51
+ }
52
+ ), /* @__PURE__ */ React__default.default.createElement(utils.ValueObserver, { value: isPressed, onChange: onPressChange }), children)));
53
+ }
54
+ function registerCheckbox(loader, overrides) {
55
+ utils.registerComponentHelper(
56
+ loader,
57
+ BaseCheckbox,
58
+ {
59
+ name: utils.makeComponentName("checkbox"),
60
+ displayName: "BaseCheckbox",
61
+ importPath: "@plasmicpkgs/react-aria/registerCheckbox",
62
+ importName: "BaseCheckbox",
63
+ props: __spreadProps(__spreadValues({}, common.getCommonInputProps("checkbox", [
64
+ "name",
65
+ "isDisabled",
66
+ "isReadOnly",
67
+ "aria-label",
68
+ "children",
69
+ "isRequired",
70
+ "autoFocus"
71
+ ])), {
72
+ value: {
73
+ type: "string",
74
+ description: "The value of the input element, used when submitting an HTML form."
75
+ },
76
+ isSelected: {
77
+ type: "boolean",
78
+ editOnly: true,
79
+ uncontrolledProp: "defaultSelected",
80
+ description: "Whether the checkbox is toggled on",
81
+ defaultValueHint: false
82
+ },
83
+ isIndeterminate: {
84
+ displayName: "Indeterminate",
85
+ type: "boolean",
86
+ description: "This state indicates that the checkbox is neither fully checked nor unchecked. It typically represents a partial selection when dealing with groups of options. Some but not all items in the group are selected, resulting in an indeterminate state for the checkbox.",
87
+ defaultValueHint: false
88
+ },
89
+ isInvalid: {
90
+ displayName: "Invalid",
91
+ type: "boolean",
92
+ description: "Whether the input value is invalid",
93
+ defaultValueHint: false
94
+ },
95
+ validationBehavior: {
96
+ type: "choice",
97
+ options: ["native", "aria"],
98
+ description: "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.",
99
+ defaultValueHint: "native"
100
+ },
101
+ onChange: {
102
+ type: "eventHandler",
103
+ argTypes: [{ name: "isSelected", type: "boolean" }]
104
+ },
105
+ onHoverChange: {
106
+ type: "eventHandler",
107
+ argTypes: [{ name: "isHovered", type: "boolean" }]
108
+ },
109
+ onFocusChange: {
110
+ type: "eventHandler",
111
+ argTypes: [{ name: "isFocused", type: "boolean" }]
112
+ },
113
+ onPressChange: {
114
+ type: "eventHandler",
115
+ argTypes: [{ name: "isPressed", type: "boolean" }]
116
+ },
117
+ onFocusVisibleChange: {
118
+ type: "eventHandler",
119
+ argTypes: [{ name: "isFocusVisible", type: "boolean" }]
120
+ }
121
+ }),
122
+ states: {
123
+ isSelected: {
124
+ type: "writable",
125
+ valueProp: "isSelected",
126
+ onChangeProp: "onChange",
127
+ variableType: "boolean"
128
+ },
129
+ isHovered: {
130
+ type: "readonly",
131
+ onChangeProp: "onHoverChange",
132
+ variableType: "boolean"
133
+ },
134
+ isPressed: {
135
+ type: "readonly",
136
+ onChangeProp: "onPressChange",
137
+ variableType: "boolean"
138
+ },
139
+ isFocused: {
140
+ type: "readonly",
141
+ onChangeProp: "onFocusChange",
142
+ variableType: "boolean"
143
+ },
144
+ isFocusVisible: {
145
+ type: "readonly",
146
+ onChangeProp: "onFocusVisibleChange",
147
+ variableType: "boolean"
148
+ }
149
+ },
150
+ trapsFocus: true
151
+ },
152
+ overrides
153
+ );
154
+ }
155
+
156
+ exports.BaseCheckbox = BaseCheckbox;
157
+ exports.registerCheckbox = registerCheckbox;
158
+ //# sourceMappingURL=registerCheckbox.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registerCheckbox.cjs.js","sources":["../src/registerCheckbox.tsx"],"sourcesContent":["import React from \"react\";\nimport type { CheckboxProps } from \"react-aria-components\";\nimport { Checkbox } from \"react-aria-components\";\nimport { getCommonInputProps } from \"./common\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n ValueObserver,\n} from \"./utils\";\n\ninterface BaseCheckboxProps extends CheckboxProps {\n onPressChange: (isPressed: boolean) => void;\n onFocusVisibleChange: (isFocusVisible: boolean) => void;\n}\n\nexport function BaseCheckbox(props: BaseCheckboxProps) {\n const { children, onPressChange, onFocusVisibleChange, ...rest } = props;\n\n return (\n <>\n <Checkbox {...rest}>\n {({ isFocusVisible, isPressed }) => (\n <>\n <ValueObserver\n value={isFocusVisible}\n onChange={onFocusVisibleChange}\n />\n <ValueObserver value={isPressed} onChange={onPressChange} />\n {children}\n </>\n )}\n </Checkbox>\n </>\n );\n}\n\nexport function registerCheckbox(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseCheckbox>\n) {\n registerComponentHelper(\n loader,\n BaseCheckbox,\n {\n name: makeComponentName(\"checkbox\"),\n displayName: \"BaseCheckbox\",\n importPath: \"@plasmicpkgs/react-aria/registerCheckbox\",\n importName: \"BaseCheckbox\",\n props: {\n ...getCommonInputProps<BaseCheckboxProps>(\"checkbox\", [\n \"name\",\n \"isDisabled\",\n \"isReadOnly\",\n \"aria-label\",\n \"children\",\n \"isRequired\",\n \"autoFocus\",\n ]),\n value: {\n type: \"string\",\n description:\n \"The value of the input element, used when submitting an HTML form.\",\n },\n isSelected: {\n type: \"boolean\",\n editOnly: true,\n uncontrolledProp: \"defaultSelected\",\n description: \"Whether the checkbox is toggled on\",\n defaultValueHint: false,\n },\n isIndeterminate: {\n displayName: \"Indeterminate\",\n type: \"boolean\",\n description:\n \"This state indicates that the checkbox is neither fully checked nor unchecked. It typically represents a partial selection when dealing with groups of options. Some but not all items in the group are selected, resulting in an indeterminate state for the checkbox.\",\n defaultValueHint: false,\n },\n isInvalid: {\n displayName: \"Invalid\",\n type: \"boolean\",\n description: \"Whether the input value is invalid\",\n defaultValueHint: false,\n },\n validationBehavior: {\n type: \"choice\",\n options: [\"native\", \"aria\"],\n description:\n \"Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA.\",\n defaultValueHint: \"native\",\n },\n onChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isSelected\", type: \"boolean\" }],\n },\n onHoverChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isHovered\", type: \"boolean\" }],\n },\n onFocusChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isFocused\", type: \"boolean\" }],\n },\n onPressChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isPressed\", type: \"boolean\" }],\n },\n onFocusVisibleChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isFocusVisible\", type: \"boolean\" }],\n },\n },\n states: {\n isSelected: {\n type: \"writable\",\n valueProp: \"isSelected\",\n onChangeProp: \"onChange\",\n variableType: \"boolean\",\n },\n isHovered: {\n type: \"readonly\",\n onChangeProp: \"onHoverChange\",\n variableType: \"boolean\",\n },\n isPressed: {\n type: \"readonly\",\n onChangeProp: \"onPressChange\",\n variableType: \"boolean\",\n },\n isFocused: {\n type: \"readonly\",\n onChangeProp: \"onFocusChange\",\n variableType: \"boolean\",\n },\n isFocusVisible: {\n type: \"readonly\",\n onChangeProp: \"onFocusVisibleChange\",\n variableType: \"boolean\",\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":["React","Checkbox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,WAAa,EAAA,IAAA,EAAM,WAAW,CAAA;AAAA,SACnD;AAAA,QACA,aAAe,EAAA;AAAA,UACb,IAAM,EAAA,cAAA;AAAA,UACN,UAAU,CAAC,EAAE,MAAM,WAAa,EAAA,IAAA,EAAM,WAAW,CAAA;AAAA,SACnD;AAAA,QACA,oBAAsB,EAAA;AAAA,UACpB,IAAM,EAAA,cAAA;AAAA,UACN,UAAU,CAAC,EAAE,MAAM,gBAAkB,EAAA,IAAA,EAAM,WAAW,CAAA;AAAA,SACxD;AAAA,OACF,CAAA;AAAA,MACA,MAAQ,EAAA;AAAA,QACN,UAAY,EAAA;AAAA,UACV,IAAM,EAAA,UAAA;AAAA,UACN,SAAW,EAAA,YAAA;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,QACA,SAAW,EAAA;AAAA,UACT,IAAM,EAAA,UAAA;AAAA,UACN,YAAc,EAAA,eAAA;AAAA,UACd,YAAc,EAAA,SAAA;AAAA,SAChB;AAAA,QACA,SAAW,EAAA;AAAA,UACT,IAAM,EAAA,UAAA;AAAA,UACN,YAAc,EAAA,eAAA;AAAA,UACd,YAAc,EAAA,SAAA;AAAA,SAChB;AAAA,QACA,cAAgB,EAAA;AAAA,UACd,IAAM,EAAA,UAAA;AAAA,UACN,YAAc,EAAA,sBAAA;AAAA,UACd,YAAc,EAAA,SAAA;AAAA,SAChB;AAAA,OACF;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;;"}
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import type { CheckboxProps } from "react-aria-components";
3
+ import { CodeComponentMetaOverrides, Registerable } from "./utils";
4
+ interface BaseCheckboxProps extends CheckboxProps {
5
+ onPressChange: (isPressed: boolean) => void;
6
+ onFocusVisibleChange: (isFocusVisible: boolean) => void;
7
+ }
8
+ export declare function BaseCheckbox(props: BaseCheckboxProps): React.JSX.Element;
9
+ export declare function registerCheckbox(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseCheckbox>): void;
10
+ export {};
@@ -0,0 +1,151 @@
1
+ import React from 'react';
2
+ import { Checkbox } from 'react-aria-components';
3
+ import { g as getCommonInputProps } from './common-52c26d37.esm.js';
4
+ import { V as ValueObserver, r as registerComponentHelper, m as makeComponentName } from './utils-28f98072.esm.js';
5
+ import '@plasmicapp/host/registerComponent';
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
+ var __objRest = (source, exclude) => {
27
+ var target = {};
28
+ for (var prop in source)
29
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
30
+ target[prop] = source[prop];
31
+ if (source != null && __getOwnPropSymbols)
32
+ for (var prop of __getOwnPropSymbols(source)) {
33
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
34
+ target[prop] = source[prop];
35
+ }
36
+ return target;
37
+ };
38
+ function BaseCheckbox(props) {
39
+ const _a = props, { children, onPressChange, onFocusVisibleChange } = _a, rest = __objRest(_a, ["children", "onPressChange", "onFocusVisibleChange"]);
40
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Checkbox, __spreadValues({}, rest), ({ isFocusVisible, isPressed }) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
41
+ ValueObserver,
42
+ {
43
+ value: isFocusVisible,
44
+ onChange: onFocusVisibleChange
45
+ }
46
+ ), /* @__PURE__ */ React.createElement(ValueObserver, { value: isPressed, onChange: onPressChange }), children)));
47
+ }
48
+ function registerCheckbox(loader, overrides) {
49
+ registerComponentHelper(
50
+ loader,
51
+ BaseCheckbox,
52
+ {
53
+ name: makeComponentName("checkbox"),
54
+ displayName: "BaseCheckbox",
55
+ importPath: "@plasmicpkgs/react-aria/registerCheckbox",
56
+ importName: "BaseCheckbox",
57
+ props: __spreadProps(__spreadValues({}, getCommonInputProps("checkbox", [
58
+ "name",
59
+ "isDisabled",
60
+ "isReadOnly",
61
+ "aria-label",
62
+ "children",
63
+ "isRequired",
64
+ "autoFocus"
65
+ ])), {
66
+ value: {
67
+ type: "string",
68
+ description: "The value of the input element, used when submitting an HTML form."
69
+ },
70
+ isSelected: {
71
+ type: "boolean",
72
+ editOnly: true,
73
+ uncontrolledProp: "defaultSelected",
74
+ description: "Whether the checkbox is toggled on",
75
+ defaultValueHint: false
76
+ },
77
+ isIndeterminate: {
78
+ displayName: "Indeterminate",
79
+ type: "boolean",
80
+ description: "This state indicates that the checkbox is neither fully checked nor unchecked. It typically represents a partial selection when dealing with groups of options. Some but not all items in the group are selected, resulting in an indeterminate state for the checkbox.",
81
+ defaultValueHint: false
82
+ },
83
+ isInvalid: {
84
+ displayName: "Invalid",
85
+ type: "boolean",
86
+ description: "Whether the input value is invalid",
87
+ defaultValueHint: false
88
+ },
89
+ validationBehavior: {
90
+ type: "choice",
91
+ options: ["native", "aria"],
92
+ description: "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.",
93
+ defaultValueHint: "native"
94
+ },
95
+ onChange: {
96
+ type: "eventHandler",
97
+ argTypes: [{ name: "isSelected", type: "boolean" }]
98
+ },
99
+ onHoverChange: {
100
+ type: "eventHandler",
101
+ argTypes: [{ name: "isHovered", type: "boolean" }]
102
+ },
103
+ onFocusChange: {
104
+ type: "eventHandler",
105
+ argTypes: [{ name: "isFocused", type: "boolean" }]
106
+ },
107
+ onPressChange: {
108
+ type: "eventHandler",
109
+ argTypes: [{ name: "isPressed", type: "boolean" }]
110
+ },
111
+ onFocusVisibleChange: {
112
+ type: "eventHandler",
113
+ argTypes: [{ name: "isFocusVisible", type: "boolean" }]
114
+ }
115
+ }),
116
+ states: {
117
+ isSelected: {
118
+ type: "writable",
119
+ valueProp: "isSelected",
120
+ onChangeProp: "onChange",
121
+ variableType: "boolean"
122
+ },
123
+ isHovered: {
124
+ type: "readonly",
125
+ onChangeProp: "onHoverChange",
126
+ variableType: "boolean"
127
+ },
128
+ isPressed: {
129
+ type: "readonly",
130
+ onChangeProp: "onPressChange",
131
+ variableType: "boolean"
132
+ },
133
+ isFocused: {
134
+ type: "readonly",
135
+ onChangeProp: "onFocusChange",
136
+ variableType: "boolean"
137
+ },
138
+ isFocusVisible: {
139
+ type: "readonly",
140
+ onChangeProp: "onFocusVisibleChange",
141
+ variableType: "boolean"
142
+ }
143
+ },
144
+ trapsFocus: true
145
+ },
146
+ overrides
147
+ );
148
+ }
149
+
150
+ export { BaseCheckbox, registerCheckbox };
151
+ //# sourceMappingURL=registerCheckbox.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registerCheckbox.esm.js","sources":["../src/registerCheckbox.tsx"],"sourcesContent":["import React from \"react\";\nimport type { CheckboxProps } from \"react-aria-components\";\nimport { Checkbox } from \"react-aria-components\";\nimport { getCommonInputProps } from \"./common\";\nimport {\n CodeComponentMetaOverrides,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n ValueObserver,\n} from \"./utils\";\n\ninterface BaseCheckboxProps extends CheckboxProps {\n onPressChange: (isPressed: boolean) => void;\n onFocusVisibleChange: (isFocusVisible: boolean) => void;\n}\n\nexport function BaseCheckbox(props: BaseCheckboxProps) {\n const { children, onPressChange, onFocusVisibleChange, ...rest } = props;\n\n return (\n <>\n <Checkbox {...rest}>\n {({ isFocusVisible, isPressed }) => (\n <>\n <ValueObserver\n value={isFocusVisible}\n onChange={onFocusVisibleChange}\n />\n <ValueObserver value={isPressed} onChange={onPressChange} />\n {children}\n </>\n )}\n </Checkbox>\n </>\n );\n}\n\nexport function registerCheckbox(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseCheckbox>\n) {\n registerComponentHelper(\n loader,\n BaseCheckbox,\n {\n name: makeComponentName(\"checkbox\"),\n displayName: \"BaseCheckbox\",\n importPath: \"@plasmicpkgs/react-aria/registerCheckbox\",\n importName: \"BaseCheckbox\",\n props: {\n ...getCommonInputProps<BaseCheckboxProps>(\"checkbox\", [\n \"name\",\n \"isDisabled\",\n \"isReadOnly\",\n \"aria-label\",\n \"children\",\n \"isRequired\",\n \"autoFocus\",\n ]),\n value: {\n type: \"string\",\n description:\n \"The value of the input element, used when submitting an HTML form.\",\n },\n isSelected: {\n type: \"boolean\",\n editOnly: true,\n uncontrolledProp: \"defaultSelected\",\n description: \"Whether the checkbox is toggled on\",\n defaultValueHint: false,\n },\n isIndeterminate: {\n displayName: \"Indeterminate\",\n type: \"boolean\",\n description:\n \"This state indicates that the checkbox is neither fully checked nor unchecked. It typically represents a partial selection when dealing with groups of options. Some but not all items in the group are selected, resulting in an indeterminate state for the checkbox.\",\n defaultValueHint: false,\n },\n isInvalid: {\n displayName: \"Invalid\",\n type: \"boolean\",\n description: \"Whether the input value is invalid\",\n defaultValueHint: false,\n },\n validationBehavior: {\n type: \"choice\",\n options: [\"native\", \"aria\"],\n description:\n \"Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA.\",\n defaultValueHint: \"native\",\n },\n onChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isSelected\", type: \"boolean\" }],\n },\n onHoverChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isHovered\", type: \"boolean\" }],\n },\n onFocusChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isFocused\", type: \"boolean\" }],\n },\n onPressChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isPressed\", type: \"boolean\" }],\n },\n onFocusVisibleChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"isFocusVisible\", type: \"boolean\" }],\n },\n },\n states: {\n isSelected: {\n type: \"writable\",\n valueProp: \"isSelected\",\n onChangeProp: \"onChange\",\n variableType: \"boolean\",\n },\n isHovered: {\n type: \"readonly\",\n onChangeProp: \"onHoverChange\",\n variableType: \"boolean\",\n },\n isPressed: {\n type: \"readonly\",\n onChangeProp: \"onPressChange\",\n variableType: \"boolean\",\n },\n isFocused: {\n type: \"readonly\",\n onChangeProp: \"onFocusChange\",\n variableType: \"boolean\",\n },\n isFocusVisible: {\n type: \"readonly\",\n onChangeProp: \"onFocusVisibleChange\",\n variableType: \"boolean\",\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBO,SAAS,aAAa,KAA0B,EAAA;AACrD,EAAmE,MAAA,EAAA,GAAA,KAAA,EAA3D,EAAU,QAAA,EAAA,aAAA,EAAe,oBAlBnC,EAAA,GAkBqE,IAAT,IAAS,GAAA,SAAA,CAAA,EAAA,EAAT,CAAlD,UAAA,EAAU,eAAe,EAAA,sBAAA,CAAA,CAAA,CAAA;AAEjC,EACE,uBAAA,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,sCACG,QAAa,EAAA,cAAA,CAAA,EAAA,EAAA,IAAA,CAAA,EACX,CAAC,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,EAAA,SAAA;AAAA,SAChB;AAAA,QACA,SAAW,EAAA;AAAA,UACT,IAAM,EAAA,UAAA;AAAA,UACN,YAAc,EAAA,eAAA;AAAA,UACd,YAAc,EAAA,SAAA;AAAA,SAChB;AAAA,QACA,SAAW,EAAA;AAAA,UACT,IAAM,EAAA,UAAA;AAAA,UACN,YAAc,EAAA,eAAA;AAAA,UACd,YAAc,EAAA,SAAA;AAAA,SAChB;AAAA,QACA,SAAW,EAAA;AAAA,UACT,IAAM,EAAA,UAAA;AAAA,UACN,YAAc,EAAA,eAAA;AAAA,UACd,YAAc,EAAA,SAAA;AAAA,SAChB;AAAA,QACA,cAAgB,EAAA;AAAA,UACd,IAAM,EAAA,UAAA;AAAA,UACN,YAAc,EAAA,sBAAA;AAAA,UACd,YAAc,EAAA,SAAA;AAAA,SAChB;AAAA,OACF;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF;;;;"}
@@ -0,0 +1,113 @@
1
+ 'use strict';
2
+
3
+ var reactAriaComponents = require('react-aria-components');
4
+ var common = require('./common-e74a9214.cjs.js');
5
+ var registerCheckbox = require('./registerCheckbox.cjs.js');
6
+ var registerDescription = require('./registerDescription.cjs.js');
7
+ var registerFieldError = require('./registerFieldError.cjs.js');
8
+ var registerLabel = require('./registerLabel.cjs.js');
9
+ var utils = require('./utils-1190a0a9.cjs.js');
10
+ require('react');
11
+ require('./registerText.cjs.js');
12
+ require('@plasmicapp/host/registerComponent');
13
+
14
+ var __defProp = Object.defineProperty;
15
+ var __defProps = Object.defineProperties;
16
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
17
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
18
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
19
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
20
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21
+ var __spreadValues = (a, b) => {
22
+ for (var prop in b || (b = {}))
23
+ if (__hasOwnProp.call(b, prop))
24
+ __defNormalProp(a, prop, b[prop]);
25
+ if (__getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(b)) {
27
+ if (__propIsEnum.call(b, prop))
28
+ __defNormalProp(a, prop, b[prop]);
29
+ }
30
+ return a;
31
+ };
32
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
33
+ const BaseCheckboxGroup = reactAriaComponents.CheckboxGroup;
34
+ const componentName = utils.makeComponentName("checkboxGroup");
35
+ function registerCheckboxGroup(loader, overrides) {
36
+ utils.registerComponentHelper(
37
+ loader,
38
+ BaseCheckboxGroup,
39
+ {
40
+ name: componentName,
41
+ displayName: "BaseCheckboxGroup",
42
+ importPath: "@plasmicpkgs/react-aria/registerCheckboxGroup",
43
+ importName: "BaseCheckboxGroup",
44
+ props: __spreadProps(__spreadValues({}, common.getCommonInputProps("checkbox group", [
45
+ "name",
46
+ "isDisabled",
47
+ "isReadOnly",
48
+ "aria-label",
49
+ "children",
50
+ "isRequired"
51
+ ])), {
52
+ value: {
53
+ type: "array",
54
+ editOnly: true,
55
+ uncontrolledProp: "defaultValue",
56
+ description: "The current value"
57
+ },
58
+ options: {
59
+ type: "array",
60
+ description: "The options in the radio group",
61
+ itemType: {
62
+ type: "object",
63
+ nameFunc: (item) => item.label,
64
+ fields: {
65
+ label: "string",
66
+ value: "string"
67
+ }
68
+ }
69
+ },
70
+ isInvalid: {
71
+ displayName: "Invalid",
72
+ type: "boolean",
73
+ description: "Whether the input value is invalid",
74
+ defaultValueHint: false
75
+ },
76
+ validationBehavior: {
77
+ type: "choice",
78
+ options: ["native", "aria"],
79
+ description: "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.",
80
+ defaultValueHint: "native"
81
+ },
82
+ onChange: {
83
+ type: "eventHandler",
84
+ argTypes: [{ name: "value", type: "object" }]
85
+ }
86
+ }),
87
+ states: {
88
+ value: {
89
+ type: "writable",
90
+ valueProp: "value",
91
+ onChangeProp: "onChange",
92
+ variableType: "array"
93
+ }
94
+ },
95
+ trapsFocus: true
96
+ },
97
+ overrides
98
+ );
99
+ const thisName = utils.makeChildComponentName(
100
+ overrides == null ? void 0 : overrides.parentComponentName,
101
+ componentName
102
+ );
103
+ registerFieldError.registerFieldError(loader, { parentComponentName: thisName });
104
+ registerCheckbox.registerCheckbox(loader, { parentComponentName: thisName });
105
+ registerLabel.registerLabel(loader, { parentComponentName: thisName });
106
+ registerDescription.registerDescription(loader, {
107
+ parentComponentName: thisName
108
+ });
109
+ }
110
+
111
+ exports.BaseCheckboxGroup = BaseCheckboxGroup;
112
+ exports.registerCheckboxGroup = registerCheckboxGroup;
113
+ //# sourceMappingURL=registerCheckboxGroup.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registerCheckboxGroup.cjs.js","sources":["../src/registerCheckboxGroup.tsx"],"sourcesContent":["import type { CheckboxGroupProps } from \"react-aria-components\";\nimport { CheckboxGroup } from \"react-aria-components\";\nimport { getCommonInputProps } from \"./common\";\nimport { registerCheckbox } from \"./registerCheckbox\";\nimport { registerDescription } from \"./registerDescription\";\nimport { registerFieldError } from \"./registerFieldError\";\nimport { registerLabel } from \"./registerLabel\";\nimport {\n CodeComponentMetaOverrides,\n makeChildComponentName,\n makeComponentName,\n Registerable,\n registerComponentHelper,\n} from \"./utils\";\n\nexport const BaseCheckboxGroup = CheckboxGroup;\n\nconst componentName = makeComponentName(\"checkboxGroup\");\n\nexport function registerCheckboxGroup(\n loader?: Registerable,\n overrides?: CodeComponentMetaOverrides<typeof BaseCheckboxGroup>\n) {\n registerComponentHelper(\n loader,\n BaseCheckboxGroup,\n {\n name: componentName,\n displayName: \"BaseCheckboxGroup\",\n importPath: \"@plasmicpkgs/react-aria/registerCheckboxGroup\",\n importName: \"BaseCheckboxGroup\",\n props: {\n ...getCommonInputProps<CheckboxGroupProps>(\"checkbox group\", [\n \"name\",\n \"isDisabled\",\n \"isReadOnly\",\n \"aria-label\",\n \"children\",\n \"isRequired\",\n ]),\n value: {\n type: \"array\",\n editOnly: true,\n uncontrolledProp: \"defaultValue\",\n description: \"The current value\",\n },\n options: {\n type: \"array\",\n description: \"The options in the radio group\",\n itemType: {\n type: \"object\",\n nameFunc: (item) => item.label,\n fields: {\n label: \"string\",\n value: \"string\",\n },\n },\n },\n isInvalid: {\n displayName: \"Invalid\",\n type: \"boolean\",\n description: \"Whether the input value is invalid\",\n defaultValueHint: false,\n },\n validationBehavior: {\n type: \"choice\",\n options: [\"native\", \"aria\"],\n description:\n \"Whether to use native HTML form validation to prevent form submission when the value is missing or invalid, or mark the field as required or invalid via ARIA.\",\n defaultValueHint: \"native\",\n },\n onChange: {\n type: \"eventHandler\",\n argTypes: [{ name: \"value\", type: \"object\" }],\n },\n },\n states: {\n value: {\n type: \"writable\",\n valueProp: \"value\",\n onChangeProp: \"onChange\",\n variableType: \"array\",\n },\n },\n trapsFocus: true,\n },\n overrides\n );\n\n const thisName = makeChildComponentName(\n overrides?.parentComponentName,\n componentName\n );\n\n registerFieldError(loader, { parentComponentName: thisName });\n registerCheckbox(loader, { parentComponentName: thisName });\n registerLabel(loader, { parentComponentName: thisName });\n registerDescription(loader, {\n parentComponentName: thisName,\n });\n}\n"],"names":["CheckboxGroup","makeComponentName","registerComponentHelper","getCommonInputProps","makeChildComponentName","registerFieldError","registerCheckbox","registerLabel","registerDescription"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeO,MAAM,iBAAoB,GAAAA,kCAAA;AAEjC,MAAM,aAAA,GAAgBC,wBAAkB,eAAe,CAAA,CAAA;AAEvC,SAAA,qBAAA,CACd,QACA,SACA,EAAA;AACA,EAAAC,6BAAA;AAAA,IACE,MAAA;AAAA,IACA,iBAAA;AAAA,IACA;AAAA,MACE,IAAM,EAAA,aAAA;AAAA,MACN,WAAa,EAAA,mBAAA;AAAA,MACb,UAAY,EAAA,+CAAA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A,QACN,KAAO,EAAA;AAAA,UACL,IAAM,EAAA,UAAA;AAAA,UACN,SAAW,EAAA,OAAA;AAAA,UACX,YAAc,EAAA,UAAA;AAAA,UACd,YAAc,EAAA,OAAA;AAAA,SAChB;AAAA,OACF;AAAA,MACA,UAAY,EAAA,IAAA;AAAA,KACd;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AAEA,EAAA,MAAM,QAAW,GAAAC,4BAAA;AAAA,IACf,SAAW,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,CAAA,mBAAA;AAAA,IACX,aAAA;AAAA,GACF,CAAA;AAEA,EAAAC,qCAAA,CAAmB,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AAC5D,EAAAC,iCAAA,CAAiB,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AAC1D,EAAAC,2BAAA,CAAc,MAAQ,EAAA,EAAE,mBAAqB,EAAA,QAAA,EAAU,CAAA,CAAA;AACvD,EAAAC,uCAAA,CAAoB,MAAQ,EAAA;AAAA,IAC1B,mBAAqB,EAAA,QAAA;AAAA,GACtB,CAAA,CAAA;AACH;;;;;"}
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import type { CheckboxGroupProps } from "react-aria-components";
3
+ import { CodeComponentMetaOverrides, Registerable } from "./utils";
4
+ export declare const BaseCheckboxGroup: (props: CheckboxGroupProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
5
+ export declare function registerCheckboxGroup(loader?: Registerable, overrides?: CodeComponentMetaOverrides<typeof BaseCheckboxGroup>): void;
@@ -0,0 +1,110 @@
1
+ import { CheckboxGroup } from 'react-aria-components';
2
+ import { g as getCommonInputProps } from './common-52c26d37.esm.js';
3
+ import { registerCheckbox } from './registerCheckbox.esm.js';
4
+ import { registerDescription } from './registerDescription.esm.js';
5
+ import { registerFieldError } from './registerFieldError.esm.js';
6
+ import { registerLabel } from './registerLabel.esm.js';
7
+ import { r as registerComponentHelper, a as makeChildComponentName, m as makeComponentName } from './utils-28f98072.esm.js';
8
+ import 'react';
9
+ import './registerText.esm.js';
10
+ import '@plasmicapp/host/registerComponent';
11
+
12
+ var __defProp = Object.defineProperty;
13
+ var __defProps = Object.defineProperties;
14
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
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
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
31
+ const BaseCheckboxGroup = CheckboxGroup;
32
+ const componentName = makeComponentName("checkboxGroup");
33
+ function registerCheckboxGroup(loader, overrides) {
34
+ registerComponentHelper(
35
+ loader,
36
+ BaseCheckboxGroup,
37
+ {
38
+ name: componentName,
39
+ displayName: "BaseCheckboxGroup",
40
+ importPath: "@plasmicpkgs/react-aria/registerCheckboxGroup",
41
+ importName: "BaseCheckboxGroup",
42
+ props: __spreadProps(__spreadValues({}, getCommonInputProps("checkbox group", [
43
+ "name",
44
+ "isDisabled",
45
+ "isReadOnly",
46
+ "aria-label",
47
+ "children",
48
+ "isRequired"
49
+ ])), {
50
+ value: {
51
+ type: "array",
52
+ editOnly: true,
53
+ uncontrolledProp: "defaultValue",
54
+ description: "The current value"
55
+ },
56
+ options: {
57
+ type: "array",
58
+ description: "The options in the radio group",
59
+ itemType: {
60
+ type: "object",
61
+ nameFunc: (item) => item.label,
62
+ fields: {
63
+ label: "string",
64
+ value: "string"
65
+ }
66
+ }
67
+ },
68
+ isInvalid: {
69
+ displayName: "Invalid",
70
+ type: "boolean",
71
+ description: "Whether the input value is invalid",
72
+ defaultValueHint: false
73
+ },
74
+ validationBehavior: {
75
+ type: "choice",
76
+ options: ["native", "aria"],
77
+ description: "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.",
78
+ defaultValueHint: "native"
79
+ },
80
+ onChange: {
81
+ type: "eventHandler",
82
+ argTypes: [{ name: "value", type: "object" }]
83
+ }
84
+ }),
85
+ states: {
86
+ value: {
87
+ type: "writable",
88
+ valueProp: "value",
89
+ onChangeProp: "onChange",
90
+ variableType: "array"
91
+ }
92
+ },
93
+ trapsFocus: true
94
+ },
95
+ overrides
96
+ );
97
+ const thisName = makeChildComponentName(
98
+ overrides == null ? void 0 : overrides.parentComponentName,
99
+ componentName
100
+ );
101
+ registerFieldError(loader, { parentComponentName: thisName });
102
+ registerCheckbox(loader, { parentComponentName: thisName });
103
+ registerLabel(loader, { parentComponentName: thisName });
104
+ registerDescription(loader, {
105
+ parentComponentName: thisName
106
+ });
107
+ }
108
+
109
+ export { BaseCheckboxGroup, registerCheckboxGroup };
110
+ //# sourceMappingURL=registerCheckboxGroup.esm.js.map