@arkyn/components 3.0.1-beta.142 → 3.0.1-beta.144
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/dist/bundle.css +1 -1
- package/dist/components/alert/alertContainer/index.d.ts +27 -43
- package/dist/components/alert/alertContainer/index.d.ts.map +1 -1
- package/dist/components/alert/alertContainer/index.js +20 -40
- package/dist/components/alert/alertContent/index.d.ts +11 -36
- package/dist/components/alert/alertContent/index.d.ts.map +1 -1
- package/dist/components/alert/alertContent/index.js +11 -31
- package/dist/components/alert/alertDescription/index.d.ts +10 -38
- package/dist/components/alert/alertDescription/index.d.ts.map +1 -1
- package/dist/components/alert/alertDescription/index.js +10 -33
- package/dist/components/alert/alertIcon/index.d.ts +14 -38
- package/dist/components/alert/alertIcon/index.d.ts.map +1 -1
- package/dist/components/alert/alertIcon/index.js +14 -32
- package/dist/components/alert/alertTitle/index.d.ts +12 -35
- package/dist/components/alert/alertTitle/index.d.ts.map +1 -1
- package/dist/components/alert/alertTitle/index.js +12 -27
- package/dist/components/audioPlayer/index.d.ts +24 -32
- package/dist/components/audioPlayer/index.d.ts.map +1 -1
- package/dist/components/audioPlayer/index.js +15 -18
- package/dist/components/audioUpload/index.d.ts +37 -48
- package/dist/components/audioUpload/index.d.ts.map +1 -1
- package/dist/components/audioUpload/index.js +23 -48
- package/dist/components/badge/index.d.ts +31 -22
- package/dist/components/badge/index.d.ts.map +1 -1
- package/dist/components/badge/index.js +14 -22
- package/dist/components/button/index.d.ts +38 -28
- package/dist/components/button/index.d.ts.map +1 -1
- package/dist/components/button/index.js +18 -28
- package/dist/components/cardTab/cardTabButton/index.d.ts +14 -52
- package/dist/components/cardTab/cardTabButton/index.d.ts.map +1 -1
- package/dist/components/cardTab/cardTabButton/index.js +12 -52
- package/dist/components/cardTab/cardTabContainer/index.d.ts +16 -58
- package/dist/components/cardTab/cardTabContainer/index.d.ts.map +1 -1
- package/dist/components/cardTab/cardTabContainer/index.js +12 -58
- package/dist/components/checkbox/index.d.ts +38 -37
- package/dist/components/checkbox/index.d.ts.map +1 -1
- package/dist/components/checkbox/index.js +21 -37
- package/dist/components/clientOnly.d.ts +13 -66
- package/dist/components/clientOnly.d.ts.map +1 -1
- package/dist/components/clientOnly.js +11 -66
- package/dist/components/currencyInput/index.d.ts +67 -50
- package/dist/components/currencyInput/index.d.ts.map +1 -1
- package/dist/components/currencyInput/index.js +28 -50
- package/dist/components/divider/index.d.ts +12 -25
- package/dist/components/divider/index.d.ts.map +1 -1
- package/dist/components/divider/index.js +8 -25
- package/dist/components/drawer/drawerContainer/index.d.ts +16 -50
- package/dist/components/drawer/drawerContainer/index.d.ts.map +1 -1
- package/dist/components/drawer/drawerContainer/index.js +13 -50
- package/dist/components/drawer/drawerHeader/index.d.ts +9 -33
- package/dist/components/drawer/drawerHeader/index.d.ts.map +1 -1
- package/dist/components/drawer/drawerHeader/index.js +8 -33
- package/dist/components/facebookPixel/index.d.ts +47 -0
- package/dist/components/facebookPixel/index.d.ts.map +1 -1
- package/dist/components/facebookPixel/index.js +35 -0
- package/dist/components/fieldError/index.d.ts +4 -11
- package/dist/components/fieldError/index.d.ts.map +1 -1
- package/dist/components/fieldError/index.js +4 -11
- package/dist/components/fieldLabel/index.d.ts +6 -21
- package/dist/components/fieldLabel/index.d.ts.map +1 -1
- package/dist/components/fieldLabel/index.js +5 -21
- package/dist/components/fieldWrapper/index.d.ts +12 -22
- package/dist/components/fieldWrapper/index.d.ts.map +1 -1
- package/dist/components/fieldWrapper/index.js +7 -22
- package/dist/components/fileUpload/index.d.ts +36 -61
- package/dist/components/fileUpload/index.d.ts.map +1 -1
- package/dist/components/fileUpload/index.js +23 -61
- package/dist/components/googleAnalytics/index.d.ts +11 -7
- package/dist/components/googleAnalytics/index.d.ts.map +1 -1
- package/dist/components/googleAnalytics/index.js +9 -7
- package/dist/components/googleTagManager/index.d.ts +27 -21
- package/dist/components/googleTagManager/index.d.ts.map +1 -1
- package/dist/components/googleTagManager/index.js +20 -21
- package/dist/components/iconButton/index.d.ts +31 -15
- package/dist/components/iconButton/index.d.ts.map +1 -1
- package/dist/components/iconButton/index.js +12 -15
- package/dist/components/imageUpload/index.d.ts +47 -75
- package/dist/components/imageUpload/index.d.ts.map +1 -1
- package/dist/components/imageUpload/index.js +27 -75
- package/dist/components/input/index.d.ts +51 -44
- package/dist/components/input/index.d.ts.map +1 -1
- package/dist/components/input/index.js +24 -44
- package/dist/components/mapView/index.d.ts +44 -0
- package/dist/components/mapView/index.d.ts.map +1 -1
- package/dist/components/mapView/index.js +35 -0
- package/dist/components/maskedInput/index.d.ts +66 -51
- package/dist/components/maskedInput/index.d.ts.map +1 -1
- package/dist/components/maskedInput/index.js +28 -51
- package/dist/components/modal/modalContainer/index.d.ts +17 -57
- package/dist/components/modal/modalContainer/index.d.ts.map +1 -1
- package/dist/components/modal/modalContainer/index.js +15 -57
- package/dist/components/modal/modalFooter/index.d.ts +17 -50
- package/dist/components/modal/modalFooter/index.d.ts.map +1 -1
- package/dist/components/modal/modalFooter/index.js +10 -50
- package/dist/components/modal/modalHeader/index.d.ts +13 -47
- package/dist/components/modal/modalHeader/index.d.ts.map +1 -1
- package/dist/components/modal/modalHeader/index.js +12 -47
- package/dist/components/multiSelect/index.d.ts +67 -62
- package/dist/components/multiSelect/index.d.ts.map +1 -1
- package/dist/components/multiSelect/index.js +28 -62
- package/dist/components/pagination/index.d.ts +18 -9
- package/dist/components/pagination/index.d.ts.map +1 -1
- package/dist/components/pagination/index.js +18 -9
- package/dist/components/phoneInput/index.d.ts +65 -30
- package/dist/components/phoneInput/index.d.ts.map +1 -1
- package/dist/components/phoneInput/index.js +35 -30
- package/dist/components/popover/index.d.ts +34 -114
- package/dist/components/popover/index.d.ts.map +1 -1
- package/dist/components/popover/index.js +25 -114
- package/dist/components/radio/radioBox/index.d.ts +17 -65
- package/dist/components/radio/radioBox/index.d.ts.map +1 -1
- package/dist/components/radio/radioBox/index.js +14 -65
- package/dist/components/radio/radioGroup/index.d.ts +36 -67
- package/dist/components/radio/radioGroup/index.d.ts.map +1 -1
- package/dist/components/radio/radioGroup/index.js +25 -67
- package/dist/components/richText/index.d.ts +33 -47
- package/dist/components/richText/index.d.ts.map +1 -1
- package/dist/components/richText/index.js +30 -44
- package/dist/components/searchPlaces.d.ts +52 -50
- package/dist/components/searchPlaces.d.ts.map +1 -1
- package/dist/components/searchPlaces.js +23 -30
- package/dist/components/select/index.d.ts +68 -63
- package/dist/components/select/index.d.ts.map +1 -1
- package/dist/components/select/index.js +29 -63
- package/dist/components/slider/index.d.ts +20 -34
- package/dist/components/slider/index.d.ts.map +1 -1
- package/dist/components/slider/index.js +15 -33
- package/dist/components/switch/index.d.ts +42 -58
- package/dist/components/switch/index.d.ts.map +1 -1
- package/dist/components/switch/index.js +24 -58
- package/dist/components/tab/tabButton/index.d.ts +14 -52
- package/dist/components/tab/tabButton/index.d.ts.map +1 -1
- package/dist/components/tab/tabButton/index.js +12 -52
- package/dist/components/tab/tabContainer/index.d.ts +16 -58
- package/dist/components/tab/tabContainer/index.d.ts.map +1 -1
- package/dist/components/tab/tabContainer/index.js +12 -58
- package/dist/components/table/tableBody/index.d.ts +13 -47
- package/dist/components/table/tableBody/index.d.ts.map +1 -1
- package/dist/components/table/tableBody/index.js +12 -47
- package/dist/components/table/tableCaption/index.d.ts +6 -46
- package/dist/components/table/tableCaption/index.d.ts.map +1 -1
- package/dist/components/table/tableCaption/index.js +6 -46
- package/dist/components/table/tableContainer/index.d.ts +12 -41
- package/dist/components/table/tableContainer/index.d.ts.map +1 -1
- package/dist/components/table/tableContainer/index.js +12 -41
- package/dist/components/table/tableFooter/index.d.ts +5 -29
- package/dist/components/table/tableFooter/index.d.ts.map +1 -1
- package/dist/components/table/tableFooter/index.js +5 -29
- package/dist/components/table/tableHeader/index.d.ts +4 -25
- package/dist/components/table/tableHeader/index.d.ts.map +1 -1
- package/dist/components/table/tableHeader/index.js +4 -25
- package/dist/components/textarea/index.d.ts +32 -64
- package/dist/components/textarea/index.d.ts.map +1 -1
- package/dist/components/textarea/index.js +16 -64
- package/dist/components/tooltip/index.d.ts +27 -55
- package/dist/components/tooltip/index.d.ts.map +1 -1
- package/dist/components/tooltip/index.js +16 -55
- package/dist/hooks/useAutomation.d.ts +18 -26
- package/dist/hooks/useAutomation.d.ts.map +1 -1
- package/dist/hooks/useAutomation.js +18 -26
- package/dist/hooks/useDrawer.d.ts +19 -64
- package/dist/hooks/useDrawer.d.ts.map +1 -1
- package/dist/hooks/useForm.d.ts +12 -29
- package/dist/hooks/useForm.d.ts.map +1 -1
- package/dist/hooks/useForm.js +12 -29
- package/dist/hooks/useHydrated.d.ts +8 -63
- package/dist/hooks/useHydrated.d.ts.map +1 -1
- package/dist/hooks/useHydrated.js +8 -63
- package/dist/hooks/useModal.d.ts +19 -59
- package/dist/hooks/useModal.d.ts.map +1 -1
- package/dist/hooks/useScopedParams.d.ts +17 -69
- package/dist/hooks/useScopedParams.d.ts.map +1 -1
- package/dist/hooks/useScopedParams.js +17 -69
- package/dist/hooks/useScrollLock.d.ts +11 -27
- package/dist/hooks/useScrollLock.d.ts.map +1 -1
- package/dist/hooks/useScrollLock.js +11 -33
- package/dist/hooks/useSearchAutomation.d.ts +16 -34
- package/dist/hooks/useSearchAutomation.d.ts.map +1 -1
- package/dist/hooks/useSearchAutomation.js +16 -34
- package/dist/hooks/useSlider.d.ts +5 -19
- package/dist/hooks/useSlider.d.ts.map +1 -1
- package/dist/hooks/useSlider.js +5 -19
- package/dist/hooks/useToast.d.ts +8 -52
- package/dist/hooks/useToast.d.ts.map +1 -1
- package/dist/hooks/useToast.js +8 -52
- package/dist/providers/drawerProvider.d.ts +15 -81
- package/dist/providers/drawerProvider.d.ts.map +1 -1
- package/dist/providers/drawerProvider.js +15 -81
- package/dist/providers/formProvider.d.ts +17 -53
- package/dist/providers/formProvider.d.ts.map +1 -1
- package/dist/providers/formProvider.js +17 -53
- package/dist/providers/modalProvider.d.ts +16 -77
- package/dist/providers/modalProvider.d.ts.map +1 -1
- package/dist/providers/modalProvider.js +16 -77
- package/dist/providers/placesProvider.d.ts +16 -11
- package/dist/providers/placesProvider.d.ts.map +1 -1
- package/dist/providers/placesProvider.js +16 -11
- package/dist/providers/toastProvider.d.ts +10 -21
- package/dist/providers/toastProvider.d.ts.map +1 -1
- package/dist/providers/toastProvider.js +10 -21
- package/dist/services/toHtml.d.ts +11 -10
- package/dist/services/toHtml.d.ts.map +1 -1
- package/dist/services/toHtml.js +11 -10
- package/dist/services/toRichTextValue.d.ts +11 -17
- package/dist/services/toRichTextValue.d.ts.map +1 -1
- package/dist/services/toRichTextValue.js +11 -17
- package/package.json +1 -1
|
@@ -1,84 +1,36 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes } from "react";
|
|
2
2
|
import "./styles.css";
|
|
3
3
|
type RadioBoxProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
4
|
+
/** Value submitted to the form when this option is selected. Required. */
|
|
4
5
|
value: string;
|
|
6
|
+
/** Applies error styling. Inherited from `RadioGroup` when not set. */
|
|
5
7
|
isError?: boolean;
|
|
8
|
+
/** Size variant. Inherits from `RadioGroup` when not set. */
|
|
6
9
|
size?: "sm" | "md" | "lg";
|
|
7
10
|
};
|
|
8
11
|
/**
|
|
9
|
-
* RadioBox
|
|
12
|
+
* RadioBox — individual option inside a `RadioGroup`. Renders as a `<label>` + hidden `<button>` pair.
|
|
10
13
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @param props.isError - Optional error state indicator for styling
|
|
14
|
-
* @param props.size - Size variant for the radio box, inherits from RadioGroup if not specified
|
|
15
|
-
* @param props.children - Content to display next to the radio button (label text, icons, etc.)
|
|
14
|
+
* Reads active value, size, error state, and disabled state from `RadioGroup` context.
|
|
15
|
+
* Must be used as a direct child of `RadioGroup`.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
17
|
+
* @param props.value - Option value. Required.
|
|
18
|
+
* @param props.children - Option label content (text, icons, or rich markup).
|
|
19
|
+
* @param props.disabled - Disables this option (group can also disable all options).
|
|
20
|
+
* @param props.size - Size override. Inherits from group by default.
|
|
18
21
|
*
|
|
19
|
-
*
|
|
22
|
+
* **...Other valid HTML `<button>` properties**
|
|
23
|
+
*
|
|
24
|
+
* @returns RadioBox JSX element.
|
|
20
25
|
*
|
|
21
26
|
* @example
|
|
22
27
|
* ```tsx
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* <RadioBox value="
|
|
26
|
-
* <RadioBox value="
|
|
27
|
-
* <RadioBox value="other">Other</RadioBox>
|
|
28
|
-
* </RadioGroup>
|
|
29
|
-
*
|
|
30
|
-
* // Radio boxes with rich content
|
|
31
|
-
* <RadioGroup name="plan" label="Choose your plan">
|
|
32
|
-
* <RadioBox value="basic">
|
|
33
|
-
* <div>
|
|
34
|
-
* <h4>Basic Plan</h4>
|
|
35
|
-
* <p>$9.99/month - Perfect for individuals</p>
|
|
36
|
-
* </div>
|
|
37
|
-
* </RadioBox>
|
|
38
|
-
* <RadioBox value="premium">
|
|
39
|
-
* <div>
|
|
40
|
-
* <h4>Premium Plan</h4>
|
|
41
|
-
* <p>$19.99/month - Great for small teams</p>
|
|
42
|
-
* </div>
|
|
43
|
-
* </RadioBox>
|
|
44
|
-
* </RadioGroup>
|
|
45
|
-
*
|
|
46
|
-
* // Radio boxes with custom size override
|
|
47
|
-
* <RadioGroup name="priority" size="md">
|
|
48
|
-
* <RadioBox value="low" size="sm">Low Priority</RadioBox>
|
|
49
|
-
* <RadioBox value="medium">Medium Priority</RadioBox>
|
|
50
|
-
* <RadioBox value="high" size="lg">High Priority</RadioBox>
|
|
51
|
-
* </RadioGroup>
|
|
52
|
-
*
|
|
53
|
-
* // Radio boxes with disabled state
|
|
54
|
-
* <RadioGroup name="options">
|
|
55
|
-
* <RadioBox value="option1">Available Option</RadioBox>
|
|
56
|
-
* <RadioBox value="option2" disabled>Disabled Option</RadioBox>
|
|
57
|
-
* <RadioBox value="option3">Another Available Option</RadioBox>
|
|
58
|
-
* </RadioGroup>
|
|
59
|
-
*
|
|
60
|
-
* // Radio boxes with custom styling
|
|
61
|
-
* <RadioGroup name="theme">
|
|
62
|
-
* <RadioBox value="light" className="theme-option">
|
|
63
|
-
* 🌞 Light Theme
|
|
64
|
-
* </RadioBox>
|
|
65
|
-
* <RadioBox value="dark" className="theme-option">
|
|
66
|
-
* 🌙 Dark Theme
|
|
67
|
-
* </RadioBox>
|
|
68
|
-
* <RadioBox value="auto" className="theme-option">
|
|
69
|
-
* 🔄 Auto Theme
|
|
70
|
-
* </RadioBox>
|
|
28
|
+
* <RadioGroup name="plan" label="Choose a plan" onChange={setPlan}>
|
|
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>
|
|
71
32
|
* </RadioGroup>
|
|
72
33
|
* ```
|
|
73
|
-
*
|
|
74
|
-
* @remarks
|
|
75
|
-
* This component must be used as a child of RadioGroup. It automatically inherits:
|
|
76
|
-
* - Group name for form handling
|
|
77
|
-
* - Size from parent RadioGroup (unless overridden)
|
|
78
|
-
* - Change handlers and state management
|
|
79
|
-
* - Error states from form validation
|
|
80
|
-
*
|
|
81
|
-
* The component handles both click and focus events for accessibility.
|
|
82
34
|
*/
|
|
83
35
|
declare function RadioBox(props: RadioBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
84
36
|
export { RadioBox };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/radio/radioBox/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAG7C,OAAO,cAAc,CAAC;AAEtB,KAAK,aAAa,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/radio/radioBox/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAG7C,OAAO,cAAc,CAAC;AAEtB,KAAK,aAAa,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAC7D,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,iBAAS,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAqDrC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -2,79 +2,28 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRadioGroup } from "../radioContext";
|
|
3
3
|
import "./styles.css";
|
|
4
4
|
/**
|
|
5
|
-
* RadioBox
|
|
5
|
+
* RadioBox — individual option inside a `RadioGroup`. Renders as a `<label>` + hidden `<button>` pair.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* @param props.isError - Optional error state indicator for styling
|
|
10
|
-
* @param props.size - Size variant for the radio box, inherits from RadioGroup if not specified
|
|
11
|
-
* @param props.children - Content to display next to the radio button (label text, icons, etc.)
|
|
7
|
+
* Reads active value, size, error state, and disabled state from `RadioGroup` context.
|
|
8
|
+
* Must be used as a direct child of `RadioGroup`.
|
|
12
9
|
*
|
|
13
|
-
*
|
|
10
|
+
* @param props.value - Option value. Required.
|
|
11
|
+
* @param props.children - Option label content (text, icons, or rich markup).
|
|
12
|
+
* @param props.disabled - Disables this option (group can also disable all options).
|
|
13
|
+
* @param props.size - Size override. Inherits from group by default.
|
|
14
14
|
*
|
|
15
|
-
*
|
|
15
|
+
* **...Other valid HTML `<button>` properties**
|
|
16
|
+
*
|
|
17
|
+
* @returns RadioBox JSX element.
|
|
16
18
|
*
|
|
17
19
|
* @example
|
|
18
20
|
* ```tsx
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* <RadioBox value="
|
|
22
|
-
* <RadioBox value="
|
|
23
|
-
* <RadioBox value="other">Other</RadioBox>
|
|
24
|
-
* </RadioGroup>
|
|
25
|
-
*
|
|
26
|
-
* // Radio boxes with rich content
|
|
27
|
-
* <RadioGroup name="plan" label="Choose your plan">
|
|
28
|
-
* <RadioBox value="basic">
|
|
29
|
-
* <div>
|
|
30
|
-
* <h4>Basic Plan</h4>
|
|
31
|
-
* <p>$9.99/month - Perfect for individuals</p>
|
|
32
|
-
* </div>
|
|
33
|
-
* </RadioBox>
|
|
34
|
-
* <RadioBox value="premium">
|
|
35
|
-
* <div>
|
|
36
|
-
* <h4>Premium Plan</h4>
|
|
37
|
-
* <p>$19.99/month - Great for small teams</p>
|
|
38
|
-
* </div>
|
|
39
|
-
* </RadioBox>
|
|
40
|
-
* </RadioGroup>
|
|
41
|
-
*
|
|
42
|
-
* // Radio boxes with custom size override
|
|
43
|
-
* <RadioGroup name="priority" size="md">
|
|
44
|
-
* <RadioBox value="low" size="sm">Low Priority</RadioBox>
|
|
45
|
-
* <RadioBox value="medium">Medium Priority</RadioBox>
|
|
46
|
-
* <RadioBox value="high" size="lg">High Priority</RadioBox>
|
|
47
|
-
* </RadioGroup>
|
|
48
|
-
*
|
|
49
|
-
* // Radio boxes with disabled state
|
|
50
|
-
* <RadioGroup name="options">
|
|
51
|
-
* <RadioBox value="option1">Available Option</RadioBox>
|
|
52
|
-
* <RadioBox value="option2" disabled>Disabled Option</RadioBox>
|
|
53
|
-
* <RadioBox value="option3">Another Available Option</RadioBox>
|
|
54
|
-
* </RadioGroup>
|
|
55
|
-
*
|
|
56
|
-
* // Radio boxes with custom styling
|
|
57
|
-
* <RadioGroup name="theme">
|
|
58
|
-
* <RadioBox value="light" className="theme-option">
|
|
59
|
-
* 🌞 Light Theme
|
|
60
|
-
* </RadioBox>
|
|
61
|
-
* <RadioBox value="dark" className="theme-option">
|
|
62
|
-
* 🌙 Dark Theme
|
|
63
|
-
* </RadioBox>
|
|
64
|
-
* <RadioBox value="auto" className="theme-option">
|
|
65
|
-
* 🔄 Auto Theme
|
|
66
|
-
* </RadioBox>
|
|
21
|
+
* <RadioGroup name="plan" label="Choose a plan" onChange={setPlan}>
|
|
22
|
+
* <RadioBox value="basic">Basic — $9/mo</RadioBox>
|
|
23
|
+
* <RadioBox value="pro">Pro — $29/mo</RadioBox>
|
|
24
|
+
* <RadioBox value="enterprise" disabled>Enterprise — contact us</RadioBox>
|
|
67
25
|
* </RadioGroup>
|
|
68
26
|
* ```
|
|
69
|
-
*
|
|
70
|
-
* @remarks
|
|
71
|
-
* This component must be used as a child of RadioGroup. It automatically inherits:
|
|
72
|
-
* - Group name for form handling
|
|
73
|
-
* - Size from parent RadioGroup (unless overridden)
|
|
74
|
-
* - Change handlers and state management
|
|
75
|
-
* - Error states from form validation
|
|
76
|
-
*
|
|
77
|
-
* The component handles both click and focus events for accessibility.
|
|
78
27
|
*/
|
|
79
28
|
function RadioBox(props) {
|
|
80
29
|
const { value: componentValue, size: componentSize, disabled, children, className: baseClassName = "", onClick, onFocus, ...rest } = props;
|
|
@@ -1,94 +1,63 @@
|
|
|
1
1
|
import { HTMLAttributes } from "react";
|
|
2
2
|
import "./styles.css";
|
|
3
3
|
type RadioGroupProps = Omit<HTMLAttributes<HTMLDivElement>, "onChange"> & {
|
|
4
|
+
/** Field name used for form submission. Required. */
|
|
4
5
|
name: string;
|
|
6
|
+
/** Label displayed above the group. */
|
|
5
7
|
label?: string;
|
|
8
|
+
/** Appends an asterisk to the label. @default false */
|
|
6
9
|
showAsterisk?: boolean;
|
|
10
|
+
/** Error message shown below the group. Overrides `fieldErrors[name]` from `FormProvider`. */
|
|
7
11
|
errorMessage?: string;
|
|
12
|
+
/** Controlled selected value. */
|
|
8
13
|
value?: string;
|
|
14
|
+
/** Initial selected value (uncontrolled). @default "" */
|
|
9
15
|
defaultValue?: string;
|
|
16
|
+
/** Callback fired when the selected option changes. */
|
|
10
17
|
onChange?: (value: string) => void;
|
|
18
|
+
/** Size variant applied to all `RadioBox` children. @default "md" */
|
|
11
19
|
size?: "sm" | "md" | "lg";
|
|
20
|
+
/** Disables all `RadioBox` children. @default false */
|
|
12
21
|
disabled?: boolean;
|
|
22
|
+
/** When `true`, skips the `FieldTemplate` wrapper (label, error message). @default false */
|
|
13
23
|
unShowFieldTemplate?: boolean;
|
|
24
|
+
/** Layout direction of the `FieldWrapper`. @default "horizontal" */
|
|
14
25
|
orientation?: "horizontal" | "vertical" | "horizontalReverse";
|
|
15
26
|
};
|
|
16
27
|
/**
|
|
17
|
-
* RadioGroup
|
|
28
|
+
* RadioGroup — managed group of `RadioBox` options with form integration.
|
|
18
29
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* @param props.label - Optional label text to display above the radio group
|
|
22
|
-
* @param props.showAsterisk - Whether to show asterisk on label for required fields
|
|
23
|
-
* @param props.errorMessage - Error message to display below the radio group
|
|
24
|
-
* @param props.value - Controlled value for the selected radio option
|
|
25
|
-
* @param props.defaultValue - Default selected value for uncontrolled usage. Default: ""
|
|
26
|
-
* @param props.onChange - Callback function called when radio selection changes, receives the selected value
|
|
27
|
-
* @param props.size - Size variant for all radio buttons in the group. Default: "md"
|
|
28
|
-
* @param props.unShowFieldTemplate - When true, skips `FieldTemplate` structure (wrapper, label and error text) and renders only the checkbox button content.
|
|
29
|
-
* @param props.orientation - Layout direction forwarded to `FieldTemplate`/`FieldWrapper` (`horizontal`, `vertical`, `horizontalReverse`). Default: "horizontalReverse"
|
|
30
|
+
* Renders a hidden `<input>` for native form submission. Reads `fieldErrors[name]` from
|
|
31
|
+
* the nearest `FormProvider` when no `errorMessage` is explicitly provided.
|
|
30
32
|
*
|
|
31
|
-
*
|
|
33
|
+
* @param props.name - Form field name. Required.
|
|
34
|
+
* @param props.label - Label displayed above the group.
|
|
35
|
+
* @param props.showAsterisk - Appends `*` to the label. Default: false
|
|
36
|
+
* @param props.value - Controlled selection.
|
|
37
|
+
* @param props.defaultValue - Initial selection (uncontrolled). Default: `""`
|
|
38
|
+
* @param props.onChange - Called with the newly selected value.
|
|
39
|
+
* @param props.size - Size for all child `RadioBox` elements. Default: `"md"`
|
|
40
|
+
* @param props.disabled - Disables all options. Default: false
|
|
41
|
+
* @param props.errorMessage - Validation error message.
|
|
42
|
+
* @param props.unShowFieldTemplate - Omit label/error wrapper. Default: false
|
|
32
43
|
*
|
|
33
|
-
*
|
|
44
|
+
* **...Other valid HTML `<div>` properties**
|
|
45
|
+
*
|
|
46
|
+
* @returns RadioGroup JSX element.
|
|
34
47
|
*
|
|
35
48
|
* @example
|
|
36
49
|
* ```tsx
|
|
37
|
-
* //
|
|
38
|
-
* <RadioGroup name="gender">
|
|
39
|
-
* <
|
|
40
|
-
* <
|
|
41
|
-
* <
|
|
42
|
-
* </RadioGroup>
|
|
43
|
-
*
|
|
44
|
-
* // Radio group with label and validation
|
|
45
|
-
* <RadioGroup
|
|
46
|
-
* name="subscription"
|
|
47
|
-
* label="Choose your plan"
|
|
48
|
-
* showAsterisk
|
|
49
|
-
* errorMessage="Please select a subscription plan"
|
|
50
|
-
* >
|
|
51
|
-
* <Radio value="basic" label="Basic Plan - $9.99/month" />
|
|
52
|
-
* <Radio value="premium" label="Premium Plan - $19.99/month" />
|
|
53
|
-
* <Radio value="enterprise" label="Enterprise Plan - $49.99/month" />
|
|
54
|
-
* </RadioGroup>
|
|
55
|
-
*
|
|
56
|
-
* // Controlled radio group with callback
|
|
57
|
-
* <RadioGroup
|
|
58
|
-
* name="theme"
|
|
59
|
-
* label="Select Theme"
|
|
60
|
-
* value={selectedTheme}
|
|
61
|
-
* onChange={(value) => setSelectedTheme(value)}
|
|
62
|
-
* size="lg"
|
|
63
|
-
* >
|
|
64
|
-
* <Radio value="light" label="Light Theme" />
|
|
65
|
-
* <Radio value="dark" label="Dark Theme" />
|
|
66
|
-
* <Radio value="auto" label="Auto (System)" />
|
|
67
|
-
* </RadioGroup>
|
|
68
|
-
*
|
|
69
|
-
* // Radio group with default selection
|
|
70
|
-
* <RadioGroup
|
|
71
|
-
* name="language"
|
|
72
|
-
* label="Preferred Language"
|
|
73
|
-
* defaultValue="en"
|
|
74
|
-
* size="sm"
|
|
75
|
-
* >
|
|
76
|
-
* <Radio value="en" label="English" />
|
|
77
|
-
* <Radio value="es" label="Spanish" />
|
|
78
|
-
* <Radio value="fr" label="French" />
|
|
79
|
-
* <Radio value="pt" label="Portuguese" />
|
|
50
|
+
* // Uncontrolled with label
|
|
51
|
+
* <RadioGroup name="gender" label="Gender" showAsterisk defaultValue="male">
|
|
52
|
+
* <RadioBox value="male">Male</RadioBox>
|
|
53
|
+
* <RadioBox value="female">Female</RadioBox>
|
|
54
|
+
* <RadioBox value="other">Other</RadioBox>
|
|
80
55
|
* </RadioGroup>
|
|
81
56
|
*
|
|
82
|
-
* //
|
|
83
|
-
* <RadioGroup
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* className="custom-radio-group"
|
|
87
|
-
* onChange={(value) => console.log('Selected difficulty:', value)}
|
|
88
|
-
* >
|
|
89
|
-
* <Radio value="easy" label="Easy" />
|
|
90
|
-
* <Radio value="medium" label="Medium" />
|
|
91
|
-
* <Radio value="hard" label="Hard" />
|
|
57
|
+
* // Controlled with change handler
|
|
58
|
+
* <RadioGroup name="plan" label="Subscription plan" value={plan} onChange={setPlan}>
|
|
59
|
+
* <RadioBox value="basic">Basic — $9/mo</RadioBox>
|
|
60
|
+
* <RadioBox value="pro">Pro — $29/mo</RadioBox>
|
|
92
61
|
* </RadioGroup>
|
|
93
62
|
* ```
|
|
94
63
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/radio/radioGroup/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAY,MAAM,OAAO,CAAC;AAMjD,OAAO,cAAc,CAAC;AAEtB,KAAK,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,GAAG;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,mBAAmB,CAAC;CAC/D,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/radio/radioGroup/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAY,MAAM,OAAO,CAAC;AAMjD,OAAO,cAAc,CAAC;AAEtB,KAAK,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,GAAG;IACxE,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8FAA8F;IAC9F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,qEAAqE;IACrE,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4FAA4F;IAC5F,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,oEAAoE;IACpE,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,mBAAmB,CAAC;CAC/D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,2CA0DzC;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -5,81 +5,39 @@ import { FieldTemplate } from "../../../services/fieldTemplate";
|
|
|
5
5
|
import { RadioProvider } from "../radioContext";
|
|
6
6
|
import "./styles.css";
|
|
7
7
|
/**
|
|
8
|
-
* RadioGroup
|
|
8
|
+
* RadioGroup — managed group of `RadioBox` options with form integration.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* @param props.label - Optional label text to display above the radio group
|
|
13
|
-
* @param props.showAsterisk - Whether to show asterisk on label for required fields
|
|
14
|
-
* @param props.errorMessage - Error message to display below the radio group
|
|
15
|
-
* @param props.value - Controlled value for the selected radio option
|
|
16
|
-
* @param props.defaultValue - Default selected value for uncontrolled usage. Default: ""
|
|
17
|
-
* @param props.onChange - Callback function called when radio selection changes, receives the selected value
|
|
18
|
-
* @param props.size - Size variant for all radio buttons in the group. Default: "md"
|
|
19
|
-
* @param props.unShowFieldTemplate - When true, skips `FieldTemplate` structure (wrapper, label and error text) and renders only the checkbox button content.
|
|
20
|
-
* @param props.orientation - Layout direction forwarded to `FieldTemplate`/`FieldWrapper` (`horizontal`, `vertical`, `horizontalReverse`). Default: "horizontalReverse"
|
|
10
|
+
* Renders a hidden `<input>` for native form submission. Reads `fieldErrors[name]` from
|
|
11
|
+
* the nearest `FormProvider` when no `errorMessage` is explicitly provided.
|
|
21
12
|
*
|
|
22
|
-
*
|
|
13
|
+
* @param props.name - Form field name. Required.
|
|
14
|
+
* @param props.label - Label displayed above the group.
|
|
15
|
+
* @param props.showAsterisk - Appends `*` to the label. Default: false
|
|
16
|
+
* @param props.value - Controlled selection.
|
|
17
|
+
* @param props.defaultValue - Initial selection (uncontrolled). Default: `""`
|
|
18
|
+
* @param props.onChange - Called with the newly selected value.
|
|
19
|
+
* @param props.size - Size for all child `RadioBox` elements. Default: `"md"`
|
|
20
|
+
* @param props.disabled - Disables all options. Default: false
|
|
21
|
+
* @param props.errorMessage - Validation error message.
|
|
22
|
+
* @param props.unShowFieldTemplate - Omit label/error wrapper. Default: false
|
|
23
23
|
*
|
|
24
|
-
*
|
|
24
|
+
* **...Other valid HTML `<div>` properties**
|
|
25
|
+
*
|
|
26
|
+
* @returns RadioGroup JSX element.
|
|
25
27
|
*
|
|
26
28
|
* @example
|
|
27
29
|
* ```tsx
|
|
28
|
-
* //
|
|
29
|
-
* <RadioGroup name="gender">
|
|
30
|
-
* <
|
|
31
|
-
* <
|
|
32
|
-
* <
|
|
33
|
-
* </RadioGroup>
|
|
34
|
-
*
|
|
35
|
-
* // Radio group with label and validation
|
|
36
|
-
* <RadioGroup
|
|
37
|
-
* name="subscription"
|
|
38
|
-
* label="Choose your plan"
|
|
39
|
-
* showAsterisk
|
|
40
|
-
* errorMessage="Please select a subscription plan"
|
|
41
|
-
* >
|
|
42
|
-
* <Radio value="basic" label="Basic Plan - $9.99/month" />
|
|
43
|
-
* <Radio value="premium" label="Premium Plan - $19.99/month" />
|
|
44
|
-
* <Radio value="enterprise" label="Enterprise Plan - $49.99/month" />
|
|
45
|
-
* </RadioGroup>
|
|
46
|
-
*
|
|
47
|
-
* // Controlled radio group with callback
|
|
48
|
-
* <RadioGroup
|
|
49
|
-
* name="theme"
|
|
50
|
-
* label="Select Theme"
|
|
51
|
-
* value={selectedTheme}
|
|
52
|
-
* onChange={(value) => setSelectedTheme(value)}
|
|
53
|
-
* size="lg"
|
|
54
|
-
* >
|
|
55
|
-
* <Radio value="light" label="Light Theme" />
|
|
56
|
-
* <Radio value="dark" label="Dark Theme" />
|
|
57
|
-
* <Radio value="auto" label="Auto (System)" />
|
|
58
|
-
* </RadioGroup>
|
|
59
|
-
*
|
|
60
|
-
* // Radio group with default selection
|
|
61
|
-
* <RadioGroup
|
|
62
|
-
* name="language"
|
|
63
|
-
* label="Preferred Language"
|
|
64
|
-
* defaultValue="en"
|
|
65
|
-
* size="sm"
|
|
66
|
-
* >
|
|
67
|
-
* <Radio value="en" label="English" />
|
|
68
|
-
* <Radio value="es" label="Spanish" />
|
|
69
|
-
* <Radio value="fr" label="French" />
|
|
70
|
-
* <Radio value="pt" label="Portuguese" />
|
|
30
|
+
* // Uncontrolled with label
|
|
31
|
+
* <RadioGroup name="gender" label="Gender" showAsterisk defaultValue="male">
|
|
32
|
+
* <RadioBox value="male">Male</RadioBox>
|
|
33
|
+
* <RadioBox value="female">Female</RadioBox>
|
|
34
|
+
* <RadioBox value="other">Other</RadioBox>
|
|
71
35
|
* </RadioGroup>
|
|
72
36
|
*
|
|
73
|
-
* //
|
|
74
|
-
* <RadioGroup
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* className="custom-radio-group"
|
|
78
|
-
* onChange={(value) => console.log('Selected difficulty:', value)}
|
|
79
|
-
* >
|
|
80
|
-
* <Radio value="easy" label="Easy" />
|
|
81
|
-
* <Radio value="medium" label="Medium" />
|
|
82
|
-
* <Radio value="hard" label="Hard" />
|
|
37
|
+
* // Controlled with change handler
|
|
38
|
+
* <RadioGroup name="plan" label="Subscription plan" value={plan} onChange={setPlan}>
|
|
39
|
+
* <RadioBox value="basic">Basic — $9/mo</RadioBox>
|
|
40
|
+
* <RadioBox value="pro">Pro — $29/mo</RadioBox>
|
|
83
41
|
* </RadioGroup>
|
|
84
42
|
* ```
|
|
85
43
|
*/
|
|
@@ -1,67 +1,53 @@
|
|
|
1
1
|
import { RichTextProps } from "../../types/richTextTypes";
|
|
2
2
|
import "./styles.css";
|
|
3
3
|
/**
|
|
4
|
-
* RichText
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @param props.name -
|
|
12
|
-
* @param props.
|
|
13
|
-
* @param props.
|
|
14
|
-
* @param props.
|
|
15
|
-
* @param props.
|
|
16
|
-
* @param props.
|
|
17
|
-
* @param props.
|
|
18
|
-
* @param props.
|
|
19
|
-
* @param props.onChange - Callback
|
|
20
|
-
* @param props.
|
|
21
|
-
* @param props.
|
|
22
|
-
* @param props.
|
|
23
|
-
* @param props.
|
|
24
|
-
*
|
|
25
|
-
* @
|
|
4
|
+
* RichText — WYSIWYG rich-text editor built on Slate.js with a configurable toolbar.
|
|
5
|
+
*
|
|
6
|
+
* **Toolbar features:** bold, italic, underline, code, H1/H2, block quote, alignment (left/center/right/justify), image and video insertion.
|
|
7
|
+
*
|
|
8
|
+
* Editor content is stored as a Slate JSON string in a hidden `<input>` for form submission.
|
|
9
|
+
* Integrates with `useForm` to display validation errors by field name.
|
|
10
|
+
*
|
|
11
|
+
* @param props.name - Field name for form submission. Required.
|
|
12
|
+
* @param props.label - Label text displayed above the editor.
|
|
13
|
+
* @param props.hiddenButtons - Toolbar button keys to hide (e.g. `["image", "code"]`).
|
|
14
|
+
* @param props.imageConfig - Enables image insertion; contains the upload endpoint and modal labels.
|
|
15
|
+
* @param props.defaultValue - Initial editor content as a Slate JSON string. Default: "[]"
|
|
16
|
+
* @param props.maxLimit - Maximum character count. Default: 10000
|
|
17
|
+
* @param props.enforceCharacterLimit - Prevents typing past `maxLimit`. Default: false
|
|
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
|
+
* @param props.baseErrorMessage - Custom error message (overrides `useForm` context error).
|
|
21
|
+
* @param props.isError - Forces the error visual state.
|
|
22
|
+
* @param props.id - Custom id for the editable area element.
|
|
23
|
+
* @param props.showAsterisk - Appends `*` to the label.
|
|
24
|
+
* @param props.orientation - Layout direction. Default: "horizontal"
|
|
25
|
+
* @param props.unShowFieldTemplate - Skips wrapper, label, and error rendering. Default: false
|
|
26
|
+
*
|
|
27
|
+
* @returns RichText JSX element wrapped in `FieldTemplate`.
|
|
26
28
|
*
|
|
27
29
|
* @example
|
|
28
30
|
* ```tsx
|
|
29
|
-
* // Basic
|
|
31
|
+
* // Basic
|
|
30
32
|
* <RichText name="content" />
|
|
31
33
|
*
|
|
32
|
-
* // With character limit and
|
|
34
|
+
* // With character limit and hidden toolbar buttons
|
|
33
35
|
* <RichText
|
|
34
36
|
* name="description"
|
|
37
|
+
* label="Description"
|
|
35
38
|
* maxLimit={500}
|
|
36
|
-
* enforceCharacterLimit
|
|
37
|
-
* hiddenButtons={["image", "code"]}
|
|
38
|
-
* onChangeCharactersCount={(
|
|
39
|
+
* enforceCharacterLimit
|
|
40
|
+
* hiddenButtons={["image", "video", "code"]}
|
|
41
|
+
* onChangeCharactersCount={(n) => setCharCount(n)}
|
|
39
42
|
* />
|
|
40
43
|
*
|
|
41
|
-
* // With image upload
|
|
44
|
+
* // With image upload support
|
|
42
45
|
* <RichText
|
|
43
46
|
* name="article"
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* modalTitle: "Insert Image",
|
|
47
|
-
* modalInputUrlLabel: "Image URL",
|
|
48
|
-
* modalInputImageLabel: "Upload Image"
|
|
49
|
-
* }}
|
|
47
|
+
* label="Article Body"
|
|
48
|
+
* imageConfig={{ action: "/api/upload" }}
|
|
50
49
|
* />
|
|
51
50
|
* ```
|
|
52
|
-
*
|
|
53
|
-
* @description
|
|
54
|
-
* The component includes:
|
|
55
|
-
* - **Formatting**: Bold, italic, underline, code, headings (H1, H2), block quotes
|
|
56
|
-
* - **Alignment**: Left, center, right, justify
|
|
57
|
-
* - **Image Support**: Upload and URL insertion (when imageConfig is provided)
|
|
58
|
-
* - **Character Limits**: Configurable limits with visual feedback
|
|
59
|
-
* - **Form Integration**: Works with form providers and validation
|
|
60
|
-
* - **Keyboard Shortcuts**: Standard shortcuts for formatting (Ctrl+B, Ctrl+I, etc.)
|
|
61
|
-
* - **Error Handling**: Visual error states and validation messages
|
|
62
|
-
*
|
|
63
|
-
* The editor outputs JSON data representing the document structure, which can be
|
|
64
|
-
* converted to HTML using the provided utility functions.
|
|
65
51
|
*/
|
|
66
52
|
declare function RichText(props: RichTextProps): import("react/jsx-runtime").JSX.Element;
|
|
67
53
|
export { RichText };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/richText/index.tsx"],"names":[],"mappings":"AAgCA,OAAO,EAEL,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,cAAc,CAAC;AAEtB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/richText/index.tsx"],"names":[],"mappings":"AAgCA,OAAO,EAEL,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,cAAc,CAAC;AAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,iBAAS,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAuMrC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|