Styles.razor 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695
  1. @using System.Globalization
  2. @using System.Drawing
  3. <style>
  4. /**********
  5. MAIN
  6. ***********/
  7. .fr-@WebReport.ID-container {
  8. width: @Width;
  9. height: @Height;
  10. background-color: white;
  11. display: @WebReport.InlineStyle;
  12. flex-direction: @WebReport.Toolbar.Vertical;
  13. position: relative;
  14. align-items: @WebReport.Toolbar.ContentPosition;
  15. }
  16. .fr-@WebReport.ID-container * {
  17. box-sizing: content-box;
  18. -moz-box-sizing: content-box;
  19. }
  20. .fr-form-header {
  21. padding: 5px;
  22. padding-left: 12px;
  23. font: 14px Verdana,Arial sans-serif Regular;
  24. min-height: 18px;
  25. text-overflow: ellipsis;
  26. overflow: hidden;
  27. border-bottom: solid 1px lightgray;
  28. vertical-align: middle;
  29. text-align: -webkit-match-parent;
  30. height: 30px;
  31. align-items: center;
  32. display: flex;
  33. font-weight: bold;
  34. }
  35. /*************
  36. TOOLBAR
  37. **************/
  38. .fr-@WebReport.ID-toolbar {
  39. background-color: @ColorTranslator.ToHtml(WebReport.Toolbar.Color);
  40. display: flex;
  41. -moz-animation: flex;
  42. font: @WebReport.Toolbar.UserFontSettings;
  43. flex-direction: @WebReport.Toolbar.RowOrColumn;
  44. width: fit-content;
  45. height: @(WebReport.Toolbar.VerticalToolbarHeight);
  46. order: @WebReport.Toolbar.TopOrBottom;
  47. position: relative;
  48. align-items: center;
  49. justify-content: @WebReport.Toolbar.Content;
  50. z-index: 2;
  51. border-radius: @(WebReport.Toolbar.ToolbarRoundness)px;
  52. @*@(WebReport.Tabs.Count > 1 ? "" : "box-shadow: 0px 3px 4px -2px rgba(0, 0, 0, 0.2)")*@
  53. -webkit-user-select: none; /* Safari */
  54. -ms-user-select: none; /* IE 10 and IE 11 */
  55. user-select: none; /* Standard syntax */
  56. @WebReport.Toolbar.StickyToolbarTags
  57. }
  58. .fr-@WebReport.ID-toolbar-item {
  59. height: @ToolbarHeight;
  60. border-radius:@(WebReport.Toolbar.ToolbarRoundness)px;
  61. position: relative;
  62. margin-left: 10px;
  63. margin-right: 10px;
  64. display: flex;
  65. align-items: center;
  66. }
  67. .fr-@WebReport.ID-toolbar-item:hover {
  68. @*background-color: @ColorTranslator.ToHtml(WebReport.Toolbar.Color);*@
  69. }
  70. .fr-@WebReport.ID-toolbar-item > img {
  71. height: calc(@ToolbarHeight * 0.5);
  72. padding-left: calc(@ToolbarHeight * 0.25);
  73. padding-right: calc(@ToolbarHeight * 0.25);
  74. opacity: @WebReport.Toolbar.TransparencyIcon;
  75. filter:invert(@WebReport.Toolbar.ColorIcon);
  76. display: block;
  77. }
  78. .fr-@WebReport.ID-toolbar-item:hover > img {
  79. opacity: 0.5;
  80. }
  81. /**********************
  82. TOOLBAR DROPDOWN
  83. ***********************/
  84. .fr-@WebReport.ID-toolbar-dropdown-content {
  85. display: none;
  86. box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  87. background-color: @ColorTranslator.ToHtml(WebReport.Toolbar.DropDownMenuColor);
  88. color:@ColorTranslator.ToHtml(WebReport.Toolbar.DropDownMenuTextColor);
  89. min-width: 50px;
  90. z-index: 2;
  91. position: absolute;
  92. @*@WebReport.Toolbar.DropDownMenuPosition;*@
  93. white-space: nowrap;
  94. border-radius: @WebReport.Toolbar.DropDownListBorder;
  95. top: 40px;
  96. }
  97. .fr-@WebReport.ID-toolbar-item:hover > .fr-@WebReport.ID-toolbar-dropdown-content {
  98. display: block;
  99. @WebReport.Toolbar.DropDownListPosition
  100. }
  101. .fr-@WebReport.ID-toolbar-dropdown-content > a {
  102. float: none;
  103. color: @ColorTranslator.ToHtml(WebReport.Toolbar.DropDownMenuTextColor);
  104. padding: 6px 12px 6px 8px;
  105. text-decoration: none;
  106. display: block;
  107. z-index:3;
  108. text-align: left;
  109. height: auto;
  110. font-size: 14px;
  111. user-select: none;
  112. border-radius: @WebReport.Toolbar.DropDownListBorder;
  113. }
  114. .fr-@WebReport.ID-toolbar-dropdown-content > a:hover {
  115. color: @ColorTranslator.ToHtml(WebReport.Toolbar.DropDownMenuTextColor);
  116. background-color: @ColorTranslator.ToHtml(WebReport.Toolbar.DropDownMenuColor);
  117. opacity: 0.4;
  118. z-index: 3;
  119. cursor: pointer;
  120. }
  121. .fr-webreport-toolbar-narrow > img {
  122. transform: rotate(@(WebReport.Toolbar.ToolbarNarrow)deg);
  123. height: calc(@ToolbarHeight * 0.35);
  124. padding-left: 0;
  125. padding-right: 0;
  126. }
  127. .fr-webreport-toolbar-notbutton:hover {
  128. background-color: transparent;
  129. }
  130. .fr-webreport-toolbar-notbutton:hover > img {
  131. opacity: 1;
  132. }
  133. .fr-webreport-zoom-selected {
  134. font-weight: bold;
  135. }
  136. .fr-webreport-settings-btn {
  137. background-color: transparent;
  138. color: transparent;
  139. padding-left: 1rem;
  140. margin-left: 230px;
  141. display: flex;
  142. float: right;
  143. margin-top: -1.6rem;
  144. outline: none;
  145. padding-right: 1rem;
  146. border: none;
  147. position: relative;
  148. z-index: 4;
  149. flex-direction: row;
  150. align-content: space-around;
  151. justify-content: space-between;
  152. opacity:1;
  153. cursor: pointer;
  154. }
  155. .fr-webreport-settings-btn:hover {
  156. background-color: transparent;
  157. color: transparent;
  158. padding-left: 1rem;
  159. margin-left: 230px;
  160. display: flex;
  161. float: right;
  162. margin-top: -1.6rem;
  163. outline: none;
  164. padding-right: 1rem;
  165. border: none;
  166. position: relative;
  167. z-index: 4;
  168. flex-direction: row;
  169. align-content: space-around;
  170. justify-content: space-between;
  171. opacity:0.5;
  172. }
  173. .fr-webreport-settings-btn::-moz-focus-inner {
  174. background-color: transparent;
  175. color: transparent;
  176. padding-left: 1rem;
  177. margin-left: 230px;
  178. display: flex;
  179. float: right;
  180. margin-top: -1.6rem;
  181. outline: none;
  182. padding-right: 1rem;
  183. border: none;
  184. position: relative;
  185. z-index: 4;
  186. flex-direction: row;
  187. align-content: space-around;
  188. justify-content: space-between;
  189. }
  190. /************************
  191. POPUP
  192. *************************/
  193. .fr-webreport-popup {
  194. min-width: 100%;
  195. position: absolute;
  196. min-height: 100%;
  197. z-index: 3;
  198. padding-bottom: 1rem;
  199. background-color: #0000005c;
  200. display: flex;
  201. align-content: flex-start;
  202. flex-direction: row;
  203. flex-wrap: nowrap;
  204. justify-content: flex-start;
  205. align-items: flex-start;
  206. @WebReport.Toolbar.Exports.FixedContainerPosition
  207. }
  208. .fr-webreport-popup-content {
  209. display: flex;
  210. width: auto;
  211. min-width: 348px;
  212. height: fit-content;
  213. margin-top: 2.5rem;
  214. margin-left: 2.6rem;
  215. padding: 0px 9px 50px 9px;
  216. z-index: 4;
  217. border-radius: 30px 30px 12px 12px;
  218. background-color: #EFEFEF;
  219. flex-wrap: nowrap;
  220. align-content: center;
  221. justify-content: center;
  222. align-items: center;
  223. flex-direction: column;
  224. @WebReport.Toolbar.ModalContainerPosition;
  225. @WebReport.Toolbar.Exports.FixedContainerTags
  226. }
  227. .fr-webreport-popup-content-title {
  228. display: flex;
  229. width: 100%;
  230. background-color: #35363A;
  231. color: @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.FontColor);
  232. margin-bottom: 10px;
  233. margin-top: 10px;
  234. box-shadow: 0rem -0.1rem 0rem 0.6rem #35363A;
  235. align-items: center;
  236. border-radius: 12px 12px 0px 0px;
  237. flex-direction: column;
  238. font-weight: bold;
  239. flex-wrap: nowrap;
  240. justify-content: flex-start;
  241. align-content: center;
  242. font: @WebReport.Toolbar.Exports.UserFontSettingsStyle 16px @WebReport.Toolbar.Exports.UserFontSettingsFamily;
  243. }
  244. .fr-webreport-popup-content-title input {
  245. background-color: white;
  246. border: 3px solid @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.Color);
  247. color: black;
  248. max-height: 9.8px;
  249. border-radius: 3px;
  250. }
  251. .fr-webreport-popup-content-export-parameters {
  252. display: flex;
  253. width: 100%;
  254. -ms-flex-wrap: wrap;
  255. flex-direction: column;
  256. border-radius: 3px;
  257. padding-bottom: 1rem;
  258. /*padding-top: 1rem;*/
  259. align-content: flex-start;
  260. flex-wrap: wrap;
  261. align-items: flex-start;
  262. justify-content: flex-start;
  263. font: @WebReport.Toolbar.Exports.UserFontSettingsStyle 14px @WebReport.Toolbar.Exports.UserFontSettingsFamily;
  264. }
  265. .fr-webreport-popup-content-export-parameters-col {
  266. display: flex;
  267. align-content: center;
  268. flex-wrap: nowrap;
  269. flex-direction: column;
  270. font: @WebReport.Toolbar.Exports.UserFontSettingsStyle 11px @WebReport.Toolbar.Exports.UserFontSettingsFamily;
  271. }
  272. .input-error
  273. {
  274. animation: shake 0.2s ease-in-out 0s 2;
  275. box-shadow: 0 0 0.5em red;
  276. }
  277. @@keyframes shake {
  278. 0% { margin-left: 0rem; }
  279. 25% { margin-left: 0.5rem; }
  280. 75% { margin-left: -0.5rem; }
  281. 100% { margin-left: 0rem; }
  282. }
  283. .custom-select{
  284. width:auto;
  285. outline: none;
  286. min-width: 20px;
  287. border: none;
  288. padding: 0px 5px;
  289. margin: 5px;
  290. -webkit-appearance: none;
  291. -moz-appearance: none;
  292. border-radius: 3px;
  293. height: 25px;
  294. overflow: hidden;
  295. background: #ffffff url(/_fr/resources.getResource?resourceName=select-arrow.svg&contentType=image%2Fsvg%2Bxml) no-repeat;
  296. background-position: calc(100% - 10px) center;
  297. -moz-appearance:none; /* Firefox */
  298. -webkit-appearance:none; /* Safari and Chrome */
  299. appearance: none;
  300. padding:0 30px 0 10px !important;
  301. -webkit-padding-end: 30px !important;
  302. -webkit-padding-start: 10px !important;
  303. font: @WebReport.Toolbar.Exports.UserFontSettingsStyle 12px @WebReport.Toolbar.Exports.UserFontSettingsFamily;
  304. }
  305. .fr-webreport-popup-content-export-parameters-input {
  306. margin-left: 0.3rem;
  307. margin-bottom: 0.3rem;
  308. padding: 6px;
  309. outline: none;
  310. border: none;
  311. margin-left: 5px;
  312. margin-right: 5px;
  313. min-width: inherit;
  314. height: 8px;
  315. max-width: 70px;
  316. border-radius: 4px;
  317. font: @WebReport.Toolbar.Exports.UserFontSettingsStyle 10px @WebReport.Toolbar.Exports.UserFontSettingsFamily;
  318. }
  319. .fr-webreport-pagerange-title{
  320. margin-top: 25px;
  321. }
  322. .fr-webreport-popup-settings-title{
  323. padding-bottom: 10px;
  324. font-weight: bold;
  325. }
  326. .fr-webreport-popup-content-export-parameters-row {
  327. display: flex;
  328. padding-top: 5px;
  329. flex-direction: row;
  330. align-items: flex-start;
  331. justify-content: flex-start;
  332. }
  333. .fr-webreport-popup-content-export-parameters-slider {
  334. display: flex;
  335. margin-bottom: 10px;
  336. margin-top: 10px;
  337. margin-left: 5px;
  338. background-color: transparent;
  339. border-radius: 10px;
  340. border-radius: 3px;
  341. justify-content: center;
  342. align-items: center;
  343. align-content: center;
  344. flex-direction: row;
  345. justify-content: flex-start;
  346. }
  347. .fr-webreport-popup-content-export-parameters-slider span {
  348. color: black;
  349. background-color: transparent;
  350. min-width: 128px;
  351. padding: 5px;
  352. white-space: nowrap;
  353. font:@(WebReport.Toolbar.Exports.UserFontSettingsStyle) 11px @(WebReport.Toolbar.Exports.UserFontSettingsFamily);
  354. }
  355. input[type=range] {
  356. height: 1.7rem;
  357. overflow: hidden;
  358. -webkit-appearance: none;
  359. margin-left: 0;
  360. outline: none;
  361. background-color: #424242;
  362. }
  363. input[type=range]::-webkit-slider-runnable-track {
  364. width: 100%;
  365. height: 100%;
  366. cursor: pointer;
  367. animate: 0.2s;
  368. background: #424242;
  369. border-radius: 0px;
  370. }
  371. input[type=range]::-webkit-slider-thumb {
  372. height: 100%;
  373. width: 5%;
  374. border-radius: 0px;
  375. background: linear-gradient(gray,5%, @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.Color) );
  376. cursor: pointer;
  377. -webkit-appearance: none;
  378. box-shadow: -100vw 0vw 0vw 100vw @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.Color);
  379. margin-top: 0px;
  380. }
  381. label{
  382. margin-bottom: 5px;
  383. margin-top: 5px;
  384. }
  385. button{
  386. text-align: left;
  387. }
  388. .fr-webreport-popup-content-export-parameters-col input[type="text"] {
  389. background-color: white;
  390. color: #000000;
  391. border: 2px solid @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.Color);
  392. max-height: 11px;
  393. }
  394. .fr-webreport-popup-content-export-parameters-button {
  395. border: none;
  396. padding: 5px;
  397. margin-left: 5px;
  398. margin-right: 5px;
  399. min-width: inherit;
  400. border-radius: 3px;
  401. font: @WebReport.Toolbar.Exports.UserFontSettingsStyle 11px @WebReport.Toolbar.Exports.UserFontSettingsFamily;
  402. color: black;
  403. background: url(_content/FastReport.Web/Resources/button.svg) no-repeat;
  404. background-position: 0px center;
  405. padding-left: 20px;
  406. vertical-align: middle;
  407. cursor: pointer;
  408. }
  409. .fr-webreport-popup-content-buttons {
  410. display: flex;
  411. padding-top: 1rem;
  412. margin-bottom: -2.3rem;
  413. width: 100%;
  414. flex-wrap: nowrap;
  415. align-content: center;
  416. justify-content: space-between;
  417. align-items: center;
  418. flex-direction: row;
  419. }
  420. .fr-webreport-popup-content-btn-submit {
  421. outline: none;
  422. border: none;
  423. background-color: #DD4433;
  424. border-radius: 3px;
  425. padding: 3px;
  426. font-weight: normal;
  427. color: @ColorTranslator.ToHtml(WebReport.Toolbar.Exports.FontColor);
  428. font: @WebReport.Toolbar.Exports.UserFontSettingsStyle 14px @WebReport.Toolbar.Exports.UserFontSettingsFamily;
  429. width: 70px;
  430. height: 30px;
  431. cursor: pointer;
  432. text-align: center;
  433. }
  434. .fr-webreport-popup-content-btn-cancel{
  435. padding: 3px;
  436. background-color: #D9D9D9;
  437. font: @WebReport.Toolbar.Exports.UserFontSettingsStyle 14px @WebReport.Toolbar.Exports.UserFontSettingsFamily;
  438. width: 70px;
  439. height: 30px;
  440. border-radius: 3px;
  441. border: none;
  442. outline: none;
  443. color: black;
  444. text-align: center;
  445. }
  446. .fr-webreport-popup-content-btn-disabled{
  447. background-color: #D9D9D9;
  448. cursor: default;
  449. }
  450. .fr-@WebReport.ID-container .active-button {
  451. background: url(_content/FastReport.Web/Resources/button-active.svg) no-repeat;
  452. background-position: 0px center;
  453. vertical-align: middle;
  454. }
  455. .fr-webreport-popup-content-export-parameters-button:hover {
  456. cursor: pointer;
  457. }
  458. /************************
  459. TOOLBAR NAVIGATION
  460. *************************/
  461. .fr-@WebReport.ID-toolbar-slash > img {
  462. margin-left: 0px;
  463. margin-right: 0px;
  464. height: calc(@ToolbarHeight * 0.35);
  465. padding-left: 0;
  466. padding-right: 0;
  467. }
  468. .fr-@WebReport.ID-toolbar-item > input {
  469. font-family: Arial,sans-serif;
  470. font-size: @CalculateToolBarHeight(0.35f);
  471. text-align: center;
  472. border: 0;
  473. background: #fbfbfb;
  474. border-radius: 5px;
  475. height: @CalculateToolBarHeight(0.4f);
  476. width: 3em;
  477. display: block;
  478. }
  479. .fr-@WebReport.ID-toolbar-item > input:hover:not([readonly]) {
  480. background: #fff;
  481. }
  482. .fr-@WebReport.ID-toolbar-item > input[readonly] {
  483. cursor: default;
  484. }
  485. /***********
  486. TABS
  487. ***********/
  488. .fr-webreport-tabs {
  489. flex-shrink: 0;
  490. font-family: Verdana,Arial,sans-serif;
  491. background-color: #f1f1f1;
  492. display: table;
  493. width: @WebReport.Toolbar.TabsPositionSettings;
  494. max-width: @(WebReport.ReportMaxWidth)px;
  495. box-shadow: 0px 3px 4px -2px rgba(0, 0, 0, 0.2);
  496. position: relative;
  497. border-radius: 10px;
  498. z-index: 1;
  499. @WebReport.Toolbar.TabsPositionSettings
  500. @WebReport.Toolbar.StickyToolbarTabsTags
  501. }
  502. /***********
  503. MISC
  504. ***********/
  505. input[type="date"]::-webkit-calendar-picker-indicator{
  506. opacity: 0;
  507. }
  508. .datetimepicker > input[type="date"]{
  509. background: url(_content/FastReport.Web/Resources/date-picker.svg) no-repeat;
  510. background-size: 10px;
  511. background-position: right 5px center;
  512. background-origin: content-box, content-box;
  513. }
  514. .datetimepicker > input[type="date"]:disabled {
  515. background: url("") no-repeat;
  516. }
  517. /*****************
  518. EMAIL EXPORT
  519. ******************/
  520. .popup-notification {
  521. position: fixed;
  522. bottom: 20px;
  523. right: 20px;
  524. display: flex;
  525. align-items: center;
  526. padding: 10px 20px;
  527. border-radius: 4px;
  528. font-size: 14px;
  529. color: white;
  530. opacity: 1;
  531. transition: opacity 0.5s;
  532. z-index: 9999;
  533. }
  534. .popup-notification.positive {
  535. background-color: #44cc44;
  536. color: white;
  537. }
  538. .popup-notification.negative {
  539. background-color: #cc4444;
  540. color: white;
  541. }
  542. .popup-notification.hide {
  543. opacity: 0;
  544. pointer-events: none;
  545. }
  546. .popup-notification img {
  547. margin-right: 10px;
  548. }
  549. .fr-email-export-form {
  550. display: flex;
  551. flex-direction: column;
  552. padding: 5px;
  553. box-sizing: border-box;
  554. width: 100%;
  555. }
  556. .fr-email-export-field {
  557. display: flex;
  558. margin-bottom: 5px;
  559. justify-content: space-between;
  560. width: 100%;
  561. font-size: 12px;
  562. }
  563. .fr-email-export-input{
  564. width: 244px;
  565. padding: 8px;
  566. border: none;
  567. border-radius: 4px;
  568. background: #FFF;
  569. display: flex;
  570. margin-left: 30px;
  571. font-size: 12px;
  572. }
  573. .fr-email-export-textarea{
  574. margin-left: 10px;
  575. width: 244px;
  576. height: 146px;
  577. padding: 8px;
  578. border: none;
  579. border-radius: 5px;
  580. resize: none;
  581. font-size: 12px;
  582. }
  583. .fr-email-export-select{
  584. margin-left: 10px;
  585. width: 244px;
  586. padding: 8px;
  587. border-radius: 5px;
  588. border: none;
  589. font-size: 12px;
  590. }
  591. .fr-required-star {
  592. color: red;
  593. }
  594. </style>
  595. @code {
  596. [Parameter]
  597. public WebReport WebReport { get; set; }
  598. protected override void OnParametersSet()
  599. {
  600. ToolbarHeight = WebReport.Toolbar.Height.ToString() + "px";
  601. }
  602. //protected override bool ShouldRender() => false;
  603. private string Width
  604. {
  605. get
  606. {
  607. if (!WebReport.Width.IsNullOrWhiteSpace())
  608. return WebReport.Width + "px";
  609. return string.Empty;
  610. }
  611. }
  612. private string Height
  613. {
  614. get
  615. {
  616. if (!WebReport.Height.IsNullOrWhiteSpace())
  617. return WebReport.Height + "px";
  618. return string.Empty;
  619. }
  620. }
  621. private string ToolbarHeight
  622. {
  623. get;
  624. set;
  625. }
  626. private string CalculateToolBarHeight(float variable)
  627. {
  628. var calculatedHeight = WebReport.Toolbar.Height * variable;
  629. return $"{calculatedHeight.ToString("0.##", CultureInfo.InvariantCulture)}px";
  630. }
  631. }