@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,70 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { Snackbar } from '../Snackbar';
|
|
4
|
-
import { ActionFooter } from './ActionFooter';
|
|
5
|
-
import { ActionMenu } from './ActionMenu';
|
|
6
|
-
|
|
7
|
-
const menu = {
|
|
8
|
-
items: [
|
|
9
|
-
{
|
|
10
|
-
id: '1',
|
|
11
|
-
icon: 'arrow-redo',
|
|
12
|
-
title: 'Del og gi tilgang',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
id: '2',
|
|
16
|
-
icon: 'eye',
|
|
17
|
-
title: 'Marker som lest',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
id: '3',
|
|
21
|
-
icon: 'archive',
|
|
22
|
-
title: 'Flytt til arkiv',
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
id: '4',
|
|
26
|
-
icon: 'trash',
|
|
27
|
-
title: 'Flytt til papirkurv',
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const meta = {
|
|
33
|
-
title: 'LayoutAction/ActionFooter',
|
|
34
|
-
component: ActionFooter,
|
|
35
|
-
tags: ['autodocs'],
|
|
36
|
-
parameters: {},
|
|
37
|
-
args: {},
|
|
38
|
-
} satisfies Meta<typeof ActionFooter>;
|
|
39
|
-
|
|
40
|
-
export default meta;
|
|
41
|
-
type Story = StoryObj<typeof meta>;
|
|
42
|
-
|
|
43
|
-
export const Menu: Story = {
|
|
44
|
-
args: {
|
|
45
|
-
children: <ActionMenu {...menu} />,
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export const Snackbars: Story = {
|
|
50
|
-
args: {
|
|
51
|
-
children: (
|
|
52
|
-
<>
|
|
53
|
-
<Snackbar message="A message" />
|
|
54
|
-
<Snackbar message="Some other message" />
|
|
55
|
-
<Snackbar message="Another message" />
|
|
56
|
-
</>
|
|
57
|
-
),
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export const MenuAndSnackbar: Story = {
|
|
62
|
-
args: {
|
|
63
|
-
children: (
|
|
64
|
-
<>
|
|
65
|
-
<Snackbar message="Snack 1" />
|
|
66
|
-
<ActionMenu {...menu} theme="global-dark" />
|
|
67
|
-
</>
|
|
68
|
-
),
|
|
69
|
-
},
|
|
70
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { ReactElement } from 'react';
|
|
2
|
-
import styles from './actionFooter.module.css';
|
|
3
|
-
|
|
4
|
-
export interface ActionFooterProps {
|
|
5
|
-
hidden: boolean;
|
|
6
|
-
children?: ReactElement;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const ActionFooter = ({ hidden = false, children }: ActionFooterProps) => {
|
|
10
|
-
return (
|
|
11
|
-
<footer className={styles.footer} aria-hidden={hidden}>
|
|
12
|
-
{children}
|
|
13
|
-
</footer>
|
|
14
|
-
);
|
|
15
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { ActionHeader } from './ActionHeader';
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'LayoutAction/ActionHeader',
|
|
7
|
-
component: ActionHeader,
|
|
8
|
-
tags: ['autodocs'],
|
|
9
|
-
parameters: {},
|
|
10
|
-
args: {},
|
|
11
|
-
} satisfies Meta<typeof ActionHeader>;
|
|
12
|
-
|
|
13
|
-
export default meta;
|
|
14
|
-
type Story = StoryObj<typeof meta>;
|
|
15
|
-
|
|
16
|
-
export const Default: Story = {
|
|
17
|
-
args: {
|
|
18
|
-
title: 'Title',
|
|
19
|
-
},
|
|
20
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import styles from './actionHeader.module.css';
|
|
2
|
-
|
|
3
|
-
import { IconButton } from '../Button';
|
|
4
|
-
|
|
5
|
-
export interface ActionHeaderProps {
|
|
6
|
-
title: string;
|
|
7
|
-
hidden?: boolean;
|
|
8
|
-
dismissable?: boolean;
|
|
9
|
-
onDismiss?: () => void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const ActionHeader = ({ hidden = false, title, dismissable = true, onDismiss }: ActionHeaderProps) => {
|
|
13
|
-
return (
|
|
14
|
-
<header className={styles.header} aria-hidden={hidden} data-theme="global-dark">
|
|
15
|
-
<h2 className={styles.title}>{title}</h2>
|
|
16
|
-
{dismissable && <IconButton icon="x-mark" variant="outline" onClick={onDismiss} className={styles.dismiss} />}
|
|
17
|
-
</header>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { ActionMenu } from './ActionMenu';
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'LayoutAction/ActionMenu',
|
|
7
|
-
component: ActionMenu,
|
|
8
|
-
tags: ['autodocs'],
|
|
9
|
-
parameters: {},
|
|
10
|
-
args: {
|
|
11
|
-
theme: 'global-dark',
|
|
12
|
-
items: [
|
|
13
|
-
{
|
|
14
|
-
id: '1',
|
|
15
|
-
icon: 'arrow-redo',
|
|
16
|
-
title: 'Del og gi tilgang',
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
id: '2',
|
|
20
|
-
icon: 'eye',
|
|
21
|
-
title: 'Marker som lest',
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
id: '3',
|
|
25
|
-
icon: 'archive',
|
|
26
|
-
title: 'Flytt til arkiv',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
id: '4',
|
|
30
|
-
icon: 'trash',
|
|
31
|
-
title: 'Flytt til papirkurv',
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
},
|
|
35
|
-
} satisfies Meta<typeof ActionMenu>;
|
|
36
|
-
|
|
37
|
-
export default meta;
|
|
38
|
-
type Story = StoryObj<typeof meta>;
|
|
39
|
-
|
|
40
|
-
export const Default: Story = {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { MenuBase, MenuItem, type MenuItemProps, type MenuTheme } from '../Menu';
|
|
2
|
-
import styles from './actionMenu.module.css';
|
|
3
|
-
|
|
4
|
-
export interface ActionMenuProps {
|
|
5
|
-
theme?: MenuTheme;
|
|
6
|
-
items?: MenuItemProps[];
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const ActionMenu = ({ theme = 'inherit', items = [] }: ActionMenuProps) => {
|
|
10
|
-
return (
|
|
11
|
-
<MenuBase theme={theme} className={styles.menu}>
|
|
12
|
-
<ul className={styles.list}>
|
|
13
|
-
{items.map((item) => {
|
|
14
|
-
return (
|
|
15
|
-
<li key={item.id}>
|
|
16
|
-
<MenuItem {...item} className={styles.item} />
|
|
17
|
-
</li>
|
|
18
|
-
);
|
|
19
|
-
})}
|
|
20
|
-
</ul>
|
|
21
|
-
</MenuBase>
|
|
22
|
-
);
|
|
23
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
.footer {
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: auto;
|
|
4
|
-
right: 0;
|
|
5
|
-
bottom: 0;
|
|
6
|
-
left: 0;
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
row-gap: .5rem;
|
|
10
|
-
padding: 1rem;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.footer {
|
|
14
|
-
transition-property: all;
|
|
15
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
16
|
-
transition-duration: .15s;
|
|
17
|
-
transform: translateY(0);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.footer[aria-hidden="true"] {
|
|
21
|
-
transform: translateY(100%);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@media (min-width: 1024px) {
|
|
25
|
-
.footer {
|
|
26
|
-
align-items: center;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
.header {
|
|
2
|
-
position: fixed;
|
|
3
|
-
z-index: 10;
|
|
4
|
-
top: 0;
|
|
5
|
-
right: 0;
|
|
6
|
-
bottom: auto;
|
|
7
|
-
left: 0;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.header {
|
|
11
|
-
background-color: var(--global-base-default);
|
|
12
|
-
color: white;
|
|
13
|
-
height: 76px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.header {
|
|
17
|
-
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
justify-content: space-between;
|
|
20
|
-
padding: 1rem;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.header {
|
|
24
|
-
transition-property: all;
|
|
25
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
26
|
-
transition-duration: .15s;
|
|
27
|
-
transform: translateY(0);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.header[aria-hidden="true"] {
|
|
31
|
-
transform: translateY(-100%);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.title {
|
|
35
|
-
font-size: 1rem;
|
|
36
|
-
font-weight: normal;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.button {
|
|
40
|
-
border: 1px solid #fff;
|
|
41
|
-
width: 2.75rem;
|
|
42
|
-
height: 2.75rem;
|
|
43
|
-
display: flex;
|
|
44
|
-
align-items: center;
|
|
45
|
-
justify-content: center;
|
|
46
|
-
border-radius: 2px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.button:hover {
|
|
50
|
-
background-color: var(--global-base-hover);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.icon {
|
|
54
|
-
font-size: 1.5rem;
|
|
55
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
.menu {
|
|
2
|
-
padding: 0 .5rem;
|
|
3
|
-
border-radius: 0.375rem;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.menu[data-theme] {
|
|
7
|
-
background-color: var(--theme-background-subtle);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.menu[data-theme="inherit"] {
|
|
11
|
-
background-color: inherit;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.list {
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
list-style: none;
|
|
18
|
-
padding: 0;
|
|
19
|
-
margin: 0;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@media (min-width: 1024px) {
|
|
23
|
-
.list {
|
|
24
|
-
flex-direction: row;
|
|
25
|
-
align-items: center;
|
|
26
|
-
justify-content: start;
|
|
27
|
-
column-gap: .5rem;
|
|
28
|
-
width: auto;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Fragment, useState } from 'react';
|
|
3
|
-
|
|
4
|
-
import { MetaItem } from '../Meta';
|
|
5
|
-
import { List, ListBase, ListItem } from './';
|
|
6
|
-
|
|
7
|
-
const sizes = ['lg', 'md', 'sm', 'xs'];
|
|
8
|
-
|
|
9
|
-
const meta = {
|
|
10
|
-
title: 'List/List',
|
|
11
|
-
component: List,
|
|
12
|
-
tags: ['autodocs'],
|
|
13
|
-
parameters: {},
|
|
14
|
-
args: {
|
|
15
|
-
items: [
|
|
16
|
-
{
|
|
17
|
-
id: '1',
|
|
18
|
-
title: 'Title',
|
|
19
|
-
description: 'Description',
|
|
20
|
-
href: '#',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
id: '2',
|
|
24
|
-
title: 'Title',
|
|
25
|
-
description: 'Description',
|
|
26
|
-
href: '#',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
id: '3',
|
|
30
|
-
title: 'Title',
|
|
31
|
-
description: 'Description',
|
|
32
|
-
href: '#',
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
},
|
|
36
|
-
} satisfies Meta<typeof List>;
|
|
37
|
-
|
|
38
|
-
export default meta;
|
|
39
|
-
type Story = StoryObj<typeof meta>;
|
|
40
|
-
|
|
41
|
-
export const Default: Story = {
|
|
42
|
-
args: {},
|
|
43
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ListBase, type ListSpacing, type ListTheme } from '../List';
|
|
2
|
-
import { ListItem, type ListItemProps } from './ListItem';
|
|
3
|
-
import type { ListItemSize } from './ListItemBase';
|
|
4
|
-
|
|
5
|
-
export interface ListProps {
|
|
6
|
-
size?: ListItemSize;
|
|
7
|
-
spacing?: ListSpacing;
|
|
8
|
-
theme?: ListTheme;
|
|
9
|
-
items?: ListItemProps[];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const List = ({ theme, size = 'md', spacing = 'md', items = [] }: ListProps) => {
|
|
13
|
-
return (
|
|
14
|
-
<ListBase theme={theme} spacing={spacing}>
|
|
15
|
-
{items.map((item, index) => {
|
|
16
|
-
return <ListItem {...item} size={size} key={'item' + index} />;
|
|
17
|
-
})}
|
|
18
|
-
</ListBase>
|
|
19
|
-
);
|
|
20
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import styles from './listBase.module.css';
|
|
3
|
-
|
|
4
|
-
export type ListTheme = 'inherit' | 'global' | 'neutral' | 'person' | 'company';
|
|
5
|
-
export type ListSpacing = 'none' | 'sm' | 'md' | 'lg';
|
|
6
|
-
|
|
7
|
-
export interface ListBaseProps {
|
|
8
|
-
theme?: ListTheme;
|
|
9
|
-
spacing?: ListSpacing;
|
|
10
|
-
children?: ReactNode;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const ListBase = ({ theme = 'inherit', spacing = 'md', children }: ListBaseProps) => {
|
|
14
|
-
return (
|
|
15
|
-
<div className={styles.list} data-theme={theme} data-spacing={spacing}>
|
|
16
|
-
{children}
|
|
17
|
-
</div>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Fragment, useState } from 'react';
|
|
3
|
-
|
|
4
|
-
import { MetaItem } from '../Meta';
|
|
5
|
-
import { List, ListBase, ListItem } from './';
|
|
6
|
-
|
|
7
|
-
const sizes = ['lg', 'md', 'sm', 'xs'];
|
|
8
|
-
|
|
9
|
-
const meta = {
|
|
10
|
-
title: 'List/ListItem',
|
|
11
|
-
component: ListItem,
|
|
12
|
-
tags: ['autodocs'],
|
|
13
|
-
parameters: {},
|
|
14
|
-
args: {
|
|
15
|
-
id: 'id',
|
|
16
|
-
title: 'Title',
|
|
17
|
-
description: 'Description',
|
|
18
|
-
size: 'md',
|
|
19
|
-
href: '#',
|
|
20
|
-
},
|
|
21
|
-
} satisfies Meta<typeof ListItem>;
|
|
22
|
-
|
|
23
|
-
export default meta;
|
|
24
|
-
type Story = StoryObj<typeof meta>;
|
|
25
|
-
|
|
26
|
-
export const Default: Story = {
|
|
27
|
-
args: {},
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const Icon: Story = {
|
|
31
|
-
args: {
|
|
32
|
-
icon: 'teddy-bear',
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export const IconAccent: Story = {
|
|
37
|
-
args: {
|
|
38
|
-
color: 'accent',
|
|
39
|
-
icon: 'teddy-bear',
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export const Person: Story = {
|
|
44
|
-
args: {
|
|
45
|
-
avatar: {
|
|
46
|
-
type: 'person',
|
|
47
|
-
name: 'Erik Huseklepp',
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export const Company: Story = {
|
|
53
|
-
args: {
|
|
54
|
-
avatar: {
|
|
55
|
-
type: 'company',
|
|
56
|
-
name: 'Sportsklubben Brann',
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export const Logo: Story = {
|
|
62
|
-
args: {
|
|
63
|
-
avatar: {
|
|
64
|
-
type: 'company',
|
|
65
|
-
name: 'Politiets sikkerhetstjeneste',
|
|
66
|
-
imageUrl:
|
|
67
|
-
'https://media.licdn.com/dms/image/v2/D4D0BAQH7Yv86kmHN5g/company-logo_200_200/company-logo_200_200/0/1688735908848?e=1738195200&v=beta&t=f-Mkzd03bqzdQN4IT0h89VQ9_Jri1iJ6XphYYnjsgEo',
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export const PeopleGroup: Story = {
|
|
73
|
-
args: {
|
|
74
|
-
avatarGroup: {
|
|
75
|
-
items: [
|
|
76
|
-
{
|
|
77
|
-
type: 'person',
|
|
78
|
-
name: 'Albert Åberg',
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
type: 'person',
|
|
82
|
-
name: 'Birger Meling',
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
type: 'person',
|
|
86
|
-
name: 'Celine Dion',
|
|
87
|
-
},
|
|
88
|
-
],
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export const CompanyGroup: Story = {
|
|
94
|
-
args: {
|
|
95
|
-
avatarGroup: {
|
|
96
|
-
items: [
|
|
97
|
-
{
|
|
98
|
-
type: 'company',
|
|
99
|
-
name: 'Albert Åberg',
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
type: 'company',
|
|
103
|
-
name: 'Birger Meling',
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
type: 'company',
|
|
107
|
-
name: 'Celine Dion',
|
|
108
|
-
},
|
|
109
|
-
],
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
export const LongTitle: Story = {
|
|
115
|
-
args: {
|
|
116
|
-
avatar: {
|
|
117
|
-
type: 'company',
|
|
118
|
-
name: 'Direktoratet for samfunnssikkerhet og beredskap',
|
|
119
|
-
imageUrl:
|
|
120
|
-
'https://media.licdn.com/dms/image/v2/C510BAQHlQiOWI4f45w/company-logo_200_200/company-logo_200_200/0/1631389121726?e=1738195200&v=beta&t=Q1P8kOwpgLvoqHBxyrHCaYd2upNkPQVi2zSSxJzbdCA',
|
|
121
|
-
},
|
|
122
|
-
title:
|
|
123
|
-
'Samtykke for å reparere elektrisk utstyr hvis bruk er forbundet med særlig risiko, herunder elektromedisinsk utstyr',
|
|
124
|
-
description: 'Direktoratet for samfunnssikkerhet og beredskap',
|
|
125
|
-
},
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
export const Sizes = (args) => {
|
|
129
|
-
return (
|
|
130
|
-
<ListBase>
|
|
131
|
-
{sizes?.map((size) => {
|
|
132
|
-
return (
|
|
133
|
-
<Fragment key={size}>
|
|
134
|
-
<ListItem {...args} size={size} selected={size === args?.size} />
|
|
135
|
-
<MetaItem>{size}</MetaItem>
|
|
136
|
-
</Fragment>
|
|
137
|
-
);
|
|
138
|
-
})}
|
|
139
|
-
</ListBase>
|
|
140
|
-
);
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
export const Collapsible = (args) => {
|
|
144
|
-
const [expanded, setExpanded] = useState(false);
|
|
145
|
-
|
|
146
|
-
const onToggle = () => {
|
|
147
|
-
setExpanded((prevState) => !prevState);
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
const people = [
|
|
151
|
-
{
|
|
152
|
-
name: 'Per Ove Ludvigsen',
|
|
153
|
-
role: 'Sportlig leder',
|
|
154
|
-
rights: 'Admin',
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
name: 'Eirik Horneland',
|
|
158
|
-
role: 'Trener',
|
|
159
|
-
rights: 'Admin',
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
name: 'Erik Huseklepp',
|
|
163
|
-
role: 'Assistenttrener',
|
|
164
|
-
rights: 'Lese og skrive',
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
name: 'Hassan El Fakiri',
|
|
168
|
-
role: 'Toppspillerutvikler',
|
|
169
|
-
rights: 'Ingen rettigheter',
|
|
170
|
-
},
|
|
171
|
-
];
|
|
172
|
-
|
|
173
|
-
const items = people?.map((item) => {
|
|
174
|
-
return {
|
|
175
|
-
avatar: {
|
|
176
|
-
...item,
|
|
177
|
-
type: 'person',
|
|
178
|
-
},
|
|
179
|
-
title: item?.name,
|
|
180
|
-
description: item?.role,
|
|
181
|
-
badge: { label: item?.rights },
|
|
182
|
-
linkIcon: 'menu-elipsis-horizontal',
|
|
183
|
-
};
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
const avatarGroup = {
|
|
187
|
-
items: people?.map((item) => {
|
|
188
|
-
return {
|
|
189
|
-
name: item?.name,
|
|
190
|
-
type: 'person',
|
|
191
|
-
};
|
|
192
|
-
}),
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
return (
|
|
196
|
-
<Fragment>
|
|
197
|
-
<ListItem
|
|
198
|
-
{...args}
|
|
199
|
-
avatarGroup={avatarGroup}
|
|
200
|
-
collapsible={true}
|
|
201
|
-
expanded={expanded}
|
|
202
|
-
onClick={onToggle}
|
|
203
|
-
as="button"
|
|
204
|
-
/>
|
|
205
|
-
{expanded && <List size="xs" items={items} />}
|
|
206
|
-
</Fragment>
|
|
207
|
-
);
|
|
208
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import type { ElementType, ReactNode } from 'react';
|
|
2
|
-
import type { AvatarGroupProps, AvatarProps } from '../Avatar';
|
|
3
|
-
import type { BadgeProps } from '../Badge';
|
|
4
|
-
import type { IconName } from '../Icon';
|
|
5
|
-
import { ListItemBase, type ListItemColor, type ListItemSize } from './ListItemBase';
|
|
6
|
-
import { ListItemLabel } from './ListItemLabel';
|
|
7
|
-
import { ListItemMedia } from './ListItemMedia';
|
|
8
|
-
|
|
9
|
-
export interface ListItemProps {
|
|
10
|
-
id: string;
|
|
11
|
-
type?: string;
|
|
12
|
-
/** Element type to render */
|
|
13
|
-
as?: ElementType;
|
|
14
|
-
color?: ListItemColor;
|
|
15
|
-
href?: string;
|
|
16
|
-
onClick?(): void;
|
|
17
|
-
/** Item is active */
|
|
18
|
-
active?: boolean;
|
|
19
|
-
/** Item should be hidden from view */
|
|
20
|
-
hidden?: boolean;
|
|
21
|
-
/** Collapsible item, sets linkIcon to "chevron down" */
|
|
22
|
-
collapsible?: boolean;
|
|
23
|
-
/** Item is expanded, sets linkIcon to "chevron up" */
|
|
24
|
-
expanded?: boolean;
|
|
25
|
-
/** Item is selected */
|
|
26
|
-
selected?: boolean;
|
|
27
|
-
/** Item is disabled, should disable mouse events */
|
|
28
|
-
disabled?: boolean;
|
|
29
|
-
/** Display an icon indicating behaviour */
|
|
30
|
-
linkIcon?: IconName;
|
|
31
|
-
/** Size of list item */
|
|
32
|
-
size?: ListItemSize;
|
|
33
|
-
/** Title */
|
|
34
|
-
title?: string;
|
|
35
|
-
/** Optional description */
|
|
36
|
-
description?: string;
|
|
37
|
-
/** Optional badge */
|
|
38
|
-
badge?: BadgeProps;
|
|
39
|
-
/** List item icon */
|
|
40
|
-
icon?: IconName;
|
|
41
|
-
/** List item avatar */
|
|
42
|
-
avatar?: AvatarProps;
|
|
43
|
-
/** List item avatarGroup */
|
|
44
|
-
avatarGroup?: AvatarGroupProps;
|
|
45
|
-
children?: ReactNode;
|
|
46
|
-
items?: ListItemProps[];
|
|
47
|
-
className?: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export const ListItem = ({
|
|
51
|
-
as = 'a',
|
|
52
|
-
color,
|
|
53
|
-
children,
|
|
54
|
-
selected,
|
|
55
|
-
disabled,
|
|
56
|
-
size = 'sm',
|
|
57
|
-
icon,
|
|
58
|
-
avatar,
|
|
59
|
-
avatarGroup,
|
|
60
|
-
badge,
|
|
61
|
-
title,
|
|
62
|
-
description,
|
|
63
|
-
...rest
|
|
64
|
-
}: ListItemProps) => {
|
|
65
|
-
return (
|
|
66
|
-
<ListItemBase as={as} size={size} badge={badge} color={color} selected={selected} {...rest}>
|
|
67
|
-
<ListItemMedia color={color} size={size} icon={icon} avatar={avatar} avatarGroup={avatarGroup} />
|
|
68
|
-
<ListItemLabel title={title} description={description} size={size}>
|
|
69
|
-
{children}
|
|
70
|
-
</ListItemLabel>
|
|
71
|
-
</ListItemBase>
|
|
72
|
-
);
|
|
73
|
-
};
|