@protonradio/proton-ui 0.6.7 → 0.6.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.
- package/README.md +73 -73
- package/dist/icons.svg +10 -10
- package/dist/index-BCAZu2vD.mjs.map +1 -1
- package/dist/index-Dcfu6hWE.js.map +1 -1
- package/dist/index.cjs.js +11 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +83 -0
- package/dist/index.es.js +4752 -4054
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/utils.cjs.js.map +1 -1
- package/dist/utils.es.js.map +1 -1
- package/package.json +90 -90
package/dist/index.d.ts
CHANGED
|
@@ -146,6 +146,66 @@ declare interface BannerProps extends BannerIconProps, default_2.HTMLAttributes<
|
|
|
146
146
|
|
|
147
147
|
export declare type BannerVariant = "default" | "success" | "warning" | "danger";
|
|
148
148
|
|
|
149
|
+
declare interface BaseInputProps {
|
|
150
|
+
/**
|
|
151
|
+
* onChange handler for the input
|
|
152
|
+
*/
|
|
153
|
+
onChange?: (value: string) => void;
|
|
154
|
+
/** Whether the input is disabled. */
|
|
155
|
+
isDisabled?: boolean;
|
|
156
|
+
/** Description text shown above the input. */
|
|
157
|
+
description?: default_2.ReactNode | string;
|
|
158
|
+
/**
|
|
159
|
+
* The position of the description text.
|
|
160
|
+
* @default "top"
|
|
161
|
+
*/
|
|
162
|
+
descriptionPosition?: "top" | "bottom";
|
|
163
|
+
/** Error state that changes the input's visual style and displays an error message. */
|
|
164
|
+
error?: default_2.ReactNode | string;
|
|
165
|
+
/**
|
|
166
|
+
* Label for the input element.
|
|
167
|
+
* @note When a label is provided, the input will have extra padding, and the label will float above the text input when focused or filled.
|
|
168
|
+
*/
|
|
169
|
+
label?: string;
|
|
170
|
+
/** Test ID for the component. */
|
|
171
|
+
"data-testid"?: string;
|
|
172
|
+
/** Content to display before the input. Typically used for icons. */
|
|
173
|
+
prefix?: default_2.ReactNode;
|
|
174
|
+
/** Content to display after the input. Typically used for icons. */
|
|
175
|
+
suffix?: default_2.ReactNode;
|
|
176
|
+
/**
|
|
177
|
+
* Should the browser's autocomplete be enabled?
|
|
178
|
+
* @external https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
|
|
179
|
+
*/
|
|
180
|
+
autoComplete?: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* Should the input be autofocused?
|
|
183
|
+
* @external https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autofocus
|
|
184
|
+
*/
|
|
185
|
+
autoFocus?: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* The name attribute of the input element.
|
|
188
|
+
* @external https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/name
|
|
189
|
+
*/
|
|
190
|
+
name: string;
|
|
191
|
+
/**
|
|
192
|
+
* The placeholder text to display when the input is empty.
|
|
193
|
+
* @note Placeholder takes precedence over label, if both are provided.
|
|
194
|
+
* @external https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/placeholder
|
|
195
|
+
*/
|
|
196
|
+
placeholder?: string;
|
|
197
|
+
/**
|
|
198
|
+
* The type attribute of the input element.
|
|
199
|
+
* @external https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/type
|
|
200
|
+
*/
|
|
201
|
+
type?: string;
|
|
202
|
+
/**
|
|
203
|
+
* The value of the input.
|
|
204
|
+
* @external https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
|
|
205
|
+
*/
|
|
206
|
+
value?: string;
|
|
207
|
+
}
|
|
208
|
+
|
|
149
209
|
declare const BRAND: {
|
|
150
210
|
PRIMARY: string;
|
|
151
211
|
PRIMARY_LIGHT: string;
|
|
@@ -294,6 +354,11 @@ declare interface IconProps {
|
|
|
294
354
|
color?: string;
|
|
295
355
|
}
|
|
296
356
|
|
|
357
|
+
/**
|
|
358
|
+
* A controlled and customizable input component with support for labels, prefixes, suffixes, and error states.
|
|
359
|
+
*/
|
|
360
|
+
export declare const Input: default_2.ForwardRefExoticComponent<BaseInputProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
361
|
+
|
|
297
362
|
export declare function Popover({ children, state, arrow, offset, ...props }: PopoverProps): JSX_2.Element;
|
|
298
363
|
|
|
299
364
|
/**
|
|
@@ -342,6 +407,24 @@ declare type RGBArray = [number, number, number];
|
|
|
342
407
|
|
|
343
408
|
export { Row }
|
|
344
409
|
|
|
410
|
+
/**
|
|
411
|
+
* A search input component with optional clear functionality and URL parameter sync.
|
|
412
|
+
*/
|
|
413
|
+
export declare const SearchInput: ({ name, placeholder, autoComplete, isClearable, error, defaultValue, value: controlledValue, "data-testid": testId, onChange, onClear, }: SearchInputProps) => JSX_2.Element;
|
|
414
|
+
|
|
415
|
+
declare interface SearchInputProps extends Omit<BaseInputProps, "prefix" | "suffix" | "value" | "onChange" | "description" | "descriptionPosition" | "label"> {
|
|
416
|
+
/** Should the clear button be shown when there is text? */
|
|
417
|
+
isClearable?: boolean;
|
|
418
|
+
/** Called when the input value changes. */
|
|
419
|
+
onChange?: (value: string) => void;
|
|
420
|
+
/** Called when the clear button is clicked. */
|
|
421
|
+
onClear?: () => void;
|
|
422
|
+
/** The initial value of the input. */
|
|
423
|
+
defaultValue?: string;
|
|
424
|
+
/** The current value of the input (for controlled usage) */
|
|
425
|
+
value?: string;
|
|
426
|
+
}
|
|
427
|
+
|
|
345
428
|
export { Section }
|
|
346
429
|
|
|
347
430
|
export declare const Select: {
|