@moysklad/uikit 30.4.0 → 31.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -4
- package/dist/colorVariables.css +23 -1
- package/dist/components/AutoComplete/AutoComplete.js +2 -2
- package/dist/components/BentoBlock/BentoBlock.d.ts +15 -0
- package/dist/components/BentoBlock/BentoBlock.js +20 -0
- package/dist/components/BentoBlock/BentoBlock.module.js +9 -0
- package/dist/components/BentoBlock/BentoBlock_module.css +50 -0
- package/dist/components/BentoBlock/consts.d.ts +14 -0
- package/dist/components/BentoBlock/consts.js +15 -0
- package/dist/components/Button/Button.d.ts +5 -2
- package/dist/components/Button/Button.js +28 -19
- package/dist/components/Button/Button_module.css +16 -14
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/DateRange/ArrowButton/ArrowButton.module.js +6 -0
- package/dist/components/DateRange/ArrowButton/ArrowButton_module.css +26 -0
- package/dist/components/DateRange/ArrowButton/index.d.ts +8 -0
- package/dist/components/DateRange/ArrowButton/index.js +23 -0
- package/dist/components/DateRange/Calendar/index.d.ts +12 -0
- package/dist/components/DateRange/Calendar/index.js +22 -0
- package/dist/components/DateRange/DateRange.d.ts +6 -0
- package/dist/components/DateRange/DateRange.js +51 -0
- package/dist/components/DateRange/DateRangeDefaultTrigger/DateRangeDefaultTrigger.d.ts +44 -0
- package/dist/components/DateRange/DateRangeDefaultTrigger/DateRangeDefaultTrigger.js +128 -0
- package/dist/components/DateRange/DateRangeDefaultTrigger/DateRangeDefaultTrigger.module.js +19 -0
- package/dist/components/DateRange/DateRangeDefaultTrigger/DateRangeDefaultTrigger_module.css +170 -0
- package/dist/components/DateRange/DateRangeDefaultTrigger.module.js +12 -0
- package/dist/components/DateRange/DateRangeDefaultTrigger_module.css +43 -0
- package/dist/components/DateRange/DateRangeInput/DateRangeInput.d.ts +4 -0
- package/dist/components/DateRange/DateRangeInput/DateRangeInput.js +69 -0
- package/dist/components/DateRange/Day/Day.module.js +16 -0
- package/dist/components/DateRange/Day/Day_module.css +80 -0
- package/dist/components/DateRange/Day/index.d.ts +12 -0
- package/dist/components/DateRange/Day/index.js +39 -0
- package/dist/components/DateRange/DropdownContent/DropdownContent.module.js +10 -0
- package/dist/components/DateRange/DropdownContent/DropdownContent_module.css +34 -0
- package/dist/components/DateRange/DropdownContent/index.d.ts +24 -0
- package/dist/components/DateRange/DropdownContent/index.js +132 -0
- package/dist/components/DateRange/InputContent/InputContent.module.js +9 -0
- package/dist/components/DateRange/InputContent/InputContent_module.css +31 -0
- package/dist/components/DateRange/InputContent/index.d.ts +12 -0
- package/dist/components/DateRange/InputContent/index.js +59 -0
- package/dist/components/DateRange/Month/Month.module.js +7 -0
- package/dist/components/DateRange/Month/Month_module.css +17 -0
- package/dist/components/DateRange/Month/index.d.ts +15 -0
- package/dist/components/DateRange/Month/index.js +158 -0
- package/dist/components/DateRange/Month/utils.d.ts +2 -0
- package/dist/components/DateRange/Month/utils.js +8 -0
- package/dist/components/DateRange/MonthHeader/MonthHeader.module.js +5 -0
- package/dist/components/DateRange/MonthHeader/MonthHeader_module.css +10 -0
- package/dist/components/DateRange/MonthHeader/index.d.ts +5 -0
- package/dist/components/DateRange/MonthHeader/index.js +26 -0
- package/dist/components/DateRange/MonthList/MonthList.module.js +7 -0
- package/dist/components/DateRange/MonthList/MonthList_module.css +25 -0
- package/dist/components/DateRange/MonthList/index.d.ts +11 -0
- package/dist/components/DateRange/MonthList/index.js +91 -0
- package/dist/components/DateRange/PeriodVariantList/PeriodVariantList.module.js +9 -0
- package/dist/components/DateRange/PeriodVariantList/PeriodVariantList_module.css +18 -0
- package/dist/components/DateRange/PeriodVariantList/index.d.ts +18 -0
- package/dist/components/DateRange/PeriodVariantList/index.js +83 -0
- package/dist/components/DateRange/SideMenu/SideMenu.module.js +6 -0
- package/dist/components/DateRange/SideMenu/SideMenu_module.css +18 -0
- package/dist/components/DateRange/SideMenu/index.d.ts +13 -0
- package/dist/components/DateRange/SideMenu/index.js +73 -0
- package/dist/components/DateRange/TooltipedText/index.d.ts +8 -0
- package/dist/components/DateRange/TooltipedText/index.js +30 -0
- package/dist/components/DateRange/Year/Year.module.js +11 -0
- package/dist/components/DateRange/Year/Year_module.css +60 -0
- package/dist/components/DateRange/Year/index.d.ts +8 -0
- package/dist/components/DateRange/Year/index.js +47 -0
- package/dist/components/DateRange/YearsList/YearsList.module.js +5 -0
- package/dist/components/DateRange/YearsList/YearsList_module.css +15 -0
- package/dist/components/DateRange/YearsList/index.d.ts +12 -0
- package/dist/components/DateRange/YearsList/index.js +47 -0
- package/dist/components/DateRange/consts.d.ts +20 -0
- package/dist/components/DateRange/consts.js +81 -0
- package/dist/components/DateRange/formatDateRangeValue.d.ts +24 -0
- package/dist/components/DateRange/formatDateRangeValue.js +116 -0
- package/dist/components/DateRange/hooks/useCalendar.d.ts +13 -0
- package/dist/components/DateRange/hooks/useCalendar.js +88 -0
- package/dist/components/DateRange/hooks/useDateRange.d.ts +392 -0
- package/dist/components/DateRange/hooks/useDateRange.js +36 -0
- package/dist/components/DateRange/hooks/useDateRangeDropdown.d.ts +47 -0
- package/dist/components/DateRange/hooks/useDateRangeDropdown.js +117 -0
- package/dist/components/DateRange/hooks/useDateRangeValue.d.ts +56 -0
- package/dist/components/DateRange/hooks/useDateRangeValue.js +173 -0
- package/dist/components/DateRange/hooks/useMaskInput.d.ts +18 -0
- package/dist/components/DateRange/hooks/useMaskInput.js +169 -0
- package/dist/components/DateRange/hooks/useMonthList.d.ts +12 -0
- package/dist/components/DateRange/hooks/useMonthList.js +80 -0
- package/dist/components/DateRange/hooks/useSideMenu.d.ts +14 -0
- package/dist/components/DateRange/hooks/useSideMenu.js +113 -0
- package/dist/components/DateRange/index.d.ts +1 -0
- package/dist/components/DateRange/index.js +1 -0
- package/dist/components/DateRange/locale/en-US.d.ts +2 -0
- package/dist/components/DateRange/locale/en-US.js +82 -0
- package/dist/components/DateRange/locale/index.d.ts +4 -0
- package/dist/components/DateRange/locale/index.js +3 -0
- package/dist/components/DateRange/locale/ru-RU.d.ts +2 -0
- package/dist/components/DateRange/locale/ru-RU.js +82 -0
- package/dist/components/DateRange/locale/types.d.ts +9 -0
- package/dist/components/DateRange/locale/types.js +7 -0
- package/dist/components/DateRange/locale/useLocale.d.ts +8 -0
- package/dist/components/DateRange/locale/useLocale.js +31 -0
- package/dist/components/DateRange/props.d.ts +39 -0
- package/dist/components/DateRange/props.js +0 -0
- package/dist/components/DateRange/types.d.ts +126 -0
- package/dist/components/DateRange/types.js +13 -0
- package/dist/components/DateRange/utils.d.ts +33 -0
- package/dist/components/DateRange/utils.js +105 -0
- package/dist/components/Datepicker/Datepicker.d.ts +3 -1
- package/dist/components/Datepicker/Datepicker.js +4 -2
- package/dist/components/EditableDate/DropdownContent/DropdownContent.d.ts +9 -0
- package/dist/components/EditableDate/DropdownContent/DropdownContent.js +36 -0
- package/dist/components/EditableDate/EditableDate.d.ts +9 -0
- package/dist/components/EditableDate/EditableDate.js +142 -0
- package/dist/components/EditableDate/EditableDate.module.js +7 -0
- package/dist/components/EditableDate/EditableDate_module.css +32 -0
- package/dist/components/EditableTitle/EditableTitle.d.ts +7 -2
- package/dist/components/EditableTitle/EditableTitle.js +63 -31
- package/dist/components/EditableTitle/EditableTitle.module.js +1 -0
- package/dist/components/EditableTitle/EditableTitle_module.css +6 -0
- package/dist/components/EmptyState/EmptyState.d.ts +1 -1
- package/dist/components/EmptyStateLarge/EmptyStateLarge_module.css +2 -2
- package/dist/components/Help/Help_module.css +1 -1
- package/dist/components/Informer/Informer.d.ts +37 -0
- package/dist/components/Informer/Informer.js +36 -0
- package/dist/components/Informer/Informer.module.js +7 -0
- package/dist/components/Informer/Informer_module.css +24 -0
- package/dist/components/Input/Input.js +10 -5
- package/dist/components/Input/components/InfoBlock.d.ts +3 -1
- package/dist/components/Input/components/InfoBlock.js +7 -4
- package/dist/components/InputUnit/InputUnit.js +4 -4
- package/dist/components/LabelValue/LabelValue.d.ts +14 -10
- package/dist/components/LabelValue/LabelValue.js +46 -25
- package/dist/components/LabelValue/LabelValue.module.js +10 -4
- package/dist/components/LabelValue/LabelValue_module.css +53 -19
- package/dist/components/LabelValue/ValueBlock/ValueBlock.d.ts +2 -0
- package/dist/components/LabelValue/ValueBlock/ValueBlock.js +82 -0
- package/dist/components/LabelValue/ValueBlockWrapper.d.ts +5 -0
- package/dist/components/LabelValue/ValueBlockWrapper.js +13 -0
- package/dist/components/LabelValue/ValueIcon.d.ts +4 -0
- package/dist/components/LabelValue/ValueIcon.js +9 -0
- package/dist/components/LabelValue/ValueText.d.ts +10 -0
- package/dist/components/LabelValue/ValueText.js +24 -0
- package/dist/components/LabelValue/ValueTextWithHint.d.ts +12 -0
- package/dist/components/LabelValue/ValueTextWithHint.js +29 -0
- package/dist/components/LabelValue/hooks/useValueBlock.d.ts +29 -0
- package/dist/components/LabelValue/hooks/useValueBlock.js +72 -0
- package/dist/components/LabelValue/{ValueBlock/index.d.ts → types.d.ts} +8 -4
- package/dist/components/LabelValue/types.js +0 -0
- package/dist/components/LabelValueDate/LabelValueDate.js +2 -2
- package/dist/components/LabelValueFile/DeleteButton/DeleteButton.d.ts +9 -0
- package/dist/components/LabelValueFile/DeleteButton/DeleteButton.js +17 -0
- package/dist/components/LabelValueFile/FilePreviewIcon/FilePreviewIcon.d.ts +7 -0
- package/dist/components/LabelValueFile/FilePreviewIcon/FilePreviewIcon.js +15 -0
- package/dist/components/LabelValueFile/FilePreviewIcon/FilePreviewIcon.module.js +6 -0
- package/dist/components/LabelValueFile/FilePreviewIcon/FilePreviewIcon_module.css +10 -0
- package/dist/components/LabelValueFile/ImagePreview/ImagePreview.d.ts +8 -0
- package/dist/components/LabelValueFile/ImagePreview/ImagePreview.js +53 -0
- package/dist/components/LabelValueFile/ImagePreview/ImagePreview.module.js +6 -0
- package/dist/components/LabelValueFile/ImagePreview/ImagePreview_module.css +13 -0
- package/dist/components/LabelValueFile/LabelValueFile.d.ts +7 -0
- package/dist/components/LabelValueFile/LabelValueFile.js +42 -0
- package/dist/components/LabelValueFile/LabelValueFile.module.js +12 -0
- package/dist/components/LabelValueFile/LabelValueFile_module.css +57 -0
- package/dist/components/LabelValueFile/ValueBlock/ValueBlock.d.ts +15 -0
- package/dist/components/LabelValueFile/ValueBlock/ValueBlock.js +130 -0
- package/dist/components/LabelValueFile/ValueBlock/ValueBlock.module.js +7 -0
- package/dist/components/LabelValueFile/ValueBlock/ValueBlock_module.css +17 -0
- package/dist/components/LabelValueInput/DropdownConnent/DropdownContent.d.ts +2 -0
- package/dist/components/LabelValueInput/DropdownConnent/DropdownContent.js +2 -0
- package/dist/components/LabelValueLink/LabelValueLink.d.ts +2 -0
- package/dist/components/LabelValueLink/LabelValueLink.js +76 -0
- package/dist/components/LabelValueLink/LabelValueLink.module.js +6 -0
- package/dist/components/LabelValueLink/LabelValueLink_module.css +11 -0
- package/dist/components/LabelValueLink/ValueBlock/LabelValueLinkValueBlock.d.ts +2 -0
- package/dist/components/LabelValueLink/ValueBlock/LabelValueLinkValueBlock.js +117 -0
- package/dist/components/LabelValueLink/ValueBlock/LabelValueLinkValueBlock.module.js +6 -0
- package/dist/components/LabelValueLink/ValueBlock/LabelValueLinkValueBlock_module.css +8 -0
- package/dist/components/LabelValueLink/normalizeLinkValue.d.ts +1 -0
- package/dist/components/LabelValueLink/normalizeLinkValue.js +10 -0
- package/dist/components/LabelValueLink/useLinkDropdownValue.d.ts +15 -0
- package/dist/components/LabelValueLink/useLinkDropdownValue.js +26 -0
- package/dist/components/LabelValueSelect/Input/index.js +1 -1
- package/dist/components/LabelValueSelect/LabelValueSelect.d.ts +4 -2
- package/dist/components/Layout/Layout.d.ts +13 -0
- package/dist/components/Layout/Layout.js +41 -0
- package/dist/components/Layout/Layout.module.js +15 -0
- package/dist/components/Layout/Layout_module.css +77 -0
- package/dist/components/Link/Link.d.ts +5 -6
- package/dist/components/Link/Link.js +35 -9
- package/dist/components/Link/Link.module.js +1 -0
- package/dist/components/Link/Link_module.css +9 -0
- package/dist/components/MentionsTextfield/Mentions/style.css +2 -6
- package/dist/components/MentionsTextfield/MentionsTextfield.js +2 -1
- package/dist/components/Multiselect/AllSelectedChip/AllSelectedChip.d.ts +8 -0
- package/dist/components/Multiselect/AllSelectedChip/AllSelectedChip.js +13 -0
- package/dist/components/Multiselect/AllSelectedChip/AllSelectedChip.module.js +5 -0
- package/dist/components/Multiselect/AllSelectedChip/AllSelectedChip_module.css +9 -0
- package/dist/components/Multiselect/DropdownContent/MultiselectDropdownContent.d.ts +12 -1
- package/dist/components/Multiselect/DropdownContent/MultiselectDropdownContent.js +20 -15
- package/dist/components/Multiselect/Input/Input.d.ts +6 -2
- package/dist/components/Multiselect/Input/Input.js +18 -4
- package/dist/components/Multiselect/Multiselect.d.ts +4 -2
- package/dist/components/Multiselect/Multiselect.js +14 -2
- package/dist/components/Multiselect/ShortDropdownContent/ShortDropdownContent.js +2 -1
- package/dist/components/Multiselect/TextField/MultiselectTextField.d.ts +5 -1
- package/dist/components/Multiselect/TextField/MultiselectTextField.js +15 -2
- package/dist/components/Multiselect/lib/consts.d.ts +1 -1
- package/dist/components/Multiselect/lib/consts.js +1 -1
- package/dist/components/Multiselect/lib/helpers.d.ts +24 -0
- package/dist/components/Multiselect/lib/helpers.js +15 -0
- package/dist/components/Multiselect/types.d.ts +2 -0
- package/dist/components/Panel/Panel.d.ts +34 -0
- package/dist/components/Panel/Panel.js +39 -0
- package/dist/components/Panel/Panel.module.js +6 -0
- package/dist/components/Panel/Panel_module.css +17 -0
- package/dist/components/Radiobutton/Radiobutton.js +1 -1
- package/dist/components/Radiobutton/Radiobutton_module.css +5 -0
- package/dist/components/SearchInput/SearchInput_module.css +1 -1
- package/dist/components/Select/ArchivedInputValue/ArchivedInputValue.d.ts +3 -4
- package/dist/components/Select/ArchivedInputValue/ArchivedInputValue.js +19 -24
- package/dist/components/Select/ArchivedInputValue/ArchivedInputValue.module.js +1 -2
- package/dist/components/Select/ArchivedInputValue/ArchivedInputValue_module.css +5 -12
- package/dist/components/Select/Combobox/Combobox.d.ts +3 -1
- package/dist/components/Select/Combobox/Combobox.js +19 -8
- package/dist/components/Select/Combobox/Combobox.module.js +4 -3
- package/dist/components/Select/Combobox/Combobox_module.css +15 -9
- package/dist/components/Select/OptionsList/OptionsList.d.ts +3 -1
- package/dist/components/Select/OptionsList/OptionsList.js +37 -21
- package/dist/components/Select/OptionsList/OptionsList.module.js +2 -0
- package/dist/components/Select/OptionsList/OptionsList_module.css +15 -0
- package/dist/components/Select/Select.d.ts +2 -3
- package/dist/components/Select/Select.js +17 -7
- package/dist/components/Select/Select_module.css +5 -0
- package/dist/components/Select/ShortVariant/ShortVariant.js +1 -1
- package/dist/components/StatusBadge/StatusBadge.d.ts +28 -0
- package/dist/components/StatusBadge/StatusBadge.js +167 -0
- package/dist/components/StatusBadge/StatusBadge.module.js +37 -0
- package/dist/components/StatusBadge/StatusBadge_module.css +149 -0
- package/dist/components/StatusBadge/utils/StatusBadgeColor.d.ts +21 -0
- package/dist/components/StatusBadge/utils/StatusBadgeColor.js +20 -0
- package/dist/components/StatusBadge/utils/getStatusBadgeColor.d.ts +2 -0
- package/dist/components/StatusBadge/utils/getStatusBadgeColor.js +8 -0
- package/dist/components/Textfield/Textfield.d.ts +7 -2
- package/dist/components/Textfield/Textfield.js +2 -1
- package/dist/components/Textfield/components/Container/Container.d.ts +2 -0
- package/dist/components/Textfield/components/Container/Container.js +17 -6
- package/dist/components/Textfield/components/Container/Container.module.js +2 -1
- package/dist/components/Textfield/components/Container/Container_module.css +4 -0
- package/dist/components/Toggle/Toggle.js +1 -1
- package/dist/components/ViewersStack/ViewersStack.js +5 -3
- package/dist/components/_shared/CustomDatepickerDropdownContent/CustomDatepickerDropdownContent.d.ts +12 -0
- package/dist/components/{LabelValueDate/DropdownContent/index.js → _shared/CustomDatepickerDropdownContent/CustomDatepickerDropdownContent.js} +10 -10
- package/dist/components/_shared/CustomDatepickerDropdownContent/CustomDatepickerDropdownContent.module.js +9 -0
- package/dist/components/{LabelValueDate/DropdownContent/DropdownContent_module.css → _shared/CustomDatepickerDropdownContent/CustomDatepickerDropdownContent_module.css} +6 -6
- package/dist/components/_shared/FieldLabel/FieldLabel.d.ts +18 -0
- package/dist/components/{FieldLabel → _shared/FieldLabel}/FieldLabel.js +19 -12
- package/dist/components/_shared/FieldLabel/FieldLabel.module.js +11 -0
- package/dist/components/{FieldLabel → _shared/FieldLabel}/FieldLabel_module.css +8 -8
- package/dist/components/{FieldLabel → _shared/FieldLabel}/components/HelpButton.d.ts +1 -1
- package/dist/components/{FieldLabel → _shared/FieldLabel}/components/HelpButton.js +2 -2
- package/dist/components/{FieldLabel → _shared/FieldLabel}/components/HelpButton.module.js +1 -1
- package/dist/components/{FieldLabel → _shared/FieldLabel}/components/HelpButton_module.css +1 -1
- package/dist/components/{FieldRow → _shared/FieldRow}/FieldRow.d.ts +1 -1
- package/dist/components/{FieldRow → _shared/FieldRow}/FieldRow.js +1 -1
- package/dist/components/{FieldRow → _shared/FieldRow}/FieldRow.module.js +3 -3
- package/dist/components/{FieldRow → _shared/FieldRow}/FieldRow_module.css +3 -3
- package/dist/components/{Info → _shared/Info}/Info.d.ts +3 -1
- package/dist/components/{Info → _shared/Info}/Info.js +9 -6
- package/dist/components/_shared/Info/Info.module.js +9 -0
- package/dist/components/{Info → _shared/Info}/Info_module.css +6 -6
- package/dist/components/_shared/Info/types/index.d.ts +6 -0
- package/dist/components/_shared/Info/types/index.js +5 -0
- package/dist/components/{InputClear → _shared/InputClear}/InputClear.d.ts +1 -1
- package/dist/components/{InputClear → _shared/InputClear}/InputClear.js +2 -2
- package/dist/components/{InputClear → _shared/InputClear}/InputClear.module.js +3 -3
- package/dist/components/{InputClear → _shared/InputClear}/InputClear_module.css +5 -5
- package/dist/components/_shared/utils/polymorphicClickableTypes.d.ts +17 -0
- package/dist/components/_shared/utils/polymorphicClickableTypes.js +7 -0
- package/dist/data-grid/Filters/DateRangeFilter/DropdownContent/index.js +3 -3
- package/dist/data-grid/Filters/DateRangeFilter/InputContent/index.js +29 -26
- package/dist/data-grid/Filters/DateRangeFilter/PeriodVariantList/index.js +5 -3
- package/dist/data-grid/Filters/DateRangeFilter/Year/index.js +3 -3
- package/dist/data-grid/Filters/DateRangeFilter/consts.js +6 -6
- package/dist/data-grid/Filters/DateRangeFilter/hooks/useMaskInput.js +6 -6
- package/dist/data-grid/Filters/DateRangeFilter/hooks/useSideMenu.js +1 -4
- package/dist/data-grid/Filters/DateRangeFilter/types.d.ts +68 -56
- package/dist/data-grid/Filters/FiltersContainer/FiltersContainer.js +2 -1
- package/dist/data-grid/Filters/FiltersContainer/utils/useRenderParams.d.ts +1 -0
- package/dist/data-grid/Filters/FiltersContainer/utils/useRenderParams.js +14 -6
- package/dist/data-grid/Filters/MultiselectFilter/MultiselectFilter.js +2 -2
- package/dist/data-grid/Filters/OutlineInput/OutlineInput.js +2 -2
- package/dist/data-grid/Filters/OutlineInput/OutlineInput_module.css +1 -1
- package/dist/data-grid/Table/Table_module.css +0 -1
- package/dist/data-grid/cells/ImageCell/ImageMiniature/ImageMiniature_module.css +1 -1
- package/dist/data-grid/cells/components/TableNumberInput/TableNumberInput.d.ts +1 -0
- package/dist/data-grid/cells/components/TableNumberInput/TableNumberInput.js +17 -5
- package/dist/data-grid/cells/components/TableSelect/TableSelect.js +3 -2
- package/dist/data-grid/headers/components/Dropdown/Dropdown.d.ts +3 -0
- package/dist/data-grid/headers/components/HeaderBuilder/HeaderBuilder.js +1 -0
- package/dist/data-grid/index.d.ts +0 -4
- package/dist/data-grid/locale/en-US.js +68 -56
- package/dist/data-grid/locale/ru-RU.js +68 -56
- package/dist/data-grid/locale/useLocale.d.ts +6 -1
- package/dist/data-grid/locale/useLocale.js +14 -5
- package/dist/hooks/useIsElementOverflowing/index.d.ts +1 -0
- package/dist/hooks/useIsElementOverflowing/index.js +8 -2
- package/dist/hooks/useOverflowHint/index.d.ts +7 -0
- package/dist/hooks/useOverflowHint/index.js +16 -0
- package/dist/hooks/useTextField/useTextField.d.ts +1 -1
- package/dist/icon/components/MsLogo12Icon.d.ts +8 -0
- package/dist/icon/components/MsLogo12Icon.js +28 -0
- package/dist/icon/components/MsLogo16Icon.d.ts +8 -0
- package/dist/icon/components/MsLogo16Icon.js +26 -0
- package/dist/icon/components/MsLogo20Icon.d.ts +8 -0
- package/dist/icon/components/MsLogo20Icon.js +28 -0
- package/dist/icon/components/Phone12Icon.d.ts +8 -0
- package/dist/icon/components/Phone12Icon.js +18 -0
- package/dist/icon/components/Phone16Icon.d.ts +8 -0
- package/dist/icon/components/Phone16Icon.js +17 -0
- package/dist/icon/components/Phone20Icon.d.ts +8 -0
- package/dist/icon/components/Phone20Icon.js +18 -0
- package/dist/icon/index.d.ts +6 -0
- package/dist/icon/index.js +6 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.js +8 -0
- package/dist/utils/checkIsArchivedValue.d.ts +2 -0
- package/dist/utils/checkIsArchivedValue.js +5 -0
- package/dist/utils/utils.d.ts +1 -0
- package/dist/utils/utils.js +1 -0
- package/package.json +70 -13
- package/dist/components/FieldLabel/FieldLabel.d.ts +0 -17
- package/dist/components/FieldLabel/FieldLabel.module.js +0 -11
- package/dist/components/Info/Info.module.js +0 -9
- package/dist/components/LabelValue/ValueBlock/index.js +0 -138
- package/dist/components/LabelValue/hooks/useTooltip.d.ts +0 -8
- package/dist/components/LabelValue/hooks/useTooltip.js +0 -16
- package/dist/components/LabelValueDate/DropdownContent/DropdownContent.module.js +0 -9
- package/dist/components/LabelValueDate/DropdownContent/index.d.ts +0 -12
- package/dist/components/MentionsTextfield/OptionForStory/OptionForStory.d.ts +0 -7
- package/dist/components/MentionsTextfield/OptionForStory/OptionForStory.js +0 -27
- package/dist/components/MentionsTextfield/OptionForStory/OptionForStory.module.js +0 -8
- package/dist/components/MentionsTextfield/OptionForStory/OptionForStory_module.css +0 -25
- package/dist/components/MentionsTextfield/OptionForStory/index.d.ts +0 -1
- package/dist/components/MentionsTextfield/OptionForStory/index.js +0 -1
- package/dist/components/Textfield/components/Label/Label.d.ts +0 -11
- package/dist/components/Textfield/components/Label/Label.js +0 -38
- package/dist/components/Textfield/components/Label/Label.module.js +0 -7
- package/dist/components/Textfield/components/Label/Label_module.css +0 -17
- package/dist/components/Textfield/components/Label/index.d.ts +0 -1
- package/dist/components/Textfield/components/Label/index.js +0 -1
- /package/dist/components/{FieldLabel → _shared/FieldLabel}/FieldLabel.constants.d.ts +0 -0
- /package/dist/components/{FieldLabel → _shared/FieldLabel}/FieldLabel.constants.js +0 -0
- /package/dist/components/{FieldLabel → _shared/FieldLabel}/components/index.d.ts +0 -0
- /package/dist/components/{FieldLabel → _shared/FieldLabel}/components/index.js +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type ChangeEventHandler, type FocusEvent, type HTMLAttributes, type InputHTMLAttributes, type JSX, type KeyboardEvent, type MutableRefObject, type ReactNode } from 'react';
|
|
2
|
+
import type { IHasTabIndex, IHasTestId } from '../../../common/types';
|
|
3
|
+
export declare const DEFAULT_FOCUSED_WIDTH = 256;
|
|
4
|
+
type RenderInputParams = {
|
|
5
|
+
inputId: string;
|
|
6
|
+
className: string;
|
|
7
|
+
value: DateRangeDefaultTriggerProps['value'];
|
|
8
|
+
onChange: DateRangeDefaultTriggerProps['onChange'];
|
|
9
|
+
onFocus?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
10
|
+
onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
11
|
+
onKeyUp?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
12
|
+
ref: (element: HTMLInputElement) => void;
|
|
13
|
+
};
|
|
14
|
+
export type DateRangeDefaultTriggerProps = Omit<InputHTMLAttributes<HTMLDivElement>, 'onClick' | 'placeholder' | 'onChange'> & Pick<HTMLAttributes<HTMLDivElement>, 'onClick'> & IHasTestId & IHasTabIndex & {
|
|
15
|
+
label: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
error?: boolean;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
focusedWidth?: number;
|
|
20
|
+
actions?: ReactNode;
|
|
21
|
+
inputRef?: MutableRefObject<HTMLInputElement | null> | ((element: HTMLInputElement) => void);
|
|
22
|
+
inputContent?: ReactNode;
|
|
23
|
+
focusedState?: boolean;
|
|
24
|
+
hintZIndex?: number;
|
|
25
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
26
|
+
renderCustomInput?: (params: RenderInputParams) => JSX.Element;
|
|
27
|
+
staticActions?: ReactNode;
|
|
28
|
+
};
|
|
29
|
+
export declare const DateRangeDefaultTrigger: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLDivElement>, "onChange" | "onClick" | "placeholder"> & Pick<HTMLAttributes<HTMLDivElement>, "onClick"> & IHasTestId & IHasTabIndex & {
|
|
30
|
+
label: string;
|
|
31
|
+
name?: string;
|
|
32
|
+
error?: boolean;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
focusedWidth?: number;
|
|
35
|
+
actions?: ReactNode;
|
|
36
|
+
inputRef?: MutableRefObject<HTMLInputElement | null> | ((element: HTMLInputElement) => void);
|
|
37
|
+
inputContent?: ReactNode;
|
|
38
|
+
focusedState?: boolean;
|
|
39
|
+
hintZIndex?: number;
|
|
40
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
41
|
+
renderCustomInput?: (params: RenderInputParams) => JSX.Element;
|
|
42
|
+
staticActions?: ReactNode;
|
|
43
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useRef } from "react";
|
|
3
|
+
import { cn } from "../../../common/css/cn.js";
|
|
4
|
+
import { Text, TextTag } from "../../Text/Text.js";
|
|
5
|
+
import { useId } from "../../../hooks/useId/index.js";
|
|
6
|
+
import DateRangeDefaultTrigger_module from "./DateRangeDefaultTrigger.module.js";
|
|
7
|
+
const DEFAULT_FOCUSED_WIDTH = 256;
|
|
8
|
+
const DateRangeDefaultTrigger = /*#__PURE__*/ forwardRef(({ id, className, value, label, name, testId, error, disabled, actions, focusedWidth, style, tabIndex, inputRef: inputRefProp, inputContent, focusedState, onClick, renderCustomInput, staticActions, ...props }, ref)=>{
|
|
9
|
+
const containerRef = useRef(null);
|
|
10
|
+
const inputRef = useRef(null);
|
|
11
|
+
const inputId = useId(id);
|
|
12
|
+
const isEmpty = !value;
|
|
13
|
+
const wrapperStyle = {
|
|
14
|
+
'--input-width': `${focusedWidth ?? DEFAULT_FOCUSED_WIDTH}px`,
|
|
15
|
+
...style ?? {}
|
|
16
|
+
};
|
|
17
|
+
const assignWrapperRef = (element)=>{
|
|
18
|
+
containerRef.current = element;
|
|
19
|
+
if (!ref) return;
|
|
20
|
+
if ('function' == typeof ref) return void ref(element);
|
|
21
|
+
ref.current = element;
|
|
22
|
+
};
|
|
23
|
+
const assignInputRef = (element)=>{
|
|
24
|
+
inputRef.current = element;
|
|
25
|
+
if (!inputRefProp) return;
|
|
26
|
+
if ('function' == typeof inputRefProp) return void inputRefProp(element);
|
|
27
|
+
inputRefProp.current = element;
|
|
28
|
+
};
|
|
29
|
+
const renderInput = (params)=>{
|
|
30
|
+
if (renderCustomInput) return renderCustomInput(params);
|
|
31
|
+
return /*#__PURE__*/ jsx("input", {
|
|
32
|
+
tabIndex: tabIndex,
|
|
33
|
+
id: params.inputId,
|
|
34
|
+
name: name,
|
|
35
|
+
ref: assignInputRef,
|
|
36
|
+
"data-test-id": testId ? `${testId}-input` : void 0,
|
|
37
|
+
type: "text",
|
|
38
|
+
value: value,
|
|
39
|
+
className: params.className,
|
|
40
|
+
disabled: disabled || !!inputContent,
|
|
41
|
+
onClick: (event)=>{
|
|
42
|
+
event.stopPropagation();
|
|
43
|
+
onClick?.(event);
|
|
44
|
+
},
|
|
45
|
+
onFocus: params.onFocus,
|
|
46
|
+
onBlur: params.onBlur,
|
|
47
|
+
onKeyUp: params.onKeyUp,
|
|
48
|
+
onChange: params.onChange
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
const handleWrapperClick = (event)=>{
|
|
52
|
+
if (disabled) return;
|
|
53
|
+
onClick?.(event);
|
|
54
|
+
inputRef.current?.focus();
|
|
55
|
+
};
|
|
56
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
57
|
+
...props,
|
|
58
|
+
tabIndex: inputContent && !disabled ? 0 : void 0,
|
|
59
|
+
"data-test-id": testId,
|
|
60
|
+
className: cn(DateRangeDefaultTrigger_module.wrapper, className, isEmpty && DateRangeDefaultTrigger_module.empty, error && DateRangeDefaultTrigger_module.error, disabled && DateRangeDefaultTrigger_module.disabled, actions && DateRangeDefaultTrigger_module.withActions, focusedState && DateRangeDefaultTrigger_module.focused),
|
|
61
|
+
onClick: handleWrapperClick,
|
|
62
|
+
style: wrapperStyle,
|
|
63
|
+
ref: assignWrapperRef,
|
|
64
|
+
"data-error": error,
|
|
65
|
+
"data-disabled": disabled,
|
|
66
|
+
children: [
|
|
67
|
+
/*#__PURE__*/ jsxs("div", {
|
|
68
|
+
className: DateRangeDefaultTrigger_module.sizerOuter,
|
|
69
|
+
children: [
|
|
70
|
+
/*#__PURE__*/ jsxs("div", {
|
|
71
|
+
className: DateRangeDefaultTrigger_module.sizerInner,
|
|
72
|
+
children: [
|
|
73
|
+
!!inputContent && /*#__PURE__*/ jsx("div", {
|
|
74
|
+
className: DateRangeDefaultTrigger_module.inputContentContainer,
|
|
75
|
+
children: inputContent
|
|
76
|
+
}),
|
|
77
|
+
renderInput({
|
|
78
|
+
className: cn(DateRangeDefaultTrigger_module.input, !!inputContent && DateRangeDefaultTrigger_module.noPointerEvents),
|
|
79
|
+
inputId,
|
|
80
|
+
onBlur: props.onBlur,
|
|
81
|
+
onFocus: props.onFocus,
|
|
82
|
+
onKeyUp: props.onKeyUp,
|
|
83
|
+
ref: assignInputRef,
|
|
84
|
+
value,
|
|
85
|
+
onChange: props.onChange
|
|
86
|
+
}),
|
|
87
|
+
actions && /*#__PURE__*/ jsx("div", {
|
|
88
|
+
className: DateRangeDefaultTrigger_module.actionsContainer,
|
|
89
|
+
children: actions
|
|
90
|
+
})
|
|
91
|
+
]
|
|
92
|
+
}),
|
|
93
|
+
/*#__PURE__*/ jsx(Text.Body, {
|
|
94
|
+
className: DateRangeDefaultTrigger_module.sizerText,
|
|
95
|
+
as: TextTag.span,
|
|
96
|
+
children: label
|
|
97
|
+
}),
|
|
98
|
+
/*#__PURE__*/ jsxs("div", {
|
|
99
|
+
className: DateRangeDefaultTrigger_module.sizerText,
|
|
100
|
+
children: [
|
|
101
|
+
/*#__PURE__*/ jsx(Text.Body, {
|
|
102
|
+
as: TextTag.span,
|
|
103
|
+
children: value
|
|
104
|
+
}),
|
|
105
|
+
actions
|
|
106
|
+
]
|
|
107
|
+
}),
|
|
108
|
+
/*#__PURE__*/ jsx(Text.Body, {
|
|
109
|
+
testId: testId ? `${testId}-label` : void 0,
|
|
110
|
+
className: DateRangeDefaultTrigger_module.label,
|
|
111
|
+
as: "label",
|
|
112
|
+
htmlFor: inputId,
|
|
113
|
+
children: label
|
|
114
|
+
})
|
|
115
|
+
]
|
|
116
|
+
}),
|
|
117
|
+
staticActions && /*#__PURE__*/ jsx("div", {
|
|
118
|
+
className: DateRangeDefaultTrigger_module.actionsContainer,
|
|
119
|
+
onMouseDown: (event)=>{
|
|
120
|
+
event.preventDefault();
|
|
121
|
+
},
|
|
122
|
+
children: staticActions
|
|
123
|
+
})
|
|
124
|
+
]
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
DateRangeDefaultTrigger.displayName = 'DateRangeDefaultTrigger';
|
|
128
|
+
export { DEFAULT_FOCUSED_WIDTH, DateRangeDefaultTrigger };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "./DateRangeDefaultTrigger_module.css";
|
|
2
|
+
const DateRangeDefaultTrigger_module = {
|
|
3
|
+
wrapper: "wrapper-uTvv8S",
|
|
4
|
+
input: "input-RZEJYu",
|
|
5
|
+
noPointerEvents: "noPointerEvents-zhzWq6",
|
|
6
|
+
inputContentContainer: "inputContentContainer-gvBnmZ",
|
|
7
|
+
label: "label-Abet7f",
|
|
8
|
+
disabled: "disabled-pFIwM6",
|
|
9
|
+
error: "error-MRitKF",
|
|
10
|
+
focused: "focused-WLcs7A",
|
|
11
|
+
empty: "empty-Nh6EKc",
|
|
12
|
+
actionsContainer: "actionsContainer-v2jQ9o",
|
|
13
|
+
sizerOuter: "sizerOuter-UiUY6R",
|
|
14
|
+
sizerInner: "sizerInner-YVmkb_",
|
|
15
|
+
sizerText: "sizerText-WJ5sCs",
|
|
16
|
+
hintOverlay: "hintOverlay-yyKcHw",
|
|
17
|
+
hintText: "hintText-P2rm8R"
|
|
18
|
+
};
|
|
19
|
+
export default DateRangeDefaultTrigger_module;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
.wrapper-uTvv8S {
|
|
2
|
+
--outline-input-wrapper-padding: 12px;
|
|
3
|
+
--input-filter-border: var(--border-normal, #d1d6df);
|
|
4
|
+
--input-filter-label: var(--text-secondary, #5f6d79);
|
|
5
|
+
--input-filter-text: var(--text-primary, #091739);
|
|
6
|
+
--input-filter-background: var(--input-default-background, #fff);
|
|
7
|
+
--input-filter-label-left-padding: 5px;
|
|
8
|
+
--input-filter-label-right-padding: 0px;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
border: 1px solid var(--input-filter-border);
|
|
11
|
+
background: var(--input-filter-background);
|
|
12
|
+
padding: 0 var(--outline-input-wrapper-padding);
|
|
13
|
+
width: fit-content;
|
|
14
|
+
max-width: var(--input-width);
|
|
15
|
+
border-radius: 8px;
|
|
16
|
+
align-items: center;
|
|
17
|
+
height: 36px;
|
|
18
|
+
transition: border-color 50ms linear;
|
|
19
|
+
display: flex;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.wrapper-uTvv8S .input-RZEJYu {
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
background: var(--input-filter-background);
|
|
25
|
+
color: var(--input-filter-text);
|
|
26
|
+
text-overflow: ellipsis;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
border: none;
|
|
29
|
+
outline: none;
|
|
30
|
+
padding: 0;
|
|
31
|
+
font-family: ALS Hauss, sans-serif;
|
|
32
|
+
font-size: 14px;
|
|
33
|
+
font-style: normal;
|
|
34
|
+
font-weight: 400;
|
|
35
|
+
line-height: 20px;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.wrapper-uTvv8S .input-RZEJYu:autofill {
|
|
40
|
+
box-shadow: inset 20px 20px 0 20px var(--input-filter-background);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.wrapper-uTvv8S .input-RZEJYu.noPointerEvents-zhzWq6 {
|
|
44
|
+
pointer-events: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.wrapper-uTvv8S .inputContentContainer-gvBnmZ {
|
|
48
|
+
z-index: 2;
|
|
49
|
+
border-radius: 4px;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.wrapper-uTvv8S .label-Abet7f {
|
|
54
|
+
transform-origin: 0 0;
|
|
55
|
+
cursor: text;
|
|
56
|
+
background: var(--input-filter-background);
|
|
57
|
+
padding: 0 var(--input-filter-label-right-padding) 0 var(--input-filter-label-left-padding);
|
|
58
|
+
max-width: calc(100% - var(--input-filter-label-right-padding));
|
|
59
|
+
pointer-events: none;
|
|
60
|
+
color: var(--input-filter-label);
|
|
61
|
+
-webkit-user-select: none;
|
|
62
|
+
user-select: none;
|
|
63
|
+
text-overflow: ellipsis;
|
|
64
|
+
white-space: nowrap;
|
|
65
|
+
transition: transform .2s cubic-bezier(0, 0, .2, 1);
|
|
66
|
+
position: absolute;
|
|
67
|
+
top: 0;
|
|
68
|
+
left: 0;
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
transform: matrix(1, 0, 0, 1, -5, 0);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.wrapper-uTvv8S:hover:not(.disabled-pFIwM6, .error-MRitKF, :focus-within, .focused-WLcs7A) {
|
|
74
|
+
--input-filter-border: var(--border-hover, #5f6d79);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.wrapper-uTvv8S:focus-within, .wrapper-uTvv8S.focused-WLcs7A {
|
|
78
|
+
--input-filter-label-right-padding: 5px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.wrapper-uTvv8S:focus-within .label-Abet7f, .wrapper-uTvv8S.focused-WLcs7A .label-Abet7f {
|
|
82
|
+
max-width: calc(var(--input-width) - var(--outline-input-wrapper-padding)*2 - var(--input-filter-label-right-padding));
|
|
83
|
+
font-size: 12px;
|
|
84
|
+
line-height: 16px;
|
|
85
|
+
transform: matrix(1, 0, 0, 1, -4, -16);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.wrapper-uTvv8S:focus-within, .wrapper-uTvv8S.focused-WLcs7A {
|
|
89
|
+
--input-filter-border: var(--elements-hover, #091739);
|
|
90
|
+
--input-filter-label: var(--text-primary, #9fa7af);
|
|
91
|
+
outline: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.wrapper-uTvv8S:not(.empty-Nh6EKc) {
|
|
95
|
+
--input-filter-label-right-padding: 5px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.wrapper-uTvv8S:not(.empty-Nh6EKc) .label-Abet7f {
|
|
99
|
+
max-width: calc(var(--input-width) - var(--outline-input-wrapper-padding)*2 - var(--input-filter-label-right-padding));
|
|
100
|
+
font-size: 12px;
|
|
101
|
+
line-height: 16px;
|
|
102
|
+
transform: matrix(1, 0, 0, 1, -4, -16);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.wrapper-uTvv8S.error-MRitKF {
|
|
106
|
+
--input-filter-border: var(--border-critical, #e50347);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.wrapper-uTvv8S.error-MRitKF:focus-within, .wrapper-uTvv8S.error-MRitKF.focused-WLcs7A, .wrapper-uTvv8S.error-MRitKF:not(.empty-Nh6EKc) {
|
|
110
|
+
--input-filter-label: var(--text-critical, #e50347);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.wrapper-uTvv8S.disabled-pFIwM6 {
|
|
114
|
+
--input-filter-background: var(--bgd-secondary, #f1f4f9);
|
|
115
|
+
--input-filter-label: var(--text-tertiary, #9fa7af);
|
|
116
|
+
--input-filter-text: var(--text-secondary, #5f6d79);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.wrapper-uTvv8S.disabled-pFIwM6:not(.empty-Nh6EKc) .label-Abet7f {
|
|
120
|
+
display: none;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.wrapper-uTvv8S .actionsContainer-v2jQ9o {
|
|
124
|
+
align-items: center;
|
|
125
|
+
gap: 12px;
|
|
126
|
+
padding-left: 8px;
|
|
127
|
+
display: inline-flex;
|
|
128
|
+
position: relative;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.sizerOuter-UiUY6R {
|
|
132
|
+
border-radius: inherit;
|
|
133
|
+
flex-direction: column;
|
|
134
|
+
min-width: 0;
|
|
135
|
+
display: inline-flex;
|
|
136
|
+
position: relative;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.sizerOuter-UiUY6R > .sizerInner-YVmkb_ {
|
|
140
|
+
border-radius: inherit;
|
|
141
|
+
display: inline-flex;
|
|
142
|
+
position: relative;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.sizerOuter-UiUY6R > .sizerInner-YVmkb_ > .input-RZEJYu {
|
|
146
|
+
flex: 1;
|
|
147
|
+
width: 1px;
|
|
148
|
+
height: 20px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.sizerText-WJ5sCs {
|
|
152
|
+
visibility: hidden;
|
|
153
|
+
white-space: nowrap;
|
|
154
|
+
gap: 12px;
|
|
155
|
+
width: max-content;
|
|
156
|
+
height: 0;
|
|
157
|
+
padding: 0;
|
|
158
|
+
display: flex;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.hintOverlay-yyKcHw {
|
|
162
|
+
--hint-width: 265px;
|
|
163
|
+
box-sizing: border-box;
|
|
164
|
+
max-width: var(--hint-width);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.hintText-P2rm8R {
|
|
168
|
+
overflow-wrap: break-word;
|
|
169
|
+
}
|
|
170
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./DateRangeDefaultTrigger_module.css";
|
|
2
|
+
const DateRangeDefaultTrigger_module = {
|
|
3
|
+
icon: "icon-OajR9y",
|
|
4
|
+
outlineInput: "outlineInput-ZaqcZN",
|
|
5
|
+
clearIconButton: "clearIconButton-IOJ6cu",
|
|
6
|
+
filled: "filled-Snnimx",
|
|
7
|
+
actions: "actions-sQbVlC",
|
|
8
|
+
disabled: "disabled-TuIqlU",
|
|
9
|
+
calendarIcon: "calendarIcon-HZ0W7o",
|
|
10
|
+
inputMask: "inputMask-T9WXyG"
|
|
11
|
+
};
|
|
12
|
+
export default DateRangeDefaultTrigger_module;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.icon-OajR9y path {
|
|
2
|
+
stroke: var(--elements-normal, #5f6d79);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.outlineInput-ZaqcZN .clearIconButton-IOJ6cu {
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
display: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.outlineInput-ZaqcZN.filled-Snnimx:hover .actions-sQbVlC:not(.disabled-TuIqlU) .calendarIcon-HZ0W7o {
|
|
11
|
+
display: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.outlineInput-ZaqcZN.filled-Snnimx:hover .actions-sQbVlC:not(.disabled-TuIqlU) .clearIconButton-IOJ6cu {
|
|
15
|
+
display: flex;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.clearIconButton-IOJ6cu {
|
|
19
|
+
background-color: #0000;
|
|
20
|
+
border: none;
|
|
21
|
+
outline: none;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
align-items: center;
|
|
24
|
+
padding: 0;
|
|
25
|
+
display: flex;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.actions-sQbVlC {
|
|
29
|
+
justify-content: center;
|
|
30
|
+
align-items: center;
|
|
31
|
+
display: flex;
|
|
32
|
+
overflow: visible;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.actions-sQbVlC svg, .actions-sQbVlC path {
|
|
36
|
+
overflow: visible;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.inputMask-T9WXyG {
|
|
40
|
+
font-feature-settings: "tnum" on,"lnum" on;
|
|
41
|
+
-webkit-font-smoothing: antialiased;
|
|
42
|
+
}
|
|
43
|
+
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { useDateRange } from '../hooks/useDateRange';
|
|
2
|
+
type DateRangeInputProps = Pick<ReturnType<typeof useDateRange>, 'props' | 'value' | 'needMaskInput' | 'needInputContent' | 'hintZIndex' | 'datepickerDropdown' | 'inputMaskValue' | 'assignTriggerRef' | 'handleClickOnClearButton' | 'handleClickPrevButton' | 'handleClickNextButton' | 'handleKeyDown' | 'handlePressTabOnInputContent' | 'getFocusedWidth' | 'isInputContentButtonsDisabled' | 'isFilled'>;
|
|
3
|
+
export declare const DateRangeInput: (dateRange: DateRangeInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import react_input_mask from "react-input-mask";
|
|
3
|
+
import { cn } from "../../../common/css/index.js";
|
|
4
|
+
import { Date12Icon, RemoveClose12Icon } from "../../../icon/index.js";
|
|
5
|
+
import { DEFAULT_HINT_Z_INDEX } from "../consts.js";
|
|
6
|
+
import { DateRangeDefaultTrigger } from "../DateRangeDefaultTrigger/DateRangeDefaultTrigger.js";
|
|
7
|
+
import { InputContent } from "../InputContent/index.js";
|
|
8
|
+
import DateRangeDefaultTrigger_module from "../DateRangeDefaultTrigger.module.js";
|
|
9
|
+
const DateRangeInput = (dateRange)=>{
|
|
10
|
+
const { props, value, needMaskInput, needInputContent, hintZIndex, datepickerDropdown, inputMaskValue, assignTriggerRef, handleClickOnClearButton, handleClickPrevButton, handleClickNextButton, handleKeyDown, handlePressTabOnInputContent, getFocusedWidth, isInputContentButtonsDisabled, isFilled } = dateRange;
|
|
11
|
+
return /*#__PURE__*/ jsx(DateRangeDefaultTrigger, {
|
|
12
|
+
ref: assignTriggerRef,
|
|
13
|
+
...props,
|
|
14
|
+
label: props.label ?? '',
|
|
15
|
+
...datepickerDropdown.triggerAriaProps,
|
|
16
|
+
onClick: props.disabled ? void 0 : datepickerDropdown.handleOpen,
|
|
17
|
+
value: needMaskInput ? inputMaskValue.value : ' ',
|
|
18
|
+
focusedWidth: getFocusedWidth(),
|
|
19
|
+
focusedState: datepickerDropdown.open,
|
|
20
|
+
onChange: (event)=>{
|
|
21
|
+
if (!needMaskInput) return;
|
|
22
|
+
const { value: inputValue } = event.target;
|
|
23
|
+
if (inputValue && inputValue !== inputMaskValue.emptyRangeMaskInputValue) datepickerDropdown.handleOpen();
|
|
24
|
+
inputMaskValue.changeValue(inputValue);
|
|
25
|
+
},
|
|
26
|
+
staticActions: /*#__PURE__*/ jsxs("div", {
|
|
27
|
+
className: cn(DateRangeDefaultTrigger_module.actions, props.disabled && DateRangeDefaultTrigger_module.disabled),
|
|
28
|
+
children: [
|
|
29
|
+
/*#__PURE__*/ jsx(Date12Icon, {
|
|
30
|
+
className: cn(DateRangeDefaultTrigger_module.icon, DateRangeDefaultTrigger_module.calendarIcon)
|
|
31
|
+
}),
|
|
32
|
+
/*#__PURE__*/ jsx("button", {
|
|
33
|
+
className: DateRangeDefaultTrigger_module.clearIconButton,
|
|
34
|
+
onClick: handleClickOnClearButton,
|
|
35
|
+
type: "button",
|
|
36
|
+
children: /*#__PURE__*/ jsx(RemoveClose12Icon, {
|
|
37
|
+
className: DateRangeDefaultTrigger_module.icon
|
|
38
|
+
})
|
|
39
|
+
})
|
|
40
|
+
]
|
|
41
|
+
}),
|
|
42
|
+
className: cn(DateRangeDefaultTrigger_module.outlineInput, props.className, isFilled() && DateRangeDefaultTrigger_module.filled),
|
|
43
|
+
inputContent: needInputContent && /*#__PURE__*/ jsx(InputContent, {
|
|
44
|
+
value: value,
|
|
45
|
+
disabled: isInputContentButtonsDisabled(),
|
|
46
|
+
tooltipZIndex: hintZIndex,
|
|
47
|
+
onClickPrev: handleClickPrevButton,
|
|
48
|
+
onClickNext: handleClickNextButton,
|
|
49
|
+
onPressTabNextButton: handlePressTabOnInputContent
|
|
50
|
+
}),
|
|
51
|
+
renderCustomInput: needMaskInput ? (params)=>/*#__PURE__*/ jsx(react_input_mask, {
|
|
52
|
+
"data-test-id": props.testId ? `${props.testId}-input` : void 0,
|
|
53
|
+
className: cn(DateRangeDefaultTrigger_module.inputMask, params.className),
|
|
54
|
+
onFocus: params.onFocus,
|
|
55
|
+
onBlur: params.onBlur,
|
|
56
|
+
onKeyUp: params.onKeyUp,
|
|
57
|
+
onChange: params.onChange,
|
|
58
|
+
value: params.value,
|
|
59
|
+
inputRef: params.ref,
|
|
60
|
+
id: params.inputId,
|
|
61
|
+
disabled: props.disabled,
|
|
62
|
+
mask: inputMaskValue.inputMask,
|
|
63
|
+
alwaysShowMask: true
|
|
64
|
+
}) : void 0,
|
|
65
|
+
onKeyDown: handleKeyDown,
|
|
66
|
+
hintZIndex: hintZIndex ?? DEFAULT_HINT_Z_INDEX
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
export { DateRangeInput };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "./Day_module.css";
|
|
2
|
+
const Day_module = {
|
|
3
|
+
day: "day-_STBpq",
|
|
4
|
+
today: "today-LIoCHS",
|
|
5
|
+
roundingContainer: "roundingContainer-DrFCbW",
|
|
6
|
+
holiday: "holiday-qW5YE0",
|
|
7
|
+
clickable: "clickable-Q_VdIY",
|
|
8
|
+
noHoverable: "noHoverable-I1XlXw",
|
|
9
|
+
selected: "selected-He2ffi",
|
|
10
|
+
sunday: "sunday-u1nJuw",
|
|
11
|
+
monday: "monday-vAXCT_",
|
|
12
|
+
leftTreshhold: "leftTreshhold-G8cbjr",
|
|
13
|
+
rightTreshhold: "rightTreshhold-Ub7ruB",
|
|
14
|
+
text: "text-oOEy0b"
|
|
15
|
+
};
|
|
16
|
+
export default Day_module;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
.day-_STBpq {
|
|
2
|
+
--cell-size: 32px;
|
|
3
|
+
--cell-border-radius: 8px;
|
|
4
|
+
width: var(--cell-size);
|
|
5
|
+
height: var(--cell-size);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.day-_STBpq.today-LIoCHS .roundingContainer-DrFCbW:after {
|
|
9
|
+
background-color: var(--elements-accent, #036ce5);
|
|
10
|
+
content: "";
|
|
11
|
+
border-radius: 4px;
|
|
12
|
+
width: 4px;
|
|
13
|
+
height: 4px;
|
|
14
|
+
position: absolute;
|
|
15
|
+
bottom: 4px;
|
|
16
|
+
left: 14px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.day-_STBpq.holiday-qW5YE0 {
|
|
20
|
+
color: var(--text-critical);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.day-_STBpq.clickable-Q_VdIY {
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.day-_STBpq.clickable-Q_VdIY:hover:not(.noHoverable-I1XlXw) .roundingContainer-DrFCbW {
|
|
28
|
+
outline: 1px solid var(--border-accent);
|
|
29
|
+
border-radius: var(--cell-border-radius);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.day-_STBpq.selected-He2ffi {
|
|
33
|
+
background: var(--elements-chips-normal-current, #bfddf7bf);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.day-_STBpq.selected-He2ffi:not(.clickable-Q_VdIY).sunday-u1nJuw {
|
|
37
|
+
background: linear-gradient(90deg, var(--light-blue-100, #bfddf7bf) 0%, var(--light-white, #fff) 100%);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.day-_STBpq.selected-He2ffi:not(.clickable-Q_VdIY).monday-vAXCT_ {
|
|
41
|
+
background: linear-gradient(90deg, var(--light-white, #fff) 0%, var(--light-blue-100, #bfddf7bf) 100%);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.day-_STBpq.today-LIoCHS.leftTreshhold-G8cbjr :after, .day-_STBpq.today-LIoCHS.rightTreshhold-Ub7ruB :after {
|
|
45
|
+
background: var(--invert-text, #fff);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.day-_STBpq.leftTreshhold-G8cbjr, .day-_STBpq.monday-vAXCT_ {
|
|
49
|
+
border-top-left-radius: var(--cell-border-radius);
|
|
50
|
+
border-bottom-left-radius: var(--cell-border-radius);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.day-_STBpq.rightTreshhold-Ub7ruB, .day-_STBpq.sunday-u1nJuw {
|
|
54
|
+
border-top-right-radius: var(--cell-border-radius);
|
|
55
|
+
border-bottom-right-radius: var(--cell-border-radius);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.day-_STBpq.leftTreshhold-G8cbjr .roundingContainer-DrFCbW, .day-_STBpq.rightTreshhold-Ub7ruB .roundingContainer-DrFCbW {
|
|
59
|
+
border-radius: var(--cell-border-radius);
|
|
60
|
+
background-color: var(--button-primary-normal, #036ce5);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.day-_STBpq.leftTreshhold-G8cbjr .roundingContainer-DrFCbW .text-oOEy0b, .day-_STBpq.rightTreshhold-Ub7ruB .roundingContainer-DrFCbW .text-oOEy0b {
|
|
64
|
+
color: var(--invert-text, #fff);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.day-_STBpq .roundingContainer-DrFCbW {
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
align-items: center;
|
|
71
|
+
width: 100%;
|
|
72
|
+
height: 100%;
|
|
73
|
+
display: flex;
|
|
74
|
+
position: relative;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.day-_STBpq .roundingContainer-DrFCbW .text-oOEy0b {
|
|
78
|
+
color: inherit;
|
|
79
|
+
}
|
|
80
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface DayProps {
|
|
2
|
+
date: Date | null;
|
|
3
|
+
selected?: boolean;
|
|
4
|
+
leftTreshhold?: boolean;
|
|
5
|
+
rightTreshhold?: boolean;
|
|
6
|
+
dayIndex: number;
|
|
7
|
+
noHoverStyle?: boolean;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
onHover?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const Day: import("react").MemoExoticComponent<(props: DayProps) => import("react/jsx-runtime").JSX.Element>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { memo } from "react";
|
|
3
|
+
import { getDate, isEqual, isSameDay } from "date-fns";
|
|
4
|
+
import { cn } from "../../../common/css/index.js";
|
|
5
|
+
import { Text, TextTag } from "../../Text/Text.js";
|
|
6
|
+
import Day_module from "./Day.module.js";
|
|
7
|
+
const isDatePropsEqual = (prevProps, nextProps)=>{
|
|
8
|
+
if (prevProps.date) {
|
|
9
|
+
if (!nextProps.date) return false;
|
|
10
|
+
return isEqual(prevProps.date, nextProps.date);
|
|
11
|
+
}
|
|
12
|
+
return !nextProps.date;
|
|
13
|
+
};
|
|
14
|
+
const Day = /*#__PURE__*/ memo((props)=>{
|
|
15
|
+
const date = props.date ? getDate(props.date) : '';
|
|
16
|
+
const isToday = props.date ? isSameDay(props.date, new Date()) : false;
|
|
17
|
+
const isHoliday = null !== props.dayIndex && [
|
|
18
|
+
5,
|
|
19
|
+
6
|
|
20
|
+
].includes(props.dayIndex);
|
|
21
|
+
const clickable = !!props.date;
|
|
22
|
+
const isMonday = 0 === props.dayIndex;
|
|
23
|
+
const isSunday = 6 === props.dayIndex;
|
|
24
|
+
return /*#__PURE__*/ jsx("div", {
|
|
25
|
+
className: cn(Day_module.day, isToday && Day_module.today, isHoliday && Day_module.holiday, clickable && Day_module.clickable, props.selected && Day_module.selected, isMonday && Day_module.monday, isSunday && Day_module.sunday, props.leftTreshhold && Day_module.leftTreshhold, props.rightTreshhold && Day_module.rightTreshhold, props.noHoverStyle && Day_module.noHoverable),
|
|
26
|
+
onClick: clickable ? props.onClick : void 0,
|
|
27
|
+
onMouseEnter: clickable ? props.onHover : void 0,
|
|
28
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
29
|
+
className: Day_module.roundingContainer,
|
|
30
|
+
children: /*#__PURE__*/ jsx(Text.Body, {
|
|
31
|
+
as: TextTag.span,
|
|
32
|
+
className: Day_module.text,
|
|
33
|
+
children: date
|
|
34
|
+
})
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
}, (prevProps, nextProps)=>isDatePropsEqual(prevProps, nextProps) && prevProps.selected === nextProps.selected && prevProps.leftTreshhold === nextProps.leftTreshhold && prevProps.rightTreshhold === nextProps.rightTreshhold && prevProps.noHoverStyle === nextProps.noHoverStyle);
|
|
38
|
+
Day.displayName = 'DateRangeDay';
|
|
39
|
+
export { Day };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "./DropdownContent_module.css";
|
|
2
|
+
const DropdownContent_module = {
|
|
3
|
+
dropdownContainer: "dropdownContainer-jyFL59",
|
|
4
|
+
mainContent: "mainContent-geLVXa",
|
|
5
|
+
dropdownFooter: "dropdownFooter-mwLKEe",
|
|
6
|
+
calendarWrapper: "calendarWrapper-GxG8uE",
|
|
7
|
+
toggleWrapper: "toggleWrapper-gS1WLz",
|
|
8
|
+
toggleTooltipOverlay: "toggleTooltipOverlay-iWgQ7L"
|
|
9
|
+
};
|
|
10
|
+
export default DropdownContent_module;
|