You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

473 lines
13 KiB

  1. //==============
  2. //== modal
  3. $ax5modal-z-index: 2000 !default;
  4. $ax5modal-box-model: border-box !default;
  5. $ax5modal-bg: #fff !default;
  6. $ax5modal-border: 1px solid #ddd !default;
  7. $ax5modal-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.60) !default;
  8. $ax5modal-body-padding: 0px !default;
  9. $ax5modal-header-padding: 10px 15px !default;
  10. $ax5modal-header-addon-padding: 10px 10px !default;
  11. $ax5modal-header-addon-btn-padding: 0px 2px !default;
  12. $ax5modal-border-radius: 4px !default;
  13. $ax5modal-easing-time-open: 0.3s !default;
  14. $ax5modal-easing-time-close: 0.3s !default;
  15. $ax5modal-easing-open: $ease-out-back !default;
  16. $ax5modal-easing-close: $ease-out-back !default;
  17. //== modal resizer
  18. $ax5modal-resizer-bg: #ccc !default;
  19. $ax5modal-resizer-border: 1px solid #ff0000 !default;
  20. $ax5modal-resizer-box-shaodw: 0px 0px 5px 0px rgba(0, 0, 0, 0.60) !default;
  21. $ax5modal-resizer-opacity : 0.3 !default;
  22. //** Border color for elements within dialog
  23. $ax5modal-default-text: #222 !default;
  24. $ax5modal-default-border: 1px solid #ddd !default;
  25. $ax5modal-default-header-bg: #f5f5f5 !default;
  26. @mixin ax-modal() {
  27. box-sizing: border-box;
  28. *,
  29. *:before,
  30. *:after {
  31. box-sizing: border-box;
  32. }
  33. background-color: $ax5modal-bg;
  34. border: $ax5modal-border;
  35. @include ax-border-radius($ax5modal-border-radius);
  36. @include box-shadow($ax5modal-box-shadow);
  37. z-index: $ax5modal-z-index;
  38. position: fixed;
  39. left: 0px;
  40. top: 0px;
  41. //overflow: hidden;
  42. box-sizing: content-box;
  43. }
  44. @mixin ax-modal-section() {
  45. .ax-modal-header {
  46. user-select: none;
  47. //font-size: 1em;
  48. font-weight: 600;
  49. padding: $ax5modal-header-padding;
  50. border-bottom: 1px solid transparent;
  51. border-top-left-radius: $ax5modal-border-radius;
  52. border-top-right-radius: $ax5modal-border-radius;
  53. cursor: move;
  54. .ax-modal-header-addon{
  55. position: absolute;
  56. right: 0px;
  57. top: 0px;
  58. padding: $ax5modal-header-addon-padding;
  59. [data-modal-header-btn]{
  60. border: 0;
  61. padding: $ax5modal-header-addon-btn-padding;
  62. background: transparent;
  63. display: inline-block;
  64. text-align: center;
  65. cursor: pointer;
  66. outline: 0;
  67. }
  68. }
  69. }
  70. .ax-modal-body {
  71. border-bottom-left-radius: $ax5modal-border-radius;
  72. border-bottom-right-radius: $ax5modal-border-radius;
  73. padding: $ax5modal-body-padding;
  74. text-align: center;
  75. @include flex(1);
  76. position: relative;
  77. overflow: hidden;
  78. iframe {
  79. border: 0 none;
  80. }
  81. .fadeIn{
  82. @include animation(ax-modal-fade-in $ax5modal-easing-time-open $ease-out-back forwards);
  83. }
  84. .fadeOut{
  85. @include animation(ax-modal-fade-out $ax5modal-easing-time-open $ease-out-back forwards);
  86. }
  87. }
  88. }
  89. @mixin modal-variant($text-color, $border, $header-bg-color) {
  90. .ax-modal-header {
  91. color: $text-color;
  92. background: $header-bg-color;
  93. .ax-modal-header-addon{
  94. a{
  95. color: $text-color;
  96. outline: 0;
  97. }
  98. }
  99. }
  100. .ax-modal-body {
  101. }
  102. }
  103. @include keyframes(ax-modal) {
  104. 0% {
  105. opacity: 0.0;
  106. //@include transform(translateY(20%));
  107. @include transform(scale(0.8));
  108. }
  109. 100% {
  110. opacity: 1.0;
  111. @include transform(scale(1.0));
  112. }
  113. /*
  114. 0% {
  115. opacity: 0.0;
  116. -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  117. transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  118. }
  119. 0.1% {
  120. opacity: 1.0;
  121. -webkit-transform: matrix3d(0.5, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  122. transform: matrix3d(0.5, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  123. }
  124. 5.9% {
  125. -webkit-transform: matrix3d(0.711, 0, 0, 0, 0, 0.742, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  126. transform: matrix3d(0.711, 0, 0, 0, 0, 0.742, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  127. }
  128. 7.7% {
  129. -webkit-transform: matrix3d(0.768, 0, 0, 0, 0, 0.812, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  130. transform: matrix3d(0.768, 0, 0, 0, 0, 0.812, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  131. }
  132. 11.5% {
  133. -webkit-transform: matrix3d(0.869, 0, 0, 0, 0, 0.935, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  134. transform: matrix3d(0.869, 0, 0, 0, 0, 0.935, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  135. }
  136. 11.7% {
  137. -webkit-transform: matrix3d(0.873, 0, 0, 0, 0, 0.94, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  138. transform: matrix3d(0.873, 0, 0, 0, 0, 0.94, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  139. }
  140. 15.2% {
  141. -webkit-transform: matrix3d(0.941, 0, 0, 0, 0, 1.014, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  142. transform: matrix3d(0.941, 0, 0, 0, 0, 1.014, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  143. }
  144. 17.5% {
  145. -webkit-transform: matrix3d(0.973, 0, 0, 0, 0, 1.045, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  146. transform: matrix3d(0.973, 0, 0, 0, 0, 1.045, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  147. }
  148. 19% {
  149. -webkit-transform: matrix3d(0.99, 0, 0, 0, 0, 1.058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  150. transform: matrix3d(0.99, 0, 0, 0, 0, 1.058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  151. }
  152. 22.8% {
  153. -webkit-transform: matrix3d(1.019, 0, 0, 0, 0, 1.071, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  154. transform: matrix3d(1.019, 0, 0, 0, 0, 1.071, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  155. }
  156. 23.2% {
  157. -webkit-transform: matrix3d(1.021, 0, 0, 0, 0, 1.071, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  158. transform: matrix3d(1.021, 0, 0, 0, 0, 1.071, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  159. }
  160. 30.3% {
  161. -webkit-transform: matrix3d(1.036, 0, 0, 0, 0, 1.049, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  162. transform: matrix3d(1.036, 0, 0, 0, 0, 1.049, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  163. }
  164. 30.4% {
  165. -webkit-transform: matrix3d(1.036, 0, 0, 0, 0, 1.049, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  166. transform: matrix3d(1.036, 0, 0, 0, 0, 1.049, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  167. }
  168. 37.5% {
  169. -webkit-transform: matrix3d(1.028, 0, 0, 0, 0, 1.016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  170. transform: matrix3d(1.028, 0, 0, 0, 0, 1.016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  171. }
  172. 44.6% {
  173. -webkit-transform: matrix3d(1.016, 0, 0, 0, 0, 0.997, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  174. transform: matrix3d(1.016, 0, 0, 0, 0, 0.997, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  175. }
  176. 50.3% {
  177. -webkit-transform: matrix3d(1.008, 0, 0, 0, 0, 0.992, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  178. transform: matrix3d(1.008, 0, 0, 0, 0, 0.992, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  179. }
  180. 51.7% {
  181. -webkit-transform: matrix3d(1.006, 0, 0, 0, 0, 0.992, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  182. transform: matrix3d(1.006, 0, 0, 0, 0, 0.992, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  183. }
  184. 70.3% {
  185. -webkit-transform: matrix3d(0.998, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  186. transform: matrix3d(0.998, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  187. }
  188. 80.3% {
  189. -webkit-transform: matrix3d(0.999, 0, 0, 0, 0, 1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  190. transform: matrix3d(0.999, 0, 0, 0, 0, 1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  191. }
  192. 100% {
  193. -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  194. transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  195. }
  196. */
  197. }
  198. @include keyframes(ax-modal-destroy) {
  199. /*
  200. from {
  201. @include transform(scale(1));
  202. opacity: 1.0;
  203. }
  204. to {
  205. @include transform(scale(0.5));
  206. opacity: 0.0;
  207. }
  208. */
  209. 100% {
  210. opacity: 0.0;
  211. @include transform(translateY(20%));
  212. }
  213. 0% {
  214. opacity: 1.0;
  215. @include transform(translateY(0));
  216. }
  217. }
  218. @include keyframes(ax-modal-fullscreen) {
  219. 0% {
  220. @include transform(translateY(20%));
  221. }
  222. 100% {
  223. @include transform(translateY(0));
  224. }
  225. }
  226. @include keyframes(ax-modal-fullscreen-destroy) {
  227. 0% {
  228. @include transform(translateY(0));
  229. }
  230. 100% {
  231. @include transform(translateY(100%));
  232. }
  233. }
  234. @include keyframes(ax-modal-fade-in){
  235. 0% {
  236. opacity: 0.0;
  237. }
  238. 100% {
  239. opacity: 1.0;
  240. }
  241. }
  242. @include keyframes(ax-modal-fade-out){
  243. 0% {
  244. opacity: 1.0;
  245. }
  246. 100% {
  247. opacity: 0.0;
  248. }
  249. }
  250. // mixins --------------------------------------------- end
  251. .ax5modal {
  252. * {
  253. box-sizing: border-box;
  254. }
  255. *:before,
  256. *:after {
  257. box-sizing: border-box;
  258. }
  259. @include animation(ax-modal $ax5modal-easing-time-open $ax5modal-easing-open forwards);
  260. @include transform(translateZ(0px));
  261. //@include transition(all $ax5modal-easing-time-open linear);
  262. @include ax-modal();
  263. @include ax-modal-section();
  264. @include modal-variant($ax5modal-default-text, $ax5modal-default-border, $ax5modal-default-header-bg);
  265. &.destroy {
  266. @include animation(ax-modal-destroy $ax5modal-easing-time-close $ax5modal-easing-close forwards);
  267. }
  268. &.fullscreen {
  269. border: 0px none;
  270. @include ax-border-radius(0px);
  271. @include box-shadow(none);
  272. @include animation(ax-modal-fullscreen $ax5modal-easing-time-open $ease-out-back forwards);
  273. &.destroy {
  274. @include animation(ax-modal-fullscreen-destroy $ax5modal-easing-time-close $ease-out-expo forwards);
  275. }
  276. }
  277. &.draged{
  278. .ax-modal-header {
  279. opacity: 0.5;
  280. }
  281. .ax-modal-body {
  282. opacity: 0.5;
  283. }
  284. }
  285. [data-ax5modal-resizer]{
  286. position: absolute;
  287. display: block;
  288. &:before{
  289. position: absolute;
  290. content: ' ';
  291. display: block;
  292. width: auto;
  293. height: auto;
  294. left: auto;
  295. top: auto;
  296. right: auto;
  297. bottom: auto;
  298. //background: #ff3300;
  299. //opacity: 0.3;
  300. }
  301. &[data-ax5modal-resizer="top"]{
  302. left: 0;
  303. top: 0;
  304. width: 100%;
  305. height: 0;
  306. &:before{
  307. width: 100%;
  308. height: 8px;
  309. left: 0;
  310. top: -4px;
  311. cursor: row-resize;
  312. }
  313. }
  314. &[data-ax5modal-resizer="bottom"]{
  315. left: 0;
  316. bottom: 0;
  317. width: 100%;
  318. height: 0;
  319. &:before{
  320. width: 100%;
  321. height: 8px;
  322. left: 0;
  323. top: -4px;
  324. cursor: row-resize;
  325. }
  326. }
  327. &[data-ax5modal-resizer="left"]{
  328. left: 0;
  329. top: 0;
  330. width: 0;
  331. height: 100%;
  332. &:before{
  333. width: 8px;
  334. height: 100%;
  335. left: -4px;
  336. top: 0;
  337. cursor: col-resize;
  338. }
  339. }
  340. &[data-ax5modal-resizer="right"]{
  341. right: 0;
  342. top: 0;
  343. width: 0;
  344. height: 100%;
  345. &:before{
  346. width: 8px;
  347. height: 100%;
  348. left: -4px;
  349. top: 0;
  350. cursor: col-resize;
  351. }
  352. }
  353. &[data-ax5modal-resizer="top-left"]{
  354. left: 0;
  355. top: 0;
  356. width: 0;
  357. height: 0;
  358. &:before{
  359. width: 8px;
  360. height: 8px;
  361. left: -4px;
  362. top: -4px;
  363. cursor: nwse-resize;
  364. }
  365. }
  366. &[data-ax5modal-resizer="top-right"]{
  367. right: 0;
  368. top: 0;
  369. width: 0;
  370. height: 0;
  371. &:before{
  372. width: 8px;
  373. height: 8px;
  374. left: -4px;
  375. top: -4px;
  376. cursor: nesw-resize;
  377. }
  378. }
  379. &[data-ax5modal-resizer="bottom-left"]{
  380. left: 0;
  381. bottom: 0;
  382. width: 0;
  383. height: 0;
  384. &:before{
  385. width: 8px;
  386. height: 8px;
  387. left: -4px;
  388. top: -4px;
  389. cursor: nesw-resize;
  390. }
  391. }
  392. &[data-ax5modal-resizer="bottom-right"]{
  393. right: 0;
  394. bottom: 0;
  395. width: 0;
  396. height: 0;
  397. &:before{
  398. width: 8px;
  399. height: 8px;
  400. left: -4px;
  401. top: -4px;
  402. cursor: nwse-resize;
  403. }
  404. }
  405. }
  406. }
  407. // resizer가 활성화 되면 리사이저 백그라운드도 함께 활성화 됩니다. 백그라운드는 페이지 전체를 투명 레이어로 덮어 리사이저가 자유롭게 활동 하도록 도와 줍니다.
  408. .ax5modal-resizer-background{
  409. position: fixed;
  410. left: 0px;
  411. top: 0px;
  412. width: 100%;
  413. height: 100%;
  414. background: transparent;
  415. z-index: $ax5modal-z-index;
  416. //opacity: 0.1;
  417. cursor: move;
  418. }
  419. .ax5modal-resizer{
  420. position: absolute;
  421. left: 0px;
  422. top: 0px;
  423. z-index: $ax5modal-z-index + 1;
  424. cursor: move;
  425. box-sizing: $ax5modal-box-model;
  426. background-color: $ax5modal-resizer-bg;
  427. border: $ax5modal-resizer-border;
  428. opacity: $ax5modal-resizer-opacity;
  429. @include ax-border-radius($ax5modal-border-radius);
  430. @include box-shadow($ax5modal-box-shadow);
  431. }