@kkcompany/app-ui 0.1.23 → 0.1.24
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.cjs +3 -2
- package/dist/index.d.cts +5 -5
- package/dist/index.mjs +3 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -275,13 +275,14 @@ const Dropdown = ({ className, options = [], value = null, activeIndex = -1, pla
|
|
|
275
275
|
let selectedIndex = options.findIndex((item) => value && item.value === value);
|
|
276
276
|
if (selectedIndex === -1) selectedIndex = activeIndex;
|
|
277
277
|
const selectedOption = options[selectedIndex];
|
|
278
|
+
const selectedLabel = selectedOption?.label || selectedOption?.value;
|
|
278
279
|
return /* @__PURE__ */ (0, __emotion_react_jsx_runtime.jsxs)("div", {
|
|
279
280
|
css: dropdownStyle,
|
|
280
|
-
className
|
|
281
|
+
className: `kks-dropdown ${className || ""}`,
|
|
281
282
|
ref: dropdownRef,
|
|
282
283
|
children: [/* @__PURE__ */ (0, __emotion_react_jsx_runtime.jsx)(Button, {
|
|
283
284
|
showMenu,
|
|
284
|
-
label:
|
|
285
|
+
label: selectedLabel,
|
|
285
286
|
placeholder,
|
|
286
287
|
disabled,
|
|
287
288
|
onClick: toggleMenu
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementType, MouseEventHandler, ReactElement, ReactNode } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _emotion_react_jsx_runtime1 from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { CSSObject } from "@emotion/react";
|
|
4
4
|
import Link from "next/link";
|
|
5
5
|
|
|
@@ -54,7 +54,7 @@ declare const HiddenToggle: ({
|
|
|
54
54
|
defaultEnabled?: boolean;
|
|
55
55
|
children: any;
|
|
56
56
|
onChange: any;
|
|
57
|
-
}) =>
|
|
57
|
+
}) => _emotion_react_jsx_runtime1.JSX.Element;
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region src/Icon.d.ts
|
|
60
60
|
declare const Icon: ({
|
|
@@ -63,7 +63,7 @@ declare const Icon: ({
|
|
|
63
63
|
}: {
|
|
64
64
|
style?: {};
|
|
65
65
|
src: any;
|
|
66
|
-
}) =>
|
|
66
|
+
}) => _emotion_react_jsx_runtime1.JSX.Element;
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region src/SeeMore.d.ts
|
|
69
69
|
declare const defaultMessages: {
|
|
@@ -79,7 +79,7 @@ declare const SeeMore: ({
|
|
|
79
79
|
style?: CSSObject;
|
|
80
80
|
messages?: typeof defaultMessages;
|
|
81
81
|
children?: ReactNode;
|
|
82
|
-
}) =>
|
|
82
|
+
}) => _emotion_react_jsx_runtime1.JSX.Element;
|
|
83
83
|
//#endregion
|
|
84
84
|
//#region src/VideoItem.d.ts
|
|
85
85
|
type VideoDetail = {
|
|
@@ -143,6 +143,6 @@ declare const VideoThumbnail: ({
|
|
|
143
143
|
Image?: ElementType;
|
|
144
144
|
};
|
|
145
145
|
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
146
|
-
}) =>
|
|
146
|
+
}) => _emotion_react_jsx_runtime1.JSX.Element;
|
|
147
147
|
//#endregion
|
|
148
148
|
export { Dropdown, HiddenToggle, Icon, SeeMore, VideoItem, VideoThumbnail };
|
package/dist/index.mjs
CHANGED
|
@@ -275,13 +275,14 @@ const Dropdown = ({ className, options = [], value = null, activeIndex = -1, pla
|
|
|
275
275
|
let selectedIndex = options.findIndex((item) => value && item.value === value);
|
|
276
276
|
if (selectedIndex === -1) selectedIndex = activeIndex;
|
|
277
277
|
const selectedOption = options[selectedIndex];
|
|
278
|
+
const selectedLabel = selectedOption?.label || selectedOption?.value;
|
|
278
279
|
return /* @__PURE__ */ jsxs("div", {
|
|
279
280
|
css: dropdownStyle,
|
|
280
|
-
className
|
|
281
|
+
className: `kks-dropdown ${className || ""}`,
|
|
281
282
|
ref: dropdownRef,
|
|
282
283
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
283
284
|
showMenu,
|
|
284
|
-
label:
|
|
285
|
+
label: selectedLabel,
|
|
285
286
|
placeholder,
|
|
286
287
|
disabled,
|
|
287
288
|
onClick: toggleMenu
|