@liner-fe/prism 2.1.58 → 2.1.59
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/lib/illust.cjs +121 -0
- package/lib/illust.cjs.map +1 -0
- package/lib/illust.d.cts +28 -0
- package/lib/{index.js → index.cjs} +19 -104
- package/lib/index.cjs.map +1 -0
- package/lib/{index.d.ts → index.d.cts} +1 -26
- package/package.json +5 -2
- package/lib/index.js.map +0 -1
package/lib/illust.cjs
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
|
|
31
|
+
// src/illust.ts
|
|
32
|
+
var illust_exports = {};
|
|
33
|
+
__export(illust_exports, {
|
|
34
|
+
Illust: () => Illust,
|
|
35
|
+
prefetchIllust: () => prefetchIllust
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(illust_exports);
|
|
38
|
+
|
|
39
|
+
// src/constants/illust/size.ts
|
|
40
|
+
var ratio = { "16:9": { width: 1344, height: 756 }, "4:3": { width: 1008, height: 756 } };
|
|
41
|
+
var illustSize = {
|
|
42
|
+
"object-pencil_paper-16_9": ratio["16:9"],
|
|
43
|
+
"object-smoke-16_9": ratio["16:9"],
|
|
44
|
+
"person-standing_with_a_star-16_9": ratio["16:9"],
|
|
45
|
+
"person-searching-16_9": ratio["16:9"],
|
|
46
|
+
"person-cheerup-16_9": ratio["16:9"],
|
|
47
|
+
"object-graduation_cap_pencil-4_3": ratio["4:3"],
|
|
48
|
+
"object-book_pencil-4_3": ratio["4:3"],
|
|
49
|
+
"object-puzzle-4_3": ratio["4:3"],
|
|
50
|
+
"object-magnifying_glass-4_3": ratio["4:3"],
|
|
51
|
+
"object-lock-4_3": ratio["4:3"],
|
|
52
|
+
"object-empty_box-4_3": ratio["4:3"],
|
|
53
|
+
"person-working_01-4_3": ratio["4:3"],
|
|
54
|
+
"person-searching_01-4_3": ratio["4:3"],
|
|
55
|
+
"person-worried_01-4_3": ratio["4:3"],
|
|
56
|
+
"person-worried_02-4_3": ratio["4:3"],
|
|
57
|
+
"person-worried_03-4_3": ratio["4:3"],
|
|
58
|
+
"person-worried_04-4_3": ratio["4:3"],
|
|
59
|
+
"person-working_02-4_3": ratio["4:3"],
|
|
60
|
+
"person-bye-4_3": ratio["4:3"],
|
|
61
|
+
"person-space_in_work-4_3": ratio["4:3"],
|
|
62
|
+
"person-cheerup-4_3": ratio["4:3"]
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
// src/components/Illust/index.tsx
|
|
66
|
+
var import_image = __toESM(require("next/image"), 1);
|
|
67
|
+
|
|
68
|
+
// src/constants/illust/path.ts
|
|
69
|
+
var ILLUST = "/illust";
|
|
70
|
+
var DARK_MODE_ILLUST_PREFIX = `${ILLUST}/dark/`;
|
|
71
|
+
var LIGHT_MODE_ILLUST_PREFIX = `${ILLUST}/light/`;
|
|
72
|
+
|
|
73
|
+
// src/hooks/useIllust.ts
|
|
74
|
+
var import_design_token = require("@liner-fe/design-token");
|
|
75
|
+
var useIllust = /* @__PURE__ */ __name(({ darkSrc, src }) => {
|
|
76
|
+
const { isDarkMode } = (0, import_design_token.useDarkTheme)();
|
|
77
|
+
const sourcePrefix = (() => {
|
|
78
|
+
if (isDarkMode) {
|
|
79
|
+
if (darkSrc?.inverse) {
|
|
80
|
+
return LIGHT_MODE_ILLUST_PREFIX;
|
|
81
|
+
}
|
|
82
|
+
return DARK_MODE_ILLUST_PREFIX;
|
|
83
|
+
}
|
|
84
|
+
if (src.inverse === false) {
|
|
85
|
+
return DARK_MODE_ILLUST_PREFIX;
|
|
86
|
+
}
|
|
87
|
+
return LIGHT_MODE_ILLUST_PREFIX;
|
|
88
|
+
})();
|
|
89
|
+
const currentSourceByColorTheme = isDarkMode ? darkSrc?.name || src.name : src.name;
|
|
90
|
+
return { sourcePrefix, currentSourceByColorTheme, isDarkMode };
|
|
91
|
+
}, "useIllust");
|
|
92
|
+
|
|
93
|
+
// src/components/Illust/index.tsx
|
|
94
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
95
|
+
var Illust = /* @__PURE__ */ __name((props) => {
|
|
96
|
+
const { src, width, margin } = props;
|
|
97
|
+
const { sourcePrefix, currentSourceByColorTheme } = useIllust({
|
|
98
|
+
darkSrc: src.dark,
|
|
99
|
+
src: src.light
|
|
100
|
+
});
|
|
101
|
+
const aspectRatio = illustSize[currentSourceByColorTheme] ? illustSize[currentSourceByColorTheme].width / illustSize[currentSourceByColorTheme].height : void 0;
|
|
102
|
+
const css = {
|
|
103
|
+
width,
|
|
104
|
+
margin
|
|
105
|
+
};
|
|
106
|
+
const source = `${sourcePrefix}${currentSourceByColorTheme}.webp`;
|
|
107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: css, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
108
|
+
import_image.default,
|
|
109
|
+
{
|
|
110
|
+
alt: currentSourceByColorTheme,
|
|
111
|
+
...props,
|
|
112
|
+
src: source,
|
|
113
|
+
width,
|
|
114
|
+
height: aspectRatio ? width / aspectRatio : width
|
|
115
|
+
}
|
|
116
|
+
) });
|
|
117
|
+
}, "Illust");
|
|
118
|
+
|
|
119
|
+
// src/utils/illust.ts
|
|
120
|
+
var prefetchIllust = /* @__PURE__ */ __name(async ({ name, isDark = false }) => await fetch(`${ILLUST}${isDark ? "/dark/" : "/light/"}${name}.webp`), "prefetchIllust");
|
|
121
|
+
//# sourceMappingURL=illust.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/illust.ts","../src/constants/illust/size.ts","../src/components/Illust/index.tsx","../src/constants/illust/path.ts","../src/hooks/useIllust.ts","../src/utils/illust.ts"],"sourcesContent":["export * from './components/Illust';\nexport * from './utils/illust';\n","import { IllustType } from '@/types/illust';\n\nconst ratio = { '16:9': { width: 1344, height: 756 }, '4:3': { width: 1008, height: 756 } };\n\nexport const illustSize: Partial<Record<IllustType, { width: number; height: number }>> = {\n 'object-pencil_paper-16_9': ratio['16:9'],\n 'object-smoke-16_9': ratio['16:9'],\n 'person-standing_with_a_star-16_9': ratio['16:9'],\n 'person-searching-16_9': ratio['16:9'],\n 'person-cheerup-16_9': ratio['16:9'],\n 'object-graduation_cap_pencil-4_3': ratio['4:3'],\n 'object-book_pencil-4_3': ratio['4:3'],\n 'object-puzzle-4_3': ratio['4:3'],\n 'object-magnifying_glass-4_3': ratio['4:3'],\n 'object-lock-4_3': ratio['4:3'],\n 'object-empty_box-4_3': ratio['4:3'],\n 'person-working_01-4_3': ratio['4:3'],\n 'person-searching_01-4_3': ratio['4:3'],\n 'person-worried_01-4_3': ratio['4:3'],\n 'person-worried_02-4_3': ratio['4:3'],\n 'person-worried_03-4_3': ratio['4:3'],\n 'person-worried_04-4_3': ratio['4:3'],\n 'person-working_02-4_3': ratio['4:3'],\n 'person-bye-4_3': ratio['4:3'],\n 'person-space_in_work-4_3': ratio['4:3'],\n 'person-cheerup-4_3': ratio['4:3'],\n};\n","import { illustSize } from '@/constants/illust/size';\nimport Image, { ImageProps } from 'next/image';\nimport { CSSProperties } from 'react';\nimport { useIllust } from '@/hooks/useIllust';\nimport { IllustType } from '@/types/illust';\nimport { Property } from 'csstype';\n\nexport interface Source<T extends false | true = true> {\n name: IllustType;\n inverse?: T;\n}\n\ninterface IProps extends Omit<ImageProps, 'alt' | 'width' | 'height' | 'fill' | 'src'> {\n width: number;\n src: { light: Source<false>; dark?: Source };\n margin?: Property.Margin<string>;\n}\n\nexport const Illust = (props: IProps) => {\n const { src, width, margin } = props;\n const { sourcePrefix, currentSourceByColorTheme } = useIllust({\n darkSrc: src.dark,\n src: src.light,\n });\n\n const aspectRatio = illustSize[currentSourceByColorTheme]\n ? illustSize[currentSourceByColorTheme].width / illustSize[currentSourceByColorTheme].height\n : undefined;\n\n const css: CSSProperties = {\n width,\n margin,\n };\n\n const source = `${sourcePrefix}${currentSourceByColorTheme}.webp`;\n\n return (\n <div style={css}>\n <Image\n alt={currentSourceByColorTheme}\n {...props}\n src={source}\n width={width}\n height={aspectRatio ? width / aspectRatio : width}\n />\n </div>\n );\n};\n","export const ILLUST = '/illust';\n\nexport const DARK_MODE_ILLUST_PREFIX = `${ILLUST}/dark/`;\nexport const LIGHT_MODE_ILLUST_PREFIX = `${ILLUST}/light/`;\n","import { Source } from '@/components/Illust';\nimport { DARK_MODE_ILLUST_PREFIX, LIGHT_MODE_ILLUST_PREFIX } from '@/constants/illust/path';\nimport { useDarkTheme } from '@liner-fe/design-token';\n\nexport const useIllust = ({ darkSrc, src }: { darkSrc?: Source; src: Source<false> }) => {\n const { isDarkMode } = useDarkTheme();\n\n const sourcePrefix = (() => {\n if (isDarkMode) {\n if (darkSrc?.inverse) {\n return LIGHT_MODE_ILLUST_PREFIX;\n }\n\n return DARK_MODE_ILLUST_PREFIX;\n }\n\n if (src.inverse === false) {\n return DARK_MODE_ILLUST_PREFIX;\n }\n\n return LIGHT_MODE_ILLUST_PREFIX;\n })();\n\n const currentSourceByColorTheme = isDarkMode ? darkSrc?.name || src.name : src.name;\n\n return { sourcePrefix, currentSourceByColorTheme, isDarkMode };\n};\n","import { ILLUST } from '@/constants/illust/path';\nimport { IllustType } from '@/types/illust';\n\nexport const prefetchIllust = async ({ name, isDark = false }: { name: IllustType; isDark?: boolean }) =>\n await fetch(`${ILLUST}${isDark ? '/dark/' : '/light/'}${name}.webp`);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,IAAM,QAAQ,EAAE,QAAQ,EAAE,OAAO,MAAM,QAAQ,IAAI,GAAG,OAAO,EAAE,OAAO,MAAM,QAAQ,IAAI,EAAE;AAEnF,IAAM,aAA6E;AAAA,EACxF,4BAA4B,MAAM,MAAM;AAAA,EACxC,qBAAqB,MAAM,MAAM;AAAA,EACjC,oCAAoC,MAAM,MAAM;AAAA,EAChD,yBAAyB,MAAM,MAAM;AAAA,EACrC,uBAAuB,MAAM,MAAM;AAAA,EACnC,oCAAoC,MAAM,KAAK;AAAA,EAC/C,0BAA0B,MAAM,KAAK;AAAA,EACrC,qBAAqB,MAAM,KAAK;AAAA,EAChC,+BAA+B,MAAM,KAAK;AAAA,EAC1C,mBAAmB,MAAM,KAAK;AAAA,EAC9B,wBAAwB,MAAM,KAAK;AAAA,EACnC,yBAAyB,MAAM,KAAK;AAAA,EACpC,2BAA2B,MAAM,KAAK;AAAA,EACtC,yBAAyB,MAAM,KAAK;AAAA,EACpC,yBAAyB,MAAM,KAAK;AAAA,EACpC,yBAAyB,MAAM,KAAK;AAAA,EACpC,yBAAyB,MAAM,KAAK;AAAA,EACpC,yBAAyB,MAAM,KAAK;AAAA,EACpC,kBAAkB,MAAM,KAAK;AAAA,EAC7B,4BAA4B,MAAM,KAAK;AAAA,EACvC,sBAAsB,MAAM,KAAK;AACnC;;;ACzBA,mBAAkC;;;ACD3B,IAAM,SAAS;AAEf,IAAM,0BAA0B,GAAG,MAAM;AACzC,IAAM,2BAA2B,GAAG,MAAM;;;ACDjD,0BAA6B;AAEtB,IAAM,YAAY,wBAAC,EAAE,SAAS,IAAI,MAAgD;AACvF,QAAM,EAAE,WAAW,QAAI,kCAAa;AAEpC,QAAM,gBAAgB,MAAM;AAC1B,QAAI,YAAY;AACd,UAAI,SAAS,SAAS;AACpB,eAAO;AAAA,MACT;AAEA,aAAO;AAAA,IACT;AAEA,QAAI,IAAI,YAAY,OAAO;AACzB,aAAO;AAAA,IACT;AAEA,WAAO;AAAA,EACT,GAAG;AAEH,QAAM,4BAA4B,aAAa,SAAS,QAAQ,IAAI,OAAO,IAAI;AAE/E,SAAO,EAAE,cAAc,2BAA2B,WAAW;AAC/D,GAtByB;;;AFkCnB;AApBC,IAAM,SAAS,wBAAC,UAAkB;AACvC,QAAM,EAAE,KAAK,OAAO,OAAO,IAAI;AAC/B,QAAM,EAAE,cAAc,0BAA0B,IAAI,UAAU;AAAA,IAC5D,SAAS,IAAI;AAAA,IACb,KAAK,IAAI;AAAA,EACX,CAAC;AAED,QAAM,cAAc,WAAW,yBAAyB,IACpD,WAAW,yBAAyB,EAAE,QAAQ,WAAW,yBAAyB,EAAE,SACpF;AAEJ,QAAM,MAAqB;AAAA,IACzB;AAAA,IACA;AAAA,EACF;AAEA,QAAM,SAAS,GAAG,YAAY,GAAG,yBAAyB;AAE1D,SACE,4CAAC,SAAI,OAAO,KACV;AAAA,IAAC,aAAAA;AAAA,IAAA;AAAA,MACC,KAAK;AAAA,MACJ,GAAG;AAAA,MACJ,KAAK;AAAA,MACL;AAAA,MACA,QAAQ,cAAc,QAAQ,cAAc;AAAA;AAAA,EAC9C,GACF;AAEJ,GA7BsB;;;AGff,IAAM,iBAAiB,8BAAO,EAAE,MAAM,SAAS,MAAM,MAC1D,MAAM,MAAM,GAAG,MAAM,GAAG,SAAS,WAAW,SAAS,GAAG,IAAI,OAAO,GADvC;","names":["Image"]}
|
package/lib/illust.d.cts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ImageProps } from 'next/image';
|
|
3
|
+
import { Property } from 'csstype';
|
|
4
|
+
|
|
5
|
+
type LightIllustType = "decoration-airplane-1_1" | "decoration-bulb-1_1" | "decoration-car-1_1" | "decoration-coffee-1_1" | "decoration-english-1_1" | "decoration-flag-1_1" | "decoration-hourglass-1_1" | "decoration-money-1_1" | "decoration-palm-1_1" | "decoration-rocket-1_1" | "decoration-shake_hands-1_1" | "decoration-star_01-1_1" | "decoration-star_02-1_1" | "decoration-star_03-1_1" | "decoration-star_04-1_1" | "decoration-star_05-1_1" | "decoration-star_06-1_1" | "decoration-star_07-1_1" | "decoration-star_08-1_1" | "decoration-star_09-1_1" | "decoration-star_10-1_1" | "decoration-star_11-1_1" | "decoration-tennis-1_1" | "object-bomb-1_1" | "object-book_pencil-4_3" | "object-brain-1_1" | "object-clap-1_1" | "object-documents_02-1_1" | "object-empty_box-1_1" | "object-empty_box-4_3" | "object-feather_pen-1_1" | "object-folder_01-1_1" | "object-folder_02-1_1" | "object-free_ticket-1_1" | "object-gift-1_1" | "object-give_gift-1_1" | "object-graduation_cap_pencil-4_3" | "object-lock-4_3" | "object-magnifying_glass-1_1" | "object-magnifying_glass-4_3" | "object-megaphone-1_1" | "object-paper-1_1" | "object-pencil_paper-16_9" | "object-puzzle-4_3" | "object-smoke-16_9" | "object-university_01-1_1" | "object-university_02-1_1" | "object_documents_01-1_1" | "object_find_man-1_1" | "person-ai_writing-1_1" | "person-bye-4_3" | "person-cheerup-16_9" | "person-cheerup-4_3" | "person-holding_a_book-1_1" | "person-introduce-1_1" | "person-introduce-pro-1_1" | "person-make_profile-1_1" | "person-raining-1_1" | "person-searching-16_9" | "person-searching_01-1_1" | "person-searching_01-4_3" | "person-searching_02-1_1" | "person-space_in_work-4_3" | "person-standing_with_a_star-16_9" | "person-time_out_01-1_1" | "person-time_out_02-1_1" | "person-time_out_03-1_1" | "person-time_out_04-1_1" | "person-time_out_05-1_1" | "person-understand-1_1" | "person-working_01-4_3" | "person-working_02-4_3" | "person-worried-1_1" | "person-worried_01-4_3" | "person-worried_02-4_3" | "person-worried_03-4_3" | "person-worried_04-4_3" | "person-writing_01-1_1" | "person-writing_02-1_1";
|
|
6
|
+
type DarkIllustType = "decoration-airplane-1_1" | "decoration-bulb-1_1" | "decoration-car-1_1" | "decoration-flag-1_1" | "decoration-hourglass-1_1" | "decoration-rocket-1_1" | "decoration-star_01-1_1" | "decoration-star_02-1_1" | "decoration-star_03-1_1" | "decoration-star_04-1_1" | "decoration-star_05-1_1" | "decoration-star_06-1_1" | "decoration-star_07-1_1" | "decoration-star_08-1_1" | "decoration-star_09-1_1" | "decoration-star_10-1_1" | "decoration-star_11-1_1" | "object-bomb-1_1" | "object-brain-1_1" | "object-clap-1_1" | "object-documents_02-1_1" | "object-empty_box-1_1" | "object-empty_box-4_3" | "object-folder_01-1_1" | "object-folder_02-1_1" | "object-free_ticket-1_1" | "object-gift-1_1" | "object-give_gift-1_1" | "object-graduation_cap_pencil-4_3" | "object-lock-4_3" | "object-magnifying_glass-1_1" | "object-magnifying_glass-4_3" | "object-megaphone-1_1" | "object-paper-1_1" | "object-pencil_paper-16_9" | "object-puzzle-4_3" | "object-smoke-16_9" | "object_documents_01-1_1" | "object_find_man-1_1" | "person-bye-4_3" | "person-holding_a_book-1_1" | "person-introduce-1_1" | "person-introduce-pro-1_1" | "person-make_profile-1_1" | "person-raining-1_1" | "person-searching-16_9" | "person-searching_01-1_1" | "person-searching_01-4_3" | "person-searching_02-1_1" | "person-space_in_work-4_3" | "person-standing_with_a_star-16_9" | "person-time_out_01-1_1" | "person-time_out_02-1_1" | "person-time_out_03-1_1" | "person-time_out_04-1_1" | "person-time_out_05-1_1" | "person-working_01-4_3" | "person-worried-1_1" | "person-worried_01-4_3" | "person-worried_02-4_3" | "person-worried_03-4_3" | "person-worried_04-4_3" | "person-writing_01-1_1";
|
|
7
|
+
type IllustType = DarkIllustType | LightIllustType;
|
|
8
|
+
|
|
9
|
+
interface Source<T extends false | true = true> {
|
|
10
|
+
name: IllustType;
|
|
11
|
+
inverse?: T;
|
|
12
|
+
}
|
|
13
|
+
interface IProps extends Omit<ImageProps, 'alt' | 'width' | 'height' | 'fill' | 'src'> {
|
|
14
|
+
width: number;
|
|
15
|
+
src: {
|
|
16
|
+
light: Source<false>;
|
|
17
|
+
dark?: Source;
|
|
18
|
+
};
|
|
19
|
+
margin?: Property.Margin<string>;
|
|
20
|
+
}
|
|
21
|
+
declare const Illust: (props: IProps) => react_jsx_runtime.JSX.Element;
|
|
22
|
+
|
|
23
|
+
declare const prefetchIllust: ({ name, isDark }: {
|
|
24
|
+
name: IllustType;
|
|
25
|
+
isDark?: boolean;
|
|
26
|
+
}) => Promise<Response>;
|
|
27
|
+
|
|
28
|
+
export { Illust, type Source, prefetchIllust };
|
|
@@ -39,7 +39,6 @@ __export(index_exports, {
|
|
|
39
39
|
Heading: () => Heading,
|
|
40
40
|
Icon: () => Icon,
|
|
41
41
|
IconButton: () => IconButton,
|
|
42
|
-
Illust: () => Illust,
|
|
43
42
|
Label: () => Label,
|
|
44
43
|
List: () => List,
|
|
45
44
|
Loading: () => Loading,
|
|
@@ -63,7 +62,6 @@ __export(index_exports, {
|
|
|
63
62
|
iconMap: () => iconMap,
|
|
64
63
|
isEmptyObject: () => isEmptyObject,
|
|
65
64
|
objectToArray: () => objectToArray,
|
|
66
|
-
prefetchIllust: () => prefetchIllust,
|
|
67
65
|
rootMediaStyle: () => rootMediaStyle,
|
|
68
66
|
useToast: () => useToast
|
|
69
67
|
});
|
|
@@ -8045,11 +8043,11 @@ var style_module_default = {
|
|
|
8045
8043
|
|
|
8046
8044
|
// src/components/Button/index.tsx
|
|
8047
8045
|
var import_cva3 = require("cva");
|
|
8048
|
-
var import_clsx2 = __toESM(require("clsx"));
|
|
8046
|
+
var import_clsx2 = __toESM(require("clsx"), 1);
|
|
8049
8047
|
|
|
8050
8048
|
// src/components/Icon/index.tsx
|
|
8051
8049
|
var import_cva = require("cva");
|
|
8052
|
-
var import_clsx = __toESM(require("clsx"));
|
|
8050
|
+
var import_clsx = __toESM(require("clsx"), 1);
|
|
8053
8051
|
|
|
8054
8052
|
// src/components/Icon/style.module.scss
|
|
8055
8053
|
var style_module_default2 = {
|
|
@@ -9872,7 +9870,7 @@ var style_module_default4 = {
|
|
|
9872
9870
|
var import_react5 = require("react");
|
|
9873
9871
|
|
|
9874
9872
|
// src/components/Typography/Set/Paragraph.tsx
|
|
9875
|
-
var import_clsx3 = __toESM(require("clsx"));
|
|
9873
|
+
var import_clsx3 = __toESM(require("clsx"), 1);
|
|
9876
9874
|
var import_react4 = require("react");
|
|
9877
9875
|
|
|
9878
9876
|
// src/components/Typography/utils.ts
|
|
@@ -9932,7 +9930,7 @@ var Paragraph = (0, import_react4.forwardRef)(
|
|
|
9932
9930
|
|
|
9933
9931
|
// src/components/Toast/index.tsx
|
|
9934
9932
|
var import_recoil2 = require("recoil");
|
|
9935
|
-
var import_lottie_web = __toESM(require("lottie-web"));
|
|
9933
|
+
var import_lottie_web = __toESM(require("lottie-web"), 1);
|
|
9936
9934
|
|
|
9937
9935
|
// src/lottie/loading.json
|
|
9938
9936
|
var loading_default = {
|
|
@@ -10496,7 +10494,7 @@ var SingleToast = /* @__PURE__ */ __name((props) => {
|
|
|
10496
10494
|
|
|
10497
10495
|
// src/components/Typography/Set/Heading.tsx
|
|
10498
10496
|
var import_react7 = require("react");
|
|
10499
|
-
var import_clsx4 = __toESM(require("clsx"));
|
|
10497
|
+
var import_clsx4 = __toESM(require("clsx"), 1);
|
|
10500
10498
|
var import_jsx_runtime179 = require("react/jsx-runtime");
|
|
10501
10499
|
var Heading = (0, import_react7.forwardRef)(
|
|
10502
10500
|
({ size, children, type, className, color = "neutral-label-primary", as, ...rest }, ref) => {
|
|
@@ -10514,7 +10512,7 @@ var Heading = (0, import_react7.forwardRef)(
|
|
|
10514
10512
|
);
|
|
10515
10513
|
|
|
10516
10514
|
// src/components/Typography/Set/Caption.tsx
|
|
10517
|
-
var import_clsx5 = __toESM(require("clsx"));
|
|
10515
|
+
var import_clsx5 = __toESM(require("clsx"), 1);
|
|
10518
10516
|
var import_react8 = require("react");
|
|
10519
10517
|
var import_jsx_runtime180 = require("react/jsx-runtime");
|
|
10520
10518
|
var Caption = (0, import_react8.forwardRef)(
|
|
@@ -10538,7 +10536,7 @@ var Caption = (0, import_react8.forwardRef)(
|
|
|
10538
10536
|
|
|
10539
10537
|
// src/components/Typography/Set/Title.tsx
|
|
10540
10538
|
var import_react9 = require("react");
|
|
10541
|
-
var import_clsx6 = __toESM(require("clsx"));
|
|
10539
|
+
var import_clsx6 = __toESM(require("clsx"), 1);
|
|
10542
10540
|
var import_jsx_runtime181 = require("react/jsx-runtime");
|
|
10543
10541
|
var Title2 = (0, import_react9.forwardRef)(
|
|
10544
10542
|
({ weight, size, type, className, children, color = "neutral-label-primary", as: Element = "p", ...rest }, ref) => {
|
|
@@ -10555,7 +10553,7 @@ var Title2 = (0, import_react9.forwardRef)(
|
|
|
10555
10553
|
);
|
|
10556
10554
|
|
|
10557
10555
|
// src/components/Typography/Set/Display.tsx
|
|
10558
|
-
var import_clsx7 = __toESM(require("clsx"));
|
|
10556
|
+
var import_clsx7 = __toESM(require("clsx"), 1);
|
|
10559
10557
|
var import_react10 = require("react");
|
|
10560
10558
|
var import_jsx_runtime182 = require("react/jsx-runtime");
|
|
10561
10559
|
var Display = (0, import_react10.forwardRef)(
|
|
@@ -10663,7 +10661,7 @@ var Typography = /* @__PURE__ */ __name((props) => {
|
|
|
10663
10661
|
}, "Typography");
|
|
10664
10662
|
|
|
10665
10663
|
// src/components/Popover/index.tsx
|
|
10666
|
-
var React17 = __toESM(require("react"));
|
|
10664
|
+
var React17 = __toESM(require("react"), 1);
|
|
10667
10665
|
var import_radix_ui = require("radix-ui");
|
|
10668
10666
|
|
|
10669
10667
|
// src/components/Popover/style.module.scss
|
|
@@ -10708,7 +10706,7 @@ var style_module_default7 = {
|
|
|
10708
10706
|
|
|
10709
10707
|
// src/components/TextButton/index.tsx
|
|
10710
10708
|
var import_react12 = require("react");
|
|
10711
|
-
var import_clsx8 = __toESM(require("clsx"));
|
|
10709
|
+
var import_clsx8 = __toESM(require("clsx"), 1);
|
|
10712
10710
|
var import_jsx_runtime184 = require("react/jsx-runtime");
|
|
10713
10711
|
var textButtonLevelIconTypeMap = {
|
|
10714
10712
|
primary: "brand-label-primary",
|
|
@@ -10939,7 +10937,7 @@ var style_module_default8 = {
|
|
|
10939
10937
|
|
|
10940
10938
|
// src/components/Tooltip/index.tsx
|
|
10941
10939
|
var import_cva7 = require("cva");
|
|
10942
|
-
var import_clsx10 = __toESM(require("clsx"));
|
|
10940
|
+
var import_clsx10 = __toESM(require("clsx"), 1);
|
|
10943
10941
|
var import_jsx_runtime186 = require("react/jsx-runtime");
|
|
10944
10942
|
var DEFAULT_OFFSET2 = "medium";
|
|
10945
10943
|
var tooltipVariants = (0, import_cva7.cva)({ base: [style_module_default8.tooltip, "lp-sys-typo-caption1-normal-medium"] });
|
|
@@ -10976,7 +10974,7 @@ var Tooltip = Object.assign(TooltipRoot, {
|
|
|
10976
10974
|
// src/components/IconButton/index.tsx
|
|
10977
10975
|
var import_cva8 = require("cva");
|
|
10978
10976
|
var import_react14 = require("react");
|
|
10979
|
-
var import_clsx11 = __toESM(require("clsx"));
|
|
10977
|
+
var import_clsx11 = __toESM(require("clsx"), 1);
|
|
10980
10978
|
|
|
10981
10979
|
// src/components/IconButton/style.module.scss
|
|
10982
10980
|
var style_module_default9 = {
|
|
@@ -11119,12 +11117,12 @@ var style_module_default10 = {
|
|
|
11119
11117
|
|
|
11120
11118
|
// src/components/CheckBox/index.tsx
|
|
11121
11119
|
var import_react16 = require("react");
|
|
11122
|
-
var import_clsx13 = __toESM(require("clsx"));
|
|
11120
|
+
var import_clsx13 = __toESM(require("clsx"), 1);
|
|
11123
11121
|
|
|
11124
11122
|
// src/components/Label/index.tsx
|
|
11125
11123
|
var import_react15 = require("react");
|
|
11126
11124
|
var import_radix_ui4 = require("radix-ui");
|
|
11127
|
-
var import_clsx12 = __toESM(require("clsx"));
|
|
11125
|
+
var import_clsx12 = __toESM(require("clsx"), 1);
|
|
11128
11126
|
|
|
11129
11127
|
// src/components/Label/style.module.scss
|
|
11130
11128
|
var style_module_default11 = {
|
|
@@ -11218,7 +11216,7 @@ var Checkbox = (0, import_react16.forwardRef)(
|
|
|
11218
11216
|
|
|
11219
11217
|
// src/components/Radio/index.tsx
|
|
11220
11218
|
var import_radix_ui6 = require("radix-ui");
|
|
11221
|
-
var import_clsx14 = __toESM(require("clsx"));
|
|
11219
|
+
var import_clsx14 = __toESM(require("clsx"), 1);
|
|
11222
11220
|
var import_react17 = require("react");
|
|
11223
11221
|
|
|
11224
11222
|
// src/components/Radio/style.module.scss
|
|
@@ -11287,7 +11285,7 @@ var style_module_default13 = {
|
|
|
11287
11285
|
|
|
11288
11286
|
// src/components/Textfield/index.tsx
|
|
11289
11287
|
var import_cva10 = require("cva");
|
|
11290
|
-
var import_clsx15 = __toESM(require("clsx"));
|
|
11288
|
+
var import_clsx15 = __toESM(require("clsx"), 1);
|
|
11291
11289
|
var import_react_dom2 = require("react-dom");
|
|
11292
11290
|
var import_jsx_runtime191 = require("react/jsx-runtime");
|
|
11293
11291
|
var defaultTextfieldVariants = (0, import_cva10.cva)({
|
|
@@ -11542,7 +11540,7 @@ var style_module_default15 = {
|
|
|
11542
11540
|
|
|
11543
11541
|
// src/components/Select/index.tsx
|
|
11544
11542
|
var import_react20 = require("react");
|
|
11545
|
-
var import_clsx16 = __toESM(require("clsx"));
|
|
11543
|
+
var import_clsx16 = __toESM(require("clsx"), 1);
|
|
11546
11544
|
var import_jsx_runtime193 = require("react/jsx-runtime");
|
|
11547
11545
|
var Badge = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ (0, import_jsx_runtime193.jsx)("div", { className: style_module_default15.badgeContainer, children: /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(Caption, { className: style_module_default15.badge, size: 2, type: "normal", weight: "medium", children }) }), "Badge");
|
|
11548
11546
|
var SelectContent = (0, import_react20.forwardRef)(
|
|
@@ -11705,7 +11703,7 @@ var useCollectionContext = /* @__PURE__ */ __name(() => {
|
|
|
11705
11703
|
}, "useCollectionContext");
|
|
11706
11704
|
|
|
11707
11705
|
// src/components/List/index.tsx
|
|
11708
|
-
var import_clsx17 = __toESM(require("clsx"));
|
|
11706
|
+
var import_clsx17 = __toESM(require("clsx"), 1);
|
|
11709
11707
|
var import_jsx_runtime195 = require("react/jsx-runtime");
|
|
11710
11708
|
var ListRoot = /* @__PURE__ */ __name(({ children, className, ...props }) => {
|
|
11711
11709
|
return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(CollectionProvider, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)("ul", { className: (0, import_clsx17.default)(style_module_default16.list, className), children }) });
|
|
@@ -11740,87 +11738,4 @@ var Item = /* @__PURE__ */ __name(({ value, text, disabled, icon, onClick }) =>
|
|
|
11740
11738
|
);
|
|
11741
11739
|
}, "Item");
|
|
11742
11740
|
var List = Object.assign(ListRoot, { Item });
|
|
11743
|
-
|
|
11744
|
-
// src/constants/illust/size.ts
|
|
11745
|
-
var ratio = { "16:9": { width: 1344, height: 756 }, "4:3": { width: 1008, height: 756 } };
|
|
11746
|
-
var illustSize = {
|
|
11747
|
-
"object-pencil_paper-16_9": ratio["16:9"],
|
|
11748
|
-
"object-smoke-16_9": ratio["16:9"],
|
|
11749
|
-
"person-standing_with_a_star-16_9": ratio["16:9"],
|
|
11750
|
-
"person-searching-16_9": ratio["16:9"],
|
|
11751
|
-
"person-cheerup-16_9": ratio["16:9"],
|
|
11752
|
-
"object-graduation_cap_pencil-4_3": ratio["4:3"],
|
|
11753
|
-
"object-book_pencil-4_3": ratio["4:3"],
|
|
11754
|
-
"object-puzzle-4_3": ratio["4:3"],
|
|
11755
|
-
"object-magnifying_glass-4_3": ratio["4:3"],
|
|
11756
|
-
"object-lock-4_3": ratio["4:3"],
|
|
11757
|
-
"object-empty_box-4_3": ratio["4:3"],
|
|
11758
|
-
"person-working_01-4_3": ratio["4:3"],
|
|
11759
|
-
"person-searching_01-4_3": ratio["4:3"],
|
|
11760
|
-
"person-worried_01-4_3": ratio["4:3"],
|
|
11761
|
-
"person-worried_02-4_3": ratio["4:3"],
|
|
11762
|
-
"person-worried_03-4_3": ratio["4:3"],
|
|
11763
|
-
"person-worried_04-4_3": ratio["4:3"],
|
|
11764
|
-
"person-working_02-4_3": ratio["4:3"],
|
|
11765
|
-
"person-bye-4_3": ratio["4:3"],
|
|
11766
|
-
"person-space_in_work-4_3": ratio["4:3"],
|
|
11767
|
-
"person-cheerup-4_3": ratio["4:3"]
|
|
11768
|
-
};
|
|
11769
|
-
|
|
11770
|
-
// src/components/Illust/index.tsx
|
|
11771
|
-
var import_image = __toESM(require("next/image"));
|
|
11772
|
-
|
|
11773
|
-
// src/constants/illust/path.ts
|
|
11774
|
-
var ILLUST = "/illust";
|
|
11775
|
-
var DARK_MODE_ILLUST_PREFIX = `${ILLUST}/dark/`;
|
|
11776
|
-
var LIGHT_MODE_ILLUST_PREFIX = `${ILLUST}/light/`;
|
|
11777
|
-
|
|
11778
|
-
// src/hooks/useIllust.ts
|
|
11779
|
-
var import_design_token2 = require("@liner-fe/design-token");
|
|
11780
|
-
var useIllust = /* @__PURE__ */ __name(({ darkSrc, src }) => {
|
|
11781
|
-
const { isDarkMode } = (0, import_design_token2.useDarkTheme)();
|
|
11782
|
-
const sourcePrefix = (() => {
|
|
11783
|
-
if (isDarkMode) {
|
|
11784
|
-
if (darkSrc?.inverse) {
|
|
11785
|
-
return LIGHT_MODE_ILLUST_PREFIX;
|
|
11786
|
-
}
|
|
11787
|
-
return DARK_MODE_ILLUST_PREFIX;
|
|
11788
|
-
}
|
|
11789
|
-
if (src.inverse === false) {
|
|
11790
|
-
return DARK_MODE_ILLUST_PREFIX;
|
|
11791
|
-
}
|
|
11792
|
-
return LIGHT_MODE_ILLUST_PREFIX;
|
|
11793
|
-
})();
|
|
11794
|
-
const currentSourceByColorTheme = isDarkMode ? darkSrc?.name || src.name : src.name;
|
|
11795
|
-
return { sourcePrefix, currentSourceByColorTheme, isDarkMode };
|
|
11796
|
-
}, "useIllust");
|
|
11797
|
-
|
|
11798
|
-
// src/components/Illust/index.tsx
|
|
11799
|
-
var import_jsx_runtime196 = require("react/jsx-runtime");
|
|
11800
|
-
var Illust = /* @__PURE__ */ __name((props) => {
|
|
11801
|
-
const { src, width, margin } = props;
|
|
11802
|
-
const { sourcePrefix, currentSourceByColorTheme } = useIllust({
|
|
11803
|
-
darkSrc: src.dark,
|
|
11804
|
-
src: src.light
|
|
11805
|
-
});
|
|
11806
|
-
const aspectRatio = illustSize[currentSourceByColorTheme] ? illustSize[currentSourceByColorTheme].width / illustSize[currentSourceByColorTheme].height : void 0;
|
|
11807
|
-
const css = {
|
|
11808
|
-
width,
|
|
11809
|
-
margin
|
|
11810
|
-
};
|
|
11811
|
-
const source = `${sourcePrefix}${currentSourceByColorTheme}.webp`;
|
|
11812
|
-
return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)("div", { style: css, children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(
|
|
11813
|
-
import_image.default,
|
|
11814
|
-
{
|
|
11815
|
-
alt: currentSourceByColorTheme,
|
|
11816
|
-
...props,
|
|
11817
|
-
src: source,
|
|
11818
|
-
width,
|
|
11819
|
-
height: aspectRatio ? width / aspectRatio : width
|
|
11820
|
-
}
|
|
11821
|
-
) });
|
|
11822
|
-
}, "Illust");
|
|
11823
|
-
|
|
11824
|
-
// src/utils/illust.ts
|
|
11825
|
-
var prefetchIllust = /* @__PURE__ */ __name(async ({ name, isDark = false }) => await fetch(`${ILLUST}${isDark ? "/dark/" : "/light/"}${name}.webp`), "prefetchIllust");
|
|
11826
|
-
//# sourceMappingURL=index.js.map
|
|
11741
|
+
//# sourceMappingURL=index.cjs.map
|