@spteck/react-controls-v2 2.4.3 → 2.5.1
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/{LocalizationProvider-CvSHuk0e.js → LocalizationProvider-CBc0PcyH.js} +140 -48
- package/dist/LocalizationProvider-CJ2mjvH-.cjs +2 -0
- package/dist/{ar-BPzd6WER.js → ar-D78_ioot.js} +93 -1
- package/dist/{ar-CBSdRr5Q.cjs → ar-DbkaJtO2.cjs} +2 -2
- package/dist/{az-DoZjCfF0.cjs → az-Cf7y5UC1.cjs} +2 -2
- package/dist/{az-MWX-WDgc.js → az-OomGCL5f.js} +93 -1
- package/dist/{bg-CvRGS4sF.js → bg-OQDPULfM.js} +93 -1
- package/dist/{bg-DI8UD_HF.cjs → bg-nghgX11u.cjs} +2 -2
- package/dist/{bs-aXQgChJT.js → bs-BYdzDqQ_.js} +93 -1
- package/dist/{bs-DQhZlEEo.cjs → bs-CMdfvb33.cjs} +2 -2
- package/dist/{ca-BCXCXzgh.js → ca-9lGrM-T0.js} +93 -1
- package/dist/{ca-DSC32tOX.cjs → ca-C8cBXf9y.cjs} +2 -2
- package/dist/components/BackgroundImage/BackgroundImage.d.ts +4 -0
- package/dist/components/BackgroundImage/IBackgroundImageProps.d.ts +14 -0
- package/dist/components/BackgroundImage/index.d.ts +3 -0
- package/dist/components/BackgroundImage/useBackgroundImageStyles.d.ts +4 -0
- package/dist/components/Blockquote/Blockquote.d.ts +4 -0
- package/dist/components/Blockquote/IBlockquoteProps.d.ts +21 -0
- package/dist/components/Blockquote/index.d.ts +4 -0
- package/dist/components/Blockquote/useBlockquoteStyles.d.ts +6 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +51 -0
- package/dist/components/ColorPicker/ColorPickerAlpha.d.ts +4 -0
- package/dist/components/ColorPicker/ColorPickerBlock.d.ts +4 -0
- package/dist/components/ColorPicker/ColorPickerChrome.d.ts +4 -0
- package/dist/components/ColorPicker/ColorPickerCircle.d.ts +4 -0
- package/dist/components/ColorPicker/ColorPickerColorful.d.ts +4 -0
- package/dist/components/ColorPicker/ColorPickerCompact.d.ts +4 -0
- package/dist/components/ColorPicker/ColorPickerEditableInput.d.ts +4 -0
- package/dist/components/ColorPicker/ColorPickerEditableInputHSLA.d.ts +4 -0
- package/dist/components/ColorPicker/ColorPickerEditableInputRGBA.d.ts +4 -0
- package/dist/components/ColorPicker/ColorPickerHue.d.ts +4 -0
- package/dist/components/ColorPicker/ColorPickerInteractive.d.ts +6 -0
- package/dist/components/ColorPicker/ColorPickerSaturation.d.ts +4 -0
- package/dist/components/ColorPicker/ColorPickerShadeSlider.d.ts +4 -0
- package/dist/components/ColorPicker/ColorPickerSketch.d.ts +4 -0
- package/dist/components/ColorPicker/ColorPickerSlider.d.ts +4 -0
- package/dist/components/ColorPicker/ColorPickerSwatch.d.ts +4 -0
- package/dist/components/ColorPicker/ColorPickerTheme.d.ts +4 -0
- package/dist/components/ColorPicker/ColorPickerWheel.d.ts +4 -0
- package/dist/components/ColorPicker/IColorPickerProps.d.ts +297 -0
- package/dist/components/ColorPicker/colorConvert.d.ts +72 -0
- package/dist/components/ColorPicker/index.d.ts +25 -0
- package/dist/components/ColorPicker/useColorPickerStyles.d.ts +30 -0
- package/dist/components/CompactCalendar/CalendarGrid.d.ts +4 -0
- package/dist/components/CompactCalendar/CalendarHeader.d.ts +4 -0
- package/dist/components/CompactCalendar/CompactCalendar.d.ts +4 -0
- package/dist/components/CompactCalendar/EventsList.d.ts +4 -0
- package/dist/components/CompactCalendar/ICalendarGridProps.d.ts +32 -0
- package/dist/components/CompactCalendar/ICalendarHeaderProps.d.ts +15 -0
- package/dist/components/CompactCalendar/ICompactCalendarProps.d.ts +54 -0
- package/dist/components/CompactCalendar/IEventsListProps.d.ts +21 -0
- package/dist/components/CompactCalendar/index.d.ts +12 -0
- package/dist/components/CompactCalendar/resolveLocale.d.ts +12 -0
- package/dist/components/CompactCalendar/useCompactCalendarEvents.d.ts +12 -0
- package/dist/components/CompactCalendar/useCompactCalendarStyles.d.ts +26 -0
- package/dist/components/Dropzone/Dropzone.d.ts +31 -0
- package/dist/components/Dropzone/DropzoneContext.d.ts +20 -0
- package/dist/components/Dropzone/DropzoneFullScreen.d.ts +19 -0
- package/dist/components/Dropzone/DropzoneStatus.d.ts +9 -0
- package/dist/components/Dropzone/IDropzoneProps.d.ts +102 -0
- package/dist/components/Dropzone/index.d.ts +8 -0
- package/dist/components/Dropzone/mime-types.d.ts +39 -0
- package/dist/components/Dropzone/useDropzoneStyles.d.ts +12 -0
- package/dist/components/InlineSVG/IInlineSVGProps.d.ts +40 -0
- package/dist/components/InlineSVG/InlineSVG.d.ts +4 -0
- package/dist/components/InlineSVG/index.d.ts +5 -0
- package/dist/components/InlineSVG/useInlineSVG.d.ts +30 -0
- package/dist/components/InlineSVG/useInlineSVGStyles.d.ts +4 -0
- package/dist/components/Marquee/IMarqueeProps.d.ts +28 -0
- package/dist/components/Marquee/Marquee.d.ts +4 -0
- package/dist/components/Marquee/index.d.ts +4 -0
- package/dist/components/Marquee/useMarqueeStyles.d.ts +6 -0
- package/dist/components/OTPField/IOTPFieldProps.d.ts +49 -0
- package/dist/components/OTPField/OTPField.d.ts +8 -0
- package/dist/components/OTPField/index.d.ts +3 -0
- package/dist/components/OTPField/useOTPField.d.ts +25 -0
- package/dist/components/OTPField/useOTPFieldStyles.d.ts +23 -0
- package/dist/components/RichTextEditor/IRichTextEditorProps.d.ts +230 -0
- package/dist/components/RichTextEditor/Icons.d.ts +43 -0
- package/dist/components/RichTextEditor/RichTextEditor.d.ts +163 -0
- package/dist/components/RichTextEditor/RichTextEditorColorControl.d.ts +4 -0
- package/dist/components/RichTextEditor/RichTextEditorColorPickerControl.d.ts +4 -0
- package/dist/components/RichTextEditor/RichTextEditorContent.d.ts +4 -0
- package/dist/components/RichTextEditor/RichTextEditorContext.d.ts +20 -0
- package/dist/components/RichTextEditor/RichTextEditorControl.d.ts +22 -0
- package/dist/components/RichTextEditor/RichTextEditorControlsGroup.d.ts +4 -0
- package/dist/components/RichTextEditor/RichTextEditorFontFamilyControl.d.ts +4 -0
- package/dist/components/RichTextEditor/RichTextEditorLinkControl.d.ts +4 -0
- package/dist/components/RichTextEditor/RichTextEditorSourceCodeControl.d.ts +6 -0
- package/dist/components/RichTextEditor/RichTextEditorToolbar.d.ts +4 -0
- package/dist/components/RichTextEditor/controls.d.ts +125 -0
- package/dist/components/RichTextEditor/extensions.d.ts +12 -0
- package/dist/components/RichTextEditor/index.d.ts +15 -0
- package/dist/components/RichTextEditor/useRichTextEditorStyles.d.ts +28 -0
- package/dist/components/Skeleton/ISkeletonLoaderProps.d.ts +102 -0
- package/dist/components/Skeleton/SkeletonLoader.d.ts +4 -0
- package/dist/components/Skeleton/index.d.ts +5 -0
- package/dist/components/Skeleton/useSkeletonExtract.d.ts +4 -0
- package/dist/components/Skeleton/useSkeletonLoaderStyles.d.ts +11 -0
- package/dist/components/Skeleton/useSkeletonShared.d.ts +25 -0
- package/dist/components/Spoiler/ISpoilerProps.d.ts +30 -0
- package/dist/components/Spoiler/Spoiler.d.ts +4 -0
- package/dist/components/Spoiler/index.d.ts +3 -0
- package/dist/components/Spoiler/useSpoilerStyles.d.ts +13 -0
- package/dist/components/Spotlight/ISpotlightProps.d.ts +181 -0
- package/dist/components/Spotlight/Spotlight.d.ts +27 -0
- package/dist/components/Spotlight/SpotlightAction.d.ts +5 -0
- package/dist/components/Spotlight/SpotlightActionsGroup.d.ts +5 -0
- package/dist/components/Spotlight/SpotlightActionsList.d.ts +5 -0
- package/dist/components/Spotlight/SpotlightEmpty.d.ts +5 -0
- package/dist/components/Spotlight/SpotlightFooter.d.ts +5 -0
- package/dist/components/Spotlight/SpotlightRoot.d.ts +5 -0
- package/dist/components/Spotlight/SpotlightSearch.d.ts +5 -0
- package/dist/components/Spotlight/defaultSpotlightFilter.d.ts +9 -0
- package/dist/components/Spotlight/index.d.ts +12 -0
- package/dist/components/Spotlight/useSpotlight.d.ts +59 -0
- package/dist/components/Spotlight/useSpotlightStyles.d.ts +17 -0
- package/dist/components/Stepper/IStepperProps.d.ts +54 -0
- package/dist/components/Stepper/Stepper.d.ts +9 -0
- package/dist/components/Stepper/StepperCompleted.d.ts +9 -0
- package/dist/components/Stepper/StepperStep.d.ts +20 -0
- package/dist/components/Stepper/index.d.ts +3 -0
- package/dist/components/Stepper/useStepperStepStyles.d.ts +21 -0
- package/dist/components/Stepper/useStepperStyles.d.ts +11 -0
- package/dist/components/Timeline/ITimelineProps.d.ts +42 -0
- package/dist/components/Timeline/Timeline.d.ts +6 -0
- package/dist/components/Timeline/TimelineItem.d.ts +15 -0
- package/dist/components/Timeline/index.d.ts +3 -0
- package/dist/components/Timeline/useTimelineItemStyles.d.ts +19 -0
- package/dist/components/Timeline/useTimelineStyles.d.ts +9 -0
- package/dist/components/calendarControl/models/IAttendee.d.ts +5 -0
- package/dist/components/calendarControl/models/IEvents.d.ts +21 -0
- package/dist/{cs-B0C33FJt.cjs → cs-B_90ZpDL.cjs} +2 -2
- package/dist/{cs-VHWnqXwJ.js → cs-nVY__F1s.js} +93 -1
- package/dist/{cy-qF-aNCW-.js → cy-DcW2RMnM.js} +93 -1
- package/dist/{cy-BNabORao.cjs → cy-YdAkRgN7.cjs} +2 -2
- package/dist/{da-BmgXTEXm.cjs → da-3S6dCKx6.cjs} +2 -2
- package/dist/{da-rR5TnSBw.js → da-DlZaxKzd.js} +93 -1
- package/dist/{de-DbeDjRNp.js → de-DMQCCsxB.js} +93 -1
- package/dist/{de-B4w38-0d.cjs → de-cBD6cQjC.cjs} +2 -2
- package/dist/{el-Cgk6VsxL.cjs → el-C861pBjb.cjs} +2 -2
- package/dist/{el-DDeD6FiX.js → el-DWGl8fc0.js} +93 -1
- package/dist/{es-dvKffn6Q.js → es--B6susjn.js} +93 -1
- package/dist/{es-3ugMIZuA.cjs → es-7wJEQTAK.cjs} +2 -2
- package/dist/{et-CIIzxbat.cjs → et-BDQwGJeu.cjs} +2 -2
- package/dist/{et-DgZFBtK7.js → et-CNiq2LnL.js} +93 -1
- package/dist/{eu-C6r1_PRy.js → eu-B4UCvLGV.js} +93 -1
- package/dist/{eu-BUNUOJ7E.cjs → eu-Bis1mMYp.cjs} +2 -2
- package/dist/{fi-q6BFPHtt.cjs → fi-Bish9bFy.cjs} +2 -2
- package/dist/{fi-CzOKgmjK.js → fi-C1YgTvJp.js} +93 -1
- package/dist/{fr-D0cDkdbn.js → fr-Dn0f3XKj.js} +93 -1
- package/dist/{fr-BEnCZ733.cjs → fr-mNj_7F7p.cjs} +2 -2
- package/dist/{ga-BXyKTnJr.cjs → ga-DHGpUClX.cjs} +2 -2
- package/dist/{ga-0A7ndSzw.js → ga-lrKtfvqw.js} +93 -1
- package/dist/{gl-DR1C-hSi.cjs → gl-BaGwE_dH.cjs} +2 -2
- package/dist/{gl-BNwj4XAu.js → gl-Bcp6x2zx.js} +93 -1
- package/dist/{he-BPiZ6D5h.js → he-6cRlkGst.js} +93 -1
- package/dist/{he-OD1Ex2Fw.cjs → he-CyBuj0mX.cjs} +2 -2
- package/dist/{hi-Dt9FvBmh.cjs → hi-C9Y--qfd.cjs} +2 -2
- package/dist/{hi-CSgtp9Yg.js → hi-sWnw2IKq.js} +93 -1
- package/dist/hooks/useLocalizationStrings.d.ts +10 -0
- package/dist/{hr-CDSSj52Q.js → hr-DVYuTFrR.js} +93 -1
- package/dist/{hr-DMzwNhar.cjs → hr-_DB2jbdD.cjs} +2 -2
- package/dist/{hu-Bc-rChfV.cjs → hu-B6P_13vr.cjs} +2 -2
- package/dist/{hu-TDJYiDOB.js → hu-Ds35ELag.js} +93 -1
- package/dist/{id-CwndN9HH.cjs → id-CD6_OeAS.cjs} +2 -2
- package/dist/{id-B3IF5pnh.js → id-D3-zrJWX.js} +93 -1
- package/dist/index.cjs +48 -33
- package/dist/index.d.ts +14 -0
- package/dist/index.js +10631 -4137
- package/dist/{it-BLET318M.js → it-7v9Dp1d5.js} +93 -1
- package/dist/{it-DaYS5Vil.cjs → it-BqWJuJRG.cjs} +2 -2
- package/dist/{ja-NxwXLaKV.js → ja-HEhZtJlu.js} +93 -1
- package/dist/{ja-BYA2LXHy.cjs → ja-_IB67CHC.cjs} +2 -2
- package/dist/{kk-Ctrvuqlz.cjs → kk-1zP-M5hA.cjs} +2 -2
- package/dist/{kk-CceJcjtl.js → kk-vjMXRcfC.js} +93 -1
- package/dist/{ko-evIcpTG8.cjs → ko-Bh_npcwe.cjs} +2 -2
- package/dist/{ko-cS_OE967.js → ko-k4Pa7puV.js} +93 -1
- package/dist/localization/ILibraryStrings.d.ts +132 -0
- package/dist/localization/index.d.ts +2 -2
- package/dist/{lt-CYTLGgh6.cjs → lt-Bcs_RvUC.cjs} +2 -2
- package/dist/{lt-CZ-kk_5b.js → lt-DiJ0TBtG.js} +93 -1
- package/dist/{lv-COjitD3w.cjs → lv-DXbttzfD.cjs} +2 -2
- package/dist/{lv-BTvPpEjc.js → lv-Dsam0ieq.js} +93 -1
- package/dist/{mk-CSSyI3El.js → mk-6gVlhUMj.js} +93 -1
- package/dist/{mk-B-LF5gVL.cjs → mk-CwexdV8N.cjs} +2 -2
- package/dist/{ms-CzEvkib0.cjs → ms-DbohV4fa.cjs} +2 -2
- package/dist/{ms-Dz5JnKJ1.js → ms-LR8UEBWu.js} +93 -1
- package/dist/{nb-DkgTg1et.js → nb-BCuhLUFv.js} +93 -1
- package/dist/{nb-B1KWSX94.cjs → nb-XSnogBcy.cjs} +2 -2
- package/dist/{nl-knWqo2aX.cjs → nl-C3fB4nMe.cjs} +2 -2
- package/dist/{nl-CQ5eoxw2.js → nl-Cjbk_uDE.js} +93 -1
- package/dist/{pl-BQJfOizT.js → pl-3SZu8o4v.js} +93 -1
- package/dist/{pl-Ce6dq53t.cjs → pl-BJHabrpe.cjs} +2 -2
- package/dist/providers.cjs +1 -1
- package/dist/providers.js +1 -1
- package/dist/{pt-b0p7DoD0.js → pt-BRvCnjwa.js} +93 -1
- package/dist/{pt-BVqTnGkF.cjs → pt-BqRRasV7.cjs} +2 -2
- package/dist/{ro-sbBtUVJV.js → ro-B051tdWj.js} +93 -1
- package/dist/{ro-DqJMfhmX.cjs → ro-BCq9yIk8.cjs} +2 -2
- package/dist/{ru-Dm2NAQyK.cjs → ru-B-TiRA2D.cjs} +2 -2
- package/dist/{ru-ofzbka6D.js → ru-wGNmtZwA.js} +93 -1
- package/dist/{sk-BtpdNCPC.js → sk-BEUsTaCT.js} +93 -1
- package/dist/{sk-BNe6CHG-.cjs → sk-Btf7EoeH.cjs} +2 -2
- package/dist/{sl-BKmEUGyu.cjs → sl-Cs0S-Rru.cjs} +2 -2
- package/dist/{sl-B4GsKLu6.js → sl-Dt-Wix4R.js} +93 -1
- package/dist/{sr-C76YVpkQ.js → sr-Cj6FjoPV.js} +93 -1
- package/dist/{sr-Dwya5lwF.cjs → sr-Jxn52mZC.cjs} +2 -2
- package/dist/{sv-PesX57cX.js → sv-C5PBTvZZ.js} +93 -1
- package/dist/{sv-BGL2G9Vm.cjs → sv-DqwVwzYH.cjs} +2 -2
- package/dist/{th-DEv6shFI.cjs → th-CnqYsyp5.cjs} +2 -2
- package/dist/{th-CbCNOBnR.js → th-DEMLnNto.js} +93 -1
- package/dist/{tr-B0TPxXKS.js → tr-7wlGJ97W.js} +93 -1
- package/dist/{tr-BB-QonGE.cjs → tr-BiSE3U_v.cjs} +2 -2
- package/dist/{uk-_9cNoBNe.js → uk-B2JY5Ka3.js} +93 -1
- package/dist/{uk-B-3fLKpR.cjs → uk-YsR97h-O.cjs} +2 -2
- package/dist/{vi-Dx6pJ0ir.cjs → vi-BqlBS0CX.cjs} +2 -2
- package/dist/{vi-B8SfqLW6.js → vi-By1JUTa6.js} +93 -1
- package/dist/{zh-DD0ml2HG.cjs → zh-C3amwoRq.cjs} +2 -2
- package/dist/{zh-DqHnbp6B.js → zh-SZ0W4ZGV.js} +93 -1
- package/package.json +20 -1
- package/dist/LocalizationProvider-BbfcY9z3.cjs +0 -2
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { HsvaColor, ColorResult } from './colorConvert';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
/** Common props shared by all color picker sub-components */
|
|
4
|
+
export interface IColorPickerBaseProps {
|
|
5
|
+
/** Additional CSS class name */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Additional inline styles */
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
export interface IColorPickerInteractiveProps extends IColorPickerBaseProps {
|
|
11
|
+
/** Called when the user starts or continues a drag / click interaction */
|
|
12
|
+
onMove?: (interaction: {
|
|
13
|
+
left: number;
|
|
14
|
+
top: number;
|
|
15
|
+
}) => void;
|
|
16
|
+
/** Called on initial press (mousedown / touchstart) */
|
|
17
|
+
onDown?: (interaction: {
|
|
18
|
+
left: number;
|
|
19
|
+
top: number;
|
|
20
|
+
}) => void;
|
|
21
|
+
}
|
|
22
|
+
export interface IColorPickerPointerProps extends IColorPickerBaseProps {
|
|
23
|
+
/** Pointer colour (CSS color string) */
|
|
24
|
+
color?: string;
|
|
25
|
+
/** Left offset, 0..1 */
|
|
26
|
+
left?: number;
|
|
27
|
+
/** Top offset, 0..1 (used in saturation panels) */
|
|
28
|
+
top?: number;
|
|
29
|
+
}
|
|
30
|
+
export interface IColorPickerSaturationProps extends IColorPickerBaseProps {
|
|
31
|
+
/** Current HSVA colour */
|
|
32
|
+
hsva: HsvaColor;
|
|
33
|
+
/** Called when the colour changes */
|
|
34
|
+
onChange?: (newColor: ColorResult) => void;
|
|
35
|
+
/** Custom pointer / thumb element */
|
|
36
|
+
pointer?: React.ComponentType<IColorPickerPointerProps>;
|
|
37
|
+
/** Pointer radius in px @default 6 */
|
|
38
|
+
radius?: number;
|
|
39
|
+
}
|
|
40
|
+
export interface IColorPickerHueProps extends IColorPickerBaseProps {
|
|
41
|
+
/** Current HSVA colour */
|
|
42
|
+
hsva: HsvaColor;
|
|
43
|
+
/** Called when the colour changes */
|
|
44
|
+
onChange?: (newColor: ColorResult) => void;
|
|
45
|
+
/** Width of the hue bar @default '100%' */
|
|
46
|
+
width?: React.CSSProperties['width'];
|
|
47
|
+
/** Height of the hue bar @default 12 */
|
|
48
|
+
height?: React.CSSProperties['height'];
|
|
49
|
+
/** Direction of the hue bar */
|
|
50
|
+
direction?: 'horizontal' | 'vertical';
|
|
51
|
+
/** Custom pointer element */
|
|
52
|
+
pointer?: React.ComponentType<IColorPickerPointerProps>;
|
|
53
|
+
/** Pointer radius @default 6 */
|
|
54
|
+
radius?: number;
|
|
55
|
+
}
|
|
56
|
+
export interface IColorPickerAlphaProps extends IColorPickerBaseProps {
|
|
57
|
+
/** Current HSVA colour */
|
|
58
|
+
hsva: HsvaColor;
|
|
59
|
+
/** Called when the colour changes */
|
|
60
|
+
onChange?: (newColor: ColorResult) => void;
|
|
61
|
+
/** Width of the alpha bar @default '100%' */
|
|
62
|
+
width?: React.CSSProperties['width'];
|
|
63
|
+
/** Height of the alpha bar @default 12 */
|
|
64
|
+
height?: React.CSSProperties['height'];
|
|
65
|
+
/** Direction of the alpha bar */
|
|
66
|
+
direction?: 'horizontal' | 'vertical';
|
|
67
|
+
/** Custom pointer element */
|
|
68
|
+
pointer?: React.ComponentType<IColorPickerPointerProps>;
|
|
69
|
+
/** Pointer radius @default 6 */
|
|
70
|
+
radius?: number;
|
|
71
|
+
}
|
|
72
|
+
export interface IColorPickerShadeSliderProps extends IColorPickerBaseProps {
|
|
73
|
+
/** Current HSVA colour */
|
|
74
|
+
hsva: HsvaColor;
|
|
75
|
+
/** Called when the colour changes */
|
|
76
|
+
onChange?: (newColor: ColorResult) => void;
|
|
77
|
+
/** Width @default '100%' */
|
|
78
|
+
width?: React.CSSProperties['width'];
|
|
79
|
+
/** Height @default 12 */
|
|
80
|
+
height?: React.CSSProperties['height'];
|
|
81
|
+
/** Custom pointer element */
|
|
82
|
+
pointer?: React.ComponentType<IColorPickerPointerProps>;
|
|
83
|
+
/** Pointer radius @default 6 */
|
|
84
|
+
radius?: number;
|
|
85
|
+
}
|
|
86
|
+
/** Swatch preset can be a plain hex string or an object with a title */
|
|
87
|
+
export type SwatchPresetColor = string | {
|
|
88
|
+
color: string;
|
|
89
|
+
title?: string;
|
|
90
|
+
};
|
|
91
|
+
export interface IColorPickerSwatchProps extends IColorPickerBaseProps {
|
|
92
|
+
/** Swatch colour (CSS color string) */
|
|
93
|
+
color?: string;
|
|
94
|
+
/** Swatch title / tooltip */
|
|
95
|
+
title?: string;
|
|
96
|
+
/** Whether the swatch is currently selected */
|
|
97
|
+
checked?: boolean;
|
|
98
|
+
/** Whether the swatch is disabled */
|
|
99
|
+
disabled?: boolean;
|
|
100
|
+
/** Swatch size @default 24 */
|
|
101
|
+
size?: number;
|
|
102
|
+
/** Border radius @default 4 */
|
|
103
|
+
radius?: number;
|
|
104
|
+
/** Called when swatch is clicked */
|
|
105
|
+
onClick?: (color: string) => void;
|
|
106
|
+
/** Custom render function for the swatch rect */
|
|
107
|
+
rectRender?: (props: React.HTMLAttributes<HTMLDivElement>) => React.ReactNode;
|
|
108
|
+
/** Content before the swatch list */
|
|
109
|
+
addonBefore?: React.ReactNode;
|
|
110
|
+
/** Content after the swatch list */
|
|
111
|
+
addonAfter?: React.ReactNode;
|
|
112
|
+
/** Preset color swatches */
|
|
113
|
+
colors?: SwatchPresetColor[];
|
|
114
|
+
/** Render function for each preset swatch */
|
|
115
|
+
rectProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
116
|
+
}
|
|
117
|
+
export interface IColorPickerEditableInputProps extends IColorPickerBaseProps {
|
|
118
|
+
/** Label text (e.g. "Hex", "R", "G", "B") */
|
|
119
|
+
label?: string;
|
|
120
|
+
/** Current value */
|
|
121
|
+
value?: string | number;
|
|
122
|
+
/** Called when the value changes */
|
|
123
|
+
onChange?: (value: string) => void;
|
|
124
|
+
/** Input placeholder */
|
|
125
|
+
placeholder?: string;
|
|
126
|
+
}
|
|
127
|
+
export interface IColorPickerEditableInputRGBAProps extends IColorPickerBaseProps {
|
|
128
|
+
/** Current HSVA colour */
|
|
129
|
+
hsva: HsvaColor;
|
|
130
|
+
/** Called when the colour changes */
|
|
131
|
+
onChange?: (newColor: ColorResult) => void;
|
|
132
|
+
/** Whether to show the alpha channel input @default true */
|
|
133
|
+
showAlpha?: boolean;
|
|
134
|
+
}
|
|
135
|
+
export interface IColorPickerEditableInputHSLAProps extends IColorPickerBaseProps {
|
|
136
|
+
/** Current HSVA colour */
|
|
137
|
+
hsva: HsvaColor;
|
|
138
|
+
/** Called when the colour changes */
|
|
139
|
+
onChange?: (newColor: ColorResult) => void;
|
|
140
|
+
/** Whether to show the alpha channel input @default true */
|
|
141
|
+
showAlpha?: boolean;
|
|
142
|
+
}
|
|
143
|
+
export interface IColorPickerSketchProps extends IColorPickerBaseProps {
|
|
144
|
+
/** Current color (hex string, CSS string, or HsvaColor) */
|
|
145
|
+
color?: string | HsvaColor;
|
|
146
|
+
/** Called when color changes */
|
|
147
|
+
onChange?: (newColor: ColorResult) => void;
|
|
148
|
+
/** Width of the picker in px @default 218 */
|
|
149
|
+
width?: number;
|
|
150
|
+
/** Preset swatch colors */
|
|
151
|
+
presetColors?: SwatchPresetColor[];
|
|
152
|
+
/** Whether to disable the hex/rgb editable inputs @default false */
|
|
153
|
+
editableDisable?: boolean;
|
|
154
|
+
/** Whether to disable the alpha slider/input @default false */
|
|
155
|
+
disableAlpha?: boolean;
|
|
156
|
+
}
|
|
157
|
+
export declare enum ChromeInputType {
|
|
158
|
+
HEXA = "hexa",
|
|
159
|
+
RGBA = "rgba",
|
|
160
|
+
HSLA = "hsla"
|
|
161
|
+
}
|
|
162
|
+
export interface IColorPickerChromeProps extends IColorPickerBaseProps {
|
|
163
|
+
/** Current color */
|
|
164
|
+
color?: string | HsvaColor;
|
|
165
|
+
/** Called when color changes */
|
|
166
|
+
onChange?: (newColor: ColorResult) => void;
|
|
167
|
+
/** Width @default 225 */
|
|
168
|
+
width?: number;
|
|
169
|
+
/** Whether to show the alpha slider/input @default true */
|
|
170
|
+
showAlpha?: boolean;
|
|
171
|
+
/** Whether to show the color-format toggle @default true */
|
|
172
|
+
showColorPreview?: boolean;
|
|
173
|
+
/** Whether to show the editable inputs @default true */
|
|
174
|
+
showEditableInput?: boolean;
|
|
175
|
+
/** Whether to show the eye-dropper button @default true */
|
|
176
|
+
showEyeDropper?: boolean;
|
|
177
|
+
/** Input type displayed by default @default ChromeInputType.HEXA */
|
|
178
|
+
inputType?: ChromeInputType;
|
|
179
|
+
}
|
|
180
|
+
export interface IColorPickerColorfulProps extends IColorPickerBaseProps {
|
|
181
|
+
/** Current color */
|
|
182
|
+
color?: string | HsvaColor;
|
|
183
|
+
/** Called when color changes */
|
|
184
|
+
onChange?: (newColor: ColorResult) => void;
|
|
185
|
+
/** Whether to disable the alpha slider @default false */
|
|
186
|
+
disableAlpha?: boolean;
|
|
187
|
+
}
|
|
188
|
+
export interface IColorPickerWheelProps extends IColorPickerBaseProps {
|
|
189
|
+
/** Current color */
|
|
190
|
+
color?: string | HsvaColor;
|
|
191
|
+
/** Called when color changes */
|
|
192
|
+
onChange?: (newColor: ColorResult) => void;
|
|
193
|
+
/** Width/height of the wheel @default 200 */
|
|
194
|
+
width?: number;
|
|
195
|
+
/** Height of the wheel @default width */
|
|
196
|
+
height?: number;
|
|
197
|
+
/** Custom pointer element */
|
|
198
|
+
pointer?: React.ComponentType<IColorPickerPointerProps>;
|
|
199
|
+
}
|
|
200
|
+
export interface IColorPickerCircleProps extends IColorPickerBaseProps {
|
|
201
|
+
/** Current color */
|
|
202
|
+
color?: string | HsvaColor;
|
|
203
|
+
/** Called when color changes */
|
|
204
|
+
onChange?: (newColor: ColorResult) => void;
|
|
205
|
+
/** Preset swatch colors */
|
|
206
|
+
colors?: SwatchPresetColor[];
|
|
207
|
+
/** Size of each swatch circle @default 28 */
|
|
208
|
+
pointSize?: number;
|
|
209
|
+
}
|
|
210
|
+
export interface IColorPickerCompactProps extends IColorPickerBaseProps {
|
|
211
|
+
/** Current color */
|
|
212
|
+
color?: string | HsvaColor;
|
|
213
|
+
/** Called when color changes */
|
|
214
|
+
onChange?: (newColor: ColorResult) => void;
|
|
215
|
+
/** Preset swatch colors */
|
|
216
|
+
colors?: SwatchPresetColor[];
|
|
217
|
+
}
|
|
218
|
+
export interface IColorPickerBlockProps extends IColorPickerBaseProps {
|
|
219
|
+
/** Current color */
|
|
220
|
+
color?: string | HsvaColor;
|
|
221
|
+
/** Called when color changes */
|
|
222
|
+
onChange?: (newColor: ColorResult) => void;
|
|
223
|
+
/** Width of the picker @default 270 */
|
|
224
|
+
width?: number;
|
|
225
|
+
/** Preset swatch colors */
|
|
226
|
+
colors?: SwatchPresetColor[];
|
|
227
|
+
/** Whether to show the triangle pointer on the color preview @default true */
|
|
228
|
+
showTriangle?: boolean;
|
|
229
|
+
}
|
|
230
|
+
export interface IColorPickerMaterialProps extends IColorPickerBaseProps {
|
|
231
|
+
/** Current color */
|
|
232
|
+
color?: string | HsvaColor;
|
|
233
|
+
/** Called when color changes */
|
|
234
|
+
onChange?: (newColor: ColorResult) => void;
|
|
235
|
+
}
|
|
236
|
+
export declare enum GithubPlacement {
|
|
237
|
+
Left = "L",
|
|
238
|
+
LeftTop = "LT",
|
|
239
|
+
LeftBottom = "LB",
|
|
240
|
+
Right = "R",
|
|
241
|
+
RightTop = "RT",
|
|
242
|
+
RightBottom = "RB",
|
|
243
|
+
Top = "T",
|
|
244
|
+
TopLeft = "TL",
|
|
245
|
+
TopRight = "TR",
|
|
246
|
+
Bottom = "B",
|
|
247
|
+
BottomLeft = "BL",
|
|
248
|
+
BottomRight = "BR"
|
|
249
|
+
}
|
|
250
|
+
export interface IColorPickerGithubProps extends IColorPickerBaseProps {
|
|
251
|
+
/** Current color */
|
|
252
|
+
color?: string | HsvaColor;
|
|
253
|
+
/** Called when color changes */
|
|
254
|
+
onChange?: (newColor: ColorResult) => void;
|
|
255
|
+
/** Preset swatch colors */
|
|
256
|
+
colors?: SwatchPresetColor[];
|
|
257
|
+
/** Placement of the arrow pointer @default GithubPlacement.TopLeft */
|
|
258
|
+
placement?: GithubPlacement;
|
|
259
|
+
}
|
|
260
|
+
/** A labelled group of theme colors */
|
|
261
|
+
export interface ThemeColorGroup {
|
|
262
|
+
/** Group label displayed above the swatches (e.g. "Brand", "Neutral") */
|
|
263
|
+
label: string;
|
|
264
|
+
/** Swatch presets in this group — hex strings or `{ color, title }` */
|
|
265
|
+
colors: SwatchPresetColor[];
|
|
266
|
+
}
|
|
267
|
+
export interface IColorPickerThemeProps extends IColorPickerBaseProps {
|
|
268
|
+
/** Current color */
|
|
269
|
+
color?: string | HsvaColor;
|
|
270
|
+
/** Called when color changes */
|
|
271
|
+
onChange?: (newColor: ColorResult) => void;
|
|
272
|
+
/** Labelled groups of theme colors. Defaults to Fluent UI 9 Brand / Neutral / Status tokens. */
|
|
273
|
+
groups?: ThemeColorGroup[];
|
|
274
|
+
/** Size of each swatch @default 28 */
|
|
275
|
+
swatchSize?: number;
|
|
276
|
+
}
|
|
277
|
+
export interface IColorPickerSliderProps extends IColorPickerBaseProps {
|
|
278
|
+
/** Current color */
|
|
279
|
+
color?: string | HsvaColor;
|
|
280
|
+
/** Called when color changes */
|
|
281
|
+
onChange?: (newColor: ColorResult) => void;
|
|
282
|
+
/** Number of lightness swatches to display @default 12 */
|
|
283
|
+
swatchCount?: number;
|
|
284
|
+
/** Custom pointer element */
|
|
285
|
+
pointer?: React.ComponentType<IColorPickerPointerProps>;
|
|
286
|
+
}
|
|
287
|
+
export interface IColorPickerProps extends IColorPickerBaseProps {
|
|
288
|
+
/** Current color (hex, CSS string, or HsvaColor) — controlled mode */
|
|
289
|
+
color?: string | HsvaColor;
|
|
290
|
+
/** Default color (hex, CSS string, or HsvaColor) — uncontrolled mode */
|
|
291
|
+
defaultColor?: string | HsvaColor;
|
|
292
|
+
/** Called when the color changes */
|
|
293
|
+
onChange?: (newColor: ColorResult) => void;
|
|
294
|
+
/** Children (compound pattern) */
|
|
295
|
+
children?: React.ReactNode;
|
|
296
|
+
}
|
|
297
|
+
//# sourceMappingURL=IColorPickerProps.d.ts.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export interface HsvaColor {
|
|
2
|
+
h: number;
|
|
3
|
+
s: number;
|
|
4
|
+
v: number;
|
|
5
|
+
a: number;
|
|
6
|
+
}
|
|
7
|
+
export interface HslaColor {
|
|
8
|
+
h: number;
|
|
9
|
+
s: number;
|
|
10
|
+
l: number;
|
|
11
|
+
a: number;
|
|
12
|
+
}
|
|
13
|
+
export interface RgbaColor {
|
|
14
|
+
r: number;
|
|
15
|
+
g: number;
|
|
16
|
+
b: number;
|
|
17
|
+
a: number;
|
|
18
|
+
}
|
|
19
|
+
export interface HsvColor {
|
|
20
|
+
h: number;
|
|
21
|
+
s: number;
|
|
22
|
+
v: number;
|
|
23
|
+
}
|
|
24
|
+
export interface HslColor {
|
|
25
|
+
h: number;
|
|
26
|
+
s: number;
|
|
27
|
+
l: number;
|
|
28
|
+
}
|
|
29
|
+
export interface RgbColor {
|
|
30
|
+
r: number;
|
|
31
|
+
g: number;
|
|
32
|
+
b: number;
|
|
33
|
+
}
|
|
34
|
+
export interface XYColor {
|
|
35
|
+
x: number;
|
|
36
|
+
y: number;
|
|
37
|
+
}
|
|
38
|
+
export interface ColorResult {
|
|
39
|
+
hsva: HsvaColor;
|
|
40
|
+
hsla: HslaColor;
|
|
41
|
+
rgba: RgbaColor;
|
|
42
|
+
hex: string;
|
|
43
|
+
hexa: string;
|
|
44
|
+
}
|
|
45
|
+
export declare const hsvaToRgba: ({ h, s, v, a }: HsvaColor) => RgbaColor;
|
|
46
|
+
export declare const rgbaToHsva: ({ r, g, b, a }: RgbaColor) => HsvaColor;
|
|
47
|
+
export declare const hsvaToHsla: ({ h, s, v, a }: HsvaColor) => HslaColor;
|
|
48
|
+
export declare const hslaToHsva: ({ h, s, l, a }: HslaColor) => HsvaColor;
|
|
49
|
+
export declare const hexToHsva: (hex: string) => HsvaColor;
|
|
50
|
+
export declare const hsvaToHex: (hsva: HsvaColor) => string;
|
|
51
|
+
export declare const hsvaToHexa: (hsva: HsvaColor) => string;
|
|
52
|
+
export declare const hexToRgba: (hex: string) => RgbaColor;
|
|
53
|
+
export declare const rgbaToHex: ({ r, g, b }: RgbaColor) => string;
|
|
54
|
+
export declare const rgbaToHexa: ({ r, g, b, a }: RgbaColor) => string;
|
|
55
|
+
export declare const hsvaToHslString: (hsva: HsvaColor) => string;
|
|
56
|
+
export declare const hsvaToHslaString: (hsva: HsvaColor) => string;
|
|
57
|
+
export declare const hsvaToRgbString: (hsva: HsvaColor) => string;
|
|
58
|
+
export declare const hsvaToRgbaString: (hsva: HsvaColor) => string;
|
|
59
|
+
export declare const parseHue: (value: string, unit?: string) => number;
|
|
60
|
+
export declare const hslaStringToHsva: (str: string) => HsvaColor;
|
|
61
|
+
export declare const rgbaStringToHsva: (str: string) => HsvaColor;
|
|
62
|
+
/**
|
|
63
|
+
* Parse any CSS color string into HsvaColor.
|
|
64
|
+
* Supports: hex (#RGB, #RRGGBB, #RRGGBBAA), rgb(), rgba(), hsl(), hsla(), named colors
|
|
65
|
+
*/
|
|
66
|
+
export declare const color: (input: string | HsvaColor) => ColorResult;
|
|
67
|
+
export declare const validHex: (hex: string) => boolean;
|
|
68
|
+
export declare const getContrastingColor: (input: HsvaColor | string) => string;
|
|
69
|
+
export declare const equalColorObjects: (a: HsvaColor, b: HsvaColor) => boolean;
|
|
70
|
+
export declare const equalHex: (a: string, b: string) => boolean;
|
|
71
|
+
export declare const clampHsva: (hsva: HsvaColor) => HsvaColor;
|
|
72
|
+
//# sourceMappingURL=colorConvert.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export { ColorPicker } from './ColorPicker';
|
|
2
|
+
export { ColorPickerSaturation } from './ColorPickerSaturation';
|
|
3
|
+
export { ColorPickerHue } from './ColorPickerHue';
|
|
4
|
+
export { ColorPickerAlpha } from './ColorPickerAlpha';
|
|
5
|
+
export { ColorPickerShadeSlider } from './ColorPickerShadeSlider';
|
|
6
|
+
export { ColorPickerSwatch } from './ColorPickerSwatch';
|
|
7
|
+
export { ColorPickerEditableInput } from './ColorPickerEditableInput';
|
|
8
|
+
export { ColorPickerEditableInputRGBA } from './ColorPickerEditableInputRGBA';
|
|
9
|
+
export { ColorPickerEditableInputHSLA } from './ColorPickerEditableInputHSLA';
|
|
10
|
+
export { ColorPickerInteractive } from './ColorPickerInteractive';
|
|
11
|
+
export { ColorPickerSketch } from './ColorPickerSketch';
|
|
12
|
+
export { ColorPickerChrome } from './ColorPickerChrome';
|
|
13
|
+
export { ColorPickerColorful } from './ColorPickerColorful';
|
|
14
|
+
export { ColorPickerWheel } from './ColorPickerWheel';
|
|
15
|
+
export { ColorPickerCircle } from './ColorPickerCircle';
|
|
16
|
+
export { ColorPickerCompact } from './ColorPickerCompact';
|
|
17
|
+
export { ColorPickerBlock } from './ColorPickerBlock';
|
|
18
|
+
export { ColorPickerSlider } from './ColorPickerSlider';
|
|
19
|
+
export { ColorPickerTheme } from './ColorPickerTheme';
|
|
20
|
+
export { useColorPickerStyles } from './useColorPickerStyles';
|
|
21
|
+
export { color, hsvaToRgba, rgbaToHsva, hsvaToHsla, hslaToHsva, hexToHsva, hsvaToHex, hsvaToHexa, hexToRgba, rgbaToHex, rgbaToHexa, hsvaToHslString, hsvaToHslaString, hsvaToRgbString, hsvaToRgbaString, parseHue, hslaStringToHsva, rgbaStringToHsva, validHex, getContrastingColor, equalColorObjects, equalHex, clampHsva, } from './colorConvert';
|
|
22
|
+
export type { IColorPickerProps, IColorPickerBaseProps, IColorPickerInteractiveProps, IColorPickerPointerProps, IColorPickerSaturationProps, IColorPickerHueProps, IColorPickerAlphaProps, IColorPickerShadeSliderProps, IColorPickerSwatchProps, IColorPickerEditableInputProps, IColorPickerEditableInputRGBAProps, IColorPickerEditableInputHSLAProps, IColorPickerSketchProps, IColorPickerChromeProps, IColorPickerColorfulProps, IColorPickerWheelProps, IColorPickerCircleProps, IColorPickerCompactProps, IColorPickerBlockProps, IColorPickerSliderProps, IColorPickerThemeProps, ThemeColorGroup, SwatchPresetColor, } from './IColorPickerProps';
|
|
23
|
+
export { ChromeInputType } from './IColorPickerProps';
|
|
24
|
+
export type { HsvaColor, HslaColor, RgbaColor, HsvColor, HslColor, RgbColor, XYColor, ColorResult, } from './colorConvert';
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const useColorPickerStyles: () => {
|
|
2
|
+
pointer: string;
|
|
3
|
+
interactiveContainer: string;
|
|
4
|
+
saturation: string;
|
|
5
|
+
bar: string;
|
|
6
|
+
checkerboard: string;
|
|
7
|
+
swatchContainer: string;
|
|
8
|
+
swatch: string;
|
|
9
|
+
swatchSelected: string;
|
|
10
|
+
editableInputContainer: string;
|
|
11
|
+
editableInputLabel: string;
|
|
12
|
+
sketchContainer: string;
|
|
13
|
+
chromeContainer: string;
|
|
14
|
+
chromePreview: string;
|
|
15
|
+
colorfulContainer: string;
|
|
16
|
+
wheelContainer: string;
|
|
17
|
+
circleContainer: string;
|
|
18
|
+
circlePoint: string;
|
|
19
|
+
circlePointSelected: string;
|
|
20
|
+
compactContainer: string;
|
|
21
|
+
blockContainer: string;
|
|
22
|
+
blockHeader: string;
|
|
23
|
+
blockTriangle: string;
|
|
24
|
+
materialContainer: string;
|
|
25
|
+
materialInputUnderline: string;
|
|
26
|
+
githubContainer: string;
|
|
27
|
+
githubArrow: string;
|
|
28
|
+
sliderContainer: string;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=useColorPickerStyles.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Locale } from 'date-fns';
|
|
2
|
+
import { IEvent } from '../calendarControl/models/IEvents';
|
|
3
|
+
import { GroupedEvents } from './useCompactCalendarEvents';
|
|
4
|
+
export interface ICalendarGridProps {
|
|
5
|
+
/** 2D array of Date objects representing the month grid */
|
|
6
|
+
weeks: Date[][];
|
|
7
|
+
/** The current month date (used for outside-month detection) */
|
|
8
|
+
date: Date;
|
|
9
|
+
/** Currently selected date */
|
|
10
|
+
selectedDate: Date | null;
|
|
11
|
+
/** Today's date */
|
|
12
|
+
today: Date;
|
|
13
|
+
/** Ordered short day names for the weekday header row */
|
|
14
|
+
orderedShortDays: string[];
|
|
15
|
+
/** Events grouped by date key */
|
|
16
|
+
groupedEvents: GroupedEvents;
|
|
17
|
+
/** Indices of weekend days (0–6) */
|
|
18
|
+
weekendDays: number[];
|
|
19
|
+
/** Whether to highlight today's date */
|
|
20
|
+
highlightToday: boolean;
|
|
21
|
+
/** Whether to display days from adjacent months */
|
|
22
|
+
withOutsideDays: boolean;
|
|
23
|
+
/** Whether to show week numbers in the first column */
|
|
24
|
+
withWeekNumbers: boolean;
|
|
25
|
+
/** Called when a day cell is clicked */
|
|
26
|
+
onDayClick: (date: Date) => void;
|
|
27
|
+
/** Resolves the display color for an event */
|
|
28
|
+
getEventColor: (event: IEvent) => string;
|
|
29
|
+
/** Resolved date-fns locale for formatting */
|
|
30
|
+
locale?: Locale;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=ICalendarGridProps.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Locale } from 'date-fns';
|
|
2
|
+
export interface ICalendarHeaderProps {
|
|
3
|
+
/** The current month/year date */
|
|
4
|
+
date: Date;
|
|
5
|
+
/** Custom header renderer — receives the date and the default header element */
|
|
6
|
+
renderHeader?: (input: {
|
|
7
|
+
date: Date;
|
|
8
|
+
defaultHeader: React.ReactNode;
|
|
9
|
+
}) => React.ReactNode;
|
|
10
|
+
/** Called when the year button is clicked */
|
|
11
|
+
onYearClick?: () => void;
|
|
12
|
+
/** Resolved date-fns locale for formatting */
|
|
13
|
+
locale?: Locale;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=ICalendarHeaderProps.d.ts.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Locale } from 'date-fns';
|
|
2
|
+
import { IEvent } from '../calendarControl/models/IEvents';
|
|
3
|
+
import { ICompactCalendarStrings as ILocaleCompactCalendarStrings } from '../../localization/ILibraryStrings';
|
|
4
|
+
export interface ICompactCalendarRenderHeaderInput {
|
|
5
|
+
date: Date;
|
|
6
|
+
defaultHeader: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface ICompactCalendarProps {
|
|
9
|
+
/** Date representing the month to display */
|
|
10
|
+
date: Date;
|
|
11
|
+
/** Called when the displayed month changes */
|
|
12
|
+
onDateChange?: (date: Date) => void;
|
|
13
|
+
/** Currently selected date (controlled) */
|
|
14
|
+
selectedDate?: Date | null;
|
|
15
|
+
/** Default selected date (uncontrolled) */
|
|
16
|
+
defaultSelectedDate?: Date | null;
|
|
17
|
+
/** Called when the selected date changes */
|
|
18
|
+
onSelectedDateChange?: (date: Date | null) => void;
|
|
19
|
+
/** Show week numbers in the first column. @default false */
|
|
20
|
+
withWeekNumbers?: boolean;
|
|
21
|
+
/** Number 0–6 where 0 = Sunday and 6 = Saturday. @default 1 (Monday) */
|
|
22
|
+
firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
23
|
+
/** Indices of weekend days (0–6). @default [0, 6] */
|
|
24
|
+
weekendDays?: number[];
|
|
25
|
+
/** Always render 6 weeks in the month view. @default true */
|
|
26
|
+
consistentWeeks?: boolean;
|
|
27
|
+
/** Highlight the current day. @default true */
|
|
28
|
+
highlightToday?: boolean;
|
|
29
|
+
/** Display days from adjacent months to fill weeks. @default false */
|
|
30
|
+
withOutsideDays?: boolean;
|
|
31
|
+
/** Events to display */
|
|
32
|
+
events?: IEvent[];
|
|
33
|
+
/** Called when a day is clicked */
|
|
34
|
+
onDayClick?: (date: Date) => void;
|
|
35
|
+
/** Called when an event is clicked */
|
|
36
|
+
onEventClick?: (event: IEvent, e: React.MouseEvent<HTMLElement>) => void;
|
|
37
|
+
/** Called when the year back button is clicked */
|
|
38
|
+
onYearClick?: () => void;
|
|
39
|
+
/** Custom header renderer */
|
|
40
|
+
renderHeader?: (input: ICompactCalendarRenderHeaderInput) => React.ReactNode;
|
|
41
|
+
/** Custom event item renderer */
|
|
42
|
+
renderEvent?: (event: IEvent, defaultElement: React.ReactNode) => React.ReactNode;
|
|
43
|
+
/** date-fns format string for the events list header. @default 'EEEE, MMMM d' */
|
|
44
|
+
eventsHeaderFormat?: string;
|
|
45
|
+
/** Locale for date formatting. Pass a BCP47 string (e.g. 'en-US', 'fr') or a date-fns Locale object. Auto-detects from LocalizationProvider or browser default if not set. */
|
|
46
|
+
locale?: string | Locale;
|
|
47
|
+
/** Height of the component */
|
|
48
|
+
height?: string | number;
|
|
49
|
+
/** Additional CSS class name */
|
|
50
|
+
className?: string;
|
|
51
|
+
/** Strings override for i18n */
|
|
52
|
+
strings?: Partial<ILocaleCompactCalendarStrings>;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=ICompactCalendarProps.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Locale } from 'date-fns';
|
|
2
|
+
import { IEvent } from '../calendarControl/models/IEvents';
|
|
3
|
+
export interface IEventsListProps {
|
|
4
|
+
/** Events to display, already sorted */
|
|
5
|
+
events: IEvent[];
|
|
6
|
+
/** Formatted header string (e.g. "Monday, April 14") */
|
|
7
|
+
header: string;
|
|
8
|
+
/** Label to display for all-day events */
|
|
9
|
+
allDayLabel: string;
|
|
10
|
+
/** Label to display when there are no events */
|
|
11
|
+
noEventsLabel: string;
|
|
12
|
+
/** Called when an event is clicked */
|
|
13
|
+
onEventClick?: (event: IEvent, e: React.MouseEvent<HTMLElement>) => void;
|
|
14
|
+
/** Custom event item renderer */
|
|
15
|
+
renderEvent?: (event: IEvent, defaultElement: React.ReactNode) => React.ReactNode;
|
|
16
|
+
/** Resolves the color for an event */
|
|
17
|
+
getEventColor: (event: IEvent) => string;
|
|
18
|
+
/** Resolved date-fns locale for formatting */
|
|
19
|
+
locale?: Locale;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=IEventsListProps.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { CompactCalendar } from './CompactCalendar';
|
|
2
|
+
export { CalendarGrid } from './CalendarGrid';
|
|
3
|
+
export { CalendarHeader } from './CalendarHeader';
|
|
4
|
+
export { EventsList } from './EventsList';
|
|
5
|
+
export type { ICompactCalendarProps, ICompactCalendarRenderHeaderInput, } from './ICompactCalendarProps';
|
|
6
|
+
export type { ICalendarGridProps } from './ICalendarGridProps';
|
|
7
|
+
export type { ICalendarHeaderProps } from './ICalendarHeaderProps';
|
|
8
|
+
export type { IEventsListProps } from './IEventsListProps';
|
|
9
|
+
export { useCompactCalendarEvents } from './useCompactCalendarEvents';
|
|
10
|
+
export type { GroupedEvents } from './useCompactCalendarEvents';
|
|
11
|
+
export { resolveLocale } from './resolveLocale';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Locale } from 'date-fns';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves a locale string or Locale object to a date-fns Locale.
|
|
4
|
+
*
|
|
5
|
+
* Resolution order:
|
|
6
|
+
* 1. If a date-fns `Locale` object is passed, return it directly.
|
|
7
|
+
* 2. Exact match in the locale map (e.g. 'fr-FR').
|
|
8
|
+
* 3. Language-prefix fallback (e.g. 'fr-CA' → 'fr').
|
|
9
|
+
* 4. Falls back to `enUS`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function resolveLocale(locale?: string | Locale): Locale;
|
|
12
|
+
//# sourceMappingURL=resolveLocale.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IEvent } from '../calendarControl/models/IEvents';
|
|
2
|
+
export type GroupedEvents = Record<string, IEvent[]>;
|
|
3
|
+
/**
|
|
4
|
+
* Hook that groups calendar events by date for a given month.
|
|
5
|
+
* Memoizes the result to avoid unnecessary recalculations.
|
|
6
|
+
*
|
|
7
|
+
* @param date - The month to group events for
|
|
8
|
+
* @param events - Array of events to group
|
|
9
|
+
* @returns Events grouped by date key ('yyyy-MM-dd')
|
|
10
|
+
*/
|
|
11
|
+
export declare const useCompactCalendarEvents: (date: Date, events: IEvent[] | undefined) => GroupedEvents;
|
|
12
|
+
//# sourceMappingURL=useCompactCalendarEvents.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const useCompactCalendarStyles: () => {
|
|
2
|
+
styles: {
|
|
3
|
+
root: string;
|
|
4
|
+
header: string;
|
|
5
|
+
headerBackButton: string;
|
|
6
|
+
headerLabel: string;
|
|
7
|
+
calendar: string;
|
|
8
|
+
weekdaysCorner: string;
|
|
9
|
+
weekday: string;
|
|
10
|
+
weekNumber: string;
|
|
11
|
+
day: string;
|
|
12
|
+
dayHidden: string;
|
|
13
|
+
dayWeekend: string;
|
|
14
|
+
dayOutside: string;
|
|
15
|
+
dayToday: string;
|
|
16
|
+
daySelected: string;
|
|
17
|
+
dayIndicators: string;
|
|
18
|
+
dayIndicator: string;
|
|
19
|
+
eventsList: string;
|
|
20
|
+
eventsHeader: string;
|
|
21
|
+
event: string;
|
|
22
|
+
eventColor: string;
|
|
23
|
+
eventTimeColor: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=useCompactCalendarStyles.d.ts.map
|