@juspay/svelte-ui-components 2.80.1 → 2.80.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Badge/Badge.svelte +1 -1
- package/dist/Banner/Banner.svelte +1 -1
- package/dist/Book/Book.svelte +1 -1
- package/dist/Browser/Browser.svelte +3 -3
- package/dist/Button/Button.svelte +150 -34
- package/dist/Button/properties.d.ts +40 -1
- package/dist/Calendar/Calendar.svelte +2 -2
- package/dist/Card/Card.svelte +1 -1
- package/dist/Checkbox/Checkbox.svelte +1 -1
- package/dist/Choicebox/Choicebox.svelte +1 -1
- package/dist/ColorPicker/ColorPicker.svelte +8 -5
- package/dist/Combobox/Combobox.svelte +2 -2
- package/dist/CommandMenu/CommandMenu.svelte +3 -3
- package/dist/ContextMenu/ContextMenu.svelte +1 -1
- package/dist/DateRangePicker/DateRangePicker.svelte +9 -9
- package/dist/DualAxisBarChart/DualAxisBarChart.svelte +60 -8
- package/dist/DualAxisBarChart/properties.d.ts +26 -0
- package/dist/FileInput/FileInput.svelte +1 -1
- package/dist/GridItem/GridItem.svelte +2 -2
- package/dist/Input/Input.svelte +5 -5
- package/dist/InputButton/InputButton.svelte +6 -3
- package/dist/KeyValue/KeyValue.svelte +129 -0
- package/dist/KeyValue/KeyValue.svelte.d.ts +4 -0
- package/dist/KeyValue/properties.d.ts +52 -0
- package/dist/KeyValue/properties.js +1 -0
- package/dist/KeyboardInput/KeyboardInput.svelte +1 -1
- package/dist/Menu/Menu.svelte +1 -1
- package/dist/Modal/Modal.svelte +3 -3
- package/dist/Pagination/Pagination.svelte +1 -1
- package/dist/PieChart/PieChart.svelte +1 -1
- package/dist/Progress/Progress.svelte +2 -2
- package/dist/ProportionBar/ProportionBar.svelte +2 -2
- package/dist/SankeyChart/SankeyChart.svelte +27 -3
- package/dist/SankeyChart/properties.d.ts +1 -0
- package/dist/Select/Select.svelte +3 -3
- package/dist/Sheet/Sheet.svelte +1 -1
- package/dist/Shimmer/Shimmer.svelte +1 -1
- package/dist/Slider/Slider.svelte +2 -2
- package/dist/Snippet/Snippet.svelte +2 -2
- package/dist/SplitButton/SplitButton.svelte +8 -2
- package/dist/StatCard/StatCard.svelte +4 -4
- package/dist/Table/Table.svelte +4 -4
- package/dist/ThemeSwitcher/ThemeSwitcher.svelte +4 -4
- package/dist/Toast/Toast.svelte +1 -1
- package/dist/Tooltip/Tooltip.svelte +2 -2
- package/dist/Tooltip/tooltip-action.js +1 -1
- package/dist/_chart/ChartContainer.svelte +5 -2
- package/dist/_chart/ChartTooltip.svelte +1 -1
- package/dist/_chart/geometry.js +6 -2
- package/dist/_chart/types.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/dist/Badge/Badge.svelte
CHANGED
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.icon-img {
|
|
90
|
-
border-radius: var(--badge-img-border-radius,
|
|
90
|
+
border-radius: var(--badge-img-border-radius, var(--radius, 4px));
|
|
91
91
|
width: var(--badge-img-width, 64px);
|
|
92
92
|
height: var(--badge-img-height, 64px);
|
|
93
93
|
object-fit: var(--badge-object-fit, contain);
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
--button-color: transparent;
|
|
170
170
|
--button-border: none;
|
|
171
171
|
--button-padding: 2px;
|
|
172
|
-
--button-border-radius: var(--banner-dismiss-border-radius, 4px);
|
|
172
|
+
--button-border-radius: var(--banner-dismiss-border-radius, var(--radius, 4px));
|
|
173
173
|
--button-text-color: var(--banner-dismiss-color, currentColor);
|
|
174
174
|
--button-hover-color: var(--banner-dismiss-hover-background, rgba(0, 0, 0, 0.1));
|
|
175
175
|
--cursor: inherit;
|
package/dist/Book/Book.svelte
CHANGED
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
.book {
|
|
180
180
|
width: var(--book-width, 100%);
|
|
181
181
|
background-color: var(--book-background, #ffffff);
|
|
182
|
-
border-radius: var(--book-border-radius,
|
|
182
|
+
border-radius: var(--book-border-radius, var(--radius, 4px));
|
|
183
183
|
border: var(--book-border, 1px solid #e0e0e0);
|
|
184
184
|
outline: none;
|
|
185
185
|
}
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.browser.rounded {
|
|
68
|
-
border-radius: var(--browser-border-radius,
|
|
68
|
+
border-radius: var(--browser-border-radius, var(--radius, 4px));
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.browser.shadow {
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
|
|
149
149
|
.tab {
|
|
150
150
|
padding: var(--browser-tab-padding, 6px 16px);
|
|
151
|
-
border-radius: var(--browser-tab-border-radius,
|
|
151
|
+
border-radius: var(--browser-tab-border-radius, var(--radius, 4px) var(--radius, 4px) 0 0);
|
|
152
152
|
font-size: var(--browser-tab-font-size, 13px);
|
|
153
153
|
font-family: var(--browser-tab-font-family, inherit);
|
|
154
154
|
white-space: nowrap;
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
gap: 8px;
|
|
168
168
|
padding: 0 12px;
|
|
169
169
|
height: var(--browser-addressbar-height, 32px);
|
|
170
|
-
border-radius: var(--browser-addressbar-border-radius,
|
|
170
|
+
border-radius: var(--browser-addressbar-border-radius, var(--radius, 4px));
|
|
171
171
|
font-size: var(--browser-addressbar-font-size, 13px);
|
|
172
172
|
font-family: var(--browser-addressbar-font-family, inherit);
|
|
173
173
|
}
|
|
@@ -4,10 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
let {
|
|
6
6
|
text,
|
|
7
|
+
variant = 'primary',
|
|
8
|
+
size = 'md',
|
|
9
|
+
iconOnly = false,
|
|
10
|
+
fullWidth = false,
|
|
11
|
+
href,
|
|
12
|
+
target,
|
|
13
|
+
rel,
|
|
14
|
+
loading = false,
|
|
15
|
+
allowHtml = false,
|
|
7
16
|
enable = true,
|
|
8
17
|
disabled = false,
|
|
9
18
|
showLoader = false,
|
|
10
19
|
loaderType,
|
|
20
|
+
showProgressBar = $bindable(false),
|
|
11
21
|
type = 'button',
|
|
12
22
|
testId,
|
|
13
23
|
ariaLabel,
|
|
@@ -22,30 +32,46 @@
|
|
|
22
32
|
onmouseleave,
|
|
23
33
|
ontouchstart,
|
|
24
34
|
ontouchend,
|
|
25
|
-
showProgressBar = $bindable(false),
|
|
26
35
|
icon,
|
|
27
36
|
children,
|
|
28
37
|
classes
|
|
29
38
|
}: ButtonProperties = $props();
|
|
30
39
|
|
|
31
|
-
|
|
40
|
+
// `loading` and the legacy Circular loaderType both render the spinner and disable the button.
|
|
41
|
+
let showCircularLoader = $derived(loading || (showLoader && loaderType === 'Circular'));
|
|
42
|
+
// The legacy ProgressBar loader stays clickable until the first click starts the bar, then
|
|
43
|
+
// it disables (the documented flow). So it must NOT count toward "disabled" before it starts.
|
|
44
|
+
let isProgressBarLoader = $derived(showLoader && loaderType === 'ProgressBar');
|
|
45
|
+
let isBusy = $derived(showCircularLoader || showProgressBar);
|
|
46
|
+
let isDisabled = $derived(disabled || !enable || showCircularLoader || showProgressBar);
|
|
47
|
+
let resolvedRel = $derived(rel ?? (target === '_blank' ? 'noopener noreferrer' : null));
|
|
32
48
|
|
|
33
49
|
function handleButtonClick(event: MouseEvent): void {
|
|
34
|
-
if (
|
|
50
|
+
if (isDisabled) {
|
|
51
|
+
// Anchors have no native disabled state — block navigation/handler explicitly.
|
|
52
|
+
if (href) {
|
|
53
|
+
event.preventDefault();
|
|
54
|
+
}
|
|
35
55
|
return;
|
|
36
56
|
}
|
|
37
57
|
onclick?.(event);
|
|
38
|
-
if (
|
|
58
|
+
if (isProgressBarLoader) {
|
|
39
59
|
showProgressBar = true;
|
|
40
60
|
}
|
|
41
61
|
}
|
|
42
62
|
</script>
|
|
43
63
|
|
|
44
|
-
<div
|
|
64
|
+
<div
|
|
65
|
+
class="button-container variant-{variant} size-{size} {classes ?? ''}"
|
|
66
|
+
class:icon-only={iconOnly}
|
|
67
|
+
class:full-width={fullWidth}
|
|
68
|
+
>
|
|
45
69
|
{#if showProgressBar}
|
|
46
70
|
<div class="button-progress-bar"></div>
|
|
47
71
|
{/if}
|
|
48
|
-
<
|
|
72
|
+
<svelte:element
|
|
73
|
+
this={href ? 'a' : 'button'}
|
|
74
|
+
class="button-el"
|
|
49
75
|
class:disabled={isDisabled}
|
|
50
76
|
onclick={handleButtonClick}
|
|
51
77
|
{onkeydown}
|
|
@@ -55,28 +81,38 @@
|
|
|
55
81
|
{onmouseleave}
|
|
56
82
|
{ontouchstart}
|
|
57
83
|
{ontouchend}
|
|
58
|
-
disabled={isDisabled}
|
|
59
|
-
{type}
|
|
60
84
|
data-pw={testId}
|
|
61
|
-
|
|
62
|
-
aria-
|
|
63
|
-
aria-
|
|
64
|
-
{
|
|
85
|
+
role={role ?? null}
|
|
86
|
+
aria-label={ariaLabel ?? null}
|
|
87
|
+
aria-expanded={ariaExpanded ?? null}
|
|
88
|
+
aria-selected={ariaSelected ?? null}
|
|
89
|
+
aria-busy={isBusy || null}
|
|
90
|
+
type={href ? null : type}
|
|
91
|
+
disabled={href ? null : isDisabled}
|
|
92
|
+
href={href ? (isDisabled ? null : href) : null}
|
|
93
|
+
target={href ? target : null}
|
|
94
|
+
rel={href ? resolvedRel : null}
|
|
95
|
+
aria-disabled={href && isDisabled ? 'true' : null}
|
|
96
|
+
tabindex={href && isDisabled ? -1 : null}
|
|
65
97
|
>
|
|
66
|
-
{#if
|
|
98
|
+
{#if showCircularLoader}
|
|
67
99
|
<div class="button-loader"><Loader /></div>
|
|
68
100
|
{/if}
|
|
69
101
|
{#if typeof icon === 'function'}
|
|
70
102
|
<div class="button-icon">{@render icon()}</div>
|
|
71
103
|
{/if}
|
|
72
104
|
{#if typeof text === 'string' && text.length > 0}
|
|
73
|
-
|
|
74
|
-
|
|
105
|
+
{#if allowHtml}
|
|
106
|
+
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
|
107
|
+
<div class="button-text">{@html text}</div>
|
|
108
|
+
{:else}
|
|
109
|
+
<div class="button-text">{text}</div>
|
|
110
|
+
{/if}
|
|
75
111
|
{/if}
|
|
76
112
|
{#if typeof children === 'function'}
|
|
77
113
|
{@render children()}
|
|
78
114
|
{/if}
|
|
79
|
-
</
|
|
115
|
+
</svelte:element>
|
|
80
116
|
</div>
|
|
81
117
|
|
|
82
118
|
<style>
|
|
@@ -84,23 +120,92 @@
|
|
|
84
120
|
position: relative;
|
|
85
121
|
width: var(--button-width, fit-content);
|
|
86
122
|
}
|
|
87
|
-
|
|
123
|
+
|
|
124
|
+
/* ---- Variant defaults (set the internal --_btn-* layer; explicit --button-* always wins) ---- */
|
|
125
|
+
.variant-primary {
|
|
126
|
+
--_btn-color: #3a4550;
|
|
127
|
+
--_btn-text-color: #ffffff;
|
|
128
|
+
--_btn-border: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.variant-secondary {
|
|
132
|
+
--_btn-color: transparent;
|
|
133
|
+
--_btn-text-color: #3a4550;
|
|
134
|
+
--_btn-border: 1px solid #cbd5e1;
|
|
135
|
+
--_btn-hover-color: #f1f5f9;
|
|
136
|
+
--_btn-hover-text-color: #3a4550;
|
|
137
|
+
--_btn-hover-border: 1px solid #cbd5e1;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.variant-ghost {
|
|
141
|
+
--_btn-color: transparent;
|
|
142
|
+
--_btn-text-color: #3a4550;
|
|
143
|
+
--_btn-border: none;
|
|
144
|
+
--_btn-hover-color: #f1f5f9;
|
|
145
|
+
--_btn-hover-text-color: #3a4550;
|
|
146
|
+
--_btn-hover-border: none;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.variant-destructive {
|
|
150
|
+
--_btn-color: #e7000b;
|
|
151
|
+
--_btn-text-color: #ffffff;
|
|
152
|
+
--_btn-border: none;
|
|
153
|
+
--_btn-hover-color: #c10007;
|
|
154
|
+
--_btn-hover-text-color: #ffffff;
|
|
155
|
+
--_btn-hover-border: none;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* ---- Size defaults (md reproduces the legacy 16px padding / 14px font) ---- */
|
|
159
|
+
.size-sm {
|
|
160
|
+
--_btn-padding: 8px 12px;
|
|
161
|
+
--_btn-font-size: 13px;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.size-md {
|
|
165
|
+
--_btn-padding: 16px;
|
|
166
|
+
--_btn-font-size: 14px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.size-lg {
|
|
170
|
+
--_btn-padding: 20px 28px;
|
|
171
|
+
--_btn-font-size: 16px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.icon-only {
|
|
175
|
+
--_btn-padding: 8px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.icon-only.size-sm {
|
|
179
|
+
--_btn-padding: 6px;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.icon-only.size-lg {
|
|
183
|
+
--_btn-padding: 12px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.full-width {
|
|
187
|
+
--button-width: 100%;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.button-el {
|
|
88
191
|
max-height: var(--button-max-height);
|
|
89
192
|
max-width: var(--button-max-width);
|
|
90
193
|
min-width: var(--button-min-width);
|
|
91
194
|
font-family: var(--button-font-family);
|
|
92
195
|
font-weight: var(--button-font-weight, 500);
|
|
93
|
-
font-size: var(--button-font-size, 14px);
|
|
94
|
-
background-color: var(--button-color, #3a4550);
|
|
95
|
-
color: var(--button-text-color, white);
|
|
196
|
+
font-size: var(--button-font-size, var(--_btn-font-size, 14px));
|
|
197
|
+
background-color: var(--button-color, var(--_btn-color, #3a4550));
|
|
198
|
+
color: var(--button-text-color, var(--_btn-text-color, white));
|
|
96
199
|
height: var(--button-height, fit-content);
|
|
97
|
-
padding: var(--button-padding, 16px);
|
|
200
|
+
padding: var(--button-padding, var(--_btn-padding, 16px));
|
|
98
201
|
margin: var(--button-margin);
|
|
99
|
-
border-radius: var(--button-border-radius,
|
|
202
|
+
border-radius: var(--button-border-radius, var(--radius, 6px));
|
|
100
203
|
width: var(--button-width, fit-content);
|
|
101
204
|
cursor: var(--cursor, pointer);
|
|
102
205
|
opacity: var(--opacity, 1);
|
|
103
|
-
border: var(--button-border, none);
|
|
206
|
+
border: var(--button-border, var(--_btn-border, none));
|
|
207
|
+
box-sizing: border-box;
|
|
208
|
+
text-decoration: none;
|
|
104
209
|
display: flex;
|
|
105
210
|
justify-content: var(--button-justify-content, center);
|
|
106
211
|
align-items: center;
|
|
@@ -110,14 +215,16 @@
|
|
|
110
215
|
box-shadow: var(--button-box-shadow, none);
|
|
111
216
|
}
|
|
112
217
|
|
|
113
|
-
.disabled
|
|
218
|
+
.button-el.disabled,
|
|
219
|
+
.button-el:disabled {
|
|
114
220
|
cursor: var(--disabled-cursor, not-allowed);
|
|
115
221
|
opacity: var(--disabled-opacity, 0.4);
|
|
116
|
-
color: var(--disabled-text-color, var(--button-text-color, white));
|
|
222
|
+
color: var(--disabled-text-color, var(--button-text-color, var(--_btn-text-color, white)));
|
|
117
223
|
font-size: var(--disabled-font-size);
|
|
118
224
|
font-weight: var(--disabled-font-weight);
|
|
119
|
-
border
|
|
120
|
-
|
|
225
|
+
/* Preserve the variant border when disabled so secondary (bordered) stays distinct from ghost. */
|
|
226
|
+
border: var(--disabled-border, var(--button-border, var(--_btn-border, none)));
|
|
227
|
+
background: var(--disabled-background-color, var(--button-color, var(--_btn-color, #3a4550)));
|
|
121
228
|
box-shadow: var(
|
|
122
229
|
--button-disabled-box-shadow,
|
|
123
230
|
var(--disabled-box-shadow, var(--button-box-shadow, none))
|
|
@@ -138,21 +245,30 @@
|
|
|
138
245
|
display: var(--button-text-display);
|
|
139
246
|
}
|
|
140
247
|
|
|
141
|
-
button:hover {
|
|
142
|
-
background: var(
|
|
143
|
-
|
|
144
|
-
|
|
248
|
+
.button-el:hover:not(.disabled) {
|
|
249
|
+
background: var(
|
|
250
|
+
--button-hover-color,
|
|
251
|
+
var(--_btn-hover-color, var(--button-color, var(--_btn-color, #3a4550)))
|
|
252
|
+
);
|
|
253
|
+
color: var(
|
|
254
|
+
--button-hover-text-color,
|
|
255
|
+
var(--_btn-hover-text-color, var(--button-text-color, var(--_btn-text-color, white)))
|
|
256
|
+
);
|
|
257
|
+
border: var(
|
|
258
|
+
--button-hover-border,
|
|
259
|
+
var(--_btn-hover-border, var(--button-border, var(--_btn-border, none)))
|
|
260
|
+
);
|
|
145
261
|
transform: var(--button-hover-transform);
|
|
146
262
|
box-shadow: var(--button-hover-box-shadow, var(--button-box-shadow, none));
|
|
147
263
|
}
|
|
148
264
|
|
|
149
|
-
button:active {
|
|
265
|
+
.button-el:active:not(.disabled) {
|
|
150
266
|
transform: var(--button-active-transform);
|
|
151
|
-
background: var(--button-active-background, var(--button-color, #3a4550));
|
|
267
|
+
background: var(--button-active-background, var(--button-color, var(--_btn-color, #3a4550)));
|
|
152
268
|
box-shadow: var(--button-active-box-shadow, var(--button-box-shadow, none));
|
|
153
269
|
}
|
|
154
270
|
|
|
155
|
-
button:focus-visible {
|
|
271
|
+
.button-el:focus-visible {
|
|
156
272
|
box-shadow: var(--button-focus-visible-box-shadow, var(--button-box-shadow, none));
|
|
157
273
|
}
|
|
158
274
|
|
|
@@ -1,12 +1,51 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
export type LoaderType = 'Circular' | 'ProgressBar';
|
|
3
|
+
/** Visual style of the button. Maps to a built-in palette via `--button-*` variables. */
|
|
4
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'destructive';
|
|
5
|
+
/** Size preset controlling padding/height/font-size. */
|
|
6
|
+
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
3
7
|
export type ButtonProperties = OptionalButtonProperties & ButtonEventProperties;
|
|
4
8
|
export type OptionalButtonProperties = {
|
|
5
9
|
text?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Visual style: `primary` (default, filled), `secondary` (outlined), `ghost`
|
|
12
|
+
* (transparent), `destructive` (danger). Each maps to the `--button-*` variables, so an
|
|
13
|
+
* explicit `--button-color` / `classes` override always wins over the variant default.
|
|
14
|
+
*/
|
|
15
|
+
variant?: ButtonVariant;
|
|
16
|
+
/** Size preset: `sm` / `md` (default) / `lg`. Controls padding, height, and font size. */
|
|
17
|
+
size?: ButtonSize;
|
|
18
|
+
/** Square padding for an icon-only button. Pair with `ariaLabel` for accessibility. */
|
|
19
|
+
iconOnly?: boolean;
|
|
20
|
+
/** Stretch the button to the full width of its container. */
|
|
21
|
+
fullWidth?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Render the button as an `<a>` styled identically. Use for button-styled links/navigation.
|
|
24
|
+
* When set, `type` is ignored; a disabled link is rendered inert via `aria-disabled`.
|
|
25
|
+
*/
|
|
26
|
+
href?: string;
|
|
27
|
+
/** Anchor target (only with `href`), e.g. `_blank`. */
|
|
28
|
+
target?: string;
|
|
29
|
+
/** Anchor rel (only with `href`). Defaults to `noopener noreferrer` when `target="_blank"`. */
|
|
30
|
+
rel?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Show a loading state: renders the circular loader, sets `aria-busy`, and disables the
|
|
33
|
+
* button. Preferred over the legacy `showLoader`/`loaderType` pair.
|
|
34
|
+
*/
|
|
35
|
+
loading?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Render the `text` as raw HTML. Defaults to `false` (safe plain-text rendering). Only enable
|
|
38
|
+
* for trusted, non-user-derived markup.
|
|
39
|
+
*/
|
|
40
|
+
allowHtml?: boolean;
|
|
41
|
+
/** @deprecated Use `disabled` instead. Retained for backward compatibility. */
|
|
6
42
|
enable?: boolean;
|
|
7
|
-
|
|
43
|
+
/** @deprecated Prefer `loading`. Shows a loader; pair with `loaderType`. */
|
|
8
44
|
showLoader?: boolean;
|
|
45
|
+
/** @deprecated Used with `showLoader`. `'Circular'` or `'ProgressBar'`. */
|
|
9
46
|
loaderType?: LoaderType;
|
|
47
|
+
/** @deprecated Drives the progress-bar animation when `loaderType='ProgressBar'`. */
|
|
48
|
+
showProgressBar?: boolean;
|
|
10
49
|
type?: 'submit' | 'reset' | 'button';
|
|
11
50
|
testId?: string;
|
|
12
51
|
icon?: Snippet;
|
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
padding: var(--calendar-padding, 16px);
|
|
359
359
|
background-color: var(--calendar-background, #ffffff);
|
|
360
360
|
border: var(--calendar-border, 1px solid #e0e0e0);
|
|
361
|
-
border-radius: var(--calendar-border-radius,
|
|
361
|
+
border-radius: var(--calendar-border-radius, var(--radius, 4px));
|
|
362
362
|
box-shadow: var(--calendar-box-shadow, none);
|
|
363
363
|
box-sizing: border-box;
|
|
364
364
|
user-select: none;
|
|
@@ -387,7 +387,7 @@
|
|
|
387
387
|
--button-height: var(--calendar-nav-button-size, 32px);
|
|
388
388
|
--button-border: none;
|
|
389
389
|
--button-color: transparent;
|
|
390
|
-
--button-border-radius: var(--calendar-nav-button-border-radius, 4px);
|
|
390
|
+
--button-border-radius: var(--calendar-nav-button-border-radius, var(--radius, 4px));
|
|
391
391
|
--button-text-color: var(--calendar-nav-button-color, #666666);
|
|
392
392
|
--button-padding: 0;
|
|
393
393
|
--button-hover-color: var(--calendar-nav-button-hover-background, #f0f0f0);
|
package/dist/Card/Card.svelte
CHANGED
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
.card {
|
|
91
91
|
background: var(--card-background, inherit);
|
|
92
92
|
border: var(--card-border, 1px solid currentColor);
|
|
93
|
-
border-radius: var(--card-border-radius,
|
|
93
|
+
border-radius: var(--card-border-radius, var(--radius, 4px));
|
|
94
94
|
overflow: var(--card-overflow, hidden);
|
|
95
95
|
color: inherit;
|
|
96
96
|
cursor: var(--card-cursor, inherit);
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
width: var(--checkbox-size, 20px);
|
|
107
107
|
height: var(--checkbox-size, 20px);
|
|
108
108
|
border: var(--checkbox-border, 2px solid #757575);
|
|
109
|
-
border-radius: var(--checkbox-border-radius,
|
|
109
|
+
border-radius: var(--checkbox-border-radius, var(--radius, 4px));
|
|
110
110
|
background-color: var(--checkbox-background, transparent);
|
|
111
111
|
transition:
|
|
112
112
|
background-color var(--checkbox-transition, 0.2s),
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
align-items: var(--choicebox-align-items, center);
|
|
55
55
|
padding: var(--choicebox-padding, 16px);
|
|
56
56
|
border: var(--choicebox-border, 2px solid #d0d0d0);
|
|
57
|
-
border-radius: var(--choicebox-border-radius,
|
|
57
|
+
border-radius: var(--choicebox-border-radius, var(--radius, 4px));
|
|
58
58
|
background: var(--choicebox-background, #ffffff);
|
|
59
59
|
gap: var(--choicebox-gap, 12px);
|
|
60
60
|
cursor: var(--choicebox-cursor, pointer);
|
|
@@ -336,7 +336,10 @@
|
|
|
336
336
|
.color-picker-swatch-btn {
|
|
337
337
|
--button-color: var(--color-picker-swatch-btn-background, #f9fafb);
|
|
338
338
|
--button-border: var(--color-picker-swatch-btn-border, 1px solid #d1d5db);
|
|
339
|
-
--button-border-radius: var(
|
|
339
|
+
--button-border-radius: var(
|
|
340
|
+
--color-picker-swatch-btn-border-radius,
|
|
341
|
+
var(--radius, 4px) 0 0 var(--radius, 4px)
|
|
342
|
+
);
|
|
340
343
|
--button-hover-color: var(--color-picker-swatch-btn-hover-background, #f3f4f6);
|
|
341
344
|
--button-padding: var(--color-picker-swatch-padding, 5px);
|
|
342
345
|
--button-width: fit-content;
|
|
@@ -344,14 +347,14 @@
|
|
|
344
347
|
}
|
|
345
348
|
|
|
346
349
|
.color-picker-swatch-btn.standalone {
|
|
347
|
-
--button-border-radius: var(--color-picker-swatch-btn-border-radius,
|
|
350
|
+
--button-border-radius: var(--color-picker-swatch-btn-border-radius, var(--radius, 4px));
|
|
348
351
|
}
|
|
349
352
|
|
|
350
353
|
.color-picker-checkerboard {
|
|
351
354
|
display: block;
|
|
352
355
|
width: var(--color-picker-swatch-size, 26px);
|
|
353
356
|
height: var(--color-picker-swatch-size, 26px);
|
|
354
|
-
border-radius: var(--color-picker-swatch-border-radius,
|
|
357
|
+
border-radius: var(--color-picker-swatch-border-radius, var(--radius, 4px));
|
|
355
358
|
overflow: hidden;
|
|
356
359
|
background-image:
|
|
357
360
|
linear-gradient(45deg, #ccc 25%, transparent 25%),
|
|
@@ -414,7 +417,7 @@
|
|
|
414
417
|
padding: var(--color-picker-popover-padding, 12px);
|
|
415
418
|
background: var(--color-picker-popover-background, #ffffff);
|
|
416
419
|
border: var(--color-picker-popover-border, 1px solid #e5e7eb);
|
|
417
|
-
border-radius: var(--color-picker-popover-border-radius,
|
|
420
|
+
border-radius: var(--color-picker-popover-border-radius, var(--radius, 4px));
|
|
418
421
|
box-shadow: var(
|
|
419
422
|
--color-picker-popover-shadow,
|
|
420
423
|
0 4px 24px rgba(0, 0, 0, 0.12),
|
|
@@ -432,7 +435,7 @@
|
|
|
432
435
|
position: relative;
|
|
433
436
|
width: 100%;
|
|
434
437
|
aspect-ratio: 1 / 0.7;
|
|
435
|
-
border-radius: var(--color-picker-panel-border-radius,
|
|
438
|
+
border-radius: var(--color-picker-panel-border-radius, var(--radius, 4px));
|
|
436
439
|
cursor: crosshair;
|
|
437
440
|
overflow: hidden;
|
|
438
441
|
user-select: none;
|
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
align-items: center;
|
|
314
314
|
background: var(--combobox-input-background, #ffffff);
|
|
315
315
|
border: var(--combobox-input-border, 1px solid #cccccc);
|
|
316
|
-
border-radius: var(--combobox-input-border-radius,
|
|
316
|
+
border-radius: var(--combobox-input-border-radius, var(--radius, 4px));
|
|
317
317
|
transition: var(--combobox-input-transition, border-color 0.15s, box-shadow 0.15s);
|
|
318
318
|
}
|
|
319
319
|
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
margin-top: var(--combobox-dropdown-gap, 4px);
|
|
370
370
|
background: var(--combobox-dropdown-background, #ffffff);
|
|
371
371
|
border: var(--combobox-dropdown-border, 1px solid #cccccc);
|
|
372
|
-
border-radius: var(--combobox-dropdown-border-radius,
|
|
372
|
+
border-radius: var(--combobox-dropdown-border-radius, var(--radius, 4px));
|
|
373
373
|
box-shadow: var(--combobox-dropdown-shadow, 0 4px 12px rgba(0, 0, 0, 0.1));
|
|
374
374
|
max-height: var(--combobox-dropdown-max-height, 200px);
|
|
375
375
|
overflow-y: auto;
|
|
@@ -298,7 +298,7 @@
|
|
|
298
298
|
|
|
299
299
|
.command-menu-dialog {
|
|
300
300
|
background-color: var(--command-menu-background, #ffffff);
|
|
301
|
-
border-radius: var(--command-menu-border-radius,
|
|
301
|
+
border-radius: var(--command-menu-border-radius, var(--radius, 4px));
|
|
302
302
|
box-shadow: var(--command-menu-box-shadow, 0 16px 70px rgba(0, 0, 0, 0.2));
|
|
303
303
|
width: var(--command-menu-width, 560px);
|
|
304
304
|
max-width: var(--command-menu-max-width, 90vw);
|
|
@@ -380,7 +380,7 @@
|
|
|
380
380
|
display: flex;
|
|
381
381
|
align-items: center;
|
|
382
382
|
padding: var(--command-menu-item-padding, 10px 12px);
|
|
383
|
-
border-radius: var(--command-menu-item-border-radius,
|
|
383
|
+
border-radius: var(--command-menu-item-border-radius, var(--radius, 4px));
|
|
384
384
|
cursor: pointer;
|
|
385
385
|
gap: var(--command-menu-item-gap, 10px);
|
|
386
386
|
font-size: var(--command-menu-item-font-size, 14px);
|
|
@@ -440,7 +440,7 @@
|
|
|
440
440
|
min-width: var(--command-menu-kbd-min-width, 24px);
|
|
441
441
|
height: var(--command-menu-kbd-height, 22px);
|
|
442
442
|
padding: var(--command-menu-kbd-padding, 0 6px);
|
|
443
|
-
border-radius: var(--command-menu-kbd-border-radius, 4px);
|
|
443
|
+
border-radius: var(--command-menu-kbd-border-radius, var(--radius, 4px));
|
|
444
444
|
background-color: var(--command-menu-kbd-background, #f1f5f9);
|
|
445
445
|
border: var(--command-menu-kbd-border, 1px solid #e2e8f0);
|
|
446
446
|
color: var(--command-menu-kbd-color, #64748b);
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
z-index: var(--context-menu-z-index, 1000);
|
|
228
228
|
background-color: var(--context-menu-background-color, #ffffff);
|
|
229
229
|
border: var(--context-menu-border, 1px solid #e0e0e0);
|
|
230
|
-
border-radius: var(--context-menu-border-radius,
|
|
230
|
+
border-radius: var(--context-menu-border-radius, var(--radius, 4px));
|
|
231
231
|
box-shadow: var(--context-menu-box-shadow, 0px 4px 16px rgba(0, 0, 0, 0.12));
|
|
232
232
|
min-width: var(--context-menu-min-width, 160px);
|
|
233
233
|
max-height: var(--context-menu-max-height, 240px);
|
|
@@ -933,7 +933,7 @@
|
|
|
933
933
|
.drp-trigger-wrapper {
|
|
934
934
|
--button-color: var(--drp-trigger-background, inherit);
|
|
935
935
|
--button-border: var(--drp-trigger-border, 1px solid currentColor);
|
|
936
|
-
--button-border-radius: var(--drp-trigger-border-radius,
|
|
936
|
+
--button-border-radius: var(--drp-trigger-border-radius, var(--radius, 4px));
|
|
937
937
|
--button-text-color: var(--drp-trigger-color, inherit);
|
|
938
938
|
--button-padding: var(--drp-trigger-padding, 8px 12px);
|
|
939
939
|
--button-min-width: var(--drp-trigger-min-width, 200px);
|
|
@@ -976,7 +976,7 @@
|
|
|
976
976
|
z-index: var(--drp-panel-z-index, 1000);
|
|
977
977
|
background: var(--drp-panel-background, inherit);
|
|
978
978
|
border: var(--drp-panel-border, 1px solid #e0e0e0);
|
|
979
|
-
border-radius: var(--drp-panel-border-radius,
|
|
979
|
+
border-radius: var(--drp-panel-border-radius, var(--radius, 4px));
|
|
980
980
|
box-shadow: var(--drp-panel-shadow, 0 8px 24px rgba(0, 0, 0, 0.12));
|
|
981
981
|
display: flex;
|
|
982
982
|
flex-direction: column;
|
|
@@ -1019,7 +1019,7 @@
|
|
|
1019
1019
|
padding: var(--drp-preset-padding, 7px 12px);
|
|
1020
1020
|
background: none;
|
|
1021
1021
|
border: none;
|
|
1022
|
-
border-radius: var(--drp-preset-border-radius,
|
|
1022
|
+
border-radius: var(--drp-preset-border-radius, var(--radius, 4px));
|
|
1023
1023
|
color: var(--drp-preset-color, inherit);
|
|
1024
1024
|
cursor: pointer;
|
|
1025
1025
|
white-space: nowrap;
|
|
@@ -1098,7 +1098,7 @@
|
|
|
1098
1098
|
height: var(--drp-nav-btn-size, 32px);
|
|
1099
1099
|
background: none;
|
|
1100
1100
|
border: none;
|
|
1101
|
-
border-radius: var(--drp-nav-btn-border-radius, 4px);
|
|
1101
|
+
border-radius: var(--drp-nav-btn-border-radius, var(--radius, 4px));
|
|
1102
1102
|
cursor: pointer;
|
|
1103
1103
|
color: var(--drp-nav-btn-color, inherit);
|
|
1104
1104
|
transition: background 0.12s ease;
|
|
@@ -1175,7 +1175,7 @@
|
|
|
1175
1175
|
min-width: 0;
|
|
1176
1176
|
padding: var(--drp-date-input-padding, 10px 14px);
|
|
1177
1177
|
border: var(--drp-date-input-border, 1px solid #d4d4d4);
|
|
1178
|
-
border-radius: var(--drp-date-input-radius,
|
|
1178
|
+
border-radius: var(--drp-date-input-radius, var(--radius, 4px));
|
|
1179
1179
|
background: var(--drp-date-input-background, #ffffff);
|
|
1180
1180
|
}
|
|
1181
1181
|
|
|
@@ -1210,7 +1210,7 @@
|
|
|
1210
1210
|
height: var(--drp-time-toggle-size, 40px);
|
|
1211
1211
|
padding: 0;
|
|
1212
1212
|
border: var(--drp-time-toggle-border, 1px solid #d4d4d4);
|
|
1213
|
-
border-radius: var(--drp-time-toggle-radius,
|
|
1213
|
+
border-radius: var(--drp-time-toggle-radius, var(--radius, 4px));
|
|
1214
1214
|
background: var(--drp-time-toggle-background, #f6f7f9);
|
|
1215
1215
|
color: var(--drp-time-toggle-color, #555555);
|
|
1216
1216
|
cursor: pointer;
|
|
@@ -1239,7 +1239,7 @@
|
|
|
1239
1239
|
display: flex;
|
|
1240
1240
|
align-items: center;
|
|
1241
1241
|
border: var(--drp-time-input-border, 1px solid #d4d4d4);
|
|
1242
|
-
border-radius: var(--drp-time-input-radius,
|
|
1242
|
+
border-radius: var(--drp-time-input-radius, var(--radius, 4px));
|
|
1243
1243
|
background: var(--drp-time-input-background, #ffffff);
|
|
1244
1244
|
}
|
|
1245
1245
|
|
|
@@ -1388,7 +1388,7 @@
|
|
|
1388
1388
|
position: relative;
|
|
1389
1389
|
--button-color: var(--drp-compare-trigger-background, inherit);
|
|
1390
1390
|
--button-border: var(--drp-compare-trigger-border, 1px solid currentColor);
|
|
1391
|
-
--button-border-radius: var(--drp-compare-trigger-border-radius,
|
|
1391
|
+
--button-border-radius: var(--drp-compare-trigger-border-radius, var(--radius, 4px));
|
|
1392
1392
|
--button-text-color: var(--drp-compare-trigger-color, inherit);
|
|
1393
1393
|
--button-padding: var(--drp-compare-trigger-padding, 8px 12px);
|
|
1394
1394
|
--button-min-width: var(--drp-compare-trigger-min-width, 160px);
|
|
@@ -1407,7 +1407,7 @@
|
|
|
1407
1407
|
z-index: var(--drp-panel-z-index, 1000);
|
|
1408
1408
|
background: var(--drp-panel-background, inherit);
|
|
1409
1409
|
border: var(--drp-panel-border, 1px solid #e0e0e0);
|
|
1410
|
-
border-radius: var(--drp-panel-border-radius,
|
|
1410
|
+
border-radius: var(--drp-panel-border-radius, var(--radius, 4px));
|
|
1411
1411
|
box-shadow: var(--drp-panel-shadow, 0 8px 24px rgba(0, 0, 0, 0.12));
|
|
1412
1412
|
display: flex;
|
|
1413
1413
|
flex-direction: column;
|