@takecasper/acuity-design-system 2.3.0 → 2.4.0

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.
@@ -8,6 +8,9 @@ import { Theme } from '@mui/material';
8
8
  * discarded and headings fall back to their MUI variant sizes. This is carried over
9
9
  * as-is rather than fixed here, so TEX and the design system render identically —
10
10
  * see the component's docs page.
11
+ *
12
+ * Every heading is left-aligned, lining up with the text below it. (TEX centred
13
+ * `h1`, `h2` and `h4`; the design system does not.)
11
14
  */
12
15
  export declare const getMarkdownStyles: (theme: Theme) => {
13
16
  h1: {
@@ -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;;;;;;;;;GASG;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,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAItC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqE5C,CAAC"}
@@ -0,0 +1,49 @@
1
+ type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
2
+ /** Text for the toolbar. English by default; pass translated text from the app. */
3
+ export interface MarkdownEditorLabels {
4
+ /** Accessible name of the toolbar. */
5
+ toolbar: string;
6
+ undo: string;
7
+ redo: string;
8
+ /** Accessible name of the paragraph/heading select. */
9
+ textStyle: string;
10
+ paragraph: string;
11
+ /** Option text for a heading level, e.g. "Heading 1". */
12
+ heading: (level: HeadingLevel) => string;
13
+ bold: string;
14
+ italic: string;
15
+ numberedList: string;
16
+ bulletedList: string;
17
+ }
18
+ export declare const defaultMarkdownEditorLabels: MarkdownEditorLabels;
19
+ export interface MarkdownEditorProps {
20
+ /** Id of the editable area. The label gets `label_<id>`. */
21
+ id: string;
22
+ /** Visible label above the editor. */
23
+ label: string;
24
+ /** The text as Markdown. */
25
+ value: string;
26
+ /** Called with the new Markdown on every edit. */
27
+ onChange: (markdown: string) => void;
28
+ /** Ids of elements that describe the editor, such as shared help text. */
29
+ 'aria-describedby'?: string;
30
+ /**
31
+ * Fixed height of the toolbar and text box together (any CSS length). The text scrolls inside
32
+ * the box. Leave unset to let the box grow with its text, from a 300px minimum.
33
+ */
34
+ height?: string | number;
35
+ disabled?: boolean;
36
+ /** Toolbar text, merged over the English defaults. */
37
+ labels?: Partial<MarkdownEditorLabels>;
38
+ }
39
+ /**
40
+ * A formatting editor that reads and writes Markdown: people see headings, bold and lists as they
41
+ * type, and the value stays a Markdown string. The toolbar matches the assessments question
42
+ * builder (undo, redo, paragraph and headings, bold, italic, numbered and bulleted lists).
43
+ *
44
+ * Only what plain Markdown can store is offered: strikethrough, underline, code and tables are
45
+ * switched off, including their keyboard shortcuts.
46
+ */
47
+ export declare const MarkdownEditor: ({ id, label, value, onChange, "aria-describedby": ariaDescribedBy, height, disabled, labels: labelOverrides }: MarkdownEditorProps) => import("react").JSX.Element;
48
+ export default MarkdownEditor;
49
+ //# sourceMappingURL=MarkdownEditor.d.ts.map
@@ -0,0 +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,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sDAAsD;IACtD,MAAM,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;CACxC;AA2ED;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAI,+GAS5B,mBAAmB,gCAsOrB,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"storiesList.d.ts","sourceRoot":"","sources":["../../src/docs/storiesList.tsx"],"names":[],"mappings":";;;;;AAAA,wBAmSE"}
1
+ {"version":3,"file":"storiesList.d.ts","sourceRoot":"","sources":["../../src/docs/storiesList.tsx"],"names":[],"mappings":";;;;;AAAA,wBAwSE"}