@twreporter/react-typescript-components 0.1.0-beta.16 → 0.1.0-beta.18
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/button/constants.d.mts +2 -2
- package/lib/button/index.d.mts +12 -12
- package/lib/button/index.js +1 -1
- package/lib/button/index.mjs +1 -1
- package/lib/{button-hDNHA85d.mjs → button-D_AWI7r9.mjs} +8 -2
- package/lib/button-D_AWI7r9.mjs.map +1 -0
- package/lib/{button-D50NHdly.js → button-Dk0MxlKd.js} +8 -2
- package/lib/button-Dk0MxlKd.js.map +1 -0
- package/lib/constants/release-branch.d.mts +2 -2
- package/lib/constants/theme.d.mts +2 -2
- package/lib/{constants-B6oiTL1L.d.mts → constants-B-jtTtz5.d.mts} +2 -2
- package/lib/{constants-BqAhJjFv.d.mts → constants-BL-KiLbo.d.mts} +2 -2
- package/lib/{constants-BNxn_qJc.js → constants-B_1Vpdib.js} +1 -1
- package/lib/{constants-BNxn_qJc.js.map → constants-B_1Vpdib.js.map} +1 -1
- package/lib/{constants--CDeoDub.mjs → constants-Br6I254P.mjs} +1 -1
- package/lib/{constants--CDeoDub.mjs.map → constants-Br6I254P.mjs.map} +1 -1
- package/lib/{constants-B_NgWFML.d.ts → constants-C86Q6QlO.d.ts} +1 -1
- package/lib/{constants-CVmr4VOP.d.mts → constants-CIMBoUWq.d.mts} +2 -2
- package/lib/{constants-CBjyeHSl.d.ts → constants-COhDITk3.d.ts} +1 -1
- package/lib/{constants-Cb4Udkwt.d.mts → constants-CwFazfN4.d.mts} +2 -2
- package/lib/{constants-D-mBwgNQ.d.mts → constants-DJDyKM0N.d.mts} +2 -2
- package/lib/customized-link/external-link.d.mts +2 -2
- package/lib/customized-link/index.d.mts +3 -3
- package/lib/customized-link/internal-link.d.mts +2 -2
- package/lib/customized-link/type.d.mts +1 -1
- package/lib/divider/constants.d.mts +2 -2
- package/lib/divider/index.d.mts +2 -2
- package/lib/dropdown-menu/index.d.mts +1 -1
- package/lib/{external-link-goP_Ay-S.d.mts → external-link-C3_4RBmQ.d.mts} +2 -2
- package/lib/hamburger-menu/index.js +5 -3
- package/lib/hamburger-menu/index.mjs +5 -3
- package/lib/{hamburger-menu-DNfJ2jMA.js → hamburger-menu-DGS62txC.js} +40 -32
- package/lib/hamburger-menu-DGS62txC.js.map +1 -0
- package/lib/{hamburger-menu-DOrmybn_.mjs → hamburger-menu-iIWjGEVX.mjs} +40 -32
- package/lib/hamburger-menu-iIWjGEVX.mjs.map +1 -0
- package/lib/header/index.d.mts +3 -3
- package/lib/header/index.js +52 -11
- package/lib/header/index.js.map +1 -1
- package/lib/header/index.mjs +52 -11
- package/lib/header/index.mjs.map +1 -1
- package/lib/{heading-CNS7rJIc.js → heading-Fvd7unhP.js} +1 -1
- package/lib/{heading-CNS7rJIc.js.map → heading-Fvd7unhP.js.map} +1 -1
- package/lib/{heading-BSEtBLuY.mjs → heading-Qm-0gpRy.mjs} +1 -1
- package/lib/{heading-BSEtBLuY.mjs.map → heading-Qm-0gpRy.mjs.map} +1 -1
- package/lib/hooks/index.d.mts +10 -0
- package/lib/hooks/index.d.ts +10 -0
- package/lib/hooks/index.js +6 -0
- package/lib/hooks/index.mjs +4 -0
- package/lib/hooks/use-outside-click.d.mts +2 -0
- package/lib/hooks/use-outside-click.d.ts +2 -0
- package/lib/hooks/use-outside-click.js +3 -0
- package/lib/hooks/use-outside-click.mjs +3 -0
- package/lib/hooks-B0DKeSXi.js +13 -0
- package/lib/hooks-B0DKeSXi.js.map +1 -0
- package/lib/hooks-CDCpkU85.mjs +8 -0
- package/lib/hooks-CDCpkU85.mjs.map +1 -0
- package/lib/icons/constants.d.mts +2 -2
- package/lib/icons/constants.d.ts +1 -1
- package/lib/icons/index.d.mts +3 -3
- package/lib/icons/index.d.ts +1 -1
- package/lib/{index-CYb6xr3M.d.mts → index-B0aBR23L.d.mts} +1 -1
- package/lib/input/constants.d.mts +17 -0
- package/lib/input/constants.d.ts +17 -0
- package/lib/input/constants.js +16 -0
- package/lib/input/constants.js.map +1 -0
- package/lib/input/constants.mjs +14 -0
- package/lib/input/constants.mjs.map +1 -0
- package/lib/input/index.d.mts +41 -0
- package/lib/input/index.d.ts +41 -0
- package/lib/input/index.js +14 -0
- package/lib/input/index.mjs +12 -0
- package/lib/input/theme.d.mts +16 -0
- package/lib/input/theme.d.ts +16 -0
- package/lib/input/theme.js +4 -0
- package/lib/input/theme.mjs +4 -0
- package/lib/input-BU_QJnbj.mjs +71 -0
- package/lib/input-BU_QJnbj.mjs.map +1 -0
- package/lib/input-VmgNb9pm.js +86 -0
- package/lib/input-VmgNb9pm.js.map +1 -0
- package/lib/{internal-link-Ciu7CWSY.d.mts → internal-link-HG_KM8L7.d.mts} +2 -2
- package/lib/logo/constants.d.mts +2 -2
- package/lib/logo/constants.d.ts +1 -1
- package/lib/logo/index.d.mts +3 -3
- package/lib/logo/index.d.ts +6 -6
- package/lib/logo/index.js +1 -1
- package/lib/logo/index.mjs +1 -1
- package/lib/{logo-CuMjQGbj.js → logo-BTNfdxTv.js} +1 -1
- package/lib/{logo-CuMjQGbj.js.map → logo-BTNfdxTv.js.map} +1 -1
- package/lib/{logo-CxXblyO9.mjs → logo-D68VZ-fc.mjs} +1 -1
- package/lib/{logo-CxXblyO9.mjs.map → logo-D68VZ-fc.mjs.map} +1 -1
- package/lib/{release-branch-BqeBsvrl.d.mts → release-branch-CFUcv043.d.mts} +2 -2
- package/lib/styles.css +113 -9
- package/lib/tab-bar/constants.d.mts +3 -3
- package/lib/tab-bar/constants.js +1 -1
- package/lib/tab-bar/constants.mjs +1 -1
- package/lib/tab-bar/index.js +4 -4
- package/lib/tab-bar/index.mjs +4 -4
- package/lib/tab-bar/theme.d.mts +2 -2
- package/lib/tab-bar/theme.js +1 -1
- package/lib/tab-bar/theme.mjs +1 -1
- package/lib/{tab-bar-CdsxfUdk.mjs → tab-bar-CXhDni4V.mjs} +5 -5
- package/lib/{tab-bar-CdsxfUdk.mjs.map → tab-bar-CXhDni4V.mjs.map} +1 -1
- package/lib/{tab-bar-qKbhyjg-.js → tab-bar-CZt-vw5x.js} +5 -5
- package/lib/{tab-bar-qKbhyjg-.js.map → tab-bar-CZt-vw5x.js.map} +1 -1
- package/lib/text/constants.d.mts +2 -2
- package/lib/text/heading.d.mts +2 -2
- package/lib/text/heading.js +1 -1
- package/lib/text/heading.mjs +1 -1
- package/lib/text/paragraph.d.mts +2 -2
- package/lib/{theme-lCi6tmmS.d.mts → theme-BQP-h-2z.d.mts} +2 -2
- package/lib/theme-Bgd_TUHZ.mjs +38 -0
- package/lib/theme-Bgd_TUHZ.mjs.map +1 -0
- package/lib/{theme-DQCIQh_8.mjs → theme-CE2RkJwt.mjs} +1 -1
- package/lib/{theme-DQCIQh_8.mjs.map → theme-CE2RkJwt.mjs.map} +1 -1
- package/lib/{theme-W--MzZEH.js → theme-CmvdSSbX.js} +1 -1
- package/lib/{theme-W--MzZEH.js.map → theme-CmvdSSbX.js.map} +1 -1
- package/lib/theme-Cv8rt4oO.js +43 -0
- package/lib/theme-Cv8rt4oO.js.map +1 -0
- package/lib/title-bar/index.d.mts +4 -4
- package/lib/title-bar/index.d.ts +4 -4
- package/lib/title-bar/index.js +2 -2
- package/lib/title-bar/index.mjs +2 -2
- package/lib/{type-2Go0njwa.d.mts → type-Dons5TOa.d.mts} +1 -1
- package/lib/types/index.d.mts +1 -1
- package/lib/use-outside-click-BB1MpRid.js +27 -0
- package/lib/use-outside-click-BB1MpRid.js.map +1 -0
- package/lib/use-outside-click-CHxRFaTZ.d.ts +7 -0
- package/lib/use-outside-click-CSVLlhkD.d.mts +7 -0
- package/lib/use-outside-click-DAfe2vPE.mjs +20 -0
- package/lib/use-outside-click-DAfe2vPE.mjs.map +1 -0
- package/package.json +2 -2
- package/lib/button-D50NHdly.js.map +0 -1
- package/lib/button-hDNHA85d.mjs.map +0 -1
- package/lib/hamburger-menu-DNfJ2jMA.js.map +0 -1
- package/lib/hamburger-menu-DOrmybn_.mjs.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../index-
|
|
2
|
-
import { SIZE, STYLE, Size, Style, TYPE, Type } from "../constants-
|
|
1
|
+
import "../index-B0aBR23L.mjs";
|
|
2
|
+
import { SIZE, STYLE, Size, Style, TYPE, Type } from "../constants-B-jtTtz5.mjs";
|
|
3
3
|
export { SIZE, STYLE, Size, Style, TYPE, Type };
|
package/lib/button/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../index-
|
|
2
|
-
import { SIZE, STYLE, Size, Style, TYPE, Type } from "../constants-
|
|
3
|
-
import { THEME, Theme } from "../theme-
|
|
4
|
-
import { WEIGHT, Weight } from "../constants-
|
|
5
|
-
import * as
|
|
1
|
+
import "../index-B0aBR23L.mjs";
|
|
2
|
+
import { SIZE, STYLE, Size, Style, TYPE, Type } from "../constants-B-jtTtz5.mjs";
|
|
3
|
+
import { THEME, Theme } from "../theme-BQP-h-2z.mjs";
|
|
4
|
+
import { WEIGHT, Weight } from "../constants-DJDyKM0N.mjs";
|
|
5
|
+
import * as react11 from "react";
|
|
6
6
|
import React$1, { FC, ReactElement } from "react";
|
|
7
7
|
|
|
8
8
|
//#region src/button/components/text-button/index.d.ts
|
|
@@ -88,10 +88,10 @@ declare const IconWithTextButton: FC<IconWithTextButtonProps> & {
|
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region src/button/index.d.ts
|
|
90
90
|
declare const _default: {
|
|
91
|
-
TextButton:
|
|
91
|
+
TextButton: react11.FC<{
|
|
92
92
|
text: string;
|
|
93
|
-
leftIconComponent?:
|
|
94
|
-
rightIconComponent?:
|
|
93
|
+
leftIconComponent?: react11.ReactElement;
|
|
94
|
+
rightIconComponent?: react11.ReactElement;
|
|
95
95
|
size?: Size;
|
|
96
96
|
style?: Style;
|
|
97
97
|
theme?: Theme;
|
|
@@ -104,7 +104,7 @@ declare const _default: {
|
|
|
104
104
|
Style: typeof STYLE;
|
|
105
105
|
Theme: typeof THEME;
|
|
106
106
|
};
|
|
107
|
-
IconButton:
|
|
107
|
+
IconButton: react11.FC<{
|
|
108
108
|
iconComponent: React.ReactElement;
|
|
109
109
|
theme?: Theme;
|
|
110
110
|
type?: Type;
|
|
@@ -116,7 +116,7 @@ declare const _default: {
|
|
|
116
116
|
Theme: typeof THEME;
|
|
117
117
|
Type: typeof TYPE;
|
|
118
118
|
};
|
|
119
|
-
MenuButton:
|
|
119
|
+
MenuButton: react11.FC<{
|
|
120
120
|
text: string;
|
|
121
121
|
color: string;
|
|
122
122
|
fontWeight: Weight;
|
|
@@ -125,7 +125,7 @@ declare const _default: {
|
|
|
125
125
|
}> & {
|
|
126
126
|
FontWeight: typeof WEIGHT;
|
|
127
127
|
};
|
|
128
|
-
PillButton:
|
|
128
|
+
PillButton: react11.FC<{
|
|
129
129
|
text?: string;
|
|
130
130
|
leftIconComponent?: React.ReactElement;
|
|
131
131
|
rightIconComponent?: React.ReactElement;
|
|
@@ -142,7 +142,7 @@ declare const _default: {
|
|
|
142
142
|
Size: typeof SIZE;
|
|
143
143
|
Style: typeof STYLE;
|
|
144
144
|
};
|
|
145
|
-
IconWithTextButton:
|
|
145
|
+
IconWithTextButton: react11.FC<{
|
|
146
146
|
text?: string;
|
|
147
147
|
iconComponent: React.ReactNode;
|
|
148
148
|
theme?: Theme;
|
package/lib/button/index.js
CHANGED
|
@@ -3,7 +3,7 @@ require('../constants-BmxSMOOn.js');
|
|
|
3
3
|
require('../constants-Cndhv6qr.js');
|
|
4
4
|
require('../paragraph-iuz3jP0Q.js');
|
|
5
5
|
require('../theme-DDBlIbeS.js');
|
|
6
|
-
const require_button = require('../button-
|
|
6
|
+
const require_button = require('../button-Dk0MxlKd.js');
|
|
7
7
|
|
|
8
8
|
exports.IconButton = require_button.icon_button_default;
|
|
9
9
|
exports.IconWithTextButton = require_button.icon_with_text_button_default;
|
package/lib/button/index.mjs
CHANGED
|
@@ -2,6 +2,6 @@ import "../constants-oTHAnh6r.mjs";
|
|
|
2
2
|
import "../constants-CBSEPx91.mjs";
|
|
3
3
|
import "../paragraph-Cf9jr8RF.mjs";
|
|
4
4
|
import "../theme-BG6yZVj-.mjs";
|
|
5
|
-
import { button_default, icon_button_default, icon_with_text_button_default, menu_button_default, pill_button_default, text_button_default } from "../button-
|
|
5
|
+
import { button_default, icon_button_default, icon_with_text_button_default, menu_button_default, pill_button_default, text_button_default } from "../button-D_AWI7r9.mjs";
|
|
6
6
|
|
|
7
7
|
export { icon_button_default as IconButton, icon_with_text_button_default as IconWithTextButton, menu_button_default as MenuButton, pill_button_default as PillButton, text_button_default as TextButton, button_default as default };
|
|
@@ -139,9 +139,14 @@ const getSecondaryIconButtonTheme = (theme, active, disabled) => {
|
|
|
139
139
|
//#region src/button/components/icon-button/index.tsx
|
|
140
140
|
const IconButton = ({ iconComponent, theme = THEME.normal, type = TYPE.primary, disabled = false, active = false, className = "", onClick = () => {} }) => {
|
|
141
141
|
const themeClass = type === TYPE.primary ? getPrimaryIconButtonTheme(theme, active, disabled) : getSecondaryIconButtonTheme(theme, active, disabled);
|
|
142
|
+
const handleClick = (e) => {
|
|
143
|
+
if (disabled) return;
|
|
144
|
+
e.stopPropagation();
|
|
145
|
+
onClick(e);
|
|
146
|
+
};
|
|
142
147
|
return /* @__PURE__ */ jsx("button", {
|
|
143
148
|
className: clsx("flex", "[&>svg]:w-[24px] [&>svg]:h-[24px]", disabled ? "cursor-default" : "cursor-pointer", themeClass, className),
|
|
144
|
-
onClick:
|
|
149
|
+
onClick: handleClick,
|
|
145
150
|
type: "button",
|
|
146
151
|
children: iconComponent
|
|
147
152
|
});
|
|
@@ -560,6 +565,7 @@ const IconWithTextButton = ({ text = "", iconComponent, theme = THEME.normal, di
|
|
|
560
565
|
const { color, hoverColor, svgBgColor, svgHoverBgColor } = getIconWithTextButtonTheme(theme, active, disabled);
|
|
561
566
|
const handleClick = (e) => {
|
|
562
567
|
if (disabled) return;
|
|
568
|
+
e.stopPropagation();
|
|
563
569
|
onClick(e);
|
|
564
570
|
};
|
|
565
571
|
return /* @__PURE__ */ jsxs("button", {
|
|
@@ -588,4 +594,4 @@ var button_default = {
|
|
|
588
594
|
|
|
589
595
|
//#endregion
|
|
590
596
|
export { button_default, icon_button_default, icon_with_text_button_default, menu_button_default, pill_button_default, text_button_default };
|
|
591
|
-
//# sourceMappingURL=button-
|
|
597
|
+
//# sourceMappingURL=button-D_AWI7r9.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-D_AWI7r9.mjs","names":["getDisabledContainerTheme: ThemeFunc","getActiveContainerTheme: ThemeFunc","getContainerTheme: ThemeFunc","TextButton: FC<TextButtonProps> & {\n Size: typeof SIZE\n Style: typeof STYLE\n Theme: typeof THEME\n}","getPrimaryIconButtonTheme: ThemeFunc","getSecondaryIconButtonTheme: ThemeFunc","IconButton: React.FC<IconButtonProps> & {\n Theme: typeof THEME\n Type: typeof TYPE\n}","MenuButton: React.FC<MenuButtonProps> & { FontWeight: typeof WEIGHT }","PillButton: FC<PillButtonProps> & {\n Theme: typeof THEME\n Type: typeof TYPE\n Size: typeof SIZE\n Style: typeof STYLE\n}","IconWithTextButton: FC<IconWithTextButtonProps> & {\n Theme: typeof THEME\n}"],"sources":["../src/button/components/text-button/theme.ts","../src/button/components/text-button/index.tsx","../src/button/components/icon-button/theme.ts","../src/button/components/icon-button/index.tsx","../src/button/components/menu-button/index.tsx","../src/button/components/pill-button/theme.ts","../src/button/components/pill-button/index.tsx","../src/button/components/icon-with-text-button/theme.ts","../src/button/components/icon-with-text-button/index.tsx","../src/button/index.ts"],"sourcesContent":["// theme\nimport { THEME, type Theme } from '../../../constants/theme'\n// type\nimport type { ClassArray } from 'clsx'\n// constants\nimport { STYLE, type Style } from '../../constants'\n\ntype ThemeFunc = (theme: Theme, style?: Style) => ClassArray\n\nexport const getDisabledContainerTheme: ThemeFunc = (theme) => {\n return [\n // default theme\n 'text-gray-400 hover:text-gray-400',\n // photography & transparent theme\n {\n 'text-gray-500 hover:text-gray-500':\n theme === THEME.photography || theme === THEME.transparent,\n },\n ]\n}\n\nexport const getActiveContainerTheme: ThemeFunc = (theme, style) => {\n return [\n // default theme\n {\n 'text-gray-800 hover:text-gray-800': style === STYLE.light,\n 'text-brand-heavy hover:text-brand-heavy': style === STYLE.dark,\n 'text-brand-dark hover:text-brand-dark': style === STYLE.brand,\n },\n // photography theme\n {\n 'text-gray-400 hover:text-gray-400':\n theme === THEME.photography && style === STYLE.light,\n 'text-supportive-pastel hover:text-supportive-pastel':\n theme === THEME.photography && style !== STYLE.light,\n },\n // transparent theme\n {\n 'text-gray-black hover:text-gray-black':\n theme === THEME.transparent && style === STYLE.light,\n 'text-gray-200 hover:text-gray-200':\n theme === THEME.transparent && style !== STYLE.light,\n },\n ]\n}\n\nexport const getContainerTheme: ThemeFunc = (theme, style) => {\n return [\n // default theme\n {\n 'text-gray-600 hover:text-gray-800': style === STYLE.light,\n 'text-gray-800 hover:text-brand-heavy': style === STYLE.dark,\n 'text-brand-heavy hover:text-brand-dark': style === STYLE.brand,\n },\n // photography\n {\n 'text-gray-300 hover:text-gray-400':\n theme === THEME.photography && style === STYLE.light,\n 'text-gray-white hover:text-supportive-pastel':\n theme === THEME.photography && style === STYLE.dark,\n 'text-supportive-faded hover:text-supportive-pastel':\n theme === THEME.photography && style === STYLE.brand,\n },\n // transparent theme\n {\n 'text-gray-800 hover:text-gray-black':\n theme === THEME.transparent && style === STYLE.light,\n 'text-gray-white hover:text-gray-200':\n theme === THEME.transparent && style !== STYLE.light,\n },\n ]\n}\n","import { type FC, type ReactElement, useMemo } from 'react'\nimport clsx from 'clsx'\n// components\nimport { P1, P2 } from '../../../text/paragraph'\n// constants\nimport { SIZE, type Size, STYLE, type Style } from '../../constants'\nimport { THEME, type Theme } from '../../../constants/theme'\n// utils\nimport {\n getContainerTheme,\n getActiveContainerTheme,\n getDisabledContainerTheme,\n} from './theme'\n\ntype TextButtonProps = {\n text: string\n leftIconComponent?: ReactElement\n rightIconComponent?: ReactElement\n size?: Size\n style?: Style\n theme?: Theme\n active?: boolean\n disabled?: boolean\n loading?: boolean\n className?: string\n}\nconst TextButton: FC<TextButtonProps> & {\n Size: typeof SIZE\n Style: typeof STYLE\n Theme: typeof THEME\n} = ({\n text,\n leftIconComponent,\n rightIconComponent,\n size = SIZE.s,\n theme = THEME.normal,\n style = STYLE.dark,\n active = false,\n disabled = false,\n loading = false,\n className = '',\n}) => {\n const TextJSX = useMemo(\n () =>\n size === SIZE.s ? (\n <P2 text={text} weight={P2.Weight.bold} />\n ) : (\n <P1 text={text} weight={P1.Weight.bold} />\n ),\n [size, text]\n )\n const themeClass = useMemo(() => {\n const themeFunc = disabled\n ? getDisabledContainerTheme\n : active\n ? getActiveContainerTheme\n : getContainerTheme\n return themeFunc(theme, style)\n }, [disabled, active, theme, style])\n\n return (\n <div\n className={clsx(\n 'flex items-center',\n {\n 'cursor-default': disabled,\n 'cursor-pointer': !disabled,\n },\n themeClass,\n className\n )}\n >\n <div className=\"relative flex justify-center items-center\">\n <div\n className={clsx('flex justify-center items-center', {\n 'opacity-0': loading,\n 'opacity-100': !loading,\n })}\n >\n <div className=\"flex items-center mr-[4px]\">{leftIconComponent}</div>\n {TextJSX}\n <div className=\"flex items-center ml-[4px]\">{rightIconComponent}</div>\n </div>\n <span\n className={clsx(\n 'inline-block absolute box-border animate-spin',\n 'border-2 border-solid border-gray-400 border-t-gray-600 rounded-[50%]',\n {\n 'size-[18px]': size === SIZE.s,\n 'size-[24px]': size === SIZE.l,\n },\n {\n 'opacity-0': !loading,\n 'opacity-100': loading,\n }\n )}\n />\n </div>\n </div>\n )\n}\nTextButton.Size = SIZE\nTextButton.Style = STYLE\nTextButton.Theme = THEME\n\nexport default TextButton\n","// constants\nimport { THEME, type Theme } from '../../../constants/theme'\n// type\nimport type { ClassArray } from 'clsx'\n\ntype ThemeFunc = (\n theme: Theme,\n active: boolean,\n disabled: boolean\n) => ClassArray\n\nexport const getPrimaryIconButtonTheme: ThemeFunc = (\n theme,\n active,\n disabled\n) => {\n if (disabled) {\n return ['text-gray-400 hover:text-gray-400']\n }\n return [\n // default theme\n 'text-gray-600 hover:text-gray-800 [&>svg]:bg-gray-600 desktop:[&>svg]:hover:bg-gray-800',\n {\n 'text-brand-heavy hover:text-brand-heavy [&>svg]:bg-brand-heavy desktop:[&>svg]:hover:bg-brand-heavy':\n theme === THEME.normal && active,\n },\n // photography theme\n {\n 'text-gray-white hover:text-supportive-pastel [&>svg]:bg-gray-white [&>svg]:hover:bg-supportive-pastel':\n theme === THEME.photography && !active,\n 'text-supportive-pastel hover:text-supportive-pastel [&>svg]:bg-supportive-pastel [&>svg]:hover:bg-supportive-pastel':\n theme === THEME.photography && active,\n },\n // transparent theme\n {\n 'text-gray-white hover:text-gray-200 [&>svg]:bg-gray-white [&>svg]:hover:bg-gray-200':\n theme === THEME.transparent && !active,\n 'text-gray-white hover:text-gray-white [&>svg]:bg-gray-white [&>svg]:hover:bg-gray-white':\n theme === THEME.transparent && active,\n },\n ]\n}\n\nexport const getSecondaryIconButtonTheme: ThemeFunc = (\n theme,\n active,\n disabled\n) => {\n if (disabled) {\n return ['text-gray-400 hover:text-gray-400']\n }\n return [\n // default theme\n 'text-gray-400 hover:text-gray-600 [&>svg]:bg-gray-400 [&>svg]:hover:bg-gray-600',\n {\n 'text-brand-heavy hover:text-brand-heavy [&>svg]:bg-brand-heavy [&>svg]:hover:bg-brand-heavy':\n theme === THEME.normal && active,\n },\n // photography theme\n {\n 'text-gray-400 hover:text-supportive-pastel [&>svg]:bg-gray-400 [&>svg]:hover:bg-supportive-pastel':\n theme === THEME.photography && !active,\n 'text-supportive-pastel hover:text-supportive-pastel [&>svg]:bg-supportive-pastel [&>svg]:hover:bg-supportive-pastel':\n theme === THEME.photography && active,\n },\n // transparent theme\n {\n 'text-gray-600 hover:text-gray-white [&>svg]:bg-gray-600 [&>svg]:hover:bg-gray-white':\n theme === THEME.transparent && !active,\n 'text-gray-600 hover:text-gray-600 [&>svg]:bg-gray-600 [&>svg]:hover:bg-gray-600':\n theme === THEME.transparent && active,\n },\n ]\n}\n","import type React from 'react'\nimport clsx from 'clsx'\n// constants\nimport { THEME, type Theme } from '../../../constants/theme'\nimport { TYPE, type Type } from '../../constants'\n// theme\nimport { getPrimaryIconButtonTheme, getSecondaryIconButtonTheme } from './theme'\n\ntype IconButtonProps = {\n iconComponent: React.ReactElement\n theme?: Theme\n type?: Type\n disabled?: boolean\n active?: boolean\n className?: string\n onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void\n}\nconst IconButton: React.FC<IconButtonProps> & {\n Theme: typeof THEME\n Type: typeof TYPE\n} = ({\n iconComponent,\n theme = THEME.normal,\n type = TYPE.primary,\n disabled = false,\n active = false,\n className = '',\n onClick = () => {},\n}) => {\n const themeClass =\n type === TYPE.primary\n ? getPrimaryIconButtonTheme(theme, active, disabled)\n : getSecondaryIconButtonTheme(theme, active, disabled)\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n if (disabled) {\n return\n }\n e.stopPropagation()\n onClick(e)\n }\n return (\n <button\n className={clsx(\n 'flex',\n '[&>svg]:w-[24px] [&>svg]:h-[24px]',\n disabled ? 'cursor-default' : 'cursor-pointer',\n themeClass,\n className\n )}\n onClick={handleClick}\n type=\"button\"\n >\n {iconComponent}\n </button>\n )\n}\n\nIconButton.Theme = THEME\nIconButton.Type = TYPE\n\nexport default IconButton\n","import type React from 'react'\nimport clsx from 'clsx'\n// P1\nimport { P1 } from '../../../text/paragraph'\nimport { WEIGHT, type Weight } from '../../../text/constants'\n\ntype MenuButtonProps = {\n text: string\n color: string\n fontWeight: Weight\n className?: string\n p1ClassName?: string\n}\nconst MenuButton: React.FC<MenuButtonProps> & { FontWeight: typeof WEIGHT } = ({\n text,\n color,\n fontWeight,\n className = '',\n p1ClassName = '',\n}) => {\n return (\n <div className={clsx('cursor-pointer', color, className)}>\n <P1\n text={text}\n weight={fontWeight}\n className={clsx('py-[8px]', p1ClassName)}\n />\n </div>\n )\n}\nMenuButton.FontWeight = WEIGHT\n\nexport default MenuButton\n","import { THEME, type Theme } from '../../../constants/theme'\nimport { STYLE, type Style } from '../../constants'\n\nexport const getFilledPillButtonTheme = (\n theme: Theme,\n disabled: boolean,\n style: Style\n) => {\n if (disabled) {\n switch (theme) {\n case THEME.transparent:\n switch (style) {\n case STYLE.light:\n return {\n color: 'text-gray-white',\n bgColor: 'bg-gray-400',\n hoverColor: 'hover:text-gray-white',\n hoverBgColor: 'hover:bg-gray-400',\n borderColor: 'border-gray-400',\n svgBgColor: '[&>svg]:bg-gray-white',\n borderHoverColor: 'hover:border-gray-400',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-white',\n }\n default:\n return {\n color: 'text-gray-700',\n bgColor: 'bg-gray-500',\n hoverColor: 'hover:text-gray-700',\n hoverBgColor: 'hover:bg-gray-500',\n borderColor: 'border-gray-500',\n svgBgColor: '[&>svg]:bg-gray-700',\n borderHoverColor: 'hover:border-gray-500',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-500',\n }\n }\n case THEME.photography:\n return {\n color: 'text-gray-700',\n bgColor: 'bg-gray-500',\n hoverColor: 'hover:text-gray-700',\n hoverBgColor: 'hover:bg-gray-500',\n borderColor: 'border-gray-500',\n svgBgColor: '[&>svg]:bg-gray-700',\n borderHoverColor: 'hover:border-gray-500',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-700',\n }\n default:\n return {\n color: 'text-gray-white',\n bgColor: 'bg-gray-400',\n hoverColor: 'hover:text-gray-white',\n hoverBgColor: 'hover:bg-gray-400',\n borderColor: 'border-gray-400',\n svgBgColor: '[&>svg]:bg-gray-white',\n borderHoverColor: 'hover:border-gray-400',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-white',\n }\n }\n }\n switch (theme) {\n case THEME.photography:\n switch (style) {\n case STYLE.dark:\n return {\n color: 'text-photo-dark',\n bgColor: 'bg-gray-white',\n hoverColor: 'hover:text-photo-dark',\n hoverBgColor: 'hover:bg-gray-200',\n borderColor: 'border-gray-white',\n svgBgColor: '[&>svg]:bg-photo-dark',\n borderHoverColor: 'hover:border-gray-200',\n svgHoverBgColor: 'hover:[&>svg]:bg-photo-dark',\n }\n case STYLE.light:\n return {\n color: 'text-photo-dark',\n bgColor: 'bg-gray-300',\n hoverColor: 'hover:text-photo-dark',\n hoverBgColor: 'hover:bg-gray-400',\n borderColor: 'border-gray-300',\n svgBgColor: '[&>svg]:bg-photo-dark',\n borderHoverColor: 'hover:border-gray-400',\n svgHoverBgColor: 'hover:[&>svg]:bg-photo-dark',\n }\n default:\n return {\n color: 'text-photo-dark',\n bgColor: 'bg-supportive-faded',\n hoverColor: 'hover:text-photo-dark',\n hoverBgColor: 'hover:bg-supportive-pastel',\n borderColor: 'border-supportive-faded',\n svgBgColor: '[&>svg]:bg-photo-dark',\n borderHoverColor: 'hover:border-supportive-pastel',\n svgHoverBgColor: 'hover:[&>svg]:bg-photo-dark',\n }\n }\n case THEME.transparent:\n switch (style) {\n case STYLE.dark:\n return {\n color: 'text-gray-800',\n bgColor: 'bg-gray-300',\n hoverColor: 'hover:text-gray-800',\n hoverBgColor: 'hover:bg-gray-400',\n borderColor: 'border-gray-300',\n svgBgColor: '[&>svg]:bg-gray-800',\n borderHoverColor: 'hover:border-gray-400',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-800',\n }\n case STYLE.light:\n return {\n color: 'text-gray-white',\n bgColor: 'bg-gray-800',\n hoverColor: 'hover:text-gray-white',\n hoverBgColor: 'hover:bg-gray-black',\n borderColor: 'border-gray-800',\n svgBgColor: '[&>svg]:bg-gray-white',\n borderHoverColor: 'hover:border-gray-black',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-white',\n }\n default:\n return {\n color: 'text-gray-800',\n bgColor: 'bg-gray-white',\n hoverColor: 'hover:text-gray-800',\n hoverBgColor: 'hover:bg-gray-200',\n borderColor: 'border-gray-white',\n svgBgColor: '[&>svg]:bg-gray-800',\n borderHoverColor: 'hover:border-gray-200',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-800',\n }\n }\n default:\n switch (style) {\n case STYLE.dark:\n return {\n color: 'text-gray-white',\n bgColor: 'bg-gray-800',\n hoverColor: 'hover:text-gray-white',\n hoverBgColor: 'hover:bg-gray-black',\n borderColor: 'border-gray-800',\n svgBgColor: '[&>svg]:bg-gray-white',\n borderHoverColor: 'hover:border-gray-black',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-white',\n }\n case STYLE.light:\n return {\n color: 'text-gray-800',\n bgColor: 'bg-gray-white',\n hoverColor: 'hover:text-gray-800',\n hoverBgColor: 'hover:bg-gray-200',\n borderColor: 'border-gray-white',\n svgBgColor: '[&>svg]:bg-gray-800',\n borderHoverColor: 'hover:border-gray-200',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-800',\n }\n default:\n return {\n color: 'text-gray-white',\n bgColor: 'bg-brand-heavy',\n hoverColor: 'hover:text-gray-white',\n hoverBgColor: 'hover:bg-brand-dark',\n borderColor: 'border-brand-heavy',\n svgBgColor: '[&>svg]:bg-gray-white',\n borderHoverColor: 'hover:border-brand-dark',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-white',\n }\n }\n }\n}\n\nexport const getOutlinePillButtonTheme = (\n theme: Theme,\n disabled: boolean,\n style: Style\n) => {\n if (disabled) {\n switch (theme) {\n case THEME.transparent:\n switch (style) {\n case STYLE.light:\n return {\n color: 'text-gray-400',\n bgColor: 'bg-gray-400',\n hoverColor: 'hover:text-gray-400',\n hoverBgColor: 'hover:bg-gray-400',\n borderColor: 'border-gray-400',\n svgBgColor: '[&>svg]:bg-gray-400',\n borderHoverColor: 'hover:border-gray-400',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-400',\n }\n default:\n return {\n color: 'text-gray-500',\n bgColor: 'bg-gray-500',\n hoverColor: 'hover:text-gray-500',\n hoverBgColor: 'hover:bg-gray-500',\n borderColor: 'border-gray-500',\n svgBgColor: '[&>svg]:bg-gray-500',\n borderHoverColor: 'hover:border-gray-500',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-500',\n }\n }\n case THEME.photography:\n return {\n color: 'text-gray-500',\n bgColor: 'bg-gray-500',\n hoverColor: 'hover:text-gray-500',\n hoverBgColor: 'hover:bg-gray-500',\n borderColor: 'border-gray-500',\n svgBgColor: '[&>svg]:bg-gray-500',\n borderHoverColor: 'hover:border-gray-500',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-500',\n }\n default:\n return {\n color: 'text-gray-400',\n bgColor: 'bg-gray-400',\n hoverColor: 'hover:text-gray-400',\n hoverBgColor: 'hover:bg-gray-400',\n borderColor: 'border-gray-400',\n svgBgColor: '[&>svg]:bg-gray-400',\n borderHoverColor: 'hover:border-gray-400',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-400',\n }\n }\n }\n\n switch (theme) {\n case THEME.photography:\n switch (style) {\n case STYLE.dark:\n return {\n color: 'text-gray-white',\n bgColor: 'bg-gray-white',\n hoverColor: 'hover:text-gray-200',\n hoverBgColor: 'hover:bg-gray-200',\n borderColor: 'border-gray-white',\n svgBgColor: '[&>svg]:bg-gray-white',\n borderHoverColor: 'hover:border-gray-200',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-200',\n }\n case STYLE.light:\n return {\n color: 'text-gray-300',\n bgColor: 'bg-gray-300',\n hoverColor: 'hover:text-gray-400',\n hoverBgColor: 'hover:bg-gray-400',\n borderColor: 'border-gray-300',\n svgBgColor: '[&>svg]:bg-gray-300',\n borderHoverColor: 'hover:border-gray-400',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-400',\n }\n default:\n return {\n color: 'text-supportive-faded',\n bgColor: 'bg-supportive-faded',\n hoverColor: 'hover:text-supportive-pastel',\n hoverBgColor: 'hover:bg-supportive-pastel',\n borderColor: 'border-supportive-faded',\n svgBgColor: '[&>svg]:bg-supportive-faded',\n borderHoverColor: 'hover:border-supportive-pastel',\n svgHoverBgColor: 'hover:[&>svg]:bg-supportive-pastel',\n }\n }\n case THEME.transparent:\n switch (style) {\n case STYLE.dark:\n return {\n color: 'text-gray-300',\n bgColor: 'bg-gray-300',\n hoverColor: 'hover:text-gray-400',\n hoverBgColor: 'hover:bg-gray-400',\n borderColor: 'border-gray-300',\n svgBgColor: '[&>svg]:bg-gray-300',\n borderHoverColor: 'hover:border-gray-400',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-400',\n }\n case STYLE.light:\n return {\n color: 'text-gray-800',\n bgColor: 'bg-gray-800',\n hoverColor: 'hover:text-gray-black',\n hoverBgColor: 'hover:bg-gray-black',\n borderColor: 'border-gray-800',\n svgBgColor: '[&>svg]:bg-gray-800',\n borderHoverColor: 'hover:border-gray-black',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-black',\n }\n default:\n return {\n color: 'text-gray-white',\n bgColor: 'bg-gray-white',\n hoverColor: 'hover:text-gray-200',\n hoverBgColor: 'hover:bg-gray-200',\n borderColor: 'border-gray-white',\n svgBgColor: '[&>svg]:bg-gray-white',\n borderHoverColor: 'hover:border-gray-200',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-200',\n }\n }\n default:\n switch (style) {\n case STYLE.dark:\n return {\n color: 'text-gray-800',\n bgColor: 'bg-gray-800',\n hoverColor: 'hover:text-gray-black',\n hoverBgColor: 'hover:bg-gray-black',\n borderColor: 'border-gray-800',\n svgBgColor: '[&>svg]:bg-gray-800',\n borderHoverColor: 'hover:border-gray-black',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-black',\n }\n case STYLE.light:\n return {\n color: 'text-gray-800',\n bgColor: 'bg-gray-white',\n hoverColor: 'hover:text-gray-800',\n hoverBgColor: 'hover:bg-gray-200',\n borderColor: 'border-gray-white',\n svgBgColor: '[&>svg]:bg-gray-800',\n borderHoverColor: 'hover:border-gray-200',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-800',\n }\n default:\n return {\n color: 'text-brand-heavy',\n bgColor: 'bg-brand-heavy',\n hoverColor: 'hover:text-brand-dark',\n hoverBgColor: 'hover:bg-brand-dark',\n borderColor: 'border-brand-heavy',\n svgBgColor: '[&>svg]:bg-brand-heavy',\n borderHoverColor: 'hover:border-brand-dark',\n svgHoverBgColor: 'hover:[&>svg]:bg-brand-dark',\n }\n }\n }\n}\n","import { useMemo, type FC } from 'react'\nimport clsx from 'clsx'\n// text\nimport { P1, P2 } from '../../../text/paragraph'\n// constants\nimport {\n SIZE,\n type Size,\n STYLE,\n type Style,\n TYPE,\n type Type,\n} from '../../constants'\nimport { THEME, type Theme } from '../../../constants/theme'\n// theme\nimport { getFilledPillButtonTheme, getOutlinePillButtonTheme } from './theme'\n\ntype PillButtonProps = {\n text?: string\n leftIconComponent?: React.ReactElement\n rightIconComponent?: React.ReactElement\n size?: Size\n theme?: Theme\n type?: Type\n style?: Style\n disabled?: boolean\n loading?: boolean\n className?: string\n}\nconst PillButton: FC<PillButtonProps> & {\n Theme: typeof THEME\n Type: typeof TYPE\n Size: typeof SIZE\n Style: typeof STYLE\n} = ({\n text = '',\n leftIconComponent = null,\n rightIconComponent = null,\n size = SIZE.s,\n theme = THEME.normal,\n type = TYPE.primary,\n style = STYLE.brand,\n disabled = false,\n loading = false,\n className = '',\n}) => {\n const themeFunc =\n type === TYPE.primary ? getFilledPillButtonTheme : getOutlinePillButtonTheme\n const {\n color,\n bgColor,\n hoverColor,\n hoverBgColor,\n borderColor,\n svgBgColor,\n borderHoverColor,\n svgHoverBgColor,\n } = themeFunc(theme, disabled, style)\n\n const padding = size === SIZE.s ? 'py-[4px] px-[12px]' : 'py-[8px] px-[16px]'\n const iconSize =\n size === SIZE.s\n ? '[&>svg]:h-[18px] [&>svg]:w-[18px]'\n : '[&>svg]:h-[24px] [&>svg]:w-[24px]'\n\n const TextJSX = useMemo(\n () =>\n size === SIZE.s ? (\n <P2 text={text} weight={P2.Weight.bold} />\n ) : (\n <P1 text={text} weight={P1.Weight.bold} />\n ),\n [size, text]\n )\n\n return (\n <div\n className={clsx(\n 'w-fit flex items-center rounded-[40px] border-solid border-[1.5px]',\n borderColor,\n color,\n padding,\n disabled || loading ? 'cursor-not-allowed' : 'cursor-pointer',\n type === TYPE.primary ? bgColor : 'bg-transparent',\n iconSize,\n svgBgColor,\n hoverColor,\n type === TYPE.primary ? hoverBgColor : 'bg-transparent',\n borderHoverColor,\n svgHoverBgColor,\n className\n )}\n >\n <div className=\"relative flex justify-center items-center\">\n <div\n className={clsx('flex justify-center items-center', {\n 'opacity-0': loading,\n 'opacity-100': !loading,\n })}\n >\n {leftIconComponent ? (\n <div className=\"flex items-center mr-[4px]\">\n {leftIconComponent}\n </div>\n ) : null}\n {TextJSX}\n {rightIconComponent ? (\n <div className=\"flex items-center ml-[4px]\">\n {rightIconComponent}\n </div>\n ) : null}\n </div>\n <span\n className={clsx(\n 'inline-block absolute box-border animate-spin',\n 'border-2 border-solid border-gray-400 border-t-gray-600 rounded-[50%]',\n {\n 'size-[18px]': size === SIZE.s,\n 'size-[24px]': size === SIZE.l,\n },\n {\n 'opacity-0': !loading,\n 'opacity-100': loading,\n }\n )}\n />\n </div>\n </div>\n )\n}\nPillButton.Theme = THEME\nPillButton.Type = TYPE\nPillButton.Size = SIZE\nPillButton.Style = STYLE\n\nexport default PillButton\n","import { THEME, type Theme } from '../../../constants/theme'\n\nexport const getIconWithTextButtonTheme = (\n theme: Theme,\n isActive: boolean,\n isDisabled: boolean\n) => {\n if (isDisabled) {\n return {\n color: 'text-gray-400',\n hoverColor: 'hover:text-gray-400',\n svgBgColor: '[&>svg]:bg-gray-400',\n svgHoverBgColor: '[&>svg]:hover:bg-gray-400',\n }\n }\n\n const switchKey = isActive ? `${theme}-active` : theme\n switch (switchKey) {\n case THEME.photography:\n return {\n color: 'text-gray-200',\n hoverColor: 'hover:text-supportive-pastel',\n svgBgColor: '[&>svg]:bg-gray-200',\n svgHoverBgColor: '[&>svg]:hover:bg-supportive-pastel',\n }\n case `${THEME.photography}-active`:\n return {\n color: 'text-supportive-pastel',\n hoverColor: 'hover:text-supportive-pastel',\n svgBgColor: '[&>svg]:bg-supportive-pastel',\n svgHoverBgColor: '[&>svg]:hover:bg-supportive-pastel',\n }\n case THEME.transparent:\n return {\n color: 'text-gray-100',\n hoverColor: 'hover:text-gray-200',\n svgBgColor: '[&>svg]:bg-gray-100',\n svgHoverBgColor: '[&>svg]:hover:bg-gray-200',\n }\n case `${THEME.transparent}-active`:\n return {\n color: 'text-gray-white',\n hoverColor: 'hover:text-gray-white',\n svgBgColor: '[&>svg]:bg-gray-white',\n svgHoverBgColor: '[&>svg]:hover:bg-gray-white',\n }\n case `${THEME.normal}-active`:\n return {\n color: 'text-brand-heavy',\n hoverColor: 'hover:text-brand-heavy',\n svgBgColor: '[&>svg]:bg-brand-heavy',\n svgHoverBgColor: '[&>svg]:hover:bg-brand-heavy',\n }\n default:\n return {\n color: 'text-gray-600',\n hoverColor: 'hover:text-brand-heavy',\n svgBgColor: '[&>svg]:bg-gray-600',\n svgHoverBgColor: '[&>svg]:hover:bg-brand-heavy',\n }\n }\n}\n","import type { FC } from 'react'\nimport clsx from 'clsx'\n// constants\nimport { THEME, type Theme } from '../../../constants/theme'\n// theme\nimport { getIconWithTextButtonTheme } from './theme'\n// text\nimport { P4 } from '../../../text/paragraph'\n\ntype IconWithTextButtonProps = {\n text?: string\n iconComponent: React.ReactNode\n theme?: Theme\n disabled?: boolean\n active?: boolean\n hideText?: boolean\n className?: string\n onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void\n}\nconst IconWithTextButton: FC<IconWithTextButtonProps> & {\n Theme: typeof THEME\n} = ({\n text = '',\n iconComponent,\n theme = THEME.normal,\n disabled = false,\n active = false,\n hideText = false,\n className = '',\n onClick = () => {},\n}) => {\n const { color, hoverColor, svgBgColor, svgHoverBgColor } =\n getIconWithTextButtonTheme(theme, active, disabled)\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n if (disabled) {\n return\n }\n e.stopPropagation()\n onClick(e)\n }\n return (\n <button\n className={clsx(\n 'flex flex-col items-center',\n '[&>svg]:w-[24px] [&>svg]:h-[24px]',\n color,\n hoverColor,\n svgBgColor,\n svgHoverBgColor,\n disabled ? 'cursor-not-allowed' : 'cursor-pointer',\n className\n )}\n type=\"button\"\n onClick={handleClick}\n >\n {iconComponent}\n <P4\n text={text}\n weight={P4.Weight.normal}\n className={clsx(\n 'mt-[2px] transition-opacity duration-[100ms]',\n hideText ? 'opacity-0' : 'opacity-100',\n hideText ? 'max-h-0' : 'max-h-none'\n )}\n />\n </button>\n )\n}\nIconWithTextButton.Theme = THEME\nexport default IconWithTextButton\n","import TextButton from './components/text-button'\nimport IconButton from './components/icon-button'\nimport MenuButton from './components/menu-button'\nimport PillButton from './components/pill-button'\nimport IconWithTextButton from './components/icon-with-text-button'\n\nexport { TextButton, IconButton, MenuButton, PillButton, IconWithTextButton }\n\nexport default {\n TextButton,\n IconButton,\n MenuButton,\n PillButton,\n IconWithTextButton,\n}\n"],"mappings":";;;;;;;;;AASA,MAAaA,6BAAwC,UAAU;AAC7D,QAAO,CAEL,qCAEA,EACE,qCACE,UAAU,MAAM,eAAe,UAAU,MAAM,aAClD,CACF;;AAGH,MAAaC,2BAAsC,OAAO,UAAU;AAClE,QAAO;EAEL;GACE,qCAAqC,UAAU,MAAM;GACrD,2CAA2C,UAAU,MAAM;GAC3D,yCAAyC,UAAU,MAAM;GAC1D;EAED;GACE,qCACE,UAAU,MAAM,eAAe,UAAU,MAAM;GACjD,uDACE,UAAU,MAAM,eAAe,UAAU,MAAM;GAClD;EAED;GACE,yCACE,UAAU,MAAM,eAAe,UAAU,MAAM;GACjD,qCACE,UAAU,MAAM,eAAe,UAAU,MAAM;GAClD;EACF;;AAGH,MAAaC,qBAAgC,OAAO,UAAU;AAC5D,QAAO;EAEL;GACE,qCAAqC,UAAU,MAAM;GACrD,wCAAwC,UAAU,MAAM;GACxD,0CAA0C,UAAU,MAAM;GAC3D;EAED;GACE,qCACE,UAAU,MAAM,eAAe,UAAU,MAAM;GACjD,gDACE,UAAU,MAAM,eAAe,UAAU,MAAM;GACjD,sDACE,UAAU,MA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P,YAAY;GACZ,YAAY;GACZ,iBAAiB;GAClB;EACH,KAAK,GAAG,MAAM,YAAY,SACxB,QAAO;GACL,OAAO;GACP,YAAY;GACZ,YAAY;GACZ,iBAAiB;GAClB;EACH,KAAK,MAAM,YACT,QAAO;GACL,OAAO;GACP,YAAY;GACZ,YAAY;GACZ,iBAAiB;GAClB;EACH,KAAK,GAAG,MAAM,YAAY,SACxB,QAAO;GACL,OAAO;GACP,YAAY;GACZ,YAAY;GACZ,iBAAiB;GAClB;EACH,KAAK,GAAG,MAAM,OAAO,SACnB,QAAO;GACL,OAAO;GACP,YAAY;GACZ,YAAY;GACZ,iBAAiB;GAClB;EACH,QACE,QAAO;GACL,OAAO;GACP,YAAY;GACZ,YAAY;GACZ,iBAAiB;GAClB;;;;;;ACxCP,MAAMC,sBAED,EACH,OAAO,IACP,eACA,QAAQ,MAAM,QACd,WAAW,OACX,SAAS,OACT,WAAW,OACX,YAAY,IACZ,gBAAgB,SACZ;CACJ,MAAM,EAAE,OAAO,YAAY,YAAY,oBACrC,2BAA2B,OAAO,QAAQ,SAAS;CACrD,MAAM,eAAe,MAA2C;AAC9D,MAAI,SACF;AAEF,IAAE,iBAAiB;AACnB,UAAQ,EAAE;;AAEZ,QACE,qBAAC;EACC,WAAW,KACT,8BACA,qCACA,OACA,YACA,YACA,iBACA,WAAW,uBAAuB,kBAClC,UACD;EACD,MAAK;EACL,SAAS;aAER,eACD,oBAAC;GACO;GACN,QAAQ,GAAG,OAAO;GAClB,WAAW,KACT,gDACA,WAAW,cAAc,eACzB,WAAW,YAAY,aACxB;IACD;GACK;;AAGb,mBAAmB,QAAQ;AAC3B,oCAAe;;;;AC7Df,qBAAe;CACb;CACA;CACA;CACA;CACA;CACD"}
|
|
@@ -143,9 +143,14 @@ const getSecondaryIconButtonTheme = (theme, active, disabled) => {
|
|
|
143
143
|
//#region src/button/components/icon-button/index.tsx
|
|
144
144
|
const IconButton = ({ iconComponent, theme = require_theme.THEME.normal, type = require_constants.TYPE.primary, disabled = false, active = false, className = "", onClick = () => {} }) => {
|
|
145
145
|
const themeClass = type === require_constants.TYPE.primary ? getPrimaryIconButtonTheme(theme, active, disabled) : getSecondaryIconButtonTheme(theme, active, disabled);
|
|
146
|
+
const handleClick = (e) => {
|
|
147
|
+
if (disabled) return;
|
|
148
|
+
e.stopPropagation();
|
|
149
|
+
onClick(e);
|
|
150
|
+
};
|
|
146
151
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
147
152
|
className: (0, clsx.default)("flex", "[&>svg]:w-[24px] [&>svg]:h-[24px]", disabled ? "cursor-default" : "cursor-pointer", themeClass, className),
|
|
148
|
-
onClick:
|
|
153
|
+
onClick: handleClick,
|
|
149
154
|
type: "button",
|
|
150
155
|
children: iconComponent
|
|
151
156
|
});
|
|
@@ -564,6 +569,7 @@ const IconWithTextButton = ({ text = "", iconComponent, theme = require_theme.TH
|
|
|
564
569
|
const { color, hoverColor, svgBgColor, svgHoverBgColor } = getIconWithTextButtonTheme(theme, active, disabled);
|
|
565
570
|
const handleClick = (e) => {
|
|
566
571
|
if (disabled) return;
|
|
572
|
+
e.stopPropagation();
|
|
567
573
|
onClick(e);
|
|
568
574
|
};
|
|
569
575
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
@@ -627,4 +633,4 @@ Object.defineProperty(exports, 'text_button_default', {
|
|
|
627
633
|
return text_button_default;
|
|
628
634
|
}
|
|
629
635
|
});
|
|
630
|
-
//# sourceMappingURL=button-
|
|
636
|
+
//# sourceMappingURL=button-Dk0MxlKd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-Dk0MxlKd.js","names":["getDisabledContainerTheme: ThemeFunc","THEME","getActiveContainerTheme: ThemeFunc","STYLE","getContainerTheme: ThemeFunc","TextButton: FC<TextButtonProps> & {\n Size: typeof SIZE\n Style: typeof STYLE\n Theme: typeof THEME\n}","SIZE","THEME","STYLE","P2","P1","getPrimaryIconButtonTheme: ThemeFunc","THEME","getSecondaryIconButtonTheme: ThemeFunc","IconButton: React.FC<IconButtonProps> & {\n Theme: typeof THEME\n Type: typeof TYPE\n}","THEME","TYPE","MenuButton: React.FC<MenuButtonProps> & { FontWeight: typeof WEIGHT }","P1","WEIGHT","THEME","STYLE","PillButton: FC<PillButtonProps> & {\n Theme: typeof THEME\n Type: typeof TYPE\n Size: typeof SIZE\n Style: typeof STYLE\n}","SIZE","THEME","TYPE","STYLE","P2","P1","THEME","IconWithTextButton: FC<IconWithTextButtonProps> & {\n Theme: typeof THEME\n}","THEME","P4"],"sources":["../src/button/components/text-button/theme.ts","../src/button/components/text-button/index.tsx","../src/button/components/icon-button/theme.ts","../src/button/components/icon-button/index.tsx","../src/button/components/menu-button/index.tsx","../src/button/components/pill-button/theme.ts","../src/button/components/pill-button/index.tsx","../src/button/components/icon-with-text-button/theme.ts","../src/button/components/icon-with-text-button/index.tsx","../src/button/index.ts"],"sourcesContent":["// theme\nimport { THEME, type Theme } from '../../../constants/theme'\n// type\nimport type { ClassArray } from 'clsx'\n// constants\nimport { STYLE, type Style } from '../../constants'\n\ntype ThemeFunc = (theme: Theme, style?: Style) => ClassArray\n\nexport const getDisabledContainerTheme: ThemeFunc = (theme) => {\n return [\n // default theme\n 'text-gray-400 hover:text-gray-400',\n // photography & transparent theme\n {\n 'text-gray-500 hover:text-gray-500':\n theme === THEME.photography || theme === THEME.transparent,\n },\n ]\n}\n\nexport const getActiveContainerTheme: ThemeFunc = (theme, style) => {\n return [\n // default theme\n {\n 'text-gray-800 hover:text-gray-800': style === STYLE.light,\n 'text-brand-heavy hover:text-brand-heavy': style === STYLE.dark,\n 'text-brand-dark hover:text-brand-dark': style === STYLE.brand,\n },\n // photography theme\n {\n 'text-gray-400 hover:text-gray-400':\n theme === THEME.photography && style === STYLE.light,\n 'text-supportive-pastel hover:text-supportive-pastel':\n theme === THEME.photography && style !== STYLE.light,\n },\n // transparent theme\n {\n 'text-gray-black hover:text-gray-black':\n theme === THEME.transparent && style === STYLE.light,\n 'text-gray-200 hover:text-gray-200':\n theme === THEME.transparent && style !== STYLE.light,\n },\n ]\n}\n\nexport const getContainerTheme: ThemeFunc = (theme, style) => {\n return [\n // default theme\n {\n 'text-gray-600 hover:text-gray-800': style === STYLE.light,\n 'text-gray-800 hover:text-brand-heavy': style === STYLE.dark,\n 'text-brand-heavy hover:text-brand-dark': style === STYLE.brand,\n },\n // photography\n {\n 'text-gray-300 hover:text-gray-400':\n theme === THEME.photography && style === STYLE.light,\n 'text-gray-white hover:text-supportive-pastel':\n theme === THEME.photography && style === STYLE.dark,\n 'text-supportive-faded hover:text-supportive-pastel':\n theme === THEME.photography && style === STYLE.brand,\n },\n // transparent theme\n {\n 'text-gray-800 hover:text-gray-black':\n theme === THEME.transparent && style === STYLE.light,\n 'text-gray-white hover:text-gray-200':\n theme === THEME.transparent && style !== STYLE.light,\n },\n ]\n}\n","import { type FC, type ReactElement, useMemo } from 'react'\nimport clsx from 'clsx'\n// components\nimport { P1, P2 } from '../../../text/paragraph'\n// constants\nimport { SIZE, type Size, STYLE, type Style } from '../../constants'\nimport { THEME, type Theme } from '../../../constants/theme'\n// utils\nimport {\n getContainerTheme,\n getActiveContainerTheme,\n getDisabledContainerTheme,\n} from './theme'\n\ntype TextButtonProps = {\n text: string\n leftIconComponent?: ReactElement\n rightIconComponent?: ReactElement\n size?: Size\n style?: Style\n theme?: Theme\n active?: boolean\n disabled?: boolean\n loading?: boolean\n className?: string\n}\nconst TextButton: FC<TextButtonProps> & {\n Size: typeof SIZE\n Style: typeof STYLE\n Theme: typeof THEME\n} = ({\n text,\n leftIconComponent,\n rightIconComponent,\n size = SIZE.s,\n theme = THEME.normal,\n style = STYLE.dark,\n active = false,\n disabled = false,\n loading = false,\n className = '',\n}) => {\n const TextJSX = useMemo(\n () =>\n size === SIZE.s ? (\n <P2 text={text} weight={P2.Weight.bold} />\n ) : (\n <P1 text={text} weight={P1.Weight.bold} />\n ),\n [size, text]\n )\n const themeClass = useMemo(() => {\n const themeFunc = disabled\n ? getDisabledContainerTheme\n : active\n ? getActiveContainerTheme\n : getContainerTheme\n return themeFunc(theme, style)\n }, [disabled, active, theme, style])\n\n return (\n <div\n className={clsx(\n 'flex items-center',\n {\n 'cursor-default': disabled,\n 'cursor-pointer': !disabled,\n },\n themeClass,\n className\n )}\n >\n <div className=\"relative flex justify-center items-center\">\n <div\n className={clsx('flex justify-center items-center', {\n 'opacity-0': loading,\n 'opacity-100': !loading,\n })}\n >\n <div className=\"flex items-center mr-[4px]\">{leftIconComponent}</div>\n {TextJSX}\n <div className=\"flex items-center ml-[4px]\">{rightIconComponent}</div>\n </div>\n <span\n className={clsx(\n 'inline-block absolute box-border animate-spin',\n 'border-2 border-solid border-gray-400 border-t-gray-600 rounded-[50%]',\n {\n 'size-[18px]': size === SIZE.s,\n 'size-[24px]': size === SIZE.l,\n },\n {\n 'opacity-0': !loading,\n 'opacity-100': loading,\n }\n )}\n />\n </div>\n </div>\n )\n}\nTextButton.Size = SIZE\nTextButton.Style = STYLE\nTextButton.Theme = THEME\n\nexport default TextButton\n","// constants\nimport { THEME, type Theme } from '../../../constants/theme'\n// type\nimport type { ClassArray } from 'clsx'\n\ntype ThemeFunc = (\n theme: Theme,\n active: boolean,\n disabled: boolean\n) => ClassArray\n\nexport const getPrimaryIconButtonTheme: ThemeFunc = (\n theme,\n active,\n disabled\n) => {\n if (disabled) {\n return ['text-gray-400 hover:text-gray-400']\n }\n return [\n // default theme\n 'text-gray-600 hover:text-gray-800 [&>svg]:bg-gray-600 desktop:[&>svg]:hover:bg-gray-800',\n {\n 'text-brand-heavy hover:text-brand-heavy [&>svg]:bg-brand-heavy desktop:[&>svg]:hover:bg-brand-heavy':\n theme === THEME.normal && active,\n },\n // photography theme\n {\n 'text-gray-white hover:text-supportive-pastel [&>svg]:bg-gray-white [&>svg]:hover:bg-supportive-pastel':\n theme === THEME.photography && !active,\n 'text-supportive-pastel hover:text-supportive-pastel [&>svg]:bg-supportive-pastel [&>svg]:hover:bg-supportive-pastel':\n theme === THEME.photography && active,\n },\n // transparent theme\n {\n 'text-gray-white hover:text-gray-200 [&>svg]:bg-gray-white [&>svg]:hover:bg-gray-200':\n theme === THEME.transparent && !active,\n 'text-gray-white hover:text-gray-white [&>svg]:bg-gray-white [&>svg]:hover:bg-gray-white':\n theme === THEME.transparent && active,\n },\n ]\n}\n\nexport const getSecondaryIconButtonTheme: ThemeFunc = (\n theme,\n active,\n disabled\n) => {\n if (disabled) {\n return ['text-gray-400 hover:text-gray-400']\n }\n return [\n // default theme\n 'text-gray-400 hover:text-gray-600 [&>svg]:bg-gray-400 [&>svg]:hover:bg-gray-600',\n {\n 'text-brand-heavy hover:text-brand-heavy [&>svg]:bg-brand-heavy [&>svg]:hover:bg-brand-heavy':\n theme === THEME.normal && active,\n },\n // photography theme\n {\n 'text-gray-400 hover:text-supportive-pastel [&>svg]:bg-gray-400 [&>svg]:hover:bg-supportive-pastel':\n theme === THEME.photography && !active,\n 'text-supportive-pastel hover:text-supportive-pastel [&>svg]:bg-supportive-pastel [&>svg]:hover:bg-supportive-pastel':\n theme === THEME.photography && active,\n },\n // transparent theme\n {\n 'text-gray-600 hover:text-gray-white [&>svg]:bg-gray-600 [&>svg]:hover:bg-gray-white':\n theme === THEME.transparent && !active,\n 'text-gray-600 hover:text-gray-600 [&>svg]:bg-gray-600 [&>svg]:hover:bg-gray-600':\n theme === THEME.transparent && active,\n },\n ]\n}\n","import type React from 'react'\nimport clsx from 'clsx'\n// constants\nimport { THEME, type Theme } from '../../../constants/theme'\nimport { TYPE, type Type } from '../../constants'\n// theme\nimport { getPrimaryIconButtonTheme, getSecondaryIconButtonTheme } from './theme'\n\ntype IconButtonProps = {\n iconComponent: React.ReactElement\n theme?: Theme\n type?: Type\n disabled?: boolean\n active?: boolean\n className?: string\n onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void\n}\nconst IconButton: React.FC<IconButtonProps> & {\n Theme: typeof THEME\n Type: typeof TYPE\n} = ({\n iconComponent,\n theme = THEME.normal,\n type = TYPE.primary,\n disabled = false,\n active = false,\n className = '',\n onClick = () => {},\n}) => {\n const themeClass =\n type === TYPE.primary\n ? getPrimaryIconButtonTheme(theme, active, disabled)\n : getSecondaryIconButtonTheme(theme, active, disabled)\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n if (disabled) {\n return\n }\n e.stopPropagation()\n onClick(e)\n }\n return (\n <button\n className={clsx(\n 'flex',\n '[&>svg]:w-[24px] [&>svg]:h-[24px]',\n disabled ? 'cursor-default' : 'cursor-pointer',\n themeClass,\n className\n )}\n onClick={handleClick}\n type=\"button\"\n >\n {iconComponent}\n </button>\n )\n}\n\nIconButton.Theme = THEME\nIconButton.Type = TYPE\n\nexport default IconButton\n","import type React from 'react'\nimport clsx from 'clsx'\n// P1\nimport { P1 } from '../../../text/paragraph'\nimport { WEIGHT, type Weight } from '../../../text/constants'\n\ntype MenuButtonProps = {\n text: string\n color: string\n fontWeight: Weight\n className?: string\n p1ClassName?: string\n}\nconst MenuButton: React.FC<MenuButtonProps> & { FontWeight: typeof WEIGHT } = ({\n text,\n color,\n fontWeight,\n className = '',\n p1ClassName = '',\n}) => {\n return (\n <div className={clsx('cursor-pointer', color, className)}>\n <P1\n text={text}\n weight={fontWeight}\n className={clsx('py-[8px]', p1ClassName)}\n />\n </div>\n )\n}\nMenuButton.FontWeight = WEIGHT\n\nexport default MenuButton\n","import { THEME, type Theme } from '../../../constants/theme'\nimport { STYLE, type Style } from '../../constants'\n\nexport const getFilledPillButtonTheme = (\n theme: Theme,\n disabled: boolean,\n style: Style\n) => {\n if (disabled) {\n switch (theme) {\n case THEME.transparent:\n switch (style) {\n case STYLE.light:\n return {\n color: 'text-gray-white',\n bgColor: 'bg-gray-400',\n hoverColor: 'hover:text-gray-white',\n hoverBgColor: 'hover:bg-gray-400',\n borderColor: 'border-gray-400',\n svgBgColor: '[&>svg]:bg-gray-white',\n borderHoverColor: 'hover:border-gray-400',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-white',\n }\n default:\n return {\n color: 'text-gray-700',\n bgColor: 'bg-gray-500',\n hoverColor: 'hover:text-gray-700',\n hoverBgColor: 'hover:bg-gray-500',\n borderColor: 'border-gray-500',\n svgBgColor: '[&>svg]:bg-gray-700',\n borderHoverColor: 'hover:border-gray-500',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-500',\n }\n }\n case THEME.photography:\n return {\n color: 'text-gray-700',\n bgColor: 'bg-gray-500',\n hoverColor: 'hover:text-gray-700',\n hoverBgColor: 'hover:bg-gray-500',\n borderColor: 'border-gray-500',\n svgBgColor: '[&>svg]:bg-gray-700',\n borderHoverColor: 'hover:border-gray-500',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-700',\n }\n default:\n return {\n color: 'text-gray-white',\n bgColor: 'bg-gray-400',\n hoverColor: 'hover:text-gray-white',\n hoverBgColor: 'hover:bg-gray-400',\n borderColor: 'border-gray-400',\n svgBgColor: '[&>svg]:bg-gray-white',\n borderHoverColor: 'hover:border-gray-400',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-white',\n }\n }\n }\n switch (theme) {\n case THEME.photography:\n switch (style) {\n case STYLE.dark:\n return {\n color: 'text-photo-dark',\n bgColor: 'bg-gray-white',\n hoverColor: 'hover:text-photo-dark',\n hoverBgColor: 'hover:bg-gray-200',\n borderColor: 'border-gray-white',\n svgBgColor: '[&>svg]:bg-photo-dark',\n borderHoverColor: 'hover:border-gray-200',\n svgHoverBgColor: 'hover:[&>svg]:bg-photo-dark',\n }\n case STYLE.light:\n return {\n color: 'text-photo-dark',\n bgColor: 'bg-gray-300',\n hoverColor: 'hover:text-photo-dark',\n hoverBgColor: 'hover:bg-gray-400',\n borderColor: 'border-gray-300',\n svgBgColor: '[&>svg]:bg-photo-dark',\n borderHoverColor: 'hover:border-gray-400',\n svgHoverBgColor: 'hover:[&>svg]:bg-photo-dark',\n }\n default:\n return {\n color: 'text-photo-dark',\n bgColor: 'bg-supportive-faded',\n hoverColor: 'hover:text-photo-dark',\n hoverBgColor: 'hover:bg-supportive-pastel',\n borderColor: 'border-supportive-faded',\n svgBgColor: '[&>svg]:bg-photo-dark',\n borderHoverColor: 'hover:border-supportive-pastel',\n svgHoverBgColor: 'hover:[&>svg]:bg-photo-dark',\n }\n }\n case THEME.transparent:\n switch (style) {\n case STYLE.dark:\n return {\n color: 'text-gray-800',\n bgColor: 'bg-gray-300',\n hoverColor: 'hover:text-gray-800',\n hoverBgColor: 'hover:bg-gray-400',\n borderColor: 'border-gray-300',\n svgBgColor: '[&>svg]:bg-gray-800',\n borderHoverColor: 'hover:border-gray-400',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-800',\n }\n case STYLE.light:\n return {\n color: 'text-gray-white',\n bgColor: 'bg-gray-800',\n hoverColor: 'hover:text-gray-white',\n hoverBgColor: 'hover:bg-gray-black',\n borderColor: 'border-gray-800',\n svgBgColor: '[&>svg]:bg-gray-white',\n borderHoverColor: 'hover:border-gray-black',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-white',\n }\n default:\n return {\n color: 'text-gray-800',\n bgColor: 'bg-gray-white',\n hoverColor: 'hover:text-gray-800',\n hoverBgColor: 'hover:bg-gray-200',\n borderColor: 'border-gray-white',\n svgBgColor: '[&>svg]:bg-gray-800',\n borderHoverColor: 'hover:border-gray-200',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-800',\n }\n }\n default:\n switch (style) {\n case STYLE.dark:\n return {\n color: 'text-gray-white',\n bgColor: 'bg-gray-800',\n hoverColor: 'hover:text-gray-white',\n hoverBgColor: 'hover:bg-gray-black',\n borderColor: 'border-gray-800',\n svgBgColor: '[&>svg]:bg-gray-white',\n borderHoverColor: 'hover:border-gray-black',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-white',\n }\n case STYLE.light:\n return {\n color: 'text-gray-800',\n bgColor: 'bg-gray-white',\n hoverColor: 'hover:text-gray-800',\n hoverBgColor: 'hover:bg-gray-200',\n borderColor: 'border-gray-white',\n svgBgColor: '[&>svg]:bg-gray-800',\n borderHoverColor: 'hover:border-gray-200',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-800',\n }\n default:\n return {\n color: 'text-gray-white',\n bgColor: 'bg-brand-heavy',\n hoverColor: 'hover:text-gray-white',\n hoverBgColor: 'hover:bg-brand-dark',\n borderColor: 'border-brand-heavy',\n svgBgColor: '[&>svg]:bg-gray-white',\n borderHoverColor: 'hover:border-brand-dark',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-white',\n }\n }\n }\n}\n\nexport const getOutlinePillButtonTheme = (\n theme: Theme,\n disabled: boolean,\n style: Style\n) => {\n if (disabled) {\n switch (theme) {\n case THEME.transparent:\n switch (style) {\n case STYLE.light:\n return {\n color: 'text-gray-400',\n bgColor: 'bg-gray-400',\n hoverColor: 'hover:text-gray-400',\n hoverBgColor: 'hover:bg-gray-400',\n borderColor: 'border-gray-400',\n svgBgColor: '[&>svg]:bg-gray-400',\n borderHoverColor: 'hover:border-gray-400',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-400',\n }\n default:\n return {\n color: 'text-gray-500',\n bgColor: 'bg-gray-500',\n hoverColor: 'hover:text-gray-500',\n hoverBgColor: 'hover:bg-gray-500',\n borderColor: 'border-gray-500',\n svgBgColor: '[&>svg]:bg-gray-500',\n borderHoverColor: 'hover:border-gray-500',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-500',\n }\n }\n case THEME.photography:\n return {\n color: 'text-gray-500',\n bgColor: 'bg-gray-500',\n hoverColor: 'hover:text-gray-500',\n hoverBgColor: 'hover:bg-gray-500',\n borderColor: 'border-gray-500',\n svgBgColor: '[&>svg]:bg-gray-500',\n borderHoverColor: 'hover:border-gray-500',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-500',\n }\n default:\n return {\n color: 'text-gray-400',\n bgColor: 'bg-gray-400',\n hoverColor: 'hover:text-gray-400',\n hoverBgColor: 'hover:bg-gray-400',\n borderColor: 'border-gray-400',\n svgBgColor: '[&>svg]:bg-gray-400',\n borderHoverColor: 'hover:border-gray-400',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-400',\n }\n }\n }\n\n switch (theme) {\n case THEME.photography:\n switch (style) {\n case STYLE.dark:\n return {\n color: 'text-gray-white',\n bgColor: 'bg-gray-white',\n hoverColor: 'hover:text-gray-200',\n hoverBgColor: 'hover:bg-gray-200',\n borderColor: 'border-gray-white',\n svgBgColor: '[&>svg]:bg-gray-white',\n borderHoverColor: 'hover:border-gray-200',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-200',\n }\n case STYLE.light:\n return {\n color: 'text-gray-300',\n bgColor: 'bg-gray-300',\n hoverColor: 'hover:text-gray-400',\n hoverBgColor: 'hover:bg-gray-400',\n borderColor: 'border-gray-300',\n svgBgColor: '[&>svg]:bg-gray-300',\n borderHoverColor: 'hover:border-gray-400',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-400',\n }\n default:\n return {\n color: 'text-supportive-faded',\n bgColor: 'bg-supportive-faded',\n hoverColor: 'hover:text-supportive-pastel',\n hoverBgColor: 'hover:bg-supportive-pastel',\n borderColor: 'border-supportive-faded',\n svgBgColor: '[&>svg]:bg-supportive-faded',\n borderHoverColor: 'hover:border-supportive-pastel',\n svgHoverBgColor: 'hover:[&>svg]:bg-supportive-pastel',\n }\n }\n case THEME.transparent:\n switch (style) {\n case STYLE.dark:\n return {\n color: 'text-gray-300',\n bgColor: 'bg-gray-300',\n hoverColor: 'hover:text-gray-400',\n hoverBgColor: 'hover:bg-gray-400',\n borderColor: 'border-gray-300',\n svgBgColor: '[&>svg]:bg-gray-300',\n borderHoverColor: 'hover:border-gray-400',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-400',\n }\n case STYLE.light:\n return {\n color: 'text-gray-800',\n bgColor: 'bg-gray-800',\n hoverColor: 'hover:text-gray-black',\n hoverBgColor: 'hover:bg-gray-black',\n borderColor: 'border-gray-800',\n svgBgColor: '[&>svg]:bg-gray-800',\n borderHoverColor: 'hover:border-gray-black',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-black',\n }\n default:\n return {\n color: 'text-gray-white',\n bgColor: 'bg-gray-white',\n hoverColor: 'hover:text-gray-200',\n hoverBgColor: 'hover:bg-gray-200',\n borderColor: 'border-gray-white',\n svgBgColor: '[&>svg]:bg-gray-white',\n borderHoverColor: 'hover:border-gray-200',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-200',\n }\n }\n default:\n switch (style) {\n case STYLE.dark:\n return {\n color: 'text-gray-800',\n bgColor: 'bg-gray-800',\n hoverColor: 'hover:text-gray-black',\n hoverBgColor: 'hover:bg-gray-black',\n borderColor: 'border-gray-800',\n svgBgColor: '[&>svg]:bg-gray-800',\n borderHoverColor: 'hover:border-gray-black',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-black',\n }\n case STYLE.light:\n return {\n color: 'text-gray-800',\n bgColor: 'bg-gray-white',\n hoverColor: 'hover:text-gray-800',\n hoverBgColor: 'hover:bg-gray-200',\n borderColor: 'border-gray-white',\n svgBgColor: '[&>svg]:bg-gray-800',\n borderHoverColor: 'hover:border-gray-200',\n svgHoverBgColor: 'hover:[&>svg]:bg-gray-800',\n }\n default:\n return {\n color: 'text-brand-heavy',\n bgColor: 'bg-brand-heavy',\n hoverColor: 'hover:text-brand-dark',\n hoverBgColor: 'hover:bg-brand-dark',\n borderColor: 'border-brand-heavy',\n svgBgColor: '[&>svg]:bg-brand-heavy',\n borderHoverColor: 'hover:border-brand-dark',\n svgHoverBgColor: 'hover:[&>svg]:bg-brand-dark',\n }\n }\n }\n}\n","import { useMemo, type FC } from 'react'\nimport clsx from 'clsx'\n// text\nimport { P1, P2 } from '../../../text/paragraph'\n// constants\nimport {\n SIZE,\n type Size,\n STYLE,\n type Style,\n TYPE,\n type Type,\n} from '../../constants'\nimport { THEME, type Theme } from '../../../constants/theme'\n// theme\nimport { getFilledPillButtonTheme, getOutlinePillButtonTheme } from './theme'\n\ntype PillButtonProps = {\n text?: string\n leftIconComponent?: React.ReactElement\n rightIconComponent?: React.ReactElement\n size?: Size\n theme?: Theme\n type?: Type\n style?: Style\n disabled?: boolean\n loading?: boolean\n className?: string\n}\nconst PillButton: FC<PillButtonProps> & {\n Theme: typeof THEME\n Type: typeof TYPE\n Size: typeof SIZE\n Style: typeof STYLE\n} = ({\n text = '',\n leftIconComponent = null,\n rightIconComponent = null,\n size = SIZE.s,\n theme = THEME.normal,\n type = TYPE.primary,\n style = STYLE.brand,\n disabled = false,\n loading = false,\n className = '',\n}) => {\n const themeFunc =\n type === TYPE.primary ? getFilledPillButtonTheme : getOutlinePillButtonTheme\n const {\n color,\n bgColor,\n hoverColor,\n hoverBgColor,\n borderColor,\n svgBgColor,\n borderHoverColor,\n svgHoverBgColor,\n } = themeFunc(theme, disabled, style)\n\n const padding = size === SIZE.s ? 'py-[4px] px-[12px]' : 'py-[8px] px-[16px]'\n const iconSize =\n size === SIZE.s\n ? '[&>svg]:h-[18px] [&>svg]:w-[18px]'\n : '[&>svg]:h-[24px] [&>svg]:w-[24px]'\n\n const TextJSX = useMemo(\n () =>\n size === SIZE.s ? (\n <P2 text={text} weight={P2.Weight.bold} />\n ) : (\n <P1 text={text} weight={P1.Weight.bold} />\n ),\n [size, text]\n )\n\n return (\n <div\n className={clsx(\n 'w-fit flex items-center rounded-[40px] border-solid border-[1.5px]',\n borderColor,\n color,\n padding,\n disabled || loading ? 'cursor-not-allowed' : 'cursor-pointer',\n type === TYPE.primary ? bgColor : 'bg-transparent',\n iconSize,\n svgBgColor,\n hoverColor,\n type === TYPE.primary ? hoverBgColor : 'bg-transparent',\n borderHoverColor,\n svgHoverBgColor,\n className\n )}\n >\n <div className=\"relative flex justify-center items-center\">\n <div\n className={clsx('flex justify-center items-center', {\n 'opacity-0': loading,\n 'opacity-100': !loading,\n })}\n >\n {leftIconComponent ? (\n <div className=\"flex items-center mr-[4px]\">\n {leftIconComponent}\n </div>\n ) : null}\n {TextJSX}\n {rightIconComponent ? (\n <div className=\"flex items-center ml-[4px]\">\n {rightIconComponent}\n </div>\n ) : null}\n </div>\n <span\n className={clsx(\n 'inline-block absolute box-border animate-spin',\n 'border-2 border-solid border-gray-400 border-t-gray-600 rounded-[50%]',\n {\n 'size-[18px]': size === SIZE.s,\n 'size-[24px]': size === SIZE.l,\n },\n {\n 'opacity-0': !loading,\n 'opacity-100': loading,\n }\n )}\n />\n </div>\n </div>\n )\n}\nPillButton.Theme = THEME\nPillButton.Type = TYPE\nPillButton.Size = SIZE\nPillButton.Style = STYLE\n\nexport default PillButton\n","import { THEME, type Theme } from '../../../constants/theme'\n\nexport const getIconWithTextButtonTheme = (\n theme: Theme,\n isActive: boolean,\n isDisabled: boolean\n) => {\n if (isDisabled) {\n return {\n color: 'text-gray-400',\n hoverColor: 'hover:text-gray-400',\n svgBgColor: '[&>svg]:bg-gray-400',\n svgHoverBgColor: '[&>svg]:hover:bg-gray-400',\n }\n }\n\n const switchKey = isActive ? `${theme}-active` : theme\n switch (switchKey) {\n case THEME.photography:\n return {\n color: 'text-gray-200',\n hoverColor: 'hover:text-supportive-pastel',\n svgBgColor: '[&>svg]:bg-gray-200',\n svgHoverBgColor: '[&>svg]:hover:bg-supportive-pastel',\n }\n case `${THEME.photography}-active`:\n return {\n color: 'text-supportive-pastel',\n hoverColor: 'hover:text-supportive-pastel',\n svgBgColor: '[&>svg]:bg-supportive-pastel',\n svgHoverBgColor: '[&>svg]:hover:bg-supportive-pastel',\n }\n case THEME.transparent:\n return {\n color: 'text-gray-100',\n hoverColor: 'hover:text-gray-200',\n svgBgColor: '[&>svg]:bg-gray-100',\n svgHoverBgColor: '[&>svg]:hover:bg-gray-200',\n }\n case `${THEME.transparent}-active`:\n return {\n color: 'text-gray-white',\n hoverColor: 'hover:text-gray-white',\n svgBgColor: '[&>svg]:bg-gray-white',\n svgHoverBgColor: '[&>svg]:hover:bg-gray-white',\n }\n case `${THEME.normal}-active`:\n return {\n color: 'text-brand-heavy',\n hoverColor: 'hover:text-brand-heavy',\n svgBgColor: '[&>svg]:bg-brand-heavy',\n svgHoverBgColor: '[&>svg]:hover:bg-brand-heavy',\n }\n default:\n return {\n color: 'text-gray-600',\n hoverColor: 'hover:text-brand-heavy',\n svgBgColor: '[&>svg]:bg-gray-600',\n svgHoverBgColor: '[&>svg]:hover:bg-brand-heavy',\n }\n }\n}\n","import type { FC } from 'react'\nimport clsx from 'clsx'\n// constants\nimport { THEME, type Theme } from '../../../constants/theme'\n// theme\nimport { getIconWithTextButtonTheme } from './theme'\n// text\nimport { P4 } from '../../../text/paragraph'\n\ntype IconWithTextButtonProps = {\n text?: string\n iconComponent: React.ReactNode\n theme?: Theme\n disabled?: boolean\n active?: boolean\n hideText?: boolean\n className?: string\n onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void\n}\nconst IconWithTextButton: FC<IconWithTextButtonProps> & {\n Theme: typeof THEME\n} = ({\n text = '',\n iconComponent,\n theme = THEME.normal,\n disabled = false,\n active = false,\n hideText = false,\n className = '',\n onClick = () => {},\n}) => {\n const { color, hoverColor, svgBgColor, svgHoverBgColor } =\n getIconWithTextButtonTheme(theme, active, disabled)\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n if (disabled) {\n return\n }\n e.stopPropagation()\n onClick(e)\n }\n return (\n <button\n className={clsx(\n 'flex flex-col items-center',\n '[&>svg]:w-[24px] [&>svg]:h-[24px]',\n color,\n hoverColor,\n svgBgColor,\n svgHoverBgColor,\n disabled ? 'cursor-not-allowed' : 'cursor-pointer',\n className\n )}\n type=\"button\"\n onClick={handleClick}\n >\n {iconComponent}\n <P4\n text={text}\n weight={P4.Weight.normal}\n className={clsx(\n 'mt-[2px] transition-opacity duration-[100ms]',\n hideText ? 'opacity-0' : 'opacity-100',\n hideText ? 'max-h-0' : 'max-h-none'\n )}\n />\n </button>\n )\n}\nIconWithTextButton.Theme = THEME\nexport default IconWithTextButton\n","import TextButton from './components/text-button'\nimport IconButton from './components/icon-button'\nimport MenuButton from './components/menu-button'\nimport PillButton from './components/pill-button'\nimport IconWithTextButton from './components/icon-with-text-button'\n\nexport { TextButton, IconButton, MenuButton, PillButton, IconWithTextButton }\n\nexport default {\n TextButton,\n IconButton,\n MenuButton,\n PillButton,\n IconWithTextButton,\n}\n"],"mappings":";;;;;;;;;;;;;AASA,MAAaA,6BAAwC,UAAU;AAC7D,QAAO,CAEL,qCAEA,EACE,qCACE,UAAUC,oBAAM,eAAe,UAAUA,oBAAM,aAClD,CACF;;AAGH,MAAaC,2BAAsC,OAAO,UAAU;AAClE,QAAO;EAEL;GACE,qCAAqC,UAAUC,wBAAM;GACrD,2CAA2C,UAAUA,wBAAM;GAC3D,yCAAyC,UAAUA,wBAAM;GAC1D;EAED;GACE,qCACE,UAAUF,oBAAM,eAAe,UAAUE,wBAAM;GACjD,uDACE,UAAUF,oBAAM,eAAe,UAAUE,wBAAM;GAClD;EAED;GACE,yCACE,UAAUF,oBAAM,eAAe,UAAUE,wBAAM;GACjD,qCACE,UAAUF,oBAAM,eAAe,UAAUE,wBAAM;GAClD;EACF;;AAGH,MAAaC,qBAAgC,OAAO,UAAU;AAC5D,QAAO;EAEL;GACE,qCAAqC,UAAUD,wBAAM;GACrD,wCAAwC,UAAUA,wBAAM;GACxD,0CAA0C,UAAUA,wBAAM;GAC3D;EAED;GACE,qCACE,UAAUF,oBAAM,eAAe,UAAUE,wBAAM;GACjD,gDACE,UAAUF,oBAAM,eAAe,UAAUE,wBAAM;GACjD,sDACE,UAAUF,oBAAM,eAAe,UAAUE,wBAAM;GAClD;EAED;GACE,uCACE,UAAUF,oBAAM,eAAe,UAAUE,wBAAM;GACjD,uCACE,UAAUF,oBAAM,eAAe,UAAUE,wBAAM;GAClD;EACF;;;;;AC5CH,MAAME,cAID,EACH,MACA,mBACA,oBACA,OAAOC,uBAAK,GACZ,QAAQC,oBAAM,QACd,QAAQC,wBAAM,MACd,SAAS,OACT,WAAW,OACX,UAAU,OACV,YAAY,SACR;CACJ,MAAM,mCAEF,SAASF,uBAAK,IACZ,2CAACG;EAAS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,QAAO;GACL,OAAO;GACP,YAAY;GACZ,YAAY;GACZ,iBAAiB;GAClB;EACH,KAAK,GAAGA,oBAAM,OAAO,SACnB,QAAO;GACL,OAAO;GACP,YAAY;GACZ,YAAY;GACZ,iBAAiB;GAClB;EACH,QACE,QAAO;GACL,OAAO;GACP,YAAY;GACZ,YAAY;GACZ,iBAAiB;GAClB;;;;;;ACxCP,MAAMC,sBAED,EACH,OAAO,IACP,eACA,QAAQC,oBAAM,QACd,WAAW,OACX,SAAS,OACT,WAAW,OACX,YAAY,IACZ,gBAAgB,SACZ;CACJ,MAAM,EAAE,OAAO,YAAY,YAAY,oBACrC,2BAA2B,OAAO,QAAQ,SAAS;CACrD,MAAM,eAAe,MAA2C;AAC9D,MAAI,SACF;AAEF,IAAE,iBAAiB;AACnB,UAAQ,EAAE;;AAEZ,QACE,4CAAC;EACC,6BACE,8BACA,qCACA,OACA,YACA,YACA,iBACA,WAAW,uBAAuB,kBAClC,UACD;EACD,MAAK;EACL,SAAS;aAER,eACD,2CAACC;GACO;GACN,QAAQA,qBAAG,OAAO;GAClB,6BACE,gDACA,WAAW,cAAc,eACzB,WAAW,YAAY,aACxB;IACD;GACK;;AAGb,mBAAmB,QAAQD;AAC3B,oCAAe;;;;AC7Df,qBAAe;CACb;CACA;CACA;CACA;CACA;CACD"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../index-
|
|
2
|
-
import { RELEASE_BRANCH, ReleaseBranch } from "../release-branch-
|
|
1
|
+
import "../index-B0aBR23L.mjs";
|
|
2
|
+
import { RELEASE_BRANCH, ReleaseBranch } from "../release-branch-CFUcv043.mjs";
|
|
3
3
|
export { RELEASE_BRANCH, ReleaseBranch };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../index-
|
|
2
|
-
import { THEME, Theme } from "../theme-
|
|
1
|
+
import "../index-B0aBR23L.mjs";
|
|
2
|
+
import { THEME, Theme } from "../theme-BQP-h-2z.mjs";
|
|
3
3
|
export { THEME, Theme };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValuesOf } from "./index-
|
|
1
|
+
import { ValuesOf } from "./index-B0aBR23L.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/button/constants.d.ts
|
|
4
4
|
declare const SIZE: {
|
|
@@ -19,4 +19,4 @@ declare const TYPE: {
|
|
|
19
19
|
type Type = ValuesOf<typeof TYPE>;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { SIZE, STYLE, Size, Style, TYPE, Type };
|
|
22
|
-
//# sourceMappingURL=constants-
|
|
22
|
+
//# sourceMappingURL=constants-B-jtTtz5.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValuesOf } from "./index-
|
|
1
|
+
import { ValuesOf } from "./index-B0aBR23L.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/logo/constants.d.ts
|
|
4
4
|
declare const LOGO: {
|
|
@@ -21,4 +21,4 @@ declare const LOGO_SYMBOL_TYPE: {
|
|
|
21
21
|
type LogoSymbolType = ValuesOf<typeof LOGO_SYMBOL_TYPE>;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { LOGO, LOGO_SYMBOL_TYPE, LOGO_TYPE, Logo, LogoSymbolType, LogoType };
|
|
24
|
-
//# sourceMappingURL=constants-
|
|
24
|
+
//# sourceMappingURL=constants-BL-KiLbo.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants-
|
|
1
|
+
{"version":3,"file":"constants-B_1Vpdib.js","names":["TabBarItems: (releaseBranch: ReleaseBranch) => TabBarItem[]","INTERNAL_LINKS","Home","Clock","Topic","KidStar"],"sources":["../src/tab-bar/constants.ts"],"sourcesContent":["import type { ReactElement } from 'react'\nimport { INTERNAL_LINKS } from '../constants/internal-links'\nimport type { LinkTarget } from '../customized-link/type'\n// icons\nimport { Home, Clock, Topic, KidStar } from '../icons'\n// release branch\nimport type { ReleaseBranch } from '../constants/release-branch'\n\ntype TabBarItem = {\n text: string\n link: string\n target: LinkTarget\n icon: ReactElement\n}\nexport const TabBarItems: (releaseBranch: ReleaseBranch) => TabBarItem[] = (\n releaseBranch\n) => [\n {\n text: '首頁',\n link: INTERNAL_LINKS.home,\n target: '_self',\n icon: Home(releaseBranch),\n },\n {\n text: '最新',\n link: INTERNAL_LINKS.latest,\n target: '_self',\n icon: Clock(releaseBranch),\n },\n {\n text: '深度專題',\n link: INTERNAL_LINKS.topics,\n target: '_self',\n icon: Topic(releaseBranch),\n },\n {\n text: '我的閱讀',\n link: INTERNAL_LINKS.myReading.index,\n target: '_self',\n icon: KidStar(releaseBranch),\n },\n]\n"],"mappings":";;;;AAcA,MAAaA,eACX,kBACG;CACH;EACE,MAAM;EACN,MAAMC,sCAAe;EACrB,QAAQ;EACR,MAAMC,mBAAK,cAAc;EAC1B;CACD;EACE,MAAM;EACN,MAAMD,sCAAe;EACrB,QAAQ;EACR,MAAME,oBAAM,cAAc;EAC3B;CACD;EACE,MAAM;EACN,MAAMF,sCAAe;EACrB,QAAQ;EACR,MAAMG,oBAAM,cAAc;EAC3B;CACD;EACE,MAAM;EACN,MAAMH,sCAAe,UAAU;EAC/B,QAAQ;EACR,MAAMI,sBAAQ,cAAc;EAC7B;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants
|
|
1
|
+
{"version":3,"file":"constants-Br6I254P.mjs","names":["TabBarItems: (releaseBranch: ReleaseBranch) => TabBarItem[]"],"sources":["../src/tab-bar/constants.ts"],"sourcesContent":["import type { ReactElement } from 'react'\nimport { INTERNAL_LINKS } from '../constants/internal-links'\nimport type { LinkTarget } from '../customized-link/type'\n// icons\nimport { Home, Clock, Topic, KidStar } from '../icons'\n// release branch\nimport type { ReleaseBranch } from '../constants/release-branch'\n\ntype TabBarItem = {\n text: string\n link: string\n target: LinkTarget\n icon: ReactElement\n}\nexport const TabBarItems: (releaseBranch: ReleaseBranch) => TabBarItem[] = (\n releaseBranch\n) => [\n {\n text: '首頁',\n link: INTERNAL_LINKS.home,\n target: '_self',\n icon: Home(releaseBranch),\n },\n {\n text: '最新',\n link: INTERNAL_LINKS.latest,\n target: '_self',\n icon: Clock(releaseBranch),\n },\n {\n text: '深度專題',\n link: INTERNAL_LINKS.topics,\n target: '_self',\n icon: Topic(releaseBranch),\n },\n {\n text: '我的閱讀',\n link: INTERNAL_LINKS.myReading.index,\n target: '_self',\n icon: KidStar(releaseBranch),\n },\n]\n"],"mappings":";;;;AAcA,MAAaA,eACX,kBACG;CACH;EACE,MAAM;EACN,MAAM,eAAe;EACrB,QAAQ;EACR,MAAM,KAAK,cAAc;EAC1B;CACD;EACE,MAAM;EACN,MAAM,eAAe;EACrB,QAAQ;EACR,MAAM,MAAM,cAAc;EAC3B;CACD;EACE,MAAM;EACN,MAAM,eAAe;EACrB,QAAQ;EACR,MAAM,MAAM,cAAc;EAC3B;CACD;EACE,MAAM;EACN,MAAM,eAAe,UAAU;EAC/B,QAAQ;EACR,MAAM,QAAQ,cAAc;EAC7B;CACF"}
|
|
@@ -21,4 +21,4 @@ declare const LOGO_SYMBOL_TYPE: {
|
|
|
21
21
|
type LogoSymbolType = ValuesOf<typeof LOGO_SYMBOL_TYPE>;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { LOGO, LOGO_SYMBOL_TYPE, LOGO_TYPE, Logo, LogoSymbolType, LogoType };
|
|
24
|
-
//# sourceMappingURL=constants-
|
|
24
|
+
//# sourceMappingURL=constants-C86Q6QlO.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValuesOf } from "./index-
|
|
1
|
+
import { ValuesOf } from "./index-B0aBR23L.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/icons/constants.d.ts
|
|
4
4
|
declare const ICON_TYPE: {
|
|
@@ -27,4 +27,4 @@ declare const MEDIA_TYPE: {
|
|
|
27
27
|
type MediaType = ValuesOf<typeof MEDIA_TYPE>;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { ARROW_DIRECTION, ArrowDirection, ICON_TYPE, IconType, MEDIA_TYPE, MediaType };
|
|
30
|
-
//# sourceMappingURL=constants-
|
|
30
|
+
//# sourceMappingURL=constants-CIMBoUWq.d.mts.map
|
|
@@ -27,4 +27,4 @@ declare const MEDIA_TYPE: {
|
|
|
27
27
|
type MediaType = ValuesOf<typeof MEDIA_TYPE>;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { ARROW_DIRECTION, ArrowDirection, ICON_TYPE, IconType, MEDIA_TYPE, MediaType };
|
|
30
|
-
//# sourceMappingURL=constants-
|
|
30
|
+
//# sourceMappingURL=constants-COhDITk3.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValuesOf } from "./index-
|
|
1
|
+
import { ValuesOf } from "./index-B0aBR23L.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/divider/constants.d.ts
|
|
4
4
|
declare const DIRECTION: {
|
|
@@ -8,4 +8,4 @@ declare const DIRECTION: {
|
|
|
8
8
|
type Direction = ValuesOf<typeof DIRECTION>;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { DIRECTION, Direction };
|
|
11
|
-
//# sourceMappingURL=constants-
|
|
11
|
+
//# sourceMappingURL=constants-CwFazfN4.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValuesOf } from "./index-
|
|
1
|
+
import { ValuesOf } from "./index-B0aBR23L.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/text/constants.d.ts
|
|
4
4
|
declare const TYPE: {
|
|
@@ -14,4 +14,4 @@ declare const WEIGHT: {
|
|
|
14
14
|
type Weight = ValuesOf<typeof WEIGHT>;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { TYPE, Type, WEIGHT, Weight };
|
|
17
|
-
//# sourceMappingURL=constants-
|
|
17
|
+
//# sourceMappingURL=constants-DJDyKM0N.d.mts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../type-
|
|
2
|
-
import { ExternalLink } from "../external-link-
|
|
1
|
+
import "../type-Dons5TOa.mjs";
|
|
2
|
+
import { ExternalLink } from "../external-link-C3_4RBmQ.mjs";
|
|
3
3
|
export { ExternalLink as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CustomizedLinkProps } from "../type-
|
|
2
|
-
import { ExternalLink } from "../external-link-
|
|
3
|
-
import { InternalLink } from "../internal-link-
|
|
1
|
+
import { CustomizedLinkProps } from "../type-Dons5TOa.mjs";
|
|
2
|
+
import { ExternalLink } from "../external-link-C3_4RBmQ.mjs";
|
|
3
|
+
import { InternalLink } from "../internal-link-HG_KM8L7.mjs";
|
|
4
4
|
import * as react0 from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/customized-link/index.d.ts
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../type-
|
|
2
|
-
import { InternalLink } from "../internal-link-
|
|
1
|
+
import "../type-Dons5TOa.mjs";
|
|
2
|
+
import { InternalLink } from "../internal-link-HG_KM8L7.mjs";
|
|
3
3
|
export { InternalLink as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CustomizedLinkProps, LinkTarget } from "../type-
|
|
1
|
+
import { CustomizedLinkProps, LinkTarget } from "../type-Dons5TOa.mjs";
|
|
2
2
|
export { CustomizedLinkProps, LinkTarget };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../index-
|
|
2
|
-
import { DIRECTION, Direction } from "../constants-
|
|
1
|
+
import "../index-B0aBR23L.mjs";
|
|
2
|
+
import { DIRECTION, Direction } from "../constants-CwFazfN4.mjs";
|
|
3
3
|
export { DIRECTION, Direction };
|
package/lib/divider/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CustomizedLinkProps } from "./type-
|
|
1
|
+
import { CustomizedLinkProps } from "./type-Dons5TOa.mjs";
|
|
2
2
|
import { FC } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/customized-link/external-link.d.ts
|
|
@@ -6,4 +6,4 @@ type ExternalLinkProps = CustomizedLinkProps;
|
|
|
6
6
|
declare const ExternalLink: FC<ExternalLinkProps>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { ExternalLink };
|
|
9
|
-
//# sourceMappingURL=external-link-
|
|
9
|
+
//# sourceMappingURL=external-link-C3_4RBmQ.d.mts.map
|
|
@@ -2,7 +2,7 @@ require('../constants-BmxSMOOn.js');
|
|
|
2
2
|
require('../constants-Cndhv6qr.js');
|
|
3
3
|
require('../paragraph-iuz3jP0Q.js');
|
|
4
4
|
require('../theme-DDBlIbeS.js');
|
|
5
|
-
require('../button-
|
|
5
|
+
require('../button-Dk0MxlKd.js');
|
|
6
6
|
require('../external-links-DCn-uTD-.js');
|
|
7
7
|
require('../internal-links-DxtMobuI.js');
|
|
8
8
|
require('../release-branch-CRZV4Ivz.js');
|
|
@@ -16,7 +16,9 @@ require('../constants-D8wNUvoZ.js');
|
|
|
16
16
|
require('../icons-qP5oNB0W.js');
|
|
17
17
|
require('../constants-C2moxnps.js');
|
|
18
18
|
require('../dropdown-menu-BAqmP8qa.js');
|
|
19
|
-
const require_hamburger_menu = require('../hamburger-menu-
|
|
20
|
-
require('../logo-
|
|
19
|
+
const require_hamburger_menu = require('../hamburger-menu-DGS62txC.js');
|
|
20
|
+
require('../logo-BTNfdxTv.js');
|
|
21
|
+
require('../theme-Cv8rt4oO.js');
|
|
22
|
+
require('../input-VmgNb9pm.js');
|
|
21
23
|
|
|
22
24
|
module.exports = require_hamburger_menu.hamburger_menu_default;
|
|
@@ -3,7 +3,7 @@ import "../constants-oTHAnh6r.mjs";
|
|
|
3
3
|
import "../constants-CBSEPx91.mjs";
|
|
4
4
|
import "../paragraph-Cf9jr8RF.mjs";
|
|
5
5
|
import "../theme-BG6yZVj-.mjs";
|
|
6
|
-
import "../button-
|
|
6
|
+
import "../button-D_AWI7r9.mjs";
|
|
7
7
|
import "../external-links-B-A17Osq.mjs";
|
|
8
8
|
import "../internal-links-CP3dqmrz.mjs";
|
|
9
9
|
import "../release-branch-DNCD1uH_.mjs";
|
|
@@ -16,7 +16,9 @@ import "../constants-5phfWHvb.mjs";
|
|
|
16
16
|
import "../icons-I7T-auOQ.mjs";
|
|
17
17
|
import "../constants-DRxdMM_X.mjs";
|
|
18
18
|
import "../dropdown-menu-D7VNOiIl.mjs";
|
|
19
|
-
import { hamburger_menu_default } from "../hamburger-menu-
|
|
20
|
-
import "../logo-
|
|
19
|
+
import { hamburger_menu_default } from "../hamburger-menu-iIWjGEVX.mjs";
|
|
20
|
+
import "../logo-D68VZ-fc.mjs";
|
|
21
|
+
import "../theme-Bgd_TUHZ.mjs";
|
|
22
|
+
import "../input-BU_QJnbj.mjs";
|
|
21
23
|
|
|
22
24
|
export { hamburger_menu_default as default };
|