@reliability-design/web 1.2.0 → 1.3.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.
- package/dist/components/rel-accordion/rel-accordion.ts +289 -135
- package/dist/components/rel-avatar/README.md +15 -4
- package/dist/components/rel-avatar/rel-avatar.ts +138 -96
- package/dist/components/rel-badge/README.md +7 -0
- package/dist/components/rel-badge/rel-badge.ts +38 -2
- package/dist/components/rel-button/rel-button.ts +29 -7
- package/dist/components/rel-chip/README.md +7 -0
- package/dist/components/rel-chip/rel-chip.ts +250 -130
- package/dist/components/rel-drawer/rel-drawer.ts +5 -2
- package/dist/components/rel-menubar/rel-menubar.ts +1 -0
- package/dist/components/rel-pagination/rel-pagination.ts +442 -425
- package/dist/components/rel-radio/rel-radio.ts +16 -16
- package/dist/components/rel-range-picker/rel-range-picker.css +349 -349
- package/dist/components/rel-range-picker/rel-range-picker.ts +1080 -1079
- package/dist/components/rel-select/README.md +34 -28
- package/dist/components/rel-select/rel-select.ts +1015 -346
- package/dist/components/rel-sheet/rel-sheet.ts +6 -3
- package/dist/components/rel-skeleton/rel-skeleton.ts +139 -0
- package/dist/components/rel-textfield/rel-textfield.ts +49 -1
- package/dist/components/rel-toast/rel-toast.ts +1 -6
- package/dist/index.d.mts +164 -22
- package/dist/index.d.ts +164 -22
- package/dist/index.js +2127 -927
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2139 -940
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -41,16 +41,15 @@ export class RelRadio extends LitElement {
|
|
|
41
41
|
.rel-radio-group {
|
|
42
42
|
display: flex;
|
|
43
43
|
flex-direction: column;
|
|
44
|
+
align-items: flex-start;
|
|
44
45
|
gap: var(--rel-spacing-space-xs);
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
.rel-radio-option {
|
|
48
|
-
display: flex;
|
|
49
|
+
display: inline-flex;
|
|
49
50
|
flex-direction: column;
|
|
50
51
|
gap: var(--rel-spacing-space-3xs);
|
|
51
52
|
cursor: pointer;
|
|
52
|
-
padding: 4px 6px;
|
|
53
|
-
margin: -4px -6px;
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
.rel-radio-option.disabled {
|
|
@@ -58,10 +57,6 @@ export class RelRadio extends LitElement {
|
|
|
58
57
|
cursor: not-allowed !important;
|
|
59
58
|
}
|
|
60
59
|
|
|
61
|
-
.rel-radio-option:not(.disabled):hover {
|
|
62
|
-
background: var(--rel-color-bg-hover, #f5f5f5);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
60
|
.rel-radio-option:not(.disabled):hover .radio-custom {
|
|
66
61
|
border-color: #525252;
|
|
67
62
|
}
|
|
@@ -75,8 +70,8 @@ export class RelRadio extends LitElement {
|
|
|
75
70
|
}
|
|
76
71
|
|
|
77
72
|
.rel-radio-option:focus-within:has(input:focus-visible) {
|
|
78
|
-
outline:
|
|
79
|
-
outline-offset:
|
|
73
|
+
outline: 1.5px solid #000000;
|
|
74
|
+
outline-offset: 1px;
|
|
80
75
|
}
|
|
81
76
|
|
|
82
77
|
.radio-main {
|
|
@@ -109,15 +104,15 @@ export class RelRadio extends LitElement {
|
|
|
109
104
|
}
|
|
110
105
|
|
|
111
106
|
.radio-label {
|
|
112
|
-
font-size: var(--rel-fontSizes-
|
|
107
|
+
font-size: var(--rel-fontSizes-md, 16px);
|
|
113
108
|
font-weight: var(--rel-fontWeights-medium);
|
|
114
109
|
color: var(--rel-color-text-primary);
|
|
115
110
|
}
|
|
116
111
|
|
|
117
112
|
.radio-supporting {
|
|
118
|
-
font-size: var(--rel-fontSizes-
|
|
113
|
+
font-size: var(--rel-fontSizes-sm, 12px);
|
|
119
114
|
margin-left: 28px;
|
|
120
|
-
color:
|
|
115
|
+
color: #7D7D7D;
|
|
121
116
|
}
|
|
122
117
|
|
|
123
118
|
/* Error state — unchecked only */
|
|
@@ -135,7 +130,7 @@ export class RelRadio extends LitElement {
|
|
|
135
130
|
|
|
136
131
|
/* Error message below group */
|
|
137
132
|
.error-message {
|
|
138
|
-
font-size: var(--rel-fontSizes-
|
|
133
|
+
font-size: var(--rel-fontSizes-sm, 12px);
|
|
139
134
|
color: #CE3131;
|
|
140
135
|
margin-top: var(--rel-spacing-space-2xs, 4px);
|
|
141
136
|
}
|
|
@@ -158,7 +153,8 @@ export class RelRadio extends LitElement {
|
|
|
158
153
|
|
|
159
154
|
:host-context([data-theme="dark"]) .rel-radio-option:focus-within:has(input:focus-visible),
|
|
160
155
|
:host-context(.dark) .rel-radio-option:focus-within:has(input:focus-visible) {
|
|
161
|
-
outline
|
|
156
|
+
outline: 1.5px solid var(--rel-color-text-primary, #F5F5F5);
|
|
157
|
+
outline-offset: 1px;
|
|
162
158
|
}
|
|
163
159
|
`;
|
|
164
160
|
|
|
@@ -180,10 +176,14 @@ export class RelRadio extends LitElement {
|
|
|
180
176
|
registerOnTouched(fn: () => void): void { this._onTouched = fn; }
|
|
181
177
|
writeValue(value: string): void { this.checked = value === this.value; }
|
|
182
178
|
|
|
179
|
+
private get hasSelection(): boolean {
|
|
180
|
+
return this.selectedValue !== null && this.selectedValue !== "";
|
|
181
|
+
}
|
|
182
|
+
|
|
183
183
|
private renderOption(option: RadioOption) {
|
|
184
184
|
const isChecked = this.selectedValue === option.value;
|
|
185
185
|
const isDisabled = this.disabled || option.disabled;
|
|
186
|
-
const isErrorActive = this.error && !
|
|
186
|
+
const isErrorActive = this.error && !this.hasSelection;
|
|
187
187
|
|
|
188
188
|
const classes = [
|
|
189
189
|
"rel-radio-option",
|
|
@@ -220,7 +220,7 @@ export class RelRadio extends LitElement {
|
|
|
220
220
|
<div class="rel-radio-group">
|
|
221
221
|
${this.options.map((o) => this.renderOption(o))}
|
|
222
222
|
</div>
|
|
223
|
-
${this.error && this.errorMessage
|
|
223
|
+
${this.error && this.errorMessage && !this.hasSelection
|
|
224
224
|
? html`<div class="error-message">${this.errorMessage}</div>`
|
|
225
225
|
: ""}
|
|
226
226
|
`;
|