@producteca/producteca-ui-kit 1.75.1 → 1.76.1
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 { KeyboardEvent, MouseEvent, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
type ChipVariant = 'primary' | 'success' | 'error' | 'secondary' | 'grey' | '
|
|
3
|
+
type ChipVariant = 'primary' | 'success' | 'error' | 'secondary' | 'grey' | 'lila';
|
|
4
4
|
type ChipSize = 'sm' | 'lg';
|
|
5
5
|
export interface ChipProps {
|
|
6
6
|
text?: string;
|
|
@@ -9,9 +9,10 @@ export interface ChipProps {
|
|
|
9
9
|
onRemove?: () => void;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
variant?: ChipVariant;
|
|
12
|
+
tab?: boolean;
|
|
12
13
|
size?: ChipSize;
|
|
13
14
|
isActive?: boolean;
|
|
14
15
|
onClick?: (event: MouseEvent<HTMLSpanElement> | KeyboardEvent<HTMLSpanElement>) => void;
|
|
15
16
|
}
|
|
16
|
-
export declare const Chip: ({ isActive, title, text, content, onRemove, onClick, disabled, variant, size }: ChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const Chip: ({ isActive, title, text, content, onRemove, onClick, disabled, variant, tab, size }: ChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
export default Chip;
|
package/dist/locales/es.d.ts
CHANGED
|
@@ -10094,6 +10094,7 @@ const success$1 = "chip-module_success_BJKfz";
|
|
|
10094
10094
|
const error$3 = "chip-module_error_an-gm";
|
|
10095
10095
|
const secondary = "chip-module_secondary_3aQ1S";
|
|
10096
10096
|
const primary = "chip-module_primary_maGV7";
|
|
10097
|
+
const lila = "chip-module_lila_K00WY";
|
|
10097
10098
|
const action$1 = "chip-module_action_ByEO0";
|
|
10098
10099
|
const styles$H = {
|
|
10099
10100
|
chip,
|
|
@@ -10110,9 +10111,10 @@ const styles$H = {
|
|
|
10110
10111
|
error: error$3,
|
|
10111
10112
|
secondary,
|
|
10112
10113
|
primary,
|
|
10114
|
+
lila,
|
|
10113
10115
|
action: action$1
|
|
10114
10116
|
};
|
|
10115
|
-
const ChipBase = ({ isActive, title: title2, text: text2, content: content2, onRemove = void 0, onClick = void 0, disabled: disabled2 = false, variant = "primary", size: size2 = "lg" }) => {
|
|
10117
|
+
const ChipBase = ({ isActive, title: title2, text: text2, content: content2, onRemove = void 0, onClick = void 0, disabled: disabled2 = false, variant = "primary", tab: tab2 = false, size: size2 = "lg" }) => {
|
|
10116
10118
|
const canRemove = onRemove && !disabled2;
|
|
10117
10119
|
const isClickable = !!onClick && !disabled2;
|
|
10118
10120
|
const handleKeyDown = (event) => {
|
|
@@ -10124,7 +10126,7 @@ const ChipBase = ({ isActive, title: title2, text: text2, content: content2, onR
|
|
|
10124
10126
|
return /* @__PURE__ */ jsx$1(Grow, { in: !!text2 || !!title2 || !!content2, unmountOnExit: true, children: /* @__PURE__ */ jsxs(
|
|
10125
10127
|
"span",
|
|
10126
10128
|
{
|
|
10127
|
-
className: clsx(styles$H.chip, styles$H[variant], styles$H[size2], { [styles$H.disabled]: disabled2, [styles$H.active]: isActive, [styles$H.clickable]: isClickable }),
|
|
10129
|
+
className: clsx(styles$H.chip, styles$H[variant], styles$H[size2], { [styles$H.tab]: tab2, [styles$H.disabled]: disabled2, [styles$H.active]: isActive, [styles$H.clickable]: isClickable }),
|
|
10128
10130
|
role: isClickable ? "button" : void 0,
|
|
10129
10131
|
tabIndex: isClickable ? 0 : void 0,
|
|
10130
10132
|
onClick: isClickable ? onClick : void 0,
|
|
@@ -20314,7 +20316,9 @@ const es$3 = {
|
|
|
20314
20316
|
onClick: "Callback que se ejecuta al hacer clic en el chip. Cuando se define, el chip se vuelve interactivo (clickable, accesible por teclado)",
|
|
20315
20317
|
disabled: "Deshabilita el chip y oculta el ícono de cerrar",
|
|
20316
20318
|
variant: "Variante visual del chip que cambia el color de fondo (default, success, error, warning, info)",
|
|
20317
|
-
|
|
20319
|
+
tab: "Aplica el estilo de badge para tabs (sin borde, esquinas redondeadas). No modifica el color del variant",
|
|
20320
|
+
size: "Tamaño del chip (sm: pequeño, lg: grande, undefined: tamaño por defecto)",
|
|
20321
|
+
number: "500"
|
|
20318
20322
|
},
|
|
20319
20323
|
warningModal: {
|
|
20320
20324
|
warning: "¡Atención!",
|