@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.
- package/LICENSE +1 -1
- package/README.md +134 -130
- package/dist/app.css +178 -0
- package/dist/bootstrap.min.css +3600 -0
- package/dist/cards/GitCard.svelte +115 -0
- package/dist/cards/GitCard.svelte.d.ts +22 -0
- package/dist/display/Avatar.svelte +29 -17
- package/dist/display/Avatar.svelte.d.ts +12 -2
- package/dist/display/LinkCollection.svelte +40 -18
- package/dist/display/LinkCollection.svelte.d.ts +9 -2
- package/dist/display/Paper.svelte +31 -19
- package/dist/display/Paper.svelte.d.ts +12 -3
- package/dist/display/alert/Alert.svelte +129 -0
- package/dist/display/alert/Alert.svelte.d.ts +15 -0
- package/dist/display/alert/AlertVariant.d.ts +1 -0
- package/dist/display/alert/AlertVariant.js +1 -0
- package/dist/display/filetree/FileTree.svelte +259 -0
- package/dist/display/filetree/FileTree.svelte.d.ts +76 -0
- package/dist/display/filetree/FileTreeItem.svelte +396 -0
- package/dist/display/filetree/FileTreeItem.svelte.d.ts +40 -0
- package/dist/display/filetree/FileTreeNode.d.ts +46 -0
- package/dist/display/filetree/FileTreeNode.js +115 -0
- package/dist/display/filetree/index.d.ts +5 -0
- package/dist/display/filetree/index.js +3 -0
- package/dist/editors/CodeMirror.svelte +306 -0
- package/dist/editors/CodeMirror.svelte.d.ts +31 -0
- package/dist/editors/tiptap/LinkActionMenu.svelte +307 -0
- package/dist/editors/tiptap/LinkActionMenu.svelte.d.ts +8 -0
- package/dist/editors/tiptap/TipTap.svelte +856 -0
- package/dist/editors/tiptap/TipTap.svelte.d.ts +54 -0
- package/dist/editors/tiptap/TipTapBubble.svelte +790 -0
- package/dist/editors/tiptap/TipTapBubble.svelte.d.ts +44 -0
- package/dist/editors/tiptap/collaboration.d.ts +55 -0
- package/dist/editors/tiptap/collaboration.js +1 -0
- package/dist/editors/tiptap/extensions/Alert.d.ts +18 -0
- package/dist/editors/tiptap/extensions/Alert.js +72 -0
- package/dist/editors/tiptap/extensions/CodeBlockEditor.d.ts +21 -0
- package/dist/editors/tiptap/extensions/CodeBlockEditor.js +326 -0
- package/dist/editors/tiptap/extensions/Div.d.ts +19 -0
- package/dist/editors/tiptap/extensions/Div.js +89 -0
- package/dist/editors/tiptap/extensions/Span.d.ts +5 -0
- package/dist/editors/tiptap/extensions/Span.js +56 -0
- package/dist/editors/tiptap/extensions/codeBlockEditor.css +236 -0
- package/dist/editors/tiptap/extensions/codeBlockLanguages.d.ts +17 -0
- package/dist/editors/tiptap/extensions/codeBlockLanguages.js +124 -0
- package/dist/editors/tiptap/extensions/index.d.ts +7 -0
- package/dist/editors/tiptap/extensions/index.js +5 -0
- package/dist/editors/tiptap/toolbar/AlertButton.svelte +261 -0
- package/dist/editors/tiptap/toolbar/AlertButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/AlignCenterButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/AlignCenterButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/AlignJustifyButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/AlignJustifyButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/AlignLeftButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/AlignLeftButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/AlignRightButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/AlignRightButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/BoldButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/BoldButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/BulletListButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/BulletListButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/CodeBlockButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/CodeBlockButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/CodeButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/CodeButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/ColorButton.svelte +299 -0
- package/dist/editors/tiptap/toolbar/ColorButton.svelte.d.ts +20 -0
- package/dist/editors/tiptap/toolbar/DocumentButton.svelte +58 -0
- package/dist/editors/tiptap/toolbar/DocumentButton.svelte.d.ts +9 -0
- package/dist/editors/tiptap/toolbar/HeadingButton.svelte +30 -0
- package/dist/editors/tiptap/toolbar/HeadingButton.svelte.d.ts +8 -0
- package/dist/editors/tiptap/toolbar/HtmlButton.svelte +68 -0
- package/dist/editors/tiptap/toolbar/HtmlButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/ImageButton.svelte +54 -0
- package/dist/editors/tiptap/toolbar/ImageButton.svelte.d.ts +8 -0
- package/dist/editors/tiptap/toolbar/ItalicButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/ItalicButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/LinkButton.svelte +257 -0
- package/dist/editors/tiptap/toolbar/LinkButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/OrderedListButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/OrderedListButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/RedoButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/RedoButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/StrikethroughButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/StrikethroughButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/SubscriptButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/SubscriptButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/SuperscriptButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/SuperscriptButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/TableButton.svelte +258 -0
- package/dist/editors/tiptap/toolbar/TableButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/ToolbarButton.svelte +84 -0
- package/dist/editors/tiptap/toolbar/ToolbarButton.svelte.d.ts +10 -0
- package/dist/editors/tiptap/toolbar/UnderlineButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/UnderlineButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/UndoButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/UndoButton.svelte.d.ts +7 -0
- package/dist/form/Autocomplete.svelte +86 -135
- package/dist/form/Autocomplete.svelte.d.ts +6 -8
- package/dist/form/AutocompleteMulti.svelte +385 -227
- package/dist/form/AutocompleteMulti.svelte.d.ts +59 -10
- package/dist/form/Checkbox.svelte +59 -54
- package/dist/form/Checkbox.svelte.d.ts +14 -5
- package/dist/form/Chips.svelte +29 -13
- package/dist/form/Chips.svelte.d.ts +16 -2
- package/dist/form/ComboBox.svelte +30 -20
- package/dist/form/ComboBox.svelte.d.ts +1 -1
- package/dist/form/ComboBoxItemBuilder.svelte +161 -188
- package/dist/form/ComboBoxItemBuilder.svelte.d.ts +19 -2
- package/dist/form/ComboBoxMulti.svelte +38 -24
- package/dist/form/ComboBoxMulti.svelte.d.ts +1 -1
- package/dist/form/CronBuilder.svelte +84 -67
- package/dist/form/CronBuilder.svelte.d.ts +16 -3
- package/dist/form/DatePicker.svelte +148 -195
- package/dist/form/DateRangePicker.svelte +101 -98
- package/dist/form/DateTimePicker.svelte +167 -208
- package/dist/form/DateTimePicker.svelte.d.ts +10 -2
- package/dist/form/FormGroup.svelte +33 -10
- package/dist/form/FormGroup.svelte.d.ts +12 -2
- package/dist/form/Number.svelte +70 -47
- package/dist/form/Number.svelte.d.ts +36 -6
- package/dist/form/Radio.svelte +18 -18
- package/dist/form/RadioGroup.svelte +23 -12
- package/dist/form/RadioGroup.svelte.d.ts +13 -2
- package/dist/form/SegmentedControl.svelte +76 -56
- package/dist/form/SegmentedControl.svelte.d.ts +9 -4
- package/dist/form/Select.svelte +150 -233
- package/dist/form/Select.svelte.d.ts +29 -5
- package/dist/form/SelectMulti.svelte +163 -277
- package/dist/form/SelectMulti.svelte.d.ts +36 -7
- package/dist/form/Slider.svelte +183 -269
- package/dist/form/Slider.svelte.d.ts +32 -17
- package/dist/form/StringArrayBuilder.svelte +249 -0
- package/dist/form/StringArrayBuilder.svelte.d.ts +15 -0
- package/dist/form/Switch.svelte +164 -106
- package/dist/form/Switch.svelte.d.ts +22 -3
- package/dist/form/TextArea.svelte +49 -29
- package/dist/form/TextArea.svelte.d.ts +23 -3
- package/dist/form/Textbox.svelte +69 -68
- package/dist/form/Textbox.svelte.d.ts +32 -4
- package/dist/form/TimePicker.svelte +42 -47
- package/dist/form/TimePicker.svelte.d.ts +12 -2
- package/dist/form/comboBoxCore.svelte.d.ts +99 -0
- package/dist/form/comboBoxCore.svelte.js +243 -0
- package/dist/icon/Icon.svelte +8 -3
- package/dist/icon/Icon.svelte.d.ts +8 -3
- package/dist/icon/file-type-bmp.svg +1 -0
- package/dist/icon/file-type-csv.svg +1 -0
- package/dist/icon/file-type-doc.svg +1 -0
- package/dist/icon/file-type-docx.svg +1 -0
- package/dist/icon/file-type-jpg.svg +1 -0
- package/dist/icon/file-type-pdf.svg +1 -0
- package/dist/icon/file-type-png.svg +1 -0
- package/dist/icon/file-type-ppt.svg +1 -0
- package/dist/icon/file-type-svg.svg +1 -0
- package/dist/icon/file-type-txt.svg +1 -0
- package/dist/icon/file-type-xls.svg +1 -0
- package/dist/icon/file-type-zip.svg +1 -0
- package/dist/icon/index.d.ts +166 -151
- package/dist/icon/index.js +166 -152
- package/dist/icon/logo-placeholder.svg +6 -0
- package/dist/icon/source-code.svg +1 -0
- package/dist/icon/sun-moon.svg +1 -0
- package/dist/icon/table.svg +6 -0
- package/dist/index.d.ts +87 -26
- package/dist/index.js +25 -28
- package/dist/layout/AppShell.svelte +12 -162
- package/dist/layout/AppShell.svelte.d.ts +6 -27
- package/dist/layout/CustomNavbar.svelte +9 -7
- package/dist/layout/CustomNavbar.svelte.d.ts +4 -2
- package/dist/layout/Navbar.svelte +161 -129
- package/dist/layout/Navbar.svelte.d.ts +29 -15
- package/dist/layout/NavbarItemDisplay.svelte +2 -2
- package/dist/layout/NavbarItemView.svelte +182 -0
- package/dist/layout/NavbarItemView.svelte.d.ts +10 -0
- package/dist/layout/Sidenav.svelte +280 -341
- package/dist/layout/Sidenav.svelte.d.ts +36 -4
- package/dist/models/ComboBoxItem.d.ts +2 -0
- package/dist/models/Employee.d.ts +53 -0
- package/dist/models/Employee.js +23 -0
- package/dist/models/Hyperlink.d.ts +3 -1
- package/dist/models/LinkCollectionItem.d.ts +3 -1
- package/dist/models/NavbarItem.d.ts +6 -2
- package/dist/theme.svelte.d.ts +0 -1
- package/dist/theme.svelte.js +46 -58
- package/dist/ui/Accordion.svelte +81 -242
- package/dist/ui/Accordion.svelte.d.ts +37 -14
- package/dist/ui/AccordionItem.svelte +303 -0
- package/dist/ui/AccordionItem.svelte.d.ts +21 -0
- package/dist/ui/ActionIcon.svelte +25 -21
- package/dist/ui/ActionIcon.svelte.d.ts +15 -2
- package/dist/ui/Badge.svelte +163 -171
- package/dist/ui/Badge.svelte.d.ts +13 -5
- package/dist/ui/Button.svelte +178 -205
- package/dist/ui/Button.svelte.d.ts +19 -2
- package/dist/ui/ButtonVariant.d.ts +15 -1
- package/dist/ui/ContextMenu.svelte +146 -0
- package/dist/ui/ContextMenu.svelte.d.ts +37 -0
- package/dist/ui/ContextMenuList.svelte +188 -0
- package/dist/ui/ContextMenuList.svelte.d.ts +12 -0
- package/dist/ui/Dialog.svelte +183 -111
- package/dist/ui/Dialog.svelte.d.ts +21 -4
- package/dist/ui/Drawer.svelte +237 -184
- package/dist/ui/Drawer.svelte.d.ts +20 -2
- package/dist/ui/Dropdown.svelte +24 -14
- package/dist/ui/Dropdown.svelte.d.ts +11 -2
- package/dist/ui/Dropzone.svelte +159 -57
- package/dist/ui/Dropzone.svelte.d.ts +29 -2
- package/dist/ui/Link.svelte +12 -4
- package/dist/ui/Link.svelte.d.ts +8 -2
- package/dist/ui/Loader.svelte +23 -18
- package/dist/ui/Loader.svelte.d.ts +5 -2
- package/dist/ui/Logo.svelte +37 -0
- package/dist/ui/Logo.svelte.d.ts +16 -0
- package/dist/ui/MultiSortable.svelte +287 -0
- package/dist/ui/MultiSortable.svelte.d.ts +50 -0
- package/dist/ui/Pagination.svelte +15 -9
- package/dist/ui/Pagination.svelte.d.ts +6 -2
- package/dist/ui/Popover.svelte +43 -65
- package/dist/ui/Popover.svelte.d.ts +14 -5
- package/dist/ui/ProgressBar.svelte +28 -30
- package/dist/ui/ProgressBarVariant.d.ts +7 -1
- package/dist/ui/SegmentedControl.svelte +0 -0
- package/dist/ui/SegmentedControl.svelte.d.ts +26 -0
- package/dist/ui/Sortable.svelte +163 -0
- package/dist/ui/Sortable.svelte.d.ts +47 -0
- package/dist/ui/Table.svelte +383 -80
- package/dist/ui/Table.svelte.d.ts +43 -2
- package/dist/ui/Tabs.svelte +22 -18
- package/dist/ui/Tabs.svelte.d.ts +6 -2
- package/dist/ui/ThemeSwitcher.svelte +26 -7
- package/dist/ui/ThemeSwitcher.svelte.d.ts +4 -2
- package/dist/ui/Tooltip.svelte +312 -180
- package/dist/ui/Tooltip.svelte.d.ts +4 -3
- package/dist/uiTheme.svelte.d.ts +86 -0
- package/dist/uiTheme.svelte.js +214 -0
- package/dist/util/DateFunctions.js +1 -1
- package/dist/util/DragDrop.d.ts +50 -0
- package/dist/util/DragDrop.js +154 -0
- package/dist/util/NavigateTo.js +2 -2
- package/dist/util/dayjs.d.ts +4 -0
- package/dist/util/dayjs.js +15 -0
- package/package.json +66 -26
- package/dist/display/Alert.svelte +0 -179
- package/dist/display/Alert.svelte.d.ts +0 -13
- package/dist/form/FileInput.svelte +0 -235
- package/dist/form/FileInput.svelte.d.ts +0 -23
- package/dist/form/PasswordInput.svelte +0 -253
- package/dist/form/PasswordInput.svelte.d.ts +0 -34
- package/dist/form/Rating.svelte +0 -235
- package/dist/form/Rating.svelte.d.ts +0 -21
- package/dist/styles/components.css +0 -199
- package/dist/styles/dark.css +0 -146
- package/dist/styles/index.css +0 -116
- package/dist/styles/reset.css +0 -110
- package/dist/styles/semantic.css +0 -86
- package/dist/styles/tokens.css +0 -203
- package/dist/styles/utilities.css +0 -523
- package/dist/ui/Breadcrumbs.svelte +0 -131
- package/dist/ui/Breadcrumbs.svelte.d.ts +0 -16
- package/dist/ui/LoadingOverlay.svelte +0 -53
- package/dist/ui/LoadingOverlay.svelte.d.ts +0 -11
- package/dist/ui/Progress.svelte +0 -191
- package/dist/ui/Progress.svelte.d.ts +0 -15
- package/dist/ui/RingProgress.svelte +0 -141
- package/dist/ui/RingProgress.svelte.d.ts +0 -18
- package/dist/ui/Skeleton.svelte +0 -85
- package/dist/ui/Skeleton.svelte.d.ts +0 -12
- package/dist/ui/Stepper.svelte +0 -355
- package/dist/ui/Stepper.svelte.d.ts +0 -24
- package/dist/ui/Timeline.svelte +0 -225
- package/dist/ui/Timeline.svelte.d.ts +0 -23
- /package/dist/{actions → util}/ClickOutside.d.ts +0 -0
- /package/dist/{actions → util}/ClickOutside.js +0 -0
- /package/dist/{transitions → util}/Transitions.d.ts +0 -0
- /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
|
|
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
|
-
}:
|
|
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:
|
|
114
|
+
color: black;
|
|
105
115
|
padding: 0;
|
|
106
|
-
transition: all
|
|
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(--
|
|
114
|
-
color: var(--
|
|
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:
|
|
135
|
+
background: #e8e8e8;
|
|
126
136
|
display: flex;
|
|
127
137
|
justify-content: center;
|
|
128
138
|
align-items: center;
|
|
129
|
-
transition: all
|
|
139
|
+
transition: all 0.2s ease-in-out;
|
|
130
140
|
}
|
|
131
141
|
|
|
132
142
|
.avatar.circle {
|
|
133
|
-
border-radius:
|
|
143
|
+
border-radius: 50%;
|
|
134
144
|
}
|
|
135
145
|
|
|
136
146
|
.avatar.rounded {
|
|
137
|
-
border-radius:
|
|
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:
|
|
145
|
-
|
|
146
|
-
|
|
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(--
|
|
164
|
+
color: var(--text-color);
|
|
153
165
|
|
|
154
166
|
.avatar {
|
|
155
167
|
&:hover {
|
|
156
|
-
background: var(--
|
|
157
|
-
color:
|
|
168
|
+
background: var(--ui-accent);
|
|
169
|
+
color: black;
|
|
158
170
|
}
|
|
159
171
|
}
|
|
160
172
|
}
|
|
161
173
|
|
|
162
174
|
.avatar {
|
|
163
|
-
background:
|
|
175
|
+
background: rgb(6, 7, 9); /* Dark mode background color */
|
|
164
176
|
}
|
|
165
177
|
}
|
|
166
178
|
</style>
|
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
interface
|
|
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<
|
|
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
|
|
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
|
-
}:
|
|
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
|
|
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
|
|
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
|
|
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(--
|
|
78
|
-
border-radius:
|
|
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:
|
|
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
|
|
110
|
-
border-bottom: 1px solid var(--
|
|
111
|
-
padding:
|
|
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:
|
|
136
|
+
gap: 0.5rem;
|
|
115
137
|
text-decoration: none;
|
|
116
|
-
color: var(--
|
|
138
|
+
color: var(--ui-tertiary-dark);
|
|
117
139
|
font-weight: normal;
|
|
118
140
|
|
|
119
141
|
&:hover {
|
|
120
|
-
background:
|
|
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(--
|
|
152
|
+
color: var(--ui-tertiary);
|
|
131
153
|
}
|
|
132
154
|
|
|
133
155
|
.link-collection :global(.link) {
|
|
134
156
|
&:hover {
|
|
135
|
-
background: var(--
|
|
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(--
|
|
168
|
+
border-right: 1px solid var(--border-color);
|
|
147
169
|
}
|
|
148
170
|
|
|
149
171
|
.link-collection .footer-button :global(.link) {
|
|
150
|
-
font-weight:
|
|
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
|
|
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<
|
|
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
|
|
5
|
-
|
|
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
|
-
}:
|
|
38
|
+
}: PaperProps = $props();
|
|
31
39
|
</script>
|
|
32
40
|
|
|
33
|
-
<div class="paper rounded {containerClass}
|
|
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:
|
|
65
|
+
border-radius: 0.25rem;
|
|
58
66
|
position: relative;
|
|
59
|
-
padding:
|
|
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(--
|
|
82
|
+
background-color: var(--paper-body-bg);
|
|
75
83
|
}
|
|
76
84
|
|
|
77
85
|
.paper {
|
|
78
|
-
box-shadow:
|
|
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
|
|
85
|
-
background: var(--
|
|
86
|
-
border-color: var(--
|
|
87
|
-
border-top-left-radius:
|
|
88
|
-
border-top-right-radius:
|
|
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:
|
|
110
|
+
padding: 0.5rem 0.75rem;
|
|
111
|
+
font-weight: 600;
|
|
100
112
|
}
|
|
101
113
|
|
|
102
114
|
.paper-title-buttons {
|
|
103
|
-
margin-right:
|
|
115
|
+
margin-right: 0.5rem;
|
|
104
116
|
display: flex;
|
|
105
117
|
align-items: center;
|
|
106
|
-
gap:
|
|
118
|
+
gap: 0.25rem;
|
|
107
119
|
}
|
|
108
120
|
|
|
109
121
|
.gap {
|
|
110
122
|
display: flex;
|
|
111
123
|
flex-direction: column;
|
|
112
|
-
gap:
|
|
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
|
|
3
|
-
|
|
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<
|
|
24
|
+
declare const Paper: import("svelte").Component<PaperProps, {}, "">;
|
|
16
25
|
type Paper = ReturnType<typeof Paper>;
|
|
17
26
|
export default Paper;
|