@growy/strapi-plugin-encrypted-field 2.0.7 → 2.0.8

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,6 +1,6 @@
1
1
  import React, { useState } from 'react';
2
2
  import { useIntl } from 'react-intl';
3
- import { Field, Flex, IconButton } from '@strapi/design-system';
3
+ import { Field, IconButton } from '@strapi/design-system';
4
4
  import { Eye, EyeStriked, Duplicate } from '@strapi/icons';
5
5
 
6
6
  const Input = (props) => {
@@ -55,30 +55,39 @@ const Input = (props) => {
55
55
  <Field.Label action={labelAction}>
56
56
  {label}
57
57
  </Field.Label>
58
- <Flex gap={2}>
58
+ <div style={{ position: 'relative' }}>
59
59
  <Field.Input
60
60
  type={isVisible ? 'text' : 'password'}
61
61
  placeholder={placeholder}
62
62
  value={value}
63
63
  onChange={handleChange}
64
64
  disabled={disabled}
65
- style={{ flex: 1 }}
65
+ style={{ paddingRight: '80px' }}
66
66
  />
67
- <IconButton
68
- onClick={toggleVisibility}
69
- label={isVisible ? 'Ocultar' : 'Mostrar'}
70
- disabled={disabled}
71
- >
72
- {isVisible ? <EyeStriked /> : <Eye />}
73
- </IconButton>
74
- <IconButton
75
- onClick={handleCopy}
76
- label="Copiar"
77
- disabled={disabled || !value}
78
- >
79
- <Duplicate />
80
- </IconButton>
81
- </Flex>
67
+ <div style={{
68
+ position: 'absolute',
69
+ right: '8px',
70
+ top: '50%',
71
+ transform: 'translateY(-50%)',
72
+ display: 'flex',
73
+ gap: '4px'
74
+ }}>
75
+ <IconButton
76
+ onClick={toggleVisibility}
77
+ label={isVisible ? 'Ocultar' : 'Mostrar'}
78
+ disabled={disabled}
79
+ >
80
+ {isVisible ? <EyeStriked /> : <Eye />}
81
+ </IconButton>
82
+ <IconButton
83
+ onClick={handleCopy}
84
+ label="Copiar"
85
+ disabled={disabled || !value}
86
+ >
87
+ <Duplicate />
88
+ </IconButton>
89
+ </div>
90
+ </div>
82
91
  <Field.Hint />
83
92
  <Field.Error />
84
93
  </Field.Root>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@growy/strapi-plugin-encrypted-field",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "description": "Campo personalizado de texto cifrado para Strapi",
5
5
  "strapi": {
6
6
  "name": "encrypted-field",