@liner-fe/prism 2.1.4 → 2.1.5

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.
Files changed (149) hide show
  1. package/lib/components/Illust/index.d.ts +13 -0
  2. package/lib/constants/component.d.ts +1 -0
  3. package/lib/constants/figma/index.d.ts +1 -0
  4. package/lib/constants/illust/name.d.ts +1 -0
  5. package/lib/constants/illust/size.d.ts +5 -0
  6. package/lib/index.d.ts +1 -0
  7. package/lib/index.mjs +39 -0
  8. package/lib/index.mjs.map +4 -4
  9. package/lib/static/illust/dark/rectangle_searching.webp +0 -0
  10. package/lib/static/illust/dark/rectangle_space_work.webp +0 -0
  11. package/lib/static/illust/dark/rectangle_standing_with_a_star.webp +0 -0
  12. package/lib/static/illust/dark/square_bomb_timeout.webp +0 -0
  13. package/lib/static/illust/dark/square_brain_deep_q_a.webp +0 -0
  14. package/lib/static/illust/dark/square_bye_end_custom_AI.webp +0 -0
  15. package/lib/static/illust/dark/square_clap.webp +0 -0
  16. package/lib/static/illust/dark/square_decoration_bulb.webp +0 -0
  17. package/lib/static/illust/dark/square_decoration_hourglass.webp +0 -0
  18. package/lib/static/illust/dark/square_decoration_star_01.webp +0 -0
  19. package/lib/static/illust/dark/square_decoration_star_02.webp +0 -0
  20. package/lib/static/illust/dark/square_decoration_star_03.webp +0 -0
  21. package/lib/static/illust/dark/square_decoration_star_04.webp +0 -0
  22. package/lib/static/illust/dark/square_decoration_star_05.webp +0 -0
  23. package/lib/static/illust/dark/square_decoration_star_06.webp +0 -0
  24. package/lib/static/illust/dark/square_decoration_star_07.webp +0 -0
  25. package/lib/static/illust/dark/square_decoration_star_08.webp +0 -0
  26. package/lib/static/illust/dark/square_decoration_star_09.webp +0 -0
  27. package/lib/static/illust/dark/square_decoration_star_10.webp +0 -0
  28. package/lib/static/illust/dark/square_decoration_star_11.webp +0 -0
  29. package/lib/static/illust/dark/square_documents_reliable_citation.webp +0 -0
  30. package/lib/static/illust/dark/square_documents_reliable_source.webp +0 -0
  31. package/lib/static/illust/dark/square_empty_box.webp +0 -0
  32. package/lib/static/illust/dark/square_empty_box_2.webp +0 -0
  33. package/lib/static/illust/dark/square_find_man.webp +0 -0
  34. package/lib/static/illust/dark/square_folder_01.webp +0 -0
  35. package/lib/static/illust/dark/square_folder_02.webp +0 -0
  36. package/lib/static/illust/dark/square_free_ticket_welcome.webp +0 -0
  37. package/lib/static/illust/dark/square_gift_welcome.webp +0 -0
  38. package/lib/static/illust/dark/square_give_gift.webp +0 -0
  39. package/lib/static/illust/dark/square_holding_a_book_onboarding.webp +0 -0
  40. package/lib/static/illust/dark/square_introduce.webp +0 -0
  41. package/lib/static/illust/dark/square_introduce_pro.webp +0 -0
  42. package/lib/static/illust/dark/square_lock_locked_thread.webp +0 -0
  43. package/lib/static/illust/dark/square_magnifying_glass.webp +0 -0
  44. package/lib/static/illust/dark/square_magnifying_glass_not_found.webp +0 -0
  45. package/lib/static/illust/dark/square_make_profile_onboarding.webp +0 -0
  46. package/lib/static/illust/dark/square_paper.webp +0 -0
  47. package/lib/static/illust/dark/square_pencil_paper_empty_history.webp +0 -0
  48. package/lib/static/illust/dark/square_pricing_page_airplane.webp +0 -0
  49. package/lib/static/illust/dark/square_pricing_page_car.webp +0 -0
  50. package/lib/static/illust/dark/square_pricing_page_flag.webp +0 -0
  51. package/lib/static/illust/dark/square_pricing_page_rocket.webp +0 -0
  52. package/lib/static/illust/dark/square_raining_error.webp +0 -0
  53. package/lib/static/illust/dark/square_searching_01.webp +0 -0
  54. package/lib/static/illust/dark/square_searching_02.webp +0 -0
  55. package/lib/static/illust/dark/square_searching_03.webp +0 -0
  56. package/lib/static/illust/dark/square_smoke_timeout.webp +0 -0
  57. package/lib/static/illust/dark/square_time_out.webp +0 -0
  58. package/lib/static/illust/dark/square_time_out_time_out_01.webp +0 -0
  59. package/lib/static/illust/dark/square_time_out_time_out_02.webp +0 -0
  60. package/lib/static/illust/dark/square_time_out_time_out_03.webp +0 -0
  61. package/lib/static/illust/dark/square_time_out_time_out_04.webp +0 -0
  62. package/lib/static/illust/dark/square_working_01.webp +0 -0
  63. package/lib/static/illust/dark/square_worried_01.webp +0 -0
  64. package/lib/static/illust/dark/square_worried_02.webp +0 -0
  65. package/lib/static/illust/dark/square_worried_03.webp +0 -0
  66. package/lib/static/illust/dark/square_worried_04.webp +0 -0
  67. package/lib/static/illust/dark/square_worried_05.webp +0 -0
  68. package/lib/static/illust/dark/square_writing_onboarding.webp +0 -0
  69. package/lib/static/illust/light/rectangle_cheerup_01.webp +0 -0
  70. package/lib/static/illust/light/rectangle_cheerup_02.webp +0 -0
  71. package/lib/static/illust/light/rectangle_searching.webp +0 -0
  72. package/lib/static/illust/light/rectangle_space_work.webp +0 -0
  73. package/lib/static/illust/light/rectangle_standing_with_a_star.webp +0 -0
  74. package/lib/static/illust/light/square_ai_writing_essay_mode.webp +0 -0
  75. package/lib/static/illust/light/square_bomb_timeout.webp +0 -0
  76. package/lib/static/illust/light/square_book_pencil_general_mode.webp +0 -0
  77. package/lib/static/illust/light/square_brain_deep_q_a.webp +0 -0
  78. package/lib/static/illust/light/square_bye_end_custom_ai.webp +0 -0
  79. package/lib/static/illust/light/square_careers_page_coffee.webp +0 -0
  80. package/lib/static/illust/light/square_careers_page_english.webp +0 -0
  81. package/lib/static/illust/light/square_careers_page_money.webp +0 -0
  82. package/lib/static/illust/light/square_careers_page_palm.webp +0 -0
  83. package/lib/static/illust/light/square_careers_page_shake_hands.webp +0 -0
  84. package/lib/static/illust/light/square_careers_page_tennis.webp +0 -0
  85. package/lib/static/illust/light/square_clap.webp +0 -0
  86. package/lib/static/illust/light/square_decoration_bulb.webp +0 -0
  87. package/lib/static/illust/light/square_decoration_hourglass.webp +0 -0
  88. package/lib/static/illust/light/square_decoration_star_01.webp +0 -0
  89. package/lib/static/illust/light/square_decoration_star_02.webp +0 -0
  90. package/lib/static/illust/light/square_decoration_star_03.webp +0 -0
  91. package/lib/static/illust/light/square_decoration_star_04.webp +0 -0
  92. package/lib/static/illust/light/square_decoration_star_05.webp +0 -0
  93. package/lib/static/illust/light/square_decoration_star_06.webp +0 -0
  94. package/lib/static/illust/light/square_decoration_star_07.webp +0 -0
  95. package/lib/static/illust/light/square_decoration_star_08.webp +0 -0
  96. package/lib/static/illust/light/square_decoration_star_09.webp +0 -0
  97. package/lib/static/illust/light/square_decoration_star_10.webp +0 -0
  98. package/lib/static/illust/light/square_decoration_star_11.webp +0 -0
  99. package/lib/static/illust/light/square_documents_reliable_citation.webp +0 -0
  100. package/lib/static/illust/light/square_documents_reliable_source.webp +0 -0
  101. package/lib/static/illust/light/square_empty_box_2.webp +0 -0
  102. package/lib/static/illust/light/square_empty_box_empty_page.webp +0 -0
  103. package/lib/static/illust/light/square_feather_pen.webp +0 -0
  104. package/lib/static/illust/light/square_find_man.webp +0 -0
  105. package/lib/static/illust/light/square_find_paper_use_liner.webp +0 -0
  106. package/lib/static/illust/light/square_folder_01.webp +0 -0
  107. package/lib/static/illust/light/square_folder_02.webp +0 -0
  108. package/lib/static/illust/light/square_free_ticket_welcome.webp +0 -0
  109. package/lib/static/illust/light/square_gift_welcome.webp +0 -0
  110. package/lib/static/illust/light/square_give_gift.webp +0 -0
  111. package/lib/static/illust/light/square_graduation_cap_pencil_scholar_mode.webp +0 -0
  112. package/lib/static/illust/light/square_holding_a_book_onboarding.webp +0 -0
  113. package/lib/static/illust/light/square_introduce.webp +0 -0
  114. package/lib/static/illust/light/square_introduce_pro.webp +0 -0
  115. package/lib/static/illust/light/square_lock_locked_thread.webp +0 -0
  116. package/lib/static/illust/light/square_magnifying_glass.webp +0 -0
  117. package/lib/static/illust/light/square_magnifying_glass_not_found.webp +0 -0
  118. package/lib/static/illust/light/square_make_profile_onboarding.webp +0 -0
  119. package/lib/static/illust/light/square_megaphone.webp +0 -0
  120. package/lib/static/illust/light/square_paper.webp +0 -0
  121. package/lib/static/illust/light/square_pencil_paper_empty_history.webp +0 -0
  122. package/lib/static/illust/light/square_pricing_page_airplane.webp +0 -0
  123. package/lib/static/illust/light/square_pricing_page_car.webp +0 -0
  124. package/lib/static/illust/light/square_pricing_page_flag.webp +0 -0
  125. package/lib/static/illust/light/square_pricing_page_rocket.webp +0 -0
  126. package/lib/static/illust/light/square_raining_error.webp +0 -0
  127. package/lib/static/illust/light/square_searching_01.webp +0 -0
  128. package/lib/static/illust/light/square_searching_02.webp +0 -0
  129. package/lib/static/illust/light/square_searching_03.webp +0 -0
  130. package/lib/static/illust/light/square_smoke_timeout.webp +0 -0
  131. package/lib/static/illust/light/square_time_out.webp +0 -0
  132. package/lib/static/illust/light/square_time_out_time_out_01.webp +0 -0
  133. package/lib/static/illust/light/square_time_out_time_out_02.webp +0 -0
  134. package/lib/static/illust/light/square_time_out_time_out_03.webp +0 -0
  135. package/lib/static/illust/light/square_time_out_time_out_04.webp +0 -0
  136. package/lib/static/illust/light/square_understand_concepts_use_liner.webp +0 -0
  137. package/lib/static/illust/light/square_university_01.webp +0 -0
  138. package/lib/static/illust/light/square_university_02.webp +0 -0
  139. package/lib/static/illust/light/square_working_01.webp +0 -0
  140. package/lib/static/illust/light/square_worried_01.webp +0 -0
  141. package/lib/static/illust/light/square_worried_02.webp +0 -0
  142. package/lib/static/illust/light/square_worried_03.webp +0 -0
  143. package/lib/static/illust/light/square_worried_04.webp +0 -0
  144. package/lib/static/illust/light/square_worried_05.webp +0 -0
  145. package/lib/static/illust/light/square_write_essay_use_liner.webp +0 -0
  146. package/lib/static/illust/light/square_writing.webp +0 -0
  147. package/lib/static/illust/light/square_writing_essay_mode.webp +0 -0
  148. package/lib/types/illust.d.ts +1 -0
  149. package/package.json +7 -4
@@ -0,0 +1,13 @@
1
+ import { IllustName } from '../../types/illust';
2
+ import { Property } from 'csstype';
3
+ import { ImageProps } from 'next/image';
4
+ interface IProps extends Omit<ImageProps, 'alt' | 'width' | 'height' | 'fill'> {
5
+ src: IllustName;
6
+ isOnlyLight?: boolean;
7
+ width: number;
8
+ height: number;
9
+ justifyContent?: Property.JustifyContent;
10
+ alignItems?: Property.AlignItems;
11
+ }
12
+ export declare const Illust: (props: IProps) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -12,4 +12,5 @@ export declare const COMPONENT_NAME: {
12
12
  readonly LABEL: "Label";
13
13
  readonly RADIO: "Radio";
14
14
  readonly BADGE: "Badge";
15
+ readonly ILLUST: "Illust";
15
16
  };
@@ -12,6 +12,7 @@ export declare const FIGMA: {
12
12
  Label: Figma;
13
13
  Radio: Figma;
14
14
  Badge: Figma;
15
+ Illust: Figma;
15
16
  Shadow: Figma;
16
17
  Padding: Figma;
17
18
  Opacity: Figma;
@@ -0,0 +1 @@
1
+ export declare const illustNames: readonly ["rectangle_cheerup_01", "rectangle_cheerup_02", "rectangle_searching", "rectangle_space_work", "rectangle_standing_with_a_star", "square_ai_writing_essay_mode", "square_bomb_timeout", "square_book_pencil_general_mode", "square_brain_deep_q_a", "square_bye_end_custom_ai", "square_careers_page_coffee", "square_careers_page_english", "square_careers_page_money", "square_careers_page_palm", "square_careers_page_shake_hands", "square_careers_page_tennis", "square_clap", "square_decoration_bulb", "square_decoration_hourglass", "square_decoration_star_01", "square_decoration_star_02", "square_decoration_star_03", "square_decoration_star_04", "square_decoration_star_05", "square_decoration_star_06", "square_decoration_star_07", "square_decoration_star_08", "square_decoration_star_09", "square_decoration_star_10", "square_decoration_star_11", "square_documents_reliable_citation", "square_documents_reliable_source", "square_empty_box_2", "square_empty_box_empty_page", "square_feather_pen", "square_find_man", "square_find_paper_use_liner", "square_folder_01", "square_folder_02", "square_free_ticket_welcome", "square_gift_welcome", "square_give_gift", "square_graduation_cap_pencil_scholar_mode", "square_holding_a_book_onboarding", "square_introduce", "square_introduce_pro", "square_lock_locked_thread", "square_magnifying_glass", "square_magnifying_glass_not_found", "square_make_profile_onboarding", "square_megaphone", "square_paper", "square_pencil_paper_empty_history", "square_pricing_page_airplane", "square_pricing_page_car", "square_pricing_page_flag", "square_pricing_page_rocket", "square_raining_error", "square_searching_01", "square_searching_02", "square_searching_03", "square_smoke_timeout", "square_time_out", "square_time_out_time_out_01", "square_time_out_time_out_02", "square_time_out_time_out_03", "square_time_out_time_out_04", "square_understand_concepts_use_liner", "square_university_01", "square_university_02", "square_working_01", "square_worried_01", "square_worried_02", "square_worried_03", "square_worried_04", "square_worried_05", "square_write_essay_use_liner", "square_writing", "square_writing_essay_mode"];
@@ -0,0 +1,5 @@
1
+ import { IllustName } from '../../types/illust';
2
+ export declare const illustSize: Partial<Record<IllustName, {
3
+ width: number;
4
+ height: number;
5
+ }>>;
package/lib/index.d.ts CHANGED
@@ -14,5 +14,6 @@ export * from './components/Slider';
14
14
  export * from './components/Select';
15
15
  export * from './components/List';
16
16
  export * from './components/Label';
17
+ export * from './components/Illust';
17
18
  export * from './types/color';
18
19
  export * from './type/index';
package/lib/index.mjs CHANGED
@@ -9384,6 +9384,44 @@ var Item3 = /* @__PURE__ */ __name(({ value, text, disabled, icon, onClick }) =>
9384
9384
  );
9385
9385
  }, "Item");
9386
9386
  var List = Object.assign(ListRoot, { Item: Item3 });
9387
+
9388
+ // src/constants/illust/size.ts
9389
+ var illustSize = {
9390
+ rectangle_standing_with_a_star: { width: 2422, height: 1282 },
9391
+ rectangle_space_work: { width: 2422, height: 1282 },
9392
+ rectangle_searching: { width: 2422, height: 1282 },
9393
+ rectangle_cheerup_01: { width: 2422, height: 1282 },
9394
+ rectangle_cheerup_02: { width: 2422, height: 1282 }
9395
+ };
9396
+
9397
+ // src/components/Illust/index.tsx
9398
+ import { useDarkTheme } from "@liner-fe/design-token";
9399
+ import Image from "next/image";
9400
+ import { jsx as jsx178 } from "react/jsx-runtime";
9401
+ var ILLUST = "/illust";
9402
+ var Illust = /* @__PURE__ */ __name((props) => {
9403
+ const { isDarkMode } = useDarkTheme();
9404
+ const { src, isOnlyLight, width, height, justifyContent = "center", alignItems = "center" } = props;
9405
+ const prefixSrc = (() => {
9406
+ if (isDarkMode && !isOnlyLight) {
9407
+ return `${ILLUST}/dark/`;
9408
+ }
9409
+ return `${ILLUST}/light/`;
9410
+ })();
9411
+ const aspectRatio = illustSize[src] ? illustSize[src].width / illustSize[src].height : void 0;
9412
+ const css = {
9413
+ width,
9414
+ height,
9415
+ display: "flex",
9416
+ justifyContent,
9417
+ alignItems
9418
+ };
9419
+ if (aspectRatio) {
9420
+ return /* @__PURE__ */ jsx178("div", { style: css, children: /* @__PURE__ */ jsx178(Image, { alt: src, ...props, src: `${prefixSrc}${src}.webp`, width, height: width / aspectRatio }) });
9421
+ }
9422
+ const size = width > height ? height : width;
9423
+ return /* @__PURE__ */ jsx178("div", { style: css, children: /* @__PURE__ */ jsx178(Image, { alt: src, ...props, src: `${prefixSrc}${src}.webp`, width: size, height: size }) });
9424
+ }, "Illust");
9387
9425
  export {
9388
9426
  Button,
9389
9427
  Caption,
@@ -9393,6 +9431,7 @@ export {
9393
9431
  Heading,
9394
9432
  Icon,
9395
9433
  IconButton,
9434
+ Illust,
9396
9435
  Label,
9397
9436
  List,
9398
9437
  Media,