@cerberus-design/react 0.13.2-next-46f23d2 → 0.13.2-next-9b3d27e
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/build/legacy/_tsup-dts-rollup.d.cts +297 -1
- package/build/legacy/components/Accordion.cjs.map +1 -1
- package/build/legacy/components/AccordionItemGroup.cjs.map +1 -1
- package/build/legacy/components/Admonition.cjs +3 -0
- package/build/legacy/components/Admonition.cjs.map +1 -1
- package/build/legacy/components/Avatar.cjs +3 -0
- package/build/legacy/components/Avatar.cjs.map +1 -1
- package/build/legacy/components/Checkbox.cjs +3 -0
- package/build/legacy/components/Checkbox.cjs.map +1 -1
- package/build/legacy/components/DatePicker.client.cjs +525 -0
- package/build/legacy/components/DatePicker.client.cjs.map +1 -0
- package/build/legacy/components/DatePicker.server.cjs +364 -0
- package/build/legacy/components/DatePicker.server.cjs.map +1 -0
- package/build/legacy/components/FileStatus.cjs +3 -0
- package/build/legacy/components/FileStatus.cjs.map +1 -1
- package/build/legacy/components/FileUploader.cjs +3 -0
- package/build/legacy/components/FileUploader.cjs.map +1 -1
- package/build/legacy/components/Input.cjs +3 -0
- package/build/legacy/components/Input.cjs.map +1 -1
- package/build/legacy/components/Notification.cjs +3 -0
- package/build/legacy/components/Notification.cjs.map +1 -1
- package/build/legacy/components/Select.cjs +3 -0
- package/build/legacy/components/Select.cjs.map +1 -1
- package/build/legacy/components/Tag.cjs +3 -0
- package/build/legacy/components/Tag.cjs.map +1 -1
- package/build/legacy/components/Toggle.cjs +3 -0
- package/build/legacy/components/Toggle.cjs.map +1 -1
- package/build/legacy/config/cerbIcons.cjs +3 -0
- package/build/legacy/config/cerbIcons.cjs.map +1 -1
- package/build/legacy/config/defineIcons.cjs +3 -0
- package/build/legacy/config/defineIcons.cjs.map +1 -1
- package/build/legacy/context/confirm-modal.cjs +3 -0
- package/build/legacy/context/confirm-modal.cjs.map +1 -1
- package/build/legacy/context/cta-modal.cjs +3 -0
- package/build/legacy/context/cta-modal.cjs.map +1 -1
- package/build/legacy/context/notification-center.cjs +3 -0
- package/build/legacy/context/notification-center.cjs.map +1 -1
- package/build/legacy/context/prompt-modal.cjs +3 -0
- package/build/legacy/context/prompt-modal.cjs.map +1 -1
- package/build/legacy/hooks/useDate.cjs +8 -0
- package/build/legacy/hooks/useDate.cjs.map +1 -1
- package/build/legacy/index.cjs +909 -613
- package/build/legacy/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +297 -1
- package/build/modern/{chunk-ZTYKIWYQ.js → chunk-34E3UFFB.js} +1 -1
- package/build/modern/chunk-34E3UFFB.js.map +1 -0
- package/build/modern/{chunk-CZND26FC.js → chunk-3BM6MZ4A.js} +8 -1
- package/build/modern/{chunk-CZND26FC.js.map → chunk-3BM6MZ4A.js.map} +1 -1
- package/build/modern/{chunk-67KLFLNR.js → chunk-4IMOKN2D.js} +3 -3
- package/build/modern/{chunk-XNX3OTJK.js → chunk-5KHU6MM5.js} +7 -1
- package/build/modern/chunk-5KHU6MM5.js.map +1 -0
- package/build/modern/{chunk-C3HYHH3H.js → chunk-BU5JK37R.js} +2 -2
- package/build/modern/{chunk-UBN2CZLV.js → chunk-DDOTCGGA.js} +2 -2
- package/build/modern/{chunk-CMDPTXHB.js → chunk-ECKJGCNH.js} +6 -6
- package/build/modern/{chunk-W3YI64C5.js → chunk-F4LTOZAN.js} +2 -2
- package/build/modern/{chunk-SVFZJYLV.js → chunk-F7EWTOML.js} +2 -2
- package/build/modern/{chunk-CSMPRYNC.js → chunk-F7XWOSN3.js} +2 -2
- package/build/modern/{chunk-NF5WV3OW.js → chunk-FRWNAVDM.js} +6 -6
- package/build/modern/{chunk-42RVVWGM.js → chunk-G7AGKII3.js} +11 -11
- package/build/modern/{chunk-RET4YOBV.js → chunk-GI6CSUU4.js} +6 -6
- package/build/modern/{chunk-35L6DOHE.js → chunk-HP4ZN473.js} +2 -2
- package/build/modern/chunk-IP5VFOPZ.js +132 -0
- package/build/modern/chunk-IP5VFOPZ.js.map +1 -0
- package/build/modern/{chunk-RHHFH6JJ.js → chunk-M73ECA25.js} +2 -2
- package/build/modern/{chunk-OFAATLPF.js → chunk-O7QVCF3H.js} +3 -3
- package/build/modern/chunk-QX4V5V74.js +169 -0
- package/build/modern/chunk-QX4V5V74.js.map +1 -0
- package/build/modern/{chunk-3DGV4ESI.js → chunk-S25RHYZV.js} +2 -2
- package/build/modern/{chunk-PGXJJDPH.js → chunk-W2LSPRQ3.js} +2 -2
- package/build/modern/{chunk-MRH2EO3L.js → chunk-XVU2NQCW.js} +2 -2
- package/build/modern/components/Accordion.js +1 -1
- package/build/modern/components/AccordionItemGroup.js +2 -2
- package/build/modern/components/Admonition.js +4 -4
- package/build/modern/components/Avatar.js +3 -3
- package/build/modern/components/Checkbox.js +3 -3
- package/build/modern/components/DatePicker.client.js +32 -0
- package/build/modern/components/DatePicker.client.js.map +1 -0
- package/build/modern/components/DatePicker.server.js +31 -0
- package/build/modern/components/DatePicker.server.js.map +1 -0
- package/build/modern/components/FileStatus.js +5 -5
- package/build/modern/components/FileUploader.js +4 -4
- package/build/modern/components/Input.js +3 -3
- package/build/modern/components/Notification.js +3 -3
- package/build/modern/components/Select.js +3 -3
- package/build/modern/components/Tag.js +3 -3
- package/build/modern/components/Toggle.js +3 -3
- package/build/modern/config/cerbIcons.js +1 -1
- package/build/modern/config/defineIcons.js +2 -2
- package/build/modern/context/confirm-modal.js +5 -5
- package/build/modern/context/cta-modal.js +5 -5
- package/build/modern/context/notification-center.js +4 -4
- package/build/modern/context/prompt-modal.js +8 -8
- package/build/modern/hooks/useDate.js +3 -1
- package/build/modern/index.js +110 -68
- package/build/modern/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Accordion.tsx +0 -1
- package/src/components/DatePicker.client.tsx +364 -0
- package/src/components/DatePicker.server.tsx +229 -0
- package/src/config/cerbIcons.ts +9 -0
- package/src/hooks/useDate.ts +12 -0
- package/src/index.ts +2 -0
- package/build/modern/chunk-XNX3OTJK.js.map +0 -1
- package/build/modern/chunk-ZTYKIWYQ.js.map +0 -1
- /package/build/modern/{chunk-67KLFLNR.js.map → chunk-4IMOKN2D.js.map} +0 -0
- /package/build/modern/{chunk-C3HYHH3H.js.map → chunk-BU5JK37R.js.map} +0 -0
- /package/build/modern/{chunk-UBN2CZLV.js.map → chunk-DDOTCGGA.js.map} +0 -0
- /package/build/modern/{chunk-CMDPTXHB.js.map → chunk-ECKJGCNH.js.map} +0 -0
- /package/build/modern/{chunk-W3YI64C5.js.map → chunk-F4LTOZAN.js.map} +0 -0
- /package/build/modern/{chunk-SVFZJYLV.js.map → chunk-F7EWTOML.js.map} +0 -0
- /package/build/modern/{chunk-CSMPRYNC.js.map → chunk-F7XWOSN3.js.map} +0 -0
- /package/build/modern/{chunk-NF5WV3OW.js.map → chunk-FRWNAVDM.js.map} +0 -0
- /package/build/modern/{chunk-42RVVWGM.js.map → chunk-G7AGKII3.js.map} +0 -0
- /package/build/modern/{chunk-RET4YOBV.js.map → chunk-GI6CSUU4.js.map} +0 -0
- /package/build/modern/{chunk-35L6DOHE.js.map → chunk-HP4ZN473.js.map} +0 -0
- /package/build/modern/{chunk-RHHFH6JJ.js.map → chunk-M73ECA25.js.map} +0 -0
- /package/build/modern/{chunk-OFAATLPF.js.map → chunk-O7QVCF3H.js.map} +0 -0
- /package/build/modern/{chunk-3DGV4ESI.js.map → chunk-S25RHYZV.js.map} +0 -0
- /package/build/modern/{chunk-PGXJJDPH.js.map → chunk-W2LSPRQ3.js.map} +0 -0
- /package/build/modern/{chunk-MRH2EO3L.js.map → chunk-XVU2NQCW.js.map} +0 -0
|
@@ -27,6 +27,18 @@ import { CollisionDetection } from '@dnd-kit/core';
|
|
|
27
27
|
import { Context } from 'react';
|
|
28
28
|
import { Data } from '@dnd-kit/core';
|
|
29
29
|
import { DataRef } from '@dnd-kit/core';
|
|
30
|
+
import { DatePicker as DatePicker_2 } from '@ark-ui/react';
|
|
31
|
+
import { DatePickerContentProps } from '@ark-ui/react';
|
|
32
|
+
import { DatePickerInputProps } from '@ark-ui/react';
|
|
33
|
+
import { DatePickerLabelProps } from '@ark-ui/react';
|
|
34
|
+
import { DatePickerRootProps } from '@ark-ui/react';
|
|
35
|
+
import { DatePickerTableCellProps } from '@ark-ui/react';
|
|
36
|
+
import { DatePickerTableCellTriggerProps } from '@ark-ui/react';
|
|
37
|
+
import { DatePickerTableHeaderProps } from '@ark-ui/react';
|
|
38
|
+
import { DatePickerTableProps } from '@ark-ui/react';
|
|
39
|
+
import { DatePickerTriggerProps } from '@ark-ui/react';
|
|
40
|
+
import { DatePickerViewControlProps } from '@ark-ui/react';
|
|
41
|
+
import { DatePickerViewProps } from '@ark-ui/react';
|
|
30
42
|
import { defaultAnnouncements } from '@dnd-kit/core';
|
|
31
43
|
import { defaultCoordinates } from '@dnd-kit/core';
|
|
32
44
|
import { defaultDropAnimation } from '@dnd-kit/core';
|
|
@@ -153,7 +165,6 @@ export { $cerberusIcons as $cerberusIcons_alias_1 }
|
|
|
153
165
|
|
|
154
166
|
/**
|
|
155
167
|
* The context provider for the Accordion family.
|
|
156
|
-
* @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)
|
|
157
168
|
* @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)
|
|
158
169
|
* @example
|
|
159
170
|
* ```tsx
|
|
@@ -769,6 +780,261 @@ declare const DateFormats: {
|
|
|
769
780
|
export { DateFormats }
|
|
770
781
|
export { DateFormats as DateFormats_alias_1 }
|
|
771
782
|
|
|
783
|
+
/**
|
|
784
|
+
* The main context provider for the DatePicker family components.
|
|
785
|
+
* @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
786
|
+
* @example
|
|
787
|
+
* ```tsx
|
|
788
|
+
* <Field>
|
|
789
|
+
* <DatePicker name="start_date">
|
|
790
|
+
* <DatePickerLabel>Start date</DatePickerLabel>
|
|
791
|
+
* <DatePickerInput />
|
|
792
|
+
* <DatePickerCalendar />
|
|
793
|
+
* </DatePicker>
|
|
794
|
+
* </Field>
|
|
795
|
+
* ```
|
|
796
|
+
*/
|
|
797
|
+
declare function DatePicker(props: DatePickerRootProps): JSX_2.Element;
|
|
798
|
+
export { DatePicker }
|
|
799
|
+
export { DatePicker as DatePicker_alias_1 }
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* An abstraction of the DatePicker content components that contain the
|
|
803
|
+
* different calendar views and controls.
|
|
804
|
+
* @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
805
|
+
* @example
|
|
806
|
+
* ```tsx
|
|
807
|
+
* <Field>
|
|
808
|
+
* <DatePicker name="start_date">
|
|
809
|
+
* <DatePickerLabel>Start date</DatePickerLabel>
|
|
810
|
+
* <DatePickerInput />
|
|
811
|
+
* <DatePickerCalendar />
|
|
812
|
+
* </DatePicker>
|
|
813
|
+
* </Field>
|
|
814
|
+
* ```
|
|
815
|
+
*/
|
|
816
|
+
declare function DatePickerCalendar(): JSX_2.Element;
|
|
817
|
+
export { DatePickerCalendar }
|
|
818
|
+
export { DatePickerCalendar as DatePickerCalendar_alias_1 }
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* The content component for the DatePicker which contains the calendar.
|
|
822
|
+
* @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
823
|
+
* @example
|
|
824
|
+
* ```tsx
|
|
825
|
+
* <Field>
|
|
826
|
+
* <DatePicker name="start_date">
|
|
827
|
+
* <DatePickerLabel>Start date</DatePickerLabel>
|
|
828
|
+
* <DatePickerInput />
|
|
829
|
+
* <DatePickerCalendar />
|
|
830
|
+
* </DatePicker>
|
|
831
|
+
* </Field>
|
|
832
|
+
* ```
|
|
833
|
+
*/
|
|
834
|
+
declare function DatePickerContent(props: DatePickerContentProps): JSX_2.Element;
|
|
835
|
+
export { DatePickerContent }
|
|
836
|
+
export { DatePickerContent as DatePickerContent_alias_1 }
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* The context component for the DatePicker which provides the DatePicker state.
|
|
840
|
+
* @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
841
|
+
* @example
|
|
842
|
+
* ```tsx
|
|
843
|
+
* <DatePickerContext />
|
|
844
|
+
* ```
|
|
845
|
+
*/
|
|
846
|
+
declare const DatePickerContext: (props: DatePicker_2.ContextProps) => ReactNode;
|
|
847
|
+
export { DatePickerContext }
|
|
848
|
+
export { DatePickerContext as DatePickerContext_alias_1 }
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* The day view component for the DatePicker.
|
|
852
|
+
* @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
853
|
+
* @example
|
|
854
|
+
* ```tsx
|
|
855
|
+
* <Field>
|
|
856
|
+
* <DatePicker name="start_date">
|
|
857
|
+
* <DatePickerLabel>Start date</DatePickerLabel>
|
|
858
|
+
* <DatePickerInput />
|
|
859
|
+
* <DatePickerCalendar />
|
|
860
|
+
* </DatePicker>
|
|
861
|
+
* </Field>
|
|
862
|
+
* ```
|
|
863
|
+
*/
|
|
864
|
+
declare function DatePickerDayView(props: Omit<DatePickerViewProps, 'view'>): JSX_2.Element;
|
|
865
|
+
export { DatePickerDayView }
|
|
866
|
+
export { DatePickerDayView as DatePickerDayView_alias_1 }
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* The input component for the DatePicker.
|
|
870
|
+
* @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
871
|
+
* @example
|
|
872
|
+
* ```tsx
|
|
873
|
+
* <Field>
|
|
874
|
+
* <DatePicker name="start_date">
|
|
875
|
+
* <DatePickerLabel>Start date</DatePickerLabel>
|
|
876
|
+
* <DatePickerInput />
|
|
877
|
+
* <DatePickerCalendar />
|
|
878
|
+
* </DatePicker>
|
|
879
|
+
* </Field>
|
|
880
|
+
* ```
|
|
881
|
+
*/
|
|
882
|
+
declare function DatePickerInput(props: DatePickerInputProps): JSX_2.Element;
|
|
883
|
+
export { DatePickerInput }
|
|
884
|
+
export { DatePickerInput as DatePickerInput_alias_1 }
|
|
885
|
+
|
|
886
|
+
/**
|
|
887
|
+
* The label component for the DatePicker.
|
|
888
|
+
* @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
889
|
+
* @example
|
|
890
|
+
* ```tsx
|
|
891
|
+
* <DatePickerLabel>
|
|
892
|
+
* <DatePickerLabel.Label>...</DatePickerLabel.Label>
|
|
893
|
+
* </DatePickerLabel>
|
|
894
|
+
* ```
|
|
895
|
+
*/
|
|
896
|
+
declare function DatePickerLabel(props: DatePickerLabelProps): JSX_2.Element;
|
|
897
|
+
export { DatePickerLabel }
|
|
898
|
+
export { DatePickerLabel as DatePickerLabel_alias_1 }
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* The month view component for the DatePicker.
|
|
902
|
+
* @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
903
|
+
* @example
|
|
904
|
+
* ```tsx
|
|
905
|
+
* <Field>
|
|
906
|
+
* <DatePicker name="start_date">
|
|
907
|
+
* <DatePickerLabel>Start date</DatePickerLabel>
|
|
908
|
+
* <DatePickerInput />
|
|
909
|
+
* <DatePickerCalendar />
|
|
910
|
+
* </DatePicker>
|
|
911
|
+
* </Field>
|
|
912
|
+
* ```
|
|
913
|
+
*/
|
|
914
|
+
declare function DatePickerMonthView(props: Omit<DatePickerViewProps, 'view'>): JSX_2.Element;
|
|
915
|
+
export { DatePickerMonthView }
|
|
916
|
+
export { DatePickerMonthView as DatePickerMonthView_alias_1 }
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* The table component for the DatePicker.
|
|
920
|
+
* @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
921
|
+
* @example
|
|
922
|
+
* ```tsx
|
|
923
|
+
* <DatePickerTable />
|
|
924
|
+
* ```
|
|
925
|
+
*/
|
|
926
|
+
declare function DatePickerTable(props: DatePickerTableProps): JSX_2.Element;
|
|
927
|
+
export { DatePickerTable }
|
|
928
|
+
export { DatePickerTable as DatePickerTable_alias_1 }
|
|
929
|
+
|
|
930
|
+
/**
|
|
931
|
+
* The cell component for the DatePicker table.
|
|
932
|
+
* @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
933
|
+
* @example
|
|
934
|
+
* ```tsx
|
|
935
|
+
* <DatePickerTableCell />
|
|
936
|
+
* ```
|
|
937
|
+
*/
|
|
938
|
+
declare function DatePickerTableCell(props: DatePickerTableCellProps): JSX_2.Element;
|
|
939
|
+
export { DatePickerTableCell }
|
|
940
|
+
export { DatePickerTableCell as DatePickerTableCell_alias_1 }
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* The cell component for the DatePicker table.
|
|
944
|
+
* @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
945
|
+
* @example
|
|
946
|
+
* ```tsx
|
|
947
|
+
* <DatePickerTableCell />
|
|
948
|
+
* ```
|
|
949
|
+
*/
|
|
950
|
+
declare function DatePickerTableCellTrigger(props: DatePickerTableCellTriggerProps): JSX_2.Element;
|
|
951
|
+
export { DatePickerTableCellTrigger }
|
|
952
|
+
export { DatePickerTableCellTrigger as DatePickerTableCellTrigger_alias_1 }
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* The header component for the DatePicker table.
|
|
956
|
+
* @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
957
|
+
* @example
|
|
958
|
+
* ```tsx
|
|
959
|
+
* <DatePickerTableHeader />
|
|
960
|
+
* ```
|
|
961
|
+
*/
|
|
962
|
+
declare function DatePickerTableHeader(props: DatePickerTableHeaderProps): JSX_2.Element;
|
|
963
|
+
export { DatePickerTableHeader }
|
|
964
|
+
export { DatePickerTableHeader as DatePickerTableHeader_alias_1 }
|
|
965
|
+
|
|
966
|
+
/**
|
|
967
|
+
* The trigger component for the DatePicker which opens the calendar.
|
|
968
|
+
* @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
969
|
+
* @example
|
|
970
|
+
* ```tsx
|
|
971
|
+
* <DatePickerTrigger />
|
|
972
|
+
* ```
|
|
973
|
+
*/
|
|
974
|
+
declare function DatePickerTrigger(props: DatePickerTriggerProps): JSX_2.Element;
|
|
975
|
+
export { DatePickerTrigger }
|
|
976
|
+
export { DatePickerTrigger as DatePickerTrigger_alias_1 }
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
* The view container which wraps the control and content components.
|
|
980
|
+
* @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
981
|
+
* @example
|
|
982
|
+
* ```tsx
|
|
983
|
+
* <DatePickerView />
|
|
984
|
+
* ```
|
|
985
|
+
*/
|
|
986
|
+
declare const DatePickerView: ForwardRefExoticComponent<DatePicker_2.ViewProps & RefAttributes<HTMLDivElement>>;
|
|
987
|
+
export { DatePickerView }
|
|
988
|
+
export { DatePickerView as DatePickerView_alias_1 }
|
|
989
|
+
|
|
990
|
+
/**
|
|
991
|
+
* The control component for the DatePicker which wraps the triggers to switch
|
|
992
|
+
* between calendar views.
|
|
993
|
+
* @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
994
|
+
* @example
|
|
995
|
+
* ```tsx
|
|
996
|
+
* <DatePickerViewControl>
|
|
997
|
+
* <PrevTrigger />
|
|
998
|
+
* <ViewTrigger />
|
|
999
|
+
* <NextTrigger />
|
|
1000
|
+
* </DatePickerViewControl>
|
|
1001
|
+
* ```
|
|
1002
|
+
*/
|
|
1003
|
+
declare function DatePickerViewControl(props: DatePickerViewControlProps): JSX_2.Element;
|
|
1004
|
+
export { DatePickerViewControl }
|
|
1005
|
+
export { DatePickerViewControl as DatePickerViewControl_alias_1 }
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* An abstraction of the DatePicker control that contains the prev, view, and
|
|
1009
|
+
* next triggers which control the calendar output.
|
|
1010
|
+
* @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
1011
|
+
* @example
|
|
1012
|
+
* ```tsx
|
|
1013
|
+
* <DatePickerViewControlGroup />
|
|
1014
|
+
* ```
|
|
1015
|
+
*/
|
|
1016
|
+
declare function DatePickerViewControlGroup(props: DatePickerViewControlProps): JSX_2.Element;
|
|
1017
|
+
export { DatePickerViewControlGroup }
|
|
1018
|
+
export { DatePickerViewControlGroup as DatePickerViewControlGroup_alias_1 }
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* The year view component for the DatePicker.
|
|
1022
|
+
* @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
1023
|
+
* @example
|
|
1024
|
+
* ```tsx
|
|
1025
|
+
* <Field>
|
|
1026
|
+
* <DatePicker name="start_date">
|
|
1027
|
+
* <DatePickerLabel>Start date</DatePickerLabel>
|
|
1028
|
+
* <DatePickerInput />
|
|
1029
|
+
* <DatePickerCalendar />
|
|
1030
|
+
* </DatePicker>
|
|
1031
|
+
* </Field>
|
|
1032
|
+
* ```
|
|
1033
|
+
*/
|
|
1034
|
+
declare function DatePickerYearView(props: Omit<DatePickerViewProps, 'view'>): JSX_2.Element;
|
|
1035
|
+
export { DatePickerYearView }
|
|
1036
|
+
export { DatePickerYearView as DatePickerYearView_alias_1 }
|
|
1037
|
+
|
|
772
1038
|
export { defaultAnnouncements }
|
|
773
1039
|
|
|
774
1040
|
export { defaultCoordinates }
|
|
@@ -791,6 +1057,9 @@ export { DefaultThemes as DefaultThemes_alias_1 }
|
|
|
791
1057
|
|
|
792
1058
|
export declare interface DefinedIcons {
|
|
793
1059
|
avatar?: IconType;
|
|
1060
|
+
calendar?: IconType;
|
|
1061
|
+
calendarPrev?: IconType;
|
|
1062
|
+
calendarNext?: IconType;
|
|
794
1063
|
checkbox?: IconType;
|
|
795
1064
|
close?: IconType;
|
|
796
1065
|
confirmModal?: IconType;
|
|
@@ -1218,6 +1487,15 @@ declare interface FileUploaderProps extends InputHTMLAttributes<HTMLInputElement
|
|
|
1218
1487
|
export { FileUploaderProps }
|
|
1219
1488
|
export { FileUploaderProps as FileUploaderProps_alias_1 }
|
|
1220
1489
|
|
|
1490
|
+
/**
|
|
1491
|
+
* Formats a date string to US Military format.
|
|
1492
|
+
* @param date The date string to format (i.e., '2024-01-01')
|
|
1493
|
+
* @returns The formatted date string in US Military format (DD MMM YYYY)
|
|
1494
|
+
*/
|
|
1495
|
+
declare function formatISOToMilitary(date: string): string;
|
|
1496
|
+
export { formatISOToMilitary }
|
|
1497
|
+
export { formatISOToMilitary as formatISOToMilitary_alias_1 }
|
|
1498
|
+
|
|
1221
1499
|
/**
|
|
1222
1500
|
* Converts a string to US Military format. Used within the `useDate` hook.
|
|
1223
1501
|
* @param input The string to format
|
|
@@ -2242,6 +2520,24 @@ declare type RadioRecipe = RecipeVariantProps<typeof radio>;
|
|
|
2242
2520
|
export { RadioRecipe }
|
|
2243
2521
|
export { RadioRecipe as RadioRecipe_alias_1 }
|
|
2244
2522
|
|
|
2523
|
+
/**
|
|
2524
|
+
* The input component for the DatePicker that uses ranges.
|
|
2525
|
+
* @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
2526
|
+
* @example
|
|
2527
|
+
* ```tsx
|
|
2528
|
+
* <Field>
|
|
2529
|
+
* <DatePicker name="start_date" selection="range">
|
|
2530
|
+
* <DatePickerLabel>Start date</DatePickerLabel>
|
|
2531
|
+
* <RangePickerInput />
|
|
2532
|
+
* <DatePickerCalendar />
|
|
2533
|
+
* </DatePicker>
|
|
2534
|
+
* </Field>
|
|
2535
|
+
* ```
|
|
2536
|
+
*/
|
|
2537
|
+
declare function RangePickerInput(props: DatePickerInputProps): JSX_2.Element;
|
|
2538
|
+
export { RangePickerInput }
|
|
2539
|
+
export { RangePickerInput as RangePickerInput_alias_1 }
|
|
2540
|
+
|
|
2245
2541
|
export { rectIntersection }
|
|
2246
2542
|
|
|
2247
2543
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Accordion.tsx"],"sourcesContent":["import { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { ChevronDown } from '@cerberus/icons'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n accordion,\n type AccordionVariantProps,\n} from '@cerberus/styled-system/recipes'\n\nexport type AccordionProps = ArkAccordion.RootProps & AccordionVariantProps\n\n/**\n * The context provider for the Accordion family.\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItemGroup heading=\"Item 1 heading\" value=\"one\">\n * This is the content\n * </AccordionItemGroup>\n * </Accordion>\n * ```\n */\nexport function Accordion(props: AccordionProps) {\n const { size, className, ...rootProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.Root\n collapsible\n className={cx(className, styles.root)}\n {...rootProps}\n />\n )\n}\n\ntype AccordionItemProps = ArkAccordion.ItemProps & AccordionVariantProps\n\n/**\n * The item for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItem(props: AccordionItemProps) {\n const { size, ...itemProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.Item\n {...itemProps}\n className={cx(itemProps.className, styles.item)}\n />\n )\n}\n\nexport type AccordionItemTriggerProps = ArkAccordion.ItemTriggerProps &\n AccordionVariantProps\n\n/**\n * The trigger for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItemTrigger(props: AccordionItemTriggerProps) {\n const { size, ...triggerProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemTrigger\n {...triggerProps}\n className={cx(triggerProps.className, styles.itemTrigger)}\n />\n )\n}\n\nexport type AccordionItemIndicatorProps = ArkAccordion.ItemIndicatorProps &\n AccordionVariantProps\n\n/**\n * The indicator for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n * */\nexport function AccordionItemIndicator(props: AccordionItemIndicatorProps) {\n const { size, ...indicatorProps } = props\n const styles = accordion({ size })\n const iconSize = size === 'sm' ? 16 : '24'\n\n return (\n <ArkAccordion.ItemIndicator\n {...indicatorProps}\n className={cx(indicatorProps.className, styles.itemIndicator)}\n >\n <ChevronDown size={iconSize} />\n </ArkAccordion.ItemIndicator>\n )\n}\n\nexport type AccordionItemContentProps = ArkAccordion.ItemContentProps &\n AccordionVariantProps\n\n/**\n * The content for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n * */\nexport function AccordionItemContent(props: AccordionItemContentProps) {\n const { size, ...contentProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemContent\n {...contentProps}\n className={cx(contentProps.className, styles.itemContent)}\n />\n )\n}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AAM,GAAG,aAAa,IAAI;AAClC,QAAM,SAAS,UAAU,EAAE,KAAK,CAAC;AACjC,SACE;AAAA,IAAC,aAAa;AAAA,IAAb;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,aAAa,WAAW,OAAO,WAAW;AAAA;AAAA,EAC1D;AAEJ;","names":[]}
|
|
@@ -63,6 +63,12 @@ function formatMilitaryDate(input) {
|
|
|
63
63
|
}
|
|
64
64
|
return [day, month, year].filter(Boolean).join(" ");
|
|
65
65
|
}
|
|
66
|
+
function formatISOToMilitary(date) {
|
|
67
|
+
const [year, month, day] = date.split("-");
|
|
68
|
+
const monthIndex = parseInt(month, 10) - 1;
|
|
69
|
+
const monthStr = MONTHS[monthIndex];
|
|
70
|
+
return `${day} ${monthStr} ${year}`;
|
|
71
|
+
}
|
|
66
72
|
var DateFormats = {
|
|
67
73
|
get ISO() {
|
|
68
74
|
return "YYYY-MM-DD";
|
|
@@ -93,6 +99,7 @@ export {
|
|
|
93
99
|
useDate,
|
|
94
100
|
formatMilitaryToISO,
|
|
95
101
|
formatMilitaryDate,
|
|
102
|
+
formatISOToMilitary,
|
|
96
103
|
DateFormats
|
|
97
104
|
};
|
|
98
|
-
//# sourceMappingURL=chunk-
|
|
105
|
+
//# sourceMappingURL=chunk-3BM6MZ4A.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useDate.ts"],"sourcesContent":["'use client'\n\nimport {\n useState,\n useCallback,\n ChangeEvent,\n useMemo,\n type InputHTMLAttributes,\n} from 'react'\n\nexport interface UseDateBase {\n /**\n * The format of the date input\n */\n format?: string\n /**\n * The callback to run when the date input changes\n */\n onChange?: InputHTMLAttributes<HTMLInputElement>['onChange']\n}\n\nexport interface UseDateOptions extends UseDateBase {\n /**\n * The initial value of the date input\n */\n initialValue?: string\n}\n\nexport interface UseDateReturn extends UseDateBase {\n /**\n * The ISO formatted date string\n */\n ISO: string\n /**\n * The value of the date input\n */\n value: string\n}\n\n/**\n * A hook for formatting and validating date inputs. The date format defaults to US Military format.\n * @example\n * ```tsx\n * const MyComponent = () => {\n * const date = useDate({ initialValue: '01 JAN 2024' })\n * return <input onChange={date.onChange} type=\"text\" value={date.value} />\n * }\n */\nexport function useDate(options?: UseDateOptions): UseDateReturn {\n const initialValue = options?.initialValue ?? ''\n const format = options?.format ?? DateFormats.USMilitary\n const onChange = options?.onChange\n const [value, setValue] = useState(initialValue)\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n const newValue = formatMilitaryDate(e.currentTarget.value)\n if (onChange) onChange(e)\n setValue(newValue)\n },\n [onChange],\n )\n\n return useMemo(\n () => ({\n format,\n value,\n ISO: formatMilitaryToISO(value),\n onChange: handleChange,\n }),\n [format, value, handleChange],\n )\n}\n\n// helpers\n\n/**\n * Converts a string in US Military format to ISO format. Used within the `useDate` hook.\n * @param input The string to format\n * @returns The formatted string in ISO format (YYYY-MM-DD)\n */\nexport function formatMilitaryToISO(input: string) {\n const [day, month, year] = input.split(' ')\n const monthIndex = MONTHS.findIndex((m) => m.startsWith(month))\n const monthNum = monthIndex + 1\n return `${year ?? '0000'}-${monthNum.toString().padStart(2, '0')}-${day.padStart(\n 2,\n '0',\n )}`\n}\n\n/**\n * Converts a string to US Military format. Used within the `useDate` hook.\n * @param input The string to format\n * @returns The formatted string in US Military format (DD MMM YYYY)\n */\nexport function formatMilitaryDate(input: string): string {\n let formatted = input.toUpperCase().replace(/[^0-9A-Z]/g, '')\n let day = ''\n let month = ''\n let year = ''\n\n // Format day\n if (formatted.length >= 2) {\n day = formatted.replace(/[^0-9]/g, '').slice(0, 2)\n const dayNum = parseInt(day, 10)\n if (dayNum > 31) day = '31'\n else if (dayNum === 0) day = '01'\n formatted = formatted.slice(2)\n }\n\n // Format month\n if (formatted.length >= 3) {\n month = formatted.slice(0, 3)\n const monthIndex = MONTHS.findIndex((m) => m.startsWith(month))\n if (monthIndex !== -1) {\n month = MONTHS[monthIndex]\n } else {\n month = month.replace(/[^A-Z]/g, '')\n }\n formatted = formatted.slice(3)\n }\n\n // Format year\n if (formatted.length > 0) {\n year = formatted.slice(0, 4)\n }\n\n return [day, month, year].filter(Boolean).join(' ')\n}\n\n/**\n * Date formatting options\n * @example\n * ```tsx\n * const date = new Date()\n * const formatted = date.format(DateFormats.USMilitary)\n */\nexport const DateFormats = {\n get ISO() {\n return 'YYYY-MM-DD'\n },\n get USMilitary() {\n return 'DD MMM YYYY'\n },\n get Months() {\n return MONTHS\n },\n}\n\nconst MONTHS = [\n 'JAN',\n 'FEB',\n 'MAR',\n 'APR',\n 'MAY',\n 'JUN',\n 'JUL',\n 'AUG',\n 'SEP',\n 'OCT',\n 'NOV',\n 'DEC',\n]\n"],"mappings":";AAEA;AAAA,EACE;AAAA,EACA;AAAA,EAEA;AAAA,OAEK;AAwCA,SAAS,QAAQ,SAAyC;AAC/D,QAAM,eAAe,SAAS,gBAAgB;AAC9C,QAAM,SAAS,SAAS,UAAU,YAAY;AAC9C,QAAM,WAAW,SAAS;AAC1B,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,YAAY;AAE/C,QAAM,eAAe;AAAA,IACnB,CAAC,MAAqC;AACpC,YAAM,WAAW,mBAAmB,EAAE,cAAc,KAAK;AACzD,UAAI,SAAU,UAAS,CAAC;AACxB,eAAS,QAAQ;AAAA,IACnB;AAAA,IACA,CAAC,QAAQ;AAAA,EACX;AAEA,SAAO;AAAA,IACL,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA,KAAK,oBAAoB,KAAK;AAAA,MAC9B,UAAU;AAAA,IACZ;AAAA,IACA,CAAC,QAAQ,OAAO,YAAY;AAAA,EAC9B;AACF;AASO,SAAS,oBAAoB,OAAe;AACjD,QAAM,CAAC,KAAK,OAAO,IAAI,IAAI,MAAM,MAAM,GAAG;AAC1C,QAAM,aAAa,OAAO,UAAU,CAAC,MAAM,EAAE,WAAW,KAAK,CAAC;AAC9D,QAAM,WAAW,aAAa;AAC9B,SAAO,GA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AAA,EACA;AAAA,EACA;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useDate.ts"],"sourcesContent":["'use client'\n\nimport {\n useState,\n useCallback,\n ChangeEvent,\n useMemo,\n type InputHTMLAttributes,\n} from 'react'\n\nexport interface UseDateBase {\n /**\n * The format of the date input\n */\n format?: string\n /**\n * The callback to run when the date input changes\n */\n onChange?: InputHTMLAttributes<HTMLInputElement>['onChange']\n}\n\nexport interface UseDateOptions extends UseDateBase {\n /**\n * The initial value of the date input\n */\n initialValue?: string\n}\n\nexport interface UseDateReturn extends UseDateBase {\n /**\n * The ISO formatted date string\n */\n ISO: string\n /**\n * The value of the date input\n */\n value: string\n}\n\n/**\n * A hook for formatting and validating date inputs. The date format defaults to US Military format.\n * @example\n * ```tsx\n * const MyComponent = () => {\n * const date = useDate({ initialValue: '01 JAN 2024' })\n * return <input onChange={date.onChange} type=\"text\" value={date.value} />\n * }\n */\nexport function useDate(options?: UseDateOptions): UseDateReturn {\n const initialValue = options?.initialValue ?? ''\n const format = options?.format ?? DateFormats.USMilitary\n const onChange = options?.onChange\n const [value, setValue] = useState(initialValue)\n\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n const newValue = formatMilitaryDate(e.currentTarget.value)\n if (onChange) onChange(e)\n setValue(newValue)\n },\n [onChange],\n )\n\n return useMemo(\n () => ({\n format,\n value,\n ISO: formatMilitaryToISO(value),\n onChange: handleChange,\n }),\n [format, value, handleChange],\n )\n}\n\n// helpers\n\n/**\n * Converts a string in US Military format to ISO format. Used within the `useDate` hook.\n * @param input The string to format\n * @returns The formatted string in ISO format (YYYY-MM-DD)\n */\nexport function formatMilitaryToISO(input: string) {\n const [day, month, year] = input.split(' ')\n const monthIndex = MONTHS.findIndex((m) => m.startsWith(month))\n const monthNum = monthIndex + 1\n return `${year ?? '0000'}-${monthNum.toString().padStart(2, '0')}-${day.padStart(\n 2,\n '0',\n )}`\n}\n\n/**\n * Converts a string to US Military format. Used within the `useDate` hook.\n * @param input The string to format\n * @returns The formatted string in US Military format (DD MMM YYYY)\n */\nexport function formatMilitaryDate(input: string): string {\n let formatted = input.toUpperCase().replace(/[^0-9A-Z]/g, '')\n let day = ''\n let month = ''\n let year = ''\n\n // Format day\n if (formatted.length >= 2) {\n day = formatted.replace(/[^0-9]/g, '').slice(0, 2)\n const dayNum = parseInt(day, 10)\n if (dayNum > 31) day = '31'\n else if (dayNum === 0) day = '01'\n formatted = formatted.slice(2)\n }\n\n // Format month\n if (formatted.length >= 3) {\n month = formatted.slice(0, 3)\n const monthIndex = MONTHS.findIndex((m) => m.startsWith(month))\n if (monthIndex !== -1) {\n month = MONTHS[monthIndex]\n } else {\n month = month.replace(/[^A-Z]/g, '')\n }\n formatted = formatted.slice(3)\n }\n\n // Format year\n if (formatted.length > 0) {\n year = formatted.slice(0, 4)\n }\n\n return [day, month, year].filter(Boolean).join(' ')\n}\n\n/**\n * Formats a date string to US Military format.\n * @param date The date string to format (i.e., '2024-01-01')\n * @returns The formatted date string in US Military format (DD MMM YYYY)\n */\nexport function formatISOToMilitary(date: string): string {\n const [year, month, day] = date.split('-')\n const monthIndex = parseInt(month, 10) - 1\n const monthStr = MONTHS[monthIndex]\n return `${day} ${monthStr} ${year}`\n}\n\n/**\n * Date formatting options\n * @example\n * ```tsx\n * const date = new Date()\n * const formatted = date.format(DateFormats.USMilitary)\n */\nexport const DateFormats = {\n get ISO() {\n return 'YYYY-MM-DD'\n },\n get USMilitary() {\n return 'DD MMM YYYY'\n },\n get Months() {\n return MONTHS\n },\n}\n\nconst MONTHS = [\n 'JAN',\n 'FEB',\n 'MAR',\n 'APR',\n 'MAY',\n 'JUN',\n 'JUL',\n 'AUG',\n 'SEP',\n 'OCT',\n 'NOV',\n 'DEC',\n]\n"],"mappings":";AAEA;AAAA,EACE;AAAA,EACA;AAAA,EAEA;AAAA,OAEK;AAwCA,SAAS,QAAQ,SAAyC;AAC/D,QAAM,eAAe,SAAS,gBAAgB;AAC9C,QAAM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,UAAU,CAAC,MAAM,EAAE,WAAW,KAAK,CAAC;AAC9D,QAAI,eAAe,IAAI;AACrB,cAAQ,OAAO,UAAU;AAAA,IAC3B,OAAO;AACL,cAAQ,MAAM,QAAQ,WAAW,EAAE;AAAA,IACrC;AACA,gBAAY,UAAU,MAAM,CAAC;AAAA,EAC/B;AAGA,MAAI,UAAU,SAAS,GAAG;AACxB,WAAO,UAAU,MAAM,GAAG,CAAC;AAAA,EAC7B;AAEA,SAAO,CAAC,KAAK,OAAO,IAAI,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AACpD;AAOO,SAAS,oBAAoB,MAAsB;AACxD,QAAM,CAAC,MAAM,OAAO,GAAG,IAAI,KAAK,MAAM,GAAG;AACzC,QAAM,aAAa,SAAS,OAAO,EAAE,IAAI;AACzC,QAAM,WAAW,OAAO,UAAU;AAClC,SAAO,GAAG,GAAG,IAAI,QAAQ,IAAI,IAAI;AACnC;AASO,IAAM,cAAc;AAAA,EACzB,IAAI,MAAM;AACR,WAAO;AAAA,EACT;AAAA,EACA,IAAI,aAAa;AACf,WAAO;AAAA,EACT;AAAA,EACA,IAAI,SAAS;AACX,WAAO;AAAA,EACT;AACF;AAEA,IAAM,SAAS;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":[]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Avatar
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BU5JK37R.js";
|
|
4
4
|
import {
|
|
5
5
|
Show
|
|
6
6
|
} from "./chunk-BUVVRQLZ.js";
|
|
7
7
|
import {
|
|
8
8
|
$cerberusIcons
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DDOTCGGA.js";
|
|
10
10
|
|
|
11
11
|
// src/components/Admonition.tsx
|
|
12
12
|
import {
|
|
@@ -135,4 +135,4 @@ export {
|
|
|
135
135
|
AdmonitionHeading,
|
|
136
136
|
AdmonitionDescription
|
|
137
137
|
};
|
|
138
|
-
//# sourceMappingURL=chunk-
|
|
138
|
+
//# sourceMappingURL=chunk-4IMOKN2D.js.map
|
|
@@ -8,9 +8,12 @@ import {
|
|
|
8
8
|
|
|
9
9
|
// src/config/cerbIcons.ts
|
|
10
10
|
import {
|
|
11
|
+
Calendar,
|
|
11
12
|
Checkmark,
|
|
12
13
|
CheckmarkOutline,
|
|
13
14
|
ChevronDown,
|
|
15
|
+
ChevronLeft,
|
|
16
|
+
ChevronRight,
|
|
14
17
|
Close,
|
|
15
18
|
CloudUpload,
|
|
16
19
|
Information,
|
|
@@ -23,6 +26,9 @@ import {
|
|
|
23
26
|
} from "@cerberus/icons";
|
|
24
27
|
var defaultIcons = {
|
|
25
28
|
avatar: UserFilled,
|
|
29
|
+
calendar: Calendar,
|
|
30
|
+
calendarPrev: ChevronLeft,
|
|
31
|
+
calendarNext: ChevronRight,
|
|
26
32
|
checkbox: CheckmarkIcon,
|
|
27
33
|
close: Close,
|
|
28
34
|
confirmModal: Information,
|
|
@@ -45,4 +51,4 @@ var defaultIcons = {
|
|
|
45
51
|
export {
|
|
46
52
|
defaultIcons
|
|
47
53
|
};
|
|
48
|
-
//# sourceMappingURL=chunk-
|
|
54
|
+
//# sourceMappingURL=chunk-5KHU6MM5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/config/cerbIcons.ts"],"sourcesContent":["import {\n Calendar,\n Checkmark,\n CheckmarkOutline,\n ChevronDown,\n ChevronLeft,\n ChevronRight,\n Close,\n CloudUpload,\n Information,\n Restart,\n TrashCan,\n UserFilled,\n Warning,\n WarningAlt,\n WarningFilled,\n type CarbonIconType,\n} from '@cerberus/icons'\nimport type { ElementType } from 'react'\nimport { CheckmarkIcon, IndeterminateIcon } from './icons/checkbox.icons'\nimport { AnimatingUploadIcon } from '../components/AnimatingUploadIcon'\n\nexport type IconType = CarbonIconType | ElementType\n\nexport interface DefinedIcons {\n avatar?: IconType\n calendar?: IconType\n calendarPrev?: IconType\n calendarNext?: IconType\n checkbox?: IconType\n close?: IconType\n confirmModal?: IconType\n delete?: IconType\n promptModal?: IconType\n waitingFileUploader?: IconType\n fileUploader?: IconType\n indeterminate?: IconType\n infoNotification?: IconType\n successNotification?: IconType\n warningNotification?: IconType\n dangerNotification?: IconType\n invalid: IconType\n invalidAlt?: IconType\n redo?: IconType\n selectArrow?: IconType\n toggleChecked?: IconType\n}\n\nexport const defaultIcons: DefinedIcons = {\n avatar: UserFilled,\n calendar: Calendar,\n calendarPrev: ChevronLeft,\n calendarNext: ChevronRight,\n checkbox: CheckmarkIcon,\n close: Close,\n confirmModal: Information,\n delete: TrashCan,\n promptModal: Information,\n waitingFileUploader: CloudUpload,\n fileUploader: AnimatingUploadIcon,\n indeterminate: IndeterminateIcon,\n infoNotification: Information,\n successNotification: CheckmarkOutline,\n warningNotification: WarningAlt,\n dangerNotification: WarningFilled,\n invalid: WarningFilled,\n invalidAlt: Warning,\n redo: Restart,\n selectArrow: ChevronDown,\n toggleChecked: Checkmark,\n}\n"],"mappings":";;;;;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AA+BA,IAAM,eAA6B;AAAA,EACxC,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,cAAc;AAAA,EACd,cAAc;AAAA,EACd,UAAU;AAAA,EACV,OAAO;AAAA,EACP,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,aAAa;AAAA,EACb,eAAe;AACjB;","names":[]}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-BUVVRQLZ.js";
|
|
4
4
|
import {
|
|
5
5
|
$cerberusIcons
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DDOTCGGA.js";
|
|
7
7
|
|
|
8
8
|
// src/components/Avatar.tsx
|
|
9
9
|
import { css, cx } from "@cerberus/styled-system/css";
|
|
@@ -101,4 +101,4 @@ var iconSizeMap = {
|
|
|
101
101
|
export {
|
|
102
102
|
Avatar
|
|
103
103
|
};
|
|
104
|
-
//# sourceMappingURL=chunk-
|
|
104
|
+
//# sourceMappingURL=chunk-BU5JK37R.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defaultIcons
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5KHU6MM5.js";
|
|
4
4
|
|
|
5
5
|
// src/config/defineIcons.ts
|
|
6
6
|
function _validateIconsProperties(icons) {
|
|
@@ -24,4 +24,4 @@ export {
|
|
|
24
24
|
defineIcons,
|
|
25
25
|
$cerberusIcons
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=chunk-
|
|
27
|
+
//# sourceMappingURL=chunk-DDOTCGGA.js.map
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Portal
|
|
3
|
-
} from "./chunk-IQJDVFPP.js";
|
|
4
1
|
import {
|
|
5
2
|
Modal
|
|
6
3
|
} from "./chunk-BE4EOU2P.js";
|
|
@@ -13,6 +10,9 @@ import {
|
|
|
13
10
|
import {
|
|
14
11
|
ModalHeading
|
|
15
12
|
} from "./chunk-2UXE5PDG.js";
|
|
13
|
+
import {
|
|
14
|
+
Portal
|
|
15
|
+
} from "./chunk-IQJDVFPP.js";
|
|
16
16
|
import {
|
|
17
17
|
Button
|
|
18
18
|
} from "./chunk-EXGKZGML.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-KGQG5JGW.js";
|
|
22
22
|
import {
|
|
23
23
|
Avatar
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-BU5JK37R.js";
|
|
25
25
|
import {
|
|
26
26
|
Show
|
|
27
27
|
} from "./chunk-BUVVRQLZ.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "./chunk-JIZQFTW6.js";
|
|
31
31
|
import {
|
|
32
32
|
$cerberusIcons
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-DDOTCGGA.js";
|
|
34
34
|
|
|
35
35
|
// src/context/confirm-modal.tsx
|
|
36
36
|
import {
|
|
@@ -170,4 +170,4 @@ export {
|
|
|
170
170
|
ConfirmModal,
|
|
171
171
|
useConfirmModal
|
|
172
172
|
};
|
|
173
|
-
//# sourceMappingURL=chunk-
|
|
173
|
+
//# sourceMappingURL=chunk-ECKJGCNH.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-BUVVRQLZ.js";
|
|
4
4
|
import {
|
|
5
5
|
$cerberusIcons
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DDOTCGGA.js";
|
|
7
7
|
|
|
8
8
|
// src/components/Tag.tsx
|
|
9
9
|
import { css, cx } from "@cerberus/styled-system/css";
|
|
@@ -61,4 +61,4 @@ var closableCss = css({
|
|
|
61
61
|
export {
|
|
62
62
|
Tag
|
|
63
63
|
};
|
|
64
|
-
//# sourceMappingURL=chunk-
|
|
64
|
+
//# sourceMappingURL=chunk-F4LTOZAN.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-BUVVRQLZ.js";
|
|
7
7
|
import {
|
|
8
8
|
$cerberusIcons
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DDOTCGGA.js";
|
|
10
10
|
|
|
11
11
|
// src/components/Input.tsx
|
|
12
12
|
import { input } from "@cerberus/styled-system/recipes";
|
|
@@ -39,4 +39,4 @@ function Input(props) {
|
|
|
39
39
|
export {
|
|
40
40
|
Input
|
|
41
41
|
};
|
|
42
|
-
//# sourceMappingURL=chunk-
|
|
42
|
+
//# sourceMappingURL=chunk-F7EWTOML.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
AccordionItemContent,
|
|
4
4
|
AccordionItemIndicator,
|
|
5
5
|
AccordionItemTrigger
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-34E3UFFB.js";
|
|
7
7
|
import {
|
|
8
8
|
Show
|
|
9
9
|
} from "./chunk-BUVVRQLZ.js";
|
|
@@ -36,4 +36,4 @@ function AccordionItemGroup(props) {
|
|
|
36
36
|
export {
|
|
37
37
|
AccordionItemGroup
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-F7XWOSN3.js.map
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Portal
|
|
3
|
-
} from "./chunk-IQJDVFPP.js";
|
|
4
1
|
import {
|
|
5
2
|
Modal
|
|
6
3
|
} from "./chunk-BE4EOU2P.js";
|
|
@@ -13,6 +10,9 @@ import {
|
|
|
13
10
|
import {
|
|
14
11
|
ModalHeading
|
|
15
12
|
} from "./chunk-2UXE5PDG.js";
|
|
13
|
+
import {
|
|
14
|
+
Portal
|
|
15
|
+
} from "./chunk-IQJDVFPP.js";
|
|
16
16
|
import {
|
|
17
17
|
IconButton
|
|
18
18
|
} from "./chunk-APD6IX5R.js";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./chunk-KGQG5JGW.js";
|
|
25
25
|
import {
|
|
26
26
|
Avatar
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-BU5JK37R.js";
|
|
28
28
|
import {
|
|
29
29
|
Show
|
|
30
30
|
} from "./chunk-BUVVRQLZ.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
} from "./chunk-JIZQFTW6.js";
|
|
34
34
|
import {
|
|
35
35
|
$cerberusIcons
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-DDOTCGGA.js";
|
|
37
37
|
|
|
38
38
|
// src/context/cta-modal.tsx
|
|
39
39
|
import {
|
|
@@ -151,4 +151,4 @@ export {
|
|
|
151
151
|
CTAModal,
|
|
152
152
|
useCTAModal
|
|
153
153
|
};
|
|
154
|
-
//# sourceMappingURL=chunk-
|
|
154
|
+
//# sourceMappingURL=chunk-FRWNAVDM.js.map
|