@k2b/ui 0.65.0 → 0.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -0
- package/dist/base.css +6 -1
- package/dist/browser/actions/Dropdown.js +2 -1
- package/dist/browser/actions/Dropdown.js.map +1 -1
- package/dist/browser/actions/FilterChip.js +3 -2
- package/dist/browser/actions/FilterChip.js.map +1 -1
- package/dist/browser/actions/SegmentedControl.js +20 -14
- package/dist/browser/actions/SegmentedControl.js.map +1 -1
- package/dist/browser/charts/core/line-details.js +52 -12
- package/dist/browser/charts/core/line-details.js.map +1 -1
- package/dist/browser/charts/core/line-extras.js +122 -0
- package/dist/browser/charts/core/line-extras.js.map +1 -0
- package/dist/browser/charts/core/line-options.js +1 -1
- package/dist/browser/charts/core/line-options.js.map +1 -1
- package/dist/browser/charts/core/snapshot.js +3 -2
- package/dist/browser/charts/core/snapshot.js.map +1 -1
- package/dist/browser/charts/core/svg-barGauge.js +2 -2
- package/dist/browser/charts/core/svg-barGauge.js.map +1 -1
- package/dist/browser/charts/core/svg-common.js +22 -1
- package/dist/browser/charts/core/svg-common.js.map +1 -1
- package/dist/browser/charts/core/svg-renderers.js +2 -2
- package/dist/browser/charts/core/svg-renderers.js.map +1 -1
- package/dist/browser/chat/ChatDecision.js +5 -4
- package/dist/browser/chat/ChatDecision.js.map +1 -1
- package/dist/browser/chat/ChatPrimitives.js +7 -5
- package/dist/browser/chat/ChatPrimitives.js.map +1 -1
- package/dist/browser/content/Calendar.js +1103 -922
- package/dist/browser/content/Calendar.js.map +1 -1
- package/dist/browser/content/CalendarDayView.js +336 -259
- package/dist/browser/content/CalendarDayView.js.map +1 -1
- package/dist/browser/content/CalendarWeekView.js +332 -236
- package/dist/browser/content/CalendarWeekView.js.map +1 -1
- package/dist/browser/content/ChartRoot.js +233 -100
- package/dist/browser/content/ChartRoot.js.map +1 -1
- package/dist/browser/content/MarkdownView.js +3 -1
- package/dist/browser/content/MarkdownView.js.map +1 -1
- package/dist/browser/content/ReferenceChip.js +2 -1
- package/dist/browser/content/ReferenceChip.js.map +1 -1
- package/dist/browser/content/calendar-days.js +114 -26
- package/dist/browser/content/calendar-days.js.map +1 -1
- package/dist/browser/content/calendar-event-detail.js +133 -98
- package/dist/browser/content/calendar-event-detail.js.map +1 -1
- package/dist/browser/content/calendar-events.js +107 -0
- package/dist/browser/content/calendar-events.js.map +1 -0
- package/dist/browser/content/calendar-messages.js +28 -2
- package/dist/browser/content/calendar-messages.js.map +1 -1
- package/dist/browser/content/calendar-month-layout.js +89 -5
- package/dist/browser/content/calendar-month-layout.js.map +1 -1
- package/dist/browser/content/calendar-month-scroll.js +2 -1
- package/dist/browser/content/calendar-month-scroll.js.map +1 -1
- package/dist/browser/content/calendar-overflow.browser-suite.js +534 -0
- package/dist/browser/content/calendar-overflow.browser-suite.js.map +1 -0
- package/dist/browser/content/calendar-overflow.js +366 -0
- package/dist/browser/content/calendar-overflow.js.map +1 -0
- package/dist/browser/content/calendar-shared.js +119 -104
- package/dist/browser/content/calendar-shared.js.map +1 -1
- package/dist/browser/content/calendar-snapshot.js +71 -0
- package/dist/browser/content/calendar-snapshot.js.map +1 -0
- package/dist/browser/content/calendar-time-view.js +519 -305
- package/dist/browser/content/calendar-time-view.js.map +1 -1
- package/dist/browser/content/chart-bar.js +3 -3
- package/dist/browser/content/chart-bar.js.map +1 -1
- package/dist/browser/content/chart-calendar.js +2 -1
- package/dist/browser/content/chart-calendar.js.map +1 -1
- package/dist/browser/content/chart-inspection-mount.js +1 -1
- package/dist/browser/content/chart-inspection-mount.js.map +1 -1
- package/dist/browser/content/chart-line-gaps.js +1 -1
- package/dist/browser/content/chart-line-gaps.js.map +1 -1
- package/dist/browser/content/chart-message-catalog.js +6 -0
- package/dist/browser/content/chart-message-catalog.js.map +1 -1
- package/dist/browser/content/chart-state-timeline.js +45 -12
- package/dist/browser/content/chart-state-timeline.js.map +1 -1
- package/dist/browser/content/chart-svg.js +5 -1
- package/dist/browser/content/chart-svg.js.map +1 -1
- package/dist/browser/content/chart-tick-room.js +23 -0
- package/dist/browser/content/chart-tick-room.js.map +1 -1
- package/dist/browser/content/index.js +3 -0
- package/dist/browser/content/index.js.map +1 -1
- package/dist/browser/content/markdown-info-blocks.js +1 -1
- package/dist/browser/content/markdown-info-blocks.js.map +1 -1
- package/dist/browser/content/markdown-links.js +36 -2
- package/dist/browser/content/markdown-links.js.map +1 -1
- package/dist/browser/feedback/prompt-form-loader.js +3 -2
- package/dist/browser/feedback/prompt-form-loader.js.map +1 -1
- package/dist/browser/feedback/toast.js +21 -1
- package/dist/browser/feedback/toast.js.map +1 -1
- package/dist/browser/inputs/AutocompleteSelect.js +2 -1
- package/dist/browser/inputs/AutocompleteSelect.js.map +1 -1
- package/dist/browser/inputs/ChoiceInputs.js +3 -2
- package/dist/browser/inputs/ChoiceInputs.js.map +1 -1
- package/dist/browser/inputs/ColorChoices.js +2 -1
- package/dist/browser/inputs/ColorChoices.js.map +1 -1
- package/dist/browser/inputs/RichSelect.js +2 -1
- package/dist/browser/inputs/RichSelect.js.map +1 -1
- package/dist/browser/inputs/Select.js +3 -2
- package/dist/browser/inputs/Select.js.map +1 -1
- package/dist/browser/inputs/date-picker.js +9 -0
- package/dist/browser/inputs/date-picker.js.map +1 -1
- package/dist/browser/inputs/markdown/Toolbar.js +18 -14
- package/dist/browser/inputs/markdown/Toolbar.js.map +1 -1
- package/dist/browser/internal/color.js +25 -0
- package/dist/browser/internal/color.js.map +1 -1
- package/dist/browser/internal/pending-loads.js +17 -0
- package/dist/browser/internal/pending-loads.js.map +1 -0
- package/dist/browser/intl/messages.js +16 -0
- package/dist/browser/intl/messages.js.map +1 -1
- package/dist/browser/layout/AppWorkspace.js +6 -0
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/DetailSections.js +110 -98
- package/dist/browser/layout/DetailSections.js.map +1 -1
- package/dist/browser/layout/FloatingWindow.js +2 -1
- package/dist/browser/layout/FloatingWindow.js.map +1 -1
- package/dist/browser/layout/Navigation.js +172 -123
- package/dist/browser/layout/Navigation.js.map +1 -1
- package/dist/browser/layout/Panes.js +188 -237
- package/dist/browser/layout/Panes.js.map +1 -1
- package/dist/browser/layout/SidebarSwitcher.js +7 -3
- package/dist/browser/layout/SidebarSwitcher.js.map +1 -1
- package/dist/browser/layout/navigation-model.js.map +1 -1
- package/dist/browser/layout/panes-messages.js +0 -4
- package/dist/browser/layout/panes-messages.js.map +1 -1
- package/dist/browser/surfaces/Avatar.js +5 -2
- package/dist/browser/surfaces/Avatar.js.map +1 -1
- package/dist/browser/surfaces/NoticeCard.js +78 -36
- package/dist/browser/surfaces/NoticeCard.js.map +1 -1
- package/dist/browser/surfaces/NoticeRow.js +10 -3
- package/dist/browser/surfaces/NoticeRow.js.map +1 -1
- package/dist/browser/surfaces/index.js +1 -1
- package/dist/browser/surfaces/index.js.map +1 -1
- package/dist/browser/surfaces/notice-card-classes.js +16 -0
- package/dist/browser/surfaces/notice-card-classes.js.map +1 -0
- package/dist/browser/surfaces/person-color.js +34 -4
- package/dist/browser/surfaces/person-color.js.map +1 -1
- package/dist/browser/v2/accent.js +114 -0
- package/dist/browser/v2/accent.js.map +1 -0
- package/dist/browser/v2/action-bar.js +125 -0
- package/dist/browser/v2/action-bar.js.map +1 -0
- package/dist/browser/v2/addresses.js +135 -0
- package/dist/browser/v2/addresses.js.map +1 -0
- package/dist/browser/v2/announce.js +94 -0
- package/dist/browser/v2/announce.js.map +1 -0
- package/dist/browser/v2/attach-live.js +280 -0
- package/dist/browser/v2/attach-live.js.map +1 -0
- package/dist/browser/v2/attach.js +432 -0
- package/dist/browser/v2/attach.js.map +1 -0
- package/dist/browser/v2/bar-fold.js +405 -0
- package/dist/browser/v2/bar-fold.js.map +1 -0
- package/dist/browser/v2/behavior/adapter.js +378 -0
- package/dist/browser/v2/behavior/adapter.js.map +1 -0
- package/dist/browser/v2/behavior/bind.js +43 -0
- package/dist/browser/v2/behavior/bind.js.map +1 -0
- package/dist/browser/v2/behavior/board.js +184 -0
- package/dist/browser/v2/behavior/board.js.map +1 -0
- package/dist/browser/v2/behavior/calendar.js +39 -0
- package/dist/browser/v2/behavior/calendar.js.map +1 -0
- package/dist/browser/v2/behavior/code.js +25 -0
- package/dist/browser/v2/behavior/code.js.map +1 -0
- package/dist/browser/v2/behavior/controls.js +58 -0
- package/dist/browser/v2/behavior/controls.js.map +1 -0
- package/dist/browser/v2/behavior/dates.js +8 -0
- package/dist/browser/v2/behavior/dates.js.map +1 -0
- package/dist/browser/v2/behavior/dnd.js +545 -0
- package/dist/browser/v2/behavior/dnd.js.map +1 -0
- package/dist/browser/v2/behavior/files.js +43 -0
- package/dist/browser/v2/behavior/files.js.map +1 -0
- package/dist/browser/v2/behavior/layer.js +3 -0
- package/dist/browser/v2/behavior/layer.js.map +1 -0
- package/dist/browser/v2/behavior/lists.js +102 -0
- package/dist/browser/v2/behavior/lists.js.map +1 -0
- package/dist/browser/v2/behavior/menu.js +97 -0
- package/dist/browser/v2/behavior/menu.js.map +1 -0
- package/dist/browser/v2/behavior/messages.js +200 -0
- package/dist/browser/v2/behavior/messages.js.map +1 -0
- package/dist/browser/v2/behavior/overlays.js +304 -0
- package/dist/browser/v2/behavior/overlays.js.map +1 -0
- package/dist/browser/v2/behavior/pickers.js +86 -0
- package/dist/browser/v2/behavior/pickers.js.map +1 -0
- package/dist/browser/v2/behavior/resize.js +147 -0
- package/dist/browser/v2/behavior/resize.js.map +1 -0
- package/dist/browser/v2/behavior/segmented.js +17 -0
- package/dist/browser/v2/behavior/segmented.js.map +1 -0
- package/dist/browser/v2/behavior/select.js +134 -0
- package/dist/browser/v2/behavior/select.js.map +1 -0
- package/dist/browser/v2/behavior/time-input.js +95 -0
- package/dist/browser/v2/behavior/time-input.js.map +1 -0
- package/dist/browser/v2/behavior/time-text.js +83 -0
- package/dist/browser/v2/behavior/time-text.js.map +1 -0
- package/dist/browser/v2/behavior/tip.js +31 -0
- package/dist/browser/v2/behavior/tip.js.map +1 -0
- package/dist/browser/v2/behavior/toast.js +152 -0
- package/dist/browser/v2/behavior/toast.js.map +1 -0
- package/dist/browser/v2/behavior/treegrid.js +75 -0
- package/dist/browser/v2/behavior/treegrid.js.map +1 -0
- package/dist/browser/v2/board-messages.js +70 -0
- package/dist/browser/v2/board-messages.js.map +1 -0
- package/dist/browser/v2/board.js +471 -0
- package/dist/browser/v2/board.js.map +1 -0
- package/dist/browser/v2/button-failure.js +90 -0
- package/dist/browser/v2/button-failure.js.map +1 -0
- package/dist/browser/v2/button.js +309 -0
- package/dist/browser/v2/button.js.map +1 -0
- package/dist/browser/v2/colors.js +135 -0
- package/dist/browser/v2/colors.js.map +1 -0
- package/dist/browser/v2/columns-context.js +48 -0
- package/dist/browser/v2/columns-context.js.map +1 -0
- package/dist/browser/v2/components.js +2096 -0
- package/dist/browser/v2/components.js.map +1 -0
- package/dist/browser/v2/content.js +2195 -0
- package/dist/browser/v2/content.js.map +1 -0
- package/dist/browser/v2/control-messages.js +115 -0
- package/dist/browser/v2/control-messages.js.map +1 -0
- package/dist/browser/v2/controls.js +2623 -0
- package/dist/browser/v2/controls.js.map +1 -0
- package/dist/browser/v2/danger-zone.js +47 -0
- package/dist/browser/v2/danger-zone.js.map +1 -0
- package/dist/browser/v2/date-messages.js +61 -0
- package/dist/browser/v2/date-messages.js.map +1 -0
- package/dist/browser/v2/date-picker.js +405 -0
- package/dist/browser/v2/date-picker.js.map +1 -0
- package/dist/browser/v2/date-week-window.js +264 -0
- package/dist/browser/v2/date-week-window.js.map +1 -0
- package/dist/browser/v2/date-weeks.js +30 -0
- package/dist/browser/v2/date-weeks.js.map +1 -0
- package/dist/browser/v2/day-bar.js +87 -0
- package/dist/browser/v2/day-bar.js.map +1 -0
- package/dist/browser/v2/describe.js +582 -0
- package/dist/browser/v2/describe.js.map +1 -0
- package/dist/browser/v2/draft.js +55 -0
- package/dist/browser/v2/draft.js.map +1 -0
- package/dist/browser/v2/emoji-picker.js +240 -0
- package/dist/browser/v2/emoji-picker.js.map +1 -0
- package/dist/browser/v2/ends.js +37 -0
- package/dist/browser/v2/ends.js.map +1 -0
- package/dist/browser/v2/error-screen.js +118 -0
- package/dist/browser/v2/error-screen.js.map +1 -0
- package/dist/browser/v2/failed.js +90 -0
- package/dist/browser/v2/failed.js.map +1 -0
- package/dist/browser/v2/figures.js +179 -0
- package/dist/browser/v2/figures.js.map +1 -0
- package/dist/browser/v2/filter-bar.js +3009 -0
- package/dist/browser/v2/filter-bar.js.map +1 -0
- package/dist/browser/v2/filter-messages.js +244 -0
- package/dist/browser/v2/filter-messages.js.map +1 -0
- package/dist/browser/v2/head-search.js +159 -0
- package/dist/browser/v2/head-search.js.map +1 -0
- package/dist/browser/v2/heat-days.js +91 -0
- package/dist/browser/v2/heat-days.js.map +1 -0
- package/dist/browser/v2/heat.js +260 -0
- package/dist/browser/v2/heat.js.map +1 -0
- package/dist/browser/v2/icon.js +48 -0
- package/dist/browser/v2/icon.js.map +1 -0
- package/dist/browser/v2/index.js +84 -0
- package/dist/browser/v2/index.js.map +1 -0
- package/dist/browser/v2/layout.js +2118 -0
- package/dist/browser/v2/layout.js.map +1 -0
- package/dist/browser/v2/link.js +9 -0
- package/dist/browser/v2/link.js.map +1 -0
- package/dist/browser/v2/list-group.js +57 -0
- package/dist/browser/v2/list-group.js.map +1 -0
- package/dist/browser/v2/list-query.js +736 -0
- package/dist/browser/v2/list-query.js.map +1 -0
- package/dist/browser/v2/lookup.js +431 -0
- package/dist/browser/v2/lookup.js.map +1 -0
- package/dist/browser/v2/marks.js +733 -0
- package/dist/browser/v2/marks.js.map +1 -0
- package/dist/browser/v2/menu-panel.js +241 -0
- package/dist/browser/v2/menu-panel.js.map +1 -0
- package/dist/browser/v2/menu.js +797 -0
- package/dist/browser/v2/menu.js.map +1 -0
- package/dist/browser/v2/nav-drop.js +25 -0
- package/dist/browser/v2/nav-drop.js.map +1 -0
- package/dist/browser/v2/nav-face.js +16 -0
- package/dist/browser/v2/nav-face.js.map +1 -0
- package/dist/browser/v2/nav-tree.js +498 -0
- package/dist/browser/v2/nav-tree.js.map +1 -0
- package/dist/browser/v2/now-line.js +61 -0
- package/dist/browser/v2/now-line.js.map +1 -0
- package/dist/browser/v2/overlay-messages.js +41 -0
- package/dist/browser/v2/overlay-messages.js.map +1 -0
- package/dist/browser/v2/overlays.js +431 -0
- package/dist/browser/v2/overlays.js.map +1 -0
- package/dist/browser/v2/page-layer.js +42 -0
- package/dist/browser/v2/page-layer.js.map +1 -0
- package/dist/browser/v2/pane-name.js +55 -0
- package/dist/browser/v2/pane-name.js.map +1 -0
- package/dist/browser/v2/pane-print.js +32 -0
- package/dist/browser/v2/pane-print.js.map +1 -0
- package/dist/browser/v2/pane-sheet.js +147 -0
- package/dist/browser/v2/pane-sheet.js.map +1 -0
- package/dist/browser/v2/popover.js +152 -0
- package/dist/browser/v2/popover.js.map +1 -0
- package/dist/browser/v2/reaction-messages.js +31 -0
- package/dist/browser/v2/reaction-messages.js.map +1 -0
- package/dist/browser/v2/reactions.js +239 -0
- package/dist/browser/v2/reactions.js.map +1 -0
- package/dist/browser/v2/row-drag.js +19 -0
- package/dist/browser/v2/row-drag.js.map +1 -0
- package/dist/browser/v2/section-level.js +9 -0
- package/dist/browser/v2/section-level.js.map +1 -0
- package/dist/browser/v2/segmented.js +146 -0
- package/dist/browser/v2/segmented.js.map +1 -0
- package/dist/browser/v2/select-live.js +162 -0
- package/dist/browser/v2/select-live.js.map +1 -0
- package/dist/browser/v2/setting-messages.js +25 -0
- package/dist/browser/v2/setting-messages.js.map +1 -0
- package/dist/browser/v2/split-button.js +82 -0
- package/dist/browser/v2/split-button.js.map +1 -0
- package/dist/browser/v2/states.js +208 -0
- package/dist/browser/v2/states.js.map +1 -0
- package/dist/browser/v2/status-toolbar.js +23 -0
- package/dist/browser/v2/status-toolbar.js.map +1 -0
- package/dist/browser/v2/structure.js +503 -0
- package/dist/browser/v2/structure.js.map +1 -0
- package/dist/browser/v2/testing/index.js +26 -0
- package/dist/browser/v2/testing/index.js.map +1 -0
- package/dist/browser/v2/testing/measure-v2-layout.js +1024 -0
- package/dist/browser/v2/testing/measure-v2-layout.js.map +1 -0
- package/dist/browser/v2/testing/settled.js +58 -0
- package/dist/browser/v2/testing/settled.js.map +1 -0
- package/dist/browser/v2/testing/visible.js +14 -0
- package/dist/browser/v2/testing/visible.js.map +1 -0
- package/dist/browser/v2/toast-host.js +18 -0
- package/dist/browser/v2/toast-host.js.map +1 -0
- package/dist/browser/v2/toast.js +241 -0
- package/dist/browser/v2/toast.js.map +1 -0
- package/dist/browser/v2/tokens.js +97 -0
- package/dist/browser/v2/tokens.js.map +1 -0
- package/dist/browser/v2/tree-messages.js +32 -0
- package/dist/browser/v2/tree-messages.js.map +1 -0
- package/dist/browser/v2/types.js +71 -0
- package/dist/browser/v2/types.js.map +1 -0
- package/dist/browser/v2/unsaved-bar.js +225 -0
- package/dist/browser/v2/unsaved-bar.js.map +1 -0
- package/dist/browser/v2/unsaved-messages.js +65 -0
- package/dist/browser/v2/unsaved-messages.js.map +1 -0
- package/dist/browser/v2/width-cookie.js +45 -0
- package/dist/browser/v2/width-cookie.js.map +1 -0
- package/dist/browser/v2/workspace-messages.js +31 -0
- package/dist/browser/v2/workspace-messages.js.map +1 -0
- package/dist/browser/widgets/Dashboard.js +3 -2
- package/dist/browser/widgets/Dashboard.js.map +1 -1
- package/dist/ssr/actions/Dropdown.js +2 -1
- package/dist/ssr/actions/Dropdown.js.map +1 -1
- package/dist/ssr/actions/FilterChip.js +3 -2
- package/dist/ssr/actions/FilterChip.js.map +1 -1
- package/dist/ssr/actions/SegmentedControl.js +2 -2
- package/dist/ssr/actions/SegmentedControl.js.map +1 -1
- package/dist/ssr/charts/core/line-details.js +52 -12
- package/dist/ssr/charts/core/line-details.js.map +1 -1
- package/dist/ssr/charts/core/line-extras.js +122 -0
- package/dist/ssr/charts/core/line-extras.js.map +1 -0
- package/dist/ssr/charts/core/line-options.js +1 -1
- package/dist/ssr/charts/core/line-options.js.map +1 -1
- package/dist/ssr/charts/core/snapshot.js +3 -2
- package/dist/ssr/charts/core/snapshot.js.map +1 -1
- package/dist/ssr/charts/core/svg-barGauge.js +2 -2
- package/dist/ssr/charts/core/svg-barGauge.js.map +1 -1
- package/dist/ssr/charts/core/svg-common.js +22 -1
- package/dist/ssr/charts/core/svg-common.js.map +1 -1
- package/dist/ssr/charts/core/svg-renderers.js +2 -2
- package/dist/ssr/charts/core/svg-renderers.js.map +1 -1
- package/dist/ssr/chat/ChatDecision.js +5 -4
- package/dist/ssr/chat/ChatDecision.js.map +1 -1
- package/dist/ssr/chat/ChatPrimitives.js +7 -5
- package/dist/ssr/chat/ChatPrimitives.js.map +1 -1
- package/dist/ssr/content/Calendar.js +410 -323
- package/dist/ssr/content/Calendar.js.map +1 -1
- package/dist/ssr/content/CalendarDayView.js +122 -49
- package/dist/ssr/content/CalendarDayView.js.map +1 -1
- package/dist/ssr/content/CalendarWeekView.js +152 -49
- package/dist/ssr/content/CalendarWeekView.js.map +1 -1
- package/dist/ssr/content/ChartRoot.js +82 -16
- package/dist/ssr/content/ChartRoot.js.map +1 -1
- package/dist/ssr/content/MarkdownView.js +3 -1
- package/dist/ssr/content/MarkdownView.js.map +1 -1
- package/dist/ssr/content/ReferenceChip.js +2 -1
- package/dist/ssr/content/ReferenceChip.js.map +1 -1
- package/dist/ssr/content/calendar-days.js +114 -26
- package/dist/ssr/content/calendar-days.js.map +1 -1
- package/dist/ssr/content/calendar-event-detail.js +46 -10
- package/dist/ssr/content/calendar-event-detail.js.map +1 -1
- package/dist/ssr/content/calendar-events.js +107 -0
- package/dist/ssr/content/calendar-events.js.map +1 -0
- package/dist/ssr/content/calendar-messages.js +28 -2
- package/dist/ssr/content/calendar-messages.js.map +1 -1
- package/dist/ssr/content/calendar-month-layout.js +89 -5
- package/dist/ssr/content/calendar-month-layout.js.map +1 -1
- package/dist/ssr/content/calendar-month-scroll.js +2 -1
- package/dist/ssr/content/calendar-month-scroll.js.map +1 -1
- package/dist/ssr/content/calendar-overflow.browser-suite.js +534 -0
- package/dist/ssr/content/calendar-overflow.browser-suite.js.map +1 -0
- package/dist/ssr/content/calendar-overflow.js +272 -0
- package/dist/ssr/content/calendar-overflow.js.map +1 -0
- package/dist/ssr/content/calendar-shared.js +47 -42
- package/dist/ssr/content/calendar-shared.js.map +1 -1
- package/dist/ssr/content/calendar-snapshot.js +71 -0
- package/dist/ssr/content/calendar-snapshot.js.map +1 -0
- package/dist/ssr/content/calendar-time-view.js +319 -136
- package/dist/ssr/content/calendar-time-view.js.map +1 -1
- package/dist/ssr/content/chart-bar.js +3 -3
- package/dist/ssr/content/chart-bar.js.map +1 -1
- package/dist/ssr/content/chart-calendar.js +2 -1
- package/dist/ssr/content/chart-calendar.js.map +1 -1
- package/dist/ssr/content/chart-inspection-mount.js +1 -1
- package/dist/ssr/content/chart-inspection-mount.js.map +1 -1
- package/dist/ssr/content/chart-line-gaps.js +1 -1
- package/dist/ssr/content/chart-line-gaps.js.map +1 -1
- package/dist/ssr/content/chart-message-catalog.js +6 -0
- package/dist/ssr/content/chart-message-catalog.js.map +1 -1
- package/dist/ssr/content/chart-state-timeline.js +45 -12
- package/dist/ssr/content/chart-state-timeline.js.map +1 -1
- package/dist/ssr/content/chart-svg.js +5 -1
- package/dist/ssr/content/chart-svg.js.map +1 -1
- package/dist/ssr/content/chart-tick-room.js +23 -0
- package/dist/ssr/content/chart-tick-room.js.map +1 -1
- package/dist/ssr/content/index.js +3 -0
- package/dist/ssr/content/index.js.map +1 -1
- package/dist/ssr/content/markdown-info-blocks.js +1 -1
- package/dist/ssr/content/markdown-info-blocks.js.map +1 -1
- package/dist/ssr/content/markdown-links.js +36 -2
- package/dist/ssr/content/markdown-links.js.map +1 -1
- package/dist/ssr/feedback/prompt-form-loader.js +3 -2
- package/dist/ssr/feedback/prompt-form-loader.js.map +1 -1
- package/dist/ssr/feedback/toast.js +21 -1
- package/dist/ssr/feedback/toast.js.map +1 -1
- package/dist/ssr/inputs/AutocompleteSelect.js +2 -1
- package/dist/ssr/inputs/AutocompleteSelect.js.map +1 -1
- package/dist/ssr/inputs/ChoiceInputs.js +3 -2
- package/dist/ssr/inputs/ChoiceInputs.js.map +1 -1
- package/dist/ssr/inputs/ColorChoices.js +2 -1
- package/dist/ssr/inputs/ColorChoices.js.map +1 -1
- package/dist/ssr/inputs/RichSelect.js +2 -1
- package/dist/ssr/inputs/RichSelect.js.map +1 -1
- package/dist/ssr/inputs/Select.js +3 -2
- package/dist/ssr/inputs/Select.js.map +1 -1
- package/dist/ssr/inputs/date-picker.js +9 -0
- package/dist/ssr/inputs/date-picker.js.map +1 -1
- package/dist/ssr/inputs/markdown/Toolbar.js +6 -1
- package/dist/ssr/inputs/markdown/Toolbar.js.map +1 -1
- package/dist/ssr/internal/color.js +25 -0
- package/dist/ssr/internal/color.js.map +1 -1
- package/dist/ssr/internal/pending-loads.js +17 -0
- package/dist/ssr/internal/pending-loads.js.map +1 -0
- package/dist/ssr/intl/messages.js +16 -0
- package/dist/ssr/intl/messages.js.map +1 -1
- package/dist/ssr/layout/AppWorkspace.js +6 -0
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/DetailSections.js +19 -10
- package/dist/ssr/layout/DetailSections.js.map +1 -1
- package/dist/ssr/layout/FloatingWindow.js +2 -1
- package/dist/ssr/layout/FloatingWindow.js.map +1 -1
- package/dist/ssr/layout/Navigation.js +54 -26
- package/dist/ssr/layout/Navigation.js.map +1 -1
- package/dist/ssr/layout/Panes.js +32 -67
- package/dist/ssr/layout/Panes.js.map +1 -1
- package/dist/ssr/layout/SidebarSwitcher.js +7 -3
- package/dist/ssr/layout/SidebarSwitcher.js.map +1 -1
- package/dist/ssr/layout/navigation-model.js.map +1 -1
- package/dist/ssr/layout/panes-messages.js +0 -4
- package/dist/ssr/layout/panes-messages.js.map +1 -1
- package/dist/ssr/surfaces/Avatar.js +5 -2
- package/dist/ssr/surfaces/Avatar.js.map +1 -1
- package/dist/ssr/surfaces/NoticeCard.js +27 -20
- package/dist/ssr/surfaces/NoticeCard.js.map +1 -1
- package/dist/ssr/surfaces/NoticeRow.js +10 -3
- package/dist/ssr/surfaces/NoticeRow.js.map +1 -1
- package/dist/ssr/surfaces/index.js +1 -1
- package/dist/ssr/surfaces/index.js.map +1 -1
- package/dist/ssr/surfaces/notice-card-classes.js +16 -0
- package/dist/ssr/surfaces/notice-card-classes.js.map +1 -0
- package/dist/ssr/surfaces/person-color.js +34 -4
- package/dist/ssr/surfaces/person-color.js.map +1 -1
- package/dist/ssr/v2/accent.js +114 -0
- package/dist/ssr/v2/accent.js.map +1 -0
- package/dist/ssr/v2/action-bar.js +88 -0
- package/dist/ssr/v2/action-bar.js.map +1 -0
- package/dist/ssr/v2/addresses.js +135 -0
- package/dist/ssr/v2/addresses.js.map +1 -0
- package/dist/ssr/v2/announce.js +93 -0
- package/dist/ssr/v2/announce.js.map +1 -0
- package/dist/ssr/v2/attach-live.js +279 -0
- package/dist/ssr/v2/attach-live.js.map +1 -0
- package/dist/ssr/v2/attach.js +432 -0
- package/dist/ssr/v2/attach.js.map +1 -0
- package/dist/ssr/v2/bar-fold.js +405 -0
- package/dist/ssr/v2/bar-fold.js.map +1 -0
- package/dist/ssr/v2/behavior/adapter.js +378 -0
- package/dist/ssr/v2/behavior/adapter.js.map +1 -0
- package/dist/ssr/v2/behavior/bind.js +43 -0
- package/dist/ssr/v2/behavior/bind.js.map +1 -0
- package/dist/ssr/v2/behavior/board.js +184 -0
- package/dist/ssr/v2/behavior/board.js.map +1 -0
- package/dist/ssr/v2/behavior/calendar.js +39 -0
- package/dist/ssr/v2/behavior/calendar.js.map +1 -0
- package/dist/ssr/v2/behavior/code.js +25 -0
- package/dist/ssr/v2/behavior/code.js.map +1 -0
- package/dist/ssr/v2/behavior/controls.js +58 -0
- package/dist/ssr/v2/behavior/controls.js.map +1 -0
- package/dist/ssr/v2/behavior/dates.js +8 -0
- package/dist/ssr/v2/behavior/dates.js.map +1 -0
- package/dist/ssr/v2/behavior/dnd.js +545 -0
- package/dist/ssr/v2/behavior/dnd.js.map +1 -0
- package/dist/ssr/v2/behavior/files.js +43 -0
- package/dist/ssr/v2/behavior/files.js.map +1 -0
- package/dist/ssr/v2/behavior/layer.js +3 -0
- package/dist/ssr/v2/behavior/layer.js.map +1 -0
- package/dist/ssr/v2/behavior/lists.js +102 -0
- package/dist/ssr/v2/behavior/lists.js.map +1 -0
- package/dist/ssr/v2/behavior/menu.js +91 -0
- package/dist/ssr/v2/behavior/menu.js.map +1 -0
- package/dist/ssr/v2/behavior/messages.js +200 -0
- package/dist/ssr/v2/behavior/messages.js.map +1 -0
- package/dist/ssr/v2/behavior/overlays.js +293 -0
- package/dist/ssr/v2/behavior/overlays.js.map +1 -0
- package/dist/ssr/v2/behavior/pickers.js +86 -0
- package/dist/ssr/v2/behavior/pickers.js.map +1 -0
- package/dist/ssr/v2/behavior/resize.js +147 -0
- package/dist/ssr/v2/behavior/resize.js.map +1 -0
- package/dist/ssr/v2/behavior/segmented.js +17 -0
- package/dist/ssr/v2/behavior/segmented.js.map +1 -0
- package/dist/ssr/v2/behavior/select.js +133 -0
- package/dist/ssr/v2/behavior/select.js.map +1 -0
- package/dist/ssr/v2/behavior/time-input.js +95 -0
- package/dist/ssr/v2/behavior/time-input.js.map +1 -0
- package/dist/ssr/v2/behavior/time-text.js +83 -0
- package/dist/ssr/v2/behavior/time-text.js.map +1 -0
- package/dist/ssr/v2/behavior/tip.js +31 -0
- package/dist/ssr/v2/behavior/tip.js.map +1 -0
- package/dist/ssr/v2/behavior/toast.js +152 -0
- package/dist/ssr/v2/behavior/toast.js.map +1 -0
- package/dist/ssr/v2/behavior/treegrid.js +75 -0
- package/dist/ssr/v2/behavior/treegrid.js.map +1 -0
- package/dist/ssr/v2/board-messages.js +70 -0
- package/dist/ssr/v2/board-messages.js.map +1 -0
- package/dist/ssr/v2/board.js +388 -0
- package/dist/ssr/v2/board.js.map +1 -0
- package/dist/ssr/v2/button-failure.js +90 -0
- package/dist/ssr/v2/button-failure.js.map +1 -0
- package/dist/ssr/v2/button.js +304 -0
- package/dist/ssr/v2/button.js.map +1 -0
- package/dist/ssr/v2/colors.js +135 -0
- package/dist/ssr/v2/colors.js.map +1 -0
- package/dist/ssr/v2/columns-context.js +48 -0
- package/dist/ssr/v2/columns-context.js.map +1 -0
- package/dist/ssr/v2/components.js +1484 -0
- package/dist/ssr/v2/components.js.map +1 -0
- package/dist/ssr/v2/content.js +1497 -0
- package/dist/ssr/v2/content.js.map +1 -0
- package/dist/ssr/v2/control-messages.js +115 -0
- package/dist/ssr/v2/control-messages.js.map +1 -0
- package/dist/ssr/v2/controls.js +1888 -0
- package/dist/ssr/v2/controls.js.map +1 -0
- package/dist/ssr/v2/danger-zone.js +28 -0
- package/dist/ssr/v2/danger-zone.js.map +1 -0
- package/dist/ssr/v2/date-messages.js +61 -0
- package/dist/ssr/v2/date-messages.js.map +1 -0
- package/dist/ssr/v2/date-picker.js +351 -0
- package/dist/ssr/v2/date-picker.js.map +1 -0
- package/dist/ssr/v2/date-week-window.js +149 -0
- package/dist/ssr/v2/date-week-window.js.map +1 -0
- package/dist/ssr/v2/date-weeks.js +30 -0
- package/dist/ssr/v2/date-weeks.js.map +1 -0
- package/dist/ssr/v2/day-bar.js +52 -0
- package/dist/ssr/v2/day-bar.js.map +1 -0
- package/dist/ssr/v2/describe.js +582 -0
- package/dist/ssr/v2/describe.js.map +1 -0
- package/dist/ssr/v2/draft.js +55 -0
- package/dist/ssr/v2/draft.js.map +1 -0
- package/dist/ssr/v2/emoji-picker.js +182 -0
- package/dist/ssr/v2/emoji-picker.js.map +1 -0
- package/dist/ssr/v2/ends.js +27 -0
- package/dist/ssr/v2/ends.js.map +1 -0
- package/dist/ssr/v2/error-screen.js +73 -0
- package/dist/ssr/v2/error-screen.js.map +1 -0
- package/dist/ssr/v2/failed.js +63 -0
- package/dist/ssr/v2/failed.js.map +1 -0
- package/dist/ssr/v2/figures.js +101 -0
- package/dist/ssr/v2/figures.js.map +1 -0
- package/dist/ssr/v2/filter-bar.js +2495 -0
- package/dist/ssr/v2/filter-bar.js.map +1 -0
- package/dist/ssr/v2/filter-messages.js +244 -0
- package/dist/ssr/v2/filter-messages.js.map +1 -0
- package/dist/ssr/v2/head-search.js +159 -0
- package/dist/ssr/v2/head-search.js.map +1 -0
- package/dist/ssr/v2/heat-days.js +91 -0
- package/dist/ssr/v2/heat-days.js.map +1 -0
- package/dist/ssr/v2/heat.js +145 -0
- package/dist/ssr/v2/heat.js.map +1 -0
- package/dist/ssr/v2/icon.js +18 -0
- package/dist/ssr/v2/icon.js.map +1 -0
- package/dist/ssr/v2/index.js +84 -0
- package/dist/ssr/v2/index.js.map +1 -0
- package/dist/ssr/v2/layout.js +1483 -0
- package/dist/ssr/v2/layout.js.map +1 -0
- package/dist/ssr/v2/link.js +9 -0
- package/dist/ssr/v2/link.js.map +1 -0
- package/dist/ssr/v2/list-group.js +37 -0
- package/dist/ssr/v2/list-group.js.map +1 -0
- package/dist/ssr/v2/list-query.js +736 -0
- package/dist/ssr/v2/list-query.js.map +1 -0
- package/dist/ssr/v2/lookup.js +333 -0
- package/dist/ssr/v2/lookup.js.map +1 -0
- package/dist/ssr/v2/marks.js +433 -0
- package/dist/ssr/v2/marks.js.map +1 -0
- package/dist/ssr/v2/menu-panel.js +217 -0
- package/dist/ssr/v2/menu-panel.js.map +1 -0
- package/dist/ssr/v2/menu.js +733 -0
- package/dist/ssr/v2/menu.js.map +1 -0
- package/dist/ssr/v2/nav-drop.js +25 -0
- package/dist/ssr/v2/nav-drop.js.map +1 -0
- package/dist/ssr/v2/nav-face.js +16 -0
- package/dist/ssr/v2/nav-face.js.map +1 -0
- package/dist/ssr/v2/nav-tree.js +436 -0
- package/dist/ssr/v2/nav-tree.js.map +1 -0
- package/dist/ssr/v2/now-line.js +44 -0
- package/dist/ssr/v2/now-line.js.map +1 -0
- package/dist/ssr/v2/overlay-messages.js +41 -0
- package/dist/ssr/v2/overlay-messages.js.map +1 -0
- package/dist/ssr/v2/overlays.js +365 -0
- package/dist/ssr/v2/overlays.js.map +1 -0
- package/dist/ssr/v2/page-layer.js +41 -0
- package/dist/ssr/v2/page-layer.js.map +1 -0
- package/dist/ssr/v2/pane-name.js +33 -0
- package/dist/ssr/v2/pane-name.js.map +1 -0
- package/dist/ssr/v2/pane-print.js +32 -0
- package/dist/ssr/v2/pane-print.js.map +1 -0
- package/dist/ssr/v2/pane-sheet.js +147 -0
- package/dist/ssr/v2/pane-sheet.js.map +1 -0
- package/dist/ssr/v2/popover.js +144 -0
- package/dist/ssr/v2/popover.js.map +1 -0
- package/dist/ssr/v2/reaction-messages.js +31 -0
- package/dist/ssr/v2/reaction-messages.js.map +1 -0
- package/dist/ssr/v2/reactions.js +200 -0
- package/dist/ssr/v2/reactions.js.map +1 -0
- package/dist/ssr/v2/row-drag.js +19 -0
- package/dist/ssr/v2/row-drag.js.map +1 -0
- package/dist/ssr/v2/section-level.js +9 -0
- package/dist/ssr/v2/section-level.js.map +1 -0
- package/dist/ssr/v2/segmented.js +104 -0
- package/dist/ssr/v2/segmented.js.map +1 -0
- package/dist/ssr/v2/select-live.js +142 -0
- package/dist/ssr/v2/select-live.js.map +1 -0
- package/dist/ssr/v2/setting-messages.js +25 -0
- package/dist/ssr/v2/setting-messages.js.map +1 -0
- package/dist/ssr/v2/split-button.js +66 -0
- package/dist/ssr/v2/split-button.js.map +1 -0
- package/dist/ssr/v2/states.js +140 -0
- package/dist/ssr/v2/states.js.map +1 -0
- package/dist/ssr/v2/status-toolbar.js +23 -0
- package/dist/ssr/v2/status-toolbar.js.map +1 -0
- package/dist/ssr/v2/structure.js +382 -0
- package/dist/ssr/v2/structure.js.map +1 -0
- package/dist/ssr/v2/testing/index.js +26 -0
- package/dist/ssr/v2/testing/index.js.map +1 -0
- package/dist/ssr/v2/testing/measure-v2-layout.js +1024 -0
- package/dist/ssr/v2/testing/measure-v2-layout.js.map +1 -0
- package/dist/ssr/v2/testing/settled.js +58 -0
- package/dist/ssr/v2/testing/settled.js.map +1 -0
- package/dist/ssr/v2/testing/visible.js +14 -0
- package/dist/ssr/v2/testing/visible.js.map +1 -0
- package/dist/ssr/v2/toast-host.js +18 -0
- package/dist/ssr/v2/toast-host.js.map +1 -0
- package/dist/ssr/v2/toast.js +222 -0
- package/dist/ssr/v2/toast.js.map +1 -0
- package/dist/ssr/v2/tokens.js +97 -0
- package/dist/ssr/v2/tokens.js.map +1 -0
- package/dist/ssr/v2/tree-messages.js +32 -0
- package/dist/ssr/v2/tree-messages.js.map +1 -0
- package/dist/ssr/v2/types.js +71 -0
- package/dist/ssr/v2/types.js.map +1 -0
- package/dist/ssr/v2/unsaved-bar.js +183 -0
- package/dist/ssr/v2/unsaved-bar.js.map +1 -0
- package/dist/ssr/v2/unsaved-messages.js +65 -0
- package/dist/ssr/v2/unsaved-messages.js.map +1 -0
- package/dist/ssr/v2/width-cookie.js +45 -0
- package/dist/ssr/v2/width-cookie.js.map +1 -0
- package/dist/ssr/v2/workspace-messages.js +31 -0
- package/dist/ssr/v2/workspace-messages.js.map +1 -0
- package/dist/ssr/widgets/Dashboard.js +3 -2
- package/dist/ssr/widgets/Dashboard.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tabler.css +1 -1
- package/dist/types/actions/SegmentedControl.d.ts +4 -0
- package/dist/types/charts/core/line-extras.d.ts +33 -0
- package/dist/types/charts/core/line-options.d.ts +3 -0
- package/dist/types/charts/core/svg-common.d.ts +49 -2
- package/dist/types/content/Calendar.d.ts +14 -2
- package/dist/types/content/MarkdownView.d.ts +2 -0
- package/dist/types/content/calendar-days.d.ts +52 -2
- package/dist/types/content/calendar-events.d.ts +35 -0
- package/dist/types/content/calendar-messages.d.ts +13 -0
- package/dist/types/content/calendar-month-layout.d.ts +44 -4
- package/dist/types/content/calendar-month-scroll.d.ts +2 -1
- package/dist/types/content/calendar-overflow.browser-suite.d.ts +37 -0
- package/dist/types/content/calendar-overflow.d.ts +30 -0
- package/dist/types/content/calendar-shared.d.ts +9 -11
- package/dist/types/content/calendar-snapshot.d.ts +28 -0
- package/dist/types/content/calendar-time-view.d.ts +37 -12
- package/dist/types/content/chart-bar.d.ts +1 -1
- package/dist/types/content/chart-inspection-mount.d.ts +1 -1
- package/dist/types/content/chart-line-gaps.d.ts +1 -1
- package/dist/types/content/chart-message-catalog.d.ts +6 -0
- package/dist/types/content/chart-state-timeline.d.ts +20 -0
- package/dist/types/content/chart-tick-room.d.ts +8 -0
- package/dist/types/content/index.d.ts +3 -0
- package/dist/types/content/markdown-links.d.ts +2 -1
- package/dist/types/inputs/date-picker.d.ts +2 -0
- package/dist/types/internal/color.d.ts +8 -0
- package/dist/types/internal/pending-loads.d.ts +8 -0
- package/dist/types/intl/messages.d.ts +8 -0
- package/dist/types/layout/AppWorkspace.d.ts +5 -0
- package/dist/types/layout/DetailSections.d.ts +11 -1
- package/dist/types/layout/Panes.d.ts +2 -2
- package/dist/types/layout/navigation-model.d.ts +5 -0
- package/dist/types/layout/panes-messages.d.ts +0 -2
- package/dist/types/surfaces/NoticeCard.d.ts +9 -13
- package/dist/types/surfaces/NoticeRow.d.ts +6 -1
- package/dist/types/surfaces/index.d.ts +1 -1
- package/dist/types/surfaces/notice-card-classes.d.ts +14 -0
- package/dist/types/surfaces/person-color.d.ts +27 -4
- package/dist/types/v2/accent.d.ts +24 -0
- package/dist/types/v2/action-bar.d.ts +37 -0
- package/dist/types/v2/addresses.d.ts +26 -0
- package/dist/types/v2/announce.d.ts +17 -0
- package/dist/types/v2/attach-live.d.ts +21 -0
- package/dist/types/v2/attach.d.ts +37 -0
- package/dist/types/v2/bar-fold.d.ts +40 -0
- package/dist/types/v2/behavior/adapter.d.ts +69 -0
- package/dist/types/v2/behavior/bind.d.ts +14 -0
- package/dist/types/v2/behavior/board.d.ts +45 -0
- package/dist/types/v2/behavior/calendar.d.ts +35 -0
- package/dist/types/v2/behavior/code.d.ts +27 -0
- package/dist/types/v2/behavior/controls.d.ts +51 -0
- package/dist/types/v2/behavior/dates.d.ts +7 -0
- package/dist/types/v2/behavior/dnd.d.ts +61 -0
- package/dist/types/v2/behavior/files.d.ts +44 -0
- package/dist/types/v2/behavior/layer.d.ts +1 -0
- package/dist/types/v2/behavior/lists.d.ts +91 -0
- package/dist/types/v2/behavior/menu.d.ts +56 -0
- package/dist/types/v2/behavior/messages.d.ts +72 -0
- package/dist/types/v2/behavior/overlays.d.ts +126 -0
- package/dist/types/v2/behavior/pickers.d.ts +62 -0
- package/dist/types/v2/behavior/resize.d.ts +57 -0
- package/dist/types/v2/behavior/segmented.d.ts +18 -0
- package/dist/types/v2/behavior/select.d.ts +73 -0
- package/dist/types/v2/behavior/time-input.d.ts +36 -0
- package/dist/types/v2/behavior/time-text.d.ts +14 -0
- package/dist/types/v2/behavior/tip.d.ts +17 -0
- package/dist/types/v2/behavior/toast.d.ts +90 -0
- package/dist/types/v2/behavior/treegrid.d.ts +40 -0
- package/dist/types/v2/board-messages.d.ts +22 -0
- package/dist/types/v2/board.d.ts +79 -0
- package/dist/types/v2/button-failure.d.ts +18 -0
- package/dist/types/v2/button.d.ts +126 -0
- package/dist/types/v2/colors.d.ts +42 -0
- package/dist/types/v2/columns-context.d.ts +50 -0
- package/dist/types/v2/components.d.ts +519 -0
- package/dist/types/v2/content.d.ts +478 -0
- package/dist/types/v2/control-messages.d.ts +55 -0
- package/dist/types/v2/controls.d.ts +551 -0
- package/dist/types/v2/danger-zone.d.ts +23 -0
- package/dist/types/v2/date-messages.d.ts +28 -0
- package/dist/types/v2/date-picker.d.ts +47 -0
- package/dist/types/v2/date-week-window.d.ts +22 -0
- package/dist/types/v2/date-weeks.d.ts +11 -0
- package/dist/types/v2/day-bar.d.ts +28 -0
- package/dist/types/v2/describe.d.ts +18 -0
- package/dist/types/v2/draft.d.ts +36 -0
- package/dist/types/v2/emoji-picker.d.ts +10 -0
- package/dist/types/v2/ends.d.ts +8 -0
- package/dist/types/v2/error-screen.d.ts +59 -0
- package/dist/types/v2/failed.d.ts +15 -0
- package/dist/types/v2/figures.d.ts +66 -0
- package/dist/types/v2/filter-bar.d.ts +111 -0
- package/dist/types/v2/filter-messages.d.ts +121 -0
- package/dist/types/v2/head-search.d.ts +13 -0
- package/dist/types/v2/heat-days.d.ts +44 -0
- package/dist/types/v2/heat.d.ts +40 -0
- package/dist/types/v2/icon.d.ts +16 -0
- package/dist/types/v2/index.d.ts +58 -0
- package/dist/types/v2/layout.d.ts +473 -0
- package/dist/types/v2/link.d.ts +7 -0
- package/dist/types/v2/list-group.d.ts +17 -0
- package/dist/types/v2/list-query.d.ts +432 -0
- package/dist/types/v2/lookup.d.ts +45 -0
- package/dist/types/v2/marks.d.ts +321 -0
- package/dist/types/v2/menu-panel.d.ts +7 -0
- package/dist/types/v2/menu.d.ts +192 -0
- package/dist/types/v2/nav-drop.d.ts +16 -0
- package/dist/types/v2/nav-face.d.ts +12 -0
- package/dist/types/v2/nav-tree.d.ts +66 -0
- package/dist/types/v2/now-line.d.ts +19 -0
- package/dist/types/v2/overlay-messages.d.ts +18 -0
- package/dist/types/v2/overlays.d.ts +105 -0
- package/dist/types/v2/page-layer.d.ts +12 -0
- package/dist/types/v2/pane-name.d.ts +14 -0
- package/dist/types/v2/pane-print.d.ts +8 -0
- package/dist/types/v2/pane-sheet.d.ts +9 -0
- package/dist/types/v2/popover.d.ts +21 -0
- package/dist/types/v2/reaction-messages.d.ts +9 -0
- package/dist/types/v2/reactions.d.ts +41 -0
- package/dist/types/v2/row-drag.d.ts +6 -0
- package/dist/types/v2/section-level.d.ts +6 -0
- package/dist/types/v2/segmented.d.ts +36 -0
- package/dist/types/v2/select-live.d.ts +7 -0
- package/dist/types/v2/setting-messages.d.ts +10 -0
- package/dist/types/v2/split-button.d.ts +24 -0
- package/dist/types/v2/states.d.ts +58 -0
- package/dist/types/v2/status-toolbar.d.ts +13 -0
- package/dist/types/v2/structure.d.ts +101 -0
- package/dist/types/v2/testing/index.d.ts +19 -0
- package/dist/types/v2/testing/measure-v2-layout.d.ts +120 -0
- package/dist/types/v2/testing/settled.d.ts +15 -0
- package/dist/types/v2/testing/visible.d.ts +9 -0
- package/dist/types/v2/toast-host.d.ts +8 -0
- package/dist/types/v2/toast.d.ts +47 -0
- package/dist/types/v2/tokens.d.ts +89 -0
- package/dist/types/v2/tree-messages.d.ts +15 -0
- package/dist/types/v2/types.d.ts +79 -0
- package/dist/types/v2/unsaved-bar.d.ts +47 -0
- package/dist/types/v2/unsaved-messages.d.ts +31 -0
- package/dist/types/v2/width-cookie.d.ts +19 -0
- package/dist/types/v2/workspace-messages.d.ts +15 -0
- package/dist/v2.css +13237 -0
- package/package.json +36 -8
- package/skills/k2b-ui/HANDOFF.md +77 -0
- package/skills/k2b-ui/SKILL.md +259 -0
- package/skills/k2b-ui/gold/code-policy-1440.png +0 -0
- package/skills/k2b-ui/gold/code-policy-390.png +0 -0
- package/skills/k2b-ui/gold/mail-mailbox-1440.png +0 -0
- package/skills/k2b-ui/gold/mail-mailbox-390.png +0 -0
- package/skills/k2b-ui/gold/notebooks-note-1440.png +0 -0
- package/skills/k2b-ui/gold/notebooks-note-390.png +0 -0
- package/skills/k2b-ui/gold/rhythm-after.png +0 -0
- package/skills/k2b-ui/gold/rhythm-before.png +0 -0
- package/skills/k2b-ui/gold/steps.png +0 -0
- package/skills/k2b-ui/images/actions-1440.png +0 -0
- package/skills/k2b-ui/images/actions-390.png +0 -0
- package/skills/k2b-ui/images/content-1440.png +0 -0
- package/skills/k2b-ui/images/content-390.png +0 -0
- package/skills/k2b-ui/images/conversations-1440.png +0 -0
- package/skills/k2b-ui/images/conversations-390.png +0 -0
- package/skills/k2b-ui/images/detail-sheet-1440.png +0 -0
- package/skills/k2b-ui/images/detail-sheet-390.png +0 -0
- package/skills/k2b-ui/images/dialogs-1440.png +0 -0
- package/skills/k2b-ui/images/dialogs-390.png +0 -0
- package/skills/k2b-ui/images/files-1440.png +0 -0
- package/skills/k2b-ui/images/files-390.png +0 -0
- package/skills/k2b-ui/images/filtered-table-1440.png +0 -0
- package/skills/k2b-ui/images/filtered-table-390.png +0 -0
- package/skills/k2b-ui/images/form-1440.png +0 -0
- package/skills/k2b-ui/images/form-390.png +0 -0
- package/skills/k2b-ui/images/form-detail-1440.png +0 -0
- package/skills/k2b-ui/images/form-detail-390.png +0 -0
- package/skills/k2b-ui/images/frame-1440.png +0 -0
- package/skills/k2b-ui/images/frame-390.png +0 -0
- package/skills/k2b-ui/images/home-1440.png +0 -0
- package/skills/k2b-ui/images/home-390.png +0 -0
- package/skills/k2b-ui/images/list-detail-1440.png +0 -0
- package/skills/k2b-ui/images/list-detail-390.png +0 -0
- package/skills/k2b-ui/images/mail-1440.png +0 -0
- package/skills/k2b-ui/images/mail-390.png +0 -0
- package/skills/k2b-ui/images/overview-1440.png +0 -0
- package/skills/k2b-ui/images/overview-390.png +0 -0
- package/skills/k2b-ui/images/public-page-1440.png +0 -0
- package/skills/k2b-ui/images/public-page-390.png +0 -0
- package/skills/k2b-ui/images/record-1440.png +0 -0
- package/skills/k2b-ui/images/record-390.png +0 -0
- package/skills/k2b-ui/images/record-groups-1440.png +0 -0
- package/skills/k2b-ui/images/record-groups-390.png +0 -0
- package/skills/k2b-ui/images/settings-1440.png +0 -0
- package/skills/k2b-ui/images/settings-390.png +0 -0
- package/skills/k2b-ui/images/settings-page-1440.png +0 -0
- package/skills/k2b-ui/images/settings-page-390.png +0 -0
- package/skills/k2b-ui/images/start-1440.png +0 -0
- package/skills/k2b-ui/images/start-390.png +0 -0
- package/skills/k2b-ui/images/states-1440.png +0 -0
- package/skills/k2b-ui/images/states-390.png +0 -0
- package/skills/k2b-ui/images/table-1440.png +0 -0
- package/skills/k2b-ui/images/table-390.png +0 -0
- package/skills/k2b-ui/images/tree-1440.png +0 -0
- package/skills/k2b-ui/images/tree-390.png +0 -0
- package/skills/k2b-ui/mockup/shoot.mjs +470 -0
- package/skills/k2b-ui/mockup/starter.html +607 -0
- package/skills/k2b-ui/port/check.mjs +48 -0
- package/skills/k2b-ui/recipes/actions.tsx +226 -0
- package/skills/k2b-ui/recipes/content.tsx +96 -0
- package/skills/k2b-ui/recipes/conversations.tsx +231 -0
- package/skills/k2b-ui/recipes/detail-sheet.tsx +87 -0
- package/skills/k2b-ui/recipes/dialogs.tsx +146 -0
- package/skills/k2b-ui/recipes/files.tsx +468 -0
- package/skills/k2b-ui/recipes/filtered-table.tsx +154 -0
- package/skills/k2b-ui/recipes/form-detail.tsx +143 -0
- package/skills/k2b-ui/recipes/form.tsx +95 -0
- package/skills/k2b-ui/recipes/frame.tsx +206 -0
- package/skills/k2b-ui/recipes/home.tsx +186 -0
- package/skills/k2b-ui/recipes/list-detail.tsx +140 -0
- package/skills/k2b-ui/recipes/mail.tsx +230 -0
- package/skills/k2b-ui/recipes/overview.tsx +303 -0
- package/skills/k2b-ui/recipes/public-page.tsx +315 -0
- package/skills/k2b-ui/recipes/record-groups.tsx +178 -0
- package/skills/k2b-ui/recipes/record.tsx +207 -0
- package/skills/k2b-ui/recipes/settings-page.tsx +269 -0
- package/skills/k2b-ui/recipes/settings.tsx +127 -0
- package/skills/k2b-ui/recipes/start.tsx +165 -0
- package/skills/k2b-ui/recipes/states.tsx +137 -0
- package/skills/k2b-ui/recipes/table.tsx +111 -0
- package/skills/k2b-ui/recipes/tree.tsx +109 -0
- package/skills/k2b-ui/references/gold.md +195 -0
- package/skills/k2b-ui/references/list-queries.md +74 -0
- package/skills/k2b-ui/references/look.md +468 -0
- package/skills/k2b-ui/references/mistakes.md +218 -0
- package/skills/k2b-ui/references/mockups.md +260 -0
- package/skills/k2b-ui/references/primitives.md +1438 -0
- package/skills/k2b-ui/references/recipes.md +515 -0
- package/skills/k2b-ui/references/seeing.md +78 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { createEffect, getOwner, on, onCleanup, runWithOwner } from "solid-js";
|
|
2
|
+
import { useOverlayMessages } from "./overlay-messages";
|
|
3
|
+
import { pageToaster } from "./toast-host";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Which Button started a mutation's current call: the Button and the mutation's `settledAt()` at the press, so a press
|
|
7
|
+
* belongs to the next settle only. Several Buttons may share one mutation, such as the delete of every row: only the
|
|
8
|
+
* pressed one is busy and reports its failure, with its own `action` as retry.
|
|
9
|
+
*/
|
|
10
|
+
const presses = new WeakMap();
|
|
11
|
+
/** The settle each mutation was last reported for, so Buttons that share one report a failure once. */
|
|
12
|
+
const reported = new WeakMap();
|
|
13
|
+
const running = mutation => mutation.status() === "pending" || mutation.status() === "loading";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Watches a bound Button's mutation, loaded after mount so a Button island carries none of this until it runs in the
|
|
17
|
+
* browser. Internal to Button; call it under the Button's owner. It
|
|
18
|
+
*
|
|
19
|
+
* - tells the Button when another Button started the running call (`elsewhere`), so only the pressed one is busy;
|
|
20
|
+
* - reports each failed settle once, in the page's toaster or a detached region. `seen` is the settle the Button saw
|
|
21
|
+
* at mount: anything newer that failed meanwhile is reported as soon as this runs. The pressed Button reports with
|
|
22
|
+
* its own `action` as retry; a call no Button pressed (a form's Enter, a hotkey, a floating copy) is reported by the
|
|
23
|
+
* first watcher, whose retry is its own `action` too, or `mutation.retry()` without one.
|
|
24
|
+
*
|
|
25
|
+
* Returns the press, which the Button calls on a click it accepts.
|
|
26
|
+
*/
|
|
27
|
+
export const watchButtonFailures = (props, seen, active, elsewhere, early) => {
|
|
28
|
+
const me = Symbol();
|
|
29
|
+
const owner = getOwner();
|
|
30
|
+
const words = useOverlayMessages();
|
|
31
|
+
const detached = {};
|
|
32
|
+
let last = seen;
|
|
33
|
+
const press = always => {
|
|
34
|
+
const mutation = props.mutation;
|
|
35
|
+
// a press while another button's call runs is dropped by the mutation and takes nothing over
|
|
36
|
+
if (mutation && (always || !running(mutation))) presses.set(mutation, [me, mutation.settledAt()]);
|
|
37
|
+
};
|
|
38
|
+
// a press the Button took before this loaded counts as this Button's, unless another Button claimed the same call
|
|
39
|
+
if (early && props.mutation && presses.get(props.mutation)?.[1] !== early[0]) presses.set(props.mutation, [me, early[0]]);
|
|
40
|
+
onCleanup(() => {
|
|
41
|
+
const mutation = props.mutation;
|
|
42
|
+
// a Button that leaves gives its call to the others, which then report it
|
|
43
|
+
if (mutation && presses.get(mutation)?.[0] === me) presses.delete(mutation);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// the press is recorded before the call starts, so the status change that follows finds it
|
|
47
|
+
createEffect(() => {
|
|
48
|
+
const mutation = props.mutation;
|
|
49
|
+
const pressedBy = mutation && running(mutation) ? presses.get(mutation) : undefined;
|
|
50
|
+
elsewhere(pressedBy !== undefined && pressedBy[0] !== me && pressedBy[1] === mutation?.settledAt());
|
|
51
|
+
});
|
|
52
|
+
createEffect(on(() => props.mutation?.settledAt() ?? null, settledAt => {
|
|
53
|
+
const before = last;
|
|
54
|
+
if (settledAt === null || settledAt === before) return;
|
|
55
|
+
last = settledAt;
|
|
56
|
+
const mutation = props.mutation;
|
|
57
|
+
if (!mutation || mutation.status() !== "error" || props.failed === false || reported.get(mutation) === settledAt) return;
|
|
58
|
+
const pressedBy = presses.get(mutation);
|
|
59
|
+
const pressed = pressedBy !== undefined && pressedBy[1] === before;
|
|
60
|
+
// another Button started this call: that one reports it
|
|
61
|
+
if (pressed && pressedBy[0] !== me) return;
|
|
62
|
+
reported.set(mutation, settledAt);
|
|
63
|
+
const failed = props.failed;
|
|
64
|
+
const message = typeof failed === "function" ? failed(mutation.error() ?? new Error(words().failed)) : failed ?? words().failed;
|
|
65
|
+
const action = props.action;
|
|
66
|
+
// The retry is this button's press: its own action, which also does what the app does after a success (a bound
|
|
67
|
+
// button's action is the deed of its mutation, also when a hotkey or a floating copy started the call), or
|
|
68
|
+
// mutation.retry() for a button without one (a form's submit).
|
|
69
|
+
const retry = () => {
|
|
70
|
+
press(true);
|
|
71
|
+
return action ? action() : mutation.retry();
|
|
72
|
+
};
|
|
73
|
+
const options = {
|
|
74
|
+
status: "bad",
|
|
75
|
+
retry
|
|
76
|
+
};
|
|
77
|
+
const page = pageToaster();
|
|
78
|
+
if (page) {
|
|
79
|
+
page(message, options);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
void import("./toast").then(({
|
|
83
|
+
showDetachedToast
|
|
84
|
+
}) => {
|
|
85
|
+
if (active()) runWithOwner(owner, () => showDetachedToast(message, options, detached));
|
|
86
|
+
});
|
|
87
|
+
}));
|
|
88
|
+
return () => press();
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=button-failure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["v2/button-failure.ts"],"sourcesContent":["import { createEffect, getOwner, on, onCleanup, runWithOwner } from \"solid-js\";\nimport type { ButtonMutation } from \"./button\";\nimport { useOverlayMessages } from \"./overlay-messages\";\nimport type { ShowToast } from \"./toast\";\nimport { pageToaster } from \"./toast-host\";\n\n/**\n * Which Button started a mutation's current call: the Button and the mutation's `settledAt()` at the press, so a press\n * belongs to the next settle only. Several Buttons may share one mutation, such as the delete of every row: only the\n * pressed one is busy and reports its failure, with its own `action` as retry.\n */\nconst presses = new WeakMap<object, readonly [button: symbol, since: number | null]>();\n/** The settle each mutation was last reported for, so Buttons that share one report a failure once. */\nconst reported = new WeakMap<object, number>();\n\nconst running = (mutation: ButtonMutation) => mutation.status() === \"pending\" || mutation.status() === \"loading\";\n\n/**\n * Watches a bound Button's mutation, loaded after mount so a Button island carries none of this until it runs in the\n * browser. Internal to Button; call it under the Button's owner. It\n *\n * - tells the Button when another Button started the running call (`elsewhere`), so only the pressed one is busy;\n * - reports each failed settle once, in the page's toaster or a detached region. `seen` is the settle the Button saw\n * at mount: anything newer that failed meanwhile is reported as soon as this runs. The pressed Button reports with\n * its own `action` as retry; a call no Button pressed (a form's Enter, a hotkey, a floating copy) is reported by the\n * first watcher, whose retry is its own `action` too, or `mutation.retry()` without one.\n *\n * Returns the press, which the Button calls on a click it accepts.\n */\nexport const watchButtonFailures = (\n props: { mutation?: ButtonMutation; action?: () => unknown; failed?: string | false | ((error: Error) => string) },\n seen: number | null,\n active: () => boolean,\n elsewhere: (other: boolean) => void,\n early?: readonly [since: number | null],\n) => {\n const me = Symbol();\n const owner = getOwner();\n const words = useOverlayMessages();\n const detached: { show?: ShowToast } = {};\n let last = seen;\n\n const press = (always?: boolean) => {\n const mutation = props.mutation;\n // a press while another button's call runs is dropped by the mutation and takes nothing over\n if (mutation && (always || !running(mutation))) presses.set(mutation, [me, mutation.settledAt()]);\n };\n // a press the Button took before this loaded counts as this Button's, unless another Button claimed the same call\n if (early && props.mutation && presses.get(props.mutation)?.[1] !== early[0]) presses.set(props.mutation, [me, early[0]]);\n onCleanup(() => {\n const mutation = props.mutation;\n // a Button that leaves gives its call to the others, which then report it\n if (mutation && presses.get(mutation)?.[0] === me) presses.delete(mutation);\n });\n\n // the press is recorded before the call starts, so the status change that follows finds it\n createEffect(() => {\n const mutation = props.mutation;\n const pressedBy = mutation && running(mutation) ? presses.get(mutation) : undefined;\n elsewhere(pressedBy !== undefined && pressedBy[0] !== me && pressedBy[1] === mutation?.settledAt());\n });\n\n createEffect(\n on(\n () => props.mutation?.settledAt() ?? null,\n (settledAt) => {\n const before = last;\n if (settledAt === null || settledAt === before) return;\n last = settledAt;\n const mutation = props.mutation;\n if (!mutation || mutation.status() !== \"error\" || props.failed === false || reported.get(mutation) === settledAt) return;\n const pressedBy = presses.get(mutation);\n const pressed = pressedBy !== undefined && pressedBy[1] === before;\n // another Button started this call: that one reports it\n if (pressed && pressedBy[0] !== me) return;\n reported.set(mutation, settledAt);\n const failed = props.failed;\n const message = typeof failed === \"function\" ? failed(mutation.error() ?? new Error(words().failed)) : (failed ?? words().failed);\n const action = props.action;\n // The retry is this button's press: its own action, which also does what the app does after a success (a bound\n // button's action is the deed of its mutation, also when a hotkey or a floating copy started the call), or\n // mutation.retry() for a button without one (a form's submit).\n const retry = () => {\n press(true);\n return action ? action() : mutation.retry();\n };\n const options = { status: \"bad\" as const, retry };\n const page = pageToaster();\n if (page) {\n page(message, options);\n return;\n }\n void import(\"./toast\").then(({ showDetachedToast }) => {\n if (active()) runWithOwner(owner, () => showDetachedToast(message, options, detached));\n });\n },\n ),\n );\n\n return () => press();\n};\n"],"mappings":"AAAA,SAAS,YAAY,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,YAAY,QAAQ,UAAU;AAE9E,SAAS,kBAAkB,QAAQ,oBAAoB;AAEvD,SAAS,WAAW,QAAQ,cAAc;;AAE1C;AACA;AACA;AACA;AACA;AACA,MAAM,OAAO,GAAG,IAAI,OAAO,CAA0D,CAAC;AACtF;AACA,MAAM,QAAQ,GAAG,IAAI,OAAO,CAAiB,CAAC;AAE9C,MAAM,OAAO,GAAI,QAAwB,IAAK,QAAQ,CAAC,MAAM,CAAC,CAAC,KAAK,SAAS,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,KAAK,SAAS;;AAEhH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAM,mBAAmB,GAAG,CACjC,KAAkH,EAClH,IAAmB,EACnB,MAAqB,EACrB,SAAmC,EACnC,KAAuC,KACpC;EACH,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC;EACnB,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC;EACxB,MAAM,KAAK,GAAG,kBAAkB,CAAC,CAAC;EAClC,MAAM,QAA8B,GAAG,CAAC,CAAC;EACzC,IAAI,IAAI,GAAG,IAAI;EAEf,MAAM,KAAK,GAAI,MAAgB,IAAK;IAClC,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ;IAC/B;IACA,IAAI,QAAQ,KAAK,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;EACnG,CAAC;EACD;EACA,IAAI,KAAK,IAAI,KAAK,CAAC,QAAQ,IAAI,OAAO,CAAC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+1,304 @@
|
|
|
1
|
+
import { ssr as _$ssr } from "solid-js/web";
|
|
2
|
+
import { escape as _$escape } from "solid-js/web";
|
|
3
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
4
|
+
import { memo as _$memo } from "solid-js/web";
|
|
5
|
+
var _tmpl$ = ["<span class=\"k2-btn-label\">", "</span>"],
|
|
6
|
+
_tmpl$2 = ["<span class=\"k2-btn-busy\" aria-hidden=\"true\">", "</span>"];
|
|
7
|
+
import { createSignal, createUniqueId, getOwner, onCleanup, onMount, children as resolveChildren, runWithOwner, Show } from "solid-js";
|
|
8
|
+
import { Dynamic } from "solid-js/web";
|
|
9
|
+
import { useUiMessages } from "../intl/messages";
|
|
10
|
+
import { linkOr } from "./link";
|
|
11
|
+
import { Icon } from "./marks";
|
|
12
|
+
import { ActionMenu } from "./menu";
|
|
13
|
+
/** The one button: round, one height per place, a link through `href`. An icon button must have a label. */
|
|
14
|
+
export const Button = props => {
|
|
15
|
+
// the label is made once and read from here (reading `children` again would make its JSX again)
|
|
16
|
+
const label = resolveChildren(() => props.children);
|
|
17
|
+
// made once and read from here: reading `avatar` again would make its JSX again
|
|
18
|
+
const avatar = resolveChildren(() => props.avatar);
|
|
19
|
+
const iconOnly = () => label() === undefined;
|
|
20
|
+
// A busy button takes no second press, as a disabled one, but keeps its look under the turning sign and keeps the
|
|
21
|
+
// focus a press gave it (a native `disabled` would drop it): it says "disabled" and refuses the click, which also
|
|
22
|
+
// stops a form being sent twice.
|
|
23
|
+
// A bound button is busy while its mutation runs, unless another button bound to it started the call (its watcher
|
|
24
|
+
// says so once loaded; until then every bound button is busy).
|
|
25
|
+
const [elsewhere, setElsewhere] = createSignal(false);
|
|
26
|
+
const busy = () => props.busy || ["pending", "loading"].includes(props.mutation?.status() ?? "") && !elsewhere();
|
|
27
|
+
// while another bound button's call runs, this one takes no press (the mutation would drop it) and shows so
|
|
28
|
+
const off = () => props.disabled || busy() || elsewhere();
|
|
29
|
+
// A bound button reports the failures of its mutation; the watcher loads after mount, so an island pays for it only
|
|
30
|
+
// in the browser. It starts from the settle seen at mount and reports a failure that came while it loaded.
|
|
31
|
+
let press;
|
|
32
|
+
// a press before the watcher has loaded (a quick first click): the settle it came after, handed over when it loads
|
|
33
|
+
let early;
|
|
34
|
+
if (props.mutation) {
|
|
35
|
+
const owner = getOwner();
|
|
36
|
+
let active = true;
|
|
37
|
+
onCleanup(() => {
|
|
38
|
+
active = false;
|
|
39
|
+
});
|
|
40
|
+
onMount(() => {
|
|
41
|
+
const seen = props.mutation?.settledAt() ?? null;
|
|
42
|
+
void import("./button-failure").then(({
|
|
43
|
+
watchButtonFailures
|
|
44
|
+
}) => {
|
|
45
|
+
if (active) press = runWithOwner(owner, () => watchButtonFailures(props, seen, () => active, setElsewhere, early));
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
// with `about`, the name is the button's own (its words, or its label for a symbol) and then what it is about
|
|
50
|
+
// (made only then, so the ids of every other button and of the page around it stay as they were)
|
|
51
|
+
const self = props.about ? createUniqueId() : "";
|
|
52
|
+
return (// a disabled link is an anchor without an address: it leads nowhere and takes no `onNavigate`
|
|
53
|
+
_$createComponent(Dynamic, {
|
|
54
|
+
get component() {
|
|
55
|
+
return _$memo(() => !!(off() && props.href !== undefined))() ? "a" : linkOr(props.href, "button");
|
|
56
|
+
},
|
|
57
|
+
get href() {
|
|
58
|
+
return _$memo(() => !!off())() ? undefined : props.href;
|
|
59
|
+
},
|
|
60
|
+
get onNavigate() {
|
|
61
|
+
return _$memo(() => !!(off() || props.href === undefined || props.download))() ? undefined : props.onNavigate;
|
|
62
|
+
},
|
|
63
|
+
get download() {
|
|
64
|
+
return _$memo(() => !!(off() || props.href === undefined || !props.download))() ? undefined : _$memo(() => props.download === true)() ? "" : props.download;
|
|
65
|
+
},
|
|
66
|
+
get type() {
|
|
67
|
+
return _$memo(() => !!props.href)() ? undefined : props.type ?? "button";
|
|
68
|
+
},
|
|
69
|
+
get form() {
|
|
70
|
+
return _$memo(() => !!props.href)() ? undefined : props.form;
|
|
71
|
+
},
|
|
72
|
+
get name() {
|
|
73
|
+
return _$memo(() => !!props.href)() ? undefined : props.name;
|
|
74
|
+
},
|
|
75
|
+
get value() {
|
|
76
|
+
return _$memo(() => !!props.href)() ? undefined : props.value;
|
|
77
|
+
},
|
|
78
|
+
get disabled() {
|
|
79
|
+
return _$memo(() => !!props.href)() ? undefined : props.disabled;
|
|
80
|
+
},
|
|
81
|
+
get ["aria-disabled"]() {
|
|
82
|
+
return props.href && props.disabled || busy() || elsewhere() ? "true" : undefined;
|
|
83
|
+
},
|
|
84
|
+
get ["aria-busy"]() {
|
|
85
|
+
return busy() ? "true" : undefined;
|
|
86
|
+
},
|
|
87
|
+
get ["aria-pressed"]() {
|
|
88
|
+
return _$memo(() => !!(props.href === undefined && props.pressed !== undefined))() ? props.pressed ? "true" : "false" : undefined;
|
|
89
|
+
},
|
|
90
|
+
get ["aria-label"]() {
|
|
91
|
+
return props.label;
|
|
92
|
+
},
|
|
93
|
+
get id() {
|
|
94
|
+
return props.about ? self : undefined;
|
|
95
|
+
},
|
|
96
|
+
get ["aria-labelledby"]() {
|
|
97
|
+
return _$memo(() => !!props.about)() ? `${self} ${props.about}` : undefined;
|
|
98
|
+
},
|
|
99
|
+
get title() {
|
|
100
|
+
return _$memo(() => !!iconOnly())() ? props.label : props.title;
|
|
101
|
+
},
|
|
102
|
+
get ["aria-haspopup"]() {
|
|
103
|
+
return props.menu ? "menu" : undefined;
|
|
104
|
+
},
|
|
105
|
+
onClick: event => {
|
|
106
|
+
if (off()) event.preventDefault();else {
|
|
107
|
+
if (press) press();else if (props.mutation) early = [props.mutation.settledAt()];
|
|
108
|
+
props.action?.();
|
|
109
|
+
props.onClick?.(event);
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"class": "k2-btn",
|
|
113
|
+
"data-k2-part": "Button",
|
|
114
|
+
get ["data-busy"]() {
|
|
115
|
+
return busy() ? "" : undefined;
|
|
116
|
+
},
|
|
117
|
+
get ["data-variant"]() {
|
|
118
|
+
return _$memo(() => !!(props.variant && props.variant !== "secondary"))() ? props.variant : undefined;
|
|
119
|
+
},
|
|
120
|
+
get ["data-icon-only"]() {
|
|
121
|
+
return iconOnly() ? "" : undefined;
|
|
122
|
+
},
|
|
123
|
+
get ["data-menu"]() {
|
|
124
|
+
return props.menu ? "" : undefined;
|
|
125
|
+
},
|
|
126
|
+
get ["data-keep"]() {
|
|
127
|
+
return props.keep ? "" : undefined;
|
|
128
|
+
},
|
|
129
|
+
get ["data-floats"]() {
|
|
130
|
+
return props.floats ? "" : undefined;
|
|
131
|
+
},
|
|
132
|
+
get ["data-closes"]() {
|
|
133
|
+
return props.closes ? "" : undefined;
|
|
134
|
+
},
|
|
135
|
+
get children() {
|
|
136
|
+
return [_$createComponent(Show, {
|
|
137
|
+
get when() {
|
|
138
|
+
return avatar();
|
|
139
|
+
},
|
|
140
|
+
get fallback() {
|
|
141
|
+
return _$createComponent(Show, {
|
|
142
|
+
get when() {
|
|
143
|
+
return props.icon;
|
|
144
|
+
},
|
|
145
|
+
children: name => _$createComponent(Icon, {
|
|
146
|
+
get name() {
|
|
147
|
+
return name();
|
|
148
|
+
}
|
|
149
|
+
})
|
|
150
|
+
});
|
|
151
|
+
},
|
|
152
|
+
get children() {
|
|
153
|
+
return avatar();
|
|
154
|
+
}
|
|
155
|
+
}), _$createComponent(Show, {
|
|
156
|
+
get when() {
|
|
157
|
+
return !iconOnly();
|
|
158
|
+
},
|
|
159
|
+
get children() {
|
|
160
|
+
return _$ssr(_tmpl$, _$escape(label()));
|
|
161
|
+
}
|
|
162
|
+
}), _$createComponent(Show, {
|
|
163
|
+
get when() {
|
|
164
|
+
return props.menu;
|
|
165
|
+
},
|
|
166
|
+
get children() {
|
|
167
|
+
return _$createComponent(Icon, {
|
|
168
|
+
name: "chevron-down"
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}), _$createComponent(Show, {
|
|
172
|
+
get when() {
|
|
173
|
+
return props.forward;
|
|
174
|
+
},
|
|
175
|
+
get children() {
|
|
176
|
+
return _$createComponent(Icon, {
|
|
177
|
+
name: "chevron-right"
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
}), _$createComponent(Show, {
|
|
181
|
+
get when() {
|
|
182
|
+
return busy();
|
|
183
|
+
},
|
|
184
|
+
get children() {
|
|
185
|
+
return _$ssr(_tmpl$2, _$escape(_$createComponent(Icon, {
|
|
186
|
+
name: "loader-2"
|
|
187
|
+
})));
|
|
188
|
+
}
|
|
189
|
+
})];
|
|
190
|
+
}
|
|
191
|
+
})
|
|
192
|
+
);
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
/** An action as data turned into a button of the given weight; without an icon it always shows its label. */
|
|
196
|
+
export const ActionButton = props => _$createComponent(Show, {
|
|
197
|
+
get when() {
|
|
198
|
+
return !props.action.items;
|
|
199
|
+
},
|
|
200
|
+
get fallback() {
|
|
201
|
+
return _$createComponent(ActionMenu, {
|
|
202
|
+
get variant() {
|
|
203
|
+
return props.variant;
|
|
204
|
+
},
|
|
205
|
+
get icon() {
|
|
206
|
+
return props.action.icon;
|
|
207
|
+
},
|
|
208
|
+
get label() {
|
|
209
|
+
return props.action.label;
|
|
210
|
+
},
|
|
211
|
+
get disabled() {
|
|
212
|
+
return props.action.disabled;
|
|
213
|
+
},
|
|
214
|
+
get items() {
|
|
215
|
+
return props.action.items ?? [];
|
|
216
|
+
},
|
|
217
|
+
get children() {
|
|
218
|
+
return props.iconOnly && props.action.icon ? undefined : props.action.label;
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
},
|
|
222
|
+
get children() {
|
|
223
|
+
return _$createComponent(Show, {
|
|
224
|
+
get when() {
|
|
225
|
+
return _$memo(() => !!props.iconOnly)() && props.action.icon;
|
|
226
|
+
},
|
|
227
|
+
get fallback() {
|
|
228
|
+
return _$createComponent(Button, {
|
|
229
|
+
get variant() {
|
|
230
|
+
return props.variant;
|
|
231
|
+
},
|
|
232
|
+
get icon() {
|
|
233
|
+
return props.action.icon;
|
|
234
|
+
},
|
|
235
|
+
get forward() {
|
|
236
|
+
return props.action.forward;
|
|
237
|
+
},
|
|
238
|
+
get title() {
|
|
239
|
+
return _$memo(() => !!props.titled)() ? props.action.label : undefined;
|
|
240
|
+
},
|
|
241
|
+
get about() {
|
|
242
|
+
return props.about;
|
|
243
|
+
},
|
|
244
|
+
get href() {
|
|
245
|
+
return props.action.href;
|
|
246
|
+
},
|
|
247
|
+
get onNavigate() {
|
|
248
|
+
return props.action.onNavigate;
|
|
249
|
+
},
|
|
250
|
+
onClick: () => props.action.onClick?.(),
|
|
251
|
+
get disabled() {
|
|
252
|
+
return props.action.disabled;
|
|
253
|
+
},
|
|
254
|
+
get children() {
|
|
255
|
+
return props.action.label;
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
},
|
|
259
|
+
children: icon => _$createComponent(Button, {
|
|
260
|
+
get variant() {
|
|
261
|
+
return props.variant;
|
|
262
|
+
},
|
|
263
|
+
get icon() {
|
|
264
|
+
return icon();
|
|
265
|
+
},
|
|
266
|
+
get label() {
|
|
267
|
+
return props.action.label;
|
|
268
|
+
},
|
|
269
|
+
get about() {
|
|
270
|
+
return props.about;
|
|
271
|
+
},
|
|
272
|
+
get href() {
|
|
273
|
+
return props.action.href;
|
|
274
|
+
},
|
|
275
|
+
get onNavigate() {
|
|
276
|
+
return props.action.onNavigate;
|
|
277
|
+
},
|
|
278
|
+
onClick: () => props.action.onClick?.(),
|
|
279
|
+
get disabled() {
|
|
280
|
+
return props.action.disabled;
|
|
281
|
+
}
|
|
282
|
+
})
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
/** The copy button beside a value (internal to Facts); `disabled` while the value is on its way. */
|
|
288
|
+
export const CopyButton = props => {
|
|
289
|
+
const t = useUiMessages();
|
|
290
|
+
return _$createComponent(Button, {
|
|
291
|
+
variant: "ghost",
|
|
292
|
+
icon: "copy",
|
|
293
|
+
get label() {
|
|
294
|
+
return `${t().copy}: ${props.label}`;
|
|
295
|
+
},
|
|
296
|
+
get disabled() {
|
|
297
|
+
return props.disabled;
|
|
298
|
+
},
|
|
299
|
+
onClick: () => {
|
|
300
|
+
void navigator.clipboard?.writeText(props.value);
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
};
|
|
304
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["v2/button.tsx"],"sourcesContent":["import type { MutationResult } from \"@k2b/stdlib/solid\";\nimport {\n createSignal,\n createUniqueId,\n getOwner,\n type JSX,\n onCleanup,\n onMount,\n children as resolveChildren,\n runWithOwner,\n Show,\n} from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport { useUiMessages } from \"../intl/messages\";\nimport { linkOr } from \"./link\";\nimport { Icon } from \"./marks\";\nimport { ActionMenu } from \"./menu\";\nimport type { Action, OnNavigate } from \"./types\";\n\nexport type ButtonMutation = Pick<MutationResult<unknown, never>, \"status\" | \"settledAt\" | \"retry\" | \"error\">;\n\ntype ButtonBase = {\n /**\n * The mutation this button reflects, including calls from a form or hotkey. Several buttons may share one, such as the\n * delete of every row: only the pressed one turns busy and reports. Cancel calls its abort() itself.\n */\n mutation?: ButtonMutation;\n /** The press, usually () => save.mutate(vars). Runs alongside onClick unless disabled or busy. */\n action?: () => unknown;\n /**\n * The final failure sentence, or one made from the error (`(error) => error.message` for the server's words); false\n * leaves reporting to an error at its place.\n */\n failed?: string | false | ((error: Error) => string);\n /**\n * The weight of the action: `primary` filled blue (one per page), `secondary` framed (default), `ghost` without a\n * frame, `text` a quiet text button in a head or at the end of a row. The height comes from the place.\n */\n variant?: \"primary\" | \"secondary\" | \"ghost\" | \"text\";\n /** A Tabler icon name before the label. */\n icon?: string;\n /**\n * A person instead of an icon, such as the one a thread is assigned to: `avatar={<Avatar {...person} decorative />}`\n * (the label names the button). A part of its own, so a page whose buttons show no person loads no face.\n */\n avatar?: JSX.Element;\n /** A link that looks like a button. */\n href?: string;\n /** With `href`: opens the page in place on a plain click (see `OnNavigate`); a disabled link never calls it. */\n onNavigate?: OnNavigate;\n /**\n * With `href`: the browser saves what the address leads to instead of opening it; a text names the file\n * (\"Angebot Küche.pdf\"). Such a link never opens in place, and a disabled one downloads nothing.\n */\n download?: boolean | string;\n /** The deed of a button that has no address; never for what has one (use `href`). */\n onClick?: JSX.EventHandler<HTMLElement, MouseEvent>;\n /** The button opens a menu: a chevron after the label. */\n menu?: boolean;\n /** The button leads further, to a page with more: a chevron to the right after the label. */\n forward?: boolean;\n /** The deed cannot be taken now: dimmed, and pressed no time; say why in the sentence beside it. */\n disabled?: boolean;\n /**\n * The deed of the button is under way, such as a save that waits for the server: a turning sign over the label, the\n * width kept, pressed no second time. Its name stays; assistive technology hears it as unavailable for now, and the\n * app says what came of the deed (a toast, a notice, the next page).\n */\n busy?: boolean;\n /**\n * A toggle and whether it is on, such as a favourite star or \"reply to all\": `true` shows its symbol and words in\n * the colour of pressed and says \"pressed\" to assistive technology; `false` is a toggle that is off. Without it the\n * button is no toggle. Not for a link (`href`) and not for the primary action.\n */\n pressed?: boolean;\n /** `submit` sends the form the button stands in; `button` by default. */\n type?: \"button\" | \"submit\";\n /**\n * With `submit`: the `id` of the form it sends, when the button does not stand inside it, such as a form of the server\n * whose fields are hidden.\n */\n form?: string;\n /** With `submit`: the name and value the form sends for this button, so two buttons send two answers (Deny, Allow). */\n name?: string;\n value?: string;\n /**\n * @deprecated Every control of a head stays on the phone now; only `floats` leaves it. `keep` changes nothing and\n * goes with the next breaking release.\n */\n keep?: boolean;\n /**\n * The page's main action in its head that `Workspace`'s `primary` repeats: on the phone the floating button stands\n * for it, so the head lets it go there (one primary per page). A head left with nothing but its path and search\n * then gives way to the host's bar; any other control keeps the head.\n */\n floats?: boolean;\n /**\n * The close x of a detail's head. On the phone the detail is a page with its way back (`Pane back`) above it, which\n * stands for the x there, so the head lets it go: the detail has one way back.\n */\n closes?: boolean;\n /**\n * A hint under the pointer, for a button whose words give way to its symbol in a narrow place (the bar of a\n * selection). An icon button shows its label as the hint by itself.\n */\n title?: string;\n /**\n * The id of what the deed is about, such as the title of its row: assistive technology hears the button's words and\n * then those (\"Ansehen Angebot Küche\"), so ten rows with the same deed are told apart. The words stay first.\n */\n about?: string;\n};\n\nexport type ButtonProps = ButtonBase &\n (\n | {\n /** The words on the button. */\n children: JSX.Element;\n /**\n * The name assistive technology hears instead of the words, only where they alone do not say enough: it begins\n * with the words (\"Öffnen: Hausordnung\" for \"Öffnen\"), so a person who says them by voice still reaches it.\n * No hint under the pointer (that is `title`).\n */\n label?: string;\n }\n | {\n children?: undefined;\n /** An icon button needs a name (rule 5: wrong fails at once). */\n label: string;\n }\n );\n\n/** The one button: round, one height per place, a link through `href`. An icon button must have a label. */\nexport const Button = (props: ButtonProps) => {\n // the label is made once and read from here (reading `children` again would make its JSX again)\n const label = resolveChildren(() => props.children);\n // made once and read from here: reading `avatar` again would make its JSX again\n const avatar = resolveChildren(() => props.avatar);\n const iconOnly = () => label() === undefined;\n // A busy button takes no second press, as a disabled one, but keeps its look under the turning sign and keeps the\n // focus a press gave it (a native `disabled` would drop it): it says \"disabled\" and refuses the click, which also\n // stops a form being sent twice.\n // A bound button is busy while its mutation runs, unless another button bound to it started the call (its watcher\n // says so once loaded; until then every bound button is busy).\n const [elsewhere, setElsewhere] = createSignal(false);\n const busy = () => props.busy || ([\"pending\", \"loading\"].includes(props.mutation?.status() ?? \"\") && !elsewhere());\n // while another bound button's call runs, this one takes no press (the mutation would drop it) and shows so\n const off = () => props.disabled || busy() || elsewhere();\n // A bound button reports the failures of its mutation; the watcher loads after mount, so an island pays for it only\n // in the browser. It starts from the settle seen at mount and reports a failure that came while it loaded.\n let press: (() => void) | undefined;\n // a press before the watcher has loaded (a quick first click): the settle it came after, handed over when it loads\n let early: [since: number | null] | undefined;\n if (props.mutation) {\n const owner = getOwner();\n let active = true;\n onCleanup(() => {\n active = false;\n });\n onMount(() => {\n const seen = props.mutation?.settledAt() ?? null;\n void import(\"./button-failure\").then(({ watchButtonFailures }) => {\n if (active) press = runWithOwner(owner, () => watchButtonFailures(props, seen, () => active, setElsewhere, early));\n });\n });\n }\n // with `about`, the name is the button's own (its words, or its label for a symbol) and then what it is about\n // (made only then, so the ids of every other button and of the page around it stay as they were)\n const self = props.about ? createUniqueId() : \"\";\n return (\n // a disabled link is an anchor without an address: it leads nowhere and takes no `onNavigate`\n <Dynamic\n component={off() && props.href !== undefined ? \"a\" : linkOr(props.href, \"button\")}\n href={off() ? undefined : props.href}\n onNavigate={off() || props.href === undefined || props.download ? undefined : props.onNavigate}\n download={off() || props.href === undefined || !props.download ? undefined : props.download === true ? \"\" : props.download}\n type={props.href ? undefined : (props.type ?? \"button\")}\n form={props.href ? undefined : props.form}\n name={props.href ? undefined : props.name}\n value={props.href ? undefined : props.value}\n disabled={props.href ? undefined : props.disabled}\n aria-disabled={(props.href && props.disabled) || busy() || elsewhere() ? \"true\" : undefined}\n aria-busy={busy() ? \"true\" : undefined}\n aria-pressed={props.href === undefined && props.pressed !== undefined ? (props.pressed ? \"true\" : \"false\") : undefined}\n aria-label={props.label}\n id={props.about ? self : undefined}\n aria-labelledby={props.about ? `${self} ${props.about}` : undefined}\n title={iconOnly() ? props.label : props.title}\n aria-haspopup={props.menu ? \"menu\" : undefined}\n onClick={(event: MouseEvent & { currentTarget: HTMLElement; target: Element }) => {\n if (off()) event.preventDefault();\n else {\n if (press) press();\n else if (props.mutation) early = [props.mutation.settledAt()];\n props.action?.();\n props.onClick?.(event);\n }\n }}\n class=\"k2-btn\"\n data-k2-part=\"Button\"\n data-busy={busy() ? \"\" : undefined}\n data-variant={props.variant && props.variant !== \"secondary\" ? props.variant : undefined}\n data-icon-only={iconOnly() ? \"\" : undefined}\n data-menu={props.menu ? \"\" : undefined}\n data-keep={props.keep ? \"\" : undefined}\n data-floats={props.floats ? \"\" : undefined}\n data-closes={props.closes ? \"\" : undefined}\n >\n <>\n <Show when={avatar()} fallback={<Show when={props.icon}>{(name) => <Icon name={name()} />}</Show>}>\n {avatar()}\n </Show>\n <Show when={!iconOnly()}>\n <span class=\"k2-btn-label\">{label()}</span>\n </Show>\n <Show when={props.menu}>\n <Icon name=\"chevron-down\" />\n </Show>\n <Show when={props.forward}>\n <Icon name=\"chevron-right\" />\n </Show>\n {/* the sign turns over the label, which keeps its place (and the button its width) unseen */}\n <Show when={busy()}>\n <span class=\"k2-btn-busy\" aria-hidden=\"true\">\n <Icon name=\"loader-2\" />\n </span>\n </Show>\n </>\n </Dynamic>\n );\n};\n\n/** An action as data turned into a button of the given weight; without an icon it always shows its label. */\nexport const ActionButton = (props: {\n action: Action;\n variant?: ButtonProps[\"variant\"];\n iconOnly?: boolean;\n titled?: boolean;\n about?: string;\n}) => (\n <Show\n when={!props.action.items}\n // further choices: the action opens them as its menu, with its words or, in a tight place, its symbol alone\n fallback={\n <ActionMenu\n variant={props.variant}\n icon={props.action.icon}\n label={props.action.label}\n disabled={props.action.disabled}\n items={props.action.items ?? []}\n >\n {props.iconOnly && props.action.icon ? undefined : props.action.label}\n </ActionMenu>\n }\n >\n <Show\n when={props.iconOnly && props.action.icon}\n fallback={\n <Button\n variant={props.variant}\n icon={props.action.icon}\n forward={props.action.forward}\n title={props.titled ? props.action.label : undefined}\n about={props.about}\n href={props.action.href}\n onNavigate={props.action.onNavigate}\n onClick={() => props.action.onClick?.()}\n disabled={props.action.disabled}\n >\n {props.action.label}\n </Button>\n }\n >\n {(icon) => (\n <Button\n variant={props.variant}\n icon={icon()}\n label={props.action.label}\n about={props.about}\n href={props.action.href}\n onNavigate={props.action.onNavigate}\n onClick={() => props.action.onClick?.()}\n disabled={props.action.disabled}\n />\n )}\n </Show>\n </Show>\n);\n\n/** The copy button beside a value (internal to Facts); `disabled` while the value is on its way. */\nexport const CopyButton = (props: { label: string; value: string; disabled?: boolean }) => {\n const t = useUiMessages();\n return (\n <Button\n variant=\"ghost\"\n icon=\"copy\"\n label={`${t().copy}: ${props.label}`}\n disabled={props.disabled}\n onClick={() => {\n void navigator.clipboard?.writeText(props.value);\n }}\n />\n );\n};\n"],"mappings":";;;;;;AACA,SACE,YAAY,EACZ,cAAc,EACd,QAAQ,EAER,SAAS,EACT,OAAO,EACP,QAAQ,IAAI,eAAe,EAC3B,YAAY,EACZ,IAAI,QACC,UAAU;AACjB,SAAS,OAAO,QAAQ,cAAc;AACtC,SAAS,aAAa,QAAQ,kBAAkB;AAChD,SAAS,MAAM,QAAQ,QAAQ;AAC/B,SAAS,IAAI,QAAQ,SAAS;AAC9B,SAAS,UAAU,QAAQ,QAAQ;AAoHnC;AACA,OAAO,MAAM,MAAM,GAAI,KAAkB,IAAK;EAC5C;EACA,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,KAAK,CAAC,QAAQ,CAAC;EACnD;EACA,MAAM,MAAM,GAAG,eAAe,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC;EAClD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,CAAC,KAAK,SAAS;EAC5C;EACA;EACA;EACA;EACA;EACA,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC;EACrD,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,IAAI,IAAK,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAE;EAClH;EACA,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC;EACzD;EACA;EACA,IAAI,KAA+B;EACnC;EACA,IAAI,KAAyC;EAC7C,IAAI,KAAK,CAAC,QAAQ,EAAE;IAClB,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC;IACxB,IAAI,MAAM,GAAG,IAAI;IACjB,SA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;;AAED;AACA,OAAO,MAAM,UAAU,GAAI,KAA2D,IAAK;EACzF,MAAM,CAAC,GAAG,aAAa,CAAC,CAAC;EACzB,yBACG,MAAM;IACL,OAAO;IACP,IAAI;IAAA,IACJ,KAAK;MAAA,OAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,KAAK,CAAC,KAAK,EAAE;IAAA;IAAA,IACpC,QAAQ;MAAA,OAAE,KAAK,CAAC,QAAQ;IAAA;IACxB,OAAO,EAAE,MAAM;MACb,KAAK,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC;IAClD;EAAC;AAGP,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data colours (a base, a tag, a person, a kind of thing) come from data, so a primitive validates one before it puts
|
|
3
|
+
* it into a style, on the server and in the browser alike: a hex colour, an `oklch()` of plain numbers, a custom
|
|
4
|
+
* property of the page (`var(--name)`), or `light-dark(a, b)` of two such colours, so a colour can keep its contrast in
|
|
5
|
+
* both themes. Anything else is dropped and the primitive stays neutral.
|
|
6
|
+
*
|
|
7
|
+
* For a hex colour the primitive also gets foregrounds that stay readable whatever the colour is: a symbol or a bar
|
|
8
|
+
* keeps 3:1 against its tint (light and dark), and a surface under white type keeps 4.5:1.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const HEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
|
|
12
|
+
const NUMBER = String.raw`(?:\d+(?:\.\d+)?|\.\d+)`;
|
|
13
|
+
const OKLCH = new RegExp(String.raw`^oklch\(\s*${NUMBER}%?\s+${NUMBER}%?\s+${NUMBER}(?:deg)?\s*(?:\/\s*${NUMBER}%?\s*)?\)$`, "i");
|
|
14
|
+
const TOKEN = /^var\(--[a-z0-9][a-z0-9-]*\)$/i;
|
|
15
|
+
/** `light-dark(` … `)` around exactly one top-level comma; both sides are checked as colours of their own. */
|
|
16
|
+
const LIGHT_DARK = /^light-dark\((.*)\)$/i;
|
|
17
|
+
const plainColor = value => HEX.test(value) || OKLCH.test(value) || TOKEN.test(value);
|
|
18
|
+
|
|
19
|
+
/** The two sides of a `light-dark()`, split at its one comma outside parentheses; nothing when there is not exactly one. */
|
|
20
|
+
const sides = inner => {
|
|
21
|
+
let depth = 0;
|
|
22
|
+
let at = -1;
|
|
23
|
+
for (let index = 0; index < inner.length; index++) {
|
|
24
|
+
const sign = inner[index];
|
|
25
|
+
if (sign === "(") depth++;else if (sign === ")") depth--;else if (sign === "," && depth === 0) {
|
|
26
|
+
if (at !== -1) return undefined;
|
|
27
|
+
at = index;
|
|
28
|
+
}
|
|
29
|
+
if (depth < 0) return undefined;
|
|
30
|
+
}
|
|
31
|
+
return depth === 0 && at !== -1 ? [inner.slice(0, at).trim(), inner.slice(at + 1).trim()] : undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** The colour when it has one of the accepted forms, else nothing. */
|
|
35
|
+
export const safeColor = value => {
|
|
36
|
+
if (value === undefined) return undefined;
|
|
37
|
+
const trimmed = value.trim();
|
|
38
|
+
if (plainColor(trimmed)) return trimmed;
|
|
39
|
+
// a colour for each theme: both sides must be plain colours themselves (no nesting, nothing else)
|
|
40
|
+
const both = LIGHT_DARK.exec(trimmed)?.[1];
|
|
41
|
+
const pair = both === undefined ? undefined : sides(both);
|
|
42
|
+
return pair && plainColor(pair[0]) && plainColor(pair[1]) ? `light-dark(${pair[0]}, ${pair[1]})` : undefined;
|
|
43
|
+
};
|
|
44
|
+
export const rgbOf = hex => {
|
|
45
|
+
if (!HEX.test(hex)) return undefined;
|
|
46
|
+
const digits = hex.slice(1);
|
|
47
|
+
const full = digits.length <= 4 ? [...digits].map(digit => digit + digit).join("") : digits;
|
|
48
|
+
return [0, 2, 4].map(at => Number.parseInt(full.slice(at, at + 2), 16));
|
|
49
|
+
};
|
|
50
|
+
export const hexOf = rgb => `#${rgb.map(channel => Math.round(channel).toString(16).padStart(2, "0")).join("")}`;
|
|
51
|
+
|
|
52
|
+
/** `color-mix(in srgb, a share, b)`: the mix the stylesheet draws a tint with. */
|
|
53
|
+
export const mix = (a, share, b) => [0, 1, 2].map(index => a[index] * share + b[index] * (1 - share));
|
|
54
|
+
const luminance = rgb => {
|
|
55
|
+
const [r, g, b] = rgb.map(channel => {
|
|
56
|
+
const value = channel / 255;
|
|
57
|
+
return value <= 0.03928 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4;
|
|
58
|
+
});
|
|
59
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/** The contrast ratio of two colours, 1 to 21. */
|
|
63
|
+
export const contrast = (a, b) => {
|
|
64
|
+
const [light, dark] = [luminance(a), luminance(b)].sort((x, y) => y - x);
|
|
65
|
+
return (light + 0.05) / (dark + 0.05);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/** The colour moved towards `target` in small steps until it has `ratio` against `against`. */
|
|
69
|
+
const towards = (color, target, against, ratio) => {
|
|
70
|
+
for (let step = 0; step <= 20; step++) {
|
|
71
|
+
const moved = mix(target, step / 20, color);
|
|
72
|
+
if (contrast(moved, against) >= ratio) return moved;
|
|
73
|
+
}
|
|
74
|
+
return target;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The lightest step of the colour that still has `ratio` against `surface` (towards the surface while it holds, else
|
|
79
|
+
* away from it): the quieter bars of a history, which must stay readable beside the strong one.
|
|
80
|
+
*/
|
|
81
|
+
const softest = (color, surface, away, ratio) => {
|
|
82
|
+
if (contrast(color, surface) < ratio) return towards(color, away, surface, ratio);
|
|
83
|
+
let soft = color;
|
|
84
|
+
for (let step = 1; step <= 20; step++) {
|
|
85
|
+
const moved = mix(surface, step / 20, color);
|
|
86
|
+
if (contrast(moved, surface) < ratio) break;
|
|
87
|
+
soft = moved;
|
|
88
|
+
}
|
|
89
|
+
return soft;
|
|
90
|
+
};
|
|
91
|
+
export const WHITE = [255, 255, 255];
|
|
92
|
+
export const BLACK = [0, 0, 0];
|
|
93
|
+
/** The surfaces of v2 (`--k2-surface`), light and dark, which a tint is mixed with. */
|
|
94
|
+
export const SURFACE_LIGHT = [255, 255, 255];
|
|
95
|
+
export const SURFACE_DARK = [17, 21, 27];
|
|
96
|
+
/** The share of the colour in the tint of a mark (`.k2-mk`). */
|
|
97
|
+
const TINT = 0.13;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The style values of a data colour: the colour itself as `--k2-c`, and for a hex colour its readable foregrounds:
|
|
101
|
+
* `--k2-c-fg` / `--k2-c-fg-dark` (a symbol, 3:1 against its tint), `--k2-c-soft` / `--k2-c-soft-dark` (the quieter
|
|
102
|
+
* bars of a history, as light as 3:1 against the surface allows) and `--k2-c-ink` / `--k2-c-ink-dark` (4.5:1: white type
|
|
103
|
+
* on it, and the strongest bar).
|
|
104
|
+
*/
|
|
105
|
+
export const colorStyle = value => {
|
|
106
|
+
const color = safeColor(value);
|
|
107
|
+
if (color === undefined) return undefined;
|
|
108
|
+
const rgb = rgbOf(color);
|
|
109
|
+
if (!rgb) return {
|
|
110
|
+
"--k2-c": color
|
|
111
|
+
};
|
|
112
|
+
return {
|
|
113
|
+
"--k2-c": color,
|
|
114
|
+
"--k2-c-fg": hexOf(towards(rgb, BLACK, mix(rgb, TINT, SURFACE_LIGHT), 3)),
|
|
115
|
+
"--k2-c-fg-dark": hexOf(towards(rgb, WHITE, mix(rgb, TINT, SURFACE_DARK), 3)),
|
|
116
|
+
"--k2-c-soft": hexOf(softest(rgb, SURFACE_LIGHT, BLACK, 3)),
|
|
117
|
+
"--k2-c-soft-dark": hexOf(softest(rgb, SURFACE_DARK, WHITE, 3)),
|
|
118
|
+
"--k2-c-ink": hexOf(towards(rgb, BLACK, WHITE, 4.5)),
|
|
119
|
+
"--k2-c-ink-dark": hexOf(towards(rgb, WHITE, SURFACE_DARK, 4.5))
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/** The shares of the app's tint (`--k2-app-tint-mix` in v2.css), light and dark; a test pins them to the stylesheet. */
|
|
124
|
+
export const appTint = {
|
|
125
|
+
light: 0.07,
|
|
126
|
+
dark: 0.18
|
|
127
|
+
};
|
|
128
|
+
/** The blue tint of a chosen row (`--k2-blue-tint`), light and dark; a test pins them to the stylesheet. */
|
|
129
|
+
export const selectedTint = {
|
|
130
|
+
light: [239, 246, 255],
|
|
131
|
+
dark: [23, 37, 84]
|
|
132
|
+
};
|
|
133
|
+
/** A value for a custom property that cannot end its declaration or open another one. */
|
|
134
|
+
export const safeValue = value => !/[;{}<>\\]/.test(value);
|
|
135
|
+
//# sourceMappingURL=colors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["v2/colors.ts"],"sourcesContent":["/**\n * Data colours (a base, a tag, a person, a kind of thing) come from data, so a primitive validates one before it puts\n * it into a style, on the server and in the browser alike: a hex colour, an `oklch()` of plain numbers, a custom\n * property of the page (`var(--name)`), or `light-dark(a, b)` of two such colours, so a colour can keep its contrast in\n * both themes. Anything else is dropped and the primitive stays neutral.\n *\n * For a hex colour the primitive also gets foregrounds that stay readable whatever the colour is: a symbol or a bar\n * keeps 3:1 against its tint (light and dark), and a surface under white type keeps 4.5:1.\n */\n\nconst HEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;\nconst NUMBER = String.raw`(?:\\d+(?:\\.\\d+)?|\\.\\d+)`;\nconst OKLCH = new RegExp(String.raw`^oklch\\(\\s*${NUMBER}%?\\s+${NUMBER}%?\\s+${NUMBER}(?:deg)?\\s*(?:\\/\\s*${NUMBER}%?\\s*)?\\)$`, \"i\");\nconst TOKEN = /^var\\(--[a-z0-9][a-z0-9-]*\\)$/i;\n/** `light-dark(` … `)` around exactly one top-level comma; both sides are checked as colours of their own. */\nconst LIGHT_DARK = /^light-dark\\((.*)\\)$/i;\n\nconst plainColor = (value: string) => HEX.test(value) || OKLCH.test(value) || TOKEN.test(value);\n\n/** The two sides of a `light-dark()`, split at its one comma outside parentheses; nothing when there is not exactly one. */\nconst sides = (inner: string): [string, string] | undefined => {\n let depth = 0;\n let at = -1;\n for (let index = 0; index < inner.length; index++) {\n const sign = inner[index];\n if (sign === \"(\") depth++;\n else if (sign === \")\") depth--;\n else if (sign === \",\" && depth === 0) {\n if (at !== -1) return undefined;\n at = index;\n }\n if (depth < 0) return undefined;\n }\n return depth === 0 && at !== -1 ? [inner.slice(0, at).trim(), inner.slice(at + 1).trim()] : undefined;\n};\n\n/** The colour when it has one of the accepted forms, else nothing. */\nexport const safeColor = (value: string | undefined): string | undefined => {\n if (value === undefined) return undefined;\n const trimmed = value.trim();\n if (plainColor(trimmed)) return trimmed;\n // a colour for each theme: both sides must be plain colours themselves (no nesting, nothing else)\n const both = LIGHT_DARK.exec(trimmed)?.[1];\n const pair = both === undefined ? undefined : sides(both);\n return pair && plainColor(pair[0]) && plainColor(pair[1]) ? `light-dark(${pair[0]}, ${pair[1]})` : undefined;\n};\n\nexport type Rgb = readonly [number, number, number];\n\nexport const rgbOf = (hex: string): Rgb | undefined => {\n if (!HEX.test(hex)) return undefined;\n const digits = hex.slice(1);\n const full = digits.length <= 4 ? [...digits].map((digit) => digit + digit).join(\"\") : digits;\n return [0, 2, 4].map((at) => Number.parseInt(full.slice(at, at + 2), 16)) as unknown as Rgb;\n};\n\nexport const hexOf = (rgb: Rgb) => `#${rgb.map((channel) => Math.round(channel).toString(16).padStart(2, \"0\")).join(\"\")}`;\n\n/** `color-mix(in srgb, a share, b)`: the mix the stylesheet draws a tint with. */\nexport const mix = (a: Rgb, share: number, b: Rgb): Rgb =>\n [0, 1, 2].map((index) => a[index]! * share + b[index]! * (1 - share)) as unknown as Rgb;\n\nconst luminance = (rgb: Rgb) => {\n const [r, g, b] = rgb.map((channel) => {\n const value = channel / 255;\n return value <= 0.03928 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4;\n }) as unknown as Rgb;\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\n/** The contrast ratio of two colours, 1 to 21. */\nexport const contrast = (a: Rgb, b: Rgb) => {\n const [light, dark] = [luminance(a), luminance(b)].sort((x, y) => y - x) as [number, number];\n return (light + 0.05) / (dark + 0.05);\n};\n\n/** The colour moved towards `target` in small steps until it has `ratio` against `against`. */\nconst towards = (color: Rgb, target: Rgb, against: Rgb, ratio: number): Rgb => {\n for (let step = 0; step <= 20; step++) {\n const moved = mix(target, step / 20, color);\n if (contrast(moved, against) >= ratio) return moved;\n }\n return target;\n};\n\n/**\n * The lightest step of the colour that still has `ratio` against `surface` (towards the surface while it holds, else\n * away from it): the quieter bars of a history, which must stay readable beside the strong one.\n */\nconst softest = (color: Rgb, surface: Rgb, away: Rgb, ratio: number): Rgb => {\n if (contrast(color, surface) < ratio) return towards(color, away, surface, ratio);\n let soft = color;\n for (let step = 1; step <= 20; step++) {\n const moved = mix(surface, step / 20, color);\n if (contrast(moved, surface) < ratio) break;\n soft = moved;\n }\n return soft;\n};\n\nexport const WHITE: Rgb = [255, 255, 255];\nexport const BLACK: Rgb = [0, 0, 0];\n/** The surfaces of v2 (`--k2-surface`), light and dark, which a tint is mixed with. */\nexport const SURFACE_LIGHT: Rgb = [255, 255, 255];\nexport const SURFACE_DARK: Rgb = [17, 21, 27];\n/** The share of the colour in the tint of a mark (`.k2-mk`). */\nconst TINT = 0.13;\n\n/**\n * The style values of a data colour: the colour itself as `--k2-c`, and for a hex colour its readable foregrounds:\n * `--k2-c-fg` / `--k2-c-fg-dark` (a symbol, 3:1 against its tint), `--k2-c-soft` / `--k2-c-soft-dark` (the quieter\n * bars of a history, as light as 3:1 against the surface allows) and `--k2-c-ink` / `--k2-c-ink-dark` (4.5:1: white type\n * on it, and the strongest bar).\n */\nexport const colorStyle = (value: string | undefined): Record<string, string> | undefined => {\n const color = safeColor(value);\n if (color === undefined) return undefined;\n const rgb = rgbOf(color);\n if (!rgb) return { \"--k2-c\": color };\n return {\n \"--k2-c\": color,\n \"--k2-c-fg\": hexOf(towards(rgb, BLACK, mix(rgb, TINT, SURFACE_LIGHT), 3)),\n \"--k2-c-fg-dark\": hexOf(towards(rgb, WHITE, mix(rgb, TINT, SURFACE_DARK), 3)),\n \"--k2-c-soft\": hexOf(softest(rgb, SURFACE_LIGHT, BLACK, 3)),\n \"--k2-c-soft-dark\": hexOf(softest(rgb, SURFACE_DARK, WHITE, 3)),\n \"--k2-c-ink\": hexOf(towards(rgb, BLACK, WHITE, 4.5)),\n \"--k2-c-ink-dark\": hexOf(towards(rgb, WHITE, SURFACE_DARK, 4.5)),\n };\n};\n\n/** The shares of the app's tint (`--k2-app-tint-mix` in v2.css), light and dark; a test pins them to the stylesheet. */\nexport const appTint = { light: 0.07, dark: 0.18 } as const;\n/** The blue tint of a chosen row (`--k2-blue-tint`), light and dark; a test pins them to the stylesheet. */\nexport const selectedTint = { light: [239, 246, 255], dark: [23, 37, 84] } as const;\n/** A value for a custom property that cannot end its declaration or open another one. */\nexport const safeValue = (value: string) => !/[;{}<>\\\\]/.test(value);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,GAAG,GAAG,yDAAyD;AACrE,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,yBAAyB;AAClD,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,cAAc,MAAM,QAAQ,MAAM,QAAQ,MAAM,sBAAsB,MAAM,YAAY,EAAE,GAAG,CAAC;AACjI,MAAM,KAAK,GAAG,gCAAgC;AAC9C;AACA,MAAM,UAAU,GAAG,uBAAuB;AAE1C,MAAM,UAAU,GAAI,KAAa,IAAK,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;;AAE/F;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