@arkyn/components 3.0.2 → 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/datePickerCalendarContainer/index.d.ts +9 -0
- package/dist/components/datePicker/datePickerCalendarContainer/index.d.ts.map +1 -0
- package/dist/components/datePicker/datePickerChevron/index.d.ts +11 -0
- package/dist/components/datePicker/datePickerChevron/index.d.ts.map +1 -0
- package/dist/components/datePicker/datePickerContainer/index.d.ts +19 -0
- package/dist/components/datePicker/datePickerContainer/index.d.ts.map +1 -0
- package/dist/components/datePicker/datePickerContent/index.d.ts +9 -0
- package/dist/components/datePicker/datePickerContent/index.d.ts.map +1 -0
- package/dist/components/datePicker/datePickerOverlay/index.d.ts +8 -0
- package/dist/components/datePicker/datePickerOverlay/index.d.ts.map +1 -0
- package/dist/components/datePicker/datePickerSpinner/index.d.ts +8 -0
- package/dist/components/datePicker/datePickerSpinner/index.d.ts.map +1 -0
- package/dist/components/datePicker/index.d.ts +155 -0
- package/dist/components/datePicker/index.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +642 -389
- 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/datePickerCalendarContainer/index.js +25 -0
- package/dist/modules/components/datePicker/datePickerCalendarContainer/index.js.map +1 -0
- package/dist/modules/components/datePicker/datePickerCalendarContainer/styles.css +1 -0
- package/dist/modules/components/datePicker/datePickerChevron/index.js +21 -0
- package/dist/modules/components/datePicker/datePickerChevron/index.js.map +1 -0
- package/dist/modules/components/datePicker/datePickerChevron/styles.css +1 -0
- package/dist/modules/components/datePicker/datePickerContainer/index.js +16 -0
- package/dist/modules/components/datePicker/datePickerContainer/index.js.map +1 -0
- package/dist/modules/components/datePicker/datePickerContainer/styles.css +1 -0
- package/dist/modules/components/datePicker/datePickerContent/index.js +14 -0
- package/dist/modules/components/datePicker/datePickerContent/index.js.map +1 -0
- package/dist/modules/components/datePicker/datePickerContent/styles.css +1 -0
- package/dist/modules/components/datePicker/datePickerOverlay/index.js +14 -0
- package/dist/modules/components/datePicker/datePickerOverlay/index.js.map +1 -0
- package/dist/modules/components/datePicker/datePickerOverlay/styles.css +1 -0
- package/dist/modules/components/datePicker/datePickerSpinner/index.js +16 -0
- package/dist/modules/components/datePicker/datePickerSpinner/index.js.map +1 -0
- package/dist/modules/components/datePicker/datePickerSpinner/styles.css +1 -0
- package/dist/modules/components/datePicker/index.js +194 -0
- package/dist/modules/components/datePicker/index.js.map +1 -0
- package/dist/modules/components/datePicker/styles.css +79 -0
- 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 +68 -63
- 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 +27 -33
- 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/fieldTemplate.js +1 -0
- package/dist/modules/services/fieldTemplate.js.map +1 -1
- package/dist/modules/services/toHtml.js.map +1 -1
- package/dist/modules/services/toRichTextValue.js.map +1 -1
- package/dist/modules/utils/phoneInputUtilities.js +5 -5
- package/dist/modules/utils/phoneInputUtilities.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/modalProvider.d.ts.map +1 -1
- package/dist/providers/placesProvider.d.ts +1 -1
- package/dist/providers/toastProvider.d.ts +1 -1
- package/dist/services/fieldTemplate.d.ts.map +1 -1
- package/dist/services/toHtml.d.ts +1 -1
- package/dist/services/toRichTextValue.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/utils/phoneInputUtilities.d.ts +1 -1
- package/dist/utils/phoneInputUtilities.d.ts.map +1 -1
- package/package.json +17 -1
|
@@ -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;
|
|
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.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/popover/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAGjD,OAAO,cAAc,CAAC;AAEtB,KAAK,gBAAgB,GAClB,YAAY,GACZ,aAAa,GACb,SAAS,GACT,UAAU,GACV,KAAK,GACL,MAAM,GACN,QAAQ,GACR,OAAO,CAAC;AAEX,KAAK,YAAY,GAAG;IACnB,4DAA4D;IAC5D,QAAQ,EAAE,SAAS,CAAC;IACpB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/popover/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAGjD,OAAO,cAAc,CAAC;AAEtB,KAAK,gBAAgB,GAClB,YAAY,GACZ,aAAa,GACb,SAAS,GACT,UAAU,GACV,KAAK,GACL,MAAM,GACN,QAAQ,GACR,OAAO,CAAC;AAEX,KAAK,YAAY,GAAG;IACnB,4DAA4D;IAC5D,QAAQ,EAAE,SAAS,CAAC;IACpB,gEAAgE;IAChE,MAAM,EAAE,SAAS,CAAC;IAClB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,iBAAS,OAAO,CAAC,KAAK,EAAE,YAAY,+BAoCnC;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -9,7 +9,7 @@ type RadioBoxProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
|
9
9
|
size?: "sm" | "md" | "lg";
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
|
-
* RadioBox
|
|
12
|
+
* RadioBox, individual option inside a `RadioGroup`. Renders as a `<label>` + hidden `<button>` pair.
|
|
13
13
|
*
|
|
14
14
|
* Reads active value, size, error state, and disabled state from `RadioGroup` context.
|
|
15
15
|
* Must be used as a direct child of `RadioGroup`.
|
|
@@ -26,9 +26,9 @@ type RadioBoxProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
|
26
26
|
* @example
|
|
27
27
|
* ```tsx
|
|
28
28
|
* <RadioGroup name="plan" label="Choose a plan" onChange={setPlan}>
|
|
29
|
-
* <RadioBox value="basic">Basic
|
|
30
|
-
* <RadioBox value="pro">Pro
|
|
31
|
-
* <RadioBox value="enterprise" disabled>Enterprise
|
|
29
|
+
* <RadioBox value="basic">Basic, $9/mo</RadioBox>
|
|
30
|
+
* <RadioBox value="pro">Pro, $29/mo</RadioBox>
|
|
31
|
+
* <RadioBox value="enterprise" disabled>Enterprise, contact us</RadioBox>
|
|
32
32
|
* </RadioGroup>
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
@@ -25,7 +25,7 @@ type RadioGroupProps = Omit<HTMLAttributes<HTMLDivElement>, "onChange"> & {
|
|
|
25
25
|
orientation?: "horizontal" | "vertical" | "horizontalReverse";
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
|
-
* RadioGroup
|
|
28
|
+
* RadioGroup, managed group of `RadioBox` options with form integration.
|
|
29
29
|
*
|
|
30
30
|
* Renders a hidden `<input>` for native form submission. Reads `fieldErrors[name]` from
|
|
31
31
|
* the nearest `FormProvider` when no `errorMessage` is explicitly provided.
|
|
@@ -56,8 +56,8 @@ type RadioGroupProps = Omit<HTMLAttributes<HTMLDivElement>, "onChange"> & {
|
|
|
56
56
|
*
|
|
57
57
|
* // Controlled with change handler
|
|
58
58
|
* <RadioGroup name="plan" label="Subscription plan" value={plan} onChange={setPlan}>
|
|
59
|
-
* <RadioBox value="basic">Basic
|
|
60
|
-
* <RadioBox value="pro">Pro
|
|
59
|
+
* <RadioBox value="basic">Basic, $9/mo</RadioBox>
|
|
60
|
+
* <RadioBox value="pro">Pro, $29/mo</RadioBox>
|
|
61
61
|
* </RadioGroup>
|
|
62
62
|
* ```
|
|
63
63
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RichTextProps } from "../../types/richTextTypes";
|
|
2
2
|
import "./styles.css";
|
|
3
3
|
/**
|
|
4
|
-
* RichText
|
|
4
|
+
* RichText, WYSIWYG rich-text editor built on Slate.js with a configurable toolbar.
|
|
5
5
|
*
|
|
6
6
|
* **Toolbar features:** bold, italic, underline, code, H1/H2, block quote, alignment (left/center/right/justify), image and video insertion.
|
|
7
7
|
*
|
|
@@ -15,8 +15,8 @@ import "./styles.css";
|
|
|
15
15
|
* @param props.defaultValue - Initial editor content as a Slate JSON string. Default: "[]"
|
|
16
16
|
* @param props.maxLimit - Maximum character count. Default: 10000
|
|
17
17
|
* @param props.enforceCharacterLimit - Prevents typing past `maxLimit`. Default: false
|
|
18
|
-
* @param props.onChangeCharactersCount - Callback fired on every keystroke
|
|
19
|
-
* @param props.onChange - Callback fired when editor content changes
|
|
18
|
+
* @param props.onChangeCharactersCount - Callback fired on every keystroke, receives the current character count.
|
|
19
|
+
* @param props.onChange - Callback fired when editor content changes, receives the Slate `Descendant[]`.
|
|
20
20
|
* @param props.baseErrorMessage - Custom error message (overrides `useForm` context error).
|
|
21
21
|
* @param props.isError - Forces the error visual state.
|
|
22
22
|
* @param props.id - Custom id for the editable area element.
|
|
@@ -35,14 +35,14 @@ type SearchPlacesProps = {
|
|
|
35
35
|
onPlaceChanged?: (e: PlaceData) => void;
|
|
36
36
|
} & Omit<InputProps, "onLoad" | "onChange" | "type">;
|
|
37
37
|
/**
|
|
38
|
-
* SearchPlaces
|
|
38
|
+
* SearchPlaces, text input with Google Places autocomplete that returns structured address data.
|
|
39
39
|
*
|
|
40
40
|
* Requires the Google Maps JavaScript API with the Places library to be loaded.
|
|
41
41
|
* Built on `@react-google-maps/api`'s `StandaloneSearchBox`.
|
|
42
42
|
*
|
|
43
43
|
* @param props.options - Google Maps search box options (e.g. restrict by country).
|
|
44
|
-
* @param props.onChange - Fires on every keystroke
|
|
45
|
-
* @param props.onPlaceChanged - Fires when the user selects a suggestion
|
|
44
|
+
* @param props.onChange - Fires on every keystroke, receives the current text value.
|
|
45
|
+
* @param props.onPlaceChanged - Fires when the user selects a suggestion, receives structured address data.
|
|
46
46
|
*
|
|
47
47
|
* **...Other valid `Input` properties (except `onLoad`, `onChange`, `type`)**
|
|
48
48
|
*
|
|
@@ -72,7 +72,7 @@ type SelectProps = {
|
|
|
72
72
|
orientation?: "horizontal" | "vertical" | "horizontalReverse";
|
|
73
73
|
};
|
|
74
74
|
/**
|
|
75
|
-
* Select
|
|
75
|
+
* Select, single-option dropdown with optional search, label, validation, and form integration.
|
|
76
76
|
*
|
|
77
77
|
* Integrates with `useForm` to display validation errors by field name.
|
|
78
78
|
*
|
|
@@ -11,7 +11,7 @@ type SliderProps = Omit<HTMLAttributes<HTMLDivElement>, "onChange"> & {
|
|
|
11
11
|
onDragging?: (isDragging: boolean) => void;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
* Slider
|
|
14
|
+
* Slider, interactive track for selecting a numeric value between 0 and 100.
|
|
15
15
|
*
|
|
16
16
|
* Pair with `useSlider` for managed state.
|
|
17
17
|
*
|
|
@@ -18,7 +18,7 @@ type SwitchProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "o
|
|
|
18
18
|
unCheckedValue?: string;
|
|
19
19
|
/** Field name for form submission. Required. */
|
|
20
20
|
name: string;
|
|
21
|
-
/** Callback fired on toggle
|
|
21
|
+
/** Callback fired on toggle, receives the current value string. */
|
|
22
22
|
onCheck?: (value: string) => void;
|
|
23
23
|
/**
|
|
24
24
|
* Layout direction forwarded to `FieldTemplate`.
|
|
@@ -33,7 +33,7 @@ type SwitchProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "o
|
|
|
33
33
|
errorMessage?: string;
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
36
|
-
* Switch
|
|
36
|
+
* Switch, toggle input for binary on/off states.
|
|
37
37
|
*
|
|
38
38
|
* Stores value in a hidden `<input>` for native form submission.
|
|
39
39
|
* Integrates with `useForm` to display validation errors by field name.
|
|
@@ -45,7 +45,7 @@ type SwitchProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "o
|
|
|
45
45
|
* @param props.checked - Controlled checked state.
|
|
46
46
|
* @param props.value - Value emitted when on. Default: "checked"
|
|
47
47
|
* @param props.unCheckedValue - Value emitted when off. Default: ""
|
|
48
|
-
* @param props.onCheck - Callback fired on toggle
|
|
48
|
+
* @param props.onCheck - Callback fired on toggle, receives the current value string.
|
|
49
49
|
* @param props.orientation - Layout direction (`horizontal` | `vertical` | `horizontalReverse`). Default: "horizontalReverse"
|
|
50
50
|
* @param props.unShowFieldTemplate - Skips wrapper, label, and error rendering. Default: false
|
|
51
51
|
* @param props.showAsterisk - Appends `*` to the label.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/switch/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAIlD,OAAO,cAAc,CAAC;AAEtB,KAAK,WAAW,GAAG,IAAI,CACtB,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,UAAU,GAAG,cAAc,GAAG,SAAS,GAAG,OAAO,CAC9D,GAAG;IACH,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,yDAAyD;IACzD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gCAAgC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/switch/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAIlD,OAAO,cAAc,CAAC;AAEtB,KAAK,WAAW,GAAG,IAAI,CACtB,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,UAAU,GAAG,cAAc,GAAG,SAAS,GAAG,OAAO,CAC9D,GAAG;IACH,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,yDAAyD;IACzD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gCAAgC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;;OAGG;IACH,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,GAAG,mBAAmB,CAAC;IAC9D,sFAAsF;IACtF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,oEAAoE;IACpE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,iBAAS,MAAM,CAAC,KAAK,EAAE,WAAW,+BAgEjC;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -7,7 +7,7 @@ type TabButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" |
|
|
|
7
7
|
value: string;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
* TabButton
|
|
10
|
+
* TabButton, individual tab button inside a `TabContainer`.
|
|
11
11
|
*
|
|
12
12
|
* Reads active state and disabled state from `TabContainer` context.
|
|
13
13
|
* The button's own `disabled` prop is ORed with the container's `disabled`.
|
|
@@ -11,7 +11,7 @@ type TabContainerProps = Omit<HTMLAttributes<HTMLElement>, "onChange" | "childre
|
|
|
11
11
|
onChange?: (index: string) => void;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
* TabContainer
|
|
14
|
+
* TabContainer, wrapper that manages active state for a group of `TabButton` components.
|
|
15
15
|
*
|
|
16
16
|
* Renders as a `<nav>` element. Provides context consumed by each `TabButton`.
|
|
17
17
|
*
|
|
@@ -5,7 +5,7 @@ type TableBodyProps = HTMLAttributes<HTMLTableSectionElement> & {
|
|
|
5
5
|
emptyMessage?: string;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
|
-
* TableBody
|
|
8
|
+
* TableBody, `<tbody>` section with built-in empty state handling.
|
|
9
9
|
*
|
|
10
10
|
* When `children` is empty, renders a full-width row with `emptyMessage`.
|
|
11
11
|
* Accepts all standard HTML `<tbody>` attributes.
|
|
@@ -2,7 +2,7 @@ import type { HTMLAttributes } from "react";
|
|
|
2
2
|
import "./styles.css";
|
|
3
3
|
type TableCaptionProps = HTMLAttributes<HTMLElement>;
|
|
4
4
|
/**
|
|
5
|
-
* TableCaption
|
|
5
|
+
* TableCaption, title / description placed above a table. Renders as a `<caption>` element.
|
|
6
6
|
*
|
|
7
7
|
* Accepts all standard HTML element attributes.
|
|
8
8
|
*
|
|
@@ -11,7 +11,7 @@ type TableCaptionProps = HTMLAttributes<HTMLElement>;
|
|
|
11
11
|
* @example
|
|
12
12
|
* ```tsx
|
|
13
13
|
* <TableContainer>
|
|
14
|
-
* <TableCaption>Orders
|
|
14
|
+
* <TableCaption>Orders, Q2 2025</TableCaption>
|
|
15
15
|
* <TableHeader>...</TableHeader>
|
|
16
16
|
* <TableBody>...</TableBody>
|
|
17
17
|
* </TableContainer>
|
|
@@ -2,7 +2,7 @@ import type { TableHTMLAttributes } from "react";
|
|
|
2
2
|
import "./styles.css";
|
|
3
3
|
type TableContainerProps = TableHTMLAttributes<HTMLTableElement>;
|
|
4
4
|
/**
|
|
5
|
-
* TableContainer
|
|
5
|
+
* TableContainer, root wrapper for the Table component set. Renders a responsive scrollable container around a `<table>`.
|
|
6
6
|
*
|
|
7
7
|
* Accepts all standard HTML `<table>` attributes.
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@ import type { HTMLAttributes } from "react";
|
|
|
2
2
|
import "./styles.css";
|
|
3
3
|
type TableFooterProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
4
4
|
/**
|
|
5
|
-
* TableFooter
|
|
5
|
+
* TableFooter, `<tfoot>` section with an automatic spacing row above the content.
|
|
6
6
|
*
|
|
7
7
|
* Children span all columns via `colSpan={100}`. Commonly used for `Pagination`.
|
|
8
8
|
* Accepts all standard HTML `<tfoot>` attributes.
|
|
@@ -2,9 +2,9 @@ import type { HTMLAttributes } from "react";
|
|
|
2
2
|
import "./styles.css";
|
|
3
3
|
type TableHeaderProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
4
4
|
/**
|
|
5
|
-
* TableHeader
|
|
5
|
+
* TableHeader, `<thead>` section with an automatic spacing row below the header row.
|
|
6
6
|
*
|
|
7
|
-
* Pass `<th>` elements as children
|
|
7
|
+
* Pass `<th>` elements as children, they are wrapped in a `<tr>` automatically.
|
|
8
8
|
* Accepts all standard HTML `<thead>` attributes.
|
|
9
9
|
*
|
|
10
10
|
* @returns TableHeader JSX element.
|
|
@@ -27,7 +27,7 @@ type TextareaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "name" |
|
|
|
27
27
|
defaultValue?: string;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* Textarea
|
|
30
|
+
* Textarea, multi-line text input with label, validation, and form integration.
|
|
31
31
|
*
|
|
32
32
|
* Integrates with `useForm` to display validation errors by field name.
|
|
33
33
|
*
|
|
@@ -18,7 +18,7 @@ type TooltipProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
|
18
18
|
size?: "md" | "lg";
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
|
-
* Tooltip
|
|
21
|
+
* Tooltip, shows a contextual text bubble on hover with smart viewport-aware positioning.
|
|
22
22
|
*
|
|
23
23
|
* The tooltip automatically flips to the opposite side when it would overflow the viewport.
|
|
24
24
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* useAutomation
|
|
2
|
+
* useAutomation, runs UI side-effects (close modals, scroll, toast) in response to a server action payload.
|
|
3
3
|
*
|
|
4
4
|
* Pass the raw response from a form submission. On every change the hook:
|
|
5
5
|
* 1. Closes all open modals if `closeModal` is `true`.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type DrawerContextProps } from "../providers/drawerProvider";
|
|
2
2
|
type OpenDrawerProps<T = any> = (data?: T) => void;
|
|
3
3
|
/**
|
|
4
|
-
* useDrawer
|
|
4
|
+
* useDrawer, accesses the nearest `DrawerProvider` context.
|
|
5
5
|
*
|
|
6
6
|
* Two call signatures:
|
|
7
|
-
* - **Without `key
|
|
8
|
-
* - **With `key
|
|
7
|
+
* - **Without `key`**, returns the raw context object (manage any drawer by name).
|
|
8
|
+
* - **With `key`**, returns a scoped object bound to one named drawer.
|
|
9
9
|
*
|
|
10
10
|
* @param key - Drawer identifier registered in `DrawerProvider`.
|
|
11
11
|
*
|
|
@@ -15,7 +15,7 @@ type OpenDrawerProps<T = any> = (data?: T) => void;
|
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```tsx
|
|
18
|
-
* // Scoped to one drawer
|
|
18
|
+
* // Scoped to one drawer, the most common pattern
|
|
19
19
|
* const { drawerIsOpen, drawerData, openDrawer, closeDrawer } = useDrawer<{ section: string }>('navigation');
|
|
20
20
|
*
|
|
21
21
|
* openDrawer({ section: 'products' });
|
|
@@ -23,7 +23,7 @@ type OpenDrawerProps<T = any> = (data?: T) => void;
|
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* ```tsx
|
|
26
|
-
* // Full context
|
|
26
|
+
* // Full context, useful when triggering multiple different drawers from one place
|
|
27
27
|
* const { openDrawer } = useDrawer();
|
|
28
28
|
*
|
|
29
29
|
* openDrawer('navigation', { section: 'main' });
|
package/dist/hooks/useForm.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* useForm
|
|
2
|
+
* useForm, reads the nearest `FormProvider` context to access field-level validation errors.
|
|
3
3
|
*
|
|
4
4
|
* All form inputs (`Input`, `Select`, `Checkbox`, etc.) call this hook internally,
|
|
5
5
|
* so you rarely need it directly. Use it when you want to read errors outside of
|
|
6
6
|
* an input component, or build a custom input.
|
|
7
7
|
*
|
|
8
8
|
* @returns Form context containing:
|
|
9
|
-
* - `fieldErrors
|
|
9
|
+
* - `fieldErrors`, `Record<string, string>` mapping field names to error messages.
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* useHydrated
|
|
2
|
+
* useHydrated, returns `true` once the component has hydrated on the client, `false` during SSR.
|
|
3
3
|
*
|
|
4
4
|
* Built on `useSyncExternalStore` so it is safe with React 18 concurrent rendering.
|
|
5
5
|
* Use this when you need to defer client-only rendering (e.g. browser APIs, `window`, `navigator`)
|
package/dist/hooks/useModal.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type ModalContextProps } from "../providers/modalProvider";
|
|
2
2
|
type OpenModalProps<T = any> = (data?: T) => void;
|
|
3
3
|
/**
|
|
4
|
-
* useModal
|
|
4
|
+
* useModal, accesses the nearest `ModalProvider` context.
|
|
5
5
|
*
|
|
6
6
|
* Two call signatures:
|
|
7
|
-
* - **Without `key
|
|
8
|
-
* - **With `key
|
|
7
|
+
* - **Without `key`**, returns the raw context object (manage any modal by name).
|
|
8
|
+
* - **With `key`**, returns a scoped object bound to one named modal.
|
|
9
9
|
*
|
|
10
10
|
* @param key - Modal identifier registered in `ModalProvider`.
|
|
11
11
|
*
|
|
@@ -15,7 +15,7 @@ type OpenModalProps<T = any> = (data?: T) => void;
|
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```tsx
|
|
18
|
-
* // Scoped to one modal
|
|
18
|
+
* // Scoped to one modal, the most common pattern
|
|
19
19
|
* const { modalIsOpen, modalData, openModal, closeModal } = useModal<{ id: number }>('confirm-delete');
|
|
20
20
|
*
|
|
21
21
|
* openModal({ id: user.id });
|
|
@@ -23,7 +23,7 @@ type OpenModalProps<T = any> = (data?: T) => void;
|
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* ```tsx
|
|
26
|
-
* // Full context
|
|
26
|
+
* // Full context, useful when triggering multiple different modals from one place
|
|
27
27
|
* const { openModal } = useModal();
|
|
28
28
|
*
|
|
29
29
|
* openModal('confirm-delete', { id: user.id });
|