@appcorp/app-corp-vista 0.2.62 → 0.2.63

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.
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.VistaRadioV1 = void 0;
7
7
  var react_1 = __importDefault(require("react"));
8
8
  var VistaRadioV1 = function (_a) {
9
- var description = _a.description, handleOnChange = _a.handleOnChange, list = _a.list, selectedValue = _a.selectedValue, title = _a.title;
9
+ var description = _a.description, handleOnChange = _a.handleOnChange, id = _a.id, list = _a.list, selectedValue = _a.selectedValue, title = _a.title;
10
10
  return (react_1.default.createElement("fieldset", null,
11
11
  react_1.default.createElement("legend", { className: "text-sm/6 font-semibold text-gray-900 dark:text-white" }, title),
12
12
  react_1.default.createElement("p", { className: "mt-1 text-sm/6 text-gray-600 dark:text-gray-200" }, description),
@@ -17,12 +17,12 @@ var VistaRadioV1 = function (_a) {
17
17
  })
18
18
  .sort(function (a, b) { return a.order - b.order; })
19
19
  .map(function (_a) {
20
- var id = _a.id, label = _a.label, value = _a.value;
21
- return (react_1.default.createElement("div", { key: id, className: "flex items-center" },
22
- react_1.default.createElement("input", { checked: selectedValue === value, className: "relative size-4 appearance-none rounded-full border border-gray-300 bg-white before:absolute before:inset-1 before:rounded-full before:bg-white not-checked:before:hidden checked:border-primary checked:bg-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary disabled:border-gray-300 disabled:bg-gray-100 disabled:before:bg-gray-400 forced-colors:appearance-auto forced-colors:before:hidden", id: id, name: id, onChange: function (e) {
20
+ var _id = _a.id, label = _a.label, value = _a.value;
21
+ return (react_1.default.createElement("div", { key: _id, className: "flex items-center" },
22
+ react_1.default.createElement("input", { checked: selectedValue === value, className: "relative size-4 appearance-none rounded-full border border-gray-300 bg-white before:absolute before:inset-1 before:rounded-full before:bg-white not-checked:before:hidden checked:border-primary checked:bg-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary disabled:border-gray-300 disabled:bg-gray-100 disabled:before:bg-gray-400 forced-colors:appearance-auto forced-colors:before:hidden", id: _id, name: _id, onChange: function (e) {
23
23
  return handleOnChange(id, e.target.value);
24
24
  }, type: "radio", value: value }),
25
- react_1.default.createElement("label", { htmlFor: id, className: "ml-3 block text-sm/6 font-medium text-gray-900 dark:text-white" }, label)));
25
+ react_1.default.createElement("label", { htmlFor: _id, className: "ml-3 block text-sm/6 font-medium text-gray-900 dark:text-white" }, label)));
26
26
  }))));
27
27
  };
28
28
  exports.VistaRadioV1 = VistaRadioV1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/app-corp-vista",
3
- "version": "0.2.62",
3
+ "version": "0.2.63",
4
4
  "scripts": {
5
5
  "build": "yarn clean && yarn build:ts && cp package.json lib && cp README.md lib",
6
6
  "build:next": "next build",
@@ -1,5 +1,7 @@
1
1
  export interface VistaRadioV1Props {
2
2
  description: string;
3
+ handleOnChange: (k: string, v: string) => void;
4
+ id: string;
3
5
  list: {
4
6
  id: string;
5
7
  label: string;
@@ -9,5 +11,4 @@ export interface VistaRadioV1Props {
9
11
  }[];
10
12
  selectedValue: string;
11
13
  title: string;
12
- handleOnChange: (k: string, v: string) => void;
13
14
  }