@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
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as v, useMemo as N } from "react";
|
|
4
|
+
import { createListCollection as I, SelectRoot as C, SelectLabel as z, SelectControl as T, SelectTrigger as j, SelectContext as _, SelectValueText as $, SelectClearTrigger as D, SelectIndicator as F, SelectPositioner as L, SelectContent as R, SelectItem as V, SelectItemText as M, SelectItemIndicator as P } from "@ark-ui/react/select";
|
|
5
|
+
import { IconX as X, IconChevronDown as q, IconCheck as A } from "@tabler/icons-react";
|
|
6
|
+
import { o as B } from "./index-ByQ37VXf.js";
|
|
7
|
+
const E = ["small", "medium"], G = {
|
|
8
|
+
small: "mare:h-10",
|
|
9
|
+
medium: "mare:h-12"
|
|
10
|
+
}, H = {
|
|
11
|
+
small: "mare:tpc-typography-body-s",
|
|
12
|
+
medium: "mare:tpc-typography-body-m"
|
|
13
|
+
}, J = (r) => `
|
|
14
|
+
mare:group mare:w-full mare:flex mare:items-center mare:justify-between mare:gap-3
|
|
15
|
+
${G[r]}
|
|
16
|
+
mare:px-3 mare:cursor-pointer
|
|
17
|
+
mare:rounded-input mare:border mare:border-strong mare:bg-default
|
|
18
|
+
mare:text-default ${H[r]}
|
|
19
|
+
mare:ark-open:outline-solid mare:ark-open:outline-2 mare:ark-open:outline-accent mare:ark-open:-outline-offset-2
|
|
20
|
+
mare:ark-disabled:text-disabled mare:ark-disabled:border-disabled-default mare:ark-disabled:cursor-not-allowed
|
|
21
|
+
mare:data-[invalid]:outline-solid mare:data-[invalid]:outline-2 mare:data-[invalid]:outline-danger mare:data-[invalid]:-outline-offset-2
|
|
22
|
+
`, l = "mare:flex-auto mare:text-left mare:truncate mare:data-[placeholder-shown]:text-weak", K = "mare:flex mare:items-center mare:shrink-0 mare:text-lg mare:transition-transform mare:ark-open:rotate-180 mare:text-default", Q = "mare:flex mare:items-center mare:shrink-0 mare:text-base mare:cursor-pointer mare:text-default mare:hover:text-weak", U = "mare:flex mare:items-center mare:shrink-0 mare:text-weak mare:[&>svg]:size-5", W = `
|
|
23
|
+
mare:flex mare:flex-col mare:gap-0.5 mare:p-1
|
|
24
|
+
mare:rounded-input mare:border mare:border-default mare:bg-raised
|
|
25
|
+
mare:shadow-[0_2px_6px_0_rgba(0,0,0,0.16)]
|
|
26
|
+
mare:max-h-72 mare:overflow-y-auto
|
|
27
|
+
mare:min-w-[var(--reference-width)]
|
|
28
|
+
mare:z-50
|
|
29
|
+
`, Y = `
|
|
30
|
+
mare:group/option mare:flex mare:items-center mare:justify-between mare:gap-2
|
|
31
|
+
mare:w-full mare:min-h-8 mare:py-2 mare:px-3 mare:cursor-pointer mare:rounded-menu-item
|
|
32
|
+
mare:tpc-typography-body-s mare:text-default
|
|
33
|
+
mare:ark-highlighted:bg-hover
|
|
34
|
+
mare:ark-selected:bg-accent-weak mare:ark-selected:text-accent
|
|
35
|
+
mare:ark-disabled:text-disabled mare:ark-disabled:cursor-not-allowed
|
|
36
|
+
`, Z = "mare:flex mare:items-center mare:text-accent", O = "mare:tpc-typography-label-s mare:text-default mare:mb-1.5 mare:block", le = v(function({
|
|
37
|
+
value: i = null,
|
|
38
|
+
onValueChange: u,
|
|
39
|
+
/* Default a [] aunque el tipo diga que es requerido: `items={data}`
|
|
40
|
+
* con data de un fetch sin resolver llega `undefined` en el primer
|
|
41
|
+
* render y el .map() de abajo tiraba pantalla blanca. */
|
|
42
|
+
options: t = [],
|
|
43
|
+
placeholder: o = "Select…",
|
|
44
|
+
size: f = "medium",
|
|
45
|
+
disabled: p = !1,
|
|
46
|
+
invalid: h = !1,
|
|
47
|
+
clearable: x = !1,
|
|
48
|
+
label: s,
|
|
49
|
+
leadingIcon: n,
|
|
50
|
+
indicator: b,
|
|
51
|
+
clearIcon: g,
|
|
52
|
+
checkIcon: k,
|
|
53
|
+
renderValue: c,
|
|
54
|
+
renderOption: d
|
|
55
|
+
}, S) {
|
|
56
|
+
const w = B(f, E, "medium"), y = N(
|
|
57
|
+
() => I({
|
|
58
|
+
items: t,
|
|
59
|
+
itemToValue: (a) => a.value,
|
|
60
|
+
itemToString: (a) => a.label,
|
|
61
|
+
isItemDisabled: (a) => !!a.disabled
|
|
62
|
+
}),
|
|
63
|
+
[t]
|
|
64
|
+
);
|
|
65
|
+
return /* @__PURE__ */ m(
|
|
66
|
+
C,
|
|
67
|
+
{
|
|
68
|
+
ref: S,
|
|
69
|
+
collection: y,
|
|
70
|
+
value: i == null ? [] : [i],
|
|
71
|
+
disabled: p,
|
|
72
|
+
invalid: h,
|
|
73
|
+
onValueChange: (a) => u?.(a.value[0] ?? null),
|
|
74
|
+
children: [
|
|
75
|
+
s && /* @__PURE__ */ e(z, { className: O, children: s }),
|
|
76
|
+
/* @__PURE__ */ e(T, { children: /* @__PURE__ */ e(j, { asChild: !0, children: /* @__PURE__ */ m("div", { className: J(w), children: [
|
|
77
|
+
n && /* @__PURE__ */ e("span", { className: U, children: n }),
|
|
78
|
+
c ? /* @__PURE__ */ e(_, { children: (a) => a.selectedItems.length > 0 ? /* @__PURE__ */ e("span", { className: l, children: c(
|
|
79
|
+
a.selectedItems[0]
|
|
80
|
+
) }) : /* @__PURE__ */ e(
|
|
81
|
+
"span",
|
|
82
|
+
{
|
|
83
|
+
className: `${l} mare:text-weak`,
|
|
84
|
+
children: o
|
|
85
|
+
}
|
|
86
|
+
) }) : /* @__PURE__ */ e(
|
|
87
|
+
$,
|
|
88
|
+
{
|
|
89
|
+
className: l,
|
|
90
|
+
placeholder: o
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
x && /* @__PURE__ */ e(D, { className: Q, children: g ?? /* @__PURE__ */ e(X, { size: "1em" }) }),
|
|
94
|
+
/* @__PURE__ */ e(F, { className: K, children: b ?? /* @__PURE__ */ e(q, { size: "1em" }) })
|
|
95
|
+
] }) }) }),
|
|
96
|
+
/* @__PURE__ */ e(L, { children: /* @__PURE__ */ e(R, { className: W, children: t.map((a) => /* @__PURE__ */ m(
|
|
97
|
+
V,
|
|
98
|
+
{
|
|
99
|
+
item: a,
|
|
100
|
+
className: Y,
|
|
101
|
+
children: [
|
|
102
|
+
/* @__PURE__ */ e(M, { children: d ? d(a) : a.label }),
|
|
103
|
+
/* @__PURE__ */ e(
|
|
104
|
+
P,
|
|
105
|
+
{
|
|
106
|
+
className: Z,
|
|
107
|
+
children: k ?? /* @__PURE__ */ e(A, { size: "1em" })
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
a.value
|
|
113
|
+
)) }) })
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
});
|
|
118
|
+
export {
|
|
119
|
+
le as S
|
|
120
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { jsx as l, jsxs as k } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import { Slider as r } from "@ark-ui/react/slider";
|
|
4
|
+
import { o as x } from "./index-ByQ37VXf.js";
|
|
5
|
+
const v = `
|
|
6
|
+
mare:flex mare:items-center mare:gap-2
|
|
7
|
+
mare:ark-horizontal:w-full mare:ark-horizontal:min-w-64
|
|
8
|
+
mare:ark-vertical:flex-col mare:ark-vertical:h-50
|
|
9
|
+
mare:ark-disabled:opacity-50 mare:ark-disabled:pointer-events-none
|
|
10
|
+
`, _ = `
|
|
11
|
+
mare:relative mare:flex mare:flex-1 mare:items-center
|
|
12
|
+
mare:h-8 mare:w-full
|
|
13
|
+
mare:ark-vertical:flex-col mare:ark-vertical:w-8 mare:ark-vertical:h-full
|
|
14
|
+
`, z = `
|
|
15
|
+
mare:relative mare:flex-1 mare:overflow-hidden
|
|
16
|
+
mare:bg-neutral-weak mare:rounded-xs
|
|
17
|
+
|
|
18
|
+
mare:before:content-[''] mare:before:absolute mare:before:inset-0
|
|
19
|
+
mare:before:bg-repeat
|
|
20
|
+
|
|
21
|
+
mare:ark-horizontal:h-[2px]
|
|
22
|
+
mare:ark-horizontal:before:bg-[image:linear-gradient(to_right,transparent_calc(100%-1px),var(--color-border-default)_0%)]
|
|
23
|
+
mare:ark-horizontal:before:bg-[length:var(--step-tick-size)_100%]
|
|
24
|
+
|
|
25
|
+
mare:ark-vertical:w-[3px] mare:ark-vertical:h-full
|
|
26
|
+
mare:ark-vertical:before:bg-[image:linear-gradient(to_bottom,transparent_calc(100%-1px),var(--color-border-default)_0%)]
|
|
27
|
+
mare:ark-vertical:before:bg-[length:100%_var(--step-tick-size)]
|
|
28
|
+
`, w = `
|
|
29
|
+
mare:bg-accent mare:rounded-xs
|
|
30
|
+
|
|
31
|
+
mare:ark-horizontal:h-full
|
|
32
|
+
mare:ark-vertical:w-full
|
|
33
|
+
|
|
34
|
+
mare:ark-disabled:bg-neutral!
|
|
35
|
+
mare:ark-invalid:border mare:ark-invalid:border-danger
|
|
36
|
+
`, N = `
|
|
37
|
+
mare:flex mare:items-center mare:justify-center
|
|
38
|
+
mare:h-8 mare:w-8 mare:rounded-full
|
|
39
|
+
mare:bg-raised mare:border mare:border-default
|
|
40
|
+
mare:shadow-[0px_10px_15px_-3px_rgba(0,0,0,0.10),0px_4px_6px_-2px_rgba(0,0,0,0.05)]
|
|
41
|
+
mare:outline-0
|
|
42
|
+
mare:cursor-grab mare:touch-none
|
|
43
|
+
mare:hover:scale-110
|
|
44
|
+
mare:ark-dragging:cursor-grabbing
|
|
45
|
+
`, S = `
|
|
46
|
+
mare:sr-only
|
|
47
|
+
`, y = (a, o = 0, t = 100) => {
|
|
48
|
+
const e = t - o;
|
|
49
|
+
if (!(!a || a <= 0 || e <= 0) && !(e / a > 20))
|
|
50
|
+
return `${Number((a / e * 100).toFixed(4))}%`;
|
|
51
|
+
}, j = ["horizontal", "vertical"], F = p(
|
|
52
|
+
function({
|
|
53
|
+
value: o = [0],
|
|
54
|
+
onValueChange: t,
|
|
55
|
+
min: e = 0,
|
|
56
|
+
max: m = 100,
|
|
57
|
+
step: i = 1,
|
|
58
|
+
orientation: s = "horizontal",
|
|
59
|
+
disabled: d = !1,
|
|
60
|
+
invalid: f = !1,
|
|
61
|
+
id: b,
|
|
62
|
+
name: h
|
|
63
|
+
}, g) {
|
|
64
|
+
const u = x(
|
|
65
|
+
s,
|
|
66
|
+
j,
|
|
67
|
+
"horizontal"
|
|
68
|
+
);
|
|
69
|
+
return /* @__PURE__ */ l(
|
|
70
|
+
r.Root,
|
|
71
|
+
{
|
|
72
|
+
ref: g,
|
|
73
|
+
value: o,
|
|
74
|
+
onValueChange: (n) => t?.(n.value),
|
|
75
|
+
min: e,
|
|
76
|
+
max: m,
|
|
77
|
+
step: i,
|
|
78
|
+
orientation: u,
|
|
79
|
+
disabled: d,
|
|
80
|
+
invalid: f,
|
|
81
|
+
id: b,
|
|
82
|
+
name: h,
|
|
83
|
+
className: v,
|
|
84
|
+
style: {
|
|
85
|
+
"--step-tick-size": y(i, e, m)
|
|
86
|
+
},
|
|
87
|
+
children: /* @__PURE__ */ k(r.Control, { className: _, children: [
|
|
88
|
+
/* @__PURE__ */ l(r.Track, { className: z, children: /* @__PURE__ */ l(r.Range, { className: w }) }),
|
|
89
|
+
o.map((n, c) => /* @__PURE__ */ l(
|
|
90
|
+
r.Thumb,
|
|
91
|
+
{
|
|
92
|
+
index: c,
|
|
93
|
+
className: N,
|
|
94
|
+
children: /* @__PURE__ */ l(
|
|
95
|
+
r.HiddenInput,
|
|
96
|
+
{
|
|
97
|
+
className: S
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
},
|
|
101
|
+
c
|
|
102
|
+
))
|
|
103
|
+
] })
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
export {
|
|
109
|
+
F as S
|
|
110
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as o, jsxs as y } from "react/jsx-runtime";
|
|
2
3
|
import { Portal as u } from "@ark-ui/react/portal";
|
|
3
4
|
import { Toaster as b, Toast as m, createToaster as h } from "@ark-ui/react/toast";
|
|
4
5
|
import { o as i } from "./index-ByQ37VXf.js";
|
|
5
|
-
import { B as x } from "./Button-
|
|
6
|
+
import { B as x } from "./Button-BqFuDnSs.js";
|
|
6
7
|
const k = `
|
|
7
8
|
mare:group mare:w-full mare:min-w-[20rem] mare:max-w-[429px]
|
|
8
9
|
mare:relative mare:overflow-hidden mare:rounded-tpc-snackbar
|
|
@@ -61,7 +62,10 @@ function j(a = {}) {
|
|
|
61
62
|
priority: R(e, !!r.action),
|
|
62
63
|
duration: l(r.life),
|
|
63
64
|
action: r.action,
|
|
64
|
-
meta: {
|
|
65
|
+
meta: {
|
|
66
|
+
leading: r.leading,
|
|
67
|
+
progressBar: r.progressBar
|
|
68
|
+
}
|
|
65
69
|
});
|
|
66
70
|
},
|
|
67
71
|
dismiss(r) {
|
|
@@ -71,8 +75,12 @@ function j(a = {}) {
|
|
|
71
75
|
const n = t.getVisibleToasts().find((g) => g.id === r);
|
|
72
76
|
t.update(r, {
|
|
73
77
|
description: e.detail ?? n?.description,
|
|
74
|
-
type: e.severity ? i(
|
|
75
|
-
|
|
78
|
+
type: e.severity ? i(
|
|
79
|
+
e.severity,
|
|
80
|
+
d,
|
|
81
|
+
"contrast"
|
|
82
|
+
) : n?.type,
|
|
83
|
+
duration: e.life == null ? n?.duration : l(e.life),
|
|
76
84
|
action: e.action ?? n?.action,
|
|
77
85
|
meta: {
|
|
78
86
|
leading: e.leading ?? n?.meta?.leading,
|
|
@@ -86,21 +94,46 @@ function j(a = {}) {
|
|
|
86
94
|
function z({ controller: a, portalContainer: t }) {
|
|
87
95
|
const s = a[p];
|
|
88
96
|
if (!s)
|
|
89
|
-
throw new Error(
|
|
97
|
+
throw new Error(
|
|
98
|
+
"Snackbar: controller was not created by createSnackbar()."
|
|
99
|
+
);
|
|
90
100
|
return /* @__PURE__ */ o(u, { container: t, children: /* @__PURE__ */ o(b, { toaster: s, children: (r) => {
|
|
91
101
|
const e = r.meta?.leading, n = !!r.meta?.progressBar;
|
|
92
|
-
return /* @__PURE__ */ y(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
return /* @__PURE__ */ y(
|
|
103
|
+
m.Root,
|
|
104
|
+
{
|
|
105
|
+
className: k,
|
|
106
|
+
children: [
|
|
107
|
+
e ? /* @__PURE__ */ o("div", { className: f, children: e }) : null,
|
|
108
|
+
/* @__PURE__ */ o(
|
|
109
|
+
m.Description,
|
|
110
|
+
{
|
|
111
|
+
className: _(!!e),
|
|
112
|
+
children: r.description
|
|
113
|
+
}
|
|
114
|
+
),
|
|
115
|
+
r.action ? /* @__PURE__ */ o("div", { className: v, children: /* @__PURE__ */ o(m.ActionTrigger, { asChild: !0, children: /* @__PURE__ */ o(
|
|
116
|
+
x,
|
|
117
|
+
{
|
|
118
|
+
severity: "ghost",
|
|
119
|
+
link: !0,
|
|
120
|
+
size: "xsmall",
|
|
121
|
+
children: r.action.label
|
|
122
|
+
}
|
|
123
|
+
) }) }) : null,
|
|
124
|
+
n ? /* @__PURE__ */ o(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
className: w,
|
|
128
|
+
style: {
|
|
129
|
+
"--mare-snackbar-life": `${r.duration}ms`
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
) : null
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
r.id
|
|
136
|
+
);
|
|
104
137
|
} }) });
|
|
105
138
|
}
|
|
106
139
|
export {
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { jsxs as m, jsx as e, Fragment as b } from "react/jsx-runtime";
|
|
2
2
|
import { Steps as a } from "@ark-ui/react/steps";
|
|
3
3
|
import { o as k } from "./index-ByQ37VXf.js";
|
|
4
|
-
import {
|
|
5
|
-
import { I as y, a as N } from "./IconChevronRight-DEIDRsvg.js";
|
|
4
|
+
import { IconCheck as v, IconChevronLeft as y, IconChevronRight as N } from "@tabler/icons-react";
|
|
6
5
|
const w = ["horizontal", "vertical"], z = "mare:flex mare:ark-horizontal:flex-col mare:ark-vertical:flex-row mare:gap-4 mare:w-full", j = `
|
|
7
6
|
mare:hidden mare:sm:flex mare:gap-2 mare:overflow-x-auto
|
|
8
7
|
mare:ark-horizontal:flex-row mare:ark-horizontal:items-center mare:ark-horizontal:justify-between
|
|
9
8
|
mare:ark-vertical:flex-col mare:ark-vertical:items-start
|
|
10
|
-
`, C = "mare:relative mare:flex mare:items-center mare:ark-vertical:items-start mare:gap-3 mare:flex-1 mare:last:flex-none",
|
|
9
|
+
`, C = "mare:relative mare:flex mare:items-center mare:ark-vertical:items-start mare:gap-3 mare:flex-1 mare:last:flex-none", S = `
|
|
11
10
|
mare:group mare:flex mare:items-center mare:gap-3 mare:bg-transparent mare:border-none
|
|
12
11
|
mare:text-left mare:cursor-pointer mare:rounded-md mare:outline-none
|
|
13
12
|
mare:disabled:cursor-not-allowed mare:disabled:opacity-50
|
|
14
|
-
`,
|
|
13
|
+
`, I = (t) => `
|
|
15
14
|
mare:group mare:flex mare:items-center mare:justify-center mare:shrink-0 mare:relative
|
|
16
15
|
mare:size-8 mare:rounded-full mare:tpc-typography-label-s
|
|
17
16
|
mare:ark-incomplete:bg-neutral-weak mare:ark-incomplete:text-weak
|
|
@@ -45,20 +44,23 @@ function A({ items: t }) {
|
|
|
45
44
|
/* @__PURE__ */ e(a.NextTrigger, { className: o, children: /* @__PURE__ */ e(N, { size: "1em" }) })
|
|
46
45
|
] });
|
|
47
46
|
}
|
|
48
|
-
function
|
|
49
|
-
|
|
47
|
+
function J({
|
|
48
|
+
/* Default a [] aunque el tipo diga que es requerido: `items={data}`
|
|
49
|
+
* con data de un fetch sin resolver llega `undefined` en el primer
|
|
50
|
+
* render y el .map() de abajo tiraba pantalla blanca. */
|
|
51
|
+
items: t = [],
|
|
50
52
|
step: n,
|
|
51
53
|
defaultStep: c,
|
|
52
|
-
onStepChange:
|
|
53
|
-
onStepComplete:
|
|
54
|
-
linear:
|
|
55
|
-
orientation:
|
|
54
|
+
onStepChange: i,
|
|
55
|
+
onStepComplete: s,
|
|
56
|
+
linear: d = !1,
|
|
57
|
+
orientation: p = "horizontal",
|
|
56
58
|
indicatorVariant: u = "default",
|
|
57
59
|
isStepValid: f,
|
|
58
60
|
isStepSkippable: h
|
|
59
61
|
}) {
|
|
60
|
-
const x =
|
|
61
|
-
|
|
62
|
+
const x = I(u), g = k(
|
|
63
|
+
p,
|
|
62
64
|
w,
|
|
63
65
|
"horizontal"
|
|
64
66
|
);
|
|
@@ -69,12 +71,12 @@ function K({
|
|
|
69
71
|
count: t.length,
|
|
70
72
|
step: n,
|
|
71
73
|
defaultStep: c,
|
|
72
|
-
linear:
|
|
74
|
+
linear: d,
|
|
73
75
|
orientation: g,
|
|
74
76
|
isStepValid: f,
|
|
75
77
|
isStepSkippable: h,
|
|
76
|
-
onStepChange: (r) =>
|
|
77
|
-
onStepComplete:
|
|
78
|
+
onStepChange: (r) => i?.(r.step),
|
|
79
|
+
onStepComplete: s,
|
|
78
80
|
children: [
|
|
79
81
|
/* @__PURE__ */ e(a.List, { className: j, children: t.map((r, l) => /* @__PURE__ */ m(
|
|
80
82
|
a.Item,
|
|
@@ -82,10 +84,16 @@ function K({
|
|
|
82
84
|
index: l,
|
|
83
85
|
className: C,
|
|
84
86
|
children: [
|
|
85
|
-
/* @__PURE__ */ m(a.Trigger, { className:
|
|
87
|
+
/* @__PURE__ */ m(a.Trigger, { className: S, children: [
|
|
86
88
|
/* @__PURE__ */ e(a.Indicator, { className: x, children: r.icon ? /* @__PURE__ */ e("span", { className: T, children: r.icon }) : /* @__PURE__ */ m(b, { children: [
|
|
87
89
|
/* @__PURE__ */ e("span", { className: R, children: /* @__PURE__ */ e(v, {}) }),
|
|
88
|
-
/* @__PURE__ */ e(
|
|
90
|
+
/* @__PURE__ */ e(
|
|
91
|
+
"span",
|
|
92
|
+
{
|
|
93
|
+
className: L,
|
|
94
|
+
children: l + 1
|
|
95
|
+
}
|
|
96
|
+
)
|
|
89
97
|
] }) }),
|
|
90
98
|
/* @__PURE__ */ m("span", { className: B, children: [
|
|
91
99
|
/* @__PURE__ */ e("span", { className: F, children: r.title }),
|
|
@@ -112,5 +120,5 @@ function K({
|
|
|
112
120
|
);
|
|
113
121
|
}
|
|
114
122
|
export {
|
|
115
|
-
|
|
123
|
+
J as S
|
|
116
124
|
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { jsxs as f, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as g } from "react";
|
|
3
|
+
import { Switch as a } from "@ark-ui/react/switch";
|
|
4
|
+
import { o as k } from "./index-ByQ37VXf.js";
|
|
5
|
+
const x = ["small", "medium", "large"], w = `
|
|
6
|
+
mare:inline-flex mare:items-center mare:gap-2
|
|
7
|
+
mare:select-none mare:cursor-pointer
|
|
8
|
+
mare:ark-disabled:cursor-default
|
|
9
|
+
`, y = `
|
|
10
|
+
mare:inline-flex mare:shrink-0 mare:items-center mare:px-0.5
|
|
11
|
+
mare:rounded-full mare:border mare:border-transparent
|
|
12
|
+
mare:bg-neutral
|
|
13
|
+
mare:shadow-[0_1px_2px_0_rgba(18,18,23,0.05)]
|
|
14
|
+
mare:transition-colors mare:duration-200
|
|
15
|
+
|
|
16
|
+
mare:data-size-small:w-9 mare:data-size-small:h-5.5
|
|
17
|
+
mare:data-size-medium:w-13 mare:data-size-medium:h-8
|
|
18
|
+
mare:data-size-large:w-16 mare:data-size-large:h-9
|
|
19
|
+
|
|
20
|
+
mare:ark-checked:bg-accent
|
|
21
|
+
mare:not-ark-disabled:ark-checked:hover:bg-accent-hover
|
|
22
|
+
|
|
23
|
+
mare:ark-disabled:bg-disabled!
|
|
24
|
+
|
|
25
|
+
mare:ark-invalid:border-danger
|
|
26
|
+
`, S = `
|
|
27
|
+
mare:rounded-full mare:bg-default
|
|
28
|
+
mare:transition-transform mare:duration-300
|
|
29
|
+
|
|
30
|
+
mare:data-size-small:w-4.5 mare:data-size-small:h-4.5
|
|
31
|
+
mare:data-size-medium:w-7 mare:data-size-medium:h-7
|
|
32
|
+
mare:data-size-large:w-8 mare:data-size-large:h-8
|
|
33
|
+
|
|
34
|
+
mare:data-size-small:ark-checked:translate-x-3
|
|
35
|
+
mare:data-size-medium:ark-checked:translate-x-4.5
|
|
36
|
+
mare:data-size-large:ark-checked:translate-x-6.5
|
|
37
|
+
`, N = `
|
|
38
|
+
mare:text-default
|
|
39
|
+
mare:data-size-small:tpc-typography-body-s
|
|
40
|
+
mare:data-size-medium:tpc-typography-body-m
|
|
41
|
+
mare:data-size-large:tpc-typography-body-l
|
|
42
|
+
mare:ark-disabled:text-disabled
|
|
43
|
+
`, _ = `
|
|
44
|
+
mare:sr-only
|
|
45
|
+
`, I = g(
|
|
46
|
+
function({
|
|
47
|
+
checked: t,
|
|
48
|
+
defaultChecked: s,
|
|
49
|
+
onCheckedChange: d,
|
|
50
|
+
children: m,
|
|
51
|
+
size: l = "small",
|
|
52
|
+
disabled: i = !1,
|
|
53
|
+
invalid: o = !1,
|
|
54
|
+
readOnly: n = !1,
|
|
55
|
+
required: c = !1,
|
|
56
|
+
name: h,
|
|
57
|
+
value: u = "on",
|
|
58
|
+
id: z
|
|
59
|
+
}, p) {
|
|
60
|
+
const r = k(l, x, "small");
|
|
61
|
+
return /* @__PURE__ */ f(
|
|
62
|
+
a.Root,
|
|
63
|
+
{
|
|
64
|
+
checked: t,
|
|
65
|
+
defaultChecked: s,
|
|
66
|
+
onCheckedChange: (b) => {
|
|
67
|
+
d?.(b.checked);
|
|
68
|
+
},
|
|
69
|
+
disabled: i,
|
|
70
|
+
invalid: o,
|
|
71
|
+
readOnly: n,
|
|
72
|
+
required: c,
|
|
73
|
+
name: h,
|
|
74
|
+
value: u,
|
|
75
|
+
id: z,
|
|
76
|
+
className: w,
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ e(
|
|
79
|
+
a.Control,
|
|
80
|
+
{
|
|
81
|
+
className: y,
|
|
82
|
+
"data-size": r,
|
|
83
|
+
children: /* @__PURE__ */ e(
|
|
84
|
+
a.Thumb,
|
|
85
|
+
{
|
|
86
|
+
className: S,
|
|
87
|
+
"data-size": r
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
m && /* @__PURE__ */ e(
|
|
93
|
+
a.Label,
|
|
94
|
+
{
|
|
95
|
+
className: N,
|
|
96
|
+
"data-size": r,
|
|
97
|
+
children: m
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
/* @__PURE__ */ e(
|
|
101
|
+
a.HiddenInput,
|
|
102
|
+
{
|
|
103
|
+
className: _,
|
|
104
|
+
ref: p
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
export {
|
|
113
|
+
I as S
|
|
114
|
+
};
|
|
@@ -23,7 +23,10 @@ const h = ["small", "medium"], x = {
|
|
|
23
23
|
function z({
|
|
24
24
|
value: a,
|
|
25
25
|
onValueChange: r,
|
|
26
|
-
|
|
26
|
+
/* Default a [] aunque el tipo diga que es requerido: `items={data}`
|
|
27
|
+
* con data de un fetch sin resolver llega `undefined` en el primer
|
|
28
|
+
* render y el .map() de abajo tiraba pantalla blanca. */
|
|
29
|
+
items: m = [],
|
|
27
30
|
size: i = "small",
|
|
28
31
|
fluid: t = !1,
|
|
29
32
|
renderTab: s,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as f, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { o as m } from "./index-ByQ37VXf.js";
|
|
3
|
-
import {
|
|
3
|
+
import { IconX as b } from "@tabler/icons-react";
|
|
4
4
|
const v = `
|
|
5
5
|
mare:inline-flex mare:items-center mare:gap-0.5 mare:rounded-full
|
|
6
6
|
mare:border mare:border-default mare:bg-default mare:text-default
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as F } from "react";
|
|
4
|
+
import { useFieldContext as L, FieldTextarea as T, FieldRoot as b } from "@ark-ui/react/field";
|
|
5
|
+
import { m as C } from "./InputText.types-KhlkzHMw-BtRY371_.js";
|
|
6
|
+
import { u as g, a as v } from "./field-layout-o6bDLvVU.js";
|
|
7
|
+
import { o as w } from "./index-ByQ37VXf.js";
|
|
8
|
+
const k = F(
|
|
9
|
+
function({
|
|
10
|
+
/* Sin `value` React deja el input UNCONTROLLED y el DOM guarda el valor:
|
|
11
|
+
* ahí `defaultValue` (que pasa por `...native`) funciona y el campo se
|
|
12
|
+
* puede usar con react-hook-form via register(). Con un `value = ''` por
|
|
13
|
+
* defecto el input quedaba congelado si nadie mandaba `onValueChange`. */
|
|
14
|
+
value: o,
|
|
15
|
+
onValueChange: s,
|
|
16
|
+
size: r = "medium",
|
|
17
|
+
invalid: l = !1,
|
|
18
|
+
disabled: i = !1,
|
|
19
|
+
autoresize: m = !1,
|
|
20
|
+
placeholder: f,
|
|
21
|
+
...n
|
|
22
|
+
}, c) {
|
|
23
|
+
const e = g(), u = !L(), d = w(r, C, "medium"), p = v({
|
|
24
|
+
size: d,
|
|
25
|
+
hasFloatLabel: e?.hasFloatLabel ?? !1
|
|
26
|
+
}), x = e?.hasFloatLabel ? " " : f, a = /* @__PURE__ */ t(
|
|
27
|
+
T,
|
|
28
|
+
{
|
|
29
|
+
ref: c,
|
|
30
|
+
...n,
|
|
31
|
+
autoresize: m,
|
|
32
|
+
className: p,
|
|
33
|
+
placeholder: x,
|
|
34
|
+
value: o,
|
|
35
|
+
onChange: (h) => s?.(h.target.value)
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
return u ? /* @__PURE__ */ t(
|
|
39
|
+
b,
|
|
40
|
+
{
|
|
41
|
+
invalid: l,
|
|
42
|
+
disabled: i,
|
|
43
|
+
className: "mare:w-full",
|
|
44
|
+
children: a
|
|
45
|
+
}
|
|
46
|
+
) : a;
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
export {
|
|
50
|
+
k as T
|
|
51
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { JSX as JSX_2 } from 'react';
|
|
3
|
+
|
|
4
|
+
declare type ForwardedNativeProperties = Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'style' | 'children'>;
|
|
5
|
+
|
|
6
|
+
export declare function Skeleton({ shape, width, height, size, ...native }: SkeletonProperties): JSX_2.Element;
|
|
7
|
+
|
|
8
|
+
/** Shape of the placeholder — rectangle for text/blocks, circle for avatars. */
|
|
9
|
+
declare const SKELETON_SHAPES: readonly ["rectangle", "circle"];
|
|
10
|
+
|
|
11
|
+
export declare interface SkeletonProperties extends ForwardedNativeProperties {
|
|
12
|
+
/** @default 'rectangle' */
|
|
13
|
+
shape?: SkeletonShape;
|
|
14
|
+
/**
|
|
15
|
+
* Width of the placeholder (number = px, or any CSS length string).
|
|
16
|
+
* @default '100%'
|
|
17
|
+
*/
|
|
18
|
+
width?: string | number;
|
|
19
|
+
/**
|
|
20
|
+
* Height of the placeholder (number = px, or any CSS length string).
|
|
21
|
+
* @default '1rem'
|
|
22
|
+
*/
|
|
23
|
+
height?: string | number;
|
|
24
|
+
/** Convenience for shape='circle': sets width and height to the same value. */
|
|
25
|
+
size?: string | number;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export declare type SkeletonShape = (typeof SKELETON_SHAPES)[number];
|
|
29
|
+
|
|
30
|
+
export { }
|
package/dist/slider/index.js
CHANGED