@ceed/ads 1.36.0 → 1.37.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/Select/Select.d.ts +9 -1
- package/dist/components/inputs/Select.md +75 -20
- 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
|
@@ -3288,11 +3288,22 @@ function Select(props) {
|
|
|
3288
3288
|
disabled,
|
|
3289
3289
|
required,
|
|
3290
3290
|
onChange,
|
|
3291
|
+
// NOTE: id 를 FormControl 에 넘겨 htmlFor/labelId(`${id}-label`)를 결정론적으로 만든다.
|
|
3292
|
+
// Joy FormControl context 가 FormLabel(id) ↔ Select button(aria-labelledby)을 자동 결선하므로,
|
|
3293
|
+
// 외부에서 useId 로 라벨/버튼 ARIA 를 수동 결합할 필요가 없다.
|
|
3294
|
+
id,
|
|
3295
|
+
slotProps,
|
|
3291
3296
|
// NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
|
|
3292
3297
|
sx,
|
|
3293
3298
|
className,
|
|
3294
3299
|
...innerProps
|
|
3295
3300
|
} = props;
|
|
3301
|
+
const {
|
|
3302
|
+
formControl: formControlProps,
|
|
3303
|
+
formLabel: formLabelProps,
|
|
3304
|
+
formHelperText: formHelperTextProps,
|
|
3305
|
+
...joySlotProps
|
|
3306
|
+
} = slotProps ?? {};
|
|
3296
3307
|
const options = (0, import_react23.useMemo)(
|
|
3297
3308
|
() => props.options.map((option) => {
|
|
3298
3309
|
if (option.hasOwnProperty("value") && option.hasOwnProperty("label")) {
|
|
@@ -3333,6 +3344,7 @@ function Select(props) {
|
|
|
3333
3344
|
disabled,
|
|
3334
3345
|
size,
|
|
3335
3346
|
color: error ? "danger" : color,
|
|
3347
|
+
slotProps: joySlotProps,
|
|
3336
3348
|
onChange: handleChange,
|
|
3337
3349
|
renderValue: (selected) => {
|
|
3338
3350
|
if (!selected) return null;
|
|
@@ -3352,12 +3364,14 @@ function Select(props) {
|
|
|
3352
3364
|
size,
|
|
3353
3365
|
color,
|
|
3354
3366
|
error,
|
|
3367
|
+
id,
|
|
3355
3368
|
sx,
|
|
3356
|
-
className
|
|
3369
|
+
className,
|
|
3370
|
+
...formControlProps
|
|
3357
3371
|
},
|
|
3358
|
-
label && /* @__PURE__ */ import_react23.default.createElement(FormLabel_default,
|
|
3372
|
+
label && /* @__PURE__ */ import_react23.default.createElement(FormLabel_default, { ...formLabelProps }, label),
|
|
3359
3373
|
select,
|
|
3360
|
-
helperText && /* @__PURE__ */ import_react23.default.createElement(FormHelperText_default,
|
|
3374
|
+
helperText && /* @__PURE__ */ import_react23.default.createElement(FormHelperText_default, { ...formHelperTextProps }, helperText)
|
|
3361
3375
|
);
|
|
3362
3376
|
}
|
|
3363
3377
|
Select.displayName = "Select";
|
package/dist/index.js
CHANGED
|
@@ -3165,11 +3165,22 @@ function Select(props) {
|
|
|
3165
3165
|
disabled,
|
|
3166
3166
|
required,
|
|
3167
3167
|
onChange,
|
|
3168
|
+
// NOTE: id 를 FormControl 에 넘겨 htmlFor/labelId(`${id}-label`)를 결정론적으로 만든다.
|
|
3169
|
+
// Joy FormControl context 가 FormLabel(id) ↔ Select button(aria-labelledby)을 자동 결선하므로,
|
|
3170
|
+
// 외부에서 useId 로 라벨/버튼 ARIA 를 수동 결합할 필요가 없다.
|
|
3171
|
+
id,
|
|
3172
|
+
slotProps,
|
|
3168
3173
|
// NOTE: 스타일 관련된 props는 최상위 엘리먼트에 적용한다.
|
|
3169
3174
|
sx,
|
|
3170
3175
|
className,
|
|
3171
3176
|
...innerProps
|
|
3172
3177
|
} = props;
|
|
3178
|
+
const {
|
|
3179
|
+
formControl: formControlProps,
|
|
3180
|
+
formLabel: formLabelProps,
|
|
3181
|
+
formHelperText: formHelperTextProps,
|
|
3182
|
+
...joySlotProps
|
|
3183
|
+
} = slotProps ?? {};
|
|
3173
3184
|
const options = useMemo8(
|
|
3174
3185
|
() => props.options.map((option) => {
|
|
3175
3186
|
if (option.hasOwnProperty("value") && option.hasOwnProperty("label")) {
|
|
@@ -3210,6 +3221,7 @@ function Select(props) {
|
|
|
3210
3221
|
disabled,
|
|
3211
3222
|
size,
|
|
3212
3223
|
color: error ? "danger" : color,
|
|
3224
|
+
slotProps: joySlotProps,
|
|
3213
3225
|
onChange: handleChange,
|
|
3214
3226
|
renderValue: (selected) => {
|
|
3215
3227
|
if (!selected) return null;
|
|
@@ -3229,12 +3241,14 @@ function Select(props) {
|
|
|
3229
3241
|
size,
|
|
3230
3242
|
color,
|
|
3231
3243
|
error,
|
|
3244
|
+
id,
|
|
3232
3245
|
sx,
|
|
3233
|
-
className
|
|
3246
|
+
className,
|
|
3247
|
+
...formControlProps
|
|
3234
3248
|
},
|
|
3235
|
-
label && /* @__PURE__ */ React21.createElement(FormLabel_default,
|
|
3249
|
+
label && /* @__PURE__ */ React21.createElement(FormLabel_default, { ...formLabelProps }, label),
|
|
3236
3250
|
select,
|
|
3237
|
-
helperText && /* @__PURE__ */ React21.createElement(FormHelperText_default,
|
|
3251
|
+
helperText && /* @__PURE__ */ React21.createElement(FormHelperText_default, { ...formHelperTextProps }, helperText)
|
|
3238
3252
|
);
|
|
3239
3253
|
}
|
|
3240
3254
|
Select.displayName = "Select";
|