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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/components/ui-input/ui-input.editor.html?raw
|
|
2
|
-
var e = "<!-- <ui-input>'s property editor layout: move, pair (<ui-fields>) or leave out (data-omit) its properties. How: Spell UI's AGENTS.md, \"Property editor layouts\". -->\n<ui-property-editor schema=\"ui-input\" data-omit=\"\">\n <ui-property-group label=\"Name\" data-group=\"name\">\n <ui-property name=\"label\"></ui-property>\n <ui-property name=\"name\"></ui-property>\n </ui-property-group>\n <ui-property-group label=\"Content\" data-group=\"content\">\n <ui-property name=\"icon-position\"></ui-property>\n <ui-property name=\"icon\"></ui-property>\n </ui-property-group>\n <ui-property-group label=\"Appearance\" data-group=\"appearance\">\n <ui-property name=\"size\"></ui-property>\n <ui-property name=\"color\"></ui-property>\n <ui-property name=\"inverted\"></ui-property>\n <ui-property name=\"appearance\"></ui-property>\n <ui-property name=\"labeled\"></ui-property>\n <ui-property name=\"action\"></ui-property>\n <ui-property name=\"type\"></ui-property>\n <ui-property name=\"inputmode\"></ui-property>\n </ui-property-group>\n <ui-property-group label=\"Layout\" data-group=\"layout\">\n <ui-property name=\"fluid\"></ui-property>\n </ui-property-group>\n <ui-property-group label=\"States\" data-group=\"states\">\n <ui-property name=\"loading\"></ui-property>\n <ui-property name=\"disabled\"></ui-property>\n </ui-property-group>\n <ui-property-group label=\"Form\" data-group=\"form\">\n <ui-property name=\"state\"></ui-property>\n <ui-property name=\"readonly\"></ui-property>\n <ui-property name=\"value\"></ui-property>\n <ui-property name=\"parameter\"></ui-property>\n <ui-property name=\"placeholder\"></ui-property>\n <ui-property name=\"required\"></ui-property>\n <ui-property name=\"pattern\"></ui-property>\n <ui-property name=\"min\"></ui-property>\n <ui-property name=\"max\"></ui-property>\n <ui-property name=\"step\"></ui-property>\n <ui-property name=\"minlength\"></ui-property>\n <ui-property name=\"maxlength\"></ui-property>\n <ui-property name=\"
|
|
2
|
+
var e = "<!-- <ui-input>'s property editor layout: move, pair (<ui-fields>) or leave out (data-omit) its properties. How: Spell UI's AGENTS.md, \"Property editor layouts\". -->\n<ui-property-editor schema=\"ui-input\" data-omit=\"\">\n <ui-property-group label=\"Name\" data-group=\"name\">\n <ui-property name=\"label\"></ui-property>\n <ui-property name=\"name\"></ui-property>\n </ui-property-group>\n <ui-property-group label=\"Content\" data-group=\"content\">\n <ui-property name=\"icon-position\"></ui-property>\n <ui-property name=\"icon\"></ui-property>\n </ui-property-group>\n <ui-property-group label=\"Appearance\" data-group=\"appearance\">\n <ui-property name=\"size\"></ui-property>\n <ui-property name=\"color\"></ui-property>\n <ui-property name=\"inverted\"></ui-property>\n <ui-property name=\"appearance\"></ui-property>\n <ui-property name=\"labeled\"></ui-property>\n <ui-property name=\"action\"></ui-property>\n <ui-property name=\"type\"></ui-property>\n <ui-property name=\"inputmode\"></ui-property>\n </ui-property-group>\n <ui-property-group label=\"Layout\" data-group=\"layout\">\n <ui-property name=\"fluid\"></ui-property>\n </ui-property-group>\n <ui-property-group label=\"States\" data-group=\"states\">\n <ui-property name=\"loading\"></ui-property>\n <ui-property name=\"disabled\"></ui-property>\n </ui-property-group>\n <ui-property-group label=\"Form\" data-group=\"form\">\n <ui-property name=\"state\"></ui-property>\n <ui-property name=\"readonly\"></ui-property>\n <ui-property name=\"value\"></ui-property>\n <ui-property name=\"parameter\"></ui-property>\n <ui-property name=\"placeholder\"></ui-property>\n <ui-property name=\"required\"></ui-property>\n <ui-property name=\"pattern\"></ui-property>\n <ui-property name=\"min\"></ui-property>\n <ui-property name=\"max\"></ui-property>\n <ui-property name=\"step\"></ui-property>\n <ui-property name=\"minlength\"></ui-property>\n <ui-property name=\"maxlength\"></ui-property>\n <ui-property name=\"accept\"></ui-property>\n <ui-fields>\n <ui-property name=\"multiple\"></ui-property>\n <ui-property name=\"folder\"></ui-property>\n </ui-fields>\n <ui-property name=\"autocomplete\"></ui-property>\n <ui-property name=\"rules\"></ui-property>\n </ui-property-group>\n</ui-property-editor>\n";
|
|
3
3
|
export { e as default };
|
|
4
4
|
|
|
5
|
-
//# sourceMappingURL=ui-input.editor-
|
|
5
|
+
//# sourceMappingURL=ui-input.editor-D11iRgXR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-input.editor-D11iRgXR.js","names":["ui_input_editor_default"],"sources":[],"mappings":""}
|
package/dist/ui-input.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./rolldown-runtime-c6e9CmGy.js";
|
|
2
2
|
import { A as e, C as t, F as n, Gt as r, IconGlyph as i, Jt as a, Kt as o, NativeFallback as s, SlotContent as c, T as l, UI as ee, Ut as u, Wt as d, Yt as f, afterSolidUpdate as te, controlled as ne, derived as re, et as ie, onChange as p, proto as m, protoMerged as h, qt as g, state as ae, untracked as _, w as oe } from "./core.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as v } from "./UIInput-
|
|
3
|
+
import { DOMFormControl as se, FormComponent as ce } from "./forms.js";
|
|
4
|
+
import { t as le } from "./UILabel-pCjKxQlQ.js";
|
|
5
|
+
import { t as v } from "./UIInput-8s1aiaw1.js";
|
|
6
6
|
import { Show as y } from "solid-js";
|
|
7
|
-
import { className as b, createComponent as x, effect as S, getOwner as C, insert as w, isServer as
|
|
7
|
+
import { className as b, createComponent as x, effect as S, getOwner as C, insert as w, isServer as ue, readShallow as T, ref as de, setAttribute as E, spread as fe, template as D } from "@solidjs/web";
|
|
8
8
|
// src/components/ui-input/UIInput.en.ts
|
|
9
|
-
var
|
|
9
|
+
var pe = [
|
|
10
10
|
"text",
|
|
11
11
|
"password",
|
|
12
12
|
"email",
|
|
@@ -22,7 +22,7 @@ var fe = [
|
|
|
22
22
|
"color",
|
|
23
23
|
"file",
|
|
24
24
|
"percent"
|
|
25
|
-
],
|
|
25
|
+
], me = {
|
|
26
26
|
tag: "ui-input",
|
|
27
27
|
icon: "i cursor",
|
|
28
28
|
snippet: "<ui-input placeholder=\"Type here\"></ui-input>",
|
|
@@ -148,7 +148,7 @@ var fe = [
|
|
|
148
148
|
name: "type",
|
|
149
149
|
group: "appearance",
|
|
150
150
|
kind: "enum",
|
|
151
|
-
values:
|
|
151
|
+
values: pe,
|
|
152
152
|
default: "text",
|
|
153
153
|
description: "Native input type; `file` also adds the `file` class. `percent` is a number field for a part of a whole: its value the fraction (`0.18`), shown as `18` with a `%` label at its end."
|
|
154
154
|
},
|
|
@@ -216,6 +216,12 @@ var fe = [
|
|
|
216
216
|
kind: "string",
|
|
217
217
|
description: "`file`: accepted file types."
|
|
218
218
|
},
|
|
219
|
+
{
|
|
220
|
+
name: "folder",
|
|
221
|
+
group: "form",
|
|
222
|
+
kind: "boolean",
|
|
223
|
+
description: "`file`: picks whole folders instead of files; `files` holds every file in them, each with its path in its folder (`webkitRelativePath`)."
|
|
224
|
+
},
|
|
219
225
|
{
|
|
220
226
|
name: "autocomplete",
|
|
221
227
|
group: "form",
|
|
@@ -254,7 +260,7 @@ var fe = [
|
|
|
254
260
|
}, {
|
|
255
261
|
name: "ui-changed",
|
|
256
262
|
detail: "{ value: string, originalEvent?: Event }",
|
|
257
|
-
description: "Someone committed a change (blur, Enter, picking a file)
|
|
263
|
+
description: "Someone committed a change (blur, Enter, picking a file); a file input's element holds them in `files`."
|
|
258
264
|
}],
|
|
259
265
|
slots: [
|
|
260
266
|
{
|
|
@@ -304,7 +310,7 @@ var fe = [
|
|
|
304
310
|
}
|
|
305
311
|
],
|
|
306
312
|
texts: []
|
|
307
|
-
},
|
|
313
|
+
}, he = {
|
|
308
314
|
tag: "ui-textarea",
|
|
309
315
|
icon: "align left",
|
|
310
316
|
formControl: !0,
|
|
@@ -476,12 +482,12 @@ var fe = [
|
|
|
476
482
|
}
|
|
477
483
|
],
|
|
478
484
|
texts: []
|
|
479
|
-
},
|
|
485
|
+
}, O = "ui label", k, A, j, M, N = class _InputFallback extends (j = s, A = [m], k = [m], j) {
|
|
480
486
|
constructor() {
|
|
481
487
|
super(...arguments), a(this, "control");
|
|
482
488
|
}
|
|
483
489
|
build() {
|
|
484
|
-
let e = this.domElement, t = e.localName ===
|
|
490
|
+
let e = this.domElement, t = e.localName === he.tag, n = {
|
|
485
491
|
name: this.attr("name"),
|
|
486
492
|
placeholder: this.attr("placeholder"),
|
|
487
493
|
required: this.flag("required"),
|
|
@@ -502,14 +508,15 @@ var fe = [
|
|
|
502
508
|
step: this.attr("step"),
|
|
503
509
|
multiple: this.flag("multiple"),
|
|
504
510
|
accept: this.attr("accept"),
|
|
511
|
+
webkitdirectory: this.flag("folder"),
|
|
505
512
|
inputmode: this.attr("inputmode")
|
|
506
513
|
});
|
|
507
514
|
this.decorate(r, "control"), this.nameFromPlaceholder(r);
|
|
508
515
|
let i = e.value ?? this.attr("value");
|
|
509
516
|
i && r.type !== "file" && (r.value = i);
|
|
510
|
-
let a = t ? void 0 : this.attr("label"), o = this.attr("labeled"), s = [a && o === void 0 ?
|
|
511
|
-
class:
|
|
512
|
-
part:
|
|
517
|
+
let a = t ? void 0 : this.attr("label"), o = this.attr("labeled"), s = [a && o === void 0 ? ge : "", r.type === "file" ? "file" : ""], c = this.create("div", { class: this.classes(s.filter(Boolean).join(" ") || void 0) }), l = a ? this.create("span", {
|
|
518
|
+
class: O,
|
|
519
|
+
part: _e
|
|
513
520
|
}, a) : void 0;
|
|
514
521
|
return l && o !== "right" && c.append(l), c.append(r), l && o === "right" && c.append(l), this.decorate(c, "input"), this.listen(r, "input", (t) => {
|
|
515
522
|
e.value = r.value, this.sync(), this.announce("ui-typed", t);
|
|
@@ -529,31 +536,31 @@ var fe = [
|
|
|
529
536
|
});
|
|
530
537
|
}
|
|
531
538
|
};
|
|
532
|
-
|
|
539
|
+
M = r(j), u(M, 13, "vocabulary", A, N), u(M, 13, "degraded", k, N), d(M, N), o(N, "InputFallback"), a(N, "vocabulary", f(M, 8, N, me)), f(M, 11, N), a(N, "degraded", f(M, 12, N, [
|
|
533
540
|
"`icon` glyph and the `icon` / `label` / `action` slots",
|
|
534
541
|
"corner labels",
|
|
535
542
|
"`rules` (only the native constraints validate)",
|
|
536
543
|
"`:state(invalid)`, form reset of the value, implicit (Enter) submission",
|
|
537
544
|
"labels from `<label for>` (only `aria-label` / `placeholder` name the control)"
|
|
538
|
-
])), f(
|
|
539
|
-
var
|
|
545
|
+
])), f(M, 15, N);
|
|
546
|
+
var P = N, ge = "labeled", _e = "label", F, I, L, R, z, B, V, ve, ye, be, xe, Se, H, U, W, G, K = class _TextControl extends (H = ce, Se = [m], xe = [h], be = [ne("value")], ye = [p("value", "isReady")], ve = [_], V = [_], B = [_], z = [_], R = [ae], L = [re], I = [p("value", "constraints", "isDisabled", "readonly", "isReady")], F = [_], H) {
|
|
540
547
|
constructor() {
|
|
541
|
-
super(...arguments), f(
|
|
548
|
+
super(...arguments), f(U, 5, this), a(this, "control"), g(this, W, f(U, 8, this, "")), f(U, 11, this), a(this, "valueAtFocus"), a(this, "onInput", /* @__PURE__ */ o((e) => {
|
|
542
549
|
let t = e.currentTarget, n = this.valueFor(t.value);
|
|
543
550
|
this.requestChange("value", n, () => this.send("ui-typed", {
|
|
544
551
|
value: n,
|
|
545
552
|
originalEvent: e
|
|
546
553
|
})) || te(() => this.syncControl()), this.readNativeValidity();
|
|
547
|
-
}, "onInput")), a(this, "onChange", f(
|
|
554
|
+
}, "onInput")), a(this, "onChange", f(U, 24, this, /* @__PURE__ */ o((e) => {
|
|
548
555
|
this.isTouched = !0, this.send("ui-changed", {
|
|
549
556
|
value: this.value,
|
|
550
557
|
originalEvent: e
|
|
551
558
|
});
|
|
552
|
-
}, "onChange"))), f(
|
|
559
|
+
}, "onChange"))), f(U, 27, this), a(this, "onFocus", f(U, 28, this, /* @__PURE__ */ o(() => {
|
|
553
560
|
this.valueAtFocus = this.value;
|
|
554
|
-
}, "onFocus"))), f(
|
|
561
|
+
}, "onFocus"))), f(U, 31, this), a(this, "onBlur", f(U, 32, this, /* @__PURE__ */ o(() => {
|
|
555
562
|
this.valueAtFocus !== void 0 && this.valueAtFocus !== this.value && (this.isTouched = !0), this.valueAtFocus = void 0;
|
|
556
|
-
}, "onBlur"))), f(
|
|
563
|
+
}, "onBlur"))), f(U, 35, this), g(this, G, f(U, 12, this, Te)), f(U, 15, this);
|
|
557
564
|
}
|
|
558
565
|
focus(e) {
|
|
559
566
|
this.control?.focus(e);
|
|
@@ -581,7 +588,7 @@ var M = j, _e = "labeled", ve = "label", N, P, F, I, L, R, z, B, ye, be, xe, Se,
|
|
|
581
588
|
return e;
|
|
582
589
|
}
|
|
583
590
|
get validation() {
|
|
584
|
-
let e =
|
|
591
|
+
let e = ce.validator.validate(this.formValue, this.validationRules, {
|
|
585
592
|
label: this.validationLabel,
|
|
586
593
|
name: this.name
|
|
587
594
|
}), t = this.nativeValidity;
|
|
@@ -637,15 +644,15 @@ var M = j, _e = "labeled", ve = "label", N, P, F, I, L, R, z, B, ye, be, xe, Se,
|
|
|
637
644
|
};
|
|
638
645
|
}
|
|
639
646
|
get staticControl() {
|
|
640
|
-
return
|
|
647
|
+
return ue ? {
|
|
641
648
|
[ie]: "",
|
|
642
649
|
name: this.name,
|
|
643
650
|
value: this.shownFor(this.value) || void 0
|
|
644
651
|
} : {};
|
|
645
652
|
}
|
|
646
653
|
};
|
|
647
|
-
|
|
648
|
-
var Ce =
|
|
654
|
+
U = r(H), W = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), u(U, 4, "value", be, K, W), u(U, 1, "onValueChanged", ye, K), u(U, 1, "syncControl", ve, K), u(U, 4, "nativeValidity", R, K, G), u(U, 2, "validation", L, K), u(U, 1, "onConstraintsChanged", I, K), u(U, 1, "readNativeValidity", F, K), u(U, 13, "invalidShows", Se, K), u(U, 13, "elementSetup", xe, K), u(U, 5, "onChange", V, K), u(U, 5, "onFocus", B, K), u(U, 5, "onBlur", z, K), d(U, K), o(K, "TextControl"), a(K, "invalidShows", f(U, 16, K, "once touched")), f(U, 19, K), a(K, "elementSetup", f(U, 20, K, { cssStates: ["fluid"] })), f(U, 23, K);
|
|
655
|
+
var Ce = K, we = [
|
|
649
656
|
"valueMissing",
|
|
650
657
|
"typeMismatch",
|
|
651
658
|
"patternMismatch",
|
|
@@ -660,20 +667,28 @@ var Ce = G, we = [
|
|
|
660
667
|
errors: [],
|
|
661
668
|
flags: {},
|
|
662
669
|
message: ""
|
|
663
|
-
}, Ee = /* @__PURE__ */ D("<slot>"), De = /* @__PURE__ */ D("<span><slot>"), Oe = /* @__PURE__ */ D("<span aria-hidden=true><span><slot>"), ke = /* @__PURE__ */ D("<div><!><input><!><!><!><!>"), Ae, je, Me,
|
|
670
|
+
}, Ee = /* @__PURE__ */ D("<slot>"), De = /* @__PURE__ */ D("<span><slot>"), Oe = /* @__PURE__ */ D("<span aria-hidden=true><span><slot>"), ke = /* @__PURE__ */ D("<div><!><input><!><!><!><!>"), Ae, je, Me, Ne, Pe, Fe, q, J, Y, DOMInputElement = class extends se {
|
|
671
|
+
static {
|
|
672
|
+
o(this, "DOMInputElement");
|
|
673
|
+
}
|
|
674
|
+
get files() {
|
|
675
|
+
return this.component?.files ?? [];
|
|
676
|
+
}
|
|
677
|
+
showPicker() {
|
|
678
|
+
this.component?.showPicker();
|
|
679
|
+
}
|
|
680
|
+
}, X = class _UIInput extends (q = Ce, Fe = [m], Pe = [h], Ne = [ae], Me = [_], je = [p("value")], Ae = [_], q) {
|
|
664
681
|
constructor() {
|
|
665
|
-
super(...arguments), a(this, "slots", new c(this.domElement)), a(this, "cornerGlyph", new i({
|
|
682
|
+
super(...arguments), f(J, 5, this), a(this, "slots", new c(this.domElement)), a(this, "cornerGlyph", new i({
|
|
666
683
|
owner: this,
|
|
667
684
|
name: /* @__PURE__ */ o(() => this.labelPlace === "corner" ? this.label : void 0, "name")
|
|
668
685
|
})), a(this, "iconGlyph", new i({
|
|
669
686
|
owner: this,
|
|
670
687
|
name: /* @__PURE__ */ o(() => this.icon, "name")
|
|
671
|
-
})), g(this,
|
|
672
|
-
if (this.isFileInput)
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
}
|
|
676
|
-
this.onChange(e);
|
|
688
|
+
})), g(this, Y, f(J, 8, this, [])), f(J, 11, this), a(this, "onFileOrChange", /* @__PURE__ */ o((e) => {
|
|
689
|
+
if (!this.isFileInput) return this.onChange(e);
|
|
690
|
+
let t = e.currentTarget;
|
|
691
|
+
this.files = [...t.files ?? []], this.requestChange("value", t.value, () => !0), this.onChange(e), this.value === "" && this.forgetFiles();
|
|
677
692
|
}, "onFileOrChange")), a(this, "onKeyDown", /* @__PURE__ */ o((e) => {
|
|
678
693
|
if (e.key !== n.enter || e.isComposing || e.defaultPrevented) return;
|
|
679
694
|
let t = this.domElement.form;
|
|
@@ -706,6 +721,19 @@ var Ce = G, we = [
|
|
|
706
721
|
get isFileInput() {
|
|
707
722
|
return this.type === "file";
|
|
708
723
|
}
|
|
724
|
+
showPicker() {
|
|
725
|
+
let e = this.control;
|
|
726
|
+
e && (typeof e.showPicker == "function" ? e.showPicker() : e.click());
|
|
727
|
+
}
|
|
728
|
+
get folderMode() {
|
|
729
|
+
return this.isFileInput && this.folder ? { webkitdirectory: "" } : {};
|
|
730
|
+
}
|
|
731
|
+
onFileValueCleared() {
|
|
732
|
+
this.isFileInput && this.value === "" && this.forgetFiles();
|
|
733
|
+
}
|
|
734
|
+
forgetFiles() {
|
|
735
|
+
this.control?.value && (this.control.value = ""), this.files.length && (this.files = []);
|
|
736
|
+
}
|
|
709
737
|
formSubmission(e, t) {
|
|
710
738
|
if (!this.isFileInput) return super.formSubmission(e, t);
|
|
711
739
|
let n = this.files;
|
|
@@ -715,7 +743,7 @@ var Ce = G, we = [
|
|
|
715
743
|
return r;
|
|
716
744
|
}
|
|
717
745
|
onFormReset() {
|
|
718
|
-
super.onFormReset(), this.
|
|
746
|
+
super.onFormReset(), this.forgetFiles();
|
|
719
747
|
}
|
|
720
748
|
classValue(e) {
|
|
721
749
|
return e === "labeled" ? this.labelPlace ? this.labeled || this.labelPlace !== "end" || "right" : !1 : e === "action" ? this.actionPlace ? this.action || !0 : !1 : e === "icon-position" ? this.hasIconBox ? this.iconPosition : void 0 : super.classValue(e);
|
|
@@ -756,7 +784,7 @@ var Ce = G, we = [
|
|
|
756
784
|
E(e, "name", t);
|
|
757
785
|
}), e;
|
|
758
786
|
}
|
|
759
|
-
}), i),
|
|
787
|
+
}), i), fe(i, [
|
|
760
788
|
{
|
|
761
789
|
get part() {
|
|
762
790
|
return t.partForName("control");
|
|
@@ -784,6 +812,7 @@ var Ce = G, we = [
|
|
|
784
812
|
}
|
|
785
813
|
},
|
|
786
814
|
() => t.constraints,
|
|
815
|
+
() => t.folderMode,
|
|
787
816
|
() => t.controlAria,
|
|
788
817
|
() => t.staticControl,
|
|
789
818
|
{
|
|
@@ -803,7 +832,7 @@ var Ce = G, we = [
|
|
|
803
832
|
return t.onKeyDown;
|
|
804
833
|
}
|
|
805
834
|
}
|
|
806
|
-
], !1),
|
|
835
|
+
], !1), de(() => (e) => t.control = e, i), w(n, x(y, {
|
|
807
836
|
get when() {
|
|
808
837
|
return t.hasIconBox;
|
|
809
838
|
},
|
|
@@ -831,7 +860,7 @@ var Ce = G, we = [
|
|
|
831
860
|
get children() {
|
|
832
861
|
var n = Oe(), r = n.firstChild, i = r.firstChild;
|
|
833
862
|
return i._$owner = C(), w(i, () => t.cornerGlyph.svg), S(() => ({
|
|
834
|
-
e: T(t.labeled === "left corner" ?
|
|
863
|
+
e: T(t.labeled === "left corner" ? ze : Re),
|
|
835
864
|
t: t.partForName("label"),
|
|
836
865
|
a: T(e),
|
|
837
866
|
o: t.slotForName("label")
|
|
@@ -859,8 +888,8 @@ var Ce = G, we = [
|
|
|
859
888
|
labelBox() {
|
|
860
889
|
let e = this;
|
|
861
890
|
var t = De(), n = t.firstChild;
|
|
862
|
-
return n._$owner = C(), w(n, () => e.label ?? (e.isPercent ?
|
|
863
|
-
e: T(
|
|
891
|
+
return n._$owner = C(), w(n, () => e.label ?? (e.isPercent ? Le : void 0)), S(() => ({
|
|
892
|
+
e: T(O),
|
|
864
893
|
t: e.partForName("label"),
|
|
865
894
|
a: e.slotForName("label")
|
|
866
895
|
}), ({ e, t: r, a: i }, a) => {
|
|
@@ -871,15 +900,16 @@ var Ce = G, we = [
|
|
|
871
900
|
return e instanceof HTMLButtonElement || e instanceof HTMLInputElement ? e.type === "submit" && !e.disabled : e.getAttribute("type") === "submit" && !e.matches(":disabled");
|
|
872
901
|
}
|
|
873
902
|
};
|
|
874
|
-
|
|
903
|
+
J = r(q), Y = /* @__PURE__ */ new WeakMap(), u(J, 4, "files", Ne, X, Y), u(J, 1, "showPicker", Me, X), u(J, 1, "onFileValueCleared", je, X), u(J, 1, "forgetFiles", Ae, X), u(J, 13, "vocabulary", Fe, X), u(J, 13, "elementSetup", Pe, X), d(J, X), o(X, "UIInput"), a(X, "vocabulary", f(J, 12, X, me)), f(J, 15, X), a(X, "elementSetup", f(J, 16, X, {
|
|
875
904
|
styleSheets: {
|
|
876
|
-
label:
|
|
905
|
+
label: le,
|
|
877
906
|
input: v
|
|
878
907
|
},
|
|
879
|
-
Fallback:
|
|
908
|
+
Fallback: P,
|
|
909
|
+
DOMElement: DOMInputElement,
|
|
880
910
|
loading: "its own"
|
|
881
|
-
})), f(
|
|
882
|
-
var
|
|
911
|
+
})), f(J, 19, X);
|
|
912
|
+
var Ie = X, Le = "%", Re = "ui corner label", ze = "ui left corner label", Be = /* @__PURE__ */ D("<div><textarea>"), Ve, He, Ue, We, Z, Q, $ = class _UITextarea extends (Z = Ce, We = [m], Ue = [h], He = [p("value", "isReady", "grow", "rows", "maxRows")], Ve = [_], Z) {
|
|
883
913
|
constructor() {
|
|
884
914
|
super(...arguments), f(Q, 5, this), a(this, "onKeyDown", /* @__PURE__ */ o((e) => {
|
|
885
915
|
!this.sendOnEnter || e.key !== n.enter || e.shiftKey || e.isComposing || (e.preventDefault(), this.isDisabled || this.readonly || !this.value.trim() || this.send("ui-send", {
|
|
@@ -919,11 +949,11 @@ var Ne = Y, Pe = "%", Fe = "ui corner label", Ie = "ui left corner label", Le =
|
|
|
919
949
|
}
|
|
920
950
|
render() {
|
|
921
951
|
let e = this;
|
|
922
|
-
var t =
|
|
923
|
-
return
|
|
952
|
+
var t = Be(), n = t.firstChild;
|
|
953
|
+
return fe(n, [
|
|
924
954
|
{
|
|
925
955
|
get class() {
|
|
926
|
-
return e.grow ?
|
|
956
|
+
return e.grow ? Ke : void 0;
|
|
927
957
|
},
|
|
928
958
|
get style() {
|
|
929
959
|
return e.growStyle;
|
|
@@ -967,7 +997,7 @@ var Ne = Y, Pe = "%", Fe = "ui corner label", Ie = "ui left corner label", Le =
|
|
|
967
997
|
return e.onKeyDown;
|
|
968
998
|
}
|
|
969
999
|
}
|
|
970
|
-
], !1),
|
|
1000
|
+
], !1), de(() => (t) => e.control = t, n), S(() => ({
|
|
971
1001
|
e: T(e.rootClass),
|
|
972
1002
|
t: e.partForName("input")
|
|
973
1003
|
}), ({ e, t: n }, r) => {
|
|
@@ -975,12 +1005,12 @@ var Ne = Y, Pe = "%", Fe = "ui corner label", Ie = "ui left corner label", Le =
|
|
|
975
1005
|
}), t;
|
|
976
1006
|
}
|
|
977
1007
|
};
|
|
978
|
-
Q = r(Z), u(Q, 1, "onGrowChanged",
|
|
1008
|
+
Q = r(Z), u(Q, 1, "onGrowChanged", He, $), u(Q, 1, "fitHeight", Ve, $), u(Q, 13, "vocabulary", We, $), u(Q, 13, "elementSetup", Ue, $), d(Q, $), o($, "UITextarea"), a($, "vocabulary", f(Q, 8, $, he)), f(Q, 11, $), a($, "elementSetup", f(Q, 12, $, {
|
|
979
1009
|
styleSheets: { input: v },
|
|
980
|
-
Fallback:
|
|
1010
|
+
Fallback: P
|
|
981
1011
|
})), f(Q, 15, $);
|
|
982
|
-
var
|
|
983
|
-
|
|
984
|
-
export {
|
|
1012
|
+
var Ge = $, Ke = "grow";
|
|
1013
|
+
Ie.define(), Ge.define();
|
|
1014
|
+
export { Ie as UIInput, Ge as UITextarea };
|
|
985
1015
|
|
|
986
1016
|
//# sourceMappingURL=ui-input.js.map
|