@synerise/ds-mocks 0.1.16 → 0.2.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/CHANGELOG.md +6 -0
- package/README.md +187 -332
- package/dist/ActionArea/index.d.ts +1 -0
- package/dist/ActionArea/index.js +5 -0
- package/dist/ActionArea/jest.js +21 -0
- package/dist/ActionArea/vi.d.ts +10 -0
- package/dist/ActionArea/vi.js +15 -0
- package/dist/Alert/index.d.ts +1 -0
- package/dist/Alert/index.js +5 -0
- package/dist/Alert/jest.js +81 -0
- package/dist/Alert/vi.d.ts +42 -0
- package/dist/Alert/vi.js +75 -0
- package/dist/AppMenu/index.d.ts +1 -0
- package/dist/AppMenu/index.js +5 -0
- package/dist/AppMenu/jest.js +51 -0
- package/dist/AppMenu/vi.d.ts +29 -0
- package/dist/AppMenu/vi.js +45 -0
- package/dist/Autocomplete/index.d.ts +1 -0
- package/dist/Autocomplete/index.js +5 -0
- package/dist/Autocomplete/jest.js +27 -0
- package/dist/Autocomplete/vi.d.ts +25 -0
- package/dist/Autocomplete/vi.js +21 -0
- package/dist/Avatar/index.d.ts +1 -0
- package/dist/Avatar/index.js +5 -0
- package/dist/Avatar/jest.js +55 -0
- package/dist/Avatar/vi.d.ts +43 -0
- package/dist/Avatar/vi.js +49 -0
- package/dist/AvatarGroup/index.d.ts +1 -0
- package/dist/AvatarGroup/index.js +5 -0
- package/dist/AvatarGroup/jest.js +22 -0
- package/dist/AvatarGroup/vi.d.ts +10 -0
- package/dist/AvatarGroup/vi.js +16 -0
- package/dist/Badge/index.d.ts +1 -0
- package/dist/Badge/index.js +5 -0
- package/dist/Badge/jest.js +23 -0
- package/dist/Badge/vi.d.ts +10 -0
- package/dist/Badge/vi.js +17 -0
- package/dist/Banner/index.d.ts +1 -0
- package/dist/Banner/index.js +5 -0
- package/dist/Banner/jest.js +27 -0
- package/dist/Banner/vi.d.ts +10 -0
- package/dist/Banner/vi.js +21 -0
- package/dist/BroadcastBar/index.d.ts +1 -0
- package/dist/BroadcastBar/index.js +5 -0
- package/dist/BroadcastBar/jest.js +22 -0
- package/dist/BroadcastBar/vi.d.ts +10 -0
- package/dist/BroadcastBar/vi.js +16 -0
- package/dist/ButtonGroup/index.d.ts +1 -0
- package/dist/ButtonGroup/index.js +5 -0
- package/dist/ButtonGroup/jest.js +25 -0
- package/dist/ButtonGroup/vi.d.ts +27 -0
- package/dist/ButtonGroup/vi.js +19 -0
- package/dist/Card/index.d.ts +1 -0
- package/dist/Card/index.js +5 -0
- package/dist/Card/jest.js +55 -0
- package/dist/Card/vi.d.ts +33 -0
- package/dist/Card/vi.js +49 -0
- package/dist/CardSelect/index.d.ts +1 -0
- package/dist/CardSelect/index.js +5 -0
- package/dist/CardSelect/jest.js +51 -0
- package/dist/CardSelect/vi.d.ts +27 -0
- package/dist/CardSelect/vi.js +45 -0
- package/dist/CardTabs/index.d.ts +1 -0
- package/dist/CardTabs/index.js +5 -0
- package/dist/CardTabs/jest.js +34 -0
- package/dist/CardTabs/vi.d.ts +33 -0
- package/dist/CardTabs/vi.js +28 -0
- package/dist/Cascader/index.d.ts +1 -0
- package/dist/Cascader/index.js +4 -0
- package/dist/Cascader/jest.js +21 -0
- package/dist/Cascader/vi.d.ts +15 -0
- package/dist/Cascader/vi.js +18 -0
- package/dist/Checkbox/index.d.ts +1 -0
- package/dist/Checkbox/index.js +5 -0
- package/dist/Checkbox/jest.js +78 -0
- package/dist/Checkbox/vi.d.ts +31 -0
- package/dist/Checkbox/vi.js +72 -0
- package/dist/CodeArea/index.d.ts +1 -0
- package/dist/CodeArea/index.js +5 -0
- package/dist/CodeArea/jest.js +42 -0
- package/dist/CodeArea/vi.d.ts +26 -0
- package/dist/CodeArea/vi.js +36 -0
- package/dist/CodeSnippet/index.d.ts +1 -0
- package/dist/CodeSnippet/index.js +6 -0
- package/dist/CodeSnippet/jest.js +30 -0
- package/dist/CodeSnippet/vi.d.ts +25 -0
- package/dist/CodeSnippet/vi.js +24 -0
- package/dist/Collector/index.d.ts +1 -0
- package/dist/Collector/index.js +4 -0
- package/dist/Collector/jest.js +38 -0
- package/dist/Collector/vi.d.ts +14 -0
- package/dist/Collector/vi.js +35 -0
- package/dist/ColorPicker/index.d.ts +1 -0
- package/dist/ColorPicker/index.js +5 -0
- package/dist/ColorPicker/jest.js +22 -0
- package/dist/ColorPicker/vi.d.ts +10 -0
- package/dist/ColorPicker/vi.js +16 -0
- package/dist/ColumnManager/index.d.ts +1 -0
- package/dist/ColumnManager/index.js +5 -0
- package/dist/ColumnManager/jest.js +35 -0
- package/dist/ColumnManager/vi.d.ts +25 -0
- package/dist/ColumnManager/vi.js +29 -0
- package/dist/CompletedWithin/index.d.ts +1 -0
- package/dist/CompletedWithin/index.js +5 -0
- package/dist/CompletedWithin/jest.js +20 -0
- package/dist/CompletedWithin/vi.d.ts +12 -0
- package/dist/CompletedWithin/vi.js +14 -0
- package/dist/Condition/index.d.ts +1 -0
- package/dist/Condition/index.js +5 -0
- package/dist/Condition/jest.js +21 -0
- package/dist/Condition/vi.d.ts +10 -0
- package/dist/Condition/vi.js +15 -0
- package/dist/Confirmation/index.d.ts +1 -0
- package/dist/Confirmation/index.js +5 -0
- package/dist/Confirmation/jest.js +60 -0
- package/dist/Confirmation/vi.d.ts +27 -0
- package/dist/Confirmation/vi.js +54 -0
- package/dist/ContextSelector/index.d.ts +1 -0
- package/dist/ContextSelector/index.js +5 -0
- package/dist/ContextSelector/jest.js +23 -0
- package/dist/ContextSelector/vi.d.ts +25 -0
- package/dist/ContextSelector/vi.js +17 -0
- package/dist/CopyIcon/index.d.ts +1 -0
- package/dist/CopyIcon/index.js +5 -0
- package/dist/CopyIcon/jest.js +22 -0
- package/dist/CopyIcon/vi.d.ts +10 -0
- package/dist/CopyIcon/vi.js +16 -0
- package/dist/DatePicker/index.d.ts +1 -0
- package/dist/DatePicker/index.js +5 -0
- package/dist/DatePicker/jest.js +54 -0
- package/dist/DatePicker/vi.d.ts +36 -0
- package/dist/DatePicker/vi.js +48 -0
- package/dist/DateRangePicker/index.d.ts +1 -0
- package/dist/DateRangePicker/index.js +5 -0
- package/dist/DateRangePicker/jest.js +58 -0
- package/dist/DateRangePicker/vi.d.ts +42 -0
- package/dist/DateRangePicker/vi.js +52 -0
- package/dist/Description/index.d.ts +1 -0
- package/dist/Description/index.js +5 -0
- package/dist/Description/jest.js +42 -0
- package/dist/Description/vi.d.ts +29 -0
- package/dist/Description/vi.js +36 -0
- package/dist/Divider/index.d.ts +1 -0
- package/dist/Divider/index.js +5 -0
- package/dist/Divider/jest.js +21 -0
- package/dist/Divider/vi.d.ts +6 -0
- package/dist/Divider/vi.js +15 -0
- package/dist/Drawer/index.d.ts +1 -0
- package/dist/Drawer/index.js +5 -0
- package/dist/Drawer/jest.js +86 -0
- package/dist/Drawer/vi.d.ts +25 -0
- package/dist/Drawer/vi.js +80 -0
- package/dist/EditableItemsList/index.d.ts +1 -0
- package/dist/EditableItemsList/index.js +5 -0
- package/dist/EditableItemsList/jest.js +21 -0
- package/dist/EditableItemsList/vi.d.ts +10 -0
- package/dist/EditableItemsList/vi.js +15 -0
- package/dist/EmojiPicker/index.d.ts +1 -0
- package/dist/EmojiPicker/index.js +5 -0
- package/dist/EmojiPicker/jest.js +27 -0
- package/dist/EmojiPicker/vi.d.ts +12 -0
- package/dist/EmojiPicker/vi.js +21 -0
- package/dist/EmptyStates/index.d.ts +1 -0
- package/dist/EmptyStates/index.js +5 -0
- package/dist/EmptyStates/jest.js +34 -0
- package/dist/EmptyStates/vi.d.ts +6 -0
- package/dist/EmptyStates/vi.js +28 -0
- package/dist/Estimation/index.d.ts +1 -0
- package/dist/Estimation/index.js +5 -0
- package/dist/Estimation/jest.js +21 -0
- package/dist/Estimation/vi.d.ts +10 -0
- package/dist/Estimation/vi.js +15 -0
- package/dist/Factors/index.d.ts +1 -0
- package/dist/Factors/index.js +5 -0
- package/dist/Factors/jest.js +25 -0
- package/dist/Factors/vi.d.ts +18 -0
- package/dist/Factors/vi.js +19 -0
- package/dist/FieldSet/index.d.ts +1 -0
- package/dist/FieldSet/index.js +5 -0
- package/dist/FieldSet/jest.js +23 -0
- package/dist/FieldSet/vi.d.ts +10 -0
- package/dist/FieldSet/vi.js +17 -0
- package/dist/FileUploader/index.d.ts +1 -0
- package/dist/FileUploader/index.js +5 -0
- package/dist/FileUploader/jest.js +54 -0
- package/dist/FileUploader/vi.d.ts +31 -0
- package/dist/FileUploader/vi.js +48 -0
- package/dist/Filter/index.d.ts +1 -0
- package/dist/Filter/index.js +5 -0
- package/dist/Filter/jest.js +21 -0
- package/dist/Filter/vi.d.ts +12 -0
- package/dist/Filter/vi.js +15 -0
- package/dist/Flag/index.d.ts +1 -0
- package/dist/Flag/index.js +5 -0
- package/dist/Flag/jest.js +23 -0
- package/dist/Flag/vi.d.ts +12 -0
- package/dist/Flag/vi.js +17 -0
- package/dist/FlexBox/index.d.ts +1 -0
- package/dist/FlexBox/index.js +5 -0
- package/dist/FlexBox/jest.js +38 -0
- package/dist/FlexBox/vi.d.ts +5 -0
- package/dist/FlexBox/vi.js +35 -0
- package/dist/Footer/index.d.ts +1 -0
- package/dist/Footer/index.js +5 -0
- package/dist/Footer/jest.js +21 -0
- package/dist/Footer/vi.d.ts +10 -0
- package/dist/Footer/vi.js +15 -0
- package/dist/FormField/index.d.ts +1 -0
- package/dist/FormField/index.js +5 -0
- package/dist/FormField/jest.js +57 -0
- package/dist/FormField/vi.d.ts +32 -0
- package/dist/FormField/vi.js +51 -0
- package/dist/FormatPicker/index.d.ts +1 -0
- package/dist/FormatPicker/index.js +5 -0
- package/dist/FormatPicker/jest.js +23 -0
- package/dist/FormatPicker/vi.d.ts +10 -0
- package/dist/FormatPicker/vi.js +17 -0
- package/dist/Grid/index.d.ts +1 -0
- package/dist/Grid/index.js +5 -0
- package/dist/Grid/jest.js +40 -0
- package/dist/Grid/vi.d.ts +25 -0
- package/dist/Grid/vi.js +34 -0
- package/dist/IconPicker/index.d.ts +1 -0
- package/dist/IconPicker/index.js +5 -0
- package/dist/IconPicker/jest.js +23 -0
- package/dist/IconPicker/vi.d.ts +10 -0
- package/dist/IconPicker/vi.js +17 -0
- package/dist/InformationCard/index.d.ts +1 -0
- package/dist/InformationCard/index.js +5 -0
- package/dist/InformationCard/jest.js +45 -0
- package/dist/InformationCard/vi.d.ts +36 -0
- package/dist/InformationCard/vi.js +39 -0
- package/dist/InlineAlert/index.d.ts +1 -0
- package/dist/InlineAlert/index.js +5 -0
- package/dist/InlineAlert/jest.js +26 -0
- package/dist/InlineAlert/vi.d.ts +10 -0
- package/dist/InlineAlert/vi.js +20 -0
- package/dist/InlineEdit/index.d.ts +1 -0
- package/dist/InlineEdit/index.js +5 -0
- package/dist/InlineEdit/jest.js +41 -0
- package/dist/InlineEdit/vi.d.ts +27 -0
- package/dist/InlineEdit/vi.js +35 -0
- package/dist/InputNumber/index.d.ts +1 -0
- package/dist/InputNumber/index.js +5 -0
- package/dist/InputNumber/jest.js +27 -0
- package/dist/InputNumber/vi.d.ts +10 -0
- package/dist/InputNumber/vi.js +21 -0
- package/dist/Insight/index.d.ts +1 -0
- package/dist/Insight/index.js +5 -0
- package/dist/Insight/jest.js +21 -0
- package/dist/Insight/vi.d.ts +10 -0
- package/dist/Insight/vi.js +15 -0
- package/dist/ItemFilter/index.d.ts +1 -0
- package/dist/ItemFilter/index.js +5 -0
- package/dist/ItemFilter/jest.js +21 -0
- package/dist/ItemFilter/vi.d.ts +12 -0
- package/dist/ItemFilter/vi.js +15 -0
- package/dist/ItemPicker/index.d.ts +1 -0
- package/dist/ItemPicker/index.js +4 -0
- package/dist/ItemPicker/jest.js +37 -0
- package/dist/ItemPicker/vi.d.ts +20 -0
- package/dist/ItemPicker/vi.js +34 -0
- package/dist/ItemsRoll/index.d.ts +1 -0
- package/dist/ItemsRoll/index.js +5 -0
- package/dist/ItemsRoll/jest.js +21 -0
- package/dist/ItemsRoll/vi.d.ts +10 -0
- package/dist/ItemsRoll/vi.js +15 -0
- package/dist/Layout/index.d.ts +1 -0
- package/dist/Layout/index.js +5 -0
- package/dist/Layout/jest.js +27 -0
- package/dist/Layout/vi.d.ts +27 -0
- package/dist/Layout/vi.js +21 -0
- package/dist/List/index.d.ts +1 -0
- package/dist/List/index.js +5 -0
- package/dist/List/jest.js +61 -0
- package/dist/List/vi.d.ts +25 -0
- package/dist/List/vi.js +55 -0
- package/dist/ListItem/index.d.ts +1 -0
- package/dist/ListItem/index.js +5 -0
- package/dist/ListItem/jest.js +46 -0
- package/dist/ListItem/vi.d.ts +36 -0
- package/dist/ListItem/vi.js +40 -0
- package/dist/Loader/index.d.ts +1 -0
- package/dist/Loader/index.js +5 -0
- package/dist/Loader/jest.js +22 -0
- package/dist/Loader/vi.d.ts +10 -0
- package/dist/Loader/vi.js +16 -0
- package/dist/Logic/index.d.ts +1 -0
- package/dist/Logic/index.js +5 -0
- package/dist/Logic/jest.js +46 -0
- package/dist/Logic/vi.d.ts +29 -0
- package/dist/Logic/vi.js +40 -0
- package/dist/ManageableList/index.d.ts +1 -0
- package/dist/ManageableList/index.js +5 -0
- package/dist/ManageableList/jest.js +72 -0
- package/dist/ManageableList/vi.d.ts +33 -0
- package/dist/ManageableList/vi.js +66 -0
- package/dist/Mapping/index.d.ts +1 -0
- package/dist/Mapping/index.js +5 -0
- package/dist/Mapping/jest.js +21 -0
- package/dist/Mapping/vi.d.ts +12 -0
- package/dist/Mapping/vi.js +15 -0
- package/dist/Menu/index.d.ts +1 -0
- package/dist/Menu/index.js +5 -0
- package/dist/Menu/jest.js +94 -0
- package/dist/Menu/vi.d.ts +33 -0
- package/dist/Menu/vi.js +88 -0
- package/dist/MetricCard/index.d.ts +1 -0
- package/dist/MetricCard/index.js +5 -0
- package/dist/MetricCard/jest.js +23 -0
- package/dist/MetricCard/vi.d.ts +10 -0
- package/dist/MetricCard/vi.js +17 -0
- package/dist/Navbar/index.d.ts +1 -0
- package/dist/Navbar/index.js +5 -0
- package/dist/Navbar/jest.js +41 -0
- package/dist/Navbar/vi.d.ts +25 -0
- package/dist/Navbar/vi.js +35 -0
- package/dist/Operators/index.d.ts +1 -0
- package/dist/Operators/index.js +5 -0
- package/dist/Operators/jest.js +21 -0
- package/dist/Operators/vi.d.ts +15 -0
- package/dist/Operators/vi.js +15 -0
- package/dist/OrderedList/index.d.ts +1 -0
- package/dist/OrderedList/index.js +5 -0
- package/dist/OrderedList/jest.js +25 -0
- package/dist/OrderedList/vi.d.ts +10 -0
- package/dist/OrderedList/vi.js +19 -0
- package/dist/PageHeader/index.d.ts +1 -0
- package/dist/PageHeader/index.js +5 -0
- package/dist/PageHeader/jest.js +34 -0
- package/dist/PageHeader/vi.d.ts +6 -0
- package/dist/PageHeader/vi.js +28 -0
- package/dist/Pagination/index.d.ts +1 -0
- package/dist/Pagination/index.js +5 -0
- package/dist/Pagination/jest.js +28 -0
- package/dist/Pagination/vi.d.ts +10 -0
- package/dist/Pagination/vi.js +22 -0
- package/dist/Panel/index.d.ts +1 -0
- package/dist/Panel/index.js +5 -0
- package/dist/Panel/jest.js +21 -0
- package/dist/Panel/vi.d.ts +10 -0
- package/dist/Panel/vi.js +15 -0
- package/dist/PanelsResizer/index.d.ts +1 -0
- package/dist/PanelsResizer/index.js +5 -0
- package/dist/PanelsResizer/jest.js +21 -0
- package/dist/PanelsResizer/vi.d.ts +10 -0
- package/dist/PanelsResizer/vi.js +15 -0
- package/dist/Popconfirm/index.d.ts +1 -0
- package/dist/Popconfirm/index.js +5 -0
- package/dist/Popconfirm/jest.js +55 -0
- package/dist/Popconfirm/vi.d.ts +8 -0
- package/dist/Popconfirm/vi.js +49 -0
- package/dist/Popover/index.d.ts +1 -0
- package/dist/Popover/index.js +5 -0
- package/dist/Popover/jest.js +61 -0
- package/dist/Popover/vi.d.ts +28 -0
- package/dist/Popover/vi.js +55 -0
- package/dist/ProgressBar/index.d.ts +1 -0
- package/dist/ProgressBar/index.js +5 -0
- package/dist/ProgressBar/jest.js +62 -0
- package/dist/ProgressBar/vi.d.ts +20 -0
- package/dist/ProgressBar/vi.js +56 -0
- package/dist/Radio/index.d.ts +1 -0
- package/dist/Radio/index.js +5 -0
- package/dist/Radio/jest.js +77 -0
- package/dist/Radio/vi.d.ts +25 -0
- package/dist/Radio/vi.js +71 -0
- package/dist/Result/index.d.ts +1 -0
- package/dist/Result/index.js +5 -0
- package/dist/Result/jest.js +33 -0
- package/dist/Result/vi.d.ts +6 -0
- package/dist/Result/vi.js +27 -0
- package/dist/Search/index.d.ts +1 -0
- package/dist/Search/index.js +5 -0
- package/dist/Search/jest.js +85 -0
- package/dist/Search/vi.d.ts +37 -0
- package/dist/Search/vi.js +79 -0
- package/dist/SearchBar/index.d.ts +1 -0
- package/dist/SearchBar/index.js +5 -0
- package/dist/SearchBar/jest.js +30 -0
- package/dist/SearchBar/vi.d.ts +16 -0
- package/dist/SearchBar/vi.js +24 -0
- package/dist/SectionMessage/index.d.ts +1 -0
- package/dist/SectionMessage/index.js +5 -0
- package/dist/SectionMessage/jest.js +23 -0
- package/dist/SectionMessage/vi.d.ts +10 -0
- package/dist/SectionMessage/vi.js +17 -0
- package/dist/ShortCuts/index.d.ts +1 -0
- package/dist/ShortCuts/index.js +5 -0
- package/dist/ShortCuts/jest.js +21 -0
- package/dist/ShortCuts/vi.d.ts +10 -0
- package/dist/ShortCuts/vi.js +15 -0
- package/dist/Sidebar/index.d.ts +1 -0
- package/dist/Sidebar/index.js +4 -0
- package/dist/Sidebar/jest.js +29 -0
- package/dist/Sidebar/vi.d.ts +15 -0
- package/dist/Sidebar/vi.js +26 -0
- package/dist/SidebarObject/index.d.ts +1 -0
- package/dist/SidebarObject/index.js +5 -0
- package/dist/SidebarObject/jest.js +21 -0
- package/dist/SidebarObject/vi.d.ts +10 -0
- package/dist/SidebarObject/vi.js +15 -0
- package/dist/Skeleton/index.d.ts +1 -0
- package/dist/Skeleton/index.js +5 -0
- package/dist/Skeleton/jest.js +41 -0
- package/dist/Skeleton/vi.d.ts +14 -0
- package/dist/Skeleton/vi.js +35 -0
- package/dist/Slider/index.d.ts +1 -0
- package/dist/Slider/index.js +5 -0
- package/dist/Slider/jest.js +36 -0
- package/dist/Slider/vi.d.ts +25 -0
- package/dist/Slider/vi.js +30 -0
- package/dist/Sortable/index.d.ts +1 -0
- package/dist/Sortable/index.js +5 -0
- package/dist/Sortable/jest.js +49 -0
- package/dist/Sortable/vi.d.ts +22 -0
- package/dist/Sortable/vi.js +43 -0
- package/dist/Status/index.d.ts +1 -0
- package/dist/Status/index.js +5 -0
- package/dist/Status/jest.js +23 -0
- package/dist/Status/vi.d.ts +10 -0
- package/dist/Status/vi.js +17 -0
- package/dist/StepCard/index.d.ts +1 -0
- package/dist/StepCard/index.js +5 -0
- package/dist/StepCard/jest.js +25 -0
- package/dist/StepCard/vi.d.ts +10 -0
- package/dist/StepCard/vi.js +19 -0
- package/dist/Stepper/index.d.ts +1 -0
- package/dist/Stepper/index.js +5 -0
- package/dist/Stepper/jest.js +51 -0
- package/dist/Stepper/vi.d.ts +25 -0
- package/dist/Stepper/vi.js +45 -0
- package/dist/Subject/index.d.ts +1 -0
- package/dist/Subject/index.js +5 -0
- package/dist/Subject/jest.js +24 -0
- package/dist/Subject/vi.d.ts +10 -0
- package/dist/Subject/vi.js +18 -0
- package/dist/SubtleForm/index.d.ts +1 -0
- package/dist/SubtleForm/index.js +4 -0
- package/dist/SubtleForm/jest.js +35 -0
- package/dist/SubtleForm/vi.d.ts +14 -0
- package/dist/SubtleForm/vi.js +32 -0
- package/dist/Switch/index.d.ts +1 -0
- package/dist/Switch/index.js +5 -0
- package/dist/Switch/jest.js +37 -0
- package/dist/Switch/vi.d.ts +12 -0
- package/dist/Switch/vi.js +31 -0
- package/dist/TableNew/index.d.ts +1 -0
- package/dist/TableNew/index.js +5 -0
- package/dist/TableNew/jest.js +29 -0
- package/dist/TableNew/vi.d.ts +18 -0
- package/dist/TableNew/vi.js +23 -0
- package/dist/Tag/index.d.ts +1 -0
- package/dist/Tag/index.js +5 -0
- package/dist/Tag/jest.js +52 -0
- package/dist/Tag/vi.d.ts +28 -0
- package/dist/Tag/vi.js +46 -0
- package/dist/Tags/index.d.ts +1 -0
- package/dist/Tags/index.js +5 -0
- package/dist/Tags/jest.js +59 -0
- package/dist/Tags/vi.d.ts +37 -0
- package/dist/Tags/vi.js +53 -0
- package/dist/TimePicker/index.d.ts +1 -0
- package/dist/TimePicker/index.js +5 -0
- package/dist/TimePicker/jest.js +30 -0
- package/dist/TimePicker/vi.d.ts +24 -0
- package/dist/TimePicker/vi.js +24 -0
- package/dist/Toast/index.d.ts +1 -0
- package/dist/Toast/index.js +5 -0
- package/dist/Toast/jest.js +66 -0
- package/dist/Toast/vi.d.ts +35 -0
- package/dist/Toast/vi.js +60 -0
- package/dist/Toolbar/index.d.ts +1 -0
- package/dist/Toolbar/index.js +5 -0
- package/dist/Toolbar/jest.js +45 -0
- package/dist/Toolbar/vi.d.ts +33 -0
- package/dist/Toolbar/vi.js +39 -0
- package/dist/Tray/index.d.ts +1 -0
- package/dist/Tray/index.js +5 -0
- package/dist/Tray/jest.js +52 -0
- package/dist/Tray/vi.d.ts +29 -0
- package/dist/Tray/vi.js +46 -0
- package/dist/Typography/index.d.ts +1 -0
- package/dist/Typography/index.js +5 -0
- package/dist/Typography/jest.js +65 -0
- package/dist/Typography/vi.d.ts +20 -0
- package/dist/Typography/vi.js +59 -0
- package/dist/UnorderedList/index.d.ts +1 -0
- package/dist/UnorderedList/index.js +5 -0
- package/dist/UnorderedList/jest.js +25 -0
- package/dist/UnorderedList/vi.d.ts +10 -0
- package/dist/UnorderedList/vi.js +19 -0
- package/dist/Wizard/index.d.ts +1 -0
- package/dist/Wizard/index.js +5 -0
- package/dist/Wizard/jest.js +58 -0
- package/dist/Wizard/vi.d.ts +25 -0
- package/dist/Wizard/vi.js +52 -0
- package/dist/index.d.ts +99 -0
- package/dist/index.js +294 -1
- package/dist/jest.js +294 -1
- package/package.json +39 -39
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.2.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-mocks@0.1.16...@synerise/ds-mocks@0.2.0) (2026-04-14)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **mocks:** add vitest and jest mocks for all 99 DS components ([792e6ed](https://github.com/Synerise/synerise-design/commit/792e6ed1c778cc3f7a231c379650d8e7dbaa6662))
|
|
11
|
+
|
|
6
12
|
## [0.1.16](https://github.com/Synerise/synerise-design/compare/@synerise/ds-mocks@0.1.15...@synerise/ds-mocks@0.1.16) (2026-04-10)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @synerise/ds-mocks
|
package/README.md
CHANGED
|
@@ -5,23 +5,15 @@ title: Mocks
|
|
|
5
5
|
|
|
6
6
|
# @synerise/ds-mocks
|
|
7
7
|
|
|
8
|
-
Testing utilities and mock components for Synerise Design System.
|
|
8
|
+
Testing utilities and mock components for the Synerise Design System. Provides standardized Vitest and Jest mocks for all `@synerise/ds-*` component packages.
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
|
|
14
|
-
# or
|
|
15
|
-
yarn add @synerise/ds-mocks
|
|
16
|
-
# or
|
|
17
|
-
pnpm add @synerise/ds-mocks
|
|
13
|
+
pnpm add -D @synerise/ds-mocks
|
|
18
14
|
```
|
|
19
15
|
|
|
20
|
-
## Vitest
|
|
21
|
-
|
|
22
|
-
This package provides ready-to-use mocks for Synerise DS components in Vitest tests.
|
|
23
|
-
|
|
24
|
-
### Usage
|
|
16
|
+
## Vitest Usage
|
|
25
17
|
|
|
26
18
|
Use factory functions with `vi.mock()` and dynamic import to avoid hoisting issues:
|
|
27
19
|
|
|
@@ -36,391 +28,254 @@ vi.mock('@synerise/ds-modal', async () => {
|
|
|
36
28
|
return { ...modalMockFactory() };
|
|
37
29
|
});
|
|
38
30
|
|
|
39
|
-
vi.mock('@synerise/ds-icon', async () => {
|
|
40
|
-
const { iconMockFactory } = await import('@synerise/ds-mocks');
|
|
41
|
-
return { ...iconMockFactory() };
|
|
42
|
-
});
|
|
43
|
-
|
|
44
31
|
describe('MyComponent', () => {
|
|
45
|
-
it('renders button
|
|
32
|
+
it('renders button', () => {
|
|
46
33
|
render(<MyComponent />);
|
|
47
|
-
|
|
48
|
-
// Default testid
|
|
49
34
|
expect(screen.getByTestId('ds-button')).toBeInTheDocument();
|
|
50
|
-
|
|
51
|
-
// Or custom testid if passed via props
|
|
52
|
-
expect(screen.getByTestId('submit-button')).toBeInTheDocument();
|
|
53
35
|
});
|
|
54
36
|
|
|
55
37
|
it('opens modal on click', () => {
|
|
56
38
|
render(<MyComponent />);
|
|
57
|
-
|
|
58
39
|
fireEvent.click(screen.getByTestId('ds-button'));
|
|
59
|
-
|
|
60
40
|
expect(screen.getByTestId('ds-modal')).toBeInTheDocument();
|
|
61
41
|
expect(screen.getByTestId('ds-modal-title')).toHaveTextContent('My Modal');
|
|
62
42
|
});
|
|
63
43
|
});
|
|
64
44
|
```
|
|
65
45
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
| Component | Factory Functions |
|
|
69
|
-
| --------- | ------------------------------------------------------------------------ |
|
|
70
|
-
| Button | `buttonMockFactory`, `buttonMinimalMockFactory` |
|
|
71
|
-
| Cruds | `crudsMockFactory`, `crudsMinimalMockFactory` |
|
|
72
|
-
| Dropdown | `dropdownMockFactory`, `dropdownMinimalMockFactory` |
|
|
73
|
-
| Form | `formMockFactory`, `formMinimalMockFactory` |
|
|
74
|
-
| Icon | `iconMockFactory`, `iconMinimalMockFactory`, `iconWithRenderMockFactory` |
|
|
75
|
-
| Input | `inputMockFactory`, `inputMinimalMockFactory` |
|
|
76
|
-
| Modal | `modalMockFactory`, `modalMinimalMockFactory` |
|
|
77
|
-
| Select | `selectMockFactory`, `selectMinimalMockFactory` |
|
|
78
|
-
| Table | `tableMockFactory`, `tableMinimalMockFactory` |
|
|
79
|
-
| Tabs | `tabsMockFactory`, `tabsMinimalMockFactory` |
|
|
80
|
-
| Tooltip | `tooltipMockFactory`, `tooltipMinimalMockFactory` |
|
|
81
|
-
|
|
82
|
-
### Mock Variants
|
|
46
|
+
## Jest Usage
|
|
83
47
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
#### Standard Mock Factory
|
|
48
|
+
```typescript
|
|
49
|
+
import { jest as dsMocks } from '@synerise/ds-mocks';
|
|
87
50
|
|
|
88
|
-
|
|
51
|
+
describe('MyComponent', () => {
|
|
52
|
+
dsMocks.mockButton();
|
|
53
|
+
dsMocks.mockModal();
|
|
89
54
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
55
|
+
it('renders button', () => {
|
|
56
|
+
render(<MyComponent />);
|
|
57
|
+
expect(screen.getByTestId('ds-button')).toBeInTheDocument();
|
|
58
|
+
});
|
|
94
59
|
});
|
|
95
|
-
|
|
96
|
-
// Renders actual button element with:
|
|
97
|
-
// - data-testid (default: 'ds-button' or custom)
|
|
98
|
-
// - data-type, data-mode, data-loading attributes
|
|
99
|
-
// - onClick handler
|
|
100
|
-
// - disabled state
|
|
101
60
|
```
|
|
102
61
|
|
|
103
|
-
|
|
62
|
+
## Mock Variants
|
|
63
|
+
|
|
64
|
+
Each component provides two factory variants:
|
|
65
|
+
|
|
66
|
+
| Variant | Description | Use case |
|
|
67
|
+
|---------|------------|----------|
|
|
68
|
+
| `{component}MockFactory` | Full mock with props, data-testid, sub-components | Most tests |
|
|
69
|
+
| `{component}MinimalMockFactory` | Returns `null` | When you need the component out of the way |
|
|
104
70
|
|
|
105
|
-
|
|
71
|
+
### Minimal Mock Example
|
|
106
72
|
|
|
107
73
|
```typescript
|
|
108
|
-
vi.mock('@synerise/ds-
|
|
109
|
-
const {
|
|
110
|
-
return { ...
|
|
74
|
+
vi.mock('@synerise/ds-tooltip', async () => {
|
|
75
|
+
const { tooltipMinimalMockFactory } = await import('@synerise/ds-mocks');
|
|
76
|
+
return { ...tooltipMinimalMockFactory() };
|
|
111
77
|
});
|
|
112
|
-
|
|
113
|
-
// Component renders nothing
|
|
78
|
+
// Tooltip renders nothing — useful when testing content without wrapper noise
|
|
114
79
|
```
|
|
115
80
|
|
|
116
|
-
|
|
81
|
+
## Custom data-testid
|
|
117
82
|
|
|
118
|
-
All mocks
|
|
83
|
+
All mocks accept `data-testid` via props. If the component under test passes a custom `data-testid`, the mock will use it; otherwise it falls back to the default `ds-{component}` pattern:
|
|
119
84
|
|
|
120
85
|
```tsx
|
|
121
|
-
//
|
|
86
|
+
// Component passes custom testid:
|
|
122
87
|
<Button data-testid="submit-btn">Submit</Button>
|
|
123
|
-
<Modal data-testid="confirm-modal" open>...</Modal>
|
|
124
|
-
<Icon data-testid="close-icon" icon="CloseM" />
|
|
125
88
|
|
|
126
|
-
//
|
|
89
|
+
// Test queries by custom testid:
|
|
127
90
|
screen.getByTestId('submit-btn')
|
|
128
|
-
screen.getByTestId('confirm-modal')
|
|
129
|
-
screen.getByTestId('close-icon')
|
|
130
91
|
```
|
|
131
92
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
- `
|
|
139
|
-
- `
|
|
140
|
-
- `
|
|
141
|
-
- `
|
|
142
|
-
- `
|
|
143
|
-
- `
|
|
144
|
-
- `
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
- `
|
|
151
|
-
- `
|
|
152
|
-
- `
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
- `
|
|
160
|
-
- `
|
|
161
|
-
- `
|
|
93
|
+
## Available Mocks (111 components)
|
|
94
|
+
|
|
95
|
+
### Simple Components
|
|
96
|
+
|
|
97
|
+
| Component | Package | Factory | Default test ID |
|
|
98
|
+
|-----------|---------|---------|----------------|
|
|
99
|
+
| ActionArea | `ds-action-area` | `actionAreaMockFactory` | `ds-action-area` |
|
|
100
|
+
| AvatarGroup | `ds-avatar-group` | `avatarGroupMockFactory` | `ds-avatar-group` |
|
|
101
|
+
| Badge | `ds-badge` | `badgeMockFactory` | `ds-badge` |
|
|
102
|
+
| Banner | `ds-banner` | `bannerMockFactory` | `ds-banner` |
|
|
103
|
+
| BroadcastBar | `ds-broadcast-bar` | `broadcastBarMockFactory` | `ds-broadcast-bar` |
|
|
104
|
+
| CodeSnippet | `ds-code-snippet` | `codeSnippetMockFactory` | `ds-code-snippet` |
|
|
105
|
+
| ColorPicker | `ds-color-picker` | `colorPickerMockFactory` | `ds-color-picker` |
|
|
106
|
+
| CompletedWithin | `ds-completed-within` | `completedWithinMockFactory` | `ds-completed-within` |
|
|
107
|
+
| Condition | `ds-condition` | `conditionMockFactory` | `ds-condition` |
|
|
108
|
+
| ContextSelector | `ds-context-selector` | `contextSelectorMockFactory` | `ds-context-selector` |
|
|
109
|
+
| CopyIcon | `ds-copy-icon` | `copyIconMockFactory` | `ds-copy-icon` |
|
|
110
|
+
| Divider | `ds-divider` | `dividerMockFactory` | `ds-divider` |
|
|
111
|
+
| EditableItemsList | `ds-editable-items-list` | `editableItemsListMockFactory` | `ds-editable-items-list` |
|
|
112
|
+
| EmojiPicker | `ds-emoji-picker` | `emojiPickerMockFactory` | `ds-emoji-picker` |
|
|
113
|
+
| EmptyStates | `ds-empty-states` | `emptyStatesMockFactory` | `ds-empty-states` |
|
|
114
|
+
| Estimation | `ds-estimation` | `estimationMockFactory` | `ds-estimation` |
|
|
115
|
+
| FieldSet | `ds-field-set` | `fieldSetMockFactory` | `ds-field-set` |
|
|
116
|
+
| Filter | `ds-filter` | `filterMockFactory` | `ds-filter` |
|
|
117
|
+
| Flag | `ds-flag` | `flagMockFactory` | `ds-flag` |
|
|
118
|
+
| Footer | `ds-footer` | `footerMockFactory` | `ds-footer` |
|
|
119
|
+
| FormatPicker | `ds-format-picker` | `formatPickerMockFactory` | `ds-format-picker` |
|
|
120
|
+
| IconPicker | `ds-icon-picker` | `iconPickerMockFactory` | `ds-icon-picker` |
|
|
121
|
+
| InlineAlert | `ds-inline-alert` | `inlineAlertMockFactory` | `ds-inline-alert` |
|
|
122
|
+
| InputNumber | `ds-input-number` | `inputNumberMockFactory` | `ds-input-number` |
|
|
123
|
+
| Insight | `ds-insight` | `insightMockFactory` | `ds-insight` |
|
|
124
|
+
| ItemFilter | `ds-item-filter` | `itemFilterMockFactory` | `ds-item-filter` |
|
|
125
|
+
| ItemsRoll | `ds-items-roll` | `itemsRollMockFactory` | `ds-items-roll` |
|
|
126
|
+
| Loader | `ds-loader` | `loaderMockFactory` | `ds-loader` |
|
|
127
|
+
| Mapping | `ds-mapping` | `mappingMockFactory` | `ds-mapping` |
|
|
128
|
+
| MetricCard | `ds-metric-card` | `metricCardMockFactory` | `ds-metric-card` |
|
|
129
|
+
| OrderedList | `ds-ordered-list` | `orderedListMockFactory` | `ds-ordered-list` |
|
|
130
|
+
| PageHeader | `ds-page-header` | `pageHeaderMockFactory` | `ds-page-header` |
|
|
131
|
+
| Pagination | `ds-pagination` | `paginationMockFactory` | `ds-pagination` |
|
|
132
|
+
| Panel | `ds-panel` | `panelMockFactory` | `ds-panel` |
|
|
133
|
+
| PanelsResizer | `ds-panels-resizer` | `panelsResizerMockFactory` | `ds-panels-resizer` |
|
|
134
|
+
| Result | `ds-result` | `resultMockFactory` | `ds-result` |
|
|
135
|
+
| SectionMessage | `ds-section-message` | `sectionMessageMockFactory` | `ds-section-message` |
|
|
136
|
+
| ShortCuts | `ds-short-cuts` | `shortCutsMockFactory` | `ds-short-cuts` |
|
|
137
|
+
| SidebarObject | `ds-sidebar-object` | `sidebarObjectMockFactory` | `ds-sidebar-object` |
|
|
138
|
+
| Status | `ds-status` | `statusMockFactory` | `ds-status` |
|
|
139
|
+
| StepCard | `ds-step-card` | `stepCardMockFactory` | `ds-step-card` |
|
|
140
|
+
| Subject | `ds-subject` | `subjectMockFactory` | `ds-subject` |
|
|
141
|
+
| UnorderedList | `ds-unordered-list` | `unorderedListMockFactory` | `ds-unordered-list` |
|
|
142
|
+
|
|
143
|
+
### Components with Sub-components
|
|
144
|
+
|
|
145
|
+
| Component | Package | Factory | Sub-components |
|
|
146
|
+
|-----------|---------|---------|---------------|
|
|
147
|
+
| Alert | `ds-alert` | `alertMockFactory` | Toast, SectionMessage, BroadcastBar, IconAlert, InlineAlert, AlertInfo |
|
|
148
|
+
| AppMenu | `ds-app-menu` | `appMenuMockFactory` | + `useMenu`, `useSubMenu` hooks |
|
|
149
|
+
| Avatar | `ds-avatar` | `avatarMockFactory` | UserAvatar, ObjectAvatar, DefaultAvatarIcon |
|
|
150
|
+
| Button | `ds-button` | `buttonMockFactory` | |
|
|
151
|
+
| ButtonGroup | `ds-button-group` | `buttonGroupMockFactory` | ButtonDivider |
|
|
152
|
+
| Card | `ds-card` | `cardMockFactory` | CardGroup, CardBadge, CardSummary |
|
|
153
|
+
| CardSelect | `ds-card-select` | `cardSelectMockFactory` | CardSelectGroup |
|
|
154
|
+
| CardTabs | `ds-card-tabs` | `cardTabsMockFactory` | CardTab |
|
|
155
|
+
| Cascader | `ds-cascader` | `cascaderMockFactory` | Breadcrumb |
|
|
156
|
+
| Checkbox | `ds-checkbox` | `checkboxMockFactory` | Checkbox.Group |
|
|
157
|
+
| Collector | `ds-collector` | `collectorMockFactory` | .Values, .ButtonPanel, .OptionsDropdown, .NavigationHint |
|
|
158
|
+
| Confirmation | `ds-confirmation` | `confirmationMockFactory` | Prompt |
|
|
159
|
+
| Cruds | `ds-cruds` | `crudsMockFactory` | |
|
|
160
|
+
| Description | `ds-description` | `descriptionMockFactory` | DescriptionRow, DescriptionCopyable |
|
|
161
|
+
| Drawer | `ds-drawer` | `drawerMockFactory` | .DrawerHeader, .DrawerHeaderBar, .DrawerBody, .DrawerContent, etc. |
|
|
162
|
+
| Dropdown | `ds-dropdown` | `dropdownMockFactory` | |
|
|
163
|
+
| FileUploader | `ds-file-uploader` | `fileUploaderMockFactory` | AvatarUploader, ItemUploader |
|
|
164
|
+
| FlexBox | `ds-flex-box` | `flexBoxMockFactory` | Flex, Box (named exports, no default) |
|
|
165
|
+
| Form | `ds-form` | `formMockFactory` | Form.FieldSet, EditableList |
|
|
166
|
+
| FormField | `ds-form-field` | `formFieldMockFactory` | FormFieldLabel, ContentAboveElement, ContentBelowElement |
|
|
167
|
+
| Grid | `ds-grid` | `gridMockFactory` | Grid.Item |
|
|
168
|
+
| Icon | `ds-icon` | `iconMockFactory` | |
|
|
169
|
+
| InformationCard | `ds-information-card` | `informationCardMockFactory` | InformationCardPropertyList, InformationCardTooltip |
|
|
170
|
+
| InlineEdit | `ds-inline-edit` | `inlineEditMockFactory` | InlineSelect |
|
|
171
|
+
| Input | `ds-input` | `inputMockFactory` | TextArea |
|
|
172
|
+
| ItemPicker | `ds-item-picker` | `itemPickerMockFactory` | ItemPickerNew, ItemPickerLegacy, ItemPickerList, ItemPickerTrigger |
|
|
173
|
+
| Layout | `ds-layout` | `layoutMockFactory` | Page |
|
|
174
|
+
| List | `ds-list` | `listMockFactory` | List.Item, List.ItemWrapper, List.Divider |
|
|
175
|
+
| ListItem | `ds-list-item` | `listItemMockFactory` | HoverTooltip, GroupItem, ListWrapper, ListContextProvider |
|
|
176
|
+
| Logic | `ds-logic` | `logicMockFactory` | Logic.Matching, Placeholder |
|
|
177
|
+
| ManageableList | `ds-manageable-list` | `manageableListMockFactory` | ContentItem, FilterItem, SimpleItem, AddItem |
|
|
178
|
+
| Menu | `ds-menu` | `menuMockFactory` | Menu.Item, .Breadcrumb, .Header, .Divider, .SubMenu, .ItemGroup |
|
|
179
|
+
| Modal | `ds-modal` | `modalMockFactory` | |
|
|
180
|
+
| Navbar | `ds-navbar` | `navbarMockFactory` | Navbar.Divider |
|
|
181
|
+
| Popconfirm | `ds-popconfirm` | `popconfirmMockFactory` | ConfirmMessage |
|
|
182
|
+
| Popover | `ds-popover` | `popoverMockFactory` | PopoverTrigger, PopoverContent, PopoverArrow, PopoverClose |
|
|
183
|
+
| ProgressBar | `ds-progress-bar` | `progressBarMockFactory` | Multivalue, ProgressTiles |
|
|
184
|
+
| Radio | `ds-radio` | `radioMockFactory` | Radio.Group, Radio.Button |
|
|
185
|
+
| Scrollbar | `ds-scrollbar` | `scrollbarMockFactory` | |
|
|
186
|
+
| Search | `ds-search` | `searchMockFactory` | SearchInput, SearchHeader, SearchItems, SearchButton |
|
|
187
|
+
| Select | `ds-select` | `selectMockFactory` | Option |
|
|
188
|
+
| Sidebar | `ds-sidebar` | `sidebarMockFactory` | Sidebar.Panel, SidebarWithButton |
|
|
189
|
+
| Skeleton | `ds-skeleton` | `skeletonMockFactory` | CheckboxSkeleton, DropdownSkeleton, OrderedListSkeleton, SkeletonAvatar |
|
|
190
|
+
| Sortable | `ds-sortable` | `sortableMockFactory` | SortableContainer, useSortable, arrayMove |
|
|
191
|
+
| Stepper | `ds-stepper` | `stepperMockFactory` | Stepper.Step |
|
|
192
|
+
| SubtleForm | `ds-subtle-form` | `subtleFormMockFactory` | .TextArea, .Input, .Select, .DatePicker, .Field |
|
|
193
|
+
| Switch | `ds-switch` | `switchMockFactory` | RawSwitch |
|
|
194
|
+
| Table | `ds-table` | `tableMockFactory` | |
|
|
195
|
+
| TableNew | `ds-table-new` | `tableNewMockFactory` | VirtualTable |
|
|
196
|
+
| Tabs | `ds-tabs` | `tabsMockFactory` | |
|
|
197
|
+
| Tag | `ds-tag` | `tagMockFactory` | TagShape, useDefaultTexts |
|
|
198
|
+
| Tags | `ds-tags` | `tagsMockFactory` | AddTags |
|
|
199
|
+
| Toolbar | `ds-toolbar` | `toolbarMockFactory` | ToolbarGroup, ToolbarButton, ToolbarLabel, ToolbarDivider |
|
|
200
|
+
| Tooltip | `ds-tooltip` | `tooltipMockFactory` | |
|
|
201
|
+
| Tray | `ds-tray` | `trayMockFactory` | TrayProvider, useTray |
|
|
202
|
+
| Typography | `ds-typography` | `typographyMockFactory` | Title, Text, Paragraph, Description, ErrorText, Label, macro |
|
|
203
|
+
| Wizard | `ds-wizard` | `wizardMockFactory` | Wizard.OnModal |
|
|
204
|
+
|
|
205
|
+
### Complex Components (imperative APIs)
|
|
206
|
+
|
|
207
|
+
| Component | Package | Factory | API mocked |
|
|
208
|
+
|-----------|---------|---------|-----------|
|
|
209
|
+
| CodeArea | `ds-code-area` | `codeAreaMockFactory` | Monaco Editor replaced with textarea |
|
|
210
|
+
| DatePicker | `ds-date-picker` | `datePickerMockFactory` | + RawDatePicker, DayPicker, MonthPicker, YearPicker, TimePicker |
|
|
211
|
+
| DateRangePicker | `ds-date-range-picker` | `dateRangePickerMockFactory` | + 4 filter types, TimeWindow, utils, CONST, fnsFormat |
|
|
212
|
+
| Factors | `ds-factors` | `factorsMockFactory` | + factorTypes, ALL_FACTOR_TYPES |
|
|
213
|
+
| Slider | `ds-slider` | `sliderMockFactory` | Handles single value + range mode |
|
|
214
|
+
| TimePicker | `ds-time-picker` | `timePickerMockFactory` | + AM, PM, HOUR_12, HOUR, CLOCK_MODES constants |
|
|
215
|
+
| Toast | `ds-toast` | `toastMockFactory` | showToast, dismissToast, removeToast + Toast.success/error/info/warning |
|
|
216
|
+
|
|
217
|
+
## Component-specific Features
|
|
218
|
+
|
|
219
|
+
### Modal
|
|
220
|
+
|
|
221
|
+
Test IDs: `{testId}-header`, `{testId}-title`, `{testId}-close`, `{testId}-body`, `{testId}-footer`, `{testId}-ok`, `{testId}-cancel`
|
|
222
|
+
|
|
223
|
+
### Table
|
|
224
|
+
|
|
225
|
+
Test IDs: `{testId}-header`, `{testId}-row-{index}`, `{testId}-cell-{rowIndex}-{colIndex}`, `{testId}-checkbox-{index}`
|
|
226
|
+
|
|
227
|
+
### Form
|
|
228
|
+
|
|
229
|
+
Mocks `Form`, `Form.FieldSet`, and `EditableList`. Test IDs: `ds-fieldset`, `ds-editable-list`, `ds-editable-list-row-{index}`, `ds-editable-list-add`
|
|
230
|
+
|
|
231
|
+
### Toast (imperative API)
|
|
162
232
|
|
|
163
233
|
```typescript
|
|
164
|
-
vi.mock('@synerise/ds-
|
|
165
|
-
const {
|
|
166
|
-
return { ...
|
|
234
|
+
vi.mock('@synerise/ds-toast', async () => {
|
|
235
|
+
const { toastMockFactory } = await import('@synerise/ds-mocks');
|
|
236
|
+
return { ...toastMockFactory() };
|
|
167
237
|
});
|
|
168
238
|
|
|
169
|
-
// Test
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
239
|
+
// Test imperative calls
|
|
240
|
+
import { showToast, dismissToast } from '@synerise/ds-toast';
|
|
241
|
+
showToast('success', { message: 'Saved' }); // returns 'mock-toast-id'
|
|
242
|
+
Toast.success({ message: 'Saved' }); // static method
|
|
243
|
+
dismissToast('mock-toast-id');
|
|
173
244
|
```
|
|
174
245
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
Factory accepts options parameter:
|
|
246
|
+
### Tooltip (with content)
|
|
178
247
|
|
|
179
248
|
```typescript
|
|
180
249
|
vi.mock('@synerise/ds-tooltip', async () => {
|
|
181
250
|
const { tooltipMockFactory } = await import('@synerise/ds-mocks');
|
|
182
251
|
return { ...tooltipMockFactory({ showContent: true })() };
|
|
183
252
|
});
|
|
184
|
-
|
|
185
|
-
// Now you can test tooltip content
|
|
186
|
-
screen.getByTestId('ds-tooltip-content');
|
|
187
|
-
screen.getByTestId('ds-tooltip-title');
|
|
188
253
|
```
|
|
189
254
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
Additional factory for custom render:
|
|
255
|
+
### Icon (custom render)
|
|
193
256
|
|
|
194
257
|
```typescript
|
|
195
|
-
// Standard mock
|
|
196
|
-
vi.mock('@synerise/ds-icon', async () => {
|
|
197
|
-
const { iconMockFactory } = await import('@synerise/ds-mocks');
|
|
198
|
-
return { ...iconMockFactory() };
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
// Custom render function
|
|
202
258
|
vi.mock('@synerise/ds-icon', async () => {
|
|
203
259
|
const { iconWithRenderMockFactory } = await import('@synerise/ds-mocks');
|
|
204
260
|
return { ...iconWithRenderMockFactory(({ icon }) => <span>{icon}</span>)() };
|
|
205
261
|
});
|
|
206
262
|
```
|
|
207
263
|
|
|
208
|
-
|
|
264
|
+
## TypeScript Support
|
|
209
265
|
|
|
210
266
|
All mocks export their prop types:
|
|
211
267
|
|
|
212
268
|
```typescript
|
|
213
|
-
import type {
|
|
214
|
-
MockButtonProps,
|
|
215
|
-
MockIconProps,
|
|
216
|
-
MockModalProps,
|
|
217
|
-
MockTableProps,
|
|
218
|
-
// ... etc
|
|
219
|
-
} from '@synerise/ds-mocks';
|
|
269
|
+
import type { MockButtonProps, MockModalProps, MockTableProps } from '@synerise/ds-mocks';
|
|
220
270
|
```
|
|
221
271
|
|
|
222
|
-
## Jest Mocks
|
|
223
|
-
|
|
224
|
-
This package also provides mocks for Jest test framework.
|
|
225
|
-
|
|
226
|
-
### Usage
|
|
227
|
-
|
|
228
|
-
```typescript
|
|
229
|
-
import { jest as dsMocks } from '@synerise/ds-mocks';
|
|
230
|
-
import { render, screen, fireEvent } from '@testing-library/react';
|
|
231
|
-
|
|
232
|
-
describe('MyComponent', () => {
|
|
233
|
-
// Call mocks at the top level of describe block
|
|
234
|
-
dsMocks.mockButton();
|
|
235
|
-
dsMocks.mockModal();
|
|
236
|
-
dsMocks.mockIcon();
|
|
237
|
-
|
|
238
|
-
it('renders button with custom testid', () => {
|
|
239
|
-
render(<MyComponent />);
|
|
240
|
-
|
|
241
|
-
// Default testid
|
|
242
|
-
expect(screen.getByTestId('ds-button')).toBeInTheDocument();
|
|
243
|
-
|
|
244
|
-
// Or custom testid if passed via props
|
|
245
|
-
expect(screen.getByTestId('submit-button')).toBeInTheDocument();
|
|
246
|
-
});
|
|
247
|
-
|
|
248
|
-
it('opens modal on click', () => {
|
|
249
|
-
render(<MyComponent />);
|
|
250
|
-
|
|
251
|
-
fireEvent.click(screen.getByTestId('ds-button'));
|
|
252
|
-
|
|
253
|
-
expect(screen.getByTestId('ds-modal')).toBeInTheDocument();
|
|
254
|
-
expect(screen.getByTestId('ds-modal-title')).toHaveTextContent('My Modal');
|
|
255
|
-
});
|
|
256
|
-
});
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
### Available Jest Mocks
|
|
260
|
-
|
|
261
|
-
| Component | Mock Functions |
|
|
262
|
-
| --------- | --------------------------------------------------- |
|
|
263
|
-
| Button | `mockButton`, `mockButtonMinimal` |
|
|
264
|
-
| Cruds | `mockCruds`, `mockCrudsMinimal` |
|
|
265
|
-
| Dropdown | `mockDropdown`, `mockDropdownMinimal` |
|
|
266
|
-
| Form | `mockForm`, `mockFormMinimal` |
|
|
267
|
-
| Icon | `mockIcon`, `mockIconMinimal`, `mockIconWithRender` |
|
|
268
|
-
| Input | `mockInput`, `mockInputMinimal` |
|
|
269
|
-
| Modal | `mockModal`, `mockModalMinimal` |
|
|
270
|
-
| Select | `mockSelect`, `mockSelectMinimal` |
|
|
271
|
-
| Table | `mockTable`, `mockTableMinimal` |
|
|
272
|
-
| Tabs | `mockTabs`, `mockTabsMinimal` |
|
|
273
|
-
| Tooltip | `mockTooltip`, `mockTooltipMinimal` |
|
|
274
|
-
|
|
275
|
-
### Jest TypeScript Support
|
|
276
|
-
|
|
277
|
-
All Jest mocks export their prop types:
|
|
278
|
-
|
|
279
|
-
```typescript
|
|
280
|
-
import type {
|
|
281
|
-
MockButtonProps,
|
|
282
|
-
MockIconProps,
|
|
283
|
-
MockModalProps,
|
|
284
|
-
MockTableProps,
|
|
285
|
-
// ... etc
|
|
286
|
-
} from '@synerise/ds-mocks/jest';
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
## DS Components Coverage
|
|
290
|
-
|
|
291
|
-
### Available Mocks
|
|
292
|
-
|
|
293
|
-
- [x] Button (`@synerise/ds-button`)
|
|
294
|
-
- [x] Cruds (`@synerise/ds-cruds`)
|
|
295
|
-
- [x] Dropdown (`@synerise/ds-dropdown`)
|
|
296
|
-
- [x] Form (`@synerise/ds-form`) - includes Form.FieldSet and EditableList
|
|
297
|
-
- [x] Icon (`@synerise/ds-icon`)
|
|
298
|
-
- [x] Input (`@synerise/ds-input`) - includes TextArea
|
|
299
|
-
- [x] Modal (`@synerise/ds-modal`)
|
|
300
|
-
- [x] Select (`@synerise/ds-select`) - includes Option
|
|
301
|
-
- [x] Table (`@synerise/ds-table`)
|
|
302
|
-
- [x] Tabs (`@synerise/ds-tabs`)
|
|
303
|
-
- [x] Tooltip (`@synerise/ds-tooltip`)
|
|
304
|
-
|
|
305
|
-
### Pending Mocks (TODO)
|
|
306
|
-
|
|
307
|
-
- [ ] ActionArea (`@synerise/ds-action-area`)
|
|
308
|
-
- [ ] Alert (`@synerise/ds-alert`)
|
|
309
|
-
- [ ] AppMenu (`@synerise/ds-app-menu`)
|
|
310
|
-
- [ ] Autocomplete (`@synerise/ds-autocomplete`)
|
|
311
|
-
- [ ] Avatar (`@synerise/ds-avatar`)
|
|
312
|
-
- [ ] AvatarGroup (`@synerise/ds-avatar-group`)
|
|
313
|
-
- [ ] Badge (`@synerise/ds-badge`)
|
|
314
|
-
- [ ] Banner (`@synerise/ds-banner`)
|
|
315
|
-
- [ ] Block (`@synerise/ds-block`)
|
|
316
|
-
- [ ] BroadcastBar (`@synerise/ds-broadcast-bar`)
|
|
317
|
-
- [ ] ButtonGroup (`@synerise/ds-button-group`)
|
|
318
|
-
- [ ] Card (`@synerise/ds-card`)
|
|
319
|
-
- [ ] CardSelect (`@synerise/ds-card-select`)
|
|
320
|
-
- [ ] CardTabs (`@synerise/ds-card-tabs`)
|
|
321
|
-
- [ ] Cascader (`@synerise/ds-cascader`)
|
|
322
|
-
- [ ] Checkbox (`@synerise/ds-checkbox`)
|
|
323
|
-
- [ ] CheckboxTristate (`@synerise/ds-checkbox-tristate`)
|
|
324
|
-
- [ ] CodeArea (`@synerise/ds-code-area`)
|
|
325
|
-
- [ ] CodeSnippet (`@synerise/ds-code-snippet`)
|
|
326
|
-
- [ ] Collector (`@synerise/ds-collector`)
|
|
327
|
-
- [ ] ColorPicker (`@synerise/ds-color-picker`)
|
|
328
|
-
- [ ] ColumnManager (`@synerise/ds-column-manager`)
|
|
329
|
-
- [ ] CompletedWithin (`@synerise/ds-completed-within`)
|
|
330
|
-
- [ ] Condition (`@synerise/ds-condition`)
|
|
331
|
-
- [ ] Confirmation (`@synerise/ds-confirmation`)
|
|
332
|
-
- [ ] ContextSelector (`@synerise/ds-context-selector`)
|
|
333
|
-
- [ ] CopyIcon (`@synerise/ds-copy-icon`)
|
|
334
|
-
- [ ] DataFormat (`@synerise/ds-data-format`)
|
|
335
|
-
- [ ] DatePicker (`@synerise/ds-date-picker`)
|
|
336
|
-
- [ ] DateRangePicker (`@synerise/ds-date-range-picker`)
|
|
337
|
-
- [ ] Description (`@synerise/ds-description`)
|
|
338
|
-
- [ ] Divider (`@synerise/ds-divider`)
|
|
339
|
-
- [ ] Drawer (`@synerise/ds-drawer`)
|
|
340
|
-
- [ ] EditableItemsList (`@synerise/ds-editable-items-list`)
|
|
341
|
-
- [ ] EmojiPicker (`@synerise/ds-emoji-picker`)
|
|
342
|
-
- [ ] EmptyStates (`@synerise/ds-empty-states`)
|
|
343
|
-
- [ ] Estimation (`@synerise/ds-estimation`)
|
|
344
|
-
- [ ] Factors (`@synerise/ds-factors`)
|
|
345
|
-
- [ ] FieldSet (`@synerise/ds-field-set`)
|
|
346
|
-
- [ ] FileUploader (`@synerise/ds-file-uploader`)
|
|
347
|
-
- [ ] Filter (`@synerise/ds-filter`)
|
|
348
|
-
- [ ] Flag (`@synerise/ds-flag`)
|
|
349
|
-
- [ ] FlexBox (`@synerise/ds-flex-box`)
|
|
350
|
-
- [ ] Footer (`@synerise/ds-footer`)
|
|
351
|
-
- [ ] FormField (`@synerise/ds-form-field`)
|
|
352
|
-
- [ ] FormatPicker (`@synerise/ds-format-picker`)
|
|
353
|
-
- [ ] Grid (`@synerise/ds-grid`)
|
|
354
|
-
- [ ] IconPicker (`@synerise/ds-icon-picker`)
|
|
355
|
-
- [ ] InformationCard (`@synerise/ds-information-card`)
|
|
356
|
-
- [ ] InlineAlert (`@synerise/ds-inline-alert`)
|
|
357
|
-
- [ ] InlineEdit (`@synerise/ds-inline-edit`)
|
|
358
|
-
- [ ] InputNumber (`@synerise/ds-input-number`)
|
|
359
|
-
- [ ] Insight (`@synerise/ds-insight`)
|
|
360
|
-
- [ ] ItemFilter (`@synerise/ds-item-filter`)
|
|
361
|
-
- [ ] ItemPicker (`@synerise/ds-item-picker`)
|
|
362
|
-
- [ ] ItemsRoll (`@synerise/ds-items-roll`)
|
|
363
|
-
- [ ] Layout (`@synerise/ds-layout`)
|
|
364
|
-
- [ ] List (`@synerise/ds-list`)
|
|
365
|
-
- [ ] ListItem (`@synerise/ds-list-item`)
|
|
366
|
-
- [ ] Loader (`@synerise/ds-loader`)
|
|
367
|
-
- [ ] Logic (`@synerise/ds-logic`)
|
|
368
|
-
- [ ] ManageableList (`@synerise/ds-manageable-list`)
|
|
369
|
-
- [ ] Mapping (`@synerise/ds-mapping`)
|
|
370
|
-
- [ ] Menu (`@synerise/ds-menu`)
|
|
371
|
-
- [ ] MetricCard (`@synerise/ds-metric-card`)
|
|
372
|
-
- [ ] Navbar (`@synerise/ds-navbar`)
|
|
373
|
-
- [ ] Operators (`@synerise/ds-operators`)
|
|
374
|
-
- [ ] OrderedList (`@synerise/ds-ordered-list`)
|
|
375
|
-
- [ ] PageHeader (`@synerise/ds-page-header`)
|
|
376
|
-
- [ ] Pagination (`@synerise/ds-pagination`)
|
|
377
|
-
- [ ] Panel (`@synerise/ds-panel`)
|
|
378
|
-
- [ ] PanelsResizer (`@synerise/ds-panels-resizer`)
|
|
379
|
-
- [ ] Popconfirm (`@synerise/ds-popconfirm`)
|
|
380
|
-
- [ ] Popover (`@synerise/ds-popover`)
|
|
381
|
-
- [ ] ProgressBar (`@synerise/ds-progress-bar`)
|
|
382
|
-
- [ ] Radio (`@synerise/ds-radio`)
|
|
383
|
-
- [ ] Result (`@synerise/ds-result`)
|
|
384
|
-
- [ ] Scrollbar (`@synerise/ds-scrollbar`)
|
|
385
|
-
- [ ] Search (`@synerise/ds-search`)
|
|
386
|
-
- [ ] SearchBar (`@synerise/ds-search-bar`)
|
|
387
|
-
- [ ] SectionMessage (`@synerise/ds-section-message`)
|
|
388
|
-
- [ ] ShortCuts (`@synerise/ds-short-cuts`)
|
|
389
|
-
- [ ] Sidebar (`@synerise/ds-sidebar`)
|
|
390
|
-
- [ ] SidebarObject (`@synerise/ds-sidebar-object`)
|
|
391
|
-
- [ ] Skeleton (`@synerise/ds-skeleton`)
|
|
392
|
-
- [ ] Slider (`@synerise/ds-slider`)
|
|
393
|
-
- [ ] Sortable (`@synerise/ds-sortable`)
|
|
394
|
-
- [ ] Status (`@synerise/ds-status`)
|
|
395
|
-
- [ ] StepCard (`@synerise/ds-step-card`)
|
|
396
|
-
- [ ] Stepper (`@synerise/ds-stepper`)
|
|
397
|
-
- [ ] Subject (`@synerise/ds-subject`)
|
|
398
|
-
- [ ] SubtleForm (`@synerise/ds-subtle-form`)
|
|
399
|
-
- [ ] Switch (`@synerise/ds-switch`)
|
|
400
|
-
- [ ] Tag (`@synerise/ds-tag`)
|
|
401
|
-
- [ ] Tags (`@synerise/ds-tags`)
|
|
402
|
-
- [ ] TimePicker (`@synerise/ds-time-picker`)
|
|
403
|
-
- [ ] Toast (`@synerise/ds-toast`)
|
|
404
|
-
- [ ] Toolbar (`@synerise/ds-toolbar`)
|
|
405
|
-
- [ ] Tray (`@synerise/ds-tray`)
|
|
406
|
-
- [ ] Typography (`@synerise/ds-typography`)
|
|
407
|
-
- [ ] UnorderedList (`@synerise/ds-unordered-list`)
|
|
408
|
-
- [ ] Wizard (`@synerise/ds-wizard`)
|
|
409
|
-
|
|
410
272
|
## Requirements
|
|
411
273
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
-
|
|
415
|
-
-
|
|
416
|
-
- `@testing-library/react` (recommended)
|
|
417
|
-
|
|
418
|
-
### Jest
|
|
419
|
-
|
|
420
|
-
- Jest 27+ or 28+ or 29+
|
|
421
|
-
- React 16.8+ or 17+ or 18+
|
|
422
|
-
- `@testing-library/react` (recommended)
|
|
274
|
+
- **Vitest**: `globals: true` in config
|
|
275
|
+
- **Jest**: 27+
|
|
276
|
+
- **React**: 16.8+ / 17+ / 18+
|
|
277
|
+
- **@testing-library/react** (recommended)
|
|
423
278
|
|
|
424
279
|
## License
|
|
425
280
|
|
|
426
|
-
|
|
281
|
+
ISC
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './vi';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
const mockActionArea = () => {
|
|
3
|
+
jest.mock("@synerise/ds-action-area", () => ({
|
|
4
|
+
__esModule: true,
|
|
5
|
+
default: jest.fn(({
|
|
6
|
+
children,
|
|
7
|
+
className,
|
|
8
|
+
"data-testid": dataTestId
|
|
9
|
+
}) => /* @__PURE__ */ jsx("div", { className: `ds-action-area ${className || ""}`, "data-testid": dataTestId || "ds-action-area", children }))
|
|
10
|
+
}));
|
|
11
|
+
};
|
|
12
|
+
const mockActionAreaMinimal = () => {
|
|
13
|
+
jest.mock("@synerise/ds-action-area", () => ({
|
|
14
|
+
__esModule: true,
|
|
15
|
+
default: jest.fn(() => null)
|
|
16
|
+
}));
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
mockActionArea,
|
|
20
|
+
mockActionAreaMinimal
|
|
21
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ActionAreaProps } from '@synerise/ds-action-area';
|
|
2
|
+
export type MockActionAreaProps = ActionAreaProps & {
|
|
3
|
+
'data-testid'?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const actionAreaMockFactory: () => {
|
|
6
|
+
default: any;
|
|
7
|
+
};
|
|
8
|
+
export declare const actionAreaMinimalMockFactory: () => {
|
|
9
|
+
default: any;
|
|
10
|
+
};
|