@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,438 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { MenuItems } from './MenuItems';
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Menu/MenuItems',
|
|
6
|
-
component: MenuItems,
|
|
7
|
-
tags: ['autodocs'],
|
|
8
|
-
parameters: {},
|
|
9
|
-
args: {},
|
|
10
|
-
} satisfies Meta<typeof MenuItems>;
|
|
11
|
-
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof meta>;
|
|
14
|
-
|
|
15
|
-
export const InboxMenu: Story = {
|
|
16
|
-
args: {
|
|
17
|
-
groups: {
|
|
18
|
-
shortcuts: {
|
|
19
|
-
title: 'Snarveier',
|
|
20
|
-
defaultItemColor: 'default',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
defaultItemColor: 'subtle',
|
|
24
|
-
items: [
|
|
25
|
-
{
|
|
26
|
-
id: 'innboks',
|
|
27
|
-
groupId: '1',
|
|
28
|
-
size: 'lg',
|
|
29
|
-
icon: 'inbox',
|
|
30
|
-
title: 'Innboks',
|
|
31
|
-
color: 'strong',
|
|
32
|
-
badge: { color: 'alert', label: '4' },
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
id: 'utkast',
|
|
36
|
-
groupId: '2',
|
|
37
|
-
icon: 'doc-pencil',
|
|
38
|
-
title: 'Utkast',
|
|
39
|
-
badge: {
|
|
40
|
-
label: '3',
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: 'sendt',
|
|
45
|
-
groupId: '2',
|
|
46
|
-
icon: 'file-checkmark',
|
|
47
|
-
selected: true,
|
|
48
|
-
title: 'Sendt',
|
|
49
|
-
badge: {
|
|
50
|
-
label: '2',
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
id: 'lagret',
|
|
55
|
-
groupId: '3',
|
|
56
|
-
icon: 'bookmark',
|
|
57
|
-
title: 'Lagrede søk',
|
|
58
|
-
badge: {
|
|
59
|
-
label: '5',
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
id: 'arkivert',
|
|
64
|
-
groupId: '4',
|
|
65
|
-
icon: 'archive',
|
|
66
|
-
title: 'Arkivert',
|
|
67
|
-
badge: {
|
|
68
|
-
label: '100+',
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
id: 'papirkurv',
|
|
73
|
-
groupId: '4',
|
|
74
|
-
disabled: true,
|
|
75
|
-
icon: 'trash',
|
|
76
|
-
title: 'Papirkurv',
|
|
77
|
-
badge: {
|
|
78
|
-
label: '45',
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
id: 'users',
|
|
83
|
-
groupId: 'shortcuts',
|
|
84
|
-
icon: 'person-group',
|
|
85
|
-
title: 'Brukere',
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
id: 'settings',
|
|
89
|
-
groupId: 'shortcuts',
|
|
90
|
-
icon: 'cog',
|
|
91
|
-
title: 'Innstillinger',
|
|
92
|
-
},
|
|
93
|
-
],
|
|
94
|
-
},
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export const PersonMenu: Story = {
|
|
98
|
-
args: {
|
|
99
|
-
groups: {},
|
|
100
|
-
defaultItemColor: 'subtle',
|
|
101
|
-
items: [
|
|
102
|
-
{
|
|
103
|
-
id: 'person',
|
|
104
|
-
groupId: '1',
|
|
105
|
-
size: 'lg',
|
|
106
|
-
avatar: {
|
|
107
|
-
type: 'person',
|
|
108
|
-
name: 'Erik Huseklepp',
|
|
109
|
-
},
|
|
110
|
-
title: 'Erik Huseklepp',
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
id: 'profil',
|
|
114
|
-
groupId: '2',
|
|
115
|
-
icon: 'person-circle',
|
|
116
|
-
title: 'Kontaktinformasjon',
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
id: 'varslinger',
|
|
120
|
-
groupId: '2',
|
|
121
|
-
icon: 'bell',
|
|
122
|
-
title: 'Varslingsinnstillinger',
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
id: 'bookmarks',
|
|
126
|
-
groupId: '3',
|
|
127
|
-
icon: 'bookmark',
|
|
128
|
-
title: 'Favoritter',
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
id: 'grupper',
|
|
132
|
-
groupId: '3',
|
|
133
|
-
icon: 'hexagon-grid',
|
|
134
|
-
title: 'Grupper',
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
id: 'logg',
|
|
138
|
-
groupId: '4',
|
|
139
|
-
icon: 'clock-dashed',
|
|
140
|
-
title: 'Aktivitetslogg',
|
|
141
|
-
},
|
|
142
|
-
],
|
|
143
|
-
},
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
export const CompanyMenu: Story = {
|
|
147
|
-
args: {
|
|
148
|
-
groups: {},
|
|
149
|
-
defaultItemColor: 'subtle',
|
|
150
|
-
items: [
|
|
151
|
-
{
|
|
152
|
-
id: 'company',
|
|
153
|
-
groupId: '1',
|
|
154
|
-
size: 'lg',
|
|
155
|
-
avatar: {
|
|
156
|
-
type: 'company',
|
|
157
|
-
name: 'Bergen Bar',
|
|
158
|
-
},
|
|
159
|
-
title: 'Bergen Bar',
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
id: 'profil',
|
|
163
|
-
groupId: '2',
|
|
164
|
-
icon: 'buildings2',
|
|
165
|
-
title: 'Firmaprofil',
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
id: 'brukere',
|
|
169
|
-
groupId: '3',
|
|
170
|
-
icon: 'person-group',
|
|
171
|
-
title: 'Brukere',
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
id: 'grupper',
|
|
175
|
-
groupId: '3',
|
|
176
|
-
icon: 'hexagon-grid',
|
|
177
|
-
title: 'Grupper',
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
id: 'logg',
|
|
181
|
-
groupId: '4',
|
|
182
|
-
icon: 'clock-dashed',
|
|
183
|
-
title: 'Aktivitetslogg',
|
|
184
|
-
},
|
|
185
|
-
],
|
|
186
|
-
},
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
export const AccountMenu: Story = {
|
|
190
|
-
args: {
|
|
191
|
-
groups: {
|
|
192
|
-
a1: {
|
|
193
|
-
title: 'Deg selv, favoritter og grupper',
|
|
194
|
-
},
|
|
195
|
-
b1: {
|
|
196
|
-
id: 'companies',
|
|
197
|
-
title: 'Andre kontoer',
|
|
198
|
-
},
|
|
199
|
-
},
|
|
200
|
-
items: [
|
|
201
|
-
{
|
|
202
|
-
id: '1',
|
|
203
|
-
groupId: 'a1',
|
|
204
|
-
avatar: {
|
|
205
|
-
type: 'person',
|
|
206
|
-
name: 'Dolly Duck',
|
|
207
|
-
},
|
|
208
|
-
title: 'Dolly Duck',
|
|
209
|
-
badge: {
|
|
210
|
-
label: '15',
|
|
211
|
-
},
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
id: '2',
|
|
215
|
-
groupId: 'a2',
|
|
216
|
-
avatar: {
|
|
217
|
-
type: 'company',
|
|
218
|
-
name: 'Bergen Bar',
|
|
219
|
-
},
|
|
220
|
-
title: 'Bergen Bar',
|
|
221
|
-
badge: {
|
|
222
|
-
label: '21',
|
|
223
|
-
},
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
id: '3',
|
|
227
|
-
groupId: 'a2',
|
|
228
|
-
avatar: {
|
|
229
|
-
type: 'company',
|
|
230
|
-
name: 'Sportsklubben Brann',
|
|
231
|
-
},
|
|
232
|
-
title: 'Sportsklubben Brann',
|
|
233
|
-
badge: {
|
|
234
|
-
label: '4',
|
|
235
|
-
},
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
id: '4',
|
|
239
|
-
groupId: 'a3',
|
|
240
|
-
avatarGroup: {
|
|
241
|
-
type: 'company',
|
|
242
|
-
items: [
|
|
243
|
-
{
|
|
244
|
-
name: 'Sportsklubben Brann',
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
name: 'Bergen Bar',
|
|
248
|
-
},
|
|
249
|
-
],
|
|
250
|
-
},
|
|
251
|
-
title: 'Alle virksomheter',
|
|
252
|
-
badge: {
|
|
253
|
-
label: '45',
|
|
254
|
-
},
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
id: '5',
|
|
258
|
-
groupId: 'b1',
|
|
259
|
-
avatar: {
|
|
260
|
-
type: 'company',
|
|
261
|
-
name: 'Jensens Laks',
|
|
262
|
-
},
|
|
263
|
-
title: 'Jensens laks',
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
id: '6',
|
|
267
|
-
groupId: 'b1',
|
|
268
|
-
avatar: {
|
|
269
|
-
type: 'company',
|
|
270
|
-
name: 'Haralds gym',
|
|
271
|
-
},
|
|
272
|
-
title: 'Haralds gym',
|
|
273
|
-
badge: {
|
|
274
|
-
label: '2',
|
|
275
|
-
},
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
id: '7',
|
|
279
|
-
groupId: 'b1',
|
|
280
|
-
avatar: {
|
|
281
|
-
type: 'company',
|
|
282
|
-
name: 'Trim og tran',
|
|
283
|
-
},
|
|
284
|
-
title: 'Trim og tran',
|
|
285
|
-
},
|
|
286
|
-
],
|
|
287
|
-
},
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
export const CollapsibleGlobalMenu: Story = {
|
|
291
|
-
args: {
|
|
292
|
-
defaultItemColor: 'subtle',
|
|
293
|
-
groups: {
|
|
294
|
-
settings: {
|
|
295
|
-
defaultItemColor: 'neutral',
|
|
296
|
-
},
|
|
297
|
-
},
|
|
298
|
-
items: [
|
|
299
|
-
{
|
|
300
|
-
id: 'account',
|
|
301
|
-
groupId: 'account',
|
|
302
|
-
size: 'lg',
|
|
303
|
-
avatar: {
|
|
304
|
-
type: 'person',
|
|
305
|
-
name: 'Herman Friele',
|
|
306
|
-
},
|
|
307
|
-
title: 'Herman Friele',
|
|
308
|
-
description: 'Fødselsnr: XX.XX.XXXX',
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
id: 'innboks',
|
|
312
|
-
groupId: 'apps',
|
|
313
|
-
size: 'lg',
|
|
314
|
-
icon: 'inbox',
|
|
315
|
-
title: 'Innboks',
|
|
316
|
-
collapsible: true,
|
|
317
|
-
items: [
|
|
318
|
-
{
|
|
319
|
-
id: 'utkast',
|
|
320
|
-
groupId: '1',
|
|
321
|
-
icon: 'doc-pencil',
|
|
322
|
-
title: 'Utkast',
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
id: 'sent',
|
|
326
|
-
groupId: '1',
|
|
327
|
-
icon: 'file-checkmark',
|
|
328
|
-
selected: true,
|
|
329
|
-
title: 'Sendt',
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
id: 'bookmarks',
|
|
333
|
-
groupId: '3',
|
|
334
|
-
icon: 'bookmark',
|
|
335
|
-
title: 'Lagrede søk',
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
id: 'arkiv',
|
|
339
|
-
groupId: '4',
|
|
340
|
-
icon: 'archive',
|
|
341
|
-
title: 'Arkivert',
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
id: 'trash',
|
|
345
|
-
groupId: '4',
|
|
346
|
-
icon: 'trash',
|
|
347
|
-
title: 'Papirkurv',
|
|
348
|
-
},
|
|
349
|
-
],
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
id: 'tilganger',
|
|
353
|
-
groupId: 'apps',
|
|
354
|
-
size: 'lg',
|
|
355
|
-
icon: 'bookmark',
|
|
356
|
-
title: 'Tilganger',
|
|
357
|
-
},
|
|
358
|
-
{
|
|
359
|
-
id: 'skjema',
|
|
360
|
-
groupId: 'apps',
|
|
361
|
-
size: 'lg',
|
|
362
|
-
icon: 'menu-grid',
|
|
363
|
-
title: 'Alle skjema',
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
id: 'settings',
|
|
367
|
-
groupId: 'settings',
|
|
368
|
-
icon: 'cog',
|
|
369
|
-
title: 'Innstillinger',
|
|
370
|
-
},
|
|
371
|
-
],
|
|
372
|
-
},
|
|
373
|
-
};
|
|
374
|
-
|
|
375
|
-
export const ExpandedGlobalMenu: Story = {
|
|
376
|
-
args: {
|
|
377
|
-
...CollapsibleGlobalMenu.args,
|
|
378
|
-
items: [...CollapsibleGlobalMenu.args.items].map((item) => {
|
|
379
|
-
if (item.collapsible) {
|
|
380
|
-
return {
|
|
381
|
-
...item,
|
|
382
|
-
expanded: true,
|
|
383
|
-
};
|
|
384
|
-
}
|
|
385
|
-
return item;
|
|
386
|
-
}),
|
|
387
|
-
},
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
export const DrilldownMenu: Story = {
|
|
391
|
-
args: {
|
|
392
|
-
defaultItemColor: 'subtle',
|
|
393
|
-
groups: {
|
|
394
|
-
'level-1': {
|
|
395
|
-
divider: true,
|
|
396
|
-
},
|
|
397
|
-
'level-2': {
|
|
398
|
-
divider: true,
|
|
399
|
-
},
|
|
400
|
-
},
|
|
401
|
-
items: [
|
|
402
|
-
{
|
|
403
|
-
id: 'people',
|
|
404
|
-
groupId: 'level-1',
|
|
405
|
-
size: 'lg',
|
|
406
|
-
icon: 'menu-grid',
|
|
407
|
-
title: 'Alle skjema',
|
|
408
|
-
expanded: true,
|
|
409
|
-
items: [
|
|
410
|
-
{
|
|
411
|
-
groupId: 'level-2',
|
|
412
|
-
name: 'tema',
|
|
413
|
-
icon: 'teddy-bear',
|
|
414
|
-
title: 'Tema',
|
|
415
|
-
expanded: true,
|
|
416
|
-
items: [
|
|
417
|
-
{
|
|
418
|
-
id: 'c1',
|
|
419
|
-
groupId: 'level-3',
|
|
420
|
-
title: 'Kategori 1',
|
|
421
|
-
},
|
|
422
|
-
{
|
|
423
|
-
groupId: 'level-3',
|
|
424
|
-
id: 'c2',
|
|
425
|
-
title: 'Kategori 2',
|
|
426
|
-
},
|
|
427
|
-
{
|
|
428
|
-
groupId: 'level-3',
|
|
429
|
-
id: 'c3',
|
|
430
|
-
title: 'Kategori 3',
|
|
431
|
-
},
|
|
432
|
-
],
|
|
433
|
-
},
|
|
434
|
-
],
|
|
435
|
-
},
|
|
436
|
-
],
|
|
437
|
-
},
|
|
438
|
-
};
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { Fragment } from 'react';
|
|
3
|
-
import { MenuHeader, MenuItem, MenuList, MenuListItem } from '../';
|
|
4
|
-
import type { MenuItemColor, MenuItemProps, MenuItemSize } from '../';
|
|
5
|
-
import { useMenu } from '../../hooks';
|
|
6
|
-
|
|
7
|
-
export interface MenuGroupProps {
|
|
8
|
-
title?: string;
|
|
9
|
-
divider?: boolean;
|
|
10
|
-
defaultItemColor?: MenuItemColor;
|
|
11
|
-
defaultItemSize?: MenuItemSize;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export type MenuItemGroups = Record<string, MenuGroupProps>;
|
|
15
|
-
|
|
16
|
-
export interface MenuItemsProps {
|
|
17
|
-
level?: number;
|
|
18
|
-
expanded?: boolean;
|
|
19
|
-
items: MenuItemProps[];
|
|
20
|
-
groups?: MenuItemGroups;
|
|
21
|
-
defaultItemColor?: MenuItemColor;
|
|
22
|
-
defaultItemSize?: MenuItemSize;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const MenuItems = ({
|
|
26
|
-
level = 0,
|
|
27
|
-
expanded,
|
|
28
|
-
items,
|
|
29
|
-
groups = {},
|
|
30
|
-
defaultItemColor,
|
|
31
|
-
defaultItemSize,
|
|
32
|
-
}: MenuItemsProps) => {
|
|
33
|
-
const { menu } = useMenu<MenuItemProps, MenuGroupProps>({
|
|
34
|
-
items,
|
|
35
|
-
groups,
|
|
36
|
-
groupByKey: 'groupId',
|
|
37
|
-
keyboardEvents: false,
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<MenuList expanded={expanded}>
|
|
42
|
-
{menu.map((group, groupIndex) => {
|
|
43
|
-
const groupProps: MenuGroupProps = group?.props || {};
|
|
44
|
-
const { title, divider = true } = groupProps;
|
|
45
|
-
const nextGroup = menu[groupIndex + 1];
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<Fragment key={groupIndex}>
|
|
49
|
-
{/** Render a separator if this is a new group or a new level */}
|
|
50
|
-
|
|
51
|
-
{(level > 0 || groupIndex) && divider ? <MenuListItem role="separator" /> : ''}
|
|
52
|
-
|
|
53
|
-
{title && (
|
|
54
|
-
<MenuListItem>
|
|
55
|
-
<MenuHeader title={title} />
|
|
56
|
-
</MenuListItem>
|
|
57
|
-
)}
|
|
58
|
-
|
|
59
|
-
{group?.items.map((item, index) => {
|
|
60
|
-
const { active } = item;
|
|
61
|
-
const { groupId: _, ...itemProps } = item.props || {};
|
|
62
|
-
const { expanded } = itemProps;
|
|
63
|
-
const nextItem = group?.items[index + 1];
|
|
64
|
-
|
|
65
|
-
return (
|
|
66
|
-
<MenuListItem role="presentation" expanded={expanded} key={index}>
|
|
67
|
-
<MenuItem
|
|
68
|
-
{...itemProps}
|
|
69
|
-
color={itemProps?.color || groupProps?.defaultItemColor || defaultItemColor}
|
|
70
|
-
size={itemProps?.size || groupProps?.defaultItemSize || defaultItemSize}
|
|
71
|
-
active={active}
|
|
72
|
-
tabIndex={itemProps?.disabled ? -1 : 0}
|
|
73
|
-
/>
|
|
74
|
-
{expanded && itemProps?.items && (
|
|
75
|
-
<>
|
|
76
|
-
<MenuItems
|
|
77
|
-
expanded={expanded}
|
|
78
|
-
level={level + 1}
|
|
79
|
-
items={itemProps?.items}
|
|
80
|
-
groups={groups}
|
|
81
|
-
defaultItemColor={defaultItemColor}
|
|
82
|
-
defaultItemSize={defaultItemSize}
|
|
83
|
-
/>
|
|
84
|
-
{/** Render a separator if expanded and there are items underneath */}
|
|
85
|
-
{(nextGroup || nextItem) && <MenuListItem role="separator" />}
|
|
86
|
-
</>
|
|
87
|
-
)}
|
|
88
|
-
</MenuListItem>
|
|
89
|
-
);
|
|
90
|
-
})}
|
|
91
|
-
</Fragment>
|
|
92
|
-
);
|
|
93
|
-
})}
|
|
94
|
-
</MenuList>
|
|
95
|
-
);
|
|
96
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { MenuOption } from './MenuOption';
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Menu/MenuOption',
|
|
6
|
-
component: MenuOption,
|
|
7
|
-
tags: ['autodocs'],
|
|
8
|
-
parameters: {},
|
|
9
|
-
args: {
|
|
10
|
-
value: '',
|
|
11
|
-
label: 'Label',
|
|
12
|
-
},
|
|
13
|
-
} satisfies Meta<typeof MenuOption>;
|
|
14
|
-
|
|
15
|
-
export default meta;
|
|
16
|
-
type Story = StoryObj<typeof meta>;
|
|
17
|
-
|
|
18
|
-
export const Checkbox: Story = {
|
|
19
|
-
args: {
|
|
20
|
-
type: 'checkbox',
|
|
21
|
-
title: 'Title',
|
|
22
|
-
size: 'sm',
|
|
23
|
-
checked: false,
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const CheckboxChecked: Story = {
|
|
28
|
-
args: {
|
|
29
|
-
type: 'checkbox',
|
|
30
|
-
title: 'Title',
|
|
31
|
-
size: 'sm',
|
|
32
|
-
checked: true,
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export const Radio: Story = {
|
|
37
|
-
args: {
|
|
38
|
-
type: 'radio',
|
|
39
|
-
title: 'Title',
|
|
40
|
-
size: 'sm',
|
|
41
|
-
checked: false,
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export const RadioChecked: Story = {
|
|
46
|
-
args: {
|
|
47
|
-
type: 'radio',
|
|
48
|
-
title: 'Title',
|
|
49
|
-
size: 'sm',
|
|
50
|
-
checked: true,
|
|
51
|
-
},
|
|
52
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { ChangeEventHandler } from 'react';
|
|
2
|
-
import type { BadgeProps } from '../Badge';
|
|
3
|
-
import { CheckboxIcon, RadioIcon } from '../Icon';
|
|
4
|
-
import { MenuItemBase, type MenuItemSize } from './MenuItemBase';
|
|
5
|
-
import { MenuItemLabel } from './MenuItemLabel';
|
|
6
|
-
import styles from './menuOption.module.css';
|
|
7
|
-
|
|
8
|
-
export type MenuOptionType = 'checkbox' | 'radio';
|
|
9
|
-
|
|
10
|
-
export interface MenuOptionProps {
|
|
11
|
-
value: string | number;
|
|
12
|
-
label: string;
|
|
13
|
-
groupId?: string;
|
|
14
|
-
size?: MenuItemSize;
|
|
15
|
-
name?: string;
|
|
16
|
-
title?: string;
|
|
17
|
-
description?: string;
|
|
18
|
-
badge?: BadgeProps;
|
|
19
|
-
checked?: boolean;
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
onChange?: ChangeEventHandler;
|
|
22
|
-
type?: MenuOptionType;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const MenuOption = ({
|
|
26
|
-
size = 'sm',
|
|
27
|
-
type,
|
|
28
|
-
name,
|
|
29
|
-
value,
|
|
30
|
-
label,
|
|
31
|
-
title,
|
|
32
|
-
description,
|
|
33
|
-
badge,
|
|
34
|
-
checked = false,
|
|
35
|
-
disabled,
|
|
36
|
-
onChange,
|
|
37
|
-
}: MenuOptionProps) => {
|
|
38
|
-
return (
|
|
39
|
-
<MenuItemBase className={styles.label} disabled={disabled} selected={checked} size={size} badge={badge} as="label">
|
|
40
|
-
<input className={styles.input} name={name} value={value} type={type} checked={checked} onChange={onChange} />
|
|
41
|
-
{type === 'checkbox' && <CheckboxIcon checked={checked} hover={true} className={styles.icon} />}
|
|
42
|
-
{type === 'radio' && <RadioIcon checked={checked} hover={true} className={styles.icon} />}
|
|
43
|
-
<MenuItemLabel title={title} description={description} size={size}>
|
|
44
|
-
{label}
|
|
45
|
-
</MenuItemLabel>
|
|
46
|
-
</MenuItemBase>
|
|
47
|
-
);
|
|
48
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { MenuSearch } from './MenuSearch';
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'Menu/MenuSearch',
|
|
7
|
-
component: MenuSearch,
|
|
8
|
-
tags: ['autodocs'],
|
|
9
|
-
parameters: {},
|
|
10
|
-
args: {},
|
|
11
|
-
} satisfies Meta<typeof MenuSearch>;
|
|
12
|
-
|
|
13
|
-
export default meta;
|
|
14
|
-
type Story = StoryObj<typeof meta>;
|
|
15
|
-
|
|
16
|
-
export const Default: Story = {
|
|
17
|
-
args: {},
|
|
18
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { ChangeEventHandler } from 'react';
|
|
2
|
-
import styles from './menuSearch.module.css';
|
|
3
|
-
|
|
4
|
-
export interface MenuSearchProps {
|
|
5
|
-
placeholder?: string;
|
|
6
|
-
name: string;
|
|
7
|
-
value: string;
|
|
8
|
-
onChange: ChangeEventHandler;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const MenuSearch = ({ value, name, placeholder = 'Søk', onChange }: MenuSearchProps) => {
|
|
12
|
-
return (
|
|
13
|
-
<div className={styles.field}>
|
|
14
|
-
<input
|
|
15
|
-
type="search"
|
|
16
|
-
value={value}
|
|
17
|
-
name={name}
|
|
18
|
-
placeholder={placeholder}
|
|
19
|
-
className={styles.input}
|
|
20
|
-
onChange={onChange}
|
|
21
|
-
autoComplete="off"
|
|
22
|
-
/>
|
|
23
|
-
</div>
|
|
24
|
-
);
|
|
25
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
.menu {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.group {
|
|
7
|
-
list-style: none;
|
|
8
|
-
padding: 0;
|
|
9
|
-
margin: 0;
|
|
10
|
-
text-indent: 0;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.menuItem {
|
|
14
|
-
list-style: none;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.group[data-divider="true"] + .group {
|
|
18
|
-
border-top: 1px solid;
|
|
19
|
-
border-color: var(--theme-border-subtle);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.item[aria-expanded="true"] > .group {
|
|
23
|
-
border-top: 1px solid;
|
|
24
|
-
border-color: var(--theme-border-subtle);
|
|
25
|
-
}
|