@altinn/altinn-components 0.6.0 → 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/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/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/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/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 -97
- 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/Bookmarks/BookmarksList.tsx +0 -17
- package/lib/components/Bookmarks/BookmarksListItem.stories.tsx +0 -79
- package/lib/components/Bookmarks/BookmarksListItem.tsx +0 -32
- package/lib/components/Bookmarks/QueryLabel.tsx +0 -33
- package/lib/components/Bookmarks/queryLabel.module.css +0 -45
- package/lib/components/Button/Button.stories.ts +0 -50
- package/lib/components/Button/Button.tsx +0 -60
- package/lib/components/Button/ButtonBase.tsx +0 -54
- 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 -33
- 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 -35
- package/lib/components/ContextMenu/contextMenuBase.module.css +0 -35
- package/lib/components/Datepicker/Datepicker.tsx +0 -49
- package/lib/components/Datepicker/DatepickerBase.tsx +0 -12
- package/lib/components/Datepicker/DatepickerHeader.tsx +0 -20
- package/lib/components/Datepicker/DatepickerTable.tsx +0 -50
- package/lib/components/Datepicker/datepickerBase.module.css +0 -5
- package/lib/components/Datepicker/datepickerHeader.module.css +0 -17
- package/lib/components/Datepicker/datepickerTable.module.css +0 -37
- package/lib/components/Datepicker/useDatepicker.tsx +0 -146
- 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 -35
- 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 -46
- 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 -86
- 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 -71
- package/lib/components/Header/HeaderBase.tsx +0 -21
- package/lib/components/Header/HeaderButton.stories.ts +0 -70
- package/lib/components/Header/HeaderButton.tsx +0 -68
- 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/HeaderSearch.tsx +0 -17
- package/lib/components/Header/header.module.css +0 -24
- 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/headerSearch.module.css +0 -21
- 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 -72
- 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 -82
- package/lib/components/List/ListItemLabel.tsx +0 -29
- package/lib/components/List/ListItemMedia.tsx +0 -59
- package/lib/components/List/listBase.module.css +0 -30
- package/lib/components/List/listItemBase.module.css +0 -97
- 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/MenuInputField.tsx +0 -38
- 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/menuInputField.module.css +0 -54
- package/lib/components/Menu/menuItemBase.module.css +0 -79
- 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 -25
- package/lib/components/Page/PageHeaderMedia.tsx +0 -25
- package/lib/components/Page/PageNav.tsx +0 -34
- 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 -18
- package/lib/components/Page/pageNav.module.css +0 -12
- package/lib/components/Page/sectionBase.module.css +0 -92
- 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 -56
- 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 -81
- package/lib/components/Searchbar/Searchbar.stories.tsx +0 -151
- package/lib/components/Searchbar/Searchbar.tsx +0 -26
- 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 -159
- 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/ToolbarDate.stories.ts +0 -62
- package/lib/components/Toolbar/ToolbarDaterange.stories.ts +0 -24
- package/lib/components/Toolbar/ToolbarDaterange.tsx +0 -73
- package/lib/components/Toolbar/ToolbarFilter.stories.ts +0 -64
- package/lib/components/Toolbar/ToolbarFilter.tsx +0 -82
- package/lib/components/Toolbar/ToolbarFilterBase.tsx +0 -15
- 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/toolbarBase.module.css +0 -19
- package/lib/components/Toolbar/toolbarButton.module.css +0 -3
- package/lib/components/Toolbar/toolbarDaterange.module.css +0 -12
- package/lib/components/Toolbar/toolbarFilterBase.module.css +0 -7
- 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 -16
- 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 -81
- 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 -78
- 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 -51
- package/lib/stories/Inbox/InboxProvider.tsx +0 -136
- package/lib/stories/Inbox/InboxSection.tsx +0 -39
- package/lib/stories/Inbox/InboxToolbar.tsx +0 -94
- package/lib/stories/Inbox/ProfilePage.tsx +0 -36
- 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 -41
- package/lib/stories/Inbox/dialogs/enova-in-progress.json +0 -35
- package/lib/stories/Inbox/dialogs/index.ts +0 -53
- package/lib/stories/Inbox/dialogs/skatt-2023.json +0 -33
- package/lib/stories/Inbox/dialogs/sykmelding-referat.json +0 -41
- 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/Bookmarks/index.ts → dist/components/Bookmarks/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/Datepicker/index.ts → dist/components/Datepicker/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/Menu/index.ts → dist/components/Menu/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/components/index.ts → dist/components/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
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type AttachmentLinkProps, AttachmentList } from '../Attachment';
|
|
2
|
-
import { MetaItem } from '../Meta';
|
|
3
|
-
|
|
4
|
-
export interface HistoryAttachmentsProps {
|
|
5
|
-
title?: string;
|
|
6
|
-
items?: AttachmentLinkProps[];
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const HistoryAttachments = ({ title = 'Attachments', items }: HistoryAttachmentsProps) => {
|
|
10
|
-
if (!items?.length) {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<section>
|
|
16
|
-
<MetaItem as="h2" size="xs">
|
|
17
|
-
{title}
|
|
18
|
-
</MetaItem>
|
|
19
|
-
<AttachmentList size="lg" items={items} />
|
|
20
|
-
</section>
|
|
21
|
-
);
|
|
22
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import cx from 'classnames';
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
3
|
-
import styles from './historyBorder.module.css';
|
|
4
|
-
|
|
5
|
-
export interface HistoryBorderProps {
|
|
6
|
-
seen?: boolean;
|
|
7
|
-
className?: string;
|
|
8
|
-
children?: ReactNode;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const HistoryBorder = ({ seen = true, className, children }: HistoryBorderProps) => {
|
|
12
|
-
return (
|
|
13
|
-
<div className={cx(styles.border, className)} data-seen={seen}>
|
|
14
|
-
{children}
|
|
15
|
-
</div>
|
|
16
|
-
);
|
|
17
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { fn } from '@storybook/test';
|
|
3
|
-
|
|
4
|
-
import { HistoryItem } from './HistoryItem';
|
|
5
|
-
|
|
6
|
-
const meta = {
|
|
7
|
-
title: 'History/HistoryItem',
|
|
8
|
-
component: HistoryItem,
|
|
9
|
-
tags: ['autodocs'],
|
|
10
|
-
parameters: {},
|
|
11
|
-
args: {
|
|
12
|
-
createdAt: '2024-09-22 13:34',
|
|
13
|
-
createdAtLabel: '22. september 2024 kl 13.34',
|
|
14
|
-
createdBy: {
|
|
15
|
-
name: 'Eirik Horneland',
|
|
16
|
-
},
|
|
17
|
-
summary: 'Brann slo Glimt 4-1 på Stadion.',
|
|
18
|
-
},
|
|
19
|
-
} satisfies Meta<typeof HistoryItem>;
|
|
20
|
-
|
|
21
|
-
export default meta;
|
|
22
|
-
type Story = StoryObj<typeof meta>;
|
|
23
|
-
|
|
24
|
-
export const Default: Story = {
|
|
25
|
-
args: {},
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const Attachments: Story = {
|
|
29
|
-
args: {
|
|
30
|
-
attachments: {
|
|
31
|
-
title: '6 vedlegg',
|
|
32
|
-
items: [
|
|
33
|
-
{
|
|
34
|
-
href: '#',
|
|
35
|
-
label: '1-0 Castro.pdf',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
href: '#',
|
|
39
|
-
label: '2-0 Kornvig.pdf',
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
href: '#',
|
|
43
|
-
label: '3-0 Kartum.pdf',
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
href: '#',
|
|
47
|
-
label: '3-1 Zinkernagel.pdf',
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
href: '#',
|
|
51
|
-
label: '4-1 Castro.pdf',
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { Avatar } from '../Avatar/';
|
|
2
|
-
import { MetaBase, MetaTimestamp } from '../Meta/';
|
|
3
|
-
import { Typography } from '../Typography';
|
|
4
|
-
import { HistoryAttachments, type HistoryAttachmentsProps } from './HistoryAttachments';
|
|
5
|
-
import { HistoryBorder } from './HistoryBorder';
|
|
6
|
-
import styles from './historyItem.module.css';
|
|
7
|
-
|
|
8
|
-
export interface CreatedByProps {
|
|
9
|
-
type?: 'company' | 'person';
|
|
10
|
-
name?: string;
|
|
11
|
-
imageUrl?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface HistoryItemProps {
|
|
15
|
-
createdBy?: CreatedByProps;
|
|
16
|
-
createdAt?: string;
|
|
17
|
-
createdAtLabel?: string;
|
|
18
|
-
summary?: string;
|
|
19
|
-
attachments?: HistoryAttachmentsProps;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const HistoryItem = ({
|
|
23
|
-
createdBy = {
|
|
24
|
-
type: 'person',
|
|
25
|
-
},
|
|
26
|
-
createdAt,
|
|
27
|
-
createdAtLabel,
|
|
28
|
-
summary,
|
|
29
|
-
attachments,
|
|
30
|
-
}: HistoryItemProps) => {
|
|
31
|
-
return (
|
|
32
|
-
<section className={styles.item}>
|
|
33
|
-
<header className={styles.header}>
|
|
34
|
-
<Avatar
|
|
35
|
-
type={createdBy.type || 'person'}
|
|
36
|
-
imageUrl={createdBy?.imageUrl}
|
|
37
|
-
name={createdBy.name || 'Unknown name'}
|
|
38
|
-
size="sm"
|
|
39
|
-
/>
|
|
40
|
-
</header>
|
|
41
|
-
<HistoryBorder className={styles.border}>
|
|
42
|
-
<article className={styles.body}>
|
|
43
|
-
<MetaBase>
|
|
44
|
-
<MetaTimestamp datetime={createdAt} size="xs">
|
|
45
|
-
{[createdBy?.name, createdAtLabel].join(', ')}
|
|
46
|
-
</MetaTimestamp>
|
|
47
|
-
</MetaBase>
|
|
48
|
-
<Typography size="lg">
|
|
49
|
-
<p>{summary}</p>
|
|
50
|
-
{attachments && <HistoryAttachments {...attachments} />}
|
|
51
|
-
</Typography>
|
|
52
|
-
</article>
|
|
53
|
-
</HistoryBorder>
|
|
54
|
-
</section>
|
|
55
|
-
);
|
|
56
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { fn } from '@storybook/test';
|
|
3
|
-
|
|
4
|
-
import { HistoryList } from './HistoryList';
|
|
5
|
-
|
|
6
|
-
const meta = {
|
|
7
|
-
title: 'History/HistoryList',
|
|
8
|
-
component: HistoryList,
|
|
9
|
-
tags: ['autodocs'],
|
|
10
|
-
parameters: {},
|
|
11
|
-
args: {
|
|
12
|
-
items: [
|
|
13
|
-
{
|
|
14
|
-
createdAt: '2024-09-22 13:34',
|
|
15
|
-
createdAtLabel: '22. september 2024 kl 13.34',
|
|
16
|
-
createdBy: {
|
|
17
|
-
name: 'Eirik Horneland',
|
|
18
|
-
},
|
|
19
|
-
summary: 'Brann slo Glimt 4-1 på Stadion.',
|
|
20
|
-
attachments: {
|
|
21
|
-
title: '6 vedlegg',
|
|
22
|
-
items: [
|
|
23
|
-
{
|
|
24
|
-
href: '#',
|
|
25
|
-
label: '1-0 Castro.pdf',
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
href: '#',
|
|
29
|
-
label: '2-0 Kornvig.pdf',
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
href: '#',
|
|
33
|
-
label: '3-0 Kartum.pdf',
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
href: '#',
|
|
37
|
-
label: '3-1 Zinkernagel.pdf',
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
href: '#',
|
|
41
|
-
label: '4-1 Castro.pdf',
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
createdAt: '2004-09-09 13:34',
|
|
48
|
-
createdAtLabel: '22. september 2024 kl 13.34',
|
|
49
|
-
createdBy: {
|
|
50
|
-
name: 'Eirik Horneland',
|
|
51
|
-
},
|
|
52
|
-
summary: 'Brann vant 1-0 i Haugesund.',
|
|
53
|
-
attachments: {
|
|
54
|
-
title: '1 vedlegg',
|
|
55
|
-
items: [
|
|
56
|
-
{
|
|
57
|
-
href: '#',
|
|
58
|
-
label: 'Målet til Heggebø.pdf',
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
},
|
|
65
|
-
} satisfies Meta<typeof HistoryList>;
|
|
66
|
-
|
|
67
|
-
export default meta;
|
|
68
|
-
type Story = StoryObj<typeof meta>;
|
|
69
|
-
|
|
70
|
-
export const Default: Story = {
|
|
71
|
-
args: {},
|
|
72
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import cx from 'classnames';
|
|
2
|
-
import { HistoryItem, type HistoryItemProps } from './HistoryItem';
|
|
3
|
-
import styles from './historyList.module.css';
|
|
4
|
-
|
|
5
|
-
export interface HistoryProps {
|
|
6
|
-
items: HistoryItemProps[];
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const HistoryList = ({ items, className }: HistoryProps) => {
|
|
11
|
-
if (!items.length) {
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<ul className={cx(styles.list, className)}>
|
|
17
|
-
{items.map((item, index) => {
|
|
18
|
-
return (
|
|
19
|
-
<li key={index} className={styles.item}>
|
|
20
|
-
<HistoryItem {...item} />
|
|
21
|
-
</li>
|
|
22
|
-
);
|
|
23
|
-
})}
|
|
24
|
-
</ul>
|
|
25
|
-
);
|
|
26
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
.item {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.header {
|
|
7
|
-
margin: 0.375em;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.border {
|
|
11
|
-
padding-left: 1.5rem;
|
|
12
|
-
padding-top: 0;
|
|
13
|
-
margin-left: 1rem;
|
|
14
|
-
padding-bottom: 1.5rem;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.body {
|
|
18
|
-
margin-top: -1.875rem;
|
|
19
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export type CheckboxCheckedIconProps = {
|
|
2
|
-
title?: string;
|
|
3
|
-
className?: string;
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Checkbox for lists and list items
|
|
8
|
-
*/
|
|
9
|
-
export const CheckboxCheckedIcon = ({ title = 'Checkbox', className }: CheckboxCheckedIconProps) => {
|
|
10
|
-
return (
|
|
11
|
-
<svg
|
|
12
|
-
width="1em"
|
|
13
|
-
height="1em"
|
|
14
|
-
viewBox="0 0 24 24"
|
|
15
|
-
fill="none"
|
|
16
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
17
|
-
className={className}
|
|
18
|
-
>
|
|
19
|
-
<title>{title}</title>
|
|
20
|
-
<path
|
|
21
|
-
fillRule="evenodd"
|
|
22
|
-
clipRule="evenodd"
|
|
23
|
-
d="M2.5 0C1.11929 0 0 1.11929 0 2.5V21.5C0 22.8807 1.11929 24 2.5 24H21.5C22.8807 24 24 22.8807 24 21.5V2.5C24 1.11929 22.8807 0 21.5 0H2.5ZM18.5547 5.76815C19.0142 6.07451 19.1384 6.69538 18.8321 7.1549L11.6321 17.9549C11.4659 18.2042 11.1967 18.3658 10.8985 18.3953C10.6004 18.4249 10.3047 18.3192 10.0929 18.1073L5.29289 13.3073C4.90237 12.9168 4.90237 12.2836 5.29289 11.8931C5.68342 11.5026 6.31658 11.5026 6.70711 11.8931L10.6446 15.8306L17.1679 6.0455C17.4743 5.58598 18.0952 5.4618 18.5547 5.76815Z"
|
|
24
|
-
fill="black"
|
|
25
|
-
/>
|
|
26
|
-
</svg>
|
|
27
|
-
);
|
|
28
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { CheckboxIcon } from './CheckboxIcon';
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Atoms/Icon/CheckboxIcon',
|
|
6
|
-
component: CheckboxIcon,
|
|
7
|
-
tags: ['autodocs'],
|
|
8
|
-
parameters: {},
|
|
9
|
-
args: {},
|
|
10
|
-
} satisfies Meta<typeof CheckboxIcon>;
|
|
11
|
-
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof meta>;
|
|
14
|
-
|
|
15
|
-
export const Default: Story = {
|
|
16
|
-
args: {
|
|
17
|
-
checked: false,
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const Hover: Story = {
|
|
22
|
-
args: {
|
|
23
|
-
checked: false,
|
|
24
|
-
hover: true,
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const Checked: Story = {
|
|
29
|
-
args: {
|
|
30
|
-
checked: true,
|
|
31
|
-
},
|
|
32
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { CheckboxCheckedIcon } from './CheckboxCheckedIcon';
|
|
2
|
-
import { CheckboxUncheckedIcon } from './CheckboxUncheckedIcon';
|
|
3
|
-
|
|
4
|
-
export type CheckboxIconProps = {
|
|
5
|
-
checked: boolean;
|
|
6
|
-
hover?: boolean;
|
|
7
|
-
title?: string;
|
|
8
|
-
className?: string;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Checkbox for lists and list items
|
|
13
|
-
*/
|
|
14
|
-
export const CheckboxIcon = ({ checked, title = 'checkbox', hover = false, className }: CheckboxIconProps) => {
|
|
15
|
-
const iconProps = { title, className };
|
|
16
|
-
return checked ? <CheckboxCheckedIcon {...iconProps} /> : <CheckboxUncheckedIcon {...iconProps} hover={hover} />;
|
|
17
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export type CheckboxUncheckedIconProps = {
|
|
2
|
-
title?: string;
|
|
3
|
-
className?: string;
|
|
4
|
-
hover?: boolean;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Checkbox for lists and list items
|
|
9
|
-
*/
|
|
10
|
-
export const CheckboxUncheckedIcon = ({ title = 'Checkbox', className, hover = false }: CheckboxUncheckedIconProps) => {
|
|
11
|
-
return (
|
|
12
|
-
<svg
|
|
13
|
-
width="1em"
|
|
14
|
-
height="1em"
|
|
15
|
-
viewBox="0 0 24 24"
|
|
16
|
-
fill="none"
|
|
17
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
18
|
-
className={className}
|
|
19
|
-
>
|
|
20
|
-
<title>{title}</title>
|
|
21
|
-
<path
|
|
22
|
-
fillRule="evenodd"
|
|
23
|
-
clipRule="evenodd"
|
|
24
|
-
d="M21.5 2.5H2.5V21.5H21.5V2.5ZM2.5 0C1.11929 0 0 1.11929 0 2.5V21.5C0 22.8807 1.11929 24 2.5 24H21.5C22.8807 24 24 22.8807 24 21.5V2.5C24 1.11929 22.8807 0 21.5 0H2.5Z"
|
|
25
|
-
fill="black"
|
|
26
|
-
/>
|
|
27
|
-
{hover && (
|
|
28
|
-
<path
|
|
29
|
-
data-hover={true}
|
|
30
|
-
fillRule="evenodd"
|
|
31
|
-
clipRule="evenodd"
|
|
32
|
-
d="M18.5547 5.76815C19.0142 6.07451 19.1384 6.69538 18.8321 7.1549L11.6321 17.9549C11.4659 18.2042 11.1967 18.3658 10.8985 18.3953C10.6004 18.4249 10.3047 18.3192 10.0929 18.1073L5.29289 13.3073C4.90237 12.9168 4.90237 12.2836 5.29289 11.8931C5.68342 11.5026 6.31658 11.5026 6.70711 11.8931L10.6446 15.8306L17.1679 6.0455C17.4743 5.58598 18.0952 5.4618 18.5547 5.76815Z"
|
|
33
|
-
fill="currentColor"
|
|
34
|
-
/>
|
|
35
|
-
)}
|
|
36
|
-
</svg>
|
|
37
|
-
);
|
|
38
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Icon } from './Icon';
|
|
3
|
-
import { iconsMap } from './iconsMap';
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'Atoms/Icon/Icon',
|
|
7
|
-
component: Icon,
|
|
8
|
-
tags: ['autodocs'],
|
|
9
|
-
parameters: {},
|
|
10
|
-
argTypes: {
|
|
11
|
-
name: Object.keys(iconsMap),
|
|
12
|
-
},
|
|
13
|
-
args: {
|
|
14
|
-
name: 'inbox',
|
|
15
|
-
variant: 'outline',
|
|
16
|
-
},
|
|
17
|
-
} satisfies Meta<typeof Icon>;
|
|
18
|
-
|
|
19
|
-
export default meta;
|
|
20
|
-
type Story = StoryObj<typeof meta>;
|
|
21
|
-
|
|
22
|
-
export const Default: Story = {
|
|
23
|
-
args: {},
|
|
24
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import cx from 'classnames';
|
|
2
|
-
import { type IconName, iconsMap } from './';
|
|
3
|
-
import { SvgIcon } from './SvgIcon';
|
|
4
|
-
import styles from './icon.module.css';
|
|
5
|
-
|
|
6
|
-
export type IconVariant = 'solid' | 'outline';
|
|
7
|
-
|
|
8
|
-
interface IconProps {
|
|
9
|
-
name: IconName;
|
|
10
|
-
variant?: IconVariant;
|
|
11
|
-
className?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const Icon = ({ name, variant = 'outline', className }: IconProps) => {
|
|
15
|
-
const svgIcon: JSX.Element | undefined =
|
|
16
|
-
(iconsMap[name] as { [key in IconVariant]: JSX.Element })?.[variant] ?? iconsMap[name]?.outline;
|
|
17
|
-
|
|
18
|
-
if (!svgIcon) {
|
|
19
|
-
return <span className={cx([styles.icon], className)} />;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return <SvgIcon svgIconComponent={svgIcon} className={cx([styles.icon], className)} />;
|
|
23
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { ProgressIcon } from './ProgressIcon';
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Atoms/Icon/ProgressIcon',
|
|
6
|
-
component: ProgressIcon,
|
|
7
|
-
tags: ['autodocs'],
|
|
8
|
-
parameters: {},
|
|
9
|
-
args: {},
|
|
10
|
-
} satisfies Meta<typeof ProgressIcon>;
|
|
11
|
-
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof meta>;
|
|
14
|
-
|
|
15
|
-
export const Default: Story = {
|
|
16
|
-
args: {
|
|
17
|
-
value: 0,
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const Progress25: Story = {
|
|
22
|
-
args: {
|
|
23
|
-
value: 25,
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const Progress50: Story = {
|
|
28
|
-
args: {
|
|
29
|
-
value: 50,
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const Progress75: Story = {
|
|
34
|
-
args: {
|
|
35
|
-
value: 75,
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export const Progress100: Story = {
|
|
40
|
-
args: {
|
|
41
|
-
value: 100,
|
|
42
|
-
},
|
|
43
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import cx from 'classnames';
|
|
2
|
-
import type { CSSProperties } from 'react';
|
|
3
|
-
import styles from './progressIcon.module.css';
|
|
4
|
-
export interface ProgressIconProps {
|
|
5
|
-
value?: number;
|
|
6
|
-
total?: number;
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface CustomCSSProperties extends CSSProperties {
|
|
11
|
-
'--progress'?: string;
|
|
12
|
-
}
|
|
13
|
-
export const ProgressIcon = ({ value = 0, total = 100, className }: ProgressIconProps) => {
|
|
14
|
-
const percentage = Math.round((value / total) * 100);
|
|
15
|
-
|
|
16
|
-
if (value === total) {
|
|
17
|
-
return (
|
|
18
|
-
<svg
|
|
19
|
-
width="16"
|
|
20
|
-
height="16"
|
|
21
|
-
viewBox="0 0 16 16"
|
|
22
|
-
fill="none"
|
|
23
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
24
|
-
className={styles.complete}
|
|
25
|
-
>
|
|
26
|
-
<title>
|
|
27
|
-
Progress {value} of {total}
|
|
28
|
-
</title>
|
|
29
|
-
<path
|
|
30
|
-
fill="currentColor"
|
|
31
|
-
fillRule="evenodd"
|
|
32
|
-
clipRule="evenodd"
|
|
33
|
-
d="M8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16ZM11.1751 5.11246C11.3892 4.87167 11.7579 4.84998 11.9987 5.06402C12.2395 5.27805 12.2612 5.64676 12.0471 5.88755L7.60268 10.8876C7.49595 11.0076 7.34442 11.0784 7.18383 11.0831C7.02324 11.0878 6.86782 11.0261 6.75421 10.9125L3.97644 8.13471C3.74863 7.9069 3.74863 7.53756 3.97644 7.30975C4.20424 7.08194 4.57359 7.08194 4.80139 7.30975L7.14172 9.65007L11.1751 5.11246Z"
|
|
34
|
-
/>
|
|
35
|
-
</svg>
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const progressStyle: CustomCSSProperties = {
|
|
40
|
-
'--progress': `${percentage}%`,
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
return <div className={cx(styles.progress, className)} style={progressStyle} data-value={`${percentage}%`} />;
|
|
44
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export type RadioCheckedIconProps = {
|
|
2
|
-
title?: string;
|
|
3
|
-
className?: string;
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Radio for lists and list items
|
|
8
|
-
*/
|
|
9
|
-
export const RadioCheckedIcon = ({ title = 'Radio', className }: RadioCheckedIconProps) => {
|
|
10
|
-
return (
|
|
11
|
-
<svg
|
|
12
|
-
width="1em"
|
|
13
|
-
height="1em"
|
|
14
|
-
viewBox="0 0 24 24"
|
|
15
|
-
fill="none"
|
|
16
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
17
|
-
className={className}
|
|
18
|
-
>
|
|
19
|
-
<title>{title}</title>
|
|
20
|
-
|
|
21
|
-
<path
|
|
22
|
-
fillRule="evenodd"
|
|
23
|
-
clipRule="evenodd"
|
|
24
|
-
d="M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24ZM12 17C14.7614 17 17 14.7614 17 12C17 9.23858 14.7614 7 12 7C9.23858 7 7 9.23858 7 12C7 14.7614 9.23858 17 12 17Z"
|
|
25
|
-
fill="black"
|
|
26
|
-
/>
|
|
27
|
-
</svg>
|
|
28
|
-
);
|
|
29
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { RadioIcon } from './RadioIcon';
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Atoms/Icon/RadioIcon',
|
|
6
|
-
component: RadioIcon,
|
|
7
|
-
tags: ['autodocs'],
|
|
8
|
-
parameters: {},
|
|
9
|
-
args: {},
|
|
10
|
-
} satisfies Meta<typeof RadioIcon>;
|
|
11
|
-
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof meta>;
|
|
14
|
-
|
|
15
|
-
export const Default: Story = {
|
|
16
|
-
args: {
|
|
17
|
-
checked: false,
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const Hover: Story = {
|
|
22
|
-
args: {
|
|
23
|
-
checked: false,
|
|
24
|
-
hover: true,
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const Checked: Story = {
|
|
29
|
-
args: {
|
|
30
|
-
checked: true,
|
|
31
|
-
},
|
|
32
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { RadioCheckedIcon } from './RadioCheckedIcon';
|
|
2
|
-
import { RadioUncheckedIcon } from './RadioUncheckedIcon';
|
|
3
|
-
|
|
4
|
-
export type RadioIconProps = {
|
|
5
|
-
checked: boolean;
|
|
6
|
-
hover?: boolean;
|
|
7
|
-
title?: string;
|
|
8
|
-
className?: string;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Radio for lists and list items
|
|
13
|
-
*/
|
|
14
|
-
export const RadioIcon = ({ checked, title = 'Radio', hover = false, className }: RadioIconProps) => {
|
|
15
|
-
const iconProps = { title, className };
|
|
16
|
-
return checked ? <RadioCheckedIcon {...iconProps} /> : <RadioUncheckedIcon {...iconProps} hover={hover} />;
|
|
17
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export type RadioUncheckedIconProps = {
|
|
2
|
-
title?: string;
|
|
3
|
-
className?: string;
|
|
4
|
-
hover?: boolean;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Radio for lists and list items
|
|
9
|
-
*/
|
|
10
|
-
export const RadioUncheckedIcon = ({ title = 'Radio', className, hover = false }: RadioUncheckedIconProps) => {
|
|
11
|
-
return (
|
|
12
|
-
<svg
|
|
13
|
-
width="1em"
|
|
14
|
-
height="1em"
|
|
15
|
-
viewBox="0 0 24 24"
|
|
16
|
-
fill="none"
|
|
17
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
18
|
-
className={className}
|
|
19
|
-
>
|
|
20
|
-
<title>{title}</title>
|
|
21
|
-
<path
|
|
22
|
-
fillRule="evenodd"
|
|
23
|
-
clipRule="evenodd"
|
|
24
|
-
d="M12 21.5C17.2467 21.5 21.5 17.2467 21.5 12C21.5 6.75329 17.2467 2.5 12 2.5C6.75329 2.5 2.5 6.75329 2.5 12C2.5 17.2467 6.75329 21.5 12 21.5ZM12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z"
|
|
25
|
-
fill="black"
|
|
26
|
-
/>
|
|
27
|
-
{hover && <circle data-hover={true} cx="12" cy="12" r="5" fill="black" />}
|
|
28
|
-
</svg>
|
|
29
|
-
);
|
|
30
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { SVGAttributes } from 'react';
|
|
2
|
-
import { cloneElement, isValidElement } from 'react';
|
|
3
|
-
import type React from 'react';
|
|
4
|
-
|
|
5
|
-
export type IconComponentProps = {
|
|
6
|
-
svgIconComponent: React.ReactNode;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export type SvgIconProps = IconComponentProps & SVGAttributes<SVGElement>;
|
|
10
|
-
|
|
11
|
-
export const SvgIcon = ({ svgIconComponent, ...rest }: SvgIconProps) => {
|
|
12
|
-
if (isValidElement(svgIconComponent)) {
|
|
13
|
-
return cloneElement(svgIconComponent, { ...rest });
|
|
14
|
-
}
|
|
15
|
-
return null;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
SvgIcon.displayName = 'SvgIcon';
|