@tpc-mare/mare-ui-components-react 1.0.2 → 1.0.3
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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 The Palace Company
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# @tpc-mare/mare-ui-components-react
|
|
2
|
+
|
|
3
|
+
Adaptador React del Mare Design System — 47 componentes headless sobre
|
|
4
|
+
[Ark UI](https://ark-ui.com), con tema por marca vía CSS variables y Tailwind CSS 4.
|
|
5
|
+
|
|
6
|
+
Mismo sistema de diseño que el adaptador Vue (mismos tokens, mismos estilos base),
|
|
7
|
+
componentes React puros: sin provider, sin registro global, sin wrapper.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @tpc-mare/mare-ui-components-react @ark-ui/react
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`@ark-ui/react` es peer dependency y debe instalarse explícitamente.
|
|
14
|
+
React 18 o 19.
|
|
15
|
+
|
|
16
|
+
## Setup
|
|
17
|
+
|
|
18
|
+
### 1. CSS
|
|
19
|
+
|
|
20
|
+
Los cuatro imports van en tu hoja de estilos global, **en este orden**:
|
|
21
|
+
|
|
22
|
+
```css
|
|
23
|
+
@import 'tailwindcss';
|
|
24
|
+
@import '@tpc-mare/mare-ui-components-react/theme.css';
|
|
25
|
+
@import '@tpc-mare/mare-ui-components-react/styles.css';
|
|
26
|
+
@import '@tpc-mare/mare-ui-components-react/themes/the-palace-company.css';
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
El orden importa: el archivo de marca va **último**, porque carga los valores de
|
|
30
|
+
color que los otros dos referencian en runtime vía CSS variables.
|
|
31
|
+
|
|
32
|
+
| Archivo | Qué hace |
|
|
33
|
+
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
34
|
+
| `theme.css` | Scaffold de Tailwind sin prefijo (`@theme` + `@utility`). Es lo que habilita clases reales como `bg-default` o `rounded-container-m` en **tu propio** código. |
|
|
35
|
+
| `styles.css` | Estilos compilados de los componentes de Mare (prefijados `mare:` internamente, no chocan con tu Tailwind). Incluye las clases `tpc-typography-*`. |
|
|
36
|
+
| `themes/<marca>.css` | Los valores de color. Elige exactamente uno. |
|
|
37
|
+
|
|
38
|
+
Marcas disponibles: `the-palace-company`, `palace`, `le-blanc`, `baglioni`,
|
|
39
|
+
`baglioni-resorts`.
|
|
40
|
+
|
|
41
|
+
**¿Tu proyecto no compila Tailwind?** Omite `theme.css` e importa
|
|
42
|
+
`@tpc-mare/mare-ui-components-react/utilities-standalone.css`: las mismas
|
|
43
|
+
utilidades ya precompiladas, con prefijo `mare-` (`mare-bg-default`,
|
|
44
|
+
`mare-text-default`).
|
|
45
|
+
|
|
46
|
+
### 2. `data-theme` en la raíz
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
function App() {
|
|
50
|
+
return (
|
|
51
|
+
<div data-theme='the-palace-company'>
|
|
52
|
+
<Routes />
|
|
53
|
+
</div>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Sin ese atributo las CSS variables no resuelven y los componentes salen sin color.
|
|
59
|
+
|
|
60
|
+
## Uso
|
|
61
|
+
|
|
62
|
+
Cada componente se importa explícito — no hay registro global:
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
import {
|
|
66
|
+
Button,
|
|
67
|
+
InputText,
|
|
68
|
+
FormField,
|
|
69
|
+
HelperText,
|
|
70
|
+
} from '@tpc-mare/mare-ui-components-react';
|
|
71
|
+
import { useState } from 'react';
|
|
72
|
+
|
|
73
|
+
function LoginForm() {
|
|
74
|
+
const [email, setEmail] = useState('');
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<div className='flex min-h-screen items-center justify-center bg-default px-4'>
|
|
78
|
+
<div className='w-full max-w-md space-y-6 rounded-container-m bg-raised p-8'>
|
|
79
|
+
<h1 className='tpc-typography-title-l text-default'>
|
|
80
|
+
Iniciar sesión
|
|
81
|
+
</h1>
|
|
82
|
+
|
|
83
|
+
<FormField>
|
|
84
|
+
<HelperText>Email</HelperText>
|
|
85
|
+
<InputText
|
|
86
|
+
value={email}
|
|
87
|
+
onValueChange={setEmail}
|
|
88
|
+
type='email'
|
|
89
|
+
/>
|
|
90
|
+
</FormField>
|
|
91
|
+
|
|
92
|
+
<Button
|
|
93
|
+
severity='primary'
|
|
94
|
+
label='Ingresar'
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Subpaths
|
|
103
|
+
|
|
104
|
+
Cada componente tiene su propio entry point, con tipos incluidos:
|
|
105
|
+
|
|
106
|
+
```tsx
|
|
107
|
+
import { Button } from '@tpc-mare/mare-ui-components-react/button';
|
|
108
|
+
import { DatePicker } from '@tpc-mare/mare-ui-components-react/date-picker';
|
|
109
|
+
import { useKeyboardCommands } from '@tpc-mare/mare-ui-components-react/keyboard-commands';
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
El barrel principal también es tree-shakeable, así que los subpaths son
|
|
113
|
+
sobre todo para dejar explícita la dependencia.
|
|
114
|
+
|
|
115
|
+
### Contenido sobre imágenes
|
|
116
|
+
|
|
117
|
+
Para texto encima de una imagen o video, envuelve el contenedor con la variante
|
|
118
|
+
`-media` de tu marca. Adapta **todas** las CSS variables del subárbol:
|
|
119
|
+
|
|
120
|
+
```tsx
|
|
121
|
+
<section data-theme='the-palace-company-media'>
|
|
122
|
+
<img
|
|
123
|
+
src='/hero.jpg'
|
|
124
|
+
alt=''
|
|
125
|
+
/>
|
|
126
|
+
<h1 className='tpc-typography-display-l text-default'>Paradise Awaits</h1>
|
|
127
|
+
</section>
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
No uses `text-white`: es un hack que no reacciona al cambio de marca ni de
|
|
131
|
+
contexto. Para secciones de fondo sólido oscuro sin imagen, usa la variante
|
|
132
|
+
`-brand`.
|
|
133
|
+
|
|
134
|
+
### Iconos
|
|
135
|
+
|
|
136
|
+
Los componentes reciben iconos como `ReactNode`, no como string. Usa la
|
|
137
|
+
librería que quieras:
|
|
138
|
+
|
|
139
|
+
```tsx
|
|
140
|
+
import { IconArrowRight } from '@tabler/icons-react';
|
|
141
|
+
|
|
142
|
+
<Button
|
|
143
|
+
label='Book Now'
|
|
144
|
+
icon={<IconArrowRight />}
|
|
145
|
+
/>;
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Componentes
|
|
149
|
+
|
|
150
|
+
Accordion · Avatar · Badge · Banner · Breadcrumbs · Button · Checkbox ·
|
|
151
|
+
Combobox · ConfirmDialog · Counter · DatePicker · Dialog · Divider · Drawer ·
|
|
152
|
+
ExpandableCounter · FilterChip · FilterChipDropdownMultiple ·
|
|
153
|
+
FilterChipDropdownSingle · FilterChipGroup · FloatingActionButton · ImageItem ·
|
|
154
|
+
ImageSlider · InputNumber · InputOtp · InputText · Menu · Message ·
|
|
155
|
+
MultiSelect · OverlayBadge · Paginator · PanelMenu · Password · ProgressBar ·
|
|
156
|
+
ProgressSpinner · RadioGroup · SearchField · SegmentedControl · SelectField ·
|
|
157
|
+
Skeleton · Slider · Snackbar · Stepper · Switch · Tabs · Tag · TagChip ·
|
|
158
|
+
Textarea
|
|
159
|
+
|
|
160
|
+
La referencia de props de cada uno está en el Storybook:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
pnpm --filter @tpc-mare/mare-ui-components-react storybook # puerto 6100
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## Requisitos
|
|
167
|
+
|
|
168
|
+
| | |
|
|
169
|
+
| --------------- | -------------------------------------------------------------------- |
|
|
170
|
+
| React | `>=18` |
|
|
171
|
+
| `@ark-ui/react` | `>=5.37.0` (peer, instalación explícita) |
|
|
172
|
+
| Tailwind CSS | `^4.1` — opcional, solo si quieres escribir clases como `bg-default` |
|
|
173
|
+
| TypeScript | `^5` — opcional |
|
|
174
|
+
|
|
175
|
+
## Formularios
|
|
176
|
+
|
|
177
|
+
Los componentes interactivos forwardean `ref`, así que funcionan con
|
|
178
|
+
`react-hook-form` tal cual:
|
|
179
|
+
|
|
180
|
+
```tsx
|
|
181
|
+
import { useForm } from 'react-hook-form';
|
|
182
|
+
import { InputText, Button } from '@tpc-mare/mare-ui-components-react';
|
|
183
|
+
|
|
184
|
+
function Form() {
|
|
185
|
+
const { register, handleSubmit } = useForm();
|
|
186
|
+
|
|
187
|
+
return (
|
|
188
|
+
<form onSubmit={handleSubmit(console.log)}>
|
|
189
|
+
<InputText {...register('email')} />
|
|
190
|
+
<Button
|
|
191
|
+
type='submit'
|
|
192
|
+
label='Enviar'
|
|
193
|
+
/>
|
|
194
|
+
</form>
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Los campos de texto (`InputText`, `Textarea`, `Password`, `SearchField`,
|
|
200
|
+
`InputNumber`) funcionan en los dos modos:
|
|
201
|
+
|
|
202
|
+
- **uncontrolled** — omite `value`. El DOM guarda el valor y `defaultValue`
|
|
203
|
+
aplica. Es lo que necesita `register()`.
|
|
204
|
+
- **controlled** — pasa `value` + `onValueChange`. En `InputNumber`, `value={null}`
|
|
205
|
+
significa "controlado y vacío"; omitir `value` por completo es lo que activa
|
|
206
|
+
el modo uncontrolled.
|
|
207
|
+
|
|
208
|
+
Los selects y pickers (`SelectField`, `Combobox`, `MultiSelect`, `DatePicker`,
|
|
209
|
+
`RadioGroup`, `Slider`) son siempre controlados: van con `Controller`. Su `ref`
|
|
210
|
+
apunta al contenedor, para `scrollIntoView` cuando la validación falla.
|
|
211
|
+
|
|
212
|
+
Los presentacionales (`Badge`, `Tag`, `Divider`, `Skeleton`, `Avatar`…) no
|
|
213
|
+
forwardean `ref` — no hay caso de uso que lo pida.
|
|
214
|
+
|
|
215
|
+
## Limitaciones conocidas
|
|
216
|
+
|
|
217
|
+
- **Cobertura de tests parcial.** Hay 70 tests sobre el comportamiento núcleo
|
|
218
|
+
(refs, controlled/uncontrolled, datos async, disabled/loading) pero no una
|
|
219
|
+
suite por componente.
|
|
220
|
+
- **Los `.d.ts` duplican los tipos del core** entre subpaths, porque se
|
|
221
|
+
empaquetan con `rollupTypes`. Pesa en disco y descarga, no en el bundle.
|
|
222
|
+
- **El paquete se publica sin minificar**, a propósito: tu bundler minifica y
|
|
223
|
+
así se puede debuggear dentro de `node_modules`.
|
|
224
|
+
|
|
225
|
+
## Licencia
|
|
226
|
+
|
|
227
|
+
MIT © The Palace Company
|
package/dist/accordion/index.js
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { JSX as JSX_2 } from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
export declare function Accordion({ items, value, defaultValue, onValueChange, multiple, collapsible, }: AccordionProperties): JSX_2.Element;
|
|
5
|
+
|
|
6
|
+
export declare interface AccordionItemData {
|
|
7
|
+
value: string;
|
|
8
|
+
title: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** Divider below this item.
|
|
11
|
+
* @default true */
|
|
12
|
+
divider?: boolean;
|
|
13
|
+
/** Consumer-defined extras (subtitle, content) resolved in the adapter. */
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export declare interface AccordionItemProperties extends AccordionItemData {
|
|
18
|
+
subtitle?: ReactNode;
|
|
19
|
+
content: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export declare interface AccordionProperties {
|
|
23
|
+
items: AccordionItemProperties[];
|
|
24
|
+
/** Controlled expanded item values. Omit to let Ark manage it. */
|
|
25
|
+
value?: string[];
|
|
26
|
+
defaultValue?: string[];
|
|
27
|
+
onValueChange?: (value: string[]) => void;
|
|
28
|
+
/** Whether multiple items can be expanded at once.
|
|
29
|
+
* @default false */
|
|
30
|
+
multiple?: boolean;
|
|
31
|
+
/** Whether an expanded item can be collapsed back by clicking it again.
|
|
32
|
+
* @default true */
|
|
33
|
+
collapsible?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { }
|
|
@@ -1,26 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
*
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import { JSX as JSX_2 } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare function Avatar({ image, alt, label, size, id, }: AvatarProperties): JSX_2.Element;
|
|
4
|
+
|
|
5
|
+
declare const AVATAR_SIZES: readonly ["small", "medium"];
|
|
6
|
+
|
|
7
|
+
export declare interface AvatarProperties {
|
|
8
|
+
/**
|
|
9
|
+
* Image URL. Falls back to the initials derived from `label` while it's
|
|
10
|
+
* loading, missing, or fails to load.
|
|
11
|
+
*/
|
|
12
|
+
image?: string;
|
|
13
|
+
/**
|
|
14
|
+
* `alt` text for the image.
|
|
15
|
+
*/
|
|
16
|
+
alt?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Full name used to derive the fallback initials (e.g. "Tomás Palacio" → "TP").
|
|
19
|
+
*/
|
|
20
|
+
label?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Size variant.
|
|
23
|
+
* @default 'small'
|
|
24
|
+
*/
|
|
25
|
+
size?: AvatarSize;
|
|
26
|
+
/**
|
|
27
|
+
* Unique identifier for the avatar.
|
|
28
|
+
*/
|
|
29
|
+
id?: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export declare type AvatarSize = (typeof AVATAR_SIZES)[number];
|
|
33
|
+
|
|
34
|
+
export { }
|
package/dist/badge.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { JSX as JSX_2 } from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
export declare function Badge({ severity, icon, children, }: BadgeProperties): JSX_2.Element;
|
|
5
|
+
|
|
6
|
+
declare const BADGE_SEVERITIES: readonly ["accent", "danger", "warning", "highlight", "positive"];
|
|
7
|
+
|
|
8
|
+
export declare interface BadgeProperties {
|
|
9
|
+
/** @default 'accent' */
|
|
10
|
+
severity?: BadgeSeverity;
|
|
11
|
+
/** Shown next to (or instead of) `children`. */
|
|
12
|
+
icon?: ReactNode;
|
|
13
|
+
/** The count/label. A bare dot renders when neither this nor `icon` is set. */
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export declare type BadgeSeverity = (typeof BADGE_SEVERITIES)[number];
|
|
18
|
+
|
|
19
|
+
export { }
|
package/dist/banner/index.js
CHANGED
package/dist/banner.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { JSX as JSX_2 } from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
export declare function Banner({ severity, title, icon, disabled, closable, onClose, children, }: BannerProperties): JSX_2.Element;
|
|
5
|
+
|
|
6
|
+
declare const BANNER_SEVERITIES: readonly ["neutral", "brand", "positive", "warning", "danger"];
|
|
7
|
+
|
|
8
|
+
export declare interface BannerProperties {
|
|
9
|
+
/** @default 'neutral' */
|
|
10
|
+
severity?: BannerSeverity;
|
|
11
|
+
title?: string;
|
|
12
|
+
icon?: ReactNode;
|
|
13
|
+
/** @default false */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** @default false */
|
|
16
|
+
closable?: boolean;
|
|
17
|
+
onClose?: () => void;
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export declare type BannerSeverity = (typeof BANNER_SEVERITIES)[number];
|
|
22
|
+
|
|
23
|
+
export { }
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { JSX as JSX_2 } from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
export declare interface BreadcrumbItemData {
|
|
5
|
+
label: string;
|
|
6
|
+
/** Current page — not interactive, distinct visual/behavioral state from disabled. */
|
|
7
|
+
active?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** Consumer-defined extras (icon, href, onClick…) resolved in the adapter. */
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export declare function Breadcrumbs({ items, separator, renderItem, }: BreadcrumbsProperties): JSX_2.Element;
|
|
14
|
+
|
|
15
|
+
export declare interface BreadcrumbsProperties {
|
|
16
|
+
items: BreadcrumbItemData[];
|
|
17
|
+
/** Rendered between items. Defaults to `'/'`, matching the Vue DS. */
|
|
18
|
+
separator?: ReactNode;
|
|
19
|
+
/** Custom render for an item's content (icon + label). Defaults to
|
|
20
|
+
* `item.icon` (if any) + `item.label`. */
|
|
21
|
+
renderItem?: (item: BreadcrumbItemData) => ReactNode;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { }
|
package/dist/button/index.js
CHANGED
package/dist/button.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import { RefAttributes } from 'react';
|
|
5
|
+
|
|
6
|
+
export declare const Button: ForwardRefExoticComponent<ButtonProperties & RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
|
|
8
|
+
declare const BUTTON_SEVERITIES: readonly ["primary", "secondary", "ghost", "danger"];
|
|
9
|
+
|
|
10
|
+
declare const BUTTON_SIZES: readonly ["xsmall", "small", "medium", "large"];
|
|
11
|
+
|
|
12
|
+
export declare interface ButtonProperties extends ForwardedNativeProperties {
|
|
13
|
+
label?: string;
|
|
14
|
+
severity?: ButtonSeverity;
|
|
15
|
+
size?: ButtonSize;
|
|
16
|
+
variant?: ButtonVariant;
|
|
17
|
+
iconOnly?: boolean;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
link?: boolean;
|
|
21
|
+
linkAnimation?: boolean;
|
|
22
|
+
/** Elevation shadow + the taller raised sizing (what makes a FAB a FAB).
|
|
23
|
+
* @default false */
|
|
24
|
+
raised?: boolean;
|
|
25
|
+
/** Fully rounded corners — pill with a label, circle with iconOnly.
|
|
26
|
+
* @default false */
|
|
27
|
+
rounded?: boolean;
|
|
28
|
+
icon?: ReactNode;
|
|
29
|
+
iconPos?: IconPosition;
|
|
30
|
+
children?: ReactNode;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export declare type ButtonSeverity = (typeof BUTTON_SEVERITIES)[number];
|
|
34
|
+
|
|
35
|
+
export declare type ButtonSize = (typeof BUTTON_SIZES)[number];
|
|
36
|
+
|
|
37
|
+
export declare type ButtonVariant = 'solid' | 'bordered';
|
|
38
|
+
|
|
39
|
+
declare type ForwardedNativeProperties = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'style' | 'children' | 'color'>;
|
|
40
|
+
|
|
41
|
+
declare const ICON_POSITIONS: readonly ["left", "right", "top", "bottom"];
|
|
42
|
+
|
|
43
|
+
export declare type IconPosition = (typeof ICON_POSITIONS)[number];
|
|
44
|
+
|
|
45
|
+
export { }
|
package/dist/checkbox/index.js
CHANGED
|
@@ -1,69 +1,79 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ReactNode } from 'react';
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
*
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
*
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
*
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
*
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
*
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
1
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { RefAttributes } from 'react';
|
|
4
|
+
|
|
5
|
+
export declare const Checkbox: ForwardRefExoticComponent<CheckboxProperties & RefAttributes<HTMLInputElement>>;
|
|
6
|
+
|
|
7
|
+
declare const CHECKBOX_SIZES: readonly ["small", "medium", "large"];
|
|
8
|
+
|
|
9
|
+
export declare interface CheckboxProperties {
|
|
10
|
+
/**
|
|
11
|
+
* The controlled checked state.
|
|
12
|
+
*/
|
|
13
|
+
checked?: CheckedState;
|
|
14
|
+
/**
|
|
15
|
+
* Initial checked state (uncontrolled mode).
|
|
16
|
+
*/
|
|
17
|
+
defaultChecked?: CheckedState;
|
|
18
|
+
/**
|
|
19
|
+
* Handler called when checked state changes.
|
|
20
|
+
* Recibe el valor directo, no un objeto `details` — mismo patrón que
|
|
21
|
+
* Switch y que los 26 callbacks del resto del paquete.
|
|
22
|
+
*/
|
|
23
|
+
onCheckedChange?: (checked: CheckedState) => void;
|
|
24
|
+
/**
|
|
25
|
+
* The checkbox label (can also use children).
|
|
26
|
+
*/
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Size variant.
|
|
30
|
+
* @default 'small'
|
|
31
|
+
*/
|
|
32
|
+
size?: CheckboxSize;
|
|
33
|
+
/**
|
|
34
|
+
* Disables interaction.
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Marks the checkbox as invalid (red border/background).
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
invalid?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Makes the checkbox read-only.
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
readOnly?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Marks the checkbox as required for form validation.
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
required?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* The name attribute for form submission.
|
|
55
|
+
*/
|
|
56
|
+
name?: string;
|
|
57
|
+
/**
|
|
58
|
+
* The value submitted with the form when checked.
|
|
59
|
+
* @default 'on'
|
|
60
|
+
*/
|
|
61
|
+
value?: string;
|
|
62
|
+
/**
|
|
63
|
+
* ID of an associated form element.
|
|
64
|
+
*/
|
|
65
|
+
form?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Unique identifier for the checkbox.
|
|
68
|
+
*/
|
|
69
|
+
id?: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export declare type CheckboxSize = (typeof CHECKBOX_SIZES)[number];
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* CheckedState can be boolean or 'indeterminate' (Ark's convention).
|
|
76
|
+
*/
|
|
77
|
+
export declare type CheckedState = boolean | 'indeterminate';
|
|
78
|
+
|
|
79
|
+
export { }
|
package/dist/combobox/index.js
CHANGED