@functionalcms/svelte-components 2.33.2 → 2.34.2

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 (103) hide show
  1. package/dist/components/Link.svelte +290 -290
  2. package/dist/components/agnostic/Alert/Alert.svelte +310 -0
  3. package/dist/components/agnostic/Alert/Alert.svelte.d.ts +31 -0
  4. package/dist/components/agnostic/Avatar/Avatar.svelte +123 -0
  5. package/dist/components/agnostic/Avatar/Avatar.svelte.d.ts +26 -0
  6. package/dist/components/agnostic/Avatar/AvatarGroup.svelte +106 -0
  7. package/dist/components/agnostic/Avatar/AvatarGroup.svelte.d.ts +29 -0
  8. package/dist/components/agnostic/Breadcrumb/Breadcrumb.svelte +56 -0
  9. package/dist/components/agnostic/Breadcrumb/Breadcrumb.svelte.d.ts +20 -0
  10. package/dist/components/agnostic/Breadcrumb/api.d.ts +4 -0
  11. package/dist/components/agnostic/Breadcrumb/api.js +1 -0
  12. package/dist/components/agnostic/Button/Button.svelte +345 -0
  13. package/dist/components/agnostic/Button/Button.svelte.d.ts +43 -0
  14. package/dist/components/agnostic/Button/ButtonGroup.svelte +20 -0
  15. package/dist/components/agnostic/Button/ButtonGroup.svelte.d.ts +23 -0
  16. package/dist/components/agnostic/Button/button-base.css +12 -0
  17. package/dist/components/agnostic/Button/button-core.css +237 -0
  18. package/dist/components/agnostic/Button/button-empty.css +31 -0
  19. package/dist/components/agnostic/Button/button-group.css +8 -0
  20. package/dist/components/agnostic/Card/Card.svelte +133 -0
  21. package/dist/components/agnostic/Card/Card.svelte.d.ts +31 -0
  22. package/dist/components/agnostic/ChoiceInput/ChoiceInput.svelte +337 -0
  23. package/dist/components/agnostic/ChoiceInput/ChoiceInput.svelte.d.ts +37 -0
  24. package/dist/components/agnostic/ChoiceInput/api.d.ts +7 -0
  25. package/dist/components/agnostic/ChoiceInput/api.js +1 -0
  26. package/dist/components/agnostic/Close/Close.svelte +120 -0
  27. package/dist/components/agnostic/Close/Close.svelte.d.ts +23 -0
  28. package/dist/components/agnostic/Close/api.d.ts +1 -0
  29. package/dist/components/agnostic/Close/api.js +1 -0
  30. package/dist/components/agnostic/Dialog/Dialog.svelte +265 -0
  31. package/dist/components/agnostic/Dialog/Dialog.svelte.d.ts +39 -0
  32. package/dist/components/agnostic/Dialog/SvelteA11yDialog.svelte +103 -0
  33. package/dist/components/agnostic/Dialog/SvelteA11yDialog.svelte.d.ts +30 -0
  34. package/dist/components/agnostic/Dialog/a11y-dialog.d.ts +56 -0
  35. package/dist/components/agnostic/Dialog/a11y-dialog.js +216 -0
  36. package/dist/components/agnostic/Dialog/dom-utils.d.ts +26 -0
  37. package/dist/components/agnostic/Dialog/dom-utils.js +206 -0
  38. package/dist/components/agnostic/Disclose/Disclose.svelte +102 -0
  39. package/dist/components/agnostic/Disclose/Disclose.svelte.d.ts +23 -0
  40. package/dist/components/agnostic/Divider/Divider.svelte +139 -0
  41. package/dist/components/agnostic/Divider/Divider.svelte.d.ts +25 -0
  42. package/dist/components/agnostic/Divider/api.d.ts +3 -0
  43. package/dist/components/agnostic/Divider/api.js +1 -0
  44. package/dist/components/agnostic/Drawer/Drawer.svelte +30 -0
  45. package/dist/components/agnostic/Drawer/Drawer.svelte.d.ts +28 -0
  46. package/dist/components/agnostic/Drawer/api.d.ts +1 -0
  47. package/dist/components/agnostic/Drawer/api.js +1 -0
  48. package/dist/components/agnostic/EmptyState/EmptyState.svelte +46 -0
  49. package/dist/components/agnostic/EmptyState/EmptyState.svelte.d.ts +23 -0
  50. package/dist/components/agnostic/Header/Header.svelte +104 -0
  51. package/dist/components/agnostic/Header/Header.svelte.d.ts +26 -0
  52. package/dist/components/agnostic/Header/HeaderNav.svelte +28 -0
  53. package/dist/components/agnostic/Header/HeaderNav.svelte.d.ts +20 -0
  54. package/dist/components/agnostic/Header/HeaderNavItem.svelte +30 -0
  55. package/dist/components/agnostic/Header/HeaderNavItem.svelte.d.ts +20 -0
  56. package/dist/components/agnostic/Icon/Icon.svelte +180 -0
  57. package/dist/components/agnostic/Icon/Icon.svelte.d.ts +23 -0
  58. package/dist/components/agnostic/Icon/api.d.ts +2 -0
  59. package/dist/components/agnostic/Icon/api.js +1 -0
  60. package/dist/components/agnostic/Input/Input.svelte +415 -0
  61. package/dist/components/agnostic/Input/Input.svelte.d.ts +45 -0
  62. package/dist/components/agnostic/Input/InputAddonItem.svelte +42 -0
  63. package/dist/components/agnostic/Input/InputAddonItem.svelte.d.ts +33 -0
  64. package/dist/components/agnostic/Loader/Loader.svelte +113 -0
  65. package/dist/components/agnostic/Loader/Loader.svelte.d.ts +20 -0
  66. package/dist/components/agnostic/Menu/Menu.svelte +466 -0
  67. package/dist/components/agnostic/Menu/Menu.svelte.d.ts +31 -0
  68. package/dist/components/agnostic/Menu/MenuItem.svelte +117 -0
  69. package/dist/components/agnostic/Menu/MenuItem.svelte.d.ts +29 -0
  70. package/dist/components/agnostic/Progress/Progress.svelte +50 -0
  71. package/dist/components/agnostic/Progress/Progress.svelte.d.ts +20 -0
  72. package/dist/components/agnostic/Select/Select.svelte +141 -0
  73. package/dist/components/agnostic/Select/Select.svelte.d.ts +32 -0
  74. package/dist/components/agnostic/Spinner/Spinner.svelte +105 -0
  75. package/dist/components/agnostic/Spinner/Spinner.svelte.d.ts +19 -0
  76. package/dist/components/agnostic/Switch/Switch.svelte +275 -0
  77. package/dist/components/agnostic/Switch/Switch.svelte.d.ts +45 -0
  78. package/dist/components/agnostic/Table/Table.svelte +508 -0
  79. package/dist/components/agnostic/Table/Table.svelte.d.ts +36 -0
  80. package/dist/components/agnostic/Table/TableCustomRenderComponent.svelte +13 -0
  81. package/dist/components/agnostic/Table/TableCustomRenderComponent.svelte.d.ts +25 -0
  82. package/dist/components/agnostic/Tabs/TabButtonCustom.svelte +65 -0
  83. package/dist/components/agnostic/Tabs/TabButtonCustom.svelte.d.ts +35 -0
  84. package/dist/components/agnostic/Tabs/Tabs.svelte +330 -0
  85. package/dist/components/agnostic/Tabs/Tabs.svelte.d.ts +34 -0
  86. package/dist/components/agnostic/Tabs/api.d.ts +10 -0
  87. package/dist/components/agnostic/Tabs/api.js +1 -0
  88. package/dist/components/agnostic/Tag/Tag.svelte +74 -0
  89. package/dist/components/agnostic/Tag/Tag.svelte.d.ts +23 -0
  90. package/dist/components/agnostic/Tag/TagSlots.svelte +51 -0
  91. package/dist/components/agnostic/Tag/TagSlots.svelte.d.ts +16 -0
  92. package/dist/components/agnostic/Toasts/Toasts.svelte +46 -0
  93. package/dist/components/agnostic/Toasts/Toasts.svelte.d.ts +22 -0
  94. package/dist/components/agnostic/Tooltip/Tooltip.svelte +103 -0
  95. package/dist/components/agnostic/Tooltip/Tooltip.svelte.d.ts +23 -0
  96. package/dist/components/agnostic/Tooltip/TooltipSlots.svelte +81 -0
  97. package/dist/components/agnostic/Tooltip/TooltipSlots.svelte.d.ts +16 -0
  98. package/dist/components/agnostic/Tooltip/api.d.ts +1 -0
  99. package/dist/components/agnostic/Tooltip/api.js +1 -0
  100. package/dist/components/agnostic/animation.css +37 -0
  101. package/dist/index.d.ts +30 -1
  102. package/dist/index.js +30 -1
  103. package/package.json +1 -4
@@ -0,0 +1,310 @@
1
+ <style>
2
+ .alert-base,
3
+ .alert {
4
+ display: flex;
5
+ flex-direction: row;
6
+ align-items: center;
7
+ justify-content: flex-start;
8
+ max-width: 100%;
9
+ }
10
+
11
+ .alert-end {
12
+ justify-content: flex-end;
13
+ }
14
+
15
+ .alert-skin,
16
+ .alert {
17
+ padding: var(--functional-side-padding);
18
+ background: var(--functional-gray-light);
19
+ }
20
+
21
+ .alert-icon {
22
+ color: var(--functional-gray-mid-dark);
23
+ margin-inline-end: var(--fluid-8);
24
+
25
+ /* Ensures our icon doesn't flex grow or shrink */
26
+ flex: 0 0 var(--fluid-24);
27
+ }
28
+
29
+ .alert-border-top {
30
+ border-top: var(--fluid-8) solid var(--functional-gray-mid-dark);
31
+ }
32
+
33
+ .alert-border-left {
34
+ border-left: var(--fluid-8) solid var(--functional-gray-mid-dark);
35
+ }
36
+
37
+ .alert-border-bottom {
38
+ border-bottom: var(--fluid-8) solid var(--functional-gray-mid-dark);
39
+ }
40
+
41
+ .alert-border-right {
42
+ border-right: var(--fluid-8) solid var(--functional-gray-mid-dark);
43
+ }
44
+
45
+ .alert-border-all {
46
+ border: var(--fluid-2) solid var(--functional-gray-mid-dark);
47
+ }
48
+
49
+ .alert-rounded {
50
+ border-radius: var(--functional-alert-radius, var(--functional-radius, 0.25rem));
51
+ }
52
+
53
+ .alert-dark {
54
+ color: var(--functional-light);
55
+ background: var(--functional-dark);
56
+ }
57
+
58
+ .alert-dark .alert-icon,
59
+ .alert-dark {
60
+ color: var(--functional-light);
61
+ }
62
+
63
+ .alert-warning {
64
+ background: var(--functional-warning-light);
65
+ color: var(--functional-warning-dark);
66
+ }
67
+
68
+ .alert-warning-icon {
69
+ color: var(--functional-warning-border-accent);
70
+ margin-inline-end: var(--fluid-8);
71
+
72
+ /* Ensures our icon doesn't flex grow or shrink */
73
+ flex: 0 0 var(--fluid-24);
74
+ }
75
+
76
+ .alert-warning.alert-border-top {
77
+ border-top-color: var(--functional-warning-border-accent);
78
+ }
79
+
80
+ .alert-warning.alert-border-left {
81
+ border-left-color: var(--functional-warning-border-accent);
82
+ }
83
+
84
+ .alert-warning.alert-border-bottom {
85
+ border-bottom-color: var(--functional-warning-border-accent);
86
+ }
87
+
88
+ .alert-warning.alert-border-right {
89
+ border-right-color: var(--functional-warning-border-accent);
90
+ }
91
+
92
+ .alert-warning.alert-border-all {
93
+ border: var(--fluid-2) solid var(--functional-warning-border);
94
+ }
95
+
96
+ .alert-info {
97
+ background: var(--functional-primary-light);
98
+ color: var(--functional-primary-dark);
99
+ }
100
+
101
+ .alert-info-icon {
102
+ color: var(--functional-primary-dark);
103
+ margin-inline-end: var(--fluid-8);
104
+
105
+ /* Ensures our icon doesn't flex grow or shrink */
106
+ flex: 0 0 var(--fluid-24);
107
+ }
108
+
109
+ .alert-info.alert-border-top {
110
+ border-top-color: var(--functional-primary-dark);
111
+ }
112
+
113
+ .alert-info.alert-border-left {
114
+ border-left-color: var(--functional-primary-dark);
115
+ }
116
+
117
+ .alert-info.alert-border-bottom {
118
+ border-bottom-color: var(--functional-primary-dark);
119
+ }
120
+
121
+ .alert-info.alert-border-right {
122
+ border-right-color: var(--functional-primary-dark);
123
+ }
124
+
125
+ .alert-info.alert-border-all {
126
+ border: var(--fluid-2) solid var(--functional-primary-border);
127
+ }
128
+
129
+ .alert-error {
130
+ background: var(--functional-error-light);
131
+ color: var(--functional-error-dark);
132
+ }
133
+
134
+ .alert-error-icon {
135
+ color: var(--functional-error-dark);
136
+ margin-inline-end: var(--fluid-8);
137
+
138
+ /* Ensures our icon doesn't flex grow or shrink */
139
+ flex: 0 0 var(--fluid-24);
140
+ }
141
+
142
+ .alert-error.alert-border-top {
143
+ border-top-color: var(--functional-error-dark);
144
+ }
145
+
146
+ .alert-error.alert-border-left {
147
+ border-left-color: var(--functional-error-dark);
148
+ }
149
+
150
+ .alert-error.alert-border-bottom {
151
+ border-bottom-color: var(--functional-error-dark);
152
+ }
153
+
154
+ .alert-error.alert-border-right {
155
+ border-right-color: var(--functional-error-dark);
156
+ }
157
+
158
+ .alert-error.alert-border-all {
159
+ border: var(--fluid-2) solid var(--functional-error-border);
160
+ }
161
+
162
+ .alert-success {
163
+ background: var(--functional-action-light);
164
+ color: var(--functional-action-dark);
165
+ }
166
+
167
+ .alert-success-icon {
168
+ color: var(--functional-action-dark);
169
+ margin-inline-end: var(--fluid-8);
170
+
171
+ /* Ensures our icon doesn't flex grow or shrink */
172
+ flex: 0 0 var(--fluid-24);
173
+ }
174
+
175
+ .alert-success.alert-border-top {
176
+ border-top-color: var(--functional-action-dark);
177
+ }
178
+
179
+ .alert-success.alert-border-left {
180
+ border-left-color: var(--functional-action-dark);
181
+ }
182
+
183
+ .alert-success.alert-border-bottom {
184
+ border-bottom-color: var(--functional-action-dark);
185
+ }
186
+
187
+ .alert-success.alert-border-right {
188
+ border-right-color: var(--functional-action-dark);
189
+ }
190
+
191
+ .alert-success.alert-border-all {
192
+ border: var(--fluid-2) solid var(--functional-action-border);
193
+ }
194
+
195
+ /**
196
+ * This is not in toast.css because it's actually applied on the Alert child element
197
+ * conditionally if the Alert is a Toast alert :-)
198
+ */
199
+ .alert-toast-shadow {
200
+ box-shadow: 0 4px 8px 0 rgb(0 0 0 / 6%), 0 3px 8px 0 rgb(0 0 0 / 7%), 0 6px 18px 0 rgb(0 0 0 / 6%);
201
+ }
202
+
203
+ .fade-in {
204
+ animation: fade-in var(--functional-timing-fast) both;
205
+ }
206
+
207
+ .slide-up {
208
+ animation: slide-up var(--functional-timing-slow) var(--functional-timing-fast)
209
+ both;
210
+ }
211
+
212
+ /**
213
+ * Cannot use two separate CSS classes with animation: foo, bar
214
+ * as the later class will overwrite the first (so this combines)
215
+ */
216
+ .slide-up-fade-in {
217
+ animation: fade-in var(--functional-timing-fast) both,
218
+ slide-up var(--functional-timing-slow) var(--functional-timing-fast) both;
219
+ }
220
+
221
+ @keyframes fade-in {
222
+ from {
223
+ opacity: 0%;
224
+ }
225
+ }
226
+
227
+ @keyframes slide-up {
228
+ from {
229
+ transform: translateY(10%);
230
+ }
231
+ }
232
+
233
+ @media (prefers-reduced-motion), (update: slow) {
234
+ .slide-up-fade-in,
235
+ .fade-in,
236
+ .slide-up {
237
+ transition-duration: 0.001ms !important;
238
+ }
239
+ }
240
+
241
+ </style>
242
+
243
+ <script>export let isAnimationFadeIn = true;
244
+ export let isAnimationSlideUp = false;
245
+ export let isToast = false;
246
+ export let isRounded = false;
247
+ export let isBorderAll = false;
248
+ export let isBorderLeft = false;
249
+ export let isBorderRight = false;
250
+ export let isBorderTop = false;
251
+ export let isBorderBottom = false;
252
+ export let isBlockEnd = false;
253
+ export let type = "";
254
+ let typeClass;
255
+ switch (type) {
256
+ case "warning":
257
+ typeClass = "alert-warning";
258
+ break;
259
+ case "dark":
260
+ typeClass = "alert-dark";
261
+ break;
262
+ case "error":
263
+ typeClass = "alert-error";
264
+ break;
265
+ case "info":
266
+ typeClass = "alert-info";
267
+ break;
268
+ case "success":
269
+ typeClass = "alert-success";
270
+ break;
271
+ default:
272
+ typeClass = "";
273
+ }
274
+ const ariaAtomicValue = isToast ? true : void 0;
275
+ $: ariaLiveValue = () => {
276
+ let liveValue;
277
+ if (isToast && type === "error") {
278
+ liveValue = "assertive";
279
+ } else if (isToast) {
280
+ liveValue = "polite";
281
+ } else {
282
+ liveValue = "off";
283
+ }
284
+ return liveValue;
285
+ };
286
+ const classes = [
287
+ "alert",
288
+ typeClass,
289
+ isRounded ? "alert-rounded" : "",
290
+ isBorderAll ? "alert-border-all" : "",
291
+ isBorderLeft ? "alert-border-left" : "",
292
+ isBorderRight ? "alert-border-right" : "",
293
+ isBorderTop ? "alert-border-top" : "",
294
+ isBorderBottom ? "alert-border-bottom" : "",
295
+ isBlockEnd ? "alert-end" : "",
296
+ isAnimationFadeIn && !isAnimationSlideUp ? "fade-in" : "",
297
+ !isAnimationFadeIn && isAnimationSlideUp ? "slide-up" : "",
298
+ isAnimationFadeIn && isAnimationSlideUp ? "slide-up-fade-in" : ""
299
+ ].filter((klass) => klass.length).join(" ");
300
+ </script>
301
+
302
+ <div
303
+ class="{classes}"
304
+ role="alert"
305
+ aria-atomic="{ariaAtomicValue}"
306
+ aria-live="{ariaLiveValue()}"
307
+ >
308
+ <slot name="icon" />
309
+ <slot />
310
+ </div>
@@ -0,0 +1,31 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ isAnimationFadeIn?: boolean;
5
+ isAnimationSlideUp?: boolean;
6
+ isToast?: boolean;
7
+ isRounded?: boolean;
8
+ isBorderAll?: boolean;
9
+ isBorderLeft?: boolean;
10
+ isBorderRight?: boolean;
11
+ isBorderTop?: boolean;
12
+ isBorderBottom?: boolean;
13
+ isBlockEnd?: boolean;
14
+ type?: string;
15
+ };
16
+ events: {
17
+ [evt: string]: CustomEvent<any>;
18
+ };
19
+ slots: {
20
+ icon: {};
21
+ default: {};
22
+ };
23
+ exports?: {} | undefined;
24
+ bindings?: string | undefined;
25
+ };
26
+ export type AlertProps = typeof __propDef.props;
27
+ export type AlertEvents = typeof __propDef.events;
28
+ export type AlertSlots = typeof __propDef.slots;
29
+ export default class Alert extends SvelteComponent<AlertProps, AlertEvents, AlertSlots> {
30
+ }
31
+ export {};
@@ -0,0 +1,123 @@
1
+ <style>
2
+ .avatar,
3
+ .avatar-base {
4
+ position: relative;
5
+ display: inline-flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+ overflow: hidden;
9
+ }
10
+
11
+ .avatar,
12
+ .avatar-skin {
13
+ width: var(--fluid-40);
14
+ height: var(--fluid-40);
15
+ max-width: 100%;
16
+ background: var(--functional-gray-extra-light);
17
+ border-radius: 50%;
18
+ }
19
+
20
+ .avatar-square {
21
+ border-radius: 0;
22
+ }
23
+
24
+ .avatar-rounded {
25
+ border-radius: var(--functional-radius);
26
+ }
27
+
28
+ .avatar-small {
29
+ font-size: var(--fluid-12);
30
+ width: var(--fluid-32);
31
+ height: var(--fluid-32);
32
+ }
33
+
34
+ .avatar-large {
35
+ width: var(--fluid-48);
36
+ height: var(--fluid-48);
37
+ }
38
+
39
+ .avatar-xlarge {
40
+ font-size: var(--fluid-20);
41
+ width: var(--fluid-64);
42
+ height: var(--fluid-64);
43
+ }
44
+
45
+ .avatar::before {
46
+ content: attr(data-text);
47
+ }
48
+
49
+ .avatar-image {
50
+ width: 100%;
51
+ height: 100%;
52
+ object-fit: cover;
53
+ }
54
+
55
+ .avatar-info {
56
+ background: var(--functional-primary-light);
57
+ color: var(--functional-primary-dark);
58
+ }
59
+
60
+ .avatar-warning {
61
+ background: var(--functional-warning-light);
62
+ color: var(--functional-warning-dark);
63
+ }
64
+
65
+ .avatar-success {
66
+ background: var(--functional-action-light);
67
+ color: var(--functional-action-dark);
68
+ }
69
+
70
+ .avatar-error {
71
+ background: var(--functional-error-light);
72
+ color: var(--functional-error-dark);
73
+ }
74
+
75
+ /* Must come after avatar-success, avatatar-warning, etc. so specificity is higher */
76
+ .avatar-transparent {
77
+ background: transparent;
78
+ }
79
+
80
+ .avatar-group {
81
+ display: flex;
82
+ flex-direction: row;
83
+
84
+ /* TBD -- should we stack these on mobile? */
85
+ }
86
+
87
+ /* Helpful for Vue / Svelte SFC where the .avatar child will not be a global
88
+ but CSS Modules class. Unfortunately, it means those have to be spans though.
89
+ This should be ok -- it's our Avatar.vue and Avatar.svelte, for example, that
90
+ respectively generate the <span> tag in their own templates (not the consumer) */
91
+ .avatar-group > span,
92
+ .avatar-group .avatar {
93
+ border: 2px solid var(--functional-light);
94
+ }
95
+
96
+ .avatar-group > span:not(:first-child),
97
+ .avatar-group .avatar:not(:first-child) {
98
+ margin-inline-start: calc(-1 * var(--fluid-10));
99
+ }
100
+
101
+ </style>
102
+
103
+ <script>export let isRounded = false;
104
+ export let isTransparent = false;
105
+ export let isSquare = false;
106
+ export let type = "";
107
+ export let size = "";
108
+ export let text = "";
109
+ export let imgUrl = "";
110
+ const avatarClasses = [
111
+ "avatar",
112
+ isRounded ? "avatar-rounded" : "",
113
+ isTransparent ? "avatar-transparent" : "",
114
+ isSquare ? "avatar-square" : "",
115
+ type ? `avatar-${type}` : "",
116
+ size ? `avatar-${size}` : ""
117
+ ].filter((cls) => cls).join(" ");
118
+ </script>
119
+
120
+ <span class={avatarClasses} data-text={text || null}>
121
+ {#if imgUrl}<img src={imgUrl} class="avatar-image" alt="" />{/if}
122
+ <slot />
123
+ </span>
@@ -0,0 +1,26 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ isRounded?: boolean;
5
+ isTransparent?: boolean;
6
+ isSquare?: boolean;
7
+ type?: string;
8
+ size?: string;
9
+ text?: string;
10
+ imgUrl?: string;
11
+ };
12
+ events: {
13
+ [evt: string]: CustomEvent<any>;
14
+ };
15
+ slots: {
16
+ default: {};
17
+ };
18
+ exports?: {} | undefined;
19
+ bindings?: string | undefined;
20
+ };
21
+ export type AvatarProps = typeof __propDef.props;
22
+ export type AvatarEvents = typeof __propDef.events;
23
+ export type AvatarSlots = typeof __propDef.slots;
24
+ export default class Avatar extends SvelteComponent<AvatarProps, AvatarEvents, AvatarSlots> {
25
+ }
26
+ export {};
@@ -0,0 +1,106 @@
1
+ <style>
2
+ .avatar,
3
+ .avatar-base {
4
+ position: relative;
5
+ display: inline-flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+ overflow: hidden;
9
+ }
10
+
11
+ .avatar,
12
+ .avatar-skin {
13
+ width: var(--fluid-40);
14
+ height: var(--fluid-40);
15
+ max-width: 100%;
16
+ background: var(--functional-gray-extra-light);
17
+ border-radius: 50%;
18
+ }
19
+
20
+ .avatar-square {
21
+ border-radius: 0;
22
+ }
23
+
24
+ .avatar-rounded {
25
+ border-radius: var(--functional-radius);
26
+ }
27
+
28
+ .avatar-small {
29
+ font-size: var(--fluid-12);
30
+ width: var(--fluid-32);
31
+ height: var(--fluid-32);
32
+ }
33
+
34
+ .avatar-large {
35
+ width: var(--fluid-48);
36
+ height: var(--fluid-48);
37
+ }
38
+
39
+ .avatar-xlarge {
40
+ font-size: var(--fluid-20);
41
+ width: var(--fluid-64);
42
+ height: var(--fluid-64);
43
+ }
44
+
45
+ .avatar::before {
46
+ content: attr(data-text);
47
+ }
48
+
49
+ .avatar-image {
50
+ width: 100%;
51
+ height: 100%;
52
+ object-fit: cover;
53
+ }
54
+
55
+ .avatar-info {
56
+ background: var(--functional-primary-light);
57
+ color: var(--functional-primary-dark);
58
+ }
59
+
60
+ .avatar-warning {
61
+ background: var(--functional-warning-light);
62
+ color: var(--functional-warning-dark);
63
+ }
64
+
65
+ .avatar-success {
66
+ background: var(--functional-action-light);
67
+ color: var(--functional-action-dark);
68
+ }
69
+
70
+ .avatar-error {
71
+ background: var(--functional-error-light);
72
+ color: var(--functional-error-dark);
73
+ }
74
+
75
+ /* Must come after avatar-success, avatatar-warning, etc. so specificity is higher */
76
+ .avatar-transparent {
77
+ background: transparent;
78
+ }
79
+
80
+ .avatar-group {
81
+ display: flex;
82
+ flex-direction: row;
83
+
84
+ /* TBD -- should we stack these on mobile? */
85
+ }
86
+
87
+ /* Helpful for Vue / Svelte SFC where the .avatar child will not be a global
88
+ but CSS Modules class. Unfortunately, it means those have to be spans though.
89
+ This should be ok -- it's our Avatar.vue and Avatar.svelte, for example, that
90
+ respectively generate the <span> tag in their own templates (not the consumer) */
91
+ .avatar-group > :global(span),
92
+ .avatar-group .avatar {
93
+ border: 2px solid var(--functional-light);
94
+ }
95
+
96
+ .avatar-group > :global(span:not(:first-child)),
97
+ .avatar-group .avatar:not(:first-child) {
98
+ margin-inline-start: calc(-1 * var(--fluid-10));
99
+ }
100
+
101
+ </style>
102
+
103
+ <div class="avatar-group">
104
+ <slot />
105
+ </div>
106
+
@@ -0,0 +1,29 @@
1
+ /** @typedef {typeof __propDef.props} AvatarGroupProps */
2
+ /** @typedef {typeof __propDef.events} AvatarGroupEvents */
3
+ /** @typedef {typeof __propDef.slots} AvatarGroupSlots */
4
+ export default class AvatarGroup extends SvelteComponent<{
5
+ [x: string]: never;
6
+ }, {
7
+ [evt: string]: CustomEvent<any>;
8
+ }, {
9
+ default: {};
10
+ }> {
11
+ }
12
+ export type AvatarGroupProps = typeof __propDef.props;
13
+ export type AvatarGroupEvents = typeof __propDef.events;
14
+ export type AvatarGroupSlots = typeof __propDef.slots;
15
+ import { SvelteComponent } from "svelte";
16
+ declare const __propDef: {
17
+ props: {
18
+ [x: string]: never;
19
+ };
20
+ events: {
21
+ [evt: string]: CustomEvent<any>;
22
+ };
23
+ slots: {
24
+ default: {};
25
+ };
26
+ exports?: undefined;
27
+ bindings?: undefined;
28
+ };
29
+ export {};
@@ -0,0 +1,56 @@
1
+ <style>
2
+ .breadcrumb {
3
+ display: flex;
4
+ flex-wrap: wrap;
5
+ padding: 0;
6
+ white-space: nowrap;
7
+ list-style: none;
8
+ }
9
+
10
+ .breadcrumb-item + .breadcrumb-item {
11
+ padding-inline-start: var(--fluid-6);
12
+ }
13
+
14
+ .breadcrumb-item + .breadcrumb-item::before {
15
+ padding-inline-end: var(--fluid-6);
16
+ color: var(--functional-gray-mid-dark);
17
+ content: "\203A";
18
+ }
19
+
20
+ .breadcrumb-slash .breadcrumb-item + .breadcrumb-item::before {
21
+ content: "\0002f";
22
+ }
23
+
24
+ .breadcrumb-arrow .breadcrumb-item + .breadcrumb-item::before {
25
+ content: "\02192";
26
+ }
27
+
28
+ .breadcrumb-bullet .breadcrumb-item + .breadcrumb-item::before {
29
+ content: "\02022";
30
+ }
31
+
32
+ </style>
33
+
34
+ <script>export let routes = [];
35
+ export let type = "";
36
+ const breadcrumbClasses = ["breadcrumb", type ? `breadcrumb-${type}` : ""].filter((cls) => cls).join(" ");
37
+ const isLast = (idx) => {
38
+ return idx === routes.length - 1;
39
+ };
40
+ const crumbClasses = (index) => {
41
+ const isLastCrumb = isLast(index);
42
+ return ["breadcrumb-item", isLastCrumb ? "active" : ""].filter((cl) => cl).join(" ");
43
+ };
44
+ </script>
45
+
46
+ <nav aria-label="breadcrumbs">
47
+ <ol class={breadcrumbClasses}>
48
+ {#each routes as route, i}
49
+ <li class={crumbClasses(i)}>
50
+ {#if !isLast(i) && route.url}
51
+ <a href={route.url}>{route.label}</a>
52
+ {:else}<span v-else>{route.label}</span>{/if}
53
+ </li>
54
+ {/each}
55
+ </ol>
56
+ </nav>
@@ -0,0 +1,20 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import type { BreadcrumbRoute } from './api';
3
+ declare const __propDef: {
4
+ props: {
5
+ routes?: BreadcrumbRoute[];
6
+ type?: string;
7
+ };
8
+ events: {
9
+ [evt: string]: CustomEvent<any>;
10
+ };
11
+ slots: {};
12
+ exports?: {} | undefined;
13
+ bindings?: string | undefined;
14
+ };
15
+ export type BreadcrumbProps = typeof __propDef.props;
16
+ export type BreadcrumbEvents = typeof __propDef.events;
17
+ export type BreadcrumbSlots = typeof __propDef.slots;
18
+ export default class Breadcrumb extends SvelteComponent<BreadcrumbProps, BreadcrumbEvents, BreadcrumbSlots> {
19
+ }
20
+ export {};
@@ -0,0 +1,4 @@
1
+ export type BreadcrumbRoute = {
2
+ label: string;
3
+ url: string;
4
+ };
@@ -0,0 +1 @@
1
+ export {};