@channel.io/bezier-react 1.9.0 → 1.10.1
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/LICENSE +198 -10
- package/dist/cjs/components/Button/Button.styled.js +1 -1
- package/dist/cjs/components/Button/Button.styled.js.map +1 -1
- package/dist/cjs/components/ProgressBar/ProgressBar.js +1 -0
- package/dist/cjs/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/cjs/components/ProgressBar/ProgressBar.styled.js +24 -4
- package/dist/cjs/components/ProgressBar/ProgressBar.styled.js.map +1 -1
- package/dist/cjs/components/ProgressBar/ProgressBar.types.js +1 -0
- package/dist/cjs/components/ProgressBar/ProgressBar.types.js.map +1 -1
- package/dist/cjs/foundation/Colors/Theme/presets/DarkTheme.js +1 -0
- package/dist/cjs/foundation/Colors/Theme/presets/DarkTheme.js.map +1 -1
- package/dist/cjs/foundation/ThemeVars.js +1 -1
- package/dist/cjs/foundation/ThemeVars.js.map +1 -1
- package/dist/esm/components/Button/Button.styled.mjs +1 -1
- package/dist/esm/components/Button/Button.styled.mjs.map +1 -1
- package/dist/esm/components/ProgressBar/ProgressBar.mjs +1 -0
- package/dist/esm/components/ProgressBar/ProgressBar.mjs.map +1 -1
- package/dist/esm/components/ProgressBar/ProgressBar.styled.mjs +24 -4
- package/dist/esm/components/ProgressBar/ProgressBar.styled.mjs.map +1 -1
- package/dist/esm/components/ProgressBar/ProgressBar.types.mjs +1 -0
- package/dist/esm/components/ProgressBar/ProgressBar.types.mjs.map +1 -1
- package/dist/esm/foundation/Colors/Theme/presets/DarkTheme.mjs +1 -0
- package/dist/esm/foundation/Colors/Theme/presets/DarkTheme.mjs.map +1 -1
- package/dist/esm/foundation/ThemeVars.mjs +1 -1
- package/dist/esm/foundation/ThemeVars.mjs.map +1 -1
- package/dist/types/components/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/types/components/ProgressBar/ProgressBar.styled.d.ts +1 -0
- package/dist/types/components/ProgressBar/ProgressBar.styled.d.ts.map +1 -1
- package/dist/types/components/ProgressBar/ProgressBar.types.d.ts +1 -0
- package/dist/types/components/ProgressBar/ProgressBar.types.d.ts.map +1 -1
- package/dist/types/foundation/Colors/Theme/presets/DarkTheme.d.ts.map +1 -1
- package/dist/types/foundation/ThemeVars.d.ts +1 -1
- package/dist/types/foundation/ThemeVars.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/Button/Button.styled.ts +1 -1
- package/src/components/ProgressBar/ProgressBar.mdx +2 -2
- package/src/components/ProgressBar/ProgressBar.stories.tsx +16 -0
- package/src/components/ProgressBar/ProgressBar.styled.ts +26 -4
- package/src/components/ProgressBar/ProgressBar.test.tsx +20 -2
- package/src/components/ProgressBar/ProgressBar.tsx +1 -0
- package/src/components/ProgressBar/ProgressBar.types.ts +1 -0
- package/src/foundation/Colors/Theme/presets/DarkTheme.ts +1 -0
- package/src/foundation/ThemeVars.ts +2 -2
package/LICENSE
CHANGED
|
@@ -1,13 +1,201 @@
|
|
|
1
|
-
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
you may not use this file except in compliance with the License.
|
|
5
|
-
You may obtain a copy of the License at
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
1. Definitions.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2023 Channel Corp.
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -172,7 +172,7 @@ const MONOCHROME_LIGHT_SEMANTIC_NAMES = {
|
|
|
172
172
|
};
|
|
173
173
|
const MONOCHROME_DARK_SEMANTIC_NAMES = {
|
|
174
174
|
[Button_types.ButtonStyleVariant.Primary]: {
|
|
175
|
-
color: '
|
|
175
|
+
color: 'txt-white-normal',
|
|
176
176
|
backgroundColor: 'bg-grey-darkest'
|
|
177
177
|
},
|
|
178
178
|
[Button_types.ButtonStyleVariant.Secondary]: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.styled.js","sources":["../../../../src/components/Button/Button.styled.ts"],"sourcesContent":["import {\n type SemanticNames,\n css,\n styled,\n} from '~/src/foundation'\n\nimport DisabledOpacity from '~/src/constants/DisabledOpacity'\nimport { gap } from '~/src/utils/styleUtils'\nimport { isEmpty } from '~/src/utils/typeUtils'\n\nimport { Text } from '~/src/components/Text'\n\nimport type ButtonProps from './Button.types'\nimport {\n ButtonColorVariant,\n ButtonSize,\n ButtonStyleVariant,\n} from './Button.types'\n\n// NOTE: ButtonSize 에 따른 버튼의 min-width, height\nconst BUTTON_SIZE_VALUE = {\n [ButtonSize.XS]: 20,\n [ButtonSize.S]: 24,\n [ButtonSize.M]: 36,\n [ButtonSize.L]: 44,\n [ButtonSize.XL]: 54,\n}\n\ninterface GetSizeCSSFromButtonSizeArgs {\n size: ButtonSize\n}\n\nfunction getSizeCSSFromButtonSize({\n size,\n}: GetSizeCSSFromButtonSizeArgs) {\n return css`\n min-width: ${BUTTON_SIZE_VALUE[size]}px;\n height: ${BUTTON_SIZE_VALUE[size]}px;\n `\n}\n\n// NOTE: ButtonSize에 따른 버튼 내 텍스트의 margin\nexport const TEXT_PADDING_VALUE: Record<ButtonSize, number> = {\n [ButtonSize.XS]: 3,\n [ButtonSize.S]: 3,\n [ButtonSize.M]: 4,\n [ButtonSize.L]: 4,\n [ButtonSize.XL]: 4,\n}\n\nconst BUTTON_CONTENT_GAP_VALUE: Record<ButtonSize, number> = {\n [ButtonSize.XS]: 0,\n [ButtonSize.S]: 0,\n [ButtonSize.M]: 2,\n [ButtonSize.L]: 2,\n [ButtonSize.XL]: 2,\n}\n\n// NOTE: 버튼의 padding 값을 결정하는 경우 4가지 중 위의 3가지 key\n// 1. 기본\n// 2. styleVariant 가 Floating 인 경우 - floating\n// 3. 버튼에 텍스트 없이 컨텐트만 있을 경우 => buttonSize 에 관계없이 padding 이 0 이라 이 경우만 따로 분기 처리\ntype ButtonPaddingVariantKey = 'default' | 'floating'\n\n// NOTE: floating 은 padding 이 버튼의 size value 의 절반에서 Text padding 값 만큼 빼줘야 스펙과 일치\nexport const BUTTON_HORIZONTAL_PADDING_VALUE: Record<ButtonSize, Record<ButtonPaddingVariantKey, number>> = {\n [ButtonSize.XS]: {\n default: 2,\n floating: (BUTTON_SIZE_VALUE[ButtonSize.XS] / 2) - TEXT_PADDING_VALUE[ButtonSize.XS],\n },\n [ButtonSize.S]: {\n default: 4,\n floating: (BUTTON_SIZE_VALUE[ButtonSize.S] / 2) - TEXT_PADDING_VALUE[ButtonSize.S],\n },\n [ButtonSize.M]: {\n default: 10,\n floating: (BUTTON_SIZE_VALUE[ButtonSize.M] / 2) - TEXT_PADDING_VALUE[ButtonSize.M],\n },\n [ButtonSize.L]: {\n default: 12,\n floating: (BUTTON_SIZE_VALUE[ButtonSize.L] / 2) - TEXT_PADDING_VALUE[ButtonSize.L],\n },\n [ButtonSize.XL]: {\n default: 20,\n floating: (BUTTON_SIZE_VALUE[ButtonSize.XL] / 2) - TEXT_PADDING_VALUE[ButtonSize.XL],\n },\n}\n\ninterface GetPaddingCSSFromSizeAndContentsArgs extends Pick<ButtonProps, 'text'>{\n styleVariant: ButtonStyleVariant\n size: ButtonSize\n}\n\nfunction getPaddingCSSFromSizeAndContents({\n styleVariant,\n text,\n size,\n}: GetPaddingCSSFromSizeAndContentsArgs) {\n const hasOnlyContent = isEmpty(text)\n\n // NOTE: text 가 없는 경우 버튼은 정사각형이기에 padding 이 0\n if (hasOnlyContent) {\n return css`\n padding: 0;\n `\n }\n\n const paddingVariant = [ButtonStyleVariant.Floating, ButtonStyleVariant.FloatingAlt].includes(styleVariant)\n ? 'floating'\n : 'default'\n\n const paddingValue = BUTTON_HORIZONTAL_PADDING_VALUE[size][paddingVariant]\n\n return css`\n padding:\n 0\n ${paddingValue}px\n 0\n ${paddingValue}px;\n `\n}\n\ninterface ButtonSemanticNames {\n color?: SemanticNames\n activeColor?: SemanticNames\n backgroundColor?: SemanticNames | 'transparent'\n activeBackgroundColor?: SemanticNames | 'transparent'\n}\n\nfunction defaultSemanticNames(colorVariant: ButtonColorVariant): Record<ButtonStyleVariant, ButtonSemanticNames> {\n if (colorVariant === ButtonColorVariant.Monochrome ||\n colorVariant === ButtonColorVariant.MonochromeLight ||\n colorVariant === ButtonColorVariant.MonochromeDark) {\n throw new Error('unreached code')\n }\n\n return {\n [ButtonStyleVariant.Primary]: {\n color: 'bgtxt-absolute-white-dark',\n backgroundColor: `bgtxt-${colorVariant}-normal` as const,\n activeBackgroundColor: `bgtxt-${colorVariant}-dark` as const,\n },\n\n [ButtonStyleVariant.Secondary]: {\n color: `bgtxt-${colorVariant}-normal` as const,\n backgroundColor: `bgtxt-${colorVariant}-lightest` as const,\n activeBackgroundColor: `bgtxt-${colorVariant}-lighter` as const,\n },\n\n [ButtonStyleVariant.Tertiary]: {\n color: `bgtxt-${colorVariant}-normal` as const,\n backgroundColor: 'transparent',\n activeColor: `bgtxt-${colorVariant}-dark` as const,\n activeBackgroundColor: `bgtxt-${colorVariant}-lightest` as const,\n },\n\n [ButtonStyleVariant.Floating]: {\n color: 'bgtxt-absolute-white-dark',\n backgroundColor: `bgtxt-${colorVariant}-normal` as const,\n activeBackgroundColor: `bgtxt-${colorVariant}-dark` as const,\n },\n\n [ButtonStyleVariant.FloatingAlt]: {\n color: 'bgtxt-absolute-white-dark',\n backgroundColor: `bgtxt-${colorVariant}-normal` as const,\n activeBackgroundColor: `bgtxt-${colorVariant}-dark` as const,\n },\n }\n}\n\nconst MONOCHROME_SEMANTIC_NAMES: Record<ButtonStyleVariant, ButtonSemanticNames> = {\n [ButtonStyleVariant.Primary]: {\n color: 'bgtxt-absolute-white-dark',\n backgroundColor: 'bgtxt-absolute-black-lightest',\n activeBackgroundColor: 'bgtxt-absolute-black-lighter',\n },\n\n [ButtonStyleVariant.Secondary]: {\n color: 'txt-black-darkest',\n backgroundColor: 'bg-black-lighter',\n activeBackgroundColor: 'bg-black-light',\n },\n\n [ButtonStyleVariant.Tertiary]: {\n color: 'txt-black-darkest',\n backgroundColor: 'transparent',\n activeBackgroundColor: 'bg-black-lightest',\n },\n\n [ButtonStyleVariant.Floating]: {\n color: 'txt-black-darkest',\n },\n\n [ButtonStyleVariant.FloatingAlt]: {\n color: 'txt-black-darkest',\n },\n}\n\nconst MONOCHROME_LIGHT_SEMANTIC_NAMES: Record<ButtonStyleVariant, ButtonSemanticNames> = {\n [ButtonStyleVariant.Primary]: {\n color: 'bgtxt-absolute-white-dark',\n backgroundColor: 'bg-black-darker',\n },\n\n [ButtonStyleVariant.Secondary]: {\n color: 'txt-black-darker',\n backgroundColor: 'bg-black-lighter',\n activeBackgroundColor: 'bg-black-light',\n },\n\n [ButtonStyleVariant.Tertiary]: {\n color: 'txt-black-darker',\n backgroundColor: 'transparent',\n activeBackgroundColor: 'bg-black-lighter',\n },\n\n [ButtonStyleVariant.Floating]: {\n color: 'txt-black-darker',\n backgroundColor: 'bg-white-high',\n },\n\n [ButtonStyleVariant.FloatingAlt]: {\n color: 'txt-black-darker',\n backgroundColor: 'bg-white-high',\n },\n}\n\nconst MONOCHROME_DARK_SEMANTIC_NAMES: Record<ButtonStyleVariant, ButtonSemanticNames> = {\n [ButtonStyleVariant.Primary]: {\n color: 'bgtxt-absolute-white-dark',\n backgroundColor: 'bg-grey-darkest',\n },\n\n [ButtonStyleVariant.Secondary]: {\n color: 'txt-black-darkest',\n backgroundColor: 'bg-black-lighter',\n activeBackgroundColor: 'bg-black-light',\n },\n\n [ButtonStyleVariant.Tertiary]: {\n color: 'txt-black-darkest',\n backgroundColor: 'transparent',\n activeBackgroundColor: 'bg-black-lighter',\n },\n\n [ButtonStyleVariant.Floating]: {\n color: 'txt-black-darkest',\n backgroundColor: 'bg-white-high',\n },\n\n [ButtonStyleVariant.FloatingAlt]: {\n color: 'txt-black-darkest',\n backgroundColor: 'bg-white-high',\n },\n}\n\nfunction getColorCSS(\n semanticNames: Record<ButtonStyleVariant, ButtonSemanticNames>,\n styleVariant: NonNullable<ButtonProps['styleVariant']>,\n disabled?: ButtonProps['disabled'],\n active?: ButtonProps['active'],\n) {\n const colorCSS = (color?: SemanticNames) => {\n if (!color) { return css`` }\n\n return css`\n color: ${({ foundation }) => foundation?.theme?.[color]};\n `\n }\n\n const backgroundColorCSS = (backgroundColor?: SemanticNames | 'transparent') => {\n if (!backgroundColor) { return css`` }\n\n if (backgroundColor === 'transparent') {\n return css`\n background-color: transparent;\n `\n }\n\n return css`\n background-color: ${({ foundation }) => foundation?.theme?.[backgroundColor]};\n `\n }\n\n const idleColorCSS = css`\n ${colorCSS(semanticNames[styleVariant].color)}\n ${backgroundColorCSS(semanticNames[styleVariant].backgroundColor)}\n `\n\n const activeColorCSS = disabled ? css`` : css`\n ${colorCSS(semanticNames[styleVariant].activeColor)}\n ${backgroundColorCSS(semanticNames[styleVariant].activeBackgroundColor)}\n `\n\n return css`\n ${idleColorCSS};\n ${active && activeColorCSS};\n\n &:hover {\n ${activeColorCSS};\n }\n `\n}\n\nfunction getEffectCSSFromVariant(styleVariant: ButtonProps['styleVariant'], size: ButtonProps['size']) {\n switch (styleVariant) {\n case ButtonStyleVariant.Floating:\n return css`\n ${({ foundation }) => foundation?.elevation?.ev2()};\n /* NOTE: height 기반의 100% border-radius 를 사용하기 위해, foundation rounding 을 무시한 hack */\n overflow: hidden;\n border-radius: 1000px;\n\n &:hover {\n ${({ foundation }) => foundation?.elevation?.ev3()};\n }\n `\n case ButtonStyleVariant.FloatingAlt:\n return css`\n ${({ foundation }) => foundation?.elevation?.ev2()};\n ${({ foundation }) => foundation?.rounding?.round8};\n\n &:hover {\n ${({ foundation }) => foundation?.elevation?.ev3()};\n }\n `\n case ButtonStyleVariant.Tertiary:\n case ButtonStyleVariant.Secondary:\n case ButtonStyleVariant.Primary:\n default: {\n switch (size) {\n case ButtonSize.XS:\n return css`\n ${({ foundation }) => foundation?.rounding?.round6};\n `\n case ButtonSize.L:\n return css`\n ${({ foundation }) => foundation?.rounding?.round12};\n `\n case ButtonSize.XL:\n return css`\n ${({ foundation }) => foundation?.rounding?.round16};\n `\n case ButtonSize.S:\n case ButtonSize.M:\n default:\n return css`\n ${({ foundation }) => foundation?.rounding?.round8};\n `\n }\n }\n }\n}\n\ninterface GetCSSFromVariantArgs extends Pick<ButtonProps, 'disabled' | 'active'> {\n size: ButtonSize\n styleVariant: ButtonStyleVariant\n colorVariant: ButtonColorVariant\n}\n\nfunction getCSSFromVariant({\n colorVariant,\n styleVariant,\n size,\n disabled,\n active,\n}: GetCSSFromVariantArgs) {\n const effectCSS = getEffectCSSFromVariant(styleVariant, size)\n\n const semanticNames = (() => {\n switch (colorVariant) {\n case ButtonColorVariant.Monochrome:\n return MONOCHROME_SEMANTIC_NAMES\n case ButtonColorVariant.MonochromeLight:\n return MONOCHROME_LIGHT_SEMANTIC_NAMES\n case ButtonColorVariant.MonochromeDark:\n return MONOCHROME_DARK_SEMANTIC_NAMES\n default:\n return defaultSemanticNames(colorVariant)\n }\n })()\n\n const colorCSS = getColorCSS(semanticNames, styleVariant, disabled, active)\n\n return css`\n ${effectCSS}\n ${colorCSS}\n `\n}\n\ninterface ButtonContentsProps {\n visible?: boolean\n buttonSize: ButtonSize\n}\n\nexport const ButtonContents = styled.div<ButtonContentsProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n visibility: ${({ visible }) => (visible ? 'visible' : 'hidden')};\n ${({ buttonSize }) => gap(BUTTON_CONTENT_GAP_VALUE[buttonSize])}\n`\n\nexport const ButtonLoader = styled.div`\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n`\n\ninterface ButtonWrapperProps extends Pick<\nButtonProps,\n'as' | 'interpolation' | 'disabled' | 'active' | 'text'\n>{\n size: ButtonSize\n styleVariant: ButtonStyleVariant\n colorVariant: ButtonColorVariant\n}\n\nexport const ButtonWrapper = styled.button<ButtonWrapperProps>`\n position: relative;\n box-sizing: border-box;\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};\n border: none;\n outline: none;\n opacity: ${({ disabled }) => (disabled ? DisabledOpacity : 1)};\n\n &:focus:not(:disabled) {\n box-shadow: 0 0 0 3px var(--bgtxt-cobalt-light);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n\n ${({ foundation }) => foundation?.transition?.getTransitionsCSS(['background-color', 'box-shadow'])};\n\n ${getSizeCSSFromButtonSize}\n ${getPaddingCSSFromSizeAndContents}\n ${getCSSFromVariant}\n\n ${({ interpolation }) => interpolation}\n`\n\ninterface ContentTextProps {\n buttonSize: ButtonSize\n}\n\nexport const ContentText = styled(Text)<ContentTextProps>`\n padding: 0 ${({ buttonSize }) => TEXT_PADDING_VALUE[buttonSize]}px;\n`\n"],"names":["BUTTON_SIZE_VALUE","ButtonSize","XS","S","M","L","XL","getSizeCSSFromButtonSize","size","css","TEXT_PADDING_VALUE","BUTTON_CONTENT_GAP_VALUE","BUTTON_HORIZONTAL_PADDING_VALUE","default","floating","getPaddingCSSFromSizeAndContents","styleVariant","text","hasOnlyContent","isEmpty","paddingVariant","ButtonStyleVariant","Floating","FloatingAlt","includes","paddingValue","defaultSemanticNames","colorVariant","ButtonColorVariant","Monochrome","MonochromeLight","MonochromeDark","Error","Primary","color","backgroundColor","activeBackgroundColor","Secondary","Tertiary","activeColor","MONOCHROME_SEMANTIC_NAMES","MONOCHROME_LIGHT_SEMANTIC_NAMES","MONOCHROME_DARK_SEMANTIC_NAMES","getColorCSS","semanticNames","disabled","active","colorCSS","foundation","theme","backgroundColorCSS","idleColorCSS","activeColorCSS","getEffectCSSFromVariant","elevation","ev2","ev3","rounding","round8","round6","round12","round16","getCSSFromVariant","effectCSS","ButtonContents","styled","div","withConfig","displayName","componentId","visible","buttonSize","gap","ButtonLoader","ButtonWrapper","button","DisabledOpacity","transition","getTransitionsCSS","interpolation","ContentText","Text"],"mappings":";;;;;;;;;AAmBA;AACA,MAAMA,iBAAiB,GAAG;AACxB,EAAA,CAACC,uBAAU,CAACC,EAAE,GAAG,EAAE;AACnB,EAAA,CAACD,uBAAU,CAACE,CAAC,GAAG,EAAE;AAClB,EAAA,CAACF,uBAAU,CAACG,CAAC,GAAG,EAAE;AAClB,EAAA,CAACH,uBAAU,CAACI,CAAC,GAAG,EAAE;EAClB,CAACJ,uBAAU,CAACK,EAAE,GAAG,EAAA;AACnB,CAAC,CAAA;AAMD,SAASC,wBAAwBA,CAAC;AAChCC,EAAAA,IAAAA;AAC4B,CAAC,EAAE;AAC/B,EAAA,OAAOC,6BAAI,CAAA;AACb,eAAiBT,EAAAA,iBAAiB,CAACQ,IAAI,CAAE,CAAA;AACzC,YAAcR,EAAAA,iBAAiB,CAACQ,IAAI,CAAE,CAAA;AACtC,EAAG,CAAA,CAAA;AACH,CAAA;;AAEA;AACO,MAAME,kBAA8C,GAAG;AAC5D,EAAA,CAACT,uBAAU,CAACC,EAAE,GAAG,CAAC;AAClB,EAAA,CAACD,uBAAU,CAACE,CAAC,GAAG,CAAC;AACjB,EAAA,CAACF,uBAAU,CAACG,CAAC,GAAG,CAAC;AACjB,EAAA,CAACH,uBAAU,CAACI,CAAC,GAAG,CAAC;EACjB,CAACJ,uBAAU,CAACK,EAAE,GAAG,CAAA;AACnB,EAAC;AAED,MAAMK,wBAAoD,GAAG;AAC3D,EAAA,CAACV,uBAAU,CAACC,EAAE,GAAG,CAAC;AAClB,EAAA,CAACD,uBAAU,CAACE,CAAC,GAAG,CAAC;AACjB,EAAA,CAACF,uBAAU,CAACG,CAAC,GAAG,CAAC;AACjB,EAAA,CAACH,uBAAU,CAACI,CAAC,GAAG,CAAC;EACjB,CAACJ,uBAAU,CAACK,EAAE,GAAG,CAAA;AACnB,CAAC,CAAA;;AAED;AACA;AACA;AACA;AAGA;AACO,MAAMM,+BAA4F,GAAG;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ASrC,CAAA,CAAA,CAAA,yGAAA,CAAA,EAAA;MAWYK,aAAa,gBAAGT,gCAAM,CAACU,MAAM,CAAAR,UAAA,CAAA;EAAAC,WAAA,EAAA,6BAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAAA,CAAA,CAAA,CAAA,iDAAA,EAAA,oCAAA,EAAA,uHAAA,EAAA,GAAA,EAAA,GAAA,EAAA,GAAA,EAAA,GAAA,EAAA,EAAA,CAAA,EAG9B,CAAC;AAAExB,EAAAA,QAAAA;AAAS,CAAC,KAAMA,QAAQ,GAAG,aAAa,GAAG,SAAU,EAGvD,CAAC;AAAEA,EAAAA,QAAAA;AAAS,CAAC,KAAMA,QAAQ,GAAG+B,uBAAe,GAAG,CAAE,EAU3D,CAAC;AAAE5B,EAAAA,UAAAA;AAAW,CAAC,KAAKA,UAAU,EAAE6B,UAAU,EAAEC,iBAAiB,CAAC,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC,EAEjGvE,wBAAwB,EACxBQ,gCAAgC,EAChC+C,iBAAiB,EAEjB,CAAC;AAAEiB,EAAAA,aAAAA;AAAc,CAAC,KAAKA,aAAa,EACvC;AAMM,MAAMC,WAAW,gBAAGf,gCAAM,CAACgB,YAAI,CAAC,CAAAd,UAAA,CAAA;EAAAC,WAAA,EAAA,2BAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAAA,CAAA,CAAA,CAAA,YAAA,EAAA,KAAA,CAAA,EACxB,CAAC;AAAEE,EAAAA,UAAAA;AAAW,CAAC,KAAK7D,kBAAkB,CAAC6D,UAAU,CAAC;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"Button.styled.js","sources":["../../../../src/components/Button/Button.styled.ts"],"sourcesContent":["import {\n type SemanticNames,\n css,\n styled,\n} from '~/src/foundation'\n\nimport DisabledOpacity from '~/src/constants/DisabledOpacity'\nimport { gap } from '~/src/utils/styleUtils'\nimport { isEmpty } from '~/src/utils/typeUtils'\n\nimport { Text } from '~/src/components/Text'\n\nimport type ButtonProps from './Button.types'\nimport {\n ButtonColorVariant,\n ButtonSize,\n ButtonStyleVariant,\n} from './Button.types'\n\n// NOTE: ButtonSize 에 따른 버튼의 min-width, height\nconst BUTTON_SIZE_VALUE = {\n [ButtonSize.XS]: 20,\n [ButtonSize.S]: 24,\n [ButtonSize.M]: 36,\n [ButtonSize.L]: 44,\n [ButtonSize.XL]: 54,\n}\n\ninterface GetSizeCSSFromButtonSizeArgs {\n size: ButtonSize\n}\n\nfunction getSizeCSSFromButtonSize({\n size,\n}: GetSizeCSSFromButtonSizeArgs) {\n return css`\n min-width: ${BUTTON_SIZE_VALUE[size]}px;\n height: ${BUTTON_SIZE_VALUE[size]}px;\n `\n}\n\n// NOTE: ButtonSize에 따른 버튼 내 텍스트의 margin\nexport const TEXT_PADDING_VALUE: Record<ButtonSize, number> = {\n [ButtonSize.XS]: 3,\n [ButtonSize.S]: 3,\n [ButtonSize.M]: 4,\n [ButtonSize.L]: 4,\n [ButtonSize.XL]: 4,\n}\n\nconst BUTTON_CONTENT_GAP_VALUE: Record<ButtonSize, number> = {\n [ButtonSize.XS]: 0,\n [ButtonSize.S]: 0,\n [ButtonSize.M]: 2,\n [ButtonSize.L]: 2,\n [ButtonSize.XL]: 2,\n}\n\n// NOTE: 버튼의 padding 값을 결정하는 경우 4가지 중 위의 3가지 key\n// 1. 기본\n// 2. styleVariant 가 Floating 인 경우 - floating\n// 3. 버튼에 텍스트 없이 컨텐트만 있을 경우 => buttonSize 에 관계없이 padding 이 0 이라 이 경우만 따로 분기 처리\ntype ButtonPaddingVariantKey = 'default' | 'floating'\n\n// NOTE: floating 은 padding 이 버튼의 size value 의 절반에서 Text padding 값 만큼 빼줘야 스펙과 일치\nexport const BUTTON_HORIZONTAL_PADDING_VALUE: Record<ButtonSize, Record<ButtonPaddingVariantKey, number>> = {\n [ButtonSize.XS]: {\n default: 2,\n floating: (BUTTON_SIZE_VALUE[ButtonSize.XS] / 2) - TEXT_PADDING_VALUE[ButtonSize.XS],\n },\n [ButtonSize.S]: {\n default: 4,\n floating: (BUTTON_SIZE_VALUE[ButtonSize.S] / 2) - TEXT_PADDING_VALUE[ButtonSize.S],\n },\n [ButtonSize.M]: {\n default: 10,\n floating: (BUTTON_SIZE_VALUE[ButtonSize.M] / 2) - TEXT_PADDING_VALUE[ButtonSize.M],\n },\n [ButtonSize.L]: {\n default: 12,\n floating: (BUTTON_SIZE_VALUE[ButtonSize.L] / 2) - TEXT_PADDING_VALUE[ButtonSize.L],\n },\n [ButtonSize.XL]: {\n default: 20,\n floating: (BUTTON_SIZE_VALUE[ButtonSize.XL] / 2) - TEXT_PADDING_VALUE[ButtonSize.XL],\n },\n}\n\ninterface GetPaddingCSSFromSizeAndContentsArgs extends Pick<ButtonProps, 'text'>{\n styleVariant: ButtonStyleVariant\n size: ButtonSize\n}\n\nfunction getPaddingCSSFromSizeAndContents({\n styleVariant,\n text,\n size,\n}: GetPaddingCSSFromSizeAndContentsArgs) {\n const hasOnlyContent = isEmpty(text)\n\n // NOTE: text 가 없는 경우 버튼은 정사각형이기에 padding 이 0\n if (hasOnlyContent) {\n return css`\n padding: 0;\n `\n }\n\n const paddingVariant = [ButtonStyleVariant.Floating, ButtonStyleVariant.FloatingAlt].includes(styleVariant)\n ? 'floating'\n : 'default'\n\n const paddingValue = BUTTON_HORIZONTAL_PADDING_VALUE[size][paddingVariant]\n\n return css`\n padding:\n 0\n ${paddingValue}px\n 0\n ${paddingValue}px;\n `\n}\n\ninterface ButtonSemanticNames {\n color?: SemanticNames\n activeColor?: SemanticNames\n backgroundColor?: SemanticNames | 'transparent'\n activeBackgroundColor?: SemanticNames | 'transparent'\n}\n\nfunction defaultSemanticNames(colorVariant: ButtonColorVariant): Record<ButtonStyleVariant, ButtonSemanticNames> {\n if (colorVariant === ButtonColorVariant.Monochrome ||\n colorVariant === ButtonColorVariant.MonochromeLight ||\n colorVariant === ButtonColorVariant.MonochromeDark) {\n throw new Error('unreached code')\n }\n\n return {\n [ButtonStyleVariant.Primary]: {\n color: 'bgtxt-absolute-white-dark',\n backgroundColor: `bgtxt-${colorVariant}-normal` as const,\n activeBackgroundColor: `bgtxt-${colorVariant}-dark` as const,\n },\n\n [ButtonStyleVariant.Secondary]: {\n color: `bgtxt-${colorVariant}-normal` as const,\n backgroundColor: `bgtxt-${colorVariant}-lightest` as const,\n activeBackgroundColor: `bgtxt-${colorVariant}-lighter` as const,\n },\n\n [ButtonStyleVariant.Tertiary]: {\n color: `bgtxt-${colorVariant}-normal` as const,\n backgroundColor: 'transparent',\n activeColor: `bgtxt-${colorVariant}-dark` as const,\n activeBackgroundColor: `bgtxt-${colorVariant}-lightest` as const,\n },\n\n [ButtonStyleVariant.Floating]: {\n color: 'bgtxt-absolute-white-dark',\n backgroundColor: `bgtxt-${colorVariant}-normal` as const,\n activeBackgroundColor: `bgtxt-${colorVariant}-dark` as const,\n },\n\n [ButtonStyleVariant.FloatingAlt]: {\n color: 'bgtxt-absolute-white-dark',\n backgroundColor: `bgtxt-${colorVariant}-normal` as const,\n activeBackgroundColor: `bgtxt-${colorVariant}-dark` as const,\n },\n }\n}\n\nconst MONOCHROME_SEMANTIC_NAMES: Record<ButtonStyleVariant, ButtonSemanticNames> = {\n [ButtonStyleVariant.Primary]: {\n color: 'bgtxt-absolute-white-dark',\n backgroundColor: 'bgtxt-absolute-black-lightest',\n activeBackgroundColor: 'bgtxt-absolute-black-lighter',\n },\n\n [ButtonStyleVariant.Secondary]: {\n color: 'txt-black-darkest',\n backgroundColor: 'bg-black-lighter',\n activeBackgroundColor: 'bg-black-light',\n },\n\n [ButtonStyleVariant.Tertiary]: {\n color: 'txt-black-darkest',\n backgroundColor: 'transparent',\n activeBackgroundColor: 'bg-black-lightest',\n },\n\n [ButtonStyleVariant.Floating]: {\n color: 'txt-black-darkest',\n },\n\n [ButtonStyleVariant.FloatingAlt]: {\n color: 'txt-black-darkest',\n },\n}\n\nconst MONOCHROME_LIGHT_SEMANTIC_NAMES: Record<ButtonStyleVariant, ButtonSemanticNames> = {\n [ButtonStyleVariant.Primary]: {\n color: 'bgtxt-absolute-white-dark',\n backgroundColor: 'bg-black-darker',\n },\n\n [ButtonStyleVariant.Secondary]: {\n color: 'txt-black-darker',\n backgroundColor: 'bg-black-lighter',\n activeBackgroundColor: 'bg-black-light',\n },\n\n [ButtonStyleVariant.Tertiary]: {\n color: 'txt-black-darker',\n backgroundColor: 'transparent',\n activeBackgroundColor: 'bg-black-lighter',\n },\n\n [ButtonStyleVariant.Floating]: {\n color: 'txt-black-darker',\n backgroundColor: 'bg-white-high',\n },\n\n [ButtonStyleVariant.FloatingAlt]: {\n color: 'txt-black-darker',\n backgroundColor: 'bg-white-high',\n },\n}\n\nconst MONOCHROME_DARK_SEMANTIC_NAMES: Record<ButtonStyleVariant, ButtonSemanticNames> = {\n [ButtonStyleVariant.Primary]: {\n color: 'txt-white-normal',\n backgroundColor: 'bg-grey-darkest',\n },\n\n [ButtonStyleVariant.Secondary]: {\n color: 'txt-black-darkest',\n backgroundColor: 'bg-black-lighter',\n activeBackgroundColor: 'bg-black-light',\n },\n\n [ButtonStyleVariant.Tertiary]: {\n color: 'txt-black-darkest',\n backgroundColor: 'transparent',\n activeBackgroundColor: 'bg-black-lighter',\n },\n\n [ButtonStyleVariant.Floating]: {\n color: 'txt-black-darkest',\n backgroundColor: 'bg-white-high',\n },\n\n [ButtonStyleVariant.FloatingAlt]: {\n color: 'txt-black-darkest',\n backgroundColor: 'bg-white-high',\n },\n}\n\nfunction getColorCSS(\n semanticNames: Record<ButtonStyleVariant, ButtonSemanticNames>,\n styleVariant: NonNullable<ButtonProps['styleVariant']>,\n disabled?: ButtonProps['disabled'],\n active?: ButtonProps['active'],\n) {\n const colorCSS = (color?: SemanticNames) => {\n if (!color) { return css`` }\n\n return css`\n color: ${({ foundation }) => foundation?.theme?.[color]};\n `\n }\n\n const backgroundColorCSS = (backgroundColor?: SemanticNames | 'transparent') => {\n if (!backgroundColor) { return css`` }\n\n if (backgroundColor === 'transparent') {\n return css`\n background-color: transparent;\n `\n }\n\n return css`\n background-color: ${({ foundation }) => foundation?.theme?.[backgroundColor]};\n `\n }\n\n const idleColorCSS = css`\n ${colorCSS(semanticNames[styleVariant].color)}\n ${backgroundColorCSS(semanticNames[styleVariant].backgroundColor)}\n `\n\n const activeColorCSS = disabled ? css`` : css`\n ${colorCSS(semanticNames[styleVariant].activeColor)}\n ${backgroundColorCSS(semanticNames[styleVariant].activeBackgroundColor)}\n `\n\n return css`\n ${idleColorCSS};\n ${active && activeColorCSS};\n\n &:hover {\n ${activeColorCSS};\n }\n `\n}\n\nfunction getEffectCSSFromVariant(styleVariant: ButtonProps['styleVariant'], size: ButtonProps['size']) {\n switch (styleVariant) {\n case ButtonStyleVariant.Floating:\n return css`\n ${({ foundation }) => foundation?.elevation?.ev2()};\n /* NOTE: height 기반의 100% border-radius 를 사용하기 위해, foundation rounding 을 무시한 hack */\n overflow: hidden;\n border-radius: 1000px;\n\n &:hover {\n ${({ foundation }) => foundation?.elevation?.ev3()};\n }\n `\n case ButtonStyleVariant.FloatingAlt:\n return css`\n ${({ foundation }) => foundation?.elevation?.ev2()};\n ${({ foundation }) => foundation?.rounding?.round8};\n\n &:hover {\n ${({ foundation }) => foundation?.elevation?.ev3()};\n }\n `\n case ButtonStyleVariant.Tertiary:\n case ButtonStyleVariant.Secondary:\n case ButtonStyleVariant.Primary:\n default: {\n switch (size) {\n case ButtonSize.XS:\n return css`\n ${({ foundation }) => foundation?.rounding?.round6};\n `\n case ButtonSize.L:\n return css`\n ${({ foundation }) => foundation?.rounding?.round12};\n `\n case ButtonSize.XL:\n return css`\n ${({ foundation }) => foundation?.rounding?.round16};\n `\n case ButtonSize.S:\n case ButtonSize.M:\n default:\n return css`\n ${({ foundation }) => foundation?.rounding?.round8};\n `\n }\n }\n }\n}\n\ninterface GetCSSFromVariantArgs extends Pick<ButtonProps, 'disabled' | 'active'> {\n size: ButtonSize\n styleVariant: ButtonStyleVariant\n colorVariant: ButtonColorVariant\n}\n\nfunction getCSSFromVariant({\n colorVariant,\n styleVariant,\n size,\n disabled,\n active,\n}: GetCSSFromVariantArgs) {\n const effectCSS = getEffectCSSFromVariant(styleVariant, size)\n\n const semanticNames = (() => {\n switch (colorVariant) {\n case ButtonColorVariant.Monochrome:\n return MONOCHROME_SEMANTIC_NAMES\n case ButtonColorVariant.MonochromeLight:\n return MONOCHROME_LIGHT_SEMANTIC_NAMES\n case ButtonColorVariant.MonochromeDark:\n return MONOCHROME_DARK_SEMANTIC_NAMES\n default:\n return defaultSemanticNames(colorVariant)\n }\n })()\n\n const colorCSS = getColorCSS(semanticNames, styleVariant, disabled, active)\n\n return css`\n ${effectCSS}\n ${colorCSS}\n `\n}\n\ninterface ButtonContentsProps {\n visible?: boolean\n buttonSize: ButtonSize\n}\n\nexport const ButtonContents = styled.div<ButtonContentsProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n visibility: ${({ visible }) => (visible ? 'visible' : 'hidden')};\n ${({ buttonSize }) => gap(BUTTON_CONTENT_GAP_VALUE[buttonSize])}\n`\n\nexport const ButtonLoader = styled.div`\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n`\n\ninterface ButtonWrapperProps extends Pick<\nButtonProps,\n'as' | 'interpolation' | 'disabled' | 'active' | 'text'\n>{\n size: ButtonSize\n styleVariant: ButtonStyleVariant\n colorVariant: ButtonColorVariant\n}\n\nexport const ButtonWrapper = styled.button<ButtonWrapperProps>`\n position: relative;\n box-sizing: border-box;\n cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};\n border: none;\n outline: none;\n opacity: ${({ disabled }) => (disabled ? DisabledOpacity : 1)};\n\n &:focus:not(:disabled) {\n box-shadow: 0 0 0 3px var(--bgtxt-cobalt-light);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n\n ${({ foundation }) => foundation?.transition?.getTransitionsCSS(['background-color', 'box-shadow'])};\n\n ${getSizeCSSFromButtonSize}\n ${getPaddingCSSFromSizeAndContents}\n ${getCSSFromVariant}\n\n ${({ interpolation }) => interpolation}\n`\n\ninterface ContentTextProps {\n buttonSize: ButtonSize\n}\n\nexport const ContentText = styled(Text)<ContentTextProps>`\n padding: 0 ${({ buttonSize }) => TEXT_PADDING_VALUE[buttonSize]}px;\n`\n"],"names":["BUTTON_SIZE_VALUE","ButtonSize","XS","S","M","L","XL","getSizeCSSFromButtonSize","size","css","TEXT_PADDING_VALUE","BUTTON_CONTENT_GAP_VALUE","BUTTON_HORIZONTAL_PADDING_VALUE","default","floating","getPaddingCSSFromSizeAndContents","styleVariant","text","hasOnlyContent","isEmpty","paddingVariant","ButtonStyleVariant","Floating","FloatingAlt","includes","paddingValue","defaultSemanticNames","colorVariant","ButtonColorVariant","Monochrome","MonochromeLight","MonochromeDark","Error","Primary","color","backgroundColor","activeBackgroundColor","Secondary","Tertiary","activeColor","MONOCHROME_SEMANTIC_NAMES","MONOCHROME_LIGHT_SEMANTIC_NAMES","MONOCHROME_DARK_SEMANTIC_NAMES","getColorCSS","semanticNames","disabled","active","colorCSS","foundation","theme","backgroundColorCSS","idleColorCSS","activeColorCSS","getEffectCSSFromVariant","elevation","ev2","ev3","rounding","round8","round6","round12","round16","getCSSFromVariant","effectCSS","ButtonContents","styled","div","withConfig","displayName","componentId","visible","buttonSize","gap","ButtonLoader","ButtonWrapper","button","DisabledOpacity","transition","getTransitionsCSS","interpolation","ContentText","Text"],"mappings":";;;;;;;;;AAmBA;AACA,MAAMA,iBAAiB,GAAG;AACxB,EAAA,CAACC,uBAAU,CAACC,EAAE,GAAG,EAAE;AACnB,EAAA,CAACD,uBAAU,CAACE,CAAC,GAAG,EAAE;AAClB,EAAA,CAACF,uBAAU,CAACG,CAAC,GAAG,EAAE;AAClB,EAAA,CAACH,uBAAU,CAACI,CAAC,GAAG,EAAE;EAClB,CAACJ,uBAAU,CAACK,EAAE,GAAG,EAAA;AACnB,CAAC,CAAA;AAMD,SAASC,wBAAwBA,CAAC;AACh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EAAAA,QAAAA;AAAS,CAAC,KAAMA,QAAQ,GAAG+B,uBAAe,GAAG,CAAE,EAU3D,CAAC;AAAE5B,EAAAA,UAAAA;AAAW,CAAC,KAAKA,UAAU,EAAE6B,UAAU,EAAEC,iBAAiB,CAAC,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC,EAEjGvE,wBAAwB,EACxBQ,gCAAgC,EAChC+C,iBAAiB,EAEjB,CAAC;AAAEiB,EAAAA,aAAAA;AAAc,CAAC,KAAKA,aAAa,EACvC;AAMM,MAAMC,WAAW,gBAAGf,gCAAM,CAACgB,YAAI,CAAC,CAAAd,UAAA,CAAA;EAAAC,WAAA,EAAA,2BAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAAA,CAAA,CAAA,CAAA,YAAA,EAAA,KAAA,CAAA,EACxB,CAAC;AAAEE,EAAAA,UAAAA;AAAW,CAAC,KAAK7D,kBAAkB,CAAC6D,UAAU,CAAC;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","sources":["../../../../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":["import React, {\n type Ref,\n forwardRef,\n memo,\n} from 'react'\n\nimport { clamp } from '~/src/utils/numberUtils'\n\nimport type ProgressBarProps from './ProgressBar.types'\nimport {\n ProgressBarSize,\n ProgressBarVariant,\n} from './ProgressBar.types'\n\nimport {\n StyledProgressBarActive,\n StyledProgressBarWrapper,\n} from './ProgressBar.styled'\n\nexport const PROGRESS_BAR_ACTIVE_TEST_ID = 'bezier-react-progress-bar-active'\n\nexport const ProgressBar = memo(forwardRef(function ProgressBar(\n {\n size = ProgressBarSize.M,\n variant = ProgressBarVariant.Green,\n width = 36,\n value = 0,\n activeClassName,\n activeInterpolation,\n activeStyle,\n activeTestId = PROGRESS_BAR_ACTIVE_TEST_ID,\n ...rest\n }: ProgressBarProps,\n forwardedRef: Ref<HTMLDivElement>,\n) {\n const clampedValue = clamp(value, 0, 1)\n\n return (\n <StyledProgressBarWrapper\n ref={forwardedRef}\n size={size}\n width={width}\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"1\"\n aria-valuenow={clampedValue}\n {...rest}\n >\n <StyledProgressBarActive\n variant={variant}\n value={clampedValue}\n className={activeClassName}\n interpolation={activeInterpolation}\n style={activeStyle}\n data-testid={activeTestId}\n />\n </StyledProgressBarWrapper>\n )\n}))\n"],"names":["PROGRESS_BAR_ACTIVE_TEST_ID","ProgressBar","memo","forwardRef","size","ProgressBarSize","M","variant","ProgressBarVariant","Green","width","value","activeClassName","activeInterpolation","activeStyle","activeTestId","rest","forwardedRef","clampedValue","clamp","React","createElement","StyledProgressBarWrapper","Object","assign","ref","role","StyledProgressBarActive","className","interpolation","style"],"mappings":";;;;;;;AAmBO,MAAMA,2BAA2B,GAAG,mCAAkC;AAEtE,MAAMC,WAAW,gBAAGC,UAAI,eAACC,gBAAU,CAAC,SAASF,WAAWA,CAC7D;EACEG,IAAI,GAAGC,iCAAe,CAACC,CAAC;EACxBC,OAAO,GAAGC,oCAAkB,CAACC,KAAK;AAClCC,EAAAA,KAAK,GAAG,EAAE;AACVC,EAAAA,KAAK,GAAG,CAAC;EACTC,eAAe;EACfC,mBAAmB;EACnBC,WAAW;AACXC,EAAAA,YAAY,GAAGf,2BAA2B;EAC1C,GAAGgB,IAAAA;AACa,CAAC,EACnBC,YAAiC,EACjC;EACA,MAAMC,YAAY,GAAGC,iBAAK,CAACR,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;EAEvC,oBACES,KAAA,CAAAC,aAAA,CAACC,2CAAwB,EAAAC,MAAA,CAAAC,MAAA,CAAA;AACvBC,IAAAA,GAAG,EAAER,YAAa;AAClBb,IAAAA,IAAI,EAAEA,IAAK;AACXM,IAAAA,KAAK,EAAEA,KAAM;
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","sources":["../../../../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":["import React, {\n type Ref,\n forwardRef,\n memo,\n} from 'react'\n\nimport { clamp } from '~/src/utils/numberUtils'\n\nimport type ProgressBarProps from './ProgressBar.types'\nimport {\n ProgressBarSize,\n ProgressBarVariant,\n} from './ProgressBar.types'\n\nimport {\n StyledProgressBarActive,\n StyledProgressBarWrapper,\n} from './ProgressBar.styled'\n\nexport const PROGRESS_BAR_ACTIVE_TEST_ID = 'bezier-react-progress-bar-active'\n\nexport const ProgressBar = memo(forwardRef(function ProgressBar(\n {\n size = ProgressBarSize.M,\n variant = ProgressBarVariant.Green,\n width = 36,\n value = 0,\n activeClassName,\n activeInterpolation,\n activeStyle,\n activeTestId = PROGRESS_BAR_ACTIVE_TEST_ID,\n ...rest\n }: ProgressBarProps,\n forwardedRef: Ref<HTMLDivElement>,\n) {\n const clampedValue = clamp(value, 0, 1)\n\n return (\n <StyledProgressBarWrapper\n ref={forwardedRef}\n size={size}\n width={width}\n variant={variant}\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"1\"\n aria-valuenow={clampedValue}\n {...rest}\n >\n <StyledProgressBarActive\n variant={variant}\n value={clampedValue}\n className={activeClassName}\n interpolation={activeInterpolation}\n style={activeStyle}\n data-testid={activeTestId}\n />\n </StyledProgressBarWrapper>\n )\n}))\n"],"names":["PROGRESS_BAR_ACTIVE_TEST_ID","ProgressBar","memo","forwardRef","size","ProgressBarSize","M","variant","ProgressBarVariant","Green","width","value","activeClassName","activeInterpolation","activeStyle","activeTestId","rest","forwardedRef","clampedValue","clamp","React","createElement","StyledProgressBarWrapper","Object","assign","ref","role","StyledProgressBarActive","className","interpolation","style"],"mappings":";;;;;;;AAmBO,MAAMA,2BAA2B,GAAG,mCAAkC;AAEtE,MAAMC,WAAW,gBAAGC,UAAI,eAACC,gBAAU,CAAC,SAASF,WAAWA,CAC7D;EACEG,IAAI,GAAGC,iCAAe,CAACC,CAAC;EACxBC,OAAO,GAAGC,oCAAkB,CAACC,KAAK;AAClCC,EAAAA,KAAK,GAAG,EAAE;AACVC,EAAAA,KAAK,GAAG,CAAC;EACTC,eAAe;EACfC,mBAAmB;EACnBC,WAAW;AACXC,EAAAA,YAAY,GAAGf,2BAA2B;EAC1C,GAAGgB,IAAAA;AACa,CAAC,EACnBC,YAAiC,EACjC;EACA,MAAMC,YAAY,GAAGC,iBAAK,CAACR,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;EAEvC,oBACES,KAAA,CAAAC,aAAA,CAACC,2CAAwB,EAAAC,MAAA,CAAAC,MAAA,CAAA;AACvBC,IAAAA,GAAG,EAAER,YAAa;AAClBb,IAAAA,IAAI,EAAEA,IAAK;AACXM,IAAAA,KAAK,EAAEA,KAAM;AACbH,IAAAA,OAAO,EAAEA,OAAQ;AACjBmB,IAAAA,IAAI,EAAC,aAAa;AAClB,IAAA,eAAA,EAAc,GAAG;AACjB,IAAA,eAAA,EAAc,GAAG;IACjB,eAAeR,EAAAA,YAAAA;AAAa,GAAA,EACxBF,IAAI,CAERI,eAAAA,KAAA,CAAAC,aAAA,CAACM,0CAAuB,EAAA;AACtBpB,IAAAA,OAAO,EAAEA,OAAQ;AACjBI,IAAAA,KAAK,EAAEO,YAAa;AACpBU,IAAAA,SAAS,EAAEhB,eAAgB;AAC3BiB,IAAAA,aAAa,EAAEhB,mBAAoB;AACnCiB,IAAAA,KAAK,EAAEhB,WAAY;IACnB,aAAaC,EAAAA,YAAAA;AAAa,GAC3B,CACuB,CAAC,CAAA;AAE/B,CAAC,CAAC;;;;;"}
|
|
@@ -14,6 +14,7 @@ const getProgressBarActiveGradient = ({
|
|
|
14
14
|
}) => {
|
|
15
15
|
switch (variant) {
|
|
16
16
|
case ProgressBar_types.ProgressBarVariant.Green:
|
|
17
|
+
case ProgressBar_types.ProgressBarVariant.GreenAlt:
|
|
17
18
|
{
|
|
18
19
|
return FoundationStyledComponent.css`
|
|
19
20
|
background: linear-gradient(
|
|
@@ -36,16 +37,35 @@ const getProgressBarActiveGradient = ({
|
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
};
|
|
40
|
+
const getProgressBarBackgroundColor = ({
|
|
41
|
+
foundation,
|
|
42
|
+
variant
|
|
43
|
+
}) => {
|
|
44
|
+
switch (variant) {
|
|
45
|
+
case ProgressBar_types.ProgressBarVariant.GreenAlt:
|
|
46
|
+
{
|
|
47
|
+
return FoundationStyledComponent.css`
|
|
48
|
+
background-color: ${foundation?.theme?.['bgtxt-absolute-white-normal']};
|
|
49
|
+
`;
|
|
50
|
+
}
|
|
51
|
+
case ProgressBar_types.ProgressBarVariant.Green:
|
|
52
|
+
case ProgressBar_types.ProgressBarVariant.Monochrome:
|
|
53
|
+
default:
|
|
54
|
+
{
|
|
55
|
+
return FoundationStyledComponent.css`
|
|
56
|
+
background-color: ${foundation?.theme?.['bg-black-light']};
|
|
57
|
+
`;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
39
61
|
const StyledProgressBarWrapper = /*#__PURE__*/FoundationStyledComponent.styled.div.withConfig({
|
|
40
62
|
displayName: "ProgressBarstyled__StyledProgressBarWrapper",
|
|
41
63
|
componentId: "sc-w8ljs-0"
|
|
42
|
-
})(["width:", ";height:", "px;
|
|
64
|
+
})(["width:", ";height:", "px;", " ", " ", ";", ""], ({
|
|
43
65
|
width
|
|
44
66
|
}) => styleUtils.toLength(width, '36px'), ({
|
|
45
67
|
size
|
|
46
|
-
}) => PROGRESS_BAR_HEIGHT[size], ({
|
|
47
|
-
foundation
|
|
48
|
-
}) => foundation?.theme?.['bg-black-light'], ({
|
|
68
|
+
}) => PROGRESS_BAR_HEIGHT[size], getProgressBarBackgroundColor, ({
|
|
49
69
|
foundation
|
|
50
70
|
}) => foundation?.rounding?.round3, ({
|
|
51
71
|
foundation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.styled.js","sources":["../../../../src/components/ProgressBar/ProgressBar.styled.ts"],"sourcesContent":["import {\n type Foundation,\n css,\n styled,\n} from '~/src/foundation'\n\nimport { toLength } from '~/src/utils/styleUtils'\n\nimport type ProgressBarProps from './ProgressBar.types'\nimport {\n ProgressBarSize,\n ProgressBarVariant,\n} from './ProgressBar.types'\n\nconst PROGRESS_BAR_HEIGHT: Record<ProgressBarSize, number> = {\n [ProgressBarSize.S]: 4,\n [ProgressBarSize.M]: 6,\n}\n\ninterface
|
|
1
|
+
{"version":3,"file":"ProgressBar.styled.js","sources":["../../../../src/components/ProgressBar/ProgressBar.styled.ts"],"sourcesContent":["import {\n type Foundation,\n css,\n styled,\n} from '~/src/foundation'\n\nimport { toLength } from '~/src/utils/styleUtils'\n\nimport type ProgressBarProps from './ProgressBar.types'\nimport {\n ProgressBarSize,\n ProgressBarVariant,\n} from './ProgressBar.types'\n\nconst PROGRESS_BAR_HEIGHT: Record<ProgressBarSize, number> = {\n [ProgressBarSize.S]: 4,\n [ProgressBarSize.M]: 6,\n}\n\ninterface GetProgressBarStyleProps {\n foundation?: Foundation\n variant: ProgressBarVariant\n}\n\nconst getProgressBarActiveGradient = ({\n foundation,\n variant,\n}: GetProgressBarStyleProps) => {\n switch (variant) {\n case ProgressBarVariant.Green:\n case ProgressBarVariant.GreenAlt: {\n return css`\n background: linear-gradient(\n 90deg,\n ${foundation?.theme?.['bgtxt-green-normal']} 0%,\n ${foundation?.subTheme?.['bgtxt-green-normal']} 100%\n );\n `\n }\n case ProgressBarVariant.Monochrome:\n default: {\n return css`\n background: linear-gradient(\n 90deg,\n ${foundation?.theme?.['bg-black-light']} 0%,\n ${foundation?.theme?.['bg-black-dark']} 100%\n );\n `\n }\n }\n}\n\nconst getProgressBarBackgroundColor = ({\n foundation,\n variant,\n}: GetProgressBarStyleProps) => {\n switch (variant) {\n case ProgressBarVariant.GreenAlt: {\n return css`\n background-color: ${foundation?.theme?.['bgtxt-absolute-white-normal']};\n `\n }\n case ProgressBarVariant.Green:\n case ProgressBarVariant.Monochrome:\n default: {\n return css`\n background-color: ${foundation?.theme?.['bg-black-light']};\n `\n }\n }\n}\n\ninterface StyledProgressBarWrapperProps extends ProgressBarProps {\n size: NonNullable<ProgressBarProps['size']>\n width: NonNullable<ProgressBarProps['width']>\n variant: NonNullable<ProgressBarProps['variant']>\n}\n\nexport const StyledProgressBarWrapper = styled.div<StyledProgressBarWrapperProps>`\n width: ${({ width }) => toLength(width, '36px')};\n height: ${({ size }) => PROGRESS_BAR_HEIGHT[size]}px;\n\n ${getProgressBarBackgroundColor}\n ${({ foundation }) => foundation?.rounding?.round3}\n\n ${({ foundation }) => foundation?.transition?.getTransitionsCSS('width')};\n\n ${({ interpolation }) => interpolation}\n`\n\ninterface StyledProgressBarActiveProps extends ProgressBarProps {\n variant: NonNullable<ProgressBarProps['variant']>\n value: NonNullable<ProgressBarProps['value']>\n}\n\nexport const StyledProgressBarActive = styled.div<StyledProgressBarActiveProps>`\n width: ${({ value }) => value * 100}%;\n height: 100%;\n\n ${getProgressBarActiveGradient}\n ${({ foundation }) => foundation?.rounding?.round3}\n\n ${({ foundation }) => foundation?.transition?.getTransitionsCSS('width')};\n\n ${({ interpolation }) => interpolation}\n`\n"],"names":["PROGRESS_BAR_HEIGHT","ProgressBarSize","S","M","getProgressBarActiveGradient","foundation","variant","ProgressBarVariant","Green","GreenAlt","css","theme","subTheme","Monochrome","getProgressBarBackgroundColor","StyledProgressBarWrapper","styled","div","withConfig","displayName","componentId","width","toLength","size","rounding","round3","transition","getTransitionsCSS","interpolation","StyledProgressBarActive","value"],"mappings":";;;;;;AAcA,MAAMA,mBAAoD,GAAG;AAC3D,EAAA,CAACC,iCAAe,CAACC,CAAC,GAAG,CAAC;EACtB,CAACD,iCAAe,CAACE,CAAC,GAAG,CAAA;AACvB,CAAC,CAAA;AAOD,MAAMC,4BAA4B,GAAGA,CAAC;EACpCC,UAAU;AACVC,EAAAA,OAAAA;AACwB,CAAC,KAAK;AAC9B,EAAA,QAAQA,OAAO;IACb,KAAKC,oCAAkB,CAACC,KAAK,CAAA;IAC7B,KAAKD,oCAAkB,CAACE,QAAQ;AAAE,MAAA;AAChC,QAAA,OA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gressBarVariant["Green"] = "green";
|
|
10
|
+
ProgressBarVariant["GreenAlt"] = "green-alt";
|
|
10
11
|
ProgressBarVariant["Monochrome"] = "monochrome";
|
|
11
12
|
return ProgressBarVariant;
|
|
12
13
|
}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.types.js","sources":["../../../../src/components/ProgressBar/ProgressBar.types.ts"],"sourcesContent":["import type {\n AdditionalStylableProps,\n AdditionalTestIdProps,\n BezierComponentProps,\n SizeProps,\n VariantProps,\n} from '~/src/types/ComponentProps'\n\nexport enum ProgressBarSize {\n M = 'm',\n S = 's',\n}\n\nexport enum ProgressBarVariant {\n Green = 'green',\n Monochrome = 'monochrome',\n}\n\ninterface ProgressBarOptions {\n /**\n * CSS Width of total progress bar.\n * If given value is number or doesn't end with proper unit, `defaultUnit` is suffixed to given value.\n *\n * @see src/utils/styleUtils.ts\n * @default 36\n */\n width?: number | string\n\n /**\n * Progress value in floating point number (between 0 and 1, inclusive).\n *\n * @default 0\n */\n value?: number\n}\n\nexport default interface ProgressBarProps extends\n BezierComponentProps,\n SizeProps<ProgressBarSize>,\n VariantProps<ProgressBarVariant>,\n AdditionalStylableProps<'active'>,\n AdditionalTestIdProps<'active'>,\n ProgressBarOptions {}\n"],"names":["ProgressBarSize","ProgressBarVariant"],"mappings":";;AAQYA,IAAAA,eAAe,0BAAfA,eAAe,EAAA;EAAfA,eAAe,CAAA,GAAA,CAAA,GAAA,GAAA,CAAA;EAAfA,eAAe,CAAA,GAAA,CAAA,GAAA,GAAA,CAAA;AAAA,EAAA,OAAfA,eAAe,CAAA;AAAA,CAAA,CAAA,EAAA,EAAA;AAKfC,IAAAA,kBAAkB,0BAAlBA,kBAAkB,EAAA;EAAlBA,kBAAkB,CAAA,OAAA,CAAA,GAAA,OAAA,CAAA;EAAlBA,kBAAkB,CAAA,YAAA,CAAA,GAAA,YAAA,CAAA;AAAA,EAAA,OAAlBA,kBAAkB,CAAA;AAAA,CAAA,CAAA,EAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"ProgressBar.types.js","sources":["../../../../src/components/ProgressBar/ProgressBar.types.ts"],"sourcesContent":["import type {\n AdditionalStylableProps,\n AdditionalTestIdProps,\n BezierComponentProps,\n SizeProps,\n VariantProps,\n} from '~/src/types/ComponentProps'\n\nexport enum ProgressBarSize {\n M = 'm',\n S = 's',\n}\n\nexport enum ProgressBarVariant {\n Green = 'green',\n GreenAlt = 'green-alt',\n Monochrome = 'monochrome',\n}\n\ninterface ProgressBarOptions {\n /**\n * CSS Width of total progress bar.\n * If given value is number or doesn't end with proper unit, `defaultUnit` is suffixed to given value.\n *\n * @see src/utils/styleUtils.ts\n * @default 36\n */\n width?: number | string\n\n /**\n * Progress value in floating point number (between 0 and 1, inclusive).\n *\n * @default 0\n */\n value?: number\n}\n\nexport default interface ProgressBarProps extends\n BezierComponentProps,\n SizeProps<ProgressBarSize>,\n VariantProps<ProgressBarVariant>,\n AdditionalStylableProps<'active'>,\n AdditionalTestIdProps<'active'>,\n ProgressBarOptions {}\n"],"names":["ProgressBarSize","ProgressBarVariant"],"mappings":";;AAQYA,IAAAA,eAAe,0BAAfA,eAAe,EAAA;EAAfA,eAAe,CAAA,GAAA,CAAA,GAAA,GAAA,CAAA;EAAfA,eAAe,CAAA,GAAA,CAAA,GAAA,GAAA,CAAA;AAAA,EAAA,OAAfA,eAAe,CAAA;AAAA,CAAA,CAAA,EAAA,EAAA;AAKfC,IAAAA,kBAAkB,0BAAlBA,kBAAkB,EAAA;EAAlBA,kBAAkB,CAAA,OAAA,CAAA,GAAA,OAAA,CAAA;EAAlBA,kBAAkB,CAAA,UAAA,CAAA,GAAA,WAAA,CAAA;EAAlBA,kBAAkB,CAAA,YAAA,CAAA,GAAA,YAAA,CAAA;AAAA,EAAA,OAAlBA,kBAAkB,CAAA;AAAA,CAAA,CAAA,EAAA;;;;;"}
|
|
@@ -22,6 +22,7 @@ const DarkTheme = {
|
|
|
22
22
|
'bg-black-light': index.Palette.white_12,
|
|
23
23
|
'bg-black-lighter': index.Palette.white_8,
|
|
24
24
|
'bg-black-lightest': index.Palette.white_5,
|
|
25
|
+
'bg-grey-darkest': index.Palette.white,
|
|
25
26
|
'bg-grey-dark': index.Palette.grey500,
|
|
26
27
|
'bg-grey-dim-lightest': index.Palette.grey850_80,
|
|
27
28
|
'bg-grey-light': index.Palette.grey700,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DarkTheme.js","sources":["../../../../../../src/foundation/Colors/Theme/presets/DarkTheme.ts"],"sourcesContent":["import { Palette } from '~/src/foundation/Colors/Palette'\nimport { type ThemeType } from '~/src/foundation/Colors/Theme'\n\nconst DarkTheme: ThemeType = {\n // Elevation Background\n 'bg-white-high': Palette.grey700,\n 'bg-white-normal': Palette.grey900,\n 'bg-white-low': Palette.grey800,\n\n // Layout Background\n 'bg-gnb': Palette.grey700_80,\n 'bg-navi': Palette.grey800_80,\n 'bg-header': Palette.grey800,\n 'bg-header-float': Palette.grey800_80,\n 'bg-lounge': Palette.grey800_90,\n\n // Mono Background\n 'bg-black-darkest': Palette.white_60,\n 'bg-black-darker': Palette.white_40,\n 'bg-black-dark': Palette.white_20,\n 'bg-black-light': Palette.white_12,\n 'bg-black-lighter': Palette.white_8,\n 'bg-black-lightest': Palette.white_5,\n\n 'bg-grey-dark': Palette.grey500,\n 'bg-grey-dim-lightest': Palette.grey850_80,\n 'bg-grey-light': Palette.grey700,\n 'bg-grey-lighter': Palette.grey800,\n 'bg-grey-lightest': Palette.grey850,\n\n 'bg-white-dim-dark': Palette.black_60,\n 'bg-white-dim-light': Palette.black_20,\n\n // Colorful text and background\n 'bgtxt-blue-dark': Palette.blue400,\n 'bgtxt-blue-normal': Palette.blue300,\n 'bgtxt-blue-light': Palette.blue300_40,\n 'bgtxt-blue-lighter': Palette.blue300_30,\n 'bgtxt-blue-lightest': Palette.blue300_20,\n\n 'bgtxt-cobalt-dark': Palette.cobalt400,\n 'bgtxt-cobalt-normal': Palette.cobalt300,\n 'bgtxt-cobalt-light': Palette.cobalt300_40,\n 'bgtxt-cobalt-lighter': Palette.cobalt300_30,\n 'bgtxt-cobalt-lightest': Palette.cobalt300_20,\n\n 'bgtxt-teal-dark': Palette.teal400,\n 'bgtxt-teal-normal': Palette.teal300,\n 'bgtxt-teal-light': Palette.teal300_40,\n 'bgtxt-teal-lighter': Palette.teal300_30,\n 'bgtxt-teal-lightest': Palette.teal300_20,\n\n 'bgtxt-green-dark': Palette.green400,\n 'bgtxt-green-normal': Palette.green300,\n 'bgtxt-green-light': Palette.green300_40,\n 'bgtxt-green-lighter': Palette.green300_30,\n 'bgtxt-green-lightest': Palette.green300_20,\n\n 'bgtxt-olive-dark': Palette.olive400,\n 'bgtxt-olive-normal': Palette.olive300,\n 'bgtxt-olive-light': Palette.olive300_40,\n 'bgtxt-olive-lighter': Palette.olive300_30,\n 'bgtxt-olive-lightest': Palette.olive300_20,\n\n 'bgtxt-yellow-dark': Palette.yellow400,\n 'bgtxt-yellow-normal': Palette.yellow300,\n 'bgtxt-yellow-light': Palette.yellow300_40,\n 'bgtxt-yellow-lighter': Palette.yellow300_30,\n 'bgtxt-yellow-lightest': Palette.yellow300_20,\n\n 'bgtxt-orange-dark': Palette.orange400,\n 'bgtxt-orange-normal': Palette.orange300,\n 'bgtxt-orange-light': Palette.orange300_40,\n 'bgtxt-orange-lighter': Palette.orange300_30,\n 'bgtxt-orange-lightest': Palette.orange300_20,\n\n 'bgtxt-red-dark': Palette.red400,\n 'bgtxt-red-normal': Palette.red300,\n 'bgtxt-red-light': Palette.red300_40,\n 'bgtxt-red-lighter': Palette.red300_30,\n 'bgtxt-red-lightest': Palette.red300_20,\n\n 'bgtxt-pink-dark': Palette.pink400,\n 'bgtxt-pink-normal': Palette.pink300,\n 'bgtxt-pink-light': Palette.pink300_40,\n 'bgtxt-pink-lighter': Palette.pink300_30,\n 'bgtxt-pink-lightest': Palette.pink300_20,\n\n 'bgtxt-purple-dark': Palette.purple400,\n 'bgtxt-purple-normal': Palette.purple300,\n 'bgtxt-purple-light': Palette.purple300_40,\n 'bgtxt-purple-lighter': Palette.purple300_30,\n 'bgtxt-purple-lightest': Palette.purple300_20,\n\n 'bgtxt-navy-dark': Palette.navy400,\n 'bgtxt-navy-normal': Palette.navy300,\n 'bgtxt-navy-light': Palette.navy300_40,\n 'bgtxt-navy-lighter': Palette.navy300_30,\n 'bgtxt-navy-lightest': Palette.navy300_20,\n\n // Text\n 'txt-black-pure': Palette.white,\n 'txt-black-darkest': Palette.white_80,\n 'txt-black-darker': Palette.white_60,\n 'txt-black-dark': Palette.white_40,\n 'txt-white-normal': Palette.grey900,\n\n // Mono-absolute text and background\n 'bgtxt-absolute-black-dark': Palette.black,\n 'bgtxt-absolute-black-normal': Palette.black_85,\n 'bgtxt-absolute-black-light': Palette.black_60,\n 'bgtxt-absolute-black-lighter': Palette.black_40,\n 'bgtxt-absolute-black-lightest': Palette.black_20,\n\n 'bgtxt-absolute-white-dark': Palette.white,\n 'bgtxt-absolute-white-normal': Palette.white_90,\n 'bgtxt-absolute-white-light': Palette.white_60,\n 'bgtxt-absolute-white-lighter': Palette.white_40,\n 'bgtxt-absolute-white-lightest': Palette.white_20,\n\n // Border\n 'bdr-black-dark': Palette.white_20,\n 'bdr-black-light': Palette.white_12,\n 'bdr-grey-light': Palette.grey700,\n 'bdr-white': Palette.grey700,\n\n // Shadow\n 'shdw-xlarge': Palette.black_60,\n 'shdw-large': Palette.black_40,\n 'shdw-medium': Palette.black_20,\n 'shdw-small': Palette.black_15,\n 'shdw-base': Palette.black_8,\n 'shdw-inner-base': Palette.white_8,\n}\n\nexport default DarkTheme\n"],"names":["DarkTheme","Palette","grey700","grey900","grey800","grey700_80","grey800_80","grey800_90","white_60","white_40","white_20","white_12","white_8","white_5","grey500","grey850_80","grey850","black_60","black_20","blue400","blue300","blue300_40","blue300_30","blue300_20","cobalt400","cobalt300","cobalt300_40","cobalt300_30","cobalt300_20","teal400","teal300","teal300_40","teal300_30","teal300_20","green400","green300","green300_40","green300_30","green300_20","olive400","olive300","olive300_40","olive300_30","olive300_20","yellow400","yellow300","yellow300_40","yellow300_30","yellow300_20","orange400","orange300","orange300_40","orange300_30","orange300_20","red400","red300","red300_40","red300_30","red300_20","pink400","pink300","pink300_40","pink300_30","pink300_20","purple400","purple300","purple300_40","purple300_30","purple300_20","navy400","navy300","navy300_40","navy300_30","navy300_20","
|
|
1
|
+
{"version":3,"file":"DarkTheme.js","sources":["../../../../../../src/foundation/Colors/Theme/presets/DarkTheme.ts"],"sourcesContent":["import { Palette } from '~/src/foundation/Colors/Palette'\nimport { type ThemeType } from '~/src/foundation/Colors/Theme'\n\nconst DarkTheme: ThemeType = {\n // Elevation Background\n 'bg-white-high': Palette.grey700,\n 'bg-white-normal': Palette.grey900,\n 'bg-white-low': Palette.grey800,\n\n // Layout Background\n 'bg-gnb': Palette.grey700_80,\n 'bg-navi': Palette.grey800_80,\n 'bg-header': Palette.grey800,\n 'bg-header-float': Palette.grey800_80,\n 'bg-lounge': Palette.grey800_90,\n\n // Mono Background\n 'bg-black-darkest': Palette.white_60,\n 'bg-black-darker': Palette.white_40,\n 'bg-black-dark': Palette.white_20,\n 'bg-black-light': Palette.white_12,\n 'bg-black-lighter': Palette.white_8,\n 'bg-black-lightest': Palette.white_5,\n\n 'bg-grey-darkest': Palette.white,\n 'bg-grey-dark': Palette.grey500,\n 'bg-grey-dim-lightest': Palette.grey850_80,\n 'bg-grey-light': Palette.grey700,\n 'bg-grey-lighter': Palette.grey800,\n 'bg-grey-lightest': Palette.grey850,\n\n 'bg-white-dim-dark': Palette.black_60,\n 'bg-white-dim-light': Palette.black_20,\n\n // Colorful text and background\n 'bgtxt-blue-dark': Palette.blue400,\n 'bgtxt-blue-normal': Palette.blue300,\n 'bgtxt-blue-light': Palette.blue300_40,\n 'bgtxt-blue-lighter': Palette.blue300_30,\n 'bgtxt-blue-lightest': Palette.blue300_20,\n\n 'bgtxt-cobalt-dark': Palette.cobalt400,\n 'bgtxt-cobalt-normal': Palette.cobalt300,\n 'bgtxt-cobalt-light': Palette.cobalt300_40,\n 'bgtxt-cobalt-lighter': Palette.cobalt300_30,\n 'bgtxt-cobalt-lightest': Palette.cobalt300_20,\n\n 'bgtxt-teal-dark': Palette.teal400,\n 'bgtxt-teal-normal': Palette.teal300,\n 'bgtxt-teal-light': Palette.teal300_40,\n 'bgtxt-teal-lighter': Palette.teal300_30,\n 'bgtxt-teal-lightest': Palette.teal300_20,\n\n 'bgtxt-green-dark': Palette.green400,\n 'bgtxt-green-normal': Palette.green300,\n 'bgtxt-green-light': Palette.green300_40,\n 'bgtxt-green-lighter': Palette.green300_30,\n 'bgtxt-green-lightest': Palette.green300_20,\n\n 'bgtxt-olive-dark': Palette.olive400,\n 'bgtxt-olive-normal': Palette.olive300,\n 'bgtxt-olive-light': Palette.olive300_40,\n 'bgtxt-olive-lighter': Palette.olive300_30,\n 'bgtxt-olive-lightest': Palette.olive300_20,\n\n 'bgtxt-yellow-dark': Palette.yellow400,\n 'bgtxt-yellow-normal': Palette.yellow300,\n 'bgtxt-yellow-light': Palette.yellow300_40,\n 'bgtxt-yellow-lighter': Palette.yellow300_30,\n 'bgtxt-yellow-lightest': Palette.yellow300_20,\n\n 'bgtxt-orange-dark': Palette.orange400,\n 'bgtxt-orange-normal': Palette.orange300,\n 'bgtxt-orange-light': Palette.orange300_40,\n 'bgtxt-orange-lighter': Palette.orange300_30,\n 'bgtxt-orange-lightest': Palette.orange300_20,\n\n 'bgtxt-red-dark': Palette.red400,\n 'bgtxt-red-normal': Palette.red300,\n 'bgtxt-red-light': Palette.red300_40,\n 'bgtxt-red-lighter': Palette.red300_30,\n 'bgtxt-red-lightest': Palette.red300_20,\n\n 'bgtxt-pink-dark': Palette.pink400,\n 'bgtxt-pink-normal': Palette.pink300,\n 'bgtxt-pink-light': Palette.pink300_40,\n 'bgtxt-pink-lighter': Palette.pink300_30,\n 'bgtxt-pink-lightest': Palette.pink300_20,\n\n 'bgtxt-purple-dark': Palette.purple400,\n 'bgtxt-purple-normal': Palette.purple300,\n 'bgtxt-purple-light': Palette.purple300_40,\n 'bgtxt-purple-lighter': Palette.purple300_30,\n 'bgtxt-purple-lightest': Palette.purple300_20,\n\n 'bgtxt-navy-dark': Palette.navy400,\n 'bgtxt-navy-normal': Palette.navy300,\n 'bgtxt-navy-light': Palette.navy300_40,\n 'bgtxt-navy-lighter': Palette.navy300_30,\n 'bgtxt-navy-lightest': Palette.navy300_20,\n\n // Text\n 'txt-black-pure': Palette.white,\n 'txt-black-darkest': Palette.white_80,\n 'txt-black-darker': Palette.white_60,\n 'txt-black-dark': Palette.white_40,\n 'txt-white-normal': Palette.grey900,\n\n // Mono-absolute text and background\n 'bgtxt-absolute-black-dark': Palette.black,\n 'bgtxt-absolute-black-normal': Palette.black_85,\n 'bgtxt-absolute-black-light': Palette.black_60,\n 'bgtxt-absolute-black-lighter': Palette.black_40,\n 'bgtxt-absolute-black-lightest': Palette.black_20,\n\n 'bgtxt-absolute-white-dark': Palette.white,\n 'bgtxt-absolute-white-normal': Palette.white_90,\n 'bgtxt-absolute-white-light': Palette.white_60,\n 'bgtxt-absolute-white-lighter': Palette.white_40,\n 'bgtxt-absolute-white-lightest': Palette.white_20,\n\n // Border\n 'bdr-black-dark': Palette.white_20,\n 'bdr-black-light': Palette.white_12,\n 'bdr-grey-light': Palette.grey700,\n 'bdr-white': Palette.grey700,\n\n // Shadow\n 'shdw-xlarge': Palette.black_60,\n 'shdw-large': Palette.black_40,\n 'shdw-medium': Palette.black_20,\n 'shdw-small': Palette.black_15,\n 'shdw-base': Palette.black_8,\n 'shdw-inner-base': Palette.white_8,\n}\n\nexport default DarkTheme\n"],"names":["DarkTheme","Palette","grey700","grey900","grey800","grey700_80","grey800_80","grey800_90","white_60","white_40","white_20","white_12","white_8","white_5","white","grey500","grey850_80","grey850","black_60","black_20","blue400","blue300","blue300_40","blue300_30","blue300_20","cobalt400","cobalt300","cobalt300_40","cobalt300_30","cobalt300_20","teal400","teal300","teal300_40","teal300_30","teal300_20","green400","green300","green300_40","green300_30","green300_20","olive400","olive300","olive300_40","olive300_30","olive300_20","yellow400","yellow300","yellow300_40","yellow300_30","yellow300_20","orange400","orange300","orange300_40","orange300_30","orange300_20","red400","red300","red300_40","red300_30","red300_20","pink400","pink300","pink300_40","pink300_30","pink300_20","purple400","purple300","purple300_40","purple300_30","purple300_20","navy400","navy300","navy300_40","navy300_30","navy300_20","white_80","black","black_85","black_40","white_90","black_15","black_8"],"mappings":";;;;;;AAGA,MAAMA,SAAoB,GAAG;AAC3B;EACA,eAAe,EAAEC,aAAO,CAACC,OAAO;EAChC,iBAAiB,EAAED,aAAO,CAACE,OAAO;EAClC,cAAc,EAAEF,aAAO,CAACG,OAAO;AAE/B;EACA,QAAQ,EAAEH,aAAO,CAACI,UAAU;EAC5B,SAAS,EAAEJ,aAAO,CAACK,UAAU;EAC7B,WAAW,EAAEL,aAAO,CAACG,OAAO;EAC5B,iBAAiB,EAAEH,aAAO,CAACK,UAAU;EACrC,WAAW,EAAEL,aAAO,CAACM,UAAU;AAE/B;EACA,kBAAkB,EAAEN,aAAO,CAACO,QAAQ;EACpC,iBAAiB,EAAEP,aAAO,CAACQ,QAAQ;EACnC,eAAe,EAAER,aAAO,CAACS,QAAQ;EACjC,gBAAgB,EAAET,aAAO,CAACU,QAAQ;EAClC,kBAAkB,EAAEV,aAAO,CAACW,OAAO;EACnC,mBAAmB,EAAEX,aAAO,CAACY,OAAO;EAEpC,iBAAiB,EAAEZ,aAAO,CAACa,KAAK;EAChC,cAAc,EAAEb,aAAO,CAACc,OAAO;EAC/B,sBAAsB,EAAEd,aAAO,CAACe,UAAU;EAC1C,eAAe,EAAEf,aAAO,CAACC,OAAO;EAChC,iBAAiB,EAAED,aAAO,CAACG,OAAO;EAClC,kBAAkB,EAAEH,aAAO,CAACgB,OAAO;EAEnC,mBAAmB,EAAEhB,aAAO,CAACiB,QAAQ;EACrC,oBAAoB,EAAEjB,aAAO,CAACkB,QAAQ;AAEtC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E,aAAO,CAACO,QAAQ;EACpC,gBAAgB,EAAEP,aAAO,CAACQ,QAAQ;EAClC,kBAAkB,EAAER,aAAO,CAACE,OAAO;AAEnC;EACA,2BAA2B,EAAEF,aAAO,CAAC2E,KAAK;EAC1C,6BAA6B,EAAE3E,aAAO,CAAC4E,QAAQ;EAC/C,4BAA4B,EAAE5E,aAAO,CAACiB,QAAQ;EAC9C,8BAA8B,EAAEjB,aAAO,CAAC6E,QAAQ;EAChD,+BAA+B,EAAE7E,aAAO,CAACkB,QAAQ;EAEjD,2BAA2B,EAAElB,aAAO,CAACa,KAAK;EAC1C,6BAA6B,EAAEb,aAAO,CAAC8E,QAAQ;EAC/C,4BAA4B,EAAE9E,aAAO,CAACO,QAAQ;EAC9C,8BAA8B,EAAEP,aAAO,CAACQ,QAAQ;EAChD,+BAA+B,EAAER,aAAO,CAACS,QAAQ;AAEjD;EACA,gBAAgB,EAAET,aAAO,CAACS,QAAQ;EAClC,iBAAiB,EAAET,aAAO,CAACU,QAAQ;EACnC,gBAAgB,EAAEV,aAAO,CAACC,OAAO;EACjC,WAAW,EAAED,aAAO,CAACC,OAAO;AAE5B;EACA,aAAa,EAAED,aAAO,CAACiB,QAAQ;EAC/B,YAAY,EAAEjB,aAAO,CAAC6E,QAAQ;EAC9B,aAAa,EAAE7E,aAAO,CAACkB,QAAQ;EAC/B,YAAY,EAAElB,aAAO,CAAC+E,QAAQ;EAC9B,WAAW,EAAE/E,aAAO,CAACgF,OAAO;EAC5B,iBAAiB,EAAEhF,aAAO,CAACW,OAAAA;AAC7B,CAAC,CAAA;AAED,kBAAeZ,SAAS;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeVars.js","sources":["../../../src/foundation/ThemeVars.ts"],"sourcesContent":["import { type AnyStyledComponent } from 'styled-components'\n\nimport { isEmpty } from '~/src/utils/typeUtils'\n\nimport { createGlobalStyle } from './FoundationStyledComponent'\n\ntype ThemeRecord = Record<string, string>\n\nexport interface ThemeVarsAdditionalType {\n scope?: AnyStyledComponent\n}\n\nfunction generateCSSVar(theme?: ThemeRecord, prefix?: string) {\n if (!theme) { return undefined }\n const prefixString = !isEmpty(prefix) ? `${prefix}-` : ''\n return Object.entries(theme).reduce((varObj, [key, color]) => ({\n ...varObj,\n [`--${prefixString}${key}`]: color,\n }), {} as ThemeRecord)\n}\n\nexport const ThemeVars = createGlobalStyle<ThemeVarsAdditionalType>`\n ${({ scope }) => scope ?? ':root'} {\n ${({ foundation }) => generateCSSVar(foundation?.theme)}\n ${({ foundation }) => generateCSSVar(foundation?.subTheme, 'inverted')}\n }\n`\n"],"names":["generateCSSVar","theme","prefix","undefined","prefixString","isEmpty","Object","entries","reduce","varObj","key","color","ThemeVars","createGlobalStyle","scope","foundation","subTheme"],"mappings":";;;;;AAYA,SAASA,cAAcA,CAACC,KAAmB,EAAEC,MAAe,EAAE;EAC5D,IAAI,CAACD,KAAK,EAAE;AAAE,IAAA,OAAOE,SAAS,CAAA;AAAC,GAAA;AAC/B,EAAA,MAAMC,YAAY,GAAG,CAACC,iBAAO,CAACH,MAAM,CAAC,GAAI,CAAEA,EAAAA,MAAO,CAAE,CAAA,CAAA,GAAG,EAAE,CAAA;AACzD,EAAA,OAAOI,MAAM,CAACC,OAAO,CAACN,KAAK,CAAC,CAACO,MAAM,CAAC,CAACC,MAAM,EAAE,CAACC,GAAG,EAAEC,KAAK,CAAC,MAAM;AAC7D,IAAA,GAAGF,MAAM;AACT,IAAA,CAAE,CAAIL,EAAAA,EAAAA,YAAa,CAAEM,EAAAA,GAAI,EAAC,GAAGC,KAAAA;AAC/B,GAAC,CAAC,EAAE,EAAiB,CAAC,CAAA;AACxB,CAAA;AAEO,MAAMC,SAAS,GAAGC,2CAA2C,CAAA;AACpE,EAAA,EAAI,CAAC;AAAEC,EAAAA,KAAAA;AAAM,CAAC,KAAKA,KAAK,IAAI,
|
|
1
|
+
{"version":3,"file":"ThemeVars.js","sources":["../../../src/foundation/ThemeVars.ts"],"sourcesContent":["import { type AnyStyledComponent } from 'styled-components'\n\nimport { isEmpty } from '~/src/utils/typeUtils'\n\nimport { createGlobalStyle } from './FoundationStyledComponent'\n\ntype ThemeRecord = Record<string, string>\n\nexport interface ThemeVarsAdditionalType {\n scope?: AnyStyledComponent | string\n}\n\nfunction generateCSSVar(theme?: ThemeRecord, prefix?: string) {\n if (!theme) { return undefined }\n const prefixString = !isEmpty(prefix) ? `${prefix}-` : ''\n return Object.entries(theme).reduce((varObj, [key, color]) => ({\n ...varObj,\n [`--${prefixString}${key}`]: color,\n }), {} as ThemeRecord)\n}\n\nexport const ThemeVars = createGlobalStyle<ThemeVarsAdditionalType>`\n ${({ scope }) => scope ?? ':root, :host'} {\n ${({ foundation }) => generateCSSVar(foundation?.theme)}\n ${({ foundation }) => generateCSSVar(foundation?.subTheme, 'inverted')}\n }\n`\n"],"names":["generateCSSVar","theme","prefix","undefined","prefixString","isEmpty","Object","entries","reduce","varObj","key","color","ThemeVars","createGlobalStyle","scope","foundation","subTheme"],"mappings":";;;;;AAYA,SAASA,cAAcA,CAACC,KAAmB,EAAEC,MAAe,EAAE;EAC5D,IAAI,CAACD,KAAK,EAAE;AAAE,IAAA,OAAOE,SAAS,CAAA;AAAC,GAAA;AAC/B,EAAA,MAAMC,YAAY,GAAG,CAACC,iBAAO,CAACH,MAAM,CAAC,GAAI,CAAEA,EAAAA,MAAO,CAAE,CAAA,CAAA,GAAG,EAAE,CAAA;AACzD,EAAA,OAAOI,MAAM,CAACC,OAAO,CAACN,KAAK,CAAC,CAACO,MAAM,CAAC,CAACC,MAAM,EAAE,CAACC,GAAG,EAAEC,KAAK,CAAC,MAAM;AAC7D,IAAA,GAAGF,MAAM;AACT,IAAA,CAAE,CAAIL,EAAAA,EAAAA,YAAa,CAAEM,EAAAA,GAAI,EAAC,GAAGC,KAAAA;AAC/B,GAAC,CAAC,EAAE,EAAiB,CAAC,CAAA;AACxB,CAAA;AAEO,MAAMC,SAAS,GAAGC,2CAA2C,CAAA;AACpE,EAAA,EAAI,CAAC;AAAEC,EAAAA,KAAAA;AAAM,CAAC,KAAKA,KAAK,IAAI,cAAe,CAAA;AAC3C,IAAA,EAAM,CAAC;AAAEC,EAAAA,UAAAA;AAAW,CAAC,KAAKf,cAAc,CAACe,UAAU,EAAEd,KAAK,CAAE,CAAA;AAC5D,IAAA,EAAM,CAAC;AAAEc,EAAAA,UAAAA;AAAW,CAAC,KAAKf,cAAc,CAACe,UAAU,EAAEC,QAAQ,EAAE,UAAU,CAAE,CAAA;AAC3E;AACA;;;;"}
|
|
@@ -170,7 +170,7 @@ const MONOCHROME_LIGHT_SEMANTIC_NAMES = {
|
|
|
170
170
|
};
|
|
171
171
|
const MONOCHROME_DARK_SEMANTIC_NAMES = {
|
|
172
172
|
[ButtonStyleVariant.Primary]: {
|
|
173
|
-
color: '
|
|
173
|
+
color: 'txt-white-normal',
|
|
174
174
|
backgroundColor: 'bg-grey-darkest'
|
|
175
175
|
},
|
|
176
176
|
[ButtonStyleVariant.Secondary]: {
|