@zenkigen-inc/component-ui 1.12.0 → 1.14.3
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/index.esm.js +13 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +12 -8
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.esm.js
CHANGED
|
@@ -479,22 +479,25 @@ function EvaluationStar(_ref) {
|
|
|
479
479
|
'w-6 h-6': size === 'large',
|
|
480
480
|
'w-4 h-4': size === 'medium'
|
|
481
481
|
});
|
|
482
|
-
|
|
483
|
-
var
|
|
484
|
-
var color =
|
|
485
|
-
|
|
482
|
+
// 各評価のレンダリングロジックを分離(React Hooksのルールに準拠)
|
|
483
|
+
var renderStar = function renderStar(rating) {
|
|
484
|
+
var color = rating <= currentRating ? 'fill-yellow-yellow50' : 'fill-icon03';
|
|
485
|
+
return /*#__PURE__*/jsx("button", {
|
|
486
486
|
type: "button",
|
|
487
487
|
onClick: function onClick() {
|
|
488
|
-
return handleChangeRating(
|
|
488
|
+
return handleChangeRating(rating);
|
|
489
489
|
},
|
|
490
490
|
className: clsx$1(color, starClasses),
|
|
491
491
|
disabled: !isEditable,
|
|
492
492
|
children: iconElements['star-filled']
|
|
493
|
-
},
|
|
493
|
+
}, rating);
|
|
494
494
|
};
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
495
|
+
// 宣言的な方法で評価の配列を生成
|
|
496
|
+
var ratingStars = Array.from({
|
|
497
|
+
length: maxRating
|
|
498
|
+
}, function (_, index) {
|
|
499
|
+
return renderStar(index + 1);
|
|
500
|
+
});
|
|
498
501
|
return /*#__PURE__*/jsx("span", {
|
|
499
502
|
className: "flex flex-row",
|
|
500
503
|
children: ratingStars
|
|
@@ -1242,7 +1245,7 @@ var Search = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1242
1245
|
}, {
|
|
1243
1246
|
'h-10 px-4': size === 'large'
|
|
1244
1247
|
});
|
|
1245
|
-
var inputClasses = clsx('mx-2
|
|
1248
|
+
var inputClasses = clsx('mx-2 h-full flex-1 text-text01 outline-0 placeholder:text-textPlaceholder', (_clsx = {}, _clsx['typography-label14regular'] = size === 'medium', _clsx['typography-label16regular'] = size === 'large', _clsx));
|
|
1246
1249
|
return /*#__PURE__*/jsx("div", {
|
|
1247
1250
|
className: "relative",
|
|
1248
1251
|
ref: ref,
|