@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moysklad/uikit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "31.20.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -63,6 +63,10 @@
|
|
|
63
63
|
"types": "./dist/components/Banner/Banner.d.ts",
|
|
64
64
|
"import": "./dist/components/Banner/Banner.js"
|
|
65
65
|
},
|
|
66
|
+
"./components/BentoBlock": {
|
|
67
|
+
"types": "./dist/components/BentoBlock/BentoBlock.d.ts",
|
|
68
|
+
"import": "./dist/components/BentoBlock/BentoBlock.js"
|
|
69
|
+
},
|
|
66
70
|
"./components/BodyL": {
|
|
67
71
|
"types": "./dist/components/BodyL/BodyL.d.ts",
|
|
68
72
|
"import": "./dist/components/BodyL/BodyL.js"
|
|
@@ -115,6 +119,10 @@
|
|
|
115
119
|
"types": "./dist/components/Datepicker/Datepicker.d.ts",
|
|
116
120
|
"import": "./dist/components/Datepicker/Datepicker.js"
|
|
117
121
|
},
|
|
122
|
+
"./components/DateRange": {
|
|
123
|
+
"types": "./dist/components/DateRange/DateRange.d.ts",
|
|
124
|
+
"import": "./dist/components/DateRange/DateRange.js"
|
|
125
|
+
},
|
|
118
126
|
"./components/Dot": {
|
|
119
127
|
"types": "./dist/components/Dot/Dot.d.ts",
|
|
120
128
|
"import": "./dist/components/Dot/Dot.js"
|
|
@@ -123,6 +131,10 @@
|
|
|
123
131
|
"types": "./dist/components/Dropdown/Dropdown.d.ts",
|
|
124
132
|
"import": "./dist/components/Dropdown/Dropdown.js"
|
|
125
133
|
},
|
|
134
|
+
"./components/EditableDate": {
|
|
135
|
+
"types": "./dist/components/EditableDate/EditableDate.d.ts",
|
|
136
|
+
"import": "./dist/components/EditableDate/EditableDate.js"
|
|
137
|
+
},
|
|
126
138
|
"./components/EditableTitle": {
|
|
127
139
|
"types": "./dist/components/EditableTitle/EditableTitle.d.ts",
|
|
128
140
|
"import": "./dist/components/EditableTitle/EditableTitle.js"
|
|
@@ -136,12 +148,12 @@
|
|
|
136
148
|
"import": "./dist/components/EmptyStateLarge/EmptyStateLarge.js"
|
|
137
149
|
},
|
|
138
150
|
"./components/FieldLabel": {
|
|
139
|
-
"types": "./dist/components/FieldLabel/FieldLabel.d.ts",
|
|
140
|
-
"import": "./dist/components/FieldLabel/FieldLabel.js"
|
|
151
|
+
"types": "./dist/components/_shared/FieldLabel/FieldLabel.d.ts",
|
|
152
|
+
"import": "./dist/components/_shared/FieldLabel/FieldLabel.js"
|
|
141
153
|
},
|
|
142
154
|
"./components/FieldRow": {
|
|
143
|
-
"types": "./dist/components/FieldRow/FieldRow.d.ts",
|
|
144
|
-
"import": "./dist/components/FieldRow/FieldRow.js"
|
|
155
|
+
"types": "./dist/components/_shared/FieldRow/FieldRow.d.ts",
|
|
156
|
+
"import": "./dist/components/_shared/FieldRow/FieldRow.js"
|
|
145
157
|
},
|
|
146
158
|
"./components/FileUploader": {
|
|
147
159
|
"types": "./dist/components/FileUploader/FileUploader.d.ts",
|
|
@@ -188,16 +200,20 @@
|
|
|
188
200
|
"import": "./dist/components/Indicator/Indicator.js"
|
|
189
201
|
},
|
|
190
202
|
"./components/Info": {
|
|
191
|
-
"types": "./dist/components/Info/Info.d.ts",
|
|
192
|
-
"import": "./dist/components/Info/Info.js"
|
|
203
|
+
"types": "./dist/components/_shared/Info/Info.d.ts",
|
|
204
|
+
"import": "./dist/components/_shared/Info/Info.js"
|
|
205
|
+
},
|
|
206
|
+
"./components/Informer": {
|
|
207
|
+
"types": "./dist/components/Informer/Informer.d.ts",
|
|
208
|
+
"import": "./dist/components/Informer/Informer.js"
|
|
193
209
|
},
|
|
194
210
|
"./components/Input": {
|
|
195
211
|
"types": "./dist/components/Input/Input.d.ts",
|
|
196
212
|
"import": "./dist/components/Input/Input.js"
|
|
197
213
|
},
|
|
198
214
|
"./components/InputClear": {
|
|
199
|
-
"types": "./dist/components/InputClear/InputClear.d.ts",
|
|
200
|
-
"import": "./dist/components/InputClear/InputClear.js"
|
|
215
|
+
"types": "./dist/components/_shared/InputClear/InputClear.d.ts",
|
|
216
|
+
"import": "./dist/components/_shared/InputClear/InputClear.js"
|
|
201
217
|
},
|
|
202
218
|
"./components/InputUnit": {
|
|
203
219
|
"types": "./dist/components/InputUnit/InputUnit.d.ts",
|
|
@@ -219,10 +235,18 @@
|
|
|
219
235
|
"types": "./dist/components/LabelValueDate/LabelValueDate.d.ts",
|
|
220
236
|
"import": "./dist/components/LabelValueDate/LabelValueDate.js"
|
|
221
237
|
},
|
|
238
|
+
"./components/LabelValueFile": {
|
|
239
|
+
"types": "./dist/components/LabelValueFile/LabelValueFile.d.ts",
|
|
240
|
+
"import": "./dist/components/LabelValueFile/LabelValueFile.js"
|
|
241
|
+
},
|
|
222
242
|
"./components/LabelValueInput": {
|
|
223
243
|
"types": "./dist/components/LabelValueInput/LabelValueInput.d.ts",
|
|
224
244
|
"import": "./dist/components/LabelValueInput/LabelValueInput.js"
|
|
225
245
|
},
|
|
246
|
+
"./components/LabelValueLink": {
|
|
247
|
+
"types": "./dist/components/LabelValueLink/LabelValueLink.d.ts",
|
|
248
|
+
"import": "./dist/components/LabelValueLink/LabelValueLink.js"
|
|
249
|
+
},
|
|
226
250
|
"./components/LabelValueSelect": {
|
|
227
251
|
"types": "./dist/components/LabelValueSelect/LabelValueSelect.d.ts",
|
|
228
252
|
"import": "./dist/components/LabelValueSelect/LabelValueSelect.js"
|
|
@@ -231,6 +255,10 @@
|
|
|
231
255
|
"types": "./dist/components/LabelValueTextfield/LabelValueTextfield.d.ts",
|
|
232
256
|
"import": "./dist/components/LabelValueTextfield/LabelValueTextfield.js"
|
|
233
257
|
},
|
|
258
|
+
"./components/Layout": {
|
|
259
|
+
"types": "./dist/components/Layout/Layout.d.ts",
|
|
260
|
+
"import": "./dist/components/Layout/Layout.js"
|
|
261
|
+
},
|
|
234
262
|
"./components/Link": {
|
|
235
263
|
"types": "./dist/components/Link/Link.d.ts",
|
|
236
264
|
"import": "./dist/components/Link/Link.js"
|
|
@@ -259,6 +287,10 @@
|
|
|
259
287
|
"types": "./dist/components/Pagination/Pagination.d.ts",
|
|
260
288
|
"import": "./dist/components/Pagination/Pagination.js"
|
|
261
289
|
},
|
|
290
|
+
"./components/Panel": {
|
|
291
|
+
"types": "./dist/components/Panel/Panel.d.ts",
|
|
292
|
+
"import": "./dist/components/Panel/Panel.js"
|
|
293
|
+
},
|
|
262
294
|
"./components/Progressbar": {
|
|
263
295
|
"types": "./dist/components/Progressbar/Progressbar.d.ts",
|
|
264
296
|
"import": "./dist/components/Progressbar/Progressbar.js"
|
|
@@ -311,6 +343,10 @@
|
|
|
311
343
|
"types": "./dist/components/Spinner/Spinner.d.ts",
|
|
312
344
|
"import": "./dist/components/Spinner/Spinner.js"
|
|
313
345
|
},
|
|
346
|
+
"./components/StatusBadge": {
|
|
347
|
+
"types": "./dist/components/StatusBadge/StatusBadge.d.ts",
|
|
348
|
+
"import": "./dist/components/StatusBadge/StatusBadge.js"
|
|
349
|
+
},
|
|
314
350
|
"./components/Switch": {
|
|
315
351
|
"types": "./dist/components/Switch/Switch.d.ts",
|
|
316
352
|
"import": "./dist/components/Switch/Switch.js"
|
|
@@ -363,6 +399,9 @@
|
|
|
363
399
|
"components/Banner": [
|
|
364
400
|
"dist/components/Banner/Banner.d.ts"
|
|
365
401
|
],
|
|
402
|
+
"components/BentoBlock": [
|
|
403
|
+
"dist/components/BentoBlock/BentoBlock.d.ts"
|
|
404
|
+
],
|
|
366
405
|
"components/BodyL": [
|
|
367
406
|
"dist/components/BodyL/BodyL.d.ts"
|
|
368
407
|
],
|
|
@@ -408,6 +447,9 @@
|
|
|
408
447
|
"components/Dropdown": [
|
|
409
448
|
"dist/components/Dropdown/Dropdown.d.ts"
|
|
410
449
|
],
|
|
450
|
+
"components/EditableDate": [
|
|
451
|
+
"dist/components/EditableDate/EditableDate.d.ts"
|
|
452
|
+
],
|
|
411
453
|
"components/EditableTitle": [
|
|
412
454
|
"dist/components/EditableTitle/EditableTitle.d.ts"
|
|
413
455
|
],
|
|
@@ -418,10 +460,10 @@
|
|
|
418
460
|
"dist/components/EmptyStateLarge/EmptyStateLarge.d.ts"
|
|
419
461
|
],
|
|
420
462
|
"components/FieldLabel": [
|
|
421
|
-
"dist/components/FieldLabel/FieldLabel.d.ts"
|
|
463
|
+
"dist/components/_shared/FieldLabel/FieldLabel.d.ts"
|
|
422
464
|
],
|
|
423
465
|
"components/FieldRow": [
|
|
424
|
-
"dist/components/FieldRow/FieldRow.d.ts"
|
|
466
|
+
"dist/components/_shared/FieldRow/FieldRow.d.ts"
|
|
425
467
|
],
|
|
426
468
|
"components/FileUploader": [
|
|
427
469
|
"dist/components/FileUploader/FileUploader.d.ts"
|
|
@@ -454,13 +496,16 @@
|
|
|
454
496
|
"dist/components/Indicator/Indicator.d.ts"
|
|
455
497
|
],
|
|
456
498
|
"components/Info": [
|
|
457
|
-
"dist/components/Info/Info.d.ts"
|
|
499
|
+
"dist/components/_shared/Info/Info.d.ts"
|
|
500
|
+
],
|
|
501
|
+
"components/Informer": [
|
|
502
|
+
"dist/components/Informer/Informer.d.ts"
|
|
458
503
|
],
|
|
459
504
|
"components/Input": [
|
|
460
505
|
"dist/components/Input/Input.d.ts"
|
|
461
506
|
],
|
|
462
507
|
"components/InputClear": [
|
|
463
|
-
"dist/components/InputClear/InputClear.d.ts"
|
|
508
|
+
"dist/components/_shared/InputClear/InputClear.d.ts"
|
|
464
509
|
],
|
|
465
510
|
"components/InputUnit": [
|
|
466
511
|
"dist/components/InputUnit/InputUnit.d.ts"
|
|
@@ -471,6 +516,9 @@
|
|
|
471
516
|
"components/LabelValue": [
|
|
472
517
|
"dist/components/LabelValue/LabelValue.d.ts"
|
|
473
518
|
],
|
|
519
|
+
"components/LabelValueFile": [
|
|
520
|
+
"dist/components/LabelValueFile/LabelValueFile.d.ts"
|
|
521
|
+
],
|
|
474
522
|
"components/LabelValueCheckbox": [
|
|
475
523
|
"dist/components/LabelValueCheckbox/LabelValueCheckbox.d.ts"
|
|
476
524
|
],
|
|
@@ -480,6 +528,9 @@
|
|
|
480
528
|
"components/LabelValueInput": [
|
|
481
529
|
"dist/components/LabelValueInput/LabelValueInput.d.ts"
|
|
482
530
|
],
|
|
531
|
+
"components/LabelValueLink": [
|
|
532
|
+
"dist/components/LabelValueLink/LabelValueLink.d.ts"
|
|
533
|
+
],
|
|
483
534
|
"components/LabelValueSelect": [
|
|
484
535
|
"dist/components/LabelValueSelect/LabelValueSelect.d.ts"
|
|
485
536
|
],
|
|
@@ -507,6 +558,9 @@
|
|
|
507
558
|
"components/Pagination": [
|
|
508
559
|
"dist/components/Pagination/Pagination.d.ts"
|
|
509
560
|
],
|
|
561
|
+
"components/Panel": [
|
|
562
|
+
"dist/components/Panel/Panel.d.ts"
|
|
563
|
+
],
|
|
510
564
|
"components/Progressbar": [
|
|
511
565
|
"dist/components/Progressbar/Progressbar.d.ts"
|
|
512
566
|
],
|
|
@@ -546,6 +600,9 @@
|
|
|
546
600
|
"components/Spinner": [
|
|
547
601
|
"dist/components/Spinner/Spinner.d.ts"
|
|
548
602
|
],
|
|
603
|
+
"components/StatusBadge": [
|
|
604
|
+
"dist/components/StatusBadge/StatusBadge.d.ts"
|
|
605
|
+
],
|
|
549
606
|
"components/Switch": [
|
|
550
607
|
"dist/components/Switch/Switch.d.ts"
|
|
551
608
|
],
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type LabelHTMLAttributes } from 'react';
|
|
2
|
-
import type { IHasTestId } from '../../common';
|
|
3
|
-
import { type HelpProps, type HelpSizeValue } from '../Help/Help';
|
|
4
|
-
import { type TextProps } from '../Text/Text';
|
|
5
|
-
export interface FieldLabelProps extends IHasTestId, Pick<TextProps, 'colorToken' | 'variant'>, Omit<LabelHTMLAttributes<HTMLLabelElement>, 'children' | 'className' | 'color'> {
|
|
6
|
-
label?: string;
|
|
7
|
-
required?: boolean;
|
|
8
|
-
helpProps?: Omit<HelpProps, 'testId'>;
|
|
9
|
-
helpSize?: HelpSizeValue;
|
|
10
|
-
className?: string;
|
|
11
|
-
helpButtonClassName?: string;
|
|
12
|
-
onOverflowChange?: (isOverflowing: boolean) => void;
|
|
13
|
-
}
|
|
14
|
-
export declare const FieldLabel: {
|
|
15
|
-
({ label, required, variant, colorToken, helpProps, helpSize, className, helpButtonClassName, testId, onOverflowChange, ...restProps }: FieldLabelProps): import("react/jsx-runtime").JSX.Element | null;
|
|
16
|
-
displayName: string;
|
|
17
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import "./FieldLabel_module.css";
|
|
2
|
-
const FieldLabel_module = {
|
|
3
|
-
container: "container-C1lItd",
|
|
4
|
-
textWithRequiredMark: "textWithRequiredMark-ETmaJz",
|
|
5
|
-
labelText: "labelText-EzqZFW",
|
|
6
|
-
requiredMark: "requiredMark-Mkh961",
|
|
7
|
-
overflowText: "overflowText-GKoGmM",
|
|
8
|
-
hint: "hint-omNam8",
|
|
9
|
-
hintText: "hintText-Kbfap2"
|
|
10
|
-
};
|
|
11
|
-
export default FieldLabel_module;
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useEffect, useRef, useState } from "react";
|
|
3
|
-
import { cn } from "../../../common/css/index.js";
|
|
4
|
-
import { mergeRefs } from "../../../common/react/mergeRefs.js";
|
|
5
|
-
import { Hint } from "../../Hint/Hint.js";
|
|
6
|
-
import { Text } from "../../Text/Text.js";
|
|
7
|
-
import { getTypographyStyle } from "../../Typography/utils.js";
|
|
8
|
-
import { useTooltip } from "../hooks/useTooltip.js";
|
|
9
|
-
import LabelValue_module from "../LabelValue.module.js";
|
|
10
|
-
const getIconStroke = (args)=>{
|
|
11
|
-
if (args.isCustomValueBlock) return;
|
|
12
|
-
if (args.disabled) return DISABLED_ICON_STROKE;
|
|
13
|
-
if (args.error) return ERROR_ICON_STROKE;
|
|
14
|
-
};
|
|
15
|
-
const getValueTextVariant = (args)=>{
|
|
16
|
-
if (args.error) return 'critical';
|
|
17
|
-
if (args.isEmpty && !args.disabled) return 'buttonPrimary';
|
|
18
|
-
return 'primary';
|
|
19
|
-
};
|
|
20
|
-
const ERROR_ICON_STROKE = 'var(--elements-critical, rgb(229, 3, 71, 100%))';
|
|
21
|
-
const DISABLED_ICON_STROKE = 'var(--elements-hover, rgb(9, 23, 57, 100%))';
|
|
22
|
-
const ValueBlock = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
23
|
-
const focusTooltipTimeout = useRef();
|
|
24
|
-
const valueBlockInnerRef = useRef(null);
|
|
25
|
-
const valueTooltip = useTooltip({
|
|
26
|
-
targetText: props.value
|
|
27
|
-
});
|
|
28
|
-
const [isValueHintForceDisplayed, setIsValueHintForceDisplayed] = useState(false);
|
|
29
|
-
const [isTooltipVisible, setIsTooltipVisible] = useState(false);
|
|
30
|
-
const needShowTooltipRef = useRef(valueTooltip.needShowTooltip);
|
|
31
|
-
needShowTooltipRef.current = valueTooltip.needShowTooltip;
|
|
32
|
-
useEffect(()=>{
|
|
33
|
-
if (props.forceHideTooltip) setIsTooltipVisible(false);
|
|
34
|
-
}, [
|
|
35
|
-
props.forceHideTooltip
|
|
36
|
-
]);
|
|
37
|
-
const icon = props.renderIcon ? props.renderIcon({
|
|
38
|
-
stroke: getIconStroke({
|
|
39
|
-
error: props.error ?? false,
|
|
40
|
-
isCustomValueBlock: !!props.valueBlockContent,
|
|
41
|
-
disabled: props.disabled ?? false
|
|
42
|
-
})
|
|
43
|
-
}) : null;
|
|
44
|
-
const valueIcon = /*#__PURE__*/ jsx("div", {
|
|
45
|
-
className: LabelValue_module.iconContainer,
|
|
46
|
-
children: icon ?? null
|
|
47
|
-
});
|
|
48
|
-
const valueText = /*#__PURE__*/ jsx("span", {
|
|
49
|
-
ref: valueTooltip.targetRef,
|
|
50
|
-
className: cn(LabelValue_module.valueText, LabelValue_module.overflowText),
|
|
51
|
-
style: getTypographyStyle({
|
|
52
|
-
colorVariableName: '--value-text-color',
|
|
53
|
-
colorVariant: getValueTextVariant({
|
|
54
|
-
disabled: props.disabled,
|
|
55
|
-
error: props.error,
|
|
56
|
-
isEmpty: props.isEmpty
|
|
57
|
-
})
|
|
58
|
-
}),
|
|
59
|
-
"data-test-id": props.testId ? `${props.testId}-value` : void 0,
|
|
60
|
-
children: props.value
|
|
61
|
-
});
|
|
62
|
-
const showValueTooltipOnFocus = ()=>{
|
|
63
|
-
const isValueFocused = valueBlockInnerRef.current?.matches(':focus');
|
|
64
|
-
if (isValueFocused && needShowTooltipRef.current) setIsValueHintForceDisplayed(true);
|
|
65
|
-
};
|
|
66
|
-
const handleFocus = (event)=>{
|
|
67
|
-
props.onFocus?.(event);
|
|
68
|
-
focusTooltipTimeout.current = setTimeout(()=>{
|
|
69
|
-
showValueTooltipOnFocus();
|
|
70
|
-
}, 800);
|
|
71
|
-
};
|
|
72
|
-
const handleBlur = (event)=>{
|
|
73
|
-
props.onBlur?.(event);
|
|
74
|
-
setIsValueHintForceDisplayed(false);
|
|
75
|
-
};
|
|
76
|
-
useEffect(()=>()=>{
|
|
77
|
-
if (focusTooltipTimeout.current) clearTimeout(focusTooltipTimeout.current);
|
|
78
|
-
}, []);
|
|
79
|
-
if (props.valueBlockContent) return props.valueBlockContent({
|
|
80
|
-
valueNode: /*#__PURE__*/ jsxs(Fragment, {
|
|
81
|
-
children: [
|
|
82
|
-
valueText,
|
|
83
|
-
valueIcon
|
|
84
|
-
]
|
|
85
|
-
}),
|
|
86
|
-
valueBlockRef: forwardedRef,
|
|
87
|
-
isLabelOverflow: props.needShowLabelTooltip ?? false,
|
|
88
|
-
onBlur: handleBlur,
|
|
89
|
-
onFocus: handleFocus,
|
|
90
|
-
onKeyDown: (event)=>props.onValueKeyDown?.(event),
|
|
91
|
-
onKeyUp: (event)=>props.onValueKeyUp?.(event)
|
|
92
|
-
});
|
|
93
|
-
const onHintVisibilityChange = (isVisible)=>{
|
|
94
|
-
if (isValueHintForceDisplayed) return void setIsTooltipVisible(false);
|
|
95
|
-
setIsTooltipVisible(valueTooltip.needShowTooltip && isVisible);
|
|
96
|
-
};
|
|
97
|
-
return /*#__PURE__*/ jsxs("div", {
|
|
98
|
-
ref: mergeRefs([
|
|
99
|
-
forwardedRef,
|
|
100
|
-
valueBlockInnerRef
|
|
101
|
-
]),
|
|
102
|
-
className: LabelValue_module.valueBlock,
|
|
103
|
-
tabIndex: props.disabled ? void 0 : 0,
|
|
104
|
-
onFocus: handleFocus,
|
|
105
|
-
onBlur: handleBlur,
|
|
106
|
-
onKeyUp: props.onValueKeyUp,
|
|
107
|
-
onKeyDown: props.onValueKeyDown,
|
|
108
|
-
"data-test-id": props.testId ? `${props.testId}-value-block` : void 0,
|
|
109
|
-
children: [
|
|
110
|
-
/*#__PURE__*/ jsx(Hint, {
|
|
111
|
-
visible: isTooltipVisible || isValueHintForceDisplayed,
|
|
112
|
-
onVisibleChange: onHintVisibilityChange,
|
|
113
|
-
overlay: /*#__PURE__*/ jsxs("div", {
|
|
114
|
-
className: LabelValue_module.hintTextWrapper,
|
|
115
|
-
children: [
|
|
116
|
-
props.needShowLabelTooltip && isValueHintForceDisplayed && /*#__PURE__*/ jsx(Text.H4, {
|
|
117
|
-
className: cn(LabelValue_module.hintText, LabelValue_module.hintHeader),
|
|
118
|
-
colorToken: "invert",
|
|
119
|
-
children: props.label
|
|
120
|
-
}),
|
|
121
|
-
/*#__PURE__*/ jsx(Text.Body, {
|
|
122
|
-
testId: props.testId ? `${props.testId}-value-hint-text` : void 0,
|
|
123
|
-
className: LabelValue_module.hintText,
|
|
124
|
-
colorToken: "invert",
|
|
125
|
-
children: props.value
|
|
126
|
-
})
|
|
127
|
-
]
|
|
128
|
-
}),
|
|
129
|
-
overlayClassName: LabelValue_module.hint,
|
|
130
|
-
placement: "bottom",
|
|
131
|
-
children: valueText
|
|
132
|
-
}),
|
|
133
|
-
valueIcon
|
|
134
|
-
]
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
ValueBlock.displayName = 'ValueBlock';
|
|
138
|
-
export { ValueBlock };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef, useState } from "react";
|
|
2
|
-
const useTooltip = (args)=>{
|
|
3
|
-
const targetRef = useRef(null);
|
|
4
|
-
const [needShowTooltip, setNeedLabelTooltip] = useState(false);
|
|
5
|
-
useEffect(()=>{
|
|
6
|
-
if (!targetRef.current) return;
|
|
7
|
-
setNeedLabelTooltip(targetRef.current.scrollWidth > targetRef.current.clientWidth);
|
|
8
|
-
}, [
|
|
9
|
-
args.targetText
|
|
10
|
-
]);
|
|
11
|
-
return {
|
|
12
|
-
targetRef,
|
|
13
|
-
needShowTooltip
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export { useTooltip };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import "./DropdownContent_module.css";
|
|
2
|
-
const DropdownContent_module = {
|
|
3
|
-
dropdown: "dropdown-ai9ycV",
|
|
4
|
-
inputSizer: "inputSizer-WLN8cJ",
|
|
5
|
-
inputWithLabel: "inputWithLabel-Dk82Xo",
|
|
6
|
-
inputWrapper: "inputWrapper-YGluDz",
|
|
7
|
-
divider: "divider-KB4Z9E"
|
|
8
|
-
};
|
|
9
|
-
export default DropdownContent_module;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
interface DropdownContentProps {
|
|
3
|
-
testId?: string;
|
|
4
|
-
label: string;
|
|
5
|
-
helperText?: string;
|
|
6
|
-
error?: boolean;
|
|
7
|
-
input: ReactNode;
|
|
8
|
-
calendar: ReactNode;
|
|
9
|
-
onOpen?: () => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const DropdownContent: (props: DropdownContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { memo } from "react";
|
|
3
|
-
import { Text, TextColor } from "../../Text/Text.js";
|
|
4
|
-
import OptionForStory_module from "./OptionForStory.module.js";
|
|
5
|
-
const OptionForStory = /*#__PURE__*/ memo(({ item })=>/*#__PURE__*/ jsxs("div", {
|
|
6
|
-
className: OptionForStory_module.container,
|
|
7
|
-
children: [
|
|
8
|
-
/*#__PURE__*/ jsx("div", {
|
|
9
|
-
className: OptionForStory_module.avatar
|
|
10
|
-
}),
|
|
11
|
-
/*#__PURE__*/ jsxs("div", {
|
|
12
|
-
className: OptionForStory_module.info,
|
|
13
|
-
children: [
|
|
14
|
-
/*#__PURE__*/ jsx(Text.Body, {
|
|
15
|
-
className: OptionForStory_module.label,
|
|
16
|
-
children: item.label
|
|
17
|
-
}),
|
|
18
|
-
/*#__PURE__*/ jsx(Text.Caption, {
|
|
19
|
-
colorToken: TextColor.secondary,
|
|
20
|
-
children: item.value
|
|
21
|
-
})
|
|
22
|
-
]
|
|
23
|
-
})
|
|
24
|
-
]
|
|
25
|
-
}));
|
|
26
|
-
OptionForStory.displayName = 'OptionForStory';
|
|
27
|
-
export { OptionForStory };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
.container-oHBM6w {
|
|
2
|
-
align-items: center;
|
|
3
|
-
column-gap: 12px;
|
|
4
|
-
height: 36px;
|
|
5
|
-
padding-inline: 12px;
|
|
6
|
-
display: flex;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.avatar-HqQ2Lj {
|
|
10
|
-
background-color: var(--light-grey-300, #d3d8ddb3);
|
|
11
|
-
border-radius: 100%;
|
|
12
|
-
width: 24px;
|
|
13
|
-
height: 24px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.info-htRmbC {
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
row-gap: 2px;
|
|
19
|
-
display: flex;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.label-klpfkQ {
|
|
23
|
-
line-height: 14px;
|
|
24
|
-
}
|
|
25
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { OptionForStory } from './OptionForStory';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { OptionForStory } from "./OptionForStory.js";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type FC } from 'react';
|
|
2
|
-
import { type IHasTestId } from '../../../../common/types';
|
|
3
|
-
import { type TextfieldSizeValue } from '../../types';
|
|
4
|
-
interface Props extends IHasTestId {
|
|
5
|
-
label?: string;
|
|
6
|
-
required?: boolean;
|
|
7
|
-
htmlFor: string;
|
|
8
|
-
size?: TextfieldSizeValue;
|
|
9
|
-
}
|
|
10
|
-
export declare const Label: FC<Props>;
|
|
11
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { memo } from "react";
|
|
3
|
-
import { Text, TextTag, TextVariant } from "../../../Text/Text.js";
|
|
4
|
-
import { TextAtom } from "../../../Text/Text.atom.js";
|
|
5
|
-
import { useIsElementOverflowing } from "../../../../hooks/useIsElementOverflowing/index.js";
|
|
6
|
-
import { TextfieldSize } from "../../types/index.js";
|
|
7
|
-
import { isSizeM } from "../../utils/index.js";
|
|
8
|
-
import Label_module from "./Label.module.js";
|
|
9
|
-
const Label = /*#__PURE__*/ memo(({ label, htmlFor, required, testId, size = TextfieldSize.M })=>{
|
|
10
|
-
const { ref: labelRef, isOverflowing: isOverflowingLabel } = useIsElementOverflowing([
|
|
11
|
-
label
|
|
12
|
-
]);
|
|
13
|
-
const isM = isSizeM(size);
|
|
14
|
-
const TextComponent = isM ? Text.Body : Text.BodyL;
|
|
15
|
-
return /*#__PURE__*/ jsxs("span", {
|
|
16
|
-
className: Label_module.wrapper,
|
|
17
|
-
children: [
|
|
18
|
-
/*#__PURE__*/ jsx(TextComponent, {
|
|
19
|
-
ref: labelRef,
|
|
20
|
-
title: isOverflowingLabel ? label : void 0,
|
|
21
|
-
className: Label_module.label,
|
|
22
|
-
as: TextTag.label,
|
|
23
|
-
htmlFor: htmlFor,
|
|
24
|
-
"data-test-id": testId ? `${testId}-label` : '',
|
|
25
|
-
children: label
|
|
26
|
-
}),
|
|
27
|
-
required && /*#__PURE__*/ jsx(TextAtom, {
|
|
28
|
-
"data-test-id": testId ? `${testId}-required` : void 0,
|
|
29
|
-
as: TextTag.span,
|
|
30
|
-
variant: isM ? TextVariant.body : TextVariant.bodyL,
|
|
31
|
-
className: Label_module.required,
|
|
32
|
-
children: "*"
|
|
33
|
-
})
|
|
34
|
-
]
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
Label.displayName = 'Label';
|
|
38
|
-
export { Label };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
.wrapper-AIuYry {
|
|
2
|
-
display: flex;
|
|
3
|
-
position: relative;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.label-eGkW_Q {
|
|
7
|
-
text-overflow: ellipsis;
|
|
8
|
-
white-space: nowrap;
|
|
9
|
-
margin-bottom: 0;
|
|
10
|
-
display: inline-block;
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.required-mCIeFq {
|
|
15
|
-
color: var(--elements-critical);
|
|
16
|
-
}
|
|
17
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Label } from './Label';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Label } from "./Label.js";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|