@liner-fe/prism 3.4.6 → 3.4.7
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/index.css +333 -0
- package/lib/index.d.ts +202 -2
- package/lib/index.js +299 -0
- package/package.json +2 -1
package/lib/index.css
CHANGED
|
@@ -1917,3 +1917,336 @@
|
|
|
1917
1917
|
._border-accent-pink_b57yu_124 {
|
|
1918
1918
|
border: 1px solid var(--accent-label-pink);
|
|
1919
1919
|
}
|
|
1920
|
+
|
|
1921
|
+
/* esbuild-sass-plugin:css-chunk:src/components/AlertDialog/style.module.scss */
|
|
1922
|
+
@keyframes _overlayShow_6ipeu_1 {
|
|
1923
|
+
from {
|
|
1924
|
+
opacity: 0;
|
|
1925
|
+
}
|
|
1926
|
+
to {
|
|
1927
|
+
opacity: 1;
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
@keyframes _contentShow_6ipeu_1 {
|
|
1931
|
+
from {
|
|
1932
|
+
opacity: 0;
|
|
1933
|
+
transform: translate(-50%, -48%) scale(0.96);
|
|
1934
|
+
}
|
|
1935
|
+
to {
|
|
1936
|
+
opacity: 1;
|
|
1937
|
+
transform: translate(-50%, -50%) scale(1);
|
|
1938
|
+
}
|
|
1939
|
+
}
|
|
1940
|
+
._overlay_6ipeu_20 {
|
|
1941
|
+
position: fixed;
|
|
1942
|
+
inset: 0;
|
|
1943
|
+
background: var(--cover-dim-page);
|
|
1944
|
+
z-index: 1000;
|
|
1945
|
+
}
|
|
1946
|
+
._overlay_6ipeu_20[data-state=open] {
|
|
1947
|
+
animation: _overlayShow_6ipeu_1 150ms ease-out;
|
|
1948
|
+
}
|
|
1949
|
+
._content_6ipeu_30 {
|
|
1950
|
+
position: fixed;
|
|
1951
|
+
top: 50%;
|
|
1952
|
+
left: 50%;
|
|
1953
|
+
transform: translate(-50%, -50%);
|
|
1954
|
+
z-index: 1001;
|
|
1955
|
+
display: flex;
|
|
1956
|
+
flex-direction: column;
|
|
1957
|
+
gap: var(--lp-sys-gap-positive-500);
|
|
1958
|
+
width: 400px;
|
|
1959
|
+
max-width: calc(100% - 32px);
|
|
1960
|
+
box-sizing: border-box;
|
|
1961
|
+
padding: var(--lp-sys-padding-component-600);
|
|
1962
|
+
background: var(--neutral-container-variation-lowest);
|
|
1963
|
+
border-radius: var(--lp-sys-radius-xl);
|
|
1964
|
+
box-shadow:
|
|
1965
|
+
0px 0px 1px 0px rgba(0, 0, 0, 0.06),
|
|
1966
|
+
0px 2px 12px 0px rgba(0, 0, 0, 0.08),
|
|
1967
|
+
0px 1px 8px 0px rgba(0, 0, 0, 0.06);
|
|
1968
|
+
}
|
|
1969
|
+
._content_6ipeu_30:focus {
|
|
1970
|
+
outline: none;
|
|
1971
|
+
}
|
|
1972
|
+
._content_6ipeu_30[data-state=open] {
|
|
1973
|
+
animation: _contentShow_6ipeu_1 150ms ease-out;
|
|
1974
|
+
}
|
|
1975
|
+
._contents_6ipeu_55 {
|
|
1976
|
+
display: flex;
|
|
1977
|
+
flex-direction: column;
|
|
1978
|
+
gap: var(--lp-sys-padding-component-200);
|
|
1979
|
+
padding-top: var(--lp-sys-padding-component-100);
|
|
1980
|
+
padding-bottom: var(--lp-sys-padding-component-100);
|
|
1981
|
+
width: 100%;
|
|
1982
|
+
color: var(--neutral-label-primary);
|
|
1983
|
+
}
|
|
1984
|
+
._title_6ipeu_65 {
|
|
1985
|
+
margin: 0;
|
|
1986
|
+
word-break: break-word;
|
|
1987
|
+
display: -webkit-box;
|
|
1988
|
+
-webkit-box-orient: vertical;
|
|
1989
|
+
-webkit-line-clamp: 2;
|
|
1990
|
+
overflow: hidden;
|
|
1991
|
+
}
|
|
1992
|
+
._description_6ipeu_75 {
|
|
1993
|
+
margin: 0;
|
|
1994
|
+
word-break: break-word;
|
|
1995
|
+
display: -webkit-box;
|
|
1996
|
+
-webkit-box-orient: vertical;
|
|
1997
|
+
-webkit-line-clamp: 2;
|
|
1998
|
+
overflow: hidden;
|
|
1999
|
+
}
|
|
2000
|
+
._actions_6ipeu_85 {
|
|
2001
|
+
display: flex;
|
|
2002
|
+
gap: var(--lp-sys-padding-component-200);
|
|
2003
|
+
align-items: center;
|
|
2004
|
+
justify-content: flex-end;
|
|
2005
|
+
width: 100%;
|
|
2006
|
+
}
|
|
2007
|
+
@media (max-width: 600px) {
|
|
2008
|
+
._content_6ipeu_30 {
|
|
2009
|
+
gap: var(--lp-sys-gap-positive-600);
|
|
2010
|
+
}
|
|
2011
|
+
._contents_6ipeu_55 {
|
|
2012
|
+
text-align: center;
|
|
2013
|
+
}
|
|
2014
|
+
._contents_6ipeu_55 ._description_6ipeu_75 {
|
|
2015
|
+
font-size: var(--lp-pri-font-size-15);
|
|
2016
|
+
line-height: var(--lp-pri-font-lineheight-130);
|
|
2017
|
+
}
|
|
2018
|
+
._actions_6ipeu_85 :where(button) {
|
|
2019
|
+
flex: 1 1 0;
|
|
2020
|
+
width: 100%;
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
|
|
2024
|
+
/* esbuild-sass-plugin:css-chunk:src/components/Dialog/style.module.scss */
|
|
2025
|
+
@keyframes _overlayShow_qs97t_1 {
|
|
2026
|
+
from {
|
|
2027
|
+
opacity: 0;
|
|
2028
|
+
}
|
|
2029
|
+
to {
|
|
2030
|
+
opacity: 1;
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
@keyframes _contentShow_qs97t_1 {
|
|
2034
|
+
from {
|
|
2035
|
+
opacity: 0;
|
|
2036
|
+
transform: translate(-50%, -48%) scale(0.96);
|
|
2037
|
+
}
|
|
2038
|
+
to {
|
|
2039
|
+
opacity: 1;
|
|
2040
|
+
transform: translate(-50%, -50%) scale(1);
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
._overlay_qs97t_20 {
|
|
2044
|
+
position: fixed;
|
|
2045
|
+
inset: 0;
|
|
2046
|
+
background: var(--cover-dim-page);
|
|
2047
|
+
z-index: 1000;
|
|
2048
|
+
}
|
|
2049
|
+
._overlay_qs97t_20[data-state=open] {
|
|
2050
|
+
animation: _overlayShow_qs97t_1 150ms ease-out;
|
|
2051
|
+
}
|
|
2052
|
+
._content_qs97t_30 {
|
|
2053
|
+
position: fixed;
|
|
2054
|
+
top: 50%;
|
|
2055
|
+
left: 50%;
|
|
2056
|
+
transform: translate(-50%, -50%);
|
|
2057
|
+
z-index: 1001;
|
|
2058
|
+
display: flex;
|
|
2059
|
+
flex-direction: column;
|
|
2060
|
+
width: 400px;
|
|
2061
|
+
max-width: calc(100% - 32px);
|
|
2062
|
+
box-sizing: border-box;
|
|
2063
|
+
overflow: hidden;
|
|
2064
|
+
background: var(--neutral-container-variation-lowest);
|
|
2065
|
+
border-radius: var(--lp-sys-radius-l);
|
|
2066
|
+
box-shadow:
|
|
2067
|
+
0px 0px 1px 0px rgba(0, 0, 0, 0.06),
|
|
2068
|
+
0px 2px 12px 0px rgba(0, 0, 0, 0.08),
|
|
2069
|
+
0px 1px 8px 0px rgba(0, 0, 0, 0.06);
|
|
2070
|
+
}
|
|
2071
|
+
._content_qs97t_30:focus {
|
|
2072
|
+
outline: none;
|
|
2073
|
+
}
|
|
2074
|
+
._content_qs97t_30[data-state=open] {
|
|
2075
|
+
animation: _contentShow_qs97t_1 150ms ease-out;
|
|
2076
|
+
}
|
|
2077
|
+
._illust_qs97t_55 {
|
|
2078
|
+
display: flex;
|
|
2079
|
+
align-items: center;
|
|
2080
|
+
justify-content: center;
|
|
2081
|
+
box-sizing: border-box;
|
|
2082
|
+
padding: var(--lp-sys-padding-component-500) 0;
|
|
2083
|
+
}
|
|
2084
|
+
._close_qs97t_63 {
|
|
2085
|
+
position: absolute;
|
|
2086
|
+
top: 12px;
|
|
2087
|
+
right: 16px;
|
|
2088
|
+
z-index: 1;
|
|
2089
|
+
}
|
|
2090
|
+
._header_qs97t_70 {
|
|
2091
|
+
display: flex;
|
|
2092
|
+
flex-direction: column;
|
|
2093
|
+
gap: 8px;
|
|
2094
|
+
box-sizing: border-box;
|
|
2095
|
+
padding: var(--lp-sys-padding-component-500) var(--lp-sys-padding-component-600);
|
|
2096
|
+
}
|
|
2097
|
+
._body_qs97t_80 {
|
|
2098
|
+
box-sizing: border-box;
|
|
2099
|
+
padding: var(--lp-sys-padding-component-200) var(--lp-sys-padding-component-600);
|
|
2100
|
+
}
|
|
2101
|
+
._title_qs97t_85 {
|
|
2102
|
+
margin: 0;
|
|
2103
|
+
word-break: break-word;
|
|
2104
|
+
}
|
|
2105
|
+
._description_qs97t_90 {
|
|
2106
|
+
margin: 0;
|
|
2107
|
+
color: var(--neutral-label-secondary);
|
|
2108
|
+
word-break: break-word;
|
|
2109
|
+
}
|
|
2110
|
+
._footer_qs97t_96 {
|
|
2111
|
+
display: flex;
|
|
2112
|
+
flex-direction: column;
|
|
2113
|
+
gap: var(--lp-sys-padding-component-200);
|
|
2114
|
+
width: 100%;
|
|
2115
|
+
box-sizing: border-box;
|
|
2116
|
+
padding: var(--lp-sys-padding-component-400) var(--lp-sys-padding-component-600) var(--lp-sys-padding-component-600);
|
|
2117
|
+
}
|
|
2118
|
+
._actions_qs97t_107 {
|
|
2119
|
+
display: flex;
|
|
2120
|
+
gap: var(--lp-sys-padding-component-200);
|
|
2121
|
+
align-items: center;
|
|
2122
|
+
justify-content: flex-end;
|
|
2123
|
+
width: 100%;
|
|
2124
|
+
}
|
|
2125
|
+
._actions_qs97t_107 :where(button) {
|
|
2126
|
+
flex: 1 0 0;
|
|
2127
|
+
min-width: 0;
|
|
2128
|
+
}
|
|
2129
|
+
._extra_qs97t_122 {
|
|
2130
|
+
display: flex;
|
|
2131
|
+
justify-content: center;
|
|
2132
|
+
}
|
|
2133
|
+
._extra_qs97t_122 :where(p) {
|
|
2134
|
+
margin: 0;
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
/* esbuild-sass-plugin:css-chunk:src/components/BottomSheet/style.module.scss */
|
|
2138
|
+
._overlay_xv7lo_2 {
|
|
2139
|
+
position: fixed;
|
|
2140
|
+
inset: 0;
|
|
2141
|
+
background: var(--cover-dim-page);
|
|
2142
|
+
z-index: 1000;
|
|
2143
|
+
}
|
|
2144
|
+
._content_xv7lo_9 {
|
|
2145
|
+
position: fixed;
|
|
2146
|
+
left: 0;
|
|
2147
|
+
right: 0;
|
|
2148
|
+
bottom: 0;
|
|
2149
|
+
z-index: 1001;
|
|
2150
|
+
width: 100%;
|
|
2151
|
+
box-sizing: border-box;
|
|
2152
|
+
overflow: hidden;
|
|
2153
|
+
}
|
|
2154
|
+
._content_xv7lo_9[data-mode=auto] {
|
|
2155
|
+
max-height: 80dvh;
|
|
2156
|
+
}
|
|
2157
|
+
._content_xv7lo_9 {
|
|
2158
|
+
}
|
|
2159
|
+
._content_xv7lo_9[data-mode=snap] {
|
|
2160
|
+
height: 100dvh;
|
|
2161
|
+
max-height: 100dvh;
|
|
2162
|
+
}
|
|
2163
|
+
._content_xv7lo_9 {
|
|
2164
|
+
background: var(--neutral-container-variation-lowest);
|
|
2165
|
+
border-top-left-radius: var(--lp-sys-radius-xl);
|
|
2166
|
+
border-top-right-radius: var(--lp-sys-radius-xl);
|
|
2167
|
+
box-shadow:
|
|
2168
|
+
0px 0px 1px 0px rgba(0, 0, 0, 0.06),
|
|
2169
|
+
0px -2px 12px 0px rgba(0, 0, 0, 0.08),
|
|
2170
|
+
0px -1px 8px 0px rgba(0, 0, 0, 0.06);
|
|
2171
|
+
}
|
|
2172
|
+
._content_xv7lo_9:focus {
|
|
2173
|
+
outline: none;
|
|
2174
|
+
}
|
|
2175
|
+
._inner_xv7lo_18 {
|
|
2176
|
+
display: flex;
|
|
2177
|
+
flex-direction: column;
|
|
2178
|
+
box-sizing: border-box;
|
|
2179
|
+
padding-top: var(--lp-sys-padding-component-300);
|
|
2180
|
+
}
|
|
2181
|
+
[data-mode=auto] ._inner_xv7lo_18 {
|
|
2182
|
+
max-height: 80dvh;
|
|
2183
|
+
}
|
|
2184
|
+
._inner_xv7lo_18 {
|
|
2185
|
+
}
|
|
2186
|
+
[data-mode=snap] ._inner_xv7lo_18 {
|
|
2187
|
+
height: calc(100dvh - var(--snap-point-height, 0px));
|
|
2188
|
+
padding-top: max(var(--lp-sys-padding-component-300), env(safe-area-inset-top));
|
|
2189
|
+
transition: height 0.5s cubic-bezier(0.32, 0.72, 0, 1);
|
|
2190
|
+
}
|
|
2191
|
+
._handle_xv7lo_90 {
|
|
2192
|
+
margin: 0 auto;
|
|
2193
|
+
width: 40px;
|
|
2194
|
+
height: 4px;
|
|
2195
|
+
flex-shrink: 0;
|
|
2196
|
+
border-radius: 999px;
|
|
2197
|
+
background: var(--neutral-border-opaque-subtle);
|
|
2198
|
+
}
|
|
2199
|
+
._illust_xv7lo_100 {
|
|
2200
|
+
display: flex;
|
|
2201
|
+
justify-content: center;
|
|
2202
|
+
flex-shrink: 0;
|
|
2203
|
+
}
|
|
2204
|
+
._header_xv7lo_106 {
|
|
2205
|
+
display: flex;
|
|
2206
|
+
flex-direction: column;
|
|
2207
|
+
gap: var(--lp-sys-padding-component-200);
|
|
2208
|
+
box-sizing: border-box;
|
|
2209
|
+
padding: var(--lp-sys-padding-component-500) var(--lp-sys-padding-component-600);
|
|
2210
|
+
}
|
|
2211
|
+
._body_xv7lo_18 {
|
|
2212
|
+
flex: 1 1 auto;
|
|
2213
|
+
min-height: 0;
|
|
2214
|
+
overflow-y: auto;
|
|
2215
|
+
overscroll-behavior: contain;
|
|
2216
|
+
box-sizing: border-box;
|
|
2217
|
+
padding: var(--lp-sys-padding-component-200) var(--lp-sys-padding-component-600);
|
|
2218
|
+
}
|
|
2219
|
+
._title_xv7lo_126 {
|
|
2220
|
+
margin: 0;
|
|
2221
|
+
word-break: break-word;
|
|
2222
|
+
}
|
|
2223
|
+
._description_xv7lo_131 {
|
|
2224
|
+
margin: 0;
|
|
2225
|
+
color: var(--neutral-label-secondary);
|
|
2226
|
+
word-break: break-word;
|
|
2227
|
+
}
|
|
2228
|
+
._footer_xv7lo_137 {
|
|
2229
|
+
display: flex;
|
|
2230
|
+
flex-direction: column;
|
|
2231
|
+
gap: var(--lp-sys-padding-component-200);
|
|
2232
|
+
width: 100%;
|
|
2233
|
+
box-sizing: border-box;
|
|
2234
|
+
padding: var(--lp-sys-padding-component-400) var(--lp-sys-padding-component-600) var(--lp-sys-padding-component-600);
|
|
2235
|
+
}
|
|
2236
|
+
._actions_xv7lo_148 {
|
|
2237
|
+
display: flex;
|
|
2238
|
+
gap: var(--lp-sys-padding-component-200);
|
|
2239
|
+
align-items: center;
|
|
2240
|
+
width: 100%;
|
|
2241
|
+
}
|
|
2242
|
+
._actions_xv7lo_148 :where(button) {
|
|
2243
|
+
flex: 1 0 0;
|
|
2244
|
+
min-width: 0;
|
|
2245
|
+
}
|
|
2246
|
+
._extra_xv7lo_162 {
|
|
2247
|
+
display: flex;
|
|
2248
|
+
justify-content: center;
|
|
2249
|
+
}
|
|
2250
|
+
._extra_xv7lo_162 :where(p) {
|
|
2251
|
+
margin: 0;
|
|
2252
|
+
}
|
package/lib/index.d.ts
CHANGED
|
@@ -7,9 +7,10 @@ import { IconProps, IconComponentType } from '@liner-fe/icon';
|
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
8
|
import * as _artsy_fresnel_dist_Media from '@artsy/fresnel/dist/Media';
|
|
9
9
|
import { breakpointOrigin } from '@liner-fe/design-token';
|
|
10
|
-
import { Popover as Popover$1, Tooltip as Tooltip$1, Checkbox as Checkbox$1, RadioGroup, Select as Select$1, Label as Label$1 } from 'radix-ui';
|
|
10
|
+
import { Popover as Popover$1, Tooltip as Tooltip$1, Checkbox as Checkbox$1, RadioGroup, Select as Select$1, Label as Label$1, AlertDialog as AlertDialog$1, Dialog as Dialog$1 } from 'radix-ui';
|
|
11
11
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
12
12
|
import { PopoverProps, PopoverPortalProps } from '@radix-ui/react-popover';
|
|
13
|
+
import { Drawer } from 'vaul';
|
|
13
14
|
|
|
14
15
|
declare const objectToArray: <T extends Record<string, unknown>>(obj: T) => [keyof T, T[keyof T]][];
|
|
15
16
|
declare const arrayToStyleObject: <T extends SystemKeys>(colorKeys: T[], style: {
|
|
@@ -641,4 +642,203 @@ type BadgeBaseProps = ComponentPropsWithoutRef<'span'> & {
|
|
|
641
642
|
type BadgeProps = BadgeBaseProps & BadgeVariantColorProps;
|
|
642
643
|
declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttributes<HTMLSpanElement>>;
|
|
643
644
|
|
|
644
|
-
|
|
645
|
+
/**
|
|
646
|
+
* AlertDialogRoot
|
|
647
|
+
*
|
|
648
|
+
* ESC·Overlay 클릭으로 닫히지 않는다. dismiss/confirm 액션이 유일한 탈출구다.
|
|
649
|
+
*/
|
|
650
|
+
type AlertDialogRootProps = react.ComponentProps<typeof AlertDialog$1.Root>;
|
|
651
|
+
/**
|
|
652
|
+
* AlertDialogTrigger
|
|
653
|
+
*/
|
|
654
|
+
interface AlertDialogTriggerProps {
|
|
655
|
+
by?: react.ReactNode;
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* AlertDialog의 액션 정의
|
|
659
|
+
*/
|
|
660
|
+
interface AlertDialogAction {
|
|
661
|
+
/** 버튼에 표시할 텍스트 */
|
|
662
|
+
label: string;
|
|
663
|
+
/** 버튼 클릭 시 실행할 함수. 실행 후 dialog가 닫힌다. */
|
|
664
|
+
onClick?: () => void;
|
|
665
|
+
}
|
|
666
|
+
type AlertDialogConfirmAction = AlertDialogAction & {
|
|
667
|
+
/** confirm 버튼의 레벨. 복구 비용이 큰(파괴적인) 액션은 negative를 사용한다. */
|
|
668
|
+
level?: 'primary' | 'negative';
|
|
669
|
+
};
|
|
670
|
+
/**
|
|
671
|
+
* AlertDialogContent
|
|
672
|
+
*/
|
|
673
|
+
interface AlertDialogContentProps extends react.HTMLAttributes<HTMLDivElement> {
|
|
674
|
+
/** 제목 (선택). 넘기면 표시되고, 없으면 렌더하지 않는다. aria-labelledby로 연결된다. */
|
|
675
|
+
title?: string;
|
|
676
|
+
/** 본문. aria-describedby로 연결된다. (필수) */
|
|
677
|
+
description: react.ReactNode;
|
|
678
|
+
/** 닫기(취소) 액션 (필수) */
|
|
679
|
+
dismiss: AlertDialogAction;
|
|
680
|
+
/** 확인(주요 처리) 액션 (필수) */
|
|
681
|
+
confirm: AlertDialogConfirmAction;
|
|
682
|
+
/** Portal이 렌더링될 컨테이너 */
|
|
683
|
+
container?: HTMLElement;
|
|
684
|
+
}
|
|
685
|
+
declare const AlertDialog: ((props: AlertDialogRootProps) => react_jsx_runtime.JSX.Element) & {
|
|
686
|
+
Trigger: ({ by }: AlertDialogTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
687
|
+
Content: ({ title, description, dismiss, confirm, container, className, children, ref, ...props }: AlertDialogContentProps & {
|
|
688
|
+
ref?: react.Ref<HTMLDivElement>;
|
|
689
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* DialogRoot
|
|
694
|
+
*
|
|
695
|
+
* AlertDialog와 달리 ESC·Overlay 클릭으로 닫힌다.
|
|
696
|
+
*/
|
|
697
|
+
type DialogRootProps = react.ComponentProps<typeof Dialog$1.Root>;
|
|
698
|
+
/**
|
|
699
|
+
* DialogTrigger
|
|
700
|
+
*/
|
|
701
|
+
interface DialogTriggerProps {
|
|
702
|
+
by?: react.ReactNode;
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Dialog의 액션 정의
|
|
706
|
+
*/
|
|
707
|
+
interface DialogAction {
|
|
708
|
+
/** 버튼에 표시할 텍스트 */
|
|
709
|
+
label: string;
|
|
710
|
+
/** 버튼 클릭 시 실행할 함수. 실행 후 dialog가 닫힌다. */
|
|
711
|
+
onClick?: () => void;
|
|
712
|
+
}
|
|
713
|
+
type DialogConfirmAction = DialogAction & {
|
|
714
|
+
/** confirm 버튼의 레벨. 복구 비용이 큰(파괴적인) 액션은 negative를 사용한다. */
|
|
715
|
+
level?: 'primary' | 'negative';
|
|
716
|
+
};
|
|
717
|
+
/**
|
|
718
|
+
* DialogContent
|
|
719
|
+
*/
|
|
720
|
+
interface DialogContentProps extends react.HTMLAttributes<HTMLDivElement> {
|
|
721
|
+
/**
|
|
722
|
+
* 상단 일러스트 슬롯 (선택). `@liner-fe/illust`의 `<Illust>`를 넣는다. 없으면 렌더하지 않는다.
|
|
723
|
+
* content 상단에 가운데 정렬로 노출된다. (full-bleed 아님)
|
|
724
|
+
*/
|
|
725
|
+
illust?: react.ReactNode;
|
|
726
|
+
/** 제목 (필수). aria-labelledby로 연결된다. */
|
|
727
|
+
title: string;
|
|
728
|
+
/** 본문. aria-describedby로 연결된다. */
|
|
729
|
+
description?: react.ReactNode;
|
|
730
|
+
/** 닫기(취소) 액션 (선택). 없으면 해당 버튼을 렌더하지 않는다. */
|
|
731
|
+
dismiss?: DialogAction;
|
|
732
|
+
/** 확인(주요 처리) 액션 (선택). 없으면 해당 버튼을 렌더하지 않는다. */
|
|
733
|
+
confirm?: DialogConfirmAction;
|
|
734
|
+
/** 보조 액션 (선택). primary/secondary 아래 가운데 정렬되는 텍스트 버튼. Figma `extra.items` 슬롯. */
|
|
735
|
+
extra?: DialogAction;
|
|
736
|
+
/** 우상단 닫기(X) 버튼 노출 여부. 기본 true. */
|
|
737
|
+
showClose?: boolean;
|
|
738
|
+
/** Portal이 렌더링될 컨테이너 */
|
|
739
|
+
container?: HTMLElement;
|
|
740
|
+
}
|
|
741
|
+
declare const Dialog: ((props: DialogRootProps) => react_jsx_runtime.JSX.Element) & {
|
|
742
|
+
Trigger: ({ by }: DialogTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
743
|
+
Content: ({ illust, title, description, dismiss, confirm, extra, showClose, container, className, children, ref, ...props }: DialogContentProps & {
|
|
744
|
+
ref?: react.Ref<HTMLDivElement>;
|
|
745
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
746
|
+
};
|
|
747
|
+
|
|
748
|
+
/** BottomSheet 동작 모드 (Figma 스펙). */
|
|
749
|
+
type BottomSheetMode = 'auto' | 'snap';
|
|
750
|
+
/**
|
|
751
|
+
* BottomSheetRoot
|
|
752
|
+
*
|
|
753
|
+
* 화면 하단에서 올라오는 시트.
|
|
754
|
+
* vaul `Drawer`를 사용해 드래그 제스처와 a11y(focus trap·scroll lock)를 위임한다.
|
|
755
|
+
*
|
|
756
|
+
* - `mode='auto'`: 콘텐츠 높이에 맞춰 자동으로 올라온다. 최대 80%(고정)까지.
|
|
757
|
+
* handle 없음. 드래그/Overlay/ESC 닫기 비활성 → footer 액션 버튼으로만 닫힌다.
|
|
758
|
+
* 80%보다 큰 콘텐츠가 필요하면 `mode='snap'`을 사용한다.
|
|
759
|
+
* - `mode='snap'`: 50%로 시작해 handle 드래그로 상태바 직전까지 확장된다.
|
|
760
|
+
* 드래그/Overlay/ESC로 닫힌다. snap은 vaul `snapPoints`에 위임한다.
|
|
761
|
+
*/
|
|
762
|
+
interface BottomSheetRootProps extends Omit<react.ComponentProps<typeof Drawer.Root>, 'snapPoints' | 'fadeFromIndex'> {
|
|
763
|
+
/** 동작 모드. 기본 'auto'. */
|
|
764
|
+
mode?: BottomSheetMode;
|
|
765
|
+
}
|
|
766
|
+
/**
|
|
767
|
+
* BottomSheetTrigger
|
|
768
|
+
*/
|
|
769
|
+
interface BottomSheetTriggerProps {
|
|
770
|
+
by?: react.ReactNode;
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* BottomSheet의 액션 정의
|
|
774
|
+
*/
|
|
775
|
+
interface BottomSheetAction {
|
|
776
|
+
/** 버튼에 표시할 텍스트 */
|
|
777
|
+
label: string;
|
|
778
|
+
/** 버튼 클릭 시 실행할 함수. 실행 후 시트가 닫힌다. */
|
|
779
|
+
onClick?: () => void;
|
|
780
|
+
}
|
|
781
|
+
type BottomSheetConfirmAction = BottomSheetAction & {
|
|
782
|
+
/** confirm 버튼의 레벨. 복구 비용이 큰(파괴적인) 액션은 negative를 사용한다. */
|
|
783
|
+
level?: 'primary' | 'negative';
|
|
784
|
+
};
|
|
785
|
+
/**
|
|
786
|
+
* BottomSheetContent
|
|
787
|
+
*/
|
|
788
|
+
interface BottomSheetContentProps extends react.HTMLAttributes<HTMLDivElement> {
|
|
789
|
+
/**
|
|
790
|
+
* 상단 미디어/일러스트 슬롯 (선택). `@liner-fe/illust`의 `<Illust>` 등을 넣는다. 없으면 렌더하지 않는다.
|
|
791
|
+
* content 최상단에 가로 full-bleed로 노출된다. Figma `media` 슬롯에 대응한다.
|
|
792
|
+
*/
|
|
793
|
+
illust?: react.ReactNode;
|
|
794
|
+
/** 제목 (필수). aria-labelledby로 연결된다. Figma BottomSheet 스펙상 title은 required 슬롯이다. */
|
|
795
|
+
title: string;
|
|
796
|
+
/** 본문. aria-describedby로 연결된다. */
|
|
797
|
+
description?: react.ReactNode;
|
|
798
|
+
/** 상단 드래그 핸들(grabber) 노출 여부. 기본: snap이면 true, auto이면 false (mode 기준). */
|
|
799
|
+
showHandle?: boolean;
|
|
800
|
+
/** 닫기(취소) 액션 (선택). 없으면 해당 버튼을 렌더하지 않는다. */
|
|
801
|
+
dismiss?: BottomSheetAction;
|
|
802
|
+
/** 확인(주요 처리) 액션 (선택). 없으면 해당 버튼을 렌더하지 않는다. */
|
|
803
|
+
confirm?: BottomSheetConfirmAction;
|
|
804
|
+
/** 보조 액션 (선택). actions 아래 가운데 정렬되는 텍스트 버튼. Figma `extra.items` 슬롯. */
|
|
805
|
+
extra?: BottomSheetAction;
|
|
806
|
+
/** Portal이 렌더링될 컨테이너 */
|
|
807
|
+
container?: HTMLElement;
|
|
808
|
+
}
|
|
809
|
+
declare const BottomSheet: (({ mode, children, ...props }: BottomSheetRootProps) => react_jsx_runtime.JSX.Element) & {
|
|
810
|
+
Trigger: ({ by }: BottomSheetTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
811
|
+
Content: ({ illust, title, description, showHandle, dismiss, confirm, extra, container, className, style: styleProp, children, ref, ...props }: BottomSheetContentProps & {
|
|
812
|
+
ref?: react.Ref<HTMLDivElement>;
|
|
813
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
814
|
+
};
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* Figma에 정의된 종횡비(width / height) preset.
|
|
818
|
+
* 키는 Figma variant 이름(비율)과 동일하다. 직접 숫자를 넘겨도 된다.
|
|
819
|
+
*/
|
|
820
|
+
declare const RATIO: {
|
|
821
|
+
readonly '1/1': 1;
|
|
822
|
+
readonly '3/4': number;
|
|
823
|
+
readonly '4/3': number;
|
|
824
|
+
readonly '3/2': number;
|
|
825
|
+
readonly '2/3': number;
|
|
826
|
+
readonly '16/9': number;
|
|
827
|
+
readonly '21/9': number;
|
|
828
|
+
};
|
|
829
|
+
interface RatioProps extends react.HTMLAttributes<HTMLDivElement> {
|
|
830
|
+
/**
|
|
831
|
+
* 종횡비 (width / height). 기본값 1(정사각형).
|
|
832
|
+
* `RATIO['16/9']` preset 값을 사용하거나 `16 / 9`처럼 직접 계산해 넘긴다.
|
|
833
|
+
*/
|
|
834
|
+
ratio?: number;
|
|
835
|
+
children?: react.ReactNode;
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* 자식을 지정한 종횡비에 맞춰 담는 레이아웃 컨테이너다.
|
|
839
|
+
* radix `AspectRatio`를 그대로 사용해 layout shift 없이 비율을 유지한다.
|
|
840
|
+
* (이미지/영상은 자식 쪽에서 `width: 100%; height: 100%; object-fit: cover`로 채운다.)
|
|
841
|
+
*/
|
|
842
|
+
declare const Ratio: react.ForwardRefExoticComponent<RatioProps & react.RefAttributes<HTMLDivElement>>;
|
|
843
|
+
|
|
844
|
+
export { AlertDialog, type AlertDialogAction, type AlertDialogConfirmAction, type AlertDialogContentProps, Badge, type BadgeColor, type BadgeIconProps, type BadgeProps, type BadgeSize, type BadgeVariant, BottomSheet, type BottomSheetAction, type BottomSheetConfirmAction, type BottomSheetContentProps, type BottomSheetMode, type BreakPointsKey, Button, type ButtonIconProps, type ButtonProps, type ButtonSizeType, Caption, Checkbox, CoachMark, type CoachMarkContentProps, type CommonButtonProps, CompactCoachMark, type CompactCoachMarkContentProps, DEFAULT_LEVEL_OPTIONS, DEFAULT_SIZE_OPTIONS, DefaultButton, type DefaultButtonProps, type DefaultLevelType, Dialog, type DialogAction, type DialogConfirmAction, type DialogContentProps, Display, Heading, ICON_LEVEL_OPTIONS, ICON_SIZE_OPTIONS, type ICaptionProps, type IDisplayProps, type IHeadingProps, type IPropsAccent, type IPropsAnswer, type IPropsNormal, type IPropsNormalBold, type IPropsPost, type ITitleProps, IconButton, type IconButtonProps, type ItemProps, LOGOS, Label, List, Loading, type LoadingLevelType, Logo, type LogoCategory, type LogoName, type LogoProps, Media, MediaContextProvider, Paragraph, type ParagraphProps, Popover, type PopoverContentProps, PrimitiveCoachMark, type PrimitiveCoachMarkContentProps, type PrimitiveCoachMarkRootProps, type PromiseToastOptions, RATIO, Radio, Ratio, type RatioProps, Select, type SelectItemProps, type SelectProps, TEXT_LEVEL_OPTIONS, TEXT_SIZE_OPTIONS, Tag, TextButton, type TextButtonProps, type TextSizeType, Textfield, type TextfieldButtonProps, type TextfieldLabelType, type TextfieldProps, Title, type ToastOptions, type ToastType, Toaster, Tooltip, Typography, arrayToStyleObject, isEmptyObject, objectToArray, rootMediaStyle, toast };
|
package/lib/index.js
CHANGED
|
@@ -2774,8 +2774,304 @@ var Tag = forwardRef20(
|
|
|
2774
2774
|
);
|
|
2775
2775
|
}
|
|
2776
2776
|
);
|
|
2777
|
+
|
|
2778
|
+
// src/components/AlertDialog/index.tsx
|
|
2779
|
+
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
2780
|
+
import { clsx as clsx22 } from "clsx";
|
|
2781
|
+
import { cva as cva12 } from "cva";
|
|
2782
|
+
|
|
2783
|
+
// src/components/AlertDialog/style.module.scss
|
|
2784
|
+
var style_module_default20 = {
|
|
2785
|
+
"overlay": "_overlay_6ipeu_20",
|
|
2786
|
+
"overlayShow": "_overlayShow_6ipeu_1",
|
|
2787
|
+
"content": "_content_6ipeu_30",
|
|
2788
|
+
"contentShow": "_contentShow_6ipeu_1",
|
|
2789
|
+
"contents": "_contents_6ipeu_55",
|
|
2790
|
+
"title": "_title_6ipeu_65",
|
|
2791
|
+
"description": "_description_6ipeu_75",
|
|
2792
|
+
"actions": "_actions_6ipeu_85"
|
|
2793
|
+
};
|
|
2794
|
+
|
|
2795
|
+
// src/components/AlertDialog/index.tsx
|
|
2796
|
+
import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2797
|
+
var titleVariants = cva12({ base: [style_module_default20.title, "lp-sys-typo-title4-accent-bold"] });
|
|
2798
|
+
var descriptionVariants = cva12({
|
|
2799
|
+
base: [style_module_default20.description, "lp-sys-typo-paragraph2-post-regular"]
|
|
2800
|
+
});
|
|
2801
|
+
var AlertDialogRoot = /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsx29(AlertDialogPrimitive.Root, { ...props }), "AlertDialogRoot");
|
|
2802
|
+
var AlertDialogTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */ jsx29(AlertDialogPrimitive.Trigger, { asChild: true, children: by }), "AlertDialogTrigger");
|
|
2803
|
+
var AlertDialogContent = /* @__PURE__ */ __name(({
|
|
2804
|
+
title,
|
|
2805
|
+
description,
|
|
2806
|
+
dismiss,
|
|
2807
|
+
confirm,
|
|
2808
|
+
container,
|
|
2809
|
+
className,
|
|
2810
|
+
children,
|
|
2811
|
+
ref,
|
|
2812
|
+
...props
|
|
2813
|
+
}) => {
|
|
2814
|
+
return /* @__PURE__ */ jsxs16(AlertDialogPrimitive.Portal, { container, children: [
|
|
2815
|
+
/* @__PURE__ */ jsx29(AlertDialogPrimitive.Overlay, { className: style_module_default20.overlay }),
|
|
2816
|
+
/* @__PURE__ */ jsxs16(
|
|
2817
|
+
AlertDialogPrimitive.Content,
|
|
2818
|
+
{
|
|
2819
|
+
ref,
|
|
2820
|
+
className: clsx22(style_module_default20.content, className),
|
|
2821
|
+
onEscapeKeyDown: (event) => event.preventDefault(),
|
|
2822
|
+
...props,
|
|
2823
|
+
children: [
|
|
2824
|
+
/* @__PURE__ */ jsxs16("div", { className: style_module_default20.contents, children: [
|
|
2825
|
+
title && /* @__PURE__ */ jsx29(AlertDialogPrimitive.Title, { className: titleVariants(), children: title }),
|
|
2826
|
+
/* @__PURE__ */ jsx29(AlertDialogPrimitive.Description, { className: descriptionVariants(), children: description })
|
|
2827
|
+
] }),
|
|
2828
|
+
children,
|
|
2829
|
+
/* @__PURE__ */ jsxs16("div", { className: style_module_default20.actions, children: [
|
|
2830
|
+
/* @__PURE__ */ jsx29(AlertDialogPrimitive.Cancel, { asChild: true, children: /* @__PURE__ */ jsx29(Button, { level: "tertiary", size: "l", onClick: dismiss.onClick, children: dismiss.label }) }),
|
|
2831
|
+
/* @__PURE__ */ jsx29(AlertDialogPrimitive.Action, { asChild: true, children: /* @__PURE__ */ jsx29(Button, { level: confirm.level ?? "primary", size: "l", onClick: confirm.onClick, children: confirm.label }) })
|
|
2832
|
+
] })
|
|
2833
|
+
]
|
|
2834
|
+
}
|
|
2835
|
+
)
|
|
2836
|
+
] });
|
|
2837
|
+
}, "AlertDialogContent");
|
|
2838
|
+
var AlertDialog = Object.assign(AlertDialogRoot, {
|
|
2839
|
+
Trigger: AlertDialogTrigger,
|
|
2840
|
+
Content: AlertDialogContent
|
|
2841
|
+
});
|
|
2842
|
+
|
|
2843
|
+
// src/components/Dialog/index.tsx
|
|
2844
|
+
import { Dialog as DialogPrimitive3 } from "radix-ui";
|
|
2845
|
+
import { clsx as clsx23 } from "clsx";
|
|
2846
|
+
import { IconClose as IconClose2 } from "@liner-fe/icon";
|
|
2847
|
+
|
|
2848
|
+
// src/components/Dialog/Header.tsx
|
|
2849
|
+
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
2850
|
+
import { cva as cva13 } from "cva";
|
|
2851
|
+
|
|
2852
|
+
// src/components/Dialog/style.module.scss
|
|
2853
|
+
var style_module_default21 = {
|
|
2854
|
+
"overlay": "_overlay_qs97t_20",
|
|
2855
|
+
"overlayShow": "_overlayShow_qs97t_1",
|
|
2856
|
+
"content": "_content_qs97t_30",
|
|
2857
|
+
"contentShow": "_contentShow_qs97t_1",
|
|
2858
|
+
"illust": "_illust_qs97t_55",
|
|
2859
|
+
"close": "_close_qs97t_63",
|
|
2860
|
+
"header": "_header_qs97t_70",
|
|
2861
|
+
"body": "_body_qs97t_80",
|
|
2862
|
+
"title": "_title_qs97t_85",
|
|
2863
|
+
"description": "_description_qs97t_90",
|
|
2864
|
+
"footer": "_footer_qs97t_96",
|
|
2865
|
+
"actions": "_actions_qs97t_107",
|
|
2866
|
+
"extra": "_extra_qs97t_122"
|
|
2867
|
+
};
|
|
2868
|
+
|
|
2869
|
+
// src/components/Dialog/Header.tsx
|
|
2870
|
+
import { jsx as jsx30, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2871
|
+
var titleVariants2 = cva13({ base: [style_module_default21.title, "lp-sys-typo-title4-accent-bold"] });
|
|
2872
|
+
var descriptionVariants2 = cva13({
|
|
2873
|
+
base: [style_module_default21.description, "lp-sys-typo-paragraph2-post-regular"]
|
|
2874
|
+
});
|
|
2875
|
+
var DialogHeader = /* @__PURE__ */ __name(({ title, description }) => /* @__PURE__ */ jsxs17("div", { className: style_module_default21.header, children: [
|
|
2876
|
+
/* @__PURE__ */ jsx30(DialogPrimitive.Title, { className: titleVariants2(), children: title }),
|
|
2877
|
+
description && /* @__PURE__ */ jsx30(DialogPrimitive.Description, { className: descriptionVariants2(), children: description })
|
|
2878
|
+
] }), "DialogHeader");
|
|
2879
|
+
|
|
2880
|
+
// src/components/Dialog/Footer.tsx
|
|
2881
|
+
import { Dialog as DialogPrimitive2 } from "radix-ui";
|
|
2882
|
+
import { jsx as jsx31, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2883
|
+
var DialogFooter = /* @__PURE__ */ __name(({ dismiss, confirm, extra }) => {
|
|
2884
|
+
const hasActions = Boolean(dismiss || confirm);
|
|
2885
|
+
const hasFooter = hasActions || Boolean(extra);
|
|
2886
|
+
if (!hasFooter) return null;
|
|
2887
|
+
return /* @__PURE__ */ jsxs18("div", { className: style_module_default21.footer, children: [
|
|
2888
|
+
hasActions && /* @__PURE__ */ jsxs18("div", { className: style_module_default21.actions, children: [
|
|
2889
|
+
dismiss && /* @__PURE__ */ jsx31(DialogPrimitive2.Close, { asChild: true, children: /* @__PURE__ */ jsx31(Button, { level: "tertiary", size: "cta", onClick: dismiss.onClick, children: dismiss.label }) }),
|
|
2890
|
+
confirm && /* @__PURE__ */ jsx31(DialogPrimitive2.Close, { asChild: true, children: /* @__PURE__ */ jsx31(Button, { level: confirm.level ?? "primary", size: "cta", onClick: confirm.onClick, children: confirm.label }) })
|
|
2891
|
+
] }),
|
|
2892
|
+
extra && /* @__PURE__ */ jsx31("div", { className: style_module_default21.extra, children: /* @__PURE__ */ jsx31(DialogPrimitive2.Close, { asChild: true, children: /* @__PURE__ */ jsx31(TextButton, { level: "tertiary", size: "xs", onClick: extra.onClick, children: extra.label }) }) })
|
|
2893
|
+
] });
|
|
2894
|
+
}, "DialogFooter");
|
|
2895
|
+
|
|
2896
|
+
// src/components/Dialog/index.tsx
|
|
2897
|
+
import { jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2898
|
+
var DialogRoot = /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsx32(DialogPrimitive3.Root, { ...props }), "DialogRoot");
|
|
2899
|
+
var DialogTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */ jsx32(DialogPrimitive3.Trigger, { asChild: true, children: by }), "DialogTrigger");
|
|
2900
|
+
var DialogContent = /* @__PURE__ */ __name(({
|
|
2901
|
+
illust,
|
|
2902
|
+
title,
|
|
2903
|
+
description,
|
|
2904
|
+
dismiss,
|
|
2905
|
+
confirm,
|
|
2906
|
+
extra,
|
|
2907
|
+
showClose = true,
|
|
2908
|
+
container,
|
|
2909
|
+
className,
|
|
2910
|
+
children,
|
|
2911
|
+
ref,
|
|
2912
|
+
...props
|
|
2913
|
+
}) => {
|
|
2914
|
+
return /* @__PURE__ */ jsxs19(DialogPrimitive3.Portal, { container, children: [
|
|
2915
|
+
/* @__PURE__ */ jsx32(DialogPrimitive3.Overlay, { className: style_module_default21.overlay }),
|
|
2916
|
+
/* @__PURE__ */ jsxs19(DialogPrimitive3.Content, { ref, className: clsx23(style_module_default21.content, className), ...props, children: [
|
|
2917
|
+
showClose && /* @__PURE__ */ jsx32(DialogPrimitive3.Close, { asChild: true, children: /* @__PURE__ */ jsx32(
|
|
2918
|
+
IconButton,
|
|
2919
|
+
{
|
|
2920
|
+
className: style_module_default21.close,
|
|
2921
|
+
"aria-label": "\uB2EB\uAE30",
|
|
2922
|
+
level: "quinary",
|
|
2923
|
+
size: "m",
|
|
2924
|
+
icon: { icon: IconClose2, type: "neutral-label-secondary" }
|
|
2925
|
+
}
|
|
2926
|
+
) }),
|
|
2927
|
+
illust && /* @__PURE__ */ jsx32("div", { className: style_module_default21.illust, children: illust }),
|
|
2928
|
+
/* @__PURE__ */ jsx32(DialogHeader, { title, description }),
|
|
2929
|
+
children && /* @__PURE__ */ jsx32("div", { className: style_module_default21.body, children }),
|
|
2930
|
+
/* @__PURE__ */ jsx32(DialogFooter, { dismiss, confirm, extra })
|
|
2931
|
+
] })
|
|
2932
|
+
] });
|
|
2933
|
+
}, "DialogContent");
|
|
2934
|
+
var Dialog = Object.assign(DialogRoot, {
|
|
2935
|
+
Trigger: DialogTrigger,
|
|
2936
|
+
Content: DialogContent
|
|
2937
|
+
});
|
|
2938
|
+
|
|
2939
|
+
// src/components/BottomSheet/index.tsx
|
|
2940
|
+
import * as React4 from "react";
|
|
2941
|
+
import { Drawer as Drawer3 } from "vaul";
|
|
2942
|
+
import { clsx as clsx24 } from "clsx";
|
|
2943
|
+
|
|
2944
|
+
// src/components/BottomSheet/Header.tsx
|
|
2945
|
+
import { Drawer } from "vaul";
|
|
2946
|
+
import { cva as cva14 } from "cva";
|
|
2947
|
+
|
|
2948
|
+
// src/components/BottomSheet/style.module.scss
|
|
2949
|
+
var style_module_default22 = {
|
|
2950
|
+
"overlay": "_overlay_xv7lo_2",
|
|
2951
|
+
"content": "_content_xv7lo_9",
|
|
2952
|
+
"inner": "_inner_xv7lo_18",
|
|
2953
|
+
"handle": "_handle_xv7lo_90",
|
|
2954
|
+
"illust": "_illust_xv7lo_100",
|
|
2955
|
+
"header": "_header_xv7lo_106",
|
|
2956
|
+
"body": "_body_xv7lo_18",
|
|
2957
|
+
"title": "_title_xv7lo_126",
|
|
2958
|
+
"description": "_description_xv7lo_131",
|
|
2959
|
+
"footer": "_footer_xv7lo_137",
|
|
2960
|
+
"actions": "_actions_xv7lo_148",
|
|
2961
|
+
"extra": "_extra_xv7lo_162"
|
|
2962
|
+
};
|
|
2963
|
+
|
|
2964
|
+
// src/components/BottomSheet/Header.tsx
|
|
2965
|
+
import { jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2966
|
+
var titleVariants3 = cva14({ base: [style_module_default22.title, "lp-sys-typo-title4-accent-bold"] });
|
|
2967
|
+
var descriptionVariants3 = cva14({
|
|
2968
|
+
base: [style_module_default22.description, "lp-sys-typo-paragraph2-post-regular"]
|
|
2969
|
+
});
|
|
2970
|
+
var BottomSheetHeader = /* @__PURE__ */ __name(({ title, description }) => /* @__PURE__ */ jsxs20("div", { className: style_module_default22.header, children: [
|
|
2971
|
+
/* @__PURE__ */ jsx33(Drawer.Title, { className: titleVariants3(), children: title }),
|
|
2972
|
+
description && /* @__PURE__ */ jsx33(Drawer.Description, { className: descriptionVariants3(), children: description })
|
|
2973
|
+
] }), "BottomSheetHeader");
|
|
2974
|
+
|
|
2975
|
+
// src/components/BottomSheet/Footer.tsx
|
|
2976
|
+
import { Drawer as Drawer2 } from "vaul";
|
|
2977
|
+
import { jsx as jsx34, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2978
|
+
var BottomSheetFooter = /* @__PURE__ */ __name(({ dismiss, confirm, extra }) => {
|
|
2979
|
+
const hasActions = Boolean(dismiss || confirm);
|
|
2980
|
+
const hasFooter = hasActions || Boolean(extra);
|
|
2981
|
+
if (!hasFooter) return null;
|
|
2982
|
+
return /* @__PURE__ */ jsxs21("div", { className: style_module_default22.footer, children: [
|
|
2983
|
+
hasActions && /* @__PURE__ */ jsxs21("div", { className: style_module_default22.actions, children: [
|
|
2984
|
+
dismiss && /* @__PURE__ */ jsx34(Drawer2.Close, { asChild: true, children: /* @__PURE__ */ jsx34(Button, { level: "tertiary", size: "l", onClick: dismiss.onClick, children: dismiss.label }) }),
|
|
2985
|
+
confirm && /* @__PURE__ */ jsx34(Drawer2.Close, { asChild: true, children: /* @__PURE__ */ jsx34(Button, { level: confirm.level ?? "primary", size: "l", onClick: confirm.onClick, children: confirm.label }) })
|
|
2986
|
+
] }),
|
|
2987
|
+
extra && /* @__PURE__ */ jsx34("div", { className: style_module_default22.extra, children: /* @__PURE__ */ jsx34(Drawer2.Close, { asChild: true, children: /* @__PURE__ */ jsx34(TextButton, { level: "tertiary", size: "xs", onClick: extra.onClick, children: extra.label }) }) })
|
|
2988
|
+
] });
|
|
2989
|
+
}, "BottomSheetFooter");
|
|
2990
|
+
|
|
2991
|
+
// src/components/BottomSheet/index.tsx
|
|
2992
|
+
import { jsx as jsx35, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2993
|
+
var SNAP_POINTS = [0.5, 1];
|
|
2994
|
+
var BottomSheetContext = React4.createContext({
|
|
2995
|
+
mode: "auto"
|
|
2996
|
+
});
|
|
2997
|
+
var BottomSheetRoot = /* @__PURE__ */ __name(({ mode = "auto", children, ...props }) => {
|
|
2998
|
+
const value = React4.useMemo(() => ({ mode }), [mode]);
|
|
2999
|
+
return /* @__PURE__ */ jsx35(BottomSheetContext.Provider, { value, children: mode === "snap" ? /* @__PURE__ */ jsx35(Drawer3.Root, { snapPoints: SNAP_POINTS, fadeFromIndex: SNAP_POINTS.length - 1, ...props, children }) : (
|
|
3000
|
+
// auto: handle이 없으므로 handleOnly로 드래그 닫기를 막고, overlay·ESC 닫기는 Content에서 막는다.
|
|
3001
|
+
// dismissible은 유지(false면 vaul이 Drawer.Close까지 막는다) → footer 액션 버튼으로만 닫힌다.
|
|
3002
|
+
/* @__PURE__ */ jsx35(Drawer3.Root, { handleOnly: true, ...props, children })
|
|
3003
|
+
) });
|
|
3004
|
+
}, "BottomSheetRoot");
|
|
3005
|
+
var BottomSheetTrigger = /* @__PURE__ */ __name(({ by }) => /* @__PURE__ */ jsx35(Drawer3.Trigger, { asChild: true, children: by }), "BottomSheetTrigger");
|
|
3006
|
+
var BottomSheetContent = /* @__PURE__ */ __name(({
|
|
3007
|
+
illust,
|
|
3008
|
+
title,
|
|
3009
|
+
description,
|
|
3010
|
+
showHandle,
|
|
3011
|
+
dismiss,
|
|
3012
|
+
confirm,
|
|
3013
|
+
extra,
|
|
3014
|
+
container,
|
|
3015
|
+
className,
|
|
3016
|
+
style: styleProp,
|
|
3017
|
+
children,
|
|
3018
|
+
ref,
|
|
3019
|
+
...props
|
|
3020
|
+
}) => {
|
|
3021
|
+
const { mode } = React4.useContext(BottomSheetContext);
|
|
3022
|
+
const resolvedShowHandle = showHandle ?? mode === "snap";
|
|
3023
|
+
const autoCloseGuards = mode === "auto" ? {
|
|
3024
|
+
onEscapeKeyDown: /* @__PURE__ */ __name((e) => e.preventDefault(), "onEscapeKeyDown"),
|
|
3025
|
+
onInteractOutside: /* @__PURE__ */ __name((e) => e.preventDefault(), "onInteractOutside")
|
|
3026
|
+
} : {};
|
|
3027
|
+
return /* @__PURE__ */ jsxs22(Drawer3.Portal, { container, children: [
|
|
3028
|
+
/* @__PURE__ */ jsx35(Drawer3.Overlay, { className: style_module_default22.overlay }),
|
|
3029
|
+
/* @__PURE__ */ jsx35(
|
|
3030
|
+
Drawer3.Content,
|
|
3031
|
+
{
|
|
3032
|
+
ref,
|
|
3033
|
+
"data-mode": mode,
|
|
3034
|
+
className: clsx24(style_module_default22.content, className),
|
|
3035
|
+
style: styleProp,
|
|
3036
|
+
...autoCloseGuards,
|
|
3037
|
+
...props,
|
|
3038
|
+
children: /* @__PURE__ */ jsxs22("div", { className: style_module_default22.inner, children: [
|
|
3039
|
+
resolvedShowHandle && /* @__PURE__ */ jsx35(Drawer3.Handle, { className: style_module_default22.handle }),
|
|
3040
|
+
illust && /* @__PURE__ */ jsx35("div", { className: style_module_default22.illust, children: illust }),
|
|
3041
|
+
/* @__PURE__ */ jsx35(BottomSheetHeader, { title, description }),
|
|
3042
|
+
children && /* @__PURE__ */ jsx35("div", { className: style_module_default22.body, children }),
|
|
3043
|
+
/* @__PURE__ */ jsx35(BottomSheetFooter, { dismiss, confirm, extra })
|
|
3044
|
+
] })
|
|
3045
|
+
}
|
|
3046
|
+
)
|
|
3047
|
+
] });
|
|
3048
|
+
}, "BottomSheetContent");
|
|
3049
|
+
var BottomSheet = Object.assign(BottomSheetRoot, {
|
|
3050
|
+
Trigger: BottomSheetTrigger,
|
|
3051
|
+
Content: BottomSheetContent
|
|
3052
|
+
});
|
|
3053
|
+
|
|
3054
|
+
// src/components/Ratio/index.tsx
|
|
3055
|
+
import * as React5 from "react";
|
|
3056
|
+
import { AspectRatio as AspectRatioPrimitive } from "radix-ui";
|
|
3057
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
3058
|
+
var RATIO = {
|
|
3059
|
+
"1/1": 1,
|
|
3060
|
+
"3/4": 3 / 4,
|
|
3061
|
+
"4/3": 4 / 3,
|
|
3062
|
+
"3/2": 3 / 2,
|
|
3063
|
+
"2/3": 2 / 3,
|
|
3064
|
+
"16/9": 16 / 9,
|
|
3065
|
+
"21/9": 21 / 9
|
|
3066
|
+
};
|
|
3067
|
+
var Ratio = React5.forwardRef(
|
|
3068
|
+
({ ratio = 1, children, ...props }, ref) => /* @__PURE__ */ jsx36(AspectRatioPrimitive.Root, { ref, ratio, ...props, children })
|
|
3069
|
+
);
|
|
3070
|
+
Ratio.displayName = "Ratio";
|
|
2777
3071
|
export {
|
|
3072
|
+
AlertDialog,
|
|
2778
3073
|
Badge2 as Badge,
|
|
3074
|
+
BottomSheet,
|
|
2779
3075
|
Button,
|
|
2780
3076
|
Caption,
|
|
2781
3077
|
Checkbox,
|
|
@@ -2784,6 +3080,7 @@ export {
|
|
|
2784
3080
|
DEFAULT_LEVEL_OPTIONS,
|
|
2785
3081
|
DEFAULT_SIZE_OPTIONS,
|
|
2786
3082
|
DefaultButton,
|
|
3083
|
+
Dialog,
|
|
2787
3084
|
Display,
|
|
2788
3085
|
Heading,
|
|
2789
3086
|
ICON_LEVEL_OPTIONS,
|
|
@@ -2799,7 +3096,9 @@ export {
|
|
|
2799
3096
|
Paragraph,
|
|
2800
3097
|
Popover,
|
|
2801
3098
|
PrimitiveCoachMark,
|
|
3099
|
+
RATIO,
|
|
2802
3100
|
Radio,
|
|
3101
|
+
Ratio,
|
|
2803
3102
|
Select,
|
|
2804
3103
|
TEXT_LEVEL_OPTIONS,
|
|
2805
3104
|
TEXT_SIZE_OPTIONS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liner-fe/prism",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"dependencies": {
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"sonner": "2.0.7",
|
|
17
17
|
"react-dom": "^19.1.0",
|
|
18
18
|
"jotai": "2.18.0",
|
|
19
|
+
"vaul": "1.1.2",
|
|
19
20
|
"@liner-fe/design-token-primitive": "^0.2.49",
|
|
20
21
|
"@liner-fe/design-token": "^3.0.4",
|
|
21
22
|
"@liner-fe/icon": "^2.0.20",
|