@devtools-ui/radio-group 0.4.0 → 0.4.1-next.0
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/README.md +109 -0
- package/dist/cjs/index.cjs +5 -5
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.legacy-esm.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -14
- package/src/dsl/__tests__/index.test.tsx +1 -1
- package/src/dsl/index.tsx +1 -1
- package/types/dsl/index.d.ts +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# @devtools-ui/radio-group
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
`@devtools-ui/radio-group` is a component package designed to be leveraged by a [Player-UI assets plugin](https://player-ui.github.io/next/plugins).
|
|
6
|
+
|
|
7
|
+
It provides a `RadioGroup` component that can present a way to input one of multiple choices.
|
|
8
|
+
|
|
9
|
+
This package is part of a mono-repo built with Bazel, ensuring fast and reliable builds.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
To install `@devtools-ui/radio-group`, you can use pnpm or yarn:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
pnpm i @devtools-ui/radio-group
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
or
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
yarn add @devtools-ui/radio-group
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
You can leverage this asset through the `@devtools-ui/plugin`:
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { RadioGroup } from "@devtools-ui/plugin";
|
|
31
|
+
|
|
32
|
+
// and use it to define your Player-UI content:
|
|
33
|
+
myFlow = {
|
|
34
|
+
id: 'my_flow',
|
|
35
|
+
views: [
|
|
36
|
+
<>
|
|
37
|
+
<RadioGroup binding={b`my_binding`}>
|
|
38
|
+
<RadioGroup.Label>RadioGroup Label</RadioGroup.Label>
|
|
39
|
+
<RadioGroup.Values>
|
|
40
|
+
<RadioGroup.Values.Value value="opt1">
|
|
41
|
+
<RadioGroup.Values.Value.Label>
|
|
42
|
+
Option 1
|
|
43
|
+
</RadioGroup.Values.Value.Label>
|
|
44
|
+
</RadioGroup.Values.Value>
|
|
45
|
+
<RadioGroup.Values.Value value="opt2">
|
|
46
|
+
<RadioGroup.Values.Value.Label>
|
|
47
|
+
Option 2
|
|
48
|
+
</RadioGroup.Values.Value.Label>
|
|
49
|
+
</RadioGroup.Values.Value>
|
|
50
|
+
</RadioGroup.Values>
|
|
51
|
+
</RadioGroup>
|
|
52
|
+
</>
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
For more information on how to author Player-UI content using DSL, please check our [Player-UI docs](https://player-ui.github.io/next/dsl#tsxjsx-content-authoring-player-dsl).
|
|
58
|
+
|
|
59
|
+
Or, your can leverage this asset in your own plugin:
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
// TransformPlugin.ts
|
|
63
|
+
import type { Player, PlayerPlugin } from "@player-ui/player";
|
|
64
|
+
import { AssetTransformPlugin } from "@player-ui/asset-transform-plugin";
|
|
65
|
+
import { radioGroupTransform } from "@devtools-ui/radio-group";
|
|
66
|
+
|
|
67
|
+
export class TransformsPlugin implements PlayerPlugin {
|
|
68
|
+
name = "my-plugin-transforms";
|
|
69
|
+
|
|
70
|
+
apply(player: Player) {
|
|
71
|
+
player.registerPlugin(
|
|
72
|
+
new AssetTransformPlugin([
|
|
73
|
+
[{ type: "radio-group" }, radioGroupTransform],
|
|
74
|
+
])
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
// AssetRegistryPlugin.ts
|
|
82
|
+
import React from "react";
|
|
83
|
+
import type { Player } from "@player-ui/player";
|
|
84
|
+
import type {
|
|
85
|
+
ExtendedPlayerPlugin,
|
|
86
|
+
ReactPlayer,
|
|
87
|
+
ReactPlayerPlugin,
|
|
88
|
+
} from "@player-ui/react";
|
|
89
|
+
import { AssetProviderPlugin } from "@player-ui/asset-provider-plugin-react";
|
|
90
|
+
import { TransformsPlugin } from "./TransformPlugin";
|
|
91
|
+
import { RadioGroupAsset, RadioGroupComponent } from "@devtools-ui/radio-group";
|
|
92
|
+
|
|
93
|
+
export class AssetsRegistryPlugin implements ReactPlayerPlugin, ExtendedPlayerPlugin<[RadioGroupAsset]> {
|
|
94
|
+
name = "my-plugin";
|
|
95
|
+
|
|
96
|
+
applyReact(reactPlayer: ReactPlayer) {
|
|
97
|
+
reactPlayer.registerPlugin(
|
|
98
|
+
new AssetProviderPlugin([
|
|
99
|
+
["radio-group", RadioGroupComponent],
|
|
100
|
+
])
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
apply(player: Player) {
|
|
105
|
+
player.registerPlugin(new TransformsPlugin());
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -54,17 +54,17 @@ var RadioGroupComponent = (props) => {
|
|
|
54
54
|
|
|
55
55
|
// ../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/radio-group/src/dsl/index.tsx
|
|
56
56
|
var import_react4 = __toESM(require("react"));
|
|
57
|
-
var
|
|
57
|
+
var import_react_dsl = require("@player-lang/react-dsl");
|
|
58
58
|
var import_text = require("@devtools-ui/text");
|
|
59
59
|
var RadioGroup2 = (props) => {
|
|
60
60
|
const { children, binding, ...rest } = props;
|
|
61
|
-
return /* @__PURE__ */ import_react4.default.createElement(
|
|
61
|
+
return /* @__PURE__ */ import_react4.default.createElement(import_react_dsl.Asset, { type: "radio-group", ...rest }, /* @__PURE__ */ import_react4.default.createElement("property", { name: "binding" }, binding.toValue()), children);
|
|
62
62
|
};
|
|
63
63
|
var RadioItem = (props) => {
|
|
64
64
|
const { children, ...rest } = props;
|
|
65
|
-
return /* @__PURE__ */ import_react4.default.createElement("obj", null, (0,
|
|
65
|
+
return /* @__PURE__ */ import_react4.default.createElement("obj", null, (0, import_react_dsl.toJsonProperties)(rest), children);
|
|
66
66
|
};
|
|
67
|
-
RadioItem.Label = (0,
|
|
67
|
+
RadioItem.Label = (0, import_react_dsl.createSlot)({
|
|
68
68
|
name: "label",
|
|
69
69
|
TextComp: import_text.Text,
|
|
70
70
|
isArray: false,
|
|
@@ -73,7 +73,7 @@ RadioItem.Label = (0, import_dsl.createSlot)({
|
|
|
73
73
|
var RadioGroupValues = (props) => {
|
|
74
74
|
return /* @__PURE__ */ import_react4.default.createElement("property", { name: "values" }, /* @__PURE__ */ import_react4.default.createElement("array", { ...props }));
|
|
75
75
|
};
|
|
76
|
-
RadioGroup2.Label = (0,
|
|
76
|
+
RadioGroup2.Label = (0, import_react_dsl.createSlot)({
|
|
77
77
|
name: "label",
|
|
78
78
|
TextComp: import_text.Text,
|
|
79
79
|
isArray: false,
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/radio-group/src/index.ts","../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/radio-group/src/component/index.tsx","../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/radio-group/src/dsl/index.tsx","../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/radio-group/src/transform/index.ts"],"sourcesContent":["export * from \"./types\";\nexport * from \"./component\";\nexport * from \"./dsl\";\nexport * from \"./transform\";\n","import React from \"react\";\nimport type { TransformedRadioGroup } from \"../types\";\nimport { RadioGroup, Stack, FormLabel, Radio } from \"@chakra-ui/react\";\nimport { ReactAsset } from \"@player-ui/react\";\n\nexport const RadioGroupComponent = (props: TransformedRadioGroup) => {\n const { id, label, setRadio, values } = props;\n\n return (\n <RadioGroup>\n {label && (\n <FormLabel htmlFor={id}>\n <ReactAsset {...label.asset} />\n </FormLabel>\n )}\n <Stack>\n {values?.map((radioItem) => {\n const onChange: React.ChangeEventHandler<HTMLInputElement> = (e) => {\n setRadio(e.target.value);\n };\n const { value, label } = radioItem;\n\n return (\n <Radio key={value} onChange={onChange} value={value}>\n <ReactAsset {...label.asset} />\n </Radio>\n );\n })}\n </Stack>\n </RadioGroup>\n );\n};\n","import React from \"react\";\nimport {\n AssetPropsWithChildren,\n Asset,\n createSlot,\n BindingTemplateInstance,\n WithTemplateTypes,\n WithChildren,\n toJsonProperties,\n} from \"@player-
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/radio-group/src/index.ts","../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/radio-group/src/component/index.tsx","../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/radio-group/src/dsl/index.tsx","../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/radio-group/src/transform/index.ts"],"sourcesContent":["export * from \"./types\";\nexport * from \"./component\";\nexport * from \"./dsl\";\nexport * from \"./transform\";\n","import React from \"react\";\nimport type { TransformedRadioGroup } from \"../types\";\nimport { RadioGroup, Stack, FormLabel, Radio } from \"@chakra-ui/react\";\nimport { ReactAsset } from \"@player-ui/react\";\n\nexport const RadioGroupComponent = (props: TransformedRadioGroup) => {\n const { id, label, setRadio, values } = props;\n\n return (\n <RadioGroup>\n {label && (\n <FormLabel htmlFor={id}>\n <ReactAsset {...label.asset} />\n </FormLabel>\n )}\n <Stack>\n {values?.map((radioItem) => {\n const onChange: React.ChangeEventHandler<HTMLInputElement> = (e) => {\n setRadio(e.target.value);\n };\n const { value, label } = radioItem;\n\n return (\n <Radio key={value} onChange={onChange} value={value}>\n <ReactAsset {...label.asset} />\n </Radio>\n );\n })}\n </Stack>\n </RadioGroup>\n );\n};\n","import React from \"react\";\nimport {\n AssetPropsWithChildren,\n Asset,\n createSlot,\n BindingTemplateInstance,\n WithTemplateTypes,\n WithChildren,\n toJsonProperties,\n} from \"@player-lang/react-dsl\";\nimport type { Asset as AssetType } from \"@player-ui/player\";\nimport { Text } from \"@devtools-ui/text\";\nimport type { RadioGroupAsset, RadioItemAsset } from \"../types\";\n\nexport const RadioGroup = (\n props: Omit<AssetPropsWithChildren<RadioGroupAsset>, \"binding\"> & {\n /** The binding as a tagged template instance */\n binding: BindingTemplateInstance;\n }\n) => {\n const { children, binding, ...rest } = props;\n\n return (\n <Asset type=\"radio-group\" {...rest}>\n <property name=\"binding\">{binding.toValue()}</property>\n {children}\n </Asset>\n );\n};\n\nexport const RadioItem = (\n props: Partial<WithChildren<WithTemplateTypes<RadioItemAsset>>>\n) => {\n const { children, ...rest } = props;\n return (\n <obj>\n {toJsonProperties(rest)}\n {children}\n </obj>\n );\n};\n\nRadioItem.Label = createSlot({\n name: \"label\",\n TextComp: Text,\n isArray: false,\n wrapInAsset: true,\n});\n\nconst RadioGroupValues = (props: AssetPropsWithChildren<AssetType>) => {\n return (\n <property name=\"values\">\n <array {...props} />\n </property>\n );\n};\n\nRadioGroup.Label = createSlot({\n name: \"label\",\n TextComp: Text,\n isArray: false,\n wrapInAsset: true,\n});\n\nRadioGroup.Values = RadioGroupValues;\nRadioGroupValues.Value = RadioItem;\n","import type { TransformFunction } from \"@player-ui/player\";\nimport { RadioGroupAsset, TransformedRadioGroup } from \"../types\";\n\nexport const radioGroupTransform: TransformFunction<\n RadioGroupAsset,\n TransformedRadioGroup\n> = (asset, options) => {\n return {\n ...asset,\n setRadio(val) {\n if (asset.binding === undefined) {\n return;\n }\n\n return options.data.model.set([[asset.binding, val]]);\n },\n value:\n asset.binding === undefined ? \"\" : options.data.model.get(asset.binding),\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;;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AO,GAAG,OAAO,CACpB;AAEJ;AAEAD,YAAW,YAAQ,6BAAW;AAAA,EAC5B,MAAM;AAAA,EACN,UAAU;AAAA,EACV,SAAS;AAAA,EACT,aAAa;AACf,CAAC;AAEDA,YAAW,SAAS;AACpB,iBAAiB,QAAQ;;;AC9DlB,IAAM,sBAGT,CAAC,OAAO,YAAY;AACtB,SAAO;AAAA,IACL,GAAG;AAAA,IACH,SAAS,KAAK;AACZ,UAAI,MAAM,YAAY,QAAW;AAC/B;AAAA,MACF;AAEA,aAAO,QAAQ,KAAK,MAAM,IAAI,CAAC,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC;AAAA,IACtD;AAAA,IACA,OACE,MAAM,YAAY,SAAY,KAAK,QAAQ,KAAK,MAAM,IAAI,MAAM,OAAO;AAAA,EAC3E;AACF;","names":["RadioGroup","import_react","React","label","import_react","RadioGroup","React"]}
|
package/dist/index.legacy-esm.js
CHANGED
package/dist/index.mjs
CHANGED
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/radio-group/src/component/index.tsx","../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/radio-group/src/dsl/index.tsx","../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/radio-group/src/transform/index.ts"],"sourcesContent":["import React from \"react\";\nimport type { TransformedRadioGroup } from \"../types\";\nimport { RadioGroup, Stack, FormLabel, Radio } from \"@chakra-ui/react\";\nimport { ReactAsset } from \"@player-ui/react\";\n\nexport const RadioGroupComponent = (props: TransformedRadioGroup) => {\n const { id, label, setRadio, values } = props;\n\n return (\n <RadioGroup>\n {label && (\n <FormLabel htmlFor={id}>\n <ReactAsset {...label.asset} />\n </FormLabel>\n )}\n <Stack>\n {values?.map((radioItem) => {\n const onChange: React.ChangeEventHandler<HTMLInputElement> = (e) => {\n setRadio(e.target.value);\n };\n const { value, label } = radioItem;\n\n return (\n <Radio key={value} onChange={onChange} value={value}>\n <ReactAsset {...label.asset} />\n </Radio>\n );\n })}\n </Stack>\n </RadioGroup>\n );\n};\n","import React from \"react\";\nimport {\n AssetPropsWithChildren,\n Asset,\n createSlot,\n BindingTemplateInstance,\n WithTemplateTypes,\n WithChildren,\n toJsonProperties,\n} from \"@player-
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/radio-group/src/component/index.tsx","../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/radio-group/src/dsl/index.tsx","../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/radio-group/src/transform/index.ts"],"sourcesContent":["import React from \"react\";\nimport type { TransformedRadioGroup } from \"../types\";\nimport { RadioGroup, Stack, FormLabel, Radio } from \"@chakra-ui/react\";\nimport { ReactAsset } from \"@player-ui/react\";\n\nexport const RadioGroupComponent = (props: TransformedRadioGroup) => {\n const { id, label, setRadio, values } = props;\n\n return (\n <RadioGroup>\n {label && (\n <FormLabel htmlFor={id}>\n <ReactAsset {...label.asset} />\n </FormLabel>\n )}\n <Stack>\n {values?.map((radioItem) => {\n const onChange: React.ChangeEventHandler<HTMLInputElement> = (e) => {\n setRadio(e.target.value);\n };\n const { value, label } = radioItem;\n\n return (\n <Radio key={value} onChange={onChange} value={value}>\n <ReactAsset {...label.asset} />\n </Radio>\n );\n })}\n </Stack>\n </RadioGroup>\n );\n};\n","import React from \"react\";\nimport {\n AssetPropsWithChildren,\n Asset,\n createSlot,\n BindingTemplateInstance,\n WithTemplateTypes,\n WithChildren,\n toJsonProperties,\n} from \"@player-lang/react-dsl\";\nimport type { Asset as AssetType } from \"@player-ui/player\";\nimport { Text } from \"@devtools-ui/text\";\nimport type { RadioGroupAsset, RadioItemAsset } from \"../types\";\n\nexport const RadioGroup = (\n props: Omit<AssetPropsWithChildren<RadioGroupAsset>, \"binding\"> & {\n /** The binding as a tagged template instance */\n binding: BindingTemplateInstance;\n }\n) => {\n const { children, binding, ...rest } = props;\n\n return (\n <Asset type=\"radio-group\" {...rest}>\n <property name=\"binding\">{binding.toValue()}</property>\n {children}\n </Asset>\n );\n};\n\nexport const RadioItem = (\n props: Partial<WithChildren<WithTemplateTypes<RadioItemAsset>>>\n) => {\n const { children, ...rest } = props;\n return (\n <obj>\n {toJsonProperties(rest)}\n {children}\n </obj>\n );\n};\n\nRadioItem.Label = createSlot({\n name: \"label\",\n TextComp: Text,\n isArray: false,\n wrapInAsset: true,\n});\n\nconst RadioGroupValues = (props: AssetPropsWithChildren<AssetType>) => {\n return (\n <property name=\"values\">\n <array {...props} />\n </property>\n );\n};\n\nRadioGroup.Label = createSlot({\n name: \"label\",\n TextComp: Text,\n isArray: false,\n wrapInAsset: true,\n});\n\nRadioGroup.Values = RadioGroupValues;\nRadioGroupValues.Value = RadioItem;\n","import type { TransformFunction } from \"@player-ui/player\";\nimport { RadioGroupAsset, TransformedRadioGroup } from \"../types\";\n\nexport const radioGroupTransform: TransformFunction<\n RadioGroupAsset,\n TransformedRadioGroup\n> = (asset, options) => {\n return {\n ...asset,\n setRadio(val) {\n if (asset.binding === undefined) {\n return;\n }\n\n return options.data.model.set([[asset.binding, val]]);\n },\n value:\n asset.binding === undefined ? \"\" : options.data.model.get(asset.binding),\n };\n};\n"],"mappings":";AAAA,OAAO,WAAW;AAElB,SAAS,YAAY,OAAO,WAAW,aAAa;AACpD,SAAS,kBAAkB;AAEpB,IAAM,sBAAsB,CAAC,UAAiC;AACnE,QAAM,EAAE,IAAI,OAAO,UAAU,OAAO,IAAI;AAExC,SACE,oCAAC,kBACE,SACC,oCAAC,aAAU,SAAS,MAClB,oCAAC,cAAY,GAAG,MAAM,OAAO,CAC/B,GAEF,oCAAC,aACE,QAAQ,IAAI,CAAC,cAAc;AAC1B,UAAM,WAAuD,CAAC,MAAM;AAClE,eAAS,EAAE,OAAO,KAAK;AAAA,IACzB;AACA,UAAM,EAAE,OAAO,OAAAA,OAAM,IAAI;AAEzB,WACE,oCA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AK,MAAM,IAAI,MAAM,OAAO;AAAA,EAC3E;AACF;","names":["label","React","RadioGroup"]}
|
package/package.json
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
+
"sideEffects": false,
|
|
3
|
+
"files": [
|
|
4
|
+
"dist",
|
|
5
|
+
"src",
|
|
6
|
+
"types"
|
|
7
|
+
],
|
|
2
8
|
"name": "@devtools-ui/radio-group",
|
|
3
|
-
"version": "0.4.0",
|
|
9
|
+
"version": "0.4.1-next.0",
|
|
4
10
|
"main": "dist/cjs/index.cjs",
|
|
5
11
|
"dependencies": {
|
|
6
|
-
"@devtools-ui/text": "0.4.0",
|
|
7
|
-
"@devtools-ui/collection": "0.4.0",
|
|
12
|
+
"@devtools-ui/text": "0.4.1-next.0",
|
|
13
|
+
"@devtools-ui/collection": "0.4.1-next.0",
|
|
8
14
|
"@chakra-ui/react": "^2.8.2",
|
|
9
15
|
"@emotion/react": "^11.11.4",
|
|
10
16
|
"@emotion/styled": "^11.11.0",
|
|
@@ -16,7 +22,6 @@
|
|
|
16
22
|
},
|
|
17
23
|
"module": "dist/index.legacy-esm.js",
|
|
18
24
|
"types": "types/index.d.ts",
|
|
19
|
-
"sideEffects": false,
|
|
20
25
|
"exports": {
|
|
21
26
|
"./package.json": "./package.json",
|
|
22
27
|
"./dist/index.css": "./dist/index.css",
|
|
@@ -26,16 +31,11 @@
|
|
|
26
31
|
"default": "./dist/cjs/index.cjs"
|
|
27
32
|
}
|
|
28
33
|
},
|
|
29
|
-
"files": [
|
|
30
|
-
"dist",
|
|
31
|
-
"src",
|
|
32
|
-
"types"
|
|
33
|
-
],
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@player-
|
|
36
|
-
"@player-ui/asset-transform-plugin": "0.
|
|
37
|
-
"@player-ui/player": "0.
|
|
38
|
-
"@player-ui/react": "0.
|
|
39
|
-
"@player-ui/types": "0.
|
|
35
|
+
"@player-lang/react-dsl": "1.0.1",
|
|
36
|
+
"@player-ui/asset-transform-plugin": "0.15.5",
|
|
37
|
+
"@player-ui/player": "0.15.5",
|
|
38
|
+
"@player-ui/react": "0.15.5",
|
|
39
|
+
"@player-ui/types": "0.15.5"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { describe, expect, test } from "vitest";
|
|
3
|
-
import { render, binding as b } from "@player-
|
|
3
|
+
import { render, binding as b } from "@player-lang/react-dsl";
|
|
4
4
|
import { RadioGroup } from "../";
|
|
5
5
|
|
|
6
6
|
describe("DSL: RadioGroup", () => {
|
package/src/dsl/index.tsx
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
WithTemplateTypes,
|
|
8
8
|
WithChildren,
|
|
9
9
|
toJsonProperties,
|
|
10
|
-
} from "@player-
|
|
10
|
+
} from "@player-lang/react-dsl";
|
|
11
11
|
import type { Asset as AssetType } from "@player-ui/player";
|
|
12
12
|
import { Text } from "@devtools-ui/text";
|
|
13
13
|
import type { RadioGroupAsset, RadioItemAsset } from "../types";
|
package/types/dsl/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { AssetPropsWithChildren, BindingTemplateInstance, WithTemplateTypes, WithChildren } from "@player-
|
|
2
|
+
import { AssetPropsWithChildren, BindingTemplateInstance, WithTemplateTypes, WithChildren } from "@player-lang/react-dsl";
|
|
3
3
|
import type { Asset as AssetType } from "@player-ui/player";
|
|
4
4
|
import type { RadioGroupAsset, RadioItemAsset } from "../types";
|
|
5
5
|
export declare const RadioGroup: {
|