@altinn/altinn-components 0.4.1 → 0.5.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.
Files changed (194) hide show
  1. package/.storybook/StoryDecorator.tsx +1 -1
  2. package/.storybook/main.ts +3 -4
  3. package/.storybook/preview.tsx +28 -0
  4. package/CHANGELOG.md +14 -0
  5. package/biome.jsonc +1 -1
  6. package/lib/components/Attachment/AttachmentLink.stories.ts +1 -1
  7. package/lib/components/Attachment/AttachmentList.stories.ts +1 -1
  8. package/lib/components/Button/Button.tsx +13 -10
  9. package/lib/components/Button/ButtonBase.tsx +1 -1
  10. package/lib/components/Button/ButtonIcon.tsx +16 -0
  11. package/lib/components/Button/ButtonLabel.tsx +18 -0
  12. package/lib/components/Button/Buttons.stories.tsx +64 -0
  13. package/lib/components/Button/ComboButton.tsx +9 -7
  14. package/lib/components/Button/IconButton.stories.tsx +47 -0
  15. package/lib/components/Button/IconButton.tsx +15 -5
  16. package/lib/components/Button/button.module.css +5 -46
  17. package/lib/components/Button/buttonBase.module.css +55 -23
  18. package/lib/components/Button/buttonIcon.module.css +17 -0
  19. package/lib/components/Button/buttonLabel.module.css +17 -0
  20. package/lib/components/Button/comboButton.module.css +15 -65
  21. package/lib/components/Button/iconButton.module.css +21 -4
  22. package/lib/components/Button/index.ts +2 -0
  23. package/lib/components/ContextMenu/ContextMenu.stories.ts +49 -0
  24. package/lib/components/ContextMenu/ContextMenu.tsx +12 -20
  25. package/lib/components/ContextMenu/ContextMenuBase.tsx +33 -0
  26. package/lib/components/Dialog/Dialog.stories.ts +12 -5
  27. package/lib/components/Dialog/Dialog.tsx +2 -0
  28. package/lib/components/Dialog/DialogGroup.tsx +24 -0
  29. package/lib/components/Dialog/DialogList.stories.ts +14 -10
  30. package/lib/components/Dialog/DialogList.tsx +26 -11
  31. package/lib/components/Dialog/DialogListItem.tsx +12 -2
  32. package/lib/components/Dialog/DialogListItemBase.tsx +4 -2
  33. package/lib/components/Dialog/DialogNav.stories.ts +5 -5
  34. package/lib/components/Dialog/DialogNav.tsx +2 -6
  35. package/lib/components/Dialog/DialogSelect.tsx +1 -1
  36. package/lib/components/Dialog/dialogGroup.module.css +35 -0
  37. package/lib/components/Dropdown/Backdrop.tsx +4 -3
  38. package/lib/components/Dropdown/DrawerBase.tsx +5 -2
  39. package/lib/components/Dropdown/DrawerBody.tsx +12 -0
  40. package/lib/components/Dropdown/DrawerButton.tsx +17 -0
  41. package/lib/components/Dropdown/DrawerFooter.tsx +12 -0
  42. package/lib/components/Dropdown/DrawerHeader.tsx +19 -0
  43. package/lib/components/Dropdown/DrawerOrDropdown.tsx +29 -0
  44. package/lib/components/Dropdown/DropdownBase.tsx +17 -2
  45. package/lib/components/Dropdown/backdrop.module.css +3 -0
  46. package/lib/components/Dropdown/drawerBase.module.css +9 -0
  47. package/lib/components/Dropdown/drawerBody.module.css +5 -0
  48. package/lib/components/Dropdown/drawerButton.module.css +6 -0
  49. package/lib/components/Dropdown/drawerFooter.module.css +13 -0
  50. package/lib/components/Dropdown/drawerHeader.module.css +17 -0
  51. package/lib/components/Dropdown/drawerOrDropdown.module.css +19 -0
  52. package/lib/components/Dropdown/dropdownBase.module.css +20 -4
  53. package/lib/components/Dropdown/index.ts +7 -1
  54. package/lib/components/Footer/footerMenu.module.css +5 -0
  55. package/lib/components/GlobalMenu/AccountButton.tsx +29 -0
  56. package/lib/components/GlobalMenu/AccountMenu.stories.tsx +65 -0
  57. package/lib/components/GlobalMenu/AccountMenu.tsx +73 -0
  58. package/lib/components/GlobalMenu/BackButton.tsx +10 -0
  59. package/lib/components/GlobalMenu/GlobalMenu.stories.tsx +112 -121
  60. package/lib/components/GlobalMenu/GlobalMenu.tsx +41 -89
  61. package/lib/components/GlobalMenu/GlobalMenuBase.tsx +22 -0
  62. package/lib/components/GlobalMenu/LogoutButton.tsx +19 -0
  63. package/lib/components/GlobalMenu/globalMenuBase.module.css +39 -0
  64. package/lib/components/GlobalMenu/index.tsx +1 -1
  65. package/lib/components/GlobalMenu/logoutButton.module.css +9 -0
  66. package/lib/components/Header/{Header.stories.ts → Header.stories.tsx} +79 -20
  67. package/lib/components/Header/Header.tsx +25 -38
  68. package/lib/components/Header/HeaderBase.tsx +7 -3
  69. package/lib/components/Header/header.module.css +10 -42
  70. package/lib/components/Header/headerBase.module.css +43 -0
  71. package/lib/components/Header/headerButton.module.css +1 -0
  72. package/lib/components/Layout/Layout.stories.tsx +77 -38
  73. package/lib/components/Layout/Layout.tsx +5 -3
  74. package/lib/components/Layout/LayoutBase.tsx +3 -2
  75. package/lib/components/Layout/layoutBase.module.css +11 -0
  76. package/lib/components/Layout/layoutBody.module.css +1 -0
  77. package/lib/components/LayoutAction/ActionHeader.tsx +1 -1
  78. package/lib/components/LayoutAction/ActionMenu.tsx +2 -4
  79. package/lib/components/LayoutAction/actionMenu.module.css +3 -0
  80. package/lib/components/List/List.stories.tsx +43 -0
  81. package/lib/components/List/List.tsx +6 -6
  82. package/lib/components/List/ListBase.tsx +6 -6
  83. package/lib/components/List/ListItem.tsx +4 -1
  84. package/lib/components/List/ListItemBase.tsx +20 -4
  85. package/lib/components/List/listBase.module.css +3 -3
  86. package/lib/components/List/listItemBase.module.css +4 -0
  87. package/lib/components/Menu/Menu.stories.ts +46 -46
  88. package/lib/components/Menu/Menu.tsx +3 -102
  89. package/lib/components/Menu/MenuBase.tsx +47 -3
  90. package/lib/components/Menu/MenuItem.tsx +8 -4
  91. package/lib/components/Menu/MenuItemBase.tsx +15 -2
  92. package/lib/components/Menu/MenuItems.stories.ts +438 -0
  93. package/lib/components/Menu/MenuItems.tsx +96 -0
  94. package/lib/components/Menu/MenuOption.tsx +4 -1
  95. package/lib/components/Menu/index.ts +1 -1
  96. package/lib/components/Menu/menu.module.css +2 -3
  97. package/lib/components/Menu/menuBase.module.css +25 -0
  98. package/lib/components/Menu/menuItemBase.module.css +11 -5
  99. package/lib/components/Menu/menuItemLabel.module.css +11 -1
  100. package/lib/components/Menu/menuSearch.module.css +1 -0
  101. package/lib/components/Meta/MetaItemBase.tsx +1 -1
  102. package/lib/components/Meta/MetaItemLabel.tsx +1 -1
  103. package/lib/components/Meta/MetaItemMedia.tsx +1 -1
  104. package/lib/components/Page/PageBase.tsx +14 -0
  105. package/lib/components/Page/PageHeader.tsx +21 -0
  106. package/lib/components/Page/PageHeaderMedia.tsx +25 -0
  107. package/lib/components/Page/SectionBase.tsx +52 -0
  108. package/lib/components/Page/SectionFooter.tsx +15 -0
  109. package/lib/components/Page/SectionHeader.tsx +16 -0
  110. package/lib/components/Page/index.ts +5 -0
  111. package/lib/components/Page/pageHeader.module.css +5 -0
  112. package/lib/components/Page/sectionBase.module.css +82 -0
  113. package/lib/components/Page/sectionFooter.module.css +8 -0
  114. package/lib/components/Page/sectionHeader.module.css +9 -0
  115. package/lib/components/RootProvider/RootProvider.tsx +43 -7
  116. package/lib/components/Searchbar/Autocomplete.stories.tsx +77 -0
  117. package/lib/components/Searchbar/Autocomplete.tsx +44 -0
  118. package/lib/components/Searchbar/AutocompleteBase.tsx +16 -0
  119. package/lib/components/Searchbar/AutocompleteGroup.tsx +17 -0
  120. package/lib/components/Searchbar/AutocompleteItem.tsx +23 -0
  121. package/lib/components/Searchbar/SearchField.tsx +78 -0
  122. package/lib/components/Searchbar/Searchbar.stories.tsx +151 -0
  123. package/lib/components/Searchbar/Searchbar.tsx +18 -0
  124. package/lib/components/Searchbar/SearchbarBase.tsx +23 -0
  125. package/lib/components/Searchbar/autocompleteBase.module.css +17 -0
  126. package/lib/components/Searchbar/autocompleteGroup.module.css +3 -0
  127. package/lib/components/Searchbar/autocompleteItem.module.css +19 -0
  128. package/lib/components/Searchbar/index.ts +1 -0
  129. package/lib/components/Searchbar/searchField.module.css +54 -0
  130. package/lib/components/Searchbar/searchbarBase.module.css +20 -0
  131. package/lib/components/Toolbar/Toolbar.stories.tsx +10 -10
  132. package/lib/components/Toolbar/Toolbar.tsx +28 -10
  133. package/lib/components/Toolbar/ToolbarAdd.tsx +6 -5
  134. package/lib/components/Toolbar/ToolbarBase.tsx +5 -20
  135. package/lib/components/Toolbar/ToolbarButton.tsx +1 -1
  136. package/lib/components/Toolbar/ToolbarFilter.tsx +11 -6
  137. package/lib/components/Toolbar/ToolbarMenu.tsx +8 -7
  138. package/lib/components/Toolbar/ToolbarOptions.stories.ts +5 -5
  139. package/lib/components/Toolbar/ToolbarOptions.tsx +34 -21
  140. package/lib/components/Toolbar/toolbarAdd.module.css +7 -0
  141. package/lib/components/Toolbar/toolbarBase.module.css +19 -0
  142. package/lib/components/Toolbar/toolbarButton.module.css +1 -1
  143. package/lib/components/Toolbar/toolbarFilter.module.css +25 -0
  144. package/lib/components/Toolbar/toolbarMenu.module.css +7 -0
  145. package/lib/components/Typography/Heading.tsx +23 -0
  146. package/lib/components/Typography/Typography.tsx +8 -5
  147. package/lib/components/Typography/heading.module.css +21 -0
  148. package/lib/components/Typography/index.ts +1 -0
  149. package/lib/components/Typography/typography.module.css +8 -0
  150. package/lib/components/index.ts +2 -0
  151. package/lib/hooks/index.ts +3 -0
  152. package/lib/{components/Menu → hooks}/useEscapeKey.ts +2 -2
  153. package/lib/hooks/useMenu.tsx +80 -0
  154. package/lib/index.ts +1 -0
  155. package/lib/stories/Color/MenuItem.stories.tsx +43 -0
  156. package/lib/stories/Color/Swatches.stories.tsx +19 -0
  157. package/lib/stories/Color/Swatches.tsx +42 -0
  158. package/lib/stories/Color/colors.json +62 -0
  159. package/lib/stories/Color/swatches.module.css +14 -0
  160. package/lib/stories/Inbox/BookmarksPage.tsx +52 -0
  161. package/lib/stories/Inbox/DialogPage.tsx +15 -0
  162. package/lib/stories/Inbox/Inbox.stories.tsx +55 -0
  163. package/lib/stories/Inbox/Inbox.tsx +12 -0
  164. package/lib/stories/Inbox/InboxLayout.tsx +50 -0
  165. package/lib/stories/Inbox/InboxPage.tsx +50 -0
  166. package/lib/stories/Inbox/InboxProvider.tsx +136 -0
  167. package/lib/stories/Inbox/InboxSection.tsx +39 -0
  168. package/lib/stories/Inbox/InboxToolbar.tsx +94 -0
  169. package/lib/stories/Inbox/ProfilePage.tsx +35 -0
  170. package/lib/stories/Inbox/SettingsPage.tsx +19 -0
  171. package/lib/stories/Inbox/accounts/accounts.ts +24 -0
  172. package/lib/stories/Inbox/accounts/index.ts +1 -0
  173. package/lib/stories/Inbox/actionMenu.ts +24 -0
  174. package/lib/stories/Inbox/dialogs/brreg-completed.json +35 -0
  175. package/lib/stories/Inbox/dialogs/brreg-draft.json +45 -0
  176. package/lib/stories/Inbox/dialogs/index.ts +10 -0
  177. package/lib/stories/Inbox/dialogs/skatt-2023.json +33 -0
  178. package/lib/stories/Inbox/groupBy.ts +19 -0
  179. package/lib/stories/Inbox/inboxSection.module.css +19 -0
  180. package/lib/stories/Inbox/index.ts +15 -0
  181. package/lib/stories/Inbox/layout/footer.ts +27 -0
  182. package/lib/stories/Inbox/layout/header.ts +11 -0
  183. package/lib/stories/Inbox/layout/index.ts +3 -0
  184. package/lib/stories/Inbox/layout/menu.ts +64 -0
  185. package/package.json +15 -13
  186. package/tsconfig.json +7 -2
  187. package/lib/components/Header/HeaderSearch.stories.ts +0 -20
  188. package/lib/components/Header/HeaderSearch.tsx +0 -44
  189. package/lib/components/Header/headerSearch.module.css +0 -30
  190. package/lib/components/Menu/MenuGroup.tsx +0 -18
  191. package/lib/components/Menu/__menuItem.module.css +0 -130
  192. package/lib/components/Toolbar/toolbar.module.css +0 -43
  193. /package/lib/components/ContextMenu/{contextMenu.module.css → contextMenuBase.module.css} +0 -0
  194. /package/lib/{components/Menu → hooks}/useClickOutside.ts +0 -0
@@ -0,0 +1,27 @@
1
+ export const footer = {
2
+ address: 'Postboks 1382 Vika, 0114 Oslo.',
3
+ menu: {
4
+ items: [
5
+ {
6
+ id: '1',
7
+ href: '#',
8
+ title: 'Om Altinn',
9
+ },
10
+ {
11
+ id: '2',
12
+ href: '#',
13
+ title: 'Driftsmeldinger',
14
+ },
15
+ {
16
+ id: '3',
17
+ href: '#',
18
+ title: 'Personvern',
19
+ },
20
+ {
21
+ id: '4',
22
+ href: '#',
23
+ title: 'Tilgjengelighet',
24
+ },
25
+ ],
26
+ },
27
+ };
@@ -0,0 +1,11 @@
1
+ import { accounts } from '../accounts/';
2
+
3
+ export const header = {
4
+ search: {
5
+ name: 'search',
6
+ placeholder: 'Søk i innboksen',
7
+ },
8
+ menu: {
9
+ accounts,
10
+ },
11
+ };
@@ -0,0 +1,3 @@
1
+ export * from './menu';
2
+ export * from './footer';
3
+ export * from './header';
@@ -0,0 +1,64 @@
1
+ export const menu = {
2
+ groups: {
3
+ shortcuts: {
4
+ title: 'Snarveier',
5
+ defaultItemColor: 'neutral',
6
+ },
7
+ },
8
+ items: [
9
+ {
10
+ id: 'inbox',
11
+ groupId: 1,
12
+ size: 'lg',
13
+ icon: 'inbox',
14
+ title: 'Innboks',
15
+ color: 'strong',
16
+ },
17
+ {
18
+ id: 'drafts',
19
+ groupId: 2,
20
+ icon: 'doc-pencil',
21
+ title: 'Utkast',
22
+ },
23
+ {
24
+ id: 'sent',
25
+ groupId: 2,
26
+ icon: 'file-checkmark',
27
+ selected: true,
28
+ title: 'Sendt',
29
+ },
30
+ {
31
+ id: 'bookmarks',
32
+ groupId: 3,
33
+ icon: 'bookmark',
34
+ // disabled: true,
35
+ title: 'Lagrede søk',
36
+ },
37
+ {
38
+ id: 'archived',
39
+ groupId: 4,
40
+ disabled: true,
41
+ icon: 'archive',
42
+ title: 'Arkivert',
43
+ },
44
+ {
45
+ id: 'trash',
46
+ groupId: 4,
47
+ disabled: true,
48
+ icon: 'trash',
49
+ title: 'Papirkurv',
50
+ },
51
+ {
52
+ id: 'profile',
53
+ groupId: 'shortcuts',
54
+ icon: 'person-circle',
55
+ title: 'Din profil',
56
+ },
57
+ {
58
+ id: 'settings',
59
+ groupId: 'shortcuts',
60
+ icon: 'cog',
61
+ title: 'Innstillinger',
62
+ },
63
+ ],
64
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.4.1",
3
+ "version": "0.5.1",
4
4
  "main": "lib/index.ts",
5
5
  "description": "Reusable react components",
6
6
  "publishConfig": {
@@ -16,23 +16,25 @@
16
16
  },
17
17
  "devDependencies": {
18
18
  "@biomejs/biome": "1.9.3",
19
- "@chromatic-com/storybook": "^1.9.0",
20
- "@storybook/addon-essentials": "^8.3.5",
21
- "@storybook/addon-interactions": "^8.3.5",
22
- "@storybook/addon-links": "^8.3.5",
23
- "@storybook/addon-onboarding": "^8.3.5",
24
- "@storybook/addon-themes": "^8.3.5",
25
- "@storybook/blocks": "^8.3.5",
26
- "@storybook/react": "^8.3.5",
27
- "@storybook/react-vite": "^8.3.5",
28
- "@storybook/test": "^8.3.5",
19
+ "@chromatic-com/storybook": "^3.2.2",
20
+ "@storybook/addon-a11y": "^8.4.4",
21
+ "@storybook/addon-essentials": "^8.4.4",
22
+ "@storybook/addon-interactions": "^8.4.4",
23
+ "@storybook/addon-links": "^8.4.4",
24
+ "@storybook/addon-onboarding": "^8.4.4",
25
+ "@storybook/addon-themes": "^8.4.4",
26
+ "@storybook/blocks": "^8.4.4",
27
+ "@storybook/react": "^8.4.4",
28
+ "@storybook/react-vite": "^8.4.4",
29
+ "@storybook/test": "^8.4.4",
29
30
  "@types/react": "^18.3.11",
30
31
  "@types/react-dom": "^18.3.1",
31
32
  "@vitejs/plugin-react-swc": "^3.7.1",
33
+ "axe-core": "^4.10.2",
32
34
  "lint-staged": "^15.2.10",
33
35
  "prop-types": "^15.8.1",
34
- "storybook": "^8.3.5",
35
- "storybook-addon-theme-provider": "^0.2.6",
36
+ "storybook": "^8.4.4",
37
+ "storybook-addon-theme-provider": "^0.2.8",
36
38
  "typescript": "^5.6.3",
37
39
  "vite": "^5.4.9"
38
40
  },
package/tsconfig.json CHANGED
@@ -17,7 +17,12 @@
17
17
  "noFallthroughCasesInSwitch": true,
18
18
  "allowSyntheticDefaultImports": true
19
19
  },
20
- "include": ["./lib/**/*.ts", "./lib/**/*.tsx", "./**/*.d.ts"],
21
- "exclude": ["./lib/**/*.stories.tsx", "./lib/**/*.stories.ts", "./lib/components/Icon/__AkselIcon.tsx"],
20
+ "include": ["./lib/**/*.ts", "./lib/hooks/*.tsx", "./**/*.d.ts"],
21
+ "exclude": [
22
+ "./lib/stories/**/*",
23
+ "lib/components/**/*.stories.ts",
24
+ "lib/components/**/*.stories.tsx",
25
+ "./lib/components/Icon/__AkselIcon.tsx"
26
+ ],
22
27
  "references": [{ "path": "./tsconfig.node.json" }]
23
28
  }
@@ -1,20 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { HeaderSearch } from './HeaderSearch';
3
-
4
- const meta = {
5
- title: 'Header/HeaderSearch',
6
- component: HeaderSearch,
7
- tags: ['autodocs'],
8
- parameters: {},
9
- args: {},
10
- } satisfies Meta<typeof HeaderSearch>;
11
-
12
- export default meta;
13
- type Story = StoryObj<typeof meta>;
14
-
15
- export const Default: Story = {
16
- args: {
17
- placeholder: 'Search',
18
- name: 'search',
19
- },
20
- };
@@ -1,44 +0,0 @@
1
- import cx from 'classnames';
2
- import type { ChangeEventHandler, FocusEventHandler } from 'react';
3
- import { Icon } from '../Icon';
4
- import styles from './headerSearch.module.css';
5
-
6
- export interface HeaderSearchProps {
7
- className?: string;
8
- expanded?: boolean;
9
- placeholder?: string;
10
- name: string;
11
- value?: string;
12
- onFocus?: FocusEventHandler;
13
- onBlur?: FocusEventHandler;
14
- onChange?: ChangeEventHandler;
15
- }
16
-
17
- export const HeaderSearch = ({
18
- className,
19
- expanded = false,
20
- name = 'q',
21
- value,
22
- placeholder = 'Søk',
23
- onFocus,
24
- onBlur,
25
- onChange,
26
- }: HeaderSearchProps) => {
27
- return (
28
- <div className={cx(styles.form, className)} aria-expanded={expanded}>
29
- <div className={styles.field}>
30
- <input
31
- onFocus={onFocus}
32
- onBlur={onBlur}
33
- name={name}
34
- value={value}
35
- onChange={onChange}
36
- placeholder={placeholder}
37
- className={styles.input}
38
- type="search"
39
- />
40
- <Icon name="magnifying-glass" className={styles.icon} />
41
- </div>
42
- </div>
43
- );
44
- };
@@ -1,30 +0,0 @@
1
- .field {
2
- position: relative;
3
- display: flex;
4
- align-items: center;
5
- font-size: 1.125rem;
6
- color: currentColor;
7
- }
8
-
9
- .input {
10
- font-size: inherit;
11
- flex-grow: 1;
12
- padding-left: 2.5rem;
13
- padding-right: 1rem;
14
- padding-top: 1rem;
15
- padding-bottom: 1rem;
16
- border-radius: 4px;
17
- border: 2px solid;
18
- background-color: transparent;
19
- }
20
-
21
- .input[value] {
22
- background-color: white;
23
- }
24
-
25
- .icon {
26
- position: absolute;
27
- left: 0;
28
- font-size: 1.25rem;
29
- margin: 0 1rem;
30
- }
@@ -1,18 +0,0 @@
1
- import type { ElementType, ReactNode } from 'react';
2
- import styles from './menu.module.css';
3
-
4
- export interface MenuGroupProps {
5
- as?: ElementType;
6
- expanded?: boolean;
7
- divider?: boolean;
8
- children?: ReactNode;
9
- }
10
-
11
- export const MenuGroup = ({ as = 'ul', expanded, divider = true, children }: MenuGroupProps) => {
12
- const Component = as;
13
- return (
14
- <Component aria-expanded={expanded} data-divider={divider} className={styles.group}>
15
- {children}
16
- </Component>
17
- );
18
- };
@@ -1,130 +0,0 @@
1
- .item {
2
- background-color: transparent;
3
- display: flex;
4
- align-items: center;
5
- column-gap: 4px;
6
- border: 0;
7
- user-select: none;
8
- cursor: pointer;
9
- margin: 0.5rem 0;
10
- }
11
-
12
- .item[aria-disabled="true"] {
13
- opacity: 0.5;
14
- pointer-events: none;
15
- }
16
-
17
- /* size */
18
-
19
- .item[data-size="sm"] {
20
- min-height: 44px;
21
- }
22
-
23
- /* content */
24
-
25
- .content {
26
- display: flex;
27
- width: 100%;
28
- align-items: center;
29
- column-gap: 6px;
30
- padding: 6px;
31
- }
32
-
33
- .action {
34
- display: flex;
35
- justify-content: center;
36
- align-items: center;
37
- padding: 10px;
38
- }
39
-
40
- .actionIcon {
41
- font-size: 1.5rem;
42
- }
43
-
44
- .media {
45
- flex-shrink: 0;
46
- display: flex;
47
- align-items: center;
48
- justify-content: center;
49
- border-radius: 5%;
50
- width: 2rem;
51
- height: 2rem;
52
- }
53
-
54
- .media[data-size="lg"] {
55
- width: 44px;
56
- height: 44px;
57
- }
58
-
59
- .icon {
60
- font-size: 1.5rem;
61
- }
62
-
63
- /* label */
64
-
65
- .label {
66
- display: flex;
67
- flex-direction: column;
68
- padding: 0 0.25rem;
69
- }
70
-
71
- /* title */
72
-
73
- .title[data-size="lg"] {
74
- font-size: 1.125rem;
75
- line-height: 1.25;
76
- font-weight: 500;
77
- }
78
-
79
- .title[data-size="sm"] {
80
- font-size: 1rem;
81
- line-height: 1.25;
82
- font-weight: 400;
83
- }
84
-
85
- .description {
86
- font-size: 14px;
87
- color: var(--theme-text-subtle);
88
- }
89
-
90
- .item:hover {
91
- background-color: var(--theme-surface-default);
92
- }
93
-
94
- .item[aria-selected="true"] {
95
- background-color: var(--theme-background-default);
96
- }
97
-
98
- .media[data-color="subtle"] {
99
- background-color: var(--theme-background-default);
100
- color: var(--theme-text-default);
101
- }
102
-
103
- .media[data-color="strong"] {
104
- background-color: var(--theme-base-default);
105
- color: var(--theme-background-default);
106
- }
107
-
108
- .item[data-color="company"]:hover {
109
- background-color: var(--company-background-subtle);
110
- }
111
-
112
- .item[data-color="company"][aria-selected="true"] {
113
- background-color: var(--company-surface-default);
114
- }
115
-
116
- .media[data-color="company"] {
117
- background-color: var(--company-surface-default);
118
- }
119
-
120
- .item[data-color="person"]:hover {
121
- background-color: var(--person-background-subtle);
122
- }
123
-
124
- .item[data-color="person"][aria-selected="true"] {
125
- background-color: var(--person-surface-default);
126
- }
127
-
128
- .media[data-color="person"] {
129
- background-color: var(--person-surface-default);
130
- }
@@ -1,43 +0,0 @@
1
- .toolbar {
2
- display: flex;
3
- align-items: center;
4
- flex-wrap: wrap;
5
- width: 100%;
6
- gap: 0.5rem;
7
- padding: 0 0.5rem;
8
- margin: 1.125rem 0;
9
- }
10
-
11
- @media (min-width: 1024px) {
12
- .toolbar {
13
- padding: 0;
14
- }
15
- }
16
-
17
- /* TIDI; move styles below */
18
-
19
- .button {
20
- display: inline-block;
21
- }
22
-
23
- .remove-button > button:hover + * + * {
24
- text-decoration: line-through;
25
- }
26
-
27
- .dropdown {
28
- display: none;
29
- }
30
-
31
- .dropdown[aria-expanded="true"] {
32
- display: block;
33
- position: absolute;
34
- z-index: 2;
35
- }
36
-
37
- .dropdown {
38
- margin-top: 0.5rem;
39
- padding: 0 0.5rem;
40
- background-color: var(--neutral-background-default);
41
- border-radius: 2px;
42
- box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.12), 0 2px 4px 0 rgba(0, 0, 0, 0.1);
43
- }