@functionalcms/svelte-components 3.5.20 → 4.0.0-pre-2.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 (129) hide show
  1. package/css/functional.css +1 -1
  2. package/css/functional.css.map +1 -1
  3. package/dist/auth/authenticationHandle.js +0 -4
  4. package/dist/auth/redisSessionProvider.js +1 -2
  5. package/dist/auth/sessionIdGenerator.d.ts +1 -1
  6. package/dist/components/form/Button.svelte +379 -0
  7. package/dist/components/form/Button.svelte.d.ts +27 -0
  8. package/dist/components/form/Input.d.ts +21 -0
  9. package/dist/components/form/Input.js +23 -0
  10. package/dist/components/form/Input.svelte +142 -177
  11. package/dist/components/form/Input.svelte.d.ts +24 -46
  12. package/dist/components/{Banner.svelte → layouts/Banner.svelte} +5 -5
  13. package/dist/components/layouts/DefaultLayout.svelte +5 -5
  14. package/dist/components/layouts/DefaultLayout.svelte.d.ts +4 -4
  15. package/dist/components/layouts/SimpleFooter.svelte +4 -4
  16. package/dist/components/layouts/SimpleFooter.svelte.d.ts +3 -3
  17. package/dist/components/layouts/Well.svelte +46 -0
  18. package/dist/components/layouts/Well.svelte.d.ts +12 -0
  19. package/dist/components/menu/CollapsibleMenu.svelte +2 -2
  20. package/dist/components/menu/CollapsibleMenu.svelte.d.ts +3 -16
  21. package/dist/components/menu/DynamicMenu.svelte +25 -13
  22. package/dist/components/menu/DynamicMenu.svelte.d.ts +10 -28
  23. package/dist/components/menu/HamburgerMenu.svelte +29 -21
  24. package/dist/components/menu/HamburgerMenu.svelte.d.ts +11 -24
  25. package/dist/components/menu/ListMenu.svelte +53 -0
  26. package/dist/components/menu/ListMenu.svelte.d.ts +17 -0
  27. package/dist/components/menu/{Menu.d.ts → types.d.ts} +2 -0
  28. package/dist/components/menu/{Menu.js → types.js} +5 -0
  29. package/dist/components/presentation/Card.svelte +77 -92
  30. package/dist/components/presentation/Card.svelte.d.ts +10 -13
  31. package/dist/components/presentation/{Carusele.d.ts → Carousel.d.ts} +1 -1
  32. package/dist/components/presentation/Carousel.svelte +98 -1
  33. package/dist/components/presentation/Carousel.svelte.d.ts +14 -15
  34. package/dist/components/{agnostic/Disclose → presentation}/Disclose.svelte +2 -2
  35. package/dist/components/presentation/Drawer.svelte +131 -0
  36. package/dist/components/presentation/Drawer.svelte.d.ts +13 -0
  37. package/dist/components/presentation/Gallery.svelte +7 -7
  38. package/dist/components/presentation/Gallery.svelte.d.ts +3 -3
  39. package/dist/components/presentation/ImageCompare.svelte +39 -46
  40. package/dist/components/presentation/ImageCompare.svelte.d.ts +8 -26
  41. package/dist/components/presentation/Link.svelte +362 -0
  42. package/dist/components/presentation/Link.svelte.d.ts +27 -0
  43. package/dist/components/presentation/Logo.svelte +36 -0
  44. package/dist/components/presentation/Logo.svelte.d.ts +8 -0
  45. package/dist/components/presentation/ShowItem.d.ts +7 -7
  46. package/dist/components/presentation/ShowItem.js +1 -8
  47. package/dist/index-server.d.ts +0 -1
  48. package/dist/index-server.js +0 -3
  49. package/dist/index.d.ts +17 -22
  50. package/dist/index.js +40 -57
  51. package/dist/server-side/getServices.d.ts +1 -1
  52. package/dist/server-side/types.d.ts +1 -2
  53. package/dist/utils.d.ts +1 -0
  54. package/dist/utils.js +54 -0
  55. package/package.json +27 -24
  56. package/dist/components/CssHelper.d.ts +0 -1
  57. package/dist/components/CssHelper.js +0 -3
  58. package/dist/components/Link.svelte +0 -349
  59. package/dist/components/Link.svelte.d.ts +0 -48
  60. package/dist/components/Logo.svelte +0 -38
  61. package/dist/components/Logo.svelte.d.ts +0 -28
  62. package/dist/components/Spacer.svelte +0 -22
  63. package/dist/components/Spacer.svelte.d.ts +0 -6
  64. package/dist/components/Well.svelte +0 -40
  65. package/dist/components/Well.svelte.d.ts +0 -12
  66. package/dist/components/agnostic/Button/Button.svelte +0 -371
  67. package/dist/components/agnostic/Button/Button.svelte.d.ts +0 -52
  68. package/dist/components/agnostic/Button/ButtonGroup.svelte +0 -21
  69. package/dist/components/agnostic/Button/ButtonGroup.svelte.d.ts +0 -32
  70. package/dist/components/agnostic/Button/button-base.css +0 -12
  71. package/dist/components/agnostic/Button/button-core.css +0 -237
  72. package/dist/components/agnostic/Button/button-empty.css +0 -31
  73. package/dist/components/agnostic/Button/button-group.css +0 -8
  74. package/dist/components/agnostic/Close/Close.svelte +0 -124
  75. package/dist/components/agnostic/Close/Close.svelte.d.ts +0 -25
  76. package/dist/components/agnostic/Close/api.d.ts +0 -1
  77. package/dist/components/agnostic/Divider/Divider.svelte +0 -141
  78. package/dist/components/agnostic/Divider/Divider.svelte.d.ts +0 -24
  79. package/dist/components/agnostic/Divider/api.d.ts +0 -3
  80. package/dist/components/agnostic/Divider/api.js +0 -1
  81. package/dist/components/agnostic/Loader/Loader.svelte +0 -116
  82. package/dist/components/agnostic/Loader/Loader.svelte.d.ts +0 -22
  83. package/dist/components/agnostic/animation.css +0 -37
  84. package/dist/components/blog/BlogDescription.svelte +0 -9
  85. package/dist/components/blog/BlogDescription.svelte.d.ts +0 -23
  86. package/dist/components/blog/BlogPost.d.ts +0 -13
  87. package/dist/components/blog/BlogPost.js +0 -1
  88. package/dist/components/blog/BlogTitle.svelte +0 -19
  89. package/dist/components/blog/BlogTitle.svelte.d.ts +0 -23
  90. package/dist/components/blog/blog.d.ts +0 -8
  91. package/dist/components/blog/blog.js +0 -29
  92. package/dist/components/converters/ShowItemToNavigationItems.d.ts +0 -3
  93. package/dist/components/converters/ShowItemToNavigationItems.js +0 -10
  94. package/dist/components/form/DateTimePicker.svelte +0 -59
  95. package/dist/components/form/DateTimePicker.svelte.d.ts +0 -18
  96. package/dist/components/form/InputAddonItem.svelte +0 -42
  97. package/dist/components/form/InputAddonItem.svelte.d.ts +0 -31
  98. package/dist/components/form/InputTypes.d.ts +0 -9
  99. package/dist/components/form/InputTypes.js +0 -10
  100. package/dist/components/form/Select.svelte +0 -157
  101. package/dist/components/form/Select.svelte.d.ts +0 -34
  102. package/dist/components/form/Switch.svelte +0 -275
  103. package/dist/components/form/Switch.svelte.d.ts +0 -30
  104. package/dist/components/menu/Menu.svelte +0 -526
  105. package/dist/components/menu/Menu.svelte.d.ts +0 -33
  106. package/dist/components/menu/MenuItem.svelte +0 -121
  107. package/dist/components/menu/MenuItem.svelte.d.ts +0 -39
  108. package/dist/components/menu/NavigationItems.svelte +0 -44
  109. package/dist/components/menu/NavigationItems.svelte.d.ts +0 -32
  110. package/dist/components/menu/authentication.d.ts +0 -1
  111. package/dist/components/menu/authentication.js +0 -6
  112. package/dist/components/presentation/Carousel/carousel-content.svelte +0 -35
  113. package/dist/components/presentation/Carousel/carousel-content.svelte.d.ts +0 -28
  114. package/dist/components/presentation/Carousel/carousel-item.svelte +0 -25
  115. package/dist/components/presentation/Carousel/carousel-item.svelte.d.ts +0 -28
  116. package/dist/components/presentation/Carousel/carousel-next.svelte +0 -39
  117. package/dist/components/presentation/Carousel/carousel-next.svelte.d.ts +0 -18
  118. package/dist/components/presentation/Carousel/carousel-previous.svelte +0 -40
  119. package/dist/components/presentation/Carousel/carousel-previous.svelte.d.ts +0 -18
  120. package/dist/components/presentation/Carousel/carousel.svelte +0 -99
  121. package/dist/components/presentation/Carousel/carousel.svelte.d.ts +0 -31
  122. package/dist/components/presentation/Carousel/context.d.ts +0 -32
  123. package/dist/components/presentation/Carousel/context.js +0 -12
  124. package/dist/components/presentation/Carusele.js +0 -5
  125. /package/dist/components/{Markdown.svelte → content/Markdown.svelte} +0 -0
  126. /package/dist/components/{Markdown.svelte.d.ts → content/Markdown.svelte.d.ts} +0 -0
  127. /package/dist/components/{Banner.svelte.d.ts → layouts/Banner.svelte.d.ts} +0 -0
  128. /package/dist/components/{agnostic/Close/api.js → presentation/Carousel.js} +0 -0
  129. /package/dist/components/{agnostic/Disclose → presentation}/Disclose.svelte.d.ts +0 -0
@@ -1,237 +0,0 @@
1
- .btn {
2
- /* TODO test this fallback override syntax is correct */
3
- display: inline-flex;
4
- align-items: center;
5
- justify-content: center;
6
- white-space: nowrap;
7
- user-select: none;
8
- appearance: none;
9
- cursor: pointer;
10
- box-sizing: border-box;
11
- transition-property: all;
12
- transition-duration: var(--functional-timing-medium);
13
- }
14
-
15
- .btn-skin,
16
- .btn {
17
- color: var(--functional-btn-font-color, var(--functional-dark));
18
- background-color: var(--functional-btn-bgcolor, var(--functional-gray-light));
19
- border-color: var(--functional-btn-bgcolor, var(--functional-gray-light));
20
-
21
- /* seems like a reasonable default as chrome picks `outset` which results in a weird 3d effect */
22
- border-style: solid;
23
- border-width: var(--functional-btn-border-size, 1px);
24
- font-family: var(--functional-btn-font-family, var(--functional-font-family-body));
25
- font-weight: var(--functional-btn-font-weight, 400);
26
- font-size: var(--functional-btn-font-size, 1rem);
27
-
28
- /* this can be overriden, but it might mess with the balance of the button heights across variants */
29
- line-height: var(--functional-line-height, var(--fluid-20, 1.25rem));
30
- padding-block-start: var(--functional-vertical-pad, 0.5rem);
31
- padding-block-end: var(--functional-vertical-pad, 0.5rem);
32
- padding-inline-start: var(--functional-side-padding, 0.75rem);
33
- padding-inline-end: var(--functional-side-padding, 0.75rem);
34
- text-decoration: none;
35
- text-align: center;
36
- outline: none;
37
- }
38
-
39
- .btn:visited {
40
- color: var(--functional-btn-font-color, var(--functional-dark));
41
- }
42
-
43
- .btn:hover {
44
- opacity: 85%;
45
- text-decoration: none;
46
- }
47
-
48
- .btn:active {
49
- text-shadow: 0 1px 0 rgb(255 255 255 / 30%);
50
- text-decoration: none;
51
- transition-duration: 0s;
52
- box-shadow: inset 0 1px 3px rgb(0 0 0 / 20%);
53
- }
54
-
55
- .btn:focus {
56
- box-shadow: 0 0 0 var(--functional-focus-ring-outline-width) var(--functional-focus-ring-color);
57
-
58
- /* Needed for High Contrast mode */
59
- outline:
60
- var(--functional-focus-ring-outline-width) var(--functional-focus-ring-outline-style)
61
- var(--functional-focus-ring-outline-color);
62
- transition: box-shadow var(--functional-timing-fast) ease-out;
63
-
64
- /* In order for the focused element's box-shadow to appear above its siblings we need to
65
- establish a new stacking context: https://stackoverflow.com/a/28042700 */
66
- isolation: isolate;
67
- }
68
-
69
- /*
70
- * Disabled State
71
- *
72
- * The disabled state uses the class .disabled, is-disabled,
73
- * and the form attribute disabled="disabled".
74
- * The use of !important is only added because this is a state
75
- * that must be applied to all buttons when in a disabled state.
76
- */
77
- .btn.disabled,
78
- .btn:disabled {
79
- top: 0 !important;
80
- background: var(--functional-btn-disabled-bg, var(--functional-gray-mid-dark)) !important;
81
- text-shadow: 0 1px 1px rgb(255 255 255 / 100%) !important;
82
-
83
- /* primary, secondary, natural, all look same when disabled; and we don't want to
84
- have an inadvertant looking blue primary border when disabled so it's transparent */
85
- border-color: transparent;
86
- color: var(--functional-btn-disabled-color, var(--functional-gray-dark)) !important;
87
- cursor: default !important;
88
- appearance: none !important;
89
- box-shadow: none !important;
90
- opacity: 80% !important;
91
- }
92
-
93
- .btn-primary {
94
- background-color: var(--functional-btn-primary, var(--functional-primary));
95
- border-color: var(--functional-btn-primary, var(--functional-primary));
96
- color: var(--functional-btn-primary-color, var(--functional-light));
97
- }
98
-
99
- /* Border and font is primary. When hovered, we invert with primary background and white font */
100
- .btn-primary.btn-bordered {
101
- color: var(--functional-btn-primary, var(--functional-primary));
102
- }
103
-
104
- .btn-primary.btn-bordered:hover,
105
- .btn-primary.btn-bordered:focus {
106
- background-color: var(--functional-btn-primary, var(--functional-primary));
107
- color: var(--functional-btn-primary-color, var(--functional-light));
108
- }
109
-
110
- .btn-primary:visited {
111
- color: var(--functional-btn-primary-color, var(--functional-light));
112
- }
113
-
114
- .btn-secondary {
115
- background-color: var(--functional-btn-secondary, var(--functional-secondary));
116
- border-color: var(--functional-btn-secondary, var(--functional-secondary));
117
- color: var(--functional-btn-secondary-color, var(--functional-light));
118
- }
119
-
120
- /* Border and font is secondary. When hovered, we invert with secondary background and white font */
121
- .btn-secondary.btn-bordered {
122
- color: var(--functional-btn-secondary, var(--functional-secondary));
123
- }
124
-
125
- .btn-secondary.btn-bordered:hover,
126
- .btn-secondary.btn-bordered:focus {
127
- background-color: var(--functional-btn-secondary, var(--functional-secondary));
128
- color: var(--functional-btn-secondary-color, var(--functional-light));
129
- }
130
-
131
- .btn-secondary:visited {
132
- color: var(--functional-btn-secondary-color, var(--functional-light));
133
- }
134
-
135
- /*
136
- /**
137
- * Border Buttons
138
- */
139
- .btn-bordered {
140
- border-width: 1px;
141
- background: transparent;
142
- }
143
-
144
- /**
145
- * Sizes
146
- */
147
- .btn-large {
148
- font-size: calc(var(--functional-btn-font-size, 1rem) + 0.25rem);
149
- height: 3rem;
150
- line-height: 3rem;
151
- padding: 0 3rem;
152
- }
153
-
154
- .btn-small {
155
- font-size: calc(var(--functional-btn-font-size, 1rem) - 0.25rem);
156
- height: 2rem;
157
- line-height: 2rem;
158
- padding: 0 2rem;
159
- }
160
-
161
- /**
162
- * Rounded
163
- */
164
- .btn-rounded {
165
- border-radius: var(--functional-btn-radius, var(--functional-radius, 0.25rem));
166
- }
167
-
168
- .btn-pill {
169
- border-radius: 200px;
170
- }
171
-
172
- /*
173
- * Size Adjustment for equal height & width buttons
174
- *
175
- * Remove padding
176
- */
177
- .btn-circle {
178
- border-radius: 100%;
179
- width: 2.5rem;
180
- height: 2.5rem;
181
- padding: 0 !important;
182
- }
183
-
184
- .btn-circle-large {
185
- font-size: calc(var(--functional-btn-font-size, 1rem) + 0.25rem);
186
- width: 3rem;
187
- height: 3rem;
188
- }
189
-
190
- .btn-circle-small {
191
- font-size: calc(var(--functional-btn-font-size, 1rem) - 0.25rem);
192
- width: 2rem;
193
- height: 2rem;
194
- }
195
-
196
- /**
197
- * Button Block (stacked)
198
- */
199
- .btn-block {
200
- width: 100%;
201
- }
202
-
203
- /* This is a utility class used if you literally want to stack block buttons one after another.
204
- Apply this class to the nth-of-type(2) onwards to ensure the borders line up properly. */
205
- .btn-block-following {
206
- margin-block-start: -1px;
207
- }
208
-
209
- .btn-grouped {
210
- border-radius: var(--functional-btn-radius, var(--functional-radius, 0.25rem));
211
- }
212
-
213
- .btn-grouped:not(:last-child) {
214
- border-top-right-radius: 0;
215
- border-bottom-right-radius: 0;
216
- margin-inline-end: -1px;
217
- }
218
-
219
- .btn-grouped:not(:first-child) {
220
- border-top-left-radius: 0;
221
- border-bottom-left-radius: 0;
222
- }
223
-
224
- .btn-capsule {
225
- --padding-side: calc(var(--functional-side-padding, 0.75rem) * 1.5);
226
-
227
- border-radius: var(--functional-radius-capsule);
228
- padding-inline-start: var(--padding-side);
229
- padding-inline-end: var(--padding-side);
230
- }
231
-
232
- @media (prefers-reduced-motion), (update: slow) {
233
- .btn,
234
- .btn:focus {
235
- transition-duration: 0.001ms !important;
236
- }
237
- }
@@ -1,31 +0,0 @@
1
- /**
2
- * Invisible buttons. Generally used for a Cancel or icon button that behaves like a button,
3
- * semantically and for a11y, but, does so without all the typical "button chrome" behind it.
4
- */
5
- :is(.btn-link, .btn-blank) {
6
- font-family: var(--functional-btn-font-family, var(--functional-font-family-body));
7
- font-size: var(--functional-btn-font-size, 1rem);
8
- background-color: transparent;
9
- border: 0;
10
- border-radius: 0;
11
- box-shadow: none;
12
- transition: none;
13
- }
14
-
15
- /* Since blank buttons can be used for things like input addons we don't want to go crazy
16
- on the side padding. As such, these have a good bit less then regular buttons. */
17
- .btn-blank {
18
- --functional-btn-blank-side-padding: var(--btn-blank-side-padding, 0.25rem);
19
-
20
- padding-inline-start: var(--functional-btn-blank-side-padding);
21
- padding-inline-end: var(--functional-btn-blank-side-padding);
22
- }
23
-
24
- /* A button blank with link color text */
25
- .btn-link {
26
- color: var(--functional-btn-primary, var(--functional-primary));
27
- }
28
-
29
- .btn-link:hover {
30
- cursor: pointer;
31
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Button Groups. See also button-core.css which has btn-grouped which needs to be
3
- * applied to the buttons that are projected within a button group.
4
- */
5
- .btn-group {
6
- display: inline-flex;
7
- flex-direction: row;
8
- }
@@ -1,124 +0,0 @@
1
- <style>
2
- .close-button {
3
- display: inline-flex;
4
- align-items: center;
5
- justify-content: center;
6
- background-color: transparent;
7
- border: 0;
8
- border-radius: 0;
9
- box-shadow: none;
10
- width: var(--fluid-24);
11
- height: var(--fluid-24);
12
- }
13
-
14
- .close-button:hover,
15
- .close-button:active,
16
- .close-button:focus {
17
- background: none;
18
-
19
- /* Needed for High Contrast mode */
20
- outline:
21
- var(--functional-focus-ring-outline-width) var(--functional-focus-ring-outline-style)
22
- var(--functional-focus-ring-outline-color);
23
- }
24
-
25
- .close-button:focus {
26
- box-shadow: 0 0 0 3px var(--functional-focus-ring-color);
27
- transition: box-shadow var(--functional-timing-fast) ease-out;
28
- }
29
-
30
- .close {
31
- width: var(--fluid-12);
32
- height: var(--fluid-12);
33
- display: inline-block;
34
- vertical-align: middle;
35
- line-height: 1em;
36
- flex-shrink: 0;
37
- color: currentColor;
38
- }
39
-
40
- .close-button .close {
41
- opacity: 80%;
42
- transition: opacity var(--functional-timing-medium);
43
- }
44
-
45
- @media (prefers-reduced-motion), (update: slow) {
46
- .close-button:focus,
47
- .close-button .close {
48
- transition-duration: 0.001ms !important;
49
- }
50
- }
51
-
52
- .close-button-small {
53
- width: var(--fluid-18);
54
- height: var(--fluid-18);
55
- }
56
-
57
- .close-button-large {
58
- width: var(--fluid-32);
59
- height: var(--fluid-32);
60
- }
61
-
62
- .close-button-xlarge {
63
- width: var(--fluid-40);
64
- height: var(--fluid-40);
65
- }
66
-
67
- .close-button-small > .close {
68
- width: 0.5625rem;
69
- height: 0.5625rem;
70
- }
71
-
72
- .close-button-large > .close {
73
- width: var(--fluid-16);
74
- height: var(--fluid-16);
75
- }
76
-
77
- .close-button-xlarge > .close {
78
- width: var(--fluid-20);
79
- height: var(--fluid-20);
80
- }
81
-
82
- .close-button:hover .close {
83
- opacity: 100%;
84
- }
85
-
86
- </style>
87
-
88
- <script lang="ts">
89
- import type { CloseSizes } from './api';
90
- export let size: CloseSizes = "";
91
- export let isFaux = false;
92
- export let color = "inherit";
93
- const closeButtonClasses = [
94
- "close-button",
95
- size ? `close-button-${size}` : "",
96
- ]
97
- .filter((c) => c)
98
- .join(" ");
99
- </script>
100
-
101
- {#if isFaux}
102
- <div class={closeButtonClasses}>
103
- <svg class="close" viewBox="0 0 24 24" aria-hidden="true">
104
- <path
105
- fill="currentColor"
106
- d="M.439 21.44a1.5 1.5 0 0 0 2.122 2.121l9.262-9.261a.25.25 0 0 1 .354 0l9.262 9.263a1.5 1.5 0 1 0 2.122-2.121L14.3 12.177a.25.25 0 0 1 0-.354l9.263-9.262A1.5 1.5 0 0 0 21.439.44L12.177 9.7a.25.25 0 0 1-.354 0L2.561.44A1.5 1.5 0 0 0 .439 2.561L9.7 11.823a.25.25 0 0 1 0 .354Z"
107
- ></path>
108
- </svg>
109
- </div>
110
- {:else}
111
- <button on:click class={closeButtonClasses} aria-label="Close">
112
- <svg
113
- class="close"
114
- style:color={color}
115
- viewBox="0 0 24 24"
116
- aria-hidden="true"
117
- >
118
- <path
119
- fill="currentColor"
120
- d="M.439 21.44a1.5 1.5 0 0 0 2.122 2.121l9.262-9.261a.25.25 0 0 1 .354 0l9.262 9.263a1.5 1.5 0 1 0 2.122-2.121L14.3 12.177a.25.25 0 0 1 0-.354l9.263-9.262A1.5 1.5 0 0 0 21.439.44L12.177 9.7a.25.25 0 0 1-.354 0L2.561.44A1.5 1.5 0 0 0 .439 2.561L9.7 11.823a.25.25 0 0 1 0 .354Z"
121
- ></path>
122
- </svg>
123
- </button>
124
- {/if}
@@ -1,25 +0,0 @@
1
- import type { CloseSizes } from './api';
2
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
3
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
- $$bindings?: Bindings;
5
- } & Exports;
6
- (internal: unknown, props: Props & {
7
- $$events?: Events;
8
- $$slots?: Slots;
9
- }): Exports & {
10
- $set?: any;
11
- $on?: any;
12
- };
13
- z_$$bindings?: Bindings;
14
- }
15
- declare const Close: $$__sveltets_2_IsomorphicComponent<{
16
- size?: CloseSizes;
17
- isFaux?: boolean;
18
- color?: string;
19
- }, {
20
- click: MouseEvent;
21
- } & {
22
- [evt: string]: CustomEvent<any>;
23
- }, {}, {}, string>;
24
- type Close = InstanceType<typeof Close>;
25
- export default Close;
@@ -1 +0,0 @@
1
- export type CloseSizes = 'small' | 'large' | 'xlarge' | '';
@@ -1,141 +0,0 @@
1
- <script lang="ts">
2
- import type { DividerJustify, DividerTypes, DividerSizes } from './api';
3
-
4
- export let isVertical = false;
5
-
6
- // start, end (centered by default)
7
- export let justify: DividerJustify = '';
8
- // info, success, error, warning
9
- export let type: DividerTypes = '';
10
- // small (default is medium) large xlarge
11
- export let size: DividerSizes = '';
12
-
13
- const dividerClasses: string = [
14
- 'divider',
15
- isVertical ? 'divider-vertical' : '',
16
- justify ? `divider-justify-${justify}` : '',
17
- size ? `divider-${size}` : '',
18
- type ? `divider-${type}` : ''
19
- ]
20
- .filter((cl) => cl.length)
21
- .join(' ');
22
- </script>
23
-
24
- <div class={dividerClasses}></div>
25
-
26
- <style>
27
- .divider {
28
- display: flex;
29
- justify-content: center;
30
- align-items: center;
31
- white-space: nowrap;
32
- width: 100%;
33
- }
34
-
35
- .divider::before,
36
- .divider::after {
37
- content: '';
38
- background-color: var(--functional-gray-mid);
39
- height: var(--fluid-2);
40
- flex-grow: 1;
41
- }
42
-
43
- .divider-small::before,
44
- .divider-small::after {
45
- height: 1px;
46
- }
47
-
48
- .divider-large::before,
49
- .divider-large::after {
50
- height: var(--fluid-4);
51
- }
52
-
53
- .divider-xlarge::before,
54
- .divider-xlarge::after {
55
- height: var(--fluid-6);
56
- }
57
-
58
- .divider-justify-end::after,
59
- .divider-justify-start::before {
60
- flex-grow: 0;
61
- flex-basis: 3%;
62
- }
63
-
64
- .divider-content {
65
- padding-inline-start: var(--fluid-16);
66
- padding-inline-end: var(--fluid-16);
67
- }
68
-
69
- .divider-vertical {
70
- height: auto;
71
- margin: 0 var(--fluid-16);
72
- width: var(--fluid-16);
73
- flex-direction: column;
74
- align-self: stretch;
75
- }
76
-
77
- .divider-vertical::before,
78
- .divider-vertical::after {
79
- width: var(--fluid-2);
80
- }
81
-
82
- .divider-vertical.divider-small::before,
83
- .divider-vertical.divider-small::after {
84
- width: 1px;
85
- }
86
-
87
- .divider-vertical.divider-large::before,
88
- .divider-vertical.divider-large::after {
89
- width: var(--fluid-4);
90
- }
91
-
92
- .divider-vertical.divider-xlarge::before,
93
- .divider-vertical.divider-xlarge::after {
94
- width: var(--fluid-6);
95
- }
96
-
97
- .divider-vertical .divider-content {
98
- padding-inline-start: var(--fluid-24);
99
- padding-inline-end: var(--fluid-24);
100
-
101
- /* Since we're vertical we need space from line above/below */
102
- padding-block-start: var(--fluid-6);
103
- padding-block-end: var(--fluid-6);
104
- }
105
-
106
- .divider-warning::before,
107
- .divider-warning::after {
108
- background-color: var(--functional-warning-border);
109
- }
110
-
111
- .divider-warning .divider-content {
112
- color: var(--functional-warning-border);
113
- }
114
-
115
- .divider-error::before,
116
- .divider-error::after {
117
- background-color: var(--functional-error);
118
- }
119
-
120
- .divider-error .divider-content {
121
- color: var(--functional-error);
122
- }
123
-
124
- .divider-success::before,
125
- .divider-success::after {
126
- background-color: var(--functional-action);
127
- }
128
-
129
- .divider-success .divider-content {
130
- color: var(--functional-action);
131
- }
132
-
133
- .divider-info::before,
134
- .divider-info::after {
135
- background-color: var(--functional-primary);
136
- }
137
-
138
- .divider-info .divider-content {
139
- color: var(--functional-primary);
140
- }
141
- </style>
@@ -1,24 +0,0 @@
1
- import type { DividerJustify, DividerTypes, DividerSizes } from './api';
2
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
3
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
- $$bindings?: Bindings;
5
- } & Exports;
6
- (internal: unknown, props: Props & {
7
- $$events?: Events;
8
- $$slots?: Slots;
9
- }): Exports & {
10
- $set?: any;
11
- $on?: any;
12
- };
13
- z_$$bindings?: Bindings;
14
- }
15
- declare const Divider: $$__sveltets_2_IsomorphicComponent<{
16
- isVertical?: boolean;
17
- justify?: DividerJustify;
18
- type?: DividerTypes;
19
- size?: DividerSizes;
20
- }, {
21
- [evt: string]: CustomEvent<any>;
22
- }, {}, {}, string>;
23
- type Divider = InstanceType<typeof Divider>;
24
- export default Divider;
@@ -1,3 +0,0 @@
1
- export type DividerSizes = 'small' | 'large' | 'xlarge' | '';
2
- export type DividerJustify = 'start' | 'end' | '';
3
- export type DividerTypes = 'success' | 'info' | 'error' | 'warning' | '';
@@ -1 +0,0 @@
1
- export {};