polymorph-ui-components 0.1.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 (242) hide show
  1. package/README.md +354 -0
  2. package/dist/Accordion/Accordion.svelte +28 -0
  3. package/dist/Accordion/Accordion.svelte.d.ts +4 -0
  4. package/dist/Accordion/properties.d.ts +7 -0
  5. package/dist/Accordion/properties.js +1 -0
  6. package/dist/Animations/ModalAnimation.svelte +55 -0
  7. package/dist/Animations/ModalAnimation.svelte.d.ts +12 -0
  8. package/dist/Animations/OverlayAnimation.svelte +14 -0
  9. package/dist/Animations/OverlayAnimation.svelte.d.ts +7 -0
  10. package/dist/Avatar/Avatar.svelte +122 -0
  11. package/dist/Avatar/Avatar.svelte.d.ts +4 -0
  12. package/dist/Avatar/properties.d.ts +15 -0
  13. package/dist/Avatar/properties.js +1 -0
  14. package/dist/Badge/Badge.svelte +53 -0
  15. package/dist/Badge/Badge.svelte.d.ts +4 -0
  16. package/dist/Badge/properties.d.ts +6 -0
  17. package/dist/Badge/properties.js +1 -0
  18. package/dist/Banner/Banner.svelte +158 -0
  19. package/dist/Banner/Banner.svelte.d.ts +4 -0
  20. package/dist/Banner/properties.d.ts +19 -0
  21. package/dist/Banner/properties.js +1 -0
  22. package/dist/Book/Book.svelte +281 -0
  23. package/dist/Book/Book.svelte.d.ts +4 -0
  24. package/dist/Book/properties.d.ts +24 -0
  25. package/dist/Book/properties.js +1 -0
  26. package/dist/Browser/Browser.svelte +176 -0
  27. package/dist/Browser/Browser.svelte.d.ts +3 -0
  28. package/dist/Browser/properties.d.ts +14 -0
  29. package/dist/Browser/properties.js +1 -0
  30. package/dist/Button/Button.svelte +153 -0
  31. package/dist/Button/Button.svelte.d.ts +4 -0
  32. package/dist/Button/properties.d.ts +24 -0
  33. package/dist/Button/properties.js +1 -0
  34. package/dist/Calendar/Calendar.svelte +477 -0
  35. package/dist/Calendar/Calendar.svelte.d.ts +4 -0
  36. package/dist/Calendar/properties.d.ts +30 -0
  37. package/dist/Calendar/properties.js +1 -0
  38. package/dist/Carousel/Carousel.svelte +258 -0
  39. package/dist/Carousel/Carousel.svelte.d.ts +4 -0
  40. package/dist/Carousel/properties.d.ts +20 -0
  41. package/dist/Carousel/properties.js +1 -0
  42. package/dist/CheckListItem/CheckListItem.svelte +65 -0
  43. package/dist/CheckListItem/CheckListItem.svelte.d.ts +4 -0
  44. package/dist/CheckListItem/properties.d.ts +15 -0
  45. package/dist/CheckListItem/properties.js +1 -0
  46. package/dist/Checkbox/Checkbox.svelte +157 -0
  47. package/dist/Checkbox/Checkbox.svelte.d.ts +4 -0
  48. package/dist/Checkbox/properties.d.ts +17 -0
  49. package/dist/Checkbox/properties.js +1 -0
  50. package/dist/Choicebox/Choicebox.svelte +85 -0
  51. package/dist/Choicebox/Choicebox.svelte.d.ts +4 -0
  52. package/dist/Choicebox/properties.d.ts +14 -0
  53. package/dist/Choicebox/properties.js +1 -0
  54. package/dist/ColorPicker/ColorPicker.svelte +583 -0
  55. package/dist/ColorPicker/ColorPicker.svelte.d.ts +4 -0
  56. package/dist/ColorPicker/properties.d.ts +15 -0
  57. package/dist/ColorPicker/properties.js +1 -0
  58. package/dist/Combobox/Combobox.svelte +432 -0
  59. package/dist/Combobox/Combobox.svelte.d.ts +6 -0
  60. package/dist/Combobox/properties.d.ts +42 -0
  61. package/dist/Combobox/properties.js +1 -0
  62. package/dist/CommandMenu/CommandMenu.svelte +452 -0
  63. package/dist/CommandMenu/CommandMenu.svelte.d.ts +4 -0
  64. package/dist/CommandMenu/properties.d.ts +26 -0
  65. package/dist/CommandMenu/properties.js +1 -0
  66. package/dist/ContextMenu/ContextMenu.svelte +308 -0
  67. package/dist/ContextMenu/ContextMenu.svelte.d.ts +4 -0
  68. package/dist/ContextMenu/properties.d.ts +26 -0
  69. package/dist/ContextMenu/properties.js +1 -0
  70. package/dist/Gauge/Gauge.svelte +70 -0
  71. package/dist/Gauge/Gauge.svelte.d.ts +4 -0
  72. package/dist/Gauge/properties.d.ts +9 -0
  73. package/dist/Gauge/properties.js +1 -0
  74. package/dist/GridItem/GridItem.svelte +145 -0
  75. package/dist/GridItem/GridItem.svelte.d.ts +4 -0
  76. package/dist/GridItem/properties.d.ts +15 -0
  77. package/dist/GridItem/properties.js +1 -0
  78. package/dist/Icon/Icon.svelte +61 -0
  79. package/dist/Icon/Icon.svelte.d.ts +4 -0
  80. package/dist/Icon/properties.d.ts +12 -0
  81. package/dist/Icon/properties.js +1 -0
  82. package/dist/IconStack/IconStack.svelte +55 -0
  83. package/dist/IconStack/IconStack.svelte.d.ts +4 -0
  84. package/dist/IconStack/properties.d.ts +9 -0
  85. package/dist/IconStack/properties.js +1 -0
  86. package/dist/Img/Img.svelte +37 -0
  87. package/dist/Img/Img.svelte.d.ts +4 -0
  88. package/dist/Img/properties.d.ts +13 -0
  89. package/dist/Img/properties.js +1 -0
  90. package/dist/Input/Input.svelte +349 -0
  91. package/dist/Input/Input.svelte.d.ts +8 -0
  92. package/dist/Input/properties.d.ts +45 -0
  93. package/dist/Input/properties.js +1 -0
  94. package/dist/InputButton/InputButton.svelte +252 -0
  95. package/dist/InputButton/InputButton.svelte.d.ts +7 -0
  96. package/dist/InputButton/properties.d.ts +22 -0
  97. package/dist/InputButton/properties.js +1 -0
  98. package/dist/KeyboardInput/KeyboardInput.svelte +93 -0
  99. package/dist/KeyboardInput/KeyboardInput.svelte.d.ts +4 -0
  100. package/dist/KeyboardInput/properties.d.ts +12 -0
  101. package/dist/KeyboardInput/properties.js +1 -0
  102. package/dist/ListItem/ListItem.svelte +309 -0
  103. package/dist/ListItem/ListItem.svelte.d.ts +4 -0
  104. package/dist/ListItem/properties.d.ts +34 -0
  105. package/dist/ListItem/properties.js +1 -0
  106. package/dist/Loader/Loader.svelte +90 -0
  107. package/dist/Loader/Loader.svelte.d.ts +4 -0
  108. package/dist/Loader/properties.d.ts +4 -0
  109. package/dist/Loader/properties.js +1 -0
  110. package/dist/LoadingDots/LoadingDots.svelte +59 -0
  111. package/dist/LoadingDots/LoadingDots.svelte.d.ts +3 -0
  112. package/dist/LoadingDots/properties.d.ts +8 -0
  113. package/dist/LoadingDots/properties.js +1 -0
  114. package/dist/Menu/Menu.svelte +356 -0
  115. package/dist/Menu/Menu.svelte.d.ts +4 -0
  116. package/dist/Menu/properties.d.ts +28 -0
  117. package/dist/Menu/properties.js +1 -0
  118. package/dist/Modal/Modal.svelte +357 -0
  119. package/dist/Modal/Modal.svelte.d.ts +4 -0
  120. package/dist/Modal/properties.d.ts +39 -0
  121. package/dist/Modal/properties.js +1 -0
  122. package/dist/Pagination/Pagination.svelte +148 -0
  123. package/dist/Pagination/Pagination.svelte.d.ts +4 -0
  124. package/dist/Pagination/properties.d.ts +14 -0
  125. package/dist/Pagination/properties.js +1 -0
  126. package/dist/Phone/Phone.svelte +234 -0
  127. package/dist/Phone/Phone.svelte.d.ts +3 -0
  128. package/dist/Phone/properties.d.ts +11 -0
  129. package/dist/Phone/properties.js +1 -0
  130. package/dist/Pill/Pill.svelte +130 -0
  131. package/dist/Pill/Pill.svelte.d.ts +4 -0
  132. package/dist/Pill/properties.d.ts +16 -0
  133. package/dist/Pill/properties.js +1 -0
  134. package/dist/Progress/Progress.svelte +68 -0
  135. package/dist/Progress/Progress.svelte.d.ts +4 -0
  136. package/dist/Progress/properties.d.ts +10 -0
  137. package/dist/Progress/properties.js +1 -0
  138. package/dist/Radio/Radio.svelte +124 -0
  139. package/dist/Radio/Radio.svelte.d.ts +4 -0
  140. package/dist/Radio/properties.d.ts +15 -0
  141. package/dist/Radio/properties.js +1 -0
  142. package/dist/RelativeTime/RelativeTime.svelte +109 -0
  143. package/dist/RelativeTime/RelativeTime.svelte.d.ts +4 -0
  144. package/dist/RelativeTime/properties.d.ts +13 -0
  145. package/dist/RelativeTime/properties.js +1 -0
  146. package/dist/Scroller/Scroller.svelte +390 -0
  147. package/dist/Scroller/Scroller.svelte.d.ts +4 -0
  148. package/dist/Scroller/properties.d.ts +30 -0
  149. package/dist/Scroller/properties.js +1 -0
  150. package/dist/Select/Select.svelte +472 -0
  151. package/dist/Select/Select.svelte.d.ts +4 -0
  152. package/dist/Select/properties.d.ts +20 -0
  153. package/dist/Select/properties.js +1 -0
  154. package/dist/Sheet/Sheet.svelte +264 -0
  155. package/dist/Sheet/Sheet.svelte.d.ts +4 -0
  156. package/dist/Sheet/properties.d.ts +19 -0
  157. package/dist/Sheet/properties.js +1 -0
  158. package/dist/Shimmer/Shimmer.svelte +44 -0
  159. package/dist/Shimmer/Shimmer.svelte.d.ts +4 -0
  160. package/dist/Shimmer/properties.d.ts +4 -0
  161. package/dist/Shimmer/properties.js +1 -0
  162. package/dist/Slider/Slider.svelte +147 -0
  163. package/dist/Slider/Slider.svelte.d.ts +4 -0
  164. package/dist/Slider/properties.d.ts +17 -0
  165. package/dist/Slider/properties.js +1 -0
  166. package/dist/Snippet/Snippet.svelte +123 -0
  167. package/dist/Snippet/Snippet.svelte.d.ts +4 -0
  168. package/dist/Snippet/properties.d.ts +15 -0
  169. package/dist/Snippet/properties.js +1 -0
  170. package/dist/SplitButton/SplitButton.svelte +145 -0
  171. package/dist/SplitButton/SplitButton.svelte.d.ts +4 -0
  172. package/dist/SplitButton/properties.d.ts +17 -0
  173. package/dist/SplitButton/properties.js +1 -0
  174. package/dist/SplitInput/SplitInput.svelte +225 -0
  175. package/dist/SplitInput/SplitInput.svelte.d.ts +7 -0
  176. package/dist/SplitInput/properties.d.ts +20 -0
  177. package/dist/SplitInput/properties.js +1 -0
  178. package/dist/Stepper/Step.svelte +88 -0
  179. package/dist/Stepper/Step.svelte.d.ts +4 -0
  180. package/dist/Stepper/Stepper.svelte +64 -0
  181. package/dist/Stepper/Stepper.svelte.d.ts +4 -0
  182. package/dist/Stepper/properties.d.ts +27 -0
  183. package/dist/Stepper/properties.js +1 -0
  184. package/dist/Table/Table.svelte +357 -0
  185. package/dist/Table/Table.svelte.d.ts +4 -0
  186. package/dist/Table/properties.d.ts +26 -0
  187. package/dist/Table/properties.js +1 -0
  188. package/dist/Tabs/Tabs.svelte +303 -0
  189. package/dist/Tabs/Tabs.svelte.d.ts +4 -0
  190. package/dist/Tabs/properties.d.ts +30 -0
  191. package/dist/Tabs/properties.js +1 -0
  192. package/dist/ThemeSwitcher/ThemeSwitcher.svelte +249 -0
  193. package/dist/ThemeSwitcher/ThemeSwitcher.svelte.d.ts +4 -0
  194. package/dist/ThemeSwitcher/properties.d.ts +19 -0
  195. package/dist/ThemeSwitcher/properties.js +1 -0
  196. package/dist/Toast/Toast.svelte +220 -0
  197. package/dist/Toast/Toast.svelte.d.ts +4 -0
  198. package/dist/Toast/properties.d.ts +24 -0
  199. package/dist/Toast/properties.js +1 -0
  200. package/dist/Toggle/Toggle.svelte +99 -0
  201. package/dist/Toggle/Toggle.svelte.d.ts +4 -0
  202. package/dist/Toggle/properties.d.ts +9 -0
  203. package/dist/Toggle/properties.js +1 -0
  204. package/dist/Toolbar/Toolbar.svelte +142 -0
  205. package/dist/Toolbar/Toolbar.svelte.d.ts +4 -0
  206. package/dist/Toolbar/properties.d.ts +16 -0
  207. package/dist/Toolbar/properties.js +1 -0
  208. package/dist/Tooltip/Tooltip.svelte +153 -0
  209. package/dist/Tooltip/Tooltip.svelte.d.ts +4 -0
  210. package/dist/Tooltip/properties.d.ts +13 -0
  211. package/dist/Tooltip/properties.js +1 -0
  212. package/dist/assets/back.svg +3 -0
  213. package/dist/assets/battery.svg +5 -0
  214. package/dist/assets/checkmark.svg +3 -0
  215. package/dist/assets/chevron-down-sm.svg +3 -0
  216. package/dist/assets/chevron-down.svg +3 -0
  217. package/dist/assets/chevron-left-lg.svg +3 -0
  218. package/dist/assets/chevron-left.svg +3 -0
  219. package/dist/assets/chevron-right-lg.svg +3 -0
  220. package/dist/assets/chevron-right.svg +3 -0
  221. package/dist/assets/chevron-up.svg +3 -0
  222. package/dist/assets/close.svg +4 -0
  223. package/dist/assets/copy.svg +4 -0
  224. package/dist/assets/error-circle.svg +5 -0
  225. package/dist/assets/lock.svg +3 -0
  226. package/dist/assets/minus.svg +3 -0
  227. package/dist/assets/monitor.svg +5 -0
  228. package/dist/assets/moon.svg +3 -0
  229. package/dist/assets/palette.svg +7 -0
  230. package/dist/assets/search.svg +4 -0
  231. package/dist/assets/signal.svg +6 -0
  232. package/dist/assets/sort-default.svg +4 -0
  233. package/dist/assets/sun.svg +11 -0
  234. package/dist/assets/swap-vertical.svg +6 -0
  235. package/dist/assets/wifi.svg +3 -0
  236. package/dist/index.d.ts +103 -0
  237. package/dist/index.js +55 -0
  238. package/dist/types.d.ts +42 -0
  239. package/dist/types.js +1 -0
  240. package/dist/utils.d.ts +28 -0
  241. package/dist/utils.js +294 -0
  242. package/package.json +91 -0
@@ -0,0 +1,309 @@
1
+ <script lang="ts">
2
+ import Accordion from '../Accordion/Accordion.svelte';
3
+ import Loader from '../Loader/Loader.svelte';
4
+ import Img from '../Img/Img.svelte';
5
+ import type { ListItemProperties } from './properties';
6
+
7
+ let {
8
+ leftImageUrl,
9
+ leftImageFallbackUrl,
10
+ rightImageUrl,
11
+ label,
12
+ useAccordion = false,
13
+ rightContentText,
14
+ testId,
15
+ topSectionTestId,
16
+ rightImageTestId,
17
+ leftImageTestId,
18
+ centerTextTestId,
19
+ showLoader = false,
20
+ showRightContentLoader = false,
21
+ expand = $bindable(false),
22
+ preventFocus = false,
23
+ leftContent,
24
+ centerContent,
25
+ rightContent,
26
+ bottomContent,
27
+ onleftimageclick,
28
+ onrightimageclick,
29
+ oncentertextclick,
30
+ onitemclick,
31
+ ontopsectionclick,
32
+ onkeydown,
33
+ classes,
34
+ role: itemRole,
35
+ ariaSelected,
36
+ id
37
+ }: ListItemProperties = $props();
38
+
39
+ function handleLeftImageClick(event: MouseEvent): void {
40
+ onleftimageclick?.(event);
41
+ }
42
+
43
+ function handleRightImageClick(event: MouseEvent): void {
44
+ onrightimageclick?.(event);
45
+ }
46
+
47
+ function handleCenterTextClick(event: MouseEvent): void {
48
+ oncentertextclick?.(event);
49
+ }
50
+
51
+ function handleItemClick(event: MouseEvent): void {
52
+ onitemclick?.(event);
53
+ }
54
+
55
+ function handleTopSectionClick(event: MouseEvent): void {
56
+ ontopsectionclick?.(event);
57
+ }
58
+ </script>
59
+
60
+ {#if (typeof leftImageUrl === 'string' && leftImageUrl.length > 0) || (typeof rightImageUrl === 'string' && rightImageUrl.length > 0) || (typeof label === 'string' && label.length > 0) || typeof leftContent === 'function' || typeof centerContent === 'function' || typeof rightContent === 'function' || typeof bottomContent === 'function'}
61
+ <div class="item-container {classes ?? ''}">
62
+ {#if showLoader}
63
+ <div class="item-loader"></div>
64
+ {/if}
65
+ <!-- svelte-ignore a11y_no_noninteractive_tabindex -->
66
+ <div
67
+ class="item"
68
+ class:prevent-focus={preventFocus}
69
+ onclick={handleItemClick}
70
+ {onkeydown}
71
+ role={itemRole ?? 'button'}
72
+ tabindex={itemRole === 'option' ? -1 : 0}
73
+ aria-selected={ariaSelected}
74
+ {id}
75
+ data-pw={testId}
76
+ >
77
+ <div
78
+ class="top-section"
79
+ class:prevent-focus={preventFocus}
80
+ onclick={handleTopSectionClick}
81
+ {onkeydown}
82
+ role="button"
83
+ tabindex="0"
84
+ data-pw={topSectionTestId}
85
+ >
86
+ <div class="left-content">
87
+ {#if typeof leftImageUrl === 'string' && leftImageUrl.length > 0}
88
+ <div
89
+ class:prevent-focus={preventFocus}
90
+ onclick={handleLeftImageClick}
91
+ {onkeydown}
92
+ role="button"
93
+ tabindex="0"
94
+ data-pw={leftImageTestId}
95
+ >
96
+ <Img src={leftImageUrl} alt="" fallback={leftImageFallbackUrl} />
97
+ </div>
98
+ {/if}
99
+ {#if typeof leftContent === 'function'}
100
+ {@render leftContent?.()}
101
+ {/if}
102
+ </div>
103
+ <div class="center-content">
104
+ {#if typeof label === 'string' && label.length > 0}
105
+ <div
106
+ class="center-text"
107
+ class:prevent-focus={preventFocus}
108
+ onclick={handleCenterTextClick}
109
+ {onkeydown}
110
+ role="button"
111
+ tabindex="0"
112
+ data-pw={centerTextTestId}
113
+ >
114
+ <!-- eslint-disable-next-line -->
115
+ {@html label}
116
+ </div>
117
+ {/if}
118
+ {#if typeof centerContent === 'function'}
119
+ {@render centerContent?.()}
120
+ {/if}
121
+ </div>
122
+ <div class="right-content">
123
+ {#if typeof rightContent === 'function'}
124
+ {@render rightContent?.()}
125
+ {/if}
126
+ {#if typeof rightImageUrl === 'string' && rightImageUrl.length > 0}
127
+ <div
128
+ class:prevent-focus={preventFocus}
129
+ onclick={handleRightImageClick}
130
+ {onkeydown}
131
+ role="button"
132
+ tabindex="0"
133
+ data-pw={rightImageTestId}
134
+ >
135
+ <div class="right-img-wrapper">
136
+ <Img src={rightImageUrl} alt="" />
137
+ </div>
138
+ </div>
139
+ {/if}
140
+ {#if showRightContentLoader}
141
+ <div class="right-content-loader">
142
+ <Loader />
143
+ </div>
144
+ {/if}
145
+ {#if typeof rightContentText === 'string' && rightContentText.length > 0}
146
+ <span class="right-content-text">{rightContentText}</span>
147
+ {/if}
148
+ </div>
149
+ </div>
150
+ <div class="bottom-section">
151
+ {#if typeof bottomContent === 'function' && useAccordion}
152
+ <Accordion {expand}>
153
+ {@render bottomContent()}
154
+ </Accordion>
155
+ {/if}
156
+ </div>
157
+ </div>
158
+ </div>
159
+ {/if}
160
+
161
+ <style>
162
+ .item-container {
163
+ position: relative;
164
+ --loader-foreground: var(--list-item-loader-foreground, currentColor);
165
+ --loader-background: var(--list-item-loader-background, #ffffff);
166
+ --loader-foreground-end: var(--list-item-loader-foreground-end, #ffffff);
167
+ }
168
+
169
+ .item-loader {
170
+ position: absolute;
171
+ height: 100%;
172
+ width: 100%;
173
+ background: var(--list-item-loader-background-color, #00000030);
174
+ z-index: 20;
175
+ animation: fill-loader ease-in-out var(--list-item-loader-duration, 8s);
176
+ }
177
+
178
+ @keyframes fill-loader {
179
+ 0% {
180
+ width: 0;
181
+ }
182
+
183
+ 100% {
184
+ width: 100%;
185
+ }
186
+ }
187
+
188
+ .item {
189
+ display: flex;
190
+ flex-direction: column;
191
+ background-color: var(--list-item-background-color, transparent);
192
+ -webkit-tap-highlight-color: transparent;
193
+ cursor: var(--list-item-cursor, pointer);
194
+ -moz-box-shadow: var(--list-item-box-shadow, none);
195
+ -webkit-box-shadow: var(--list-item-box-shadow, none);
196
+ box-shadow: var(--list-item-box-shadow, none);
197
+ width: var(--list-item-box-width);
198
+ border-radius: var(--list-item-border-radius, 0px);
199
+ margin: var(--list-item-margin);
200
+ padding: var(--list-item-padding);
201
+ border: var(--list-item-border);
202
+ transition: var(--list-item-transition);
203
+ }
204
+
205
+ .item:hover {
206
+ background-color: var(--list-item-hover-background-color, var(--list-item-background-color));
207
+ border: var(--list-item-hover-border, var(--list-item-border));
208
+ }
209
+
210
+ .top-section {
211
+ display: flex;
212
+ flex-direction: row;
213
+ margin-bottom: 0;
214
+ }
215
+
216
+ .left-content {
217
+ display: var(--list-item-left-content-display, flex);
218
+ --image-height: var(--list-item-left-image-height, 24px);
219
+ --image-width: var(--list-item-left-image-width, 24px);
220
+ --image-padding: var(--list-item-left-image-padding, 0px);
221
+ --image-border-radius: var(--list-item-left-image-border-radius, 0px);
222
+ --image-margin: var(--list-item-left-image-margin, 0px);
223
+ --image-filter: var(--list-item-left-image-filter, none);
224
+ --image-background: var(--list-item-left-image-background);
225
+ --image-border: var(--list-item-left-image-border);
226
+ --image-transition: var(--list-item-transition);
227
+ --image-object-fit: var(--list-item-left-image-object-fit);
228
+ --image-hover-background: var(
229
+ --list-item-left-image-hover-background,
230
+ var(--list-item-left-image-background)
231
+ );
232
+ --image-hover-border: var(
233
+ --list-item-left-image-hover-border,
234
+ var(--list-item-left-image-border)
235
+ );
236
+ }
237
+
238
+ .center-text {
239
+ display: flex;
240
+ flex-direction: column;
241
+ justify-content: var(--list-item-center-text-justify-content, flex-start);
242
+ padding: var(--list-item-center-text-padding, 0px 20px);
243
+ color: var(--list-item-center-text-color, inherit);
244
+ font-size: var(--list-item-center-text-font-size, inherit);
245
+ font-weight: var(--list-item-center-text-font-weight, inherit);
246
+ align-items: var(--list-item-center-text-vertical-align);
247
+ margin: var(--list-item-center-text-margin);
248
+ border: var(--list-item-center-text-border);
249
+ cursor: var(--list-item-center-text-cursor, pointer);
250
+ font-family: var(--list-item-center-text-font-family);
251
+ }
252
+
253
+ .center-content {
254
+ display: flex;
255
+ flex: 1;
256
+ min-width: 0;
257
+ }
258
+
259
+ .right-content {
260
+ display: var(--list-item-right-content-display, flex);
261
+ }
262
+
263
+ .right-content-loader {
264
+ margin: var(--list-item-right-content-loader-margin);
265
+ }
266
+
267
+ .bottom-section {
268
+ flex-direction: row;
269
+ margin-top: 0;
270
+ }
271
+
272
+ .right-img-wrapper {
273
+ --image-height: var(--list-item-right-image-height, 18px);
274
+ --image-width: var(--list-item-right-image-width, 18px);
275
+ --image-padding: var(--list-item-right-image-padding, 0px);
276
+ --image-border-radius: var(--list-item-right-image-border-radius, 0px);
277
+ --image-margin: var(--list-item-right-image-margin, 0px);
278
+ --image-filter: var(--list-item-right-image-filter);
279
+ --image-background: var(--list-item-right-image-background);
280
+ --image-border: var(--list-item-right-image-border);
281
+ --image-transition: var(--list-item-transition);
282
+ --image-hover-background: var(
283
+ --list-item-right-image-hover-background,
284
+ var(--list-item-right-image-background)
285
+ );
286
+ --image-hover-border: var(
287
+ --list-item-right-image-hover-border,
288
+ var(--list-item-right-image-border)
289
+ );
290
+ }
291
+
292
+ .right-content-text {
293
+ color: var(--list-item-right-content-text-color, inherit);
294
+ font-size: var(--list-item-right-content-text-font-size, inherit);
295
+ font-weight: var(--list-item-right-content-text-font-weight, inherit);
296
+ display: var(--list-item-right-content-display, flex);
297
+ align-items: var(--list-item-right-content-text-vertical-align);
298
+ padding: var(--list-item-right-content-text-padding, 0px);
299
+ margin: var(--list-item-right-content-text-margin, 0px);
300
+ border: var(--list-item-right-content-text-border);
301
+ cursor: var(--list-item-right-content-text-cursor, pointer);
302
+ font-family: var(--list-item-right-content-text-font-family);
303
+ justify-content: var(--list-item-right-content-text-justify-content);
304
+ }
305
+
306
+ .prevent-focus:focus {
307
+ outline: none;
308
+ }
309
+ </style>
@@ -0,0 +1,4 @@
1
+ import type { ListItemProperties } from './properties';
2
+ declare const ListItem: import("svelte").Component<ListItemProperties, {}, "expand">;
3
+ type ListItem = ReturnType<typeof ListItem>;
4
+ export default ListItem;
@@ -0,0 +1,34 @@
1
+ import type { Snippet } from 'svelte';
2
+ export type ListItemProperties = ListItemEventProperties & {
3
+ leftImageUrl?: string | null;
4
+ leftImageFallbackUrl?: string | null;
5
+ rightImageUrl?: string | null;
6
+ label?: string | null;
7
+ useAccordion?: boolean;
8
+ rightContentText?: string | null;
9
+ testId?: string;
10
+ topSectionTestId?: string;
11
+ rightImageTestId?: string;
12
+ leftImageTestId?: string;
13
+ centerTextTestId?: string;
14
+ showLoader?: boolean;
15
+ showRightContentLoader?: boolean;
16
+ expand?: boolean;
17
+ preventFocus?: boolean;
18
+ leftContent?: Snippet;
19
+ centerContent?: Snippet;
20
+ rightContent?: Snippet;
21
+ bottomContent?: Snippet;
22
+ classes?: string;
23
+ role?: string;
24
+ ariaSelected?: boolean;
25
+ id?: string;
26
+ };
27
+ export type ListItemEventProperties = {
28
+ onleftimageclick?: (event: MouseEvent) => void;
29
+ onrightimageclick?: (event: MouseEvent) => void;
30
+ oncentertextclick?: (event: MouseEvent) => void;
31
+ onitemclick?: (event: MouseEvent) => void;
32
+ ontopsectionclick?: (event: MouseEvent) => void;
33
+ onkeydown?: (event: KeyboardEvent) => void;
34
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,90 @@
1
+ <script lang="ts">
2
+ import type { LoaderProperties } from './properties';
3
+
4
+ let { testId, classes }: LoaderProperties = $props();
5
+ </script>
6
+
7
+ <div class="loader {classes ?? ''}" data-pw={testId}></div>
8
+
9
+ <style>
10
+ .loader {
11
+ font-size: var(--loader-font-size, 10px);
12
+ text-indent: var(--loader-text-indent, -9999em);
13
+ width: var(--loader-width, 20px);
14
+ height: var(--loader-height, 20px);
15
+ border-radius: var(--loader-border-radius, 50%);
16
+ background: var(--loader-foreground, currentColor);
17
+ background: -moz-linear-gradient(
18
+ left,
19
+ var(--loader-foreground, currentColor) 10%,
20
+ var(--loader-foreground-end, transparent) 42%
21
+ );
22
+ background: -webkit-linear-gradient(
23
+ left,
24
+ var(--loader-foreground, currentColor) 10%,
25
+ var(--loader-foreground-end, transparent) 42%
26
+ );
27
+ background: -o-linear-gradient(
28
+ left,
29
+ var(--loader-foreground, currentColor) 10%,
30
+ var(--loader-foreground-end, transparent) 42%
31
+ );
32
+ background: -ms-linear-gradient(
33
+ left,
34
+ var(--loader-foreground, currentColor) 10%,
35
+ var(--loader-foreground-end, transparent) 42%
36
+ );
37
+ background: linear-gradient(
38
+ to right,
39
+ var(--loader-foreground, currentColor) 10%,
40
+ var(--loader-foreground-end, transparent) 42%
41
+ );
42
+ position: relative;
43
+ -webkit-animation: load3 1.4s infinite linear;
44
+ animation: load3 1.4s infinite linear;
45
+ -webkit-transform: translateZ(0);
46
+ -ms-transform: translateZ(0);
47
+ transform: translateZ(0);
48
+ }
49
+ .loader:before {
50
+ width: var(--loader-before-width, 10px);
51
+ height: var(--loader-before-height, 10px);
52
+ background: var(--loader-foreground, currentColor);
53
+ border-radius: var(--loader-before-border-radius, 100% 0 0 0);
54
+ position: var(--loader-before-position, absolute);
55
+ top: var(--loader-before-top, 0);
56
+ left: var(--loader-before-left, 0);
57
+ content: '';
58
+ }
59
+ .loader:after {
60
+ background: var(--loader-background, #ffffff);
61
+ width: var(--loader-after-width, 15px);
62
+ height: var(--loader-after-height, 15px);
63
+ border-radius: var(--loader-after-border-radius, 50%);
64
+ content: '';
65
+ position: var(--loader-after-position, absolute);
66
+ top: var(--loader-after-top, 50%);
67
+ left: var(--loader-after-left, 50%);
68
+ transform: translate(-50%, -50%);
69
+ }
70
+ @-webkit-keyframes load3 {
71
+ 0% {
72
+ -webkit-transform: rotate(0deg);
73
+ transform: rotate(0deg);
74
+ }
75
+ 100% {
76
+ -webkit-transform: rotate(360deg);
77
+ transform: rotate(360deg);
78
+ }
79
+ }
80
+ @keyframes load3 {
81
+ 0% {
82
+ -webkit-transform: rotate(0deg);
83
+ transform: rotate(0deg);
84
+ }
85
+ 100% {
86
+ -webkit-transform: rotate(360deg);
87
+ transform: rotate(360deg);
88
+ }
89
+ }
90
+ </style>
@@ -0,0 +1,4 @@
1
+ import type { LoaderProperties } from './properties';
2
+ declare const Loader: import("svelte").Component<LoaderProperties, {}, "">;
3
+ type Loader = ReturnType<typeof Loader>;
4
+ export default Loader;
@@ -0,0 +1,4 @@
1
+ export type LoaderProperties = {
2
+ testId?: string;
3
+ classes?: string;
4
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,59 @@
1
+ <script lang="ts">
2
+ import type { LoadingDotsProperties } from './properties';
3
+
4
+ let { dots = 3, animation = 'bounce', testId, classes }: LoadingDotsProperties = $props();
5
+
6
+ let count = $derived(Math.max(1, Math.round(dots)));
7
+ </script>
8
+
9
+ <span class="loading-dots {classes ?? ''}" role="status" aria-label="Loading" data-pw={testId}>
10
+ {#each { length: count } as _, i (i)}
11
+ <span class="dot" class:pulse={animation === 'pulse'} style="--i: {i}"></span>
12
+ {/each}
13
+ </span>
14
+
15
+ <style>
16
+ .loading-dots {
17
+ display: inline-flex;
18
+ align-items: center;
19
+ gap: var(--loading-dots-gap, 3px);
20
+ vertical-align: middle;
21
+ line-height: 1;
22
+ }
23
+
24
+ .dot {
25
+ display: block;
26
+ width: var(--loading-dots-size, 6px);
27
+ height: var(--loading-dots-size, 6px);
28
+ border-radius: var(--loading-dots-border-radius, 50%);
29
+ background-color: var(--loading-dots-color, currentColor);
30
+ animation: loading-dots-bounce var(--loading-dots-duration, 1.4s) ease-in-out infinite;
31
+ animation-delay: calc(var(--i) * var(--loading-dots-stagger, 0.16s));
32
+ }
33
+
34
+ .dot.pulse {
35
+ animation-name: loading-dots-pulse;
36
+ }
37
+
38
+ @keyframes loading-dots-bounce {
39
+ 0%,
40
+ 80%,
41
+ 100% {
42
+ transform: translateY(0);
43
+ }
44
+ 40% {
45
+ transform: translateY(var(--loading-dots-bounce-height, -6px));
46
+ }
47
+ }
48
+
49
+ @keyframes loading-dots-pulse {
50
+ 0%,
51
+ 80%,
52
+ 100% {
53
+ opacity: var(--loading-dots-pulse-min-opacity, 0.2);
54
+ }
55
+ 40% {
56
+ opacity: 1;
57
+ }
58
+ }
59
+ </style>
@@ -0,0 +1,3 @@
1
+ declare const LoadingDots: import("svelte").Component<import("./properties").OptionalLoadingDotsProperties, {}, "">;
2
+ type LoadingDots = ReturnType<typeof LoadingDots>;
3
+ export default LoadingDots;
@@ -0,0 +1,8 @@
1
+ export type LoadingDotsAnimation = 'bounce' | 'pulse';
2
+ export type LoadingDotsProperties = OptionalLoadingDotsProperties;
3
+ export type OptionalLoadingDotsProperties = {
4
+ dots?: number;
5
+ animation?: LoadingDotsAnimation;
6
+ testId?: string;
7
+ classes?: string;
8
+ };
@@ -0,0 +1 @@
1
+ export {};