@altinn/altinn-components 0.5.2 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -2
- package/dist/components/Attachment/AttachmentLink.d.ts +10 -0
- package/dist/components/Attachment/AttachmentList.d.ts +7 -0
- package/dist/components/Avatar/Avatar.d.ts +27 -0
- package/dist/components/Avatar/AvatarGroup.d.ts +20 -0
- package/dist/components/Avatar/color.d.ts +4 -0
- package/dist/components/Badge/Badge.d.ts +11 -0
- package/dist/components/Bookmarks/BookmarksList.d.ts +7 -0
- package/dist/components/Bookmarks/BookmarksListItem.d.ts +21 -0
- package/dist/components/Bookmarks/QueryLabel.d.ts +11 -0
- package/dist/components/Bookmarks/index.d.ts +3 -0
- package/dist/components/Button/Button.d.ts +8 -0
- package/dist/components/Button/ButtonBase.d.ts +20 -0
- package/dist/components/Button/ButtonIcon.d.ts +7 -0
- package/dist/components/Button/ButtonLabel.d.ts +8 -0
- package/dist/components/Button/ComboButton.d.ts +10 -0
- package/dist/components/Button/IconButton.d.ts +14 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +8 -0
- package/dist/components/ContextMenu/ContextMenuBase.d.ts +9 -0
- package/dist/components/Datepicker/index.d.ts +1 -0
- package/dist/components/Dialog/Dialog.d.ts +54 -0
- package/dist/components/Dialog/DialogActions.d.ts +16 -0
- package/dist/components/Dialog/DialogActivityLog.d.ts +10 -0
- package/dist/components/Dialog/DialogArticleBase.d.ts +6 -0
- package/dist/components/Dialog/DialogAttachments.d.ts +6 -0
- package/dist/components/Dialog/DialogBase.d.ts +5 -0
- package/dist/components/Dialog/DialogBodyBase.d.ts +5 -0
- package/dist/components/Dialog/DialogBorder.d.ts +9 -0
- package/dist/components/Dialog/DialogContent.d.ts +9 -0
- package/dist/components/Dialog/DialogFooter.d.ts +4 -0
- package/dist/components/Dialog/DialogGroup.d.ts +6 -0
- package/dist/components/Dialog/DialogHeader.d.ts +10 -0
- package/dist/components/Dialog/DialogHeaderBase.d.ts +5 -0
- package/dist/components/Dialog/DialogHeadings.d.ts +24 -0
- package/dist/components/Dialog/DialogHistory.d.ts +6 -0
- package/dist/components/Dialog/DialogList.d.ts +7 -0
- package/dist/components/Dialog/DialogListItem.d.ts +59 -0
- package/dist/components/Dialog/DialogListItemBase.d.ts +28 -0
- package/dist/components/Dialog/DialogMetadata.d.ts +22 -0
- package/dist/components/Dialog/DialogNav.d.ts +21 -0
- package/dist/components/Dialog/DialogSectionBase.d.ts +6 -0
- package/dist/components/Dialog/DialogSeenBy.d.ts +19 -0
- package/dist/components/Dialog/DialogSelect.d.ts +10 -0
- package/dist/components/Dialog/DialogStatus.d.ts +25 -0
- package/dist/components/Dialog/DialogTitle.d.ts +20 -0
- package/dist/components/Dialog/DialogTouchedBy.d.ts +10 -0
- package/dist/components/Dropdown/Backdrop.d.ts +6 -0
- package/dist/components/Dropdown/DrawerBase.d.ts +9 -0
- package/dist/components/Dropdown/DrawerBody.d.ts +6 -0
- package/dist/components/Dropdown/DrawerButton.d.ts +7 -0
- package/dist/components/Dropdown/DrawerFooter.d.ts +6 -0
- package/dist/components/Dropdown/DrawerHeader.d.ts +7 -0
- package/dist/components/Dropdown/DrawerOrDropdown.d.ts +10 -0
- package/dist/components/Dropdown/DropdownBase.d.ts +10 -0
- package/{lib/components/Dropdown/index.ts → dist/components/Dropdown/index.d.ts} +0 -1
- package/dist/components/Footer/Footer.d.ts +6 -0
- package/dist/components/Footer/FooterAddress.d.ts +6 -0
- package/dist/components/Footer/FooterBase.d.ts +6 -0
- package/dist/components/Footer/FooterLogo.d.ts +5 -0
- package/dist/components/Footer/FooterMenu.d.ts +14 -0
- package/dist/components/GlobalMenu/AccountButton.d.ts +14 -0
- package/dist/components/GlobalMenu/AccountMenu.d.ts +20 -0
- package/dist/components/GlobalMenu/BackButton.d.ts +5 -0
- package/dist/components/GlobalMenu/GlobalMenu.d.ts +16 -0
- package/dist/components/GlobalMenu/GlobalMenuBase.d.ts +7 -0
- package/dist/components/GlobalMenu/LogoutButton.d.ts +7 -0
- package/dist/components/Header/DigdirLogomark.d.ts +5 -0
- package/dist/components/Header/Header.d.ts +9 -0
- package/dist/components/Header/HeaderBase.d.ts +9 -0
- package/dist/components/Header/HeaderButton.d.ts +15 -0
- package/dist/components/Header/HeaderLogo.d.ts +9 -0
- package/dist/components/Header/HeaderMenu.d.ts +7 -0
- package/dist/components/Header/HeaderSearch.d.ts +7 -0
- package/dist/components/History/HistoryAttachments.d.ts +6 -0
- package/dist/components/History/HistoryBorder.d.ts +7 -0
- package/dist/components/History/HistoryItem.d.ts +14 -0
- package/dist/components/History/HistoryList.d.ts +6 -0
- package/dist/components/Icon/CheckboxCheckedIcon.d.ts +8 -0
- package/dist/components/Icon/CheckboxIcon.d.ts +10 -0
- package/dist/components/Icon/CheckboxUncheckedIcon.d.ts +9 -0
- package/dist/components/Icon/Icon.d.ts +9 -0
- package/dist/components/Icon/ProgressIcon.d.ts +6 -0
- package/dist/components/Icon/RadioCheckedIcon.d.ts +8 -0
- package/dist/components/Icon/RadioIcon.d.ts +10 -0
- package/dist/components/Icon/RadioUncheckedIcon.d.ts +9 -0
- package/dist/components/Icon/SvgIcon.d.ts +9 -0
- package/dist/components/Icon/iconsMap.d.ts +1911 -0
- package/dist/components/Layout/Layout.d.ts +24 -0
- package/dist/components/Layout/LayoutBase.d.ts +21 -0
- package/dist/components/Layout/LayoutBody.d.ts +7 -0
- package/dist/components/Layout/LayoutContent.d.ts +7 -0
- package/dist/components/Layout/LayoutSidebar.d.ts +13 -0
- package/dist/components/LayoutAction/ActionFooter.d.ts +6 -0
- package/dist/components/LayoutAction/ActionHeader.d.ts +7 -0
- package/dist/components/LayoutAction/ActionMenu.d.ts +6 -0
- package/dist/components/List/List.d.ts +10 -0
- package/dist/components/List/ListBase.d.ts +9 -0
- package/dist/components/List/ListItem.d.ts +46 -0
- package/dist/components/List/ListItemBase.d.ts +27 -0
- package/dist/components/List/ListItemLabel.d.ts +9 -0
- package/dist/components/List/ListItemMedia.d.ts +14 -0
- package/dist/components/Menu/Menu.d.ts +8 -0
- package/dist/components/Menu/MenuBase.d.ts +27 -0
- package/dist/components/Menu/MenuHeader.d.ts +4 -0
- package/dist/components/Menu/MenuInputField.d.ts +12 -0
- package/dist/components/Menu/MenuItem.d.ts +35 -0
- package/dist/components/Menu/MenuItemBase.d.ts +23 -0
- package/dist/components/Menu/MenuItemLabel.d.ts +10 -0
- package/dist/components/Menu/MenuItemMedia.d.ts +14 -0
- package/dist/components/Menu/MenuItems.d.ts +17 -0
- package/dist/components/Menu/MenuOption.d.ts +19 -0
- package/dist/components/Menu/MenuSearch.d.ts +8 -0
- package/{lib/components/Menu/index.ts → dist/components/Menu/index.d.ts} +1 -0
- package/dist/components/Meta/MetaBase.d.ts +7 -0
- package/dist/components/Meta/MetaItem.d.ts +18 -0
- package/dist/components/Meta/MetaItemBase.d.ts +15 -0
- package/dist/components/Meta/MetaItemLabel.d.ts +11 -0
- package/dist/components/Meta/MetaItemMedia.d.ts +9 -0
- package/dist/components/Meta/MetaList.d.ts +12 -0
- package/dist/components/Meta/MetaProgress.d.ts +13 -0
- package/dist/components/Meta/MetaTimestamp.d.ts +16 -0
- package/dist/components/Page/PageBase.d.ts +6 -0
- package/dist/components/Page/PageHeader.d.ts +7 -0
- package/dist/components/Page/PageHeaderMedia.d.ts +10 -0
- package/dist/components/Page/PageNav.d.ts +14 -0
- package/dist/components/Page/SectionBase.d.ts +19 -0
- package/dist/components/Page/SectionFooter.d.ts +6 -0
- package/dist/components/Page/SectionHeader.d.ts +7 -0
- package/dist/components/RootProvider/RootProvider.d.ts +19 -0
- package/dist/components/Searchbar/Autocomplete.d.ts +9 -0
- package/dist/components/Searchbar/AutocompleteBase.d.ts +7 -0
- package/dist/components/Searchbar/AutocompleteGroup.d.ts +6 -0
- package/dist/components/Searchbar/AutocompleteItem.d.ts +13 -0
- package/dist/components/Searchbar/SearchField.d.ts +16 -0
- package/dist/components/Searchbar/Searchbar.d.ts +9 -0
- package/dist/components/Searchbar/SearchbarBase.d.ts +8 -0
- package/dist/components/Snackbar/Snackbar.d.ts +21 -0
- package/dist/components/Snackbar/SnackbarBase.d.ts +13 -0
- package/dist/components/Snackbar/SnackbarLabel.d.ts +5 -0
- package/dist/components/Snackbar/SnackbarMedia.d.ts +6 -0
- package/dist/components/Toolbar/Toolbar.d.ts +15 -0
- package/dist/components/Toolbar/ToolbarAdd.d.ts +10 -0
- package/dist/components/Toolbar/ToolbarBase.d.ts +7 -0
- package/dist/components/Toolbar/ToolbarButton.d.ts +14 -0
- package/dist/components/Toolbar/ToolbarFilter.d.ts +23 -0
- package/dist/components/Toolbar/ToolbarFilterBase.d.ts +6 -0
- package/dist/components/Toolbar/ToolbarMenu.d.ts +13 -0
- package/dist/components/Toolbar/ToolbarOptions.d.ts +18 -0
- package/dist/components/Toolbar/ToolbarSearch.d.ts +8 -0
- package/dist/components/Typography/Heading.d.ts +10 -0
- package/dist/components/Typography/Typography.d.ts +11 -0
- package/{lib/components/index.ts → dist/components/index.d.ts} +3 -1
- package/dist/hooks/useClickOutside.d.ts +2 -0
- package/dist/hooks/useEscapeKey.d.ts +1 -0
- package/dist/hooks/useMenu.d.ts +21 -0
- package/dist/index.css +1 -0
- package/dist/index.es.js +3340 -0
- package/package.json +27 -19
- package/.github/workflows/ci-cd-main.yml +0 -47
- package/.github/workflows/ci-cd-pull-request.yml +0 -39
- package/.github/workflows/workflow-deploy-storybook.yml +0 -35
- package/.node-version +0 -1
- package/.storybook/StoryDecorator.tsx +0 -29
- package/.storybook/ThemeProvider.tsx +0 -16
- package/.storybook/main.ts +0 -20
- package/.storybook/preview.tsx +0 -63
- package/.storybook/storyDecorator.module.css +0 -20
- package/.storybook/theme.module.css +0 -3
- package/CHANGELOG.md +0 -90
- package/CONTRIBUTING.MD +0 -59
- package/biome.jsonc +0 -65
- package/lib/components/Attachment/AttachmentLink.stories.ts +0 -19
- package/lib/components/Attachment/AttachmentLink.tsx +0 -20
- package/lib/components/Attachment/AttachmentList.stories.ts +0 -39
- package/lib/components/Attachment/AttachmentList.tsx +0 -26
- package/lib/components/Attachment/attachmentLink.module.css +0 -20
- package/lib/components/Attachment/attachmentList.module.css +0 -12
- package/lib/components/Avatar/Avatar.tsx +0 -83
- package/lib/components/Avatar/AvatarGroup.stories.ts +0 -66
- package/lib/components/Avatar/AvatarGroup.tsx +0 -60
- package/lib/components/Avatar/avatar.module.css +0 -61
- package/lib/components/Avatar/avatar.stories.tsx +0 -40
- package/lib/components/Avatar/avatarGroup.module.css +0 -78
- package/lib/components/Avatar/color.ts +0 -71
- package/lib/components/Badge/Badge.stories.ts +0 -32
- package/lib/components/Badge/Badge.tsx +0 -22
- package/lib/components/Badge/badge.module.css +0 -27
- package/lib/components/Button/Button.stories.ts +0 -50
- package/lib/components/Button/Button.tsx +0 -60
- package/lib/components/Button/ButtonBase.tsx +0 -53
- package/lib/components/Button/ButtonIcon.tsx +0 -16
- package/lib/components/Button/ButtonLabel.tsx +0 -18
- package/lib/components/Button/Buttons.stories.tsx +0 -64
- package/lib/components/Button/ComboButton.stories.ts +0 -45
- package/lib/components/Button/ComboButton.tsx +0 -46
- package/lib/components/Button/IconButton.stories.tsx +0 -47
- package/lib/components/Button/IconButton.tsx +0 -31
- package/lib/components/Button/button.module.css +0 -22
- package/lib/components/Button/buttonBase.module.css +0 -142
- package/lib/components/Button/buttonIcon.module.css +0 -17
- package/lib/components/Button/buttonLabel.module.css +0 -17
- package/lib/components/Button/comboButton.module.css +0 -35
- package/lib/components/Button/iconButton.module.css +0 -31
- package/lib/components/ContextMenu/ContextMenu.stories.ts +0 -49
- package/lib/components/ContextMenu/ContextMenu.tsx +0 -20
- package/lib/components/ContextMenu/ContextMenuBase.tsx +0 -33
- package/lib/components/ContextMenu/contextMenuBase.module.css +0 -35
- package/lib/components/Dialog/Dialog.stories.ts +0 -331
- package/lib/components/Dialog/Dialog.tsx +0 -111
- package/lib/components/Dialog/DialogActions.stories.ts +0 -60
- package/lib/components/Dialog/DialogActions.tsx +0 -80
- package/lib/components/Dialog/DialogActivityLog.tsx +0 -18
- package/lib/components/Dialog/DialogArticleBase.tsx +0 -10
- package/lib/components/Dialog/DialogAttachments.stories.ts +0 -38
- package/lib/components/Dialog/DialogAttachments.tsx +0 -25
- package/lib/components/Dialog/DialogBase.tsx +0 -10
- package/lib/components/Dialog/DialogBodyBase.tsx +0 -17
- package/lib/components/Dialog/DialogBorder.tsx +0 -19
- package/lib/components/Dialog/DialogContent.stories.ts +0 -26
- package/lib/components/Dialog/DialogContent.tsx +0 -23
- package/lib/components/Dialog/DialogFooter.tsx +0 -14
- package/lib/components/Dialog/DialogGroup.tsx +0 -24
- package/lib/components/Dialog/DialogHeader.stories.ts +0 -24
- package/lib/components/Dialog/DialogHeader.tsx +0 -23
- package/lib/components/Dialog/DialogHeaderBase.tsx +0 -10
- package/lib/components/Dialog/DialogHeadings.stories.ts +0 -35
- package/lib/components/Dialog/DialogHeadings.tsx +0 -77
- package/lib/components/Dialog/DialogHistory.stories.ts +0 -67
- package/lib/components/Dialog/DialogHistory.tsx +0 -19
- package/lib/components/Dialog/DialogList.stories.ts +0 -65
- package/lib/components/Dialog/DialogList.tsx +0 -35
- package/lib/components/Dialog/DialogListItem.stories.tsx +0 -238
- package/lib/components/Dialog/DialogListItem.tsx +0 -126
- package/lib/components/Dialog/DialogListItemBase.tsx +0 -52
- package/lib/components/Dialog/DialogMetadata.stories.ts +0 -75
- package/lib/components/Dialog/DialogMetadata.tsx +0 -56
- package/lib/components/Dialog/DialogNav.stories.ts +0 -88
- package/lib/components/Dialog/DialogNav.tsx +0 -56
- package/lib/components/Dialog/DialogSectionBase.tsx +0 -20
- package/lib/components/Dialog/DialogSeenBy.stories.tsx +0 -56
- package/lib/components/Dialog/DialogSeenBy.tsx +0 -36
- package/lib/components/Dialog/DialogSelect.tsx +0 -23
- package/lib/components/Dialog/DialogStatus.stories.ts +0 -57
- package/lib/components/Dialog/DialogStatus.tsx +0 -61
- package/lib/components/Dialog/DialogTitle.stories.ts +0 -31
- package/lib/components/Dialog/DialogTitle.tsx +0 -31
- package/lib/components/Dialog/DialogTouchedBy.stories.tsx +0 -27
- package/lib/components/Dialog/DialogTouchedBy.tsx +0 -19
- package/lib/components/Dialog/dialog.module.css +0 -21
- package/lib/components/Dialog/dialogAction.module.css +0 -26
- package/lib/components/Dialog/dialogArticleBase.module.css +0 -5
- package/lib/components/Dialog/dialogBodyBase.module.css +0 -13
- package/lib/components/Dialog/dialogBorder.module.css +0 -42
- package/lib/components/Dialog/dialogGroup.module.css +0 -35
- package/lib/components/Dialog/dialogHeaderBase.module.css +0 -6
- package/lib/components/Dialog/dialogHeadings.module.css +0 -24
- package/lib/components/Dialog/dialogHistory.module.css +0 -12
- package/lib/components/Dialog/dialogListItem.module.css +0 -81
- package/lib/components/Dialog/dialogListItemBase.module.css +0 -28
- package/lib/components/Dialog/dialogNav.module.css +0 -12
- package/lib/components/Dialog/dialogSectionBase.module.css +0 -11
- package/lib/components/Dialog/dialogSelect.module.css +0 -34
- package/lib/components/Dialog/dialogTitle.module.css +0 -47
- package/lib/components/Dropdown/Backdrop.tsx +0 -12
- package/lib/components/Dropdown/DrawerBase.tsx +0 -20
- package/lib/components/Dropdown/DrawerBody.tsx +0 -12
- package/lib/components/Dropdown/DrawerButton.tsx +0 -17
- package/lib/components/Dropdown/DrawerFooter.tsx +0 -12
- package/lib/components/Dropdown/DrawerHeader.tsx +0 -19
- package/lib/components/Dropdown/DrawerOrDropdown.tsx +0 -29
- package/lib/components/Dropdown/DropdownBase.tsx +0 -32
- package/lib/components/Dropdown/backdrop.module.css +0 -11
- package/lib/components/Dropdown/drawerBase.module.css +0 -17
- package/lib/components/Dropdown/drawerBody.module.css +0 -5
- package/lib/components/Dropdown/drawerButton.module.css +0 -6
- package/lib/components/Dropdown/drawerFooter.module.css +0 -13
- package/lib/components/Dropdown/drawerHeader.module.css +0 -17
- package/lib/components/Dropdown/drawerOrDropdown.module.css +0 -19
- package/lib/components/Dropdown/dropdownBase.module.css +0 -34
- package/lib/components/Footer/Footer.stories.ts +0 -37
- package/lib/components/Footer/Footer.tsx +0 -21
- package/lib/components/Footer/FooterAddress.tsx +0 -12
- package/lib/components/Footer/FooterBase.tsx +0 -16
- package/lib/components/Footer/FooterLogo.tsx +0 -17
- package/lib/components/Footer/FooterMenu.tsx +0 -43
- package/lib/components/Footer/footerAddress.module.css +0 -8
- package/lib/components/Footer/footerBase.module.css +0 -28
- package/lib/components/Footer/footerLogo.module.css +0 -12
- package/lib/components/Footer/footerMenu.module.css +0 -35
- package/lib/components/GlobalMenu/AccountButton.tsx +0 -30
- package/lib/components/GlobalMenu/AccountMenu.stories.tsx +0 -65
- package/lib/components/GlobalMenu/AccountMenu.tsx +0 -82
- package/lib/components/GlobalMenu/BackButton.tsx +0 -10
- package/lib/components/GlobalMenu/GlobalMenu.stories.tsx +0 -181
- package/lib/components/GlobalMenu/GlobalMenu.tsx +0 -81
- package/lib/components/GlobalMenu/GlobalMenuBase.tsx +0 -22
- package/lib/components/GlobalMenu/LogoutButton.tsx +0 -19
- package/lib/components/GlobalMenu/globalMenuBase.module.css +0 -39
- package/lib/components/GlobalMenu/logoutButton.module.css +0 -9
- package/lib/components/Header/DigdirLogomark.tsx +0 -23
- package/lib/components/Header/Header.stories.tsx +0 -188
- package/lib/components/Header/Header.tsx +0 -74
- package/lib/components/Header/HeaderBase.tsx +0 -21
- package/lib/components/Header/HeaderButton.stories.ts +0 -70
- package/lib/components/Header/HeaderButton.tsx +0 -67
- package/lib/components/Header/HeaderLogo.stories.ts +0 -17
- package/lib/components/Header/HeaderLogo.tsx +0 -22
- package/lib/components/Header/HeaderMenu.tsx +0 -17
- package/lib/components/Header/header.module.css +0 -45
- package/lib/components/Header/headerBase.module.css +0 -51
- package/lib/components/Header/headerButton.module.css +0 -37
- package/lib/components/Header/headerLogo.module.css +0 -24
- package/lib/components/Header/headerMenu.module.css +0 -3
- package/lib/components/Header/mobileMenu.module.css +0 -28
- package/lib/components/History/HistoryAttachments.tsx +0 -22
- package/lib/components/History/HistoryBorder.tsx +0 -17
- package/lib/components/History/HistoryItem.stories.ts +0 -56
- package/lib/components/History/HistoryItem.tsx +0 -56
- package/lib/components/History/HistoryList.stories.ts +0 -70
- package/lib/components/History/HistoryList.tsx +0 -26
- package/lib/components/History/historyBorder.module.css +0 -8
- package/lib/components/History/historyItem.module.css +0 -19
- package/lib/components/History/historyList.module.css +0 -12
- package/lib/components/Icon/CheckboxCheckedIcon.tsx +0 -28
- package/lib/components/Icon/CheckboxIcon.stories.ts +0 -32
- package/lib/components/Icon/CheckboxIcon.tsx +0 -17
- package/lib/components/Icon/CheckboxUncheckedIcon.tsx +0 -38
- package/lib/components/Icon/Icon.stories.ts +0 -24
- package/lib/components/Icon/Icon.tsx +0 -23
- package/lib/components/Icon/ProgressIcon.stories.ts +0 -43
- package/lib/components/Icon/ProgressIcon.tsx +0 -44
- package/lib/components/Icon/RadioCheckedIcon.tsx +0 -29
- package/lib/components/Icon/RadioIcon.stories.ts +0 -32
- package/lib/components/Icon/RadioIcon.tsx +0 -17
- package/lib/components/Icon/RadioUncheckedIcon.tsx +0 -30
- package/lib/components/Icon/SvgIcon.tsx +0 -18
- package/lib/components/Icon/__AkselIcon.tsx +0 -37
- package/lib/components/Icon/checkboxIcon.module.css +0 -23
- package/lib/components/Icon/icon.module.css +0 -4
- package/lib/components/Icon/iconsMap.tsx +0 -2078
- package/lib/components/Icon/progressIcon.module.css +0 -29
- package/lib/components/Icon/radioIcon.module.css +0 -21
- package/lib/components/Layout/Layout.stories.tsx +0 -308
- package/lib/components/Layout/Layout.tsx +0 -46
- package/lib/components/Layout/LayoutBase.stories.ts +0 -17
- package/lib/components/Layout/LayoutBase.tsx +0 -31
- package/lib/components/Layout/LayoutBody.stories.ts +0 -17
- package/lib/components/Layout/LayoutBody.tsx +0 -16
- package/lib/components/Layout/LayoutContent.stories.ts +0 -17
- package/lib/components/Layout/LayoutContent.tsx +0 -15
- package/lib/components/Layout/LayoutSidebar.stories.ts +0 -17
- package/lib/components/Layout/LayoutSidebar.tsx +0 -23
- package/lib/components/Layout/layoutBase.module.css +0 -22
- package/lib/components/Layout/layoutBody.module.css +0 -15
- package/lib/components/Layout/layoutContent.module.css +0 -13
- package/lib/components/Layout/layoutSidebar.module.css +0 -20
- package/lib/components/LayoutAction/ActionFooter.stories.tsx +0 -70
- package/lib/components/LayoutAction/ActionFooter.tsx +0 -15
- package/lib/components/LayoutAction/ActionHeader.stories.ts +0 -20
- package/lib/components/LayoutAction/ActionHeader.tsx +0 -19
- package/lib/components/LayoutAction/ActionMenu.stories.tsx +0 -40
- package/lib/components/LayoutAction/ActionMenu.tsx +0 -23
- package/lib/components/LayoutAction/actionFooter.module.css +0 -28
- package/lib/components/LayoutAction/actionHeader.module.css +0 -55
- package/lib/components/LayoutAction/actionMenu.module.css +0 -30
- package/lib/components/List/List.stories.tsx +0 -43
- package/lib/components/List/List.tsx +0 -20
- package/lib/components/List/ListBase.tsx +0 -19
- package/lib/components/List/ListItem.stories.tsx +0 -208
- package/lib/components/List/ListItem.tsx +0 -73
- package/lib/components/List/ListItemBase.tsx +0 -78
- package/lib/components/List/ListItemLabel.tsx +0 -29
- package/lib/components/List/ListItemMedia.tsx +0 -59
- package/lib/components/List/listBase.module.css +0 -16
- package/lib/components/List/listItemBase.module.css +0 -90
- package/lib/components/List/listItemLabel.module.css +0 -55
- package/lib/components/List/listItemMedia.module.css +0 -41
- package/lib/components/Menu/Menu.stories.ts +0 -514
- package/lib/components/Menu/Menu.tsx +0 -24
- package/lib/components/Menu/MenuBase.tsx +0 -63
- package/lib/components/Menu/MenuHeader.tsx +0 -13
- package/lib/components/Menu/MenuItem.stories.tsx +0 -164
- package/lib/components/Menu/MenuItem.tsx +0 -63
- package/lib/components/Menu/MenuItemBase.tsx +0 -77
- package/lib/components/Menu/MenuItemLabel.tsx +0 -30
- package/lib/components/Menu/MenuItemMedia.tsx +0 -42
- package/lib/components/Menu/MenuItems.stories.ts +0 -438
- package/lib/components/Menu/MenuItems.tsx +0 -96
- package/lib/components/Menu/MenuOption.stories.ts +0 -52
- package/lib/components/Menu/MenuOption.tsx +0 -48
- package/lib/components/Menu/MenuSearch.stories.ts +0 -18
- package/lib/components/Menu/MenuSearch.tsx +0 -25
- package/lib/components/Menu/menu.module.css +0 -25
- package/lib/components/Menu/menuBase.module.css +0 -25
- package/lib/components/Menu/menuHeader.module.css +0 -12
- package/lib/components/Menu/menuItemBase.module.css +0 -72
- package/lib/components/Menu/menuItemLabel.module.css +0 -32
- package/lib/components/Menu/menuItemMedia.module.css +0 -38
- package/lib/components/Menu/menuOption.module.css +0 -27
- package/lib/components/Menu/menuSearch.module.css +0 -30
- package/lib/components/Meta/MetaBase.tsx +0 -15
- package/lib/components/Meta/MetaItem.stories.ts +0 -25
- package/lib/components/Meta/MetaItem.tsx +0 -31
- package/lib/components/Meta/MetaItemBase.tsx +0 -46
- package/lib/components/Meta/MetaItemLabel.tsx +0 -20
- package/lib/components/Meta/MetaItemMedia.tsx +0 -22
- package/lib/components/Meta/MetaList.stories.ts +0 -29
- package/lib/components/Meta/MetaList.tsx +0 -43
- package/lib/components/Meta/MetaProgress.stories.ts +0 -29
- package/lib/components/Meta/MetaProgress.tsx +0 -26
- package/lib/components/Meta/MetaTimestamp.stories.ts +0 -33
- package/lib/components/Meta/MetaTimestamp.tsx +0 -29
- package/lib/components/Meta/meta.module.css +0 -6
- package/lib/components/Meta/metaItem.module.css +0 -107
- package/lib/components/Meta/metaList.module.css +0 -15
- package/lib/components/Page/PageBase.tsx +0 -14
- package/lib/components/Page/PageHeader.tsx +0 -21
- package/lib/components/Page/PageHeaderMedia.tsx +0 -25
- package/lib/components/Page/SectionBase.tsx +0 -52
- package/lib/components/Page/SectionFooter.tsx +0 -15
- package/lib/components/Page/SectionHeader.tsx +0 -16
- package/lib/components/Page/pageHeader.module.css +0 -5
- package/lib/components/Page/sectionBase.module.css +0 -82
- package/lib/components/Page/sectionFooter.module.css +0 -8
- package/lib/components/Page/sectionHeader.module.css +0 -9
- package/lib/components/RootProvider/RootProvider.tsx +0 -55
- package/lib/components/Searchbar/Autocomplete.stories.tsx +0 -77
- package/lib/components/Searchbar/Autocomplete.tsx +0 -44
- package/lib/components/Searchbar/AutocompleteBase.tsx +0 -16
- package/lib/components/Searchbar/AutocompleteGroup.tsx +0 -17
- package/lib/components/Searchbar/AutocompleteItem.tsx +0 -23
- package/lib/components/Searchbar/SearchField.tsx +0 -78
- package/lib/components/Searchbar/Searchbar.stories.tsx +0 -151
- package/lib/components/Searchbar/Searchbar.tsx +0 -18
- package/lib/components/Searchbar/SearchbarBase.tsx +0 -23
- package/lib/components/Searchbar/autocompleteBase.module.css +0 -17
- package/lib/components/Searchbar/autocompleteGroup.module.css +0 -3
- package/lib/components/Searchbar/autocompleteItem.module.css +0 -19
- package/lib/components/Searchbar/searchField.module.css +0 -54
- package/lib/components/Searchbar/searchbarBase.module.css +0 -20
- package/lib/components/Snackbar/Snackbar.stories.tsx +0 -21
- package/lib/components/Snackbar/Snackbar.tsx +0 -32
- package/lib/components/Snackbar/SnackbarBase.tsx +0 -39
- package/lib/components/Snackbar/SnackbarLabel.tsx +0 -10
- package/lib/components/Snackbar/SnackbarMedia.tsx +0 -14
- package/lib/components/Snackbar/snackbarBase.module.css +0 -55
- package/lib/components/Snackbar/snackbarLabel.module.css +0 -6
- package/lib/components/Snackbar/snackbarMedia.module.css +0 -10
- package/lib/components/Toolbar/Toolbar.stories.tsx +0 -188
- package/lib/components/Toolbar/Toolbar.tsx +0 -156
- package/lib/components/Toolbar/ToolbarAdd.stories.ts +0 -23
- package/lib/components/Toolbar/ToolbarAdd.tsx +0 -26
- package/lib/components/Toolbar/ToolbarBase.tsx +0 -12
- package/lib/components/Toolbar/ToolbarButton.stories.ts +0 -32
- package/lib/components/Toolbar/ToolbarButton.tsx +0 -65
- package/lib/components/Toolbar/ToolbarFilter.stories.ts +0 -64
- package/lib/components/Toolbar/ToolbarFilter.tsx +0 -75
- package/lib/components/Toolbar/ToolbarMenu.stories.ts +0 -37
- package/lib/components/Toolbar/ToolbarMenu.tsx +0 -29
- package/lib/components/Toolbar/ToolbarOptions.stories.ts +0 -108
- package/lib/components/Toolbar/ToolbarOptions.tsx +0 -74
- package/lib/components/Toolbar/ToolbarSearch.stories.ts +0 -19
- package/lib/components/Toolbar/ToolbarSearch.tsx +0 -24
- package/lib/components/Toolbar/toolbarAdd.module.css +0 -7
- package/lib/components/Toolbar/toolbarBase.module.css +0 -19
- package/lib/components/Toolbar/toolbarButton.module.css +0 -3
- package/lib/components/Toolbar/toolbarFilter.module.css +0 -25
- package/lib/components/Toolbar/toolbarMenu.module.css +0 -7
- package/lib/components/Toolbar/toolbarSearch.module.css +0 -28
- package/lib/components/Typography/Heading.tsx +0 -23
- package/lib/components/Typography/Typography.tsx +0 -24
- package/lib/components/Typography/heading.module.css +0 -21
- package/lib/components/Typography/typography.module.css +0 -64
- package/lib/css/colors.css +0 -113
- package/lib/css/global.css +0 -15
- package/lib/css/shadows.css +0 -7
- package/lib/css/theme-article.css +0 -15
- package/lib/css/theme-company.css +0 -15
- package/lib/css/theme-global-dark.css +0 -19
- package/lib/css/theme-global.css +0 -15
- package/lib/css/theme-neutral.css +0 -15
- package/lib/css/theme-person.css +0 -15
- package/lib/css/theme.css +0 -22
- package/lib/hooks/useClickOutside.ts +0 -22
- package/lib/hooks/useEscapeKey.ts +0 -17
- package/lib/hooks/useMenu.tsx +0 -80
- package/lib/stories/Color/MenuItem.stories.tsx +0 -43
- package/lib/stories/Color/Swatches.stories.tsx +0 -19
- package/lib/stories/Color/Swatches.tsx +0 -42
- package/lib/stories/Color/colors.json +0 -62
- package/lib/stories/Color/swatches.module.css +0 -14
- package/lib/stories/Inbox/BookmarksPage.tsx +0 -52
- package/lib/stories/Inbox/DialogPage.tsx +0 -15
- package/lib/stories/Inbox/Inbox.stories.tsx +0 -55
- package/lib/stories/Inbox/Inbox.tsx +0 -12
- package/lib/stories/Inbox/InboxLayout.tsx +0 -51
- package/lib/stories/Inbox/InboxPage.tsx +0 -50
- package/lib/stories/Inbox/InboxProvider.tsx +0 -135
- package/lib/stories/Inbox/InboxSection.tsx +0 -39
- package/lib/stories/Inbox/InboxToolbar.tsx +0 -94
- package/lib/stories/Inbox/ProfilePage.tsx +0 -35
- package/lib/stories/Inbox/SettingsPage.tsx +0 -19
- package/lib/stories/Inbox/accounts/accounts.ts +0 -24
- package/lib/stories/Inbox/accounts/index.ts +0 -1
- package/lib/stories/Inbox/actionMenu.ts +0 -24
- package/lib/stories/Inbox/dialogs/brreg-completed.json +0 -35
- package/lib/stories/Inbox/dialogs/brreg-draft.json +0 -45
- package/lib/stories/Inbox/dialogs/index.ts +0 -10
- package/lib/stories/Inbox/dialogs/skatt-2023.json +0 -33
- package/lib/stories/Inbox/groupBy.ts +0 -19
- package/lib/stories/Inbox/inboxSection.module.css +0 -19
- package/lib/stories/Inbox/index.ts +0 -15
- package/lib/stories/Inbox/layout/footer.ts +0 -27
- package/lib/stories/Inbox/layout/header.ts +0 -11
- package/lib/stories/Inbox/layout/index.ts +0 -3
- package/lib/stories/Inbox/layout/menu.ts +0 -64
- package/renovate.json +0 -4
- package/tsconfig.json +0 -28
- package/tsconfig.node.json +0 -11
- package/typings.d.ts +0 -1
- package/vite.config.ts +0 -20
- /package/{lib/components/Attachment/index.ts → dist/components/Attachment/index.d.ts} +0 -0
- /package/{lib/components/Avatar/index.ts → dist/components/Avatar/index.d.ts} +0 -0
- /package/{lib/components/Badge/index.tsx → dist/components/Badge/index.d.ts} +0 -0
- /package/{lib/components/Button/index.ts → dist/components/Button/index.d.ts} +0 -0
- /package/{lib/components/ContextMenu/index.ts → dist/components/ContextMenu/index.d.ts} +0 -0
- /package/{lib/components/Dialog/index.ts → dist/components/Dialog/index.d.ts} +0 -0
- /package/{lib/components/Footer/index.ts → dist/components/Footer/index.d.ts} +0 -0
- /package/{lib/components/GlobalMenu/index.tsx → dist/components/GlobalMenu/index.d.ts} +0 -0
- /package/{lib/components/Header/index.tsx → dist/components/Header/index.d.ts} +0 -0
- /package/{lib/components/History/index.ts → dist/components/History/index.d.ts} +0 -0
- /package/{lib/components/Icon/index.ts → dist/components/Icon/index.d.ts} +0 -0
- /package/{lib/components/Layout/index.tsx → dist/components/Layout/index.d.ts} +0 -0
- /package/{lib/components/LayoutAction/index.ts → dist/components/LayoutAction/index.d.ts} +0 -0
- /package/{lib/components/List/index.ts → dist/components/List/index.d.ts} +0 -0
- /package/{lib/components/Meta/index.ts → dist/components/Meta/index.d.ts} +0 -0
- /package/{lib/components/Page/index.ts → dist/components/Page/index.d.ts} +0 -0
- /package/{lib/components/RootProvider/index.ts → dist/components/RootProvider/index.d.ts} +0 -0
- /package/{lib/components/Searchbar/index.ts → dist/components/Searchbar/index.d.ts} +0 -0
- /package/{lib/components/Snackbar/index.ts → dist/components/Snackbar/index.d.ts} +0 -0
- /package/{lib/components/Toolbar/index.ts → dist/components/Toolbar/index.d.ts} +0 -0
- /package/{lib/components/Typography/index.ts → dist/components/Typography/index.d.ts} +0 -0
- /package/{lib/hooks/index.ts → dist/hooks/index.d.ts} +0 -0
- /package/{lib/index.ts → dist/index.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ Tested with Node.js 20.x <
|
|
|
19
19
|
|
|
20
20
|
## Requirements
|
|
21
21
|
|
|
22
|
-
React `>=18`in your project.
|
|
22
|
+
React `>=18`in your project and [@navikt/aksel-icons](https://www.npmjs.com/package/@navikt/aksel-icons) `>= 7.2.1` as a peer dependency.
|
|
23
23
|
|
|
24
24
|
## Usage
|
|
25
25
|
Wrap your application in RootProvider to enable shared context across all components. Here’s a basic setup:
|
|
@@ -44,9 +44,21 @@ import { Avatar, type AvatarVariant } from '@altinn/components';
|
|
|
44
44
|
```
|
|
45
45
|
and import the css file in your application once:
|
|
46
46
|
```ts
|
|
47
|
-
import '@altinn/altinn-components/lib/css/
|
|
47
|
+
import '@altinn/altinn-components/lib/css/index.css';
|
|
48
48
|
```
|
|
49
49
|
for correct `font-family` and minimal collection of resets.
|
|
50
50
|
|
|
51
|
+
Using `nextjs`?
|
|
52
|
+
|
|
53
|
+
You probably need to transpile the package. Add the following to your `next.config.js`:
|
|
54
|
+
|
|
55
|
+
```js
|
|
56
|
+
/** @type {import('next').NextConfig} */
|
|
57
|
+
const nextConfig = {
|
|
58
|
+
transpilePackages: ['@altinn/components'],
|
|
59
|
+
}
|
|
60
|
+
module.exports = nextConfig
|
|
61
|
+
```
|
|
62
|
+
|
|
51
63
|
## Documentation
|
|
52
64
|
The documentation for the components can be found in the [Storybook](https://altinn.github.io/altinn-components)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IconName } from '../Icon';
|
|
2
|
+
export interface AttachmentLinkProps {
|
|
3
|
+
/** Link url */
|
|
4
|
+
href: string;
|
|
5
|
+
/** Label (filename) */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Icon */
|
|
8
|
+
icon?: IconName;
|
|
9
|
+
}
|
|
10
|
+
export declare const AttachmentLink: ({ icon, href, label }: AttachmentLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TypographySize } from '../Typography';
|
|
2
|
+
import { AttachmentLinkProps } from './AttachmentLink';
|
|
3
|
+
export interface AttachmentListProps {
|
|
4
|
+
items: AttachmentLinkProps[];
|
|
5
|
+
size?: TypographySize;
|
|
6
|
+
}
|
|
7
|
+
export declare const AttachmentList: ({ size, items }: AttachmentListProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type AvatarType = 'company' | 'person' | 'custom';
|
|
2
|
+
export type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Avatar component.
|
|
5
|
+
*/
|
|
6
|
+
export interface AvatarProps {
|
|
7
|
+
/** The name to display in the avatar. */
|
|
8
|
+
name: string;
|
|
9
|
+
/** The type of avatar. */
|
|
10
|
+
type?: AvatarType;
|
|
11
|
+
/** The size of the avatar. */
|
|
12
|
+
size?: AvatarSize;
|
|
13
|
+
/** Additional class names to apply to the avatar. */
|
|
14
|
+
className?: string;
|
|
15
|
+
/** URL of the image to display in the avatar. */
|
|
16
|
+
imageUrl?: string;
|
|
17
|
+
/** Alt text for the image. */
|
|
18
|
+
imageUrlAlt?: string;
|
|
19
|
+
/** Whether to display an outline around the avatar. */
|
|
20
|
+
outline?: boolean;
|
|
21
|
+
/** Custom label to display inside the avatar. */
|
|
22
|
+
customLabel?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Avatar component to display user or company avatars with various customization options.
|
|
26
|
+
*/
|
|
27
|
+
export declare const Avatar: ({ type, size, name, outline, imageUrl, imageUrlAlt, customLabel, className, }: AvatarProps) => JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AvatarProps, AvatarSize, AvatarType } from '.';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the AvatarGroup components.
|
|
4
|
+
*/
|
|
5
|
+
export interface AvatarGroupProps {
|
|
6
|
+
/** Array of avatars to display in the group, each specified by AvatarProps. */
|
|
7
|
+
items?: AvatarProps[];
|
|
8
|
+
/** Maximum number of avatars to show in the group. Remaining avatars are summarized in a "+X" label. */
|
|
9
|
+
maxItemsCount?: number;
|
|
10
|
+
/** Default avatar type to apply if not specified in individual items. This affects the styling. */
|
|
11
|
+
defaultType?: AvatarType;
|
|
12
|
+
/** Size of all avatars in the group (e.g., 'sm', 'md', 'lg'). */
|
|
13
|
+
size?: AvatarSize;
|
|
14
|
+
/** Additional CSS class for styling the avatar group container. */
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Avatar group component for displaying multiple avatars as a group.
|
|
19
|
+
*/
|
|
20
|
+
export declare const AvatarGroup: ({ items, maxItemsCount, defaultType, size, className, }: AvatarGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type BadgeColor = 'subtle' | 'alert';
|
|
3
|
+
export type BadgeSize = 'sm';
|
|
4
|
+
export interface BadgeProps {
|
|
5
|
+
label?: string | number;
|
|
6
|
+
color?: BadgeColor;
|
|
7
|
+
size?: BadgeSize;
|
|
8
|
+
className?: string;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const Badge: ({ label, color, size, className, children }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ListSpacing } from '../';
|
|
2
|
+
import { BookmarksListItemProps } from './BookmarksListItem';
|
|
3
|
+
export interface BookmarksListProps {
|
|
4
|
+
items: BookmarksListItemProps[];
|
|
5
|
+
spacing: ListSpacing;
|
|
6
|
+
}
|
|
7
|
+
export declare const BookmarksList: ({ items, spacing }: BookmarksListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
import { ListItemSize } from '..';
|
|
3
|
+
import { QueryItemProps } from './QueryLabel';
|
|
4
|
+
export interface BookmarksListItemProps {
|
|
5
|
+
id: string;
|
|
6
|
+
/** Element type to render */
|
|
7
|
+
as?: ElementType;
|
|
8
|
+
/** ELement link */
|
|
9
|
+
href?: string;
|
|
10
|
+
/** Optional onClick */
|
|
11
|
+
onClick?(): void;
|
|
12
|
+
/** Size of list item */
|
|
13
|
+
size?: ListItemSize;
|
|
14
|
+
/** Optional title */
|
|
15
|
+
title?: string;
|
|
16
|
+
/** Optional description */
|
|
17
|
+
description?: string;
|
|
18
|
+
/** Query params */
|
|
19
|
+
params?: QueryItemProps[];
|
|
20
|
+
}
|
|
21
|
+
export declare const BookmarksListItem: ({ size, title, description, params, ...rest }: BookmarksListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type QueryItemType = 'search' | 'filter';
|
|
2
|
+
export interface QueryItemProps {
|
|
3
|
+
type?: QueryItemType;
|
|
4
|
+
value?: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const QueryItem: ({ type, label }: QueryItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export interface QueryLabelProps {
|
|
9
|
+
params?: QueryItemProps[];
|
|
10
|
+
}
|
|
11
|
+
export declare const QueryLabel: ({ params }: QueryLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IconName } from '../Icon';
|
|
2
|
+
import { ButtonBaseProps } from './ButtonBase';
|
|
3
|
+
export interface ButtonProps extends Partial<ButtonBaseProps> {
|
|
4
|
+
icon?: IconName;
|
|
5
|
+
reverse?: boolean;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const Button: ({ variant, color, size, reverse, selected, icon, href, children, className, loading, ...rest }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ElementType, ReactNode } from 'react';
|
|
2
|
+
export type ButtonVariant = 'solid' | 'outline' | 'dotted' | 'text';
|
|
3
|
+
export type ButtonSize = 'sm' | 'md' | 'lg' | 'custom';
|
|
4
|
+
export type ButtonColor = 'primary' | 'secondary';
|
|
5
|
+
export interface ButtonBaseProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
/**
|
|
7
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
as?: ElementType;
|
|
11
|
+
size?: ButtonSize;
|
|
12
|
+
variant?: ButtonVariant;
|
|
13
|
+
color?: ButtonColor;
|
|
14
|
+
selected?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
href?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export declare const ButtonBase: ({ as, color, className, children, disabled, size, selected, variant, tabIndex, ...rest }: ButtonBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IconName } from '../Icon';
|
|
2
|
+
import { ButtonSize } from './ButtonBase';
|
|
3
|
+
export interface ButtonIconProps {
|
|
4
|
+
icon: IconName;
|
|
5
|
+
size: ButtonSize;
|
|
6
|
+
}
|
|
7
|
+
export declare const ButtonIcon: ({ size, icon }: ButtonIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonSize } from './ButtonBase';
|
|
3
|
+
export interface ButtonLabelProps {
|
|
4
|
+
size: ButtonSize;
|
|
5
|
+
className?: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const ButtonLabel: ({ className, size, children }: ButtonLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MouseEventHandler } from 'react';
|
|
2
|
+
import { IconName } from '../Icon';
|
|
3
|
+
import { ButtonBaseProps } from './ButtonBase';
|
|
4
|
+
export interface ComboButtonProps extends Omit<ButtonBaseProps, 'onClick'> {
|
|
5
|
+
icon: IconName;
|
|
6
|
+
onIconClick?: MouseEventHandler<HTMLButtonElement>;
|
|
7
|
+
onLabelClick?: MouseEventHandler<HTMLButtonElement>;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const ComboButton: ({ variant, color, size, selected, icon, children, className, onLabelClick, onIconClick, }: ComboButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MouseEventHandler } from 'react';
|
|
2
|
+
import { IconName } from '../Icon';
|
|
3
|
+
import { ButtonColor, ButtonSize, ButtonVariant } from './ButtonBase';
|
|
4
|
+
interface IconButtonProps {
|
|
5
|
+
icon: IconName;
|
|
6
|
+
color?: ButtonColor;
|
|
7
|
+
size?: ButtonSize;
|
|
8
|
+
iconSize?: ButtonSize;
|
|
9
|
+
variant?: ButtonVariant;
|
|
10
|
+
className?: string;
|
|
11
|
+
onClick?: MouseEventHandler;
|
|
12
|
+
}
|
|
13
|
+
export declare const IconButton: ({ variant, color, size, icon, iconSize, className, onClick, }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DropdownPlacement, MenuItemProps, MenuItemGroups } from '../';
|
|
2
|
+
export interface ContextMenuProps {
|
|
3
|
+
id: string;
|
|
4
|
+
items: MenuItemProps[];
|
|
5
|
+
placement?: DropdownPlacement;
|
|
6
|
+
groups?: MenuItemGroups;
|
|
7
|
+
}
|
|
8
|
+
export declare const ContextMenu: ({ id, placement, groups, items }: ContextMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DropdownPlacement } from '../';
|
|
3
|
+
export interface ContextMenuBaseProps {
|
|
4
|
+
placement: DropdownPlacement;
|
|
5
|
+
expanded: boolean;
|
|
6
|
+
onToggle?: () => void;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const ContextMenuBase: ({ placement, expanded, onToggle, children, }: ContextMenuBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Datepicker';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { DialogActivityLogProps } from './DialogActivityLog';
|
|
2
|
+
import { DialogAttachmentsProps } from './DialogAttachments';
|
|
3
|
+
import { DialogSeenByProps } from './DialogSeenBy';
|
|
4
|
+
import { ContextMenuProps } from '../ContextMenu/';
|
|
5
|
+
import { ReactNode } from 'react';
|
|
6
|
+
import { DialogActionButtonProps } from './DialogActions.tsx';
|
|
7
|
+
import { DialogRecipientProps, DialogSenderProps } from './DialogHeadings.tsx';
|
|
8
|
+
import { DialogHistoryProps } from './DialogHistory';
|
|
9
|
+
import { DialogBackButtonProps } from './DialogNav';
|
|
10
|
+
import { DialogStatusProps } from './DialogStatus';
|
|
11
|
+
export interface DialogProps {
|
|
12
|
+
/** Dialog id */
|
|
13
|
+
id: string;
|
|
14
|
+
/** Title */
|
|
15
|
+
title: string;
|
|
16
|
+
/** Back button */
|
|
17
|
+
backButton?: DialogBackButtonProps;
|
|
18
|
+
/** Context menu */
|
|
19
|
+
menu?: ContextMenuProps;
|
|
20
|
+
/** Dialog status */
|
|
21
|
+
status?: DialogStatusProps;
|
|
22
|
+
/** Updated date time */
|
|
23
|
+
updatedAt?: string;
|
|
24
|
+
/** Updated label */
|
|
25
|
+
updatedAtLabel?: string;
|
|
26
|
+
/** Due date */
|
|
27
|
+
dueAt?: string;
|
|
28
|
+
/** Due at label */
|
|
29
|
+
dueAtLabel?: string;
|
|
30
|
+
/** Sender */
|
|
31
|
+
sender?: DialogSenderProps;
|
|
32
|
+
/** Recipient */
|
|
33
|
+
recipient?: DialogRecipientProps;
|
|
34
|
+
/** Summary */
|
|
35
|
+
summary?: string;
|
|
36
|
+
/** Body (should be an output markdown/html rendered to React / HTML) */
|
|
37
|
+
body?: ReactNode;
|
|
38
|
+
/** List of action (buttons) */
|
|
39
|
+
actions?: DialogActionButtonProps[];
|
|
40
|
+
/** Dialog attachments */
|
|
41
|
+
attachments?: DialogAttachmentsProps;
|
|
42
|
+
/** Dialog is seen by the end user or others */
|
|
43
|
+
seenBy?: DialogSeenByProps;
|
|
44
|
+
/** Activity Log */
|
|
45
|
+
activityLog?: DialogActivityLogProps;
|
|
46
|
+
/** More information about the dialog, process, etc. */
|
|
47
|
+
additionalInfo?: string;
|
|
48
|
+
/** History */
|
|
49
|
+
history?: DialogHistoryProps;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Full representation of a dialog, including attachments, actions and history,
|
|
53
|
+
*/
|
|
54
|
+
export declare const Dialog: ({ backButton, menu, updatedAt, updatedAtLabel, dueAt, dueAtLabel, status, title, sender, recipient, summary, body, actions, attachments, history, seenBy, activityLog, additionalInfo, }: DialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MouseEventHandler } from 'react';
|
|
2
|
+
export type DialogButtonPriority = 'primary' | 'secondary' | 'tertiary';
|
|
3
|
+
export interface DialogActionButtonProps {
|
|
4
|
+
id: string;
|
|
5
|
+
priority: DialogButtonPriority;
|
|
6
|
+
label?: string;
|
|
7
|
+
onClick?: MouseEventHandler;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface DialogActionsProps {
|
|
11
|
+
/** List of actions */
|
|
12
|
+
items: DialogActionButtonProps[];
|
|
13
|
+
/** How many actions to display before turning into a ComboButton */
|
|
14
|
+
maxItems?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare const DialogActions: ({ items, maxItems }: DialogActionsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ElementType, MouseEventHandler } from 'react';
|
|
2
|
+
import { MetaItemSize } from '../Meta';
|
|
3
|
+
export interface DialogActivityLogProps {
|
|
4
|
+
size?: MetaItemSize;
|
|
5
|
+
label?: string;
|
|
6
|
+
as?: ElementType;
|
|
7
|
+
onClick?: MouseEventHandler;
|
|
8
|
+
href?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const DialogActivityLog: ({ size, label, ...rest }: DialogActivityLogProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AttachmentLinkProps } from '../Attachment';
|
|
2
|
+
export interface DialogAttachmentsProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
items?: AttachmentLinkProps[];
|
|
5
|
+
}
|
|
6
|
+
export declare const DialogAttachments: ({ title, items }: DialogAttachmentsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DialogListItemSize } from './DialogListItemBase';
|
|
3
|
+
export interface DialogBorderProps {
|
|
4
|
+
seen?: boolean;
|
|
5
|
+
size?: DialogListItemSize;
|
|
6
|
+
className?: string;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const DialogBorder: ({ seen, size, className, children }: DialogBorderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface DialogContentProps {
|
|
3
|
+
updatedAt?: string;
|
|
4
|
+
updatedAtLabel?: string;
|
|
5
|
+
summary?: string;
|
|
6
|
+
body?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/** Main textual content of a dialog, including summary, body and a timestamp */
|
|
9
|
+
export declare const DialogContent: ({ updatedAt, updatedAtLabel, summary, body }: DialogContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DialogRecipientProps, DialogSenderProps } from './DialogHeadings';
|
|
2
|
+
import { DialogListItemVariant } from './DialogListItemBase.tsx';
|
|
3
|
+
export interface DialogHeaderProps {
|
|
4
|
+
title: string;
|
|
5
|
+
seen: boolean;
|
|
6
|
+
variant: DialogListItemVariant;
|
|
7
|
+
sender?: DialogSenderProps;
|
|
8
|
+
recipient?: DialogRecipientProps;
|
|
9
|
+
}
|
|
10
|
+
export declare const DialogHeader: ({ title, sender, recipient, seen, variant }: DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type DialogSenderType = 'company' | 'person';
|
|
2
|
+
export type DialogRecipientType = 'company' | 'person';
|
|
3
|
+
export interface DialogSenderProps {
|
|
4
|
+
type?: DialogSenderType;
|
|
5
|
+
name: string;
|
|
6
|
+
imageUrl?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface DialogRecipientProps {
|
|
9
|
+
type?: DialogRecipientType;
|
|
10
|
+
name: string;
|
|
11
|
+
}
|
|
12
|
+
type DialogHeadingsSize = 'sm' | 'xs' | 'sm' | 'lg' | 'xl';
|
|
13
|
+
export interface DialogHeadingsProps {
|
|
14
|
+
size: DialogHeadingsSize;
|
|
15
|
+
/** Group sender and recipient avatars */
|
|
16
|
+
grouped?: boolean;
|
|
17
|
+
/** Sender */
|
|
18
|
+
sender?: DialogSenderProps;
|
|
19
|
+
/** Recipient */
|
|
20
|
+
recipient?: DialogRecipientProps;
|
|
21
|
+
}
|
|
22
|
+
/** Dialog headings for sender and recipient. Should present an avatar for the sender. */
|
|
23
|
+
export declare const DialogHeadings: ({ grouped, size, sender, recipient, }: DialogHeadingsProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DialogGroupProps } from './DialogGroup';
|
|
2
|
+
import { DialogListItemProps } from './DialogListItem';
|
|
3
|
+
export interface DialogListProps {
|
|
4
|
+
items: DialogListItemProps[];
|
|
5
|
+
groups?: Record<string, DialogGroupProps>;
|
|
6
|
+
}
|
|
7
|
+
export declare const DialogList: ({ items, groups }: DialogListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
import { DialogRecipientProps, DialogSenderProps } from './DialogHeadings';
|
|
3
|
+
import { DialogSelectProps } from './DialogSelect';
|
|
4
|
+
import { DialogStatusProps } from './DialogStatus';
|
|
5
|
+
import { DialogTouchedByActor } from './DialogTouchedBy';
|
|
6
|
+
import { DialogListItemSize, DialogListItemVariant } from './DialogListItemBase';
|
|
7
|
+
import { DialogSeenByProps } from './DialogSeenBy';
|
|
8
|
+
export type DialogListItemProps = {
|
|
9
|
+
/** Dialog title */
|
|
10
|
+
title: string;
|
|
11
|
+
/** Render as */
|
|
12
|
+
as?: ElementType;
|
|
13
|
+
/** Size */
|
|
14
|
+
size?: DialogListItemSize;
|
|
15
|
+
/** Variant */
|
|
16
|
+
variant?: DialogListItemVariant;
|
|
17
|
+
/** Link */
|
|
18
|
+
href?: string;
|
|
19
|
+
/** Select: Use to support batch operations */
|
|
20
|
+
select?: DialogSelectProps;
|
|
21
|
+
/** Dialog is selected */
|
|
22
|
+
selected?: boolean;
|
|
23
|
+
/** Dialog status */
|
|
24
|
+
status?: DialogStatusProps;
|
|
25
|
+
/** Dialog sender */
|
|
26
|
+
sender?: DialogSenderProps;
|
|
27
|
+
/** Dialog Recipient */
|
|
28
|
+
recipient?: DialogRecipientProps;
|
|
29
|
+
/** Group view, show avatar for recipient */
|
|
30
|
+
grouped?: boolean;
|
|
31
|
+
/** Dialog summary */
|
|
32
|
+
summary?: string;
|
|
33
|
+
/** Updated datetime */
|
|
34
|
+
updatedAt?: string;
|
|
35
|
+
/** Updated at label */
|
|
36
|
+
updatedAtLabel?: string;
|
|
37
|
+
/** Dialog due date */
|
|
38
|
+
dueAt?: string;
|
|
39
|
+
/** Dialog due date label */
|
|
40
|
+
dueAtLabel?: string;
|
|
41
|
+
/** Dialog has been seen */
|
|
42
|
+
seen?: boolean;
|
|
43
|
+
/** Dialog is seen by the user */
|
|
44
|
+
seenBy?: DialogSeenByProps;
|
|
45
|
+
/** List of users that have touched the dialog */
|
|
46
|
+
touchedBy?: DialogTouchedByActor[];
|
|
47
|
+
/** Number of attachments */
|
|
48
|
+
attachmentsCount?: number;
|
|
49
|
+
/** OnClick handler */
|
|
50
|
+
onClick?: () => void;
|
|
51
|
+
/** Group id */
|
|
52
|
+
groupId?: string;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Represents a dialog in list view, displaying information such as the title,
|
|
56
|
+
* summary, sender, and receiver.
|
|
57
|
+
* to mark the item as checked/unchecked and can visually indicate if it is unread.
|
|
58
|
+
*/
|
|
59
|
+
export declare const DialogListItem: ({ as, size, variant, href, onClick, select, selected, status, sender, recipient, grouped, updatedAt, updatedAtLabel, dueAt, dueAtLabel, seen, seenBy, touchedBy, attachmentsCount, title, summary, }: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ElementType, ReactNode } from 'react';
|
|
2
|
+
import { DialogSelectProps } from './DialogSelect';
|
|
3
|
+
export type DialogListItemVariant = 'neutral' | 'draft' | 'bin' | 'archive';
|
|
4
|
+
export type DialogListItemSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
export type DialogListItemBaseProps = {
|
|
6
|
+
/** Render as */
|
|
7
|
+
as?: ElementType;
|
|
8
|
+
/** Size */
|
|
9
|
+
size?: DialogListItemSize;
|
|
10
|
+
/** Link */
|
|
11
|
+
href?: string;
|
|
12
|
+
/** Select? Use to support batch operations */
|
|
13
|
+
select?: DialogSelectProps;
|
|
14
|
+
/** Dialog is selected */
|
|
15
|
+
selected?: boolean;
|
|
16
|
+
/** Children */
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
/** Variant */
|
|
19
|
+
variant?: DialogListItemVariant;
|
|
20
|
+
/** OnClick handler */
|
|
21
|
+
onClick?: () => void;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Represents a dialog in list view, displaying information such as the title,
|
|
25
|
+
* summary, sender, and receiver.
|
|
26
|
+
* to mark the item as checked/unchecked and can visually indicate if it is unread.
|
|
27
|
+
*/
|
|
28
|
+
export declare const DialogListItemBase: ({ as, size, href, select, selected, children, onClick, }: DialogListItemBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DialogSeenByProps } from './DialogSeenBy';
|
|
2
|
+
import { DialogStatusProps } from './DialogStatus';
|
|
3
|
+
export type DialogMetadataProps = {
|
|
4
|
+
/** Dialog status */
|
|
5
|
+
status?: DialogStatusProps;
|
|
6
|
+
/** Updated datetime */
|
|
7
|
+
updatedAt?: string;
|
|
8
|
+
/** Updated label */
|
|
9
|
+
updatedAtLabel?: string;
|
|
10
|
+
/** Due date */
|
|
11
|
+
dueAt?: string;
|
|
12
|
+
/** Due date label */
|
|
13
|
+
dueAtLabel?: string;
|
|
14
|
+
/** Who have seen the dialog after latest update */
|
|
15
|
+
seenBy?: DialogSeenByProps;
|
|
16
|
+
/** Number of attachments */
|
|
17
|
+
attachmentsCount?: number;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Metadata for a dialog in list view.
|
|
21
|
+
*/
|
|
22
|
+
export declare const DialogMetadata: ({ status, updatedAt, updatedAtLabel, dueAt, dueAtLabel, seenBy, attachmentsCount, }: DialogMetadataProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
import { ContextMenuProps } from '../ContextMenu';
|
|
3
|
+
import { DialogStatusProps } from './DialogStatus';
|
|
4
|
+
import { DialogTouchedByActor } from './DialogTouchedBy';
|
|
5
|
+
export interface DialogBackButtonProps {
|
|
6
|
+
as?: ElementType;
|
|
7
|
+
href?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface DialogNavProps {
|
|
11
|
+
status?: DialogStatusProps;
|
|
12
|
+
dueAt?: string;
|
|
13
|
+
dueAtLabel?: string;
|
|
14
|
+
touchedBy?: DialogTouchedByActor[];
|
|
15
|
+
backButton?: DialogBackButtonProps;
|
|
16
|
+
menu?: ContextMenuProps;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Dialog navigation bar with Back button and possibly a context menu.
|
|
20
|
+
*/
|
|
21
|
+
export declare const DialogNav: ({ backButton, status, dueAt, dueAtLabel, touchedBy, menu, }: DialogNavProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ElementType, MouseEventHandler } from 'react';
|
|
2
|
+
import { MetaItemSize } from '../Meta';
|
|
3
|
+
export interface DialogSeenByProps {
|
|
4
|
+
size?: MetaItemSize;
|
|
5
|
+
/** Dialog has been seen by current end user */
|
|
6
|
+
seenByEndUser?: boolean;
|
|
7
|
+
/** Dialog has been seen by other people */
|
|
8
|
+
seenByOthersCount?: number;
|
|
9
|
+
/** A label explaining that the dialog have been seen and by whom. */
|
|
10
|
+
label: string;
|
|
11
|
+
/** Render element as a link or button to display more informastion */
|
|
12
|
+
as?: ElementType;
|
|
13
|
+
onClick?: MouseEventHandler;
|
|
14
|
+
href?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Dialog seen by. Used to indicate if the dialog has been seen by end user or other users.
|
|
18
|
+
*/
|
|
19
|
+
export declare const DialogSeenBy: ({ size, label, seenByEndUser, seenByOthersCount, ...rest }: DialogSeenByProps) => import("react/jsx-runtime").JSX.Element;
|