@haiilo/catalyst 0.10.3 → 0.10.8
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/catalyst/catalyst.css +1 -1
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/{p-c4a1e283.entry.js → p-e5c5e21d.entry.js} +4 -4
- package/dist/catalyst/p-e5c5e21d.entry.js.map +1 -0
- package/dist/catalyst/scss/index.scss +52 -0
- package/dist/cjs/cat-alert_21.cjs.entry.js +13 -7
- package/dist/cjs/cat-alert_21.cjs.entry.js.map +1 -1
- package/dist/cjs/catalyst.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/cat-radio/cat-radio.js +1 -2
- package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
- package/dist/collection/components/cat-radio-group/cat-radio-group.js +48 -7
- package/dist/collection/components/cat-radio-group/cat-radio-group.js.map +1 -1
- package/dist/collection/scss/index.scss +52 -0
- package/dist/components/cat-radio-group.js +15 -7
- package/dist/components/cat-radio-group.js.map +1 -1
- package/dist/components/cat-radio.js +1 -2
- package/dist/components/cat-radio.js.map +1 -1
- package/dist/esm/cat-alert_21.entry.js +13 -7
- package/dist/esm/cat-alert_21.entry.js.map +1 -1
- package/dist/esm/catalyst.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/cat-radio-group/cat-radio-group.d.ts +4 -0
- package/dist/types/components.d.ts +7 -0
- package/package.json +2 -2
- package/dist/catalyst/p-c4a1e283.entry.js.map +0 -1
|
@@ -29,3 +29,55 @@
|
|
|
29
29
|
// -- Includes
|
|
30
30
|
$cat-font-path: 'assets/fonts' !default;
|
|
31
31
|
@include cat-fonts($cat-font-path);
|
|
32
|
+
|
|
33
|
+
// -- Styles
|
|
34
|
+
|
|
35
|
+
.wrapper {
|
|
36
|
+
width: 48rem;
|
|
37
|
+
margin: 8rem auto;
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: row-reverse;
|
|
40
|
+
gap: 8rem;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.content {
|
|
44
|
+
flex: 3 0 0;
|
|
45
|
+
min-width: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
#nav {
|
|
49
|
+
align-self: flex-start;
|
|
50
|
+
position: sticky;
|
|
51
|
+
top: 8rem;
|
|
52
|
+
flex: 1 0 0;
|
|
53
|
+
min-width: 0;
|
|
54
|
+
|
|
55
|
+
ul {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
gap: 0.5rem;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.active {
|
|
62
|
+
font-weight: bold;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
section {
|
|
67
|
+
flex: 0 1 auto;
|
|
68
|
+
padding: 2rem 0;
|
|
69
|
+
|
|
70
|
+
&:not(:last-of-type) {
|
|
71
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
> h2:not(:first-child),
|
|
75
|
+
> h3:not(:first-child) {
|
|
76
|
+
margin-top: 2rem;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
> h2:not(:last-child),
|
|
80
|
+
> h3:not(:last-child) {
|
|
81
|
+
margin-bottom: 1rem;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -3129,7 +3129,6 @@ const CatRadio = class {
|
|
|
3129
3129
|
}
|
|
3130
3130
|
onChange(event) {
|
|
3131
3131
|
this.checked = true;
|
|
3132
|
-
this.value = this.input.value;
|
|
3133
3132
|
this.catChange.emit(event);
|
|
3134
3133
|
}
|
|
3135
3134
|
onFocus(event) {
|
|
@@ -3147,6 +3146,7 @@ const catRadioGroupCss = ":host{display:block}:host([hidden]){display:none}";
|
|
|
3147
3146
|
const CatRadioGroup = class {
|
|
3148
3147
|
constructor(hostRef) {
|
|
3149
3148
|
index.registerInstance(this, hostRef);
|
|
3149
|
+
this.catChange = index.createEvent(this, "catChange", 7);
|
|
3150
3150
|
this.catRadioGroup = [];
|
|
3151
3151
|
/**
|
|
3152
3152
|
* Whether this radio group is disabled.
|
|
@@ -3162,6 +3162,12 @@ const CatRadioGroup = class {
|
|
|
3162
3162
|
catRadio.name = newName;
|
|
3163
3163
|
});
|
|
3164
3164
|
}
|
|
3165
|
+
onValueChanged(newValue) {
|
|
3166
|
+
this.catRadioGroup.forEach(catRadio => {
|
|
3167
|
+
catRadio.checked = catRadio.value === newValue;
|
|
3168
|
+
});
|
|
3169
|
+
this.updateTabIndex();
|
|
3170
|
+
}
|
|
3165
3171
|
onDisabledChanged(disabled) {
|
|
3166
3172
|
this.catRadioGroup.forEach(catRadio => {
|
|
3167
3173
|
if (disabled) {
|
|
@@ -3179,9 +3185,10 @@ const CatRadioGroup = class {
|
|
|
3179
3185
|
componentDidLoad() {
|
|
3180
3186
|
this.catRadioGroup = Array.from(this.hostElement.querySelectorAll(`cat-radio`));
|
|
3181
3187
|
this.onNameChanged(this.name);
|
|
3188
|
+
this.onValueChanged(this.value);
|
|
3182
3189
|
this.onDisabledChanged(this.disabled);
|
|
3183
3190
|
this.onLabelLeftChanged(this.labelLeft);
|
|
3184
|
-
this.updateTabIndex();
|
|
3191
|
+
//this.updateTabIndex();
|
|
3185
3192
|
}
|
|
3186
3193
|
onKeydown(event) {
|
|
3187
3194
|
var _a, _b;
|
|
@@ -3199,11 +3206,9 @@ const CatRadioGroup = class {
|
|
|
3199
3206
|
}
|
|
3200
3207
|
onInput(event) {
|
|
3201
3208
|
const catRadioElement = this.catRadioGroup.find(value => value === event.target);
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
this.updateTabIndex();
|
|
3206
|
-
}
|
|
3209
|
+
this.value = catRadioElement === null || catRadioElement === void 0 ? void 0 : catRadioElement.value;
|
|
3210
|
+
//this.updateTabIndex();
|
|
3211
|
+
this.catChange.emit();
|
|
3207
3212
|
}
|
|
3208
3213
|
render() {
|
|
3209
3214
|
return (index.h("div", { role: "radiogroup", "aria-label": this.a11yLabel }, index.h("slot", null)));
|
|
@@ -3219,6 +3224,7 @@ const CatRadioGroup = class {
|
|
|
3219
3224
|
get hostElement() { return index.getElement(this); }
|
|
3220
3225
|
static get watchers() { return {
|
|
3221
3226
|
"name": ["onNameChanged"],
|
|
3227
|
+
"value": ["onValueChanged"],
|
|
3222
3228
|
"disabled": ["onDisabledChanged"],
|
|
3223
3229
|
"labelLeft": ["onLabelLeftChanged"]
|
|
3224
3230
|
}; }
|