@tpc-mare/mare-ui-components-react 1.0.2 → 1.0.3-beta.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/LICENSE +21 -0
- package/README.md +227 -0
- package/dist/accordion/index.js +1 -1
- package/dist/accordion.d.ts +36 -0
- package/dist/{avatar/Avatar.types.d.ts → avatar.d.ts} +34 -26
- package/dist/badge.d.ts +19 -0
- package/dist/banner/index.js +1 -1
- package/dist/banner.d.ts +23 -0
- package/dist/breadcrumbs/index.js +1 -1
- package/dist/breadcrumbs.d.ts +24 -0
- package/dist/button/index.js +1 -1
- package/dist/button.d.ts +45 -0
- package/dist/checkbox/index.js +1 -1
- package/dist/{checkbox/Checkbox.types.d.ts → checkbox.d.ts} +79 -69
- package/dist/combobox/index.js +1 -1
- package/dist/combobox.d.ts +43 -0
- package/dist/confirm-dialog/index.js +1 -1
- package/dist/confirm-dialog.d.ts +34 -0
- package/dist/counter/index.js +1 -1
- package/dist/{counter/Counter.types.d.ts → counter.d.ts} +34 -23
- package/dist/date-picker/index.js +1 -1
- package/dist/{date-picker/DatePicker.types.d.ts → date-picker.d.ts} +76 -52
- package/dist/dialog/index.js +2 -2
- package/dist/{dialog/Dialog.types.d.ts → dialog.d.ts} +74 -55
- package/dist/divider.d.ts +18 -0
- package/dist/drawer/index.js +1 -1
- package/dist/{drawer/Drawer.types.d.ts → drawer.d.ts} +68 -53
- package/dist/expandable-counter/index.js +1 -1
- package/dist/{expandable-counter/ExpandableCounter.types.d.ts → expandable-counter.d.ts} +25 -19
- package/dist/filter-chip/index.js +1 -1
- package/dist/filter-chip-dropdown-multiple/index.js +1 -1
- package/dist/filter-chip-dropdown-multiple.d.ts +42 -0
- package/dist/filter-chip-dropdown-single/index.js +1 -1
- package/dist/filter-chip-dropdown-single.d.ts +40 -0
- package/dist/filter-chip-group.d.ts +27 -0
- package/dist/{filter-chip/FilterChip.types.d.ts → filter-chip.d.ts} +49 -40
- package/dist/floating-action-button/index.js +1 -1
- package/dist/floating-action-button.d.ts +46 -0
- package/dist/image-item.d.ts +15 -0
- package/dist/image-slider/index.js +1 -1
- package/dist/image-slider.d.ts +12 -0
- package/dist/index/index.js +40 -40
- package/dist/index.d.ts +1693 -0
- package/dist/input-number/index.js +1 -1
- package/dist/{input-number/InputNumber.types.d.ts → input-number.d.ts} +42 -30
- package/dist/input-otp/index.js +1 -1
- package/dist/{input-otp/InputOtp.types.d.ts → input-otp.d.ts} +36 -27
- package/dist/input-text/index.js +2 -2
- package/dist/input-text.d.ts +77 -0
- package/dist/keyboard-commands/index.js +51 -31
- package/dist/keyboard-commands.d.ts +264 -0
- package/dist/menu/index.js +1 -1
- package/dist/menu.d.ts +48 -0
- package/dist/message/index.js +1 -1
- package/dist/message.d.ts +28 -0
- package/dist/multi-select/index.js +1 -1
- package/dist/{multi-select/MultiSelect.types.d.ts → multi-select.d.ts} +62 -31
- package/dist/overlay-badge/index.js +1 -1
- package/dist/{overlay-badge/OverlayBadge.types.d.ts → overlay-badge.d.ts} +25 -17
- package/dist/paginator/index.js +1 -1
- package/dist/{paginator/Paginator.types.d.ts → paginator.d.ts} +27 -21
- package/dist/panel-menu/index.js +1 -1
- package/dist/panel-menu.d.ts +29 -0
- package/dist/password/index.js +1 -1
- package/dist/{password/Password.types.d.ts → password.d.ts} +58 -39
- package/dist/{progress-bar/ProgressBar.types.d.ts → progress-bar.d.ts} +45 -38
- package/dist/{progress-spinner/ProgressSpinner.d.ts → progress-spinner.d.ts} +15 -10
- package/dist/radio-group/index.js +1 -1
- package/dist/{radio-group/RadioGroup.types.d.ts → radio-group.d.ts} +81 -62
- package/dist/search-field/index.js +1 -1
- package/dist/search-field.d.ts +55 -0
- package/dist/segmented-control/index.js +1 -1
- package/dist/{segmented-control/SegmentedControl.types.d.ts → segmented-control.d.ts} +70 -54
- package/dist/select-field/index.js +1 -1
- package/dist/select-field.d.ts +40 -0
- package/dist/shared/{Accordion-BSmOrxH6.js → Accordion-QSdlMSst.js} +9 -6
- package/dist/shared/{Banner-D4na_bM8.js → Banner-DMWwNO2K.js} +6 -3
- package/dist/shared/{Breadcrumbs-Cqr3Jitd.js → Breadcrumbs-bcs9_ByY.js} +4 -1
- package/dist/shared/{Button-C2ULmKj3.js → Button-BqFuDnSs.js} +98 -92
- package/dist/shared/{Checkbox-DCq3_MWz.js → Checkbox-DgZAQsbr.js} +94 -87
- package/dist/shared/Combobox-CiaEi_RG.js +148 -0
- package/dist/shared/{ConfirmDialog-cmLTBBNs.js → ConfirmDialog-DHsPafOo.js} +8 -3
- package/dist/shared/{Counter-0siKQRKc.js → Counter-lqywtgF6.js} +25 -27
- package/dist/shared/{DatePicker-DhIWE0V_.js → DatePicker-t6xP4UWu.js} +370 -346
- package/dist/shared/{DialogFooter-Cx7G-GHH.js → DialogFooter-DKFuHOJl.js} +4 -1
- package/dist/shared/{DialogHeader-DdVPFxGf.js → DialogHeader-D0dg5FBI.js} +14 -14
- package/dist/shared/{DrawerFooter-DEb2gqW-.js → DrawerFooter-CGrPQoLH.js} +35 -26
- package/dist/shared/{ExpandableCounter-pPJIrd6L.js → ExpandableCounter-BOCHfuye.js} +23 -22
- package/dist/shared/{FilterChip-TpKF-4vP.js → FilterChip-Cc4BBVz3.js} +21 -21
- package/dist/shared/{FilterChipDropdownMultiple-2mr_Z57i.js → FilterChipDropdownMultiple-DL3mHW9H.js} +20 -15
- package/dist/shared/{FilterChipDropdownSingle-CLmWzX9q.js → FilterChipDropdownSingle-BUrzUAmy.js} +31 -22
- package/dist/shared/FloatingActionButton-Dhqp98s7.js +27 -0
- package/dist/shared/{HelperText-zmUym82m.js → HelperText-C9TsD0wC.js} +1 -0
- package/dist/shared/IconField-Bp2H10B1.js +89 -0
- package/dist/shared/{ImageSlider-Bgb1kNQ4.js → ImageSlider-DT0B5g68.js} +5 -5
- package/dist/shared/InputNumber-CUNq3cPa.js +75 -0
- package/dist/shared/InputOtp-wTUwu1NG.js +75 -0
- package/dist/shared/{Menu-Cv9dU1iA.js → Menu-DBHlDgtQ.js} +5 -2
- package/dist/shared/{Message-CQUdM9rR.js → Message-B36kcrfu.js} +4 -4
- package/dist/shared/MultiSelect-CfKm_FPp.js +248 -0
- package/dist/shared/{OverlayBadge-Dkosm3Il.js → OverlayBadge-CnQI_NE0.js} +1 -0
- package/dist/shared/{Paginator-QTDpAJ-N.js → Paginator-BRQx1GRQ.js} +48 -49
- package/dist/shared/{PanelMenu-BpjNM7O_.js → PanelMenu-Dw-K6H2C.js} +14 -4
- package/dist/shared/Password-BWNvygrO.js +113 -0
- package/dist/shared/RadioGroup-CHgzVvZO.js +145 -0
- package/dist/shared/SearchField-Cuw3MVaD.js +73 -0
- package/dist/shared/{SegmentedControl-BfE3jNM6.js → SegmentedControl-D3znmx9l.js} +4 -1
- package/dist/shared/SelectField-BAuctVIF.js +120 -0
- package/dist/shared/Slider-D_iNiPxa.js +110 -0
- package/dist/shared/{Snackbar-BhORbyt-.js → Snackbar-DP-b4GWx.js} +50 -17
- package/dist/shared/{Stepper-DrKKSn_j.js → Stepper-CudtdHSg.js} +26 -18
- package/dist/shared/Switch-C1dd2rX1.js +114 -0
- package/dist/shared/{Tabs-DuufYBV2.js → Tabs-lGGLALGR.js} +4 -1
- package/dist/shared/{TagChip-CP3aX2_G.js → TagChip-QQ6p0JgU.js} +1 -1
- package/dist/shared/Textarea-CJfNbqGA.js +51 -0
- package/dist/shared/useControllableValue-DhckT_e1.js +13 -0
- package/dist/skeleton.d.ts +30 -0
- package/dist/slider/index.js +1 -1
- package/dist/{slider/Slider.types.d.ts → slider.d.ts} +33 -24
- package/dist/snackbar/index.js +1 -1
- package/dist/{snackbar/Snackbar.types.d.ts → snackbar.d.ts} +63 -42
- package/dist/stepper/index.js +1 -1
- package/dist/stepper.d.ts +38 -0
- package/dist/switch/index.js +1 -1
- package/dist/{switch/Switch.types.d.ts → switch.d.ts} +68 -59
- package/dist/tabs/index.js +1 -1
- package/dist/tabs.d.ts +30 -0
- package/dist/tag-chip/index.js +1 -1
- package/dist/{tag-chip/TagChip.types.d.ts → tag-chip.d.ts} +33 -21
- package/dist/tag.d.ts +23 -0
- package/dist/textarea/index.js +1 -1
- package/dist/textarea.d.ts +26 -0
- package/package.json +15 -8
- package/dist/.storybook/main.d.ts +0 -3
- package/dist/.storybook/manager.d.ts +0 -1
- package/dist/.storybook/preview.d.ts +0 -3
- package/dist/accordion/Accordion.d.ts +0 -2
- package/dist/accordion/Accordion.types.d.ts +0 -20
- package/dist/accordion/index.d.ts +0 -2
- package/dist/avatar/Avatar.d.ts +0 -2
- package/dist/avatar/index.d.ts +0 -2
- package/dist/badge/Badge.d.ts +0 -2
- package/dist/badge/Badge.types.d.ts +0 -11
- package/dist/badge/index.d.ts +0 -2
- package/dist/banner/Banner.d.ts +0 -2
- package/dist/banner/Banner.types.d.ts +0 -15
- package/dist/banner/index.d.ts +0 -2
- package/dist/breadcrumbs/Breadcrumbs.d.ts +0 -2
- package/dist/breadcrumbs/Breadcrumbs.types.d.ts +0 -11
- package/dist/breadcrumbs/index.d.ts +0 -2
- package/dist/button/Button.d.ts +0 -2
- package/dist/button/Button.types.d.ts +0 -24
- package/dist/button/index.d.ts +0 -2
- package/dist/checkbox/Checkbox.d.ts +0 -2
- package/dist/checkbox/index.d.ts +0 -2
- package/dist/combobox/Combobox.d.ts +0 -13
- package/dist/combobox/Combobox.types.d.ts +0 -16
- package/dist/combobox/index.d.ts +0 -2
- package/dist/confirm-dialog/ConfirmDialog.d.ts +0 -2
- package/dist/confirm-dialog/ConfirmDialog.types.d.ts +0 -21
- package/dist/confirm-dialog/index.d.ts +0 -2
- package/dist/counter/Counter.d.ts +0 -2
- package/dist/counter/index.d.ts +0 -2
- package/dist/date-picker/DatePicker.d.ts +0 -3
- package/dist/date-picker/index.d.ts +0 -2
- package/dist/dialog/Dialog.d.ts +0 -2
- package/dist/dialog/DialogFooter.d.ts +0 -2
- package/dist/dialog/DialogHeader.d.ts +0 -2
- package/dist/dialog/index.d.ts +0 -4
- package/dist/divider/Divider.d.ts +0 -2
- package/dist/divider/Divider.types.d.ts +0 -8
- package/dist/divider/index.d.ts +0 -2
- package/dist/drawer/Drawer.d.ts +0 -2
- package/dist/drawer/DrawerFooter.d.ts +0 -2
- package/dist/drawer/DrawerHeader.d.ts +0 -2
- package/dist/drawer/index.d.ts +0 -4
- package/dist/expandable-counter/ExpandableCounter.d.ts +0 -2
- package/dist/expandable-counter/index.d.ts +0 -2
- package/dist/filter-chip/FilterChip.d.ts +0 -2
- package/dist/filter-chip/index.d.ts +0 -2
- package/dist/filter-chip-dropdown-multiple/FilterChipDropdownMultiple.d.ts +0 -9
- package/dist/filter-chip-dropdown-multiple/FilterChipDropdownMultiple.types.d.ts +0 -19
- package/dist/filter-chip-dropdown-multiple/index.d.ts +0 -2
- package/dist/filter-chip-dropdown-single/FilterChipDropdownSingle.d.ts +0 -11
- package/dist/filter-chip-dropdown-single/FilterChipDropdownSingle.types.d.ts +0 -15
- package/dist/filter-chip-dropdown-single/index.d.ts +0 -2
- package/dist/filter-chip-group/FilterChipGroup.d.ts +0 -8
- package/dist/filter-chip-group/FilterChipGroup.types.d.ts +0 -12
- package/dist/filter-chip-group/index.d.ts +0 -2
- package/dist/floating-action-button/FloatingActionButton.d.ts +0 -2
- package/dist/floating-action-button/FloatingActionButton.types.d.ts +0 -9
- package/dist/floating-action-button/index.d.ts +0 -2
- package/dist/image-item/ImageItem.d.ts +0 -2
- package/dist/image-item/ImageItem.types.d.ts +0 -7
- package/dist/image-item/index.d.ts +0 -2
- package/dist/image-slider/ImageSlider.d.ts +0 -2
- package/dist/image-slider/ImageSlider.types.d.ts +0 -6
- package/dist/image-slider/index.d.ts +0 -2
- package/dist/index/index.d.ts +0 -94
- package/dist/input-number/InputNumber.d.ts +0 -2
- package/dist/input-number/index.d.ts +0 -2
- package/dist/input-otp/InputOtp.d.ts +0 -2
- package/dist/input-otp/index.d.ts +0 -2
- package/dist/input-text/CharacterCount.d.ts +0 -5
- package/dist/input-text/FloatLabel.d.ts +0 -6
- package/dist/input-text/FormField.d.ts +0 -8
- package/dist/input-text/HelperText.d.ts +0 -4
- package/dist/input-text/IconField.d.ts +0 -18
- package/dist/input-text/InputText.d.ts +0 -2
- package/dist/input-text/InputText.types.d.ts +0 -14
- package/dist/input-text/field-layout.d.ts +0 -12
- package/dist/input-text/index.d.ts +0 -11
- package/dist/keyboard-commands/index.d.ts +0 -5
- package/dist/keyboard-commands/useKeyboardCommands.d.ts +0 -27
- package/dist/keyboard-commands/useKeyboardNavGrid.d.ts +0 -19
- package/dist/keyboard-commands/useKeyboardNavList.d.ts +0 -17
- package/dist/keyboard-commands/useKeyboardScope.d.ts +0 -20
- package/dist/menu/Menu.d.ts +0 -2
- package/dist/menu/Menu.types.d.ts +0 -19
- package/dist/menu/index.d.ts +0 -2
- package/dist/message/Message.d.ts +0 -2
- package/dist/message/Message.types.d.ts +0 -17
- package/dist/message/index.d.ts +0 -2
- package/dist/multi-select/MultiSelect.d.ts +0 -12
- package/dist/multi-select/index.d.ts +0 -2
- package/dist/overlay-badge/OverlayBadge.d.ts +0 -2
- package/dist/overlay-badge/index.d.ts +0 -2
- package/dist/paginator/Paginator.d.ts +0 -2
- package/dist/paginator/index.d.ts +0 -2
- package/dist/panel-menu/PanelMenu.d.ts +0 -2
- package/dist/panel-menu/PanelMenu.types.d.ts +0 -12
- package/dist/panel-menu/index.d.ts +0 -2
- package/dist/password/Password.d.ts +0 -7
- package/dist/password/index.d.ts +0 -2
- package/dist/progress-bar/ProgressBar.d.ts +0 -2
- package/dist/progress-bar/index.d.ts +0 -2
- package/dist/progress-spinner/index.d.ts +0 -2
- package/dist/radio-group/RadioGroup.d.ts +0 -2
- package/dist/radio-group/index.d.ts +0 -2
- package/dist/search-field/SearchField.d.ts +0 -2
- package/dist/search-field/SearchField.types.d.ts +0 -26
- package/dist/search-field/index.d.ts +0 -2
- package/dist/segmented-control/SegmentedControl.d.ts +0 -2
- package/dist/segmented-control/index.d.ts +0 -2
- package/dist/select-field/SelectField.d.ts +0 -14
- package/dist/select-field/SelectField.types.d.ts +0 -11
- package/dist/select-field/index.d.ts +0 -2
- package/dist/shared/Combobox-DrkeDMW0.js +0 -139
- package/dist/shared/FloatingActionButton-BWB5Taeg.js +0 -28
- package/dist/shared/IconCheck-DzZA6b2U.js +0 -5
- package/dist/shared/IconChevronDown-ev2ML7Ex.js +0 -5
- package/dist/shared/IconChevronRight-DEIDRsvg.js +0 -7
- package/dist/shared/IconField-CqKydKep.js +0 -81
- package/dist/shared/IconMinus-fS_GL0Et.js +0 -5
- package/dist/shared/IconSearch-CgM6jEUh.js +0 -5
- package/dist/shared/IconX-CpPADKjZ.js +0 -5
- package/dist/shared/InputNumber-nxus9h5s.js +0 -64
- package/dist/shared/InputOtp-BxBc6Vhs.js +0 -73
- package/dist/shared/MultiSelect-DlaYWcPo.js +0 -248
- package/dist/shared/Password-D4PRaleH.js +0 -97
- package/dist/shared/RadioGroup-B8CXU8-l.js +0 -139
- package/dist/shared/SearchField-DIsFhJ22.js +0 -64
- package/dist/shared/SelectField-CcnbnPEi.js +0 -121
- package/dist/shared/Slider-Cl9PyH2q.js +0 -102
- package/dist/shared/Switch-B5DSQLFL.js +0 -106
- package/dist/shared/Textarea-DHJIWBRM.js +0 -42
- package/dist/shared/createReactComponent-Cb6Pzf10.js +0 -48
- package/dist/shared/useMediaQuery.d.ts +0 -5
- package/dist/skeleton/Skeleton.d.ts +0 -2
- package/dist/skeleton/Skeleton.types.d.ts +0 -20
- package/dist/skeleton/index.d.ts +0 -2
- package/dist/slider/Slider.d.ts +0 -2
- package/dist/slider/index.d.ts +0 -2
- package/dist/snackbar/Snackbar.d.ts +0 -3
- package/dist/snackbar/Snackbar.test.d.ts +0 -1
- package/dist/snackbar/index.d.ts +0 -2
- package/dist/stepper/Stepper.d.ts +0 -2
- package/dist/stepper/Stepper.types.d.ts +0 -18
- package/dist/stepper/index.d.ts +0 -2
- package/dist/switch/Switch.d.ts +0 -2
- package/dist/switch/index.d.ts +0 -2
- package/dist/tabs/Tabs.d.ts +0 -10
- package/dist/tabs/Tabs.types.d.ts +0 -7
- package/dist/tabs/index.d.ts +0 -2
- package/dist/tag/Tag.d.ts +0 -2
- package/dist/tag/Tag.types.d.ts +0 -11
- package/dist/tag/index.d.ts +0 -2
- package/dist/tag-chip/TagChip.d.ts +0 -2
- package/dist/tag-chip/index.d.ts +0 -2
- package/dist/textarea/Textarea.d.ts +0 -2
- package/dist/textarea/Textarea.types.d.ts +0 -15
- package/dist/textarea/index.d.ts +0 -2
- package/dist/vite.config.d.ts +0 -2
|
@@ -1,30 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
2
|
+
import { RefAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
declare const INPUT_TEXT_SIZES: readonly ["small", "medium"];
|
|
5
|
+
|
|
6
|
+
export declare const InputNumber: ForwardRefExoticComponent<InputNumberProperties & RefAttributes<HTMLInputElement>>;
|
|
7
|
+
|
|
8
|
+
export declare interface InputNumberProperties {
|
|
9
|
+
/** Valor numérico controlado. `null` = campo vacío. Omítelo por completo
|
|
10
|
+
* para dejar el campo uncontrolled. */
|
|
11
|
+
value?: number | null;
|
|
12
|
+
/** Valor inicial cuando el campo es uncontrolled (sin `value`). */
|
|
13
|
+
defaultValue?: number | null;
|
|
14
|
+
/** Change handler — receives the next number, or `null` when cleared. */
|
|
15
|
+
onValueChange?: (value: number | null) => void;
|
|
16
|
+
size?: InputNumberSize;
|
|
17
|
+
rounded?: boolean;
|
|
18
|
+
invalid?: boolean;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
readOnly?: boolean;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
id?: string;
|
|
23
|
+
name?: string;
|
|
24
|
+
/** Minimum allowed value. */
|
|
25
|
+
min?: number;
|
|
26
|
+
/** Maximum allowed value. */
|
|
27
|
+
max?: number;
|
|
28
|
+
/** Step for keyboard/scrub increments. @default 1 */
|
|
29
|
+
step?: number;
|
|
30
|
+
/** Intl.NumberFormat options — currency, percent, unit, decimals, grouping. */
|
|
31
|
+
formatOptions?: Intl.NumberFormatOptions;
|
|
32
|
+
/** BCP 47 locale used for formatting/parsing. */
|
|
33
|
+
locale?: string;
|
|
34
|
+
/** Increment/decrement the value with the mouse wheel while focused. */
|
|
35
|
+
allowMouseWheel?: boolean;
|
|
36
|
+
/** Clamp the value to min/max when the field loses focus. @default true */
|
|
37
|
+
clampValueOnBlur?: boolean;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export declare type InputNumberSize = (typeof INPUT_TEXT_SIZES)[number];
|
|
41
|
+
|
|
42
|
+
export { }
|
package/dist/input-otp/index.js
CHANGED
|
@@ -1,27 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
2
|
+
import { RefAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
declare const INPUT_OTP_SIZES: readonly ["small", "medium", "large"];
|
|
5
|
+
|
|
6
|
+
export declare const InputOtp: ForwardRefExoticComponent<InputOtpProperties & RefAttributes<HTMLInputElement>>;
|
|
7
|
+
|
|
8
|
+
export declare interface InputOtpProperties {
|
|
9
|
+
/** Number of digit boxes to render. */
|
|
10
|
+
length?: number;
|
|
11
|
+
/** Controlled value, one character per digit. Omit to let Ark manage it. */
|
|
12
|
+
value?: string;
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
onValueChange?: (value: string) => void;
|
|
15
|
+
/** Fired once all digits are filled with a valid value. */
|
|
16
|
+
onComplete?: (value: string) => void;
|
|
17
|
+
size?: InputOtpSize;
|
|
18
|
+
/** Masks each digit like `type="password"`. */
|
|
19
|
+
mask?: boolean;
|
|
20
|
+
/** Restricts input to digits only. Set `false` for alphanumeric codes. */
|
|
21
|
+
integerOnly?: boolean;
|
|
22
|
+
/** Placeholder shown in each empty box. Defaults to '' (blank box) — Ark's
|
|
23
|
+
* own default is '○', which the Mare design doesn't use. */
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
invalid?: boolean;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
readOnly?: boolean;
|
|
28
|
+
required?: boolean;
|
|
29
|
+
autoFocus?: boolean;
|
|
30
|
+
name?: string;
|
|
31
|
+
id?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export declare type InputOtpSize = (typeof INPUT_OTP_SIZES)[number];
|
|
35
|
+
|
|
36
|
+
export { }
|
package/dist/input-text/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as o, a as r } from "../shared/IconField-
|
|
2
|
-
import { C as s, F as l, a as F, H as p } from "../shared/HelperText-
|
|
1
|
+
import { I as o, a as r } from "../shared/IconField-Bp2H10B1.js";
|
|
2
|
+
import { C as s, F as l, a as F, H as p } from "../shared/HelperText-C9TsD0wC.js";
|
|
3
3
|
export {
|
|
4
4
|
s as CharacterCount,
|
|
5
5
|
l as FloatLabel,
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
2
|
+
import { InputHTMLAttributes } from 'react';
|
|
3
|
+
import { JSX as JSX_2 } from 'react';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
import { RefAttributes } from 'react';
|
|
6
|
+
|
|
7
|
+
export declare function CharacterCount({ value, max }: CharacterCountProperties): JSX_2.Element;
|
|
8
|
+
|
|
9
|
+
export declare interface CharacterCountProperties {
|
|
10
|
+
value: string;
|
|
11
|
+
max: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export declare function FloatLabel({ label, children }: FloatLabelProperties): JSX_2.Element;
|
|
15
|
+
|
|
16
|
+
export declare interface FloatLabelProperties {
|
|
17
|
+
label: string;
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export declare function FormField({ invalid, disabled, required, children, }: FormFieldProperties): JSX_2.Element;
|
|
22
|
+
|
|
23
|
+
export declare interface FormFieldProperties {
|
|
24
|
+
invalid?: boolean;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
required?: boolean;
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare type ForwardedNativeProperties = Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'defaultValue' | 'size' | 'className' | 'style'>;
|
|
31
|
+
|
|
32
|
+
export declare function HelperText({ children }: {
|
|
33
|
+
children?: ReactNode;
|
|
34
|
+
}): JSX_2.Element;
|
|
35
|
+
|
|
36
|
+
declare const ICON_FIELD_POSITIONS: readonly ["left", "right"];
|
|
37
|
+
|
|
38
|
+
export declare function IconField({ icon, position, disabled, onIconClick, iconLabel, children, }: IconFieldProperties): JSX_2.Element;
|
|
39
|
+
|
|
40
|
+
declare type IconFieldPosition = (typeof ICON_FIELD_POSITIONS)[number];
|
|
41
|
+
|
|
42
|
+
export declare interface IconFieldProperties {
|
|
43
|
+
icon: ReactNode;
|
|
44
|
+
position?: IconFieldPosition;
|
|
45
|
+
/** Dims the icon to match a disabled sibling input. IconField can't see
|
|
46
|
+
* that prop on its own (it lives on the input, not on IconField) — pass
|
|
47
|
+
* it through explicitly when composing (see SearchField). @default false */
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
/** Makes the icon a real click target (a `<button>`, not a decorative
|
|
50
|
+
* `<span>`). @default undefined (decorative) */
|
|
51
|
+
onIconClick?: () => void;
|
|
52
|
+
/** Accessible name for the button, when `onIconClick` is set. */
|
|
53
|
+
iconLabel?: string;
|
|
54
|
+
children?: ReactNode;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare const INPUT_TEXT_SIZES: readonly ["small", "medium"];
|
|
58
|
+
|
|
59
|
+
export declare const InputText: ForwardRefExoticComponent<InputTextProperties & RefAttributes<HTMLInputElement>>;
|
|
60
|
+
|
|
61
|
+
export declare interface InputTextProperties extends ForwardedNativeProperties {
|
|
62
|
+
/** Valor controlado. Omítelo para dejar el campo uncontrolled (el DOM
|
|
63
|
+
* guarda el valor y `defaultValue` aplica). */
|
|
64
|
+
value?: string;
|
|
65
|
+
/** Valor inicial cuando el campo es uncontrolled (sin `value`). */
|
|
66
|
+
defaultValue?: string;
|
|
67
|
+
/** Controlled change handler — receives the next string value. */
|
|
68
|
+
onValueChange?: (value: string) => void;
|
|
69
|
+
size?: InputTextSize;
|
|
70
|
+
rounded?: boolean;
|
|
71
|
+
invalid?: boolean;
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export declare type InputTextSize = (typeof INPUT_TEXT_SIZES)[number];
|
|
76
|
+
|
|
77
|
+
export { }
|
|
@@ -398,7 +398,7 @@ function Oe(e) {
|
|
|
398
398
|
function Re(e) {
|
|
399
399
|
!e.hasAttribute("tabindex") && !xe.has(e.tagName.toLowerCase()) && e.setAttribute("tabindex", "0");
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function _e(e, t, o, r, i) {
|
|
402
402
|
const s = t.map((p) => ({
|
|
403
403
|
keys: p.keys,
|
|
404
404
|
...p.description ? { description: p.description } : {}
|
|
@@ -411,10 +411,10 @@ function He(e, t, o, r, i) {
|
|
|
411
411
|
};
|
|
412
412
|
e.setAttribute(me, JSON.stringify(u));
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function He(e, t) {
|
|
415
415
|
Re(e);
|
|
416
416
|
const o = De(t.commands);
|
|
417
|
-
if (o && e.setAttribute("aria-keyshortcuts", o), (t.commands.length > 0 || (t.hintCommands?.length ?? 0) > 0) &&
|
|
417
|
+
if (o && e.setAttribute("aria-keyshortcuts", o), (t.commands.length > 0 || (t.hintCommands?.length ?? 0) > 0) && _e(
|
|
418
418
|
e,
|
|
419
419
|
t.commands,
|
|
420
420
|
t.depth,
|
|
@@ -451,7 +451,7 @@ function Ie(e) {
|
|
|
451
451
|
scrollBehavior: e.scrollBehavior
|
|
452
452
|
};
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function H(e) {
|
|
455
455
|
if (!P()) return null;
|
|
456
456
|
let t = e.parentElement;
|
|
457
457
|
for (; t && t !== document.body; ) {
|
|
@@ -468,11 +468,13 @@ function Fe(e) {
|
|
|
468
468
|
return /(auto|scroll)/.test(t) || /(auto|scroll)/.test(o);
|
|
469
469
|
}
|
|
470
470
|
function $(e, t) {
|
|
471
|
-
return t.container ? t.container === "parent" ?
|
|
471
|
+
return t.container ? t.container === "parent" ? H(e) : typeof t.container == "string" ? e.querySelector(t.container) ?? H(e) : t.container ?? H(e) : Fe(e) ? e : H(e);
|
|
472
472
|
}
|
|
473
473
|
function et(e = {}) {
|
|
474
474
|
const t = ae(), o = e.depth ?? 1, r = e.visible ?? !0;
|
|
475
|
-
return N(() => (r ? be(t, o) : te(t), () =>
|
|
475
|
+
return N(() => (r ? be(t, o) : te(t), () => {
|
|
476
|
+
te(t);
|
|
477
|
+
}), [t, o, r]), { scopeId: t };
|
|
476
478
|
}
|
|
477
479
|
function tt(e, t = {}) {
|
|
478
480
|
const o = ae(), r = t.depth ?? 0, i = ye(
|
|
@@ -494,7 +496,7 @@ function tt(e, t = {}) {
|
|
|
494
496
|
const a = h();
|
|
495
497
|
if (!a) return;
|
|
496
498
|
const f = u.current;
|
|
497
|
-
|
|
499
|
+
He(a, {
|
|
498
500
|
commands: f.commands ?? [],
|
|
499
501
|
depth: r,
|
|
500
502
|
context: f.hintContext,
|
|
@@ -510,15 +512,18 @@ function tt(e, t = {}) {
|
|
|
510
512
|
if (!(a instanceof KeyboardEvent) || !p.current) return;
|
|
511
513
|
const f = u.current, k = v.current, K = e.current;
|
|
512
514
|
if (!K) return;
|
|
513
|
-
const
|
|
514
|
-
if (
|
|
515
|
+
const _ = K instanceof HTMLElement ? K : null;
|
|
516
|
+
if (_ && Oe(_)) return;
|
|
515
517
|
const J = ge(
|
|
516
518
|
f.triggerOn,
|
|
517
519
|
w.current,
|
|
518
520
|
a
|
|
519
521
|
), q = J ? { keydownModifiers: J } : void 0;
|
|
520
|
-
if (k &&
|
|
521
|
-
const F = $(
|
|
522
|
+
if (k && _) {
|
|
523
|
+
const F = $(
|
|
524
|
+
_,
|
|
525
|
+
k
|
|
526
|
+
);
|
|
522
527
|
if (F) {
|
|
523
528
|
const x = (k.scrollUpKeys ?? ["ArrowUp", "PageUp"]).map((C) => g(C)), Q = (k.scrollDownKeys ?? ["ArrowDown", "PageDown"]).map((C) => g(C)), U = x.some(
|
|
524
529
|
(C) => E(a, C, q)
|
|
@@ -579,7 +584,13 @@ function tt(e, t = {}) {
|
|
|
579
584
|
const k = $(f, a);
|
|
580
585
|
k && (k.scrollTop = D.current.top, k.scrollLeft = D.current.left);
|
|
581
586
|
}
|
|
582
|
-
const n = A((a) =>
|
|
587
|
+
const n = A((a) => {
|
|
588
|
+
O(a);
|
|
589
|
+
}).current, b = A(() => {
|
|
590
|
+
c();
|
|
591
|
+
}).current, d = A(() => {
|
|
592
|
+
y();
|
|
593
|
+
}).current;
|
|
583
594
|
function L() {
|
|
584
595
|
if (!u.current.autoFocus) return;
|
|
585
596
|
const a = h();
|
|
@@ -589,15 +600,15 @@ function tt(e, t = {}) {
|
|
|
589
600
|
}
|
|
590
601
|
function S(a) {
|
|
591
602
|
const f = u.current, k = f.capture ?? !1;
|
|
592
|
-
for (const
|
|
593
|
-
a.addEventListener(
|
|
603
|
+
for (const _ of re(f.triggerOn))
|
|
604
|
+
a.addEventListener(_, n, { capture: k });
|
|
594
605
|
const K = a instanceof HTMLElement ? a : null;
|
|
595
606
|
K && f.scrollable && (K.addEventListener("blur", b, !0), K.addEventListener("focus", d, !0)), p.current && (M(), L());
|
|
596
607
|
}
|
|
597
608
|
function R(a) {
|
|
598
609
|
const f = u.current, k = f.capture ?? !1;
|
|
599
|
-
for (const
|
|
600
|
-
a.removeEventListener(
|
|
610
|
+
for (const _ of re(f.triggerOn))
|
|
611
|
+
a.removeEventListener(_, n, { capture: k });
|
|
601
612
|
const K = a instanceof HTMLElement ? a : null;
|
|
602
613
|
K && f.scrollable && (K.removeEventListener("blur", b, !0), K.removeEventListener("focus", d, !0)), T(K ?? void 0);
|
|
603
614
|
}
|
|
@@ -629,12 +640,14 @@ function ot(e) {
|
|
|
629
640
|
function D(n, b = !1) {
|
|
630
641
|
const d = s.current;
|
|
631
642
|
if (!d || n < 0) return;
|
|
632
|
-
const L = d.children[n], S = L?.matches(
|
|
643
|
+
const L = d.children[n], S = L?.matches(
|
|
644
|
+
'[role="option"], [data-kbd-nav-item], li'
|
|
645
|
+
) ? L : [
|
|
633
646
|
...d.querySelectorAll(
|
|
634
647
|
'[role="option"], [data-kbd-nav-item], li'
|
|
635
648
|
)
|
|
636
649
|
].at(n) ?? void 0;
|
|
637
|
-
S === void 0 || !(
|
|
650
|
+
S === void 0 || !(H(S) ?? (d.scrollHeight > d.clientHeight ? d : null)) || S.scrollIntoView({
|
|
638
651
|
block: "nearest",
|
|
639
652
|
inline: "nearest",
|
|
640
653
|
behavior: b ? "instant" : W() ? "auto" : "smooth"
|
|
@@ -687,12 +700,14 @@ function ot(e) {
|
|
|
687
700
|
n.preventDefault(), r.current.onSelect?.(a, m), r.current.onActivate?.(a, m);
|
|
688
701
|
}
|
|
689
702
|
}
|
|
690
|
-
const c = A(
|
|
691
|
-
|
|
692
|
-
).current;
|
|
703
|
+
const c = A((n) => {
|
|
704
|
+
O(n);
|
|
705
|
+
}).current;
|
|
693
706
|
N(() => {
|
|
694
707
|
if (l)
|
|
695
|
-
return l.addEventListener("keydown", c), () =>
|
|
708
|
+
return l.addEventListener("keydown", c), () => {
|
|
709
|
+
l.removeEventListener("keydown", c);
|
|
710
|
+
};
|
|
696
711
|
}, [l, c]);
|
|
697
712
|
const y = r.current.items[t] ?? null;
|
|
698
713
|
return {
|
|
@@ -732,7 +747,7 @@ function rt(e) {
|
|
|
732
747
|
const L = d.querySelectorAll(
|
|
733
748
|
'[role="gridcell"], [data-kbd-nav-cell]'
|
|
734
749
|
)[c.col];
|
|
735
|
-
!L || !(
|
|
750
|
+
!L || !(H(L) ?? (n.scrollHeight > n.clientHeight ? n : null)) || L.scrollIntoView({
|
|
736
751
|
block: "nearest",
|
|
737
752
|
inline: "nearest",
|
|
738
753
|
behavior: y ? "instant" : W() ? "auto" : "smooth"
|
|
@@ -770,7 +785,10 @@ function rt(e) {
|
|
|
770
785
|
return;
|
|
771
786
|
}
|
|
772
787
|
if (E(c, Je)) {
|
|
773
|
-
c.preventDefault(), h(
|
|
788
|
+
c.preventDefault(), h(
|
|
789
|
+
{ row: n, col: r.current.cols - 1 },
|
|
790
|
+
c.repeat
|
|
791
|
+
);
|
|
774
792
|
return;
|
|
775
793
|
}
|
|
776
794
|
if (!c.repeat && Qe.some((d) => E(c, d))) {
|
|
@@ -779,12 +797,14 @@ function rt(e) {
|
|
|
779
797
|
r.current.onSelect?.(d), r.current.onActivate?.(d);
|
|
780
798
|
}
|
|
781
799
|
}
|
|
782
|
-
const O = A(
|
|
783
|
-
|
|
784
|
-
).current;
|
|
800
|
+
const O = A((c) => {
|
|
801
|
+
T(c);
|
|
802
|
+
}).current;
|
|
785
803
|
return N(() => {
|
|
786
804
|
if (l)
|
|
787
|
-
return l.addEventListener("keydown", O), () =>
|
|
805
|
+
return l.addEventListener("keydown", O), () => {
|
|
806
|
+
l.removeEventListener("keydown", O);
|
|
807
|
+
};
|
|
788
808
|
}, [l, O]), { focused: t, containerRef: p, focus: h, isFocused: M };
|
|
789
809
|
}
|
|
790
810
|
export {
|
|
@@ -795,12 +815,12 @@ export {
|
|
|
795
815
|
Ze as buildParsedChordLists,
|
|
796
816
|
de as detachTooltips,
|
|
797
817
|
Re as ensureTabindex,
|
|
798
|
-
|
|
818
|
+
H as findScrollableAncestor,
|
|
799
819
|
Ce as formatKeyDescriptor,
|
|
800
820
|
j as getActiveDepth,
|
|
801
821
|
ge as getKeydownModifiersForKeyup,
|
|
802
|
-
|
|
803
|
-
|
|
822
|
+
He as injectAriaOnElement,
|
|
823
|
+
_e as injectKbdHintAttribute,
|
|
804
824
|
P as isBrowser,
|
|
805
825
|
Oe as isElementDisabled,
|
|
806
826
|
Y as isMac,
|