@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A colour field
|
|
2
|
+
* A colour field with a hex entry and a picker (`design/components/color-input.md`).
|
|
3
3
|
*
|
|
4
4
|
* Generated by `pnpm shells` from `packages/shells/src/members/color-input.ts`, the member's
|
|
5
5
|
* framework-neutral description. Never edit it by hand: change the description and
|
|
@@ -39,7 +39,15 @@ import a11y from '@polymorph/recipes/conventions/a11y.module.css'
|
|
|
39
39
|
import { Input, type InputProps } from './Input'
|
|
40
40
|
import { Popover, type PopoverProps } from '../overlays/Popover'
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
export interface ColorInputMessages {
|
|
43
|
+
plane?: string
|
|
44
|
+
planeValue?: (saturation: number, brightness: number) => string
|
|
45
|
+
hue?: string
|
|
46
|
+
alpha?: string
|
|
47
|
+
railValue?: (name: string, value: number) => string
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** A colour field with a hex entry and a picker: the inputs it takes, by the React member's prop names. */
|
|
43
51
|
export interface ColorInputProps {
|
|
44
52
|
/**
|
|
45
53
|
* Enables the alpha channel: the alpha rail, the eight-digit hex and the checker.
|
|
@@ -60,6 +68,10 @@ export interface ColorInputProps {
|
|
|
60
68
|
disabled?: boolean
|
|
61
69
|
id?: string
|
|
62
70
|
invalid?: boolean
|
|
71
|
+
/**
|
|
72
|
+
* The picker's sliders' names and value texts in the host's words.
|
|
73
|
+
*/
|
|
74
|
+
messages?: ColorInputMessages
|
|
63
75
|
/**
|
|
64
76
|
* Serializes the hex through a hidden input.
|
|
65
77
|
*/
|
|
@@ -75,7 +87,7 @@ export interface ColorInputProps {
|
|
|
75
87
|
value?: string
|
|
76
88
|
}
|
|
77
89
|
|
|
78
|
-
/** A colour field
|
|
90
|
+
/** A colour field with a hex entry and a picker. */
|
|
79
91
|
@Component({
|
|
80
92
|
selector: 'pm-color-input',
|
|
81
93
|
encapsulation: ViewEncapsulation.None,
|
|
@@ -117,23 +129,22 @@ type="button"
|
|
|
117
129
|
[pmSpread]="e15()"
|
|
118
130
|
><input
|
|
119
131
|
[attr.class]="e16()"
|
|
132
|
+
[min]="e17()"
|
|
133
|
+
[max]="e18()"
|
|
134
|
+
[step]="e19()"
|
|
120
135
|
type="range"
|
|
121
|
-
[attr.min]="e17()"
|
|
122
|
-
[attr.max]="e18()"
|
|
123
|
-
[attr.step]="e19()"
|
|
124
136
|
[value]="e20()"
|
|
125
137
|
[attr.disabled]="e9()"
|
|
126
138
|
[attr.aria-label]="e21()"
|
|
127
|
-
aria-roledescription="2d slider"
|
|
128
139
|
[attr.aria-valuetext]="e22()"
|
|
129
140
|
(input)="h1($event)"
|
|
130
141
|
/>
|
|
131
142
|
<input
|
|
132
143
|
[attr.class]="e16()"
|
|
144
|
+
[min]="e23()"
|
|
145
|
+
[max]="e24()"
|
|
146
|
+
[step]="e25()"
|
|
133
147
|
type="range"
|
|
134
|
-
[attr.min]="e23()"
|
|
135
|
-
[attr.max]="e24()"
|
|
136
|
-
[attr.step]="e25()"
|
|
137
148
|
[value]="e26()"
|
|
138
149
|
[attr.disabled]="e9()"
|
|
139
150
|
tabindex="-1"
|
|
@@ -152,10 +163,10 @@ aria-hidden="true"
|
|
|
152
163
|
[pmSpread]="e30()"
|
|
153
164
|
><input
|
|
154
165
|
[attr.class]="e16()"
|
|
166
|
+
[min]="e31()"
|
|
167
|
+
[max]="e32()"
|
|
168
|
+
[step]="e33()"
|
|
155
169
|
type="range"
|
|
156
|
-
[attr.min]="e31()"
|
|
157
|
-
[attr.max]="e32()"
|
|
158
|
-
[attr.step]="e33()"
|
|
159
170
|
[value]="e34()"
|
|
160
171
|
[attr.disabled]="e9()"
|
|
161
172
|
[attr.aria-label]="e35()"
|
|
@@ -174,10 +185,10 @@ aria-hidden="true"
|
|
|
174
185
|
[pmSpread]="e41()"
|
|
175
186
|
><input
|
|
176
187
|
[attr.class]="e42()"
|
|
188
|
+
[min]="e43()"
|
|
189
|
+
[max]="e44()"
|
|
190
|
+
[step]="e45()"
|
|
177
191
|
type="range"
|
|
178
|
-
[attr.min]="e43()"
|
|
179
|
-
[attr.max]="e44()"
|
|
180
|
-
[attr.step]="e45()"
|
|
181
192
|
[value]="e46()"
|
|
182
193
|
[attr.disabled]="e47()"
|
|
183
194
|
[attr.aria-label]="e48()"
|
|
@@ -248,6 +259,10 @@ export class ColorInput {
|
|
|
248
259
|
>(false, {
|
|
249
260
|
transform: (value: ColorInputProps['invalid']) => (value === undefined ? false : value),
|
|
250
261
|
})
|
|
262
|
+
/**
|
|
263
|
+
* The picker's sliders' names and value texts in the host's words.
|
|
264
|
+
*/
|
|
265
|
+
readonly messages = input<ColorInputProps['messages']>(undefined)
|
|
251
266
|
/**
|
|
252
267
|
* Serializes the hex through a hidden input.
|
|
253
268
|
*/
|
|
@@ -281,6 +296,7 @@ export class ColorInput {
|
|
|
281
296
|
disabled: () => this.disabled(),
|
|
282
297
|
id: () => this.id(),
|
|
283
298
|
invalid: () => this.invalid(),
|
|
299
|
+
messages: () => this.messages(),
|
|
284
300
|
name: () => this.name(),
|
|
285
301
|
pickerLabel: () => this.pickerLabel(),
|
|
286
302
|
size: () => this.size(),
|
|
@@ -294,6 +310,15 @@ export class ColorInput {
|
|
|
294
310
|
protected readonly draft = cell(() => null as string | null)
|
|
295
311
|
protected readonly hexField = elementRef<HTMLElement>()
|
|
296
312
|
protected readonly root = elementRef<HTMLElement>()
|
|
313
|
+
protected readonly say = derived(() => ({
|
|
314
|
+
plane: 'saturation and brightness',
|
|
315
|
+
planeValue: (saturation: number, brightness: number) =>
|
|
316
|
+
`saturation ${saturation}, brightness ${brightness}`,
|
|
317
|
+
hue: 'hue',
|
|
318
|
+
alpha: 'alpha',
|
|
319
|
+
railValue: (name: string, value: number) => `${name} ${value}`,
|
|
320
|
+
...this.$p.messages,
|
|
321
|
+
}))
|
|
297
322
|
protected readonly parseHex = derived(
|
|
298
323
|
() => (text: string) =>
|
|
299
324
|
((bare: string) =>
|
|
@@ -474,15 +499,15 @@ export class ColorInput {
|
|
|
474
499
|
}
|
|
475
500
|
|
|
476
501
|
protected e17() {
|
|
477
|
-
return this.color.value.getChannelRange('saturation').minValue
|
|
502
|
+
return fieldValue(this.color.value.getChannelRange('saturation').minValue)
|
|
478
503
|
}
|
|
479
504
|
|
|
480
505
|
protected e18() {
|
|
481
|
-
return this.color.value.getChannelRange('saturation').maxValue
|
|
506
|
+
return fieldValue(this.color.value.getChannelRange('saturation').maxValue)
|
|
482
507
|
}
|
|
483
508
|
|
|
484
509
|
protected e19() {
|
|
485
|
-
return this.color.value.getChannelRange('saturation').step
|
|
510
|
+
return fieldValue(this.color.value.getChannelRange('saturation').step)
|
|
486
511
|
}
|
|
487
512
|
|
|
488
513
|
protected e20() {
|
|
@@ -490,11 +515,14 @@ export class ColorInput {
|
|
|
490
515
|
}
|
|
491
516
|
|
|
492
517
|
protected e21() {
|
|
493
|
-
return this.
|
|
518
|
+
return this.say.value.plane
|
|
494
519
|
}
|
|
495
520
|
|
|
496
521
|
protected e22() {
|
|
497
|
-
return this.
|
|
522
|
+
return this.say.value.planeValue(
|
|
523
|
+
this.color.value.getChannelValue('saturation'),
|
|
524
|
+
this.color.value.getChannelValue('brightness'),
|
|
525
|
+
)
|
|
498
526
|
}
|
|
499
527
|
|
|
500
528
|
protected h1($event: Event): void {
|
|
@@ -502,15 +530,15 @@ export class ColorInput {
|
|
|
502
530
|
}
|
|
503
531
|
|
|
504
532
|
protected e23() {
|
|
505
|
-
return this.color.value.getChannelRange('brightness').minValue
|
|
533
|
+
return fieldValue(this.color.value.getChannelRange('brightness').minValue)
|
|
506
534
|
}
|
|
507
535
|
|
|
508
536
|
protected e24() {
|
|
509
|
-
return this.color.value.getChannelRange('brightness').maxValue
|
|
537
|
+
return fieldValue(this.color.value.getChannelRange('brightness').maxValue)
|
|
510
538
|
}
|
|
511
539
|
|
|
512
540
|
protected e25() {
|
|
513
|
-
return this.color.value.getChannelRange('brightness').step
|
|
541
|
+
return fieldValue(this.color.value.getChannelRange('brightness').step)
|
|
514
542
|
}
|
|
515
543
|
|
|
516
544
|
protected e26() {
|
|
@@ -554,15 +582,15 @@ export class ColorInput {
|
|
|
554
582
|
}
|
|
555
583
|
|
|
556
584
|
protected e31() {
|
|
557
|
-
return this.color.value.getChannelRange('hue').minValue
|
|
585
|
+
return fieldValue(this.color.value.getChannelRange('hue').minValue)
|
|
558
586
|
}
|
|
559
587
|
|
|
560
588
|
protected e32() {
|
|
561
|
-
return this.color.value.getChannelRange('hue').maxValue
|
|
589
|
+
return fieldValue(this.color.value.getChannelRange('hue').maxValue)
|
|
562
590
|
}
|
|
563
591
|
|
|
564
592
|
protected e33() {
|
|
565
|
-
return this.color.value.getChannelRange('hue').step
|
|
593
|
+
return fieldValue(this.color.value.getChannelRange('hue').step)
|
|
566
594
|
}
|
|
567
595
|
|
|
568
596
|
protected e34() {
|
|
@@ -570,11 +598,11 @@ export class ColorInput {
|
|
|
570
598
|
}
|
|
571
599
|
|
|
572
600
|
protected e35() {
|
|
573
|
-
return this.
|
|
601
|
+
return this.say.value.hue
|
|
574
602
|
}
|
|
575
603
|
|
|
576
604
|
protected e36() {
|
|
577
|
-
return this.
|
|
605
|
+
return this.say.value.railValue(this.say.value.hue, this.color.value.getChannelValue('hue'))
|
|
578
606
|
}
|
|
579
607
|
|
|
580
608
|
protected h3($event: Event): void {
|
|
@@ -628,17 +656,17 @@ export class ColorInput {
|
|
|
628
656
|
|
|
629
657
|
protected e43() {
|
|
630
658
|
if (!this.$p.alpha) return undefined as never
|
|
631
|
-
return this.color.value.getChannelRange('alpha').minValue
|
|
659
|
+
return fieldValue(this.color.value.getChannelRange('alpha').minValue)
|
|
632
660
|
}
|
|
633
661
|
|
|
634
662
|
protected e44() {
|
|
635
663
|
if (!this.$p.alpha) return undefined as never
|
|
636
|
-
return this.color.value.getChannelRange('alpha').maxValue
|
|
664
|
+
return fieldValue(this.color.value.getChannelRange('alpha').maxValue)
|
|
637
665
|
}
|
|
638
666
|
|
|
639
667
|
protected e45() {
|
|
640
668
|
if (!this.$p.alpha) return undefined as never
|
|
641
|
-
return this.color.value.getChannelRange('alpha').step
|
|
669
|
+
return fieldValue(this.color.value.getChannelRange('alpha').step)
|
|
642
670
|
}
|
|
643
671
|
|
|
644
672
|
protected e46() {
|
|
@@ -653,12 +681,12 @@ export class ColorInput {
|
|
|
653
681
|
|
|
654
682
|
protected e48() {
|
|
655
683
|
if (!this.$p.alpha) return undefined as never
|
|
656
|
-
return this.
|
|
684
|
+
return this.say.value.alpha
|
|
657
685
|
}
|
|
658
686
|
|
|
659
687
|
protected e49() {
|
|
660
688
|
if (!this.$p.alpha) return undefined as never
|
|
661
|
-
return this.
|
|
689
|
+
return this.say.value.railValue(this.say.value.alpha, this.color.value.getChannelValue('alpha'))
|
|
662
690
|
}
|
|
663
691
|
|
|
664
692
|
protected h4($event: Event): void {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Filtered single choice (`design/components/combobox.md`).
|
|
3
3
|
*
|
|
4
4
|
* Generated by `pnpm shells` from `packages/shells/src/members/combobox.ts`, the member's
|
|
5
5
|
* framework-neutral description. Never edit it by hand: change the description and
|
|
@@ -53,9 +53,10 @@ export interface ComboboxMessages {
|
|
|
53
53
|
clear?: string
|
|
54
54
|
loadingOptions?: string
|
|
55
55
|
options?: (count: number) => string
|
|
56
|
+
list?: string
|
|
56
57
|
}
|
|
57
58
|
|
|
58
|
-
/**
|
|
59
|
+
/** Filtered single choice: the inputs it takes, by the React member's prop names. */
|
|
59
60
|
export interface ComboboxProps {
|
|
60
61
|
/**
|
|
61
62
|
* Keeps free text. Blur keeps the draft instead of restoring the selected label. A commit that
|
|
@@ -124,7 +125,7 @@ export interface ComboboxProps {
|
|
|
124
125
|
value?: string | null
|
|
125
126
|
}
|
|
126
127
|
|
|
127
|
-
/**
|
|
128
|
+
/** Filtered single choice. */
|
|
128
129
|
@Component({
|
|
129
130
|
selector: 'pm-combobox',
|
|
130
131
|
encapsulation: ViewEncapsulation.None,
|
|
@@ -450,7 +451,8 @@ export class Combobox {
|
|
|
450
451
|
showOptions: 'Show options',
|
|
451
452
|
clear: 'Clear',
|
|
452
453
|
loadingOptions: 'Loading options…',
|
|
453
|
-
options: (count: number) => `${count} options
|
|
454
|
+
options: (count: number) => (count === 1 ? '1 option' : `${count} options`),
|
|
455
|
+
list: 'Suggestions',
|
|
454
456
|
...this.$p.messages,
|
|
455
457
|
}))
|
|
456
458
|
protected readonly collator = derived(
|
|
@@ -497,7 +499,26 @@ export class Combobox {
|
|
|
497
499
|
protected readonly documentDirection = useDirection(() => this.input.value)
|
|
498
500
|
protected readonly service: { readonly value: zag.Service } = setup(() =>
|
|
499
501
|
useMachine(
|
|
500
|
-
|
|
502
|
+
{
|
|
503
|
+
...zag.machine,
|
|
504
|
+
implementations: {
|
|
505
|
+
...zag.machine.implementations,
|
|
506
|
+
actions: {
|
|
507
|
+
...zag.machine.implementations?.actions,
|
|
508
|
+
announceHighlightedItem: (params) =>
|
|
509
|
+
zag.machine.implementations?.actions?.announceHighlightedItem?.({
|
|
510
|
+
...params,
|
|
511
|
+
context: {
|
|
512
|
+
...params.context,
|
|
513
|
+
get: ((name: string) =>
|
|
514
|
+
name === 'value'
|
|
515
|
+
? []
|
|
516
|
+
: params.context.get(name as never)) as typeof params.context.get,
|
|
517
|
+
},
|
|
518
|
+
}),
|
|
519
|
+
},
|
|
520
|
+
},
|
|
521
|
+
} as typeof zag.machine,
|
|
501
522
|
() =>
|
|
502
523
|
({
|
|
503
524
|
id: this.uid,
|
|
@@ -796,7 +817,7 @@ export class Combobox {
|
|
|
796
817
|
return mergeParts(this.api.value.getContentProps(), {
|
|
797
818
|
class: styles.listbox,
|
|
798
819
|
hidden: undefined,
|
|
799
|
-
'aria-label':
|
|
820
|
+
'aria-label': this.say.value.list,
|
|
800
821
|
'aria-labelledby':
|
|
801
822
|
this.$p['aria-labelledby'] === undefined
|
|
802
823
|
? undefined
|
|
@@ -963,7 +984,7 @@ export class Combobox {
|
|
|
963
984
|
return mergeParts(this.api.value.getContentProps(), {
|
|
964
985
|
class: styles.listbox,
|
|
965
986
|
hidden: undefined,
|
|
966
|
-
'aria-label':
|
|
987
|
+
'aria-label': this.say.value.list,
|
|
967
988
|
'aria-labelledby':
|
|
968
989
|
this.$p['aria-labelledby'] === undefined
|
|
969
990
|
? undefined
|
|
@@ -59,6 +59,7 @@ export type DatePickerMessages = CalendarMessages & {
|
|
|
59
59
|
showCalendar: string
|
|
60
60
|
clear: string
|
|
61
61
|
chooseDate: string
|
|
62
|
+
empty?: string
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
/** A date *field* with segmented entry and a calendar popup: the inputs it takes, by the React member's prop names. */
|
|
@@ -382,16 +383,16 @@ export class DatePicker<
|
|
|
382
383
|
protected readonly scrim = elementRef<HTMLElement>()
|
|
383
384
|
protected readonly sheetPanel = elementRef<HTMLElement>()
|
|
384
385
|
protected readonly phone = useMediaQuery('phone')
|
|
385
|
-
protected readonly say = derived(
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
)
|
|
386
|
+
protected readonly say = derived(() => ({
|
|
387
|
+
empty: 'Empty',
|
|
388
|
+
...(this.$p.messages ?? {
|
|
389
|
+
previousMonth: 'Previous month',
|
|
390
|
+
nextMonth: 'Next month',
|
|
391
|
+
showCalendar: 'Show calendar',
|
|
392
|
+
clear: 'Clear',
|
|
393
|
+
chooseDate: 'Choose a date',
|
|
394
|
+
}),
|
|
395
|
+
}))
|
|
395
396
|
protected readonly language = derived(
|
|
396
397
|
() => this.$p.locale ?? this.browserLanguage.value ?? 'en-US',
|
|
397
398
|
)
|
|
@@ -696,7 +697,7 @@ export class DatePicker<
|
|
|
696
697
|
|
|
697
698
|
protected e17(segment: Each<ReturnType<DatePicker<Value>['e4']>>) {
|
|
698
699
|
if (segment.type === 'literal') return undefined as never
|
|
699
|
-
return segment.placeholder ?
|
|
700
|
+
return segment.placeholder ? this.say.value.empty : segment.text
|
|
700
701
|
}
|
|
701
702
|
|
|
702
703
|
protected e18(segment: Each<ReturnType<DatePicker<Value>['e4']>>) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A date range *field
|
|
2
|
+
* A date range *field*: two segmented dates and a calendar popup (`design/components/date-range-picker.md`).
|
|
3
3
|
*
|
|
4
4
|
* Generated by `pnpm shells` from `packages/shells/src/members/date-range-picker.ts`, the member's
|
|
5
5
|
* framework-neutral description. Never edit it by hand: change the description and
|
|
@@ -66,9 +66,12 @@ export type DateRangePickerMessages = CalendarMessages & {
|
|
|
66
66
|
showCalendar: string
|
|
67
67
|
clear: string
|
|
68
68
|
chooseRange: string
|
|
69
|
+
empty?: string
|
|
70
|
+
start?: string
|
|
71
|
+
end?: string
|
|
69
72
|
}
|
|
70
73
|
|
|
71
|
-
/** A date range *field
|
|
74
|
+
/** A date range *field*: two segmented dates and a calendar popup: the inputs it takes, by the React member's prop names. */
|
|
72
75
|
export interface DateRangePickerProps {
|
|
73
76
|
'aria-describedby'?: string
|
|
74
77
|
/**
|
|
@@ -127,7 +130,7 @@ export interface DateRangePickerProps {
|
|
|
127
130
|
value?: DateRange | null
|
|
128
131
|
}
|
|
129
132
|
|
|
130
|
-
/** A date range *field
|
|
133
|
+
/** A date range *field*: two segmented dates and a calendar popup. */
|
|
131
134
|
@Component({
|
|
132
135
|
selector: 'pm-date-range-picker',
|
|
133
136
|
encapsulation: ViewEncapsulation.None,
|
|
@@ -445,16 +448,18 @@ export class DateRangePicker {
|
|
|
445
448
|
protected readonly scrim = elementRef<HTMLElement>()
|
|
446
449
|
protected readonly sheetPanel = elementRef<HTMLElement>()
|
|
447
450
|
protected readonly phone = useMediaQuery('phone')
|
|
448
|
-
protected readonly say = derived(
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
451
|
+
protected readonly say = derived(() => ({
|
|
452
|
+
empty: 'Empty',
|
|
453
|
+
start: 'Start date',
|
|
454
|
+
end: 'End date',
|
|
455
|
+
...(this.$p.messages ?? {
|
|
456
|
+
previousMonth: 'Previous month',
|
|
457
|
+
nextMonth: 'Next month',
|
|
458
|
+
showCalendar: 'Show calendar',
|
|
459
|
+
clear: 'Clear',
|
|
460
|
+
chooseRange: 'Choose a date range',
|
|
461
|
+
}),
|
|
462
|
+
}))
|
|
458
463
|
protected readonly language = derived(
|
|
459
464
|
() => this.$p.locale ?? this.browserLanguage.value ?? 'en-US',
|
|
460
465
|
)
|
|
@@ -854,7 +859,7 @@ export class DateRangePicker {
|
|
|
854
859
|
|
|
855
860
|
protected e11(segment: Each<ReturnType<DateRangePicker['e4']>>) {
|
|
856
861
|
if (segment.type === 'literal') return undefined as never
|
|
857
|
-
return `${
|
|
862
|
+
return `${this.say.value.start}, ${this.segmentName.value(segment.type)}`
|
|
858
863
|
}
|
|
859
864
|
|
|
860
865
|
protected e12(segment: Each<ReturnType<DateRangePicker['e4']>>) {
|
|
@@ -886,7 +891,7 @@ export class DateRangePicker {
|
|
|
886
891
|
|
|
887
892
|
protected e17(segment: Each<ReturnType<DateRangePicker['e4']>>) {
|
|
888
893
|
if (segment.type === 'literal') return undefined as never
|
|
889
|
-
return segment.placeholder ?
|
|
894
|
+
return segment.placeholder ? this.say.value.empty : segment.text
|
|
890
895
|
}
|
|
891
896
|
|
|
892
897
|
protected e18(segment: Each<ReturnType<DateRangePicker['e4']>>) {
|
|
@@ -992,7 +997,7 @@ export class DateRangePicker {
|
|
|
992
997
|
|
|
993
998
|
protected e36(segment: Each<ReturnType<DateRangePicker['e29']>>) {
|
|
994
999
|
if (segment.type === 'literal') return undefined as never
|
|
995
|
-
return `${
|
|
1000
|
+
return `${this.say.value.end}, ${this.segmentName.value(segment.type)}`
|
|
996
1001
|
}
|
|
997
1002
|
|
|
998
1003
|
protected e37(segment: Each<ReturnType<DateRangePicker['e29']>>) {
|
|
@@ -1024,7 +1029,7 @@ export class DateRangePicker {
|
|
|
1024
1029
|
|
|
1025
1030
|
protected e42(segment: Each<ReturnType<DateRangePicker['e29']>>) {
|
|
1026
1031
|
if (segment.type === 'literal') return undefined as never
|
|
1027
|
-
return segment.placeholder ?
|
|
1032
|
+
return segment.placeholder ? this.say.value.empty : segment.text
|
|
1028
1033
|
}
|
|
1029
1034
|
|
|
1030
1035
|
protected e43(segment: Each<ReturnType<DateRangePicker['e29']>>) {
|
|
@@ -212,8 +212,9 @@ export class DateRangePickerRangeCalendar {
|
|
|
212
212
|
protected readonly api: { readonly value: ReturnType<typeof zag.connect> } = derived(() =>
|
|
213
213
|
zag.connect(this.service.value, normalizeProps),
|
|
214
214
|
)
|
|
215
|
+
protected readonly title = derived(() => this.api.value.visibleRangeText.start)
|
|
215
216
|
protected readonly named = derived(() =>
|
|
216
|
-
[this.$p.label, this.
|
|
217
|
+
[this.$p.label, this.title.value].filter(Boolean).join(', '),
|
|
217
218
|
)
|
|
218
219
|
protected readonly previewing = derived(
|
|
219
220
|
() =>
|
|
@@ -304,7 +305,7 @@ export class DateRangePickerRangeCalendar {
|
|
|
304
305
|
}
|
|
305
306
|
|
|
306
307
|
protected e7() {
|
|
307
|
-
return this.
|
|
308
|
+
return this.title.value
|
|
308
309
|
}
|
|
309
310
|
|
|
310
311
|
protected e8(): ButtonProps['label'] {
|
|
@@ -154,18 +154,19 @@ pmFileUploadRow
|
|
|
154
154
|
[open]="e26(row)"
|
|
155
155
|
[size]="e27(row)"
|
|
156
156
|
[retryable]="e28()"
|
|
157
|
-
[
|
|
158
|
-
[
|
|
159
|
-
[
|
|
157
|
+
[disabled]="e29()"
|
|
158
|
+
[retryLabel]="e30()"
|
|
159
|
+
[removeLabel]="e31(row)"
|
|
160
|
+
[progressLabel]="e32(row)"
|
|
160
161
|
(retry)="h6(row)"
|
|
161
162
|
(remove)="h7(row)"
|
|
162
163
|
(done)="h8(row)"
|
|
163
164
|
></li>}</ul>}
|
|
164
165
|
<!-- reader -->
|
|
165
166
|
<span
|
|
166
|
-
[attr.class]="
|
|
167
|
+
[attr.class]="e33()"
|
|
167
168
|
aria-live="polite"
|
|
168
|
-
>@for (file of
|
|
169
|
+
>@for (file of e34(); track e35(file)) {<span>{{ e36(file) }}</span>}</span></div>`,
|
|
169
170
|
})
|
|
170
171
|
export class FileUpload {
|
|
171
172
|
static readonly controlKind = 'group'
|
|
@@ -513,17 +514,22 @@ export class FileUpload {
|
|
|
513
514
|
return this.$.listening(this.onRetry, 'onRetry') === true
|
|
514
515
|
}
|
|
515
516
|
|
|
516
|
-
protected e29(): FileUploadRowProps['
|
|
517
|
+
protected e29(): FileUploadRowProps['disabled'] {
|
|
518
|
+
if (!(this.$p.files.length > 0)) return undefined as never
|
|
519
|
+
return this.$p.disabled
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
protected e30(): FileUploadRowProps['retryLabel'] {
|
|
517
523
|
if (!(this.$p.files.length > 0)) return undefined as never
|
|
518
524
|
return this.$p.messages.retry
|
|
519
525
|
}
|
|
520
526
|
|
|
521
|
-
protected
|
|
527
|
+
protected e31(row: Each<ReturnType<FileUpload['e23']>>): FileUploadRowProps['removeLabel'] {
|
|
522
528
|
if (!(this.$p.files.length > 0)) return undefined as never
|
|
523
529
|
return this.$p.messages.remove(row.item.name)
|
|
524
530
|
}
|
|
525
531
|
|
|
526
|
-
protected
|
|
532
|
+
protected e32(row: Each<ReturnType<FileUpload['e23']>>): FileUploadRowProps['progressLabel'] {
|
|
527
533
|
if (!(this.$p.files.length > 0)) return undefined as never
|
|
528
534
|
return this.$p.messages.progress(row.item.name)
|
|
529
535
|
}
|
|
@@ -547,19 +553,19 @@ export class FileUpload {
|
|
|
547
553
|
row.done()
|
|
548
554
|
}
|
|
549
555
|
|
|
550
|
-
protected
|
|
556
|
+
protected e33() {
|
|
551
557
|
return styles.reader
|
|
552
558
|
}
|
|
553
559
|
|
|
554
|
-
|
|
560
|
+
e34() {
|
|
555
561
|
return this.$p.files
|
|
556
562
|
}
|
|
557
563
|
|
|
558
|
-
protected
|
|
564
|
+
protected e35(file: Each<ReturnType<FileUpload['e34']>>) {
|
|
559
565
|
return file.id
|
|
560
566
|
}
|
|
561
567
|
|
|
562
|
-
protected
|
|
568
|
+
protected e36(file: Each<ReturnType<FileUpload['e34']>>) {
|
|
563
569
|
return this.$p.messages.announcement(file)
|
|
564
570
|
}
|
|
565
571
|
|
|
@@ -37,6 +37,10 @@ export interface FileUploadRowProps {
|
|
|
37
37
|
* The app handles a retry, so a failed row offers one.
|
|
38
38
|
*/
|
|
39
39
|
retryable: boolean
|
|
40
|
+
/**
|
|
41
|
+
* The field is disabled, and the row’s controls with it.
|
|
42
|
+
*/
|
|
43
|
+
disabled: boolean
|
|
40
44
|
retryLabel: string
|
|
41
45
|
removeLabel: string
|
|
42
46
|
progressLabel: string
|
|
@@ -98,15 +102,17 @@ size="sm"
|
|
|
98
102
|
[iconOnly]="e23()"
|
|
99
103
|
icon="refresh"
|
|
100
104
|
[label]="e24()"
|
|
105
|
+
[disabled]="e25()"
|
|
101
106
|
(click)="h1()"
|
|
102
107
|
></pm-button>}
|
|
103
108
|
<pm-button
|
|
104
109
|
variant="ghost"
|
|
105
110
|
tone="neutral"
|
|
106
111
|
size="sm"
|
|
107
|
-
[iconOnly]="
|
|
112
|
+
[iconOnly]="e26()"
|
|
108
113
|
icon="close"
|
|
109
|
-
[label]="
|
|
114
|
+
[label]="e27()"
|
|
115
|
+
[disabled]="e28()"
|
|
110
116
|
(click)="h2()"
|
|
111
117
|
></pm-button>`,
|
|
112
118
|
})
|
|
@@ -124,6 +130,10 @@ export class FileUploadRow {
|
|
|
124
130
|
* The app handles a retry, so a failed row offers one.
|
|
125
131
|
*/
|
|
126
132
|
readonly retryable = input.required<FileUploadRowProps['retryable']>()
|
|
133
|
+
/**
|
|
134
|
+
* The field is disabled, and the row’s controls with it.
|
|
135
|
+
*/
|
|
136
|
+
readonly disabled = input.required<FileUploadRowProps['disabled']>()
|
|
127
137
|
readonly retryLabel = input.required<FileUploadRowProps['retryLabel']>()
|
|
128
138
|
readonly removeLabel = input.required<FileUploadRowProps['removeLabel']>()
|
|
129
139
|
readonly progressLabel = input.required<FileUploadRowProps['progressLabel']>()
|
|
@@ -141,6 +151,7 @@ export class FileUploadRow {
|
|
|
141
151
|
open: () => this.open(),
|
|
142
152
|
size: () => this.size(),
|
|
143
153
|
retryable: () => this.retryable(),
|
|
154
|
+
disabled: () => this.disabled(),
|
|
144
155
|
retryLabel: () => this.retryLabel(),
|
|
145
156
|
removeLabel: () => this.removeLabel(),
|
|
146
157
|
progressLabel: () => this.progressLabel(),
|
|
@@ -276,19 +287,28 @@ export class FileUploadRow {
|
|
|
276
287
|
return this.$p.retryLabel
|
|
277
288
|
}
|
|
278
289
|
|
|
290
|
+
protected e25(): ButtonProps['disabled'] {
|
|
291
|
+
if (!(this.$p.file.status === 'error' && this.$p.retryable)) return undefined as never
|
|
292
|
+
return this.$p.disabled
|
|
293
|
+
}
|
|
294
|
+
|
|
279
295
|
protected h1(): void {
|
|
280
296
|
if (!(this.$p.file.status === 'error' && this.$p.retryable)) return
|
|
281
297
|
this.$.emit(this.onRetry, 'onRetry')
|
|
282
298
|
}
|
|
283
299
|
|
|
284
|
-
protected
|
|
300
|
+
protected e26(): ButtonProps['iconOnly'] {
|
|
285
301
|
return true
|
|
286
302
|
}
|
|
287
303
|
|
|
288
|
-
protected
|
|
304
|
+
protected e27(): ButtonProps['label'] {
|
|
289
305
|
return this.$p.removeLabel
|
|
290
306
|
}
|
|
291
307
|
|
|
308
|
+
protected e28(): ButtonProps['disabled'] {
|
|
309
|
+
return this.$p.disabled
|
|
310
|
+
}
|
|
311
|
+
|
|
292
312
|
protected h2(): void {
|
|
293
313
|
this.$.emit(this.onRemove, 'onRemove')
|
|
294
314
|
}
|