@functionalcms/svelte-components 3.5.16 → 3.5.19

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 (129) hide show
  1. package/css/functional.css +1 -1
  2. package/css/functional.css.map +1 -1
  3. package/dist/components/Banner.svelte +1 -1
  4. package/dist/components/Banner.svelte.d.ts +8 -13
  5. package/dist/components/Link.svelte.d.ts +45 -34
  6. package/dist/components/Logo.svelte.d.ts +26 -22
  7. package/dist/components/Markdown.svelte.d.ts +5 -14
  8. package/dist/components/Spacer.svelte.d.ts +6 -14
  9. package/dist/components/Well.svelte.d.ts +11 -13
  10. package/dist/components/agnostic/Button/Button.svelte +333 -332
  11. package/dist/components/agnostic/Button/Button.svelte.d.ts +50 -39
  12. package/dist/components/agnostic/Button/ButtonGroup.svelte.d.ts +30 -19
  13. package/dist/components/agnostic/Close/Close.svelte.d.ts +22 -18
  14. package/dist/components/agnostic/Disclose/Disclose.svelte.d.ts +10 -13
  15. package/dist/components/agnostic/Divider/Divider.svelte.d.ts +21 -17
  16. package/dist/components/agnostic/Loader/Loader.svelte.d.ts +20 -16
  17. package/dist/components/blog/BlogDescription.svelte.d.ts +21 -17
  18. package/dist/components/blog/BlogTitle.svelte.d.ts +21 -17
  19. package/dist/components/form/DateTimePicker.svelte.d.ts +16 -12
  20. package/dist/components/form/Input.svelte +1 -1
  21. package/dist/components/form/Input.svelte.d.ts +46 -20
  22. package/dist/components/form/InputAddonItem.svelte +34 -34
  23. package/dist/components/form/InputAddonItem.svelte.d.ts +27 -27
  24. package/dist/components/form/Select.svelte.d.ts +32 -28
  25. package/dist/components/{agnostic/Switch → form}/Switch.svelte +1 -1
  26. package/dist/components/form/Switch.svelte.d.ts +30 -0
  27. package/dist/components/layouts/DefaultLayout.svelte.d.ts +11 -13
  28. package/dist/components/layouts/Meta.svelte.d.ts +10 -13
  29. package/dist/components/layouts/SimpleFooter.svelte.d.ts +7 -13
  30. package/dist/components/layouts/Tracker.svelte.d.ts +5 -13
  31. package/dist/components/layouts/TwoColumnsLayout.svelte.d.ts +9 -13
  32. package/dist/components/menu/CollapsibleMenu.svelte.d.ts +27 -23
  33. package/dist/components/menu/DynamicMenu.svelte.d.ts +27 -23
  34. package/dist/components/menu/HamburgerMenu.svelte +3 -3
  35. package/dist/components/menu/HamburgerMenu.svelte.d.ts +25 -21
  36. package/dist/components/menu/Menu.svelte.d.ts +31 -27
  37. package/dist/components/menu/MenuItem.svelte.d.ts +37 -25
  38. package/dist/components/menu/NavigationItems.svelte +9 -4
  39. package/dist/components/menu/NavigationItems.svelte.d.ts +27 -23
  40. package/dist/components/presentation/Card.svelte.d.ts +17 -13
  41. package/dist/components/presentation/Carousel/carousel-content.svelte +35 -0
  42. package/dist/components/presentation/Carousel/carousel-content.svelte.d.ts +28 -0
  43. package/dist/components/presentation/Carousel/carousel-item.svelte +25 -0
  44. package/dist/components/presentation/Carousel/carousel-item.svelte.d.ts +28 -0
  45. package/dist/components/presentation/Carousel/carousel-next.svelte +39 -0
  46. package/dist/components/presentation/Carousel/carousel-next.svelte.d.ts +18 -0
  47. package/dist/components/presentation/Carousel/carousel-previous.svelte +40 -0
  48. package/dist/components/presentation/Carousel/carousel-previous.svelte.d.ts +18 -0
  49. package/dist/components/presentation/Carousel/carousel.svelte +99 -0
  50. package/dist/components/presentation/Carousel/carousel.svelte.d.ts +31 -0
  51. package/dist/components/presentation/Carousel/context.d.ts +32 -0
  52. package/dist/components/presentation/Carousel/context.js +12 -0
  53. package/dist/components/presentation/Carousel.svelte +4 -0
  54. package/dist/components/presentation/Carousel.svelte.d.ts +18 -0
  55. package/dist/components/presentation/Carusele.d.ts +1 -1
  56. package/dist/components/presentation/Carusele.js +1 -1
  57. package/dist/components/presentation/Gallery.svelte.d.ts +14 -13
  58. package/dist/components/presentation/ImageCompare.svelte +15 -12
  59. package/dist/components/presentation/ImageCompare.svelte.d.ts +24 -38
  60. package/dist/index.d.ts +4 -5
  61. package/dist/index.js +12 -7
  62. package/package.json +24 -24
  63. package/dist/components/agnostic/Alert/Alert.svelte +0 -317
  64. package/dist/components/agnostic/Alert/Alert.svelte.d.ts +0 -29
  65. package/dist/components/agnostic/Avatar/Avatar.svelte +0 -127
  66. package/dist/components/agnostic/Avatar/Avatar.svelte.d.ts +0 -24
  67. package/dist/components/agnostic/Avatar/AvatarGroup.svelte +0 -106
  68. package/dist/components/agnostic/Avatar/AvatarGroup.svelte.d.ts +0 -27
  69. package/dist/components/agnostic/Breadcrumb/Breadcrumb.svelte +0 -65
  70. package/dist/components/agnostic/Breadcrumb/Breadcrumb.svelte.d.ts +0 -18
  71. package/dist/components/agnostic/Breadcrumb/api.d.ts +0 -4
  72. package/dist/components/agnostic/Breadcrumb/api.js +0 -1
  73. package/dist/components/agnostic/ChoiceInput/ChoiceInput.svelte +0 -365
  74. package/dist/components/agnostic/ChoiceInput/ChoiceInput.svelte.d.ts +0 -35
  75. package/dist/components/agnostic/ChoiceInput/api.d.ts +0 -7
  76. package/dist/components/agnostic/ChoiceInput/api.js +0 -1
  77. package/dist/components/agnostic/Dialog/Dialog.svelte +0 -278
  78. package/dist/components/agnostic/Dialog/Dialog.svelte.d.ts +0 -37
  79. package/dist/components/agnostic/Dialog/SvelteA11yDialog.svelte +0 -128
  80. package/dist/components/agnostic/Dialog/SvelteA11yDialog.svelte.d.ts +0 -28
  81. package/dist/components/agnostic/Dialog/a11y-dialog.d.ts +0 -56
  82. package/dist/components/agnostic/Dialog/a11y-dialog.js +0 -216
  83. package/dist/components/agnostic/Dialog/dom-utils.d.ts +0 -26
  84. package/dist/components/agnostic/Dialog/dom-utils.js +0 -206
  85. package/dist/components/agnostic/Drawer/Drawer.svelte +0 -34
  86. package/dist/components/agnostic/Drawer/Drawer.svelte.d.ts +0 -26
  87. package/dist/components/agnostic/Drawer/api.d.ts +0 -1
  88. package/dist/components/agnostic/Drawer/api.js +0 -1
  89. package/dist/components/agnostic/EmptyState/EmptyState.svelte +0 -49
  90. package/dist/components/agnostic/EmptyState/EmptyState.svelte.d.ts +0 -21
  91. package/dist/components/agnostic/Header/Header.svelte +0 -111
  92. package/dist/components/agnostic/Header/Header.svelte.d.ts +0 -24
  93. package/dist/components/agnostic/Header/HeaderNav.svelte +0 -29
  94. package/dist/components/agnostic/Header/HeaderNav.svelte.d.ts +0 -18
  95. package/dist/components/agnostic/Header/HeaderNavItem.svelte +0 -31
  96. package/dist/components/agnostic/Header/HeaderNavItem.svelte.d.ts +0 -18
  97. package/dist/components/agnostic/Icon/Icon.svelte +0 -188
  98. package/dist/components/agnostic/Icon/Icon.svelte.d.ts +0 -21
  99. package/dist/components/agnostic/Icon/api.d.ts +0 -2
  100. package/dist/components/agnostic/Icon/api.js +0 -1
  101. package/dist/components/agnostic/Progress/Progress.svelte +0 -51
  102. package/dist/components/agnostic/Progress/Progress.svelte.d.ts +0 -18
  103. package/dist/components/agnostic/Spinner/Spinner.svelte +0 -108
  104. package/dist/components/agnostic/Spinner/Spinner.svelte.d.ts +0 -17
  105. package/dist/components/agnostic/Switch/Switch.svelte.d.ts +0 -43
  106. package/dist/components/agnostic/Table/Table.svelte +0 -521
  107. package/dist/components/agnostic/Table/Table.svelte.d.ts +0 -34
  108. package/dist/components/agnostic/Table/TableCustomRenderComponent.svelte +0 -13
  109. package/dist/components/agnostic/Table/TableCustomRenderComponent.svelte.d.ts +0 -23
  110. package/dist/components/agnostic/Tabs/TabButtonCustom.svelte +0 -77
  111. package/dist/components/agnostic/Tabs/TabButtonCustom.svelte.d.ts +0 -33
  112. package/dist/components/agnostic/Tabs/Tabs.svelte +0 -399
  113. package/dist/components/agnostic/Tabs/Tabs.svelte.d.ts +0 -32
  114. package/dist/components/agnostic/Tabs/api.d.ts +0 -10
  115. package/dist/components/agnostic/Tabs/api.js +0 -1
  116. package/dist/components/agnostic/Tag/Tag.svelte +0 -78
  117. package/dist/components/agnostic/Tag/Tag.svelte.d.ts +0 -21
  118. package/dist/components/agnostic/Tag/TagSlots.svelte +0 -52
  119. package/dist/components/agnostic/Tag/TagSlots.svelte.d.ts +0 -14
  120. package/dist/components/agnostic/Toasts/Toasts.svelte +0 -56
  121. package/dist/components/agnostic/Toasts/Toasts.svelte.d.ts +0 -20
  122. package/dist/components/agnostic/Tooltip/Tooltip.svelte +0 -120
  123. package/dist/components/agnostic/Tooltip/Tooltip.svelte.d.ts +0 -21
  124. package/dist/components/agnostic/Tooltip/TooltipSlots.svelte +0 -82
  125. package/dist/components/agnostic/Tooltip/TooltipSlots.svelte.d.ts +0 -14
  126. package/dist/components/agnostic/Tooltip/api.d.ts +0 -1
  127. package/dist/components/agnostic/Tooltip/api.js +0 -1
  128. package/dist/components/presentation/Carusel.svelte +0 -109
  129. package/dist/components/presentation/Carusel.svelte.d.ts +0 -56
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export { default as HamburgerMenu } from './components/menu/HamburgerMenu.svelte';
2
1
  export { default as ColumnMenu } from './components/menu/NavigationItems.svelte';
3
2
  export { default as DynamicMenu } from './components/menu/DynamicMenu.svelte';
4
3
  export { default as CollapsibleMenu } from './components/menu/CollapsibleMenu.svelte';
@@ -15,8 +14,8 @@ export { default as Spacer } from './components/Spacer.svelte';
15
14
  export { default as Well } from './components/Well.svelte';
16
15
  export { default as Link } from './components/Link.svelte';
17
16
  export { default as Gallery } from './components/presentation/Gallery.svelte';
18
- export { default as Carusel } from './components/presentation/Carusel.svelte';
19
- export { CaruseleItem } from './components/presentation/Carusele.js';
17
+ export { default as Carousel } from './components/presentation/Carousel.svelte';
18
+ export { CarouselItem as CarouselItem } from './components/presentation/Carusele.js';
20
19
  export { default as ImageCompare } from './components/presentation/ImageCompare.svelte';
21
20
  export { default as BlogDescription } from './components/blog/BlogDescription.svelte';
22
21
  export { default as BlogTitle } from './components/blog/BlogTitle.svelte';
@@ -27,8 +26,8 @@ export { ShowItem } from './components/presentation/ShowItem.js';
27
26
  export { Justify, Placement, Orientation, Position, Sizes, AlignItmes } from './components/Styling.js';
28
27
  export { default as SvelteMarkdown } from './components/Markdown.svelte';
29
28
  export { default as Button } from './components/agnostic/Button/Button.svelte';
29
+ export { default as Card } from './components/presentation/Card.svelte';
30
30
  export { default as Disclose } from './components/agnostic/Disclose/Disclose.svelte';
31
31
  export { default as Input } from './components/form/Input.svelte';
32
32
  export { default as Loader } from './components/agnostic/Loader/Loader.svelte';
33
- export { DatePicker, DateInput, localeFromDateFnsLocale, type Locale, } from 'date-picker-svelte';
34
- export { default as Dropzone } from 'svelte-file-dropzone';
33
+ export { default as Switch } from './components/form/Switch.svelte';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { default as HamburgerMenu } from './components/menu/HamburgerMenu.svelte';
1
+ // export { default as HamburgerMenu } from './components/menu/HamburgerMenu.svelte';
2
2
  export { default as ColumnMenu } from './components/menu/NavigationItems.svelte';
3
3
  export { default as DynamicMenu } from './components/menu/DynamicMenu.svelte';
4
4
  export { default as CollapsibleMenu } from './components/menu/CollapsibleMenu.svelte';
@@ -15,8 +15,8 @@ export { default as Spacer } from './components/Spacer.svelte';
15
15
  export { default as Well } from './components/Well.svelte';
16
16
  export { default as Link } from './components/Link.svelte';
17
17
  export { default as Gallery } from './components/presentation/Gallery.svelte';
18
- export { default as Carusel } from './components/presentation/Carusel.svelte';
19
- export { CaruseleItem } from './components/presentation/Carusele.js';
18
+ export { default as Carousel } from './components/presentation/Carousel.svelte';
19
+ export { CarouselItem as CarouselItem } from './components/presentation/Carusele.js';
20
20
  export { default as ImageCompare } from './components/presentation/ImageCompare.svelte';
21
21
  export { default as BlogDescription } from './components/blog/BlogDescription.svelte';
22
22
  export { default as BlogTitle } from './components/blog/BlogTitle.svelte';
@@ -31,7 +31,7 @@ export { default as SvelteMarkdown } from './components/Markdown.svelte';
31
31
  // export { default as Breadcrumb } from './components/agnostic/Breadcrumb/Breadcrumb.svelte';
32
32
  export { default as Button } from './components/agnostic/Button/Button.svelte';
33
33
  // export { default as ButtonGroup } from './components/agnostic/Button/ButtonGroup.svelte';
34
- // export { default as Card } from './components/presentation/Card.svelte';
34
+ export { default as Card } from './components/presentation/Card.svelte';
35
35
  // export { default as ChoiceInput } from './components/agnostic/ChoiceInput/ChoiceInput.svelte';
36
36
  // export { default as Close } from './components/agnostic/Close/Close.svelte';
37
37
  // export { default as Dialog } from './components/agnostic/Dialog/Dialog.svelte';
@@ -49,11 +49,16 @@ export { default as Loader } from './components/agnostic/Loader/Loader.svelte';
49
49
  // export { default as Progress } from './components/agnostic/Progress/Progress.svelte';
50
50
  // export { default as Select } from './components/form/Select.svelte';
51
51
  // export { default as Spinner } from './components/agnostic/Spinner/Spinner.svelte';
52
- // export { default as Switch } from './components/agnostic/Switch/Switch.svelte';
52
+ export { default as Switch } from './components/form/Switch.svelte';
53
53
  // export { default as Table } from './components/agnostic/Table/Table.svelte';
54
54
  // export { default as Tabs } from './components/agnostic/Tabs/Tabs.svelte';
55
55
  // export { default as Tag } from './components/agnostic/Tag/Tag.svelte';
56
56
  // export { default as Toasts } from './components/agnostic/Toasts/Toasts.svelte';
57
57
  // export { default as Tooltip } from './components/agnostic/Tooltip/Tooltip.svelte';
58
- export { DatePicker, DateInput, localeFromDateFnsLocale, } from 'date-picker-svelte';
59
- export { default as Dropzone } from 'svelte-file-dropzone';
58
+ // export {
59
+ // DatePicker,
60
+ // DateInput,
61
+ // localeFromDateFnsLocale,
62
+ // type Locale,
63
+ // } from 'date-picker-svelte';
64
+ // export { default as Dropzone } from 'svelte-file-dropzone';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@functionalcms/svelte-components",
3
- "version": "3.5.16",
3
+ "version": "3.5.19",
4
4
  "watch": {
5
5
  "build": {
6
6
  "patterns": [
@@ -47,39 +47,39 @@
47
47
  "@eslint/compat": "^1.2.3",
48
48
  "@eslint/js": "^9.17.0",
49
49
  "@functionalcms/services": "latest",
50
+ "@inlang/paraglide-js": "1.11.8",
51
+ "@inlang/paraglide-sveltekit": "^0.15.5",
52
+ "@playwright/test": "^1.45.3",
53
+ "@splidejs/svelte-splide": "^0.2.9",
50
54
  "@sveltejs/adapter-netlify": "^4.4.0",
51
55
  "@sveltejs/kit": "^2.0.0",
52
- "@sveltejs/package": "^2.2.5",
53
- "@sveltejs/vite-plugin-svelte": "^5.0.0",
56
+ "@sveltejs/package": "^2.0.0",
57
+ "@sveltejs/vite-plugin-svelte": "^4.0.0",
54
58
  "eslint": "^9.7.0",
55
59
  "eslint-config-prettier": "^9.1.0",
56
60
  "eslint-plugin-svelte": "^2.36.0",
61
+ "globals": "^15.0.0",
62
+ "mdsvex": "^0.11.2",
63
+ "prettier": "^3.3.2",
57
64
  "prettier-plugin-svelte": "^3.2.6",
58
- "publint": "^0.2.12",
59
- "sass": "^1.69.7",
60
- "svelte": "^5.12.0",
61
- "tslib": "^2.6.2",
65
+ "publint": "^0.2.0",
66
+ "sass": "^1.83.1",
67
+ "svelte": "^5.0.0",
68
+ "svelte-check": "^4.0.0",
69
+ "tslib": "^2.8.1",
62
70
  "typescript": "^5.0.0",
63
- "typescript-eslint": "^8.19.1",
64
- "vite": "^6.0.3",
65
- "watch": "^1.0.2"
71
+ "typescript-eslint": "^8.0.0",
72
+ "vite": "^5.4.11"
66
73
  },
67
74
  "dependencies": {
68
- "@floating-ui/dom": "^1.6.12",
69
- "@splidejs/svelte-splide": "^0.2.9",
70
- "date-picker-svelte": "^2.14.1",
71
- "focusable-selectors": "^0.8.4",
72
- "ioredis": "^5.4.1",
73
- "marked": "^15.0.5",
74
- "node-html-parser": "^6.1.12",
75
- "oauth4webapi": "^2.17.0",
76
- "rehype-autolink-headings": "^7.1.0",
77
- "rehype-slug": "^6.0.0",
78
- "remark-abbr": "^1.4.2",
79
- "remark-github": "^12.0.0",
75
+ "@splidejs/splide": "^4.1.4",
76
+ "@sveltejs/kit": "^2.15.2",
77
+ "ioredis": "^5.4.2",
78
+ "marked": "^15.0.6",
79
+ "npm-watch": "^0.13.0",
80
+ "oauth4webapi": "^3.1.4",
81
+ "svelte": "^5.17.3",
80
82
  "svelte-file-dropzone": "^2.0.9"
81
83
  },
82
- "svelte": "./dist/index.js",
83
- "types": "./dist/index.d.ts",
84
84
  "type": "module"
85
85
  }
@@ -1,317 +0,0 @@
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 lang="ts">
244
- export let isAnimationFadeIn = true;
245
- export let isAnimationSlideUp = false;
246
- export let isToast = false;
247
-
248
- export let isRounded = false;
249
- export let isBorderAll = false;
250
- export let isBorderLeft = false;
251
- export let isBorderRight = false;
252
- export let isBorderTop = false;
253
- export let isBorderBottom = false;
254
- export let isBlockEnd = false;
255
- export let type = '';
256
- let typeClass;
257
- switch (type) {
258
- case 'warning':
259
- typeClass = 'alert-warning';
260
- break;
261
- case 'dark':
262
- typeClass = 'alert-dark';
263
- break;
264
- case 'error':
265
- typeClass = 'alert-error';
266
- break;
267
- case 'info':
268
- typeClass = 'alert-info';
269
- break;
270
- case 'success':
271
- typeClass = 'alert-success';
272
- break;
273
- default:
274
- typeClass = '';
275
- }
276
-
277
- const ariaAtomicValue = isToast ? true : undefined;
278
-
279
- $: ariaLiveValue = () => {
280
- let liveValue: 'assertive' | 'polite' | 'off';
281
- if (isToast && type === 'error') {
282
- liveValue = 'assertive';
283
- } else if (isToast) {
284
- liveValue = 'polite';
285
- } else {
286
- liveValue = 'off';
287
- }
288
- return liveValue;
289
- };
290
-
291
- const classes = [
292
- 'alert',
293
- typeClass,
294
- isRounded ? 'alert-rounded' : '',
295
- isBorderAll ? 'alert-border-all' : '',
296
- isBorderLeft ? 'alert-border-left' : '',
297
- isBorderRight ? 'alert-border-right' : '',
298
- isBorderTop ? 'alert-border-top' : '',
299
- isBorderBottom ? 'alert-border-bottom' : '',
300
- isBlockEnd ? 'alert-end' : '',
301
- isAnimationFadeIn && !isAnimationSlideUp ? 'fade-in' : '',
302
- !isAnimationFadeIn && isAnimationSlideUp ? 'slide-up' : '',
303
- isAnimationFadeIn && isAnimationSlideUp ? 'slide-up-fade-in' : ''
304
- ]
305
- .filter((klass) => klass.length)
306
- .join(' ');
307
- </script>
308
-
309
- <div
310
- class="{classes}"
311
- role="alert"
312
- aria-atomic="{ariaAtomicValue}"
313
- aria-live="{ariaLiveValue()}"
314
- >
315
- <slot name="icon" />
316
- <slot />
317
- </div>
@@ -1,29 +0,0 @@
1
- import { SvelteComponentTyped } 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
- };
24
- export type AlertProps = typeof __propDef.props;
25
- export type AlertEvents = typeof __propDef.events;
26
- export type AlertSlots = typeof __propDef.slots;
27
- export default class Alert extends SvelteComponentTyped<AlertProps, AlertEvents, AlertSlots> {
28
- }
29
- export {};
@@ -1,127 +0,0 @@
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 lang="ts">
104
- export let isRounded = false;
105
- export let isTransparent = false;
106
- export let isSquare = false;
107
- export let type = "";
108
- export let size = "";
109
- export let text = "";
110
- export let imgUrl = "";
111
-
112
- const avatarClasses = [
113
- "avatar",
114
- isRounded ? "avatar-rounded" : "",
115
- isTransparent ? "avatar-transparent" : "",
116
- isSquare ? "avatar-square" : "",
117
- type ? `avatar-${type}` : "",
118
- size ? `avatar-${size}` : "",
119
- ]
120
- .filter((cls) => cls)
121
- .join(" ");
122
- </script>
123
-
124
- <span class={avatarClasses} data-text={text || null}>
125
- {#if imgUrl}<img src={imgUrl} class="avatar-image" alt="" />{/if}
126
- <slot />
127
- </span>
@@ -1,24 +0,0 @@
1
- import { SvelteComponentTyped } 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
- };
19
- export type AvatarProps = typeof __propDef.props;
20
- export type AvatarEvents = typeof __propDef.events;
21
- export type AvatarSlots = typeof __propDef.slots;
22
- export default class Avatar extends SvelteComponentTyped<AvatarProps, AvatarEvents, AvatarSlots> {
23
- }
24
- export {};