@kkcompany/app-ui 0.1.4 → 0.1.6

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 CHANGED
@@ -105,7 +105,8 @@ const SeeMore = ({ style, messages = defaultMessages, children, ...rest }) => {
105
105
  (0, react.useEffect)(() => {
106
106
  if (!containeRef.current) return;
107
107
  return onResize(containeRef.current, () => {
108
- const { scrollHeight, clientHeight } = containeRef.current || {};
108
+ if (!containeRef.current) return;
109
+ const { scrollHeight, clientHeight } = containeRef.current;
109
110
  const fontSize = Number.parseFloat(window.getComputedStyle(containeRef.current).fontSize);
110
111
  const scrollable = scrollHeight > clientHeight * 1.3;
111
112
  const fit = fontSize * 3 > scrollHeight;
@@ -162,7 +163,8 @@ const thumbnailImageStyles = {
162
163
  background: "#333",
163
164
  backgroundSize: "contain",
164
165
  backgroundRepeat: "no-repeat",
165
- backgroundPosition: "center"
166
+ backgroundPosition: "center",
167
+ backgroundImage: "url('/static/images/placeholder-video.png')"
166
168
  };
167
169
  const progressStyles = {
168
170
  position: "absolute",
@@ -195,9 +197,9 @@ const tagBaseStyles = {
195
197
  gap: "0.4em",
196
198
  color: "var(--tag-color)",
197
199
  justifyContent: "var(--tag-justify-content, flex-start)",
198
- fontSize: "calc(0.75rem * 5 / 6)",
200
+ fontSize: "0.75rem",
199
201
  "> div": {
200
- padding: "0.4em 0.6em",
202
+ padding: "4px 6px",
201
203
  borderRadius: "0.2em",
202
204
  fontWeight: 600,
203
205
  background: "var(--tag-background)",
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import * as _emotion_react_jsx_runtime0 from "@emotion/react/jsx-runtime";
1
+ import * as _emotion_react_jsx_runtime1 from "@emotion/react/jsx-runtime";
2
2
  import { CSSObject } from "@emotion/react";
3
3
  import { ElementType, MouseEventHandler, ReactElement, ReactNode } from "react";
4
4
  import Link from "next/link";
@@ -10,7 +10,7 @@ declare const Icon: ({
10
10
  }: {
11
11
  style?: {};
12
12
  src: any;
13
- }) => _emotion_react_jsx_runtime0.JSX.Element;
13
+ }) => _emotion_react_jsx_runtime1.JSX.Element;
14
14
  //#endregion
15
15
  //#region src/SeeMore.d.ts
16
16
  declare const defaultMessages: {
@@ -26,7 +26,7 @@ declare const SeeMore: ({
26
26
  style?: CSSObject;
27
27
  messages?: typeof defaultMessages;
28
28
  children?: ReactNode;
29
- }) => _emotion_react_jsx_runtime0.JSX.Element;
29
+ }) => _emotion_react_jsx_runtime1.JSX.Element;
30
30
  //#endregion
31
31
  //#region src/VideoItem.d.ts
32
32
  type VideoDetail = {
@@ -88,6 +88,6 @@ declare const VideoThumbnail: ({
88
88
  Image?: ElementType;
89
89
  };
90
90
  onClick?: MouseEventHandler<HTMLAnchorElement>;
91
- }) => _emotion_react_jsx_runtime0.JSX.Element;
91
+ }) => _emotion_react_jsx_runtime1.JSX.Element;
92
92
  //#endregion
93
93
  export { Icon, SeeMore, VideoItem, VideoThumbnail };
package/dist/index.mjs CHANGED
@@ -105,7 +105,8 @@ const SeeMore = ({ style, messages = defaultMessages, children, ...rest }) => {
105
105
  useEffect(() => {
106
106
  if (!containeRef.current) return;
107
107
  return onResize(containeRef.current, () => {
108
- const { scrollHeight, clientHeight } = containeRef.current || {};
108
+ if (!containeRef.current) return;
109
+ const { scrollHeight, clientHeight } = containeRef.current;
109
110
  const fontSize = Number.parseFloat(window.getComputedStyle(containeRef.current).fontSize);
110
111
  const scrollable = scrollHeight > clientHeight * 1.3;
111
112
  const fit = fontSize * 3 > scrollHeight;
@@ -162,7 +163,8 @@ const thumbnailImageStyles = {
162
163
  background: "#333",
163
164
  backgroundSize: "contain",
164
165
  backgroundRepeat: "no-repeat",
165
- backgroundPosition: "center"
166
+ backgroundPosition: "center",
167
+ backgroundImage: "url('/static/images/placeholder-video.png')"
166
168
  };
167
169
  const progressStyles = {
168
170
  position: "absolute",
@@ -195,9 +197,9 @@ const tagBaseStyles = {
195
197
  gap: "0.4em",
196
198
  color: "var(--tag-color)",
197
199
  justifyContent: "var(--tag-justify-content, flex-start)",
198
- fontSize: "calc(0.75rem * 5 / 6)",
200
+ fontSize: "0.75rem",
199
201
  "> div": {
200
- padding: "0.4em 0.6em",
202
+ padding: "4px 6px",
201
203
  borderRadius: "0.2em",
202
204
  fontWeight: 600,
203
205
  background: "var(--tag-background)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kkcompany/app-ui",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "module": "dist/index.mjs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.mts",