@takecasper/acuity-design-system 2.4.0 → 2.4.2

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.
@@ -5,10 +5,10 @@ export interface MarkdownProps {
5
5
  /**
6
6
  * Renders question and instruction copy written in Markdown.
7
7
  *
8
- * Every element is mapped onto a MUI component rather than a bare tag, so authored
9
- * content picks up the platform's type scale and link colours instead of browser
10
- * defaults. Links always open in a new tab with `noopener` — content is authored
11
- * per-institution, and a candidate mid-assessment must not be navigated away.
8
+ * Content is styled by `getMarkdownContentStyles`, the same styles `MarkdownEditor` uses, so text
9
+ * looks the same in the editor and wherever it is shown. Text takes its colour from the container.
10
+ * Links always open in a new tab with `noopener` — content is authored per-institution, and a
11
+ * candidate mid-assessment must not be navigated away.
12
12
  */
13
13
  export declare const Markdown: ({ content }: MarkdownProps) => import("react").JSX.Element;
14
14
  export default Markdown;
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/components/Markdown/Markdown.tsx"],"names":[],"mappings":"AAiBA,MAAM,WAAW,aAAa;IAC5B,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,GAAI,aAAkB,aAAa,gCAuEvD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/components/Markdown/Markdown.tsx"],"names":[],"mappings":"AAgBA,MAAM,WAAW,aAAa;IAC5B,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,GAAI,aAAkB,aAAa,gCAqBvD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -81,4 +81,118 @@ export declare const getMarkdownStyles: (theme: Theme) => {
81
81
  p: number;
82
82
  };
83
83
  };
84
+ /**
85
+ * The one set of styles for Markdown content, shared by `Markdown` and `MarkdownEditor` so what
86
+ * people type in the editor looks exactly like what `Markdown` shows. Apply it to the element that
87
+ * contains the rendered tags; it styles the tags themselves (`h1`, `p`, `li`...), so nothing inside
88
+ * depends on MUI components or browser defaults. Text colour is inherited from the container.
89
+ */
90
+ export declare const getMarkdownContentStyles: (theme: Theme) => {
91
+ fontFamily: string | (string & {});
92
+ '& h1': {
93
+ fontWeight: number | import("csstype").Property.FontWeight;
94
+ fontSize: string | undefined;
95
+ lineHeight: string | undefined;
96
+ fontFamily: import("csstype").Property.FontFamily | "Lato, sans-serif";
97
+ letterSpacing: "normal";
98
+ textAlign: "left";
99
+ m: 0;
100
+ };
101
+ '& h2': {
102
+ fontWeight: number | import("csstype").Property.FontWeight;
103
+ fontSize: string | undefined;
104
+ lineHeight: string | undefined;
105
+ fontFamily: import("csstype").Property.FontFamily | "Lato, sans-serif";
106
+ letterSpacing: "normal";
107
+ textAlign: "left";
108
+ m: 0;
109
+ };
110
+ '& h3': {
111
+ fontWeight: number | import("csstype").Property.FontWeight;
112
+ mt: string;
113
+ fontSize: string | undefined;
114
+ lineHeight: string | undefined;
115
+ fontFamily: import("csstype").Property.FontFamily | "Lato, sans-serif";
116
+ letterSpacing: "normal";
117
+ textAlign: "left";
118
+ m: 0;
119
+ };
120
+ '& h4': {
121
+ fontWeight: number | import("csstype").Property.FontWeight;
122
+ fontSize: string | undefined;
123
+ lineHeight: string | undefined;
124
+ fontFamily: import("csstype").Property.FontFamily | "Lato, sans-serif";
125
+ letterSpacing: "normal";
126
+ textAlign: "left";
127
+ m: 0;
128
+ };
129
+ '& h5': {
130
+ fontWeight: number | import("csstype").Property.FontWeight;
131
+ fontSize: string | undefined;
132
+ lineHeight: string | undefined;
133
+ fontFamily: import("csstype").Property.FontFamily | "Lato, sans-serif";
134
+ letterSpacing: "normal";
135
+ textAlign: "left";
136
+ m: 0;
137
+ };
138
+ '& h6': {
139
+ fontWeight: number | import("csstype").Property.FontWeight;
140
+ fontSize: string | undefined;
141
+ lineHeight: string | undefined;
142
+ fontFamily: import("csstype").Property.FontFamily | "Lato, sans-serif";
143
+ letterSpacing: "normal";
144
+ textAlign: "left";
145
+ m: 0;
146
+ };
147
+ '& p': {
148
+ fontWeight: number | import("csstype").Property.FontWeight;
149
+ letterSpacing: string;
150
+ textAlign: string;
151
+ wordBreak: string;
152
+ m: number;
153
+ mt: string;
154
+ fontSize: string | undefined;
155
+ lineHeight: string | undefined;
156
+ fontFamily: string | (string & {});
157
+ };
158
+ '& ul, & ol': {
159
+ fontWeight: number | import("csstype").Property.FontWeight;
160
+ textAlign: string;
161
+ m: number;
162
+ pl: string;
163
+ pr: number;
164
+ fontSize: string | undefined;
165
+ lineHeight: string | undefined;
166
+ fontFamily: string | (string & {});
167
+ };
168
+ '& ul': {
169
+ listStyleType: string;
170
+ pt: number;
171
+ pb: string;
172
+ };
173
+ '& ol': {
174
+ listStyleType: string;
175
+ mt: string;
176
+ pt: string;
177
+ pb: string;
178
+ };
179
+ '& li': {
180
+ display: string;
181
+ m: number;
182
+ p: number;
183
+ };
184
+ '& li > p': {
185
+ m: number;
186
+ };
187
+ '& a': {
188
+ color: string;
189
+ textDecoration: string;
190
+ };
191
+ '& strong': {
192
+ fontWeight: number | import("csstype").Property.FontWeight;
193
+ };
194
+ '& em': {
195
+ fontStyle: string;
196
+ };
197
+ };
84
198
  //# sourceMappingURL=Markdown.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Markdown/Markdown.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAItC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqE5C,CAAC"}
1
+ {"version":3,"file":"Markdown.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Markdown/Markdown.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAI3C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqE5C,CAAC;AAkBH;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GAAI,OAAO,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwEpD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownEditor.d.ts","sourceRoot":"","sources":["../../../src/components/MarkdownEditor/MarkdownEditor.tsx"],"names":[],"mappings":"AAwBA,KAAK,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAG1C,mFAAmF;AACnF,MAAM,WAAW,oBAAoB;IACnC,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,OAAO,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,MAAM,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,2BAA2B,EAAE,oBAWzC,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,4DAA4D;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,sCAA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