@ceed/cds 1.36.0-next.1 → 1.37.0-next.1
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/Select/Select.d.ts +9 -1
- package/dist/components/inputs/Select.md +78 -25
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +3 -3
- package/dist/index.cjs +17 -3
- package/dist/index.js +17 -3
- package/framer/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3291,11 +3291,22 @@ function Select(props) {
|
|
|
3291
3291
|
disabled,
|
|
3292
3292
|
required,
|
|
3293
3293
|
onChange,
|
|
3294
|
+
// NOTE: id 를 FormControl 에 넘겨 htmlFor/labelId(`${id}-label`)를 결정론적으로 만든다.
|
|
3295
|
+
// Joy FormControl context 가 FormLabel(id) ↔ Select button(aria-labelledby)을 자동 결선하므로,
|
|
3296
|
+
// 외부에서 useId 로 라벨/버튼 ARIA 를 수동 결합할 필요가 없다.
|
|
3297
|
+
id,
|
|
3298
|
+
slotProps,
|
|
3294
3299
|
// NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
|
|
3295
3300
|
sx,
|
|
3296
3301
|
className,
|
|
3297
3302
|
...innerProps
|
|
3298
3303
|
} = props;
|
|
3304
|
+
const {
|
|
3305
|
+
formControl: formControlProps,
|
|
3306
|
+
formLabel: formLabelProps,
|
|
3307
|
+
formHelperText: formHelperTextProps,
|
|
3308
|
+
...joySlotProps
|
|
3309
|
+
} = slotProps ?? {};
|
|
3299
3310
|
const options = (0, import_react23.useMemo)(
|
|
3300
3311
|
() => props.options.map((option) => {
|
|
3301
3312
|
if (option.hasOwnProperty("value") && option.hasOwnProperty("label")) {
|
|
@@ -3336,6 +3347,7 @@ function Select(props) {
|
|
|
3336
3347
|
disabled,
|
|
3337
3348
|
size,
|
|
3338
3349
|
color: error ? "danger" : color,
|
|
3350
|
+
slotProps: joySlotProps,
|
|
3339
3351
|
onChange: handleChange,
|
|
3340
3352
|
renderValue: (selected) => {
|
|
3341
3353
|
if (!selected) return null;
|
|
@@ -3355,12 +3367,14 @@ function Select(props) {
|
|
|
3355
3367
|
size,
|
|
3356
3368
|
color,
|
|
3357
3369
|
error,
|
|
3370
|
+
id,
|
|
3358
3371
|
sx,
|
|
3359
|
-
className
|
|
3372
|
+
className,
|
|
3373
|
+
...formControlProps
|
|
3360
3374
|
},
|
|
3361
|
-
label && /* @__PURE__ */ import_react23.default.createElement(FormLabel_default,
|
|
3375
|
+
label && /* @__PURE__ */ import_react23.default.createElement(FormLabel_default, { ...formLabelProps }, label),
|
|
3362
3376
|
select,
|
|
3363
|
-
helperText && /* @__PURE__ */ import_react23.default.createElement(FormHelperText_default,
|
|
3377
|
+
helperText && /* @__PURE__ */ import_react23.default.createElement(FormHelperText_default, { ...formHelperTextProps }, helperText)
|
|
3364
3378
|
);
|
|
3365
3379
|
}
|
|
3366
3380
|
Select.displayName = "Select";
|
package/dist/index.js
CHANGED
|
@@ -3176,11 +3176,22 @@ function Select(props) {
|
|
|
3176
3176
|
disabled,
|
|
3177
3177
|
required,
|
|
3178
3178
|
onChange,
|
|
3179
|
+
// NOTE: id 를 FormControl 에 넘겨 htmlFor/labelId(`${id}-label`)를 결정론적으로 만든다.
|
|
3180
|
+
// Joy FormControl context 가 FormLabel(id) ↔ Select button(aria-labelledby)을 자동 결선하므로,
|
|
3181
|
+
// 외부에서 useId 로 라벨/버튼 ARIA 를 수동 결합할 필요가 없다.
|
|
3182
|
+
id,
|
|
3183
|
+
slotProps,
|
|
3179
3184
|
// NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
|
|
3180
3185
|
sx,
|
|
3181
3186
|
className,
|
|
3182
3187
|
...innerProps
|
|
3183
3188
|
} = props;
|
|
3189
|
+
const {
|
|
3190
|
+
formControl: formControlProps,
|
|
3191
|
+
formLabel: formLabelProps,
|
|
3192
|
+
formHelperText: formHelperTextProps,
|
|
3193
|
+
...joySlotProps
|
|
3194
|
+
} = slotProps ?? {};
|
|
3184
3195
|
const options = useMemo8(
|
|
3185
3196
|
() => props.options.map((option) => {
|
|
3186
3197
|
if (option.hasOwnProperty("value") && option.hasOwnProperty("label")) {
|
|
@@ -3221,6 +3232,7 @@ function Select(props) {
|
|
|
3221
3232
|
disabled,
|
|
3222
3233
|
size,
|
|
3223
3234
|
color: error ? "danger" : color,
|
|
3235
|
+
slotProps: joySlotProps,
|
|
3224
3236
|
onChange: handleChange,
|
|
3225
3237
|
renderValue: (selected) => {
|
|
3226
3238
|
if (!selected) return null;
|
|
@@ -3240,12 +3252,14 @@ function Select(props) {
|
|
|
3240
3252
|
size,
|
|
3241
3253
|
color,
|
|
3242
3254
|
error,
|
|
3255
|
+
id,
|
|
3243
3256
|
sx,
|
|
3244
|
-
className
|
|
3257
|
+
className,
|
|
3258
|
+
...formControlProps
|
|
3245
3259
|
},
|
|
3246
|
-
label && /* @__PURE__ */ React21.createElement(FormLabel_default,
|
|
3260
|
+
label && /* @__PURE__ */ React21.createElement(FormLabel_default, { ...formLabelProps }, label),
|
|
3247
3261
|
select,
|
|
3248
|
-
helperText && /* @__PURE__ */ React21.createElement(FormHelperText_default,
|
|
3262
|
+
helperText && /* @__PURE__ */ React21.createElement(FormHelperText_default, { ...formHelperTextProps }, helperText)
|
|
3249
3263
|
);
|
|
3250
3264
|
}
|
|
3251
3265
|
Select.displayName = "Select";
|