@metamorph-labs/polymorph 1.0.18 → 1.0.19
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 +242 -0
- package/dist/design/systems/desktop.json +1 -1
- package/dist/design/systems/dew.json +1 -1
- package/dist/design/systems/flint.json +1 -1
- package/dist/design/systems/glassmorphic.json +1 -1
- package/dist/design/systems/harbor.json +1 -1
- package/dist/design/systems/journal.json +1 -1
- package/dist/design/systems/pastel.json +1 -1
- package/dist/design/systems/pebble.json +1 -1
- package/dist/design/systems/plain.json +1 -1
- package/dist/design/systems/pop.json +1 -1
- package/dist/design/systems/press.json +1 -1
- package/dist/packages/angular-ui/src/ai/ArtifactPane.ts +15 -4
- package/dist/packages/angular-ui/src/ai/PromptInput.ts +3 -1
- package/dist/packages/angular-ui/src/archetypes/Dashboard.ts +38 -20
- package/dist/packages/angular-ui/src/archetypes/dashboard.states.ts +52 -0
- package/dist/packages/angular-ui/src/controls/ColorInput.ts +62 -34
- package/dist/packages/angular-ui/src/controls/Combobox.ts +28 -7
- package/dist/packages/angular-ui/src/controls/DatePicker.ts +12 -11
- package/dist/packages/angular-ui/src/controls/DateRangePicker.ts +22 -17
- package/dist/packages/angular-ui/src/controls/DateRangePickerRangeCalendar.ts +3 -2
- package/dist/packages/angular-ui/src/controls/FileUpload.ts +18 -12
- package/dist/packages/angular-ui/src/controls/FileUploadRow.ts +24 -4
- package/dist/packages/angular-ui/src/controls/MultiSelect.ts +49 -12
- package/dist/packages/angular-ui/src/controls/NumberInput.ts +27 -3
- package/dist/packages/angular-ui/src/controls/PhoneInput.ts +9 -5
- package/dist/packages/angular-ui/src/controls/Select.ts +36 -7
- package/dist/packages/angular-ui/src/controls/TagInput.ts +61 -7
- package/dist/packages/angular-ui/src/controls/TimeInput.ts +15 -1
- package/dist/packages/angular-ui/src/controls/select.states.ts +79 -58
- package/dist/packages/angular-ui/src/overlays/Command.ts +50 -13
- package/dist/packages/angular-ui/src/overlays/CommandPanel.ts +11 -7
- package/dist/packages/angular-ui/src/overlays/ToastViewport.ts +1 -1
- package/dist/packages/angular-ui/src/structure/CodeBlock.ts +18 -4
- package/dist/packages/angular-ui/src/structure/Stat.ts +295 -84
- package/dist/packages/angular-ui/src/structure/stat.states.ts +116 -0
- package/dist/packages/cli/src/agents.js +4 -3
- package/dist/packages/cli/src/apply.js +43 -18
- package/dist/packages/cli/src/check.js +4 -0
- package/dist/packages/cli/src/cli.js +6 -2
- package/dist/packages/cli/src/elements.js +12 -2
- package/dist/packages/cli/src/emit.js +43 -8
- package/dist/packages/cli/src/readings.js +29 -3
- package/dist/packages/cli/src/skills/bridge.js +1197 -0
- package/dist/packages/cli/src/skills/facts.js +190 -0
- package/dist/packages/cli/src/skills/native.js +1580 -0
- package/dist/packages/cli/src/skills/rules.js +199 -0
- package/dist/packages/cli/src/skills/runtime.js +1020 -0
- package/dist/packages/cli/src/skills/screen-charts.js +334 -0
- package/dist/packages/cli/src/skills/screen-chat.js +247 -0
- package/dist/packages/cli/src/skills/screen-code.js +565 -0
- package/dist/packages/cli/src/skills/screen-rich-text.js +305 -0
- package/dist/packages/cli/src/skills/screen.js +378 -0
- package/dist/packages/cli/src/skills/setup-packages.js +307 -0
- package/dist/packages/cli/src/skills/setup.js +125 -0
- package/dist/packages/cli/src/skills/theme-documents.js +351 -0
- package/dist/packages/cli/src/skills/theme.js +208 -0
- package/dist/packages/cli/src/skills.js +13 -794
- package/dist/packages/cli/src/theme.js +42 -1
- package/dist/packages/cli/src/tool-verbs.js +19 -4
- package/dist/packages/cli/src/verbs.js +28 -2
- package/dist/packages/elements-ui/dist/cdn/chunks/{AppShellUserCard-0eCCnnN_.js → AppShellUserCard-XT4br4fr.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{AreaChart-DftfzLG0.js → AreaChart-CXNFfbJ8.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/ArtifactPane-Pr9_K2uM.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/{Avatar-DcdMgxgY.js → Avatar-3WXoBPLv.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{Avatar-DcuvZwe7.js → Avatar-BKqjM8qW.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{AvatarButton-D5XKVduu.js → AvatarButton-BasMQCSM.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{AvatarGroup-DgFwJUNO.js → AvatarGroup-COch2-O0.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{BarChart-myuR0aHc.js → BarChart-ugae8zfr.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{ChatMessage-CgQ1h_JP.js → ChatMessage-Bx4yrF2x.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/CodeBlock-B_e5ma3K.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/CodeBlock-Fgtr48Vb.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/ColorInput-CD7rsWRp.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/Combobox-CUw7z6TS.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/{Combobox-DB2FT7so.js → Combobox-hWIFU9X_.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/Command-BXgqRd3I.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/{ConfirmDialog-BtQOAHY2.js → ConfirmDialog-CAaBRKxl.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{Dashboard-ChMPH4_Q.js → Dashboard-DwNw5Wnd.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/DatePicker-DjqtswQR.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/DateRangePicker-LsXFHOzm.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/{DonutChart-BEK89BeL.js → DonutChart-DYXx6eTe.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/FileUpload-3gbZTSSx.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/{FormField-PlLLDKqc.js → FormField-Bvw4cLBc.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{FormField-C6L3vYp4.js → FormField-DzhcinED.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{FunnelChart-DVQz_gad.js → FunnelChart-D24XhrGw.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{Heading-fAcu6Vrw.js → Heading-Cvfyu8pc.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{Heading-CgzEi9OQ.js → Heading-XDJzlwt9.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{Heatmap-BRwR-n-V.js → Heatmap-BQoUS6gY.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{Hero-CV2YWeb4.js → Hero-CXuuFceS.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{Histogram-CCYwlinB.js → Histogram-DW_ZPHpR.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{LineChart-BH6Pq1P1.js → LineChart-kf-zlNWe.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{Markdown-DmZEch4i.js → Markdown-C3rjhIbt.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/ModeSwitch-DQ86CK9h.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/MultiSelect-DbSx9QtV.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/NumberInput-B4ZZOGLl.js +7 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/PhoneInput-BsMfbNi6.js +210 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/PromptInput-l_-zAXSZ.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/{RadarChart-Coje7Sb0.js → RadarChart-CwJAWRki.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{RichTextContent-CufjptHF.js → RichTextContent-D51UfuWk.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{RichTextInput-Dz7yBFUA.js → RichTextInput-B32fN_p9.js} +3 -3
- package/dist/packages/elements-ui/dist/cdn/chunks/{ScatterChart-Do5tQTC5.js → ScatterChart-Mps7l5-i.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/Select-CpsRP0NR.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/Stat-CXR6bP7X.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/Stat-DGcx2ZZq.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/TagInput-BhkLU4gE.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/TimeInput-r2jNTOLN.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/{Toast-CAYGbn7g.js → Toast-BTfcZn0I.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{ToastViewport-CFslglYc.js → ToastViewport-BBQMRCQT.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{ToolCall-DUCoKsoE.js → ToolCall-DNU5kk9_.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{Treemap-Bh3ruYGJ.js → Treemap-BV8TlZHB.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/agent-DfOqpL9c.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/api-DJBiUXxK.js +4 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/avatar.module-D4YdFevY.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/cap-DA71oFHt.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/{cartesian-I5uPfyqv.js → cartesian-CEn2lJCc.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/{chart-annotations.module-xUExw4pu.js → chart-annotations.module-hA_KO_Pe.js} +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/chart-brush.module-C_8txUW5.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/chart-twin.module-BpfyTQ9R.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/check-CHvc4yHL.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/css-vars-DeZ4TCna.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/draw-BiQ3Of6N.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/drawing-nhJNBahV.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/field-labels-Df5HuYC5.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/frame-CtTY4oCn.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/on-call-YKLF3-FH.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/runtime-QRQ3CjZg.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/series-uUg6_JtL.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/src-XnWjGSDr.js +67 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/toast-pwGvxH2T.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/urls-Qks0KJ_p.js +6 -0
- package/dist/packages/elements-ui/dist/cdn/chunks/webmcp-Dro53ATH.js +1 -0
- package/dist/packages/elements-ui/dist/cdn/polymorph-all.js +52 -50
- package/dist/packages/elements-ui/dist/cdn/polymorph.css +1 -1
- package/dist/packages/elements-ui/dist/cdn/polymorph.js +1 -1
- package/dist/packages/elements-ui/dist/cdn/prepaint.js +1 -1
- package/dist/packages/elements-ui/dist/cdn/themes/desktop.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/dew.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/flint.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/glassmorphic.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/harbor.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/journal.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/pastel.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/pebble.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/plain.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/pop.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/press.css +5 -4
- package/dist/packages/elements-ui/dist/cdn/themes/terminal.css +5 -4
- package/dist/packages/elements-ui/src/ai/ArtifactPane.ts +2 -0
- package/dist/packages/elements-ui/src/archetypes/dashboard.states.ts +9 -0
- package/dist/packages/elements-ui/src/controls/ColorInput.ts +2 -0
- package/dist/packages/elements-ui/src/controls/NumberInput.ts +2 -0
- package/dist/packages/elements-ui/src/controls/TagInput.ts +4 -0
- package/dist/packages/elements-ui/src/controls/TimeInput.ts +2 -0
- package/dist/packages/elements-ui/src/controls/select.states.ts +10 -0
- package/dist/packages/elements-ui/src/overlays/Command.ts +2 -0
- package/dist/packages/elements-ui/src/structure/CodeBlock.ts +5 -2
- package/dist/packages/elements-ui/src/structure/Stat.ts +6 -0
- package/dist/packages/elements-ui/src/structure/stat.states.ts +33 -0
- package/dist/packages/mcp/src/propose.js +92 -15
- package/dist/packages/mcp/src/server.js +19 -8
- package/dist/packages/mcp/src/tools.js +80 -5
- package/dist/packages/mcp/src/write.js +95 -13
- package/dist/packages/react-ui/src/ai/ArtifactPane.tsx +5 -2
- package/dist/packages/react-ui/src/ai/PromptInput.tsx +5 -2
- package/dist/packages/react-ui/src/archetypes/dashboard.states.tsx +28 -0
- package/dist/packages/react-ui/src/controls/ColorInput.tsx +69 -13
- package/dist/packages/react-ui/src/controls/Combobox.tsx +13 -5
- package/dist/packages/react-ui/src/controls/DatePicker.tsx +3 -0
- package/dist/packages/react-ui/src/controls/DateRangePicker.tsx +22 -5
- package/dist/packages/react-ui/src/controls/FileUpload.tsx +2 -0
- package/dist/packages/react-ui/src/controls/MultiSelect.tsx +30 -6
- package/dist/packages/react-ui/src/controls/NumberInput.tsx +19 -1
- package/dist/packages/react-ui/src/controls/PhoneInput.tsx +3 -3
- package/dist/packages/react-ui/src/controls/Select.tsx +59 -23
- package/dist/packages/react-ui/src/controls/TagInput.tsx +43 -10
- package/dist/packages/react-ui/src/controls/TimeInput.tsx +10 -0
- package/dist/packages/react-ui/src/controls/date-segments.tsx +16 -0
- package/dist/packages/react-ui/src/controls/select.states.tsx +13 -0
- package/dist/packages/react-ui/src/overlays/Command.tsx +23 -2
- package/dist/packages/react-ui/src/overlays/Toaster.tsx +2 -2
- package/dist/packages/react-ui/src/structure/CodeBlock.tsx +7 -3
- package/dist/packages/react-ui/src/structure/Stat.tsx +90 -13
- package/dist/packages/react-ui/src/structure/stat.states.tsx +68 -0
- package/dist/packages/recipes/src/ai/artifact-pane.module.css +4 -4
- package/dist/packages/recipes/src/controls/rich-text-input.module.css +1 -1
- package/dist/packages/recipes/src/structure/avatar.module.css +3 -1
- package/dist/packages/recipes/src/structure/heading.module.css +5 -4
- package/dist/packages/recipes/src/structure/hero.module.css +3 -1
- package/dist/packages/recipes/src/structure/stat.module.css +7 -0
- package/dist/packages/registry/src/card.js +4 -3
- package/dist/packages/registry/src/frameworks.js +28 -1
- package/dist/packages/registry/src/runtime-card.js +300 -0
- package/dist/packages/registry/src/runtime-members.js +176 -0
- package/dist/packages/registry/src/screen-table.js +166 -0
- package/dist/packages/rules/package.js +1 -1
- package/dist/packages/solid-ui/src/ai/ArtifactPane.tsx +11 -3
- package/dist/packages/solid-ui/src/ai/PromptInput.tsx +3 -1
- package/dist/packages/solid-ui/src/archetypes/Dashboard.tsx +3 -0
- package/dist/packages/solid-ui/src/archetypes/dashboard.states.tsx +39 -0
- package/dist/packages/solid-ui/src/controls/ColorInput.tsx +38 -17
- package/dist/packages/solid-ui/src/controls/Combobox.tsx +27 -6
- package/dist/packages/solid-ui/src/controls/DatePicker.tsx +12 -11
- package/dist/packages/solid-ui/src/controls/DateRangePicker.tsx +21 -16
- package/dist/packages/solid-ui/src/controls/DateRangePickerRangeCalendar.tsx +3 -4
- package/dist/packages/solid-ui/src/controls/FileUpload.tsx +1 -0
- package/dist/packages/solid-ui/src/controls/FileUploadRow.tsx +6 -0
- package/dist/packages/solid-ui/src/controls/MultiSelect.tsx +51 -11
- package/dist/packages/solid-ui/src/controls/NumberInput.tsx +21 -2
- package/dist/packages/solid-ui/src/controls/PhoneInput.tsx +8 -4
- package/dist/packages/solid-ui/src/controls/Select.tsx +37 -6
- package/dist/packages/solid-ui/src/controls/TagInput.tsx +26 -5
- package/dist/packages/solid-ui/src/controls/TimeInput.tsx +10 -1
- package/dist/packages/solid-ui/src/controls/select.states.tsx +18 -0
- package/dist/packages/solid-ui/src/overlays/Command.tsx +15 -2
- package/dist/packages/solid-ui/src/overlays/CommandPanel.tsx +7 -7
- package/dist/packages/solid-ui/src/overlays/ToastViewport.tsx +1 -1
- package/dist/packages/solid-ui/src/structure/CodeBlock.tsx +9 -5
- package/dist/packages/solid-ui/src/structure/Stat.tsx +86 -25
- package/dist/packages/solid-ui/src/structure/stat.states.tsx +73 -0
- package/dist/packages/svelte-ui/src/ai/ArtifactPane.svelte +8 -2
- package/dist/packages/svelte-ui/src/ai/PromptInput.svelte +3 -1
- package/dist/packages/svelte-ui/src/archetypes/Dashboard.svelte +3 -0
- package/dist/packages/svelte-ui/src/archetypes/dashboard.states.svelte +2 -0
- package/dist/packages/svelte-ui/src/controls/ColorInput.svelte +29 -8
- package/dist/packages/svelte-ui/src/controls/Combobox.svelte +26 -5
- package/dist/packages/svelte-ui/src/controls/DatePicker.svelte +7 -5
- package/dist/packages/svelte-ui/src/controls/DateRangePicker.svelte +15 -9
- package/dist/packages/svelte-ui/src/controls/DateRangePickerRangeCalendar.svelte +3 -2
- package/dist/packages/svelte-ui/src/controls/FileUpload.svelte +1 -0
- package/dist/packages/svelte-ui/src/controls/FileUploadRow.svelte +8 -1
- package/dist/packages/svelte-ui/src/controls/MultiSelect.svelte +36 -10
- package/dist/packages/svelte-ui/src/controls/NumberInput.svelte +14 -1
- package/dist/packages/svelte-ui/src/controls/PhoneInput.svelte +3 -3
- package/dist/packages/svelte-ui/src/controls/Select.svelte +20 -6
- package/dist/packages/svelte-ui/src/controls/TagInput.svelte +21 -3
- package/dist/packages/svelte-ui/src/controls/TimeInput.svelte +11 -1
- package/dist/packages/svelte-ui/src/controls/select.states.svelte +26 -24
- package/dist/packages/svelte-ui/src/overlays/Command.svelte +13 -1
- package/dist/packages/svelte-ui/src/overlays/CommandPanel.svelte +11 -6
- package/dist/packages/svelte-ui/src/overlays/ToastViewport.svelte +1 -1
- package/dist/packages/svelte-ui/src/structure/CodeBlock.svelte +7 -2
- package/dist/packages/svelte-ui/src/structure/Stat.svelte +70 -17
- package/dist/packages/svelte-ui/src/structure/stat.states.svelte +27 -0
- package/dist/packages/theme/src/admit.js +6 -3
- package/dist/packages/theme/src/color/resolve.js +19 -2
- package/dist/packages/theme/src/derive.js +13 -6
- package/dist/packages/theme/src/emit.js +1 -1
- package/dist/packages/theme/src/runtime.js +58 -0
- package/dist/packages/theme/src/seeds.js +30 -4
- package/dist/packages/theme/src/systems.js +1 -1
- package/dist/packages/theme/src/tokens.js +15 -6
- package/dist/packages/vue-ui/src/ai/ArtifactPane.vue +11 -2
- package/dist/packages/vue-ui/src/ai/PromptInput.vue +3 -1
- package/dist/packages/vue-ui/src/archetypes/Dashboard.vue +3 -0
- package/dist/packages/vue-ui/src/archetypes/dashboard.states.ts +49 -0
- package/dist/packages/vue-ui/src/controls/ColorInput.vue +33 -12
- package/dist/packages/vue-ui/src/controls/Combobox.vue +26 -5
- package/dist/packages/vue-ui/src/controls/DatePicker.vue +12 -11
- package/dist/packages/vue-ui/src/controls/DateRangePicker.vue +20 -15
- package/dist/packages/vue-ui/src/controls/DateRangePickerRangeCalendar.vue +3 -4
- package/dist/packages/vue-ui/src/controls/FileUpload.vue +1 -0
- package/dist/packages/vue-ui/src/controls/FileUploadRow.vue +6 -0
- package/dist/packages/vue-ui/src/controls/MultiSelect.vue +37 -10
- package/dist/packages/vue-ui/src/controls/NumberInput.vue +17 -1
- package/dist/packages/vue-ui/src/controls/PhoneInput.vue +7 -3
- package/dist/packages/vue-ui/src/controls/Select.vue +22 -7
- package/dist/packages/vue-ui/src/controls/TagInput.vue +21 -3
- package/dist/packages/vue-ui/src/controls/TimeInput.vue +10 -1
- package/dist/packages/vue-ui/src/controls/select.states.ts +17 -0
- package/dist/packages/vue-ui/src/overlays/Command.vue +13 -1
- package/dist/packages/vue-ui/src/overlays/CommandPanel.vue +7 -7
- package/dist/packages/vue-ui/src/overlays/ToastViewport.vue +1 -1
- package/dist/packages/vue-ui/src/structure/CodeBlock.vue +7 -2
- package/dist/packages/vue-ui/src/structure/Stat.vue +71 -18
- package/dist/packages/vue-ui/src/structure/stat.states.ts +67 -0
- package/dist/platforms/android/ui/src/generated/kotlin/dev/polymorph/ui/Contracts.kt +144 -33
- package/dist/platforms/android/ui/src/generated/kotlin/dev/polymorph/ui/Members.kt +17 -7
- package/dist/platforms/ios/Sources/PolymorphUI/Generated/Contracts.swift +204 -31
- package/dist/registry/registry.json +371 -75
- package/dist/screen/assets/{screen-CuQbskb8.css → screen-B22PTPwF.css} +1 -1
- package/dist/screen/assets/screen-Cpbh7XMb.js +372 -0
- package/dist/screen/screen.html +3 -3
- package/package.json +1 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/ArtifactPane-DsmRlr6d.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/CodeBlock-BqP8HZKM.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/CodeBlock-D8VARz0a.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/ColorInput-BrzZOVeL.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/Combobox-BiUq0h-w.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/Command-hmxVRdFg.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/DatePicker-C8prGbJ2.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/DateRangePicker-CO1ioqwN.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/FileUpload-HPQe-ttb.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/ModeSwitch-CerqbGv3.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/MultiSelect-CQq7jPgI.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/NumberInput-Dre9GwBy.js +0 -7
- package/dist/packages/elements-ui/dist/cdn/chunks/PhoneInput-D6_J6Es_.js +0 -210
- package/dist/packages/elements-ui/dist/cdn/chunks/PromptInput-BXcsUQ5W.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/Select-DxGQgv2q.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/Stat-FsMUWigK.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/Stat-WS8v6BQv.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/TagInput-D-uIQEGS.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/TimeInput-Dho571vA.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/agent-DBDk4wLH.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/api-B9sGZiYn.js +0 -4
- package/dist/packages/elements-ui/dist/cdn/chunks/avatar.module-CQwnWhWo.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/cap-Ct4k7zNC.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/chart-brush.module-DycBfben.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/chart-twin.module-Cks7VwS5.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/check-dOfCSYFA.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/draw-DclRgiWM.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/drawing-DjkZr0z8.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/frame-BSvl4y47.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/on-call-Jk1sYJc_.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/receivers-BpRfF6dV.js +0 -4
- package/dist/packages/elements-ui/dist/cdn/chunks/series-C_1TNd2n.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/src-Bub3C9YP.js +0 -67
- package/dist/packages/elements-ui/dist/cdn/chunks/toast-AarMGYJn.js +0 -1
- package/dist/packages/elements-ui/dist/cdn/chunks/webmcp-eEPzSqph.js +0 -1
- package/dist/screen/assets/screen-Clj2u6_s.js +0 -372
|
@@ -637,5 +637,54 @@ export const states: ComponentStates = {
|
|
|
637
637
|
},
|
|
638
638
|
),
|
|
639
639
|
},
|
|
640
|
+
{
|
|
641
|
+
name: 'the numbers loading — each card keeps its label and its height',
|
|
642
|
+
render: (overrides = {}) =>
|
|
643
|
+
h(
|
|
644
|
+
Dashboard,
|
|
645
|
+
{
|
|
646
|
+
title: 'Overview',
|
|
647
|
+
stats: [
|
|
648
|
+
{
|
|
649
|
+
label: 'Open tickets',
|
|
650
|
+
value: '128',
|
|
651
|
+
delta: { value: '8%', direction: 'down', positive: true },
|
|
652
|
+
spark: [141, 138, 144, 136, 132, 135, 129, 131, 126, 128],
|
|
653
|
+
loading: true,
|
|
654
|
+
},
|
|
655
|
+
{ label: 'First response', value: '14m', icon: 'time', loading: true },
|
|
656
|
+
{
|
|
657
|
+
label: 'Satisfaction',
|
|
658
|
+
value: '91%',
|
|
659
|
+
delta: { value: '3pts', direction: 'down' },
|
|
660
|
+
loading: true,
|
|
661
|
+
},
|
|
662
|
+
],
|
|
663
|
+
...overrides,
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
primary: () => [
|
|
667
|
+
h(
|
|
668
|
+
DashboardPanel,
|
|
669
|
+
{ title: 'Ticket volume' },
|
|
670
|
+
{
|
|
671
|
+
default: () => [
|
|
672
|
+
h(LineChart, {
|
|
673
|
+
data: [],
|
|
674
|
+
loading: true,
|
|
675
|
+
series: [
|
|
676
|
+
{ key: 'opened', label: 'Opened' },
|
|
677
|
+
{ key: 'resolved', label: 'Resolved' },
|
|
678
|
+
],
|
|
679
|
+
x: { key: 'day', scale: 'time', label: 'Day' },
|
|
680
|
+
label: 'Tickets opened and resolved by day',
|
|
681
|
+
}),
|
|
682
|
+
],
|
|
683
|
+
},
|
|
684
|
+
),
|
|
685
|
+
],
|
|
686
|
+
},
|
|
687
|
+
),
|
|
688
|
+
},
|
|
640
689
|
],
|
|
641
690
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
/**
|
|
3
|
-
* A colour field
|
|
3
|
+
* A colour field with a hex entry and a picker (`design/components/color-input.md`).
|
|
4
4
|
*
|
|
5
5
|
* Generated by `pnpm shells` from `packages/shells/src/members/color-input.ts`, the member's
|
|
6
6
|
* framework-neutral description. Never edit it by hand: change the description and
|
|
@@ -23,6 +23,14 @@ import a11y from '@polymorph/recipes/conventions/a11y.module.css'
|
|
|
23
23
|
import Input from './Input.vue'
|
|
24
24
|
import Popover from '../overlays/Popover.vue'
|
|
25
25
|
|
|
26
|
+
export interface ColorInputMessages {
|
|
27
|
+
plane?: string
|
|
28
|
+
planeValue?: (saturation: number, brightness: number) => string
|
|
29
|
+
hue?: string
|
|
30
|
+
alpha?: string
|
|
31
|
+
railValue?: (name: string, value: number) => string
|
|
32
|
+
}
|
|
33
|
+
|
|
26
34
|
export interface ColorInputProps {
|
|
27
35
|
/**
|
|
28
36
|
* Enables the alpha channel: the alpha rail, the eight-digit hex and the checker.
|
|
@@ -43,6 +51,10 @@ export interface ColorInputProps {
|
|
|
43
51
|
disabled?: boolean
|
|
44
52
|
id?: string
|
|
45
53
|
invalid?: boolean
|
|
54
|
+
/**
|
|
55
|
+
* The picker's sliders' names and value texts in the host's words.
|
|
56
|
+
*/
|
|
57
|
+
messages?: ColorInputMessages
|
|
46
58
|
/**
|
|
47
59
|
* Serializes the hex through a hidden input.
|
|
48
60
|
*/
|
|
@@ -77,6 +89,15 @@ const mirror = ref(null as string | null)
|
|
|
77
89
|
const draft = ref(null as string | null)
|
|
78
90
|
const hexField = useTemplateRef<HTMLElement>('hexField')
|
|
79
91
|
const root = useTemplateRef<HTMLElement>('root')
|
|
92
|
+
const say = computed(() => ({
|
|
93
|
+
plane: 'saturation and brightness',
|
|
94
|
+
planeValue: (saturation: number, brightness: number) =>
|
|
95
|
+
`saturation ${saturation}, brightness ${brightness}`,
|
|
96
|
+
hue: 'hue',
|
|
97
|
+
alpha: 'alpha',
|
|
98
|
+
railValue: (name: string, value: number) => `${name} ${value}`,
|
|
99
|
+
...props.messages,
|
|
100
|
+
}))
|
|
80
101
|
const parseHex = computed(
|
|
81
102
|
() => (text: string) =>
|
|
82
103
|
((bare: string) =>
|
|
@@ -235,9 +256,13 @@ onBeforeUnmount(() => release1?.())
|
|
|
235
256
|
:step="color.getChannelRange('saturation').step"
|
|
236
257
|
:value="color.getChannelValue('saturation')"
|
|
237
258
|
:disabled="disabled"
|
|
238
|
-
:aria-label="
|
|
239
|
-
aria-
|
|
240
|
-
|
|
259
|
+
:aria-label="say.plane"
|
|
260
|
+
:aria-valuetext="
|
|
261
|
+
say.planeValue(
|
|
262
|
+
color.getChannelValue('saturation'),
|
|
263
|
+
color.getChannelValue('brightness'),
|
|
264
|
+
)
|
|
265
|
+
"
|
|
241
266
|
@input="fromRange('saturation', $event)"
|
|
242
267
|
/>
|
|
243
268
|
<input
|
|
@@ -288,10 +313,8 @@ onBeforeUnmount(() => release1?.())
|
|
|
288
313
|
:step="color.getChannelRange('hue').step"
|
|
289
314
|
:value="color.getChannelValue('hue')"
|
|
290
315
|
:disabled="disabled"
|
|
291
|
-
:aria-label="
|
|
292
|
-
:aria-valuetext="
|
|
293
|
-
api.getChannelSliderThumbProps({ channel: 'hue' })['aria-valuetext']
|
|
294
|
-
"
|
|
316
|
+
:aria-label="say.hue"
|
|
317
|
+
:aria-valuetext="say.railValue(say.hue, color.getChannelValue('hue'))"
|
|
295
318
|
@input="fromRange('hue', $event)"
|
|
296
319
|
/>
|
|
297
320
|
</span>
|
|
@@ -331,10 +354,8 @@ onBeforeUnmount(() => release1?.())
|
|
|
331
354
|
:step="color.getChannelRange('alpha').step"
|
|
332
355
|
:value="color.getChannelValue('alpha')"
|
|
333
356
|
:disabled="disabled"
|
|
334
|
-
:aria-label="
|
|
335
|
-
:aria-valuetext="
|
|
336
|
-
api.getChannelSliderThumbProps({ channel: 'alpha' })['aria-valuetext']
|
|
337
|
-
"
|
|
357
|
+
:aria-label="say.alpha"
|
|
358
|
+
:aria-valuetext="say.railValue(say.alpha, color.getChannelValue('alpha'))"
|
|
338
359
|
@input="fromRange('alpha', $event)"
|
|
339
360
|
/>
|
|
340
361
|
</span>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Filtered single choice (`design/components/combobox.md`).
|
|
4
4
|
*
|
|
5
5
|
* Generated by `pnpm shells` from `packages/shells/src/members/combobox.ts`, the member's
|
|
6
6
|
* framework-neutral description. Never edit it by hand: change the description and
|
|
@@ -31,6 +31,7 @@ export interface ComboboxMessages {
|
|
|
31
31
|
clear?: string
|
|
32
32
|
loadingOptions?: string
|
|
33
33
|
options?: (count: number) => string
|
|
34
|
+
list?: string
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
export interface ComboboxProps {
|
|
@@ -139,7 +140,8 @@ const say = computed(() => ({
|
|
|
139
140
|
showOptions: 'Show options',
|
|
140
141
|
clear: 'Clear',
|
|
141
142
|
loadingOptions: 'Loading options…',
|
|
142
|
-
options: (count: number) => `${count} options
|
|
143
|
+
options: (count: number) => (count === 1 ? '1 option' : `${count} options`),
|
|
144
|
+
list: 'Suggestions',
|
|
143
145
|
...props.messages,
|
|
144
146
|
}))
|
|
145
147
|
const collator = computed(
|
|
@@ -175,7 +177,26 @@ const requestMore = computed(
|
|
|
175
177
|
const emitBlur = computed(() => (event: FocusEvent) => setTimeout(() => emit('blur', event)))
|
|
176
178
|
const documentDirection = useDirection(() => input.value)
|
|
177
179
|
const service = useMachine(
|
|
178
|
-
|
|
180
|
+
{
|
|
181
|
+
...zag.machine,
|
|
182
|
+
implementations: {
|
|
183
|
+
...zag.machine.implementations,
|
|
184
|
+
actions: {
|
|
185
|
+
...zag.machine.implementations?.actions,
|
|
186
|
+
announceHighlightedItem: (params) =>
|
|
187
|
+
zag.machine.implementations?.actions?.announceHighlightedItem?.({
|
|
188
|
+
...params,
|
|
189
|
+
context: {
|
|
190
|
+
...params.context,
|
|
191
|
+
get: ((name: string) =>
|
|
192
|
+
name === 'value'
|
|
193
|
+
? []
|
|
194
|
+
: params.context.get(name as never)) as typeof params.context.get,
|
|
195
|
+
},
|
|
196
|
+
}),
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
} as typeof zag.machine,
|
|
179
200
|
computed(() => ({
|
|
180
201
|
id: uid,
|
|
181
202
|
dir: documentDirection.value,
|
|
@@ -385,7 +406,7 @@ onBeforeUnmount(() => release3?.())
|
|
|
385
406
|
v-bind="api.getContentProps()"
|
|
386
407
|
:class="styles.listbox"
|
|
387
408
|
:hidden="undefined"
|
|
388
|
-
aria-label="
|
|
409
|
+
:aria-label="say.list"
|
|
389
410
|
:aria-labelledby="
|
|
390
411
|
ariaLabelledby === undefined
|
|
391
412
|
? undefined
|
|
@@ -446,7 +467,7 @@ onBeforeUnmount(() => release3?.())
|
|
|
446
467
|
v-bind="api.getContentProps()"
|
|
447
468
|
:class="styles.listbox"
|
|
448
469
|
:hidden="undefined"
|
|
449
|
-
aria-label="
|
|
470
|
+
:aria-label="say.list"
|
|
450
471
|
:aria-labelledby="
|
|
451
472
|
ariaLabelledby === undefined
|
|
452
473
|
? undefined
|
|
@@ -41,6 +41,7 @@ export type DatePickerMessages = CalendarMessages & {
|
|
|
41
41
|
showCalendar: string
|
|
42
42
|
clear: string
|
|
43
43
|
chooseDate: string
|
|
44
|
+
empty?: string
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
export interface DatePickerProps {
|
|
@@ -133,16 +134,16 @@ const panel = useTemplateRef<HTMLElement>('panel')
|
|
|
133
134
|
const scrim = useTemplateRef<HTMLElement>('scrim')
|
|
134
135
|
const sheetPanel = useTemplateRef<HTMLElement>('sheetPanel')
|
|
135
136
|
const phone = useMediaQuery('phone')
|
|
136
|
-
const say = computed(
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
)
|
|
137
|
+
const say = computed(() => ({
|
|
138
|
+
empty: 'Empty',
|
|
139
|
+
...(props.messages ?? {
|
|
140
|
+
previousMonth: 'Previous month',
|
|
141
|
+
nextMonth: 'Next month',
|
|
142
|
+
showCalendar: 'Show calendar',
|
|
143
|
+
clear: 'Clear',
|
|
144
|
+
chooseDate: 'Choose a date',
|
|
145
|
+
}),
|
|
146
|
+
}))
|
|
146
147
|
const language = computed(() => props.locale ?? browserLanguage.value ?? 'en-US')
|
|
147
148
|
const sheeting = computed(() => props.presentation === 'auto' && phone.value)
|
|
148
149
|
const fieldOptions = computed(() => ({
|
|
@@ -416,7 +417,7 @@ onBeforeUnmount(() => release4?.())
|
|
|
416
417
|
:aria-valuenow="segment.placeholder ? undefined : segment.value"
|
|
417
418
|
:aria-valuemin="segment.min"
|
|
418
419
|
:aria-valuemax="segment.max"
|
|
419
|
-
:aria-valuetext="segment.placeholder ?
|
|
420
|
+
:aria-valuetext="segment.placeholder ? say.empty : segment.text"
|
|
420
421
|
:aria-required="ariaRequired ? 'true' : undefined"
|
|
421
422
|
:aria-disabled="disabled ? 'true' : undefined"
|
|
422
423
|
:aria-invalid="fieldInvalid ? 'true' : undefined"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
/**
|
|
3
|
-
* A date range *field
|
|
3
|
+
* A date range *field*: two segmented dates and a calendar popup (`design/components/date-range-picker.md`).
|
|
4
4
|
*
|
|
5
5
|
* Generated by `pnpm shells` from `packages/shells/src/members/date-range-picker.ts`, the member's
|
|
6
6
|
* framework-neutral description. Never edit it by hand: change the description and
|
|
@@ -45,6 +45,9 @@ export type DateRangePickerMessages = CalendarMessages & {
|
|
|
45
45
|
showCalendar: string
|
|
46
46
|
clear: string
|
|
47
47
|
chooseRange: string
|
|
48
|
+
empty?: string
|
|
49
|
+
start?: string
|
|
50
|
+
end?: string
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
export interface DateRangePickerProps {
|
|
@@ -148,16 +151,18 @@ const panel = useTemplateRef<HTMLElement>('panel')
|
|
|
148
151
|
const scrim = useTemplateRef<HTMLElement>('scrim')
|
|
149
152
|
const sheetPanel = useTemplateRef<HTMLElement>('sheetPanel')
|
|
150
153
|
const phone = useMediaQuery('phone')
|
|
151
|
-
const say = computed(
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
154
|
+
const say = computed(() => ({
|
|
155
|
+
empty: 'Empty',
|
|
156
|
+
start: 'Start date',
|
|
157
|
+
end: 'End date',
|
|
158
|
+
...(props.messages ?? {
|
|
159
|
+
previousMonth: 'Previous month',
|
|
160
|
+
nextMonth: 'Next month',
|
|
161
|
+
showCalendar: 'Show calendar',
|
|
162
|
+
clear: 'Clear',
|
|
163
|
+
chooseRange: 'Choose a date range',
|
|
164
|
+
}),
|
|
165
|
+
}))
|
|
161
166
|
const language = computed(() => props.locale ?? browserLanguage.value ?? 'en-US')
|
|
162
167
|
const sheeting = computed(() => props.presentation === 'auto' && phone.value)
|
|
163
168
|
const fieldOptions = computed(() => ({
|
|
@@ -523,7 +528,7 @@ onBeforeUnmount(() => release4?.())
|
|
|
523
528
|
:class="styles.segment"
|
|
524
529
|
role="spinbutton"
|
|
525
530
|
:id="`${uid}-start-${segment.type}`"
|
|
526
|
-
:aria-label="`${
|
|
531
|
+
:aria-label="`${say.start}, ${segmentName(segment.type)}`"
|
|
527
532
|
:aria-labelledby="
|
|
528
533
|
ariaLabelledby ? `${ariaLabelledby} ${uid}-start-${segment.type}` : undefined
|
|
529
534
|
"
|
|
@@ -531,7 +536,7 @@ onBeforeUnmount(() => release4?.())
|
|
|
531
536
|
:aria-valuenow="segment.placeholder ? undefined : segment.value"
|
|
532
537
|
:aria-valuemin="segment.min"
|
|
533
538
|
:aria-valuemax="segment.max"
|
|
534
|
-
:aria-valuetext="segment.placeholder ?
|
|
539
|
+
:aria-valuetext="segment.placeholder ? say.empty : segment.text"
|
|
535
540
|
:aria-required="ariaRequired ? 'true' : undefined"
|
|
536
541
|
:aria-disabled="disabled ? 'true' : undefined"
|
|
537
542
|
:aria-invalid="fieldInvalid ? 'true' : undefined"
|
|
@@ -565,7 +570,7 @@ onBeforeUnmount(() => release4?.())
|
|
|
565
570
|
:class="styles.segment"
|
|
566
571
|
role="spinbutton"
|
|
567
572
|
:id="`${uid}-end-${segment.type}`"
|
|
568
|
-
:aria-label="`${
|
|
573
|
+
:aria-label="`${say.end}, ${segmentName(segment.type)}`"
|
|
569
574
|
:aria-labelledby="
|
|
570
575
|
ariaLabelledby ? `${ariaLabelledby} ${uid}-end-${segment.type}` : undefined
|
|
571
576
|
"
|
|
@@ -573,7 +578,7 @@ onBeforeUnmount(() => release4?.())
|
|
|
573
578
|
:aria-valuenow="segment.placeholder ? undefined : segment.value"
|
|
574
579
|
:aria-valuemin="segment.min"
|
|
575
580
|
:aria-valuemax="segment.max"
|
|
576
|
-
:aria-valuetext="segment.placeholder ?
|
|
581
|
+
:aria-valuetext="segment.placeholder ? say.empty : segment.text"
|
|
577
582
|
:aria-required="ariaRequired ? 'true' : undefined"
|
|
578
583
|
:aria-disabled="disabled ? 'true' : undefined"
|
|
579
584
|
:aria-invalid="fieldInvalid ? 'true' : undefined"
|
|
@@ -103,9 +103,8 @@ const service = useMachine(
|
|
|
103
103
|
})),
|
|
104
104
|
)
|
|
105
105
|
const api = computed(() => zag.connect(service, normalizeProps))
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
)
|
|
106
|
+
const title = computed(() => api.value.visibleRangeText.start)
|
|
107
|
+
const named = computed(() => [props.label, title.value].filter(Boolean).join(', '))
|
|
109
108
|
const previewing = computed(
|
|
110
109
|
() =>
|
|
111
110
|
api.value.value.length === 1 &&
|
|
@@ -182,7 +181,7 @@ watch(() => api.value.value.length, effect2, { flush: 'post' })
|
|
|
182
181
|
/>
|
|
183
182
|
<!-- title -->
|
|
184
183
|
<span :class="styles.title" aria-live="polite">
|
|
185
|
-
{{
|
|
184
|
+
{{ title }}
|
|
186
185
|
</span>
|
|
187
186
|
<Button
|
|
188
187
|
variant="ghost"
|
|
@@ -280,6 +280,7 @@ onBeforeUnmount(() => release2?.())
|
|
|
280
280
|
:open="row.open"
|
|
281
281
|
:size="row.item.size === undefined ? undefined : messages.formatSize(row.item.size)"
|
|
282
282
|
:retryable="listening.retry === true"
|
|
283
|
+
:disabled="disabled"
|
|
283
284
|
:retryLabel="messages.retry"
|
|
284
285
|
:removeLabel="messages.remove(row.item.name)"
|
|
285
286
|
:progressLabel="messages.progress(row.item.name)"
|
|
@@ -29,6 +29,10 @@ export interface FileUploadRowProps {
|
|
|
29
29
|
* The app handles a retry, so a failed row offers one.
|
|
30
30
|
*/
|
|
31
31
|
retryable: boolean
|
|
32
|
+
/**
|
|
33
|
+
* The field is disabled, and the row’s controls with it.
|
|
34
|
+
*/
|
|
35
|
+
disabled: boolean
|
|
32
36
|
retryLabel: string
|
|
33
37
|
removeLabel: string
|
|
34
38
|
progressLabel: string
|
|
@@ -90,6 +94,7 @@ watch(() => present.value, effect1, { flush: 'post' })
|
|
|
90
94
|
:iconOnly="true"
|
|
91
95
|
icon="refresh"
|
|
92
96
|
:label="retryLabel"
|
|
97
|
+
:disabled="disabled"
|
|
93
98
|
@click="emit('retry')"
|
|
94
99
|
/>
|
|
95
100
|
<Button
|
|
@@ -99,6 +104,7 @@ watch(() => present.value, effect1, { flush: 'post' })
|
|
|
99
104
|
:iconOnly="true"
|
|
100
105
|
icon="close"
|
|
101
106
|
:label="removeLabel"
|
|
107
|
+
:disabled="disabled"
|
|
102
108
|
@click="emit('remove')"
|
|
103
109
|
/>
|
|
104
110
|
</li>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Filtered multiple choice (`design/components/multi-select.md`).
|
|
4
4
|
*
|
|
5
5
|
* Generated by `pnpm shells` from `packages/shells/src/members/multi-select.ts`, the member's
|
|
6
6
|
* framework-neutral description. Never edit it by hand: change the description and
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
afterRender,
|
|
26
26
|
agentMember,
|
|
27
27
|
composingKey,
|
|
28
|
+
fieldLabelIds,
|
|
28
29
|
holdFieldEscape,
|
|
29
30
|
lineStartKey,
|
|
30
31
|
useDirection,
|
|
@@ -172,6 +173,7 @@ const refused = ref(false)
|
|
|
172
173
|
const announcement = ref('')
|
|
173
174
|
const loadMoreAt = ref(-1)
|
|
174
175
|
const settled = ref(false)
|
|
176
|
+
const fieldLabels = ref(undefined as string | undefined)
|
|
175
177
|
const chipList = useTemplateRef<HTMLElement>('chipList')
|
|
176
178
|
const frame = useTemplateRef<HTMLElement>('frame')
|
|
177
179
|
const list = useTemplateRef<HTMLElement>('list')
|
|
@@ -194,10 +196,11 @@ const say = computed(() => ({
|
|
|
194
196
|
showOptions: 'Show options',
|
|
195
197
|
remove: (label: string) => `Remove ${label}`,
|
|
196
198
|
loadingOptions: 'Loading options…',
|
|
197
|
-
options: (count: number) => `${count} options
|
|
199
|
+
options: (count: number) => (count === 1 ? '1 option' : `${count} options`),
|
|
198
200
|
...props.messages,
|
|
199
201
|
}))
|
|
200
202
|
const atMax = computed(() => props.max !== undefined && values.value.length >= props.max)
|
|
203
|
+
const unnamed = computed(() => props.ariaLabel === undefined && props.ariaLabelledby === undefined)
|
|
201
204
|
const countId = computed(() => `${uid}-count`)
|
|
202
205
|
const labels = computed(
|
|
203
206
|
() => new Map(props.options.map((option) => [option.value, option.label] as const)),
|
|
@@ -297,7 +300,26 @@ const removeButton = computed(
|
|
|
297
300
|
)
|
|
298
301
|
const documentDirection = useDirection(() => frame.value)
|
|
299
302
|
const service = useMachine(
|
|
300
|
-
|
|
303
|
+
{
|
|
304
|
+
...zag.machine,
|
|
305
|
+
implementations: {
|
|
306
|
+
...zag.machine.implementations,
|
|
307
|
+
actions: {
|
|
308
|
+
...zag.machine.implementations?.actions,
|
|
309
|
+
announceHighlightedItem: (params) =>
|
|
310
|
+
zag.machine.implementations?.actions?.announceHighlightedItem?.({
|
|
311
|
+
...params,
|
|
312
|
+
context: {
|
|
313
|
+
...params.context,
|
|
314
|
+
get: ((name: string) =>
|
|
315
|
+
name === 'value'
|
|
316
|
+
? []
|
|
317
|
+
: params.context.get(name as never)) as typeof params.context.get,
|
|
318
|
+
},
|
|
319
|
+
}),
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
} as typeof zag.machine,
|
|
301
323
|
computed(() => ({
|
|
302
324
|
id: uid,
|
|
303
325
|
dir: documentDirection.value,
|
|
@@ -551,9 +573,14 @@ const effect5 = () => {
|
|
|
551
573
|
}
|
|
552
574
|
onMounted(effect5)
|
|
553
575
|
watch(() => api.value.highlightedValue, effect5, { flush: 'post' })
|
|
554
|
-
let release6: (() => void) | undefined
|
|
555
576
|
const effect6 = () => {
|
|
556
|
-
|
|
577
|
+
api.value.open && unnamed.value && (fieldLabels.value = fieldLabelIds(textField.value, uid))
|
|
578
|
+
}
|
|
579
|
+
onMounted(effect6)
|
|
580
|
+
watch(() => api.value.open && unnamed.value, effect6, { flush: 'post' })
|
|
581
|
+
let release7: (() => void) | undefined
|
|
582
|
+
const effect7 = () => {
|
|
583
|
+
release7?.()
|
|
557
584
|
const ran = agentMember({
|
|
558
585
|
member: 'MultiSelect',
|
|
559
586
|
element: () => textField.value,
|
|
@@ -604,12 +631,12 @@ const effect6 = () => {
|
|
|
604
631
|
close: () => api.value.setOpen(false),
|
|
605
632
|
},
|
|
606
633
|
})
|
|
607
|
-
|
|
634
|
+
release7 = () => {
|
|
608
635
|
ran()
|
|
609
636
|
}
|
|
610
637
|
}
|
|
611
|
-
onMounted(
|
|
612
|
-
onBeforeUnmount(() =>
|
|
638
|
+
onMounted(effect7)
|
|
639
|
+
onBeforeUnmount(() => release7?.())
|
|
613
640
|
</script>
|
|
614
641
|
|
|
615
642
|
<template>
|
|
@@ -713,7 +740,7 @@ onBeforeUnmount(() => release6?.())
|
|
|
713
740
|
:class="styles.listbox"
|
|
714
741
|
:hidden="undefined"
|
|
715
742
|
:aria-label="ariaLabelledby === undefined ? ariaLabel : undefined"
|
|
716
|
-
:aria-labelledby="ariaLabelledby"
|
|
743
|
+
:aria-labelledby="unnamed ? fieldLabels : ariaLabelledby"
|
|
717
744
|
@scroll="
|
|
718
745
|
(list?.scrollHeight ?? 0) - (list?.scrollTop ?? 0) - (list?.clientHeight ?? 0) <= 32 &&
|
|
719
746
|
requestMore()
|
|
@@ -784,7 +811,7 @@ onBeforeUnmount(() => release6?.())
|
|
|
784
811
|
:class="styles.listbox"
|
|
785
812
|
:hidden="undefined"
|
|
786
813
|
:aria-label="ariaLabelledby === undefined ? ariaLabel : undefined"
|
|
787
|
-
:aria-labelledby="ariaLabelledby"
|
|
814
|
+
:aria-labelledby="unnamed ? fieldLabels : ariaLabelledby"
|
|
788
815
|
@scroll="
|
|
789
816
|
(list?.scrollHeight ?? 0) - (list?.scrollTop ?? 0) - (list?.clientHeight ?? 0) <=
|
|
790
817
|
32 && requestMore()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
/**
|
|
3
|
-
* A field that
|
|
3
|
+
* A number field that formats and steps (`design/components/number-input.md`).
|
|
4
4
|
*
|
|
5
5
|
* Generated by `pnpm shells` from `packages/shells/src/members/number-input.ts`, the member's
|
|
6
6
|
* framework-neutral description. Never edit it by hand: change the description and
|
|
@@ -20,6 +20,11 @@ export interface NumberFormat {
|
|
|
20
20
|
maximumFractionDigits?: number
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
export interface NumberInputMessages {
|
|
24
|
+
increment?: string
|
|
25
|
+
decrement?: string
|
|
26
|
+
}
|
|
27
|
+
|
|
23
28
|
export interface NumberInputProps {
|
|
24
29
|
ariaDescribedby?: string
|
|
25
30
|
/**
|
|
@@ -39,6 +44,10 @@ export interface NumberInputProps {
|
|
|
39
44
|
id?: string
|
|
40
45
|
invalid?: boolean
|
|
41
46
|
max?: number
|
|
47
|
+
/**
|
|
48
|
+
* The steppers' names in the host's words.
|
|
49
|
+
*/
|
|
50
|
+
messages?: NumberInputMessages
|
|
42
51
|
/**
|
|
43
52
|
* Typed values are clamped at commit. The steppers snap to the step and stop at the limits.
|
|
44
53
|
*/
|
|
@@ -84,6 +93,11 @@ const uid = useId()
|
|
|
84
93
|
const committed = ref(props.value === undefined ? (props.defaultValue ?? null) : props.value)
|
|
85
94
|
const draft = ref('')
|
|
86
95
|
const control = useTemplateRef<HTMLElement>('control')
|
|
96
|
+
const say = computed(() => ({
|
|
97
|
+
increment: 'increment value',
|
|
98
|
+
decrement: 'decrease value',
|
|
99
|
+
...props.messages,
|
|
100
|
+
}))
|
|
87
101
|
const documentDirection = useDirection(() => control.value)
|
|
88
102
|
const service = useMachine(
|
|
89
103
|
zag.machine,
|
|
@@ -106,6 +120,7 @@ const service = useMachine(
|
|
|
106
120
|
required: props.ariaRequired,
|
|
107
121
|
allowMouseWheel: false,
|
|
108
122
|
ids: props.id === undefined ? undefined : { input: props.id },
|
|
123
|
+
translations: { incrementLabel: say.value.increment, decrementLabel: say.value.decrement },
|
|
109
124
|
onValueChange: (details) => {
|
|
110
125
|
service.event.current().type === 'INPUT.CHANGE'
|
|
111
126
|
? (draft.value = details.value)
|
|
@@ -210,6 +225,7 @@ onBeforeUnmount(() => release2?.())
|
|
|
210
225
|
:name="undefined"
|
|
211
226
|
:placeholder="placeholder"
|
|
212
227
|
:role="undefined"
|
|
228
|
+
:aria-roledescription="undefined"
|
|
213
229
|
:aria-valuemin="undefined"
|
|
214
230
|
:aria-valuemax="undefined"
|
|
215
231
|
:aria-valuenow="undefined"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
/**
|
|
3
|
-
* A phone number
|
|
3
|
+
* A phone number as one E.164 string (`design/components/phone-input.md`).
|
|
4
4
|
*
|
|
5
5
|
* Generated by `pnpm shells` from `packages/shells/src/members/phone-input.ts`, the member's
|
|
6
6
|
* framework-neutral description. Never edit it by hand: change the description and
|
|
@@ -106,7 +106,7 @@ const language = computed(() => props.locale ?? browserLanguage.value ?? 'en-US'
|
|
|
106
106
|
const say = computed(() => ({
|
|
107
107
|
country: 'Country calling code',
|
|
108
108
|
showCountries: 'Show countries',
|
|
109
|
-
countriesShown: (count: number) => `${count} countries
|
|
109
|
+
countriesShown: (count: number) => (count === 1 ? '1 country' : `${count} countries`),
|
|
110
110
|
noCountry: 'No matching country',
|
|
111
111
|
...props.messages,
|
|
112
112
|
}))
|
|
@@ -271,7 +271,11 @@ onBeforeUnmount(() => release4?.())
|
|
|
271
271
|
:invalid="invalid"
|
|
272
272
|
:disabled="disabled"
|
|
273
273
|
:id="countryId"
|
|
274
|
-
:messages="{
|
|
274
|
+
:messages="{
|
|
275
|
+
showOptions: say.showCountries,
|
|
276
|
+
options: say.countriesShown,
|
|
277
|
+
list: say.country,
|
|
278
|
+
}"
|
|
275
279
|
:emptyMessage="say.noCountry"
|
|
276
280
|
:aria-label="say.country"
|
|
277
281
|
:aria-labelledby="countryLabelledby"
|