@expressivecss/expressive 0.11.0 → 0.13.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.
- package/CHANGELOG.md +392 -7
- package/README.md +37 -1
- package/dist/css/expressive.css +5440 -234
- package/dist/css/expressive.css.map +1 -1
- package/dist/css/expressive.min.css +1 -1
- package/dist/css/expressive.min.css.map +1 -1
- package/dist/fonts/material-symbols-outlined.woff2 +0 -0
- package/dist/fonts/material-symbols-rounded.woff2 +0 -0
- package/dist/fonts/material-symbols-sharp.woff2 +0 -0
- package/dist/js/chunks/{chunk-AYYYWUJ4.mjs → chunk-3CLXLPYS.mjs} +17 -11
- package/dist/js/chunks/chunk-3CLXLPYS.mjs.map +7 -0
- package/dist/js/chunks/chunk-3DHK5CZU.mjs +105 -0
- package/dist/js/chunks/chunk-3DHK5CZU.mjs.map +7 -0
- package/dist/js/chunks/{chunk-IMUPRRI6.mjs → chunk-3VOK6J7U.mjs} +3 -3
- package/dist/js/chunks/chunk-4PWAPV6F.mjs +7 -0
- package/dist/js/chunks/chunk-4PWAPV6F.mjs.map +7 -0
- package/dist/js/chunks/{chunk-XFJ452AZ.mjs → chunk-55IA2XUC.mjs} +5 -6
- package/dist/js/chunks/{chunk-XFJ452AZ.mjs.map → chunk-55IA2XUC.mjs.map} +2 -2
- package/dist/js/chunks/{chunk-XDB3G6RL.mjs → chunk-6N2XAEFK.mjs} +15 -4
- package/dist/js/chunks/{chunk-XDB3G6RL.mjs.map → chunk-6N2XAEFK.mjs.map} +2 -2
- package/dist/js/chunks/{chunk-MISGHDUU.mjs → chunk-6OMRGML6.mjs} +9 -7
- package/dist/js/chunks/{chunk-MISGHDUU.mjs.map → chunk-6OMRGML6.mjs.map} +2 -2
- package/dist/js/chunks/{chunk-A3BJA7V4.mjs → chunk-6WLSDZ4O.mjs} +2 -2
- package/dist/js/chunks/chunk-CCWDV5CR.mjs +292 -0
- package/dist/js/chunks/chunk-CCWDV5CR.mjs.map +7 -0
- package/dist/js/chunks/{chunk-JODJAGFS.mjs → chunk-CKQP6P76.mjs} +31 -8
- package/dist/js/chunks/chunk-CKQP6P76.mjs.map +7 -0
- package/dist/js/chunks/{chunk-KR44BSYQ.mjs → chunk-DLWYKFEI.mjs} +3 -3
- package/dist/js/chunks/chunk-DTKR54I6.mjs +270 -0
- package/dist/js/chunks/chunk-DTKR54I6.mjs.map +7 -0
- package/dist/js/chunks/{chunk-SLFNPY5M.mjs → chunk-EC63CHXU.mjs} +2 -2
- package/dist/js/chunks/chunk-GVGT6MIU.mjs +47 -0
- package/dist/js/chunks/chunk-GVGT6MIU.mjs.map +7 -0
- package/dist/js/chunks/{chunk-LZVBJ33S.mjs → chunk-GZWPXXY6.mjs} +15 -8
- package/dist/js/chunks/chunk-GZWPXXY6.mjs.map +7 -0
- package/dist/js/chunks/chunk-HKT2S7VM.mjs +48 -0
- package/dist/js/chunks/chunk-HKT2S7VM.mjs.map +7 -0
- package/dist/js/chunks/{chunk-D4UZ4HFN.mjs → chunk-IFXVDDDH.mjs} +23 -11
- package/dist/js/chunks/chunk-IFXVDDDH.mjs.map +7 -0
- package/dist/js/chunks/chunk-K4CJCRGE.mjs +262 -0
- package/dist/js/chunks/chunk-K4CJCRGE.mjs.map +7 -0
- package/dist/js/chunks/chunk-LNCCYGPC.mjs +163 -0
- package/dist/js/chunks/chunk-LNCCYGPC.mjs.map +7 -0
- package/dist/js/chunks/{chunk-QSQ24FYT.mjs → chunk-LTWPGFBR.mjs} +2 -2
- package/dist/js/chunks/{chunk-QSQ24FYT.mjs.map → chunk-LTWPGFBR.mjs.map} +2 -2
- package/dist/js/chunks/{chunk-I5KR22BY.mjs → chunk-LWBQIX5J.mjs} +15 -15
- package/dist/js/chunks/chunk-LWBQIX5J.mjs.map +7 -0
- package/dist/js/chunks/{chunk-GY2Z5CJ2.mjs → chunk-NNYP33NB.mjs} +67 -32
- package/dist/js/chunks/chunk-NNYP33NB.mjs.map +7 -0
- package/dist/js/chunks/chunk-NQLC3YMW.mjs +1 -0
- package/dist/js/chunks/chunk-O5XPWXIQ.mjs +406 -0
- package/dist/js/chunks/chunk-O5XPWXIQ.mjs.map +7 -0
- package/dist/js/chunks/chunk-P3G3QHII.mjs +166 -0
- package/dist/js/chunks/chunk-P3G3QHII.mjs.map +7 -0
- package/dist/js/chunks/{chunk-VAS6JQ6P.mjs → chunk-PIJ2TAR3.mjs} +3 -3
- package/dist/js/chunks/{chunk-74N6U5JJ.mjs → chunk-PLYXLSH3.mjs} +38 -37
- package/dist/js/chunks/chunk-PLYXLSH3.mjs.map +7 -0
- package/dist/js/chunks/{chunk-PIIAEYAJ.mjs → chunk-QDAL4IYN.mjs} +2 -2
- package/dist/js/chunks/chunk-QKWPQK5N.mjs +179 -0
- package/dist/js/chunks/chunk-QKWPQK5N.mjs.map +7 -0
- package/dist/js/chunks/{chunk-FRB7TOCS.mjs → chunk-QV2JAWIZ.mjs} +2 -2
- package/dist/js/chunks/{chunk-N3UHGN3N.mjs → chunk-QVVEWBOF.mjs} +3 -3
- package/dist/js/chunks/chunk-RHRQKTTX.mjs +139 -0
- package/dist/js/chunks/chunk-RHRQKTTX.mjs.map +7 -0
- package/dist/js/chunks/chunk-SPETGK25.mjs +59 -0
- package/dist/js/chunks/chunk-SPETGK25.mjs.map +7 -0
- package/dist/js/chunks/{chunk-TK6PX2GC.mjs → chunk-U2OTHOTI.mjs} +131 -19
- package/dist/js/chunks/chunk-U2OTHOTI.mjs.map +7 -0
- package/dist/js/chunks/{chunk-TYM6U5DY.mjs → chunk-UAEAQBRC.mjs} +2 -2
- package/dist/js/chunks/{chunk-7UXHSYIA.mjs → chunk-UBLRRJ7N.mjs} +3 -3
- package/dist/js/chunks/{chunk-EP3CVKB5.mjs → chunk-UEZUJQ66.mjs} +8 -5
- package/dist/js/chunks/chunk-UEZUJQ66.mjs.map +7 -0
- package/dist/js/chunks/{chunk-JNPIWFJT.mjs → chunk-UNEMYWEW.mjs} +3 -3
- package/dist/js/chunks/chunk-VTLBW7QS.mjs +124 -0
- package/dist/js/chunks/chunk-VTLBW7QS.mjs.map +7 -0
- package/dist/js/chunks/{chunk-JKNPQQWY.mjs → chunk-WJXDBPXQ.mjs} +28 -12
- package/dist/js/chunks/chunk-WJXDBPXQ.mjs.map +7 -0
- package/dist/js/chunks/{chunk-CDW6WIRT.mjs → chunk-XGHORT7J.mjs} +18 -11
- package/dist/js/chunks/chunk-XGHORT7J.mjs.map +7 -0
- package/dist/js/chunks/{chunk-7GKXUG4B.mjs → chunk-XH6BEEMY.mjs} +78 -25
- package/dist/js/chunks/chunk-XH6BEEMY.mjs.map +7 -0
- package/dist/js/chunks/{chunk-XO5WX3TK.mjs → chunk-YDCS5S3J.mjs} +2 -2
- package/dist/js/expressive.cjs +2540 -233
- package/dist/js/expressive.cjs.map +4 -4
- package/dist/js/expressive.js +2540 -233
- package/dist/js/expressive.js.map +4 -4
- package/dist/js/expressive.min.js +10 -10
- package/dist/js/expressive.min.js.map +4 -4
- package/dist/js/expressive.mjs +86 -38
- package/dist/js/expressive.mjs.map +1 -1
- package/dist/js/internal/behaviors/bottomSheets.mjs +3 -3
- package/dist/js/internal/behaviors/dialogs.mjs +2 -2
- package/dist/js/internal/behaviors/forms.mjs +2 -2
- package/dist/js/internal/behaviors/sheetDrag.mjs +2 -2
- package/dist/js/internal/behaviors/sideSheets.mjs +3 -3
- package/dist/js/internal/components/appBar.mjs +2 -2
- package/dist/js/internal/components/autocomplete.mjs +4 -4
- package/dist/js/internal/components/barChart.mjs +10 -0
- package/dist/js/internal/components/barChart.mjs.map +7 -0
- package/dist/js/internal/components/buttonGroup.mjs +2 -2
- package/dist/js/internal/components/buttons.mjs +3 -3
- package/dist/js/internal/components/cards.mjs +3 -3
- package/dist/js/internal/components/carousel.mjs +3 -3
- package/dist/js/internal/components/characterCounter.mjs +2 -2
- package/dist/js/internal/components/chips.mjs +5 -5
- package/dist/js/internal/components/columnChart.mjs +9 -0
- package/dist/js/internal/components/columnChart.mjs.map +7 -0
- package/dist/js/internal/components/commandPalette.mjs +9 -0
- package/dist/js/internal/components/commandPalette.mjs.map +7 -0
- package/dist/js/internal/components/datepicker.mjs +6 -6
- package/dist/js/internal/components/expandingCard.mjs +3 -3
- package/dist/js/internal/components/heatmapChart.mjs +9 -0
- package/dist/js/internal/components/heatmapChart.mjs.map +7 -0
- package/dist/js/internal/components/index.mjs +79 -31
- package/dist/js/internal/components/lightbox.mjs +3 -3
- package/dist/js/internal/components/lineChart.mjs +12 -0
- package/dist/js/internal/components/lineChart.mjs.map +7 -0
- package/dist/js/internal/components/menu.mjs +3 -3
- package/dist/js/internal/components/messageScroller.mjs +9 -0
- package/dist/js/internal/components/messageScroller.mjs.map +7 -0
- package/dist/js/internal/components/mixedChart.mjs +10 -0
- package/dist/js/internal/components/mixedChart.mjs.map +7 -0
- package/dist/js/internal/components/navigationRail.mjs +2 -2
- package/dist/js/internal/components/pieChart.mjs +9 -0
- package/dist/js/internal/components/pieChart.mjs.map +7 -0
- package/dist/js/internal/components/questionnaire.mjs +9 -0
- package/dist/js/internal/components/questionnaire.mjs.map +7 -0
- package/dist/js/internal/components/radarChart.mjs +9 -0
- package/dist/js/internal/components/radarChart.mjs.map +7 -0
- package/dist/js/internal/components/radialChart.mjs +9 -0
- package/dist/js/internal/components/radialChart.mjs.map +7 -0
- package/dist/js/internal/components/registry.mjs +37 -25
- package/dist/js/internal/components/richTextEditor.mjs +9 -0
- package/dist/js/internal/components/richTextEditor.mjs.map +7 -0
- package/dist/js/internal/components/scrollspy.mjs +2 -2
- package/dist/js/internal/components/select.mjs +4 -4
- package/dist/js/internal/components/slider.mjs +3 -3
- package/dist/js/internal/components/snackbar.mjs +2 -2
- package/dist/js/internal/components/tabs.mjs +4 -4
- package/dist/js/internal/components/timepicker.mjs +4 -4
- package/dist/js/internal/components/tooltip.mjs +3 -3
- package/dist/js/internal/core/component.mjs +1 -1
- package/dist/js/internal/core/utils.mjs +1 -1
- package/dist/js/internal/plugins/dockedDisplayPlugin.mjs +2 -2
- package/dist/js/modular.mjs +86 -38
- package/dist/types/behaviors/forms.d.ts +22 -0
- package/dist/types/components/appBar.d.ts +1 -1
- package/dist/types/components/barChart.d.ts +24 -0
- package/dist/types/components/columnChart.d.ts +21 -0
- package/dist/types/components/commandPalette.d.ts +96 -0
- package/dist/types/components/datepicker.d.ts +5 -2
- package/dist/types/components/heatmapChart.d.ts +49 -0
- package/dist/types/components/index.d.ts +12 -0
- package/dist/types/components/lineChart.d.ts +134 -0
- package/dist/types/components/menu.d.ts +32 -0
- package/dist/types/components/messageScroller.d.ts +111 -0
- package/dist/types/components/mixedChart.d.ts +25 -0
- package/dist/types/components/pieChart.d.ts +40 -0
- package/dist/types/components/questionnaire.d.ts +96 -0
- package/dist/types/components/radarChart.d.ts +39 -0
- package/dist/types/components/radialChart.d.ts +45 -0
- package/dist/types/components/registry.d.ts +44 -0
- package/dist/types/components/richTextEditor.d.ts +71 -0
- package/dist/types/components/slider.d.ts +1 -0
- package/dist/types/components/snackbar.d.ts +6 -0
- package/dist/types/components/timepicker.d.ts +4 -1
- package/dist/types/components/tooltip.d.ts +2 -1
- package/dist/types/modular.d.ts +10 -1
- package/package.json +4 -1
- package/src/sass/README.md +3 -6
- package/src/sass/abstracts/_index.scss +1 -1
- package/src/sass/abstracts/_mixins.scss +226 -0
- package/src/sass/abstracts/_variables.scss +14 -0
- package/src/sass/base/_typography.scss +45 -0
- package/src/sass/components/_accordion.scss +161 -0
- package/src/sass/components/_aura.scss +119 -0
- package/src/sass/components/_avatar.scss +86 -0
- package/src/sass/components/_bar-chart.scss +285 -0
- package/src/sass/components/_bottom-sheet.scss +1 -0
- package/src/sass/components/_button-groups.scss +13 -3
- package/src/sass/components/_cards.scss +16 -13
- package/src/sass/components/_carousel.scss +9 -7
- package/src/sass/components/_column-chart.scss +134 -0
- package/src/sass/components/_command-palette.scss +140 -0
- package/src/sass/components/_countdown.scss +89 -0
- package/src/sass/components/_data-table.scss +188 -0
- package/src/sass/components/_dialog.scss +1 -0
- package/src/sass/components/_empty-state.scss +78 -0
- package/src/sass/components/_expanding-card.scss +3 -0
- package/src/sass/components/_heatmap-chart.scss +156 -0
- package/src/sass/components/_index.scss +27 -0
- package/src/sass/components/_kpi.scss +162 -0
- package/src/sass/components/_line-chart.scss +102 -0
- package/src/sass/components/_marquee.scss +111 -0
- package/src/sass/components/_menu.scss +10 -0
- package/src/sass/components/_message-scroller.scss +66 -0
- package/src/sass/components/_message.scss +202 -0
- package/src/sass/components/_mixed-chart.scss +157 -0
- package/src/sass/components/_navbar.scss +11 -6
- package/src/sass/components/_navigation-bar.scss +1 -0
- package/src/sass/components/_navigation-rail.scss +9 -0
- package/src/sass/components/_page-footer.scss +0 -11
- package/src/sass/components/_pie-chart.scss +203 -0
- package/src/sass/components/_popover.scss +112 -0
- package/src/sass/components/_progress.scss +25 -6
- package/src/sass/components/_questionnaire.scss +144 -0
- package/src/sass/components/_radar-chart.scss +205 -0
- package/src/sass/components/_radial-chart.scss +174 -0
- package/src/sass/components/_rich-text-editor.scss +99 -0
- package/src/sass/components/_search.scss +1 -0
- package/src/sass/components/_side-sheet.scss +1 -0
- package/src/sass/components/_skeleton.scss +81 -0
- package/src/sass/components/_snackbar.scss +2 -1
- package/src/sass/components/_stat.scss +86 -0
- package/src/sass/components/_stepper.scss +190 -0
- package/src/sass/components/_timeline.scss +114 -0
- package/src/sass/components/_timepicker.scss +2 -2
- package/src/sass/components/_toolbar.scss +2 -1
- package/src/sass/components/_tooltip.scss +2 -0
- package/src/sass/components/_tree.scss +139 -0
- package/src/sass/components/forms/_checkboxes.scss +2 -2
- package/src/sass/components/forms/_drop-zone.scss +128 -0
- package/src/sass/components/forms/_index.scss +2 -0
- package/src/sass/components/forms/_input-fields.scss +166 -15
- package/src/sass/components/forms/_radio-buttons.scss +2 -2
- package/src/sass/components/forms/_rating.scss +165 -0
- package/src/sass/components/forms/_slider.scss +51 -29
- package/src/sass/components/forms/_switches.scss +3 -3
- package/src/sass/tokens/_reference.scss +3 -15
- package/src/sass/utilities/_helpers.scss +14 -0
- package/src/sass/utilities/_index.scss +2 -0
- package/src/sass/utilities/_scroll-area.scss +35 -0
- package/src/sass/utilities/_shapes.scss +164 -0
- package/src/sass/utilities/_spacing.scss +29 -23
- package/src/sass/utilities/_visibility.scss +3 -2
- package/dist/js/chunks/chunk-74N6U5JJ.mjs.map +0 -7
- package/dist/js/chunks/chunk-7GKXUG4B.mjs.map +0 -7
- package/dist/js/chunks/chunk-AYYYWUJ4.mjs.map +0 -7
- package/dist/js/chunks/chunk-CDW6WIRT.mjs.map +0 -7
- package/dist/js/chunks/chunk-D4UZ4HFN.mjs.map +0 -7
- package/dist/js/chunks/chunk-EP3CVKB5.mjs.map +0 -7
- package/dist/js/chunks/chunk-GY2Z5CJ2.mjs.map +0 -7
- package/dist/js/chunks/chunk-I5KR22BY.mjs.map +0 -7
- package/dist/js/chunks/chunk-JKNPQQWY.mjs.map +0 -7
- package/dist/js/chunks/chunk-JODJAGFS.mjs.map +0 -7
- package/dist/js/chunks/chunk-JR24UB4X.mjs +0 -100
- package/dist/js/chunks/chunk-JR24UB4X.mjs.map +0 -7
- package/dist/js/chunks/chunk-LZVBJ33S.mjs.map +0 -7
- package/dist/js/chunks/chunk-PMBPAFAS.mjs +0 -7
- package/dist/js/chunks/chunk-PMBPAFAS.mjs.map +0 -7
- package/dist/js/chunks/chunk-TK6PX2GC.mjs.map +0 -7
- package/dist/js/chunks/chunk-WWPAPHMA.mjs +0 -1
- /package/dist/js/chunks/{chunk-IMUPRRI6.mjs.map → chunk-3VOK6J7U.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-A3BJA7V4.mjs.map → chunk-6WLSDZ4O.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-KR44BSYQ.mjs.map → chunk-DLWYKFEI.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-SLFNPY5M.mjs.map → chunk-EC63CHXU.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-WWPAPHMA.mjs.map → chunk-NQLC3YMW.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-VAS6JQ6P.mjs.map → chunk-PIJ2TAR3.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-PIIAEYAJ.mjs.map → chunk-QDAL4IYN.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-FRB7TOCS.mjs.map → chunk-QV2JAWIZ.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-N3UHGN3N.mjs.map → chunk-QVVEWBOF.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-TYM6U5DY.mjs.map → chunk-UAEAQBRC.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-7UXHSYIA.mjs.map → chunk-UBLRRJ7N.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-JNPIWFJT.mjs.map → chunk-UNEMYWEW.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-XO5WX3TK.mjs.map → chunk-YDCS5S3J.mjs.map} +0 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Component, BaseOptions, InitElements, InitElement } from '../core/component';
|
|
2
|
+
export interface QuestionnaireOptions extends BaseOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Text above the progress bar. `{current}` and `{total}` are replaced with
|
|
5
|
+
* the question number and the number of questions. `data-progress-label`
|
|
6
|
+
* on the form sets it.
|
|
7
|
+
* @default 'Question {current} of {total}'
|
|
8
|
+
*/
|
|
9
|
+
progressLabel: string;
|
|
10
|
+
/**
|
|
11
|
+
* Error shown when a question has no `.questionnaire-error` of its own and
|
|
12
|
+
* the browser gives no validation message, as for a `data-required` group
|
|
13
|
+
* of checkboxes.
|
|
14
|
+
* @default 'Choose an answer to continue.'
|
|
15
|
+
*/
|
|
16
|
+
requiredMessage: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A multi-step questionnaire: a <form class="questionnaire"> whose
|
|
20
|
+
* <fieldset> children are the questions, shown one at a time, and a <footer>
|
|
21
|
+
* of buttons. `value="previous"`, `value="skip"` and `value="next"` mark the
|
|
22
|
+
* navigation buttons; a submit button sends the form on the last question.
|
|
23
|
+
*
|
|
24
|
+
* A question is required when one of its controls is `required`, or when the
|
|
25
|
+
* fieldset has `data-required` (at least one enabled checkbox, held as a
|
|
26
|
+
* custom validity on the first one). Next and every way of submitting check
|
|
27
|
+
* it with the browser's own validation; an optional question gets Skip, which
|
|
28
|
+
* clears its answer. A disabled fieldset is left out, so a page can switch
|
|
29
|
+
* questions on and off from earlier answers.
|
|
30
|
+
*
|
|
31
|
+
* Without JavaScript every question shows at once and the submit button sends
|
|
32
|
+
* the form. The answers are ordinary form controls, so FormData reads them.
|
|
33
|
+
*/
|
|
34
|
+
export declare class Questionnaire extends Component<QuestionnaireOptions> {
|
|
35
|
+
el: HTMLFormElement;
|
|
36
|
+
private _active;
|
|
37
|
+
private _progress;
|
|
38
|
+
private _progressText;
|
|
39
|
+
private _progressBar;
|
|
40
|
+
private _generated;
|
|
41
|
+
private _generatedIds;
|
|
42
|
+
private _observer;
|
|
43
|
+
/** Set while one submission's invalid events arrive, so only the first opens. */
|
|
44
|
+
private _reporting;
|
|
45
|
+
constructor(el: HTMLFormElement, options: Partial<QuestionnaireOptions>);
|
|
46
|
+
static get defaults(): QuestionnaireOptions;
|
|
47
|
+
/**
|
|
48
|
+
* Initializes instance of Questionnaire.
|
|
49
|
+
* @param el HTML element.
|
|
50
|
+
* @param options Component options.
|
|
51
|
+
*/
|
|
52
|
+
static init(el: HTMLElement, options?: Partial<QuestionnaireOptions>): Questionnaire;
|
|
53
|
+
/**
|
|
54
|
+
* Initializes instances of Questionnaire.
|
|
55
|
+
* @param els HTML elements.
|
|
56
|
+
* @param options Component options.
|
|
57
|
+
*/
|
|
58
|
+
static init(els: InitElements<InitElement>, options?: Partial<QuestionnaireOptions>): Questionnaire[];
|
|
59
|
+
static getInstance(el: HTMLElement): Questionnaire;
|
|
60
|
+
/** The questions that apply: every fieldset child that is not disabled. */
|
|
61
|
+
get items(): HTMLFieldSetElement[];
|
|
62
|
+
/** Position of the shown question in `items`. */
|
|
63
|
+
get index(): number;
|
|
64
|
+
/** Shows the question at `index` without checking the current one. */
|
|
65
|
+
goTo: (index: number) => void;
|
|
66
|
+
/** Checks the shown question and moves to the next one if it is answered. */
|
|
67
|
+
next: () => void;
|
|
68
|
+
/** Moves to the previous question. */
|
|
69
|
+
previous: () => void;
|
|
70
|
+
/** Clears the answer to the shown question and moves to the next one. */
|
|
71
|
+
skip: () => void;
|
|
72
|
+
destroy(): void;
|
|
73
|
+
private _fieldsets;
|
|
74
|
+
/** The footer's navigation and submit buttons. */
|
|
75
|
+
private _buttons;
|
|
76
|
+
private _controls;
|
|
77
|
+
private _required;
|
|
78
|
+
private _ensureId;
|
|
79
|
+
private _render;
|
|
80
|
+
/**
|
|
81
|
+
* Puts "choose at least one" on the first enabled checkbox of each
|
|
82
|
+
* data-required group with none checked, so the browser's validation, and
|
|
83
|
+
* every way of submitting, sees it. A disabled checkbox is not sent, so it
|
|
84
|
+
* does not count.
|
|
85
|
+
*/
|
|
86
|
+
private _syncRequired;
|
|
87
|
+
/** The first control in the question that still needs an answer. */
|
|
88
|
+
private _invalidControl;
|
|
89
|
+
/** Shows the question's error and returns false when it needs an answer. */
|
|
90
|
+
private _validate;
|
|
91
|
+
private _setInvalid;
|
|
92
|
+
private _handleClick;
|
|
93
|
+
private _handleKeydown;
|
|
94
|
+
private _handleInvalid;
|
|
95
|
+
private _handleInput;
|
|
96
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { InitElements, InitElement } from '../core/component';
|
|
2
|
+
import { LineChart, LineChartOptions } from './lineChart';
|
|
3
|
+
export type RadarChartOptions = LineChartOptions;
|
|
4
|
+
/**
|
|
5
|
+
* Radar chart. It reads its <table> like LineChart, but each row is a spoke,
|
|
6
|
+
* clockwise from the top, and each value column is a series drawn as a
|
|
7
|
+
* shape joining its values on the spokes, from zero in the middle to the
|
|
8
|
+
* scale's top at the rim. The row labels sit round the rim.
|
|
9
|
+
*
|
|
10
|
+
* Re-run `RadarChart.init(el)` after changing the table.
|
|
11
|
+
*/
|
|
12
|
+
export declare class RadarChart extends LineChart {
|
|
13
|
+
protected get _type(): string;
|
|
14
|
+
protected get _key(): string;
|
|
15
|
+
/** The scale starts at zero, the middle, so shapes compare by size. */
|
|
16
|
+
protected get _fromZero(): boolean;
|
|
17
|
+
protected get _circular(): boolean;
|
|
18
|
+
static init(el: HTMLElement, options?: Partial<RadarChartOptions>): RadarChart;
|
|
19
|
+
static init(els: InitElements<InitElement>, options?: Partial<RadarChartOptions>): RadarChart[];
|
|
20
|
+
static getInstance(el: HTMLElement): RadarChart;
|
|
21
|
+
/**
|
|
22
|
+
* The cursor is a spoke turned by --turn, and the tooltip sits past its
|
|
23
|
+
* tip. LineChart's points on the spoke keep their top, a share of the
|
|
24
|
+
* radius, which stops at the rim and the middle like the shapes.
|
|
25
|
+
*/
|
|
26
|
+
protected _place(index: number): void;
|
|
27
|
+
/** A row's spoke as a fraction of a turn clockwise from the top. */
|
|
28
|
+
private _turn;
|
|
29
|
+
/** Only the legend; the labels go round the rim in _draw. */
|
|
30
|
+
protected _guides(): Element[];
|
|
31
|
+
/** The nearest spoke to the pointer, by its angle from the middle. */
|
|
32
|
+
protected _indexAt(e: PointerEvent): number;
|
|
33
|
+
/**
|
|
34
|
+
* An SVG in a -50 to 50 box: the rings and spokes of the grid, then each
|
|
35
|
+
* series' shape, with its points for .points. The rim is the box's edge;
|
|
36
|
+
* the labels round it are HTML.
|
|
37
|
+
*/
|
|
38
|
+
protected _draw(): Element;
|
|
39
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { InitElements, InitElement } from '../core/component';
|
|
2
|
+
import { LineChart, LineChartOptions } from './lineChart';
|
|
3
|
+
export type RadialChartOptions = LineChartOptions;
|
|
4
|
+
/**
|
|
5
|
+
* Radial chart. It reads its <table> like LineChart, but draws each row of
|
|
6
|
+
* the first value column as a ring, outermost first, filled clockwise from
|
|
7
|
+
* the top as a share of `data-max` above zero (100 by default). With `.gauge` the rings
|
|
8
|
+
* are half circles over the middle. A <tfoot> row shows in the middle, and
|
|
9
|
+
* a legend lists the rows when there is more than one. Further columns show
|
|
10
|
+
* in the tooltip.
|
|
11
|
+
*
|
|
12
|
+
* Re-run `RadialChart.init(el)` after changing the table or the ring tokens.
|
|
13
|
+
*/
|
|
14
|
+
export declare class RadialChart extends LineChart {
|
|
15
|
+
/** Each ring's middle radius, and their shared width. */
|
|
16
|
+
private _radii;
|
|
17
|
+
private _width;
|
|
18
|
+
/** Each row's share of the maximum, from 0 to 1. */
|
|
19
|
+
private _fractions;
|
|
20
|
+
private _rings;
|
|
21
|
+
protected get _type(): string;
|
|
22
|
+
protected get _key(): string;
|
|
23
|
+
protected get _points(): boolean;
|
|
24
|
+
protected get _circular(): boolean;
|
|
25
|
+
private get _gauge();
|
|
26
|
+
static init(el: HTMLElement, options?: Partial<RadialChartOptions>): RadialChart;
|
|
27
|
+
static init(els: InitElements<InitElement>, options?: Partial<RadialChartOptions>): RadialChart[];
|
|
28
|
+
static getInstance(el: HTMLElement): RadialChart;
|
|
29
|
+
show(index: number): void;
|
|
30
|
+
/** The tooltip sits where the ring's fill ends. */
|
|
31
|
+
protected _place(index: number): void;
|
|
32
|
+
private _color;
|
|
33
|
+
/** A fraction of the ring as a turn clockwise from the top. */
|
|
34
|
+
private _turn;
|
|
35
|
+
/** For more than one row, a legend of every row with its color and cell. */
|
|
36
|
+
protected _guides(): Element[];
|
|
37
|
+
/** The ring under the pointer by its distance from the middle, or -1. */
|
|
38
|
+
protected _indexAt(e: PointerEvent): number;
|
|
39
|
+
/**
|
|
40
|
+
* An SVG of rings in a -50 to 50 box, the top half for a gauge. Each row
|
|
41
|
+
* is a track circle and a fill circle whose dash is its share; CSS draws
|
|
42
|
+
* them from --radial-chart-dash. The total is HTML over it.
|
|
43
|
+
*/
|
|
44
|
+
protected _draw(): Element;
|
|
45
|
+
}
|
|
@@ -43,14 +43,58 @@ export declare const AUTO_INIT_COMPONENTS: {
|
|
|
43
43
|
component: typeof Components.Chips;
|
|
44
44
|
selector: string;
|
|
45
45
|
};
|
|
46
|
+
ColumnChart: {
|
|
47
|
+
component: typeof Components.ColumnChart;
|
|
48
|
+
selector: string;
|
|
49
|
+
};
|
|
50
|
+
BarChart: {
|
|
51
|
+
component: typeof Components.BarChart;
|
|
52
|
+
selector: string;
|
|
53
|
+
};
|
|
54
|
+
PieChart: {
|
|
55
|
+
component: typeof Components.PieChart;
|
|
56
|
+
selector: string;
|
|
57
|
+
};
|
|
58
|
+
HeatmapChart: {
|
|
59
|
+
component: typeof Components.HeatmapChart;
|
|
60
|
+
selector: string;
|
|
61
|
+
};
|
|
62
|
+
RadarChart: {
|
|
63
|
+
component: typeof Components.RadarChart;
|
|
64
|
+
selector: string;
|
|
65
|
+
};
|
|
66
|
+
RadialChart: {
|
|
67
|
+
component: typeof Components.RadialChart;
|
|
68
|
+
selector: string;
|
|
69
|
+
};
|
|
70
|
+
MixedChart: {
|
|
71
|
+
component: typeof Components.MixedChart;
|
|
72
|
+
selector: string;
|
|
73
|
+
};
|
|
74
|
+
CommandPalette: {
|
|
75
|
+
component: typeof Components.CommandPalette;
|
|
76
|
+
selector: string;
|
|
77
|
+
};
|
|
78
|
+
Questionnaire: {
|
|
79
|
+
component: typeof Components.Questionnaire;
|
|
80
|
+
selector: string;
|
|
81
|
+
};
|
|
46
82
|
Datepicker: {
|
|
47
83
|
component: typeof Components.Datepicker;
|
|
48
84
|
selector: string;
|
|
49
85
|
};
|
|
86
|
+
LineChart: {
|
|
87
|
+
component: typeof Components.LineChart;
|
|
88
|
+
selector: string;
|
|
89
|
+
};
|
|
50
90
|
Menu: {
|
|
51
91
|
component: typeof Components.Menu;
|
|
52
92
|
selector: string;
|
|
53
93
|
};
|
|
94
|
+
MessageScroller: {
|
|
95
|
+
component: typeof Components.MessageScroller;
|
|
96
|
+
selector: string;
|
|
97
|
+
};
|
|
54
98
|
Lightbox: {
|
|
55
99
|
component: typeof Components.Lightbox;
|
|
56
100
|
selector: string;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Component, BaseOptions, InitElements, InitElement } from '../core/component';
|
|
2
|
+
/**
|
|
3
|
+
* The parts of a Tiptap `Editor` this component uses. Declared here so the
|
|
4
|
+
* published types do not depend on Tiptap.
|
|
5
|
+
*/
|
|
6
|
+
export interface RichTextEditorInstance {
|
|
7
|
+
commands: object;
|
|
8
|
+
isEditable: boolean;
|
|
9
|
+
isEmpty: boolean;
|
|
10
|
+
chain(): any;
|
|
11
|
+
can(): any;
|
|
12
|
+
isActive(name: string, attributes?: object): boolean;
|
|
13
|
+
getHTML(): string;
|
|
14
|
+
on(event: string, callback: () => void): unknown;
|
|
15
|
+
off(event: string, callback: () => void): unknown;
|
|
16
|
+
destroy(): void;
|
|
17
|
+
}
|
|
18
|
+
export interface RichTextEditorOptions extends BaseOptions {
|
|
19
|
+
/**
|
|
20
|
+
* Tiptap's `Editor` class. ExpressiveCSS does not bundle Tiptap, so the
|
|
21
|
+
* page imports it and passes it in.
|
|
22
|
+
* @default null
|
|
23
|
+
*/
|
|
24
|
+
Editor: (new (options: any) => RichTextEditorInstance) | null;
|
|
25
|
+
/**
|
|
26
|
+
* Tiptap extensions, usually `[StarterKit]`.
|
|
27
|
+
* @default []
|
|
28
|
+
*/
|
|
29
|
+
extensions: unknown[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A rich text editor built on Tiptap: a `.rich-text-editor` holding a
|
|
33
|
+
* `<textarea>` and, usually, a `.toolbar` of `[data-command]` buttons.
|
|
34
|
+
*
|
|
35
|
+
* The textarea's value is the starting HTML. The component hides it, mounts
|
|
36
|
+
* the editor after it and writes the editor's HTML back on every change, so
|
|
37
|
+
* the textarea still submits with its form. A button's `data-command` names a
|
|
38
|
+
* Tiptap command and `data-attributes` holds its JSON argument. Buttons are
|
|
39
|
+
* disabled when their command cannot run, and `toggle*` commands report their
|
|
40
|
+
* state with `aria-pressed` and `.active`.
|
|
41
|
+
*/
|
|
42
|
+
export declare class RichTextEditor extends Component<RichTextEditorOptions> {
|
|
43
|
+
/** The Tiptap editor. */
|
|
44
|
+
editor: RichTextEditorInstance | null;
|
|
45
|
+
/** The form value. */
|
|
46
|
+
textarea: HTMLTextAreaElement | null;
|
|
47
|
+
/** The element the editor is mounted in. */
|
|
48
|
+
content: HTMLElement | null;
|
|
49
|
+
private _actions;
|
|
50
|
+
private _label;
|
|
51
|
+
constructor(el: HTMLElement, options: Partial<RichTextEditorOptions>);
|
|
52
|
+
static get defaults(): RichTextEditorOptions;
|
|
53
|
+
/**
|
|
54
|
+
* Initializes instance of RichTextEditor.
|
|
55
|
+
* @param el HTML element.
|
|
56
|
+
* @param options Component options.
|
|
57
|
+
*/
|
|
58
|
+
static init(el: HTMLElement, options?: Partial<RichTextEditorOptions>): RichTextEditor;
|
|
59
|
+
/**
|
|
60
|
+
* Initializes instances of RichTextEditor.
|
|
61
|
+
* @param els HTML elements.
|
|
62
|
+
* @param options Component options.
|
|
63
|
+
*/
|
|
64
|
+
static init(els: InitElements<InitElement>, options?: Partial<RichTextEditorOptions>): RichTextEditor[];
|
|
65
|
+
static getInstance(el: HTMLElement): RichTextEditor;
|
|
66
|
+
destroy(): void;
|
|
67
|
+
private _handleClick;
|
|
68
|
+
private _handleLabelClick;
|
|
69
|
+
private _handleUpdate;
|
|
70
|
+
private _handleTransaction;
|
|
71
|
+
}
|
|
@@ -23,6 +23,7 @@ export declare class Slider extends Component<SliderOptions> {
|
|
|
23
23
|
static init(els: InitElements<HTMLInputElement | InitElement>, options?: Partial<SliderOptions>): Slider[];
|
|
24
24
|
static getInstance(el: HTMLInputElement): Slider;
|
|
25
25
|
destroy(): void;
|
|
26
|
+
_set(el: HTMLElement, name: string, value: string): void;
|
|
26
27
|
_setupEventHandlers(): void;
|
|
27
28
|
_removeEventHandlers(): void;
|
|
28
29
|
_handleRangeChange: () => void;
|
|
@@ -92,6 +92,11 @@ export declare class Snackbar {
|
|
|
92
92
|
velocityX: number;
|
|
93
93
|
private _dismissed;
|
|
94
94
|
private _returnFocus;
|
|
95
|
+
private _events;
|
|
96
|
+
private _restoreElement;
|
|
97
|
+
private _transitionTimer;
|
|
98
|
+
private _dismissTimer;
|
|
99
|
+
private _focusTimer;
|
|
95
100
|
static _snackbars: Snackbar[];
|
|
96
101
|
static _container: HTMLElement;
|
|
97
102
|
static _draggedSnackbar: Snackbar;
|
|
@@ -116,6 +121,7 @@ export declare class Snackbar {
|
|
|
116
121
|
*/
|
|
117
122
|
static dismissAll(): void;
|
|
118
123
|
_createSnackbar(): HTMLElement;
|
|
124
|
+
private _remove;
|
|
119
125
|
_animateIn(): void;
|
|
120
126
|
/**
|
|
121
127
|
* Arm the dismissal timer.
|
|
@@ -41,7 +41,7 @@ export interface TimepickerOptions extends BaseOptions {
|
|
|
41
41
|
* Autosubmit timepicker selection to input field
|
|
42
42
|
* @default true
|
|
43
43
|
*/
|
|
44
|
-
autoSubmit:
|
|
44
|
+
autoSubmit: boolean;
|
|
45
45
|
/**
|
|
46
46
|
* Default time to set on the timepicker 'now' or '13:14'.
|
|
47
47
|
* @default 'now';
|
|
@@ -143,6 +143,8 @@ export declare class Timepicker extends Component<TimepickerOptions> {
|
|
|
143
143
|
g: Element;
|
|
144
144
|
toggleViewTimer: ReturnType<typeof setTimeout>;
|
|
145
145
|
vibrateTimer: ReturnType<typeof setTimeout>;
|
|
146
|
+
private _autoSubmitTimer;
|
|
147
|
+
private _clockResetTimer;
|
|
146
148
|
private displayPlugin;
|
|
147
149
|
/** Whether the dial (ticks + SVG + AM/PM buttons) has been built yet. */
|
|
148
150
|
private _clockBuilt;
|
|
@@ -202,6 +204,7 @@ export declare class Timepicker extends Component<TimepickerOptions> {
|
|
|
202
204
|
* @param delay
|
|
203
205
|
*/
|
|
204
206
|
showView: (view: Views, delay?: number) => void;
|
|
207
|
+
private _cancelClockReset;
|
|
205
208
|
resetClock(delay: any): void;
|
|
206
209
|
_inputFromTextField: (event: Event) => void;
|
|
207
210
|
drawClockFromTimeInput(value: any, isHours: any): void;
|
|
@@ -70,6 +70,7 @@ export declare class Tooltip extends Component<TooltipOptions> {
|
|
|
70
70
|
private _exitDelayTimeout;
|
|
71
71
|
private _enterDelayTimeout;
|
|
72
72
|
private _animationTimeout;
|
|
73
|
+
private _originalContent;
|
|
73
74
|
xMovement: number;
|
|
74
75
|
yMovement: number;
|
|
75
76
|
constructor(el: HTMLElement, options: Partial<TooltipOptions>);
|
|
@@ -96,7 +97,7 @@ export declare class Tooltip extends Component<TooltipOptions> {
|
|
|
96
97
|
/**
|
|
97
98
|
* Show tooltip.
|
|
98
99
|
*/
|
|
99
|
-
open: (isManual
|
|
100
|
+
open: (isManual?: boolean) => void;
|
|
100
101
|
/**
|
|
101
102
|
* Hide tooltip.
|
|
102
103
|
*/
|
package/dist/types/modular.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { SideSheets } from './behaviors/sideSheets';
|
|
|
5
5
|
export { Forms } from './behaviors/forms';
|
|
6
6
|
export { AutoInit } from './components/registry';
|
|
7
7
|
export type { AutoInitOptions } from './components/registry';
|
|
8
|
-
export declare const version = "0.
|
|
8
|
+
export declare const version = "0.13.1";
|
|
9
9
|
export type * from './components/autocomplete';
|
|
10
10
|
export type * from './components/appBar';
|
|
11
11
|
export type * from './components/buttons';
|
|
@@ -15,6 +15,15 @@ export type * from './components/expandingCard';
|
|
|
15
15
|
export type * from './components/carousel';
|
|
16
16
|
export type * from './components/characterCounter';
|
|
17
17
|
export type * from './components/chips';
|
|
18
|
+
export type * from './components/lineChart';
|
|
19
|
+
export type * from './components/columnChart';
|
|
20
|
+
export type * from './components/barChart';
|
|
21
|
+
export type * from './components/pieChart';
|
|
22
|
+
export type * from './components/heatmapChart';
|
|
23
|
+
export type * from './components/radarChart';
|
|
24
|
+
export type * from './components/radialChart';
|
|
25
|
+
export type * from './components/mixedChart';
|
|
26
|
+
export type * from './components/questionnaire';
|
|
18
27
|
export type * from './components/datepicker';
|
|
19
28
|
export type * from './components/menu';
|
|
20
29
|
export type * from './components/lightbox';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expressivecss/expressive",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "ExpressiveCSS - a Material Design 3 front-end framework.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "BaezFJ <baezdevs@gmail.com>",
|
|
@@ -130,6 +130,9 @@
|
|
|
130
130
|
"@fontsource/noto-sans": "^5.3.0",
|
|
131
131
|
"@fontsource/roboto": "^5.3.0",
|
|
132
132
|
"@playwright/test": "^1.56.0",
|
|
133
|
+
"@tiptap/core": "^3.31.4",
|
|
134
|
+
"@tiptap/pm": "^3.31.4",
|
|
135
|
+
"@tiptap/starter-kit": "^3.31.4",
|
|
133
136
|
"astro": "^7.2.8",
|
|
134
137
|
"esbuild": "^0.28.2",
|
|
135
138
|
"fallow": "^3.23.0",
|
package/src/sass/README.md
CHANGED
|
@@ -102,12 +102,9 @@ comparators, so each boundary is written once without fractional max-widths.
|
|
|
102
102
|
each pair onto the live `--md-sys-color-<role>` name with `light-dark()`, in one
|
|
103
103
|
`@each` over `$sys-color-roles`.
|
|
104
104
|
|
|
105
|
-
The shipped seed is `#
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
(0–60°) put primary on top of error — ΔEok 0.07–0.12 against ~0.28 for teal.
|
|
109
|
-
Green is avoided so it stays available for a "settled/paid" role, which Material
|
|
110
|
-
does not supply. See the comment above `$md-source`.
|
|
105
|
+
The shipped seed is `#c6a0f6`, named Mist Iris in the docs picker. The ramps
|
|
106
|
+
derive their hues from this seed, with fixed chroma and tone values. The error
|
|
107
|
+
ramp stays fixed when the seed changes.
|
|
111
108
|
|
|
112
109
|
Setting `--md-source` re-themes the whole system at runtime, with no rebuild:
|
|
113
110
|
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
@forward "elevation"; // z-depth() mixin
|
|
5
5
|
@forward "breakpoints"; // $breakpoints map + bp-up()/bp-down()/bp-between()
|
|
6
6
|
@forward "variables"; // Sass-time knobs: grid, font sizes, flow text
|
|
7
|
-
@forward "mixins"; // btn-*, focus-visible
|
|
7
|
+
@forward "mixins"; // btn-*, focus-visible, chart()
|