@placeholderco/placeholder-ui 1.0.12 → 2.0.0

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 (276) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +134 -130
  3. package/dist/app.css +178 -0
  4. package/dist/bootstrap.min.css +3600 -0
  5. package/dist/cards/GitCard.svelte +115 -0
  6. package/dist/cards/GitCard.svelte.d.ts +22 -0
  7. package/dist/display/Avatar.svelte +29 -17
  8. package/dist/display/Avatar.svelte.d.ts +12 -2
  9. package/dist/display/LinkCollection.svelte +40 -18
  10. package/dist/display/LinkCollection.svelte.d.ts +9 -2
  11. package/dist/display/Paper.svelte +31 -19
  12. package/dist/display/Paper.svelte.d.ts +12 -3
  13. package/dist/display/alert/Alert.svelte +129 -0
  14. package/dist/display/alert/Alert.svelte.d.ts +15 -0
  15. package/dist/display/alert/AlertVariant.d.ts +1 -0
  16. package/dist/display/alert/AlertVariant.js +1 -0
  17. package/dist/display/filetree/FileTree.svelte +259 -0
  18. package/dist/display/filetree/FileTree.svelte.d.ts +76 -0
  19. package/dist/display/filetree/FileTreeItem.svelte +396 -0
  20. package/dist/display/filetree/FileTreeItem.svelte.d.ts +40 -0
  21. package/dist/display/filetree/FileTreeNode.d.ts +46 -0
  22. package/dist/display/filetree/FileTreeNode.js +115 -0
  23. package/dist/display/filetree/index.d.ts +5 -0
  24. package/dist/display/filetree/index.js +3 -0
  25. package/dist/editors/CodeMirror.svelte +306 -0
  26. package/dist/editors/CodeMirror.svelte.d.ts +31 -0
  27. package/dist/editors/tiptap/LinkActionMenu.svelte +307 -0
  28. package/dist/editors/tiptap/LinkActionMenu.svelte.d.ts +8 -0
  29. package/dist/editors/tiptap/TipTap.svelte +856 -0
  30. package/dist/editors/tiptap/TipTap.svelte.d.ts +54 -0
  31. package/dist/editors/tiptap/TipTapBubble.svelte +790 -0
  32. package/dist/editors/tiptap/TipTapBubble.svelte.d.ts +44 -0
  33. package/dist/editors/tiptap/collaboration.d.ts +55 -0
  34. package/dist/editors/tiptap/collaboration.js +1 -0
  35. package/dist/editors/tiptap/extensions/Alert.d.ts +18 -0
  36. package/dist/editors/tiptap/extensions/Alert.js +72 -0
  37. package/dist/editors/tiptap/extensions/CodeBlockEditor.d.ts +21 -0
  38. package/dist/editors/tiptap/extensions/CodeBlockEditor.js +326 -0
  39. package/dist/editors/tiptap/extensions/Div.d.ts +19 -0
  40. package/dist/editors/tiptap/extensions/Div.js +89 -0
  41. package/dist/editors/tiptap/extensions/Span.d.ts +5 -0
  42. package/dist/editors/tiptap/extensions/Span.js +56 -0
  43. package/dist/editors/tiptap/extensions/codeBlockEditor.css +236 -0
  44. package/dist/editors/tiptap/extensions/codeBlockLanguages.d.ts +17 -0
  45. package/dist/editors/tiptap/extensions/codeBlockLanguages.js +124 -0
  46. package/dist/editors/tiptap/extensions/index.d.ts +7 -0
  47. package/dist/editors/tiptap/extensions/index.js +5 -0
  48. package/dist/editors/tiptap/toolbar/AlertButton.svelte +261 -0
  49. package/dist/editors/tiptap/toolbar/AlertButton.svelte.d.ts +7 -0
  50. package/dist/editors/tiptap/toolbar/AlignCenterButton.svelte +18 -0
  51. package/dist/editors/tiptap/toolbar/AlignCenterButton.svelte.d.ts +7 -0
  52. package/dist/editors/tiptap/toolbar/AlignJustifyButton.svelte +18 -0
  53. package/dist/editors/tiptap/toolbar/AlignJustifyButton.svelte.d.ts +7 -0
  54. package/dist/editors/tiptap/toolbar/AlignLeftButton.svelte +18 -0
  55. package/dist/editors/tiptap/toolbar/AlignLeftButton.svelte.d.ts +7 -0
  56. package/dist/editors/tiptap/toolbar/AlignRightButton.svelte +18 -0
  57. package/dist/editors/tiptap/toolbar/AlignRightButton.svelte.d.ts +7 -0
  58. package/dist/editors/tiptap/toolbar/BoldButton.svelte +18 -0
  59. package/dist/editors/tiptap/toolbar/BoldButton.svelte.d.ts +7 -0
  60. package/dist/editors/tiptap/toolbar/BulletListButton.svelte +18 -0
  61. package/dist/editors/tiptap/toolbar/BulletListButton.svelte.d.ts +7 -0
  62. package/dist/editors/tiptap/toolbar/CodeBlockButton.svelte +18 -0
  63. package/dist/editors/tiptap/toolbar/CodeBlockButton.svelte.d.ts +7 -0
  64. package/dist/editors/tiptap/toolbar/CodeButton.svelte +18 -0
  65. package/dist/editors/tiptap/toolbar/CodeButton.svelte.d.ts +7 -0
  66. package/dist/editors/tiptap/toolbar/ColorButton.svelte +299 -0
  67. package/dist/editors/tiptap/toolbar/ColorButton.svelte.d.ts +20 -0
  68. package/dist/editors/tiptap/toolbar/DocumentButton.svelte +58 -0
  69. package/dist/editors/tiptap/toolbar/DocumentButton.svelte.d.ts +9 -0
  70. package/dist/editors/tiptap/toolbar/HeadingButton.svelte +30 -0
  71. package/dist/editors/tiptap/toolbar/HeadingButton.svelte.d.ts +8 -0
  72. package/dist/editors/tiptap/toolbar/HtmlButton.svelte +68 -0
  73. package/dist/editors/tiptap/toolbar/HtmlButton.svelte.d.ts +7 -0
  74. package/dist/editors/tiptap/toolbar/ImageButton.svelte +54 -0
  75. package/dist/editors/tiptap/toolbar/ImageButton.svelte.d.ts +8 -0
  76. package/dist/editors/tiptap/toolbar/ItalicButton.svelte +18 -0
  77. package/dist/editors/tiptap/toolbar/ItalicButton.svelte.d.ts +7 -0
  78. package/dist/editors/tiptap/toolbar/LinkButton.svelte +257 -0
  79. package/dist/editors/tiptap/toolbar/LinkButton.svelte.d.ts +7 -0
  80. package/dist/editors/tiptap/toolbar/OrderedListButton.svelte +18 -0
  81. package/dist/editors/tiptap/toolbar/OrderedListButton.svelte.d.ts +7 -0
  82. package/dist/editors/tiptap/toolbar/RedoButton.svelte +18 -0
  83. package/dist/editors/tiptap/toolbar/RedoButton.svelte.d.ts +7 -0
  84. package/dist/editors/tiptap/toolbar/StrikethroughButton.svelte +18 -0
  85. package/dist/editors/tiptap/toolbar/StrikethroughButton.svelte.d.ts +7 -0
  86. package/dist/editors/tiptap/toolbar/SubscriptButton.svelte +18 -0
  87. package/dist/editors/tiptap/toolbar/SubscriptButton.svelte.d.ts +7 -0
  88. package/dist/editors/tiptap/toolbar/SuperscriptButton.svelte +18 -0
  89. package/dist/editors/tiptap/toolbar/SuperscriptButton.svelte.d.ts +7 -0
  90. package/dist/editors/tiptap/toolbar/TableButton.svelte +258 -0
  91. package/dist/editors/tiptap/toolbar/TableButton.svelte.d.ts +7 -0
  92. package/dist/editors/tiptap/toolbar/ToolbarButton.svelte +84 -0
  93. package/dist/editors/tiptap/toolbar/ToolbarButton.svelte.d.ts +10 -0
  94. package/dist/editors/tiptap/toolbar/UnderlineButton.svelte +18 -0
  95. package/dist/editors/tiptap/toolbar/UnderlineButton.svelte.d.ts +7 -0
  96. package/dist/editors/tiptap/toolbar/UndoButton.svelte +18 -0
  97. package/dist/editors/tiptap/toolbar/UndoButton.svelte.d.ts +7 -0
  98. package/dist/form/Autocomplete.svelte +86 -135
  99. package/dist/form/Autocomplete.svelte.d.ts +6 -8
  100. package/dist/form/AutocompleteMulti.svelte +385 -227
  101. package/dist/form/AutocompleteMulti.svelte.d.ts +59 -10
  102. package/dist/form/Checkbox.svelte +59 -54
  103. package/dist/form/Checkbox.svelte.d.ts +14 -5
  104. package/dist/form/Chips.svelte +29 -13
  105. package/dist/form/Chips.svelte.d.ts +16 -2
  106. package/dist/form/ComboBox.svelte +30 -20
  107. package/dist/form/ComboBox.svelte.d.ts +1 -1
  108. package/dist/form/ComboBoxItemBuilder.svelte +161 -188
  109. package/dist/form/ComboBoxItemBuilder.svelte.d.ts +19 -2
  110. package/dist/form/ComboBoxMulti.svelte +38 -24
  111. package/dist/form/ComboBoxMulti.svelte.d.ts +1 -1
  112. package/dist/form/CronBuilder.svelte +84 -67
  113. package/dist/form/CronBuilder.svelte.d.ts +16 -3
  114. package/dist/form/DatePicker.svelte +148 -195
  115. package/dist/form/DateRangePicker.svelte +101 -98
  116. package/dist/form/DateTimePicker.svelte +167 -208
  117. package/dist/form/DateTimePicker.svelte.d.ts +10 -2
  118. package/dist/form/FormGroup.svelte +33 -10
  119. package/dist/form/FormGroup.svelte.d.ts +12 -2
  120. package/dist/form/Number.svelte +70 -47
  121. package/dist/form/Number.svelte.d.ts +36 -6
  122. package/dist/form/Radio.svelte +18 -18
  123. package/dist/form/RadioGroup.svelte +23 -12
  124. package/dist/form/RadioGroup.svelte.d.ts +13 -2
  125. package/dist/form/SegmentedControl.svelte +76 -56
  126. package/dist/form/SegmentedControl.svelte.d.ts +9 -4
  127. package/dist/form/Select.svelte +150 -233
  128. package/dist/form/Select.svelte.d.ts +29 -5
  129. package/dist/form/SelectMulti.svelte +163 -277
  130. package/dist/form/SelectMulti.svelte.d.ts +36 -7
  131. package/dist/form/Slider.svelte +183 -269
  132. package/dist/form/Slider.svelte.d.ts +32 -17
  133. package/dist/form/StringArrayBuilder.svelte +249 -0
  134. package/dist/form/StringArrayBuilder.svelte.d.ts +15 -0
  135. package/dist/form/Switch.svelte +164 -106
  136. package/dist/form/Switch.svelte.d.ts +22 -3
  137. package/dist/form/TextArea.svelte +49 -29
  138. package/dist/form/TextArea.svelte.d.ts +23 -3
  139. package/dist/form/Textbox.svelte +69 -68
  140. package/dist/form/Textbox.svelte.d.ts +32 -4
  141. package/dist/form/TimePicker.svelte +42 -47
  142. package/dist/form/TimePicker.svelte.d.ts +12 -2
  143. package/dist/form/comboBoxCore.svelte.d.ts +99 -0
  144. package/dist/form/comboBoxCore.svelte.js +243 -0
  145. package/dist/icon/Icon.svelte +8 -3
  146. package/dist/icon/Icon.svelte.d.ts +8 -3
  147. package/dist/icon/file-type-bmp.svg +1 -0
  148. package/dist/icon/file-type-csv.svg +1 -0
  149. package/dist/icon/file-type-doc.svg +1 -0
  150. package/dist/icon/file-type-docx.svg +1 -0
  151. package/dist/icon/file-type-jpg.svg +1 -0
  152. package/dist/icon/file-type-pdf.svg +1 -0
  153. package/dist/icon/file-type-png.svg +1 -0
  154. package/dist/icon/file-type-ppt.svg +1 -0
  155. package/dist/icon/file-type-svg.svg +1 -0
  156. package/dist/icon/file-type-txt.svg +1 -0
  157. package/dist/icon/file-type-xls.svg +1 -0
  158. package/dist/icon/file-type-zip.svg +1 -0
  159. package/dist/icon/index.d.ts +166 -151
  160. package/dist/icon/index.js +166 -152
  161. package/dist/icon/logo-placeholder.svg +6 -0
  162. package/dist/icon/source-code.svg +1 -0
  163. package/dist/icon/sun-moon.svg +1 -0
  164. package/dist/icon/table.svg +6 -0
  165. package/dist/index.d.ts +87 -26
  166. package/dist/index.js +25 -28
  167. package/dist/layout/AppShell.svelte +12 -162
  168. package/dist/layout/AppShell.svelte.d.ts +6 -27
  169. package/dist/layout/CustomNavbar.svelte +9 -7
  170. package/dist/layout/CustomNavbar.svelte.d.ts +4 -2
  171. package/dist/layout/Navbar.svelte +161 -129
  172. package/dist/layout/Navbar.svelte.d.ts +29 -15
  173. package/dist/layout/NavbarItemDisplay.svelte +2 -2
  174. package/dist/layout/NavbarItemView.svelte +182 -0
  175. package/dist/layout/NavbarItemView.svelte.d.ts +10 -0
  176. package/dist/layout/Sidenav.svelte +280 -341
  177. package/dist/layout/Sidenav.svelte.d.ts +36 -4
  178. package/dist/models/ComboBoxItem.d.ts +2 -0
  179. package/dist/models/Employee.d.ts +53 -0
  180. package/dist/models/Employee.js +23 -0
  181. package/dist/models/Hyperlink.d.ts +3 -1
  182. package/dist/models/LinkCollectionItem.d.ts +3 -1
  183. package/dist/models/NavbarItem.d.ts +6 -2
  184. package/dist/theme.svelte.d.ts +0 -1
  185. package/dist/theme.svelte.js +46 -58
  186. package/dist/ui/Accordion.svelte +81 -242
  187. package/dist/ui/Accordion.svelte.d.ts +37 -14
  188. package/dist/ui/AccordionItem.svelte +303 -0
  189. package/dist/ui/AccordionItem.svelte.d.ts +21 -0
  190. package/dist/ui/ActionIcon.svelte +25 -21
  191. package/dist/ui/ActionIcon.svelte.d.ts +15 -2
  192. package/dist/ui/Badge.svelte +163 -171
  193. package/dist/ui/Badge.svelte.d.ts +13 -5
  194. package/dist/ui/Button.svelte +178 -205
  195. package/dist/ui/Button.svelte.d.ts +19 -2
  196. package/dist/ui/ButtonVariant.d.ts +15 -1
  197. package/dist/ui/ContextMenu.svelte +146 -0
  198. package/dist/ui/ContextMenu.svelte.d.ts +37 -0
  199. package/dist/ui/ContextMenuList.svelte +188 -0
  200. package/dist/ui/ContextMenuList.svelte.d.ts +12 -0
  201. package/dist/ui/Dialog.svelte +183 -111
  202. package/dist/ui/Dialog.svelte.d.ts +21 -4
  203. package/dist/ui/Drawer.svelte +237 -184
  204. package/dist/ui/Drawer.svelte.d.ts +20 -2
  205. package/dist/ui/Dropdown.svelte +24 -14
  206. package/dist/ui/Dropdown.svelte.d.ts +11 -2
  207. package/dist/ui/Dropzone.svelte +159 -57
  208. package/dist/ui/Dropzone.svelte.d.ts +29 -2
  209. package/dist/ui/Link.svelte +12 -4
  210. package/dist/ui/Link.svelte.d.ts +8 -2
  211. package/dist/ui/Loader.svelte +23 -18
  212. package/dist/ui/Loader.svelte.d.ts +5 -2
  213. package/dist/ui/Logo.svelte +37 -0
  214. package/dist/ui/Logo.svelte.d.ts +16 -0
  215. package/dist/ui/MultiSortable.svelte +287 -0
  216. package/dist/ui/MultiSortable.svelte.d.ts +50 -0
  217. package/dist/ui/Pagination.svelte +15 -9
  218. package/dist/ui/Pagination.svelte.d.ts +6 -2
  219. package/dist/ui/Popover.svelte +43 -65
  220. package/dist/ui/Popover.svelte.d.ts +14 -5
  221. package/dist/ui/ProgressBar.svelte +28 -30
  222. package/dist/ui/ProgressBarVariant.d.ts +7 -1
  223. package/dist/ui/SegmentedControl.svelte +0 -0
  224. package/dist/ui/SegmentedControl.svelte.d.ts +26 -0
  225. package/dist/ui/Sortable.svelte +163 -0
  226. package/dist/ui/Sortable.svelte.d.ts +47 -0
  227. package/dist/ui/Table.svelte +383 -80
  228. package/dist/ui/Table.svelte.d.ts +43 -2
  229. package/dist/ui/Tabs.svelte +22 -18
  230. package/dist/ui/Tabs.svelte.d.ts +6 -2
  231. package/dist/ui/ThemeSwitcher.svelte +26 -7
  232. package/dist/ui/ThemeSwitcher.svelte.d.ts +4 -2
  233. package/dist/ui/Tooltip.svelte +312 -180
  234. package/dist/ui/Tooltip.svelte.d.ts +4 -3
  235. package/dist/uiTheme.svelte.d.ts +86 -0
  236. package/dist/uiTheme.svelte.js +214 -0
  237. package/dist/util/DateFunctions.js +1 -1
  238. package/dist/util/DragDrop.d.ts +50 -0
  239. package/dist/util/DragDrop.js +154 -0
  240. package/dist/util/NavigateTo.js +2 -2
  241. package/dist/util/dayjs.d.ts +4 -0
  242. package/dist/util/dayjs.js +15 -0
  243. package/package.json +66 -26
  244. package/dist/display/Alert.svelte +0 -179
  245. package/dist/display/Alert.svelte.d.ts +0 -13
  246. package/dist/form/FileInput.svelte +0 -235
  247. package/dist/form/FileInput.svelte.d.ts +0 -23
  248. package/dist/form/PasswordInput.svelte +0 -253
  249. package/dist/form/PasswordInput.svelte.d.ts +0 -34
  250. package/dist/form/Rating.svelte +0 -235
  251. package/dist/form/Rating.svelte.d.ts +0 -21
  252. package/dist/styles/components.css +0 -199
  253. package/dist/styles/dark.css +0 -146
  254. package/dist/styles/index.css +0 -116
  255. package/dist/styles/reset.css +0 -110
  256. package/dist/styles/semantic.css +0 -86
  257. package/dist/styles/tokens.css +0 -203
  258. package/dist/styles/utilities.css +0 -523
  259. package/dist/ui/Breadcrumbs.svelte +0 -131
  260. package/dist/ui/Breadcrumbs.svelte.d.ts +0 -16
  261. package/dist/ui/LoadingOverlay.svelte +0 -53
  262. package/dist/ui/LoadingOverlay.svelte.d.ts +0 -11
  263. package/dist/ui/Progress.svelte +0 -191
  264. package/dist/ui/Progress.svelte.d.ts +0 -15
  265. package/dist/ui/RingProgress.svelte +0 -141
  266. package/dist/ui/RingProgress.svelte.d.ts +0 -18
  267. package/dist/ui/Skeleton.svelte +0 -85
  268. package/dist/ui/Skeleton.svelte.d.ts +0 -12
  269. package/dist/ui/Stepper.svelte +0 -355
  270. package/dist/ui/Stepper.svelte.d.ts +0 -24
  271. package/dist/ui/Timeline.svelte +0 -225
  272. package/dist/ui/Timeline.svelte.d.ts +0 -23
  273. /package/dist/{actions → util}/ClickOutside.d.ts +0 -0
  274. /package/dist/{actions → util}/ClickOutside.js +0 -0
  275. /package/dist/{transitions → util}/Transitions.d.ts +0 -0
  276. /package/dist/{transitions → util}/Transitions.js +0 -0
@@ -0,0 +1,115 @@
1
+ <script lang="ts">
2
+ import mailSvg from '../icon/mail.svg?raw';
3
+ import messageCircleSvg from '../icon/message-circle.svg?raw';
4
+ import userSearchSvg from '../icon/user-search.svg?raw';
5
+ import type { GitEmployee } from '../models/Employee.js';
6
+ import ActionIcon from '../ui/ActionIcon.svelte';
7
+
8
+ export interface GitCardProps {
9
+ /** Employee data object */
10
+ git: GitEmployee;
11
+ /** URL for the employee's profile image */
12
+ imgSrc: string;
13
+ /**
14
+ * Builds the link for the "profile" action from the employee, e.g.
15
+ * `(e) => \`https://people.example.com/${e.emplid}\``. The action is hidden when omitted.
16
+ */
17
+ profileHref?: (employee: GitEmployee) => string;
18
+ /**
19
+ * Builds the link for the "chat" action, e.g. an MS Teams deep link
20
+ * `(e) => \`MSTeams:/l/chat/0/0?users=${e.upn}\``. The action is hidden when omitted.
21
+ */
22
+ chatHref?: (employee: GitEmployee) => string;
23
+ /** Builds the link for the "email" action. Defaults to `mailto:` the employee's UPN. */
24
+ emailHref?: (employee: GitEmployee) => string;
25
+ }
26
+
27
+ let {
28
+ git,
29
+ imgSrc,
30
+ profileHref = undefined,
31
+ chatHref = undefined,
32
+ emailHref = (e) => `mailto:${e.upn}`
33
+ }: GitCardProps = $props();
34
+ </script>
35
+
36
+ <div class="git-container">
37
+ <div class="git-image">
38
+ <img src={imgSrc} alt="" />
39
+ </div>
40
+ <div class="git-info">
41
+ <div>
42
+ <div class="git-name">{git.fullName}</div>
43
+ <div class="git-jobtitle" title={git.jobTitle}>{git.jobTitle}</div>
44
+ </div>
45
+ <div class="icons">
46
+ {#if chatHref}
47
+ <ActionIcon variant="tertiary-subtle" href={chatHref(git)} svg={messageCircleSvg} />
48
+ {/if}
49
+ <ActionIcon variant="tertiary-subtle" href={emailHref(git)} svg={mailSvg} />
50
+ {#if profileHref}
51
+ <ActionIcon variant="tertiary-subtle" href={profileHref(git)} svg={userSearchSvg} />
52
+ {/if}
53
+ </div>
54
+ </div>
55
+ </div>
56
+
57
+ <style>
58
+ .git-container {
59
+ display: flex;
60
+ border-top-left-radius: 3rem;
61
+ overflow: hidden;
62
+ width: 375px;
63
+ }
64
+
65
+ .git-image {
66
+ width: 96px;
67
+ flex: 0 0 96px;
68
+ height: 96px;
69
+ }
70
+
71
+ .git-info {
72
+ display: flex;
73
+ flex-direction: column;
74
+ overflow: hidden;
75
+ justify-content: space-between;
76
+ padding: 0.25rem 0.5rem;
77
+ width: 100%;
78
+ border: 1px solid rgb(222, 226, 230);
79
+ border-left: none;
80
+ }
81
+
82
+ .git-name {
83
+ font-size: 1.25rem;
84
+ font-style: normal;
85
+ font-weight: 600;
86
+ color: var(--ui-primary);
87
+ }
88
+
89
+ .git-jobtitle {
90
+ font-size: 0.875rem;
91
+ color: #4e4e4e;
92
+ text-overflow: ellipsis;
93
+ overflow: hidden;
94
+ white-space: nowrap;
95
+ }
96
+
97
+ .icons {
98
+ display: flex;
99
+ }
100
+
101
+ :global(.dark) {
102
+ .git-info {
103
+ background: rgb(16, 17, 19);
104
+ border: none;
105
+ }
106
+
107
+ .git-name {
108
+ color: var(--text-color);
109
+ }
110
+
111
+ .git-jobtitle {
112
+ color: lightgrey;
113
+ }
114
+ }
115
+ </style>
@@ -0,0 +1,22 @@
1
+ import type { GitEmployee } from '../models/Employee.js';
2
+ export interface GitCardProps {
3
+ /** Employee data object */
4
+ git: GitEmployee;
5
+ /** URL for the employee's profile image */
6
+ imgSrc: string;
7
+ /**
8
+ * Builds the link for the "profile" action from the employee, e.g.
9
+ * `(e) => \`https://people.example.com/${e.emplid}\``. The action is hidden when omitted.
10
+ */
11
+ profileHref?: (employee: GitEmployee) => string;
12
+ /**
13
+ * Builds the link for the "chat" action, e.g. an MS Teams deep link
14
+ * `(e) => \`MSTeams:/l/chat/0/0?users=${e.upn}\``. The action is hidden when omitted.
15
+ */
16
+ chatHref?: (employee: GitEmployee) => string;
17
+ /** Builds the link for the "email" action. Defaults to `mailto:` the employee's UPN. */
18
+ emailHref?: (employee: GitEmployee) => string;
19
+ }
20
+ declare const GitCard: import("svelte").Component<GitCardProps, {}, "">;
21
+ type GitCard = ReturnType<typeof GitCard>;
22
+ export default GitCard;
@@ -1,16 +1,26 @@
1
1
  <script lang="ts">
2
2
  import Icon from '../icon/Icon.svelte';
3
3
 
4
- interface Props {
4
+ export interface AvatarProps {
5
+ /** Image source URL */
5
6
  src: string;
7
+ /** Alt text for the image */
6
8
  alt?: string;
9
+ /** Size of the avatar in rem */
7
10
  size?: number;
11
+ /** Initials to display when image fails to load */
8
12
  initials?: string;
13
+ /** SVG icon to display as fallback */
9
14
  fallBackSvg?: string;
15
+ /** Additional CSS classes */
10
16
  class?: string;
17
+ /** URL to navigate to when avatar is clicked */
11
18
  href?: string;
19
+ /** Background color for the avatar */
12
20
  backgroundColor?: string;
21
+ /** Shape of the avatar */
13
22
  shape?: 'circle' | 'rounded' | 'square';
23
+ /** Click event handler */
14
24
  onClick?: () => void;
15
25
  }
16
26
 
@@ -25,7 +35,7 @@
25
35
  backgroundColor,
26
36
  shape = 'circle',
27
37
  onClick
28
- }: Props = $props();
38
+ }: AvatarProps = $props();
29
39
 
30
40
  let imgExists = $state(true);
31
41
  const sizeText = $derived(size ? `${size}rem` : '');
@@ -101,17 +111,17 @@
101
111
  display: inline-flex;
102
112
  background: none;
103
113
  border: none;
104
- color: var(--pui-color-black);
114
+ color: black;
105
115
  padding: 0;
106
- transition: all var(--pui-transition-fast) var(--pui-ease-in-out);
116
+ transition: all 0.2s ease-in-out;
107
117
  text-decoration: none;
108
118
 
109
119
  .avatar {
110
120
  cursor: pointer;
111
121
 
112
122
  &:hover {
113
- background: var(--pui-color-primary);
114
- color: var(--pui-text-primary);
123
+ background: var(--ui-primary);
124
+ color: var(--text-color);
115
125
  }
116
126
  }
117
127
 
@@ -122,45 +132,47 @@
122
132
 
123
133
  .avatar {
124
134
  object-fit: cover;
125
- background: var(--pui-color-gray-200);
135
+ background: #e8e8e8;
126
136
  display: flex;
127
137
  justify-content: center;
128
138
  align-items: center;
129
- transition: all var(--pui-transition-fast) var(--pui-ease-in-out);
139
+ transition: all 0.2s ease-in-out;
130
140
  }
131
141
 
132
142
  .avatar.circle {
133
- border-radius: var(--pui-radius-full);
143
+ border-radius: 50%;
134
144
  }
135
145
 
136
146
  .avatar.rounded {
137
- border-radius: var(--pui-radius-lg);
147
+ border-radius: 6px;
138
148
  }
139
149
 
140
150
  .initials {
141
151
  display: flex;
142
152
  align-items: center;
143
153
  justify-content: center;
144
- color: var(--pui-color-white);
145
- font-weight: var(--pui-font-weight-bold);
146
- border-radius: var(--pui-radius-full);
154
+ /* background-color: #ccc; Fallback color for initials */
155
+ color: #fff; /* Text color for initials */
156
+ /* font-size: calc({size} / 2); Adjust font size based on avatar size */
157
+ font-weight: bold;
158
+ border-radius: 50%;
147
159
  }
148
160
 
149
161
  :global(.dark) {
150
162
  .avatar-container button,
151
163
  .avatar-container a {
152
- color: var(--pui-text-primary);
164
+ color: var(--text-color);
153
165
 
154
166
  .avatar {
155
167
  &:hover {
156
- background: var(--pui-color-secondary);
157
- color: var(--pui-color-black);
168
+ background: var(--ui-accent);
169
+ color: black;
158
170
  }
159
171
  }
160
172
  }
161
173
 
162
174
  .avatar {
163
- background: var(--pui-color-dark-500);
175
+ background: rgb(6, 7, 9); /* Dark mode background color */
164
176
  }
165
177
  }
166
178
  </style>
@@ -1,15 +1,25 @@
1
- interface Props {
1
+ export interface AvatarProps {
2
+ /** Image source URL */
2
3
  src: string;
4
+ /** Alt text for the image */
3
5
  alt?: string;
6
+ /** Size of the avatar in rem */
4
7
  size?: number;
8
+ /** Initials to display when image fails to load */
5
9
  initials?: string;
10
+ /** SVG icon to display as fallback */
6
11
  fallBackSvg?: string;
12
+ /** Additional CSS classes */
7
13
  class?: string;
14
+ /** URL to navigate to when avatar is clicked */
8
15
  href?: string;
16
+ /** Background color for the avatar */
9
17
  backgroundColor?: string;
18
+ /** Shape of the avatar */
10
19
  shape?: 'circle' | 'rounded' | 'square';
20
+ /** Click event handler */
11
21
  onClick?: () => void;
12
22
  }
13
- declare const Avatar: import("svelte").Component<Props, {}, "">;
23
+ declare const Avatar: import("svelte").Component<AvatarProps, {}, "">;
14
24
  type Avatar = ReturnType<typeof Avatar>;
15
25
  export default Avatar;
@@ -4,13 +4,20 @@
4
4
  import Link from '../ui/Link.svelte';
5
5
  import type { LinkCollectionItem } from '../models/LinkCollectionItem.js';
6
6
 
7
- interface Props {
7
+ export interface LinkCollectionProps {
8
+ /** Array of simple hyperlinks */
8
9
  links?: Hyperlink[];
10
+ /** Array of rich link items with more options */
9
11
  items?: LinkCollectionItem[];
12
+ /** Additional CSS classes */
10
13
  classes?: string;
14
+ /** Footer action buttons */
11
15
  footerButtons?: Hyperlink[];
16
+ /** Disable rounded corners */
12
17
  notRounded?: boolean;
18
+ /** Remove outside border */
13
19
  noOutsideBorder?: boolean;
20
+ /** Remove separator lines between items */
14
21
  noSeperator?: boolean;
15
22
  }
16
23
 
@@ -22,7 +29,7 @@
22
29
  notRounded = false,
23
30
  noOutsideBorder = false,
24
31
  noSeperator = false
25
- }: Props = $props();
32
+ }: LinkCollectionProps = $props();
26
33
  </script>
27
34
 
28
35
  <div
@@ -31,7 +38,12 @@
31
38
  : ''} {noSeperator ? 'no-seperator' : ''}"
32
39
  >
33
40
  {#each links as link}
34
- <Link class="link" target={link.newTab ? '_blank' : undefined} href={link.href}>
41
+ <Link
42
+ class="link"
43
+ target={link.newTab ? '_blank' : undefined}
44
+ href={link.href}
45
+ onclick={link.onclick}
46
+ >
35
47
  {#if link.svg}
36
48
  <Icon svg={link.svg} size="18px" />
37
49
  {/if}
@@ -39,7 +51,12 @@
39
51
  </Link>
40
52
  {/each}
41
53
  {#each items as item}
42
- <Link class="link item" target={item.newTab ? '_blank' : undefined} href={item.href}>
54
+ <Link
55
+ class="link item"
56
+ target={item.newTab ? '_blank' : undefined}
57
+ href={item.href}
58
+ onclick={item.onclick}
59
+ >
43
60
  <div class="link-inner left">
44
61
  {#if item.leftSvg}
45
62
  <Icon svg={item.leftSvg} size="18px" />
@@ -58,7 +75,12 @@
58
75
  <div class="footer">
59
76
  {#each footerButtons as button}
60
77
  <div class="footer-button">
61
- <Link class="link" target={button.newTab ? '_blank' : undefined} href={button.href}>
78
+ <Link
79
+ class="link"
80
+ target={button.newTab ? '_blank' : undefined}
81
+ href={button.href}
82
+ onclick={button.onclick}
83
+ >
62
84
  {#if button.svg}
63
85
  <Icon svg={button.svg} size="18px" />
64
86
  {/if}
@@ -74,8 +96,8 @@
74
96
  .link-collection {
75
97
  display: flex;
76
98
  flex-direction: column;
77
- border: 1px solid var(--pui-border-default);
78
- border-radius: var(--pui-radius-md);
99
+ border: 1px solid var(--border-color);
100
+ border-radius: 6px;
79
101
  }
80
102
 
81
103
  .link-collection.not-rounded {
@@ -98,7 +120,7 @@
98
120
  .link-inner {
99
121
  display: flex;
100
122
  align-items: center;
101
- gap: var(--pui-spacing-2);
123
+ gap: 0.5rem;
102
124
  }
103
125
 
104
126
  .link-inner.left {
@@ -106,18 +128,18 @@
106
128
  }
107
129
 
108
130
  .link-collection :global(.link) {
109
- transition: all var(--pui-transition-fast) var(--pui-ease-in-out);
110
- border-bottom: 1px solid var(--pui-border-default);
111
- padding: var(--pui-spacing-2);
131
+ transition: all 200ms;
132
+ border-bottom: 1px solid var(--border-color);
133
+ padding: 0.5rem;
112
134
  display: flex;
113
135
  align-items: center;
114
- gap: var(--pui-spacing-2);
136
+ gap: 0.5rem;
115
137
  text-decoration: none;
116
- color: var(--pui-color-accent);
138
+ color: var(--ui-tertiary-dark);
117
139
  font-weight: normal;
118
140
 
119
141
  &:hover {
120
- background: var(--pui-bg-hover);
142
+ background: #b7e1d8;
121
143
  }
122
144
 
123
145
  &:last-child {
@@ -127,12 +149,12 @@
127
149
 
128
150
  :global(.dark) {
129
151
  .link-collection :global(.link) {
130
- color: var(--pui-color-accent);
152
+ color: var(--ui-tertiary);
131
153
  }
132
154
 
133
155
  .link-collection :global(.link) {
134
156
  &:hover {
135
- background: var(--pui-bg-hover);
157
+ background: var(--ui-primary);
136
158
  }
137
159
  }
138
160
  }
@@ -143,11 +165,11 @@
143
165
 
144
166
  .footer-button {
145
167
  flex: 1;
146
- border-right: 1px solid var(--pui-border-default);
168
+ border-right: 1px solid var(--border-color);
147
169
  }
148
170
 
149
171
  .link-collection .footer-button :global(.link) {
150
- font-weight: var(--pui-font-weight-semibold);
172
+ font-weight: 600;
151
173
  }
152
174
 
153
175
  .footer-button:last-child {
@@ -1,14 +1,21 @@
1
1
  import type { Hyperlink } from '../models/Hyperlink.js';
2
2
  import type { LinkCollectionItem } from '../models/LinkCollectionItem.js';
3
- interface Props {
3
+ export interface LinkCollectionProps {
4
+ /** Array of simple hyperlinks */
4
5
  links?: Hyperlink[];
6
+ /** Array of rich link items with more options */
5
7
  items?: LinkCollectionItem[];
8
+ /** Additional CSS classes */
6
9
  classes?: string;
10
+ /** Footer action buttons */
7
11
  footerButtons?: Hyperlink[];
12
+ /** Disable rounded corners */
8
13
  notRounded?: boolean;
14
+ /** Remove outside border */
9
15
  noOutsideBorder?: boolean;
16
+ /** Remove separator lines between items */
10
17
  noSeperator?: boolean;
11
18
  }
12
- declare const LinkCollection: import("svelte").Component<Props, {}, "">;
19
+ declare const LinkCollection: import("svelte").Component<LinkCollectionProps, {}, "">;
13
20
  type LinkCollection = ReturnType<typeof LinkCollection>;
14
21
  export default LinkCollection;
@@ -1,22 +1,30 @@
1
1
  <script lang="ts">
2
2
  import type { Snippet } from 'svelte';
3
3
 
4
- interface Props {
5
- class?: string;
4
+ export interface PaperProps {
5
+ /** CSS classes for the outer container */
6
6
  containerClass?: string;
7
+ /** CSS classes for the body section */
7
8
  bodyClass?: string;
9
+ /** CSS classes for the title section */
8
10
  titleClass?: string;
11
+ /** Title text displayed in the header */
9
12
  title?: string;
13
+ /** Remove default padding from the body */
10
14
  noPadding?: boolean;
15
+ /** Remove default gap between title and body */
11
16
  noGap?: boolean;
17
+ /** Minimum height for the body section */
12
18
  minBodyHeight?: string;
19
+ /** Callback when title is clicked */
13
20
  onTitleClick?: () => void;
21
+ /** Action buttons displayed in the title bar */
14
22
  buttons?: Snippet;
23
+ /** Main content of the paper */
15
24
  children?: Snippet;
16
25
  }
17
26
 
18
27
  let {
19
- class: className = '',
20
28
  containerClass = '',
21
29
  bodyClass = '',
22
30
  titleClass = '',
@@ -27,10 +35,10 @@
27
35
  onTitleClick = () => {},
28
36
  buttons,
29
37
  children
30
- }: Props = $props();
38
+ }: PaperProps = $props();
31
39
  </script>
32
40
 
33
- <div class="paper rounded {containerClass} {className}">
41
+ <div class="paper rounded {containerClass}">
34
42
  {#if title}
35
43
  <!-- svelte-ignore a11y_click_events_have_key_events -->
36
44
  <!-- svelte-ignore a11y_no_static_element_interactions -->
@@ -54,9 +62,9 @@
54
62
 
55
63
  <style>
56
64
  .paper-body {
57
- border-radius: var(--pui-radius-base);
65
+ border-radius: 0.25rem;
58
66
  position: relative;
59
- padding: var(--pui-spacing-3);
67
+ padding: 0.75rem;
60
68
  flex-grow: 1;
61
69
  }
62
70
 
@@ -71,24 +79,27 @@
71
79
  }
72
80
 
73
81
  .paper-body-bg {
74
- background-color: var(--pui-paper-body-bg);
82
+ background-color: var(--paper-body-bg);
75
83
  }
76
84
 
77
85
  .paper {
78
- box-shadow: var(--pui-shadow-sm);
86
+ box-shadow:
87
+ rgba(0, 0, 0, 0.05) 0px 1px 3px 0px,
88
+ rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
79
89
  display: flex;
80
90
  flex-direction: column;
81
91
  }
82
92
 
83
93
  .paper-title {
84
- border-bottom: 1px solid var(--pui-border-disabled);
85
- background: var(--pui-paper-title-bg);
86
- border-color: var(--pui-paper-title-border);
87
- border-top-left-radius: var(--pui-radius-base);
88
- border-top-right-radius: var(--pui-radius-base);
89
- font-weight: var(--pui-font-weight-semibold);
94
+ border-bottom: 1px solid #ccc;
95
+ background: var(--paper-title-bg);
96
+ border-color: var(--paper-title-border);
97
+ border-top-left-radius: 0.25rem;
98
+ border-top-right-radius: 0.25rem;
90
99
  display: flex;
91
100
  justify-content: space-between;
101
+
102
+ /* bg-paper-title rounded-t font-semibold flex justify-between border-paper-border */
92
103
  }
93
104
 
94
105
  :global(.dark) .paper-title {
@@ -96,20 +107,21 @@
96
107
  }
97
108
 
98
109
  .paper-title-text {
99
- padding: var(--pui-spacing-2) var(--pui-spacing-3);
110
+ padding: 0.5rem 0.75rem;
111
+ font-weight: 600;
100
112
  }
101
113
 
102
114
  .paper-title-buttons {
103
- margin-right: var(--pui-spacing-2);
115
+ margin-right: 0.5rem;
104
116
  display: flex;
105
117
  align-items: center;
106
- gap: var(--pui-spacing-1);
118
+ gap: 0.25rem;
107
119
  }
108
120
 
109
121
  .gap {
110
122
  display: flex;
111
123
  flex-direction: column;
112
- gap: var(--pui-spacing-2);
124
+ gap: 0.5rem;
113
125
  }
114
126
 
115
127
  .p-0 {
@@ -1,17 +1,26 @@
1
1
  import type { Snippet } from 'svelte';
2
- interface Props {
3
- class?: string;
2
+ export interface PaperProps {
3
+ /** CSS classes for the outer container */
4
4
  containerClass?: string;
5
+ /** CSS classes for the body section */
5
6
  bodyClass?: string;
7
+ /** CSS classes for the title section */
6
8
  titleClass?: string;
9
+ /** Title text displayed in the header */
7
10
  title?: string;
11
+ /** Remove default padding from the body */
8
12
  noPadding?: boolean;
13
+ /** Remove default gap between title and body */
9
14
  noGap?: boolean;
15
+ /** Minimum height for the body section */
10
16
  minBodyHeight?: string;
17
+ /** Callback when title is clicked */
11
18
  onTitleClick?: () => void;
19
+ /** Action buttons displayed in the title bar */
12
20
  buttons?: Snippet;
21
+ /** Main content of the paper */
13
22
  children?: Snippet;
14
23
  }
15
- declare const Paper: import("svelte").Component<Props, {}, "">;
24
+ declare const Paper: import("svelte").Component<PaperProps, {}, "">;
16
25
  type Paper = ReturnType<typeof Paper>;
17
26
  export default Paper;