@arkyn/components 3.0.3 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -24
- package/dist/components/alert/alertContainer/index.d.ts +7 -7
- package/dist/components/alert/alertContent/index.d.ts +1 -1
- package/dist/components/alert/alertDescription/index.d.ts +1 -1
- package/dist/components/alert/alertIcon/index.d.ts +1 -1
- package/dist/components/alert/alertTitle/index.d.ts +1 -1
- package/dist/components/audioPlayer/index.d.ts +1 -1
- package/dist/components/audioUpload/index.d.ts +2 -2
- package/dist/components/badge/index.d.ts +1 -1
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/cardTab/cardTabButton/index.d.ts +1 -1
- package/dist/components/cardTab/cardTabContainer/index.d.ts +1 -1
- package/dist/components/checkbox/index.d.ts +3 -3
- package/dist/components/checkbox/index.d.ts.map +1 -1
- package/dist/components/clientOnly.d.ts +2 -2
- package/dist/components/clientOnly.d.ts.map +1 -1
- package/dist/components/currencyInput/index.d.ts +2 -2
- package/dist/components/datePicker/index.d.ts +1 -1
- package/dist/components/divider/index.d.ts +1 -1
- package/dist/components/drawer/drawerContainer/index.d.ts +1 -1
- package/dist/components/drawer/drawerHeader/index.d.ts +1 -1
- package/dist/components/facebookPixel/index.d.ts +1 -1
- package/dist/components/fieldError/index.d.ts +1 -1
- package/dist/components/fieldLabel/index.d.ts +1 -1
- package/dist/components/fieldWrapper/index.d.ts +1 -1
- package/dist/components/fileUpload/index.d.ts +2 -2
- package/dist/components/googleAnalytics/index.d.ts +1 -1
- package/dist/components/googleTagManager/index.d.ts +1 -1
- package/dist/components/iconButton/index.d.ts +1 -1
- package/dist/components/imageUpload/index.d.ts +2 -2
- package/dist/components/input/index.d.ts +1 -1
- package/dist/components/mapView/index.d.ts +2 -2
- package/dist/components/mapView/index.d.ts.map +1 -1
- package/dist/components/maskedInput/index.d.ts +3 -3
- package/dist/components/modal/modalContainer/index.d.ts +1 -1
- package/dist/components/modal/modalFooter/index.d.ts +1 -1
- package/dist/components/modal/modalHeader/index.d.ts +1 -1
- package/dist/components/multiSelect/index.d.ts +1 -1
- package/dist/components/pagination/index.d.ts +1 -1
- package/dist/components/phoneInput/index.d.ts +2 -2
- package/dist/components/phoneInput/index.d.ts.map +1 -1
- package/dist/components/popover/index.d.ts +2 -2
- package/dist/components/popover/index.d.ts.map +1 -1
- package/dist/components/radio/radioBox/index.d.ts +4 -4
- package/dist/components/radio/radioGroup/index.d.ts +3 -3
- package/dist/components/richText/index.d.ts +3 -3
- package/dist/components/searchPlaces.d.ts +3 -3
- package/dist/components/select/index.d.ts +1 -1
- package/dist/components/slider/index.d.ts +1 -1
- package/dist/components/switch/index.d.ts +3 -3
- package/dist/components/switch/index.d.ts.map +1 -1
- package/dist/components/tab/tabButton/index.d.ts +1 -1
- package/dist/components/tab/tabContainer/index.d.ts +1 -1
- package/dist/components/table/tableBody/index.d.ts +1 -1
- package/dist/components/table/tableCaption/index.d.ts +2 -2
- package/dist/components/table/tableContainer/index.d.ts +1 -1
- package/dist/components/table/tableFooter/index.d.ts +1 -1
- package/dist/components/table/tableHeader/index.d.ts +2 -2
- package/dist/components/textarea/index.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/hooks/useAutomation.d.ts +1 -1
- package/dist/hooks/useDrawer.d.ts +5 -5
- package/dist/hooks/useForm.d.ts +2 -2
- package/dist/hooks/useHydrated.d.ts +1 -1
- package/dist/hooks/useModal.d.ts +5 -5
- package/dist/hooks/useScopedParams.d.ts +5 -5
- package/dist/hooks/useScrollLock.d.ts +2 -2
- package/dist/hooks/useSearchAutomation.d.ts +6 -6
- package/dist/hooks/useSlider.d.ts +2 -2
- package/dist/hooks/useToast.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/modules/components/alert/alertContainer/index.js.map +1 -1
- package/dist/modules/components/alert/alertContent/index.js.map +1 -1
- package/dist/modules/components/alert/alertDescription/index.js.map +1 -1
- package/dist/modules/components/alert/alertIcon/index.js.map +1 -1
- package/dist/modules/components/alert/alertTitle/index.js.map +1 -1
- package/dist/modules/components/audioPlayer/index.js.map +1 -1
- package/dist/modules/components/audioUpload/index.js.map +1 -1
- package/dist/modules/components/badge/index.js.map +1 -1
- package/dist/modules/components/button/index.js.map +1 -1
- package/dist/modules/components/cardTab/cardTabButton/index.js.map +1 -1
- package/dist/modules/components/cardTab/cardTabContainer/index.js.map +1 -1
- package/dist/modules/components/checkbox/index.js.map +1 -1
- package/dist/modules/components/clientOnly.js.map +1 -1
- package/dist/modules/components/currencyInput/index.js.map +1 -1
- package/dist/modules/components/datePicker/index.js.map +1 -1
- package/dist/modules/components/divider/index.js.map +1 -1
- package/dist/modules/components/drawer/drawerContainer/index.js.map +1 -1
- package/dist/modules/components/drawer/drawerHeader/index.js.map +1 -1
- package/dist/modules/components/facebookPixel/index.js.map +1 -1
- package/dist/modules/components/fieldError/index.js.map +1 -1
- package/dist/modules/components/fieldLabel/index.js.map +1 -1
- package/dist/modules/components/fieldWrapper/index.js.map +1 -1
- package/dist/modules/components/fileUpload/index.js.map +1 -1
- package/dist/modules/components/googleAnalytics/index.js.map +1 -1
- package/dist/modules/components/googleTagManager/index.js.map +1 -1
- package/dist/modules/components/iconButton/index.js.map +1 -1
- package/dist/modules/components/imageUpload/index.js.map +1 -1
- package/dist/modules/components/input/index.js.map +1 -1
- package/dist/modules/components/mapView/index.js.map +1 -1
- package/dist/modules/components/maskedInput/index.js.map +1 -1
- package/dist/modules/components/modal/modalContainer/index.js.map +1 -1
- package/dist/modules/components/modal/modalFooter/index.js.map +1 -1
- package/dist/modules/components/modal/modalHeader/index.js.map +1 -1
- package/dist/modules/components/multiSelect/index.js.map +1 -1
- package/dist/modules/components/pagination/index.js.map +1 -1
- package/dist/modules/components/phoneInput/index.js +59 -59
- package/dist/modules/components/phoneInput/index.js.map +1 -1
- package/dist/modules/components/popover/index.js.map +1 -1
- package/dist/modules/components/radio/radioBox/index.js.map +1 -1
- package/dist/modules/components/radio/radioGroup/index.js.map +1 -1
- package/dist/modules/components/richText/index.js.map +1 -1
- package/dist/modules/components/searchPlaces.js.map +1 -1
- package/dist/modules/components/select/index.js.map +1 -1
- package/dist/modules/components/slider/index.js.map +1 -1
- package/dist/modules/components/switch/index.js.map +1 -1
- package/dist/modules/components/tab/tabButton/index.js.map +1 -1
- package/dist/modules/components/tab/tabContainer/index.js.map +1 -1
- package/dist/modules/components/table/tableBody/index.js.map +1 -1
- package/dist/modules/components/table/tableCaption/index.js.map +1 -1
- package/dist/modules/components/table/tableContainer/index.js.map +1 -1
- package/dist/modules/components/table/tableFooter/index.js.map +1 -1
- package/dist/modules/components/table/tableHeader/index.js.map +1 -1
- package/dist/modules/components/textarea/index.js.map +1 -1
- package/dist/modules/components/tooltip/index.js.map +1 -1
- package/dist/modules/hooks/useAutomation.js.map +1 -1
- package/dist/modules/hooks/useDrawer.js.map +1 -1
- package/dist/modules/hooks/useForm.js.map +1 -1
- package/dist/modules/hooks/useHydrated.js.map +1 -1
- package/dist/modules/hooks/useModal.js.map +1 -1
- package/dist/modules/hooks/useScopedParams.js.map +1 -1
- package/dist/modules/hooks/useScrollLock.js.map +1 -1
- package/dist/modules/hooks/useSearchAutomation.js.map +1 -1
- package/dist/modules/hooks/useSlider.js.map +1 -1
- package/dist/modules/hooks/useToast.js.map +1 -1
- package/dist/modules/providers/drawerProvider.js.map +1 -1
- package/dist/modules/providers/formProvider.js.map +1 -1
- package/dist/modules/providers/modalProvider.js.map +1 -1
- package/dist/modules/providers/placesProvider.js.map +1 -1
- package/dist/modules/providers/toastProvider.js.map +1 -1
- package/dist/modules/services/toHtml.js.map +1 -1
- package/dist/modules/services/toRichTextValue.js.map +1 -1
- package/dist/providers/drawerProvider.d.ts +1 -1
- package/dist/providers/formProvider.d.ts +1 -1
- package/dist/providers/modalProvider.d.ts +1 -1
- package/dist/providers/placesProvider.d.ts +1 -1
- package/dist/providers/toastProvider.d.ts +1 -1
- package/dist/services/toHtml.d.ts +1 -1
- package/dist/services/toRichTextValue.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,22 +8,22 @@ A modern React component library featuring 40+ UI components, smooth animations,
|
|
|
8
8
|
|
|
9
9
|
## ✨ What it solves
|
|
10
10
|
|
|
11
|
-
Every React/Remix/React Router/Next app ends up rebuilding the same UI primitives
|
|
11
|
+
Every React/Remix/React Router/Next app ends up rebuilding the same UI primitives, buttons, inputs, modals, drawers, tables, tabs, alerts, with slightly different accessibility, validation, and animation behavior each time. `@arkyn/components` packages a complete, accessible, TypeScript-first set of these primitives (40+ components, plus supporting hooks and providers) so teams can compose screens instead of rebuilding foundations. Components integrate with a shared form-validation context (`FormProvider`/`useForm`), share consistent styling and motion, and cover everything from basic inputs to rich text editing, calendars, maps, and third-party tracking scripts.
|
|
12
12
|
|
|
13
13
|
## 🧩 Features
|
|
14
14
|
|
|
15
|
-
- 🧱 **Forms & inputs
|
|
16
|
-
- 📁 **Uploads
|
|
17
|
-
- 🧭 **Layout & navigation
|
|
18
|
-
- 🪟 **Overlays
|
|
19
|
-
- 🔔 **Feedback
|
|
20
|
-
- 📊 **Data display
|
|
21
|
-
- 📅 **Calendars & media
|
|
22
|
-
- 🗺️ **Google Places & Maps
|
|
23
|
-
- 📈 **Tracking integrations
|
|
24
|
-
- ✍️ **Rich text editing
|
|
25
|
-
- 🪝 **Hooks
|
|
26
|
-
- 🧑💻 **SSR-safe
|
|
15
|
+
- 🧱 **Forms & inputs**, `Input`, `Textarea`, `Checkbox`, `Switch`, `Select`, `MultiSelect`, `RadioGroup`/`RadioBox`, `CurrencyInput`, `MaskedInput`, `PhoneInput`, `Slider`, `FieldWrapper`/`FieldLabel`/`FieldError` for labeled, validated fields with consistent layout
|
|
16
|
+
- 📁 **Uploads**, `FileUpload`, `ImageUpload`, and `AudioUpload` with drag-and-drop, server upload, and preview built in
|
|
17
|
+
- 🧭 **Layout & navigation**, `TabContainer`/`TabButton`, `CardTabContainer`/`CardTabButton`, `Pagination`, `Divider`, `Badge`
|
|
18
|
+
- 🪟 **Overlays**, `ModalContainer`/`ModalHeader`/`ModalFooter` + `ModalProvider`/`useModal`, `DrawerContainer`/`DrawerHeader` + `DrawerProvider`/`useDrawer`, `Popover`, `Tooltip`
|
|
19
|
+
- 🔔 **Feedback**, `AlertContainer`/`AlertTitle`/`AlertDescription`/`AlertIcon`/`AlertContent`, `ToastProvider`/`useToast`
|
|
20
|
+
- 📊 **Data display**, `TableContainer`/`TableHeader`/`TableBody`/`TableFooter`/`TableCaption`
|
|
21
|
+
- 📅 **Calendars & media**, `Calendar` (single/range date picking), `FullCalendar` (day/week/month views with events), `AudioPlayer`
|
|
22
|
+
- 🗺️ **Google Places & Maps**, `SearchPlaces`, `PlacesProvider`, and Mapbox-powered `MapView`
|
|
23
|
+
- 📈 **Tracking integrations**, `GoogleAnalytics`, `GoogleTagManager`, `FacebookPixel`, all dev-mode aware
|
|
24
|
+
- ✍️ **Rich text editing**, `RichText` (Slate.js-based WYSIWYG editor) with `toHtml`/`toRichTextValue` conversion services
|
|
25
|
+
- 🪝 **Hooks**, `useForm`, `useModal`, `useDrawer`, `useToast`, `useSlider`, `useHydrated`, `useScopedParams`, `useScrollLock`, `useAutomation`, `useSearchAutomation`
|
|
26
|
+
- 🧑💻 **SSR-safe**, `ClientOnly` and `useHydrated` guard against hydration mismatches for browser-only UI
|
|
27
27
|
|
|
28
28
|
## 📋 Prerequisites
|
|
29
29
|
|
|
@@ -31,24 +31,24 @@ Every React/Remix/React Router/Next app ends up rebuilding the same UI primitive
|
|
|
31
31
|
- Always-required peer dependencies:
|
|
32
32
|
- `react >=18.0.0`
|
|
33
33
|
- `react-dom >=18.0.0`
|
|
34
|
-
- `lucide-react >=1.14.0
|
|
34
|
+
- `lucide-react >=1.14.0`, used for icons across most components
|
|
35
35
|
|
|
36
36
|
### Optional peer dependencies
|
|
37
37
|
|
|
38
38
|
Only install these if you use the specific component/hook that needs them:
|
|
39
39
|
|
|
40
|
-
- `mapbox-gl >=3.0.0
|
|
41
|
-
- `is-hotkey >=0.2.0
|
|
42
|
-
- `slate >=0.100.0`, `slate-history >=0.100.0`, `slate-react >=0.100.0
|
|
43
|
-
- `@react-google-maps/api >=2.0.0
|
|
44
|
-
- `react-scroll >=1.8.0
|
|
45
|
-
- `@react-input/mask >=2.0.0
|
|
46
|
-
- `html-react-parser >=5.0.0
|
|
47
|
-
- `react-hot-toast >=2.0.0
|
|
40
|
+
- `mapbox-gl >=3.0.0`, required by `MapView`
|
|
41
|
+
- `is-hotkey >=0.2.0`, required by `RichText`
|
|
42
|
+
- `slate >=0.100.0`, `slate-history >=0.100.0`, `slate-react >=0.100.0`, required by `RichText`
|
|
43
|
+
- `@react-google-maps/api >=2.0.0`, required by `PlacesProvider` and `SearchPlaces`
|
|
44
|
+
- `react-scroll >=1.8.0`, required by `useAutomation`
|
|
45
|
+
- `@react-input/mask >=2.0.0`, required by `MaskedInput` and `PhoneInput`
|
|
46
|
+
- `html-react-parser >=5.0.0`, required by the `toRichTextValue` service
|
|
47
|
+
- `react-hot-toast >=2.0.0`, required by `ToastProvider` / `useToast`
|
|
48
48
|
|
|
49
49
|
## 📦 Installation
|
|
50
50
|
|
|
51
|
-
> **ESM only.** This package ships as native ES modules with no CommonJS build
|
|
51
|
+
> **ESM only.** This package ships as native ES modules with no CommonJS build, use `import`, not `require()`.
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
54
|
npm install @arkyn/components react react-dom lucide-react
|
|
@@ -84,7 +84,7 @@ import { Button } from "@arkyn/components/button";
|
|
|
84
84
|
import "@arkyn/components/button.css";
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
Each `<name>.css` file is self-contained
|
|
87
|
+
Each `<name>.css` file is self-contained, safe to import on its own without the aggregate `@arkyn/components/styles`. If you use several components, importing the aggregate stylesheet once is usually simpler and avoids any duplicate CSS between per-component files that share internals (e.g. `FileUpload` and `Button`).
|
|
88
88
|
|
|
89
89
|
## 🚀 Quick Start
|
|
90
90
|
|
|
@@ -3,17 +3,17 @@ import "./styles.css";
|
|
|
3
3
|
type AlertContainerProps = {
|
|
4
4
|
/**
|
|
5
5
|
* Visual style and semantic meaning.
|
|
6
|
-
* - `success`: green
|
|
7
|
-
* - `danger`: red
|
|
8
|
-
* - `warning`: yellow
|
|
9
|
-
* - `info`: blue
|
|
6
|
+
* - `success`: green, operation completed.
|
|
7
|
+
* - `danger`: red, error or destructive action.
|
|
8
|
+
* - `warning`: yellow, caution required.
|
|
9
|
+
* - `info`: blue, informational message.
|
|
10
10
|
*/
|
|
11
11
|
scheme: "success" | "danger" | "warning" | "info";
|
|
12
12
|
} & HTMLAttributes<HTMLDivElement>;
|
|
13
13
|
/** @internal Accesses the schema and HTML props of the enclosing `AlertContainer`. */
|
|
14
14
|
declare function useAlertContainer(): AlertContainerProps;
|
|
15
15
|
/**
|
|
16
|
-
* AlertContainer
|
|
16
|
+
* AlertContainer, root wrapper for the Alert component set. Provides schema context to child components.
|
|
17
17
|
*
|
|
18
18
|
* Automatically detects whether an `AlertTitle` is present among children and adjusts layout:
|
|
19
19
|
* centered when no title, left-aligned when a title is present.
|
|
@@ -27,13 +27,13 @@ declare function useAlertContainer(): AlertContainerProps;
|
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* ```tsx
|
|
30
|
-
* // Inline alert
|
|
30
|
+
* // Inline alert, no title, centered layout
|
|
31
31
|
* <AlertContainer scheme="success">
|
|
32
32
|
* <AlertIcon />
|
|
33
33
|
* <AlertContent>Your subscription has been activated.</AlertContent>
|
|
34
34
|
* </AlertContainer>
|
|
35
35
|
*
|
|
36
|
-
* // Full alert with title and description
|
|
36
|
+
* // Full alert with title and description, left-aligned layout
|
|
37
37
|
* <AlertContainer scheme="danger">
|
|
38
38
|
* <AlertIcon />
|
|
39
39
|
* <AlertContent>
|
|
@@ -2,7 +2,7 @@ import type { HTMLAttributes, JSX } from "react";
|
|
|
2
2
|
import "./styles.css";
|
|
3
3
|
type AlertContentProps = HTMLAttributes<HTMLDivElement>;
|
|
4
4
|
/**
|
|
5
|
-
* AlertContent
|
|
5
|
+
* AlertContent, text/content area inside an `AlertContainer`. Wraps `AlertTitle` and `AlertDescription`.
|
|
6
6
|
*
|
|
7
7
|
* Accepts all standard `<div>` HTML attributes.
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@ import type { HTMLAttributes, JSX } from "react";
|
|
|
2
2
|
import "./styles.css";
|
|
3
3
|
type AlertDescriptionProps = HTMLAttributes<HTMLDivElement>;
|
|
4
4
|
/**
|
|
5
|
-
* AlertDescription
|
|
5
|
+
* AlertDescription, body text for an alert. Place inside `AlertContent`.
|
|
6
6
|
*
|
|
7
7
|
* Accepts all standard `<div>` HTML attributes.
|
|
8
8
|
*
|
|
@@ -3,7 +3,7 @@ import type { JSX } from "react";
|
|
|
3
3
|
import "./styles.css";
|
|
4
4
|
type AlertIconProps = LucideProps;
|
|
5
5
|
/**
|
|
6
|
-
* AlertIcon
|
|
6
|
+
* AlertIcon, renders a scheme-appropriate icon from `AlertContainer` context.
|
|
7
7
|
*
|
|
8
8
|
* - `success` → `CheckCircle2`
|
|
9
9
|
* - `danger` → `XCircle`
|
|
@@ -2,7 +2,7 @@ import type { HTMLAttributes, JSX } from "react";
|
|
|
2
2
|
import "./styles.css";
|
|
3
3
|
type AlertTitleProps = HTMLAttributes<HTMLDivElement>;
|
|
4
4
|
/**
|
|
5
|
-
* AlertTitle
|
|
5
|
+
* AlertTitle, bold heading for an alert. Place inside `AlertContent`.
|
|
6
6
|
*
|
|
7
7
|
* Its presence is detected by `AlertContainer` to switch the layout from centered to left-aligned.
|
|
8
8
|
* Accepts all standard `<div>` HTML attributes.
|
|
@@ -22,7 +22,7 @@ type AudioPlayerProps = Omit<AudioHTMLAttributes<HTMLAudioElement>, "onEnded" |
|
|
|
22
22
|
onPauseAudio?: (props: AudioInformationProps) => void;
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
|
-
* AudioPlayer
|
|
25
|
+
* AudioPlayer, play/pause controls, a scrubable progress bar, and elapsed/total time display.
|
|
26
26
|
*
|
|
27
27
|
* @param props.src - Audio file URL. Required.
|
|
28
28
|
* @param props.disabled - Disables controls. Default: false
|
|
@@ -30,7 +30,7 @@ type AudioUploadProps = {
|
|
|
30
30
|
defaultValue?: string;
|
|
31
31
|
};
|
|
32
32
|
/**
|
|
33
|
-
* AudioUpload
|
|
33
|
+
* AudioUpload, drag-and-drop audio file uploader with server upload and playback preview.
|
|
34
34
|
*
|
|
35
35
|
* Sends the file via `fetch` as `multipart/form-data` and stores the returned URL
|
|
36
36
|
* in a hidden `<input>` for form submission.
|
|
@@ -41,7 +41,7 @@ type AudioUploadProps = {
|
|
|
41
41
|
* @param props.fileName - Form-data field name for the file. Default: "file"
|
|
42
42
|
* @param props.method - HTTP method. Default: "POST"
|
|
43
43
|
* @param props.acceptAudio - Accepted MIME types / extensions. Default: "audio/*"
|
|
44
|
-
* @param props.onChange - Callback fired after a successful upload
|
|
44
|
+
* @param props.onChange - Callback fired after a successful upload, receives the audio URL.
|
|
45
45
|
* @param props.fileResponseName - Server response property containing the URL. Default: "url"
|
|
46
46
|
* @param props.label - Label text displayed above the upload area.
|
|
47
47
|
* @param props.showAsterisk - Appends `*` to the label. Default: false
|
|
@@ -26,7 +26,7 @@ type BadgeProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
26
26
|
rightIcon?: LucideIcon;
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
29
|
-
* Badge
|
|
29
|
+
* Badge, displays labels, statuses, and categorization tags.
|
|
30
30
|
*
|
|
31
31
|
* @param props.size - Badge size (`md` | `lg`). Default: "lg"
|
|
32
32
|
* @param props.variant - Visual style variant. Default: "ghost"
|
|
@@ -31,7 +31,7 @@ type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
|
31
31
|
rightIcon?: LucideIcon;
|
|
32
32
|
};
|
|
33
33
|
/**
|
|
34
|
-
* Button
|
|
34
|
+
* Button, used for user interactions and form submissions.
|
|
35
35
|
*
|
|
36
36
|
* @param props.isLoading - Shows a spinner and disables the button. Default: false
|
|
37
37
|
* @param props.loadingText - Text displayed beside the spinner when loading.
|
|
@@ -7,7 +7,7 @@ type CardTabButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "childre
|
|
|
7
7
|
value: string;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
* CardTabButton
|
|
10
|
+
* CardTabButton, individual tab button inside a `CardTabContainer`.
|
|
11
11
|
*
|
|
12
12
|
* Reads active state and disabled state from `CardTabContainer` context.
|
|
13
13
|
* The button's own `disabled` prop is ORed with the container's `disabled`.
|
|
@@ -11,7 +11,7 @@ type CardTabContainerProps = Omit<HTMLAttributes<HTMLElement>, "onClick" | "chil
|
|
|
11
11
|
onChange?: (index: string) => void;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
* CardTabContainer
|
|
14
|
+
* CardTabContainer, wrapper that manages active state for a group of `CardTabButton` components.
|
|
15
15
|
*
|
|
16
16
|
* Renders as a `<nav>` element. Provides context consumed by each `CardTabButton`.
|
|
17
17
|
*
|
|
@@ -22,7 +22,7 @@ type CheckboxProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size" | "pre
|
|
|
22
22
|
checked?: boolean;
|
|
23
23
|
/** Uncontrolled initial checked state. @default false */
|
|
24
24
|
defaultChecked?: boolean;
|
|
25
|
-
/** Callback fired on toggle
|
|
25
|
+
/** Callback fired on toggle, receives the value string (or `""` when unchecked). */
|
|
26
26
|
onCheck?: (value: string) => void;
|
|
27
27
|
/**
|
|
28
28
|
* Layout direction forwarded to `FieldTemplate`.
|
|
@@ -31,7 +31,7 @@ type CheckboxProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size" | "pre
|
|
|
31
31
|
orientation?: "horizontal" | "vertical" | "horizontalReverse";
|
|
32
32
|
};
|
|
33
33
|
/**
|
|
34
|
-
* Checkbox
|
|
34
|
+
* Checkbox, interactive checkbox input with label, validation, and form integration.
|
|
35
35
|
*
|
|
36
36
|
* Stores value in a hidden `<input>` for native form submission.
|
|
37
37
|
* Integrates with `useForm` to display validation errors by field name.
|
|
@@ -42,7 +42,7 @@ type CheckboxProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size" | "pre
|
|
|
42
42
|
* @param props.value - Value stored when checked. Default: "checked"
|
|
43
43
|
* @param props.checked - Controlled checked state.
|
|
44
44
|
* @param props.defaultChecked - Uncontrolled initial checked state. Default: false
|
|
45
|
-
* @param props.onCheck - Callback fired on toggle
|
|
45
|
+
* @param props.onCheck - Callback fired on toggle, receives value or `""` when unchecked.
|
|
46
46
|
* @param props.errorMessage - Validation error message.
|
|
47
47
|
* @param props.showAsterisk - Appends `*` to the label.
|
|
48
48
|
* @param props.orientation - Layout direction (`horizontal` | `vertical` | `horizontalReverse`). Default: "horizontalReverse"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,oBAAoB,EAA2B,MAAM,OAAO,CAAC;AAK3E,OAAO,cAAc,CAAC;AAEtB,KAAK,aAAa,GAAG,IAAI,CACxB,oBAAoB,CAAC,iBAAiB,CAAC,EACrC,MAAM,GACN,QAAQ,GACR,MAAM,GACN,MAAM,GACN,cAAc,GACd,OAAO,GACP,UAAU,GACV,UAAU,GACV,SAAS,CACX,GAAG;IACH,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,sFAAsF;IACtF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yDAAyD;IACzD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,oBAAoB,EAA2B,MAAM,OAAO,CAAC;AAK3E,OAAO,cAAc,CAAC;AAEtB,KAAK,aAAa,GAAG,IAAI,CACxB,oBAAoB,CAAC,iBAAiB,CAAC,EACrC,MAAM,GACN,QAAQ,GACR,MAAM,GACN,MAAM,GACN,cAAc,GACd,OAAO,GACP,UAAU,GACV,UAAU,GACV,SAAS,CACX,GAAG;IACH,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,sFAAsF;IACtF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yDAAyD;IACzD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oFAAoF;IACpF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;;OAGG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,mBAAmB,CAAC;CAC9D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,iBAAS,QAAQ,CAAC,KAAK,EAAE,aAAa,+BAuErC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
type ClientOnlyProps = {
|
|
2
|
-
/** Render function
|
|
2
|
+
/** Render function, called after hydration on the client. Required. */
|
|
3
3
|
children(): React.ReactNode;
|
|
4
4
|
/** Content rendered during SSR or before hydration. @default null */
|
|
5
5
|
fallback?: React.ReactNode;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
|
-
* ClientOnly
|
|
8
|
+
* ClientOnly, renders its children only after client-side hydration.
|
|
9
9
|
*
|
|
10
10
|
* Prevents React hydration mismatches for components that rely on browser-only APIs
|
|
11
11
|
* (e.g. `window`, `navigator`, `document`). Uses `useHydrated` internally.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientOnly.d.ts","sourceRoot":"","sources":["../../src/components/clientOnly.tsx"],"names":[],"mappings":"AAEA,KAAK,eAAe,GAAG;IACtB,
|
|
1
|
+
{"version":3,"file":"clientOnly.d.ts","sourceRoot":"","sources":["../../src/components/clientOnly.tsx"],"names":[],"mappings":"AAEA,KAAK,eAAe,GAAG;IACtB,uEAAuE;IACvE,QAAQ,IAAI,KAAK,CAAC,SAAS,CAAC;IAC5B,qEAAqE;IACrE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,6BAGzC;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -62,7 +62,7 @@ type CurrencyInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "
|
|
|
62
62
|
onChange?: (event: ChangeEvent<HTMLInputElement>, originalValue: string, maskedValue: string) => void;
|
|
63
63
|
};
|
|
64
64
|
/**
|
|
65
|
-
* CurrencyInput
|
|
65
|
+
* CurrencyInput, numeric input that automatically formats the displayed value according to a currency locale.
|
|
66
66
|
*
|
|
67
67
|
* The raw numeric value is stored in a hidden `<input>` for form submission.
|
|
68
68
|
* Integrates with `useForm` to display validation errors by field name.
|
|
@@ -77,7 +77,7 @@ type CurrencyInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "
|
|
|
77
77
|
* @param props.max - Maximum numeric value allowed. Default: 1_000_000_000
|
|
78
78
|
* @param props.value - Controlled numeric value.
|
|
79
79
|
* @param props.defaultValue - Uncontrolled default numeric value.
|
|
80
|
-
* @param props.onChange - Callback fired on change
|
|
80
|
+
* @param props.onChange - Callback fired on change, receives the event, the raw numeric string, and the formatted string.
|
|
81
81
|
* @param props.prefix - Text or icon at the far left.
|
|
82
82
|
* @param props.suffix - Text or icon at the far right.
|
|
83
83
|
* @param props.leftIcon - Lucide icon inside the input on the left.
|
|
@@ -105,7 +105,7 @@ type RangeDatePickerProps = BaseDatePickerProps & {
|
|
|
105
105
|
*/
|
|
106
106
|
type DatePickerProps = SingleDatePickerProps | RangeDatePickerProps;
|
|
107
107
|
/**
|
|
108
|
-
* DatePicker
|
|
108
|
+
* DatePicker, date input field with a popover `Calendar`, supporting single-date
|
|
109
109
|
* (`single`) and range (`range`) selection modes.
|
|
110
110
|
*
|
|
111
111
|
* Opens the calendar on click, the same way `Select` opens its options list, flipping
|
|
@@ -8,7 +8,7 @@ type DividerProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
8
8
|
orientation?: "horizontal" | "vertical";
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
-
* Divider
|
|
11
|
+
* Divider, visually separates content sections.
|
|
12
12
|
*
|
|
13
13
|
* @param props.orientation - Line direction (`horizontal` | `vertical`). Default: "horizontal"
|
|
14
14
|
*
|
|
@@ -9,7 +9,7 @@ type DrawerContainerProps = HTMLAttributes<HTMLElement> & {
|
|
|
9
9
|
orientation?: "left" | "right";
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
|
-
* DrawerContainer
|
|
12
|
+
* DrawerContainer, animated slide-in panel rendered over an overlay backdrop.
|
|
13
13
|
*
|
|
14
14
|
* Locks body scroll while open. Closes when the overlay is clicked.
|
|
15
15
|
* Provides context consumed by `DrawerHeader` (close button).
|
|
@@ -5,7 +5,7 @@ type DrawerHeaderProps = HTMLAttributes<HTMLElement> & {
|
|
|
5
5
|
showCloseButton?: boolean;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
|
-
* DrawerHeader
|
|
8
|
+
* DrawerHeader, header section for a `DrawerContainer`, with an optional close button.
|
|
9
9
|
*
|
|
10
10
|
* The close button calls `makeInvisible` from the nearest `DrawerContainer` context.
|
|
11
11
|
* Must be rendered inside a `DrawerContainer`.
|
|
@@ -26,7 +26,7 @@ type FacebookPixelProps = {
|
|
|
26
26
|
trackSingleCustom?: [string, any?];
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
29
|
-
* FacebookPixel
|
|
29
|
+
* FacebookPixel, injects the Facebook Pixel tracking script client-side.
|
|
30
30
|
*
|
|
31
31
|
* Renders nothing in development mode unless `showInDevMode` is `true`.
|
|
32
32
|
* Wrapped in `ClientOnly` to avoid SSR errors.
|
|
@@ -2,7 +2,7 @@ import type { HTMLAttributes } from "react";
|
|
|
2
2
|
import "./styles.css";
|
|
3
3
|
type FieldErrorProps = HTMLAttributes<HTMLElement>;
|
|
4
4
|
/**
|
|
5
|
-
* FieldError
|
|
5
|
+
* FieldError, displays a validation error message below a form field.
|
|
6
6
|
*
|
|
7
7
|
* Renders nothing when `children` is empty or falsy.
|
|
8
8
|
*
|
|
@@ -5,7 +5,7 @@ type FieldLabelProps = LabelHTMLAttributes<HTMLLabelElement> & {
|
|
|
5
5
|
showAsterisk?: boolean;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
|
-
* FieldLabel
|
|
8
|
+
* FieldLabel, label for form fields, with an optional required-field asterisk.
|
|
9
9
|
*
|
|
10
10
|
* @param props.showAsterisk - Appends `*` to the label. Default: false
|
|
11
11
|
*
|
|
@@ -10,7 +10,7 @@ type FieldWrapperProps = HTMLAttributes<HTMLElement> & {
|
|
|
10
10
|
orientation?: "vertical" | "horizontal" | "horizontalReverse";
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
|
-
* FieldWrapper
|
|
13
|
+
* FieldWrapper, `<section>` container that groups a form field with its label and error message.
|
|
14
14
|
*
|
|
15
15
|
* @param props.children - Field elements (label, input, error, etc.).
|
|
16
16
|
* @param props.orientation - Layout direction. Default: "vertical"
|
|
@@ -28,7 +28,7 @@ type FileUploadProps = {
|
|
|
28
28
|
onChange?: (url?: string) => void;
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
31
|
-
* FileUpload
|
|
31
|
+
* FileUpload, drag-and-drop file uploader with server upload and file-name preview.
|
|
32
32
|
*
|
|
33
33
|
* Sends the file via `fetch` as `multipart/form-data` and stores the returned URL
|
|
34
34
|
* in a hidden `<input>` for form submission.
|
|
@@ -43,7 +43,7 @@ type FileUploadProps = {
|
|
|
43
43
|
* @param props.method - HTTP method. Default: "POST"
|
|
44
44
|
* @param props.fileName - Form-data field name for the file. Default: "file"
|
|
45
45
|
* @param props.fileResponseName - Server response property containing the URL. Default: "url"
|
|
46
|
-
* @param props.onChange - Callback fired after a successful upload
|
|
46
|
+
* @param props.onChange - Callback fired after a successful upload, receives the file URL.
|
|
47
47
|
*
|
|
48
48
|
* @returns FileUpload JSX element wrapped in `FieldWrapper`.
|
|
49
49
|
*
|
|
@@ -6,7 +6,7 @@ type GoogleAnalyticsProps = {
|
|
|
6
6
|
showInDevMode?: boolean;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
|
-
* GoogleAnalytics
|
|
9
|
+
* GoogleAnalytics, injects the Google Analytics 4 script into the page client-side.
|
|
10
10
|
*
|
|
11
11
|
* Renders nothing in development mode unless `showInDevMode` is `true`.
|
|
12
12
|
* Wrapped in `ClientOnly` to avoid SSR errors.
|
|
@@ -15,7 +15,7 @@ type GoogleTagManagerProps = {
|
|
|
15
15
|
showInDevMode?: boolean;
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
|
-
* GoogleTagManager
|
|
18
|
+
* GoogleTagManager, injects the GTM `<script>` and `<noscript>` snippets into the page client-side.
|
|
19
19
|
*
|
|
20
20
|
* Renders nothing in development mode unless `showInDevMode` is `true`.
|
|
21
21
|
* Wrapped in `ClientOnly` to avoid SSR errors.
|
|
@@ -29,7 +29,7 @@ type IconButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"
|
|
|
29
29
|
scheme?: "primary" | "secondary" | "success" | "warning" | "danger" | "info";
|
|
30
30
|
};
|
|
31
31
|
/**
|
|
32
|
-
* IconButton
|
|
32
|
+
* IconButton, compact button that renders a single icon without a text label.
|
|
33
33
|
*
|
|
34
34
|
* Always requires `aria-label` for accessibility.
|
|
35
35
|
*
|
|
@@ -39,7 +39,7 @@ type ImageUploadProps = {
|
|
|
39
39
|
orientation?: "horizontal" | "vertical" | "horizontalReverse";
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
|
-
* ImageUpload
|
|
42
|
+
* ImageUpload, drag-and-drop image uploader with server upload and image preview.
|
|
43
43
|
*
|
|
44
44
|
* Sends the file via `fetch` as `multipart/form-data` and stores the returned URL
|
|
45
45
|
* in a hidden `<input>` for form submission.
|
|
@@ -55,7 +55,7 @@ type ImageUploadProps = {
|
|
|
55
55
|
* @param props.method - HTTP method. Default: "POST"
|
|
56
56
|
* @param props.fileName - Form-data field name for the file. Default: "file"
|
|
57
57
|
* @param props.fileResponseName - Server response property containing the URL. Default: "url"
|
|
58
|
-
* @param props.onChange - Callback fired after a successful upload
|
|
58
|
+
* @param props.onChange - Callback fired after a successful upload, receives the image URL.
|
|
59
59
|
* @param props.orientation - Layout direction. Default: "horizontal"
|
|
60
60
|
* @param props.unShowFieldTemplate - Skips wrapper, label, and error rendering. Default: false
|
|
61
61
|
*
|
|
@@ -46,7 +46,7 @@ type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "prefix"
|
|
|
46
46
|
defaultValue?: string;
|
|
47
47
|
};
|
|
48
48
|
/**
|
|
49
|
-
* Input
|
|
49
|
+
* Input, text input field with label, validation, icons, prefix/suffix, and loading state.
|
|
50
50
|
*
|
|
51
51
|
* Integrates with `useForm` to display validation errors by field name.
|
|
52
52
|
*
|
|
@@ -6,7 +6,7 @@ type Coordinate = {
|
|
|
6
6
|
lat: number;
|
|
7
7
|
/** Longitude of the marker position. */
|
|
8
8
|
lng: number;
|
|
9
|
-
/** Arbitrary data attached to the marker
|
|
9
|
+
/** Arbitrary data attached to the marker, available in `onMarkerClick`. */
|
|
10
10
|
data?: any;
|
|
11
11
|
/** Custom React node rendered inside the marker popup on click. */
|
|
12
12
|
popUp?: ReactNode;
|
|
@@ -22,7 +22,7 @@ type MapViewProps = {
|
|
|
22
22
|
onMarkerClick?: (coordinate: Coordinate) => void;
|
|
23
23
|
} & HtmlHTMLAttributes<HTMLDivElement>;
|
|
24
24
|
/**
|
|
25
|
-
* MapView
|
|
25
|
+
* MapView, interactive Mapbox map with optional click-able markers.
|
|
26
26
|
*
|
|
27
27
|
* Renders client-side only (via `ClientOnly`). Displays a placeholder icon
|
|
28
28
|
* when `coordinates` is absent or empty, or before the component hydrates.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/mapView/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3D,OAAO,cAAc,CAAC;AAGtB,oCAAoC;AACpC,KAAK,UAAU,GAAG;IACjB,uCAAuC;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,wCAAwC;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/mapView/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3D,OAAO,cAAc,CAAC;AAGtB,oCAAoC;AACpC,KAAK,UAAU,GAAG;IACjB,uCAAuC;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,wCAAwC;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,2EAA2E;IAE3E,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,mEAAmE;IACnE,KAAK,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,KAAK,YAAY,GAAG;IACnB,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,WAAW,CAAC,EAAE,UAAU,GAAG,UAAU,EAAE,CAAC;IACxC,oFAAoF;IACpF,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;CACjD,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC;AAcvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,iBAAS,OAAO,CAAC,KAAK,EAAE,YAAY,+BA4BnC;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -13,8 +13,8 @@ type MaskedInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "pr
|
|
|
13
13
|
mask: string;
|
|
14
14
|
/**
|
|
15
15
|
* Character or replacement map that marks editable positions in the mask.
|
|
16
|
-
* - String: `"_"
|
|
17
|
-
* - Object: `{ _: /\d/ }
|
|
16
|
+
* - String: `"_"`, every `_` in the mask becomes editable.
|
|
17
|
+
* - Object: `{ _: /\d/ }`, only accepts digits in those positions.
|
|
18
18
|
* Required.
|
|
19
19
|
*/
|
|
20
20
|
replacement: string | Replacement;
|
|
@@ -60,7 +60,7 @@ type MaskedInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "pr
|
|
|
60
60
|
defaultValue?: string;
|
|
61
61
|
};
|
|
62
62
|
/**
|
|
63
|
-
* MaskedInput
|
|
63
|
+
* MaskedInput, text input with a configurable mask for structured values (phones, CPF, credit cards, etc.).
|
|
64
64
|
*
|
|
65
65
|
* Built on `@react-input/mask`. Integrates with `useForm` to display validation errors by field name.
|
|
66
66
|
*
|
|
@@ -7,7 +7,7 @@ type ModalContainerProps = HTMLAttributes<HTMLElement> & {
|
|
|
7
7
|
makeInvisible: () => void;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
* ModalContainer
|
|
10
|
+
* ModalContainer, animated centered modal rendered over a backdrop overlay.
|
|
11
11
|
*
|
|
12
12
|
* Locks body scroll while open. Closes when the overlay is clicked.
|
|
13
13
|
* Provides context consumed by `ModalHeader` (close button).
|
|
@@ -11,7 +11,7 @@ type ModalFooterProps = HTMLAttributes<HTMLElement> & {
|
|
|
11
11
|
alignment?: "left" | "center" | "right" | "between" | "around";
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
* ModalFooter
|
|
14
|
+
* ModalFooter, action bar at the bottom of a modal dialog.
|
|
15
15
|
*
|
|
16
16
|
* @param props.alignment - Horizontal alignment of children. Default: `"right"`
|
|
17
17
|
*
|
|
@@ -5,7 +5,7 @@ type ModalHeaderProps = HTMLAttributes<HTMLElement> & {
|
|
|
5
5
|
showCloseButton?: boolean;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
|
-
* ModalHeader
|
|
8
|
+
* ModalHeader, header section for a `ModalContainer`, with an optional close button.
|
|
9
9
|
*
|
|
10
10
|
* The close button calls `makeInvisible` from the nearest `ModalContainer` context.
|
|
11
11
|
* Must be rendered inside a `ModalContainer`.
|
|
@@ -72,7 +72,7 @@ type MultiSelectProps = {
|
|
|
72
72
|
orientation?: "horizontal" | "vertical" | "horizontalReverse";
|
|
73
73
|
};
|
|
74
74
|
/**
|
|
75
|
-
* MultiSelect
|
|
75
|
+
* MultiSelect, multi-option dropdown with optional search, label, validation, and form integration.
|
|
76
76
|
*
|
|
77
77
|
* Selected values are stored as a JSON array in a hidden `<input>` for form submission.
|
|
78
78
|
* Integrates with `useForm` to display validation errors by field name.
|
|
@@ -29,7 +29,7 @@ type PaginationProps = {
|
|
|
29
29
|
onChange?: (page: number) => void;
|
|
30
30
|
} & Omit<HTMLAttributes<HTMLDivElement>, "onChange">;
|
|
31
31
|
/**
|
|
32
|
-
* Pagination
|
|
32
|
+
* Pagination, navigation control for paginated data sets.
|
|
33
33
|
*
|
|
34
34
|
* Renders page number buttons, prev/next arrows, and spread indicators (…)
|
|
35
35
|
* when the page count exceeds the visible range.
|
|
@@ -51,7 +51,7 @@ type PhoneInputProps = {
|
|
|
51
51
|
orientation?: "horizontal" | "vertical" | "horizontalReverse";
|
|
52
52
|
};
|
|
53
53
|
/**
|
|
54
|
-
* PhoneInput
|
|
54
|
+
* PhoneInput, phone number field with an integrated country selector and automatic mask formatting.
|
|
55
55
|
*
|
|
56
56
|
* The visible input is masked according to the selected country's phone format.
|
|
57
57
|
* The hidden `<input>` stores a numeric string prefixed with the country dial code for form submission.
|
|
@@ -68,7 +68,7 @@ type PhoneInputProps = {
|
|
|
68
68
|
* @param props.isLoading - Shows loading state and disables interactions. Default: false
|
|
69
69
|
* @param props.defaultValue - Uncontrolled default phone value.
|
|
70
70
|
* @param props.value - Controlled phone value (without country code).
|
|
71
|
-
* @param props.onChange - Callback fired on change
|
|
71
|
+
* @param props.onChange - Callback fired on change, receives numeric string with country code.
|
|
72
72
|
* @param props.defaultCountryIso - ISO code of the initially selected country. Default: "BR"
|
|
73
73
|
* @param props.searchCountryPlaceholder - Placeholder for country search. Default: "Pesquisar país"
|
|
74
74
|
* @param props.notFoundCountryText - Text shown when no country matches. Default: "Nenhum país encontrado"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/phoneInput/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAsB7C,KAAK,eAAe,GAAG;IACtB,yDAAyD;IACzD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,gDAAgD;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uFAAuF;IACvF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,sEAAsE;IACtE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kGAAkG;IAClG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iGAAiG;IACjG,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,6FAA6F;IAC7F,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;IACtD,qGAAqG;IACrG,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sFAAsF;IACtF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,mBAAmB,CAAC;CAC9D,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/phoneInput/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAsB7C,KAAK,eAAe,GAAG;IACtB,yDAAyD;IACzD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,gDAAgD;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uFAAuF;IACvF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,sEAAsE;IACtE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kGAAkG;IAClG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iGAAiG;IACjG,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,6FAA6F;IAC7F,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;IACtD,qGAAqG;IACrG,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sFAAsF;IACtF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,mBAAmB,CAAC;CAC9D,CAAC;AAoBF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,+BA4KzC;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -4,7 +4,7 @@ type OrientationProps = "bottomLeft" | "bottomRight" | "topLeft" | "topRight" |
|
|
|
4
4
|
type PopoverProps = {
|
|
5
5
|
/** Content rendered inside the floating panel. Required. */
|
|
6
6
|
children: ReactNode;
|
|
7
|
-
/** Trigger element
|
|
7
|
+
/** Trigger element, clicking it opens the popover. Required. */
|
|
8
8
|
button: ReactNode;
|
|
9
9
|
/** When true, clicking the popover content also closes it. @default false */
|
|
10
10
|
closeOnClick?: boolean;
|
|
@@ -18,7 +18,7 @@ type PopoverProps = {
|
|
|
18
18
|
className?: string;
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
|
-
* Popover
|
|
21
|
+
* Popover, floating panel that appears relative to a trigger element.
|
|
22
22
|
*
|
|
23
23
|
* Clicking outside the popover (or clicking the content when `closeOnClick` is set)
|
|
24
24
|
* dismisses it. Locks body scroll while open.
|