spell-ui 0.8.15 → 0.8.17
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/README-components.md +4 -2
- package/README-runtime.md +26 -1
- package/README.md +2 -1
- package/dist/SliderScale-DunjyaDW.js +67 -0
- package/dist/SliderScale-DunjyaDW.js.map +1 -0
- package/dist/{ThemeDraft-CyX3YA_L.js → ThemeDraft-spaNC2dD.js} +2 -2
- package/dist/{ThemeDraft-CyX3YA_L.js.map → ThemeDraft-spaNC2dD.js.map} +1 -1
- package/dist/{UIInput-B3K0w4ow.js → UIInput-8s1aiaw1.js} +2 -2
- package/dist/UIInput-8s1aiaw1.js.map +1 -0
- package/dist/{UIRuntime-DCv4sy30.js → UIRuntime-BaokNnwk.js} +900 -158
- package/dist/UIRuntime-BaokNnwk.js.map +1 -0
- package/dist/_spell-element/UIComponent.d.ts +7 -0
- package/dist/_spell-element/elements.types.d.ts +6 -0
- package/dist/_spell-element/vocabulary.types.d.ts +27 -0
- package/dist/_util/dom.d.ts +7 -0
- package/dist/components/components.es.d.ts +1 -0
- package/dist/components/ui-dial/DialArc.d.ts +43 -0
- package/dist/components/ui-dial/UIDial.d.ts +263 -0
- package/dist/components/ui-dial/UIDial.en.d.ts +149 -0
- package/dist/components/ui-dial/UIDial.es.d.ts +25 -0
- package/dist/components/ui-dial/UIDial.fallback.d.ts +167 -0
- package/dist/components/ui-dial/UIDial.types.d.ts +11 -0
- package/dist/components/ui-dial/index.d.ts +3 -0
- package/dist/components/ui-graph/UIGraph.d.ts +17 -0
- package/dist/components/ui-graph/UIGraph.en.d.ts +17 -0
- package/dist/components/ui-graph/UIGraph.es.d.ts +6 -0
- package/dist/components/ui-input/UIInput.d.ts +46 -3
- package/dist/components/ui-input/UIInput.en.d.ts +6 -1
- package/dist/components/ui-input/UIInput.es.d.ts +1 -0
- package/dist/components/ui-input/UIInput.fallback.d.ts +6 -1
- package/dist/components/ui-json/UIJson.d.ts +5 -4
- package/dist/components/ui-modal/ChoiceRows.d.ts +61 -0
- package/dist/components/ui-modal/ModalDialogs.d.ts +15 -1
- package/dist/components/ui-modal/UIModal.d.ts +6 -2
- package/dist/components/ui-modal/UIModal.en.d.ts +6 -2
- package/dist/components/ui-modal/UIModal.es.d.ts +1 -0
- package/dist/components/ui-page-layout/UIPageLayout.d.ts +141 -8
- package/dist/components/ui-page-layout/UIPageLayout.en.d.ts +51 -2
- package/dist/components/ui-page-layout/UIPageLayout.es.d.ts +3 -0
- package/dist/components/ui-property-editor/UIProperty.d.ts +2 -2
- package/dist/components/ui-site-links/UISiteLinks.d.ts +124 -0
- package/dist/components/ui-site-links/UISiteLinks.en.d.ts +60 -0
- package/dist/components/ui-site-links/UISiteLinks.es.d.ts +26 -0
- package/dist/components/ui-site-links/index.d.ts +1 -0
- package/dist/components/ui-site-nav-button/UISiteNavButton.d.ts +12 -5
- package/dist/components/ui-site-nav-button/UISiteNavButton.en.d.ts +32 -12
- package/dist/components/ui-site-nav-button/UISiteNavButton.es.d.ts +3 -0
- package/dist/components/ui-site-tabs/UISiteTabs.d.ts +13 -0
- package/dist/components/ui-site-tabs/UISiteTabs.en.d.ts +9 -0
- package/dist/components/ui-slider/SliderScale.d.ts +26 -2
- package/dist/components/ui-slider/UISlider.d.ts +0 -2
- package/dist/components/ui-statistic/UIStatistic.d.ts +1 -0
- package/dist/components/ui-statistic/UIStatistic.en.d.ts +1 -0
- package/dist/components/ui-toc/TocIndex.d.ts +16 -1
- package/dist/components/ui-toc/UIToc.d.ts +27 -3
- package/dist/components/ui-toc/UIToc.en.d.ts +1 -1
- package/dist/components/ui-toc/UIToc.types.d.ts +5 -0
- package/dist/components/ui-tree/UITree.d.ts +38 -2
- package/dist/components/ui-tree/UITree.en.d.ts +9 -0
- package/dist/components/ui-tree/UITree.es.d.ts +4 -0
- package/dist/components/ui-uploader/UIUploader.d.ts +721 -0
- package/dist/components/ui-uploader/UIUploader.en.d.ts +394 -0
- package/dist/components/ui-uploader/UIUploader.es.d.ts +112 -0
- package/dist/components/ui-uploader/index.d.ts +1 -0
- package/dist/{components.es-DilRG1VO.js → components.es-jY2nBwuP.js} +249 -65
- package/dist/components.es-jY2nBwuP.js.map +1 -0
- package/dist/core.js +605 -571
- package/dist/core.js.map +1 -1
- package/dist/docs-components/docs-components.types.d.ts +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +101 -97
- package/dist/jsx.d.ts +1138 -21
- package/dist/runtime/DataTooltips.d.ts +10 -0
- package/dist/runtime/Modals.d.ts +7 -2
- package/dist/runtime/Styles.d.ts +7 -1
- package/dist/runtime/UIRuntime.d.ts +6 -0
- package/dist/runtime/runtime.types.d.ts +26 -1
- package/dist/sound-library/back.ogg +0 -0
- package/dist/sound-library/beep.ogg +0 -0
- package/dist/sound-library/bell.ogg +0 -0
- package/dist/sound-library/big-punch.ogg +0 -0
- package/dist/sound-library/bong.ogg +0 -0
- package/dist/sound-library/book-close.ogg +0 -0
- package/dist/sound-library/book-down.ogg +0 -0
- package/dist/sound-library/book-open.ogg +0 -0
- package/dist/sound-library/card-fan-2.ogg +0 -0
- package/dist/sound-library/card-fan.ogg +0 -0
- package/dist/sound-library/card-place-2.ogg +0 -0
- package/dist/sound-library/card-place-3.ogg +0 -0
- package/dist/sound-library/card-place.ogg +0 -0
- package/dist/sound-library/card-shove-2.ogg +0 -0
- package/dist/sound-library/card-shove.ogg +0 -0
- package/dist/sound-library/card-slide-2.ogg +0 -0
- package/dist/sound-library/card-slide-3.ogg +0 -0
- package/dist/sound-library/card-slide-4.ogg +0 -0
- package/dist/sound-library/card-slide.ogg +0 -0
- package/dist/sound-library/chip-down-2.ogg +0 -0
- package/dist/sound-library/chip-down.ogg +0 -0
- package/dist/sound-library/chips-collide.ogg +0 -0
- package/dist/sound-library/chips-handle.ogg +0 -0
- package/dist/sound-library/chips-stack-2.ogg +0 -0
- package/dist/sound-library/chips-stack.ogg +0 -0
- package/dist/sound-library/chop.ogg +0 -0
- package/dist/sound-library/click-2.ogg +0 -0
- package/dist/sound-library/click-3.ogg +0 -0
- package/dist/sound-library/click.ogg +0 -0
- package/dist/sound-library/close.ogg +0 -0
- package/dist/sound-library/cloth.ogg +0 -0
- package/dist/sound-library/coins-2.ogg +0 -0
- package/dist/sound-library/coins.ogg +0 -0
- package/dist/sound-library/confirm-2.ogg +0 -0
- package/dist/sound-library/confirm.ogg +0 -0
- package/dist/sound-library/creak.ogg +0 -0
- package/dist/sound-library/deck-open.ogg +0 -0
- package/dist/sound-library/deck-take-out.ogg +0 -0
- package/dist/sound-library/dice-grab.ogg +0 -0
- package/dist/sound-library/dice-shake-2.ogg +0 -0
- package/dist/sound-library/dice-shake.ogg +0 -0
- package/dist/sound-library/dice-throw-2.ogg +0 -0
- package/dist/sound-library/dice-throw.ogg +0 -0
- package/dist/sound-library/die-throw-2.ogg +0 -0
- package/dist/sound-library/die-throw.ogg +0 -0
- package/dist/sound-library/door-close.ogg +0 -0
- package/dist/sound-library/door-open.ogg +0 -0
- package/dist/sound-library/drop.ogg +0 -0
- package/dist/sound-library/error-2.ogg +0 -0
- package/dist/sound-library/error.ogg +0 -0
- package/dist/sound-library/fail.ogg +0 -0
- package/dist/sound-library/fall.ogg +0 -0
- package/dist/sound-library/glass-break.ogg +0 -0
- package/dist/sound-library/glass-clink.ogg +0 -0
- package/dist/sound-library/glass-tap.ogg +0 -0
- package/dist/sound-library/glass.ogg +0 -0
- package/dist/sound-library/glitch.ogg +0 -0
- package/dist/sound-library/grow.ogg +0 -0
- package/dist/sound-library/high-up.ogg +0 -0
- package/dist/sound-library/hover-2.ogg +0 -0
- package/dist/sound-library/hover.ogg +0 -0
- package/dist/sound-library/jingle-2.ogg +0 -0
- package/dist/sound-library/jingle-3.ogg +0 -0
- package/dist/sound-library/jingle-4.ogg +0 -0
- package/dist/sound-library/jingle.ogg +0 -0
- package/dist/sound-library/jump.ogg +0 -0
- package/dist/sound-library/knife-draw.ogg +0 -0
- package/dist/sound-library/knife-slice.ogg +0 -0
- package/dist/sound-library/laser-2.ogg +0 -0
- package/dist/sound-library/laser.ogg +0 -0
- package/dist/sound-library/latch.ogg +0 -0
- package/dist/sound-library/level-up.ogg +0 -0
- package/dist/sound-library/lose-2.ogg +0 -0
- package/dist/sound-library/lose-3.ogg +0 -0
- package/dist/sound-library/lose-4.ogg +0 -0
- package/dist/sound-library/lose.ogg +0 -0
- package/dist/sound-library/low-down.ogg +0 -0
- package/dist/sound-library/metal-clang.ogg +0 -0
- package/dist/sound-library/metal-click.ogg +0 -0
- package/dist/sound-library/metal-crash.ogg +0 -0
- package/dist/sound-library/metal-tap.ogg +0 -0
- package/dist/sound-library/mouse-click.ogg +0 -0
- package/dist/sound-library/mouse-release.ogg +0 -0
- package/dist/sound-library/open.ogg +0 -0
- package/dist/sound-library/orchestra-hit-2.ogg +0 -0
- package/dist/sound-library/orchestra-hit.ogg +0 -0
- package/dist/sound-library/page-turn-2.ogg +0 -0
- package/dist/sound-library/page-turn.ogg +0 -0
- package/dist/sound-library/pickaxe.ogg +0 -0
- package/dist/sound-library/piece-down-2.ogg +0 -0
- package/dist/sound-library/piece-down-3.ogg +0 -0
- package/dist/sound-library/piece-down.ogg +0 -0
- package/dist/sound-library/piece-take-2.ogg +0 -0
- package/dist/sound-library/piece-take.ogg +0 -0
- package/dist/sound-library/piece-tap-2.ogg +0 -0
- package/dist/sound-library/piece-tap.ogg +0 -0
- package/dist/sound-library/plank.ogg +0 -0
- package/dist/sound-library/plate.ogg +0 -0
- package/dist/sound-library/pluck.ogg +0 -0
- package/dist/sound-library/pot.ogg +0 -0
- package/dist/sound-library/power-up-2.ogg +0 -0
- package/dist/sound-library/power-up-3.ogg +0 -0
- package/dist/sound-library/power-up.ogg +0 -0
- package/dist/sound-library/punch.ogg +0 -0
- package/dist/sound-library/question.ogg +0 -0
- package/dist/sound-library/rise.ogg +0 -0
- package/dist/sound-library/scratch.ogg +0 -0
- package/dist/sound-library/scroll.ogg +0 -0
- package/dist/sound-library/select-2.ogg +0 -0
- package/dist/sound-library/select.ogg +0 -0
- package/dist/sound-library/shrink.ogg +0 -0
- package/dist/sound-library/shuffle.ogg +0 -0
- package/dist/sound-library/soft-thud-2.ogg +0 -0
- package/dist/sound-library/soft-thud.ogg +0 -0
- package/dist/sound-library/space-junk.ogg +0 -0
- package/dist/sound-library/step-2.ogg +0 -0
- package/dist/sound-library/step-on-carpet.ogg +0 -0
- package/dist/sound-library/step-on-grass.ogg +0 -0
- package/dist/sound-library/step-on-snow.ogg +0 -0
- package/dist/sound-library/step-on-stone.ogg +0 -0
- package/dist/sound-library/step-on-wood.ogg +0 -0
- package/dist/sound-library/step.ogg +0 -0
- package/dist/sound-library/switch-2.ogg +0 -0
- package/dist/sound-library/switch.ogg +0 -0
- package/dist/sound-library/tap-2.ogg +0 -0
- package/dist/sound-library/tap.ogg +0 -0
- package/dist/sound-library/three-tones.ogg +0 -0
- package/dist/sound-library/tick-2.ogg +0 -0
- package/dist/sound-library/tick.ogg +0 -0
- package/dist/sound-library/tin.ogg +0 -0
- package/dist/sound-library/toggle-2.ogg +0 -0
- package/dist/sound-library/toggle.ogg +0 -0
- package/dist/sound-library/two-tones.ogg +0 -0
- package/dist/sound-library/win-2.ogg +0 -0
- package/dist/sound-library/win-3.ogg +0 -0
- package/dist/sound-library/win-4.ogg +0 -0
- package/dist/sound-library/win.ogg +0 -0
- package/dist/sound-library/wood-thud.ogg +0 -0
- package/dist/sound-library/zap.ogg +0 -0
- package/dist/sounds/BuiltInSounds.d.ts +41 -0
- package/dist/sounds/index.d.ts +9 -0
- package/dist/sounds/sounds.types.d.ts +22 -0
- package/dist/ui-calendar.js +1 -1
- package/dist/ui-dial.editor-CjjdKi5L.js +5 -0
- package/dist/ui-dial.editor-CjjdKi5L.js.map +1 -0
- package/dist/ui-dial.js +467 -0
- package/dist/ui-dial.js.map +1 -0
- package/dist/ui-graph.js +22 -0
- package/dist/ui-graph.js.map +1 -1
- package/dist/{ui-input.editor-budoNoB0.js → ui-input.editor-D11iRgXR.js} +2 -2
- package/dist/ui-input.editor-D11iRgXR.js.map +1 -0
- package/dist/ui-input.js +84 -54
- package/dist/ui-input.js.map +1 -1
- package/dist/ui-json.js +8 -8
- package/dist/ui-json.js.map +1 -1
- package/dist/ui-modal.js +183 -97
- package/dist/ui-modal.js.map +1 -1
- package/dist/ui-page-layout.editor-IgDEveUY.js +5 -0
- package/dist/ui-page-layout.editor-IgDEveUY.js.map +1 -0
- package/dist/ui-page-layout.js +217 -72
- package/dist/ui-page-layout.js.map +1 -1
- package/dist/ui-popup.js +34 -34
- package/dist/ui-popup.js.map +1 -1
- package/dist/ui-property-editor.js +7 -4
- package/dist/ui-property-editor.js.map +1 -1
- package/dist/ui-root.js +71 -5
- package/dist/ui-root.js.map +1 -1
- package/dist/ui-search.js +1 -1
- package/dist/ui-section.js +97 -96
- package/dist/ui-section.js.map +1 -1
- package/dist/ui-site-links.editor-BME3sw5H.js +5 -0
- package/dist/ui-site-links.editor-BME3sw5H.js.map +1 -0
- package/dist/ui-site-links.js +150 -0
- package/dist/ui-site-links.js.map +1 -0
- package/dist/ui-site-nav-button.editor-ChY4xe1U.js +5 -0
- package/dist/ui-site-nav-button.editor-ChY4xe1U.js.map +1 -0
- package/dist/ui-site-nav-button.js +57 -18
- package/dist/ui-site-nav-button.js.map +1 -1
- package/dist/{ui-site-tabs.editor-DDvQfH6S.js → ui-site-tabs.editor-CdMIw4jw.js} +2 -2
- package/dist/ui-site-tabs.editor-CdMIw4jw.js.map +1 -0
- package/dist/ui-site-tabs.js +30 -14
- package/dist/ui-site-tabs.js.map +1 -1
- package/dist/ui-slider.js +75 -124
- package/dist/ui-slider.js.map +1 -1
- package/dist/ui-statistic.js +1 -0
- package/dist/ui-statistic.js.map +1 -1
- package/dist/ui-theme-editor.js +2 -2
- package/dist/{ui-theme-menu-BZYUMrHe.js → ui-theme-menu-BEBu6dyq.js} +3 -3
- package/dist/{ui-theme-menu-BZYUMrHe.js.map → ui-theme-menu-BEBu6dyq.js.map} +1 -1
- package/dist/ui-toc.js +159 -122
- package/dist/ui-toc.js.map +1 -1
- package/dist/ui-tree.js +142 -87
- package/dist/ui-tree.js.map +1 -1
- package/dist/ui-uploader.editor-DrE80KjL.js +5 -0
- package/dist/ui-uploader.editor-DrE80KjL.js.map +1 -0
- package/dist/ui-uploader.js +1442 -0
- package/dist/ui-uploader.js.map +1 -0
- package/dist/vocabulary/hooks.generated.d.ts +7 -0
- package/package.json +1 -1
- package/dist/UIInput-B3K0w4ow.js.map +0 -1
- package/dist/UIRuntime-DCv4sy30.js.map +0 -1
- package/dist/components.es-DilRG1VO.js.map +0 -1
- package/dist/ui-input.editor-budoNoB0.js.map +0 -1
- package/dist/ui-page-layout.editor-xtQW0FZk.js +0 -5
- package/dist/ui-page-layout.editor-xtQW0FZk.js.map +0 -1
- package/dist/ui-site-nav-button.editor-6J-zJLtZ.js +0 -5
- package/dist/ui-site-nav-button.editor-6J-zJLtZ.js.map +0 -1
- package/dist/ui-site-tabs.editor-DDvQfH6S.js.map +0 -1
|
@@ -9,9 +9,15 @@ import { pageLayoutVocabulary } from './UIPageLayout.en';
|
|
|
9
9
|
export declare class DOMPageLayoutElement extends E.DOMElement<UIPageLayout> {
|
|
10
10
|
/**
|
|
11
11
|
* Show or hide the drawer, as its button does: narrow, slide it over the page or away; wide, switch it between
|
|
12
|
-
* its icons only and all of it (`drawer`), and
|
|
12
|
+
* its icons only and all of it (`drawer`), or with `drawer-hides`, between hidden and all of it;
|
|
13
|
+
* and say so (`ui-toggle`).
|
|
13
14
|
*/
|
|
14
15
|
toggleDrawer(): void;
|
|
16
|
+
/**
|
|
17
|
+
* Show or hide side bar `side` (`"left"` or `"right"`), as its button does: wide, switch its attribute between
|
|
18
|
+
* `hidden` and none, and say so (`ui-toggle`); narrow, with a button for it, slide it over the page or away.
|
|
19
|
+
*/
|
|
20
|
+
toggleSidebar(side: Side): void;
|
|
15
21
|
}
|
|
16
22
|
/****************
|
|
17
23
|
* ### `<ui-page-layout>`
|
|
@@ -54,6 +60,15 @@ export declare class DOMPageLayoutElement extends E.DOMElement<UIPageLayout> {
|
|
|
54
60
|
* - Escape closes it; so does going to a page from it (`ui-navigating` from inside the drawer).
|
|
55
61
|
* - `toggleDrawer()` (the `<ui-site-nav-button>`'s click): narrow, slides the drawer in or out; wide, switches
|
|
56
62
|
* `drawer` and sends `ui-toggle`. Remembering the choice is the site's: the layout keeps nothing.
|
|
63
|
+
* - `drawer-hides`: wide, it switches the drawer between hidden (`drawer="hidden"`) and all of it, never to its
|
|
64
|
+
* icons (epic `mockup` T55: Spell UI's site, whose navigation has no icons).
|
|
65
|
+
* - The side bars close too (epic `mockup` T55): `right="hidden"` (or `left`) hides one, wide;
|
|
66
|
+
* `toggleSidebar("right")`, a `<ui-site-nav-button toggles="right">`'s click, switches it and sends `ui-toggle`.
|
|
67
|
+
* - Below 64em of its own box (`:state(sides-narrow)`), a side bar with such a button in the layout is hidden behind
|
|
68
|
+
* it, and shows over the page from its side while open (`:state(right-open)`); one with no button stays in the
|
|
69
|
+
* row, as before.
|
|
70
|
+
* - `floating`: the drawer and the side bars float, rounded cards with a soft shadow and room round them, over the
|
|
71
|
+
* page's own ground (Spell UI's docs site's look); the page's side is no box of its own then.
|
|
57
72
|
* - It finds its navigations and buttons by their English tags (`ui-site-nav`, `ui-site-nav-button`).
|
|
58
73
|
****************/
|
|
59
74
|
export declare class UIPageLayout extends E.UIComponent<typeof pageLayoutVocabulary> {
|
|
@@ -70,12 +85,34 @@ export declare class UIPageLayout extends E.UIComponent<typeof pageLayoutVocabul
|
|
|
70
85
|
readonly name: "drawer";
|
|
71
86
|
readonly group: "appearance";
|
|
72
87
|
readonly kind: "valueOnly";
|
|
73
|
-
readonly values: readonly ["compact"];
|
|
88
|
+
readonly values: readonly ["compact", "hidden"];
|
|
89
|
+
readonly description: string;
|
|
90
|
+
}, {
|
|
91
|
+
readonly name: "drawer-hides";
|
|
92
|
+
readonly group: "behaviour";
|
|
93
|
+
readonly kind: "keyOnly";
|
|
94
|
+
readonly description: string;
|
|
95
|
+
}, {
|
|
96
|
+
readonly name: "left";
|
|
97
|
+
readonly group: "appearance";
|
|
98
|
+
readonly kind: "valueOnly";
|
|
99
|
+
readonly values: readonly ["hidden"];
|
|
100
|
+
readonly description: string;
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "right";
|
|
103
|
+
readonly group: "appearance";
|
|
104
|
+
readonly kind: "valueOnly";
|
|
105
|
+
readonly values: readonly ["hidden"];
|
|
106
|
+
readonly description: string;
|
|
107
|
+
}, {
|
|
108
|
+
readonly name: "floating";
|
|
109
|
+
readonly group: "appearance";
|
|
110
|
+
readonly kind: "keyOnly";
|
|
74
111
|
readonly description: string;
|
|
75
112
|
}];
|
|
76
113
|
readonly events: readonly [{
|
|
77
114
|
readonly name: "ui-toggle";
|
|
78
|
-
readonly detail:
|
|
115
|
+
readonly detail: string;
|
|
79
116
|
readonly description: string;
|
|
80
117
|
}];
|
|
81
118
|
readonly slots: readonly [{
|
|
@@ -140,6 +177,33 @@ export declare class UIPageLayout extends E.UIComponent<typeof pageLayoutVocabul
|
|
|
140
177
|
}, {
|
|
141
178
|
readonly name: "narrow";
|
|
142
179
|
readonly description: "Below 40em of its own box: one column, the drawer slid out of the way.";
|
|
180
|
+
}, {
|
|
181
|
+
readonly name: "sides-narrow";
|
|
182
|
+
readonly description: "Below 64em of its own box: a side bar with its button hides behind it, and shows over the page while open.";
|
|
183
|
+
}, {
|
|
184
|
+
readonly name: "drawer-hidden";
|
|
185
|
+
readonly description: "`drawer=\"hidden\"`: no drawer, on a wide page.";
|
|
186
|
+
}, {
|
|
187
|
+
readonly name: "floating";
|
|
188
|
+
readonly description: "`floating`: the drawer and the side bars are cards floating over the page.";
|
|
189
|
+
}, {
|
|
190
|
+
readonly name: "left-hidden";
|
|
191
|
+
readonly description: "`left=\"hidden\"`: no left side bar, on a wide page.";
|
|
192
|
+
}, {
|
|
193
|
+
readonly name: "right-hidden";
|
|
194
|
+
readonly description: "`right=\"hidden\"`: no right side bar, on a wide page.";
|
|
195
|
+
}, {
|
|
196
|
+
readonly name: "left-closable";
|
|
197
|
+
readonly description: "A `<ui-site-nav-button toggles=\"left\">` is in it: narrow, the left side bar hides behind it.";
|
|
198
|
+
}, {
|
|
199
|
+
readonly name: "right-closable";
|
|
200
|
+
readonly description: "A `<ui-site-nav-button toggles=\"right\">` is in it: narrow, the right side bar hides behind it.";
|
|
201
|
+
}, {
|
|
202
|
+
readonly name: "left-open";
|
|
203
|
+
readonly description: "The left side bar is slid over a narrow page, from its button.";
|
|
204
|
+
}, {
|
|
205
|
+
readonly name: "right-open";
|
|
206
|
+
readonly description: "The right side bar is slid over a narrow page, from its button.";
|
|
143
207
|
}];
|
|
144
208
|
readonly texts: readonly [{
|
|
145
209
|
readonly key: "menu";
|
|
@@ -158,6 +222,8 @@ export declare class UIPageLayout extends E.UIComponent<typeof pageLayoutVocabul
|
|
|
158
222
|
readonly slots: E.SlotContent;
|
|
159
223
|
/** Has region `name` content? An empty one isn't drawn. */
|
|
160
224
|
has(name: Region): boolean;
|
|
225
|
+
/** `floating`: the drawer and the side bars are cards floating over the page's ground. */
|
|
226
|
+
get isFloating(): boolean;
|
|
161
227
|
/** `drawer="compact"`: the drawer shows only its icons. */
|
|
162
228
|
get isCompact(): boolean;
|
|
163
229
|
/**
|
|
@@ -171,7 +237,17 @@ export declare class UIPageLayout extends E.UIComponent<typeof pageLayoutVocabul
|
|
|
171
237
|
* so the sheet stays the one truth.
|
|
172
238
|
*/
|
|
173
239
|
accessor isNarrow: boolean;
|
|
174
|
-
/**
|
|
240
|
+
/**
|
|
241
|
+
* Below 64em of its own box: a side bar with its button hides behind it, and shows over the page while open.
|
|
242
|
+
* - Read from its style, as `isNarrow` is.
|
|
243
|
+
*/
|
|
244
|
+
accessor isSidesNarrow: boolean;
|
|
245
|
+
/** `drawer="hidden"`: wide, no drawer at all; its button shows it again. */
|
|
246
|
+
get isDrawerHidden(): boolean;
|
|
247
|
+
/**
|
|
248
|
+
* Does the drawer show all of it: wide and neither compact nor hidden, or open over the page?
|
|
249
|
+
* A drawer button's `aria-expanded`.
|
|
250
|
+
*/
|
|
175
251
|
get isDrawerShown(): boolean;
|
|
176
252
|
/**
|
|
177
253
|
* The `<ui-site-nav>`s in the drawer: slotted into it, or inside what is.
|
|
@@ -209,15 +285,59 @@ export declare class UIPageLayout extends E.UIComponent<typeof pageLayoutVocabul
|
|
|
209
285
|
private iconsWidth;
|
|
210
286
|
/** Switch `drawer` to `newState`, and say so (`ui-toggle`). */
|
|
211
287
|
private switchDrawer;
|
|
212
|
-
/**
|
|
288
|
+
/**
|
|
289
|
+
* Wide, hide the whole drawer (`drawer="hidden"`), or show all of it again, and say so (`ui-toggle`):
|
|
290
|
+
* `drawer-hides`, or a drawer hidden already.
|
|
291
|
+
* - The column narrows to nothing and widens back (`UIPageLayout.css`); nothing in it switches to its icons.
|
|
292
|
+
*/
|
|
293
|
+
private hideOrShowDrawer;
|
|
294
|
+
/** Escape closes the drawer or a side bar open over the page. */
|
|
213
295
|
protected onKeyDown(event: KeyboardEvent): void;
|
|
214
|
-
/** Going to a page from the drawer closes it. */
|
|
296
|
+
/** Going to a page from the drawer, or from a side bar open over the page, closes it. */
|
|
215
297
|
protected onNavigating(event: Event): void;
|
|
216
298
|
/**
|
|
217
299
|
* Close the drawer open over the page, if it is.
|
|
218
300
|
* - Compact and wide, its box shrinks back into the column with all of it still in it, clipped (`whileDrawerMoves()`).
|
|
219
301
|
*/
|
|
220
302
|
private close;
|
|
303
|
+
/** `right="hidden"`: wide, the right side bar isn't shown; its button shows it again. */
|
|
304
|
+
get isRightHidden(): boolean;
|
|
305
|
+
/** `left="hidden"`: wide, the left side bar isn't shown; its button shows it again. */
|
|
306
|
+
get isLeftHidden(): boolean;
|
|
307
|
+
/** The right side bar slid over a narrow page, from its button. */
|
|
308
|
+
accessor isRightOpen: boolean;
|
|
309
|
+
/** The left side bar slid over a narrow page, from its button. */
|
|
310
|
+
accessor isLeftOpen: boolean;
|
|
311
|
+
/**
|
|
312
|
+
* The side bars a `<ui-site-nav-button toggles="...">` in its light DOM shows and hides:
|
|
313
|
+
* narrow, those hide behind their button; the rest stay in the row.
|
|
314
|
+
*/
|
|
315
|
+
get sidesWithButtons(): readonly Side[];
|
|
316
|
+
/** Narrow, the right side bar hides behind its button: `:state(right-closable)`. */
|
|
317
|
+
get isRightClosable(): boolean;
|
|
318
|
+
/** Narrow, the left side bar hides behind its button: `:state(left-closable)`. */
|
|
319
|
+
get isLeftClosable(): boolean;
|
|
320
|
+
/** Is side bar `side` hidden (`hidden`) on a wide page? */
|
|
321
|
+
isSideHidden(side: Side): boolean;
|
|
322
|
+
/** Is side bar `side` slid over a narrow page? */
|
|
323
|
+
isSideOpen(side: Side): boolean;
|
|
324
|
+
/**
|
|
325
|
+
* Is side bar `side` shown: narrow, behind its button, while it's open; else unless it's hidden.
|
|
326
|
+
* Its button's `aria-expanded`.
|
|
327
|
+
*/
|
|
328
|
+
isSideShown(side: Side): boolean;
|
|
329
|
+
/**
|
|
330
|
+
* Show or hide side bar `side`, as its button does: narrow, behind its button, slide it over the page or away;
|
|
331
|
+
* else switch its attribute between `hidden` and none, and say so (`ui-toggle`, `newState` `hidden` or `shown`).
|
|
332
|
+
* Script API, on the DOM element too.
|
|
333
|
+
*/
|
|
334
|
+
toggleSidebar(side: Side): void;
|
|
335
|
+
/** Close the side bars slid over a narrow page, if any are. */
|
|
336
|
+
private closeSidebars;
|
|
337
|
+
/** A link followed from a side bar slid over a narrow page (its table of contents) closes it. */
|
|
338
|
+
protected onClickInSide(event: MouseEvent): void;
|
|
339
|
+
/** The side bar holding `target`, slotted into it: `undefined` for none. */
|
|
340
|
+
private sideHolding;
|
|
221
341
|
/**
|
|
222
342
|
* The drawer is moving between its icons and all of it: its column narrowing or widening, or its open box growing
|
|
223
343
|
* or shrinking back.
|
|
@@ -282,10 +402,18 @@ export declare class UIPageLayout extends E.UIComponent<typeof pageLayoutVocabul
|
|
|
282
402
|
private menuDrawn;
|
|
283
403
|
/** Read the menu's height again: none while it isn't on the page. */
|
|
284
404
|
private measureMenu;
|
|
285
|
-
/**
|
|
286
|
-
|
|
405
|
+
/**
|
|
406
|
+
* Is it narrow: below 40em of its own box (`flag`, `--_page-layout-narrow`), or below 64em, for its side bars
|
|
407
|
+
* (`--_page-layout-sides-narrow`)? Its style says (`UIPageLayout.css`'s container queries set them on its grid):
|
|
408
|
+
* so a layout with no drawer, only side bars, knows too.
|
|
409
|
+
*/
|
|
410
|
+
private isNarrowByStyle;
|
|
411
|
+
/** Its grid's box, while drawn. */
|
|
412
|
+
private layoutBox;
|
|
287
413
|
/** Narrow, it closes as it widens: wide, the open drawer would sit over the page. */
|
|
288
414
|
protected onNarrowChanged(): void;
|
|
415
|
+
/** A side bar open over the page closes as the layout widens, or narrows. */
|
|
416
|
+
protected onSidesNarrowChanged(): void;
|
|
289
417
|
/**
|
|
290
418
|
* Does it draw its own menu button: a drawer, and no `<ui-site-nav-button>` anywhere in its light DOM?
|
|
291
419
|
* - Shown only at a narrow width (`UIPageLayout.css`).
|
|
@@ -308,4 +436,9 @@ export interface UIPageLayout extends E.AttributeValues<typeof pageLayoutVocabul
|
|
|
308
436
|
}
|
|
309
437
|
/** A named region, each its slot's name. */
|
|
310
438
|
type Region = "menu" | "page-menu" | "drawer" | "left" | "right" | "footer";
|
|
439
|
+
/** A side bar, by its region's name. */
|
|
440
|
+
export type Side = typeof LEFT | typeof RIGHT;
|
|
441
|
+
/** The side bars' regions, and `ui-toggle`'s `region` for them. */
|
|
442
|
+
declare const LEFT = "left";
|
|
443
|
+
declare const RIGHT = "right";
|
|
311
444
|
export {};
|
|
@@ -20,12 +20,34 @@ export declare const pageLayoutVocabulary: {
|
|
|
20
20
|
readonly name: "drawer";
|
|
21
21
|
readonly group: "appearance";
|
|
22
22
|
readonly kind: "valueOnly";
|
|
23
|
-
readonly values: readonly ["compact"];
|
|
23
|
+
readonly values: readonly ["compact", "hidden"];
|
|
24
|
+
readonly description: string;
|
|
25
|
+
}, {
|
|
26
|
+
readonly name: "drawer-hides";
|
|
27
|
+
readonly group: "behaviour";
|
|
28
|
+
readonly kind: "keyOnly";
|
|
29
|
+
readonly description: string;
|
|
30
|
+
}, {
|
|
31
|
+
readonly name: "left";
|
|
32
|
+
readonly group: "appearance";
|
|
33
|
+
readonly kind: "valueOnly";
|
|
34
|
+
readonly values: readonly ["hidden"];
|
|
35
|
+
readonly description: string;
|
|
36
|
+
}, {
|
|
37
|
+
readonly name: "right";
|
|
38
|
+
readonly group: "appearance";
|
|
39
|
+
readonly kind: "valueOnly";
|
|
40
|
+
readonly values: readonly ["hidden"];
|
|
41
|
+
readonly description: string;
|
|
42
|
+
}, {
|
|
43
|
+
readonly name: "floating";
|
|
44
|
+
readonly group: "appearance";
|
|
45
|
+
readonly kind: "keyOnly";
|
|
24
46
|
readonly description: string;
|
|
25
47
|
}];
|
|
26
48
|
readonly events: readonly [{
|
|
27
49
|
readonly name: "ui-toggle";
|
|
28
|
-
readonly detail:
|
|
50
|
+
readonly detail: string;
|
|
29
51
|
readonly description: string;
|
|
30
52
|
}];
|
|
31
53
|
readonly slots: readonly [{
|
|
@@ -90,6 +112,33 @@ export declare const pageLayoutVocabulary: {
|
|
|
90
112
|
}, {
|
|
91
113
|
readonly name: "narrow";
|
|
92
114
|
readonly description: "Below 40em of its own box: one column, the drawer slid out of the way.";
|
|
115
|
+
}, {
|
|
116
|
+
readonly name: "sides-narrow";
|
|
117
|
+
readonly description: "Below 64em of its own box: a side bar with its button hides behind it, and shows over the page while open.";
|
|
118
|
+
}, {
|
|
119
|
+
readonly name: "drawer-hidden";
|
|
120
|
+
readonly description: "`drawer=\"hidden\"`: no drawer, on a wide page.";
|
|
121
|
+
}, {
|
|
122
|
+
readonly name: "floating";
|
|
123
|
+
readonly description: "`floating`: the drawer and the side bars are cards floating over the page.";
|
|
124
|
+
}, {
|
|
125
|
+
readonly name: "left-hidden";
|
|
126
|
+
readonly description: "`left=\"hidden\"`: no left side bar, on a wide page.";
|
|
127
|
+
}, {
|
|
128
|
+
readonly name: "right-hidden";
|
|
129
|
+
readonly description: "`right=\"hidden\"`: no right side bar, on a wide page.";
|
|
130
|
+
}, {
|
|
131
|
+
readonly name: "left-closable";
|
|
132
|
+
readonly description: "A `<ui-site-nav-button toggles=\"left\">` is in it: narrow, the left side bar hides behind it.";
|
|
133
|
+
}, {
|
|
134
|
+
readonly name: "right-closable";
|
|
135
|
+
readonly description: "A `<ui-site-nav-button toggles=\"right\">` is in it: narrow, the right side bar hides behind it.";
|
|
136
|
+
}, {
|
|
137
|
+
readonly name: "left-open";
|
|
138
|
+
readonly description: "The left side bar is slid over a narrow page, from its button.";
|
|
139
|
+
}, {
|
|
140
|
+
readonly name: "right-open";
|
|
141
|
+
readonly description: "The right side bar is slid over a narrow page, from its button.";
|
|
93
142
|
}];
|
|
94
143
|
readonly texts: readonly [{
|
|
95
144
|
readonly key: "menu";
|
|
@@ -11,6 +11,9 @@ export declare const pageLayoutEs: {
|
|
|
11
11
|
readonly aka: readonly ["diseño de aplicación", "marco de página", "estructura del sitio", "cajón de navegación"];
|
|
12
12
|
readonly attributes: {
|
|
13
13
|
readonly drawer: "cajon";
|
|
14
|
+
readonly "drawer-hides": "cajon-se-oculta";
|
|
15
|
+
readonly left: "izquierda";
|
|
16
|
+
readonly right: "derecha";
|
|
14
17
|
};
|
|
15
18
|
readonly slots: {
|
|
16
19
|
readonly menu: "menu";
|
|
@@ -44,8 +44,8 @@ export declare class DOMPropertyElement extends DOMFieldElement {
|
|
|
44
44
|
* - `:state(changed)`: its edit is held, not saved yet (the editor says, `markChanged()`).
|
|
45
45
|
* - Its look in its editor (epic `debut` P31):
|
|
46
46
|
* - `:state(half)`: half a row on the editor's grid, by its control's kind (a number, a select) or its `width`
|
|
47
|
-
* - in a `compact` editor (`:state(compact)`):
|
|
48
|
-
* label row's end
|
|
47
|
+
* - in a `compact` editor (`:state(compact)`):
|
|
48
|
+
* a yes or no on one line, the box then its label; its hint at the label row's end
|
|
49
49
|
* - `:state(set)`: its value isn't its default (`default`, else the schema's); bold under `show-defaults`
|
|
50
50
|
* - where its value comes from, when its editor says (`PropertyOrigin`): `:state(here)`, nothing drawn;
|
|
51
51
|
* `:state(inherited)`, a quieter label; `worked out`, read only; its label's tooltip says where, and a small
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { JSX } from '@solidjs/web';
|
|
2
|
+
import { E } from 'spell/ui/core';
|
|
3
|
+
import { FollowedSiteNav, SitePage } from 'spell/ui/components/ui-site-nav/SitePages';
|
|
4
|
+
import { siteLinksVocabulary } from './UISiteLinks.en';
|
|
5
|
+
/****************
|
|
6
|
+
* ### `<ui-site-links>`
|
|
7
|
+
* The component behind `<ui-site-links>`: the page shown's own links, for an app menu's end (epic `mockup` T55).
|
|
8
|
+
* It takes the same `pages` and `current` as `<ui-site-nav>`, and draws a row of small icon buttons:
|
|
9
|
+
*
|
|
10
|
+
* <div class="links" part="links">
|
|
11
|
+
* <ui-button part="original" icon="up right from square" link="https://fomantic-ui.com/..." target="_blank">
|
|
12
|
+
* <ui-button part="report" icon="bug" link="https://github.com/.../issues/new?title=Button" target="_blank">
|
|
13
|
+
* </div>
|
|
14
|
+
*
|
|
15
|
+
* - The original: the real page the page shown stands for, its `live` link, else the nearest page above it with one
|
|
16
|
+
* (Owen, 2026-11-17: Spell UI's pages link Fomantic's, as its docs site's do).
|
|
17
|
+
* - The report: `report`, with `{title}` standing for the title of the page at the top of the family shown
|
|
18
|
+
* (`Button` on Button's API page), as a link's text: none without `report`.
|
|
19
|
+
* - Both open in a new tab. Nothing to show: nothing draws, `:state(empty)`.
|
|
20
|
+
* - Plain data in, no fetching: `pages` and `current`, set on it by hand.
|
|
21
|
+
* - Without `pages`, it follows the site navigation it's inside, as `<ui-site-breadcrumbs>` does
|
|
22
|
+
* (`SitePages.followNavAround()`): a Spell site's layout writes a bare `<site-links report="..."/>`.
|
|
23
|
+
****************/
|
|
24
|
+
export declare class UISiteLinks extends E.UIComponent<typeof siteLinksVocabulary> {
|
|
25
|
+
static vocabulary: {
|
|
26
|
+
readonly tag: "ui-site-links";
|
|
27
|
+
readonly icon: "up right from square";
|
|
28
|
+
readonly topics: readonly ["navigation", "menus"];
|
|
29
|
+
readonly aka: readonly ["page links", "page actions", "report a bug", "original page", "edit this page", "external links"];
|
|
30
|
+
readonly noun: "site links";
|
|
31
|
+
readonly partOfSpeech: "structure";
|
|
32
|
+
readonly description: string;
|
|
33
|
+
readonly attributes: readonly [{
|
|
34
|
+
readonly name: "pages";
|
|
35
|
+
readonly group: "content";
|
|
36
|
+
readonly kind: "json";
|
|
37
|
+
readonly reflect: false;
|
|
38
|
+
readonly description: string;
|
|
39
|
+
}, {
|
|
40
|
+
readonly name: "current";
|
|
41
|
+
readonly group: "content";
|
|
42
|
+
readonly kind: "string";
|
|
43
|
+
readonly description: "Which page is shown: its `href` or its `id`. None: the page whose `href` is the browser's address.";
|
|
44
|
+
}, {
|
|
45
|
+
readonly name: "report";
|
|
46
|
+
readonly group: "link";
|
|
47
|
+
readonly kind: "string";
|
|
48
|
+
readonly description: string;
|
|
49
|
+
}];
|
|
50
|
+
readonly events: readonly [];
|
|
51
|
+
readonly slots: readonly [];
|
|
52
|
+
readonly parts: readonly [{
|
|
53
|
+
readonly name: "links";
|
|
54
|
+
readonly description: "The row of links.";
|
|
55
|
+
}, {
|
|
56
|
+
readonly name: "original";
|
|
57
|
+
readonly description: "The link to the real page the page shown stands for (its `live`).";
|
|
58
|
+
}, {
|
|
59
|
+
readonly name: "report";
|
|
60
|
+
readonly description: "The link to report a problem with the page shown.";
|
|
61
|
+
}];
|
|
62
|
+
readonly states: readonly [{
|
|
63
|
+
readonly name: "empty";
|
|
64
|
+
readonly description: "No link to draw for the page shown: it takes no room.";
|
|
65
|
+
}];
|
|
66
|
+
readonly texts: readonly [{
|
|
67
|
+
readonly key: "original";
|
|
68
|
+
readonly text: "The original page";
|
|
69
|
+
readonly description: "The original's name, its tooltip and its name for a screen reader.";
|
|
70
|
+
}, {
|
|
71
|
+
readonly key: "report";
|
|
72
|
+
readonly text: "Report a bug";
|
|
73
|
+
readonly description: "The report link's name, its tooltip and its name for a screen reader.";
|
|
74
|
+
}];
|
|
75
|
+
};
|
|
76
|
+
static elementSetup: {
|
|
77
|
+
styleSheets: {
|
|
78
|
+
"site-links": string;
|
|
79
|
+
};
|
|
80
|
+
delegatesFocus: false;
|
|
81
|
+
};
|
|
82
|
+
/** `pages`, else the site navigation's, the well-formed ones: each with a `title`, its pages checked the same way. */
|
|
83
|
+
get sitePages(): readonly SiteLinksPage[];
|
|
84
|
+
/** Which page is shown: `current`, else the site navigation's while following it, else the browser's address. */
|
|
85
|
+
get currentKey(): string;
|
|
86
|
+
/** The site navigation's `pages` and `current`, while it's inside one; `undefined` outside any. */
|
|
87
|
+
accessor followed: FollowedSiteNav | undefined;
|
|
88
|
+
/** It has no `pages` of its own, so it shows the site navigation's. */
|
|
89
|
+
get isFollowing(): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* While connected: follow the site navigation around it (`SitePages.followNavAround()`).
|
|
92
|
+
* - Nothing around it: nothing to follow, and it draws only what it's given.
|
|
93
|
+
*/
|
|
94
|
+
protected followSiteNav(): () => void;
|
|
95
|
+
/** The pages from the top down to the page shown, it last; empty when it isn't among them. */
|
|
96
|
+
get pathToShown(): readonly SiteLinksPage[];
|
|
97
|
+
/** The real page the page shown stands for: its own `live`, else the nearest page's above it. */
|
|
98
|
+
get originalLink(): string | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Where to report a problem with the page shown: `report`, its `{title}` the family's top page's title;
|
|
101
|
+
* none without `report`, or with no page shown.
|
|
102
|
+
* - The family's top: the first page in the path that's a page, not a group's name.
|
|
103
|
+
*/
|
|
104
|
+
get reportLink(): string | undefined;
|
|
105
|
+
/** No link to draw: `:state(empty)`, which takes no room. */
|
|
106
|
+
get isEmpty(): boolean;
|
|
107
|
+
render(): JSX.Element;
|
|
108
|
+
/** One link: a small tertiary icon button opening `link` in a new tab, named by its words. */
|
|
109
|
+
private button;
|
|
110
|
+
}
|
|
111
|
+
/** The vocabulary getters, typed (`UIComponent`'s doc). */
|
|
112
|
+
export interface UISiteLinks extends E.AttributeValues<typeof siteLinksVocabulary> {
|
|
113
|
+
}
|
|
114
|
+
/** One page of a site, as `<ui-site-links pages>` takes it: the same list `<ui-site-nav>` takes. */
|
|
115
|
+
export type SiteLinksPage = Omit<SitePage, "pages"> & {
|
|
116
|
+
/** the real page it stands for: `https://fomantic-ui.com/elements/button.html` */
|
|
117
|
+
live?: string;
|
|
118
|
+
/** `group`: a group's name over its pages */
|
|
119
|
+
band?: string;
|
|
120
|
+
/** the `id` of the page this is a second copy of (a favourite): never the way down */
|
|
121
|
+
copyOf?: string;
|
|
122
|
+
/** the pages under it */
|
|
123
|
+
pages?: readonly SiteLinksPage[];
|
|
124
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The English vocabulary of `<ui-site-links>`: every name the tag uses.
|
|
3
|
+
* The shape is `E.ComponentVocabulary` (`spell/ui/vocabulary`).
|
|
4
|
+
*/
|
|
5
|
+
/****************
|
|
6
|
+
* ### `siteLinksVocabulary`
|
|
7
|
+
* The names of `<ui-site-links>`: the page shown's own links, for an app menu's end, drawn from the side
|
|
8
|
+
* navigation's own pages.
|
|
9
|
+
****************/
|
|
10
|
+
export declare const siteLinksVocabulary: {
|
|
11
|
+
readonly tag: "ui-site-links";
|
|
12
|
+
readonly icon: "up right from square";
|
|
13
|
+
readonly topics: readonly ["navigation", "menus"];
|
|
14
|
+
readonly aka: readonly ["page links", "page actions", "report a bug", "original page", "edit this page", "external links"];
|
|
15
|
+
readonly noun: "site links";
|
|
16
|
+
readonly partOfSpeech: "structure";
|
|
17
|
+
readonly description: string;
|
|
18
|
+
readonly attributes: readonly [{
|
|
19
|
+
readonly name: "pages";
|
|
20
|
+
readonly group: "content";
|
|
21
|
+
readonly kind: "json";
|
|
22
|
+
readonly reflect: false;
|
|
23
|
+
readonly description: string;
|
|
24
|
+
}, {
|
|
25
|
+
readonly name: "current";
|
|
26
|
+
readonly group: "content";
|
|
27
|
+
readonly kind: "string";
|
|
28
|
+
readonly description: "Which page is shown: its `href` or its `id`. None: the page whose `href` is the browser's address.";
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "report";
|
|
31
|
+
readonly group: "link";
|
|
32
|
+
readonly kind: "string";
|
|
33
|
+
readonly description: string;
|
|
34
|
+
}];
|
|
35
|
+
readonly events: readonly [];
|
|
36
|
+
readonly slots: readonly [];
|
|
37
|
+
readonly parts: readonly [{
|
|
38
|
+
readonly name: "links";
|
|
39
|
+
readonly description: "The row of links.";
|
|
40
|
+
}, {
|
|
41
|
+
readonly name: "original";
|
|
42
|
+
readonly description: "The link to the real page the page shown stands for (its `live`).";
|
|
43
|
+
}, {
|
|
44
|
+
readonly name: "report";
|
|
45
|
+
readonly description: "The link to report a problem with the page shown.";
|
|
46
|
+
}];
|
|
47
|
+
readonly states: readonly [{
|
|
48
|
+
readonly name: "empty";
|
|
49
|
+
readonly description: "No link to draw for the page shown: it takes no room.";
|
|
50
|
+
}];
|
|
51
|
+
readonly texts: readonly [{
|
|
52
|
+
readonly key: "original";
|
|
53
|
+
readonly text: "The original page";
|
|
54
|
+
readonly description: "The original's name, its tooltip and its name for a screen reader.";
|
|
55
|
+
}, {
|
|
56
|
+
readonly key: "report";
|
|
57
|
+
readonly text: "Report a bug";
|
|
58
|
+
readonly description: "The report link's name, its tooltip and its name for a screen reader.";
|
|
59
|
+
}];
|
|
60
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `<ui-site-links>` in Spanish: `<es-enlaces-del-sitio>`, with the names and texts only it uses.
|
|
3
|
+
* - The names it shares with other tags (`pages`, `current` ...) are translated once, for every tag,
|
|
4
|
+
* in `components.es.ts`.
|
|
5
|
+
* - Names stay ASCII (no accents): tags and attributes are typed, and a tag can't hold every letter.
|
|
6
|
+
*/
|
|
7
|
+
export declare const siteLinksEs: {
|
|
8
|
+
readonly lang: "es";
|
|
9
|
+
readonly tag: "ui-site-links";
|
|
10
|
+
readonly name: "enlaces-del-sitio";
|
|
11
|
+
readonly aka: readonly ["enlaces de la página", "informar de un error", "página original", "enlaces externos"];
|
|
12
|
+
readonly attributes: {
|
|
13
|
+
readonly pages: "paginas";
|
|
14
|
+
readonly current: "actual";
|
|
15
|
+
readonly report: "informe";
|
|
16
|
+
};
|
|
17
|
+
readonly parts: {
|
|
18
|
+
readonly links: "enlaces";
|
|
19
|
+
readonly original: "original";
|
|
20
|
+
readonly report: "informe";
|
|
21
|
+
};
|
|
22
|
+
readonly texts: {
|
|
23
|
+
readonly original: "La página original";
|
|
24
|
+
readonly report: "Informar de un error";
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UISiteLinks, type SiteLinksPage } from './UISiteLinks';
|
|
@@ -17,8 +17,10 @@ import { DOMPageLayoutElement } from 'spell/ui/components/ui-page-layout/UIPageL
|
|
|
17
17
|
* - Outside a menu, where an item draws nothing of its own, it's a small basic `<ui-button>` with the same icon.
|
|
18
18
|
* - A click: the nearest `<ui-page-layout>` around it, across shadow roots, `toggleDrawer()`s.
|
|
19
19
|
* - So narrow, the drawer slides in and out; wide, it shows only its icons, or all of it again.
|
|
20
|
-
* - `
|
|
21
|
-
*
|
|
20
|
+
* - `toggles="right"` (or `left`): a click `toggleSidebar()`s that side bar instead (epic `mockup` T55),
|
|
21
|
+
* and its words say so (`rightLabel`); narrow, the layout hides that side bar behind it.
|
|
22
|
+
* - `aria-expanded` says whether the layout's drawer (or its side bar) is shown.
|
|
23
|
+
* - With one for the drawer inside it, the layout draws no menu button of its own.
|
|
22
24
|
* - It finds its layout by its English tag (`ui-page-layout`).
|
|
23
25
|
****************/
|
|
24
26
|
export declare class UISiteNavButton extends UIItem {
|
|
@@ -37,7 +39,9 @@ export declare class UISiteNavButton extends UIItem {
|
|
|
37
39
|
protected findLayout(): () => undefined;
|
|
38
40
|
/** The layout's component, once its family has loaded and it has drawn. */
|
|
39
41
|
private get layoutComponent();
|
|
40
|
-
/**
|
|
42
|
+
/** The side bar it shows and hides (`toggles`), or `undefined` for the drawer. */
|
|
43
|
+
private get side();
|
|
44
|
+
/** SIDE EFFECT: a click shows or hides the layout's drawer, or its side bar (`toggles`). */
|
|
41
45
|
protected onClick(): void;
|
|
42
46
|
/**
|
|
43
47
|
* Its icon: its own `icon` attribute, else `columns` beside a drawer it shows, `bars` while the drawer is hidden at a
|
|
@@ -46,7 +50,10 @@ export declare class UISiteNavButton extends UIItem {
|
|
|
46
50
|
get icon(): string | undefined;
|
|
47
51
|
/** Is the layout narrow, its drawer slid out of sight until this button slides it in? */
|
|
48
52
|
private get isForHiddenDrawer();
|
|
49
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* Its words: for its side bar (`toggles`); for the menu while the drawer is hidden at a narrow width;
|
|
55
|
+
* else for the drawer, the side bar a site calls it.
|
|
56
|
+
*/
|
|
50
57
|
private get words();
|
|
51
58
|
/** Always a button: something to press, in any owner. */
|
|
52
59
|
get rootTag(): "a" | "button" | "div";
|
|
@@ -54,7 +61,7 @@ export declare class UISiteNavButton extends UIItem {
|
|
|
54
61
|
protected get boxLabel(): string | undefined;
|
|
55
62
|
/** Its tooltip: the page's `title`, else its words. */
|
|
56
63
|
protected get boxTooltip(): string | undefined;
|
|
57
|
-
/** Does the layout's drawer show all of it: its `aria-expanded`. */
|
|
64
|
+
/** Does the layout's drawer show all of it, or is its side bar shown (`toggles`): its `aria-expanded`. */
|
|
58
65
|
protected get boxExpanded(): "true" | "false" | undefined;
|
|
59
66
|
/** In a menu, its item box; anywhere else, a small basic button. */
|
|
60
67
|
render(): JSX.Element;
|
|
@@ -17,18 +17,6 @@ export declare const siteNavButtonVocabulary: {
|
|
|
17
17
|
readonly aka: readonly ["side bar button", "drawer button", "hamburger", "menu button", "navigation toggle", "sidebar toggle"];
|
|
18
18
|
readonly skeleton: "inline 2.5 x 2.5";
|
|
19
19
|
readonly description: string;
|
|
20
|
-
readonly texts: readonly [{
|
|
21
|
-
readonly key: "label";
|
|
22
|
-
readonly text: "Show or hide the side bar";
|
|
23
|
-
readonly description: "What it's called, its tooltip and its name for a screen reader, without `aria-label`.";
|
|
24
|
-
}, {
|
|
25
|
-
readonly key: "menuLabel";
|
|
26
|
-
readonly text: "Show or hide the menu";
|
|
27
|
-
readonly description: "What it's called at a narrow width, where the drawer is hidden until it slides in: its icon the menu's (`bars`).";
|
|
28
|
-
}];
|
|
29
|
-
readonly noun: "item";
|
|
30
|
-
readonly partOfSpeech: "action";
|
|
31
|
-
readonly ui: false;
|
|
32
20
|
readonly attributes: readonly [{
|
|
33
21
|
readonly name: "color";
|
|
34
22
|
readonly group: "appearance";
|
|
@@ -131,7 +119,39 @@ export declare const siteNavButtonVocabulary: {
|
|
|
131
119
|
readonly default: "item";
|
|
132
120
|
readonly replaces: readonly ["type"];
|
|
133
121
|
readonly description: string;
|
|
122
|
+
}, {
|
|
123
|
+
readonly name: "toggles";
|
|
124
|
+
readonly group: "behaviour";
|
|
125
|
+
readonly kind: "valueOnly";
|
|
126
|
+
readonly values: readonly ["drawer", "left", "right"];
|
|
127
|
+
readonly default: "drawer";
|
|
128
|
+
readonly classes: {
|
|
129
|
+
readonly drawer: "";
|
|
130
|
+
readonly left: "";
|
|
131
|
+
readonly right: "";
|
|
132
|
+
};
|
|
133
|
+
readonly description: string;
|
|
134
134
|
}];
|
|
135
|
+
readonly texts: readonly [{
|
|
136
|
+
readonly key: "label";
|
|
137
|
+
readonly text: "Show or hide the side bar";
|
|
138
|
+
readonly description: "What it's called, its tooltip and its name for a screen reader, without `aria-label`.";
|
|
139
|
+
}, {
|
|
140
|
+
readonly key: "leftLabel";
|
|
141
|
+
readonly text: "Show or hide the left side bar";
|
|
142
|
+
readonly description: "What it's called with `toggles=\"left\"`, without `aria-label`.";
|
|
143
|
+
}, {
|
|
144
|
+
readonly key: "rightLabel";
|
|
145
|
+
readonly text: "Show or hide the right side bar";
|
|
146
|
+
readonly description: "What it's called with `toggles=\"right\"`, without `aria-label`.";
|
|
147
|
+
}, {
|
|
148
|
+
readonly key: "menuLabel";
|
|
149
|
+
readonly text: "Show or hide the menu";
|
|
150
|
+
readonly description: "What it's called at a narrow width, where the drawer is hidden until it slides in: its icon the menu's (`bars`).";
|
|
151
|
+
}];
|
|
152
|
+
readonly noun: "item";
|
|
153
|
+
readonly partOfSpeech: "action";
|
|
154
|
+
readonly ui: false;
|
|
135
155
|
readonly events: readonly [];
|
|
136
156
|
readonly slots: readonly [{
|
|
137
157
|
readonly name: "";
|
|
@@ -12,9 +12,12 @@ export declare const siteNavButtonEs: {
|
|
|
12
12
|
readonly aka: readonly ["botón de barra lateral", "botón del cajón", "hamburguesa", "alternar navegación"];
|
|
13
13
|
readonly attributes: {
|
|
14
14
|
readonly flag: "bandera";
|
|
15
|
+
readonly toggles: "alterna";
|
|
15
16
|
};
|
|
16
17
|
readonly texts: {
|
|
17
18
|
readonly label: "Mostrar u ocultar la barra lateral";
|
|
19
|
+
readonly leftLabel: "Mostrar u ocultar la barra lateral izquierda";
|
|
20
|
+
readonly rightLabel: "Mostrar u ocultar la barra lateral derecha";
|
|
18
21
|
readonly menuLabel: "Mostrar u ocultar el menú";
|
|
19
22
|
};
|
|
20
23
|
};
|