innoboxrr-react-form-elements 3.1.0 → 3.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "innoboxrr-react-form-elements",
3
- "version": "3.1.0",
3
+ "version": "3.3.0",
4
4
  "description": "Gemelo React de innoboxrr-form-elements: los mismos componentes, los mismos nombres y el mismo contrato.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -52,7 +52,7 @@
52
52
  "@tinymce/tinymce-react": "^6.3.0",
53
53
  "@uiw/react-codemirror": "^4.25.11",
54
54
  "@yaireo/tagify": "^4.38.0",
55
- "innoboxrr-form-core": "^2.1.0",
55
+ "innoboxrr-form-core": "^2.3.0",
56
56
  "innoboxrr-maskjs": "^2.0.0",
57
57
  "react-colorful": "^5.8.1",
58
58
  "react-phone-number-input": "^3.4.18",
@@ -1,4 +1,5 @@
1
1
  import { useCallback, useMemo, useRef } from 'react'
2
+ import IconComponent from './IconComponent.jsx'
2
3
  import {
3
4
  DndContext,
4
5
  KeyboardSensor,
@@ -132,7 +133,7 @@ export default function DynamicGroupInputComponent({
132
133
  className="cursor-move drag-handle text-slate-400"
133
134
  {...attributes}
134
135
  {...listeners}>
135
- <i className="fa-solid fa-grip-vertical"></i>
136
+ <IconComponent name="drag" />
136
137
  </button>
137
138
  <h4 className="text-md font-semibold text-slate-800 dark:text-slate-100">
138
139
  {itemLabel} #{index + 1}
@@ -149,7 +150,7 @@ export default function DynamicGroupInputComponent({
149
150
  { ...group, __key: `grupo-${nextKey.current++}` },
150
151
  ...keyed.slice(index + 1),
151
152
  ])}>
152
- <i className="fa-solid fa-clone"></i>
153
+ <IconComponent name="copy" />
153
154
  </button>
154
155
 
155
156
  <button
@@ -157,7 +158,7 @@ export default function DynamicGroupInputComponent({
157
158
  aria-label={`${removeButtonLabel} ${index + 1}`}
158
159
  className="text-red-800 dark:text-red-400 text-sm"
159
160
  onClick={() => set(keyed.filter((_, position) => position !== index))}>
160
- <i className="fa-solid fa-trash"></i>
161
+ <IconComponent name="delete" />
161
162
  </button>
162
163
 
163
164
  <button
@@ -166,7 +167,7 @@ export default function DynamicGroupInputComponent({
166
167
  aria-expanded={! group._collapsed}
167
168
  className="hover:text-slate-600 dark:hover:text-slate-300 transition"
168
169
  onClick={() => updateAt(index, '_collapsed', ! group._collapsed)}>
169
- <i className={`fa-solid ${group._collapsed ? 'fa-chevron-up' : 'fa-chevron-down'}`}></i>
170
+ <IconComponent name={group._collapsed ? 'up' : 'down'} />
170
171
  </button>
171
172
  </div>
172
173
  </div>
@@ -1,4 +1,5 @@
1
1
  import { useId, useState } from 'react'
2
+ import IconComponent from './IconComponent.jsx'
2
3
  import { applyMask, isMaskSpec } from 'innoboxrr-maskjs'
3
4
  import Field from './internal/Field.jsx'
4
5
  import useThemeClass from './internal/useThemeClass.js'
@@ -62,7 +63,7 @@ export default function TextInputComponent({
62
63
 
63
64
  return (
64
65
  <Field label={label} help={help} htmlFor={uid}>
65
- {hasIcon ? <span className="fe-field-icon" uk-icon={`icon: ${icon}`}></span> : null}
66
+ {hasIcon ? <span className="fe-field-icon"><IconComponent name={icon} /></span> : null}
66
67
 
67
68
  <div className="fe-input-wrap">
68
69
  <input
@@ -108,7 +109,7 @@ export default function TextInputComponent({
108
109
  className="fe-password-toggle"
109
110
  aria-label={showPassword ? 'Hide password' : 'Show password'}
110
111
  onClick={() => setShowPassword((shown) => ! shown)}>
111
- <i className={showPassword ? 'fa-solid fa-eye-slash' : 'fa-solid fa-eye'}></i>
112
+ <IconComponent name={showPassword ? 'hide' : 'show'} />
112
113
  </button>
113
114
  ) : null}
114
115
  </div>
@@ -20,7 +20,11 @@ export default function FieldLabel({ label, help, htmlFor = undefined }) {
20
20
  <label htmlFor={htmlFor} className={theme.label}>
21
21
  {help ? (
22
22
  <span className={theme.help}>
23
- <i uk-tooltip={`title: ${help}`} className={theme.helpIcon}></i>
23
+ <i
24
+ className={theme.helpIcon}
25
+ data-tooltip={help}
26
+ aria-label={help}
27
+ tabIndex={0}></i>
24
28
  </span>
25
29
  ) : null}
26
30
  {label}