siam-ui-utils 3.0.21 → 3.0.22

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.
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { FormGroup, Input, Label } from "reactstrap";
3
3
  import "./index.css";
4
4
  const CustomInputRadio = ({
@@ -10,29 +10,53 @@ const CustomInputRadio = ({
10
10
  inline,
11
11
  label,
12
12
  name,
13
- onChange
13
+ onChange,
14
+ direction = "row"
14
15
  }) => {
15
- return /* @__PURE__ */ jsxs(
16
+ return /* @__PURE__ */ jsx(
16
17
  FormGroup,
17
18
  {
18
- check: true,
19
19
  inline,
20
20
  className: `custom-radio ${customClassName || ""}`,
21
- children: [
22
- /* @__PURE__ */ jsx(
23
- Input,
24
- {
25
- id,
26
- type: "radio",
27
- name,
28
- checked,
29
- onChange,
30
- disabled,
31
- className
32
- }
33
- ),
34
- /* @__PURE__ */ jsx(Label, { check: true, htmlFor: id, children: label })
35
- ]
21
+ children: /* @__PURE__ */ jsxs(
22
+ "div",
23
+ {
24
+ style: {
25
+ display: "flex",
26
+ flexDirection: direction,
27
+ alignItems: "center",
28
+ justifyContent: "center"
29
+ },
30
+ children: [
31
+ /* @__PURE__ */ jsx(
32
+ Input,
33
+ {
34
+ id,
35
+ type: "radio",
36
+ name,
37
+ checked,
38
+ onChange,
39
+ disabled,
40
+ className
41
+ }
42
+ ),
43
+ /* @__PURE__ */ jsx(
44
+ Label,
45
+ {
46
+ check: true,
47
+ htmlFor: id,
48
+ style: {
49
+ alignItems: "center",
50
+ justifyContent: "center",
51
+ height: "25px",
52
+ width: "25px"
53
+ }
54
+ }
55
+ ),
56
+ /* @__PURE__ */ jsx("div", { children: label })
57
+ ]
58
+ }
59
+ )
36
60
  }
37
61
  );
38
62
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CustomInputRadio.js","sources":["../../src/custom-input/CustomInputRadio.jsx"],"sourcesContent":["import { FormGroup, Label, Input } from 'reactstrap';\r\nimport './index.css';\r\n\r\nexport const CustomInputRadio = ({\r\n className,\r\n customClassName,\r\n checked,\r\n disabled,\r\n id,\r\n inline,\r\n label,\r\n name,\r\n onChange,\r\n}) => {\r\n return (\r\n <FormGroup\r\n check\r\n inline={inline}\r\n className={`custom-radio ${customClassName || ''}`}\r\n >\r\n <Input\r\n id={id}\r\n type=\"radio\"\r\n name={name}\r\n checked={checked}\r\n onChange={onChange}\r\n disabled={disabled}\r\n className={className}\r\n />\r\n <Label check htmlFor={id}>\r\n {label}\r\n </Label>\r\n </FormGroup>\r\n );\r\n};\r\n\r\nexport default CustomInputRadio;\r\n"],"names":[],"mappings":";;;AAGO,MAAM,mBAAmB,CAAC;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAK;AAAA,MACL;AAAA,MACA,WAAW,gBAAgB,mBAAmB,EAAE;AAAA,MAEhD,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC;AAAA,YACA,MAAK;AAAA,YACL;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UAAA;AAAA,QAAA;AAAA,4BAED,OAAA,EAAM,OAAK,MAAC,SAAS,IACnB,UAAA,MAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"CustomInputRadio.js","sources":["../../src/custom-input/CustomInputRadio.jsx"],"sourcesContent":["import { FormGroup, Label, Input } from 'reactstrap';\r\nimport './index.css';\r\n\r\nexport const CustomInputRadio = ({\r\n className,\r\n customClassName,\r\n checked,\r\n disabled,\r\n id,\r\n inline,\r\n label,\r\n name,\r\n onChange,\r\n direction = 'row',\r\n}) => {\r\n return (\r\n <FormGroup\r\n inline={inline}\r\n className={`custom-radio ${customClassName || ''}`}\r\n >\r\n <div\r\n style={{\r\n display: 'flex',\r\n flexDirection: direction,\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n }}\r\n >\r\n <Input\r\n id={id}\r\n type=\"radio\"\r\n name={name}\r\n checked={checked}\r\n onChange={onChange}\r\n disabled={disabled}\r\n className={className}\r\n />\r\n\r\n <Label\r\n check\r\n htmlFor={id}\r\n style={{\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n height: '25px',\r\n width: '25px',\r\n }}\r\n ></Label>\r\n <div>{label}</div>\r\n </div>\r\n </FormGroup>\r\n );\r\n};\r\n\r\nexport default CustomInputRadio;\r\n"],"names":[],"mappings":";;;AAGO,MAAM,mBAAmB,CAAC;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AACd,MAAM;AACJ,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW,gBAAgB,mBAAmB,EAAE;AAAA,MAEhD,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,OAAO;AAAA,YACL,SAAS;AAAA,YACT,eAAe;AAAA,YACf,YAAY;AAAA,YACZ,gBAAgB;AAAA,UAAA;AAAA,UAGlB,UAAA;AAAA,YAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC;AAAA,gBACA,MAAK;AAAA,gBACL;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,cAAA;AAAA,YAAA;AAAA,YAGF;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,OAAK;AAAA,gBACL,SAAS;AAAA,gBACT,OAAO;AAAA,kBACL,YAAY;AAAA,kBACZ,gBAAgB;AAAA,kBAChB,QAAQ;AAAA,kBACR,OAAO;AAAA,gBAAA;AAAA,cACT;AAAA,YAAA;AAAA,YAEF,oBAAC,SAAK,UAAA,MAAA,CAAM;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACd;AAAA,EAAA;AAGN;"}
@@ -91,10 +91,12 @@
91
91
  .custom-radio label {
92
92
  display: inline-flex;
93
93
  align-items: center;
94
+ justify-items: center;
94
95
  cursor: pointer;
95
96
  }
96
97
 
97
98
  .custom-radio label::before {
99
+ position: absolute;
98
100
  content: '';
99
101
  display: inline-block;
100
102
  width: 20px;
@@ -102,11 +104,11 @@
102
104
  border-radius: 50%;
103
105
  border: 2px solid #ced4da;
104
106
  background-color: white;
105
- margin-right: 10px;
106
107
  transition: background-color 0.2s, border-color 0.2s;
107
108
  }
108
109
 
109
110
  .custom-radio input[type='radio']:checked + label::before {
111
+ position: absolute;
110
112
  background-color: #900604;
111
113
  border-color: #900604;
112
114
  }
@@ -114,13 +116,12 @@
114
116
  .custom-radio input[type='radio']:checked + label::after {
115
117
  content: '';
116
118
  position: absolute;
117
- left: 26px;
118
- top: 44%;
119
- transform: translateY(-50%);
120
119
  width: 0.5rem;
121
120
  height: 0.45rem;
122
121
  background-color: white !important;
122
+ transition: translateY(-50%);
123
123
  border-radius: 50%;
124
+ display: inline-block;
124
125
  }
125
126
 
126
127
  /* Estilos específicos para radio buttons deshabilitados */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "siam-ui-utils",
3
- "version": "3.0.21",
3
+ "version": "3.0.22",
4
4
  "keywords": [
5
5
  "ampf-react",
6
6
  "ampf-utils",