@vector-business-services/cristal-ds-web 0.17.0 → 0.18.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/dist/index.cjs +9 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +35 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -64,7 +64,7 @@ declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttri
|
|
|
64
64
|
|
|
65
65
|
type AutoCompleteVariant = InputVariant;
|
|
66
66
|
type AutoCompleteSize = InputSize;
|
|
67
|
-
interface AutoCompleteProps extends Omit<AutoCompleteProps$1, 'size' | 'variant' | 'invalid' | 'multiple' | 'selectionLimit' | 'selectedItemTemplate' | 'removeTokenIcon' | '
|
|
67
|
+
interface AutoCompleteProps extends Omit<AutoCompleteProps$1, 'size' | 'variant' | 'invalid' | 'multiple' | 'selectionLimit' | 'selectedItemTemplate' | 'removeTokenIcon' | 'dropdownIcon' | 'showEmptyMessage' | 'emptyMessage' | 'loadingIcon' | 'inputClassName' | 'panelClassName' | 'scrollHeight' | 'inputRef' | 'pt' | 'ptOptions' | 'unstyled' | 'children'> {
|
|
68
68
|
/** Type no Figma: Outline (com borda) e Filled (com fundo). */
|
|
69
69
|
variant?: AutoCompleteVariant;
|
|
70
70
|
/** Size no Figma: 32, 36, 42 e 48px de altura do campo. */
|
|
@@ -75,6 +75,14 @@ interface AutoCompleteProps extends Omit<AutoCompleteProps$1, 'size' | 'variant'
|
|
|
75
75
|
hint?: string;
|
|
76
76
|
/** Mensagem de erro: deixa o campo no estado Error e mostra a dica de erro no lugar da dica. */
|
|
77
77
|
error?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Seta à direita do campo (o botão de dropdown do Prime): abre a lista sem digitar, com todas as
|
|
80
|
+
* sugestões (`dropdownMode="blank"`, o padrão) ou filtrando pelo texto (`"current"`).
|
|
81
|
+
* Padrão: false, como no Figma.
|
|
82
|
+
*/
|
|
83
|
+
dropdown?: boolean;
|
|
84
|
+
/** Nome da seta para o leitor de tela. Padrão: "Mostrar opções". */
|
|
85
|
+
dropdownAriaLabel?: string;
|
|
78
86
|
}
|
|
79
87
|
declare const AutoComplete: react.ForwardRefExoticComponent<AutoCompleteProps & react.RefAttributes<HTMLInputElement>>;
|
|
80
88
|
|
package/dist/index.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttri
|
|
|
64
64
|
|
|
65
65
|
type AutoCompleteVariant = InputVariant;
|
|
66
66
|
type AutoCompleteSize = InputSize;
|
|
67
|
-
interface AutoCompleteProps extends Omit<AutoCompleteProps$1, 'size' | 'variant' | 'invalid' | 'multiple' | 'selectionLimit' | 'selectedItemTemplate' | 'removeTokenIcon' | '
|
|
67
|
+
interface AutoCompleteProps extends Omit<AutoCompleteProps$1, 'size' | 'variant' | 'invalid' | 'multiple' | 'selectionLimit' | 'selectedItemTemplate' | 'removeTokenIcon' | 'dropdownIcon' | 'showEmptyMessage' | 'emptyMessage' | 'loadingIcon' | 'inputClassName' | 'panelClassName' | 'scrollHeight' | 'inputRef' | 'pt' | 'ptOptions' | 'unstyled' | 'children'> {
|
|
68
68
|
/** Type no Figma: Outline (com borda) e Filled (com fundo). */
|
|
69
69
|
variant?: AutoCompleteVariant;
|
|
70
70
|
/** Size no Figma: 32, 36, 42 e 48px de altura do campo. */
|
|
@@ -75,6 +75,14 @@ interface AutoCompleteProps extends Omit<AutoCompleteProps$1, 'size' | 'variant'
|
|
|
75
75
|
hint?: string;
|
|
76
76
|
/** Mensagem de erro: deixa o campo no estado Error e mostra a dica de erro no lugar da dica. */
|
|
77
77
|
error?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Seta à direita do campo (o botão de dropdown do Prime): abre a lista sem digitar, com todas as
|
|
80
|
+
* sugestões (`dropdownMode="blank"`, o padrão) ou filtrando pelo texto (`"current"`).
|
|
81
|
+
* Padrão: false, como no Figma.
|
|
82
|
+
*/
|
|
83
|
+
dropdown?: boolean;
|
|
84
|
+
/** Nome da seta para o leitor de tela. Padrão: "Mostrar opções". */
|
|
85
|
+
dropdownAriaLabel?: string;
|
|
78
86
|
}
|
|
79
87
|
declare const AutoComplete: react.ForwardRefExoticComponent<AutoCompleteProps & react.RefAttributes<HTMLInputElement>>;
|
|
80
88
|
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { forwardRef, useRef, useImperativeHandle, useState, Children, isValidElement, useId, useLayoutEffect, useMemo, useCallback, useEffect, useContext, cloneElement } from 'react';
|
|
2
2
|
import { Accordion as Accordion$1, AccordionTab as AccordionTab$1 } from 'primereact/accordion';
|
|
3
|
-
import { WarningCircle, Info, Question, Check, CircleNotch, ArrowLeft, X,
|
|
3
|
+
import { CaretDown, WarningCircle, Info, Question, Check, CircleNotch, ArrowLeft, X, MagnifyingGlass, ArrowsInSimple, ArrowsOutSimple, CaretUp, Funnel, List, DribbbleLogo, SealWarning, XCircle, CheckCircle, Warning, Note, ArrowsInLineHorizontal, SortAscending, SortDescending, DotsThreeVertical, CaretLeft, CaretRight, Trash, CaretDoubleRight, CaretDoubleLeft, GearSix } from '@phosphor-icons/react';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { AutoComplete as AutoComplete$1 } from 'primereact/autocomplete';
|
|
6
6
|
import { Badge as Badge$1 } from 'primereact/badge';
|
|
@@ -134,6 +134,8 @@ var AutoComplete = forwardRef(function AutoComplete2({
|
|
|
134
134
|
label,
|
|
135
135
|
hint,
|
|
136
136
|
error,
|
|
137
|
+
dropdown = false,
|
|
138
|
+
dropdownAriaLabel = "Mostrar op\xE7\xF5es",
|
|
137
139
|
inputId,
|
|
138
140
|
required,
|
|
139
141
|
disabled,
|
|
@@ -148,6 +150,7 @@ var AutoComplete = forwardRef(function AutoComplete2({
|
|
|
148
150
|
const classes = [
|
|
149
151
|
"cr-field",
|
|
150
152
|
"cr-autocomplete",
|
|
153
|
+
dropdown && "cr-autocomplete--dropdown",
|
|
151
154
|
`cr-field--${variant}`,
|
|
152
155
|
`cr-field--${size}`,
|
|
153
156
|
error && "cr-field--error",
|
|
@@ -168,6 +171,9 @@ var AutoComplete = forwardRef(function AutoComplete2({
|
|
|
168
171
|
required,
|
|
169
172
|
disabled,
|
|
170
173
|
scrollHeight: "185px",
|
|
174
|
+
dropdown,
|
|
175
|
+
dropdownAriaLabel,
|
|
176
|
+
dropdownIcon: /* @__PURE__ */ jsx(CaretDown, { className: "cr-autocomplete__dropdown-icon", "aria-hidden": "true" }),
|
|
171
177
|
pt: {
|
|
172
178
|
root: { className: "cr-autocomplete__root" },
|
|
173
179
|
input: {
|
|
@@ -177,6 +183,9 @@ var AutoComplete = forwardRef(function AutoComplete2({
|
|
|
177
183
|
"aria-invalid": error ? true : void 0
|
|
178
184
|
}
|
|
179
185
|
},
|
|
186
|
+
// A seta: o botão de dropdown do Prime, por cima do fim do <input> (que segue sendo a caixa,
|
|
187
|
+
// para a lista continuar alinhada ao campo).
|
|
188
|
+
dropdownButton: { root: { className: "cr-autocomplete__dropdown" } },
|
|
180
189
|
// O Prime mostra um spinner próprio enquanto busca; o Figma não define esse estado.
|
|
181
190
|
loadingIcon: { className: "cr-autocomplete__loader" },
|
|
182
191
|
panel: { className: "cr-lista cr-autocomplete__panel" },
|