@sellmate/design-system 0.0.49 → 0.0.50
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/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/{esm/color-CgyTlXBV.js → cjs/resolveColor-DxvExwgo.js} +17 -4
- package/dist/cjs/{resolveColor-CauSLF0s.js.map → resolveColor-DxvExwgo.js.map} +1 -1
- package/dist/cjs/sd-badge.cjs.entry.js +1 -2
- package/dist/cjs/sd-badge.entry.cjs.js.map +1 -1
- package/dist/cjs/sd-button.sd-checkbox.sd-guide.sd-icon.sd-input.sd-loading-spinner.sd-pagination.sd-portal.sd-radio-group.sd-select.sd-select-option.sd-table-backup.sd-tooltip.sd-tooltip-portal.entry.cjs.js.map +1 -0
- package/dist/cjs/{sd-button_12.cjs.entry.js → sd-button_14.cjs.entry.js} +164 -14
- package/dist/cjs/sd-modal-card.cjs.entry.js +1 -2
- package/dist/cjs/sd-modal-card.entry.cjs.js.map +1 -1
- package/dist/cjs/sd-select-multiple.cjs.entry.js +2 -2
- package/dist/cjs/sd-select-option-group.cjs.entry.js +3 -3
- package/dist/cjs/sd-tbody_3.cjs.entry.js +3 -3
- package/dist/cjs/sd-td.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/sd-radio-group/sd-radio-group.css +76 -0
- package/dist/collection/components/sd-radio-group/sd-radio-group.js +214 -0
- package/dist/collection/components/sd-radio-group/sd-radio-group.js.map +1 -0
- package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js +1 -1
- package/dist/collection/components/sd-select-multiple/sd-select-multiple.js +2 -2
- package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.js +3 -3
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +1 -1
- package/dist/collection/components/sd-table/sd-td/sd-td.js +2 -2
- package/dist/collection/components/sd-table/sd-th/sd-th.js +1 -1
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js +1 -1
- package/dist/collection/components/sd-table-backup/sd-table-backup.css +1 -1
- package/dist/collection/components/sd-table-backup/sd-table-backup.js +10 -4
- package/dist/collection/components/sd-table-backup/sd-table-backup.js.map +1 -1
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +4 -4
- package/dist/collection/components/sd-tooltip-portal/sd-tooltip-portal.js +1 -1
- package/dist/components/{p-CxKXdl1J.js → p-BIw-hGVo.js} +3 -3
- package/dist/components/{p-CxKXdl1J.js.map → p-BIw-hGVo.js.map} +1 -1
- package/dist/components/{p-Dg_O2miv.js → p-BSUHSOXX.js} +3 -3
- package/dist/components/{p-Dg_O2miv.js.map → p-BSUHSOXX.js.map} +1 -1
- package/dist/components/{p-CRB0WJnC.js → p-C0CLTo3o.js} +3 -3
- package/dist/components/{p-CRB0WJnC.js.map → p-C0CLTo3o.js.map} +1 -1
- package/dist/components/{p-CePRmFej.js → p-C171iavd.js} +3 -3
- package/dist/components/{p-CePRmFej.js.map → p-C171iavd.js.map} +1 -1
- package/dist/components/{p-CVDnYikl.js → p-Cq-Qitdj.js} +7 -7
- package/dist/components/{p-CVDnYikl.js.map → p-Cq-Qitdj.js.map} +1 -1
- package/dist/components/{p-cOQWi_dD.js → p-D8f0ASS6.js} +3 -3
- package/dist/components/{p-cOQWi_dD.js.map → p-D8f0ASS6.js.map} +1 -1
- package/dist/components/{p-BAhPNR2w.js → p-X8rQBuZk.js} +5 -5
- package/dist/components/{p-BAhPNR2w.js.map → p-X8rQBuZk.js.map} +1 -1
- package/dist/components/{p-CaLViLir.js → p-_spt_8fG.js} +3 -3
- package/dist/components/{p-CaLViLir.js.map → p-_spt_8fG.js.map} +1 -1
- package/dist/components/sd-popover.js +1 -1
- package/dist/components/sd-radio-group.d.ts +11 -0
- package/dist/components/sd-radio-group.js +99 -0
- package/dist/components/sd-radio-group.js.map +1 -0
- package/dist/components/sd-select-multiple-group.js +1 -1
- package/dist/components/sd-select-multiple.js +3 -3
- package/dist/components/sd-select-option-group.js +1 -1
- package/dist/components/sd-select-option.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-table-backup.js +15 -9
- package/dist/components/sd-table-backup.js.map +1 -1
- package/dist/components/sd-table.js +7 -7
- package/dist/components/sd-tbody.js +1 -1
- package/dist/components/sd-td.js +2 -2
- package/dist/components/sd-th.js +1 -1
- package/dist/components/sd-tooltip-portal.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/components/sd-tr.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-0cada447.entry.js → p-1b6aec43.entry.js} +2 -2
- package/dist/design-system/{p-d7fe0919.entry.js → p-1e175d35.entry.js} +2 -2
- package/dist/design-system/p-24ef1055.entry.js +2 -0
- package/dist/design-system/p-24ef1055.entry.js.map +1 -0
- package/dist/design-system/p-4828e65b.entry.js +2 -0
- package/dist/design-system/{p-CgyTlXBV.js → p-BYf-ybt2.js} +2 -2
- package/dist/design-system/{p-BoLmB6pG.js.map → p-BYf-ybt2.js.map} +1 -1
- package/dist/design-system/p-a73bb448.entry.js +2 -0
- package/dist/design-system/p-a73bb448.entry.js.map +1 -0
- package/dist/design-system/p-b892a722.entry.js +2 -0
- package/dist/design-system/p-b892a722.entry.js.map +1 -0
- package/dist/design-system/{p-45bb29cf.entry.js → p-c7e8a2c0.entry.js} +2 -2
- package/dist/design-system/sd-badge.entry.esm.js.map +1 -1
- package/dist/design-system/sd-button.sd-checkbox.sd-guide.sd-icon.sd-input.sd-loading-spinner.sd-pagination.sd-portal.sd-radio-group.sd-select.sd-select-option.sd-table-backup.sd-tooltip.sd-tooltip-portal.entry.esm.js.map +1 -0
- package/dist/design-system/sd-modal-card.entry.esm.js.map +1 -1
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/{cjs/color-Oz29vj7L.js → esm/resolveColor-BYf-ybt2.js} +14 -6
- package/dist/esm/{resolveColor-CswQ9y2Q.js.map → resolveColor-BYf-ybt2.js.map} +1 -1
- package/dist/esm/sd-badge.entry.js +1 -2
- package/dist/esm/sd-badge.entry.js.map +1 -1
- package/dist/esm/sd-button.sd-checkbox.sd-guide.sd-icon.sd-input.sd-loading-spinner.sd-pagination.sd-portal.sd-radio-group.sd-select.sd-select-option.sd-table-backup.sd-tooltip.sd-tooltip-portal.entry.js.map +1 -0
- package/dist/esm/{sd-button_12.entry.js → sd-button_14.entry.js} +163 -15
- package/dist/esm/sd-modal-card.entry.js +1 -2
- package/dist/esm/sd-modal-card.entry.js.map +1 -1
- package/dist/esm/sd-select-multiple.entry.js +2 -2
- package/dist/esm/sd-select-option-group.entry.js +3 -3
- package/dist/esm/sd-tbody_3.entry.js +3 -3
- package/dist/esm/sd-td.entry.js +2 -2
- package/dist/types/components/sd-radio-group/sd-radio-group.d.ts +24 -0
- package/dist/types/components.d.ts +59 -0
- package/hydrate/index.js +108 -21
- package/hydrate/index.mjs +108 -21
- package/package.json +95 -95
- package/dist/cjs/color-Oz29vj7L.js.map +0 -1
- package/dist/cjs/resolveColor-CauSLF0s.js +0 -18
- package/dist/cjs/sd-button.sd-checkbox.sd-icon.sd-input.sd-loading-spinner.sd-pagination.sd-portal.sd-select.sd-select-option.sd-table-backup.sd-tooltip.sd-tooltip-portal.entry.cjs.js.map +0 -1
- package/dist/cjs/sd-guide.cjs.entry.js +0 -85
- package/dist/cjs/sd-guide.entry.cjs.js.map +0 -1
- package/dist/design-system/p-74c0eee4.entry.js +0 -2
- package/dist/design-system/p-74c0eee4.entry.js.map +0 -1
- package/dist/design-system/p-927b3333.entry.js +0 -2
- package/dist/design-system/p-927b3333.entry.js.map +0 -1
- package/dist/design-system/p-BoLmB6pG.js +0 -2
- package/dist/design-system/p-CgyTlXBV.js.map +0 -1
- package/dist/design-system/p-bea456ad.entry.js +0 -2
- package/dist/design-system/p-bea456ad.entry.js.map +0 -1
- package/dist/design-system/p-dc6681a7.entry.js +0 -2
- package/dist/design-system/p-dc6681a7.entry.js.map +0 -1
- package/dist/design-system/p-fb4d628a.entry.js +0 -2
- package/dist/design-system/sd-button.sd-checkbox.sd-icon.sd-input.sd-loading-spinner.sd-pagination.sd-portal.sd-select.sd-select-option.sd-table-backup.sd-tooltip.sd-tooltip-portal.entry.esm.js.map +0 -1
- package/dist/design-system/sd-guide.entry.esm.js.map +0 -1
- package/dist/esm/color-CgyTlXBV.js.map +0 -1
- package/dist/esm/resolveColor-CswQ9y2Q.js +0 -16
- package/dist/esm/sd-button.sd-checkbox.sd-icon.sd-input.sd-loading-spinner.sd-pagination.sd-portal.sd-select.sd-select-option.sd-table-backup.sd-tooltip.sd-tooltip-portal.entry.js.map +0 -1
- package/dist/esm/sd-guide.entry.js +0 -83
- package/dist/esm/sd-guide.entry.js.map +0 -1
- /package/dist/design-system/{p-0cada447.entry.js.map → p-1b6aec43.entry.js.map} +0 -0
- /package/dist/design-system/{p-d7fe0919.entry.js.map → p-1e175d35.entry.js.map} +0 -0
- /package/dist/design-system/{p-fb4d628a.entry.js.map → p-4828e65b.entry.js.map} +0 -0
- /package/dist/design-system/{p-45bb29cf.entry.js.map → p-c7e8a2c0.entry.js.map} +0 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class SdRadioGroup {
|
|
3
|
+
value;
|
|
4
|
+
radioOptions = [];
|
|
5
|
+
direction = 'vertical';
|
|
6
|
+
disabled = false;
|
|
7
|
+
name;
|
|
8
|
+
selectedValue;
|
|
9
|
+
sdChange;
|
|
10
|
+
componentWillLoad() {
|
|
11
|
+
if (this.value) {
|
|
12
|
+
this.selectedValue = this.value;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
valueChanged(newValue) {
|
|
16
|
+
this.selectedValue = newValue;
|
|
17
|
+
}
|
|
18
|
+
handleRadioChange = (optionValue, optionDisabled) => {
|
|
19
|
+
if (this.disabled || optionDisabled)
|
|
20
|
+
return;
|
|
21
|
+
this.selectedValue = optionValue;
|
|
22
|
+
this.value = optionValue;
|
|
23
|
+
this.sdChange.emit(optionValue);
|
|
24
|
+
};
|
|
25
|
+
isOptionSelected(option) {
|
|
26
|
+
return this.selectedValue === option.value;
|
|
27
|
+
}
|
|
28
|
+
isOptionDisabled(option) {
|
|
29
|
+
return this.disabled || !!option.disabled;
|
|
30
|
+
}
|
|
31
|
+
getRadioClasses(option) {
|
|
32
|
+
const classes = [
|
|
33
|
+
'sd-radio-group__option',
|
|
34
|
+
this.isOptionSelected(option)
|
|
35
|
+
? 'sd-radio-group__option--selected'
|
|
36
|
+
: 'sd-radio-group__option--unselected',
|
|
37
|
+
];
|
|
38
|
+
if (this.isOptionDisabled(option)) {
|
|
39
|
+
classes.push('sd-radio-group__option--disabled');
|
|
40
|
+
}
|
|
41
|
+
return classes.join(' ');
|
|
42
|
+
}
|
|
43
|
+
getGroupClasses() {
|
|
44
|
+
const classes = ['sd-radio-group', `sd-radio-group--${this.direction}`];
|
|
45
|
+
return classes.join(' ');
|
|
46
|
+
}
|
|
47
|
+
render() {
|
|
48
|
+
const groupName = this.name || `sd-radio-group-${Math.random().toString(36).substring(2, 11)}`;
|
|
49
|
+
return (h("div", { key: 'd8f9d161395e7125bb65411ee6831e7e290900ba', class: this.getGroupClasses(), role: "radiogroup", "aria-disabled": this.disabled.toString() }, this.radioOptions.map((option, index) => {
|
|
50
|
+
const isSelected = this.isOptionSelected(option);
|
|
51
|
+
const isDisabled = this.isOptionDisabled(option);
|
|
52
|
+
return (h("label", { key: `radio-${index}`, class: this.getRadioClasses(option), role: "radio", "aria-checked": isSelected.toString(), "aria-disabled": isDisabled.toString(), "aria-label": option.label || 'radio option' }, h("input", { type: "radio", name: groupName, value: option.value.toString(), checked: isSelected, disabled: isDisabled, onInput: () => this.handleRadioChange(option.value, option.disabled) }), option.label && h("span", { class: "sd-radio-group__label" }, option.label)));
|
|
53
|
+
})));
|
|
54
|
+
}
|
|
55
|
+
static get is() { return "sd-radio-group"; }
|
|
56
|
+
static get originalStyleUrls() {
|
|
57
|
+
return {
|
|
58
|
+
"$": ["sd-radio-group.scss"]
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
static get styleUrls() {
|
|
62
|
+
return {
|
|
63
|
+
"$": ["sd-radio-group.css"]
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
static get properties() {
|
|
67
|
+
return {
|
|
68
|
+
"value": {
|
|
69
|
+
"type": "any",
|
|
70
|
+
"mutable": true,
|
|
71
|
+
"complexType": {
|
|
72
|
+
"original": "RadioValue",
|
|
73
|
+
"resolved": "boolean | number | string",
|
|
74
|
+
"references": {
|
|
75
|
+
"RadioValue": {
|
|
76
|
+
"location": "local",
|
|
77
|
+
"path": "C:/Users/KimMeeKyeong/Documents/sellmate/frontend/design-system/packages/stencil/src/components/sd-radio-group/sd-radio-group.tsx",
|
|
78
|
+
"id": "src/components/sd-radio-group/sd-radio-group.tsx::RadioValue"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": true,
|
|
83
|
+
"optional": false,
|
|
84
|
+
"docs": {
|
|
85
|
+
"tags": [],
|
|
86
|
+
"text": ""
|
|
87
|
+
},
|
|
88
|
+
"getter": false,
|
|
89
|
+
"setter": false,
|
|
90
|
+
"reflect": true,
|
|
91
|
+
"attribute": "value"
|
|
92
|
+
},
|
|
93
|
+
"radioOptions": {
|
|
94
|
+
"type": "unknown",
|
|
95
|
+
"mutable": true,
|
|
96
|
+
"complexType": {
|
|
97
|
+
"original": "RadioOption[]",
|
|
98
|
+
"resolved": "RadioOption[]",
|
|
99
|
+
"references": {
|
|
100
|
+
"RadioOption": {
|
|
101
|
+
"location": "local",
|
|
102
|
+
"path": "C:/Users/KimMeeKyeong/Documents/sellmate/frontend/design-system/packages/stencil/src/components/sd-radio-group/sd-radio-group.tsx",
|
|
103
|
+
"id": "src/components/sd-radio-group/sd-radio-group.tsx::RadioOption"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": false,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [],
|
|
111
|
+
"text": ""
|
|
112
|
+
},
|
|
113
|
+
"getter": false,
|
|
114
|
+
"setter": false,
|
|
115
|
+
"defaultValue": "[]"
|
|
116
|
+
},
|
|
117
|
+
"direction": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"mutable": false,
|
|
120
|
+
"complexType": {
|
|
121
|
+
"original": "'horizonal' | 'vertical'",
|
|
122
|
+
"resolved": "\"horizonal\" | \"vertical\"",
|
|
123
|
+
"references": {}
|
|
124
|
+
},
|
|
125
|
+
"required": false,
|
|
126
|
+
"optional": false,
|
|
127
|
+
"docs": {
|
|
128
|
+
"tags": [],
|
|
129
|
+
"text": ""
|
|
130
|
+
},
|
|
131
|
+
"getter": false,
|
|
132
|
+
"setter": false,
|
|
133
|
+
"reflect": false,
|
|
134
|
+
"attribute": "direction",
|
|
135
|
+
"defaultValue": "'vertical'"
|
|
136
|
+
},
|
|
137
|
+
"disabled": {
|
|
138
|
+
"type": "boolean",
|
|
139
|
+
"mutable": false,
|
|
140
|
+
"complexType": {
|
|
141
|
+
"original": "boolean",
|
|
142
|
+
"resolved": "boolean",
|
|
143
|
+
"references": {}
|
|
144
|
+
},
|
|
145
|
+
"required": false,
|
|
146
|
+
"optional": false,
|
|
147
|
+
"docs": {
|
|
148
|
+
"tags": [],
|
|
149
|
+
"text": ""
|
|
150
|
+
},
|
|
151
|
+
"getter": false,
|
|
152
|
+
"setter": false,
|
|
153
|
+
"reflect": false,
|
|
154
|
+
"attribute": "disabled",
|
|
155
|
+
"defaultValue": "false"
|
|
156
|
+
},
|
|
157
|
+
"name": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"mutable": false,
|
|
160
|
+
"complexType": {
|
|
161
|
+
"original": "string",
|
|
162
|
+
"resolved": "string | undefined",
|
|
163
|
+
"references": {}
|
|
164
|
+
},
|
|
165
|
+
"required": false,
|
|
166
|
+
"optional": true,
|
|
167
|
+
"docs": {
|
|
168
|
+
"tags": [],
|
|
169
|
+
"text": ""
|
|
170
|
+
},
|
|
171
|
+
"getter": false,
|
|
172
|
+
"setter": false,
|
|
173
|
+
"reflect": false,
|
|
174
|
+
"attribute": "name"
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
static get states() {
|
|
179
|
+
return {
|
|
180
|
+
"selectedValue": {}
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
static get events() {
|
|
184
|
+
return [{
|
|
185
|
+
"method": "sdChange",
|
|
186
|
+
"name": "sdChange",
|
|
187
|
+
"bubbles": true,
|
|
188
|
+
"cancelable": true,
|
|
189
|
+
"composed": true,
|
|
190
|
+
"docs": {
|
|
191
|
+
"tags": [],
|
|
192
|
+
"text": ""
|
|
193
|
+
},
|
|
194
|
+
"complexType": {
|
|
195
|
+
"original": "RadioValue",
|
|
196
|
+
"resolved": "boolean | number | string",
|
|
197
|
+
"references": {
|
|
198
|
+
"RadioValue": {
|
|
199
|
+
"location": "local",
|
|
200
|
+
"path": "C:/Users/KimMeeKyeong/Documents/sellmate/frontend/design-system/packages/stencil/src/components/sd-radio-group/sd-radio-group.tsx",
|
|
201
|
+
"id": "src/components/sd-radio-group/sd-radio-group.tsx::RadioValue"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}];
|
|
206
|
+
}
|
|
207
|
+
static get watchers() {
|
|
208
|
+
return [{
|
|
209
|
+
"propName": "value",
|
|
210
|
+
"methodName": "valueChanged"
|
|
211
|
+
}];
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
//# sourceMappingURL=sd-radio-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sd-radio-group.js","sourceRoot":"","sources":["../../../src/components/sd-radio-group/sd-radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAgB,KAAK,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AiB,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,GACnE;gBACD,MAAM,CAAC,KAAK,IAAI,YAAM,KAAK,EAAC,uBAAuB,IAAE,MAAM,CAAC,KAAK,CAAQ,CACnE,CACR,CAAC;QACH,CAAC,CAAC,CACG,CACN,CAAC;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Prop, h, EventEmitter, Event, State, Watch } from '@stencil/core';\r\n\r\nexport type RadioValue = string | number | boolean;\r\nexport type RadioOption = {\r\n label: string;\r\n value: RadioValue;\r\n disabled?: boolean;\r\n};\r\n\r\n@Component({\r\n tag: 'sd-radio-group',\r\n styleUrl: 'sd-radio-group.scss',\r\n})\r\nexport class SdRadioGroup {\r\n @Prop({ mutable: true, reflect: true }) value!: RadioValue;\r\n\r\n @Prop({ mutable: true }) radioOptions: RadioOption[] = [];\r\n\r\n @Prop() direction: 'horizonal' | 'vertical' = 'vertical';\r\n\r\n @Prop() disabled: boolean = false;\r\n\r\n @Prop() name?: string;\r\n\r\n @State() private selectedValue!: RadioValue;\r\n\r\n @Event()\r\n sdChange!: EventEmitter<RadioValue>;\r\n\r\n componentWillLoad() {\r\n if (this.value) {\r\n this.selectedValue = this.value;\r\n }\r\n }\r\n\r\n @Watch('value')\r\n valueChanged(newValue: RadioValue) {\r\n this.selectedValue = newValue;\r\n }\r\n\r\n private handleRadioChange = (optionValue: RadioValue, optionDisabled?: boolean) => {\r\n if (this.disabled || optionDisabled) return;\r\n this.selectedValue = optionValue;\r\n this.value = optionValue;\r\n this.sdChange.emit(optionValue);\r\n };\r\n\r\n private isOptionSelected(option: RadioOption): boolean {\r\n return this.selectedValue === option.value;\r\n }\r\n\r\n private isOptionDisabled(option: RadioOption): boolean {\r\n return this.disabled || !!option.disabled;\r\n }\r\n\r\n private getRadioClasses(option: RadioOption): string {\r\n const classes = [\r\n 'sd-radio-group__option',\r\n this.isOptionSelected(option)\r\n ? 'sd-radio-group__option--selected'\r\n : 'sd-radio-group__option--unselected',\r\n ];\r\n\r\n if (this.isOptionDisabled(option)) {\r\n classes.push('sd-radio-group__option--disabled');\r\n }\r\n\r\n return classes.join(' ');\r\n }\r\n\r\n private getGroupClasses(): string {\r\n const classes = ['sd-radio-group', `sd-radio-group--${this.direction}`];\r\n return classes.join(' ');\r\n }\r\n\r\n render() {\r\n const groupName = this.name || `sd-radio-group-${Math.random().toString(36).substring(2, 11)}`;\r\n\r\n return (\r\n <div class={this.getGroupClasses()} role=\"radiogroup\" aria-disabled={this.disabled.toString()}>\r\n {this.radioOptions.map((option, index) => {\r\n const isSelected = this.isOptionSelected(option);\r\n const isDisabled = this.isOptionDisabled(option);\r\n\r\n return (\r\n <label\r\n key={`radio-${index}`}\r\n class={this.getRadioClasses(option)}\r\n role=\"radio\"\r\n aria-checked={isSelected.toString()}\r\n aria-disabled={isDisabled.toString()}\r\n aria-label={option.label || 'radio option'}\r\n >\r\n <input\r\n type=\"radio\"\r\n name={groupName}\r\n value={option.value.toString()}\r\n checked={isSelected}\r\n disabled={isDisabled}\r\n onInput={() => this.handleRadioChange(option.value, option.disabled)}\r\n />\r\n {option.label && <span class=\"sd-radio-group__label\">{option.label}</span>}\r\n </label>\r\n );\r\n })}\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -24,7 +24,7 @@ export class SdSelectOption {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
render() {
|
|
27
|
-
return (h(Host, { key: '
|
|
27
|
+
return (h(Host, { key: '7cf5b51057f8eb7ad7cf7143225bcd842e5fa231' }, h("div", { key: 'ab9e02db38a0717b9aeb85890b150a6e59a9f7ee', class: {
|
|
28
28
|
'sd-select__option': true,
|
|
29
29
|
'sd-select__option--selected': this.isSelected,
|
|
30
30
|
'sd-select__option--disabled': !!this.option.disabled,
|
|
@@ -208,11 +208,11 @@ export class SdSelectMultiple extends BaseDropdownEvent {
|
|
|
208
208
|
'--select-width': this.width || '200px',
|
|
209
209
|
'--select-dropdown-height': this.dropdownHeight || '260px',
|
|
210
210
|
};
|
|
211
|
-
return (h(Host, { key: '
|
|
211
|
+
return (h(Host, { key: '356e513b8d7e856ed22d5358027b163463d55c1d', style: style }, h("div", { key: '3a75650badea618ed89899de57fbd25c020df6d0', class: {
|
|
212
212
|
'sd-select-multiple': true,
|
|
213
213
|
'sd-select-multiple--open': this.isOpen,
|
|
214
214
|
'sd-select-multiple--disabled': this.disabled,
|
|
215
|
-
}, ref: el => (this.selectRef = el) }, this.renderLabel(this.label), h("div", { key: '
|
|
215
|
+
}, ref: el => (this.selectRef = el) }, this.renderLabel(this.label), h("div", { key: 'e42235a132e3c13e9a996206ab7f58698ab97fe1', class: "sd-select-multiple__container" }, this.renderTrigger(), this.renderDropdown()))));
|
|
216
216
|
}
|
|
217
217
|
renderLabel(label) {
|
|
218
218
|
if (!label)
|
|
@@ -39,7 +39,7 @@ export class SdSelectOptionGroup {
|
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
render() {
|
|
42
|
-
return (h("div", { key: '
|
|
42
|
+
return (h("div", { key: '2d1e55e35c77246a2df6856b2e7053cc21aabfc5', class: {
|
|
43
43
|
'sd-select__option-group': true,
|
|
44
44
|
'sd-select__option-group--selected': !!this.isSelected,
|
|
45
45
|
'sd-select__option-group--disabled': !!this.option.disabled,
|
|
@@ -48,10 +48,10 @@ export class SdSelectOptionGroup {
|
|
|
48
48
|
'sd-select__option-group--group': this.option.type === 'group',
|
|
49
49
|
'sd-select__option-group--subgroup': this.option.type === 'subgroup',
|
|
50
50
|
'sd-select__option-group--item': this.option.type === 'item',
|
|
51
|
-
}, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: event => this.handleClick(this.option, this.isSelected, event) }, h("div", { key: '
|
|
51
|
+
}, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: event => this.handleClick(this.option, this.isSelected, event) }, h("div", { key: '33ce9985f9c94502d103d81b3678abdb732dfadb', class: "sd-select__option-group__label-wrapper" }, this.useCheckbox && (h("sd-checkbox", { key: '262ec7ac68b981b5a69c21a5785c2c4ff5db7966', checked: this.isSelected, disabled: this.option.disabled, onClick: e => {
|
|
52
52
|
e.preventDefault();
|
|
53
53
|
this.handleClick(this.option, this.isSelected, e);
|
|
54
|
-
} })), h("span", { key: '
|
|
54
|
+
} })), h("span", { key: 'f9c89b082413da5914e166d53e1fd9bc269395ce', class: "sd-select__option-group-label" }, this.option.label), this.useIndicator && this.option.type !== 'item' && (h("span", { key: 'eaec735454f0b3c102397352d7863662fa933b24', class: "sd-select__option-group__count-indicator" }, `(${this.countInfo?.selectedCount}/${this.countInfo?.totalCount})`)))));
|
|
55
55
|
}
|
|
56
56
|
static get is() { return "sd-select-option-group"; }
|
|
57
57
|
static get originalStyleUrls() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class SdTbody {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: 'aa5030bb9713c355685de66e15db8b702744c0bc' }, h("slot", { key: '2bfed556b78fc92f8f6b4c574f976a7f0a3c36a8' })));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "sd-tbody"; }
|
|
7
7
|
static get originalStyleUrls() {
|
|
@@ -5,11 +5,11 @@ export class SdTd {
|
|
|
5
5
|
tdStyle;
|
|
6
6
|
tdClass;
|
|
7
7
|
render() {
|
|
8
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: '6459518995f28a8138b3f669876c90dd24e610c2', role: "cell", class: {
|
|
9
9
|
'sd-td': true,
|
|
10
10
|
[`sd-td--${this.align}`]: true,
|
|
11
11
|
[this.tdClass || '']: Boolean(this.tdClass),
|
|
12
|
-
}, style: this.tdStyle }, h("slot", { key: '
|
|
12
|
+
}, style: this.tdStyle }, h("slot", { key: 'bf51d35dee9adb6a88b29a6c51be9f73ae1ab3b5' })));
|
|
13
13
|
}
|
|
14
14
|
static get is() { return "sd-td"; }
|
|
15
15
|
static get originalStyleUrls() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class SdTh {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: 'a9adef2bdfd7dd0a52a55fffb40db6511db5747e', role: "columnheader" }, h("slot", { key: 'd4af30df5d6a4a9140a9d10e0f3948de088f8c18' })));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "sd-th"; }
|
|
7
7
|
static get originalStyleUrls() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class SdTr {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: '18a0e95b7264b495bd15aeb7c3a704dac938e140', role: "row" }, h("slot", { key: '83ac4ded200f5e7b18a01d2055859e1093e34d6c' })));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "sd-tr"; }
|
|
7
7
|
static get originalStyleUrls() {
|
|
@@ -165,6 +165,12 @@ export class SdTable {
|
|
|
165
165
|
this.cachedContainerHeight = this.scrollContainer.clientHeight;
|
|
166
166
|
this.cachedContainerWidth = this.scrollContainer.clientWidth;
|
|
167
167
|
middle.addEventListener('scroll', this.onScroll, { passive: true });
|
|
168
|
+
if (this.useVirtualScroll.vertical) {
|
|
169
|
+
this.calculateVisibleRange();
|
|
170
|
+
}
|
|
171
|
+
if (this.useVirtualScroll.horizontal) {
|
|
172
|
+
this.calculateVisibleColumnRange();
|
|
173
|
+
}
|
|
168
174
|
this.onScroll();
|
|
169
175
|
}
|
|
170
176
|
});
|
|
@@ -628,16 +634,16 @@ export class SdTable {
|
|
|
628
634
|
}, "aria-hidden": "true" }, h("div", { class: "sd-table__skeleton-cell" })));
|
|
629
635
|
}
|
|
630
636
|
render() {
|
|
631
|
-
return (h(Host, { key: '
|
|
637
|
+
return (h(Host, { key: '85b4655b2ee298d535add2e43c2ef73b8c816716' }, h("div", { key: '9fc71a34045a725db9fa19fec9954d1edb90f1e4', class: "sd-table__wrapper", style: {
|
|
632
638
|
'--table-width': this.width,
|
|
633
639
|
'--table-height': this.height,
|
|
634
|
-
} }, h("div", { key: '
|
|
640
|
+
} }, h("div", { key: 'dcb78c1bac32c68bc5ac81beece5ee8ca74025ba', class: "sd-table__container", style: {
|
|
635
641
|
'--table-container-height': `calc(${this.height} - ${this.pagination && this.innerRows.length > 0 ? 48 : 0}px)`,
|
|
636
|
-
} }, h("div", { key: '
|
|
642
|
+
} }, h("div", { key: 'e0bb087930f0cf07c06c6f5684a5b26fa5e25a02', class: {
|
|
637
643
|
'sd-table__middle': true,
|
|
638
644
|
'sd-table__middle--scrollable': this.paginatedRows.length > 0,
|
|
639
645
|
'sd-table__middle--loading': this.isLoading,
|
|
640
|
-
} }, this.isLoading && (h("div", { key: '
|
|
646
|
+
} }, this.isLoading && (h("div", { key: '4f36b5fc670aa98774e565b000cc1623a6cae0af', class: "sd-table__middle--loading__spinner" }, h("sd-loading-spinner", { key: '2e794ac56824bfad1f9f42482b75498e7f2ca70c' }))), h("table", { key: 'a4017ae90c8f932c22b26d7f81c9fc13785e52d0', part: "table", class: this.sdTableClasses }, this.renderHead(), this.renderBody())), h("div", { key: 'c7b008d66c47442d25a977d76b7b6dd266d7f008', class: "sd-table__bottom" }, !this.paginatedRows.length && (h("div", { key: '20235f4747c2396710b44d46ea1da659156bb9ca', class: "sd-table__no-data" }, h("slot", { key: '432a8669c4942eb92c4bce7f0b08cb9cb1f9f6e3', name: "no-data" }, this.noDataLabel))))), this.pagination && this.innerRows.length > 0 && (h("div", { key: 'f9f6dc05c1004b03e10ece4c091d67ca564b1633', class: "sd-table__pagination" }, h("sd-pagination", { key: 'd7efd361091fe9725e8c79289501506a779e1111', currentPage: !this.useInternalPagination ? this.pagination.page : this.currentPage, lastPage: !this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber, onPageChange: (e) => this.changePage(e.detail) }), this.useRowsPerPageSelect && (h("sd-select", { key: '401d35d85c2fc78094c267f27d74055108179f9e', value: this.pagination.rowsPerPage, options: this.rowsPerPageOption, width: "128px", onSdChange: (e) => this.changeRowsPerPage(e.detail.value) })))))));
|
|
641
647
|
}
|
|
642
648
|
static get is() { return "sd-table-backup"; }
|
|
643
649
|
static get originalStyleUrls() {
|