@metamorph-labs/polymorph-vue-ui 1.0.17 → 1.0.18
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 +166 -0
- package/dist/ai/ArtifactPane.js.map +1 -1
- package/dist/ai/ArtifactPane.vue_vue_type_script_setup_true_lang.js +80 -72
- package/dist/ai/ArtifactPane.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/ai/PromptInput.js.map +1 -1
- package/dist/ai/PromptInput.vue_vue_type_script_setup_true_lang.js +105 -105
- package/dist/ai/PromptInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/ai/ReasoningDisclosure.js.map +1 -1
- package/dist/ai/ReasoningDisclosure.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/ai/ReasoningDisclosure.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/ai/ToolCall.js.map +1 -1
- package/dist/ai/ToolCall.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/ai/ToolCall.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/ai/artifact-pane.css +1 -1
- package/dist/ai/artifact-pane.module.js +1 -1
- package/dist/ai/attachment-chip.css +1 -1
- package/dist/ai/attachment-chip.module.js +1 -1
- package/dist/ai/attachment-chip.module.js.map +1 -1
- package/dist/ai/chat-thread.css +1 -1
- package/dist/ai/chat-thread.module.js +1 -1
- package/dist/ai/citation.css +1 -1
- package/dist/ai/citation.module.js +1 -1
- package/dist/ai/prompt-input.css +1 -1
- package/dist/ai/prompt-input.module.js +1 -1
- package/dist/ai/prompt-input.module.js.map +1 -1
- package/dist/ai/reasoning-disclosure.css +1 -1
- package/dist/ai/reasoning-disclosure.module.js +5 -5
- package/dist/ai/reasoning-disclosure.module.js.map +1 -1
- package/dist/ai/source-list.css +1 -1
- package/dist/ai/source-list.module.js +1 -1
- package/dist/ai/source-list.module.js.map +1 -1
- package/dist/ai/tool-call.css +1 -1
- package/dist/ai/tool-call.module.js +1 -1
- package/dist/archetypes/AppShell.js.map +1 -1
- package/dist/archetypes/AppShell.vue_vue_type_script_setup_true_lang.js +139 -88
- package/dist/archetypes/AppShell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/archetypes/FormPage.js.map +1 -1
- package/dist/archetypes/FormPage.vue_vue_type_script_setup_true_lang.js +43 -21
- package/dist/archetypes/FormPage.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/archetypes/app-shell.css +1 -1
- package/dist/archetypes/app-shell.module.js +9 -8
- package/dist/archetypes/app-shell.module.js.map +1 -1
- package/dist/archetypes/form-page.css +1 -1
- package/dist/archetypes/form-page.module.js +5 -3
- package/dist/archetypes/form-page.module.js.map +1 -1
- package/dist/archetypes/master-detail-page.css +1 -1
- package/dist/archetypes/master-detail-page.module.js +1 -1
- package/dist/archetypes/master-detail-page.module.js.map +1 -1
- package/dist/charts/area-chart.css +1 -1
- package/dist/charts/area-chart.module.js +1 -1
- package/dist/charts/bar-chart.css +1 -1
- package/dist/charts/bar-chart.module.js +1 -1
- package/dist/charts/donut-chart.css +1 -1
- package/dist/charts/donut-chart.module.js +1 -1
- package/dist/charts/frame/chart-frame.css +1 -1
- package/dist/charts/frame/chart-frame.module.js +1 -1
- package/dist/charts/frame/chart-legend.css +1 -1
- package/dist/charts/frame/chart-legend.module.js +1 -1
- package/dist/charts/frame/chart-legend.module.js.map +1 -1
- package/dist/charts/funnel-chart.css +1 -1
- package/dist/charts/funnel-chart.module.js +1 -1
- package/dist/charts/heatmap.css +1 -1
- package/dist/charts/heatmap.module.js +1 -1
- package/dist/charts/histogram.css +1 -1
- package/dist/charts/histogram.module.js +1 -1
- package/dist/charts/line-chart.css +1 -1
- package/dist/charts/line-chart.module.js +1 -1
- package/dist/charts/radar-chart.css +1 -1
- package/dist/charts/radar-chart.module.js +1 -1
- package/dist/charts/scatter-chart.css +1 -1
- package/dist/charts/scatter-chart.module.js +1 -1
- package/dist/charts/treemap.css +1 -1
- package/dist/charts/treemap.module.js +1 -1
- package/dist/controls/AvatarButton.js.map +1 -1
- package/dist/controls/AvatarButton.vue_vue_type_script_setup_true_lang.js +43 -35
- package/dist/controls/AvatarButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/Button.js.map +1 -1
- package/dist/controls/Button.vue_vue_type_script_setup_true_lang.js +74 -62
- package/dist/controls/Button.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/Calendar.js.map +1 -1
- package/dist/controls/Calendar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/controls/Calendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/Checkbox.js.map +1 -1
- package/dist/controls/Checkbox.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/controls/Checkbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/ColorInput.js.map +1 -1
- package/dist/controls/ColorInput.vue_vue_type_script_setup_true_lang.js +95 -95
- package/dist/controls/ColorInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/Combobox.js.map +1 -1
- package/dist/controls/Combobox.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/controls/Combobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/CopyButton.js.map +1 -1
- package/dist/controls/CopyButton.vue_vue_type_script_setup_true_lang.js +44 -30
- package/dist/controls/CopyButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/DatePicker.js.map +1 -1
- package/dist/controls/DatePicker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/controls/DatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/DateRangePicker.js.map +1 -1
- package/dist/controls/DateRangePicker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/controls/DateRangePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/FileUpload.js.map +1 -1
- package/dist/controls/FileUpload.vue_vue_type_script_setup_true_lang.js +98 -89
- package/dist/controls/FileUpload.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/InlineEdit.js.map +1 -1
- package/dist/controls/InlineEdit.vue_vue_type_script_setup_true_lang.js +71 -63
- package/dist/controls/InlineEdit.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/MultiSelect.js.map +1 -1
- package/dist/controls/MultiSelect.vue_vue_type_script_setup_true_lang.js +188 -177
- package/dist/controls/MultiSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/NumberInput.js.map +1 -1
- package/dist/controls/NumberInput.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/controls/NumberInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/PhoneInput.js.map +1 -1
- package/dist/controls/PhoneInput.vue_vue_type_script_setup_true_lang.js +39 -39
- package/dist/controls/PhoneInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/RadioGroup.js.map +1 -1
- package/dist/controls/RadioGroup.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/controls/RadioGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/SegmentedControl.js.map +1 -1
- package/dist/controls/SegmentedControl.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/controls/SegmentedControl.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/Select.js.map +1 -1
- package/dist/controls/Select.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/controls/Select.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/Slider.js.map +1 -1
- package/dist/controls/Slider.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/controls/Slider.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/SplitButton.js.map +1 -1
- package/dist/controls/SplitButton.vue_vue_type_script_setup_true_lang.js +102 -87
- package/dist/controls/SplitButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/SplitButtonSubmenu.js.map +1 -1
- package/dist/controls/SplitButtonSubmenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/controls/SplitButtonSubmenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/Switch.js.map +1 -1
- package/dist/controls/Switch.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/controls/Switch.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/TagInput.js.map +1 -1
- package/dist/controls/TagInput.vue_vue_type_script_setup_true_lang.js +122 -111
- package/dist/controls/TagInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/TreeSelect.js.map +1 -1
- package/dist/controls/TreeSelect.vue_vue_type_script_setup_true_lang.js +56 -56
- package/dist/controls/TreeSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/controls/avatar-button.css +1 -1
- package/dist/controls/avatar-button.module.js +5 -4
- package/dist/controls/avatar-button.module.js.map +1 -1
- package/dist/controls/button.css +1 -1
- package/dist/controls/button.module.js +4 -3
- package/dist/controls/button.module.js.map +1 -1
- package/dist/controls/calendar.css +1 -1
- package/dist/controls/calendar.module.js +3 -3
- package/dist/controls/calendar.module.js.map +1 -1
- package/dist/controls/checkbox-group.css +1 -1
- package/dist/controls/checkbox-group.module.js +1 -1
- package/dist/controls/checkbox.css +1 -1
- package/dist/controls/checkbox.module.js +2 -2
- package/dist/controls/checkbox.module.js.map +1 -1
- package/dist/controls/choice-card.css +1 -1
- package/dist/controls/choice-card.module.js +2 -2
- package/dist/controls/choice-card.module.js.map +1 -1
- package/dist/controls/color-input.css +1 -1
- package/dist/controls/color-input.module.js +1 -1
- package/dist/controls/color-input.module.js.map +1 -1
- package/dist/controls/combobox.css +1 -1
- package/dist/controls/combobox.module.js +5 -5
- package/dist/controls/combobox.module.js.map +1 -1
- package/dist/controls/copy-button.css +1 -1
- package/dist/controls/copy-button.module.js +8 -7
- package/dist/controls/copy-button.module.js.map +1 -1
- package/dist/controls/date-picker.css +1 -1
- package/dist/controls/date-picker.module.js +1 -1
- package/dist/controls/date-range-picker.css +1 -1
- package/dist/controls/date-range-picker.module.js +6 -6
- package/dist/controls/date-range-picker.module.js.map +1 -1
- package/dist/controls/duration-input.css +1 -1
- package/dist/controls/duration-input.module.js +1 -1
- package/dist/controls/file-upload.css +1 -1
- package/dist/controls/file-upload.module.js +1 -1
- package/dist/controls/file-upload.module.js.map +1 -1
- package/dist/controls/input.css +1 -1
- package/dist/controls/input.module.js +2 -2
- package/dist/controls/input.module.js.map +1 -1
- package/dist/controls/link.css +1 -1
- package/dist/controls/link.module.js +1 -1
- package/dist/controls/link.module.js.map +1 -1
- package/dist/controls/month-input.css +1 -1
- package/dist/controls/month-input.module.js +1 -1
- package/dist/controls/multi-select.css +1 -1
- package/dist/controls/multi-select.module.js +5 -5
- package/dist/controls/multi-select.module.js.map +1 -1
- package/dist/controls/number-input.css +1 -1
- package/dist/controls/number-input.module.js +1 -1
- package/dist/controls/number-input.module.js.map +1 -1
- package/dist/controls/otp-input.css +1 -1
- package/dist/controls/otp-input.module.js +2 -2
- package/dist/controls/otp-input.module.js.map +1 -1
- package/dist/controls/password-input.css +1 -1
- package/dist/controls/password-input.module.js +2 -2
- package/dist/controls/password-input.module.js.map +1 -1
- package/dist/controls/provider-button.css +1 -1
- package/dist/controls/provider-button.module.js +1 -1
- package/dist/controls/radio-group.css +1 -1
- package/dist/controls/radio-group.module.js +2 -2
- package/dist/controls/radio-group.module.js.map +1 -1
- package/dist/controls/rating.css +1 -1
- package/dist/controls/rating.module.js +1 -1
- package/dist/controls/rich-text-input.css +1 -1
- package/dist/controls/rich-text-input.module.js +1 -1
- package/dist/controls/rich-text-input.module.js.map +1 -1
- package/dist/controls/segmented-control.css +1 -1
- package/dist/controls/segmented-control.module.js +1 -1
- package/dist/controls/select.css +1 -1
- package/dist/controls/select.module.js +3 -3
- package/dist/controls/select.module.js.map +1 -1
- package/dist/controls/slider.css +1 -1
- package/dist/controls/slider.module.js +1 -1
- package/dist/controls/slider.module.js.map +1 -1
- package/dist/controls/split-button.css +1 -1
- package/dist/controls/split-button.module.js +20 -19
- package/dist/controls/split-button.module.js.map +1 -1
- package/dist/controls/switch.css +1 -1
- package/dist/controls/switch.module.js +1 -1
- package/dist/controls/switch.module.js.map +1 -1
- package/dist/controls/tag-input.css +1 -1
- package/dist/controls/tag-input.module.js +1 -1
- package/dist/controls/textarea.css +1 -1
- package/dist/controls/textarea.module.js +1 -1
- package/dist/controls/time-input.css +1 -1
- package/dist/controls/time-input.module.js +1 -1
- package/dist/controls/tree-select.css +1 -1
- package/dist/controls/tree-select.module.js +1 -1
- package/dist/layout/split-pane.css +1 -1
- package/dist/layout/split-pane.module.js +1 -1
- package/dist/layout/split-pane.module.js.map +1 -1
- package/dist/node/ai/ArtifactPane.js.map +1 -1
- package/dist/node/ai/ArtifactPane.vue_vue_type_script_setup_true_lang.js +80 -72
- package/dist/node/ai/ArtifactPane.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/ai/PromptInput.js.map +1 -1
- package/dist/node/ai/PromptInput.vue_vue_type_script_setup_true_lang.js +105 -105
- package/dist/node/ai/PromptInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/ai/ReasoningDisclosure.js.map +1 -1
- package/dist/node/ai/ReasoningDisclosure.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/ai/ReasoningDisclosure.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/ai/ToolCall.js.map +1 -1
- package/dist/node/ai/ToolCall.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/ai/ToolCall.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/ai/artifact-pane.module.js +1 -1
- package/dist/node/ai/attachment-chip.module.js +1 -1
- package/dist/node/ai/attachment-chip.module.js.map +1 -1
- package/dist/node/ai/chat-thread.module.js +1 -1
- package/dist/node/ai/citation.module.js +1 -1
- package/dist/node/ai/prompt-input.module.js +1 -1
- package/dist/node/ai/prompt-input.module.js.map +1 -1
- package/dist/node/ai/reasoning-disclosure.module.js +5 -5
- package/dist/node/ai/reasoning-disclosure.module.js.map +1 -1
- package/dist/node/ai/source-list.module.js +1 -1
- package/dist/node/ai/source-list.module.js.map +1 -1
- package/dist/node/ai/tool-call.module.js +1 -1
- package/dist/node/archetypes/AppShell.js.map +1 -1
- package/dist/node/archetypes/AppShell.vue_vue_type_script_setup_true_lang.js +139 -88
- package/dist/node/archetypes/AppShell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/archetypes/FormPage.js.map +1 -1
- package/dist/node/archetypes/FormPage.vue_vue_type_script_setup_true_lang.js +43 -21
- package/dist/node/archetypes/FormPage.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/archetypes/app-shell.module.js +9 -8
- package/dist/node/archetypes/app-shell.module.js.map +1 -1
- package/dist/node/archetypes/form-page.module.js +5 -3
- package/dist/node/archetypes/form-page.module.js.map +1 -1
- package/dist/node/archetypes/master-detail-page.module.js +1 -1
- package/dist/node/archetypes/master-detail-page.module.js.map +1 -1
- package/dist/node/charts/area-chart.module.js +1 -1
- package/dist/node/charts/bar-chart.module.js +1 -1
- package/dist/node/charts/donut-chart.module.js +1 -1
- package/dist/node/charts/frame/chart-frame.module.js +1 -1
- package/dist/node/charts/frame/chart-legend.module.js +1 -1
- package/dist/node/charts/frame/chart-legend.module.js.map +1 -1
- package/dist/node/charts/funnel-chart.module.js +1 -1
- package/dist/node/charts/heatmap.module.js +1 -1
- package/dist/node/charts/histogram.module.js +1 -1
- package/dist/node/charts/line-chart.module.js +1 -1
- package/dist/node/charts/radar-chart.module.js +1 -1
- package/dist/node/charts/scatter-chart.module.js +1 -1
- package/dist/node/charts/treemap.module.js +1 -1
- package/dist/node/controls/AvatarButton.js.map +1 -1
- package/dist/node/controls/AvatarButton.vue_vue_type_script_setup_true_lang.js +43 -35
- package/dist/node/controls/AvatarButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/Button.js.map +1 -1
- package/dist/node/controls/Button.vue_vue_type_script_setup_true_lang.js +74 -62
- package/dist/node/controls/Button.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/Calendar.js.map +1 -1
- package/dist/node/controls/Calendar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/controls/Calendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/Checkbox.js.map +1 -1
- package/dist/node/controls/Checkbox.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/controls/Checkbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/ColorInput.js.map +1 -1
- package/dist/node/controls/ColorInput.vue_vue_type_script_setup_true_lang.js +95 -95
- package/dist/node/controls/ColorInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/Combobox.js.map +1 -1
- package/dist/node/controls/Combobox.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/controls/Combobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/CopyButton.js.map +1 -1
- package/dist/node/controls/CopyButton.vue_vue_type_script_setup_true_lang.js +44 -30
- package/dist/node/controls/CopyButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/DatePicker.js.map +1 -1
- package/dist/node/controls/DatePicker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/controls/DatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/DateRangePicker.js.map +1 -1
- package/dist/node/controls/DateRangePicker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/controls/DateRangePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/FileUpload.js.map +1 -1
- package/dist/node/controls/FileUpload.vue_vue_type_script_setup_true_lang.js +98 -89
- package/dist/node/controls/FileUpload.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/InlineEdit.js.map +1 -1
- package/dist/node/controls/InlineEdit.vue_vue_type_script_setup_true_lang.js +71 -63
- package/dist/node/controls/InlineEdit.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/MultiSelect.js.map +1 -1
- package/dist/node/controls/MultiSelect.vue_vue_type_script_setup_true_lang.js +188 -177
- package/dist/node/controls/MultiSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/NumberInput.js.map +1 -1
- package/dist/node/controls/NumberInput.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/controls/NumberInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/PhoneInput.js.map +1 -1
- package/dist/node/controls/PhoneInput.vue_vue_type_script_setup_true_lang.js +39 -39
- package/dist/node/controls/PhoneInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/RadioGroup.js.map +1 -1
- package/dist/node/controls/RadioGroup.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/controls/RadioGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/SegmentedControl.js.map +1 -1
- package/dist/node/controls/SegmentedControl.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/controls/SegmentedControl.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/Select.js.map +1 -1
- package/dist/node/controls/Select.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/controls/Select.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/Slider.js.map +1 -1
- package/dist/node/controls/Slider.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/controls/Slider.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/SplitButton.js.map +1 -1
- package/dist/node/controls/SplitButton.vue_vue_type_script_setup_true_lang.js +102 -87
- package/dist/node/controls/SplitButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/SplitButtonSubmenu.js.map +1 -1
- package/dist/node/controls/SplitButtonSubmenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/controls/SplitButtonSubmenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/Switch.js.map +1 -1
- package/dist/node/controls/Switch.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/controls/Switch.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/TagInput.js.map +1 -1
- package/dist/node/controls/TagInput.vue_vue_type_script_setup_true_lang.js +122 -111
- package/dist/node/controls/TagInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/TreeSelect.js.map +1 -1
- package/dist/node/controls/TreeSelect.vue_vue_type_script_setup_true_lang.js +56 -56
- package/dist/node/controls/TreeSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/controls/avatar-button.module.js +5 -4
- package/dist/node/controls/avatar-button.module.js.map +1 -1
- package/dist/node/controls/button.module.js +4 -3
- package/dist/node/controls/button.module.js.map +1 -1
- package/dist/node/controls/calendar.module.js +3 -3
- package/dist/node/controls/calendar.module.js.map +1 -1
- package/dist/node/controls/checkbox-group.module.js +1 -1
- package/dist/node/controls/checkbox.module.js +2 -2
- package/dist/node/controls/checkbox.module.js.map +1 -1
- package/dist/node/controls/choice-card.module.js +2 -2
- package/dist/node/controls/choice-card.module.js.map +1 -1
- package/dist/node/controls/color-input.module.js +1 -1
- package/dist/node/controls/color-input.module.js.map +1 -1
- package/dist/node/controls/combobox.module.js +5 -5
- package/dist/node/controls/combobox.module.js.map +1 -1
- package/dist/node/controls/copy-button.module.js +8 -7
- package/dist/node/controls/copy-button.module.js.map +1 -1
- package/dist/node/controls/date-picker.module.js +1 -1
- package/dist/node/controls/date-range-picker.module.js +6 -6
- package/dist/node/controls/date-range-picker.module.js.map +1 -1
- package/dist/node/controls/duration-input.module.js +1 -1
- package/dist/node/controls/file-upload.module.js +1 -1
- package/dist/node/controls/file-upload.module.js.map +1 -1
- package/dist/node/controls/input.module.js +2 -2
- package/dist/node/controls/input.module.js.map +1 -1
- package/dist/node/controls/link.module.js +1 -1
- package/dist/node/controls/link.module.js.map +1 -1
- package/dist/node/controls/month-input.module.js +1 -1
- package/dist/node/controls/multi-select.module.js +5 -5
- package/dist/node/controls/multi-select.module.js.map +1 -1
- package/dist/node/controls/number-input.module.js +1 -1
- package/dist/node/controls/number-input.module.js.map +1 -1
- package/dist/node/controls/otp-input.module.js +2 -2
- package/dist/node/controls/otp-input.module.js.map +1 -1
- package/dist/node/controls/password-input.module.js +2 -2
- package/dist/node/controls/password-input.module.js.map +1 -1
- package/dist/node/controls/provider-button.module.js +1 -1
- package/dist/node/controls/radio-group.module.js +2 -2
- package/dist/node/controls/radio-group.module.js.map +1 -1
- package/dist/node/controls/rating.module.js +1 -1
- package/dist/node/controls/rich-text-input.module.js +1 -1
- package/dist/node/controls/rich-text-input.module.js.map +1 -1
- package/dist/node/controls/segmented-control.module.js +1 -1
- package/dist/node/controls/select.module.js +3 -3
- package/dist/node/controls/select.module.js.map +1 -1
- package/dist/node/controls/slider.module.js +1 -1
- package/dist/node/controls/slider.module.js.map +1 -1
- package/dist/node/controls/split-button.module.js +20 -19
- package/dist/node/controls/split-button.module.js.map +1 -1
- package/dist/node/controls/switch.module.js +1 -1
- package/dist/node/controls/switch.module.js.map +1 -1
- package/dist/node/controls/tag-input.module.js +1 -1
- package/dist/node/controls/textarea.module.js +1 -1
- package/dist/node/controls/time-input.module.js +1 -1
- package/dist/node/controls/tree-select.module.js +1 -1
- package/dist/node/layout/split-pane.module.js +1 -1
- package/dist/node/layout/split-pane.module.js.map +1 -1
- package/dist/node/overlays/Command.js.map +1 -1
- package/dist/node/overlays/Command.vue_vue_type_script_setup_true_lang.js +50 -45
- package/dist/node/overlays/Command.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/overlays/CommandPanel.js.map +1 -1
- package/dist/node/overlays/CommandPanel.vue_vue_type_script_setup_true_lang.js +82 -82
- package/dist/node/overlays/CommandPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/overlays/ContextMenu.js.map +1 -1
- package/dist/node/overlays/ContextMenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/overlays/ContextMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/overlays/ContextMenuSubmenu.js.map +1 -1
- package/dist/node/overlays/ContextMenuSubmenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/overlays/ContextMenuSubmenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/overlays/Dialog.js.map +1 -1
- package/dist/node/overlays/Dialog.vue_vue_type_script_setup_true_lang.js +47 -43
- package/dist/node/overlays/Dialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/overlays/Drawer.js.map +1 -1
- package/dist/node/overlays/Drawer.vue_vue_type_script_setup_true_lang.js +58 -53
- package/dist/node/overlays/Drawer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/overlays/Lightbox.js.map +1 -1
- package/dist/node/overlays/Lightbox.vue_vue_type_script_setup_true_lang.js +65 -61
- package/dist/node/overlays/Lightbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/overlays/Menu.js.map +1 -1
- package/dist/node/overlays/Menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/overlays/Menu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/overlays/MenuSubmenu.js.map +1 -1
- package/dist/node/overlays/MenuSubmenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/overlays/MenuSubmenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/overlays/Menubar.js.map +1 -1
- package/dist/node/overlays/Menubar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/overlays/Menubar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/overlays/MenubarSubmenu.js.map +1 -1
- package/dist/node/overlays/MenubarSubmenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/overlays/MenubarSubmenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/overlays/Popover.js.map +1 -1
- package/dist/node/overlays/Popover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/overlays/Popover.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/overlays/Tabs.js.map +1 -1
- package/dist/node/overlays/Tabs.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/overlays/Tabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/overlays/Toast.js.map +1 -1
- package/dist/node/overlays/Toast.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/overlays/ToastCard.js.map +1 -1
- package/dist/node/overlays/ToastCard.vue_vue_type_script_setup_true_lang.js +74 -71
- package/dist/node/overlays/ToastCard.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/overlays/ToastViewport.js.map +1 -1
- package/dist/node/overlays/ToastViewport.vue_vue_type_script_setup_true_lang.js +70 -59
- package/dist/node/overlays/ToastViewport.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/overlays/Tooltip.js.map +1 -1
- package/dist/node/overlays/Tooltip.vue_vue_type_script_setup_true_lang.js +46 -26
- package/dist/node/overlays/Tooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/overlays/Tour.js.map +1 -1
- package/dist/node/overlays/Tour.vue_vue_type_script_setup_true_lang.js +74 -69
- package/dist/node/overlays/Tour.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/overlays/context-menu.module.js +4 -4
- package/dist/node/overlays/context-menu.module.js.map +1 -1
- package/dist/node/overlays/dialog.module.js +1 -1
- package/dist/node/overlays/dialog.module.js.map +1 -1
- package/dist/node/overlays/drawer.module.js +1 -1
- package/dist/node/overlays/drawer.module.js.map +1 -1
- package/dist/node/overlays/lightbox.module.js +1 -1
- package/dist/node/overlays/menu.module.js +4 -4
- package/dist/node/overlays/menu.module.js.map +1 -1
- package/dist/node/overlays/menubar.module.js +1 -1
- package/dist/node/overlays/menubar.module.js.map +1 -1
- package/dist/node/overlays/popover.module.js +3 -3
- package/dist/node/overlays/popover.module.js.map +1 -1
- package/dist/node/overlays/sheet.module.js +1 -1
- package/dist/node/overlays/sheet.module.js.map +1 -1
- package/dist/node/overlays/tabs.module.js +4 -4
- package/dist/node/overlays/tabs.module.js.map +1 -1
- package/dist/node/overlays/toast.module.js +1 -1
- package/dist/node/overlays/toast.module.js.map +1 -1
- package/dist/node/overlays/tour.module.js +1 -1
- package/dist/node/overlays/tour.module.js.map +1 -1
- package/dist/node/structure/Accordion.js.map +1 -1
- package/dist/node/structure/Accordion.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/structure/Accordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/structure/Alert.js.map +1 -1
- package/dist/node/structure/Alert.vue_vue_type_script_setup_true_lang.js +62 -54
- package/dist/node/structure/Alert.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/structure/Banner.js.map +1 -1
- package/dist/node/structure/Banner.vue_vue_type_script_setup_true_lang.js +42 -34
- package/dist/node/structure/Banner.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/structure/Carousel.js.map +1 -1
- package/dist/node/structure/Carousel.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/node/structure/Carousel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/structure/Collapsible.js.map +1 -1
- package/dist/node/structure/Collapsible.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/node/structure/Collapsible.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/structure/DataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/structure/Pagination.js.map +1 -1
- package/dist/node/structure/Pagination.vue_vue_type_script_setup_true_lang.js +118 -88
- package/dist/node/structure/Pagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/structure/ScrollArea.js.map +1 -1
- package/dist/node/structure/ScrollArea.vue_vue_type_script_setup_true_lang.js +30 -27
- package/dist/node/structure/ScrollArea.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/structure/Table.js.map +1 -1
- package/dist/node/structure/Table.vue_vue_type_script_setup_true_lang.js +71 -61
- package/dist/node/structure/Table.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/node/structure/accordion.module.js +5 -5
- package/dist/node/structure/accordion.module.js.map +1 -1
- package/dist/node/structure/breadcrumbs.module.js +1 -1
- package/dist/node/structure/breadcrumbs.module.js.map +1 -1
- package/dist/node/structure/card.module.js +1 -1
- package/dist/node/structure/card.module.js.map +1 -1
- package/dist/node/structure/carousel.module.js +1 -1
- package/dist/node/structure/carousel.module.js.map +1 -1
- package/dist/node/structure/code-block.module.js +1 -1
- package/dist/node/structure/collapsible.module.js +5 -5
- package/dist/node/structure/collapsible.module.js.map +1 -1
- package/dist/node/structure/cursor-pagination.module.js +1 -1
- package/dist/node/structure/data-table.module.js +1 -1
- package/dist/node/structure/error-summary.module.js +1 -1
- package/dist/node/structure/error-summary.module.js.map +1 -1
- package/dist/node/structure/json-tree.module.js +1 -1
- package/dist/node/structure/json-tree.module.js.map +1 -1
- package/dist/node/structure/list.module.js +1 -1
- package/dist/node/structure/list.module.js.map +1 -1
- package/dist/node/structure/log-view.module.js +1 -1
- package/dist/node/structure/pagination.module.js +4 -3
- package/dist/node/structure/pagination.module.js.map +1 -1
- package/dist/node/structure/rich-text-content.module.js +1 -1
- package/dist/node/structure/section-nav.module.js +1 -1
- package/dist/node/structure/section-nav.module.js.map +1 -1
- package/dist/node/structure/stepper.module.js +2 -2
- package/dist/node/structure/stepper.module.js.map +1 -1
- package/dist/node/structure/table-of-contents.module.js +1 -1
- package/dist/node/structure/table-of-contents.module.js.map +1 -1
- package/dist/node/structure/table.module.js +1 -1
- package/dist/node/structure/table.module.js.map +1 -1
- package/dist/node/structure/tree.module.js +1 -1
- package/dist/node/structure/tree.module.js.map +1 -1
- package/dist/overlays/Command.js.map +1 -1
- package/dist/overlays/Command.vue_vue_type_script_setup_true_lang.js +50 -45
- package/dist/overlays/Command.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/overlays/CommandPanel.js.map +1 -1
- package/dist/overlays/CommandPanel.vue_vue_type_script_setup_true_lang.js +82 -82
- package/dist/overlays/CommandPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/overlays/ContextMenu.js.map +1 -1
- package/dist/overlays/ContextMenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/overlays/ContextMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/overlays/ContextMenuSubmenu.js.map +1 -1
- package/dist/overlays/ContextMenuSubmenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/overlays/ContextMenuSubmenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/overlays/Dialog.js.map +1 -1
- package/dist/overlays/Dialog.vue_vue_type_script_setup_true_lang.js +47 -43
- package/dist/overlays/Dialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/overlays/Drawer.js.map +1 -1
- package/dist/overlays/Drawer.vue_vue_type_script_setup_true_lang.js +58 -53
- package/dist/overlays/Drawer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/overlays/Lightbox.js.map +1 -1
- package/dist/overlays/Lightbox.vue_vue_type_script_setup_true_lang.js +65 -61
- package/dist/overlays/Lightbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/overlays/Menu.js.map +1 -1
- package/dist/overlays/Menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/overlays/Menu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/overlays/MenuSubmenu.js.map +1 -1
- package/dist/overlays/MenuSubmenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/overlays/MenuSubmenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/overlays/Menubar.js.map +1 -1
- package/dist/overlays/Menubar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/overlays/Menubar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/overlays/MenubarSubmenu.js.map +1 -1
- package/dist/overlays/MenubarSubmenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/overlays/MenubarSubmenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/overlays/Popover.js.map +1 -1
- package/dist/overlays/Popover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/overlays/Popover.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/overlays/Tabs.js.map +1 -1
- package/dist/overlays/Tabs.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/overlays/Tabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/overlays/Toast.js.map +1 -1
- package/dist/overlays/Toast.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/overlays/ToastCard.js.map +1 -1
- package/dist/overlays/ToastCard.vue_vue_type_script_setup_true_lang.js +74 -71
- package/dist/overlays/ToastCard.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/overlays/ToastViewport.js.map +1 -1
- package/dist/overlays/ToastViewport.vue_vue_type_script_setup_true_lang.js +70 -59
- package/dist/overlays/ToastViewport.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/overlays/Tooltip.js.map +1 -1
- package/dist/overlays/Tooltip.vue_vue_type_script_setup_true_lang.js +46 -26
- package/dist/overlays/Tooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/overlays/Tour.js.map +1 -1
- package/dist/overlays/Tour.vue_vue_type_script_setup_true_lang.js +74 -69
- package/dist/overlays/Tour.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/overlays/context-menu.css +1 -1
- package/dist/overlays/context-menu.module.js +4 -4
- package/dist/overlays/context-menu.module.js.map +1 -1
- package/dist/overlays/dialog.css +1 -1
- package/dist/overlays/dialog.module.js +1 -1
- package/dist/overlays/dialog.module.js.map +1 -1
- package/dist/overlays/drawer.css +1 -1
- package/dist/overlays/drawer.module.js +1 -1
- package/dist/overlays/drawer.module.js.map +1 -1
- package/dist/overlays/lightbox.css +1 -1
- package/dist/overlays/lightbox.module.js +1 -1
- package/dist/overlays/menu.css +1 -1
- package/dist/overlays/menu.module.js +4 -4
- package/dist/overlays/menu.module.js.map +1 -1
- package/dist/overlays/menubar.css +1 -1
- package/dist/overlays/menubar.module.js +1 -1
- package/dist/overlays/menubar.module.js.map +1 -1
- package/dist/overlays/popover.css +1 -1
- package/dist/overlays/popover.module.js +3 -3
- package/dist/overlays/popover.module.js.map +1 -1
- package/dist/overlays/sheet.css +1 -1
- package/dist/overlays/sheet.module.js +1 -1
- package/dist/overlays/sheet.module.js.map +1 -1
- package/dist/overlays/tabs.css +1 -1
- package/dist/overlays/tabs.module.js +4 -4
- package/dist/overlays/tabs.module.js.map +1 -1
- package/dist/overlays/toast.css +1 -1
- package/dist/overlays/toast.module.js +1 -1
- package/dist/overlays/toast.module.js.map +1 -1
- package/dist/overlays/tour.css +1 -1
- package/dist/overlays/tour.module.js +1 -1
- package/dist/overlays/tour.module.js.map +1 -1
- package/dist/structure/Accordion.js.map +1 -1
- package/dist/structure/Accordion.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/structure/Accordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/structure/Alert.js.map +1 -1
- package/dist/structure/Alert.vue_vue_type_script_setup_true_lang.js +62 -54
- package/dist/structure/Alert.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/structure/Banner.js.map +1 -1
- package/dist/structure/Banner.vue_vue_type_script_setup_true_lang.js +42 -34
- package/dist/structure/Banner.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/structure/Carousel.js.map +1 -1
- package/dist/structure/Carousel.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/structure/Carousel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/structure/Collapsible.js.map +1 -1
- package/dist/structure/Collapsible.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/structure/Collapsible.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/structure/DataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/structure/Pagination.js.map +1 -1
- package/dist/structure/Pagination.vue_vue_type_script_setup_true_lang.js +118 -88
- package/dist/structure/Pagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/structure/ScrollArea.js.map +1 -1
- package/dist/structure/ScrollArea.vue_vue_type_script_setup_true_lang.js +30 -27
- package/dist/structure/ScrollArea.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/structure/Table.js.map +1 -1
- package/dist/structure/Table.vue_vue_type_script_setup_true_lang.js +71 -61
- package/dist/structure/Table.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/structure/accordion.css +1 -1
- package/dist/structure/accordion.module.js +5 -5
- package/dist/structure/accordion.module.js.map +1 -1
- package/dist/structure/breadcrumbs.css +1 -1
- package/dist/structure/breadcrumbs.module.js +1 -1
- package/dist/structure/breadcrumbs.module.js.map +1 -1
- package/dist/structure/card.css +1 -1
- package/dist/structure/card.module.js +1 -1
- package/dist/structure/card.module.js.map +1 -1
- package/dist/structure/carousel.css +1 -1
- package/dist/structure/carousel.module.js +1 -1
- package/dist/structure/carousel.module.js.map +1 -1
- package/dist/structure/code-block.css +1 -1
- package/dist/structure/code-block.module.js +1 -1
- package/dist/structure/collapsible.css +1 -1
- package/dist/structure/collapsible.module.js +5 -5
- package/dist/structure/collapsible.module.js.map +1 -1
- package/dist/structure/cursor-pagination.css +1 -1
- package/dist/structure/cursor-pagination.module.js +1 -1
- package/dist/structure/data-table.css +1 -1
- package/dist/structure/data-table.module.js +1 -1
- package/dist/structure/error-summary.css +1 -1
- package/dist/structure/error-summary.module.js +1 -1
- package/dist/structure/error-summary.module.js.map +1 -1
- package/dist/structure/json-tree.css +1 -1
- package/dist/structure/json-tree.module.js +1 -1
- package/dist/structure/json-tree.module.js.map +1 -1
- package/dist/structure/list.css +1 -1
- package/dist/structure/list.module.js +1 -1
- package/dist/structure/list.module.js.map +1 -1
- package/dist/structure/log-view.css +1 -1
- package/dist/structure/log-view.module.js +1 -1
- package/dist/structure/pagination.css +1 -1
- package/dist/structure/pagination.module.js +4 -3
- package/dist/structure/pagination.module.js.map +1 -1
- package/dist/structure/rich-text-content.css +1 -1
- package/dist/structure/rich-text-content.module.js +1 -1
- package/dist/structure/section-nav.css +1 -1
- package/dist/structure/section-nav.module.js +1 -1
- package/dist/structure/section-nav.module.js.map +1 -1
- package/dist/structure/stepper.css +1 -1
- package/dist/structure/stepper.module.js +2 -2
- package/dist/structure/stepper.module.js.map +1 -1
- package/dist/structure/table-of-contents.css +1 -1
- package/dist/structure/table-of-contents.module.js +1 -1
- package/dist/structure/table-of-contents.module.js.map +1 -1
- package/dist/structure/table.css +1 -1
- package/dist/structure/table.module.js +1 -1
- package/dist/structure/table.module.js.map +1 -1
- package/dist/structure/tree.css +1 -1
- package/dist/structure/tree.module.js +1 -1
- package/dist/structure/tree.module.js.map +1 -1
- package/dist/types/ai/AttachmentChip.vue.d.ts +1 -1
- package/dist/types/ai/ToolCall.vue.d.ts +1 -1
- package/dist/types/archetypes/FormPage.vue.d.ts +1 -0
- package/dist/types/charts/BarChart.vue.d.ts +1 -1
- package/dist/types/controls/FileUpload.vue.d.ts +1 -1
- package/dist/types/controls/RecordButton.vue.d.ts +2 -2
- package/dist/types/controls/Slider.vue.d.ts +1 -1
- package/dist/types/layout/Grid.vue.d.ts +1 -1
- package/dist/types/layout/Inline.vue.d.ts +2 -2
- package/dist/types/layout/Stack.vue.d.ts +2 -2
- package/dist/types/overlays/Drawer.vue.d.ts +1 -1
- package/dist/types/overlays/HoverCard.vue.d.ts +1 -1
- package/dist/types/overlays/Menu.vue.d.ts +1 -1
- package/dist/types/overlays/Popover.vue.d.ts +1 -1
- package/dist/types/overlays/Toast.vue.d.ts +3 -1
- package/dist/types/overlays/Tooltip.vue.d.ts +1 -1
- package/dist/types/structure/EmptyState.vue.d.ts +1 -1
- package/dist/types/structure/Hero.vue.d.ts +1 -1
- package/dist/types/structure/RelativeTime.vue.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","names":[],"sources":["../../src/structure/Table.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A styled native table, the main data display in ListPage (`design/components/table.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/table.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport { computed, onBeforeUnmount, onMounted, provide, ref, useTemplateRef, watch } from 'vue'\n\nimport { agentMember, pressTableSort, tableSort, tableSortColumns } from '@polymorph/vue'\nimport styles from '@polymorph/recipes/structure/table.module.css'\nimport type { TableCellProps } from './TableCell.vue'\nimport type { TableHeaderProps } from './TableHeader.vue'\nimport type { TableRowProps } from './TableRow.vue'\n\nexport type CellProps = TableCellProps\n\nexport type HeaderProps = TableHeaderProps\n\nexport type RowProps = TableRowProps\n\nexport type SortDirection = 'asc' | 'desc'\n\nexport interface TableProps {\n /**\n * Names the **table** with a real `<caption>`, its first child. `label` names the *scroll\n * region*, which exists only while the columns overflow, so a table that fits has no name.\n * That is fine for a page's main table, but a dashboard's chart twin tables would be announced\n * as \"table, table, table\". Announced but not drawn unless `captionVisible`, because most\n * tables already have their name on screen: a page title, or the chart they are the twin of.\n */\n caption?: string\n /**\n * Draws the caption above the table as well as announcing it, for a table whose name is not\n * already beside it. Not left to composition as Heading's caption is, because a `Text` above\n * the table would not be connected to it, and `<caption>` is the element for a table's name.\n */\n captionVisible?: boolean\n /**\n * The table is a **grid**: one tab stop, arrow keys between cells, and rows that may carry\n * `aria-selected`. Only for a component that owns every cell, in practice DataTable. A\n * hand-composed table is a document of prose and links, browsed with the reader's own keys,\n * and taking the arrow keys for a focus ring would only cost them.\n */\n grid?: boolean\n /**\n * Names the scroll region for keyboard users, usually the page's title.\n */\n label?: string\n /**\n * Rows can be selected in bulk. Only meaningful inside a grid, where it tells a screen reader\n * whether \"selected\" means one of many or the only one.\n */\n multiselectable?: boolean\n stickyHeader?: boolean\n}\n\ndefineOptions({ name: 'Table', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<TableProps>(), {\n captionVisible: false,\n grid: false,\n multiselectable: false,\n stickyHeader: false,\n})\ndefineSlots<{ default?: (props: Record<string, never>) => unknown }>()\nconst overflowing = ref(false)\nconst at = ref({ row: 0, column: 0, detail: false })\nconst placed = ref(false)\nconst table = useTemplateRef<HTMLElement>('table')\nconst wrapper = useTemplateRef<HTMLElement>('wrapper')\nconst stopIn = computed(() => (cell: HTMLTableCellElement): HTMLElement => {\n for (const node of Array.from(\n cell.querySelectorAll<HTMLElement>('button, a[href], input, select, textarea'),\n )) {\n if (node.hasAttribute('disabled') || node.getAttribute('aria-hidden') === 'true') continue\n return node\n }\n return cell\n})\nconst gridRows = computed(\n () =>\n (element: HTMLTableElement): HTMLTableRowElement[] =>\n Array.from(element.rows).filter((row) => !row.hasAttribute('data-detail')),\n)\nconst detailUnder = computed(\n () =>\n (row: HTMLTableRowElement | undefined): HTMLTableCellElement | null => {\n const next = row?.nextElementSibling\n return next instanceof HTMLTableRowElement && next.hasAttribute('data-detail')\n ? (next.cells[0] ?? null)\n : null\n },\n)\nconst gridCellOf = computed(\n () =>\n (element: HTMLTableElement, target: EventTarget | null): HTMLTableCellElement | null => {\n let cell =\n target instanceof HTMLElement ? target.closest<HTMLTableCellElement>('th, td') : null\n while (cell !== null && cell.closest('table') !== element) {\n cell = cell.parentElement?.closest<HTMLTableCellElement>('th, td') ?? null\n }\n if (cell === null || cell.parentElement === null) return null\n return cell.parentElement.hasAttribute('data-detail') && cell !== target ? null : cell\n },\n)\nconst positionOf = computed(\n () =>\n (\n element: HTMLTableElement,\n cell: HTMLTableCellElement,\n column: number,\n ): { row: number; column: number; detail: boolean } => {\n const row = cell.parentElement as HTMLTableRowElement\n const rows = gridRows.value(element)\n return row.hasAttribute('data-detail')\n ? {\n row: rows.indexOf(row.previousElementSibling as HTMLTableRowElement),\n column,\n detail: true,\n }\n : { row: rows.indexOf(row), column: cell.cellIndex, detail: false }\n },\n)\nconst clampCell = computed(\n () =>\n (\n element: HTMLTableElement,\n to: { row: number; column: number; detail: boolean },\n ): { row: number; column: number; detail: boolean } | null => {\n const rows = gridRows.value(element)\n const row = Math.min(Math.max(to.row, 0), rows.length - 1)\n const cells = rows[row]?.cells\n if (cells === undefined || cells.length === 0) return null\n return {\n row,\n column: Math.min(Math.max(to.column, 0), cells.length - 1),\n detail: to.detail && row === to.row && detailUnder.value(rows[row]) !== null,\n }\n },\n)\nconst startOf = computed(\n () =>\n (element: HTMLTableElement): { row: number; column: number; detail: boolean } => {\n const cells = Array.from(gridRows.value(element)[0]?.cells ?? [])\n const column = cells.findIndex((cell) => cell.querySelector('[data-undrawn]') === null)\n return { row: 0, column: Math.max(column, 0), detail: false }\n },\n)\nconst whereIn = computed(\n () =>\n (element: HTMLTableElement): { row: number; column: number; detail: boolean } =>\n placed.value ? at.value : startOf.value(element),\n)\nconst stopAt = computed(\n () =>\n (\n element: HTMLTableElement,\n to: { row: number; column: number; detail: boolean },\n ): HTMLElement | null => {\n const row = gridRows.value(element)[to.row]\n if (to.detail) return detailUnder.value(row)\n const cell = row?.cells[to.column]\n return cell === undefined ? null : stopIn.value(cell)\n },\n)\nconst rove = computed(\n () => (element: HTMLTableElement, to: { row: number; column: number; detail: boolean }) => {\n at.value = to\n for (const [index, row] of gridRows.value(element).entries()) {\n for (const cell of Array.from(row.cells)) {\n const stop = stopIn.value(cell)\n const wanted = !to.detail && index === to.row && cell.cellIndex === to.column ? '0' : '-1'\n if (stop !== cell && cell.getAttribute('tabindex') !== '-1')\n cell.setAttribute('tabindex', '-1')\n if (stop.getAttribute('tabindex') !== wanted) stop.setAttribute('tabindex', wanted)\n }\n const under = detailUnder.value(row)\n const held = to.detail && index === to.row ? '0' : '-1'\n if (under !== null && under.getAttribute('tabindex') !== held)\n under.setAttribute('tabindex', held)\n }\n },\n)\nconst focusIn = computed(() => (event: FocusEvent) => {\n const element = table.value as HTMLTableElement | null\n if (element === null) return\n const cell = gridCellOf.value(element, event.target)\n if (cell === null) return\n const to = clampCell.value(\n element,\n positionOf.value(element, cell, whereIn.value(element).column),\n )\n if (to === null) return\n placed.value = true\n rove.value(element, to)\n})\nconst keyDown = computed(() => (event: KeyboardEvent) => {\n const element = table.value as HTMLTableElement | null\n const target = event.target instanceof HTMLElement ? event.target : null\n if (\n element === null ||\n target === null ||\n target.closest(\n 'input:not([type=\"checkbox\"]):not([type=\"radio\"]), textarea, [contenteditable]',\n ) !== null\n )\n return\n const cell = gridCellOf.value(element, target)\n if (cell === null) return\n const rows = gridRows.value(element)\n const here = positionOf.value(element, cell, whereIn.value(element).column)\n const forward = getComputedStyle(element).direction === 'rtl' ? -1 : 1\n const far = event.ctrlKey || event.metaKey\n const last = Number.MAX_SAFE_INTEGER\n let next: { row: number; column: number; detail: boolean } | null\n if (here.detail) {\n switch (event.key) {\n case 'ArrowDown':\n next = here.row + 1 < rows.length ? { ...here, row: here.row + 1, detail: false } : null\n break\n case 'ArrowUp':\n next = { ...here, detail: false }\n break\n case 'ArrowRight':\n case 'ArrowLeft':\n next = null\n break\n case 'Home':\n next = far ? { row: 0, column: 0, detail: false } : null\n break\n case 'End':\n next = far ? { row: last, column: last, detail: false } : null\n break\n default:\n return\n }\n } else {\n switch (event.key) {\n case 'ArrowRight':\n next = { ...here, column: here.column + forward }\n break\n case 'ArrowLeft':\n next = { ...here, column: here.column - forward }\n break\n case 'ArrowDown':\n next =\n detailUnder.value(rows[here.row]) !== null\n ? { ...here, detail: true }\n : { ...here, row: here.row + 1 }\n break\n case 'ArrowUp':\n next =\n detailUnder.value(rows[here.row - 1]) !== null\n ? { ...here, row: here.row - 1, detail: true }\n : { ...here, row: here.row - 1 }\n break\n case 'Home':\n next = far ? { row: 0, column: 0, detail: false } : { ...here, column: 0 }\n break\n case 'End':\n next = far ? { row: last, column: last, detail: false } : { ...here, column: last }\n break\n default:\n return\n }\n }\n event.preventDefault()\n const to = next === null ? null : clampCell.value(element, next)\n if (to === null) return\n placed.value = true\n rove.value(element, to)\n stopAt.value(element, to)?.focus()\n})\nconst reclamp = computed(() => () => {\n const element = table.value as HTMLTableElement | null\n if (element === null || !props.grid) return\n const to = clampCell.value(element, whereIn.value(element))\n if (to !== null) rove.value(element, to)\n})\nprovide('polymorph:Table', {\n get grid() {\n return props.grid\n },\n})\nlet release1: (() => void) | undefined\nconst effect1 = () => {\n release1?.()\n const run = () => {\n overflowing.value =\n wrapper.value !== null && wrapper.value.scrollWidth > wrapper.value.clientWidth\n }\n const resize = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(run)\n for (const element of [wrapper.value, wrapper.value?.firstElementChild])\n if (element) resize?.observe(element)\n release1 = () => {\n resize?.disconnect()\n }\n run()\n}\nonMounted(effect1)\nonBeforeUnmount(() => release1?.())\nlet release2: (() => void) | undefined\nconst effect2 = () => {\n release2?.()\n const run = () => {\n reclamp.value()\n }\n const mutation = typeof MutationObserver === 'undefined' ? undefined : new MutationObserver(run)\n for (const element of [table.value])\n if (element)\n mutation?.observe(element, {\n childList: true,\n characterData: true,\n subtree: true,\n attributeFilter: ['disabled'],\n })\n release2 = () => {\n mutation?.disconnect()\n }\n run()\n}\nonMounted(effect2)\nwatch(() => props.grid, effect2, { flush: 'post' })\nonBeforeUnmount(() => release2?.())\nlet release3: (() => void) | undefined\nconst effect3 = () => {\n release3?.()\n const ran =\n wrapper.value?.parentElement?.closest('[data-member]')?.getAttribute('data-member') ===\n 'data-table'\n ? () => {}\n : agentMember({\n member: 'Table',\n element: () => wrapper.value,\n state: () => ({\n 'sort-key': tableSort(table.value).key,\n 'sort-direction': tableSort(table.value).direction,\n columns: tableSortColumns(table.value),\n }),\n actions: { sort: { argument: 'id', run: (value) => pressTableSort(table.value, value) } },\n })\n release3 = () => {\n ran()\n }\n}\nonMounted(effect3)\nonBeforeUnmount(() => release3?.())\n</script>\n\n<template>\n <div\n ref=\"wrapper\"\n :class=\"styles.wrapper\"\n :data-sticky-header=\"stickyHeader ? '' : undefined\"\n :data-overflowing=\"overflowing ? '' : undefined\"\n :tabindex=\"overflowing && !grid ? '0' : undefined\"\n :role=\"overflowing && label !== undefined ? 'region' : undefined\"\n :aria-label=\"overflowing ? label : undefined\"\n data-member=\"table\"\n >\n <!-- table -->\n <table\n ref=\"table\"\n :class=\"styles.table\"\n :role=\"grid ? 'grid' : undefined\"\n :aria-multiselectable=\"grid && multiselectable ? 'true' : undefined\"\n @focusin=\"grid && focusIn($event)\"\n @keydown=\"grid && keyDown($event)\"\n >\n <!-- caption -->\n <caption\n v-if=\"caption !== undefined\"\n :class=\"[\n captionVisible ? styles.caption : undefined,\n !captionVisible ? styles.captionHidden : undefined,\n ]\"\n >\n {{\n caption\n }}\n </caption>\n <slot />\n </table>\n </div>\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Table.js","names":[],"sources":["../../src/structure/Table.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A styled native table, the main data display in ListPage (`design/components/table.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/table.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport { computed, onBeforeUnmount, onMounted, provide, ref, useTemplateRef, watch } from 'vue'\n\nimport { agentMember, pressTableSort, tableSort, tableSortColumns } from '@polymorph/vue'\nimport styles from '@polymorph/recipes/structure/table.module.css'\nimport type { TableCellProps } from './TableCell.vue'\nimport type { TableHeaderProps } from './TableHeader.vue'\nimport type { TableRowProps } from './TableRow.vue'\n\nexport type CellProps = TableCellProps\n\nexport type HeaderProps = TableHeaderProps\n\nexport type RowProps = TableRowProps\n\nexport type SortDirection = 'asc' | 'desc'\n\nexport interface TableProps {\n /**\n * Names the **table** with a real `<caption>`, its first child. `label` names the *scroll\n * region*, which exists only while the columns overflow, so a table that fits has no name.\n * That is fine for a page's main table, but a dashboard's chart twin tables would be announced\n * as \"table, table, table\". Announced but not drawn unless `captionVisible`, because most\n * tables already have their name on screen: a page title, or the chart they are the twin of.\n */\n caption?: string\n /**\n * Draws the caption above the table as well as announcing it, for a table whose name is not\n * already beside it. Not left to composition as Heading's caption is, because a `Text` above\n * the table would not be connected to it, and `<caption>` is the element for a table's name.\n */\n captionVisible?: boolean\n /**\n * The table is a **grid**: one tab stop, arrow keys between cells, and rows that may carry\n * `aria-selected`. Only for a component that owns every cell, in practice DataTable. A\n * hand-composed table is a document of prose and links, browsed with the reader's own keys,\n * and taking the arrow keys for a focus ring would only cost them.\n */\n grid?: boolean\n /**\n * Names the scroll region for keyboard users, usually the page's title.\n */\n label?: string\n /**\n * Rows can be selected in bulk. Only meaningful inside a grid, where it tells a screen reader\n * whether \"selected\" means one of many or the only one.\n */\n multiselectable?: boolean\n stickyHeader?: boolean\n}\n\ndefineOptions({ name: 'Table', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<TableProps>(), {\n captionVisible: false,\n grid: false,\n multiselectable: false,\n stickyHeader: false,\n})\ndefineSlots<{ default?: (props: Record<string, never>) => unknown }>()\nconst overflowing = ref(false)\nconst at = ref({ row: 0, column: 0, detail: false })\nconst placed = ref(false)\nconst holds = ref(false)\nconst table = useTemplateRef<HTMLElement>('table')\nconst wrapper = useTemplateRef<HTMLElement>('wrapper')\nconst stopIn = computed(() => (cell: HTMLTableCellElement): HTMLElement => {\n for (const node of Array.from(\n cell.querySelectorAll<HTMLElement>('button, a[href], input, select, textarea'),\n )) {\n if (node.hasAttribute('disabled') || node.getAttribute('aria-hidden') === 'true') continue\n return node\n }\n return cell\n})\nconst gridRows = computed(\n () =>\n (element: HTMLTableElement): HTMLTableRowElement[] =>\n Array.from(element.rows).filter((row) => !row.hasAttribute('data-detail')),\n)\nconst detailUnder = computed(\n () =>\n (row: HTMLTableRowElement | undefined): HTMLTableCellElement | null => {\n const next = row?.nextElementSibling\n return next instanceof HTMLTableRowElement && next.hasAttribute('data-detail')\n ? (next.cells[0] ?? null)\n : null\n },\n)\nconst gridCellOf = computed(\n () =>\n (element: HTMLTableElement, target: EventTarget | null): HTMLTableCellElement | null => {\n let cell =\n target instanceof HTMLElement ? target.closest<HTMLTableCellElement>('th, td') : null\n while (cell !== null && cell.closest('table') !== element) {\n cell = cell.parentElement?.closest<HTMLTableCellElement>('th, td') ?? null\n }\n if (cell === null || cell.parentElement === null) return null\n return cell.parentElement.hasAttribute('data-detail') && cell !== target ? null : cell\n },\n)\nconst positionOf = computed(\n () =>\n (\n element: HTMLTableElement,\n cell: HTMLTableCellElement,\n column: number,\n ): { row: number; column: number; detail: boolean } => {\n const row = cell.parentElement as HTMLTableRowElement\n const rows = gridRows.value(element)\n return row.hasAttribute('data-detail')\n ? {\n row: rows.indexOf(row.previousElementSibling as HTMLTableRowElement),\n column,\n detail: true,\n }\n : { row: rows.indexOf(row), column: cell.cellIndex, detail: false }\n },\n)\nconst clampCell = computed(\n () =>\n (\n element: HTMLTableElement,\n to: { row: number; column: number; detail: boolean },\n ): { row: number; column: number; detail: boolean } | null => {\n const rows = gridRows.value(element)\n const row = Math.min(Math.max(to.row, 0), rows.length - 1)\n const cells = rows[row]?.cells\n if (cells === undefined || cells.length === 0) return null\n return {\n row,\n column: Math.min(Math.max(to.column, 0), cells.length - 1),\n detail: to.detail && row === to.row && detailUnder.value(rows[row]) !== null,\n }\n },\n)\nconst startOf = computed(\n () =>\n (element: HTMLTableElement): { row: number; column: number; detail: boolean } => {\n const cells = Array.from(gridRows.value(element)[0]?.cells ?? [])\n const column = cells.findIndex((cell) => cell.querySelector('[data-undrawn]') === null)\n return { row: 0, column: Math.max(column, 0), detail: false }\n },\n)\nconst whereIn = computed(\n () =>\n (element: HTMLTableElement): { row: number; column: number; detail: boolean } =>\n placed.value ? at.value : startOf.value(element),\n)\nconst stopAt = computed(\n () =>\n (\n element: HTMLTableElement,\n to: { row: number; column: number; detail: boolean },\n ): HTMLElement | null => {\n const row = gridRows.value(element)[to.row]\n if (to.detail) return detailUnder.value(row)\n const cell = row?.cells[to.column]\n return cell === undefined ? null : stopIn.value(cell)\n },\n)\nconst rove = computed(\n () => (element: HTMLTableElement, to: { row: number; column: number; detail: boolean }) => {\n at.value = to\n for (const [index, row] of gridRows.value(element).entries()) {\n for (const cell of Array.from(row.cells)) {\n const stop = stopIn.value(cell)\n const wanted = !to.detail && index === to.row && cell.cellIndex === to.column ? '0' : '-1'\n if (stop !== cell && cell.getAttribute('tabindex') !== '-1')\n cell.setAttribute('tabindex', '-1')\n if (stop.getAttribute('tabindex') !== wanted) stop.setAttribute('tabindex', wanted)\n }\n const under = detailUnder.value(row)\n const held = to.detail && index === to.row ? '0' : '-1'\n if (under !== null && under.getAttribute('tabindex') !== held)\n under.setAttribute('tabindex', held)\n }\n },\n)\nconst focusIn = computed(() => (event: FocusEvent) => {\n const element = table.value as HTMLTableElement | null\n if (element === null) return\n if (!holds.value) holds.value = true\n const cell = gridCellOf.value(element, event.target)\n if (cell === null) return\n const to = clampCell.value(\n element,\n positionOf.value(element, cell, whereIn.value(element).column),\n )\n if (to === null) return\n placed.value = true\n rove.value(element, to)\n})\nconst focusOut = computed(() => (event: FocusEvent) => {\n const element = table.value as HTMLTableElement | null\n const left = event.target\n queueMicrotask(() => {\n if (\n element !== null &&\n left instanceof Node &&\n left.isConnected &&\n !element.contains(document.activeElement)\n )\n holds.value = false\n })\n})\nconst keyDown = computed(() => (event: KeyboardEvent) => {\n const element = table.value as HTMLTableElement | null\n const target = event.target instanceof HTMLElement ? event.target : null\n if (\n element === null ||\n target === null ||\n target.closest(\n 'input:not([type=\"checkbox\"]):not([type=\"radio\"]), textarea, [contenteditable]',\n ) !== null\n )\n return\n const cell = gridCellOf.value(element, target)\n if (cell === null) return\n const rows = gridRows.value(element)\n const here = positionOf.value(element, cell, whereIn.value(element).column)\n const forward = getComputedStyle(element).direction === 'rtl' ? -1 : 1\n const far = event.ctrlKey || event.metaKey\n const last = Number.MAX_SAFE_INTEGER\n let next: { row: number; column: number; detail: boolean } | null\n if (here.detail) {\n switch (event.key) {\n case 'ArrowDown':\n next = here.row + 1 < rows.length ? { ...here, row: here.row + 1, detail: false } : null\n break\n case 'ArrowUp':\n next = { ...here, detail: false }\n break\n case 'ArrowRight':\n case 'ArrowLeft':\n next = null\n break\n case 'Home':\n next = far ? { row: 0, column: 0, detail: false } : null\n break\n case 'End':\n next = far ? { row: last, column: last, detail: false } : null\n break\n default:\n return\n }\n } else {\n switch (event.key) {\n case 'ArrowRight':\n next = { ...here, column: here.column + forward }\n break\n case 'ArrowLeft':\n next = { ...here, column: here.column - forward }\n break\n case 'ArrowDown':\n next =\n detailUnder.value(rows[here.row]) !== null\n ? { ...here, detail: true }\n : { ...here, row: here.row + 1 }\n break\n case 'ArrowUp':\n next =\n detailUnder.value(rows[here.row - 1]) !== null\n ? { ...here, row: here.row - 1, detail: true }\n : { ...here, row: here.row - 1 }\n break\n case 'Home':\n next = far ? { row: 0, column: 0, detail: false } : { ...here, column: 0 }\n break\n case 'End':\n next = far ? { row: last, column: last, detail: false } : { ...here, column: last }\n break\n default:\n return\n }\n }\n event.preventDefault()\n const to = next === null ? null : clampCell.value(element, next)\n if (to === null) return\n placed.value = true\n rove.value(element, to)\n stopAt.value(element, to)?.focus()\n})\nconst reclamp = computed(() => () => {\n const element = table.value as HTMLTableElement | null\n if (element === null || !props.grid) return\n const to = clampCell.value(element, whereIn.value(element))\n if (to === null) return\n rove.value(element, to)\n const fell = document.activeElement === null || document.activeElement === document.body\n if (holds.value && fell) stopAt.value(element, to)?.focus()\n})\nprovide('polymorph:Table', {\n get grid() {\n return props.grid\n },\n})\nlet release1: (() => void) | undefined\nconst effect1 = () => {\n release1?.()\n const run = () => {\n overflowing.value =\n wrapper.value !== null && wrapper.value.scrollWidth > wrapper.value.clientWidth\n }\n const resize = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(run)\n for (const element of [wrapper.value, wrapper.value?.firstElementChild])\n if (element) resize?.observe(element)\n release1 = () => {\n resize?.disconnect()\n }\n run()\n}\nonMounted(effect1)\nonBeforeUnmount(() => release1?.())\nlet release2: (() => void) | undefined\nconst effect2 = () => {\n release2?.()\n const run = () => {\n reclamp.value()\n }\n const mutation = typeof MutationObserver === 'undefined' ? undefined : new MutationObserver(run)\n for (const element of [table.value])\n if (element)\n mutation?.observe(element, {\n childList: true,\n characterData: true,\n subtree: true,\n attributeFilter: ['disabled'],\n })\n release2 = () => {\n mutation?.disconnect()\n }\n run()\n}\nonMounted(effect2)\nwatch(() => props.grid, effect2, { flush: 'post' })\nonBeforeUnmount(() => release2?.())\nlet release3: (() => void) | undefined\nconst effect3 = () => {\n release3?.()\n const ran =\n wrapper.value?.parentElement?.closest('[data-member]')?.getAttribute('data-member') ===\n 'data-table'\n ? () => {}\n : agentMember({\n member: 'Table',\n element: () => wrapper.value,\n state: () => ({\n 'sort-key': tableSort(table.value).key,\n 'sort-direction': tableSort(table.value).direction,\n columns: tableSortColumns(table.value),\n }),\n actions: { sort: { argument: 'id', run: (value) => pressTableSort(table.value, value) } },\n })\n release3 = () => {\n ran()\n }\n}\nonMounted(effect3)\nonBeforeUnmount(() => release3?.())\n</script>\n\n<template>\n <div\n ref=\"wrapper\"\n :class=\"styles.wrapper\"\n :data-sticky-header=\"stickyHeader ? '' : undefined\"\n :data-overflowing=\"overflowing ? '' : undefined\"\n :tabindex=\"overflowing && !grid ? '0' : undefined\"\n :role=\"overflowing && label !== undefined ? 'region' : undefined\"\n :aria-label=\"overflowing ? label : undefined\"\n data-member=\"table\"\n >\n <!-- table -->\n <table\n ref=\"table\"\n :class=\"styles.table\"\n :role=\"grid ? 'grid' : undefined\"\n :aria-multiselectable=\"grid && multiselectable ? 'true' : undefined\"\n @focusin=\"grid && focusIn($event)\"\n @focusout=\"grid && focusOut($event)\"\n @keydown=\"grid && keyDown($event)\"\n >\n <!-- caption -->\n <caption\n v-if=\"caption !== undefined\"\n :class=\"[\n captionVisible ? styles.caption : undefined,\n !captionVisible ? styles.captionHidden : undefined,\n ]\"\n >\n {{\n caption\n }}\n </caption>\n <slot />\n </table>\n </div>\n</template>\n"],"mappings":""}
|
|
@@ -37,18 +37,18 @@ var x = [
|
|
|
37
37
|
row: 0,
|
|
38
38
|
column: 0,
|
|
39
39
|
detail: !1
|
|
40
|
-
}), E = h(!1), D = y("table"),
|
|
40
|
+
}), E = h(!1), D = h(!1), O = y("table"), k = y("wrapper"), A = a(() => (e) => {
|
|
41
41
|
for (let t of Array.from(e.querySelectorAll("button, a[href], input, select, textarea"))) if (!(t.hasAttribute("disabled") || t.getAttribute("aria-hidden") === "true")) return t;
|
|
42
42
|
return e;
|
|
43
|
-
}),
|
|
43
|
+
}), j = a(() => (e) => Array.from(e.rows).filter((e) => !e.hasAttribute("data-detail"))), M = a(() => (e) => {
|
|
44
44
|
let t = e?.nextElementSibling;
|
|
45
45
|
return t instanceof HTMLTableRowElement && t.hasAttribute("data-detail") ? t.cells[0] ?? null : null;
|
|
46
|
-
}),
|
|
46
|
+
}), N = a(() => (e, t) => {
|
|
47
47
|
let n = t instanceof HTMLElement ? t.closest("th, td") : null;
|
|
48
48
|
for (; n !== null && n.closest("table") !== e;) n = n.parentElement?.closest("th, td") ?? null;
|
|
49
49
|
return n === null || n.parentElement === null || n.parentElement.hasAttribute("data-detail") && n !== t ? null : n;
|
|
50
|
-
}),
|
|
51
|
-
let r = t.parentElement, i =
|
|
50
|
+
}), P = a(() => (e, t, n) => {
|
|
51
|
+
let r = t.parentElement, i = j.value(e);
|
|
52
52
|
return r.hasAttribute("data-detail") ? {
|
|
53
53
|
row: i.indexOf(r.previousElementSibling),
|
|
54
54
|
column: n,
|
|
@@ -58,48 +58,54 @@ var x = [
|
|
|
58
58
|
column: t.cellIndex,
|
|
59
59
|
detail: !1
|
|
60
60
|
};
|
|
61
|
-
}),
|
|
62
|
-
let n =
|
|
61
|
+
}), F = a(() => (e, t) => {
|
|
62
|
+
let n = j.value(e), r = Math.min(Math.max(t.row, 0), n.length - 1), i = n[r]?.cells;
|
|
63
63
|
return i === void 0 || i.length === 0 ? null : {
|
|
64
64
|
row: r,
|
|
65
65
|
column: Math.min(Math.max(t.column, 0), i.length - 1),
|
|
66
|
-
detail: t.detail && r === t.row &&
|
|
66
|
+
detail: t.detail && r === t.row && M.value(n[r]) !== null
|
|
67
67
|
};
|
|
68
|
-
}),
|
|
69
|
-
let t = Array.from(
|
|
68
|
+
}), I = a(() => (e) => {
|
|
69
|
+
let t = Array.from(j.value(e)[0]?.cells ?? []).findIndex((e) => e.querySelector("[data-undrawn]") === null);
|
|
70
70
|
return {
|
|
71
71
|
row: 0,
|
|
72
72
|
column: Math.max(t, 0),
|
|
73
73
|
detail: !1
|
|
74
74
|
};
|
|
75
|
-
}),
|
|
76
|
-
let n =
|
|
77
|
-
if (t.detail) return
|
|
75
|
+
}), L = a(() => (e) => E.value ? T.value : I.value(e)), R = a(() => (e, t) => {
|
|
76
|
+
let n = j.value(e)[t.row];
|
|
77
|
+
if (t.detail) return M.value(n);
|
|
78
78
|
let r = n?.cells[t.column];
|
|
79
|
-
return r === void 0 ? null :
|
|
80
|
-
}),
|
|
79
|
+
return r === void 0 ? null : A.value(r);
|
|
80
|
+
}), z = a(() => (e, t) => {
|
|
81
81
|
T.value = t;
|
|
82
|
-
for (let [n, r] of
|
|
82
|
+
for (let [n, r] of j.value(e).entries()) {
|
|
83
83
|
for (let e of Array.from(r.cells)) {
|
|
84
|
-
let r =
|
|
84
|
+
let r = A.value(e), i = !t.detail && n === t.row && e.cellIndex === t.column ? "0" : "-1";
|
|
85
85
|
r !== e && e.getAttribute("tabindex") !== "-1" && e.setAttribute("tabindex", "-1"), r.getAttribute("tabindex") !== i && r.setAttribute("tabindex", i);
|
|
86
86
|
}
|
|
87
|
-
let e =
|
|
87
|
+
let e = M.value(r), i = t.detail && n === t.row ? "0" : "-1";
|
|
88
88
|
e !== null && e.getAttribute("tabindex") !== i && e.setAttribute("tabindex", i);
|
|
89
89
|
}
|
|
90
|
-
}),
|
|
91
|
-
let t =
|
|
90
|
+
}), B = a(() => (e) => {
|
|
91
|
+
let t = O.value;
|
|
92
92
|
if (t === null) return;
|
|
93
|
-
|
|
93
|
+
D.value ||= !0;
|
|
94
|
+
let n = N.value(t, e.target);
|
|
94
95
|
if (n === null) return;
|
|
95
|
-
let r =
|
|
96
|
-
r !== null && (E.value = !0,
|
|
97
|
-
}),
|
|
98
|
-
let t =
|
|
96
|
+
let r = F.value(t, P.value(t, n, L.value(t).column));
|
|
97
|
+
r !== null && (E.value = !0, z.value(t, r));
|
|
98
|
+
}), V = a(() => (e) => {
|
|
99
|
+
let t = O.value, n = e.target;
|
|
100
|
+
queueMicrotask(() => {
|
|
101
|
+
t !== null && n instanceof Node && n.isConnected && !t.contains(document.activeElement) && (D.value = !1);
|
|
102
|
+
});
|
|
103
|
+
}), H = a(() => (e) => {
|
|
104
|
+
let t = O.value, n = e.target instanceof HTMLElement ? e.target : null;
|
|
99
105
|
if (t === null || n === null || n.closest("input:not([type=\"checkbox\"]):not([type=\"radio\"]), textarea, [contenteditable]") !== null) return;
|
|
100
|
-
let r =
|
|
106
|
+
let r = N.value(t, n);
|
|
101
107
|
if (r === null) return;
|
|
102
|
-
let i =
|
|
108
|
+
let i = j.value(t), a = P.value(t, r, L.value(t).column), o = getComputedStyle(t).direction === "rtl" ? -1 : 1, s = e.ctrlKey || e.metaKey, c = 2 ** 53 - 1, l;
|
|
103
109
|
if (a.detail) switch (e.key) {
|
|
104
110
|
case "ArrowDown":
|
|
105
111
|
l = a.row + 1 < i.length ? {
|
|
@@ -148,7 +154,7 @@ var x = [
|
|
|
148
154
|
};
|
|
149
155
|
break;
|
|
150
156
|
case "ArrowDown":
|
|
151
|
-
l =
|
|
157
|
+
l = M.value(i[a.row]) === null ? {
|
|
152
158
|
...a,
|
|
153
159
|
row: a.row + 1
|
|
154
160
|
} : {
|
|
@@ -157,7 +163,7 @@ var x = [
|
|
|
157
163
|
};
|
|
158
164
|
break;
|
|
159
165
|
case "ArrowUp":
|
|
160
|
-
l =
|
|
166
|
+
l = M.value(i[a.row - 1]) === null ? {
|
|
161
167
|
...a,
|
|
162
168
|
row: a.row - 1
|
|
163
169
|
} : {
|
|
@@ -189,66 +195,69 @@ var x = [
|
|
|
189
195
|
default: return;
|
|
190
196
|
}
|
|
191
197
|
e.preventDefault();
|
|
192
|
-
let u = l === null ? null :
|
|
193
|
-
u !== null && (E.value = !0,
|
|
194
|
-
}),
|
|
195
|
-
let e =
|
|
198
|
+
let u = l === null ? null : F.value(t, l);
|
|
199
|
+
u !== null && (E.value = !0, z.value(t, u), R.value(t, u)?.focus());
|
|
200
|
+
}), U = a(() => () => {
|
|
201
|
+
let e = O.value;
|
|
196
202
|
if (e === null || !C.grid) return;
|
|
197
|
-
let t =
|
|
198
|
-
t
|
|
203
|
+
let t = F.value(e, L.value(e));
|
|
204
|
+
if (t === null) return;
|
|
205
|
+
z.value(e, t);
|
|
206
|
+
let n = document.activeElement === null || document.activeElement === document.body;
|
|
207
|
+
D.value && n && R.value(e, t)?.focus();
|
|
199
208
|
});
|
|
200
209
|
m("polymorph:Table", { get grid() {
|
|
201
210
|
return C.grid;
|
|
202
211
|
} });
|
|
203
|
-
let
|
|
212
|
+
let W;
|
|
204
213
|
f(() => {
|
|
205
|
-
|
|
214
|
+
W?.();
|
|
206
215
|
let e = () => {
|
|
207
|
-
w.value =
|
|
216
|
+
w.value = k.value !== null && k.value.scrollWidth > k.value.clientWidth;
|
|
208
217
|
}, t = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(e);
|
|
209
|
-
for (let e of [
|
|
210
|
-
|
|
218
|
+
for (let e of [k.value, k.value?.firstElementChild]) e && t?.observe(e);
|
|
219
|
+
W = () => {
|
|
211
220
|
t?.disconnect();
|
|
212
221
|
}, e();
|
|
213
|
-
}), d(() =>
|
|
214
|
-
let
|
|
215
|
-
|
|
222
|
+
}), d(() => W?.());
|
|
223
|
+
let G, K = () => {
|
|
224
|
+
G?.();
|
|
216
225
|
let e = () => {
|
|
217
|
-
|
|
226
|
+
U.value();
|
|
218
227
|
}, t = typeof MutationObserver > "u" ? void 0 : new MutationObserver(e);
|
|
219
|
-
for (let e of [
|
|
228
|
+
for (let e of [O.value]) e && t?.observe(e, {
|
|
220
229
|
childList: !0,
|
|
221
230
|
characterData: !0,
|
|
222
231
|
subtree: !0,
|
|
223
232
|
attributeFilter: ["disabled"]
|
|
224
233
|
});
|
|
225
|
-
|
|
234
|
+
G = () => {
|
|
226
235
|
t?.disconnect();
|
|
227
236
|
}, e();
|
|
228
237
|
};
|
|
229
|
-
f(
|
|
230
|
-
let
|
|
238
|
+
f(K), b(() => C.grid, K, { flush: "post" }), d(() => G?.());
|
|
239
|
+
let q;
|
|
231
240
|
return f(() => {
|
|
232
|
-
|
|
233
|
-
let e =
|
|
241
|
+
q?.();
|
|
242
|
+
let e = k.value?.parentElement?.closest("[data-member]")?.getAttribute("data-member") === "data-table" ? () => {} : t({
|
|
234
243
|
member: "Table",
|
|
235
|
-
element: () =>
|
|
244
|
+
element: () => k.value,
|
|
236
245
|
state: () => ({
|
|
237
|
-
"sort-key": r(
|
|
238
|
-
"sort-direction": r(
|
|
239
|
-
columns: i(
|
|
246
|
+
"sort-key": r(O.value).key,
|
|
247
|
+
"sort-direction": r(O.value).direction,
|
|
248
|
+
columns: i(O.value)
|
|
240
249
|
}),
|
|
241
250
|
actions: { sort: {
|
|
242
251
|
argument: "id",
|
|
243
|
-
run: (e) => n(
|
|
252
|
+
run: (e) => n(O.value, e)
|
|
244
253
|
} }
|
|
245
254
|
});
|
|
246
|
-
|
|
255
|
+
q = () => {
|
|
247
256
|
e();
|
|
248
257
|
};
|
|
249
|
-
}), d(() =>
|
|
258
|
+
}), d(() => q?.()), (t, n) => (p(), s("div", {
|
|
250
259
|
ref_key: "wrapper",
|
|
251
|
-
ref:
|
|
260
|
+
ref: k,
|
|
252
261
|
class: u(v(e).wrapper),
|
|
253
262
|
"data-sticky-header": l.stickyHeader ? "" : void 0,
|
|
254
263
|
"data-overflowing": w.value ? "" : void 0,
|
|
@@ -258,12 +267,13 @@ var x = [
|
|
|
258
267
|
"data-member": "table"
|
|
259
268
|
}, [c("table", {
|
|
260
269
|
ref_key: "table",
|
|
261
|
-
ref:
|
|
270
|
+
ref: O,
|
|
262
271
|
class: u(v(e).table),
|
|
263
272
|
role: l.grid ? "grid" : void 0,
|
|
264
273
|
"aria-multiselectable": l.grid && l.multiselectable ? "true" : void 0,
|
|
265
|
-
onFocusin: n[0] ||= (e) => l.grid &&
|
|
266
|
-
|
|
274
|
+
onFocusin: n[0] ||= (e) => l.grid && B.value(e),
|
|
275
|
+
onFocusout: n[1] ||= (e) => l.grid && V.value(e),
|
|
276
|
+
onKeydown: n[2] ||= (e) => l.grid && H.value(e)
|
|
267
277
|
}, [l.caption === void 0 ? o("", !0) : (p(), s("caption", {
|
|
268
278
|
key: 0,
|
|
269
279
|
class: u([l.captionVisible ? v(e).caption : void 0, l.captionVisible ? void 0 : v(e).captionHidden])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/structure/Table.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A styled native table, the main data display in ListPage (`design/components/table.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/table.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport { computed, onBeforeUnmount, onMounted, provide, ref, useTemplateRef, watch } from 'vue'\n\nimport { agentMember, pressTableSort, tableSort, tableSortColumns } from '@polymorph/vue'\nimport styles from '@polymorph/recipes/structure/table.module.css'\nimport type { TableCellProps } from './TableCell.vue'\nimport type { TableHeaderProps } from './TableHeader.vue'\nimport type { TableRowProps } from './TableRow.vue'\n\nexport type CellProps = TableCellProps\n\nexport type HeaderProps = TableHeaderProps\n\nexport type RowProps = TableRowProps\n\nexport type SortDirection = 'asc' | 'desc'\n\nexport interface TableProps {\n /**\n * Names the **table** with a real `<caption>`, its first child. `label` names the *scroll\n * region*, which exists only while the columns overflow, so a table that fits has no name.\n * That is fine for a page's main table, but a dashboard's chart twin tables would be announced\n * as \"table, table, table\". Announced but not drawn unless `captionVisible`, because most\n * tables already have their name on screen: a page title, or the chart they are the twin of.\n */\n caption?: string\n /**\n * Draws the caption above the table as well as announcing it, for a table whose name is not\n * already beside it. Not left to composition as Heading's caption is, because a `Text` above\n * the table would not be connected to it, and `<caption>` is the element for a table's name.\n */\n captionVisible?: boolean\n /**\n * The table is a **grid**: one tab stop, arrow keys between cells, and rows that may carry\n * `aria-selected`. Only for a component that owns every cell, in practice DataTable. A\n * hand-composed table is a document of prose and links, browsed with the reader's own keys,\n * and taking the arrow keys for a focus ring would only cost them.\n */\n grid?: boolean\n /**\n * Names the scroll region for keyboard users, usually the page's title.\n */\n label?: string\n /**\n * Rows can be selected in bulk. Only meaningful inside a grid, where it tells a screen reader\n * whether \"selected\" means one of many or the only one.\n */\n multiselectable?: boolean\n stickyHeader?: boolean\n}\n\ndefineOptions({ name: 'Table', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<TableProps>(), {\n captionVisible: false,\n grid: false,\n multiselectable: false,\n stickyHeader: false,\n})\ndefineSlots<{ default?: (props: Record<string, never>) => unknown }>()\nconst overflowing = ref(false)\nconst at = ref({ row: 0, column: 0, detail: false })\nconst placed = ref(false)\nconst table = useTemplateRef<HTMLElement>('table')\nconst wrapper = useTemplateRef<HTMLElement>('wrapper')\nconst stopIn = computed(() => (cell: HTMLTableCellElement): HTMLElement => {\n for (const node of Array.from(\n cell.querySelectorAll<HTMLElement>('button, a[href], input, select, textarea'),\n )) {\n if (node.hasAttribute('disabled') || node.getAttribute('aria-hidden') === 'true') continue\n return node\n }\n return cell\n})\nconst gridRows = computed(\n () =>\n (element: HTMLTableElement): HTMLTableRowElement[] =>\n Array.from(element.rows).filter((row) => !row.hasAttribute('data-detail')),\n)\nconst detailUnder = computed(\n () =>\n (row: HTMLTableRowElement | undefined): HTMLTableCellElement | null => {\n const next = row?.nextElementSibling\n return next instanceof HTMLTableRowElement && next.hasAttribute('data-detail')\n ? (next.cells[0] ?? null)\n : null\n },\n)\nconst gridCellOf = computed(\n () =>\n (element: HTMLTableElement, target: EventTarget | null): HTMLTableCellElement | null => {\n let cell =\n target instanceof HTMLElement ? target.closest<HTMLTableCellElement>('th, td') : null\n while (cell !== null && cell.closest('table') !== element) {\n cell = cell.parentElement?.closest<HTMLTableCellElement>('th, td') ?? null\n }\n if (cell === null || cell.parentElement === null) return null\n return cell.parentElement.hasAttribute('data-detail') && cell !== target ? null : cell\n },\n)\nconst positionOf = computed(\n () =>\n (\n element: HTMLTableElement,\n cell: HTMLTableCellElement,\n column: number,\n ): { row: number; column: number; detail: boolean } => {\n const row = cell.parentElement as HTMLTableRowElement\n const rows = gridRows.value(element)\n return row.hasAttribute('data-detail')\n ? {\n row: rows.indexOf(row.previousElementSibling as HTMLTableRowElement),\n column,\n detail: true,\n }\n : { row: rows.indexOf(row), column: cell.cellIndex, detail: false }\n },\n)\nconst clampCell = computed(\n () =>\n (\n element: HTMLTableElement,\n to: { row: number; column: number; detail: boolean },\n ): { row: number; column: number; detail: boolean } | null => {\n const rows = gridRows.value(element)\n const row = Math.min(Math.max(to.row, 0), rows.length - 1)\n const cells = rows[row]?.cells\n if (cells === undefined || cells.length === 0) return null\n return {\n row,\n column: Math.min(Math.max(to.column, 0), cells.length - 1),\n detail: to.detail && row === to.row && detailUnder.value(rows[row]) !== null,\n }\n },\n)\nconst startOf = computed(\n () =>\n (element: HTMLTableElement): { row: number; column: number; detail: boolean } => {\n const cells = Array.from(gridRows.value(element)[0]?.cells ?? [])\n const column = cells.findIndex((cell) => cell.querySelector('[data-undrawn]') === null)\n return { row: 0, column: Math.max(column, 0), detail: false }\n },\n)\nconst whereIn = computed(\n () =>\n (element: HTMLTableElement): { row: number; column: number; detail: boolean } =>\n placed.value ? at.value : startOf.value(element),\n)\nconst stopAt = computed(\n () =>\n (\n element: HTMLTableElement,\n to: { row: number; column: number; detail: boolean },\n ): HTMLElement | null => {\n const row = gridRows.value(element)[to.row]\n if (to.detail) return detailUnder.value(row)\n const cell = row?.cells[to.column]\n return cell === undefined ? null : stopIn.value(cell)\n },\n)\nconst rove = computed(\n () => (element: HTMLTableElement, to: { row: number; column: number; detail: boolean }) => {\n at.value = to\n for (const [index, row] of gridRows.value(element).entries()) {\n for (const cell of Array.from(row.cells)) {\n const stop = stopIn.value(cell)\n const wanted = !to.detail && index === to.row && cell.cellIndex === to.column ? '0' : '-1'\n if (stop !== cell && cell.getAttribute('tabindex') !== '-1')\n cell.setAttribute('tabindex', '-1')\n if (stop.getAttribute('tabindex') !== wanted) stop.setAttribute('tabindex', wanted)\n }\n const under = detailUnder.value(row)\n const held = to.detail && index === to.row ? '0' : '-1'\n if (under !== null && under.getAttribute('tabindex') !== held)\n under.setAttribute('tabindex', held)\n }\n },\n)\nconst focusIn = computed(() => (event: FocusEvent) => {\n const element = table.value as HTMLTableElement | null\n if (element === null) return\n const cell = gridCellOf.value(element, event.target)\n if (cell === null) return\n const to = clampCell.value(\n element,\n positionOf.value(element, cell, whereIn.value(element).column),\n )\n if (to === null) return\n placed.value = true\n rove.value(element, to)\n})\nconst keyDown = computed(() => (event: KeyboardEvent) => {\n const element = table.value as HTMLTableElement | null\n const target = event.target instanceof HTMLElement ? event.target : null\n if (\n element === null ||\n target === null ||\n target.closest(\n 'input:not([type=\"checkbox\"]):not([type=\"radio\"]), textarea, [contenteditable]',\n ) !== null\n )\n return\n const cell = gridCellOf.value(element, target)\n if (cell === null) return\n const rows = gridRows.value(element)\n const here = positionOf.value(element, cell, whereIn.value(element).column)\n const forward = getComputedStyle(element).direction === 'rtl' ? -1 : 1\n const far = event.ctrlKey || event.metaKey\n const last = Number.MAX_SAFE_INTEGER\n let next: { row: number; column: number; detail: boolean } | null\n if (here.detail) {\n switch (event.key) {\n case 'ArrowDown':\n next = here.row + 1 < rows.length ? { ...here, row: here.row + 1, detail: false } : null\n break\n case 'ArrowUp':\n next = { ...here, detail: false }\n break\n case 'ArrowRight':\n case 'ArrowLeft':\n next = null\n break\n case 'Home':\n next = far ? { row: 0, column: 0, detail: false } : null\n break\n case 'End':\n next = far ? { row: last, column: last, detail: false } : null\n break\n default:\n return\n }\n } else {\n switch (event.key) {\n case 'ArrowRight':\n next = { ...here, column: here.column + forward }\n break\n case 'ArrowLeft':\n next = { ...here, column: here.column - forward }\n break\n case 'ArrowDown':\n next =\n detailUnder.value(rows[here.row]) !== null\n ? { ...here, detail: true }\n : { ...here, row: here.row + 1 }\n break\n case 'ArrowUp':\n next =\n detailUnder.value(rows[here.row - 1]) !== null\n ? { ...here, row: here.row - 1, detail: true }\n : { ...here, row: here.row - 1 }\n break\n case 'Home':\n next = far ? { row: 0, column: 0, detail: false } : { ...here, column: 0 }\n break\n case 'End':\n next = far ? { row: last, column: last, detail: false } : { ...here, column: last }\n break\n default:\n return\n }\n }\n event.preventDefault()\n const to = next === null ? null : clampCell.value(element, next)\n if (to === null) return\n placed.value = true\n rove.value(element, to)\n stopAt.value(element, to)?.focus()\n})\nconst reclamp = computed(() => () => {\n const element = table.value as HTMLTableElement | null\n if (element === null || !props.grid) return\n const to = clampCell.value(element, whereIn.value(element))\n if (to !== null) rove.value(element, to)\n})\nprovide('polymorph:Table', {\n get grid() {\n return props.grid\n },\n})\nlet release1: (() => void) | undefined\nconst effect1 = () => {\n release1?.()\n const run = () => {\n overflowing.value =\n wrapper.value !== null && wrapper.value.scrollWidth > wrapper.value.clientWidth\n }\n const resize = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(run)\n for (const element of [wrapper.value, wrapper.value?.firstElementChild])\n if (element) resize?.observe(element)\n release1 = () => {\n resize?.disconnect()\n }\n run()\n}\nonMounted(effect1)\nonBeforeUnmount(() => release1?.())\nlet release2: (() => void) | undefined\nconst effect2 = () => {\n release2?.()\n const run = () => {\n reclamp.value()\n }\n const mutation = typeof MutationObserver === 'undefined' ? undefined : new MutationObserver(run)\n for (const element of [table.value])\n if (element)\n mutation?.observe(element, {\n childList: true,\n characterData: true,\n subtree: true,\n attributeFilter: ['disabled'],\n })\n release2 = () => {\n mutation?.disconnect()\n }\n run()\n}\nonMounted(effect2)\nwatch(() => props.grid, effect2, { flush: 'post' })\nonBeforeUnmount(() => release2?.())\nlet release3: (() => void) | undefined\nconst effect3 = () => {\n release3?.()\n const ran =\n wrapper.value?.parentElement?.closest('[data-member]')?.getAttribute('data-member') ===\n 'data-table'\n ? () => {}\n : agentMember({\n member: 'Table',\n element: () => wrapper.value,\n state: () => ({\n 'sort-key': tableSort(table.value).key,\n 'sort-direction': tableSort(table.value).direction,\n columns: tableSortColumns(table.value),\n }),\n actions: { sort: { argument: 'id', run: (value) => pressTableSort(table.value, value) } },\n })\n release3 = () => {\n ran()\n }\n}\nonMounted(effect3)\nonBeforeUnmount(() => release3?.())\n</script>\n\n<template>\n <div\n ref=\"wrapper\"\n :class=\"styles.wrapper\"\n :data-sticky-header=\"stickyHeader ? '' : undefined\"\n :data-overflowing=\"overflowing ? '' : undefined\"\n :tabindex=\"overflowing && !grid ? '0' : undefined\"\n :role=\"overflowing && label !== undefined ? 'region' : undefined\"\n :aria-label=\"overflowing ? label : undefined\"\n data-member=\"table\"\n >\n <!-- table -->\n <table\n ref=\"table\"\n :class=\"styles.table\"\n :role=\"grid ? 'grid' : undefined\"\n :aria-multiselectable=\"grid && multiselectable ? 'true' : undefined\"\n @focusin=\"grid && focusIn($event)\"\n @keydown=\"grid && keyDown($event)\"\n >\n <!-- caption -->\n <caption\n v-if=\"caption !== undefined\"\n :class=\"[\n captionVisible ? styles.caption : undefined,\n !captionVisible ? styles.captionHidden : undefined,\n ]\"\n >\n {{\n caption\n }}\n </caption>\n <slot />\n </table>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4DA,IAAM,IAAQ,GAO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OAMlH,EAAA,OAAO,GAAA,CAAA,IAGX,EAAQ,EAAA,QAAA,SAAA,CAAA,GAAA,IAAA,CAAA,CAAA,GAAA,IAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"Table.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/structure/Table.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A styled native table, the main data display in ListPage (`design/components/table.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/table.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport { computed, onBeforeUnmount, onMounted, provide, ref, useTemplateRef, watch } from 'vue'\n\nimport { agentMember, pressTableSort, tableSort, tableSortColumns } from '@polymorph/vue'\nimport styles from '@polymorph/recipes/structure/table.module.css'\nimport type { TableCellProps } from './TableCell.vue'\nimport type { TableHeaderProps } from './TableHeader.vue'\nimport type { TableRowProps } from './TableRow.vue'\n\nexport type CellProps = TableCellProps\n\nexport type HeaderProps = TableHeaderProps\n\nexport type RowProps = TableRowProps\n\nexport type SortDirection = 'asc' | 'desc'\n\nexport interface TableProps {\n /**\n * Names the **table** with a real `<caption>`, its first child. `label` names the *scroll\n * region*, which exists only while the columns overflow, so a table that fits has no name.\n * That is fine for a page's main table, but a dashboard's chart twin tables would be announced\n * as \"table, table, table\". Announced but not drawn unless `captionVisible`, because most\n * tables already have their name on screen: a page title, or the chart they are the twin of.\n */\n caption?: string\n /**\n * Draws the caption above the table as well as announcing it, for a table whose name is not\n * already beside it. Not left to composition as Heading's caption is, because a `Text` above\n * the table would not be connected to it, and `<caption>` is the element for a table's name.\n */\n captionVisible?: boolean\n /**\n * The table is a **grid**: one tab stop, arrow keys between cells, and rows that may carry\n * `aria-selected`. Only for a component that owns every cell, in practice DataTable. A\n * hand-composed table is a document of prose and links, browsed with the reader's own keys,\n * and taking the arrow keys for a focus ring would only cost them.\n */\n grid?: boolean\n /**\n * Names the scroll region for keyboard users, usually the page's title.\n */\n label?: string\n /**\n * Rows can be selected in bulk. Only meaningful inside a grid, where it tells a screen reader\n * whether \"selected\" means one of many or the only one.\n */\n multiselectable?: boolean\n stickyHeader?: boolean\n}\n\ndefineOptions({ name: 'Table', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<TableProps>(), {\n captionVisible: false,\n grid: false,\n multiselectable: false,\n stickyHeader: false,\n})\ndefineSlots<{ default?: (props: Record<string, never>) => unknown }>()\nconst overflowing = ref(false)\nconst at = ref({ row: 0, column: 0, detail: false })\nconst placed = ref(false)\nconst holds = ref(false)\nconst table = useTemplateRef<HTMLElement>('table')\nconst wrapper = useTemplateRef<HTMLElement>('wrapper')\nconst stopIn = computed(() => (cell: HTMLTableCellElement): HTMLElement => {\n for (const node of Array.from(\n cell.querySelectorAll<HTMLElement>('button, a[href], input, select, textarea'),\n )) {\n if (node.hasAttribute('disabled') || node.getAttribute('aria-hidden') === 'true') continue\n return node\n }\n return cell\n})\nconst gridRows = computed(\n () =>\n (element: HTMLTableElement): HTMLTableRowElement[] =>\n Array.from(element.rows).filter((row) => !row.hasAttribute('data-detail')),\n)\nconst detailUnder = computed(\n () =>\n (row: HTMLTableRowElement | undefined): HTMLTableCellElement | null => {\n const next = row?.nextElementSibling\n return next instanceof HTMLTableRowElement && next.hasAttribute('data-detail')\n ? (next.cells[0] ?? null)\n : null\n },\n)\nconst gridCellOf = computed(\n () =>\n (element: HTMLTableElement, target: EventTarget | null): HTMLTableCellElement | null => {\n let cell =\n target instanceof HTMLElement ? target.closest<HTMLTableCellElement>('th, td') : null\n while (cell !== null && cell.closest('table') !== element) {\n cell = cell.parentElement?.closest<HTMLTableCellElement>('th, td') ?? null\n }\n if (cell === null || cell.parentElement === null) return null\n return cell.parentElement.hasAttribute('data-detail') && cell !== target ? null : cell\n },\n)\nconst positionOf = computed(\n () =>\n (\n element: HTMLTableElement,\n cell: HTMLTableCellElement,\n column: number,\n ): { row: number; column: number; detail: boolean } => {\n const row = cell.parentElement as HTMLTableRowElement\n const rows = gridRows.value(element)\n return row.hasAttribute('data-detail')\n ? {\n row: rows.indexOf(row.previousElementSibling as HTMLTableRowElement),\n column,\n detail: true,\n }\n : { row: rows.indexOf(row), column: cell.cellIndex, detail: false }\n },\n)\nconst clampCell = computed(\n () =>\n (\n element: HTMLTableElement,\n to: { row: number; column: number; detail: boolean },\n ): { row: number; column: number; detail: boolean } | null => {\n const rows = gridRows.value(element)\n const row = Math.min(Math.max(to.row, 0), rows.length - 1)\n const cells = rows[row]?.cells\n if (cells === undefined || cells.length === 0) return null\n return {\n row,\n column: Math.min(Math.max(to.column, 0), cells.length - 1),\n detail: to.detail && row === to.row && detailUnder.value(rows[row]) !== null,\n }\n },\n)\nconst startOf = computed(\n () =>\n (element: HTMLTableElement): { row: number; column: number; detail: boolean } => {\n const cells = Array.from(gridRows.value(element)[0]?.cells ?? [])\n const column = cells.findIndex((cell) => cell.querySelector('[data-undrawn]') === null)\n return { row: 0, column: Math.max(column, 0), detail: false }\n },\n)\nconst whereIn = computed(\n () =>\n (element: HTMLTableElement): { row: number; column: number; detail: boolean } =>\n placed.value ? at.value : startOf.value(element),\n)\nconst stopAt = computed(\n () =>\n (\n element: HTMLTableElement,\n to: { row: number; column: number; detail: boolean },\n ): HTMLElement | null => {\n const row = gridRows.value(element)[to.row]\n if (to.detail) return detailUnder.value(row)\n const cell = row?.cells[to.column]\n return cell === undefined ? null : stopIn.value(cell)\n },\n)\nconst rove = computed(\n () => (element: HTMLTableElement, to: { row: number; column: number; detail: boolean }) => {\n at.value = to\n for (const [index, row] of gridRows.value(element).entries()) {\n for (const cell of Array.from(row.cells)) {\n const stop = stopIn.value(cell)\n const wanted = !to.detail && index === to.row && cell.cellIndex === to.column ? '0' : '-1'\n if (stop !== cell && cell.getAttribute('tabindex') !== '-1')\n cell.setAttribute('tabindex', '-1')\n if (stop.getAttribute('tabindex') !== wanted) stop.setAttribute('tabindex', wanted)\n }\n const under = detailUnder.value(row)\n const held = to.detail && index === to.row ? '0' : '-1'\n if (under !== null && under.getAttribute('tabindex') !== held)\n under.setAttribute('tabindex', held)\n }\n },\n)\nconst focusIn = computed(() => (event: FocusEvent) => {\n const element = table.value as HTMLTableElement | null\n if (element === null) return\n if (!holds.value) holds.value = true\n const cell = gridCellOf.value(element, event.target)\n if (cell === null) return\n const to = clampCell.value(\n element,\n positionOf.value(element, cell, whereIn.value(element).column),\n )\n if (to === null) return\n placed.value = true\n rove.value(element, to)\n})\nconst focusOut = computed(() => (event: FocusEvent) => {\n const element = table.value as HTMLTableElement | null\n const left = event.target\n queueMicrotask(() => {\n if (\n element !== null &&\n left instanceof Node &&\n left.isConnected &&\n !element.contains(document.activeElement)\n )\n holds.value = false\n })\n})\nconst keyDown = computed(() => (event: KeyboardEvent) => {\n const element = table.value as HTMLTableElement | null\n const target = event.target instanceof HTMLElement ? event.target : null\n if (\n element === null ||\n target === null ||\n target.closest(\n 'input:not([type=\"checkbox\"]):not([type=\"radio\"]), textarea, [contenteditable]',\n ) !== null\n )\n return\n const cell = gridCellOf.value(element, target)\n if (cell === null) return\n const rows = gridRows.value(element)\n const here = positionOf.value(element, cell, whereIn.value(element).column)\n const forward = getComputedStyle(element).direction === 'rtl' ? -1 : 1\n const far = event.ctrlKey || event.metaKey\n const last = Number.MAX_SAFE_INTEGER\n let next: { row: number; column: number; detail: boolean } | null\n if (here.detail) {\n switch (event.key) {\n case 'ArrowDown':\n next = here.row + 1 < rows.length ? { ...here, row: here.row + 1, detail: false } : null\n break\n case 'ArrowUp':\n next = { ...here, detail: false }\n break\n case 'ArrowRight':\n case 'ArrowLeft':\n next = null\n break\n case 'Home':\n next = far ? { row: 0, column: 0, detail: false } : null\n break\n case 'End':\n next = far ? { row: last, column: last, detail: false } : null\n break\n default:\n return\n }\n } else {\n switch (event.key) {\n case 'ArrowRight':\n next = { ...here, column: here.column + forward }\n break\n case 'ArrowLeft':\n next = { ...here, column: here.column - forward }\n break\n case 'ArrowDown':\n next =\n detailUnder.value(rows[here.row]) !== null\n ? { ...here, detail: true }\n : { ...here, row: here.row + 1 }\n break\n case 'ArrowUp':\n next =\n detailUnder.value(rows[here.row - 1]) !== null\n ? { ...here, row: here.row - 1, detail: true }\n : { ...here, row: here.row - 1 }\n break\n case 'Home':\n next = far ? { row: 0, column: 0, detail: false } : { ...here, column: 0 }\n break\n case 'End':\n next = far ? { row: last, column: last, detail: false } : { ...here, column: last }\n break\n default:\n return\n }\n }\n event.preventDefault()\n const to = next === null ? null : clampCell.value(element, next)\n if (to === null) return\n placed.value = true\n rove.value(element, to)\n stopAt.value(element, to)?.focus()\n})\nconst reclamp = computed(() => () => {\n const element = table.value as HTMLTableElement | null\n if (element === null || !props.grid) return\n const to = clampCell.value(element, whereIn.value(element))\n if (to === null) return\n rove.value(element, to)\n const fell = document.activeElement === null || document.activeElement === document.body\n if (holds.value && fell) stopAt.value(element, to)?.focus()\n})\nprovide('polymorph:Table', {\n get grid() {\n return props.grid\n },\n})\nlet release1: (() => void) | undefined\nconst effect1 = () => {\n release1?.()\n const run = () => {\n overflowing.value =\n wrapper.value !== null && wrapper.value.scrollWidth > wrapper.value.clientWidth\n }\n const resize = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(run)\n for (const element of [wrapper.value, wrapper.value?.firstElementChild])\n if (element) resize?.observe(element)\n release1 = () => {\n resize?.disconnect()\n }\n run()\n}\nonMounted(effect1)\nonBeforeUnmount(() => release1?.())\nlet release2: (() => void) | undefined\nconst effect2 = () => {\n release2?.()\n const run = () => {\n reclamp.value()\n }\n const mutation = typeof MutationObserver === 'undefined' ? undefined : new MutationObserver(run)\n for (const element of [table.value])\n if (element)\n mutation?.observe(element, {\n childList: true,\n characterData: true,\n subtree: true,\n attributeFilter: ['disabled'],\n })\n release2 = () => {\n mutation?.disconnect()\n }\n run()\n}\nonMounted(effect2)\nwatch(() => props.grid, effect2, { flush: 'post' })\nonBeforeUnmount(() => release2?.())\nlet release3: (() => void) | undefined\nconst effect3 = () => {\n release3?.()\n const ran =\n wrapper.value?.parentElement?.closest('[data-member]')?.getAttribute('data-member') ===\n 'data-table'\n ? () => {}\n : agentMember({\n member: 'Table',\n element: () => wrapper.value,\n state: () => ({\n 'sort-key': tableSort(table.value).key,\n 'sort-direction': tableSort(table.value).direction,\n columns: tableSortColumns(table.value),\n }),\n actions: { sort: { argument: 'id', run: (value) => pressTableSort(table.value, value) } },\n })\n release3 = () => {\n ran()\n }\n}\nonMounted(effect3)\nonBeforeUnmount(() => release3?.())\n</script>\n\n<template>\n <div\n ref=\"wrapper\"\n :class=\"styles.wrapper\"\n :data-sticky-header=\"stickyHeader ? '' : undefined\"\n :data-overflowing=\"overflowing ? '' : undefined\"\n :tabindex=\"overflowing && !grid ? '0' : undefined\"\n :role=\"overflowing && label !== undefined ? 'region' : undefined\"\n :aria-label=\"overflowing ? label : undefined\"\n data-member=\"table\"\n >\n <!-- table -->\n <table\n ref=\"table\"\n :class=\"styles.table\"\n :role=\"grid ? 'grid' : undefined\"\n :aria-multiselectable=\"grid && multiselectable ? 'true' : undefined\"\n @focusin=\"grid && focusIn($event)\"\n @focusout=\"grid && focusOut($event)\"\n @keydown=\"grid && keyDown($event)\"\n >\n <!-- caption -->\n <caption\n v-if=\"caption !== undefined\"\n :class=\"[\n captionVisible ? styles.caption : undefined,\n !captionVisible ? styles.captionHidden : undefined,\n ]\"\n >\n {{\n caption\n }}\n </caption>\n <slot />\n </table>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4DA,IAAM,IAAQ,GAOR,IAAc,EAAI,EAAK,GACvB,IAAK,EAAI;GAAE,KAAK;GAAG,QAAQ;GAAG,QAAQ;EAAM,CAAC,GAC7C,IAAS,EAAI,EAAK,GAClB,IAAQ,EAAI,EAAK,GACjB,IAAQ,EAA4B,OAAO,GAC3C,IAAU,EAA4B,SAAS,GAC/C,IAAS,SAAgB,MAA4C;GACzE,KAAK,IAAM,KAAQ,MAAM,KACvB,EAAK,iBAA8B,0CAA0C,CAC/E,GACM,QAAK,aA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B,EAUU,WAAA;;GARP,OAAK,EAAA,CAAc,EAAA,iBAAiB,EAAA,CAAA,CAAM,CAAC,UAAU,KAAA,GAAsB,EAAA,iBAAwC,KAAA,IAAvB,EAAA,CAAA,CAAM,CAAC,aAAgB,CAAA;OAMlH,EAAA,OAAO,GAAA,CAAA,IAGX,EAAQ,EAAA,QAAA,SAAA,CAAA,GAAA,IAAA,CAAA,CAAA,GAAA,IAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._focusRing_1hr3n_49{--pm-focus-mark:initial;--pm-focus-inset:0px}._focusRing_1hr3n_49:focus-visible{outline:var(--pm-focus-width) solid var(--pm-focus-mark,var(--pm-border-focus-solid));outline-offset:calc(var(--pm-focus-offset) - var(--pm-focus-inset))}._focusRing_1hr3n_49:has(>input:focus-visible){outline:var(--pm-focus-width) solid var(--pm-focus-mark,var(--pm-border-focus-solid));outline-offset:calc(var(--pm-focus-offset) - var(--pm-focus-inset))}@container style(--pm-focus-place:outside){._focusRing_1hr3n_49:focus-visible{outline-color:var(--pm-border-focus-solid);outline-offset:var(--pm-focus-offset)}._focusRing_1hr3n_49:has(>input:focus-visible){outline-color:var(--pm-border-focus-solid);outline-offset:var(--pm-focus-offset)}}@container style(--pm-focus-place:inside){._focusRing_1hr3n_49:is([data-invalid],[aria-invalid=true],[data-selected],[data-range-start],[data-range-end]):focus-visible{outline-offset:calc(var(--pm-focus-offset) - var(--pm-focus-inset) - 1px)}._focusRing_1hr3n_49[data-invalid]:has(>input:focus-visible){outline-offset:calc(var(--pm-focus-offset) - var(--pm-focus-inset) - 1px)}}._focusAround_1hr3n_95:focus-visible{outline:var(--pm-focus-width) solid var(--pm-border-focus-solid);outline-offset:max(var(--pm-space-1), var(--pm-focus-offset))}._focusAround_1hr3n_95:has(>input:focus-visible){outline:var(--pm-focus-width) solid var(--pm-border-focus-solid);outline-offset:max(var(--pm-space-1), var(--pm-focus-offset))}@container style(--pm-focus-place:outside){._focusRing_1hr3n_49:focus-visible:not([data-invalid],[aria-invalid=true],[data-selected],[data-range-start],[data-range-end]){border-color:var(--pm-border-focus-solid)}._focusRing_1hr3n_49:has(>input:focus-visible):not([data-invalid]){border-color:var(--pm-border-focus-solid)}}@container style(--pm-focus-field:border){._focusRing_1hr3n_49:is(textarea,[role=combobox]):focus-visible{outline-offset:calc(var(--pm-focus-width) * -1)}._focusRing_1hr3n_49:has(>input:focus-visible){outline-offset:calc(var(--pm-focus-width) * -1)}._focusRing_1hr3n_49:is(textarea,[role=combobox]):is([data-invalid],[aria-invalid=true]):focus-visible{outline-offset:calc(var(--pm-focus-width) * -1 - 1px)}._focusRing_1hr3n_49[data-invalid]:has(>input:focus-visible){outline-offset:calc(var(--pm-focus-width) * -1 - 1px)}}._stateFeedback_lkjqs_17{transition:background-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), border-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), box-shadow var(--pm-motion-duration-control) var(--pm-motion-easing-standard)}._pressable_lkjqs_38{transition:background-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), border-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), box-shadow var(--pm-motion-duration-control) var(--pm-motion-easing-standard), transform var(--pm-motion-duration-control) var(--pm-motion-easing-enter)}._pressable_lkjqs_38:active{transform:scale(var(--pm-motion-press-scale));transition:background-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), border-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), box-shadow var(--pm-motion-duration-control) var(--pm-motion-easing-standard), transform calc(var(--pm-motion-duration-control) * .5) var(--pm-motion-easing-standard)}@keyframes _pm-spin_lkjqs_1{to{transform:rotate(360deg)}}@keyframes _pm-fade-in_lkjqs_1{0%{opacity:0}}@keyframes _pm-shimmer_lkjqs_1{0%{transform:translate(-100%)}to{transform:translate(100%)}}._spin_lkjqs_83{animation:_pm-spin_lkjqs_1 var(--pm-motion-ambient-spin) linear infinite}._fadeIn_lkjqs_92{animation:_pm-fade-in_lkjqs_1 var(--pm-motion-duration-control) var(--pm-motion-easing-enter) both}._shimmer_lkjqs_98{position:relative;overflow:hidden}._shimmer_lkjqs_98:after{content:"";background:linear-gradient(90deg, var(--pm-bg-subtle) 0%, var(--pm-bg-raised) 50%, var(--pm-bg-subtle) 100%);width:200%;animation:_pm-shimmer_lkjqs_1 var(--pm-motion-ambient-shimmer) linear infinite;position:absolute;inset:0}[data-motion=none] ._spin_lkjqs_83,[data-motion=none] ._fadeIn_lkjqs_92,[data-motion=none] ._shimmer_lkjqs_98:after{animation:none}@media (prefers-reduced-motion:reduce){._spin_lkjqs_83,._fadeIn_lkjqs_92,._shimmer_lkjqs_98:after{animation:none}._pressable_lkjqs_38,._pressable_lkjqs_38:active{transition:background-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), border-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), box-shadow var(--pm-motion-duration-control) var(--pm-motion-easing-standard);transform:none}}._root_15jzo_11{flex-direction:column;display:flex}._item_15jzo_18{border-block-end:1px solid var(--pm-border-subtle)}._item_15jzo_18:first-child{border-block-start:1px solid var(--pm-border-subtle)}._header_15jzo_28{font:inherit;margin:0;display:flex}._trigger_15jzo_34{gap:var(--pm-space-3);inline-size:100%;min-block-size:var(--pm-control-height-lg);padding-block:var(--pm-space-3);font-family:var(--pm-text-md-family);font-size:var(--pm-text-md-size);font-weight:var(--pm-text-md-weight);line-height:var(--pm-text-md-line-height);letter-spacing:var(--pm-text-md-tracking);color:var(--pm-text-primary);text-align:start;cursor:pointer;background:0 0;border:0;align-items:center;padding-inline:0;display:flex}._label_15jzo_56{flex:1;min-inline-size:0}._chevron_15jzo_61{color:var(--pm-text-muted);transition:transform var(--pm-motion-duration-control) var(--pm-motion-easing-standard);flex:none;align-items:center;display:inline-flex}._trigger_15jzo_34:hover{color:var(--pm-accent-text)}._trigger_15jzo_34:hover ._chevron_15jzo_61{color:var(--pm-text-secondary)}._trigger_15jzo_34[data-state=open] ._chevron_15jzo_61{transform:rotate(180deg)}._trigger_15jzo_34[data-disabled],._trigger_15jzo_34[data-disabled]:hover,._trigger_15jzo_34[data-disabled] ._chevron_15jzo_61{color:var(--pm-text-disabled);cursor:default}._content_15jzo_109{--pm-accordion-reach:var(--pm-space-2);margin-inline:calc(var(--pm-accordion-reach) * -1);padding-inline:var(--pm-accordion-reach);overflow:hidden}._inner_15jzo_117{padding-block:0 var(--pm-space-4);font-family:var(--pm-text-sm-family);font-size:var(--pm-text-sm-size);font-weight:var(--pm-text-sm-weight);line-height:var(--pm-text-sm-line-height);letter-spacing:var(--pm-text-sm-tracking);color:var(--pm-text-secondary)}@keyframes _pm-accordion-open_15jzo_1{0%{block-size:0}to{block-size:var(--radix-accordion-content-height)}}@keyframes _pm-accordion-close_15jzo_1{0%{block-size:var(--radix-accordion-content-height)}to{block-size:0}}@keyframes _pm-accordion-reveal_15jzo_1{0%{opacity:0}}@keyframes _pm-accordion-conceal_15jzo_1{to{opacity:0}}._content_15jzo_109[data-state=open]{animation:_pm-accordion-open_15jzo_1 var(--pm-motion-duration-surface) var(--pm-motion-easing-standard)}._content_15jzo_109[data-state=closed]{animation:_pm-accordion-close_15jzo_1 var(--pm-motion-duration-surface) var(--pm-motion-easing-standard)}._content_15jzo_109[data-state=open] ._inner_15jzo_117{animation:_pm-accordion-reveal_15jzo_1 calc(var(--pm-motion-duration-surface) * .5) var(--pm-motion-easing-standard) calc(var(--pm-motion-duration-surface) * .5) both}._content_15jzo_109[data-state=closed] ._inner_15jzo_117{animation:_pm-accordion-conceal_15jzo_1 calc(var(--pm-motion-duration-surface) * .5) var(--pm-motion-easing-standard) both}@media (prefers-reduced-motion:reduce){._content_15jzo_109[data-state=open],._content_15jzo_109[data-state=closed]{animation:none}._chevron_15jzo_61{transition:none}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './accordion.css';
|
|
2
2
|
//#region ../recipes/src/structure/accordion.module.css
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_15jzo_11", t = "_item_15jzo_18", n = "_header_15jzo_28", r = "_trigger_15jzo_34 _focusAround_1hr3n_95 _stateFeedback_lkjqs_17", i = "_label_15jzo_56", a = "_chevron_15jzo_61", o = "_content_15jzo_109", s = "_inner_15jzo_117", c = {
|
|
4
4
|
root: e,
|
|
5
5
|
item: t,
|
|
6
6
|
header: n,
|
|
@@ -9,10 +9,10 @@ var e = "_root_11ve8_11", t = "_item_11ve8_18", n = "_header_11ve8_28", r = "_tr
|
|
|
9
9
|
chevron: a,
|
|
10
10
|
content: o,
|
|
11
11
|
inner: s,
|
|
12
|
-
"pm-accordion-open": "_pm-accordion-
|
|
13
|
-
"pm-accordion-close": "_pm-accordion-
|
|
14
|
-
"pm-accordion-reveal": "_pm-accordion-
|
|
15
|
-
"pm-accordion-conceal": "_pm-accordion-
|
|
12
|
+
"pm-accordion-open": "_pm-accordion-open_15jzo_1",
|
|
13
|
+
"pm-accordion-close": "_pm-accordion-close_15jzo_1",
|
|
14
|
+
"pm-accordion-reveal": "_pm-accordion-reveal_15jzo_1",
|
|
15
|
+
"pm-accordion-conceal": "_pm-accordion-conceal_15jzo_1"
|
|
16
16
|
};
|
|
17
17
|
//#endregion
|
|
18
18
|
export { a as chevron, o as content, c as default, n as header, s as inner, t as item, i as label, e as root, r as trigger };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.module.js","names":[],"sources":["../../../recipes/src/structure/accordion.module.css"],"sourcesContent":["/* Accordion — `design/components/accordion.md`.\n *\n * One treatment: **ruled**, a hairline in technical systems and a warmer rule in\n * document ones. No boxed variant: a panel around a disclosure list is a Card.\n *\n * Motion is CSS rather than the engine, as in the sidebar. `collapse` animates a\n * size, the one thing law 2 lets a container animate, and a CSS transition on\n * Radix's measured height is interruptible. Durations are `--pm-motion-*`\n * tokens, so temperament rescales them and `none` stops them. */\n\n.root {\n display: flex;\n flex-direction: column;\n}\n\n/* Each row draws its bottom rule. The first row also draws the top rule, which\n the list would otherwise lack. */\n.item {\n border-block-end: 1px solid var(--pm-border-subtle);\n}\n\n.item:first-child {\n border-block-start: 1px solid var(--pm-border-subtle);\n}\n\n/* The heading is a real `<h3>`/`<h4>` with user-agent margins and display.\n They are reset because the trigger inside it owns the layout. */\n.header {\n display: flex;\n margin: 0;\n font: inherit;\n}\n\n.trigger {\n composes:
|
|
1
|
+
{"version":3,"file":"accordion.module.js","names":[],"sources":["../../../recipes/src/structure/accordion.module.css"],"sourcesContent":["/* Accordion — `design/components/accordion.md`.\n *\n * One treatment: **ruled**, a hairline in technical systems and a warmer rule in\n * document ones. No boxed variant: a panel around a disclosure list is a Card.\n *\n * Motion is CSS rather than the engine, as in the sidebar. `collapse` animates a\n * size, the one thing law 2 lets a container animate, and a CSS transition on\n * Radix's measured height is interruptible. Durations are `--pm-motion-*`\n * tokens, so temperament rescales them and `none` stops them. */\n\n.root {\n display: flex;\n flex-direction: column;\n}\n\n/* Each row draws its bottom rule. The first row also draws the top rule, which\n the list would otherwise lack. */\n.item {\n border-block-end: 1px solid var(--pm-border-subtle);\n}\n\n.item:first-child {\n border-block-start: 1px solid var(--pm-border-subtle);\n}\n\n/* The heading is a real `<h3>`/`<h4>` with user-agent margins and display.\n They are reset because the trigger inside it owns the layout. */\n.header {\n display: flex;\n margin: 0;\n font: inherit;\n}\n\n.trigger {\n composes: focusAround from '../conventions/focus.module.css';\n composes: stateFeedback from '../conventions/motion.module.css';\n display: flex;\n gap: var(--pm-space-3);\n align-items: center;\n inline-size: 100%;\n min-block-size: var(--pm-control-height-lg);\n padding-block: var(--pm-space-3);\n padding-inline: 0;\n font-family: var(--pm-text-md-family);\n font-size: var(--pm-text-md-size);\n font-weight: var(--pm-text-md-weight);\n line-height: var(--pm-text-md-line-height);\n letter-spacing: var(--pm-text-md-tracking);\n color: var(--pm-text-primary);\n text-align: start;\n cursor: pointer;\n background: transparent;\n border: 0;\n}\n\n.label {\n flex: 1;\n min-inline-size: 0;\n}\n\n.chevron {\n display: inline-flex;\n flex: none;\n align-items: center;\n color: var(--pm-text-muted);\n\n /* Rotates on `control` × `standard`, like Select's chevron, because the change\n is symmetric and has no direction of travel. */\n transition: transform var(--pm-motion-duration-control) var(--pm-motion-easing-standard);\n}\n\n/* states -------------------------------------------------------------------- */\n\n/* Hover changes colour only. The rules already separate the rows, and a tinted\n background on one row would look like a selection. */\n.trigger:hover {\n color: var(--pm-accent-text);\n}\n\n.trigger:hover .chevron {\n color: var(--pm-text-secondary);\n}\n\n.trigger[data-state='open'] .chevron {\n transform: rotate(180deg);\n}\n\n/* After hover, so a pointer over a disabled row does not highlight it. */\n.trigger[data-disabled],\n.trigger[data-disabled]:hover,\n.trigger[data-disabled] .chevron {\n color: var(--pm-text-disabled);\n cursor: default;\n}\n\n/* the panel ------------------------------------------------------------------\n *\n * `overflow: hidden` clips the content while the size animates, as the motion\n * spec's interruption laws require (`design/motion/motion.md`).\n *\n * A box that clips cuts what is drawn outside its content at its padding edge:\n * the seat shadow of a field or a Button against the panel's side, and a\n * control's focus mark, drawn a `space-1` gap outside it. So the panel is wider\n * than its content by `space-2` on each side, and its margins take that back, so\n * the content stays under the trigger's label. The room is on the inline axis\n * only, because room on the block axis would change the height Radix measures\n * and the animation runs to. */\n\n.content {\n --pm-accordion-reach: var(--pm-space-2);\n\n margin-inline: calc(var(--pm-accordion-reach) * -1);\n padding-inline: var(--pm-accordion-reach);\n overflow: hidden;\n}\n\n.inner {\n padding-block: 0 var(--pm-space-4);\n font-family: var(--pm-text-sm-family);\n font-size: var(--pm-text-sm-size);\n font-weight: var(--pm-text-sm-weight);\n line-height: var(--pm-text-sm-line-height);\n letter-spacing: var(--pm-text-sm-tracking);\n color: var(--pm-text-secondary);\n}\n\n/* `collapse`, persistent mode: size over `surface` × `standard` both ways, from\n Radix's measured height. That property is browser-measured geometry, so it is\n lawful in vocabulary CSS. */\n\n@keyframes pm-accordion-open {\n from {\n block-size: 0;\n }\n\n to {\n block-size: var(--radix-accordion-content-height);\n }\n}\n\n@keyframes pm-accordion-close {\n from {\n block-size: var(--radix-accordion-content-height);\n }\n\n to {\n block-size: 0;\n }\n}\n\n/* The content fade, the `collapse` pattern's 0.5 split (`design/motion/motion.md`):\n in over the second half, and out before the space closes. */\n\n@keyframes pm-accordion-reveal {\n from {\n opacity: 0;\n }\n}\n\n@keyframes pm-accordion-conceal {\n to {\n opacity: 0;\n }\n}\n\n.content[data-state='open'] {\n animation: pm-accordion-open var(--pm-motion-duration-surface) var(--pm-motion-easing-standard);\n}\n\n.content[data-state='closed'] {\n animation: pm-accordion-close var(--pm-motion-duration-surface) var(--pm-motion-easing-standard);\n}\n\n.content[data-state='open'] .inner {\n animation: pm-accordion-reveal calc(var(--pm-motion-duration-surface) * 0.5)\n var(--pm-motion-easing-standard) calc(var(--pm-motion-duration-surface) * 0.5) both;\n}\n\n.content[data-state='closed'] .inner {\n animation: pm-accordion-conceal calc(var(--pm-motion-duration-surface) * 0.5)\n var(--pm-motion-easing-standard) both;\n}\n\n/* Reduced-motion projection (`design/motion/motion.md`): `collapse` keeps the\n content fade, but the size change is instant, so only the size animations go. */\n@media (prefers-reduced-motion: reduce) {\n .content[data-state='open'],\n .content[data-state='closed'] {\n animation: none;\n }\n\n .chevron {\n transition: none;\n }\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._stateFeedback_lkjqs_17{transition:background-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), border-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), box-shadow var(--pm-motion-duration-control) var(--pm-motion-easing-standard)}._pressable_lkjqs_38{transition:background-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), border-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), box-shadow var(--pm-motion-duration-control) var(--pm-motion-easing-standard), transform var(--pm-motion-duration-control) var(--pm-motion-easing-enter)}._pressable_lkjqs_38:active{transform:scale(var(--pm-motion-press-scale));transition:background-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), border-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), box-shadow var(--pm-motion-duration-control) var(--pm-motion-easing-standard), transform calc(var(--pm-motion-duration-control) * .5) var(--pm-motion-easing-standard)}@keyframes _pm-spin_lkjqs_1{to{transform:rotate(360deg)}}@keyframes _pm-fade-in_lkjqs_1{0%{opacity:0}}@keyframes _pm-shimmer_lkjqs_1{0%{transform:translate(-100%)}to{transform:translate(100%)}}._spin_lkjqs_83{animation:_pm-spin_lkjqs_1 var(--pm-motion-ambient-spin) linear infinite}._fadeIn_lkjqs_92{animation:_pm-fade-in_lkjqs_1 var(--pm-motion-duration-control) var(--pm-motion-easing-enter) both}._shimmer_lkjqs_98{position:relative;overflow:hidden}._shimmer_lkjqs_98:after{content:"";background:linear-gradient(90deg, var(--pm-bg-subtle) 0%, var(--pm-bg-raised) 50%, var(--pm-bg-subtle) 100%);width:200%;animation:_pm-shimmer_lkjqs_1 var(--pm-motion-ambient-shimmer) linear infinite;position:absolute;inset:0}[data-motion=none] ._spin_lkjqs_83,[data-motion=none] ._fadeIn_lkjqs_92,[data-motion=none] ._shimmer_lkjqs_98:after{animation:none}@media (prefers-reduced-motion:reduce){._spin_lkjqs_83,._fadeIn_lkjqs_92,._shimmer_lkjqs_98:after{animation:none}._pressable_lkjqs_38,._pressable_lkjqs_38:active{transition:background-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), border-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), box-shadow var(--pm-motion-duration-control) var(--pm-motion-easing-standard);transform:none}}.
|
|
1
|
+
._stateFeedback_lkjqs_17{transition:background-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), border-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), box-shadow var(--pm-motion-duration-control) var(--pm-motion-easing-standard)}._pressable_lkjqs_38{transition:background-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), border-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), box-shadow var(--pm-motion-duration-control) var(--pm-motion-easing-standard), transform var(--pm-motion-duration-control) var(--pm-motion-easing-enter)}._pressable_lkjqs_38:active{transform:scale(var(--pm-motion-press-scale));transition:background-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), border-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), box-shadow var(--pm-motion-duration-control) var(--pm-motion-easing-standard), transform calc(var(--pm-motion-duration-control) * .5) var(--pm-motion-easing-standard)}@keyframes _pm-spin_lkjqs_1{to{transform:rotate(360deg)}}@keyframes _pm-fade-in_lkjqs_1{0%{opacity:0}}@keyframes _pm-shimmer_lkjqs_1{0%{transform:translate(-100%)}to{transform:translate(100%)}}._spin_lkjqs_83{animation:_pm-spin_lkjqs_1 var(--pm-motion-ambient-spin) linear infinite}._fadeIn_lkjqs_92{animation:_pm-fade-in_lkjqs_1 var(--pm-motion-duration-control) var(--pm-motion-easing-enter) both}._shimmer_lkjqs_98{position:relative;overflow:hidden}._shimmer_lkjqs_98:after{content:"";background:linear-gradient(90deg, var(--pm-bg-subtle) 0%, var(--pm-bg-raised) 50%, var(--pm-bg-subtle) 100%);width:200%;animation:_pm-shimmer_lkjqs_1 var(--pm-motion-ambient-shimmer) linear infinite;position:absolute;inset:0}[data-motion=none] ._spin_lkjqs_83,[data-motion=none] ._fadeIn_lkjqs_92,[data-motion=none] ._shimmer_lkjqs_98:after{animation:none}@media (prefers-reduced-motion:reduce){._spin_lkjqs_83,._fadeIn_lkjqs_92,._shimmer_lkjqs_98:after{animation:none}._pressable_lkjqs_38,._pressable_lkjqs_38:active{transition:background-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), border-color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), color var(--pm-motion-duration-control) var(--pm-motion-easing-standard), box-shadow var(--pm-motion-duration-control) var(--pm-motion-easing-standard);transform:none}}._focusRing_1hr3n_49{--pm-focus-mark:initial;--pm-focus-inset:0px}._focusRing_1hr3n_49:focus-visible{outline:var(--pm-focus-width) solid var(--pm-focus-mark,var(--pm-border-focus-solid));outline-offset:calc(var(--pm-focus-offset) - var(--pm-focus-inset))}._focusRing_1hr3n_49:has(>input:focus-visible){outline:var(--pm-focus-width) solid var(--pm-focus-mark,var(--pm-border-focus-solid));outline-offset:calc(var(--pm-focus-offset) - var(--pm-focus-inset))}@container style(--pm-focus-place:outside){._focusRing_1hr3n_49:focus-visible{outline-color:var(--pm-border-focus-solid);outline-offset:var(--pm-focus-offset)}._focusRing_1hr3n_49:has(>input:focus-visible){outline-color:var(--pm-border-focus-solid);outline-offset:var(--pm-focus-offset)}}@container style(--pm-focus-place:inside){._focusRing_1hr3n_49:is([data-invalid],[aria-invalid=true],[data-selected],[data-range-start],[data-range-end]):focus-visible{outline-offset:calc(var(--pm-focus-offset) - var(--pm-focus-inset) - 1px)}._focusRing_1hr3n_49[data-invalid]:has(>input:focus-visible){outline-offset:calc(var(--pm-focus-offset) - var(--pm-focus-inset) - 1px)}}._focusAround_1hr3n_95:focus-visible{outline:var(--pm-focus-width) solid var(--pm-border-focus-solid);outline-offset:max(var(--pm-space-1), var(--pm-focus-offset))}._focusAround_1hr3n_95:has(>input:focus-visible){outline:var(--pm-focus-width) solid var(--pm-border-focus-solid);outline-offset:max(var(--pm-space-1), var(--pm-focus-offset))}@container style(--pm-focus-place:outside){._focusRing_1hr3n_49:focus-visible:not([data-invalid],[aria-invalid=true],[data-selected],[data-range-start],[data-range-end]){border-color:var(--pm-border-focus-solid)}._focusRing_1hr3n_49:has(>input:focus-visible):not([data-invalid]){border-color:var(--pm-border-focus-solid)}}@container style(--pm-focus-field:border){._focusRing_1hr3n_49:is(textarea,[role=combobox]):focus-visible{outline-offset:calc(var(--pm-focus-width) * -1)}._focusRing_1hr3n_49:has(>input:focus-visible){outline-offset:calc(var(--pm-focus-width) * -1)}._focusRing_1hr3n_49:is(textarea,[role=combobox]):is([data-invalid],[aria-invalid=true]):focus-visible{outline-offset:calc(var(--pm-focus-width) * -1 - 1px)}._focusRing_1hr3n_49[data-invalid]:has(>input:focus-visible){outline-offset:calc(var(--pm-focus-width) * -1 - 1px)}}._nav_104a1_9{min-inline-size:0}._list_104a1_13{gap:var(--pm-space-2);font-family:var(--pm-text-sm-family);font-size:var(--pm-text-sm-size);font-weight:var(--pm-text-sm-weight);line-height:var(--pm-text-sm-line-height);letter-spacing:var(--pm-text-sm-tracking);flex-wrap:nowrap;align-items:center;margin:0;padding:0;list-style:none;display:flex}._item_104a1_33{grid-template-columns:minmax(var(--pm-space-6), auto);gap:var(--pm-space-2);flex:none;grid-auto-columns:auto;grid-auto-flow:column;align-items:center;display:grid}._item_104a1_33:has(._crumb_104a1_46){flex-shrink:1}._item_104a1_33:has(._crumb_104a1_46):not(:first-child,:last-child){flex-shrink:1000000}._crumb_104a1_46{min-inline-size:0;max-inline-size:calc(var(--pm-space-10) * 2);font:inherit;color:var(--pm-text-secondary);text-align:start;text-overflow:ellipsis;white-space:nowrap;text-underline-offset:2px;cursor:pointer;border-radius:var(--pm-radius-sm);background:0 0;border:0;padding:0;text-decoration-line:none;text-decoration-thickness:1px;display:inline-block;overflow:hidden}._separator_104a1_84{color:var(--pm-text-muted);flex:none;align-items:center;display:inline-flex}._crumb_104a1_46:hover{color:var(--pm-text-primary);text-decoration-line:underline}._crumb_104a1_46[aria-current=page],._crumb_104a1_46[aria-current=page]:hover{color:var(--pm-text-primary);cursor:default;text-decoration-line:none}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './breadcrumbs.css';
|
|
2
2
|
//#region ../recipes/src/structure/breadcrumbs.module.css
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_nav_104a1_9", t = "_list_104a1_13", n = "_item_104a1_33", r = "_crumb_104a1_46 _stateFeedback_lkjqs_17 _focusAround_1hr3n_95", i = "_separator_104a1_84", a = {
|
|
4
4
|
nav: e,
|
|
5
5
|
list: t,
|
|
6
6
|
item: n,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumbs.module.js","names":[],"sources":["../../../recipes/src/structure/breadcrumbs.module.css"],"sourcesContent":["/* Breadcrumbs — `design/components/breadcrumbs.md`.\n *\n * Link's styling (underline on hover, focus ring, decoration metrics) in\n * `text.secondary`, because eight accent links would compete with the page.\n *\n * No motion of its own: navigation does not animate (the AppShell rail's law).\n * The overflow Menu brings its own. */\n\n.nav {\n min-inline-size: 0;\n}\n\n.list {\n display: flex;\n flex-wrap: nowrap;\n gap: var(--pm-space-2);\n align-items: center;\n margin: 0;\n padding: 0;\n font-family: var(--pm-text-sm-family);\n font-size: var(--pm-text-sm-size);\n font-weight: var(--pm-text-sm-weight);\n line-height: var(--pm-text-sm-line-height);\n letter-spacing: var(--pm-text-sm-tracking);\n list-style: none;\n}\n\n/* An item is a crumb and the separator after it. It is a grid so that the row\n knows the narrowest an item can be: the crumb's track goes down to\n `--pm-space-6`, room for a letter and an ellipsis, and the separator keeps\n its width. In a flex item the crumb's whole label would count, and no item\n could narrow. */\n.item {\n display: grid;\n flex: none;\n grid-template-columns: minmax(var(--pm-space-6), auto);\n grid-auto-columns: auto;\n grid-auto-flow: column;\n gap: var(--pm-space-2);\n align-items: center;\n}\n\n/* A row wider than its container narrows its crumbs. It stays one line, and it\n does not reach past the container, where on a phone it pans the page. The\n overflow control's item holds no crumb and keeps its width. */\n.item:has(.crumb) {\n flex-shrink: 1;\n}\n\n/* The middle of the trail narrows first, as it is the middle the overflow\n takes. The first crumb and the current page keep their words until every\n crumb between them is at its floor. Flex shrink is a proportion, not an\n order, so the middle's factor is large enough that the two ends give up less\n width than a browser lays out while a middle crumb has any to give. */\n.item:has(.crumb):not(:first-child, :last-child) {\n flex-shrink: 1000000;\n}\n\n/* Every crumb is clipped at the same width, so a 40-character document title\n does not break the single row. A crumb in a narrowed item is clipped at its\n track's width. */\n.crumb {\n composes: stateFeedback from '../conventions/motion.module.css';\n composes:
|
|
1
|
+
{"version":3,"file":"breadcrumbs.module.js","names":[],"sources":["../../../recipes/src/structure/breadcrumbs.module.css"],"sourcesContent":["/* Breadcrumbs — `design/components/breadcrumbs.md`.\n *\n * Link's styling (underline on hover, focus ring, decoration metrics) in\n * `text.secondary`, because eight accent links would compete with the page.\n *\n * No motion of its own: navigation does not animate (the AppShell rail's law).\n * The overflow Menu brings its own. */\n\n.nav {\n min-inline-size: 0;\n}\n\n.list {\n display: flex;\n flex-wrap: nowrap;\n gap: var(--pm-space-2);\n align-items: center;\n margin: 0;\n padding: 0;\n font-family: var(--pm-text-sm-family);\n font-size: var(--pm-text-sm-size);\n font-weight: var(--pm-text-sm-weight);\n line-height: var(--pm-text-sm-line-height);\n letter-spacing: var(--pm-text-sm-tracking);\n list-style: none;\n}\n\n/* An item is a crumb and the separator after it. It is a grid so that the row\n knows the narrowest an item can be: the crumb's track goes down to\n `--pm-space-6`, room for a letter and an ellipsis, and the separator keeps\n its width. In a flex item the crumb's whole label would count, and no item\n could narrow. */\n.item {\n display: grid;\n flex: none;\n grid-template-columns: minmax(var(--pm-space-6), auto);\n grid-auto-columns: auto;\n grid-auto-flow: column;\n gap: var(--pm-space-2);\n align-items: center;\n}\n\n/* A row wider than its container narrows its crumbs. It stays one line, and it\n does not reach past the container, where on a phone it pans the page. The\n overflow control's item holds no crumb and keeps its width. */\n.item:has(.crumb) {\n flex-shrink: 1;\n}\n\n/* The middle of the trail narrows first, as it is the middle the overflow\n takes. The first crumb and the current page keep their words until every\n crumb between them is at its floor. Flex shrink is a proportion, not an\n order, so the middle's factor is large enough that the two ends give up less\n width than a browser lays out while a middle crumb has any to give. */\n.item:has(.crumb):not(:first-child, :last-child) {\n flex-shrink: 1000000;\n}\n\n/* Every crumb is clipped at the same width, so a 40-character document title\n does not break the single row. A crumb in a narrowed item is clipped at its\n track's width. */\n.crumb {\n composes: stateFeedback from '../conventions/motion.module.css';\n composes: focusAround from '../conventions/focus.module.css';\n display: inline-block;\n min-inline-size: 0;\n max-inline-size: calc(var(--pm-space-10) * 2);\n padding: 0;\n overflow: hidden;\n font: inherit;\n color: var(--pm-text-secondary);\n text-align: start;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-decoration-line: none;\n text-decoration-thickness: 1px;\n text-underline-offset: 2px;\n cursor: pointer;\n background: transparent;\n border: 0;\n border-radius: var(--pm-radius-sm);\n}\n\n.separator {\n display: inline-flex;\n flex: none;\n align-items: center;\n color: var(--pm-text-muted);\n}\n\n/* states -------------------------------------------------------------------- */\n\n/* Colour and underline, so the affordance does not depend on seeing the\n difference between two greys. This is Link's rule. */\n.crumb:hover {\n color: var(--pm-text-primary);\n text-decoration-line: underline;\n}\n\n/* After hover, so it wins. The current page is a location, not a link, so it has\n no underline, no hover colour and no pointer cursor. */\n.crumb[aria-current='page'],\n.crumb[aria-current='page']:hover {\n color: var(--pm-text-primary);\n text-decoration-line: none;\n cursor: default;\n}\n"],"mappings":""}
|