@dracor/react 0.9.0 → 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/README.md +42 -22
  2. package/dist/index.d.ts +208 -117
  3. package/dist/index.es.js +1548 -0
  4. package/dist/index.es.js.map +1 -0
  5. package/dist/index.umd.js +44 -0
  6. package/dist/index.umd.js.map +1 -0
  7. package/package.json +98 -75
  8. package/src/dracor.css +142 -0
  9. package/ceteicean.js +0 -46
  10. package/dist/cjs/index.js +0 -4631
  11. package/dist/cjs/index.js.map +0 -1
  12. package/dist/cjs/types/components/ApiDoc/ApiDoc.d.ts +0 -6
  13. package/dist/cjs/types/components/ApiDoc/ApiDoc.stories.d.ts +0 -21
  14. package/dist/cjs/types/components/ApiDoc/ApiDoc.test.d.ts +0 -1
  15. package/dist/cjs/types/components/ApiDoc/index.d.ts +0 -1
  16. package/dist/cjs/types/components/AuthorInfo/AuthorInfo.d.ts +0 -7
  17. package/dist/cjs/types/components/AuthorInfo/AuthorInfo.stories.d.ts +0 -10
  18. package/dist/cjs/types/components/AuthorInfo/AuthorInfo.test.d.ts +0 -1
  19. package/dist/cjs/types/components/AuthorInfo/index.d.ts +0 -1
  20. package/dist/cjs/types/components/Authors/Authors.d.ts +0 -10
  21. package/dist/cjs/types/components/Authors/Authors.stories.d.ts +0 -12
  22. package/dist/cjs/types/components/Authors/Authors.test.d.ts +0 -1
  23. package/dist/cjs/types/components/Authors/index.d.ts +0 -1
  24. package/dist/cjs/types/components/DebouncedInput/DebouncedInput.d.ts +0 -6
  25. package/dist/cjs/types/components/DebouncedInput/index.d.ts +0 -1
  26. package/dist/cjs/types/components/IdCopy/IdCopy.d.ts +0 -8
  27. package/dist/cjs/types/components/IdCopy/IdCopy.stories.d.ts +0 -11
  28. package/dist/cjs/types/components/IdCopy/IdCopy.test.d.ts +0 -1
  29. package/dist/cjs/types/components/IdCopy/index.d.ts +0 -1
  30. package/dist/cjs/types/components/IdLink/IdLink.d.ts +0 -7
  31. package/dist/cjs/types/components/IdLink/IdLink.stories.d.ts +0 -15
  32. package/dist/cjs/types/components/IdLink/IdLink.test.d.ts +0 -1
  33. package/dist/cjs/types/components/IdLink/index.d.ts +0 -1
  34. package/dist/cjs/types/components/Navigation/NavBar.d.ts +0 -13
  35. package/dist/cjs/types/components/Navigation/NavBar.stories.d.ts +0 -28
  36. package/dist/cjs/types/components/Navigation/NavBar.test.d.ts +0 -1
  37. package/dist/cjs/types/components/Navigation/NavItem.d.ts +0 -8
  38. package/dist/cjs/types/components/Navigation/NavItem.stories.d.ts +0 -19
  39. package/dist/cjs/types/components/Navigation/NavMenu.d.ts +0 -12
  40. package/dist/cjs/types/components/Navigation/NavMenu.stories.d.ts +0 -19
  41. package/dist/cjs/types/components/Navigation/index.d.ts +0 -1
  42. package/dist/cjs/types/components/TEIText/TEIText.d.ts +0 -14
  43. package/dist/cjs/types/components/TEIText/TEIText.stories.d.ts +0 -10
  44. package/dist/cjs/types/components/TEIText/index.d.ts +0 -1
  45. package/dist/cjs/types/components/Table/Table.d.ts +0 -11
  46. package/dist/cjs/types/components/Table/Table.stories.d.ts +0 -9
  47. package/dist/cjs/types/components/Table/Table.test.d.ts +0 -1
  48. package/dist/cjs/types/components/Table/index.d.ts +0 -1
  49. package/dist/cjs/types/components/Tabs/Tabs.d.ts +0 -11
  50. package/dist/cjs/types/components/Tabs/Tabs.stories.d.ts +0 -23
  51. package/dist/cjs/types/components/Tabs/Tabs.test.d.ts +0 -1
  52. package/dist/cjs/types/components/Tabs/index.d.ts +0 -1
  53. package/dist/cjs/types/components/Years/Years.d.ts +0 -10
  54. package/dist/cjs/types/components/Years/Years.stories.d.ts +0 -11
  55. package/dist/cjs/types/components/Years/Years.test.d.ts +0 -1
  56. package/dist/cjs/types/components/Years/index.d.ts +0 -1
  57. package/dist/cjs/types/components/index.d.ts +0 -10
  58. package/dist/cjs/types/einakter-gh.d.ts +0 -2
  59. package/dist/cjs/types/index.d.ts +0 -2
  60. package/dist/cjs/types/testHelpers.d.ts +0 -7
  61. package/dist/cjs/types/utils.d.ts +0 -2
  62. package/dist/esm/index.js +0 -4618
  63. package/dist/esm/index.js.map +0 -1
  64. package/dist/esm/types/components/ApiDoc/ApiDoc.d.ts +0 -6
  65. package/dist/esm/types/components/ApiDoc/ApiDoc.stories.d.ts +0 -21
  66. package/dist/esm/types/components/ApiDoc/ApiDoc.test.d.ts +0 -1
  67. package/dist/esm/types/components/ApiDoc/index.d.ts +0 -1
  68. package/dist/esm/types/components/AuthorInfo/AuthorInfo.d.ts +0 -7
  69. package/dist/esm/types/components/AuthorInfo/AuthorInfo.stories.d.ts +0 -10
  70. package/dist/esm/types/components/AuthorInfo/AuthorInfo.test.d.ts +0 -1
  71. package/dist/esm/types/components/AuthorInfo/index.d.ts +0 -1
  72. package/dist/esm/types/components/Authors/Authors.d.ts +0 -10
  73. package/dist/esm/types/components/Authors/Authors.stories.d.ts +0 -12
  74. package/dist/esm/types/components/Authors/Authors.test.d.ts +0 -1
  75. package/dist/esm/types/components/Authors/index.d.ts +0 -1
  76. package/dist/esm/types/components/DebouncedInput/DebouncedInput.d.ts +0 -6
  77. package/dist/esm/types/components/DebouncedInput/index.d.ts +0 -1
  78. package/dist/esm/types/components/IdCopy/IdCopy.d.ts +0 -8
  79. package/dist/esm/types/components/IdCopy/IdCopy.stories.d.ts +0 -11
  80. package/dist/esm/types/components/IdCopy/IdCopy.test.d.ts +0 -1
  81. package/dist/esm/types/components/IdCopy/index.d.ts +0 -1
  82. package/dist/esm/types/components/IdLink/IdLink.d.ts +0 -7
  83. package/dist/esm/types/components/IdLink/IdLink.stories.d.ts +0 -15
  84. package/dist/esm/types/components/IdLink/IdLink.test.d.ts +0 -1
  85. package/dist/esm/types/components/IdLink/index.d.ts +0 -1
  86. package/dist/esm/types/components/Navigation/NavBar.d.ts +0 -13
  87. package/dist/esm/types/components/Navigation/NavBar.stories.d.ts +0 -28
  88. package/dist/esm/types/components/Navigation/NavBar.test.d.ts +0 -1
  89. package/dist/esm/types/components/Navigation/NavItem.d.ts +0 -8
  90. package/dist/esm/types/components/Navigation/NavItem.stories.d.ts +0 -19
  91. package/dist/esm/types/components/Navigation/NavMenu.d.ts +0 -12
  92. package/dist/esm/types/components/Navigation/NavMenu.stories.d.ts +0 -19
  93. package/dist/esm/types/components/Navigation/index.d.ts +0 -1
  94. package/dist/esm/types/components/TEIText/TEIText.d.ts +0 -14
  95. package/dist/esm/types/components/TEIText/TEIText.stories.d.ts +0 -10
  96. package/dist/esm/types/components/TEIText/index.d.ts +0 -1
  97. package/dist/esm/types/components/Table/Table.d.ts +0 -11
  98. package/dist/esm/types/components/Table/Table.stories.d.ts +0 -9
  99. package/dist/esm/types/components/Table/Table.test.d.ts +0 -1
  100. package/dist/esm/types/components/Table/index.d.ts +0 -1
  101. package/dist/esm/types/components/Tabs/Tabs.d.ts +0 -11
  102. package/dist/esm/types/components/Tabs/Tabs.stories.d.ts +0 -23
  103. package/dist/esm/types/components/Tabs/Tabs.test.d.ts +0 -1
  104. package/dist/esm/types/components/Tabs/index.d.ts +0 -1
  105. package/dist/esm/types/components/Years/Years.d.ts +0 -10
  106. package/dist/esm/types/components/Years/Years.stories.d.ts +0 -11
  107. package/dist/esm/types/components/Years/Years.test.d.ts +0 -1
  108. package/dist/esm/types/components/Years/index.d.ts +0 -1
  109. package/dist/esm/types/components/index.d.ts +0 -10
  110. package/dist/esm/types/einakter-gh.d.ts +0 -2
  111. package/dist/esm/types/index.d.ts +0 -2
  112. package/dist/esm/types/testHelpers.d.ts +0 -7
  113. package/dist/esm/types/utils.d.ts +0 -2
  114. package/tailwind.js +0 -57
package/src/dracor.css ADDED
@@ -0,0 +1,142 @@
1
+ @theme {
2
+ --color-primary: #1f2448;
3
+ --color-secondary-100: #aef;
4
+ --color-secondary-200: #08f;
5
+ --color-neutral-100: #ebf0f7;
6
+ --color-neutral-200: #1f244809;
7
+
8
+ --spacing-2: calc(var(--spacing) * 2);
9
+ --spacing-3: calc(var(--spacing) * 3);
10
+ --spacing-4: calc(var(--spacing) * 4);
11
+ --spacing-5: calc(var(--spacing) * 5);
12
+ --spacing-6: calc(var(--spacing) * 6);
13
+ --spacing-7: calc(var(--spacing) * 7);
14
+ --spacing-8: calc(var(--spacing) * 8);
15
+
16
+ --img-author: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 300'%3E%3Cpath style='fill:%23fff' class='st0' d='M21.75,90.08c-2.28,41.51,47.26,95.14,50.82,134.94c0,0,0.09,62.44,0.09,62.44c-0.8,6.58,4.55,12.5,11.07,12.54 c0,0,87.71,0,87.71,0c5.93-0.07,10.99-4.5,11.35-10.51l0,0c0,0,0.09-23.98,0.09-23.98c0-6.36,5.07-11.44,11.44-11.44 c0,0,44.92-1.84,44.92-1.84c8.85,0,16.05-7.1,16.05-15.96l4.7-32.74c-0.71-2.82,13.62-11.86,15.49-13.93 c3.21-2.72,3.86-8.13,1.11-11.44c0,0-17.16-29.88-17.16-29.88l-0.55-0.92c-3.35-2.42,1.24-42.35,0.83-46.21 c0.03-1.05,0.94-10.05,0.74-11.07c0-49.16-39.84-89.01-89.01-89.01C101.67-3.37,26.17,2.34,21.75,90.08z'/%3E%3C/svg%3E");
17
+ --img-wikidata: url("data:image/svg+xml,%3Csvg version='1.1' id='Ebene_1' xmlns:svg='http://www.w3.org/2000/svg' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 810 500' style='enable-background:new 0 0 810 500;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23990000;%7D .st1%7Bfill:%23339966;%7D .st2%7Bfill:%23006699;%7D%3C/style%3E%3Cpath class='st0' d='M0,500h30V0H0V500z M60,500h90V0H60V500z M180,0v500h90V0H180z'/%3E%3Cpath class='st1' d='M720,500h30V0h-30V500z M780,0v500h30V0H780z M300,500h30V0h-30V500z M360,0v500h30V0H360z'/%3E%3Cpath class='st2' d='M420,500h90V0h-90V500z M540,500h30V0h-30V500z M600,0v500h90V0H600z'/%3E%3C/svg%3E%0A");
18
+ --img-dracor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 384 384'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:none;%7D.cls-2%7Bclip-path:url(%23clip-path);%7D.cls-3%7Bfill:%231f2447;%7D%3C/style%3E%3CclipPath id='clip-path' transform='translate(0 0)'%3E%3Crect class='cls-1' width='384' height='384'/%3E%3C/clipPath%3E%3C/defs%3E%3Ctitle%3EDraCor-Symbol-Square-Blue%3C/title%3E%3Cg id='Layer_2' data-name='Layer 2'%3E%3Cg id='Layer_1-2' data-name='Layer 1'%3E%3Cg id='Vektor-Smartobjekt'%3E%3Cg class='cls-2'%3E%3Cg class='cls-2'%3E%3Cpath class='cls-3' d='M378.47,146A192.23,192.23,0,0,0,192,0H0V384H192A192.23,192.23,0,0,0,378.47,238.05a194.5,194.5,0,0,0,0-92.1M192,347.51H36.49V210.25H71.6a121.84,121.84,0,0,0,233.18,27.8h-41a85.29,85.29,0,1,1-11.51-106.34A86.09,86.09,0,0,1,263.8,146h41A121.81,121.81,0,0,0,71.6,173.76H36.49V36.49H192c69.73,0,128.88,46.12,148.55,109.46q2.13,6.84,3.62,13.91c1,4.56,1.73,9.2,2.27,13.9H240.84a50.2,50.2,0,0,0-2.38-5.43c-.48-.94-1-1.86-1.54-2.77a50.8,50.8,0,0,0-3.89-5.7,49.82,49.82,0,0,0-4.17-4.71,52,52,0,0,0-61.31-9.2c-1.14.6-2.26,1.26-3.35,2a51.23,51.23,0,0,0-9,7.25,52.09,52.09,0,0,0,0,73.71,51.17,51.17,0,0,0,9,7.24l3.34,2a52.07,52.07,0,0,0,61.32-9.19,50,50,0,0,0,4.18-4.72,52.26,52.26,0,0,0,3.47-5c.7-1.14,1.35-2.3,2-3.49a48.31,48.31,0,0,0,2.38-5.43h105.6c-.54,4.7-1.31,9.34-2.27,13.9q-1.49,7.08-3.62,13.91C320.88,301.39,261.73,347.51,192,347.51' transform='translate(0 0)'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
19
+ --img-wega: url("data:image/svg+xml,%3C%3Fxml version='1.0' standalone='no'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 20010904//EN' 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'%3E%3Csvg version='1.0' xmlns='http://www.w3.org/2000/svg' width='70.000000pt' height='70.000000pt' viewBox='0 0 70.000000 70.000000' preserveAspectRatio='xMidYMid meet'%3E%3Cmetadata%3E%0ACreated by potrace 1.11, written by Peter Selinger 2001-2013%0A%3C/metadata%3E%3Cg transform='translate(0.000000,70.000000) scale(0.100000,-0.100000)'%0Afill='%230064b4' stroke='none'%3E%3Cpath d='M223 664 c-29 -19 -53 -39 -53 -44 0 -5 -11 -26 -25 -46 -14 -21 -23%0A-44 -20 -51 2 -8 -3 -25 -12 -39 -13 -21 -14 -29 -4 -52 7 -15 19 -34 27 -42%0A8 -8 29 -37 46 -63 l31 -48 -19 -40 c-9 -22 -42 -63 -73 -91 l-55 -50 23 -44%0A24 -44 87 0 87 0 -27 115 c-19 82 -23 112 -14 104 20 -17 17 2 -6 31 -11 14%0A-20 35 -20 47 0 12 -7 43 -16 69 -12 36 -13 48 -4 54 7 4 9 13 5 19 -4 7 -1%0A18 5 26 7 8 10 24 7 35 -3 10 2 25 10 31 8 7 12 21 10 31 -4 15 1 18 38 18 52%0A0 90 -15 128 -49 37 -34 36 -61 -3 -61 -38 0 -53 -27 -48 -93 3 -50 2 -52 -22%0A-49 -24 2 -24 2 -5 -12 27 -19 57 -3 50 27 -12 59 -11 72 12 72 28 0 41 14 23%0A25 -13 8 -13 10 1 10 27 0 31 -66 8 -140 -20 -65 -51 -110 -76 -110 -7 0 -13%0A-4 -13 -10 0 -15 23 -12 48 6 26 18 26 29 2 -110 -15 -92 -20 -86 75 -86 l86%0A0 20 47 20 47 -65 58 c-77 69 -98 116 -76 169 8 17 22 39 32 49 11 10 20 25%0A22 33 1 8 8 22 15 31 17 20 5 73 -19 81 -10 3 -21 16 -24 29 -3 12 -13 32 -23%0A44 -10 12 -26 33 -36 47 -10 14 -26 25 -36 25 -9 0 -26 7 -37 15 -29 22 -54%0A18 -111 -21z'/%3E%3Cpath d='M246 475 c-22 -17 -20 -28 2 -16 10 6 28 7 40 4 12 -3 22 -1 22 5 0%0A15 -45 20 -64 7z'/%3E%3Cpath d='M252 437 c-10 -11 -5 -14 24 -15 24 -1 34 3 31 11 -5 17 -42 20 -55%0A4z'/%3E%3Cpath d='M299 289 c-9 -6 1 -9 29 -9 24 0 41 4 38 9 -7 11 -50 11 -67 0z'/%3E%3Cpath d='M315 260 c3 -5 15 -10 26 -10 10 0 19 5 19 10 0 6 -12 10 -26 10 -14%0A0 -23 -4 -19 -10z'/%3E%3C/g%3E%3C/svg%3E");
20
+
21
+ --animate-spin-slow: reverse-spin 120s linear infinite;
22
+ @keyframes reverse-spin {
23
+ from {
24
+ transform: rotate(360deg);
25
+ }
26
+ }
27
+ }
28
+
29
+ /*
30
+ The default border color has changed to `currentColor` in Tailwind CSS v4,
31
+ so we've added these compatibility styles to make sure everything still
32
+ looks the same as it did with Tailwind CSS v3.
33
+
34
+ If we ever want to remove these styles, we need to add an explicit border
35
+ color utility to any element that depends on these defaults.
36
+ */
37
+ @layer base {
38
+ *,
39
+ ::after,
40
+ ::before,
41
+ ::backdrop,
42
+ ::file-selector-button {
43
+ border-color: var(--color-gray-200, currentColor);
44
+ }
45
+ }
46
+
47
+ @layer base {
48
+ body {
49
+ -webkit-font-smoothing: antialiased;
50
+ -moz-osx-font-smoothing: grayscale;
51
+ @apply bg-neutral-100;
52
+ }
53
+
54
+ a {
55
+ @apply text-secondary-200;
56
+ }
57
+
58
+ a:hover {
59
+ color: #0056b3;
60
+ }
61
+
62
+ h1 {
63
+ @apply text-4xl mb-2 mt-0 font-medium;
64
+ }
65
+
66
+ h2 {
67
+ @apply text-3xl mb-2 mt-2 font-medium;
68
+ }
69
+
70
+ h3 {
71
+ @apply text-xl mb-2 mt-2 font-medium;
72
+ }
73
+
74
+ h4 {
75
+ @apply text-lg mb-2 mt-2 font-medium;
76
+ }
77
+
78
+ p,
79
+ ul {
80
+ @apply mb-2;
81
+ }
82
+
83
+ ul {
84
+ @apply list-inside list-disc space-y-1;
85
+ }
86
+
87
+ li {
88
+ @apply list-item;
89
+ }
90
+
91
+ table {
92
+ @apply -mx-4 -mb-4 grow;
93
+ }
94
+
95
+ th {
96
+ @apply text-left align-top p-4 text-sm font-medium;
97
+ }
98
+
99
+ td {
100
+ @apply p-4 align-top;
101
+ }
102
+
103
+ input {
104
+ @apply shadow-sm appearance-none border rounded-sm py-2 px-3 text-gray-700 mb-4;
105
+ }
106
+ }
107
+
108
+ /* Basic styling for CETEIcean */
109
+ @layer base {
110
+ tei-div, tei-p, tei-head, tei-front {
111
+ display: block;
112
+ }
113
+ tei-p {
114
+ margin-top: var(--spacing-2);
115
+ margin-bottom: var(--spacing-2);
116
+ }
117
+ tei-front {
118
+ margin-bottom: var(--spacing-6);
119
+ }
120
+
121
+ tei-front > tei-titlepage > tei-doctitle {
122
+ display: block;
123
+ text-align: center;
124
+ margin-bottom: var(--spacing-4);
125
+ }
126
+ tei-doctitle > tei-titlepart[type=main] {
127
+ font-size: var(--text-2xl);
128
+ margin-top: var(--spacing-3);
129
+ margin-bottom: var(--spacing-3);
130
+ }
131
+ tei-doctitle > tei-titlepart[type=sub] {
132
+ font-size: var(--text-xl);
133
+ margin-top: var(--spacing-3);
134
+ margin-bottom: var(--spacing-3);
135
+ }
136
+ tei-div[type=chapter] > tei-head {
137
+ font-size: var(--text-xl);
138
+ font-weight: bold;
139
+ margin-top: var(--spacing-8);
140
+ margin-bottom: var(--spacing-4);
141
+ }
142
+ }
package/ceteicean.js DELETED
@@ -1,46 +0,0 @@
1
- const { textAlign } = require('tailwindcss-classnames');
2
- const plugin = require('tailwindcss/plugin');
3
-
4
- module.exports = plugin(({addBase, addComponents, theme}) => {
5
- addBase({
6
- 'tei-div': {
7
- display: 'block',
8
- },
9
- 'tei-head': {
10
- display: 'block',
11
- },
12
- 'tei-p': {
13
- display: 'block',
14
- marginTop: theme('spacing.2'),
15
- marginBottom: theme('spacing.2'),
16
- },
17
- 'tei-front': {
18
- display: 'block',
19
- marginBottom: theme('spacing.6'),
20
- },
21
- });
22
-
23
- addComponents({
24
- 'tei-front > tei-titlepage > tei-doctitle': {
25
- display: 'block',
26
- textAlign: 'center',
27
- marginBottom: theme('spacing.4'),
28
- },
29
- 'tei-doctitle > tei-titlepart[type=main]': {
30
- fontSize: theme('fontSize.2xl'),
31
- marginTop: theme('spacing.3'),
32
- marginBottom: theme('spacing.3'),
33
- },
34
- 'tei-doctitle > tei-titlepart[type=sub]': {
35
- fontSize: theme('fontSize.xl'),
36
- marginTop: theme('spacing.3'),
37
- marginBottom: theme('spacing.3'),
38
- },
39
- 'tei-div[type=chapter] > tei-head': {
40
- fontSize: theme('fontSize.xl'),
41
- fontWeight: 'bold',
42
- marginTop: theme('spacing.8'),
43
- marginBottom: theme('spacing.4'),
44
- },
45
- });
46
- });