@skeletonlabs/skeleton 1.11.0-dev.12b63fe4 → 1.11.0-dev.1c35e152
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.
|
@@ -9,6 +9,7 @@ export let active = "variant-filled";
|
|
|
9
9
|
export let hover = "hover:variant-soft";
|
|
10
10
|
export let color = "";
|
|
11
11
|
export let fill = "";
|
|
12
|
+
export let regionLabel = "";
|
|
12
13
|
export let labelledby = "";
|
|
13
14
|
setContext("rounded", rounded);
|
|
14
15
|
setContext("padding", padding);
|
|
@@ -16,6 +17,7 @@ setContext("active", active);
|
|
|
16
17
|
setContext("hover", hover);
|
|
17
18
|
setContext("color", color);
|
|
18
19
|
setContext("fill", fill);
|
|
20
|
+
setContext("regionLabel", regionLabel);
|
|
19
21
|
const cBase = "p-1";
|
|
20
22
|
$:
|
|
21
23
|
spacing = `${display.includes("flex-col") ? "" : "space-x-1"}`;
|
|
@@ -22,6 +22,8 @@ declare const __propDef: {
|
|
|
22
22
|
color?: string | undefined;
|
|
23
23
|
/** Provide classes to set the highlighted SVG fill color.*/
|
|
24
24
|
fill?: string | undefined;
|
|
25
|
+
/** Provide classes for the label region.*/
|
|
26
|
+
regionLabel?: string | undefined;
|
|
25
27
|
/** Provide the ARIA labelledby value.*/
|
|
26
28
|
labelledby?: string | undefined;
|
|
27
29
|
};
|
|
@@ -10,7 +10,9 @@ export let active = getContext("active");
|
|
|
10
10
|
export let hover = getContext("hover");
|
|
11
11
|
export let color = getContext("color");
|
|
12
12
|
export let fill = getContext("fill");
|
|
13
|
-
|
|
13
|
+
export let regionLabel = getContext("regionLabel");
|
|
14
|
+
const cBase = "flex-auto";
|
|
15
|
+
const cWrapper = "text-base text-center cursor-pointer";
|
|
14
16
|
const cDisabled = "opacity-50 cursor-not-allowed";
|
|
15
17
|
let elemInput;
|
|
16
18
|
function onKeyDown(event) {
|
|
@@ -26,17 +28,19 @@ $:
|
|
|
26
28
|
$:
|
|
27
29
|
classesDisabled = $$props.disabled ? cDisabled : "";
|
|
28
30
|
$:
|
|
29
|
-
|
|
31
|
+
classsBase = `${cBase}`;
|
|
32
|
+
$:
|
|
33
|
+
classesWrapper = `${cWrapper} ${padding} ${rounded} ${classesActive} ${classesDisabled} ${$$props.class ?? ""}`;
|
|
30
34
|
function prunedRestProps() {
|
|
31
35
|
delete $$restProps.class;
|
|
32
36
|
return $$restProps;
|
|
33
37
|
}
|
|
34
38
|
</script>
|
|
35
39
|
|
|
36
|
-
<label>
|
|
40
|
+
<label class="radio-label {classsBase} {regionLabel}">
|
|
37
41
|
<!-- A11y attributes are not allowed on <label> -->
|
|
38
42
|
<div
|
|
39
|
-
class="radio-item {
|
|
43
|
+
class="radio-item {classesWrapper}"
|
|
40
44
|
data-testid="radio-item"
|
|
41
45
|
role="radio"
|
|
42
46
|
aria-checked={checked}
|