@pushwoosh/dumb-components 2.12.2 → 3.0.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/Alert/styles.d.ts +6 -14
- package/Banner/maps.d.ts +2 -6
- package/Banner/styles.d.ts +2 -6
- package/Button/maps.d.ts +12 -36
- package/Button/styles.d.ts +12 -36
- package/Calendar/CalendarMonth/styles.d.ts +2 -6
- package/Calendar/CalendarMonthSlider/styles.d.ts +5 -9
- package/CodeEditor/styles.d.ts +3 -7
- package/Drawer/components/Drawer/styles.d.ts +2 -2
- package/Drawer/components/DrawerDocs/styles.d.ts +1 -3
- package/DropdownMenu/components/DropdownMenuSection/styles.d.ts +3 -7
- package/DropdownMenu/shared/styles.d.ts +3 -7
- package/EmailTemplatePreview/components/NoEmailTemplatePreview/styles.d.ts +6 -14
- package/EnhancedInput/styles.d.ts +2 -6
- package/ExportResult/styles.d.ts +9 -21
- package/FieldBox/styles.d.ts +7 -15
- package/FrequencyCapping/styles.d.ts +6 -14
- package/GetStartedPage/styles.d.ts +1 -3
- package/InboxPreview/components/InboxCellCarousel/styles.d.ts +9 -21
- package/InboxPreview/styles.d.ts +7 -17
- package/InputFile/styles.d.ts +1 -3
- package/Modal/components/Modal/styles.d.ts +2 -2
- package/Modal/components/ModalContent/styles.d.ts +9 -21
- package/Modal/components/ModalTitle/styles.d.ts +3 -7
- package/NativeRichMediaPreview/components/NativeRichMediaRewardPanel/styles.d.ts +3 -7
- package/NativeRichMediaPreview/components/NativeRichMediaThemeChip/styles.d.ts +1 -3
- package/NativeRichMediaPreview/components/NativeRichMediaTitle/styles.d.ts +3 -7
- package/NativeRichMediaPreview/views/NativeRichMediaModalView/styles.d.ts +2 -6
- package/NativeRichMediaPreview/views/NativeRichMediaScratchcardView/styles.d.ts +2 -6
- package/NativeRichMediaPreview/views/NativeRichMediaSpinwheelView/styles.d.ts +2 -6
- package/NotificationInbox/styles.d.ts +21 -51
- package/Pagination/styles.d.ts +2 -6
- package/ProgressBar/styles.d.ts +1 -3
- package/PushPreview/styles.d.ts +7 -15
- package/Radio/styles.d.ts +3 -7
- package/RadioCard/styles.d.ts +7 -15
- package/RichMessageEditor/slate/styles.d.ts +2 -4
- package/RichMessageEditor/styles.d.ts +7 -15
- package/RichmediaPreview/styles.d.ts +3 -7
- package/SendRate/styles.d.ts +6 -14
- package/Switch/styles.d.ts +2 -2
- package/Tabs/components/TabBarScrollableFrame/styles.d.ts +1 -3
- package/Tooltip/styles.d.ts +3 -7
- package/Tooltip/useTooltipPosition.d.ts +1 -1
- package/WhatsAppPreview/components/WhatsAppAttachment/styles.d.ts +46 -102
- package/WhatsAppPreview/components/WhatsAppMessageContent/styles.d.ts +3 -7
- package/WhatsAppPreview/styles.d.ts +40 -92
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/package.json +6 -6
- package/shared/dropdownField/styles.d.ts +2 -2
- package/DateTimePicker/components/AutosizeInput/AutosizeInput.d.ts +0 -3
- package/DateTimePicker/components/AutosizeInput/AutosizeInput.js +0 -39
- package/DateTimePicker/components/AutosizeInput/index.d.ts +0 -1
- package/DateTimePicker/components/AutosizeInput/index.js +0 -1
- package/DateTimePicker/components/AutosizeInput/styles.d.ts +0 -3
- package/DateTimePicker/components/AutosizeInput/styles.js +0 -5
- package/DateTimePicker/components/AutosizeInput/types.d.ts +0 -10
- package/DateTimePicker/components/AutosizeInput/types.js +0 -1
- package/DateTimePicker/components/DatePicker/DatePicker.d.ts +0 -8
- package/DateTimePicker/components/DatePicker/DatePicker.js +0 -65
- package/DateTimePicker/components/DatePicker/index.d.ts +0 -1
- package/DateTimePicker/components/DatePicker/index.js +0 -1
- package/DateTimePicker/components/DatePicker/types.d.ts +0 -20
- package/DateTimePicker/components/DatePicker/types.js +0 -1
- package/DateTimePicker/components/DatePickerField/DatePickerField.d.ts +0 -8
- package/DateTimePicker/components/DatePickerField/DatePickerField.js +0 -86
- package/DateTimePicker/components/DatePickerField/index.d.ts +0 -1
- package/DateTimePicker/components/DatePickerField/index.js +0 -1
- package/DateTimePicker/components/DatePickerField/types.d.ts +0 -20
- package/DateTimePicker/components/DatePickerField/types.js +0 -1
- package/DateTimePicker/components/DateTimePicker/DateTimePicker.d.ts +0 -8
- package/DateTimePicker/components/DateTimePicker/DateTimePicker.js +0 -64
- package/DateTimePicker/components/DateTimePicker/index.d.ts +0 -1
- package/DateTimePicker/components/DateTimePicker/index.js +0 -1
- package/DateTimePicker/components/DateTimePicker/types.d.ts +0 -13
- package/DateTimePicker/components/DateTimePicker/types.js +0 -1
- package/DateTimePicker/components/DateTimePickerField/DateTimePickerField.d.ts +0 -8
- package/DateTimePicker/components/DateTimePickerField/DateTimePickerField.js +0 -91
- package/DateTimePicker/components/DateTimePickerField/helpers.d.ts +0 -8
- package/DateTimePicker/components/DateTimePickerField/helpers.js +0 -13
- package/DateTimePicker/components/DateTimePickerField/index.d.ts +0 -1
- package/DateTimePicker/components/DateTimePickerField/index.js +0 -1
- package/DateTimePicker/components/DateTimePickerField/types.d.ts +0 -20
- package/DateTimePicker/components/DateTimePickerField/types.js +0 -1
- package/DateTimePicker/components/DecadeView/DecadeView.d.ts +0 -3
- package/DateTimePicker/components/DecadeView/DecadeView.js +0 -35
- package/DateTimePicker/components/DecadeView/index.d.ts +0 -1
- package/DateTimePicker/components/DecadeView/index.js +0 -1
- package/DateTimePicker/components/DecadeView/types.d.ts +0 -6
- package/DateTimePicker/components/DecadeView/types.js +0 -1
- package/DateTimePicker/components/Input/Input.d.ts +0 -3
- package/DateTimePicker/components/Input/Input.js +0 -17
- package/DateTimePicker/components/Input/index.d.ts +0 -1
- package/DateTimePicker/components/Input/index.js +0 -1
- package/DateTimePicker/components/Input/styles.d.ts +0 -3
- package/DateTimePicker/components/Input/styles.js +0 -6
- package/DateTimePicker/components/Input/types.d.ts +0 -11
- package/DateTimePicker/components/Input/types.js +0 -1
- package/DateTimePicker/components/Month/Month.d.ts +0 -3
- package/DateTimePicker/components/Month/Month.js +0 -78
- package/DateTimePicker/components/Month/index.d.ts +0 -1
- package/DateTimePicker/components/Month/index.js +0 -1
- package/DateTimePicker/components/Month/types.d.ts +0 -8
- package/DateTimePicker/components/Month/types.js +0 -1
- package/DateTimePicker/components/MonthView/MonthView.d.ts +0 -3
- package/DateTimePicker/components/MonthView/MonthView.js +0 -41
- package/DateTimePicker/components/MonthView/index.d.ts +0 -1
- package/DateTimePicker/components/MonthView/index.js +0 -1
- package/DateTimePicker/components/MonthView/types.d.ts +0 -11
- package/DateTimePicker/components/MonthView/types.js +0 -1
- package/DateTimePicker/components/NumberPicker/NumberPicker.d.ts +0 -3
- package/DateTimePicker/components/NumberPicker/NumberPicker.js +0 -133
- package/DateTimePicker/components/NumberPicker/helpers.d.ts +0 -2
- package/DateTimePicker/components/NumberPicker/helpers.js +0 -5
- package/DateTimePicker/components/NumberPicker/index.d.ts +0 -1
- package/DateTimePicker/components/NumberPicker/index.js +0 -1
- package/DateTimePicker/components/NumberPicker/styles.d.ts +0 -3
- package/DateTimePicker/components/NumberPicker/styles.js +0 -6
- package/DateTimePicker/components/NumberPicker/types.d.ts +0 -13
- package/DateTimePicker/components/NumberPicker/types.js +0 -1
- package/DateTimePicker/components/PickerPlate/PickerPlate.d.ts +0 -3
- package/DateTimePicker/components/PickerPlate/PickerPlate.js +0 -27
- package/DateTimePicker/components/PickerPlate/index.d.ts +0 -1
- package/DateTimePicker/components/PickerPlate/index.js +0 -1
- package/DateTimePicker/components/PickerPlate/styles.d.ts +0 -17
- package/DateTimePicker/components/PickerPlate/styles.js +0 -9
- package/DateTimePicker/components/PickerPlate/types.d.ts +0 -7
- package/DateTimePicker/components/PickerPlate/types.js +0 -1
- package/DateTimePicker/components/YearView/YearView.d.ts +0 -3
- package/DateTimePicker/components/YearView/YearView.js +0 -36
- package/DateTimePicker/components/YearView/index.d.ts +0 -1
- package/DateTimePicker/components/YearView/index.js +0 -1
- package/DateTimePicker/components/YearView/types.d.ts +0 -6
- package/DateTimePicker/components/YearView/types.js +0 -1
- package/DateTimePicker/constants.d.ts +0 -5
- package/DateTimePicker/constants.js +0 -9
- package/DateTimePicker/helpers.d.ts +0 -13
- package/DateTimePicker/helpers.js +0 -81
- package/DateTimePicker/index.d.ts +0 -8
- package/DateTimePicker/index.js +0 -8
- package/DateTimePicker/polyglot/index.d.ts +0 -2
- package/DateTimePicker/polyglot/index.js +0 -33
- package/DateTimePicker/polyglot/messages_ar.d.ts +0 -3
- package/DateTimePicker/polyglot/messages_ar.js +0 -11
- package/DateTimePicker/polyglot/messages_bn.d.ts +0 -3
- package/DateTimePicker/polyglot/messages_bn.js +0 -11
- package/DateTimePicker/polyglot/messages_de.d.ts +0 -3
- package/DateTimePicker/polyglot/messages_de.js +0 -11
- package/DateTimePicker/polyglot/messages_en.d.ts +0 -3
- package/DateTimePicker/polyglot/messages_en.js +0 -11
- package/DateTimePicker/polyglot/messages_es.d.ts +0 -3
- package/DateTimePicker/polyglot/messages_es.js +0 -11
- package/DateTimePicker/polyglot/messages_fr.d.ts +0 -3
- package/DateTimePicker/polyglot/messages_fr.js +0 -11
- package/DateTimePicker/polyglot/messages_he.d.ts +0 -3
- package/DateTimePicker/polyglot/messages_he.js +0 -11
- package/DateTimePicker/polyglot/messages_hi.d.ts +0 -3
- package/DateTimePicker/polyglot/messages_hi.js +0 -11
- package/DateTimePicker/polyglot/messages_ja.d.ts +0 -3
- package/DateTimePicker/polyglot/messages_ja.js +0 -11
- package/DateTimePicker/polyglot/messages_ko.d.ts +0 -3
- package/DateTimePicker/polyglot/messages_ko.js +0 -11
- package/DateTimePicker/polyglot/messages_pt.d.ts +0 -3
- package/DateTimePicker/polyglot/messages_pt.js +0 -11
- package/DateTimePicker/polyglot/messages_ru.d.ts +0 -3
- package/DateTimePicker/polyglot/messages_ru.js +0 -11
- package/DateTimePicker/polyglot/messages_th.d.ts +0 -3
- package/DateTimePicker/polyglot/messages_th.js +0 -11
- package/DateTimePicker/polyglot/messages_zh.d.ts +0 -3
- package/DateTimePicker/polyglot/messages_zh.js +0 -11
- package/DateTimePicker/polyglot/types.d.ts +0 -12
- package/DateTimePicker/polyglot/types.js +0 -1
- package/DateTimePicker/styles.d.ts +0 -371
- package/DateTimePicker/styles.js +0 -66
- package/DateTimePicker/types.d.ts +0 -11
- package/DateTimePicker/types.js +0 -1
package/index.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export { CrashScreen } from './CrashScreen';
|
|
|
8
8
|
export { Divider } from './Divider';
|
|
9
9
|
export { Drawer, DrawerHeader, DrawerTitle, DrawerBody, DrawerDocs, useDocs, } from './Drawer';
|
|
10
10
|
export { CalendarSuperForm, CalendarDropdown, addPeriod, compareStructs, dateToStruct, dateToStructTz, getTimezoneOffset, getPeriodEnd, getPeriodStart, structToDate, structToDateTz, stringifyValue, pickDateStruct, type CalendarDropdownProps, type CalendarDropdownRangeDateProps, type CalendarSuperFormProps, type DateStruct, type RangeValue, } from './Calendar';
|
|
11
|
-
export { DatePicker, DatePickerField, DateTimePicker, DateTimePickerField, } from './DateTimePicker';
|
|
12
11
|
export { DropdownMenu, DropdownMenuButton, DropdownMenuSection, DropdownMenuItem, DropdownMenuSubmenu, } from './DropdownMenu';
|
|
13
12
|
export { GetStartedPage } from './GetStartedPage';
|
|
14
13
|
export { EditableField } from './EditableField';
|
package/index.js
CHANGED
|
@@ -8,7 +8,6 @@ export { CrashScreen } from './CrashScreen';
|
|
|
8
8
|
export { Divider } from './Divider';
|
|
9
9
|
export { Drawer, DrawerHeader, DrawerTitle, DrawerBody, DrawerDocs, useDocs } from './Drawer';
|
|
10
10
|
export { CalendarSuperForm, CalendarDropdown, addPeriod, compareStructs, dateToStruct, dateToStructTz, getTimezoneOffset, getPeriodEnd, getPeriodStart, structToDate, structToDateTz, stringifyValue, pickDateStruct } from './Calendar';
|
|
11
|
-
export { DatePicker, DatePickerField, DateTimePicker, DateTimePickerField } from './DateTimePicker';
|
|
12
11
|
export { DropdownMenu, DropdownMenuButton, DropdownMenuSection, DropdownMenuItem, DropdownMenuSubmenu } from './DropdownMenu';
|
|
13
12
|
export { GetStartedPage } from './GetStartedPage';
|
|
14
13
|
export { EditableField } from './EditableField';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pushwoosh/dumb-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "React components to build Pushwoosh products",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"@testing-library/dom": "^10.4.2",
|
|
19
19
|
"@testing-library/jest-dom": "^6.9.1",
|
|
20
20
|
"@testing-library/react": "^16.3.0",
|
|
21
|
-
"@types/react": "^
|
|
22
|
-
"@types/react-dom": "^
|
|
21
|
+
"@types/react": "^19.3.0",
|
|
22
|
+
"@types/react-dom": "^19.3.0",
|
|
23
23
|
"@types/react-transition-group": "^4.4.12",
|
|
24
24
|
"glob": "^11.0.3",
|
|
25
25
|
"jsdom": "^26.1.0",
|
|
26
|
-
"react": "^
|
|
27
|
-
"react-dom": "^
|
|
26
|
+
"react": "^19.3.0",
|
|
27
|
+
"react-dom": "^19.3.0",
|
|
28
28
|
"styled-components": "^6.5.3",
|
|
29
29
|
"vitest": "^4.1.10"
|
|
30
30
|
},
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@floating-ui/react-dom": "^2.1.2",
|
|
38
38
|
"@lezer/highlight": "^1.2.1",
|
|
39
39
|
"@pushwoosh/kit-constants": "^2.1.1",
|
|
40
|
-
"@pushwoosh/kit-helpers": "^4.15.
|
|
40
|
+
"@pushwoosh/kit-helpers": "^4.15.2",
|
|
41
41
|
"@pushwoosh/kit-icons": "^2.3.10",
|
|
42
42
|
"@pushwoosh/kit-typography": "^1.12.1",
|
|
43
43
|
"@tippyjs/react": "^4.2.6",
|
|
@@ -24,9 +24,9 @@ export declare const Indicators: import("styled-components/dist/types").IStyledC
|
|
|
24
24
|
}> & string;
|
|
25
25
|
export declare const IndicatorButton: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
|
|
26
26
|
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
27
|
-
}, "value" | "name" | "children" | "key" | "form" | "slot" | "style" | "title" | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "disabled" | "type" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & Partial<Pick<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
|
|
27
|
+
}, "value" | "name" | "children" | "key" | "form" | "slot" | "style" | "title" | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "disabled" | "type" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & Partial<Pick<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
|
|
28
28
|
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
29
|
-
}, "value" | "name" | "children" | "key" | "form" | "slot" | "style" | "title" | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "disabled" | "type" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget">>> & string;
|
|
29
|
+
}, "value" | "name" | "children" | "key" | "form" | "slot" | "style" | "title" | "ref" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "disabled" | "type" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget">>> & string;
|
|
30
30
|
export declare const Dropdown: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
31
31
|
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
32
32
|
}> & string;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useRef, useState, useEffect } from 'react';
|
|
3
|
-
import { Input } from '../Input';
|
|
4
|
-
import { Hidden } from './styles';
|
|
5
|
-
export function AutosizeInput(props) {
|
|
6
|
-
const {
|
|
7
|
-
value,
|
|
8
|
-
placeholder,
|
|
9
|
-
isDisabled,
|
|
10
|
-
onChange,
|
|
11
|
-
onKeyUp,
|
|
12
|
-
onKeyDown,
|
|
13
|
-
onBlur
|
|
14
|
-
} = props;
|
|
15
|
-
const ref = useRef(null);
|
|
16
|
-
const [width, setWidth] = useState(12);
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
const {
|
|
19
|
-
offsetWidth
|
|
20
|
-
} = ref.current;
|
|
21
|
-
const addWidth = offsetWidth ? 12 : 16;
|
|
22
|
-
setWidth(offsetWidth + addWidth);
|
|
23
|
-
}, [value]);
|
|
24
|
-
return _jsxs(_Fragment, {
|
|
25
|
-
children: [_jsx(Input, {
|
|
26
|
-
value: value,
|
|
27
|
-
placeholder: placeholder,
|
|
28
|
-
width: width,
|
|
29
|
-
isDisabled: isDisabled,
|
|
30
|
-
onChange: onChange,
|
|
31
|
-
onKeyUp: onKeyUp,
|
|
32
|
-
onKeyDown: onKeyDown,
|
|
33
|
-
onBlur: onBlur
|
|
34
|
-
}), _jsx(Hidden, {
|
|
35
|
-
ref: ref,
|
|
36
|
-
children: value || placeholder
|
|
37
|
-
})]
|
|
38
|
-
});
|
|
39
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './AutosizeInput';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './AutosizeInput';
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const Hidden: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
2
|
-
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
3
|
-
}> & string;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ChangeEvent, KeyboardEvent, FocusEvent } from 'react';
|
|
2
|
-
export interface AutosizeInputProps {
|
|
3
|
-
value: string;
|
|
4
|
-
placeholder?: string;
|
|
5
|
-
isDisabled?: boolean;
|
|
6
|
-
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
-
onKeyUp: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
8
|
-
onKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
9
|
-
onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type ReactElement } from 'react';
|
|
2
|
-
import type { DatePickerProps } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Inline calendar with month/year/decade views for picking a date.
|
|
5
|
-
*
|
|
6
|
-
* @deprecated Use `CalendarDropdown` or `CalendarSuperForm` from Calendar instead.
|
|
7
|
-
*/
|
|
8
|
-
export declare function DatePicker(props: DatePickerProps): ReactElement;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useEffect } from 'react';
|
|
3
|
-
import { Vertical } from '@pushwoosh/kit-helpers';
|
|
4
|
-
import { format } from '../../helpers';
|
|
5
|
-
import { CalendarBox } from '../../styles';
|
|
6
|
-
import { DecadeView } from '../DecadeView';
|
|
7
|
-
import { MonthView } from '../MonthView';
|
|
8
|
-
import { YearView } from '../YearView';
|
|
9
|
-
/**
|
|
10
|
-
* Inline calendar with month/year/decade views for picking a date.
|
|
11
|
-
*
|
|
12
|
-
* @deprecated Use `CalendarDropdown` or `CalendarSuperForm` from Calendar instead.
|
|
13
|
-
*/
|
|
14
|
-
export function DatePicker(props) {
|
|
15
|
-
const {
|
|
16
|
-
value,
|
|
17
|
-
userInputDay,
|
|
18
|
-
minDate,
|
|
19
|
-
maxDate,
|
|
20
|
-
isDisabled,
|
|
21
|
-
slotAfterMonth,
|
|
22
|
-
onChange
|
|
23
|
-
} = props;
|
|
24
|
-
const [view, setView] = useState('month');
|
|
25
|
-
const [month, setMonth] = useState(() => format(userInputDay || value || new Date(), 'year-month'));
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
if (userInputDay) {
|
|
28
|
-
setMonth(format(userInputDay, 'year-month'));
|
|
29
|
-
setView('month');
|
|
30
|
-
}
|
|
31
|
-
}, [userInputDay]);
|
|
32
|
-
return _jsxs(CalendarBox, {
|
|
33
|
-
"$disabled": isDisabled,
|
|
34
|
-
children: [view === 'month' && _jsxs(Vertical, {
|
|
35
|
-
"$gap": 16,
|
|
36
|
-
children: [_jsx(MonthView, {
|
|
37
|
-
month: month,
|
|
38
|
-
activeDay: value ? format(value, 'year-month-day') : undefined,
|
|
39
|
-
userInputDay: userInputDay,
|
|
40
|
-
minDate: minDate,
|
|
41
|
-
maxDate: maxDate,
|
|
42
|
-
onChange: setMonth,
|
|
43
|
-
onDaySelect: onChange,
|
|
44
|
-
onShowYear: () => setView('year'),
|
|
45
|
-
onShowDecade: () => setView('decade')
|
|
46
|
-
}), slotAfterMonth && slotAfterMonth()]
|
|
47
|
-
}), view === 'year' && _jsx(YearView, {
|
|
48
|
-
year: format(month, 'year'),
|
|
49
|
-
activeDay: value ? format(value, 'year-month-day') : undefined,
|
|
50
|
-
onChange: setMonth,
|
|
51
|
-
onSelect: newMon => {
|
|
52
|
-
setMonth(newMon);
|
|
53
|
-
setView('month');
|
|
54
|
-
}
|
|
55
|
-
}), view === 'decade' && _jsx(DecadeView, {
|
|
56
|
-
value: format(month, 'year'),
|
|
57
|
-
activeDay: value ? format(value, 'year-month-day') : undefined,
|
|
58
|
-
onChange: setMonth,
|
|
59
|
-
onSelect: newYear => {
|
|
60
|
-
setMonth(newYear);
|
|
61
|
-
setView('year');
|
|
62
|
-
}
|
|
63
|
-
})]
|
|
64
|
-
});
|
|
65
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DatePicker';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DatePicker';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
/** Props of {@link DatePicker}. */
|
|
3
|
-
export interface DatePickerProps {
|
|
4
|
-
/** Currently selected date string. */
|
|
5
|
-
value?: string;
|
|
6
|
-
/** Externally driven day that resets the visible month and view. */
|
|
7
|
-
userInputDay?: string;
|
|
8
|
-
/** Earliest selectable date. */
|
|
9
|
-
minDate?: Date | string;
|
|
10
|
-
/** Latest selectable date. */
|
|
11
|
-
maxDate?: Date | string;
|
|
12
|
-
/** Disable selection. */
|
|
13
|
-
isDisabled?: boolean;
|
|
14
|
-
/** Render extra content under the month grid (e.g. time inputs). */
|
|
15
|
-
slotAfterMonth?: () => ReactNode | null;
|
|
16
|
-
/** Fires with the picked day string. */
|
|
17
|
-
onChange: (day: string) => void;
|
|
18
|
-
}
|
|
19
|
-
/** Calendar view level: day grid, month grid or decade grid. */
|
|
20
|
-
export type ViewType = 'month' | 'year' | 'decade';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type ReactElement } from 'react';
|
|
2
|
-
import type { DatePickerFieldProps } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Read-only field showing the selected date that opens a {@link DatePicker} popover on click.
|
|
5
|
-
*
|
|
6
|
-
* @deprecated Use `CalendarDropdown` or `CalendarSuperForm` from Calendar instead.
|
|
7
|
-
*/
|
|
8
|
-
export declare function DatePickerField(props: DatePickerFieldProps): ReactElement;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useFloating, offset, autoPlacement } from '@floating-ui/react-dom';
|
|
3
|
-
import { useState, useEffect } from 'react';
|
|
4
|
-
import { CalendarIcon } from '@pushwoosh/kit-icons';
|
|
5
|
-
import { format, monthName, get } from '../../helpers';
|
|
6
|
-
import { Lang } from '../../polyglot';
|
|
7
|
-
import { InputFrame } from '../../styles';
|
|
8
|
-
import { DatePicker } from '../DatePicker';
|
|
9
|
-
/**
|
|
10
|
-
* Read-only field showing the selected date that opens a {@link DatePicker} popover on click.
|
|
11
|
-
*
|
|
12
|
-
* @deprecated Use `CalendarDropdown` or `CalendarSuperForm` from Calendar instead.
|
|
13
|
-
*/
|
|
14
|
-
export function DatePickerField(props) {
|
|
15
|
-
const {
|
|
16
|
-
value,
|
|
17
|
-
minDate,
|
|
18
|
-
maxDate,
|
|
19
|
-
error,
|
|
20
|
-
allowedPlacements = ['bottom-start', 'bottom-end', 'top-start', 'top-end'],
|
|
21
|
-
zIndex = 1000,
|
|
22
|
-
closeOnSelect = false,
|
|
23
|
-
onChange
|
|
24
|
-
} = props;
|
|
25
|
-
const [showPicker, setShowPicker] = useState(false);
|
|
26
|
-
const {
|
|
27
|
-
refs,
|
|
28
|
-
floatingStyles
|
|
29
|
-
} = useFloating({
|
|
30
|
-
middleware: [offset(4), autoPlacement({
|
|
31
|
-
allowedPlacements
|
|
32
|
-
})]
|
|
33
|
-
});
|
|
34
|
-
useEffect(() => {
|
|
35
|
-
if (!showPicker) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
const handleClickListener = event => {
|
|
39
|
-
const path = event.composedPath();
|
|
40
|
-
const isInsideFloating = refs.floating.current && path.includes(refs.floating.current);
|
|
41
|
-
const isInsideReference = refs.reference.current && path.includes(refs.reference.current);
|
|
42
|
-
if (!isInsideFloating && !isInsideReference) {
|
|
43
|
-
setShowPicker(false);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
document.addEventListener('click', handleClickListener);
|
|
47
|
-
return () => {
|
|
48
|
-
document.removeEventListener('click', handleClickListener);
|
|
49
|
-
};
|
|
50
|
-
}, [showPicker, refs]);
|
|
51
|
-
const onSelect = date => {
|
|
52
|
-
onChange(date);
|
|
53
|
-
if (closeOnSelect) {
|
|
54
|
-
setShowPicker(false);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
return _jsxs(_Fragment, {
|
|
58
|
-
children: [_jsxs(InputFrame, {
|
|
59
|
-
ref: refs.setReference,
|
|
60
|
-
"$gap": 8,
|
|
61
|
-
"$error": error,
|
|
62
|
-
"$empty": !value,
|
|
63
|
-
onClick: () => setShowPicker(!showPicker),
|
|
64
|
-
children: [_jsx(CalendarIcon, {
|
|
65
|
-
size: "medium",
|
|
66
|
-
view: "lined"
|
|
67
|
-
}), value ? _jsxs(_Fragment, {
|
|
68
|
-
children: [format(value, 'day '), monthName(get(value, 'month'), 'long'), format(value, ' year')]
|
|
69
|
-
}) : _jsx(Lang, {
|
|
70
|
-
message: "DUMB.DATE_TIME_PICKER.SELECT_DATE"
|
|
71
|
-
})]
|
|
72
|
-
}), showPicker && _jsx("div", {
|
|
73
|
-
ref: refs.setFloating,
|
|
74
|
-
style: {
|
|
75
|
-
...floatingStyles,
|
|
76
|
-
zIndex
|
|
77
|
-
},
|
|
78
|
-
children: _jsx(DatePicker, {
|
|
79
|
-
value: value,
|
|
80
|
-
minDate: minDate,
|
|
81
|
-
maxDate: maxDate,
|
|
82
|
-
onChange: onSelect
|
|
83
|
-
})
|
|
84
|
-
})]
|
|
85
|
-
});
|
|
86
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DatePickerField';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DatePickerField';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Placement } from '@floating-ui/react-dom';
|
|
2
|
-
/** Props of {@link DatePickerField}. */
|
|
3
|
-
export interface DatePickerFieldProps {
|
|
4
|
-
/** Currently selected date string. */
|
|
5
|
-
value: string;
|
|
6
|
-
/** Earliest selectable date. */
|
|
7
|
-
minDate?: Date | string;
|
|
8
|
-
/** Latest selectable date. */
|
|
9
|
-
maxDate?: Date | string;
|
|
10
|
-
/** Render the field in the error state. */
|
|
11
|
-
error?: boolean;
|
|
12
|
-
/** Allowed floating placements for the popover (default bottom/top start/end). */
|
|
13
|
-
allowedPlacements?: Placement[];
|
|
14
|
-
/** Popover z-index (default `1000`). */
|
|
15
|
-
zIndex?: number;
|
|
16
|
-
/** Close the popover when a date is picked (default `false`). */
|
|
17
|
-
closeOnSelect?: boolean;
|
|
18
|
-
/** Fires with the picked day string. */
|
|
19
|
-
onChange: (day: string) => void;
|
|
20
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type ReactElement } from 'react';
|
|
2
|
-
import type { DateTimePickerProps } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Inline {@link DatePicker} with hour/minute/second number inputs for picking a date and time (UTC).
|
|
5
|
-
*
|
|
6
|
-
* @deprecated Use `CalendarDropdown` or `CalendarSuperForm` from Calendar instead.
|
|
7
|
-
*/
|
|
8
|
-
export declare function DateTimePicker(props: DateTimePickerProps): ReactElement;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Collapse, Horizontal } from '@pushwoosh/kit-helpers';
|
|
3
|
-
import { format, createUTCDate } from '../../helpers';
|
|
4
|
-
import { DatePicker } from '../DatePicker';
|
|
5
|
-
import { NumberPicker } from '../NumberPicker';
|
|
6
|
-
/**
|
|
7
|
-
* Inline {@link DatePicker} with hour/minute/second number inputs for picking a date and time (UTC).
|
|
8
|
-
*
|
|
9
|
-
* @deprecated Use `CalendarDropdown` or `CalendarSuperForm` from Calendar instead.
|
|
10
|
-
*/
|
|
11
|
-
export function DateTimePicker(props) {
|
|
12
|
-
const {
|
|
13
|
-
value,
|
|
14
|
-
minDate,
|
|
15
|
-
maxDate,
|
|
16
|
-
userInputDay,
|
|
17
|
-
onChange
|
|
18
|
-
} = props;
|
|
19
|
-
const date = value ? new Date(value) : new Date();
|
|
20
|
-
const handleChange = formattedDate => {
|
|
21
|
-
const [year, month, day] = formattedDate.split('-').map(Number);
|
|
22
|
-
const utcDate = createUTCDate(year, month, day, date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());
|
|
23
|
-
onChange(utcDate.toUTCString());
|
|
24
|
-
};
|
|
25
|
-
const handleChangeHour = hours => {
|
|
26
|
-
date.setUTCHours(hours);
|
|
27
|
-
onChange(date.toUTCString());
|
|
28
|
-
};
|
|
29
|
-
const handleChangeMinutes = minutes => {
|
|
30
|
-
date.setUTCMinutes(minutes);
|
|
31
|
-
onChange(date.toUTCString());
|
|
32
|
-
};
|
|
33
|
-
const handleChangeSeconds = seconds => {
|
|
34
|
-
date.setUTCSeconds(seconds);
|
|
35
|
-
onChange(date.toUTCString());
|
|
36
|
-
};
|
|
37
|
-
return _jsx(DatePicker, {
|
|
38
|
-
value: format(date, 'year-month-dayThour:minute:second'),
|
|
39
|
-
userInputDay: userInputDay,
|
|
40
|
-
minDate: minDate,
|
|
41
|
-
maxDate: maxDate,
|
|
42
|
-
onChange: handleChange,
|
|
43
|
-
slotAfterMonth: () => _jsx(Collapse, {
|
|
44
|
-
expanded: !!value,
|
|
45
|
-
children: _jsxs(Horizontal, {
|
|
46
|
-
"$padding": "0 16px",
|
|
47
|
-
"$gap": 8,
|
|
48
|
-
children: [_jsx(NumberPicker, {
|
|
49
|
-
placeholder: "00",
|
|
50
|
-
value: date.getUTCHours(),
|
|
51
|
-
onChange: handleChangeHour
|
|
52
|
-
}), _jsx(NumberPicker, {
|
|
53
|
-
placeholder: "00",
|
|
54
|
-
value: date.getUTCMinutes(),
|
|
55
|
-
onChange: handleChangeMinutes
|
|
56
|
-
}), _jsx(NumberPicker, {
|
|
57
|
-
placeholder: "00",
|
|
58
|
-
value: date.getUTCSeconds(),
|
|
59
|
-
onChange: handleChangeSeconds
|
|
60
|
-
})]
|
|
61
|
-
})
|
|
62
|
-
})
|
|
63
|
-
});
|
|
64
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DateTimePicker';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DateTimePicker';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/** Props of {@link DateTimePicker}. */
|
|
2
|
-
export interface DateTimePickerProps {
|
|
3
|
-
/** Currently selected date-time string. */
|
|
4
|
-
value: string;
|
|
5
|
-
/** Earliest selectable date. */
|
|
6
|
-
minDate?: Date | string;
|
|
7
|
-
/** Latest selectable date. */
|
|
8
|
-
maxDate?: Date | string;
|
|
9
|
-
/** Externally driven day that resets the visible month and view. */
|
|
10
|
-
userInputDay?: string;
|
|
11
|
-
/** Fires with the picked date-time as a UTC string. */
|
|
12
|
-
onChange: (day: string) => void;
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type ReactElement } from 'react';
|
|
2
|
-
import type { DateTimePickerFieldProps } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Read-only field showing the selected date-time that opens a {@link DateTimePicker} popover on click.
|
|
5
|
-
*
|
|
6
|
-
* @deprecated Use `CalendarDropdown` or `CalendarSuperForm` from Calendar instead.
|
|
7
|
-
*/
|
|
8
|
-
export declare function DateTimePickerField(props: DateTimePickerFieldProps): ReactElement;
|