@twreporter/react-typescript-components 0.1.0-beta.11 → 0.1.0-beta.13
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.d.ts +1 -1
- package/lib/button/index.js +3 -3
- package/lib/button/index.mjs +3 -3
- package/lib/{button-CS2fz7hm.js → button-D50NHdly.js} +3 -3
- package/lib/{button-CS2fz7hm.js.map → button-D50NHdly.js.map} +1 -1
- package/lib/{button-KtEMUa_S.mjs → button-hDNHA85d.mjs} +3 -3
- package/lib/{button-KtEMUa_S.mjs.map → button-hDNHA85d.mjs.map} +1 -1
- package/lib/constants/internal-links.d.mts +2 -1
- package/lib/constants/internal-links.d.ts +2 -1
- package/lib/constants/internal-links.js +1 -1
- package/lib/constants/internal-links.mjs +1 -1
- package/lib/constants/release-branch.d.mts +2 -2
- package/lib/constants/request-origins.js +4 -46
- package/lib/constants/request-origins.mjs +3 -45
- package/lib/constants/theme.d.mts +2 -2
- package/lib/{constants-BKH77l8c.mjs → constants--CDeoDub.mjs} +3 -3
- package/lib/{constants-BKH77l8c.mjs.map → constants--CDeoDub.mjs.map} +1 -1
- package/lib/{constants-jYAxSTFp.d.mts → constants-B6oiTL1L.d.mts} +2 -2
- package/lib/{constants-BQFusmWI.js → constants-BNxn_qJc.js} +3 -3
- package/lib/{constants-BQFusmWI.js.map → constants-BNxn_qJc.js.map} +1 -1
- package/lib/{constants-DNr36wyK.d.mts → constants-BqAhJjFv.d.mts} +2 -2
- package/lib/{constants-2TRY2zTK.js → constants-C2moxnps.js} +1 -1
- package/lib/{constants-2TRY2zTK.js.map → constants-C2moxnps.js.map} +1 -1
- package/lib/{constants-BWFuBApI.mjs → constants-CBSEPx91.mjs} +4 -4
- package/lib/constants-CBSEPx91.mjs.map +1 -0
- package/lib/{constants-C9Ev_zet.d.mts → constants-CVmr4VOP.d.mts} +2 -2
- package/lib/{constants-BS3rPbaX.d.ts → constants-CZ7dxJ-t.d.ts} +4 -4
- package/lib/{constants-CEyUZ-jZ.d.mts → constants-Cb4Udkwt.d.mts} +2 -2
- package/lib/{constants-K2ObjToq.js → constants-Cndhv6qr.js} +4 -4
- package/lib/constants-Cndhv6qr.js.map +1 -0
- package/lib/{constants-OhAETTiQ.d.mts → constants-D-mBwgNQ.d.mts} +5 -5
- package/lib/{constants-BqeEbkVD.mjs → constants-DRxdMM_X.mjs} +1 -1
- package/lib/{constants-BqeEbkVD.mjs.map → constants-DRxdMM_X.mjs.map} +1 -1
- package/lib/{constants-BrHOBTf_.js → constants-nmH6p6-y.js} +1 -1
- package/lib/{constants-BrHOBTf_.js.map → constants-nmH6p6-y.js.map} +1 -1
- package/lib/{constants-DU0aujQA.mjs → constants-z9Q8ph_H.mjs} +1 -1
- package/lib/{constants-DU0aujQA.mjs.map → constants-z9Q8ph_H.mjs.map} +1 -1
- package/lib/{context-BCesW3fW.mjs → context-BgdqM3zA.mjs} +1 -1
- package/lib/{context-BCesW3fW.mjs.map → context-BgdqM3zA.mjs.map} +1 -1
- package/lib/{context-Bvr0Qj2x.js → context-I1lTR5SO.js} +1 -1
- package/lib/{context-Bvr0Qj2x.js.map → context-I1lTR5SO.js.map} +1 -1
- package/lib/customized-link/external-link.d.mts +2 -2
- package/lib/customized-link/external-link.js +1 -1
- package/lib/customized-link/external-link.mjs +1 -1
- package/lib/customized-link/index.d.mts +6 -6
- package/lib/customized-link/index.js +3 -3
- package/lib/customized-link/index.mjs +2 -2
- package/lib/customized-link/internal-link.d.mts +2 -2
- package/lib/customized-link/internal-link.js +1 -1
- package/lib/customized-link/type.d.mts +1 -1
- package/lib/{customized-link-DCZIE_KY.mjs → customized-link-DnaZxeKK.mjs} +2 -2
- package/lib/{customized-link-DCZIE_KY.mjs.map → customized-link-DnaZxeKK.mjs.map} +1 -1
- package/lib/{customized-link-DOfcUL2U.js → customized-link-DqW2a8oZ.js} +3 -3
- package/lib/{customized-link-DOfcUL2U.js.map → customized-link-DqW2a8oZ.js.map} +1 -1
- package/lib/divider/constants.d.mts +2 -2
- package/lib/divider/constants.js +1 -1
- package/lib/divider/constants.mjs +1 -1
- package/lib/divider/index.d.mts +2 -2
- package/lib/divider/index.js +2 -2
- package/lib/divider/index.mjs +2 -2
- package/lib/{divider-DSzZ0anP.js → divider-B1zvSjNJ.js} +2 -2
- package/lib/{divider-DSzZ0anP.js.map → divider-B1zvSjNJ.js.map} +1 -1
- package/lib/{divider-jhFqc8bB.mjs → divider-CE4u6SR5.mjs} +2 -2
- package/lib/{divider-jhFqc8bB.mjs.map → divider-CE4u6SR5.mjs.map} +1 -1
- package/lib/dropdown-menu/index.d.mts +1 -1
- package/lib/dropdown-menu/index.js +9 -9
- package/lib/dropdown-menu/index.mjs +8 -8
- package/lib/{dropdown-menu-au-QmCCH.js → dropdown-menu-BAqmP8qa.js} +7 -7
- package/lib/{dropdown-menu-au-QmCCH.js.map → dropdown-menu-BAqmP8qa.js.map} +1 -1
- package/lib/{dropdown-menu-625wN2WW.mjs → dropdown-menu-D7VNOiIl.mjs} +6 -6
- package/lib/{dropdown-menu-625wN2WW.mjs.map → dropdown-menu-D7VNOiIl.mjs.map} +1 -1
- package/lib/{external-link-yFrWzA-w.mjs → external-link-DXT5ep5-.mjs} +1 -1
- package/lib/{external-link-yFrWzA-w.mjs.map → external-link-DXT5ep5-.mjs.map} +1 -1
- package/lib/{external-link-DHRAO68s.js → external-link-DoBTwlV3.js} +1 -1
- package/lib/{external-link-DHRAO68s.js.map → external-link-DoBTwlV3.js.map} +1 -1
- package/lib/{external-link-BUhvS4ry.d.mts → external-link-goP_Ay-S.d.mts} +2 -2
- package/lib/hamburger-menu/index.js +15 -15
- package/lib/hamburger-menu/index.mjs +14 -14
- package/lib/{hamburger-menu-Dv05s_oG.mjs → hamburger-menu-DMC9H93O.mjs} +19 -17
- package/lib/hamburger-menu-DMC9H93O.mjs.map +1 -0
- package/lib/{hamburger-menu-DlwLJHff.js → hamburger-menu-qaPZ5Dmx.js} +20 -18
- package/lib/hamburger-menu-qaPZ5Dmx.js.map +1 -0
- package/lib/header/index.d.mts +3 -3
- package/lib/header/index.js +107 -32
- package/lib/header/index.js.map +1 -1
- package/lib/header/index.mjs +102 -31
- package/lib/header/index.mjs.map +1 -1
- package/lib/{heading-CFSkTbdH.mjs → heading-BSEtBLuY.mjs} +2 -2
- package/lib/{heading-CFSkTbdH.mjs.map → heading-BSEtBLuY.mjs.map} +1 -1
- package/lib/{heading-DFzj2z0V.js → heading-CNS7rJIc.js} +2 -2
- package/lib/{heading-DFzj2z0V.js.map → heading-CNS7rJIc.js.map} +1 -1
- package/lib/icons/constants.d.mts +2 -2
- package/lib/icons/index.d.mts +3 -3
- package/lib/icons/index.js +1 -1
- package/lib/icons/index.mjs +1 -1
- package/lib/{icons-DHXvfKDV.mjs → icons-I7T-auOQ.mjs} +1 -1
- package/lib/{icons-DHXvfKDV.mjs.map → icons-I7T-auOQ.mjs.map} +1 -1
- package/lib/{icons-D5HPq5oi.js → icons-qP5oNB0W.js} +1 -1
- package/lib/{icons-D5HPq5oi.js.map → icons-qP5oNB0W.js.map} +1 -1
- package/lib/{index-BmIgLA0K.d.mts → index-CYb6xr3M.d.mts} +1 -1
- package/lib/{internal-link-BKfQQJ5V.js → internal-link-B9ExuJfg.js} +1 -1
- package/lib/{internal-link-BKfQQJ5V.js.map → internal-link-B9ExuJfg.js.map} +1 -1
- package/lib/{internal-link-D8jJal8P.d.mts → internal-link-Ciu7CWSY.d.mts} +2 -2
- package/lib/{internal-links-BF-974mA.mjs → internal-links-CP3dqmrz.mjs} +3 -2
- package/lib/internal-links-CP3dqmrz.mjs.map +1 -0
- package/lib/{internal-links-CBkMU8cY.js → internal-links-DxtMobuI.js} +3 -2
- package/lib/internal-links-DxtMobuI.js.map +1 -0
- package/lib/logo/constants.d.mts +2 -2
- package/lib/logo/constants.js +1 -1
- package/lib/logo/constants.mjs +1 -1
- package/lib/logo/index.d.mts +3 -3
- package/lib/logo/index.d.ts +5 -5
- package/lib/logo/index.js +2 -2
- package/lib/logo/index.mjs +2 -2
- package/lib/{logo-Dz8Mm84n.js → logo-BTNfdxTv.js} +2 -2
- package/lib/{logo-Dz8Mm84n.js.map → logo-BTNfdxTv.js.map} +1 -1
- package/lib/{logo-Caqpr_8x.mjs → logo-D68VZ-fc.mjs} +2 -2
- package/lib/{logo-Caqpr_8x.mjs.map → logo-D68VZ-fc.mjs.map} +1 -1
- package/lib/{paragraph-BWXQNQtX.mjs → paragraph-Cf9jr8RF.mjs} +3 -3
- package/lib/paragraph-Cf9jr8RF.mjs.map +1 -0
- package/lib/{paragraph-CJvb0_cM.js → paragraph-iuz3jP0Q.js} +3 -3
- package/lib/paragraph-iuz3jP0Q.js.map +1 -0
- package/lib/{release-branch-DZwlCiWD.d.mts → release-branch-BqeBsvrl.d.mts} +2 -2
- package/lib/request-origins-BDXulkK9.js +57 -0
- package/lib/request-origins-BDXulkK9.js.map +1 -0
- package/lib/request-origins-CGkNWg8R.mjs +46 -0
- package/lib/request-origins-CGkNWg8R.mjs.map +1 -0
- package/lib/styles.css +48 -0
- package/lib/tab-bar/constants.d.mts +3 -3
- package/lib/tab-bar/constants.js +3 -3
- package/lib/tab-bar/constants.mjs +3 -3
- package/lib/tab-bar/index.js +12 -12
- package/lib/tab-bar/index.mjs +11 -11
- 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-D72ayg1v.js → tab-bar-Dv2TkUW1.js} +8 -8
- package/lib/{tab-bar-D72ayg1v.js.map → tab-bar-Dv2TkUW1.js.map} +1 -1
- package/lib/{tab-bar-o4KVPRne.mjs → tab-bar-SYrjAH5q.mjs} +7 -7
- package/lib/{tab-bar-o4KVPRne.mjs.map → tab-bar-SYrjAH5q.mjs.map} +1 -1
- package/lib/text/constants.d.mts +2 -2
- package/lib/text/constants.d.ts +1 -1
- package/lib/text/constants.js +1 -1
- package/lib/text/constants.mjs +1 -1
- package/lib/text/heading.d.mts +2 -2
- package/lib/text/heading.d.ts +1 -1
- package/lib/text/heading.js +2 -2
- package/lib/text/heading.mjs +2 -2
- package/lib/text/paragraph.d.mts +2 -2
- package/lib/text/paragraph.d.ts +1 -1
- package/lib/text/paragraph.js +2 -2
- package/lib/text/paragraph.mjs +2 -2
- package/lib/{theme-BErS2Qs6.mjs → theme-DQCIQh_8.mjs} +1 -1
- package/lib/{theme-BErS2Qs6.mjs.map → theme-DQCIQh_8.mjs.map} +1 -1
- package/lib/{theme-BPB1kPtQ.js → theme-W--MzZEH.js} +1 -1
- package/lib/{theme-BPB1kPtQ.js.map → theme-W--MzZEH.js.map} +1 -1
- package/lib/{theme-ClamfAy8.d.mts → theme-lCi6tmmS.d.mts} +2 -2
- package/lib/title-bar/index.d.ts +4 -4
- package/lib/title-bar/index.js +7 -7
- package/lib/title-bar/index.mjs +6 -6
- package/lib/{type-FR-fOZvz.d.mts → type-2Go0njwa.d.mts} +1 -1
- package/lib/types/index.d.mts +1 -1
- package/package.json +5 -3
- package/lib/constants/request-origins.js.map +0 -1
- package/lib/constants/request-origins.mjs.map +0 -1
- package/lib/constants-BWFuBApI.mjs.map +0 -1
- package/lib/constants-K2ObjToq.js.map +0 -1
- package/lib/hamburger-menu-DlwLJHff.js.map +0 -1
- package/lib/hamburger-menu-Dv05s_oG.mjs.map +0 -1
- package/lib/internal-links-BF-974mA.mjs.map +0 -1
- package/lib/internal-links-CBkMU8cY.js.map +0 -1
- package/lib/paragraph-BWXQNQtX.mjs.map +0 -1
- package/lib/paragraph-CJvb0_cM.js.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../index-
|
|
2
|
-
import { SIZE, STYLE, Size, Style, TYPE, Type } from "../constants-
|
|
1
|
+
import "../index-CYb6xr3M.mjs";
|
|
2
|
+
import { SIZE, STYLE, Size, Style, TYPE, Type } from "../constants-B6oiTL1L.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-CYb6xr3M.mjs";
|
|
2
|
+
import { SIZE, STYLE, Size, Style, TYPE, Type } from "../constants-B6oiTL1L.mjs";
|
|
3
|
+
import { THEME, Theme } from "../theme-lCi6tmmS.mjs";
|
|
4
|
+
import { WEIGHT, Weight } from "../constants-D-mBwgNQ.mjs";
|
|
5
|
+
import * as react1 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: react1.FC<{
|
|
92
92
|
text: string;
|
|
93
|
-
leftIconComponent?:
|
|
94
|
-
rightIconComponent?:
|
|
93
|
+
leftIconComponent?: react1.ReactElement;
|
|
94
|
+
rightIconComponent?: react1.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: react1.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: react1.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: react1.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: react1.FC<{
|
|
146
146
|
text?: string;
|
|
147
147
|
iconComponent: React.ReactNode;
|
|
148
148
|
theme?: Theme;
|
package/lib/button/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../index-H3peA2d_.js";
|
|
2
2
|
import { SIZE, STYLE, Size, Style, TYPE, Type } from "../constants-gCmka4Fp.js";
|
|
3
3
|
import { THEME, Theme } from "../theme-BDGfJ8n-.js";
|
|
4
|
-
import { WEIGHT, Weight } from "../constants-
|
|
4
|
+
import { WEIGHT, Weight } from "../constants-CZ7dxJ-t.js";
|
|
5
5
|
import * as react0 from "react";
|
|
6
6
|
import React$1, { FC, ReactElement } from "react";
|
|
7
7
|
|
package/lib/button/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
require('../constants-BmxSMOOn.js');
|
|
3
|
-
require('../constants-
|
|
4
|
-
require('../paragraph-
|
|
3
|
+
require('../constants-Cndhv6qr.js');
|
|
4
|
+
require('../paragraph-iuz3jP0Q.js');
|
|
5
5
|
require('../theme-DDBlIbeS.js');
|
|
6
|
-
const require_button = require('../button-
|
|
6
|
+
const require_button = require('../button-D50NHdly.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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../constants-oTHAnh6r.mjs";
|
|
2
|
-
import "../constants-
|
|
3
|
-
import "../paragraph-
|
|
2
|
+
import "../constants-CBSEPx91.mjs";
|
|
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-hDNHA85d.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 };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-BxBTb9qk.js');
|
|
2
2
|
const require_constants = require('./constants-BmxSMOOn.js');
|
|
3
|
-
const require_constants$1 = require('./constants-
|
|
4
|
-
const require_paragraph = require('./paragraph-
|
|
3
|
+
const require_constants$1 = require('./constants-Cndhv6qr.js');
|
|
4
|
+
const require_paragraph = require('./paragraph-iuz3jP0Q.js');
|
|
5
5
|
const require_theme = require('./theme-DDBlIbeS.js');
|
|
6
6
|
let react = require("react");
|
|
7
7
|
react = require_chunk.__toESM(react);
|
|
@@ -627,4 +627,4 @@ Object.defineProperty(exports, 'text_button_default', {
|
|
|
627
627
|
return text_button_default;
|
|
628
628
|
}
|
|
629
629
|
});
|
|
630
|
-
//# sourceMappingURL=button-
|
|
630
|
+
//# sourceMappingURL=button-D50NHdly.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-CS2fz7hm.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 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={disabled ? () => {} : onClick}\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 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,oBA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Z,iBAAiB;GAClB;EACH,KAAK,GAAGA,oBAAM,YAAY,SACxB,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,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;;;;AC5Df,qBAAe;CACb;CACA;CACA;CACA;CACA;CACD"}
|
|
1
|
+
{"version":3,"file":"button-D50NHdly.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 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={disabled ? () => {} : onClick}\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 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,eA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S,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,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;;;;AC5Df,qBAAe;CACb;CACA;CACA;CACA;CACA;CACD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SIZE, STYLE, TYPE } from "./constants-oTHAnh6r.mjs";
|
|
2
|
-
import { WEIGHT } from "./constants-
|
|
3
|
-
import { P1, P2, P4 } from "./paragraph-
|
|
2
|
+
import { WEIGHT } from "./constants-CBSEPx91.mjs";
|
|
3
|
+
import { P1, P2, P4 } from "./paragraph-Cf9jr8RF.mjs";
|
|
4
4
|
import { THEME } from "./theme-BG6yZVj-.mjs";
|
|
5
5
|
import { useMemo } from "react";
|
|
6
6
|
import clsx from "clsx";
|
|
@@ -588,4 +588,4 @@ var button_default = {
|
|
|
588
588
|
|
|
589
589
|
//#endregion
|
|
590
590
|
export { button_default, icon_button_default, icon_with_text_button_default, menu_button_default, pill_button_default, text_button_default };
|
|
591
|
-
//# sourceMappingURL=button-
|
|
591
|
+
//# sourceMappingURL=button-hDNHA85d.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-KtEMUa_S.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 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={disabled ? () => {} : onClick}\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 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"],"mapp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CACJ,MAAM,EAAE,OAAO,YAAY,YAAY,oBACrC,2BAA2B,OAAO,QAAQ,SAAS;CACrD,MAAM,eAAe,MAA2C;AAC9D,MAAI,SACF;AAEF,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;;;;AC5Df,qBAAe;CACb;CACA;CACA;CACA;CACA;CACD"}
|
|
1
|
+
{"version":3,"file":"button-hDNHA85d.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 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={disabled ? () => {} : onClick}\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 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,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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,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,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;;;;AC5Df,qBAAe;CACb;CACA;CACA;CACA;CACA;CACD"}
|
|
@@ -5,9 +5,10 @@ declare const INTERNAL_LINKS: {
|
|
|
5
5
|
readonly topics: "/topics";
|
|
6
6
|
readonly search: "/search";
|
|
7
7
|
readonly about: "/about-us";
|
|
8
|
+
readonly article: "/a";
|
|
8
9
|
readonly account: {
|
|
9
10
|
readonly index: "/account";
|
|
10
|
-
readonly
|
|
11
|
+
readonly donationHistoryPage: "/account/donation-history";
|
|
11
12
|
readonly emailSubscription: "/account/email-subscription";
|
|
12
13
|
readonly exclusiveOffers: "/account/exclusive-offers";
|
|
13
14
|
};
|
|
@@ -5,9 +5,10 @@ declare const INTERNAL_LINKS: {
|
|
|
5
5
|
readonly topics: "/topics";
|
|
6
6
|
readonly search: "/search";
|
|
7
7
|
readonly about: "/about-us";
|
|
8
|
+
readonly article: "/a";
|
|
8
9
|
readonly account: {
|
|
9
10
|
readonly index: "/account";
|
|
10
|
-
readonly
|
|
11
|
+
readonly donationHistoryPage: "/account/donation-history";
|
|
11
12
|
readonly emailSubscription: "/account/email-subscription";
|
|
12
13
|
readonly exclusiveOffers: "/account/exclusive-offers";
|
|
13
14
|
};
|