pyreportkit 0.1.0__py3-none-any.whl

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.
Files changed (222) hide show
  1. pyreportkit-0.1.0.dist-info/METADATA +187 -0
  2. pyreportkit-0.1.0.dist-info/RECORD +222 -0
  3. pyreportkit-0.1.0.dist-info/WHEEL +5 -0
  4. pyreportkit-0.1.0.dist-info/licenses/LICENSE +21 -0
  5. pyreportkit-0.1.0.dist-info/top_level.txt +1 -0
  6. reportkit/__init__.py +0 -0
  7. reportkit/components/__init__.py +45 -0
  8. reportkit/components/document/__init__.py +6 -0
  9. reportkit/components/document/footer.py +12 -0
  10. reportkit/components/document/header.py +12 -0
  11. reportkit/components/document/page.py +18 -0
  12. reportkit/components/document/report.py +12 -0
  13. reportkit/components/information/__init__.py +4 -0
  14. reportkit/components/information/info_grid.py +23 -0
  15. reportkit/components/information/key_value.py +28 -0
  16. reportkit/components/layout/__init__.py +9 -0
  17. reportkit/components/layout/box.py +10 -0
  18. reportkit/components/layout/column.py +15 -0
  19. reportkit/components/layout/divider.py +10 -0
  20. reportkit/components/layout/grid.py +12 -0
  21. reportkit/components/layout/row.py +15 -0
  22. reportkit/components/layout/section.py +10 -0
  23. reportkit/components/layout/spacer.py +12 -0
  24. reportkit/components/media/__init__.py +4 -0
  25. reportkit/components/media/chart.py +14 -0
  26. reportkit/components/media/image.py +25 -0
  27. reportkit/components/pagination/__init__.py +5 -0
  28. reportkit/components/pagination/page_break.py +10 -0
  29. reportkit/components/pagination/page_count.py +10 -0
  30. reportkit/components/pagination/page_number.py +21 -0
  31. reportkit/components/table/__init__.py +7 -0
  32. reportkit/components/table/cell.py +27 -0
  33. reportkit/components/table/column.py +29 -0
  34. reportkit/components/table/row.py +25 -0
  35. reportkit/components/table/style.py +18 -0
  36. reportkit/components/table/table.py +27 -0
  37. reportkit/components/typography/__init__.py +6 -0
  38. reportkit/components/typography/heading.py +13 -0
  39. reportkit/components/typography/rich_text.py +23 -0
  40. reportkit/components/typography/text.py +12 -0
  41. reportkit/components/typography/text_span.py +24 -0
  42. reportkit/core/__init__.py +4 -0
  43. reportkit/core/component.py +12 -0
  44. reportkit/core/container.py +66 -0
  45. reportkit/core/exceptions.py +0 -0
  46. reportkit/core/factory.py +53 -0
  47. reportkit/core/registry.py +50 -0
  48. reportkit/core/serializer.py +90 -0
  49. reportkit/exporters/__init__.py +0 -0
  50. reportkit/exporters/base.py +17 -0
  51. reportkit/exporters/excel/__init__.py +8 -0
  52. reportkit/exporters/excel/exceptions.py +4 -0
  53. reportkit/exporters/excel/exporter.py +68 -0
  54. reportkit/exporters/excel/renderers/__init__.py +34 -0
  55. reportkit/exporters/excel/renderers/base.py +27 -0
  56. reportkit/exporters/excel/renderers/information.py +55 -0
  57. reportkit/exporters/excel/renderers/layout/__init__.py +7 -0
  58. reportkit/exporters/excel/renderers/layout/columns.py +48 -0
  59. reportkit/exporters/excel/renderers/layout/data.py +46 -0
  60. reportkit/exporters/excel/renderers/layout/page.py +24 -0
  61. reportkit/exporters/excel/renderers/layout/spacing.py +30 -0
  62. reportkit/exporters/excel/renderers/layout/stack.py +13 -0
  63. reportkit/exporters/excel/renderers/media.py +46 -0
  64. reportkit/exporters/excel/renderers/registry.py +22 -0
  65. reportkit/exporters/excel/renderers/table/__init__.py +4 -0
  66. reportkit/exporters/excel/renderers/table/cells.py +17 -0
  67. reportkit/exporters/excel/renderers/table/data.py +38 -0
  68. reportkit/exporters/excel/renderers/table/renderer.py +64 -0
  69. reportkit/exporters/excel/renderers/table/widths.py +29 -0
  70. reportkit/exporters/excel/renderers/text.py +40 -0
  71. reportkit/exporters/excel/styles.py +130 -0
  72. reportkit/exporters/excel/values/__init__.py +5 -0
  73. reportkit/exporters/excel/values/cells.py +60 -0
  74. reportkit/exporters/excel/values/components.py +16 -0
  75. reportkit/exporters/excel/values/formats.py +31 -0
  76. reportkit/exporters/excel/values/numbers.py +19 -0
  77. reportkit/exporters/excel/workbook/__init__.py +5 -0
  78. reportkit/exporters/excel/workbook/data.py +48 -0
  79. reportkit/exporters/excel/workbook/formatted.py +63 -0
  80. reportkit/exporters/excel/workbook/styles.py +27 -0
  81. reportkit/exporters/excel/workbook/workbook.py +65 -0
  82. reportkit/exporters/excel/worksheet/__init__.py +5 -0
  83. reportkit/exporters/excel/worksheet/borders.py +30 -0
  84. reportkit/exporters/excel/worksheet/cells.py +38 -0
  85. reportkit/exporters/excel/worksheet/constants.py +12 -0
  86. reportkit/exporters/excel/worksheet/data.py +51 -0
  87. reportkit/exporters/excel/worksheet/formatted.py +158 -0
  88. reportkit/exporters/excel/worksheet/page.py +23 -0
  89. reportkit/exporters/html/__init__.py +6 -0
  90. reportkit/exporters/html/assets.py +87 -0
  91. reportkit/exporters/html/direction.py +15 -0
  92. reportkit/exporters/html/engine.py +37 -0
  93. reportkit/exporters/html/exporter.py +38 -0
  94. reportkit/exporters/html/page/__init__.py +3 -0
  95. reportkit/exporters/html/page/components.py +47 -0
  96. reportkit/exporters/html/page/margins.py +24 -0
  97. reportkit/exporters/html/page/numbering.py +31 -0
  98. reportkit/exporters/html/page/resolver.py +37 -0
  99. reportkit/exporters/html/page/running.py +30 -0
  100. reportkit/exporters/html/page/styles.py +22 -0
  101. reportkit/exporters/html/page/validator.py +76 -0
  102. reportkit/exporters/html/registry.py +45 -0
  103. reportkit/exporters/html/renderers/__init__.py +37 -0
  104. reportkit/exporters/html/renderers/base.py +20 -0
  105. reportkit/exporters/html/renderers/document/__init__.py +6 -0
  106. reportkit/exporters/html/renderers/document/footer.py +18 -0
  107. reportkit/exporters/html/renderers/document/header.py +18 -0
  108. reportkit/exporters/html/renderers/document/page.py +17 -0
  109. reportkit/exporters/html/renderers/document/report.py +16 -0
  110. reportkit/exporters/html/renderers/information/__init__.py +4 -0
  111. reportkit/exporters/html/renderers/information/info_grid.py +26 -0
  112. reportkit/exporters/html/renderers/information/key_value.py +18 -0
  113. reportkit/exporters/html/renderers/layout/__init__.py +9 -0
  114. reportkit/exporters/html/renderers/layout/box.py +17 -0
  115. reportkit/exporters/html/renderers/layout/column.py +41 -0
  116. reportkit/exporters/html/renderers/layout/divider.py +16 -0
  117. reportkit/exporters/html/renderers/layout/grid.py +48 -0
  118. reportkit/exporters/html/renderers/layout/row.py +35 -0
  119. reportkit/exporters/html/renderers/layout/section.py +17 -0
  120. reportkit/exporters/html/renderers/layout/spacer.py +18 -0
  121. reportkit/exporters/html/renderers/media/__init__.py +3 -0
  122. reportkit/exporters/html/renderers/media/image.py +18 -0
  123. reportkit/exporters/html/renderers/pagination/__init__.py +4 -0
  124. reportkit/exporters/html/renderers/pagination/page_break.py +15 -0
  125. reportkit/exporters/html/renderers/pagination/page_number.py +15 -0
  126. reportkit/exporters/html/renderers/table/__init__.py +4 -0
  127. reportkit/exporters/html/renderers/table/cell.py +77 -0
  128. reportkit/exporters/html/renderers/table/table.py +69 -0
  129. reportkit/exporters/html/renderers/typography/__init__.py +5 -0
  130. reportkit/exporters/html/renderers/typography/heading.py +18 -0
  131. reportkit/exporters/html/renderers/typography/rich_text.py +28 -0
  132. reportkit/exporters/html/renderers/typography/text.py +16 -0
  133. reportkit/exporters/html/static/base.css +45 -0
  134. reportkit/exporters/html/static/information.css +83 -0
  135. reportkit/exporters/html/static/layout.css +81 -0
  136. reportkit/exporters/html/static/media.css +10 -0
  137. reportkit/exporters/html/static/pdf.css +96 -0
  138. reportkit/exporters/html/static/print.css +91 -0
  139. reportkit/exporters/html/static/table.css +222 -0
  140. reportkit/exporters/html/static/tokens.css +68 -0
  141. reportkit/exporters/html/static/typography.css +54 -0
  142. reportkit/exporters/html/styles.py +167 -0
  143. reportkit/exporters/html/templates/components/document/footer.html +3 -0
  144. reportkit/exporters/html/templates/components/document/header.html +3 -0
  145. reportkit/exporters/html/templates/components/document/page.html +8 -0
  146. reportkit/exporters/html/templates/components/document/report.html +3 -0
  147. reportkit/exporters/html/templates/components/information/info_grid.html +6 -0
  148. reportkit/exporters/html/templates/components/information/key_value.html +9 -0
  149. reportkit/exporters/html/templates/components/layout/box.html +3 -0
  150. reportkit/exporters/html/templates/components/layout/column.html +3 -0
  151. reportkit/exporters/html/templates/components/layout/divider.html +1 -0
  152. reportkit/exporters/html/templates/components/layout/grid.html +3 -0
  153. reportkit/exporters/html/templates/components/layout/row.html +3 -0
  154. reportkit/exporters/html/templates/components/layout/section.html +3 -0
  155. reportkit/exporters/html/templates/components/layout/spacer.html +1 -0
  156. reportkit/exporters/html/templates/components/media/image.html +8 -0
  157. reportkit/exporters/html/templates/components/pagination/page_break.html +1 -0
  158. reportkit/exporters/html/templates/components/pagination/page_number.html +4 -0
  159. reportkit/exporters/html/templates/components/table/cell.html +7 -0
  160. reportkit/exporters/html/templates/components/table/table.html +34 -0
  161. reportkit/exporters/html/templates/components/typography/heading.html +1 -0
  162. reportkit/exporters/html/templates/components/typography/rich_text.html +5 -0
  163. reportkit/exporters/html/templates/components/typography/text.html +1 -0
  164. reportkit/exporters/html/templates/document.html +17 -0
  165. reportkit/exporters/html/templates.py +30 -0
  166. reportkit/exporters/json.py +0 -0
  167. reportkit/exporters/pdf/__init__.py +8 -0
  168. reportkit/exporters/pdf/conversion.py +104 -0
  169. reportkit/exporters/pdf/dependencies.py +12 -0
  170. reportkit/exporters/pdf/exceptions.py +4 -0
  171. reportkit/exporters/pdf/exporter.py +16 -0
  172. reportkit/exporters/pdf/resources/__init__.py +4 -0
  173. reportkit/exporters/pdf/resources/fetcher.py +37 -0
  174. reportkit/exporters/pdf/resources/policy.py +60 -0
  175. reportkit/exporters/registry.py +50 -0
  176. reportkit/exporters/word/__init__.py +8 -0
  177. reportkit/exporters/word/document/__init__.py +4 -0
  178. reportkit/exporters/word/document/document.py +74 -0
  179. reportkit/exporters/word/document/engine.py +71 -0
  180. reportkit/exporters/word/exceptions.py +4 -0
  181. reportkit/exporters/word/exporter.py +32 -0
  182. reportkit/exporters/word/renderers/__init__.py +24 -0
  183. reportkit/exporters/word/renderers/base.py +56 -0
  184. reportkit/exporters/word/renderers/information.py +30 -0
  185. reportkit/exporters/word/renderers/layout/__init__.py +6 -0
  186. reportkit/exporters/word/renderers/layout/columns.py +82 -0
  187. reportkit/exporters/word/renderers/layout/page.py +38 -0
  188. reportkit/exporters/word/renderers/layout/spacing.py +33 -0
  189. reportkit/exporters/word/renderers/layout/stack.py +50 -0
  190. reportkit/exporters/word/renderers/media.py +49 -0
  191. reportkit/exporters/word/renderers/registry.py +22 -0
  192. reportkit/exporters/word/renderers/table/__init__.py +3 -0
  193. reportkit/exporters/word/renderers/table/cells.py +39 -0
  194. reportkit/exporters/word/renderers/table/renderer.py +95 -0
  195. reportkit/exporters/word/renderers/table/widths.py +12 -0
  196. reportkit/exporters/word/renderers/text.py +40 -0
  197. reportkit/exporters/word/styles/__init__.py +3 -0
  198. reportkit/exporters/word/styles/text.py +90 -0
  199. reportkit/exporters/word/styles/xml.py +147 -0
  200. reportkit/exporters/word/values.py +36 -0
  201. reportkit/formatting/__init__.py +0 -0
  202. reportkit/formatting/cell.py +12 -0
  203. reportkit/formatting/cells.py +41 -0
  204. reportkit/formatting/values.py +106 -0
  205. reportkit/rendering/__init__.py +0 -0
  206. reportkit/rendering/context.py +31 -0
  207. reportkit/rendering/table.py +56 -0
  208. reportkit/rendering/tracks.py +51 -0
  209. reportkit/rendering/visitor.py +55 -0
  210. reportkit/report.py +0 -0
  211. reportkit/styles/__init__.py +0 -0
  212. reportkit/styles/borders.py +6 -0
  213. reportkit/styles/style.py +117 -0
  214. reportkit/styles/table.py +37 -0
  215. reportkit/styles/theme.py +45 -0
  216. reportkit/styles/tokens.py +29 -0
  217. reportkit/validators/__init__.py +3 -0
  218. reportkit/validators/table/__init__.py +3 -0
  219. reportkit/validators/table/cell.py +38 -0
  220. reportkit/validators/table/column.py +62 -0
  221. reportkit/validators/table/row.py +37 -0
  222. reportkit/validators/table/table.py +63 -0
@@ -0,0 +1,77 @@
1
+ from dataclasses import dataclass
2
+ from .....components.table import TableCell
3
+ from .....formatting.cells import TableCellFormatter
4
+ from .....styles.style import Style
5
+ from ...direction import text_direction
6
+
7
+
8
+ @dataclass(frozen=True, kw_only=True)
9
+ class HtmlTableCell:
10
+ """
11
+ Hold a prepared HTML table cell.
12
+ """
13
+
14
+ display: str = ""
15
+ content: str | None = None
16
+ css_class: str = ""
17
+ style: str = ""
18
+ colspan: int = 1
19
+ rowspan: int = 1
20
+
21
+ @property
22
+ def lines(self):
23
+ """
24
+ Split display text into lines with their text directions.
25
+ """
26
+ return [(line, text_direction(line)) for line in self.display.split("\n")]
27
+
28
+
29
+ class TableCellRenderer:
30
+ """
31
+ Prepare table cells for HTML rendering.
32
+ """
33
+
34
+ def render(self, value, column, context, engine):
35
+ """
36
+ Render a value using its column definition.
37
+ """
38
+ if isinstance(value, TableCell):
39
+ return self.render_cell(value, context, engine, column)
40
+ formatted = TableCellFormatter.format(value, column)
41
+ return self.build(display=formatted.display, align=formatted.align, column=column, tone=formatted.tone, engine=engine)
42
+
43
+ def render_cell(self, cell, context, engine, column=None):
44
+ """
45
+ Render an explicit table cell.
46
+ """
47
+ content = "".join(engine.render(child, context) for child in cell.children) if cell.children else None
48
+ display = "" if cell.value is None else str(cell.value)
49
+ align = cell.align or (column.align if column else "start")
50
+ return self.build(display=display, content=content, align=align, column=column, style=cell.style, colspan=cell.colspan, rowspan=cell.rowspan, engine=engine)
51
+
52
+ @classmethod
53
+ def build(cls, display, align, column, engine, content=None, tone=None, style=None, colspan=1, rowspan=1):
54
+ """
55
+ Build the prepared HTML table cell.
56
+ """
57
+ return HtmlTableCell(display=display, content=content, css_class=cls.get_class(column, tone), style=cls.get_style(align, column, style, engine), colspan=colspan, rowspan=rowspan)
58
+
59
+ @staticmethod
60
+ def get_class(column, tone=None):
61
+ """
62
+ Get the table cell CSS classes.
63
+ """
64
+ classes = ["rk-table-cell"]
65
+ if tone:
66
+ classes.append(f"rk-table-cell--{tone}")
67
+ if column and column.nowrap:
68
+ classes.append("rk-table-cell--nowrap")
69
+ return " ".join(classes)
70
+
71
+ @staticmethod
72
+ def get_style(align, column, style, engine):
73
+ """
74
+ Get the resolved table cell style.
75
+ """
76
+ base = Style(text_align=align, vertical_align=column.vertical_align if column else None)
77
+ return engine.styles.resolve(base.merge(style) if style else base)
@@ -0,0 +1,69 @@
1
+ from .....validators.table.table import TableValidator
2
+ from ...direction import text_direction
3
+ from ..base import BaseHtmlRenderer
4
+ from .cell import TableCellRenderer
5
+
6
+
7
+ class TableRenderer(BaseHtmlRenderer):
8
+ """
9
+ Render tables, headers and rows using TableCellRenderer.
10
+ """
11
+
12
+ template_name = "components/table/table.html"
13
+
14
+ def __init__(self, cells=None):
15
+ """
16
+ Initialize the table cell renderer.
17
+ """
18
+ self.cells = cells if cells is not None else TableCellRenderer()
19
+
20
+ def render(self, component, context, engine):
21
+ """
22
+ Render the table.
23
+ """
24
+ style = engine.styles.resolve(context.resolve_style(component))
25
+ rows = self.prepare_rows(component, context, engine)
26
+ footer = self.prepare_row(component.footer, component.columns, context, engine) if component.footer else None
27
+ header = [self.prepare_header(column) for column in component.columns]
28
+ return engine.templates.render(self.template_name, container_class=self.get_container_class(component.table_style), table_class=self.get_class(component.table_style), columns=component.columns, header=header, caption=component.header, rows=rows, footer=footer, show_header=component.table_style.show_header, style=style)
29
+
30
+ def prepare_rows(self, component, context, engine):
31
+ """
32
+ Prepare table rows lazily.
33
+ """
34
+ for row in component.rows:
35
+ yield self.prepare_row(row, component.columns, context, engine)
36
+
37
+ def prepare_row(self, row, columns, context, engine):
38
+ """
39
+ Prepare one table row.
40
+ """
41
+ TableValidator.validate_row(row)
42
+ if row.cells is not None:
43
+ cells = [self.cells.render_cell(cell, context, engine) for cell in row.cells]
44
+ else:
45
+ cells = [self.cells.render(row.values.get(column.key), column, context, engine) for column in columns]
46
+ return {"css_class": f"rk-table-row rk-table-{row.kind}", "style": engine.styles.resolve(row.style), "cells": cells}
47
+
48
+ @staticmethod
49
+ def prepare_header(column):
50
+ """
51
+ Prepare one table header cell.
52
+ """
53
+ return {"title": column.title, "subtitle": column.subtitle, "title_dir": text_direction(column.title), "subtitle_dir": text_direction(column.subtitle), "align": column.header_align or column.align, "nowrap": column.nowrap}
54
+
55
+ @staticmethod
56
+ def get_class(table_style):
57
+ """
58
+ Get the table CSS classes.
59
+ """
60
+ flags = ("bordered", "striped", "hover", "compact", "ruled", "repeat_header", "avoid_row_break")
61
+ names = [f"rk-table--{flag.replace('_', '-')}" for flag in flags if getattr(table_style, flag)]
62
+ return " ".join(["rk-table", f"rk-table--layout-{table_style.layout}", *names])
63
+
64
+ @staticmethod
65
+ def get_container_class(table_style):
66
+ """
67
+ Get the table container CSS classes.
68
+ """
69
+ return "rk-table-container rk-table-container--ruled" if table_style.ruled else "rk-table-container"
@@ -0,0 +1,5 @@
1
+ from .heading import HeadingRenderer
2
+ from .rich_text import RichTextRenderer
3
+ from .text import TextRenderer
4
+
5
+ __all__ = ["HeadingRenderer", "RichTextRenderer", "TextRenderer"]
@@ -0,0 +1,18 @@
1
+ from ..base import BaseHtmlRenderer
2
+
3
+
4
+ class HeadingRenderer(BaseHtmlRenderer):
5
+ """
6
+ Render heading components using HTML templates.
7
+ """
8
+
9
+ template_name = "components/typography/heading.html"
10
+
11
+ def render(self, component, context, engine):
12
+ """
13
+ Render a heading with its resolved visual style.
14
+ """
15
+ if not 1 <= component.level <= 6:
16
+ raise ValueError("Heading level must be between 1 and 6.")
17
+ style = engine.styles.resolve(context.resolve_style(component))
18
+ return engine.templates.render(self.template_name, component=component, style=style)
@@ -0,0 +1,28 @@
1
+ from ..base import BaseHtmlRenderer
2
+
3
+
4
+ class RichTextRenderer(BaseHtmlRenderer):
5
+ """
6
+ Render styled text fragments into HTML.
7
+ """
8
+
9
+ template_name = "components/typography/rich_text.html"
10
+
11
+ def render(self, component, context, engine):
12
+ """
13
+ Render rich text with independently styled spans.
14
+ """
15
+ style = engine.styles.resolve(context.resolve_style(component))
16
+ spans = [self.prepare_span(span, engine) for span in component.spans]
17
+ return engine.templates.render(self.template_name, spans=spans, align=component.align, style=style)
18
+
19
+ def prepare_span(self, span, engine):
20
+ """
21
+ Prepare one text fragment for rendering.
22
+ """
23
+ return {
24
+ "value": span.value,
25
+ "style": engine.styles.resolve(span.style),
26
+ "language": span.language,
27
+ "direction": span.direction,
28
+ }
@@ -0,0 +1,16 @@
1
+ from ..base import BaseHtmlRenderer
2
+
3
+
4
+ class TextRenderer(BaseHtmlRenderer):
5
+ """
6
+ Render text components using HTML templates.
7
+ """
8
+
9
+ template_name = "components/typography/text.html"
10
+
11
+ def render(self, component, context, engine):
12
+ """
13
+ Render text with its resolved visual style.
14
+ """
15
+ style = engine.styles.resolve(context.resolve_style(component))
16
+ return engine.templates.render(self.template_name, component=component, style=style)
@@ -0,0 +1,45 @@
1
+ *,
2
+ *::before,
3
+ *::after {
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ html {
8
+ background: #f1f5f9;
9
+ }
10
+
11
+ body {
12
+ margin: 0;
13
+ color: var(--rk-color-text);
14
+ font-family: var(--rk-font-family);
15
+ font-size: var(--rk-font-md);
16
+ line-height: 1.7;
17
+ }
18
+
19
+ .rk-report {
20
+ max-width: 210mm;
21
+ margin: 0 auto;
22
+ padding: 0;
23
+ background: var(--rk-color-surface);
24
+ border: 1px solid var(--rk-color-border);
25
+ border-radius: var(--rk-radius-lg);
26
+ }
27
+
28
+ .rk-page {
29
+ min-width: 0;
30
+ }
31
+
32
+ .rk-divider {
33
+ height: 1px;
34
+ margin: var(--rk-space-5) 0;
35
+ border: 0;
36
+ background: var(--rk-color-border);
37
+ }
38
+
39
+ [dir="rtl"] {
40
+ text-align: right;
41
+ }
42
+
43
+ [dir="ltr"] {
44
+ text-align: left;
45
+ }
@@ -0,0 +1,83 @@
1
+
2
+ .rk-key-value {
3
+ display: flex;
4
+ align-items: center;
5
+ justify-content: space-between;
6
+ gap: 8px;
7
+ min-width: 0;
8
+ padding: 7px 10px;
9
+ border-bottom: 1px solid var(--rk-color-border);
10
+ }
11
+
12
+ .rk-key-value--vertical {
13
+ flex-direction: column;
14
+ align-items: stretch;
15
+ justify-content: flex-start;
16
+ gap: 4px;
17
+ }
18
+
19
+ .rk-key-value__labels {
20
+ display: flex;
21
+ flex-direction: row;
22
+ align-items: center;
23
+ gap: 6px;
24
+ min-width: 0;
25
+ flex-wrap: wrap;
26
+ }
27
+
28
+ .rk-key-value--vertical .rk-key-value__labels {
29
+ flex-direction: column;
30
+ align-items: stretch;
31
+ gap: 3px;
32
+ }
33
+
34
+ .rk-key-value__label {
35
+ font-size: 11px;
36
+ line-height: 1.4;
37
+ color: var(--rk-color-muted);
38
+ }
39
+
40
+ .rk-key-value__secondary {
41
+ font-size: 10px;
42
+ line-height: 1.4;
43
+ color: var(--rk-color-muted);
44
+ opacity: 0.85;
45
+ }
46
+
47
+ .rk-key-value__value {
48
+ min-width: 0;
49
+ font-size: 12px;
50
+ font-weight: 600;
51
+ line-height: 1.4;
52
+ overflow-wrap: anywhere;
53
+ font-variant-numeric: tabular-nums;
54
+ }
55
+
56
+ .rk-info-grid {
57
+ display: grid;
58
+ grid-template-columns: repeat(var(--rk-info-columns), minmax(0, 1fr));
59
+ gap: var(--rk-info-gap);
60
+ width: 100%;
61
+ min-width: 0;
62
+ }
63
+
64
+ .rk-info-grid > * {
65
+ min-width: 0;
66
+ }
67
+
68
+ @media (max-width: 640px) {
69
+ .rk-info-grid {
70
+ grid-template-columns: 1fr;
71
+ }
72
+ }
73
+
74
+ @media print {
75
+ .rk-key-value {
76
+ break-inside: avoid;
77
+ page-break-inside: avoid;
78
+ }
79
+
80
+ .rk-info-grid {
81
+ break-inside: auto;
82
+ }
83
+ }
@@ -0,0 +1,81 @@
1
+
2
+ .rk-section {
3
+ margin-bottom: var(--rk-space-6);
4
+ }
5
+
6
+ .rk-box {
7
+ box-sizing: border-box;
8
+ min-width: 0;
9
+ }
10
+
11
+ .rk-box > *:first-child {
12
+ margin-top: 0;
13
+ }
14
+
15
+ .rk-box > *:last-child {
16
+ margin-bottom: 0;
17
+ }
18
+
19
+ .rk-row {
20
+ display: flex;
21
+ flex-direction: row;
22
+ align-items: flex-start;
23
+ gap: var(--rk-space-4);
24
+ min-width: 0;
25
+ }
26
+
27
+ .rk-row > * {
28
+ min-width: 0;
29
+ }
30
+
31
+ .rk-column {
32
+ display: flex;
33
+ flex-direction: column;
34
+ align-items: stretch;
35
+ gap: var(--rk-space-4);
36
+ min-width: 0;
37
+ }
38
+
39
+ .rk-column > * {
40
+ min-width: 0;
41
+ }
42
+
43
+ .rk-grid {
44
+ display: grid;
45
+ grid-template-columns: minmax(0, 1fr);
46
+ gap: var(--rk-space-4);
47
+ width: 100%;
48
+ min-width: 0;
49
+ }
50
+
51
+ .rk-grid > * {
52
+ min-width: 0;
53
+ }
54
+
55
+ .rk-spacer {
56
+ display: block;
57
+ width: 100%;
58
+ flex-shrink: 0;
59
+ }
60
+
61
+ .rk-divider {
62
+ display: block;
63
+ width: 100%;
64
+ height: 0;
65
+ margin: var(--rk-space-4) 0;
66
+ border: 0;
67
+ border-top: 1px solid var(--rk-color-border);
68
+ }
69
+
70
+ .rk-card {
71
+ padding: var(--rk-space-5);
72
+ background: var(--rk-color-surface);
73
+ border: 1px solid var(--rk-color-border);
74
+ border-radius: var(--rk-radius-md);
75
+ }
76
+
77
+ .rk-surface {
78
+ padding: var(--rk-space-4);
79
+ background: var(--rk-color-subtle);
80
+ border-radius: var(--rk-radius-md);
81
+ }
@@ -0,0 +1,10 @@
1
+ .rk-image {
2
+ display: block;
3
+ max-width: 100%;
4
+ height: auto;
5
+ object-fit: contain;
6
+ }
7
+
8
+ .rk-image--logo {
9
+ max-height: 90px;
10
+ }
@@ -0,0 +1,96 @@
1
+ /*
2
+ * PDF-only rules (loaded by PdfExporter, never by the browser).
3
+ * WeasyPrint 70 ignores `direction` when placing grid items, so RTL grids are mirrored explicitly:
4
+ * child k of an N-column row goes to column N - k + 1, and dense flow keeps every row filled in order.
5
+ */
6
+ .rk-grid--rtl {
7
+ grid-auto-flow: row dense;
8
+ }
9
+
10
+ .rk-grid--rtl.rk-grid--cols-2 > :nth-child(2n+1) { grid-column: 2; }
11
+ .rk-grid--rtl.rk-grid--cols-2 > :nth-child(2n+2) { grid-column: 1; }
12
+
13
+ .rk-grid--rtl.rk-grid--cols-3 > :nth-child(3n+1) { grid-column: 3; }
14
+ .rk-grid--rtl.rk-grid--cols-3 > :nth-child(3n+2) { grid-column: 2; }
15
+ .rk-grid--rtl.rk-grid--cols-3 > :nth-child(3n+3) { grid-column: 1; }
16
+
17
+ .rk-grid--rtl.rk-grid--cols-4 > :nth-child(4n+1) { grid-column: 4; }
18
+ .rk-grid--rtl.rk-grid--cols-4 > :nth-child(4n+2) { grid-column: 3; }
19
+ .rk-grid--rtl.rk-grid--cols-4 > :nth-child(4n+3) { grid-column: 2; }
20
+ .rk-grid--rtl.rk-grid--cols-4 > :nth-child(4n+4) { grid-column: 1; }
21
+
22
+ .rk-grid--rtl.rk-grid--cols-5 > :nth-child(5n+1) { grid-column: 5; }
23
+ .rk-grid--rtl.rk-grid--cols-5 > :nth-child(5n+2) { grid-column: 4; }
24
+ .rk-grid--rtl.rk-grid--cols-5 > :nth-child(5n+3) { grid-column: 3; }
25
+ .rk-grid--rtl.rk-grid--cols-5 > :nth-child(5n+4) { grid-column: 2; }
26
+ .rk-grid--rtl.rk-grid--cols-5 > :nth-child(5n+5) { grid-column: 1; }
27
+
28
+ .rk-grid--rtl.rk-grid--cols-6 > :nth-child(6n+1) { grid-column: 6; }
29
+ .rk-grid--rtl.rk-grid--cols-6 > :nth-child(6n+2) { grid-column: 5; }
30
+ .rk-grid--rtl.rk-grid--cols-6 > :nth-child(6n+3) { grid-column: 4; }
31
+ .rk-grid--rtl.rk-grid--cols-6 > :nth-child(6n+4) { grid-column: 3; }
32
+ .rk-grid--rtl.rk-grid--cols-6 > :nth-child(6n+5) { grid-column: 2; }
33
+ .rk-grid--rtl.rk-grid--cols-6 > :nth-child(6n+6) { grid-column: 1; }
34
+
35
+ .rk-grid--rtl.rk-grid--cols-7 > :nth-child(7n+1) { grid-column: 7; }
36
+ .rk-grid--rtl.rk-grid--cols-7 > :nth-child(7n+2) { grid-column: 6; }
37
+ .rk-grid--rtl.rk-grid--cols-7 > :nth-child(7n+3) { grid-column: 5; }
38
+ .rk-grid--rtl.rk-grid--cols-7 > :nth-child(7n+4) { grid-column: 4; }
39
+ .rk-grid--rtl.rk-grid--cols-7 > :nth-child(7n+5) { grid-column: 3; }
40
+ .rk-grid--rtl.rk-grid--cols-7 > :nth-child(7n+6) { grid-column: 2; }
41
+ .rk-grid--rtl.rk-grid--cols-7 > :nth-child(7n+7) { grid-column: 1; }
42
+
43
+ .rk-grid--rtl.rk-grid--cols-8 > :nth-child(8n+1) { grid-column: 8; }
44
+ .rk-grid--rtl.rk-grid--cols-8 > :nth-child(8n+2) { grid-column: 7; }
45
+ .rk-grid--rtl.rk-grid--cols-8 > :nth-child(8n+3) { grid-column: 6; }
46
+ .rk-grid--rtl.rk-grid--cols-8 > :nth-child(8n+4) { grid-column: 5; }
47
+ .rk-grid--rtl.rk-grid--cols-8 > :nth-child(8n+5) { grid-column: 4; }
48
+ .rk-grid--rtl.rk-grid--cols-8 > :nth-child(8n+6) { grid-column: 3; }
49
+ .rk-grid--rtl.rk-grid--cols-8 > :nth-child(8n+7) { grid-column: 2; }
50
+ .rk-grid--rtl.rk-grid--cols-8 > :nth-child(8n+8) { grid-column: 1; }
51
+
52
+ .rk-grid--rtl.rk-grid--cols-9 > :nth-child(9n+1) { grid-column: 9; }
53
+ .rk-grid--rtl.rk-grid--cols-9 > :nth-child(9n+2) { grid-column: 8; }
54
+ .rk-grid--rtl.rk-grid--cols-9 > :nth-child(9n+3) { grid-column: 7; }
55
+ .rk-grid--rtl.rk-grid--cols-9 > :nth-child(9n+4) { grid-column: 6; }
56
+ .rk-grid--rtl.rk-grid--cols-9 > :nth-child(9n+5) { grid-column: 5; }
57
+ .rk-grid--rtl.rk-grid--cols-9 > :nth-child(9n+6) { grid-column: 4; }
58
+ .rk-grid--rtl.rk-grid--cols-9 > :nth-child(9n+7) { grid-column: 3; }
59
+ .rk-grid--rtl.rk-grid--cols-9 > :nth-child(9n+8) { grid-column: 2; }
60
+ .rk-grid--rtl.rk-grid--cols-9 > :nth-child(9n+9) { grid-column: 1; }
61
+
62
+ .rk-grid--rtl.rk-grid--cols-10 > :nth-child(10n+1) { grid-column: 10; }
63
+ .rk-grid--rtl.rk-grid--cols-10 > :nth-child(10n+2) { grid-column: 9; }
64
+ .rk-grid--rtl.rk-grid--cols-10 > :nth-child(10n+3) { grid-column: 8; }
65
+ .rk-grid--rtl.rk-grid--cols-10 > :nth-child(10n+4) { grid-column: 7; }
66
+ .rk-grid--rtl.rk-grid--cols-10 > :nth-child(10n+5) { grid-column: 6; }
67
+ .rk-grid--rtl.rk-grid--cols-10 > :nth-child(10n+6) { grid-column: 5; }
68
+ .rk-grid--rtl.rk-grid--cols-10 > :nth-child(10n+7) { grid-column: 4; }
69
+ .rk-grid--rtl.rk-grid--cols-10 > :nth-child(10n+8) { grid-column: 3; }
70
+ .rk-grid--rtl.rk-grid--cols-10 > :nth-child(10n+9) { grid-column: 2; }
71
+ .rk-grid--rtl.rk-grid--cols-10 > :nth-child(10n+10) { grid-column: 1; }
72
+
73
+ .rk-grid--rtl.rk-grid--cols-11 > :nth-child(11n+1) { grid-column: 11; }
74
+ .rk-grid--rtl.rk-grid--cols-11 > :nth-child(11n+2) { grid-column: 10; }
75
+ .rk-grid--rtl.rk-grid--cols-11 > :nth-child(11n+3) { grid-column: 9; }
76
+ .rk-grid--rtl.rk-grid--cols-11 > :nth-child(11n+4) { grid-column: 8; }
77
+ .rk-grid--rtl.rk-grid--cols-11 > :nth-child(11n+5) { grid-column: 7; }
78
+ .rk-grid--rtl.rk-grid--cols-11 > :nth-child(11n+6) { grid-column: 6; }
79
+ .rk-grid--rtl.rk-grid--cols-11 > :nth-child(11n+7) { grid-column: 5; }
80
+ .rk-grid--rtl.rk-grid--cols-11 > :nth-child(11n+8) { grid-column: 4; }
81
+ .rk-grid--rtl.rk-grid--cols-11 > :nth-child(11n+9) { grid-column: 3; }
82
+ .rk-grid--rtl.rk-grid--cols-11 > :nth-child(11n+10) { grid-column: 2; }
83
+ .rk-grid--rtl.rk-grid--cols-11 > :nth-child(11n+11) { grid-column: 1; }
84
+
85
+ .rk-grid--rtl.rk-grid--cols-12 > :nth-child(12n+1) { grid-column: 12; }
86
+ .rk-grid--rtl.rk-grid--cols-12 > :nth-child(12n+2) { grid-column: 11; }
87
+ .rk-grid--rtl.rk-grid--cols-12 > :nth-child(12n+3) { grid-column: 10; }
88
+ .rk-grid--rtl.rk-grid--cols-12 > :nth-child(12n+4) { grid-column: 9; }
89
+ .rk-grid--rtl.rk-grid--cols-12 > :nth-child(12n+5) { grid-column: 8; }
90
+ .rk-grid--rtl.rk-grid--cols-12 > :nth-child(12n+6) { grid-column: 7; }
91
+ .rk-grid--rtl.rk-grid--cols-12 > :nth-child(12n+7) { grid-column: 6; }
92
+ .rk-grid--rtl.rk-grid--cols-12 > :nth-child(12n+8) { grid-column: 5; }
93
+ .rk-grid--rtl.rk-grid--cols-12 > :nth-child(12n+9) { grid-column: 4; }
94
+ .rk-grid--rtl.rk-grid--cols-12 > :nth-child(12n+10) { grid-column: 3; }
95
+ .rk-grid--rtl.rk-grid--cols-12 > :nth-child(12n+11) { grid-column: 2; }
96
+ .rk-grid--rtl.rk-grid--cols-12 > :nth-child(12n+12) { grid-column: 1; }
@@ -0,0 +1,91 @@
1
+ @page {
2
+ size: A4;
3
+ margin: 15mm;
4
+ }
5
+
6
+ .rk-page {
7
+ box-sizing: border-box;
8
+ width: 100%;
9
+ min-width: 0;
10
+ max-width: 210mm;
11
+ min-height: 297mm;
12
+ margin: 0 auto;
13
+ padding: 10mm;
14
+ background: #ffffff;
15
+ }
16
+
17
+ .rk-page[data-page-orientation="landscape"] {
18
+ max-width: 297mm;
19
+ min-height: 210mm;
20
+ }
21
+
22
+ .rk-page-break {
23
+ display: none;
24
+ }
25
+
26
+ .rk-header {
27
+ width: 100%;
28
+ box-sizing: border-box;
29
+ }
30
+
31
+ .rk-footer {
32
+ width: 100%;
33
+ box-sizing: border-box;
34
+ }
35
+
36
+ @media print {
37
+ html,
38
+ body {
39
+ background: #ffffff;
40
+ }
41
+
42
+ .rk-report {
43
+ max-width: none;
44
+ margin: 0;
45
+ padding: 0;
46
+ border: none;
47
+ border-radius: 0;
48
+ }
49
+
50
+ .rk-card {
51
+ break-inside: avoid;
52
+ }
53
+
54
+ .rk-page-break {
55
+ break-after: page;
56
+ }
57
+
58
+ .rk-no-print {
59
+ display: none !important;
60
+ }
61
+
62
+ .rk-page {
63
+ max-width: none;
64
+ min-height: 0;
65
+ padding: 0;
66
+ break-after: page;
67
+ page-break-after: always;
68
+ }
69
+
70
+ .rk-page:last-child {
71
+ break-after: auto;
72
+ page-break-after: auto;
73
+ }
74
+
75
+ .rk-page-break {
76
+ display: block;
77
+ break-before: page;
78
+ page-break-before: always;
79
+ }
80
+
81
+ .rk-page-number {
82
+ font-size: 11px;
83
+ color: #64748b;
84
+ }
85
+
86
+ .rk-header,
87
+ .rk-footer {
88
+ break-inside: avoid;
89
+ page-break-inside: avoid;
90
+ }
91
+ }